dsh-charter 0.0.0-stage → 0.1.0-rc.2

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +393 -0
  2. package/CHANGELOG.zh.md +312 -0
  3. package/CODE_OF_CONDUCT.md +11 -0
  4. package/CODE_OF_CONDUCT.zh.md +9 -0
  5. package/CONTRIBUTING.md +84 -0
  6. package/CONTRIBUTING.zh.md +86 -0
  7. package/LICENSE +21 -0
  8. package/README.md +342 -2
  9. package/README.zh.md +318 -0
  10. package/SECURITY.md +48 -0
  11. package/SECURITY.zh.md +43 -0
  12. package/cordis.patch.yml +16 -0
  13. package/docs/assets/charter-pane.dark.png +0 -0
  14. package/docs/assets/charter-pane.en.png +0 -0
  15. package/docs/assets/charter-pane.narrow.png +0 -0
  16. package/docs/assets/charter-pane.png +0 -0
  17. package/docs/design/charter-design-review.md +182 -0
  18. package/docs/design/charter-design-review.zh.md +166 -0
  19. package/docs/design/charter-design.md +686 -0
  20. package/docs/design/charter-design.zh.md +1028 -0
  21. package/docs/design/compatibility.md +122 -0
  22. package/docs/design/compatibility.zh.md +114 -0
  23. package/docs/releasing.md +168 -0
  24. package/docs/releasing.zh.md +144 -0
  25. package/docs/research/charter-research.md +245 -0
  26. package/docs/research/charter-research.zh.md +275 -0
  27. package/docs/user-guide.md +321 -0
  28. package/docs/user-guide.zh.md +296 -0
  29. package/docs/verification.md +921 -0
  30. package/docs/verification.zh.md +825 -0
  31. package/icon.svg +13 -0
  32. package/lib/client/CharterPane.d.ts +15 -0
  33. package/lib/client/admission.d.ts +28 -0
  34. package/lib/client/bootstrap-plan.d.ts +72 -0
  35. package/lib/client/draft-store.d.ts +219 -0
  36. package/lib/client/draft.d.ts +11 -0
  37. package/lib/client/locales.d.ts +223 -0
  38. package/lib/client/preview.d.ts +85 -0
  39. package/lib/client/store.d.ts +106 -0
  40. package/lib/client.d.ts +13 -0
  41. package/lib/client.js +10038 -0
  42. package/lib/core/authorization.d.ts +9 -0
  43. package/lib/core/bootstrap.d.ts +35 -0
  44. package/lib/core/commands.d.ts +15 -0
  45. package/lib/core/digest.d.ts +3 -0
  46. package/lib/core/errors.d.ts +7 -0
  47. package/lib/core/fork.d.ts +13 -0
  48. package/lib/core/items.d.ts +15 -0
  49. package/lib/core/limits.d.ts +30 -0
  50. package/lib/core/normalize.d.ts +12 -0
  51. package/lib/core/prompt.d.ts +36 -0
  52. package/lib/core/record.d.ts +43 -0
  53. package/lib/core/render.d.ts +15 -0
  54. package/lib/core/schemas.d.ts +926 -0
  55. package/lib/core/state.d.ts +5 -0
  56. package/lib/core.d.ts +11 -0
  57. package/lib/core.js +2 -0
  58. package/lib/fork-0PNSfiML.js +1346 -0
  59. package/lib/host/domain.d.ts +13 -0
  60. package/lib/host/service.d.ts +91 -0
  61. package/lib/host/session-events.d.ts +10 -0
  62. package/lib/host/tool.d.ts +3 -0
  63. package/lib/host/types.d.ts +103 -0
  64. package/lib/index.d.ts +5 -0
  65. package/lib/index.js +4 -0
  66. package/lib/remote/actor.d.ts +10 -0
  67. package/lib/remote/compat.d.ts +47 -0
  68. package/lib/remote/contribution.d.ts +2 -0
  69. package/lib/remote/service.d.ts +17 -0
  70. package/lib/remote/watch.d.ts +31 -0
  71. package/lib/remote/wire.d.ts +689 -0
  72. package/lib/remote.d.ts +3 -0
  73. package/lib/remote.js +459 -0
  74. package/lib/service-szrVCb8p.js +755 -0
  75. package/package.json +171 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,393 @@
