@fractalsynapse/dsh-chapters 0.2.23 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/contract.md +3 -0
- package/docs/verify.md +6 -0
- package/lib/client.js +15 -15
- package/lib/client.js.map +1 -1
- package/lib/commands.js +31 -4
- package/lib/commands.js.map +1 -1
- package/lib/index.js +10 -2
- package/lib/index.js.map +1 -1
- package/lib/prompt-runner.d.ts +15 -0
- package/lib/prompt-runner.js +43 -0
- package/lib/prompt-runner.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/docs/contract.md
CHANGED
|
@@ -727,6 +727,9 @@ the bar's state rides a plugin record and a projection, and the steady state cos
|
|
|
727
727
|
- Append sites: every durable row write — the runner's `analyzing`/`ready`/`failed`/quiet-`off`
|
|
728
728
|
transitions (it holds the live session) and the bar-access mutations (`setAutorun`, `setOff`,
|
|
729
729
|
`setOn`, `runNow`'s consumption), which gain an optional live-session parameter for the purpose.
|
|
730
|
+
`runNow` also refuses a DELIVERED offer (#289): text equal to a later human-authored turn means
|
|
731
|
+
it already ran; the refusal retires the row (a write verb may heal) and the `state` READ renders
|
|
732
|
+
such an offer resting without mutating anything.
|
|
730
733
|
- The function comes ONLY from the host's own module instance — `createRequire(process.argv[1])
|
|
731
734
|
→ resolve('@deepseek-ai/dsh-session') → await import(resolved)`. The plugin's OWN copy at the
|
|
732
735
|
IDENTICAL version throws `Receiver must be an instance of class Session` against a host session
|
package/docs/verify.md
CHANGED
|
@@ -559,3 +559,9 @@ Field numbers from 2026-10-24 (both stores, 0.2.0 installed): SAIP **1,441 regis
|
|
|
559
559
|
terminal state 3 refused (#59 twins); this repo **1,097 moves in one pass**, terminal state 634 refused, of
|
|
560
560
|
which 483 `test-litter` and 143 `empty-artifact`. Registry backups sit at
|
|
561
561
|
`$DSH_HOME/storages/dsh_chapters.json.pre-repair-*.bak` for either run to be undone.
|
|
562
|
+
|
|
563
|
+
## The Suggested Next Step bar — delivery-layer verification
|
|
564
|
+
|
|
565
|
+
| # | Claim | How it is verified | Result |
|
|
566
|
+
|---|---|---|---|
|
|
567
|
+
| B1 | A `persisted off` cannot strand the bar across a reload (#272/#276) | Browser leg `tests/e2e/prompt-off-revival.spec.ts`, its own boot (`prompt-revival`, port 41743 — measured reason in rig-pins: as the fifth session on the prompt boot it destabilized new-session creation for every spec): carry a session to a ready offer, seed a stale `off` mirror via `addInitScript` so it pre-dates all app JS, reload, and require (a) the bar visible and (b) the dock's `__dshPromptReply` seam showing the wire answered `suggested next step: …` — a veto never pulls, so an empty seam or missing bar fails the leg | **PASS** — recorded on the scripted stub (3 entries, own boot 41743), `prompt`+`prompt-off`+`prompt-revival` replay green model-free each under its own boot; mutation-proof: restoring the pre-#272 `off`-veto reddens EXACTLY this leg (`expect(locator).toBeVisible` — the veto never pulls), the canonical runner restores green. Local record needs `CHOKIDAR_USEPOLLING=1` on this box: 128 inotify instances are machine-exhausted (real ENOSPC, unrelated to the leg; CI runners never hit it) |
|
package/lib/client.js
CHANGED
|
@@ -475,9 +475,7 @@ window.__ModuleLoader__.load({
|
|
|
475
475
|
".dsh-chapters_promptLabel{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}",
|
|
476
476
|
".dsh-chapters_promptText{min-width:0;color:var(--dsw-alias-label-primary-dimmed);font-size:13px;line-height:20px;cursor:pointer;border:0;background:0 0;padding:0;text-align:left;flex:1 1 100%}",
|
|
477
477
|
".dsh-chapters_promptEllipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}",
|
|
478
|
-
".dsh-chapters_promptFull{white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;line-height:20px;font-size:13px;color:var(--dsw-alias-label-primary);display:block;max-height:9rem;overflow-y:auto
|
|
479
|
-
".dsh-chapters_promptCollapse{position:absolute;top:2px;right:2px;width:22px;height:22px;border:none;border-radius:4px;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:13px;line-height:22px;padding:0}",
|
|
480
|
-
".dsh-chapters_promptCollapse:hover{color:var(--dsw-alias-label-primary)}",
|
|
478
|
+
".dsh-chapters_promptFull{white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;line-height:20px;font-size:13px;color:var(--dsw-alias-label-primary);display:block;max-height:9rem;overflow-y:auto}",
|
|
481
479
|
".dsh-chapters_promptError{color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:20px;flex:none;max-width:34%}",
|
|
482
480
|
".dsh-chapters_promptNote{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:20px;min-width:0}",
|
|
483
481
|
".dsh-chapters_promptIntent{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px}",
|
|
@@ -519,7 +517,7 @@ window.__ModuleLoader__.load({
|
|
|
519
517
|
const Action = (props) => {
|
|
520
518
|
const button = (0, react.createElement)("button", {
|
|
521
519
|
type: "button",
|
|
522
|
-
className: "dsh-chapters_promptBtn"
|
|
520
|
+
className: props.className === void 0 ? "dsh-chapters_promptBtn" : `dsh-chapters_promptBtn ${props.className}`,
|
|
523
521
|
"aria-label": props.label,
|
|
524
522
|
...props.disabled === true ? { disabled: true } : {},
|
|
525
523
|
...props.title !== void 0 ? { title: props.title } : nativeTitle(props.label),
|
|
@@ -892,6 +890,7 @@ window.__ModuleLoader__.load({
|
|
|
892
890
|
refuse("neither insertText nor setDraft was accepted");
|
|
893
891
|
return;
|
|
894
892
|
}
|
|
893
|
+
dispatch({ t: "collapse" });
|
|
895
894
|
const head = state.text.slice(0, 24);
|
|
896
895
|
setTimeout(() => {
|
|
897
896
|
try {
|
|
@@ -904,6 +903,7 @@ window.__ModuleLoader__.load({
|
|
|
904
903
|
}
|
|
905
904
|
if (typeof inputActions?.setDraft === "function") {
|
|
906
905
|
inputActions.setDraft(state.text);
|
|
906
|
+
dispatch({ t: "collapse" });
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
909
909
|
console.warn("[client:prompt] click-to-draft refused: this host exposes neither insertText nor setDraft");
|
|
@@ -922,15 +922,7 @@ window.__ModuleLoader__.load({
|
|
|
922
922
|
title: state.expanded ? "Click to send this prompt to the chat input for editing" : "Click to expand the full suggested prompt",
|
|
923
923
|
disabled: state.running,
|
|
924
924
|
onClick: populate
|
|
925
|
-
}, state.expanded ? (0, react.createElement)("span", { className: "dsh-chapters_promptFull" }, (0, react.createElement)("
|
|
926
|
-
type: "button",
|
|
927
|
-
className: "dsh-chapters_promptCollapse",
|
|
928
|
-
"aria-label": "Collapse the suggested prompt",
|
|
929
|
-
title: "Collapse",
|
|
930
|
-
onClick: () => {
|
|
931
|
-
dispatch({ t: "collapse" });
|
|
932
|
-
}
|
|
933
|
-
}, "▴"), state.text ?? "") : (0, react.createElement)("span", { className: "dsh-chapters_promptEllipsis" }, lineFor(state))), ...state.note === "" ? [] : [(0, react.createElement)("span", {
|
|
925
|
+
}, state.expanded ? (0, react.createElement)("span", { className: "dsh-chapters_promptFull" }, state.text ?? "") : (0, react.createElement)("span", { className: "dsh-chapters_promptEllipsis" }, lineFor(state))), ...state.note === "" ? [] : [(0, react.createElement)("span", {
|
|
934
926
|
key: "note",
|
|
935
927
|
className: "dsh-chapters_promptNote",
|
|
936
928
|
role: "status"
|
|
@@ -938,7 +930,15 @@ window.__ModuleLoader__.load({
|
|
|
938
930
|
key: "err",
|
|
939
931
|
className: "dsh-chapters_promptError",
|
|
940
932
|
role: "alert"
|
|
941
|
-
}, state.error)], (0, react.createElement)("div", { className: "dsh-chapters_promptActions" }, (0, react.createElement)(Action, {
|
|
933
|
+
}, state.error)], (0, react.createElement)("div", { className: "dsh-chapters_promptActions" }, ...state.expanded ? [(0, react.createElement)(Action, {
|
|
934
|
+
key: "collapse",
|
|
935
|
+
label: "Collapse the suggested prompt",
|
|
936
|
+
glyph: "▴",
|
|
937
|
+
className: "dsh-chapters_promptCollapse",
|
|
938
|
+
onClick: () => {
|
|
939
|
+
dispatch({ t: "collapse" });
|
|
940
|
+
}
|
|
941
|
+
})] : [], (0, react.createElement)(Action, {
|
|
942
942
|
label: "Run the suggested next step",
|
|
943
943
|
glyph: "▶",
|
|
944
944
|
onClick: run,
|
|
@@ -966,7 +966,7 @@ window.__ModuleLoader__.load({
|
|
|
966
966
|
glyph: "✕",
|
|
967
967
|
onClick: () => {
|
|
968
968
|
(async () => {
|
|
969
|
-
if (exec !== void 0) await exec("/chapters-prompt off");
|
|
969
|
+
if (exec !== void 0) await exec("/chapters-prompt off-session");
|
|
970
970
|
dispatch({ t: "off" });
|
|
971
971
|
if (sessionId !== void 0) {
|
|
972
972
|
const offEntry = {
|