@treeseed/dsh-chapters 0.2.6 → 0.2.8

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/lib/client.js CHANGED
@@ -5,7 +5,65 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  let react = require("react");
8
- let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
8
+ // src/client/tooltip.ts
9
+ /**
10
+ * The host's Tooltip seat, resolved OPTIONALLY (#194-compat — measured on 0.2.1-rc.5, not guessed):
11
+ *
12
+ * `@deepseek-ai/dsh-client-ui-primitives` exists in the 0.2.0-rc.2 host tree and is ABSENT from the
13
+ * entire 0.2.1-rc.5 install tree — no successor package exports `Tooltip`. Our bundle's static
14
+ * import becomes a LAZY require in the built CJS: the bundle loads and components run, but the
15
+ * first render that touches `Tooltip` throws, and React's error boundary swallows the subtree
16
+ * silently. Measured symptoms on 0.2.1: door registration fully healthy (inject returned a
17
+ * disposer; the factory ran; both register effects are functions) yet the assistant-actions region
18
+ * renders ZERO entries, and the dock renders no row — because both wrap their buttons in Tooltip.
19
+ *
20
+ * The fix keeps one resolution point and one fallback (#59 — never per-component try/catch):
21
+ * probe the module once; when it is absent, buttons carry the platform's own `title` tooltip, so
22
+ * hover text survives on every host and the fancy tooltip survives where it exists.
23
+ */
24
+ /**
25
+ * The tooltip recipe, field for field the goal bar's own (GoalBar.tsx:101-142: `portal`,
26
+ * `side="bottom"`, `delayMs={500}`) — the shipped occupant of the same dock strip, whose tooltips
27
+ * are NOT covered by the composer. `portal` is the load-bearing one: it renders the popup at
28
+ * document level instead of inside our dock's stacking context, which is exactly the maintainer's
29
+ * report (#210: "the hoverover tooltips are covered by the main chat input container"). Our old
30
+ * compile-time types rejected portal/delayMs at the overload; the runtime host always accepted
31
+ * them, and since the seat is typed by us, the recipe is pinned by a row instead of by luck.
32
+ */
33
+ function tooltipPropsFor(label) {
34
+ return {
35
+ label,
36
+ side: "bottom",
37
+ portal: true,
38
+ delayMs: 500
39
+ };
40
+ }
41
+ let resolved;
42
+ function resolveTooltip() {
43
+ if (resolved !== void 0) return resolved;
44
+ resolved = null;
45
+ try {
46
+ if (typeof require === "function") {
47
+ const T = require("@deepseek-ai/dsh-client-ui-primitives")?.Tooltip;
48
+ if (typeof T === "function" || typeof T === "object") resolved = T;
49
+ }
50
+ } catch {
51
+ resolved = null;
52
+ }
53
+ return resolved;
54
+ }
55
+ /** Wrap in the host Tooltip when it exists; otherwise return the child (which must carry `title`). */
56
+ function withTooltip(label, child) {
57
+ const T = resolveTooltip();
58
+ return T !== null ? (0, react.createElement)(T, {
59
+ ...tooltipPropsFor(label),
60
+ children: child
61
+ }) : child;
62
+ }
63
+ /** The native-tooltip attribute, present ONLY when the host seat is absent — no double tooltips. */
64
+ function nativeTitle(label) {
65
+ return resolveTooltip() === null ? { title: label } : {};
66
+ }
9
67
  // src/client/prompt-bar.ts
