@fractalsynapse/dsh-chapters 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/backlog.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # Open items — 2026-11-17 (host 0.2.0-rc.2)
2
2
 
3
- - **0.2.34 follow-waves (2026-11-17 audit):** the composed checkpoint has never been OBSERVED on a live
3
+ - **0.2.34 SHIPPED (2026-11-17, main 2eee0b3, tag 0.2.34; tarball + provenance verified — see project-state). Follow-waves for 0.2.35 (2026-11-17 audit):** the composed checkpoint has never been OBSERVED on a live
4
4
  host — the heavy leg's first sight, tracked as `docs/verify.md` C3, in the same family as #143's
5
5
  convergence bound. The deprecated live reads (`eventAt`/`snapshotEvents`/`ownEvents` — the host says
6
6
  "new calls are prohibited") are inventoried by `tests/unit/host-composer-shape.test.ts`; the migration
7
7
  to `deriveMessages`/`requestHeader` (live) and `SessionQuery.readSession` (durable) is the first gate to
8
8
  re-run before any host bump. #397 (`meta.parentSession` for continuation children) awaits a maintainer
9
- decision on amending `docs/contract.md` § Lineage. #383 (#379) and #368 (#340) are held by maintainer
10
- direction for **0.2.35**, together with the `prompt`-leg re-record.
9
+ decision on amending `docs/contract.md` § Lineage. #383 (#379) LANDED post-0.2.34 (PR #383, replay-green at current trunk — the held
10
+ re-record turned out to belong to the old base). #368 (#340) moved to **0.2.36** by maintainer decision of
11
+ 2026-11-17 with the `prompt`-leg re-record. Correction recorded 2026-11-17 the same day: that re-record is
12
+ a STUB-path operation (#56), not an endpoint one — the block was #406's guard refusing the rig's own stub
13
+ distill, fixed by #409. DONE: PR #368 landed at 9905c4b after re-anchor + one deterministic heal
14
+ (record-time race class, follow-up gate #411). #340 closes at the 0.2.36 cut.
11
15
  - **#355 — the 2026-11-14 correctness audit: 24 issues filed for this audit (25 counting #386), 22 fixed across 24 PRs, released in 0.2.33.**
12
16
  Every finding was reproduced against real bytes before it was changed, and the shape they share is the
13
17
  release's subject: **a check that cannot fail**. Concretely: the preset-row health witness compared a
package/docs/contract.md CHANGED
@@ -1048,9 +1048,38 @@ gone.
1048
1048
  that removes the megabytes, not the milliseconds-squared, and it is a policy change to the director's
1049
1049
  input, so it is tracked separately rather than folded into a performance PR.
1050
1050
 
1051
- **Acceptance note, stated rather than quietly missed:** #350 asked for "< 50 ms at 800 chapters / 36 MB".
1052
- These changes deliver 136 ms, not 50 — and the gap is cause 3, not the search. Quoting the target as met
1053
- would make the number mean nothing.
1051
+ **Acceptance note, updated after #379 landed the cap:** #350 asked for "< 50 ms at 800 chapters / 36 MB".
1052
+ #350 alone delivered 136 ms; the same fixture measured **0.29 ms** once the chapter block was bounded
1053
+ (#379), because the remaining cost was constructing a document the cap now prevents. Both numbers are kept
1054
+ here rather than overwritten — the second only means anything against the first.
1055
+
1056
+ ### The chapter block is bounded, and the bound is not a recency ratio (#379)
1057
+
1058
+ The director's budget was `contextChars = floor(window × promptContextRatio × 4)`, so a 1M-token route
1059
+ allowed ~2,000,000 characters of auxiliary input to produce one sentence, with the newest human turn at
1060
+ roughly one character in two million — #7's third mechanism, the other two being #340 and #343.
1061
+
1062
+ `buildSuggestInput` now caps the chapter block at **both** a share of the budget
1063
+ (`DEFAULT_CHAPTERS_SHARE`, 25%) and an absolute ceiling (`DEFAULT_CHAPTERS_CAP_CHARS`, 200,000 chars
1064
+ ≈ 50K tokens). The joint constraint stays monotone in `drop`, so the #350 search still applies unchanged.
1065
+
1066
+ **Why an absolute ceiling and not a share of the document.** My first attempt bounded history *relative to
1067
+ the protected content*, which is the only frame in which "not crowded out" looks structural — and it
1068
+ measured the result: **the director's entire input collapsed to 2 KB.** The protected set is mostly fixed
1069
+ reply rules, so "25% of everything else" allowed about one chapter line: a perfect recency ratio obtained
1070
+ by deleting the context the director exists to weigh. The regression is now pinned by a row asserting the
1071
+ input still shows a real trajectory, so a future tightening that trades content for a ratio fails loudly.
1072
+
1073
+ Recency is instead protected by what genuinely protects it: the last turn enters **whole and is never
1074
+ sliced** (#188), every drop is **announced in the input**, and the block cannot exceed either bound.
1075
+
1076
+ **What is NOT done:** the share and ceiling are documented constants threaded as a parameter, not yet
1077
+ profile config keys. Surfacing them needs the #354 discipline (declare on the row, validate, print in
1078
+ `/chapters-status` which values are in force) — a knob nobody can see is how #354 drifted for months.
1079
+ Tracked on #379; the cap itself is enforced today.
1080
+
1081
+ Tape status: this changes the director's **request bytes** by design — one of the two items (with #340)
1082
+ that genuinely need the `prompt`-leg re-anchor before merging.
1054
1083
 
1055
1084
  ## Seeded-continuation load deadlock — the fold rule vs the header recorder (measured 2026-11-05, #314)
1056
1085
 
@@ -127,6 +127,29 @@ answers the question in exactly one place; two consumers use it:
127
127
  - `tests/e2e/boot.ts` **refuses replay by name** when `host` ≠ the pinned version, quoting the
128
128
  recorded `reason` and the tracking issue. `E2E_MODEL=record` is deliberately exempt — re-distilling
129
129
  is the way out, and a gate that blocked it would strand itself.
130
+ - **Model identity is proven before any mode that WRITES tape** (#406). `MODE=record` and `MODE=heal`
131
+ now assert, before boot: the upstream's `/v1/models` lists the pinned rig model id, **and** a chat
132
+ probe requested by that name comes back with the same id in the RESPONSE's `model` field. (Live mode
133
+ is deliberately outside the proof: boot never resolves an upstream for it — the host routes it — so a
134
+ guard would probe an endpoint live does not use. Live-class runs on an aliasing endpoint still observe
135
+ the wrong model; the defense there is this rig's own honesty, not a fetch.) The measured
136
+ incident: this box's vLLM silently answers `qwen3.8-flash-next` with `qwen3-4b-instruct` — sessions
137
+ ran, specs ran, and the run wrote fifteen tape entries shaped by the wrong model (raw `think` traces
138
+ as content) before two prompt-bar assertions caught it. An aliasing endpoint makes every recorded run
139
+ NOT evidence for the pinned rig model, so the refusal names what IS served instead of recording over
140
+ the corpus. `MODE=replay` never probes — CI runners have no 8080, and replay writes nothing.
141
+ The predicate lives once in `tests/support/model-parity.ts`; `E2E_UPSTREAM_MODEL` remains the
142
+ deliberate remap, honored only when that id is itself listed and proven.
143
+ - **#409: the proof is leg-kind aware.** `plans`/`prompt`/`prompt-revival` legitimately distill against
144
+ the SCRIPTED STUB (#56 policy — the prompt leg's assertion compares a constant only the stub's
145
+ `suggest` arm mints), and the stub lists `stub-plan-carriage`, not the live model name. The guard's
146
+ first cut therefore refused the rig's own stub distill. `distill-tapes.sh` now exports
147
+ `E2E_STUB_LEG=1` beside the stub `E2E_UPSTREAM` it already pins — one coupled source — and boot
148
+ honors it only against a STUB-CLASS endpoint (every listed id `stub-`-prefixed, chat witnessed
149
+ against the endpoint's own first listed id; the stub's `model` field is an echo and its own
150
+ provenance file says so). Marker without stub-class → refuse; stub-class on a live leg → refuse;
151
+ the measured alias box fails BOTH leg kinds. Demos that bind the class: alias+record refused,
152
+ replay inert, AND stub-leg+stub-endpoint ACCEPTED — the third one was missing from #407.
130
153
  - `.github/workflows/ci.yml`'s `host-capability` job sets `corpus-anchored`, the `e2e-replay` job
131
154
  requires it, and the run log gets a step summary plus a `::warning::` naming the issue. Skipped,
132
155
  visibly — the same discipline as the preset-row refusal it sits beside: never silently green,
@@ -166,7 +189,7 @@ So the question "is this turn slow, or is the connection dead?" is a lookup:
166
189
  | unit | `npm test` (`tests/unit`) | node --test, no build, no network | pure core: registry, render, archive, notice, engine-core, tools, commands |
167
190
  | integration | (today: probe rounds — see spikes/probe/README pattern) | boots real hosts in scratch homes | host wiring, realm mounts, provider economics |
168
191
  | e2e (tape — the default loop) | `npm run test:e2e:replay` | same boots with `E2E_MODEL=replay`; model turns answered from `tests/fixtures/model-tape/<project>` via the record/replay proxy (`tests/e2e/model-proxy.ts`) — seconds, deterministic |
169
- | e2e (distillation — occasional) | `npm run test:e2e:record` | `E2E_MODEL=record`: forwards every exchange to the real Local model and appends the tape. Run once per scenario; wipe `var/model-tape` first for a clean corpus; tapes are isolated per project (eight: suite/heavy/arrival/fanout/enrich/rules/fork/plans); re-record when scenarios, prompts, or thresholds change. The GPU model is the DISTILLER, never the test oracle (user directive 2026-09-19) |
192
+ | e2e (distillation — occasional) | `scripts/distill-tapes.sh [legs]` | `E2E_MODEL=record` per leg, and since #411 **every green record is followed in the same loop by a strict replay of that leg** — the tape's own acceptance. New misses earn exactly one bounded heal (the leg's own upstream) and a second replay must pass; a failing replay with no misses is a leg failure, never healed. Verdicts read `record+replay green (N entries)` and flow into generated PROVENANCE. (`npm run test:e2e:record` remains the chained variant — its first failure hides the rest, which is why the script exists.) Run once per scenario; wipe `var/model-tape` first for a clean corpus; tapes are isolated per project (eight: suite/heavy/arrival/fanout/enrich/rules/fork/plans); re-record when scenarios, prompts, or thresholds change. The GPU model is the DISTILLER, never the test oracle (user directive 2026-09-19) |
170
193
  | e2e | `npm run test:e2e` (`tests/e2e`, EIGHT projects: suite/heavy/arrival/fanout/enrich/rules/fork/plans) | Playwright + workspace-cached chromium vs a throwaway `var/e2e-home-<port>` rebuilt per boot (port-keyed so no boot can stomp another's state) (isolated from live agents — see FINDINGS 2026-09-19) | the browser: identity, fork button + switch, knowledge loop end-to-end, the oversized turn (mid-turn compactions), the subagent fan-out, arrival-time artifacting (low-floor project) |
171
194
 
172
195
  The e2e layer exists because client-plane facts were being GUESSED (services, methods, tooltips,
@@ -945,3 +945,119 @@ roll into **0.2.35** along with the `prompt`-leg re-record that gates them.
945
945
  The audit self-correction stays recorded above rather than edited away: the claim that "the e2e harness
946
946
  cannot compile so no real-host coverage exists" was wrong — the ratchet baselines 58 errors by design and
947
947
  the replay chain runs real boots regardless. Withdrawn where the findings are written.
948
+
949
+ ## 2026-11-17 — 0.2.34 SHIPPED
950
+
951
+ Released from `main` `2eee0b3` (merge of PR #405, verified head `e01282c`, tree-identical), tag **`0.2.34`**
952
+ (annotated, immutable, matching the manifest at all four version sites).
953
+
954
+ The release job's own gates (run `44051111647`, success): build → coverage-gated deterministic suite →
955
+ publish with `NPM_TOKEN` (Production) and OIDC provenance — the log carries `publish Provenance statement
956
+ published to transparency log` (sigstore logIndex 3944683270), the no-attestation fallback did not fire.
957
+ CI on the `main` push (run `44051010483`) — including the ten-leg tape-replay acceptance chain — success,
958
+ so the published content itself was replayed green.
959
+
960
+ Registry tarball check (the 0.2.20 dead-version class): `npm view @fractalsynapse/dsh-chapters@0.2.34`
961
+ resolves, `latest` points at it; unpacking the shipped tarball, `package.json` says **0.2.34** and
962
+ `lib/version.js` carries `PLUGIN_VERSION = '0.2.34'` — manifest and bundled bytes agree. The registry
963
+ attestation endpoint returns the publish bundle.
964
+
965
+ Closed at this cut: **#395, #396, #398, #399** (the 2026-11-15/16 context-handling audit fixes).
966
+
967
+ **Post-cut items heading for 0.2.35:**
968
+ - **#383 (#379 director-budget cap)** and **#368 (#340 suggestion freshness)** — the two held PRs, together
969
+ with the **`prompt`-leg re-record** that gates them (maintainer direction of 2026-11-17).
970
+ - **C3** (`docs/verify.md`) — the first live-host OBSERVATION of a composed checkpoint (heavy leg; same
971
+ family as #143's convergence bound). Deterministic + replayed evidence says the composer maps on the
972
+ real kernel class; the live sight is still owed.
973
+ - **#349** remains open past its shipped half (#391).
974
+ - **#397** awaits a maintainer decision on amending `docs/contract.md` § Lineage.
975
+ - The deprecated live reads (`eventAt`/`snapshotEvents`/`ownEvents`) — inventory pinned by
976
+ `tests/unit/host-composer-shape.test.ts` — are the first gate to re-run against any host bump;
977
+ `contract.md` is the measuring document.
978
+
979
+ ## 2026-11-17 — 0.2.35 cut prepared from staging `669d59d`; scope decided
980
+
981
+ Maintainer direction of 2026-11-17: cut 0.2.35 **early** with the two landed items — #379 (director
982
+ chapter-block cap, PR #383) and #406 (tape-writing model-identity guard, PR #407) — and move #340
983
+ (PR #368) to **0.2.36**. Recorded as a decision: #368 passes everything except its one gated item, the
984
+ `prompt`-leg re-record, which is blocked on an endpoint that truly serves the pinned rig model — the
985
+ defect #406 now refuses loudly instead of recording over it.
986
+
987
+ What the re-record attempt turned up is the release's real content: this box's endpoint was proven by
988
+ direct probe to SILENTLY ALIAS the pinned model name (requests for `qwen3.8-flash-next` answered by
989
+ `qwen3-4b-instruct`, raw `think` traces as content; fifteen tape entries contaminated and discarded,
990
+ corpus untouched). The guard, the single-source `RIG_MODEL_ID`, the field demo (refuse before boot, zero
991
+ bytes written), and the replay-inert proof (CI chain green with the guard present) all landed before
992
+ the cut.
993
+
994
+ Versions: all four sites at **0.2.35**; release-gate 6/6. Evidence at the pre-release base `669d59d`
995
+ was carried by #407's own four green CI jobs (including the ten-leg replay); this candidate re-runs
996
+ the full chain locally before its stamp commit. Named open, unchanged from 0.2.34: verify C3 (first
997
+ live observation of a composed checkpoint), #349 remainder, #397 contract decision, five credential-
998
+ gated TreeDX live rows, and #340 (its home is now 0.2.36, with this box's endpoint defect the thing to
999
+ fix or route around).
1000
+
1001
+ ## 2026-11-17 — 0.2.35 SHIPPED
1002
+
1003
+ Released from `main` `c53de2e` (merge of PR #408, verified head `33c55bf`, tree-identical), tag
1004
+ **`0.2.35`** (annotated, bare semver, matching the manifest at all four version sites).
1005
+
1006
+ Release job (run `44083889900`) success: build → coverage-gated suite → publish with Production token;
1007
+ `publish Signed provenance statement` + transparency log logIndex 3945911543 — the no-attestation
1008
+ fallback did not fire. Registry: `latest` = 0.2.35; unpacked tarball: `package.json` 0.2.35 AND
1009
+ `lib/version.js` `PLUGIN_VERSION = '0.2.35'` (the 0.2.20 stale-tree class, excluded by measurement).
1010
+ Candidate evidence: all four CI jobs green at the head, including the ten-leg replay; the full 11-leg
1011
+ chain additionally run green LOCALLY at the release head before the stamp commit; `promptAnchor`
1012
+ `b40304ee3e35a94f` unchanged across 0.2.34→0.2.35 — zero model-facing byte changes in the whole range,
1013
+ machine-checked.
1014
+
1015
+ Closed at this cut: **#379** (auto-referenced when the release reached `main`; ship comment added),
1016
+ **#406**. Scope decision honored and recorded: **#340 (PR #368) moves to 0.2.36** — its one gated item,
1017
+ the `prompt`-leg re-record, awaits an endpoint that truly serves the pinned model; #406 now refuses any
1018
+ that does not, loudly and before boot.
1019
+
1020
+ **Heading for 0.2.35→0.2.36:** land #368 post-re-record (needs the distillation rig's model server or
1021
+ `E2E_UPSTREAM` + `E2E_UPSTREAM_KEY` at the real qwen3.8-flash-next) · C3 live observation of a composed
1022
+ checkpoint (blocked here BY the guard until such an endpoint exists — the alias box cannot produce it)
1023
+ · #349 remainder · #397 contract decision · TreeDX live rows · host option-(d) todo row.
1024
+
1025
+ ## 2026-11-17 — correction to today's own entries: #340's re-record was never endpoint-blocked
1026
+
1027
+ The 0.2.35 notes (and the #368 PR / #340 issue comments) stated the `prompt`-leg re-record was
1028
+ "blocked behind a truly-serving qwen3.8-flash-next endpoint". Wrong mechanism, found by RUNNING the
1029
+ rig's documented tool: per #56 the prompt/plans legs distill against the SCRIPTED STUB (:8081) — no
1030
+ live endpoint is ever legitimate for them. The true blocker was my own #406 guard, which demanded the
1031
+ pinned live id from every tape-writing mode and therefore refused the rig's own stub path
1032
+ (`refusing to record — the upstream does not list qwen3.8-flash-next; it lists [stub-plan-carriage]`,
1033
+ full log `var/distill/prompt-120705.log`). Three lessons held together: the guard overfit its incident
1034
+ (demos 1 and 2 passed; the missing third was stub-leg acceptance), I bypassed `distill-tapes.sh` for
1035
+ raw `e2e-one` and so walked into the live-alias the runner's policy forbids, and the shipped changelog
1036
+ stays as cut — corrections land forward, here and in `docs/backlog.md`. Fixed under #409: leg-kind
1037
+ marker from the stub-pinning script itself, stub-class witness (all-`stub-`-prefixed list; its own
1038
+ echo-arm noted honestly), both refusal directions kept, four-quadrant rows. No tape bytes from the
1039
+ failed attempt were ever committed (`tests/fixtures/model-tape/prompt/` restored to HEAD each time).
1040
+
1041
+ ## 2026-11-17 — #340 (PR #368) LANDED to staging; 0.2.36 content is now decided-by-facts
1042
+
1043
+ Sequence as measured, end to end: guard fix #409 (PR #410) merged → stub-path distill of the prompt
1044
+ leg (exit 0, 14 entries) → strict replay caught ONE unrecorded call — the post-Run regeneration this
1045
+ fix's own freshness semantics introduces, lost to streaming latency at record time (a record/replay
1046
+ cache-speed inversion, #331 family) → bounded heal against the same deterministic stub appended
1047
+ exactly one entry → strict replay green at the leg, full 11-leg chain green locally, CI acceptance
1048
+ green on endpoint-less runners → PR #368 merged (`9905c4b`). Follow-up gate filed as **#411**
1049
+ (distill should replay-after-record + bounded auto-heal as the default verdict).
1050
+
1051
+ **0.2.36 standing content:** #340, #409. Candidates if wanted before the cut: #411 rig gate. Still
1052
+ open, unchanged: C3 (first live composed-checkpoint observation), #349 remainder, #397 contract
1053
+ decision, TreeDX live rows, host option-(d) todo. Release timing is the maintainer's call.
1054
+
1055
+ ## 2026-11-17 — 0.2.36 cut prepared from staging `f8971cb`
1056
+
1057
+ Range 0.2.35..f8971cb: 18 commits, three merged PRs — #368 (#340 suggestion freshness, user-visible),
1058
+ #410 (#409 leg-kind identity guard), #412 (#411 distill record+replay gate with bounded heal). The
1059
+ honest arc is in the notes: 0.2.35 shipped a guard that broke the rig's own stub-path distill;
1060
+ 0.2.36 ships its correction AND the fix that correction unblocked. Versions: four sites at 0.2.36.
1061
+ Open after this cut stands at: C3 (live composed-checkpoint observation — first sight belongs to the
1062
+ heavy leg whenever a true pinned-model endpoint runs it), #349 remainder, #397 contract decision,
1063
+ TreeDX live rows, host option-(d) todo row, #372 (browser-rig work, unbuilt).
package/lib/prompt.d.ts CHANGED
@@ -121,10 +121,7 @@ export declare function resolvePromptRoute(spec: string, conversation: PromptRou
121
121
  * predicate (docs/contract.md, #59): injected events drop, injected spans strip.
122
122
  * Chronological; text-bearing human/assistant messages only.
123
123
  */
124
- export declare function tailFromEvents(events: SessionEventLike[]): {
125
- role: 'user' | 'assistant';
126
- text: string;
127
- }[];
124
+ export declare function tailFromEvents(events: SessionEventLike[]): TailEntry[];
128
125
  /** One chapter of the assembled history (#188): the index facts PLUS the trajectory. A model that
129
126
  * cannot research gains nothing from an index it cannot follow — so each chapter carries its plots. */
130
127
  export interface ChapterHistoryEntry {
@@ -170,16 +167,30 @@ export declare function resolvePromptLimits(input: {
170
167
  contextChars: number;
171
168
  sources: PromptLimitSources;
172
169
  };
170
+ /**
171
+ * One turn of the conversation as the director sees it.
172
+ * `human` is true only for a message the human actually typed. Role 'user' alone does not say that:
173
+ * `injections.ts` deliberately keeps some narration as conversation, and #340 needs the difference.
174
+ */
175
+ export interface TailEntry {
176
+ role: 'user' | 'assistant';
177
+ text: string;
178
+ human?: boolean;
179
+ }
173
180
  /**
174
181
  * The LAST turn, whole (#188): from the final human request through every assistant text that
175
182
  * followed it. Reuses the tail's defusing machinery (host-injected context screened, reminder spans
176
183
  * stripped) and then keeps only the closing exchange — the present the director must follow from.
177
184
  * Never sliced: a message enters whole or the assembly refuses.
185
+ *
186
+ * #340: the cut is at the last HUMAN-AUTHORED entry, not the last role-`user` one. Narration the
187
+ * screen keeps as conversation (a subagent-settled notice, an `agent-message` relay whose whole text
188
+ * is often just "Continue") used to START the block, so the human's own request was cut out of the
189
+ * director's input entirely. Measured over every turn of three real sessions: 22 of 152 on platfolio
190
+ * (14%), 6 of 311 on arcnexus, 1 of 3 here. The kept block still contains that narration — it is
191
+ * conversation — it just can no longer stand in for the request.
178
192
  */
179
- export declare function lastTurnFromEvents(events: SessionEventLike[]): {
180
- role: 'user' | 'assistant';
181
- text: string;
182
- }[];
193
+ export declare function lastTurnFromEvents(events: SessionEventLike[]): TailEntry[];
183
194
  export interface SuggestFacts {
184
195
  /** #113: the active goal's constraint on the next step, already worded. Absent ⇒ no goal block. */
185
196
  goalDirective?: string | undefined;
@@ -225,7 +236,19 @@ export declare function firstFitDrop(lengthOf: (drop: number) => number, chapter
225
236
  * last turn — never slices; if it alone cannot fit, the suggestion REFUSES with the numbers.
226
237
  * A refused suggestion costs one turn; a truncated one poisons the next.
227
238
  */
228
- export declare function buildSuggestInput(facts: SuggestFacts, budgetChars: number, maxChars: number): {
239
+ /** Fraction of the director's budget the chapter block may occupy when the caller does not say (#379). */
240
+ export declare const DEFAULT_CHAPTERS_SHARE = 0.25;
241
+ /**
242
+ * #379: absolute ceiling on the director's chapter block, in characters, whatever the budget allows
243
+ * (~50K est tokens). A share of a window-derived budget is unbounded in absolute terms: on a 1M-token
244
+ * route 25% is half a megabyte of old summaries. Sized so a session with hundreds of chapters still
245
+ * shows a real trajectory — measured: 40 chapters of 2 KB summaries still fits, 800 do not.
246
+ */
247
+ export declare const DEFAULT_CHAPTERS_CAP_CHARS = 200000;
248
+ export declare function buildSuggestInput(facts: SuggestFacts, budgetChars: number, maxChars: number,
249
+ /** #379: cap on the chapter block as a fraction of `budgetChars`, independent of whether the total
250
+ * would fit. Letting the window set the budget alone is what made the block dominate it. */
251
+ chaptersShare?: number): {
229
252
  input: string;
230
253
  } | {
231
254
  refusal: string;
@@ -244,10 +267,28 @@ export declare function validateSuggestion(raw: string, maxChars: number): {
244
267
  reason: string;
245
268
  };
246
269
  /**
247
- * The watermarks this surface caches per session: the seq of the last surface
248
- * event at generation. A new completed turn moves the seq and retires the
249
- * suggestion; a restart simply loses the cache (it is a convenience, never truth).
270
+ * The watermarks this surface caches per session.
271
+ *
272
+ * The doc above this function used to say "the seq of the last surface event at generation". It never
273
+ * was — the key was the last `turn/end` seq, which is what #113 wanted (one offer per completed turn,
274
+ * not one per step) and simultaneously what #340 made stale: a human message arriving after that
275
+ * boundary could not retire the cached offer, so `/chapters-prompt suggest` mid-turn answered with the
276
+ * PREVIOUS turn's text even though the log held a newer request.
277
+ *
278
+ * The key is now the pair (last turn boundary, newest human turn). Both are stable for every step
279
+ * inside a turn — so #113's guarantee, "inside a turn the human sees one stable offer", is unchanged
280
+ * and a turn still cannot generate three suggestions — while anything the human says (including a
281
+ * message spliced into the running turn) advances the second half and retires the offer. A restart
282
+ * simply loses the cache: it is a convenience, never truth.
250
283
  */
284
+ export interface SuggestCacheEntry {
285
+ text: string;
286
+ seq: number;
287
+ humanSeq: number;
288
+ }
289
+ /** The newest seq of a HUMAN-authored `user/message`, or -1. Distinct from `turn/end`: a message the
290
+ * human sent has no boundary yet. */
291
+ export declare function lastHumanTurnSeq(events: readonly SessionEventLike[]): number;
251
292
  export declare function createPromptSurface(deps: PromptDeps): PromptSurface;
252
293
  /** Narrow slice: what `registerHostCommands` needs from the surface. */
253
294
  /**
package/lib/prompt.js CHANGED
@@ -20,7 +20,7 @@
20
20
  * @module dsh-chapters/src/prompt
21
21
  */
22
22
  import { textOfBlocks } from "./log-shape.js";
23
- import { screenConversation, stripReminderSpans } from "./injections.js";
23
+ import { isHumanAuthored, screenConversation, stripReminderSpans } from "./injections.js";
24
24
  import { isActiveChapter } from "./registry.js";
25
25
  /** The stored override key (durable kv, same table as `enrichment.model`). */
26
26
  export const PROMPT_SETTING_KEY = 'prompt.model';
@@ -63,8 +63,12 @@ export function tailFromEvents(events) {
63
63
  if (screen.omittedEvent)
64
64
  continue;
65
65
  const text = stripReminderSpans(screen.text).text.trim();
66
+ // #340: keep provenance. A tail entry can be role 'user' and still NOT be the human speaking —
67
+ // injections.ts deliberately keeps subagent-settled notices, agent-message relays, plan-mode
68
+ // flips and chapters' own offers as conversation. Anything downstream that asks "where did the
69
+ // human's turn begin?" must not mistake one of those for the request.
66
70
  if (text !== '')
67
- out.push({ role: 'user', text });
71
+ out.push({ role: 'user', text, human: isHumanAuthored(data) });
68
72
  }
69
73
  else if (ev.type === 'assistant/message') {
70
74
  const message = (data.message ?? data);
@@ -137,16 +141,25 @@ export function resolvePromptLimits(input) {
137
141
  * followed it. Reuses the tail's defusing machinery (host-injected context screened, reminder spans
138
142
  * stripped) and then keeps only the closing exchange — the present the director must follow from.
139
143
  * Never sliced: a message enters whole or the assembly refuses.
144
+ *
145
+ * #340: the cut is at the last HUMAN-AUTHORED entry, not the last role-`user` one. Narration the
146
+ * screen keeps as conversation (a subagent-settled notice, an `agent-message` relay whose whole text
147
+ * is often just "Continue") used to START the block, so the human's own request was cut out of the
148
+ * director's input entirely. Measured over every turn of three real sessions: 22 of 152 on platfolio
149
+ * (14%), 6 of 311 on arcnexus, 1 of 3 here. The kept block still contains that narration — it is
150
+ * conversation — it just can no longer stand in for the request.
140
151
  */
141
152
  export function lastTurnFromEvents(events) {
142
153
  const tail = tailFromEvents(events);
143
154
  let from = -1;
144
155
  for (let i = tail.length - 1; i >= 0; i--) {
145
- if (tail[i].role === 'user') {
156
+ if (tail[i].role === 'user' && tail[i].human === true) {
146
157
  from = i;
147
158
  break;
148
159
  }
149
160
  }
161
+ // No human turn at all (a session driven by relays and goal rounds alone): fall back to the whole
162
+ // tail rather than an empty block. An empty "Last turn" tells the director nothing exists.
150
163
  return from === -1 ? tail : tail.slice(from);
151
164
  }
152
165
  /**
@@ -212,14 +225,35 @@ function linearFirstFit(lengthOf, chapterCount, budget) {
212
225
  * last turn — never slices; if it alone cannot fit, the suggestion REFUSES with the numbers.
213
226
  * A refused suggestion costs one turn; a truncated one poisons the next.
214
227
  */
215
- export function buildSuggestInput(facts, budgetChars, maxChars) {
228
+ /** Fraction of the director's budget the chapter block may occupy when the caller does not say (#379). */
229
+ export const DEFAULT_CHAPTERS_SHARE = 0.25;
230
+ /**
231
+ * #379: absolute ceiling on the director's chapter block, in characters, whatever the budget allows
232
+ * (~50K est tokens). A share of a window-derived budget is unbounded in absolute terms: on a 1M-token
233
+ * route 25% is half a megabyte of old summaries. Sized so a session with hundreds of chapters still
234
+ * shows a real trajectory — measured: 40 chapters of 2 KB summaries still fits, 800 do not.
235
+ */
236
+ export const DEFAULT_CHAPTERS_CAP_CHARS = 200_000;
237
+ export function buildSuggestInput(facts, budgetChars, maxChars,
238
+ /** #379: cap on the chapter block as a fraction of `budgetChars`, independent of whether the total
239
+ * would fit. Letting the window set the budget alone is what made the block dominate it. */
240
+ chaptersShare = DEFAULT_CHAPTERS_SHARE) {
216
241
  const head = 'You are the second reader of a DSH session — a model that DEFINES the next step and never executes it.';
217
242
  const replyRules = `Write the ONE next prompt the human should paste into the composer. It MUST be a message the WORKER MODEL in this session receives and can act on with its own tools, files, and commands. The test: if this exact text arrived as a user message in the worker's context, could the worker act on it directly? Sentences only the human could perform — typing a slash command the host intercepts, opening a UI, clicking this bar, choosing between options — are wrong; the live failure this forbids was "run /chapters-prompt suggest and report the output". Telling the model to run tests, execute commands, fix a file, or investigate is exactly right ('run the tests', 'fix the flake in X first'); advice to the user ('you should consider', 'I recommend') and echoing the conversation's last instruction are not. It must also be FORWARD: name a next step that has NOT YET BEGUN — never a restatement of the work this session is already doing. A live sample failed exactly this, proposing "Create the #273 echo-adjacency issue and run the pre-change sampler" while the issue was filed and the sampler running; describing the in-flight task is a mirror, not a director. If the session is mid-task, recommend what comes AFTER that task lands — its verification, its follow-up — or a different line of work the latest state plainly calls for. A single imperative request; plain text; at most ${maxChars} characters; no preamble, no quotes, no markdown; it must follow from the latest state and advance the session's actual work — propose nothing already done. Reply with ONLY that prompt. The GOAL: prefix is legal ONLY when the goal block above names an ACTIVE goal and this step re-cuts that objective (only the human can send those; autorun will not). With no active goal named, NEVER use the prefix — not for wording about closing out, completing, or ending a purpose; proposing to "close out this release cycle" stamped GOAL: in a session with no goal is the live mis-stamp this forbids. An ordinary next step takes no prefix even when a goal is active.`;
243
+ // #379: the chapter block gets its OWN cap, as a share of the budget, independent of whether the
244
+ // whole assembly would fit. Until now the block could grow to consume everything the window allowed,
245
+ // and on a 1M-token route `contextChars` is ~2,000,000 chars — so the director was handed megabytes of
246
+ // old summaries to write one sentence, with the newest human turn at roughly one character in two
247
+ // million (#7's third mechanism). Recency should be structural, not a hope that the block is small.
248
+ const share = chaptersShare > 0 && chaptersShare <= 1 ? chaptersShare : DEFAULT_CHAPTERS_SHARE;
249
+ const chaptersCap = Math.max(0, Math.floor(budgetChars * share));
250
+ const CHAPTERS_HEADER = '## Where it has been (chapters, oldest first — title, summary, and the plots that carry the trajectory)';
251
+ const NO_CHAPTERS_LINE = '## Where it has been (no chapters yet)';
218
252
  const chapterBlock = (dropOldest) => {
219
253
  const cs = facts.chapters.slice(dropOldest);
220
254
  if (cs.length === 0)
221
- return ['## Where it has been (no chapters yet)'];
222
- const out = ['## Where it has been (chapters, oldest first — title, summary, and the plots that carry the trajectory)'];
255
+ return [NO_CHAPTERS_LINE];
256
+ const out = [CHAPTERS_HEADER];
223
257
  for (const c of cs) {
224
258
  out.push(`${c.number}. ${c.title} — ${c.summary}`);
225
259
  if (c.plots.length > 0) {
@@ -230,44 +264,79 @@ export function buildSuggestInput(facts, budgetChars, maxChars) {
230
264
  }
231
265
  return out;
232
266
  };
233
- const assemble = (dropOldest) => {
234
- const parts = [
235
- head,
236
- '',
237
- `## Session${facts.title !== undefined && facts.title !== '' ? `: ${facts.title}` : ''}`,
238
- // #113: the goal is stated BEFORE the history — it decides whether a candidate next step counts
239
- // as progress, so it is never a footnote. #188: the plan and the standing orders ride with it.
240
- ...(facts.goalDirective !== undefined && facts.goalDirective !== '' ? ['', String(facts.goalDirective)] : []),
241
- ...(facts.plan !== undefined && facts.plan !== '' ? ['', '## Active plan', String(facts.plan)] : []),
242
- ...(facts.rules !== undefined && facts.rules !== '' ? ['', '## Standing orders', String(facts.rules)] : []),
243
- '',
244
- ...chapterBlock(dropOldest),
245
- '',
246
- ...(facts.lastTurn.length > 0
247
- ? ['## Last turn (request through final response)', ...facts.lastTurn.map((m) => `${m.role === 'user' ? 'Human' : 'Assistant'}: ${m.text}`)]
248
- : ['## Last turn (empty)']),
249
- ];
250
- if (dropOldest > 0) {
251
- parts.push(`(older chapters dropped to fit the ${budgetChars}-char budget: ${dropOldest} chapter(s) — the recent trajectory leads)`);
252
- }
253
- parts.push('', replyRules);
254
- return parts.join('\n');
255
- };
256
- // #350: the first `drop` whose assembly fits. Dropping chapters only shortens the block, so
257
- // `assemble(d).length` is (practically) monotonically non-increasing in `d` and the answer is findable
258
- // by binary search in ceil(log2(n+1)) assemblies. The previous loop assembled the ENTIRE candidate
259
- // string once per drop value — O(n²) in characters: measured 9,482 ms at 800 chapters / 36 MB on this
260
- // machine, blocking the host's event loop at every turn boundary.
267
+ // Everything outside the chapter block, held as the SAME arrays the final string is built from, so the
268
+ // measurement below cannot describe a different document than assemble() emits. Their size is bounded
269
+ // by the reply rules and the human's turn — never by archive volume — so materialising them is cheap.
270
+ const preItems = [
271
+ head,
272
+ '',
273
+ `## Session${facts.title !== undefined && facts.title !== '' ? `: ${facts.title}` : ''}`,
274
+ ...(facts.goalDirective !== undefined && facts.goalDirective !== '' ? ['', String(facts.goalDirective)] : []),
275
+ ...(facts.plan !== undefined && facts.plan !== '' ? ['', '## Active plan', String(facts.plan)] : []),
276
+ ...(facts.rules !== undefined && facts.rules !== '' ? ['', '## Standing orders', String(facts.rules)] : []),
277
+ '',
278
+ ];
279
+ const lastTurnItems = facts.lastTurn.length > 0
280
+ ? ['## Last turn (request through final response)',
281
+ ...facts.lastTurn.map((m) => m.role === 'user' ? 'Human: ' + m.text : 'Assistant: ' + m.text)]
282
+ : ['## Last turn (empty)'];
283
+ const dropNote = (dropOldest) => `(older chapters dropped to fit the ${budgetChars}-char budget: ${dropOldest} chapter(s) — the recent trajectory leads)`;
284
+ const tailItems = (dropOldest) => [
285
+ ...lastTurnItems,
286
+ ...(dropOldest > 0 ? [dropNote(dropOldest)] : []),
287
+ '',
288
+ replyRules,
289
+ ];
290
+ const joinedLen = (items) => items.length === 0 ? 0 : items.reduce((m, x) => m + x.length, 0) + items.length - 1;
291
+ const preLen = joinedLen(preItems);
292
+ const tailLen = (d) => joinedLen(tailItems(d));
293
+ // The chapter block is the only part large enough to be worth measuring WITHOUT building it (#350's
294
+ // residual 136 ms was constructing tens of megabytes once per probe). Chapter k renders as one line,
295
+ // plus a ' Plots:' line and one line per plot when it has plots; the separators between those items
296
+ // belong to the chapter's own length. This arithmetic is checked against assemble() for EVERY drop
297
+ // value in tests/unit/prompt-assembly-cost.test.ts — a shortcut that disagrees with the bytes is worse
298
+ // than the slow version it replaces.
299
+ const chapterLens = facts.chapters.map((c) => {
300
+ const headChars = String(c.number).length + 2 + c.title.length + 3 + c.summary.length;
301
+ const plotChars = c.plots.length === 0 ? 0 : 9 + c.plots.reduce((m, pl) => m + 5 + pl.length, 0);
302
+ const items = 1 + (c.plots.length > 0 ? 1 + c.plots.length : 0);
303
+ return { joined: headChars + plotChars + Math.max(0, items - 1), items };
304
+ });
305
+ const nChapters = facts.chapters.length;
306
+ const suffixJoined = new Array(nChapters + 1).fill(0);
307
+ const suffixItems = new Array(nChapters + 1).fill(0);
308
+ for (let k = nChapters - 1; k >= 0; k--) {
309
+ suffixJoined[k] = suffixJoined[k + 1] + chapterLens[k].joined;
310
+ suffixItems[k] = suffixItems[k + 1] + chapterLens[k].items;
311
+ }
312
+ const blockLen = (d) => d >= nChapters
313
+ ? NO_CHAPTERS_LINE.length
314
+ : CHAPTERS_HEADER.length + 1 + suffixJoined[d] + (suffixItems[d] - 1);
315
+ const measure = (d) => preLen + 1 + blockLen(d) + 1 + tailLen(d);
316
+ const assemble = (dropOldest) => [...preItems, ...chapterBlock(dropOldest), ...tailItems(dropOldest)].join('\n');
317
+ // #350/#379: the joint constraint — total within budget AND the chapter block within its own cap.
318
+ // Both terms are non-increasing in `drop`, so their maximum is, and firstFitDrop remains valid. The
319
+ // block term is `block <= cap` restated on the total's scale: `block + (budget - cap) <= budget`.
320
+ // #379, and a correction made from measurement rather than taste. Bounding history at a share of the
321
+ // BUDGET is not enough on its own (a 1M-token route's 2,000,000-char budget makes 25% still half a
322
+ // megabyte beside a few thousand characters of newest turn). My first attempt bounded it RELATIVE TO
323
+ // THE PROTECTED CONTENT instead — and measured the result: the director's whole input collapsed to
324
+ // 2 KB, because the protected set is mostly fixed reply rules, so "25% of everything else" allowed
325
+ // about one chapter line. That satisfies a recency ratio by destroying the context the director
326
+ // exists to weigh, which is the wrong fix arrived at by the right arithmetic.
261
327
  //
262
- // The search is extracted as `firstFitDrop` so it can be checked against a naive linear oracle over
263
- // randomized length functions. Inlining it here would leave the equivalence untestable — and "compare
264
- // the function to itself" is not an oracle, it is a tautology (this release has caught three of those).
265
- const drop = firstFitDrop((d) => assemble(d).length, facts.chapters.length, budgetChars);
328
+ // So: share of the budget, AND an absolute ceiling. The ceiling is what actually bounds the
329
+ // large-window case (a ~50K-token history block), it does not shrink when a session's last turn is
330
+ // short, and recency is protected by what genuinely protects it — the last turn enters WHOLE and is
331
+ // never sliced (#188), plus the block being unable to exceed either bound.
332
+ const effectiveCap = Math.min(chaptersCap, DEFAULT_CHAPTERS_CAP_CHARS);
333
+ const required = (d) => Math.max(measure(d), blockLen(d) + (budgetChars - effectiveCap));
334
+ const drop = firstFitDrop(required, nChapters, budgetChars);
266
335
  if (drop !== null)
267
336
  return { input: assemble(drop) };
268
337
  const floor = assemble(facts.chapters.length).length;
269
338
  return {
270
- refusal: `the suggestion input cannot fit — the protected context (goal, plan, rules, last turn) assembles to ${floor} chars, exceeding the ${budgetChars}-char budget with all ${facts.chapters.length} chapter(s) already dropped. Refusing rather than truncating (#188): raise the budget or set a larger model with /chapters-prompt model.`,
339
+ refusal: `the suggestion input cannot fit — the protected context (goal, plan, rules, last turn) assembles to ${floor} chars, exceeding the ${budgetChars}-char budget with all ${nChapters} chapter(s) already dropped; the chapter block was capped at ${effectiveCap} chars (${Math.round(share * 100)}% of the budget, ceiling ${DEFAULT_CHAPTERS_CAP_CHARS} chars). Refusing rather than truncating (#188): raise the budget or set a larger model with /chapters-prompt model.`,
271
340
  };
272
341
  }
273
342
  /**
@@ -290,11 +359,20 @@ export function validateSuggestion(raw, maxChars) {
290
359
  return { ok: false, reason: `the answer is ${text.length} characters, over the ${maxChars}-char cap` };
291
360
  return { ok: true, text };
292
361
  }
293
- /**
294
- * The watermarks this surface caches per session: the seq of the last surface
295
- * event at generation. A new completed turn moves the seq and retires the
296
- * suggestion; a restart simply loses the cache (it is a convenience, never truth).
297
- */
362
+ /** The newest seq of a HUMAN-authored `user/message`, or -1. Distinct from `turn/end`: a message the
363
+ * human sent has no boundary yet. */
364
+ export function lastHumanTurnSeq(events) {
365
+ let seq = -1;
366
+ for (const ev of events) {
367
+ if (ev.type !== 'user/message')
368
+ continue;
369
+ if (!isHumanAuthored((ev.data ?? {})))
370
+ continue;
371
+ if (typeof ev.seq === 'number' && ev.seq > seq)
372
+ seq = ev.seq;
373
+ }
374
+ return seq;
375
+ }
298
376
  export function createPromptSurface(deps) {
299
377
  const cache = new Map();
300
378
  const inflight = new Map();
@@ -323,7 +401,7 @@ export function createPromptSurface(deps) {
323
401
  },
324
402
  });
325
403
  };
326
- const run = async (session, seq) => {
404
+ const run = async (session, key) => {
327
405
  const { spec } = effective();
328
406
  const { route, reason } = resolvePromptRoute(spec, deps.conversationRoute());
329
407
  if (route === null)
@@ -365,7 +443,7 @@ export function createPromptSurface(deps) {
365
443
  }
366
444
  if (!verdict.ok)
367
445
  return refuse(`no recommendation: ${verdict.reason}`);
368
- cache.set(session.id, { text: verdict.text, seq });
446
+ cache.set(session.id, { text: verdict.text, seq: key.seq, humanSeq: key.humanSeq });
369
447
  return { ok: true, text: verdict.text };
370
448
  }
371
449
  catch (error) {
@@ -403,13 +481,16 @@ export function createPromptSurface(deps) {
403
481
  const tail = tailFromEvents(events);
404
482
  if (!tail.some((m) => m.role === 'assistant'))
405
483
  return refuse('nothing to recommend yet — no completed assistant turn', true);
484
+ // #340: BOTH halves must match. The turn boundary alone was stable across a new human message,
485
+ // which is how a mid-turn `/chapters-prompt suggest` returned the previous turn's offer.
486
+ const humanSeq = lastHumanTurnSeq(events);
406
487
  const fresh = cache.get(session.id);
407
- if (fresh !== undefined && fresh.seq === turnSeq)
488
+ if (fresh !== undefined && fresh.seq === turnSeq && fresh.humanSeq === humanSeq)
408
489
  return { ok: true, text: fresh.text };
409
490
  const pending = inflight.get(session.id);
410
491
  if (pending !== undefined)
411
492
  return await pending;
412
- const job = run(session, turnSeq).finally(() => { inflight.delete(session.id); });
493
+ const job = run(session, { seq: turnSeq, humanSeq }).finally(() => { inflight.delete(session.id); });
413
494
  inflight.set(session.id, job);
414
495
  return await job;
415
496
  },
package/lib/prompt.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAA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;YAChB,0EAA0E;YAC1E,IAAI,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;gBACxC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;gBAC7C,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;YAChC,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;QAC3E,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
package/lib/version.d.ts CHANGED
@@ -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.34";
9
+ export declare const PLUGIN_VERSION = "0.2.36";
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.34';
9
+ export const PLUGIN_VERSION = '0.2.36';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractalsynapse/dsh-chapters",
3
- "version": "0.2.34",
3
+ "version": "0.2.36",
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",