Repository navigation
Releases
dsh-baize-rules v0.2.4
Removed
- The sidebar footer 「规则」 button is gone. The panel used to register a second slot (
ctx.slots.inject('sidebar.footer.action'), idbaize-rules, order 1) that renderedRulesTriggerdirectly above Settings — the entry 0.2.2 had to add a sidebar-stacking CSS patch for. Removed together with it: the button component, its full-viewport no-tab-ring fallbackRulesOverlay, the rules icon, the module-scoped overlay store (useRulesOverlay), therules.sidebar.aria/rules.panel.open/rules.overlay.closelocale keys (zh + en), and the fivefooterActions/.baize-triggerCSS rules. The panel now registers exactly one slot —conversation.view— so it is reachable only from an open conversation's 「规则」 tab. - Accompanying trade-off, accepted deliberately: the new-chat page (no session yet ⇒ no tab ring) can no longer open the panel at all. Rule injection, the
/baize-rulescommand and the template library are untouched.
Changed
test/client.smoke.mjsasserts the single registration, and that nosidebar.footer.action,baize-triggerorRulesOverlaymarkup/CSS survives in the bundle.- README (EN + ZH) documents the single entry point and the new-chat trade-off.
assets/001-rules-panel.pngrecaptured without the footer button (same filename: README andscreenshots.jsonunchanged).
Install:
dsh plugin --profile web add dsh-baize-rules@0.2.4dsh-baize-rules v0.2.3
- The panel API origin check is off by default now (
apiOriginCheck, introduced in 0.2.1 withdefault true). The check refuses every request that does not arrive from loopback, and a web UI behind a reverse proxy is precisely that case — the request arrives from the proxy's address, not from loopback. So the old default silently broke the panel for the ordinary proxied deployment:/baize-rules.apianswered403 requests are accepted from this machine onlywhile the rest of the UI kept working (0.2.0 and earlier had no check and were unaffected). The check itself is unchanged and still available: setapiOriginCheck: trueto enforce same-machine/same-origin only — appropriate when the port is reachable by others and no proxy layer authenticates the callers. Left off (the default), authentication belongs to the transport (dsh's own token) and to the proxy. - Tests split by that default: one case asserts a non-loopback, cross-origin caller is accepted without config, and the two refusal cases (foreign address, cross-site
Origin) now mount withapiOriginCheck: true. - Docs (
README.md,README.zh.md,cordis.patch.yml) carry the new default, and the403row of the API failure table is marked as appearing only with the check switched on.
Install: dsh plugin --profile web add dsh-baize-rules@0.2.3
Published to npm on 2026-09-22.
dsh-baize-rules v0.2.2
- The rules now stay present in long conversations. A snapshot whose text never changes used to be published once, at the start of the session, and then never again. Two refresh rules sit on top of that:
- A fresh copy after a session lifecycle change.
agent/session-start(startup/resume/clear/compact) drops that session's injection record, so the next step publishes a fresh full copy into the conversation as it now stands. This closes the one gap that could lose the rules for good: a compacted or cleared session may no longer carry the earlier message, and nothing used to bring it back. - A fresh copy every
refreshAfterStepssteps. Once the last published copy is that many steps old it is republished even when the rendered text is byte-identical (default 20,0disables the periodic refresh), so the rules are never stranded at the very top of a long thread. A step counter that restarts after compaction counts as stale too. Because the message is published as asnapshot, the model still sees a single copy — the refresh only moves it back to where the conversation is now.
- A fresh copy after a session lifecycle change.
refreshAfterStepsjoins the documented plugin config (README EN + ZH andcordis.patch.yml).test/refresh.spec.ts(7 cases) covers the policy: unchanged text stays quiet, a custom threshold and the default 20 republish,0disables, restarted numbering republishes,compact/resume/cleareach republish, and a rule edit still publishes immediately.- The per-session injection record now carries the step that produced the last publication (
{ digest, step }) instead of only the digest — that step is what the staleness comparison measures. The record is still in-memory; the two refresh rules above are what make that acceptable.
Install: dsh plugin --profile web add dsh-baize-rules@0.2.2
Published to npm on 2026-09-20.
dsh-baize-rules v0.2.0
- Rule tags. A rule (and a template) can carry free-text tags:
tag/untagon the command side, chip editing + chip filtering in the panel. Tags are panel-only by default —injectTags: trueopts into rendering them as- [tag,tag] body, and with the default off the injected<system-reminder>is byte-identical to 0.1.6, so retagging never triggers a redundant re-injection. Stored tags are optional and normalized (max 8 per rule, 24 chars each, case-insensitive dedupe), so pre-tag rule files load unchanged and are rewritten byte-identically. - Template library (
$DSH_HOME/rules/templates.json, global, not bound to a scope):tmpl list|add|edit|rm,save <id>to store a rule as a template, andfrom <id|#tag> [scope]to apply templates as rules (a#tagref applies every template carrying that tag; a same-text rule already in the target scope is skipped, so re-applying never piles up duplicates; applied templates bump a use counter). - Template import/export.
tmpl export [<file>]writes a versioned envelope (kind/schemaVersion/exportedAt) that deliberately omits ids;tmpl import <file> [--merge|--replace] [--dry-run] [--yes]is dry-run by default, dedupes by text, unions tags, and collects every entry error before writing anything. - Panel: two panes. 规则 (scope switch, tag chips, per-row
Edit / Save as template / Remove, and a "From template" multi-select picker) and 模板 (create/edit body+tags, delete, apply into a scope, export to file, import with a dry-run preview). Both panes refresh from a single response. - HTTP API grows an
opdispatch (rule.update,rule.setTags,rule.saveAsTemplate,rule.addFromTemplates,template.create|update|delete|export|import) whilePOST { raw, scope }keeps working unchanged for older panels;GETnow also returnstemplates. - Rule ids accept a unique prefix.
remove/edit/enable/disable/tag/untag/savetake the abbreviated 8-char id thatlistprints; an ambiguous prefix reportsambiguouswith the candidates instead of guessing. - Fixes.
/baize-rules clear projectcleared the session scope instead of project (clearonly branched onglobal), andexportomitted the project section. Both are corrected. - Review fixes (all found by auditing the feature before release):
- The panel silently dropped session/project edits when it had no
sessionId/cwd (the new-chat overlay renders the panel that way): the op answeredok:trueand the rule showed up, then it was gone on the next fetch — nothing was persisted. The API now refuses that write with a 400 that explains it, and the panel disables the scopes it cannot store (session/project) with a hint, defaulting to global. tmpl addreported an already-existing template as a command error, while the HTTP API treated the same call as success. Both paths now branch on an explicitok/changedresult instead of matching on message text; a failed template write no longer carries anextTemplatesside effect.- Template import froze the mode into the dry-run preview: toggling merge/replace after previewing used to apply something different from what was shown. Confirming now always applies exactly the previewed mode.
- A failed template/rule edit no longer exits edit mode (it used to discard the typed text), and a failed import no longer dismisses the dry-run report.
- A malformed JSON request body reported
empty raw; it now reportsinvalid JSON body. template.updatecan now clear tags (an explicit empty list replaces them; omitting tags still keeps them), a no-op write no longer bumpsupdatedAtor rewrites the file, and template ordering gained anupdatedAttie-break.- Follow-up to the scope fix: gating availability on the docs'
cwdwas wrong — theconversation.viewslot's owner share carries onlyinspect/onInspectDone(verified in the shippeddsh-client-ui-conversationbundle), soprojectwas empty even inside a conversation, the project scope got disabled everywhere, and the hint wrongly claimed "not attached to a session". Availability now keys offsessionIdalone: the host resolves that session's cwd itself when storing project rules (resolveProject), which was verified end-to-end — a request with a real sessionId and noprojectwroteprojects/<cwd-slug>.jsonsuccessfully. Only a genuinely session-less panel is limited to global.
- The panel silently dropped session/project edits when it had no
- Docs: README (EN + ZH) cover tags, templates, the new commands,
injectTags, the template file location and the extended API; install examples bumped to 0.2.0. - Docs: add the panel and slash-command screenshots to both READMEs, and rewrite the Publishing section to state what actually ships — the tag-driven CI
publishjob fails without theNPM_TOKENsecret, so a localnpm publish --access publicis the step that publishes (commit4317d1a, which landed after this entry was written and is folded in here).
Install: dsh plugin --profile web add dsh-baize-rules@0.2.0
Published to npm on 2026-09-15.
dsh-baize-rules v0.1.6
- Add the
dsh-pluginnpm keyword so the package surfaces in npm's on-site search; GitHub topics already carried it. Verified first that this keyword is not a directory-listing requirement —@modusensus/dsh-mneme,deepseek-harness-walletanddsh-better-sidebarare all listed without it. - Docs only, no runtime change: correct the release dates below to the actual npm publish times, and fix the 0.1.2 entry that claimed releases were published automatically by CI.
Install: dsh plugin --profile web add dsh-baize-rules@0.1.6
Published to npm on 2026-09-14.
dsh-baize-rules v0.1.5
- Client UI: fix the sidebar footer so plugin entries stack one per row instead of being laid out in a single nowrap flex strip. The shell's
.footerActionsrow is unshrinkable, so a second full-width entry (Baize's trigger next to the wallet ring) overflowed the column and pushed the later button outside the sidebar. Two rules are injected: one pinning the shell strip by its CSS-Modules name fragment, and one class-name-independent:has(> …)fallback; both are guarded with:not(.baize-rail)so the collapsed 56px rail keeps its even row of circular icons. Either rule fails silently, falling back to the previous inline behaviour. - README: add a prominent link to the Chinese README (
README.zh.md) from the top ofREADME.md(and vice versa). - README: document uninstall, and a safe try-out path (
--dump-config) that does not touch the running dsh; clarifypm2 restart dsh.
Install: dsh plugin --profile web add dsh-baize-rules@0.1.5
Published to npm on 2026-09-13.
dsh-baize-rules v0.1.4
- Add dsh-plugin.org
listedbadge to the README (EN + ZH).
Install: dsh plugin --profile web add dsh-baize-rules@0.1.4
Published to npm on 2026-09-07.
dsh-baize-rules v0.1.3
What changed
- Expand npm keywords (deepseek-harness, agent-rules, system-reminder, developer) for discoverability.
- Bump to v0.1.3.
Install: dsh plugin --profile web add dsh-baize-rules@0.1.3
dsh-baize-rules v0.1.2
What changed
- Bilingual README: README.md (English, main) + README.zh.md (Chinese), shipped in npm.
- Single-source release: a v* tag triggers CI publish.
- Link the package to GitHub: repository / homepage / bugs / author / keywords.
- Inject durable user-set session/global must-do / must-not requirements into the model at conversation start.
Install: dsh plugin --profile web add dsh-baize-rules@0.1.2
dsh-baize-rules v0.1.1
- Link the package to GitHub: add
repository,homepage,bugs,authorandkeywords. - Rebuilt and republished to npm.
Install: dsh plugin --profile web add dsh-baize-rules@0.1.1
Published to npm on 2026-08-31.