10
68
  function initialBarState(autorun = "disarmed") {
11
69
  return {
@@ -118,10 +176,39 @@ window.__ModuleLoader__.load({
118
176
  const ACTIVE_POLL_MS = 1e4;
119
177
  const QUIET_POLL_MS = 6e4;
120
178
  function pollSpacingFor(s) {
179
+ if (s.edges) {
180
+ if (s.status === "analyzing" || s.autorun === "armed") return ACTIVE_POLL_MS;
181
+ return null;
182
+ }
121
183
  const active = s.status === "analyzing" || s.autorun === "armed" || s.running;
122
184
  if (!active && s.hidden) return null;
123
185
  return active ? ACTIVE_POLL_MS : QUIET_POLL_MS;
124
186
  }
187
+ /**
188
+ * #203: whether a freshly mounted bar pulls, or renders its cache and stays silent. The maintainer's
189
+ * rule: generate or read AFTER THE TURN ENDS, never when you activate a session. So a mount pulls
190
+ * only when the cache cannot be trusted — absent (first mount after a page load), stale (a turn
191
+ * could have ended since; this guarded pull is what keeps Run honest, because clicking a stale
192
+ * offer would submit the row's newer text while showing the old), mid-generation, or armed. A
193
+ * cached `off` never pulls: off is a human/config switch, and only an explicit `on` revisits it.
194
+ */
195
+ function mountPullDecision(c) {
196
+ if (!c.hasCache) return true;
197
+ if (c.status === "off") return false;
198
+ if (c.autorun === "armed" || c.status === "analyzing") return true;
199
+ return c.ageMs > QUIET_POLL_MS;
200
+ }
201
+ /**
202
+ * #203: fold a cached wire event back into row state through the SAME reducer the live path uses —
203
+ * one fold, no second implementation to drift (the #59 rule).
204
+ */
205
+ function stateFromCache(ev, autorun) {
206
+ const folded = promptBarReducer(initialBarState(), ev);
207
+ return autorun === null ? folded : promptBarReducer(folded, {
208
+ t: "autorun",
209
+ on: autorun === "armed"
210
+ });
211
+ }
125
212
  function barVisible(s) {
126
213
  if (s.status === "off") return false;
127
214
  if (s.status === "ready" && (s.text === null || s.text === "")) return false;
@@ -222,6 +309,29 @@ window.__ModuleLoader__.load({
222
309
  return deriveRunning(s.status ?? s.state ?? s.phase);
223
310
  }
224
311
  }
312
+ /**
313
+ * #208: the plane-wide relevance fact, read from the `state` block's own model line. `model: unset`
314
+ * means the feature does not exist on this plane — one discovery reply carrying it silences EVERY
315
+ * dock on the page (the pull transport cannot do better than one discovery; the push transport
316
+ * (#194) removes even that). An unrecognised block is false, never a guess.
317
+ */
318
+ function parseModelAbsent(text) {
319
+ return /^\s*model:\s*unset\b/m.test(text);
320
+ }
321
+ /**
322
+ * #211 — the edge kick's delay, measured on the maintainer's host the hard way: some hosts publish
323
+ * `running` at STEP granularity (it flickers at every tool call and thinking block), and an
324
+ * immediate kick per falling edge was a rendered `chapters-prompt` node per tool call — all waste,
325
+ * because the server row changes ONLY at turn boundaries. So: a falling edge schedules its pull
326
+ * after the debounce, a rising edge cancels it (step flicker coalesces to zero pulls), and the rate
327
+ * floor bounds even a host that holds `running` low through long tool calls. A real turn end — a
328
+ * falling edge with no rising edge after it — pulls exactly once.
329
+ */
330
+ const EDGE_DEBOUNCE_MS = 2e3;
331
+ const EDGE_FLOOR_MS = 15e3;
332
+ function edgeKickDelayMs(msSinceLastPull) {
333
+ return Math.max(EDGE_DEBOUNCE_MS, EDGE_FLOOR_MS - msSinceLastPull);
334
+ }
225
335
  // src/client/prompt-dock.ts
226
336
  /**
227
337
  * The Suggested Next Step dock row (#113) — thin by design.
@@ -245,7 +355,7 @@ window.__ModuleLoader__.load({
245
355
  * @module dsh-chapters/src/client/prompt-dock
246
356
  */
247
357
  const CSS$1 = [
248
- ".dsh-chapters_promptDock{box-sizing:border-box;width:calc(100% - 4 * var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));margin:0 auto}",
358
+ ".dsh-chapters_promptDock{box-sizing:border-box;width:calc(100% - 2 * var(--dsh-composer-side-clearance) - 4 * var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));margin:0 auto}",
249
359
  ".dsh-chapters_promptBar{isolation:isolate;box-sizing:border-box;width:100%;border-radius:var(--dsw-radius-md);height:36px;box-shadow:var(--dsw-elevation-panel);border:0;align-items:center;gap:10px;padding:4px 5px 4px 12px;display:flex;position:relative}",
250
360
  ".dsh-chapters_promptBar::before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:\"\";pointer-events:none;position:absolute;inset:0}",
251
361
  ".dsh-chapters_promptExpanded::before{align-items:flex-start;position:absolute;inset:0}",
@@ -298,14 +408,10 @@ window.__ModuleLoader__.load({
298
408
  className: "dsh-chapters_promptBtn",
299
409
  "aria-label": props.label,
300
410
  ...props.disabled === true ? { disabled: true } : {},
301
- ...props.title !== void 0 ? { title: props.title } : {},
411
+ ...props.title !== void 0 ? { title: props.title } : nativeTitle(props.label),
302
412
  onClick: props.onClick
303
413
  }, props.glyph);
304
- return (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
305
- label: props.label,
306
- side: "bottom",
307
- children: button
308
- });
414
+ return withTooltip(props.label, button);
309
415
  };
310
416
  /** Run is allowed whenever there is an offer; AUTORUN is what the intent and the goal gate. Keeping the
311
417
  * human's own button enabled is deliberate — the point of the protocol is to route a goal edit to a keystroke,
@@ -325,6 +431,14 @@ window.__ModuleLoader__.load({
325
431
  /** How long a state pull may take before we call it failed. Generous on purpose: this is a local RPC that
326
432
  * answers in milliseconds when the session is attachable, and the failure it guards against is a hang. */
327
433
  const PULL_TIMEOUT_MS = 15e3;
434
+ const stateCache = /* @__PURE__ */ new Map();
435
+ /**
436
+ * #208: set by the first reply reporting the plane-wide `model: unset` — the feature does not
437
+ * exist here, so NO dock on this page pulls again for anything: not mounts, not idle edges, not
438
+ * timers, not visibility. One discovery per page load is the pull transport's floor; a page reload
439
+ * is the only revival, and the enabling commands say so.
440
+ */
441
+ let featureAbsent = false;
328
442
  /** Retry ceiling for the FIRST pull only, in attempts and spacing. A mount-time race must not be able to
329
443
  * starve the bar forever, and a real `off` answer stops the loop on the first reply either way. */
330
444
  function execWithTimeout(exec, line, ms) {
@@ -343,10 +457,13 @@ window.__ModuleLoader__.load({
343
457
  }
344
458
  function PromptDock(props) {
345
459
  const { sessionId, inputActions, exec } = props;
346
- const [state, dispatch] = (0, react.useReducer)(promptBarReducer, initialBarState(), (s) => ({
347
- ...s,
348
- running: props.running ?? true
349
- }));
460
+ const [state, dispatch] = (0, react.useReducer)(promptBarReducer, initialBarState(), (s) => {
461
+ const c = sessionId !== void 0 ? stateCache.get(sessionId) : void 0;
462
+ return {
463
+ ...c !== void 0 ? stateFromCache(c.ev, c.autorun) : s,
464
+ running: props.running ?? true
465
+ };
466
+ });
350
467
  const pulling = (0, react.useRef)(false);
351
468
  const probed = (0, react.useRef)(false);
352
469
  const pulled = (0, react.useRef)(false);
@@ -356,10 +473,14 @@ window.__ModuleLoader__.load({
356
473
  }, []);
357
474
  const [busy, setBusy] = (0, react.useState)(false);
358
475
  const kick = (0, react.useRef)(void 0);
476
+ const lastPullAt = (0, react.useRef)(null);
477
+ const edgeTimer = (0, react.useRef)(void 0);
359
478
  const answered = (0, react.useRef)(false);
360
479
  const replyStatus = (0, react.useRef)("unknown");
361
480
  const stateRef = (0, react.useRef)(initialBarState());
362
481
  stateRef.current = state;
482
+ const edgesRef = (0, react.useRef)(props.running !== void 0);
483
+ edgesRef.current = props.running !== void 0;
363
484
  if (!probed.current) {
364
485
  probed.current = true;
365
486
  console.info(`[client:prompt] inputActions keys: ${Object.keys(inputActions ?? {}).join(",") || "NONE"}`);
@@ -367,6 +488,7 @@ window.__ModuleLoader__.load({
367
488
  const refresh = (0, react.useCallback)(async () => {
368
489
  if (exec === void 0 || pulling.current) return;
369
490
  pulling.current = true;
491
+ lastPullAt.current = Date.now();
370
492
  try {
371
493
  const text = await execWithTimeout(exec, BAR_STATE_COMMAND, PULL_TIMEOUT_MS);
372
494
  try {
@@ -383,6 +505,12 @@ window.__ModuleLoader__.load({
383
505
  t: "autorun",
384
506
  on: autorun === "armed"
385
507
  });
508
+ if (parseModelAbsent(text)) featureAbsent = true;
509
+ if (ev !== null && sessionId !== void 0) stateCache.set(sessionId, {
510
+ ev,
511
+ autorun: autorun === "armed" || autorun === "disarmed" ? autorun : null,
512
+ at: Date.now()
513
+ });
386
514
  } catch (error) {
387
515
  console.warn(`[client:prompt] pull failed: ${String(error?.message ?? error).slice(0, 180)}`);
388
516
  } finally {
@@ -394,30 +522,51 @@ window.__ModuleLoader__.load({
394
522
  if (pulled.current) return;
395
523
  pulled.current = true;
396
524
  let timer;
397
- const tick = async () => {
398
- const spacing = pollSpacingFor({
399
- status: replyStatus.current,
400
- autorun: stateRef.current.autorun,
401
- running: stateRef.current.running,
402
- hidden: typeof document !== "undefined" && document.hidden === true
525
+ const effectiveStatus = () => replyStatus.current === "unknown" ? stateRef.current.status : replyStatus.current;
526
+ const spacingNow = () => pollSpacingFor({
527
+ status: effectiveStatus(),
528
+ autorun: stateRef.current.autorun,
529
+ running: stateRef.current.running,
530
+ hidden: typeof document !== "undefined" && document.hidden === true,
531
+ edges: edgesRef.current
532
+ });
533
+ const duePull = () => {
534
+ const c = sessionId !== void 0 ? stateCache.get(sessionId) : void 0;
535
+ return mountPullDecision({
536
+ hasCache: c !== void 0,
537
+ ageMs: c !== void 0 ? Date.now() - c.at : Number.MAX_SAFE_INTEGER,
538
+ status: effectiveStatus(),
539
+ autorun: stateRef.current.autorun
403
540
  });
404
- if (spacing !== null) await refresh();
541
+ };
542
+ const tick = async (opts) => {
543
+ if (featureAbsent) return;
544
+ if (effectiveStatus() === "off") {
545
+ if (!(opts?.mount === true && duePull())) return;
546
+ }
547
+ const spacing = spacingNow();
548
+ if (opts?.force === true || spacing !== null && !(opts?.mount === true && !duePull())) await refresh();
405
549
  if (replyStatus.current === "off") return;
406
- timer = setTimeout(() => {
550
+ const next = spacingNow();
551
+ if (next !== null) timer = setTimeout(() => {
407
552
  tick();
408
- }, spacing ?? 6e4);
553
+ }, next);
409
554
  };
410
555
  kick.current = () => {
411
556
  if (timer !== void 0) clearTimeout(timer);
412
- tick();
557
+ tick({ force: true });
413
558
  };
414
559
  const onVisible = () => {
415
- if (typeof document !== "undefined" && !document.hidden) kick.current?.();
560
+ if (typeof document !== "undefined" && !document.hidden && duePull()) kick.current?.();
416
561
  };
417
562
  if (typeof document !== "undefined") document.addEventListener("visibilitychange", onVisible);
418
- tick();
563
+ tick({ mount: true });
419
564
  return () => {
420
565
  if (timer !== void 0) clearTimeout(timer);
566
+ if (edgeTimer.current !== void 0) {
567
+ clearTimeout(edgeTimer.current);
568
+ edgeTimer.current = void 0;
569
+ }
421
570
  kick.current = void 0;
422
571
  if (typeof document !== "undefined") document.removeEventListener("visibilitychange", onVisible);
423
572
  };
@@ -431,7 +580,19 @@ window.__ModuleLoader__.load({
431
580
  t: "running",
432
581
  running: next
433
582
  });
434
- if (prev && !next) kick.current?.();
583
+ if (prev && !next) {
584
+ if (edgeTimer.current !== void 0) clearTimeout(edgeTimer.current);
585
+ const since = lastPullAt.current === null ? Number.MAX_SAFE_INTEGER : Date.now() - lastPullAt.current;
586
+ edgeTimer.current = setTimeout(() => {
587
+ edgeTimer.current = void 0;
588
+ kick.current?.();
589
+ }, edgeKickDelayMs(since));
590
+ } else if (!prev && next) {
591
+ if (edgeTimer.current !== void 0) {
592
+ clearTimeout(edgeTimer.current);
593
+ edgeTimer.current = void 0;
594
+ }
595
+ }
435
596
  }, [props.running]);
436
597
  const run = (0, react.useCallback)(() => {
437
598
  if (state.text === null || state.text === "" || exec === void 0) return;
@@ -555,6 +716,14 @@ window.__ModuleLoader__.load({
555
716
  (async () => {
556
717
  if (exec !== void 0) await exec("/chapters-prompt off");
557
718
  dispatch({ t: "off" });
719
+ if (sessionId !== void 0) stateCache.set(sessionId, {
720
+ ev: {
721
+ t: "polled",
722
+ status: "off"
723
+ },
724
+ autorun: null,
725
+ at: Date.now()
726
+ });
558
727
  })();
559
728
  }
560
729
  }))));
@@ -932,6 +1101,7 @@ window.__ModuleLoader__.load({
932
1101
  const button = (0, react.createElement)("button", {
933
1102
  type: "button",
934
1103
  "aria-label": door.label,
1104
+ ...nativeTitle(door.label),
935
1105
  disabled: busy,
936
1106
  onClick,
937
1107
  className: "dsh-chapters_forkAction"
@@ -946,11 +1116,7 @@ window.__ModuleLoader__.load({
946
1116
  display: "inline-flex",
947
1117
  alignItems: "center",
948
1118
  gap: "4px"
949
- } }, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
950
- label: door.label,
951
- side: "bottom",
952
- children: button
953
- }), note !== null ? (0, react.createElement)("span", { className: "dsh-chapters_forkNote" }, note) : null);
1119
+ } }, withTooltip(door.label, button), note !== null ? (0, react.createElement)("span", { className: "dsh-chapters_forkNote" }, note) : null);
954
1120
  };
955
1121
  }
956
1122
  function apply(ctx) {
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["CSS","h","Tooltip","useReducer","useRef","useState","useCallback","useState","useRef","useCallback","h","Tooltip"],"sources":["../src/client/prompt-bar.ts","../src/client/prompt-dock.ts","../src/client/doors.ts","../src/client/index.ts"],"sourcesContent":["/**\n * The Suggested Next Step bar — every decision the row makes, kept out of React (#113).\n *\n * Deliberately shaped like the goal bar, because that implementation is tested, already fits, and gets the\n * split right: the **durable** facts (`status`, `text`, `turnSeq` — the server's one-generation-per-turn\n * identity) versus the **process-local** intent (`autorun`, `expanded` — the goal's `activation` in\n * everything but name). Nothing transient is persisted, and nothing persisted is guessed here.\n *\n * The failures the maintainer rejected are all decision bugs, not rendering bugs: firing while a turn is\n * running, shouting a refusal that should have been silence, an autorun that outlives the purpose that\n * justified it. Each has a row in `tests/unit/prompt-bar.test.ts`.\n */\n\nexport type PromptBarStatus = 'off' | 'idle' | 'analyzing' | 'ready' | 'failed'\nexport type PromptBarAutorun = 'armed' | 'disarmed'\n/** Mirrors the host's `GoalPhase` vocabulary (`dsh-goal` types) so goal composition needs no translation. */\nexport type GoalPhaseView = 'none' | 'active' | 'paused' | 'blocked' | 'complete'\n\nexport interface PromptBarState {\n status: PromptBarStatus\n /** The offer, verbatim. Never truncated — an over-cap answer is refused upstream. */\n text: string | null\n /** #113: what kind of step the server classified this as. `goal-edit` is held for the human's keystroke,\n * because goal edits require a direct human turn in the host and an autorun message is not one. */\n intent: 'worker-step' | 'goal-edit'\n /** The `turn/end` seq this offer belongs to; its identity, not a timestamp. */\n turnSeq: number | null\n /** Set only with `status: 'failed'`; rendered as `role=\"alert\"` (#61: delivered, not swallowed). */\n error: string | null\n /** Why an action did not happen, on the bar's face (#113). Empty when there is nothing to explain. */\n note: string\n autorun: PromptBarAutorun\n expanded: boolean\n running: boolean\n goalPhase: GoalPhaseView\n /** The offer a human dismissed or interrupted. A NEW `turnSeq` clears it; this one stays hidden. */\n hiddenTurnSeq: number | null\n /** Live goal facts, when the caller can read them (the goal driver owns the next turn when active+armed). */\n goal: { phase: string; activation: string; revision: number } | null\n}\n\nexport type PromptBarEvent =\n | { t: 'polled', status: PromptBarStatus, text?: string | null, turnSeq?: number | null, error?: string | null, intent?: 'worker-step' | 'goal-edit' }\n | { t: 'expand' } | { t: 'collapse' }\n /** Why an action did not happen, on the bar's own face (#113). Cleared when a new offer lands. */\n | { t: 'note'; note: string }\n | { t: 'autorun', on: boolean }\n | { t: 'human/prompt' }\n | { t: 'off' }\n | { t: 'goal', phase: GoalPhaseView }\n | { t: 'running', running: boolean }\n\nexport function initialBarState(autorun: PromptBarAutorun = 'disarmed'): PromptBarState {\n return { status: 'off', text: null, turnSeq: null, error: null, note: '', intent: 'worker-step', goalPhase: 'none', goal: null, autorun, expanded: false, running: false, hiddenTurnSeq: null }\n}\n\nexport function promptBarReducer(state: PromptBarState, ev: PromptBarEvent): PromptBarState {\n if (ev.t === 'note') return { ...state, note: ev.note }\n const next = baseBarReducer(state, ev)\n // A note is about the gesture that just failed, so a NEW offer retires it. A poll that repeats the same\n // offer (the bar re-reads every few seconds) does not — otherwise the explanation would blink out before\n // the human could read it.\n return ev.t === 'polled' && (next.turnSeq !== state.turnSeq || next.text !== state.text) ? { ...next, note: '' } : next\n}\n\nfunction baseBarReducer(state: PromptBarState, ev: PromptBarEvent): PromptBarState {\n switch (ev.t) {\n case 'polled': {\n if (ev.status === 'off') return { ...state, status: 'off', text: null, turnSeq: null, error: null, expanded: false, autorun: 'disarmed' }\n // A fresh generation invalidates the previous offer: acting on a stale one is how a bar lies.\n if (ev.status === 'analyzing') return { ...state, status: 'analyzing', text: null, error: null }\n return {\n ...state,\n status: ev.status,\n text: ev.status === 'ready' ? (ev.text ?? null) : null,\n intent: ev.status === 'ready' ? (ev.intent ?? 'worker-step') : 'worker-step',\n turnSeq: ev.turnSeq ?? state.turnSeq,\n error: ev.status === 'failed' ? (ev.error ?? 'the suggestion call failed') : null,\n }\n }\n case 'expand': return { ...state, expanded: true }\n // Collapsing is a reading action. It keeps the offer — only a human prompt or `Off` dismisses it.\n case 'collapse': return { ...state, expanded: false }\n case 'autorun': return { ...state, autorun: ev.on ? 'armed' : 'disarmed' }\n case 'running': return { ...state, running: ev.running }\n case 'human/prompt':\n // The human took the wheel: yield the loop, and drop the offer that was on screen. Generation itself\n // continues on the NEXT turn boundary — suspension is not disable.\n return { ...state, autorun: 'disarmed', hiddenTurnSeq: state.turnSeq, expanded: false }\n case 'off': return { ...state, status: 'off', text: null, turnSeq: null, error: null, expanded: false, autorun: 'disarmed' }\n case 'goal':\n // Per spec: autorun runs ALONGSIDE an active goal and disarms itself when the goal completes — the\n // suggestion loop exists to serve the session's purpose, and stops when that purpose stops.\n // #188: blocked joins complete — both planes stop together when the goal reaches a terminal\n // phase; a loop still firing offers at a blocked goal is the autorun that outlived its purpose.\n return { ...state, goalPhase: ev.phase, autorun: ev.phase === 'complete' || ev.phase === 'blocked' ? 'disarmed' : state.autorun }\n }\n // Exhaustive fallback: a new event without a case must return the state unchanged rather than\n // compile into `undefined` and blank the bar.\n return state\n}\n\n/** The status label. `failed` keeps the ready label so the error span is the delta, not a mystery row. */\nexport function barLabel(s: PromptBarState): string | null {\n if (s.status === 'analyzing') return 'Analyzing situation…'\n if (s.status === 'ready' || s.status === 'failed') return 'Recommended Next Step'\n return null\n}\n\n/**\n * #193: the pull cadence, as a decision instead of an interval constant. Every pull is two recorded\n * host lifecycle events (`command/run` + `command/done`) the UI renders as history nodes — cadence\n * IS the litter, so it belongs in this module with a row for every arm. Active = the state can\n * plausibly change on a short clock (generation in flight, an armed loop to fire, a turn running\n * that will end into an offer). Quiet = stable; one pull a minute is plenty for a state that only\n * changes at turn boundaries. Hidden-and-quiet = pull NOTHING (a background tab should write zero\n * history); hidden-and-active still pulls, because walking away from a running loop is the point of\n * autorun and pausing it silently would be the loop dying with nobody told.\n */\nexport const ACTIVE_POLL_MS = 10_000\nexport const QUIET_POLL_MS = 60_000\n\nexport function pollSpacingFor(s: { status: PromptBarStatus; autorun: PromptBarAutorun; running: boolean; hidden: boolean }): number | null {\n const active = s.status === 'analyzing' || s.autorun === 'armed' || s.running\n if (!active && s.hidden) return null\n return active ? ACTIVE_POLL_MS : QUIET_POLL_MS\n}\n\nexport function barVisible(s: PromptBarState): boolean {\n // Only `off` hides the row. `idle` is enabled-and-waiting, and showing it is the difference between\n // \"the feature is live, nothing to say yet\" and silence that reads as disabled (#113).\n if (s.status === 'off') return false\n if (s.status === 'ready' && (s.text === null || s.text === '')) return false\n // The goal bar's `clearedGoalId` guard, in our terms: don't flicker back the offer just dismissed.\n if (s.hiddenTurnSeq !== null && s.hiddenTurnSeq === s.turnSeq) return false\n return true\n}\n\n/** May the bar submit its own offer? Armed, present, idle, not dismissed, and still serving a purpose. */\nexport function shouldAutoFire(s: PromptBarState): boolean {\n if (s.status !== 'ready') return false\n if (s.text === null || s.text === '') return false\n // #113: two host-imposed stops before anything else. A goal re-cut needs a human turn (dsh-tool-goal's\n // requireDirectHuman), and an armed goal driver already intends to start this turn — firing here would be\n // two turn-starters at one boundary, racing the driver's own reservation fence.\n if (s.intent === 'goal-edit') return false\n if (s.goal !== null && s.goal.phase === 'active' && s.goal.activation === 'armed') return false\n if (s.autorun !== 'armed') return false\n if (s.running) return false\n if (s.goalPhase === 'complete' || s.goalPhase === 'blocked') return false\n if (s.hiddenTurnSeq !== null && s.hiddenTurnSeq === s.turnSeq) return false\n return true\n}\n\n/** The command the bar pulls. One string, so the client and the command plane cannot drift silently. */\nexport const BAR_STATE_COMMAND = '/chapters-prompt state'\n/** The bar's Run button: the server submits the on-screen offer as the human's own turn. */\nexport const BAR_RUN_COMMAND = '/chapters-prompt run'\n\n/**\n * Parse the `state` verb's `k: v` lines into a pull event.\n *\n * One output serving the human and the component is the design (see `docs/contract.md`); this function is\n * the cost of that choice, and it is kept honest: an unrecognised line is IGNORED, not guessed at, and a\n * payload that yields no `status` is `null` so the caller keeps its last state rather than inventing `off`\n * (which would hide a bar that is merely mid-reply). Indentation and the prompt's own lines are the reason\n * the prompt is collected separately from the scalar fields — it is the only multi-line value.\n */\nexport function parseBarState(text: string): PromptBarEvent | null {\n const lines = text.split('\\n')\n const head = lines[0] ?? ''\n const statusWord = head.startsWith('suggested next step:') ? head.slice('suggested next step:'.length).trim() : ''\n const status = statusWord === 'off' ? 'off'\n : statusWord === 'idle' ? 'idle'\n : statusWord === 'analyzing' ? 'analyzing'\n : statusWord === 'ready' ? 'ready'\n : statusWord === 'failed' ? 'failed'\n : null\n if (status === null) return null\n const scalars: Record<string, string> = {}\n const prompt: string[] = []\n let inPrompt = false\n for (const line of lines.slice(1)) {\n if (inPrompt) { prompt.push(line.replace(/^ {4}/, '')); continue }\n const m = /^ {2}([a-z]+): ?(.*)$/.exec(line)\n if (m === null) continue\n const key = m[1]!, value = m[2]!.trim()\n if (key === 'prompt') { inPrompt = true; continue }\n scalars[key] !== undefined ? (scalars[key] += ` ${value}`) : (scalars[key] = value)\n }\n const turnRaw = scalars['turn'] ?? ''\n const turnSeq = /^\\d+$/.test(turnRaw) ? Number(turnRaw) : null\n const errorRaw = scalars['error'] ?? ''\n const intentWord = (scalars['intent'] ?? '').split(' ')[0] ?? ''\n return {\n t: 'polled',\n intent: intentWord === 'goal-edit' ? 'goal-edit' : 'worker-step',\n status,\n ...(status === 'ready' ? { text: prompt.join('\\n'), turnSeq } : {}),\n ...(status === 'failed' ? { error: errorRaw, turnSeq } : {}),\n }\n}\n\n/** The autorun flag, read from the same payload — the row is durable, the flag is not. */\nexport function parseBarAutorun(text: string): 'armed' | 'disarmed' | null {\n const m = /^ {2}autorun: (armed|disarmed)\\b/m.exec(text)\n return m === null ? null : (m[1] as 'armed' | 'disarmed')\n}\n\n/**\n * Does the host say this session is busy right now?\n *\n * The dock's props are HOOKS (`useSessionStatus`, `useChat`, `useInput`, …) — documented in\n * docs/contract.md § \"What a dock component is handed\" — so a component that waits for a scalar\n * `props.running` waits forever, which is precisely why Autorun declared itself unavailable while the host\n * was publishing the signal one field away. Shapes differ across hosts and versions, so every form is folded\n * here, in one pure function, with `undefined` (unknown) kept distinct from `false` (idle): the loop refuses\n * to start a turn on an unknown, and that distinction is the whole safety property.\n */\nexport function deriveRunning(status: unknown): boolean | undefined {\n if (status === undefined || status === null) return undefined\n if (typeof status === 'boolean') return status\n if (typeof status === 'string') {\n if (/^(running|streaming|busy|active)$/i.test(status)) return true\n if (/^(idle|done|stopped|finished|ready|waiting)$/i.test(status)) return false\n return undefined\n }\n if (typeof status === 'object') {\n const s = status as { status?: unknown, state?: unknown, running?: unknown, phase?: unknown }\n if (s.running !== undefined) return typeof s.running === 'boolean' ? s.running : undefined\n return deriveRunning(s.status ?? s.state ?? s.phase)\n }\n return undefined\n}\n","/**\n * The Suggested Next Step dock row (#113) — thin by design.\n *\n * Every decision lives in `prompt-bar.ts` where a row can pin it; this file only moves pixels and bytes\n * between the host slot and that reducer. That split is the reason it exists: the ghost was rejected for\n * behaviour that had no home, and \"one turn, one offer\" cannot be tested in a component.\n *\n * Placement is measured, not styled: `conversation.input.dock` is the host's full-width stack rendered\n * ABOVE the composer card (todo `order: 0`, goal `10`, queue `20`), so `order: 30` puts this row under every\n * other dock entry and directly above the input — and because it is a docked row rather than an overlay, it\n * can neither cover the placeholder nor collide with the send buttons. The ghost's ugliest defect was\n * structural, and the structure fixes it.\n *\n * The bar is PUSH-SHAPED, PULL-FED. A registrant can own a reactive observable (`hooks: { x }` → prop\n * `useX`) — that is how the goal bar gets its `activation` — but a plugin cannot publish a projection, and\n * the only plugin-reachable call path is `remote.commands.execute`. So the component pulls the `state` verb\n * on edges it can actually observe. Stated here because the alternative is a reader assuming a subscription\n * that does not exist.\n *\n * @module dsh-chapters/src/client/prompt-dock\n */\n\nimport { createElement as h, useCallback, useEffect, useReducer, useRef, useState, type ReactElement } from 'react'\nimport { Tooltip } from '@deepseek-ai/dsh-client-ui-primitives'\nimport {\n BAR_RUN_COMMAND,\n deriveRunning,\n BAR_STATE_COMMAND,\n pollSpacingFor, QUIET_POLL_MS, type PromptBarStatus,\n barLabel,\n barVisible,\n initialBarState,\n parseBarAutorun,\n parseBarState,\n promptBarReducer,\n shouldAutoFire,\n type PromptBarEvent,\n type PromptBarState,\n} from './prompt-bar.ts'\n\n/** The dock's owner + standard-kit props we read. Everything is optional-typed on purpose: this is a host\n * shape crossing a plugin boundary, and an absent field must degrade visibly, not throw at boot (#58). */\nexport interface DockProps {\n sessionId?: string\n inputActions?: { insertText?: (text: string) => void; setDraft?: (text: string) => void; submit?: () => void }\n /** The host's session-status hook, when this build hands docks one (`useSessionStatus` is in the dock's\n * documented prop list). Folded through `deriveRunning` because its shape is not ours to assume. */\n useSessionStatus?: (selector?: unknown) => unknown\n /** The session snapshot hook; its snapshot carries `running`, which is Autorun's idle edge. */\n useSession?: (selector?: unknown) => unknown\n /** The host publishes running/idle through the composer kit on some builds; if it is absent, autorun\n * refuses to fire rather than guessing that the session is idle. Fail-safe, not fail-open. */\n running?: boolean\n /** Run a host command line for THIS session and return its text. One verb for every call the bar makes\n * (the `state` pull and the `off` write), because the bar is a mouth for the command plane — a second\n * private channel would be a second contract to keep in step, which is what `doors.ts` already avoids. */\n exec?: (line: string) => Promise<string>\n}\n\nconst CSS = [\n // Metrics copied from the goal bar's measured module so the two rows read as one family: a 36px card,\n // host elevation + radius tokens, and the host's own composer width vars so it tracks the card above it.\n '.dsh-chapters_promptDock{box-sizing:border-box;width:calc(100% - 4 * var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));margin:0 auto}',\n '.dsh-chapters_promptBar{isolation:isolate;box-sizing:border-box;width:100%;border-radius:var(--dsw-radius-md);height:36px;box-shadow:var(--dsw-elevation-panel);border:0;align-items:center;gap:10px;padding:4px 5px 4px 12px;display:flex;position:relative}',\n '.dsh-chapters_promptBar::before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:\"\";pointer-events:none;position:absolute;inset:0}',\n '.dsh-chapters_promptExpanded::before{align-items:flex-start;position:absolute;inset:0}',\n '.dsh-chapters_promptGlyph{color:var(--dsw-alias-label-tertiary);flex:none;display:inline-flex}',\n '.dsh-chapters_promptLabel{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}',\n '.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}',\n '.dsh-chapters_promptEllipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}',\n '.dsh-chapters_promptFull{white-space:pre-wrap;overflow:auto;max-height:9rem;display:block}',\n '.dsh-chapters_promptError{color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:20px;flex:none;max-width:34%}', '.dsh-chapters_promptNote{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:20px;min-width:0}',\n '.dsh-chapters_promptIntent{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px}',\n\n '.dsh-chapters_promptActions{flex:none;align-items:center;gap:10px;display:flex}',\n '.dsh-chapters_promptBtn{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex;font-size:13px}',\n '.dsh-chapters_promptBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}',\n '.dsh-chapters_promptBtn:disabled{opacity:.4;cursor:default}',\n].join('\\n')\nconst CSS_ID = 'dsh-chapters/prompt-dock.css'\n\nconst ensureCss = (): void => {\n if (typeof document === 'undefined') return\n if (document.getElementById(CSS_ID) !== null) return\n const style = document.createElement('style')\n style.id = CSS_ID\n style.setAttribute('data-plugin-css', CSS_ID)\n style.textContent = CSS\n document.head.appendChild(style)\n}\n\n/** The analysis glyph, drawn to the goal icon's metric (16 viewBox, stroke currentColor, width 1).\n * A prism-and-arrow: the feature reads the situation and points at the next move. */\nconst Glyph = (): ReactElement => h(\n 'svg', { viewBox: '0 0 16 16', width: 14, height: 14, fill: 'none', 'aria-hidden': 'true', 'stroke-width': '1' },\n h('path', { d: 'M2.5 3.5h11L8 9.5 2.5 3.5Z', stroke: 'currentColor' }),\n h('path', { d: 'M8 9.5V14', stroke: 'currentColor' }),\n h('path', { d: 'M6 12l2 2 2-2', stroke: 'currentColor' }),\n)\n\n/** One action button, labelled through the host tooltip exactly as the goal bar labels its own. */\nconst Action = (props: { label: string; glyph: string; onClick: () => void; disabled?: boolean; title?: string }): ReactElement => {\n const button = h('button', {\n type: 'button', className: 'dsh-chapters_promptBtn', 'aria-label': props.label,\n ...(props.disabled === true ? { disabled: true } : {}),\n ...(props.title !== undefined ? { title: props.title } : {}),\n onClick: props.onClick,\n }, props.glyph)\n // Props matched to the call `doors.ts` already makes successfully: the host Tooltip takes\n // { label, side, children } and nothing else that I have verified. Inventing extra props (portal, delayMs)\n // failed the overload on the first compile, which is the right way to learn it.\n return h(Tooltip, { label: props.label, side: 'bottom' as const, children: button as ReactElement<Record<string, unknown>> })\n}\n\n/** Run is allowed whenever there is an offer; AUTORUN is what the intent and the goal gate. Keeping the\n * human's own button enabled is deliberate — the point of the protocol is to route a goal edit to a keystroke,\n * never to disable the human's ability to send it. */\n/**\n * The words the collapsed row shows, per state. `idle` and `analyzing` must say something, because an empty\n * row is indistinguishable from a broken one — the whole reason this feature took a day to read: the bar was\n * live, enabled, and rendering nothing but whitespace.\n */\nfunction lineFor(state: PromptBarState): string {\n if (state.status === 'ready') return state.text ?? ''\n if (state.status === 'analyzing') return 'Analyzing the session…'\n if (state.status === 'failed') return state.error !== null && state.error !== '' ? `Cannot recommend: ${state.error}` : 'Cannot recommend a next step right now'\n return 'No suggestion yet — I will recommend one after your next turn'\n}\n\nconst canRunHere = (state: PromptBarState): boolean => state.text !== null && state.text !== ''\n\n/** How long a state pull may take before we call it failed. Generous on purpose: this is a local RPC that\n * answers in milliseconds when the session is attachable, and the failure it guards against is a hang. */\nconst PULL_TIMEOUT_MS = 15_000\n\n/** Retry ceiling for the FIRST pull only, in attempts and spacing. A mount-time race must not be able to\n * starve the bar forever, and a real `off` answer stops the loop on the first reply either way. */\n\nfunction execWithTimeout(exec: (line: string) => Promise<string>, line: string, ms: number): Promise<string> {\n return new Promise<string>((resolve, reject) => {\n const timer = setTimeout(() => { reject(new Error(`no answer within ${String(ms)}ms`)) }, ms)\n exec(line).then(\n (text) => { clearTimeout(timer); resolve(text) },\n (error: unknown) => { clearTimeout(timer); reject(error instanceof Error ? error : new Error(String(error))) },\n )\n })\n}\n\nexport function PromptDock(props: DockProps): ReactElement | null {\n const { sessionId, inputActions, exec } = props\n const [state, dispatch] = useReducer(promptBarReducer, initialBarState(), (s) => ({ ...s, running: props.running ?? true }))\n // #79's discipline, kept because the failure it prevents was real: one pull per mount, then per edge.\n // A fetch in an effect with no such guard re-fires on every render.\n const pulling = useRef(false)\n // TWO different facts, two different refs — conflating them is the bug I just shipped: `pulled` is the\n // once-per-mount pull guard, `alive` is \"may this component still call dispatch/setState\". Initializing the\n // pull guard to true made every mount skip its first pull, so the bar sat at its `off` default and rendered\n // nothing at all — a regression that looked, from outside, like the feature having stopped working.\n const probed = useRef(false)\n const pulled = useRef(false)\n const alive = useRef(true)\n useEffect(() => () => { alive.current = false }, [])\n const [busy, setBusy] = useState(false)\n void 0\n // #193: the mount effect's reschedule handle, so the idle edge and the visibility edge can pull NOW\n // instead of waiting out a possibly-quiet cadence. Undefined while the poll is not mounted.\n const kick = useRef<(() => void) | undefined>(undefined)\n const answered = useRef(false)\n const replyStatus = useRef<string>('unknown')\n const stateRef = useRef<PromptBarState>(initialBarState())\n stateRef.current = state\n if (!probed.current) {\n probed.current = true\n // One print, on the first mount: which composer verbs does THIS host actually hand a dock? The click-to-draft\n // requirement needs one, `setDraft` is accepted but never reaches the editor, and guessing at the surface\n // again would be a third wrong theory in a row.\n console.info(`[client:prompt] inputActions keys: ${Object.keys(inputActions ?? {}).join(',') || 'NONE'}`)\n }\n\n const refresh = useCallback(async (): Promise<void> => {\n if (exec === undefined || pulling.current) return\n pulling.current = true\n try {\n // Bounded, and loudly so. Tonight's whole diagnosis cost was paid because this await had no ceiling:\n // a wire that never answers produced no dispatch, no catch and no `finally`, which looked identical to\n // \"the feature is switched off\". A hung command is now a named failure with a number on it (#61).\n const text = await execWithTimeout(exec, BAR_STATE_COMMAND, PULL_TIMEOUT_MS)\n // Handed to the leg through the page, because the state block is the contract and I need to see the\n // bytes the browser parsed, not the bytes the server meant. Overwritten each pull; read on failure.\n try { (window as unknown as { __dshPromptReply?: string }).__dshPromptReply = text } catch { /* test seam only */ }\n const ev = parseBarState(text) as PromptBarEvent | null\n if (ev !== null) { answered.current = true; replyStatus.current = (ev as { status?: string }).status ?? replyStatus.current; dispatch(ev) }\n const autorun = parseBarAutorun(text)\n if (autorun !== null) dispatch({ t: 'autorun', on: autorun === 'armed' })\n } catch (error) {\n // #61: a detected failure is a DELIVERED failure. Keeping the last known state is right; saying\n // nothing was not — with a bare `catch {}` a wire that never answers is indistinguishable from a\n // feature that is switched off, and that is exactly how this bar looked \"unverifiable\" in a browser\n // while the real fault was one line of swallowed output.\n // A failed pull is not a state: the bar keeps what it last knew rather than rendering `off`,\n // which would read as \"suggestions are disabled\" when the wire merely hiccoughed.\n console.warn(`[client:prompt] pull failed: ${String((error as Error)?.message ?? error).slice(0, 180)}`)\n } finally { pulling.current = false }\n }, [exec])\n\n useEffect(() => {\n ensureCss()\n if (pulled.current) return\n pulled.current = true\n // Retry until SOMETHING answers. `answered` flips on any parseable reply, including an honest `off`, so\n // this loop cannot make a disabled session look enabled — it only closes the window where a pull fired\n // before the session could take a command and the bar then stayed blank for the rest of the session.\n // Keep reading while the feature is live, at a cadence that is a DECISION (#193): every pull is two\n // recorded host lifecycle events (`command/run` + `command/done`) the UI renders as history nodes, so\n // the old unconditional 10s poll wrote ~360 visible nodes an hour into every bar-enabled session —\n // the maintainer's \"littered with chapters-prompt runs, one right after another\". `pollSpacingFor`\n // paces it: fast while state can change (analyzing / armed / running), slow while stable, and NOTHING\n // in a hidden tab unless the loop is armed. On hosts that publish no running prop, `running` stays\n // conservatively true and the cadence stays active — the old behavior, unchanged. `off` still ends it.\n let timer: ReturnType<typeof setTimeout> | undefined\n const tick = async (): Promise<void> => {\n const spacing = pollSpacingFor({\n status: replyStatus.current as PromptBarStatus,\n autorun: stateRef.current.autorun,\n running: stateRef.current.running,\n hidden: typeof document !== 'undefined' && document.hidden === true,\n })\n if (spacing !== null) await refresh()\n if (replyStatus.current === 'off') return\n // The reply, not the React state. The old condition read `stateRef.current`, which is only advanced by\n // render — and while the row is hidden there is no render to wait for, so the poll stopped after its\n // first read and the bar could never observe the offer that landed a minute later. Measured: every\n // `state read` in the boot log precedes its `ready` write, with none following.\n timer = setTimeout(() => { void tick() }, spacing ?? QUIET_POLL_MS)\n }\n // The idle edge and the tab-foreground edge both mean \"something just changed; look NOW\" — a scheduled\n // quiet pull is up to a minute stale, and staleness at exactly the moment an offer lands is how a bar\n // looks dead. Kick reschedules rather than stacks: it clears the pending timer first.\n kick.current = () => {\n if (timer !== undefined) clearTimeout(timer)\n void tick()\n }\n const onVisible = (): void => {\n if (typeof document !== 'undefined' && !document.hidden) kick.current?.()\n }\n if (typeof document !== 'undefined') document.addEventListener('visibilitychange', onVisible)\n void tick()\n return () => {\n if (timer !== undefined) clearTimeout(timer)\n kick.current = undefined\n if (typeof document !== 'undefined') document.removeEventListener('visibilitychange', onVisible)\n }\n }, [refresh])\n\n // Autorun fires off the IDLE edge, never off a render. `running` comes from the host when it publishes it;\n // absent means unknown, and unknown means do not start a turn the human cannot see coming.\n const prevRunning = useRef<boolean>(props.running ?? true)\n useEffect(() => {\n const next = props.running ?? true\n const prev = prevRunning.current\n prevRunning.current = next\n dispatch({ t: 'running', running: next })\n // #193: the IDLE edge — a turn just ended, which is precisely when a new offer is born. Pull now\n // instead of waiting out the cadence. Hosts that publish no running prop never produce the\n // transition, and their cadence stays active anyway.\n if (prev && !next) kick.current?.()\n }, [props.running])\n\n // Run is a COMMAND, not a keystroke. The composer-write path (`inputActions.setDraft` + `submit`) looked\n // like the obvious implementation and does not work on this host build: `setDraft` is accepted, and the\n // editor stays empty — measured, twice, after I had convinced myself it was the test's locator or a focus\n // ordering problem. The plugin already has a dependable wire to its own server plane, and the server has\n // exactly one human-authored submission path (the follow-up autorun uses), so Run rides that. The\n // consequence is also the point: what the human clicks and what the loop arms are the same code.\n const run = useCallback((): void => {\n if (state.text === null || state.text === '' || exec === undefined) return\n setBusy(true)\n void exec(BAR_RUN_COMMAND)\n .then((out) => {\n if (!alive.current) return\n if (/^cannot run:/i.test(out.trim())) dispatch({ t: 'polled', status: 'failed', text: state.text, error: out.trim().slice(0, 200), turnSeq: state.turnSeq } as PromptBarEvent)\n else dispatch({ t: 'collapse' })\n })\n .catch((error: unknown) => { console.warn(`[client:prompt] run failed: ${String((error as Error)?.message ?? error).slice(0, 160)}`) })\n .finally(() => { if (alive.current) setBusy(false) })\n }, [exec, state.text, state.turnSeq])\n\n useEffect(() => {\n if (!shouldAutoFire(state)) return\n run()\n }, [state, run])\n\n // Autorun's idle edge stays UNWIRED on this host, and that is now a measured fact rather than a guess:\n // `useSessionStatus` is in the dock's documented prop list, but calling it here threw twice — first a React\n // hook-order abort (#310, because it sat below the early return), then `TypeError: l is not a function` once\n // hoisted. Two blind attempts is the limit; the contract says which hooks exist, not their arity or context.\n // So the gate keeps its original, correct behavior: with no signal, `running` is undefined, Autorun is\n // visibly unavailable and says why, and `deriveRunning` (9 rows) stands ready for whichever shape the host\n // does publish. A loop that starts turns the human cannot foresee is the one failure mode not on offer.\n // `useSessionStatus` is `SnapshotSelectorHook<SessionStatusSnapshot>` — a SELECTOR hook (declared in\n // dsh-client-ui-session's client types), which is why calling it with a session id threw\n // `TypeError: l is not a function`: the host used my string as the selector. An identity selector takes\n // whatever the snapshot's shape happens to be, and `deriveRunning` folds it, so this code does not bet on\n // field names I have not read. Still hoisted above the early return: hook count must not change per render.\n // The idle signal IS published — on `useSession`, whose snapshot carries `running` (measured by printing the\n // hook surfaces once: `useSession=sessionId|pendingSubmissions|running|subagent|removed|openState`). My\n // first two attempts were wrong in different ways: a scalar `props.running` that no host supplies, then\n // `useSessionStatus`, which is provided but yields no readable keys under an identity selector. `deriveRunning`\n // folds `{running}`, so this is the last mile, and the hook is called unconditionally through a stable\n // fallback because hook order must not change between renders.\n const useSessionHook = props.useSession ?? (() => undefined)\n const sessionSnapshot = useSessionHook((snapshot: unknown) => snapshot)\n const running = props.running ?? deriveRunning(sessionSnapshot)\n const autorunDisabled = running === undefined\n\n if (sessionId === undefined || !barVisible(state as PromptBarState)) return null\n\n const populate = (): void => {\n // Collapsed: reading. Expanded: the maintainer's click-to-edit gesture — setDraft REPLACES the draft,\n // which is what they asked for (\"the prompt replaces the chat input contents so you can edit it\"), and\n // nothing is submitted. Run is a separate, deliberate button.\n // Printed on every branch, because \"the button did nothing\" and \"the button took the other path\" looked\n // identical from outside for three runs.\n console.info(`[client:prompt] populate expanded=${String(state.expanded)} hasInsertText=${String(typeof inputActions?.insertText)} hasSetDraft=${String(typeof inputActions?.setDraft)} textLen=${String(state.text?.length ?? -1)}`)\n if (!state.expanded) { dispatch({ t: 'expand' }); return }\n if (state.text === null || state.text === '') return\n // Delivered, not assumed. The click-to-draft gesture is the interaction the maintainer asked for, so a\n // silent no-op here is indistinguishable from \"the feature does not work\" — and that ambiguity cost the\n // rest of this leg's diagnosis. Absent verb, absent text: both say so.\n // The host's composer kit is `{ captureInsertion, insertText, setDraft, addAttachments, removeAttachment,\n // pruneAttachments, submit }` (measured on 0.2.0-rc.2). `setDraft` writes the STORE, and the store is\n // mirrored into the editor only at mount while the editor is empty — which is why a click that \"worked\"\n // (no refusal, no throw) left the box visibly empty. `insertText` is the verb that reaches the editor, so\n // click-to-draft uses it and keeps `setDraft` only as a fallback for builds that lack it.\n if (typeof inputActions?.insertText === 'function') {\n // `insertText` inserts AT THE CARET, and clicking this button moves the caret out of the editor — so the\n // call ran and put the words nowhere. Focusing the composer first is the whole difference, and it is done\n // with a tolerant query rather than a class name: the host's own module hashes (`wSkVaW_…`) are not mine\n // to depend on, and a bar that silently stops drafting after a host restyle is worse than one that tries.\n try {\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n box?.focus()\n } catch { /* a host without the editor mounted: the insert below still records the intent */ }\n // Measured on host 0.2.0-rc.2: called from a dock this throws\n // `Cannot read properties of undefined (reading 'draftRev')`, and the kit's other verb (`setDraft`) writes\n // a store the editor mirrors only at mount. Neither reaches the composer. A silent no-op is what cost the\n // last six runs, so the refusal now appears on the bar and points at Run, which does work.\n const refuse = (why: string): void => {\n console.warn(`[client:prompt] click-to-draft refused: ${why}`)\n dispatch({ t: 'note', note: 'This host does not let a plugin write the composer, so the prompt cannot be edited before sending — Run submits it as your turn' })\n }\n try {\n inputActions.insertText(state.text)\n // Throwing is the easy case. The harder one is the verb that returns successfully and changes nothing,\n // which is what `setDraft` does on 0.2.0-rc.2 and what a silent button looks like forever. Verify the\n // editor actually holds the words; if it does not, say so on the bar.\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n const head = state.text.slice(0, 24)\n if ((box?.innerText ?? '').indexOf(head) === -1) {\n // One animation frame: the host may write the DOM after its own microtask.\n setTimeout(() => {\n const b2 = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n if ((b2?.innerText ?? '').indexOf(head) === -1) refuse('insertText reported success and left the editor empty')\n }, 400)\n }\n } catch (error) {\n refuse(String((error as Error)?.message ?? error).slice(0, 160))\n }\n // Read the editor back from inside the component, so \"insertText is a no-op on this host\" is a fact with\n // a number next to it rather than a conclusion the test reaches after the fact.\n setTimeout(() => {\n try {\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n console.info(`[client:prompt] after insertText: editorText=${String(box?.innerText?.length ?? 'NO-BOX')} focused=${String(document.activeElement === box)}`)\n } catch { /* diagnostics never break the gesture */ }\n }, 250)\n return\n }\n if (typeof inputActions?.setDraft === 'function') {\n inputActions.setDraft(state.text)\n return\n }\n console.warn('[client:prompt] click-to-draft refused: this host exposes neither insertText nor setDraft')\n }\n\n // Called unconditionally through a stable fallback, so the hook order cannot change between renders.\n return h('div', { className: 'dsh-chapters_promptDock', 'data-prompt-bar': 'true' },\n h('div', { className: `dsh-chapters_promptBar${state.expanded ? ' dsh-chapters_promptExpanded' : ''}` },\n h('span', { className: 'dsh-chapters_promptGlyph' }, h(Glyph)),\n h('span', { className: 'dsh-chapters_promptLabel' }, barLabel(state as PromptBarState) ?? ''),\n // A goal re-cut is held for the human's keystroke: the host reserves goal edits for a turn containing a\n // direct human message, and an autorun message is not one. The bar says so on its face rather than\n // letting Run appear to be a normal button that silently fails in the tool.\n ...(state.intent === 'goal-edit' ? [h('span', { key: 'intent', className: 'dsh-chapters_promptIntent', 'aria-label': 'This step edits the goal' }, 'edits the goal · run it yourself')] : []),\n h('button', {\n type: 'button', className: 'dsh-chapters_promptText',\n 'aria-label': state.expanded ? 'Put this suggested prompt in the input box' : 'Show the full suggested prompt',\n onClick: populate,\n }, state.expanded\n ? h('span', { className: 'dsh-chapters_promptFull' }, state.text ?? '')\n : h('span', { className: 'dsh-chapters_promptEllipsis' }, lineFor(state))),\n ...(state.note === '' ? [] : [h('span', { key: 'note', className: 'dsh-chapters_promptNote', role: 'status' }, state.note)]),\n ...(state.error === '' ? [] : [h('span', { key: 'err', className: 'dsh-chapters_promptError', role: 'alert' }, state.error)]),\n h('div', { className: 'dsh-chapters_promptActions' },\n h(Action, {\n label: 'Run the suggested next step', glyph: '▶', onClick: run, disabled: busy,\n ...(state.text === null || state.text === '' || !canRunHere(state) ? { disabled: true } : {}),\n ...(state.intent === 'goal-edit'\n ? { title: 'Goal edits need a human turn. Run still works; autorun will never do this one.' }\n : {}),\n }),\n h(Action, {\n label: state.autorun === 'armed' ? 'Autorun off' : 'Autorun',\n glyph: state.autorun === 'armed' ? '⟳' : '⟲',\n disabled: autorunDisabled,\n ...(autorunDisabled\n ? { title: 'Autorun needs the host to publish an idle signal; this build does not, so nothing would fire safely.' }\n : {}),\n // A SERVER write, like `off` below. Flipping local state alone was the defect: `refresh()` re-reads the\n // loop state (`:193`), the server still says `disarmed`, and the label snaps back — so the user watched\n // their own click be refused and the loop could never be started from the bar. The command surface is\n // `/chapters-prompt autorun on|off` (src/commands.ts:462-478), which also reports the goal displacement.\n onClick: () => {\n void (async () => {\n const arm = state.autorun !== 'armed'\n if (exec !== undefined) await exec(`/chapters-prompt autorun ${arm ? 'on' : 'off'}`)\n dispatch({ t: 'autorun', on: arm })\n await refresh()\n })()\n },\n }),\n h(Action, {\n label: 'Turn prompt suggestions off for this session', glyph: '✕',\n // `off` is a server write, not a local hide: generation stops, the configured model is KEPT so\n // back-on is one action, and the bar disappears instead of lingering with a stale offer.\n onClick: () => { void (async () => { if (exec !== undefined) await exec('/chapters-prompt off'); dispatch({ t: 'off' }) })() },\n }),\n ),\n ),\n )\n}\n","/**\n * The client door runner: the two deterministic archive doors, executed over\n * `remote.commands` and followed by a SWITCH to the fresh child.\n *\n * ONE runner, two rows. The server side keeps the same discipline — both doors\n * come from `deterministicCommand(door)` in src/tools.ts, and a unit row pins\n * that they archive identically. Copy-pasting this body is how the two would\n * drift apart, so there is exactly one implementation and a table of rows.\n *\n * `chapters-continue` ships only as a composer command; without a button here\n * the child is created correctly and the UI shows nothing, which reads as\n * \"nothing happened\". The row is the missing affordance, not new logic.\n *\n * React-free on purpose: the primitives package pulls CSS modules the node\n * test runner cannot load, so the testable half lives here and index.ts is the\n * thin chrome that renders these rows as buttons (tests/unit/client-doors.test.ts).\n *\n * @module dsh-chapters/src/client/doors\n */\n\n/** Structural slice of the aggregated remote service (@deepseek-ai/dsh-api-remotes).\n * `remote.commands` must ALSO appear in inject — the federation gates each\n * sub-service individually (the live feedback package declares\n * remote.messageFeedback beside remote for exactly this reason). */\nexport interface ClientRemote {\n commands?: {\n execute(sessionId: string, line: string, attachments: readonly unknown[]): Promise<{\n ok?: boolean\n value?: { commandId?: string; result?: { kind?: string; text?: string } }\n error?: { code?: string; message?: string }\n }>\n }\n}\n\n/** The client sessions service (dsh-client-runtime): open() lives on the\n * prototype; everything else on the surface stays untrusted and unused. */\nexport interface ClientSessions {\n open(sessionId: string): unknown\n}\n\nexport interface DoorResult {\n ok: boolean\n message: string\n}\n\n/**\n * One assistant-action row. `noun` is the server's own word for the child in\n * its success text (`branch` / `continuation`), so the fallback wording and the\n * title regex both track the door without a second implementation.\n */\nexport interface DoorAction {\n /** The slot registration id. */\n id: string\n /** Position in the assistant action row. */\n order: number\n /** Button + tooltip label, and the accessible name the e2e specs select on. */\n label: string\n /** The host command this row executes — the ONLY semantic difference at runtime. */\n command: string\n /** The noun in `${noun} “title” is session ch-…`. */\n noun: string\n /** The row's glyph (16×16 viewBox, single path). */\n iconPath: string\n}\n\nexport const DOOR_ACTIONS: readonly DoorAction[] = [\n {\n id: 'chapters-fork',\n order: 30,\n label: 'Fork with chapters',\n command: '/chapters-fork',\n noun: 'branch',\n iconPath: 'M5 3.25a2.25 2.25 0 1 0-1.5 2.12v5.26a2.25 2.25 0 1 0 1.5 0V9h5a2.25 2.25 0 0 0 2.25-2.25v-1.4a2.25 2.25 0 1 0-1.5 0v1.4A.75.75 0 0 1 10 7.5H5V5.37A2.25 2.25 0 0 0 5 3.25Z',\n },\n {\n id: 'chapters-continue',\n order: 31,\n label: 'Continue with chapters',\n command: '/chapters-continue',\n noun: 'continuation',\n iconPath: 'M1 8a.75.75 0 0 1 0-1.5h9.44L7.72 3.28a.75.75 0 1 1 1.06-1.06l3.5 3.5.53.53-.53.53-3.5 3.5a.75.75 0 1 1-1.06-1.06L10.44 9.5H1Zm13-5.25v10.5a.75.75 0 0 1-1.5 0v-10.5a.75.75 0 0 1 1.5 0Z',\n },\n]\n\n/** Pull the child id out of either door's durable success text — both end in\n * `… is session ch-…` (src/tools.ts), so this regex is door-agnostic. */\n/**\n * Which build of THIS file produced a door note (#77). When the live probe reported a roster\n * trace of `missing → missing → missing` — meaning adoption should have fired three times — while\n * showing no adoption outcome at all, the first question stopped being \"why did the client refuse\"\n * and became \"did the browser run the code I am reading?\". A note that names its own build makes\n * that a glance instead of an archaeology session into symlinked plugin trees.\n */\nexport const DOOR_BUILD = '2026-10-22T23:55 door-build-stamp'\n\nexport const CHILD_ID = /is session (ch-[\\w-]+)/\n\n/** The quoted title the door gave the child, matched by its OWN noun so a\n * refusal or an unrelated quote cannot pass for it. */\nexport const doorTitle = (noun: string): RegExp => new RegExp(`${noun} \\\\u201C([^\\\\u201D]+)\\\\u201D is session`)\n\n/**\n * A refusal reason that can never render as nothing. `String(err.message ?? err)` is `''` for a\n * host error built with an empty message, and an empty reason disappears from the note — the\n * reader then concludes \"no refusal happened\", which is the opposite of the truth (#77).\n */\nfunction refusalReason(error: unknown): string {\n const raw = error instanceof Error ? error.message : String(error)\n const trimmed = raw.trim()\n const named = trimmed === '' ? (error instanceof Error && error.name.trim() !== '' ? error.name : '') : trimmed\n const base = named === '' ? (error === null ? 'null thrown' : typeof error) : named\n return base.replace(/\\s+/g, ' ').slice(0, 90)\n}\n\n/**\n * Is the child in the client's OWN roster? This is the question that separates two very\n * different failures, and the door used to report the symptom without it:\n * - the client never learned the session exists (roster: missing) → the fix is server-side\n * publication, and no amount of clicking `open` will ever work;\n * - the client knows it and `open` still did nothing (roster: contains) → a navigation bug.\n * Measured host 0.2.0-rc.2: the sessions service exposes `projectList`, `refresh`, `retain`,\n * `handleSessionAdded` — the roster is a projection the client fills from control frames.\n */\n/**\n * The client's own session ids, or `null` when the store cannot be read. ONE reader for both\n * the note and the adoption decision, so the door never acts on a verdict it did not report.\n */\nfunction rosterIds(sessions: ClientSessions | undefined): Set<string> | null {\n const store = (sessions as unknown as { list?: { getSnapshot?: () => unknown } })?.list\n if (typeof store?.getSnapshot !== 'function') return null\n const snap = store.getSnapshot()\n const ids = new Set<string>()\n if (Array.isArray((snap as { ids?: unknown[] } | undefined)?.ids)) {\n for (const id of (snap as { ids: unknown[] }).ids) ids.add(String(id))\n } else if ((snap as { byId?: object } | undefined)?.byId !== undefined) {\n for (const k of Object.keys((snap as { byId: object }).byId)) ids.add(k)\n } else return null\n return ids\n}\n\nfunction rosterNote(sessions: ClientSessions | undefined, child: string): string {\n try {\n // The host's client store shape is `list.getSnapshot() → { ids, byId, phase }`.\n // `projectList()` turned out to be a MUTATOR that returns undefined (measured), so the first\n // version of this note printed \"0 sessions\" about a conversation that visibly had one — the\n // repo's own `listEvents` lesson (\"measure the SHAPE, not the presence\"), repeated by me in\n // the same week. Read the store; when it isn't reachable, presence is UNKNOWN and the note\n // says that rather than inventing an absence.\n const ids = rosterIds(sessions)\n if (ids === null) {\n const store = (sessions as unknown as { list?: { getSnapshot?: () => unknown } })?.list\n const shape = typeof store?.getSnapshot !== 'function' ? 'no list store on the service' : 'snapshot unreadable'\n return ` (roster: ${shape} — presence of ${child.slice(0, 11)}… is UNKNOWN, not absent)`\n }\n if (ids.size === 0) return ` (roster: empty — presence of ${child.slice(0, 11)}… is UNKNOWN, not absent)`\n const n = ids.size\n return ids.has(child)\n ? ` (roster: contains ${child.slice(0, 11)}…, ${String(n)} sessions — open() is the failure)`\n : ` (roster: MISSING, ${String(n)} sessions — the client never catalogued this session)`\n } catch { return '' }\n}\n\n/** The service's own method names, as a hint attached to a failure note (never a guess). */\nfunction verbsNote(sessions: ClientSessions | undefined): string {\n try {\n const svc = sessions as unknown as Record<string, unknown> | undefined\n if (svc === null || svc === undefined || typeof svc !== 'object') return ' (sessions service: absent)'\n // Measured: `Object.keys(svc)` returned NOTHING for the real service, because the host\n // puts its verbs on the PROTOTYPE (a class instance), not as own keys. A diagnostic that\n // reports \"no methods\" about a working service is worse than none — walk the chain.\n const found = new Set<string>()\n let node: unknown = svc\n // Stop at Object.prototype: its four legacy accessors are not service verbs, and listing\n // them pushed the real names past the cap on the first live run.\n for (let depth = 0; depth < 6 && node !== null && node !== undefined && node !== Object.prototype; depth++) {\n for (const key of Object.getOwnPropertyNames(node as object)) {\n if (key === 'constructor') continue\n try { if (typeof (svc as Record<string, unknown>)[key] === 'function') found.add(key) } catch { /* getter that throws — not a verb we can use either */ }\n }\n node = Object.getPrototypeOf(node)\n }\n const verbs = [...found].sort().slice(0, 24)\n return verbs.length === 0 ? ' (sessions service: no methods on the chain)' : ` (sessions verbs: ${verbs.join(', ')})`\n } catch { return ' (sessions service: unreadable)' }\n}\n\nfunction openByService(\n sessions: ClientSessions | undefined,\n sessionId: string,\n /** #77: adopt (and re-project) only when the client's own roster is missing this session.\n * `onAfter` reports the roster at the instant after adoption, before any later refresh can\n * discard the mutation — the difference between an ordering bug and a publication gap. */\n adopt?: { needed: boolean, onRefused: (reason: string) => void, onSubscribeRefused?: (reason: string) => void, onAfter: (seen: boolean | null) => void, onStep?: (step: string) => void },\n nav?: { openSession?: (id: string) => unknown },\n): Promise<boolean> {\n return (async () => {\n const svc = sessions as unknown as {\n open?: (id: string) => unknown; refresh?: () => unknown; projectList?: () => unknown\n create?: (opts: { sessionId?: string }) => unknown\n using?: (id: string, opts: { source: string }, fn: () => Promise<void>) => unknown\n } | undefined\n // #77, the actual root cause: `sessions.open` DOES NOT EXIST on this host. The sessions\n // service offers create/fork/using/retain/binding/refresh; the host's own fork button calls\n // `ctx.uiWorkspace.openSession(childId)` (`dsh-client-ui-chat/lib/client.js`). The line here\n // used to be `if (typeof svc?.open !== 'function') return false`, so every service attempt\n // since the door was written returned false on line one and the note blamed the client's\n // roster for a verb that was never there.\n if (svc === undefined) return false\n const navigate = typeof nav?.openSession === 'function'\n ? (id: string): unknown => nav.openSession!(id)\n : typeof svc?.open === 'function'\n ? (id: string): unknown => svc.open!(id)\n : null\n if (navigate === null) {\n adopt?.onStep?.('no-verb')\n return false\n }\n try { await svc.refresh?.() } catch { /* refresh best-effort */ }\n // #57: re-project the client's session catalog. The host does this ITSELF after every\n // create and fork — `dsh-api-session-controller/lib/client.js`, `create()` and `fork()`\n // both end in `this.projectList()` — because a session the client has never catalogued is\n // not addressable by `open()` no matter how often you call it. A plugin-created child is\n // exactly that case: durable, workspace-attached, absent from the client's roster. Measured\n // on 0.2.0-rc.2: without this the door created the child, `open` resolved, and the app\n // stayed on the parent (the door's own note now says `roster: …` so this is never a guess).\n try { svc.projectList?.() } catch { /* best-effort, like refresh */ }\n // #77: adopt-and-catalogue. `manager.create()` is documented \"on success merge into\n // summaries immediately (no wait for the next refresh)\" and forwards a caller-owned\n // `sessionId`, while the server ADOPTS a persisted id instead of authoring a second session\n // (`create(request)` → `ensureSession(sessionId, cwd, request.sessionId !== undefined, …)`).\n // Nothing about the child's content is authored here — the seed notice was committed\n // host-plane long before this call — this only lets the client see what the host already\n // knows. A refusal is reported to the caller, never swallowed.\n if (adopt?.needed === true && typeof svc.create === 'function') {\n // the block narrates itself: entry first, then whichever way it left. The live note once\n // said \"try\" from the runner and showed nothing downstream — with this line, an absent\n // `enter-create` IS the answer instead of a mystery.\n adopt.onStep?.('enter-create')\n try {\n await svc.create({ sessionId })\n adopt.onStep?.('settle-create')\n try { svc.projectList?.() } catch { /* re-project again, now that a mutation exists */ }\n // the momentary read is the whole point: a later `refreshList()` reassigns the manager's\n // mutations from the server result, so an adoption that DID land is invisible by the time\n // the last attempt fails. Report what was true at the instant it mattered.\n const after = rosterIds(sessions)\n adopt.onAfter?.(after === null ? null : after.has(sessionId))\n } catch (error) {\n adopt.onStep?.('refuse-create')\n adopt.onRefused(refusalReason(error))\n }\n }\n // #77, second candidate: if adoption left the child out of the roster, SUBSCRIBE to it.\n // `using(target, {source}, fn)` is the host's own way to address a session that is not\n // currently displayed (`sessions/service.js`: retain → `manager.get(id).open()`). A refusal is\n // reported exactly like adoption's. No URL route exists as an alternative — checked every\n // dsh-client-* bundle: the only `/session/` strings are resource addresses for files.\n if (adopt?.needed === true && typeof svc.using === 'function' && rosterIds(sessions)?.has(sessionId) === false) {\n adopt.onStep?.('enter-using')\n try {\n await svc.using(sessionId, { source: 'dsh-chapters-door' }, async () => undefined)\n adopt.onStep?.('settle-using')\n try { svc.projectList?.() } catch { /* best-effort, like the others */ }\n const seen = rosterIds(sessions)\n adopt.onAfter?.(seen === null ? null : seen.has(sessionId))\n } catch (error) {\n adopt.onStep?.('refuse-using')\n adopt.onSubscribeRefused?.(refusalReason(error))\n }\n }\n // The store must know the session before open() resolves it; a child\n // created seconds ago is only server-known until refresh lands. Retry\n // open briefly across that window.\n const started = Date.now()\n for (;;) {\n try { navigate(sessionId); return true } catch {\n if (Date.now() - started > 4_000) return false\n await new Promise((r) => setTimeout(r, 250))\n }\n }\n })()\n}\n\n/**\n * Fallback path: expand collapsed groups / show-more buttons, then click the\n * newest treeitem whose label contains the child title (newest-updated sorts\n * first, so the first match is the fresh child).\n */\nasync function openBranchRow(title: string, budgetMs = 4_000): Promise<boolean> {\n if (typeof document === 'undefined') return false\n const needle = title.toLowerCase()\n const tryClick = (): boolean => {\n const rows = Array.from(document.querySelectorAll<HTMLElement>('[role=\"treeitem\"]'))\n const hit = rows.find((row) => (row.textContent ?? '').toLowerCase().includes(needle))\n if (hit === undefined) return false\n hit.click()\n return true\n }\n const clickMore = (): number => {\n const buttons = Array.from(document.querySelectorAll<HTMLElement>('button'))\n .filter((b) => /more sessions|ungrouped/i.test(b.textContent ?? '') && b.getAttribute('aria-expanded') !== 'true')\n for (const b of buttons) b.click()\n return buttons.length\n }\n const started = Date.now()\n let expansions = 0\n while (Date.now() - started < budgetMs) {\n if (tryClick()) return true\n if (expansions < 4 && clickMore() > 0) { expansions += 1; await new Promise((r) => setTimeout(r, 250)); continue }\n await new Promise((resolve) => setTimeout(resolve, 150))\n }\n return tryClick()\n}\n\nexport function makeDoorRunner(\n remote: ClientRemote,\n sessions: ClientSessions | undefined,\n door: DoorAction,\n /**\n * \"Is THIS session the one the client is now showing?\" #54: `sessions.open()` returns\n * void, so a call that resolves proves the request was accepted, not that the app\n * switched. Measured on host 0.2.0-rc.2: no note element (open resolved), yet\n * `dsh.sessions.current` still named the parent and the child was absent from the\n * sidebar after a full reload — the user got silence and a missing session. Absent\n * (a client that cannot answer) the runner keeps the old behavior, and the wiring is\n * pinned by a row so production can never quietly drop it.\n */\n verifySwitched?: (childSessionId: string) => Promise<boolean>,\n /**\n * #77: how many times to re-pull the client's list, re-project and re-open. The session\n * manager documents `refreshList()` as \"single-flight within one Host generation\"\n * (`dsh-api-session-controller/lib/types/client/sessions/manager.js`), so a pull issued while\n * another is in flight can resolve from the STALE result — precisely the moment a session\n * created microseconds ago is missing. Retrying is both the fix candidate and the measurement:\n * which attempt lands tells us whether this is ordering (ours) or silence (host-side).\n * A client with no `refresh` verb gets exactly ONE attempt — re-asking `open` against a roster\n * we cannot re-pull would be theater.\n */\n opts?: { attempts?: number, attemptPauseMs?: number, navigator?: { openSession?: (id: string) => unknown } },\n): (sessionId: string) => Promise<DoorResult> {\n return async function run(sessionId: string): Promise<DoorResult> {\n try {\n if (remote.commands?.execute === undefined) return { ok: false, message: 'commands remote unavailable' }\n const res = await remote.commands.execute(sessionId, door.command, [])\n if (res.ok !== true) return { ok: false, message: (res.error?.message ?? `the ${door.noun} call failed`).slice(0, 90) }\n const result = res.value?.result\n const text = typeof result?.text === 'string' ? result.text : ''\n if (result?.kind !== 'success') return { ok: false, message: (text || `the ${door.noun} was refused — see the command result`).slice(0, 90) }\n const child = CHILD_ID.exec(text)?.[1]\n if (child === undefined) return { ok: true, message: `${door.noun} created — appearing in the sidebar` }\n const switchedOnce = async (): Promise<boolean> => {\n if (verifySwitched === undefined) return true\n try { return await verifySwitched(child) } catch { return false }\n }\n const canRepull = typeof (sessions as unknown as { refresh?: unknown } | undefined)?.refresh === 'function'\n const maxAttempts = canRepull ? (opts?.attempts ?? 3) : 1\n let tried = 0\n let adoptRefusal = ''\n let subscribeRefusal = ''\n // #77: what the roster reader answered AT EACH DECISION, not only at the end. The live\n // probe reported MISSING after three attempts while neither candidate fired, which can\n // only mean the reader disagreed with itself over time — and a note that says one number\n // cannot show that.\n const rosterTrace: string[] = []\n const steps: string[] = []\n let adoptSaw: boolean | null | undefined\n for (let i = 0; i < maxAttempts; i++) {\n tried += 1\n // decide adoption from the SAME reader the note reports, so the door never acts on a\n // verdict it did not tell the user about; an unreadable roster is not \"missing\"\n const ids = rosterIds(sessions)\n // Loaded-but-empty is a DECISION (the child is not there → try the sanctioned paths);\n // unreadable is UNKNOWN and must not invent a session (#77: the strict form here meant\n // neither candidate ever ran in the live probe, and its silence looked like a result).\n const needed = ids !== null && !ids.has(child)\n // `+c` / `+u` = the candidate verbs are present on the injected service AT THAT MOMENT.\n // Without this, a note that says the roster was missing while no adoption outcome appears\n // is uninterpretable: either the code never ran, or the service has no create to call.\n const svcShape = sessions as unknown as { create?: unknown, using?: unknown, open?: unknown } | undefined\n // +c create, +u using, +o sessions.open, +w workspace navigator — the exact predicates\n // the door branches on, so a note can be read instead of re-derived from source\n rosterTrace.push(`${ids === null ? 'unknown' : ids.size === 0 ? 'empty' : ids.has(child) ? 'has' : 'missing'}${typeof svcShape?.create === 'function' ? '+c' : '-c'}${typeof svcShape?.using === 'function' ? '+u' : '-u'}${typeof svcShape?.open === 'function' ? '+o' : '-o'}${typeof opts?.navigator?.openSession === 'function' ? '+w' : '-w'}`)\n if (await openByService(sessions, child, {\n needed,\n onRefused: (reason) => { adoptRefusal = reason },\n onSubscribeRefused: (reason) => { subscribeRefusal = reason },\n onAfter: (seen) => { adoptSaw = seen },\n onStep: (step) => { if (!steps.includes(step)) steps.push(step) },\n }, opts?.navigator) && await switchedOnce()) return { ok: true, message: '' }\n if (i + 1 < maxAttempts) await new Promise((r) => { setTimeout(r, opts?.attemptPauseMs ?? 300).unref?.() })\n }\n // the service path did not take — the sidebar row is the same affordance a human uses\n const title = doorTitle(door.noun).exec(text)?.[1]\n if (title !== undefined && await openBranchRow(title) && await switchedOnce()) return { ok: true, message: '' }\n // #54: a child that is created but not shown is a DIFFERENT fact from one the user\n // has to open by hand, and the message must not blur them.\n // #56/#57: the note must be ACTIONABLE. \"the app did not switch\" is true and useless;\n // naming the verbs the injected service actually exposes turns one failure into the\n // diagnosis (is there a refresh/reload to call, or is `open` the only verb and the\n // omission server-side?). A detected failure that isn't delivered is the same bug.\n return verifySwitched === undefined\n ? { ok: true, message: `${door.noun} created — open it in the sidebar` }\n : { ok: true, message: `${door.noun} created — the app did not switch after ${String(tried)} attempt${tried === 1 ? '' : 's'}; open it from the sidebar [roster per attempt: ${rosterTrace.join(' → ')}] [tried: ${steps.length === 0 ? 'none' : steps.includes('no-verb') ? 'no open or openSession verb on any injected service' : steps.join(', ')}] (build: ${DOOR_BUILD})${adoptRefusal === '' ? '' : ` (adoption refused: ${adoptRefusal})`}${subscribeRefusal === '' ? '' : ` (subscribe refused: ${subscribeRefusal})`}${adoptSaw === undefined ? '' : ` (right after adopt: ${adoptSaw ? 'contains' : 'missing'} ${child.slice(0, 15)})`}${rosterNote(sessions, child)}${verbsNote(sessions)}` }\n } catch (error) {\n return { ok: false, message: String((error as Error)?.message ?? error).slice(0, 90) }\n }\n }\n}\n\n/**\n * Execute a host command line for one session and return its text, or '' when the command plane is\n * unavailable. The bar's `state` pull and `off` write ride this, because it is the ONE place the client\n * talks to the wire: the guard row \"there is no second runner body in the client chrome\" exists to keep\n * `index.ts` as registration chrome, and a duplicated `commands.execute` in two files is how a wire\n * behaviour drifts from its own test (#59's one-predicate rule, applied to the transport).\n */\nexport async function runCommandText(remote: ClientRemote | undefined, sessionId: string, line: string): Promise<string> {\n const exec = remote?.commands?.execute\n if (exec === undefined) return ''\n const res = await exec(sessionId, line, [])\n if (res.ok !== true) return ''\n return res.value?.result?.text ?? ''\n}\n","/**\n * dsh-chapters client entry: the per-message door buttons.\n *\n * Registers the two deterministic archive doors into the assistant action row\n * (`conversation.chat.assistant-actions` — the slot the official feedback\n * package populates beside copy/branch). Clicking one executes its host\n * command — `/chapters-fork`, `/chapters-continue` — through `remote.commands`,\n * the exact wire the composer's input line rides, then SWITCHES the app to the\n * fresh child:\n *\n * 1. `sessions.open(child)` — the client sessions service carries open() on\n * its prototype (Playwright-verified against this host; a keys-dump alone\n * hid it, which is why an earlier round wrongly gave up on this path);\n * 2. fallback: click the child's sidebar row after expanding collapsed\n * groups (plugin children can render under collapsed 'Ungrouped' heads);\n * 3. last resort: an inline note — the child is durable either way.\n *\n * There is deliberately NO second implementation of door logic here: the\n * buttons are mouths for the host commands (watermark, segmentation, budget,\n * titles, refusal-with-numbers all server-side, all tested), and the runner\n * they share is `src/client/doors.ts` — one body, one row per door. The purity\n * gate in tsdown.client.config.ts keeps this file cross-plugin-free.\n *\n * @module dsh-chapters/src/client\n */\n\nimport { createElement as h, useCallback, useEffect, useRef, useState, type ReactElement } from 'react'\n// The host's own tooltip bubble — a platform module served by the loader table,\n// external like react. Every action in this row labels through it.\nimport { Tooltip } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { PromptDock } from './prompt-dock.ts'\nimport { DOOR_ACTIONS, makeDoorRunner, runCommandText, type ClientRemote, type ClientSessions, type DoorAction, type DoorResult } from './doors.ts'\n\ninterface ClientSlots {\n inject(name: string, factory: () => unknown): void\n register(registration: Record<string, unknown>, component: unknown): unknown\n}\n\ninterface Ctx {\n slots: ClientSlots\n get(name: string): unknown\n}\n\n// #77: `uiWorkspace` is not optional in practice — it owns `openSession(target)`, the verb the\n// host's own fork button uses (`ctx.uiWorkspace.openSession(childId)` in dsh-client-ui-chat).\n// `sessions` has no `open` at all, so without this row the door has never had a way to switch.\nexport const inject = ['slots', 'remote', 'remote.commands', 'sessions', 'uiWorkspace'] as const\n\n/** Props composed by the slot framework: owner (`messageId`) + our injected verb. */\ninterface DoorActionProps {\n messageId: string\n run: () => Promise<DoorResult>\n}\n\n/**\n * Style parity with the native IconActions row: rules copied verbatim from the\n * host's MessageIconActions module (`._xzv4MW_action` in dsh-client-ui-chat's\n * compiled client + the feedback package's :disabled) — same metrics, tokens,\n * hover. Update this string if the host restyles its action row. Both doors\n * share these metrics.\n *\n * The final rule hides the native branch action IN THE MESSAGE ROW only\n * (user-approved cosmetic decision, docs/architecture.md): built-in chrome, so\n * the selector is its accessible label scoped to action-row buttons; both\n * locale spellings covered. If the host rewords the label the button simply\n * reappears — fails open, visibly.\n */\nconst CSS = [\n '.dsh-chapters_forkAction{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}',\n '.dsh-chapters_forkAction svg{width:calc(15px + var(--dsh-content-font-delta,0px));height:calc(15px + var(--dsh-content-font-delta,0px))}',\n '.dsh-chapters_forkAction:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}',\n '.dsh-chapters_forkAction:disabled{cursor:default;opacity:.4}',\n '.dsh-chapters_forkNote{color:var(--dsw-alias-label-tertiary);padding-left:4px;font-size:13px;line-height:20px}',\n 'button[class*=\"_action\"][aria-label=\"Branch into a new conversation\"],button[class*=\"_action\"][aria-label=\"\\u5728\\u65b0\\u5bf9\\u8bdd\\u4e2d\\u5206\\u652f\"]{display:none !important}',\n].join('\\n')\nconst CSS_TAG_ID = 'dsh-chapters/assistant-action.css'\n\nfunction injectStyles(): void {\n try {\n if (typeof document === 'undefined' || document.querySelector(`style[data-plugin-css=${JSON.stringify(CSS_TAG_ID)}]`) !== null) return\n const tag = document.createElement('style')\n tag.dataset.plugin = 'dsh-chapters'\n tag.dataset.pluginCss = CSS_TAG_ID\n tag.textContent = CSS\n document.head.appendChild(tag)\n } catch { /* styling is cosmetic; the action still works without it */ }\n}\n\n/** One component body for every door row; only the label and glyph differ. */\nfunction makeDoorAction(door: DoorAction) {\n return function ChaptersDoorAction({ run }: DoorActionProps) {\n const [busy, setBusy] = useState(false)\n const [note, setNote] = useState<string | null>(null)\n const alive = useRef(true)\n useEffect(() => () => { alive.current = false }, [])\n const onClick = useCallback(() => {\n if (busy) return\n setBusy(true)\n setNote(null)\n void run().then((result) => {\n if (!alive.current) return\n setBusy(false)\n setNote(result.message === '' ? null : result.message)\n setTimeout(() => { if (alive.current) setNote(null) }, 8000)\n })\n }, [busy, run])\n const button = h('button', {\n type: 'button',\n 'aria-label': door.label,\n disabled: busy,\n onClick,\n className: 'dsh-chapters_forkAction',\n },\n h('svg', { viewBox: '0 0 16 16', width: '15', height: '15', fill: 'currentColor', 'aria-hidden': 'true' },\n h('path', { d: door.iconPath })))\n return h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' } },\n h(Tooltip, { label: door.label, side: 'bottom' as const, children: button as ReactElement<Record<string, unknown>> }),\n note !== null\n ? h('span', { className: 'dsh-chapters_forkNote' }, note)\n : null)\n }\n}\n\nexport function apply(ctx: Ctx): void {\n injectStyles()\n const slots = ctx.slots\n const remote = (ctx.get('remote') ?? {}) as ClientRemote\n let sessions: ClientSessions | undefined\n try { sessions = ctx.get('sessions') as ClientSessions | undefined } catch { sessions = undefined }\n // Defensive: a host that cannot provide the navigator must leave the door registering and\n // reporting its own limitation, not failing at boot.\n let uiWorkspace: { openSession?: (id: string) => unknown } | undefined\n try { uiWorkspace = ctx.get('uiWorkspace') as { openSession?: (id: string) => unknown } | undefined } catch { uiWorkspace = undefined }\n // No early return on missing descriptors: the buttons register regardless\n // and the click reports the gap. A missing button is worse than a button\n // that explains itself. Components and runners are built ONCE here — slot\n // factories may re-run, and a fresh component identity per call would\n // remount the row.\n // #54: the switch verifier. `dsh.sessions.current` is published by the host's own\n // dsh-client-ui-workspace (grep-confirmed, not folklore) — the same key the e2e specs\n // read to name a session exactly, which is the point: the door now checks the fact the\n // user would notice, not whether a void call threw.\n const currentSessionId = (): string | null => {\n try {\n const raw = window.localStorage.getItem('dsh.sessions.current')\n if (raw === null) return null\n const parsed = JSON.parse(raw) as { sessionId?: string } | null\n return parsed?.sessionId ?? null\n } catch { return null }\n }\n const rows = DOOR_ACTIONS.map((door) => ({\n door,\n run: makeDoorRunner(remote, sessions, door, async (child) => {\n for (let i = 0; i < 8; i++) {\n if (currentSessionId() === child) return true\n await new Promise((r) => setTimeout(r, 250))\n }\n return currentSessionId() === child\n }, { ...(uiWorkspace !== undefined ? { navigator: uiWorkspace } : {} ) }),\n component: makeDoorAction(door),\n }))\n slots.inject('conversation.chat.assistant-actions', () => rows.map(({ door, run, component }) => slots.register({\n name: 'conversation.chat.assistant-actions',\n id: door.id,\n order: door.order,\n inject: (sessionId: string) => ({ run: () => run(sessionId) }),\n }, component)))\n slots.inject('conversation.input.dock', () => slots.register({\n name: 'conversation.input.dock',\n id: 'chapters-prompt',\n // Under every other dock entry and directly above the composer card: todo 0, goal 10, queue 20, and the\n // host sorts ascending by priority then order (measured in dsh-client-ui-slots).\n order: 30,\n inject: (sessionId: string) => ({\n // The bar is a mouth for the command plane, and the ONE wire body in `doors.ts` carries it: a plugin has\n // no declarable RPC namespace, so this pull transport is why the bar is push-shaped and pull-fed.\n exec: (line: string) => runCommandText(remote, sessionId, line),\n }),\n }, PromptDock))\n}\n"],"mappings":";;;;;;;;;EAoDA,SAAgB,gBAAgB,UAA4B,YAA4B;GACtF,OAAO;IAAE,QAAQ;IAAO,MAAM;IAAM,SAAS;IAAM,OAAO;IAAM,MAAM;IAAI,QAAQ;IAAe,WAAW;IAAQ,MAAM;IAAM;IAAS,UAAU;IAAO,SAAS;IAAO,eAAe;GAAK;EAChM;EAEA,SAAgB,iBAAiB,OAAuB,IAAoC;GAC1F,IAAI,GAAG,MAAM,QAAQ,OAAO;IAAE,GAAG;IAAO,MAAM,GAAG;GAAK;GACtD,MAAM,OAAO,eAAe,OAAO,EAAE;GAIrC,OAAO,GAAG,MAAM,aAAa,KAAK,YAAY,MAAM,WAAW,KAAK,SAAS,MAAM,QAAQ;IAAE,GAAG;IAAM,MAAM;GAAG,IAAI;EACrH;EAEA,SAAS,eAAe,OAAuB,IAAoC;GACjF,QAAQ,GAAG,GAAX;IACE,KAAK;KACH,IAAI,GAAG,WAAW,OAAO,OAAO;MAAE,GAAG;MAAO,QAAQ;MAAO,MAAM;MAAM,SAAS;MAAM,OAAO;MAAM,UAAU;MAAO,SAAS;KAAW;KAExI,IAAI,GAAG,WAAW,aAAa,OAAO;MAAE,GAAG;MAAO,QAAQ;MAAa,MAAM;MAAM,OAAO;KAAK;KAC/F,OAAO;MACL,GAAG;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B"}
1
+ {"version":3,"file":"client.js","names":["h","CSS","h","useReducer","useRef","useState","useCallback","useState","useRef","useCallback","h"],"sources":["../src/client/tooltip.ts","../src/client/prompt-bar.ts","../src/client/prompt-dock.ts","../src/client/doors.ts","../src/client/index.ts"],"sourcesContent":["/**\n * The host's Tooltip seat, resolved OPTIONALLY (#194-compat — measured on 0.2.1-rc.5, not guessed):\n *\n * `@deepseek-ai/dsh-client-ui-primitives` exists in the 0.2.0-rc.2 host tree and is ABSENT from the\n * entire 0.2.1-rc.5 install tree — no successor package exports `Tooltip`. Our bundle's static\n * import becomes a LAZY require in the built CJS: the bundle loads and components run, but the\n * first render that touches `Tooltip` throws, and React's error boundary swallows the subtree\n * silently. Measured symptoms on 0.2.1: door registration fully healthy (inject returned a\n * disposer; the factory ran; both register effects are functions) yet the assistant-actions region\n * renders ZERO entries, and the dock renders no row — because both wrap their buttons in Tooltip.\n *\n * The fix keeps one resolution point and one fallback (#59 — never per-component try/catch):\n * probe the module once; when it is absent, buttons carry the platform's own `title` tooltip, so\n * hover text survives on every host and the fancy tooltip survives where it exists.\n */\nimport { createElement as h, type ComponentType, type ReactElement } from 'react'\n\ndeclare const require: ((id: string) => Record<string, unknown>) | undefined\n\nexport type TooltipLike = ComponentType<{ label: string; side?: string; portal?: boolean; delayMs?: number; children: ReactElement<Record<string, unknown>> }>\n\n/**\n * The tooltip recipe, field for field the goal bar's own (GoalBar.tsx:101-142: `portal`,\n * `side=\"bottom\"`, `delayMs={500}`) — the shipped occupant of the same dock strip, whose tooltips\n * are NOT covered by the composer. `portal` is the load-bearing one: it renders the popup at\n * document level instead of inside our dock's stacking context, which is exactly the maintainer's\n * report (#210: \"the hoverover tooltips are covered by the main chat input container\"). Our old\n * compile-time types rejected portal/delayMs at the overload; the runtime host always accepted\n * them, and since the seat is typed by us, the recipe is pinned by a row instead of by luck.\n */\nexport function tooltipPropsFor(label: string): { label: string; side: 'bottom'; portal: true; delayMs: 500 } {\n return { label, side: 'bottom', portal: true, delayMs: 500 }\n}\n\nlet resolved: TooltipLike | null | undefined // undefined = not probed yet\n\nexport function resolveTooltip(): TooltipLike | null {\n if (resolved !== undefined) return resolved\n resolved = null\n try {\n if (typeof require === 'function') {\n const mod = require('@deepseek-ai/dsh-client-ui-primitives') as { Tooltip?: unknown } | undefined\n const T = mod?.Tooltip\n if (typeof T === 'function' || typeof T === 'object') resolved = T as TooltipLike\n }\n } catch {\n resolved = null // absent host: the native-title fallback stands\n }\n return resolved\n}\n\n/** Wrap in the host Tooltip when it exists; otherwise return the child (which must carry `title`). */\nexport function withTooltip(label: string, child: ReactElement<Record<string, unknown>>): ReactElement {\n const T = resolveTooltip()\n return T !== null ? h(T, { ...tooltipPropsFor(label), children: child }) : child\n}\n\n/** The native-tooltip attribute, present ONLY when the host seat is absent — no double tooltips. */\nexport function nativeTitle(label: string): { title: string } | Record<string, never> {\n return resolveTooltip() === null ? { title: label } : {}\n}\n","/**\n * The Suggested Next Step bar — every decision the row makes, kept out of React (#113).\n *\n * Deliberately shaped like the goal bar, because that implementation is tested, already fits, and gets the\n * split right: the **durable** facts (`status`, `text`, `turnSeq` — the server's one-generation-per-turn\n * identity) versus the **process-local** intent (`autorun`, `expanded` — the goal's `activation` in\n * everything but name). Nothing transient is persisted, and nothing persisted is guessed here.\n *\n * The failures the maintainer rejected are all decision bugs, not rendering bugs: firing while a turn is\n * running, shouting a refusal that should have been silence, an autorun that outlives the purpose that\n * justified it. Each has a row in `tests/unit/prompt-bar.test.ts`.\n */\n\nexport type PromptBarStatus = 'off' | 'idle' | 'analyzing' | 'ready' | 'failed'\nexport type PromptBarAutorun = 'armed' | 'disarmed'\n/** Mirrors the host's `GoalPhase` vocabulary (`dsh-goal` types) so goal composition needs no translation. */\nexport type GoalPhaseView = 'none' | 'active' | 'paused' | 'blocked' | 'complete'\n\nexport interface PromptBarState {\n status: PromptBarStatus\n /** The offer, verbatim. Never truncated — an over-cap answer is refused upstream. */\n text: string | null\n /** #113: what kind of step the server classified this as. `goal-edit` is held for the human's keystroke,\n * because goal edits require a direct human turn in the host and an autorun message is not one. */\n intent: 'worker-step' | 'goal-edit'\n /** The `turn/end` seq this offer belongs to; its identity, not a timestamp. */\n turnSeq: number | null\n /** Set only with `status: 'failed'`; rendered as `role=\"alert\"` (#61: delivered, not swallowed). */\n error: string | null\n /** Why an action did not happen, on the bar's face (#113). Empty when there is nothing to explain. */\n note: string\n autorun: PromptBarAutorun\n expanded: boolean\n running: boolean\n goalPhase: GoalPhaseView\n /** The offer a human dismissed or interrupted. A NEW `turnSeq` clears it; this one stays hidden. */\n hiddenTurnSeq: number | null\n /** Live goal facts, when the caller can read them (the goal driver owns the next turn when active+armed). */\n goal: { phase: string; activation: string; revision: number } | null\n}\n\nexport type PromptBarEvent =\n | { t: 'polled', status: PromptBarStatus, text?: string | null, turnSeq?: number | null, error?: string | null, intent?: 'worker-step' | 'goal-edit' }\n | { t: 'expand' } | { t: 'collapse' }\n /** Why an action did not happen, on the bar's own face (#113). Cleared when a new offer lands. */\n | { t: 'note'; note: string }\n | { t: 'autorun', on: boolean }\n | { t: 'human/prompt' }\n | { t: 'off' }\n | { t: 'goal', phase: GoalPhaseView }\n | { t: 'running', running: boolean }\n\nexport function initialBarState(autorun: PromptBarAutorun = 'disarmed'): PromptBarState {\n return { status: 'off', text: null, turnSeq: null, error: null, note: '', intent: 'worker-step', goalPhase: 'none', goal: null, autorun, expanded: false, running: false, hiddenTurnSeq: null }\n}\n\nexport function promptBarReducer(state: PromptBarState, ev: PromptBarEvent): PromptBarState {\n if (ev.t === 'note') return { ...state, note: ev.note }\n const next = baseBarReducer(state, ev)\n // A note is about the gesture that just failed, so a NEW offer retires it. A poll that repeats the same\n // offer (the bar re-reads every few seconds) does not — otherwise the explanation would blink out before\n // the human could read it.\n return ev.t === 'polled' && (next.turnSeq !== state.turnSeq || next.text !== state.text) ? { ...next, note: '' } : next\n}\n\nfunction baseBarReducer(state: PromptBarState, ev: PromptBarEvent): PromptBarState {\n switch (ev.t) {\n case 'polled': {\n if (ev.status === 'off') return { ...state, status: 'off', text: null, turnSeq: null, error: null, expanded: false, autorun: 'disarmed' }\n // A fresh generation invalidates the previous offer: acting on a stale one is how a bar lies.\n if (ev.status === 'analyzing') return { ...state, status: 'analyzing', text: null, error: null }\n return {\n ...state,\n status: ev.status,\n text: ev.status === 'ready' ? (ev.text ?? null) : null,\n intent: ev.status === 'ready' ? (ev.intent ?? 'worker-step') : 'worker-step',\n turnSeq: ev.turnSeq ?? state.turnSeq,\n error: ev.status === 'failed' ? (ev.error ?? 'the suggestion call failed') : null,\n }\n }\n case 'expand': return { ...state, expanded: true }\n // Collapsing is a reading action. It keeps the offer — only a human prompt or `Off` dismisses it.\n case 'collapse': return { ...state, expanded: false }\n case 'autorun': return { ...state, autorun: ev.on ? 'armed' : 'disarmed' }\n case 'running': return { ...state, running: ev.running }\n case 'human/prompt':\n // The human took the wheel: yield the loop, and drop the offer that was on screen. Generation itself\n // continues on the NEXT turn boundary — suspension is not disable.\n return { ...state, autorun: 'disarmed', hiddenTurnSeq: state.turnSeq, expanded: false }\n case 'off': return { ...state, status: 'off', text: null, turnSeq: null, error: null, expanded: false, autorun: 'disarmed' }\n case 'goal':\n // Per spec: autorun runs ALONGSIDE an active goal and disarms itself when the goal completes — the\n // suggestion loop exists to serve the session's purpose, and stops when that purpose stops.\n // #188: blocked joins complete — both planes stop together when the goal reaches a terminal\n // phase; a loop still firing offers at a blocked goal is the autorun that outlived its purpose.\n return { ...state, goalPhase: ev.phase, autorun: ev.phase === 'complete' || ev.phase === 'blocked' ? 'disarmed' : state.autorun }\n }\n // Exhaustive fallback: a new event without a case must return the state unchanged rather than\n // compile into `undefined` and blank the bar.\n return state\n}\n\n/** The status label. `failed` keeps the ready label so the error span is the delta, not a mystery row. */\nexport function barLabel(s: PromptBarState): string | null {\n if (s.status === 'analyzing') return 'Analyzing situation…'\n if (s.status === 'ready' || s.status === 'failed') return 'Recommended Next Step'\n return null\n}\n\n/**\n * #193: the pull cadence, as a decision instead of an interval constant. Every pull is two recorded\n * host lifecycle events (`command/run` + `command/done`) the UI renders as history nodes — cadence\n * IS the litter, so it belongs in this module with a row for every arm. Active = the state can\n * plausibly change on a short clock (generation in flight, an armed loop to fire, a turn running\n * that will end into an offer). Quiet = stable; one pull a minute is plenty for a state that only\n * changes at turn boundaries. Hidden-and-quiet = pull NOTHING (a background tab should write zero\n * history); hidden-and-active still pulls, because walking away from a running loop is the point of\n * autorun and pausing it silently would be the loop dying with nobody told.\n */\nexport const ACTIVE_POLL_MS = 10_000\nexport const QUIET_POLL_MS = 60_000\n\nexport function pollSpacingFor(s: { status: PromptBarStatus; autorun: PromptBarAutorun; running: boolean; hidden: boolean; edges: boolean }): number | null {\n // #203: where the host publishes the running signal, the idle EDGE is the schedule — a turn ending\n // pulls, the bar's own actions pull, and a stable disarmed bar keeps NO clock at all, because a\n // timer there could only re-read truth into rendered history nodes. Analyzing stays on the fast\n // belt (a generation completing fires no edge), and an armed loop keeps it too (a missed edge must\n // not stall autorun). Hosts that publish no running prop get the #193 cadence, unchanged.\n if (s.edges) {\n if (s.status === 'analyzing' || s.autorun === 'armed') return ACTIVE_POLL_MS\n return null\n }\n const active = s.status === 'analyzing' || s.autorun === 'armed' || s.running\n if (!active && s.hidden) return null\n return active ? ACTIVE_POLL_MS : QUIET_POLL_MS\n}\n\n/**\n * #203: whether a freshly mounted bar pulls, or renders its cache and stays silent. The maintainer's\n * rule: generate or read AFTER THE TURN ENDS, never when you activate a session. So a mount pulls\n * only when the cache cannot be trusted — absent (first mount after a page load), stale (a turn\n * could have ended since; this guarded pull is what keeps Run honest, because clicking a stale\n * offer would submit the row's newer text while showing the old), mid-generation, or armed. A\n * cached `off` never pulls: off is a human/config switch, and only an explicit `on` revisits it.\n */\nexport function mountPullDecision(c: { hasCache: boolean; ageMs: number; status: PromptBarStatus; autorun: PromptBarAutorun }): boolean {\n if (!c.hasCache) return true\n // #208, the maintainer's rule — NOT RELEVANT, NOT VISIBLE: `off` is terminal for the page\n // lifetime. The #203 staleness-revival arm cost one visible history node per reactivation of a\n // known-off session, for a feature that is not on; revival is a page reload, and the commands\n // that re-enable (`model`, `on`) say so in their replies.\n if (c.status === 'off') return false\n if (c.autorun === 'armed' || c.status === 'analyzing') return true\n return c.ageMs > QUIET_POLL_MS\n}\n\n/**\n * #203: fold a cached wire event back into row state through the SAME reducer the live path uses —\n * one fold, no second implementation to drift (the #59 rule).\n */\nexport function stateFromCache(ev: PromptBarEvent, autorun: PromptBarAutorun | null): PromptBarState {\n const folded = promptBarReducer(initialBarState(), ev)\n return autorun === null ? folded : promptBarReducer(folded, { t: 'autorun', on: autorun === 'armed' })\n}\n\nexport function barVisible(s: PromptBarState): boolean {\n // Only `off` hides the row. `idle` is enabled-and-waiting, and showing it is the difference between\n // \"the feature is live, nothing to say yet\" and silence that reads as disabled (#113).\n if (s.status === 'off') return false\n if (s.status === 'ready' && (s.text === null || s.text === '')) return false\n // The goal bar's `clearedGoalId` guard, in our terms: don't flicker back the offer just dismissed.\n if (s.hiddenTurnSeq !== null && s.hiddenTurnSeq === s.turnSeq) return false\n return true\n}\n\n/** May the bar submit its own offer? Armed, present, idle, not dismissed, and still serving a purpose. */\nexport function shouldAutoFire(s: PromptBarState): boolean {\n if (s.status !== 'ready') return false\n if (s.text === null || s.text === '') return false\n // #113: two host-imposed stops before anything else. A goal re-cut needs a human turn (dsh-tool-goal's\n // requireDirectHuman), and an armed goal driver already intends to start this turn — firing here would be\n // two turn-starters at one boundary, racing the driver's own reservation fence.\n if (s.intent === 'goal-edit') return false\n if (s.goal !== null && s.goal.phase === 'active' && s.goal.activation === 'armed') return false\n if (s.autorun !== 'armed') return false\n if (s.running) return false\n if (s.goalPhase === 'complete' || s.goalPhase === 'blocked') return false\n if (s.hiddenTurnSeq !== null && s.hiddenTurnSeq === s.turnSeq) return false\n return true\n}\n\n/** The command the bar pulls. One string, so the client and the command plane cannot drift silently. */\nexport const BAR_STATE_COMMAND = '/chapters-prompt state'\n/** The bar's Run button: the server submits the on-screen offer as the human's own turn. */\nexport const BAR_RUN_COMMAND = '/chapters-prompt run'\n\n/**\n * Parse the `state` verb's `k: v` lines into a pull event.\n *\n * One output serving the human and the component is the design (see `docs/contract.md`); this function is\n * the cost of that choice, and it is kept honest: an unrecognised line is IGNORED, not guessed at, and a\n * payload that yields no `status` is `null` so the caller keeps its last state rather than inventing `off`\n * (which would hide a bar that is merely mid-reply). Indentation and the prompt's own lines are the reason\n * the prompt is collected separately from the scalar fields — it is the only multi-line value.\n */\nexport function parseBarState(text: string): PromptBarEvent | null {\n const lines = text.split('\\n')\n const head = lines[0] ?? ''\n const statusWord = head.startsWith('suggested next step:') ? head.slice('suggested next step:'.length).trim() : ''\n const status = statusWord === 'off' ? 'off'\n : statusWord === 'idle' ? 'idle'\n : statusWord === 'analyzing' ? 'analyzing'\n : statusWord === 'ready' ? 'ready'\n : statusWord === 'failed' ? 'failed'\n : null\n if (status === null) return null\n const scalars: Record<string, string> = {}\n const prompt: string[] = []\n let inPrompt = false\n for (const line of lines.slice(1)) {\n if (inPrompt) { prompt.push(line.replace(/^ {4}/, '')); continue }\n const m = /^ {2}([a-z]+): ?(.*)$/.exec(line)\n if (m === null) continue\n const key = m[1]!, value = m[2]!.trim()\n if (key === 'prompt') { inPrompt = true; continue }\n scalars[key] !== undefined ? (scalars[key] += ` ${value}`) : (scalars[key] = value)\n }\n const turnRaw = scalars['turn'] ?? ''\n const turnSeq = /^\\d+$/.test(turnRaw) ? Number(turnRaw) : null\n const errorRaw = scalars['error'] ?? ''\n const intentWord = (scalars['intent'] ?? '').split(' ')[0] ?? ''\n return {\n t: 'polled',\n intent: intentWord === 'goal-edit' ? 'goal-edit' : 'worker-step',\n status,\n ...(status === 'ready' ? { text: prompt.join('\\n'), turnSeq } : {}),\n ...(status === 'failed' ? { error: errorRaw, turnSeq } : {}),\n }\n}\n\n/** The autorun flag, read from the same payload — the row is durable, the flag is not. */\nexport function parseBarAutorun(text: string): 'armed' | 'disarmed' | null {\n const m = /^ {2}autorun: (armed|disarmed)\\b/m.exec(text)\n return m === null ? null : (m[1] as 'armed' | 'disarmed')\n}\n\n/**\n * Does the host say this session is busy right now?\n *\n * The dock's props are HOOKS (`useSessionStatus`, `useChat`, `useInput`, …) — documented in\n * docs/contract.md § \"What a dock component is handed\" — so a component that waits for a scalar\n * `props.running` waits forever, which is precisely why Autorun declared itself unavailable while the host\n * was publishing the signal one field away. Shapes differ across hosts and versions, so every form is folded\n * here, in one pure function, with `undefined` (unknown) kept distinct from `false` (idle): the loop refuses\n * to start a turn on an unknown, and that distinction is the whole safety property.\n */\nexport function deriveRunning(status: unknown): boolean | undefined {\n if (status === undefined || status === null) return undefined\n if (typeof status === 'boolean') return status\n if (typeof status === 'string') {\n if (/^(running|streaming|busy|active)$/i.test(status)) return true\n if (/^(idle|done|stopped|finished|ready|waiting)$/i.test(status)) return false\n return undefined\n }\n if (typeof status === 'object') {\n const s = status as { status?: unknown, state?: unknown, running?: unknown, phase?: unknown }\n if (s.running !== undefined) return typeof s.running === 'boolean' ? s.running : undefined\n return deriveRunning(s.status ?? s.state ?? s.phase)\n }\n return undefined\n}\n\n\n/**\n * #208: the plane-wide relevance fact, read from the `state` block's own model line. `model: unset`\n * means the feature does not exist on this plane — one discovery reply carrying it silences EVERY\n * dock on the page (the pull transport cannot do better than one discovery; the push transport\n * (#194) removes even that). An unrecognised block is false, never a guess.\n */\nexport function parseModelAbsent(text: string): boolean {\n return /^\\s*model:\\s*unset\\b/m.test(text)\n}\n\n/**\n * #211 — the edge kick's delay, measured on the maintainer's host the hard way: some hosts publish\n * `running` at STEP granularity (it flickers at every tool call and thinking block), and an\n * immediate kick per falling edge was a rendered `chapters-prompt` node per tool call — all waste,\n * because the server row changes ONLY at turn boundaries. So: a falling edge schedules its pull\n * after the debounce, a rising edge cancels it (step flicker coalesces to zero pulls), and the rate\n * floor bounds even a host that holds `running` low through long tool calls. A real turn end — a\n * falling edge with no rising edge after it — pulls exactly once.\n */\nexport const EDGE_DEBOUNCE_MS = 2_000\nexport const EDGE_FLOOR_MS = 15_000\n\nexport function edgeKickDelayMs(msSinceLastPull: number): number {\n return Math.max(EDGE_DEBOUNCE_MS, EDGE_FLOOR_MS - msSinceLastPull)\n}\n","/**\n * The Suggested Next Step dock row (#113) — thin by design.\n *\n * Every decision lives in `prompt-bar.ts` where a row can pin it; this file only moves pixels and bytes\n * between the host slot and that reducer. That split is the reason it exists: the ghost was rejected for\n * behaviour that had no home, and \"one turn, one offer\" cannot be tested in a component.\n *\n * Placement is measured, not styled: `conversation.input.dock` is the host's full-width stack rendered\n * ABOVE the composer card (todo `order: 0`, goal `10`, queue `20`), so `order: 30` puts this row under every\n * other dock entry and directly above the input — and because it is a docked row rather than an overlay, it\n * can neither cover the placeholder nor collide with the send buttons. The ghost's ugliest defect was\n * structural, and the structure fixes it.\n *\n * The bar is PUSH-SHAPED, PULL-FED. A registrant can own a reactive observable (`hooks: { x }` → prop\n * `useX`) — that is how the goal bar gets its `activation` — but a plugin cannot publish a projection, and\n * the only plugin-reachable call path is `remote.commands.execute`. So the component pulls the `state` verb\n * on edges it can actually observe. Stated here because the alternative is a reader assuming a subscription\n * that does not exist.\n *\n * @module dsh-chapters/src/client/prompt-dock\n */\n\nimport { createElement as h, useCallback, useEffect, useReducer, useRef, useState, type ReactElement } from 'react'\nimport { withTooltip, nativeTitle } from './tooltip.ts'\nimport {\n BAR_RUN_COMMAND,\n deriveRunning,\n BAR_STATE_COMMAND,\n pollSpacingFor, mountPullDecision, stateFromCache, parseModelAbsent, edgeKickDelayMs, type PromptBarStatus,\n barLabel,\n barVisible,\n initialBarState,\n parseBarAutorun,\n parseBarState,\n promptBarReducer,\n shouldAutoFire,\n type PromptBarEvent,\n type PromptBarState,\n} from './prompt-bar.ts'\n\n/** The dock's owner + standard-kit props we read. Everything is optional-typed on purpose: this is a host\n * shape crossing a plugin boundary, and an absent field must degrade visibly, not throw at boot (#58). */\nexport interface DockProps {\n sessionId?: string\n inputActions?: { insertText?: (text: string) => void; setDraft?: (text: string) => void; submit?: () => void }\n /** The host's session-status hook, when this build hands docks one (`useSessionStatus` is in the dock's\n * documented prop list). Folded through `deriveRunning` because its shape is not ours to assume. */\n useSessionStatus?: (selector?: unknown) => unknown\n /** The session snapshot hook; its snapshot carries `running`, which is Autorun's idle edge. */\n useSession?: (selector?: unknown) => unknown\n /** The host publishes running/idle through the composer kit on some builds; if it is absent, autorun\n * refuses to fire rather than guessing that the session is idle. Fail-safe, not fail-open. */\n running?: boolean\n /** Run a host command line for THIS session and return its text. One verb for every call the bar makes\n * (the `state` pull and the `off` write), because the bar is a mouth for the command plane — a second\n * private channel would be a second contract to keep in step, which is what `doors.ts` already avoids. */\n exec?: (line: string) => Promise<string>\n}\n\nconst CSS = [\n // Metrics copied from the goal bar's measured module so the two rows read as one family: a 36px card,\n // host elevation + radius tokens, and the host's own composer width vars so it tracks the card above it.\n '.dsh-chapters_promptDock{box-sizing:border-box;width:calc(100% - 2 * var(--dsh-composer-side-clearance) - 4 * var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));margin:0 auto}',\n '.dsh-chapters_promptBar{isolation:isolate;box-sizing:border-box;width:100%;border-radius:var(--dsw-radius-md);height:36px;box-shadow:var(--dsw-elevation-panel);border:0;align-items:center;gap:10px;padding:4px 5px 4px 12px;display:flex;position:relative}',\n '.dsh-chapters_promptBar::before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:\"\";pointer-events:none;position:absolute;inset:0}',\n '.dsh-chapters_promptExpanded::before{align-items:flex-start;position:absolute;inset:0}',\n '.dsh-chapters_promptGlyph{color:var(--dsw-alias-label-tertiary);flex:none;display:inline-flex}',\n '.dsh-chapters_promptLabel{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}',\n '.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}',\n '.dsh-chapters_promptEllipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}',\n '.dsh-chapters_promptFull{white-space:pre-wrap;overflow:auto;max-height:9rem;display:block}',\n '.dsh-chapters_promptError{color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:20px;flex:none;max-width:34%}', '.dsh-chapters_promptNote{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:20px;min-width:0}',\n '.dsh-chapters_promptIntent{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px}',\n\n '.dsh-chapters_promptActions{flex:none;align-items:center;gap:10px;display:flex}',\n '.dsh-chapters_promptBtn{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex;font-size:13px}',\n '.dsh-chapters_promptBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}',\n '.dsh-chapters_promptBtn:disabled{opacity:.4;cursor:default}',\n].join('\\n')\nconst CSS_ID = 'dsh-chapters/prompt-dock.css'\n\nconst ensureCss = (): void => {\n if (typeof document === 'undefined') return\n if (document.getElementById(CSS_ID) !== null) return\n const style = document.createElement('style')\n style.id = CSS_ID\n style.setAttribute('data-plugin-css', CSS_ID)\n style.textContent = CSS\n document.head.appendChild(style)\n}\n\n/** The analysis glyph, drawn to the goal icon's metric (16 viewBox, stroke currentColor, width 1).\n * A prism-and-arrow: the feature reads the situation and points at the next move. */\nconst Glyph = (): ReactElement => h(\n 'svg', { viewBox: '0 0 16 16', width: 14, height: 14, fill: 'none', 'aria-hidden': 'true', 'stroke-width': '1' },\n h('path', { d: 'M2.5 3.5h11L8 9.5 2.5 3.5Z', stroke: 'currentColor' }),\n h('path', { d: 'M8 9.5V14', stroke: 'currentColor' }),\n h('path', { d: 'M6 12l2 2 2-2', stroke: 'currentColor' }),\n)\n\n/** One action button, labelled through the host tooltip exactly as the goal bar labels its own. */\nconst Action = (props: { label: string; glyph: string; onClick: () => void; disabled?: boolean; title?: string }): ReactElement => {\n const button = h('button', {\n type: 'button', className: 'dsh-chapters_promptBtn', 'aria-label': props.label,\n ...(props.disabled === true ? { disabled: true } : {}),\n ...(props.title !== undefined ? { title: props.title } : nativeTitle(props.label)),\n onClick: props.onClick,\n }, props.glyph)\n // Props matched to the call `doors.ts` already makes successfully: the host Tooltip takes\n // { label, side, children } and nothing else that I have verified. Inventing extra props (portal, delayMs)\n // failed the overload on the first compile, which is the right way to learn it.\n return withTooltip(props.label, button as ReactElement<Record<string, unknown>>)\n}\n\n/** Run is allowed whenever there is an offer; AUTORUN is what the intent and the goal gate. Keeping the\n * human's own button enabled is deliberate — the point of the protocol is to route a goal edit to a keystroke,\n * never to disable the human's ability to send it. */\n/**\n * The words the collapsed row shows, per state. `idle` and `analyzing` must say something, because an empty\n * row is indistinguishable from a broken one — the whole reason this feature took a day to read: the bar was\n * live, enabled, and rendering nothing but whitespace.\n */\nfunction lineFor(state: PromptBarState): string {\n if (state.status === 'ready') return state.text ?? ''\n if (state.status === 'analyzing') return 'Analyzing the session…'\n if (state.status === 'failed') return state.error !== null && state.error !== '' ? `Cannot recommend: ${state.error}` : 'Cannot recommend a next step right now'\n return 'No suggestion yet — I will recommend one after your next turn'\n}\n\nconst canRunHere = (state: PromptBarState): boolean => state.text !== null && state.text !== ''\n\n/** How long a state pull may take before we call it failed. Generous on purpose: this is a local RPC that\n * answers in milliseconds when the session is attachable, and the failure it guards against is a hang. */\nconst PULL_TIMEOUT_MS = 15_000\n\n/**\n * #203: the last known truth per session, outliving the component. SPA navigation remounts the\n * dock, and every pull is a rendered `command/run`+`command/done` history pair — so a remount\n * that re-pulled wrote a node per activation, the waste the maintainer named (\"every time I\n * navigate away and come back\"). The cache makes activation free: mount folds it through the SAME\n * reducer (stateFromCache), and only an untrustworthy cache pulls (mountPullDecision). A page\n * reload clears it and pays exactly one honest pull.\n */\ninterface CacheEntry { ev: import('./prompt-bar.ts').PromptBarEvent; autorun: 'armed' | 'disarmed' | null; at: number }\nconst stateCache = new Map<string, CacheEntry>()\n\n/**\n * #208: set by the first reply reporting the plane-wide `model: unset` — the feature does not\n * exist here, so NO dock on this page pulls again for anything: not mounts, not idle edges, not\n * timers, not visibility. One discovery per page load is the pull transport's floor; a page reload\n * is the only revival, and the enabling commands say so.\n */\nlet featureAbsent = false\n\n/** Retry ceiling for the FIRST pull only, in attempts and spacing. A mount-time race must not be able to\n * starve the bar forever, and a real `off` answer stops the loop on the first reply either way. */\n\nfunction execWithTimeout(exec: (line: string) => Promise<string>, line: string, ms: number): Promise<string> {\n return new Promise<string>((resolve, reject) => {\n const timer = setTimeout(() => { reject(new Error(`no answer within ${String(ms)}ms`)) }, ms)\n exec(line).then(\n (text) => { clearTimeout(timer); resolve(text) },\n (error: unknown) => { clearTimeout(timer); reject(error instanceof Error ? error : new Error(String(error))) },\n )\n })\n}\n\nexport function PromptDock(props: DockProps): ReactElement | null {\n const { sessionId, inputActions, exec } = props\n const [state, dispatch] = useReducer(promptBarReducer, initialBarState(), (s) => {\n // #203: activation renders from the module cache — zero invocations — folded through the live\n // reducer path, so there is no second fold implementation to drift.\n const c = sessionId !== undefined ? stateCache.get(sessionId) : undefined\n const base = c !== undefined ? stateFromCache(c.ev, c.autorun) : s\n return { ...base, running: props.running ?? true }\n })\n // #79's discipline, kept because the failure it prevents was real: one pull per mount, then per edge.\n // A fetch in an effect with no such guard re-fires on every render.\n const pulling = useRef(false)\n // TWO different facts, two different refs — conflating them is the bug I just shipped: `pulled` is the\n // once-per-mount pull guard, `alive` is \"may this component still call dispatch/setState\". Initializing the\n // pull guard to true made every mount skip its first pull, so the bar sat at its `off` default and rendered\n // nothing at all — a regression that looked, from outside, like the feature having stopped working.\n const probed = useRef(false)\n const pulled = useRef(false)\n const alive = useRef(true)\n useEffect(() => () => { alive.current = false }, [])\n const [busy, setBusy] = useState(false)\n void 0\n // #193: the mount effect's reschedule handle, so the idle edge and the visibility edge can pull NOW\n // instead of waiting out a possibly-quiet cadence. Undefined while the poll is not mounted.\n const kick = useRef<(() => void) | undefined>(undefined)\n // #211: when the last pull STARTED (a failed pull is still a rendered node — the floor counts it),\n // and the pending debounced edge pull, which a rising edge cancels.\n const lastPullAt = useRef<number | null>(null)\n const edgeTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)\n const answered = useRef(false)\n const replyStatus = useRef<string>('unknown')\n const stateRef = useRef<PromptBarState>(initialBarState())\n stateRef.current = state\n // #203: does THIS host publish the running signal? Where it does, the idle edge is the schedule\n // and a stable bar keeps no clock; where it does not, the #193 cadence is the fallback.\n const edgesRef = useRef<boolean>(props.running !== undefined)\n edgesRef.current = props.running !== undefined\n if (!probed.current) {\n probed.current = true\n // One print, on the first mount: which composer verbs does THIS host actually hand a dock? The click-to-draft\n // requirement needs one, `setDraft` is accepted but never reaches the editor, and guessing at the surface\n // again would be a third wrong theory in a row.\n console.info(`[client:prompt] inputActions keys: ${Object.keys(inputActions ?? {}).join(',') || 'NONE'}`)\n }\n\n const refresh = useCallback(async (): Promise<void> => {\n if (exec === undefined || pulling.current) return\n pulling.current = true\n lastPullAt.current = Date.now()\n try {\n // Bounded, and loudly so. Tonight's whole diagnosis cost was paid because this await had no ceiling:\n // a wire that never answers produced no dispatch, no catch and no `finally`, which looked identical to\n // \"the feature is switched off\". A hung command is now a named failure with a number on it (#61).\n const text = await execWithTimeout(exec, BAR_STATE_COMMAND, PULL_TIMEOUT_MS)\n // Handed to the leg through the page, because the state block is the contract and I need to see the\n // bytes the browser parsed, not the bytes the server meant. Overwritten each pull; read on failure.\n try { (window as unknown as { __dshPromptReply?: string }).__dshPromptReply = text } catch { /* test seam only */ }\n const ev = parseBarState(text) as PromptBarEvent | null\n if (ev !== null) { answered.current = true; replyStatus.current = (ev as { status?: string }).status ?? replyStatus.current; dispatch(ev) }\n const autorun = parseBarAutorun(text)\n if (autorun !== null) dispatch({ t: 'autorun', on: autorun === 'armed' })\n // #208: a reply naming the model unset silences the whole page — relevance is plane-wide.\n if (parseModelAbsent(text)) featureAbsent = true\n // #203: every honest reply feeds the cache the next activation renders from.\n if (ev !== null && sessionId !== undefined) {\n stateCache.set(sessionId, { ev, autorun: autorun === 'armed' || autorun === 'disarmed' ? autorun : null, at: Date.now() })\n }\n } catch (error) {\n // #61: a detected failure is a DELIVERED failure. Keeping the last known state is right; saying\n // nothing was not — with a bare `catch {}` a wire that never answers is indistinguishable from a\n // feature that is switched off, and that is exactly how this bar looked \"unverifiable\" in a browser\n // while the real fault was one line of swallowed output.\n // A failed pull is not a state: the bar keeps what it last knew rather than rendering `off`,\n // which would read as \"suggestions are disabled\" when the wire merely hiccoughed.\n console.warn(`[client:prompt] pull failed: ${String((error as Error)?.message ?? error).slice(0, 180)}`)\n } finally { pulling.current = false }\n }, [exec])\n\n useEffect(() => {\n ensureCss()\n if (pulled.current) return\n pulled.current = true\n // Retry until SOMETHING answers. `answered` flips on any parseable reply, including an honest `off`, so\n // this loop cannot make a disabled session look enabled — it only closes the window where a pull fired\n // before the session could take a command and the bar then stayed blank for the rest of the session.\n // Keep reading while the feature is live, at a cadence that is a DECISION (#193): every pull is two\n // recorded host lifecycle events (`command/run` + `command/done`) the UI renders as history nodes, so\n // the old unconditional 10s poll wrote ~360 visible nodes an hour into every bar-enabled session —\n // the maintainer's \"littered with chapters-prompt runs, one right after another\". `pollSpacingFor`\n // paces it: fast while state can change (analyzing / armed / running), slow while stable, and NOTHING\n // in a hidden tab unless the loop is armed. On hosts that publish no running prop, `running` stays\n // conservatively true and the cadence stays active — the old behavior, unchanged. `off` still ends it.\n let timer: ReturnType<typeof setTimeout> | undefined\n // #203: one vocabulary for \"what the bar knows right now\" — a reply beats the cache-folded row\n // state, and every schedule decision reads THIS instead of keeping a fourth copy of the truth.\n const effectiveStatus = (): PromptBarStatus =>\n (replyStatus.current === 'unknown' ? stateRef.current.status : replyStatus.current) as PromptBarStatus\n const spacingNow = (): number | null => pollSpacingFor({\n status: effectiveStatus(),\n autorun: stateRef.current.autorun,\n running: stateRef.current.running,\n hidden: typeof document !== 'undefined' && document.hidden === true,\n edges: edgesRef.current,\n })\n const duePull = (): boolean => {\n const c = sessionId !== undefined ? stateCache.get(sessionId) : undefined\n return mountPullDecision({\n hasCache: c !== undefined,\n ageMs: c !== undefined ? Date.now() - c.at : Number.MAX_SAFE_INTEGER,\n status: effectiveStatus(),\n autorun: stateRef.current.autorun,\n })\n }\n const tick = async (opts?: { mount?: boolean; force?: boolean }): Promise<void> => {\n // #208: not relevant, not visible — an unset-model plane spends nothing, ever.\n if (featureAbsent) return\n if (effectiveStatus() === 'off') {\n // A known `off` spends no clock and no edge — but a STALE cached off is untrustworthy:\n // `/chapters-prompt on` could have happened anywhere. The staleness guard on a mount is the\n // only revival path short of a page reload, and that matches the old within-mount rule.\n if (!(opts?.mount === true && duePull())) return\n }\n const spacing = spacingNow()\n // force = an edge the schedule sanctions (a turn ended): pull even where the steady cadence\n // says no timer is needed. mount = the guarded first look; a fresh cache renders for free.\n if (opts?.force === true || (spacing !== null && !(opts?.mount === true && !duePull()))) await refresh()\n if (replyStatus.current === 'off') return\n // The reply, not the React state: the row is hidden while `off`, and a hidden row renders\n // nothing, so stateRef can lag. The schedule reads the wire truth whenever it exists.\n const next = spacingNow()\n if (next !== null) timer = setTimeout(() => { void tick() }, next)\n }\n // The idle edge IS the schedule (#203): a turn ending is the moment an offer is born, so it\n // pulls with force. The tab-foreground edge pulls ONLY when the cache can no longer be\n // trusted — flicking back to a tab you left a moment ago must not write a history node.\n kick.current = () => {\n if (timer !== undefined) clearTimeout(timer)\n void tick({ force: true })\n }\n const onVisible = (): void => {\n if (typeof document !== 'undefined' && !document.hidden && duePull()) kick.current?.()\n }\n if (typeof document !== 'undefined') document.addEventListener('visibilitychange', onVisible)\n void tick({ mount: true })\n return () => {\n if (timer !== undefined) clearTimeout(timer)\n if (edgeTimer.current !== undefined) { clearTimeout(edgeTimer.current); edgeTimer.current = undefined }\n kick.current = undefined\n if (typeof document !== 'undefined') document.removeEventListener('visibilitychange', onVisible)\n }\n }, [refresh])\n\n // Autorun fires off the IDLE edge, never off a render. `running` comes from the host when it publishes it;\n // absent means unknown, and unknown means do not start a turn the human cannot see coming.\n const prevRunning = useRef<boolean>(props.running ?? true)\n useEffect(() => {\n const next = props.running ?? true\n const prev = prevRunning.current\n prevRunning.current = next\n dispatch({ t: 'running', running: next })\n // #211 supersedes the #193 immediate kick, measured on the maintainer's live host: it publishes\n // `running` at STEP granularity — every tool call and thinking block flickers it — and an\n // immediate pull per falling edge was a rendered command node per tool call, all of it waste\n // (the server row changes only at TURN boundaries). So a falling edge SCHEDULES its pull after\n // edgeKickDelayMs (debounce, rate-floored against the last pull) and a rising edge CANCELS it:\n // step flicker coalesces to zero pulls, and a real turn end — a fall with no rise after it —\n // pulls exactly once, ~2s later. Hosts that publish no running prop never produce transitions\n // and keep their cadence unchanged.\n if (prev && !next) {\n if (edgeTimer.current !== undefined) clearTimeout(edgeTimer.current)\n const since = lastPullAt.current === null ? Number.MAX_SAFE_INTEGER : Date.now() - lastPullAt.current\n edgeTimer.current = setTimeout(() => { edgeTimer.current = undefined; kick.current?.() }, edgeKickDelayMs(since))\n } else if (!prev && next) {\n if (edgeTimer.current !== undefined) { clearTimeout(edgeTimer.current); edgeTimer.current = undefined }\n }\n }, [props.running])\n\n // Run is a COMMAND, not a keystroke. The composer-write path (`inputActions.setDraft` + `submit`) looked\n // like the obvious implementation and does not work on this host build: `setDraft` is accepted, and the\n // editor stays empty — measured, twice, after I had convinced myself it was the test's locator or a focus\n // ordering problem. The plugin already has a dependable wire to its own server plane, and the server has\n // exactly one human-authored submission path (the follow-up autorun uses), so Run rides that. The\n // consequence is also the point: what the human clicks and what the loop arms are the same code.\n const run = useCallback((): void => {\n if (state.text === null || state.text === '' || exec === undefined) return\n setBusy(true)\n void exec(BAR_RUN_COMMAND)\n .then((out) => {\n if (!alive.current) return\n if (/^cannot run:/i.test(out.trim())) dispatch({ t: 'polled', status: 'failed', text: state.text, error: out.trim().slice(0, 200), turnSeq: state.turnSeq } as PromptBarEvent)\n else dispatch({ t: 'collapse' })\n })\n .catch((error: unknown) => { console.warn(`[client:prompt] run failed: ${String((error as Error)?.message ?? error).slice(0, 160)}`) })\n .finally(() => { if (alive.current) setBusy(false) })\n }, [exec, state.text, state.turnSeq])\n\n useEffect(() => {\n if (!shouldAutoFire(state)) return\n run()\n }, [state, run])\n\n // Autorun's idle edge stays UNWIRED on this host, and that is now a measured fact rather than a guess:\n // `useSessionStatus` is in the dock's documented prop list, but calling it here threw twice — first a React\n // hook-order abort (#310, because it sat below the early return), then `TypeError: l is not a function` once\n // hoisted. Two blind attempts is the limit; the contract says which hooks exist, not their arity or context.\n // So the gate keeps its original, correct behavior: with no signal, `running` is undefined, Autorun is\n // visibly unavailable and says why, and `deriveRunning` (9 rows) stands ready for whichever shape the host\n // does publish. A loop that starts turns the human cannot foresee is the one failure mode not on offer.\n // `useSessionStatus` is `SnapshotSelectorHook<SessionStatusSnapshot>` — a SELECTOR hook (declared in\n // dsh-client-ui-session's client types), which is why calling it with a session id threw\n // `TypeError: l is not a function`: the host used my string as the selector. An identity selector takes\n // whatever the snapshot's shape happens to be, and `deriveRunning` folds it, so this code does not bet on\n // field names I have not read. Still hoisted above the early return: hook count must not change per render.\n // The idle signal IS published — on `useSession`, whose snapshot carries `running` (measured by printing the\n // hook surfaces once: `useSession=sessionId|pendingSubmissions|running|subagent|removed|openState`). My\n // first two attempts were wrong in different ways: a scalar `props.running` that no host supplies, then\n // `useSessionStatus`, which is provided but yields no readable keys under an identity selector. `deriveRunning`\n // folds `{running}`, so this is the last mile, and the hook is called unconditionally through a stable\n // fallback because hook order must not change between renders.\n const useSessionHook = props.useSession ?? (() => undefined)\n const sessionSnapshot = useSessionHook((snapshot: unknown) => snapshot)\n const running = props.running ?? deriveRunning(sessionSnapshot)\n const autorunDisabled = running === undefined\n\n if (sessionId === undefined || !barVisible(state as PromptBarState)) return null\n\n const populate = (): void => {\n // Collapsed: reading. Expanded: the maintainer's click-to-edit gesture — setDraft REPLACES the draft,\n // which is what they asked for (\"the prompt replaces the chat input contents so you can edit it\"), and\n // nothing is submitted. Run is a separate, deliberate button.\n // Printed on every branch, because \"the button did nothing\" and \"the button took the other path\" looked\n // identical from outside for three runs.\n console.info(`[client:prompt] populate expanded=${String(state.expanded)} hasInsertText=${String(typeof inputActions?.insertText)} hasSetDraft=${String(typeof inputActions?.setDraft)} textLen=${String(state.text?.length ?? -1)}`)\n if (!state.expanded) { dispatch({ t: 'expand' }); return }\n if (state.text === null || state.text === '') return\n // Delivered, not assumed. The click-to-draft gesture is the interaction the maintainer asked for, so a\n // silent no-op here is indistinguishable from \"the feature does not work\" — and that ambiguity cost the\n // rest of this leg's diagnosis. Absent verb, absent text: both say so.\n // The host's composer kit is `{ captureInsertion, insertText, setDraft, addAttachments, removeAttachment,\n // pruneAttachments, submit }` (measured on 0.2.0-rc.2). `setDraft` writes the STORE, and the store is\n // mirrored into the editor only at mount while the editor is empty — which is why a click that \"worked\"\n // (no refusal, no throw) left the box visibly empty. `insertText` is the verb that reaches the editor, so\n // click-to-draft uses it and keeps `setDraft` only as a fallback for builds that lack it.\n if (typeof inputActions?.insertText === 'function') {\n // `insertText` inserts AT THE CARET, and clicking this button moves the caret out of the editor — so the\n // call ran and put the words nowhere. Focusing the composer first is the whole difference, and it is done\n // with a tolerant query rather than a class name: the host's own module hashes (`wSkVaW_…`) are not mine\n // to depend on, and a bar that silently stops drafting after a host restyle is worse than one that tries.\n try {\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n box?.focus()\n } catch { /* a host without the editor mounted: the insert below still records the intent */ }\n // Measured on host 0.2.0-rc.2: called from a dock this throws\n // `Cannot read properties of undefined (reading 'draftRev')`, and the kit's other verb (`setDraft`) writes\n // a store the editor mirrors only at mount. Neither reaches the composer. A silent no-op is what cost the\n // last six runs, so the refusal now appears on the bar and points at Run, which does work.\n const refuse = (why: string): void => {\n console.warn(`[client:prompt] click-to-draft refused: ${why}`)\n dispatch({ t: 'note', note: 'This host does not let a plugin write the composer, so the prompt cannot be edited before sending — Run submits it as your turn' })\n }\n try {\n inputActions.insertText(state.text)\n // Throwing is the easy case. The harder one is the verb that returns successfully and changes nothing,\n // which is what `setDraft` does on 0.2.0-rc.2 and what a silent button looks like forever. Verify the\n // editor actually holds the words; if it does not, say so on the bar.\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n const head = state.text.slice(0, 24)\n if ((box?.innerText ?? '').indexOf(head) === -1) {\n // One animation frame: the host may write the DOM after its own microtask.\n setTimeout(() => {\n const b2 = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n if ((b2?.innerText ?? '').indexOf(head) === -1) refuse('insertText reported success and left the editor empty')\n }, 400)\n }\n } catch (error) {\n refuse(String((error as Error)?.message ?? error).slice(0, 160))\n }\n // Read the editor back from inside the component, so \"insertText is a no-op on this host\" is a fact with\n // a number next to it rather than a conclusion the test reaches after the fact.\n setTimeout(() => {\n try {\n const box = document.querySelector<HTMLElement>('[contenteditable=\"true\"][role=\"textbox\"]')\n console.info(`[client:prompt] after insertText: editorText=${String(box?.innerText?.length ?? 'NO-BOX')} focused=${String(document.activeElement === box)}`)\n } catch { /* diagnostics never break the gesture */ }\n }, 250)\n return\n }\n if (typeof inputActions?.setDraft === 'function') {\n inputActions.setDraft(state.text)\n return\n }\n console.warn('[client:prompt] click-to-draft refused: this host exposes neither insertText nor setDraft')\n }\n\n // Called unconditionally through a stable fallback, so the hook order cannot change between renders.\n return h('div', { className: 'dsh-chapters_promptDock', 'data-prompt-bar': 'true' },\n h('div', { className: `dsh-chapters_promptBar${state.expanded ? ' dsh-chapters_promptExpanded' : ''}` },\n h('span', { className: 'dsh-chapters_promptGlyph' }, h(Glyph)),\n h('span', { className: 'dsh-chapters_promptLabel' }, barLabel(state as PromptBarState) ?? ''),\n // A goal re-cut is held for the human's keystroke: the host reserves goal edits for a turn containing a\n // direct human message, and an autorun message is not one. The bar says so on its face rather than\n // letting Run appear to be a normal button that silently fails in the tool.\n ...(state.intent === 'goal-edit' ? [h('span', { key: 'intent', className: 'dsh-chapters_promptIntent', 'aria-label': 'This step edits the goal' }, 'edits the goal · run it yourself')] : []),\n h('button', {\n type: 'button', className: 'dsh-chapters_promptText',\n 'aria-label': state.expanded ? 'Put this suggested prompt in the input box' : 'Show the full suggested prompt',\n onClick: populate,\n }, state.expanded\n ? h('span', { className: 'dsh-chapters_promptFull' }, state.text ?? '')\n : h('span', { className: 'dsh-chapters_promptEllipsis' }, lineFor(state))),\n ...(state.note === '' ? [] : [h('span', { key: 'note', className: 'dsh-chapters_promptNote', role: 'status' }, state.note)]),\n ...(state.error === '' ? [] : [h('span', { key: 'err', className: 'dsh-chapters_promptError', role: 'alert' }, state.error)]),\n h('div', { className: 'dsh-chapters_promptActions' },\n h(Action, {\n label: 'Run the suggested next step', glyph: '▶', onClick: run, disabled: busy,\n ...(state.text === null || state.text === '' || !canRunHere(state) ? { disabled: true } : {}),\n ...(state.intent === 'goal-edit'\n ? { title: 'Goal edits need a human turn. Run still works; autorun will never do this one.' }\n : {}),\n }),\n h(Action, {\n label: state.autorun === 'armed' ? 'Autorun off' : 'Autorun',\n glyph: state.autorun === 'armed' ? '⟳' : '⟲',\n disabled: autorunDisabled,\n ...(autorunDisabled\n ? { title: 'Autorun needs the host to publish an idle signal; this build does not, so nothing would fire safely.' }\n : {}),\n // A SERVER write, like `off` below. Flipping local state alone was the defect: `refresh()` re-reads the\n // loop state (`:193`), the server still says `disarmed`, and the label snaps back — so the user watched\n // their own click be refused and the loop could never be started from the bar. The command surface is\n // `/chapters-prompt autorun on|off` (src/commands.ts:462-478), which also reports the goal displacement.\n onClick: () => {\n void (async () => {\n const arm = state.autorun !== 'armed'\n if (exec !== undefined) await exec(`/chapters-prompt autorun ${arm ? 'on' : 'off'}`)\n dispatch({ t: 'autorun', on: arm })\n await refresh()\n })()\n },\n }),\n h(Action, {\n label: 'Turn prompt suggestions off for this session', glyph: '✕',\n // `off` is a server write, not a local hide: generation stops, the configured model is KEPT so\n // back-on is one action, and the bar disappears instead of lingering with a stale offer.\n onClick: () => { void (async () => { if (exec !== undefined) await exec('/chapters-prompt off'); dispatch({ t: 'off' }); if (sessionId !== undefined) stateCache.set(sessionId, { ev: { t: 'polled', status: 'off' }, autorun: null, at: Date.now() }) })() },\n }),\n ),\n ),\n )\n}\n","/**\n * The client door runner: the two deterministic archive doors, executed over\n * `remote.commands` and followed by a SWITCH to the fresh child.\n *\n * ONE runner, two rows. The server side keeps the same discipline — both doors\n * come from `deterministicCommand(door)` in src/tools.ts, and a unit row pins\n * that they archive identically. Copy-pasting this body is how the two would\n * drift apart, so there is exactly one implementation and a table of rows.\n *\n * `chapters-continue` ships only as a composer command; without a button here\n * the child is created correctly and the UI shows nothing, which reads as\n * \"nothing happened\". The row is the missing affordance, not new logic.\n *\n * React-free on purpose: the primitives package pulls CSS modules the node\n * test runner cannot load, so the testable half lives here and index.ts is the\n * thin chrome that renders these rows as buttons (tests/unit/client-doors.test.ts).\n *\n * @module dsh-chapters/src/client/doors\n */\n\n/** Structural slice of the aggregated remote service (@deepseek-ai/dsh-api-remotes).\n * `remote.commands` must ALSO appear in inject — the federation gates each\n * sub-service individually (the live feedback package declares\n * remote.messageFeedback beside remote for exactly this reason). */\nexport interface ClientRemote {\n commands?: {\n execute(sessionId: string, line: string, attachments: readonly unknown[]): Promise<{\n ok?: boolean\n value?: { commandId?: string; result?: { kind?: string; text?: string } }\n error?: { code?: string; message?: string }\n }>\n }\n}\n\n/** The client sessions service (dsh-client-runtime): open() lives on the\n * prototype; everything else on the surface stays untrusted and unused. */\nexport interface ClientSessions {\n open(sessionId: string): unknown\n}\n\nexport interface DoorResult {\n ok: boolean\n message: string\n}\n\n/**\n * One assistant-action row. `noun` is the server's own word for the child in\n * its success text (`branch` / `continuation`), so the fallback wording and the\n * title regex both track the door without a second implementation.\n */\nexport interface DoorAction {\n /** The slot registration id. */\n id: string\n /** Position in the assistant action row. */\n order: number\n /** Button + tooltip label, and the accessible name the e2e specs select on. */\n label: string\n /** The host command this row executes — the ONLY semantic difference at runtime. */\n command: string\n /** The noun in `${noun} “title” is session ch-…`. */\n noun: string\n /** The row's glyph (16×16 viewBox, single path). */\n iconPath: string\n}\n\nexport const DOOR_ACTIONS: readonly DoorAction[] = [\n {\n id: 'chapters-fork',\n order: 30,\n label: 'Fork with chapters',\n command: '/chapters-fork',\n noun: 'branch',\n iconPath: 'M5 3.25a2.25 2.25 0 1 0-1.5 2.12v5.26a2.25 2.25 0 1 0 1.5 0V9h5a2.25 2.25 0 0 0 2.25-2.25v-1.4a2.25 2.25 0 1 0-1.5 0v1.4A.75.75 0 0 1 10 7.5H5V5.37A2.25 2.25 0 0 0 5 3.25Z',\n },\n {\n id: 'chapters-continue',\n order: 31,\n label: 'Continue with chapters',\n command: '/chapters-continue',\n noun: 'continuation',\n iconPath: 'M1 8a.75.75 0 0 1 0-1.5h9.44L7.72 3.28a.75.75 0 1 1 1.06-1.06l3.5 3.5.53.53-.53.53-3.5 3.5a.75.75 0 1 1-1.06-1.06L10.44 9.5H1Zm13-5.25v10.5a.75.75 0 0 1-1.5 0v-10.5a.75.75 0 0 1 1.5 0Z',\n },\n]\n\n/** Pull the child id out of either door's durable success text — both end in\n * `… is session ch-…` (src/tools.ts), so this regex is door-agnostic. */\n/**\n * Which build of THIS file produced a door note (#77). When the live probe reported a roster\n * trace of `missing → missing → missing` — meaning adoption should have fired three times — while\n * showing no adoption outcome at all, the first question stopped being \"why did the client refuse\"\n * and became \"did the browser run the code I am reading?\". A note that names its own build makes\n * that a glance instead of an archaeology session into symlinked plugin trees.\n */\nexport const DOOR_BUILD = '2026-10-22T23:55 door-build-stamp'\n\nexport const CHILD_ID = /is session (ch-[\\w-]+)/\n\n/** The quoted title the door gave the child, matched by its OWN noun so a\n * refusal or an unrelated quote cannot pass for it. */\nexport const doorTitle = (noun: string): RegExp => new RegExp(`${noun} \\\\u201C([^\\\\u201D]+)\\\\u201D is session`)\n\n/**\n * A refusal reason that can never render as nothing. `String(err.message ?? err)` is `''` for a\n * host error built with an empty message, and an empty reason disappears from the note — the\n * reader then concludes \"no refusal happened\", which is the opposite of the truth (#77).\n */\nfunction refusalReason(error: unknown): string {\n const raw = error instanceof Error ? error.message : String(error)\n const trimmed = raw.trim()\n const named = trimmed === '' ? (error instanceof Error && error.name.trim() !== '' ? error.name : '') : trimmed\n const base = named === '' ? (error === null ? 'null thrown' : typeof error) : named\n return base.replace(/\\s+/g, ' ').slice(0, 90)\n}\n\n/**\n * Is the child in the client's OWN roster? This is the question that separates two very\n * different failures, and the door used to report the symptom without it:\n * - the client never learned the session exists (roster: missing) → the fix is server-side\n * publication, and no amount of clicking `open` will ever work;\n * - the client knows it and `open` still did nothing (roster: contains) → a navigation bug.\n * Measured host 0.2.0-rc.2: the sessions service exposes `projectList`, `refresh`, `retain`,\n * `handleSessionAdded` — the roster is a projection the client fills from control frames.\n */\n/**\n * The client's own session ids, or `null` when the store cannot be read. ONE reader for both\n * the note and the adoption decision, so the door never acts on a verdict it did not report.\n */\nfunction rosterIds(sessions: ClientSessions | undefined): Set<string> | null {\n const store = (sessions as unknown as { list?: { getSnapshot?: () => unknown } })?.list\n if (typeof store?.getSnapshot !== 'function') return null\n const snap = store.getSnapshot()\n const ids = new Set<string>()\n if (Array.isArray((snap as { ids?: unknown[] } | undefined)?.ids)) {\n for (const id of (snap as { ids: unknown[] }).ids) ids.add(String(id))\n } else if ((snap as { byId?: object } | undefined)?.byId !== undefined) {\n for (const k of Object.keys((snap as { byId: object }).byId)) ids.add(k)\n } else return null\n return ids\n}\n\nfunction rosterNote(sessions: ClientSessions | undefined, child: string): string {\n try {\n // The host's client store shape is `list.getSnapshot() → { ids, byId, phase }`.\n // `projectList()` turned out to be a MUTATOR that returns undefined (measured), so the first\n // version of this note printed \"0 sessions\" about a conversation that visibly had one — the\n // repo's own `listEvents` lesson (\"measure the SHAPE, not the presence\"), repeated by me in\n // the same week. Read the store; when it isn't reachable, presence is UNKNOWN and the note\n // says that rather than inventing an absence.\n const ids = rosterIds(sessions)\n if (ids === null) {\n const store = (sessions as unknown as { list?: { getSnapshot?: () => unknown } })?.list\n const shape = typeof store?.getSnapshot !== 'function' ? 'no list store on the service' : 'snapshot unreadable'\n return ` (roster: ${shape} — presence of ${child.slice(0, 11)}… is UNKNOWN, not absent)`\n }\n if (ids.size === 0) return ` (roster: empty — presence of ${child.slice(0, 11)}… is UNKNOWN, not absent)`\n const n = ids.size\n return ids.has(child)\n ? ` (roster: contains ${child.slice(0, 11)}…, ${String(n)} sessions — open() is the failure)`\n : ` (roster: MISSING, ${String(n)} sessions — the client never catalogued this session)`\n } catch { return '' }\n}\n\n/** The service's own method names, as a hint attached to a failure note (never a guess). */\nfunction verbsNote(sessions: ClientSessions | undefined): string {\n try {\n const svc = sessions as unknown as Record<string, unknown> | undefined\n if (svc === null || svc === undefined || typeof svc !== 'object') return ' (sessions service: absent)'\n // Measured: `Object.keys(svc)` returned NOTHING for the real service, because the host\n // puts its verbs on the PROTOTYPE (a class instance), not as own keys. A diagnostic that\n // reports \"no methods\" about a working service is worse than none — walk the chain.\n const found = new Set<string>()\n let node: unknown = svc\n // Stop at Object.prototype: its four legacy accessors are not service verbs, and listing\n // them pushed the real names past the cap on the first live run.\n for (let depth = 0; depth < 6 && node !== null && node !== undefined && node !== Object.prototype; depth++) {\n for (const key of Object.getOwnPropertyNames(node as object)) {\n if (key === 'constructor') continue\n try { if (typeof (svc as Record<string, unknown>)[key] === 'function') found.add(key) } catch { /* getter that throws — not a verb we can use either */ }\n }\n node = Object.getPrototypeOf(node)\n }\n const verbs = [...found].sort().slice(0, 24)\n return verbs.length === 0 ? ' (sessions service: no methods on the chain)' : ` (sessions verbs: ${verbs.join(', ')})`\n } catch { return ' (sessions service: unreadable)' }\n}\n\nfunction openByService(\n sessions: ClientSessions | undefined,\n sessionId: string,\n /** #77: adopt (and re-project) only when the client's own roster is missing this session.\n * `onAfter` reports the roster at the instant after adoption, before any later refresh can\n * discard the mutation — the difference between an ordering bug and a publication gap. */\n adopt?: { needed: boolean, onRefused: (reason: string) => void, onSubscribeRefused?: (reason: string) => void, onAfter: (seen: boolean | null) => void, onStep?: (step: string) => void },\n nav?: { openSession?: (id: string) => unknown },\n): Promise<boolean> {\n return (async () => {\n const svc = sessions as unknown as {\n open?: (id: string) => unknown; refresh?: () => unknown; projectList?: () => unknown\n create?: (opts: { sessionId?: string }) => unknown\n using?: (id: string, opts: { source: string }, fn: () => Promise<void>) => unknown\n } | undefined\n // #77, the actual root cause: `sessions.open` DOES NOT EXIST on this host. The sessions\n // service offers create/fork/using/retain/binding/refresh; the host's own fork button calls\n // `ctx.uiWorkspace.openSession(childId)` (`dsh-client-ui-chat/lib/client.js`). The line here\n // used to be `if (typeof svc?.open !== 'function') return false`, so every service attempt\n // since the door was written returned false on line one and the note blamed the client's\n // roster for a verb that was never there.\n if (svc === undefined) return false\n const navigate = typeof nav?.openSession === 'function'\n ? (id: string): unknown => nav.openSession!(id)\n : typeof svc?.open === 'function'\n ? (id: string): unknown => svc.open!(id)\n : null\n if (navigate === null) {\n adopt?.onStep?.('no-verb')\n return false\n }\n try { await svc.refresh?.() } catch { /* refresh best-effort */ }\n // #57: re-project the client's session catalog. The host does this ITSELF after every\n // create and fork — `dsh-api-session-controller/lib/client.js`, `create()` and `fork()`\n // both end in `this.projectList()` — because a session the client has never catalogued is\n // not addressable by `open()` no matter how often you call it. A plugin-created child is\n // exactly that case: durable, workspace-attached, absent from the client's roster. Measured\n // on 0.2.0-rc.2: without this the door created the child, `open` resolved, and the app\n // stayed on the parent (the door's own note now says `roster: …` so this is never a guess).\n try { svc.projectList?.() } catch { /* best-effort, like refresh */ }\n // #77: adopt-and-catalogue. `manager.create()` is documented \"on success merge into\n // summaries immediately (no wait for the next refresh)\" and forwards a caller-owned\n // `sessionId`, while the server ADOPTS a persisted id instead of authoring a second session\n // (`create(request)` → `ensureSession(sessionId, cwd, request.sessionId !== undefined, …)`).\n // Nothing about the child's content is authored here — the seed notice was committed\n // host-plane long before this call — this only lets the client see what the host already\n // knows. A refusal is reported to the caller, never swallowed.\n if (adopt?.needed === true && typeof svc.create === 'function') {\n // the block narrates itself: entry first, then whichever way it left. The live note once\n // said \"try\" from the runner and showed nothing downstream — with this line, an absent\n // `enter-create` IS the answer instead of a mystery.\n adopt.onStep?.('enter-create')\n try {\n await svc.create({ sessionId })\n adopt.onStep?.('settle-create')\n try { svc.projectList?.() } catch { /* re-project again, now that a mutation exists */ }\n // the momentary read is the whole point: a later `refreshList()` reassigns the manager's\n // mutations from the server result, so an adoption that DID land is invisible by the time\n // the last attempt fails. Report what was true at the instant it mattered.\n const after = rosterIds(sessions)\n adopt.onAfter?.(after === null ? null : after.has(sessionId))\n } catch (error) {\n adopt.onStep?.('refuse-create')\n adopt.onRefused(refusalReason(error))\n }\n }\n // #77, second candidate: if adoption left the child out of the roster, SUBSCRIBE to it.\n // `using(target, {source}, fn)` is the host's own way to address a session that is not\n // currently displayed (`sessions/service.js`: retain → `manager.get(id).open()`). A refusal is\n // reported exactly like adoption's. No URL route exists as an alternative — checked every\n // dsh-client-* bundle: the only `/session/` strings are resource addresses for files.\n if (adopt?.needed === true && typeof svc.using === 'function' && rosterIds(sessions)?.has(sessionId) === false) {\n adopt.onStep?.('enter-using')\n try {\n await svc.using(sessionId, { source: 'dsh-chapters-door' }, async () => undefined)\n adopt.onStep?.('settle-using')\n try { svc.projectList?.() } catch { /* best-effort, like the others */ }\n const seen = rosterIds(sessions)\n adopt.onAfter?.(seen === null ? null : seen.has(sessionId))\n } catch (error) {\n adopt.onStep?.('refuse-using')\n adopt.onSubscribeRefused?.(refusalReason(error))\n }\n }\n // The store must know the session before open() resolves it; a child\n // created seconds ago is only server-known until refresh lands. Retry\n // open briefly across that window.\n const started = Date.now()\n for (;;) {\n try { navigate(sessionId); return true } catch {\n if (Date.now() - started > 4_000) return false\n await new Promise((r) => setTimeout(r, 250))\n }\n }\n })()\n}\n\n/**\n * Fallback path: expand collapsed groups / show-more buttons, then click the\n * newest treeitem whose label contains the child title (newest-updated sorts\n * first, so the first match is the fresh child).\n */\nasync function openBranchRow(title: string, budgetMs = 4_000): Promise<boolean> {\n if (typeof document === 'undefined') return false\n const needle = title.toLowerCase()\n const tryClick = (): boolean => {\n const rows = Array.from(document.querySelectorAll<HTMLElement>('[role=\"treeitem\"]'))\n const hit = rows.find((row) => (row.textContent ?? '').toLowerCase().includes(needle))\n if (hit === undefined) return false\n hit.click()\n return true\n }\n const clickMore = (): number => {\n const buttons = Array.from(document.querySelectorAll<HTMLElement>('button'))\n .filter((b) => /more sessions|ungrouped/i.test(b.textContent ?? '') && b.getAttribute('aria-expanded') !== 'true')\n for (const b of buttons) b.click()\n return buttons.length\n }\n const started = Date.now()\n let expansions = 0\n while (Date.now() - started < budgetMs) {\n if (tryClick()) return true\n if (expansions < 4 && clickMore() > 0) { expansions += 1; await new Promise((r) => setTimeout(r, 250)); continue }\n await new Promise((resolve) => setTimeout(resolve, 150))\n }\n return tryClick()\n}\n\nexport function makeDoorRunner(\n remote: ClientRemote,\n sessions: ClientSessions | undefined,\n door: DoorAction,\n /**\n * \"Is THIS session the one the client is now showing?\" #54: `sessions.open()` returns\n * void, so a call that resolves proves the request was accepted, not that the app\n * switched. Measured on host 0.2.0-rc.2: no note element (open resolved), yet\n * `dsh.sessions.current` still named the parent and the child was absent from the\n * sidebar after a full reload — the user got silence and a missing session. Absent\n * (a client that cannot answer) the runner keeps the old behavior, and the wiring is\n * pinned by a row so production can never quietly drop it.\n */\n verifySwitched?: (childSessionId: string) => Promise<boolean>,\n /**\n * #77: how many times to re-pull the client's list, re-project and re-open. The session\n * manager documents `refreshList()` as \"single-flight within one Host generation\"\n * (`dsh-api-session-controller/lib/types/client/sessions/manager.js`), so a pull issued while\n * another is in flight can resolve from the STALE result — precisely the moment a session\n * created microseconds ago is missing. Retrying is both the fix candidate and the measurement:\n * which attempt lands tells us whether this is ordering (ours) or silence (host-side).\n * A client with no `refresh` verb gets exactly ONE attempt — re-asking `open` against a roster\n * we cannot re-pull would be theater.\n */\n opts?: { attempts?: number, attemptPauseMs?: number, navigator?: { openSession?: (id: string) => unknown } },\n): (sessionId: string) => Promise<DoorResult> {\n return async function run(sessionId: string): Promise<DoorResult> {\n try {\n if (remote.commands?.execute === undefined) return { ok: false, message: 'commands remote unavailable' }\n const res = await remote.commands.execute(sessionId, door.command, [])\n if (res.ok !== true) return { ok: false, message: (res.error?.message ?? `the ${door.noun} call failed`).slice(0, 90) }\n const result = res.value?.result\n const text = typeof result?.text === 'string' ? result.text : ''\n if (result?.kind !== 'success') return { ok: false, message: (text || `the ${door.noun} was refused — see the command result`).slice(0, 90) }\n const child = CHILD_ID.exec(text)?.[1]\n if (child === undefined) return { ok: true, message: `${door.noun} created — appearing in the sidebar` }\n const switchedOnce = async (): Promise<boolean> => {\n if (verifySwitched === undefined) return true\n try { return await verifySwitched(child) } catch { return false }\n }\n const canRepull = typeof (sessions as unknown as { refresh?: unknown } | undefined)?.refresh === 'function'\n const maxAttempts = canRepull ? (opts?.attempts ?? 3) : 1\n let tried = 0\n let adoptRefusal = ''\n let subscribeRefusal = ''\n // #77: what the roster reader answered AT EACH DECISION, not only at the end. The live\n // probe reported MISSING after three attempts while neither candidate fired, which can\n // only mean the reader disagreed with itself over time — and a note that says one number\n // cannot show that.\n const rosterTrace: string[] = []\n const steps: string[] = []\n let adoptSaw: boolean | null | undefined\n for (let i = 0; i < maxAttempts; i++) {\n tried += 1\n // decide adoption from the SAME reader the note reports, so the door never acts on a\n // verdict it did not tell the user about; an unreadable roster is not \"missing\"\n const ids = rosterIds(sessions)\n // Loaded-but-empty is a DECISION (the child is not there → try the sanctioned paths);\n // unreadable is UNKNOWN and must not invent a session (#77: the strict form here meant\n // neither candidate ever ran in the live probe, and its silence looked like a result).\n const needed = ids !== null && !ids.has(child)\n // `+c` / `+u` = the candidate verbs are present on the injected service AT THAT MOMENT.\n // Without this, a note that says the roster was missing while no adoption outcome appears\n // is uninterpretable: either the code never ran, or the service has no create to call.\n const svcShape = sessions as unknown as { create?: unknown, using?: unknown, open?: unknown } | undefined\n // +c create, +u using, +o sessions.open, +w workspace navigator — the exact predicates\n // the door branches on, so a note can be read instead of re-derived from source\n rosterTrace.push(`${ids === null ? 'unknown' : ids.size === 0 ? 'empty' : ids.has(child) ? 'has' : 'missing'}${typeof svcShape?.create === 'function' ? '+c' : '-c'}${typeof svcShape?.using === 'function' ? '+u' : '-u'}${typeof svcShape?.open === 'function' ? '+o' : '-o'}${typeof opts?.navigator?.openSession === 'function' ? '+w' : '-w'}`)\n if (await openByService(sessions, child, {\n needed,\n onRefused: (reason) => { adoptRefusal = reason },\n onSubscribeRefused: (reason) => { subscribeRefusal = reason },\n onAfter: (seen) => { adoptSaw = seen },\n onStep: (step) => { if (!steps.includes(step)) steps.push(step) },\n }, opts?.navigator) && await switchedOnce()) return { ok: true, message: '' }\n if (i + 1 < maxAttempts) await new Promise((r) => { setTimeout(r, opts?.attemptPauseMs ?? 300).unref?.() })\n }\n // the service path did not take — the sidebar row is the same affordance a human uses\n const title = doorTitle(door.noun).exec(text)?.[1]\n if (title !== undefined && await openBranchRow(title) && await switchedOnce()) return { ok: true, message: '' }\n // #54: a child that is created but not shown is a DIFFERENT fact from one the user\n // has to open by hand, and the message must not blur them.\n // #56/#57: the note must be ACTIONABLE. \"the app did not switch\" is true and useless;\n // naming the verbs the injected service actually exposes turns one failure into the\n // diagnosis (is there a refresh/reload to call, or is `open` the only verb and the\n // omission server-side?). A detected failure that isn't delivered is the same bug.\n return verifySwitched === undefined\n ? { ok: true, message: `${door.noun} created — open it in the sidebar` }\n : { ok: true, message: `${door.noun} created — the app did not switch after ${String(tried)} attempt${tried === 1 ? '' : 's'}; open it from the sidebar [roster per attempt: ${rosterTrace.join(' → ')}] [tried: ${steps.length === 0 ? 'none' : steps.includes('no-verb') ? 'no open or openSession verb on any injected service' : steps.join(', ')}] (build: ${DOOR_BUILD})${adoptRefusal === '' ? '' : ` (adoption refused: ${adoptRefusal})`}${subscribeRefusal === '' ? '' : ` (subscribe refused: ${subscribeRefusal})`}${adoptSaw === undefined ? '' : ` (right after adopt: ${adoptSaw ? 'contains' : 'missing'} ${child.slice(0, 15)})`}${rosterNote(sessions, child)}${verbsNote(sessions)}` }\n } catch (error) {\n return { ok: false, message: String((error as Error)?.message ?? error).slice(0, 90) }\n }\n }\n}\n\n/**\n * Execute a host command line for one session and return its text, or '' when the command plane is\n * unavailable. The bar's `state` pull and `off` write ride this, because it is the ONE place the client\n * talks to the wire: the guard row \"there is no second runner body in the client chrome\" exists to keep\n * `index.ts` as registration chrome, and a duplicated `commands.execute` in two files is how a wire\n * behaviour drifts from its own test (#59's one-predicate rule, applied to the transport).\n */\nexport async function runCommandText(remote: ClientRemote | undefined, sessionId: string, line: string): Promise<string> {\n const exec = remote?.commands?.execute\n if (exec === undefined) return ''\n const res = await exec(sessionId, line, [])\n if (res.ok !== true) return ''\n return res.value?.result?.text ?? ''\n}\n","/**\n * dsh-chapters client entry: the per-message door buttons.\n *\n * Registers the two deterministic archive doors into the assistant action row\n * (`conversation.chat.assistant-actions` — the slot the official feedback\n * package populates beside copy/branch). Clicking one executes its host\n * command — `/chapters-fork`, `/chapters-continue` — through `remote.commands`,\n * the exact wire the composer's input line rides, then SWITCHES the app to the\n * fresh child:\n *\n * 1. `sessions.open(child)` — the client sessions service carries open() on\n * its prototype (Playwright-verified against this host; a keys-dump alone\n * hid it, which is why an earlier round wrongly gave up on this path);\n * 2. fallback: click the child's sidebar row after expanding collapsed\n * groups (plugin children can render under collapsed 'Ungrouped' heads);\n * 3. last resort: an inline note — the child is durable either way.\n *\n * There is deliberately NO second implementation of door logic here: the\n * buttons are mouths for the host commands (watermark, segmentation, budget,\n * titles, refusal-with-numbers all server-side, all tested), and the runner\n * they share is `src/client/doors.ts` — one body, one row per door. The purity\n * gate in tsdown.client.config.ts keeps this file cross-plugin-free.\n *\n * @module dsh-chapters/src/client\n */\n\nimport { createElement as h, useCallback, useEffect, useRef, useState, type ReactElement } from 'react'\n// The host's own tooltip bubble — a platform module served by the loader table,\n// external like react. Every action in this row labels through it.\nimport { withTooltip, nativeTitle } from './tooltip.ts'\nimport { PromptDock } from './prompt-dock.ts'\nimport { DOOR_ACTIONS, makeDoorRunner, runCommandText, type ClientRemote, type ClientSessions, type DoorAction, type DoorResult } from './doors.ts'\n\ninterface ClientSlots {\n inject(name: string, factory: () => unknown): void\n register(registration: Record<string, unknown>, component: unknown): unknown\n}\n\ninterface Ctx {\n slots: ClientSlots\n get(name: string): unknown\n}\n\n// #77: `uiWorkspace` is not optional in practice — it owns `openSession(target)`, the verb the\n// host's own fork button uses (`ctx.uiWorkspace.openSession(childId)` in dsh-client-ui-chat).\n// `sessions` has no `open` at all, so without this row the door has never had a way to switch.\nexport const inject = ['slots', 'remote', 'remote.commands', 'sessions', 'uiWorkspace'] as const\n\n/** Props composed by the slot framework: owner (`messageId`) + our injected verb. */\ninterface DoorActionProps {\n messageId: string\n run: () => Promise<DoorResult>\n}\n\n/**\n * Style parity with the native IconActions row: rules copied verbatim from the\n * host's MessageIconActions module (`._xzv4MW_action` in dsh-client-ui-chat's\n * compiled client + the feedback package's :disabled) — same metrics, tokens,\n * hover. Update this string if the host restyles its action row. Both doors\n * share these metrics.\n *\n * The final rule hides the native branch action IN THE MESSAGE ROW only\n * (user-approved cosmetic decision, docs/architecture.md): built-in chrome, so\n * the selector is its accessible label scoped to action-row buttons; both\n * locale spellings covered. If the host rewords the label the button simply\n * reappears — fails open, visibly.\n */\nconst CSS = [\n '.dsh-chapters_forkAction{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}',\n '.dsh-chapters_forkAction svg{width:calc(15px + var(--dsh-content-font-delta,0px));height:calc(15px + var(--dsh-content-font-delta,0px))}',\n '.dsh-chapters_forkAction:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}',\n '.dsh-chapters_forkAction:disabled{cursor:default;opacity:.4}',\n '.dsh-chapters_forkNote{color:var(--dsw-alias-label-tertiary);padding-left:4px;font-size:13px;line-height:20px}',\n 'button[class*=\"_action\"][aria-label=\"Branch into a new conversation\"],button[class*=\"_action\"][aria-label=\"\\u5728\\u65b0\\u5bf9\\u8bdd\\u4e2d\\u5206\\u652f\"]{display:none !important}',\n].join('\\n')\nconst CSS_TAG_ID = 'dsh-chapters/assistant-action.css'\n\nfunction injectStyles(): void {\n try {\n if (typeof document === 'undefined' || document.querySelector(`style[data-plugin-css=${JSON.stringify(CSS_TAG_ID)}]`) !== null) return\n const tag = document.createElement('style')\n tag.dataset.plugin = 'dsh-chapters'\n tag.dataset.pluginCss = CSS_TAG_ID\n tag.textContent = CSS\n document.head.appendChild(tag)\n } catch { /* styling is cosmetic; the action still works without it */ }\n}\n\n/** One component body for every door row; only the label and glyph differ. */\nfunction makeDoorAction(door: DoorAction) {\n return function ChaptersDoorAction({ run }: DoorActionProps) {\n const [busy, setBusy] = useState(false)\n const [note, setNote] = useState<string | null>(null)\n const alive = useRef(true)\n useEffect(() => () => { alive.current = false }, [])\n const onClick = useCallback(() => {\n if (busy) return\n setBusy(true)\n setNote(null)\n void run().then((result) => {\n if (!alive.current) return\n setBusy(false)\n setNote(result.message === '' ? null : result.message)\n setTimeout(() => { if (alive.current) setNote(null) }, 8000)\n })\n }, [busy, run])\n const button = h('button', {\n type: 'button',\n 'aria-label': door.label,\n ...nativeTitle(door.label),\n disabled: busy,\n onClick,\n className: 'dsh-chapters_forkAction',\n },\n h('svg', { viewBox: '0 0 16 16', width: '15', height: '15', fill: 'currentColor', 'aria-hidden': 'true' },\n h('path', { d: door.iconPath })))\n return h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' } },\n withTooltip(door.label, button as ReactElement<Record<string, unknown>>),\n note !== null\n ? h('span', { className: 'dsh-chapters_forkNote' }, note)\n : null)\n }\n}\n\nexport function apply(ctx: Ctx): void {\n injectStyles()\n const slots = ctx.slots\n const remote = (ctx.get('remote') ?? {}) as ClientRemote\n let sessions: ClientSessions | undefined\n try { sessions = ctx.get('sessions') as ClientSessions | undefined } catch { sessions = undefined }\n // Defensive: a host that cannot provide the navigator must leave the door registering and\n // reporting its own limitation, not failing at boot.\n let uiWorkspace: { openSession?: (id: string) => unknown } | undefined\n try { uiWorkspace = ctx.get('uiWorkspace') as { openSession?: (id: string) => unknown } | undefined } catch { uiWorkspace = undefined }\n // No early return on missing descriptors: the buttons register regardless\n // and the click reports the gap. A missing button is worse than a button\n // that explains itself. Components and runners are built ONCE here — slot\n // factories may re-run, and a fresh component identity per call would\n // remount the row.\n // #54: the switch verifier. `dsh.sessions.current` is published by the host's own\n // dsh-client-ui-workspace (grep-confirmed, not folklore) — the same key the e2e specs\n // read to name a session exactly, which is the point: the door now checks the fact the\n // user would notice, not whether a void call threw.\n const currentSessionId = (): string | null => {\n try {\n const raw = window.localStorage.getItem('dsh.sessions.current')\n if (raw === null) return null\n const parsed = JSON.parse(raw) as { sessionId?: string } | null\n return parsed?.sessionId ?? null\n } catch { return null }\n }\n const rows = DOOR_ACTIONS.map((door) => ({\n door,\n run: makeDoorRunner(remote, sessions, door, async (child) => {\n for (let i = 0; i < 8; i++) {\n if (currentSessionId() === child) return true\n await new Promise((r) => setTimeout(r, 250))\n }\n return currentSessionId() === child\n }, { ...(uiWorkspace !== undefined ? { navigator: uiWorkspace } : {} ) }),\n component: makeDoorAction(door),\n }))\n slots.inject('conversation.chat.assistant-actions', () => rows.map(({ door, run, component }) => slots.register({\n name: 'conversation.chat.assistant-actions',\n id: door.id,\n order: door.order,\n inject: (sessionId: string) => ({ run: () => run(sessionId) }),\n }, component)))\n slots.inject('conversation.input.dock', () => slots.register({\n name: 'conversation.input.dock',\n id: 'chapters-prompt',\n // Under every other dock entry and directly above the composer card: todo 0, goal 10, queue 20, and the\n // host sorts ascending by priority then order (measured in dsh-client-ui-slots).\n order: 30,\n inject: (sessionId: string) => ({\n // The bar is a mouth for the command plane, and the ONE wire body in `doors.ts` carries it: a plugin has\n // no declarable RPC namespace, so this pull transport is why the bar is push-shaped and pull-fed.\n exec: (line: string) => runCommandText(remote, sessionId, line),\n }),\n }, PromptDock))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,SAAgB,gBAAgB,OAA8E;GAC5G,OAAO;IAAE;IAAO,MAAM;IAAU,QAAQ;IAAM,SAAS;GAAI;EAC7D;EAEA,IAAI;EAEJ,SAAgB,iBAAqC;GACnD,IAAI,aAAa,KAAA,GAAW,OAAO;GACnC,WAAW;GACX,IAAI;IACF,IAAI,OAAO,YAAY,YAAY;KAEjC,MAAM,IADM,QAAQ,uCACR,CAAC,EAAE;KACf,IAAI,OAAO,MAAM,cAAc,OAAO,MAAM,UAAU,WAAW;IACnE;GACF,QAAQ;IACN,WAAW;GACb;GACA,OAAO;EACT;;EAGA,SAAgB,YAAY,OAAe,OAA4D;GACrG,MAAM,IAAI,eAAe;GACzB,OAAO,MAAM,QAAA,GAAOA,MAAAA,cAAAA,CAAE,GAAG;IAAE,GAAG,gBAAgB,KAAK;IAAG,UAAU;GAAM,CAAC,IAAI;EAC7E;;EAGA,SAAgB,YAAY,OAA0D;GACpF,OAAO,eAAe,MAAM,OAAO,EAAE,OAAO,MAAM,IAAI,CAAC;EACzD;;ECRA,SAAgB,gBAAgB,UAA4B,YAA4B;GACtF,OAAO;IAAE,QAAQ;IAAO,MAAM;IAAM,SAAS;IAAM,OAAO;IAAM,MAAM;IAAI,QAAQ;IAAe,WAAW;IAAQ,MAAM;IAAM;IAAS,UAAU;IAAO,SAAS;IAAO,eAAe;GAAK;EAChM;EAEA,SAAgB,iBAAiB,OAAuB,IAAoC;GAC1F,IAAI,GAAG,MAAM,QAAQ,OAAO;IAAE,GAAG;IAAO,MAAM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,IAAY,EAAE,WAAW,YAAY,IAAI,CAAC,EAAI,CAAC;IACxE,WAAW,eAAe,IAAI;GAChC,EAAE;GACF,MAAM,OAAO,6CAA6C,KAAK,KAAK,EAAE,MAAM,KAAK,gBAAgB,MAAM,SAAS;IAC9G,MAAM;IACN,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,SAAS,eAAuB,EAAE,WAAW,IAAI,SAAS,EAAE;GAC9D,GAAG,SAAS,CAAC,CAAC;GACd,MAAM,OAAO,iCAAiC,MAAM,SAAS;IAC3D,MAAM;IACN,IAAI;IAGJ,OAAO;IACP,SAAS,eAAuB,EAG9B,OAAO,SAAiB,eAAe,QAAQ,WAAW,IAAI,EAChE;GACF,GAAG,UAAU,CAAC;EAChB"}
package/lib/commands.js CHANGED
@@ -399,7 +399,7 @@ export function registerHostCommands(ctx, domain, config) {
399
399
  const capsNote = maxArg !== undefined || ctxArg !== undefined
400
400
  ? ` Caps stored beside the model${maxArg !== undefined ? `: suggestion ${maxArg} chars` : ''}${ctxArg !== undefined ? `${maxArg !== undefined ? ',' : ':'} context budget ${ctxArg} chars` : ''}.`
401
401
  : " Caps derive from this model's context window (window × promptContextRatio); pass numbers to pin them.";
402
- return { kind: 'success', text: `prompt model set to ${arg} — this ENABLES the composer ghost (one bounded call per turn boundary; /chapters-prompt off disables).${capsNote}` };
402
+ return { kind: 'success', text: `prompt model set to ${arg} — this ENABLES the composer ghost (one bounded call per turn boundary; /chapters-prompt off disables).${capsNote} If the bar is hidden, it reappears at the next page reload.` };
403
403
  }
404
404
  if (verb === 'off') {
405
405
  await config.prompt.setModel('');
@@ -484,7 +484,7 @@ export function registerHostCommands(ctx, domain, config) {
484
484
  const sessId = holder.session?.id ?? holder.agent?.session?.id;
485
485
  if (sessId !== undefined)
486
486
  await config.prompt.bar.setOn(sessId);
487
- return { kind: 'success', text: `suggestions ON (${spec}) — the next completed turn offers a next step; /chapters-prompt state shows it, /chapters-prompt autorun on runs them` };
487
+ return { kind: 'success', text: `suggestions ON (${spec}) — the next completed turn offers a next step; /chapters-prompt state shows it, /chapters-prompt autorun on runs them. If the bar is hidden, it reappears at the next page reload.` };
488
488
  }
489
489
  if (verb === 'suggest') {
490
490
  const holder = invocation.agent;
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EACL,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,GAElG,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,aAAa,EAAiB,MAAM,qBAAqB,CAAA;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAoC5C,mFAAmF;AACnF,MAAM,cAAc,GAAG,CAAC,MAA0B,EAAU,EAAE,CAC5D,yBAAyB,MAAM,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,2EAA2E,EAAE,CAAA;AAG9K,MAAM,KAAK,GAAG,CAAC,KAAc,E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6,4 +6,4 @@
6
6
  * reader cannot recover later, so it belongs in the bytes. A row in tests asserts this literal equals
7
7
  * `package.json`'s version — the one place a hand-mirrored constant must never be allowed to drift.
8
8
  */
9
- export declare const PLUGIN_VERSION = "0.2.6";
9
+ export declare const PLUGIN_VERSION = "0.2.8";
package/lib/version.js CHANGED
@@ -6,5 +6,5 @@
6
6
  * reader cannot recover later, so it belongs in the bytes. A row in tests asserts this literal equals
7
7
  * `package.json`'s version — the one place a hand-mirrored constant must never be allowed to drift.
8
8
  */
9
- export const PLUGIN_VERSION = '0.2.6';
9
+ export const PLUGIN_VERSION = '0.2.8';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/dsh-chapters",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "dsh plugin: verbatim chapter archive + zero-token index for small-context models",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",