@sema-agent/core 7.56.0 → 7.58.0
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/CHANGELOG.md +926 -0
- package/LICENSE +1 -1
- package/dist/agents/org-delivery-gate.js +3 -4
- package/dist/agents/peer-held-queue.d.ts +69 -49
- package/dist/agents/peer-held-queue.js +255 -106
- package/dist/agents/peer-session-drain.js +63 -43
- package/dist/agents/send-message-tool.js +3 -2
- package/dist/agents/subagent-steps.js +2 -4
- package/dist/agents/subagent.js +8 -8
- package/dist/brain/anthropic.js +16 -8
- package/dist/brain/open-responses.js +10 -8
- package/dist/brain/openai.js +11 -9
- package/dist/brain/provider-dialect.d.ts +3 -2
- package/dist/brain/provider-dialect.js +2 -2
- package/dist/brain/request-params.d.ts +6 -0
- package/dist/brain/request-params.js +14 -1
- package/dist/brain/route-adjudicator.js +2 -1
- package/dist/brain/stream-engine.d.ts +9 -0
- package/dist/brain/stream-engine.js +24 -10
- package/dist/brain/stream-shared.d.ts +5 -4
- package/dist/brain/stream-shared.js +4 -4
- package/dist/core/a2a.d.ts +2 -1
- package/dist/core/a2a.js +23 -10
- package/dist/core/allow-entry.d.ts +5 -11
- package/dist/core/allow-entry.js +19 -26
- package/dist/core/approval-object.d.ts +21 -5
- package/dist/core/approval-object.js +44 -17
- package/dist/core/ask-origin.d.ts +23 -4
- package/dist/core/ask-origin.js +5 -1
- package/dist/core/auto-compaction.d.ts +75 -6
- package/dist/core/auto-compaction.js +43 -27
- package/dist/core/auto-mode-directive.d.ts +29 -5
- package/dist/core/auto-mode-directive.js +38 -8
- package/dist/core/background-agent-store.d.ts +6 -2
- package/dist/core/background-agent-store.js +1 -1
- package/dist/core/checkpoint-requirements.d.ts +13 -1
- package/dist/core/checkpoint-requirements.js +4 -0
- package/dist/core/checkpoint-store.d.ts +44 -40
- package/dist/core/checkpoint-store.js +32 -14
- package/dist/core/cross-boundary-taint.js +4 -2
- package/dist/core/engine-notice.d.ts +4 -3
- package/dist/core/engine-notice.js +6 -0
- package/dist/core/file-history-store.d.ts +14 -8
- package/dist/core/file-history-store.js +14 -4
- package/dist/core/fs-write-gate-policy.d.ts +4 -2
- package/dist/core/fs-write-gate-policy.js +7 -3
- package/dist/core/gate-fold.js +6 -3
- package/dist/core/gate-lanes.js +13 -5
- package/dist/core/git-worktree-env.d.ts +53 -11
- package/dist/core/git-worktree-env.js +96 -12
- package/dist/core/hooks.d.ts +6 -3
- package/dist/core/hooks.js +12 -5
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/locked-config.d.ts +15 -1
- package/dist/core/locked-config.js +38 -2
- package/dist/core/mailbox-store.d.ts +62 -1
- package/dist/core/mailbox-store.js +59 -0
- package/dist/core/mcp-call-meta.d.ts +66 -0
- package/dist/core/mcp-call-meta.js +103 -0
- package/dist/core/mcp-connection-pool.d.ts +3 -1
- package/dist/core/mcp-connection-pool.js +3 -1
- package/dist/core/mcp-failure.d.ts +7 -1
- package/dist/core/mcp-failure.js +10 -0
- package/dist/core/mcp-name-judge.d.ts +46 -0
- package/dist/core/mcp-name-judge.js +61 -0
- package/dist/core/mcp-probe.d.ts +5 -1
- package/dist/core/mcp-probe.js +3 -6
- package/dist/core/mcp-server-link.d.ts +5 -2
- package/dist/core/mcp-server-spec.d.ts +46 -18
- package/dist/core/mcp-server-spec.js +1 -18
- package/dist/core/mcp.d.ts +6 -14
- package/dist/core/mcp.js +85 -65
- package/dist/core/memory-engine/consolidation-driver.js +4 -3
- package/dist/core/memory-engine/distiller.js +26 -17
- package/dist/core/memory-engine/layout.js +5 -2
- package/dist/core/memory-engine/scope-contract.d.ts +45 -4
- package/dist/core/memory-engine/scope-contract.js +80 -11
- package/dist/core/mode-policy.d.ts +8 -5
- package/dist/core/mode-policy.js +5 -4
- package/dist/core/mods/host.js +1 -1
- package/dist/core/mods/kernel/dispatch.d.ts +3 -0
- package/dist/core/mods/kernel/dispatch.js +10 -8
- package/dist/core/mods/kernel/events.d.ts +5 -1
- package/dist/core/mods/kernel/events.js +1 -1
- package/dist/core/mods/kernel/registration.d.ts +5 -1
- package/dist/core/mods/kernel/site-rules.d.ts +3 -0
- package/dist/core/mods/kernel/site-rules.js +10 -0
- package/dist/core/mods/package.d.ts +23 -0
- package/dist/core/mods/package.js +118 -0
- package/dist/core/mods/stations.d.ts +2 -2
- package/dist/core/mods/stations.js +1 -1
- package/dist/core/mods/tool-call.d.ts +5 -1
- package/dist/core/mods/tool-call.js +12 -3
- package/dist/core/park-selfcheck.js +2 -0
- package/dist/core/path-guard-rows.d.ts +20 -0
- package/dist/core/path-guard-rows.js +11 -0
- package/dist/core/peer-seat.d.ts +186 -0
- package/dist/core/peer-seat.js +307 -0
- package/dist/core/permission-rule-consent.d.ts +5 -3
- package/dist/core/permission-rule-consent.js +20 -15
- package/dist/core/permission-rule-model.d.ts +43 -2
- package/dist/core/permission-rule-model.js +52 -8
- package/dist/core/permission-rule-org.js +1 -1
- package/dist/core/present-plan-tool.d.ts +10 -1
- package/dist/core/present-plan-tool.js +46 -2
- package/dist/core/protocol-http-auth.d.ts +56 -31
- package/dist/core/protocol-http-auth.js +71 -42
- package/dist/core/protocol-naming.d.ts +20 -0
- package/dist/core/protocol-naming.js +20 -3
- package/dist/core/read-only-shell.d.ts +20 -5
- package/dist/core/read-only-shell.js +29 -14
- package/dist/core/redaction-marks.d.ts +16 -0
- package/dist/core/redaction-marks.js +16 -0
- package/dist/core/redaction-passes.js +8 -9
- package/dist/core/remote-env.d.ts +37 -1
- package/dist/core/remote-env.js +11 -0
- package/dist/core/resume-startup-cause.d.ts +24 -2
- package/dist/core/resume-startup-cause.js +20 -1
- package/dist/core/retention.d.ts +41 -15
- package/dist/core/retention.js +59 -12
- package/dist/core/rewrite-rejudge.d.ts +37 -0
- package/dist/core/rewrite-rejudge.js +40 -0
- package/dist/core/roles.js +50 -7
- package/dist/core/run-origin.d.ts +40 -0
- package/dist/core/run-origin.js +37 -0
- package/dist/core/runner/advertised-writable-dirs.d.ts +57 -38
- package/dist/core/runner/advertised-writable-dirs.js +126 -0
- package/dist/core/runner/compact-session.d.ts +10 -0
- package/dist/core/runner/compact-session.js +202 -0
- package/dist/core/runner/compaction-call-options.d.ts +2 -2
- package/dist/core/runner/compaction-restate.d.ts +15 -6
- package/dist/core/runner/compaction-restate.js +28 -2
- package/dist/core/runner/compaction-seams.d.ts +21 -1
- package/dist/core/runner/compaction-seams.js +11 -8
- package/dist/core/runner/contracts.d.ts +36 -21
- package/dist/core/runner/derived-route-fallback.d.ts +13 -0
- package/dist/core/runner/derived-route-fallback.js +6 -0
- package/dist/core/runner/env-capability-census.d.ts +3 -2
- package/dist/core/runner/env-capability-census.js +9 -3
- package/dist/core/runner/gate-exit.d.ts +18 -4
- package/dist/core/runner/gate-exit.js +5 -1
- package/dist/core/runner/permission-rule-lanes.d.ts +7 -7
- package/dist/core/runner/permission-rule-lanes.js +17 -11
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +3 -0
- package/dist/core/runner/prepare-acquire-reconcile.js +2 -1
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +2 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +1 -1
- package/dist/core/runner/prepare-config-doors.d.ts +14 -5
- package/dist/core/runner/prepare-config-doors.js +16 -13
- package/dist/core/runner/prepare-delegation-surface.d.ts +4 -0
- package/dist/core/runner/prepare-delegation-surface.js +15 -18
- package/dist/core/runner/prepare-gate-stations.js +1 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +10 -4
- package/dist/core/runner/prepare-hands-readface.js +6 -1
- package/dist/core/runner/prepare-memory.d.ts +3 -0
- package/dist/core/runner/prepare-memory.js +19 -23
- package/dist/core/runner/prepare-park-ask.d.ts +2 -0
- package/dist/core/runner/prepare-park-ask.js +2 -2
- package/dist/core/runner/prepare-policy-chain.d.ts +4 -4
- package/dist/core/runner/prepare-policy-chain.js +4 -6
- package/dist/core/runner/prepare-protocol-tools.d.ts +4 -2
- package/dist/core/runner/prepare-protocol-tools.js +3 -3
- package/dist/core/runner/prepare-suspend-saga.d.ts +2 -0
- package/dist/core/runner/prepare-suspend-saga.js +2 -1
- package/dist/core/runner/prepare-task.d.ts +4 -1
- package/dist/core/runner/prepare-task.js +46 -37
- package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +13 -0
- package/dist/core/runner/prepare-tool-disclosure-mount.js +13 -7
- package/dist/core/runner/prepare-wiring-manifest.d.ts +1 -0
- package/dist/core/runner/prepare-wiring-manifest.js +2 -2
- package/dist/core/runner/prepare-workspace-restore.d.ts +3 -0
- package/dist/core/runner/prepare-workspace-restore.js +4 -4
- package/dist/core/runner/resume-admission.js +1 -1
- package/dist/core/runner/resume-checkpoint-screen.js +2 -0
- package/dist/core/runner/rewind-files.d.ts +2 -5
- package/dist/core/runner/rewind-files.js +9 -51
- package/dist/core/runner/run-harness-handlers.d.ts +3 -4
- package/dist/core/runner/run-harness-handlers.js +1 -8
- package/dist/core/runner/run-identity-wiring.js +1 -0
- package/dist/core/runner/run-leg.js +15 -22
- package/dist/core/runner/run-notification-lane.d.ts +2 -0
- package/dist/core/runner/run-notification-lane.js +5 -2
- package/dist/core/runner/run-recovery-lanes.js +3 -4
- package/dist/core/runner/run-settle-and-teardown.js +5 -11
- package/dist/core/runner/run-terminal-adoption.js +3 -4
- package/dist/core/runner/run-turn-boundary.js +3 -5
- package/dist/core/runner/runtask.d.ts +8 -1
- package/dist/core/runner/runtask.js +28 -34
- package/dist/core/runner/send-message-continuation.js +1 -1
- package/dist/core/runner/session-verb-doors.d.ts +28 -0
- package/dist/core/runner/session-verb-doors.js +48 -0
- package/dist/core/runner/session-write-ledger.d.ts +30 -0
- package/dist/core/runner/session-write-ledger.js +101 -0
- package/dist/core/runner/stream-settle-backstop.js +11 -14
- package/dist/core/runner/sub-agent-deny-lists.d.ts +25 -3
- package/dist/core/runner/sub-agent-deny-lists.js +21 -10
- package/dist/core/runner/teardown-bounded.d.ts +1 -0
- package/dist/core/runner/teardown-bounded.js +1 -0
- package/dist/core/runner/terminal-account.js +3 -3
- package/dist/core/runner/tool-end-body.js +1 -0
- package/dist/core/runner/tool-occurrence.d.ts +4 -1
- package/dist/core/runner/tool-occurrence.js +2 -1
- package/dist/core/runner/write-protection-station.d.ts +8 -2
- package/dist/core/runner/write-protection-station.js +2 -0
- package/dist/core/runner-deps.d.ts +4 -4
- package/dist/core/secret-env.d.ts +4 -0
- package/dist/core/secret-env.js +3 -0
- package/dist/core/sensitive-path-policy.js +6 -7
- package/dist/core/session-log-transfer.d.ts +24 -0
- package/dist/core/session-log-transfer.js +166 -0
- package/dist/core/session-policy-store.d.ts +7 -2
- package/dist/core/session-policy-store.js +1 -1
- package/dist/core/session-store.d.ts +84 -19
- package/dist/core/session-store.js +162 -24
- package/dist/core/session.d.ts +92 -1
- package/dist/core/shell-read-silence.js +1 -0
- package/dist/core/shell-wrapper-projection.d.ts +1 -1
- package/dist/core/steer-replay.d.ts +4 -2
- package/dist/core/steer-replay.js +2 -1
- package/dist/core/store-contracts/background-agent-store-contract.js +1 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +19 -1
- package/dist/core/store-contracts/file-history-store-contract.js +9 -0
- package/dist/core/store-contracts/mailbox-store-contract.js +49 -1
- package/dist/core/store-contracts/session-repo-contract.js +112 -5
- package/dist/core/store-contracts/session-store-contract.d.ts +4 -1
- package/dist/core/store-contracts/session-store-contract.js +236 -2
- package/dist/core/task-event.d.ts +68 -8
- package/dist/core/task-registry-agent.d.ts +8 -4
- package/dist/core/task-registry-agent.js +14 -8
- package/dist/core/task-registry-shared.d.ts +36 -6
- package/dist/core/task-registry-shared.js +11 -0
- package/dist/core/task-registry.d.ts +1 -1
- package/dist/core/task-registry.js +1 -1
- package/dist/core/task-spec.d.ts +37 -0
- package/dist/core/task-stream.d.ts +2 -1
- package/dist/core/terminal-cause.d.ts +1 -1
- package/dist/core/tool-catalog-entries.d.ts +6 -0
- package/dist/core/tool-catalog-entries.js +2 -0
- package/dist/core/tool-name-aliases.d.ts +32 -2
- package/dist/core/tool-name-aliases.js +23 -0
- package/dist/core/tool-name-readings.d.ts +4 -0
- package/dist/core/tool-name-readings.js +1 -0
- package/dist/core/tool-policy.d.ts +10 -6
- package/dist/core/tool-policy.js +4 -7
- package/dist/core/tool-result-store.d.ts +17 -10
- package/dist/core/tool-result-store.js +3 -1
- package/dist/core/trace.d.ts +4 -1
- package/dist/core/trace.js +2 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/untrusted-egress.d.ts +18 -0
- package/dist/core/untrusted-egress.js +82 -12
- package/dist/core/wiring-manifest.d.ts +12 -3
- package/dist/core/wiring-manifest.js +4 -3
- package/dist/core/workspace-snapshot.d.ts +44 -0
- package/dist/core/workspace-snapshot.js +34 -0
- package/dist/core/write-protect.d.ts +43 -3
- package/dist/core/write-protect.js +43 -16
- package/dist/engine/execution-env/node-execution-env.js +15 -11
- package/dist/engine/execution-env/symlink-chain.d.ts +7 -5
- package/dist/engine/harness/agent-harness.d.ts +12 -5
- package/dist/engine/harness/agent-harness.js +13 -2
- package/dist/engine/harness/types.d.ts +48 -7
- package/dist/engine/harness/types.js +5 -1
- package/dist/engine/llm/types.d.ts +12 -3
- package/dist/engine/llm/types.js +1 -1
- package/dist/engine/loop/agent-loop.d.ts +1 -4
- package/dist/engine/loop/agent-loop.js +26 -4
- package/dist/engine/session/import-validate.js +3 -0
- package/dist/engine/session/memory-repo.d.ts +17 -9
- package/dist/engine/session/memory-repo.js +44 -34
- package/dist/engine/session/repo-utils.d.ts +22 -4
- package/dist/engine/session/repo-utils.js +49 -1
- package/dist/engine/session/storage-base.d.ts +10 -1
- package/dist/engine/session/storage-base.js +7 -1
- package/dist/index.d.ts +23 -11
- package/dist/index.js +15 -6
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/internal/harness.d.ts +4 -3
- package/dist/internal/harness.js +3 -2
- package/dist/stores/file/checkpoint-store.d.ts +0 -4
- package/dist/stores/file/checkpoint-store.js +0 -1
- package/dist/stores/file/file-history-store.js +12 -4
- package/dist/stores/file/index.d.ts +4 -1
- package/dist/stores/file/index.js +4 -1
- package/dist/stores/file/mailbox-store.d.ts +2 -1
- package/dist/stores/file/mailbox-store.js +26 -1
- package/dist/stores/file/session-store.d.ts +15 -8
- package/dist/stores/file/session-store.js +28 -13
- package/dist/tools/fs/bash-readonly-classifier.d.ts +15 -19
- package/dist/tools/fs/bash-readonly-classifier.js +5 -10
- package/dist/tools/fs/fs-bash.js +10 -3
- package/dist/tools/fs/fs-write.d.ts +6 -3
- package/dist/tools/fs/fs-write.js +8 -7
- package/dist/tools/fs/index.d.ts +3 -0
- package/dist/tools/fs/index.js +1 -1
- package/dist/tools/fs/pattern-kill-guard.d.ts +3 -2
- package/dist/tools/fs/pattern-kill-guard.js +68 -36
- package/dist/tools/fs/safety.js +40 -8
- package/dist/tools/fs/search.js +6 -24
- package/dist/tools/fs/shell-read-check.d.ts +18 -1
- package/dist/tools/fs/shell-read-check.js +66 -16
- package/dist/tools/fs/shell-read-establish.js +2 -1
- package/dist/tools/fs/shell-read-identity.d.ts +12 -9
- package/dist/tools/fs/shell-read-identity.js +10 -5
- package/dist/tools/fs/shell-read-judge.d.ts +10 -1
- package/dist/tools/web.js +9 -7
- package/dist/tools/worktree.d.ts +42 -15
- package/dist/tools/worktree.js +60 -32
- package/package.json +4 -2
- package/test/export-surface.snapshot.json +141 -3
- package/wire-changes/core-stores-sql@7.57.0.json +29 -0
- package/wire-changes/core-stores-sql@7.58.0.json +29 -0
- package/wire-changes/core@7.57.0.json +1487 -0
- package/wire-changes/core@7.58.0.json +2188 -0
- package/wire-changes/mods-kernel@7.57.0.json +29 -0
- package/wire-changes/mods-kernel@7.58.0.json +81 -0
- package/wire-changes/primitives@7.57.0.json +245 -0
- package/wire-changes/primitives@7.58.0.json +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,929 @@
|
|
|
1
|
+
## 7.58.0 — 2026-10-26
|
|
2
|
+
|
|
3
|
+
### The release re-window refuses the rows it cannot decide and keeps each row's first promised window — `scripts/release/rewindow.mjs` (#2835; release tooling only, `src/` untouched; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
|
|
4
|
+
|
|
5
|
+
- **Before.** At the R, `rewindow` moved every non-landed row windowed at the cut version: a P0 / P1 row, a row with no readable P level, a DESIGN-DONE row and a BLOCKED row went to the next version window with no car coordinate asked for, and `首次承诺窗` was read only from an explicit field and otherwise written as the version being cut — a row whose window history named 7.55.0 lost it. No re-window count was written.
|
|
6
|
+
- **Now.** Refused (LEDGER-LAW v2 §2.5; exit 3 in a dry run as in `--apply`; nothing moves and nothing is written; every refused row is named with why and how to write it): a row with no readable P level · a BLOCKED row missing any of `on` / 负责人 / 承诺解阻 / 下次复核 / 阻塞方 (a BLOCKED row is judged by its level and those five fields alone, P0 / P1 included: complete ⇒ it moves with the version) · and, for a row that is not BLOCKED: a P0 / P1 row with no car coordinate · a DESIGN-DONE row with no car coordinate. A coordinate is what git resolves from the status head: a car branch (or its `merge <car>` commit), or a commit that changes something beyond the bookkeeping files (ledger, retirement lines, anchor-claims stock group); a bookkeeping commit sha, a planned car with no branch and a session number are not. Every row the tool still moves (pending layer and next window alike) carries `首次承诺窗 <earliest window its history names>` and `改窗 <n + 1>` in its status head, the status word and the `原 …` tail kept: the first window is the earliest window the row names — a `首次承诺窗` field, the window cell's `原 x.y.z` / `原窗 x.y.z` / nested chain, an old re-window note (`a → b`, also `a → 待排`) — never defaulted to the cut, and a field is copied whenever the history agrees with it; the count is the largest explicit `改窗 n`, else the moves to a later window the two cells show (once per time it happened, a move told in both cells once, an advance not at all); going into the pending layer and back out copies both and only raises the count. Only the status head is read for the row's own car, sha and BLOCKED fields — a past status after `原 BLOCKED(` / `原 DESIGN-DONE(` / … is history. `--next` must be later than the cut.
|
|
7
|
+
- **Readings.** `rewindow 7.58.0 --dry-run` on main's ledger (4d71bbcfd) with the release head `origin/stage-7580` (d64bb24b1): the base tool moved 109 rows and refused none; this one moves 87 (34 into the pending layer, 53 to 7.59.0), refuses 22 (14 with no P level: #2357 #2361 #2378 #2392 #2404 #2405 #2411 #2413 #2426 #2427 #2428 #2429 #2698 #2699; P1 with no coordinate: #454 #1928; DESIGN-DONE with no coordinate: #1557 #1928; BLOCKED missing fields: #1444 #1595 #2596 #2609 #2631) and leaves 30 at 7.58.0 (26 landed, 4 with a car in the release); 109 = 87 + 22. 50 of the 87 carry a first promised window earlier than 7.58.0. Over the R 7.57.0 input (665 rows): of the 623 rows that entered the pending layer, 123 had a first promised window earlier than 7.57.0 that the R wrote as 7.57.0 (89 → 7.56.0, 20 → 7.53.0, 13 → 7.55.0, 1 → 7.52.0) — with the final reader 124 (one more is found from an `→ 待排` note: 1 → 7.48.0) — and 102 more carried a `首次承诺窗` field later than their own history (e.g. #901: 7.46.0 over `7.43.0 未兑现 → 7.46.0`): 226 in all; the ledger still carries the written values until the rows are lifted. A snapshot: the stage is not complete, so cars not yet merged read as outside the release.
|
|
8
|
+
- **Who is hurt.** Nobody at runtime. The R operator: `r-commit` / `rewindow` exit 3 until each of the 22 rows above has its level, coordinate or fields (or is closed, or `--keep`ed).
|
|
9
|
+
- **Pins.** `test/release-rewindow-refuse.test.ts` (X1–X12: the four refusals with a control each, one cell per BLOCKED field and the fullwidth separator, what a coordinate is — also against real git: a ledger-only commit, a mixed commit, a merge read against its first parent —, exit 3 through the command line in both modes with the file untouched, the first window from the history / an explicit field / the status notes, the count, the pending round trip, the stamp forms, `--next`); Twenty-one mutations of the tool (each refusal off, a bookkeeping commit read as work, a merge read without its first-parent diff, the first window defaulted to the cut or a field put above the history, the count restarted or an advance counted or repeated postponements collapsed, a past status read as the head, a fullwidth separator taken as a value, the stamp not written, the pending path or `--next` unguarded …) are each red in at least one cell, and the base tool is red in all 17. `test/release-chain-bookkeeping.test.ts` W1 / W2 / W4 re-pinned and the W7 acceptance freezes the 226 rows above (124 written as the cut, 102 a field later than the history) and checks each new window is earlier than the one written and named in the row's own cells.
|
|
10
|
+
- **Known limits.** A branch that exists but carries no work of its own (cut from the stage and never committed to) reads as a coordinate, as does any resolvable `car-…` word in the head, including one that only mentions another car; a commit counts as work if it touches any file beyond the three bookkeeping ones; the five BLOCKED fields are checked for presence, not for the quality of their values. The 226 ledger rows above are not repaired by this change.
|
|
11
|
+
|
|
12
|
+
### The approval card's reason an extension's ask is not cleared by a matching allow entry is one station-neutral sentence — a `tool.check` ask no longer reads as a PreToolUse hook's (#2827; wording change on the card's disclosure clause, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core @test)
|
|
13
|
+
|
|
14
|
+
- **Before.** An ask stamped with the extension provenance (`decisionReason: "hook"`, ask class `hook`) is raised by two engine stations: a `classic.PreToolUse` handler answering `ask` (folded over the standing verdict by `foldHookAsk`, `src/core/tool-policy.ts`) and a `tool.check` handler answering `ask` (`readToolCheck` and `questionOf`, `src/core/tool-check-reading.ts`). The class's reason row, `SHADOW_REASON.hook`, said `a PreToolUse hook asks about this call — the deployment's own screening is answered by a person`, so the card for a call the `tool.check` station asked about named a PreToolUse hook in its closing clause while its message half already named the extension that asked (`asked by extension "<name>"`). A deployment policy's own ask that declares `decisionReason: "hook"` (a tighten-only input the class derivation reads) is the same class and read the same clause.
|
|
15
|
+
- **Now.** One row, one sentence for both stations: `an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person`. The card's clause and the exported `SHADOW_REASON.hook` are the same string. There is no row per station: the class is one class, and a sentence chosen by station would be two readings of it.
|
|
16
|
+
- **Not changed (stated).** The ask class set (`hook` stays the one class for both stations), the member phrase on the allow side (`a PreToolUse hook's allow` still names the member that matched, whichever station spoke the allow), `SHADOW_REASON` (still frozen, still exported from the root with the same keys).
|
|
17
|
+
- **Wording change (open to veto).** *What changed*: the closing clause of the card's disclosure for an ask of class `hook` has new words. *Who is hurt*: a host or test that matches the old clause by text. *Migration*: compare with the exported `SHADOW_REASON.hook`, never a copy of its text.
|
|
18
|
+
- **Consumers.** @cli @client-core: a host that renders the card's "why it cannot be cleared" half from `SHADOW_REASON` shows the new sentence with no change; one that snapshots the old clause by text re-pins to the exported row. @test black box: a `tool.check` ask beside a matching `allowedTools` entry ends its card `… does not clear the ask — an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person`; a PreToolUse ask ends the same.
|
|
19
|
+
- **Pins.** `test/backlog2827-shadow-reason-hook.test.ts` (a real Runner and a real `Bash` call: a PreToolUse ask, a `tool.check` ask over an allow, and a `tool.check` ask while another registration's PreToolUse allow is the only member that matched — each card's why-clause is the exported row, names both stations and is never the old one-station claim; a deployment policy's own ask declaring the hook provenance; the clauses are byte-identical; the table stays frozen with no row per station); re-pinned to the exported row: `test/backlog1516-probe-mandate-disclosure.test.ts`.
|
|
20
|
+
|
|
21
|
+
### BREAKING — a write-protection hit only the disk reaches is its own ask class, `write_protection_on_disk`, which the auto-mode classifier does not answer (#2795, ruled C-R923; behaviour narrowing + `AskClass` +1, open to veto; hard-breaking: yes)
|
|
22
|
+
|
|
23
|
+
- **Before.** A write whose path as written names no row of the write-protection table, but whose real target (a link onto `.claude/settings.json`) or link chain (a hop through `.ssh`) does, was the same ask as a write that spells the row: class `write_protection`, which the auto-mode classifier may answer — so in `auto` a model could steer a write through an innocent-looking link and have the classifier, which sees only the arguments, clear it.
|
|
24
|
+
- **Now.** One table hit has two readings, judged per written target: the path as written names the row ⇒ `write_protection` (unchanged: the classifier may answer it); only where the path resolves on disk does ⇒ `write_protection_on_disk`, whose row is `write_protection`'s but for the classifier column. The classifier station still reads one cell (the folded row); the reading is the class. A write tool's target reads the judge's `via` (the judge reads the spelling first and answers there on a hit, so `target` / `chain` means the spelling names no row); a shell command reads each written target — one occurrence at one seat, never one canonical identity — its text judged by the table's spelling view alone. Its text is the command's own: for a pattern, the pattern, not the names a listing produced; otherwise its spellings but the ones a reading of the filesystem added — `EstablishedRead.derivedSpellings` (new, optional) marks them: the home's view of a landed target (a home reached through a bind mount or a kept link respells the target through the home), and the name of a GNU sed `--follow-symlinks` backup when the operand's links supplied it. A command with a spelled target and a linked one carries both classes; the disclosed word is `write_protection_on_disk` (it sits just before `write_protection` in `ASK_CLASSES`).
|
|
25
|
+
- **Where the new class goes, by mode:** `auto` — to the approver (the classifier is not asked; no approver ⇒ the headless refusal); `bypassPermissions` — released, as `write_protection` is (`released.askClass: "write_protection_on_disk"`); `dontAsk` — refused; a declared sandbox may still admit it (the row's sandbox column is `write_protection`'s); no allow rule clears either.
|
|
26
|
+
- **Unchanged:** the ask sentence (the resolved form already carries the reach clause `matched where the path resolves on disk (its real target or a link on the way)`), the mandate word `write_protection` and its card reason (`SHADOW_REASON.write_protection_on_disk` is the same sentence), and every other class.
|
|
27
|
+
- **Hard-breaking, three sentences.** *What breaks*: `AskClass` gains `write_protection_on_disk` (`ASK_CLASSES`, `MODE_ARBITRATION`, `SHADOW_REASON` one row each; `ShellReadVerdict` one optional mark `writeProtectedOnDisk`; `AskClassFacts.mandateMarks` one optional `writeProtectedOnDisk`; `EstablishedRead` one optional `derivedSpellings`; the station's `writeTargetJudge` seat one optional input `spellingOnly`), and a write that reaches the table only on disk carries it instead of `write_protection` on `tool_end.gate.disposition`, the approval request and the park row — and the auto-mode classifier no longer answers it. *Who is hurt*: a consumer exhaustive over `AskClass` (a `Record<AskClass, …>` table fails to compile once); a host that recognises a write-protection question by `askClass === "write_protection"` misses this one (read the mandate word, which names both); an `auto` deployment whose classifier used to clear a write through a link onto a guarded path now puts it to its approver. *Compensation*: the row differs from `write_protection`'s in one column; the mandate word, the card reason and the sentence are unchanged; consumers are named below.
|
|
28
|
+
- **Not changed, stated.** A park row a 7.58.0 engine writes with the new word is screened out by an older engine's class screen (the word is outside its closed set) — the pair is dropped, not misread. Where the reference has no counterpart: a deployment's configuration root given as a link and a write spelled under the root's real directory is the disk's reading here (the declared root's spelling does not name it) — a stricter reading.
|
|
29
|
+
- **Consumers.** @server: `src/run-local.ts` `NO_TTY_ASK_CLASS_ROW` (`Record<AskClass, …>`) needs one row (the remedy `write_protection` has fits: terminal only, no budget release). @client-core: the generated class table and arbitration mirror regenerate; an older package reads the word as outside its table. @cli: please check for a table over `AskClass` (none was seen in the tree last read); a fixture that maps the mandate word to a class keeps working (the mandate word is unchanged). @test: black-box — in `auto`, a Write whose path is a link onto `.claude/settings.json` reaches the approver without the classifier being asked, while a Write spelling `.claude/settings.json` is still answered by the classifier; `echo a > .vscode/settings.json; echo b > link.json` carries both classes.
|
|
30
|
+
- **Pins.** `test/backlog2795-on-disk-hit-to-person.test.ts` (real lane, `auto`: W1 spelled ⇒ classifier; W2 link onto the row / W3 chain through `.ssh` ⇒ approver, no classifier; W4 a data-root sub-path naming `.ssh` stays the spelling's; W5 no approver ⇒ refused; S1 `echo x > link`; S2 `rm .bashrc` (entry seat) the spelling's; S3 `rm notes/x` with `notes` → `.ssh` the disk's; S4 two targets ⇒ both classes; H1 a home reached through a bind mount / H2 a followed sed backup ⇒ the disk's reading, H3 the same sed spelled directly ⇒ the spelling's; T1–T5 the row, the order, the words, bypass / dontAsk, the retired `write_protection_unresolved` stays retired). Re-pinned: the releasable-class lists (`backlog1111`, `backlog1214`, `backlog1423`), the class ratchet (`backlog1731` A6), the linked configuration root (`backlog1419` P7a). `test/live-write-protect-ask.test.ts` ① keeps the spelling form only (the resolved form no longer reaches the classifier).
|
|
31
|
+
|
|
32
|
+
### `@sema-agent/core` depends on `@sema-agent/primitives` and reads it by name — a project that installs both holds one copy of the credential reference, and the root's tarball no longer carries `dist/primitives/` (#2749, ruled C-R910; install-shape change, open to veto; no behaviour change; hard-breaking: none; closed sets: none; exports: none — the six root values and six root types keep their names and kinds, now re-exported from the package) (@server @web-admin @settings-schema @cli @client-core @connectors @dgx)
|
|
33
|
+
|
|
34
|
+
- **Before.** The root compiled `src/primitives/` into its own `dist/` and re-exported that copy; it did not depend on the package. Installed side by side (both tarballs packed from one tree, installed into an empty project), `core.readCredentialRef !== primitives.readCredentialRef`, and the same for `CREDENTIAL_REF_KINDS`, `CREDENTIAL_REF_TRUST` and `CREDENTIAL_REF_PROBLEM_REASONS` — two module instances, as the 7.57.0 notes disclosed.
|
|
35
|
+
- **Now.** The root's `dependencies` name `@sema-agent/primitives` at the root's own version, exactly. `src/index.ts`, `src/core/peer-seat.ts` and `src/core/mcp-server-spec.ts` import the package by name; the root build excludes `src/primitives/` and compiles against the package's built declarations, so `npm run build` builds the package first (`scripts/build-root-deps.mjs`). The root's tarball goes from 1555 to 1551 entries (the four `dist/primitives/*` files). Installed side by side, all six values are the package's own (`===`), and npm keeps one copy. The package's declarations now carry their documentation (its build runs the second, comment-keeping declaration pass the root runs).
|
|
36
|
+
- **One law, both directions.** A package of the release names another only at the release version: a package's core peer (as before) and the root's dependency on a package (new). `gate:packages` checks the root's side — exact version, published, has source, does not take core (a cycle) — and the bump moves that cell (`scripts/bump-version.mjs`). The publish order is the manifests' dependency order (`scripts/release/lib.mjs` `publishSet`, whose code is unchanged; with the new dependency it reads `mods-kernel → primitives → core → core-stores-sql`, where it read core first); nothing else states it. Before the publish, the stranger installs (`gate:blackbox`, and `gate:packages:pack` for a package that takes core) install the root's tarball together with the tarballs of the packages it depends on, packed from the same tree — a new version is on no registry yet; the root's tarball must carry no file compiled from such a package's source; `gate:blackbox` checks the installed values are the package's own and that a consumer's compiler reads them as the package's own declarations. `gate:repro` refuses to judge a built `dist/` whose by-name import would not land in this tree's `packages/primitives` (no link, a link into another checkout, the package not built), naming the fix (`npm ci --ignore-scripts`, then `npm run build`). CI's fallback publish leg, which publishes the root alone, now refuses (`scripts/root-deps-published.mjs`) while a package the root depends on is not on the registry at the release version, or the registry cannot be asked — it no longer could land a root nobody can install; the refusal retires with that leg (#2803). `gate:spawn-sites` reads such a package as the repository's own source — every file it compiles must be under the `src/` it scans — instead of asking for a review row pinned to a version that moves every release; `criteria-lint` counts its source as shipped.
|
|
37
|
+
- **An intermediate step with its retirement condition, not a documented exception.** After #2802 (the three gates that read only `src/` — comment census, internal wording, module size — extended to `packages/*/src`) lands, the primitives source moves to `packages/primitives/src`, the build's exclusion and its `paths` entry retire, and the satellite packages have one layout.
|
|
38
|
+
- **Not changed: `@sema-agent/mods-kernel`.** The root still compiles the kernel into its own `dist/` beside the package (two module instances if both are installed; the kernel's README states two copies interoperate on plain objects and compare `KERNEL_CONTRACT_VERSION`). Reading it by name first needs a ruling on the kernel's public face, because the engine reads four of its non-entry modules — #2801, `KL-2749-a` (pending ruling, not accepted).
|
|
39
|
+
- **Install-shape change (open to veto).** *What changed*: installing `@sema-agent/core@X.Y.Z` now installs `@sema-agent/primitives@X.Y.Z` with it; every consumer's lockfile gains `node_modules/@sema-agent/primitives`. *Who is hurt*: nobody at runtime; a project that pins `@sema-agent/primitives` itself at a version other than its core's gets two copies (npm keeps core's own beside it), which `npm ls @sema-agent/primitives` shows. *Migration*: none for a project that does not import the package; one that does names the same version as its core.
|
|
40
|
+
- **Consumers.** @server @web-admin @settings-schema: a validator that reads `readCredentialRef` from `@sema-agent/primitives` names the package at your core's version — then it is the engine's own function, not a copy; your lockfile gains one entry when you take this release. @cli @client-core @connectors @dgx: one lockfile entry, no code change.
|
|
41
|
+
- **Pins.** `test/backlog2749-primitives-single-instance.test.ts` (over a throwaway release tree: the install set installs offline at an unpublished version and the root's re-exports are the package's values, declarations included; a root carrying a compiled copy is red in the tarball reading and in the identity probe; a root declaration re-exporting an unresolvable package is red in the declaration probe; the root's dependency law, red for a range, another version, an unpublished package, a peer entry; the bump writes the cell; the publish order; `gate:repro`'s precondition for each state; the CI fallback's refusal for a registry without the package, with it, and unable to answer, and its place before the leg's publish; the real tree's manifest, build config and build script). Re-pinned as well: `test/backlog1468-n1-core-stores-sql.test.ts` (`tsconfig.json`'s in-repo mappings are core and the package the root depends on). Re-pinned: `test/backlog2293-credential-ref.test.ts` (the pin that compared two source paths in one module graph — always the same module — is replaced by the source reading: the rest of `src/` reaches the folder only by the package name), `test/verify-packages.test.ts` (the root build program compiles no source of a package the root depends on and reads only that package's built declarations from `packages/`), `test/backlog1751-package-release-base.test.ts` (the bump's cells include the root's dependency; the lockfile links it at a version no registry holds).
|
|
42
|
+
|
|
43
|
+
### The hosted-connector assertion header has one name, and the engine owns it — `MCP_ASSERTION_HEADER` is exported from the root and a peer declaration that names it is refused (#1750; additive export, behavior narrowing, open to veto; exports: +1 `MCP_ASSERTION_HEADER`)
|
|
44
|
+
|
|
45
|
+
- **Before.** The name of the header a hosted connector reads the principal assertion from had no definition in the engine: it was a proposed value on the connector's side and a free string on the server's request face, while the engine — the party that sends request headers — let any peer declaration set a static header under it (or name it as the principal header) and sent it as declared.
|
|
46
|
+
- **Now.** `MCP_ASSERTION_HEADER` (`"connector-assertion"`) is defined once, in `src/core/protocol-http-auth.ts`, and exported from the package root. The one ownership judge, `headerOwnershipCollision`, gives the engine that name as its first owner: a declaration that names it as the principal header's name collides, and the dial (MCP and A2A alike, one judge) refuses the peer with `config.protocol_header_collision` before any request leaves; its siblings still mount. The judge's answer gains `engineOwned` (true for this collision, false for the ordinary two-spelling one; `first` is then the engine's spelling, `second` the declaration's). Names that only contain it (`x-connector-assertion`, `connector-assertion-id`) are the declaration's own and travel. This release sends nothing under the name and adds no member to any declaration: the constant is the name only; the assertion's value is not minted, held or sent here, and its path is the credential-resolution seat (#2294 / #2295). (In this same release #2294 removes `transport.headers` altogether: a declaration carrying any static header is refused by name before this judge runs, so the judge's static-header arm is reached by no declaration and answers `undefined` for it; its live arm is `principalHeader`.)
|
|
47
|
+
- **Behavior narrowing (open to veto).** *What changed*: a peer declaration naming the engine's assertion header as `principalHeader` is refused at its dial; it was sent as declared (a static `headers` entry is refused earlier and by name, #2294). *Who is hurt*: a deployment that put a pre-minted assertion into a static `connector-assertion` header of an MCP or A2A peer (that peer is now skipped with a coded warning), or that named the principal header `connector-assertion` (a hosted connector reads that header as an assertion, not as a bare principal). *Migration*: remove the entry; a connector that requires the assertion has no static-header path from this release on — the value reaches it under this name from the credential seat once that lands. Measured on a real MCP dial, previous stage head vs this one: a static `Connector-Assertion` header reached the listener and is refused with the listener hearing nothing; `principalHeader: "CONNECTOR-ASSERTION"` likewise.
|
|
48
|
+
- **Consumers.** @connectors: your CN-034 gate can read `MCP_ASSERTION_HEADER` from the package root — the value is your launcher's current `connector-assertion`, so nothing is renamed on your side. @server: S-1566 can default `assertionHeader` to this constant; `_CoreHasNoAssertionSeat` stays green — the constant is not a seat (no `assertionHeader` key on the http transport) — and an intake that judges a declaration with `headerOwnershipCollision` now also refuses the engine's name, reading `engineOwned` for the wording. @test: a black-box cell for each refused form (static any-case, with a principal header, as the principal header; MCP and A2A).
|
|
49
|
+
- **Pins.** `test/backlog1750-assertion-header-name.test.ts` (the name defined once as a string literal in the whole src tree, exported and a valid header name; the judge for each form with its controls; the MCP and A2A dials refusing before any request, a sibling still mounting); `test/export-surface.snapshot.json` regenerated (+1).
|
|
50
|
+
|
|
51
|
+
### The release is one tracked chain, `scripts/release/`, and each of its steps refuses what it cannot stand on (#2794; release tooling only; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
|
|
52
|
+
|
|
53
|
+
- **Before.** The release steps after the last car ran from per-window script copies kept outside the tree, beside an in-tree publish script that read its token from a shell profile. On the 7.57.0 day five checks were left to a person and all five slipped: the publish took its RC-green sha and the gated `dist/` only when they were set (neither was), the live gate ran after the publish, the post kept a `<N>` slot and a "byte-for-byte" sentence its publish log contradicted through four green runs of the post lint, the "shipped" post number was claimed 68 minutes before the publish, the R bookkeeping wrote a `BLOCKED(on 派车槽)` status no blocker stood behind (taking 662 live rows out of the capacity count), and the satellites' printed pack shasums were taken before their gitHead was written, so none matched the registry.
|
|
54
|
+
- **Now.** `node scripts/release/chain.mjs <ver> <step>|--all [--dry-run]` runs r-commit → live-stamp → tag-push → publish → ship-number → ship-post-lint → post-ship with one state file (`.gate-logs/release-<ver>.json`); versions, trees and the package set (`publishClaimsOfTree`) are parameters. `publish` requires `RC_GREEN_SHA` (an ancestor of the tag with the same source trees) and `PUBLISH_GATE_DIST` (compared file by file; the log says `dist compared with … identical`), reads the token from the environment only, packs each satellite after its gitHead is written and prints only the registry's readings. `tag-push` refuses without a green live stamp for the content (`live-stamp` keeps the live gate's own verdict record per run: exit, files, passed, skipped, OMITTED, time; newest run exit 0, no skip, at most `--live-max-age-hours` old, default 6) and when main moved after the release commit; it pushes through a credential helper that reads the token at run time. `ship-number` claims the number only after the registry's three-way sameness for every published package. `rewindow` (one tool for the three re-window scripts) keeps an unmerged P2 / P3 row OPEN in `待排(C-R231 ②;<类别>;原窗 <ver>)` with its first promised window, leaves landed rows (the ledger gate's `LANDED_STATUS`, the word post-ship reads too) and car rows whose car is in the release head (`carReader`: an ancestor of the head, not of the previous tag, not on the release's own first-parent line), moves every other row windowed at the cut version to the next window, sets the window cap to its true count, never writes BLOCKED, refuses to decide a CHANGELOG-named live row (`--ledgered` records a disclosure), and writes nothing when the ledger gate is red on its result. A real run of a step already recorded ok is not run again (no second tag push, publish or post-number claim); `tag-push` is done only when origin holds the tag and finishes a local tag it does not; every child process gets only the credential its own step needs; `live-stamp` refuses a tree with uncommitted changes. `ship-post-lint` gains four post-text legs (from 7.58.0): a `<…>` slot left, a byte-for-byte sentence without the publish log's comparison line (`--publish-log`), a car named as part of the release that is not in the RC, an `在飞(car-…)` the ledger's IN-PROGRESS rows do not confirm. `post-ship` writes `[tag v<ver> <sha>]` into the core landing rows and refuses a cited feature whose FEATS index row lacks `shipped v<ver>` and a row windowed at the shipped version that has not landed. `run-live-gate.mjs` writes its verdict record when `LIVE_GATE_SUMMARY_FILE` is set. `scripts/publish-release.sh` is retired (its cells re-pinned on the new publish step).
|
|
55
|
+
- **Who is hurt.** Nobody at runtime: `src/` is untouched and the package's file list is unchanged (`scripts/` is not in `files`). The publisher runs the chain; a publish without the two variables, a tag without a green live stamp, and a post number before the registry shows the release are now refused.
|
|
56
|
+
- **Pins.** `test/release-chain-steps.test.ts` (publish P1–P10, tag-push T1–T12, live-stamp L1–L4, ship-number S1–S6, r-commit R1–R4, chain C1–C5, `sameContent` and `carReader` over real git, against throwaway repositories, a fake npm and registry and a recorder in front of every push, fetch and ls-remote); `test/release-chain-bookkeeping.test.ts` (rewindow W1–W10, W7 being the 7.57.0 R input against the C-R906 rows, `test/fixtures/release-chain/cr906-rewindow.json.gz`; the post-text legs A1–A4 / B1–B3 with the real 7.57.0 publish log / D1–D2 / E1–E2; post-ship F1–F5); `test/backlog2154-publish-checkout.test.ts` ③ ④ re-pinned on the one publish step; `test/post-ship-script.test.ts` fixture carries the three new anchors.
|
|
57
|
+
|
|
58
|
+
### A request to an MCP server or an A2A peer carries what the deployment's peer seat answers for that send — a declaration carries no value (#2294, slice S1 of the MCP credential seat, design/1494; hard-breaking, open to veto; security; closed sets: `MCP_FAILURE_KINDS` +1 (`credential_unavailable`), `CHECKPOINT_CONFIG_REFUSAL_CODES` +3 (`config.credential_in_declaration`, `config.credential_ref_invalid`, `config.peer_seat_missing`); exports: +5 root types (`PeerSeat`, `PeerQuestion`, `PeerAnswer`, `PeerSeatTarget`, `PeerAskCause`), `RunnerDeps.peerSeat` +1, `McpProbeOptions.peerSeat` +1, `materializeMcpTools` / `materializeA2aTools` +1 trailing parameter, `McpServerSpec.transport` −`headers` −`env` +`credentials`, `A2aServerSpec` −`headers` +`credentials`, `headerOwnershipCollision` takes the protocol, `DECLARATION_PATH_RULES` −3 rows, `DeclarationPathRule.holds` narrowed to `"a string"`) (@server @cli @client-core @connectors @settings-schema @web-admin)
|
|
59
|
+
|
|
60
|
+
- **Before.** An MCP http server's credential headers, a stdio server's child environment and an A2A peer's headers were VALUES in the declaration: read once when the transport was built and sent with every request, they rode wherever the declaration rode (a parked leg's stored request, a pooled connection's key, a child leg's inherited tools, a lock's kept copy), could not be renewed for a short-lived assertion, and could set the MCP SDK's own headers. A 401 was only a status: nothing asked for a fresh credential. An A2A card's endpoint was bound to the declared origins once, after the card was read, and only when the declaration had headers.
|
|
61
|
+
- **Now.** One seat, `RunnerDeps.peerSeat(question, signal)`, answers what a send carries beyond the protocol's own members, the SDK's own headers and the engine's principal header (`src/core/peer-seat.ts`). It is asked under the CONNECTION's identity — the server's name, its whole transport (url; or command and arguments), its opaque `credentials` reference, its fingerprint, the principal; never the session: before every http MCP request (the first as `cause: "connect"`), when a stdio child is started (its `env`; an answer's `expiresAt` retires the child before the next call through the server's one re-dial — concurrent calls re-dial once, the calls in flight on the old child settle before it is closed, and a pooled connection is replaced once for every holder), and before every A2A send (the question names that send's `destination`). The answer is `{ kind: "carry", headers? | env?, expiresAt? }` — `headers` for http and A2A, `env` for stdio, the other lane's member refused — or `{ kind: "unauthorized", authorizeUrl? }`. A declaration names at most one reference, `transport.credentials` (A2A: `credentials`), read by the one reader `readCredentialRef` (#2293) at every entrance; the engine resolves nothing. A 401 asks the seat once more (`cause: "rejected"`) and the next send carries that answer; a repeat-safe tool call (`effect: "read"` / `"idempotent"`) answered 401 is sent once more on the same connection after the revocation probe and `reach` are asked again, when the re-ask answered other pieces; a write-class call is not sent again; a dial whose handshake or first listing was answered 401 is dialed once more on the same terms. A seat that throws, does not answer within 30 s, answers off-lane or off-shape, answers a header the protocol writes itself (`mcp-session-id`, `mcp-protocol-version`, `content-type`, `accept`, `last-event-id`), or answers `unauthorized` sends nothing: the new failure word `credential_unavailable` (delivered `no`; no liveness observation); a re-send that was not delivered (the seat could not furnish it, the endpoint refused the connection) ends with the first attempt's failure, so a call one of whose attempts was sent never reads `no`. Every value a connection's sends carried is what its remote's words are read without (the failure texts, status records and operator warnings); a seat's credential headers and credential-judged stdio variables are held from spawned children like any credential the engine receives. An A2A send carrying pieces goes only to a declared origin, judged at every send (`config.protocol_endpoint_unbound`); a card read under pieces that names an outside endpoint still refuses the peer at once. The connection pool's key holds no value by construction. A 401 after the re-ask keeps today's reading (`http_status`, `delivered: "unknown"`); the structured `unauthorized` failure and its readers are the next slice (#2295).
|
|
62
|
+
- **Hard-breaking (open to veto).** (1) *What changed:* `McpServerSpec.transport.headers` (http) and `.env` (stdio) are removed; a declaration that still carries either — whatever it holds — is refused by name at every entrance (the preparation door, a resume's pre-claim screen, `materializeMcpTools`, the no-run probe, `materializeA2aTools`: `config.credential_in_declaration`, the value never repeated), and a declaration naming `credentials` with no seat wired is refused (`config.peer_seat_missing`; an unknown reference kind `config.credential_ref_invalid`). *Who is hurt:* every host that builds an MCP declaration with values — server (roster `resolveMcpServers`, request surface `task-mcp.ts`, S-1907's sealed `checkpoint_ctx` copy), a shell or client that builds one in-process, a library user; settings-schema's `RequestMcpTransport` mirror (its two-way drift gate reds); readers of `DECLARATION_PATH_RULES` (the `transport.env` / `transport.headers` rows are gone). *How to migrate:* move the values into `peerSeat`, answering by server name AND url (or command): `peerSeat: async (q) => (q.peer.protocol === "mcp" && q.peer.server === "github" && q.peer.transport === "http" && q.peer.url === GITHUB_URL ? { kind: "carry", headers: { Authorization: … } } : { kind: "carry" })` — never one token for every peer; resolve roster references inside the seat; a request surface's literal values go into the deployment's own store, and the submitted declaration names `{ kind: "handle", id }` instead. (2) *What changed:* `A2aServerSpec.headers` is removed (refused the same way), and the card endpoint is bound at every send that carries the seat's pieces rather than once after discovery. *Who is hurt:* a host declaring A2A peers with headers; a peer whose card names another origin and whose seat answers pieces for it (refused). *How to migrate:* as (1), with `q.peer.protocol === "a2a"` and `q.peer.destination`.
|
|
63
|
+
- **Behavior narrowing (open to veto).** A principal header named as a header the MCP transport writes itself (any case) refuses the server at its dial (`config.protocol_header_collision`) — it would have replaced the SDK's own. The engine's `MCP_ASSERTION_HEADER` is now the seat's to answer (the assertion's path), and still never the principal header's name. `headerOwnershipCollision(t, protocol)` takes the protocol (the protocol-owned names are per protocol; A2A has none) and judges a send's answered headers with the principal header; the judge's answer is unchanged in shape.
|
|
64
|
+
- **Consumers.** @server: `peerSeat` is yours to implement (roster `headerRefs` / `envRefs` resolved at send time, bound to the roster entry's url; request-surface literals stored and rewritten to `handle` before anything persists — design/1494 §9 is S-1907's retirement test); the assertion header is answered by the seat under `MCP_ASSERTION_HEADER`; `credential_unavailable` is a new `errorCode` word on the status record, the manifest row and `tool_end`. @settings-schema: `RequestMcpTransport` loses `headers`, gains `credentials` (`CredentialRef`). @cli / @client-core: a host that builds declarations in-process needs a seat (single-machine form: a local token store); renderers keyed on `errorCode` meet `credential_unavailable`. @connectors: the assertion arrives under `connector-assertion` from the deployment's seat; a write-class tool answered 401 is not re-sent by the engine. @web-admin: a validator reads `readCredentialRef`; vault entries bind their destination for the seat to check.
|
|
65
|
+
- **Pins.** `test/backlog2294-peer-seat.test.ts` (D: the retired members refused by name at the door and the library entrance, an `undefined` member absent, the reference read by its reader, a reference with no seat refused at the door and at the dial; H: an ask before every request, an answer that changes between calls changing the header between them, the question's identity without a session, no seat ⇒ no piece; F: four ways a seat fails to furnish a call ⇒ `credential_unavailable` / `no` and no call at the server; R: a read call re-sent once with the re-ask's answer, a write call not re-sent and the next call carrying the new answer, an unchanged re-ask sending nothing again, an unfurnished re-send keeping the first failure's verdict, a 401'd handshake re-dialed; E: an echoed token absent from a failure text, a status record and a warning; S: one ask per stdio child carrying its variable, an expired child retired before the next call with four concurrent calls re-dialing once; A: the card read carrying the answer with the send's destination, an outside card endpoint refused under pieces and mounted without; E3 a re-dial's new value scrubbed from a first-connection tool's failure; S3 an `expiresAt` without `env`); the migrated MCP / A2A pins.
|
|
66
|
+
- **Known limits.** After a dial, only tool calls are sent again on a renewed 401 — a refresh listing and the resource tools fail once (KL-2294-a); concurrent 401s on one connection share one re-ask (KL-2294-b); an expired stdio child is retired at the next tool call, not by the resource tools, and a failed re-dial leaves the server down (KL-2294-c).
|
|
67
|
+
|
|
68
|
+
### An MCP `tools/call` carries `_meta["sema/toolUseId"]` — the id of the call it executes — and `_meta["sema/requestMeta"]` — the record of strings the call's `tool.call` chain handed on; one mint, one judge where a handler hands the record on, and the host supplies it as a deployment-seat `tool.call` handler (#2461; behavior change on the wire, open to veto: the request meta is wider than the reference, see Divergence; hard-breaking: one — `KERNEL_CONTRACT_VERSION` 3 → 4; closed sets: none; exports: none (a new internal module `src/core/mcp-call-meta.ts` and an internal `materializeLegMcpTools`, neither index-exported); members: +1 optional `ModDispatchOptions.checkHandOn`; signatures: none — the public `materializeMcpTools` takes no request-meta source, so a library materialization's calls carry the id and never a record) (@server @cli @client-core @test)
|
|
69
|
+
|
|
70
|
+
- **Before.** The one `tools/call` the engine sends handed the server `{ name, arguments }` and the SDK's own `progressToken`, nothing else; a server could not tie what it did to the call that asked for it, nor tell the engine's one resend after a dropped session from a new call. A `tool.call` handler that passed `next({ ...e, requestMeta })` had the member received and silently dropped at the chain bottom.
|
|
71
|
+
- **Now.** Every `tools/call` carries `_meta["sema/toolUseId"]` = the executing call's id — the `toolCallId` of its `tool_start` / `tool_end` (an extension's own `$.tool.call` executes under its `ext-` id, a resumed call under the id it was asked under) — whenever that id is a non-empty string; both attempts of a resent call carry the same. It correlates; it is not a global identity: the engine keeps it unique among one response's calls, but a model may reuse an id on a later turn and legs share a pooled connection, so a server that needs the session or the agent is stamped by the host. A `tool.call` handler may hand on `requestMeta`, a plain record of strings (at most 262144 UTF-8 bytes of keys and values): it rides as `_meta["sema/requestMeta"]` on that call when the tool is an MCP tool, as a frozen copy without a prototype (an empty record rides as nothing). It is judged where the handler hands it on, off the payload's own data member (an inherited one is not handed on; no getter, `toJSON` or Proxy trap runs): anything else — a member that is not a string, a list, a class instance, an accessor, a symbol key, over the bound — is the handler's violation, like a changed pinned key: its `next` does not descend, and the call is refused before its body naming the extension (the station's violation sentence: `a tool.call extension gave an answer the station cannot take (extension "<name>" next() handed on a requestMeta the call cannot carry: …) before this call to "<tool>" ran; the call was NOT executed (fail-closed)`), unless that handler's `.catch` answers. The record reaches the MCP tool on the body's own async chain, per leg: a child leg's calls, a second call in flight, a direct `execute` outside any body and a timer left behind read none of it.
|
|
72
|
+
- **The host's record and an extension's.** One source: the host is a `tool.call` handler at the deployment seat. Who wins a member is the chain's order — the value that rides is what the last handler before the body handed on; a deployment handler in the `append` tier is the innermost, and a task handler can neither `next.to` past it nor answer in its place except by refusing. Stated: the host's stamper is its own registration that makes no calls — a registration's own `$.tool.call` runs without that registration's handlers (the re-entry law), so a stamper that also calls tools does not stamp its own calls.
|
|
73
|
+
- **Contract 3 → 4 (hard-breaking, @server @cli @client-core).** What changed: `KERNEL_CONTRACT_VERSION` is 4 — a station may judge what a handler hands on (`ModDispatchOptions.checkHandOn`: its sentence is the handler's violation, a throwing check is one too; the dispatch's own `e` passed on unchanged is not judged), and `tool.call` takes `requestMeta`. Who is hurt: a host that loads `@sema-agent/mods-kernel` beside the engine and compares the contract for equality reads a mismatch until it takes the 7.58.0 kernel; a `tool.call` handler that already handed on a `requestMeta` member that is not a record of strings (none known) is now refused instead of ignored. How to migrate: take `@sema-agent/mods-kernel@7.58.0` with core 7.58.0; a handler that never sets `requestMeta` changes nothing.
|
|
74
|
+
- **Divergence (open to veto).** The keys are sema's own (`sema/toolUseId`, `sema/requestMeta`; the reference spells its id `claudecode/toolUseId`) — a server that reads only the reference's key reads nothing. The reference's request meta is a closed first-party relay: a hook may set one allow-listed key, it is read only behind a feature value that is off by default, and it reaches only the engine's own remote-session servers; sema has no such first party, so its record is open (any string member) under its own key and reaches every MCP server the engine calls — the hosts that write it are the deployment's and the task's in-process code. Not covered: in-process code that changes the shared prototypes (`Object.prototype.toJSON`) changes how the SDK serializes every message, this one's too.
|
|
75
|
+
- **Consumers.** @server: a stamper for a session, agent or driver identity is a deployment registration at `append` that makes no calls; equality checks of the kernel contract move to 4 with this release. @cli @client-core: the kernel copy's contract equality moves to 4. @test: the wire is observable on a real MCP server (`request.params._meta`). A server that de-duplicates resends keys on the id within one call's life, not across a session.
|
|
76
|
+
- **Pins.** `test/backlog2461-mcp-call-meta.test.ts`: a real `@modelcontextprotocol/sdk` server in process records `_meta` — the model's call (id = the frames'), two calls in one turn, a handler's record byte-equal with an own `__proto__` key, the chain's order both ways, five malformed shapes refused before the body, `{}`, a non-MCP tool, a `.catch` recovering with a good record, an inherited `Object.prototype.requestMeta` getter never run, an extension's `$.tool.call` (its `ext-` id; a stamper that makes no calls stamps it, one that makes the call does not), a direct `execute("")`; the judge, the mint and the seat (two holds under one id, a hold with none beside one with a record, outside, after, another seat) and the kernel's `checkHandOn` as units.
|
|
77
|
+
|
|
78
|
+
### A server that declares `sessionMetaKey` is sent the sending leg's own session id on every `tools/call` and `resources/read`, under that key in `_meta`, over stdio and Streamable HTTP alike; absent by default, and a key that would land on a reserved or engine-owned place is refused by name (#2296; additive; behavior change on the wire for a declaring server only, open to veto — the reference sends no session id; hard-breaking: none; closed sets: none; exports: none (the new member is on the exported `McpServerSpec` type; `judgeSessionMetaKey` and `McpLegMetaReader` are internal to `src/core/mcp-call-meta.ts`); members: +1 optional `McpServerSpec.sessionMetaKey`; signatures: none public — the internal mint takes the declared key and the leg's session id as two more optional arguments, the internal seat constructor takes the session id) (@server @cli @client-core @connectors @test)
|
|
79
|
+
|
|
80
|
+
- **Before.** The engine never told a server which session a request came from: `mcp-session-id` is the server's own per-connection id, the principal header names the user, and a connector that keeps state per (principal, session) — a browser's login state, a profile per session — had no key to keep it under. Pooled connections are shared by legs, so a connection-level header could not carry it either.
|
|
81
|
+
- **Now.** `McpServerSpec.sessionMetaKey?: string`. With a key declared, every `tools/call` and every `resources/read` the engine sends that server carries `params._meta[key]` = the sending leg's `sessionId` (the id its events carry), over stdio and Streamable HTTP, per call — so two legs on one pooled connection each send their own. The `_meta` has still ONE writer: the mint `mcpCallMeta` (`src/core/mcp-call-meta.ts`) takes the declared key and the leg's session id beside the call id and the request meta; the resource handle's read params and the tool call's request both come from it. Absent ⇒ nothing is sent. A dial with no leg (a direct `materializeMcpTools`, the no-run probe) has no session id, so a declared key rides nothing there. A delegated child is another session: its own calls carry its own id, not its parent's; the engine does not guess a root, and the principal (`principalHeader`) is shared by every session of one user, so it is not a tree key either.
|
|
82
|
+
- **The key is judged once**, by `judgeSessionMetaKey`, where the declaration is judged — the preparation door (the whole prepare is refused) and the materialization entrance (that server is never dialed: `invalid_config`, a warning naming the key; siblings mount). Refused under `config.invalid_argument`, naming the server and the key, never dropped or defaulted: a non-string, an empty or over-long (> 128 characters) one; one outside the MCP `_meta` key-name format (an optional prefix of dot-separated labels and a slash — a label starts with a letter, ends with a letter or digit, holds letters, digits and hyphens — then a name of letters, digits, hyphen, underscore and dot that begins and ends alphanumeric; this also keeps out `__proto__`, which the SDK's own request parse drops before a server handler sees it); a key in a prefix MCP reserves (the prefix is the text before the first `/`; its SECOND label — compared with case folded — is `modelcontextprotocol` or `mcp`: `io.modelcontextprotocol/`, `dev.mcp/`, `com.mcp.tools/` are refused, `com.example.mcp/` is not; MCP 2025-11-25 "General fields"); `progressToken` (the SDK writes it over any `_meta` it carries); and anything under the engine's own `sema/` namespace (`sema/toolUseId`, `sema/requestMeta` and whatever the engine mints later).- **Divergence (open to veto).** The reference's per-call `_meta` carries its tool-use id and no session id; here a session id leaves the process under a key the deployment chooses, only for the servers that declare one. Default is the reference's.
|
|
83
|
+
- **Consumers.** @connectors @client-core: a connector that keeps state per (principal, session) declares `sessionMetaKey` on its server entry and reads `request.params._meta[key]` in its tool and resource handlers (a browser-class server: key the storage state on the pair; `principalHeader` carries the principal). @server: the entry's request / roster schema and its two-way drift gate need the new optional member if the deployment is to declare it; nothing changes for entries that do not. @cli @test: a session id is sent only to a server that asked; the wire is observable on a real MCP server (`request.params._meta`). A session id that looks like a credential goes out as written (it is the engine's own correlation id, and the key name is never rewritten).
|
|
84
|
+
- **Pins.** `test/backlog2296-session-meta-key.test.ts`: a real `@modelcontextprotocol/sdk` server in process (and a stdio child) records `_meta` — absent key sends nothing on a call or a read; declared key on both; two legs two ids; a delegated child's own id; a credential-shaped id out byte-equal under a credential-named key while a declared header value is still taken out of a failure text; the judge's twenty-six refusals and thirteen accepted keys; two legs on one pooled connection, interleaved; the door and the library entrance; the mint, the seat, one writer of `_meta`, and no `prompts/get` sender in core.
|
|
85
|
+
|
|
86
|
+
### What started a task, when its host says so — `TaskSpec.runOrigin: "scheduled"` is declared once where the task starts, carried with the task across its legs, and reported by the leg's wiring manifest and the checkpoint listing (#1556 S1, design/1556 r2; new seat; hard-breaking: two closed-set words (below); behavior change for a resume config that carries the word, open to veto; closed sets: `REQUIREMENT_WORDS` +1 `run_origin`, `CHECKPOINT_CONFIG_REFUSAL_CODES` +1 `config.run_origin_invalid`; exports: +3 root names `RUN_ORIGINS` (frozen `["scheduled"]`), `RunOrigin` (type), `isRunOrigin` (function); new optional members `TaskSpec.runOrigin`, `WiringManifest.leg.runOrigin`, `CheckpointState.runOrigin`, `CheckpointSummary.runOrigin`) (@server @cli @client-core @dgx @test)
|
|
87
|
+
|
|
88
|
+
- **What changed.** A run the deployment's scheduler started (a cron job, a heartbeat, a delayed wake-up, a stored routine) looked
|
|
89
|
+
exactly like a run a person sent, on every face the engine reports — the event stream, a parked approval, the inbox listing. The
|
|
90
|
+
host now says so on the task it starts: `runOrigin: "scheduled"`. The config doors read it once (`runOriginOfLeg`), the leg's
|
|
91
|
+
`wiring_manifest` reports it (`leg: { kind, runOrigin }`), a park records it on the row (`state.runOrigin`, every gate kind, one
|
|
92
|
+
serializer), a leg a decision resumes reads it back from the row (a wake opens its leg with the input it hands over — the
|
|
93
|
+
#2664 entry above), and `summarizeCheckpoint` echoes it on the listing (only as a member of the
|
|
94
|
+
set). Absent = the host said nothing — never "a person sent it"; there is no positive word for that. Attribution only: no
|
|
95
|
+
permission, approval, mode or scope decision reads it, and it never enters the model's context. A delegated child does not
|
|
96
|
+
inherit it (a child is its parent's model's work; its tree is reached through `parentTaskId`).
|
|
97
|
+
- **Resume (behavior change, open to veto).** A leg a decision resumes continues the row's word. A resume config carries none —
|
|
98
|
+
any word on it is refused before the claim (`checkpoint.config_refused`, `detail.field: "taskConfig"`,
|
|
99
|
+
`detail.code: "config.run_origin_invalid"`; the row stays pending; the #2664 entry above retired the restatement this slice
|
|
100
|
+
first allowed). A row whose own word this engine does not know is refused before the claim too, after the row's reader
|
|
101
|
+
requirements (`detail.field: "inheritedGate"`).
|
|
102
|
+
- **Bad values (loud).** A present value outside the set — `null`, `""`, `"Scheduled"`, `"scheduled "`, a number, a boolean, an
|
|
103
|
+
object, an array — is refused at prepare (`config.run_origin_invalid`, naming the value) and on a resume config before the claim.
|
|
104
|
+
- **Hard-breaking (two closed-set words).** *What changed*: `REQUIREMENT_WORDS` gains `run_origin` — a row that carries
|
|
105
|
+
`state.runOrigin` requires a reader that knows the word; `CHECKPOINT_CONFIG_REFUSAL_CODES` gains `config.run_origin_invalid` — a
|
|
106
|
+
resume's pre-claim refusal can carry it as `detail.code`. *Who is hurt*: a consumer that pins either set (a store conformance
|
|
107
|
+
table, a retry-policy table over `detail.code`, a test enumerating the words); in a mixed fleet an older worker refuses a row
|
|
108
|
+
carrying `run_origin` as `version_newer` — only rows of tasks a host declared scheduled carry it. *Migration*: add the two words
|
|
109
|
+
to the pinned tables; upgrade the workers before the scheduler starts stamping `runOrigin`; a deployment that never stamps it
|
|
110
|
+
writes byte-identical rows.
|
|
111
|
+
- **Trust.** Set `runOrigin` only at the deployment's own scheduler fire path, never from a request body — the engine cannot
|
|
112
|
+
verify it, and a passed-through field lets any caller mark its run as scheduled.
|
|
113
|
+
- **Consumers.** @server: stamp `runOrigin: "scheduled"` where the scheduler / heartbeat fires `runTask`, not from the request
|
|
114
|
+
body; when a stored spec is replayed as a resume config, strip the field (a resume config carries none — the #2664 entry above);
|
|
115
|
+
add the two words to the store kit's and the
|
|
116
|
+
retry policy's tables; a SQL store that rebuilds `state` member by member must keep `runOrigin` (its row carries the word).
|
|
117
|
+
@cli: the TOC daemon's fire path stamps the word the same way. @client-core: the inbox may read `CheckpointSummary.runOrigin`
|
|
118
|
+
and the stream `wiring_manifest.leg.runOrigin` to mark scheduled work; unknown fields stay ignored. @dgx: the audit face reads
|
|
119
|
+
the same two fields through server. @test: a black-box cell per face (manifest, listing, resumed leg, refusals).
|
|
120
|
+
- **Pins.** `test/backlog1556-run-origin.test.ts` (real Runner): the manifest reports the word / the bare leg without it; eight bad
|
|
121
|
+
values refused at prepare; a park records the word under its requirement word and the listing echoes it; a resume that omits
|
|
122
|
+
it inherits it; a re-suspend keeps it; a bad resume word, a row-unknown word, a config word the row does not carry and (since
|
|
123
|
+
#2664) a restatement of the row's are refused before the claim with the row pending; a task that declares nothing parks with no member, word or key;
|
|
124
|
+
unit cells for the door, the listing echo, the static half and the child seat. Re-pinned: `backlog1320` H (the maximal row
|
|
125
|
+
carries the member), `backlog1950` (a recipe for the new code), `public-knob-liveness` (the seat's proof), the four fixtures that
|
|
126
|
+
spell a `SerializedCheckpointState` / the wiring-manifest phase input.
|
|
127
|
+
|
|
128
|
+
### The write-protection ask and the sensitive-path refusal say how a path met a guarded row in one clause — a hit through the real target and a hit through a link on the way read one sentence; the spelling form is unchanged (#2793; wording change on the ask the auto-mode classifier reads, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @test)
|
|
129
|
+
|
|
130
|
+
- **Before.** The write-protection table's judge records which reading of a write target met a row (`via`: the spelling, the real target, a hop of the leaf's link chain), and the ask it minted said that in three sentences: `tool "W" writes to a write-protected path (table entry "N") — explicit approval required`, `… — its real target resolves onto table entry "N" — …` and `… — its symlink chain passes through table entry "N" — …`. That ask is the auto-mode classifier's `askMessage`. A live sample that put all three on one fixed call disagreed (spelling allow, target and chain block): the spelling sentence there described a write the call did not show, and the two resolved sentences were two wordings of one fact — the row was met by following the path on disk. The sensitive-path deny set worded the same three readings its own way, and each of the two guards read a hit's view kind into `via` through its own copy of the mapping.
|
|
131
|
+
- **Now.** One table reads a hit's view kind as its `via`, and one clause says how a reading other than the spelling met the row: `matched where the path resolves on disk (its real target or a link on the way)` (`src/core/path-guard-rows.ts`, read by both guards). The ask for a target or chain hit is `tool "W" writes to a write-protected path (table entry "N") — matched where the path resolves on disk (its real target or a link on the way) — explicit approval required`; the sensitive-path refusal is `write to "P" is blocked: the guarded sensitive path "N" — matched where the path resolves on disk (its real target or a link on the way)`. The spelling forms are unchanged byte for byte (`… (table entry "N") — explicit approval required`; `write to "P" is blocked: its path names the guarded sensitive path "N"`). The clause says which reading met the row and nothing about the spelling: inside the data root, where the identity exemption lets only the real target vote, a spelling that names the row is met by the target reading and reads the resolved sentence. `WriteProtectionVerdict.via` keeps its three values; its declared type is the alias `GuardHitVia`, structurally the same union.
|
|
132
|
+
- **Who may answer (settled in this release by #2795).** A hit the spelling itself names stays `write_protection` and the classifier may answer it; a hit only the disk reaches (its spelling alone names no row) is its own ask class, `write_protection_on_disk`, which the classifier does not answer — see the #2795 section. No path text enters either ask sentence.
|
|
133
|
+
- **Wording change (open to veto).** *What changed*: the classifier, the approval card and the model's refusal read one sentence where a target hit and a chain hit read two, and the deny set's resolved refusals have new words. *Who is hurt*: a consumer that matches the old resolved sentences by text. *Migration*: match the quoted row name, or the clause above.
|
|
134
|
+
- **Consumers.** @cli: `src/components/bypassModeDisclosure.test.tsx` ③e greps the core dist for `is blocked: its real target resolves onto the guarded sensitive path`; the dist now says `is blocked: the guarded sensitive path "<pattern>" — matched where the path resolves on disk (its real target or a link on the way)` for that refusal (a hit is still a deny) — one anchor to re-pin; the B-002 live gate's short anchor `guarded sensitive path` is unchanged. @server: the spelling refusal your `task-settings` cell anchors (`names the guarded sensitive path ".env"`) is unchanged. @test black box: one guarded row written through a one-hop alias onto it and through a link chain passing through it puts the same ask text on the card (and in the classifier's question); a direct write keeps the spelling sentence.
|
|
135
|
+
- **Pins.** `test/backlog2793-ask-sentence.test.ts` (the view-kind table and the clause; three readings mint exactly two ask sentences, the spelling one historical, row before clause; the real judge and the real deny set on a real filesystem for the direct spelling, a one-hop alias and a chain hop; the data root's identity exemption; neither guard keeps a private mapping or wording); `test/live-write-protect-ask.test.ts` (offline half: the sentence family; live half: each distinct sentence, asked beside a call consistent with it, yields a parseable ruling — the two rulings are printed, not compared; the old "three sentences agree on one fixed call" cell is retired, KL-842-live closed); rewritten to the new words: `test/backlog851-symlink-chain-hops.test.ts`, `test/backlog1737-probe-states-no-approver.test.ts`.
|
|
136
|
+
|
|
137
|
+
### A test run no longer leaves its fixture directories in the temp root — one net in the suite's setup file removes every `mkdtemp` result under it, and `gate:tmp-hygiene` measures that it does (#2194; test infrastructure — no behaviour change; hard-breaking: none; closed sets: none; exports: none; members: none)
|
|
138
|
+
|
|
139
|
+
- **Before.** About eight hundred test files make their fixture directory with `mkdtemp(join(tmpdir(), "<prefix>-"))` and most never remove it. One host collected 108,602 top-level entries in its temp root in 17 hours (about 45,000 under this repository's prefixes); listing the directory, the file-event daemon and the page cache all got slower for every other process on the machine. One test file alone, run once, left 828 (`b1685*`), 700 (`b1672*`) or 505 (`b1643*`) entries behind.
|
|
140
|
+
- **Now.** `test/setup-reap.ts` wraps the three `mkdtemp` entry points (`mkdtempSync`, `mkdtemp` with a callback, `fs.promises.mkdtemp`) once per worker and publishes the wrappers to the ESM named exports, so every spelling a test or the code under test uses is covered. A directory made strictly inside the physical temp root is registered by its physical path, with the temp root, the working directory and the `encoding` option read when `mkdtemp` is called (a result written as hex or as bytes is decoded to its pathname); the registry is emptied at the end of each test file (after the file's own hooks, so a test's own cleanup still finds its directory) and on the worker's exit / SIGINT / SIGTERM passes. Only registered paths are removed; each removal first checks that the path still resolves to itself (a path with a link now in it — an ancestor swapped for a link to somewhere else, even somewhere else inside the temp root — is refused and named), the temp root itself is never registered, a process whose working directory lies inside a directory about to be removed steps back to where the worker started, and a failed removal is a stderr warning, not a red. A directory outside the temp root is neither registered nor mentioned. `SEMA_KEEP_SCRATCH=1` — the switch `scripts/scratch-dir.mjs` already had, now read by one function (`keepScratchRequested`) for both lifecycles — keeps the directories and names each on stderr; any other non-empty value other than `0` is said aloud once and reads as "remove".
|
|
141
|
+
- **Gate.** `gate:tmp-hygiene` (`scripts/verify-tmp-hygiene.mjs`; static tier of `gate:all`) runs a fixed batch of six test files — five that left 34 to 505 entries each before the net, and the net's own pin — under a private temp root of its own (never the shared one, which other processes write to) and is red unless the root is empty afterwards, naming the five most frequent prefixes; a batch that did not pass is red whatever the count, and so is a batch file that executed no test (read from the runner's JSON report — a filter that matches nothing is not an error to the runner). `--full` runs the whole suite; file arguments run those files.
|
|
142
|
+
- **Out of reach, on purpose.** A directory made by a child process (a spawned engine, a probe), by a call that is not `mkdtemp`, or by a worker killed outright: the net lives in the worker's own `fs`. The gate counts them if they happen inside its batch (KL-2194-a). The file-end pass is skipped when a file's hooks are (every test skipped, collection failed) or when an `afterAll` registered after it throws, and a function returned by a file-level `beforeAll` runs after it; the worker's exit pass then removes what is left.
|
|
143
|
+
- **Consumers.** None — the net, the gate and the cases are repository-only (not in the package: the `npm pack --dry-run` file list is unchanged).
|
|
144
|
+
- **Pins.** `test/backlog2194-tmp-hygiene.test.ts` (in-process: registered directories removed and an unregistered sibling left, a swapped ancestor refused, the working directory left first; child process, each with a temp root of its own: nine `mkdtemp` spellings gone after the file with their contents and still there at the file's own last hook, an outside directory left alone and unmentioned, the keep switch and its bad value, a worker signalled mid-file — and not outliving the signal —, a file's directories gone before the next file starts in the same process; the gate's verdict and report-reading functions; in-process: a link retargeted inside the temp root, results written as hex and as bytes, a temp root changed while a call is in flight, a differently-cased spelling of the root), `test/gate-all-roster.test.ts` (the gate's seat); fourteen mutants of the net, each red in at least one cell.
|
|
145
|
+
|
|
146
|
+
### An input says what brought it, and a leg's word is the word of the input that opened it — a wake opens its leg with the newest input it hands over (`PendingSteerInput.runOrigin`), each `human_input` frame carries its input's word, a one-input message carries it too, and a resume config carries none (#2664, #1556 slice S2, design/2664 r2, ruled C-R873 and its note 1, C-R867 note 1; behavior change for a woken leg and for a resume config, open to veto; hard-breaking: two closed-set words (below); closed sets: `PENDING_STEER_FROZEN_FIELDS` +1 `runOrigin`, `STEER_REPLAY_FACETS` +1 `runOrigin`; exports: none; new optional members `human_input.runOrigin`, `UserMessage.runOrigin`, `PendingSteerInput.runOrigin`, `PendingSteerEntry.runOrigin`) (@cli @client-core @web-client @server @test)
|
|
147
|
+
|
|
148
|
+
- **What changed.** The run-origin word (`"scheduled"`) was a task's: a scheduled task a person woke still reported
|
|
149
|
+
`scheduled` on the woken leg, its next parked row and the inbox; a task a person started and the scheduler woke reported
|
|
150
|
+
nothing; and no `human_input` frame or transcript message said `scheduled` at all, so a UI rendered the scheduler's objective as
|
|
151
|
+
someone typing. The word is now an input's, stated by its host on the input's carrier — the objective's `TaskSpec.runOrigin`, a
|
|
152
|
+
parked or waking message's `runOrigin` — and a leg's word is the word of the input that opened it: the objective for a fresh
|
|
153
|
+
leg; for a wake, the NEWEST input the wake hands over — its message, else the parked entry it delivers last — so a
|
|
154
|
+
message-bearing wake and its atomic equivalent (`setPendingSteer`, then a message-less wake) answer the same. An input that
|
|
155
|
+
says nothing makes the woken leg say nothing — there is no fall-back to the row. A decision on a parked leg (approval,
|
|
156
|
+
resource limit, review) opens nothing and continues the word the parked leg recorded. The manifest's `leg.runOrigin`, the row
|
|
157
|
+
a leg parks (`state.runOrigin`) and its listing (`CheckpointSummary.runOrigin`) read that one value, so the inbox names the leg
|
|
158
|
+
that raised an approval. Each input's own word rides its `human_input` frame (objective, wake message, parked steer — applied
|
|
159
|
+
or withheld); a message that carries one input carries it too (`UserMessage.runOrigin`, the objective's), while a resumed
|
|
160
|
+
leg's continuation — several inputs in one message — carries none, exactly like `actor`.
|
|
161
|
+
- **Resume config (behavior change against #1556 S1, unreleased; open to veto).** A resume config carries no run origin —
|
|
162
|
+
`ResumeTaskConfig` omits `runOrigin` beside `objective` and `userAttachments`, and a config that carries one anyway — the
|
|
163
|
+
row's own word included — is refused before the claim (`checkpoint.config_refused`,
|
|
164
|
+
`detail.code: "config.run_origin_invalid"`, the row pending; the sentence says to omit it and that a wake states its word on
|
|
165
|
+
its message). A resume hands the engine no objective, so the field had nothing of its own to describe, and a restatement of
|
|
166
|
+
the row could silently disagree with the word a wake opened the leg with. A bad `message.runOrigin` (or `setPendingSteer`
|
|
167
|
+
`runOrigin`) is refused loudly before the claim, `steering.invalid_content` (the steering entry's own refusal family); a
|
|
168
|
+
hand-built resume that skips the entrance meets the config doors' `config.run_origin_invalid` on the same value.
|
|
169
|
+
- **Hard-breaking (two closed-set words).** *What changed*: `PENDING_STEER_FROZEN_FIELDS` gains `runOrigin` (a parked entry may
|
|
170
|
+
carry it) and `STEER_REPLAY_FACETS` gains `runOrigin` (re-parking an `inputId` under another word is
|
|
171
|
+
`steering.duplicate_input_id`, `detail.differs: ["runOrigin"]`, not a replay). *Who is hurt*: a consumer that pins either set
|
|
172
|
+
(a store's round-trip table, a test enumerating the facets); in a mixed fleet an older worker refuses a wake or a
|
|
173
|
+
`setPendingSteer` that carries `runOrigin` as an unknown steering field (`steering.invalid_content`, before the claim — the frozen
|
|
174
|
+
set's designed refusal), and an older worker that claims a row on which a newer host parked a worded steer, and re-parks that
|
|
175
|
+
steer before delivering it, has its own `setPendingSteer` refuse the entry — the instruction is lost. *Migration*: add the word
|
|
176
|
+
to the pinned tables; upgrade every worker and store adapter before a scheduler stamps a wake message or a parked steer; a
|
|
177
|
+
deployment that never stamps it writes byte-identical entries.
|
|
178
|
+
- **New members (additive).** *What changed*: `human_input` frames gain `runOrigin`, `UserMessage` gains `runOrigin` (attribution
|
|
179
|
+
metadata — `stripEngineMetadata` strips it; built-in brains never send it). *Who is hurt*: a renderer that shows every objective
|
|
180
|
+
or wake message as typed user input keeps doing so until it reads the member; a custom Brain that serializes messages whole
|
|
181
|
+
without `stripEngineMetadata` would see one more key. *Migration*: render a frame / message carrying `"scheduled"` as the
|
|
182
|
+
scheduler's; unknown members stay ignored.
|
|
183
|
+
- **Import.** The session-import door keeps a `UserMessage.runOrigin` that is a member of the set and drops anything else, with no
|
|
184
|
+
operator flag — the word grants nothing and the importer is a host that could state it on a task it starts (the posture the
|
|
185
|
+
door already gives `engineMinted`, not `actor`'s, whose strip guards an ingress-verified identity).
|
|
186
|
+
- **Trust.** Stamp `message.runOrigin` (and a parked steer's) only on the deployment's own scheduler path, never from a request
|
|
187
|
+
body.
|
|
188
|
+
- **Consumers.** @cli / @client-core / @web-client: read `human_input.runOrigin` to render a scheduled objective, wake message or
|
|
189
|
+
parked steer as the scheduler's, and `UserMessage.runOrigin` on a one-input message (the objective) when replaying a
|
|
190
|
+
transcript. @server: stamp `message.runOrigin: "scheduled"` where the daemon wakes a parked task (or on the steer it parks
|
|
191
|
+
before a message-less wake), not from the request body; strip `runOrigin` from a stored spec replayed as a resume config; after a
|
|
192
|
+
woken leg parks, the row carries the woken leg's word (`CheckpointSummary.runOrigin`); a SQL store that rebuilds parked entries
|
|
193
|
+
member by member must keep `runOrigin` (`PENDING_STEER_FROZEN_FIELDS` names it), and so must one that rebuilds a resolved
|
|
194
|
+
row's stored wake outcome (its `message`). @test: the two KL-1556-a directions as black-box cells, in both the message form
|
|
195
|
+
and the park-then-wake form.
|
|
196
|
+
- **Not yet.** An input that opens a model turn inside a leg — a live `"later"` steer — or rides a decision resume does not
|
|
197
|
+
change the leg's word (KL-2664-a); the live `TaskStream.steer` and next-turn carriers take no word; a resumed leg's
|
|
198
|
+
continuation carries no per-input word in the transcript; a compaction that drops the objective's message drops its word from
|
|
199
|
+
the transcript with it.
|
|
200
|
+
- **Pins.** `test/backlog2664-message-origin.test.ts` (real Runner): the objective's frame and message; both KL-1556-a directions on
|
|
201
|
+
the leg and the frame, in the message form and the park-then-wake form; the woken leg's re-parked row and listing in both
|
|
202
|
+
directions; six bad message words, a wake config that declares a word and one that restates the row's refused before the
|
|
203
|
+
claim, row pending; a withheld parked steer's frame; the newest-input rule; the replay facet; an approval resume (leg word
|
|
204
|
+
continued, continuation carries none); the strip and the import door. Re-pinned in `test/backlog1556-run-origin.test.ts`: a
|
|
205
|
+
restating resume config is now refused before the claim.
|
|
206
|
+
|
|
207
|
+
### A session's write faces live on the store contract under one write law: `SessionStore.logTransfer` moves a log between backends through a staging nobody reads before its commit, `SessionStore.delete` deletes a session at its owner's request, and a deployment's cleanup runs before every row the bundled store deletes (#1468 S4 / #2166; behavior narrowing, open to veto; hard-breaking: 2 — `SessionRepo.importEntries` refuses an import onto a row that is not the importer's, and the store kit's optional-face report names two more faces; closed sets: +2 words `logTransfer` / `delete` on `SessionStoreContractHooks.onOptionalMember`'s `member`; exports: +6 types `SessionLogTransfer`, `SessionLogExportOptions`, `SessionLogReplace`, `SessionLogCommit`, `SessionLogCommitView`, `SessionStoreHooks`; members: optional `SessionStore.logTransfer` / `SessionStore.delete`, `TtlSessionStoreOptions.hooks`, `FileStorageBackendOptions.sessions`) (@server @dgx)
|
|
208
|
+
|
|
209
|
+
- **Before.** A cross-backend move of a session had no face on `SessionStore`: a deployment wrote the session rows itself, or reached under the store to `SessionRepo.importEntries`, which replaced the log of an existing row whoever imported it — another principal's import onto an owned row, or an anonymous import onto one, replaced the owner's history and kept the owner. A deletion at an owner's request had no store face either, and a deployment's own records keyed by a session id (a title, a pin) had no hook on the rows the bundled store deletes. And `TtlSessionStore` served a cached view while the row named the same occupant, so a log replaced under that occupant — an import through the repo, or through another store instance — was not seen until the view was dropped: the next acquire handed out the old history.
|
|
210
|
+
- **Now.** One write law, read by every face that writes a session's log (`importRowCells`, the bundled repos' one reading): an existing row keeps its occupant and its owner and takes a new log only when it is already the committer's (owners compared null-safe; `undefined` names `null`); another owner's row is refused `conflict` and a placed row `placement_refused`, with nothing written, and the check and the write are one step, so a row another writer created after the committer looked is refused, never taken; an id with no row becomes a row recording the committer and a fresh occupant. `SessionStore.logTransfer` (optional) carries it to the store: `listEntryIds` / `exportStream` read the whole log (`null` = no row; `exportStream({ afterSeq, batchSize })`, a bad option refused `config.invalid_argument`), and `beginReplace(id, { preserveActorAssertions })` opens a staging whose `append` passes each batch through the import gate (`StreamingImportValidator`; a refused batch ends the staging) and whose `commit({ owner, decide })` judges the write law first — `decide` is never asked about a row the committer may not write — then hands `decide` the destination's ids as they stand now and the staged ids (with a `read` of either side), writes on `"replace"`, leaves the log on `"keep"` (refused for an id with no row), and answers the row's head, all under the store's hold of the id; a refusal, or a throw from `decide`, writes nothing (against writers the hold does not see — another instance, the repo — the commit's step is the repo's conditional import; see the conditional row writes below). Staged entries are detached copies, and `decide` reads copies of both sides, so nothing it writes to reaches a log. The first commit call ends the staging, whatever its outcome. `SessionStore.delete(id, { owner })` (optional) deletes only a row whose owner is `owner` (`null` deletes only an anonymous row; a placed row is `release`'s), answers whether it deleted, and refuses a guard that names no owner. `TtlSessionStoreOptions.hooks.beforeSessionDelete` (and `FileStorageBackendOptions.sessions`, which reaches it) runs, awaited, before every row the store deletes — the owner's delete, a placed release, an `evict: "delete"` release or idle sweep — and when it rejects the row stays and the deletion rejects with it, and an owner's `delete` or a placed release called again runs both again (an ordinary release that failed has dropped its view and, as before, deletes nothing on a second call); after the hook the deletion lands only on the row the store judged (the repo judges it in the removal's own step, below), so a row another writer created under the id meanwhile is not deleted. A hooks record is read by the receipt law: a getter that throws, a member the store does not run or a member that is not a function is refused `config.invalid_argument`. `TtlSessionStore` serves a cached view only while the row names its occupant and holds its leaf; a commit through the store drops the view inside its hold, and an acquire whose resolution of the id a hold (a commit, a delete, a release) overtakes resolves it again after the hold instead of publishing the view it read. The bundled store implements both faces over a repo with `readRow`, `importEntries` and a head read (both bundled repos; `delete` needs `readRow` and the head read); its staging lives in process memory and ends with the process (a store that stages durably owes a sweep of abandoned stagings; the face has no member for it until such a store lands).
|
|
211
|
+
- **Hard-breaking.** (1) *What changed*: `SessionRepo.importEntries` onto an existing row refuses `conflict` unless the row's owner is the importer (null-safe), and refuses a placed row `placement_refused`; the store kit `sessionRepoContract` pins it. *Who is hurt*: a caller that imported onto another principal's row, or anonymously onto an owned one, and relied on the log being replaced; a third-party `SessionRepo` that replaced the log of any row — it now fails the kit's import case. *How to migrate*: import as the row's owner (a deployment that moves a session on behalf of its recorded owner passes that owner), or delete the row first; a repo applies the same reading (`importRowCells` in the bundled repos) in the step that replaces the log. (2) *What changed*: `SessionStoreContractHooks.onOptionalMember` reports `member: "logTransfer"` and `member: "delete"` too. *Who is hurt*: a kit consumer that asserts the exact set of reported faces, or switches over `member` exhaustively. *How to migrate*: add the two words (a store without the faces reports them `absent`).
|
|
212
|
+
- **@server.** The session-sync commit maps onto `logTransfer.commit` with one change of argument: the commit's `owner` is the owner cell the import's gate judged when that cell names a row (`expectedOwner === undefined ? importingPrincipal : expectedOwner`) — the write law then is the store-side owner check the route's `expectedOwner` comparison makes today, and a commit whose gate saw no row but meets a row of the importer's own refuses in `decide` (it sees `current` non-null). The narrow legacy arm that commits an anonymous row under the default principal stops re-stamping the row's owner (today the SQL upsert writes `owner = 'default'` over `NULL`); under the law that commit passes the recorded `null`. `OwnerAwareSessionStore`'s import / replace / staging / delete faces map onto `logTransfer` / `delete`; `restamp` is `keep`. The local lane's `LocalSessionStore` keeps owners in its own sidecar while the core rows it creates carry `null`: its replace (delete, then import onto the absent id) is not affected; its fresh-only `importEntries` onto a row that exists, with a named owner, is now refused `conflict` instead of replacing that row's log. A row-deletion cleanup of the deployment's own tables (title, pin) is `beforeSessionDelete` on the File lane. The SQL stores keep the same law in one transaction per commit / delete; the conditional row writes below give the bundled store the same row-level step.
|
|
213
|
+
- **@dgx.** A File-lane deployment that imports sessions through `FileSessionRepo.importEntries` imports as the row's owner; one that keeps its own records per session id wires `FileStorageBackendOptions.sessions.beforeSessionDelete`.
|
|
214
|
+
- **Pins.** `test/backlog1468-s4-session-write-faces.test.ts` (W1–W5; red on the previous release for every pin: the foreign and placed imports replaced the log there, and a repo import's new log was not served); the kit's `[transfer]` and `[delete]` groups, run on the in-memory, File and `FileStorageBackend` lanes by `test/backlog1468-s1-session-store-kit.test.ts`; `sessionRepoContract`'s import case. Re-pinned to the law (they pinned the replaced log): `test/backlog1468-s2-session-row-head.test.ts` H4c and the three H8 cases. Ratchet: `comment-ratio-ratchet` `src/core/store-contracts` 0.1742 → 0.1600 banked (the kit's new groups are case code).
|
|
215
|
+
- **Known limits (KL-1468-s4-b / -c; KL-1468-s4-a, the per-instance atomicity, is retired by the conditional row writes below).** A log replaced through another instance by one with the same entry ids keeps that instance's view standing (its occupant and leaf match). `list` lends a standing view's last run to a row whose log was replaced. An idle sweep whose deletion hook rejects keeps the row without a retry. `SessionStoreHooks` carries no leaf-advance hook (the bundled store does not observe a session's writes).
|
|
216
|
+
|
|
217
|
+
### A store's retention word has one reading — the deployment deletes this store's rows on schedule — and the party that runs the sweep gives it when it constructs the store; the deployment's startup check holds the word to the executor it runs, and the per-leg preflight judges the words alone (#1468 T4; hard-breaking: 2 — `assertRetentionCapability` requires `executor`, and the three bundled declarers' `retention` member widens from the literal `"none"`; open to veto: an executor stated absent refuses every "managed" store, locked or not; closed sets: none; exports: +1 `readRetentionDeclaration`; members: optional `TtlSessionStoreOptions.retention`, the `retention` constructor option of `InMemoryCheckpointStore` and `InMemoryToolResultStore`, required `executor` on `assertRetentionCapability`'s input) (@server)
|
|
218
|
+
|
|
219
|
+
- **Before.** The word had two readings: core's documents said a store declaring `"managed"` PROMISES the `ManagedRetentionCapability` methods, while the deployment that declares it read it as "this store's rows are deleted on schedule by the deployment's managed retention" — the methods live on one executor that spans several stores, not on each store. And the word was a class constant: the bundled stores carried `"none"` for every deployment, a deployment's SQL store classes carried `"managed"` for every deployment, so a store taken out of the assembly that runs the sweep kept its word while nothing deleted its rows. Whether a deployment that declares managed stores runs any executor was judged by the deployment alone, after core's check had passed.
|
|
220
|
+
- **Now.** One reading, written in `retention.ts` and on each declaration face: `"managed"` = this store's rows are deleted on schedule by the deployment; `"none"` (or absent) = nothing deletes them on schedule. The bundled declarers take the word as a constructor option — `new TtlSessionStore({ retention })`, `new InMemoryCheckpointStore({ retention })`, `new InMemoryToolResultStore({ retention })` — default `"none"` (unchanged), read by the one declaration reader, `readRetentionDeclaration` (now exported from the package root; `@sema-agent/core-stores-sql` reads its `retention` option through it too), so a word other than the two is refused at construction (`config.retention_capability`). The file backend runs no executor, so its stores stay `"none"`: its options carry no word, and a word an untyped caller hands it anyway is refused before it takes its root (it used to be dropped). The check is two calls over one reader. The per-leg prepare preflight, which holds no executor, runs the declaration half alone (the policy value, each store's word, and the locked policy over `"none"` stores — as before). The deployment's startup call `assertRetentionCapability({ policy, locked, stores, executor })` runs that half and holds the words to the executor it runs: `executor` is required — the deployment's `ManagedRetentionCapability` (a backend's `retention` member) or `null` when it runs none, `undefined` refused naming it, so a backend's absent member is never read as "judge the words alone"; with `null`, every store declaring `"managed"` is refused naming those stores, locked or not; an executor whose four members are not all functions, or whose member read throws, is refused naming the member — whatever was thrown, the refusal is coded (the thrown value is read by the one guarded describer); a `"none"` store beside an executor is refused only by a locked policy. The refusal of an unparseable word now describes any value (a `bigint` word threw a raw `TypeError` from the message builder before).
|
|
221
|
+
- **Hard-breaking.** (1) *What changed*: `assertRetentionCapability`'s input requires `executor: ManagedRetentionCapability | null`; a call without it fails to compile, and at run time one without it (or with `undefined`) is refused `config.retention_capability`. *Who is hurt*: every deployment that calls the startup check — the server's governance seam calls it with `{ policy, locked, stores }`. *How to migrate*: pass the executor the deployment runs, or `null` when it runs none: `executor: backend.retention ?? null`. (2) *What changed*: the `retention` member of `TtlSessionStore`, `InMemoryCheckpointStore` and `InMemoryToolResultStore` is typed `RetentionDeclaration`, no longer the literal `"none"`. *Who is hurt*: code that holds the member as the literal type (`const r: "none" = store.retention` fails to compile). *How to migrate*: type it `RetentionDeclaration` (its value is still `"none"` unless the constructor was given `"managed"`).
|
|
222
|
+
- **@server.** At the startup call, pass the executor: `assertRetentionCapability({ policy, locked, stores, executor: retentionExecutorWired ? retentionExecutor : null })` — required now (hard-breaking 1) — and core answers "a store says managed and nothing deletes its rows"; the deployment's own `retentionExecutorWired` judgment beside it retires. That judgment only warned when the policy was unlocked; core refuses, locked or not — a narrowing: an unlocked SQL deployment with the sweep lane off, whose SQL store classes still carry `MANAGED_RETENTION`, is refused at startup until its assembler gives those stores `"none"`. The `MANAGED_RETENTION` / `UNMANAGED_RETENTION` store-class constants retire when the SQL stores move into `@sema-agent/core-stores-sql` (its backend factory gives the word from `SqlStorageBackendOptions.retention`); until then they keep compiling — the change for them is the reading. PICK7570 must-check.
|
|
223
|
+
- **Pins.** `test/backlog1468-t4-retention-declaration.test.ts` (each declarer × absent / `"none"` / `"managed"` / a bad word at construction; the member's type; the root reader; `executor` omitted / `undefined` / a backend's absent member refused, at the type and at run time; each declarer given `"managed"` × a complete executor under a locked policy / `null` locked or not / an executor missing each of the four members; a member that is not a function, a member read that throws an Error, an Error whose `message` getter throws, a Proxy whose prototype trap throws, a symbol and a bigint; a non-object executor; the words half alone; the full chain through a Runner's prepare preflight, managed and one seat left at the default; the file backend has no option, refuses one handed to it before taking its root, and its stores read `"none"`). Re-pinned to the two calls: `test/retention-declaration.test.ts` (the words half) and `test/backlog1468-k3-engine-backend.test.ts` (the startup call with the backend's executor). Ratchet: `module-size-ratchet` `src/core/checkpoint-store.ts` 4 076 → 4 077 banked.
|
|
224
|
+
- **Known limits (KL-1468-t4-a / -b).** The per-leg preflight holds no executor, so a deployment that skips the startup call and declares a store `"managed"` while running no executor is judged by its words alone there, as today (exit = an executor seat the preflight can read). An option bag whose `retention` read itself throws (a throwing getter, a Proxy) makes the constructor throw that value, uncoded — as every other member of those option bags does.
|
|
225
|
+
|
|
226
|
+
### A ledger's year-less `MM-DD` window is read by one function, against the row's filing day — the debts gate no longer calls next year's window due (#2805; release tooling only, `src/` untouched; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
|
|
227
|
+
|
|
228
|
+
- **Before.** `scripts/verify-debts.mjs` read a date window as that day of the CURRENT year, so a window `01-05` filed in October was "due" on 2026-10-25: four server rows (S-1064, S-1442, S-1495, S-1813) were named by `gate:debts:rc` and worked around by hand. After New Year the same reading failed the other way — a window `10-27` read as the next October and dropped out of the due list. `scripts/verify-backlog-ledger.mjs` kept a second, different year rule (the year that puts the day in [today − 274, today + 90]).
|
|
229
|
+
- **Now.** `windowDateOf(window, filedOn, today)` in `scripts/ledger-dates.mjs` is the only year reading, and both gates call it. The filing day is the most recent day with that month-day that is not after today (a row is not filed in the future); the window falls in that year, or in the next when its `MM-DD` is earlier than the filing day's (a window ON the filing day is the same year's). The debts gate takes the filing day from the row's 开账 cell; the backlog-ledger gate takes it from the window's own note, the stamp a row already carries: `10-30(10-25 11:2x 立)`. A row with no readable filing day has no year to take: red, named (`立票日缺席,窗无法定年`), never read against the current year. A day that is not on the calendar (`13-45`, `02-30`, `02-29` in a common year) is named too. The ledger gate keeps its 90-day horizon (`MM-DD` more than 90 days ahead is a version, not a date). `VERIFY_DEBTS_TODAY=YYYY-MM-DD` pins the debts gate's day, as `BACKLOG_LEDGER_TODAY` does the ledger gate's; both read the pin through `isoDayOf` (exactly `YYYY-MM-DD`), and one that is set but not a day on the calendar (`soon`, `2026-02-30`, which `Date` alone would roll over to March) exits 2 — never the real today, never a rolled-over day.
|
|
230
|
+
- **Who is hurt.** Nobody at runtime. A live row of the core ledger whose window is a bare `MM-DD` and whose window note carries no `MM-DD HH:Mx 立` stamp is red from now on, naming the missing stamp; the ledger holds no such row (996 live rows at this tree: 353 version windows, 643 pending), so the gate reads the same ledger identically before and after. A debts row is unchanged in form — 开账 was already a required column.
|
|
231
|
+
- **Readings.** `gate:debts:rc` at 7.58.0 over the real ledgers, base gate vs this one, on 2026-10-25: DEBTS-core 0 → 0 due; DEBTS-server 6 → 2 (the four rows above leave; S-2275 and S-2359 stay, both truly due; seven CLOSED rows the format gate already rejects were set aside so the RC arm is reached); cli, client-core, test, deploy and web-admin unchanged. Pinned to 2027-01-06: DEBTS-server 3 → 329 due — 326 overdue rows the current-year reading carried as next October. Core ledger gate: 0 findings before and after.
|
|
232
|
+
- **Consumers.** @server: the four rows you carried by hand are no longer named at the RC gate; the workaround (`--year-wrap-move`) can be retired once you read this release's gate.
|
|
233
|
+
- **Pins.** `test/backlog2805-window-date-year.test.ts` (47 cases: the reader R1–R8 and the clock pin R9; the debts gate D1–D11 over a throwaway ledger and over the four server rows copied verbatim into `test/fixtures/backlog2805-debts-server-four-rows.md`; the ledger gate L1–L6; both gates answering the reader's answer on nine triples, and neither keeping a year reading of its own). Eleven mutations (no wrap / absent falls back to the current year / either gate bypasses the reader / window on the filing day wraps / a future filing day kept / ledger ignores the stamp / debts drops 开账 / horizon removed / due-day exclusive / the clock pin rolls over) are each red; 15 of the 47 are red on the base gates. The date-window fixtures of `test/backlog-ledger-gate.test.ts` carry the stamp.
|
|
234
|
+
- **Known limits.** The filing day carries no year, so a row left open for more than a year reads against the latest such day — a window in the months ahead of it is not yet due, as before. `scripts/rulings-gate.mjs` reads a bare `MM-DD` on its own rule (today's year, shifted back when more than 183 days ahead) and still calls a next-year window such as `01-05` due on 2026-10-25; it keeps no filing day and is not changed here.
|
|
235
|
+
|
|
236
|
+
### A session row is written only as it was read: `SessionRepo.importEntries` and `SessionRepo.delete` take an expectation the repo judges in the write's own step, the import answers the head it wrote, and `SessionRepo.readRow` reads a row whole — the bundled store's commit and every deletion it makes go through them (#2583, design/2583 slice S1; hard-breaking: 2 — `SessionRepo.importEntries` answers a `SessionHead` (it answered nothing), and a repo with `readRow` judges the expectation of the writes it is handed; behavior narrowing, open to veto; closed sets: none; exports: +2 functions `sessionRowMatches`, `sessionLogMarkOf`, +3 types `SessionRowExpectation`, `SessionRowRead`, `SessionLogMark`; members: optional `SessionRepo.readRow`, `SessionRepo.delete`'s optional `expect`, the `expect` option of `SessionRepo.importEntries`) (@server @dgx)
|
|
237
|
+
|
|
238
|
+
- **Before** (the write faces above, as first landed). The store's write faces were atomic only against its own writers. A commit read the row's metadata and its log in two reads, so `decide` could be shown the log of a row another owner created under the id in between; a write through another instance landing while `decide` weighed the destination was overwritten by the commit; and the head was read after the write, so a fault there rejected a commit whose log was already in place. Every deletion judged the row, ran the hook, judged it again and then deleted the id unconditionally, one await later.
|
|
239
|
+
- **Now.** One rule for every write that must land only on the row it judged: it carries the row as the judging read found it — a `SessionRowExpectation`, the occupant (`row`: its owner and occupant cell; `null` = no row) and, when the log binds, the log's mark (`log`: its length and last entry id, `sessionLogMarkOf`) — and the repo judges it inside the write's own step with one function, `sessionRowMatches`; a miss writes nothing and is refused `SessionError("conflict")`, the answer the leaf CAS already gives a stale append. The occupant cell is compared as written (a row from before the cell existed matches only an expectation without one: every write that creates a row mints a token, so such a row cannot be created again). `SessionRepo.readRow(id)` (optional) reads metadata, head and whole log of one row generation; `SessionRepo.importEntries` judges `options.expect` with the write law and answers the head of the row it wrote. A commit now reads the row once, judges the owner on that read, shows `decide` that log, and imports expecting that row and that log, answering the head the import wrote (on `"keep"`, the head read). Each deletion the store makes passes the row it judged: an owner's delete and a placed transcript's deletion expect the occupant they read BEFORE the hook ran (an append to it does not make it another row), an `evict: "delete"` release or idle sweep of a cached view expects the view's occupant and the view's log as it stands after the hook (an append through the view itself is still its log; a write through anyone else is not), and a cold release expects the head it read before the placement (no row read ⇒ it deletes none). A missed expectation answers `false` (`SessionStore.delete`) or deletes nothing (`release`, sweep). Both bundled repos judge and write in one synchronous step (the in-memory repo reads its storage's mark synchronously; the File repo's reads and writes are synchronous file calls). The store passes expectations, and has `delete` and `logTransfer`, only over a repo with `readRow` (and a head read); over any other repo a deletion after the hook is of the id judged.
|
|
240
|
+
- **Hard-breaking.** (1) *What changed*: `SessionRepo.importEntries` answers `Promise<SessionHead>` — the owner and occupant of the row the write committed and the leaf its new log leaves it on. *Who is hurt*: a third-party `SessionRepo` implementing `importEntries` (a TypeScript one stops compiling; a JavaScript one that answers nothing makes the bundled store's commit refuse with a `storage` error saying the log was written and no head answered). *How to migrate*: answer the head from the write's own step (the leaf is the one after the new log's last entry). (2) *What changed*: a repo with `readRow` judges `expect` on `delete` and `importEntries` (`sessionRowMatches` with the row as it stands in that step; a miss ⇒ `SessionError("conflict")`, nothing written). *Who is hurt*: a third-party repo that adds `readRow` and ignores the expectation — the store would then delete or replace a row it did not judge; the repo kit's conditional cases fail it. *How to migrate*: call `sessionRowMatches(expect, row, () => sessionLogMarkOf(log))` in the step that writes. No repo in this release's consumers implements `SessionRepo` (the server's and the File lane's deployments use the bundled repos). The write faces above ship in this same release, so for a consumer they arrive once, with these primitives under them.
|
|
241
|
+
- **Behavior narrowing (open to veto).** A commit whose destination was written by anyone since the commit read it is refused `conflict` (before: the write landed over it); a deletion whose row was written, deleted or created again since it was judged deletes nothing (before: the id was deleted). A caller retries by reading the row again.
|
|
242
|
+
- **@server.** The SQL session stores implement `SessionStore` directly, so they keep the same rule in their own transaction: the commit's read, owner judgement, `decide` and write, and a delete's judgement and removal, each over a row revision every append moves (a `FOR UPDATE` on the session row alone serializes only writers that also lock it; a revision column, or a `SERIALIZABLE` transaction over the entries, covers appends) — the store kit's new `[transfer]` case (a write through a replica while `decide` runs is refused `conflict` and stands) is the check. The local lane's direct `repo.delete` / `repo.importEntries` calls on the bundled File repo pass the expectation of the row they read (`readRow` / `headOf`), or move to `SessionStore.delete` / `logTransfer`; without it they stay unconditional, as before.
|
|
243
|
+
- **@dgx.** A File-lane deployment that calls `FileSessionRepo.importEntries` directly reads its answer as the committed head (it answered nothing); to write only the row it read, it passes `expect`.
|
|
244
|
+
- **Pins.** `test/backlog2583-session-row-conditional-writes.test.ts` C1–C8 (on the previous state 14 of 17 red: the appended or leaf-moved destination overwritten, `decide` shown another owner's log, the post-write head fault rejecting and a write landing right after the import answered as the commit's head, the owner's delete and a cold placed release removing a row created in the last step, an eviction removing a replaced log, the judge absent; the three controls green on both); the repo kit's four conditional cases (`sessionRepoContract`) and the store kit's `[transfer]` replica case. Re-pinned: `test/backlog1468-s4-session-write-faces.test.ts` W6 (the post-write head fault no longer rejects the commit); `test/hardening-session-durability.test.ts`'s silently-dropping import answers a head; `test/compaction-state-carrier-omit.test.ts`'s three imports read the answered head (they pinned the import resolving to nothing).
|
|
245
|
+
- **Known limits.** KL-1468-s4-a retired. KL-2583-a: a log replaced whole by one of the same length ending on the same entry id between a read and a write is not told apart by the mark (the same gap as KL-1468-s4-b; a row log-revision cell closes both). KL-2583-b: a repo without `readRow` is handed no expectation (the hook's window stays open there). KL-2583-c: a leg writing through a view after a commit replaced its log — refused `log_closed` on the File lane, landing in the replaced object on the in-memory repo.
|
|
246
|
+
|
|
247
|
+
### Inside a worktree the write roots are that worktree — the structured write tools, the shell's write targets and the accept-edits gate read one write location; managed worktrees live at `<repo>/.sema/worktrees/<name>` on the new branch `sema/<name>`, refused when any managed level is a symlink; the write-protection table reads the current tree as its base checkout (#2290, design/1456 S1, #568 folded in; hard-breaking + behavior narrowing; open to veto)
|
|
248
|
+
|
|
249
|
+
- **Before.** EnterWorktree switched the working directory but every write root stayed the task root: from inside a worktree a
|
|
250
|
+
write to the base checkout, or to another task's managed worktree under `.sema-worktrees/`, passed the structured write tools
|
|
251
|
+
and the shell's write-target judgment as an in-root write (#568: one task could Edit another task's checkout). Trees were minted
|
|
252
|
+
DETACHED at `<repo>/.sema-worktrees/<name>-<random>` with no screen on a symlinked managed path, and a name the grammar did not
|
|
253
|
+
accept was silently sanitized.
|
|
254
|
+
- **Now.** The reference implementation's permission-root relocation ("This moves the session's working directory and write
|
|
255
|
+
access there"; "After a further switch, previously-visited worktrees are no longer writable"): a leg's write location is ONE
|
|
256
|
+
reader (`currentCheckoutOf`, the active worktree while one is tracked, else the task root), read live by every write-root
|
|
257
|
+
reader — Edit / Write / NotebookEdit containment, the shell station's write roots, and the `acceptEdits` mode gate's
|
|
258
|
+
accepted directories. A write outside the write roots is judged by the existing semantics (the structured tools refuse under
|
|
259
|
+
`writeFace: "roots"`; a shell write target there asks; under `writeFace: "open"` the tools do not judge containment, and the
|
|
260
|
+
accept-edits gate now asks for a base-checkout write instead of passing it). Read roots do not move. The one mint
|
|
261
|
+
(`addWorktree`, also the subagent isolation lane's) creates `<repo>/.sema/worktrees/<slug>` (a name's `/` flattened to `+`) with
|
|
262
|
+
`git worktree add --no-track -b sema/<slug>`; an existing branch or directory of that name is refused, never reset or reused; a
|
|
263
|
+
symlink at `.sema`, `.sema/worktrees` or the tree's own directory refuses the mint; names follow the reference grammar (each
|
|
264
|
+
`/` segment `[A-Za-z0-9._-]+`, ≤ 64 characters, no `.` / `..` / `.git` segment) and a bad name is refused. Removal (ExitWorktree,
|
|
265
|
+
the mint's own `destroy`) deletes the tree's own branch only while its tip is still the base commit (one compare-and-delete of
|
|
266
|
+
that ref, never through a symbolic ref; an unusable base witness keeps it); a branch carrying commits is kept and named in the
|
|
267
|
+
reply. The always-on write-protection table judges every view of a target inside the CURRENT managed tree (the EnterWorktree
|
|
268
|
+
switch, or a task root that is itself a managed tree — an isolated child) as the same relative path in its base checkout: an
|
|
269
|
+
ordinary file of the tree meets no `.sema` question, while the tree's own `.sema/settings.json` / `.git`, every sibling tree and
|
|
270
|
+
the base checkout's ancestry are judged as ever.
|
|
271
|
+
- **What changed (hard-breaking, three sentences).** Inside a worktree the write roots of the structured write tools, the shell
|
|
272
|
+
write station and the accept-edits gate are that worktree plus the existing additional roots, so a write to the base checkout
|
|
273
|
+
or to another managed worktree is judged as a write outside the roots; the managed parent moves from `<repo>/.sema-worktrees/`
|
|
274
|
+
to `<repo>/.sema/worktrees/` (`WORKTREE_PARENT` is now `".sema/worktrees"`), and every minted tree checks out the new branch
|
|
275
|
+
`sema/<name>` instead of a detached HEAD.
|
|
276
|
+
- **Who is hurt.** A model or skill that edits the main checkout while a worktree is active (now refused or asked); a deployment
|
|
277
|
+
or script that reads `WORKTREE_PARENT === ".sema-worktrees"`, lists that directory, or expects `addWorktree` to leave no branch
|
|
278
|
+
behind (a tree with commits now keeps its `sema/<name>` branch after removal); an EnterWorktree caller that relied on a random
|
|
279
|
+
suffix to reuse a name; trees still under `.sema-worktrees/` (registered git worktrees, no longer managed: a resumed session
|
|
280
|
+
inside one keeps writing it, a new mint never lands there). Deployments with `writeFace: "open"` see no change to the structured
|
|
281
|
+
tools' containment.
|
|
282
|
+
- **How to migrate.** Exit the worktree (or add the directory to `additionalDirectories`) to write the base checkout; read
|
|
283
|
+
`WORKTREE_PARENT` instead of a literal; move old trees with `git worktree move <old> <repo>/.sema/worktrees/<name>` or remove them
|
|
284
|
+
with `git worktree remove`; delete `sema/<name>` branches a reaper no longer wants with `git branch -D`.
|
|
285
|
+
- **Consumers.** @server — the SVC-3 isolation wrapper (`src/plugins/worktree-isolation.ts`) mints through `addWorktree`: its
|
|
286
|
+
trees move to `.sema/worktrees/` and gain a branch; a reaper or disk cap that scans by directory name reads `WORKTREE_PARENT`.
|
|
287
|
+
@cli — any display or cleanup of `.sema-worktrees` / detached worktrees; the EnterWorktree / ExitWorktree replies now name the
|
|
288
|
+
branch. @client-core — the worktree card (`type: "worktree"`) is unchanged in shape; the reply text names the branch and the
|
|
289
|
+
write-access move. Open to veto: the branch law `sema/<name>` (the reference CLI uses `worktree-<name>`), refusal of an existing
|
|
290
|
+
name instead of the reference's resume-as-is, and the current-tree-only narrowing of the `.sema` exemption (the reference
|
|
291
|
+
exempts every `.claude/worktrees` tree and relies on the write root for siblings).
|
|
292
|
+
- **Exports.** No names added or removed. `WORKTREE_PARENT` value changes; `AddWorktreeOptions` gains `name?`; `addWorktree`
|
|
293
|
+
resolves with `name` / `branch` / `baseSha?` beside `env` / `worktreeDir`; `ActiveWorktreeSession` gains `name?` / `branch?`
|
|
294
|
+
(validated by `normalizeWorkspaceState`); `WriteProtectionCompileOptions` gains `checkoutOf?`; `FsWriteGatePolicyOptions.acceptDirs`
|
|
295
|
+
also takes a getter.
|
|
296
|
+
- **Pins.** `test/backlog2290-write-root-path-law.test.ts` (real Runner lanes over real git: base-checkout and sibling writes
|
|
297
|
+
refused from inside a tree, writable again after Exit; a shell write there asks as a write outside the roots; the open-face
|
|
298
|
+
accept-edits gate asks; an aliased task root; the managed location and branch; branch kept when it carries commits, deleted when
|
|
299
|
+
clean; an existing branch refused; a record naming another branch, a branch turned into a symbolic ref and a null base witness
|
|
300
|
+
each delete nothing they do not own; a symlink at each of the three levels; the name grammar; the accept-edits gate comparing the
|
|
301
|
+
live roots as keys after a tree root is swapped for a link; the current-tree reading — ordinary file unasked (also through an
|
|
302
|
+
aliased root and for a leg whose task root is a managed tree), sibling / in-tree settings / `.ssh` ancestry still asked, a `..`
|
|
303
|
+
remainder / name-prefix sibling / case alias judged as they stand; the record's two allocation facts).
|
|
304
|
+
|
|
305
|
+
### A mod package on disk has one reader, `loadModPackage`; an admission record carries the registration's provenance and says what it only watches; three real packages drive a real run (#2809; additive export and additive wire member, behavior narrowing on `observe` (C-R925), open to veto; hard-breaking: none; closed sets: none; exports: +1 function `loadModPackage`, +2 types `ModPackageHost`, `ModPackageRegistration`; members: +1 optional `ModAdmissionRecord.provenance` on both arms, so `wiring_manifest.mods[].provenance?` and `mods.registration_refused` `detail.provenance?`; `KERNEL_CONTRACT_VERSION` stays 4 — this release's move, whose sentence now names the record's two members) (@server @cli @client-core @test)
|
|
306
|
+
|
|
307
|
+
- **Before.** A mod reached the engine only as an object a host built in code: nothing read a mod package from disk, and every mods pin drove in-process kernel objects. An admission record named a registration by name, seat and tier only, so a `wiring_manifest.mods[]` row could not say whether the host minted it or a deployment declared it.
|
|
308
|
+
- **Now.** `loadModPackage(dir, { tier?, provenance?, options? })` (`src/core/mods/package.ts`) reads `.claude-plugin/plugin.json` (`name`, and `version` / `description` / `author`), `hooks/hooks.json` (`modules` — exactly one `.mjs` path relative to it; `contract`, compared for equality with `KERNEL_CONTRACT_VERSION`; `uses`; `description`) and imports the module, returning the registration with a `digest`: the sha256 of the newline-joined sha256 of the three files' bytes, in that order. Every file it reads is, as the package stands when it is read, a regular file whose real path lies inside the package, opened once and judged and read through that one handle (a pipe is refused without waiting on it); a directory of the package changed while it is read — a link put in place of one — is outside what the reader judges: the directory is the host's, as the code in it is. A member either JSON file does not take is refused, never ignored; a refusal is `config.mods_invalid` naming the package directory and the file, never a manifest's text — what the module throws while it is imported is described as the kernel describes a throwing `register()`. The seat, tier, provenance and option values are the host's argument — a package that states a tier is refused. What the kernel judges of a registration (its name, `uses`, the `register` export, every `on`) is the kernel's screen at admission, not judged a second time. **The module is imported from the bytes read and hashed** (a `data:` URL of them, ruled C-R926 and its note 1), never from its path again: the module that runs is the module `digest` names, the same bytes are one module instance in a process wherever they sit, changed bytes load anew, and bytes put back are the first instance again. So a hooks module is one self-contained file: a relative or package import has nothing to resolve from and is refused when it loads (`… could not be imported (…); a hooks module is imported from its own bytes, so it is one self-contained file: a relative or package import has nothing to resolve from`); node builtins import as usual. What the module's code loads beyond its own bytes — an absolute URL, a file it reads — is its own act in the host's process and is not in `digest`. Wherever the runtime's sentence quotes the module's URL (its bytes, encoded), whole or cut, the refusal names the module by its path instead. The admission record carries the registration's `provenance` on both arms as the host gave it — absent when none was given, no default minted — and the refusal notice's `detail` carries it beside the record's other members.
|
|
309
|
+
- **Fixtures.** `test/fixtures/mods/` holds three packages written for this repository (`sec-default`: a deployment guard on `plugin.register`, `tool.check` and `tool.call` — the last refuses a held tool's call before its body runs, the one refusal whose `tool_end` names the extension in `answeredBy`; `diff`: a `classic.PreToolUse` rewrite with a read call of its own, a `classic.PostToolUse` line on the result, and a `tool.call` answer in place; `telemetry`: watch-only). They share names with the reference CLI's built-in mods and none of their code — the reference's source is not licensed for copying. They are not in the package's `files`.
|
|
310
|
+
- **`observe` says what a registration only watches (ruled C-R925).** A mounted record's `observe` lists the patterns of its `events` on which every handler the registration hung is a watcher (`{ observe: true }`); a pattern that also carries a judging handler is in `events` alone. So "this registration only watches" has one reading: `observe` present and holding every pattern of `events`. Before, a pattern with any watcher was listed, and a registration that watched and judged on one pattern had an `observe` equal to its `events` — indistinguishable from one that only watches (`src/core/mods/kernel/dispatch.ts`, the record's mint).
|
|
311
|
+
- **Behavior change (open to veto).** A host that gives no provenance sees records and notices byte-identical to before; one that gives one sees one more member on its `mods[]` rows and refusal notices. *Behavior narrowing*: a registration that hangs a watcher and a judge on one pattern no longer lists that pattern in `observe` (its record had it listed; a registration with no such pattern sees the same record). *Who is hurt*: a reader that took `observe` as "has a watcher here" — none in this repository; a reader that took `observe` equal to `events` as "watch-only" now reads it right. Nothing else at run time changes.
|
|
312
|
+
- **Consumers.** @server: S-2388's deployment loading calls `loadModPackage` once per declared package, logs `digest` as given, and keeps `assertDeploymentModsAdmitted` as the boot self-check; the `mods[]` projection picks members row by row, so `provenance` is a new optional member there — read it where present, never decide a code on its presence. @cli: the MO-1 view takes the optional `provenance` the same way; the three-cell wire sentences (refusal, answered in place, own call) are in the #2809 criteria. @client-core: the record type gains `provenance?`; "watch-only" is the mounted arm with `observe` holding every pattern of `events` (your U-10 — no new member); the refusal's extension name on `tool.check` (#2810) and the rewrite disclosure (#2811) are the two faces with no member yet. @test: the L1 cells and the server-lane chain are in the #2809 criteria; the server lane is blocked on the server's loading entry.
|
|
313
|
+
- **Divergence (open to veto).** Against the reference (2.1.309): `uses` is declared in `hooks.json` where the reference scans the module's source for it; `hooks.json` carries `contract`, which the reference has no member for; a hooks module is `.mjs` only (the reference takes eight extensions and transpiles); the module is imported from its own bytes, so a relative or package import is refused (C-R926), where the reference allows relative paths and its own module name and refuses a dynamic `import()`; `options` are the host's values as given (the reference fills a manifest's `userConfig` defaults); `plugin.json` takes four members and `hooks.json` four — `$schema` and settings `hooks` included are refused.
|
|
314
|
+
- **Pins.** `test/mods-real-e2e.test.ts` — D1–D12 (the reader: each file's members, the contract, the module path and an import-time throw described, containment by real path, no manifest text in a refusal, the kernel's own judgments, the digest and the module instance it names, a relative or package import refused without the module's bytes in the sentence whole or cut and a node builtin loaded, the running module's own URL holding exactly the hashed bytes, a pipe refused without waiting, one instance per bytes across paths and back again after a change), R0–R7 (one real Runner over the three packages from disk: the manifest rows in run order with provenance, the rewrite and the extension's own read call, the refusal at `tool.check` by name in the sentence and with no `answeredBy`, the card, the watcher's rows, a run without the watcher equal to one with it, the answer in place, the refusal at `tool.call` with `answeredBy`), K0–K5 (the run order across tiers and seats and each package's result line in that order, an unlisted task-seat package refused with its notice and its code never run, a task-seat allow under and over the deployment's refusal, one broken package among good ones, a failing watcher, a package that cannot mount), S1–S2 (the server's boot self-check over the three; the same three minted in code, as the server's chain is today, giving the same records, run and watcher rows as the packages); `test/backlog2809-admission-record-members.test.ts` — P1–P4 (`provenance` on both arms and on the notice as given, absent when none, not judged against a list), O1–O4 (`observe`: a pattern with a watcher and a judge in `events` alone, a watch-only registration's `observe` equal to its `events`, a judging one without the member, a handler hung with a matcher counted by its own options); `test/export-surface.snapshot.json` regenerated (+3); `scripts/consumer-smoke-probe.mjs` checks `loadModPackage`.
|
|
315
|
+
- **Known limits.** KL-2809-a: no server entry loads a package from disk yet, so the server lane here is the boot self-check and the code-minted comparison (S1, S2); the server-loaded run is verifiable once the server takes this release. KL-2809-b: `digest` names the module that runs, not code that module loads by an absolute URL or reads itself; the package's files are judged as the package stands when read (a directory swapped for a link meanwhile is followed).
|
|
316
|
+
|
|
317
|
+
### The redaction mark has one source, and the package root exports it; the agent name someone chose reads back from the root (#2821, #2822; additive exports, narrowing of two diagnostics, open to veto; hard-breaking: none; closed sets: none; exports: +2 `REDACTION_MARK`, `chosenAgentName`)
|
|
318
|
+
|
|
319
|
+
- **Before.** The bracket mark a redaction writes was spelled where it was written: `[redacted]` as a string literal in four modules (the pass runner, the egress tiers, the request-echo scrub, the terminal account's detail snapshot), its `-credentials` variant in three (the pass runner, the egress tiers, the route adjudicator's URL-userinfo strip), `-url` and `-path` in the egress tiers; and it was recognized by three hand-written patterns (the egress tiers' exact set; the pass runner's preexisting-mark count and the sub-agent display cut, each a looser `[redacted-<letters>]` shape). A host that had to tell "the engine withheld this" from a literal in the text kept a copy of its own (the server's reader, S-2408). Separately, "did someone choose this agent's name or is it the derived one" (`chosenAgentName`) was an internal reader: 7.57.0 made `name` required and gave an unnamed agent `agent-<12 hex>`, and a serving layer's roster could not read the fact back from the handle and the name.
|
|
320
|
+
- **Now.** `src/core/redaction-marks.ts` holds the table (`REDACTION_MARKS`: `whole`, `credentials`, `url`, `path`), the bare mark (`REDACTION_MARK`) and the one reading of "where are the marks in this text" (`redactionMarkerSpans`, and `eachRedactionMarkerSpan`, its lazy form — one pattern derived from the table; the display cut reads the lazy form, so a line of a million marks costs it the few before its bound). Every pass that writes a mark, the request-echo scrub, the terminal account, the route adjudicator, the preexisting-mark count and the display cut read it; no `[redacted` spelling is left in `src/` outside that file. The package root exports `REDACTION_MARK` (`"[redacted]"`) and `chosenAgentName(handle, name)` (`undefined` when the name is the one `engineAgentName(handle)` derives, else the name; `engineAgentName` was already a root export). What a redaction pass writes is byte-identical to 7.57.0.
|
|
321
|
+
- **Narrowing (open to veto).** *What changed*: a marker-SHAPED word that is not one of the four marks (`[redacted-foo]`) is no longer counted in `RedactionReport.preexistingMarkers`, and a display cut (`cutAt`, `redactThenCut`) that lands inside such a word is no longer moved back before it. *Who is hurt*: a reader that counted or guarded that shape; the engine writes no mark outside the four, so nothing it wrote is affected. *Why*: the egress tiers already read the exact set (a word a remote wrote is not a mark); the two looser patterns were a second reading of one question.
|
|
322
|
+
- **Consumers.** @server: S-2408 / S-2411 can delete the hand copy of the mark and read `REDACTION_MARK`, and read "chosen vs derived" from a row's handle and name through `chosenAgentName` (no stored column). @cli @client-core: nothing to do.
|
|
323
|
+
- **Pins.** `test/backlog2821-redaction-mark.test.ts`: the four spellings; the root values; every site driven through its real entry point with the table replaced by different spellings (a site that still holds a literal writes the old one); a scan of `src/` for a second spelling; `chosenAgentName` for the derived name, a chosen one, another agent's derived name and a handle that is not a durable agent handle; the exact-set reading of a mark.
|
|
324
|
+
|
|
325
|
+
### `tool_end.rewrite` — when the gate lets a call go with arguments other than the ones it took, the end frame says what it let the call go with and who replaced them (#2811, ruled C-R922 and its note 1; additive member; closed sets: +1 `RewriteAuthor` kinds `extension` / `policy` / `approver`; exports: +2 types `RewriteAuthor`, `ToolInputRewrite`; hard-breaking: none)
|
|
326
|
+
|
|
327
|
+
- **Before.** Three judges can replace the arguments a call's body is handed — an extension's `classic.PreToolUse` answer (`updatedInput`), the leg's restriction chain (`allow` / `ask` with `updatedInput`), the approver of an ask answering with an edit — and no frame member said so: `tool_start.args` is the model's own, and the bytes the gate let go reached only the loop (`ToolGateResult.updatedInput`, whose doc told a host to compare values — a host on the wire never had the value to compare).
|
|
328
|
+
- **Now.** `tool_end.rewrite = { by, input }`: `input` is the gate's frozen plain-data projection of the arguments it let the call go with (`finalInput`), `by` one `RewriteAuthor` per replacement that changed them, in the order they were made (`{ kind: "extension", name }` — this leg's registration, by name; `{ kind: "policy" }` — the bytes came back in the restriction chain's answer, whoever inside it wrote them; `{ kind: "approver" }` — whose answer is `gate.settlement.who`). Inside one `classic.PreToolUse` dispatch every handler whose answer's `updatedInput` differs from what its `next()` returned is named, innermost first; one that hands a lower rewrite on unchanged is not. Present exactly when the gate's allow exit let the call go, the frame carries no `notExecuted`, and the bytes let go differ from the bytes the gate took at its entry (both as the tool reads them — the loop's argument preparation is no rewrite); absent on a call refused before it was let go, on a parked or answered-in-place call and on a rewrite set back; a refusal recorded after the call was let go (the shell read admission) leaves it beside the `denied` record. It says what the gate let the call go with, never that the body ran (a tool's refusal of those arguments is `isError` beside it; the loop's re-validation refusal of a rewritten call carries no `notExecuted` today — #2817). On the frame only: the persisted `toolResult` row does not repeat it. One account per gate pass (`RewriteAccount`, `src/core/rewrite-rejudge.ts`) written where each rewrite is adopted, read once at the allow exit; bytes that moved with no author named is an engine defect and throws.
|
|
329
|
+
- **CC 2.1.309.** CC adopts a hook's and a permission decision's `updatedInput` into the call's input and discloses no structured record of it (its only side channel is the hook's own raw output on `system/hook_response`, without a `tool_use_id`); this member is an additive divergence — every frame CC emits is unchanged.
|
|
330
|
+
- **Not covered (#2814, 7.59.0).** A resumed leg's frames carry no `rewrite`: its `tool_start.args` are the decided bytes, a re-screen's rewrite of an approved call is not recorded, and a rewrite made before a durable park is already folded into the parked row's bytes.
|
|
331
|
+
- **Consumers.** @cli: the MODS155 rewrite-notice cell reads `tool_end.rewrite` (present ⇒ the call was let go with other arguments; `by` names them). @server: S-2392 projects `tool_end.rewrite` whole beside `requestedBy` / `answeredBy`. @client-core: CC-1042 ③b reads `rewrite.by` / `rewrite.input`; ③a (`notExecuted ∧ ¬isError ∧ answeredBy`) and ③b are exclusive. @sdk: the two types. @test: L1 cell M6b reads the member.
|
|
332
|
+
- **Pins.** `test/backlog2811-rewrite-disclosure.test.ts` (real Runner: one extension; two in one dispatch, both named; a hand-on that names nobody; a re-spelling the tool reads as the same bytes that names nobody; an intermediate form the tool cannot read, replaced further out, that refuses nothing; an extension's own call beside `requestedBy`; an extension then the chain; the approver's edit; an extension rewriting the approver's edit, the form approved — three entries in order; controls: nobody, the same bytes handed back, a rewrite set back, a refused rewritten call, a rewritten call answered in place; gate-level: a host's edit the one judge refuses — a getter, a Map, a Date, a class instance — is never read by the account, a plain edit is named as the approver's).
|
|
333
|
+
|
|
334
|
+
### The judge of an MCP entry's `sessionMetaKey` is a root export — a schema package or a host that validates the field reads the engine's judgment instead of copying it (#2830; additive export; hard-breaking: none; behavior change: none; exports: +3 `judgeSessionMetaKey`, `MCP_SESSION_META_KEY_MAX_CHARS`, type `SessionMetaKeyReading`)
|
|
335
|
+
|
|
336
|
+
- **Before.** The key a server declares in `McpServerSpec.sessionMetaKey` is judged by `judgeSessionMetaKey` (`src/core/mcp-call-meta.ts`), but the function, its bound and its reading type were reachable only inside the package; a package that checks the field at its own door had to write the key-name format, the refusal list and the length bound a second time.
|
|
337
|
+
- **Now.** The package root exports `judgeSessionMetaKey(value: unknown): SessionMetaKeyReading`, the bound `MCP_SESSION_META_KEY_MAX_CHARS` (128) and the type `SessionMetaKeyReading` (`{ key: string | undefined } | { problem: string }`). They are the module's own members, re-exported on one line of `src/index.ts`: the function the preparation door and the materialization entrance ask is the function the root hands out (`===`), and the root declares no copy. A key that can ride answers `{ key }` (`undefined` answers `{ key: undefined }`); every refusal answers `{ problem }` naming the key — a non-string, the empty string, more than 128 characters, a name outside the MCP `_meta` key-name format, the SDK's `progressToken`, anything under the engine's `sema/` namespace, a prefix MCP reserves.
|
|
338
|
+
- **Not changed, stated.** No behavior moves: the judge's body, its sentences, the door and the entrance that ask it, and the wire are byte-identical to the previous release. The three names are new on the export surface only (`test/export-surface.snapshot.json` +3: a function, a variable, a type).
|
|
339
|
+
- **Consumers.** @settings-schema: the MCP entry schema's `sessionMetaKey` check can call `judgeSessionMetaKey` and report its `problem` rather than carry its own format; a deployment's own limit on top of the engine's is its own rule. @computer-use @desktop: a key such as `computer-use/sessionId` answers `{ key }`; `sema/…` and `progressToken` answer a problem.
|
|
340
|
+
- **Pins.** `test/backlog2830-session-meta-key-export.test.ts` (the root answers a key that rides, the engine namespace, the SDK key, a reserved prefix, the bound ± 1, a non-string and the empty string; the root function is the module's function; one declaration of the judge and of the bound in `src/`; the root's one export line names all three; the reading type is one type; the frozen snapshot registers the three kinds and tiers). Smoke: `judgeSessionMetaKey` (function) and `MCP_SESSION_META_KEY_MAX_CHARS` (number) are in `SMOKE_CHECKED_EXPORTS`, so a stranger install proves them reachable from the package root.
|
|
341
|
+
|
|
342
|
+
### A relative path is anchored, never folded — a `..` is the filesystem's: the execution seam's path law (`FileSystem`, `absolutePath`) is "anchor only, no `..` folding, no symlink resolution", `NodeExecutionEnv` reads every path that way, a not-yet-created target's key carries no `.` / `..` segment, and `resolveKey` reads one base (#902, design/902; behavior correction on the base-less reading, open to veto; hard-breaking for remote execution environments: their `..` folding is now out of contract (open to veto); closed sets: none; exports: none) (@server)
|
|
343
|
+
|
|
344
|
+
- **Before.** One spelling named two files. With `bridge` a symlink into `elsewhere/sub`, the fs throat keyed `bridge/../next` as `<dir>/elsewhere/next` (the file the kernel opens) when the caller had a base, but as `<dir>/next` when it had none: the spelling went to `env.absolutePath`, and `NodeExecutionEnv` anchored it with `path.resolve`, which folds `..` lexically. Every member of that environment read a relative path the same folding way (`readTextFile("bridge/../next")` read the other file), while the seam's contract said only "without resolving symlinks". A target that did not exist yet was keyed by rejoining its missing tail as written, so `missing/../x`, `gap/./new` and `gap//new` minted keys with `.`, `..` or a separator run in them — a second key for a file a later spelling keys differently. `resolveKey` read a call's target against `cwd ?? root`, and where that base was unusable read it again against the environment's own `cwd`.
|
|
345
|
+
- **Now.** The seam states the law (`src/engine/harness/types.ts`): a path a method is handed is absolute as written or relative ANCHORED at `cwd`; no method folds a `..` (the filesystem resolves it, components first); `absolutePath` anchors only, and an environment that owns no working directory refuses a relative path — the engine never places one at `cwd` on its behalf. `NodeExecutionEnv` reads every path through one anchor (the chain walk's `anchorAtLinkDir`, unfolded, one separator): its members (a relative `cwd` is the process's, so `absolutePath` never answers with a relative path), `joinPath` (a later segment is a segment, never a root), the parent a write creates (`dirname`, so `bridge/../newdir/f` creates `elsewhere/newdir`) and the paths a listing reports (under the path it was handed — the JS search fallback now matches its echo against the start as written, and its lexical collapse helper is gone). Below a target's deepest existing ancestor the missing tail is applied the way the kernel will apply it once the write creates it, as far as nothing on the way can be a link: under the first missing name `.` and separator runs fold and a `..` cancels the missing name before it; a `..` that cancels the last missing name, or climbs to the canonical prefix's parent, lands in a directory that exists, and the rest of the spelling is probed again from there (a link on it is followed, a regular file on it is no directory) instead of being folded on. With nothing on the chain at all the same rule runs below the path's own anchor. `resolveKey` refuses a call whose base it cannot use (`cannot resolve path "…": the base this call resolves against (…) is not a fully-qualified path of this tree's family; refused.`) instead of reading it a second time. The throat is unchanged: with a base it anchors (`anchorSpelling`), with none it hands the spelling to the environment.
|
|
346
|
+
- **Who is hurt.** A caller that relied on the fold: a relative path handed straight to `NodeExecutionEnv` whose `..` follows a directory that does not exist now fails the way the kernel fails (`ENOENT`) instead of landing beside it, and one whose `..` follows a symlinked directory now lands where the link leads. Through the engine, a spelling whose `..` cancels a name that does not exist yet (`gap/../x`) is keyed where it lands once that name is created (`<root>/x`, judged there by every fence), so a write that used to fail with `ENOENT` now writes there. The engine's own tools hand the environment canonical keys and are not affected; a base-less relative spelling reaches the corrected reading only at the deployment-text seats (a rootless write gate's target and domains, a relative data root, a protected-target judgment with no base) and in `resolveKey` on a base it cannot use (now refused).
|
|
347
|
+
- **Consumers.** @server — hard-breaking, open to veto, three sentences: (1) the seven remote adapters (adb / device / e2b / host / k8s / local-docker / ssh) read a path with `posix.normalize`, which folds `..` on absolute paths too, so on every remote lane `<base>/bridge/../next` is asked as `<base>/next` — their shared `resolve(p)` should keep `p` as written when absolute and join it under `cwd` when relative, never folding a `..` (the remote filesystem resolves it), and a listing should name its entries under the path it was handed; (2) `DeferredSandboxPathEnv.absolutePath` keeps refusing a relative path, and its absolute arm stops folding `..` the same way; (3) both land in ONE server version — adapters that stop folding while the gate environment still folds would have the write gate judge `<base>/next` while the tool opens `<base>/elsewhere/next`. Until then the remote lanes keep their fold (consistent between gate and tool, unlike the shell, which resolves `..` on the remote kernel). A host's own `ExecutionEnv` reads the new contract text.
|
|
348
|
+
- **Reference.** The reference CLI's path expansion folds lexically (`normalize` / `resolve`) and opens the folded path; this tree resolves `..` by the filesystem on every face (the fs throat with a base already did, as do the symlink chain walk and the shell read establisher), so the fs tools and the shell agree on what one spelling names. Registered as a divergence (`fs-throat-dotdot-resolved-by-filesystem`).
|
|
349
|
+
- **Pins.** `test/backlog902-relative-anchor.test.ts` on a real filesystem (`bridge -> elsewhere/sub`, `elsewhere/next` against a decoy `next`): the base-less key, the based key with a base that is not the environment's `cwd`, and the kernel's `realpath` and inode name one file; an environment member, `absolutePath`, the leaf chain, a listing, a write's parent and `joinPath` read the spelling the same way; the missing tail's `..` / `.` / separator run and a `..` climbing past it through the link (checked against the file the kernel then creates); a `..` back into an existing directory followed by a link out of the root (refused by containment where it leads) and by a regular file (refused); the nothing-exists fallback and its root; `joinPath`'s later segments; a relative environment `cwd`; a remote write gate's shape (a `StubExecutionEnv` with cwd `/` refusing relative paths) still refuses a base-less relative spelling; `resolveKey` on an unusable base; the example environment's `absolutePath`. 17 of the 20 cases are red on the previous tree; the based-key control, the gate-shape case and the later-segment `joinPath` case are green on both. Re-pinned: `backlog840` (#840) G6 (the canonicalizer's roster names `effective-path-target.ts`, the reader `resolveKey` goes through) and G15 (the stated limit — a separator run kept in the missing tail — is retired: one key on every family); `fs-search-honesty` #318 (the win-shaped stub lists entries under the start as written, and a stub that folds falls back to the projection).
|
|
350
|
+
|
|
351
|
+
### A run may declare its session plan file — `TaskSpec.planFile` — and the plan then lives there: every gate that judges a write reads the one admission (the file tools' root fence for write and read, the permission-mode write gates, the write-protection table), `ExitPlanMode` takes no `plan` and presents what the file holds, the planning frames name the file, and a compaction refers back to it; undeclared, nothing changes (#1503 + #2745, design/1503, C-R887; behavior widening on a new seat, hard-breaking: three sentences below, open to veto; closed sets: +1 refusal code `config.plan_file_invalid`, +1 tool contract `core.exit_plan_mode_file@1`; exports: none; members: +1 `TaskSpec.planFile`, +1 optional `filePath` on the `exit-plan-mode` card) (@cli @server @client-core)
|
|
352
|
+
|
|
353
|
+
- **Before.** The shell keeps the plan in a file under its configuration root and tells the model it is the one file it may edit, but never told the engine. A Write to that file in plan mode asked (`mode` + `write_protection`), and after Yes the root fence refused it: `path "…/.sema/plans/<slug>.md" resolves outside the allowed roots …; access denied` (test [9700] U2). Three gates, three lists of what is writable, none of them holding the plan file.
|
|
354
|
+
- **Now.** `planFile` is the absolute path of this session's plan file in the leg's execution environment (the reference's `<plans directory>/<slug>.md`). Declared, it is admitted through the advertised-writable seat as its third advertiser (beside the scratchpad and the memory root) — a FILE: its key is the canonical parent joined with the declared name, frozen at admission. The root fence admits it for write and read, every permission mode's write gate admits it through the request's advertised roots (no question in `plan`, `default` or `acceptEdits`), and the write-protection table does not demote it — the reference's order, where "Plan files for current session are allowed for writing" is answered before the dangerous-path check and before the plan-mode question (CC 2.1.309 `checkEditableInternalPath`).
|
|
355
|
+
- **The file, and what stays as it was.** The fence and the write gates admit the declared path and anything beneath it until #2746 (the advertised seat has one reach, "the path and below"; a file-only reach is that ticket — KL-1503-a); the write-protection table exempts exactly the file — by identity: the write's real target must be the admitted key, and a spelling that names the plan file only waits for that answer — so a path below it, and the plan's own spelling once a link replaced the file (the `.sema` row asks again, and the landing is judged too), still meet the table. A sibling in the same directory and every deny row (the opt-in sensitive-path set, a person's rules) stay as they were. Not inherited: a delegated child, a fork or a workflow step plans in its final answer.
|
|
356
|
+
- **Refused, coded.** A declared value the gates cannot hold refuses the run (`terminal: { kind: "failed", code: "config.plan_file_invalid" }`, the value and the reason stated): not a string, empty, not absolute, not in lexical normal form, or not tellable to the model verbatim (a control character, a run of whitespace, an envelope marker, over 4096 characters); the leaf is a symbolic link, a directory or another non-file kind; its directory does not resolve, or is not a directory (the host creates the plan file's directory before the run — the engine never materializes it); the leg's hands are read-only or absent; the key would hold a fence root. Refused rather than skipped: the plan-exit tool's arm (#2745) is fixed at mount, so a declared file is never narrowed away later.
|
|
357
|
+
- **The plan-exit tool reads the file (#2745).** One fact picks the arm, as in the reference (CC 2.1.309 keys both on one host fact: a diskless session passes the plan as `plan`; any other reads the plan file). Declared, `ExitPlanMode` is mounted in its FILE arm — contract `core.exit_plan_mode_file@1`, no parameters, the reference's disk-arm description naming the file — and when called it reads the plan through the seat's one reader at the admitted key: the plan text rides the tool result (fenced) and the `exit-plan-mode` card as `plan`, with `filePath` (the declared path, the reference's `ExitPlanModeOutput.filePath`); a file not written yet (absent or blank) is refused with the reference's sentence — `No plan file found at <path>. Please write your plan to this file before calling ExitPlanMode.` — before any review is requested, and a file no longer the admitted object (an ancestor or the leaf replaced by a link, a directory, another kind) or over 1 MiB is refused with the reason, never read through; where the environment can hold what it opens (`openBound`) the bytes are the judged object's, else the file is judged again after the read (KL-1503-b). An existing file is keyed by its own canonical spelling (a case-insensitive volume keeps the stored case). Undeclared, the parameter arm is byte-identical (`plan` required, contract `core.exit_plan_mode@1`).
|
|
358
|
+
- **The frames name the file (#2745).** A plan-mode leg that carries the plan-exit tool and declared a plan file gets the reference's disk-arm planning frame — the edit ban "with the exception of the plan file mentioned below" and its `## Plan File Info:` section naming the file ("NOTE that this is the only file you are allowed to edit") — and the sparse restatement "Read-only except plan file (<path>)"; the file's existence is left to the model (the reference words the section two ways off a disk read; this frame names both actions). The exit frame is the one every planning wording shares. Every other leg's frames are unchanged.
|
|
359
|
+
- **A compaction refers back to the plan (#2745).** After a landed compaction a leg whose run admitted a plan file that holds a plan gets the reference's `plan_file_reference` in one engine-minted reminder — "A plan file exists from plan mode at: <path>", the plan fenced, "If this plan is relevant to the current work and not already complete, continue working on it." — in any mode; an absent or blank file says nothing.
|
|
360
|
+
- **One reading retired.** The permission-mode write gate no longer exempts `envFacts.scratchpadDir` by its own spelling: what it never asks about is the run's advertised seat, read off each request — the admission the fence holds. A scratchpad the seat skipped (and the fence already refused) is no longer exempt at the gate.
|
|
361
|
+
- **Open to veto — hard-breaking, three sentences.** (1) `TaskSpec.planFile` is new: a deployment that declares it gets the plan-file arm — `ExitPlanMode` with no `plan` argument, reading the file — and a declared value that is not the absolute path of a regular-or-absent file in an existing directory refuses the run with `config.plan_file_invalid` instead of starting. (2) The declared file is written with no question in every permission mode (plan included) and is exempt from the write-protection table — the `.sema` row no longer asks about it. (3) The permission-mode write gate stops reading `envFacts.scratchpadDir` on its own: a scratchpad the advertised seat skipped is no longer exempt at that gate.
|
|
362
|
+
- **Consumers.** @cli (primary): declare `planFile: getPlanFilePath()` on the session's runs and create `getPlansDirectory()` before the run (today it is created when the plan prompt is first built); the plan-file prompt then matches the engine's gates and its frames (the shell's own plan-mode prompt, CC's `plan_mode` attachment text, can retire in favour of the engine's marked frame); `ExitPlanMode` now arrives with no `plan` argument — render the plan card from the card's `plan` / `filePath` (or the file) rather than from the call's arguments. @server: pass a deployment-supplied `planFile` through the task body (absolute path in the run's execution environment) or leave it absent; map `config.plan_file_invalid` like the other `config.*` refusals. @client-core: no change unless it builds task specs.
|
|
363
|
+
- **Pins.** `test/backlog1503-plan-file-seat.test.ts` (real Runner, NodeExecutionEnv over temp directories: the U2 lane declared ⇒ written with no card, undeclared ⇒ refused as before; `default` / `acceptEdits`; Read + Edit; sibling refused; inside the task root's `.sema` the plan file is not demoted while its sibling asks with `write_protection`; an alias spelling of the declared file; a link planted after admission; nine bad forms coded; the seat's key; the child seat; the scratchpad in plan mode; #2745: the file arm's empty schema, description and card (`plan`, `filePath`), nothing written refused with the reference's sentence, a link planted before the call never read through, the parameter arm unchanged; the planning frame names the file, the fold reads it back as its row; the post-compaction reference and its silent cases).
|
|
364
|
+
|
|
365
|
+
### `workspace_changed` is the leg's whole snapshot — every leg opens with one (`cwd`, `root`, `entered?`, `project?`, `remote`), then one per change; `TaskSpec.projectId` is judged against the checkout's marker by the leg's one project judge, which memory v2 now reads (#2291, design/1456 slice S3; hard-breaking, open to veto: the frame gains required members and a frame on every leg, `resolveProjectId` becomes `(fs, rootDir) => Promise`; behavior narrowing: a declared project unequal to the marker refuses the leg) (@server @client-core @cli @web-client)
|
|
366
|
+
|
|
367
|
+
- **What changed (hard-breaking, three sentences).** (1) `workspace_changed` is now a WHOLE snapshot of where the leg stands — `cwd`, `root` (the task root as the leg's root receiving point settled it) and `remote` always, `entered: { dir, byPath? }` while an EnterWorktree switch is active, `project: { id, source: "marker" | "declared" }` when the leg has a project identity — and EVERY prepared leg (fresh, resumed, continued, child; read-only legs and legs with no execution env included, where `cwd` is `root`) sends one after `wiring_manifest` (and after the leg-start `tool_disclosure` census when it defers tools), before its first model or tool interaction, then one each time the snapshot changes; `TaskSpec.projectId` (new) is judged with the checkout's `.sema/project` marker by one judge once per leg (marker present: the declaration must equal it, else `config.project_identity_mismatch`; no marker: the declaration is the identity; not a UUID: `config.project_id_invalid`), and `resolveProjectId` reads through the filesystem the root names: `resolveProjectId(fs, rootDir)` returns a Promise. (2) Who is hurt: a consumer that treated every `workspace_changed` as "the directory moved" (it now also sees the leg-start frame, equal to what it may already hold), a consumer or fixture that constructs the frame with `cwd` alone (two required members), a host that sends a `projectId` unequal to the checkout's marker (the leg is refused), and a caller of `resolveProjectId(dir)`. (3) How to migrate: replace your copy of the snapshot with each frame and render a move only when `cwd` differs from the one you hold (keep the last frame as the session row's place, project and remoteness — read the frame, do not re-derive them from the disk); send `TaskSpec.projectId` on every leg with the marker's id (or none); call `await resolveProjectId(env, dir)` with the execution env the directory lives in (`new NodeExecutionEnv({ cwd: dir })` for a host path). @server: the session row's project and place are the last frame's — read the frame and retire the self-computation (`src/project-identity.ts` `resolveProjectIdentity`'s own marker walk).
|
|
368
|
+
- **The rule (what got fewer).** Where a leg stands is one projection (`workspaceSnapshotOf`, `src/core/workspace-snapshot.ts`) announced by one per-leg seat (`Prepared.workspaceFrame`: the identity wiring binds it after the manifest, the tool walk and the resumed approved call observe it; a snapshot equal to the last one sent is not sent — the digest is the snapshot's canonical JSON, so every member takes part). Which project a leg belongs to is one verdict (`resolveSessionProject`), read by the frame and by memory v2. Retired: the cwd-only dedupe seeded so that a leg's starting place was never announced (a resumed or continued leg's restored cwd now reaches the wire); the frame's four-sentence contract (moves only / real shell only / initial not announced / resets across a suspend — the last was already false); memory v2's own marker read and its own unreadable-marker catch; the inline remoteness reading beside `onWorkspaceResolved` (the restore phase computes the leg's one reading and returns it to both); the host-only marker read (`existsSync` / `readFileSync`).
|
|
369
|
+
- **Project identity (behavior).** The verdict is decided on the task root, once per leg (never re-resolved within it). A marker that cannot be read (nested below the repo root, corrupt, a lookup the filesystem cannot answer) leaves the frame without `project` and is told to `onError` (phase `config`, the marker's own code) on every leg; only a leg that consumes project identity is refused with it — memory v2 with a `proj:` / `userproj:` scope (as before) and, new, a leg that declared `projectId`. A leg with an execution env reads its marker through that env (a remote env's marker is the one in the env); a leg without one reads the host at its root, as memory did. Memory v2 keys its mount by the verdict only when it came from the marker (a declared-only identity does not change the memory key or its write-target check). Changed for memory: the marker is read at the leg's task root, where before it was read at `rootPath` when one was configured — they differ for a delegated child in its own worktree (the worktree's committed copy of the marker is read) — and through the remote env for a remote leg (before: a host path that did not exist there, so the path key).
|
|
370
|
+
- **Consumers.** @server: `src/trace/core-keyset-guard.ts` gains `root` / `remote` / `entered` / `project` on the `workspace_changed` arm; the session row's `projectId` and place are the LAST frame's (`project.id`, `root`, `cwd`, `entered`) — `src/project-identity.ts` `resolveProjectIdentity` is the reading this frame retires (read the frame, retire the self-computation); forward the session's project as `TaskSpec.projectId` on every leg (S-1348). Kinship stays in its existing words: fork lineage is `SessionMetadata.forkedFrom`, delegation lineage is `parentSessionId` — do not record a fork as `parentSessionId`. @client-core: `workspaceChangedArm` reads the new members (CC-495); the frame is a snapshot. @cli: do not render "directory changed" for a frame whose `cwd` equals the one already shown (the leg-start frame). @web-client: the session header can show the root, the active worktree and the project from the last frame.
|
|
371
|
+
- **Not in this slice (stated).** `repository` (the repository's main worktree root) and `entered.name` / `entered.branch` arrive with the worktree path-law slice (S1), `session` with the session-checkout slice (S2) — each is a new member of the same snapshot.
|
|
372
|
+
- **Exports and wire shape (the release's wire manifest).** No name added or removed; `resolveProjectId` changes signature (`(rootDir) => marker | null` → `(fs, rootDir) => Promise<marker | null>`). `TaskEvent` `workspace_changed` gains `root` and `remote` (required — a constructor of the frame breaks) and `entered?` / `project?`; `TaskSpec` gains `projectId?`. Closed sets: +1 new, `workspace_changed.project.source` (`marker` | `declared`). Refusal codes: +2 (`config.project_identity_mismatch`, `config.project_id_invalid`); an unreadable marker keeps `config.memory_project_marker` / `config.memory_project_marker_nested`.
|
|
373
|
+
- **Memory side effects of a refused leg (narrowing).** The write-target check (`config.memory_project_identity`) now runs before the marker hint is recorded and before the key-switch carry-over drains the path-keyed announcement queue, so a leg it refuses leaves neither behind; the hint and the carry-over are written only from a verdict decided on the memory partition's own root.
|
|
374
|
+
- **Order of the project read (no contract change).** The leg's project judge runs once the caller's mounts are judged, so a leg its mounts refuse (`config.tool_mount_denied`) is refused before any marker read and its rejection settles at the same depth as before this slice; a leg refused on both counts reports the mount refusal. The frame's place (after `wiring_manifest`, before the first model or tool interaction), the judge's two codes and `resolveProjectId(fs, rootDir)` are unchanged. Pinned in `test/backlog2291-session-facts-frame.test.ts` (no marker-walk read on a mount refusal, with its admitted control; the stream order) and `test/design393-s6-run-leg-lanes.test.ts` (rejection depth held at 52).
|
|
375
|
+
- **Pins.** `test/backlog2291-session-facts-frame.test.ts` (real Runner: the leg-start frame on a shell / read-only / env-less leg, changed-only frames, the continuing leg's restored cwd, the resumed leg, the remoteness reading, EnterWorktree / ExitWorktree, no kinship key; the judge's four outcomes and its two refusals, an unreadable marker reported vs refused, the env-face read; memory v2 on an env-less leg still keyed by the host marker, declared-only identity not keying memory, an unreadable marker refusing a consuming session); re-pinned `test/workspace-changed.test.ts`, `test/design393-s2-run-lanes.test.ts`, `test/memory-scope-contract.test.ts`.
|
|
376
|
+
|
|
377
|
+
no-notes: #2575(the multi-package release-base pin now reads a fixture repository whose history it writes instead of the checkout's own tags and packages; a pin that was red on the v7.56.0 tag tree and on a depth-1 clone is green on both; test only; no script or export change), #1030(test fixture only: the 1751 pin's fixture body now reads the RC manifest through the one git seam; the seam itself shipped in 7.54.0), #2700(ticket named by the 2604-fix1 commit, not fixed here: Monitor skipping the kill guard is a 7.58.0 car), #926(sweep: session-log-transfer renders thrown values through thrownText; behaviour unchanged for an Error and a string)
|
|
378
|
+
|
|
379
|
+
## 7.57.0 — 2026-10-25
|
|
380
|
+
|
|
381
|
+
### A Model object the engine cannot read is refused by name at every seat that takes a model — `Runner.runTask` and `Runner.compactSession` read the one model-binding judgment (#2769; behavior narrowing, open to veto; hard-breaking: none; closed sets: none — the refusal is the existing `config.unknown_role` / `not_a_model_ref`; exports: none) (@server @cli)
|
|
382
|
+
|
|
383
|
+
- **Before.** The judgment of a model binding accepted any object as a Model. `{ id: "x" }` handed to `runTask` ended terminal `failed` with the bare `TypeError: Cannot read properties of undefined (reading 'startsWith')` (the prompt-assembly turn snapshot reads `api`); a Model with no `id` ran to `completed` unnamed; `compactSession` answered `compacted` on the same object and handed it to the summary call. A catalog entry a word resolved to, the `compactionModel` seat and a role seat were read the same way.
|
|
384
|
+
- **Now.** An object bound at a model seat reads as a Model when it carries `id` (a non-empty string) and `api` (a string) — the two members the engine has no designed reading for when absent. Otherwise the seat is refused by the existing code (`config.unknown_role`, `detail { field: <seat>, reason: "not_a_model_ref" }`), the sentence naming the member (``TaskSpec.model is a Model object whose `api` is absent``), before any model call and before the session's lock is taken. The same judgment reads the catalog entry a word resolves to, the entry a role's `select` criteria pick, and the catalog entry that shadows a tier word and is read as the tier's default. One reader — `assertModelObject` behind `modelOfBinding` / `assertModelBindingShape` in `roles.ts` — serves `TaskSpec.model`, `compactSession`'s `model` and `compactionModel`, role seats, tier bindings and every other `ModelRef` seat; no second judgment and no new code or reason was added. At a role seat an object is a config record only when every own key is one of `model` / `select` / `thinking` / `promptRole` / `systemPrompt` and neither `id` nor `api` can be read from it; every other object is read as a Model and judged, so a Model missing one or both identity members (or a record with a stray key) is refused instead of being read as a record that leaves the role on the default unannounced (a list or a function written there still reads as an empty record, as before). Every catalog entry a role's `select` criteria will read is judged before the selection reads any member of it. Reading is total: an accessor that throws, or a revoked Proxy, as the Model or as a member, reads as absent / unreadable and the refusal still names the member.
|
|
385
|
+
- **Not judged (stated).** The window, the endpoint and the output cap: a window the engine cannot evaluate is a disclosed state (`unevaluableWindow`), and an absent endpoint or output cap falls to the brain's own. A Model without them is accepted at both doors, as before.
|
|
386
|
+
- **Behavior narrowing (open to veto).** A Model object (or catalog entry) with no `id`, an empty `id`, or no string `api` — which ran, or crashed in the turn snapshot — is refused by name, and a partial Model written at a role seat (`roles.x = { id: "…" }`, `{ contextWindow: 1000 }`) or a role record with a key outside the five above no longer leaves that role on the default silently; a role's `select` over a catalog that holds a broken entry refuses by name (the entry's key in the sentence) instead of choosing around it. @server: a catalog entry you build must carry `id` and `api` (the type has always required both); an entry without them now refuses at first use with the sentence above instead of failing deep in a run (inferred: no server-side catalog is known to omit them). @cli: nothing to render beyond the existing `config.unknown_role` terminal.
|
|
387
|
+
- **Pins.** `test/backlog2769-model-door.test.ts` — ten bad shapes (no / empty / numeric / null / revoked-Proxy `id`, no / numeric / throwing `api`, a revoked-Proxy Model) × the two doors (refusal by name, no model call, nothing written, the lock free after), the catalog / `compactionModel` / role-seat / `select` / tier-shadow / tier-binding / bare-role-seat arms, and the controls (a whole Model, a Model without window / endpoint / output cap, a real role record, the earlier refusals keeping their words).
|
|
388
|
+
|
|
389
|
+
### `@sema-agent/core-stores-sql` is published with this release — cut with core at the same version; its public face is fixed, and this first release carries no SQL stores (#2673; no behaviour change; hard-breaking: none; closed sets: none; exports: none in the root — the package's own entry is its fourteen names, new on the registry; a new public package name and a licence-text line, open to veto) (@server @test @cli)
|
|
390
|
+
|
|
391
|
+
- **Before.** `packages/core-stores-sql` was cut in 7.56.0 as a package that never reached the registry (`private: true`): its public face — neutral factories over a caller's pool and the neutral types they speak — and the way it is built, checked and released were fixed, but nothing could install it, so a deployment that owns SQL stores had nothing to code against.
|
|
392
|
+
- **Now.** The manifest says `private: false` with `publishConfig.access: "public"`, and the release publishes it with the root — the satellite packages go out after the root, in directory-name order — from the same plain clone of the tag, at the root's version, with that version as its exact `@sema-agent/core` peer. The public face is the fourteen names it already had (`createSqlStorageBackend`, `createSqlDriver`, `baselineDdl`, `publishedColumns` and ten types); nothing is added or removed, and no store class, no dialect class, no SQL statement list, no ensure leg and no SQL predicate generator is exported. The tarball holds `package.json`, `README.md`, `LICENSE` and `dist/` — pinned by packing the package directory. The README is rewritten for a stranger: first, that this release carries no SQL stores (the registry's one-line description says it too); then install, the version pairing (each factory refuses a core it was not cut with), the fourteen names and what is not exported. The package's build now runs `tsc` twice, as the root's does (the second pass writes the declarations again with their comments), so the JSDoc on each exported name — including the sentence that a factory refuses — ships in the `.d.ts`. The root `LICENSE`'s Licensed Work parameters now name the package beside `@sema-agent/mods-kernel`, and `packages/core-stores-sql/LICENSE` and `packages/mods-kernel/LICENSE` are byte copies of it (public text, open to veto).
|
|
393
|
+
- **Release machinery.** No release script changes: each leg reads the package as it reads any non-private one: `scripts/bump-version.mjs` already moves its version cell and its exact core peer; `gate:packages` and `gate:packages:pack` already read its tsconfig, its frozen snapshot (`packages/core-stores-sql/test/export-surface.snapshot.json`, 14 names) and its smoke table (4 runtime exports), pack it and install it beside core's own tarball; `scripts/publish-release.sh` takes every non-private workspace package; the release gate and the post lint read the claim from the tag's tree, so a tag cut from here owes the registry the package and the release owes `wire-changes/core-stores-sql@<version>.json` beside the root's. That manifest is based on the previous tag like every manifest (`gate:wire -- <previous tag> <release candidate> --package core-stores-sql --version <version> --to-tag v<version>`); the package already had these fourteen names there, so the manifest reports no export moved — that the package is new on the registry is a fact of the release post, not of the manifest.
|
|
394
|
+
- **Not here yet (named).** The stores. `createSqlStorageBackend` and `createSqlDriver` read their options (every wrong value refused by name) and then refuse; `baselineDdl(dialect)` resolves to an empty list and `publishedColumns()` returns one. The stores move in with a later release, from the deployment that owns them; until then the package is a published face to code against, not a backend to run. A removed or re-kinded name will be named as breaking in the notes of the release that does it.
|
|
395
|
+
- **Consumers.** No consumer is asked to change. @server: the package can be installed from the registry from this release (`npm install @sema-agent/core @sema-agent/core-stores-sql`, same version as core); code against the fourteen names and the neutral pool shapes (`PgPoolLike`, `MysqlPoolLike`), not against a store class; do not call a factory expecting a backend yet. @test: the package is one more thing a fresh install of this release must find on the registry (`scripts/verify-fresh-install.mjs` installs every non-private package and runs its smoke table). @cli: no action. The package name is public and permanent once published (open to veto).
|
|
396
|
+
- **Pins.** `test/backlog2673-core-stores-sql-publish.test.ts` — the manifest says published (`private` false, `publishConfig.access` public, the package gate's reading clean, `files` exactly `["dist"]`, the core peer exact, the build puts the declarations' comments back, the release gate's tree reading counts the package as a promise of the root's version and the manifest leg run over the committed tree owes this package's wire manifest); the licence line in the Licensed Work parameters and the byte copy; the README (install line, the version pairing, no store class sentence, the "this release carries no SQL stores" sentence tied to both factories' own refusals and to the registry description so they go red together when the stores arrive, no status of an unpublished package, an Exports table that is the frozen surface name for name); what `npm pack` lists over the package directory; the snapshot and the smoke table as the public face (a runtime export is judged by the gate's own kind set). Re-pinned: `backlog1468-n1-core-stores-sql` (the manifest cell says published).
|
|
397
|
+
|
|
398
|
+
### A new package below the engine, `@sema-agent/primitives`, holds the credential reference — one closed set of kinds (`env` / `vault` / `handle` / `assertion`) and one reader, `readCredentialRef`, that every layer imports (#2293, slice S4 of the MCP credential seat; no behaviour change, hard-breaking: none; closed sets: none; exports: +6 root values (`readCredentialRef`, `CREDENTIAL_REF_KINDS`, `CREDENTIAL_REF_TRUST`, `CREDENTIAL_REF_TEXT_MAX`, `CREDENTIAL_REF_MAP_MAX`, `CREDENTIAL_REF_PROBLEM_REASONS`) and +6 root types, none removed; a new published package cut with core, public name open to veto)
|
|
399
|
+
|
|
400
|
+
- **Before.** The layer below the engine (the one every other layer may import) had no package: a shared definition lived in whichever layer wrote it first, and the next layer copied it. A credential reference — how a declaration names a credential without carrying its value — had no definition anywhere, so the surfaces that will have to validate one (the engine's declaration door, a deployment's acceptance gate, a settings validator, an admin form) had nothing to agree on.
|
|
401
|
+
- **Now.** `packages/primitives/` is a satellite package cut with core at the same version, compiled from `src/primitives/` (the folder the engine reads directly, as the mods kernel is), with no dependencies — not a builtin, not core — so it runs in Node and in a browser. It is the third published package (`@sema-agent/mods-kernel` and this one; `core-stores-sql`, private in 7.56.0, is published with this release as well — its own section above). Its first member is the credential reference:
|
|
402
|
+
- `CredentialRef` is a closed set of four kinds: `env` (header name → variable name for an http peer, child variable → variable name for a stdio peer; at least one), `vault` (`entry`), `handle` (`id`) and `assertion` (`audience`). `CREDENTIAL_REF_KINDS` is the set, frozen.
|
|
403
|
+
- `readCredentialRef(value)` is the one reader. It returns `{ ok: true, ref }` — a fresh frozen copy that the caller's later writes cannot reach; forward the copy, never the value read — or `{ ok: false, problem }` whose `reason` is one of `CREDENTIAL_REF_PROBLEM_REASONS`: `not_a_record`, `unknown_kind`, `missing_field`, `extra_field` or `bad_value`. The first fault in that order is reported, and a refusal is a value, never a throw: a value whose members cannot be read (a revoked or throwing Proxy) is `not_a_record`, or the `bad_value` of the map that holds it; the reader's catch clauses make no call, so a call made at the edge of the stack cannot throw out of the handler (a pin reads the source for it). With no stack left a valid value may be refused, under any reason, and an invalid one is never accepted; the call itself may throw a `RangeError` before it is entered, which no function can catch.
|
|
404
|
+
- What the reader reads. An ordinary record is an object (not an array) whose prototype is none or itself has none — the `Object.prototype` of any realm is one, so a record from another realm or from `JSON.parse` in one is read; a member is an own enumerable string-keyed data property, read off its descriptor with own-property tests, so a getter is refused and never called, nothing is read through a prototype (a polluted `Object.prototype` cannot turn a getter into a value), and an own `__proto__` key is a plain key. A key present with the value `undefined` is a bad value, not an absent member.
|
|
405
|
+
- What `bad_value` means. A text member (`entry`, `id`, `audience`) is 1 to `CREDENTIAL_REF_TEXT_MAX` (2048) UTF-16 code units, with no character that is not visible text — control (C0 and C1), format (zero-width, bidi override, soft hyphen, BOM), line and paragraph separator, default-ignorable (Hangul filler, combining grapheme joiner, variation selectors), noncharacter, private-use — no lone surrogate, and no leading or trailing white space; it is compared as written, nothing is normalised (two spellings of one visible string are two entries; visually confusable text — homoglyphs, a braille blank, stacked combining marks — is not judged; an emoji presentation selector and a zero-width joiner are refused, because these members are identifiers, not prose), and the bound counts UTF-16 units, up to 6144 UTF-8 bytes. The character classes are the host's Unicode tables: two surfaces on engines with different Unicode versions can differ for a character added recently. A name map (`headers`, `env`) holds 1 to `CREDENTIAL_REF_MAP_MAX` (64) entries; a header name is an HTTP token, a child variable and every variable name an identifier (`[A-Za-z_][A-Za-z0-9_]*`); two header names that differ only by case are one name named twice and are refused (variable names are not folded). The maps come back frozen and without a prototype, so an absent name reads `undefined`. A reference's size is bounded before it is copied, so a record of a million members costs the reader no more than listing its keys.
|
|
406
|
+
- `CREDENTIAL_REF_TRUST` says, per kind, what a request surface may carry: `vault` only for an entry that belongs to the submitting principal (`own_entry`); `env`, `handle` and `assertion` not at all (`refused` — an environment name would read any variable of the resolver's process, a handle names someone else's stored credential, an assertion is minted by the deployment). The table has a row for each kind and for nothing else (no prototype); look a kind up in it only after the reader has accepted the value. It is the shape an acceptance gate reads; it authenticates nothing.
|
|
407
|
+
- The reader judges shape and nothing else: it resolves no name, reads no environment and holds no state, and it carries no policy of any layer — which header names a deployment forbids (the protocol's own names, the principal header), which child variables a declaration may set, who answers a reference and whether this declaration may reach this destination stay with the engine's door and the deployment's seat.
|
|
408
|
+
- The root re-exports the same names from its own compiled copy of `src/primitives/` (`src/index.ts`): the root does not depend on `@sema-agent/primitives`, so a consumer that installs both packages holds two module instances compiled from the same source — plain-object values, no `instanceof`, no module identity (as with the mods kernel). A single instance is a design ticket (#2749).
|
|
409
|
+
- **Release machinery.** Nothing new is needed and each leg was run over the third package: `scripts/bump-version.mjs` moves its version cell (it has no core peer); `gate:packages` and `gate:packages:pack` read its tsconfig, snapshot (`packages/primitives/test/export-surface.snapshot.json`, 12 names) and smoke table (6 runtime exports) and pack it (built into its own `dist/`, installed offline, smoked); the release publishes it after the root and `mods-kernel` (`scripts/publish-release.sh` takes every non-private workspace package) and, from this release, owes `wire-changes/primitives@<version>.json` (`gate:wire -- <from> <to> --package primitives --version <version> --to-tag v<version>`; a package new in the range reports every export as an addition, which is the first cut). The root `LICENSE`'s Licensed Work parameters now name `@sema-agent/primitives` beside `@sema-agent/mods-kernel`, and the three satellite packages (`mods-kernel`, `primitives`, `core-stores-sql`) each carry a byte copy of it (public text, open to veto).
|
|
410
|
+
- **Not here yet (named).** Nothing in the engine reads a credential reference today: `McpServerSpec` still carries `headers` / `env` values and gains no `credentials` member in this change. The declaration door, the deployment seat that answers a reference, the retirement of the value members and the unauthorized state are the next slices of the same design (#2294 – #2296); the new package is their shared floor and ships first so the three consuming repositories can read it before the door exists.
|
|
411
|
+
- **Consumers.** No consumer is asked to change. @settings-schema / @web-admin / @server: the reference's validator you will write reads `readCredentialRef` from `@sema-agent/primitives` rather than a copy, and the acceptance gate reads `CREDENTIAL_REF_TRUST`; the package is published with this release and carries the release's version, and its name is now public and permanent (open to veto). @connectors: the shape of the reference is fixed, for your comparison table.
|
|
412
|
+
- **Pins.** `test/backlog2293-credential-ref.test.ts` — a positive control per kind and the frozen-copy law (and that a copy reads again as itself); the three named exits and the garbage exits each as their own reason, in one fixed order (unknown kind in fifteen spellings, missing, extra including an own `__proto__` key and a member in another case, not-a-record in fifteen shapes (two of them arrays wearing a record's prototype), a record of another realm accepted and an array / class instance / date of another realm refused, `kind` not text); no throw from a revoked Proxy, a Proxy whose `getPrototypeOf` / `ownKeys` / `getOwnPropertyDescriptor` trap throws; a getter never called at any depth, including under a polluted `Object.prototype`; the source's catch clauses holding no call; text members at, over and under the bound, control / format / separator / default-ignorable / noncharacter / private-use characters, lone surrogates, blank and padded text; name grammars, an empty map, a map over the bound, header names that differ only by case; a record of 50 000 members and a map of 50 000 entries each refused at once; the maps without a prototype, immune to pollution; echoed text bounded, fenced, never ill-formed; a map that cannot be read is that map's bad value; the closed sets and the trust table frozen and in step with the kinds, the table answering for its kinds only; the folder a leaf that compiles on its own with browser-and-node globals only; the root re-exporting the same values; the package gate (static arm and pack arm) over a copy of the real tree, and red for a bare import and for an export the frozen surface does not hold. Re-pinned for a third published package: `backlog1751-package-release-base` (the owed package manifests, the published packages at HEAD, the bump plan) and `backlog2104-mods-kernel-publish` (the licence copy).
|
|
413
|
+
|
|
414
|
+
### `Runner.compactSession({ sessionId, model, … })` compacts a session no run holds — the one compaction pass, under the session's lock, `trigger: "manual"`; a session a leg of this Runner holds is refused `compact.session_busy` (#2451, design/2451; behavior widening — a new verb; open to veto: the session station's `$` facade, and a pass's credential wait now ends at the pass's signal on every lane) (@server @cli @client-core)
|
|
415
|
+
|
|
416
|
+
- **Before.** The only manual compaction was `TaskStream.compact()`, which parks a request for the next turn boundary of a live run. A person typing `/compact` while their session was idle had no engine verb: hosts armed the request and fired it after the next message's run started, and when that run was shorter than the host's delay nothing was compacted (`compact.not_running`).
|
|
417
|
+
- **Now.** `runner.compactSession(request)` runs the pass every lane runs (`maybeCompact`) on an idle session: no run, no user turn, `force` with no floor, `trigger: "manual"` — the reference's `/compact` on an idle session (a local command that runs no main-loop turn; its plugin API refuses while a turn runs). The request is `{ sessionId, model, instructions?, compaction?, compactionModel?, getApiKeyAndHeaders?, signal? }`: `model` (required) is the model the session's next turn runs on and bounds the pass; `instructions` replace the standing ones for this pass as `TaskStream.compact` does; `compaction` takes the five members a pass reads (`enabled`, `reserveTokens`, `keepRecentTokens`, `instructions`, `clampTolerance`); `compactionModel` / the `summarize` role, its route pre-flight (a role-derived model whose key↔URL pairing is broken falls back to the primary, `route.fallback_to_primary`), the settings, the provider seam, the PreCompact / PostCompact stations and the `compacted` mint are the readers a run's lanes use. The answer is `{ outcome, events, usage? }`: `outcome` is `TaskStream.compact`'s closed set; `events` are the pass's frames in order (`compaction_started`, then `compacted` or `compaction_outcome`, each `trigger: "manual"`, each with its own `eventId`, no task attribution) — returned, not streamed; `usage` books the pass's model calls as a run's side calls are booked. A summarizer failure is the outcome `"failed"` (`onError` phase `compaction`), never a rejection. The ToolSearch activation snapshot on the branch is restated on the new record. A later run reads the summary — on a session no checkpoint is parked on: a session durably parked at a checkpoint has released its lock, so the verb compacts it, and the resume rewinds the branch to the checkpoint's leaf, off which the new compaction entry falls (the answer is still `compacted`; KL-2451-a, #2701).
|
|
418
|
+
- **Refusals (thrown, coded, before any model call).** `compact.invalid_request` (not a plain data object read as one snapshot — a Proxy, an inherited or accessor member, an unknown key, a wrong type, `compaction` the same; `model` missing); the model door's `config.unknown_role`; **`compact.session_busy`** — a leg of THIS Runner is running or queued on the session, or a write one of this Runner's legs issued to it has not settled (the same one reading of "busy" `Runner.rewindFiles` refuses on; otherwise the pass holds the session's lock to the end, so a leg arriving meanwhile waits and reads the summary); `resume.session_not_found`. A `signal` already aborted answers `{ outcome: "mooted", events: [] }` with nothing taken.
|
|
419
|
+
- **Open to veto — the session station's `$`.** The deployment seat's (`RunnerDeps.mods`) PreCompact / PostCompact handlers run on the pass (a block blocks it). There is no leg, so the station carries no hook identity and its facade answers the seats a session has — `$.session.id()` / `messages()` / `model()`, `$.clock.now()`, `$.model.complete()` (booked into `usage`); `$.process.run`, `$.session.cwd()` / `root()`, `$.tool.list()`, `$.agent.list()` and `$.tool.call` throw naming the station. A handler that needs one fails, and the station's one failure rule applies (a failed handler neither blocks nor adds instructions) — the rule every manual pass has; whether a PreCompact failure should block a manual pass is a separate decision for both lanes.
|
|
420
|
+
- **Open to veto — every lane.** A pass's credential callback (`getApiKeyAndHeaders` for the summary model) is now awaited against the pass's own signal, as the summary provider's consult already was: a pass cut while the callback is answering ends with the cut (`compaction_outcome{mooted}` / the abort outcome) instead of waiting on a callback that may never settle. A pass that already appended is not undone.
|
|
421
|
+
- **Not on this verb (stated).** No post-compaction file restore and no instruction-file content (there is no execution environment out of a run), no fork-form summary (no main request), and ToolSearch activations made after the newest snapshot inside the summarized range are not restated. The busy check sees this Runner's legs and the writes they issued only: a leg of another Runner on a shared durable session is not refused, and the compaction's commit checks the leaf at append time, not the branch it summarized (an existing property of the pass on every lane).
|
|
422
|
+
- **Shared readers (no behavior change).** `Runner.rewindFiles` reads the same out-of-run doors (request snapshot, idle claim, the session that must exist; its refusal texts unchanged); the turn boundary reads `manualCompactOutcomeOf`; prepare reads `resolveCompactionModel` / `compactionSummaryIsDerived` / `compactionSummaryFallback` (the pre-flight is awaited only for a role-derived summary model, as before — a run with none takes no extra suspension point); the lanes read `summaryProviderOptions`; the leg seed reads `compactionActivationSnapshot`.
|
|
423
|
+
- **Consumers.** @server: `POST /v1/sessions/:id/compact` → `runner.compactSession({ sessionId, model, instructions?, compactionModel?, compaction?, getApiKeyAndHeaders, signal })` with the per-model key resolver and the body→spec mapping runs use, and a request-scoped `signal`; refuse 409 first when the run store shows a running run on the session on any replica and hold the session against new runs while the call is in flight; map `compact.session_busy` → 409, `compact.invalid_request` / `config.unknown_role` → 400, `resume.session_not_found` → 404; relay `events` and answer `outcome` / `usage`. @cli @client-core: idle `/compact` calls the session endpoint at once; the arm-then-fire delay and the `COMPACT_NOT_RUNNING` warning retire for the idle case; a live run keeps the run-scoped verb.
|
|
424
|
+
- **Exports.** +2 types `CompactSessionRequest` / `CompactSessionResult`; `Runner` gains `compactSession`. Closed sets: +2 refusal codes from the new verb only (`compact.invalid_request`, `compact.session_busy`).
|
|
425
|
+
- **Pins.** `test/backlog2451-compact-session.test.ts` (real Runner: landing + frames + next run reads the summary; held session refused; a leg arriving mid-pass waits; the doors; withdrawn request; deployment block; the facade's seats; an unavailable seat; summarizer failure; activation snapshot restated; a credential callback that never settles; the summary model's route fallback; `disabled` / `noop`).
|
|
426
|
+
|
|
427
|
+
### The checkpoint-store contract kit judges the run origin — a row's `state.runOrigin` round-trips verbatim, rides the listing, stays absent when absent, and a word outside the closed set is kept on the row and read as absent in the listing (#2670; contract kit only, `src/` behavior: none; hard-breaking: none; closed sets: none; exports: none; members: none) (@server)
|
|
428
|
+
|
|
429
|
+
- **Before.** `CheckpointState.runOrigin` (7.57.0, `TaskSpec.runOrigin: "scheduled"`) is a persisted member carrying the requirement word `run_origin`, and the listing echoes it as `CheckpointSummary.runOrigin`. The store-contract kit never put a row with the member, so a backend that rebuilds `state` member by member — the shape of a SQL store written before the member existed — passed the whole kit while handing back a row whose requirement list still names `run_origin` and whose content does not. The resume screen refuses that row as `requirements_damaged`, for every worker, for good: a scheduled task's parked approval could be listed and never resumed. Measured on the tree this change started from: five stores, each with one defect on this member, each passed every kit case.
|
|
430
|
+
- **Now.** `checkpointStoreContract` carries one more case, `run origin: …`, over three rows. (1) A row whose `state.runOrigin` is `"scheduled"` comes back with the member verbatim. (2) The listing echoes it. (3) A row without it comes back without the key (never `null`, `""` or a key holding `undefined`), and its listing summary has no key. (4) A row carrying a word outside the closed set comes back with the word kept verbatim (the resume screen refuses it loudly; the store never launders it) and its listing summary has no key. The case runs unchanged over `InMemoryCheckpointStore`, `FileCheckpointStore` and `PgCheckpointStore` (pg-mem); all three pass. No engine behavior changes: `src/` carries only the kit case.
|
|
431
|
+
- **Who is hurt.** A third-party or server-side `CheckpointStore` that drops or fabricates `state.runOrigin`, echoes a word outside `RUN_ORIGINS` in its listing, or launders an outside word on write now fails the kit at `run origin: …`. @server: a SQL checkpoint store that rebuilds `state` by hand must carry `runOrigin` as its own member — absent when the row has none, never `null` — echo it in the listing only for `"scheduled"`, and keep an outside word on the row verbatim; run the kit over your store and read the failing assertion's message.
|
|
432
|
+
- **Pins.** `test/backlog2670-run-origin-kit-case.test.ts`: a premise cell (a stamped row that comes back without the member is `damaged` at the resume screen's own judge), a control (the reference store passes every case) and five bad stores, each the reference store with one defect, each red at exactly the new case and at exactly the named assertion — A rebuilds `state` without the member (1), B a listing that never echoes (2), C a rebuilt `state` carrying `null` for an absent row (3), D a listing that echoes an outside word (4, listing half), E a store that drops an outside word on write (4, row half). All five pass the kit whole on the tree this change started from. Mutations: `mutations.md` in the car receipt.
|
|
433
|
+
|
|
434
|
+
### The rulings-landing gate reads every ledger the way it is written — one row splitter, a `path:line` + snippet is a claim judged on the file's content, a window's note is history it never reads, a disposition addresses ONE row, one comms root per run — `scripts/rulings-disposition.mjs` drafts the post's 裁定处置 lines, and the backlog gate counts only work as a car coordinate (#2113, #2260; release tooling only; behavior change: none; hard-breaking: none; closed sets: none; exports: none; members: none) (@test @cli @server @client-core)
|
|
435
|
+
|
|
436
|
+
- **Before.** Six readings of `scripts/rulings-gate.mjs` disagreed with the books it judges. (1) `BLOCKED(on #N)` took the ticket's state from the FIFTH cell of its backlog row: 188 of 2098 ticket rows are wider than six cells (a bare `|` in a head cell), so for them the "state" was whichever cell stood fifth, and `SHIPPED-…` was never "landed". (2) An `已落` row passed when any ONE of its tokens resolved, so a row that cited a commit and a symbol the code no longer holds read as landed (on the comms ledger of 10-24: 12 `path:line` + snippet claims in 10 rows name text that is not in the file at all — `DATE_ANCHOR_CUSTOM_TYPE` moved to another file, `ENGINE_ATTESTATIONS` likewise, `judgeRead(read, boundary)` changed shape — and 128 more name a line the snippet is no longer on). (3) A ruling that owns several rows in one repo shares one key, so one line in the post disposed of all its due rows. (4) With `--ledger` named, `BLOCKED(on S-563)` was still looked up in whichever comms checkout sat beside the tree; a `#N` / `core@x` blocker in another repo's row could never resolve. (5) A window cell with a note — `7.57.0(10-24 R 对账改窗:7.56.0 未并 / 未派;原 7.56.0)` — was an unreadable window: the 33 rows re-windowed that way were neither format-clean nor due, so leg (a) never asked the post for a line about them. (6) The backlog gate's "car coordinate" was any `car-…` string anywhere in the status cell, so a car that finished, a plan that never ran and an OPEN row naming a planned car all kept a twice-re-windowed row out of the "moving without work" list (22 of the 53 such rows on the stage-7570 ledger).
|
|
437
|
+
- **Now.** (1) A ticket's state is read through the backlog gate's own row reader (`ticketStatusOf`: the second cell from the right) and the rulings gate splits its tables through the backlog gate's `cellsOf` — no second parser; a status that opens with no vocabulary word, and a DEBTS row off its seven columns, are unknown, never guessed. `SHIPPED` and `TEST-VERIFIED` count as landed. (2) A `path:line` (or `path:from-to`, or a bare `:line` after a file was named) immediately followed by a backticked snippet is a claim; when the file is in the tree and the snippet is not in it, leg (b) is red even if another token of the row resolves (a post's 兑现 line is judged the same way). A snippet in the file but not at the stated line is held and counted on one line; `--verbose` lists ruling, old coordinate and lines now. The snippet is judged literally. (3) A disposition names its row: `裁定 C-R97/core.2 改期: …` is the second `C-R97 | core` row; a bare key line is enough only while one row of the key is due, and the finding spells the selector to write. (4) `--comms <dir>` names the one comms root of a run; a named ledger brings the root that holds it, never a neighbour's debts; `--core-root <dir>` (else a sibling `sema-core`) answers `#N` / `core@x` for another repo's rows. (5) A window is `<window> [BLOCKED(on X)] [(note)]`; the note is never read, and a row is due when its first window is at or before the shipping version, whatever the note says. (6) A car coordinate is a commit sha, or a `car-…` name on an IN-PROGRESS row, in the status HEAD (the `原 …` tail is history). New `scripts/rulings-disposition.mjs` writes the post's 裁定处置 section — one 改期 line per due row, addressed by the gate's own selector, each holding `TODO(` until a person writes the reason; it never claims 兑现 or 被取代. (7) `gate:rulings` leaves EXCLUDED for the rc tier (`gate-all --rc`) and the ship lint's rulings leg judges the post: until now the one gate that reads the landing ledger ran in no mandatory run, which is how the 12 rows of 7.54.0 and the 33 re-windowed rows of 7.56.0 went unchecked (open to veto; this is the separately revertable last commit of the car).
|
|
438
|
+
- **Who is hurt.** Nobody at runtime: `src/` is untouched and nothing in the package changes. The release candidate is red until the comms ledger covers the 164 rulings that have no row and the post carries a line per due row (`gate:rulings` is in `gate-all --rc` now; in a container without a comms checkout it REFUSES, exit 2, rather than passes). The release lint reads the new gate: a post that answered a multi-row key with one bare line now needs one line per due row; a ledger row whose snippet left its file is red (12 claims today, listed by the gate); a twice-re-windowed OPEN row that names only a planned car is red from the 7.55.0 line the backlog gate already carries (22 rows on the stage-7570 ledger — dispatch the car and flip the row to IN-PROGRESS, `BLOCKED(on <票>)` it, or close it). Run the gate from another repo with `--comms` / `--core-root` instead of relying on a sibling checkout.
|
|
439
|
+
- **Pins.** `test/backlog2113-rulings-gate-defects.test.ts` (G-1 … G-6, each red on the pre-fix gate and green on this one: positional ticket state, SHIPPED, the bare-pipe row, the DEBTS shape, the second-parser tripwire; claims and their adjacency, the content verdicts over real files, the moved list, the CLI; selectors, bare-key refusal, independence of lines; `--comms` / named ledger / missing root, `--core-root`; the window grammar, history not read, the replay shape), `test/rulings-disposition.test.ts` (the round trip: what the generator writes is exactly what leg (a) asks for), `test/backlog-ledger-gate.test.ts` (`#2260 q1`–`q3`, and the older re-window pin now says IN-PROGRESS where it said OPEN). Mutations: `mutations.md` in the car receipt.
|
|
440
|
+
|
|
441
|
+
### A stored bare-name rule names a tool the catalog spells exactly — a case twin of a catalog tool is refused loudly, like a retired name, instead of being stored to reach nothing (#2654, on #1949; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
|
|
442
|
+
|
|
443
|
+
- **What changed.**
|
|
444
|
+
- A whole-tool rule's name (`Tool`, `Tool()`, `Tool(*)`) is read by the one reading the entry lists and the session-rule store ask
|
|
445
|
+
(`toolNameFaultOf`: the name judgment's stale words, then another spelling of a carried tool), over the one universe the
|
|
446
|
+
persisted store has — the engine's tool catalog, case exact. `BASH`, `webfetch`, `READ` — another spelling of `Bash`,
|
|
447
|
+
`WebFetch`, `Read` — are refused, as a retired spelling (`bash`, `read_file`) already was: a rule the engine can tell reaches
|
|
448
|
+
no tool is no longer stored. The refusal code is `unsupported.tool` for every name that reading faults (a retired, unprefixed
|
|
449
|
+
or unmintable name read `invalid.grammar` in the unreleased #1949 form) and its sentence names the spelling to write
|
|
450
|
+
(`"BASH" is another spelling of "Bash"…`; a misspelt protocol peer: `write "mcp__git_hub__get_issue"`). A set of tools
|
|
451
|
+
(`mcp__srv`, a glob) keeps `invalid.grammar`.
|
|
452
|
+
- Every door that writes a bare name reads it through that one validator: `addPersistedRule` refuses a twin (`failed`,
|
|
453
|
+
`committed: "no"`, nothing written); a whole-tool card record cannot carry one; `prepareCardApproval` mints no card for a tool
|
|
454
|
+
named by a twin and the offer factory says `lane_cannot_speak` for it; `prepareCcImport` skips a twin with the validator's
|
|
455
|
+
code and sentence (the right spelling stays a name-set item the settings layer carries).
|
|
456
|
+
- One home for the reading: `nearMissSpellingOf` and the case comparison move from `allow-entry.ts` to `tool-name-aliases.ts`
|
|
457
|
+
beside the judgment, where `toolNameFaultOf` composes them; the entry reader (`readRuleEntry`) calls it and reads every entry
|
|
458
|
+
exactly as before.
|
|
459
|
+
- **Limits, stated.** A name no catalog tool carries and that is no spelling of one stays a rule (`SendUserFile`, and the typo
|
|
460
|
+
`Bsh`): it may be a tool a deployment mounts under that name, which is the reading the session-rule store and every name list
|
|
461
|
+
already have. The persisted store has no seat to declare a deployment's own tool names, so a deployment's tool whose name is a
|
|
462
|
+
case twin of a catalog name or a retired spelling (`bash`, `read`) has no whole-tool rule and its card says it has none, and a
|
|
463
|
+
typo of a deployment's own tool (`sendUserFile` for `SendUserFile`) is stored and reaches nothing — the declaration seat is a
|
|
464
|
+
candidate ticket. A case twin of a retired spelling (`multiedit`, `TASK`) is no case twin of a catalog name and stays a rule.
|
|
465
|
+
A row stored under a name that now reads as a twin (only a build that accepted the twin wrote one) is read as no rule: the
|
|
466
|
+
person's lane fails a deny or ask of it closed and lets an allow grant nothing, while the sync join drops such a row from the
|
|
467
|
+
round and reports it (`invalid_rule_text`).
|
|
468
|
+
- **Behavior narrowing (open to veto).** What changed: a bare case twin of a catalog tool no longer stores. Who is hurt: a host
|
|
469
|
+
that wrote a rule text such as `BASH` expecting it to land (it reached nothing), or that mounts its own tool under a catalog
|
|
470
|
+
name's case twin. Way back: bare-name rules exist only in the unreleased #1949 form, so no stored row of the refused form is
|
|
471
|
+
in a released build **provided this change ships in the same version as #1949**; shipped apart, a row a build accepting the
|
|
472
|
+
twin wrote would meet the sync drop above, and the answer is a grammar-stamp bump, not this section. A veto restores the
|
|
473
|
+
retired-only judgment in one function (`parseWholeToolRule`).
|
|
474
|
+
- @server: a rule text typed by an operator can now come back `unsupported.tool` for a twin (render the sentence as given).
|
|
475
|
+
@cli: the same sentence on an import report.
|
|
476
|
+
|
|
477
|
+
### The engine's own account leaves through one throat per channel and is minted there — a notice (its sentence and every string leaf of its detail), a trace frame (every string leaf) and a memory announcement item pass the `same-principal` tier where they are delivered, not where each was worded; a host Brain's failure words, a response's reason phrase and a worktree mint's thrown text are minted where the engine receives them (#2529, design/1449 slice S2a; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core @test)
|
|
478
|
+
|
|
479
|
+
- **What changed.** The engine's account channels each have one delivery function, and that function now mints what crosses it,
|
|
480
|
+
so a mint site that splices in a host's, a store's or a remote's words (a thrown text, an env value, a provider's word) no longer
|
|
481
|
+
has to remember to:
|
|
482
|
+
- `deliverEngineNotice` — the one throat every `EngineNotice` crosses — mints `message` and every string leaf of `detail` through
|
|
483
|
+
the `same-principal` text pass. The detail's member names are the engine's own closed words and are kept as written (a detail
|
|
484
|
+
`key` or `tokenCount` is not a credential name); a value inside the detail that is not plain data (an error, a class instance)
|
|
485
|
+
is read the way a value from elsewhere is read (`egressValue`: every string member passed, a credential-named member whole,
|
|
486
|
+
under that value's own member bound).
|
|
487
|
+
The unwired seat's console line is the minted sentence. A host Brain's finish word in `route.finish_reason_unknown` crosses
|
|
488
|
+
the same throat.
|
|
489
|
+
- `emitTrace` — the one throat of every trace frame — mints every string leaf of the frame; its kind, numbers and member names
|
|
490
|
+
are kept, and no member bound applies to what the engine built (plain arrays and records), in a frame and in a notice's
|
|
491
|
+
detail alike: its members are carried however many there are (a function member, an unreadable accessor and a member nested
|
|
492
|
+
past the depth bound are not, as before). The member bound applies to a value from elsewhere only (an error, a class
|
|
493
|
+
instance, a proxy — whose traps can answer a fresh value at every read), one bound per such value, the bound `egressValue`
|
|
494
|
+
reads it under; an object such a value reached first answers that one reading where the engine's data reaches it again.
|
|
495
|
+
- The memory announcement queue (`enqueueMemoryAnnouncement`; the next session's first injection reads it, so it is
|
|
496
|
+
model-facing) mints each item, and a standing condition's family prefix by the same pass (so a condition whose sentence carries
|
|
497
|
+
a credential still holds one line and still clears); the queue's one read path mints the items it reads too, so a line an older
|
|
498
|
+
engine or a neighbour left in `announcements.json` reaches the next injection minted; the consolidation driver's failure items
|
|
499
|
+
mint the failure's detail before their 300-character bound.
|
|
500
|
+
- A station that bounds a store's words before the notice throat mints them before its cut: the cross-boundary record notice
|
|
501
|
+
(`config.cross_boundary_record_unwritten`) mints the store's failure text, then bounds it to 300 characters. A detail member
|
|
502
|
+
that cannot be read (a throwing getter) is left out on its own; the members around it are read once and kept; an object the
|
|
503
|
+
detail reaches twice (as data and as an error's cause) is read once.
|
|
504
|
+
- The three lanes that account for a failed compaction pass — the turn boundary, the end-of-task pass and the prompt-too-long
|
|
505
|
+
recovery — read one reason: the thrown words minted, then bounded to 512 characters. The end-of-task and recovery lanes
|
|
506
|
+
carried the raw words into `compaction_outcome{failed}.reason` (and the end-of-task lane into its trace frame) before. The
|
|
507
|
+
`task.onerror_sink_failed` frame's reason is minted before its 256-character cut.
|
|
508
|
+
- A host Brain is its own transport: the failure words of a final message it answers are read once and minted where the loop
|
|
509
|
+
receives the message (`remoteWords(…, [])` — a fixed point over the engine brains' words, which their builders minted, so those
|
|
510
|
+
messages pass unchanged; a message whose words are an accessor or a proxy's answer — whatever the first read answered — is
|
|
511
|
+
carried as a copy holding the one minted reading, built without reading the member again, so a second read can neither answer
|
|
512
|
+
differently nor throw), and a Brain that throws has its thrown text minted where the harness builds the failure from it. So
|
|
513
|
+
`TaskResult.errorMessage` / `terminal.message`, the session archive's `API Error` record and the events read minted words for
|
|
514
|
+
every brain.
|
|
515
|
+
- WebFetch reads a response's reason phrase (`statusText`) through one minting reader: the failure headline (it sits outside
|
|
516
|
+
the untrusted fence), every `details.codeText`, and the SearXNG backend's failure text.
|
|
517
|
+
- The Agent tool carries a worktree mint's and a cleanup check's thrown text minted (`details.cause`, `details.worktreeCause`,
|
|
518
|
+
the report's settle line).
|
|
519
|
+
- **Behavior narrowing (open to veto).** What changed: a notice's sentence or detail, a trace frame, a memory announcement, a
|
|
520
|
+
compaction failure reason, a host Brain's failure text, a WebFetch failure headline or `codeText`, and a worktree failure cause
|
|
521
|
+
no longer carry a credential-shaped string (the credential vocabulary's forms — vendor tokens, bearer values, `key=` / `token:`
|
|
522
|
+
label values, URL userinfo, signed URL parameters); a notice's detail and a trace frame reach the host as a new value (a data
|
|
523
|
+
snapshot of what the engine built), never the object the mint site built; a host Brain's failed final whose words the mint
|
|
524
|
+
changes is carried as a copy holding the minted words. Who is hurt: a host or a test that matches a notice's or a frame's
|
|
525
|
+
words literally where they held such a string, that keeps a reference to a detail object to compare it, or that reads a
|
|
526
|
+
credential-shaped value a notice's detail carried (a raw env-knob value that happens to have a credential's shape). How to
|
|
527
|
+
migrate: read the structured members (codes, counts, names, statuses); a credential-shaped value is not carried.
|
|
528
|
+
- **Consumers.** @server: notices, trace frames and the compaction failure reasons on runs arrive minted (core's marker
|
|
529
|
+
`[redacted]`; the server's own marker and its read-path redaction are unchanged). @cli: an engine notice's console fallback line
|
|
530
|
+
is minted; the engine's other, direct `console` lines are not yet (S2b), so `engine-<pid>.log` can still hold what a host's or a
|
|
531
|
+
store's throw wrote (KNOWN-LIMITS KL-1449-a). @client-core: notice `message` / `detail` arrive minted. @test: notice, trace and
|
|
532
|
+
announcement texts that carried credential-shaped words now read the marker.
|
|
533
|
+
- **Not in this slice (S2b).** One engine console function and a closed-set gate "no `console.*` in src outside it" (27 direct
|
|
534
|
+
console calls in 16 files); the `onError` lane, which still hands a host the thrown value itself; side calls that read a host
|
|
535
|
+
Brain's `errorMessage` outside the loop (the classifier ladder, the advisor, memory consolidation); announcement items that
|
|
536
|
+
bound foreign words before the queue (the queue mints whole words only), and stations elsewhere that cut a thrown text before
|
|
537
|
+
any mint; the provider's echoed `responseModel`.
|
|
538
|
+
- **Pins.** `test/backlog2529-account-throats.test.ts` (N1 / N1b the notice sentence, wired and unwired; N2 the detail's
|
|
539
|
+
string leaves and kept names; N3 a foreign value in the detail; N5 an unreadable detail member; N6 the cross-boundary record
|
|
540
|
+
notice's cut; N7 one walk; N4 control; T1 a trace frame; T2 the sink-failure reason minted before its cut, through a real
|
|
541
|
+
Runner; L1–L3 the three compaction lanes with a host summarizer, L2 a control (that lane minted before); H1 a host Brain's failed
|
|
542
|
+
final through a Runner and the file session archive; H2 a Brain that throws; H4 / H5 failure words behind an accessor; H3
|
|
543
|
+
control; W1 / W2 the WebFetch reason phrase; A1 the Agent tool's worktree mint; M1 / M3 / M4 / M2 the announcement queue, its
|
|
544
|
+
family prefix and its read path); `test/backlog1449-account-unbounded.test.ts` (U1 a real Runner's `prompt.assembled` frame for
|
|
545
|
+
a 300-tool mount carries the members a 2-tool mount's frame carries — `ts`, `totalChars`, `snapshot`, `lowering`, every tools
|
|
546
|
+
row; U2 a 3 000-row frame reaches the tracer as built; U3 a credential-shaped string past 2 000 members is still minted; U4 a
|
|
547
|
+
3 000-member notice detail; U5 a value from elsewhere under its own bound, the one after it whole; U6 a proxy that mints a fresh
|
|
548
|
+
proxy at every read is read under the bound, not followed level by level).
|
|
549
|
+
|
|
550
|
+
### A session write belongs to the leg that issued it, and what a resumed leg's continuation carries settles at that message's own receipt (#843 / #2080; behavior change, open to veto; hard-breaking: none — no store contract change; closed sets: none; exports: +1 root name `teardownLegBudget` (function, #2557)) (@server @client-core @cli)
|
|
551
|
+
|
|
552
|
+
- **Before.** A bounded teardown leg that wrote to the session (the date anchor, the workspace state, the announced-listing
|
|
553
|
+
snapshot, a `resumeAt` write-back) and outlived its 15 s bound kept running while the leg's session lock was released at
|
|
554
|
+
its result. The session's next leg on the same Runner woke the session and wrote beside it: when the late write landed
|
|
555
|
+
first, the next leg's own first append lost the leaf CAS — that run failed `conflict` and its objective never reached the
|
|
556
|
+
transcript; when it landed second, the late write failed with nobody told. Separately, a resumed leg's continuation was
|
|
557
|
+
marked delivered when the loop took the prompt, before the message was in the session: a failed append of it lost its
|
|
558
|
+
parked steers, the caller's wake message and the orphans' obituary with no account, and a review gate's reject carried by
|
|
559
|
+
it read as delivered, so its row was not reopened.
|
|
560
|
+
- **Now.** (1) The writes a leg issues to its session stay the session's until they settle (a Runner-level ledger beside the
|
|
561
|
+
session lock). The session's next leg starts only once they have: it waits at most the teardown bound and otherwise fails
|
|
562
|
+
`conflict` before writing anything. A write a leg issues after its leg ended is not started; a write that settles after its
|
|
563
|
+
leg ended is reported through `onError` (`phase: "degraded"`, "… it landed" / "… it failed: …"). A session with no write in
|
|
564
|
+
flight takes no new suspension point at its hold: the ledger is asked synchronously and only a busy session awaits the
|
|
565
|
+
settle (the leg's failure path keeps the microtask depth it had). `rewindFiles` answers
|
|
566
|
+
`rewind.session_busy` while such a write is in flight. (2) A resumed leg's continuation — parked steers, the wake message,
|
|
567
|
+
the approving person's words, the orphans' obituary and a review gate's decision — is settled when the continuation message
|
|
568
|
+
is in the session (the prompt's own append receipt, the step the live steer lane already settles at): a failed append
|
|
569
|
+
leaves it owed, so the frames are announced as `task.user_steer_undrained` and an undelivered reject returns its row to
|
|
570
|
+
pending. The resumed frames' `human_input` "applied" accounts go out at that step (still before the message's
|
|
571
|
+
`message_committed`).
|
|
572
|
+
- **Behavior change (open to veto).** *What changed*: a leg on a session whose previous leg on the same Runner left a write
|
|
573
|
+
unsettled waits for it (up to 15 s) and then fails `conflict` up front instead of starting beside it. *Who is hurt*: a
|
|
574
|
+
deployment running same-session tasks back to back on a store slower than 15 s per append — the second task now fails
|
|
575
|
+
before it starts (it used to fail mid-run, or drop the late write in silence). *How to migrate*: nothing to change — retry on
|
|
576
|
+
`conflict` as before; a store that slow is already reported by `TeardownLegTimeoutError`.
|
|
577
|
+
- **Limits (stated).** The ledger covers writes that reach the store; the harness's own queued writes held under an abort die
|
|
578
|
+
with a durable-suspended harness as before. The bounded wait is the drain — waiting behind a leg that is still running is
|
|
579
|
+
unbounded as before, and so is a leg wedged inside an awaited in-run append. The fence is one Runner: two Runners sharing a
|
|
580
|
+
store, or two processes, stay fenced by the leaf CAS only. A resume refused at the drain was already claimed; it takes the
|
|
581
|
+
existing reopen path (`env_failed`) — and, like any resume that fails between its claim and its leg, it drops a wake message
|
|
582
|
+
with no account.
|
|
583
|
+
- **Exports (#2557).** +1 root name `teardownLegBudget` (function, `(): number`): the bound in force for one teardown leg, in
|
|
584
|
+
milliseconds (15 000) — the same number the session's next leg waits at most for a late write. @server (S-2153): a pod
|
|
585
|
+
reclaimer's release wait reads it from the root instead of keeping a copy of the constant (`ENGINE_TEARDOWN_RELEASE_MS`).
|
|
586
|
+
- **Consumers.** @server: no store change (`PgSessionStorage` / `TiDBSessionStorage` / the window and fork-routing stores
|
|
587
|
+
unchanged); the new `conflict` arm meets the existing evict-and-retry. @client-core / @cli: `task.user_steer_undrained` rows
|
|
588
|
+
can now appear for a resumed leg's parked steers / wake message (the existing family, counted under `steer`).
|
|
589
|
+
- **Pins.** `test/backlog843-session-write-hold.test.ts` (W1 the abandoned write lands first and the next leg runs on top of it;
|
|
590
|
+
W2 it does not settle in time: the next leg is refused up front, a later one runs; W3 the ledger's clauses; W4 the rewind
|
|
591
|
+
verb's busy fact; W5 an idle session's hold takes no drain await — the hold resolves on the lock's own depth and the ledger is
|
|
592
|
+
never asked to settle; C1 / C2 a parked steer / a wake message on a failed continuation append are announced; C3 a delivered
|
|
593
|
+
continuation owes nothing and "applied" precedes the commit; C4 an undelivered plan reject reopens; C5 a refused leg's
|
|
594
|
+
stream settles at once). Re-pinned to the surviving reading: `backlog554-interrupted-continuation`,
|
|
595
|
+
`backlog554-resume-batch-settlement` (the loop's hand-off seam is retired; delivery is the prompt's `message_end`).
|
|
596
|
+
|
|
597
|
+
### A resume's claim is reversible by the store contract — `CheckpointStore.reopen` is a required verb (the `redecision` declaration retires), every refusal after the claim returns the row to pending, the result says what happened to it, and a leg is compensated once (#1914, and #1900's resume-lane and alias cells; hard-breaking, open to veto; closed sets: none; exports: `checkpointStoreExecutionUndeclared` renamed `checkpointStoreIncomplete` (it names every required member a store lacks — the `execution` declaration, the `reopen` verb — and answers `undefined` when none is missing); `CheckpointStore.reopen` becomes required; `CheckpointStore.redecision` removed) (@server @dgx)
|
|
598
|
+
|
|
599
|
+
- **Before.** The resume ladder wins the checkpoint's CAS before the resumed leg prepares; a refusal at that prepare (the doors that read the leg the claim's hand-off builds — interaction posture, the approval seat, the model gates, prepare's own stretch — and every judgment that needs the assembled roster: a near-miss own list, a re-supplied tool whose name no caller tool may carry) could return the row to `pending` only through the store's optional `reopen`. A store without it kept the row `resolved` — the approval gone — while the leg's failed result was byte-identical to the one a reopening store produced (the thrown exit added no account of the row), and three documents said the row stays pending "on a store with `reopen`" or that the engine probes for it (INTEGRATION-CORE, KNOWN-LIMITS, SERVICE-INTEGRATION-GUIDE). The returned exit answered a definitive reopen refusal with "its state is unprovable".
|
|
600
|
+
- **Now.** One contract: `reopen` is a required verb, and the verb is the contract — the store seat (`resolveCheckpointStore`, the one function every seat read goes through) refuses a store that does not carry it, beside the `execution` declaration; no declaration stands for it (`redecision` retired, and with it the sandbox-admission mode's own read of it: a resolved store is re-decidable). A claimed leg that ends before its decided action is disposed — a failed restore, a refusal at its prepare, an abort, a leg that returns failed — returns the row through it, under the failure's reason (`config_refused` for a configuration refusal). What happened to the row is ONE reading of the store's answer (`compensateUnstarted`) and one sentence per outcome on every exit (the thrown backstop, the returned settle, the post-claim abort): reopened (the leg keeps its own code; the message adds that the checkpoint was REOPENED and what to do), declined (`reopen` answered `false`: the row is no longer the resolved row this leg claimed — missing, expired, its decided action already disposed, or pending again — read it before deciding), unknown (the reopen threw: state UNKNOWN, the store's error named through the same-principal redaction on every exit; a throw is never read as a refusal, whatever code it carries). One compensation per leg: a leg whose result was already minted (a tail step threw after the run body settled it) is not reopened, unpinned or torn down a second time by the backstop. Claim and prepare keep their order: the leg's prepare rewinds the transcript, restores the paused environment and dials its peers, which only the claim's winner may do, so the screen before the claim stays the early exit and the reversal is what makes the late one safe. Reach, stated: a deployment's post-consume hook (`RunInternals.afterCheckpointResolve`) that throws, or a post-claim abort after it ran, leaves the row to the hook owner's rollback as before.
|
|
601
|
+
- **Hard-breaking (open to veto).** (1) *What changed:* a store without the `reopen` verb is refused at the first read of either store seat (`config.invalid_checkpoint_store`, the sentence naming each missing member), and the engine has no lane for one (a refusal after the claim always asks the store to reopen). *Who is hurt:* a hand-written `CheckpointStore` that omits `reopen` — TypeScript reports it at compile time, a JavaScript store (or a wrapper that does not forward the verb) at the first prepare; server's SQL and local stores already implement it. *How to migrate:* implement `reopen` (the store-contract kit's reopen cases are the reference) and forward it in every wrapper. (2) *What changed:* `CheckpointStore.redecision` is removed from the contract and read nowhere. *Who is hurt:* server's SQL and local stores and any deployment store (@dgx) that declare `redecision = { reopen: true }` — the field becomes a dead member (no compile error for a class; an object literal typed as `CheckpointStore` gets an excess-property error), and a test pinning it pins nothing the engine reads. *How to migrate:* delete the field; nothing replaces it. (3) *What changed:* the root export `checkpointStoreExecutionUndeclared` is renamed `checkpointStoreIncomplete` and returns `undefined` for a store that carries every required member. *Who is hurt:* a host wrapper that minted the engine's refusal itself. *How to migrate:* call `checkpointStoreIncomplete(seat, store)` and throw what it returns.
|
|
602
|
+
- **Behavior change (open to veto).** (1) A failed result whose claimed row was reopened now says so in its message (the code is unchanged), and a reopen the store declined says "DECLINED … read the row" on every exit instead of "terminally consumed" (thrown and abort exits) or "unprovable" (the returned exit). The codes do not separate every outcome on the returned exit (the leg's own code is kept either way) — a structured outcome member is a follow-up. (2) A widening: the sandbox-admission mode now arms over a store that carries `reopen` but never declared re-decision (before, a missing `redecision` declaration kept it off); every store's `reopen` is now contract.
|
|
603
|
+
- **Consumers.** @server: delete the two `redecision` fields (`checkpoint-store-sql.ts`, `local-checkpoint-store.ts`) and the test that pins them; a test that wraps a store without forwarding `reopen` is refused at the seat; `resume.reopen_failed_unstarted` / `checkpoint.reopen_failed` keep their codes, their sentences change. @dgx: a deployment store implements `reopen` if it lacks it and drops `redecision`.
|
|
604
|
+
- **Pins.** `test/backlog1914-claim-reversible.test.ts` (S the seat: both seats, a member that is not a function, a proxy that hides the verb, both members missing named in one refusal, the in-tree stores accepted with no declaration, the sandbox-admission mode arming over a store that declares nothing; R seven refusals after the claim — interaction posture, an unknown model, a reserved card on a caller tool, a near-miss own list, a re-supplied tool named `-deploy`, one whose second alias is `-x`, one whose alias is not a string — each: the leg's own code, the row pending under `config_refused` at `rev` + 2, the reopened sentence, the corrected resume redeeming the same token; O the three exits under a store whose `reopen` answers `false`, one that throws after committing, and one that throws an error carrying the refusal's own code (still unknown); a credential in the store's error redacted on all three exits; one compensation per leg — a minted result is not reopened again). `test/docs-contract-pins.test.ts` reads the required call, not the retired probe. The files that pinned the removed lane (a store with `reopen` deleted) re-pin onto a store whose `reopen` declines, each cell keeping its purpose (before-the-claim cells: the row pending and byte-identical; after-the-claim cells: `checkpoint.reopen_failed` with the leg's refusal as the lead).
|
|
605
|
+
|
|
606
|
+
### One judge answers "does this shell command only read" for every read-only consumer — the parallel-batch admission, the read-only shell face and the transcript gate stop judging by the program's name, and a face's program list only narrows the judge (#1438 S1; behavior change and security narrowing, open to veto; hard-breaking: one (`readOnlyShellVerdict` takes an options object); closed sets: none; exports: +1 type `ReadOnlyShellOptions`) (@server @test @cli)
|
|
607
|
+
|
|
608
|
+
- **Before.** Four functions answered the question. The read-only reader (`readOnlyShellVerdict`) served the allow layer and a compound's segments; the reversibility classifier served the full shell's probe; a name-only check served the shell tool's `isConcurrencySafe` and the read-only face's execute guard; the transcript gate had a name check of its own. For the last two a program's name on the list was enough: with `bashReadonlyAllow` widened to `sort`, `sort -o out f` ran on the read-only face, and with `readAllow` widened to `sed`, `sed -i 1d <transcript>` passed the transcript gate.
|
|
609
|
+
- **Now.** `isConcurrencySafe` = the reader, narrowed to the shared list (`BASH_READONLY_DEFAULT_ALLOW`: programs with no effect beyond reading under any arguments — no `cd`, which moves the committed working directory, no git, whose configuration can run helpers), reads the call as read-only, and the call is not `run_in_background`. Upstream reads `isConcurrencySafe = isReadOnly` with no list; this release keeps the narrower set (a divergence, open to veto). The reader no longer peels `noglob`: upstream strips it as a zsh precommand, and this engine's shell is bash, where `noglob` is a program or function looked up like any other (a divergence, stricter, open to veto). The read-only face keeps its single-simple-command admission and runs a call only when the reader, narrowed to the face's list (`readers`), reads it read-only. The transcript gate lets a command that references the transcripts through only when the reader, narrowed to `readAllow`, reads it read-only. The name-only check (`coarseReadonlyCheck`, never on the package root) is gone. A program outside a face's list is refused with that face's one sentence (`command "x" is not in the read-only allowlist`), minted in one place for the reader and the classifier. The classifier itself is unchanged in this release.
|
|
610
|
+
- **Hard-breaking (open to veto).** *What changed*: `readOnlyShellVerdict(command, shape?, cwd?, bound?)` became `readOnlyShellVerdict(command, { shape?, cwd?, bound?, readers? })`; `readers` (a `Set` of program names — the check is that `has` is callable, so a `Map` passes it too; a value without a callable `has` throws) narrows the answer to lines whose every named program — each segment's program past a `command` / `builtin` prefix, and an `xargs` segment's target — is listed. *Who is hurt*: a caller passing the old positional arguments — none found outside the engine (server's consumption ledger records the reader as not consumed; test's repro scripts pass the command alone); in-tree, two engine call sites and six test calls moved. *How to migrate*: move the positional arguments into the object (`readOnlyShellVerdict(c, s, cwd, b)` → `readOnlyShellVerdict(c, { shape: s, cwd, bound: b })`).
|
|
611
|
+
- **Behavior changes (open to veto).** *Parallel batches*: read-only pipelines and compounds of listed programs (`ls | wc -l`, `cat a | grep x`, `ls && pwd`) and a listed program behind `command` / `builtin` now join a parallel batch with other read-only calls (they ran in order); a listed program's form the reader refuses (the 13 `grep` spellings below) now stays ordered; git, `sort`, `find`, `cd`, writes, environment assignments outside the reader's names and path-prefixed programs stay ordered as before. *Allow layer*: `noglob <program>` is no longer read-only (it ran without a question). A repository's own configuration can make a git read form run a program (`diff.<driver>.textconv`, an external diff), which the allow layer runs without a question, as before and as upstream does (KL-1438-a); the upstream reader also probes the directory for bare-repository indicators and an unverifiable `.git` redirection before calling a git command read-only, and this reader does not (a named gap, now ticketed). *Read-only face*: a listed program's writing call is refused (`sort -o out f`, `uniq f out`, `gzip f`, `tar cf out.tar f` with the program listed); a listed program behind a `command` / `builtin` prefix runs (`command cat f` — it was refused by the name `command`), and so does it in the transcript gate; over the #994 dual-run corpus, 15 strings the default list used to run are now refused — 13 `grep` spellings the upstream flag walk refuses too (12 short-option clusters carrying a value: `grep -if pat f`, `grep -e/api f`, `grep -f~/x f`; and the abbreviated `--reg=pat`), and two unterminated quotes (`echo "x`). *Transcript gate*: a read-only compound over the transcripts (`cat <t> | grep x`) is allowed (it asked); a listed program's writing call asks (`sed -i` with `sed` in `readAllow`); the ask sentence carries the reader's reason.
|
|
612
|
+
- **Consumers.** @server: `createTranscriptIntegrityPolicy` with the default `readAllow` (`deployment-governance.ts`) — no change needed; a read-only compound over the deployment's transcripts no longer asks. @test: `readOnlyShellVerdict(cmd)` with the command alone is unchanged; the classifier half of the 38-command table reads as before. @cli: none (the verify scripts drive the classifier).
|
|
613
|
+
- **Comments made true.** The tightening reader is the one lexer's projection, not a lexer of its own (rule model, peel projection, root export note) — the lexer half of #1647 was closed by the one-lexer work; its walk half stays with #1536.
|
|
614
|
+
- **Pins.** `test/backlog1438-one-readonly-judge.test.ts`; re-pinned: `tool-parallelism` (`ls | wc -l` is safe), `backlog619` (`noglob ls` is not read-only), `backlog482-cc-e6s-allowlist` (the shared list narrows the reader), `backlog994-s1-dual-run` (the `coarse` column retired), `backlog619` / `backlog1116` / `backlog1685` / `backlog994-s2` (the options object).
|
|
615
|
+
|
|
616
|
+
### A remote endpoint's words reach the engine's own text through one mint — what the request was declared with goes first, then the credential vocabulary, then any cut; persistence is not an exit (#1449 slice S1, #2143 rule; design/1449 r2; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
|
|
617
|
+
|
|
618
|
+
- **What changed.** One function, `remoteWords(text, declared)` (`src/core/protocol-http-auth.ts`), is the form a remote's words
|
|
619
|
+
take when the engine carries them in its own words: every declared value of the request, in each spelling the request-echo
|
|
620
|
+
pass derives, then the `same-principal` credential vocabulary; where a declared value is there, the values the vocabulary finds
|
|
621
|
+
in the ORIGINAL words go with it, so removing a declared value never hides a credential from the vocabulary (a declared `Bearer`
|
|
622
|
+
and the token after it both go) and the vocabulary never leaves the rest of a declared value; words with no declared value in
|
|
623
|
+
them read exactly as the vocabulary renders them. Words are minted once, where they enter the engine's text. Its readers: the
|
|
624
|
+
MCP failure sentence (the module's private copy is gone), the model brains — where a failure is built (an HTTP error body, a
|
|
625
|
+
transport's own throw on connect or mid-stream, a request the runtime refused to build, an in-band error frame), the stream's
|
|
626
|
+
terminal shell for a value no builder minted (a transport's or a seat's own throw, a cancel; a built failure is carried as its
|
|
627
|
+
builder minted it, so the engine's own display-redacted roots keep their `«redacted»`), and the words a finalize writes without throwing (a refusal's words, the
|
|
628
|
+
provider's stop details — read once, so the sentence and the `diagnostics` record agree — a Responses terminal status and
|
|
629
|
+
reason, the malformed-frame sample, a malformed tool call's name and argument fragment, a word that arrived after the stream
|
|
630
|
+
ended) — and the memory distiller seat's failure, its transport's throw included. A brain request states what it was declared with (`SSERequest.declared`: the entry's, the
|
|
631
|
+
deployment's and the call's header bags as the route kept them, the key when it names a secret — a placeholder key (`EMPTY`, a
|
|
632
|
+
one-letter local key) is left in the words as it is left to every child — and on the Anthropic lane a configured version and
|
|
633
|
+
each entry of a declared beta list); the engine's own protocol words (`content-type`, the default version, the betas it chose)
|
|
634
|
+
stay readable. The words are minted before they are cut, so a cut leaves no piece of a value; a failed body that did not end
|
|
635
|
+
(torn, past the 64 KiB read bound) still reports, as before, but its last, unfinished word is not carried — a value's start
|
|
636
|
+
no pass can recognise is always in that word. A provider's echoed `requestId` or `apiErrorCode` rides the
|
|
637
|
+
failure only when the mint would leave it as it is; otherwise it is dropped (`brain.echo_dropped`, the existing trace).
|
|
638
|
+
The mint is a fixed point — it never rewrites one of the four marker literals a pass writes, and a marker-SHAPED word a remote
|
|
639
|
+
wrote is no marker — so a text minted twice (an MCP failure's rethrow and its status face) reads the same; before, a short
|
|
640
|
+
declared value could rewrite the marker (`[[redacted]acted]`).
|
|
641
|
+
Because the session archive's `API Error` record, `TaskResult.errorMessage` / `terminal.message`, the StopFailure hook and
|
|
642
|
+
the memory announcements read the brain's minted text, none of them carries the provider's echo of the request any more.
|
|
643
|
+
- **The rule this states (#2143).** Persistence is not an exit: whether bytes are redacted is decided by who wrote them, where
|
|
644
|
+
the engine words or carries them. Content — what a model, a tool or a user wrote: the session archive's message entries,
|
|
645
|
+
journal replay payloads and a failed row's model output, checkpoint call arguments, spilled tool results, the memory
|
|
646
|
+
distiller's plan and transcript archive — is kept verbatim by the engine's own stores (a replayed thinking block is checked
|
|
647
|
+
byte for byte by its provider; evidence rewritten is no evidence; the reference implementation keeps its transcripts
|
|
648
|
+
verbatim), in files created 0600 under directories created 0700. The engine's own words are minted already redacted. A host
|
|
649
|
+
redacts content at the exit it writes it FOR someone (`docs/INTEGRATION-CORE.md` §0 item 4, unchanged). So the reasoning a
|
|
650
|
+
server's run-event log shows redacted is in the engine's session archive as the model wrote it — two records, one rule.
|
|
651
|
+
- **Behavior narrowing (open to veto).** What changed: a model brain's or the memory distiller seat's failure text no longer
|
|
652
|
+
carries the request's declared values or credential-shaped strings, a torn or over-bound error body no longer shows its
|
|
653
|
+
last, unfinished word, an echoed `requestId` / `apiErrorCode` (or a late frame's word, now `?`) that carries either is absent,
|
|
654
|
+
and the Anthropic `stop_details` diagnostics record holds only its `category` / `explanation` strings, minted. Who is hurt: a
|
|
655
|
+
host, test or operator that matches provider error sentences literally, or keys a support ticket on a request id the
|
|
656
|
+
provider echoed a credential into. How to migrate: read the structured seats (`apiErrorStatus`, `apiErrorCode`,
|
|
657
|
+
`providerCondition`, `requestId`, `errorKind`, `errorBodyIncomplete`), not the sentence.
|
|
658
|
+
- **Differs from the reference (open to veto).** The reference turns a failed API call into a synthetic assistant message
|
|
659
|
+
holding the provider's text as it came; here the failure text is minted at the transport (stricter).
|
|
660
|
+
- **Consumers.** @server: run rows' `failed.errorMessage` now arrive minted (core marker `[redacted]`; the server's own marker
|
|
661
|
+
and read-path redaction unchanged); `requestId` may be absent on a failure that echoed a credential. @cli: KL0170 stays true
|
|
662
|
+
for model replies; the archive's `API Error` records no longer hold the request's declared values. @test: the session
|
|
663
|
+
archive's message entries differ from a redacted run-event log by design.
|
|
664
|
+
- **Not in this slice.** One mint for the engine's account lines — console lines, notices, traces, the `onError` lane, memory
|
|
665
|
+
announcements' other sources, a host Brain's failure text, WebFetch's failure headline, a sub-agent isolation failure's
|
|
666
|
+
`details.cause` (design/1449 S2); declared values written with JSON `\u` escapes (S3); permission checks on existing store
|
|
667
|
+
files (S4); A2A failure text (its own ticket, reading the same mint).
|
|
668
|
+
- **Pins.** `test/backlog1449-remote-words.test.ts` (B1 a real endpoint's 401 echo through a Runner: result, events and the
|
|
669
|
+
session archive; B2 the Anthropic lane; B3 the cut; B4 in-band frames, three lanes; B5 / B5b the distiller seat's body and
|
|
670
|
+
its transport's throw; B6 the vocabulary half; B7–B7d the mint, its fixed point, a forged marker, a declared label; B8 a torn
|
|
671
|
+
body; B9–B9c a transport's throw on connect and mid-stream, an unbuildable request, a cancel; B10 the echoed seats; B11 a
|
|
672
|
+
configured version and beta entries; B12–B12c a refusal, a malformed sample, stop details with a null explanation, a late
|
|
673
|
+
word and a Responses terminal reason; B13 a malformed tool call's fragment; C1 protocol words stay readable; C2 the archive
|
|
674
|
+
keeps reasoning verbatim).
|
|
675
|
+
|
|
676
|
+
### `importHistory` says `unsupported_format` only when the door refuses the envelope; every failure after the door — a source that cannot supply a blob (its read throws, or its bytes fail their address), a fault in staging or publishing — is `adopt_failed` (#2562; behavior change, ruled C-R857, open to veto; hard-breaking: none; closed sets: none; exports: none; members: none) (@server @test)
|
|
677
|
+
|
|
678
|
+
- **Before.** `FileHistoryError`'s contract text said a source that cannot supply a referenced blob, and a fault in the publish step, answer `adopt_failed` (the adoption family's word) and that `unsupported_format` names a bad envelope. The bundled backends answered three things differently: a source whose read THROWS while serving a blob (both backends), a blob whose bytes fail their content address (both backends), and every throw in the File backend's own staging writes and in either backend's catch-all (a disk refusing a good graph) were `unsupported_format` — so a host that reads `unsupported_format` as "the envelope is bad, do not retry" was told that about a healthy envelope, and the server's two SQL stores, which follow the contract text, answered differently from the reference for the same input (two readings of one fact).
|
|
679
|
+
- **Now.** One reading. `unsupported_format` is a word only the import DOOR says: `validateFileHistoryExport` (a foreign epoch, a wrong version, content the closed sets cannot hold — and now also a payload that cannot even be read, a throwing member or a revoked proxy, which used to THROW out of the function; the door now also reads, once, the two members a backend copies without judging their value — `backupTime` and `parentIdent` — so a throwing one is refused here and not found mid-import) and the File backend's own record-naming rule (an entry id that cannot be a file name here — a reserved device name, a leading dot or dash, over 200 characters, an unsafe character), which now runs at the door, before any blob is fetched or byte staged (it used to run mid-staging, after the fetches, and a refused envelope left fetched blobs on disk). Everything after the door is `adopt_failed`, with the caught fault's `permanence` where it has one: a source whose read throws, a source that has no such blob (unchanged), a source whose bytes do not hash to the address asked for, a fault writing the staged graph, a fault publishing it (unchanged in the File backend), and either backend's catch-all. The contract's two sentences (on `FileHistoryError.code` and on `importHistory`) are rewritten to say exactly this, and a test reads them against one table of arms so they cannot drift from the behavior again.
|
|
680
|
+
- **Behavior change (open to veto).** A host that branched on `unsupported_format` from `importHistory` to mean "refuse the payload, do not retry" now sees it only for a payload that is genuinely refused at the door; an unreachable or damaged source and a storage fault arrive as `adopt_failed` (with `permanence` when the fault code is judged). The contract kit now asks the same of a third-party backend: a source whose read throws, and a source whose bytes fail their address, must answer `adopt_failed` (a backend that answers `unsupported_format` there fails the kit's "import door refuses, never coerces" case; the server reports that its SQL stores already answer `adopt_failed` for the throw arm — the wrong-bytes arm is new to them). (@server: no change needed if both arms already answer `adopt_failed`; align the wrong-bytes arm otherwise. @test: the two-database suite reads the kit's new assertions.)
|
|
681
|
+
- **Who is hurt.** A host or test that pinned `unsupported_format` for a throwing or damaged source, or for a staging write fault, on either bundled backend; `test/backlog1468-t2-file-history-permanence.test.ts` is the one in this tree (re-pinned). A caller of `validateFileHistoryExport` that relied on it throwing for an unreadable payload (none known in this tree; the engine's own callers are the two backends).
|
|
682
|
+
- **Pins.** `test/backlog2562-import-failure-words.test.ts`: one table of arms run against both backends (door: foreign epoch / unknown self-description / unreadable payload / entry id the File backend cannot hold, none fetching a blob; adoption family: source read throws with its judged permanence, source has no blob, bytes fail their address, a staging write fault on the tracked set and on a boundary with no half-built graph left, an in-memory publish fault and an in-memory fault after the door); the door never throws over a throwing member, a revoked proxy, a throwing row, and a throwing `backupTime` / `parentIdent` (KL-2562-a records the residue: an in-process object that throws only on a second read); the contract sentences ↔ the table (each row's phrase must stand on the side of the `unsupported_format` sentence its code says; every code word the sentences name is in `FILE_HISTORY_ERROR_CODES`); the kit refuses a backend that answers the old word for either arm.
|
|
683
|
+
|
|
684
|
+
### One selector build — a leg's tool lists are read once by the strict reader, and the selector is built from what was read, before the session is acquired (#2511 / #1913; behavior narrowing, open to veto; exports unchanged)
|
|
685
|
+
|
|
686
|
+
- **Before.** A leg's tool selector (the ceiling it was spawned under, then its own `allowTools` / `excludeTools`) was compiled at the head of prepare by the lenient reader — a list that is not a list, or an entry no rule syntax reads, was read as "hides nothing" — and every early reader consulted that object: the MCP dial gate, the valve, the roster, the memory pair, the ceiling handed to children. The strict reader ran only at the end of roster assembly, on the LIVE layers a second time, and a second compile followed it. So one table had two readers whose agreement rested on their order, a live ceiling was read four times in a run that never parked (its `deny` getter, four; its `allow`, three) and once more when a leg parked — the row's `toolCeiling` stamp read the live layers again, so a getter that changed its answer was recorded differently from the selector the leg ran under — and the strict refusal arrived after the session was acquired and after the declared servers were dialed. Measured on a real Runner, previous stage head: `excludeTools: [" mcp__srv"]` (a leading blank) dialed the declared MCP server once and was then refused; the same entry in a live ceiling layer whose `deny` getter answered it first and `[]` after was never refused at all (the compile read it as nothing, the judgment read the `[]`), and the run completed; a getter that answered `[]` first and the entry after was refused only at the end of roster assembly.
|
|
687
|
+
- **Now.** `readToolSelector({ layers, where, legs })` (`sub-agent-deny-lists.ts`) reads each layer ONCE with the layer reader the run's list judgment used — which now returns what it read, a frozen layer of the entries as written, an absent allowed list staying absent — and compiles the selector from those products; the live layer is never read again. It is called right after the leg's own-list record is bound and before the session acquire, beside the other refused-before-the-acquire doors. `judgeRunToolLists` takes the built selector: its layer loop and its second compile retire, and the selector's layers — which are what the leg hands its children and its workflow agents as their ceiling, and what a parked leg's checkpoint row records as its `toolCeiling` — are the frozen products. Rule count: readers of a leg's selector lists 2 → 1; reads of a live layer per run 3–4 (one more at a park) → 1; the sentence for whose lists the own layer is has one definition (`ownListsWhereOf`), read by the build and the judgment alike.
|
|
688
|
+
- **Behavior narrowing (open to veto).** A leg whose own list or ceiling layer the strict reader refuses is refused before anything is held: the code and the sentence are the ones it always had (`config.tool_face_control`, `unknown_name` / `not_a_list` / `not_a_string`, the ceiling named by its distance, the own layer by `TaskSpec.excludeTools` or the delegation tool that wrote it), but the session store sees no `acquire` (or `forget`) for the refused run, and no declared MCP server is dialed. A live ceiling is read once, so a getter that answers differently the second time is judged and used as it first answered — in either direction (an unreadable first answer is now refused where the compile used to read it as nothing). Not changed: which list a name judgment refuses or keeps, and the order of the refusals after the build (the near-miss, protocol-denied and definition-list judgments still run over the assembled roster, as before). A task with two faults now reports the leg's list first, wherever the other refusal used to sit between the own-list record and the end of roster assembly (a refused `extraBody`, capability declaration or file-history request; a missing session under `requireExistingSession`; a roster or mount refusal).
|
|
689
|
+
- **Consumers.** @server: a refusal of the leg's lists now arrives before the session store is written (`acquire` is not called for it; a store that counted acquires or minted a row on `acquire` sees none for this refusal); the code and sentence are unchanged. Nothing else is asked of the host: `RunToolListsInput.layers` becomes `selector` on an internal function, not an exported name.
|
|
690
|
+
- **What still stands (named, not closed).** `judgeHostToolCeiling` (a workflow host's `RunWorkflowOptions.toolCeiling`) still reads its layers and then compiles the live ones (its own ticket: the refusal's attribution changes when it goes through the build); `compileToolSelector`'s lenient arms stay for its other callers (the spawn-time child selector, the single-layer helpers), which compile lists that are read strictly before any effect; the own-list door (`assertToolNameListValue`) is a third reader of the own layer's list-ness.
|
|
691
|
+
- **Pins.** `test/backlog2511-read-tool-selector.test.ts` (A the dial gate, B one read of a live ceiling, C before the acquire, D the builder, E the judgment reads no layer, F the parked row records the ceiling as read); re-pinned onto the selector: `backlog1875-one-entry-reader`, `backlog1886-r9-closure`, `backlog1910-persisted-selector-canonical`, `backlog1930-near-miss-refuses`.
|
|
692
|
+
|
|
693
|
+
### A background agent has its name from the moment its record exists — the registration writes the spawner's name, or the one derived from the handle (`agent-` + the first twelve hex digits), on the live handle and in the row's first write; `BackgroundAgentRecord.name` is required, so the card of an unnamed parked child can be decided (#2450; hard-breaking, open to veto; behavior change, open to veto; closed sets: none; exports: +1 root name `engineAgentName` (function); `BackgroundAgentRecord.name` and `BackgroundAgentRowSummary.name` go from optional to required) (@server @cli @client-core @test)
|
|
694
|
+
|
|
695
|
+
- **Before.** An Agent call that named no child started a background agent whose live handle and durable row carried no `name` — the park terms never asked for one, by decision, so such a child parked on its approval like any other. A deployment's revive door reads `row.name` and turns a parked row without one away (sema-server answers `409 decide.row_unrevivable`), so the card of an unnamed parked child could be neither approved nor denied: the child sat parked until its checkpoint expired. Two predicates — may it park, may it be revived — answered one question differently, and the engine never made them agree.
|
|
696
|
+
- **Now.** One place writes an agent's name: the background registration (`registerBackgroundAgent`). It takes the spawner's explicit name, else `engineAgentName(handle)` — `agent-` plus the first twelve hex digits of the handle (`a3fa9c2d1b7e04a15` → `agent-3fa9c2d1b7e0`; a pure function of the handle, so the same agent id reads the same name in every process and every store; twelve digits (48 bits: two agents of one caller would have to share twelve digits of their ids to collide, and the name layer resolves a name to the newest holder), not sixteen, so the result is an ordinary admissible name and not the shape of an agent id, which is refused as a name everywhere). The live handle and the durable row take it from that one value, and the row's first write carries it — it is not minted at park time. The park terms and the revive door are unchanged; they now read one fact. A revival hands the row's name back to the Agent call as `name`; when that name is the one derived from the row's handle, nobody chose it, so the call keeps the child unnamed — no spawn identity on its frames, no roster entry, no teammate role appears on its second cycle — and the registration derives the same name again. The other reader that hands a row's name to a place that reads it as an identity, SendMessage's retained-session resume (the child's session kept by this run), takes it through the same reading, so a retained resume does not publish the derived name as a spawn identity either. An explicit name is stored verbatim as before; an empty or non-string `name` handed to `registerBackgroundAgent` is refused (it used to be stored). The row a revival re-registers is healed on the way: a row an earlier version wrote without a name gets the derived one in the revived cycle's first write.
|
|
697
|
+
- **Hard-breaking (open to veto).** *What changed*: `BackgroundAgentRecord.name` and `BackgroundAgentRowSummary.name` are required `string` (they were optional); every row core writes from this version carries one. *Who is hurt*: an implementer of `BackgroundAgentStore` (sema-server's SQL stores, a host's own store) or a host that builds a record or a summary by hand — a TS host sees a compile error where it builds either without `name`; and a store that reads rows an earlier version wrote, which have none (the type is true of rows written from this version on). *How to migrate*: keep a name column (nullable is fine) and read it as `name: row.name ?? engineAgentName(row.handle)` — the derivation core uses, so an old row reads as the name a fresh registration would have given it (core's own in-memory and file stores do not rewrite old rows on read; a revival writes the name into the row, a row that is never revived stays as it is on disk). A door that turns a nameless parked row away keeps working for such rows; for rows read through the line above it never fires.
|
|
698
|
+
- **Behavior change (open to veto) — the derived name is visible.** Wherever a background agent's name is read it is now there for an unnamed agent too: the ListAgents row (it listed the description before), the name layer of SendMessage and TaskStop (`to: "agent-3fa9c2d1b7e0"` reaches the live handle; the description layers still resolve the description), the "did you mean" pool, the durable row. Not changed: the not-found footers of TaskOutput, TaskStop and SendMessage (an agent nobody named is still listed by its task id and description — an address TaskOutput accepts, which resolves exact ids only — and a chosen name is still a bare name), the launch receipt (still the task id), the fleet frames' `name` (the description-backed display label) and `spawnName` (the explicit spawn identity — a derived name is never one), the roster (only explicit names are recorded: after a restart an unnamed agent is reached by its task id, as before). What an unnamed agent is CALLED is not yet one reader's answer: ListAgents shows its derived name (`full?.name ?? t.description`, `list-agents-tool.ts:259`) where the page footer shows its description (`chosenAgentName(h.id, h.name) ?? h.description`, `task-registry-agent.ts:2110`) — #2703 (KL-2450-a).
|
|
699
|
+
- **Consumers.** @server (S-2075): with the name on every row, your revive door's `row.name === undefined` turn-away no longer fires for rows written from this version; read old rows through `row.name ?? engineAgentName(row.handle)` (above) and the unnamed parked card is decidable — the decide route's args (`name: row.name`) are accepted as they are. Your `BackgroundAgentStore` implementations take the type change; the store contract kit's row factory now carries a name. @cli / @client-core: a renderer that reads a background agent's name from ListAgents output or from the durable row now receives `agent-<12 hex>` for an unnamed agent where it used to receive the description (ListAgents) or nothing (the row); the description is still on the row. @test: an unnamed parked child's approve and deny both reach the resume (a decide answered 200 and the run continues), the row shows `agent-<12 hex>` from its first write, and the revived cycle's frames carry no `spawnName`.
|
|
700
|
+
- **Pins.** `test/backlog2450-bg-agent-name-mint.test.ts` — the derivation (form, determinism, admissibility against the spawn grammar and the reserved-name check, a non-handle refused); the registration (the handle and the row's first `put` carry the name, an explicit name verbatim, the same id the same name in another registry, the name resolves through the name layer, a legacy row healed by its revival registration); an unnamed child parked on a real Runner then claimed and driven (approve runs the action, deny does not, the revived cycle stays unnamed on every frame, an explicit name stays a spawn identity, a lookalike name is still one); ListAgents rows; SendMessage by the derived name through tier-3 revival and a revived row an earlier version wrote; a retained-session resume of an unnamed child (no `spawnName` on the resumed cycle's frames or notifications); the not-found footers keep an unnamed agent's task id (the id taken from the footer polls); the two interfaces' required `name` as compile-time anchors. Re-pinned to the new law: `agent-park-jian1-park-mint` (the anonymous child's row carries the derived name) and `agent-park-jian4-durableapproval-forwarding`; fixture rows in eleven store and registry pins carry the `name` the type now requires.
|
|
701
|
+
|
|
702
|
+
### The self-kill guard asks where an environment DECLARES its commands run, not by the remote interface — a host lane is asked again, and `capabilities.sharesProcessTable` is required (#2602; P1 fix; hard-breaking — ruled final, not open to veto (C-R840 加注 2, clay); closed sets: none; exports: none) (@server @dgx @cli @test)
|
|
703
|
+
|
|
704
|
+
- **Before (7.56.0).** The pattern-kill guard (#2348) returned before reading anything for every env that implements the remote
|
|
705
|
+
seam (`isRemoteExecutionEnv`: the interface's members and a capability block). A server's default lane
|
|
706
|
+
(`RemoteHostExecutionEnv`, `provider: "host"`) is such an env and runs its commands as processes of this machine — the
|
|
707
|
+
engine's own process table — so on the product's default lane the guard asked nothing: a black-box run on core 7.56.0
|
|
708
|
+
measured 0 of the 42 kills it refuses on a `NodeExecutionEnv` refused there, and a `pkill -f <word>` whose word was in the
|
|
709
|
+
launcher's command line ended the session that issued it (tool exit 143, the session gone).
|
|
710
|
+
- **Now.** One declared fact: `RemoteExecutionEnv.capabilities.sharesProcessTable: boolean`, required — `true` when the
|
|
711
|
+
adapter's commands run on a table that holds this process (a host lane: they are its descendants; or a PID namespace that
|
|
712
|
+
contains the engine's, such as the host of the container it runs in), `false` only when they run where this process is not
|
|
713
|
+
(another machine, a sandbox container, a pod, a device). One strict reader (only the boolean counts; an env without the
|
|
714
|
+
remote seam reads as this table, which errs toward asking). The guard reads the command first and the declaration second:
|
|
715
|
+
this table ⇒ asked exactly as on a `NodeExecutionEnv` (the same refusals, the same sentences); another table ⇒ not asked
|
|
716
|
+
(what 7.56.0 did for every remote env); absent, not a boolean, or unreadable ⇒ every pattern kill on that env is refused
|
|
717
|
+
(`finding: "unavailable"`, the sentence names `capabilities.sharesProcessTable`) — `kill -9 -1` included — while `pkill -P $$`,
|
|
718
|
+
a kill of other literal pids and every command that is no pattern kill run as before, and the run's admission census
|
|
719
|
+
announces it once (`config.execution_env_capability_invalid`, `detail: { key: "sharesProcessTable", valueType }` —
|
|
720
|
+
`"undefined"` when absent, `"unreadable"` when its getter throws: the one capability key whose absence is announced,
|
|
721
|
+
because it has no default reading; a capability block that cannot be read at all is reported under `capabilities` as
|
|
722
|
+
before).
|
|
723
|
+
- **Hard-breaking (open to veto).** *What changed:* `RemoteExecutionEnv.capabilities` has a required member
|
|
724
|
+
`sharesProcessTable`; an adapter compiled against this version without it does not compile (`implements
|
|
725
|
+
RemoteExecutionEnv`), and one that reaches the engine without it (an untyped adapter, a build against 7.56.0) gets every
|
|
726
|
+
pattern kill refused and one admission notice per run. *Who is hurt:* every remote adapter — server's seven (`adb`,
|
|
727
|
+
`device`, `e2b`, `host`, `k8s`, `local-docker`, `ssh`) and an embedder's own. *How to migrate:* one line in each capability
|
|
728
|
+
block — `sharesProcessTable: true` for the host lane, `false` for the other six; an adapter whose target can be a table
|
|
729
|
+
that holds the engine (SSH to `localhost`, a container started in the host's PID namespace, a lane that executes on the
|
|
730
|
+
host of the engine's own container) declares `true` where its configuration makes that so.
|
|
731
|
+
- **Correction of 7.56.0.** Its note "the guard asks the question of THIS process's table, so it is not asked for a remote or
|
|
732
|
+
sandboxed environment (`isRemoteExecutionEnv`)" was true of the code and untrue of the product: the server's default lane is
|
|
733
|
+
remote-shaped and local, so the guard was absent there (KL-2348-d; exit = this version). KL-2348-b now states the declared
|
|
734
|
+
reach, and what a `true` does not cover: the question is the one a `NodeExecutionEnv` gets, its limits included (it is put
|
|
735
|
+
from the engine's own working directory), and it is asked as for this process's own descendants, so commands on the
|
|
736
|
+
same table that are not its descendants (SSH to `localhost`: BSD's `pgrep` leaves its own caller's ancestors out where the
|
|
737
|
+
real kill would not) and commands in an enclosing namespace (the question sees the engine's namespace only) are answered
|
|
738
|
+
as if they were.
|
|
739
|
+
- **Reference.** The reference implementation's guard is a shell function run in the command's own shell: it asks only when the
|
|
740
|
+
CLI's own pid is visible there (`/proc/$CLAUDE_PID/comm`) and compares the selection with that one pid (cli309.js:266254).
|
|
741
|
+
This engine compares the selection with its whole ancestor chain and decides where to ask by the adapter's declaration.
|
|
742
|
+
Not chosen: asking through the env (`env.exec`) — the chain holds pid 1 whenever the engine's ancestry reaches init, and an
|
|
743
|
+
engine in a container is itself a small pid, so on a sandbox lane in another PID namespace the answer would collide with
|
|
744
|
+
them and refuse ordinary kills (inferred from the code, not run).
|
|
745
|
+
- **Limits (stated).** Unchanged by this change and open: a command whose kill words hold a NUL byte makes the question's
|
|
746
|
+
`pgrep` fail to start, which reaches the tool as an error rather than as the `unavailable` refusal — the command does not
|
|
747
|
+
run either way (KL-2348-e). The `pkill -P $$` way out is read by the option walk that builds the question since #2604, so
|
|
748
|
+
one reader decides both. The undeclared-table notice is once per RUN, not once per deployment: a host that has not declared
|
|
749
|
+
it announces for the parent run and again for every sub-agent run it starts. An environment with no remote interface cannot
|
|
750
|
+
declare at all and reads as this table (KL-2348-b).
|
|
751
|
+
- **Consumers.** @server: the seven capability blocks gain `sharesProcessTable` (`host` true, the rest false); a server that
|
|
752
|
+
has not declared it gets the refusals above with this core. @dgx: the device lane declares `false`. @cli: the product's
|
|
753
|
+
default lane is guarded once the bundled server declares `true`; the refusal is a tool error carrying the sentence. @test:
|
|
754
|
+
core756r2's host-lane arm — expected 42 / 42 refused, with the `NodeExecutionEnv` reading, on a server that declares `true`,
|
|
755
|
+
and 42 / 42 refused as `unavailable`, naming the declaration, on one that does not (this engine's own pins measure the same
|
|
756
|
+
on a host-lane fixture; the black-box arm is not re-run here).
|
|
757
|
+
- **Pins.** `test/backlog2602-self-kill-guard-process-table.test.ts` (T1 46 commands: the same refusal on a declared host lane
|
|
758
|
+
as on a NodeExecutionEnv; T2 controls; T3 / T3b undeclared, malformed and unreadable declarations; T4 a declared other table
|
|
759
|
+
is not asked; T5 the reader; T6 the census; L-H1–L-H3 a child engine whose Bash runs through a host lane). Re-aimed:
|
|
760
|
+
`backlog2348` R5 (a declared other table is not asked; the remote interface alone decides nothing), `backlog787` (its three
|
|
761
|
+
keys; the fourth's absence is pinned here).
|
|
762
|
+
|
|
763
|
+
### One judge of MCP name contention — `judgeMcpNames` answers a declared set's collisions (server names that mint one prefix; one server's tool names that mint one wire name), and the mount, the no-run probe, a listing's intake and a host that saves a set all ask it (#2568; no behaviour change; root exports +5)
|
|
764
|
+
|
|
765
|
+
- **Before.** The same fact was decided in three places, each wording it its own way: the mount minted its refusal sentence from a prefix primitive; the
|
|
766
|
+
no-run probe asked the primitive again and then borrowed the mount's throw; a listing's intake kept a private map of the wire names it had
|
|
767
|
+
minted. A host that assembles a declaration set (a console saving a server list) had no door: a collision was learned only when the next
|
|
768
|
+
run was refused.
|
|
769
|
+
- **Now.** `src/core/mcp-name-judge.ts` is the one judge. `judgeMcpNames(servers)` takes a list of `{ name, tools? }` (`McpServerSpec` fits as it is;
|
|
770
|
+
`tools` are the server's REMOTE tool names when the asker knows them) and answers `{ ok: true }` or EVERY contention as a row:
|
|
771
|
+
`server_name` (two server names minting one `mcp__<server>__` prefix — a name declared twice included) or `tool_name` (two remote tool names of one
|
|
772
|
+
server minting one wire name — one name listed twice included), each row carrying the two sources in declaration order and the name they
|
|
773
|
+
share. `describeMcpNameConflict(row)` is the sentence. The mount and the no-run probe refuse a set with a `server_name` row through one function
|
|
774
|
+
(`config.mcp_server_name_collision`, the first row's sentence, before any dial); the listing's intake asks the same claim ledger
|
|
775
|
+
(`createToolNameClaims`) and words each drop with the same sentence function (`mcpToolDropReason`). The prefix arithmetic answers both "is there a
|
|
776
|
+
collision" and "which names, all of them" (`findNamespacePrefixCollisions`; the single-answer form is its first row).
|
|
777
|
+
- **Behaviour.** No change. Every set the mount refused is refused with the same code and the same sentence; the probe answers a colliding set as the
|
|
778
|
+
mount does; every tool the intake dropped is dropped with the same sentence, the first spelling keeping the name. A battery of nine declared sets
|
|
779
|
+
(fold, a name thrice, control characters in names, a 200-character name twice, accented names, three names onto one prefix, two empty names,
|
|
780
|
+
a separator inside a name, a distinct pair) through the mount and the probe, and four listings through the intake, reads byte-identical on the
|
|
781
|
+
baseline and on this build.
|
|
782
|
+
- **Exports.** +5, none removed: `judgeMcpNames`, `describeMcpNameConflict`, `McpNameConflict`, `McpNameSetServer`, `McpNameVerdict`.
|
|
783
|
+
- **Consumers.** @server: ask `judgeMcpNames(servers)` where a declaration set is saved (`McpServerSpec[]` is accepted as it is; pass `tools` with the remote
|
|
784
|
+
names when you hold a listing) and show `describeMcpNameConflict(row)` — the sentence the run would be refused with. The engine refuses only a
|
|
785
|
+
`server_name` row; a `tool_name` row is what the listing discloses as a drop (first spelling kept), so what a host does with one is its own call.
|
|
786
|
+
A set that is not a list of `{ name: string, tools?: string[] }` is refused (`config.invalid_argument`), never read as clean. @client-core: the
|
|
787
|
+
collision answer for a whole declared set that was asked for (U5) is this call; nothing to change unless the editor wants to say it before submit.
|
|
788
|
+
- **What still stands (named, not closed).** The roster's `config.reserved_tool_name` refusal (a caller tool named like a mounted MCP tool or an engine-injected
|
|
789
|
+
resource face) compares names that exist only after a listing against the caller's own `TaskSpec.tools`; it is not a contention inside a declared MCP
|
|
790
|
+
set and stays at its site. An A2A peer set reads the same prefix arithmetic with its own code and sentence. The judge reads no `allowTools` /
|
|
791
|
+
`toolAxes` / `toolFaces` key: those are filters and declarations over names, not a list of the server's tools.
|
|
792
|
+
- **Pins.** `test/backlog2568-mcp-name-judge.test.ts` (P1–P4 the rows, N1–N3 the controls, V1 a malformed set, E1 / E2 the mount and the probe say the judge's
|
|
793
|
+
sentence and code, E2b a passing pair is not refused, E3 the intake drops exactly what the judge's tool rows name, S1 no second copy of the rule in the
|
|
794
|
+
mount / probe / intake source, S2 the root door).
|
|
795
|
+
|
|
796
|
+
### The self-kill guard's way out — `pkill -P $$` — is read by the option walk that builds the question, not by a second reading of the raw words: a line that names the shell's pid once no longer runs unasked when another parent stands beside it, the selection is negated, or a word of the line cannot be read (#2604; security fix and behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none — one internal function and one internal type in `src/tools/fs/pattern-kill-guard.ts`, not index-exported) (@test)
|
|
797
|
+
|
|
798
|
+
- **Before.** The guard (#2348) does not ask `pgrep` about `pkill -P $$` — the children of the shell that runs the command hold no ancestor of the agent — and it decided that from the raw words with a reading of its own: any `-P` / `--parent` followed by the shell's pid word exempted the whole line, and a negation was known only as the full spelling `--inverse` or a bundled `-v`. The reading also ignored two facts about the words it was reading: a word the guard cannot read (a stream appended by `xargs`, an expansion that is not the shell's pid) could be another `-P 1` or a `-v`, and where the platform's options end at the first operand (BSD's / macOS's `getopt`) a `-P $$` after the pattern is a pattern, not an option. Lines of all four kinds therefore ran unasked and could reach the agent. `pkill -f WORD -P $$ -P 1`: BSD's `pkill` unions repeated `-P` lists (the shell's children plus the children of pid 1), procps' keeps the last one (the children of pid 1), so with the init process as the agent's parent the line selects it. `pkill --inver -P $$ x`: procps reads any unambiguous prefix of a long option (`--inver` is `--inverse`), and a negated selection is every process the other selectors do not name — the agent's ancestors included.
|
|
799
|
+
- **Now.** The one walk that already reads every option of `pkill` / `pgrep` for the question (the table of procps' long options with prefix resolution, bundles, attached and next-word values) also records every `-P` list in the order given and whether the selection is negated, and the way out is a predicate over that record: every parent the platform's reading of the `-P` options leaves standing (procps: the last list; BSD: all of them, as a union) is the shell's own pid word (`$$`, `${$}`: the special parameters, which a command can neither assign nor unset — `$BASHPID` is not one, below), nothing is negated, and every word of the line is known — a stream of arguments, or an expansion other than the shell's own pid (it expands to digits and can be no option), lifts the way out. Where the platform's options end at the first operand (the one platform constant `killall` already read, now shared), the words after the pattern are patterns, passed on as written and read as no option. The independent exemption reader and the independent negation reader are gone (two raw-word readings → none). A line the predicate does not accept is asked as written, or — while the shell's pid word is still in it — refused as decided when the command runs, as any word the shell expands is.
|
|
800
|
+
- **Behavior narrowing (open to veto).** *What changed*: `pkill -f WORD -P $$ -P 1` and `pkill -P $$ -P 1 x` (another `-P` list beside the shell's: any on BSD, one after it on procps — `pkill -P 1 -P $$ x`, whose last list is the shell's, still runs on procps) and `pkill --inver -P $$ x`, `--inve` / `--inv` / `--in`, `-vP $$ x`, `-fv -P $$ x` (a negation in a spelling the old reading missed), `pkill -P $$ "$X"`, `pkill -P $$ -f "$X"`, `pkill -P $$ x $(…)` and `echo … | xargs pkill -P $$ …` (a word the guard cannot read beside `-P $$`: any expansion but the shell's own pid — an unquoted glob, `~` or `{a,b}` word too — and any stream) and, on macOS, `pkill -af . -P $$` and `pkill -f x -P $$ -u root` (the `-P $$` stands after the pattern, so it is a pattern) were run and are refused now. **`$BASHPID` is no longer the shell's pid word**: `pkill -P $BASHPID x`, `-P ${BASHPID}` and `--parent=${BASHPID}` (run unasked in 7.56.0; `-xP$BASHPID`, refused there as computed, stays refused instead of joining the widened bundle spelling below) are refused as decided when the command runs, and so is a `$BASHPID` word beside a `-P $$` (`BASHPID=-v; pkill -P $$ $BASHPID x` negated the selection; run unasked in 7.56.0). It is an ordinary variable in the shells commands run under: `/bin/bash` 3.2 (macOS's, and the shell the Node environment prefers on POSIX) has no such special variable, so `BASHPID=<the parent's pid>; pkill -P $BASHPID -f WORD` selects the children of the parent — the outer shell among them — and bash 5 ends its special meaning after `unset BASHPID` (measured on 3.2.57 and 5.3.15: the assignment sticks on 3.2 and after `unset` on 5); only `$$` and `${$}`, which cannot be assigned or unset, are the shell's pid. *Who is hurt*: a model that wrote a second `-P` beside `-P $$`, a negation in a spelling the old reader missed, a variable or a pipe-fed word in a `pkill -P $$` line, `-P $$` after the pattern on macOS, or `-P $BASHPID` — the refusal says so and names the way out. *How to migrate*: drop the extra `-P` or the negation; write the pattern as a literal (`pkill -P $$ -f mypattern`), put `-P $$` before the pattern, and write `$$` (or `${$}`) where `$BASHPID` stood.
|
|
801
|
+
- **Reading widened to what the killer reads (open to veto).** `pkill --par $$ x` (an unambiguous prefix of `--parent`), `pkill -P $$,$$ x` (a list of shell words) and `pkill -xP $$ x` (the `-P` inside a bundle) were refused as computed; each is the shell's children and now runs unasked. A `-v` that is no switch is no longer read as a negation: the value of another option (`pkill -F -v -P $$ x`, `pkill -P $$ -u -v x`), a pattern after `--` (`pkill -P $$ -- -v`), and on macOS a word after the pattern (`pkill -P $$ x -v`, `pkill -P $$ x -P 1`: patterns, so the shell's children still bound the selection).
|
|
802
|
+
- **Limits (stated).** The procps arm is read off its source (the option loop assigns a repeated `-P` list; `split_list` splits at commas) and runs only on Linux; the macOS arm was measured with the real `pgrep` (a union of repeated `-P` lists; a word after the first operand is a pattern: `pgrep zsh -l` prints pids only); the cells load the module as each platform does, so both arms are pinned on every host, and what procps then answers is the source's, not a measurement here. A shell's pid written as a literal number cannot be known to the guard and is asked like any other pid.
|
|
803
|
+
- **Consumers.** @test: the `selfkill` fence's guard cells (`pkill -P $$` as the way out) keep their reading; two lines are worth adding — `pkill -f <word> -P $$ -P 1` and `pkill --inver -P $$ <word>` are refused on procps and macOS alike (the agent's parent held by pid 1 is the field case).
|
|
804
|
+
- **Pins.** `test/backlog2604-parent-list-reading.test.ts`: E (every spelling of the way out reads as nothing to ask, the widened spellings and the non-negations among them), A (another parent beside the shell's: refused), N (every spelling of a negation: refused), S (a stream or an expansion other than the shell's pid lifts the way out, and the refusal names that word), O (where the options end — the same line under the two platforms' grammars), Q (another pid asked as written), G (a repeated `-P` under the two platforms' grammars), and for `$BASHPID`: B (every spelling of it bounds nothing: refused as computed under both platforms' grammars, assigned or not), U (it beside a `-P $$` is a word the guard cannot read), K (`$$` / `${$}` still bound the selection); re-pinned: the `-P $BASHPID` cells of E and of the #2348 R2 moved to `${$}` and R3 now holds the refused `$BASHPID` lines (R7 reads the same).
|
|
805
|
+
|
|
806
|
+
### A held message's decision is the record's own field in its box — one compare-and-set, read by every consumer, so a letter a person refused in one terminal is refused in all of them; `principalInboxConsumer: "terminals"` is accepted (#972b, design/972b slice S1, C-R864; hard-breaking; open to veto; closed sets: `MailboxDecision` new; exports: +13) (@server @cli @client-core @test)
|
|
807
|
+
|
|
808
|
+
- **What changed.** `MailboxMessage.decision` (seven words: `held` / `approved` / `delivered` / `denied` / `expired` / `refused`
|
|
809
|
+
/ `dropped`) is the decision about a parked record a recipient's setting held. It is never appended; it moves only through the
|
|
810
|
+
new required `MailboxStore.moveDecision(scope, handle, seq, expect, next)` — a compare-and-set, atomic against every other move
|
|
811
|
+
and against `ack`, not fenced by the lease (a person answers from whichever terminal shows the card), refusing a malformed call
|
|
812
|
+
with `mailbox.invalid_decision_move` before any side effect. The decision law: absent → `held`; `held` → `approved` /
|
|
813
|
+
`delivered` / `denied` / `expired` / `refused`; `approved` → `delivered` or a final word; `delivered` → `dropped` only; a final
|
|
814
|
+
word never moves. Every lease snapshot carries the decision, so the drain reads it from the box: a final record is disposed of
|
|
815
|
+
(and never re-supplied) and the ack prefix may pass it; a record held or approved elsewhere is shown as a card here and the card
|
|
816
|
+
— the queue is the one writer of every move out of `held` / `approved` — refuses, releases or hands it over with the receipt
|
|
817
|
+
that move owes; a `delivered` record not yet acked is handed over again (at-least-once). Every hand-over of a held record is
|
|
818
|
+
itself the move to `delivered`, taken by a pass that holds that box's lease and can inject now; an answer that lands later
|
|
819
|
+
learns it came too late. `moveMailboxDecision` is the one caller-side reading of a move that faulted after committing.
|
|
820
|
+
- **The held queue is a presentation of the decision.** `PeerHeldQueue.hold` / `rejudge` / `settle` / `shutdown` return Promises
|
|
821
|
+
(the answer is the store's); `settle` answers `decided_elsewhere` when another consumer's move won first; `PeerHeldEntry.released`
|
|
822
|
+
is replaced by `decision` (`held` / `approved` / `delivered`); `PeerHeldSettlement` gains `retired` (the card left this process,
|
|
823
|
+
no decision was taken) and `PeerHeldSettleReason` gains `decided_elsewhere`; the sink gains `decide` (the store's move),
|
|
824
|
+
`tellsSender`, `canInject` and `onFault`; `reconcile` takes the snapshot's seq → decision map. `decisions()`,
|
|
825
|
+
`forgetDecisions()` and `PEER_HELD_DECISION_MEMORY` are retired: no decision is remembered beside the box any more. A
|
|
826
|
+
queue-local event — eviction at the cap, process shutdown, a hand-over the lane refused — is written to the record only from the
|
|
827
|
+
state it ends and only when its receipt reaches the sender (the session lane); an approved card is never overridden by it; on
|
|
828
|
+
the principal inbox it only takes the card out of this process and the letter stays held for the other terminals. At the cap the
|
|
829
|
+
oldest held card that tells its sender is evicted; a queue with none keeps the new record held in the box but uncarded
|
|
830
|
+
(`peer.inbound_disposition` says so).
|
|
831
|
+
- **`"terminals"` opens.** `principalInboxConsumerOf` accepts `"terminals"`; the `terminals_unsupported` refusal word is retired
|
|
832
|
+
(KL-972-a closed). A gate minting with no declared consumer is told to declare `"terminals"` or `{ assistant }`.
|
|
833
|
+
- **Behavior on the session lane.** A held message whose sender was told `expired` at a graceful shutdown (or at the cap) is no
|
|
834
|
+
longer re-judged and delivered by the session's next process; a person's deny, a deadline expiry and a policy refusal survive a
|
|
835
|
+
process restart; an approved, not yet delivered message survives a shutdown and is delivered by the next run (it used to expire
|
|
836
|
+
with the queue). A held message re-judged by a new process now sends its sender the `delivered` / `refused` receipt it is owed
|
|
837
|
+
(it heard only `held` before).
|
|
838
|
+
- **A refusal ends a card that was handed over but not yet injected.** A card whose hand-over move was taken while the
|
|
839
|
+
`ReadInbox` page budget deferred its injection answered `held` for ever once the policy then refused it, and the ack prefix
|
|
840
|
+
stopped at it (a later refused record never left the box). A refusing policy now ends such a card, at the re-judgment a
|
|
841
|
+
lease-holding pass runs, by the decision law's one exit out of `delivered` — the record moves to `dropped` and the sender,
|
|
842
|
+
where a reply address exists, gets the `dropped` receipt. A process that does not hold the lease (an approval answer between
|
|
843
|
+
passes, a deadline timer) writes nothing for such a card: it may only have adopted a `delivered` that another consumer already
|
|
844
|
+
injected. A held or approved card still ends as `refused` wherever the verdict is taken. A person's deny / cancel of a
|
|
845
|
+
handed-over card keeps its answer (`delivered`, too late): the card is injected on the next pass, so it is not stranded.
|
|
846
|
+
- **Hard-breaking, three sentences each.**
|
|
847
|
+
- *`MailboxStore.moveDecision` is required.* Every out-of-repo `MailboxStore` (the server's SQL twin) stops compiling against
|
|
848
|
+
7.57.0 until it implements the method and persists the decision word with the record (`ack` / `reap` / `drop` remove it with
|
|
849
|
+
the record; `claimLease` returns it). Migrate: add a nullable decision column, implement the compare-and-set under the box's own
|
|
850
|
+
atomicity, refuse malformed calls with `assertMailboxDecisionMove` first, run `mailboxStoreContract` (two new cases pin the law
|
|
851
|
+
and the outcomes). @server `src/plugins/mailbox-store-sql.ts`.
|
|
852
|
+
- *The held queue face is asynchronous.* A host approval face that calls `settle` / `hold` / `rejudge` / `shutdown` and reads the
|
|
853
|
+
answer synchronously gets a Promise (no consumer found in the server / cli / client-core trees). Migrate: `await` each call,
|
|
854
|
+
read `entry.decision` instead of `entry.released`, and give a hand-built sink `decide` + `tellsSender`.
|
|
855
|
+
- *Mixed engine versions on one file box.* An engine before 7.57.0 skips `decision` events and can deliver what a newer one holds
|
|
856
|
+
or denied; its compaction erases them. Migrate: upgrade every terminal / replica that drains a box before declaring
|
|
857
|
+
`"terminals"` (deployment order @server @dgx).
|
|
858
|
+
- **Known limits written down.** KL-972-d (a long-held head blocks the ack prefix: committed records after it are delivered again
|
|
859
|
+
by the next consumer, and its deadline can keep restarting), KL-972-e (a crash between the move and its receipt leaves the
|
|
860
|
+
sender untold; a move retried after a fault can be read as won by two writers of the same word), KL-972-f (mixed versions; an
|
|
861
|
+
unknown word reads as `held` and can be overwritten), KL-972-g (`drop` restarts seq), KL-972-h (directly delivered records write
|
|
862
|
+
nothing).
|
|
863
|
+
|
|
864
|
+
### A rule with no content is the whole-tool rule (hard-breaking, open to veto) — every surface reads a bare tool name the way the reference does: a stored `SendUserFile` allow / deny / ask reaches every `SendUserFile` call, and the card of a tool with no rule grammar offers it (#1949; closed sets: `PERSISTED_RULE_MATCHES` +1; grammar stamp 5 → 6; exports: +1 `adjudicatePersistedToolRules`) (@server @cli @dgx)
|
|
865
|
+
|
|
866
|
+
- **What changed.**
|
|
867
|
+
- The one validator (`parseRuleText`) reads a rule with no content — `Tool`, `Tool()`, `Tool(*)` — as the whole-tool rule
|
|
868
|
+
(`match: "tool"`, `command: ""`, its canonical text the bare name) on every tool and under every behavior, the shell's
|
|
869
|
+
included; it refused every bare name (`invalid.grammar`) before. A name for a set of tools (a protocol peer `mcp__srv`, a
|
|
870
|
+
glob) and a name the name judgment reads as naming no tool (a retired spelling such as `read_file`) stay refused, in the
|
|
871
|
+
judgment's own words. `PERSISTED_RULE_MATCHES` gains `"tool"`.
|
|
872
|
+
- The person's rule lane reads a whole-tool row for every call that answers to its name (the call's spelling, its wire name or
|
|
873
|
+
an alias it declares): the same precedence walk (deny > ask > allow) beside the command, path, name and host walks
|
|
874
|
+
(`adjudicatePersistedToolRules`, exported beside them). A list's whole-tool entry and a stored whole-tool row answer through
|
|
875
|
+
one predicate. A kept tightening row on a tool with no rule grammar whose text no grammar reads now reaches that tool's calls
|
|
876
|
+
in the fail-closed form; it reached nothing before.
|
|
877
|
+
- The approval card. The card of a call no rule word speaks for under any name it answers to (a host's own tool, an MCP tool)
|
|
878
|
+
offers the whole-tool rule — `{ kind: "single", rule: "<Tool>", match: "tool", command: "" }`, the reference's "don't ask
|
|
879
|
+
again for <Tool>". A card the rule lane is armed for is no longer silent: a path tool's, a shell-face sibling's and a tool's
|
|
880
|
+
that answers to one of those under an alias it declares (a caller's shell wearing `Bash` — a one-click yes to its whole tool
|
|
881
|
+
would be a licence for every program) names `ruleOffersAbsence: "lane_cannot_speak"`, and a closed door's word (`mandated`,
|
|
882
|
+
`allow_outranked`, `ask_rule_matched`) appears on those cards too. A card stays silent only where no rule speaks for the call:
|
|
883
|
+
no lane wired; an anonymous task in a deployment that declares no local owner; a content-routing tool the engine mounts
|
|
884
|
+
(question, answer, blocked report — the lane does not judge them). One function (`cardRuleFormOf`) decides the card for the
|
|
885
|
+
offer factory and for the consent door; the factory reads it with the call's names (a caller's tool wearing a shell-face alias such as
|
|
886
|
+
`Bash` is offered nothing), the door holds no face and reads the wire name alone (KL-1949-a).
|
|
887
|
+
- `prepareCardApproval` mints the whole-tool card for a tool with no rule grammar when `command` is `""` (the offer's own
|
|
888
|
+
`command`: the whole tool binds no value); any other value mints nothing. A card record whose candidate is a whole-tool rule
|
|
889
|
+
is read as damage unless it is that card (no command, a tool whose card is the whole-tool one), and a card's edit to a
|
|
890
|
+
whole-tool rule is refused in so many words.
|
|
891
|
+
- `prepareCcImport` reads every settings entry through the one validator (its own spelling screen is retired): a refused entry is
|
|
892
|
+
skipped with the validator's code and sentence; a bare tool name — now the whole-tool rule — stays in the settings layer that
|
|
893
|
+
carries it, skipped as a name-set item as before.
|
|
894
|
+
- `addPersistedRule` / `removePersistedRule` write and clear a bare deny or ask. In `auto` a stored whole-tool allow is stripped
|
|
895
|
+
before matching exactly when the list entry spelling it is (the shell's, and a name the call answers to the shell under).
|
|
896
|
+
- The organization layer still reads shell command rules only: a whole-tool row (`Bash` alone) stands at its strictest reading,
|
|
897
|
+
as every row it does not read; its code is now `unsupported.tool` (`invalid.grammar` before).
|
|
898
|
+
- The rule grammar stamp (`SESSION_RULES_GRAMMAR`, on every persisted bucket, sync state and session rules row) is 6.
|
|
899
|
+
- **Hard-breaking.** What changed: `PersistedRuleMatch` (and `PERSISTED_RULE_MATCHES`) gains `"tool"`; `parseRuleText` answers a
|
|
900
|
+
rule for a bare name; cards that were silent carry an offer or `ruleOffersAbsence`; the grammar stamp is 6, so an engine of
|
|
901
|
+
grammar 5 refuses a bucket, a sync state or a session rules row this engine writes, whole. Who is hurt: a consumer with an
|
|
902
|
+
exhaustive switch over `PersistedRuleMatch`; a host UI that reads "both seats absent" as "no standing-rule option"; a store
|
|
903
|
+
backend that keeps its own match list instead of reading `PERSISTED_RULE_MATCHES`; a rolling deployment where an older engine
|
|
904
|
+
reads what a newer one wrote. Migration: add the `"tool"` arm (render `rule` as written — the whole tool); render
|
|
905
|
+
`ruleOffersAbsence` on every card that carries it; prepare the whole-tool card with `command: ""`; upgrade the readers of a
|
|
906
|
+
rule store before its writers. The mixed-version symptom: an engine of grammar 5 meeting a grammar-6 bucket refuses it whole
|
|
907
|
+
(`PERMISSION_RULES_LATER_GRAMMAR_CODE`) — its run reads that person's stored rules as unreadable and fails closed (it asks or
|
|
908
|
+
refuses more, never less) until it is upgraded. Ruling C-R866 (open to veto).
|
|
909
|
+
- **Behavior change (open to veto).** A bare-name rule — refused by every store entrance before — is now written, read and cleared
|
|
910
|
+
as the reference reads it. Ruling C-R504 (a).
|
|
911
|
+
- @server: adopt `"tool"` in your transcription of the match words (or read `PERSISTED_RULE_MATCHES`); prepare the whole-tool card
|
|
912
|
+
with `command: ""`; S-1674 can consume the whole-tool offer; deploy order for the grammar stamp. @cli: L-1238 — render the
|
|
913
|
+
whole-tool option. @dgx: deploy order for the grammar stamp.
|
|
914
|
+
|
|
915
|
+
no-notes: #2575(the multi-package release-base pin now reads a fixture repository whose history it writes instead of the checkout's own tags and packages; a pin that was red on the v7.56.0 tag tree and on a depth-1 clone is green on both; test only; no script or export change), #1030(test fixture only: the 1751 pin's fixture body now reads the RC manifest through the one git seam; the seam itself shipped in 7.54.0), #2700(ticket named by the 2604-fix1 commit, not fixed here: Monitor skipping the kill guard is a 7.58.0 car)
|
|
916
|
+
|
|
917
|
+
### A parked shell call binds where its reads landed — the resumed call whose read lands elsewhere is vetoed by the approval object's one judge, as a moved path target is (#1185, design/1185; hard-breaking, open to veto — a checkpoint store format forward change; behavior narrowing, open to veto; closed sets: requirement words +1 `approval_target_reads`; exports: +2 types `ApprovalTargetReads`, `ReadLanding`; `ApprovalObject` +`targetReads?` and `LiveApprovalObject` +`reads?`, both optional) (@server @dgx)
|
|
918
|
+
|
|
919
|
+
- **Before.** A tool with a path slot (Read, Write, a caller tool declaring one) was bound since 7.54.0: the row recorded where its target resolved when the card was asked and the execution station vetoed a move (`resume.target_moved`). A shell command was not: its row recorded nothing of where the shell read station found its reads, and the resumed leg's read belt judged the bytes on its own station, where an ordinary question on the unedited bytes is the card the person already answered. So `cat <link outside the root>` parked on its card, the link re-pointed, then approved, read the new target — the person saw one file named and the model received another; the same for an in-root link re-pointed outside while the call waited on another read's card.
|
|
920
|
+
- **Now.** The approval object's TARGETS have a second reading: per read candidate the shell read station judged for the parked bytes, where it landed (its key and its settled targets, each as a sha256 digest — a pattern lands on a set). The park mints it from the station's own judgment of the call (the one its pre-spawn admission re-establishes), beside the path slot's roles, through the one mint (`approvalTargetsOf`); the execution station reads the resumed leg's station's judgment of the bytes that will run — the belt's, a few lines earlier — through the same mint, and the one judge (`judgeApprovalObject`) compares. The member is written whenever the station judged the parked bytes — `{}` when it found no read candidate, so a read that appears by the resume is one the card did not cover. A command read differently on the resuming leg (a read the card covered is not read, or a read it did not cover is — the same read in another segment of the command is one the card did not cover, a read's key carries its segment), a read that lands elsewhere (a re-pointed link, a pattern that matches one more entry or one fewer, a read the station could not place then and places now), no judgment on the resuming leg, or a damaged member ⇒ the call is vetoed: not run, the approval spent, `resume.target_moved` on its `tool_end`, the sentence saying which (a moved read is named with where it lands now); the model re-issues it and the new card is bound to the current landing. Not judged, as before, when a person edited the call to other bytes (the belt's `rejudge` seat judges an edit); judged when the decided bytes are the parked ones handed back, and when a PreToolUse hook rewrote them (their reads are not the card's). The in-leg pre-spawn check and the row read one keying and one landing (`readLandingsOf`, `shell-read-identity.ts`).
|
|
921
|
+
- **Hard-breaking (open to veto) — store format forward change.** *What changed*: a parked shell call's `pendingAction` carries a new member `targetReads` (a record of 64-hex → 64-hex) and the reader-requirement word `approval_target_reads`. *Who is hurt*: a worker of v7.56.0 or older that meets such a row refuses it `version_newer` (the row stays pending — it is not replayed unbound); a store with a member allow-list for `pendingAction`, or a column per member. *How to migrate*: upgrade every worker that resumes parked approvals before any worker that parks them (a mixed fleet otherwise leaves shell rows pending until an upgraded worker takes them); a JSON-document store needs no migration; add `targetReads` wherever `pendingAction` members are enumerated. Rows parked before this version carry no `targetReads` and resume as before.
|
|
922
|
+
- **Behavior narrowing (open to veto).** A parked shell call whose reads moved while it waited is vetoed and asked again (once per move), where it ran. A PreToolUse hook on the resumed leg that rewrites a parked shell command so that a read the card did not cover is read — another read, or the same read in another segment (a prefix segment added) — is vetoed (its in-root rewrite ran before); a hook that is not idempotent (it adds the prefix again on the resumed leg) is vetoed at every resume (KL-1185-e, #2702). A pattern read over a directory that gains or loses an entry while the call waits is a move.
|
|
923
|
+
- **Not bound (stated; KL-1391-a, KL-1185-a … -f).** The binding stops drift between the card and the resumed run; a command the agent itself arranges to move later is the read-then-run window, which is not closed (between the pre-spawn check and the child's own open). A landing is a LOCATION: a file replaced at the same location, a hard link or a bind mount swapped in at the same path is not a move. Every read candidate is bound, the ones the station vouched for too (the in-leg check's reading): a park over a pattern in the workspace is vetoed once when the workspace gains a matching file before the approval. An engine version that plans the same command differently vetoes in-flight parked shell approvals once, worded as a re-plan. An isolated sandbox's establishment is lexical, so moves there are not seen. A station that holds more than 1024 judged-not-spawned calls on one leg forgets the oldest: a call parked past that bound carries no read member and is not judged on it. A store whose encoding changes the parked arguments (the filed bytes are not the judged ones) gets neither target member, as the path roles did before. On Linux, a read through `/proc/self/…` lands on the resolving process's own entry, so a resume in another process reads it as a move and vetoes (each time it resumes in a new process).
|
|
924
|
+
- **Consumers.** @server: add `targetReads` to the `pendingAction` keyset your trace guard enumerates; the SQL store holds the row as a JSON document (no migration); deployment order as above. @dgx: the same deployment-order sentence. @cli / @client-core: nothing new to render — the veto is today's `resume.target_moved` on the vetoed call's `tool_end`.
|
|
925
|
+
- **Pins.** `test/backlog1391-approval-object.test.ts`, block `#1185` — real Runner, zero path rules: SH-r (a link outside the root re-pointed; the re-issued call parks bound to the new landing), SH-i (an in-root link re-pointed outside while the call waited on another read's card), SH-hb (the parked command handed back), SH-g (a pattern gains an entry), SH-h (a hook rewrites to an in-root read), SH-e (a person's edit runs), SH-d (damage), SH-8 (control, a link and a pattern); SH-0 and units: the judge's read arms (an empty record, a re-plan, both readings on one row), the mint, the requirement word. SH-r / SH-i / SH-hb / SH-g / SH-h / SH-d red on v7.56.0's tree. The park self-check row carries both target members, so a store that drops either fails at wiring.
|
|
926
|
+
|
|
1
927
|
## 7.56.0 — 2026-10-23
|
|
2
928
|
|
|
3
929
|
### One writer per fact on a permission decision — a policy's or a hook's decision that states a word the gate writes is refused by name, and the integrity guards and a fold's collapsed classes ride the engine's attestation record alone (#2134 / #1617 / #1329; hard-breaking, open to veto; security narrowing; closed sets: `RETIRED_DECISION_MEMBERS` +2 (`guards`, `foldedAskClasses`); exports: `PermissionResult`'s ask arm loses `guards` and `foldedAskClasses`, `EngineAttestation` gains an optional `guards`, `AskClassFacts` (the facts `classifyAsk` takes) gains a required `call`) (@server @test @cli @client-core)
|