1
+ # Changelog
2
+
3
+ English | [中文](CHANGELOG.zh.md)
4
+
5
+ All notable changes to `dsh-charter` are recorded here. The project follows a pre-1.0 version line while the
6
+ DSH plugin ABI is still moving.
7
+
8
+ ## 0.1.0-rc.2 — 2026-10-24
9
+
10
+ Small patch candidate: a Pane hook-order crash fix, a security upgrade, and release-channel/doc corrections.
11
+
12
+ ### Fixed
13
+
14
+ - `CharterPane` no longer crashes with "Rendered more hooks than during the previous render" when a Session
15
+ transitions connecting/null → ready or error/null → retry → ready: the replay-state predicates
16
+ (`editReplay`/`bootstrapReplay`/`unknownReplay`) and the `confirmAbandon` reset effect now run above every early
17
+ return, so hook order is invariant across connection states.
18
+ - Real `react-test-renderer` regression tests (three cases: connecting/null → ready, error/null → retry → ready,
19
+ ready → revision update) exercise the actual Pane component; the pre-fix code fails them with the exact
20
+ "Rendered more hooks than during the previous render" error.
21
+
22
+ ### Security
23
+
24
+ - Upgrade `zod` from `4.4.3` to `4.6.7` exactly (GHSA memory-exhaustion advisory for oversized constrained
25
+ collections). `npm audit --omit=dev` reports 0 vulnerabilities and `npm ls zod` shows the production dependency
26
+ at 4.6.7; because tsdown inlines Zod into the browser bundle, the full build/wire/client-bundle/package smoke
27
+ and the five-version compatibility matrix are re-run against the upgraded build.
28
+
29
+ ### Tests
30
+
31
+ - 20 test files / 263 tests (`npm test`), including the three real `react-test-renderer` Pane regression tests;
32
+ the repaired hook placement is required for two of them.
33
+
34
+ ### Changed
35
+
36
+ - Version and current-release documentation move to `0.1.0-rc.2`; historical `0.1.0-rc.1` evidence and CHANGELOG
37
+ history are preserved.
38
+ - Channel policy is now explicit and deliberate: rc.2 is published under the `next` dist-tag, and we also point
39
+ `latest` at the newest RC until a stable release exists. This is our current policy (npm keeps a `latest` tag and
40
+ we choose where it points), not an npm requirement or a claim about npm's behavior.
41
+ - Added release notes for rc.2 at `docs/release-notes/0.1.0-rc.2.md` (outside the npm `files` whitelist).
42
+
43
+ ## 0.1.0-rc.1 — 2026-10-22
44
+
45
+ Initial MVP.
46
+
47
+ ### Added
48
+
49
+ - Durable per-Session charter in a `dsh-storage-domain` domain (`dsh_charter_v1`).
50
+ - Original/current objective, invariants, deliverables, review/lifecycle/verification/progress state.
51
+ - Atomic single-record Apply with revision conflicts, idempotent mutation receipts, quota admission, and
52
+ bounded history.
53
+ - Deterministic user-role runtime context injected through `systemPrompt.context()`.
54
+ - Read-only `charter_read` tool with standing and all-item views.
55
+ - One-time fork copy of the parent charter with re-minted item ids.
56
+ - Non-live sessions (for example a Desktop session opened in a separate Web process) show their stored charter
57
+ read-only with an explanatory notice, then upgrade in place when the session becomes live instead of failing
58
+ the Remote stream with a raw "not live" error.
59
+ - Redesigned Charter pane with DSH semantic tokens: compact page header and budget meter, sticky Preview/Discard/
60
+ Apply toolbar, objective card, responsive invariants/deliverables columns, hover/focus item actions, inline
61
+ add composers, and light/dark support.
62
+ - Raised the default charter-contribution budget to 8 KiB, the objective to 4 KiB, and one item to 1 KiB. No path silently truncates:
63
+ long history-draft items are split into candidates, over-limit fields are highlighted, and Apply is disabled
64
+ until the selection fits the budget.
65
+ - Review-only history draft extracted deterministically from the latest compaction summary for an empty
66
+ existing Session; no model call and no automatic write. The user edits/unchecks the draft and applies it.
67
+ - Complete English/Chinese localization for the Charter tab and pane, driven by `dsh-client-locale` and the
68
+ active DSH language, including counts, statuses, buttons, placeholders, and error-code messages.
69
+ - Conversation-view Charter tab (中文「会话契约」/ English 「Charter」) with draft staging, conflict preservation,
70
+ preview, archive/restore, supersede, pending review (history overflow; model proposal entry reserved), purge confirmation, progress, and verification
71
+ controls. The tab is registered once at a stable high order (1000) and follows Chat, Trajectory, and common
72
+ plugin tabs without ever re-registering itself.
73
+ - Session-scoped Remote stream and edit endpoints.
74
+ - Compatibility layer for DSH 0.1.7-rc.2 / 0.2.0 (`@Remote` resource fallback, prompt-context extra fields,
75
+ actor fallback) and prompt-variable escaping for their interpolator.
76
+ - Self-contained factory-form browser bundle, with inlined CSS and bundled zod, matching the DSH Web module
77
+ loader contract.
78
+ - History import now treats the real context byte budget as the gate, not per-kind active counts: overflowing
79
+ candidates are applied in one atomic edit as pending proposals (`item.propose`) instead of blocking the draft.
80
+ No candidate is dropped or truncated. The per-kind active caps were removed; storage limits were raised to
81
+ `maxItems` 512, `maxPendingItems` 512, `maxOps` 1024, and `maxRecordBytes` 1 MiB.
82
+ - A newly built browser client now tolerates a view snapshot from an older Host that still exposes the legacy
83
+ active-count limit fields, preventing a blank Charter pane during a host/client revision skew; a full Host
84
+ restart is still required for the new pending-import semantics.
85
+ - Verified against DSH `0.2.1-rc.2` with no code changes required; the existing peer range and compatibility layer
86
+ cover the release candidate.
87
+ - 260 tests across core, host composition, fork, idempotency, quota, prompt boundary, Remote stream, history
88
+ extraction, client reordering, compatibility, and decorator compatibility. Verified on DSH `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`,
89
+ `0.2.1-rc.1`, and `0.2.1-rc.2`. The actual Web UI was exercised on `0.2.0-rc.2`: tab order, Chinese/English
90
+ switching, objective and invariant editing, preview, Apply, and reload persistence.
91
+
92
+ ### Security
93
+
94
+ - Principal-aware Remote actor resolution: DSH 0.2.1+ requires a `PeerScope.principal`. An absent principal
95
+ is denied with `FORBIDDEN` instead of being elevated to `owner`; the owner fallback applies only to a
96
+ runtime confirmed to be DSH 0.1.7/0.2.0 (no principal field).
97
+ - User-authored text never enters a system-role message.
98
+ - The model has no charter write capability.
99
+ - DSH 0.1.7-rc.2 and 0.2.0 cannot enforce per-Peer Remote resources; the plugin degrades to live-Session and
100
+ lifecycle checks and documents the restriction.
101
+
102
+ ### Known limitations
103
+
104
+ - Watch/edit frames still carry the full item set for a maximum-size charter; splitting history into a paged
105
+ Remote endpoint is a follow-up rather than part of this round.
106
+ - `charter_read` `standing` is the complete working set and has no fixed byte cap: a maximum-size charter can
107
+ produce a large tool result. Paging or an explicit response cap is a follow-up, not part of this round.
108
+ - Active client drafts are not byte-capped beyond their UI inputs; the idle TTL/LRU bounds released drafts, not
109
+ text held by a currently mounted editor/bootstrap sheet.
110
+ - This tree is the `0.1.0-rc.1` pre-release and is published with a non-latest `npm publish --tag next`; a stable
111
+ `latest` release additionally requires a post-restart confirmation of the installed profile. Release-state
112
+ prerequisites (repository metadata, tag ordering, CI gating) are tracked only in `docs/releasing.md`.
113
+ - Compaction rematerialization depends on the DSH runtime-context projection contract; the real-model
114
+ end-to-end PASS is recorded in verification §8.4 (2026-10-22).
115
+ - Browser interaction was verified on `0.2.0-rc.2`; 0.1.7/0.2.1 were verified by typecheck/build/tests, not by
116
+ repeated interactive flows.
117
+ - Default quotas are not calibrated against production samples.
118
+ - History extraction is deterministic and heuristic; stale or noisy items can appear in the draft and require
119
+ review.
120
+
121
+ ### Fixed
122
+
123
+ - Make watch unsubscribe instance-safe: a disposed generation's late unsubscribe can no longer delete the
124
+ Map entry of a same-id replacement watch (the entry is removed only when it still owns the captured Set).
125
+ - Fix attach/stream generation races: duplicate attach of the live stream is a true no-op, and `replace`/`update`
126
+ frames from a replaced stream generation are ignored before they can touch state or reset a draft lifecycle.
127
+ - Track a pending Remote attach as a cancellable state: a detach that arrives before the previous stream finishes
128
+ disposing cancels the pending generation, so the cancelled attach can never start its stream late; the source
129
+ reports itself detached instead.
130
+ - Disable and reject Rebase while an Apply or bootstrap save is in flight, preserving the mutation attempt for an
131
+ unknown-outcome retry; bind bootstrap extraction results to the source instance/connection generation so a
132
+ reconnected Host cannot inject a stale proposal.
133
+ - Never silently evict dirty drafts: the idle TTL and LRU capacity target only empty drafts, and capacity eviction
134
+ also clears the draft timestamp; staged ops, editor text, and reviewed history drafts survive tab/Session churn.
135
+ - Let the editor submit a stepwise shrink of an already over-budget objective/same-id item, matching Host
136
+ admission, while new or growing content still requires the hard limit.
137
+ - Accept the first lifecycle fingerprint on reconnect even at a lower revision, and include `overBudget` plus all
138
+ limits in client frame deduplication so a tightened-config snapshot is delivered.
139
+ - Close every open watch subscription when its Session is disposed (listeners receive `null` and the generator
140
+ exits), so a recreated Session is not stuck behind a listener removed from the service map; Host frame dedupe
141
+ and client acceptance now compare the lifecycle, and a new lifecycle whose revision restarts at 0 is accepted.
142
+ - Lock mutating draft actions while a request is in flight: Unstage is rejected and disabled during Apply, all
143
+ bootstrap editors/selectors are disabled during a bootstrap save, setters reject edits, retained bootstrap
144
+ requests are only replayed when their ops and base revision still match the reviewed plan, and `dismissBootstrap`
145
+ clears the attempt.
146
+ - Preserve a reviewed history draft across Chat/Charter tab switches by treating any non-empty bootstrap draft as
147
+ dirty in the lease-release cleanup.
148
+ - Admit stepwise shrinking of an already over-budget objective or item even while it is still above the limit, so
149
+ a tightened budget can converge without rejecting every intermediate edit.
150
+ - Gate the Apply button by the Host's exact `overLimitGrowth` rule: an over-budget rendered prompt is blocked
151
+ only when the edit makes it grow, so a shrinking or unchanged over-budget render is accepted.
152
+ - Consolidate the two stacked over-budget alerts into one alert with one remedy; show replacement and
153
+ verification-failure reasons as visible item-row text instead of title attributes, and restore keyboard focus
154
+ to the item row after row actions.
155
+ - Correct the live-region pattern: `status`/`alert` roles now wrap only the message text, so action buttons are
156
+ never nested inside live regions; the history-draft idle phase shows a dedicated no-draft message instead of
157
+ the extracted-draft copy.
158
+ - Use real DSH semantic tokens for the primary-button fill/hover, content font size, and font family, and unify
159
+ Chinese UI terminology (章节 / 待审 / 硬约束 / 会话 / 标记为未验证).
160
+ - Keep the `all` tool envelope bounded even when `maxObjectiveBytes` exceeds it: omit the objective with
161
+ `objectiveTruncated: true` instead of returning an oversized response; validate `shadowedTokenCount` as a
162
+ non-negative integer before the Remote codec sees it.
163
+ - Normalize a legacy debug-shaped `charter_read` tool result (extra id/review/lifecycle fields from a Host that
164
+ has not been restarted after a package update) to the current compact standing projection before evidence
165
+ comparison, and record the real-model compaction PASS in verification §8.4.
166
+ - Make every compaction-checker success criterion participate in the exit code: the checker compares the Host's
167
+ compact standing projection, fails on a dirty system prompt, and now **requires** a matching `charter_read`
168
+ standing result recorded after the latest compaction (a missing or mismatched post-compaction read fails; reads
169
+ before the compaction are ignored by seq); a leaking summary is a recorded warning, and fixture tests cover
170
+ each combination.
171
+ - Fence edit and bootstrap Apply results by draft generation, source connection epoch, source instance, lifecycle,
172
+ and request identity, so a late response from a destroyed source or a detach/reattach cycle cannot clear or
173
+ overwrite a newer draft; source invalidation keeps the mutation id for an idempotent retry through the replacement
174
+ source.
175
+ - Drop empty drafts immediately on the last lease release, apply an idle TTL, and bound released drafts; a
176
+ runtime-invalid record that is repaired in place is re-parsed on the next access and recovers without a Host
177
+ restart, while a still-invalid document stays isolated and is never overwritten.
178
+ - Enforce actor policy at the service and `commitRecord()` boundaries: `host` edits are rejected, `user` may make
179
+ ordinary edits but not `item.purge`, and `owner` may purge; forbidden calls do not change storage, revision, or
180
+ published views.
181
+ - Reject purging an active accepted or pending item at the core operation layer; only archived, rejected, or
182
+ superseded chain entries are purgeable.
183
+ - Detect self/multi-node `parentSession` cycles and depth overflow instead of leaving initialization promises
184
+ waiting forever.
185
+ - Fall back to older compaction summaries when the newest valid summary yields no candidates.
186
+ - Add bootstrap retry/stale-request handling and release per-Session client sources on view unmount; guard the
187
+ detach generation race.
188
+ - Bound the `charter_read` all view to 64 items / 32 KiB and report the omitted count.
189
+ - Isolate the deprecated `snapshotEvents()` read behind one compatibility adapter. This is a known technical
190
+ debt, not a completed migration: DSH 0.2.1-rc.2 exposes no public non-deprecated historical-event reader.
191
+ - Mint Host ids for `item.propose` client refs, so a history Apply that contains both active items and
192
+ overflow proposals commits atomically instead of failing with `INVALID_REFERENCE`.
193
+ - Replace the per-`sessionId` client source release with an instance-bound lease and ref counting: several
194
+ view bindings share one stream and only the last lease disposes it; a stale lease can no longer dispose a
195
+ newer binding.
196
+ - Surface `bootstrap` unavailability reasons (`not-live` / `no-summary` / `unavailable`) with a Retry action,
197
+ allow a later view/lifecycle change to ask again, and silently discard an in-flight draft when the user
198
+ started editing instead of showing a stale error.
199
+ - Validate `view.sessionId` on stream snapshots and updates, not only on the immediate edit response.
200
+ - Reset every Pane draft field when the view binding switches Sessions, and route Apply through a
201
+ Session-scoped request builder so one Session's staged ops can never be submitted under another Session id;
202
+ async Apply completions are fenced by a Session generation.
203
+ - Make the opening runtime snapshot revision-monotonic, so an older stream generation cannot roll the accepted
204
+ view back after an edit response.
205
+ - Return the complete standing working set from `charter_read`; only the `all` debugging view is paged.
206
+ - Accept `maxPendingItems: 0` in the Remote wire schema, matching the Host configuration that disables proposals.
207
+ - Document `item.propose` as a normal client edit operation (never model-facing) instead of a host-internal
208
+ operation.
209
+ - Re-validate every stored record against the strict schema on every runtime read and write path
210
+ (`recordFor`, read-only views, parent/fork reads, and the `table.update` transform), not only at startup; a
211
+ record that becomes invalid at runtime disables only its Session and is never overwritten.
212
+ - Fail closed when decorating Remote methods: only the documented "unsupported decorator options" rejection may
213
+ select the legacy no-resources path; arbitrary modern-factory errors propagate, so a broken modern runtime can
214
+ no longer be misclassified as legacy and re-open the owner fallback for missing principals.
215
+ - Bind client drafts to the Session lifecycle fingerprint and keep the per-Session draft map bounded with an LRU
216
+ of released entries, so a reused Session id cannot inherit staged work and long browsing does not grow memory
217
+ without limit.
218
+ - Share the Host's text normalization rules with the client: control characters and unpaired surrogates are
219
+ rejected in the editor and in reviewed history candidates, with localized feedback before Apply.
220
+ - Exclude pending proposals from active UI counts and lists while keeping them visible in their own section; add a
221
+ non-blocking reconnecting banner that explains the temporary read-only state.
222
+ - Return a complete bounded debug projection from `charter_read all` (origin/order/createdRevision/supersede
223
+ chain/verification provenance) and cap the final tool envelope at 32 KiB; include history/mutation count limits
224
+ in the over-budget state.
225
+ - Add a packed-artifact smoke to CI (installable tarball, exports resolve, client bundle loads), remove the
226
+ redundant `@deepseek-ai/schemastery` peer declaration, and make the pre-release/compaction wording explicit.
227
+ - Isolate stored-record validation per Session: the domain boundary keeps raw documents and the service parses
228
+ each one, so one corrupt or forward-skewed record marks only that Session unavailable while every other
229
+ Session still reads and edits. The raw document is preserved for diagnosis.
230
+ - Separate structural validation from admission policy. Lowering a budget later now renders the charter as
231
+ `overBudget` (not corrupt), stops injecting it, and admits shrinking edits so it can converge; non-viable
232
+ profile values are clamped to documented minimums with a warning. `maxRecordBytes` is exposed in the view.
233
+ - Enforce the single-hop replacement model at the operation layer: archiving or replacing a replacement now
234
+ fails with `INVALID_TRANSITION` instead of `CORRUPT_STATE`, and the pane exposes the supported escape hatch
235
+ (purge the superseded predecessor to detach the successor).
236
+ - Cache record validation per immutable record object and compare snapshot digests instead of serialising the
237
+ full item set; plan history imports in one pass (with an exact-render verification/fallback) and split
238
+ pathological single-line summaries with a running byte counter.
239
+ - Move Pane draft ownership into a per-Session store: staged edits, inline editors, new-item text, feedback and
240
+ the reviewed history draft survive switching to Chat/Trajectory and back. Apply reuses a stable mutation id
241
+ for unknown-outcome retries, offers apply-to-latest after a conflict, and reports connection failures with a
242
+ working Retry path (including an attach watchdog and stream re-attach).
243
+ - Render the projected draft view in the Pane: staged rows are visible immediately, counts split active/pending/
244
+ historical, historical rows collapse by default, item actions move into an accessible per-row menu, and the
245
+ sticky footer mirrors history-draft apply/discard.
246
+ - Make bootstrap a persisted phase machine (checking / draft / no-summary / not-live / failed / unavailable /
247
+ dismissed) with Overview callouts and a stable Check again action, never stealing the section while the user
248
+ edits.
249
+ - Keep feedback and bootstrap errors as locale-independent descriptors, make the redirect reason optional
250
+ instead of persisting UI copy, and localise byte units, counts, verification provenance, and preview labels.
251
+ - Harden `npm run verify:compaction`: validate the storage record shape, accept `--store`, compare the full
252
+ `charter_read` standing projection, and check multiple system-prompt leak signals. Document it as a manual
253
+ check (the automated gate never runs a model).
254
+ - Register the Charter conversation view exactly once at the stable order 1000 instead of re-registering on every
255
+ slot change: two plugins that both try to stay "last" can no longer reorder each other forever, and the bundle
256
+ neither queries nor subscribes to the slot roster.
257
+ - Tighten every DSH peer dependency range to the five versions in the tested compatibility matrix
258
+ (`0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2`).
259
+ - Replace the quadratic bootstrap-plan measurement with exact O(1) incremental byte accounting (objective token
260
+ plus joined invariant/deliverable tokens); the full renderer stays as verification/fallback, and a
261
+ 3,000-candidate all-active plan is covered by tests.
262
+ - Use a plain `<details>` disclosure for the item action menu (no `menu`/`menuitem` ARIA contract), autofocus the
263
+ purge confirmation, return focus to the summary on cancel, and keep keyboard focus on the row after actions.
264
+ - Detach a successor's `supersedes` link in the draft preview when its purged predecessor is removed, matching
265
+ the Host purge semantics.
266
+ - Keep install documentation channel-neutral (the immutable tarball does not claim the registry is unavailable)
267
+ and document the correct release order: repository metadata, CI, verified artifact, tag, then publish.
268
+ - Make `package-smoke` wording match what the empty consumer actually checks (packed `core` import plus
269
+ root/remote export/file presence); Host/Remote runtime imports stay covered by the workspace build smokes.
270
+ - Authenticate the compaction checker's `charter_read` evidence by resolving the unique tool call (top-level
271
+ `sourceEventSeqs`, legacy callId fallback) and requiring the call to follow the latest compaction **and**
272
+ runtime-context snapshot, with the default/standing view and a non-error, later result; fixture tests cover
273
+ every rejection path.
274
+ - Tighten `engines.dsh` to the same five exact verified versions as the peer ranges, and document that future
275
+ `0.2.x` releases are not covered until the compatibility matrix is extended after verification.
276
+ - Normalize reviewed draft text with `inspectUserText` before the bootstrap planner's incremental byte accounting
277
+ so CRLF/NFD candidates stay on the O(1) path; add 2,000-4,000 candidate CRLF/NFD coverage.
278
+ - Mark a purge-detached successor as a derived staged row (`unstageTarget: null`) so the pane never offers an
279
+ Unstage action that cannot remove any staged operation.
280
+ - Keep mutable release-state wording out of the immutable tarball docs; repository/CI/tag prerequisites, the
281
+ no-provisional-tag rule, and the required docs refresh before the final tag live only in `docs/releasing.md`.
282
+ - Separate connection readiness from business-data dedupe: a retry/reattach that delivers the identical revision
283
+ now recovers `ready` and clears the first-frame watchdog, while an identical revision on an already-ready pane
284
+ stays deduped; a snapshot stream that ends or fails is terminal, so Retry recreates the Remote watch instead of
285
+ restarting an aborted lifetime (before or after the first snapshot).
286
+ - Freeze the editor's revision baseline at open time so an unrelated remote commit cannot silently retarget an
287
+ objective/item edit; only an explicit rebase advances the baseline, and later staging never advances a frozen
288
+ batch baseline.
289
+ - Compute byte budgets, unchanged checks, reasons, candidate limits, and generated op text from
290
+ `inspectUserText(...).value`, so CRLF/NFD input cannot bypass or waste the limit; normalization-only edits count
291
+ as unchanged.
292
+ - Allocate the next staged order from the committed max plus the max effective order among current staged
293
+ add/propose/supersede/order-edit ops, so add/unstage/add never reuses an order, and derive `Unstage` from the
294
+ real op-target rules so a purge-detached successor keeps its own removable operations.
295
+ - Keep the quadratic bootstrap-planner fallback only for an actual estimator/render mismatch: an already
296
+ over-budget base prompt returns the all-pending plan without per-candidate re-rendering, and `usedExactFallback`
297
+ / `exactRenders` expose the diagnostic.
298
+ - Make the compaction checker a pure event-array evaluator that only accepts a complete start+summary+no-error-end
299
+ lifecycle, requires the charter commit before the compaction start, associates the checkpoint by `compactionId`
300
+ for leak warnings, treats post-compaction execution without a runtime snapshot as FAIL, and pairs legacy
301
+ duplicate call ids by turn/step plus event order.
302
+ - Narrow the stored-record preservation guarantee honestly: it covers an inner schema/consistency-invalid record;
303
+ an unreadable outer JSON document is treated as absent by the JSON storage backend and remains a documented
304
+ residual risk (no plugin-side read-error API, no path-specific workaround). The user guide, design acceptance
305
+ clause, verification record, and release checklist now split the two cases and give the outer-unreadable
306
+ recovery (stop the Host, restore the file from a backup).
307
+ - Advance the connection epoch on a terminal snapshot-stream failure before publishing the error, so in-flight
308
+ draft requests are invalidated while staged ops and the mutation id survive; a late Apply success can no longer
309
+ be accepted and Retry reuses the mutation id.
310
+ - Refuse Rebase while an editor or a reviewed history draft owns another baseline: the Pane hides its Rebase
311
+ action through the same `rebaseAvailable` predicate and the store refuses the call, so an explicit conflict
312
+ entry cannot silently retarget the reviewed revision.
313
+ - Capture `bootstrapBaseRevision` when a history draft is accepted; Apply sends that revision and admission
314
+ requires the live view to still match it with an empty charter, otherwise the draft becomes stale and must be
315
+ re-extracted rather than silently applied to a newer revision.
316
+ - Preflight every staged edit batch through one shared `draftAdmission` (maxOps, projected maxItems, projected
317
+ maxPendingItems with the Host stepwise rule, and prompt-budget growth/shrink): the Pane Apply button and
318
+ `applyDraft` agree, and an inadmissible batch never reaches the Remote.
319
+ - Render the single sorted projected list for working rows instead of active-then-pending groups, so a pending
320
+ order-1 row stays above an active order-2 row and accepting it does not reorder the list.
321
+ - Treat the first lifecycle fingerprint reported after an older Host as a lifecycle transition only for an empty
322
+ draft; dirty work is reset (section preserved) instead of being claimed into the new lifecycle.
323
+ - Tighten the compaction checker: strict seq-ordered start→summary→end attempt state machine (no out-of-order or
324
+ duplicate-id PASS), modern `charter_read` producing-call authentication (source seqs must identify exactly one
325
+ earlier charter_read call matching toolCallId/turn/step), strict argument parsing (only missing/plain
326
+ object/`standing`), WAIT exit 3 when no post-compaction activity exists (FAIL only for execution without a
327
+ runtime snapshot), checkpoint association only by compactionId with an id-less-only fallback, and a transcript
328
+ parser that rejects middle corruption with its line number instead of skipping lines.
329
+ - Replay a retryable unknown-outcome edit request verbatim (same mutationId/baseRevision/ops) before any current
330
+ admission or limit check, so a committed-but-lost batch is never dropped or duplicated; Rebase is blocked while
331
+ an attempt is unresolved and becomes available again after a deterministic replay conflict clears it.
332
+ - Make bootstrap lifecycle handling atomic: the Pane binds the lifecycle before starting extraction, a first real
333
+ lifecycle fingerprint invalidates an extraction started under the unknown lifecycle and re-extracts, switching
334
+ lifecycles discards the previous result and accepts only the new one, and a reviewed draft that becomes stale is
335
+ cleaned up through one path (objective/items/base/attempt/generation cleared, `isEmpty` true).
336
+ - Preflight bootstrap drafts in the store before any Remote call (shared admission + draft text validation), and
337
+ extend admission with the Host's objective/item field budgets (unchanged or strict shrink admitted while over
338
+ limit; new, grown, or equal-byte-different values rejected).
339
+ - Checker follow-ups: distinguish an absent `sourceEventSeqs` from a present-but-malformed one (no legacy
340
+ fallback), account for later landed failed/open compaction attempts (FAIL when a failed attempt landed a
341
+ checkpoint, WAIT while an attempt is still open), keep no-activity WAIT free of false evidence failures, and
342
+ render OPEN compaction attempts in the CLI instead of formatting a missing end time.
343
+ - Add an exact-artifact `smoke:package` mode (`--artifact <tgz> --sha256 <sums>`) that validates the supplied
344
+ archive's SHA-256 and runs the full consumer checks on those exact bytes without building or packing, and parse
345
+ the full `npm pack --json` output (object, keyed object, or one-element array) instead of slicing from the first
346
+ brace.
347
+ - Lock all draft edits while an unknown-outcome Apply is unresolved through one shared `editReplayPending`
348
+ predicate: the Pane shows an enabled **Retry last Apply** that ignores revision conflict/fresh admission and
349
+ replays the exact stored request (same mutationId/baseRevision/ops), while stage/unstage/add/editor/discard are
350
+ no-ops and Rebase stays blocked until a deterministic reply clears the attempt.
351
+ - Give bootstrap Apply the analogous unknown-outcome handling: replay the retained request before stale/text/plan/
352
+ limit checks, lock candidate/objective/selection edits, derive success feedback counts from the retained request,
353
+ keep the reviewed payload visible while a stream change arrives during an in-flight RPC (needs-stale marker
354
+ instead of a half-dismiss), and make explicit Dismiss the single full cleanup.
355
+ - Harden the exact-artifact smoke against malicious/inconsistent tarballs: reject absolute/traversal paths,
356
+ links/special members, duplicate members and anything outside `package/`, read the packed `package.json` from the
357
+ archive and validate its identity/files/exports/dependencies/peers/engines against the working tree, then install
358
+ only that verified tree.
359
+ - Tighten the compaction checker's release-blocking edges: inspect ALL attempts after the successful evidence (a
360
+ landed-failed attempt behind a newer unlanded one still FAILs; same-id retry checkpoints associate by attempt seq
361
+ interval), require the modern `charter_read` call's toolCallId/turn/step to be present and exactly equal, validate
362
+ transcript event envelopes (shape/type/seq/time/data/strict ordering) with line-numbered corruption, and make
363
+ WAIT states internally consistent (`verification.evaluated=false`, empty failures, no FAIL verdict lines; only
364
+ evaluated active evidence can FAIL).
365
+ - Correct the release documentation: CI runs `npm run check` plus the normal `npm run smoke:package`, while the
366
+ exact-artifact check is the local release gate after building the final tarball and before tag/push/publish; a
367
+ separate release workflow would be needed to run it in CI.
368
+ - Unify the unknown-outcome attempt lifecycle for edit and bootstrap with one persisted
369
+ `{request, sourceGeneration, status: in-flight|unknown}` state: transport failures and every UNAVAILABLE
370
+ (including source-not-attached/remote unavailable) become unknown without clearing mutationId/baseRevision/ops,
371
+ all request-changing actions and ordinary discard/dismiss are locked, Retry always resends the exact retained
372
+ request before conflict/admission checks, and a separate confirmed **Abandon unknown request** action is the only
373
+ way to clear the attempt; stream frames during an in-flight/unknown bootstrap Apply only mark needs-stale and keep
374
+ the replayable payload visible. Tests drive the real controller/store paths (lost M1 + detached source +
375
+ UNAVAILABLE → exact replay applies once; bootstrap stream-first + transport error → visible replayable draft).
376
+ - Replace the package-smoke `tar -v` text parsing with a structured Node ustar/PAX reader (node:zlib + 512-byte
377
+ header parsing, checksum verification, GNU longname/longlink and PAX paths; regular files/directories only;
378
+ rejects links/special/absolute/traversal/backslash/outside-package/duplicate/truncated/bad-checksum members), read
379
+ `package/package.json` from the parsed archive before installing, and cover it with JS-built GNU/BSD/PAX fixture
380
+ archives — Ubuntu GNU tar/`LC_ALL` differences no longer affect parsing, and both normal and exact-artifact smoke
381
+ pass on the real final tarball.
382
+ - Centralize unknown-outcome classification for edit and bootstrap replay: every UNAVAILABLE result (including a
383
+ detached source or an `ok:false` UNAVAILABLE reply) and every transport throw become `unknown`; the
384
+ attempt-clearing audit guarantees generation/lifecycle/source changes preserve the exact mutationId/base/ops and
385
+ that views can no longer drop a replayable attempt. The Pane now has one `syncView` effect backed by one store
386
+ method (bind lifecycle → ensure bootstrap → reconcile reviewed draft atomically), so a bootstrap Apply in flight
387
+ or replay-pending can never end invisible; `ensureBootstrap` only starts extraction and all dismissal/cleanup is
388
+ owned by the atomic reconcile path (Retry/Abandon stay visible; ordinary dismiss stays locked while unknown).
389
+ - Release prerequisites/known limitations documented accurately: public repo + remote, restored metadata, verified
390
+ private security reporting, public Node 22.19/24 CI (check + normal smoke only), one final tarball build,
391
+ exact-artifact smoke + SHA + fresh-profile UI check on that same file, final annotated tag, then GitHub Release
392
+ and `npm publish --tag next` reusing that tarball; accepted non-blocking limitations are disclosed in
393
+ verification §9.