@sema-agent/core 7.60.0 → 7.62.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 +917 -0
- package/README.md +2 -2
- package/dist/agents/agent-transcript-tool.d.ts +2 -2
- package/dist/agents/agent-transcript-tool.js +1 -1
- package/dist/agents/cascade.d.ts +71 -12
- package/dist/agents/cascade.js +61 -21
- package/dist/agents/composition-allowance.d.ts +53 -0
- package/dist/agents/composition-allowance.js +49 -0
- package/dist/agents/composition-placement.d.ts +29 -0
- package/dist/agents/composition-placement.js +24 -0
- package/dist/agents/cumulative-stats.d.ts +4 -0
- package/dist/agents/cumulative-stats.js +3 -0
- package/dist/agents/inherited-tool-pool.d.ts +5 -3
- package/dist/agents/inherited-tool-pool.js +2 -2
- package/dist/agents/list-agents-tool.d.ts +1 -1
- package/dist/agents/peer-held-queue.d.ts +27 -4
- package/dist/agents/peer-held-queue.js +81 -36
- package/dist/agents/peer-notice-route.d.ts +1 -1
- package/dist/agents/peer-notice-route.js +4 -3
- package/dist/agents/peer-notices.d.ts +4 -4
- package/dist/agents/peer-notices.js +8 -4
- package/dist/agents/peer-session-drain.d.ts +8 -1
- package/dist/agents/peer-session-drain.js +49 -10
- package/dist/agents/repair-loop.js +16 -6
- package/dist/agents/retain-ledger.js +3 -1
- package/dist/agents/roster-store.d.ts +1 -1
- package/dist/agents/roster-store.js +7 -4
- package/dist/agents/send-message-tool.d.ts +8 -10
- package/dist/agents/send-message-tool.js +43 -23
- package/dist/agents/subagent-completion-gate.d.ts +35 -0
- package/dist/agents/subagent-completion-gate.js +62 -0
- package/dist/agents/subagent-steps.d.ts +7 -6
- package/dist/agents/subagent.d.ts +36 -41
- package/dist/agents/subagent.js +245 -200
- package/dist/agents/suspend-guard.d.ts +47 -16
- package/dist/agents/suspend-guard.js +13 -4
- package/dist/agents/verify.d.ts +41 -14
- package/dist/agents/verify.js +41 -30
- package/dist/brain/anthropic.js +1 -0
- package/dist/brain/errors.d.ts +7 -1
- package/dist/brain/errors.js +6 -0
- package/dist/brain/failover.js +2 -1
- package/dist/brain/open-responses.js +1 -0
- package/dist/brain/openai.js +1 -0
- package/dist/brain/provider-dialect.d.ts +10 -0
- package/dist/brain/provider-dialect.js +13 -2
- package/dist/brain/stream-engine.d.ts +3 -0
- package/dist/brain/stream-engine.js +4 -0
- package/dist/core/agent-state.d.ts +1 -1
- package/dist/core/allow-entry.d.ts +59 -23
- package/dist/core/allow-entry.js +131 -38
- package/dist/core/ask-origin.d.ts +79 -0
- package/dist/core/ask-origin.js +76 -0
- package/dist/core/ask-question.d.ts +19 -13
- package/dist/core/ask-question.js +8 -2
- package/dist/core/auto-compaction.d.ts +2 -0
- package/dist/core/auto-compaction.js +2 -1
- package/dist/core/auto-mode.js +3 -5
- package/dist/core/background-agent-store.d.ts +7 -5
- package/dist/core/background-agent-store.js +12 -11
- package/dist/core/checkpoint-features.d.ts +722 -0
- package/dist/core/checkpoint-features.js +98 -0
- package/dist/core/checkpoint-requirements.d.ts +33 -5
- package/dist/core/checkpoint-requirements.js +18 -5
- package/dist/core/checkpoint-row-verdict.d.ts +99 -0
- package/dist/core/checkpoint-row-verdict.js +225 -0
- package/dist/core/checkpoint-store.d.ts +107 -738
- package/dist/core/checkpoint-store.js +45 -143
- package/dist/core/child-clamp-seats.d.ts +3 -2
- package/dist/core/child-clamp-seats.js +4 -3
- package/dist/core/closest-name.d.ts +13 -0
- package/dist/core/closest-name.js +35 -0
- package/dist/core/context-settings.js +3 -5
- package/dist/core/cross-boundary-taint.d.ts +1 -1
- package/dist/core/decision-receipt.d.ts +14 -1
- package/dist/core/decision-receipt.js +6 -3
- package/dist/core/delegation-frames.d.ts +13 -9
- package/dist/core/effective-path-target.js +2 -3
- package/dist/core/engine-attestation.d.ts +11 -1
- package/dist/core/engine-attestation.js +2 -0
- package/dist/core/engine-notice.d.ts +68 -21
- package/dist/core/engine-notice.js +9 -2
- package/dist/core/file-history-retention.d.ts +8 -0
- package/dist/core/file-history-retention.js +14 -11
- package/dist/core/file-history-store.d.ts +31 -1
- package/dist/core/file-history-store.js +31 -2
- package/dist/core/frame-settlement.d.ts +10 -0
- package/dist/core/frame-settlement.js +6 -1
- package/dist/core/fs-write-gate-policy.d.ts +3 -3
- package/dist/core/fs-write-gate-policy.js +8 -7
- package/dist/core/gate-fold.js +4 -3
- package/dist/core/gate-lanes.js +7 -4
- package/dist/core/gate-outcome.d.ts +40 -1
- package/dist/core/gate-outcome.js +10 -0
- package/dist/core/git-worktree-env.d.ts +7 -3
- package/dist/core/git-worktree-env.js +16 -13
- package/dist/core/governance-codes.d.ts +14 -4
- package/dist/core/governance-codes.js +19 -4
- package/dist/core/hooks.d.ts +25 -4
- package/dist/core/hooks.js +11 -4
- package/dist/core/host-floor.js +3 -5
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +47 -7
- package/dist/core/image-admission.js +35 -4
- package/dist/core/input-author.d.ts +36 -0
- package/dist/core/input-author.js +39 -0
- package/dist/core/leg-identity.d.ts +62 -0
- package/dist/core/leg-identity.js +18 -0
- package/dist/core/locked-config.d.ts +4 -3
- package/dist/core/locked-config.js +5 -3
- package/dist/core/lsp.d.ts +5 -3
- package/dist/core/lsp.js +3 -2
- package/dist/core/mailbox-store.d.ts +85 -10
- package/dist/core/mailbox-store.js +31 -10
- package/dist/core/mcp-connection-pool.d.ts +6 -20
- package/dist/core/mcp-connection-pool.js +10 -28
- package/dist/core/mcp-failure.d.ts +76 -15
- package/dist/core/mcp-failure.js +60 -33
- package/dist/core/mcp-host-seat.d.ts +92 -53
- package/dist/core/mcp-host-seat.js +225 -46
- package/dist/core/mcp-probe.js +2 -2
- package/dist/core/mcp-server-link.d.ts +18 -6
- package/dist/core/mcp-server-link.js +19 -4
- package/dist/core/mcp-server-spec.d.ts +2 -1
- package/dist/core/mcp-session-end.d.ts +1 -2
- package/dist/core/mcp-session-end.js +1 -1
- package/dist/core/mcp.d.ts +6 -49
- package/dist/core/mcp.js +115 -111
- package/dist/core/media-byte-cap.d.ts +21 -46
- package/dist/core/media-byte-cap.js +55 -55
- package/dist/core/member-group.d.ts +7 -0
- package/dist/core/member-group.js +35 -0
- package/dist/core/memory-engine/consolidation-driver.d.ts +1 -1
- package/dist/core/memory-engine/consolidation.d.ts +1 -1
- package/dist/core/memory-engine/consolidation.js +7 -1
- package/dist/core/memory-engine/dual-root.d.ts +31 -0
- package/dist/core/memory-engine/dual-root.js +59 -11
- package/dist/core/memory-engine/engine.js +27 -24
- package/dist/core/memory-engine/file-backend.d.ts +13 -0
- package/dist/core/memory-engine/file-backend.js +35 -15
- package/dist/core/memory-engine/layout.d.ts +3 -0
- package/dist/core/memory-engine/layout.js +13 -3
- package/dist/core/memory-engine/memory-deployment.d.ts +110 -0
- package/dist/core/memory-engine/memory-deployment.js +182 -0
- package/dist/core/memory-engine/sync-client.d.ts +39 -18
- package/dist/core/memory-engine/sync-client.js +72 -14
- package/dist/core/memory-engine/sync-report.d.ts +7 -4
- package/dist/core/memory-engine/sync.d.ts +9 -1
- package/dist/core/memory-vector.d.ts +1 -1
- package/dist/core/memory.d.ts +10 -10
- package/dist/core/mode-policy.d.ts +8 -8
- package/dist/core/mode-policy.js +8 -6
- package/dist/core/mods/agent-stations.d.ts +39 -4
- package/dist/core/mods/agent-stations.js +59 -10
- package/dist/core/mods/classic-events.d.ts +9 -1
- package/dist/core/mods/dollar.d.ts +94 -1
- package/dist/core/mods/dollar.js +13 -1
- package/dist/core/mods/extension-call.d.ts +15 -1
- package/dist/core/mods/extension-call.js +7 -2
- package/dist/core/mods/kernel/dispatch.d.ts +4 -3
- package/dist/core/mods/kernel/dispatch.js +4 -4
- package/dist/core/mods/kernel/events.d.ts +14 -3
- package/dist/core/mods/kernel/events.js +18 -15
- package/dist/core/mods/kernel/registration.d.ts +3 -0
- package/dist/core/mods/kernel/registration.js +5 -0
- package/dist/core/mods/kernel/site-rules.d.ts +6 -3
- package/dist/core/mods/kernel/site-rules.js +10 -2
- package/dist/core/mods/lifecycle-stations.d.ts +36 -4
- package/dist/core/mods/lifecycle-stations.js +44 -9
- package/dist/core/mods/session-append.d.ts +118 -0
- package/dist/core/mods/session-append.js +318 -0
- package/dist/core/mods/session-compact.d.ts +48 -0
- package/dist/core/mods/session-compact.js +194 -0
- package/dist/core/mods/session-receive.d.ts +93 -0
- package/dist/core/mods/session-receive.js +138 -0
- package/dist/core/mods/session-send.d.ts +72 -0
- package/dist/core/mods/session-send.js +88 -0
- package/dist/core/mods/stations.d.ts +88 -21
- package/dist/core/mods/stations.js +149 -11
- package/dist/core/mods/tool-call.d.ts +2 -0
- package/dist/core/mods/tool-call.js +4 -4
- package/dist/core/output-style.js +3 -4
- package/dist/core/own-property-receipt.d.ts +68 -2
- package/dist/core/own-property-receipt.js +45 -2
- package/dist/core/park-selfcheck.js +4 -2
- package/dist/core/path-identity.d.ts +11 -0
- package/dist/core/path-identity.js +4 -0
- package/dist/core/path-rule-binding.d.ts +3 -1
- package/dist/core/path-rule-binding.js +3 -1
- package/dist/core/peer-seat.d.ts +3 -3
- package/dist/core/peer-seat.js +20 -8
- package/dist/core/permission-rule-consent.d.ts +21 -5
- package/dist/core/permission-rule-consent.js +21 -1
- package/dist/core/permission-rule-model.d.ts +34 -11
- package/dist/core/permission-rule-model.js +47 -10
- package/dist/core/permission-rule-org.d.ts +1 -1
- package/dist/core/permission-rule-provider.js +4 -1
- package/dist/core/permission-rules.d.ts +4 -0
- package/dist/core/permission-rules.js +11 -16
- package/dist/core/read-root-candidate.js +1 -1
- package/dist/core/remote-env.d.ts +74 -26
- package/dist/core/remote-env.js +20 -0
- package/dist/core/resume-startup-cause.d.ts +5 -4
- package/dist/core/retention-policy.d.ts +24 -23
- package/dist/core/retention-policy.js +36 -2
- package/dist/core/retention.d.ts +4 -1
- package/dist/core/retired-keys.d.ts +4 -4
- package/dist/core/row-admission.d.ts +10 -0
- package/dist/core/row-admission.js +5 -0
- package/dist/core/runner/advisor-instructions.d.ts +2 -1
- package/dist/core/runner/advisor-instructions.js +2 -1
- package/dist/core/runner/announce-once-ledger.d.ts +4 -4
- package/dist/core/runner/assemble-result.d.ts +13 -3
- package/dist/core/runner/assemble-result.js +12 -7
- package/dist/core/runner/caller-roster.d.ts +12 -9
- package/dist/core/runner/caller-roster.js +5 -2
- package/dist/core/runner/checkpoint-scope.d.ts +16 -1
- package/dist/core/runner/checkpoint-scope.js +21 -0
- package/dist/core/runner/compact-session.js +18 -3
- package/dist/core/runner/compaction-call-options.d.ts +1 -1
- package/dist/core/runner/compaction-restate.d.ts +2 -2
- package/dist/core/runner/compaction-restate.js +4 -3
- package/dist/core/runner/construction-doors.d.ts +2 -2
- package/dist/core/runner/construction-doors.js +2 -2
- package/dist/core/runner/contracts.d.ts +116 -34
- package/dist/core/runner/cross-boundary-lane.d.ts +1 -1
- package/dist/core/runner/decide-continuation.d.ts +4 -2
- package/dist/core/runner/decide-continuation.js +7 -4
- package/dist/core/runner/delegation-owner.d.ts +43 -0
- package/dist/core/runner/delegation-owner.js +59 -0
- package/dist/core/runner/denial-limit-arms.d.ts +15 -21
- package/dist/core/runner/denial-limit-arms.js +17 -10
- package/dist/core/runner/expire-settle.d.ts +44 -0
- package/dist/core/runner/expire-settle.js +55 -0
- package/dist/core/runner/git-status-frame.d.ts +3 -3
- package/dist/core/runner/git-status-frame.js +2 -1
- package/dist/core/runner/halt-attribution.d.ts +2 -1
- package/dist/core/runner/halt-attribution.js +2 -1
- package/dist/core/runner/lineage-reroot-view.d.ts +56 -0
- package/dist/core/runner/lineage-reroot-view.js +108 -0
- package/dist/core/runner/local-claims.d.ts +17 -0
- package/dist/core/runner/local-claims.js +18 -0
- package/dist/core/runner/media-removed-seat.d.ts +46 -0
- package/dist/core/runner/media-removed-seat.js +88 -0
- package/dist/core/runner/park-commit.d.ts +2 -2
- package/dist/core/runner/permission-rule-lanes.d.ts +7 -2
- package/dist/core/runner/permission-rule-lanes.js +28 -9
- package/dist/core/runner/person-path-rows.d.ts +15 -0
- package/dist/core/runner/person-path-rows.js +27 -4
- package/dist/core/runner/placement-fence.d.ts +26 -0
- package/dist/core/runner/placement-fence.js +38 -0
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +4 -1
- package/dist/core/runner/prepare-acquire-reconcile.js +7 -2
- package/dist/core/runner/prepare-ask-lane.d.ts +6 -12
- package/dist/core/runner/prepare-ask-lane.js +4 -4
- package/dist/core/runner/prepare-boundary-parks.d.ts +4 -1
- package/dist/core/runner/prepare-boundary-parks.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +3 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +2 -1
- package/dist/core/runner/prepare-config-doors.d.ts +6 -6
- package/dist/core/runner/prepare-config-doors.js +19 -21
- package/dist/core/runner/prepare-context-lane.d.ts +6 -2
- package/dist/core/runner/prepare-context-lane.js +13 -13
- package/dist/core/runner/prepare-delegation-surface.d.ts +9 -9
- package/dist/core/runner/prepare-delegation-surface.js +4 -5
- package/dist/core/runner/prepare-execution-env.d.ts +5 -2
- package/dist/core/runner/prepare-execution-env.js +7 -4
- package/dist/core/runner/prepare-gate-stations.d.ts +19 -14
- package/dist/core/runner/prepare-gate-stations.js +6 -4
- package/dist/core/runner/prepare-hands-readface.d.ts +6 -6
- package/dist/core/runner/prepare-hands-readface.js +32 -11
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -0
- package/dist/core/runner/prepare-inherited-gate.js +10 -3
- package/dist/core/runner/prepare-lsp.d.ts +3 -0
- package/dist/core/runner/prepare-lsp.js +2 -2
- package/dist/core/runner/prepare-park-ask.d.ts +5 -2
- package/dist/core/runner/prepare-park-ask.js +4 -5
- package/dist/core/runner/prepare-policy-chain.d.ts +10 -21
- package/dist/core/runner/prepare-policy-chain.js +16 -25
- package/dist/core/runner/prepare-project-context.d.ts +2 -2
- package/dist/core/runner/prepare-prompt-inputs.d.ts +5 -4
- package/dist/core/runner/prepare-prompt-inputs.js +3 -2
- package/dist/core/runner/prepare-question-face.d.ts +6 -4
- package/dist/core/runner/prepare-question-face.js +2 -2
- package/dist/core/runner/prepare-run-refs.d.ts +3 -0
- package/dist/core/runner/prepare-run-refs.js +2 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +11 -7
- package/dist/core/runner/prepare-suspend-saga.js +17 -7
- package/dist/core/runner/prepare-task.d.ts +1 -1
- package/dist/core/runner/prepare-task.js +61 -30
- package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +6 -0
- package/dist/core/runner/prepare-tool-disclosure-mount.js +3 -1
- package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -0
- package/dist/core/runner/prepare-wiring-manifest.js +2 -1
- package/dist/core/runner/prepare-workspace-restore.d.ts +5 -0
- package/dist/core/runner/prepare-workspace-restore.js +10 -6
- package/dist/core/runner/read-root-grant.d.ts +1 -1
- package/dist/core/runner/read-root-grant.js +2 -1
- package/dist/core/runner/resume-admission.d.ts +8 -6
- package/dist/core/runner/resume-admission.js +23 -6
- package/dist/core/runner/resume-apply.d.ts +4 -0
- package/dist/core/runner/resume-apply.js +14 -5
- package/dist/core/runner/resume-checkpoint-screen.d.ts +9 -0
- package/dist/core/runner/resume-checkpoint-screen.js +4 -84
- package/dist/core/runner/resume-claim.d.ts +8 -3
- package/dist/core/runner/resume-claim.js +28 -12
- package/dist/core/runner/resume-internals-and-config.d.ts +2 -2
- package/dist/core/runner/resume-internals-and-config.js +10 -1
- package/dist/core/runner/resume-preflight.d.ts +3 -2
- package/dist/core/runner/resume-preflight.js +13 -26
- package/dist/core/runner/retired-runner-deps.js +2 -0
- package/dist/core/runner/run-git-lane.d.ts +2 -0
- package/dist/core/runner/run-git-lane.js +6 -2
- package/dist/core/runner/run-harness-handlers.d.ts +2 -0
- package/dist/core/runner/run-harness-handlers.js +5 -4
- package/dist/core/runner/run-identity-wiring.d.ts +2 -2
- package/dist/core/runner/run-identity-wiring.js +14 -5
- package/dist/core/runner/run-leg.d.ts +3 -3
- package/dist/core/runner/run-leg.js +64 -36
- package/dist/core/runner/run-notification-lane.js +20 -2
- package/dist/core/runner/run-recovery-lanes.js +3 -2
- package/dist/core/runner/run-settle-and-teardown.js +12 -9
- package/dist/core/runner/run-stop-and-final-verify.js +2 -1
- package/dist/core/runner/run-telemetry-and-budget-seats.d.ts +1 -1
- package/dist/core/runner/run-terminal-adoption.d.ts +1 -1
- package/dist/core/runner/run-terminal-adoption.js +26 -17
- package/dist/core/runner/run-turn-boundary.js +34 -18
- package/dist/core/runner/runtask.d.ts +18 -3
- package/dist/core/runner/runtask.js +33 -17
- package/dist/core/runner/session-rule-policy.d.ts +1 -1
- package/dist/core/runner/session-rule-policy.js +6 -1
- package/dist/core/runner/shell-env-withheld.d.ts +1 -1
- package/dist/core/runner/steering-preview.d.ts +9 -0
- package/dist/core/runner/steering-preview.js +5 -0
- package/dist/core/runner/stream-halt-verbs.d.ts +1 -14
- package/dist/core/runner/stream-halt-verbs.js +4 -3
- package/dist/core/runner/stream-reap.d.ts +7 -6
- package/dist/core/runner/stream-reap.js +13 -16
- package/dist/core/runner/stream-settle-backstop.d.ts +3 -2
- package/dist/core/runner/stream-settle-backstop.js +5 -3
- package/dist/core/runner/stream-steer-verb.d.ts +5 -2
- package/dist/core/runner/stream-steer-verb.js +16 -7
- package/dist/core/runner/terminal-account.d.ts +11 -1
- package/dist/core/runner/terminal-account.js +20 -0
- package/dist/core/runner/terminal-projection.d.ts +8 -2
- package/dist/core/runner/terminal-projection.js +2 -2
- package/dist/core/runner/tool-disclosure.d.ts +3 -0
- package/dist/core/runner/tool-disclosure.js +5 -2
- package/dist/core/runner/tool-end-body.d.ts +3 -3
- package/dist/core/runner/tool-end-body.js +1 -1
- package/dist/core/runner/tool-face-overlay.js +2 -0
- package/dist/core/runner/tool-output-projection.d.ts +3 -3
- package/dist/core/runner/tool-output-projection.js +7 -6
- package/dist/core/runner/tool-table-view.d.ts +56 -0
- package/dist/core/runner/tool-table-view.js +51 -0
- package/dist/core/runner/turn-attachments.d.ts +8 -2
- package/dist/core/runner/turn-attachments.js +2 -2
- package/dist/core/runner/void-verifier-pause.d.ts +33 -0
- package/dist/core/runner/void-verifier-pause.js +41 -0
- package/dist/core/runner-deps.d.ts +26 -27
- package/dist/core/secret-env.d.ts +19 -16
- package/dist/core/secret-env.js +45 -27
- package/dist/core/session-log-transfer.js +9 -10
- package/dist/core/session-policy-store.d.ts +1 -1
- package/dist/core/session-policy-store.js +5 -2
- package/dist/core/session-reconcile.d.ts +3 -2
- package/dist/core/session-reconcile.js +7 -4
- package/dist/core/session-store.d.ts +3 -1
- package/dist/core/session-store.js +10 -8
- package/dist/core/session.d.ts +16 -5
- package/dist/core/shell-confinement.d.ts +37 -0
- package/dist/core/shell-confinement.js +56 -0
- package/dist/core/skill-grant.js +1 -1
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +8 -2
- package/dist/core/store-contracts/checkpoint-store-contract.js +83 -2
- package/dist/core/store-contracts/file-history-store-contract.d.ts +5 -2
- package/dist/core/store-contracts/file-history-store-contract.js +25 -1
- package/dist/core/store-contracts/mailbox-store-contract.d.ts +12 -5
- package/dist/core/store-contracts/mailbox-store-contract.js +156 -9
- package/dist/core/store-contracts/session-store-contract.js +22 -8
- package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/tool-result-store-contract.js +30 -0
- package/dist/core/task-event.d.ts +24 -9
- package/dist/core/task-limits.d.ts +5 -0
- package/dist/core/task-notification.d.ts +89 -12
- package/dist/core/task-notification.js +89 -14
- package/dist/core/task-registry-agent.d.ts +32 -50
- package/dist/core/task-registry-agent.js +36 -56
- package/dist/core/task-registry-monitor.d.ts +1 -1
- package/dist/core/task-registry-monitor.js +15 -60
- package/dist/core/task-registry-shared.d.ts +22 -112
- package/dist/core/task-registry-shared.js +3 -41
- package/dist/core/task-registry-workflow.js +5 -21
- package/dist/core/task-registry.d.ts +32 -62
- package/dist/core/task-registry.js +30 -110
- package/dist/core/task-result.d.ts +29 -12
- package/dist/core/task-spec-members.d.ts +39 -0
- package/dist/core/task-spec-members.js +92 -0
- package/dist/core/task-spec.d.ts +11 -11
- package/dist/core/task-tool-shape.d.ts +7 -57
- package/dist/core/task-tool-shape.js +7 -66
- package/dist/core/terminal-cause.d.ts +36 -6
- package/dist/core/terminal-cause.js +1 -0
- package/dist/core/tool-catalog-entries.js +2 -5
- package/dist/core/tool-check-reading.js +16 -10
- package/dist/core/tool-conformance.js +1 -2
- package/dist/core/tool-errors.d.ts +6 -3
- package/dist/core/tool-errors.js +2 -0
- package/dist/core/tool-face-reader.js +3 -2
- package/dist/core/tool-face.d.ts +8 -5
- package/dist/core/tool-face.js +1 -1
- package/dist/core/tool-name-aliases.d.ts +5 -29
- package/dist/core/tool-name-aliases.js +9 -5
- package/dist/core/tool-name-readings.d.ts +14 -3
- package/dist/core/tool-name-readings.js +2 -0
- package/dist/core/tool-policy.d.ts +109 -18
- package/dist/core/tool-policy.js +84 -14
- package/dist/core/tool-result-store.d.ts +23 -0
- package/dist/core/tool-result-store.js +3 -2
- package/dist/core/tool-roster.d.ts +4 -4
- package/dist/core/tool-spec.d.ts +23 -6
- package/dist/core/trace.d.ts +18 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +1 -1
- package/dist/core/user-attachment.js +26 -21
- package/dist/core/workflow-journal-store.d.ts +1 -1
- package/dist/core/workflow-run-store.d.ts +2 -0
- package/dist/core/workflow-run-store.js +6 -5
- package/dist/core/workflow-settled-run.d.ts +5 -0
- package/dist/core/workflow-settled-run.js +7 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +37 -9
- package/dist/engine/execution-env/node-execution-env.js +221 -22
- package/dist/engine/harness/agent-harness.d.ts +65 -18
- package/dist/engine/harness/agent-harness.js +90 -23
- package/dist/engine/harness/messages.d.ts +4 -3
- package/dist/engine/harness/messages.js +2 -2
- package/dist/engine/harness/types.d.ts +52 -7
- package/dist/engine/llm/media-removed.d.ts +14 -0
- package/dist/engine/llm/media-removed.js +9 -0
- package/dist/engine/llm/rejected-images.d.ts +35 -25
- package/dist/engine/llm/rejected-images.js +59 -10
- package/dist/engine/llm/types.d.ts +24 -3
- package/dist/engine/llm/types.js +7 -3
- package/dist/engine/loop/agent-loop.d.ts +6 -1
- package/dist/engine/loop/agent-loop.js +20 -11
- package/dist/engine/loop/types.d.ts +12 -3
- package/dist/engine/session/import-validate.js +7 -0
- package/dist/engine/session/parent-chain-guard.d.ts +3 -3
- package/dist/engine/session/parent-chain-guard.js +1 -1
- package/dist/engine/session/path-to-root.d.ts +18 -3
- package/dist/engine/session/path-to-root.js +15 -1
- package/dist/engine/session/repo-utils.d.ts +12 -1
- package/dist/engine/session/repo-utils.js +41 -0
- package/dist/engine/session/session.js +1 -1
- package/dist/engine/session/storage-base.d.ts +20 -0
- package/dist/engine/session/storage-base.js +28 -9
- package/dist/fixtures/index.d.ts +7 -5
- package/dist/fixtures/index.js +5 -3
- package/dist/index.d.ts +29 -18
- package/dist/index.js +19 -11
- package/dist/internal/harness-types.d.ts +2 -0
- package/dist/internal/harness.d.ts +4 -3
- package/dist/internal/harness.js +3 -2
- package/dist/internal/llm.d.ts +2 -1
- package/dist/internal/llm.js +1 -0
- package/dist/orchestration/goal.d.ts +6 -2
- package/dist/orchestration/goal.js +6 -3
- package/dist/orchestration/run-workflow-tool.d.ts +14 -17
- package/dist/orchestration/run-workflow-tool.js +43 -50
- package/dist/orchestration/workflow-types.d.ts +2 -2
- package/dist/orchestration/workflow.d.ts +7 -0
- package/dist/orchestration/workflow.js +10 -12
- package/dist/stores/file/background-agent-store.js +18 -15
- package/dist/stores/file/checkpoint-store.d.ts +2 -0
- package/dist/stores/file/checkpoint-store.js +13 -9
- package/dist/stores/file/file-history-store.js +3 -2
- package/dist/stores/file/fs-atomic.d.ts +0 -22
- package/dist/stores/file/fs-atomic.js +0 -17
- package/dist/stores/file/index.d.ts +7 -12
- package/dist/stores/file/index.js +25 -12
- package/dist/stores/file/ledger-tuning.d.ts +23 -0
- package/dist/stores/file/ledger-tuning.js +21 -0
- package/dist/stores/file/mailbox-store.js +42 -22
- package/dist/stores/file/memory-store.js +3 -2
- package/dist/stores/file/permission-rule-adopt.js +24 -21
- package/dist/stores/file/permission-rule-store.js +6 -3
- package/dist/stores/file/session-policy-store.js +3 -2
- package/dist/stores/file/session-store.d.ts +26 -7
- package/dist/stores/file/session-store.js +59 -35
- package/dist/stores/file/tool-result-store.d.ts +11 -0
- package/dist/stores/file/tool-result-store.js +57 -3
- package/dist/stores/file/usage-window-store.js +3 -2
- package/dist/stores/file/workflow-journal-store.d.ts +0 -2
- package/dist/stores/file/workflow-journal-store.js +3 -18
- package/dist/stores/file/workflow-run-store.d.ts +1 -1
- package/dist/stores/file/workflow-run-store.js +15 -10
- package/dist/tools/fs/bash-program-position.d.ts +3 -2
- package/dist/tools/fs/bash-program-position.js +7 -7
- package/dist/tools/fs/dead-cwd.d.ts +5 -5
- package/dist/tools/fs/dead-cwd.js +4 -11
- package/dist/tools/fs/fs-bash-background-text.d.ts +6 -0
- package/dist/tools/fs/fs-bash-background-text.js +6 -0
- package/dist/tools/fs/fs-bash.d.ts +3 -18
- package/dist/tools/fs/fs-bash.js +37 -124
- package/dist/tools/fs/fs-pdf.js +8 -6
- package/dist/tools/fs/fs-read.js +2 -2
- package/dist/tools/fs/fs-shared.d.ts +28 -3
- package/dist/tools/fs/fs-shared.js +15 -0
- package/dist/tools/fs/index.d.ts +1 -1
- package/dist/tools/fs/index.js +4 -14
- package/dist/tools/fs/pdf.d.ts +4 -4
- package/dist/tools/fs/pdf.js +6 -6
- package/dist/tools/fs/read-deny-home.js +8 -1
- package/dist/tools/fs/read-deny.d.ts +26 -2
- package/dist/tools/fs/read-deny.js +9 -2
- package/dist/tools/fs/read-floor.d.ts +13 -5
- package/dist/tools/fs/read-floor.js +206 -2
- package/dist/tools/fs/removal-targets.js +2 -2
- package/dist/tools/fs/search.d.ts +3 -2
- package/dist/tools/fs/search.js +6 -6
- package/dist/tools/fs/shell-read-argv.d.ts +4 -2
- package/dist/tools/fs/shell-read-argv.js +14 -3
- package/dist/tools/fs/shell-read-bindings.d.ts +18 -2
- package/dist/tools/fs/shell-read-bindings.js +148 -68
- package/dist/tools/fs/shell-read-check.js +20 -4
- package/dist/tools/fs/shell-read-establish.js +25 -9
- package/dist/tools/fs/shell-read-functions.js +2 -2
- package/dist/tools/fs/shell-read-identity.d.ts +3 -1
- package/dist/tools/fs/shell-read-identity.js +4 -2
- package/dist/tools/fs/shell-read-judge.d.ts +7 -1
- package/dist/tools/fs/shell-read-judge.js +1 -1
- package/dist/tools/fs/shell-read-object-path.d.ts +59 -0
- package/dist/tools/fs/shell-read-object-path.js +119 -0
- package/dist/tools/fs/shell-read-plan.d.ts +8 -0
- package/dist/tools/fs/shell-read-plan.js +47 -30
- package/dist/tools/fs/shell-read-start.d.ts +66 -13
- package/dist/tools/fs/shell-read-start.js +89 -17
- package/dist/tools/fs/shell-read-workdir.d.ts +29 -8
- package/dist/tools/fs/shell-read-workdir.js +31 -8
- package/dist/tools/monitor.d.ts +8 -7
- package/dist/tools/monitor.js +12 -10
- package/dist/tools/worktree.d.ts +5 -1
- package/dist/tools/worktree.js +20 -17
- package/package.json +6 -3
- package/test/export-surface.snapshot.json +112 -42
- package/wire-changes/core-stores-sql@7.61.0.json +480 -0
- package/wire-changes/core-stores-sql@7.62.0.json +30 -0
- package/wire-changes/core@7.61.0.json +4405 -0
- package/wire-changes/core@7.62.0.json +2181 -0
- package/wire-changes/mods-kernel@7.61.0.json +65 -0
- package/wire-changes/mods-kernel@7.62.0.json +42 -0
- package/wire-changes/primitives@7.61.0.json +30 -0
- package/wire-changes/primitives@7.62.0.json +30 -0
- package/dist/core/consolidate-scope.d.ts +0 -93
- package/dist/core/consolidate-scope.js +0 -98
- package/dist/core/runner/image-removed-seat.d.ts +0 -12
- package/dist/core/runner/image-removed-seat.js +0 -19
- package/dist/core/runner/memory-consolidation.d.ts +0 -109
- package/dist/core/runner/memory-consolidation.js +0 -251
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,920 @@
|
|
|
1
|
+
## 7.62.0 — 2026-10-31
|
|
2
|
+
|
|
3
|
+
### The store contract type and the two store consolidation passes leave the package — `MemoryStore`, `consolidateScope`, `runMemoryConsolidation` and the thirteen root names only they read (#1654; retirement lines RL-1654-memorystore / RL-1654-consolidate-scope / RL-1654-run-memory-consolidation, ruled C-R1075 ① and its 加注 1; behavior change: none on the Runner path; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: −16 root names; members: −1 `FileStorageBackend.consolidationLock`) (@server @dgx @client-core @test)
|
|
4
|
+
|
|
5
|
+
- **Retired (C-R1075 ①).** hard-breaking: three exports removed (open to veto) — MemoryStore (type) / consolidateScope / runMemoryConsolidation — and, in the same cut, every root name only those two passes read: `CONSOLIDATION_SYSTEM_PROMPT`, `DEFAULT_CONSOLIDATION_BAND`, `DEFAULT_CONSOLIDATION_SEARCH_LIMIT`, `DEFAULT_CONSOLIDATION_MAX_NOTES`, `normalizeForExactMatch`, `advanceCursorAfterInline`, `createFileConsolidationLock`, and the types `ConsolidationParams`, `ConsolidationStats`, `ConsolidationNote`, `ConsolidationLLM`, `ConsolidateScopeDeps`, `ConsolidateScopeOptions` (`npm run handoff:diff origin/stage-7620 HEAD`: 16 removed / 0 added). `src/core/consolidate-scope.ts` and `src/core/runner/memory-consolidation.ts` are deleted; the file backend's per-scope consolidation lock (`FileStorageBackend.consolidationLock`, the `consolidation-locks/` directory it created under the data root) goes with its factory.
|
|
6
|
+
- **Hard-breaking — HB-1, sixteen root names and one backend member removed (open to veto).** *What changed:* the names above are no longer exported from `@sema-agent/core`, and a `FileStorageBackend` no longer carries `consolidationLock` nor creates `consolidation-locks/`. *Who is affected:* a host that imports any of the sixteen names, or calls `backend.consolidationLock`, fails to compile (a JavaScript caller reads `undefined`); the origin/main of server, cli, client-core, sdk and test, and the HEAD of the dgx checkouts that import core, carry no code reader of any of them. *What to read instead:* memory is the MemoryEngine behind `RunnerDeps.memoryBackend` and its consolidation is the engine driver (`runMemoryConsolidationDriver`, `resolveMemoryConsolidationDriver`); a host injects an engine backend, not a store.
|
|
7
|
+
- **What does not change.** The Runner never read these names (design/157 B19 removed `RunnerDeps.memoryStore`). The store implementations `InMemoryMemoryStore`, `FileMemoryStore`, `guardedMemoryStore`, `FileStorageBackend.memoryStore` and the store helpers of `src/core/memory.ts` stay exported until the store family retires (their faces now sit on one retirement line, RL-1654-store-family, `retireBy` 7.63.0, which also groups the ledger-v1 row). The anchor backfill arm is not touched: a control plane that holds a store but no root anchor still records the anchor at its next open and says `memory.root_anchor_backfilled` (RL-1103-anchor-backfill re-windowed to 7.63.0 with the store family's persisted-form retirement). The checkpoint version ladder is not touched: a v≤9 checkpoint row is read by its number as before (RL-1333-checkpoint-numeric re-windowed to 7.63.0, on the backends' census of v≤9 parked rows).
|
|
8
|
+
- **Who needs it / compensation.** *Needs it:* every reader of the root surface — sixteen names that read as a supported second memory path while no engine path used them. *Compensation:* none needed; zero code readers downstream.
|
|
9
|
+
- **Consumers.** @server: zero code readers on origin/main; the memory backend injection is unchanged. @dgx: zero readers; engine memory backends are injected as before. @client-core: zero readers; a generated export table regenerates on pickup. @test (black box): none of the sixteen names is a root export of the 7.62.0 dist (`import { consolidateScope } from "@sema-agent/core"` is a compile error, a runtime read is `undefined`).
|
|
10
|
+
- **Pins.** `test/backlog1654-store-exports-retired.test.ts` — R1 (the nine value names are no runtime export of the root; control: the engine driver is) · R2 (none of the sixteen names is spelled in `src/index.ts` outside a comment; control: the three store implementations still are) · R3 (the two pass modules are gone) · R4 (a file backend has no `consolidationLock` and creates no `consolidation-locks/`; control: `memoryStore` stays) · R5 (the retirement table: the three rows gone, RL-1654-store-family due 7.63.0 and grouping the ledger-v1 row, the three lines left for 7.63.0 untouched). The pins that exercised the retired passes and the lock are deleted with them (`consolidate-scope.test.ts`, `consolidate-scope-property.test.ts`, `memory-consolidation.test.ts`, `effect-seamB-mech.test.ts`, and the consolidation blocks of six mixed files).
|
|
11
|
+
|
|
12
|
+
### An extension sees the leg open, each model turn start, the context measured and a person's prompt before the classic screen, and may rewrite or drop that prompt — `session.start`, `turn.start`, `session.measure`, `prompt.submit`, `classic.SessionStart` / `classic.SessionEnd`; `$.session.turns` / `usage` / `version`, `$.session.messages({ agentId })` (#3010 / #3011, the last two slices of #1933; ruled C-R985 Q2 A / Q3′ A / Q7 A and C-R1071; behavior change; hard-breaking: four, three sentences each below, open to veto; closed sets: the event table +3 names (`prompt.change`, `session.identity`, `ui.view`, named only), +6 stations, +3 methods; exports: +5 root types `SessionStartEvent`, `SessionEndEvent`, `SessionUsage`, `SessionVersion`, `ContextOccupancy`; members: +1 optional `human_input.rewrittenBy` (wire +1 optional key), +1 method `TaskRegistry.anchoredSession`, `TaskRegistry.bindBackgroundAgentSession` +1 required parameter) (@server @cli @client-core @test)
|
|
13
|
+
|
|
14
|
+
- **Before.** The leg's opening, a model turn's start, the context measurement and a person's prompt before the classic screen had no station; `classic.SessionStart` and `classic.SessionEnd` were names with no station; `$.session.usage`, `turns` and `version` threw "not callable on the engine bus in this version"; `$.session.messages()` took no argument; an extension could only `block` a prompt through `classic.UserPromptSubmit`, never rewrite it.
|
|
15
|
+
- **Now — the leg's lifecycle.** `session.start` is raised first thing in the leg's body (its `$` seats bound, before its first model request) with `{ cwd, sessionId, agentId? }`, and its bottom raises `classic.SessionStart` with the same `e`; `turn.start` once per model turn, before that turn's request, with `{ turn }` (the number `turn.complete` carries for it); `session.measure` at a turn boundary whose context occupancy moved, with `{ context: { usedTokens, windowTokens, compactAtTokens }, changed: ["context"] }` — the boundary's `context_usage` numbers, so not where no `context_usage` is emitted (within-task compaction off, the leg ending, the compaction circuit open; KL-3010-c); `session.end` (unchanged place) now raises `classic.SessionEnd` in its bottom, and a resumed leg refused because its approved call's tool is gone (`resume.tool_unavailable` / `resume.tool_contract_mismatch`, the one exit that leaves without the settle) raises it too, `reason: "failed"`, before the error comes out. Every one is an observation (skip · grace); each is raised only when a handler hangs on it or on its classic event.
|
|
16
|
+
- **Now — the prompt's screen.** `prompt.submit` is raised at the four entrances that screen a person's prompt (an operator's objective, a live steer, a wake's message before its claim, a parked steer redelivered), before `classic.UserPromptSubmit`, which its bottom raises on the text handed down. `next({ ...e, text })` rewrites the prompt and the entrance delivers the rewritten text; `{ drop: <reason> }` refuses it as the classic screen's `block` does there; a failing handler refuses it (refuse · immediate; `source`, `inputId`, `actor` pinned). The classic screen's own refusal is final. The `human_input` account the entrance mints carries `rewrittenBy` (the `"applied"` frame of an objective, a wake's message or a parked steer; the `"queued"` frame of a live steer). Who changed the text is read off the chain as it runs, one reading for `prompt.submit` and `session.receive` (`received.rewrittenBy`): a handler is named when it hands on a different text, or answers a different text than the one that came up to it — **fix for `session.receive` (7.61.0)**: an outer handler that only carried an inner one's rewritten answer up (`return { ...(await next(e)) }`) was named as the rewriter and the inner one was not; now the inner one is named and the copier is not. One predicate decides whether an entrance screens: a handler on `prompt.submit` or on `classic.UserPromptSubmit` (the wake's pre-claim screen read only the classic event before). `$.prompt.submit` is not in this version; see #3284.
|
|
17
|
+
- **Now — the session's read faces.** `$.session.turns()` counts the transcript's prompts from its people (a row whose door is `prompt`; a steer is the engine's note, not one — KL-3010-a); `$.session.usage()` answers `{ context? }`, the leg's latest boundary measurement (none before the first boundary, none on `Runner.compactSession`); `$.session.version()` answers `{ version }`, the package's; `$.session.messages({ agentId })` reads a subagent's stored rows through the leg's own task list row (`TaskRegistry.anchoredSession`, the access the leg's task tools read with) and rejects with the reason for a row the leg does not reach, a row with no session, or a session its store cannot read (KL-3010-b). The child's rows are read in the store its row carries — the store the child's run holds its session through, bound with the session id when the spawn binds the row — never in the leg's own: a child the Agent tool runs on a runner of its own is read in that runner's store, and a leg-side session that happens to share the child's id is not read.
|
|
18
|
+
- **Hard-breaking — HB-1, the kernel contract is 8 (open to veto).** *What changed:* `KERNEL_CONTRACT_VERSION` is 8 (7 since 7.61.0): the closed set is the reference's 145 names (Claude Code 2.1.309 `_De`, cli309.js:253322), six events gained stations and three methods have bottoms. *Who is affected:* a mod package whose `hooks/hooks.json` says `"contract": 7` is refused by `loadModPackage` (server S-2388's real package, cli MODS155, test C-R915 fixtures; server `test/mods-loader-pickup.test.ts` pins 6); a host comparing a kernel copy's table (client-core's table generation: +6 stations, +3 methods, +3 names). *How to migrate:* write `"contract": 8`; regenerate the table copy from `MOD_EVENT_TABLE`; compensation = the kernel table and the station table (`docs/INTEGRATION-CORE.md` §10.16) ride the arrival post.
|
|
19
|
+
- **Hard-breaking — HB-2, `session.end`'s bottom raises `classic.SessionEnd` (open to veto).** *What changed:* a `session.end` handler wraps the `classic.SessionEnd` handlers (R-W4); one that answers without calling `next` keeps `classic.SessionEnd` from being raised. *Who is affected:* a deployment hanging both events and assuming they are independent (none in this tree or in the three neighbour repositories). *How to migrate:* call `next(e)` in a `session.end` handler that should let the classic event run; order-sensitive observers read `classic.SessionEnd` as inside `session.end`.
|
|
20
|
+
- **Hard-breaking — HB-3, `$.session.messages` takes `{ agentId }` (open to veto).** *What changed:* the method takes one optional key; with it, it answers the subagent's stored rows, and any other key is the caller's throw. *Who is affected:* code that passed an argument the method used to refuse (it still refuses every key but `agentId`), and type-level code that implements `EngineDollar["session"]["messages"]` (an overload was added). *How to migrate:* nothing for a call with no argument; a host's own `$` implementation adds the overload.
|
|
21
|
+
- **Hard-breaking — HB-4, `TaskRegistry.bindBackgroundAgentSession(id, sessionId, store)` (open to veto).** *What changed:* the bind takes the store the child's run holds that session through, keeps it on the row beside the id (process-local; the durable record keeps the id alone) and the release ends both; the store is judged where it is read (`$.session.messages` refuses, naming why, a row bound without a store or with one it cannot read through). *Who is affected:* a caller of the two-argument form — none in this tree outside the Agent tool's three bind sites; @server two test files bind directly (`test/background-session-reap-s745.test.ts`, `test/core-probe-parked-registry.test.ts`). *How to migrate:* pass the store the child's session lives in (the runner's `sessions` that runs the child); a test that never reads the transcript passes any `{ acquire }`. This closes #3293 (the 7.62.0 review leg's finding: the `$.session.messages({ agentId })` face read the parent runner's `sessions` for every child, so a child run on its own store answered "not a child", and a parent-store row with the same id answered an unrelated transcript — the anchor is now the (id, store) pair on the row, read through one function, `childSessionAnchorOf`); and the registry's `rowsUnder` reads that one source again (#2861 I1), nothing else of #2861 lands here.
|
|
22
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an extension that redacts or tags a prompt before the model sees it, or that observes the leg's lifecycle the way the reference's mods do. *Affected:* HB-1–HB-4. *Compensation:* the station table rides the arrival post; divergences D-3010-a (turns without steers), D-3011-a (the lifecycle classic answers are not read — `additionalContext` / `initialUserMessage` not taken), D-3011-b (a failing `prompt.submit` handler refuses where the reference skips) and D-3011-c (`turn.start` carries the turn's number, as `turn.complete` does, not the reference's `turnId`) are open to veto.
|
|
23
|
+
- **Consumers.** @server: the contract is 8 — S-2388's package and the `mods-loader-pickup` pin move from 6 to 8 at pickup; `human_input.rewrittenBy` passes through (additive); the two test files that call `bindBackgroundAgentSession` directly pass the store (HB-4). @cli: MODS155 at contract 8; the six stations render in the station view; a rewritten prompt's account names the extension. @client-core: the kernel table copy +6 stations, +3 methods, +3 names; `rewrittenBy` enters the `human_input` frame type. @test: black box — each station fires once where §10.16 says, in order; `$.session.messages({ agentId })` refuses another owner's agent; a rewritten objective is what the model reads.
|
|
24
|
+
- **Pins.** `test/backlog3010-3011-mods-s4.test.ts` — K1 (the six stations, the three methods, the three named-only names, contract 8) · S1 (order and shapes on a real Runner: `session.start` with `classic.SessionStart` inside before the first request, `turn.start` per turn, `session.end` with `classic.SessionEnd` inside last) · S2 (a cancelled leg: each once) · S3 (R-W4: a typed handler without `next` keeps the classic event from being raised; a classic handler alone is raised) · S4 (a throw on any of the six changes nothing) · S5 (a resume refused with `resume.tool_unavailable`: `session.end` `failed` pairs the resumed leg's `session.start`) · E1 (no registration and pass-through handlers on all seven send the same requests, store the same rows, end the same way; no frame carries `rewrittenBy`) · T1 (`turn.start` before the turn's request, the number `turn.complete` carries) · M1 (`session.measure` and `$.session.usage()` read the `context_usage` numbers) · M2 (the seat is written at every measuring boundary, the event raised only when the occupancy moved) · M3 (within-task compaction off: no `context_usage`, no `session.measure`, `usage()` is `{}`) · R1 (`$.session.turns()` = 1 with a live steer; `$.session.version()` = package.json) · A1 (`$.session.messages({ agentId })`: a reached row reads its rows; another owner's, an unknown id and an unbound row are refused, naming why) · A2 (a child the Agent tool runs on a runner of its own: the leg, whose store never held the child's session, reads the child's rows in the store the row carries) · A3 (the same session id in the leg's store with other rows: the read answers the child's transcript) · A4 (the bind keeps the store with the id, reached under the row's access only; the release ends both; A1 also reads a row bound without a store and one whose store cannot read, each refused naming why) · P1–P3 (the objective: rewritten text delivered and stored, the classic screen on it, `rewrittenBy`; a drop and a throw refuse; the classic block is final) · P4 (a live steer: the frame rewritten, the queued account names the rewriter) · P5 (a wake's message, screened once, before the claim) · P6 (a parked steer redelivered; the sibling unchanged, no `rewrittenBy`) · P7 (a `prompt.submit` handler alone screens the wake's message; `$` throws there) · P8 (`rewrittenBy` names a handing-on rewriter and an answering one, in order; the classic screen is then not asked) · P9 (an outer handler copying an inner redactor's answer up is not named; the redactor is) · P10 (the shared reading, unit). Mutations per fixture: `.gate-logs/criteria-3010-3011-mutations.md`. Re-pinned: `mods-kernel-296` (the 145-name fixture `cc309-mod-events.json` replaces `cc296-mod-events.json`), `mods-kernel-wave2` (the classic map's two keys; `prompt.*` selects `prompt.submit`; the not-callable sample is `session.identity`), `mods-kernel-registration` (the stationless classic sample is `classic.Notification`), `mods-methods` (the three read faces and `messages({ agentId })`), and the three mod package fixtures (`"contract": 8`).
|
|
25
|
+
|
|
26
|
+
### A place a substitution or a launched shell's text names itself stays where it is — the read boundary and the removal guard no longer move an absolute `cd`, `git -C` or `-C ~` at or under the working directory onto the segment the text sits in (#3235; behavior narrowing — security, thirteen forms below, the last one (an `eval` climb) open to veto; behavior widening — one form, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
27
|
+
|
|
28
|
+
- **Before.** A nested text — a `$( … )` body, a here-document's substitution, a launched shell's command string (`bash -c '…'`) — was planned as if it stood in the declared working directory, then re-based onto the segment it sits in by prefix: every base spelled at or under the declared working directory was taken to come from where the text starts and was moved. So a place the text names itself moved too. With the working directory at the home, `cd proj && echo $(cd <home> && cat .mcp.json)` was judged as reading the project's `.mcp.json`, while bash read the home's. The station vouched; on the default seat the substitution's own ask was the only question; on a seat that puts no ask the home's file was printed. The same happened to `git -C <home> show HEAD:.mcp.json`, `git -C <home> show HEAD:./.mcp.json` and `git -C ~ show HEAD:.mcp.json` in a substitution. With the working directory at `/`, every absolute place moved: `cd ./tmp && echo "$(cd / && rm -rf ./usr)"` was judged as removing `/tmp/usr`.
|
|
29
|
+
- **Now — one rule.** A nested text with no working directory of its own starts at a placeholder no text can spell (`nestedStartOf`, `src/tools/fs/shell-read-start.ts`). A base is moved onto the enclosing segment exactly when it was derived from that placeholder: the start itself, a relative move from it, a `-C` / `..` walk from it. Every other place stays where it is — an absolute `cd`, `git -C <dir>`, `-C ~`, `cd ~`, a `CDPATH` entry, the place a closed scope went that the held thread hands in. No `cd` or `-C` word is special-cased. A base is read as derived by the placeholder's own segment, not by the spelling above it, so a working directory spelled `/w/.` or `/w//` changes nothing. A lost `cd` target's deny floor keeps its `..` walk, so a climb from the start stays derived from it. `PWD` reads no start that holds the placeholder — the nested text's own, and an `eval` text's that the nested text runs: a climb there is lost and judged on its floor, never folded past the start. A derived floor with nowhere to land is no floor, and the judge reads the declared working directory as before.
|
|
30
|
+
- **Narrowing (security), by form.** Working directory at the home, deny row `~/.mcp.json` or `**/home/.mcp.json`; bash 3.2 reads the home's `.mcp.json` in each. On stage-7620 70cdb9681 the station vouched or could not place these, the default seat asked once, and the bypass seat printed the home's file. They are now refused:
|
|
31
|
+
- `cd proj && echo $(cd <home> && cat .mcp.json)`
|
|
32
|
+
- `cd proj && echo $(git -C <home> show HEAD:.mcp.json)`
|
|
33
|
+
- `cd proj && echo $(git -C <home> show HEAD:./.mcp.json)`
|
|
34
|
+
- `cd proj && echo $(git -C ~ show HEAD:.mcp.json)`
|
|
35
|
+
- the same read in a here-document's substitution: `cd proj && cat <<EOF` ⏎ `$(cd <home> && cat .mcp.json)` ⏎ `EOF`
|
|
36
|
+
- in a child shell's text: `cd proj && bash -c 'cd <home> && cat .mcp.json'`
|
|
37
|
+
- `cd proj && echo $(cd ~ && cat .mcp.json)`
|
|
38
|
+
- a substitution inside a substitution: `cd proj && echo $(echo $(cd <home> && cat .mcp.json))`
|
|
39
|
+
- `cd proj && echo $(cd <home>/proj && cat ../.mcp.json)`
|
|
40
|
+
|
|
41
|
+
Two more are refused under an unanchored row:
|
|
42
|
+
- `f(){ cd <home>; }; cd proj && echo "$(f; cat .mcp.json)"` — the home the body went to is on the floor, not moved onto the project.
|
|
43
|
+
- `cd proj/deep && echo $(cd ../.. && cat .mcp.json)` — the lost climb's floor.
|
|
44
|
+
|
|
45
|
+
The removal guard reads the same plan: `cd ./tmp && echo "$(cd / && rm -rf ./usr)"` (working directory `/`) is `dangerous_delete`.
|
|
46
|
+
|
|
47
|
+
One more is unplaced where it was placed (open to veto — such a text is judged on its floor and so asks more often): `echo "$(eval 'cd /x && cd ..' && cat f)"` was judged at `/`; an `eval` text inside a substitution now reads `PWD` as the substitution does, so the climb is lost and `f` is judged on its floor, as `echo $(cd /x && cd .. && cat f)` already was.
|
|
48
|
+
- **Widening — one form (open to veto).** `cd noproj && echo $(git -C <home>/proj show HEAD:.mcp.json)` (working directory at the home) was refused, and now asks on the default seat and runs on a seat that puts no ask. The absolute `-C` was moved under `noproj`, the repository-top probe started where nothing is, and every ancestor met the home's row. Git prints the project's own file. `KL-1726-c` is closed.
|
|
49
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* every deployment that guards a file under the working directory — the home most of all — from a model that can spell the file's directory absolutely in a substitution. *Affected:* a text that reads a guarded file through its own absolute `cd` / `-C` inside a substitution or a launched shell's text: refused where it ran or asked. *Compensation:* none needed; a project's own file read through an absolute `-C` runs (the widening above).
|
|
50
|
+
- **Consumers.** @cli @server: the engine you embed (7.61.0 and earlier) moves those places. The forms above vouch there, and on a seat with no ask they read the guarded file. They are refused once you take this engine. No wire change, no new code (`read_path_denied`). @test: please re-run the car-1726 cx-probe forms X1 / X2 / X3 / X6 (now refused) and X8 (now runs), and try the nested doors this pin does not cover. Not this root: the directory a launcher's own `-C` names was not where its shell's text started (`env -C <home> bash -c 'cat .mcp.json'` from a project, under an unanchored row) — closed in this release by #3275, the next section.
|
|
51
|
+
- **Pins.** `test/backlog3235-rebase-plan-nested.test.ts` has 119 cells. 27 forms are each read four ways: the station's verdict, the real Runner lane on the bypass and the default seat (`B3235_COLUMN=base` re-reads stage-7620 70cdb9681), and `/bin/bash` in the same world — a stand-in home that is a git repository, a project repository under it, and no host environment. Beside them sit the plan cells: an absolute place stays, a derived one follows; the working directory at `/`; a Windows-family working directory; the held-thread floor and the lost climb; an `eval` climb inside a substitution; a working directory spelled with `.`, `//` or `..` (and the station under `<home>/.`); no plan names the placeholder; a derived floor with nowhere to land; the removal guard; a command that spells the placeholder itself (the station asks, the executor does not start it). Eight mutations (M1–M8), each red on its own fixtures — M1–M3, M7 and M8 on the final tree, M4–M6 on an earlier tree of the same branch.
|
|
52
|
+
|
|
53
|
+
### A text a launcher hands a shell starts in the working directory the launcher settles — `env -C <dir> bash -c '…'` is judged in `<dir>`, not where the command line stands (#3275; behavior narrowing — security, ten forms below; behavior widening — four forms, open to veto; divergence D-3275-a, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
54
|
+
|
|
55
|
+
- **Before.** A launcher that moves the working directory its program runs in (`env -C <dir>`, `env --chdir=<dir>`, `sudo -D <dir>`, `unshare -w <dir>`) was read only as "moved". The text it hands a shell, and the program's own relative words, were left unplaced, with the directory the command line stood in as their deny floor. From a project under the home, `env -C <home> bash -c 'cat .mcp.json'` was checked at `<home>/proj/.mcp.json`. Under a row anchored to the home (`~/.mcp.json`) it was refused anyway. Under an unanchored row (`**/home/.mcp.json`) the station could not place the read and did not meet the row. The default seat asked once, and a seat that puts no ask printed the home's file. `env -C <home> cat .mcp.json` did the same.
|
|
56
|
+
- **Now — one rule.** A launcher option whose value is a working directory (the row table's `base: "working-directory"` role; no launcher is special-cased) is where the text that launcher hands a shell starts, as after `cd <dir>`. The directory is taken from where the command line stands, by the kernel's walk of the spelling (`..` kept). Each launcher of a chain applies in turn. Of several such options on one launcher the last wins — so macOS `env` reads them (measured); GNU `env`, `sudo` and `unshare` are inferred, not run. The reference's worktree guard (Claude Code 2.1.309, `cli309.js:266249`) refuses an `env` with more than one ("passes more than one -C/--chdir to env (last-wins semantics), which cannot be verified"): divergence D-3275-a, open to veto. Which word is whose option is read off the program-position walk's own steps, the one reading of it: env steps a lone `-` and reads on, so `env -C <proj> - -C <home> …` runs in the home. The same chdir step now serves `git -C` (`chdirFrom`, `src/tools/fs/shell-read-object-path.ts`). The text is planned from its placeholder start and re-based onto that directory, so a place it names itself (`cd /x`) stays where it is. The segment's own relative words may belong to the launcher (`-C sub` is relative to the command line) or to the program. They stay unplaced, and their deny floor is now both places. Where the text does not say where the launcher runs the program, everything stays as before: a value that expands, an empty one, `~user`, a root or program-search move in the chain (`sudo -R`, `env -P`), `nsenter -w` with no value, an optional value attached as `=V` (`nsenter -w=V`, `--wd==V`: util-linux 2.41 drops the `=`, 2.38 keeps it, two places). A walk that already lost track stays lost, and the launcher's directory moves its floor. A redirection, and a substitution the shell runs itself, stay where the command line stands.
|
|
57
|
+
- **Narrowing (security), by form.** Working directory `<home>/proj`, unanchored row `**/home/.mcp.json`; bash 3.2 reads the home's `.mcp.json` in each. On stage-7620 092bfda61 the station could not place these and did not meet the row: the default seat asked, the bypass seat printed the file. They are now refused (`read_path_denied`):
|
|
58
|
+
- `env -C <home> bash -c 'cat .mcp.json'`
|
|
59
|
+
- `env -C <home> sh -c 'cat .mcp.json'`
|
|
60
|
+
- `env -C .. bash -c 'cat .mcp.json'` (and `cd proj && env -C .. bash -c 'cat .mcp.json'` from the home)
|
|
61
|
+
- `env -C ~ bash -c 'cat .mcp.json'`
|
|
62
|
+
- `env -C <home>/proj -C <home> bash -c 'cat .mcp.json'` — the last `-C` wins
|
|
63
|
+
- `nice env -C <home> bash -c 'cat .mcp.json'`
|
|
64
|
+
- `env -C <home> cat .mcp.json` — the program's own word, the launcher's directory on its floor
|
|
65
|
+
- `env --chdir=<home> bash -c 'cat .mcp.json'` — GNU env; the macOS env refuses the long spelling and runs nothing
|
|
66
|
+
- `env -C <home>/proj - -C <home> bash -c 'cat .mcp.json'` — the `-C` after env's lone `-`
|
|
67
|
+
- `env -C <home> -S 'cat .mcp.json'` — env's own split string; on that tree the default seat asked and the bypass seat refused it too
|
|
68
|
+
|
|
69
|
+
The removal guard reads the same plan: `cd ./tmp && env -C / bash -c 'rm -rf ./usr'` (working directory `/`) is `dangerous_delete`, not `unverifiable_delete`.
|
|
70
|
+
- **Widening — four forms (open to veto).** Each was refused, and now asks on the default seat and runs on a seat that puts no ask, as any child shell's text that meets no row does. Bash reads the project's own `.mcp.json` in each. The old floor — where the command line stood, or a walk from there — met the home's row. The text now starts where the launcher put it, the project.
|
|
71
|
+
- `env -C <home>/proj bash -c 'cat .mcp.json'` — working directory the home, row `~/.mcp.json`
|
|
72
|
+
- `env -C <home> env -C proj bash -c 'cat .mcp.json'` — the same
|
|
73
|
+
- `env -C <home>/proj bash -c 'cd deep && cat ../.mcp.json'` — working directory `<home>/noproj`
|
|
74
|
+
- `env -C <home> -C <home>/proj bash -c 'cat .mcp.json'` — working directory the home, row `~/.mcp.json`; the last `-C` wins (D-3275-a above)
|
|
75
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose deny rows are not anchored to the home (`**/name/file`), against a model that reaches the file by handing its directory to a launcher. *Affected:* a command that reads a guarded file through `env -C`, `sudo -D` or `unshare -w`: refused where it ran or asked. *Compensation:* none needed; a project's own file read through a launcher's `-C` asks instead of being refused (the widening above).
|
|
76
|
+
- **Consumers.** @cli @server: the engine you embed (7.61.0 and earlier) leaves these texts unplaced, so a seat with no ask reads the guarded file under an unanchored row. They are refused once you take this engine. No wire change, no new code. @test: please run the narrowing forms black-box on the bypass seat (no output, `read_path_denied`), the four widening forms (asked / run), and a launcher this pin runs only in the plan (`sudo -D`, `unshare -w`). Not this root: a directory the text computes at runtime (`env -C "$(…)"`, `cd "$(…)"`) stays unplaced, as before, and so does a `-C` written inside env's split string (`env -S '-C <home> cat .mcp.json'`: env reads it, the plan reads the string as a command line; the default seat asks, the bypass seat refuses it). Also not read: where `chroot <root>` runs a text — `env -C <dir> chroot <root> bash -c '…'` is placed at `<dir>` while chroot runs it at `<root>` (KL-3295-a, #3295; it needs root).
|
|
77
|
+
- **Pins.** `test/backlog3235-rebase-plan-nested.test.ts`, a `#3275` section in the #3235 world: 19 forms, each read four ways (`B3275_COLUMN=base` re-reads stage-7620 092bfda61); the #3235 table's `S2` cell is now refused. Plan cells cover each spelling of the family (`-C`, `-C/x`, `-iC`, `--chdir`, `--chdir=`, `sudo -D`, `sudo --chdir=`, `unshare -w`, `nsenter -w/x`, `nsenter --wd=/x`, a `-C` after env's lone `-`), relative, `..`, `~` and bound values, the last option winning, a chain, a substitution around the launcher, a place the launched text names, the moves left unsaid, a lost walk, the segment's own words, a redirection and a substitution, and no placeholder left. Removal-guard cells, the `=V` forms among them. Eight mutations (MA–MH), each red on its own fixtures. What bash opens for `env --chdir=` and for a `-C` after env's lone `-` is probed once on the host, since GNU env and the macOS env read the two apart (GNU takes `--chdir=` and ends its options at `-`); the engine's own readings are the same on both.
|
|
78
|
+
|
|
79
|
+
### Errata to the 7.61.0 section (that section is frozen; the corrections live here)
|
|
80
|
+
|
|
81
|
+
- The #3212 section's Consumers sentence "@cli (L-2225): the latch definition sentence reads `sourceSessionId`" was untrue. The shell's interrupt-marker latch compares `detail.taskId` and keeps comparing it: @cli (L-2225): no key change — the latch keeps comparing `detail.taskId`; L-2225 rewrites its comment only. (The #3213 section's sentence that the latch compares `detail.taskId` was true.)
|
|
82
|
+
- A #3155 sentence said the server, cli and client-core build none of the delegation handles outside a Runner and call no such verb; the server half was untrue: the server drives delegation tools outside a Runner at parked redemption and at operator resume.
|
|
83
|
+
- The #2940 / #2760 section said of `judgeMailboxAppendById`'s new signature "@server's twins today call it nowhere, so the version that will"; that was untrue of the server: its SQL mailbox store calls it (`mailbox-store-sql.ts:154`), so the new first parameter `{ held, consumed }` is a hit there, to be met at its pickup.
|
|
84
|
+
- The Before sentence of the #3059 section said an inherited `permissionMode` or `appendSystemPrompt` stopped at the first copy; only an inherited `appendSystemPrompt` did — `permissionMode` was already read through the prototype.
|
|
85
|
+
- The #3079 section said the placement probe reads one 64 KiB block whatever the log's size; that holds only when the row's header fits one block (a 100 KiB header reads two). The true bound is the header's size, not the log's.
|
|
86
|
+
- The #3202 section's Consumers named no change for the server's `TaskSpec`s. The server carries three host facts on a spec as symbol-keyed members (`sema-server.handsLane`, `runSkills`, `legSessionWitness`), and an engine at 7.61.0 refuses such a spec `config.spec_unknown_key`: a symbol own key is an own key (C-R996 K6, the #3059 section; ruling note 2 keeps that reading). @server: move the three facts to a side table keyed by the spec object (SPECCARRIER, server 7.143.0); nothing else moves.
|
|
87
|
+
- The #3156 section said "Claude Code … has no durable park" for a session note held to the serialization point. That was too strong: Claude Code 2.1.309 does carry a parked approval across workers (`cli309.js:289257`, read for #3255, divergence D-3156-a). The corrected reading: the reference keeps the note in place at once, and its cross-worker handoff reads a transcript that already holds the kept note, so no row rides the park there — the handoff chain was read from the entry point, not hop by hop (an inference). Sema's choice (the note rides the park checkpoint as `heldRows`) stands as a registered divergence; the sentence, not the design, is corrected.
|
|
88
|
+
|
|
89
|
+
### A row the engine parks says an absent member one way — by leaving it out — on every store, and a member is present exactly when its value is not `undefined` (#3277 = #3254 S1, ruled C-R1066 option B, open to veto; behavior change — the keys an in-process store holds for an engine-written row; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
90
|
+
|
|
91
|
+
- **Before.** The state serializer names every member of a parked row's `state`, an absent one as a key holding `undefined`, and the stamp kept such keys: an in-memory store held a fresh approval park with 26 of them in `state` and 2 at the top (`deadline`, `humanReview`), the File store none. Both stores' resolve wrote `reopenReason: undefined`, after which the File store answered `"reopenReason" in row` true before a compaction and false after it. By value every store already answered alike; by key no answer was stable, and the documentation held both readings (INTEGRATION-CORE: never branch on `in`; `CheckpointSummary`: test presence with `in`).
|
|
92
|
+
- **Now.** One reading: a member is present exactly when its value is not `undefined` — the receipt law's member half (which names a caller handed over stays the name half, read by key). One absence form on the rows the engine writes: the one stamp (`stampCheckpointRequirements`) writes a row's top level and its `state` with an absent member omitted, and a resolve removes `reopenReason`. Below those two levels the row is written as given — a tool call's arguments, a decision-read record and the resource ledger keep a key holding `undefined`, which the binding hash, the row digest and the park's argument comparison read (`StoreFidelity` keeps that loss on its list and now says its reach). A store's `put` is not normalized.
|
|
93
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an in-process reader of a row (`Object.keys`, a spread over defaults, `in`) that answered differently on the in-memory store, and the File store's own answer across a compaction. *Affected:* the bytes an in-memory or structured-clone store holds for an engine-written row (fewer keys). The requirement words and the row digest do not move (they read by value), so a row a 7.61.0 engine parked — its keys holding `undefined` included — judges `ok` on this engine; the wire is unchanged (JSON never carried those keys). *Compensation:* none needed.
|
|
94
|
+
- **Known limit (KL-3277-a).** A row a host `put`s itself with a member holding `undefined` is stored as given: the in-memory store keeps the key, the File store drops it — by key the two still differ, by value they agree.
|
|
95
|
+
- **Consumers.** @server (SQL twin, cc): a JSON store already reads this way; the contract kit's new cell holds while `get` and the listing read members by value. @test: two black-box cells — a row put with `deadline` / `state.compositionLeg` / `state.runOrigin` holding `undefined` reads them absent on both stores and judges as its twin without the keys; a row a 7.61.0 engine parked on a structured-clone store judges `ok`. A reading that counted keys on an in-memory row turns: read it by value.
|
|
96
|
+
- **Pins.** `test/backlog3277-member-presence.test.ts` C1–C9 (two stores, one answer; the 7.61.0 row `ok` bare, through InMemory and its listing, and through a v8 round trip; a real park leaves no key holding `undefined` at the two levels on InMemory and File, before and after a compaction and a restart; the stamp stops at the two levels (control); digest and words unchanged, bytes changed; no `reopenReason` key after a resolve on InMemory and on File live, replayed and compacted; a host's own put keeps the key on InMemory only (the known limit); the row judge reads every member of the row and state tables by the one presence; the predicate); contract kit cell "member presence" (`checkpointStoreContract`).
|
|
97
|
+
|
|
98
|
+
### The `steering_injected` echo has one display bound and one cut, and the post-compaction background-task table is echoed whole (#3232; behavior change — the length of one echo; hard-breaking: none; closed sets: none; exports: none)
|
|
99
|
+
|
|
100
|
+
- **Before.** Six places in the runner minted an echo's `preview` with a literal 220: four through the redact-then-cut (`redactThenCut`), two (`limit_approach`, `final_verification`) through a raw `slice(0, 220)` — one fact, two readings of the cut (the raw cut can leave a credential fragment or a lone surrogate at the bound; neither of those two texts carries a secret today, which is why it never showed). And the post-compaction `background_tasks` frame opens with a 126-character header, so the 220 bound left about 94 characters of the table: a client that renders the preview's rows saw one row, often cut inside its description, however many tasks were running. The table's own 80-character clip of a task description was a raw `slice` of the stored text, so a credential the bound split (for instance a registry token whose last character fell past it) left a fragment no later pass could match — in the table the model reads and in any echo made from it.
|
|
101
|
+
- **Now — one seat.** `STEERING_PREVIEW_BUDGET` (220) and `steeringPreview(body, bound?)` (`src/core/runner/steering-preview.ts`): redact, then a marker-aware cut. Every echo the runner pushes that carries text — the boundary bundle, a leg's first frames, the resumed leg's continuation frames, the limit-approach notice, the final-verification injection — reads its preview through it, and the raw cuts are gone. The three `git_status` echoes carry a fixed string per kind (`GIT_STATUS_ECHO_PREVIEW`), which no bound touches. The 220 is unchanged for every prose frame, and the text the two engine-minted notices echo is byte-identical to before.
|
|
102
|
+
- **Now — the table.** `TurnAttachment.echoBound`: a frame whose body is a list its renderer already bounds states its own echo bound. The `background_tasks` frame states the per-boundary attachment byte cap (`ATTACHMENT_BYTE_CAP`, 8 KiB), so its preview is the table the model received — the header, every listed row (at most 50, each description at most 80 characters) and the "(+N more …)" line — not the first 220 characters of it. No other frame declares a bound, and the cut does not branch on the frame's source.
|
|
103
|
+
- **Now — the table's own clip.** `renderBackgroundTaskTable` (the one renderer of every model-facing list of a run's background tasks) redacts a description and then clips it to 80 characters, marker-aware (`redactThenCut`), so a credential-shaped part of a description reads `[redacted]` in the post-compaction table, the echo and a whole-session loss line alike, and no bound can leave a fragment of it. A description with no such part is byte-identical to before, except one whose cut at 80 falls inside a surrogate pair (an emoji, say): the old raw cut left a lone surrogate there, the new one does not.
|
|
104
|
+
- **Wire.** `preview` is still a string and the contract still says "clipped to a display bound"; the `steering_injected` sentence of `docs/INTEGRATION-CORE.md` §1.12 now names the bound (220) and the one wider one. Only a `background_tasks` preview is longer (up to 8 KiB, once per compaction). No new key, no type change, no exported name.
|
|
105
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a client that renders the post-compaction table from the echo (it parses one row per line). *Affected:* a consumer that assumed every echo is at most 220 characters — only `background_tasks` is longer; and a task description that carries a credential-shaped part now reads `[redacted]` there. *Compensation:* none needed; the bound stays on every other frame.
|
|
106
|
+
- **Consumers.** @client-core @cli @web-client: a `background_tasks` preview now carries every row of the table, so a row parser sees all of them (its "last row may be cut" tolerance only fires at the cap now); the package-side gap that the echo shows a row or two is closed on this engine's side. @server: persisted `steering_injected` frames of that source are longer. @test: a cell that read the table preview as at most 220 characters reads the whole table.
|
|
107
|
+
- **Pins.** `test/backlog3232-steering-preview-budget.test.ts` — the seat (budget 220, the cut is the marker-aware one; no src file mints an echo with a raw slice or a literal bound, every push's preview comes from the seat, the six minted sites by file) · the frame declares its bound (the table frame the lane cap, every other frame nothing) · six tasks: every row, every full description, the header, a substring of the model's request · an empty description and a description past the row bound · sixty tasks: 50 rows and the "N more" line inside the cap · a credential crossing the description bound (80) and one beside the lane cap's clip: no fragment in the model's table or the echo · redact-before-cut at the echo's own bound · an output style past the bound: first-frame and boundary echoes are the 220 cut, and a key straddling column 220 ships no fragment at the first-frame, the boundary and the resumed-continuation sites · the limit-approach and final-verification echoes are the first 220 characters of what the model received. Mutations redden their fixtures (`.gate-logs/criteria-3232-mutations.md`).
|
|
108
|
+
|
|
109
|
+
### A cut staging name carries a digest of the whole target name, so a write's sweep of a dead process's staging files claims only its own (#3239; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
110
|
+
|
|
111
|
+
- **Before.** A target whose name would pass 255 bytes with its staging tail stages under a cut name (#3106), and the sweep of a dead process's staging files (#3160) claimed a name when it equalled that cut. Two long names that differ only at their tails cut to one prefix, so a write of one removed the other's dead-pid staging file and counted it in its own `fs.staging_file_swept` count.
|
|
112
|
+
- **Now.** A name whose staging name would be 252 bytes or more (three short of the maximum) is cut — whole characters, from its end — and followed by `~` and the first twelve hex digits of the SHA-256 of the whole target name, then `.tmp.<pid>.<hex12>`. A cut name is never shorter than 252 bytes and a whole one never reaches it, so no two targets mint one name (a file named like another target's cut prefix stages under its own cut name). The one function that mints the staging name is the one the sweep claims by, so a name is claimed only by the target it was cut from; a name whose staging name stays under 252 bytes is spelled as before. A cut name without the digest (a file an older build left) is no target's claim and stays.
|
|
113
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a directory of long generated names, where one write's sweep reached into a sibling's dead-process file and its count said so. *Affected:* a target whose name is within three bytes of the point where #3106 started to cut (staging name 252–255 bytes, a target name of about 223–226 bytes) now stages cut and marked, where it staged whole; and a dead process's staging file for a long-named target that an older build left stays in place (it is neither swept nor counted). The staged sibling's name is seen only in a "preserved at" sentence and a residue notice, as free text. *Compensation:* none — such a file was never recoverable, only a leftover.
|
|
114
|
+
- **Known limit.** The claim is exact for a target up to the digest (two names that share the kept prefix and 48 bits of digest), not unforgeable: a file somebody spells exactly like a target's own staging name under a dead pid is claimed by spelling, as for any staging name.
|
|
115
|
+
- **Consumers.** None: engine-internal; the name is free text in a sentence.
|
|
116
|
+
- **Pins.** `test/backlog3239-staging-name-owner.test.ts` (two 251-byte names differing only at the tail: a write of one leaves the other's dead file and counts nothing, each write removes and counts only its own; an older build's unmarked cut stays under either name; a name whose staging stays under 252 bytes is swept as before at its longest; the first cut length; a multi-byte name cut on whole characters; a file named like another target's cut prefix mints its own name and neither write sweeps the other's file; the minted name read off the staging open for every name length from 200 to 255); `test/backlog3160-dead-staging-sweep.test.ts` and `test/backlog3106-writefile-staging-edges.test.ts` re-pinned to the marked shape.
|
|
117
|
+
|
|
118
|
+
### A host pipe the engine holds reads closed once and carries nothing after: a message the host delivers is dropped, a send is refused (#3236; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
119
|
+
|
|
120
|
+
- **Before.** The engine's hold of a host pipe (`McpHostSeat.open`) read as closed at the engine's close, but a message the host delivered afterwards still went on to the engine's handler and a send still went on to the host's pipe. Through an SDK client this was not reachable (the client guards a closed transport), so nothing user-visible followed.
|
|
121
|
+
- **Now.** One fact — the connection reads closed, set by the engine's close or by the host pipe's own — is read by both arms: a message delivered after it is dropped (the pipe's own earlier callback still hears it), and a send after it is refused with `McpHostSeatFailure` (delivered `no`, nothing handed on) in the sentence the request-level adapter already used for the same state, now spelled once.
|
|
122
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* the "the engine's close is immediate" contract of a host pipe, which should include "after it, nothing is forwarded or sent" without leaning on the client library's guard. *Affected:* nobody — no connected client reached either arm. *Compensation:* none needed.
|
|
123
|
+
- **Consumers.** None: engine-internal.
|
|
124
|
+
- **Pins.** `test/backlog3236-taken-pipe-closed-gate.test.ts` (open: a message and a send go through; after the engine's close: the late message does not reach the engine and a send is refused with the host's forwarded count at none; after the host's own close the same, and the engine's close then rings `onclose` once; the pipe's own callback still hears; the late answer to a request sent before the close; the taken pipe and the request-level adapter refuse in the same words).
|
|
125
|
+
|
|
126
|
+
### `FileSessionRepo.create` judges the placement tuple it writes by the form judge that reads it back, so a tuple a reader would refuse is refused at the write (#3260; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
127
|
+
|
|
128
|
+
- **Before.** `create({ placement })` took the caller's tuple as it stood, stamping only `placedAt` when it was absent. A `kind` outside the placement kinds or a `placedAt` that is no finite number was written, and every reader of the row then refused it `corrupt_session` — a row the repo could write and could not read.
|
|
129
|
+
- **Now.** The create judges the tuple before the first byte by the very judgment the readers use (#3233): `kind` a placement kind, `placedAt` a finite number, `scope` / `handle` / `rootSessionId` / `parentSessionId` each a string when there; a cell that is no tuple (`null`, a string, an array) is refused too. A tuple that fails is refused `config.invalid_argument` naming the cell (`placement.kind`, `placement.placedAt`, …) and never the value, and nothing is written, so the id stays free. Only the exit differs from the read: a read refuses the row it found, a write refuses the call it was given. The re-open path of a create over an existing id still ignores a placement argument, as before.
|
|
130
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment or store swap that writes placed rows through the File repo. *Affected:* a caller that passed a tuple of a bad form (the engine's own spawner passes kind `"subagent"`, string members, and lets the store stamp `placedAt`). *Compensation:* none — the refusal is at the call, where the bad value is.
|
|
131
|
+
- **Consumers.** @server (the File session store's users): `create` with a placement of a bad form now rejects `config.invalid_argument` instead of writing a row that reads back `corrupt_session`. @test: the black-box face is `create({ id, placement })` with `kind: "other"` or `placedAt: "5"` — the call rejects naming the cell and `placementOf(id)` stays `undefined`.
|
|
132
|
+
- **Pins.** `test/backlog3260-placement-write-judge.test.ts` W1 (good tuples written and read back as given; `placedAt` stamped when absent; zero kept) · W2 / W3 (fourteen bad forms refused `config.invalid_argument` naming the cell, nothing on disk, value never echoed) · W4 (the writer and the reader name the same cell for the same form; a form the reader accepts the writer accepts) · W5 (a refused create leaves the id free) · W6 (the re-open path ignores a placement argument) · W7 (rows without a placement unchanged).
|
|
133
|
+
|
|
134
|
+
### A listing says whether this engine resumes a parked row, and the resume refuses it with the same sentence first — `CheckpointSummary.rowVerdict`, `judgeCheckpointRow` (#3265 = #3255 S1; behavior change — the order of refusals on a row that is faulty twice; hard-breaking: one, three sentences below, open to veto; closed sets: +1 `CheckpointRowVerdict["kind"]` (`ok` / `lacking` / `damaged`); exports: +1 root function `judgeCheckpointRow`, +1 root type `CheckpointRowVerdict`; members: +1 required `CheckpointSummary.rowVerdict` (wire +1 key on every summary), +1 optional trailing parameter `verdict` on `summarizeCheckpoint`) (@server @cli @client-core @test @sdk)
|
|
135
|
+
|
|
136
|
+
- **Before.** Only the resume judged whether this engine could resume a parked row, in a pre-CAS ladder spread over the admission rung, the gate screen and the checkpoint screen; a listing judged nothing, so every pending row listed as an approvable card. An approval parked by an earlier release whose reading this release changed (the rows a 7.60.0 engine parked, read by 7.61.0) was refused `requirements_damaged` only after a person approved it, and the sentence said no worker could resume it — untrue for a row a worker of the release that parked it still reads.
|
|
137
|
+
- **Now — one judge.** `judgeCheckpointRow(cp): CheckpointRowVerdict` (root export; pure, total, the verdict frozen) holds every resume refusal the row and this engine decide alone, in one order, the specific before the general: the version ceiling; a reader word this engine lacks; the retired mode-seed members, the retired single steer seat and the retired wall-clock axis; the reader-requirement list and the row digest; the recorded mode words; the real-approval bit; the read face, the write face, the skill grants, the skill scopes, the hands' coordinates; the frozen chain's tool names; the recorded run origin; the parent-constraint chain missing on a row of v7 or later, and the row's own chain against its digest. Each moved verbatim; the halves of those rungs that read the deployment, the re-supplied configuration, the inputs or the decision stay where they were (the checkpoint screen keeps `governed_unwired`, `resume_aborted`, `env_factory_missing`, `cwd_conflicts_restore`, the renamed mounts and the parent-constraint re-supply). The resume asks it first, right after it reads the row `pending`; the screen and the resume's configuration doors no longer repeat those rungs (the doors read nothing off the row; prepare still reads the run-origin word the leg runs under). Not in the judge: the row's recorded tool ceiling and own tool lists, which the checkpoint screen still reads at the resume — a row whose list holds a tool name in a form a row never records (`Read()`, say) lists `ok` and is refused `config.tool_face_control` when the resume runs, so those two faces answer differently there.
|
|
138
|
+
- **Now — the listing carries it.** Every `CheckpointSummary` carries `rowVerdict`: `{ kind: "ok" }`, or `{ kind: "lacking" | "damaged", code, reason?, requires?, sentence }` — `lacking` exactly for `checkpoint.unsupported_version` / `version_newer` (a newer engine's row), `damaged` for every other row refusal. `code` / `reason` are the refusal the resume throws; `sentence` is a fixed sentence per (`code`, `reason`) or per configuration refusal code, and it opens the resume's `message`. The verdict holds no row content: `requires` keeps only words spelled `^[a-z][a-z_]{0,39}$`, at most eight, never the row's token. `ok` is not "the resume will run": a deployment fact (`env_factory_missing`, `governed_unwired`) or a decision fault is still told when the resume runs. A listing and a `get` judge the same bytes. The in-tree stores keep each row's verdict with the row object they hold (a replaced row is judged again); the resume never answers from that memo. A store keeping its own memo keys it by the row's bytes and the engine build, `CONTRACT_KIT_ENGINE_VERSION` — never `MAX_SUPPORTED_CHECKPOINT_VERSION`, which two releases with different readings share — and passes it as `summarizeCheckpoint(cp, disclose, verdict)`; an external store keys it by the stored blob's sha256 plus that identity. A whole-row reader (`listBySession`, an operator queue) calls `judgeCheckpointRow(row)`.
|
|
139
|
+
- **Hard-breaking — HB-1, `CheckpointSummary.rowVerdict` is required (open to veto).** *What changed:* every summary carries the row's verdict, and `CheckpointSummary` declares it required. *Who is affected:* code that builds a `CheckpointSummary` by hand instead of through `summarizeCheckpoint` — a store's own projection, a test double — fails to compile, and the store-contract kit's two `rowVerdict` cases fail a listing that drops or rewrites the member (zero hand-built summaries in this tree); a BFF that re-projects summaries through a key allow-list carries no verdict until it adds the key (nothing breaks, the user-visible face is unchanged). *How to migrate:* build every summary through `summarizeCheckpoint` (a store with a memo passes it as the third argument, keyed as above); a reader of whole rows calls `judgeCheckpointRow(row)`; render a non-`ok` row with its `sentence`, not as an answerable card (`docs/INTEGRATION-CORE.md` §5.4, "A parked row across engine upgrades").
|
|
140
|
+
- **B-1 — the damaged-content sentence.** The `requirements_damaged` refusal opens with "This engine cannot resume this checkpoint: its content does not read the way it was written — it was parked by an earlier engine release whose reading this release changed, or it was changed in storage. The checkpoint stays pending; start the task again (a worker of the release that parked it may still resume it)." The sentence "no worker can resume it" is retired; code and reason are unchanged. A downstream pin that matches the old text reddens.
|
|
141
|
+
- **B-2 — the order on a row that is faulty twice (open to veto; C-R1065 note 3, the order law).** A row refusal is now told before any decision, deployment or signal refusal and before the configuration refusals that come after the resume config is read (the config's own door — a container that is no record, a member that cannot be read, a retired or unknown key, a store seat the engine cannot accept — and a token already consumed are still told first, as before): a bad decision on a damaged row reports the row's sentence (it reported the decision's); a v7+ row whose parent-constraint chain is missing, resumed without the parent constraints, reports `constraint_chain_missing` (it reported `resume.parent_constraint_missing`); an approval row that lost its bound input hash reports `requirements_damaged` (it reported `bound_input_hash_missing`); a row with the retired wall-clock axis on a worker with no organization wired reports `checkpoint.walltime_axis_retired` (it reported `governed_unwired`). Among the row's own refusals the order is one law, the specific before the general: a row that is newer (the version ceiling, or a reader word this engine lacks) reports `version_newer` first (a newer row that also carries a retired seat was told `seat_retired` by 7.61.0, and is told `version_newer` now); then a seat or axis a release retired (`seat_retired` for a retired mode-seed member or the retired steer seat, as in 7.61.0; `walltime_axis_retired`, which 7.61.0 told after the digest); then the reader-requirement list and the row digest (`requirements_damaged`, which says only that the content does not read the way it was written); then the rest. A row that was changed after it was parked and still carries a retired seat is told the seat — what to do about it — not the digest. A row with one fault is told as before.
|
|
142
|
+
- **B-3 — the judge is total.** A row the judge cannot read (a member that throws when read, a `state` that is not an object), which the resume used to throw raw (`TypeError`), is `damaged` / `checkpoint.invalid_outcome` / `requirements_damaged` on both faces; the resume's refusal says "the row could not be read" and names what was thrown in `detail.thrownName`, never its message. A listing whose projection reads past the judge (`state: null`) still throws as before.
|
|
143
|
+
- **B-4 — the message structure.** A row refusal's `message` is its fixed sentence, then `" Diagnostic: "`, then the message the rung used to throw; `code` and `detail` are unchanged. A downstream pin that compares the whole message compares the sentence prefix instead.
|
|
144
|
+
- **B-5 — a summary is a copy.** A summary no longer hands out a reference into the stored row: its `preview` is a copy (a preview that cannot be copied is disclosed and omitted), so editing a summary no longer edits the stored row.
|
|
145
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an operator or approval surface that lists parked rows across an engine upgrade. *Affected:* see HB-1 and B-1–B-5. *Compensation:* the verdict is the answer the resume would give; nothing about the row changes.
|
|
146
|
+
- **Consumers.** @server: the approval inbox's summary allow-list adds `rowVerdict`; the SQL store's `get` refuses a row above its version column with a bare `Error` before the judge reads it — align it so a listing and a resume give one answer; a memo, if kept, is keyed by blob sha256 + `CONTRACT_KIT_ENGINE_VERSION`; `listPending`'s subtree face judges as it decides. @cli: a card is rendered by its verdict (the shell decides how). @client-core: the three kinds and the sentence enter the render model; an unknown `kind` reads as not `ok`. @test: rows minted by 7.60.0 and 7.61.0, loaded under 7.62.0, black-box on the listing and the resume. @sdk: one additive key on the summary frame.
|
|
147
|
+
- **Pins.** `test/backlog3265-row-verdict.test.ts` — P0 (a real v10 park minus its bound input hash, approved with the parked call's own binding: both faces `requirements_damaged`, the row byte-identical; with a bad decision / a bad configuration / an aborted signal the row's sentence first) · P0′ (`requires` keeps words only, never the token, at most eight) · P1 (the 7.60.0 approval rows: damaged on both faces; the v9 row's read-face arm as before) · P2 (`lacking` for a newer format, an unknown word, a newer row with a retired seat) · P3 (seventeen row-only arms: listing = resume code / reason, the sentence first) · P4 (an `ok` park resumes) · P5 (total: a throwing member, `state: null`) · P6 (the member is required: a type error, and the kit fails a listing that drops it) · P7 (a row fault before a deployment fault) · P8 (`listOverdue` = `listByScope` = the judge) · P9 (the sentences; the closed set's three words) · P10 (`ok` with a deployment refusal at the resume) · memo (judged once per stored object, a replaced row judged again, the resume judges now). Mutations M1–M11 each redden their fixture (`.gate-logs/criteria-3265-mutations.md`). Re-pinned for B-2 / B-4: `backlog959` (the reference ladder runs the row's rungs first), `backlog1285` (sentence + diagnostic), `backlog1320` (the screen helper asks the judge first; the kit's preview reads registered), `concurrent-seam-scale` and `file-cross-backend` (the summaries carry `rowVerdict`), `checkpoint-bidi-projection` (the projection reads the preview once), and the pins that call the resume's configuration doors directly (the internal `refuseResumeDoors` no longer takes the row). The order law: `test/backlog3265-fix1-judge-order.test.ts` — a retired mode-seed member, the retired steer seat and the retired wall-clock axis on a v10 row whose digest no longer matches are told as themselves on both faces · a newer row (the ceiling, an unknown reader word) is told newer ahead of all of them · every pair of faults is told the first in order · the controls (the digest fault alone, a row with no fault, each fault alone). `backlog959` is re-pinned once more: its reference ladder tells the retired wall-clock axis ahead of the requirement list.
|
|
148
|
+
|
|
149
|
+
### A workflow script that throws a value that cannot be read still ends its run with its terminal frame — the failure summary reads the thrown value member by member (#3240; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
150
|
+
|
|
151
|
+
- **Before.** A workflow run's failure summary read the script's thrown value with plain property reads (`code`, then `message`). A script that threw a value whose reads throw — a `Proxy` whose `get` trap throws, a revoked proxy, an object whose `code` or `message` getter throws — made the summary builder throw inside the run's failure callback; the callback's own safety net swallowed that, and no terminal frame was ever sent. The run itself settled `failed` (durable row, registry row), but nobody listening for its completion was told: the model's turn and a host's notifier waited on a frame that could not come. One line of script text could hold a run's observer for good.
|
|
152
|
+
- **Now.** Every member of the thrown value is read once through the engine's one guarded member read (`readMember`): a member whose read throws is an absent member. The frame is always sent — `failed`, with the fixed sentence and the resume guide, plus the code and message words when those members are readable (a readable script error `code` survives a throwing `message`; a throwing `code` leaves the fixed sentence). The failure block of the run reads the thrown `code` through the same read (the hand-written guard beside it is retired). The frame has a floor that reads nothing (failed, the fixed sentence, the record unread): what the run and the thrown value add is read after, and a read that throws leaves the floor — a getter on the thrown value is script code and can reach the run the value rides out on (a direct caller of `runWorkflow` has no other vessel for it), so it can break the settle id the frame is built from; the frame goes out either way. The registry row reads the run's settle id before the thrown value's words, for the same reason. The registry row's failure text and the durable run's text were already total (`thrownText`) and are pinned beside the frame. The frame still carries no word of the thrown value beyond what a script error code already surfaced.
|
|
153
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment that runs scripts a model wrote, where a throw is a script's own object. *Affected:* only a run whose script threw such a value — it now ends with a `failed` frame instead of none; every other thrown value reads the same bytes as before. *Compensation:* none needed.
|
|
154
|
+
- **Consumers.** @server (workflow execution face): the run lane and the durable notifier now receive the `failed` frame for a hostile-thrown run; a deployment timeout that was the only way out of that wait sees the frame first. @test: a script that throws a throwing `Proxy` / revoked proxy / throwing-getter object ends with a `failed` frame (summary: the fixed failed sentence).
|
|
155
|
+
- **Pins.** `test/backlog3240-workflow-hostile-throw.test.ts` (a real `Runner`, the `Workflow` tool and the repo's vm script runner) — a throwing proxy · a revoked proxy · every trap throwing · a symbol · a prototype-less object · throwing `code` and `message` getters · a readable message beside a throwing `code` · a readable script `code` beside a throwing `message` (and the parked sentence's message read) · a typed script error and a plain `Error` (controls: unchanged bytes) · no thrown word in the summary or diagnostics · the registry row's text and no escaping rejection · a getter that breaks the run's settle id (the floor frame is sent; the row keeps the id and nothing escapes).
|
|
156
|
+
|
|
157
|
+
### A delegation tree binds a row's owner only when it is a name or anonymous — a number, an object or an absent owner cell does not bind (#3257; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
158
|
+
|
|
159
|
+
- **Before.** `ownRowDelegationOwner` (a run nobody spawned) and `rowOwnerReading` (a revived child's own row) bound whatever `headOf` answered as `owner`: a store answering `owner: 42`, `{}` or no cell at all made that value the tree's owner, and every row created for a child recorded it. The revival reading also folded an absent cell into anonymous (`head?.owner ?? null`).
|
|
160
|
+
- **Now.** One judge of the cell (`ownerCellReading`, `src/core/runner/delegation-owner.ts`) serves both readings: a string or `null` binds as it reads; any other shape is `{ bound: false, reason }` — the delegation is refused `delegation.owner_unbound`, nothing starts and no row is created. The reason names the kind of value (`number`, `object`, `none`) and never the value. A missing row (`undefined`), a store without the by-id read and a read that throws read as before; one exception, on a revival: a store that answers `null` for a missing row (off the `SessionHead | undefined` contract) read as anonymous before and is refused now, as a row that could not be read. The seat's first answer, bound or refused, still stands for every later read.
|
|
161
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose store could answer a malformed owner cell would have written it as the owner of every child's rows. *Affected:* only a store that answers an owner that is neither a string nor `null`, or a `null` head on a revival (the bundled stores never do either; a blank string stays the stores' own read fault). *Compensation:* none needed — answer a name or `null`.
|
|
162
|
+
- **Consumers.** @server: the two SQL stores' `headOf` answer the owner column as a string or `null`; nothing to do. @cli @test: a delegation over a row with a malformed owner cell is refused `delegation.owner_unbound` (it used to proceed with the malformed value recorded).
|
|
163
|
+
- **Pins.** `test/backlog3257-owner-cell-shape.test.ts` — S1 number (the reason names the kind, never the value) · S2 object · S3 absent cell · S4 a name and the anonymous owner bind · S5 the refusal stands for later reads · S6 a foreign occupant is told as the occupant, before the cell is judged · V1 revival: number / object / none · V2 revival controls (name, anonymous, missing row, no read, no session id) · V3 a read that throws. Mutations M1–M3 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
164
|
+
|
|
165
|
+
### A refused delegation says who holds the tree's slots — task ids, addressing names, synchronous children, and how a slot comes back (#3252; text change; hard-breaking: none; closed sets: none; exports: none; members: +1 method `TaskRegistry.activeDelegationOccupants` on the exported class, its return type not a root export)
|
|
166
|
+
|
|
167
|
+
- **Before.** The concurrency refusal answered "this session tree already has N agents running — the concurrency cap (…) refuses another" and a generic "wait or stop one". A model whose tree was full of agents it had not started — an extension's `$.agent.spawn`, an earlier turn's background children — read it as its own and retried for a cause it could not see.
|
|
168
|
+
- **Now.** The sentence adds the occupants the count was taken from: each registered agent the caller can address, by its `task_id` with its addressing name, up to five (the rest counted: "N more registered"), and the children running synchronously inside calls of the tree ("N running synchronously inside a call of this tree, no task_id"). When a task id is listed the way back says so: wait for one to complete, or stop a listed one with `TaskStop` and its `task_id`, then relaunch. The pool is the tree root's, so a nested agent's refusal counts rows of other branches too; those are counted and never named, and no `TaskStop` is offered for them — the registry's access predicate (the one the agent's own tools hold) decides what is addressable. The count, the cap, the code (`delegation.concurrency_cap`) and `details` are as they were. One mint (`concurrencyOccupants`, `src/agents/subagent.ts`) serves the four spawn lanes; `TaskRegistry.activeDelegationOccupants(scope, rootSessionId, caller?)` reads the rows `activeDelegationHandles` counts, each with its name and whether `caller` reaches it (same selection, same synchronous segment). A registry without that face, or whose face throws, names nobody and the refusal stands.
|
|
169
|
+
- **Known limit.** The sentence names the occupant, not who started it: a row records the leg that spawned it, and an extension's `$.agent.spawn` runs on that leg, so the model's own spawn and the extension's read alike there. Naming the origin needs the requester recorded on the row and its durable record.
|
|
170
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a model, or its operator, reading a refusal for a tree it did not fill. *Affected:* only the text of that refusal; a consumer that matched the whole sentence rather than its code sees the longer text. *Compensation:* none needed — read `details.code`.
|
|
171
|
+
- **Consumers.** @cli @server @test: assert and route on `delegation.concurrency_cap` by code; the sentence now carries `task_id`s a front end may link to running rows; `TaskRegistry.activeDelegationOccupants` is a new method on the exported class (additive).
|
|
172
|
+
- **Pins.** `test/backlog3252-concurrency-refusal-occupants.test.ts` — R1 one registered occupant (id, name, the way back) · R2 two listed · R3 past five counted · R4 a synchronous child counted without an id, no `TaskStop` offered · R5 both kinds together · R6 a registry without the naming face · R7 the naming face reads the rows the count does, and which of them a caller reaches · R8 a naming face that throws · R9 a nested agent is told the count and nothing it cannot address · R10 the root session of the tree reaches every row. Mutations M4–M8, M13, M14 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
173
|
+
|
|
174
|
+
### The warning for a `spec.tools` entry that collides with the built-in hands band says what the dispatcher does (#3250; text change; hard-breaking: none; closed sets: none; exports: none)
|
|
175
|
+
|
|
176
|
+
- **Before.** For a colliding entry the warning said "the built-in wins (registered later; the harness tool Map is last-write-wins) and the caller tool never dispatches this task". That is true for a caller tool sharing a band tool's NAME (it is replaced and never dispatches) and false for a caller tool whose ALIAS names a band tool: the alias resolves to the built-in (a canonical name outranks an alias) but the tool stays mounted under its own name, the model reads it in its tool block and runs it by that name — which a black-box run saw as the caller's alias tool running.
|
|
177
|
+
- **Now.** The warning is built from the dispatcher's own resolver over the mounted set the leg's tool valve leaves (`toolNameIndex` over `survivorsByName`, the rule a call is resolved by; a built-in the allow / deny lists unmount contests no name, and a caller tool they unmount is not warned about either: the warning is for a caller tool and a built-in that both stay mounted) and names each entry by its form: `"Read" is replaced by the built-in "Read", which serves that name (the caller tool never dispatches)`, or `"my_read" stays mounted under its own name, but its alias "Read" serves the built-in "Read"`. Still one warning per prepare (`onError`, phase `config`). Who serves each contested name is unchanged — the built-in — so no call resolves differently; only the sentence changes.
|
|
178
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an operator reading the warning to learn which of a deployment's tools the model can still call. *Affected:* only a consumer that matched the old sentence's wording. *Compensation:* none needed.
|
|
179
|
+
- **Consumers.** @cli @server @test: the warning is the `onError` text (phase `config`) — a cell that read "never dispatches" for the alias form reads the corrected sentence now.
|
|
180
|
+
- **Pins.** `test/backlog3250-hands-collision-notice.test.ts` (a real `Runner` with an `executionEnv`) — C1 same name: replaced, the call runs the built-in · C2 alias naming a band tool: the alias serves the built-in · C3 the same alias form: the caller tool IS called by its own name and runs · C4 the old claim is gone · C5 two entries of both forms are one warning · C6 two aliases of one entry · C7 no collision is silent · C8 an alias that names no band tool is not a band collision · C9 the valve removes the built-in the alias names: no warning, the call of that name runs the caller tool · C10 the valve removes the caller tool: no warning, the built-in runs · C11 the valve leaves both: the warning stands. Mutations M9–M12, M15, M16 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
181
|
+
|
|
182
|
+
### A placement cell that is no placement tuple is refused, and a placed row whose owner cell cannot be read is still in the placed listing — `FileSessionRepo` (#3233 / #3234; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
183
|
+
|
|
184
|
+
- **Before.** A header's placement cell was passed through as it stood: `placement: "nope"` or `{ kind: 1 }` came back from `placementOf` and `open` verbatim, `placement: null` made `listPlaced` throw a `TypeError`, and a listing dropped such a row without a word. Separately, a PLACED row whose owner cell was neither a principal nor anonymous made the listings' whole-header decoding refuse, so `listPlaced` skipped it: a placed sub-agent transcript the deployment's review could neither see nor sweep.
|
|
185
|
+
- **Now — one form judge (#3233).** The header record's one read (the first-record rule every reader of the row goes through: `placementOf`, `open`, `headOf`, `exportEntries`, the listings) judges the placement cell: absent is no placement; otherwise it must be an object whose `kind` is a placement kind (`"subagent"`), whose `placedAt` is a finite number, and whose `scope`, `handle`, `rootSessionId` and `parentSessionId` are each a string when there. A tuple missing a join half stays a legal tuple (consumers still read it as `tupleIncomplete`, fail-closed); a member this reader does not know is tolerated as an additive one. Any other cell is `corrupt_session` naming the cell (`placement cell`, `placement.kind`, `placement.placedAt`, …) and never its value; a listing skips such a row and discloses it on `onCorruptRead`.
|
|
186
|
+
- **Now — the placed row with an unreadable owner (#3234).** The listings' one row reader answers such a row as what it is: `listPlaced` lists it (its tuple, or the `tupleIncomplete` variant; its age from the log's modification time, so `scope` and `olderThanMs` apply), the host `list` still leaves it out (placed rows never ride the host listing), and `onCorruptRead` is told once per listing, in one sentence that says the row is placed and its owner cell unreadable. The readers of the owner (`open`, `headOf`, `exportEntries`) still refuse the row. A row that is not placed, or whose placement cell is itself bad, is skipped and disclosed as before.
|
|
187
|
+
- **Behavior change.** A stored placement cell of a form above, which the repo used to answer as written, is now refused; and a placed row with an unreadable owner, which `listPlaced` used to omit, is now listed. The engine's own spawner writes none of the refused forms (kind `"subagent"`, string members, `placedAt` stamped by the store at creation), so only a hand-edited or damaged log is affected.
|
|
188
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose placed-row sweep or store swap enumerates placed rows. *Affected:* a damaged or hand-edited log; a joint reap that now sees an unreadable-owner placed row and tries to release it (the release reads the head first and is refused, caught, and retried next sweep, as for any release fault). *Compensation:* none — the row is reported, not repaired.
|
|
189
|
+
- **Consumers.** @server: the swap gate that enumerates placed rows now sees a placed row whose owner cell is unreadable (its release stays refused `corrupt_session`); a placement cell of a bad form is `corrupt_session` on every by-id read instead of an answer. @test: the black-box faces are `placementOf` / `open` on a cell of each bad form, and `listPlaced` / `list` over a directory with a bad-cell row and an unreadable-owner placed row (the sink's sentence is the observable).
|
|
190
|
+
- **Pins.** `test/backlog3233-placement-cell-form.test.ts` P1 (fourteen bad forms ⇒ the four by-id readers refuse naming the cell) · P2 (the value is never echoed) · P3 (good forms answered as written) · P4 (no cell ⇒ `undefined`) · P5 (both listings disclose; `null` no longer throws) · P6 (neighbours unharmed); `test/backlog3234-placed-row-owner-unreadable.test.ts` Q1 (three unreadable-owner forms ⇒ listed, disclosed as placed) · Q2 (`tupleIncomplete`) · Q3 (host `list` leaves it out, same sentence) · Q4 (scope and age filters) · Q5 (unplaced bad owner still skipped) · Q6 (healthy placed row, silent) · Q7 (the owner's readers still refuse) · Q8 (bad owner beside bad placement ⇒ skipped) · Q9 (mixed directory).
|
|
191
|
+
|
|
192
|
+
### A delegated child's rows belong to its delegation tree's owner — the engine mints the owner once and every row created for a child records it; `SessionPlacement.owner` is required (#3149, ruled C-R1016; BREAKING; behavior change; hard-breaking: three, three sentences each below, open to veto — the bundled stores' placed rows, `SessionPlacement.owner` required, a fork child's row; closed sets: none — `delegation.owner_unbound` is a new code string outside any registered set; exports: none; members: `SessionPlacement.owner` becomes required, +1 optional `RunInternals.delegationOwner`, +1 optional `ToolExecuteContext.delegationOwner`, +1 optional second parameter on the `ensureChildSessionDurable` hook) (@server @cli @test)
|
|
193
|
+
|
|
194
|
+
- **Before.** A background child's placed transcript recorded the owner its store's placing write chose: the bundled stores recorded none (`null`, whatever the tree root's owner), and a deployment's store could derive one of its own (the root's, else the parent's, else a sentinel). A fork child's row recorded the principal the run executed as. Three answers to "whose is this child's row".
|
|
195
|
+
- **Now — one owner, minted once.** The delegation tree's owner is the owner cell of the tree root's row, as the root run read it: a run nobody spawned (a top-level run, a revived child, a parked child resumed on its own) reads its OWN row once, by id through its own store's `headOf`, and takes it only while the row still holds the occupant it acquired (`incarnation` equal to the acquired session's; both absent = a row written before occupants were minted). Every run it spawns — background, foreground, fork, workflow agents and their descendants — holds the same reading by reference, so the tree binds once; deleting or re-creating the root row after that changes nothing for the tree. Every row a delegation creates for a child records that value: the placed transcript (`SessionPlacement.owner`), the fork (`SessionStore.fork(source, owner)` is called with it), and the durable row a park promotes (`ensureChildSessionDurable(id, { owner })`). A revived child creates no row: its re-open declares no placement, and a park it makes promotes its own row with the owner that row records.
|
|
196
|
+
- **Now — a tree whose owner does not bind starts nothing.** When the first read finds the row gone, or holding another occupant (the same owner name included), the child is not started and no row is created for it: the tool result is the not-started form with `details.code` = `details.error` = `delegation.owner_unbound` (new code; a read fault refuses the same way and binds nothing, so a later spawn reads again; what the read threw rides `details.cause`, never the model's text). There is no sentinel owner.
|
|
197
|
+
- **Hard breaking 1 — the bundled stores' placed rows (behavior; open to veto with 3).** *Changed:* a placed row on `TtlSessionStore` / `FileStorageBackend` records the tree owner instead of `null`; rows placed before 7.62.0 keep their `null`. *Who is hurt:* an embedder that authorizes by `headOf(id).owner` on the File lane and relied on a child's row reading anonymous (open to every principal). *How to move:* judge a child's row by the owner it records, as any owned row.
|
|
198
|
+
- **Hard breaking 2 — `SessionPlacement.owner: string | null` is required; placement obligation 7 (type + store contract; open to veto).** *Changed:* the member is required; a store that declares `placements` records exactly `placement.owner` in the row's owner cell on the placing write (never in the persisted tuple — `SessionPlacementRecord` has no owner — and never an owner of its own), and answers `headOf` for its sessions with the occupant the acquired session carries. `sessionStoreContract` judges it ("the placing write records exactly placement.owner …"). The contract sentence on `headOf` that let a store's own placing write record a principal is retired. *Who is hurt:* a store whose placing write derives an owner (the kit's new case reddens), a routing store that declares placements and forwards no `headOf`, code that builds a `SessionPlacement` literal (tsc). *How to move:* the INSERT records `placement.owner` (drop the derivation and the claim of ownerless placed rows); forward `headOf` by id the way `acquire` is routed; add `owner` to the literal.
|
|
199
|
+
- **Hard breaking 3 — a fork child's row (behavior; open to veto).** *Changed:* a fork child's row records the tree owner, no longer the principal the run executes as. *Who is hurt:* an operator or delegated principal that read a fork child's transcript through an owner gate under its own name. *How to move:* read it as the tree owner; an operator arm that admits by role is untouched.
|
|
200
|
+
- **Additive.** `ensureChildSessionDurable` receives a second argument `{ owner }`; a one-argument hook keeps compiling and working (the root witness a deployment's hook needed to derive the owner is no longer needed). `RunInternals.delegationOwner?` / `ToolExecuteContext.delegationOwner?` are the trusted seat (Runner-filled; never a `TaskSpec` key).
|
|
201
|
+
- **Known limit (P-9).** A child placed on the bundled stores before 7.62.0 recorded `null`; revived, it reads that `null` off its own row, so the children it spawns record `null` too, whatever its tree root's owner — the same reading as 7.61.0, not a regression (`docs/KNOWN-LIMITS.md` KL-3149-a).
|
|
202
|
+
- **Consumers.** @server (the store-boundary stage two, S-2667–S-2670, waits on this): the two SQL stores' placing INSERT records `placement.owner` (the root / parent / sentinel derivation and the ownerless-placed claim retire); `ForkRoutingSessionStore` forwards `headOf` by the same id routing as `acquire` (it declares placements, so obligation 7 holds it); every `SessionPlacement` literal gains `owner`; the park hook's root witness retires (record `given.owner`). Read points: the session gate's owner cell (`sessionOwnerReadable` / `ownerlessRowOpen`) now reads the tree owner on new placed rows (the ownerless placed arm keeps serving rows placed before 7.62.0 and anonymous trees); a child transcript read goes through the same gate; an owner-guarded delete still answers `false` for a placed row. @cli: the local lane's root rows are created by `acquire` and never registered, so their children keep reading `null` — no visible change. @test: black-box cells — root registered alice ⇒ `headOf(child).owner === "alice"`; anonymous root ⇒ `null`; the root row replaced (same owner name too) before the first delegation ⇒ refused `delegation.owner_unbound`, no child row; replaced after a delegation ⇒ later children still record alice; fork child under an operator principal ⇒ alice.
|
|
203
|
+
- **Pins.** `test/backlog3149-delegation-owner.test.ts` (real `Runner` over a real `FileStorageBackend`: T1 / T1′ / T1″ background child, nested background grandchild, and a background grandchild under a foreground child — all alice; T2 anonymous; T5 / T5b a run nobody spawned on a placed row named alice / `null`; HB-3 fork; R1 / R3 read points; the seat: T4a / T4a′ replaced before the first read, T4b after, row gone; the tool with an unbound tree, background and fork lanes, and a read that throws; the seat's read fault binds nothing; the type pin) · `test/backlog1468-s1-session-store-kit.test.ts` (obligation 7 mutants M7a–M7c; K6 now pins the tree owner on both bundled File lanes). Mutations M1–M11 each redden their fixture (M9: `test/backlog1796-transcript-corrupt-cause.test.ts` T2 — a revival reads no owner before its re-open stood). Re-pinned with Hard breaking 3: the #2265 b7 fork cell (`test/backlog2265-principal-name-one-judge.test.ts`: the principal, a name included, never names a fork's owner — no seat ⇒ the source's, a seat ⇒ the tree's), `agent-tool-consolidation` and `agent-fork-governance` FG2c. (`.gate-logs/criteria-3149-mutations.md`).
|
|
204
|
+
|
|
205
|
+
### A host receives, structured, what the engine says where it holds no seat — `setDefaultEngineNoticeSeat`; and a credential value the host's own declaration refused is not said a second time by the engine's intake (#3248 / #3247; behavior change; additive wire; hard-breaking: none; closed sets: none; exports: +1 root function `setDefaultEngineNoticeSeat`) (@server @cli)
|
|
206
|
+
|
|
207
|
+
- **Before.** Four places take a credential value in without a notice seat in hand — a brain's construction `apiKey` and credential headers, a model entry's credential header (the route's read), a protocol peer's answer, a directly built distiller seat's key — and `RunnerDeps.onNotice` is not reachable from any of them. A placeholder or short key there (`EMPTY`, `lm-studio`, fewer than eight characters, one character repeated) made `config.credential_not_withheld` leave the one notice throat through its seatless arm as a bare `console.warn` line, so a server that starts the engine saw loose text it could not route. And the declaration (`declareWithheldEnv`) that refused the same value had already told the host, in its refusal, that it is no credential value; the intake's said-once account did not know, and the host got the fact twice, once structured and once as loose text.
|
|
208
|
+
- **Now — one default seat.** `setDefaultEngineNoticeSeat(seat | undefined)` (root export, `(notice: EngineNotice) => void`) installs the process's default notice seat; a second call replaces it, `undefined` removes it, anything else is refused (`config.invalid_argument`) and leaves the standing seat. The one throat (`deliverEngineNotice`) reads it where a notice arrives with no seat of its own — a seat that is present always wins (the `new Runner` receipt keeps delivering to its `onNotice`), and a present non-function seat is still a loud bad wiring on `console.warn`, never a fall-through to the default. A throw or a rejected promise from the default seat is swallowed as for every seat. With none installed nothing changes: the same line on `console.warn`. The four intakes take no new parameter.
|
|
209
|
+
- **Now — one account.** `declareWithheldEnv` refusing a value as no credential (the sentence that names `values[i]`) records that value on the same per-process said-once account the intake keeps (`config.credential_not_withheld`, once per value, keyed on the judged text); the intake then does not say it again. Only the member the refusal names is recorded, and only when the refusal is the no-credential reading (a NUL or unpaired surrogate, a non-string, an empty or blank string are told as something else or not said by the intake at all). One table, one writer.
|
|
210
|
+
- **Behavior change.** With a default seat installed, EVERY notice that reaches the throat with no seat of its own goes to it instead of `console.warn` — not only this one (the seatless arm of every station: fs timeout discards, listing truncations, and the rest). Route by `code` / `noticeAudienceOf` as for any notice sink. Install it before the first construction: a line a station already printed (and ledgered once per process) is not repeated to a seat installed later.
|
|
211
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host that starts the engine and wants every engine notice as data. *Affected:* only a host that installs the seat (its seatless notices stop printing); everyone else is byte-identical. *Compensation:* none needed — the seat is the structured form of the line.
|
|
212
|
+
- **Consumers.** @server (S-2864): `setDefaultEngineNoticeSeat` is the one place to receive the line that was a bare `console.warn` at start-up (`config.credential_not_withheld`, operator audience, `detail: { reason }`, never the value); your own refusal line stands alone for a value your declaration refused, so the zero-bare-line cells you hold as expected failures turn once the seat is installed. @cli: the same seat for a CLI that wants these as data; nothing to do otherwise.
|
|
213
|
+
- **Pins.** `test/backlog3247-credential-intake-one-account.test.ts` — A1 (three refusal kinds, then a brain built on the value: nothing on the seat, nothing on the console) · A1d (another padding of a refused value is the same value) · A2 (one row per door) · A3 (a value not told is still said once) · A4 (only the named member is told) · A5 (a refusal for another reason tells nothing) · A6 (the test seam clears the account) · B1 (one row per door: the notice arrives on the default seat, the kind and never the value) · B2 (removal returns to the console line) · B3 (a seat a station holds wins) · B4 (reinstall replaces) · B5 (null / string / object refused, standing seat kept) · B6 (a throwing or rejecting seat is swallowed) · B7 (a present non-function seat stays on the console) · B8 (any seatless notice reaches the seat through the one throat) · B9 (a host's start-up end to end).
|
|
214
|
+
|
|
215
|
+
### A host lists every held queue of its process, a held card says when it expires, and a held queue's shutdown answers once its receipts are in the senders' boxes — `listPeerHeldQueues()`, `PeerHeldEntry.deadlineAt`, `PeerHeldQueueSink.receipt` answers a promise (#3244 / #3245 / #3246; server S-1370; behavior change — `PeerHeldQueue.shutdown()` waits for its receipts and may reject; hard-breaking: two, three sentences each below; closed sets: none; exports: +1 root function `listPeerHeldQueues`, +1 root type `PeerHeldQueueSnapshot`; members: +1 optional `PeerHeldEntry.deadlineAt` (wire +1 optional key on a held card)) (@server @cli @client-core @test)
|
|
216
|
+
|
|
217
|
+
- **Before.** A host review face could reach a held queue only by its three coordinates (`peerHeldQueueIfAny(scope, sessionId, box)`): the registry was private, so a host listing the held letters of all its sessions kept its own table of (session, box) pairs fed from the notices. A card carried `heldAt` but not its deadline — the timer's instant lived only in the queue, so a host had to add `dialogExpiry` to `heldAt` itself, a second reading that is wrong after a cause move or a re-bind restarts the timer. `shutdown()` settled every held card and returned while the `expired` receipts it had sent were still being written: the drain's receipt seat was fire-and-forget, so a host that closed its pool after `shutdown()` could lose a receipt and had no handle to wait on.
|
|
218
|
+
- **Now — the enumeration face (#3244).** `listPeerHeldQueues(): readonly PeerHeldQueueSnapshot[]` (root export) — every held queue of the process's registry (the queues `peerHeldQueueFor` opened, which is how every drain opens its own; a bare `createPeerHeldQueue` is not listed), as a snapshot that opens none: `{ scope, sessionId, box, size, entries }`, `entries` as `PeerHeldQueue.list()` shows them and `size` their count at the same moment. The coordinates are the ones the registry minted the queue's key from (one reading for the key and the row), so a row's `(scope, sessionId, box)` handed to `peerHeldQueueIfAny` reaches that queue for its settle face; `sessionId` is the spelling the queue was first opened with (the key folds case), `box` is the session's own box or the principal inbox it also drains. An opened queue with no card is listed with `size: 0`. The notices `peer.inbound_disposition` / `peer.held_settled` do not carry a scope: the listing is where a queue's coordinates are read.
|
|
219
|
+
- **Now — the card's deadline (#3245).** `PeerHeldEntry.deadlineAt?: number` (ms epoch) — the instant the card's review deadline expires it unless someone answers first. It is written where the deadline timer is armed and removed where the timer ends, so it is present exactly while one runs: a review cause (`PEER_HELD_REVIEW_CAUSES`) ∧ a finite `dialogExpiry` ∧ the card still `held`. A re-judgment that moves the cause out of review clears it, one that moves it into review re-arms it from that instant; an approval, a hand-over, a `never` bind, the deadline itself and the card leaving clear it; a deadline whose expiry the store refused leaves the card held with none until the next bind re-arms it. `hold()`'s input does not take it (a caller's value is never carried onto a card).
|
|
220
|
+
- **Now — shutdown waits for its receipts (#3246).** `PeerHeldQueueSink.receipt` answers `Promise<void>`: it resolves once the receipt is in the sender's box, or has no reader there, and rejects when it could not be written. `shutdown()` settles every card as before, then waits for the receipts THAT settle sent (`Promise.allSettled`): it resolves when all landed, and rejects with an `AggregateError` whose message names each seq whose receipt did not (`PeerHeldQueue.shutdown: every held card was settled, but the expired receipt of seq 3, 7 did not reach its sender's box`) and whose `errors` are the receipts' own rejections. A receipt seat that throws instead of rejecting is the same refusal. A deadline's, a re-judgment's, an eviction's and an approval's receipt is still sent without waiting, and its rejection is never left unhandled. The drain's receipt seat now answers its route's append: a write fault on the sender's box is reported on `onError` (`peer-receipt-route`, once, as before) and is the receipt's rejection; a sender whose box is retired absorbs the receipt (no reader is not a fault).
|
|
221
|
+
- **Hard-breaking — HB-1, the receipt seat's answer.** *What changed:* `PeerHeldQueueSink.receipt` is `(entry, state) => Promise<void>` (was `=> void`). *Who is affected:* a host that implements the sink itself (`configure({ sink })` of its own) — it fails to compile; zero such implementations on server, cli and client-core `origin/main` (`git grep "receipt:"` there: 21 / 19 / 26 hits, none a held-queue sink; no file names `PeerHeldQueueSink`), and the server's S-1370 face reads the engine's own drain binding. *What to do:* return the write's promise — resolve when the receipt is stored or has no reader, reject when the write failed; an implementation with nothing to wait for returns `Promise.resolve()`.
|
|
222
|
+
- **Hard-breaking — HB-2, `shutdown()` may reject.** *What changed:* `PeerHeldQueue.shutdown()` used to resolve once the cards were settled; it now resolves once their receipts landed and rejects when one did not (every card is settled either way). *Who is affected:* a host that awaits `shutdown()` of several queues in one loop and lets a rejection end the loop — the queues after it would not be shut down (the server's S-1370 face shuts its queues down that way). *What to do:* shut each queue down on its own (`Promise.allSettled` over the queues, or a `try` per queue) and read a rejection as "these senders were not told"; the cards are settled.
|
|
223
|
+
- **Consumers.** @server (S-1370): `GET /v1/approvals` can list held letters from `listPeerHeldQueues()` and retire the coordinate table fed from the notices; a `peer_inbound` row can carry the card's `deadlineAt` instead of `heldAt + dialogExpiry`; the ordered shutdown can drop its fixed waiting window — `shutdown()` answers once the receipts are in the boxes — and reads HB-2 above. @cli: an approval card for a held letter can render `deadlineAt` (absent ⇒ no deadline runs). @client-core: a projection of the held card gains the optional `deadlineAt`. @test: a review-cause hold under `dialogExpiry: 60s` lists `deadlineAt = heldAt + 60000` and expires at that instant; a setting-cause hold has none; after a host's `shutdown()` resolves, the sender's box holds the `expired` receipt with no wait.
|
|
224
|
+
- **Pins.** `test/backlog3244-3246-held-queue-host-face.test.ts` (L1 three queues — two sessions' own boxes and a principal-inbox lane — listed with coordinates, size and cards; L2 the listing opens none and hands out copies; L3 a mixed-case session id, an explicit own box and the principal lane hand back to `peerHeldQueueIfAny` / `peerHeldQueueKey`; L4 no notice carries a scope; D1 `deadlineAt = heldAt + expiry` and the card expires at that instant; D2 none for a setting cause; D3 none under `never`, armed from a later finite bind, cleared by a `never` bind; D4 cleared by an approval, absent on a card adopted as approved; D5 cleared by a cause move out of review, re-armed by a move back; D6 a refused expiry leaves none until the next bind; D7 a caller's value is not carried; S1 a slow receipt holds shutdown's answer; S2 a rejecting receipt makes it reject naming only that seq, every card settled; S3 a throwing seat the same; S4 a deadline's and a re-judgment's receipt never waited on, no unhandled rejection; S5 shutdown waits only for its own receipts; S6 the drain's own seat — the `expired` receipt is in the sender's box when shutdown resolves, a write fault rejects it naming the seq with one `onError`, a retired sender's box does not; S7 a void-returning receipt seat is a compile error). Re-pinned on the new seat type: the receipt seats of `design385-slice4-held-idle`, `design385-slice4-receiving`, `backlog972b-fix1-delivered-uninjected`, `backlog1025-peer-inbox-wake` answer a promise.
|
|
225
|
+
|
|
226
|
+
### A session log that lost a record in its middle resumes from the break and says what it lost — `session.lineage_rerooted`; a stored log that does not hold together is `corrupt_session`, and `invalid_session` is the import gate's word only (#1077; behavior change; behavior narrowing and wire-meaning narrowing — `invalid_session` no longer reaches a resume, hard-breaking: none; that narrowing is open to veto; closed sets: `EngineNoticeCode` +1 `session.lineage_rerooted`, wire-additive; `SessionErrorCode` unchanged; exports: none) (@server @cli @client-core @test)
|
|
227
|
+
|
|
228
|
+
- **Before.** The file store's replay skips a record it cannot read and counts it (#1041's partial arm), and the session opens. The run's first branch read then walked from the leaf up into the skipped record and was refused `SessionError("invalid_session", "Entry <id> not found")` — the code the import gate refuses a caller's log with. A resume of a session whose second or third line was damaged failed with no model call and nothing said which history was lost; a damaged LAST line resumed (the leaf falls back one entry). The same code answered every other stored-log fault too (a leaf or a floor the loaded log does not hold, a parent chain that loops, a checkpoint leaf a lost tail took, a compaction whose first kept entry is not on the path), so `invalid_session` read two ways: this file's 7.30.0 entry says it stays "a caller-submitted log failed validation", its 7.52.0 entry reads it as "a leaf or parent entry is missing from the log".
|
|
229
|
+
- **Now — the run re-roots, loudly.** A run reads its session through the leg's view of the storage. When a branch read breaks at a parent the log does not hold AND the replay that loaded the log dropped at least one record, the branch ends at the entry that names the missing parent: the entries that survive below the break are the conversation the run continues, and the run announces `session.lineage_rerooted` once per break per leg — `detail: { break: true, missingParentId, rootedAt, recordsDropped, recordsTotal, leaf, entriesOnPath, entriesCut, sessionId, runId }` (`break` and `leaf` are the #3237 section's, which also says the notice for a branch that did not break) (audience `user`, minted by the engine on `RunnerDeps.onNotice`; `entriesCut` = the entries the log holds that do not descend from `rootedAt`). The stop is the walk's own floor stop applied at the break (one `pathToRoot`, no second walk); `rerootIfHeadless` (a fork copy's re-root at a declared floor) is unchanged. A break the replay cannot account for — it dropped nothing, so the log was written with a parent it never held — is refused `corrupt_session` and never re-rooted. A walk outside a run (a fork, the compact verb, the store kit) has no announcement and so no re-root: a break is refused `corrupt_session`, so a damaged log is never copied into a healthy-looking child.
|
|
230
|
+
- **Now — one meaning per session word.** `not_found` = no such session, or an entry id this session never held; `corrupt_session` = the session is stored but cannot be read as one (no header its store wrote, or a tree that does not hold together); `invalid_session` = a log a caller hands in did not pass the import gate (`validateEntriesForImport`, a log transfer's staging), and nothing else among `SessionError`'s codes (`CompactionError`'s own `invalid_session` — an entry on the path with no id — is a separate closed set and is unchanged). The 7.52.0 entry's reading of `invalid_session` as "a leaf or parent entry is missing from the log" does not hold from this version. Each place that answered otherwise, its old code → its new code: the walk's missing parent (`src/engine/session/path-to-root.ts`, every `getPathToRoot` and `selectForkRows`) `invalid_session` → `corrupt_session`, the sentence naming the entry that names it and, from a store whose replay dropped records, the count (`(1 of 4 records skipped as corrupt)`); a parent chain that loops (`ParentChainGuard`: `getPathToRoot`, the resume-at scan, `settledForkOptions`, `selectForkRows`) `invalid_session` → `corrupt_session`, the sentence unchanged; a loaded log whose leaf it does not hold (the `BaseSessionStorage` constructor) `invalid_session` → `corrupt_session`; a bounded window whose floor the loaded log does not hold (the constructor) `invalid_session` → `corrupt_session`; a leaf entry a write appended naming an entry the log does not hold (`getLeafId`) `invalid_session` → `corrupt_session`, the load's sentence — the stored fact is the one a cold load of the same log refuses, and a resume's acquire reads a cached session's leaf, where a `not_found` would read as "no such session" (`resume.session_not_found`); a checkpoint cut at an entry the transcript no longer holds (the resume rewind) `invalid_session` → `corrupt_session` (its `transcript_corrupt` cause is unchanged); a compaction whose first kept entry is not on its path (`buildSessionContext`) `invalid_session` → `corrupt_session`.
|
|
231
|
+
- **Who is hurt.** A host that branches on `invalid_session` to tell "the stored log is broken" now gets `corrupt_session` for it; the import gate's 422 is untouched. A store that implements `SessionStore` and walks the parent chain itself fails the two `[tree]` kit cases (a parent missing above the floor, a looping chain) until its walk answers `corrupt_session` — a store on `BaseSessionStorage` / `pathToRoot` / `selectForkRows` answers it already. A user who resumes a damaged session gets a run on the surviving history instead of a failure, and a notice that names what was cut.
|
|
232
|
+
- **Deviation from the reference (stated; open to veto).** The reference's chain builder (CC 2.1.309) also ends at a missing parent, but first bridges to the nearest earlier record of the same chain within 5 s, and says nothing to the user. This engine bridges nothing — a dropped record's content is unknowable, a timestamp neighbour is not its parent, and a bridged history can split a tool call from its result — and announces the cut.
|
|
233
|
+
- **Consumers.** @server: the session-open fault words — `invalid_session` is no longer minted by this package on an open, a resume or a fork walk (your `UnusableArchiveWord` reading and the `local-session-window` comment that read it as "the stored log's structure is broken" now meet `corrupt_session` for that fact); `selectForkRows` in the pg / tidb fork paths refuses a missing parent and a loop `corrupt_session`; the import gate's `invalid_session` → 422 mapping is unchanged; forward `session.lineage_rerooted` to the session's user stream (audience `user`). @cli / @client-core: render `session.lineage_rerooted` — its message says which entry is missing, where the conversation continues from and how many entries were cut. @test: a damaged middle line ⇒ the resume completes with a model call and one `session.lineage_rerooted` carrying the count, never `invalid_session`; a dangling parent with no record dropped ⇒ `corrupt_session`.
|
|
234
|
+
- **Pins.** `test/backlog1077-chain-walk-reroot.test.ts` (real `FileStorageBackend` + `Runner` resumes over hand-written logs: R1 / R2 the second / third line damaged in three forms — torn, wrong shape, truncated — completes on the surviving branch with one notice and its exact detail; R3 the last line damaged: nothing re-rooted, and (#3237) the run says the replay dropped a record; R13 a second run re-roots again; R14 a side branch below the break is not counted as cut; R4 a damaged header `corrupt_session`; R5 an import of a dangling log `invalid_session`; R6 an id never held `not_found`; R7a / R7a′ / R7b / R7c the constructor and leaf refusals by their class, the file store's carrying the count; R7d a resume of a cached session whose appended leaf names an entry the log does not hold fails `corrupt_session`, never `resume.session_not_found`, and a cold reopen answers the same; R8 no resume of any damaged shape answers `invalid_session` on its terminal, `onError` or a notice, and R8′ only `import-validate.ts` and `session-log-transfer.ts` mint it in `src/`; R9 a dangling parent with nothing dropped refused, no re-root; R10 a fork below the break refused, nothing written; R11 a looping log; R12 a compaction off its path). Re-pinned on the new codes: `backlog2239-session-path-cycle`, `backlog2565-fork-row-selection`, `backlog2092-path-to-root-linear`, `engine-internals-coverage`, `backlog1796-transcript-corrupt-cause` (#1796's cells: T3's sentence; T3b: an interior entry garbled in place re-roots a parked resume instead of failing its startup); the notice catalog count in `backlog1279-child-undrained-to-parent`.
|
|
235
|
+
|
|
236
|
+
### `git show HEAD:<path>` in a project under the home names the project's file, not the home's: an object path is judged where git resolves it — relative to the repository's top, or (spelled `./` / `../`) to where git starts — not at every ancestor of the command's directory (#1726; security widening — one placement, open to veto; behavior narrowing — `-C` and `--work-tree`, open to veto; hard-breaking: none; closed sets: none; exports: none; members: +2 optional — `ExecutionEnv.receivedEnvNames`, `ReadCandidate.repositoryTop`) (@cli @server @client-core @test)
|
|
237
|
+
|
|
238
|
+
- **Before.** The read station placed the path of a `<rev>:<path>` word (`git show`, `git cat-file`, `git archive`) at every directory the command may stand in and at each of their ancestors, because the text does not say where the repository's top is. A project under the home therefore met the home's rows: `git show HEAD:.mcp.json` was refused naming `~/.mcp.json` while `cat .mcp.json` ran, and so were `HEAD:./.mcp.json` and `:0:.mcp.json`. `git -C <dir>` was not read for the object path: the path stood where the command stood.
|
|
239
|
+
- **Now.** One rule — where git resolves it (gitrevisions(7)): spelled `./` / `../` ⇒ relative to where git starts; any other spelling ⇒ relative to the repository's top. Git starts in the command's directory moved by each `-C`. The top is `--work-tree`'s value where the text names it, else the one git's discovery finds walking up from where it starts — a filesystem fact the establishment reads through the station's door (`repositoryTopOf`, `src/tools/fs/shell-read-object-path.ts`): the first directory holding a `.git` DIRECTORY that is a repository (`HEAD` naming a ref or an object id as git reads it — `ref:` and `refs/` spelled exactly, case and all, with only a space, a tab, a line feed or a carriage return between them, or an object id in hex of either case; git skips a `.git` whose `HEAD` says `REF: refs/heads/main`, `ref: REFS/heads/main` or puts a vertical tab after `ref:`, and walks on to the repository above — #3292, a security fix on the repository-top probe: `HEAD` is judged on its first 255 bytes, as git reads it, and case-sensitively; a nested `.git` git would skip no longer counts as a repository top, open to veto —, `objects/` and `refs/` directories) whose own `config` names no work tree. Nothing is narrowed — every ancestor meets the rows, as before — where the text names the repository otherwise (`--git-dir`, `--bare`), the command's environment may carry a `GIT_*` variable (bound in the text, or received from the environment that runs it: `ExecutionEnv.receivedEnvNames` below), a `-C` / `--work-tree` value is one the text does not settle, the working directory is lost, the environment is an isolated sandbox, or the probe finds anything git might walk past or that names a repository kept elsewhere (a `.git` that is a `gitdir:` file or a link — a linked work tree's, a submodule's, or the home's own git directory, whose history git then reads under the project's name —, an empty or broken `.git`, a directory that is itself a repository, a configured work tree, no repository, a lookup with no answer). A home that is itself the repository's top keeps refusing `HEAD:.mcp.json`.
|
|
240
|
+
- **New member — `ExecutionEnv.receivedEnvNames?: readonly string[]` (additive).** The names of the environment the shell child receives, never a value — the one source for "may git read a `GIT_*` variable the text does not bind" (`GIT_DIR` inherited from a `vcsh` / `yadm enter` shell or a git hook points `git show HEAD:<path>` at the home's repository). `NodeExecutionEnv` declares it live off the same merge each exec gets (as `homeDir` and `cdPath`); omitted ⇒ the adapter cannot say, any name may be there, and an object path keeps every ancestor; a value that is not a list of names is read as omitted. Any `GIT_*` name keeps every ancestor (`GIT_PAGER` too: the rule does not track which variables git reads for its repository). Residual: a per-exec `env` adding one.
|
|
241
|
+
- **Narrowing 1 — `-C`.** An object path now stands where `git -C <dir>` starts, not where the command stands: `git -C ~ show HEAD:.mcp.json` from a directory outside the home ran and is now refused by the home's row (open to veto).
|
|
242
|
+
- **Narrowing 2 — `--work-tree`.** An object path is relative to the top `--work-tree=<dir>` names: `git --work-tree=<home> show HEAD:.mcp.json` from a project outside the home ran and is now refused by the home's row (open to veto).
|
|
243
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person in a project under the home who reads a committed file of a name the home's rows guard through git. *Affected:* the two narrowed forms. *Compensation:* none for the widened form; a person who means the home's file asks for it as such.
|
|
244
|
+
- **Consumers.** @cli @test: a cell pinned to the refusal of `git show HEAD:<file>` in a project under the home now runs on a `NodeExecutionEnv` whose shell receives no `GIT_*` name; the home's own repository, a linked work tree or submodule under the home, the narrowed forms and `cat ~/<file>` stay refused. @server @client-core: an adapter of your own keeps the reading it had (every ancestor) until it declares `receivedEnvNames`; an `ExecutionEnv` the station reads through answers a few more lookups per object path (`fileInfo` of `.git`, `HEAD`, `objects`, `refs`, `config`; `readTextFile` of `HEAD` / `config` up to 64 KiB); a lookup with no answer leaves the command `unanswered`, as any lookup does. Known limits: `KL-1726-a` (linked work trees and submodules), `KL-1726-b` (undeclared adapters), `KL-1726-c` (a substitution's absolute `-C` — closed in this release by #3235).
|
|
245
|
+
- **Pins.** `test/backlog1726-object-path-repository-top.test.ts` (each layout checked against what the real `git show` prints there: a project under the home at its top and from a subdirectory, `./`, `:0:`, `:`, `cat-file`, git listed and unlisted; outside the home; the home as the top, from below it and from a project with no repository; the home inside a larger repository; `-C` to another repository, `-C ~` from outside, relative and chained `-C`; a lost working directory; `--git-dir`, `--bare`, `GIT_*`, `--work-tree`; an empty `.git/`, a garbage `HEAD`, a `HEAD` git does not read (`REF:`, `REFS/`, a vertical tab or a form feed after `ref:`) and three it does (a tab and a space after `ref:`, an object id in upper and in lower case), a dangling `.git` link, a configured work tree, a linked work tree's `.git` file, a `gitdir:` file and a `.git` link naming the home's git directory, the inside of a `.git`, a bare repository with the home as its work tree, a working directory reached through a link; a `GIT_DIR` the shell receives, an adapter that declares no names or a malformed list, one that declares none received; `git grep` with no operand and with a pathspec).
|
|
246
|
+
|
|
247
|
+
### A slow or silent store of the person's permission rules holds the first model request once, not twice — the first request's tool table stands on the prepare read, and a request after a read the store left silent stands on that read (#3249; behavior change — wait time, and the first request's tool table stands on the prepare read (#3272); hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
248
|
+
|
|
249
|
+
- **Before (7.61.0).** The run's prepare read of the person's persisted rules and the first request's tool-table read (#3126) ran one after the other, each bounded by the reader's 14 s bound: a store answering every read in 3 s held the first model request 6 s (7.60.0: 3 s); a store that never answers held it two bounds (≈ 28 s), and two requests with a tool call between them were two bounds apart (the call's read, then the next request's own).
|
|
250
|
+
- **Now.** A request's tool table reads the store when the request is sent (a read asked earlier — a call's, a visibility probe's — may predate a rule a tool wrote, which binds the next request as in 7.61.0), except where an earlier read stands for it and asks the store nothing new: the prepare read, for the first request while no read has started after it; and the newest read asked since the previous request that the store left unanswered past its bound, while no read started after it has been answered — its verdict is the failure law's, the one a new read of the silent store would give. A read still pending is not joined. Readings on a virtual clock: a 3 s store — the first request at 3 s (7.61.0: 6 s); a store that never answers — the first request at one bound (7.61.0: two), the next request one bound after it, the tool call's own read (7.61.0: two).
|
|
251
|
+
- **Unchanged.** Every call takes a read of its own, pinned to its attempt; a visibility probe takes one; the failure law (a partition that could not be read lends the deny and ask rows of its last successful read, none of its allow rows), the run's one `permission.rule_store_unavailable` notice and the bound's value are as they were. Two requests with a tool call between them still read a store that answers twice (the call's read, then the next request's): a 3 s store, 6 s.
|
|
252
|
+
- **One consequence (KL-3272-a, #3272).** A whole-tool deny row written after the prepare read and before the first request (one a hook writes, say) is not in that request's tool table, because the request stands on the prepare read; in 7.61.0 the request read anew and saw it. The next request's table has it, and the call itself, which reads for itself, is still refused. So the model may be shown a tool for one request that the person's deny rows already refuse. Tracked as #3272 (7.63.0).
|
|
253
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person whose rule store is slow or unreachable — the first answer comes one store latency (or one bound) sooner. *Affected:* no call's decision changes (every call reads for itself); the first request's tool table can lack a whole-tool deny row written just before it (the consequence above); a silent store is said to be unreadable once per read asked, so a run's trace carries fewer such lines. *Compensation:* none needed.
|
|
254
|
+
- **Consumers.** @cli @server: user-visible wait — a rule store that never answers holds the first model request ≤ 14 s (was ≈ 28 s) and each later request ≤ 14 s beyond its tool calls' own reads; nothing to change in code. One more thing a black box can see (#3272): a deny row written between the prepare read and the first request is in the second request's tool table, not the first's. @test: re-check the first-request cell — ≤ 15 s against a store that never answers (was 28.02–28.04 s); a 3 s store's first request ≈ 3 s (was 6.05 s); in the two-request run the second request comes one bound after the first.
|
|
255
|
+
- **Pins.** `test/backlog3249-rule-store-one-bound.test.ts` (a real Runner, its store and every wait of 1–60 s on a virtual clock: F1–F4 the first request, H1 the clock's own control, B1–B3 two requests with a tool call between them, C1–C3 the judgments unchanged, R1–R8 the reader's request read); `test/backlog1293b-person-path-rows.test.ts` read numbering and `test/backlog3126-deny-tools-out-of-table.test.ts` ⑤d count re-pinned (the prepare read is the first request's).
|
|
256
|
+
|
|
257
|
+
### A run that continues a session whose log lost records says so whether or not the branch broke — `session.lineage_rerooted` with `break: false`, and `SessionStorage.getReplayLoss` (#3237; behavior change; wire-additive — `detail.break` and `detail.leaf` on the #1077 notice, a second form of it; hard-breaking: none; closed sets: none — no new code; exports: none; members: +1 optional `SessionStorage.getReplayLoss`) (@cli @client-core @server @test)
|
|
258
|
+
|
|
259
|
+
- **Before.** The #1077 notice (`session.lineage_rerooted`) was said only when a branch read met a parent the log did not hold. A log whose replay dropped records and whose surviving branch was whole resumed in silence: the log's last records unreadable (its head falls back to the last one still readable — a model shown `one` of a conversation of `one two three`), the middle and the last together, or damage off the branch. The person's latest turns were gone from the context and nothing said so.
|
|
260
|
+
- **Now.** The leg asks the storage it continues what the replay that loaded the log dropped — `SessionStorage.getReplayLoss(): { dropped, total } | undefined`, a new optional member (`BaseSessionStorage` answers it; the file store's storage carries its replay's tally, fixed at the load) — at the run's first branch read, and `dropped > 0` is one `session.lineage_rerooted` a leg (the acquire may read again after a lost write race and keeps one attempt: what the attempts found is said once the attempt that holds is known, so a discarded attempt's branch is never described). One code, two forms told apart by `detail.break`: `false` — the branch is whole: `detail: { break: false, recordsDropped, recordsTotal, leaf, entriesOnPath, sessionId, runId }`, `leaf` the entry the first branch read started from — the head, at every call site in this tree (`null` when nothing of the log is readable), and the message says the run continues from there and that what the unreadable records said, possibly its latest turns, is not in its context; `true` — the branch broke, as in the #1077 section, with `break` and `leaf` added to its members; a leg whose branch broke says that one notice and no whole-branch notice besides, as far as the acquire's own reads go (KL-3237-a: a whole-branch notice already said is not withdrawn if a later read from another leaf finds a break, which would give that leg two notices; every branch read after the acquire in this tree starts from the head, so no instance is built — inferred from the call sites). Counts and entry ids only, never a record's words. The log is not repaired by the run, so every leg over it says it again (the #1077 rule, now for both forms).
|
|
261
|
+
- **Unchanged.** A log whose replay dropped nothing says nothing; a break the replay cannot account for is refused `corrupt_session`; the count's sentence (`N of M records skipped as corrupt`); an unterminated crash tail is not a record and is not counted (the replay's rule).
|
|
262
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person who resumes a session whose file lost its latest records. *Affected:* a front end that renders this code's notices shows one more line per such resume (audience `user`); a consumer that read the #1077 notice's `detail` as always carrying `missingParentId` now branches on `detail.break` first. *Compensation:* none needed; a store of rows read whole has no replay to lose from and need not implement the member.
|
|
263
|
+
- **Consumers.** @cli @client-core: render `session.lineage_rerooted` for both forms — `detail.break` says which members are there (`missingParentId`, `rootedAt`, `entriesCut` only when `true`); the message is complete as it stands. @server: forward it to the session's user stream as the #1077 notice (audience `user`); a SQL store of yours that skips rows it cannot read may answer `getReplayLoss`. @test: a log with its last records damaged ⇒ the resume completes on the surviving turns with one `session.lineage_rerooted`, `detail.break: false`, the count and the head; a healthy log ⇒ none.
|
|
264
|
+
- **Pins.** `test/backlog3237-replay-dropped-notice.test.ts` (a real `Runner` over the file backend: D1 the second and third of three messages damaged in three forms, written by the real repo ⇒ one notice, count 2, head = the first message · D2 only the last damaged · D3 only a middle one (the break form: one notice, `break: true`) · D4 a middle and the last under a surviving child ⇒ one notice · D5 a healthy log, two legs ⇒ none · D6 nothing readable ⇒ no head · D7 no record's words in the notice · D8 each leg says it again · D9 the wire face · S1 / S2 the storage's account · V1 the finding is the read's own, a head that moves under the read does not suppress it · V2 the seat's dedup · L1 the leg holds an attempt's findings until the acquire settles · D10 / D11 a lost write race in the acquire (whole then broken, broken then whole) says the branch that holds, once); `test/backlog1077-chain-walk-reroot.test.ts` R1's detail (`break: true`, `leaf`) and R3 (the last line damaged now says so).
|
|
265
|
+
|
|
266
|
+
### A `cd` inside a subshell, a pipeline member or an uncalled function no longer moves the command, and an array element the shell binds is never an environment value — the read boundary and the removal guard read where bash stands, and a `case` arm's command is read where its pattern really ends (#1082, with #3269; behavior change, relaxing by form and narrowing by form (security: #3269); the refusal says how a deny row was met; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
267
|
+
|
|
268
|
+
- **Before.** The working-directory walk read a move inside a `( … )` group, a non-last pipeline member, a background job or an uncalled function body as a move of the whole command (KL-1554-a), so a relative read after it was also judged where the move went: `(cd && ls >/dev/null); cat .npmrc` was refused by the home's `.npmrc` row though bash reads the project's `.npmrc`; `(cd /); rm -rf ./usr` was a `dangerous_delete`. A subscripted element assignment (`a[0]=~/.npmrc`) was a deny candidate of its own, while a compound one (`a=(~/.npmrc)`) was not — one fact, two readings: `a[0]=~/.npmrc; cat ~/other.txt` was refused, `a=(~/.npmrc); cat ~/other.txt` asked.
|
|
269
|
+
- **Now — one visibility rule.** A move reaches a later segment exactly where a binding of the same segment would (the binding thread's rule): a move in a subshell group, a non-last pipeline member, a background job or a function body is no move outside it; the walk holds again what it held before it. The places such a scope went stay on the deny floor of a walk that later loses track (a call of the body, `source`, a text the walk does not follow), so `f(){ cd; }; f; cat .npmrc` and `f(){ cd; }; echo "$(f; cat .npmrc)"` are still refused. The last member of a pipeline may run in this shell (`lastpipe`): its move stays a candidate. A scope closes only where its own group or body does: a segment of closing words alone (`fi`, `esac`, `}`, a loop's `done)`), a function definition nested in the body (`f(){ cd userhome; g(){ :; }; cat .npmrc; }; f`) and a `case` arm's `)` leave the move standing. A `case` command's own words are read once, across the text's segments, for both the block structure and the argv projection: `case` at command position, its subject, `in` (a newline may stand before it), then each pattern — an optional `(` of its own, alternatives joined by `|`, ending at its first `)` whatever follows (`(cd userhome; case x in x) (true);; esac; cat .npmrc)`, `(cd userhome; case x in x|y) ;; esac; cat .npmrc)`) — and an arm ends at `;;` / `;&` / `;;&` or `esac`. The operands of a conditional `[[ … ]]`, an arithmetic command `(( … ))` and an extended glob `@( … )` are read once too, across the segments an `&&` / `||` / `|` inside them splits: no word there is a reserved word and no parenthesis a group's (`[[ x == x || case == in ]]`, `[[ x || } ]]`, `(( 1 || 0 ))`, `[[ x == @(a|b) ]]` close or open nothing). The old same-segment guess (a `)` a word follows ends a pattern) is retired, with the per-segment arithmetic and extended-glob skips.
|
|
270
|
+
- **Now — one predicate for array elements.** A compound value and a subscripted name (`a[k]=v`, `declare a[k]=v`) store array elements: where the shell itself binds them (an assignment statement) never an environment candidate (bash never exports an array — an element assigned to an inherited exported name makes it an array, gone from every child's environment), always the element floor a later `${a[k]}` / `${a[@]}` read meets. `a[0]=~/.npmrc; cat "${a[0]}"` is refused as before, now through the element floor. A word the shell may hand on keeps its candidate as before: a prefix `a[0]=~/.npmrc prog` (bash 3.2 puts `a[0]=<home>/.npmrc` in the program's environment; 5.x refuses the word and runs the program), a launcher's operand (`env a[0]=~/.npmrc prog`) and a declaration builtin's operand (`declare a[0]=~/.npmrc`: the name may be a function, which receives the word — `declare(){ cat "${1#*=}"; }; declare a[0]=~/.npmrc` reads the deny row on both bash versions) are still refused; the declaration builtin's element also leaves the element floor. A scalar statement assignment keeps its deny candidate (an inherited exported name stays exported): `A=~/.npmrc; cat ~/other.txt` is still refused.
|
|
271
|
+
- **Now — the refusal names how the row was met.** A deny refusal reached through a home word spelled with the declared home ends "The word was judged as spelled with the environment's declared home: …"; one reached through the floor of a move the command does not settle ends "The working directory at this word is not settled — …". A refusal of a word as the command places it is unchanged.
|
|
272
|
+
- **Behavior change — relaxing, by form (bash 3.2.57 / 5.3.15 in an isolated tree read the project's file or nothing):** refused → asked: `(cd && ls); cat .npmrc`, `(cd userhome && ls); cat .npmrc`, `(cd); cat .npmrc`, `cd | true; cat .npmrc`, `f() { cd; }; cat .npmrc`, `(pushd ~); cat .npmrc`, `(cd userhome; case x in x) ;; esac); cat .npmrc`, `f(){ g(){ cd userhome; }; cat .npmrc; }; f` (the nested body is never called), `a[0]=~/.npmrc; cat ~/other.txt` (the out-of-root read of `other.txt` is the ask); `a[0]=~/.npmrc; echo done` vouches on the read face. The removal guard reads the same walk: `(cd /); rm -rf ./usr`, `cd / | true; rm -rf ./usr`, `f(){ cd /; }; rm -rf ./usr` are judged as `rm -rf ./usr`.
|
|
273
|
+
- **Behavior change — narrowing (the removal guard):** a subscripted element now leaves the element floor a compound one always left, so `D[0]=/; rm -rf "$D"` and `declare D[0]=/; rm -rf "${D[@]}"` (bash removes `/`) are `dangerous_delete` instead of `unverifiable_delete`, as `D=(/); rm -rf "$D"` already was.
|
|
274
|
+
- **Behavior change — narrowing (a group's or an arm's command the old pattern guess hid, #3269):** the same-segment guess read a `)` with no word after it as a group's and one with a word after it as a pattern's, wherever it stood, so a command went unread: a `case` arm's command behind a group, a redirection or a newline before `in` (`case a in a) (cat ~/.npmrc);; esac`, `case a in a) 2>/dev/null cat ~/.npmrc;; esac`, `case a` ⏎ `in a) (cat ~/.npmrc);; esac`), and — with no `case` at all — a group a reserved word follows (`{ (cat ~/.npmrc) }`, `if (cat ~/.npmrc) then :; fi`, `while (cat ~/.npmrc) do break; done`). On stage-7620 1ca4d7b9f the read face vouched for all six and the default seat asked once (an answered yes printed the deny row; bash 3.2 / 5.3 read it); they are refused.
|
|
275
|
+
- **Behavior change — narrowing (a loop that loses track):** a loop whose first beat loses track of the working directory (`source`, a `cd -` with no settled previous directory, a bare `cd` the walk cannot follow) no longer keeps its body's reads placed where the first beat stood — a later beat runs where the loss left the shell, so the body's words are judged against the loss's floor, as an uncountable loop's body already was. `(for i in 1 2; do cat .npmrc; cd userhome; done); true` (bash reads the home's `.npmrc` on the second beat) was asked and is refused.
|
|
276
|
+
- **Still refused, by design (KL-994l, rewritten form by form):** the return move of `cd; cd - ; cat .npmrc`, `cd; cd "$OLDPWD"; …`, `pushd ~; popd; …` may fail like every move, so the home stays a candidate (open to veto: bash reads the project's file, so the home stays a candidate where bash would not need it; the reference appears to refuse these forms by its own deny rows too — an inference from its directory-candidate walk (`cKt`, `cli309.js:263950`), not run on the reference; D-1082-a); a prefix or a statement that rebinds HOME (`HOME=<x> bash -c 'cat ~/.npmrc'`, `HOME=<x>; cat ~/.npmrc`, its glob / traversal / symlink / `..` forms); a literal tilde (KL-1100a); `~+` / `~-` / `~user`, which the plan does not expand. KL-994l's old sentence "pushd / popd destinations do not enter the deny floor" was untrue and is withdrawn; KL-1554-a is closed.
|
|
277
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a user whose `( … )` / pipeline / function-definition text was refused or flagged dangerous where bash never left the project. *Affected:* a host or test that pinned those refusals (they now ask or pass). *Compensation:* none needed — every form bash really reads a deny row through is refused as before (the controls in the pin).
|
|
278
|
+
- **Consumers.** @cli: the refusal text gains one closing sentence on the shadow and floor arms (no code changes: `read_path_denied`). @test: please re-run the 21 home-shadow forms (bt1-core `core1082-still-red-forms`, fal1103 H25 / H12 / H13) — H10 / H22 now M; H09 / H16 / H25 R by design (KL-994l ①); H12 / H13 documented (KL-994l ④); and the six forms of #3269 (refused now; one approvable ask before). @server: no wire change; the removal guard's answers for the three KL-1554-a forms relax; a `case` arm's command and a group a reserved word follows are read now (#3269: a text that asked may be refused). @cli: the same — a refusal where such a text asked before (`read_path_denied`, no new code).
|
|
279
|
+
- **Pins.** `test/backlog1082-shell-read-shadow.test.ts` — the 21 forms and 48 scope / case-arm / operand / array-element / control forms on the real Runner lane (one letter column per tree: `B1082_COLUMN=base` re-reads stage-7620 1ca4d7b9f), 42 `/bin/bash` ground-truth cells in an isolated tree, the export behaviour of an element assignment (bound, and a prefix handed on), the two refusal sentences, the plan's scope, closing-word, nested-definition, case-arm and element cells, the removal guard's element floor, lost-scope floor, loop beat, nested definition and case arm, the read face on disk. Mutations, red cells per fixture (`.gate-logs/criteria-1082-mutations.md`, M1 – M20): every rule above reds a cell written for it. Re-expressed (old → new meaning): `test/backlog1554-where-the-command-stands.test.ts` — the four KL-1554-a removal cells (dangerous → the unmoved control's answer), `(cd /); cat ./x` (`/` and the start → the start), the two uncalled `eval`-defined bodies (`..` too → the start alone). The equivalence allow-lists: `program-read-model-equivalence.allowed.json` (192 entries gain `1082-case-words-one-reader`, 15 removed — their reading equals the baseline again) and `program-read-model-equivalence-1102c.allowed.json` (191 entries gain `1082-case-words-one-reader/write/{tighter,looser,same standing}` — 165 / 8 / 18 —, 16 removed); every moved entry is a corpus text bash does not parse (a `)` a plain word follows), and the new reading keeps the words the old guess dropped.
|
|
280
|
+
|
|
281
|
+
### The sentence of a nested durable pause names the entry that continues it — `resumeCascade` for a cascade, `resumeWithVerification` for a verification gate (#3276 = #3253 S1; text change; hard-breaking: none; closed sets: none; exports: none)
|
|
282
|
+
|
|
283
|
+
- **Before.** When a cascade rung or a verification gate's leg durably paused, the failed terminal (`unexpected.suspended` / `unexpected.needs_review`, the pause on `nestedPause`) said that durable suspend / resume and plan / dry-run review are "only supported at the top-level runTask". That was false for both: `resumeCascade` continues a parked rung from its card and `resumeWithVerification` continues a gate's leg. Five restatements repeated it (the mint's module header, `TerminalCause.failed.code` / `nestedPause`, the `TaskStatus` doc, INTEGRATION-CORE, the service guide) and `TaskSpec.durableApproval`'s doc said it a sixth time; three of the five also said the repair loop, a workflow and a subagent map the pause too — they do not (the repair loop hands the paused terminal back as it is, a workflow parks the run, a subagent reports `suspended.awaiting_approval`).
|
|
284
|
+
- **Now.** One mint, `mapNestedSuspend(result, resume)` (`src/agents/suspend-guard.ts`), takes the entry from its caller, and the sentence is one template: "…once the pause is decided, continue it with `resumeCascade` | `resumeWithVerification`, handing it this pause's token (`nestedPause.token`) and the decision…". A cascade also says where the parked leg comes from: the card's `CheckpointState.compositionLeg` when the task spec named a session; when it named none and the caller handed the run no leg through `internals`, the card records none (a known limit), and the sentence says the caller supplies the leg itself — `{ entry: "cascade", leg: <the result's finalRung>, hostSessionId: <a session of its own> }` is what `resumeCascade` takes. The mint's header is the one place that says which orchestrators map and how the pause continues; the other places point at it. `CascadeRunResult.cascadeOutcome`'s doc lists the four ways `"exhausted"` happens.
|
|
285
|
+
- **Unchanged.** The code, the `nestedPause` seat and its token, `cascadeOutcome: "exhausted"`, `finalRung`, `attempts[].errorCode`, the held session. Nothing is added to or removed from the exported surface (`mapNestedSuspend` is internal).
|
|
286
|
+
- **Behavior change — B-1.** `failed.message` on both codes is a different sentence. A consumer that matched the old words breaks; one that branches on `code` / `nestedPause` does not.
|
|
287
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host or an operator that read the old sentence and concluded a nested pause could only be resumed from a top-level run. *Affected:* only a consumer that matched the sentence. *Compensation:* none needed — branch on `code` and `nestedPause`.
|
|
288
|
+
- **Consumers.** @test: the cascade-park black-box cell that matched "only supported at the top-level runTask" (core761a G4.d) now reads `resumeCascade`, and `resumeWithVerification` for a gate. @cli @client-core: a front end that renders `failed.message` of these two codes shows the new sentence; nothing to change.
|
|
289
|
+
- **Pins.** `test/backlog3276-nested-suspend-sentence.test.ts` — P1 a cascade with a host session (the sentence; code, `nestedPause` and `cascadeOutcome` as before; `resumeCascade` continues the rung) · P2 a cascade without one (the "supply it yourself" clause; resuming that way works) · P2c a resumed rung that parks again (the supplied leg is now the card's first record, so the sentence points at the card) · P2b a cascade without a session but handed a leg through `internals` (the card records that leg, so the sentence points at the card; supplying another host is refused) · P3–P5 the gate's three stops (implementation leg, resumed leg, fix round; each continued through `resumeWithVerification`) · P6 one template · P7 the leg clause comes from the argument alone · P8 what the mapping keeps · P9–P11 the five places point at the mint and carry no retired phrase, the header names who does not map, exactly the cascade and the gate call the mint; `test/suspend-guard.test.ts` re-pinned on the new sentence.
|
|
290
|
+
|
|
291
|
+
### The closed set of approval card words gains `computer-access` and `computer-control`, the two consent cards of a tool that hands the model the user's screen; what either grants is per connection (#3282; additive wire; hard-breaking: type-level — `ToolApprovalCard` gains two members, so a consumer's `Record<ToolApprovalCard, …>` or exhaustive `switch` needs two keys, three sentences below; closed sets: +2 `TOOL_APPROVAL_CARDS` (10 → 12), +2 rows of `APPROVAL_CARD_REQUIRED_KEYS`; exports: none) (@client-core @computer-use @cli @server @test)
|
|
292
|
+
|
|
293
|
+
- **Before.** `TOOL_APPROVAL_CARDS` held ten words. A tool that asks the person to let the model use their screen had no word of its own: it asked under `generic`, so a shell had no way to pre-select its two consent dialogs, and a declaration of any other word was refused at the door with `config.tool_face_invalid`.
|
|
294
|
+
- **Now.** `computer-access` (the consent to use a named set of applications; the call carries `apps`, the list asked for) and `computer-control` (the consent to take the screen over; the call carries no member the card needs) are members of the set, with their rows in the required-keys table (`["apps"]` / `[]`). Neither is reserved: a caller tool or an MCP server's `toolFaces` overlay may declare either, on a schema that carries what the card needs (`computer-access` on a schema without `apps` is refused by the same judge as any other card). The word reaches the ask, the parked gate and the pending row through the one stamp, as every other word does, and it decides nothing: a parked row with either word reads the gate kind's deadline facet, never a question's. No existing word, row or answer moves, and nothing mints either word until a tool declares it.
|
|
295
|
+
- **Closed set +2, three sentences (open to veto).** *What changed:* `TOOL_APPROVAL_CARDS` gains `computer-access` and `computer-control` (10 → 12), and `APPROVAL_CARD_REQUIRED_KEYS` gains `["apps"]` and `[]`; both names follow the object-action kebab form of the ten (`file-edit`, `notebook-edit`). *Who is affected:* @client-core @cli @server @test — a reader that enumerates the card words, or that validates an ask, roster or checkpoint frame against the ten-word list, reads two more; a consumer's own `Record<ToolApprovalCard, …>` or exhaustive `switch` needs the two keys. An engine older than this version refuses a declaration of either word at the door (`config.tool_face_invalid`, the prepare fails), so a deployment declares them to an engine at this version or later. *Compensation:* none needed beyond the rows. `TOOL_APPROVAL_CARDS` is not registered in `docs/CLOSED-SETS.md` today — an existing bookkeeping gap this change does not widen.
|
|
296
|
+
- **Lifetime: per connection.** The card word adds no expiry of its own, and the engine's part is the connection's lifetime. What a person grants on either card is meant to last as long as the MCP connection the call was made on; that the grant follows the connection is the screen tool's (computer-use's) behavior, which this engine neither holds nor checks. The legs of one run tree share a connection and it closes when the last holder lets go (`release` and `close` of `src/core/mcp-connection-pool.ts`; a leg's materialization `dispose` releases its lease and closes the pool it owns, `src/core/mcp.ts:2501-2509`): ordinarily the end of the run that dialled it, but a background sub-agent still using it holds it, and the grant on it, open past that end (`test/backlog1433b-pool-background.test.ts`). A later run dials its own connection and asks again, a new card. `docs/sdk/04-tools-and-mcp.md`, "Approval card words", states it once. Not "valid for the session".
|
|
297
|
+
- **Claude Code 2.1.309.** No card-word layer to copy (a card is a shell component there); the required members agree with its tools: `request_access` takes `apps: string[]` (`cli309.js:279294`) and `request_full_control` takes no member (`:279298`). Its description of `request_full_control` says "for THIS SESSION" (`:279298`); this engine's consent is the connection's, which ends with its last holder, ordinarily the run (the pool's lifetime, `src/core/mcp-connection-pool.ts`): a divergence in the lifetime sentence only, open to veto.
|
|
298
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* the client that renders the screen tool's two dialogs by word instead of by tool name or server name. *Affected:* only a deployment that declares either word; nothing else reads a different answer. *Compensation:* none.
|
|
299
|
+
- **Consumers.** @client-core: regenerate the card-word table from ten words to twelve (read the word from the ask, never from a tool name). @computer-use: declare `renderHints.approvalCard` as `computer-access` on `request_access` and `computer-control` on `request_full_control` (the final names), to an engine at this version or later. @cli @server: the closed set is `TOOL_APPROVAL_CARDS`; a mixed-version fleet declares the words only to engines that carry them. @test: the G-CU skeleton can pin both words and the per-connection lifetime (a grant ends with the connection's last holder, not with the run when a background sub-agent still holds it).
|
|
300
|
+
- **Pins.** `test/backlog3282-computer-card-words.test.ts` (the set holds both words and the screen admits exactly them, other spellings and non-strings are no card; the required-keys rows and the key set equal to the closed set; neither word reserved; the overlay door over `apps` present, absent and empty, the schema-free reader, a reserved word and an unknown word; a real Runner over a real stdio MCP server — each tool asks under its card, an undeclared one under `generic`, an unknown word fails the prepare with `config.tool_face_invalid`; a real Runner over a caller tool; a parked `human` / `irreversible_ask` row with either word reads the gate kind's facet and is no question; the connection a pool lends is closed by its last holder's release and a pool's `close` leaves a held one open; the doc block states the lifetime once, by connection and last holder, with no session word).
|
|
301
|
+
|
|
302
|
+
### A resume's server lists are the deployment's current ones: the contract says so, and a parked call whose server was removed is refused, never dialed (#3242, ruled C-R1068 option A, open to veto; contract sentence; behavior change: none; hard-breaking: none; closed sets: none; exports: none; wire: none)
|
|
303
|
+
|
|
304
|
+
- **Before.** `ResumeTaskConfig`'s contract told the caller to re-supply "the same `TaskSpec` it ran with", and the admission note called the config's MCP / A2A entries "the frozen ones the doors judged". Both read as "replay the parked run's server lists". A host that did so — rebuilding the resume config from its record of the parked run — re-dialed a server its user had since removed (`sema mcp remove`) and ran the parked call on it.
|
|
305
|
+
- **Now.** The sentence says what the engine does. The checkpoint records no tool implementation, hand band or server list. The caller supplies the deployment's CURRENT `tools`, `mcp`, `a2a` and `skills` specs (the row keeps the names of the skills in force and their frozen grants and scopes — `state.skillGrants`, `state.skillScopes`). The resumed leg dials the `mcp` / `a2a` entries the resume hands, as the config doors judge them (a deployment-locked list in their place); an absent list declares none. The parked call is judged against what the resume mounts: a server the resume no longer declares ⇒ `resume.tool_unavailable` (that server never dialed, the call not run, the checkpoint reopened `pending`; a deny still resolves it); a replacement wearing the tool's name ⇒ `resume.tool_contract_mismatch`; a moved face or declaration ⇒ `resume.target_moved`, as before. Identity is kept: a contradicting `principal` is refused (`resume.principal_mismatch`), an absent one inherits the row's. The admission note (`ResumeAdmissionResult.config`) now says its MCP / A2A lists are "the doors' judged copies of THIS resume's (the row records none)". `docs/INTEGRATION-CORE.md` §4.1 says the same.
|
|
306
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a user who removes an MCP server or A2A peer while a call to it is parked. *Affected:* nobody in the engine (no code path changed). A host that replays the parked run's lists keeps re-dialing removed servers until it sends the current ones. *Compensation:* none needed; the refusal word is the existing one.
|
|
307
|
+
- **Known limit.** The same server name redefined to another command or URL, serving a tool with the same contract and face, runs the parked call on the new definition: the configuration in force decides, keyed by name, as in the reference.
|
|
308
|
+
- **Consumers.** @server (S-2883): the resume route sends the request's current `mcpServers` into `ResumeTaskConfig.mcp` (and its A2A peers into `a2a`), not the parked leg's lists. The refusal is the existing `resume.tool_unavailable`; no new code joins the closed set. @cli (L-2232): a resume request carries the current server lists. @test: black box — park an MCP call, remove the server, resume with the current lists ⇒ `resume.tool_unavailable`, the server never started again, the call not run, the row `pending`; a deny resolves it.
|
|
309
|
+
- **Pins.** `test/backlog3242-resume-mcp-current-config.test.ts` (real Runner, real stdio MCP servers and a real HTTP A2A peer, every start and call counted outside the engine). R1: server removed from the resume's `mcp` ⇒ never started on the resume, call not run, row `pending`, `resume.tool_unavailable`. R2: no `mcp` handed ⇒ no server started. R3: same server still declared ⇒ runs once (control). R4: A2A peer removed ⇒ its card never fetched on the resume, nothing sent. R5: A2A control. R6: a parked caller tool, `mcp` emptied ⇒ unaffected. R7: same name redefined ⇒ runs on the handed definition. R8: deny ⇒ resolves, server never started. Mutations (`.gate-logs/criteria-3242-mutations.md`): the resume dials the parked leg's MCP list instead of its own ⇒ R1 / R2 / R6 / R7 / R8 red; the same for A2A ⇒ R4 red; the session station takes an unmounted tool as a match ⇒ R1 / R2 / R4 red.
|
|
310
|
+
|
|
311
|
+
no-notes: #3079(named only by a merge header inside the car-1726-colon-form branch: the ticket shipped in 7.61.0 and nothing for it changes here), #3215(named only by a merge header inside the car-1726-colon-form branch: the ticket shipped in 7.61.0 and nothing for it changes here), #9(not a ticket: a number quoted in a merge-commit subject), #956(named by a #3275 commit only: the two start spellings of the shell-read start module reach the one path prelude through the existing anchor step `anchorSpelling` instead of joining a path themselves; no behavior beyond #3275, the prelude pin unchanged), #1498(named by a #3275 commit only: the launcher-base-move pins re-pinned to the #3275 reading, a text an `env -C /` launch hands a shell is judged at `/`; told in the #3275 section; one test file)
|
|
312
|
+
|
|
313
|
+
## 7.61.0 — 2026-10-30
|
|
314
|
+
|
|
315
|
+
### A placed row whose owner cell is damaged still says it is placed — `FileSessionRepo.placementOf` reads the placement cell by its own reader (#3215; behavior change)
|
|
316
|
+
|
|
317
|
+
- **Before.** `placementOf(id)` decoded the row's whole header and answered from it, so a placed sub-agent transcript whose owner cell was neither a principal nor anonymous made the probe throw `corrupt_session` — the same refusal the owner's readers give. A host store over the repo that falls back to "an ordinary row" when the probe throws would take the placed transcript for an ordinary one, and a whole-store swap could then replace a sub-agent's archive (the case a deployment's review disclosed).
|
|
318
|
+
- **Now.** The placement tuple has its own reader: the probe takes the tuple from the row's header record and decodes no other cell. A placed row with an unreadable owner cell answers its tuple; an unplaced one answers `undefined` (its tuple is not there). The readers of the owner — `open`, `headOf`, `exportEntries`, the listings — still refuse that row `corrupt_session` (an owner cell that is neither a principal nor anonymous is never read as anonymous), and a log that does not open with its header record is refused by the probe as by every reader. The header's first-record rule is one function now, shared by the whole-header decoding and the probe.
|
|
319
|
+
- **Behavior change.** For a row whose owner cell cannot be read, `placementOf` used to reject `corrupt_session` and now answers (the tuple, or `undefined`). `TtlSessionStore` over a `FileSessionRepo` is unaffected: its cold release and its owner-guarded delete read the row's head before they read its placement, and the head read refuses the row first, so a release of such a row is still refused and the row stays.
|
|
320
|
+
- **Consumers.** @server: S-2789 — the probe's answer for a row with an unreadable owner cell is its placement (or none), so a store that falls back to "ordinary row" only when the probe rejects no longer takes such a placed row for an ordinary one; a probe that rejects now means the header record cannot be read at all. @test: pins P2, P2b, P4 and P8 are the black-box faces (owner cell number / blank string / object / array / boolean).
|
|
321
|
+
- **Pins.** `test/backlog3215-placement-own-reader.test.ts` P2 (five unreadable owner forms on a placed row: the probe answers the tuple, `open` / `headOf` / `exportEntries` refuse) · P2b (no tuple ⇒ `undefined`) · P4 (a log with no header record ⇒ `corrupt_session`, as `open`) · P8 (the store's cold release of such a row is still refused and the row stays).
|
|
322
|
+
|
|
323
|
+
### The File session repo's placement probe reads the row's header, not its transcript — `FileSessionRepo.placementOf` (#3079; performance)
|
|
324
|
+
|
|
325
|
+
- **Before.** `FileSessionRepo.placementOf(id)` answered one cell of the row's header by replaying the whole session log. A host that consults the probe on every execution-seat read or write, every warm-cache admission, every release and every sweep paid one more read of the transcript per call, growing with the conversation.
|
|
326
|
+
- **Now.** The probe reads the row's first record through the one descriptor read the row's other header-only readers take (`headOf`, the listings): one read block (64 KiB) whatever the log's size. The answers are the ones it gave: `undefined` for no file or an unplaced row, the tuple for a placed one, `corrupt_session` for a log that does not open with its header record. `listPlaced` was already header-only (one header read per row) and stays.
|
|
327
|
+
- **Also changed (not breaking).** The probe no longer reports an interior corrupt line through `onCorruptRead` (it reads none: a replay — `open`, `exportEntries` — still says them), and the `corrupt_session` it gives for a log with no header record does not word a count of skipped records (it reads no others).
|
|
328
|
+
- **Consumers.** @server: the per-call consults of the probe (execution-seat read / write, warm-cache admission, the swap gate, the reap) cost one header read now; nothing to change. @test: the byte count of a probe over a ≥ 1 MB placed log is one block, and the replay of the same file reads it whole.
|
|
329
|
+
- **Pins.** `test/backlog3079-placement-probe-reads.test.ts` P1 (a ≥ 1 MB placed log: ≤ 64 KiB read, no whole-file read; the replay reads the file whole) · P3 (absence) · P5 (the answer equals a restart's replay on seven header shapes) · P6 (`listPlaced` over a ≥ 1 MB placed log: no log read whole) · P7 (the probe discloses nothing a replay owns).
|
|
330
|
+
|
|
331
|
+
### A verifier's own paused card says it is one — `compositionLeg.entry: "verify"` — and `Runner.voidVerifierPause(token)` voids it and unpins the verifier session (#3183 / #3224 / #3225; server S-2657; behavior change; behavior narrowing — an `entry` outside the closed set is refused, open to veto; hard-breaking: type-level — `CompositionLeg.entry` gains a member, three sentences below; closed sets: `CompositionLeg.entry` +1 `verify`, `CheckpointError.code` +1 `checkpoint.void_unpin_failed`; exports: none; members: +1 method `Runner.voidVerifierPause`, +1 optional `VerificationOutcome.verifierPause.checkpointId` (and on the `onVerifierPause` info; wire +1 optional key)) (@server @cli @client-core @test)
|
|
332
|
+
|
|
333
|
+
- **Before.** A verification gate's verifier runs in a session the gate mints. When it durably paused, its card recorded nothing about which composition it belonged to, so a host's pending table could not tell it from a background child's park (both are cards in a session the host's run does not own), a decision presented through the host's own resume chain was refused, and the card waited for the deadline reaper. `VerificationOutcome.verifierPause` carried the token, the gate, the status and the session, but not the card's non-secret `checkpointId`, so a host could not name the card where the token must not travel. The pause's documentation said to "cancel" it, and there was no verb: an expiry through the store left the verifier session pinned — the pin is released only when a resumed run ends.
|
|
334
|
+
- **Now.** The verifier leg is handed its composition identity — `{ entry: "verify", leg: <the round>, hostSessionId: <the implementation's session> }` — and the suspend mint stamps it on the card (`CheckpointState.compositionLeg`), the same seat and the same mint a cascade rung's card uses; a re-park after a resume keeps it. A host reads that member to judge the card: a `verify` card is a verifier's own pause. The pause carries `checkpointId` when the card has one. `Runner.voidVerifierPause(token)` reads the same member and voids only a `verify` card: the row ends `expired` — exactly what an expiry leaves on it, with the in-Runner settle's duty (the paused env this process holds destroyed, its parked-constraint entry evicted; the resume preflight's terminal arm and this verb share that one statement) — and then the verifier session is unpinned, the end state a resumed run's terminal leaves. Unpinned, not released: the transcript stays the session store's to evict. It answers `true` when it voided the card and `false` when another settler already had (nothing is touched then), and refuses a card that records no leg or another entry's (`resume.composition_mismatch`, the row untouched). `CompositionLeg.entry` is a closed set read in one place: a word outside it is refused with `config.invalid_argument` (`detail.field: "compositionLeg.entry"`) wherever the identity is read — a leg handed it, a resume handed it, a row recording it — instead of being stamped on a card.
|
|
335
|
+
- **Hard-breaking, three sentences.** *What*: `CompositionLeg.entry` was the one word `"cascade"`; it is now `"cascade" | "verify"`. *Who*: a host that switches over `entry` exhaustively, or narrows a card's leg to a cascade leg by its type (server's pending table and resume routing, client-core's projection, cli's card readers). *Compensation*: add the `verify` arm — route such a card to `Runner.voidVerifierPause` or to a plain `runner.resume` by its token, never to `resumeCascade` (which already refuses a non-cascade leg, `config.cascade_invalid`).
|
|
336
|
+
- **Consumers.** @server: the S-2657 transition arm (7.141.0, MIGRATION item 31) that voids the verifier card at settlement through the store's `expire` retires on arrival and is replaced by `Runner.voidVerifierPause(token)` — the same CAS, plus the session unpin and the paused-env destroy; no double reading stays behind. Its pending-table readings key on `compositionLeg.entry === "verify"` rather than on the pause's session. The held-park origin (a failed run's own card) keeps the store's `expire`: that card is in the run's own session and is not a verifier's. The credential seal is unchanged. @test: two black-box cells — a verifier's pause and a background child's park in one pending table are told apart by the card, and a voided verifier card is `expired` at once (no longer a 409 waiting thirty days for the reaper).
|
|
337
|
+
- **Also changed (not breaking).** The Runner's same-Runner settle claims are held per attempt (`src/core/runner/local-claims.ts`): an actor that loses its CAS closes only its own claim. Before, a loser cleared the token's one mark while the winner was still on its way to its duty, so a stream `destroy()` that lost its own expire next retired the paused-env record and nobody destroyed the env — reachable with two concurrent voids of one card, a void beside a resume, or two resumes. Now the winner finds the record and destroys the env once.
|
|
338
|
+
- **An expired row's paused env is destroyed by the Runner that holds it, whoever expired the row (behavior change).** The duty an expired row carries in a Runner — evict the token's parked-constraint entry, take its paused-env reap record, destroy the env (bounded) — is now keyed on the row, not on who won the expire: `expired` is terminal, and the reap record is the ownership token, so the env is destroyed once by whoever takes it. Before, only the CAS winner of THIS Runner destroyed; when another Runner (or the deployment reaper) expired the row, this Runner's stream `destroy()` and its own `voidVerifierPause` lost their CAS and left the env alive for good. Now a settle that loses its CAS reads the row and runs the same duty when it is `expired` (the void still answers `false` — it did not void the card), and so does a resume of this Runner that finds the row already expired — refused at its first read, or losing its CAS to the expire (`checkpoint.already_resolved` either way; the duty runs before the refusal); a row a resume resolved keeps its env. A losing stream reap retires the record only when the row was settled away from this Runner (resolved elsewhere, or gone) and no same-Runner claim was open at the loss or after the read; a row that reads `pending` (a resume failed and reopened it) keeps it for the next settle. The stream-side reap's destroy is bounded like the other settles'.
|
|
339
|
+
- **A failed unpin after a void is loud (behavior change).** When the card is voided but releasing the verifier session's pin throws or does not settle within the teardown bound, `voidVerifierPause` says it on `onError` and throws `CheckpointError` `checkpoint.void_unpin_failed` (the row IS expired and the env duty ran; the session stays pinned until it is unpinned). Before, it answered `true` and the failure reached only `onError`. The code joins the `CheckpointError.code` closed set (+1, wire-visible). @server: a caller that branches on the void's answer adds this code — the card is settled, the pin is the one thing left. @cli: a reader of the `CheckpointError` code set adds the member. @test: two black-box cells — a card voided by another Runner leaves no paused env behind once the holder settles it (its own void or its stream's `destroy()`), and a void whose unpin fails rejects with this code while the card reads `expired`.
|
|
340
|
+
- **Pins.** `test/backlog3183-verifier-pause-identity.test.ts` (⑭ another Runner voids this Runner's card ⇒ the holder's own void or stream reap destroys its env once; ⑭′ the same, then the holder resumes ⇒ `already_resolved` and the env destroyed once; ⑭″ the void lands between the holder's resume read and its CAS ⇒ the same; ⑭‴ the holder's env answers its `destroy` probe by throwing ⇒ the refusal keeps `already_resolved` and onError hears the failure once; ⑮ an unpin that throws or wedges ⇒ `checkpoint.void_unpin_failed`, onError once, the row expired; `test/design380-o2-resume-preflight.test.ts` ⑯ a losing stream reap whose row read overlaps a local resume that fails and reopens keeps the record, and the later terminal expiry destroys once; real lanes: the card records `{ verify, round, implementation session }` in the verifier's own session, round 2 after a fix leg, and through `runWithVerification`; `checkpointId` on the pause and the callback; only the verifier leg carries it — the fix leg forwards the caller's object, a caller's own identity never rides a verifier leg, and an implementation result with no session id mints none; a verifier card and a background child's park in one store read `verify` / absent and the verb takes the first and refuses the second; the verb voids, unpins once, answers `false` the second time and the token is spent; a voided twin and an expired twin change the same member (`status`) and refuse a later resume alike; the verb and the preflight's terminal arm each destroy their twin's paused env once, the verb alone unpins; a legacy or another entry's card is refused and stays pending; the resumed terminal still unpins; a contradicting live identity is refused pre-CAS and a plain resume's re-park keeps the identity; an out-of-set `entry` is refused on a leg, on a resume and on a row; a void whose expire answers late, beside a losing void and a losing stream reap, still destroys the paused env once).
|
|
341
|
+
|
|
342
|
+
### Who asked about a call, and why, is a member of the approval request — `AskRequest.askReasons` — and the write gate's advisory suffix is gone (#3203; #3077 merged in; hard-breaking; exports: +1 root type `HookQuestionCause`, +1 root closed set `HOOK_QUESTION_CAUSES`)
|
|
343
|
+
|
|
344
|
+
- **Before.** A card's reason came from `AskRequest.message`, one sentence holding two kinds of text: an asker's own words (a deployment policy's ask sentence, a hook's or an extension's reason) and sentences the engine composes about a call from facts that already ride typed members. Who asked was named only inside that sentence (`asked by extension "<name>"`), so a surface could not render or filter askers without parsing text; a hook whose host could not read its verdict could say so only as prose in its answer's `message`; and every fs-write gate ask on an environment with no `writeFileGuarded` ended with ` (advisory adjudication: this environment provides no guarded write, so approval is judged before a separate, non-atomic write step)` — a fact of the environment that no person answering one card can act on.
|
|
345
|
+
- **Now.** One seat, `askReasons?: readonly AskReason[]`, on `AskRequest` and on the parked `tool_approval` row — one value, minted once and carried to both. An entry is one asker and its own words: `{ by, words }` for a policy chain's ask (`by` = the `AskOrigin` the ask's own members name, read where the ask is received), `{ by: "hook", registration?, cause, words? }` for a hook's or an extension's ask (`words` only when `cause` is `asked`). Entries join in fold order (the standing ask's first, then the one folded over it). A sentence the engine composes about a call whose fact rides a typed member is no entry: the write gate's default question (`approve write to "<path>"?`) and the plan mode's two sentences are recorded by the engine as its generic question and mint none while their text is unchanged — a layer that puts its own words over them gets an entry. Nobody states the seat: a policy result or a hook answer that hands `askReasons` is denied at the receipt (the gate writes it after a policy answers). `message` keeps its bytes everywhere (the classifier's input, the model's refusal sentences, the extension projections), except that the advisory suffix is gone. `AskCarry` (the park closure's structural seat, the thirteenth argument of `suspendAsk`) gains one optional member, `askReasons`, the same value the request carries, which the closure copies onto the row; its other members are unchanged.
|
|
346
|
+
- **Hard-breaking — the advisory suffix is retired.** *What changed:* no fs-write gate ask carries ` (advisory adjudication: …)` (the default question, the no-resolvable-target ask and the unresolvable-real-target ask); every other byte of those sentences is as it was (`requireGuardedWrite` still refuses such writes outright). *Who is affected:* code that matches the whole `message` of a write ask on an environment without `writeFileGuarded`; a matcher on the `approve write to "` prefix is not. *What to do:* drop the suffix from the expected text.
|
|
347
|
+
- **Hard-breaking — `message` is re-read.** *What changed:* `AskRequest.message` is the text for a reader that renders no seat (the model's refusal, the classifier, an extension's projection, a plain-text approver), each mint point's own sentence — not "the sentence on the card"; a structured approval surface renders `askReasons` and the typed members beside it and does not render `message`. The wire shape is unchanged. *Who is affected:* a surface whose reason line shows `message`. *What to do:* render the entries of `askReasons` (its `by`, a hook's `registration` and `cause`, the `words`) as the reason line; keep relaying `message` for plain-text consumers.
|
|
348
|
+
- **Hard-breaking (additive) — a hook answer may state why it asks.** *What changed:* a hook result's `ask` arm may carry `questionCause` — `asked` / `verdict_unreadable` / `verdict_unfinished` (`HOOK_QUESTION_CAUSES`, root export); on the two `verdict_*` words the answer's `message` is the host's account and no entry carries it; a word outside the set, or the member on another arm, is denied at the receipt. *Who is affected:* a hook host that asks because it could not read or finish a hook's verdict. *What to do:* state the cause instead of writing it as prose; an answer without the member still reads as `asked` with its `message` as the hook's words.
|
|
349
|
+
- **Hard-breaking — the write gate's `defaultAsk` callback is handed the call (#3203, open to veto).** *What changed:* `FsWriteGatePolicyOptions.defaultAsk` is `(path, note, call: ToolCallRequest) => PermissionResult` (was `(path, note)`): the gate hands its callback the call it answers, so a sentence the callback mints can carry the engine's record for that call (the plan mode's generic question). *Who is affected:* only code that calls `opts.defaultAsk` itself — the engine is its one caller; an implementation written with two parameters still compiles (zero hits for `defaultAsk` on server, cli and client-core main). *What to do:* nothing for an implementation; an implementation may take the third argument or ignore it.
|
|
350
|
+
- **Also.** #3077 (a structured "who asked" member for hook and extension asks) is merged in: the member is the hook entry's `by` / `registration`, minted at the two places the sentence was, and the sentence is derived from the entry (`extensionQuestionText`), so it is no second source.
|
|
351
|
+
- **Consumers.** @server: the run's approval frames relay `askReasons` beside `message` (the parked row carries the same value); the three places it mints a hook ask for an unreadable or unfinished verdict state `questionCause` instead of prose. @client-core: the reason line reads `askReasons`, not `message`; the path fallback from the `approve write to "` prefix is untouched. @cli: renders what the package renders. @test: the advisory suffix is gone from write asks on an environment without guarded writes; the reason line's source moved.
|
|
352
|
+
- **Known (stated).** The engine's own sentences outside the generic-question record (a tool mark's, an allow layer's shadow, a classifier's no-ruling) mint no entry and are read from their typed members; engine stations that ask in their own name are a later change (#3204).
|
|
353
|
+
- **Pins.** `test/backlog3203-ask-reasons.test.ts` 1–12, 10b and the receipt / fold pins (a real Runner: the plain write card, a hook's ask with and without a reason, the two `verdict_*` causes, a cause outside the set, a deployment policy and a classic `PreToolUse` ask folded, a composer stating the seat, the parked row against the live card, the inherited lane's ancestor sentence, a tighten that replaces an allow, the classifier's input unchanged, a policy and a `tool.check` ask).
|
|
354
|
+
|
|
355
|
+
### A store's constructor options take the options it reads and nothing else — one door, one table per options interface; a retention policy and the session store's hooks pass the same door (#3201, #3186 slice 1; hard-breaking: three groups, open to veto; closed sets: none; exports: none) (@server @cli @client-core @test)
|
|
356
|
+
|
|
357
|
+
- **Before.** Twenty store constructors took an options bag, and none of them judged its keys: fifteen received it by the receipt law, five read the caller's bag directly (`InMemorySessionPolicyStore`, `InMemoryFileHistoryStore`, `FileWorkflowRunStore`, `MemoryRosterStore`, and `FileDurableRulePartitionProvider`'s third argument). A misspelled key built the store with that option's default, silently: `new FileMailboxStore(root, { fsynk: false })` fsyncs, a misspelled `maxTotalChars` leaves the tool-result store unbounded, `holderIsCurrent` leaves the checkpoint store without its holder fence, `onCorruptRead` leaves the disclosure seat unwired, `maxEntries` leaves the roster unbounded, and a misspelled `dataRoot` built a rule provider with no root-freeze gate. The retention policy (#3180) and the TTL store's hooks each kept a hand-written key check of their own; the retention one judged the caller's live bag and then read its knobs through the bag's prototype chain (#3130's two readings).
|
|
358
|
+
- **Now.** One primitive, `receiveMembers` (`src/core/own-property-receipt.ts`): the bag is received by the receipt law (a plain object, every own member read once off its own descriptor), every own string key of the copy must be in the door's table — enumerable or not, the names the receipt reads — every name — a symbol's too — is judged before any getter runs (#3202; this slice judged the string names on the copy), and ONE refusal (`config.invalid_argument`) names every stray key with its nearest taken name within two edits (`"fsynk" (did you mean "fsync"?)`) and the keys the door takes. A constructor's table is `optionKeys<T>()({ … })`, locked to its options interface both ways at compile time (a key missing, a key extra — fresh, through a variable, a spread, or a union whose arms each carry one — and a table of another interface do not compile; an interface with an index signature has no table), and `receiveOptions(given, owner, keys)` takes nothing else. The copy a door hands back is frozen: what was judged is what the store holds, and a callback the store calls on it (its `this`) cannot change a member. All twenty store constructors pass that door. `FileStorageBackend` receives its nested records — `checkpoint`, `fileHistory`, `sessionPolicy`, and the retention policy inside `fileHistory` (its keys and its value) — with their own tables before it resolves, locks or creates anything, and builds its stores from those copies (the caller's records are read once); `fileHistory` and `sessionPolicy` take no `onCorruptRead` (the backend's one sink). The retention reading (`reap`, `reapDurableAgents`, the file-history retention door) and the hooks door are calls of the same primitive: the two hand-written key checks are gone. The nearest-name reading is a leaf now (`src/core/closest-name.ts`; the skill grant and the agent-name refusal read it from there).
|
|
359
|
+
- **Hard-breaking — group 1, a stray option is refused.** *What changed:* the twenty store constructors, and `FileStorageBackend`'s `checkpoint` / `fileHistory` / `sessionPolicy` records, refuse a key their options interface does not name — `config.invalid_argument`, the sentence naming every stray key, the constructor (`FileStorageBackendOptions.<member>` for a nested record) and its table, with a near miss named. A file store and the backend refuse before any directory, lock or file exists. A misspelled `dataRoot` for `FileDurableRulePartitionProvider` is refused instead of building a provider without its root gate. *Who:* a host that passes a misspelled, retired or foreign key (a wider object spread in, a fixture cast with `as never`). *Migrate:* remove or correct the key; there is no engine switch — a new host on an older engine is refused loudly, which is the point.
|
|
360
|
+
- **Hard-breaking — group 2, a retention policy is received by the receipt law.** *What changed:* a `reap` / `reapDurableAgents` policy and a file-history `retention` policy that is a Proxy or has another prototype (a class instance, `Object.create(…)`) is refused whole (`config.invalid_argument`) — a bound it would inherit is no longer read (#3180's "an inherited bound is taken" is reversed); a non-enumerable own knob is read; a knob whose getter throws is the receipt's refusal (`config.invalid_argument`, its thrown value not quoted — it was `config.retention_policy_invalid` quoting it). A stray knob keeps `config.retention_policy_invalid`, in the primitive's sentence (`"maxAge" (did you mean "maxAgeMs"?) is not a retention knob it takes — the retention knobs it takes are "maxAgeMs"; …`), and so does every bad value. The joint reap's `now` is read off the same copy as its knobs. *Who:* a host that passes a class instance or an `Object.create(…)` object as a retention policy, or keys on the old sentence. *Migrate:* pass a plain object.
|
|
361
|
+
- **Hard-breaking — group 3, the in-memory roster holds its copy (a legal option's behavior changes, outside the key gate).** *What changed:* `MemoryRosterStore` held the caller's options bag and read `maxEntries`, `onNotifyError` and `onEvicted` from it on every write; it now holds the copy read at construction, as `FileRosterStore` already did. Changing the bag after construction changes nothing the store does. Every door's copy is frozen besides: the two rosters are the stores that hold their copy and call a callback as a method of it (`onEvicted`, whose `this` is the copy), and that callback can no longer write a member (setting `this.maxEntries = -1` emptied the next write's roster; `FileRosterStore`'s copy was open to that too). *Who:* a host that builds a `MemoryRosterStore` and then edits the same bag to retune it (none found at the server construction points; inferred none elsewhere), and a callback that writes to its `this` (it now meets a frozen object — a `TypeError` in strict code). *Migrate:* build a new store to change a bound or a sink; keep a callback's state outside its `this`.
|
|
362
|
+
- **Codes.** `config.invalid_argument` is the receipt's (the bag's shape: Proxy, prototype, a getter that throws, a stray option); `config.retention_policy_invalid` stays the retention family's (a stray retention knob, a bad bound) — the two never answer the same question.
|
|
363
|
+
- **Consumers.** @server: the literal construction points of the bundled stores name only keys in their tables (no change expected); your `reap` policies are literals (no change); a roster bag edited after construction no longer retunes it; a fixture that hands a store a key it does not take is refused now. @cli / @client-core: no direct construction point (cc). @test: black-box cells — a misspelled store option is refused at construction, naming the near miss; a retention policy built with `Object.create` is refused whole; a `FileStorageBackend` with a misspelled nested option leaves its root uncreated.
|
|
364
|
+
- **Known (stated), closed in this release by #3211 / #3209 / #3210 (the next entry).** KL-3201-a: the gate judges whether a key is in the table, not whether the constructor reads it — `FileStorageBackendOptions.checkpoint.sessionHeadOf` is a key of that table, and the backend always replaces it with its own session store's head read (the file session repo has one), so a host's value is accepted and unused; the same record's `onCorruptRead` is replaced when the backend has its own sink. KL-3201-b: `FileStorageBackendOptions.sessions` (the hooks face) is received by the TTL store, after the backend has taken its lock and created `sessions/`: a misspelled hook there is refused late (the lock is handed back) — the face is called with itself as `this`, so the backend cannot read a copy of it ahead without changing what a hook sees. KL-3201-c: the backend judges its nested records' keys ahead, and the file-history retention's value; the other nested values (`sessionPolicy.mountedToolNames`'s names, `checkpoint.compactEvery` / `fsync`) are judged by the store constructors after the root is locked — a bad nested value is refused late (the lock and the stores built so far are released).
|
|
365
|
+
- **Pins.** `test/backlog3186-store-options-gate.test.ts` P1–P11 (every door refuses a stray key and leaves its root uncreated; every key of every table constructs; near misses; prototype / null prototype / own `__proto__`; non-enumerable and symbol members, a getter deleting the symbol; the retention bag; the roster's key-then-value order; the twins; the backend's nested records before its root exists; an AST census of every options-bag constructor under `src/`; the roster's held copy, and a callback on it that cannot change it), `test/backlog3186-option-keys-exact.test.ts` P12 (the table's compile cells, a union table and an index-signature interface among them), `test/backlog2847-store-options-door.test.ts` (#2847's four hostile bags at all twenty doors), `test/backlog3180-retention-unknown-knob.test.ts` U6 reversed, `test/backlog3179-reap-reads-bound-once.test.ts` R3 and `test/backlog3148-write-faces.test.ts` (the receipt's code for a throwing knob).
|
|
366
|
+
|
|
367
|
+
### Every hand-written unknown-key gate the slice names is one judgment now — thirteen seats, the memory-engine seats and four store-family function bags refuse a stray key by one law, each in its own words; the File stores' ledger tuning has one reader; the backend judges its session hooks and its nested values before it creates anything (#3202, #3186 slice 2, with #3209 / #3210 / #3211; ruled C-R1041 D6; behavior narrowing, open to veto; hard-breaking: two groups, three sentences each below, open to veto; closed sets: none; exports: none) (@server @cli @client-core @test)
|
|
368
|
+
|
|
369
|
+
- **Before.** Thirteen seats each spelled their own "is this key one I take?" over a caller's record — `declareWithheldEnv`'s table, the session log transfer's three records, `RunnerDeps.hostFloor`, a `toolFaces` face, the peer seat's answer, `RunnerDeps.autoMode.denialLimit`, a `contextSettings` overlay, a clamp record handed in, a user attachment (and its `lines`), `TaskSpec.outputStyle`, a host-supplied MCP transport, `TaskSpec.limits` and the `TaskSpec` itself (K6). They read different key sets — `Object.keys` (enumerable string keys only) at most, a key holding `undefined` read as absent at two (the clamp record, the host transport) — and five of them judged the caller's live object and read its values off it afterwards. The memory-engine seats (`MemoryEngine` and its `consolidation` record, `FileMemoryEngineBackend`, the sub-agent retain ledger) and four store-family function bags (`adoptFilePermissionRuleStore`, `effectivePermissionRules`, `reanchorMemoryStoreRoot`, `enqueueMemoryAnnouncement`) had no key judgment at all: a misspelled option ran with its default. The four File stores with a ledger (`FileCheckpointStore`, `FileMailboxStore`, `FileBackgroundAgentStore`, `FileWorkflowRunStore`) each read `compactEvery` with `?? <default>` and `fsync` with `!== false` and judged neither: `compactEvery: "abc"` or `NaN` built a store whose ledger never compacts, `0` or `-1` one that rewrites its ledger at every event, and `fsync: "no"` fsynced. `FileStorageBackend` judged its `sessions` hooks, `sessionPolicy.mountedToolNames` and `checkpoint`'s tuning only after it had locked its root (KL-3201-b / -c), and took `checkpoint.sessionHeadOf` / `onCorruptRead` although it always supplied its own (KL-3201-a).
|
|
370
|
+
- **Now.** One name judgment, three layers (`src/core/own-property-receipt.ts`): `strayMembersOf` (names only — a reader of a live object asks it: K6, the limits record, the peer answer, a clamp record), `refuseStrayMembers` (the receipt's admission, then names; throws — the backend's hooks face, judged and handed on uncopied because a hook runs with the face as its `this`), `receiveMembers` (that, then the receipt's frozen copy — every door that reads values reads them off the copy). Every own string key, enumerable or not, and every symbol key is a name, taken from one look at the object's own keys; a key holding `undefined` is a key; an inherited key is no own key; and on an own record the caller hands in directly, every door judges the names before any getter runs (slice 1 judged the string names on the copy, after the getters: a stray key's getter no longer runs; the `TaskSpec` read looks at its names before it reads a member) — except the three seats that judge a declaration receipt's copy (`RunnerDeps.hostFloor`, a `toolFaces` face, a host-supplied MCP transport; KL-3202-a below, until #3222). A stray name is shown as caller text — one line, at most 80 characters of it. Each seat keeps its own code and sentence: the judgment hands its refusal the stray names. The memory-engine seats and the four function bags take the receipt's door with a table (`config.invalid_argument`, the stray names, the nearest taken name, the table). A File store's ledger tuning has one reader (`src/stores/file/ledger-tuning.ts`): `compactEvery` a whole number of events of at least 1, `fsync` a boolean, absent ⇒ the store's default; the four store doors and the backend's pre-check read it, nothing else does. The backend runs, before it resolves, locks or creates anything: its nested records' keys (slice 1), the checkpoint tuning's values, the session-rules store's `mountedToolNames` judge (the store is built from the judged set), and the `sessions` hooks' names. `FileStorageBackendOptions.checkpoint` takes `fsync`, `compactEvery` and `holderIsCurrent` — the options the backend does not supply itself; its type and its table say the same. The hand-written gates left in `src/` are counted, file by file, by an AST census pin that only goes down (103 rows, each with its class: 35 of the same class this slice did not reach, 26 decoders of the engine's own bytes, 41 that are no gate, the primitive itself).
|
|
371
|
+
- **Behavior narrowing — a stray key holding `undefined` is refused at the two seats that read it as absent.** A clamp record (`createSubagentResume`'s `currentClamps`, the workflow tool's `parentClamps()`) and a host-supplied MCP transport (`{ kind: "host", url: undefined }`) are refused by the key's name, in their own sentence and code (`config.invalid_argument`); a key the seat takes, holding `undefined`, is still taken.
|
|
372
|
+
- **Behavior narrowing — a bad `compactEvery` / `fsync` at the four File stores is refused loudly (it was silent).** `new FileMailboxStore(root, { compactEvery: 0 })` and the same at `FileCheckpointStore`, `FileBackgroundAgentStore`, `FileWorkflowRunStore` and `FileStorageBackendOptions.checkpoint` are refused (`config.invalid_argument`, naming the store and the member) before any directory, lock or file exists, where the store used to be built with a threshold its ledger never reaches (`NaN`, a word) or reaches at every event (`0`, a negative); a non-boolean `fsync` is refused where it used to read as on. A numeric string such as `"100"` (compared as a number before) is refused too.
|
|
373
|
+
- **Behavior narrowing — the live readers count every own name (C-R996 addendum 1, open to veto).** `TaskSpec` (K6: `config.spec_unknown_key`), `TaskSpec.limits` (`config.limit_unknown_key`), the peer seat's answer and a clamp record now refuse a non-enumerable own stray key and a symbol-keyed member, which `Object.keys` did not see; an inherited key is still neither read nor refused. A spec handed in as a class instance, a Proxy, or an object carrying a symbol marker (a reactive framework's tag, for one) whose own keys include one the engine does not read is now refused at prepare, by that key's name, with zero model turns (it used to run, the key unread) — @server @cli @client-core, any host that builds its spec that way; the doors that now copy (the auto-mode denial limit, a `contextSettings` overlay, `TaskSpec.outputStyle`, a user attachment) refuse a Proxy, a class instance and a getter that throws by the receipt's refusal (`config.invalid_argument`), as every receipt door does. On a resume that refusal is the resume's one channel: `checkpoint.config_refused`, `detail.code: "config.invalid_argument"`, `detail.field: "taskConfig"`, the checkpoint pending and byte-identical — where a caller's `outputStyle` whose `name` getter threw used to reject the resume with the thrown value itself (#1285's channel takes its codes and nothing else; the getter is no longer outside it).
|
|
374
|
+
- **Hard-breaking — group 1, the memory-engine seats and four function bags refuse a stray option.** *What changed:* `new MemoryEngine(…)` (and its `consolidation` record), `new FileMemoryEngineBackend(dir, …)`, `TaskSpec.retainSubagentSessions` (its record), `adoptFilePermissionRuleStore`, `effectivePermissionRules`, `reanchorMemoryStoreRoot` and `enqueueMemoryAnnouncement` refuse a key their options type does not name, and a bag that is a Proxy or has another prototype (`config.invalid_argument`), before they read a file or a store. *Who:* a host that passes a misspelled, retired or foreign key to one of them, or a class instance as its options (none at the server construction points read for this change: they are object literals — inferred for the rest). *Migrate:* remove or correct the key; pass a plain object.
|
|
375
|
+
- **Hard-breaking — group 2, `FileStorageBackendOptions.checkpoint` no longer takes `sessionHeadOf` / `onCorruptRead`.** *What changed:* the record's type is `Omit<FileCheckpointStoreOptions, "onCorruptRead" | "sessionHeadOf">` and its table refuses both by name (`config.invalid_argument`) before the root exists — the backend always supplied its own session head read and its own sink, so a host's value was taken and never used. *Who:* a host that passes either through the backend (the server's backend construction passes no `checkpoint` — checked at its literal points). *Migrate:* drop the member; a `FileCheckpointStore` built directly still takes both.
|
|
376
|
+
- **Consumers.** @server: your store construction points — check that no `compactEvery` / `fsync` you pass is other than a whole number ≥ 1 / a boolean, and that no memory-engine seat or `checkpoint` record carries a key its type does not name (your literal points pass no `checkpoint`: no change expected). @cli / @client-core: a spec you build as a class instance or Proxy, or one a framework tags with a symbol, is refused if it carries an own key the engine does not read — build it as a plain object (no change expected for a literal spec). @test: black-box cells — a spec with a non-enumerable unknown key or a symbol key fails `config.spec_unknown_key` with zero model turns; `compactEvery: 0` at a File store is refused and leaves its root uncreated; `FileStorageBackend` with a misspelled `sessions` hook leaves its root uncreated, and its hook still runs with the caller's object as `this`; a clamp record with a stray key holding `undefined` is refused.
|
|
377
|
+
- **Known (stated).** KL-3202-a: three seats judge names on a copy the declaration receipt already made — `RunnerDeps.hostFloor` (received at the Runner's construction), a `toolFaces` face and a host-supplied MCP transport (records nested in one declaration) — and that receipt's walk (`DECLARATION_RECEIPT_MODE`, accessors called once) calls every getter before the seat judges a name and leaves symbol-keyed members out of its copy without a word (`src/core/mods/kernel/receive.ts`: the symbol check runs only when accessors are refused). So at those three seats a symbol key is dropped, not refused, and a stray string key's getter runs before its refusal; a stray string key, enumerable or not, is still refused. A transitional limit: the fix is the receipt's (one walk, every declaration reader — #3222: the declaration receipt judges names before getters at every level and refuses symbol-keyed members), not a seat's; this sentence retires when #3222 lands. KL-3202-b: the gates this slice did not reach (35 rows of the same class, counted by the ratchet pin) and about seventy store-family functions whose options bag has no key judgment keep their old readings.
|
|
378
|
+
- **Pins.** `test/backlog3202-store-options-gate-s2.test.ts` G1–G8 (each of the 13 gates: a stray key in its own code and sentence shape, and a control; key presence at the two seats; names before getters, a symbol named, a non-enumerable name at a live reader, a long name bounded; the memory-engine seats; the four function bags; the four File stores' bad tuning cell by cell and the backend's pre-check with no root and no LOCK; the session hooks before the root and their `this`; the checkpoint record's two refused members), `test/backlog3202-unknown-key-gate-ratchet.test.ts` (the AST census of hand-written gates, per file, only down), `test/backlog3186-store-options-gate.test.ts` P10 (the memory-engine seats keyed), `test/backlog2847-store-options-door.test.ts` R1 (the throwing getter sits on a taken option: names are judged first), `test/backlog3059-taskspec-read-once.test.ts` K6 (a non-enumerable and a symbol-keyed unknown key refused, an inherited one and a class's prototype methods not), `test/backlog1285-resume-doors-preclaim.test.ts` ⑦a (the throwing `outputStyle.name` getter on a resume: the channel's refusal, the row untouched) and ⑦b (an uncoded throw, and one whose `code` is no channel word, leave the channel as thrown).
|
|
379
|
+
|
|
380
|
+
### A background sub-agent has one id — its registry task id (`a…`): its frames, its result, its extension events and its children's attribution now carry the string its row, launch card, notifications, `TaskStop` and `SendMessage` already used (#3193 = #3181 S1, ruled C-R1040 K1 / K2 / K3 / K5 / K6; aligned with Claude Code 2.1.309, whose one minted `agentId` (`h_`, cli309.js:251842) is the task id, the event key and the notification's `task-id`; hard-breaking: four, HB-1–HB-4 below, open to veto; divergence D-3181-a, open to veto; closed sets: +1 `RequirementWord` `row_task_id`; exports: none; members: +1 optional `RunInternals.rowTaskId`, +1 optional `CheckpointState.rowTaskId`) (@server @client-core @cli @test)
|
|
381
|
+
|
|
382
|
+
- **Before.** A background sub-agent had two identities. Its registry handle `a…` keyed its row, its launch card, its completion notification, `TaskStop`, `SendMessage`, the roster and the live-tail envelope; its leg's task id was its session uuid (`spec.taskId ?? sessionId`, and an engine-built child spec names no task id), and that is what its `task_progress` / `task_started` frames, its content events' `sourceTaskId`, its `TaskResult.taskId`, its trace frames, its `HookInvocationIdentity.taskId` and its extension events' `agentId` carried. A consumer joined the two through the fleet frame (`BackgroundChildEvent.transcriptId`), and every downstream view kept a map of its own. The leg's task id was also spelled inline in ten more places (the run layer, the result, the terminal adoption, the settle, the resume pre-screen, the throw backstop), each a copy of the rule.
|
|
383
|
+
- **Now — one mint.** A leg's task id is `legTaskIdOf(spec, internals, sessionId)` = `internals.rowTaskId ?? spec.taskId ?? sessionId`, minted once at prepare (`Prepared.taskId`) and read by every face; the background lanes (plain, fork, the retained continuation's snapshot, the revival) hand the row's handle on the trusted internals seat `RunInternals.rowTaskId` (one function, `backgroundLegFacts`), so the child's task id is the row's id. `spec.taskId` keeps its one meaning — the task id a host declared — and the env factory is still handed only that. The session id stays on `sessionId` / `transcriptId` as the transcript's address. A foreground child has no row: its task id (its `agentId`) is its session id (D-3181-a). A parked background sub-agent's checkpoint records the id (`CheckpointState.rowTaskId`, requirement word `row_task_id`), and a resume that hands no internals restores it, so the resumed leg keeps the id it parked under. `$.agent.spawn` answers with the id the delegation registered the subagent under (`ExtensionCall.launched` is written with it), the string `TaskStop` takes.
|
|
384
|
+
- **Hard-breaking, open to veto.** HB-1 (the frames' and the result's task id): A background sub-agent's own frames and results now carry its registry task id (`a…`, the string `task_notification.task_id`, `BackgroundChildEvent.taskId`, `TaskStop` and `SendMessage` take) as `task_progress.taskId`, `task_started.taskId`, `TaskEvent.sourceTaskId`, `TaskResult.taskId`, trace frames' `taskId` and `HookInvocationIdentity.taskId` — previously its session id. A consumer that joined a tick to its fleet row through `transcriptId` / `sessionId` / `progressTaskId` (the INTEGRATION-CORE id table's former contract ②) or through an in-memory uuid→handle map is affected; an approval-to-row association that equated `AskRequest.sourceTaskId` (the session id — renamed `sourceSessionId` in this version, #3212) with `task_progress.taskId` is affected too. Key a background agent's (`a*` row's) ticks by `taskId` directly — it is the row id; the session id stays on `sessionId` / `transcriptId` as the transcript address, and an approval is attributed to its row by its `agentId` (#3212, its own section). A `BackgroundChildEvent` tick's `progressTaskId` is the task id of the leg that minted the forwarded frame — the row's own id on its own ticks, a descendant's id on a nested one. Workflow-agent (`wa*`) rows are unchanged in this version: their ticks still join through `transcriptId`. HB-2 (the extension events' `agentId`): Every extension event raised on a background sub-agent's leg (`tool.call`, `turn.complete`, `session.end`, the classic family, …) and the `$.agent.spawn` answer now carry that registry task id as `agentId` — previously the child's session id. An extension that treated `agentId` as a session id is affected. Use `agentId` as the agent's address (`TaskStop`, `SendMessage`, the notification's `task_id` are the same string); a foreground child keeps its session id as `agentId` (it has no registry row). HB-3 (a grandchild's attribution): A grandchild spawned by a background sub-agent now carries the parent's registry task id as `parentTaskId` on its `task_progress` frames, and its `BackgroundChildEvent` spawn frame now carries `parentTaskId` (it was omitted, since the parent's task id equaled its session id). A nesting resolver that mapped the parent's session id to its row is affected. Nest by `parentTaskId` = the parent row's id. HB-4 (state across the upgrade): A background sub-agent parked before this version and resumed by its host with no engine internals (a host-driven `resume` of the checkpoint) resumes under its session id as its task id, since its checkpoint records no row id; revived through the engine's own lane (`SendMessage` revival) it resumes under its row id. The task-scoped rows a background sub-agent registered before this version (its own background tasks and its children, owned by its task id — `backgroundScope: "session"` rows are owned by the session and unchanged) stay owned by its session id and are not reachable from the same agent after it resumes under its row id. Let parked background sub-agents settle (or stop them) before upgrading; nothing in this version reads the old id as an alias. In the other direction, a checkpoint that records a row id carries the requirement word `row_task_id`, so a worker older than 7.61.0 refuses it (`version_newer`): finish the upgrade before such cards are resumed, or resume them on a 7.61.0 worker; rows without a row id are unchanged.
|
|
385
|
+
- **Also changed (not breaking).** A sub-agent's queued steer frame (`human_input`, `delivery: "queued"`) carries `sourceTaskId` — the leg's task id, what every other content event of that leg carries — where it carried none when the leg's spec named no task id (the replayed `applied` frame of a parked steer already carried it, so the two frames of one input now agree on every leg).
|
|
386
|
+
- **Who needs it.** A deployment that shows background agents (one row, one id: no tick→row map, no "two rows for one agent" when a tick arrives before the spawn frame, a stop button that sends the id the stop route accepts); an extension that starts a subagent and stops or messages it by the id it was answered.
|
|
387
|
+
- **Consumers.** @server: the run-leg tick→row yield keys on the tick's `taskId` (= the row id) — the claim table, the alias backfill and the uuid→handle branches of the `a*` lane can go; both lanes (the fleet frame lane and the run-leg tick lane) should upsert by the one row id (tick first / spawn first: one row either way); the approval→row association reads the ask's `agentId` (#3212); the live tail's frames now name the URL's handle; a worker on an engine before this version refuses a parked background sub-agent's checkpoint that records the row id — the row requires `row_task_id`, a word it does not know — with the requirement-word refusal it already has (`version_newer`), so a rollback lets such parks settle first, while a checkpoint of a leg on no row lane carries neither the member nor the word and an older worker reads it as before. @client-core: the panel record of an `a*` row keys on the tick's `taskId` (no first-tick freeze to the uuid, no binding queue); the stop key is the row id. @cli: the double-key handover of a background agent row can go. @test: #3058's S1 cell is turned (one id); this entry's criteria are the four sentences above. Wire: `RunInternals.rowTaskId` is present only on a leg a background lane runs; `CheckpointState.rowTaskId` only on such a leg's checkpoint; a host that sets the seat itself sets its own leg's task id (its own trust domain).
|
|
388
|
+
- **Pins.** `test/backlog3193-one-agent-one-id.test.ts` (real Runner lanes: P1 the `$.agent.spawn` answer = `turn.complete` / `session.end` `agentId` = the notification's `task_id` = the launch card's `task_id`, and `TaskStop` stops it by that id; P2 / P5 the plain and fork lanes' frames; P3 a grandchild's `parentTaskId`; P4 the result, the lifecycle identity, the trace frames, the content events; P6 a revival keeps the id; P7 a retained wake — background-born row id, synchronous-born session id; P8 a parked leg resumed with no internals keeps it; P9 a foreground child's session id; P10 the host's declared id and the env factory's ctx; P11 the single-mint row; P12 the ask's session id; P13 a checkpoint with no row id resumes under the session id with no internals, under the row id through the revival; P14 the spawn frame before the child's first frame; P15 the throw backstop; P16 the end-of-task and settle writers; P17 the resume pre-screen and the woken cycle's notification), `test/backlog3058-agent-spawn-entry.test.ts` S1 (turned), `test/backlog1273-live-steer-consumed.test.ts` ④ / ⑤ (the queued steer frame's `sourceTaskId`), and the re-pinned neighbours listed in the receipt.
|
|
389
|
+
|
|
390
|
+
### The needs-authorization sentences name no settings page the engine cannot see, and the notice for the engine's own credential names no deployment it cannot see (#3200; user-visible wording; one reading each)
|
|
391
|
+
|
|
392
|
+
- **Before.** An MCP server that answered 401 — or whose seat answered "not authorized" — with no authorization address sent the user, in the model's needs-authorization arm, the call-time line and the `mcp.authorization_required` notice, "through the deployment's connector settings": a page a person who attached the server with a local `--mcp-config` does not have. And the notice that tells a person which variables their tool shell does not receive (`inherit_env.names_withheld`), its operator twin (`config.secret_env_scrubbed`) and the refusal of an `inheritEnv` list that names one called the credential a shell mints for an engine it starts itself "this deployment's own credential".
|
|
393
|
+
- **Now.** One predicate per sentence. A seat that gave an address: the sentences are as they were (`authorize … at <url>`). None given: they say only that — "(no authorization address was given)" — and name no place; over servers with and without an address the arm points at the address listed beside each and says the rest were given none. An entry of the engine's own environment is "the engine's own service credential" in all three sentences (one constant). No new member, no new key; every record (`authorization`, `detail.ownCredentials`, the notice's `detail`) is as it was.
|
|
394
|
+
- **Who needs it / who is hurt.** *Needs it:* a person who runs the engine from a shell — local MCP servers, a shell-started engine — whose sentence no longer points at settings that are not there. *Hurt:* a host that matched the old sentence text (`connector settings`, `this deployment's own credential`): read the records, not the words.
|
|
395
|
+
- **Consumers.** @cli @server @test: none — they render or read records that did not change; a host that wants to say where its user authorizes says it through the seat's `authorizeUrl`.
|
|
396
|
+
- **Pins.** `test/backlog2295-unauthorized.test.ts` W1 (no seat: the call-time line), F3 (a seat's address: the notice names it), F3b (a real Runner, no address: arm, notice and record), F3c (the arm over servers with and without an address); `test/backlog3200-own-credential-wording.test.ts` O1–O4 (the person's notice, the operator's notice, the refusal, one phrase); `test/backlog1753-own-credentials-withheld.test.ts` and `test/backlog1963-withheld-env-user-notice.test.ts` repinned to the new words.
|
|
397
|
+
|
|
398
|
+
### A path rule anchored at a directory whose name holds `*` — or is `**` — reaches that directory, not its siblings (#3189; aligned with Claude Code 2.1.309, which keeps a rule's root apart from its pattern (`xUo` (cli309.js:258818) answers `{ root, pattern }`); behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
|
|
399
|
+
|
|
400
|
+
- **Before.** A rule's base — the declared or installed `root` for `/x`, the `home` for `~/x`, the `cwd` for a relative pattern — was joined to the rule's body and the whole string read as a pattern, so each `*` in the base's own directory names was a wildcard and a base segment named `**` spanned any depth. `Read(/secret/**)` on a task rooted at `/w/a*b` refused `/w/aXb/secret/…` too, an allow `Read(/secret/**)` there cleared reads of the sibling's files, and the row's head and confinement shape started at `/w` (the first segment carrying `*`).
|
|
401
|
+
- **Now.** One reading of a resolution (`resolvePathPattern`, `src/core/permission-rule-model.ts`): the segments the base contributed are a location read letter by letter by every reader — the reach, the head the deny tables judge links at, and the shape an OS confinement translates; only the rule's own body (and the whole of a `//abs` pattern, which has no base) carries `*` / `**`. A base with no `*` reads exactly as before.
|
|
402
|
+
- **Who needs it / who is hurt.** *Needs it:* a host whose task root, configuration directory or execution environment's home has a `*` in a directory name, and every rule anchored there. *Hurt:* a rule that used to reach a sibling of such a directory through that accident no longer does — a deny or ask stops guarding it, an allow stops clearing it. *Compensation:* none needed; a rule meant for the siblings is written with its own `*` in the body.
|
|
403
|
+
- **Consumers.** @server: the configuration root S-2767 anchors user-layer rules at (`SEMA_CONFIG_DIR` / `<home>/.sema`) is read letter by letter like the task root and the home — no host change. @cli: none. @test: a deny `Read(/secret/**)` with `root` = a directory named `a*b` (and one named `**`) refuses only that directory's `secret/`, for the Read tool and `cat` alike; an allow on a leg rooted at `a*b` clears only its own `secret/`.
|
|
404
|
+
- **Pins.** `test/backlog3188-3189-rule-roots.test.ts` ①–⑥ (a real Runner: roots `a*b` and `**`, the controls `a?b` and `[ab]`, the home and cwd words, the bound row's head and shape, an allow list on a leg rooted at `a*b`).
|
|
405
|
+
|
|
406
|
+
### An allow list member may carry the anchors of its rule set — `{ rule, pathBases }`, the seat and the reading of a deny / ask set's `pathBases` — so a user layer's `/x` allow reaches `<config>/x` (#3188; aligned with Claude Code 2.1.309, which roots an allow rule at its settings layer as it roots a deny (`yHe` → `zBt` (cli309.js:258818)); behavior: none for a string member, and a behavior narrowing for a list with a hole in it (refused, three sentences below; open to veto); hard-breaking: the member type of `TaskSpec.allowedTools` and `RunnerDeps.allowedTools` widens (three sentences below); closed sets: none; exports: +1 root type `AllowListEntry`) (@server @client-core @cli @test)
|
|
407
|
+
|
|
408
|
+
- **Before.** A request's or a deployment's allow list was one set of rule strings read at the leg it was installed on, and nothing could say otherwise: a user settings layer's `Edit(/x/**)` handed in through `TaskSpec.allowedTools` cleared writes to `<task root>/x` and not to `<config>/x`, while a deny / ask rule set could declare its anchors (`PermissionRulePolicyOptions.pathBases`) and guard `<config>/x`.
|
|
409
|
+
- **Now.** A member is a rule string, or `{ rule, pathBases }`: the rule with the anchors of the set it belongs to, read the way a deny / ask set's declaration is read (`policyAnchors`: each word declared, else the leg's). The members declaring the same anchors are one set — one settings layer: `root` = the layer's root, `cwd` = the task root. A string declares nothing and reads as it always did, at the anchors the list was installed with as handed (every word, a `cwd` included). The same rule in two sets is two members: a hit's `clearedBy.positions` are that member's own indices in the list the run received — every index of the list is a member, so a hole in a sparse list is refused (`invalid.entry_type`), never compacted away. A delegated child holds the parent's members with their anchors (`ToolExecuteContext.activeRequestAllowedTools()` answers them), so it reads the rule where the parent did. Deny and ask still win. An anchored member is received by the engine's receipt law for a caller's object — a plain object of exactly `rule` (a string) and `pathBases` (at least one of `root` / `cwd` / `home`, each a string — `pathBases: {}` is refused: a member that declares nothing is the rule string), its own members only (a member a prototype supplies is no member, and the held anchors carry no prototype), refused otherwise with `config.invalid_argument` naming the member, never the value; a declared base a path rule cannot be read at (a relative spelling) is refused as a rule set's declaration is (`config.invalid_permission_rules`, issue `unsupported.path_base` — one judgment, `unusableDeclaredBase`, for both).
|
|
410
|
+
- **Hard-breaking — the members widen.** *What changed:* `TaskSpec.allowedTools` and `RunnerDeps.allowedTools` are `readonly AllowListEntry[]` (was `readonly string[]`), and so are `ToolExecuteContext.activeRequestAllowedTools()` and `RunInternals.inheritedAllowedTools`. *Who is affected:* code that READS one of these as a list of strings — a host that copies, filters or renders a spec's `allowedTools`, a delegation tool that forwards the capture — fails to compile, and a reader at runtime may meet an object; code that only writes strings is unaffected (server writes both lists and reads neither, origin/main `src/task-settings.ts` / `src/boot/runner-deps.ts`). *What to do:* read a member through `typeof m === "string" ? m : m.rule` for its text, and keep `pathBases` with it wherever the member is passed on.
|
|
411
|
+
- **Behavior narrowing — a hole in an allow list is refused (open to veto).** *What changed:* a list handed as `TaskSpec.allowedTools` or `RunnerDeps.allowedTools` with an empty slot (`[ , "Read"]`, an index assigned past the end) is refused with `config.invalid_permission_rules`, one `invalid.entry_type` issue per hole ("entry 0 of the request's allow list … (got undefined)"); 7.60.0 skipped the hole when it checked the list and carried `undefined` into the copy every later reader takes. *Who is affected:* a host that builds the list by writing members at computed indices — a projection of a settings `allow` list that leaves a slot unwritten for an entry it drops (@server, the `settings.permissions.allow` → `TaskSpec.allowedTools` projection; @client-core, an allow bucket it hands on) — now has the run refused instead of starting. *What to do:* build the list densely (`push`, `map`, `filter`), never by index past the end; a dropped entry is left out, not left as a hole — the positions a hit reports are the indices of the list as handed, so a dense list keeps them meaningful.
|
|
412
|
+
- **Consumers.** @server: S-2767's allow half — a `settings.permissions.allow` entry `{ rule, layer }` becomes `{ rule, pathBases: { root: <layer root>, cwd: <task root>, home } }` in `TaskSpec.allowedTools`, one member per entry in the entry's position (positions stay the settings list's indices); a plain string stays a string. @client-core: send the allow bucket's layered entries once the server's capability bit says so, as for deny / ask. @cli: none. @test: a user layer's `Edit(/secret/**)` clears `<config>/secret/…` and not `<task>/secret/…`; a project layer's (or a string) the reverse; a deny on `<config>/secret` still refuses; an object member with an unknown key, an unknown base word or a prototype-supplied member refuses the run.
|
|
413
|
+
- **Pins.** `test/backlog3188-3189-rule-roots.test.ts` ⑦–⑯ (a real Runner: the user and project layer sets and a plain string, deny over allow, positions of the same text in two sets, the delegated child's capture carrying the anchors and a leg seeded with it; the receipt's and the anchors' refusals, the frozen snapshot, the deployment's list; a string list installed with a distinct `cwd` (the exported session policy's deny list), own members against a polluted prototype, a sparse list, an empty declaration).
|
|
414
|
+
|
|
415
|
+
### Every start a run makes carries the run's byte floor — the starts whose output never reaches the model too — and a floor names the compiled table it judges with (`ReadFloor.id`) (#3190; server S-2715 CA-1 / CA-2 / CA-3; behavior change on an environment that keeps the floor; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: none; members: +1 optional `ReadFloor.id`, +1 optional `ReadDenyMatcher.id` (wire +2 optional), +1 optional `AddWorktreeOptions.readFloor`, +1 optional `WorktreeToolsOptions.readFloor`, +1 optional trailing parameter each on `pruneWorktrees` and `gitCheckIgnoreFilter`) (@server @cli @test)
|
|
416
|
+
|
|
417
|
+
- **Before.** INTEGRATION-CORE §11.1 split the engine's starts by where their output went: the shell faces, the env facts probe, the git status frame and Grep's ripgrep carried `readFloor`; the starts whose output does not reach the model — a worktree's and a delegation's git bookkeeping, Grep's ripgrep version check and existence probe, Read's PDF renderer, the LSP's `git check-ignore`, a mod's `process.run` — carried none, so an environment that keeps the floor ran them unconfined (on macOS with `readFloorConfinement: "os"`, outside the profile) while the program they ran (a git hook, `core.fsmonitor`, a PDF) could be one the model wrote. A floor did not say which table it judged with; equal `rows` were the only handle a relay had.
|
|
418
|
+
- **Now.** One reading: the floor is the run's. Every start a run makes carries the floor of the table that start judges with — a call's start the call's own pinned table, every other start the run's table in force as it begins (one run seat, published by the prepare once the hands mount compiles the tables; `test/backlog2944-read-floor-kept.test.ts` J9 now checks every start site call by call, no `relays` column). A floor read from a live seat is pinned at the start: the start keeps that table's judgment for as long as it lives, a later start reads the newer table, and a start that is no call's reads its own floor as it begins (a worktree mint's or removal's git commands each read theirs). A seat that cannot answer now (a partition of the person's rows unread, the newest tables compiling) refuses the start — the floor read throws — where a no-call start used to run with a refuse-everything floor, or with none when the table it knew held no row. `ReadFloor.id` names the compiled table, minted once in `compileReadDeny` (`ReadDenyMatcher.id`, not enumerable — a spread copy that may judge otherwise has none; `carryHomeViews` keeps it): one `id` ⇒ one judgment, while two compiles of the same rows are two ids. §11.1 now states the floor's path semantics (an alias is judged by its own spelling) and the exec edge (KL-3190-a).
|
|
419
|
+
- **Hard-breaking — the floorless engine starts are gone.** *What changed:* `readFloor` is absent on a start exactly when that table holds no row or the start belongs to no run (`runExecGate`, the oracle's isolation probe, a host mount handed no seat); the starts listed under Before now carry it, so an environment that keeps the floor confines them, or refuses them when it cannot keep the table (`spawn_error`) — the caller then answers by the arm it has for a failed start (the frame degraded, the worktree kept, the PDF read refused). *Who is affected:* an environment adapter that keeps the floor (server's sandbox lane; a host on `readFloorConfinement: "os"`, whose git hooks and PDF renderer now run inside the profile), and an adapter that treated a floorless engine start as a case of its own. *What to do:* treat an absent floor as "no row, or no run's start"; nothing else changes for an environment that does not keep the floor.
|
|
420
|
+
- **Consumers.** @server: on arrival delete the transition arm that answers a floorless engine start with `spawn_error` — read absence as "the table holds no row, or the start is no run's"; a relay may keep what it derived from a floor across starts by `ReadFloor.id` (present ⇔ the floor judges with one compiled table; absent ⇒ derive per start), never by equal `rows`. `ReadDenyMatcher.id`: present on every table `compileReadDeny` returns and on the `carryHomeViews` copy; absent on a hand-built table and on a judge that reads another table at each judgment (`readDenyOver`). `AddWorktreeOptions.readFloor`: present ⇒ every start of the mint and of the tree's removal carries the floor it returns, read as that start begins — a read that throws is that step's failure (the add's refuses the mint before anything exists); absent ⇒ the starts carry none (a caller that holds no run). `WorktreeToolsOptions.readFloor`: present ⇒ every git start of an EnterWorktree / ExitWorktree call carries the floor it returns for that call's id; absent ⇒ none (the Runner always passes the run's). `pruneWorktrees`' trailing `readFloor` (a floor): present ⇒ the prune's start carries it; absent ⇒ none. `gitCheckIgnoreFilter`'s trailing `readFloor` (a reader — the filter lives as long as the language server): present ⇒ read as each check starts and carried by it, a read that throws counting as a failed check (nothing ignored); absent ⇒ none. One shape rule: a one-shot function takes the floor, a long-lived object takes a reader. @cli: no shell change; a host lane on `NodeExecutionEnv` keeps no floor and runs as before. @test: re-verify on macOS with `readFloorConfinement: "os"` that a repository's `post-checkout` hook run by a worktree mint cannot read a refused file, and that every start of a run carries one `ReadFloor.id`.
|
|
421
|
+
- **Known (stated).** KL-3190-a: a refused file the environment lets run gives out what running it reveals (a `#!` line's bytes, a self-printing binary) — the floor judges opens, not execs. KL-3190-b: a library-direct band's floor while its own placement is in flight names no table and judges live; a Runner run's starts never take that arm.
|
|
422
|
+
- **Pins.** `test/backlog3190-read-floor-contract.test.ts` R1–R12 (R1 a real Runner: the env facts probe, the git status snapshot and the model's command carry one floor — one id, the run's rows — and no start of the run is floorless; R2 EnterWorktree / ExitWorktree each carry their own call's floor, a mount handed no seat none; R3 call table vs run table; R4 / R5 one id ⇒ one judgment, a spread copy has none, two compiles two ids; R6 a start keeps the table it was pinned to; R7 a seat that cannot be judged refuses the start (the floor read throws), with or without rows it could cite; R8 a live band facade, no id; R9 path semantics: symlink alias, a refused name that links elsewhere, a hard link; R10 darwin real `sandbox-exec`: a worktree mint's `post-checkout` hook meets no refused byte, the floorless baseline does; R11 darwin: the exec edge; R12 a delegation's worktree mint and finish: every start carries the floor read as it began, a floor that cannot be read keeps the tree and starts nothing); `test/backlog2944-read-floor-kept.test.ts` J9 (every start site, call by call).
|
|
423
|
+
|
|
424
|
+
### The settings import leaves a user layer's `/x` rule in the settings file instead of storing it as a rule read at every project's root — `CcImportLayer` is a union by `layer`, the user arm carries no `root` (#3191, #3182 S1; ruled C-R1038 K-1 / K-3 / K-6; aligned with Claude Code 2.1.309, which reads `/x` at the root of the rule's own settings layer (`zBt`, `cli309.js:258818`; the user layer at its configuration directory, `Le`, `cli309.js:251921`) and has no import — divergence D-3182-a, open to veto; behavior narrowing, open to veto; hard-breaking: the layer type, three sentences below; closed sets: none — `unsupported.layer_root:` is a new `skipped` reason prefix; exports: none — `CcImportLayer` keeps its name, an interface becomes a type) (@server @cli @client-core @test)
|
|
425
|
+
|
|
426
|
+
- **Before.** `prepareCcImport` stored a user-layer entry as a global row whatever its pattern. A global row reads `/x` at the chain's top leg's root — the task's project root — while the user layer reads it at its own directory (the configuration directory), so the same text guarded or opened another place once stored: a user-layer allow `Edit(/notes/**)` (meant for the configuration directory's `notes/`) let every project's `notes/` be edited with no question, and a deny `Read(/secret/**)` refused `<task>/secret` and not the configuration directory's. A one-step import (prepare → confirm → redeem with no preview shown) landed it silently. `CcImportLayer.root` was required on the user layer and never read.
|
|
427
|
+
- **Now.** A user-layer path pattern written from `/` (`ruleBasesNeeded` names `root`) is not a candidate in any behavior: it is in `preview.skipped` with a reason starting `unsupported.layer_root:` and stays in the settings file, the same law that keeps a bare tool name there (`unsupported.form:`). The reason names the settings layer, the configuration directory and the way to carry the rule (`//<directory>/…`, or `~/<path>` under the home), says that a directory whose name holds a glob character cannot be spelled that way, and prints no path. `//abs`, `~/`, relative and non-path entries of the user layer still import as global rules; every entry of a project or local layer imports as before, `/x` included, scoped to the layer's `root`. A JS host that hands a `root` on the user layer is refused before any layer is read (`config.invalid_argument`, `detail.field` `layers[<i>].root`, the value not echoed); a member holding `undefined` is absence. The store's anchors, the rule sets' `pathBases`, `RuleScope` and the sync wire are unchanged.
|
|
428
|
+
- **Hard-breaking — the layer type.** *What changed:* `CcImportLayer` is a union by `layer` — the `userSettings` arm has no `root` (it was required and never read; `root?: never`, so a root handed for it does not compile, also when the layer word is held as the whole union); a user-layer entry whose pattern reads at the layer's root (`/x`) is no longer a candidate but `skipped` with `unsupported.layer_root`. *Who is affected:* a host building core's `CcImportLayer` — server's HTTP mapping (`src/rules-consent.ts:1453-1458`, `root: l.root` on every layer at `:1456`) and its local-import carrier (`:1207-1211`, `root: "/"` on the user arm at `:1211`) stop compiling; client-core and cli build the sdk wire type, not this one, and see only the new skipped reason; an allow row imported before this version keeps granting at each project until its store's owner runs the one-time retirement (docs/INTEGRATION-CORE.md §5.14), and deny / ask rows keep the store's reading; server's local-import carrier skips its global `/x` rows unless it moves deny / ask to `addPersistedRule`. *What to do:* drop `root` on the user arm (keep it on the project and local arms); move the carrier's deny / ask to `addPersistedRule` in the same change; show the skipped entries; for an entry the person wants carried, spell its directory out (`//<dir>/x`, or `~/<path>` under the home) — a directory whose name holds `*`, `?`, `[`, `]`, `{` or `}` has no literal spelling in the path grammar and cannot be written this way.
|
|
429
|
+
- **An import record prepared before this version (behavior narrowing beside the hard break).** The same law holds where an import record's candidate lands (`redeemRuleTicket`, the boundary the batch walk takes too; one predicate, read by the door and by the landing): a record an earlier door prepared and that is confirmed or redeemed after the upgrade refuses its global `/x` candidates, every behavior, with the same `unsupported.layer_root:` prefix — so a refused deny or ask withholds the batch's allows (the existing batch law), and a dot recorded before the upgrade that never landed does not land on replay. A replay of a global `/x` dot that did land answers `refused`, the way the parser's re-read at the same boundary already answers for a spelling it no longer reads; the row it landed stays until the store's owner retires it. A project-scoped `/x` on such a record lands as before. *Who is affected:* a host that redeems import records it holds across the upgrade (@server, @cli through it): the person prepares the import again and sees the entry in `skipped`.
|
|
430
|
+
- **Rows stored before this version.** Core ships no migration and no read-time drop: the retirement predicate is one sentence in docs/INTEGRATION-CORE.md §5.14 (an add is retired when the row is an allow, the add's origin is `imported-cc`, the scope is global and `ruleBasesNeeded` names `root`; one observed-remove tombstone per row naming those adds, so a row that also holds a `user` add stays; idempotent, run at every start while a rollback to a core before 7.61.0 is supported; deny and ask adds are never retired), and the store's owner runs it (KNOWN-LIMITS KL-3182-a).
|
|
431
|
+
- **Divergence, open to veto.** D-3182-a: the reference computes a rule's root from the settings file it sits in and never moves rules between layers (`zBt`, `cli309.js:258818`); its one cross-root carry found in the corpus (MCP serve launch rules, `d`, `cli309.js:307359`) translates a pattern into an absolute one with its wildcards escaped and keeps the original. The import door here does not carry a user layer's `/x` into the store, and does not translate it: this path grammar has no escape (`src/core/permission-rule-model.ts`, `parsePathRuleContent`).
|
|
432
|
+
- **Who needs it / who is hurt / compensation.** *Needs it:* a person whose user-layer allow names a directory under the configuration directory — today it opens that path in every project, with no consent for that. *Hurt:* a person who wrote `/x` in the user layer meaning "in every project" loses that reading on a new import (the deny no longer refuses inside projects; the allow no longer clears the question); after the store's owner retires old allow rows, a project edit that passed yesterday asks today. *Compensation:* the skipped reason says how to write the rule so it carries; deny and ask rows already stored keep their reading.
|
|
433
|
+
- **Consumers.** @server: the two compile errors above; the one-time retirement by the predicate (idempotent, at every start, for your stated rollback window — two releases, 7.141.0 → 7.142.0), and the local-import carrier's deny / ask through `addPersistedRule` in the same pickup; your preview already hands `skipped` to the operator (`src/rules-consent.ts:391`, the per-row warning at `:1699`); whether the sdk wire's `layers[].root` keeps a user arm is yours — you retire it. @cli: the boot-time import says nothing about skipped entries today; show the `unsupported.layer_root` ones (one line each). @client-core: only the new reason prefix (classify by the first `:`). @test: on the deployment chain, a user-layer allow `Edit(/notes/**)` imported by the boot path leaves a project edit of `notes/a.md` asking; a deny / ask of the same form sent through the server's import body is skipped in the preview and neither refuses nor asks in a project; an allow stored before the upgrade asks once the server's retirement has run.
|
|
434
|
+
- **Pins.** `test/backlog3182-import-layer-root.test.ts` (① a user-layer deny and ask skipped with the prefix; ② the project and local arms unchanged; ③ `//`, `~/` and relative forms global; ④ an allow through prepare → confirm → redeem lands nothing, the rest of the batch lands; ⑤ a real Runner: the store of such an import plus the host's user-layer rule set refuses the configuration directory's `secret/` and reads the task's, a carried relative deny still guards `<task>/local`; ⑤′ no user-layer set: both read; ⑥ non-path rules unchanged, a bare name keeps `unsupported.form:`; ⑦ one file as user and project layer; ⑧ the type, literal and union-typed; ⑧′ the run-time refusal; ⑨ a host carrying its own global rows; ⑩ the reason's words and no path; ⑪–⑬ the retirement predicate on an in-memory store and the door that mints nothing it selects; ⑬′ ⑬″ an import record prepared before the upgrade: pending, confirmed, and a recorded dot that never landed).
|
|
435
|
+
|
|
436
|
+
### The background Bash watcher takes its first beat at registration, so the output file the receipt names holds the first output at once (#3185; behavior change; hard-breaking: none; closed sets: none; exports: none) (@test)
|
|
437
|
+
|
|
438
|
+
- **Before.** The receipt of a background command says "full output is appended there — Read it any time". The registry watcher that mirrors the process output into that file took its first beat one second after registration, so a Read straight after the receipt — which already shows the output so far — found an empty file for that second (test's 12-of-12 runs).
|
|
439
|
+
- **Now.** The watcher polls once at registration, in the registration's own turn, and the one-second cadence follows; a slow first poll is not stacked by the cadence. The receipt does not wait for that poll (a slow environment must not hold the tool result), so the file can still trail the receipt by one poll round trip — milliseconds, far below a model round trip. Because that poll now runs at registration, a launch followed at once by TaskStop can meet it mid-append: the watcher re-checks the row after its append as it already did after its poll, so a stopped row stays stopped. A TaskStop inside the first second now also reports the output the first beat collected (its terminal frame's `result`), where it used to report nothing because no beat had yet consumed the environment's cursor. The receipt's sentence is unchanged: every receipt the engine mints is a watcher row (a launch registers with a completion sink or is refused before anything is spawned), so there is no receipt for a row without a watcher and no sentence for one. The Monitor's receipt is unchanged (its first beat is the 200 ms batch window).
|
|
440
|
+
- **Consumers.** @test: re-run the receipt-then-Read construct (core3185 / test) on this version: the file named by the receipt holds the first output within the first second. @server: no change; the notification and the file are written by the same watcher as before.
|
|
441
|
+
- **Pins.** `test/backlog3185-background-first-beat.test.ts` (a scripted environment: the file holds the first output before any timer advances and the cadence follows; through the Bash tool, with the cadence's timer held, the file the receipt names holds the output; a slow first poll is not stacked; a TaskStop landing while the first beat's append is in flight is not overwritten with `running`; a launch with no completion sink is refused and advertises no file). Two neighbouring pins are re-pinned: `test/backlog3025-command-record-gap.test.ts` C3 handed the same output to the registration beat and to the stop's drain (a real environment hands it once), and `test/r4a7-spool-disclosure-parity.test.ts` PIN 3b read "no beat before the stop" — the frame now carries the spooled output, the stop still drains and appends nothing.
|
|
442
|
+
|
|
443
|
+
### A retention policy with a key its seam does not take is refused by name, before anything is judged or deleted (#3180; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
444
|
+
|
|
445
|
+
- **Before.** `reap(now, { maxAge: 1 })` — `maxAgeMs` misspelled — read as "no age bound": nothing was deleted and nothing was said. The mailbox, workflow-run, background-agent and tool-result sweeps and the durable-agent joint reap only judged the knobs they knew; a key they did not know passed. The file-history seam kept a key check of its own.
|
|
446
|
+
- **Now.** One gate: the retention reading refuses a key outside the list its seam takes (`config.retention_policy_invalid`, naming the key, the seam and the keys it takes). The knob table the validator reads is the single source and each seam names its knobs (mailbox: `maxAgeMs`; workflow-run: `maxAgeMs`, `keep`; background-agent and the durable-agent joint reap: `maxAgeMs`, `keep`, `staleRunningMaxAgeMs`; tool-result: `maxAgeMs`; file-history: `keep`, through the same gate — its own table and loop retire). A knob of the family a seam does not take is refused too. An explicit `undefined` for a knob is still "not applied".
|
|
447
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment that configures retention from a loose config object. *Affected:* a sweep that carried a misspelled or foreign key and silently deleted nothing now throws; the deployment fixes the spelling. The joint reap's `now` is not a knob and is still taken beside them; its bounds are read off the caller's bag as before (an inherited or non-enumerable bound is taken, not dropped). *Compensation:* none needed beyond the spelling.
|
|
448
|
+
- **Consumers.** @server: your retention loop's policy objects are refused on a stray key (`maxAge`, a `keep` handed to a mailbox sweep). A store you implement yourself should refuse the same keys; the constructor options of the bundled stores pass the same gate now (#3201, above).
|
|
449
|
+
- **Pins.** `test/backlog3180-retention-unknown-knob.test.ts` (every seam refuses a misspelled knob and a foreign one, named and coded, with the rows untouched; each seam takes its own knobs, `undefined` included; the file-history door and the joint reap go through the same gate and sentence; the joint reap still takes an inherited and a non-enumerable bound).
|
|
450
|
+
|
|
451
|
+
### Every retention sweep reads its policy bag once and deletes by the value it judged (#3179; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
452
|
+
|
|
453
|
+
- **Before.** The `reap` of the bundled mailbox, workflow-run and background-agent stores (in memory and on files) and the durable-agent joint reap judged the caller's policy bag at the door and then read its members again inside the sweep (`opts.maxAgeMs`, `opts.keep`). A getter, or a bag its caller changed while the sweep ran, passed the door as one number and swept by another: valid at the door and NaN after kept every row; valid and then absent skipped the sweep.
|
|
454
|
+
- **Now.** One reading: each knob is read once off the caller's bag into a plain frozen copy, that copy is judged, and the sweep deletes by it (`receiveRetentionPolicy`, which `ageCutoff` already took the same way). Since #3201 (above) the bag is received by the receipt law: an inherited member refuses the bag whole and a member whose read throws is the receipt's refusal (`config.invalid_argument`). No valid bag changes what it deletes.
|
|
455
|
+
- **Consumers.** @server: a store you implement yourself should read its bag once the same way; the bundled stores no longer re-read it.
|
|
456
|
+
- **Pins.** `test/backlog3179-reap-reads-bound-once.test.ts` (every sweep seam: each knob is read at most once and the age bound exactly once; a bound valid once and garbage or absent after deletes by the valid one in the in-memory mailbox and workflow-run sweeps; a thrown read is refused at every seam; a plain bag sweeps as before).
|
|
457
|
+
|
|
458
|
+
### The credential test a memory sync's names go through finds a URL's userinfo inside a value under another scheme, on all four names it judges (#3184; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
459
|
+
|
|
460
|
+
- **Before.** `carriesCredential` — the one test for a peer identity, a scope key, a store identity, a peer incarnation and the names the sync report carries — parsed the whole value as a URL. A value that wraps a URL under another scheme (`proj:https://user@host/…`) parses as an opaque path with no userinfo slot, so a bare user name there passed: it was shown verbatim in a refusal sentence and in `detail.want`, and a peer incarnation spelled that way rode the cursor and the next claim. A password in the same position was already caught by the egress pass; a bare user name was not.
|
|
461
|
+
- **Now.** The test also looks for a `scheme://` followed by a userinfo and `@` wherever the value holds one (up to the last `@` before a path, query, fragment or blank — and, under a special scheme, before a backslash, which the URL parser reads as a slash), so the four names read one answer, in one linear pass over the value. `proj:https://user@host/x`, `proj:https://user:pw@host/x`, `a/b:ssh://git@host/r`, `proj:smb://DOMAIN\user@host/share` and a second URL in a query (`…?next=https://u@h/`) carry a credential; an empty userinfo (`https://@host/`), an `@` in a path (`https://host/p@q`, `https://host\folder@name`), a scp-style name (`git@github.com:org/repo`) and a plain wrapped URL (`proj:https://host/x`) do not.
|
|
462
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose peer or scope names are built from a URL it then logs or reports. *Affected:* a sync whose peer or incarnation holds such a wrapped URL with a user name is now refused before any read or request, and a scope or store value that does is quoted as the credentials mark in the refusal; both synced as ordinary names before. *Compensation:* name the peer, scope or store without userinfo.
|
|
463
|
+
- **Consumers.** @server: the root export `carriesCredential` answers `true` for these names; a host that judges `target`, layer names or the centre's `peer` with it refuses them with no code change on its side.
|
|
464
|
+
- **Known (stated).** The same-principal egress pass (`redactSecrets`, #2570) still does not read a bare user name in a URL's userinfo as a secret (`https://alice@host/` passes it, and this test refuses it): the difference is recorded, not changed.
|
|
465
|
+
- **Pins.** `test/backlog3184-embedded-userinfo.test.ts` (the judge's table, wrapped forms and controls, and a linear-time pin on long runs of scheme characters and marks; each of the four names through a real `syncMemoryScope` — the peer and the incarnation refused before any request, the scope and the store quoted as the mark in the cursor-mismatch refusal; the report refuses the same names).
|
|
466
|
+
|
|
467
|
+
### A composition's later leg reads a spend it cannot trust as no room, on every axis — not only cost (#3178; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
468
|
+
|
|
469
|
+
- **Before.** The allowance a verification gate's fix leg or a repair loop's later attempt runs on (`laterLegAllowance`) subtracted the earlier legs' reported spend from the task's whole-task ceilings. Only the cost axis read a spend it could not know as "no room"; a negative token count raised the ceiling (a 100-token ceiling with −5 spent dispatched the next leg on 105), and a NaN one rode on to the engine's door as a `maxTokens: NaN` of the caller's own spec, refused there with a sentence that blamed the caller's configuration for a figure the legs reported.
|
|
470
|
+
- **Now.** One reading on all three axes: a spend that is absent, NaN, infinite or negative, held against an armed ceiling, is no room — the composition dispatches no further leg and names the axis (`allowanceExhausted: { axis }`, no `remaining`), as it already did for an unpriced leg under a cost ceiling. A readable spend (zero included) is subtracted exactly as before; an axis with no ceiling never reads its spend. The attribution order is unchanged (tokens, cost, turns).
|
|
471
|
+
- **Consumers.** @server @cli: `verification.allowanceExhausted` can now be `{ axis: "tokens" }` or `{ axis: "turns" }` without `remaining` — the member was already optional on the wire, and absent means the spend on that axis could not be known (never room to spend).
|
|
472
|
+
- **Pins.** `test/backlog3178-allowance-unreadable-spend.test.ts` (negative, NaN and infinite token spend, a negative or NaN turn spend, a negative or NaN priced spend and a suspendable task's `totalTokens` each stop with the axis named and no figure; the attribution order; controls: zero and ordinary spends subtract as before, an axis with no ceiling never reads its spend).
|
|
473
|
+
|
|
474
|
+
### A write removes the staging files a killed process left beside its target and says how many — `fs.staging_file_swept` (#3160; behavior change; hard-breaking: none; closed sets: +1 `EngineNoticeCode` `fs.staging_file_swept`, audience operator, minter engine, open to veto; exports: none) (@server)
|
|
475
|
+
|
|
476
|
+
- **Before.** `NodeExecutionEnv.writeFile` stages `<name>.tmp.<pid>.<hex12>` beside its target and renames it over. Its cleanup runs in the process, so a process killed mid-write (`SIGKILL`, an out-of-memory kill, a container stop) left the staged file — empty, or up to the whole content — in the user's working tree, and nothing removed it or mentioned it: a later write of the same target did not look.
|
|
477
|
+
- **Now.** One reading of the staging name, written once and used by the minter and the sweep alike: a write of a target first removes the staged siblings of that same target whose pid is certainly gone (`ESRCH`), then says so once — `fs.staging_file_swept`, `detail: { count }`, a number and no names — on the env's `onNotice` seat. A name is claimed only when it is exactly the one this target's staging would carry (a long target's cut name included), the file is a plain file with one name (never a link, a directory or a hard-linked file), and its pid is gone: a running writer's staged file — this process's, so concurrent writes of one target, or another process's — is never touched, nor is the target itself (a long target whose own name spells its cut staging name), and the directory swept is the one the staged file lands in (a `..` after a link is the filesystem's to resolve, never folded). There is no start-up scan of the disk; the sweep happens only beside a target that is being written, and only on the staged path (a write that goes in place stages nothing and sweeps nothing).
|
|
478
|
+
- **Closed set +1, three sentences (open to veto).** *What changed:* `ENGINE_NOTICE_CODES` gains `fs.staging_file_swept` (audience `operator`, minter `engine`; 113 → 114; `detail: { count }`). *Who is affected:* @server — any reader that enumerates the notice codes or keeps a whitelist reads one more row (an unknown code reads as `operator`, the registry's default); nothing mints it unless a write found a dead process's staged file. *Compensation:* none needed beyond the new row; an environment with no notice seat sweeps all the same and says nothing.
|
|
479
|
+
- **Known limits.** The pid is read in this host's process table: a staged file written from another host or container through a shared mount carries a pid this host cannot see, and a write of the same target here would remove it while that write may still be running (its rename then fails and says so); a pid reused by an unrelated live process keeps a dead process's file until that process ends. `KL-3160a` / `KL-3160b`. A user's own file that is named exactly like this target's staging file and has a dead pid in its name is removed (claimed by spelling, as `KL-1105-c` states for the memory store); a link, a directory and a file with a second name are not.
|
|
480
|
+
- **Claude Code 2.1.309.** No sweep of this form: its recognizer of its own staging names (`/\.tmp\.(?:[0-9a-f]{8}|\d+\.[0-9a-f]{12})$/`, `cli309.js:252410` col 3095) is used to leave those names out of listings (`:268879` col 22371), and the one orphan cleanup in the corpus — the native installer's `Cleaned up orphaned temp install file` — reads another name family by age, not by whether the pid is alive (`:268681`, the name test at col 4375). A new behaviour, not a divergence from one.
|
|
481
|
+
- **Pins.** `test/backlog3160-dead-staging-sweep.test.ts` (an empty and a large dead-pid file removed with one notice and a count; a fresh create sweeps and a write with nothing to sweep is silent; no name in the sentence or the detail; no seat, no sound; this process's and its parent's staged files untouched; twelve concurrent writes of one target with one dead file; ten names the sweep must not claim; a directory, a link and a hard-linked file untouched; a cut long name; the target itself never swept; a `..` that walks back out of a link; a write through a link sweeps beside the real target; an aborted call sweeps nothing).
|
|
482
|
+
|
|
483
|
+
### A directory-liveness probe no longer calls an unclassified answer "gone", and a looping link chain has its own file-error word, `symlink_loop` (#3157; behavior change; hard-breaking: type-level — `FileErrorCode` gains a member; closed sets: +1 `FileErrorCode` `symlink_loop`; exports: none) (@server @cli @client-core)
|
|
484
|
+
|
|
485
|
+
- **Before.** The tracked-cwd probe behind Bash's and Monitor's "your working directory is gone" diagnosis read the catch-all `unknown` as death at its link-resolution step (and, through the resolver, on its first stat), because the Node adapter landed a looping link chain (`ELOOP`) in that catch-all. A remote lane that could not even build its sandbox (a 403 on pod create, no CA) answered `unknown` to both probes, and the model was told "the task root directory no longer exists … likely deleted (e.g. rm -rf)" — a false cause that it relayed to the person.
|
|
486
|
+
- **Now.** One reading: death only from a code that says so. The Node adapter answers a looping chain (a link to itself, a cycle of links, a chain past the platform's follow limit) with its own word, `symlink_loop`; `isDeadCwd` reads `not_found`, `not_directory` and `symlink_loop` as an unusable directory at each of its three steps and never `unknown`. A probe that answers `unknown` leaves the command to run, and Bash reports the spawn's own error. The written exception and its second predicate are gone.
|
|
487
|
+
- **Not moved, on purpose.** `symlink_loop` is not an absence. The shell read station's door, its verdicts on a command that names a looping path (an approval card, as before), the deny rows and the link-chain walk all read a looping path exactly as they did when the adapter said `unknown`. Claude Code 2.1.309 resolves a looping path the same way — to *unresolved*, not to "nothing is there": its path walker `Ce` reports an absence only for `ENOENT` / `ENOTDIR` and hands every other errno (`ELOOP` included) to `nn`, which marks the ancestry unverified (`cli309.js:251972`: `nn` col 1736, its benign set at col 1881, `Ce`'s absence report col 5946 and its hand-off to `nn` col 6107), and its screen / permission resolver `En` answers `{ unresolved: true, reason: "past-a-link" }` for it (`:251972`: the explicit `ELOOP` flag `h` at col 15499, `B()` at col 15881 and 15972, the hand-off at col 16310).
|
|
488
|
+
- **Hard-breaking, three sentences (open to veto).** *What changed:* `FileErrorCode` gains `symlink_loop`, and the Node adapter's file operations answer it where they answered `unknown` for an `ELOOP` (`fileInfo`, `canonicalPath`, `listDir`, `readLink`, the reads). *Who is affected:* @server, @cli and @client-core — a type-level consumer with an exhaustive `switch` or a `Record<FileErrorCode, …>` over the union stops compiling until the word has a case, and code that matched the old `unknown` for a loop by code reads `symlink_loop`; nothing in this engine keyed on `unknown`. *Compensation:* read `symlink_loop` as `unknown` wherever the answer was a failure (that is what it was) and with `not_found` / `not_directory` only where the question is "is this a usable directory"; an adapter that never says it (a remote one) keeps working — its `unknown` now simply means "not dead".
|
|
489
|
+
- **Consumers.** @server: no change needed; a lane whose probes answer `unknown` now gets the spawn's own error through instead of the "no longer exists" sentence. @client-core: a `Record<FileErrorCode, …>` needs the new key. @cli: none beyond the type.
|
|
490
|
+
- **Pins.** `test/backlog3157-dead-cwd-certain-codes.test.ts` (the adapter's word over a leaf self-loop, a two-link cycle and an ancestor loop; `isDeadCwd` over the same real loops and every placement of `unknown` on scripted faces; the Bash sentence for the double-`unknown` face; and the stations that must not move — the door's record, eight verdicts on looping paths with the ENOTDIR control and the deny rows, the chain walk). `test/backlog1018-monitor-dead-cwd-preprobe.test.ts` re-pinned: its "`unknown` ⇒ dead" cells now read "not dead, the spawn runs"; loops read `symlink_loop`.
|
|
491
|
+
|
|
492
|
+
### A PermissionRequest hook's refusal says a hook refused, instead of "this run has no interactive approval channel" — the approver names which machine seat answered with `decidedVia` (#3169; ruled C-R1024 R2, addendum 1; aligned with Claude Code 2.1.309, which hands the hook's message to the model as the refusal (`iPt`, `cli309.js:288208`; `runHooks`, `cli309.js:295883`) — the hook's words are fenced here, the existing divergence kept; behavior change; hard-breaking: none; closed sets: +1 new `DECIDED_VIA` (`policy`, `permission_request_hook`); exports: +1 root value `DECIDED_VIA`, +1 root type `DecidedVia`; members: +1 optional `AskOutcome.decidedVia`, +1 optional `HostDecisionFacts.decidedVia` (`hostDecision.decidedVia` on a decide; wire +1 optional key)) (@cli @client-core @server @test)
|
|
493
|
+
|
|
494
|
+
- **Before.** A refusal the approval channel reported as the deployment's policy (`settledBy: "policy"`, or a decide's `hostDecision.decidedBy: "policy"`) always read "approval required for `<tool>` but this run has no interactive approval channel … The deployment's policy declined this tool use … Action requires interactive approval and permission prompts are not available in this context", with the reason as a policy note. A shell that ran a PermissionRequest hook and got a deny could only report it that way, so under `-p` / the SDK the model was told nothing could answer, when a hook had answered, and its reason arrived as the deployment's note.
|
|
495
|
+
- **Now.** The outcome object (and the decide's facts) may name the seat: `decidedVia: "permission_request_hook"` makes the sentence "a PermissionRequest hook denied this call to `<tool>`[: <ask>]", then "The call did NOT run. Do not claim it succeeded and do not retry it unchanged; report what was blocked and why you needed it, then continue with the parts of the task it does not block.", and the hook's reason inside an `UNTRUSTED hook reason` fence (none ⇒ no fence). `"policy"`, or no member, keeps today's sentence byte for byte. On a durable resume the continuation reminder names the same decider ("was DENIED by a PermissionRequest hook, not by a person"). The record does not change: `policy_refused` / `policy_allowed`, `who.party: "policy"`. A value outside the set, or the member beside a person's word or an elapsed window, is refused loudly (synchronous: a fail-closed deny settled `approver_contract`; durable: pre-CAS `checkpoint.invalid_outcome`, `detail.field: "hostDecision"`); the refusal names the member, not the value. A plan pause's decide takes the member under the same screen and its reminder still names the party only (KL-3169-a).
|
|
496
|
+
- **Consumers.** @cli: the hook settle path (`settleCardHookResults`' deny arm) sends `decidedVia: "permission_request_hook"` beside `settledBy: "policy"` (L-2199); a hook's allow may carry it too — it is screened and not read. @client-core: the package's hook deny sends the same word (CC-1114); the member is +1 optional on the outcome type. @server: pass `hostDecision.decidedVia` through your decide door unchanged (+1 optional key; a door that copies `decidedBy` and `approver` member by member must copy it too, or the resumed leg reads the deployment's sentence). @test: the two sentence forms above, the byte-identical policy sentence, and the two loud refusals are the black-box surface.
|
|
497
|
+
- **Pins.** `test/backlog3169-decided-via-hook-refusal.test.ts` (both doors and the durable leg: a hook's deny with and without a reason, the fenced reason, the policy word and its absence byte-identical to the 1016 sentences, the continuation reminder naming the hook, the out-of-set value and the member beside a person / a timeout / a sweep refused on each door, the plan pause accepting it, the closed set at the package root).
|
|
498
|
+
|
|
499
|
+
### A shell read through a link chain meets a deny rule on a directory the chain passes through, as the Read tool already did (#3168; aligned with Claude Code 2.1.309 `En` (cli309.js:251972), whose permission spellings carry each leaf link's target; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @test)
|
|
500
|
+
|
|
501
|
+
- **Before.** With `link → mid/hop` and `mid/hop → ../final/f.txt` and a deny `Read(/mid/**)`, `cat link` was judged on its spelling (`link`) and on where it lands (`final/f.txt`) only, so the file's content reached the model, while the Read tool on `link` was refused (the gate's reading of a call's target judges each hop of the leaf chain). The write face had the same gap: `echo x > link` under `Edit(/mid/**)` wrote `final/f.txt`.
|
|
502
|
+
- **Now.** One reading for both faces: the shell read station reads the target's leaf symlink chain through the reader a call's target reading uses (`symlinkChainHops`), behind the same gate (`leafChainMayHold`, `src/core/path-identity.ts`: only where a link may be on the way), and judges every hop as a deny view on the read and the write face. The gate also opens on a target that did not resolve as it is spelled — a leaf link whose own target does not exist yet (`mid/hop → ../final/new`) is a hop, so `echo payload > final/new; cat link` is refused before anything is created. The pre-spawn identity check compares the hops as well as the landing: a chain re-pointed through another directory onto the same terminal, between the approval and the spawn, is judged again rather than run. A chain the environment could not read is recorded at the station's door like any lookup that gave no answer (the command is `unanswered`); an environment that declares no chain reader adds no hop.
|
|
503
|
+
- **Not covered (stated).** A link in a PARENT directory of the target (`d/f.txt` with `d → mid/hop`) is not a hop of the leaf chain — the reference judges leaf hops only, and so do both lanes here.
|
|
504
|
+
- **Who needs it / who is hurt.** *Needs it:* a person whose deny names a directory that a link chain runs through. *Hurt:* a command that read or wrote through such a chain now stops with the read-deny sentence naming the hop; a shell operand that resolved through a link, climbs a `..`, or does not exist yet costs one chain read of the environment.
|
|
505
|
+
- **Consumers.** @cli: the acceptance's `cat link` construct (TRIAGE157-A side note d) is refused with the engine's read-deny sentence; no shell change. @test: re-verify `link → mid/hop → final/f.txt` × {Read, `cat`} under `Read(/mid/**)` — both refused — and a direct `final/f.txt` read under the same rule, which reads.
|
|
506
|
+
- **Pins.** `test/backlog3167-3168-layer-root-and-chain-hops.test.ts` ⑤–⑩ (a real Runner: the Read tool and `cat link` refused in `default` and `bypassPermissions`, `echo x > link` writes nothing; controls `cat final/f.txt`, `Read(/final/**)`, `Read(/link)`; an environment without a chain reader adds no hop, a plain operand costs no chain call; ⑨ an approved `cat link` whose chain is re-pointed through `mid/` before the spawn is refused; ⑩ a dangling chain through `mid/` is refused for `cat` and for a write-then-read, a plain missing file reads as before).
|
|
507
|
+
|
|
508
|
+
### `pathBases` states how a settings layer's `/x` is anchored: one rule set per layer, `root` = the layer's root (#3167; docs and contract pins; behavior: none; hard-breaking: none) (@server @client-core @cli)
|
|
509
|
+
|
|
510
|
+
- **What.** Claude Code 2.1.309 reads a rule's `/x` at the root of the settings layer the rule came from (`zBt` (cli309.js:258818) → `ZLe` (cli309.js:253192) → `swn` (cli309.js:252700)): the user layer at its configuration directory, the project and local layers at the working directory; a relative pattern reads at the working directory, `~/` at the home. The engine's seat for that root is the rule set's declared `PermissionRulePolicyOptions.pathBases`, now stated on the option: one set per layer, `root` = the layer's root, `cwd` = the task root. Rules of several layers merged into one set read every `/x` at that one set's root — how a user-layer `Read(/secret/**)` came to guard `<task>/secret` and leave `<config>/secret` readable.
|
|
511
|
+
- **Consumers.** @server: build one rule-list policy per settings-layer root (`pathBases: { root: <layer root>, cwd: <task root>, home }`) instead of one policy over the merged list. @client-core: carry each rule's layer root to the server (CC-1113). @cli: L-2197 follows from those two; nothing in the engine changes.
|
|
512
|
+
- **Known (stated).** A rule imported from a user settings layer into the person's stored rows is anchored at the task root, not at the configuration directory (#3182) — from this release a user layer's `/x` is not imported (the section on the settings import above, #3191).
|
|
513
|
+
- **Pins.** `test/backlog3167-3168-layer-root-and-chain-hops.test.ts` ①–④ (a real Runner: one set at the task root guards only `<task>/secret`; one set per layer guards both directories for Read and `cat`; `//` and `~/` read alike under either root; a relative pattern reads at the declared `cwd`, else at the declared root).
|
|
514
|
+
|
|
515
|
+
### The kernel contract number is 7 — a mod package written against contract 6 is refused (#3009, #3008, #3058; mods S3b; hard-breaking: yes, open to veto; closed sets: none of its own; exports: none — the value of `KERNEL_CONTRACT_VERSION` moves, its name does not) (@server @cli @client-core @test)
|
|
516
|
+
|
|
517
|
+
- **Hard-breaking, open to veto: a mod package written against contract 6 is refused (@server @cli @client-core @test).** What changed: `KERNEL_CONTRACT_VERSION` is 7 (7.60.0 shipped 6), raised once for this release's `MOD_EVENT_TABLE` changes — `session.receive`, `session.append`, `session.send` and `session.compact` have stations, and `agent.spawn`, `session.append`, `session.send` and `session.compact` have a `call` column, so a `$` call of each reaches the host's entry (the sections below); `loadModPackage` loads only a package whose `hooks.json` states `"contract": 7` (`src/core/mods/package.ts:72-73`), and `@sema-agent/mods-kernel`, which compiles the same source, answers the same number. Who is hurt: every mod package written for 7.60.0 — it states `"contract": 6` and is refused at load with a sentence naming both numbers (a deployment loading a real package, the CLI's package leg, test's real-package fixtures), and a host that compares two kernel copies for equality; a consumer that spells the number in a fixture or a pin raises it (this repo's three fixtures, `test/fixtures/mods/{diff,sec-default,telemetry}/hooks/hooks.json`, were raised to 7). What to do instead: set `"contract": 7`; contract 7 only adds the four stations and the `call` columns, so a package that names none of them needs no other change.
|
|
518
|
+
- **Pins.** `test/mods-real-e2e.test.ts` D3 (a package that states no number, the number minus one, the number plus one or the number spelled as a string is refused, naming the engine's number); `test/mods-kernel.layering.test.ts` and `test/backlog2104-mods-kernel-publish.test.ts` (the root export and the package copy answer one number); `test/backlog3009-session-receive-send-compact.test.ts`, `test/backlog3008-session-append.test.ts`, `test/backlog3058-agent-spawn-entry.test.ts` and `test/backlog2457-2458-mods-wave3-stations.test.ts` (the number is at least the one that carries their rows).
|
|
519
|
+
|
|
520
|
+
### A frame the session receives, a message it sends and a compaction pass each pass one station — `session.receive`, `session.send` and `session.compact` have stations, and `$.session.send` / `$.session.compact` are callable (#3009; mods S3b-2, design/1398-s3b-s4 r1, C-R985; behavior change only where a handler hangs on one of the three; divergences D-S1 / D-S6 / D-S8 / D-S9 / D-S10, open to veto; hard-breaking: H-S1 — the injection outcome words gain `refused`, three sentences below; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` station rows +3 (`session.receive`; `session.send` and `session.compact`, each with a `call` column), `NOTIFICATION_INJECTION_OUTCOMES` +1 (`refused`), +2 new — `SESSION_RECEIVE_ORIGIN_KINDS` (5) and `SESSION_SEND_ORIGIN_KINDS` (2); exports: +2 root values `SESSION_RECEIVE_ORIGIN_KINDS`, `SESSION_SEND_ORIGIN_KINDS`, +4 root types `SessionReceiveOrigin`, `SessionSendOrigin`, `SessionSendAnswer`, `SessionCompactAnswer`; members: +1 optional `requestedBy` on `compacted` and on `compaction_outcome` (wire +1 optional key each)) (@server @cli @client-core @test)
|
|
521
|
+
|
|
522
|
+
- **Before.** `session.receive`, `session.send` and `session.compact` were names in the table with no station: a registration that selected one was refused at admission. A frame reached the model by three paths — pushed on the live lane (a task's notification, a teammate's message, a host's `notify`, a peer letter the session box injects), redelivered at a run's turn open, pulled by `ReadInbox` — and none of them had a place an extension could read, rewrite or hold it; SendMessage resolved and delivered with no extension asked; a compaction pass had `classic.PreCompact` / `classic.PostCompact` and no way for an extension to veto the pass, hand its own summary or ask for one.
|
|
523
|
+
- **Now — `session.receive`, one station for three faces.** The live lane's subscriber, the turn-open redelivery and the box's `ReadInbox` page (a held letter released onto it included) each hand the frame to the session's receiving station before the hand-over, once (`src/core/mods/session-receive.ts`). With a handler on the event the station raises it; with none — or before the leg's bus is bound — the frame passes as made and nothing is raised. `e = { origin, event, text, agentId? }` plus the identity envelope; `origin` (`SESSION_RECEIVE_ORIGIN_KINDS`: `{ kind: "task", taskType }`, `{ kind: "agent", from }`, `{ kind: "peer", from }`, `{ kind: "host", from? }`, `{ kind: "engine" }`), `event` (`{ taskId, taskType, status, seq? }`) and `agentId` are pinned and read off the frame's typed facts; `text` is what the model would read. `next({ ...e, text })` hands the frame over with that text (what comes up is `{ text }`); `{ consumed: <reason> }` keeps it from the model and it is not owed again — a peer letter's sender gets a `refused` delivery receipt naming the extension and its reason, a teammate's SendMessage reads "Message not delivered: … did not take it", a child's uplink to main reads the same, and the injector answers `refused`. A failure refuses: a handler that throws, runs past its budget or answers a form the station does not take (a blank text included) leaves the frame consumed (fail-closed). A cancel hands it over as made. Every consumed frame is said once on the leg's report sink (`onError`), whichever face it came by.
|
|
524
|
+
- **Now — `session.send`, raised once by SendMessage.** After its pre-delivery refusals (an empty message, `*`, an `@` address, an observer sender or target) and before it resolves the address, SendMessage raises `session.send` once (`src/core/mods/session-send.ts`): `e = { origin, to, text, agentId? }`, all four pinned: `origin` (`SESSION_SEND_ORIGIN_KINDS`: `{ kind: "model" }`, or `{ kind: "plugin", name }` when the call came from `$.session.send` / `$.tool.call`), `to` (the address as the model wrote it), `text`, `agentId`. `next(e)` lets the message go; `{ isDelivered: false, reason }` in place of next keeps it from going — the model reads "Message not sent: extension "x" refused this message before it went: <reason>" (`code: "send_refused"`). A delivery claimed by a handler (`{ isDelivered: true }`), a changed address and a failure before next refuse (fail-closed); a refusal after next is a violation and the message stands. With no handler nothing is raised.
|
|
525
|
+
- **Now — `$.session.send({ to, text })`.** The leg's SendMessage, run as the caller's own call through the leg's `$.tool.call` pipeline (the same gate, rules and approver as a model's call; the station sees `origin: { kind: "plugin", name }`). It answers `{ isDelivered: true }` or `{ isDelivered: false, reason }` (returned, not thrown); a leg with no SendMessage mounted answers "this session has no SendMessage tool (messaging between sessions and agents is not on here)". A key it does not take or a blank `to` / `text` is the caller's throw.
|
|
526
|
+
- **Now — `session.compact`, every pass through one station.** The turn boundary's pass (auto, manual, trim-forced), the prompt-too-long recovery's (forced), the end-of-task pass and `Runner.compactSession` all run through one station (`src/core/mods/session-compact.ts`), raised once where the pass is about to run — after the trigger gate and a valid cut point, where `classic.PreCompact` is raised; that hook is now the station's bottom, with the summary, the commit and `classic.PostCompact`. A pass that never wanted to run raises nothing; with no handler the pass is as it was. `e = { trigger, instructions?, agentId? }`, all pinned; `instructions` is the text a claimed manual request named, present only then. `next(e)` answers the pass's outcome once it has ended, `{ outcome, tokensBefore?, freedTokens? }`. In place of next: `{ skip: <reason> }` blocks the pass (`compaction_outcome` `blocked`); `{ summary: <text> }` is the pass's summary through the summary seat a deployment's provider answers — no model call, and neither `classic.PreCompact` nor `classic.PostCompact` is raised (a split turn or the provider's reuse cap bypasses the seat; the model summarizes and the report sink says the handler's summary was not used). A skip or a summary after next is a violation and the pass stands; one handed up from below — a handler under it answered it in place of its own next, so nothing ran — still stands in place of next. A failure before next blocks the pass, said on the report sink. On a `forced` pass every refusal is said and ignored, and the pass runs as with no handler.
|
|
527
|
+
- **Now — `$.session.compact({ instructions? })`.** From a handler of the boundary's `turn.complete` (any handler of its chain), called directly while that dispatch runs, it runs the boundary's own pass then and there as a manual request (it coalesces with any `compact()` request parked on the seat), under the caller's frames, and answers `{ outcome }`; the frame that ends the pass — `compacted`, or `compaction_outcome` — carries `requestedBy: { kind: "extension", name }`. Called anywhere else — a handler of an event raised while the turn runs, a call nested in another dispatch at the boundary — it throws "<name>: $.session.compact: not called from a turn.complete handler; the conversation compacts between turns, so call it from turn.complete or later", and the same sentence goes to the report sink. A call while the boundary's in-place pass runs is refused ("a compaction is already running at this boundary"); a call kept for after the dispatch ended (a timer, a later chain) is refused ("called after the turn.complete dispatch it was made in had ended; …", said on the sink too); a pass a handler started and did not await ends before the boundary moves on. It is not on `$` of `Runner.compactSession` (there is no turn).
|
|
528
|
+
- **Hard-breaking (H-S1) — `refused` is an injection outcome.** *What changed:* `NotificationInjectionOutcome` / `NOTIFICATION_INJECTION_OUTCOMES` gain `refused` (and `NotificationDisposition` with it): the engine's injector answers it for a pushed frame the receiving station consumed, and `deliverToRunningAgent`'s `ok: false` reasons gain it. *Who is affected:* a host that switches exhaustively over the outcome words (a TypeScript `never` check) or mirrors them in a table — server, cli and client-core origin/main read none of them (no `NotificationInjectionOutcome`, `NOTIFICATION_INJECTION_OUTCOMES`, `parked_durably` or `dropped_duplicate` outside their docs); a host-wired injector (`TaskRegistry`'s notify seat) is not asked to answer it. *What to do:* add an arm for `refused` (the frame was not handed to the model and is not owed again; the receipt names who) — `isNotificationInjectionOutcome` already accepts it.
|
|
529
|
+
- **Divergences, open to veto.** D-S1: a `session.receive` handler's failure consumes the frame; Claude Code 2.1.309 skips a failed handler and consumes only a frame it could not give its hooks (`ee` (cli309.js:256939)) — an input station that can keep a frame from the model fails closed here. D-S6: `{ summary }` is a text through the existing summary seat; the reference takes replacement messages (`Fu` (cli309.js:255554)). D-S8: `e.instructions` is pinned and carries only the claimed manual request's text — the one door for a pass's instructions stays `classic.PreCompact`'s `additionalInstructions`; the reference lets a handler change them (`Fu` (cli309.js:255554)). D-S9: `$.session.compact` runs in place only when called directly from a `turn.complete` handler and is refused anywhere else, with the reference's sentence; the reference compacts from any point outside a held turn (`jPo` (cli309.js:263417), `turnHeld` (cli309.js:266857)); a compaction switched off answers `{ outcome: "disabled" }` here where the reference throws. D-S10: `session.send` is raised once, before the address is resolved, and `to` is the address the model wrote; the reference raises after resolution (`qa` (cli309.js:288155)) — SendMessage resolves on three arms (a peer session, `main`, the task registry), each on its own, so there is no single point after resolution.
|
|
530
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment that holds or scrubs what reaches the model from outside the conversation (a webhook's text, a peer's letter), that gates which sessions and agents a run may message, or that shapes or vetoes compaction (its own summarizer, a quiet window). *Affected:* a run with a handler on one of the three — a frame it consumed is on the host's stream (the `task_notification` event is emitted when the frame arrives, before the station answers; KL-3009-a) and not in the conversation; a message it refused is not sent; a pass it skipped does not run. *Compensation:* the report sink names every consumed frame and every refusal nothing else says; with no handler nothing is raised and nothing changes.
|
|
531
|
+
- **Consumers.** @server: `compacted` / `compaction_outcome` may carry `requestedBy` (an object `{ kind: "extension", name }`) — the two projections name their keys (`src/trace/project.ts`'s compacted mint, `compactionOutcomeEventData`) and `src/trace/core-keyset-guard.ts` reads the core key sets, so the key is +1 on each to project or list as dropped; a peer letter's `refused` delivery receipt may now name an extension in its `detail`; the H-S1 arm above. @cli: render `requestedBy` on the compaction divider or drop it; a teammate receipt can read "Message not delivered: … did not take it"; the H-S1 arm. @client-core: the two origin closed sets are the shapes `e.origin` takes; `requestedBy` is attribution; the H-S1 arm. @test: the three rows, the two closed sets, the outcome word and the answer forms above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `Prepared.receiveSeat` / `turnOpenRedelivery` / `compactStation`, `FrameSettlement.consumed`, `ToolExecuteContext.sendStation`, `LegFacadeSeats.sessionSend` / `sessionCompact`, `TaskNotificationPayload.received` (the station's copy of a frame it rewrote — engine-internal, never on the wire).
|
|
532
|
+
- **Pins.** `test/backlog3009-session-receive-send-compact.test.ts` (K the three rows, the closed sets and the contract number; P6 a real Runner: a host notify consumed, rewritten, failed and with no handler, and a session box's pushed and pulled letters consumed — neither read by the model, both out of the box, the sender told `refused` naming the extension — and rewritten on the pull; P7 SendMessage with the station: a refusal in place of next, the go-ahead and `e`, a claimed delivery, a changed address, a refusal after next, no handler, `$.session.send` through `$.tool.call` and with no SendMessage mounted on a real Runner; P8 `Runner.compactSession` with a skip, a summary (no model call, no classic hooks), a skip after next, a throw, a bad form, next's outcome and no handler; `$.session.compact` in place from `turn.complete` on a real Runner — the outcome, `requestedBy`, `e.instructions` and the summary request carrying them — with compaction off, from a handler mid-turn and nested in the pass (refused, said on the sink), from a handler below one that forwards next (runs), kept for after the dispatch ended (refused, said, no pass) and not awaited (the next model request comes after the pass), and with a bad argument; P6i a held letter approved and then pulled passes the station; P8k a summary or a skip handed up through a forwarding handler stands). `test/mods-kernel-296.test.ts` counts the three stations and `test/mods-kernel-wave2.test.ts` the two `call` columns. Q: an unheard seat — unbound, or no handler on its event — adds no suspension point of its own (each of the three entries, and `session.append`'s, reads one predicate first and synchronously; the compaction entry hands back the lane's own pass); the one hop a run with no handler gains is the boundary's call of its compaction section, now one function the boundary and `$.session.compact` in place both run (`test/forward-subagent-events-drain.test.ts` 62 → 63).
|
|
533
|
+
|
|
534
|
+
### A run whose model kept sending unparseable tool calls, or kept hitting the output cap, now ends `failed` with a code and a sentence instead of an empty `completed` (#3165; behavior change; hard-breaking: none; closed sets: the failed terminal's `errorCode` values +2 — `model.malformed_tool_use_exhausted`, `model.truncated_output_exhausted` — and `errorClassOf`'s exact `output` rows +2; exports: none) (@server @cli @client-core @test)
|
|
535
|
+
|
|
536
|
+
- **Before.** When every tool call of the model's turns arrived unparseable until the engine's retry budget ran out (two retries), or the model's answer kept ending at the output cap until the continue budget ran out (three continues), the loop stopped on its own exit word — but the run's result was read off the last message alone, so it ended `completed`, often with an empty result, no error code and nothing on screen to say the work never finished.
|
|
537
|
+
- **Now.** One rule: the word the loop's last exit named reaches the run's terminal. Those two exits end the run `failed`, with `errorCode` `model.malformed_tool_use_exhausted` and the message "The model's tool call could not be parsed (retry also failed)." (Claude Code 2.1.309's sentence, `cli309.js` L273678), or `model.truncated_output_exhausted` and "The model's response exceeded the output token maximum (continuing also failed)."; the text the model reached stays in `result`. Every other exit reads as before; a streak the model recovers from still completes. `errorClassOf` reads both codes as `output`.
|
|
538
|
+
- **Wire, three sentences.** *What*: a failed terminal can carry two new `errorCode` values, `model.malformed_tool_use_exhausted` and `model.truncated_output_exhausted`, on runs that used to report `completed`. *Who*: hosts and projections that route a failed run by code or show its message. *How*: no key changes shape; a consumer that pins a closed set of `errorCode` values adds these two, and one that keeps a default arm for unknown codes shows the message as given.
|
|
539
|
+
- **Consumers.** @server: the run's status projects from the terminal as it does for every failed run, so a run that used to end `completed` now ends `failed` with `model.malformed_tool_use_exhausted` or `model.truncated_output_exhausted`; add both to any `errorCode` closed set or error-mapping table you pin. @cli: such a run reaches you as any failed run does, with the sentence as its message; add both codes to any `errorCode` closed set you pin. @client-core: the failed terminal reaches your projection the same way; add both codes to any `errorCode` closed set or code switch you pin (a switch with a default arm needs nothing). @test: the s139d malformed-turn cell (Anthropic route) now reads `failed` with `model.malformed_tool_use_exhausted`, and an output-cap streak reads `failed` with `model.truncated_output_exhausted`; both join the expected `errorCode` set.
|
|
540
|
+
- **Pins.** `test/backlog3165-loop-exhaustion-terminal.test.ts` (a scripted brain through the real Runner: each exhaustion fails with its code, sentence and request count; a recovered malformed streak, a recovered output-cap streak and a plain empty `stop` complete; the real Anthropic lane over SSE: an unnamed `tool_use` every turn, a `max_tokens` stop every turn; the class fold).
|
|
541
|
+
|
|
542
|
+
### A classifier seat retired for its rate limit is now told to the person, as `classifier.unavailable` is (#3166; ruled C-R1020 A; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
543
|
+
|
|
544
|
+
- **Before.** When the auto-mode classifier model was rate limited on several classifications in a row and stopped being asked for the rest of the run, `classifier.seat_rate_limited` went to the operator only: every later gated call in the person's run was judged by the main model instead, and the person was not told.
|
|
545
|
+
- **Now.** The notice's audience is `user` — the same as `classifier.unavailable`, which tells the same consequence (the classifier is not the one ruling). It still carries `sessionId` at the top level and in `detail`, and the operator still hears it through the notice sink.
|
|
546
|
+
- **Consumers.** @server: `noticeAudienceOf("classifier.seat_rate_limited")` now reads `user`; your engine-notice wire gate will ask you to enroll the code (it is in your rejected table today with the reason "core reads operator") — enrolling it puts the line on the session's event stream; nothing else changes. @test: the core3166 check (the run event stream's `engine_notice` with `sessionId`, the `-p` lane's `_sema_engine_notice`, the TUI fallback line) can run once the server enrolls the code.
|
|
547
|
+
- **Pins.** `test/backlog3166-seat-rate-limited-audience.test.ts` (the audience row reads `user`, as `classifier.unavailable`'s; the notice minted on a real Runner carries the run's `sessionId` at the top level and in `detail`; the contract sentence names `sessionId?`).
|
|
548
|
+
|
|
549
|
+
### Every conversation row passes one admission seat at its first commit point, and an extension can rewrite its text there — `session.append` has a station, and `$.session.append` adds an extension's own note (#3008, #1933; mods S3b-1, design/1398-s3b-s4 r1, C-R985; behavior change only where a handler hangs on `session.append`; divergences D-3008-a / b / c / e, open to veto; hard-breaking: none; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` station rows +1 (`session.append`, with a `call` column), +2 new — `SESSION_APPEND_DOORS` (6) and `SESSION_APPEND_ORIGIN_KINDS` (5); exports: +2 root values `SESSION_APPEND_DOORS`, `SESSION_APPEND_ORIGIN_KINDS`, +4 root types `SessionAppendDoor`, `SessionAppendOrigin`, `SessionAppendAnswer`, `RowRewrittenBy`) (@server @cli @client-core @test)
|
|
550
|
+
|
|
551
|
+
- **Before.** `session.append` was a name in the table with no station: a registration that selected it was refused at admission. A row reached the conversation through about two dozen write points — the harness's commit of a row the loop ended, its API-failure record, its port, and each of the runner's direct writers (the restated postures and styles, the advisor's restate, the git lane's notes, the interruption reconcile and marker, the compaction's restore frames) — and none of them had a place an extension could read or scrub a row before the model and the store kept it.
|
|
552
|
+
- **Now — one seat.** Each writer calls the seat once at its first commit point: the harness for the rows it commits, every direct writer through one helper (`appendAdmittedRow`, `src/core/row-admission.ts`). With a handler on `session.append` the seat raises the event once per row; with none — or before the leg's bus is bound — the row passes as made and nothing is raised. `e = { door, origin, agentId?, message }` plus the identity envelope; `door`, `origin` and `agentId` are pinned and read off the row's own typed facts (no writer names them): `door` ∈ `prompt` / `note` / `delivery` / `attachment` / `response` / `tool-result`, `origin` ∈ `host` / `engine` / `model {model}` / `tool {tool}` / `plugin {name}`.
|
|
553
|
+
- **Now — a rewrite is text, in place.** `next({ ...e, message })` with changed text keeps the row with that text: a text block's text or a string content changes; every other block stays (the same blocks in the same order) and every member beside `content` is pinned. The change is made on the row itself, so the live context, the next request, the stored row, a frame's settlement and the prompt's receipt all read the same object; the row gains `rewrittenBy` (the extensions whose `next` handed a change on). A rewrite of a pinned part, a blank text, a change of the content's form (a string stays a string, a list of blocks a list), or a rewrite of a row whose content another reader holds by its exact text (a prompt carrying the engine's frames, a row the engine minted, an attachment's row) is not kept: the row is kept as made and the leg's report sink (`onError`, `phase: "hook"`) says why. A rewritten tool result is a host-side decision of what the model reads — the same settlement as a host's `updatedOutput`: a `ReadInbox` record the rewrite took out is withheld by the host side and not delivered again.
|
|
554
|
+
- **Now — what is a violation.** A changed `message.role` or naming member (`toolCallId`, `toolName`, `customType`), an answer without `next`, a row other than what `next` answered, a deny after `next`, a deny of an engine row, a deny without a reason — each is said on the report sink and the row is kept as made. A failing handler is skipped: before its `next` the row is kept as made, after it the row as kept stands. No engine row is dropped, none is kept twice.
|
|
555
|
+
- **Now — `$.session.append({ message: { role: "user", content }, agentId? })`.** An extension's own note: minted as an engine-note user row, handed to the leg's harness through its own port, raised under the caller's frames (door `note`, origin `{ kind: "plugin", name }`, the caller's own handlers out). It answers `{ message }` (the note as admitted) or `{ deny }` (a handler's deny before `next`; nothing is kept). `{ message }` means the note is in the conversation the leg goes on with: stored at once when no turn runs and nothing is held before it, else at the run's next serialization point (the next request reads it); a leg that parks durably before that point carries it on its checkpoint and the resumed leg stores it once, and once the park is taken the call is refused (#3217, its own section). A system row, a non-text block, a blank text, another leg's `agentId` or a key it does not take is the caller's throw.
|
|
556
|
+
- **Divergences, open to veto.** D-3008-a: `uuid` is not on `e` (a sema row has no id before it is kept). D-3008-b: a note whose handler fails is kept; Claude Code 2.1.309 refuses it (`ee` (cli309.js:256939)) — dropping an engine-minted row would leave a hole in the transcript, and the note is the extension's own act (KL-3008-a). D-3008-c: a prompt carrying the engine's frames, a row the engine minted and an attachment's row keep their content (the frame receipts and the attachment record read it by its exact text; KL-3008-c); a tool result's `isError` is pinned. D-3008-e: six doors, not the reference's twelve (`P` (cli309.js:296238)) — the doors this version's commit points produce (a compaction's summary is its own entry, not a conversation row; the engine writes no command row; hook context rides the prompt's frames; the queue door arrives with #3010). A door is added to the closed set (+1) in the version whose raise produces it.
|
|
557
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment that scrubs credentials or personal data out of what the model and the transcript keep, and an extension that leaves a note for the model. *Affected:* a run with a handler on `session.append` — its rows may carry rewritten text and `rewrittenBy`, and a handler that fails leaves the row as made (KL-3008-a); the stream a host reads before the commit point (a reply's deltas, a tool's end frame) carries the row as made (KL-3008-b). *Compensation:* the report sink names every row not kept as handed on; with no handler nothing changes — no row gains a member and no event is raised.
|
|
558
|
+
- **Consumers.** @server @cli @client-core: `SESSION_APPEND_DOORS` is six words; a reader that switches on `door` closes over these six, and a door added later arrives as closed set +1 in the version that raises it. @server: a stored row may carry `rewrittenBy` (an array of extension names); pass it through like any optional member — no key is required. @client-core: `rewrittenBy` is attribution for a row's text; render or drop it, the row's meaning is unchanged. @cli: no wire word changes; an extension's note is an engine-note user row (rendered like the engine's own notes). @test: the station's row, the two closed sets and the answer forms above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `Prepared.admitRows`, `LegMods.report`, `LegFacadeSeats.sessionAppend`, and `reconcileInterruptedSession`'s optional fifth argument (the seat; a root export — callers that pass four arguments are unchanged).
|
|
559
|
+
- **Pins.** `test/backlog3008-session-append.test.ts` (K the station's row and the closed sets; P1 a real Runner scrubbing the model's turn, the tool's result and the prompt — stored, read by the next request, `rewrittenBy` — and the rewrite made in place; P2 the doors and origins of a real run and of each typed fact; P3 the violations and the rows whose content is held, a failure before and after `next`; P4 `$.session.append` kept, denied, and refused arguments on a real Runner; P5 no handler ⇒ the same rows, a direct writer's row through the seat, and the census of every raw `.appendMessage(` as a commit point that calls the seat; P6 a real package read by `loadModPackage`; P7 a rewrite that changes the content's form is not kept, an extension that erases a `ReadInbox` result's frames settles them as the host's decision (disclosed once, not handed over again); a note admitted before a durable park is #3217's pins). `test/mods-kernel-296.test.ts` counts the new station and `test/mods-kernel-wave2.test.ts` its `call` column; `test/backlog7300-fix-1-readinbox-hook-receipt.test.ts` reads the host-withheld disclosure's wider wording ("as the host side rewrote it (a postToolUse hook or an extension's session.append handler …"); `test/module-size-ratchet.test.ts` raises five runner modules by the seat's lines (contracts +2, prepare-task +4, run-git-lane +1, run-leg +1, run-terminal-adoption +6; the split is #2979).
|
|
560
|
+
|
|
561
|
+
### An extension can start a subagent — `$.agent.spawn({ prompt, ... })` runs the delegation tool's own pipeline as the extension's call, with the subagent in the background, and answers `{ model, agentId }` once it started (#3058 = #2904 S1, ruled C-R995 K1–K7; aligned with Claude Code 2.1.309 `MH.spawn` / `Md` (cli309.js:256893); new capability; behavior change where an extension declares `agent.spawn` in `uses.calls`: the offer is not its boundary, and its spawns share the tree's bound; divergences D-2904-a / b / c, open to veto; hard-breaking: none; contract: raised to 7 in this release, once for the session and `agent.spawn` rows together (the section on the kernel contract number, above); closed sets: `MOD_EVENT_TABLE` `agent.spawn` gains a `call` column (callable engine events +1); exports: +1 root type `AgentSpawnAnswer`; members: `EngineDollar.agent.spawn`) (@server @cli @client-core @test)
|
|
562
|
+
|
|
563
|
+
- **Before.** `agent.spawn` had a station but no `call` column: `$.agent.spawn` threw `not callable on the engine bus in this version`, and `$.tool.call({ tool: "Agent" })` was refused naming `$.agent.spawn` — a door that did not exist. An extension had no way to start a subagent.
|
|
564
|
+
- **Now — one pipeline.** The entry (`createAgentSpawnEntry`, `src/core/mods/agent-stations.ts`) runs the leg's one delegation tool through the same per-call pipeline `$.tool.call` runs: the whole gate (`Agent(<type>)` rules, the mode, `classic.PreToolUse`, `tool.check`, an ask in-stream or not at all — never parked), `tool.call`, the delegation with its `agent.spawn` station, the post-execution stations; every event under the caller's frames, the caller's own handlers out. Its input is the delegation tool's own: `prompt`, `description` (absent: the prompt's first five words), `subagent_type` from `subagentType`, `model`, `name`, `cwd`, `run_in_background: true`. It throws on an empty prompt, outside a running prompt, and when the run mounts no delegation tool or more than one (named).
|
|
565
|
+
- **Now — "started" is one fact, written where the subagent is let run.** The delegation writes `{ agentId, model }` on the extension call's record (`ExtensionCall.launched`) at its two background launch points; the entry answers off that record: `{ model, agentId }` once started (also when a post-execution station withheld the result), `{ deny: <reason> }` when nothing started (the gate's, an extension's, or the delegation's own `Sub-agent not started: …`), `{ model }` without `agentId` when an extension answered the call in place of its body. `agentId` is the id the subagent's events carry (`turn.complete`, `session.end`) — its leg's task id (one reading, `legTaskIdOf`, the one prepare mints a leg's identity by), which for a background subagent is the row's handle the launch card, the completion notification, `TaskStop` and `SendMessage` name (#3193, its own section); `model` is `agent.spawn`'s bottom answer (`inherit` when the child's prepare decides). The result is never read for it.
|
|
566
|
+
- **Now — background or nothing.** An extension's spawn that the delegation would run in the foreground — no background lane on this delegation tool here, or the call as the gate let it go asks for the foreground (a `classic.PreToolUse` rewrite) — is refused before anything is allocated: `Sub-agent not started: an extension's spawn runs in the background, and this one would hold the foreground (…)`, `details.error: "mods.spawn_foreground"`.
|
|
567
|
+
- **Now — one door.** An extension's spawn is a call `$.agent.spawn` made (the call's record names its door, `ExtensionCall.door`): a host tool an extension calls with `$.tool.call` whose body runs the delegation itself is that tool's call, and the delegation runs as it would for the model — the foreground allowed, the offer read.
|
|
568
|
+
- **Behavior changes (@server @cli @client-core).** ① **The offer is not the boundary.** `agent.offer` is what the model is offered; a type it hides is still started by an extension that declared `agent.spawn` in `uses.calls` — the gate and `agent.spawn` handlers still judge it. ② **The tree's bound is shared.** An extension's spawn takes a slot of `RunnerDeps.delegationEntryCaps.maxConcurrent` when its subagent is registered, like the model's own: an extension that starts many can be why the model's next delegation is refused (`delegation.concurrency_cap`), and a full tree refuses the extension's spawn with the same sentence.
|
|
569
|
+
- **Divergences, open to veto.** D-2904-a (K2): the reference runs a foreground spawn and answers after it ends; here it is refused — the reference's own contract says the spawn resolves once the subagent started, and an answer after the child's `turn.complete` leaves a handler that waits on the id with nothing to wait for. D-2904-b (K3): the reference skips the offer for a plugin's spawn on the main loop only; here an extension's spawn is no offer on every leg (one fact: who asked). D-2904-c (K4): the reference counts each plugin's spawns at once on a counter of its own (`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS ?? 20`); here they share the tree's one bound, whose number the deployment sets (it may be above 20) and which counts a spawn when its subagent is registered, not while its call waits at the gate or at a handler.
|
|
570
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an extension that delegates work to a subagent of its own (a reviewer, a background check). *Affected:* a deployment that hides types with `agent.offer` and admits an extension declaring `agent.spawn` (①); a tree whose bound an extension's spawns fill (②). *Compensation:* the gate still judges every spawn (`Agent(<type>)` deny / ask rules, the mode), and an `agent.spawn` handler can refuse by `e` (the spawn's arguments) and `next.origin` (who asked).
|
|
571
|
+
- **Not covered (stated).** The answer arrives once the delegation call has passed its post-execution stations: a fast subagent can complete a turn — or end — before the extension holds its id, and `turn.complete` / `session.end` are raised once. A handler that waits on them records them by `agentId` as they come and reads the record before it waits (`docs/INTEGRATION-CORE.md` §10.13 shows the form); the engine keeps no copy of a completion for a later reader (KL-3058-a). A `SkillSpec` registration hangs `classic.*` events only and is not handed to a child, so it cannot see the events of a subagent it started (KL-3058-b).
|
|
572
|
+
- **Consumers.** @server: a contract-7 package may declare `agent.spawn` in `uses.calls`; the delegation tool's frames for such a call carry `requestedBy: { kind: "extension", name }` and an `ext-` call id, and a refusal reads `details.error: "mods.spawn_foreground"` when the lane is missing. @cli: no wire word changes; a background agent an extension started is an ordinary background agent row. @client-core: the kernel table gains one callable engine event, `agent.spawn` (beside `tool.call`, `session.append` and this version's `session.send` / `session.compact`). @test: the answer forms, the three rules and the throws above are the black-box surface; the contract number stays 6 in this slice. Internal seats that grew: `LegFacadeSeats.agentSpawn`, `AgentStations.extensionSpawn`, `ExtensionCall.launched`, `ExtensionCall.door`.
|
|
573
|
+
- **Pins.** `test/backlog3058-agent-spawn-entry.test.ts` (K the row's `call` column and the contract number; S1 a real Runner: the answer `{ model, agentId }` and `agentId` = the subagent's `turn.complete.agentId`; S2 the caller's own `agent.spawn` handler skipped, another's deny ⇒ `{ deny }` and no child; S3 a type `agent.offer` hides is started; S4 no background lane, and another registration's PreToolUse rewrite to the foreground, ⇒ `{ deny }` with no child; S5 a gate ask with a durable approval lane and no live approver ⇒ `{ deny }`, nothing parked; S6 a full tree ⇒ `{ deny }` with the concurrency sentence; S7 an empty prompt throws, two delegation tools throw naming both; S8 a PostToolUse that fails after the spawn withholds the result and the answer is still `{ model, agentId }`; S9 a slow PostToolUse and a fast subagent: the record-then-read form gets the answer; S10 an extension answering the call in place of its body ⇒ `{ model }`, no child; S11 `$.tool.call` of a host tool whose body runs the delegation is no spawn: the foreground runs and the offer is read). `test/mods-dollar-tool-call.test.ts` reads the Workflow door's sentence in the tree's bound wording; `test/mods-kernel-wave2.test.ts` counts the callable engine events.
|
|
574
|
+
|
|
575
|
+
### A tool the run's deny rules refuse every call of is not in the model's tools block (#3126, ruled C-R219 A; aligned with Claude Code 2.1.309 `aJ`, `cli309.js:262013`; behavior narrowing of the model's view, open to veto; hard-breaking: none; closed sets: none) (@test @cli @server)
|
|
576
|
+
|
|
577
|
+
- **Before.** A `deny` that names a tool whole — an MCP tool (`mcp__srv__tool`), a whole server (`mcp__srv`), `Bash(*)`, a built-in (`Read`) — left the tool in every main request's tools block. The model saw it, planned around it and called it, and only then met the rule's refusal.
|
|
578
|
+
- **Now.** One rule: a tool whose every call the run's deny rules refuse is not shown. Each face that refuses a model's call answers by the whole-tool reading its refusal already takes — the leg's effective policy (the caller's policy, the session's rules, the ancestors' rules and the inherited parent policies, through the new carried member `ToolPolicy.wholeToolRefusals`), the person's persisted rows, the org's rows (an org `Read` / `Edit` row, which the org layer reads at its strictest over the read and write faces, hides every tool whose declared path target is on those faces — its gate refuses every call of them). The faces are read once per main request, the person's rows and the org's from one store read; each face's reading settles on its own, bounded: one that throws or does not answer in time refuses nothing here (its calls still meet the gate) and the others stand. A rule changed mid-run (a session row, a stored row, an org snapshot) binds the next request, and a lifted rule shows the tool again. A rule about some calls of a tool (`Bash(rm:*)`, `Read(./secret/**)`, an org `Bash(echo hi)`) leaves it shown. An ask or an allow hides nothing; a deny wins over an allow, as in the reference.
|
|
579
|
+
- **The gate is unchanged.** The tool stays mounted: a call the model makes anyway (a name it learned earlier in the transcript) meets the gate and the rule's own refusal sentence. ToolSearch searches what the model is shown: a hidden deferred tool is "Not found", and a hidden direct tool is never "Already available". The cache fingerprint and the turn snapshot name the tools actually sent.
|
|
580
|
+
- **Who needs it.** A person or a deployment that denied a tool: the model no longer spends a turn calling it, and the reference shows the same tools for the same rules. **Who is hurt.** A host that read the tools block of a request to learn what the leg mounts sees fewer tools when a whole-tool deny stands (the mount itself — `wiring_manifest`, `Prepared.tools` — is unchanged); a test that pinned a denied tool in a request's tools reads it absent. A permission-rule store, and a session-policy store, counted in reads sees one more read per main request on a leg that wires it — the view's, which lands in the run's reads like any other (a permission-rule store that cannot be read is announced once per run, as before; when a request's view is the first read to meet the outage, the notice still says "for a call"). The read's latency is the request's: a slow store slows every main request, and a store that does not answer holds each main request for the read's bound (14 s for the person's and the org's rows) before the request goes out, as it already held each call. **Compensation.** Read the mount, not the request, for what is mounted; read the request for what the model was shown. A test that scripts a store by read number counts the view's read: on a hands leg with one call per turn the prepare read is read 1, request k's view read is read 2k, call k's read is read 2k + 1.
|
|
581
|
+
- **Not covered (stated).** A skill's `disallowed-tools`, a session's `toolAllow` narrowing and `allowDirs`, an allow list's misses (`createAllowDenyPolicy({ allow })`), and a frozen constraint projection (`{ check }` alone) refuse at the gate as before and keep their tools shown: they carry no whole-tool reading. The deferred-tools boundary reminder (opt-in) still lists a hidden deferred name. A rule changed between a request and a ToolSearch call is read at the next request.
|
|
582
|
+
- **Consumers.** @test: #1303 (e) re-verify — a tool a whole-tool deny names is absent from every main request's tools block, a direct call of it is still refused with the rule's sentence. @cli: the shell renders nothing new (zero change). @server: a projection of the tools a request sent (`lastSentRequest`) reads the view; the mount is unchanged.
|
|
583
|
+
- **Pins.** `test/backlog3126-deny-tools-out-of-table.test.ts` (a real Runner and a real stdio MCP server: the policy face's MCP / server / `Bash(*)` / built-in rules hide, a direct call is refused and the server receives nothing, the ask-ruled and content-ruled tools stay, an ask beside a deny hides nothing, a deny reaches a tool under an alias it answers to; an allow / deny list; session rules written and lifted mid-run; persisted rows and an org snapshot, with a mid-run change; an org `Read` row hiding the path tools on its faces; one store read per request for the person's rows and the org's, each reading settling on its own when the other never answers; ToolSearch's search space; the view's prefix seats, the turn snapshot without a cache fingerprint, and its faces that throw or never answer, inside a fold and a fold of folds; the fold's carry, the approval policy's deny list included; a delegated child's tools block under the parent's deny). Re-pinned (each request's view read counted): `test/backlog1293b-person-path-rows.test.ts` G18 / G19 / G24 / G25 (the store scripted by read number), `test/backlog978-session-rules-every-gate.test.ts` G9 (the session store's reads per run), `test/backlog2265-principal-name-one-judge.test.ts` h1 (the buckets read per run), `test/backlog1022-rewrite-recheck.test.ts` R13 / R15 (the person's store reads per run), `test/backlog7340rj-unread-path-rows.test.ts` ① / ② (the failing reads include the first request's), `test/design389-unified-store.test.ts` §4 (the org fetches per run), `test/permission-rule-v2-wiring.test.ts` design/182 §7 live gate (the time budget under an org source that never answers: each request's read waits its bound).
|
|
584
|
+
|
|
585
|
+
### The TaskOutput tool is removed — a background command's output is its output file (Read), a background agent's or workflow's result is its completion notification (and the `ReadToolResult` ref it names when cut); a background launch — command, watch, workflow, agent or continuation — is admitted only where its completion can come back (#3026 = #1608 C2, the deletion step of design/1056 §1.5 / §2.5, with its R1 admission finished in #3071; ruled C-R675 / C-R976; aligned with Claude Code, which removed the tool — `cli309.js:200080`, retired-name set `:264190`; hard-breaking: yes, three sentences each below, open to veto; closed sets: the tool roster −1 (`TaskOutput`), the catalog −3 rows (`task-output`, `task-output-hands`, `task-stop-hands`), the card vocabulary −1 (`task-output`), `RETIRED_TOOL_NAMES` +3 (`TaskOutput`, `TeamCreate`, `TeamDelete`); exports: −1 root value `createTaskOutputTool`; members: below) (@server @cli @client-core @test)
|
|
586
|
+
|
|
587
|
+
- **Before.** The model could poll any background task with `TaskOutput({ task_id, block, timeout, filter })`; a hand band built without a task registry mounted an env-direct `TaskOutput` / `TaskStop` pair polling the environment by shell id; a Bash started in the background on a mount with no completion sink told the model to poll `TaskOutput`; a Monitor watch's rolled-off spool middle was spilled to the offload store as a ref chain, and a clipped background-agent result was spilled at poll time; a workflow poll that served a terminal state fired the deployment's `ackServed`; `BashOutput` / `AgentOutput` / `AgentOutputTool` / `BashOutputTool` answered `renamed "TaskOutput"` and `WorkflowStatus` `folded into "TaskOutput"`; `TeamCreate` / `TeamDelete` were unknown names.
|
|
588
|
+
- **Now.** No roster carries `TaskOutput`. A call to it, or to any of its earlier names, gets the roster miss plus one removal line: "removed — read a background command's output file with Read (its launch receipt and completion notification name the path); a background agent's or workflow's result arrives in its completion notification (read the full text with ReadToolResult and the ref it names when the notification clips it)"; `TeamCreate` / `TeamDelete` answer "removed — the session has one implicit team: …". A deny or ask list naming any of them refuses the run (`config.legacy_tool_name`); an allow list naming them is reported by the `config.toolpolicy.unmatched_names` advisory (C-R976). Bash offers `run_in_background` (schema and description) only on a mount with a task registry on an environment that runs background processes, and starts one — or adopts a running command — only when a completion sink resolves for the call; otherwise the call is refused before anything starts: "Error (Bash): run_in_background is not available here — …". The background receipts carry no poll sentence; a missing output file is said once ("its completion notification says whether any of its output was kept and how to read it"). A hand band without a registry mounts no `TaskStop`. A Monitor's suppression and storm-kill frames name the watch's output file; a one-shot run's Monitor receipt carries the process-lane sentence the background-command receipt carries. A background agent's report is stored as its result artifact whatever its length (it was stored only when the frame cut it), so a task table or a lost-notification line names a read handle for a short report too — the store is written once per completion. A cut report's frame waits for that write (its cut line names the ref); a report the frame carries whole does not — its ref becomes the row's read handle when the write lands, and only while the row still holds the settle the report belongs to (a revival since, or a re-registration of the same id, keeps its own); a write that fails reaches the deployment's notifier channel (#3071). A background agent's terminal frame names, in `completionId`, the settle its own leg made, read in that settle's step: a leg whose settle was refused because its row was revived since names none (it used to read the row after its awaits and could carry the newer cycle's id, or record its report under it) (#3071). Where nothing stores a cut report (no offload store, or an unconfirmed write) the cut line says it is not readable in this session and points at `SendMessage`; a workflow's unstored record says the same. Every background producer applies the same call-time admission (`admitsBackgroundLaunch` over the one completion-sink resolution, #3071): with no sink for the call — and, for a workflow, no deployment notifier; for a SendMessage continuation, no `notificationWired` channel — a Monitor watch and a workflow run are refused before anything starts, an Agent runs synchronously and says so ("note: this agent ran synchronously — no completion would come back from a background agent on this mount, …"), and a revival or a SendMessage continuation of a finished agent is refused (`revive.no_background`) before the admission charge, the claim and the resume. No face carries a mount-time sentence about a missing sink any more (they used to say the result "is not delivered on this mount"). The host task-handle read face (`TaskRegistry.pollTask`, the server's HTTP read leg) keeps its options, its `details` and its headings (`REPLAY_FACE`); its body's untrusted fence is labelled `task <id>` and its refusals `Error (task poll): …` (they named the removed tool: `TaskOutput <id>` / `Error (TaskOutput): …`). The noun names `UnifiedTaskOutput` / `TaskOutputReplay` / `clipTaskOutput` stay.
|
|
589
|
+
- **Hard-breaking — `createTaskOutputTool` and the two catalog rows.** *What changed:* the root export `createTaskOutputTool` and the `task-output` catalog row (card word `task-output`) are gone; nothing mounts a TaskOutput tool. *Who is affected:* a host that mounts it in `spec.tools` or names it in `excludeTools` / a policy; client-core's `scripts/run-terminal-table-provenance-test.mjs:560` (calls it) and `src/generated/engineFactTables.ts:99` (`"task-output"` card word; the vocabulary floor is bidirectional); a client rendering the `task-output` card. *What to do:* drop the mount and the card arm; read a task through `TaskRegistry.pollTask` (unchanged), drop `TaskOutput` from deny / ask lists.
|
|
590
|
+
- **Hard-breaking — the env-direct band.** *What changed:* `createEnvTaskOutputTool` / `createEnvTaskStopTool` (no root export) and their catalog rows `task-output-hands` / `task-stop-hands` are gone: `createHandsToolkit` without a `taskRegistry` mounts no background-task tool, and its Bash neither offers nor runs `run_in_background`. *Who is affected:* a library caller that built a hand band without a registry and started background commands through it (server, cli and client-core origin/main build none). *What to do:* pass `taskRegistry` and a `taskNotification` sink, or run the command in the foreground.
|
|
591
|
+
- **Hard-breaking — Bash background admission.** *What changed:* a background start or adoption needs a completion sink (the call's run lane, else the mount's `onTaskNotification` / `taskNotification`); without one the call is refused before it starts. *Who is affected:* a library mount with a registry but no sink, run outside a Runner (its receipts used to say "Use TaskOutput … to read output"). *What to do:* wire a sink; inside a Runner the run lane is always there.
|
|
592
|
+
- **Behavior narrowing — the same admission on Monitor, Workflow, Agent and SendMessage continuation (#3071).** *What changed:* where no completion sink resolves for the call (and no deployment channel is wired: a workflow's `notifier`, SendMessage's `notificationWired`), a Monitor watch and a `RunWorkflow` call are refused before anything is spawned or registered, a background-eligible Agent call runs synchronously with one note line, and reviving or continuing a finished agent is refused with `revive.no_background` before its admission charge, claim or resume — they used to start the work and say its result would not reach the model. *Who is affected:* a library mount built outside a Runner with none of the three wired, the operator continuation verb `createAgentContinuationVerb` included (it routes through the SendMessage face; server, cli and client-core origin/main build none of these outside a Runner and call no such verb; inside a Runner the run lane is always there); a fixture that mounted a background Agent or Monitor without a sink and expected a launch receipt. *What to do:* wire the sink (`onTaskNotification` / `taskNotification` / `background.notify` / `notify`) or the deployment channel; a library caller that wants the old start-and-forget shape has none — its result reached nobody.
|
|
593
|
+
- **Hard-breaking — `TaskRegistry.recordArtifactRef` names a settle, not a cycle (#3071).** *What changed:* the third parameter is the row's `completionId` for the settle the stored result belongs to (`string | undefined`, read with `getCompletionId` when that settle ran — every terminal frame carries it), not a revive-cycle number; the write records only while the row still holds that settle, so a late write lands nothing on a row revived since or re-registered under the same id, and a write naming no settle records nothing (the cycle-number reading is gone). *Who is affected:* a host that records a stored ref on a registry row itself — server, cli and client-core origin/main call it nowhere. *What to do:* pass `registry.getCompletionId(id)` read in the same synchronous step as the row's settle — before any await (or the terminal frame's `completionId`) instead of the cycle number.
|
|
594
|
+
- **Hard-breaking — five members.** *What changed:* `WorkflowCompletionNotifier.ackServed` and `RegisterWorkflowInput.onServedTerminal` (the poll-served dedup acknowledgement — only a TaskOutput poll fired it), `TaskPollOptions.toolResultStore` (the poll-time agent spill), `RegisterMonitorInput.toolResultStore` / `MonitorToolOptions.toolResultStore` (the Monitor spill chain; the output file is the full record), and `TaskToolOptions.deadlineMs` / `.notificationWired` / `.toolResultStore` / `.checkpointSeat` (`createTaskStopTool` keeps `registry`, `owner`, `scope`, `sessionId`, `workflowStore`, `agentStore`) are removed, as are `TaskRegistry.markStopSourceByShellId` / `.clearPendingStopSourceByShellId` (only the env-direct TaskStop called them). *Who is affected:* server's `src/boot/runner-deps.ts:865` (`ackServed` in an object literal typed `WorkflowCompletionNotifier` ⇒ excess-property error) and its tests passing `onServedTerminal` (`test/subagent-steer.test.ts:555`, `test/task-handle-verbs.test.ts:144,484`); any caller passing one of the others in an object literal. *What to do:* delete the member — the behavior it fed no longer exists (the completion-inbox entry is the delivery, not a poll's echo).
|
|
595
|
+
- **Retirement lines.** RL-1608 ×9 are deleted with their faces (`createTaskOutputTool`, `createEnvTaskOutputTool`, the two catalog rows, the five earlier-name hints).
|
|
596
|
+
- **Consumers.** @server: the HTTP task-handle read leg's body now opens its fence with `task <id>` (was `TaskOutput <id>`) — a test or a UI matching the old label reads the new one; delete `ackServed` (`runner-deps.ts:865`) and the `onServedTerminal` test seams; `capabilities/hands-lane.ts:133` `HANDS_DUAL_USE_TOOL_NAMES` −`TaskOutput` (the band already filters by roster); `http/route-ctx.ts:793`'s "use the TaskOutput tool" pointer; the SDK's `oneShot` contract text; the completion-inbox journal's `diagnostics: "drop"` (`orchestration/workflow-notify-journal.ts:56,72`) now drops a workflow's only model reader of its record ref. @client-core: `engineFactTables.ts:99` and the vocabulary-floor script, the poll-body fixtures spelling the old fence label (`scripts/run-client-core-diff-test.mjs:730`, `run-client-core-pure-test.mjs:6339,7245`), `run-terminal-table-provenance-test.mjs:560`, `liveInitToolFace.ts` −1, the `task-output` card arms in `toolResult.ts`; the three `planReviewWire.ts` sentences. @cli: the defer-name table / seam query card word; the fence-label fixture in `src/components/tasks/asyncAgentDetailSettledSupply.test.tsx:440`; its own CC port of TaskOutput is its own. @test: the shapes below are the black-box ones; `TaskOutput`, `TeamCreate`, `TeamDelete` are expected-absent names now.
|
|
597
|
+
- **Pins.** `test/backlog3026-taskoutput-retired.test.ts` T1–T12 (the three removal lines on a real Runner; the five earlier names judged retired with the one line; allow → advisory / deny → `config.legacy_tool_name`; the hand band with and without a registry; the sink-less and registry-less background refusals with nothing spawned; a rolled watch's poll body and output file; the one-shot Monitor receipt; the real Runner lane reading a cut report by its ref with no TaskOutput in any roster; the unstored cut sentence); 28 test files moved from the TaskOutput tool to `TaskRegistry.pollTask`.
|
|
598
|
+
- **Known limits.** `KL-1060b` (C-R976): a durable background-agent row a previous process left has no model reader (the host's HTTP read leg reads it). `KL-3026-a` is closed by #3071 (the one call-time admission above). The bare-primitive / frozen-throw gap this settle fence opened on a workflow row is closed in this release by #3155 (below), so it ships as no limit. A one-shot wait the walltime or the ceiling ends still names no owed task (`KL-3025-a`).
|
|
599
|
+
|
|
600
|
+
### A failed workflow's settle id and record reach its task row and its frame whatever the script threw (#3155; behavior change; hard-breaking: none; closed sets: none; exports: none; members: none)
|
|
601
|
+
|
|
602
|
+
- **Before.** A rejection hands its observers only the thrown value. The task row of a `RunWorkflow` run and the run's failure frame read the run's settle id (and the frame its record) off a `workflowRun` property the engine pins on an extensible thrown object, else from the run store. A script that threw a bare primitive (`throw 42`, `throw "s"`) or a frozen object pinned nothing: the frame carried no `completionId`, the row learned no settle id — so under the settle fence above (#3071) the run record's ref was not recorded on the row and a later list named no read handle for it (7.60.0 recorded it) — and with no run store the frame said no record is kept. A frozen throw carrying a `workflowRun` of the script's own making set the row's settle id to the script's value.
|
|
603
|
+
- **Now.** The run is bound to its `done` promise when it starts (`src/core/workflow-settled-run.ts`, one binding in `startWorkflow`); the row's reject leg and the tool's failure leg read the run through the handle, never the throw. Every throw shape: the row holds the run's own settle id (the run still mints it once), the record's ref is recorded on the row, the frame carries the same `completionId`, and the frame names the run's own record with or without a run store. The `workflowRun` property on an extensible thrown object stays for a direct `runWorkflow` caller, who holds no handle.
|
|
604
|
+
- **Wire, three sentences.** *What*: a failed `RunWorkflow` completion frame now carries `completionId` and a record ref on every throw shape (it lacked the id for a bare or frozen throw, and the ref without a run store), and the row's later-list read handle names that record. *Who*: hosts and tests that read a workflow failure frame or a task row's read handle. *Compensation*: none needed — the keys are the ones the other throw shapes always carried.
|
|
605
|
+
- **Who is hurt.** A test that pinned the old store-less sentence ("This failure carries no record of the run's agents and no run store holds one.") — the sentence is gone, the frame names the record.
|
|
606
|
+
- **Consumers.** @server: nothing to change; a failed workflow's frame may now carry `completionId` where it had none. @test: build the bare-throw shapes black-box — a workflow script that throws `42`, `"s"`, `Object.freeze({})` and a frozen object carrying `workflowRun: { completionId: "x" }`: the row's read handle names the frame's record ref, and the frame's `completionId` equals the durable run's.
|
|
607
|
+
- **Pins.** `test/backlog3155-workflow-reject-settle-id.test.ts` (a real Runner, the repo's vm script runner, the real tool, registry and stores: the three throw shapes each record the ref on the row for the run's own settle; a thrown Error unchanged; a forged frozen `workflowRun` names neither the settle nor the record; one settle id across row, frame, durable run and poll; the store-less run names and records its record; the background-agent fence unchanged), `test/run-workflow-tool.test.ts` R4e re-pinned (the store-less bare throw names the run's record).
|
|
608
|
+
- **Known limits.** `KL-3071-a` is deleted (closed by this change).
|
|
609
|
+
|
|
610
|
+
### A resumed leg that ended before its approved action started says what became of its checkpoint (`failed.unstartedRow`), and a cascade no longer re-runs the task from scratch on the next rung while that card waits for the same approval (#3163; behavior change; hard-breaking: none; closed sets: new `unstartedRow` words `reopened` / `declined` / `unknown`; exports: none; members: +1 `TerminalCause` failed `unstartedRow?` (wire +1 optional key)) (@server @cli @client-core @test)
|
|
611
|
+
|
|
612
|
+
- **Before.** Whether a resumed leg's approval still stood was said only in the failure's sentence; the code said it only when the leg had no code of its own (`resume.reopened_unstarted` / `resume.reopen_failed_unstarted` fill an empty code seat). A resume with no wall clock left kept `limits.max_walltime_exceeded`, a rebuilt env whose restore failed kept `resume.env_failed` — the card pending again in both. So `resumeCascade` treated such a rung as an ordinary failed rung: the gate failed it, its session was released and the next rung re-ran the whole task cold while the card still waited for the same approval, and resuming that token later could do the work twice. The workflow lane's park rule read the same two codes and settled those legs as consumed work.
|
|
613
|
+
- **Now.** Both exits that compensate an unstarted resume — the settled result and the thrown leg — state the store's outcome on the failed terminal, `unstartedRow: "reopened" | "declined" | "unknown"`, beside the leg's own code, which still names what ended it. One predicate reads it for both orchestrators (`resumeNeverStarted`, `src/agents/suspend-guard.ts`): a cascade stops at that rung the way it stops at a durable park — no gate, no escalation, no session release, `cascadeOutcome: "exhausted"`, the rung's result handed back unchanged and the same token resuming it again — and a workflow drive re-parks on the prior token. The two-code reading in the workflow lane is retired.
|
|
614
|
+
- **Wire, three sentences.** *What*: one new optional key on a failed terminal, `unstartedRow`, present only on a resumed leg that ended before its approved action started. *Who*: hosts and projections that route a failed resume (server error mapping, client-core projection, cli wording, test criteria). *Compensation*: read `unstartedRow` to tell "the approval still stands, resume the same token" from "the action ran" — the codes are unchanged, and nothing that read them breaks.
|
|
615
|
+
- **Who is hurt.** A host that reads `cascadeOutcome` / `finalRung` after such a resume now sees `exhausted` at the resumed rung instead of a later rung's result; nothing could rely on that escalation, since the card it left behind was still live.
|
|
616
|
+
- **Pins.** `test/backlog3110-cascade-park-seat.test.ts` (#3163, real lanes: the settle exit — resumed with no wall clock left — and the throw exit — the env's restore fails — each stop with `unstartedRow: "reopened"`, no further dispatch, no model request, no session release, the card pending, and the same token then redeems and the ladder climbs on; control: a resumed rung that ran the approved action and then failed carries no `unstartedRow` and escalates); `test/backlog642-workflow-park-lane.test.ts` (a drive failed with `resume.env_failed` and `unstartedRow` re-parks; control: the never-started code with no row outcome settles as its own failed row); `test/gate-outcome-adversarial.test.ts` (`amendTerminal` states the row outcome beside a kept code).
|
|
617
|
+
|
|
618
|
+
### One way media leaves what the model sees — `context.media_removed` — and one request media budget, in base64 characters, trimmed the way Claude Code trims it (#2988, C-R974 S2 — §3.3, Q1 A, Q2, Q4, Q5's request rows, addendum 1; with #3073; behavior change; divergence D-2871-a, open to veto; hard-breaking: ① the notice code and ② the budget knob and its exports, three sentences each below, open to veto; closed sets: `EngineNoticeCode` `context.image_removed` renamed `context.media_removed` (count unchanged), its `detail.reason` pair `MEDIA_REMOVED_REASONS`; exports: −3 root `capAggregateMediaBytes`, `AGGREGATE_MEDIA_BUDGET_BYTES`, type `MediaStripInfo`; members: −2 `RunnerDeps.mediaByteCapBytes`, `RunnerDeps.onMediaStripped`, +1 `RunnerDeps.mediaBudgetBase64Chars`, +1 `IMAGE_ADMISSION.request`, `IMAGE_ADMISSION.hard.readBytes.withoutProcessor` 5 MiB → 3,932,160) (@server @client-core @cli @test)
|
|
619
|
+
|
|
620
|
+
- **Before.** The request strip summed decoded bytes (default 30 MiB, `RunnerDeps.mediaByteCapBytes`) and cut the oldest images to just under it — once over, the next request that added an image cut again — counted no blocks, and told the person nothing: the fact went to the optional `RunnerDeps.onMediaStripped` callback. A provider refusal was `context.image_removed`, its placeholder from a second constructor. The `tool_end.output` projection spent the decoded budget × 4/3. Without an image processor an image was read up to 5 MiB raw and measured a second time against the 5 MiB base64 limit.
|
|
621
|
+
- **Now.** One trim in Claude Code 2.1.309 `eSn`'s scan shape: the media blocks of a request (images and documents together) are walked oldest first. Past `IMAGE_ADMISSION.request.maxItems` — 100, or 600 for a model whose context window is at least 1,000,000 tokens — the oldest go until `maxItems - margin` (80) remain: one cut takes 21 and the next comes 21 blocks later. Past the budget — `budgetBase64Chars`, 40 MiB of base64, the old 30 MiB decoded — the oldest go until `hysteresisBase64Chars` (10 MiB) is left under it, so the next cut waits until that much more has been added. A block cut once stays cut as the conversation grows, so the cached prefix moves only at a cut. Every removal, the trim's and a provider refusal's, becomes one placeholder line from one constructor (`[image N removed: <why>]`) and one code, `context.media_removed` with `detail { reason, images, documents, sessionId, runId }`: `rejected_by_provider` once per run per refusal; `media_budget` once per session per block, the block's identity being the digest of its bytes (a compaction, a resume or a rewind does not change it). That record rides the session's announced record (its advisory arm, bounded at 200 digests), best effort: a lost or evicted record means a block is told again, never not told. A request view the trim cut also emits a `context.media_removed` trace frame with the request's numbers; frame and tell are delivered from the context hook, so a view a later guard refuses or an abort stops before dispatch is accounted too (KL-2988-a, until #3128). With no `RunnerDeps.onNotice`, both reasons take the engine's console fallback (before, a provider refusal's notice was dropped silently). `tool_end.output` reads the same budget in the same unit, with no × 4/3. The input's own `human_input` account is unchanged (Q4 A): it counts what was admitted, not what a request carried.
|
|
622
|
+
- **Hard-breaking ① — the notice code (open to veto).** *What changed*: `context.image_removed` is renamed `context.media_removed`, gains `detail.reason` and `detail.documents`, and also carries the request budget's removals; the old code is no longer minted. *Who is hurt*: @server — a pass-through, filter or store keyed on the old code; @client-core — the notice projection's code table, and a seat policy keyed on it (if that policy is derived from the engine's `NOTICE_AUDIENCE` table it follows the table; if not, it is the client's own policy and is registered as such); @cli — the renderer of the old code (L-2122 waits for this ticket); @test — #2935 B3 and SIDE1's re-read cell. *What to read instead*: `context.media_removed`, branching on `detail.reason` (`MEDIA_REMOVED_REASONS`); `images` and `documents` count what left the model's view in that one notice.
|
|
623
|
+
- **Hard-breaking ② — the budget knob and its exports (open to veto).** *What changed*: `RunnerDeps.mediaByteCapBytes` (decoded bytes) and `RunnerDeps.onMediaStripped` are retired — refused at `new Runner` with `config.deps_retired_key`, naming the replacement — and the root exports `capAggregateMediaBytes`, `AGGREGATE_MEDIA_BUDGET_BYTES` and the type `MediaStripInfo` are removed. *Who is hurt*: a deployment that set the knob (the unit changed) or passed the callback; @server — an entry that forwards a budget or a strip observer; any importer of the three names. *What to read instead*: `RunnerDeps.mediaBudgetBase64Chars` — base64 characters; absent ⇒ the default; `0` or `Infinity` ⇒ no budget; otherwise a whole number of at least 20,971,520 (twice the hysteresis) — anything else is refused at `new Runner` with `config.invalid_argument`, never read as a default; the fact the callback carried is the `context.media_removed` notice and its trace frame; the numbers are `IMAGE_ADMISSION.request`.
|
|
624
|
+
- **Divergence D-2871-a, open to veto (Q1 A).** Claude Code 2.1.309 trims a request's media silently; sema tells the person once per session per block, because the session still holds the image or document the model no longer sees.
|
|
625
|
+
- **Not Claude Code's 24 MiB (Q5).** The default budget is 40 MiB, not Claude Code's first-party 24 MiB: a sema deployment mostly serves endpoints Claude Code treats as third-party, for which its own budget is 75 MiB. There is no document-only budget — Claude Code holds one for its first-party endpoint alone.
|
|
626
|
+
- **Behavior change (#3073).** Without an image processor the raw read cap is 3,932,160 bytes, the raw size whose base64 fits the 5 MiB single-image limit: one ruler. An image between that and 5 MiB raw is refused `raw_too_large`, naming that cap (before: read, then refused `base64_too_large`, or `dimensions_too_large` when its header stated over 2000 px). On the Read tool that is the "too large to read" refusal (before: "too large to send"); an MCP image block in that range is spilled to disk naming the read cap whatever its bytes (before: one whose bytes were not the image it claimed stayed an image block for the tool-result seat's placeholder).
|
|
627
|
+
- **Rules.** Placeholder constructors 2 → 1; budget units 2 (decoded bytes on the request, × 4/3 on the event) → 1 (base64 characters); the fact's outlets 2 (an opt-in callback, and nothing for the person) → 1 notice plus its trace frame; rulers without a processor 2 (the raw cap, the base64 limit) → 1; the trim reads each block once. The once-per-session record is no new ledger: it is the announced record's advisory arm the withheld-env and capability-withheld notices already use.
|
|
628
|
+
|
|
629
|
+
### A revived background agent is a continuation: SendMessage to a stopped child counts in its tree's delegation pool but is no longer refused by a full one (#3055, ruled C-R994 A; security widening — fan-out, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
630
|
+
|
|
631
|
+
- **Before.** A tier-3 revival (SendMessage to a stopped child known only by its durable row) passed the spawn door's concurrency verdict: at a full pool it was refused with `delegation.concurrency_cap` and the row's claim was rolled back, while a retained child woken in this process (#2998) only occupied a slot. Two continuations, two readings.
|
|
632
|
+
- **Now.** One rule: a spawn passes the door (`admit` = the concurrency and cumulative verdicts in front of the pool's reservation); a continuation — a revival or a wake — only `occupy`s. The revived row is re-registered as a running agent of its tree, so it counts toward every later spawn's verdict until it settles; it is never refused and its claim stays.
|
|
633
|
+
- **Security widening, open to veto.** *Who needs it*: a deployment that messages a stopped teammate while its tree is at `maxConcurrent` (the message used to bounce and the claim was undone). *Who is affected*: a tree's running count can now pass `maxConcurrent` by the number of revivals in flight. A revival creates no row — it continues one the tree already retains, one claim at a time — so the excess stays bounded by the tree's retained rows, which `maxCumulativePerSession` caps for spawns. *Compensation*: a spawn into an over-full pool is still refused, and the refusal counts the revived children. Aligned with Claude Code 2.1.309 (a resume takes a concurrency slot without reading the cap; only the launch path checks it). `delegation.concurrency_cap` is still reachable on the Agent launch path; only the revival path no longer reaches it. This answers the 7.60.0 note under #2998 ("A tier-3 revival of the same row is refused at a full pool today").
|
|
634
|
+
- **Reach.** Every revival lane takes the rule: the SendMessage revival and a parked child driven from its durable row (`reviveClaim.parkedResume`, @server's decide path) both continue on the background lane and are no longer refused at a full pool. A revival claim handed to the synchronous lane registers no row, so it starts like a spawn and passes the full door.
|
|
635
|
+
- **Consumers.** @server: a decide or a SendMessage on a stopped agent at a full tree now runs instead of returning `delegation.concurrency_cap`; a fresh Agent spawn in that tree is refused until the count falls below the cap. @cli @client-core: both read the code wherever it arrives (cli's tool-end guidance, client-core's cap-code disposition); its spelling and meaning are unchanged — a SendMessage revival just no longer carries it, so no change is needed.
|
|
636
|
+
- **Pins.** `test/backlog3055-revival-occupies-pool.test.ts` (a real background registry and File store: a revival at a full pool runs, its row stays `running`, the tree counts one over the cap and a fresh spawn is refused naming that count; the revived child alone keeps a cap-1 pool full until it settles; one revival adds exactly one to the count and leaves no local residue). Re-pinned: `test/delegation-entry-caps.test.ts` "revival: occupies a CONCURRENCY slot …" (was "refused at a full pool, row rolled back").
|
|
637
|
+
|
|
638
|
+
### A rule's content reaches a call only through the tool whose grammar it is written in: an allow's content is a grant for the tool that runs, a deny's or an ask's reaches every name the call answers to, and the two lists handed in at launch grant the wire name only (#2478, #1444; C-R782 ②, C-R799 ③ T-2 / ④ b, C-R1008; behavior narrowing, open to veto; divergence `shell-name-wearer-reaches-content-rules` kept, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core)
|
|
639
|
+
|
|
640
|
+
- **Before.** A caller's tool that declares an engine tool's name as an alias (`Upload` with `aliases: ["Bash"]`, on a leg where the engine's shell does not mount) was judged under `Bash` by every rule lane in both directions. A person's stored `Bash(npm test:*)` allow, the request's or the deployment's `allowedTools` entry `Bash(npm test:*)`, and an active skill's `allowed-tools` entry ran `Upload` with no card, though `Upload` is not the engine's shell. A whole-tool `Bash` entry on `TaskSpec.allowedTools` / `RunnerDeps.allowedTools` granted it too.
|
|
641
|
+
- **Now.** A rule reaches a call under the names its direction reads. A deny or ask content (`Bash(rm:*)`) reaches the call under every name it answers to, as before. An allow content (`Bash(npm test:*)`, `Skill(x)`, `WebFetch(domain:…)`) reaches it only under its wire name's own grammar word. The engine's shell and `Monitor` keep every `Bash(…)` grant; `Upload` takes none and is asked. A whole-tool rule (`Bash`) still reaches every call that answers to it in every direction — a stored row, a skill's list, a session's list. The exception is the two lists handed in at launch, `TaskSpec.allowedTools` and `RunnerDeps.allowedTools`: their entries reach the wire name only (Claude Code 2.1.309 does not expand a CLI-argument rule through an alias). A session's `toolAllow` narrowing reads the same way: a `Bash(npm test:*)` entry no longer admits `Upload`. A person's stored `Read(…)` / `Edit(…)` face rows still meet a call on that face by its declared target, whatever names it wears (a face is not an alias). Claude Code 2.1.309 (`cli309.js:258668`) lets an alias-wearing tool meet a deny / ask content only when the content is whole-tool shaped; sema reaches every deny / ask content — stricter, divergence `shell-name-wearer-reaches-content-rules`, open to veto.
|
|
642
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* a person who approved `npm test` for the engine's shell has not approved it for every tool that borrows the shell's name. *Affected:* a deployment that mounts a caller tool under an engine tool's name and relied on a `Bash(…)` (or `Read(…)`, `Skill(…)`, `WebFetch(…)`) allow, or on a launch-list `Bash` entry, to run it unasked: that call is now asked (or, under a session narrowing, refused). *Compensation:* write the grant on the wire name — `Upload` on the allow list, or answer the card once. Deny and ask rules are not changed.
|
|
643
|
+
- **Consumers.** @server: its own code declares no aliased tool, so the reach changes only for an embedder that mounts one through the spec seat. A deployment whose `TaskSpec.allowedTools` (or `APPROVAL_GRANT` → `RunnerDeps.allowedTools`) names an alias, or a `Bash(…)` grant meant for an aliased tool, now grants the wire name only: write the wire name. @cli: the lists the shell hands in at launch are this source; an entry there grants the tool whose wire name it is, a person's stored rows and a skill's list keep reaching an alias by a whole-tool name. @client-core: nothing new to render — the rule text, the card and the frames are unchanged. The one place one entry reads two ways — a whole-tool entry naming an alias, granted from a skill's list and not from a launch list — is the reference's own split (it does not expand a CLI-argument rule through an alias; C-R1008).
|
|
644
|
+
- **Pins.** `test/backlog2478-content-rule-reach.test.ts` (P1 the wearer under a stored row, the request's, the deployment's and a skill's `Bash(npm test:*)` allow, and a session narrowing; P2 a `Bash(rm:*)` deny / ask; P3 a whole-tool `Bash` deny / ask / allow and a skill's whole-tool allow; P4 the engine's shell and `Monitor`; P5 the launch lists; P6 the readings table). `test/name-readings-oracle.test.ts` gains the two rows `policy.persistedGrammar.grant` and `allowEntry.launchListNames` (both `wire`). `test/backlog1327-allow-entry-unit.test.ts` ⑳ (#1327) now reads "one entry, one reading within one source" and pins the one cell where the source decides.
|
|
645
|
+
|
|
646
|
+
### A person's bare "no" on a resumed leg ends the turn awaiting the user: rejecting a plan pause — or a parked call — with no note sends no further model request (#3089, C-R401 F-2; aligned with Claude Code 2.1.309 `cli309.js:295883`; behavior change open to veto)
|
|
647
|
+
|
|
648
|
+
- **Before.** A durable resume always owed the model a turn: the resumed leg delivered its continuation and the loop forced one more provider request whatever the decision. A person who rejected a plan (the `plan_review` pause) with no note got one more model request — a re-plan or a new question. A bare refusal of a parked tool call halted the parked batch's siblings and stamped the result, but the run still asked the model once more. A live turn already stopped there.
|
|
649
|
+
- **Now.** One judgment, a person's refusal (`deniedBy: ask_resolution`, a `human_refused` settlement) that carried no note on a leg that is not a delegated child, decides every halt on a person's "no": a live batch's, a parked call's resume, a plan pause's resume. When it holds, the resumed leg records the decision (the tool result carrying the refusal sentence) and requests nothing more. The run completes with `haltedOnUserRejection: true`, and its `result` is the transcript's last assistant message (the plan request, or the parked call's message) — the same answer a halted live batch gives; empty when the transcript has no answer yet (a host-minted pause before any model output). The user's next message continues the session as usual.
|
|
650
|
+
- **Unchanged.** These keep their turn, and the model reads the refusal and adapts or reports: a refusal with a note (any non-empty text, whitespace included — the reference treats only empty feedback as none), a policy / hook / classifier deny, and every delegated child (forks included). A resumed leg that delivers a parked steer along with the refusal also still asks the model: the steer is the user's input, the same way queued input continues a live halted run.
|
|
651
|
+
- **Reach, stated.** This is not a plan-mode rule. The judgment reads only who refused, whether a note came with it and whether the leg is a delegated child, so it holds on every resumed leg in every permission mode: a parked tool approval under either approval arm — `human`, and the non-budgetable `irreversible_ask` (a delete card, an egress call) — whatever card it shows (the plan card of `ExitPlanMode` included), and the `plan_review` pause. *Who needs it*: a person declining any parked action, not only a plan; the reference aborts the turn on every feedback-less rejection, on a tool call's card and the plan card alike (one handler, `yyr` (cli309.js:295883)). *Who is hurt*: a host or a test that declines a parked call with a bare deny in order to walk the model on to its next call — a second park of the same tool, a re-issued call, a deny chain run to the restart-loop cap; it now gets a completed run with the halt stamp at the first decline. *Compensation*: send the deny with a `reason` (any non-empty text) and the turn goes on exactly as before; a policy's deny keeps the turn as well.
|
|
652
|
+
- **Behavior change, open to veto.** *Who needs it*: a person rejecting a plan or an action; the reference stops and waits. *Who is affected*: a host that relied on the extra model turn after a bare refusal on a resumed leg (a re-plan, a follow-up question); it now gets a completed run with the halt stamp. That includes a parked tool call: a person's bare "deny" of a parked `policy_ask` call (`decidedBy: "person"`, no `reason` or an empty one) ends the turn the same way, so a chain of such denies against a model that re-issues the same call no longer runs on to the restart-loop cap — the first one completes the run with the stamp and leaves no row, where the run used to fail with `suspend.loop` after the cap's worth of parks. *Compensation*: a refusal with a note keeps the old behavior, and the cap still bounds the chains whose refusals keep the turn (a person's deny with a `reason`, a policy's deny).
|
|
653
|
+
- Hard-breaking: none. Closed sets: none. Exports: none (`TaskResult.haltedOnUserRejection`'s contract now names the plan pause and the resumed leg; the internal halt fact's `rejectedToolCallId` is optional, because a plan pause row without a recorded requester has none).
|
|
654
|
+
- **Known limit (stated, KL-3089-a).** Two post-run passes are not turns and still run after the halt, on the live leg and the resumed leg alike: the end-of-task compaction when the transcript is over its threshold, and `suggestNextPrompts` when a deployment enables it. Each can make one provider request.
|
|
655
|
+
- **Consumers.** @test: after a bare plan rejection the resumed leg makes 0 model-turn requests (count the leg's calls after the decide; under the compaction threshold and without `suggestNextPrompts` that is every provider call), and the result is `completed` with `haltedOnUserRejection: true`; a note keeps 1 request. @test: a cell that declines a parked call to reach what comes after it (the next park's card, a deny chain's cap, the re-issued call) sends the deny with a `reason`; with a bare deny the run completes at the first decline. @cli: a bare "No" on the plan card ends the run awaiting the next message, with no re-plan streamed; on a parked call's card the run ends the same way, with the result shape a halted live batch already has (`completed`, `haltedOnUserRejection: true`), so the shell needs no new rendering.
|
|
656
|
+
- **Pins.** `test/backlog3089-plan-bare-reject-ends-turn.test.ts` (a real Runner over the in-memory checkpoint store: a bare plan rejection — no reason, empty reason — makes 0 requests and 0 summary calls, completes with the stamp and leaves no row; the next message sees the stop sentence and the plan, and the answer is the plan request; a reason or a whitespace reason makes 1; a deployment policy's bare rejection makes 1; a parked call's bare refusal makes 0 and a noted one 1; a delegated child makes 1 with no stamp; a compacted park makes 0; 600 s of fake time after the leg settles makes 0; a parked steer makes 1 and carries the steer; a host-minted plan pause over a transcript with no answer yet completes with the stamp and an empty result, not a failed run), `test/backlog1624-plan-rejected-stop-and-wait.test.ts` R1 / H1 / B1–B3 re-pinned (the bare shapes ask nothing on the resumed leg and the settled records are read at the person's next message; a delegated child still asks), `test/plan-review-gate.test.ts` (the lying-decision cell reads the recorded verdict the same way), `test/backlog554-resume-batch-settlement.test.ts` (structural pin follows the halt-fact site), `test/durable-checkpoint.test.ts` (#3125: the restart-loop cap's negative control now runs the two chains that keep the turn — a person's deny with a note, a policy's deny — and both still trip `suspend.loop`; a person's bare deny — no reason, or an empty one — ends the chain at the first park: completed with the stamp, no request after it, no row; delivered with a parked steer it keeps the turn and the model answers the steer), and the cells whose decline is only the way on (#3142: the deny now carries a note, every assertion unchanged) — `test/backlog1414-approval-card.test.ts` (the re-entry park on every card arm, `human` and `irreversible_ask`, the plan card included; B7's two declines), `test/durable-resume-loop.test.ts` and `test/rb471-suspend-loop-negative-decision.test.ts` (the restart-loop cap's deny chains), `test/backlog1974b-keyless-and-unreadable-resume.test.ts` ⑤ (the deny beside an unreadable edit, then the re-issued call).
|
|
657
|
+
|
|
658
|
+
### One placement fence: `ExecutionEnvFactoryContext.placementTarget` tells the env factory where EVERY handed-off leg must be minted — spawned, woken, resumed or a composition's later leg — and one receipt refuses a leg minted elsewhere (#2990, design/2884 S1, C-R975 K1–K4 / K6; hard-breaking: 2; closed sets: +1 `config.placement_not_honored`; exports: +1 type `PlacementTarget`) (@server @computer-use @test)
|
|
659
|
+
|
|
660
|
+
- **Before.** Only a durable resume leg told the factory where to mint (`resumeWorkspace`, a frozen copy of the whole checkpointed handle). A delegated child, a woken retained agent, a workflow agent and a cascade / verification gate's later leg carried only the tree's `placementRootSessionId`, so a target-bound factory chose their device by the current binding — after a re-bind mid-run a child, a verifier or a later rung ran on another device than the work it continues — and the engine checked nothing about them.
|
|
661
|
+
- **Now.** `placementTarget: Readonly<{ provider; deviceId? }>` is the one answer. Every leg reads its own target once, when its workspace settles (its env's `workspaceHandle()` projected; none when the env is not remote or cannot answer yet), and that value fences every leg it hands work to: each agent it spawns or wakes (a retained snapshot keeps no target — the waker's is handed, the same answer a tier-3 revival gets) and, for `runCascade` / `runWithVerification` / `resumeWithVerification`, every later leg (the first leg's target, learned through `onWorkspaceResolved`, whose `ResolvedWorkspace` now carries `target?`). A resume leg's fence is folded member by member: the row's `provider` / `deviceId` win, a member the row lacks (a row older than `deviceId`) is the waking leg's. One receipt (`placementHonored`) checks every fenced leg: a leg restoring a checkpointed workspace keeps `resume.env_failed`, now against the folded fence — at the restore and again where its workspace settles (an env that moved during re-initialization is caught there); any other fenced leg whose env does not name the fenced device is refused `config.placement_not_honored` before it runs (its env torn down). A `RunInternals.placementTarget` the engine cannot read (no non-empty string `provider`, a non-string `deviceId`) is refused the same code before the factory is asked. Rules: two (one contract, one receipt) where the additive form needed four (a second contract, and every target-bound factory writing its own precedence).
|
|
662
|
+
- **Hard-breaking (@server), open to veto.** ① *What*: `ExecutionEnvFactoryContext.resumeWorkspace` is removed, no alias; `placementTarget` takes its place on resume legs and is now also present on every handed-off leg. *Who*: a target-bound factory reading `ctx.resumeWorkspace` (server `remote-env-device.ts:1446`). *Compensation*: read `ctx.placementTarget?.deviceId` and drop any `resumeWorkspace ?? placement…` precedence (the engine folds it once); restore facts stay on `VmLifecycleOptions.priorHandle` / `ResumePreflightInfo.workspaceHandle`; the contract sentence changed from "MUST NOT look the current binding up afresh" to "MUST NOT choose the target by the current binding — it may read it only to find that it differs from the fence, and then refuse". ② *What*: a new refusal code `config.placement_not_honored` (a fresh fenced leg minted on another device; an unreadable handed fence). *Who*: closed-set consumers of refusal codes (server error mapping, cli rendering, test criteria). *Compensation*: add the word; a factory that honors the fence never triggers it.
|
|
663
|
+
- **Also changed (not breaking).** The composition entries now dispatch their first leg with a shallow copy of the caller's internals whose `onWorkspaceResolved` records the target and then calls the caller's own sink (before: the caller's object by identity / exactly `undefined`), and later legs carry `placementTarget` beside the `placementRoot` they already gained; the verification gate's per-leg wiring-manifest wrapper now calls the caller's `onWiringManifest` on the caller's own object on every leg (a later leg's placement copy was the receiver before); `ExecutionEnvFactoryContext.taskId` is now absent (not an `undefined` value) when the caller set no `TaskSpec.taskId` — an engine-built child spec never carries one, so a factory must not identify a descendant by it (contract sentence added). Additive: `RunInternals.placementTarget?`, `ToolExecuteContext.placementTarget?`, `ResolvedWorkspace.target?`, `RunWorkflowOptions.placementTarget?`.
|
|
664
|
+
- **Consumers.** @server S-2451 P2 (7.139.0+): read the one seat (HC 3's `provider` check can read `placementTarget.provider`); map `config.placement_not_honored`. @computer-use cc (no known reader of `resumeWorkspace`). @test: criteria naming `resumeWorkspace` read `placementTarget`; the new code joins the refusal closed set.
|
|
665
|
+
- **Known limits (stated).** The receipt trusts the env's report (an adapter that echoes the fence while connecting elsewhere passes — design469 F7). A spawning leg whose env cannot answer `workspaceHandle()` when its workspace settles (a lazy connect) has no target, so its agents carry no fence. A woken agent is minted where its WAKER is, not where it first ran — after a re-bind it runs on the new device without the old one's files (the server's re-bind moves routing, not bytes). Observer side-car legs and `warm-resume` carry no placement internals at all (#2992 / #2993, unchanged).
|
|
666
|
+
- **Pins.** `test/backlog2990-placement-fence.test.ts` (a target-bound factory over a mutable binding, real Runner: the four child kinds take the spawner's target and carry no task id; a top-level leg has no fence; a lazy-connect spawner hands none; the receipt refuses / passes / skips a device-less fence / refuses an unreadable handed fence before any mint; a resume folds per member and its receipt checks the folded device; one settled agent woken through its retained snapshot and through a tier-3 revival gets the waker's target before and after a re-bind; cascade and verification later legs keep the first leg's device across a mid-run re-bind and a binding-following factory is refused; workflow agents on both spawn legs; a restore whose one handle object moves device in place is refused — the receipt reads the handle live; a method-style `onWorkspaceResolved` keeps its receiver through the observing copy; a restore whose re-initialization moves the env is refused where it settles and reports nothing; the verification gate calls a method-style `onWiringManifest` on the caller's object on every leg), `test/design469-r3-fence.test.ts` (the resume lane re-pinned on the new seat), `test/backlog2058-prior-handle-same-copy.test.ts`, `test/backlog246-internals-seam.test.ts` (the forward shape).
|
|
667
|
+
- **Who needs it.** A durable resume whose environment lands somewhere other than the device its fence names (a lazy-connect adapter whose `workspaceHandle()` throws at the settle point, or a factory that followed the deployment's current binding) must not run there: the receipt is taken again at the resume leg's settle point, so the leg is refused `resume.env_failed` before anything reports the workspace.
|
|
668
|
+
- **Who is hurt.** A host whose resume factory honoured the fence only at mint time and re-anchored the env afterwards saw the resumed leg run before 7.61.0; it is now refused at the settle point (narrowing, open to veto).
|
|
669
|
+
- **Compensation.** Mint the resume env on the fenced device (the row's `placementTarget` members win over the handed ones) or hand a fence that names no device; the refusal's `detail` names the fenced device and the device reported.
|
|
670
|
+
|
|
671
|
+
### A provider that refuses one tool's input schema no longer fails every turn: the tool is re-sent without its parameters while the refusal stands in the transcript, and a refusal that ends a run says which part of the request it named (#2681, #1669; CC 2.1.309 F-14; ruled C-R973 addendum 2; behavior change; hard-breaking: none; closed sets: `AssistantMessage.errorKind` +1 `tool_schema_refused`, `ENGINE_NOTICE_CODES` +1 `context.tool_schema_removed` (user, engine), `LoopContinueReason` +1 `tool_schema_refusal_retry`, new `REFUSED_REQUEST_PARTS` (three words); exports: +1 root value `REFUSED_REQUEST_PARTS`, +1 root type `RefusedRequestPart`; members: `AssistantMessage.refusedTool?`, `BrainError.toolSchemaRefused?` (and its constructor option), `terminal.detail.provider_rejected.errorKind?` / `.tool?` (wire +2 optional keys), `SSERequest.toolNames?`, `AgentLoopConfig.onToolSchemaRefused?`) (@server @cli @client-core @test)
|
|
672
|
+
|
|
673
|
+
- **Before.** A provider 400 that refused one tool's input schema was an `invalid_request` like any other: the run failed, and because the tool stayed mounted every later turn of the session failed the same way. A client that wanted to tell a schema refusal from "change it and resend" guessed from the provider's echo word (client-core's six OpenAI words).
|
|
674
|
+
- **Now.** The dialect table reads the refusal at the brain boundary and locates the tool: the Anthropic form `tools.N.custom.input_schema` in `error.message` (Claude Code 2.1.309's own pattern), and the OpenAI-family `param: "tools[N].function.parameters"` beside `invalid_function_parameters` (read by its documented shape — no captured body yet). The adapters state the request's tool list (`SSERequest.toolNames`), so the failed turn names the tool: `errorKind: "tool_schema_refused"`, `refusedTool`. That turn — live, and as its persisted record — is the request view's instruction, in the same seat as #2874's image refusal (`engine/llm/rejected-images.ts`): an MCP or A2A tool it names is sent with `{ type: "object" }` (Claude Code's replacement) in every request built from a transcript the record stands in — the next turns, the session's next runs, a resumed session — at most eight tools per such transcript (its bound), and the loop re-sends the turn once per refusal. The model can still call the tool; it no longer sees its parameters. The person hears `context.tool_schema_removed` once per refusal (`detail: { tool, sessionId, runId }`): fix the schema on the server, then start a new conversation. A failover chain hands the refusal back like an image refusal instead of trying the next brain.
|
|
675
|
+
- **The terminal (#1669).** `terminal.detail.provider_rejected` gains `errorKind?` — the refused message's own `errorKind` when it is one of `REFUSED_REQUEST_PARTS` (`input_too_long`, `image_unprocessable`, `tool_schema_refused`) — and, with `tool_schema_refused`, `tool?`. A refusal that reaches the terminal is a tool the engine could not send without its schema (a host-defined or engine tool, or the bound of eight already used in the transcript the request was built from). Facts the account already states are not restated: a quota is `providerCondition: "quota_exhausted"`, credentials and rate limits are `status` 401 / 403 / 429. The ticket's `content_filter` member and the five OpenAI echo words that locate nothing (`invalid_type`, `missing_required_parameter`, `unknown_parameter`, `unsupported_parameter`, `invalid_json_schema`) are not engine words: no captured provider body shows them (#3076).
|
|
676
|
+
- **Divergence from Claude Code, minor.** The reference keys a replaced schema by the tool's name and the refused schema's hash, so a schema the server fixes mid-conversation goes out again; here the refusal is keyed by the tool's name — the notice's instruction is the reference's ("start a new conversation"). The reference holds the set beside the conversation; here it is the transcript's records, so a compaction that summarizes a record away returns that tool's schema, and a provider that still refuses it costs one more round trip before it is replaced again (KL-2681-a). The reference reads only MCP tools; A2A tools are read the same way here (their schema is a peer's too). The notice does not quote the provider's words (the failure record keeps them).
|
|
677
|
+
- **Consumers.** @server: `context.tool_schema_removed` joins the user notices; `terminal.detail` carries two more optional keys. @client-core: `provider_rejected.errorKind === "tool_schema_refused"` is the engine's own schema verdict, for a refusal that reached the terminal; the six-word guess can step back to the words no engine row reads. @cli: the notice is a user line. @test: the closed sets above.
|
|
678
|
+
- **Pins.** `test/backlog2681-tool-schema-refusal.test.ts` (both locator forms and five controls; the views — order, once each, external tools only, the bound of eight, the same objects elsewhere; a real Runner and a real MCP server: refused, re-sent with `{ type: "object" }` for that tool only, completed, one notice, and the session's next run sends no schema and meets no 400; the Anthropic form at the brain seat names the tool at position 1; a host tool's refusal is not re-sent and the terminal reads `errorKind` and `tool`; the closed set and its reader).
|
|
679
|
+
|
|
680
|
+
### The person's card names the extension behind a PreToolUse hook's question (#2685; CC 2.1.309 F-18; ruled C-R973 addendum 2; behavior change: the wording of a hook ask's card sentence; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core)
|
|
681
|
+
|
|
682
|
+
- **Before.** A `classic.PreToolUse` deny and allow carried the registration that answered (`answeredBy`); the ask dropped it, so the approval card showed the hook's reason with nothing saying which extension asked.
|
|
683
|
+
- **Now.** A PreToolUse ask — this leg's own, an inherited installation's, and the re-screens of a rewrite or an approved edit — carries the sentence a `tool.check` ask carries, from the one builder (`extensionQuestionText`): `tool "<t>" needs approval (asked by extension "<name>": <the hook's reason>)`. A hook ask from no named registration keeps the hook's words. The reference puts the same fact on the hook ask's decision reason (`hookSource`); a structured member on the card for both events is #3077.
|
|
684
|
+
- **Pins.** `test/backlog2685-hook-ask-names-extension.test.ts` (with and without a reason; beside a policy ask the fold carries the named sentence; a deny is unchanged).
|
|
685
|
+
|
|
686
|
+
### MCP tool descriptions are cut at 4,096 characters, and so are an MCP server's instructions (#2683; CC 2.1.309 F-16; ruled C-R973 ⑦; behavior change; behavior narrowing open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
|
|
687
|
+
|
|
688
|
+
- **Now.** `MCP_TOOL_DESCRIPTION_MAX_CHARS` 2,048 → 4,096 and `MCP_INSTRUCTIONS_MAX_CHARS` 8,192 → 4,096 — the reference's number for both. The reference sends its first-party servers' text in full; there is no first-party server here.
|
|
689
|
+
- **Behavior narrowing, open to veto.** *Who needs it*: every session pays a server's instructions in each request's prompt prefix; the reference bounds them at 4,096. *Who is harmed*: a server whose instructions run between 4,097 and 8,192 characters — the model now sees the first 4,096 and the disclosed cut (`(Truncated by the agent runtime: this server's instructions exceeded 4096 characters.)`). *Compensation*: the cut is disclosed in the model's text; a deployment can shorten the server's instructions or replace them (the host entry of the same lane is bound by the same number).
|
|
690
|
+
- **Pins.** `test/backlog2683-mcp-caps-4096.test.ts` (4,096 whole and 4,097 cut for instructions, the host replacement, a real MCP server's descriptions at and over the bound); the two existing pins naming the old numbers re-pinned.
|
|
691
|
+
|
|
692
|
+
### A write to a file whose name is near the filesystem maximum works again: the staged sibling's name is cut to fit (#3106; failure-path fix, no success path changes; divergence candidate — Claude Code 2.1.309 has the same failure, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
693
|
+
|
|
694
|
+
- **Before.** `NodeExecutionEnv.writeFile` stages `<name>.tmp.<pid>.<hex12>`, up to 29 bytes longer than the target's name, so a target named ~227 bytes or more failed at the open of its sibling (`ENAMETOOLONG`) and the whole write with it (a 230-byte name wrote, 240 and 255 did not).
|
|
695
|
+
- **Now.** One function mints the sibling's name (`stagingSiblingOf`): the shape is unchanged. Only when the sibling would pass 255 bytes is the target's name cut — whole characters, from its end — to leave room for the suffix. A name that fitted before stages under exactly the name it had. A target name already past 255 bytes is left whole, so the open refuses it at once (`name_too_long`) before any byte is staged.
|
|
696
|
+
- **Divergence from Claude Code 2.1.309, candidate (open to veto).** The reference builds its sibling as `<target>.tmp.<pid>.<hex12>` with no cut (`A5r`, cli309.js:252815) and fails the same way; this changes only names that failed before.
|
|
697
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host whose files carry long generated names. *Affected:* nobody — the sibling's name is seen only in a "preserved at" sentence or a residue notice. *Compensation:* none needed.
|
|
698
|
+
- **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (254 / 255-byte names fresh and overwritten with the mode kept; a multi-byte name cut on whole characters; the shape unchanged for ordinary and 200-byte names; a 256-byte name refused before any staging).
|
|
699
|
+
|
|
700
|
+
### An in-place fallback write is not cancelled once it has begun, so `aborted` again means the target was never touched (#3107; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
701
|
+
|
|
702
|
+
- **Before.** The five in-place legs of `NodeExecutionEnv.writeFile` (the link could not be read; a multi-hop or non-regular link target; a non-regular target; the staging open refused `EACCES`; the rename refused after the staged copy was durable) passed the caller's signal to an `O_TRUNC` write: an abort mid-write answered `aborted` with the target already cut short — against the documented meaning, "`aborted` means it was never touched".
|
|
703
|
+
- **Now.** Each leg judges the signal once, before its first byte (the abort is also judged where it always was: the entry checks and, on the staged path, every step up to the rename): an abort that landed earlier answers `aborted` with the target untouched, and a leg that has begun runs to its end and answers `ok` or its own error — never the signal inside the write. One rule — `aborted` ⇒ untouched — replaces "cancellation differs by leg".
|
|
704
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* every caller that reads `aborted` as "nothing was written" (the server's remote in-place path read it as "maybe half-written"). *Affected:* a caller that cancels a large write through an in-place leg (a multi-hop symlink, a FIFO, a read-only parent directory, a refused rename): the write now completes instead of stopping half-way; before, it left a torn file under an `aborted` answer. *Compensation:* the default staged path is unchanged — still cancellable at every step and atomic; a caller that must be able to stop a write on those targets cancels before the call.
|
|
705
|
+
- **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (one cell per leg: an abort once the write has begun ⇒ `ok` and the whole content; an abort landing on the leg's last awaited step, before its first byte ⇒ `aborted`, target untouched, and on the rename leg the staged copy discarded rather than "preserved at"; a signal aborted before the call ⇒ `aborted`, target and chain untouched).
|
|
706
|
+
|
|
707
|
+
### A staged file that could not be removed is told, not dropped: a failed write's error names it, a successful write announces `fs.staging_file_left` (#3108; closed sets: +1 `EngineNoticeCode` `fs.staging_file_left`, audience operator, minter engine, open to veto; hard-breaking: none; exports: none) (@server @cli @client-core)
|
|
708
|
+
|
|
709
|
+
- **Before.** Four places removed the staged sibling with `unlink(tmp).catch(() => {})`: a failed removal left up to the whole content on disk and nobody was told.
|
|
710
|
+
- **Now.** One function discards the staged file and answers what is left of it (a file already gone is not a residue; a file that was never created is not removed at all). A failed write — the staged write failed, the abort landed before the rename, the rename was refused with no in-place fallback — appends `; staging file left at <path> (<code>)` to its error. A write that succeeded (the in-place rewrite after a refused rename, or after a staging file whose write was refused `EACCES`) stays `ok` and announces `fs.staging_file_left` (`detail: { path }`) on the env's `onNotice` seat; an environment with no seat says nothing. The deliberate "preserved at" error, where the staged copy is the only surviving new content, is unchanged.
|
|
711
|
+
- **Closed set +1, three sentences (open to veto).** *What changed:* `ENGINE_NOTICE_CODES` gains `fs.staging_file_left` (audience `operator`, minter `engine`; 110 → 111). *Who is affected:* @server, @cli and @client-core — any reader that enumerates the notice codes or keeps a whitelist reads one more row (an unknown code reads as `operator`, the registry's default). *Compensation:* none needed beyond the new row; nothing mints it unless a staged file could not be removed.
|
|
712
|
+
- **Pins.** `test/backlog3106-writefile-staging-edges.test.ts` (a failing removal on each of the four sites; the announcement on both success paths; a removal that works says nothing; ENOENT is no residue; no removal of a file never created; no seat, no sound).
|
|
713
|
+
- A read-only (0444) target inside a writable directory is replaced through staging + rename with its mode kept — the same form as Claude Code 2.1.309 (`cli309.js:252815`), #3109.
|
|
714
|
+
|
|
715
|
+
### MCP runs on the v2 SDK — `@modelcontextprotocol/client` + `@modelcontextprotocol/core` 2.4.0 replace `@modelcontextprotocol/sdk` 1.30.0; the wire is unchanged, and every place the new SDK changed a default the engine relied on is held at a door the engine owns (#2929, design/454 P1a, C-R960; behavior narrowing ×2, open to veto; hard-breaking: the failure record of a server's `-32000` / `-32001` answer moves word; closed sets: none; exports: see the next section; dependencies: three) (@server @cli @client-core @test)
|
|
716
|
+
|
|
717
|
+
- **Dependencies.** `@modelcontextprotocol/sdk` 1.30.0 removed. `@modelcontextprotocol/client` 2.4.0 and `@modelcontextprotocol/core` 2.4.0 added, exact; `@modelcontextprotocol/server` 2.4.0 is a dev dependency only (the test fixtures and `src/examples`, neither shipped).
|
|
718
|
+
- **Wire.** Unchanged. No client sets `versionNegotiation`, and the pinned SDK's connect sequence without it opens with the `initialize` handshake alone, offering `2025-11-25`, and never sends `server/discover` (pinned on the wire: the first frame is `initialize`, no `server/discover`). A connect → list → call → resource list → read → dispose cycle was recorded under 7.59.0 and under this tree: the same six frames, the same bodies (the one difference is the key order inside the `notifications/initialized` frame).
|
|
719
|
+
- **Held at the door (five places the SDK's defaults moved).** (1) `resources/list` goes on the wire a page at a time and `resources/read` once per read, through `request()`: the SDK's list verb, called without a cursor, walks every page itself (to 64, then throws) and caches the aggregate, and its read verb answers from a response cache whenever a server stamps a positive `ttlMs` — on any connection. (2) The HTTP transport is built with `requestInit: { redirect: "manual" }`: its default follows a redirect within the origin, which would send the request — and ask the peer seat again — at a path the declaration never named; a 3xx stays the answer on the POST, the SSE GET and the session-end DELETE. (3) A tool's definition rides each call (`callTool`'s `toolDefinition`, from the connection's latest listing through the leg's own intake); the SDK's private tool cache the engine used to fill — and the pool's per-holder rewrite of it — is gone. (4) The lenient `tools/list` schema is a Standard Schema object: the v2 SDK reads an argument it does not recognise as a schema as the request's options, so the leniency and the request's own signal / timeout would have been lost together; no `as never` remains at an SDK call. (5) A failure is classified by where it arose: a `ProtocolError` is the server's answer (`protocol`, delivered "yes"); an `SdkError` is read by its code from one table total over the SDK's enum (`SDK_ERROR_READINGS` in mcp-failure.ts — whether the request had left, and the class). (6) A 403's challenge is read once, by the peer seat's fetch: a 403 it reads as a status reaches the transport without its `WWW-Authenticate` — the v2 transport matches `error=` anywhere in that header (a quoted description, the tail of `not_error=`) and answers an `insufficient_scope` it finds with a step-up it has no provider for, which read as `unknown`; such a 403 is `http_status` 403 as in 7.59.0. The host seat (#2841) runs on the same client: its verdict rides the v2 `ProtocolError`'s `data`, read by identity as before.
|
|
720
|
+
- **Hard-breaking (open to veto).** *What changed:* a server that ANSWERS a JSON-RPC error `-32000` / `-32001` is `errorCode: "protocol"`, delivered "yes"; it was `connection_closed` / `timeout`, delivered "unknown" (1.x gave the server's code and the client's own close and timer one class). The client's own close and timer keep `connection_closed` / `timeout`. A dial whose listing the result schema refuses is `protocol`, delivered "yes", liveness `reachable`; it was `unknown` / "no" / `unknown`. *Who is hurt:* a consumer keying a retry on `timeout` for a server that reports its own upstream timeout as `-32001`. *Compensation:* the server's own words ride the error text; the code is the server's.
|
|
721
|
+
- **Behavior narrowing (open to veto) — K1.** On a `2025-11-25` connection a `tools/call` result whose `structuredContent` is not an object (array, string, number, boolean, null) fails the call — `Invalid result for tools/call: …`, `errorCode: "protocol"`, delivered "yes" (the server ran it); 7.59.0 passed the value through. The refusal is the revision's own result schema; the `2026-07-28` schema takes any JSON value, and a connection that negotiates that era (design/454 P2) will. RB-411 closes with it: a falsy scalar under an output schema is no longer told it "did not return structured content".
|
|
722
|
+
- **Behavior narrowing (open to veto) — H12.** A tool whose listed `outputSchema` this client cannot compile (an unresolvable or remote `$ref`; a draft-07 form the default 2020-12 dialect refuses — an array-valued `items` — in a schema that declares no `$schema`) stays mounted, and its calls are refused before they are sent, by name: `mcp.tool_output_schema_invalid`, delivered "no" — the same validator the SDK checks results with judges it, at intake, and the refusal is the listing's own (beside `mcp.tool_declaration_changed`), so a resend it refuses after a lost session is not sent and the call keeps its first attempt's outcome. The compiler's message is not carried (it quotes the server's schema). 7.59.0 called such a tool with its structured result unvalidated; the v2 SDK refuses the call itself, unsent, with a `ProtocolError` that would read as the server's answer. Who is hurt: a server that ships a remote `$ref` in an output schema — its tool was callable yesterday and is refused today.
|
|
723
|
+
- **Text (K2).** A protocol error's text is the server's as sent: the v2 SDK stamps no `MCP error <code>: ` of its own, so the fold that removed a doubled stamp is retired. A server built on an SDK that stamps still shows its one stamp, one that does not shows none; the code rides structured (`details.code`, `tool_end.errorCode`), and a protocol-range code keeps its name — with its number beside it on the connect, status and refresh faces, which carry no structured code (`<condition> (MCP protocol error -32022): <server text>`). The 1.x HTTP transport's own `Streamable HTTP error: ` lead is gone too: a transport failure's text opens with the transport's words (`Error POSTing to endpoint: …`). A probe that stopped waiting for a server reads `the probe stopped waiting …` without the old `MCP error -32001:` lead.
|
|
724
|
+
- **Task support.** A tool listed `taskSupport: "required"` is still refused before sending, by the engine (`mcp.task_required`); the SDK's second lock behind it no longer exists.
|
|
725
|
+
- **Consumers.** One new pre-send refusal word on `tool_end.errorCode` / `details.code`: `mcp.tool_output_schema_invalid` (delivered "no"), beside `mcp.task_required`. @server: `probeMcpServers` rows and the status / manifest faces read as before, with the `-32000` / `-32001` move above; your own MCP servers' 1.x SDK is untouched; #2631's in-process transport seat is the v2 `Transport` (`@modelcontextprotocol/client` root). @cli: your direct `@modelcontextprotocol/sdk` 1.x dependency now installs beside core's 2.x — two zod consumers and two error-class families (an error core throws is not `instanceof` a 1.x `McpError`). @client-core: a fixture that builds its fake MCP server from the SDK copy installed under core (`node_modules/@modelcontextprotocol/sdk/dist/esm/…`) finds it gone — install a server SDK of its own. @test: K1, K2 and H12 above; the wire unchanged.
|
|
726
|
+
- **Pins.** `test/backlog2929-mcp-sdk-v2-front-doors.test.ts` (a hung listing fails at the startup bound, not the SDK default; a listing that never ends stops at the page cap, disclosed; a `ttlMs`-stamped read is asked twice for two reads; a 307 on the POST, the SSE GET and the DELETE is never followed and the seat is asked once per request; no `as never`, no retired SDK verb called, the client registers only `elicitation/create`, no 1.x import); `test/mcp-failure-record.test.ts` ①b (every `SdkErrorCode` constructed, through the table; the table total over the enum; an errno-shaped SDK code not read as an errno); `test/rb408-mcp-spec-2026-shapes.test.ts` (K1 both ways, RB-411, the 2026 schema's reference; G11's remote `$ref` refused unsent, nothing fetched); `test/rb437-mcp-failure-disclosure.test.ts` (K2: unstamped arrives unstamped, stamped once; the fold retired); `test/mcp-schema-flatten.test.ts` (the definition validates a result; H12 refused unsent, the server never called, a sibling runs); `test/design384-p0-mcp-truthing.test.ts` (the three packages pinned to one release, no 1.x; the method sequence and `2025-11-25` on the wire); `test/backlog1433b-one-universe.test.ts` ⑪m (the pooled listing record — an incomplete walk keeps every entry it did not reach, whichever holder's listing wrote it; no cache writer, read as code identifiers); `test/backlog2295-unauthorized.test.ts` T3 (the 403 challenge read once); `test/backlog1322-exported-judges.test.ts` #1373 (a proxy refusal whose cause is the SDK's own timeout is not a definite "never sent"). The first full run of this change on the shared runner found six files red of its own (the three pins just named plus three ratchet gates: the validator table's weak-identity row, the listing refusal's third sentence spliced from a table, the negotiation word in src) and one wall-clock sleep in a fixture; all are fixed here, none by raising a baseline.
|
|
727
|
+
- **Known limits.** The `2026-07-28` era (negotiation, `resultType`, embedded input requests) is not consumed: every connection is `2025-11-25` — design/454 P2–P3 (KL-2929-a). The v2 schema validator reads an output schema by its declared `$schema` dialect (2020-12 when none), where 1.x compiled every schema as draft-07: a draft-07-only form now fails to compile (H12 above) or validates differently (KL-2929-b).
|
|
728
|
+
|
|
729
|
+
### `McpConnectionPool` is exported as before; a lease's `client` is the v2 `Client` type, and a lease carries no tool-cache writer (#2930, design/454 P1b, C-R960 K4 A; hard-breaking, open to veto: two type changes; closed sets: none) (@server @cli)
|
|
730
|
+
|
|
731
|
+
- **What changed.** `McpLease.client` is `@modelcontextprotocol/client`'s `Client` (it was `@modelcontextprotocol/sdk`'s); `McpConnectionPool.acquire`'s `dial` returns that type. `McpLease.openListing` is removed, with the `McpToolMeta` / `McpListingWriter` types it took: they rewrote the SDK's private tool cache, which no longer exists — a call carries its tool's definition (previous section).
|
|
732
|
+
- **Who is hurt.** A host that constructs the pool and dials it with a 1.x client, or calls `openListing`: none known (server, cli and client-core main: zero imports of `McpConnectionPool`; server's consumption ledger marks it `skip`).
|
|
733
|
+
- **Compensation.** Dial with `new Client(…)` from `@modelcontextprotocol/client`; the connection's listing record is `lease.listing`.
|
|
734
|
+
|
|
735
|
+
### The run's MCP connection pool takes only connections the engine dialled, each for its own key, once; any other client is refused at the pool's entrance (#2843, C-R986; hard-breaking, open to veto; closed sets: `config.*` +1 `config.mcp_pool_foreign_connection`; exports: none) (@server @client-core @cli)
|
|
736
|
+
|
|
737
|
+
- **What changed.** `McpConnectionPool.acquire` rejects, with `code: "config.mcp_pool_foreign_connection"`, a dial that answers a client the engine did not dial for that key — a client a host built, one the engine dialled for another declaration or principal (taken off a lease), or one another pool entry already holds (the same connection under a second key or in a second pool) — and the pool keeps nothing of it: it is not entered, its close slot is not taken, it is not closed (it stays its owner's). A leg then dials the declaration itself. In 7.59.0 such a client was entered and its tools mounted under the key it was put in under — another declaration's connection, and another principal's identity, included; and a second entry over one client took the first's close slot and closed it on its own last release. The engine compiles each listed output schema with the validator the client checks results with, and the connection's carrier and transport are the engine's: a client built elsewhere carries none of them.
|
|
738
|
+
- **Who is hurt.** A host that pre-fills the pool with a connection of its own (the remote bridge of #2841 is the known potential reader): none known on main (server, cli and client-core: zero imports of `McpConnectionPool`).
|
|
739
|
+
- **Compensation.** Declare the server (a `{ kind: "host" }` transport with the leg's host seat, #2841, for a pipe the host owns); the pool dials and shares it.
|
|
740
|
+
|
|
741
|
+
### A box answers for the records it has received, not only for the ones it holds; a double fault's in-process copy is settled against its box before the next leg delivers; the uplink frame key is unique across processes (#2940, #2760 — C-R962 Q1 A / Q2 A / Q3 A; behavior change; hard-breaking ① the store contract, ② the judgment's signature, ③ the parked copy's settlement and the frame key, three sentences each below; divergence candidates D-2758-a / b / c, open to veto; exports: +3 root `MAILBOX_CONSUMED_ID_WINDOW`, type `MailboxConsumedRecord`, `mailboxReplayDigests`; `judgeMailboxAppendById` signature changed) (@server @client-core @test)
|
|
742
|
+
|
|
743
|
+
- **Before.** A box answered an append under a record id only while it HELD that record: once a consumer acked it, the id was free again. Two paths therefore delivered one teammate message twice (KL-969j): the park seat's first ask committed and both asks were refused, so the box and the process each held it; or the first ask committed, another consumer drained and acked the record before the refusal arrived, and the re-ask wrote a second record. The uplink frame's `seq` — and so the record id a parked frame carries — started at the process's wall clock: two processes started within as many milliseconds as one of them had sent messages minted one id for two messages.
|
|
744
|
+
- **Now.** `ack` enters every id-bearing record it deletes into the box's received window: exactly the newest `MAILBOX_CONSUMED_ID_WINDOW` (256) by seq, each kept as `{ id, seq, digests }` (`MailboxConsumedRecord`; `mailboxReplayDigests` = one sha-256 per replay facet); a record without an id takes no place. `judgeMailboxAppendById({ held, consumed }, msg)` answers from the held records, then the window: an identical record ⇒ its `seq`, nothing written (the receipt reads `parked_durably`: the box took it); a different one ⇒ `mailbox.duplicate_record_id` naming the facets ("holds" / "received"). `drop` clears the window with the box's lifetime; `reap` keeps it, as it keeps the high-water mark (what it clears was never received). The file backend persists the window in its log (a `consumed` snapshot event, then the `ack` events) and shares it across processes like the rest of the box. At the park seat a second fault still parks in process (`parked`, unchanged), but the copy now owes its box — the binding the seat asked, as it was then: the session's next leg in this process asks that box once more, after prepare and before its turn-open batch and its box drain's first claim; a box that answers delivers the record (the copy is dropped, even when this leg binds another box or none), a box that refuses again is disclosed once (`onError`, `session-box-park`) and the copy is delivered as before. Until its debt is settled the copy is not delivered from this process (the turn-open batch keeps it back): one pass per leg over what is owed when the leg opens, stopped by the leg's abort — a debt that arrives during the pass, or one the abort left unasked, waits for the next leg. A leg with no debt awaits nothing. The uplink counter starts at a per-process draw from [2^51, 2^52) (then counts up), so two processes' frame keys meet only with probability ≈ uplinks sent / 2^51.
|
|
745
|
+
- **Hard-breaking ① — the store contract (open to veto).** *What changed*: after `ack`, an append under an id still in the received window is that record — its seq and no write for the same record, `mailbox.duplicate_record_id` for another — where it used to be a new record; the T1 kit (`mailboxStoreContract`) carries the window cases (each backend keeps exactly 256, newest by seq, id-bearing only, `drop` clears, `reap` keeps) and the T2 kit (`mailboxCrossProcessContract`) the cross-process one. *Who is hurt*: @server's SQL mailbox twins (TiDB / PG) and any third-party `MailboxStore` — the new kit cases are red until the window is implemented; a test that pinned "after ack the id is free". *Compensation*: keep `(scope, handle, seq, record_id, digests)` rows beside the box, insert the deleted id-bearing rows in `ack`'s transaction and trim to `MAILBOX_CONSUMED_ID_WINDOW` (import the constant, never the number), read held rows and window rows in `append`'s transaction and call `judgeMailboxAppendById`; delete the window in `drop`, keep it in `reap`.
|
|
746
|
+
- **Hard-breaking ② — `judgeMailboxAppendById`'s signature (open to veto).** *What changed*: its first parameter is `{ held, consumed }` (the held records and the received window) instead of the held array. *Who is hurt*: a third-party backend that calls it (@server's twins today call it nowhere, so the version that will). *Compensation*: pass `{ held: <the box's rows>, consumed: <its window rows> }`, read in the same transaction as the seq allocation.
|
|
747
|
+
- **Hard-breaking ③ — the parked copy's settlement and the frame key (open to veto).** *What changed*: after a double fault the session's next leg no longer always delivers the in-process twin — the box that answers delivers instead (the twin is dropped); a session with such a debt pays one store round trip at its next leg's open, and a copy whose debt is still unsettled (it arrived during that settlement, or the leg was aborted first) waits for the leg after instead of riding this leg's turn-open batch; an uplink frame's `seq` (`_sema_provenance.seq`, the frame key, the parked record's id) is now a per-process draw near 2^51, not near the wall clock in ms. *Who is hurt*: @test probes that count on the twin appearing after a double fault, or read the uplink seq as a timestamp; @client-core / @cli renderers see one copy where two arrived (no API change). *Compensation*: none needed for delivery (deliveries only decrease); read the uplink seq as an opaque per-sender counter (it is only ever compared for equality).
|
|
748
|
+
- **Divergence candidates D-2758-a / b / c (open to veto; Claude Code 2.1.309 does not anchor this).** Claude Code's mailbox write mints a new message id per write and does not retry a failed write (it logs and returns), and its reader keeps "delivered / consumed but not yet marked" message sets in its own process — so it never asks a store "is this the record I already sent". sema's at-least-once leased box with a re-asking park seat does: (a) the store keeps a received window of exactly 256 id-bearing records per box; (b) a double fault's copy is a debt settled against its own box at the next leg; (c) a window hit answers the record's original seq (the `append` signature is unchanged).
|
|
749
|
+
- **Limits, stated (KL-2758-a).** When the store refuses all three asks (the seat's two and the next leg's settlement) while the first had committed, the next leg reads the copy and the box's record — two reads, as before this change. A box that consumes more than 256 id-bearing records between two legs of this process puts the debt's record outside the window: the settlement writes it again (a second delivery). A pre-7.61.0 engine sharing a file mailbox directory skips the snapshot's `consumed` event (disclosed through `onCorruptRead` as a foreign record) and, when it rewrites the box, drops the window: upgrade every engine that shares one mailbox directory together (a layout stamp that refuses the older engine loudly is #3086). KL-969j is closed.
|
|
750
|
+
|
|
751
|
+
### A run reads its caller's `TaskSpec` once, at its entrance — every member by ordinary lookup into one frozen snapshot that the session lock, prepare, the leg and the backstop all read (#3059, #3039 S1, C-R996 K1 / K3 / K4 / K6; #3061 and #3062 in the same change; security: a retired key a Proxy answers, and the screened prompt; hard-breaking: one group of behavior)
|
|
752
|
+
|
|
753
|
+
- **Before.** A caller's spec had three readings. Prepare's first copy kept the prototype and the own descriptors (an inherited or non-enumerable member visible, an accessor live, a Proxy's `get`-only answer invisible); the delegation rebind, the model gate and the plan pair then spread it (only own enumerable members survived, so an inherited `permissionMode` or `appendSystemPrompt` stopped applying on those three paths); the retired-key door looked keys up on the first copy. The stream layer read the caller's object itself before prepare (attribution, tracer, task id, session id — the session lock was taken on that read), and the leg read `objective` from it twice: once to build the prompt the model was sent, once for the prompt `classic.UserPromptSubmit` screened.
|
|
754
|
+
- **Now.** `readCallerSpec` (`src/core/task-spec-members.ts`) takes each `TaskSpec` member once, by name, through an ordinary property lookup (an inherited, non-enumerable, accessor-backed or Proxy-answered member included), and lands every defined value as an own enumerable data member of a frozen plain object. `Runner.runTaskStream` reads its spec through it before anything else, and every reader after that reads the snapshot: the lock and prepare see the same session id, the screen and the model the same objective, and every later copy keeps every member. Prepare answers the same read again rather than reading twice; the resume ladder reads its re-supplied config through the same function at the verb boundary. The member table (`TASK_SPEC_MEMBERS`) is fenced both ways against `TaskSpec` at compile time. The one re-read kept is the tool roster's identity check (a reassigned `spec.tools` is still refused `config.tool_mount_denied`): it compares objects, it takes no value.
|
|
755
|
+
- **Refusals of the read (by name, where prepare refuses; on a resume beside the config's container door, before any rung reads the config, as `checkpoint.config_refused`, `detail.field: "taskConfig"`).** A retired key the lookup answers — on the prototype, non-enumerable or only through a Proxy `get` — is `config.spec_retired_key` (#3061: such a `hooks` record used to pass silently on every path, so a deny callback it carried never ran). A member whose read throws is `config.spec_member_unreadable` (`detail.member`) — a dotted retired row whose step's own lookup throws too (`attachments.planModeReminder` on a bag that answers by accessor or Proxy, named by the row); whatever value was thrown, the run gets the refusal, never a throw from `runTaskStream`. An own enumerable key that is neither a member nor a retired name is `config.spec_unknown_key` (`detail.keys`); an inherited unknown name is not read and not refused (a class's prototype methods pass), while an own non-enumerable or symbol-keyed one is refused since #3202 (above). `CHECKPOINT_CONFIG_REFUSAL_CODES` gains the two new words (49 → 51).
|
|
756
|
+
- **Hard-breaking (one group of behavior), @server @cli @client-core.** *What changed*: a spec's members are taken once at the run's start by lookup, so a member supplied through the prototype, as a non-enumerable property, by a getter or by a Proxy now applies on every path (before, the agents / model-gate / plan paths dropped it — the mode it names can be wider than the default, e.g. `bypassPermissions`); a getter is not read again mid-run; a getter that throws, or an own key the engine does not declare, refuses the run. *Who is hurt*: a host that builds a spec as a class instance, a Proxy or a bag with getters, or that leaves extra own keys on it. @server and @client-core stated zero changes (their specs are literals built key by key from declared tables; server's body door already refuses undeclared keys); @cli builds its request body key by key. *How to migrate*: write each value you want as an own data member of the spec; keep anything the engine should not read off the spec (not on its prototype, not as an own key).
|
|
757
|
+
- **Reach — the budget spellings before `limits` (@server @cli).** The former top-level `maxCostUsd`, `maxTokens`, `budgetStreamCancel` and `degrade` were folded into `limits` (design/164) without a retired-key row, so since then a spec still carrying one at the top level ran with no such ceiling and no word. Each is an own key the engine does not read, so it is now refused at the run's start (`config.spec_unknown_key`, the key named in `detail.keys`): write `limits.maxCostUsd` / `limits.maxTokens` / `limits.budgetStreamCancel` / `limits.degrade`.
|
|
758
|
+
- **Known limits (stated).** A member's own contents are taken by reference (the roster's entries, a policy, a signal object): each has its own reader's snapshot, and changing one after the start is that reader's business. A member read by name but declared nowhere in the type (a value reached through `any`) is not on the table, so it is refused as unknown when it is an own key and not read otherwise. The engine's relay entrances that spread a spec before `runTask` (warm resume, goal, verify, workflow) still take the caller's object their own way — #3060.
|
|
759
|
+
- **Pins.** `test/backlog3059-taskspec-read-once.test.ts` (real Runner: an inherited / non-enumerable / Proxy-answered / getter `permissionMode` on the plain, agents-rebind and model-gate paths reads as the own member; an inherited / Proxy `appendSystemPrompt` on the plan path; `autoModeRequested` and `hooks` through the prototype, a Proxy and a non-enumerable property refused on the plain, agents and model-gate paths; a getter `objective` screened and sent as one value, read once; a getter `sessionId` read once; a spec changed while its run waits for the session lock is not read, a reassigned roster refused; a throwing getter / Proxy trap, a throwing nested retired step, a thrown value with no string form and an unknown own key refused; the resume config read the same way, an unreadable config member refused before the store seat is read). `test/backlog1950-resume-config-doors-preclaim.test.ts` I: the closed set's two new words, each with its recipe through the screen as the verb composes it. Re-pinned to the one read (#3162): `test/design393-s6-run-leg-lanes.test.ts` WIRED (every lane holds the run's one snapshot by identity — frozen, the caller's members, answering its own read — not the caller's object; the walltime witness writes into the shared `limits` bag); `test/remote-suspend-resume-design80.test.ts` RB-22 (its fixture's top-level `maxCostUsd` had no reader: the ceiling is `limits.maxCostUsd`, the approve-resume's window declared exhausted, the approved call runs once and the run ends `failed` + `limits.max_cost_exceeded`; a top-level `maxCostUsd` is refused by name).
|
|
760
|
+
|
|
761
|
+
### On macOS, `NodeExecutionEnv` can keep the byte floor at the OS: `readFloorConfinement: "os"` runs every start that carries a floor under `sandbox-exec` with a profile translated from the same read-deny table, and the environment then declares `keepsReadFloor: true` (#3051, #2945 S1, design/3035-2945 K2–K7, ruled C-R992; behavior change only where the option is set; hard-breaking: `ReadFloor.confinement(dialect)` is a required member, three sentences below, open to veto; closed sets: `ENGINE_NOTICE_CODES` +1 `config.read_floor_confinement_unavailable` (operator, engine); exports: +1 root value `confineShellStart`) (@server @cli @client-core)
|
|
762
|
+
|
|
763
|
+
- **Before.** `NodeExecutionEnv` declared `keepsReadFloor: false` with no way to say otherwise: on the local lane a recursive read under the root carried a deny row's bytes into the conversation (KL-r2-a), and the run was only announced (`config.read_deny_floor_unkept`) or refused at prepare (`readDenyFloorRequired`).
|
|
764
|
+
- **Now.** `new NodeExecutionEnv({ …, readFloorConfinement: "os" })` probes once, at construction, whether the seatbelt base applies on this host (`/usr/bin/sandbox-exec -p <base> /usr/bin/true`). When it does, the environment declares `keepsReadFloor: true` and every `exec` / `spawnBackground` that carries `readFloor` runs as `/usr/bin/sandbox-exec -p <profile> <shell> <args…>`, so every process the command starts inherits the profile. The profile is `ReadFloor.confinement("seatbelt")`, translated from the table `denies` judges with — the built-in tiers' segment rows (ASCII case folded, every spelling the table's NFC reading takes for the same name — a composed character's two, the Kelvin sign for `K` — the win32 reading's trailing dots and spaces, and a backslash as a separator wherever the table splits on one), the deployment's, the task's and the home's placed rows at every anchor they were placed at, and a person's `Read(...)` deny rules (their exact bytes, `**` spanning segments, a rule whose base leads elsewhere met where it leads). On a deny-default base (the reference's process, mach-service, sysctl, IPC and device rules; network allowed) it allows every read except the table's expressions — directory metadata stays readable — and every write except creating or unlinking a denied path or any ancestor of where a row is met, so no rename, hard link or copy carries a denied file out. A row the dialect cannot express (a control character, a composed character with more than one mark or one some single code point is equivalent to, a marked character beside a `*` — the marks a wildcard meets can reorder into it — an expression over the 900 bytes the dialect reads, a table or rule row the engine did not compile) refuses that start — `spawn_error` in the foreground, `spawn_failed` in the background, the sentence naming the row — and so do a table that cannot judge at that start (a partition of a person's persisted rules unread, tables still compiling — `denies` refuses every path then) and a profile the host's launcher rejects; the command never runs unconfined. On any other platform, or when the probe does not apply (a host already inside a sandbox), the environment declares `false` and says why once on `onNotice` (`config.read_floor_confinement_unavailable`, `detail: { reason }`); the run's own judgment (`config.read_deny_floor_unkept`, or the prepare refusal) follows unchanged. Any value other than `"os"` or absent throws at construction. Absent = the environment as before.
|
|
765
|
+
- **What a confined command meets.** A program that reads a denied file fails the way a permission error fails (`grep -r` under the root skips it, `cat` of it exits 1) — and so does a credential command whose own files the default tiers deny (`ssh` reading `~/.ssh`, `gh` reading `~/.config/gh`): that is the table doing its job, not a defect. Creating or removing a directory a row passes through (`mkdir ~/.config` where it is absent) is refused too.
|
|
766
|
+
- **Honest scope.** The floor governs the processes the command itself starts. Work it hands to a service already running outside the sandbox — a container daemon over its socket, a local server over TCP — is that service's, as on any host (KNOWN-LIMITS KL-3051-b). Linux and Windows hosts declare `false` in this release (KL-3051-a). A segment the win32 reading drops (`. `, a `.. ` that pops) is not modeled for a placed row: such a path names another file on a macOS disk than the row's, and the profile does not refuse it although `denies` does (KL-3051-c). A `Read(...)` deny rule with a `*` or `**` between its base and its last segment holds its base, its ancestors and every path it matches in place, but not the directories its wildcards pass through: `Read(.env)` reaches `<cwd>/**/.env`, so `mv deep /tmp/x` runs and `/tmp/x/dir/.env` is then outside the rule's reach — as `denies` says too. A bare name reads at any depth, so `Read(./secrets/**)` (`<cwd>/**/secrets/**`) is the same shape; a rule whose head is a whole path (`./a/secrets/**`, `/abs/x/**`, `~/vault/**`) and the segment rows hold every part (holding every directory a wildcard passes would refuse removing or renaming any directory of the project; KL-3051-d, the reference's form).
|
|
767
|
+
- **Hard-breaking, open to veto — `ReadFloor.confinement` is required (@server @cli @client-core).** *What changed:* `ReadFloor` gains the required member `confinement(dialect: "seatbelt"): { ok: true; profile: string } | { ok: false; row: string; reason: string }`, the floor's own translation into the dialect, of the table `denies` judges with at that ask (kept while that table's compiled rows are unchanged). *Who is hurt:* a host that builds a `ReadFloor` by hand (a test double, a wrapper) — it no longer type-checks until it has the member; server's adapters, the CLI and client-core build none (Consumers, below), so the harm falls on an embedder's own floors. *Why it is required:* an environment that keeps the floor at the OS needs the table as a profile, and a profile built anywhere but from the compiled table would be a second reading of it that can refuse less (`rows` are the strings refusals cite: they have lost the home anchor and a rule's base). *Migration:* a floor the engine hands you already has it; a hand-built `ReadFloor` (a test double, a wrapper) adds `confinement: () => ({ ok: false, row: "", reason: "…" })` — an environment that keeps the floor then refuses the start, which is the contract.
|
|
768
|
+
- **Consumers.** @server: none of the seven adapters builds a `ReadFloor` (grep of `int-7139`), so nothing breaks there; a host lane that spawns on the engine's macOS host can wrap its starts with `confineShellStart` (root export) and declare `keepsReadFloor: true` — the sandboxed lanes keep the floor their own way (S-2218). @cli / @client-core: no `ReadFloor` is built in either repo; `ENGINE_NOTICE_CODES` +1 (audience `operator`) — a table that pins the code set adds the row; a shell that wants the local lane confined passes `readFloorConfinement: "os"`.
|
|
769
|
+
- **Deviations from the reference (registered as candidates).** `read-floor-confinement-macos-only` — ours: macOS only, other platforms declare `false`; the reference also confines on Linux (bubblewrap). `read-floor-confinement-no-model-escape` — ours: the model has no per-command way out of the confinement; the reference's Bash tool can be asked to run a command unsandboxed. `read-floor-confinement-reads-only` — ours: the profile floors reads and holds denied paths in place, and allows every other write; the reference's sandbox also restricts writes to its allowed directories.
|
|
770
|
+
- **Exports.** +1 root value `confineShellStart(start, floor)` — the pure wrapping any environment that spawns on the engine's host takes: no floor ⇒ the start as it is; a floor ⇒ the `sandbox-exec` start and its profile; a row the profile cannot express ⇒ that row and why. Members: `ReadFloor.confinement` (required, above), `NodeExecutionEnv` option `readFloorConfinement?: "os"`.
|
|
771
|
+
- **Pins.** `test/backlog3051-os-confinement.test.ts` (T2 a corpus of home, rooted, project and rule paths: a profile expression meets each path exactly when `denies` refuses it, a case twin and a trailing-dot twin are met, a rule row whose base leads elsewhere is met where it leads, a row the dialect cannot express answers that row, a hand-built table has none; T4 a platform with no confinement: `false`, one notice, the run's judgment code; no request: silent; an unreadable request throws; T6 no floor: the start as it is, the root export is the same function; on macOS with the real launcher — T1 a confined `grep -r` and every direct read meet no denied byte while the ordinary file reads, unconfined they do, the declared home not the process's; T2n the native verdict equals `denies` path by path, a row longer than the dialect refuses at translation; T3 the background start, `rg`, a `git` that follows `include.path` into a denied file; T5 a floor the profile cannot express or a profile that does not apply refuses the start and the command never runs; T7 a denied file, a denied directory, the middle segment of an unplaced row and the home's ancestor cannot be moved, linked or copied out; T8 the base is deny-default with the reference's mach list and no Apple Events). Twelve mutations, each red on at least one cell.
|
|
772
|
+
- **No floor, the start as it was.** A start that carries no `readFloor`, and every start of an environment without the option, spawns what 7.60.0 spawns: the same program and arguments (`<shell> <args…> <command>`), working directory, environment, stdio and process group. The handover pin of `test/backlog741-tool-progress.test.ts` now writes with shell builtins only, at most 2,000,000 lines under a 30-second exec timeout (#3151): it had paused with a forked `sleep` per line, so under a background-priority run (darwin `taskpolicy -b`) it wrote about one line per output poll and its precondition held about one run in two — on this branch and on 7.60.0 alike.
|
|
773
|
+
|
|
774
|
+
### An input carries who wrote it, and `classic.UserPromptSubmit` screens by that word — only the operator's inputs are screened, carried across a pause and counted as the person's (#2941, #2943; design/2762 S1a + S1b, C-R963 Q1–Q6; behavior change; hard-breaking: three, three sentences each below, open to veto; closed sets: one new, `InputAuthor` (6 words); exports: +2 root values `INPUT_AUTHORS` / `isInputAuthor`, +1 root type `InputAuthor`; members: `RunInternals.operatorObjective` −1, `RunInternals.objectiveAuthor` +1, `runGoal` +1 optional parameter) (@server @client-core @cli @test)
|
|
775
|
+
|
|
776
|
+
- **Before.** Whether an input passed `classic.UserPromptSubmit` was a leg-level guess: a top-level leg's objective was screened, a delegated leg's was not unless the trusted boolean `RunInternals.operatorObjective` said an operator wrote it, and every live steer was screened. So inputs nobody typed were screened as a person's prompt: the observer leg's digest (a top-level leg), the observer's report into the observed child (it rode the public steer), a verification gate's verifier and fix legs, a repair loop's later attempts and a goal's later iterations (each a fresh top-level leg). A report the observed child had received but not yet read was parked across a durable pause and counted on the person's undelivered-input account (`task.user_steer_undrained`). `runGoal` dispatched every iteration with the literal `{ goalMode: true }`, so a goal run inside a delegated leg lost the delegation fact.
|
|
777
|
+
- **Now.** Every input carries one engine-minted word of `INPUT_AUTHORS` — `operator` / `parent_model` / `workflow` / `peer` / `observer` / `engine` — said once by the seat that mints it, carried with the input inside the process, never inherited. A public entry's objective with no word on the trusted channel is the operator's; the Agent tool says `parent_model` (`peer` on a recorded agent's revival); a workflow's agents say `workflow`; a retained child's resume states its own (`operator` through the steer handle, `peer` through SendMessage) and the retained snapshot keeps none; the observer pairing says `observer` for its leg and for the report; a recipe says `engine` on its continuation legs (verify's verifier / fix, repair's later attempts, goal's iterations after the first) and hands its caller's word to its first leg (run-spec's one leg included). One predicate reads the word: an input whose author is not one of the five non-operator words — the operator's, or a word that cannot be read — is screened, parked across a pause and counted as the person's; the rest are none of those. `TaskStream.steer` mints `operator` on every call; the engine relays an observer's report through a seat on the stream object the Runner minted, never on the package face. Lifecycle events stay the delegation fact's: a delegated leg still opens on `classic.SubagentStart` whoever wrote its objective (`legEventsOf` reads the delegation fact alone). `runGoal(runner, spec, internals?)` forwards the caller's trusted channel to every iteration — the first keeps the caller's author and the delegation fact, the later ones are `engine`. An author outside the set on `RunInternals.objectiveAuthor` reads `unknown`: the objective is screened as the operator's and the value is reported once (`onError`, phase `"config"`, classification `input-author-unreadable`). The boundary with `runOrigin`: `runOrigin` answers where a run came from (the host's declaration, attribution only), the author answers who wrote an input (the engine's mint) — only a public verb takes a `runOrigin`, so an input carrying one is the operator's.
|
|
778
|
+
- **Hard-breaking ① — the screen no longer sees observer text or a recipe's continuation, open to veto.** *What changed:* `classic.UserPromptSubmit` is no longer raised for the observer leg's digest, for an observer's report steered into the observed child, for a verification gate's verifier and fix legs, for a repair loop's attempts after the first, or for a goal's iterations after the first. *Who is hurt:* a deployment that screens, blocks or injects context into those internal turns through that event; a probe pinned on "an observer report is screened with `source: "steer"`". *Compensation:* there is no same-form seat: the person's request is still screened at the public entry and at every recipe's first leg; observer text is not screened in Claude Code either (it lives on the subagent lane); a recipe's later legs are the calling host's own composition, so the host is where they are governed. A model-facing seat that sees the author is a candidate ticket, opened when a consumer needs it.
|
|
779
|
+
- **Hard-breaking ② — `RunInternals.operatorObjective` is retired for `RunInternals.objectiveAuthor`, open to veto.** *What changed:* the root-exported `RunInternals` loses the boolean `operatorObjective` (no alias) and gains `objectiveAuthor?: InputAuthor`. *Who is hurt:* a host that builds its own internals and set `operatorObjective`. @server builds internals with `Pick<RunInternals, …>` of other members (`src/http/durable-run-leg.ts`, `src/http/resume-legs.ts`) and is not affected. *Compensation:* the compile error names the site; give the word — `operator` for a person's words, the delegator's word otherwise.
|
|
780
|
+
- **Hard-breaking ③ — an input another author wrote is not parked and not on the person's account, open to veto.** *What changed:* when a leg ends with an observer's report accepted but not yet delivered, the report is no longer parked on the checkpoint for the resumed leg, no longer counted in `task.user_steer_undrained` / `task.user_followup_undrained`, the `settled` frame's undrained counts or `hasPendingUserInput`; it is dropped and named once through `onError` (phase `"degraded"`, classification `undelivered-input-dropped`). *Who is hurt:* a deployment relying on a report received before a pause arriving after the resume, and a probe counting the person's undelivered account with observer reports in it. *Compensation:* none needed in the steady state — the observer reports the next segment again; the checkpoint store, the parked entry's fields (`PENDING_STEER_FROZEN_FIELDS`) and the replay facets are unchanged, so a mixed fleet reads every row as before.
|
|
781
|
+
- **Consumers.** @server: zero code change for ② (internals built from other members); a store's checkpoints are unchanged; the daemon's wake is the operator's. @client-core / @cli: the closed set is on the root face for rendering; the per-input projection (`human_input.author`) is the next step (#2942), not this one. @test: the black-box rows are a screen that lets through only the expected operator inputs while observer, verify and goal runs complete — the row counts screens and model calls per leg.
|
|
782
|
+
- **Pins.** `test/backlog2941-input-author.test.ts` (the closed set and the one predicate; A1 the operator's objective and every option spelling of a live steer are screened; A2 / A3 / A4 an Agent prompt, a workflow agent and a SendMessage resume are not, and each opens on `classic.SubagentStart`; A5 the observer leg's digest and its report are not, and the report reaches the running child; A6 verify / goal / repair continuation legs run unscreened while each recipe's first leg — run-spec's one leg included — is screened; G1 an operator-resumed child's grandchild is minted `parent_model`; C a durable park carries the operator's steer (screened once on redelivery, the objective not again) and not the observer's report, which is named once, and the live end the same; U1 an unreadable word; R1 `runOrigin`; #2943 a goal inside a delegated leg keeps the delegation fact and its author; H the harness seam). Re-pinned to the new reading: `test/backlog1500-subagent-prompt-hooks.test.ts` T1 (the lifecycle table has no screen column), `test/backlog246-internals-seam.test.ts` (a gate's later legs are always a copy carrying `objectiveAuthor: "engine"`), `test/harness-engine-injection-hold.test.ts` and `test/turn-interrupt-373.test.ts` (an authored relay frame states `author`).
|
|
783
|
+
|
|
784
|
+
### A cascade rung that durably parks can be resumed and the ladder continues: the card records which rung of whose run it is, and `resumeCascade` continues it through `Runner.resume` and climbs the rest of the ladder (#3110, design/3087 S1, C-R1013 K1 (a′) / K2 (A) / K3 (A) / K4 / K6, addendum 1 K7; hard-breaking: 3; closed sets: +1 `CheckpointError` code `resume.composition_mismatch`, +1 `RequirementWord` `composition_leg`; exports: +1 function `resumeCascade`, +1 type `CompositionLeg`; members: `RunInternals.compositionLeg?`, `CheckpointState.compositionLeg?`, `TaskResult.placementRoot?`) (@server @cli @client-core @test)
|
|
785
|
+
|
|
786
|
+
- **Before.** A rung that parked on a durable gate ended the ladder `exhausted` with the pause on `failed.nestedPause`, and nothing could continue the ladder: a bare `runner.resume` of the card finished that one rung only — no gate, no escalation, no `cascadeOutcome` — and the card did not say which rung it was or which host run it belonged to (the rung runs in its own session, not the caller's). The rungs after the first were placed at the first rung's `sessionId`.
|
|
787
|
+
- **Now.** When the caller's spec names its session (`TaskSpec.sessionId`, which no rung runs in), every rung is handed `RunInternals.compositionLeg = { entry: "cascade", leg: <rung index>, hostSessionId }` and a rung that parks records it on its card (`CheckpointState.compositionLeg`), stamped and restored by the same pair as the card's placement root: the live value wins, an absent live value is restored from the card, a live value over a card that records none is its first record, and a live value that contradicts the card is refused before the claim (`resume.composition_mismatch`, the card stays pending). `resumeCascade(runner, token, outcome, spec, config, parkedLeg, internals?)` continues the parked rung through `runner.resume` on that rung's own model and overrides, gates its result like a fresh rung, escalates on a fail and re-parks with that rung's own card; the resumed rung occupies its slot (the escalation cap, the cost ceiling and the wall-clock budget never refuse or cut it), and the attempts, stats, escalations and budget cover this call only. A run now reports the placement fixed point its prepare resolved (`TaskResult.placementRoot`), and a composition places its later legs at the fixed point its first leg reports — for a resumed rung, the one its card recorded — so the rungs after a resumed one land where the ladder's work was placed, not at the resumed rung's own session nor at a delegation root (`rootSessionId`) the resume's internals carry. Children of a rung are never handed `compositionLeg`. A spec that names no session mints no composition leg (KL-3087-a).
|
|
788
|
+
- **Hard-breaking, open to veto.** ① *What*: a new refusal code `resume.composition_mismatch` — an explicit `internals.compositionLeg` on a resume that differs from the card's. *Who*: consumers that enumerate resume refusal codes (server error mapping, client-core projection, cli wording, test criteria). *Compensation*: add the word; a host that passes the card's own `compositionLeg` (or none) never triggers it. ② *What*: the contract is written down — a parked result's `sessionId` is the parked leg's session (= the card's `Checkpoint.sessionId`), which for a cascade rung is not the caller's session; the card's `compositionLeg.hostSessionId` is the host session the card belongs to. *Who*: a host that links a parked card to its run by "the card sits in the session I submitted" (server S-2614: the judge-session cell, the run-side readers, the steer park). *Compensation*: link card → run by the card's `compositionLeg.hostSessionId`, and run → card by "cards in the host session ∪ cards whose host is this session". ③ *What*: a row that records a composition leg carries the requirement word `composition_leg`, so a worker older than 7.61.0 refuses it (`version_newer`). *Who*: a mixed-version fleet in which a 7.61.0 worker parks a cascade rung for a named host session and an older worker resumes it. *Compensation*: finish the upgrade before such cards are resumed, or resume them on a 7.61.0 worker; rows without a composition leg are unchanged.
|
|
789
|
+
- **Who needs it.** A deployment that runs a cascade with a durable approval: before, an approved rung could finish but its answer was never gated and the rest of the ladder never ran — a host that landed that answer as the cascade's answer reported an ungated result.
|
|
790
|
+
- **Also changed (not breaking).** `runCascade` reads `spec.sessionId` as the composition's host session (it was dropped silently); every rung of a cascade with a host session is dispatched with a copy of the caller's internals carrying its leg (before, a later rung with nothing to gain on placement — a caller carrying its own fixed point, a first rung that reported no target — got the caller's object itself). The composition entries' later legs read the first leg's reported `placementRoot`, not its `sessionId` (equal for every top-level leg a 7.61.0 engine assembles), and land there: a later leg rides the caller's object itself only when that object already resolves to it (`placementRoot`, else `rootSessionId` — always so on a fresh entry). A resume handed a `rootSessionId` that differs from the card's recorded root now places the legs after the resumed one at the card's root; before, they landed at that `rootSessionId` (`resumeWithVerification` included). The resume's internals snapshot copies `compositionLeg`, so the card is stamped with the leg the resume compared even if the caller rewrites its object mid-resume. A first-leg result that reports none hands the later legs no fixed point — a result assembled by a runner that is not this engine's, by an older engine, or rebuilt without the key; for `verifyCompleted` that is a caller-held result read back from a store that does not keep `placementRoot`, whose verifier and fix legs are then placed at their own sessions instead of the implementation leg's (keep the key, or pass `RunInternals.placementRoot`).
|
|
791
|
+
- **Consumers.** @server S-2614: the cascade half of the nested-park judge depends on this (the resume leg's `cascade` arm calls `resumeCascade` with the original task body and the card's `compositionLeg`; `fwdInternals` keeps carrying observation seats only — the engine mints the leg itself from `spec.sessionId`; if it carries a `rootSessionId`, the rungs after the resumed one now land at the card's root rather than at that value — please confirm against your resume path); map `resume.composition_mismatch`; a `verifyCompleted` call handed a result from your own store needs the result's `placementRoot` kept (or `RunInternals.placementRoot` passed). @client-core: project the new code into the resume refusal set. @cli: a parked cascade rung, once decided, continues the ladder instead of ending at that rung; the mismatch refusal says both legs and how to retry. @test: criterion — a rung card resumed to the end does not flip the fixed point (the rungs after it are placed at rung 0's session).
|
|
792
|
+
- **Pins.** `test/backlog3110-cascade-park-seat.test.ts` (real Runner lanes: a rung-1 card records rung 0's fixed point and its composition leg and word, and the paused result's `sessionId` is the card's; a bare re-park keeps the leg, and keeps it when the caller rewrites its leg object at the claim; a spec without a session mints none; `resumeCascade` passes on the parked rung's model, escalates a failing resumed rung to a rung placed at rung 0's session — also when the resume carries another `rootSessionId`, while a fresh caller carrying its own fixed point rides every rung by its own object (and a resumed verify gate places its verifier at the card's root the same way) — never refuses or cuts the resumed rung on a zero cap / ceiling / budget, refuses a contradicting leg pre-CAS on both doors and a non-cascade leg before any dispatch, and takes a live leg as the first record of a card — fresh or older — that records none; `TaskResult.placementRoot` on top-level, placed and resumed legs; a delegated child of a rung is handed no leg), `test/backlog246-internals-seam.test.ts` (the forward shape), `test/backlog1320-reader-requirements.test.ts` (the maximal row carries the new word).
|
|
793
|
+
|
|
794
|
+
### A verification gate's or a repair loop's later legs run on what the task's ceilings left: the task's `limits` (or, on a task that can suspend, its `resourceSuspend` totals) bound the whole task, not each leg of it (#3170; behavior narrowing, open to veto; hard-breaking: yes, three sentences below, open to veto; closed sets: none; exports: none; members: +1 `VerificationOutcome.allowanceExhausted?` (also on `RepairResult.verification`)) (@server @test)
|
|
795
|
+
|
|
796
|
+
- **Before.** Every fix leg of `runWithVerification` / `resumeWithVerification` / `verifyCompleted`, and every attempt after the first of `runRepairLoop` (the clean restart included), was a fresh `runTask` on the caller's spec, so each got the caller's full `limits.maxCostUsd` / `maxTokens` / `maxTurns` window — and, on a task with `resourceSuspend`, the full `totalBudgetUsd` / `totalTokens` again, since a fresh leg seeds its ledger from the spec. A task with a $1 ceiling and three rounds could spend $4 on its implementation side, and the whole-task totals that a resume can never refresh were refreshed by every fix leg.
|
|
797
|
+
- **Now.** One rule for both compositions (`src/agents/composition-allowance.ts`): a later leg is dispatched with the task's whole-task ceilings less what the legs before it in this call spent — their own reported spend, the figure each leg's own limit gate read. The whole-task ceilings are `resourceSuspend.totalBudgetUsd` / `totalTokens` on a task that set `resourceSuspend` (its `limits` windows still pace each slice, and every leg opens one, as a resume does), and `limits.maxCostUsd` / `maxTokens` / `maxTurns` otherwise. A leg with something left runs on it and the engine judges it as any run (`limits.max_cost_exceeded` / `max_tokens_exceeded` / `max_turns_exceeded` when it crosses); an axis with nothing left dispatches no further leg — the loop stops at the exit its cost ceiling uses (the gate returns the current FAIL and its findings; the repair loop gives up, and the clean restart is not granted) and says so on `verification.allowanceExhausted = { axis: "cost" | "tokens" | "turns", remaining }` (`remaining` in micro-USD, tokens or turns: `0`; absent when the spend cannot be known — a leg ran unpriced under a cost ceiling, which is not read as room). The verifier's and the oracle's spend are not on this account (they stay on `verifierCost` / `oracleCostMicroUsd` and are bounded by `costCeilingMicroUsd`); `maxWalltimeMs` stays per leg (the loop's clock is `totalTimeoutMs`); nothing armed ⇒ the later leg's spec is the caller's own, as before.
|
|
798
|
+
- **Hard-breaking, open to veto.** *What*: `limits` (or `resourceSuspend.total*`) on a task handed to the verification gate or the repair loop now bound the task's implementation side as a whole; a later leg gets only the remainder, and none at all when an axis is spent. *Who*: a host that sized `limits` per leg and expects every fix round its own window; @server — the verify path's contract pin reads the composition total (the leg that crosses the remainder fails `limits.max_cost_exceeded`; a leg that would start on nothing is not dispatched, and the result says `verification.allowanceExhausted.axis`), and the MIGRATION limitation sentence about per-leg totals can be withdrawn; @test — the criterion. *Compensation*: set the ceiling for the whole task (add up what the rounds may spend), or bound the loop with `costCeilingMicroUsd` / `maxRounds` / `maxAttempts` as before.
|
|
799
|
+
- **Not changed.** `runGoal` keeps its per-iteration allowance (an exhausted iteration is re-prompted; the goal's own total is `budgetTokens`) and `runCascade` its per-rung allowance (`overrides.limits`; a resumed ladder's accounting covers that call) — KL-3170-a / KL-3170-b. The account covers one call: after a durable pause, the legs after the resumed one count the resumed leg's own report (for a resource-suspended leg, its whole chain), not what the parking call's other legs spent; and the ceilings it cuts from are the ones the resume call hands in — a resume that leaves the `resourceSuspend` totals out (they are frozen on the checkpoint's ledger after the first slice) gives the later legs no whole-task ceiling, and one that raises them gives the later legs the raised figure while the resumed leg itself runs on the frozen one (KL-3170-c, a transition that #3176 closes).
|
|
800
|
+
- **Pins.** `test/backlog3170-composition-allowance.test.ts` (real Runner lanes: two legs each under a cost ceiling and over it together ⇒ the fix leg runs on the remainder and fails `limits.max_cost_exceeded`, control a ceiling covering both; an implementation leg that spent the ceiling ⇒ no fix leg, `allowanceExhausted: { axis: "cost", remaining: 0 }`; the token and turn axes each one cell, a result handed in at its turn ceiling ⇒ no fix leg; `resourceSuspend` totals cut while the slice window rides unchanged; a resource-parked leg resumed through `resumeWithVerification` is counted once; the repair loop's attempt 2, its clean restart and its spent-ceiling give-up; the one reading's attribution order, unpriced spend, the `maxTurns: 0` sentinel and an unevaluable total).
|
|
801
|
+
|
|
802
|
+
### The Read refusal for an over-cap image names the right cause when the deployment turned the image processor off: it no longer tells the model to install sharp (#3131; behavior change: the wording of one refusal sentence; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
803
|
+
|
|
804
|
+
- **Before.** The Read tool's refusal for an image over the no-processor caps always ended `Install the optional "sharp" dependency …` — also when the deployment had set `RunnerDeps.imageProcessor: false` (sharp installed or not). The model was told to fix something no caller of its can change, and the cause the sentence named was not the cause.
|
|
805
|
+
- **Now.** One function (`noProcessorImageCapHint`) picks that sentence from the processor seat's three states: `false` ⇒ `This deployment turned the image processor off: images are not downsampled and are read only up to 3932160 bytes — shrink the image first, e.g. with an image tool run in the shell.`; absent with sharp not resolved ⇒ the install sentence, unchanged; a processor in the seat ⇒ neither, as before. Both Read refusals that carried the sentence take it — the over-cap one and the one for an image whose stated edge is over the reject edge.
|
|
806
|
+
- **Pins.** `test/backlog3131-image-processor-off-hint.test.ts` (each seat state on both refusals, with sharp held unresolved for the absent state; the chooser), and the `A4-2` cell of `test/read-image-pipeline.test.ts` now reads the `false` state.
|
|
807
|
+
|
|
808
|
+
### A registration name has one form and the person's card quotes it: registration names outside `^[A-Za-z0-9._:-]{1,64}$` are refused at registration (#3133; behavior narrowing, open to veto; hard-breaking: none — every production name is inside the form; closed sets: none; exports: none) (@server @cli @test)
|
|
809
|
+
|
|
810
|
+
- **Before.** A registration's name had no form (the kernel's screen checked only that it was a non-empty string, not the engine's own word, and unique), and the person's card put it between quotes as it came — `extension "<name>"` — cut and one-lined but not escaped. A mod could name itself `evil" ) approved by extension "trusted" (` and rewrite the card's sentence about who asked or who allowed.
|
|
811
|
+
- **Now.** One rule at the entrance, and the sentence quotes what the rule lets through. `screenOne` refuses a name outside 1–64 of letters, digits, `.`, `_`, `:` and `-` (the colon is the separator of the documented `skill:<name>` spelling; it has no position rule) with `config.mods_invalid` — the screen's own code — naming the form and the value's length, never the value. The card's two sentences about an extension (the question `asked by …` and the allow `… allowed this call`, and the denial that reads the same speaker) mint the name once (`extensionNamed`) as a JSON string, so a name that did not pass this screen cannot end its quotes and run on. The name is judged on the one read the screen keeps — an accessor that answers a string and then an object is refused. For a registered name the text is byte-for-byte what it was. The extension's own reason still follows after a colon, one line, as before.
|
|
812
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* a person reading `extension "<name>"` on a card. *Affected:* a host or a mod package whose registration name carries a space, a slash, a quote, a bracket, a non-ASCII letter or more than 64 characters — it is now refused at the first run that mounts it; the names the server registers (`server.brand-identity`, `server.permission-denied-meter`, `server.tool-trace`, `settings.hooks`) are inside the form, and a scan of the registrations in sema-server, sema-cli and sema-test found none outside it. *Compensation:* rename the registration (a package: `name` in `plugin.json`).
|
|
813
|
+
- **Pins.** `test/backlog3133-extension-name-form.test.ts` (ten hostile names refused with the code, the length and not the value; an accessor name read twice; the 64 / 65 edge; the production names and the `skill:<name>` spelling taken, a leading or trailing colon too; the question, the allow and the denial through the real gate read as before for a registered name, and a name that closes its own quotes stays one quoted word); `test/backlog1406-extension-clear-one-reading.test.ts` X13 is restated with in-form names (a 64-character cap makes the 80-character cut unreachable for a registered name).
|
|
814
|
+
|
|
815
|
+
### A Bash cut that the environment reported no output for no longer says the command wrote nothing: "no output was produced" is claimed only when the environment stated an empty capture (#3094; behavior change: the wording of one cut sentence; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
816
|
+
|
|
817
|
+
- **Before.** For a command cut by its timeout, a silence window, an abort or a failed output callback, the Bash tool read the environment's `partialStdout` and `partialStderr` with `?? ""` and so wrote `(no output was produced before the cutoff …)` both when the environment captured nothing and when it attached nothing at all — an adapter that does not carry a remote command's partial output across made the model read "the command wrote nothing" over output the person could see on screen.
|
|
818
|
+
- **Now.** Both members present and empty ⇒ the sentence as before, with its stall hint. Either member absent ⇒ `(the execution environment attached no partial output for this cutoff, so whether the command wrote anything before it is not known)`, without the stall hint (the silence cut's headline still names its own window, which the environment did state). Captured bytes, the `isError` posture for a cut with no data, and the structured details are unchanged. The contract is written down: `partialStdout` / `partialStderr` are strings when captured — empty or not — and absent when not captured or not said (`INTEGRATION-CORE.md`, the `ExecutionError` row; the `ExecutionError` JSDoc).
|
|
819
|
+
- **Consumers.** @server: the remote adapter that builds `ExecutionError` can attach the partial output it has (the fourth constructor argument); until it does the model reads the not-known sentence instead of a false one. An adapter that knows the capture was empty passes `""`. @test: a cell that asserted the old sentence over an environment attaching nothing now reads the new one.
|
|
820
|
+
- **Pins.** `test/backlog3094-partial-output-states.test.ts` (each cut code with nothing attached, with both streams stated empty, with one stated; the silence cut's headline and hint; captured bytes; the `isError` posture and the details equal in both states); `test/rb377-bash-zero-output-cut-iserror.test.ts` and `test/backlog1795-liveness-no-output.test.ts` now state the empty capture where they mean "captured nothing".
|
|
821
|
+
|
|
822
|
+
### `writeFileExclusive` runs to its end once its open has begun, so `aborted` again means no file was created (#3129; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
823
|
+
|
|
824
|
+
- **Before.** `NodeExecutionEnv.writeFileExclusive` handed the caller's signal to the `wx` write: an abort landing mid-write answered `aborted` over a new file holding only a prefix of the content — against the documented meaning, "`aborted` means it was never touched", and the same hole #3107 closed on the in-place legs of `writeFile`.
|
|
825
|
+
- **Now.** The signal is judged before the first byte (at entry and after the parent directory is made) and not given to the write: an abort that landed earlier answers `aborted` with nothing created; a write whose exclusive open has begun runs to its end and answers `ok` or its own error. One rule — `aborted` ⇒ untouched — as in `writeFile`. Claude Code 2.1.309's exclusive create (`writeExclusive`, `cli309.js:253020`) is a plain `wx` write with no signal and no staging, so this is its form.
|
|
826
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* every caller that reads `aborted` as "nothing was written". *Affected:* a caller that cancels a large exclusive create (the Edit-create lane among them): the write now completes instead of stopping half-way. *Compensation:* a caller that must be able to stop the write cancels before the call. @server: an adapter's own `writeFileExclusive` that cancels a transfer already begun should answer the same way — `aborted` only over no file.
|
|
827
|
+
- **Pins.** `test/backlog3129-exclusive-write-abort.test.ts` (an abort that lands once the file exists leaves the whole content, or no file under `aborted`; an already-aborted signal creates nothing; a fresh create and an existing target as controls).
|
|
828
|
+
|
|
829
|
+
### `@sema-agent/core-stores-sql` is built over one driver: the backend takes `driver` / `retention` / `transactionHooks` / `fileHistory`, the driver carries the engine's facts and the one fail-open sink, and a deployment's own ensure starts with `assertCoreSchemaReady` (#3147, design 3114 S1, C-R1015 D-1–D-6 with the D-5 condition; the public face and its option reads only — both factories still refuse; hard-breaking: the backend's options, three sentences below; closed sets: new `SQL_FAIL_OPEN_TAGS` (3 tags), `SqlSweepLeg` (4 legs), `SqlTransactionHooks` (2 groups, 5 hooks); exports (package `@sema-agent/core-stores-sql`): −1 type `RetentionCascadeHooks`, +1 function `assertCoreSchemaReady`, +3 values `SQL_FAIL_OPEN_TAGS` / `SQL_ENSURE_LOCK` / `SQL_SCHEMA_VERSION_TABLE`, +12 types; root `@sema-agent/core`: none) (@server @cli @client-core @test)
|
|
830
|
+
|
|
831
|
+
- **Before.** `createSqlStorageBackend` took `dialect`, `pool`, `retention`, `retentionCascade { liveReferences, beforeDelete }` and an `onFailOpen(tag: string, detail)`; `createSqlDriver` took `dialect` and `pool`; `SqlDriver` and `SqlTxConn` carried no facts; `ensureSchema()` answered nothing.
|
|
832
|
+
- **Now.** One pool, one driver: `createSqlDriver({ dialect, pool, onFailOpen? })` is the one place a connection's initialization and the engine's facts live (`SqlDriver.facts`, `SqlTxConn.facts`: engine, version, isolation, TiDB's transaction mode, the row and packet walls and where each number came from) and the one fail-open sink every read of the package reports through, its tag one word of `SQL_FAIL_OPEN_TAGS` (`core-stores-sql.<driver | seat>.<what>`; this version's three are the driver's). `createSqlStorageBackend({ driver, retention, transactionHooks?, fileHistory? })` takes only a driver `createSqlDriver` made — an object of the same shape is refused by name — and reads the driver last, so every other wrong value is named first; since no driver can be made in this version, every call ends at that read. `transactionHooks` is one closed table: `retention { holdLock, liveReferences, beforeDelete, audit }` (the hold answers `"proceed"` / `"held"`; `audit` writes the deployment's audit row in the deleting transaction from the call's receipt) and `session { beforeCommit }` (an import, an owner delete or a retention delete of a session tree's root, answered `"proceed"` or `{ refuse }`); every hook gets the transaction's statement face only (`SqlStatementFace`). `fileHistory.blobs` is a byte port (`SqlBlobBytesPort`: `put` / `get` / `delete`, optional `list`) under keys the backend mints per publication (`SqlBlobKey`); whether a blob is there is the backend's index alone. `SqlStorageBackend.ensureSchema()` answers a `SqlSchemaReport` (tables and indexes created, migrations applied) and runs under the package's own lock (`SQL_ENSURE_LOCK`) with its own version table (`SQL_SCHEMA_VERSION_TABLE`); `SqlStorageBackend.sweep({ nowMs })` is the age and orphan sweeps in one call (`SqlSweepReceipt`, one count per `SqlSweepLeg`). The managed-retention contract's audited clause says where the audit row of a split backend is written (the `audit` hook).
|
|
833
|
+
- **Hard-breaking — the backend's options.** *What changed:* `SqlStorageBackendOptions` loses `dialect`, `pool`, `retentionCascade` and `onFailOpen` and gains a required `driver: SqlDriver` and the optional `transactionHooks` / `fileHistory`; the type `RetentionCascadeHooks` is gone; `createSqlDriver` takes an optional `onFailOpen`; `SqlDriver` and `SqlTxConn` each gain a read-only `facts`; `ensureSchema()` answers a `SqlSchemaReport` instead of nothing. *Who is affected:* a caller that wrote the backend's options as a literal against the earlier face — it no longer compiles, and an untyped one is refused naming the retired key and the options there are. Both factories have refused every call since the package was first published, and the server, cli, client-core and test trees import nothing from the package. *What to do:* `createSqlStorageBackend({ driver: createSqlDriver({ dialect, pool, onFailOpen }), retention, transactionHooks: { retention: { liveReferences, beforeDelete } } })` — `retentionCascade`'s two hooks move unchanged into `transactionHooks.retention`.
|
|
834
|
+
- **Beyond the design (one export).** `assertCoreSchemaReady(face, dialect)` is the check the D-5 condition asked for: it reads only the package's version table, refuses when it is missing (or when a migration this version registers has not run), naming the call order — the backend's `ensureSchema()` first, the deployment's own ensure after it — and refuses when the question cannot be asked; it writes nothing. @server: the first statement of your own ensure, so a deployment table that references a core table is never created before it.
|
|
835
|
+
- **Consumers.** @server: the re-homing car reads this face (the driver once, the hooks table in place of `retentionCascade`, the tags renamed into the package's namespace as the stores move); your own ensure lock keeps its keys — the package's are different (`SQL_ENSURE_LOCK`). @cli @client-core @test: no reader.
|
|
836
|
+
- **Pins.** `test/backlog3147-stores-sql-face.test.ts` (the facts and the sink's tag types; the tag set; the option and hook-table types; the ensure lock against the server's keys; the migration registry's read; the order check on both dialects — refused before core's ensure, passing after — its probe answers, its failure as a refusal, its missing-migration arm; the blob index's five compare-and-set moves); `test/backlog1468-n1-core-stores-sql.test.ts` re-pinned (the face, the option reads with the driver last, the four retired keys, the driver's sink option); `test/backlog1468-n1-version-lane.test.ts`; the package's export snapshot (14 → 29) and smoke table.
|
|
837
|
+
- **Known limits.** Both factories refuse (the stores and the driver arrive with the stage-three move, #3118): the backend's "carries no SQL stores" refusal is reached only once a driver can be made. No version creates the version table yet, so `assertCoreSchemaReady` refuses on every database until the backend's `ensureSchema()` exists.
|
|
838
|
+
|
|
839
|
+
### Four writes a SQL deployment made on core's seats outside the contract each get one reading: the File journal store's per-run delete is retired, the mailbox's recipient lifecycle is one optional pair, offloaded tool results have one age bound every backend reads, and the file history's blob exchange is one optional member group that replaces the `syncBlobFaces` marker (#3148, design 3114 S2, C-R1015 W-1–W-4; hard-breaking: ① `FileWorkflowJournalStore.deleteByRun` removed, ② the tool-result kit's report type widens, three sentences each below; closed sets: none; exports: +2 root values `mailboxRecipientLifecycleOf` / `fileHistoryBlobExchangeOf`, +2 root types `MailboxRecipientTombstone` / `FileHistoryBlobExchange`; members: −1 `FileWorkflowJournalStore.deleteByRun`, +2 `MailboxStore.retireRecipient?` / `listRetiredRecipients?`, +1 `ToolResultStore.reap?`, +1 `FileToolResultStore.reap`, +1 `FileHistoryStore.blobExchange?`; kits: `MailboxTombstonedRecipientContractHooks.tombstone` optional and +1 optional `onOptionalMember`, `fileHistoryStoreContract` +1 optional parameter `onOptionalMember`, `toolResultStoreContract`'s report +1 member word `reap`; retirement table +1 row `RL-3148-sync-blob-faces`) (@server)
|
|
840
|
+
|
|
841
|
+
- **Before.** `FileWorkflowJournalStore` carried a public `deleteByRun(runId)` the `WorkflowJournalStore` contract never had and nothing in core or in the server called. A deployment that retired a mailbox recipient wrote the tombstone `append` refuses by through its own face, outside the `MailboxStore` contract. The age bound on offloaded tool results was a deployment probe (`reapOlderThan?`) on its own SQL store, and the File store had none. Whether a file history store could exchange blobs was a deployment marker (`syncBlobFaces: true`) plus two functions on the store.
|
|
842
|
+
- **Now.** W-1: the File journal store writes and reads ledgers only. W-2: `MailboxStore.retireRecipient?(scope, handle, at, label?)` writes the tombstone `append` already refuses by — it marks only (parked messages, their seqs and a live lease are untouched), a repeat updates its time and label, `drop` removes it with the box, `false` = no tombstone was written — and `listRetiredRecipients?(scope, handlePrefix)` lists them; the two are one capability, read through `mailboxRecipientLifecycleOf(store)`, which answers `undefined` for neither, both bound for both, and refuses half (`config.invalid_argument`, naming the missing member). The tombstone kit retires through the pair when the store carries it and then refuses a `tombstone` hook (two ways to write one state); it reports the pair `verified` or `absent` through `onOptionalMember`, and builds no store before its cases are registered. W-3: `ToolResultStore.reap?(now, { maxAgeMs? })` is the one age bound: no bound removes nothing (the default keeps every entry), a bound that cannot be evaluated — or a `now` that is not a finite number — is refused before anything is removed (`config.retention_policy_invalid`), age alone decides (ownership is not consulted), and it answers how many entries it removed. `FileToolResultStore.reap` implements it over its content files' modification times, in both namespaces and only over names the store writes (an `operator notes.txt` in its directory is not an entry), removing the owner record with its content; the bound is read once. W-4: `FileHistoryStore.blobExchange?` = `{ put(hash, bytes), get(hash), has(hashes) }`, all three or none, read through `fileHistoryBlobExchangeOf(store)`; `put` checks the content address itself and refuses bytes that do not hash to it (`adopt_failed`, `permanence: "terminal"`), storing nothing; `has` answers from the store's index; a puller hands `get` to `importHistory` as its source. A store that still carries the `syncBlobFaces` marker is refused by the judge, by name (retirement row `RL-3148-sync-blob-faces`, retire by 7.63.0). No bundled store carries the pair or the group; the bundled stores report them absent.
|
|
843
|
+
- **Hard-breaking ① — `FileWorkflowJournalStore.deleteByRun` removed.** *What changed:* the File journal store's public per-run delete is gone; the `WorkflowJournalStore` contract is unchanged (it never had the member). *Who is affected:* a host that called it on the File store directly — there is no production caller in core or in the server; the server's one call is a test (`test/file-workflow-journal-store.test.ts`, the case "deleteByRun unlinks the ledger"), which no longer compiles. *What to do:* drop the call; ledgers are removed by the backend's age sweep, `SqlStorageBackend.sweep({ nowMs })`'s `workflow-journal-expired` leg.
|
|
844
|
+
- **Hard-breaking ② (types only) — the tool-result kit's report.** *What changed:* `toolResultStoreContract`'s `onOptionalMember` report names one more member, `"reap"`. *Who is affected:* a caller whose callback's parameter is typed with the earlier two words only (`"deleteBySession" | "listBySession"`) — it no longer type-checks; a callback typed from the kit's own signature, or untyped, is unaffected, and no tree that consumes core types one. *What to do:* type the callback's parameter from the kit (`Parameters<NonNullable<Parameters<typeof toolResultStoreContract>[2]>>[0]`) or add `"reap"` to the union.
|
|
845
|
+
- **Beyond the design (four exports).** The two judges and the two types they answer with: `mailboxRecipientLifecycleOf` / `MailboxRecipientTombstone`, `fileHistoryBlobExchangeOf` / `FileHistoryBlobExchange` — one judge per group, so a store with half a group is refused the same way wherever it is read.
|
|
846
|
+
- **Consumers.** @server: W-1 — drop the one test case above; W-2 — your recipient-lifecycle face becomes the store's `retireRecipient` / `listRetiredRecipients`, read through `mailboxRecipientLifecycleOf`, and the session delete's tombstone is a `retireRecipient` call; W-3 — the tool-result TTL reads `reap(now, { maxAgeMs: toolResultTtlSec * 1000 })` in place of the `reapOlderThan?` probe (your SQL store implements `reap`; the bound and its default stay yours); W-4 — your SQL file history store's `putBlob` / `getBlob` / `hasBlobs` become its `blobExchange` group and the `syncBlobFaces` marker goes (the judge refuses a store that still carries it, so the marker and the judge cannot meet in one tree), and the route's sha256 check moves into `put`. These move with the stage-three reader car (#3118).
|
|
847
|
+
- **Pins.** `test/backlog3148-write-faces.test.ts` (W-1 at the type and at run time; the pair's judge — bundled stores absent, half / garbage / throwing members refused, bound and frozen; the tombstone kit on a reference store carrying the pair, its group case refusing pair + hook, no writer, half; five broken twins each caught by its axis case; the tool-result kit on the File store — `reap` verified — and the in-memory store — absent; four broken reap twins; File's age by content mtime in both namespaces, foreign names left alone, its orphan owner records, its coded refusals, the bound read once; the tombstone kit building no store at collection and reporting the pair verified / absent; the blob exchange judge — the marker refused alone and beside a group, non-object / empty / half / garbage groups refused; the kit's case verified on a reference group and failing on four broken ones and a half group); `test/file-workflow-journal-store.test.ts` and `test/defectscan-store-class-fix-matrix.test.ts` 3.1 re-pinned to the retired method.
|
|
848
|
+
- **Known limits.** The File backend has no journal age sweep (it had no caller for the per-run delete either); its ledgers stay until the deployment removes them. Whether a store carries a group is read through the prototype chain like any member read (a class method is on the prototype).
|
|
849
|
+
|
|
850
|
+
### A memory sync cursor is bound to which state of the center its baseline was taken against, not only to the center's address: a center rebuilt or restored behind the same address refuses the sync before either side writes (#3068, #3019 S1; ruled C-R1001 K1–K7; data loss of the #2968 form; divergence candidate D-3019-a — Claude Code 2.1.309 syncs with no center incarnation (a worker store's in-memory baseline per `memory_store_id`, `cli309.js:286617`; a team store's manifest bound to its `partitionId` address, `cli309.js:258732`, `cli309.js:260295`), open to veto; hard-breaking: ① `MemorySyncCursor.peerIncarnation`, ② the answer's `cursor.incarnation` and the refusal answer, ③ the sync route's version, three sentences each below, open to veto; closed sets: the cursor refusal's `detail.axis` +1 `incarnation`, its `detail` +1 member `want` on all four axes; exports: none; members: +1 `MemorySyncCursor.peerIncarnation`, +1 `MemorySyncRequestBody.peerIncarnation?`, +1 `MemorySyncResponseBody.cursor.incarnation`) (@server @client-core @test)
|
|
851
|
+
|
|
852
|
+
- **Before.** A cursor bound three names — the scope, the peer's address, the local store's path — and none of them says which state of the center answers. A center whose database was wiped and rebuilt at the same address, or restored from an older backup, read as the same peer: the next sync sent the old baseline, the center read each baselined id it lacks as deleted centrally and unchanged on the device (`serverDeletes`) and each older copy as a central change (`serverEntries`), and the client landed both — the device's entries deleted or rolled back, the call reporting `ok`. Reproduced against an in-process twin of the server's sync (P1 / P2 below).
|
|
853
|
+
- **Now.** One rule: a cursor binds each side by (address, incarnation); the address is judged by the sender before it sends, the incarnation by the holder of the state before it writes. The center answers every sync with the incarnation of the state that answered (`cursor.incarnation` — one value per scope partition, minted when the partition is born and stored with its entries); the returned cursor keeps it as `peerIncarnation`, and the next request carries it back as `peerIncarnation`. The center compares the claim with its own before any write; a claim that is not its own, or a non-empty baseline with no claim, is answered `{ refused: "baseline_incarnation", incarnation }` — a 2xx answer, so the transport contract (a non-2xx answer throws) is unchanged and the refusal is not read as a transport failure — and nothing is written. The engine raises it before any local write as `config.memory_sync_cursor_mismatch` with `detail: { axis: "incarnation", found: "other" | "absent", want: <the center's incarnation> }` and two ways out, both the host's: (1) re-bind — run against the state the baseline was taken against, or, only when the cursor carries no incarnation (it was written before cursors carried one) and this center holds that same state, set `peerIncarnation` to `want`; a cursor that carries another incarnation is never re-bound to this one; (2) drop the cursor, in the peer row's words. The answer is read against the rule the center states (`servesClaim`): a result under another incarnation than the claim, a result to a request with a non-empty baseline and no claim, a refusal of a request the rule serves, or a malformed refusal is a protocol error with zero local writes; a cursor's `peerIncarnation` that is not a non-empty, credential-free string is refused before any read or request. Every cursor refusal's `detail` carries `want`, this call's value on its axis (the scope, the transport's peer, the store's identity, the center's incarnation), shown as the refusal sentence shows it: a value that holds a credential (`carriesCredential` — a URL with userinfo, or anything the same-principal egress pass would redact) is the credentials mark alone, never a cleaned copy; no name is refused for it, so an ordinary name the wide egress matcher reads as credential-shaped (a dash-joined `sk-` slug) still syncs and only its `want` shows the mark. A refused call wrote nothing on either side, and the report's `refused` says so for that call alone: a continued layer whose last call is refused still carries what its earlier calls landed. The sync posts to `/v2/memory/sync/:scope`.
|
|
854
|
+
- **Hard-breaking ①, open to veto.** *What changed*: `MemorySyncCursor.peerIncarnation` is a required member of every cursor the engine returns, and a request carries it whenever the cursor does. *Who is hurt*: @server — the local executor's cursor reader (`src/memory-sync-client.ts` `cursorOf`, which picks members by name) drops it, so every sync after the first would be refused `absent`; it must carry the member verbatim, the whole-cursor shape check (S-2540 §2.7) must hand a cursor without it to the engine (the engine refuses it; it is not a bad file), and the arm that drops the cursor on `config.memory_sync_cursor_mismatch` and re-runs must go, or every refusal becomes a silent re-convergence; @client-core — CC-1052's per-axis `why` map gains the `incarnation` row; @test — center twins answer with an incarnation. *Compensation*: a cursor written by 7.60.0 or earlier carries no incarnation; with a baseline it is refused `absent` with the center's incarnation as `want` — an operator who confirms the center is the one the cursors were taken against sets `peerIncarnation` to `want` (one confirmation step with the legacy-cursor one, C-R990 D-4), otherwise drops them.
|
|
855
|
+
- **Hard-breaking ②, open to veto.** *What changed*: an answer's `cursor.incarnation` is required (absent ⇒ protocol error) and equals the request's claim when one was made; a center that refuses answers `{ refused: "baseline_incarnation", incarnation }`. *Who is hurt*: @server — the central sync (`src/memory-sync.ts` `performMemorySync`) mints, stores and returns one incarnation per scope partition, under two contract sentences: (i) no other partition or state carries the same value, (ii) the comparison, the reconcile read and every write of the sync sit in one fence (a reset between the comparison and the writes would still delete by the old baseline); a restore from backup needs an incarnation rotation step; @test — the criterion. *Compensation*: until the center answers with an incarnation every sync against it fails before anything is written.
|
|
856
|
+
- **Hard-breaking ③, open to veto.** *What changed*: the sync route is `/v2/memory/sync/:scope` (it was `/v1/…`); the engine mints the path in one place (`memorySyncPath`), and the path literal is the server's to name — a different name changes that one function. *Who is hurt*: @server — the central route serves the new path only: an old center keeps answering `/v1` and so answers a new client 404, a new center answers an old client 404; @test. *Compensation*: both pairings fail before anything is written; sync pauses until both sides have the new version.
|
|
857
|
+
- **Not changed / known limits.** The holder of the state is the judge: the engine never mints, derives or compares an incarnation. A center restored from a backup without rotating its incarnation, or a replica of the same database, reads as the same state, and the device's newer entries are deleted or rolled back as before (KL-3019-a). Way out (2) is safe only once the center adds an entry it holds no baseline for only if it is absent (a server ticket); until then two devices dropping their cursors at once can have one silently overwrite the other's version of the same entry (KL-3019-a). The address judge's trust in `transport.peer` narrows: a sync that carries a cursor and reaches another center is refused there on its incarnation (KL-2968-a). The credential test is the one the peer's refusal already used (`carriesCredential`); it also finds a URL's userinfo inside a value under another scheme (`proj:https://user@host/…`), see the #3184 entry.
|
|
858
|
+
- **Pins.** `test/backlog3068-center-incarnation.test.ts` (a real File store; an in-process twin whose partitions are born with their own incarnation and judge the claim before any write): P1 an empty center at the same address — refused `{ incarnation, other, want }`, zero writes on both sides, the entry stays; way out (2) pushes and deletes nothing and binds the new incarnation; the same center runs and keeps the incarnation; P2 an older copy at the same address — refused, the newer local version stays; a cursor without an incarnation is refused `absent` with `want`, and way out (1) then runs; an empty-baseline cursor without one runs as a first sync; the incarnation row's two outs verbatim for absent and other; a result under another incarnation, a result to a claimless request over a baseline, a result with no or a credential-bearing incarnation, a refusal of a served request, an unknown or incarnation-less refusal — protocol errors, zero local writes; a malformed claim on the cursor refused before any read or request; a store root or a scope holding a recognized secret refused on its axis with `want` the credentials mark, the sentence, the outs and the serialized report free of it, and a dash-joined `sk-` slug as a store root and a scope syncing; F2 a request delivered to another scope's route refused there, zero writes; F4 the versioned path, an old-route center answering 404 with zero writes; F5 a continued layer refused on its last call keeps its earlier `applied`; the closed set — `{ axis, found, want }` on all four axes. The center twins in `test/backlog2968-sync-peer-binding.test.ts`, `test/backlog2969-sync-round-report.test.ts` and `test/backlog3047-sync-report-applied-every-outcome.test.ts` answer with an incarnation and judge the claim; `test/memory-sync-client.test.ts` (the `/v2` path, the request's claim), `test/backlog2836-sync-cursor-store-binding.test.ts`, `test/backlog2818-typed-scope-sync-store.test.ts`, `test/backlog2956-memory-sync-store-root-export.test.ts`, `test/backlog2957-sync-store-move-refused.test.ts` and `test/design336-origin-carriage.test.ts` answer under one incarnation; `detail` assertions carry `want`.
|
|
859
|
+
|
|
860
|
+
### A deployment's memory is answered across its stores: one erasure requestId per deployment, a session's memory status folded over every store the engine root holds, and the plane classification read from the root (#3172, #3175, #3173; behavior change only for a host that adopts the new face — every existing face is unchanged; hard-breaking: none; closed sets: none; exports: +3 root values `createMemoryDeployment`, `classifyScopePlanes`, `scopePlanesOf`, +5 root types `MemoryDeployment`, `MemoryDeploymentInput`, `MemoryDeploymentStore`, `DeploymentSessionMemoryStatus`, `ScopePlanes`; members: +1 `FileMemoryEngineBackend.erasureAnchorOf`; contracts: +2 `memory.deployment_status.fold`, `memory.erasure.request_per_deployment`) (@server @cli @client-core @test)
|
|
861
|
+
|
|
862
|
+
- **Before.** On a directory-pinned deployment the personal layers (`user:` / `userproj:` / `org:` under the v2 contract) live in a second File store on the personal mount. An erasure `requestId` was judged by the evidence chain of the one store a request landed on, so the same `requestId` first executed on the deployment's store and resent naming a personal layer ran there as a new erasure; no core reading held both stores. A session's memory status was one store's answer, and which stores a deployment has could only be inferred from the layers its configuration names — a personal store left by an earlier configuration was in neither reading. `classifyScopePlanes` / `scopePlanesOf` were not exported, so a host classified a key by calling `resolveMemoryScopeStore` over a stand-in backend.
|
|
863
|
+
- **Now.** `createMemoryDeployment({ backend, memoryEngineDir, scopeContract, onIncident?, memoryCaptureRecordStore? })` takes the deployment's backend and engine root as given to the Runner and the scope contract its sessions are minted under (the two keys are required and judged as `resolveMemoryScopeStore` judges them; a backend that does not own its control plane is refused `config.memory_scope_key`). It holds one engine per store:
|
|
864
|
+
- `stores()` — the project store (the deployment's backend), then, on a directory-pinned deployment, the personal store once its mount exists under the engine root. The set is the disk's: the configuration decides only where a session writes. Reading the set opens no store that is not there.
|
|
865
|
+
- `eraseMemoryEntries(input)` — the engine's erasure input and receipt, judged as one request in the whole deployment. A `{ scope }` selector reaches the store carrying that scope; with `expectedScopes`, the store carrying the granted scopes — a grant naming scopes kept in two stores is refused `config.memory_erasure_scope` before anything is read or deleted; `{ ids }` / `{ sessionId }` without a grant reach every store, each resolving its own share. Under the face's lock the stores are read once, and before any store executes every store is read for an anchor of the same `requestId`: one recorded under another authorization set refuses `config.memory_erasure_scope`; one with another selector, or in a store the request does not reach, refuses `memory.erasure_selector_mismatch` (the store's own code) — nothing deleted, nothing recorded. A store holding the request's own anchor replays it; different `requestId`s erase each in its own store. When a request reached two stores, their receipts merge into one: counters add, lists concatenate, a `notFound` row is dropped when the other store erased that id, and `status` is `complete` only when both stores' receipts are `complete` (a store that could not establish its share — damaged custody, an unverified carrier — keeps the merged receipt `partial`, and `custodyState` is the worse of the two). Erasures through the face run one at a time (a transaction lock in `.memory-erasure-judge` under the engine root, kept alive by a heartbeat while the stores execute), and the store set, the reach and the judgment are read under that lock. A lock found lost before a store executes or after the last one throws `ControlPlaneCorruptError` (facet `lock-ownership`) instead of returning a receipt. A store failing after an earlier store executed throws; a replay of the same `requestId` converges both.
|
|
866
|
+
- `sessionMemoryStatus(sessionId)` — the five session keys folded over every store: counts add, and any store's count absent ⇒ absent; `lastCaptureAt` is the latest, absent when a count is absent or no store has a capture; `captureOptedOut` is `true` (with `optOutSource: "record"`) when any store holds a record and `false` only when every store answers `false`, else absent with `optOutSource: "fault"`. One store ⇒ the five keys are that store's answer unchanged. New member `planes`, always present: one row `{ plane, status }` per store in store order, the store's own answer — the fold's diagnostic (the row whose key is absent is the store that faulted) and the only place `writeHome` is answered (a directory in that store; it is not folded). A store that cannot be opened answers `{ optOutSource: "fault" }`. The face never throws.
|
|
867
|
+
- `FileMemoryEngineBackend.erasureAnchorOf(requestId)` — the store's local anchor of a `requestId` (`{ selectHash, expectedScopes? }`, or `undefined`), read in the transaction lock after the journal recovery an erasure starts with; the store's own replay judgment reads the same function.
|
|
868
|
+
- `classifyScopePlanes`, `scopePlanesOf`, type `ScopePlanes` — the pure plane classification the session assembly reads, now on the root; unchanged.
|
|
869
|
+
- **Consumers.** @server: (1) route both erasure faces (operator `POST /v1/memory/erase`, session self-erasure) through one deployment object's `eraseMemoryEntries`, and delete the `409 memory.erasure_store_unjudged` transition arm (`MemoryErasureStoreUnjudged` and its two throw sites in `src/memory-operator-faces.ts`, its reply arm in `src/http/memory-compliance-failure-reply.ts`, the code's rows in `self-minted-wire.ts` / the error catalog / §9 and appendix A): the `{ scope }`, `{ ids }` + `expectedScopes` and `{ sessionId }` erasures it refused now execute in the store that holds them, and a `requestId` reused across the two stores reads `409 memory.erasure_selector_mismatch` (the 🚧 cells in `test/memory-layer-seat-http.test.ts` and `test/memory-project-scope.test.ts` flip as they state); an erasure sent to one store's own engine is judged by that store alone; (2) delete `foldPlaneStatuses` and project the session memory status from the deployment's answer — its folded keys are your five wire keys; `planes` is +1 member (each row carries `writeHome`) to project or list as dropped in `core-keyset-guard.ts`; (3) delete the configuration-pushed store list for these two verbs (`memoryStoresOfDeployment` / `deploymentStoreGroups` over `namedLayers`): `stores()` is the disk's set, which closes the MIGRATION known limit of a personal store left behind after `MEMORY_SCOPE` stops naming it; (4) read `classifyScopePlanes` / `scopePlanesOf` and retire `PLANE_PROBE` in `memory-scope-stores.ts`; (5) pass `scopeContract: "v2"` — your `memoryScopeContractOf` reads a typed key as v2, and an untyped key classifies to the project plane under v2 as under no contract. @cli @client-core: nothing reaches you directly; the server's erasure and status answers change as above. @test: the server's flipped cells are the black-box surface once it delivers.
|
|
870
|
+
- **Pins.** `test/backlog3172-3175-memory-deployment-judge.test.ts` — the same `requestId` across the two stores, both orders ⇒ 409 and the other store untouched; a `requestId` first executed on one store and resent with a selector reaching both ⇒ 409 before either executes; a personal store that appears while an erasure waits for the lock is erased with it; a same-store replay ⇒ idempotent (`erasedPreviously`, `complete`); different ids ⇒ each store erases; a grant across stores ⇒ refused with no delete and no chain row; a grant on one store routes there; `{ ids }` without a grant ⇒ one receipt, no stale `notFound`; `{ sessionId }` ⇒ both stores' contributions erased; the lock lost while a store executes ⇒ `lock-ownership`, no receipt; a merge where one store's share is `partial` (damaged custody, `historyUnknown`) stays `partial`; the fold law key by key (sum, latest, any record, a faulted ledger, a faulted record read) and the one-store identity; a real Runner session written under `user:alice` and a restarted deployment that names no personal layer still holding, reading and erasing it; the input refusals; the two classification functions from the root.
|
|
871
|
+
|
|
872
|
+
### A note an extension adds while a turn runs is in the conversation a durably parked leg resumes: the checkpoint carries it (`heldRows`), the resumed leg stores it once, and once the park is taken `$.session.append` refuses (#3217 = #3156 S1, ruled C-R1047 K1–K9; #3220: `docs/CLOSED-SETS.md` states the requirement words at the count and with the members they now have; the refusal after the park takes Claude Code 2.1.309's form for a call with no running loop (`g8t` / `Nro`, cli309.js:279001: `$.session.append: refused: <reason>`); divergence D-3156-a, open to veto; hard-breaking: three, HB-1–HB-3 below, HB-1 open to veto; closed sets: +1 `RequirementWord` `held_rows`; exports: none; members: +1 optional `CheckpointRow.heldRows` (wire +1 optional key)) (@server @client-core @cli @test)
|
|
873
|
+
|
|
874
|
+
- **Before** (the #3008 section's own reading, never released). A note `$.session.append` admitted while a turn ran waited in the harness's queue for the run's next serialization point. A leg that parked durably before that point — an approval park, a resource or platform park, a plan review — did not take it with it: an approval or review park's abort held the queue until the harness was dropped, a boundary park's clean end stored it past the leaf the checkpoint captured (a branch the resume never reads), and the leg's report sink said one line per such note (`… is not in the parked conversation …`, KL-3008-d). A note taken after the park answered `{ message }` and went the same way. After a live abort the held writes were drained even when the reconcile left the interrupted batch open.
|
|
875
|
+
- **Now — the park carries them.** The commit every durable park passes takes the rows the leg's port holds (queue order) onto the row it writes — `heldRows`, beside `leafId`: the leaf is where the conversation stopped, these are what it owes after it — and settles on the commit's outcome: the row landed ⇒ they leave the queue; it did not land ⇒ nothing changes and the run goes on; the store cannot say ⇒ they stay for this leg's own branch. The resumed leg's harness starts its queue with them and writes each once, at its transcript's first legal point: after the parked call's result and every sibling's (an unanswered sibling is settled first), before the continuation — and not through the `session.append` station again (the parked leg admitted it; an extension's rewrite stands, `rewrittenBy` with it). A resume that parks again before that point carries them on as they were; one that wrote them carries none; a reopened row resumed again reads them once, from its own leaf. A row with nothing held carries neither the member nor the word.
|
|
876
|
+
- **Now — the port at the park.** While the park is being written a `$.session.append` call waits for its outcome. Once the park is taken — or whether it was cannot be known — the call throws `$.session.append: refused: the leg parked durably — the conversation it resumes is its checkpoint's` (nothing is queued, stored or reported). The port writes at once only when the harness is idle and holds nothing, so a note taken while carried rows wait lands after them. After a live abort the held writes are drained only when the reconcile closed the interrupted batch; otherwise each is said on the report sink (`phase: "interrupt-reconcile"`, `held session write not stored: …`) and none is written.
|
|
877
|
+
- **Hard-breaking.** HB-1 (wire, additive; closed set +1; open to veto). *Before:* a checkpoint row carried no conversation rows past its leaf; 36 requirement words. *Now:* a row taken while the port held rows carries optional `heldRows` (conversation rows, in order) and the requirement word `held_rows`; a row with none is unchanged — words and digest are derived from what is present, so a row parked before this version reads as before. *What to do:* a worker on an engine before this version refuses a row that names `held_rows` with the requirement-word refusal it already has (`checkpoint.unsupported_version`, reason `version_newer`; the row stays pending, unclaimed) — roll workers forward before traffic, and let such parks settle before a rollback. HB-2 (a narrowing of the #3008 reading in this same version, so no released behavior moves). *What changed:* the report line `… is not in the parked conversation …` and KL-3008-d are retired; a note admitted before a durable park is in the resumed conversation once; a call after the park throws `refused` instead of answering `{ message }`. *Who is affected:* an extension that notes from `turn.complete` / `session.end` on a leg that may park — its call after the park now throws. *What to do:* catch the refusal, or note before the park. HB-3 (disclosure, the report sink). *What changed:* after a live abort whose reconcile left the interrupted batch open, each held write is said on `onError` (`phase: "interrupt-reconcile"`, `held session write not stored: …`) and none is written into the open batch. *Who is affected:* a host that shows or logs `onError` lines for a session, and an extension whose note was among the held writes — that note is not stored. *What to do:* surface those lines; an extension that needs the note in the conversation adds it again from a later turn's handler.
|
|
878
|
+
- **Who needs it.** An extension that notes something while the calls it watches run (a `PostToolUse` audit line, a turn summary, a gate's own reason) on a deployment that parks approvals or resource slices durably — its note was in the resumed conversation zero times — and the person who reads that conversation.
|
|
879
|
+
- **Divergence, open to veto.** D-3156-a: a note added while a turn runs is stored at the run's next serialization point and rides a durable park's checkpoint; Claude Code keeps it at once and has no durable park (a strict provider sequence and an open batch forbid a row between a call and its result here).
|
|
880
|
+
- **Consumers.** @server: the member rides the row's JSON blob — the SQL store reads the whole blob back, column mapping zero change; run the store kit's new "held rows" cell and the park self-check (`probeParkRoundTrip` reads `heldRows` back: a store that serializes a member whitelist now fails it, `row_not_faithful`); roll as HB-1 says. @client-core: an extension error forwarded from `$.session.append` may be the refusal sentence; zero type change [pending check]. @cli: the refusal's form for mods authors; no wire word changes. @test: the pins below are the black-box criteria — an approval park's note resumed once and in place, a resource park's `turn.complete` note, the refusal after the park, no replay across two resumes.
|
|
881
|
+
- **Known limits.** KL-3156-a (a park that is abandoned — expired, cancelled, reaped — loses its held notes with it), KL-3156-b (a host reading the transcript during the park does not see them: they are on the checkpoint), KL-3156-c (a store that commits a session write and then throws can make a queued note land twice — every queued write shares this today; #3221).
|
|
882
|
+
- **Pins.** `test/backlog3217-held-rows.test.ts` (real Runner lanes over file stores, a fresh Runner and fresh store instances per leg: P1 / P1b / P1c / P1d approval parks — the note once, after the batch and before the continuation, the tool-turn law held, a sibling that parks again carries it; P2 a resource park; P3 a plan-review park; P4 a resume that wrote it parks again with none; P5 a resume that parks again at its window entrance carries it; P6 a reopened row; P7 the refusal after the park; P8 / P8b a call made while the park is written — landed, not landed, unknown; P9 no second station; P10 a live abort — drained after a closed batch, said after a failed reconcile; P11 the row's shape and words; P12b the park self-check; P13 the port's order; P14 the queue's producers); the store kit's "held rows" cell (`checkpoint-store-contract.ts`); `test/backlog3008-session-append.test.ts` P7c / P7d / P7e retired; `test/module-size-ratchet.test.ts` raises six modules by the member's and the gate's lines.
|
|
883
|
+
|
|
884
|
+
### A notice a leg raises about itself names the leg by one id — its own task id; `detail.taskId` is no longer the host's declaration on seven codes and the leg's id on two (#3213 = #3207 slice 1b; behavior change, open to veto)
|
|
885
|
+
|
|
886
|
+
- **Before.** `detail.taskId` had two readings. On seven codes it was the host's declaration — `TaskSpec.taskId`, present only when the host named a task id: `task.turn_interrupted` (a `priority: "now"` steer and a bare halt), `task.halt_unconsumed`, `task.interrupt_unconsumed`, `task.late_approval`, `steering.parked_input_blocked`, `approval.read_root_granted` and `approval.read_root_grant_rejected` (fourteen call sites). On `task.user_steer_undrained` and `task.user_followup_undrained` it was the leg's own task id (`Prepared.taskId`, always present). A consumer that grouped a leg's notices by `detail.taskId` found the key on two codes of nine for a leg whose host named nothing (an undeclared root leg, a sub-agent the engine itself started).
|
|
887
|
+
- **Now.** One reading: on a notice a leg raises about itself, `detail.taskId` is the leg's own task id, the one value its prepare minted — a background sub-agent's registry task id (`a…`), else the host's declared `TaskSpec.taskId`, else the leg's session id — the same value its frames, its `TaskResult.taskId` and its hook identity carry. The fourteen sites hand the notice that value through one helper (`legNoticeTaskId`, beside `legTaskIdOf`); none reads the declaration. The three entry points that took it as an optional member (`discloseUnconsumedHalt`, `lateAskSettlementObserver`, `settleReadRootGrant`) now take it as a required string. `EngineNotice.detail` and `docs/INTEGRATION-CORE.md` state the reading once; the per-code rows list `taskId` as present.
|
|
888
|
+
- **Behavior change, open to veto — `detail.taskId` on the seven codes.** *What changed:* on the notices a leg raises about itself, `detail.taskId` is now always present and is the leg's own task id: the id the host declared on `TaskSpec.taskId` when it did (unchanged), a background sub-agent's registry task id, else the leg's session id — previously the key was present only when the host declared one. *Who is affected:* a consumer that read the key's presence as "the host named a task id" sees it on every leg now; one that compares the value with the id it declared still matches on every declared leg except one that a delegation row lane overrides (a background sub-agent resumed by its host reports its registry task id, as its `TaskResult.taskId` already does). The copy of a child's `task.user_*_undrained` notice that is announced on its parent's session is unchanged: it carries the parent leg's task id (absent when the spawner carried none), the parent's `sessionId` and the child's `childSessionId`. *What to do:* route a notice by `detail.sessionId` (unchanged); join an own-leg notice to its leg's frames and registry row by `detail.taskId`; test for "the host declared one" by comparing with what you declared, not by the key's presence.
|
|
889
|
+
- **Also.** `StreamHaltVerbsInput` no longer takes `spec` (its only read was this key); `PrepareAskLaneInput.spec` is `hostTaskId` (the leg's task id); `UnconsumedHaltDisclosureInput.taskId` is `string`. No wire key is added, removed or renamed; no exported name changes.
|
|
890
|
+
- **Consumers.** @cli: no behavior change — the interrupt-marker latch compares `detail.taskId` of `task.halt_unconsumed` / `task.turn_interrupted` with the task id the shell declared for the stop it sent: a declared shell leg reads the same value as before, and a background row-lane leg's row id never equals it, so the latch stands down as it does today; only the latch's header comment (the key as "`spec.taskId` echoed") needs to say "the leg's task id, the host's declaration when it declared one". @server: your notice routing reads `detail.sessionId` (unchanged); an audience table that assumes `detail.taskId` appears only for a declaring host needs the one-line change above. @client-core, @test: no code read; the black-box cells for these seven codes can assert `detail.taskId` present.
|
|
891
|
+
- **Pins.** `test/backlog3213-notice-leg-task-id.test.ts` (a real Runner, one cell per call site: Q5 the fourteen sites on an undeclared leg read the session id; Q1 the same sites on a declaring leg read the declaration; Q2 a background sub-agent's leg reads its row id; Q4 the two undrained-input codes keep their readings, the parent's copy included; Q6 a row-lane park resumed by a host that declares a task id reads the row id; Q7 no notice site reads `spec.taskId`, and the three entry points refuse a call without the id at compile time); the family batch `grep -l 'detail.taskId\|halt-attribution\|engine-notice' test`.
|
|
892
|
+
|
|
893
|
+
### An ask names the conversation it was raised in as `sourceSessionId` — the value `sourceTaskId` held under a task id's name — and a delegated agent's ask names the agent, `agentId` (#3212 = #3195 S1a, ruled C-R1043 K1 / K2 / K7; aligned with Claude Code 2.1.309, whose approval request names the asking agent by `agent_id` and carries no session id (`can_use_tool`, cli309.js:288208); hard-breaking: three, HB-1–HB-3 below, open to veto; closed sets: +1 `RequirementWord` `source_session`; exports: none; members: four types renamed — `AskRequest`, `AskQuestionRequest`, `Checkpoint` and `CheckpointSummary` `sourceTaskId` → `sourceSessionId` (the `Checkpoint` member also reads through `CheckpointRow` and `CheckpointFields`, and `createAskUserQuestionTool`'s `source` parameter takes the new key: the wire manifest counts seven breaking readings of the one fact, one root) — and +1 optional `agentId` each on `AskRequest`, `AskQuestionRequest` and `CheckpointSummary`) (@server @sdk @client-core @cli @test)
|
|
894
|
+
|
|
895
|
+
- **Before.** `AskRequest.sourceTaskId`, `AskQuestionRequest.sourceTaskId`, `Checkpoint.sourceTaskId` and `CheckpointSummary.sourceTaskId` held the issuing leg's session id under a task id's name, while `TaskEvent.sourceTaskId` and `WorkflowRun.sourceTaskId` hold a leg's task id — one name, two answers. An ask carried no id for the agent that raised it, so a host tied an approval to a background agent's row by joining the session id to the row's `transcriptId`. The ask source was composed inside the policy chain, and the question tool, the question routing and both park stamps each took the leg's session id again.
|
|
896
|
+
- **Now — one mint.** A leg's ask source (`sourceSessionId`, `agentId`, `fromSubagent`, `sourceAgentName`, `isDelegatedChild`, `principal`) is minted once at prepare, beside the leg's task id (`mintAskSourceIdentity`), and every ask, question and park of the leg reads that one value. `agentId` is `agentIdOf` — the predicate the extension events and the hook identity already answer by: the leg's task id when the leg is a delegated child (a background sub-agent's registry task id `a…`; a foreground one's session id), absent on a host's ask. Its presence is the delegation fact, not `fromSubagent`: an agent of a directly started workflow carries `agentId` and no `fromSubagent`. A parked row's summary derives `agentId` from the row by the same predicate; no member is stored for it.
|
|
897
|
+
- **Hard-breaking, open to veto.** HB-1 (the session-domain member renamed): `AskRequest.sourceTaskId`, `AskQuestionRequest.sourceTaskId`, `Checkpoint.sourceTaskId` and `CheckpointSummary.sourceTaskId` are renamed `sourceSessionId` — the value is unchanged (the issuing leg's session id) and the old key is gone, with no alias — and `createAskUserQuestionTool`'s `source` parameter takes `{ principal?, sourceSessionId?, agentId? }` (a typed caller that passes `sourceTaskId` no longer compiles). An approver, question face, checkpoint store or inbox that read the old key is affected (a compile error on typed consumers, `undefined` on untyped reads), and a store that persists a checkpoint by field list must map the new key (the park self-check and the cross-backend contract fail if it drops it). Read `sourceSessionId` as the issuing leg's conversation address, never as a task id; identify a delegated agent by `agentId` (HB-2). HB-2 (the asking agent's id, additive): An ask or question raised by a delegated sub-agent now also carries `agentId` — the leg's task id (a background sub-agent's registry task id `a…`, the string `TaskStop`, `SendMessage` and `task_notification.task_id` use; a foreground sub-agent has no registry row, so its session id) — present exactly when the issuing leg is a delegated child, absent on a host ask. A consumer that associated an approval to its background row by joining `sourceSessionId` against the row's `transcriptId` may drop that join for `a*` rows; one that ignores the key is unchanged. `CheckpointSummary.agentId` carries the same value for a parked row, derived from the row (no new stored member). HB-3 (parked rows across the upgrade): `sourceTaskId` was a member the row digest reads, so an approval or plan-review checkpoint that carries a requirement digest (every such row minted by a release that stamps requirements) and was parked before this version reads as `requirements_damaged` on this version and cannot be resumed (rows without that member, and rows older than the requirement digest, are unaffected), and a worker older than this version refuses a row parked by this one as `version_newer` (requirement word `source_session`). Let parked approvals settle (answer them or let them expire) and drain older workers before upgrading; nothing in this version reads the old key as an alias. Measured: two approval rows the v7.60.0 engine parked (a delegated leg's and a host leg's) read `requirements_damaged` here ("the members a decision reads do not match the row's content digest") and their resume is refused `checkpoint.invalid_outcome` before the claim, the row left pending; a v7.60.0 `resource_limit` row and a v9 row read ok; a row this version parks is judged `lacking` (`source_session`) by the v7.60.0 engine.
|
|
898
|
+
- **Known limit, 7.61.0 transient (KL-3212-a, #3226).** A workflow agent whose script declares a `taskId` and that runs on no registry row asks with `agentId` = the declared id, while its parked row's summary says its session id (the row records no declared id). Background, foreground and host rows read the same on both faces.
|
|
899
|
+
- **Who needs it.** An approval inbox that attributes an ask to a background agent's row — one key equality (`agentId` = the row id) instead of a session-to-transcript join; any reader of the source member, which no longer reads as a task id.
|
|
900
|
+
- **Consumers.** @server: the approval identity tuple reads `sourceSessionId` (the conversation) and `agentId` (the row); the SQL checkpoint store maps the renamed field (the park self-check and the cross-backend contract fail on a store that drops it); the `runs.ts` wake row reads the renamed key; the wire frame keys follow the rename with no alias; the server's own `listByScope` projection gains `agentId` from `state.isDelegatedChild` / `state.rowTaskId` / `sessionId` (core's `summarizeCheckpoint` is the reference reading); the deployment sentence of HB-3 (settle parked approvals, drain older workers). @sdk: `TOOL_APPROVAL_FRAME_KEYS` follows the rename. @client-core (CC-1124): the badge and the row association read `agentId`; the `sourceTaskId` fallback goes. @cli (L-2225): the latch definition sentence reads `sourceSessionId`. @test: the criteria are P1–P12 below.
|
|
901
|
+
- **Pins.** `test/backlog3212-source-session-id.test.ts` (real Runner: P1 / P2 the Agent tool's background and foreground children; P3 a host leg, and the faces against the ones the v7.60.0 engine produced on the same fixtures; P4 the approval park and its resume; P5 rows the v7.60.0 engine parked — `test/fixtures/backlog3212-v7600-rows.json`; P6 the word the v7.60.0 reader lacks; P7 the question faces, mounted and routed; P8 the summary's `agentId`; P9 the plan_review stamp; P10 the park self-check; P11 the public fixtures; P12 a directly started workflow's agent), `test/fixtures-golden.test.ts`, `test/backlog3193-one-agent-one-id.test.ts` P12, `test/backlog1320-reader-requirements.test.ts` H (the maximal approval row carries the member), and the neighbours renamed in place (listed in the receipt).
|
|
902
|
+
|
|
903
|
+
### A host's in-process MCP server mounts through the host seat as itself — the seat hands one MCP transport per dial, the server answers its own handshake, instructions and resources; a request-level seat rides one adapter, `hostSeatOfRequests`; what a host says it could not carry is one class read in one place (#3214 = #2631 S1, ruled C-R1044; hard-breaking HB-1, open to veto; exports: +1 root function `hostSeatOfRequests`, +1 root interface `McpHostRequestSeat` — `McpHostSeat` keeps its name and changes shape, HB-1)
|
|
904
|
+
|
|
905
|
+
- **Before.** The host seat (`RunInternals.mcpHostSeats`, 7.60.0) was request-level: `McpHostSeat.request(method, params, signal)` for `tools/list` and `tools/call` only, with the engine answering the handshake itself — so a host's own MCP server (an SDK `Server` in the host's process) lost its name, version, instructions and resources on the way in, and a host had no way to hand the engine a message-level pipe. A seat's failure came back as an error response the adapter synthesized, read by the identity of a verdict object only the adapter minted.
|
|
906
|
+
- **Now.** A seat is a pipe source: `McpHostSeat = { open({ server, signal }) => Transport | Promise<Transport> }`, asked once per dial (the first, a re-dial, a delegated child's, a resumed leg's). The server behind the pipe answers the whole protocol: its `serverInfo` is the status row's, its instructions reach the system prompt through the same sanitizing lane as a stdio or http server's, its resources reach the global resource tools; tool names (`mcp__<row>__<tool>`), permission rules and the call `_meta` are what any server's are. A pipe is the dial's from its arrival — the engine connects it and closes it. The 7.60.0 request-level interface is `McpHostRequestSeat` (shape unchanged) and rides `hostSeatOfRequests(seat)`, the one adapter, with the 7.60.0 behavior (the handshake answered from the row's name, the two methods, cancellation through the request's signal, a late answer dropped).
|
|
907
|
+
- **Hard-breaking (HB-1, open to veto).** *What changed:* the root export `McpHostSeat` (7.60.0) changed from request-level `{ request(method, params, signal) }` to the pipe source `{ open({ server, signal }) => Transport | Promise<Transport> }`; the request-level interface is renamed `McpHostRequestSeat`, its shape unchanged. *Who is affected:* a host that puts a request-level seat in `RunInternals.mcpHostSeats` (server / cli / client-core `origin/main` hold none; server's consumption ledger records the family as skip; the test repository's 7.60.0 repro drivers are version-pinned; computer-use / desktop not scanned — please say if you hold one). *What to do:* `mcpHostSeats.set(name, hostSeatOfRequests(seat))` — the behavior is 7.60.0's (the same handshake answer, the same two methods, the same failure words and delivery verdicts).
|
|
908
|
+
- **Behavior — one deadline over a host row's whole mount.** The seat's `open`, the pipe's `start`, the handshake and the first listing run under one deadline — the row's `startupTimeoutMs`, else `MCP_TIMEOUT`, else the SDK's request default (60 s) — raced against the run's abort: a pipe that holds any of those steps fails the dial `timeout` / `delivered: "no"` at the bound (the SDK's own timer covers the requests only). The engine's close of a pipe it took — a failed mount, a teardown, a re-dial's replacement — is immediate: the connection reads closed at once and the host's own close runs on the host's time, never waited on, a rejection of it nobody's (so a host close that never settles cannot hold a task's end or a re-dial, and one that rejects cannot surface as an unhandled rejection); a pipe that arrives after the dial stopped waiting is taken and closed.
|
|
909
|
+
- **Behavior — what a seat hands is judged at its arrival.** A pipe is taken once: one handed again (to another dial, or by a seat that keeps one across dials) is refused `host_refused` / `no`, naming the dial that took it, and left alone; a value that is no transport (`start` / `send` / `close` functions) and a pipe that already holds a `sessionId` (the SDK would skip the handshake on it) are refused `host_refused` / `no` — both closed when they have a `close`. An `open` that throws `McpHostSeatFailure` fails the dial with the host's sentence (`host_refused`, or `unknown` with delivery `no`); one that throws anything else is `host_refused` in the engine's sentence, never the thrown text.
|
|
910
|
+
- **Behavior — one failure class, one reading.** `McpHostSeatFailure` — thrown by `open`, the rejection of the pipe's `send` of a request, the adapter's — is read by the failure classifier's one host row by its class and its two facts (`no` ⇒ `host_refused`, `unknown` ⇒ `unknown`); the synthesized-response channel and its verdict-identity table are retired. The adapter hands a seat's failure back as its request's `send` rejection (SDK 2.4.0 rejects the waiting request with it and clears its handlers — pinned on 1 000 failures for both forms). A request settles once, by what came first: the server's answer, its send's rejection, the engine's cancel, the pipe's close (a host that closes the pipe and then rejects reads as `connection_closed`; a send rejected after its request's answer arrived is nobody's, so an answered write never reads as "not sent, safe to send again"). A cancellation the pipe fails to send is no request's ending (the cancelled call already reads as cancelled or `timeout` / `unknown`): cancelling a call on an in-process server is best effort. `McpHostSeatFailure` bounds its `condition` when it is built.
|
|
911
|
+
- **Behavior — the elicitation refusal says what is true.** A host row's `elicitation: true` is still refused at every entrance (`config.invalid_argument`); the reason now reads "the server behind a host's pipe is the host's own code, so a question it has for the user goes through the host's own interface — the engine advertises no elicitation for it" (Claude Code 2.1.309 advertises an empty client capability record to its SDK servers, `qct` (cli309.js:287917)).
|
|
912
|
+
- **Stated.** The server behind a host's pipe is the host's own code: it is not confined by the engine's sandbox and its reach is not judged by the engine's host floor (that floor judges an http row's URL). Its instructions enter the system prompt through the same sanitizer as any server's. KL-1496 (no `notifications/tools/list_changed` consumption; `RefreshMcpTools` is the freshness lane) reaches the host pipe too. The no-run probe still takes no host seat (a host row there fails `invalid_config` / `no`).
|
|
913
|
+
- **Consumers.** @server: the consumption ledger gains two rows (`McpHostRequestSeat`, `hostSeatOfRequests`); a request-level device bridge (S-2426) is one line, `hostSeatOfRequests(seat)`; the K2 client-bridge half can hand a pipe per dial (`open`) directly. @client-core: CC-999 is no longer blocked on core — a CC `type: "sdk"` server maps to a `{ kind: "host" }` row whose seat opens one pipe per dial (wire: the row is `{ kind: "host" }` alone; the seat is `open({ server, signal }) => Transport`; a failure is `McpHostSeatFailure` read as `host_refused` / `unknown`). @cli: no read point. @test: an in-process server's tools callable, its instructions visible, an `open` failure and a call failure on the card.
|
|
914
|
+
- **Pins.** `test/backlog2631-host-pipe.test.ts` ①–⑮ (a real in-process SDK server over `InMemoryTransport.createLinkedPair()`, through the Runner and the library entrance: the mount and its handshake / instructions / resources, one open per dial at a re-dial and a delegated child, `open` throwing, `open` never settling, a call's `send` rejected, the server closing, a value that is no pipe and a pipe taken twice, elicitation, 1 000 send rejections, a server-wide deny, the run's abort during `open`, a pipe holding its `start` or its `notifications/initialized` send, a late arrival of a taken pipe, the settle order — an answer before its send's rejection included —, a pipe holding a session, a host close that never settles or rejects); `test/backlog2841-host-seat.test.ts` (every cell through `hostSeatOfRequests`, ③b's 1 000 failures included).
|
|
915
|
+
|
|
916
|
+
no-notes: #3050(docs and JSDoc only: INTEGRATION-CORE 11.2 and the RunnerDeps.readFace JSDoc state that a Runner's deployment is one statement; two read faces are two Runners; a delegated child reads the statement of the Runner its Agent tool is bound to and the parent's roots reaches it through the restricting clamp; the createSubagentTool JSDoc points at it; plus one pin file; no engine behavior; no export change), #2979(module-size ratchet rows raised by hand on the merged stage tree: src/agents/subagent.ts 8_210 to 8_214 and src/core/runner/contracts.ts to 2_810, each car green alone and the sum over the ceiling; the split of those files is the ticket; test table only, no engine change), #2686(named by the car-309-B merge header only: the ticket stays open; no code or sentence for it landed in this version, the limit sentences wait for the settle_race arm), #3120(named only by the car-small-7610-writefile branch merge header: the ticket shipped in 7.60.0 and nothing for it changes here), #2595(named only by a merge header inside the car-2929-mcp-v2 branch: the ticket shipped in 7.60.0 and nothing for it changes here), #2946(named only by a merge header inside the car-2929-mcp-v2 branch: the ticket shipped in 7.60.0 and nothing for it changes here), #969(named by the #2940 car commit message only: the park-seat pins were re-pinned for the mailbox window — a double fault settles first and then drains; no change to what #969 shipped), #1052(named by a #3059 car commit message only: a pin of the clamp-set rows now names its fake rows in the member table; no change to what #1052 shipped), #926(named by two car commits that route a thrown value through the existing thrownText reading: the mailbox store contract and the floor reason; no behavior change, the sweep ticket shipped earlier), #3161(the seatbelt confinement pieces of the OS-confinement seat live in one src/core module: read-floor imports seatbeltProfile from it and the root export confineShellStart comes straight from core so the engine layer imports nothing from tools/; no behavior and no export change), #6(not a ticket: the number is the stage verify-chain label "chain #6" in the subject of the stage re-pin commit 28cce2ef0; the two re-pins it carries are told under #3126 — test files only), #2181(a stale cost characterization re-pinned on the stage after #3126: every session-rule key is read once more per call for the request's tools block; one test file, no behavior beyond #3126), #3164(refuted, nothing landed: the approval card, the row and the preview already render the post-hook bytes; the stale value on screen is client-core's preference for tool_start.args over the row's pending.input — client-core CC-1115; named only by the car-user-7610-c merge header), #9(not a ticket: the number is the stage verify-chain label "chain #9" in the subject of the stage bank-down commit 71e01a14b; that commit only lowers the internal-wording baseline for src/core/memory-engine after #3068 — test file only), #2673(named by a #3147 commit that re-pins the package publish test's D cells to the one-driver face: 29 names, each smoke row's kind is typeof of the export; no change to what #2673 shipped), #3177(refuted, nothing landed in src: the session.append seat already says a protocol-outside reply on the leg's report sink — a next payload whose keys sit on the prototype chain, a second next, a row other than what next answered; the ticket's probe built the bus without onError; one test file pins the shapes at the seat and on a real Runner), #3187(the delegation's two stations, agent.offer's listens and agent.spawn's guard, read the one seatHears predicate the four session stations read: one fact, one reading; no behavior change; the unheard-seat pin covers the two entries), #3197(the offered set takes the leg's seat and reads the one seatHears predicate, and the two runner sites that decide whether to await it (the first request's listing frame, a turn boundary's) read it the same way, so no place reads the bus's hasHandlers("agent.offer") itself; no behavior change; one pin file with the behaviour each place keeps and a source-form pin per place), #3198(carriesCredential's comment now says what the code decides: an empty userinfo is no credential, any other, the bare separator included, is a credential's slot, and a URL begins at the first letter of the scheme characters before its mark; the walk's one branch that exempted the bare separator never decided a verdict, the egress pass having already judged that form, and is removed; no verdict changes; one pin file), #3143(test only: backlog2561's R6 waits for the parked call's tool by the tool announcing it instead of by counting event-loop turns, since its fact sits behind the run's 50 ms bounded journal append and how many empty turns fit in 50 ms depends on the machine; no engine behavior), #1320(named by a #3203 test commit only: the H.shown-readers pin registers the askReasons member among the shown readers; one test file, no change to what #1320 shipped), #3171(nothing landed in behavior: the premise did not hold. The mint folds only a peer segment's run of underscores, so `b3126_echo` is no spelling of any MCP tool and the reference reads it as no tool either; a deny or ask written that way is already announced by the policy-name audit's unmatched-names advisory, on the rule policy, the deny list and the session rules row, while the tool stays and the run is unaffected. One JSDoc paragraph on `peerReadingsOf` states that the rule-name readings run one way only, from the reference's spelling to the minted peers, and one test file pins the faces, the reference-spelling control and the absence of a reverse arm), #3229(the stage red the #3203 merge brought to the 557 ②d pin: a stale pin, not a regression; every reader of the park carry reads it by member name, and the pin compared the whole carry; re-pinned to the carry with the askers' entries; one test file; the #3203 section names the new AskCarry member), #3116(repo release tool only: scripts/release/dist-slip.mjs and the package.json script dist:slip turn one commit into one tarball per published package, read from the publish step's publishSet, with sha1, sha256 and package fingerprint in DIST-SLIP.md / DIST-SLIP.json; one pin file; not in the package, no gate-all roster row, no engine behavior)
|
|
917
|
+
|
|
1
918
|
## 7.60.0 — 2026-10-28
|
|
2
919
|
|
|
3
920
|
### One image admission, one processor, one table: every image a run hands the model is compressed toward 512,000 bytes, and the bytes that ship must state a size within 2000 px (#2987, C-R974 S1 — Q3, Q5's hard rows, Q6, addenda 1 / 2 / 3; behavior change; behavior narrowing open to veto; divergence candidates D-2987-a and D-2987-b, open to veto; hard-breaking: ③ the processor seats and ④ the constant exports, three sentences each below; closed sets: `MediaRefusalReason` +2 `dimensions_unreadable` / `dimensions_too_large`, `EngineNoticeCode` +1 `config.image_processor_unavailable` (operator, engine); exports: −4 root `MCP_IMAGE_MAX_BASE64`, `IMAGE_TARGET_RAW_SIZE`, `sharpImageResizer`, type `McpImageResizer`, +1 root `IMAGE_ADMISSION`) (@server @client-core @cli @test)
|