@sema-agent/core 7.57.0 → 7.59.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 +1161 -0
- package/README.md +6 -4
- package/dist/agents/cc-peer-directory.js +8 -8
- package/dist/agents/child-model-seat.d.ts +4 -2
- package/dist/agents/child-model-seat.js +5 -3
- package/dist/agents/peer-directory.d.ts +9 -0
- package/dist/agents/peer-directory.js +6 -2
- package/dist/agents/send-message-tool.js +21 -12
- package/dist/agents/subagent-steps.js +2 -4
- package/dist/agents/subagent.js +33 -34
- package/dist/brain/anthropic.js +161 -45
- package/dist/brain/errors.d.ts +9 -3
- package/dist/brain/errors.js +7 -1
- package/dist/brain/failover.js +2 -1
- package/dist/brain/open-responses.js +3 -3
- package/dist/brain/openai.js +103 -53
- package/dist/brain/provider-dialect.d.ts +11 -0
- package/dist/brain/provider-dialect.js +5 -2
- package/dist/brain/reasoning-request.js +5 -4
- package/dist/brain/reasoning.d.ts +19 -0
- package/dist/brain/reasoning.js +17 -2
- package/dist/brain/request-route.d.ts +4 -1
- package/dist/brain/request-route.js +4 -1
- package/dist/brain/route-adjudicator.d.ts +84 -18
- package/dist/brain/route-adjudicator.js +89 -22
- package/dist/brain/route-conformance.js +1 -1
- package/dist/brain/stream-engine.js +84 -49
- package/dist/brain/stream-shared.d.ts +30 -0
- package/dist/brain/stream-shared.js +34 -1
- package/dist/brain/timeout.d.ts +62 -5
- package/dist/brain/timeout.js +93 -6
- package/dist/core/a2a.d.ts +2 -1
- package/dist/core/a2a.js +23 -10
- package/dist/core/account-row.d.ts +61 -0
- package/dist/core/account-row.js +51 -0
- package/dist/core/advisor-verdict.d.ts +2 -1
- package/dist/core/advisor-verdict.js +1 -1
- package/dist/core/allow-entry.d.ts +20 -7
- package/dist/core/allow-entry.js +18 -9
- package/dist/core/approval-object.d.ts +29 -15
- package/dist/core/approval-object.js +47 -19
- package/dist/core/ask-origin.d.ts +21 -2
- package/dist/core/ask-origin.js +5 -1
- package/dist/core/auto-compaction.d.ts +4 -0
- package/dist/core/auto-compaction.js +2 -2
- package/dist/core/auto-mode-directive.d.ts +29 -5
- package/dist/core/auto-mode-directive.js +38 -8
- package/dist/core/background-agent-store.d.ts +16 -3
- package/dist/core/checkpoint-requirements.d.ts +19 -1
- package/dist/core/checkpoint-requirements.js +5 -1
- package/dist/core/checkpoint-store.d.ts +85 -23
- package/dist/core/checkpoint-store.js +31 -9
- package/dist/core/child-clamp-seats.d.ts +29 -0
- package/dist/core/child-clamp-seats.js +56 -1
- package/dist/core/compliance.d.ts +2 -2
- package/dist/core/compliance.js +1 -1
- package/dist/core/effective-path-target.d.ts +8 -2
- package/dist/core/effective-path-target.js +8 -3
- package/dist/core/engine-notice.d.ts +99 -9
- package/dist/core/engine-notice.js +19 -5
- package/dist/core/fs-write-gate-policy.d.ts +4 -2
- package/dist/core/fs-write-gate-policy.js +7 -3
- package/dist/core/gate-fold.js +7 -4
- package/dist/core/gate-lanes.js +19 -6
- package/dist/core/gate-outcome.d.ts +32 -3
- package/dist/core/gate-outcome.js +19 -1
- package/dist/core/git-worktree-env.d.ts +53 -11
- package/dist/core/git-worktree-env.js +96 -12
- package/dist/core/governance-codes.d.ts +9 -1
- package/dist/core/governance-codes.js +13 -0
- package/dist/core/hooks.d.ts +35 -4
- package/dist/core/hooks.js +17 -11
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +6 -5
- package/dist/core/image-admission.js +18 -14
- package/dist/core/locked-config.d.ts +20 -3
- package/dist/core/locked-config.js +40 -3
- package/dist/core/mailbox-store.d.ts +45 -1
- package/dist/core/mailbox-store.js +53 -9
- package/dist/core/mcp-call-meta.d.ts +66 -0
- package/dist/core/mcp-call-meta.js +103 -0
- package/dist/core/mcp-connection-pool.d.ts +3 -1
- package/dist/core/mcp-connection-pool.js +3 -1
- package/dist/core/mcp-failure.d.ts +117 -15
- package/dist/core/mcp-failure.js +71 -3
- package/dist/core/mcp-probe.d.ts +4 -0
- package/dist/core/mcp-probe.js +1 -1
- package/dist/core/mcp-server-link.d.ts +27 -3
- package/dist/core/mcp-server-link.js +25 -1
- package/dist/core/mcp-server-spec.d.ts +46 -18
- package/dist/core/mcp-server-spec.js +1 -18
- package/dist/core/mcp.d.ts +16 -20
- package/dist/core/mcp.js +112 -55
- package/dist/core/memory-engine/consolidation-driver.d.ts +2 -4
- package/dist/core/memory-engine/consolidation-driver.js +3 -3
- package/dist/core/memory-engine/consolidation.d.ts +4 -0
- package/dist/core/memory-engine/consolidation.js +1 -0
- package/dist/core/memory-engine/delegation-settlement.js +5 -12
- package/dist/core/memory-engine/distiller.js +2 -2
- package/dist/core/memory-engine/dual-root.d.ts +50 -1
- package/dist/core/memory-engine/dual-root.js +44 -1
- package/dist/core/memory-engine/engine.d.ts +67 -14
- package/dist/core/memory-engine/engine.js +384 -212
- package/dist/core/memory-engine/export-bundle.d.ts +23 -0
- package/dist/core/memory-engine/export-bundle.js +23 -4
- package/dist/core/memory-engine/file-backend.d.ts +128 -55
- package/dist/core/memory-engine/file-backend.js +290 -117
- package/dist/core/memory-engine/index.d.ts +1 -1
- package/dist/core/memory-engine/layout.d.ts +59 -11
- package/dist/core/memory-engine/layout.js +190 -40
- package/dist/core/memory-engine/memory-backend-contract.d.ts +1 -1
- package/dist/core/memory-engine/memory-backend-contract.js +39 -2
- package/dist/core/memory-engine/scope-contract.d.ts +45 -4
- package/dist/core/memory-engine/scope-contract.js +80 -11
- package/dist/core/memory-engine/sync-client.d.ts +9 -1
- package/dist/core/memory-engine/sync-client.js +31 -8
- package/dist/core/memory-engine/sync.d.ts +5 -0
- package/dist/core/memory-engine/types.d.ts +6 -0
- package/dist/core/mode-policy.d.ts +8 -5
- package/dist/core/mode-policy.js +5 -4
- package/dist/core/mods/classic-events.d.ts +5 -1
- package/dist/core/mods/host.js +1 -1
- package/dist/core/mods/kernel/dispatch.d.ts +3 -0
- package/dist/core/mods/kernel/dispatch.js +12 -9
- package/dist/core/mods/kernel/events.d.ts +6 -1
- package/dist/core/mods/kernel/events.js +2 -2
- package/dist/core/mods/kernel/registration.d.ts +9 -1
- package/dist/core/mods/kernel/registration.js +3 -0
- package/dist/core/mods/kernel/site-rules.d.ts +3 -0
- package/dist/core/mods/kernel/site-rules.js +10 -0
- package/dist/core/mods/package.d.ts +23 -0
- package/dist/core/mods/package.js +118 -0
- package/dist/core/mods/stations.d.ts +33 -12
- package/dist/core/mods/stations.js +45 -11
- package/dist/core/mods/tool-call.d.ts +5 -1
- package/dist/core/mods/tool-call.js +13 -4
- package/dist/core/parent-spec-seat.d.ts +8 -3
- package/dist/core/parent-spec-seat.js +2 -0
- package/dist/core/park-selfcheck.js +6 -0
- package/dist/core/path-guard-rows.d.ts +20 -0
- package/dist/core/path-guard-rows.js +11 -0
- package/dist/core/peer-seat.d.ts +248 -0
- package/dist/core/peer-seat.js +439 -0
- package/dist/core/permission-rule-consent.js +10 -4
- package/dist/core/permission-rule-model.d.ts +16 -0
- package/dist/core/permission-rule-model.js +1 -1
- package/dist/core/present-plan-tool.d.ts +20 -3
- package/dist/core/present-plan-tool.js +48 -4
- package/dist/core/protocol-http-auth.d.ts +40 -29
- package/dist/core/protocol-http-auth.js +30 -32
- package/dist/core/redaction-marks.d.ts +16 -0
- package/dist/core/redaction-marks.js +16 -0
- package/dist/core/redaction-passes.js +8 -9
- package/dist/core/resume-startup-cause.js +1 -0
- package/dist/core/retention.d.ts +41 -15
- package/dist/core/retention.js +59 -12
- package/dist/core/rewrite-rejudge.d.ts +38 -0
- package/dist/core/rewrite-rejudge.js +42 -2
- package/dist/core/roles.d.ts +34 -2
- package/dist/core/roles.js +43 -4
- package/dist/core/run-origin.d.ts +40 -0
- package/dist/core/run-origin.js +37 -0
- package/dist/core/runner/advertised-writable-dirs.d.ts +57 -38
- package/dist/core/runner/advertised-writable-dirs.js +126 -0
- package/dist/core/runner/announce-once-ledger.d.ts +5 -4
- package/dist/core/runner/announce-once-ledger.js +4 -2
- package/dist/core/runner/call-hook-stations.js +2 -2
- package/dist/core/runner/compaction-restate.d.ts +15 -6
- package/dist/core/runner/compaction-restate.js +28 -2
- package/dist/core/runner/contracts.d.ts +33 -21
- package/dist/core/runner/credential-origin-seat.js +4 -3
- package/dist/core/runner/cwd-alignment-probe.d.ts +20 -0
- package/dist/core/runner/cwd-alignment-probe.js +21 -0
- package/dist/core/runner/decide-continuation.d.ts +2 -2
- package/dist/core/runner/gate-exit.d.ts +30 -8
- package/dist/core/runner/gate-exit.js +15 -8
- package/dist/core/runner/image-removed-seat.d.ts +12 -0
- package/dist/core/runner/image-removed-seat.js +19 -0
- package/dist/core/runner/inline-image.js +1 -1
- package/dist/core/runner/memory-consolidation-driver.js +3 -3
- package/dist/core/runner/park-commit.d.ts +1 -1
- package/dist/core/runner/park-commit.js +3 -0
- package/dist/core/runner/prepare-ask-lane.d.ts +1 -1
- package/dist/core/runner/prepare-ask-lane.js +2 -1
- package/dist/core/runner/prepare-boundary-parks.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +5 -5
- package/dist/core/runner/prepare-caps-and-workflow.js +3 -1
- package/dist/core/runner/prepare-config-doors.d.ts +8 -5
- package/dist/core/runner/prepare-config-doors.js +14 -10
- package/dist/core/runner/prepare-context-lane.js +2 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +8 -0
- package/dist/core/runner/prepare-delegation-surface.js +16 -18
- package/dist/core/runner/prepare-gate-stations.js +1 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +11 -3
- package/dist/core/runner/prepare-hands-readface.js +9 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +1 -3
- package/dist/core/runner/prepare-inherited-gate.js +14 -27
- package/dist/core/runner/prepare-memory.d.ts +3 -0
- package/dist/core/runner/prepare-memory.js +26 -37
- package/dist/core/runner/prepare-park-ask.d.ts +1 -1
- package/dist/core/runner/prepare-park-ask.js +2 -1
- package/dist/core/runner/prepare-policy-chain.d.ts +7 -7
- package/dist/core/runner/prepare-policy-chain.js +18 -15
- package/dist/core/runner/prepare-project-context.d.ts +2 -2
- package/dist/core/runner/prepare-project-context.js +2 -2
- package/dist/core/runner/prepare-prompt-inputs.d.ts +1 -1
- package/dist/core/runner/prepare-prompt-inputs.js +8 -19
- package/dist/core/runner/prepare-protocol-tools.d.ts +4 -2
- package/dist/core/runner/prepare-protocol-tools.js +11 -3
- package/dist/core/runner/prepare-run-refs.d.ts +2 -3
- package/dist/core/runner/prepare-run-refs.js +4 -1
- package/dist/core/runner/prepare-suspend-saga.d.ts +2 -0
- package/dist/core/runner/prepare-suspend-saga.js +2 -1
- package/dist/core/runner/prepare-task.js +28 -13
- package/dist/core/runner/prepare-wiring-manifest.d.ts +2 -1
- package/dist/core/runner/prepare-wiring-manifest.js +4 -3
- package/dist/core/runner/prepare-workspace-restore.d.ts +3 -0
- package/dist/core/runner/prepare-workspace-restore.js +4 -4
- package/dist/core/runner/reply-pricing.d.ts +30 -0
- package/dist/core/runner/reply-pricing.js +19 -0
- package/dist/core/runner/resume-admission.js +5 -3
- package/dist/core/runner/resume-apply.js +6 -1
- package/dist/core/runner/resume-checkpoint-screen.js +2 -0
- package/dist/core/runner/resume-policy-outcome.js +5 -5
- package/dist/core/runner/role-seat-defaulted.d.ts +44 -0
- package/dist/core/runner/role-seat-defaulted.js +40 -0
- package/dist/core/runner/run-brain-sinks.js +2 -0
- package/dist/core/runner/run-harness-handlers.d.ts +3 -4
- package/dist/core/runner/run-harness-handlers.js +1 -8
- package/dist/core/runner/run-identity-wiring.d.ts +2 -5
- package/dist/core/runner/run-identity-wiring.js +6 -4
- package/dist/core/runner/run-leg.d.ts +2 -0
- package/dist/core/runner/run-leg.js +42 -29
- package/dist/core/runner/run-notification-lane.js +3 -0
- package/dist/core/runner/run-stop-and-final-verify.js +2 -2
- package/dist/core/runner/run-terminal-adoption.d.ts +2 -5
- package/dist/core/runner/run-terminal-adoption.js +9 -3
- package/dist/core/runner/run-turn-boundary.js +77 -70
- package/dist/core/runner/runtask.d.ts +1 -1
- package/dist/core/runner/runtask.js +2 -2
- package/dist/core/runner/side-call-account.d.ts +1 -1
- package/dist/core/runner/side-call-account.js +3 -18
- package/dist/core/runner/sub-agent-deny-lists.d.ts +24 -0
- package/dist/core/runner/sub-agent-deny-lists.js +10 -0
- package/dist/core/runner/terminal-account.js +3 -3
- package/dist/core/runner/tool-end-body.js +2 -1
- package/dist/core/runner/tool-occurrence.d.ts +5 -2
- package/dist/core/runner/tool-occurrence.js +4 -3
- package/dist/core/runner/turn-attachments.d.ts +26 -22
- package/dist/core/runner/turn-attachments.js +24 -26
- package/dist/core/runner/write-protection-station.d.ts +8 -2
- package/dist/core/runner/write-protection-station.js +2 -0
- package/dist/core/runner-deps.d.ts +3 -3
- package/dist/core/secret-env.d.ts +32 -2
- package/dist/core/secret-env.js +65 -3
- package/dist/core/sensitive-path-policy.js +9 -10
- package/dist/core/session-log-transfer.d.ts +24 -0
- package/dist/core/session-log-transfer.js +166 -0
- package/dist/core/session-policy-store.d.ts +3 -1
- package/dist/core/session-policy-store.js +13 -9
- package/dist/core/session-store.d.ts +86 -24
- package/dist/core/session-store.js +162 -24
- package/dist/core/session.d.ts +92 -1
- package/dist/core/shell-read-silence.js +1 -0
- package/dist/core/side-query.d.ts +11 -1
- package/dist/core/side-query.js +9 -0
- package/dist/core/skill-grant-binding.d.ts +31 -2
- package/dist/core/skill-grant-binding.js +31 -1
- package/dist/core/skill-grant.d.ts +8 -5
- package/dist/core/skill-grant.js +6 -6
- package/dist/core/steer-replay.d.ts +4 -2
- package/dist/core/steer-replay.js +2 -1
- package/dist/core/store-contracts/background-agent-store-contract.js +27 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +20 -2
- package/dist/core/store-contracts/mailbox-store-contract.js +31 -1
- package/dist/core/store-contracts/session-repo-contract.js +112 -5
- package/dist/core/store-contracts/session-store-contract.d.ts +4 -1
- package/dist/core/store-contracts/session-store-contract.js +236 -2
- package/dist/core/synthetic-read-verdict.js +2 -1
- package/dist/core/task-event.d.ts +92 -8
- package/dist/core/task-notification.js +16 -10
- package/dist/core/task-registry-agent.js +1 -0
- package/dist/core/task-registry-shared.d.ts +7 -1
- package/dist/core/task-spec.d.ts +49 -1
- package/dist/core/task-stream.d.ts +2 -1
- package/dist/core/terminal-cause.d.ts +11 -1
- package/dist/core/tool-catalog-entries.js +1 -0
- package/dist/core/tool-check-reading.d.ts +1 -0
- package/dist/core/tool-check-reading.js +3 -3
- package/dist/core/tool-policy.d.ts +16 -0
- package/dist/core/tool-result-store.d.ts +17 -10
- package/dist/core/tool-result-store.js +3 -1
- package/dist/core/tool-roster.d.ts +112 -5
- package/dist/core/tool-roster.js +42 -1
- package/dist/core/tool-spec.d.ts +3 -1
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-egress.d.ts +0 -2
- package/dist/core/untrusted-egress.js +10 -14
- package/dist/core/user-attachment.js +1 -1
- package/dist/core/wiring-manifest.d.ts +18 -6
- package/dist/core/wiring-manifest.js +4 -3
- package/dist/core/workspace-snapshot.d.ts +44 -0
- package/dist/core/workspace-snapshot.js +34 -0
- package/dist/core/write-protect.d.ts +43 -3
- package/dist/core/write-protect.js +43 -16
- package/dist/engine/compaction/compaction.js +29 -3
- package/dist/engine/execution-env/node-execution-env.d.ts +4 -3
- package/dist/engine/execution-env/node-execution-env.js +24 -23
- package/dist/engine/execution-env/symlink-chain.d.ts +7 -5
- package/dist/engine/harness/agent-harness.d.ts +30 -2
- package/dist/engine/harness/agent-harness.js +43 -12
- package/dist/engine/harness/messages.d.ts +3 -1
- package/dist/engine/harness/messages.js +3 -2
- package/dist/engine/harness/types.d.ts +56 -7
- package/dist/engine/harness/types.js +5 -1
- package/dist/engine/llm/rejected-images.d.ts +46 -0
- package/dist/engine/llm/rejected-images.js +54 -0
- package/dist/engine/llm/tool-turns.d.ts +2 -1
- package/dist/engine/llm/types.d.ts +30 -10
- package/dist/engine/llm/types.js +1 -1
- package/dist/engine/loop/agent-loop.d.ts +8 -0
- package/dist/engine/loop/agent-loop.js +52 -15
- package/dist/engine/loop/types.d.ts +3 -1
- package/dist/engine/session/import-validate.js +3 -0
- package/dist/engine/session/memory-repo.d.ts +17 -9
- package/dist/engine/session/memory-repo.js +44 -34
- package/dist/engine/session/path-to-root.d.ts +38 -0
- package/dist/engine/session/path-to-root.js +39 -0
- package/dist/engine/session/repo-utils.d.ts +22 -4
- package/dist/engine/session/repo-utils.js +49 -1
- package/dist/engine/session/storage-base.d.ts +10 -1
- package/dist/engine/session/storage-base.js +11 -22
- package/dist/index.d.ts +29 -16
- package/dist/index.js +21 -11
- package/dist/internal/harness-types.d.ts +2 -2
- package/dist/internal/harness.d.ts +3 -2
- package/dist/internal/harness.js +2 -2
- package/dist/internal/llm.d.ts +1 -0
- package/dist/orchestration/workflow-observe.d.ts +17 -1
- package/dist/orchestration/workflow-observe.js +20 -0
- package/dist/orchestration/workflow-types.d.ts +32 -7
- package/dist/orchestration/workflow.js +739 -489
- package/dist/shell/counting-pass.d.ts +50 -0
- package/dist/shell/counting-pass.js +502 -0
- package/dist/shell/lex.d.ts +4 -2
- package/dist/shell/lex.js +93 -34
- package/dist/shell/shell-words.d.ts +1 -1
- package/dist/shell/shell-words.js +7 -6
- package/dist/stores/file/index.d.ts +4 -1
- package/dist/stores/file/index.js +4 -1
- package/dist/stores/file/mailbox-store.js +6 -10
- package/dist/stores/file/session-store.d.ts +15 -8
- package/dist/stores/file/session-store.js +28 -13
- package/dist/tools/fs/fs-bash.d.ts +6 -0
- package/dist/tools/fs/fs-bash.js +6 -3
- package/dist/tools/fs/fs-write.d.ts +6 -3
- package/dist/tools/fs/fs-write.js +8 -7
- package/dist/tools/fs/index.d.ts +3 -0
- package/dist/tools/fs/index.js +7 -3
- package/dist/tools/fs/program-read-model.d.ts +13 -0
- package/dist/tools/fs/program-read-model.js +15 -0
- package/dist/tools/fs/program-read-model.rows.js +1 -1
- package/dist/tools/fs/read-deny.d.ts +13 -10
- package/dist/tools/fs/read-deny.js +25 -5
- package/dist/tools/fs/read-floor.d.ts +19 -0
- package/dist/tools/fs/read-floor.js +23 -0
- package/dist/tools/fs/safety.js +40 -8
- package/dist/tools/fs/search.js +6 -24
- package/dist/tools/fs/shell-read-check.d.ts +9 -2
- package/dist/tools/fs/shell-read-check.js +61 -16
- package/dist/tools/fs/shell-read-establish.js +2 -1
- package/dist/tools/fs/shell-read-identity.js +1 -1
- package/dist/tools/fs/shell-read-judge.d.ts +26 -9
- package/dist/tools/fs/shell-read-judge.js +10 -6
- package/dist/tools/fs/shell-read-plan.d.ts +6 -1
- package/dist/tools/fs/shell-read-plan.js +22 -15
- package/dist/tools/fs/shell-read-start.js +1 -0
- package/dist/tools/fs/shell-reentry-text.d.ts +15 -1
- package/dist/tools/fs/shell-reentry-text.js +25 -3
- package/dist/tools/monitor.d.ts +4 -0
- package/dist/tools/monitor.js +2 -0
- package/dist/tools/worktree.d.ts +42 -15
- package/dist/tools/worktree.js +60 -32
- package/package.json +5 -2
- package/test/export-surface.snapshot.json +149 -1
- package/wire-changes/core-stores-sql@7.58.0.json +29 -0
- package/wire-changes/core-stores-sql@7.59.0.json +29 -0
- package/wire-changes/core@7.58.0.json +2188 -0
- package/wire-changes/core@7.59.0.json +2459 -0
- package/wire-changes/mods-kernel@7.58.0.json +81 -0
- package/wire-changes/mods-kernel@7.59.0.json +29 -0
- package/wire-changes/primitives@7.58.0.json +29 -0
- package/wire-changes/primitives@7.59.0.json +29 -0
- package/dist/primitives/credential-ref.d.ts +0 -89
- package/dist/primitives/credential-ref.js +0 -125
- package/dist/primitives/index.d.ts +0 -2
- package/dist/primitives/index.js +0 -1
|
@@ -11,10 +11,22 @@ export const PLAN_MODE_SPARSE_DIRECTIVE = `Plan mode still active (see full inst
|
|
|
11
11
|
export const PLAN_MODE_NO_EXIT_DIRECTIVE = "Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system — every such call asks the user first, and is refused where nobody can answer. This supercedes any other instructions you have received. Instead, you should: research and analyze with read-only tools, and when you have formed a concrete plan, give it as your final answer and stop.";
|
|
12
12
|
export const PLAN_MODE_NO_EXIT_SPARSE_DIRECTIVE = "Plan mode still active (see full instructions earlier in conversation). Read-only: no edits, commits, or config changes. When your plan is ready, give it as your final answer and stop.";
|
|
13
13
|
export const PLAN_MODE_CHILD_DIRECTIVE = "Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system — every such call asks the user first, and is refused where nobody can answer. This supercedes any other instructions you have received. Instead, you should: research and analyze with read-only tools, and answer the request comprehensively — your final answer, carrying the plan, goes back to the agent that delegated to you.";
|
|
14
|
+
export const PLAN_MODE_FILE_DIRECTIVE = {
|
|
15
|
+
head: "Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system — every such call asks the user first, and is refused where nobody can answer. This supercedes any other instructions you have received.\n\n## Plan File Info:\nYour plan file is ",
|
|
16
|
+
tail: `. If it does not exist yet, create your plan there using the Write tool; if it already exists, read it and make incremental edits using the Edit tool. You should build your plan incrementally by writing to or editing this file. NOTE that this is the only file you are allowed to edit - other than this you are only allowed to take READ-ONLY actions.\n\nWhen your plan is ready, call the ${PRESENT_PLAN_TOOL_NAME} tool: it reads the plan from that file and requests approval — never ask for approval via plain text.`,
|
|
17
|
+
};
|
|
18
|
+
export const PLAN_MODE_FILE_SPARSE_DIRECTIVE = {
|
|
19
|
+
head: "Plan mode still active (see full instructions earlier in conversation). Read-only except plan file (",
|
|
20
|
+
tail: `). When your plan is ready, call the ${PRESENT_PLAN_TOOL_NAME} tool — it reads the plan from that file. Never ask about plan approval via plain text.`,
|
|
21
|
+
};
|
|
14
22
|
export const PLAN_MODE_EXIT_DIRECTIVE = "## Exited Plan Mode\n\nYou have exited plan mode. You can now make edits, run tools, and take actions.";
|
|
23
|
+
export function postureText(text, facts) {
|
|
24
|
+
return typeof text === "string" ? text : `${text.head}${facts.planFile ?? ""}${text.tail}`;
|
|
25
|
+
}
|
|
15
26
|
const PLAN_CADENCE = { everyTurns: 5, fullEvery: 5, sparse: PLAN_MODE_SPARSE_DIRECTIVE };
|
|
16
27
|
export const POSTURE_TABLE = Object.freeze([
|
|
17
28
|
{ family: "plan", owedBy: (f) => f.mode === "plan" && f.isChildLeg, frame: PLAN_MODE_CHILD_DIRECTIVE, exit: PLAN_MODE_EXIT_DIRECTIVE, cadence: { ...PLAN_CADENCE, sparse: PLAN_MODE_CHILD_DIRECTIVE } },
|
|
29
|
+
{ family: "plan", owedBy: (f) => f.mode === "plan" && f.exitToolMounted && f.planFile !== undefined, frame: PLAN_MODE_FILE_DIRECTIVE, exit: PLAN_MODE_EXIT_DIRECTIVE, cadence: { ...PLAN_CADENCE, sparse: PLAN_MODE_FILE_SPARSE_DIRECTIVE } },
|
|
18
30
|
{ family: "plan", owedBy: (f) => f.mode === "plan" && f.exitToolMounted, frame: PLAN_MODE_DIRECTIVE, exit: PLAN_MODE_EXIT_DIRECTIVE, cadence: PLAN_CADENCE },
|
|
19
31
|
{ family: "plan", owedBy: (f) => f.mode === "plan", frame: PLAN_MODE_NO_EXIT_DIRECTIVE, exit: PLAN_MODE_EXIT_DIRECTIVE, cadence: { ...PLAN_CADENCE, sparse: PLAN_MODE_NO_EXIT_SPARSE_DIRECTIVE } },
|
|
20
32
|
{ family: "auto", owedBy: (f) => f.mode === "bypassPermissions" || (f.mode !== "dontAsk" && f.askEffective === "auto_allow"), frame: BYPASS_POSTURE_DIRECTIVE, exit: BYPASS_POSTURE_EXIT_DIRECTIVE },
|
|
@@ -28,15 +40,32 @@ const POSTURE_VOCABULARY = POSTURE_TABLE.flatMap((row) => [
|
|
|
28
40
|
[row.exit, { row, exit: true }],
|
|
29
41
|
...(row.cadence !== undefined ? [[row.cadence.sparse, { row, exit: false }]] : []),
|
|
30
42
|
]);
|
|
43
|
+
function vocabularyLengthAt(rest, text) {
|
|
44
|
+
if (typeof text === "string")
|
|
45
|
+
return rest.startsWith(text) ? text.length : undefined;
|
|
46
|
+
if (!rest.startsWith(text.head))
|
|
47
|
+
return undefined;
|
|
48
|
+
const end = rest.indexOf(text.tail, text.head.length);
|
|
49
|
+
if (end <= text.head.length || rest.slice(text.head.length, end).includes("\n"))
|
|
50
|
+
return undefined;
|
|
51
|
+
return end + text.tail.length;
|
|
52
|
+
}
|
|
31
53
|
function postureItemsOf(body) {
|
|
32
54
|
const out = [];
|
|
33
55
|
let rest = body;
|
|
34
56
|
while (rest.length > 0) {
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
let matched;
|
|
58
|
+
for (const [text, item] of POSTURE_VOCABULARY) {
|
|
59
|
+
const length = vocabularyLengthAt(rest, text);
|
|
60
|
+
if (length !== undefined && (length === rest.length || rest.startsWith("\n\n", length))) {
|
|
61
|
+
matched = { item: typeof text === "string" ? item : { ...item, file: rest.slice(text.head.length, length - text.tail.length) }, length };
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (matched === undefined)
|
|
37
66
|
return undefined;
|
|
38
|
-
out.push(
|
|
39
|
-
rest =
|
|
67
|
+
out.push(matched.item);
|
|
68
|
+
rest = matched.length === rest.length ? "" : rest.slice(matched.length + 2);
|
|
40
69
|
}
|
|
41
70
|
return out.length > 0 ? out : undefined;
|
|
42
71
|
}
|
|
@@ -54,7 +83,7 @@ export function postureStandingOf(messages, reminderMark) {
|
|
|
54
83
|
if (item.exit)
|
|
55
84
|
standing.delete(item.row.family);
|
|
56
85
|
else
|
|
57
|
-
standing.set(item.row.family, { row: item.row, statements: (standing.get(item.row.family)?.statements ?? 0) + 1, turnsSince: 0 });
|
|
86
|
+
standing.set(item.row.family, { row: item.row, statements: (standing.get(item.row.family)?.statements ?? 0) + 1, turnsSince: 0, ...(item.file !== undefined ? { file: item.file } : {}) });
|
|
58
87
|
}
|
|
59
88
|
}
|
|
60
89
|
}
|
|
@@ -70,10 +99,11 @@ export function composePostureFrames(facts, standing) {
|
|
|
70
99
|
if (owed === undefined)
|
|
71
100
|
return frames;
|
|
72
101
|
const s = standing.get(owed.family);
|
|
73
|
-
|
|
74
|
-
|
|
102
|
+
const fileMoved = s !== undefined && typeof owed.frame !== "string" && s.file !== (facts.planFile ?? "");
|
|
103
|
+
if (s === undefined || s.row !== owed || fileMoved)
|
|
104
|
+
frames.push(postureText(owed.frame, facts));
|
|
75
105
|
else if (owed.cadence !== undefined && s.turnsSince >= owed.cadence.everyTurns) {
|
|
76
|
-
frames.push((s.statements + 1) % owed.cadence.fullEvery === 1 ? owed.frame : owed.cadence.sparse);
|
|
106
|
+
frames.push(postureText((s.statements + 1) % owed.cadence.fullEvery === 1 ? owed.frame : owed.cadence.sparse, facts));
|
|
77
107
|
}
|
|
78
108
|
return frames;
|
|
79
109
|
}
|
|
@@ -144,6 +144,19 @@ export interface BackgroundAgentRecord {
|
|
|
144
144
|
/** The explicit org WRITE grant that verdict carried; `null` = the org write face was read-only.
|
|
145
145
|
* Same absent-reads-as-zero rule as {@link admittedOrgScopes} (absent ⇒ `null`). */
|
|
146
146
|
admittedOrgWriteScope?: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* The tighten-only floor the row's child was BORN under: the clamp table's projection of the spec the spawn built for it
|
|
149
|
+
* (`clampSeatsOf`, both carriers — the parent's clamps that rode it and the definition's own restrictions), the same shape
|
|
150
|
+
* as {@link import("./child-clamp-seats.js").ClampValues}. Written once, by the registration that creates the row
|
|
151
|
+
* (`{}` when nothing was clamped), and never rewritten: a revival builds its spec under the table's fold of THIS floor and
|
|
152
|
+
* the waking caller's own clamps, so whoever wakes the child can narrow it and nobody can widen it. Same reason as the
|
|
153
|
+
* org-admission pair above for why a policy fact rides a lookup-keys-only row: the tier-3 leg rebuilds the spec from the
|
|
154
|
+
* WAKER's mount, so without the row nothing of the spawning run's clamps reaches the revived cycle.
|
|
155
|
+
* ABSENT is not "no floor": a row that states none (written before rows carried it, or by a store that does not keep the
|
|
156
|
+
* member) is not revived — `readClampFloor` reads it as unreadable and both revival doors refuse
|
|
157
|
+
* (`revive.policy_floor_unreadable`). A store persists it verbatim: `{}` reads back as `{}`.
|
|
158
|
+
*/
|
|
159
|
+
policyFloor?: import("./child-clamp-seats.js").ClampValues;
|
|
147
160
|
/** Optimistic-concurrency revision. The writer always CASes with its OWN held rev (design/151
|
|
148
161
|
* MED-8): a foreign row (stale leftover / another writer) has an unknown rev, so the CAS loses
|
|
149
162
|
* instead of clobbering. Bumped by the store on every successful `update`. */
|
|
@@ -167,9 +180,9 @@ export interface BackgroundAgentRecord {
|
|
|
167
180
|
*
|
|
168
181
|
* Every member is optional on {@link BackgroundAgentRecord} (that is what makes them clearable);
|
|
169
182
|
* identity, lifecycle, concurrency and GOVERNANCE fields are deliberately absent — a revival
|
|
170
|
-
* inherits those. The org-admission freeze (`admittedOrgScopes` / `admittedOrgWriteScope`)
|
|
171
|
-
* the governance group on purpose: clearing
|
|
172
|
-
* the widening
|
|
183
|
+
* inherits those. The org-admission freeze (`admittedOrgScopes` / `admittedOrgWriteScope`) and the
|
|
184
|
+
* birth floor (`policyFloor`) are in the governance group on purpose: clearing either would hand the
|
|
185
|
+
* next cycle a blank slate, which is the widening each exists to prevent.
|
|
173
186
|
*/
|
|
174
187
|
export declare const REVIVED_ROW_CLEARED_FIELDS: readonly ["settledAt", "stoppedBy", "completionId", "finalOutput", "finalOutputFull", "error", "errorCode", "errorRetryable", "errorKind", "errorRetryAfterMs", "resultIsPartial", "summary", "recentSteps", "editedFiles", "usage"];
|
|
175
188
|
/** Erase {@link REVIVED_ROW_CLEARED_FIELDS} from a record a revival is about to write back. */
|
|
@@ -6,7 +6,7 @@ import { type StoreFidelity, type Checkpoint, type CheckpointFeature, type Check
|
|
|
6
6
|
* had carried beside the one its word now names, and the members added after the table, each a capability a reader
|
|
7
7
|
* must have. Downstream reads them for display only (`CheckpointError.detail.requires`).
|
|
8
8
|
*/
|
|
9
|
-
export declare const REQUIREMENT_WORDS: readonly ["resource", "binding", "token", "orgAdmission", "f012", "realApproval", "face", "requirements_digest", "org_admission_inherited", "org_write_grant", "org_governed", "delegation_provenance", "skill_grants", "skill_card_binding", "hands_coordinates", "hands_home", "path_rule_anchors", "path_rule_installations", "permission_mode", "plan_mode_restore", "persisted_rule_mandate", "deployment_authored", "call_names", "write_face", "denial_limit_fallback", "leg_scope", "tool_ceiling", "tool_lists_judged", "own_tool_lists", "approval_targets", "approval_target_reads", "cross_boundary", "mount_site", "skill_scopes"];
|
|
9
|
+
export declare const REQUIREMENT_WORDS: readonly ["resource", "binding", "token", "orgAdmission", "f012", "realApproval", "face", "requirements_digest", "org_admission_inherited", "org_write_grant", "org_governed", "delegation_provenance", "skill_grants", "skill_card_binding", "hands_coordinates", "hands_home", "path_rule_anchors", "path_rule_installations", "permission_mode", "plan_mode_restore", "persisted_rule_mandate", "deployment_authored", "call_names", "write_face", "denial_limit_fallback", "leg_scope", "tool_ceiling", "tool_lists_judged", "own_tool_lists", "approval_targets", "approval_target_reads", "cross_boundary", "mount_site", "skill_scopes", "run_origin", "tool_declaration"];
|
|
10
10
|
export type RequirementWord = (typeof REQUIREMENT_WORDS)[number];
|
|
11
11
|
/** Runtime twin of {@link RequirementWord}. */
|
|
12
12
|
export declare function isRequirementWord(word: unknown): word is RequirementWord;
|
|
@@ -221,6 +221,9 @@ export declare const CHECKPOINT_STATE_REQUIREMENTS: {
|
|
|
221
221
|
readonly legScope: {
|
|
222
222
|
readonly word: "leg_scope";
|
|
223
223
|
};
|
|
224
|
+
readonly runOrigin: {
|
|
225
|
+
readonly word: "run_origin";
|
|
226
|
+
};
|
|
224
227
|
readonly toolCeiling: {
|
|
225
228
|
readonly word: "tool_ceiling";
|
|
226
229
|
};
|
|
@@ -329,6 +332,9 @@ export declare const PENDING_ACTION_REQUIREMENTS: {
|
|
|
329
332
|
readonly engineMounted: {
|
|
330
333
|
readonly word: "mount_site";
|
|
331
334
|
};
|
|
335
|
+
readonly declarationDigest: {
|
|
336
|
+
readonly word: "tool_declaration";
|
|
337
|
+
};
|
|
332
338
|
readonly targets: {
|
|
333
339
|
readonly word: "approval_targets";
|
|
334
340
|
};
|
|
@@ -362,6 +368,9 @@ export declare const PENDING_ACTION_REQUIREMENTS: {
|
|
|
362
368
|
readonly kind: {
|
|
363
369
|
readonly word: "binding";
|
|
364
370
|
};
|
|
371
|
+
readonly requestedByCallId: {
|
|
372
|
+
readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
|
|
373
|
+
};
|
|
365
374
|
};
|
|
366
375
|
readonly task_done: {
|
|
367
376
|
readonly kind: {
|
|
@@ -591,6 +600,9 @@ export declare const CHECKPOINT_REQUIREMENTS: {
|
|
|
591
600
|
readonly legScope: {
|
|
592
601
|
readonly word: "leg_scope";
|
|
593
602
|
};
|
|
603
|
+
readonly runOrigin: {
|
|
604
|
+
readonly word: "run_origin";
|
|
605
|
+
};
|
|
594
606
|
readonly toolCeiling: {
|
|
595
607
|
readonly word: "tool_ceiling";
|
|
596
608
|
};
|
|
@@ -844,6 +856,9 @@ export declare const CHECKPOINT_REQUIREMENTS: {
|
|
|
844
856
|
readonly engineMounted: {
|
|
845
857
|
readonly word: "mount_site";
|
|
846
858
|
};
|
|
859
|
+
readonly declarationDigest: {
|
|
860
|
+
readonly word: "tool_declaration";
|
|
861
|
+
};
|
|
847
862
|
readonly targets: {
|
|
848
863
|
readonly word: "approval_targets";
|
|
849
864
|
};
|
|
@@ -877,6 +892,9 @@ export declare const CHECKPOINT_REQUIREMENTS: {
|
|
|
877
892
|
readonly kind: {
|
|
878
893
|
readonly word: "binding";
|
|
879
894
|
};
|
|
895
|
+
readonly requestedByCallId: {
|
|
896
|
+
readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
|
|
897
|
+
};
|
|
880
898
|
};
|
|
881
899
|
readonly task_done: {
|
|
882
900
|
readonly kind: {
|
|
@@ -36,6 +36,8 @@ export const REQUIREMENT_WORDS = Object.freeze([
|
|
|
36
36
|
"cross_boundary",
|
|
37
37
|
"mount_site",
|
|
38
38
|
"skill_scopes",
|
|
39
|
+
"run_origin",
|
|
40
|
+
"tool_declaration",
|
|
39
41
|
]);
|
|
40
42
|
export function isRequirementWord(word) {
|
|
41
43
|
return typeof word === "string" && REQUIREMENT_WORDS.includes(word);
|
|
@@ -95,6 +97,7 @@ export const CHECKPOINT_STATE_REQUIREMENTS = {
|
|
|
95
97
|
placementRootSessionId: DECISION_READ,
|
|
96
98
|
externalContentTarget: DECISION_READ,
|
|
97
99
|
legScope: { word: "leg_scope" },
|
|
100
|
+
runOrigin: { word: "run_origin" },
|
|
98
101
|
toolCeiling: { word: "tool_ceiling" },
|
|
99
102
|
toolListsJudged: { word: "tool_lists_judged" },
|
|
100
103
|
ownToolLists: { word: "own_tool_lists" },
|
|
@@ -133,6 +136,7 @@ export const PENDING_ACTION_REQUIREMENTS = {
|
|
|
133
136
|
hostTarget: DECISION_READ,
|
|
134
137
|
names: { word: "call_names" },
|
|
135
138
|
engineMounted: { word: "mount_site" },
|
|
139
|
+
declarationDigest: { word: "tool_declaration" },
|
|
136
140
|
targets: { word: "approval_targets" },
|
|
137
141
|
targetReads: { word: "approval_target_reads" },
|
|
138
142
|
hasBidiControls: SHOWN,
|
|
@@ -141,7 +145,7 @@ export const PENDING_ACTION_REQUIREMENTS = {
|
|
|
141
145
|
},
|
|
142
146
|
resource_limit: { kind: DECISION_READ, reason: DECISION_READ },
|
|
143
147
|
review: { kind: DECISION_READ },
|
|
144
|
-
plan_review: { kind: { word: "binding" } },
|
|
148
|
+
plan_review: { kind: { word: "binding" }, requestedByCallId: SHOWN },
|
|
145
149
|
task_done: { kind: DECISION_READ },
|
|
146
150
|
};
|
|
147
151
|
export const CHECKPOINT_GATE_REQUIREMENTS = {
|
|
@@ -13,6 +13,7 @@ import type { SessionPermissionRules } from "./session-policy-store.js";
|
|
|
13
13
|
import type { NestedUsageAccum, PermissionMode, ShellGateDoctrine, TaskResult } from "./types.js";
|
|
14
14
|
import type { ActiveWorktreeSession } from "../internal/harness-types.js";
|
|
15
15
|
import type { ReopenReason } from "./resume-startup-cause.js";
|
|
16
|
+
import { type RetentionDeclaration } from "./retention.js";
|
|
16
17
|
/**
|
|
17
18
|
* design/45 — the **durable-checkpoint** primitive: cross-process / resumable `suspend`/`resume`.
|
|
18
19
|
*
|
|
@@ -317,7 +318,7 @@ export declare const MAX_PENDING_STEER_ENTRIES: number;
|
|
|
317
318
|
* loud rejection instead of having its new field silently dropped on the parked leg. Consumers (other
|
|
318
319
|
* repos' backends) read it to assert they round-trip every field rather than hand-listing their own copy.
|
|
319
320
|
*/
|
|
320
|
-
export declare const PENDING_STEER_FROZEN_FIELDS: readonly ["text", "trusted", "actor", "seq", "inputId", "priority"];
|
|
321
|
+
export declare const PENDING_STEER_FROZEN_FIELDS: readonly ["text", "trusted", "actor", "seq", "inputId", "priority", "runOrigin"];
|
|
321
322
|
/**
|
|
322
323
|
* design/171 §6.1 — WHO a piece of human input came from, as an attribution label. ONE definition:
|
|
323
324
|
* the shape lives at its layering-legal home (`engine/llm/types.ts`, where `UserMessage.actor`
|
|
@@ -351,6 +352,9 @@ export interface PendingSteerEntry {
|
|
|
351
352
|
inputId: string;
|
|
352
353
|
/** Carried VERBATIM for the serving layer; it does NOT reorder the drain (drain is `seq` order). */
|
|
353
354
|
priority?: SystemInjectionPriority;
|
|
355
|
+
/** What brought this input, when its host says so ({@link import("./run-origin.js").RunOrigin}): its `human_input` frame
|
|
356
|
+
* reports it, and the newest input a wake hands over states the woken leg's word with it. Attribution only; absent = the host said nothing. */
|
|
357
|
+
runOrigin?: import("./run-origin.js").RunOrigin;
|
|
354
358
|
}
|
|
355
359
|
/** design/171 §6.3 — the caller-supplied half of a {@link PendingSteerEntry}: everything except `seq`,
|
|
356
360
|
* which only the store may mint. `inputId` is optional on the way in (minted when absent). */
|
|
@@ -360,6 +364,7 @@ export interface PendingSteerInput {
|
|
|
360
364
|
actor?: ActorAssertion;
|
|
361
365
|
inputId?: string;
|
|
362
366
|
priority?: SystemInjectionPriority;
|
|
367
|
+
runOrigin?: import("./run-origin.js").RunOrigin;
|
|
363
368
|
}
|
|
364
369
|
/** True ONLY for a PLAIN data record (not null / array / class-instance / proxy-with-odd-prototype) — the only
|
|
365
370
|
* shape we safely digest. Adversarial args (a proxy, a getter that throws) must never crash the mint, so this +
|
|
@@ -711,7 +716,8 @@ export type ResumeOutcome = {
|
|
|
711
716
|
* trusted/untrusted delivery framing as {@link CheckpointState.pendingSteerQueue}). It rides the resume
|
|
712
717
|
* continuation's steer tail as its OWN segment, appended AFTER any already-parked queue entry
|
|
713
718
|
* (X5: both are delivered — the wake message never displaces a parked, undelivered supervisor steer;
|
|
714
|
-
* each segment is framed under its own `trusted` semantics, never one merged trust domain).
|
|
719
|
+
* each segment is framed under its own `trusted` semantics, never one merged trust domain). Under a held
|
|
720
|
+
* `inputId` it is judged by {@link judgeParkedSteerRepeat}: identical ⇒ that entry, once. WITHOUT a
|
|
715
721
|
* `message`, the checkpoint must already carry a parked steer — a wake with nothing to
|
|
716
722
|
* deliver is rejected (`wake.nothing_to_deliver`, anti spin-wake). Idempotency rides the existing
|
|
717
723
|
* resolve CAS: a second wake of the same token loses the CAS (`checkpoint.already_resolved`). */
|
|
@@ -872,9 +878,9 @@ export type PendingAction = {
|
|
|
872
878
|
* this action against, read off the leg's tool roster at the suspend station — `capabilityId`
|
|
873
879
|
* (engine-minted over {source, peer, name, contractId}), `contractId`, `shapeDigest`,
|
|
874
880
|
* `implementationRevision`. With the face below they are the TOOL member of the row's approval object
|
|
875
|
-
* (`judgeApprovalObject`): an identity member that differs from the same-name row on the resuming leg
|
|
876
|
-
*
|
|
877
|
-
*
|
|
881
|
+
* (`judgeApprovalObject`): an identity member that differs from the same-name row on the resuming leg is a replacement
|
|
882
|
+
* wearing the name (`resume.tool_contract_mismatch`, a reopen); a face or declaration that differs vetoes the call
|
|
883
|
+
* (`resume.target_moved`). Any of them ABSENT (or the family, or the declaration digest) ⇒ the row binds no tool.
|
|
878
884
|
*/
|
|
879
885
|
capabilityId?: string;
|
|
880
886
|
contractId?: string;
|
|
@@ -885,7 +891,7 @@ export type PendingAction = {
|
|
|
885
891
|
* display `family` + declared `pathTarget` — off the same roster row at the same mint. The pre-CAS resume-edit
|
|
886
892
|
* recheck has no roster yet; it rebuilds the call face from these (`parkedCallFaceOf`) and judges the edit as
|
|
887
893
|
* the live gate judged the original (merge-seam H1: without them a caller slot fell to the catalog's slot for
|
|
888
|
-
* the NAME).
|
|
894
|
+
* the NAME). Read only on a whole tool member: an absent `pathTarget` (or resolution member) is then the declaration's own silence.
|
|
889
895
|
*/
|
|
890
896
|
family?: import("./tool-face.js").ToolFamily;
|
|
891
897
|
pathTarget?: import("./tool-face.js").ToolRosterPathTarget;
|
|
@@ -904,6 +910,8 @@ export type PendingAction = {
|
|
|
904
910
|
* carries): what the identity members above cannot say (a host-mounted engine definition has the same ones). The pre-CAS
|
|
905
911
|
* recheck rebuilds the face from the row (`parkedCallFaceOf`); absent ⇒ judged as an ordinary tool. Word `mount_site`. */
|
|
906
912
|
engineMounted?: true;
|
|
913
|
+
/** The digest of the roster row's DECLARATION members (`toolDeclarationDigestOf`): a live row whose declaration differs vetoes the call (`resume.target_moved`). Word `tool_declaration`. */
|
|
914
|
+
declarationDigest?: string;
|
|
907
915
|
/** The approval object's TARGETS (`approvalTargetsOf`): per reading of the path slot, where it resolved when the card
|
|
908
916
|
* was asked; absent ⇒ not judged. A role resolving elsewhere at the execution vetoes the call (`resume.target_moved`). */
|
|
909
917
|
targets?: import("./approval-object.js").ApprovalTargets;
|
|
@@ -959,9 +967,18 @@ export type PendingAction = {
|
|
|
959
967
|
* reviews the PLAN, not a tool call — so this arm has no tool fields. Every consumer that reads the
|
|
960
968
|
* `tool_approval` fields above MUST branch on `kind` FIRST: a `plan_review` checkpoint must never flow into
|
|
961
969
|
* a `resource_limit`- or `tool_approval`-shaped continuation (a contract test pins this). The plan artifact
|
|
962
|
-
* is a PROFILE concern (a REF — design/76 §9); core stores no plan here.
|
|
970
|
+
* is a PROFILE concern (a REF — design/76 §9); core stores no plan here.
|
|
971
|
+
*
|
|
972
|
+
* `requestedByCallId` is the id of the tool call that ASKED for this pause (the `ExitPlanMode` call for the
|
|
973
|
+
* first-party plan tool): which transcript call carries the plan awaiting a decision, so a card can join the pause to
|
|
974
|
+
* the call that presented it instead of guessing by adjacency. It is PROVENANCE, not a binding — the pause
|
|
975
|
+
* still gates no call, `toolCallId` stays absent on this arm, and nothing on the resume path reads the id. Written
|
|
976
|
+
* once, at the park mint, from the engine-bound call id (a tool cannot name another call's id); the paused
|
|
977
|
+
* cause and the inbox summary echo it. ABSENT for a pause whose requester carried no call id (a revive context,
|
|
978
|
+
* a row a deployment minted itself, a row from an engine before this member). */
|
|
963
979
|
| {
|
|
964
980
|
kind: "plan_review";
|
|
981
|
+
requestedByCallId?: string;
|
|
965
982
|
}
|
|
966
983
|
/** design/144 §3 (X2) — the NON-GATE arm: nothing pends a decision. The shape of a deployment-minted
|
|
967
984
|
* PARK checkpoint (approval-timeout park / pure suspend; paired with `gate.kind === "task_done"`, the
|
|
@@ -1367,6 +1384,12 @@ export interface CheckpointState {
|
|
|
1367
1384
|
* that hands no live seat restores it, so the resume config cannot move the leg's next row. Not {@link Checkpoint.scope}
|
|
1368
1385
|
* (where THIS row is filed — a resource slice's own declared scope). Absent ⇒ minted before the member: derived as before. */
|
|
1369
1386
|
legScope?: string;
|
|
1387
|
+
/** The word of the LEG that parked this row ({@link import("./run-origin.js").RunOrigin}: the word of the input that opened
|
|
1388
|
+
* that leg, read once at its config doors), stamped at every mint and continued by a leg a decision resumes (a wake opens
|
|
1389
|
+
* its leg with the input it hands over instead): an approved, resumed leg is still that leg's work. Absent ⇒ the host said
|
|
1390
|
+
* nothing (or the row was minted before the member). Attribution only. A reader that lacks the word would resume the leg with
|
|
1391
|
+
* its origin silently lost. */
|
|
1392
|
+
runOrigin?: import("./run-origin.js").RunOrigin;
|
|
1370
1393
|
/** The tool-selector layers this LEG was spawned under (`RunInternals.toolCeiling`), stamped at every mint: a resume that hands
|
|
1371
1394
|
* no live ceiling restores it, so a resumed child can never use a tool its spawning run could not. Absent ⇒ the leg had no
|
|
1372
1395
|
* ceiling (a root run) or the row was minted before the member. A reader that lacks the word would run the leg unbounded.
|
|
@@ -1951,6 +1974,13 @@ export interface CheckpointIndexFacts {
|
|
|
1951
1974
|
/** Derive a row's {@link CheckpointIndexFacts}. Pure: reads no clock, writes nothing; the approval card is read
|
|
1952
1975
|
* through {@link parkedApprovalCardOf} (the one card reading), the tool fields only off a `tool_approval` action. */
|
|
1953
1976
|
export declare function checkpointIndexFacts(cp: Checkpoint): CheckpointIndexFacts;
|
|
1977
|
+
/**
|
|
1978
|
+
* The ONE reading of {@link PendingAction} `plan_review.requestedByCallId` — the id of the call that asked for a plan
|
|
1979
|
+
* pause. A non-empty string on a `plan_review` pending action; every other kind, an absent member and a damaged value
|
|
1980
|
+
* (a non-string, an empty string) read as `undefined`, so no consumer echoes a value the mint never wrote. The paused
|
|
1981
|
+
* cause and the inbox summary both read it here.
|
|
1982
|
+
*/
|
|
1983
|
+
export declare function planReviewRequesterOf(pendingAction: PendingAction): string | undefined;
|
|
1954
1984
|
/**
|
|
1955
1985
|
* design/80 assistant-scheduler seam #1: a LIGHTWEIGHT projection of one PENDING
|
|
1956
1986
|
* checkpoint, returned in bulk by {@link CheckpointStore.listByScope} so a supervisor scheduler can list a
|
|
@@ -2003,6 +2033,11 @@ export interface CheckpointSummary {
|
|
|
2003
2033
|
* face) must not materialize the keys as `null` on the way out. Pinned in
|
|
2004
2034
|
* `test/checkpoint-store.test.ts` ("tool-less park …"). */
|
|
2005
2035
|
toolCallId?: string;
|
|
2036
|
+
/** The id of the tool call that asked for this plan pause ({@link PendingAction} `plan_review.requestedByCallId`) —
|
|
2037
|
+
* present ONLY on a `plan_review` row whose requester carried a call id; OMITTED on every other row (the
|
|
2038
|
+
* {@link toolCallId} absence-shape note applies). It names the call that PRESENTED the plan, not a call the pause
|
|
2039
|
+
* gates: `toolCallId` stays omitted on a plan_review row. */
|
|
2040
|
+
requestedByCallId?: string;
|
|
2006
2041
|
/** The pending tool's name ({@link PendingAction} `tool_approval.toolName`) when this is an approval suspend.
|
|
2007
2042
|
* OMITTED (not `null`) for a non-`tool_approval` pendingAction — see {@link toolCallId}'s absence-shape note. */
|
|
2008
2043
|
toolName?: string;
|
|
@@ -2098,6 +2133,11 @@ export interface CheckpointSummary {
|
|
|
2098
2133
|
* value is a member of the closed set ({@link import("./ask-origin.js").isAskOrigin}) — a bad value
|
|
2099
2134
|
* reads as absent, never as a word. OMITTED when the row carries none (a pre-existing row). */
|
|
2100
2135
|
origin?: import("./ask-origin.js").AskOrigin;
|
|
2136
|
+
/** What opened the leg that parked this row — the row's `state.runOrigin` (`"scheduled"`: the deployment's scheduler, not a
|
|
2137
|
+
* person submitting just now), for every gate kind, so an inbox shows it in the one listing call. Echoed only as a member of
|
|
2138
|
+
* {@link import("./run-origin.js").RUN_ORIGINS} (the resume's screen refuses any other value loudly; this projection never
|
|
2139
|
+
* invents one). OMITTED when the row carries none. ECHO-ONLY: attribution, never a gate input. */
|
|
2140
|
+
runOrigin?: import("./run-origin.js").RunOrigin;
|
|
2101
2141
|
/**
|
|
2102
2142
|
* PRESENCE ONLY — this pending `tool_approval` row's payload carries at least one DIRECTIONAL
|
|
2103
2143
|
* format control (the {@link import("./tool-policy.js").AskRequest.hasBidiControls} character class;
|
|
@@ -2159,7 +2199,9 @@ export declare function summarizeCheckpoint(cp: Checkpoint, disclose?: (sentence
|
|
|
2159
2199
|
* worker), `"env_factory_missing"` (retryable on a factory-wired worker),
|
|
2160
2200
|
* `"governed_unwired"` (retryable on an org-wired worker), `"origin_missing"` (a pending approval row
|
|
2161
2201
|
* minted before the ask's origin was persisted on the park — terminal for the row's bytes; the host
|
|
2162
|
-
* decides the orphaned card itself, no worker version redeems it), `"
|
|
2202
|
+
* decides the orphaned card itself, no worker version redeems it), `"tool_identity_missing"` (a pending approval row
|
|
2203
|
+
* whose tool member is not whole — parked before 7.58.0 recorded the declaration, or damaged: an allow is refused, a deny
|
|
2204
|
+
* settles it; a worker of the release that parked it still reads it), `"ledger_event_unknown"` (a durable
|
|
2163
2205
|
* LEDGER carries an event kind this binary does not know, so the replay is refused rather than served
|
|
2164
2206
|
* incomplete — the one arm that is not row-scoped: NO row in that data directory is readable here, so
|
|
2165
2207
|
* the host rolls the binary forward instead of routing one token elsewhere), `"seat_retired"` (the row
|
|
@@ -2167,10 +2209,14 @@ export declare function summarizeCheckpoint(cp: Checkpoint, disclose?: (sentence
|
|
|
2167
2209
|
* steer seat, which no worker version reads and the host decides itself, or a retired mode-seed member of
|
|
2168
2210
|
* `inheritedGate`, which an engine at 7.38.x or earlier still reads once).
|
|
2169
2211
|
* · `invalid_outcome` pre-CAS row-integrity arms: `"real_approval_damaged"`, `"real_approval_forged"`,
|
|
2170
|
-
* `"read_face_damaged"`, `"read_face_forged"`, `"write_face_damaged"`, `"skill_grants_damaged"`, `"skill_scopes_damaged"`, `"constraint_chain_missing"`, `"hands_coordinates_damaged"`, `"requirements_damaged"` (all terminal for the row's
|
|
2212
|
+
* `"read_face_damaged"`, `"read_face_forged"`, `"write_face_damaged"`, `"skill_grants_damaged"`, `"skill_scopes_damaged"`, `"constraint_chain_missing"`, `"hands_coordinates_damaged"`, `"requirements_damaged"`, `"bound_input_hash_missing"` (all terminal for the row's
|
|
2171
2213
|
* current bytes — no worker version redeems a damaged row).
|
|
2214
|
+
*
|
|
2215
|
+
* THE ONE RULE for `checkpoint.invalid_outcome` (registered in `docs/CLOSED-SETS.md`, which also says what a host reads from it): `detail.reason` is a
|
|
2216
|
+
* ROW-INTEGRITY word and only that, `detail.field` ({@link CheckpointErrorField}) names the cell of the decision to act on, a refusal carries at most
|
|
2217
|
+
* one of them, and a refusal with neither is never a damaged row.
|
|
2172
2218
|
*/
|
|
2173
|
-
export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "governed_unwired" | "origin_missing" | "ledger_event_unknown" | "seat_retired" | "real_approval_damaged" | "real_approval_forged" | "read_face_damaged" | "read_face_forged"
|
|
2219
|
+
export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "governed_unwired" | "origin_missing" | "tool_identity_missing" | "ledger_event_unknown" | "seat_retired" | "real_approval_damaged" | "real_approval_forged" | "read_face_damaged" | "read_face_forged"
|
|
2174
2220
|
/** `state.writeFace` is present but not a well-formed section. No `_forged` twin: the section is
|
|
2175
2221
|
* legal-and-absent at every version, so there is no version to judge a fabrication against — and a
|
|
2176
2222
|
* fabricated "open" still needs the LIVE resolution to say open too. */
|
|
@@ -2183,6 +2229,10 @@ export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "g
|
|
|
2183
2229
|
* is present below v10, or does not equal the words the row's content carries (a segment dropped, or a word not
|
|
2184
2230
|
* declared) — terminal for the row's bytes. */
|
|
2185
2231
|
| "requirements_damaged"
|
|
2232
|
+
/** A pending tool approval whose row format is at or above the binding era carries no persisted `boundInputHash` — every mint at that
|
|
2233
|
+
* version writes one, so its absence is corruption or a caller-declared downgrade, and the decision-action input binding has nothing to
|
|
2234
|
+
* bind to. Terminal for the row's bytes (a pre-binding row, which never minted a hash, binds on `boundCallId` alone and is not this). */
|
|
2235
|
+
| "bound_input_hash_missing"
|
|
2186
2236
|
/** On `resume.parent_constraint_mismatch`: a re-supplied chain entry whose path rules depend on the leg that installed it has
|
|
2187
2237
|
* no installation record (a chain written before the record existed) / a record that does not cover the chain entry for
|
|
2188
2238
|
* entry / a record member naming no absolute root. */
|
|
@@ -2216,12 +2266,12 @@ export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "g
|
|
|
2216
2266
|
* a skill's `baseDir` by its own reader, `config.skill_base_dir_invalid`). A door not entered here (the leg's model, its rebuilt
|
|
2217
2267
|
* roster, its answer face, the approval seat's value) still refuses after the claim, each for a stated reason (INTEGRATION-CORE, "A resume's two doors").
|
|
2218
2268
|
*/
|
|
2219
|
-
export declare const CHECKPOINT_CONFIG_REFUSAL_CODES: readonly ["config.spec_retired_key", "config.output_style_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.skill_base_dir_invalid", "config.host_floor_invalid"];
|
|
2269
|
+
export declare const CHECKPOINT_CONFIG_REFUSAL_CODES: readonly ["config.spec_retired_key", "config.output_style_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.run_origin_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.skill_base_dir_invalid", "config.host_floor_invalid", "config.credential_in_declaration", "config.credential_ref_invalid", "config.peer_seat_missing"];
|
|
2220
2270
|
export type CheckpointConfigRefusalCode = (typeof CHECKPOINT_CONFIG_REFUSAL_CODES)[number];
|
|
2221
2271
|
export declare const isCheckpointConfigRefusalCode: (word: unknown) => word is CheckpointConfigRefusalCode;
|
|
2222
2272
|
/** The words of a {@link CheckpointError}'s optional `detail.field` (what each means: the `detail` member's doc). A CLOSED SET with one home, registered in
|
|
2223
2273
|
* `docs/CLOSED-SETS.md`: a consumer holding a table over it is tsc-red on a new word until it places the word. */
|
|
2224
|
-
export type CheckpointErrorField = "boundCallId" | "boundInputHash" | "boundGrantDigest" | "answer" | "hostDecision" | "approver" | "feedback" | "taskConfig" | "deps" | "inheritedGate";
|
|
2274
|
+
export type CheckpointErrorField = "boundCallId" | "boundInputHash" | "boundGrantDigest" | "answer" | "hostDecision" | "approver" | "feedback" | "outcome" | "updatedInput" | "decision" | "reason" | "taskConfig" | "deps" | "inheritedGate";
|
|
2225
2275
|
/** A typed checkpoint-store error so callers branch on `code` (mirrors `SessionError`). */
|
|
2226
2276
|
export declare class CheckpointError extends Error {
|
|
2227
2277
|
readonly code: "checkpoint.already_exists" | "checkpoint.already_resolved" | "checkpoint.not_found"
|
|
@@ -2404,7 +2454,10 @@ export declare class CheckpointError extends Error {
|
|
|
2404
2454
|
* resolve, or try to supply the minted record), or — design/252 G-7 — `"approver"` (the attribution is not a
|
|
2405
2455
|
* well-formed identifier: re-decide with a plain, bounded, control-character-free string, or omit
|
|
2406
2456
|
* it), or `"feedback"` (the allow's `feedback` is not fit to deliver — it carries the engine's `<system-reminder>` tag, is not a string, rides a deny,
|
|
2407
|
-
* or rides a decide a machine made: re-decide with the words changed or dropped; the binding did not change)
|
|
2457
|
+
* or rides a decide a machine made: re-decide with the words changed or dropped; the binding did not change), or — an approval decide's own
|
|
2458
|
+
* payload — `"outcome"` (the resume's outcome is not an object naming its gate: send one), `"updatedInput"` (the person's edit is not plain JSON data the
|
|
2459
|
+
* engine can capture: re-decide with a plain edit, or without one), `"decision"` (the verdict word is neither `allow` nor `deny`) or `"reason"` (the deny's
|
|
2460
|
+
* words are not a plain string, or carry the engine's `<system-reminder>` tag: change or drop them; the binding did not change). On a `checkpoint.config_refused` `field` names which INPUT carries the refusal — `"taskConfig"`
|
|
2408
2461
|
* (the re-supplied config: correct it and resume the same token), `"deps"` (the deployment's own seat — and the policies the
|
|
2409
2462
|
* caller re-supplies as inherited constraints: correct them and resume the same token) or `"inheritedGate"` (the row's record: no config reaches it; expire the row). The throw
|
|
2410
2463
|
* sites always knew which arm fired; this carries that fact instead of dropping it (ruled
|
|
@@ -2617,7 +2670,10 @@ export declare class CheckpointError extends Error {
|
|
|
2617
2670
|
* resolve, or try to supply the minted record), or — design/252 G-7 — `"approver"` (the attribution is not a
|
|
2618
2671
|
* well-formed identifier: re-decide with a plain, bounded, control-character-free string, or omit
|
|
2619
2672
|
* it), or `"feedback"` (the allow's `feedback` is not fit to deliver — it carries the engine's `<system-reminder>` tag, is not a string, rides a deny,
|
|
2620
|
-
* or rides a decide a machine made: re-decide with the words changed or dropped; the binding did not change)
|
|
2673
|
+
* or rides a decide a machine made: re-decide with the words changed or dropped; the binding did not change), or — an approval decide's own
|
|
2674
|
+
* payload — `"outcome"` (the resume's outcome is not an object naming its gate: send one), `"updatedInput"` (the person's edit is not plain JSON data the
|
|
2675
|
+
* engine can capture: re-decide with a plain edit, or without one), `"decision"` (the verdict word is neither `allow` nor `deny`) or `"reason"` (the deny's
|
|
2676
|
+
* words are not a plain string, or carry the engine's `<system-reminder>` tag: change or drop them; the binding did not change). On a `checkpoint.config_refused` `field` names which INPUT carries the refusal — `"taskConfig"`
|
|
2621
2677
|
* (the re-supplied config: correct it and resume the same token), `"deps"` (the deployment's own seat — and the policies the
|
|
2622
2678
|
* caller re-supplies as inherited constraints: correct them and resume the same token) or `"inheritedGate"` (the row's record: no config reaches it; expire the row). The throw
|
|
2623
2679
|
* sites always knew which arm fired; this carries that fact instead of dropping it (ruled
|
|
@@ -2750,13 +2806,12 @@ export declare function encodeAtFidelity(fidelity: StoreFidelity, value: unknown
|
|
|
2750
2806
|
};
|
|
2751
2807
|
export interface CheckpointStore {
|
|
2752
2808
|
/**
|
|
2753
|
-
* Managed-retention declaration (
|
|
2754
|
-
*
|
|
2755
|
-
* {@link reap} (
|
|
2756
|
-
*
|
|
2757
|
-
* with a LOCKED retention policy refuses to start over it. Declaration, never duck-typing.
|
|
2809
|
+
* Managed-retention declaration (retention.ts), stated by the party that runs the sweep: `"managed"` says this store's
|
|
2810
|
+
* rows are deleted on schedule by the deployment — an executor runs over them, closing the reap/unpin gap documented on
|
|
2811
|
+
* {@link reap} (its scheduled expiry DOES release the session pins). `"none"` (or ABSENT — read fail-closed as `"none"`)
|
|
2812
|
+
* says nothing deletes them on schedule; a deployment with a LOCKED retention policy refuses to start over it.
|
|
2758
2813
|
*/
|
|
2759
|
-
readonly retention?:
|
|
2814
|
+
readonly retention?: RetentionDeclaration;
|
|
2760
2815
|
/**
|
|
2761
2816
|
* design/173 §2.3 — durability declaration (see {@link StoreDurability}): whether checkpoints
|
|
2762
2817
|
* this store accepts survive a process restart. Same "declaration, never duck-typing" posture as
|
|
@@ -3124,6 +3179,12 @@ export declare const ACTOR_ASSERTION_FROZEN_FIELDS: readonly ["id", "hostAsserte
|
|
|
3124
3179
|
* on its own surface and parks it again through `setPendingSteer` if it still applies.
|
|
3125
3180
|
*/
|
|
3126
3181
|
export declare function readPendingSteerQueue(state: Pick<CheckpointState, "pendingSteerQueue">): PendingSteerEntry[];
|
|
3182
|
+
/**
|
|
3183
|
+
* The parked queue's ONE identity judgment (the append below and the wake entrance read it): the held entry
|
|
3184
|
+
* when `entry` repeats it identically (the replay), `undefined` for a new `inputId`, else
|
|
3185
|
+
* `steering.duplicate_input_id` naming the facets that differ — the key alone is no proof of a replay.
|
|
3186
|
+
*/
|
|
3187
|
+
export declare function judgeParkedSteerRepeat(queue: readonly PendingSteerEntry[], entry: Omit<PendingSteerEntry, "seq">): PendingSteerEntry | undefined;
|
|
3127
3188
|
/**
|
|
3128
3189
|
* design/171 §5.3/§6.3 — THE append, shared by every backend so the bounds and the ordering are one
|
|
3129
3190
|
* implementation rather than one per store.
|
|
@@ -3166,9 +3227,9 @@ export type CheckpointFaultMode =
|
|
|
3166
3227
|
* {@link testInjectFault} simulates the crash-recovery races a real backend must survive.
|
|
3167
3228
|
*/
|
|
3168
3229
|
export declare class InMemoryCheckpointStore implements CheckpointStore {
|
|
3169
|
-
/**
|
|
3170
|
-
*
|
|
3171
|
-
readonly retention:
|
|
3230
|
+
/** Managed-retention declaration (retention.ts) — the `retention` option (default `"none"`, a third word refused), stated by
|
|
3231
|
+
* the party that runs the sweep. In-memory rows die with the process, which is not a schedule. */
|
|
3232
|
+
readonly retention: RetentionDeclaration;
|
|
3172
3233
|
/** design/173 §2.3 — honest declaration: in-memory rows die with the process. */
|
|
3173
3234
|
readonly durability: "process-local";
|
|
3174
3235
|
/** Honest declaration on the fidelity axis: `put`/`get` are `structuredClone`, so a row keeps the
|
|
@@ -3197,6 +3258,7 @@ export declare class InMemoryCheckpointStore implements CheckpointStore {
|
|
|
3197
3258
|
readonly owner: string | null;
|
|
3198
3259
|
} | undefined>;
|
|
3199
3260
|
holderIsCurrent?: HolderJudge;
|
|
3261
|
+
retention?: RetentionDeclaration;
|
|
3200
3262
|
});
|
|
3201
3263
|
put(token: CheckpointToken, cp: Checkpoint): Promise<void>;
|
|
3202
3264
|
get(token: CheckpointToken): Promise<Checkpoint | null>;
|