@sema-agent/core 7.59.0 → 7.61.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 +1169 -0
- package/README.md +2 -2
- package/dist/agents/agent-definition.d.ts +7 -0
- package/dist/agents/agent-definition.js +12 -0
- package/dist/agents/agent-transcript-tool.d.ts +4 -3
- package/dist/agents/agent-transcript-tool.js +4 -2
- package/dist/agents/cascade.d.ts +61 -10
- package/dist/agents/cascade.js +60 -20
- package/dist/agents/child-model-seat.js +6 -3
- 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 -1
- package/dist/agents/inherited-tool-pool.d.ts +28 -1
- package/dist/agents/inherited-tool-pool.js +22 -0
- package/dist/agents/list-agents-tool.d.ts +1 -1
- 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 +36 -7
- package/dist/agents/repair-loop.js +16 -6
- package/dist/agents/retain-ledger.d.ts +11 -1
- package/dist/agents/retain-ledger.js +16 -3
- package/dist/agents/roster-store.d.ts +2 -2
- package/dist/agents/roster-store.js +8 -3
- package/dist/agents/send-message-tool.d.ts +14 -27
- package/dist/agents/send-message-tool.js +47 -54
- 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 +52 -28
- package/dist/agents/subagent.js +276 -246
- package/dist/agents/suspend-guard.d.ts +9 -0
- package/dist/agents/suspend-guard.js +4 -0
- package/dist/agents/tool-filter.d.ts +1 -3
- package/dist/agents/tool-filter.js +4 -12
- package/dist/agents/verify.d.ts +41 -14
- package/dist/agents/verify.js +37 -27
- package/dist/bench/metrics.d.ts +3 -5
- package/dist/bench/metrics.js +0 -1
- package/dist/brain/anthropic.js +1 -0
- package/dist/brain/degrading.js +3 -1
- 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/route-adjudicator.js +3 -1
- package/dist/brain/status-sink.d.ts +7 -1
- package/dist/brain/status-sink.js +6 -0
- package/dist/brain/stream-engine.d.ts +3 -0
- package/dist/brain/stream-engine.js +4 -0
- package/dist/brain/timeout.d.ts +3 -1
- package/dist/brain/timeout.js +18 -5
- package/dist/core/a2a.d.ts +15 -5
- package/dist/core/a2a.js +34 -19
- package/dist/core/agent-definition.d.ts +20 -0
- package/dist/core/agent-state.d.ts +1 -1
- package/dist/core/allow-entry.d.ts +61 -23
- package/dist/core/allow-entry.js +134 -39
- package/dist/core/artifact-host.d.ts +0 -2
- package/dist/core/artifact-host.js +0 -1
- 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-defaults.d.ts +8 -0
- package/dist/core/auto-mode-defaults.js +1 -0
- package/dist/core/auto-mode-rebuild.d.ts +2 -1
- package/dist/core/auto-mode.d.ts +39 -4
- package/dist/core/auto-mode.js +66 -17
- package/dist/core/background-agent-store.d.ts +17 -6
- package/dist/core/background-agent-store.js +15 -13
- package/dist/core/background-shell.d.ts +12 -1
- package/dist/core/background-shell.js +12 -0
- package/dist/core/checkpoint-requirements.d.ts +24 -3
- package/dist/core/checkpoint-requirements.js +9 -1
- package/dist/core/checkpoint-store.d.ts +86 -32
- package/dist/core/checkpoint-store.js +10 -5
- 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/compliance.d.ts +1 -1
- package/dist/core/context-settings.js +3 -5
- package/dist/core/credential-echo.d.ts +52 -0
- package/dist/core/credential-echo.js +65 -0
- package/dist/core/credential-vocabulary.d.ts +13 -3
- package/dist/core/credential-vocabulary.js +12 -4
- package/dist/core/cross-boundary-taint.d.ts +5 -6
- 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 +106 -32
- 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 +15 -0
- package/dist/core/frame-settlement.js +10 -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 +9 -6
- package/dist/core/gate-lanes.js +46 -12
- 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 +19 -3
- package/dist/core/governance-codes.js +27 -3
- package/dist/core/hands-band-screen.js +0 -1
- package/dist/core/hands-band.d.ts +0 -3
- package/dist/core/hooks.d.ts +51 -60
- package/dist/core/hooks.js +131 -78
- package/dist/core/host-floor.js +3 -5
- package/dist/core/image-admission.d.ts +145 -52
- package/dist/core/image-admission.js +202 -47
- package/dist/core/image-downsample.d.ts +36 -69
- package/dist/core/image-downsample.js +111 -73
- package/dist/core/input-author.d.ts +36 -0
- package/dist/core/input-author.js +39 -0
- package/dist/core/integer-option.d.ts +21 -0
- package/dist/core/integer-option.js +13 -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 +55 -3
- package/dist/core/locked-config.js +84 -51
- 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-call-meta.d.ts +2 -2
- package/dist/core/mcp-call-meta.js +9 -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 +83 -16
- package/dist/core/mcp-failure.js +67 -30
- package/dist/core/mcp-host-seat.d.ts +131 -0
- package/dist/core/mcp-host-seat.js +305 -0
- package/dist/core/mcp-probe.d.ts +7 -2
- package/dist/core/mcp-probe.js +9 -4
- 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 +39 -9
- package/dist/core/mcp-server-spec.js +55 -21
- 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 +23 -55
- package/dist/core/mcp.js +172 -156
- 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-admission.d.ts +23 -6
- package/dist/core/memory-admission.js +19 -9
- package/dist/core/memory-engine/consolidation.d.ts +1 -1
- package/dist/core/memory-engine/consolidation.js +7 -1
- package/dist/core/memory-engine/content-origin.d.ts +13 -0
- package/dist/core/memory-engine/content-origin.js +21 -3
- 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/index.d.ts +2 -1
- package/dist/core/memory-engine/index.js +2 -1
- 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/scope-contract.d.ts +13 -3
- package/dist/core/memory-engine/scope-contract.js +2 -2
- package/dist/core/memory-engine/sync-client.d.ts +68 -13
- package/dist/core/memory-engine/sync-client.js +147 -18
- package/dist/core/memory-engine/sync-report.d.ts +106 -0
- package/dist/core/memory-engine/sync-report.js +119 -0
- package/dist/core/memory-engine/sync.d.ts +13 -3
- package/dist/core/mode-policy.d.ts +15 -7
- package/dist/core/mode-policy.js +18 -6
- package/dist/core/model-receipt.d.ts +39 -0
- package/dist/core/model-receipt.js +139 -0
- package/dist/core/mods/agent-stations.d.ts +100 -0
- package/dist/core/mods/agent-stations.js +154 -0
- package/dist/core/mods/dollar.d.ts +62 -0
- 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 +9 -4
- package/dist/core/mods/kernel/dispatch.js +8 -8
- package/dist/core/mods/kernel/events.d.ts +13 -4
- package/dist/core/mods/kernel/events.js +14 -10
- package/dist/core/mods/kernel/receive.d.ts +5 -0
- package/dist/core/mods/kernel/receive.js +10 -0
- 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 +41 -0
- package/dist/core/mods/lifecycle-stations.js +35 -0
- package/dist/core/mods/session-append.d.ts +115 -0
- package/dist/core/mods/session-append.js +311 -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 +141 -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 +89 -75
- package/dist/core/mods/stations.js +57 -53
- package/dist/core/mods/tool-call.d.ts +12 -4
- package/dist/core/mods/tool-call.js +32 -16
- package/dist/core/mounted-mcp.d.ts +5 -0
- package/dist/core/mounted-mcp.js +2 -2
- package/dist/core/namespaced-rule-name.d.ts +7 -1
- package/dist/core/namespaced-rule-name.js +13 -2
- package/dist/core/oracle-isolation.js +1 -1
- package/dist/core/output-style.js +3 -4
- package/dist/core/own-property-receipt.d.ts +62 -0
- package/dist/core/own-property-receipt.js +43 -0
- package/dist/core/park-selfcheck.js +12 -10
- 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 +66 -11
- package/dist/core/peer-seat.js +199 -42
- package/dist/core/permission-rule-consent.d.ts +21 -26
- package/dist/core/permission-rule-consent.js +22 -3
- package/dist/core/permission-rule-model.d.ts +38 -13
- package/dist/core/permission-rule-model.js +54 -16
- 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/protocol-http-auth.d.ts +14 -2
- package/dist/core/protocol-http-auth.js +16 -7
- package/dist/core/read-face-seats.d.ts +7 -5
- package/dist/core/read-face-seats.js +4 -1
- package/dist/core/redaction-marks.d.ts +4 -3
- package/dist/core/redaction-marks.js +2 -2
- package/dist/core/remote-env.d.ts +218 -122
- package/dist/core/remote-env.js +133 -14
- 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/retention.js +37 -12
- package/dist/core/retired-keys.d.ts +8 -3
- package/dist/core/retired-keys.js +4 -1
- package/dist/core/rewrite-rejudge.d.ts +12 -5
- package/dist/core/rewrite-rejudge.js +9 -5
- package/dist/core/roles.d.ts +37 -3
- package/dist/core/roles.js +126 -78
- package/dist/core/row-admission.d.ts +10 -0
- package/dist/core/row-admission.js +5 -0
- package/dist/core/rule-owner.d.ts +3 -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 -8
- package/dist/core/runner/assemble-result.js +12 -8
- package/dist/core/runner/call-hook-stations.d.ts +17 -10
- package/dist/core/runner/call-hook-stations.js +21 -10
- 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/child-tree.d.ts +7 -8
- package/dist/core/runner/child-tree.js +6 -6
- package/dist/core/runner/classifier-ladder.d.ts +10 -2
- package/dist/core/runner/classifier-ladder.js +39 -8
- package/dist/core/runner/compact-session.js +14 -2
- 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 +7 -2
- package/dist/core/runner/contracts.d.ts +158 -65
- package/dist/core/runner/cross-boundary-lane.d.ts +4 -6
- package/dist/core/runner/cross-boundary-lane.js +11 -2
- package/dist/core/runner/decide-continuation.d.ts +4 -2
- package/dist/core/runner/decide-continuation.js +7 -4
- 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/env-capability-census.d.ts +15 -20
- package/dist/core/runner/env-capability-census.js +25 -34
- package/dist/core/runner/expire-settle.d.ts +44 -0
- package/dist/core/runner/expire-settle.js +55 -0
- package/dist/core/runner/file-history-request.d.ts +2 -2
- package/dist/core/runner/file-history-request.js +0 -8
- package/dist/core/runner/gate-exit.d.ts +75 -7
- package/dist/core/runner/gate-exit.js +20 -1
- package/dist/core/runner/git-status-frame.d.ts +5 -2
- package/dist/core/runner/git-status-frame.js +4 -4
- package/dist/core/runner/halt-attribution.d.ts +2 -1
- package/dist/core/runner/halt-attribution.js +2 -1
- package/dist/core/runner/image.d.ts +7 -2
- package/dist/core/runner/image.js +14 -8
- package/dist/core/runner/inline-image.d.ts +10 -8
- package/dist/core/runner/inline-image.js +11 -9
- 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/memory-consolidation-driver.js +4 -4
- package/dist/core/runner/park-commit.d.ts +2 -2
- package/dist/core/runner/permission-rule-lanes.d.ts +5 -1
- package/dist/core/runner/permission-rule-lanes.js +29 -10
- package/dist/core/runner/person-path-rows.js +1 -1
- package/dist/core/runner/placement-fence.d.ts +26 -0
- package/dist/core/runner/placement-fence.js +38 -0
- 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 +6 -3
- package/dist/core/runner/prepare-boundary-parks.js +4 -4
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +6 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +5 -3
- package/dist/core/runner/prepare-config-doors.d.ts +6 -1
- package/dist/core/runner/prepare-config-doors.js +30 -26
- 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 +13 -11
- package/dist/core/runner/prepare-delegation-surface.js +7 -8
- 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-file-history.d.ts +10 -12
- package/dist/core/runner/prepare-file-history.js +3 -12
- package/dist/core/runner/prepare-gate-stations.d.ts +23 -17
- package/dist/core/runner/prepare-gate-stations.js +10 -7
- package/dist/core/runner/prepare-hands-readface.d.ts +8 -6
- package/dist/core/runner/prepare-hands-readface.js +19 -11
- package/dist/core/runner/prepare-inherited-gate.d.ts +11 -4
- package/dist/core/runner/prepare-inherited-gate.js +12 -5
- package/dist/core/runner/prepare-lsp.d.ts +3 -0
- package/dist/core/runner/prepare-lsp.js +2 -2
- package/dist/core/runner/prepare-memory-engine-session.js +1 -1
- package/dist/core/runner/prepare-memory.d.ts +2 -2
- package/dist/core/runner/prepare-memory.js +2 -2
- package/dist/core/runner/prepare-park-ask.d.ts +8 -7
- package/dist/core/runner/prepare-park-ask.js +6 -12
- package/dist/core/runner/prepare-policy-chain.d.ts +15 -25
- package/dist/core/runner/prepare-policy-chain.js +131 -128
- package/dist/core/runner/prepare-project-context.d.ts +2 -2
- package/dist/core/runner/prepare-project-context.js +8 -5
- package/dist/core/runner/prepare-prompt-inputs.d.ts +4 -0
- package/dist/core/runner/prepare-prompt-inputs.js +4 -2
- package/dist/core/runner/prepare-protocol-tools.d.ts +5 -3
- package/dist/core/runner/prepare-protocol-tools.js +9 -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 -9
- package/dist/core/runner/prepare-suspend-saga.js +21 -13
- package/dist/core/runner/prepare-task.d.ts +1 -1
- package/dist/core/runner/prepare-task.js +84 -42
- 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-turn-wiring.d.ts +2 -0
- package/dist/core/runner/prepare-turn-wiring.js +7 -2
- package/dist/core/runner/prepare-wiring-manifest.d.ts +7 -3
- package/dist/core/runner/prepare-wiring-manifest.js +34 -19
- package/dist/core/runner/prepare-workspace-restore.d.ts +5 -0
- package/dist/core/runner/prepare-workspace-restore.js +12 -8
- 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 +5 -3
- package/dist/core/runner/resume-admission.js +17 -3
- package/dist/core/runner/resume-apply.js +3 -1
- package/dist/core/runner/resume-checkpoint-screen.js +4 -4
- 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 +6 -1
- package/dist/core/runner/run-attachment-seats.js +3 -3
- package/dist/core/runner/run-brain-sinks.js +1 -0
- package/dist/core/runner/run-git-lane.d.ts +3 -1
- package/dist/core/runner/run-git-lane.js +3 -2
- package/dist/core/runner/run-harness-handlers.d.ts +3 -1
- package/dist/core/runner/run-harness-handlers.js +5 -3
- package/dist/core/runner/run-identity-wiring.d.ts +2 -2
- package/dist/core/runner/run-identity-wiring.js +15 -6
- package/dist/core/runner/run-leg.d.ts +3 -3
- package/dist/core/runner/run-leg.js +65 -56
- package/dist/core/runner/run-notification-lane.d.ts +3 -1
- package/dist/core/runner/run-notification-lane.js +36 -12
- package/dist/core/runner/run-recovery-lanes.js +3 -2
- package/dist/core/runner/run-settle-and-teardown.js +14 -8
- package/dist/core/runner/run-stop-and-final-verify.d.ts +4 -0
- package/dist/core/runner/run-stop-and-final-verify.js +12 -4
- 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 +37 -19
- package/dist/core/runner/runtask.d.ts +25 -7
- package/dist/core/runner/runtask.js +46 -22
- 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/skills-seat.js +2 -2
- 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 +8 -7
- package/dist/core/runner/sub-agent-deny-lists.js +10 -7
- package/dist/core/runner/synthetic-tools.js +2 -2
- 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 -4
- 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.d.ts +1 -1
- package/dist/core/runner/tool-face-overlay.js +26 -19
- 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-result-media-seat.d.ts +9 -1
- package/dist/core/runner/tool-result-media-seat.js +17 -1
- 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 +6 -7
- package/dist/core/runner/turn-attachments.js +4 -17
- 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 +55 -43
- package/dist/core/secret-env.d.ts +14 -13
- package/dist/core/secret-env.js +8 -9
- package/dist/core/session-log-transfer.js +9 -10
- package/dist/core/session-policy-store.d.ts +10 -3
- package/dist/core/session-policy-store.js +21 -3
- package/dist/core/session-reconcile.d.ts +3 -2
- package/dist/core/session-reconcile.js +7 -4
- package/dist/core/session-store.d.ts +5 -2
- package/dist/core/session-store.js +53 -16
- package/dist/core/session.d.ts +2 -1
- package/dist/core/shell-confinement.d.ts +37 -0
- package/dist/core/shell-confinement.js +56 -0
- package/dist/core/skill-grant.d.ts +9 -0
- package/dist/core/skill-grant.js +18 -0
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +2 -2
- package/dist/core/store-contracts/checkpoint-store-contract.js +15 -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/tool-result-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/tool-result-store-contract.js +67 -0
- package/dist/core/stub-env.d.ts +5 -5
- package/dist/core/stub-env.js +11 -1
- package/dist/core/swappable-deps.d.ts +17 -43
- package/dist/core/swappable-deps.js +15 -5
- package/dist/core/synthetic-read-verdict.d.ts +1 -1
- package/dist/core/task-event.d.ts +35 -10
- package/dist/core/task-limits.d.ts +5 -0
- package/dist/core/task-notification.d.ts +172 -12
- package/dist/core/task-notification.js +209 -12
- package/dist/core/task-registry-agent.d.ts +23 -55
- package/dist/core/task-registry-agent.js +41 -56
- package/dist/core/task-registry-monitor.d.ts +8 -1
- package/dist/core/task-registry-monitor.js +43 -61
- package/dist/core/task-registry-shared.d.ts +52 -114
- package/dist/core/task-registry-shared.js +24 -48
- package/dist/core/task-registry-workflow.js +5 -22
- package/dist/core/task-registry.d.ts +64 -90
- package/dist/core/task-registry.js +73 -119
- package/dist/core/task-result.d.ts +27 -19
- 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 +13 -16
- package/dist/core/task-stream.d.ts +1 -1
- 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 +30 -0
- package/dist/core/terminal-cause.js +1 -0
- package/dist/core/tool-catalog-entries.js +3 -6
- 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.d.ts +7 -6
- package/dist/core/tool-face-reader.js +6 -4
- package/dist/core/tool-face.d.ts +2 -3
- package/dist/core/tool-name-aliases.d.ts +23 -28
- package/dist/core/tool-name-aliases.js +63 -7
- 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 +113 -22
- package/dist/core/tool-policy.js +85 -15
- package/dist/core/tool-registry.d.ts +5 -5
- package/dist/core/tool-registry.js +2 -2
- package/dist/core/tool-result-store.d.ts +111 -5
- package/dist/core/tool-result-store.js +52 -12
- package/dist/core/tool-spec.d.ts +39 -10
- package/dist/core/trace.d.ts +18 -2
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-text.js +1 -1
- package/dist/core/user-attachment.d.ts +10 -5
- package/dist/core/user-attachment.js +40 -27
- 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 -7
- package/dist/engine/execution-env/node-execution-env.js +224 -21
- package/dist/engine/harness/agent-harness.d.ts +66 -19
- package/dist/engine/harness/agent-harness.js +98 -27
- package/dist/engine/harness/messages.d.ts +4 -3
- package/dist/engine/harness/messages.js +2 -2
- package/dist/engine/harness/types.d.ts +151 -34
- 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 +18 -13
- package/dist/engine/loop/agent-loop.js +173 -32
- package/dist/engine/loop/types.d.ts +21 -5
- package/dist/engine/lsp/node-lsp-manager.d.ts +3 -3
- package/dist/engine/lsp/node-lsp-manager.js +32 -13
- package/dist/engine/session/import-validate.js +7 -0
- package/dist/fixtures/index.d.ts +7 -5
- package/dist/fixtures/index.js +5 -3
- package/dist/index.d.ts +41 -23
- package/dist/index.js +29 -16
- package/dist/internal/harness-types.d.ts +3 -1
- 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 +20 -20
- package/dist/orchestration/run-workflow-tool.js +63 -56
- package/dist/orchestration/workflow-governance.d.ts +1 -1
- package/dist/orchestration/workflow-governance.js +2 -1
- package/dist/orchestration/workflow-types.d.ts +2 -2
- package/dist/orchestration/workflow.d.ts +8 -0
- package/dist/orchestration/workflow.js +33 -9
- package/dist/prompts/default.d.ts +1 -10
- package/dist/prompts/default.js +0 -2
- package/dist/stores/file/background-agent-store.d.ts +1 -1
- package/dist/stores/file/background-agent-store.js +19 -14
- package/dist/stores/file/checkpoint-store.d.ts +127 -2
- package/dist/stores/file/checkpoint-store.js +24 -16
- package/dist/stores/file/file-history-store.d.ts +1 -1
- package/dist/stores/file/file-history-store.js +4 -1
- package/dist/stores/file/index.d.ts +9 -6
- package/dist/stores/file/index.js +33 -9
- 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.d.ts +1 -1
- package/dist/stores/file/mailbox-store.js +43 -21
- package/dist/stores/file/memory-store.d.ts +1 -1
- package/dist/stores/file/memory-store.js +4 -1
- 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.d.ts +1 -1
- package/dist/stores/file/session-policy-store.js +4 -1
- package/dist/stores/file/session-store.d.ts +17 -4
- package/dist/stores/file/session-store.js +22 -19
- package/dist/stores/file/shared-ledger.d.ts +26 -0
- package/dist/stores/file/shared-ledger.js +38 -9
- package/dist/stores/file/tool-result-store.d.ts +31 -2
- package/dist/stores/file/tool-result-store.js +129 -7
- package/dist/stores/file/usage-window-store.d.ts +1 -1
- package/dist/stores/file/usage-window-store.js +4 -1
- package/dist/stores/file/workflow-journal-store.d.ts +1 -13
- package/dist/stores/file/workflow-journal-store.js +4 -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/containment-face.d.ts +5 -0
- package/dist/tools/fs/dead-cwd.d.ts +5 -5
- package/dist/tools/fs/dead-cwd.js +4 -11
- package/dist/tools/fs/encoding.d.ts +13 -4
- package/dist/tools/fs/encoding.js +17 -2
- package/dist/tools/fs/fs-bash-background-text.d.ts +13 -0
- package/dist/tools/fs/fs-bash-background-text.js +7 -0
- package/dist/tools/fs/fs-bash.d.ts +11 -22
- package/dist/tools/fs/fs-bash.js +58 -154
- package/dist/tools/fs/fs-pdf.d.ts +2 -2
- package/dist/tools/fs/fs-pdf.js +34 -27
- package/dist/tools/fs/fs-read.d.ts +5 -4
- package/dist/tools/fs/fs-read.js +35 -18
- package/dist/tools/fs/fs-search-tools.js +4 -1
- package/dist/tools/fs/fs-shared.d.ts +39 -16
- package/dist/tools/fs/fs-shared.js +25 -6
- package/dist/tools/fs/fs-write.js +5 -5
- package/dist/tools/fs/index.d.ts +15 -9
- package/dist/tools/fs/index.js +12 -18
- 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 +57 -6
- package/dist/tools/fs/read-floor.js +241 -2
- package/dist/tools/fs/removal-targets.d.ts +9 -4
- package/dist/tools/fs/removal-targets.js +17 -9
- package/dist/tools/fs/search.d.ts +6 -5
- package/dist/tools/fs/search.js +10 -10
- package/dist/tools/fs/shell-read-establish.js +3 -1
- 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/monitor.d.ts +12 -10
- package/dist/tools/monitor.js +22 -13
- package/dist/tools/scheduler-tools.js +42 -4
- package/dist/tools/web.d.ts +0 -10
- package/dist/tools/web.js +1 -4
- package/dist/tools/worktree.d.ts +5 -1
- package/dist/tools/worktree.js +20 -17
- package/package.json +8 -3
- package/test/export-surface.snapshot.json +166 -30
- package/wire-changes/core-stores-sql@7.60.0.json +30 -0
- package/wire-changes/core-stores-sql@7.61.0.json +480 -0
- package/wire-changes/core@7.60.0.json +3274 -0
- package/wire-changes/core@7.61.0.json +4405 -0
- package/wire-changes/mods-kernel@7.60.0.json +62 -0
- package/wire-changes/mods-kernel@7.61.0.json +65 -0
- package/wire-changes/primitives@7.60.0.json +30 -0
- package/wire-changes/primitives@7.61.0.json +30 -0
- package/dist/core/runner/image-removed-seat.d.ts +0 -12
- package/dist/core/runner/image-removed-seat.js +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,1172 @@
|
|
|
1
|
+
## 7.61.0 — 2026-10-30
|
|
2
|
+
|
|
3
|
+
### 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)
|
|
4
|
+
|
|
5
|
+
- **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).
|
|
6
|
+
- **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.
|
|
7
|
+
- **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.
|
|
8
|
+
- **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).
|
|
9
|
+
- **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).
|
|
10
|
+
|
|
11
|
+
### The File session repo's placement probe reads the row's header, not its transcript — `FileSessionRepo.placementOf` (#3079; performance)
|
|
12
|
+
|
|
13
|
+
- **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.
|
|
14
|
+
- **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.
|
|
15
|
+
- **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).
|
|
16
|
+
- **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.
|
|
17
|
+
- **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).
|
|
18
|
+
|
|
19
|
+
### 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)
|
|
20
|
+
|
|
21
|
+
- **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.
|
|
22
|
+
- **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.
|
|
23
|
+
- **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`).
|
|
24
|
+
- **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).
|
|
25
|
+
- **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.
|
|
26
|
+
- **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'.
|
|
27
|
+
- **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`.
|
|
28
|
+
- **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).
|
|
29
|
+
|
|
30
|
+
### 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`)
|
|
31
|
+
|
|
32
|
+
- **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.
|
|
33
|
+
- **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.
|
|
34
|
+
- **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.
|
|
35
|
+
- **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.
|
|
36
|
+
- **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.
|
|
37
|
+
- **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.
|
|
38
|
+
- **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.
|
|
39
|
+
- **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.
|
|
40
|
+
- **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).
|
|
41
|
+
- **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).
|
|
42
|
+
|
|
43
|
+
### 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)
|
|
44
|
+
|
|
45
|
+
- **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).
|
|
46
|
+
- **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).
|
|
47
|
+
- **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.
|
|
48
|
+
- **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.
|
|
49
|
+
- **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`.
|
|
50
|
+
- **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.
|
|
51
|
+
- **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.
|
|
52
|
+
- **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).
|
|
53
|
+
- **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).
|
|
54
|
+
|
|
55
|
+
### 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)
|
|
56
|
+
|
|
57
|
+
- **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).
|
|
58
|
+
- **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).
|
|
59
|
+
- **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.
|
|
60
|
+
- **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.
|
|
61
|
+
- **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).
|
|
62
|
+
- **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.
|
|
63
|
+
- **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.
|
|
64
|
+
- **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.
|
|
65
|
+
- **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.
|
|
66
|
+
- **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).
|
|
67
|
+
|
|
68
|
+
### 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)
|
|
69
|
+
|
|
70
|
+
- **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.
|
|
71
|
+
- **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.
|
|
72
|
+
- **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.
|
|
73
|
+
- **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).
|
|
74
|
+
- **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.
|
|
75
|
+
- **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).
|
|
76
|
+
- **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.
|
|
77
|
+
|
|
78
|
+
### 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)
|
|
79
|
+
|
|
80
|
+
- **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".
|
|
81
|
+
- **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.
|
|
82
|
+
- **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.
|
|
83
|
+
- **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`.
|
|
84
|
+
- **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.
|
|
85
|
+
|
|
86
|
+
### 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)
|
|
87
|
+
|
|
88
|
+
- **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 `*`).
|
|
89
|
+
- **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.
|
|
90
|
+
- **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.
|
|
91
|
+
- **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/`.
|
|
92
|
+
- **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`).
|
|
93
|
+
|
|
94
|
+
### 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)
|
|
95
|
+
|
|
96
|
+
- **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`.
|
|
97
|
+
- **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).
|
|
98
|
+
- **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.
|
|
99
|
+
- **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.
|
|
100
|
+
- **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.
|
|
101
|
+
- **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).
|
|
102
|
+
|
|
103
|
+
### 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)
|
|
104
|
+
|
|
105
|
+
- **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.
|
|
106
|
+
- **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).
|
|
107
|
+
- **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.
|
|
108
|
+
- **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`.
|
|
109
|
+
- **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.
|
|
110
|
+
- **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).
|
|
111
|
+
|
|
112
|
+
### 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)
|
|
113
|
+
|
|
114
|
+
- **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.
|
|
115
|
+
- **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.
|
|
116
|
+
- **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.
|
|
117
|
+
- **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`.
|
|
118
|
+
- **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).
|
|
119
|
+
- **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`).
|
|
120
|
+
- **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.
|
|
121
|
+
- **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.
|
|
122
|
+
- **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).
|
|
123
|
+
|
|
124
|
+
### 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)
|
|
125
|
+
|
|
126
|
+
- **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).
|
|
127
|
+
- **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).
|
|
128
|
+
- **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.
|
|
129
|
+
- **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.
|
|
130
|
+
|
|
131
|
+
### 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)
|
|
132
|
+
|
|
133
|
+
- **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.
|
|
134
|
+
- **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".
|
|
135
|
+
- **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.
|
|
136
|
+
- **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).
|
|
137
|
+
- **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).
|
|
138
|
+
|
|
139
|
+
### 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)
|
|
140
|
+
|
|
141
|
+
- **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.
|
|
142
|
+
- **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.
|
|
143
|
+
- **Consumers.** @server: a store you implement yourself should read its bag once the same way; the bundled stores no longer re-read it.
|
|
144
|
+
- **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).
|
|
145
|
+
|
|
146
|
+
### 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)
|
|
147
|
+
|
|
148
|
+
- **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.
|
|
149
|
+
- **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.
|
|
150
|
+
- **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.
|
|
151
|
+
- **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.
|
|
152
|
+
- **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.
|
|
153
|
+
- **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).
|
|
154
|
+
|
|
155
|
+
### 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)
|
|
156
|
+
|
|
157
|
+
- **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.
|
|
158
|
+
- **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).
|
|
159
|
+
- **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).
|
|
160
|
+
- **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).
|
|
161
|
+
|
|
162
|
+
### 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)
|
|
163
|
+
|
|
164
|
+
- **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.
|
|
165
|
+
- **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).
|
|
166
|
+
- **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.
|
|
167
|
+
- **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.
|
|
168
|
+
- **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.
|
|
169
|
+
- **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).
|
|
170
|
+
|
|
171
|
+
### 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)
|
|
172
|
+
|
|
173
|
+
- **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.
|
|
174
|
+
- **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.
|
|
175
|
+
- **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).
|
|
176
|
+
- **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".
|
|
177
|
+
- **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.
|
|
178
|
+
- **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`.
|
|
179
|
+
|
|
180
|
+
### 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)
|
|
181
|
+
|
|
182
|
+
- **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.
|
|
183
|
+
- **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).
|
|
184
|
+
- **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.
|
|
185
|
+
- **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).
|
|
186
|
+
|
|
187
|
+
### 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)
|
|
188
|
+
|
|
189
|
+
- **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`.
|
|
190
|
+
- **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.
|
|
191
|
+
- **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.
|
|
192
|
+
- **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.
|
|
193
|
+
- **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.
|
|
194
|
+
- **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).
|
|
195
|
+
|
|
196
|
+
### `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)
|
|
197
|
+
|
|
198
|
+
- **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.
|
|
199
|
+
- **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.
|
|
200
|
+
- **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).
|
|
201
|
+
- **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).
|
|
202
|
+
|
|
203
|
+
### 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)
|
|
204
|
+
|
|
205
|
+
- **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.
|
|
206
|
+
- **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).
|
|
207
|
+
|
|
208
|
+
### 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)
|
|
209
|
+
|
|
210
|
+
- **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.
|
|
211
|
+
- **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.
|
|
212
|
+
- **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.
|
|
213
|
+
- **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.
|
|
214
|
+
- **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.
|
|
215
|
+
- **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).
|
|
216
|
+
- **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.
|
|
217
|
+
- **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.
|
|
218
|
+
- **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.
|
|
219
|
+
- **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).
|
|
220
|
+
- **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).
|
|
221
|
+
|
|
222
|
+
### 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)
|
|
223
|
+
|
|
224
|
+
- **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.
|
|
225
|
+
- **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`.
|
|
226
|
+
- **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.
|
|
227
|
+
- **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.
|
|
228
|
+
- **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).
|
|
229
|
+
|
|
230
|
+
### 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)
|
|
231
|
+
|
|
232
|
+
- **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.
|
|
233
|
+
- **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.
|
|
234
|
+
- **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.
|
|
235
|
+
- **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?`).
|
|
236
|
+
|
|
237
|
+
### 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)
|
|
238
|
+
|
|
239
|
+
- **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.
|
|
240
|
+
- **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}`.
|
|
241
|
+
- **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.
|
|
242
|
+
- **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.
|
|
243
|
+
- **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.
|
|
244
|
+
- **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.
|
|
245
|
+
- **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.
|
|
246
|
+
- **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).
|
|
247
|
+
- **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).
|
|
248
|
+
|
|
249
|
+
### 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)
|
|
250
|
+
|
|
251
|
+
- **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.
|
|
252
|
+
- **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).
|
|
253
|
+
- **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.
|
|
254
|
+
- **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"`.
|
|
255
|
+
- **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.
|
|
256
|
+
- **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.
|
|
257
|
+
- **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.
|
|
258
|
+
- **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).
|
|
259
|
+
- **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).
|
|
260
|
+
- **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`.
|
|
261
|
+
- **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.
|
|
262
|
+
|
|
263
|
+
### 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)
|
|
264
|
+
|
|
265
|
+
- **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.
|
|
266
|
+
- **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.
|
|
267
|
+
- **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.
|
|
268
|
+
- **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.
|
|
269
|
+
- **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.
|
|
270
|
+
- **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.
|
|
271
|
+
- **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).
|
|
272
|
+
|
|
273
|
+
### 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)
|
|
274
|
+
|
|
275
|
+
- **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.
|
|
276
|
+
- **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.
|
|
277
|
+
- **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.
|
|
278
|
+
- **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.
|
|
279
|
+
- **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.
|
|
280
|
+
- **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.
|
|
281
|
+
- **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.
|
|
282
|
+
- **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).
|
|
283
|
+
- **Retirement lines.** RL-1608 ×9 are deleted with their faces (`createTaskOutputTool`, `createEnvTaskOutputTool`, the two catalog rows, the five earlier-name hints).
|
|
284
|
+
- **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.
|
|
285
|
+
- **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`.
|
|
286
|
+
- **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`).
|
|
287
|
+
|
|
288
|
+
### 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)
|
|
289
|
+
|
|
290
|
+
- **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.
|
|
291
|
+
- **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.
|
|
292
|
+
- **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.
|
|
293
|
+
- **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.
|
|
294
|
+
- **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.
|
|
295
|
+
- **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).
|
|
296
|
+
- **Known limits.** `KL-3071-a` is deleted (closed by this change).
|
|
297
|
+
|
|
298
|
+
### 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)
|
|
299
|
+
|
|
300
|
+
- **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.
|
|
301
|
+
- **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.
|
|
302
|
+
- **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.
|
|
303
|
+
- **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.
|
|
304
|
+
- **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).
|
|
305
|
+
|
|
306
|
+
### 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)
|
|
307
|
+
|
|
308
|
+
- **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.
|
|
309
|
+
- **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.
|
|
310
|
+
- **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.
|
|
311
|
+
- **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`.
|
|
312
|
+
- **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.
|
|
313
|
+
- **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.
|
|
314
|
+
- **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).
|
|
315
|
+
- **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.
|
|
316
|
+
|
|
317
|
+
### 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)
|
|
318
|
+
|
|
319
|
+
- **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.
|
|
320
|
+
- **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.
|
|
321
|
+
- **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").
|
|
322
|
+
- **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.
|
|
323
|
+
- **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.
|
|
324
|
+
- **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").
|
|
325
|
+
|
|
326
|
+
### 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)
|
|
327
|
+
|
|
328
|
+
- **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.
|
|
329
|
+
- **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.
|
|
330
|
+
- **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.
|
|
331
|
+
- **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).
|
|
332
|
+
- **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.
|
|
333
|
+
|
|
334
|
+
### 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)
|
|
335
|
+
|
|
336
|
+
- **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.
|
|
337
|
+
- **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.
|
|
338
|
+
- **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.
|
|
339
|
+
- **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.
|
|
340
|
+
- **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).
|
|
341
|
+
- 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).
|
|
342
|
+
- **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.
|
|
343
|
+
- **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.
|
|
344
|
+
- **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).
|
|
345
|
+
|
|
346
|
+
### 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)
|
|
347
|
+
|
|
348
|
+
- **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.
|
|
349
|
+
- **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).
|
|
350
|
+
- **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.
|
|
351
|
+
- **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?`.
|
|
352
|
+
- **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.
|
|
353
|
+
- **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).
|
|
354
|
+
- **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).
|
|
355
|
+
- **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.
|
|
356
|
+
- **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).
|
|
357
|
+
- **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.
|
|
358
|
+
|
|
359
|
+
### 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)
|
|
360
|
+
|
|
361
|
+
- **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).
|
|
362
|
+
- **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.
|
|
363
|
+
- **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).
|
|
364
|
+
- **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).
|
|
365
|
+
- **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.
|
|
366
|
+
- **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).
|
|
367
|
+
|
|
368
|
+
### 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)
|
|
369
|
+
|
|
370
|
+
- **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.
|
|
371
|
+
- **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.
|
|
372
|
+
- **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).
|
|
373
|
+
|
|
374
|
+
### 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)
|
|
375
|
+
|
|
376
|
+
- **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.
|
|
377
|
+
- **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).
|
|
378
|
+
- **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.
|
|
379
|
+
|
|
380
|
+
### 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)
|
|
381
|
+
|
|
382
|
+
- **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).
|
|
383
|
+
- **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.
|
|
384
|
+
- **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.
|
|
385
|
+
- **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.
|
|
386
|
+
- **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).
|
|
387
|
+
|
|
388
|
+
### 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)
|
|
389
|
+
|
|
390
|
+
- **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".
|
|
391
|
+
- **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".
|
|
392
|
+
- **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.
|
|
393
|
+
- **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).
|
|
394
|
+
|
|
395
|
+
### 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)
|
|
396
|
+
|
|
397
|
+
- **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.
|
|
398
|
+
- **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.
|
|
399
|
+
- **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.
|
|
400
|
+
- **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).
|
|
401
|
+
- 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.
|
|
402
|
+
|
|
403
|
+
### 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)
|
|
404
|
+
|
|
405
|
+
- **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).
|
|
406
|
+
- **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).
|
|
407
|
+
- **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.
|
|
408
|
+
- **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.
|
|
409
|
+
- **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".
|
|
410
|
+
- **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.
|
|
411
|
+
- **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.
|
|
412
|
+
- **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.
|
|
413
|
+
- **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.
|
|
414
|
+
- **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.
|
|
415
|
+
- **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).
|
|
416
|
+
|
|
417
|
+
### `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)
|
|
418
|
+
|
|
419
|
+
- **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).
|
|
420
|
+
- **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`).
|
|
421
|
+
- **Compensation.** Dial with `new Client(…)` from `@modelcontextprotocol/client`; the connection's listing record is `lease.listing`.
|
|
422
|
+
|
|
423
|
+
### 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)
|
|
424
|
+
|
|
425
|
+
- **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.
|
|
426
|
+
- **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`).
|
|
427
|
+
- **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.
|
|
428
|
+
|
|
429
|
+
### 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)
|
|
430
|
+
|
|
431
|
+
- **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.
|
|
432
|
+
- **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.
|
|
433
|
+
- **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`.
|
|
434
|
+
- **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.
|
|
435
|
+
- **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).
|
|
436
|
+
- **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).
|
|
437
|
+
- **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.
|
|
438
|
+
|
|
439
|
+
### 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)
|
|
440
|
+
|
|
441
|
+
- **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.
|
|
442
|
+
- **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.
|
|
443
|
+
- **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).
|
|
444
|
+
- **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).
|
|
445
|
+
- **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`.
|
|
446
|
+
- **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.
|
|
447
|
+
- **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).
|
|
448
|
+
|
|
449
|
+
### 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)
|
|
450
|
+
|
|
451
|
+
- **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`).
|
|
452
|
+
- **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.
|
|
453
|
+
- **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.
|
|
454
|
+
- **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).
|
|
455
|
+
- **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.
|
|
456
|
+
- **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"`.
|
|
457
|
+
- **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.
|
|
458
|
+
- **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"`.
|
|
459
|
+
- **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.
|
|
460
|
+
- **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.
|
|
461
|
+
|
|
462
|
+
### 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)
|
|
463
|
+
|
|
464
|
+
- **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.
|
|
465
|
+
- **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.
|
|
466
|
+
- **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.
|
|
467
|
+
- **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.
|
|
468
|
+
- **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.
|
|
469
|
+
- **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.
|
|
470
|
+
- **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`).
|
|
471
|
+
|
|
472
|
+
### 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)
|
|
473
|
+
|
|
474
|
+
- **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`.
|
|
475
|
+
- **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).
|
|
476
|
+
- **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.
|
|
477
|
+
- **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.
|
|
478
|
+
- **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`).
|
|
479
|
+
- **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).
|
|
480
|
+
- **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).
|
|
481
|
+
|
|
482
|
+
### 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)
|
|
483
|
+
|
|
484
|
+
- **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.
|
|
485
|
+
- **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.
|
|
486
|
+
- **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.
|
|
487
|
+
- **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).
|
|
488
|
+
- **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).
|
|
489
|
+
|
|
490
|
+
### 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)
|
|
491
|
+
|
|
492
|
+
- **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.
|
|
493
|
+
- **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.
|
|
494
|
+
- **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.
|
|
495
|
+
|
|
496
|
+
### 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)
|
|
497
|
+
|
|
498
|
+
- **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.
|
|
499
|
+
- **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.
|
|
500
|
+
- **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`).
|
|
501
|
+
- **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).
|
|
502
|
+
|
|
503
|
+
### 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)
|
|
504
|
+
|
|
505
|
+
- **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.
|
|
506
|
+
- **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).
|
|
507
|
+
- **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.
|
|
508
|
+
- **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".
|
|
509
|
+
|
|
510
|
+
### `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)
|
|
511
|
+
|
|
512
|
+
- **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`.
|
|
513
|
+
- **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.
|
|
514
|
+
- **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.
|
|
515
|
+
- **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).
|
|
516
|
+
|
|
517
|
+
### `@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)
|
|
518
|
+
|
|
519
|
+
- **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.
|
|
520
|
+
- **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).
|
|
521
|
+
- **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`.
|
|
522
|
+
- **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.
|
|
523
|
+
- **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.
|
|
524
|
+
- **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.
|
|
525
|
+
- **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.
|
|
526
|
+
|
|
527
|
+
### 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)
|
|
528
|
+
|
|
529
|
+
- **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.
|
|
530
|
+
- **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.
|
|
531
|
+
- **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.
|
|
532
|
+
- **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.
|
|
533
|
+
- **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.
|
|
534
|
+
- **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).
|
|
535
|
+
- **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.
|
|
536
|
+
- **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).
|
|
537
|
+
|
|
538
|
+
### 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)
|
|
539
|
+
|
|
540
|
+
- **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).
|
|
541
|
+
- **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`.
|
|
542
|
+
- **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.
|
|
543
|
+
- **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.
|
|
544
|
+
- **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.
|
|
545
|
+
- **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.
|
|
546
|
+
- **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`.
|
|
547
|
+
|
|
548
|
+
### 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)
|
|
549
|
+
|
|
550
|
+
- **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.
|
|
551
|
+
- **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:
|
|
552
|
+
- `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.
|
|
553
|
+
- `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.
|
|
554
|
+
- `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.
|
|
555
|
+
- `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.
|
|
556
|
+
- `classifyScopePlanes`, `scopePlanesOf`, type `ScopePlanes` — the pure plane classification the session assembly reads, now on the root; unchanged.
|
|
557
|
+
- **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.
|
|
558
|
+
- **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.
|
|
559
|
+
|
|
560
|
+
### 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)
|
|
561
|
+
|
|
562
|
+
- **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.
|
|
563
|
+
- **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.
|
|
564
|
+
- **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.
|
|
565
|
+
- **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.
|
|
566
|
+
- **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.
|
|
567
|
+
- **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).
|
|
568
|
+
- **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.
|
|
569
|
+
- **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).
|
|
570
|
+
- **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.
|
|
571
|
+
|
|
572
|
+
### 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)
|
|
573
|
+
|
|
574
|
+
- **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).
|
|
575
|
+
- **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.
|
|
576
|
+
- **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.
|
|
577
|
+
- **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.
|
|
578
|
+
- **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.
|
|
579
|
+
- **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`.
|
|
580
|
+
|
|
581
|
+
### 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)
|
|
582
|
+
|
|
583
|
+
- **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.
|
|
584
|
+
- **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.
|
|
585
|
+
- **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.
|
|
586
|
+
- **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.
|
|
587
|
+
- **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.
|
|
588
|
+
- **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.
|
|
589
|
+
- **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).
|
|
590
|
+
|
|
591
|
+
### 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)
|
|
592
|
+
|
|
593
|
+
- **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.
|
|
594
|
+
- **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).
|
|
595
|
+
- **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).
|
|
596
|
+
- **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.
|
|
597
|
+
- **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.
|
|
598
|
+
- **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.
|
|
599
|
+
- **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)).
|
|
600
|
+
- **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`).
|
|
601
|
+
- **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.
|
|
602
|
+
- **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).
|
|
603
|
+
|
|
604
|
+
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)
|
|
605
|
+
|
|
606
|
+
## 7.60.0 — 2026-10-28
|
|
607
|
+
|
|
608
|
+
### 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)
|
|
609
|
+
|
|
610
|
+
- **Before.** The limits lived in five places (the single-image base64 limit, the 3.75 MB / 2000-px frame, the 5 / 64 MiB read caps, the 20 MiB URL body, the request budget). Two processor seats — `RunnerDeps.mcpImageResizer` (MCP) and `RunnerDeps.hands.readImageDownsampler` (Read, PDF pages) — each with its own sharp detection. The processor stopped at the frame ladder, so a 1206 × 2622 phone screenshot of 2.9 MB reached the model as a 920 × 2000 PNG of about 2 MB. PDF pages called the processor directly behind their own 5 MiB gate; MCP resized only above 5 MiB of base64 and spilled to disk otherwise; a Bash data URI over 5 MiB of base64 fell to the text path; the tool-result seat, `TaskSpec.images` and attachments admitted with no processor; a URL image was not admitted at all. Bytes with no processor went out on their base64 length alone, whatever their pixel size.
|
|
611
|
+
- **Now.** One table, `IMAGE_ADMISSION` (root export, frozen): `hard` = `formats` (the four header rows), `readBytes` (`withoutProcessor` 5 MiB, `withProcessor` 64 MiB), `urlBytes` 20 MiB, `rejectEdge` 2000, `imageBase64Chars` 5 MiB; `soft` = `frameEdge` 2000, `rawBytes` 3,932,160, `targetBytes` 512,000. `admitImageBytes(bytes, mime, processor)` takes the processor as a required `ImageDownsampler | "none"`: the hard checks, then the processor — the frame ladder, then the byte-target step (Claude Code 2.1.309's form: a non-JPEG tries JPEG quality 90 first, then at most five binary probes over [1, 89] — [1, 90] for a JPEG — keep the best quality at or under the target, else the smallest bytes seen; a failure of the step keeps the ladder's bytes) — then the base64 limit. What ships is the processor's bytes when they are one of the four formats, their type read off them (Claude Code's form; a processor's declared type is not taken), else the bytes as they came; whatever produced them, the bytes that ship must state their pixel size in their own header within `rejectEdge`, else `dimensions_unreadable` / `dimensions_too_large` (one sentence, `unprocessedSizeClause`, for every carrier) — a processor that hands the bytes back unchanged does not carry a frame past the edge. A processor runs once over bytes: what it shipped is remembered by digest (per processor, its latest 256), and those bytes admitted again — by the tool-result seat after a carrier, through the tool door's rebuilt block — take every hard check and no second encode, so a best-effort image (no quality reaches the target) is not re-encoded at each admission. Every carrier admits with the run's processor: Read, and a notebook's image outputs in the reader the Read tool and an attachment share (a refused one is a marker naming the refusal); PDF pages (their own gate retired); a Bash data URI (any size up to the read cap is admitted and compressed); MCP (its own resize retired — only bytes still over a hard limit after processing are spilled, any other refusal stays an image block for the seat's placeholder); the tool-result seat (every result's images); `TaskSpec.images` inline and by URL (the URL arm now passes the admission); attachments. An image inside the frame and at or under the target passes byte-identical, so the seat's second admission of what a carrier sent changes nothing. The seat is `RunnerDeps.imageProcessor?: ImageDownsampler | false` — a processor; `false` = none; absent = detect sharp once per process (`resolveImageProcessor`, one cache); any other value is refused at `new Runner` (`config.invalid_argument`). With no processor, the run's first image over the soft target — wherever it entered — emits `config.image_processor_unavailable` once (`detail: { bytes, targetBytes, sessionId, runId }`).
|
|
612
|
+
- **Hard-breaking ③ — the processor seats (open to veto).** *What changed*: `RunnerDeps.mcpImageResizer` and `RunnerDeps.hands.readImageDownsampler` are retired (refused at `new Runner` with `config.deps_retired_key`, naming the replacement); `sharpImageResizer` and `McpImageResizer` are removed; `materializeMcpTools`' fourth parameter is the seat's value (`ImageDownsampler | false`). *Who is hurt*: a deployment or test fixture that injected either seat — @test's `readImageDownsampler: false` fixture (repro core548); @server where it wires either. *Compensation*: set `RunnerDeps.imageProcessor` once — `false` keeps the no-sharp fixture's shape, an `ImageDownsampler` replaces either seat, `createImageDownsampler` / `sharpImageDownsampler` are unchanged.
|
|
613
|
+
- **Hard-breaking ④ — the constant exports (open to veto).** *What changed*: the root exports `MCP_IMAGE_MAX_BASE64` and `IMAGE_TARGET_RAW_SIZE` are removed. *Who is hurt*: @server — the entry check `src/http/admission.ts:9 / :178` no longer compiles; @client-core — `scripts/gen-upstream-tables.mjs:586 / :1045` (the tenth batch) reads a missing name. *Compensation*: read `IMAGE_ADMISSION.hard.imageBase64Chars` (the same 5,242,880 characters) and `IMAGE_ADMISSION.soft.rawBytes`; the other rows are named above; one pick-up car each.
|
|
614
|
+
- **Behavior narrowing, open to veto.** *Who needs it*: a deployment with no image processor — an image over 2000 px went out as it was, and the provider resized it or refused the request; the admission now refuses it at the source, naming its size and the limit (Claude Code 2.1.309's fallback arm refuses the same). *Who is hurt*: a deployment without sharp, or with `imageProcessor: false`, that sends images over 2000 px — Read, an attachment, a task image, a PDF page rendered over 2000 px; an MCP image of that size is spilled to disk with its path instead of inlined. A JPEG whose header states no frame size is refused when it would go on unprocessed. *Compensation*: install the optional `sharp`, or set a processor.
|
|
615
|
+
- **Behavior change.** An image the processor brings toward the target arrives as a JPEG (a PNG screenshot's mime changes).
|
|
616
|
+
- **Divergence candidate D-2987-a, open to veto (C-R974 addendum 2).** Every JPEG encode of the processor — the ladder's rungs and the byte-target step, one place — merges an alpha channel onto white first. Claude Code 2.1.309's `N$o` encodes with no merge, and sharp then drops the alpha onto black: a transparent PNG whose marks are dark (a line drawing, a logo, a diagram) became an all-black JPEG; the old ladder did this only above 3.75 MB, the byte-target step would have done it above 512,000 B. A frame with no alpha is unchanged.
|
|
617
|
+
- **Divergence candidate D-2987-b, open to veto (C-R974 addendum 3).** The processor auto-orients before re-encoding (Claude Code 2.1.309 does not): a frame whose header asks to be shown turned (EXIF orientation 2–8) is turned upright once, at the top of the processor, before its size is read or anything re-encodes it, so the frame, the dimensions and the coordinate caption are the upright ones and the tag is gone. Without it a re-encode drops the tag and a phone photo reaches the model sideways — the old ladder re-encoded only above 3.75 MB, the byte-target step re-encodes every photo above 512,000 B. A frame with orientation 1 or none is unchanged.
|
|
618
|
+
- **Not in this change (with #2988).** The request-budget rows (`mediaByteCapBytes` → `mediaBudgetBase64Chars`), the retirement of `onMediaStripped` and the rename `context.image_removed` → `context.media_removed`.
|
|
619
|
+
- **Consumers.** @server: the entry check reads `IMAGE_ADMISSION.hard.imageBase64Chars`; a deployment that wires a processor sets `RunnerDeps.imageProcessor`; `config.image_processor_unavailable` joins the operator notices. @client-core: the generated table reads `IMAGE_ADMISSION.hard.imageBase64Chars`. @cli: no code reads either name; L-2122 waits on #2988. @test: fixtures move to `imageProcessor: false`; the two refusal words and the notice code are new.
|
|
620
|
+
- **Pins.** `test/backlog2987-image-admission-one-processor.test.ts` (a deterministic encoder under the production pipeline: the 2.9 MB screenshot leaves Read, an attachment, an inline and a URL task image, MCP, a Bash data URI, a rendered PDF page and the tool-result seat at or under 700,000 base64 characters; over the old 5 MiB pass-through it is compressed by MCP and Bash, not spilled or dropped; a second admission is byte-identical, and a best-effort image passes MCP or Read then the seat with no second encode while other bytes in the same block are encoded; a pass-through processor does not carry a 3000 × 10 frame past the edge; a processor's mislabeled or non-image answer is not shipped; every JPEG encode merges alpha onto white; a notebook's image output is framed by the reader, refused as a marker with no processor, and rides byte-identical inside the frame and the target; no processor and a 2622-px edge ⇒ `dimensions_too_large` by every carrier, a failing or throwing processor alike; no frame header ⇒ `dimensions_unreadable`; `false` ⇒ none, the bytes ride unchanged and one notice per run across two tool results and a task image, a processor ⇒ none; the retired seats refused by name, a bad seat value refused; type pins). `test/image-downsample-real-sharp.test.ts` (real sharp: the byte-target step on a noisy frame and a screenshot-shaped PNG; a fixed point; a transparent PNG's dark marks survive the JPEG encode; an EXIF-orientation-6 camera JPEG comes out upright with no tag, orientation 1 untouched; a best-effort black-and-white frame passes the seat unchanged). Re-pinned: `test/read-image-pipeline.test.ts`, `test/mcp-content-mapping.test.ts`, `test/backlog1719-media-admission-one-seat.test.ts`, `test/backlog1829-engine-below-tools.test.ts`, `test/backlog2874-image-reject.test.ts` and `test/backlog1795-time-cut-consumers.test.ts` (their JPEG fixtures state a frame size), the toolkit-option fixtures (`imageProcessor: false`), `test/public-knob-liveness.test.ts`, `test/export-surface.snapshot.json` (−4 +1), `test/skip-baseline.json` (the real-sharp names), `test/backlog1279-child-undrained-to-parent.test.ts` (109 codes).
|
|
621
|
+
- **A tool result with no media awaits nothing.** The tool-result seat reads the executed call's content once (`toolResultMediaBlocks`) and resolves the run's processor only when a block claims media (`admitToolResultMediaBlocks`); a call whose result carries none no longer waits on the absent seat's one-time detection of sharp (a dynamic import — real I/O on the first tool call of a process, which a fake clock cannot advance). Behavior unchanged. Pins: `test/walltime-telemetry.test.ts` (件2a, both cells) and `test/backlog258-cycle-seq-outline.test.ts` ((1b) F3), red on the stage merge and green again. (#3078)
|
|
622
|
+
|
|
623
|
+
### A resumed approval runs exactly the bytes the person approved: the resumed leg's PreToolUse re-screen no longer hands back the bytes that run (#2975; approval integrity, aligned with Claude Code; behavior change open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @test @cli)
|
|
624
|
+
|
|
625
|
+
- **Before.** On a durable resume the approved call's `classic.PreToolUse` re-screen supplied the bytes that ran. For an unedited approval the hook's rewrite ran in place of the bytes the person approved, so a rewriter that is not idempotent (one that appends a mark on every application) was applied twice: `tool_start.args` named one form and the tool ran another. A rewrite of the person's edit refused the call instead (since 7.56.0, #1022).
|
|
626
|
+
- **Now.** The re-screen has three outlets: a refusal (deny, crash, silence, an answer outside the contract, a person-only ask under a policy decide), an ask (the decide already answered it) and `additionalContext`. Its `updatedInput` is not adopted, for an edited approval and an unedited one alike. What runs is the decide's approved bytes — the edit, or the call as shown — and `tool_start.args` is those bytes, held as one engine-owned frozen value: a host that writes into the start frame's `args` while the re-screen waits no longer moves what runs. The tool itself gets a detached copy, as a live call does, so a preparation that edits its input in place still works. This is Claude Code 2.1.309's form for a permission answer that arrives after its turn: the call passes the PreToolUse hooks again, and the answer's own input is what runs. Nothing announces the dropped form.
|
|
627
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* approval integrity — the executed bytes are the approved bytes. *Affected:* a deployment whose PreToolUse handler enforces by rewriting instead of denying on the resumed leg. That covers a rewrite it would add only after the park (a handler installed or changed between park and resume) and a rewrite of a person's edit: neither reaches the call any more. The handler can still deny or ask there. A rewriter that is not idempotent is no longer applied twice. *Compensation:* the park leg's screening already folded its rewrite into the bytes the person approved, so an idempotent rewriter sees no change, and a resume-time guard keeps its deny. *Not taken:* refusing the call whenever the re-screen hands back other bytes. That would refuse every resume under a rewriter that is not idempotent, and a re-issue could never converge.
|
|
628
|
+
- **Consumers.** @server (mods hosts): a PreToolUse rewrite that must hold for a resumed approval belongs on the park leg, or becomes a deny. @test: K9b's construction now runs the call once on the approved bytes (sha256 of the executed args = of the row's = of `tool_start.args`). @cli: nothing new to render.
|
|
629
|
+
- **Pins.** `test/backlog2975-approved-bytes.test.ts` (a fresh Runner redeems a park: a non-idempotent and an idempotent rewriter both run the approved bytes once; a person's edit runs as written; deny / ask / context outlets beside a dropped rewrite; a write into `tool_start.args` during the re-screen does not land; an in-place preparation runs on a resumed call; controls with no handler and a watching one). Re-pinned to the new reading: `test/backlog1294-approved-call-hooks.test.ts` ③c ③d ⑨b ⑪, `test/backlog1022-rewrite-recheck.test.ts` R10 R12, `test/backlog1974b-keyless-and-unreadable-resume.test.ts` ⑥, `test/backlog1328-parked-skill-rescreen-swap.test.ts` ① ③ ④ ④b ⑥ ⑦ ⑧b ⑨ ⑨b (a re-screen's skill swap is dropped and the card's skill activates), `test/backlog1391-approval-object.test.ts` B6 SH-h K-sur K-sur-key (the approved destination / command / value runs).
|
|
630
|
+
|
|
631
|
+
### A memory sync round's peer is the identity its transport carries, and a cursor taken against another peer is refused before it can delete local entries (#2968, P1 data loss; C-R969 addendum 1 Q3 A; hard-breaking: `MemorySyncTransport` is `{ peer, post }` and `SyncMemoryScopeOptions.peer` with its `"central"` default is gone, three sentences below, open to veto; closed sets: none — the refusal reuses `config.memory_sync_cursor_mismatch`; exports: none added or removed, `MemorySyncTransport` changes kind type → interface) (@server @client-core)
|
|
632
|
+
|
|
633
|
+
- **Before.** `syncMemoryScope` took its peer from `opts.peer`, else the cursor's own `peer`, else the constant `"central"`, and the transport was a bare `(path, body)` function with no identity. A deployment that never sets `peer` (the server's sync runner) bound every cursor to `"central"`, whichever center its transport reached. Re-point the transport (a new `MEMORY_SYNC_URL`, another engine declaration) and keep the layer's cursor: the judge compared the cursor's peer with a value read from that same cursor and passed; the new center, not holding the baselined entries, read each as deleted centrally and unchanged on the device and answered it in `serverDeletes`; the client CAS-checked it against the same baseline and deleted the entry locally — every entry left unchanged on the device since the last round was gone. Reproduced against an in-process twin of the server's round (the same pure reconcile it imports): request `{ peer: "central", baseRevs: { X }, entries: [], deletes: [] }` → `serverDeletes: [X]` → local delete, empty local plane; the same center as control deletes nothing.
|
|
634
|
+
- **Now.** `MemorySyncTransport` = `{ readonly peer: string; post(path, body): Promise<unknown> }`. `peer` is the identity of the peer `post` reaches (for a central sync API, its base URL in the deployment's normalized form) and the round's only source of its peer: the request's `peer`, the returned cursor's `peer`, and the value a persisted cursor is judged against. A cursor for another peer — or one with no peer binding — is refused with `config.memory_sync_cursor_mismatch` (the judge and code that already covered scope and store) before any read or request, and the sentence names two ways out: (1) re-bind — run the layer over a transport that reaches the peer the cursor was taken against, or, only when this transport reaches that same peer under a new identity, set the cursor's peer to that identity; (2) drop the cursor to accept re-convergence from an empty baseline — entries changed on both sides are reported as conflicts, and entries deleted on one side since the last round come back from the other side. The round never re-binds or drops a cursor itself. A transport without a non-empty string `peer` — the previous function shape included — is refused before any read or request (`memory sync: transport.peer must be a non-empty string …`). The identities are compared raw and quoted through the same-principal egress pass, in the refusal and in the protocol error a response cursor answering for another peer raises: a URL credential reads `[redacted-credentials]`.
|
|
635
|
+
- **Hard-breaking, open to veto (@server).** *What changed*: `MemorySyncTransport` is an object with `peer` and `post` (it was a function); `SyncMemoryScopeOptions.peer` and the `"central"` default are gone, so a round's peer can no longer come from anywhere but its transport. *Who is hurt*: @server — `createMemorySyncTransport` (`src/memory-sync-client.ts`) returns the function shape and must return `{ peer, post }`; the `peer` option of `createMemorySyncRunner` and `DEFAULT_MEMORY_SYNC_PEER` lose their reader; both wiring sites (`src/boot/stores.ts` and `src/run-local.ts`, which never set a peer) build the transport; every cursor file persisted under `sync-cursors/central/…` holds `peer: "central"`, which the new identity will not equal; the central side's request `peer` (`parseMemorySyncRequest`, at most 190 characters) changes from `"central"` to the identity, so the `sync_cursors` rows it writes get a new partition value. *Compensation*: the compile error names every call site; the identity is the deployment's to mint (normalize the base URL once, keep credentials out of it — it rides the wire, the cursor and refusal sentences); an existing `"central"` cursor must still be handed to the round — looking it up only under the new identity's path and finding nothing runs an empty-baseline round nobody chose, the reconvergence C-R967 refuses to run unasked — where it is refused with the two ways out, so the operator re-binds it after confirming it was taken against the current center, or deletes it; nothing re-binds it automatically (that would stamp a cursor of unknown origin as this center's and run the deletion path above). The runner's own downgrade of a peer-mismatched cursor to a first round (`loadCursor` → `cursorOf`) goes for the same reason. If the C-R967 operator step ships in the same window, it can be one step.
|
|
636
|
+
- **Consumers.** @server as above. @client-core: no `syncMemoryScope` / `MemorySyncTransport` reference in its source (origin/main `45c9279`); the refusal it may relay through the server keeps its code. @cli: one test string names `syncMemoryScope` in prose; no call.
|
|
637
|
+
- **Known limit (stated).** The identity is what the deployment says it is. One center reachable under two identities (an alias host, a port change) reads as two peers and is refused — the safe side, answered by way out (1). A different center behind the same identity (a central store wiped and rebuilt at the same address) reads as the same peer, and the deletion path above stays open for that form until a center can state its own incarnation. The engine takes `peer` at its word (read once per round): a transport whose `peer` names one center while its `post` delivers to another passes the judge, and that other center's `serverDeletes` land — the judge cannot see where `post` sends. The backstop is the server's local-side door, which compares the engine the session goes to with the peer its sync leg reaches (`config.memory_sync_target_mismatch`, design/2897 §2); the engine adds no second reading of the identity (KL-2968-a).
|
|
638
|
+
- **Pins.** `test/backlog2968-sync-peer-binding.test.ts` (a real File store, an in-process twin of the server's round per center): same peer runs and carries the identity on the wire and in the cursor; another peer is refused with zero requests and zero backend calls, the entry stays, both ways out in the sentence; way out (2) pushes and deletes nothing; way out (1) back to the cursor's peer runs, and the same center under a new identity runs once the cursor's peer is rewritten; an upgrade cursor holding `"central"` against an empty new center is refused with zero requests; a cursor with no peer binding is refused, never run as an empty baseline; a transport with no identity (function shape, missing, empty, non-string) is refused before any read; an identity carrying a URL credential is never quoted — in a cursor it is another peer, on the transport it is refused before any request (#3020), in a response cursor it is a protocol error; a response cursor answering for another peer stays a protocol error with no local write. `test/memory-sync-client.test.ts`, `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` and `test/design336-origin-carriage.test.ts` build `{ peer, post }`; the liveness row for the retired option is gone (`test/public-knob-liveness.test.ts`); `test/export-surface.snapshot.json` records the kind change.
|
|
639
|
+
|
|
640
|
+
### A memory sync round is reported one way — `memorySyncReportOf` folds each layer's calls to one outcome, a refusal carries its axis and its two ways out from one table, and `memoryTravelGapOf` reads what did not travel from that report alone (#2969, design/2897 S1, C-R969 and its addenda 1 / 2; behavior change: the cursor and store refusal sentences are worded from one table — codes unchanged, the error gains `detail` and `outs`; hard-breaking: none; closed sets: the round report's own refusal codes, two — `config.memory_sync_target_mismatch` (new, worded by the engine) and `session_active` (the server's code and sentence); exports: +2 root values `memorySyncReportOf`, `memoryTravelGapOf`, +2 root types `MemorySyncLayerReport`, `MemorySyncRoundReport`) (@server @client-core @cli)
|
|
641
|
+
|
|
642
|
+
- **Before.** A host that ran a round read `syncMemoryScope`'s result by hand: `ok` (which is true on a clean round that `maxPushEntries` or the server's `pull.limit` cut — `ok` does not look at truncation), the two truncation flags, `conflicts`, and for a refusal the error's `code` and a sentence whose ways out lived only in its words (one function per axis, and a separate sentence for the store plane). Each consumer would have assembled its own reading of "did this layer arrive".
|
|
643
|
+
- **Now.** `memorySyncReportOf({ target, sourceRevision, scopes, layers | refused })` is the one reading. `layers` lists each `syncMemoryScope` call as it settled — `{ scope, result }` or `{ scope, thrown }`, a layer continued after a cut once per call, in order — and each layer folds to one outcome: `synced` (the last call `ok` and nothing withheld for a later call), `incomplete` (`why: "conflicts"` with the last call's conflicts, or `why: "truncated"` — a half cut under a limit, or an entry the server advanced in its cursor without delivering it, which the call keeps at its old baseline and discloses in `warnings`; `ok` looks at neither), `refused` (a refusal the engine minted: `code`, `detail`, `outs`, `message`), `failed` (anything else thrown — a transport or protocol error, a bad argument — as `error`). Every text in the report the engine did not mint — a conflict's `reason` from the server, an applied entry's `slug`, a warning, a thrown message — passes the same-principal egress pass; ids and revs are carried as they are; a name the report carries verbatim (`target`, `sourceRevision`, a scope key, the `reaches` of a target mismatch) that holds a credential is refused with a `TypeError` that does not quote it — the same test as the transport's `peer` (#3020). The last call decides the outcome; all four outcomes carry `applied` (`{ server, local }`, verbatim) — what every call of the layer returned as landed, in order — so a layer continued and then refused or failed still reports what its earlier calls landed (a refused call lands nothing; a call that throws returns no account of what it landed, #3047). A replay lands nothing and is still `synced`: whether a layer arrived is its outcome, never its counts. `refused` instead of `layers` is the round's own refusal, no layer run: `{ code: "config.memory_sync_target_mismatch", reaches }` (the machine's sync reaches another peer than the engine the session goes to — the engine words the sentence) or `{ code: "session_active", message }` (the host's code and sentence). `memoryTravelGapOf(report, readAtDestination?)` lists every scope of the read set that did not arrive whole, once, with why — `refused`, `failed`, `incomplete`, `not_replicated` (no layer run for it), `not_read_at_destination` (synced, and the destination's read set, when given, does not hold it); it reads the report alone, so a party that knows no scope key (the shell) can call it on the report it was handed, and the same report after a JSON round trip gives the same gap. The quarantine is a control-plane directory with no key: no sync round reads it and no read set holds it, so its bytes reach neither the wire nor the gap.
|
|
644
|
+
- **Refusal detail.** `config.memory_sync_cursor_mismatch` gains `detail: { axis: "scope" | "peer" | "store", found: "absent" | "other" }` (`absent` = the cursor carries no binding on that axis — for the store, a cursor written before cursors carried one; `other` = it carries another value) and `outs` (the two ways out); `config.memory_sync_store` gains `outs`, no `detail`. Ways out come from one table, one row per thing a round is refused on: the way out depends on the axis alone — absent and other are answered alike, which of the two it was rides `detail.found` — so the store axis's pair (rebind / clear, #2957) answers both the moved store and the legacy cursor, and the peer axis's pair (re-bind / drop, #2968) both a cursor for another peer and one with none. The sentence is `memory sync: <what was found> — <why>; two ways out: (1) <outs[0]>; (2) <outs[1]>`, built from the same row, so `outs` and the sentence cannot disagree. A value it quotes that holds a credential (a URL with userinfo, or anything the same-principal pass would redact) is quoted as `[redacted-credentials]` alone, never as a cleaned copy — a password with a quote in it is spelled out by no redaction pattern; the protocol error for a response cursor that answers for another peer quotes the same way. Only a refusal the engine minted reads as `refused`: an error that merely carries one of the codes (a transport's own) is `failed`.
|
|
645
|
+
- **Consumers.** @server (S-2540): the local-side door answers with `memorySyncReportOf`'s report — the read set = the session's latest settled leg's `effectiveMemoryScopes` (`done.result`; mounted → its scope keys, none / memoryless → `[]`), never the normalized `TaskSpec.memory` (which says what the session asked to read, not what it reads; C-R969 addendum 3), one entry per call per layer, the target mismatch and the in-flight fence as `refused`; the executor's own pre-judgment of a cursor without a store and its sentences can read `detail` / `outs` instead (S2). @client-core (CC-1052): map `why` from the report — `incomplete` → `memory_sync_conflict`, `failed` → `transport`, plus `refused` and the round's refusal; one message for `config.memory_sync_target_mismatch` in the catalog. @cli (L-2149 ①′): the fork step's memory sync reads the report's outcomes and `memoryTravelGapOf(report)` — "these layers are not readable in the cloud yet" — and treats `refused` / `failed` as failure (relay `outs`, no retry for `refused`).
|
|
646
|
+
- **Exports (S-2540 D-8, #3046, C-R991).** +1 root value `carriesCredential` — the one test the sync client and its report already use for a name a sync carries verbatim (a peer identity, a target, a scope key): a URL with any userinfo (a bare user name included), or anything the same-principal egress pass would redact. @server judges `target` / layer names / the centre's `peer` with it and never re-derives it (the consumer smoke list records it). The in-flight fence code is `session_active` — the host's own 409 code — not `conflict.session_active` (design/2897 r1 :52 named a code the host never had; renamed before this member ever shipped, so no reader changes).
|
|
647
|
+
- **Known limits (stated).** The report is as true as the calls the host hands it: a call left out is a layer reported `not_replicated`, never a guess. `localOnly` (the `userlocal:` layer, design/2897 S3) is not in this report yet; it lands with the key family (#2970).
|
|
648
|
+
- **Pins.** `test/backlog2969-sync-round-report.test.ts` (a real File store, real `syncMemoryScope`, transports that count their calls): a clean round cut by `maxPushEntries` is `incomplete/truncated`, the continued round `synced`, the two calls fold to one layer holding both rounds' `applied`; a replay is `synced` with nothing applied; server conflicts are `incomplete/conflicts`; a server that advances its cursor past an entry it did not deliver is `incomplete/truncated` and the scope stays in the gap; a server's conflict reason, an applied slug and a warning carrying a token reach the report redacted; a credential-bearing target, scope key or `reaches` (a quote inside the password included) is refused unquoted; a cursor with no store binding is refused with zero requests and zero store reads, `{ store, absent }`, its outs verbatim in the sentence and equal to the moved store's; a moved store is `{ store, other }`; all six axis × found pairs read their axis's row; the store plane has its own row; a transport error carrying a refusal code is `failed`; a credential in a cursor's peer is redacted in the sentence; a gate-failing file is quarantined and the round's request carries none of its bytes; every way a call settles has one outcome, a secret in a thrown message is erased; the gap over a refused round, a scope with no layer, each outcome and a destination read set, and after a JSON round trip; the round's refusals and bad inputs (`TypeError`), and a report the engine could not have minted (a layer with no scope, outside the read set, listed twice, an outcome it does not read) refused by the gap; the two root values are the leaf's. `test/backlog2957-sync-store-move-refused.test.ts` builds `{ peer, post }` and keeps its scope-axis cell (the peer axis is #2968's); `test/export-surface.snapshot.json` +4; `scripts/consumer-smoke-probe.mjs` decides the two values.
|
|
649
|
+
|
|
650
|
+
### A memory sync transport's `peer` is refused when it is only whitespace or carries a credential — userinfo in a URL, or anything the same-principal egress pass would redact (#3020, with #2968; behavior narrowing, open to veto; hard-breaking: none beyond #2968's transport shape; closed sets: none — the transport refusal keeps its sentence family, no code; exports: none) (@server)
|
|
651
|
+
|
|
652
|
+
- **Before.** The transport's `peer` was checked for a non-empty string only. `" "` ran a round (one request, a cursor bound to `" "`); `https://ops:<password>@host` rode the request body and the persisted cursor verbatim, though the contract says the identity is never a credential.
|
|
653
|
+
- **Now.** Before any read or request, a `peer` that is only whitespace is refused with the empty peer's sentence (`memory sync: transport.peer must be a non-empty string …`), and one that carries a credential — a URL with userinfo (a bare user name included: the slot is the credential's) or anything the same-principal egress pass would redact (a token in a query, a vendor key) — is refused with `memory sync: transport.peer [redacted-credentials] carries a credential …` — the identity itself is never quoted. The identity is refused, never cleaned: a cleaned identity is another identity, and the cursor taken under it would not be this peer's. A plain base URL, one with a port or a path, and an opaque identity run as before.
|
|
654
|
+
- **Behavior narrowing, three sentences (open to veto).** *Who needs it*: anyone whose sync cursors and request bodies are stored or logged — the identity rides both verbatim. *Who is hurt*: a deployment that builds the transport's identity from a URL with credentials in it (@server `createMemorySyncTransport`, which #2968 already asks to mint the identity from the normalized base URL without credentials). *Compensation*: the refusal comes before any read or request, so nothing is sent or written; the fix is the identity's mint, once.
|
|
655
|
+
- **Pins.** `test/backlog2969-sync-round-report.test.ts` (#3020 / #2968 follow-up cells): `" "`, `"\t\n"` and `""` are refused alike with zero requests and zero store reads; a URL with a password, one with a bare user name, a non-http URL with userinfo, and a URL with a token in its query are refused, quoted redacted, zero requests; a password holding a quote is absent from the refusal on the transport, the cursor refusal and the response-cursor protocol error alike; a plain base URL, one with a port and a path, `"central"` and an opaque `engine:` identity run and bind the cursor to themselves. `test/backlog2968-sync-peer-binding.test.ts`: a credential-bearing identity on the transport is refused — also against a cursor holding the same string.
|
|
656
|
+
|
|
657
|
+
### A `tool.call` extension that fails once the tool ran withholds the result, and a `classic.PostToolUse` raise that cannot hand the result to its handlers withholds it too — kernel contract 6, `tool.call`'s failure column is `refuse` (#2675; security narrowing, open to veto; hard-breaking: yes, open to veto; closed sets: none; exports: none) (@server @dgx @test)
|
|
658
|
+
|
|
659
|
+
- **Before.** `tool.call`'s failure column `refuse_until_run` refused a call while the body had not started and, once it had, let the body's real result through with the failure reported beside it: a checking extension that crashed, overran or broke the form after `next(e)` left the result it was there to check in the model's context. `classic.PostToolUse` swallowed a dispatch that could not be raised for a result and passed the original result on (the gap CC 2.1.299 closed: "a tool that already ran has its result withheld").
|
|
660
|
+
- **Now.** A `refuse` station refuses on a handler's failure whether or not its bottom has started, and the dispatch's `failed` outcome carries `bottomStarted: true` when it had (as `aborted` already did); `refuse_until_run` stays the column of a go-ahead bottom (`agent.spawn`, whose subagent starts only after the station answers). `tool.call` — column `refuse` — withholds the result of a body that ran: `isError`, "a tool.call extension … after this call to "<tool>" ran: a hook that checks this result could not hand back its answer, so the result is withheld — the call ran (fail-closed)", the gate's allow and no `notExecuted` (the call ran; it stays in the PostToolBatch; the failure is on `onError`). The call settles only once its body has (a handler that failed while its `next(e)` still runs waits for it), and a frame the result carried (a ReadInbox message) is withheld with it — never handed over again through another lane. A body that threw produced no result: its throw stands. The withholding sentence names the extension and what it did, never the bus's reason (a thrown message may quote the result) — the reason is on `onError`. `classic.PostToolUse` withholds a result the bus refused to raise or whose dispatch broke (content replaced, `details` emptied); a PostToolUse handler that fails is still skipped and the result kept.
|
|
661
|
+
- **Hard-breaking (open to veto).** *What changed:* `MOD_EVENT_TABLE["tool.call"].station.failure` is `refuse` (was `refuse_until_run`); `KERNEL_CONTRACT_VERSION` is 6 (one number with the 7.60.0 kernel additions); a result a late-failing `tool.call` extension let through is withheld. *Who needs it:* a deployment whose `tool.call` or PostToolUse extension checks results (a redactor, a data-loss filter) — its failure no longer hands the model what it was checking. *Who is hurt and how to migrate:* code that reads `tool.call`'s row as `"refuse_until_run"` reads `"refuse"`; a host pinning the contract number re-pins 6; an extension that answered `{ deny }` or `{ result }` after `next(e)` now sees the result withheld instead of standing — answer before `next`, or hand on what came up.
|
|
662
|
+
- **Consumers.** @server @dgx: the mods-kernel package face (the `tool.call` row, the contract number); no wire key changes. @test: a fixture reading a result through a late-failing `tool.call` handler re-pins to the withheld sentence.
|
|
663
|
+
- **Pins.** `test/backlog2675-withheld-after-run.test.ts` (real Runner: a throw, an overrun, a non-data answer and a late deny after the body ⇒ withheld, ran once, allow + no `notExecuted`, named on `onError`; before the body ⇒ refused; a body's throw stands; a PostToolUse raise that could not be given the result ⇒ withheld; a throwing PostToolUse handler ⇒ skipped; the call stays in the batch); re-pinned `test/mods-tool-call.test.ts` C2 / C3 / C7 / L5 and `test/mods-kernel-wave2.test.ts` (failure answers, contract 6).
|
|
664
|
+
|
|
665
|
+
### Edit, Write and NotebookEdit refuse a file that is not valid UTF-8 instead of rewriting its every undecodable byte as U+FFFD (#2676; security narrowing — data loss, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
666
|
+
|
|
667
|
+
- **Before.** Encoding detection was BOM-only and a body read as UTF-8 was never checked: a Windows-1252, Shift-JIS or GBK file decoded with each legacy byte as U+FFFD, Read showed it (when under its binary threshold), and an Edit — or a Write over it, or a NotebookEdit — wrote the whole file back as UTF-8 with every such byte replaced by EF BF BD (the loss CC 2.1.296 / 2.1.299 closed by refusing).
|
|
668
|
+
- **Now.** The decoder's one "cannot be written back byte for byte" fact (`malformed`, which already named a truncated UTF-16 body) has a second why, `not_utf8`, and every write lane refuses on it: "… is not valid UTF-8: it uses an older encoding such as Windows-1252, Shift-JIS or GBK, or it is binary. … nothing was written", with the ways out (a shell command that keeps the encoding, asking the user to convert, or delete-then-Write). Read is unchanged; a valid file that holds U+FFFD itself edits as before.
|
|
669
|
+
- **Consumers.** none to change; a host that relied on an Edit converting a legacy file to UTF-8 now gets the refusal.
|
|
670
|
+
- **Pins.** `test/backlog2676-not-utf8-write-lanes.test.ts` (Windows-1252 Edit / Write / NotebookEdit refused with the bytes untouched; Shift-JIS and a BOM'd file with a legacy byte; controls; the decoder's fact).
|
|
671
|
+
|
|
672
|
+
### An `rm` that walks into a mounted drive is a protected removal — `dangerous_delete` for the folder that holds drives, a drive, or an entry at a drive's top level (#2674; security narrowing, open to veto; hard-breaking: none; closed sets: none — the kind is the card's sentence, not a wire word; exports: none)
|
|
673
|
+
|
|
674
|
+
- **Before.** The protected locations were the filesystem root, a home, a workspace directory or its ancestor, and a top-level directory: `rm -rf /Volumes/USB`, `rm -rf /mnt/c/Users`, `rm -rf /media/alice/USB` and `rm /Volumes/USB/*` were ordinary removals an allow rule cleared and bypassPermissions released (the gap CC 2.1.304 closed).
|
|
675
|
+
- **Now.** The one dangerous-removal predicate reads one more kind for an `rm` that walks what it removes — a recursive option in its row's reading of the argv, or an operand naming every entry of a directory: `/Volumes` and `/System/Volumes` down to `<drive>/<entry>`, `/mnt/<drive>` and `/mnt/<letter>/<entry>`, `/media` and `/run/media` down to `<user>/<drive>/<entry>` (folded case, POSIX paths). The card says "would remove a mounted drive, the folder that holds mounted drives, or a file or folder at the top level of a drive … if you meant something deeper inside, name it by its full path"; it is the `dangerous_delete` class every protected removal mints, which no mode, rule or classifier answers. A non-walking `rm` of one file, `rmdir`, and anything deeper read as before.
|
|
676
|
+
- **Consumers.** none to change (one more sentence on an existing class).
|
|
677
|
+
- **Pins.** `test/backlog2674-mounted-drive-removal.test.ts` (real Runner: nine walking removals × three modes × with and without `Bash(rm:*)`; five controls an allow clears; an unsettled program word read as `rm`; the predicate's roots, walk condition, folds and win-form paths; `/Volumes` itself stays top-level).
|
|
678
|
+
|
|
679
|
+
### A background fork started without a description shows no part of a credential from its prompt (#2678; security narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
680
|
+
|
|
681
|
+
- **Before.** The description shown for a background fork (`Agent` with `subagent_type: "fork"`) with an empty description was the prompt's first 180 characters, cut BEFORE any redaction: a cut that landed inside a key left a head shorter than any recognizer reads (`AKIA` + nine characters), and that head passed every later pass into the registry row, the launch receipt and the completion notification (the gap CC 2.1.299 closed for teammates).
|
|
682
|
+
- **Now.** The description — or, with none, the prompt — goes through the same-principal egress pass first and is cut after it, the law every bounded operator line already keeps. A clean prompt reads exactly as before.
|
|
683
|
+
- **Consumers.** none to change.
|
|
684
|
+
- **Pins.** `test/backlog2678-fork-description-redaction.test.ts` (empty and blank descriptions over a prompt whose head ends inside a key: no piece of the key in the receipt, the registry row or the notification; a clean prompt and a given description read as before).
|
|
685
|
+
|
|
686
|
+
### The no-run MCP probe judges a declared endpoint by the deployment's host floor — `McpProbeOptions.hostFloor` (#2677; security narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none — a member of an exported type) (@server)
|
|
687
|
+
|
|
688
|
+
- **Before.** `probeMcpServers` had no floor seat: it dialed every declared http endpoint with no floor, so a health check contacted a server a task under `RunnerDeps.hostFloor` refuses to contact (the gap CC 2.1.299 closed for `claude mcp list` / `get`).
|
|
689
|
+
- **Now.** `McpProbeOptions.hostFloor` takes the declaration `RunnerDeps.hostFloor` takes, compiled by the one compile (a declaration that does not read is refused `config.host_floor_invalid` before anything is dialed) and judged at the one dial: a refused endpoint is never contacted and its row reads `failed` / `invalid_config` with the sentence a task's warning carries. A delegated leg's servers already read the run's floor (the child's spec goes through the same preparation).
|
|
690
|
+
- **Consumers.** @server: pass the deployment's `hostFloor` to `probeMcpServers` wherever the health check runs beside a Runner that declares one — absent, the probe still dials with no floor.
|
|
691
|
+
- **Pins.** `test/backlog2677-probe-host-floor.test.ts` (deny and `only` never contact the endpoint; controls contact it; a floor that does not read is refused before any dial; the probe's row and the Runner's warning carry one sentence).
|
|
692
|
+
|
|
693
|
+
### A key behind an escaped quote names its value: JSON written inside a shell string is redacted like the bare object (#2679; security narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
694
|
+
|
|
695
|
+
- **Before.** The keyword row of the credential vocabulary took a bare `"` / `'` on either side of its separator, so `echo "{\"secret\":\"…\"}"` and `bash -c "echo {\"api_key\":\"…\"}"` left `redactSecrets` / `redactHostLeaks` — and every engine face that reads the same-principal pass — with the value in clear, while the bare `{"secret": "…"}` was redacted (the gap CC 2.1.296 closed for shared transcripts and debug logs).
|
|
696
|
+
- **Now.** The quotes around the separator are read the way the `Authorization` header row reads them — a quote behind up to 63 backslashes — so an escaped key, at any depth the escape reading follows, names its value as the bare key does. No new row and no second reading of an escape.
|
|
697
|
+
- **Consumers.** none to change; a host that pins the exact output of `redactSecrets` over such text now sees the value replaced by the marker.
|
|
698
|
+
- **Pins.** `test/backlog2679-escaped-key-quote.test.ts` (three shell-string forms × both tiers; two escape layers; controls; a key with no value then a keyed value; idempotence).
|
|
699
|
+
|
|
700
|
+
### The peer seat is told what the engine keeps — `RunnerDeps.peerSeat` is one object `{ answer, hold, release }`, and the engine holds each credential reference from the moment it takes a declaration naming it until nothing it keeps can dial with it (#2864; hard-breaking, open to veto)
|
|
701
|
+
|
|
702
|
+
- **Before.** `PeerSeat` was a function `(question, signal) => Promise<PeerAnswer>`: the seat was asked per send and told nothing else. A deployment that registers a credential behind the opaque reference it hands the engine could not know when the engine had stopped needing it — a session-scoped background child, a retained child revived later in the process and a cascade's rungs all kept asking after the call that handed the declaration had returned, so the registration's lifetime could only be guessed (by session deletion, by run id, by process lifetime) and each guess was wrong for one of them.
|
|
703
|
+
- **Now.** The seat is `{ answer(question, signal), hold(ref), release(ref) }`, all three required. An engine object that keeps a declaration it can still dial from calls `hold(ref)` once for each distinct reference its declarations name and `release(ref)` once for each it held. Two keepers: a run leg — from the `runTaskStream` call (fresh, resumed, child, cascade rung and repair attempt alike) until its stream has settled, through the failure backstop included — and a retained child's ledger entry — from its registration until it leaves the ledger (eviction, abandonment, replacement; a row not taken releases at once). A taker holds within the call its giver is alive for, so a reference handed along is never unheld in between. The engine counts nothing (two keepers of one reference are two holds); a checkpoint and a background-agent row keep no declaration. A leg's `mcp` / `a2a` lists are received once, at the call, by the door's own receipt (each list read once, each entry a frozen copy — a getter on a declaration now runs at the call, once, not after the leg's session lock): the leg holds what that copy names and its door judges that same copy, so what a leg holds and what it dials are one read. A `hold` that throws or whose promise rejects is reported (`onError`, phase `config`, classification `peer-seat-hold`) in the engine's words and gets no `release`; a `hold` that returns a promise is held once it fulfils (a release due before then is sent then). Scope: this process; no registration across processes is assumed.
|
|
704
|
+
- **Hard-breaking (open to veto).** *What changed:* `PeerSeat` is an interface of three required members instead of a function type, everywhere it is taken (`RunnerDeps.peerSeat`, `materializeMcpTools`' twelfth parameter, `materializeA2aTools`' fifth, `probeMcpServers({ peerSeat })`); a function — the 7.59.0 form — is refused there (`config.invalid_argument`, naming the form); `RunnerSelfSeat` gains a required `holdDeclarations(declared)`. *Who is hurt:* a deployment that implements the seat (tsc red; at run time `new Runner` refuses), and a hand-built `RunnerSelfSeat` (tsc red). *What to do:* put the former function under `answer` and add `hold` / `release` (no-ops for a seat that keeps no per-reference state; a counting seat reads "more holds than releases" as "the engine still has a consumer"); a hand-built `RunnerSelfSeat` forwards `holdDeclarations` to the Runner it stands for — one cast past the compiler without it is refused by name (`config.invalid_argument`, naming `holdDeclarations`) where a retained child's row would take its hold, not left to a bare TypeError from the middle of the delegation.
|
|
705
|
+
- **Consumers.** @server: the desk's seat object gains its engine half (`hold` / `release` on each entry's engine count; a hold of a dropped entry should not revive it); the transitional reading by session deletion retires. The server hands the seat over at four places, each a bare function until now and refused (`config.invalid_argument`) once the object is required (read from the server's tree before its 7.60.0 pickup): `src/boot/runner-deps.ts:748` (`RunnerDeps.peerSeat`), `src/capabilities/mcp-probe.ts:503` (`probeMcpServers`), `src/http/routes/sessions.ts:350` (`materializeMcpTools`, twelfth parameter) and `:420` (`materializeA2aTools`, fifth). @client-core / @cli: no code (the seat is the server's). @test: the hold / release pairing is observable only through a seat; the four shapes are pinned below.
|
|
706
|
+
- **Exports.** `PeerSeat` kind type → interface; +2 root types `PeerDeclarations` / `PeerDeclarationHold`; `RunnerSelfSeat` +`holdDeclarations`.
|
|
707
|
+
- **Pins.** `test/backlog2864-peer-seat-hold.test.ts` (S: the form refused at the reader and the four entrances; K: once per distinct reference, data members only, a throwing or rejecting hold gets no release and is reported (through the seat `new Runner` keeps too), no engine-side count; L: the host lets go right after the call and the leg's sends are answered and nothing is asked after its release — and the counterexample, a host that lets go before the call: the leg's late hold does not revive the entry and the send is refused; a door-refused leg still pairs; a getter declaration received and held at the call, a named-session leg included, the getter run once; C: a cascade's rungs pair each; B: a session-scoped background child keeps the entry after the spawning leg lets go — and the counterexample, a parent that lets go before the spawn; R: a retained entry holds across its legs and releases on eviction / abandonment / replacement / refusal — and the counterexample, an entry registered after its giver let go; H: a hand-built seat without `holdDeclarations` is refused by name at both retention registrations, and one that answers is asked once per row).
|
|
708
|
+
- **Known limits.** A session-scoped background child spawned by a tool call that outlives its own aborted leg may take its hold after that leg released (the abort orphan window) — KL-2864-a; a leg whose prepare never settles never releases — KL-2864-b; a connection whose close outlived the bounded teardown may reconnect once after the release (the seat then refuses — nothing is sent) — KL-2864-c; an asynchronous `hold` whose promise never settles keeps its release waiting — KL-2864-d.
|
|
709
|
+
|
|
710
|
+
### Four more extension events are raised: `agent.offer` and `agent.spawn` around a delegation, `turn.complete` and `session.end` as a model turn and a leg end (#2457, #2458; mods wave three S2 / S3a, design/1398 waves 2–3, C-R704 / C-R940; behavior change only where a handler hangs on one of them; hard-breaking: the kernel contract 5 → 6 — a mod package written against 5 is refused, three sentences below, open to veto; closed sets: four station rows; exports: none) (@server @cli @client-core @test)
|
|
711
|
+
|
|
712
|
+
- **Before.** The four names were in `MOD_EVENT_TABLE` with no station: a registration that selected only them was refused at admission, and a workflow script's agent had no extension seat of its own (#1500 named this gap).
|
|
713
|
+
- **Now — `agent.offer`.** One offered set, read by the agent listing a leg renders (its first request and each boundary that owes the frame) and by the type a delegation names at dispatch. A handler answers `next(e)` or `{ isOffered: false }`: the type is left off the listing, and a delegation naming it anyway is refused before anything is allocated (`Sub-agent not started: subagent_type "<type>" is not offered here …`). `e = { agent, description, provider }`, `agent` and `provider` pinned; a failing handler is skipped and the type stays offered (the reference: "A hook that fails passes it through"). A revival is no offer. Known limit: the delegation tool's own description (the cached tool block, which names the built-in `fork` lane) and its refusal of an unknown type (which lists every accepted type) are fixed before any extension runs and do not read the offered set.
|
|
714
|
+
- **Now — `agent.spawn`.** Raised on the delegating leg's bus once the delegation tool has judged the call and before anything is allocated for the child, and for each agent a workflow script spawns (on the host leg's bus, `workflow: true`). Every member is pinned — the spawn's identity, its parent's, the identity envelope and every argument the gate judged (`prompt`, `description`, `subagentType`, `model`, `background`, `cwd`, `name`, …) — so the only answer is a refusal: `{ deny: <reason> }` instead of `next` starts no child and the model reads which extension refused; `next(e)` lets it start and comes up as `{ model }` (the model the delegation named, `inherit` when the child's own prepare decides). Failure column `refuse_until_run`: a throw, a timeout, a changed member or an answer of its own refuses while the child has not been let start; once it has, the spawn stands and the failure is reported on `onError` (`phase: "hook"`). No spawn is raised for a revival of a parked or retained agent, a drive of a parked workflow agent, or an observer leg a definition starts beside its child. Known limit: the observed spawn's `e` does not name its observer, so neither hiding the observer's type nor a refusal keeps an observer from running beside a child the chain let start.
|
|
715
|
+
- **Now — `turn.complete` and `session.end`.** Observations. `turn.complete` once per `turn_end` the leg emits, in order, at the next await point — the boundary after it, or the leg's settle for turns no boundary followed (a recovery re-prompt, an interrupted last turn) — at the start of the boundary's own pass and before the leg's `classic.Stop`, `e = { answer, reason, turn, isAborted, usage?, agentId? }` (`usage` absent when the brain reported none; `reason: "aborted"` when the leg's cancel was in force or the reply's own stop reason says so, as a reply cut while streaming does — a turn whose tool batch an immediate steer cut reads `"answer"`); `session.end` once per leg as its terminal settles, `e = { reason, sessionId, agentId? }` with the terminal status word — like the delegation lifecycle's terminal, never for a leg that throws out of the runner. A handler's answer changes nothing and a failing handler is skipped. No handler on an event: nothing is raised and nothing is awaited on its path.
|
|
716
|
+
- **Failure columns, station by station** (the contract's fourth trigger): `agent.offer` skip · grace · pinned `agent`, `provider`; `agent.spawn` refuse_until_run · immediate · sixteen pinned members; `turn.complete` skip · grace · pinned `answer`, `agentId`, `turn`; `session.end` skip · grace · pinned `reason`, `sessionId`, `agentId`. None has a `call` column: `$.agent.spawn` is not on `$` in this version.
|
|
717
|
+
- **Hard-breaking, open to veto: a mod package written against contract 5 is refused (@server @cli @test @client-core).** What changed: `KERNEL_CONTRACT_VERSION` is 6, and `loadModPackage` loads only a package whose `hooks.json` states `"contract": 6` (`src/core/mods/package.ts:72-73`); 7.59.0 shipped 5. Who is hurt: every mod package written for 7.59.0 — a deployment loading a real package (server S-2388), the CLI's package leg (MODS155), test's real-package fixtures (C-R915), and a host comparing two kernel copies for equality (client-core's generated table gains four station rows); the server's own hard-coded `5` is in four places, none on its runtime path (its deployment loader reads the engine constant, `src/boot/deployment-mods.ts:33` and `:111`): the acceptance harness's fixture contract number (`acceptance/s2388-mods-deployment/run.mjs`), the version pin `test/mods-loader-pickup.test.ts`, the 7.59.0 pickup case in `test/mods-deployment-loader.test.ts`, and one sentence of `docs/ASSISTANT-WIRE-CONTRACT.md` (read from the server's tree before its 7.60.0 pickup); this repo's three fixtures (`test/fixtures/mods/{diff,sec-default,telemetry}/hooks/hooks.json`) were raised to 6. What to do instead: set `"contract": 6`; contract 6 adds these four stations and changes `tool.call`'s failure column (#2675, above: a failure once the body ran withholds the result), so a package whose handlers name none of the four, and none on `tool.call` that fails after `next(e)`, needs no other change.
|
|
718
|
+
- **Pins.** `test/backlog2457-2458-mods-wave3-stations.test.ts` — real Runner, a parent delegating once: a hidden type is off the listing and refused when named; a failing offer handler leaves it offered; spawn's `e`, `{ model }` coming up, a deny / a changed member / an own answer / an early throw refusing with no child started, a late throw or late deny reported beside a child that ran; the workflow lane's raise; `turn.complete` per turn before `classic.Stop` and `session.end` last; observations that throw change nothing; the rows and the contract number. `test/mods-kernel-296.test.ts` counts the four new stations and names `turn.step` as the station-less example.
|
|
719
|
+
|
|
720
|
+
### What an execution environment can do is one required block on every environment — `ExecutionEnv.capabilities` (`ExecutionEnvCapabilities`, eight keys), each key read through its one reader, a key left out or of the wrong shape announced and read on its safe side (#2947, design/2891 S1, ruled C-R965 and C-R964; hard-breaking: the block is required on the base type and the two loose booleans are retired, three sentences each below, open to veto; closed sets: `config.execution_env_capability_invalid` `detail.key` +4 words and minted for any environment; exports: +1 root type, +2 root values) (@server @cli @client-core @test)
|
|
721
|
+
|
|
722
|
+
- **Before.** The capability block lived on `RemoteExecutionEnv` alone (`isolation`, `suspendable`, `canonicalPathAuthoritative?`, `sharesProcessTable`); every reader asked the remote interface first and gave any other environment a fixed answer, so an environment without the remote seam could declare nothing (KL-2348-b). Two more facts sat on the base type as loose optional booleans with absent readings of their own (`hostLocalPaths?` — absent fell back to the remote shape or `instanceof NodeExecutionEnv`; `externalContentTarget?` — absent read as trusted). The admission census looked at remote environments only, and absence of three of the four keys was a silent reading.
|
|
723
|
+
- **Now.** `ExecutionEnv.capabilities: ExecutionEnvCapabilities` is required on every environment: `isolation`, `suspendable`, `sharesProcessTable`, `canonicalPathAuthoritative`, `hostLocalPaths`, `externalContentTarget`, `io` (the filesystem and shell faces reach a target), `keepsReadFloor` (#2944, the next section). `RemoteExecutionEnv` inherits the block. Each key has one reader (`isIsolated`, `declaredSuspend` / `isSuspendable`, `processTableOf`, `canonicalPathIsAuthoritative`, `pathsAreHostLocal`, `targetIsExternal`, `performsIo`, `keepsReadFloor`), none of which asks the interface. Every key is required and has no default reading: absent, not a boolean, unreadable — or a block that is not an object or cannot be read — is one `config.execution_env_capability_invalid` per key per run at admission (`detail: { key, valueType }`, the sentence naming the reading) and the reader's safe side: isolation false, suspendable undeclared (never snapshot), process table undeclared (pattern kills refused), canonical authority true (silence refuses), host-local undeclared (no path presented as the host's; a worktree child refused — #2948 below), external undeclared (the content fold reads it as outside; a call that reaches it owes what reaching the target and what leaving it both owe on the cross-boundary lane), io undeclared (no shell face; the project marker still read through the environment — #2948 below), floor not kept. `NodeExecutionEnv` declares `{ isolation: false, suspendable: false, sharesProcessTable: true, canonicalPathAuthoritative: true, hostLocalPaths: true, externalContentTarget: false, io: true, keepsReadFloor: false }`; `StubExecutionEnv` the same but `canonicalPathAuthoritative: false`, `io: false`, `keepsReadFloor: true` (it refuses every start). The frame's `remote` and the file-history identity read `pathsAreHostLocal` where they read the loose `hostLocalPaths`; the run's content fold and the cross-boundary lane read `targetIsExternal` (`BoundaryLegsGiven.env` is `Pick<ExecutionEnv, "capabilities">`). An oracle grader is `out_of_process` only when it declares isolation AND has the remote interface whose sandbox identity the check compares.
|
|
724
|
+
- **Behavior on the lanes that exist.** None on `NodeExecutionEnv` (its new `canonicalPathAuthoritative: true` moves no read-boundary verdict: its resolver always answers `/`) or on a TypeScript adapter that states its block. A run without hands (the Stub) now has file-history identity `"host"` (it writes no file). An adapter that leaves a key out — a JS adapter, or one written against 7.59.0 — gets a notice per key and the safe side above: for an undeclared `hostLocalPaths` its frame reads `remote: true`, for an undeclared `externalContentTarget` its content is treated as from outside (the memory session mark) and its tree is armed, and a call reaching it owes both the on-target and the off-target obligations (a person's confirmation on a governed tree, the off-target read record).
|
|
725
|
+
- **Hard-breaking, open to veto — the block is required on every environment (@server).** *What changed:* `ExecutionEnv` gains the required member `readonly capabilities: ExecutionEnvCapabilities` (eight keys, `keepsReadFloor` and `io` among them); `RemoteExecutionEnv.capabilities` is that member, with `canonicalPathAuthoritative` required where it was optional. *Why there is no default:* each reader would have to guess one side for an environment that says nothing, and that side is wrong for some other environment (assuming isolation is a hole, assuming a shared process table refuses an ordinary `pkill` in a sandbox, assuming a kept floor hides bytes that reach the model). *Who is hurt:* every host that implements `ExecutionEnv` — the server's seven remote adapters and any adapter written against 7.59.0 — fails `tsc` until it states the block; a JS adapter that leaves a key out compiles, is announced at admission and is read on the key's safe side. *Migration:* each of the seven remote adapters adds `hostLocalPaths` (the host lane `true`, the others `false`), `externalContentTarget` (the device lane `true`, the others `false`), `io: true`, `keepsReadFloor: false` (until a lane keeps the floor or refuses the start, §11.1) and states `sharesProcessTable` and `canonicalPathAuthoritative` explicitly; the two subclasses of `StubExecutionEnv` inherit the Stub's block and compile unchanged (override it where an operation does real I/O); a JS adapter that leaves a key out is announced at admission and read on the key's safe side.
|
|
726
|
+
- **Hard-breaking, open to veto — the two loose base-type booleans are retired (@server).** *What changed:* `ExecutionEnv.hostLocalPaths?` and `ExecutionEnv.externalContentTarget?` (and `StubExecutionEnv.externalContentTarget?`) are removed; the facts are `capabilities.hostLocalPaths` / `capabilities.externalContentTarget`. *Why:* one fact in two places is two sources that can disagree. *Who is hurt:* an adapter or host that sets or reads `hostLocalPaths` / `externalContentTarget` on the environment itself (the device adapter's top-level `externalContentTarget` is one) fails `tsc` on the removed members. *Migration:* the device adapter moves its top-level `externalContentTarget` into `capabilities`; a host that read either member reads `pathsAreHostLocal(env)` (root export) or the block.
|
|
727
|
+
- **Consumers.** @server: the seven blocks and the device lane's move above; the execution-lane table's `hostFilePlane` can agree with `pathsAreHostLocal` (#2891 X-1 retires the duplicate bits when it lands). @client-core / @cli: `config.execution_env_capability_invalid` `detail.key` gains `hostLocalPaths`, `externalContentTarget`, `io`, `keepsReadFloor` (and `capabilities`) and arrives for local environments too — a table that pins the key set adds the rows. @test: a NON-remote environment that declares `isolation: true` is now read as isolated by every reader (the remote interface is no longer a precondition), except the oracle's out-of-process class.
|
|
728
|
+
- **Same release.** The structural readings that answered capability questions off the remote interface or the Stub's class retire to the readers in #2948 (design/2891 S2, the next-but-one section), with the host lane's five readings that move there.
|
|
729
|
+
- **Exports.** +1 root type `ExecutionEnvCapabilities`; +2 root values `pathsAreHostLocal`, `keepsReadFloor`. Removed members: `ExecutionEnv.hostLocalPaths`, `ExecutionEnv.externalContentTarget`, `StubExecutionEnv.externalContentTarget`.
|
|
730
|
+
- **Pins.** `test/backlog2947-capability-table.test.ts` (P1 the source scan: every remote-predicate call, class check and direct key read left in src/ is a row — the interface whitelist or a reading #2948 retires — and no loose member survives; P2 Node's eight answers, its read-boundary verdicts unchanged by `canonicalPathAuthoritative: true`, its frame and file-history readings; P5 no block / `"true"` / `1` / `null` / a throwing key or block ⇒ one notice per key and every reader on its safe side, a non-remote env declaring isolation, the oracle's interface conjunct; P7 the Stub's answers and no notice for a run with no env or a Stub; P7b the marker read through a limited host-disk env; P8 the census walks exactly the type's keys, a block missing a key does not compile); the remote doubles mint their blocks through `test/env-capability-block.ts`.
|
|
731
|
+
|
|
732
|
+
### A run whose read-deny table holds rows on an environment that does not keep the byte floor is announced once — or refused at prepare when the deployment requires the floor (`readDenyFloorRequired`); the engine's own starts whose output reaches the model carry the floor (#2944, #2937 ①, design/2936, ruled C-R964; behavior change: one operator notice per run on `NodeExecutionEnv` with the default tiers; hard-breaking: none beyond the required `keepsReadFloor` key above; closed sets: `ENGINE_NOTICE_CODES` +1, `SWAPPABLE_DEP_SEATS` +1; exports: `keepsReadFloor` (above); members: `RunnerDeps.readDenyFloorRequired?`, `HandsToolkitOptions.readDenyFloorRequired?`) (@server @cli @client-core @test)
|
|
733
|
+
|
|
734
|
+
- **Before.** `NodeExecutionEnv` ignored the floor every shell start carries, in silence (INTEGRATION-CORE §11.1 said so in two sentences), so on the local lane a recursive read under the root carried a deny row's bytes into the conversation with nothing said (KL-r2-a), and nothing could declare that a lane does or does not keep the floor. The env facts probe, the git status frame and the Grep tool's ripgrep — starts the engine makes itself, whose output it relays to the model — carried no floor at all: a repository's `include.path` pointing at a deny-listed file put its fields into the git frame on any lane.
|
|
735
|
+
- **Now.** Judged per table owner, as each table is compiled: the Runner for every table a run compiles — the prepare's, and each one a person's persisted rows bring mid-run (with the requirement such a table fails to compile, so the call that would judge with it is refused; the notice is said once per run) — each delegated child on its own environment, and a library-direct band for a table it compiles itself (a band handed the Runner's face judges nothing). The table holds rows and the environment does not declare `keepsReadFloor: true` ⇒ with `RunnerDeps.readDenyFloorRequired: true` the prepare refuses with `config.read_deny_floor_unkept` before any command starts; otherwise one operator notice under the same code (`detail: { rowCount, sessionId, runId }`). An empty table is not judged. A run without hands runs on the Stub, which keeps the floor (it refuses every start), so it is never judged unkept. The requirement is the read-deny family's deployment seat: a boolean, absent = not required; any other value refuses (`config.read_face_seat`) at the prepare and at `swapDeps`, which now takes it (`config.read_deny_swapped` `detail.floorRequired`). The three relaying starts carry the run's floor (the Grep tool the call's own); an environment that keeps the floor and cannot keep it for one of them refuses it, and the probe's facts are missing / the frame degraded by the arms each already had.
|
|
736
|
+
- **Honest scope.** On `NodeExecutionEnv` a deny row's bytes still reach the conversation through a recursive read: this release makes that visible (the notice) and refusable (the requirement), not prevented. A lane that keeps the floor is a future one (the server's sandboxed lanes, S-2218; a local OS confinement, #2945 T3).
|
|
737
|
+
- **Consumers.** @server: each remote adapter declares `keepsReadFloor` (above); a deployment that must not run without the floor sets `readDenyFloorRequired: true` — on the local lane every run is then refused while the default tiers are on. @cli: every session on the local lane carries one operator notice `config.read_deny_floor_unkept` while the default tiers are on — how it is shown is the shell's. @client-core / @test: `ENGINE_NOTICE_CODES` +1 (audience `operator`); the same word is a prepare `errorCode`.
|
|
738
|
+
- **Deviations from the reference (registered as candidates).** `read-floor-rides-relaying-engine-starts` — ours: the env facts probe, the git status frame and the Grep tool's ripgrep carry the floor; the reference sandboxes the Bash tool's commands only. `read-floor-unkept-announced-when-table-nonempty` — ours: a non-empty deny table is the request, and an environment that does not keep it is announced; the reference warns only when its sandbox was asked for and cannot start.
|
|
739
|
+
- **Pins.** `test/backlog2944-read-floor-kept.test.ts` (J1 Node + default tiers: one notice, `rowCount ≥ 1`, and a recursive grep still reads a fake `.netrc` in a temp directory; J2 an empty table: no notice, the requirement refuses nothing; J3 the requirement on Node: the run fails with the code and nothing started, a self-compiling band refuses the same; J3b an empty table at prepare that gains a person's Read deny mid-run: no start carries a floor on Node; J4 a declared keeper is silent, `"true"` and a missing key are the census's notice and the floor's; J5 bad requirement values refuse at the prepare and the swap, a good one swaps and the next run reads it; J6 a library-direct band once per construction, the Runner's path once; J7 no env / an injected Stub: no notice, the requirement refuses nothing; J7b a delegated child judges its own environment, both ways; J7c rows with no floor for the starts refused as an engine defect; J8 the probe, the git frame and ripgrep carry the run's rows; J9 every environment start in src/ classified relayed or not; J10 a keeper refuses the git frame's start that would read a deny row through `include.path`, and the field is not shown).
|
|
740
|
+
|
|
741
|
+
### Where an environment's actions land is read off its declaration alone — the remote interface and the Stub's class stop answering capability questions, and a host lane reads as the host it drives (#2948, design/2891 S2, ruled C-R965 and its addendum 1; behavior change: the host lane's five readings below, and smaller ones — the worktree exemption's narrowing open to veto; hard-breaking: HB-3 the host lane's readings flip, and `PersistenceFacts.remoteHands` is renamed `handsOffHost`, three sentences each below, open to veto; closed sets: none; exports: none) (@server @cli @client-core @test)
|
|
742
|
+
|
|
743
|
+
- **Before.** Four questions had more than one reading. *Is a path this environment names the host's?* — the frame's `remote` was `isRemoteExecutionEnv(env) || !pathsAreHostLocal(env)`; the file history asked the remote handle before the declaration; the memory write instruction, the capture carrier and the roster's persistence judgment asked the remote interface; a worktree child on the remote interface had to declare isolation (shape (d)) and one off it was compared by path; the delegated child's placement hint asked the interface. *Is there I/O?* — four `instanceof StubExecutionEnv` checks. *Can it snapshot or park?* — one strict reader, three truthy reads of `capabilities.suspendable`, and a park-only target of "remote and not snapshot-capable", which parked an environment that never said `false`.
|
|
744
|
+
- **Now.** One reader per question. Where paths land is `pathsAreHostLocal`: the frame `workspace_changed.remote` (and `ResolvedWorkspace.remote`) is `!pathsAreHostLocal(env)`; the file history is the host's one tree for a host-disk environment, else the remote handle's identity, else its own; the memory write instruction and the roster's persistence judgment drop the hand band's tools when the band is off the host's disk; a `capture: "off"` declaration needs a supplied carrier store when the environment is off the host's disk; a worktree child is compared by physical path whenever its environment is on the host's disk (isolated or not), exempt only when it declares itself off the host's disk (`hostLocalPaths: false`) and a sandbox (`isolation: true`), and refused otherwise — an environment that does not say where its paths land can be neither compared nor exempted (`isolation.unavailable`); the delegated child's placement hint follows. Whether a shell face mounts (the band's shell, the shell seat, the full shell's reachability) is a declared `io: true` (`performsIo`, now three states); the project marker is read through the environment unless it declares `io: false`. Whether a run can snapshot or park is `declaredSuspend` (three states): `true` (with the restore surface) is the snapshot target, `false` the park-only target, undeclared neither — such a run cannot suspend durably: a resource or platform suspend is INACTIVE, a durable ask is refused, a plan review is skipped, each naming the declaration; a snapshot-less handle not marked park-only is tolerated on resume only by an environment that declares `false`. The remote interface is read only where a remote method is called (the whitelist in backlog2947 P1).
|
|
745
|
+
- **Behavior on the lanes that exist.** None on `NodeExecutionEnv`, on the injected Stub, or on a sandbox lane that states its block. The host lane — the remote interface with `hostLocalPaths: true`, `isolation: false` (the server's default lane) — moves on five readings (HB-3 below). Three smaller moves: an environment off the host's disk WITHOUT the remote interface (an in-memory class) is no longer taught the memory write instruction, refuses `capture: "off"` without a carrier store, and refuses a worktree child (it was compared by path); a declared sandbox ON the host's disk (a bind-mounted container) has its worktree child compared by path (it was exempt); an environment that does not declare `io` mounts no shell face, one that does not declare `suspendable` as a boolean is not parked, and an isolated one that does not declare `hostLocalPaths` (a JS adapter) has its worktree child refused (it was exempt on the remote interface).
|
|
746
|
+
- **Hard-breaking, open to veto — a host lane is no longer read as remote (HB-3) (@server @cli @client-core).** *What changed:* an environment that declares `hostLocalPaths: true` on the remote interface (the server's host lane) now reads `workspace_changed.remote: false`, shares the host's file-history tree (`"host"`), is taught the memory write instruction, accepts `capture: "off"` without a supplied carrier store, and has a worktree child compared by physical path and accepted when it is its own directory (it was refused `isolation.unavailable`). *Why:* each of these asked the interface, and the host lane drives the engine's own machine and disk through it, so it got a sandbox's answers (no memory writes, no worktree children, a refused opt-out). *Who is hurt:* a projection that reads `workspace_changed.remote` (or `ResolvedWorkspace.remote`) to tell the host lane from a sandbox now reads `false` for the host lane — none downstream today — and a deployment that relied on the host lane being refused a worktree child or `capture: "off"` sees it accepted. *Migration:* none on the server side to get the new readings — the declaration already present (`hostLocalPaths: true`, #2947) is read; the explicit carrier store and `memoryPersistenceCapable` stay valid; the execution-lane table's `coreRemoteExecutionEnv` bit and the memory-boundary note that the file plane is a second axis can retire (#2891 X-1); the frame value change has no reader downstream today (the server projects `cwd` only; the CLI and client-core read `cwd`).
|
|
747
|
+
- **Behavior narrowing, open to veto — an isolated environment that does not say where its paths land gets no worktree exemption.** *What changed:* an environment declaring `isolation: true` whose `hostLocalPaths` is left out, not a boolean or unreadable has its worktree child refused (`isolation.unavailable`, a new sentence, no new code); on the remote interface it was exempt, off it it was compared by path. *Why:* the exemption stands on the environment's paths not being the host's, and an undeclared location is neither that nor something the engine can compare — `hostLocalPaths` has two consumers with opposite safe sides (no path presented as the host's; no exemption), read through one three-state reader. *Reach:* a JavaScript adapter only — a TypeScript adapter must state the key (the block is required, #2947); declare `hostLocalPaths: false` on a sandbox lane.
|
|
748
|
+
- **Behavior narrowing, open to veto — a plan review on a per-task environment in neither suspend target is skipped, not parked.** *What changed:* every durable suspend lane — the resource and platform lanes, a durable ask, a plan review — refuses on one fact, a per-task environment in neither the snapshot nor the park-only target, and that fact now names a per-task environment without the remote seam too (a factory-minted host env, a block that is absent, no object or unreadable); a plan review on one is skipped with a notice where it was parked with no workspace handle. *Why:* that checkpoint resumed onto a fresh environment, and the other lanes already refused it. *Reach:* a factory that mints environments without the remote seam; a static environment still suspends in process.
|
|
749
|
+
- **Hard-breaking, open to veto — `PersistenceFacts.remoteHands` is renamed `handsOffHost` (@server @cli @client-core).** *Who needs it:* the roster judgment's facts now say whether the hand band is off the host's disk, which is no longer "remote" — a host lane is remote and on the host's disk — so the old name would state the reading this release retires. *Who is hurt:* a host calling `rosterCanPersistMemory` or `persistenceCapableToolNames` with a facts literal naming `remoteHands` no longer compiles (no reader in the server, CLI or client-core sources today). *Compensation:* rename the member; the value is the same question asked of the declaration (`handsEnabled && !pathsAreHostLocal(env)`).
|
|
750
|
+
- **Consumers.** @server: the host lane gets the five readings above with no code change; the shell faces now mount only on a declared `io: true` — every adapter states it since #2947, and the two `StubExecutionEnv` subclasses inherit `io: false` (no shell, as before). @cli: a local session is unchanged; a session on the server's host lane sees the memory write instruction and worktree children it did not see. @client-core: the frame key is unchanged and its value is `false` on the host lane. @test: P3 / P3b / P4 / P6 / P7 below read the host lane against a sandbox lane item by item.
|
|
751
|
+
- **Pins.** `test/backlog2948-four-readings-one.test.ts` (P3 the host lane's frame, file history, write instruction, capture carrier and worktree child; P3b `isolation` × `hostLocalPaths` on and off the remote interface — a compared env refused at the shared root and accepted at its own, a sandbox off the host exempt, anything else refused, and an isolated env whose `hostLocalPaths` is left out, a string or a throwing getter refused; P4 the sandbox lane as before; P6 `suspendable: "false"` neither snapshot nor parked on the ask lane and the plan-review lane, each refusal naming the declaration, a declared `false` parking, and a per-task env without a usable remote seam (a throwing, absent or non-object block, a plain host env) refused on both lanes; P7 the injected Stub and an env without `io` keep their file tools without a shell; P7b an env without `io` has the marker read through it); `test/backlog2947-capability-table.test.ts` P1 (the interface whitelist is the only structural reading left; no class check, no direct key read).
|
|
752
|
+
|
|
753
|
+
### An environment's capability block is received once — copied, frozen and the only thing any reader reads — and a member outside the eight keys is announced; a read face is a deployment statement on every lane (#2964, #3030; behavior narrowing, three sentences below, open to veto; hard-breaking: none; closed sets: `config.execution_env_capability_invalid` `detail.key` may name a member outside the eight keys; exports: none) (@server @cli @client-core)
|
|
754
|
+
|
|
755
|
+
- **Before.** One run read the adapter's `capabilities` getter several times (the census, each reader, the remote predicate's block conjunct), so what the census judged and what a reader acted on could differ for a block that changed; a member outside the eight keys (a misspelled `isolaton`) was ignored in silence, leaving the key it meant undeclared with no word about why. A read face's default on a multi-lane deployment, and how a governed deployment sets it, were not written down.
|
|
756
|
+
- **Now.** The block goes through the engine's one receipt of a caller's object (the reading a Model and an options bag get): read once per environment object — at its first read, a run's admission point — its own members each read once, copied and frozen; every reader, the census and the remote predicate read that copy. A member outside the eight keys is one `config.execution_env_capability_invalid` under its own name (`detail: { key, valueType }`), and no reader takes it. A read face is a deployment's trust statement, never an environment capability: no declaration of the environment (a sandbox's `isolation` included) enters the face's resolution order, so every lane's default is `roots`, and a lane that is to read open says so at a seat allowed to open — the deployment seat in force for its run, or the task seat where no organization governance is declared; under governance only the deployment seat opens.
|
|
757
|
+
- **Behavior narrowing, open to veto.** *What changed:* a host that changes an environment's block after the engine first read it is no longer read (the block is a constant of the adapter, as documented); a Proxy block is refused by the receipt before any trap runs (one notice under `capabilities`, every key on its safe side), and a member the receipt cannot copy (a function, a getter that throws) is `unreadable`; a member outside the eight keys is announced. *Why:* one reading — what was judged is what is read, as for a Model (#2846) and a store's options (#2847). *Migration:* none for a TypeScript adapter whose block is a plain data member (the server's seven); an adapter that rebuilt its block per read keeps the first one per environment object — mint a new environment object to change it.
|
|
758
|
+
- **Consumers.** @client-core / @cli: `detail.key` of `config.execution_env_capability_invalid` may now name any member the adapter wrote — a table that pins the key set reads an unknown word as a member that is no capability. @server: the seven adapters declare plain data blocks and see no change; a multi-lane engine under governance has one deployment read-face seat per Runner (the open question is #3035).
|
|
759
|
+
- **Pins.** `test/backlog2964-capability-receipt.test.ts` (R1 one getter read for a run with hands and a shell call, none for a second run, a member getter once; R2 `isolaton` announced under its own name beside the undeclared `isolation`; R3 a block mutated and replaced after the receipt changes no reader and the census repeats the received findings; R4 a Proxy block refused with no trap run); `test/backlog3030-read-face-lanes.test.ts` (the engine's own host, a host lane and an isolated sandbox × no seat / deployment open / task open / both, ungoverned and governed: roots by default on every lane, the deployment seat opens, the task seat opens only ungoverned and only tightens a deployment's open); `test/backlog787-capability-shape-census.test.ts` H6 (a lying Proxy block hides nothing: the receipt refuses it).
|
|
760
|
+
|
|
761
|
+
### Org memory admission is asked by who asks — the resolver's input is discriminated by caller presence, read once the way the task door reads it, and the memory of an owner with no identity is written down as an opaque key, never a sentinel principal (#900 C0 / C1; hard-breaking: the seat's input type, open to veto; behavior narrowing, open to veto: a task whose principal is the empty string, and a resolver that rewrites its own input; closed sets: none; exports: +2 root types `MemoryScopeAdmissionInput`, `DeploymentMemoryScopeRequest`) (@server @cli)
|
|
762
|
+
|
|
763
|
+
- **Before.** `MemoryScopeAdmission` took `{ principal: string | undefined; requested; requestedWriteScope }`, any origin either way. The door refused a request-origin org scope without a caller only when the principal was `undefined`, while the task door reads the empty string as no principal too (`TaskSpec.principal: ""` passes it as absent): such a task put its request-origin org scopes to the resolver as if `""` were a caller, and a deployment-only request reached the resolver with `principal: ""`. Nothing in the type said the door had already refused the caller-less request-origin shape, so a resolver kept its own refusal arm for it (the server's does, with two cells that build that shape).
|
|
764
|
+
- **Now.** `MemoryScopeAdmissionInput` = `{ principal: string; requested: ReadonlyArray<MemoryScopeRequest>; requestedWriteScope: MemoryScopeRequest | null } | { principal: undefined; requested: ReadonlyArray<DeploymentMemoryScopeRequest>; requestedWriteScope: DeploymentMemoryScopeRequest | null }`, and `MemoryScopeAdmission` takes it. The door reads caller presence once, through `readPrincipal`: a principal name is the caller, handed as written; omitted or `""` is no caller — a request-origin read scope or write slot is refused `memory.admission_denied` before the resolver is asked (the sentence is unchanged), and a deployment-only request is put with `principal: undefined` (the key present, as before); a provided value that is no name is refused `memory.admission_denied` before the resolver (reachable only through the library entrance `admitMemoryScopes` — a task's prepare refuses it earlier as `config.invalid_argument`). The write slot's origin is read once, with the rest of `requested` (it used to be read a second time; a plain origin-stamp record answers the same either way), and the resolver is handed copies: a resolver that rewrote the origins of its input used to change the door's own later reading of them — a deployment scope it granted nothing for then stayed mounted — and now changes nothing the door decides. The resolver-absent leg reads no caller and is unchanged. Not changed here: the compliance posture resolver, consulted before admission, still receives the task's principal as given (`""` included).
|
|
765
|
+
- **The identity-absence contract** (`@contract memory.identity_absence.opaque_key`, on `isCentralAuthorityScope`; one pointer each in the scope-contract module header and on `RuleOwner`): the memory of an owner with no identity lives under an opaque, unprefixed key the deployment chooses (such as `local`), never a sentinel principal or a `user:` key (`user:local` is the key of a principal named `local`), so its authority is not central, and the engine mints no key for it; read as an owner it is `RuleOwner`'s `local-owner` arm; moving it to a principal is a re-keying of its entries (`migrateScope`), and the engine never reads the opaque name as a principal; admission authorizes by the caller, never by a layer's owner. Comments and the registry row only — no key is reserved, no value is refused for being `local`, and the sync client still syncs whatever scope a host hands it.
|
|
766
|
+
- **Hard-breaking (open to veto), three sentences.** *What breaks*: a call that builds a caller-less admission input holding a request-origin scope (read or write slot) no longer type-checks, and a task whose principal is `""` is refused `memory.admission_denied` where its request-origin org scopes used to reach the resolver (its deployment-only request now reaches the resolver with `principal: undefined` instead of `""`); absence is never spelled as a principal string on this seat, `local` included. *Who is hurt*: a host whose tests call its resolver directly with `principal: undefined` and request-origin items; a resolver that narrows on `input.principal === undefined` and then compares an item's origin with `"request"` (the comparison now has no overlap — that is the arm to delete); and a host that sends `principal: ""` with request-origin org scopes. A resolver typed against the wider earlier input is still a seat, and a destructuring one that filters by origin before it checks the principal keeps compiling, its caller-less arm now dead code. *Migration*: delete the resolver's own "principal absent" refusal arm and the cells that build the impossible shape — narrow on `input.principal === undefined`, whose arm holds deployment-origin scopes only — and send a principal name for any request that needs a tenant plane.
|
|
767
|
+
- **Consumers.** @server S-2394: `src/org-memory-admission.ts` keeps a "principal absent" arm (outcome `principal_missing`) that the type now proves unreachable, and `test/org-memory-admission.test.ts` builds the caller-less request-origin shape twice (read and write slot) — those two cells stop compiling and retire with the arm; the resolver's own source compiles unchanged (read in the server checkout and mirrored as a type cell, not compiled there); its `attributed` details lose `principal: ""` on a caller-less deployment-only request. @cli: no call of the seat in the cli source; no change. The memory-owner reading itself (an owner function that names the global layer's owner, the re-keying arc) is the server's and a later core slice; this section changes neither.
|
|
768
|
+
- **Pins.** `test/backlog900-admission-actor-seam.test.ts` (the real Runner over a File memory store, caller {name, omitted, `""`} × request {deployment only, request-origin read, request-origin write slot} × resolver {present, absent}: the caller is handed by name with every origin, a padded or non-ASCII name exactly as written; a provided value that is no name stops at the task door (`config.invalid_argument`, the resolver not asked); no caller ⇒ deployment-only reaches the resolver with `principal: undefined` and the key present, request-origin is refused before the resolver; no resolver ⇒ unchanged: deployment-only mounts and request-origin is `memory.admission_required`; through the library entrance a provided principal that is no name is refused before the resolver, and a resolver that rewrites its input's origins and grants nothing leaves the deployment scope dropped; the refusal sentence names each request-origin scope once; type cells: the caller-less arm cannot hold a request-origin scope, a narrowed resolver's "no caller but request-origin" comparison has no overlap, a wider and a destructuring resolver still compile). `test/export-surface.snapshot.json` +2 types; `docs/CONTRACT-SENTENCES.md` +1 row.
|
|
769
|
+
|
|
770
|
+
### Retirements — fifteen faces on the retirement line are deleted; sixteen more are re-windowed to 7.61.0 with their reason on the row (RL-1336, #2100, #2909; hard-breaking: fifteen, three sentences each below, open to veto; closed sets: the `loadProjectMemory` phase union −1 (`post-clear`), the prepare refusal codes −1 (`rewind.rewind_files_retired`, now `config.spec_retired_key`); exports: −4 root values (`ARTIFACT_CARD`, `MEMORY_GUIDANCE`, `CODE_SYSTEM_PROMPT`, `createWebFetchTool`); members: −1 `ImportPreview.translated`, −1 `TaskStats.costBreakdown.memoryConsolidationMicroUsd`, −1 `stats.mechanisms.finalVerifyInjected` (and the same member on `task.end`'s mechanisms summary), `CheckpointStore.listByScope` optional → required, `RunnerDeps.loadProjectMemory` return narrowed to `ProjectMemoryLoad`) (@server @cli @client-core @test @sdk)
|
|
771
|
+
|
|
772
|
+
Every row here was on `docs/RETIREMENT-LINES.json` with `retireBy: 7.59.0`; the commit that deletes a face deletes its row, so the table now holds sixteen rows, none due before 7.61.0. `gate:retirement-lines` reads 16 rows online and 35 survival claims in `src/` (11 governed by a row, 24 exempted).
|
|
773
|
+
|
|
774
|
+
- **RL-1336-rewindfiles — `TaskSpec.rewindFiles` is refused by name in both senses.** *What changed:* the key joins `RETIRED_TASK_SPEC_KEYS`; any defined value refuses prepare with `config.spec_retired_key` (a resume whose re-supplied config carries it is refused before the claim as `checkpoint.config_refused` with `detail.code: "config.spec_retired_key"`) whose sentence names the replacement — the capture sense's tolerated no-op with its `config`-phase disclosure is gone, and the restore sense's own code `rewind.rewind_files_retired` is retired with it. *Who is hurt:* @server, whose request resolver forwards `rewindFiles: true` from the HTTP body into the spec (`src/boot/resolve-spec.ts:964`): every request that still carries it now fails prepare; @sdk's `TaskRequest.rewindFiles?` (`packages/sdk/src/types.ts:591`) keeps advertising it; any consumer that branches on `rewind.rewind_files_retired` (@server's `test/resume-anchor.test.ts:148` pins it). *How to migrate:* stop forwarding the key (refuse or strip it at admission, `src/http/admission.ts:700` already reads it); capture needs no request; restore with the conversation is `resumeAt` + `restoreFiles: true`, a code-only restore is `rewindFilesTo`; read `config.spec_retired_key` where you read the retired code.
|
|
775
|
+
- **RL-1336-import-translated — `ImportPreview` has no `translated` member.** *What changed:* the always-empty array is gone from the type and from every preview `prepareCcImport` returns; an entry imports as the file writes it. *Who is hurt:* @server, whose rules-consent face imports `prepareCcImport` and `ImportPreview` (`src/rules-consent.ts:51,60`), and @sdk, which declares `translated` required (`packages/sdk/src/resources/rules.ts:183`, `spec/openapi.yaml:22587`) and pins its presence (`packages/sdk/test/s177-server-767-wire.test.ts:258`); any client rendering a "rewritten spellings" column. *How to migrate:* drop the member from the wire type (or emit `[]` from your own layer if your contract must keep it for a release); render `candidates` and `skipped` only.
|
|
776
|
+
- **RL-1336-artifact-card — the root no longer exports `ARTIFACT_CARD`.** *What changed:* the constant is deleted; the Artifact tool's card id is the string `"artifact"` in `details.type`, as it always was. *Who is hurt:* a host that imports `ARTIFACT_CARD` (none found in @server / @cli / @client-core `src`). *How to migrate:* compare `details.type === "artifact"`.
|
|
777
|
+
- **RL-1336-toolsearch-matched — ToolSearch `details` carries one list of matched names, `matches`.** *What changed:* the second list `matched` (same content) is gone from both the match and the no-match result. *Who is hurt:* a renderer reading `details.matched` (none found in the four neighbours' `src`). *How to migrate:* read `details.matches`.
|
|
778
|
+
- **RL-1336-finalverify-bool — `stats.mechanisms.finalVerifyInjected` is gone; `finalVerifyInjections` is the reading.** *What changed:* the boolean is no longer minted on `TaskResult.stats.mechanisms` nor on `task.end`'s mechanisms summary; the count, present iff at least one injection fired, stays. *Who is hurt:* @server's run-terminal projection table, which lists the key (`src/observability/run-terminal.ts:1221`), and its scan script (`scripts/tb-1249-scan.py:215,230`); dashboards that read the boolean. *How to migrate:* drop the key from the table; read `(stats.mechanisms?.finalVerifyInjections ?? 0) > 0`.
|
|
779
|
+
- **RL-1336-memory-guidance — the root no longer exports `MEMORY_GUIDANCE`.** *What changed:* the concatenation constant is deleted; its two parts `MEMORY_SAFETY` and `MEMORY_HYGIENE` stay exported (core injects none of them). *Who is hurt:* a host that composed its prompt from the one constant. *How to migrate:* `${MEMORY_SAFETY}\n\n${MEMORY_HYGIENE}` is the same text.
|
|
780
|
+
- **RL-1336-code-system-prompt — the root no longer exports `CODE_SYSTEM_PROMPT`.** *What changed:* the alias is deleted; `CODE_AGENT_PROMPT` is the one name of the code prompt (the same catalog text). *Who is hurt:* a host that imports the alias — @server's golden pin imports it (`test/prompt-assembly-golden-7512.test.ts:26,111`); no `src` import found. *How to migrate:* import `CODE_AGENT_PROMPT`.
|
|
781
|
+
- **RL-1336-consolidation-cost — `TaskStats.costBreakdown` has no `memoryConsolidationMicroUsd`.** *What changed:* the permanently-0 line is gone from the type and from every assembled breakdown (and from the delegated child's cumulative breakdown); the breakdown is `{ llmRootMicroUsd, nestedSubagentMicroUsd, compactionMicroUsd }` plus the optional lines. *Who is hurt:* @server's bench arms that build and sum it (`src/bench/s1/arms.ts:155,184,224`, `src/bench/s1/run-firm.ts:208,365`, `test/cost-taxonomy.test.ts:35`) and its run wire, @sdk whose `types.ts:2418` and `openapi.yaml:9163-9167` require it, @client-core's projection (`src/adapter/downstream/terminalToSdkResult.ts:797`, optional there). *How to migrate:* drop the member from the objects you build; a wire that must keep it for a release emits `0` from its own layer, which is what core sent.
|
|
782
|
+
- **RL-1336-post-clear-public / RL-1336-post-clear-local — the `loadProjectMemory` phase union is `"fresh" | "resume" | "post-compact"`.** *What changed:* the reserved word `post-clear`, never emitted, leaves the public `ctx.phase` union and the engine's local one. *Who is hurt:* a loader whose `switch` handles `post-clear` (@server's `src/project-memory.ts:31` declares a wider union of its own, which still accepts the narrower one). *How to migrate:* delete the arm; a session clear starts a new session, which reads `fresh`.
|
|
783
|
+
- **RL-1336-git-mark-param — `stripGitStatusUnits(text)` takes no mark.** *What changed:* the ignored second parameter is gone (internal function; not on the package root). *Who is hurt:* nobody outside the engine. *How to migrate:* none.
|
|
784
|
+
- **RL-1336-journal-reexport — the journal cap has one import path.** *What changed:* `MAX_JOURNAL_RESULT_BYTES` and `oversizeJournalResult` are no longer re-exported by the file backend module `stores/file/workflow-journal-store`; the root keeps both names (now taken from the contract module `core/workflow-journal-store`). *Who is hurt:* a deep import of the file backend module for those two names. *How to migrate:* import them from the package root.
|
|
785
|
+
- **RL-1336-checkpoint-listbyscope — `CheckpointStore.listByScope` is required.** *What changed:* the member is no longer optional; the engine calls it without an optional probe, the store contract kit still names a JavaScript backend that lacks it, and the park self-check (`probeParkRoundTrip`) now reports such a store as `row_not_enumerable` where it used to pass with the step "NOT exercised". *Who is hurt:* a host's own `CheckpointStore` implementation or wrapper that omits it — it no longer type-checks (@server's SQL store implements it; a wrapper elsewhere in your tree may not). *How to migrate:* implement it (pending rows of the scope, the `summarizeCheckpoint` projection) or forward it to the store you wrap.
|
|
786
|
+
- **RL-1336-webfetch-factory — the root no longer exports `createWebFetchTool`.** *What changed:* the second construction path is deleted; `webFetchToolSpec` handed to `spec.tools` is the one path, and the Runner wraps it with its trusted context (host floor, reminder defuse) — a product built outside a Runner never had them. *Who is hurt:* a host that mounted the defined product directly (@server's consumption ledger names it; no `src` call found); tests that execute the tool outside a Runner. *How to migrate:* hand `webFetchToolSpec(config)` to `spec.tools`; to execute it outside a Runner, `defineTool(webFetchToolSpec(config))` (core's own tests do this through one helper).
|
|
787
|
+
- **RL-1336-project-memory-bare — `RunnerDeps.loadProjectMemory` answers a `ProjectMemoryLoad`.** *What changed:* the seam's return type is `ProjectMemoryLoad | Promise<ProjectMemoryLoad>`; a bare string, `null` or any non-object is not read — it is disclosed on `onError` (phase `config`, the sentence names the shape and `{ content: null }`) and the leg runs with no project layer, exactly as when the loader throws. *Who is hurt:* @server, whose `makeLoadProjectMemory` returns `string | null | ProjectMemoryLoad` (`src/project-memory.ts:126,236-263`): its bare-string and `null` answers stop injecting and say so once per prepare; any host loader returning a string. *How to migrate:* answer `{ content: text }`, and `{ content: null }` for no project layer.
|
|
788
|
+
|
|
789
|
+
**Not retired, re-windowed 7.59.0 → 7.61.0 with the reason written on each row** (the rows stay until their carrier lands): RL-1608 ×9 (the TaskOutput tool, its env-direct factory, two catalog rows, five retired-name hints) — deleting the tool before the replacement read seats of design/1056 §2.5 (R1–R7) exist leaves five lanes with no read path; carrier = the #1608 design + split car. RL-1654 ×4 (`MemoryStore`, `consolidateScope`, `runMemoryConsolidation`, the v1 ledger reading) — the three names are one face of a store family still exported under other names, and the v1 arm sits in the locked migration's retry machinery; carrier = the #1654 design section. RL-1103 (the anchor backfill arm) — with it gone a legacy repo partition adopted by `adoptLegacyRepoDirs` refuses at its first open, so the adoption must record the anchor first. RL-1333 (the v1–v9 checkpoint ladder) — a v≤9 row carries no requirement words, so the change needs the parked-row census of the backends holding checkpoints. RL-2164 (the kind-less batch member reading) — its own condition, the server's confirmation that no stored row carries the form, is open.
|
|
790
|
+
|
|
791
|
+
- **Consumers.** @server: `resolve-spec.ts:964` (stop forwarding `rewindFiles`), `project-memory.ts` (answer `{ content }`), `bench/s1` (drop the consolidation line), `observability/run-terminal.ts:1221` (drop the `finalVerifyInjected` key), any `CheckpointStore` wrapper (add `listByScope`; `SqlCheckpointStore` already has it), the rules-consent face's `translated`, and the tests that pin the retired faces (`prompt-assembly-golden-7512`, `resume-anchor`, `cost-taxonomy`); and two requests ride the 7.60.0 pickup sheet — the parked-checkpoint census for RL-1333 and the kind-less batch-member confirmation for RL-2164. @sdk: `TaskRequest.rewindFiles?`, `costBreakdown.memoryConsolidationMicroUsd`, `ImportPreview.translated` in the types, the OpenAPI spec and two tests (`runs-supervisor-cost`, `s177-server-767-wire`). @client-core: the optional consolidation member in the SDK-result projection. @cli: no `src` read of any retired face was found (its `rewindFiles` hits are the out-of-run verb and wire-manifest notes). @test: black-box readings that pin `rewind.rewind_files_retired`, `details.matched` or the bare-string loader are now red by design.
|
|
792
|
+
- **Pins.** `test/retirement-lines-gate.test.ts` (the shipped table: every row's face present, so a row kept for a deleted face reds as STALE; the dangling-citation discriminance now reads RL-2164 / RL-1654 rows), `test/rewind-files.test.ts` and `test/prepare-file-history-transcript.test.ts` (both senses refused by name, `true` and `false`, nothing restored), `test/backlog1050-file-history-capture-off.test.ts` (the refusal sentence names the capture switch), `test/prepare-project-context-transcript.test.ts` (a bare string, `null` and a number each disclosed once, no project layer), `test/tool-disclosure.test.ts` (no `matched` on either branch), `test/final-verification.test.ts` (no `finalVerifyInjected` on the result or on `task.end`, the count is 1), `test/design252-park-selfcheck.test.ts` (a store without `listByScope` is `row_not_enumerable`; with it, `round_trip_ok`), `test/budget-readcontext-and-taxonomy.test.ts` and `test/side-call-usage-account.test.ts` (no consolidation line), `test/full-body.test.ts` (no `CODE_SYSTEM_PROMPT` on the root), `test/backlog490-cc-wildcard-import.test.ts` / `test/permission-rule-consent.test.ts` (no `translated`), `test/export-surface.snapshot.json` −4.
|
|
793
|
+
|
|
794
|
+
### A judge's refusal sentence never carries text the caller wrote — one shape for a caller's key or value, `[redacted] (N characters)` (#2888; behavior change: the wording of the declaration judges' sentences; codes unchanged; exports: none) (@server @cli)
|
|
795
|
+
|
|
796
|
+
- **Before.** The judges of a declaration quoted what the caller wrote: the `sessionMetaKey` judge its key, the request-meta judge a member's name, `readToolAxes` / `readToolFaces` the tool name and an unknown member's name, the face judge the word a closed table refused and the parameter names and list entries it could not place, the preparation door the `contentOrigin` value, an entry or a task list that was a string, a lock key outside the registry, a credential reference's kind, and every key on a refused member path. A credential pasted into the wrong field rode the sentence into logs, panels and probes; a host could only redact after the fact.
|
|
797
|
+
- **Now.** One rule for the table: a sentence says where (the declaration's own member names, a list index), why (the closed vocabulary, a kind, a count and its bound) and whose (the declarer's name — the entry's published identity, already minted into every tool name the engine mounts). Text the caller wrote — a key or a value — is shown as `callerText`: the redaction mark (`REDACTION_MARKS.whole`) and its length in code points (`[redacted] (12 characters)`), or its kind when it is no string. A closed-set refusal now lists the closed words instead of echoing the word it refused (`pathTarget.access [redacted] (5 characters) is outside the closed set (read | create | edit)`). A member path spells the declaration's member names and shows any other key in the same shape (`toolFaces.[redacted] (9 characters).pathTarget`). The mount's announcement of a face that does not fit reads the same judge, so it changes the same way.
|
|
798
|
+
- **Consumers.** @server S-2476: `src/task-mcp.ts` passes the engine's reason sentences through `redactSecrets` at `:499` only and the deployment leg's two warns (`web-admin-client/skills-mcp.ts:267/283`) not at all — with this release no engine sentence of the table carries the caller's text, so the special case can go; a pin that matched a quoted tool name, key or word in an engine sentence re-pins to the mark. @cli: a pin on one of these sentences re-pins the same way.
|
|
799
|
+
- **Pins.** `test/backlog2888-judge-sentences-withhold-caller-text.test.ts` — one cell per refusal of the table (the `sessionMetaKey` judge's four refusals and the preparation door's; the request meta's two; `toolAxes` unknown member / word / receipt fault; `toolFaces` eleven shapes; the face judge with a schema five; the door's content class, receipt path, string entry and list, lock key and credential kind): the sentinel never appears, nor a prefix of it, and the shape does. Existing sentence pins re-pinned in place.
|
|
800
|
+
|
|
801
|
+
### A peer that echoes its connection's credential into what it says about itself is read without it — one eraser, one needle (#2946; behavior change: an echoed credential is erased in a peer's account of itself, a name holding one is refused; closed sets: `ENGINE_NOTICE_CODES` +1 `mcp.credential_echoed`; exports: none) (@server @cli @client-core)
|
|
802
|
+
|
|
803
|
+
- **Before.** The request-echo eraser covered only failure text. A server that echoed the bearer it was sent into `serverInfo.version`, its instructions or a tool description, or an A2A peer that echoed it into its card, handed the credential to the status record, the model's tool card and every panel and probe downstream (server S-2476, v7.137.0 the same).
|
|
804
|
+
- **Now.** One eraser (`eraseSentCredentials`), one needle: the credential values the connection's seat answered that the withheld table holds (`PeerCarrier.credentials` — a value that names a secret, `namesASecret`: never a blank one, a placeholder word or a key shorter than eight characters, which would otherwise erase ordinary words from every description). Every remote text a successful dial or listing hands the engine — an MCP server's `serverInfo`, instructions and tool listing; an A2A peer's card — is read through it before anything bounds or neutralizes it: free text holding the needle, in any spelling the request-echo derivation gives it, is erased in place (the redaction mark); a NAME holding it is never rewritten, and neither is a tool's input schema (its structure: the property names the model sends) — the tool is not mounted (dropped through the disclosed lane, the drop record carrying the name erased), an A2A skill is not minted, an interface URL the card names is not used, a `serverInfo` record or a card name is not projected (a transport label a refusal names is free text, erased). Nothing else is taken: an account with no needle in it reads byte for byte.
|
|
805
|
+
- **The notice, three sentences.** *Who needs it*: the operator of a deployment wired to an endpoint that repeats what it is sent — its own logs and panels may hold the credential. *Who is hurt*: a consumer that pins `ENGINE_NOTICE_CODES`' cardinality (+1, nothing removed) or the operator-notice audience table. *Compensation*: `mcp.credential_echoed`, audience `operator`, `detail: { protocol: "mcp" | "a2a", server, where, sessionId, runId }`, `where` the closed set `CREDENTIAL_ECHO_SITES` (`server_info` / `instructions` / `tool_listing` / `agent_card`), never a value; once per (materialization, server, site) for MCP, once per (materialization, peer) for A2A.
|
|
806
|
+
- **The same family, the text pass (#2953).** `redactSecrets` / `redactHostLeaks` took `api_key=…` out of a text but let `apiKey=…`, `{"accessToken":"…"}` and `{"clientSecret":"…"}` through on both tiers, and the escaped form of a JSON string inside a JSON string (`\"api_key\":\"…\"`) for every name: the keyword row now starts a keyword where a name's words start — a camel hump included, the one hump `splitCamelCase` cuts the record-key view's names at — and reads its quotes escaped as well, so a name the record-key view calls a credential is taken out of a text too; a word that only spells a keyword (`hockey`, `myKeyboard=`) is still none. Pins: `test/backlog2953-camel-credential-names.test.ts` (three camel names × bare / escaped / nested × two tiers; the snake-case names unchanged; the controls; one name, one reading) and seven fixtures in `test/fixtures/secret-detect-fixtures.json` (marked tightening).
|
|
807
|
+
- **Consumers.** @server S-2476: the panel and probe faces that publish `serverInfo` and the tool listing now receive the erased account; the notice joins the operator lane's allow list if it filters by code. @cli / @client-core: a renderer of the operator notice lane gains one code.
|
|
808
|
+
- **Pins.** `test/backlog2946-credential-echo-in-metadata.test.ts` — a real Streamable HTTP MCP server and a real A2A peer on loopback, the seat answering a sentinel bearer: `serverInfo.version`, instructions and a tool description erased in place, a tool named with it not mounted and its drop record erased, one notice per site; a `serverInfo.name` holding it drops the record; the positive control reads byte for byte with no notice, and so does an account echoing a short dev key (no needle); the A2A card's description erased before its 240-character bound could cut inside the value, a skill id and the card name holding it refused; the Runner path's notice (operator, the detail above, no value).
|
|
809
|
+
|
|
810
|
+
### A seat answer the engine refuses is indexed before it is judged — the S-2463 shapes (#2868; behavior change: refused answers' credentials are withheld from every child; exports: none) (@server)
|
|
811
|
+
|
|
812
|
+
- **Before.** Since the peer seat (7.58.0), the seat's answer was judged first (`readPeerAnswer`) and only an accepted answer's credentials were taken into the withheld-value table; the release before took the credential headers in first and judged after. An answer refused for a value with a line break at its edge, a header named twice in two letter cases, or a line break inside a value therefore left its credential unindexed, and a variable of this host holding the same value reached every child (server S-2463).
|
|
813
|
+
- **Now.** One intake (`PeerCarrier`, C-R946 A): the answer's credential values are read from the answer as given — a header member by the credential vocabulary over its value as written and as the transport would send it, an environment member by the env entry reading, both lanes whichever the peer is — held, and only then judged. A blank value indexes nothing. Each value is held on its own, so one that cannot be withheld does not keep the others out (the answer is then refused after the rest were held). The header resolution (`resolveProtocolHttpHeaders`) no longer holds anything: the intake is the one place.
|
|
814
|
+
- **Pins.** `test/backlog2955-seat-answer-indexed-before-judged.test.ts` S1–S3 (one cell per S-2463 shape: refused, and the value held); `test/backlog1754-held-values.test.ts` re-pinned to the intake (the five call sites of `holdOwnCredentialValues(`; the protocol door cells drive a carrier).
|
|
815
|
+
|
|
816
|
+
### A worker variable equal to a refused request credential no longer reaches the host shell (#2955; behavior change: the 7.56 order restored; exports: none) (@server)
|
|
817
|
+
|
|
818
|
+
- **Before.** The same order as above (judge first, hold after) let a worker variable whose value equals a credential the seat answered in a refused answer reach a `Bash printenv` on the host lane (server S-2535, 7.138.0 review H5: `{ Authorization: V, authorization: V }`).
|
|
819
|
+
- **Now.** The intake above holds the refused answer's credentials first, so the variable is withheld from the child, as it was before 7.58.0; a plain variable is handed on.
|
|
820
|
+
- **Consumers.** @server S-2535: the 🚧 cell (row 12 of the real-process group D) turns green on this release (PICK7600).
|
|
821
|
+
- **Pins.** `test/backlog2955-seat-answer-indexed-before-judged.test.ts` S4 (a real dial through the public probe, a real `NodeExecutionEnv` child under `"all"`: the refused credential's worker variables do not reach the child, the control does), S5 (a member of the other lane), S6 (blank values index nothing), S7 (an accepted answer held once, at the same intake).
|
|
822
|
+
|
|
823
|
+
### A sync cursor refused on its store names two ways out and takes neither — rebind or clear (#2957; behavior narrowing: the documented answer to a store-axis refusal changes; open to veto, C-R(随发车帖); exports: none) (@server)
|
|
824
|
+
|
|
825
|
+
- **Before.** #2836 (7.59.0) refused a cursor bound to another store — or to none — and named one answer for every refusal: run the round from no cursor. A host that took it after a store moved re-converged from an empty baseline: an entry deleted on either side since the last completed round came back from the other side, and no conflict was reported.
|
|
826
|
+
- **Now.** The store-axis refusal (`config.memory_sync_cursor_mismatch`, the same judge and code) names two ways out and what each costs, and the engine takes neither: *rebind* — when this store holds the entries the baseline was taken over (the same store moved to another root), persist the cursor with `store` set to this store's identity (`memorySyncStoreOf`) and sync again; *clear* — delete the cursor and sync from none, accepting that an entry deleted on either side since the last completed round comes back. A cursor with no store binding (written before cursors carried one) reads the same sentence. A scope mismatch names the partition's own cursor instead (a partition key, not a binding); a peer mismatch names its own two ways out (#2968).
|
|
827
|
+
- **Behavior narrowing, three sentences (open to veto).** *Who needs it*: a deployment whose sync layer's store moved, which must not have its deletes resurrected without being told. *Who is hurt*: a host that answers every `config.memory_sync_cursor_mismatch` by running from no cursor — @server's layer executor (`src/memory-sync-client.ts`, the `memory_sync_cursor_rebound` arm) — which now has to pick a way out per layer, as it already does for a cursor written before the binding (its `memory_sync_cursor_predates_store` arm). *Compensation*: the refusal is raised before any read or transport call, so a layer that stops on it loses nothing; rebind is one member set from `memorySyncStoreOf` (root export, #2956), and the two arms of the server's executor read one sentence.
|
|
828
|
+
- **Pins.** `test/backlog2957-sync-store-move-refused.test.ts` — a store moved whole to another root with a local and a central delete since the last round: the old cursor is refused with zero calls on the wire and the sentence names rebind and clear; rebind sends the local delete and lands the central one (neither comes back); clear costs what it says (no delete sent, the local delete undone); the unbound cursor reads the same way out; a scope mismatch names the partition's own cursor. `test/backlog2836-sync-cursor-store-binding.test.ts` comments re-worded (the cells unchanged).
|
|
829
|
+
|
|
830
|
+
### An MCP server can be mounted on a pipe the host supplies — `transport: { kind: "host" }` plus the leg's host seat (`RunInternals.mcpHostSeats`), through the one MCP pipeline every server uses; a seat that did not hand a request on is one failure word, `host_refused` (#2841, design/2825 §3 Q1-B, C-R932 + addendum 1; hard-breaking: two closed sets widen, open to veto)
|
|
831
|
+
|
|
832
|
+
- **Before.** A host that carries MCP over its own channel (a device bridge) had no mount: it could stand up a loopback HTTP MCP server per leg — where "the request never left" could only read as an HTTP status (`unknown`) or a JSON-RPC error (`yes`) — or pre-fill the exported connection pool under a stdio / http declaration that was not the connection's truth.
|
|
833
|
+
- **Now.** A declaration `{ name, transport: { kind: "host" } }` (no other transport member; no `elicitation`) dials through `RunInternals.mcpHostSeats.get(name)` — an `McpHostSeat` with one method, `request("tools/list" | "tools/call", params, signal)`. The engine's one adapter answers `initialize` itself (server name = the declaration's `name`, version `""` = not declared, capabilities `tools` only, no instructions), hands list / call to the seat with the request's own signal (aborted by the engine's abort, timeout or idle watchdog, and by the connection's close), drops an answer that arrives after its request was cancelled, and refuses any other method without handing it on. Listed `_meta`, the call's `_meta` (`sema/toolUseId`, the request meta, the session key), the intake, the manifest row and `tool_end` are the ones a stdio / http server gets. A seat that throws `McpHostSeatFailure({ delivered: "no", condition })` ⇒ `host_refused` / `delivered: "no"` / no liveness observation, the line "was not sent … sending it again is safe"; `{ delivered: "unknown", condition }` (or any other throw, in the engine's own words) ⇒ `unknown` / `unknown`, the outcome-unknown line and, for a write-capable tool, the verify-first warning; the remote's own `{ error }` ⇒ `protocol` / `yes`. A host seat's connection never enters the run tree's pool. A delegated child is handed the seats of the host servers it inherits; a retained child's snapshot keeps none and each wake hands the waker's (`createSubagentResume({ currentMcpHostSeats })`, filled by SendMessage and the steer-handle resume); a checkpoint resume reads the row from its config and the seat from its internals. No seat for a host declaration ⇒ that server fails its dial (`invalid_config` / `no`, `config.mcp_host_seat_missing`), siblings mount; a seat no host declaration names ⇒ one `config.mcp_host_seat_undeclared` operator line, nothing refused.
|
|
834
|
+
- **Hard-breaking (open to veto).** *What changed:* `McpServerSpec.transport` gains a third arm `{ kind: "host" }` (`MCP_TRANSPORT_KINDS` = `stdio` | `http` | `host`) and `McpFailureKind` gains `host_refused` (wire: `mcp[].errorCode`, `tool_end.errorCode`, a request error's `details.code`); `unknown` widens to "or the host seat cannot tell how the request ended". *Who is hurt:* a consumer that switches exhaustively over `transport.kind` or over the failure words fails to compile, and a runtime closed table sends the new words to its default arm. *How to migrate:* add the `host` arm (it names no command or url — render it as a host-supplied pipe) and a `host_refused` row (`delivered: "no"`, no liveness: not sent by the host, safe to retry); read `unknown` with its widened definition. @server (S-2426: implement the seat, hand it on every entry's internals, keep the hub's verify-first tail out of `condition` — the engine adds the tail once) @client-core @cli (projection / rendering of both words).
|
|
835
|
+
- **Closed sets.** `MCP_FAILURE_KINDS` +1 `host_refused` (delivery `"no"`, liveness none); new frozen list `MCP_TRANSPORT_KINDS` (lockstep with the union).
|
|
836
|
+
- **Exports.** +2 root values `McpHostSeatFailure`, `MCP_TRANSPORT_KINDS`; +4 root types `McpHostSeat`, `McpHostSeatMethod`, `McpHostSeatAnswer`, `McpTransportKind`; `RunInternals.mcpHostSeats`; `materializeMcpTools` +1 trailing parameter (`hostSeats`).
|
|
837
|
+
- **Pins.** `test/backlog2841-host-seat.test.ts` (real Runner: mount + list/call only + the call id in `_meta`; a refused listing ⇒ failed / host_refused / no, no liveness; an unknown call ⇒ unknown / unknown, the warning once for the write-class tool only; the remote's error ⇒ protocol / yes; a child dials the parent's seat itself; a retained wake uses the waker's seat, never the spawn's; a checkpoint resume dials the resume's seat; an undeclared seat ⇒ one line. Adapter under the SDK client: 1 000 failures leave no handler; an answer the protocol cannot carry (six shapes), an answer rewritten after it was returned, and a thrown value the engine cannot inspect each settle at once as `unknown` with no handler left and nothing unhandled; abort / timeout / close reach the seat's signal, a late answer is dropped; a method outside list / call is not handed on; a malformed declaration beside a seat of its name does not end the prepare. The door and the library entrance refuse a host transport with another member or with elicitation; no seat ⇒ that server fails, siblings mount; the probe reads it failed; a remote's error shaped like the verdict is `protocol`; the pre-filled pool path as it stands (#2843)).
|
|
838
|
+
- **Known limits.** Requests only (CC's SDK servers carry any message both ways) — no progress notifications, so a host call sits in the 5-minute idle bucket; the pre-filled pool path still leases a host-made connection and a re-dial dials its declaration (#2843 decides). C-R986 has ruled: from 7.61.0 a host-made connection entering the exported pool is refused loudly (`config.*` +1, with car-2929-fix1); do not rely on this path in 7.60.0.
|
|
839
|
+
|
|
840
|
+
### A Model the engine is handed is read once into a frozen snapshot, judged there, and only the snapshot is read afterwards — the model door at every seat, the catalog door at `new Runner` / `swapDeps`, `modelOriginOf(snapshot)` for a host's own identity lookups (#2846, with #2781 / #2778; design 2772-2781, C-R933 and its addenda 1 / 2; behavior narrowing; hard-breaking: three sentences below, open to veto; closed sets: none; exports: +1 root value) (@server @client-core @cli)
|
|
841
|
+
|
|
842
|
+
- **Before.** One resolution read the caller's Model object two to four times — the role-seat test, the identity judgment, a `select`'s judgment of every candidate and of the pick, the tier default's re-judgment — and each read ran the caller's code on the live object. An object whose members came from its prototype and threw read as an empty role record and fell to the default without a word; an accessor that deleted `id` between two judgments passed both; a Proxy throwing on `cost` surfaced from a `select` as a bare `TypeError`; a getter inside `cost` threw past the judgment. A catalog entry was judged only when a task named it, a tier binding a catalog key shadowed was never judged, the classifier seat's tier-relative pick handed on an entry no judgment read (#2778), and a degrading brain's fallback was deduplicated by an `id` read before the one it was dispatched with.
|
|
843
|
+
- **Now.** A Model is received by the model door wherever it is written — `TaskSpec.model`, a role seat, a role record's `model`, a tier binding, a catalog entry, a degrading brain's fallback — through the engine's one receipt in the declaration mode: a plain record, every own member read once, every level copied and frozen; then judged on the copy: every member one of the `Model` contract's (a retired one keeps its own `config.deps_retired_key`), a non-empty string `id`, a string `api`. Every refusal is `config.unknown_role` / `not_a_model_ref` naming the seat (the code and reason unchanged; the sentence now names what could not be read). The code does change for a member value the receipt cannot copy (an object of another prototype, a function, a bigint, a symbol) that a member's own judge refused before: on a task's model, a `Model.extraBody` (`config.invalid_argument`) or `Model.promptTraits` (`config.prompt_trait_unknown`) of that kind is now refused at the seat by the model door's code first (a host brain's own request-time model spec, no seat of the door, still meets `extraBody`'s judge). The catalog door receives a catalog generation whole where a Runner takes one — `new Runner` and `swapDeps` (atomic, as before) — every entry and every tier binding (a shadowed one included), then expands the bindings over the received catalog and freezes it. Every read of a catalog entry hands its snapshot (an entry of a catalog a host built and hands an exported function is received at that read). A `select` reads frozen data. A role map stays the caller's between operations (a deployment may change it in place) and is read once per operation — a task's resolution, a role's model if set, the preset's role base, the classifier seat, the deployment's subagent tier — so a branch and the resolution it takes read the same copy.
|
|
844
|
+
- **`headers` is a read port.** An own accessor at `Model.headers` is never called by the receipt: the snapshot's `headers` calls the caller's getter at each read — each request — so a credential the deployment rotates without a restart is read at the next request, and a getter that throws throws at that request, not at construction. A data `headers` is received like any other member.
|
|
845
|
+
- **Identity.** A snapshot is a fixed point (handed back as itself), and snapshots are interned by origin and content: the same unchanged object received again (a swap that keeps it, a tool-local roster that shares it) is the same snapshot, so "this word names the very model the child was seated with" answers as before; an object changed in place and received again is a new snapshot. The engine hands back its snapshots, never the caller's objects: `modelOriginOf(snapshot)` (root export) is the object a snapshot was received from; a value the engine never received is its own origin.
|
|
846
|
+
- **Hard-breaking, open to veto (@server @client-core @cli).** ① A Model that is a Proxy, a class instance or an `Object.create(…)` value, or that holds a member the receipt cannot copy (a function, a getter that throws, an object of another prototype), ran as long as its members could be read; it is now refused at the seat it is written. Who needs it: every reader that judged a Model and then used it (what was judged is what is used). Who is hurt: a host building Models from classes, Proxies or prototypes, and test fixtures doing the same (server's Models are object literals). Compensation: build the Model as a plain record (`{ ...instance }`). ② A catalog entry or tier binding that is no Model was refused only when a task first named it; it is now refused when the catalog is received (`new Runner`, `swapDeps`), naming `RunnerDeps.models.<key>` / `swapDeps.models.<key>` / `tiers.<name>`. Who is hurt: a deployment carrying a broken entry nothing selects (it now fails at boot or at the swap); server's entry judge drops such entries before they reach the engine. Compensation: remove or fix the entry the refusal names. ③ A Model member outside the contract was ignored; it is now refused. Who is hurt: a JS host or fixture carrying a key of its own on the Model. Compensation: put a provider's own parameters in `Model.params`. And one reading: a host that compares a Model the engine returns with its own Model objects by `===` (server: the `{ select }` default's catalog name lookup, the consolidation seat's billing comparison) reads `modelOriginOf(model)` instead.
|
|
847
|
+
- **Not in this change.** `roles` is not a hot-swappable seat (#2845, its three preconditions are a separate cut); between operations the role map is the caller's live object, as before.
|
|
848
|
+
- **Pins.** `test/backlog2846-model-door.test.ts` (five hostile forms × nine seats through the real Runner where the seat is the Runner's; the accessor that deletes `id`; a never-named entry; the member set; fixed point, interning in four forms and `modelOriginOf`; the classifier role read once; the `headers` read port, its poison and a real degrading chain rotating per hop; the tier marks; the tier-relative pick; the workflow allowlist).
|
|
849
|
+
|
|
850
|
+
### A store's constructor options and the retention door's input are read once, by the receipt law — no store keeps the caller's bag, and a TTL, sweep interval, eviction word, durability word or size bound that had no exit is refused (#2847, design 2772-2781 §1.3 / §1.4; behavior narrowing; hard-breaking: one reading, three sentences below, open to veto; closed sets: none; exports: none) (@server @client-core)
|
|
851
|
+
|
|
852
|
+
- **Before.** The bundled stores read their options off the caller's bag as they went: `InMemoryCheckpointStore` read its judge twice (once for the judgment, once for the `fence` declaration), `TtlSessionStore` read `repo` three times, re-read `opts.hooks` at every deletion and held `placements` as the caller's object, `InMemoryToolResultStore` held the caller's bag and read its bound at every write, `FileStorageBackend` asked a `retention` presence through the `in` trap, read three options twice and spread three nested records off the caller's objects. A getter that threw was a bare throw; a Proxy ran its traps; `defaultTtlDays: "abc"` never expired a session, a negative TTL expired every one, `evict: "nuke"` read as `forget`, `maxTotalChars: "abc"` read as unbounded. `assertRetentionCapability` / `assertRetentionWords` read `policy.maxAgeDays` two or three times and each store item twice.
|
|
853
|
+
- **Now.** Every bundled store — `InMemoryCheckpointStore`, `TtlSessionStore`, `InMemoryToolResultStore`, `FileStorageBackend` and each File store it builds (`FileCheckpointStore`, `FileSessionRepo`, `FileMemoryStore`, `FileToolResultStore`, `FileSessionPolicyStore`, `FileWorkflowJournalStore`, `FileUsageWindowStore`, `FileBackgroundAgentStore`, `FileMailboxStore`, `FileRosterStore`, `FileFileHistoryStore`) — receives its options through the options door (the receipt law: a plain record, every member read once; `config.invalid_argument`) and reads them only off that copy; a nested record is received where it is read; faces (a repo, an embedder, a hooks object, a judge) are kept as they are and called as they are. `TtlSessionStore` calls its deletion hook on the hooks object read at construction and holds `placements` as a frozen copy. The retention door receives its input bag, its policy (a receipt fault is `config.retention_policy`) and each store item once; a store is a face, its `retention` read once where it is judged (on its prototype too) — a getter that throws is `config.retention_capability`, as the executor's members already were. Refused, `config.invalid_argument`: `defaultTtlDays` not a finite non-negative number, `sweepIntervalMs` not a finite number, `evict` outside `delete` / `forget`, `durability` (and `placements.subagent.durability`) outside `durable` / `process-local`, `maxTotalChars` not a number.
|
|
854
|
+
- **Hard-breaking, open to veto (@server @client-core).** What changed: an options bag that is a Proxy, a class instance or an `Object.create(…)` value — and a nested options record of `FileStorageBackend` of those shapes — was read through; it is refused. Who is hurt: a host that builds store options from a class or wraps them in a Proxy, and one passing one of the bad values above (it ran with the silent reading). What to do: hand a plain record (server builds every store's options as object literals); write the value in its domain.
|
|
855
|
+
- **Pins.** `test/backlog2847-store-options-door.test.ts` (per store: a getter that throws, a Proxy that must not be asked, a class instance; an accessor that rewrites another option while read; the bound not held from the caller's bag; the judge read once with its `fence`; the hooks face read once; the placements copy; eleven bad values and their controls; the retention input: a Proxy list, an item getter, a store's prototype declaration admitted and one that throws refused, a policy read once, a Proxy policy).
|
|
856
|
+
|
|
857
|
+
### A host that takes a peer seat's answer at its own door reads it with the engine's own reader — `readPeerAnswer` is on the package root (#2863; behavior narrowing: none; hard-breaking: none; closed sets: none; exports: +1 root value, +2 root types; members: none) (@server)
|
|
858
|
+
|
|
859
|
+
- **Before.** The reader of a seat's answer (the kind and members, the lane's own member only, header and variable names, no line break or NUL in a value, `expiresAt`, the `authorizeUrl` law) lived in the leaf module; the package root exported the five answer types but not the function, so a deployment's intake gate that wanted to refuse a bad answer before dialing had to write the rules a second time, and a bad name could only fail loudly at the dial.
|
|
860
|
+
- **Now.** `readPeerAnswer(raw, lane)` is a root export, with `PeerLane` and `CarriedPieces` (its parameter and result types). It is the very function the engine's send runs: `{ carry }` (frozen pieces and their digest), `{ unauthorized }` (the seat's validated URL, if any) or `{ problem }` (names a member, never a value). The root name is the leaf's function (`===`), and the problem it returns is the sentence a failed send carries.
|
|
861
|
+
- **Consumers.** exports +1 value, +2 types, nothing else changes. @server: the 7.138.0 acceptance gate reads an answer with this function instead of its own copy of the rules; delete the copy.
|
|
862
|
+
- **Pins.** `test/backlog2863-small-root-exports.test.ts` P1–P4 (identity; sixteen refusals each naming the member and none echoing the value; the pieces an accepted answer gives are the pieces a real `PeerCarrier` send carries, same digest; a refused answer's problem is the failed send's text). Smoke decision: `readPeerAnswer` in `SMOKE_CHECKED_EXPORTS`.
|
|
863
|
+
|
|
864
|
+
### An A2A peer's failed row carries the failure record an MCP server's failed status carries — `errorCode` from the same closed set, `delivered`, `authorization` — read by one classifier and written by one row writer (#2865; behavior narrowing: none; hard-breaking: none; closed sets: none new — `MCP_FAILURE_KINDS` is now read by a second protocol; exports: +1 root type (`McpFailureFields`); members: +4 optional on `A2aPeerStatus` and on a failed `A2aRefreshResult`) (@server @cli @client-core)
|
|
865
|
+
|
|
866
|
+
- **Before.** A failed A2A peer row had `name`, `status` and `error` only, while the same seat refusal on an MCP server read `credential_unavailable` (or `unauthorized`) with `delivered: "no"` on the status, the manifest row and `tool_end`: one fact, two protocols, two readings — a consumer could promise "the same word on every face" for MCP only.
|
|
867
|
+
- **Now.** A peer whose materialization (or whose refresh) threw gets `errorCode`, `delivered` and, for `unauthorized`, `authorization` (`{ reason: "none", authorizeUrl }` for a seat that answered `unauthorized`), minted by `classifyMcpFailure` at the dial and spread by `failureFields` — the same two functions an MCP status row uses, so a member the record gains rides both. A seat that throws, times out or answers what the engine cannot carry is `credential_unavailable`; a card naming an endpoint outside the declared origins is `invalid_config`; a refused connection is `connect_refused`. **Stated reading:** an error the A2A client itself raises for a non-2xx status or a JSON-RPC error carries no structure the classifier reads, so it reads `unknown` (delivered `no` at the dial) — `error` stays the text to show, never the field to key on. A ready row, a successful refresh entry and the refresh entry for an undeclared peer name (nothing was attempted) carry none of the members.
|
|
868
|
+
- **Consumers.** members +4 optional on `A2aPeerStatus` / `A2aRefreshResult`, present iff the row records a thrown failure; `McpFailureFields` joins the root types. @server: the "same word on three faces" promise can cover A2A rows for the seat refusals; @cli @client-core: a roster that already keys on an MCP status's `errorCode` reads A2A rows the same way.
|
|
869
|
+
- **Pins.** `test/backlog2865-a2a-failure-code.test.ts` (three seat refusals on a real loopback card peer, each compared with the MCP status of the same seat — equal records; invalid_config, connect_refused, the stated `unknown`; a ready row has no member; every word is in `MCP_FAILURE_KINDS` and `authorization` rides `unauthorized` only; the refresh receipt's failed, refreshed and undeclared entries).
|
|
870
|
+
|
|
871
|
+
### The redaction mark table is a root export and frozen — `REDACTION_MARKS` (#2887; behavior narrowing: the table is frozen (a write throws in strict code); hard-breaking: none; closed sets: none; exports: +1 root value; members: none) (@server)
|
|
872
|
+
|
|
873
|
+
- **Before.** The root carried only the bare mark (`REDACTION_MARK`); the three shape marks (`[redacted-credentials]`, `[redacted-url]`, `[redacted-path]`) were spelled by hosts that needed to tell which shape the engine withheld — a second copy of strings the engine's passes read from one table.
|
|
874
|
+
- **Now.** `REDACTION_MARKS` (`whole`, `credentials`, `url`, `path`) is exported from the root and is `Object.freeze`d: every pass reads it at call time, so a writable exported table would let a host change what the engine writes. `REDACTION_MARK` is the table's `whole`.
|
|
875
|
+
- **Consumers.** exports +1 value. @server: delete the hand-written marks in the workflow notify journal and read the table.
|
|
876
|
+
- **Pins.** `test/backlog2863-small-root-exports.test.ts` M1–M4 (identity with the leaf and four spellings, frozen; each shape's spelling is what `redactSecrets` / `redactHostLeaks` write for that shape; every write, delete and add on the table throws and the engine's output does not move). Smoke decision: a presence row and an identity row (`SMOKE_IDENTITY_EXPORTS`, which also asserts frozen).
|
|
877
|
+
|
|
878
|
+
### A store twin outside the package folds a rule-store sync-join delta with the engine's own landing pipeline — `applySyncJoin` and `RuleSyncJoinBase` are root exports (#2831; behavior narrowing: none; hard-breaking: none; closed sets: none; exports: +1 root value, +1 root type; members: none) (@server)
|
|
879
|
+
|
|
880
|
+
- **Before.** `RuleWriteDelta` exported the `sync-join` arm "for out-of-repo store twins" and the declaration said `applySyncJoin` was for them, but only the function's own module exported it, and the package exposes no deep path: a SQL backend meeting the arm could only refuse it.
|
|
881
|
+
- **Now.** `applySyncJoin(current, delta, nowMs)` and the type of the current raw facts it takes and returns (`RuleSyncJoinBase`) are exported from the root — the function both bundled stores run in their write step, with its refusals and drops (a tombstone naming no observed add refuses the whole delta; an inbound record claiming this replica's actor above its counter is dropped) unchanged.
|
|
882
|
+
- **Consumers.** exports +1 value, +1 type. @server: the SQL rule store can implement the `sync-join` arm with it and stop refusing.
|
|
883
|
+
- **Pins.** `test/backlog2863-small-root-exports.test.ts` J1–J5 (identity with the leaf; an inbound rule lands beside the current one; the whole-delta refusal for a tombstone with no observed add reaches the twin; a delta of another kind is refused by name). Smoke decision: `applySyncJoin` in `SMOKE_CHECKED_EXPORTS`.
|
|
884
|
+
|
|
885
|
+
### A session's offloaded tool results can be enumerated for a move — `ToolResultStore.listBySession` on the memory, file and example Postgres stores, with a contract-kit leg (#2894; behavior narrowing: none; hard-breaking: none; closed sets: the contract kit's optional-member report word `member` +1 (`"listBySession"`); exports: +2 root types; members: +1 optional on `ToolResultStore`; the file backend's `*.owner.json` record gains a `ref` member) (@server @client-core)
|
|
886
|
+
|
|
887
|
+
- **Before.** A store had `put`, `get`, `ownerOf` and the sweep `deleteBySession`, and nothing that named what a session owns: the results a transcript points at by reference could not leave the store they were offloaded to, so a session moved to another store read references it could not dereference.
|
|
888
|
+
- **Now.** `listBySession?(sessionId)` answers `{ entries: [{ ref, provenance }], unattributable, unaddressable }`, selected exactly as `deleteBySession` selects: by the owner recorded at the winning write, never by parsing the ref, `taskId` ignored in the match (the entry's `provenance` keeps the one recorded), an unowned entry never listed and counted in `unattributable` (store-wide, the figure a sweep reports). There is no second content path: the bytes are read with `get` (bounded slices) and written to the other store with `put(ref, content, entry.provenance)`, whose write-once election makes a repeated move a no-op and a ref already owned by a different owner a typed refusal. No order is promised. The scope wrapper does not forward the member, as it does not forward the sweep. The file backend's folded file names are a digest of the ref, so its owner record now states the ref (`{ sessionId, taskId?, ref }`; a reader that ignores members it does not know — this version's, unchanged since 5.28.0 — reads it as before).
|
|
889
|
+
- **Reading the two counts.** `unattributable` is rows no session can claim (store-wide); `unaddressable` is one thing only: rows this session owns that were written **before** the record carried the ref (file backend, versions before this one) — their ref cannot be recovered from a digest, so they are counted and not listed (never under a guessed ref); they are still deleted by the sweep, so `entries.length + unaddressable` is what a sweep of the session then deletes. A store whose rows were all written by this version or later reports `unaddressable === 0` for every ref form; it is not a second kind of entry and there is no migration for old records. A move that must be complete should check `unaddressable === 0`.
|
|
890
|
+
- **Consumers.** members +1 optional on `ToolResultStore` (implementers are not broken); `ToolResultSessionListing` / `ToolResultListedEntry` join the root types. The contract kit's `onOptionalMember` report word widens from `"deleteBySession"` to `"deleteBySession" | "listBySession"`: a caller that annotated its callback with the narrower literal type needs the wider one (an inferred callback is unaffected). @server: your `toolResultStoreContract` call sites, and the session-sync manifest can include the external results of a session (list, then `get`/`put`); @client-core: the orchestration of that move reads the two counts above. Out of scope here: a fork to a new session id does not carry offloaded results, and the orchestration.
|
|
891
|
+
- **Pins.** `test/backlog2894-tool-result-list-by-session.test.ts` (L: a session moved between two stores through the listing alone on memory and file — bytes, owners, idempotent repeat, typed refusal, other session's and unowned rows stay, listing = what the sweep deletes; F: the file layout — ref read from the record for folded names, a record without the member unaddressable and still swept, a record naming a ref stored elsewhere not believed, identity-named entries, damage and owner-less content unattributable, an owner record whose content an interrupted sweep removed listed as the sweep counts it, seven ref forms all listed with `unaddressable === 0`; W: the scope wrapper) and the contract kit's new optional leg run on all three bundled backends (`test/cross-backend-shared.ts` reports `verified`).
|
|
892
|
+
|
|
893
|
+
### The file checkpoint ledger's event kinds are one exported closed set, and a data root's ledger reads with the store's own fold and no store — `CHECKPOINT_LEDGER_EVENT_KINDS`, `readCheckpointLedger` (#2832; behavior narrowing: none; hard-breaking: none; closed sets: one new, `CheckpointLedgerEventKind` (7 words); exports: +2 root values, +3 root types) (@server)
|
|
894
|
+
|
|
895
|
+
- **Before.** The seven event kinds the file checkpoint store folds out of `checkpoints.jsonl` (`put`, `resolve`, `reopen`, `execution`, `expire`, `delete`, `steer_append`) lived in a private registry, and the fold ran only inside the store, behind the ledger directory's writer fence. A program that wanted to know what a data root's ledger held without opening the store (the server's drain check) copied the kinds and wrote its own fold. Its copy had six kinds; `delete` has been a seventh since 7.56.0, so the first `delete` line in a ledger counted as an event nobody understood.
|
|
896
|
+
- **Now.** `CHECKPOINT_LEDGER_EVENT_KINDS` (frozen, seven words) is the one list: the store's discriminator fence reads it, and it is total over the event union both ways at compile time (`CheckpointLedgerKindsAreTheEventUnion`). `readCheckpointLedger(root, { onCorruptRead? })` replays snapshot and ledger through the store's own fold — `applyCheckpointEvent` behind the same fence, via `replayLedger`, the one function the authority's own bootstrap now runs after taking its fence — and answers `{ settled: true, rows: ReadonlyMap<token, Checkpoint>, events }`. It takes no writer fence (`checkpoints/LOCK` is neither created nor consulted: a live store keeps its directory, a dead owner's fence is not pruned), opens no append handle and creates nothing (a root with no ledger reads as no rows and the directory stays absent). A kind outside the list refuses the read as it refuses the store's replay (`checkpoint.unsupported_version`, `detail.reason` `ledger_event_unknown`); an adoption in flight refuses it (`adoption_in_flight`). Beside a compacting writer the pair is bracketed by the snapshot's version: a snapshot replaced between the two reads is redone, at most three times, and a directory that will not hold still answers `{ settled: false }` — never the last read.
|
|
897
|
+
- **Closed sets.** New `CHECKPOINT_LEDGER_EVENT_KINDS` / `CheckpointLedgerEventKind` (registered, `docs/CLOSED-SETS.md`); no existing set moves.
|
|
898
|
+
- **Consumers.** exports +2 values (`CHECKPOINT_LEDGER_EVENT_KINDS`, `readCheckpointLedger`), +3 types (`CheckpointLedgerEventKind`, `CheckpointLedgerReading`, `ReadCheckpointLedgerOptions`); nothing else changes. @server: in `scripts/drain-check-local.mjs` delete the hand-copied `KNOWN_LEDGER_EVENTS` and the fold; call `readCheckpointLedger(root, { onCorruptRead })`, count `pending` off `rows`, take `corrupt` from the sink, read `settled: false` as your existing "files kept changing" answer and a thrown refusal as rc 2.
|
|
899
|
+
- **Pins.** `test/backlog2832-checkpoint-ledger-reader.test.ts` (A: the seven words, frozen, in the root, each admitted by reader and store and the retired `steer` refused; B: a six-word ledger reads, a `delete` removes its row and a snapshot row too, the rows equal a real store's after real operations; C: a root with no ledger creates nothing, a live store's fence is neither contended with nor disturbed, a dead owner's fence is not pruned; D: unknown kind / adoption in flight refuse like the store, damage reaches the sink; E: a snapshot replaced under the read is redone and never served, three replacements yield `settled: false`).
|
|
900
|
+
- **Known limits.** The reading is a view at one instant, not a lease: a live store may resolve a row a moment later.
|
|
901
|
+
|
|
902
|
+
### A task whose role chain supplies no model is refused with the roles family's code — `config.unknown_role` with `detail { field, reason: "no_model_for_role" }` — instead of a bare `Error` (#2833; hard-breaking, open to veto: type only; behavior narrowing: the refusal gains a code and a detail, its sentence is unchanged; closed sets: `CheckpointErrorReason` +1 (`no_model_for_role`, 31 → 32); exports: none) (@server @client-core)
|
|
903
|
+
|
|
904
|
+
- **Before.** A task that names no model, whose requested role and every role down its fallback chain supply none, ended `resolveTaskModel` in `throw new Error('No model for role "…": …')`: no `code`, no `detail`. Every other refusal of that family — a word the catalog does not hold, a value that is no model reference, a role word outside the vocabulary — was already `config.unknown_role` with `detail { field, reason }`, so a host telling a caller's configuration fault (400) from an engine fault (500) matched the sentence's opening words for this one arm, and the run's terminal carried the message alone.
|
|
905
|
+
- **Now.** The arm is the family's fourth: the one constructor (`modelBindingRefusal`) builds `config.unknown_role` with `detail { field: "roles.<requested role>", reason: "no_model_for_role" }` (`roles.default` for a task that names no role); the sentence is unchanged, so a text match still holds. A fresh run's terminal states it as every sibling arm does (`terminal.code`, `terminal.detail.detail.{ field, reason }`); a seat that names a word the catalog does not hold still wins with its own `unknown_model_ref`.
|
|
906
|
+
- **Hard-breaking (type only, open to veto).** *What changed:* the closed set `CheckpointErrorReason` gains `no_model_for_role`, and a refusal that had no `code` has one. *Who is hurt:* a host or a backend that keeps an exhaustive table over the type (`Record<CheckpointErrorReason, …>`, a `switch` ending in a `never` default) is tsc-red until it places the word; a consumer that treated a failed terminal with no `code` and this sentence as an engine fault now sees a caller's configuration fault. *Compensation:* place the word beside `unknown_model_ref` (same disposition: the caller's configuration, fix the roles or name a model); read `code` / `detail.reason`, not the sentence — the sentence is unchanged, so nothing is lost while you move.
|
|
907
|
+
- **Closed sets.** `CheckpointErrorReason` +1, `no_model_for_role` (31 → 32; `docs/CLOSED-SETS.md`, `docs/INTEGRATION-CORE.md`).
|
|
908
|
+
- **Consumers.** @server: `side-query.ts` classifies the two arms of this refusal by the sentence's English prefix; read `code` (`config.unknown_role`, with `detail.reason` where you need the arm) for both, and retire the prefix table. @client-core: a failed terminal with `code: "config.unknown_role"` now also arrives for a task that named no model, with the `coded` account its siblings carry.
|
|
909
|
+
- **Pins.** `test/backlog2833-no-model-for-role.test.ts` (A: a fresh run with no model — `failed` / `config.unknown_role` and the `coded` account on the result, the done event and the resolved result, the seat the requested role's; B: the direct throw carries code and pair and keeps its opening words; C: an unheld word still wins with `unknown_model_ref`, a bound role runs; D: the set and the registry name the word).
|
|
910
|
+
|
|
911
|
+
### `delegation.transcript_integrity` is announced only where transcript durability is declared — the `full` subagent transcript tier — and is no longer minted under `rows` (#2919; behavior narrowing: one notice stops being minted on one tier; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
912
|
+
|
|
913
|
+
- **Before.** The notice says a durable agent row binds a transcript session the session store attests gone — "the declared transcript durability is being contradicted" — and it was minted on every deployment that kept agent rows, whatever the deployment declared. Under `rows` (rows and terminal snapshots survive a restart, transcripts follow a process-local store's fate) a gone transcript is the declared fate, not a contradiction: the notice was false there, and a deployment on that tier met it for each agent it read after a restart.
|
|
914
|
+
- **Now.** The three sites that meet a gone transcript — SendMessage's backlog-drain preflight, SendMessage's revival preflight and AgentTranscript's durable leg — hand the announcer the tier their mount derived (`resolveSubagentTranscriptTier`, the derivation the wiring manifest's `fleet.subagentTranscripts` rides), and the announcer asks one predicate, `declaresTranscriptDurability` (`full` only). `full`: unchanged (once per (scope, handle) per process). `rows` / `none`: no notice, and a `rows` call does not spend the once-per-handle latch. The per-call refusals the model reads (`resume.session_not_found`, `not_found`, the `queue_full` drain sentence) are unchanged on every tier. `createAgentTranscriptTool` now derives its tier at mount from its own seats, as the SendMessage mount already did: a `sessions.placements.subagent.durability` that is no `StoreDurability` is refused there (`config.store_durability_invalid`), as the prepare-time manifest refuses it.
|
|
915
|
+
- **Consumers.** @server: expect no `delegation.transcript_integrity` from a deployment whose session store declares `process-local` subagent placement (or declares none); one from a `full` deployment is now a true statement of a contradiction — alert on it.
|
|
916
|
+
- **Pins.** `test/backlog2919-transcript-integrity-tier.test.ts` (A: the predicate over the three tiers, the announcer per tier, the latch not spent under `rows`; B / C / D: each of the three sites at `full` (one notice, the refusal intact) and `rows` (no notice, the same refusal byte for byte); E: the first-party mount through `prepareDelegationSurface` with the real factories — the notice reaches `deps.onNotice` at `full`, neither mounted tool delivers it at `rows`).
|
|
917
|
+
|
|
918
|
+
### `config.models_swapped` names the catalog generation it announces — `detail.generation`, a digest of the candidate's key material — so one swap announced by N Runners folds to one (#2920; wire +1 detail key, additive; behavior narrowing: none; hard-breaking: none; closed sets: none; exports: none) (@server @client-core)
|
|
919
|
+
|
|
920
|
+
- **Before.** A host that hot-swaps the model catalog on several Runners at once (the server's four boot Runners) announced one event as four lines: each line mints its own `occurrenceId` — the identity of THIS delivery — and the rest of the payload was two counts, so nothing in a line said which lines were the same swap.
|
|
921
|
+
- **Now.** `detail` is `{ models, tiers, generation, occurrenceId }`. `generation` is `cgv1:` + a sha-256 over the catalog's key material: the model names the candidate declares (sorted) and the tier bindings in force over them (each tier word with the catalog word it binds, sorted; a binding that is a `Model` object has no word and stands as `null`) — never the catalog's content. Every Runner swapped to the same model names under the same tier bindings announces the same `generation` (and its own `occurrenceId`, unchanged); a swap that ends on another model name or another tier binding announces another; the order the names were spelled in does not matter. Equal key material is one generation — two swaps that change only what a name points at read alike, because the line is an operator breadcrumb, not a content fingerprint. A swap with `tiers` omitted digests the Runner's current bindings.
|
|
922
|
+
- **Wire +1 (additive).** *What changed:* one detail key on the existing `config.models_swapped` line (an untyped `detail` record: no exported type moves). *Who needs it:* a consumer that deduplicates one swap announced by several Runners — fold by (`code`, `generation`). *Who is hurt:* none — a consumer that ignores unknown detail keys is untouched; one that pinned the line's key set (`models`, `tiers`, `occurrenceId`) must add `generation`. *Compensation:* none needed beyond the key.
|
|
923
|
+
- **Consumers.** @server: S-2497 — the notice allow-list reads `generation` and folds the four boot Runners' lines to one row by (`code`, `generation`); keep the per-delivery `occurrenceId` for exact-duplicate suppression. @client-core: forward `generation` with the line if you project the detail.
|
|
924
|
+
- **Pins.** `test/backlog2920-swap-generation.test.ts` (A: four Runners swapped to one candidate — one generation, four occurrence ids; Runners booted on different catalogs still agree; one Runner swapped twice; B: one model name more / different, a tier binding or tier word moved or dropped, none declared ⇒ another generation; tiers omitted ⇒ the current bindings' generation; spelling order and content do not move it; C: counts and `occurrenceId` unchanged, no catalog content in the line, the face lines carry no `generation`; D: the digest's shape and the object-binding `null`).
|
|
925
|
+
|
|
926
|
+
### A background agent's task-list row names the session its child runs on — `TaskRegistry.list()` rows gain `sessionId?`, read from one anchor that every successful release of that session ends (#2924 / #2925, design/2861 r1 ①, ruled C-R958 ①; additive wire key; hard-breaking: one engine method's signature, open to veto; closed sets: none; exports: +1 root type `TaskListRow`) (@server @client-core @cli)
|
|
927
|
+
|
|
928
|
+
- **Before.** A list row carried no child session id, so a serving layer that wanted to open a background agent's conversation had no way to get there from the row. The id existed twice inside the engine — on the in-process handle and on the durable record — and they could drift: releasing the child's session cleared only the durable copy, and each place that released a bound child session wrote its own "release, then clear" (four of them; the stillborn background fork's never cleared, and the orphan-placement sweep's release cleared nothing).
|
|
929
|
+
- **Now.** A `background_agent` row carries `sessionId` while its anchor stands: absent in the startup window before the bind (the key is not there at all — not an `undefined` value), present from the bind (fork rows: the branch; other rows: the child's pre-minted session), still present on a terminal row whose session was kept (until its release or the terminal GC), absent once a release of that session succeeded; absent on every other task type (a workflow's originating session is not this key). One reading: `childSessionAnchorOf(handle)`. One law: a successful release of the child's session ends the anchor on the handle and the durable record together, matched on the pair (row, session) — a late clear for a session the row no longer names leaves the current anchor alone. Every release of a bound child session in the delegation lanes goes through one helper handed the release of the store that OWNS the session (a host-forked branch releases through the host store); the orphan-placement sweep's release ends a terminal handle's anchor too.
|
|
930
|
+
- **Also fixed (#2925, existing defect).** A background child whose retention degraded — the pin failed, or the retain ledger was disposed while the pin was in flight — had its pre-minted session released and its anchor cleared, yet still launched on that same id: the running child's durable record carried no transcript anchor (a store that recovered later kept it that way). The lane now binds the launch session again right before the launch (a no-op when the row already names it; `bindBackgroundAgentSession` leaves a row already anchored to that session as it is). And a disposal that dropped the entry but was still releasing it when the pin landed is now waited for: the entry's release runs once, and both degrade arms wait for it — before, the launch could overtake it, so the late release deleted the session the child had just created on that id and ended the running row's anchor.
|
|
931
|
+
- **Hard-breaking (open to veto).** *What changed:* `TaskRegistry.releaseDurableTranscriptAnchor(id)` is now `releaseDurableTranscriptAnchor(id, sessionId)` — the session id is required and the clear happens only while the row still names that session. *Who is hurt:* a caller of the old one-argument form; outside core there is none (`git grep releaseDurableTranscriptAnchor origin/main` in sema-server `772c2943`, sema-cli `7fb306ab`, sema-client-core `45c9279`, sema-sdk `65d8beb`, sema-connectors `fa0cbcb`, sema-desktop `32d66de`: 0 hits). *How to migrate:* pass the id of the session whose release just succeeded.
|
|
932
|
+
- **Consumers.** wire +1, additive and optional: `TaskRegistry.list()` / `liveTasks()` rows `sessionId?` (present-iff above). @server S-2450: `ROW_KEY_DISPOSITION` in `src/http/routes/background.ts` turns compile-red on the new key by design — state `keep` and project `rows[].sessionId?`; the server's `ReturnType<TaskRegistry["list"]>[number]` is unaffected, `TaskListRow` names the same type. @client-core CC-1054: the session row's navigable id. @cli: a row may now carry `sessionId`; nothing to change unless you render it. Only this process's handles are listed — a row known only to another process's durable store is not in `list()` (KL-2924-a).
|
|
933
|
+
- **Deviation candidate.** CC 2.1.309's SDK task rows (`background_tasks_changed`) carry no session id; its `local_agent` task id is the transcript key itself, and its `remote_agent` state carries `sessionId` — the nearest precedent. sema's child transcript key is a separately minted session id, so the row carries it; to be registered in the divergence ledger.
|
|
934
|
+
- **Exports.** +1 root type `TaskListRow` (the named row of `list()` / `liveTasks()`; zero behavior).
|
|
935
|
+
- **Pins.** `test/backlog2861-task-list-session-anchor.test.ts` (I1 source scan: the row mints the key only from `childSessionAnchorOf`; absent before the bind / bound after; store-less registration carries it; a release ends it on row, handle and durable record; a late clear for an earlier session leaves the current one; shell / monitor / workflow rows never carry it; the orphan sweep's release ends a terminal handle's anchor, a failed one keeps it; each bound release site — retained ledger disposal, resolve leg, reject leg, stillborn fork — ends it on success and keeps it on a throwing release; a host-forked branch is released through the host store; a fork row keeps its branch once terminal; #2925: after a failed pin and after a disposal mid-pin the running row names the session the child runs on, a disposal still releasing when the pin lands is waited for (nothing releases the child's session after its launch), and with the store down through the window the recovered store's record names that session; real load path: the root-exported `defaultTaskRegistry` under the session's own `{ owner: sid, sessionId: sid, scope }` lists the child's session and drops it with the release).
|
|
936
|
+
- **Known limits.** KL-2924-a — `list()` lists this process's handles only; a row carrying `sessionId` says the registry has not released the anchor, not that the session store still holds the session.
|
|
937
|
+
|
|
938
|
+
### An ancestor's extensions judge a delegated child's call at the child's gate, on their own bus, as the child's — `createPreToolUseConstraintPolicy` is removed and a screening entry is `{ installation, hookEnv?, …regime }` (#2429, mods wave three S2b, design/1398 wave 3 §3.3 B, C-R777 / C-R940; HARD-BREAKING, open to veto: a host that rebuilds a screening entry with the factory, or assembles its own screening policy for `runToolGate`, no longer compiles; behavior change V1–V8 below)
|
|
939
|
+
|
|
940
|
+
- **Before.** An ancestor's `classic.PreToolUse` chain rode a child's delegation as a **policy layer** folded after the child's caller policy (`createPreToolUseConstraintPolicy`), while the same installation's `tool.check` was raised at the child's gate: one fact (an ancestor's installation judges a descendant's call), two mechanisms. The policy form carried no identity (`agentId` absent), dropped the screen's `additionalContext`, recorded its deny as `deniedBy: "policy"` with a `classic.PermissionDenied` `source: "policy"`, said nothing when it allowed, and judged only the bytes the child's policy had rewritten.
|
|
941
|
+
- **Now.** Each inherited installation is one judge at the child's gate, on its own bus (`InheritedInstallation`, `inheritedInstallations` — one list read by both judging events): `classic.PreToolUse` at phase 1 right after the child's own bus (and at every re-screen: the fold's second look, the approved-edit pass), `tool.check` at the verdict read as before. V1 the e is the child's (`agentId`, `identity`, `permissionMode`, `cwd`) with the environment the installation was installed against (`env`); V2 its `additionalContext` reaches the child's call result; V3 its deny is the hook's own refusal — `deniedBy: "hook"`, `extension` = the registration, no `classic.PermissionDenied`; V4 its allow is no objection (an installation answers only its own leg's questions) and is disclosed as the `hook` member's shadow on the child's card (`allowRuleShadowed`); V5 it judges the bytes it is given, before the child's policy, and the policy's rewrite of them once more (a deny or another form there refuses); V6 its ask is settled where it was frozen (the installation's approver, durable mandates, classifier) at phase 1 — refused ⇒ the call is refused, approved ⇒ that question is answered, approved with an edit ⇒ the gate's approved-edit pass takes the edit, floated ⇒ the call stays marked for the park; V7 the synthetic read / consolidation-write judges no longer see the screen as an inherited policy (it refused every probe as "nobody can be asked"); like the child's own PreToolUse, it is not consulted for synthetic probes. When the installations rewrite one after another, each earlier judge of the call sees the new bytes once; a refusal is recorded over the bytes its judge judged. V8 the screen's waits — every raise, the leg's own included, and every installation's settlement — end with the run or with the call (the per-call signal, as the gate's other synchronous waits): a turn that cancels a call no longer leaves a PreToolUse hook pending on the run's lifetime (the call is refused, fail-closed, "cancelled").
|
|
942
|
+
- **Hard-breaking (open to veto) — H2.** *What changed:* the inherited screen is no longer a policy layer: `createPreToolUseConstraintPolicy` is removed from the root, and `InheritedGate.parentConstraints[]` is `{ policy, …regime }` (a caller policy) or `{ installation, hookEnv?, …regime }` (a screening installation: the bus `admitModChain` returned, or a leg's own); an entry carrying both, neither, or an installation no engine admission mounted is refused (`config.mods_invalid` at prepare, `resume.parent_constraint_mismatch` before a resume's claim); the entry member `mods` is retired. *Who is hurt:* a host that rebuilds a screening entry across processes with the factory (@server `createParkedReviveInheritedGate`, if it rebuilds one), or that assembles a screening policy of its own for `runToolGate` — a compile error. *How to migrate:* rebuild with `{ installation: await admitModChain({ deployment, task }), hookEnv: <the env>, …the frozen regime }`; the checkpoint's constraint digest and the park format are unchanged (the entry still projects opaque).
|
|
943
|
+
- **Behavior change (open to veto) — H3.** *What changed:* an ancestor's screen judges a descendant's call in the gate's phase 1 (V1–V6). *Who is hurt:* a host reading the child's `classic.PermissionDenied` `source: "policy"` as "the ancestor's screen refused" (that observation is gone; the call's `tool_end.gate.disposition` reads `deniedBy: "hook"` with `extension`), and a screen written for post-policy bytes only (it now sees the original bytes first, then the rewrite). *How to migrate:* read `tool_end.gate.disposition.deniedBy` / `.extension`; make the screen idempotent over two judgments of one call.
|
|
944
|
+
- **Consumers.** @server: a parked revive that rebuilds an inherited chain rebuilds a screening entry as above (S2a found no factory call in `src`); trace projection of an ancestor's screen deny moves `policy` → `hook`. @cli: a child's card / refusal text for an ancestor's screen deny is the hook's sentence (via server). @client-core: no closed-set change; `ToolGateInput.inheritedToolChecks` is renamed `inheritedInstallations` (a host driving `runToolGate` directly). @test: the cells below are the black-box criteria.
|
|
945
|
+
- **Exports.** −1 root value `createPreToolUseConstraintPolicy`. `ToolGateInput.inheritedToolChecks` → `inheritedInstallations`; `ConstraintChainLayerView.policy` optional.
|
|
946
|
+
- **Pins.** `test/backlog2429-mods-w3-s2b.test.ts` (real Runner, the root delegating through a spawn tool: V1 the child's `agentId` / identity on the ancestor's e; V2 its context in the child's result; V3 `deniedBy: "hook"` + `extension`, no PermissionDenied on the child; V4 the child's own question stands, the card's hook shadow names the ancestor's registration; V5 original then rewritten bytes, a refusal of the rewrite refuses; V6 refused / approved at the frozen approver with the child's approver never asked, an approved edit judged and run; K2′ two judgments both the child's; stand-in one judgment; C1 a cancelled call ends a pending inherited screen; C2–C4 a refusal in phase 1, in the fold's second look and in the approved-edit round is recorded over the bytes its judge judged; S the entry fault and a leg refusing a malformed chain). The inherited-gate / mods families are re-pinned, each change marked intended (V1–V8, H2) in place; `gate-station-boundary-ticks` "screening → fold" counts 11 microtask ticks, was 9 — two awaits inside the screening face (one look per seat), none between station groups.
|
|
947
|
+
- **Known limits.** The ancestor's approver is asked at phase 1, before the child's caller policy runs — a call the child's policy then refuses has already put one card to the ancestor's person (before, the policy's refusal came first), and a policy rewrite of the call puts the installation's question again over the rewritten bytes. An ancestor's handlers now see the model's bytes before the child's policy rewrites them (as the child's own handlers always have): a child policy that redacts an argument no longer hides it from them. The resumed leg's re-screen of an approved call raises the leg's own bus only, as before.
|
|
948
|
+
|
|
949
|
+
### A background task's output or full result has a reader that is not TaskOutput — a cut agent report and a workflow's full record are stored and named by a `ReadToolResult` ref, a Monitor watch writes its stdout and stderr to an output file, and every list of tasks names each task's read handle (#1608 R2 / R3 / R4 / R7 with the #469 placement of the new reader, design/1056 §2.5, ruled C-R675 / C-R976; behavior change: notification, receipt and table text; the TaskOutput tool itself is still mounted — its removal is a later step; hard-breaking: none; closed sets: none; exports: none; members: +1 optional `ToolExecuteContext.taskArtifacts`, +1 optional `SendMessageToolOptions.taskArtifacts`, +1 optional `RunWorkflowToolDeps.taskArtifacts`, +2 `TaskRegistry` methods `recordArtifactRef` / `readHandleOf`, `formatWorkflowRun` takes an optional bounds argument) (@server @cli @client-core @test)
|
|
950
|
+
|
|
951
|
+
- **Before.** A background agent's completion frame carried 2 000 characters and said "read it with TaskOutput where mounted"; the overflow reached a store only when a TaskOutput poll happened, and a report between 2 000 and 4 000 characters was never stored. A workflow's per-agent rows were only in TaskOutput (and capped at 60 rows / 5 partial outputs there). A Monitor watch had no output file — its stderr was read only through TaskOutput's spool. The post-compaction table said "check output with TaskOutput", and a task whose every pending notification was evicted was told TaskOutput "may still serve its spool".
|
|
952
|
+
- **Now.** A report longer than the frame carries is stored whole (redacted, content-addressed: task id + a digest of the text) in the run's offload store BEFORE the frame is announced, and the cut line names it: `read the full text with ReadToolResult (ref "…")`; with no store, or a write that failed, the cut names no ref and says so (and keeps the SendMessage / TaskOutput readings while TaskOutput is mounted). A workflow completion stores its full record — the result and every agent's row and finished output, with no display bound — the same way and names it in `diagnostics`, lists the agents that did not complete inline (up to five), and names the journal apart, with its own use (the step log `resumeFromRunId` replays); a rejection whose thrown value carries no run of its own reads the run store's record, and building the record can never cost the failure frame. A Monitor watch mirrors stdout and stderr into an output file minted by the background Bash's one mint; the start receipt and the terminal frame name it, its last writes land after TaskStop's kill and before the terminal frame, and Read's root-fence exemption covers it as it covers a background command's. Each row of the post-compaction table names the task's read handle (`output: Read <path>` / `result: ReadToolResult (ref "…")`; a revived agent drops its previous cycle's), and a dropped task's disclosure names its read handle or says its row is no longer readable. TaskStop's "already finished" receipt says the completion notification carries the final state. A page-back of a task's stored result is placed as a poll of that task is (`ReadToolResult`'s boundary legs are per call now: another tree's agent, a workflow run or a row gone read as an off-target read; the calling tree's own agent and any other ref travel none) — the new reader is no way around the cross-boundary table.
|
|
953
|
+
- **Behavior change (open to veto) — a retired name on an allow list.** *What changed:* a retired tool name on a `toolPolicy` allow list (the caller's policy or a session's stored `toolAllow`) no longer refuses the run with `config.legacy_tool_name`; it is reported by the `config.toolpolicy.unmatched_names` advisory with the name's retirement line (it grants nothing, so the policy is narrower than written). A retired name on a deny or ask list still refuses. *Who is hurt:* nobody loses a guard — a host that relied on the refusal to find a stale allow entry now finds it in the advisory. *How to migrate:* nothing; rewrite the entry to the current name when the advisory names it.
|
|
954
|
+
- **Consumers.** @server: the workflow completion notifier's `diagnostics` now carries the record's ref sentence, but the completion-inbox journal drops `diagnostics` (`workflow-notify-journal.ts`, on the premise "TaskOutput reads it") — that premise ends with the TaskOutput removal, so the bridge should carry `diagnostics` (or the ref) before then. @cli / @client-core: completion text changes only; no wire key changes; the wiring manifest's roster entry for `ReadToolResult` reads `boundaryLegs: "per_call"` (was `[]`). @test: the lanes below are the black-box shapes.
|
|
955
|
+
- **Pins.** `test/backlog1608-agent-result-artifact.test.ts` P1–P6 (a 3 000-character report stored whole; content-addressed refs; the frame after a slow put; failed and absent stores; the real Runner lane reading the ref with TaskOutput excluded); `test/run-workflow-tool.test.ts` "#1608 R4" R4a–R4f (rows inline, the record past the display bounds, a bare and a forged throw, the frame after a slow put); `test/backlog1608-monitor-output-file.test.ts` P1–P6 (stdout + stderr in the file, the exemption's access and env tests, no-file and failed-append disclosure, a stalled append never holding the kill, an in-flight append landing before the terminal frame, the real Runner lane reading the watch's stderr with TaskOutput excluded); `test/backlog1608-task-read-handles.test.ts` T0–T5 (T5: the page-back's placement against a poll's); `test/design469-r3-boundary-legs.test.ts` (the catalog row); `test/backlog1355b-unmintable-segment-judge.test.ts` "#1608 M9" M9a–M9c.
|
|
956
|
+
- **Behavior narrowing (open to veto) — a stored result's origin is in its ref (#3092).** *What changed:* the task whose result an artifact holds is a segment of the artifact's ref (`tr_<session>~fold.task~<task>~<digest>`, a segment the tool-output mint never produces), and the process-local ref → task table that remembered the newest 4 096 refs is gone; a page-back of a stored result whose task row is gone, belongs to another tree, or was stored by another process now reads as an off-target read — before, a ref that table had forgotten or never saw travelled no legs, so under an armed, governed tree the read went unrecorded and the next device call did not ask. *Who is hurt:* a governed run that pages back a stored task result after its row is gone, or after a restart, now owes the record and the confirmation an off-target read owes; offloaded tool output is unchanged (it never carries the segment). *How to migrate:* nothing; a ref stays an opaque handle — read it back verbatim, never parse it (the segment is the engine's own reading, not a format promise). Pins: `test/backlog3092-artifact-origin-in-ref.test.ts` A0–A6. The edge table that mapped a ref to its task only inside one process is gone with it, so a ref read in another process or after eviction is accounted against its task like any other (#3027).
|
|
957
|
+
- **Known limits.** A running background agent's progress is not readable before it ends (its completion frame is the reader). A missing or incomplete command output file is the next entry's (#3025). TaskStop on a watch waits for the file's last append after the kill (the bash lane's order) — an append that never settles holds the stop's receipt. A background agent's output spill (the overflow a TaskOutput poll stores under its own ref) is not a result artifact, and its page-back still travels no legs. The one-shot wait (R5) and the completion-sink resolution (R1) are the next entry's (#3025); the TaskOutput removal is a later step.
|
|
958
|
+
|
|
959
|
+
### A one-shot submission waits for the background agents and workflow runs it started before it ends; a background command's missing or incomplete output file names a ref for what was retained; a whole-session notification loss carries the background-task table (#3025 = #1608 C1: R5 / R1 / R6 / R7 and the R2 gap arm of design/1056 §2.5.3; the CC 309 print-mode split, `cli309.js` :289218-289219; behavior change: the one-shot ending and receipt / notification text — open to veto; hard-breaking: four option members removed; closed sets: none; exports: none; members: −4 (below), +1 optional `taskArtifacts` on the background-command and Monitor registration inputs) (@server @cli @client-core)
|
|
960
|
+
|
|
961
|
+
- **Before.** A one-shot submission (`TaskSpec.oneShot`, e.g. headless `-p`) ended as soon as the model's turn did. Every loop-type launch receipt (background `Agent`, a forked background agent, `SendMessage` continuing an agent, `Workflow`, a still-running agent's poll) therefore told the model to block on `TaskOutput({ task_id, block: true })` itself, and a model that ended its turn lost the result; a background command's receipt said the same. Each background producer read its own completion sink (the call's run lane for an agent, the mount's sink for a command, a watch and a workflow). A command whose output file could not be created, or whose append failed, kept its retained output reachable only through TaskOutput. A whole-session notification loss said only that the lost tasks were no longer known. A read handle of `""` was named as one.
|
|
962
|
+
- **Now.** A loop-type background task (a background agent, a continued agent, a workflow run) admitted onto a run's lane owes that lane its terminal frame; where a one-shot run would end, it waits for the next such frame — already on the steer lane when the wait wakes — and hands it a turn. A cancel ends the wait (the run's walltime timer included: the answer the run gave stands and `task.interrupt_unconsumed` reports the stop), and so does a 600 s ceiling counted from the first wait — the reference's print-mode ceiling (`cli309.js` `mFt=600000`), a constant, not a knob. A background command or a Monitor watch is never waited for — its lifetime is its process's — and a one-shot command receipt says: "This is a one-shot submission — the engine does not wait for background commands; run it in the foreground (with a timeout) if you need its output before the submission ends." The loop-type receipts carry their ordinary notified wording in a one-shot run; none teaches a blocking wait. Every background producer resolves its completion sink through one function (the call's run lane, else the mount's sink). A command whose output file is missing or incomplete stores what the engine retained (the spool's head and tail, its gaps stated) and its terminal frame names the `ReadToolResult` ref — on every terminal face, the Monitor run-teardown face included. A whole-session loss line carries the run's background-task table — live and finished rows, each with its read handle (the post-compaction announce's renderer) — or says the run has none to read; a blank output path or ref names nothing. The wait owes per cycle (an agent continued while its earlier frame is on its way owes two; a parked frame a continuation voids releases its cycle), and any input reaching the run while it waits (a steer, a child's message) wakes it to take that turn first.
|
|
963
|
+
- **Hard-breaking (four option members).** *What changed:* `SendMessageToolOptions.oneShot`, `SendMessageToolOptions.retrievalToolMounted`, `TaskToolOptions.oneShot` (`createTaskOutputTool`) and `TaskPollOptions.oneShot` (`TaskRegistry.pollTask`) are removed — nothing reads them any more (a one-shot submission is no completion mode of its own; the retrieval-tool seat steered only the one-shot advice). *Who is affected:* a library caller that passes one of them in an object literal gets a TypeScript excess-property error; server, cli and client-core (origin/main) pass none of them. *What to do:* delete the argument — the behavior it chose is now the engine's own (the one-shot ending waits).
|
|
964
|
+
- **Behavior change (open to veto).** *What changed:* a one-shot run no longer ends while a background agent or workflow run it started is still owed to it — it waits for the completion (bounded by its own walltime, a cancel and the 600 s ceiling); a host that mounts Bash, Monitor or Workflow inside a run with its own notification sink now has completions delivered to the run's lane the call carries (the Agent lane's precedence). *Who is affected:* a `-p` caller whose submission used to return right after a background launch now returns after the background work finishes; a host relying on its own sink receiving a run-launched command's completion. *What to do:* bound a one-shot submission with `limits.maxWalltimeMs` if it must return by a deadline; a host that needs its own copy of completions observes them through `RunInternals.onTaskNotification` (the lane calls it first) rather than a per-tool sink.
|
|
965
|
+
- **Consumers.** @server: the one-shot contract text the SDK carries for `oneShot` ("guidance only … block-wait via TaskOutput") no longer describes the engine — the engine now waits for loop-type background completions before the submission ends; a request-level timeout on `-p` submissions meets the background work's duration. @client-core: `src/oneShotWireCaps.ts`'s header ("core 换发 block-wait 指引", "谁受害:无 —— 键只改模型指引文案") — the key now changes when a submission ends. @cli: a local port of the one-shot receipt wording, if kept, should drop the blocking-wait sentence.
|
|
966
|
+
- **Pins.** `test/backlog3025-oneshot-ending.test.ts` O1–O11 (real Runner: a child released from the parent's own Stop station — the one-shot ending waits for its completion and answers from it, an interactive run does not wait, a completion that never comes runs to the walltime, a background `sleep 60` is not waited for, a held workflow run is waited for, a steer during the wait gets its turn first; the obligation book: per-cycle debts, a voided cycle, its bound and the 600 s ceiling); `test/backlog3025-completion-sink.test.ts` S0–S3 (the one resolution; a Bash and a Monitor started by a call carrying the run lane complete into it, not into their mount's sink); `test/backlog3025-command-record-gap.test.ts` C1–C5; `test/backlog3025-session-loss-table.test.ts` E0–E5 (E4 / E5 real Runner: a running command's file, a finished agent's stored result); re-pinned: `run-workflow-mount` (the real mount now waits for the workflow's completion), `run-workflow-tool`, `rb288-295-agents-face`, `task-registry`, `bg-lifecycle-fidelity`, `hands-fs`, `design385-rescan-fixes` G, `up424-a-tier-ports`, `prepare-delegation-surface`.
|
|
967
|
+
- **Known limits.** A wait the walltime or the ceiling ends does not name the task ids still owed (`KL-3025-a`). TaskStop on a Monitor watch waits for the output file's last append after the kill with no bound (`KL-3025-b`). A loop-type task launched by an EARLIER run of the session completes into that run's lane — a one-shot run does not wait for it.
|
|
968
|
+
- **Fix (before release).** The obligation book names a task by its lane key (`taskNotificationLaneKey`, the pending store's own bucket key) at admission, discharge and release, so a frame of another lane that carries a background agent's `task_id` settles nothing; an operator resume of a retained child (`SubagentSteerHandle.resume`) completes into the mount's own sink, as it did before this entry — no call of a run launches it, so it has no run lane to resolve (design/122) — while a resume through `SendMessage` completes into the waking run's lane. No wire change. Pins: `defectscan-notify-budget-surface` F3 (the book is a per-task bucket, and a cross-lane cell), `rb201-handback-review` FO-3 retained-resume ×2, `subagent-resume` ⑦ (unchanged, green again).
|
|
969
|
+
|
|
970
|
+
### `memorySyncStoreOf(backend)` is a root export — the one mint of a sync cursor's store identity, for a host binding a cursor taken before the binding existed (#2956)
|
|
971
|
+
|
|
972
|
+
- **Before.** The identity a sync cursor binds to (`file:<root of the store's directory>`) was minted only by `memorySyncStoreOf` in the memory-engine module, reachable by a deep path; a host that carries cursors persisted before `MemorySyncCursor.store` existed had to import that path or copy the formula to bind them.
|
|
973
|
+
- **Now.** The function is exported from the package root — the leaf's own function (one mint, pinned `===`), unchanged in behavior: a store without a directory still has no identity and is refused as a sync plane (`config.memory_sync_store`).
|
|
974
|
+
- **Exports.** +1 root value `memorySyncStoreOf` (a function; the consumer smoke list records it). @server S-2537: bind a legacy cursor before the round with `{ ...legacy, store: memorySyncStoreOf(backend) }` — `backend` is the store that layer's sync actually ran against when the cursor was written (the old executor's single `opts.backend`), not the store the layer resolves to today (S-2394 / #2818 move the global layer): binding to today's store reopens the #2836 deletion shape (C-R991 D-4 reading).
|
|
975
|
+
- **Pins.** `test/backlog2956-memory-sync-store-root-export.test.ts` — the root, the memory-engine barrel and the leaf hold one function; the smoke list decides it; the identity of a real File store and of a second instance over it; a legacy cursor is refused unbound and accepted bound through the root's function; a directory-less store refuses by code.
|
|
976
|
+
|
|
977
|
+
### Two store options are read by one integer reading — `TtlSessionStoreOptions.sweepIntervalMs` is a whole number of milliseconds from 1 to 2147483647 and `InMemoryToolResultStore.maxTotalChars` a whole number of characters from 0 (#2959)
|
|
978
|
+
|
|
979
|
+
- **Before.** `sweepIntervalMs` was judged finite-and-positive only, so `1.5` (Node truncates it to 1 ms) and any value past 2147483647 (Node reads it as 1 ms) armed a background sweep that ran back to back, silently; `0` and a negative were read as "no sweep". `maxTotalChars` was judged "a number, not NaN" only, so `-1`, `1.5` and `Infinity` were taken as bounds (`Infinity` read as "no bound").
|
|
980
|
+
- **Now.** One reader (`readIntegerOption`, `src/core/integer-option.ts`) judges both: absent is the option's default (no sweep; an unbounded store), a whole number inside the range is itself, anything else refuses at construction with `config.invalid_argument`, naming the option and spelling a number (any other value is named by its type only, never repeated). The bound is read once at construction. `0` for `maxTotalChars` is still the tightest bound (everything but the just-written ref is evicted).
|
|
981
|
+
- **Behavior narrowing (open to veto).** *What changed*: a sweep interval of `0`, a negative, a fraction, a non-number or past 2147483647, and a result-store bound that is negative, fractional, infinite, past 2^53-1 or a non-number, now throw where they were accepted. *Who is hurt*: a deployment that passed `sweepIntervalMs: 0` to mean "off", `maxTotalChars: -1` to mean "tightest" or `maxTotalChars: Infinity` to mean "unbounded" (none in sema-server, whose result store passes 64000000 and whose own caching store has its own option; sema-cli's `sessionManager` has its own too — local checkouts read, inferred for the rest). *Compensation*: omit the option for "off" / "unbounded", and write `0` for the tightest bound; the refusal sentence says which.
|
|
982
|
+
- **Pins.** `test/backlog2959-integer-option-gates.test.ts` — eight bad sweep values and nine bad bound values, each refused with the code and with no timer armed (fake timers); the bundled and the Runner-shared store alike; the controls that stay green (1, 1000, 2147483647 arm exactly that delay; `0`, a real cap and the largest exact integer hold; omitted is unbounded); the bound is read once; the sentence spells numbers and never repeats a secret-shaped string; both constructors read through the one reader.
|
|
983
|
+
|
|
984
|
+
### A peer seat's answer is held to the grammar of the send that carries it, read from its own members only, with `expiresAt` from 0 (#2961)
|
|
985
|
+
|
|
986
|
+
- **Before.** The engine's judge carried a header value the send then refused — U+2028, a character past U+00FF (Node's HTTP layer throws on it when the request is built), a control byte inside Latin-1, DEL — so "can carry" and "can send" disagreed; an `expiresAt` below zero was a finite number and was carried; an env value holding a lone surrogate was carried and the child read U+FFFD in its place; and the answer's members (`kind`, `headers`, `env`, `expiresAt`, `authorizeUrl`) were read through the prototype chain, so a member the answer's prototype (or a polluted `Object.prototype`) supplied was taken as the seat's own.
|
|
987
|
+
- **Now.** A header value is held to Node's own HTTP header-value grammar (tab, printable ASCII, U+0080–U+00FF; the empty value and U+0085 are carried as they are on the wire); an env value is held to what a spawn hands the child unchanged (no NUL, no line break, no lone surrogate); `expiresAt` is a finite number from 0 (a stamp past every clock, `Number.MAX_VALUE` included, still never expires, as an absent one); the answer's members are its own enumerable members, read once into an inert snapshot. A refusal is `config.peer_answer_invalid`, names the member and never repeats the value.
|
|
988
|
+
- **Behavior narrowing (open to veto).** *What changed*: an answer holding a header value outside the grammar, an env value holding a lone surrogate, a negative `expiresAt`, or a member supplied only by a prototype now refuses the send (`credential_unavailable`, delivered `no`, nothing sent) at the ask instead of failing at the send or being read as the seat's. *Who is hurt*: a seat whose vault holds a credential with a character past U+00FF (it already failed when the request was built), a seat that built its answer as `Object.create(base)` with members on `base`, and a seat that answered a negative `expiresAt`; sema-server's seat (`src/peer-seat.ts`) answers plain objects with own members (local checkout read). *Compensation*: put the members on the answer itself; encode a credential into the header grammar (ASCII, base64); omit `expiresAt` or answer 0 or a real stamp.
|
|
989
|
+
- **Pins.** `test/backlog2961-peer-answer-value-grammar.test.ts` — the judge against Node's `validateHeaderValue` for every character up to U+02FF and for the shapes beyond it on both header lanes (http, a2a); the exact boundary; prototype-supplied answer / headers / `expiresAt` / `env` / `authorizeUrl` members and a polluted `Object.prototype` not read; `expiresAt` from 0; the env lane (a lone surrogate, NUL, line breaks refused; every carried value reaches a real child byte for byte); and through the real MCP http entrance a value the send cannot carry is `credential_unavailable` with no call sent while an upper-Latin-1 value reaches the endpoint.
|
|
990
|
+
|
|
991
|
+
### A background agent's session anchor changes by release and a fresh bind, never by being written over; an empty session id is no anchor (#2963)
|
|
992
|
+
|
|
993
|
+
- **Before.** `bindBackgroundAgentSession(id, sessionId)` on a row already anchored to another session overwrote the anchor without a release (the earlier session lost its owner row, nothing said so), and an empty session id was taken as an anchor (`sessionId: ""` on the row and its durable record).
|
|
994
|
+
- **Now.** A bind of another id onto an anchored row throws (the row keeps its anchor on the row, the handle and the durable record, and nothing is written); an id that is no non-empty string throws whatever the row holds; the same id again is still the no-op it was; a bind for a row that is gone or is not a background agent's is still silent. The sanctioned change is `releaseDurableTranscriptAnchor(id, sessionId)` then a bind. CC 2.1.309's `remote_agent` rows are built with their session id once (and rebuilt from the sidecar on restore); it has no re-anchor path, so there is nothing to follow.
|
|
995
|
+
- **Behavior narrowing (open to veto).** *What changed*: the two binds above throw where they were accepted. *Who is hurt*: a caller that re-bound a row to a different session without releasing the first (the engine's three bind sites bind the same id again or an unanchored row — none re-binds), and a caller that passed `""`. *Compensation*: release the first anchor, then bind; pass the real session id. Two existing pins are re-pinned to the new law (the late-clear pair-match pin and the tier-3 late old-lane write pin): the first now releases before the second bind, the second enqueues its late write as the release of the anchor.
|
|
996
|
+
- **Pins.** `test/backlog2963-bind-session-anchor-law.test.ts` — the second bind throws naming the row and no session id, with row / handle / durable record on the first and no durable write; repeated refusals; the same id is a no-op with no write; release then bind works; a store-less registration holds the law; five bad ids on a fresh and on an anchored row; a missing row and a workflow row stay silent.
|
|
997
|
+
|
|
998
|
+
### A woken retained child is a running agent in its tree's delegation pool — a resume cycle is counted for exactly its own life, so the concurrency cap sees every child that runs (#2998, ruled C-R982 (a); security narrowing — runaway fan-out, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
999
|
+
|
|
1000
|
+
- **Before.** The delegation concurrency cap counted a running child by its registry row or, on a lane with no row, by the pool's local in-flight count — and only the spawn doors charged that count. A synchronous child retained for its steer handle and woken with `handle.resume(…)` ran with no row and no charge: invisible to the cap, so a full pool still admitted a fresh spawn (cap 1: two running). A child woken by SendMessage revived its row and was counted.
|
|
1001
|
+
- **Now.** The gate's one reservation, `occupy(kind)`, is split from its verdict: `admit` is the two cap verdicts in front of `occupy`, and a resume cycle occupies without the verdicts — a cycle that revived its row is counted by the row, a cycle with no row is charged to the pool's local half (the handle's own spawn gate), given back where the retained entry's running claim is (the settle, and a launch that throws). A launched wake always reaches its settle: cancelling the previous cycle's parked completion frame is contained and disclosed on the resume's notifier (site `subagent.resume.park_cancel`), where a throwing registry unsubscribe used to leave the cycle undrained and its entry running for good. A woken child is still never refused by a full pool: CC 2.1.309's resume path takes a concurrency slot without reading the cap.
|
|
1002
|
+
- **Behavior narrowing (open to veto).** *What changed*: while a handle-woken child runs, the tree's next Agent spawn is refused at a full pool (`delegation.concurrency_cap`), where it was admitted. *Who is hurt*: a deployment that wakes synchronous children through steer handles and spawns beside them at the cap (no sema-server or sema-cli reader of the in-flight count; the count is engine-internal). *Compensation*: none needed beyond waiting for a woken child to settle; the cap is the deployment's `RunnerDeps.delegationEntryCaps`.
|
|
1003
|
+
- **Not done, put to clay.** Refusing a wake at a full pool (C-R982 (b)) diverges from CC 2.1.309 and is not done. A tier-3 revival of the same row is refused at a full pool today while a retained wake is not; which way the two are made one is the same question.
|
|
1004
|
+
- **Consumers.** none to change (@server @cli: no reader of the in-flight count).
|
|
1005
|
+
- **Pins.** `test/backlog2998-resume-occupies-pool.test.ts` (real Runner: the SendMessage wake at a full pool resumes and is counted — 3 and 5 running read 3 and 5; the handle wake at a full pool runs and the gate reads 2 for 2 running; a handle wake on an empty cap-1 pool refuses the next spawn and its settle gives the slot back; a launch that throws gives it back and the child stays resumable; a parked frame whose cancel throws after the launch still lets the cycle settle and give the slot back, the throw disclosed; the occupancy kind follows the row and is given back once).
|
|
1006
|
+
|
|
1007
|
+
### A caller's write-capable tool that declares no permission seat is named at load under every asking mode, whatever policy layers are wired — the auto classifier never rules on it unless a rule or a policy asks (#2966; disclosure only, the routing is unchanged — C-R218 ②, registered divergence `caller-tools-self-seat`; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
1008
|
+
|
|
1009
|
+
- **Before.** The load-time ungated-write warning (`RunnerDeps.onError`, phase `config`) named a caller's tool (`TaskSpec.tools`) only when it declared `effect: "write"` and the leg wired no policy layer and no PreToolUse judge. A tool with no `permissionSeat` answers for itself (C-R218 ②): under `default`, `auto` and every other asking mode the mode's question never reaches its calls, so in `auto` the classifier never saw it — and once any policy layer was wired the operator was told nothing; a caller's tool answering to `Bash` / `Monitor` without a declared write was never named. A caller write tool the mode's question does reach was named UNGATED when no layer was wired — one declaring `permissionSeat: "passthrough"` (its `unstated` question; the classifier, in `auto`), one under `plan` (plan's own question), one declaring a write path target (the write gate) — and a request tool the run excluded was named too, spending the deployment's one warning for that shape.
|
|
1010
|
+
- **Now.** One reading for a request tool (`spec.tools`, mounted under its own name — an excluded or displaced entry is not named): it is a surface when it is write-capable (declares `effect: "write"`, or answers under its name or an alias to a shell-face name) and carries no egress / irreversibility mark. A caller's own tool (one the engine does not define) under a mode that asks is named when no question of the mode reaches it (`modeQuestionReaches`, `src/core/mode-policy.ts`: the unstated question reaches a tool declaring the `passthrough` seat, the write gate a declared path write and, under `plan`, every tool that is not read-only), whatever policy layers are wired (a layer that does not name it covers nothing, the reading the server-tool arm already gives); every other request tool — and every one under `bypassPermissions` — is named when no effect-aware layer is wired, as before. The component reads `write tools under <mode> [...]`, and the warning adds that such a tool answers for itself, that in `auto` the classifier rules only on what a rule or a policy asks, and that `permissionSeat: "passthrough"` puts each call to the mode's question. When an effect-aware layer is wired, the warning's lead says no question of the mode reaches the named calls instead of telling the operator to wire a policy. Once per deployment and tool-set shape, at prepare; never per call.
|
|
1011
|
+
- **Not changed.** The auto classifier answers every ask that survives the fold, as before; a seatless caller tool still runs unasked by the mode (the reference mounts a host's tool as an in-process MCP tool whose `passthrough` permission check asks and, in auto mode, is classified — sema keeps the self-answering seat, C-R218 ②). The engine's removal guard still asks a person for a protected removal on a call that answers to a shell-face name, a caller's tool included (`dangerous_delete`, every mode).
|
|
1012
|
+
- **Consumers.** @server: the warning text gains the caller-tool component and sentence; a log reader keyed on `UNGATED` keeps matching. @test: black box — a seatless `effect: "write"` caller tool under `auto` with a policy layer runs, the classifier is called 0 times, one warning names it; the same tool declaring `permissionSeat: "passthrough"` is classified and not named.
|
|
1013
|
+
- **Pins.** `test/backlog2966-caller-tools-unasked.test.ts` ①–⑨ (real Runner; base readings in the file head); `test/major1-ungated-write-tools.test.ts` unchanged.
|
|
1014
|
+
|
|
1015
|
+
### The auto strip's protocol-namespace arm is deleted: a covering allow entry is judged like a path / name / host entry (#2967; rule −1, no behavior change on any call a prepared leg mints; hard-breaking: none; closed sets: none; exports: none) (@test)
|
|
1016
|
+
|
|
1017
|
+
- **Before.** `autoStripped` stood a covering entry (`mcp__srv__*`, `mcp__srv`) down in `auto` when the call answered to a shell-face name — an arm no call reaches: a covering allow entry reaches only names in a protocol namespace, a caller tool's name or alias carrying `__` is refused at prepare (`config.tool_name_invalid`), and a server's or a peer's tool is minted without aliases.
|
|
1018
|
+
- **Now.** A covering entry stands down on a shell call only under `TaskSpec.classifyAllShell`, as every non-shell kind does. 7.59.0's criterion G9.d carries a correction: its last clause (the protocol-namespace entry reaching a shell alias) is retired, not observed — the package face cannot build it.
|
|
1019
|
+
- **Pins.** `test/backlog2558-classify-all-shell.test.ts` A1 re-pinned (A1a the door refuses a caller name / alias in a protocol namespace, A1b a materialized server tool has no alias, A1c the covering entry's strip reads only the declaration).
|
|
1020
|
+
|
|
1021
|
+
### An agent definition declares the MCP servers its leg connects to — `AgentDefinition.mcp`, in the `TaskSpec.mcp` form, judged by the door that judges a task's own list (#2595; additive; behavior: two choices stricter than the reference, open to veto; hard-breaking: none; closed sets: none; exports: none; members: +1 optional `AgentDefinition.mcp?`, +1 optional `servers?` on `ToolSpec.agentToolFaces` entries; internal, not index-exported: `snapshotAndValidateMcpEntries` (locked-config), `MCP_RESOURCE_FACES` (mounted-mcp), `withDefinitionServers` / `definitionAllowTools` (inherited-tool-pool), and `delegationCallIsExternal` takes an optional `inheritedServers`) (@server @cli @client-core)
|
|
1022
|
+
|
|
1023
|
+
- **Before.** A definition had no MCP seat: the leg spawned as an agent held only the servers its spawning run declared and its
|
|
1024
|
+
lists admitted, so a host holding an agent's own servers (an agent file's `mcpServers`, a request's `agents[].mcpServers`)
|
|
1025
|
+
could only refuse them, and an agent restricted to a few tools lost the servers it was meant to bring.
|
|
1026
|
+
- **Now.** `AgentDefinition.mcp?: McpServerSpec[]` — the entries a task's `mcp` takes, copied and judged where the definition
|
|
1027
|
+
is received (the delegation tool's assembly, the `TaskSpec.agents` door) by the same judge, code and sentence as the task's
|
|
1028
|
+
own list (the list-level sentence names `AgentDefinition.mcp of "<agent>"`), and judged again at the leg's prepare. They are
|
|
1029
|
+
declared on the leg spawned as the agent alone — its children inherit them as they inherit any spawner's servers, the
|
|
1030
|
+
spawning run never mounts them — after the servers the leg inherits: a definition server whose `mcp__<server>__` namespace an
|
|
1031
|
+
inherited one already holds is not declared (the spawning run's server holds the name); two of the definition's own under one
|
|
1032
|
+
namespace refuse the leg's mount (`config.mcp_server_name_collision`), as a task's own pair does. The definition's own allow
|
|
1033
|
+
list, when it has one, admits every tool of each of its own servers; its deny list still wins. Dialling, the shared connection
|
|
1034
|
+
pool of the run tree, a host-transport server's seat (the spawning run's seat of that name, read off the same mount as the
|
|
1035
|
+
pool, as a wake hands one; no seat ⇒ `config.mcp_host_seat_missing` on the leg, as for a task's own), `skipped`, the
|
|
1036
|
+
`mcp_unavailable` notice on the leg's first request (#1551) and refresh / re-dial are the leg's as for any server it declares. The workflow lane's
|
|
1037
|
+
`agent(…, {agentType})` judges and folds the definition's servers by the same rules. The memory content-origin judgment
|
|
1038
|
+
counts a delegation to the agent as reaching, through the child's own valve readings over the face's lists, the namespace of
|
|
1039
|
+
each of its own servers (classified by the server's declared `contentOrigin`; under a namespace the child also inherits a
|
|
1040
|
+
server for, that server too, by its own class) and the cross-server resource readers those lists leave (external, as their
|
|
1041
|
+
mint marks them). The judgment before the run reads `mcp__<server>…` entries naming a definition's own server as naming a
|
|
1042
|
+
declared server, on the definition's lists and on the spawning run's own (a ceiling that admits a definition's server).
|
|
1043
|
+
- **Stricter than the reference (open to veto).** *Ceiling*: the layers above the agent's leg (the spawning run's tool lists
|
|
1044
|
+
and the ones it inherits) still bound its own servers — a server they leave the leg's valve nothing of is never dialled (the
|
|
1045
|
+
reference appends an agent's server tools past its parent's tool pool). *Lock / compliance*: under an `mcp` configuration
|
|
1046
|
+
lock or a compliance deny of MCP servers the leg's door refuses the spawn (`config.locked_key` / the compliance refusal; the
|
|
1047
|
+
reference skips the servers, notifies and runs the agent). *Bad entries* are refused (the reference drops them with a debug
|
|
1048
|
+
warning). *Name references* (the reference's string form) have no form: a definition that should hold a server its spawning
|
|
1049
|
+
run declares names it in `allowTools` (`mcp__<server>`).
|
|
1050
|
+
- **Today's form, not the contract (KL-2595-a; temporary, retires with #3007).** A spawning run that declares no MCP server
|
|
1051
|
+
of its own has no mount: the host seats it holds reach no leg (a definition's own host-transport server fails its dial,
|
|
1052
|
+
`config.mcp_host_seat_missing`), and two legs spawned as the same agent in one turn dial a connection each instead of sharing
|
|
1053
|
+
one. With any server declared by the spawning run, both hold as above.
|
|
1054
|
+
- **Today's form, not the contract (KL-2595-b; temporary, retires with #3017).** A per-task definition's MCP credential
|
|
1055
|
+
references (`TaskSpec.agents[i].mcp`) are held by no one between the return of `runTaskStream` and the start of the leg
|
|
1056
|
+
spawned as that agent: a host that releases its hold in that window makes the leg's dial fail loud with
|
|
1057
|
+
`credential_unavailable`. The fix is the receipt taking `spec.agents[i].mcp` with `spec.mcp` and the door judging that copy.
|
|
1058
|
+
- **Consumers.** @server: project the request face `agents[].mcpServers` onto `AgentDefinition.mcp` (one `McpServerSpec` per
|
|
1059
|
+
record key; a name-only item maps to an `allowTools` entry `mcp__<name>`) and the agents wire projection lists the declared
|
|
1060
|
+
server names — S-2182 is unblocked; the request's per-key judges for `mcpServers[i]` apply to `agents[j].mcpServers[i]`
|
|
1061
|
+
unchanged, and a refused entry is the same refusal a task's own gets. @cli: an agent file's `mcpServers` reaches the engine
|
|
1062
|
+
through that request face (CC-996); an item the reference would have skipped is now a refusal. @client-core: the agents wire's
|
|
1063
|
+
server names are a projection position; no core call.
|
|
1064
|
+
- **Pins.** `test/backlog2595-agent-mcp.test.ts` (real Runner + stdio servers: own server offered and called, allow list,
|
|
1065
|
+
deny list, ceiling, namespace clash and an own duplicate pair, inheritance beside own, pool sharing, grandchild, per-task
|
|
1066
|
+
definition, `mcp_unavailable`, a host-transport server through the spawning run's seat in both lanes and without one; one
|
|
1067
|
+
judge at the definition, at the workflow fold and at the lock; the list judgment on the definition's lists and the spawning
|
|
1068
|
+
run's own; the memory face, resource readers and an inherited server of the same namespace included).
|
|
1069
|
+
|
|
1070
|
+
### The classifier seat is not asked again once its provider has rate limited it on three classifications in a row, and a status frame says whose model call it is about (#2876; behavior change, open to veto; hard-breaking: none; closed sets: +1 notice code `classifier.seat_rate_limited` (108 → 109), +1 knob refusal code `config.auto_mode_rate_limit_break_invalid`, +1 word set `BrainStatusSeat`; exports: none — the word set reads as `BrainStatus["seat"]`; wire +1 optional key `seat` on `status` events)
|
|
1071
|
+
|
|
1072
|
+
- **Before.** Every gated call walked the classifier ladder from its first rung. A classifier seat whose gateway answered HTTP 429 slept the brain's whole backoff ladder (`AUTO_MODE_CLASSIFIER_MAX_RETRIES`, 4 waits) on every call before the walk reached the main model behind it, and never recovered inside the run: a field run of 296 turns spent 5 133 s that way. The backoff's liveness frames (`status`, `phase: "rate_limited"`) carried nothing that said they were about the classifier's call, so on a client's screen the countdown read as the person's own turn's model being limited.
|
|
1073
|
+
- **Now.** A rung whose dispatch ended on the provider's rate limit (an HTTP 429 that outlived the brain's own backoff, read from the reply's structured `apiErrorStatus`, not from prose) on `RunnerDeps.autoMode.rateLimitBreakAfter` classifications in a row (default 3) is not asked again for the rest of the run: the walk starts behind it, on the main model, and the record on each gate says the move it is (`GateDisposition.classifier`: requested the seat, used the main model, `fallback` `{ from, to, cause: "error" }`). One operator notice, `classifier.seat_rate_limited` (`detail: { model, to, rung, consecutive }`), is minted on the classification that tripped it. Any other outcome of the seat (a ruling, a timeout, a different failure) zeroes the count; an outcome that ends after the run's signal aborted neither counts nor zeroes (a 429 the seat answered while the run was live counts, whatever becomes of the classification after it). A retired rung is skipped wherever it sits on the ladder, and a walk that retires several rungs reports each once. Only a rung with a rung behind it retires: under `classifierFallback: "none"` (one rung) the seat is asked every time and the round stays fail-closed exactly as before. The count is the run's own, in memory — never persisted, never shared; a later run asks the seat afresh. A bad `rateLimitBreakAfter` (not a whole number of at least 1) refuses every leg's prepare with `config.auto_mode_rate_limit_break_invalid` — never clamped, never read as the default. Every `status` event for a call made for the classifier lane (the seat's model, or the main model standing in behind it) now carries `seat: "classifier"`; the frames of the run's own turn carry no `seat` key at all, byte for byte as before.
|
|
1074
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* every deployment whose classifier seat shares a gateway or a quota that can answer 429 — it stops paying a full backoff per gated call for an answer that does not change, and its person stops reading the classifier's wait as their own turn's. *Affected:* a deployment that wants the cheaper seat to keep judging through a sustained rate limit — after three in a row the run's judgments come from the main model (dearer, and its judgment stands in for the seat's) until the run ends. *Compensation:* the count is a knob (a larger `rateLimitBreakAfter` asks the seat for longer), `classifierFallback: "none"` keeps asking the seat every time, the notice names the seat and the model now judging, and the next run asks the seat again.
|
|
1075
|
+
- **Wire +1 (@cli @server @client-core).** `BrainStatus.seat?: "classifier"` on `status` events (a one-word closed union): present exactly on a frame about a classifier-lane call, absent for the run's own turn — a consumer reads absence as "the main loop", never "unknown". Additive and optional: a client that never reads it renders every frame as before; a client that does can show the classifier's backoff as the classifier's. The notice `classifier.seat_rate_limited` is a new operator-audience code (`ENGINE_NOTICE_CODES` 108 → 109): a host that pins the code count or renders operator notices from a closed table adds the row.
|
|
1076
|
+
- **Consumers.** @cli: render a `status` frame with `seat: "classifier"` as the classifier's wait, not the turn's. @server: no change required; a deployment that maps its own auto-mode face from settings may pass `rateLimitBreakAfter` through. @client-core: the `status` frame gains the optional key. @test: construction — a gateway that answers 429 for the classifier model only; N+1 gated calls in one run dispatch the seat N times and the main model on every call; the notice appears once.
|
|
1077
|
+
- **Known limits (stated).** (1) The memory is the run's: a session that spans several runs asks the seat once per run until it retires again. (2) A 429 whose `Retry-After` pushes the dispatch past `RunnerDeps.autoMode.timeoutMs` ends as a `timeout`, which is not counted. (3) The cross-process redemption's rebuilt decider (`rebuildAutoModeDecider`) has one rung and so never retires. (4) The frame names the lane, not the rung: the main model standing in behind the seat is also `seat: "classifier"`.
|
|
1078
|
+
- **Pins.** `test/backlog2876-classifier-rate-limit-breaker.test.ts` (real Runner: two rate-limited classifications keep asking the seat, the third retires it and later calls never dispatch it; one notice; the record per call; a plain failure, a ruling and a timeout each zero the count; `none` and a one-rung ladder never retire; the last model is never retired; a cancel neither counts nor zeroes; the knob's default, values and refusals including through the Runner's prepare; the 429 marker comes from the structured status only; every classifier-lane frame carries the seat and the turn's own frames do not; `withStatusSeat` stamps through the active sink, a timer-fired frame included).
|
|
1079
|
+
|
|
1080
|
+
### A retired `TaskSpec` key the caller's object carries by lookup is refused on every prepare path — the door reads the caller's spec before any rebind (#2914; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core)
|
|
1081
|
+
|
|
1082
|
+
- **Before.** The retired-key door (`config.spec_retired_key`) and the mode word's door ran on the spec after prepare had rebound it. Two of those rebinds — the per-task agents rebuild (`TaskSpec.agents` with a delegation tool mounted) and the tool model gate — copy the spec by spreading it, which keeps only its own enumerable members. On those paths a retired key the caller's object inherits (a class instance's prototype, a spec built with `Object.create`, a proxy answering by lookup) or holds as a non-enumerable member was dropped unseen — for every row of the retired table — and an inherited `permissionMode` read as absent, so the leg ran in the default mode.
|
|
1083
|
+
- **Now.** The door runs once, on the caller's spec as handed (the roster snapshot's copy keeps the prototype and every own descriptor), before the config doors — the order the resume ladder's pre-claim screen already uses. On every path the door judges what lookup finds on the caller's object, and the leg's mode is the mode word that object answers. A spec holding a retired key and another fault now reports the retired key first, as a resume already did.
|
|
1084
|
+
- **Behavior narrowing, three sentences (open to veto).** *Who needs it*: a host that builds specs as class instances or proxies and relies on a retired seat it still writes being refused rather than ignored. *Who is hurt*: a host whose prototype-backed spec still carries a retired key on a task that declares `agents` or trips the tool model gate — prepare now fails with `config.spec_retired_key` where the run used to go ahead without the seat — and a spec whose first fault was another door's now reads the retired-key refusal first. *Compensation*: the refusal names the key and its replacement (the sentence and code the plain path has always given), it comes before the session is acquired, and dropping the key fixes it.
|
|
1085
|
+
- **Consumers.** @server @cli @client-core: a host that hands a Proxy or a class-instance spec — look for a retired key on its prototype; nothing else changes.
|
|
1086
|
+
- **Not in this release.** The other members of a spec, read after those two rebinds, still lose an inherited or non-enumerable value on those paths (#3039).
|
|
1087
|
+
- **One reader per retired row.** The retired `skills[].manifest` row moved out of the spec door's table into the skills seat's own (`RETIRED_SKILLS_SEAT_KEYS`, internal), judged only by the seat's one reader over its one read of `skills`. Moved ahead of the config doors, the spec door had become a second reader of the caller's `skills` (a `skills` accessor answering differently on its second read failed a run that the seat's reader would have prepared); the resume ladder's pre-claim screen had the same second read. Same sentence, same code; a retired skill member is reported where the skills seat is read, as before this release.
|
|
1088
|
+
- **Pins.** `test/backlog2914-retired-keys-caller-spec.test.ts` ① an inherited, a non-enumerable and a dotted retired key on the agents path; ② an inherited mode word read, a bad one refused; ③ the clean spec prepares, the path with no rebind refuses as before. `test/backlog2003-seat-totality.test.ts`: a `skills` accessor is read once on a fresh run; the spec door reads no member of the skills seat; the two retired tables are disjoint and together the former table. `test/backlog2914-retired-keys-caller-spec.test.ts` ①: an inherited `skills` entry carrying `manifest` on the agents path is refused by name. `test/backlog1303b-loader-and-surface.test.ts` ③: the skills seat's reader and the resume ladder refuse `manifest` with the same code.
|
|
1089
|
+
|
|
1090
|
+
### The Bash tool's description states one fact about the working directory — each call starts where the previous one ended (#2873; prompt text only; hard-breaking: none; closed sets: none; exports: none) (@cli)
|
|
1091
|
+
|
|
1092
|
+
- **Before.** "Working directory persists between calls … a `cd` carries over" stood beside "the shell is re-initialized each call, starting at the configured root". Only the first describes the tool: a call runs in the tracked per-task directory and the directory it ends in is read back. Models read the second sentence and put a `cd` into the project in front of every command (cli: 1 202 times in one session).
|
|
1093
|
+
- **Now.** "Working directory persists between calls, but prefer absolute paths — each call starts in the directory the previous call ended in, so a `cd` carries over and moves the base for every later command. Shell state (env vars, functions) does not persist; the shell is re-initialized each call." This is the reference's sentence shape (`Working directory persists between calls, but prefer absolute paths — …`) with sema's reason kept. The tool listing's prompt-cache fingerprint changes once.
|
|
1094
|
+
- **Pins.** `test/backlog2873-bash-cwd-sentence.test.ts` (the real tool's description, and a `cd` in one call setting where the next call starts on a real shell); `test/prompt-golden-1302.json` refrozen for this one sentence.
|
|
1095
|
+
|
|
1096
|
+
### The `workspace_changed` contract says who receives the frame: the leg's own event stream (#2890; contract text only, no engine change; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
1097
|
+
|
|
1098
|
+
- **Now.** docs/INTEGRATION-CORE.md §1.8 adds one sentence to the frame's row: the frame rides the leg's own event stream, so `Runner.runTask` and the compositions that drain their legs' streams themselves (`runWithVerification` / `resumeWithVerification` / `runDeveloperTask`, `runCascade`) hand their caller no leg stream, and that caller receives no `workspace_changed` frame from those legs. This is within the contract (server [11986] ④). A deployment that needs where a verify or cascade leg stood would need a frame hook, which is a separate design request and is not in this release.
|
|
1099
|
+
- **Pins.** `test/backlog2890-workspace-frame-contract-sentence.test.ts` (the row's sentence; the stream half: a consumer of a prepared leg's stream gets the leg-start frame).
|
|
1100
|
+
|
|
1101
|
+
### A URL password holding `'` is taken out of a text, and the brain's request-error strip reads the same userinfo grammar (#3018; security narrowing — a credential leak, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
|
|
1102
|
+
|
|
1103
|
+
- **Before.** The vocabulary's userinfo row read a userinfo as characters that are no `/`, white space, `"`, `'` or `@`. `'` is one of RFC 3986's sub-delims, so `https://user:pa'ss@host` matched nothing, and the password left through every exit that reads the egress pass (`redactSecrets`, a sync refusal sentence, a response error, a tool result). On the human tier the whole-URL pass then stopped at the `'` and left `ss@host…` in the text. The brain's `stripUrlCredentials` (a request-build failure's text) kept its own copy of the class and stopped at the first `@`, so `https://u:p@ss@host` kept `ss@` of the password.
|
|
1104
|
+
- **Now.** One grammar, `URL_USERINFO_SOURCE` (`credential-vocabulary.ts`): characters that are no `/`, white space, `"` or `@`, up to the last `@` before the host. It covers every RFC 3986 userinfo character (`'` included) and what an unencoded password carries (`#`, `?`, …), so it narrows nothing the row took before. Both readers match it and each renders its own way: the egress pass keeps the username, the brain's strip removes the whole userinfo — and `https://u:p@ss@host` is now removed whole. The two readers share the scheme grammar too (`URI_SCHEME_SOURCE`, as does the human tier's whole-URL pass), now of any length: it is read from the start of its run of scheme characters, so each run is tried once (linear), where the 64-character cap it replaces missed a longer scheme — a scheme glued behind digits keeps them in the text. The vendor-prefix rows keep their front boundary: `sk-…` glued behind a letter (`losk-…`, `xsk-…`) is still no credential.
|
|
1105
|
+
- **Narrowing, three sentences (open to veto).** *Who needs it*: anyone whose URL password holds a `'`. *Who is hurt*: a text holding `scheme://` and then, with no white space, a `'` and an `@` that is no credential — a single-quoted list with no spaces (`'https://a','b@c'`) — now has the span between `://` and that `@` replaced; on the human tier a URL glued behind digits or marks (`1https://…`) is replaced together with them. *Compensation*: the span is replaced by the credentials mark, never refused, and double-quoted (JSON) text reads as before.
|
|
1106
|
+
- **Pins.** `test/backlog3018-userinfo-grammar.test.ts` ① four passwords (`'`, `;`, `=`, a percent escape) replaced on the egress pass with the username kept, a password holding `@`, one written unencoded with `#` / `?`, a JSON string's closing quote; ② the human tier leaves no part of the password; ③ the brain's strip on the same passwords and on `@`; ③b a 65-character scheme in both readers, a scheme glued behind digits; ④ the front boundary kept.
|
|
1107
|
+
|
|
1108
|
+
### A language server's root is a project directory, never the home directory — a file with no project marker below the home directory gets no server, and the LSP tool says why (#2872; behavior narrowing, open to veto; divergence from the reference D-2872, open to veto; hard-breaking: none; closed sets: none — the degrade reuses the tool's `LSP is unavailable` line; exports: none; members: `NodeLspManagerOptions.resolveRoot` may answer `undefined`) (@cli @server)
|
|
1109
|
+
|
|
1110
|
+
- **Before.** `NodeLspManager`'s default root was the environment's cwd whenever it had one (else the nearest marker above the file, else the file's own directory). A session started in the home directory therefore rooted every language server there — a Swift server indexing the whole home directory (cli IMG156-11).
|
|
1111
|
+
- **Now.** The default root is read from the project markers the manager already keeps (`ROOT_MARKERS`: `.git`, `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `Package.swift`, …): the cwd when it holds one (as before), else the nearest directory holding one above the file. The home directory (the environment's declared `homeDir`, else this process's) and every directory above it are never a root, marker or not — a dotfiles `.git` makes the home directory look like a project; directories are compared by their physical paths (the one physical-path mint, `physicalPathOf`), so a symlinked spelling of the home directory is the home directory. A file with no marker below them has no root: no server starts, the LSP tool answers `LSP is unavailable for "<file>" (no project root: …). Fall back to Grep/Read for this lookup.`, and the manager's `log` hook receives `lsp_root_refused`. A custom `resolveRoot` may answer `undefined` for the same outcome.
|
|
1112
|
+
- **Behavior narrowing, three sentences (open to veto).** *Who needs it*: a person who starts a session in the home directory — no language server indexes everything under it. *Who is hurt*: a file outside every project (a loose script in a folder with no marker), which had a server rooted at its folder or the cwd and now has none; and a host whose `evict(root)` passes a cwd that holds no marker — that task's servers are rooted at the files' project directories and are reclaimed by the idle sweep instead. *Compensation*: the degrade line names the cause; any marker in the folder (`git init`, an empty `package.json`) brings the server back; a host that wants the old reading passes its own `resolveRoot`.
|
|
1113
|
+
- **Divergence (D-2872, open to veto).** The reference roots a language server at its configured workspace folder or the session's cwd, home directory included (cli309.js:266959, `n.workspaceFolder||pe()`). sema refuses the home directory because a server rooted there indexes everything under it (cli IMG156-11): this is about what gets read and its privacy, not a feature trade.
|
|
1114
|
+
- **Consumers.** @cli (the L-2122 family): a session started in the home directory gets the degrade line for a file outside a project, and a server rooted at the project for a file inside one. @server: a host lane that calls `evict(env.cwd)` at task end keeps working for a cwd that holds a marker.
|
|
1115
|
+
- **Pins.** `test/backlog2872-lsp-root-not-home.test.ts` ①–⑥ (cwd = home with a file in it and under a markerless folder; home holding `.git`, also under a symlinked spelling of the cwd or of the declared home; a project below home; a project cwd with a nested package; a markerless cwd; the LSP tool over a real `NodeExecutionEnv` started in a declared home). `test/backlog1073-lsp-child-env.test.ts` and `test/backlog1753-lsp-withheld.test.ts` re-pinned: their temporary folders now hold a `package.json`.
|
|
1116
|
+
|
|
1117
|
+
### A stop reaches the main model call whether or not the brain looks at the signal (#2882; behavior change: a halt, an interrupt or a cancel no longer waits for a brain that ignores the abort; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
|
|
1118
|
+
|
|
1119
|
+
- **Before.** The loop read the brain's stream and waited for it. A halt (and an interrupt, a caller's abort, the walltime cut) aborted the turn's signal and left the rest to the brain. A brain that does not honour the signal — a third-party or wrapped brain, a transport that stalls — held the run until it answered. The compaction pass's summary call had the same gap until 7.59.0 (#2875).
|
|
1120
|
+
- **Now.** One rule for both lanes: the model call is an await of the turn, settled by the turn's signal. The loop reads the brain's answer through one relay (`engine/loop/agent-loop.ts`); every await of the call is one — the stream's opening, each event and the final, which is read while the brain's iterator is still open, as before (the Runner's call guardrail stays armed until it is in). The brain's events pass as they come. When the signal fires and the brain's final is not in by the next macrotask turn, the turn ends with the loop's own aborted final — the shape the pre-dispatch gate already answers with: no content, `usageMissing` — and whatever the brain sends later is dropped. A brain that answers its own abort through the abort's own continuations keeps its answer, as the first-party brain does. A halt still reads as the person's stop (`haltedByUser`, completed); a caller's abort that the loop's final answered reads `run aborted`.
|
|
1121
|
+
- **Known limit.** The ignored call keeps running: the engine cannot stop a call that does not look at its signal. Its turn's usage reads as unknown (`usageMissing`), and its late answer is never counted (KL-2875-a, now both lanes).
|
|
1122
|
+
- **Consumers.** @server @cli: a stop on a provider that hangs now ends the run promptly; nothing to change. @test: black box — a brain that never answers and ignores the signal, halted while its call is open, ends the run within a second with `haltedByUser`.
|
|
1123
|
+
- **Pins.** `test/backlog2882-halt-main-lane.test.ts` ①–⑦ (a silent brain, one that streamed part of an answer, one whose call never returns a stream; a caller's abort; the late answer reaching nothing; a brain that answers its own abort keeping its own words, and a halt on it as before; a brain whose final never comes after its terminal event, and one whose `result()` throws — the throw fails the run as it always did).
|
|
1124
|
+
- **A delivery that throws lets the brain go (#3093).** When the loop's handling of a model event throws before the terminal event (a `message_start` or `message_update` sink), the relay stops reading the brain, calls its iterator's `return()` once without waiting on it, and drops its abort listener — before, the relay's producer kept reading the provider's stream with nothing consuming it until the stream ended on its own. A brain whose own read throws is not returned (its iteration is over, as a `for await` over it read it), and a call whose events were read to their end keeps its final cuttable by the turn's signal. Behavior fix; hard-breaking: none. Pins: `test/backlog3093-relay-consumer-exit.test.ts` R1–R5.
|
|
1125
|
+
- **A guarded call left before its answer is cancelled (#3103).** Letting a brain's iterator go does not stop its request — a stream's own `return()` need not cancel it — and under the call guardrail (on by default) that `return()` also disarmed the gate, dropping the forward from the turn's signal into the signal the brain holds; so after a sink threw, the provider request ran on and nothing could cancel it any more. The guardrail's `return()` now aborts the signal the brain holds before it disarms, when the brain's terminal event has not passed yet; after the terminal event, or once the call ended (its iteration over, its result settled), it only disarms, so a call that ends on its own is never aborted. The run still fails with the sink's own error. With the guardrail off, the brain holds the turn's signal itself and the relay's exit does not cancel its request: the provider request runs to its own end — after the sink failure nothing holds a handle to cancel it (KL-3103-a). Behavior fix; hard-breaking: none. Pins: `test/backlog3103-guardrail-abandon-aborts.test.ts` G1–G6.
|
|
1126
|
+
- **Wake cycles.** A wake cycle's first tool call can now land after the parent run's teardown abort (the relay adds one producer/consumer hand-off before dispatch); a parent's end aborting in-flight resume cycles is the existing D4 contract — hosts must not rely on the first tool racing ahead of the parent's end.
|
|
1127
|
+
|
|
1128
|
+
### CronCreate and CronList report the job's next run when the scheduler backend knows it — `details.nextFireAt` and a sentence in the result (#2682; aligned with Claude Code; wire +1 optional key; hard-breaking: none; closed sets: none; exports: none)
|
|
1129
|
+
|
|
1130
|
+
- **Before.** The tools returned the schedule and the id; the backend's `ScheduledTaskSummary.nextRunMs` was read by nobody, so a model that scheduled a reminder could not say when it would fire.
|
|
1131
|
+
- **Now.** CronList prints `, next run <ISO instant>` on a row and puts `nextFireAt` (epoch ms) on that row of `details.jobs`; CronCreate appends ` Next run: <ISO instant>.` to its receipt and puts `nextFireAt` on `details`, read with one more `list()` of the same leg inside the call's serialized section (the seam's `schedule()` returns only the handle, and the next-run fact has one reading: the listed summary). Only what the backend reported is shown: absent, non-finite or above `Date`'s upper bound ⇒ no clause and no key, never a guess; an instant already past — one below `Date`'s lower bound too — is clamped to now, as the reference clamps it. A listing that fails after the schedule landed leaves the clause out; the created job is never reported as an error. The call's own context is read for its cancellation only: whether a session-scoped job has a session to bind to is still read from the identity the tools were mounted with.
|
|
1132
|
+
- **Consumers.** @cli @client-core: `details.nextFireAt?: number` on `cron-create` and on each `cron-list` job (the upstream output schema's own optional key); a card that ignores it is unchanged. A backend that never fills `nextRunMs` changes nothing for its users.
|
|
1133
|
+
- **Pins.** `test/backlog2682-schedule-next-fire.test.ts` (the instant on both tools and in the text, absent / replaced / failing-listing / past / non-finite and out-of-range cells); `test/rb449-scatter-review-fixes.test.ts` (the serialization fixture does not count the read-back as a section opening).
|
|
1134
|
+
|
|
1135
|
+
### An unparseable tool call is retried up to twice in a row, and a turn whose tool calls ran clears the count (#2684; aligned with Claude Code 2.1.307; behavior change, open to veto; hard-breaking: none; closed sets: none; exports: none)
|
|
1136
|
+
|
|
1137
|
+
- **Before.** With the malformed-tool-use recovery on (the Runner's default), the engine nudged once per RUN: the second turn whose every tool call was dropped as malformed ended the run as `malformed_tool_use_exhausted`, however many working turns lay between the two.
|
|
1138
|
+
- **Now.** `recovery.malformedToolUse.maxRetries` defaults to 2 and counts consecutive malformed turns: any turn with a parseable tool call (the tools ran) resets it, so the terminal reason now says "this many in a row" and no longer "this many over the run".
|
|
1139
|
+
- **Who needs it / who is affected / compensation (open to veto).** *Needs it:* a long task where a model emits a truncated call now and then no longer dies on the second one. *Affected:* a run that would have ended on its second malformed turn now spends one more turn (and tokens) before `malformed_tool_use_exhausted`; a host reading that reason as "twice in the run" reads it as "three in a row" now. *Compensation:* an explicit `maxRetries: 1` keeps the old budget (still counted in a row).
|
|
1140
|
+
- **Pins.** `test/loop-transitions.test.ts` (the default budget is two nudges then exhausted; an explicit budget; recovery on the last of the default two; the streak clears across working turns and still ends after a fresh budget of two).
|
|
1141
|
+
|
|
1142
|
+
### A missed `Skill` call says which listed skill it likely meant (#2688; aligned with Claude Code 2.1.299; hard-breaking: none; closed sets: none; exports: none)
|
|
1143
|
+
|
|
1144
|
+
- **Before.** `Unknown skill "<name>". Available skills: …` for every miss, including a model that asked for `anthropic-skills:pdf` where the listing says `pdf`.
|
|
1145
|
+
- **Now.** The refusal adds `Did you mean <listed name>? Invoke it by that full name.` when a listed name is within two edits of the asked one, else when the asked name minus the other product's `anthropic-skills:` prefix is listed. The suggestion is a sentence: the one name resolution is unchanged, so nothing activates, binds or digests under an inexact name.
|
|
1146
|
+
- **Pins.** `test/backlog2688-skill-name-suggestion.test.ts` (prefix, typo and transposition, no suggestion for a far or blank name, the nearest name before the prefix reading, nothing activated, an exact name served).
|
|
1147
|
+
|
|
1148
|
+
### A deny / ask rule on an MCP name reads it as the reference does — a server whose own name carries `__` is covered — and an allow entry on an ambiguous spelling is refused with the reference's sentence (#2980 ①; security; behavior narrowing of grants, widening of restrictions; open to veto; hard-breaking: the session rule grammar is 7, open to veto; closed sets: none; exports: none)
|
|
1149
|
+
|
|
1150
|
+
- **Before.** The mint folds a server segment's run of `_` (`a__b` is spelled `a_b`), and every rule name was split once at its first `__`. A rule written the reference's way, `mcp__a__b` for the server `a__b`, read as tool `b` of server `a` and matched none of that server's tools: a deny / ask that looked protective and was inert.
|
|
1151
|
+
- **Now.** A deny / ask MCP name with `__` in its body reads every way it can be read — a cut at each `__` (server = before, tool = after, the server spelled as the mint spells it) and the whole body as a server — so `mcp__a__b` covers tool `b` of server `a` AND every tool of server `a__b`, and `mcp__a__b__t` covers tool `t` of server `a__b` and tool `b__t` of server `a`. The same reading serves the policy rule lanes, the covering name lists, a sub-agent's denied list and a stored whole-tool row. A granting list keeps the one exact name: `mcp__a` never covers `a__b`'s tools, and an allow entry the run's roster shows to read as another server's spelling (no tool of that exact name, a tool on another reading) is read as nothing in the reference's words — "the name reads as more than one MCP server's. To allow it, use the tool's full name." — with the spelling the roster carries; a toolPolicy allow list reports it as an unmatched name instead of refusing the run. The mint is unchanged. A stored whole-tool rule still names one tool (the stored-rule grammar asks `namesASetOfTools`, not the covering predicate).
|
|
1152
|
+
- **Behavior change, three sentences (open to veto).** *Who needs it:* anyone who carries rules written for the reference's server spelling. *Who is affected:* a restricting list now also matches tools of a server named like the rule's whole body (more deny / ask, never less); an allow entry that was silently inert next to a roster that shows the other reading is now named. *Compensation:* write the minted spelling (`mcp__a_b__<tool>`) — the sentence names it.
|
|
1153
|
+
- **Consumers.** @server @cli @client-core: no wire key; `RuleToolNameVerdict`'s `unmintable_segment` gains an optional `ambiguous?: true`, and `isCoveringRuleName(name, "deny" | "ask")` is true for a name with two readings (it was false for an exact tool name); a host that stored the old reading of `isCoveringRuleName` for exact MCP names re-pins.
|
|
1154
|
+
- **The rule grammar moved with the meaning: `SESSION_RULES_GRAMMAR` is 7.** A session's stored `toolDeny` entry `mcp__a__b` meant the one exact tool in every earlier grammar, so a row stamped 6 or below keeps that meaning and is announced once per layer (`config.session_rules_earlier_grammar`, reader `grammar_revised`: what its writer read, what this grammar reads, the stored meaning stands); a row this engine writes is stamped 7 and covers both spellings. Globs, protocol peers and allow entries are not revised. The persisted rule store and the rule-sync wire carry the same stamp; that store keeps no earlier-stamp reading, so a whole-tool deny / ask `mcp__a__b` in a bucket stamped 6 reads the grammar-7 way (wider; the earlier reading it is owed is #3085). So does a stored session row handed back to a write (an export → import replay): the write stamps 7, and the entry takes the wider reading unannounced — the same as a row kept by an earlier revision (a grammar-4 `toolDeny: ["Re*d"]` replayed reads the pattern); #3085 too.
|
|
1155
|
+
- **Hard-breaking, three sentences (open to veto).** *What changed:* session rule rows, persisted rule buckets and rule-sync states this engine writes carry grammar 7. *Who is hurt:* a mixed-version fleet — a 7.59.0 engine (grammar 6) reading a session row or a persisted bucket a 7.60.0 engine wrote refuses it loudly (the row refuses every call; the bucket loads zero rules with `permission_rules.later_grammar`; a sync round is refused whole) instead of reading the deny as the narrower exact tool; @server (a shared session store or rule bucket across engine versions; the rule-sync twin), @cli, @test (fixtures that pin the number 6). *Migration:* upgrade the engines that share a store in one step; the refusal sentence names both grammars ("written in rule grammar 7, newer than this engine reads (grammar 6)").
|
|
1156
|
+
- **Known limits (stated).** The allow-side refusal is as true as the roster the entry is read against: a server that connects after the roster is read leaves an ambiguous entry as it was (inert for the other reading). `peerReadingsOf` reads MCP names only; other protocols' peers are named as the roster spells them.
|
|
1157
|
+
- **Pins.** `test/backlog2980-mcp-server-spelling.test.ts` (the readings; deny and ask each on both readings; the tool-level spelling; stored rule and sub-agent list; `mcp__a` does not cover `a__b`'s tools; the allow verdict, entry and sentence); `test/backlog1879-rule-name-one-reader.test.ts` F4 (a grammar-6 row's exact MCP deny keeps the one tool, announced; a grammar-7 row covers both spellings; the write mints 7; the later-stamp sentence); `test/backlog1385-entry-grammar-one-render.test.ts` / `test/backlog7480-smallfix.test.ts` (a deny list compiles the exact MCP name to a covering row, an allow list to a tool row).
|
|
1158
|
+
|
|
1159
|
+
### A file `writeFile` replaces is staged owner-only until the target's own mode is applied — the new content of a 0600 file is never readable by another user while it is written (#3120; security fix; behavior change: a replace only, a create is unchanged; hard-breaking: none; closed sets: none; exports: none) (@server)
|
|
1160
|
+
|
|
1161
|
+
- **Before.** `NodeExecutionEnv.writeFile` stages a whole-file replace in a same-directory `.tmp.<pid>.<hex12>` sibling and renames it over the target. The sibling was opened with no mode — 0o666 under the umask, 0644 on a typical host — and the whole new content was written before the fchmod to the target's mode, so replacing an owner-only (0600) file left its new content readable by every other user of the machine, in the same directory, for the length of the write (seconds for a large file). A host lane that writes through this primitive inherited the window; the in-place `O_TRUNC` write it replaced kept the file's inode and mode.
|
|
1162
|
+
- **Now.** A replace opens the sibling owner-only (0o600) and applies the target's mode before the rename, as before: the sibling is never more readable than the file it replaces, and a 0755 script is already 0755 when it is renamed. A create still opens the sibling with 0o666 and leaves the umask (or the directory's default ACL) to the kernel, so a new file's mode is byte-for-byte what it was; it has no older content to protect, and its final mode is what it carries while written. A process that dies mid-write now leaves its staging residue 0600 instead of a half-written 0644 file holding the new content.
|
|
1163
|
+
- **Behavior change, three sentences.** *What changed:* replacing an existing regular file stages it 0o600 instead of the umask mode. *Who is affected:* a filesystem that refuses the fchmod with the support errors the replace already tolerated (EINVAL / ENOTSUP / EPERM / ENOSYS) yet honours the open mode now ends a replaced file 0600 instead of the umask mode — fail closed (KL-3120-a); directory watchers and indexers can still list the staged sibling, and what they see is now owner-only. *What to do:* nothing on the engine path; @server, in the server's words: server 7.139.0: the five remote lanes stage a sibling that is never more readable than the target from creation (FIXSTAGEMODE moves staging into a writer-private 0700 directory and brings the adb / docker host-side `os.tmpdir` relay files under the same rule); the host lane inherits this fix through core 7.60.0 #3120.
|
|
1164
|
+
- **Divergence (open to veto).** The staging mode is a 0o600 constant where CC 309 uses `existingMode & 0o777 | 0o200`; 7.61.0 #3121 moves to the CC form.
|
|
1165
|
+
- **Pins.** `test/backlog3120-staging-tmp-private-mode.test.ts` — the staged sibling's mode observed right after open, right after the content write and right before rename: P1 replacing a 0600 file (4 MiB) and P1b through a one-hop symlink stay owner-only throughout; P2 a 0755 script is staged owner-only and is 0755 at rename; P3 a create ends at the umask create mode (022 → 0644, 002 → 0664); P4 a create under umask 077 ends 0600; P5 an fchmod the mount refuses (EPERM) ends the replaced 0644 file 0600, owner-only throughout; a multi-hop symlink chain keeps the in-place write; the Write tool reaches the same rule.
|
|
1166
|
+
|
|
1167
|
+
no-notes: #454(repo tool scripts/probe-external-go.mjs and its package.json script `probe:external-go`: the SDK v2 external-condition probe, exit 0 GO / 1 NO-GO / 2 could not judge; not in the package, no gate-all roster row), #2916(repo release tooling: the car reader of the ship lint and the re-window reads a fast-forwarded car as in the release; scripts/release/lib.mjs, not in the package), #2921(repo tool post-ship: the PLANS row it writes opens the next window; not in the package), #2922(new repo gate gate:changelog-released-blocks with a frozen baseline docs/changelog-released-blocks.baseline.json; not in the package), #2923(repo release tooling: the chain's r-commit gate table asks gate:debts:rc at the release's own version; not in the package), #2932(repo gate verify-debts: a hex string stuck to digest: / sha256: / sha1: / integrity: / md5: is a content digest, not a commit coordinate; not in the package), #954(the credential-vocabulary parity pin's ledger text names the new keyword row; a test-file text change only, no engine behavior), #2979(the module-size ratchet rows of three oversize files cite the 7.61.0 split design ticket; test-file bookkeeping only; not in the package), #2861(the flaky-fix car only re-pins three merged tests; test files only, no behavior), #1549(the fix-2846 car re-pins the class-instance extraBody arm against the model door snapshot; test files only; no behavior beyond #2846), #1663(the fix-2846 car adds cells to the prompt-traits pin for the model door snapshot; one test file only; no behavior beyond #2846), #2966(the chain3-fix car re-pins four merged tests whose fixtures mount a seatless caller write tool or a caller Bash under default: each cell now sets aside exactly the load-time ungated-write notice this section documents; test files only, no behavior beyond #2966), #2994(docs/INTEGRATION-CORE.md Steer paragraph names which judgments read a steer, plus three pins; no engine change, the verb has read the live mode since 7.34.0), #2899(repo gate gate:changelog-coverage: a merge commit's subject line and a ledger row RESOLVED-PENDING-TEST-VERIFY at a commit of the range now count as tickets the range delivered; scripts only, not in the package), #2971(repo gate gate:backlog-ledger: a passed MM-DD window is a warning row naming the row, never red; red stays for format, closed sets and a second source of one fact; scripts only, not in the package), #2974(repo gate verify-debts: the pending-window category set drops the state word 候裁, seven words to six; scripts only, not in the package), #2494(repo gates and release tooling: the ledger gate caps the cars in flight (eleven, FIX cars not counted) and no longer the rows a window holds, a leftover window-cap declaration is red by line, rewindow writes no capacity and reports the next window's count; scripts and docs only, not in the package), #3037(the 2944 read-floor pin reaches git through the scripts/git-cli.mjs seam; one test file only, no behavior), #697(a #3025 commit re-pinned the parent-spec-seat pin's launch-note line — the one-shot note arm it read is the #3025 entry's; one test line only), #3041(repo tools only: the ledger gate accepts the terminal status word CLOSED-DESIGN-LANDED as a landed state and the release re-window no longer refuses a DESIGN-DONE row for lacking a car coordinate and lists per design what its implementation tickets say; scripts and pins; not in the package), #3045(repo tool scripts/wire-changes.mjs: the manifest generator reports a moved version literal — an exported VERSION integer constant or a version-named integer-literal member — as a version literal changed line of breakingItems and a versionLiterals row; WIRE: none cannot cover one; scripts and pins; not in the package), #3080(the chain-8 fix car's changes are told in the #2682 entry — the call context is read for its cancellation only — and the #2980 entry — the rule grammar 7 and its hard-breaking sentences; no entry of its own), #7(not a ticket: the number is a release-chain run label in the subject of the #2987 fix commit that follows chain 7; that fix is told in the #2987 entry — the tool-result seat resolves the run's image processor only once a block claims media; no entry of its own), #3096(a comment-only sentence on `SubagentToolOptions.background.notify`: an operator resume completes into that sink whether or not a run drives the mount; no entry of its own)
|
|
1168
|
+
no-notes: #3065(a fix inside this window's own #3025 code: the delivery-obligation ledger keyed on the bare task_id instead of the notification lane key and routed an operator's resume completion into the spawn run lane; both corrected before release; no released behavior changed), #3066(a fix inside this window's own #2914 move: the retired-key table is split by reader `RETIRED_SKILLS_SEAT_KEYS` and five continuation pins re-pinned; no released behavior changed), #3067(a stale pin re-pinned after #2948; zero src), #3069(repo tool scripts/verify-debts.mjs: two new ledger states read; not in the package)
|
|
1169
|
+
|
|
1
1170
|
## 7.59.0 — 2026-10-27
|
|
2
1171
|
|
|
3
1172
|
### A model call waiting on a gateway gives up within 599 s however large the request, and a host that slept through a wait reconnects at the first second after waking — `sleptMs` on the reconnect frame, `waitSegment` on the wait frame (#2870; behavior narrowing: the first-byte window's upload allowance is capped; hard-breaking: none; closed sets: one new, `BrainStatus.waitSegment`; exports: none; members: +2 optional on `BrainStatus` / the `status` event) (@cli @server @client-core)
|