@sema-agent/core 7.60.0 → 7.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +917 -0
- package/README.md +2 -2
- package/dist/agents/agent-transcript-tool.d.ts +2 -2
- package/dist/agents/agent-transcript-tool.js +1 -1
- package/dist/agents/cascade.d.ts +71 -12
- package/dist/agents/cascade.js +61 -21
- package/dist/agents/composition-allowance.d.ts +53 -0
- package/dist/agents/composition-allowance.js +49 -0
- package/dist/agents/composition-placement.d.ts +29 -0
- package/dist/agents/composition-placement.js +24 -0
- package/dist/agents/cumulative-stats.d.ts +4 -0
- package/dist/agents/cumulative-stats.js +3 -0
- package/dist/agents/inherited-tool-pool.d.ts +5 -3
- package/dist/agents/inherited-tool-pool.js +2 -2
- package/dist/agents/list-agents-tool.d.ts +1 -1
- package/dist/agents/peer-held-queue.d.ts +27 -4
- package/dist/agents/peer-held-queue.js +81 -36
- package/dist/agents/peer-notice-route.d.ts +1 -1
- package/dist/agents/peer-notice-route.js +4 -3
- package/dist/agents/peer-notices.d.ts +4 -4
- package/dist/agents/peer-notices.js +8 -4
- package/dist/agents/peer-session-drain.d.ts +8 -1
- package/dist/agents/peer-session-drain.js +49 -10
- package/dist/agents/repair-loop.js +16 -6
- package/dist/agents/retain-ledger.js +3 -1
- package/dist/agents/roster-store.d.ts +1 -1
- package/dist/agents/roster-store.js +7 -4
- package/dist/agents/send-message-tool.d.ts +8 -10
- package/dist/agents/send-message-tool.js +43 -23
- package/dist/agents/subagent-completion-gate.d.ts +35 -0
- package/dist/agents/subagent-completion-gate.js +62 -0
- package/dist/agents/subagent-steps.d.ts +7 -6
- package/dist/agents/subagent.d.ts +36 -41
- package/dist/agents/subagent.js +245 -200
- package/dist/agents/suspend-guard.d.ts +47 -16
- package/dist/agents/suspend-guard.js +13 -4
- package/dist/agents/verify.d.ts +41 -14
- package/dist/agents/verify.js +41 -30
- package/dist/brain/anthropic.js +1 -0
- package/dist/brain/errors.d.ts +7 -1
- package/dist/brain/errors.js +6 -0
- package/dist/brain/failover.js +2 -1
- package/dist/brain/open-responses.js +1 -0
- package/dist/brain/openai.js +1 -0
- package/dist/brain/provider-dialect.d.ts +10 -0
- package/dist/brain/provider-dialect.js +13 -2
- package/dist/brain/stream-engine.d.ts +3 -0
- package/dist/brain/stream-engine.js +4 -0
- package/dist/core/agent-state.d.ts +1 -1
- package/dist/core/allow-entry.d.ts +59 -23
- package/dist/core/allow-entry.js +131 -38
- package/dist/core/ask-origin.d.ts +79 -0
- package/dist/core/ask-origin.js +76 -0
- package/dist/core/ask-question.d.ts +19 -13
- package/dist/core/ask-question.js +8 -2
- package/dist/core/auto-compaction.d.ts +2 -0
- package/dist/core/auto-compaction.js +2 -1
- package/dist/core/auto-mode.js +3 -5
- package/dist/core/background-agent-store.d.ts +7 -5
- package/dist/core/background-agent-store.js +12 -11
- package/dist/core/checkpoint-features.d.ts +722 -0
- package/dist/core/checkpoint-features.js +98 -0
- package/dist/core/checkpoint-requirements.d.ts +33 -5
- package/dist/core/checkpoint-requirements.js +18 -5
- package/dist/core/checkpoint-row-verdict.d.ts +99 -0
- package/dist/core/checkpoint-row-verdict.js +225 -0
- package/dist/core/checkpoint-store.d.ts +107 -738
- package/dist/core/checkpoint-store.js +45 -143
- package/dist/core/child-clamp-seats.d.ts +3 -2
- package/dist/core/child-clamp-seats.js +4 -3
- package/dist/core/closest-name.d.ts +13 -0
- package/dist/core/closest-name.js +35 -0
- package/dist/core/context-settings.js +3 -5
- package/dist/core/cross-boundary-taint.d.ts +1 -1
- package/dist/core/decision-receipt.d.ts +14 -1
- package/dist/core/decision-receipt.js +6 -3
- package/dist/core/delegation-frames.d.ts +13 -9
- package/dist/core/effective-path-target.js +2 -3
- package/dist/core/engine-attestation.d.ts +11 -1
- package/dist/core/engine-attestation.js +2 -0
- package/dist/core/engine-notice.d.ts +68 -21
- package/dist/core/engine-notice.js +9 -2
- package/dist/core/file-history-retention.d.ts +8 -0
- package/dist/core/file-history-retention.js +14 -11
- package/dist/core/file-history-store.d.ts +31 -1
- package/dist/core/file-history-store.js +31 -2
- package/dist/core/frame-settlement.d.ts +10 -0
- package/dist/core/frame-settlement.js +6 -1
- package/dist/core/fs-write-gate-policy.d.ts +3 -3
- package/dist/core/fs-write-gate-policy.js +8 -7
- package/dist/core/gate-fold.js +4 -3
- package/dist/core/gate-lanes.js +7 -4
- package/dist/core/gate-outcome.d.ts +40 -1
- package/dist/core/gate-outcome.js +10 -0
- package/dist/core/git-worktree-env.d.ts +7 -3
- package/dist/core/git-worktree-env.js +16 -13
- package/dist/core/governance-codes.d.ts +14 -4
- package/dist/core/governance-codes.js +19 -4
- package/dist/core/hooks.d.ts +25 -4
- package/dist/core/hooks.js +11 -4
- package/dist/core/host-floor.js +3 -5
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +47 -7
- package/dist/core/image-admission.js +35 -4
- package/dist/core/input-author.d.ts +36 -0
- package/dist/core/input-author.js +39 -0
- package/dist/core/leg-identity.d.ts +62 -0
- package/dist/core/leg-identity.js +18 -0
- package/dist/core/locked-config.d.ts +4 -3
- package/dist/core/locked-config.js +5 -3
- package/dist/core/lsp.d.ts +5 -3
- package/dist/core/lsp.js +3 -2
- package/dist/core/mailbox-store.d.ts +85 -10
- package/dist/core/mailbox-store.js +31 -10
- package/dist/core/mcp-connection-pool.d.ts +6 -20
- package/dist/core/mcp-connection-pool.js +10 -28
- package/dist/core/mcp-failure.d.ts +76 -15
- package/dist/core/mcp-failure.js +60 -33
- package/dist/core/mcp-host-seat.d.ts +92 -53
- package/dist/core/mcp-host-seat.js +225 -46
- package/dist/core/mcp-probe.js +2 -2
- package/dist/core/mcp-server-link.d.ts +18 -6
- package/dist/core/mcp-server-link.js +19 -4
- package/dist/core/mcp-server-spec.d.ts +2 -1
- package/dist/core/mcp-session-end.d.ts +1 -2
- package/dist/core/mcp-session-end.js +1 -1
- package/dist/core/mcp.d.ts +6 -49
- package/dist/core/mcp.js +115 -111
- package/dist/core/media-byte-cap.d.ts +21 -46
- package/dist/core/media-byte-cap.js +55 -55
- package/dist/core/member-group.d.ts +7 -0
- package/dist/core/member-group.js +35 -0
- package/dist/core/memory-engine/consolidation-driver.d.ts +1 -1
- package/dist/core/memory-engine/consolidation.d.ts +1 -1
- package/dist/core/memory-engine/consolidation.js +7 -1
- package/dist/core/memory-engine/dual-root.d.ts +31 -0
- package/dist/core/memory-engine/dual-root.js +59 -11
- package/dist/core/memory-engine/engine.js +27 -24
- package/dist/core/memory-engine/file-backend.d.ts +13 -0
- package/dist/core/memory-engine/file-backend.js +35 -15
- package/dist/core/memory-engine/layout.d.ts +3 -0
- package/dist/core/memory-engine/layout.js +13 -3
- package/dist/core/memory-engine/memory-deployment.d.ts +110 -0
- package/dist/core/memory-engine/memory-deployment.js +182 -0
- package/dist/core/memory-engine/sync-client.d.ts +39 -18
- package/dist/core/memory-engine/sync-client.js +72 -14
- package/dist/core/memory-engine/sync-report.d.ts +7 -4
- package/dist/core/memory-engine/sync.d.ts +9 -1
- package/dist/core/memory-vector.d.ts +1 -1
- package/dist/core/memory.d.ts +10 -10
- package/dist/core/mode-policy.d.ts +8 -8
- package/dist/core/mode-policy.js +8 -6
- package/dist/core/mods/agent-stations.d.ts +39 -4
- package/dist/core/mods/agent-stations.js +59 -10
- package/dist/core/mods/classic-events.d.ts +9 -1
- package/dist/core/mods/dollar.d.ts +94 -1
- package/dist/core/mods/dollar.js +13 -1
- package/dist/core/mods/extension-call.d.ts +15 -1
- package/dist/core/mods/extension-call.js +7 -2
- package/dist/core/mods/kernel/dispatch.d.ts +4 -3
- package/dist/core/mods/kernel/dispatch.js +4 -4
- package/dist/core/mods/kernel/events.d.ts +14 -3
- package/dist/core/mods/kernel/events.js +18 -15
- package/dist/core/mods/kernel/registration.d.ts +3 -0
- package/dist/core/mods/kernel/registration.js +5 -0
- package/dist/core/mods/kernel/site-rules.d.ts +6 -3
- package/dist/core/mods/kernel/site-rules.js +10 -2
- package/dist/core/mods/lifecycle-stations.d.ts +36 -4
- package/dist/core/mods/lifecycle-stations.js +44 -9
- package/dist/core/mods/session-append.d.ts +118 -0
- package/dist/core/mods/session-append.js +318 -0
- package/dist/core/mods/session-compact.d.ts +48 -0
- package/dist/core/mods/session-compact.js +194 -0
- package/dist/core/mods/session-receive.d.ts +93 -0
- package/dist/core/mods/session-receive.js +138 -0
- package/dist/core/mods/session-send.d.ts +72 -0
- package/dist/core/mods/session-send.js +88 -0
- package/dist/core/mods/stations.d.ts +88 -21
- package/dist/core/mods/stations.js +149 -11
- package/dist/core/mods/tool-call.d.ts +2 -0
- package/dist/core/mods/tool-call.js +4 -4
- package/dist/core/output-style.js +3 -4
- package/dist/core/own-property-receipt.d.ts +68 -2
- package/dist/core/own-property-receipt.js +45 -2
- package/dist/core/park-selfcheck.js +4 -2
- package/dist/core/path-identity.d.ts +11 -0
- package/dist/core/path-identity.js +4 -0
- package/dist/core/path-rule-binding.d.ts +3 -1
- package/dist/core/path-rule-binding.js +3 -1
- package/dist/core/peer-seat.d.ts +3 -3
- package/dist/core/peer-seat.js +20 -8
- package/dist/core/permission-rule-consent.d.ts +21 -5
- package/dist/core/permission-rule-consent.js +21 -1
- package/dist/core/permission-rule-model.d.ts +34 -11
- package/dist/core/permission-rule-model.js +47 -10
- package/dist/core/permission-rule-org.d.ts +1 -1
- package/dist/core/permission-rule-provider.js +4 -1
- package/dist/core/permission-rules.d.ts +4 -0
- package/dist/core/permission-rules.js +11 -16
- package/dist/core/read-root-candidate.js +1 -1
- package/dist/core/remote-env.d.ts +74 -26
- package/dist/core/remote-env.js +20 -0
- package/dist/core/resume-startup-cause.d.ts +5 -4
- package/dist/core/retention-policy.d.ts +24 -23
- package/dist/core/retention-policy.js +36 -2
- package/dist/core/retention.d.ts +4 -1
- package/dist/core/retired-keys.d.ts +4 -4
- package/dist/core/row-admission.d.ts +10 -0
- package/dist/core/row-admission.js +5 -0
- package/dist/core/runner/advisor-instructions.d.ts +2 -1
- package/dist/core/runner/advisor-instructions.js +2 -1
- package/dist/core/runner/announce-once-ledger.d.ts +4 -4
- package/dist/core/runner/assemble-result.d.ts +13 -3
- package/dist/core/runner/assemble-result.js +12 -7
- package/dist/core/runner/caller-roster.d.ts +12 -9
- package/dist/core/runner/caller-roster.js +5 -2
- package/dist/core/runner/checkpoint-scope.d.ts +16 -1
- package/dist/core/runner/checkpoint-scope.js +21 -0
- package/dist/core/runner/compact-session.js +18 -3
- package/dist/core/runner/compaction-call-options.d.ts +1 -1
- package/dist/core/runner/compaction-restate.d.ts +2 -2
- package/dist/core/runner/compaction-restate.js +4 -3
- package/dist/core/runner/construction-doors.d.ts +2 -2
- package/dist/core/runner/construction-doors.js +2 -2
- package/dist/core/runner/contracts.d.ts +116 -34
- package/dist/core/runner/cross-boundary-lane.d.ts +1 -1
- package/dist/core/runner/decide-continuation.d.ts +4 -2
- package/dist/core/runner/decide-continuation.js +7 -4
- package/dist/core/runner/delegation-owner.d.ts +43 -0
- package/dist/core/runner/delegation-owner.js +59 -0
- package/dist/core/runner/denial-limit-arms.d.ts +15 -21
- package/dist/core/runner/denial-limit-arms.js +17 -10
- package/dist/core/runner/expire-settle.d.ts +44 -0
- package/dist/core/runner/expire-settle.js +55 -0
- package/dist/core/runner/git-status-frame.d.ts +3 -3
- package/dist/core/runner/git-status-frame.js +2 -1
- package/dist/core/runner/halt-attribution.d.ts +2 -1
- package/dist/core/runner/halt-attribution.js +2 -1
- package/dist/core/runner/lineage-reroot-view.d.ts +56 -0
- package/dist/core/runner/lineage-reroot-view.js +108 -0
- package/dist/core/runner/local-claims.d.ts +17 -0
- package/dist/core/runner/local-claims.js +18 -0
- package/dist/core/runner/media-removed-seat.d.ts +46 -0
- package/dist/core/runner/media-removed-seat.js +88 -0
- package/dist/core/runner/park-commit.d.ts +2 -2
- package/dist/core/runner/permission-rule-lanes.d.ts +7 -2
- package/dist/core/runner/permission-rule-lanes.js +28 -9
- package/dist/core/runner/person-path-rows.d.ts +15 -0
- package/dist/core/runner/person-path-rows.js +27 -4
- package/dist/core/runner/placement-fence.d.ts +26 -0
- package/dist/core/runner/placement-fence.js +38 -0
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +4 -1
- package/dist/core/runner/prepare-acquire-reconcile.js +7 -2
- package/dist/core/runner/prepare-ask-lane.d.ts +6 -12
- package/dist/core/runner/prepare-ask-lane.js +4 -4
- package/dist/core/runner/prepare-boundary-parks.d.ts +4 -1
- package/dist/core/runner/prepare-boundary-parks.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +3 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +2 -1
- package/dist/core/runner/prepare-config-doors.d.ts +6 -6
- package/dist/core/runner/prepare-config-doors.js +19 -21
- package/dist/core/runner/prepare-context-lane.d.ts +6 -2
- package/dist/core/runner/prepare-context-lane.js +13 -13
- package/dist/core/runner/prepare-delegation-surface.d.ts +9 -9
- package/dist/core/runner/prepare-delegation-surface.js +4 -5
- package/dist/core/runner/prepare-execution-env.d.ts +5 -2
- package/dist/core/runner/prepare-execution-env.js +7 -4
- package/dist/core/runner/prepare-gate-stations.d.ts +19 -14
- package/dist/core/runner/prepare-gate-stations.js +6 -4
- package/dist/core/runner/prepare-hands-readface.d.ts +6 -6
- package/dist/core/runner/prepare-hands-readface.js +32 -11
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -0
- package/dist/core/runner/prepare-inherited-gate.js +10 -3
- package/dist/core/runner/prepare-lsp.d.ts +3 -0
- package/dist/core/runner/prepare-lsp.js +2 -2
- package/dist/core/runner/prepare-park-ask.d.ts +5 -2
- package/dist/core/runner/prepare-park-ask.js +4 -5
- package/dist/core/runner/prepare-policy-chain.d.ts +10 -21
- package/dist/core/runner/prepare-policy-chain.js +16 -25
- package/dist/core/runner/prepare-project-context.d.ts +2 -2
- package/dist/core/runner/prepare-prompt-inputs.d.ts +5 -4
- package/dist/core/runner/prepare-prompt-inputs.js +3 -2
- package/dist/core/runner/prepare-question-face.d.ts +6 -4
- package/dist/core/runner/prepare-question-face.js +2 -2
- package/dist/core/runner/prepare-run-refs.d.ts +3 -0
- package/dist/core/runner/prepare-run-refs.js +2 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +11 -7
- package/dist/core/runner/prepare-suspend-saga.js +17 -7
- package/dist/core/runner/prepare-task.d.ts +1 -1
- package/dist/core/runner/prepare-task.js +61 -30
- package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +6 -0
- package/dist/core/runner/prepare-tool-disclosure-mount.js +3 -1
- package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -0
- package/dist/core/runner/prepare-wiring-manifest.js +2 -1
- package/dist/core/runner/prepare-workspace-restore.d.ts +5 -0
- package/dist/core/runner/prepare-workspace-restore.js +10 -6
- package/dist/core/runner/read-root-grant.d.ts +1 -1
- package/dist/core/runner/read-root-grant.js +2 -1
- package/dist/core/runner/resume-admission.d.ts +8 -6
- package/dist/core/runner/resume-admission.js +23 -6
- package/dist/core/runner/resume-apply.d.ts +4 -0
- package/dist/core/runner/resume-apply.js +14 -5
- package/dist/core/runner/resume-checkpoint-screen.d.ts +9 -0
- package/dist/core/runner/resume-checkpoint-screen.js +4 -84
- package/dist/core/runner/resume-claim.d.ts +8 -3
- package/dist/core/runner/resume-claim.js +28 -12
- package/dist/core/runner/resume-internals-and-config.d.ts +2 -2
- package/dist/core/runner/resume-internals-and-config.js +10 -1
- package/dist/core/runner/resume-preflight.d.ts +3 -2
- package/dist/core/runner/resume-preflight.js +13 -26
- package/dist/core/runner/retired-runner-deps.js +2 -0
- package/dist/core/runner/run-git-lane.d.ts +2 -0
- package/dist/core/runner/run-git-lane.js +6 -2
- package/dist/core/runner/run-harness-handlers.d.ts +2 -0
- package/dist/core/runner/run-harness-handlers.js +5 -4
- package/dist/core/runner/run-identity-wiring.d.ts +2 -2
- package/dist/core/runner/run-identity-wiring.js +14 -5
- package/dist/core/runner/run-leg.d.ts +3 -3
- package/dist/core/runner/run-leg.js +64 -36
- package/dist/core/runner/run-notification-lane.js +20 -2
- package/dist/core/runner/run-recovery-lanes.js +3 -2
- package/dist/core/runner/run-settle-and-teardown.js +12 -9
- package/dist/core/runner/run-stop-and-final-verify.js +2 -1
- package/dist/core/runner/run-telemetry-and-budget-seats.d.ts +1 -1
- package/dist/core/runner/run-terminal-adoption.d.ts +1 -1
- package/dist/core/runner/run-terminal-adoption.js +26 -17
- package/dist/core/runner/run-turn-boundary.js +34 -18
- package/dist/core/runner/runtask.d.ts +18 -3
- package/dist/core/runner/runtask.js +33 -17
- package/dist/core/runner/session-rule-policy.d.ts +1 -1
- package/dist/core/runner/session-rule-policy.js +6 -1
- package/dist/core/runner/shell-env-withheld.d.ts +1 -1
- package/dist/core/runner/steering-preview.d.ts +9 -0
- package/dist/core/runner/steering-preview.js +5 -0
- package/dist/core/runner/stream-halt-verbs.d.ts +1 -14
- package/dist/core/runner/stream-halt-verbs.js +4 -3
- package/dist/core/runner/stream-reap.d.ts +7 -6
- package/dist/core/runner/stream-reap.js +13 -16
- package/dist/core/runner/stream-settle-backstop.d.ts +3 -2
- package/dist/core/runner/stream-settle-backstop.js +5 -3
- package/dist/core/runner/stream-steer-verb.d.ts +5 -2
- package/dist/core/runner/stream-steer-verb.js +16 -7
- package/dist/core/runner/terminal-account.d.ts +11 -1
- package/dist/core/runner/terminal-account.js +20 -0
- package/dist/core/runner/terminal-projection.d.ts +8 -2
- package/dist/core/runner/terminal-projection.js +2 -2
- package/dist/core/runner/tool-disclosure.d.ts +3 -0
- package/dist/core/runner/tool-disclosure.js +5 -2
- package/dist/core/runner/tool-end-body.d.ts +3 -3
- package/dist/core/runner/tool-end-body.js +1 -1
- package/dist/core/runner/tool-face-overlay.js +2 -0
- package/dist/core/runner/tool-output-projection.d.ts +3 -3
- package/dist/core/runner/tool-output-projection.js +7 -6
- package/dist/core/runner/tool-table-view.d.ts +56 -0
- package/dist/core/runner/tool-table-view.js +51 -0
- package/dist/core/runner/turn-attachments.d.ts +8 -2
- package/dist/core/runner/turn-attachments.js +2 -2
- package/dist/core/runner/void-verifier-pause.d.ts +33 -0
- package/dist/core/runner/void-verifier-pause.js +41 -0
- package/dist/core/runner-deps.d.ts +26 -27
- package/dist/core/secret-env.d.ts +19 -16
- package/dist/core/secret-env.js +45 -27
- package/dist/core/session-log-transfer.js +9 -10
- package/dist/core/session-policy-store.d.ts +1 -1
- package/dist/core/session-policy-store.js +5 -2
- package/dist/core/session-reconcile.d.ts +3 -2
- package/dist/core/session-reconcile.js +7 -4
- package/dist/core/session-store.d.ts +3 -1
- package/dist/core/session-store.js +10 -8
- package/dist/core/session.d.ts +16 -5
- package/dist/core/shell-confinement.d.ts +37 -0
- package/dist/core/shell-confinement.js +56 -0
- package/dist/core/skill-grant.js +1 -1
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +8 -2
- package/dist/core/store-contracts/checkpoint-store-contract.js +83 -2
- package/dist/core/store-contracts/file-history-store-contract.d.ts +5 -2
- package/dist/core/store-contracts/file-history-store-contract.js +25 -1
- package/dist/core/store-contracts/mailbox-store-contract.d.ts +12 -5
- package/dist/core/store-contracts/mailbox-store-contract.js +156 -9
- package/dist/core/store-contracts/session-store-contract.js +22 -8
- package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/tool-result-store-contract.js +30 -0
- package/dist/core/task-event.d.ts +24 -9
- package/dist/core/task-limits.d.ts +5 -0
- package/dist/core/task-notification.d.ts +89 -12
- package/dist/core/task-notification.js +89 -14
- package/dist/core/task-registry-agent.d.ts +32 -50
- package/dist/core/task-registry-agent.js +36 -56
- package/dist/core/task-registry-monitor.d.ts +1 -1
- package/dist/core/task-registry-monitor.js +15 -60
- package/dist/core/task-registry-shared.d.ts +22 -112
- package/dist/core/task-registry-shared.js +3 -41
- package/dist/core/task-registry-workflow.js +5 -21
- package/dist/core/task-registry.d.ts +32 -62
- package/dist/core/task-registry.js +30 -110
- package/dist/core/task-result.d.ts +29 -12
- package/dist/core/task-spec-members.d.ts +39 -0
- package/dist/core/task-spec-members.js +92 -0
- package/dist/core/task-spec.d.ts +11 -11
- package/dist/core/task-tool-shape.d.ts +7 -57
- package/dist/core/task-tool-shape.js +7 -66
- package/dist/core/terminal-cause.d.ts +36 -6
- package/dist/core/terminal-cause.js +1 -0
- package/dist/core/tool-catalog-entries.js +2 -5
- package/dist/core/tool-check-reading.js +16 -10
- package/dist/core/tool-conformance.js +1 -2
- package/dist/core/tool-errors.d.ts +6 -3
- package/dist/core/tool-errors.js +2 -0
- package/dist/core/tool-face-reader.js +3 -2
- package/dist/core/tool-face.d.ts +8 -5
- package/dist/core/tool-face.js +1 -1
- package/dist/core/tool-name-aliases.d.ts +5 -29
- package/dist/core/tool-name-aliases.js +9 -5
- package/dist/core/tool-name-readings.d.ts +14 -3
- package/dist/core/tool-name-readings.js +2 -0
- package/dist/core/tool-policy.d.ts +109 -18
- package/dist/core/tool-policy.js +84 -14
- package/dist/core/tool-result-store.d.ts +23 -0
- package/dist/core/tool-result-store.js +3 -2
- package/dist/core/tool-roster.d.ts +4 -4
- package/dist/core/tool-spec.d.ts +23 -6
- package/dist/core/trace.d.ts +18 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +1 -1
- package/dist/core/user-attachment.js +26 -21
- package/dist/core/workflow-journal-store.d.ts +1 -1
- package/dist/core/workflow-run-store.d.ts +2 -0
- package/dist/core/workflow-run-store.js +6 -5
- package/dist/core/workflow-settled-run.d.ts +5 -0
- package/dist/core/workflow-settled-run.js +7 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +37 -9
- package/dist/engine/execution-env/node-execution-env.js +221 -22
- package/dist/engine/harness/agent-harness.d.ts +65 -18
- package/dist/engine/harness/agent-harness.js +90 -23
- package/dist/engine/harness/messages.d.ts +4 -3
- package/dist/engine/harness/messages.js +2 -2
- package/dist/engine/harness/types.d.ts +52 -7
- package/dist/engine/llm/media-removed.d.ts +14 -0
- package/dist/engine/llm/media-removed.js +9 -0
- package/dist/engine/llm/rejected-images.d.ts +35 -25
- package/dist/engine/llm/rejected-images.js +59 -10
- package/dist/engine/llm/types.d.ts +24 -3
- package/dist/engine/llm/types.js +7 -3
- package/dist/engine/loop/agent-loop.d.ts +6 -1
- package/dist/engine/loop/agent-loop.js +20 -11
- package/dist/engine/loop/types.d.ts +12 -3
- package/dist/engine/session/import-validate.js +7 -0
- package/dist/engine/session/parent-chain-guard.d.ts +3 -3
- package/dist/engine/session/parent-chain-guard.js +1 -1
- package/dist/engine/session/path-to-root.d.ts +18 -3
- package/dist/engine/session/path-to-root.js +15 -1
- package/dist/engine/session/repo-utils.d.ts +12 -1
- package/dist/engine/session/repo-utils.js +41 -0
- package/dist/engine/session/session.js +1 -1
- package/dist/engine/session/storage-base.d.ts +20 -0
- package/dist/engine/session/storage-base.js +28 -9
- package/dist/fixtures/index.d.ts +7 -5
- package/dist/fixtures/index.js +5 -3
- package/dist/index.d.ts +29 -18
- package/dist/index.js +19 -11
- package/dist/internal/harness-types.d.ts +2 -0
- package/dist/internal/harness.d.ts +4 -3
- package/dist/internal/harness.js +3 -2
- package/dist/internal/llm.d.ts +2 -1
- package/dist/internal/llm.js +1 -0
- package/dist/orchestration/goal.d.ts +6 -2
- package/dist/orchestration/goal.js +6 -3
- package/dist/orchestration/run-workflow-tool.d.ts +14 -17
- package/dist/orchestration/run-workflow-tool.js +43 -50
- package/dist/orchestration/workflow-types.d.ts +2 -2
- package/dist/orchestration/workflow.d.ts +7 -0
- package/dist/orchestration/workflow.js +10 -12
- package/dist/stores/file/background-agent-store.js +18 -15
- package/dist/stores/file/checkpoint-store.d.ts +2 -0
- package/dist/stores/file/checkpoint-store.js +13 -9
- package/dist/stores/file/file-history-store.js +3 -2
- package/dist/stores/file/fs-atomic.d.ts +0 -22
- package/dist/stores/file/fs-atomic.js +0 -17
- package/dist/stores/file/index.d.ts +7 -12
- package/dist/stores/file/index.js +25 -12
- package/dist/stores/file/ledger-tuning.d.ts +23 -0
- package/dist/stores/file/ledger-tuning.js +21 -0
- package/dist/stores/file/mailbox-store.js +42 -22
- package/dist/stores/file/memory-store.js +3 -2
- package/dist/stores/file/permission-rule-adopt.js +24 -21
- package/dist/stores/file/permission-rule-store.js +6 -3
- package/dist/stores/file/session-policy-store.js +3 -2
- package/dist/stores/file/session-store.d.ts +26 -7
- package/dist/stores/file/session-store.js +59 -35
- package/dist/stores/file/tool-result-store.d.ts +11 -0
- package/dist/stores/file/tool-result-store.js +57 -3
- package/dist/stores/file/usage-window-store.js +3 -2
- package/dist/stores/file/workflow-journal-store.d.ts +0 -2
- package/dist/stores/file/workflow-journal-store.js +3 -18
- package/dist/stores/file/workflow-run-store.d.ts +1 -1
- package/dist/stores/file/workflow-run-store.js +15 -10
- package/dist/tools/fs/bash-program-position.d.ts +3 -2
- package/dist/tools/fs/bash-program-position.js +7 -7
- package/dist/tools/fs/dead-cwd.d.ts +5 -5
- package/dist/tools/fs/dead-cwd.js +4 -11
- package/dist/tools/fs/fs-bash-background-text.d.ts +6 -0
- package/dist/tools/fs/fs-bash-background-text.js +6 -0
- package/dist/tools/fs/fs-bash.d.ts +3 -18
- package/dist/tools/fs/fs-bash.js +37 -124
- package/dist/tools/fs/fs-pdf.js +8 -6
- package/dist/tools/fs/fs-read.js +2 -2
- package/dist/tools/fs/fs-shared.d.ts +28 -3
- package/dist/tools/fs/fs-shared.js +15 -0
- package/dist/tools/fs/index.d.ts +1 -1
- package/dist/tools/fs/index.js +4 -14
- package/dist/tools/fs/pdf.d.ts +4 -4
- package/dist/tools/fs/pdf.js +6 -6
- package/dist/tools/fs/read-deny-home.js +8 -1
- package/dist/tools/fs/read-deny.d.ts +26 -2
- package/dist/tools/fs/read-deny.js +9 -2
- package/dist/tools/fs/read-floor.d.ts +13 -5
- package/dist/tools/fs/read-floor.js +206 -2
- package/dist/tools/fs/removal-targets.js +2 -2
- package/dist/tools/fs/search.d.ts +3 -2
- package/dist/tools/fs/search.js +6 -6
- package/dist/tools/fs/shell-read-argv.d.ts +4 -2
- package/dist/tools/fs/shell-read-argv.js +14 -3
- package/dist/tools/fs/shell-read-bindings.d.ts +18 -2
- package/dist/tools/fs/shell-read-bindings.js +148 -68
- package/dist/tools/fs/shell-read-check.js +20 -4
- package/dist/tools/fs/shell-read-establish.js +25 -9
- package/dist/tools/fs/shell-read-functions.js +2 -2
- package/dist/tools/fs/shell-read-identity.d.ts +3 -1
- package/dist/tools/fs/shell-read-identity.js +4 -2
- package/dist/tools/fs/shell-read-judge.d.ts +7 -1
- package/dist/tools/fs/shell-read-judge.js +1 -1
- package/dist/tools/fs/shell-read-object-path.d.ts +59 -0
- package/dist/tools/fs/shell-read-object-path.js +119 -0
- package/dist/tools/fs/shell-read-plan.d.ts +8 -0
- package/dist/tools/fs/shell-read-plan.js +47 -30
- package/dist/tools/fs/shell-read-start.d.ts +66 -13
- package/dist/tools/fs/shell-read-start.js +89 -17
- package/dist/tools/fs/shell-read-workdir.d.ts +29 -8
- package/dist/tools/fs/shell-read-workdir.js +31 -8
- package/dist/tools/monitor.d.ts +8 -7
- package/dist/tools/monitor.js +12 -10
- package/dist/tools/worktree.d.ts +5 -1
- package/dist/tools/worktree.js +20 -17
- package/package.json +6 -3
- package/test/export-surface.snapshot.json +112 -42
- package/wire-changes/core-stores-sql@7.61.0.json +480 -0
- package/wire-changes/core-stores-sql@7.62.0.json +30 -0
- package/wire-changes/core@7.61.0.json +4405 -0
- package/wire-changes/core@7.62.0.json +2181 -0
- package/wire-changes/mods-kernel@7.61.0.json +65 -0
- package/wire-changes/mods-kernel@7.62.0.json +42 -0
- package/wire-changes/primitives@7.61.0.json +30 -0
- package/wire-changes/primitives@7.62.0.json +30 -0
- package/dist/core/consolidate-scope.d.ts +0 -93
- package/dist/core/consolidate-scope.js +0 -98
- package/dist/core/runner/image-removed-seat.d.ts +0 -12
- package/dist/core/runner/image-removed-seat.js +0 -19
- package/dist/core/runner/memory-consolidation.d.ts +0 -109
- package/dist/core/runner/memory-consolidation.js +0 -251
|
@@ -14,11 +14,13 @@ export type SystemInjectionPriority = "now" | "next" | "later";
|
|
|
14
14
|
* session's next run in this process (a process restart loses it);
|
|
15
15
|
* · `parked_durably` — no live lane; appended to the session's DURABLE box
|
|
16
16
|
* ({@link PendingSessionNotifications.bindSessionBox}) — the next run drains it, in any process;
|
|
17
|
-
* · `dropped_duplicate` — the session already delivered this exact frame
|
|
17
|
+
* · `dropped_duplicate` — the session already delivered this exact frame;
|
|
18
|
+
* · `refused` — a live lane took it and the session's receiving station did not hand it over: an extension consumed it,
|
|
19
|
+
* or a handler there failed ({@link FrameReceiver}). The model never saw it, and it is not owed again.
|
|
18
20
|
* The park backend is the seat's choice ({@link routeOrParkNotification}), never the producer's.
|
|
19
21
|
*/
|
|
20
|
-
export type NotificationInjectionOutcome = "queued" | "parked" | "parked_durably" | "dropped_duplicate";
|
|
21
|
-
export declare const NOTIFICATION_INJECTION_OUTCOMES: readonly ["queued", "parked", "parked_durably", "dropped_duplicate"];
|
|
22
|
+
export type NotificationInjectionOutcome = "queued" | "parked" | "parked_durably" | "dropped_duplicate" | "refused";
|
|
23
|
+
export declare const NOTIFICATION_INJECTION_OUTCOMES: readonly ["queued", "parked", "parked_durably", "dropped_duplicate", "refused"];
|
|
22
24
|
/** Is `value` one of the injector's outcome words? A host-wired uplink may answer anything (a bare
|
|
23
25
|
* `void`, an array's `push` count) — such an answer reads as "outcome not reported", never as a word. */
|
|
24
26
|
export declare function isNotificationInjectionOutcome(value: unknown): value is NotificationInjectionOutcome;
|
|
@@ -207,7 +209,7 @@ export interface TaskNotificationPayload {
|
|
|
207
209
|
resumable?: boolean;
|
|
208
210
|
/** A cross-channel correlation key for ONE completion event — the same task's completion fans out
|
|
209
211
|
* across several independent read faces (this live notification frame, a durable inbox entry, and the
|
|
210
|
-
*
|
|
212
|
+
* host task poll projection). Minted ONCE per completion, fill-once (first writer wins), on the
|
|
211
213
|
* same task-registry handle/record every read face serves from — see
|
|
212
214
|
* {@link "./task-registry.js".UnifiedTaskOutput.completionId} for the shared contract (open-shape
|
|
213
215
|
* `string`, absent until terminal settle, absent on a pre-P1-3 core build). Deliberately ABSENT on
|
|
@@ -285,7 +287,38 @@ export interface TaskNotificationPayload {
|
|
|
285
287
|
* and the record's typed peer metadata rides in `peerMeta` (on a notice frame its `notice` is THE typed notice).
|
|
286
288
|
*/
|
|
287
289
|
_sema_provenance?: SemaProvenance;
|
|
290
|
+
/**
|
|
291
|
+
* The text a receiving extension handed the model in place of this frame's rendering (the `session.receive` station,
|
|
292
|
+
* {@link FrameReceiver}), and who changed it. Set only on the copy a delivery carries — never on the frame a producer,
|
|
293
|
+
* a park or a box holds — and {@link renderTaskNotificationXml} returns it verbatim: every face that renders the frame
|
|
294
|
+
* (the live lane, the turn-open redelivery, a `ReadInbox` result, its receipt ask) reads the one rendering.
|
|
295
|
+
*/
|
|
296
|
+
received?: {
|
|
297
|
+
readonly text: string;
|
|
298
|
+
readonly rewrittenBy: readonly string[];
|
|
299
|
+
};
|
|
288
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* The session's one receiving station (`session.receive`): every face a frame reaches the model by — the live lane (a
|
|
303
|
+
* producer's injection, a frame routed in from another run of the session, a peer letter the box drain pushes), the
|
|
304
|
+
* turn-open redelivery of what was parked, and the box's `ReadInbox` pull — hands the frame to it before the hand-over, and
|
|
305
|
+
* hands over what it answers. Awaited; with no handler listening, nothing is raised and a caller keeps its own path.
|
|
306
|
+
*/
|
|
307
|
+
export interface FrameReceiver {
|
|
308
|
+
/** Does a handler listen? `false` ⇒ the frame passes as made, and nothing is raised. */
|
|
309
|
+
listens(): boolean;
|
|
310
|
+
/** What becomes of `payload`: handed over (the frame, or a copy carrying {@link TaskNotificationPayload.received}), or
|
|
311
|
+
* consumed — not handed over, by the extension `by` (or the engine, when the station could not judge), for `reason`. */
|
|
312
|
+
receive(payload: TaskNotificationPayload): Promise<ReceivedFrame>;
|
|
313
|
+
}
|
|
314
|
+
export type ReceivedFrame = {
|
|
315
|
+
readonly kind: "arrived";
|
|
316
|
+
readonly payload: TaskNotificationPayload;
|
|
317
|
+
} | {
|
|
318
|
+
readonly kind: "consumed";
|
|
319
|
+
readonly by: string;
|
|
320
|
+
readonly reason: string;
|
|
321
|
+
};
|
|
289
322
|
/** design/385 §1.4 d1 / §4.1 — see {@link TaskNotificationPayload._sema_provenance}. `kind` is a
|
|
290
323
|
* closed set of the engine carriers that mint the record; a future carrier adds a member, never a
|
|
291
324
|
* second key. */
|
|
@@ -515,16 +548,22 @@ export declare function terminalFrameFacets(facts: {
|
|
|
515
548
|
warning?: string | undefined;
|
|
516
549
|
compaction?: TaskNotificationPayload["compaction"] | undefined;
|
|
517
550
|
}): Pick<TaskNotificationPayload, "spawnName" | "handback" | "compaction">;
|
|
551
|
+
/** What the deployment hears when a report the frame carried whole could not be stored: the task row keeps no read handle. */
|
|
552
|
+
export declare const SHORT_REPORT_UNSTORED = "a background task's report could not be stored (the write failed or went unconfirmed): its completion frame carried the whole report, but its task row keeps no read handle for a later list";
|
|
518
553
|
/**
|
|
519
554
|
* A delegated child's report as its completion frame carries it — the one value the parent's notification and the fleet
|
|
520
555
|
* terminal projected from that frame both read: redacted BEFORE the cut, with the pass the task row's copy uses (a token
|
|
521
|
-
* across the cut is never half-shown), then cut with an honest total.
|
|
522
|
-
*
|
|
523
|
-
*
|
|
556
|
+
* across the cut is never half-shown), then cut with an honest total. The report is the task's result artifact whatever its
|
|
557
|
+
* length: `persist` stores the whole redacted report and `record` hands the stored ref to the task row as its read handle
|
|
558
|
+
* (a list of tasks names it when the frame itself is lost) — only after the write landed. A report longer than the frame
|
|
559
|
+
* carries is cut, and its cut line names that ref, so the frame waits for the write; a report the frame carries whole does
|
|
560
|
+
* not wait (its write lands on its own and records the ref then — a stalled store never holds a complete answer back).
|
|
561
|
+
* That unawaited write still has a failure path: a write that went unconfirmed, or anything thrown on the way, reaches the
|
|
562
|
+
* caller's `notifier` (its first failure per site is disclosed on the deployment's channel), never the floor. `record`
|
|
563
|
+
* names the settle the result belongs to, so a write landing after the row moved on records nothing. Absent in ⇒ absent out.
|
|
524
564
|
*/
|
|
525
|
-
export declare function completionResultField(result: string | undefined, persist: (report: string) => Promise<import("./tool-result-store.js").TaskArtifact>): Promise<{
|
|
565
|
+
export declare function completionResultField(result: string | undefined, persist: (report: string) => Promise<import("./tool-result-store.js").TaskArtifact>, record: (ref: string) => void, notifier: Pick<import("./safe-notify.js").SafeNotifier, "notifyAsync">): Promise<{
|
|
526
566
|
readonly text: string;
|
|
527
|
-
readonly ref?: string;
|
|
528
567
|
} | undefined>;
|
|
529
568
|
/** The codec version this engine writes into an `engine_frame` record and the highest it reads. */
|
|
530
569
|
export declare const ENGINE_FRAME_CODEC_VERSION = 1;
|
|
@@ -593,6 +632,18 @@ export declare function isTerminalTaskNotification(n: Pick<TaskNotificationPaylo
|
|
|
593
632
|
* another for the delivery.
|
|
594
633
|
*/
|
|
595
634
|
export declare function resolveCompletionSink<C, M>(callSink: C | undefined, mountSink: M | undefined): C | M | undefined;
|
|
635
|
+
/**
|
|
636
|
+
* THE background admission every producer applies at launch — a background command, a Monitor watch, a background
|
|
637
|
+
* agent, a workflow run, a continued agent: the launch is made only when its completion will come back — the one
|
|
638
|
+
* resolved completion sink ({@link resolveCompletionSink}) is there, or the deployment wired a channel of its own for
|
|
639
|
+
* this producer outside the engine (a workflow's durable notifier; a host that announces a continued agent itself).
|
|
640
|
+
* No channel ⇒ no background launch: an agent runs synchronously instead, every other producer refuses before any
|
|
641
|
+
* side effect. Judged at the call, never at the mount — a mount cannot know the run lane a call will carry (a
|
|
642
|
+
* caller-mounted tool gets its run's lane on the call's context only) — so a mount offers its background option on its
|
|
643
|
+
* own capability, and every "you will be notified" a face says holds for any launch this admits.
|
|
644
|
+
*/
|
|
645
|
+
export declare function admitsBackgroundLaunch<S>(sink: S | undefined): sink is S;
|
|
646
|
+
export declare function admitsBackgroundLaunch(sink: unknown, deploymentChannel: boolean): boolean;
|
|
596
647
|
/**
|
|
597
648
|
* The terminal frames a run's notification lane is still OWED — the one book a one-shot submission's ending waits on.
|
|
598
649
|
* A loop-type background task (a background agent, a continued agent, a workflow run) whose completion sink is a run's
|
|
@@ -668,7 +719,7 @@ export interface DrainedPendingNotifications {
|
|
|
668
719
|
* key, which put a session-level fact into a per-task ledger and broke twice for it: the key could
|
|
669
720
|
* collide with a real, free-form external `task_id` (merging two unrelated counts and mislabelling the
|
|
670
721
|
* lane — design/144 X1 already ruled that the external lane needs its own key space), and the
|
|
671
|
-
* survivors-none renderer told the model to
|
|
722
|
+
* survivors-none renderer told the model to poll a task id `"(evicted-session)"`, an instruction with
|
|
672
723
|
* nothing behind it. The count is a session fact; it now has a session field.
|
|
673
724
|
*/
|
|
674
725
|
droppedWholeSession?: number;
|
|
@@ -767,6 +818,16 @@ export declare class SessionLiveNotificationLanes {
|
|
|
767
818
|
/** Sessions holding at least one live lane (observability + the tests' rollback detector). */
|
|
768
819
|
get size(): number;
|
|
769
820
|
}
|
|
821
|
+
/**
|
|
822
|
+
* What a double fault at the park seat leaves beside its in-process copy: the box the record was meant for (the binding
|
|
823
|
+
* the seat asked, as it was then — the store object, scope and handle) and the record it asked with. The copy is a debt
|
|
824
|
+
* owed to THAT box, settled by asking it again ({@link PendingSessionNotifications.settleBoxDebts}) — never by comparing
|
|
825
|
+
* it with whatever box the session binds later.
|
|
826
|
+
*/
|
|
827
|
+
export interface SessionBoxDebt {
|
|
828
|
+
readonly box: SessionBoxBinding;
|
|
829
|
+
readonly record: MailboxAppendMessage;
|
|
830
|
+
}
|
|
770
831
|
export declare class PendingSessionNotifications {
|
|
771
832
|
private readonly sessions;
|
|
772
833
|
/**
|
|
@@ -800,8 +861,24 @@ export declare class PendingSessionNotifications {
|
|
|
800
861
|
bindSessionBox(sessionId: string, box: SessionBoxBinding | undefined): void;
|
|
801
862
|
/** The session's durable box, when a leg of it mounted the drain in this process. */
|
|
802
863
|
sessionBoxFor(sessionId: string): SessionBoxBinding | undefined;
|
|
803
|
-
|
|
804
|
-
|
|
864
|
+
/**
|
|
865
|
+
* Settle what the session's pending copies owe their boxes ({@link SessionBoxDebt}): each is asked of its own box once
|
|
866
|
+
* more, under its record, in pend order. A box that answers took the record — it holds it, or received it already —
|
|
867
|
+
* so the delivery is the box's and the copy is dropped (the box then owns the key, as after a durable park). A box
|
|
868
|
+
* that refuses, whatever the refusal, is disclosed once on that binding and the copy stays an ordinary pending
|
|
869
|
+
* notification. Never rejects. `undefined` when nothing is owed: a leg with no debt takes no store round trip. ONE
|
|
870
|
+
* pass over what is owed when it starts, stopped by `signal`: a debt that arrives meanwhile, or one an abort left
|
|
871
|
+
* unasked, stays owed — and a copy that owes its box is never drained ({@link drain} keeps it back) — until a later
|
|
872
|
+
* leg's settlement asks.
|
|
873
|
+
*/
|
|
874
|
+
settleBoxDebts(sessionId: string, signal?: AbortSignal): Promise<void> | undefined;
|
|
875
|
+
/** What a drain hands out of a parked record: everything but the copies that still owe their box — those go back
|
|
876
|
+
* into the store as the session's record (with their keys, tiers and debts) for the leg that settles them. */
|
|
877
|
+
private keepBackOwing;
|
|
878
|
+
private settleBoxDebt;
|
|
879
|
+
pend(sessionId: string, n: TaskNotificationPayload, priority?: SystemInjectionPriority, debt?: SessionBoxDebt): void;
|
|
880
|
+
/** Remove and return the session's pendings (one-shot — the next run consumes them exactly once); a copy that
|
|
881
|
+
* still owes its box stays parked for the leg that settles it ({@link settleBoxDebts}).
|
|
805
882
|
* design/373 §3.5: the batch comes out PRIORITY-MAJOR (stable sort — pend order within a class;
|
|
806
883
|
* a no-priority record ranks as later), the idle-dequeue min-value-first form. */
|
|
807
884
|
drain(sessionId: string): DrainedPendingNotifications | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import { escapeEnvelopeTag, inlineUntrusted, sanitizeUntrustedText } from "./untrusted-text.js";
|
|
3
3
|
import { egressText } from "./untrusted-egress.js";
|
|
4
|
+
import { redactThenCut } from "../agents/subagent-steps.js";
|
|
4
5
|
import { PEER_MESSAGE_NOTICE } from "../agents/peer-admission.js";
|
|
5
6
|
import { buildCrossSessionEnvelope, CROSS_PRINCIPAL_MESSAGE_NOTICE, CROSS_SESSION_MESSAGE_NOTICE, neutralizePeerBody } from "../agents/cross-session-envelope.js";
|
|
6
7
|
export const TASK_NOTIFICATION_TERMINAL_STATUSES = Object.freeze(["completed", "failed", "killed", "cancelled"]);
|
|
7
|
-
export const NOTIFICATION_INJECTION_OUTCOMES = Object.freeze(["queued", "parked", "parked_durably", "dropped_duplicate"]);
|
|
8
|
+
export const NOTIFICATION_INJECTION_OUTCOMES = Object.freeze(["queued", "parked", "parked_durably", "dropped_duplicate", "refused"]);
|
|
8
9
|
export function isNotificationInjectionOutcome(value) {
|
|
9
10
|
return typeof value === "string" && NOTIFICATION_INJECTION_OUTCOMES.includes(value);
|
|
10
11
|
}
|
|
@@ -95,6 +96,8 @@ export function renderCrossSessionNoticeLine(notice) {
|
|
|
95
96
|
}
|
|
96
97
|
export const RESUPPLIED_FRAME_PREAMBLE = "[Re-supplied] You were shown this message once before; the compaction that replaced older context with a summary did not keep it, so the engine is handing it over again. It is the SAME message, not a new one \u2014 act on it once.";
|
|
97
98
|
export function renderTaskNotificationXml(n) {
|
|
99
|
+
if (n.received !== undefined)
|
|
100
|
+
return n.received.text;
|
|
98
101
|
const body = renderTaskNotificationCarrier(n);
|
|
99
102
|
return n.resupplied === true ? `${RESUPPLIED_FRAME_PREAMBLE}\n\n${body}` : body;
|
|
100
103
|
}
|
|
@@ -183,22 +186,30 @@ function cutReportReading(artifact) {
|
|
|
183
186
|
case "stored":
|
|
184
187
|
return `read the full text with ReadToolResult (ref "${artifact.ref}")`;
|
|
185
188
|
case "unconfirmed":
|
|
186
|
-
return "the full text could not be stored (the write failed or went unconfirmed), so no ref can read it back — ask the agent for it via SendMessage
|
|
189
|
+
return "the full text could not be stored (the write failed or went unconfirmed), so no ref can read it back and it is not readable in this session — ask the agent for it via SendMessage";
|
|
187
190
|
case "no_store":
|
|
188
|
-
return "the full text is not stored behind a ref (no offload store) — ask the agent for it via SendMessage
|
|
191
|
+
return "the full text is not stored behind a ref (no offload store), so it is not readable in this session — ask the agent for it via SendMessage";
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
|
-
export
|
|
194
|
+
export const SHORT_REPORT_UNSTORED = "a background task's report could not be stored (the write failed or went unconfirmed): its completion frame carried the whole report, but its task row keeps no read handle for a later list";
|
|
195
|
+
export async function completionResultField(result, persist, record, notifier) {
|
|
192
196
|
if (!result)
|
|
193
197
|
return undefined;
|
|
194
198
|
const report = egressText("same-principal", result);
|
|
195
|
-
if (report.length <= COMPLETION_REPORT_MAX)
|
|
199
|
+
if (report.length <= COMPLETION_REPORT_MAX) {
|
|
200
|
+
void notifier.notifyAsync(async () => {
|
|
201
|
+
const artifact = await persist(report);
|
|
202
|
+
if (artifact.kind === "unconfirmed")
|
|
203
|
+
throw new Error(SHORT_REPORT_UNSTORED);
|
|
204
|
+
if (artifact.kind === "stored")
|
|
205
|
+
record(artifact.ref);
|
|
206
|
+
}, "completionResultField.shortReportWrite");
|
|
196
207
|
return { text: report };
|
|
208
|
+
}
|
|
197
209
|
const artifact = await persist(report);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
210
|
+
if (artifact.kind === "stored")
|
|
211
|
+
record(artifact.ref);
|
|
212
|
+
return { text: `${report.slice(0, COMPLETION_REPORT_MAX)}\n[result truncated: ${report.length} chars total — ${cutReportReading(artifact)}]` };
|
|
202
213
|
}
|
|
203
214
|
export const ENGINE_FRAME_CODEC_VERSION = 1;
|
|
204
215
|
export const ENGINE_FRAME_TASK_TYPES = Object.freeze(["background_agent", "monitor", "workflow"]);
|
|
@@ -293,6 +304,9 @@ export function isTerminalTaskNotification(n) {
|
|
|
293
304
|
export function resolveCompletionSink(callSink, mountSink) {
|
|
294
305
|
return callSink ?? mountSink;
|
|
295
306
|
}
|
|
307
|
+
export function admitsBackgroundLaunch(sink, deploymentChannel = false) {
|
|
308
|
+
return sink !== undefined || deploymentChannel;
|
|
309
|
+
}
|
|
296
310
|
export class DeliveryObligations {
|
|
297
311
|
owed = new Map();
|
|
298
312
|
counted = new Set();
|
|
@@ -460,7 +474,63 @@ export class PendingSessionNotifications {
|
|
|
460
474
|
sessionBoxFor(sessionId) {
|
|
461
475
|
return this.sessionBoxes.get(sessionId);
|
|
462
476
|
}
|
|
463
|
-
|
|
477
|
+
settleBoxDebts(sessionId, signal) {
|
|
478
|
+
const owed = this.sessions.get(sessionId)?.boxDebts;
|
|
479
|
+
if (owed === undefined || owed.size === 0)
|
|
480
|
+
return undefined;
|
|
481
|
+
const debts = [...owed];
|
|
482
|
+
return (async () => {
|
|
483
|
+
for (const [copy, debt] of debts) {
|
|
484
|
+
if (signal?.aborted === true)
|
|
485
|
+
return;
|
|
486
|
+
await this.settleBoxDebt(sessionId, copy, debt);
|
|
487
|
+
}
|
|
488
|
+
})();
|
|
489
|
+
}
|
|
490
|
+
keepBackOwing(sessionId, s) {
|
|
491
|
+
const debts = s.boxDebts;
|
|
492
|
+
const owing = debts === undefined ? [] : s.items.filter((n) => debts.has(n));
|
|
493
|
+
if (owing.length === 0)
|
|
494
|
+
return s;
|
|
495
|
+
const tiers = new Map();
|
|
496
|
+
for (const n of owing) {
|
|
497
|
+
const p = s.priorities?.get(n);
|
|
498
|
+
if (p !== undefined)
|
|
499
|
+
tiers.set(n, p);
|
|
500
|
+
}
|
|
501
|
+
this.sessions.set(sessionId, { items: owing, dropped: new Map(), keys: new Set(owing.map((n) => taskNotificationDedupKey(n))), priorities: tiers, boxDebts: debts });
|
|
502
|
+
const rest = s.items.filter((n) => !debts.has(n));
|
|
503
|
+
return rest.length === 0 && s.dropped.size === 0 ? undefined : { ...s, items: rest };
|
|
504
|
+
}
|
|
505
|
+
async settleBoxDebt(sessionId, copy, debt) {
|
|
506
|
+
let answered = false;
|
|
507
|
+
try {
|
|
508
|
+
await debt.box.mailbox.append(debt.box.scope, debt.box.handle, debt.record);
|
|
509
|
+
answered = true;
|
|
510
|
+
}
|
|
511
|
+
catch (e) {
|
|
512
|
+
try {
|
|
513
|
+
debt.box.onError?.(e);
|
|
514
|
+
}
|
|
515
|
+
catch {
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
const s = this.sessions.get(sessionId);
|
|
519
|
+
if (s?.boxDebts?.get(copy) !== debt)
|
|
520
|
+
return;
|
|
521
|
+
s.boxDebts.delete(copy);
|
|
522
|
+
const at = s.items.indexOf(copy);
|
|
523
|
+
if (!answered || at === -1)
|
|
524
|
+
return;
|
|
525
|
+
s.items.splice(at, 1);
|
|
526
|
+
const key = taskNotificationDedupKey(copy);
|
|
527
|
+
s.keys.delete(key);
|
|
528
|
+
s.priorities?.delete(copy);
|
|
529
|
+
this.noteDurablePark(sessionId, key);
|
|
530
|
+
if (s.items.length === 0 && s.dropped.size === 0)
|
|
531
|
+
this.sessions.delete(sessionId);
|
|
532
|
+
}
|
|
533
|
+
pend(sessionId, n, priority, debt) {
|
|
464
534
|
let s = this.sessions.get(sessionId);
|
|
465
535
|
if (s === undefined) {
|
|
466
536
|
if (this.sessions.size >= MAX_PENDING_SESSIONS) {
|
|
@@ -492,6 +562,8 @@ export class PendingSessionNotifications {
|
|
|
492
562
|
s.items.push(n);
|
|
493
563
|
if (priority !== undefined)
|
|
494
564
|
s.priorities?.set(n, priority);
|
|
565
|
+
if (debt !== undefined)
|
|
566
|
+
(s.boxDebts ??= new Map()).set(n, debt);
|
|
495
567
|
const lane = taskNotificationLaneKey(n);
|
|
496
568
|
let mine = 0;
|
|
497
569
|
for (const i of s.items)
|
|
@@ -504,9 +576,11 @@ export class PendingSessionNotifications {
|
|
|
504
576
|
}
|
|
505
577
|
drain(sessionId) {
|
|
506
578
|
this.routed.delete(sessionId);
|
|
507
|
-
const
|
|
508
|
-
if (
|
|
579
|
+
const parked = this.sessions.get(sessionId);
|
|
580
|
+
if (parked !== undefined)
|
|
509
581
|
this.sessions.delete(sessionId);
|
|
582
|
+
const s = parked !== undefined ? this.keepBackOwing(sessionId, parked) : undefined;
|
|
583
|
+
if (s !== undefined) {
|
|
510
584
|
const rank = (n) => {
|
|
511
585
|
const p = s.priorities?.get(n);
|
|
512
586
|
return p === "now" ? 0 : p === "next" ? 1 : 2;
|
|
@@ -630,7 +704,7 @@ export function routeOrParkNotification(store, sessionId, payload, priority, onD
|
|
|
630
704
|
});
|
|
631
705
|
const settled = appended.then(() => onDisposition?.("parked_durably"), () => {
|
|
632
706
|
store.forgetDurablePark(sessionId, dedupKey);
|
|
633
|
-
store.pend(sessionId, payload, priority);
|
|
707
|
+
store.pend(sessionId, payload, priority, { box, record });
|
|
634
708
|
onDisposition?.("parked");
|
|
635
709
|
});
|
|
636
710
|
DurableAppendObligations.current()?.track(settled);
|
|
@@ -668,6 +742,7 @@ function evictOldest(s, match) {
|
|
|
668
742
|
const victim = s.items.splice(idx, 1)[0];
|
|
669
743
|
s.keys.delete(taskNotificationDedupKey(victim));
|
|
670
744
|
s.priorities?.delete(victim);
|
|
745
|
+
s.boxDebts?.delete(victim);
|
|
671
746
|
const laneKey = taskNotificationLaneKey(victim);
|
|
672
747
|
const prior = s.dropped.get(laneKey);
|
|
673
748
|
s.dropped.set(laneKey, { count: (prior?.count ?? 0) + 1, taskType: victim.task_type, taskId: victim.task_id });
|
|
@@ -746,7 +821,7 @@ export function renderBackgroundTaskTable(tasks) {
|
|
|
746
821
|
: t.status === "parked"
|
|
747
822
|
? "parked awaiting an out-of-band approval — do NOT re-issue the gated call"
|
|
748
823
|
: t.status;
|
|
749
|
-
return `- [${t.id}] Task "${(t.description ?? "background task"
|
|
824
|
+
return `- [${t.id}] Task "${redactThenCut(t.description ?? "background task", BACKGROUND_TASK_TABLE_DESCRIPTION_MAX)}" ${phrase}${t.read !== undefined ? ` — ${t.read}` : ""}`;
|
|
750
825
|
});
|
|
751
826
|
return lines.join("\n") + (unlisted > 0 ? `\n(+${unlisted} more background tasks, not listed here)` : "");
|
|
752
827
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type BackgroundAgentRecord, type BackgroundAgentStore } from "./background-agent-store.js";
|
|
2
|
-
import { type StopSource, type TaskAccess, type TaskRetrievalStatus, type UnifiedTaskOutput, type UnifiedTaskResult, type BackgroundAgentTaskHandle, type RegisteredTaskHandle, type DurableAgentCore, type ParkedClaimTicket, type RegisterBackgroundAgentInput } from "./task-registry-shared.js";
|
|
3
|
-
import { type ToolResultStore } from "./tool-result-store.js";
|
|
2
|
+
import { type StopSource, type TaskAccess, type TaskRetrievalStatus, type UnifiedTaskOutput, type UnifiedTaskResult, type BackgroundAgentTaskHandle, type ChildSessionStore, type RegisteredTaskHandle, type DurableAgentCore, type ParkedClaimTicket, type RegisterBackgroundAgentInput } from "./task-registry-shared.js";
|
|
4
3
|
import { type AgentState } from "./agent-state.js";
|
|
5
4
|
import type { CheckpointSeat } from "./checkpoint-seat.js";
|
|
6
5
|
/**
|
|
@@ -14,6 +13,17 @@ import type { CheckpointSeat } from "./checkpoint-seat.js";
|
|
|
14
13
|
* segment, which is what makes the reservation race-free in-process.
|
|
15
14
|
*/
|
|
16
15
|
export declare function activeDelegationHandlesLane(core: DurableAgentCore, scope: string, rootSessionId: string): string[];
|
|
16
|
+
/** One running or pending row of a delegation tree, as its occupant is told of it: the task id every addressing tool takes, the row's
|
|
17
|
+
* addressing name, and whether the caller asked for can address it (the registry's access predicate — a nested agent does not reach
|
|
18
|
+
* its siblings' rows, so their ids and names are not its to be told). */
|
|
19
|
+
export interface DelegationOccupant {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly reachable: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** The rows {@link activeDelegationHandlesLane} counts, with the name each is addressed by — the one selection, read in the same
|
|
25
|
+
* synchronous segment. `caller` is the access the asking leg's own tools hold (`scope` is the pool's); without one no row is reachable. */
|
|
26
|
+
export declare function activeDelegationOccupantsLane(core: DurableAgentCore, scope: string, rootSessionId: string, caller?: TaskAccess): DelegationOccupant[];
|
|
17
27
|
export declare function ensureDurableHeartbeatLane(core: DurableAgentCore): void;
|
|
18
28
|
/** design/151 S1a — enqueue one durable-row write (see {@link DurableAgentLane} for the lane
|
|
19
29
|
* contract). `patch` is captured at CALL time (the settle-site values), applied in chain order.
|
|
@@ -117,11 +127,18 @@ export declare function reapDurableAgentsLane(core: DurableAgentCore, scope: str
|
|
|
117
127
|
skippedNoSessions: number;
|
|
118
128
|
orphanPlacedReleased: number;
|
|
119
129
|
}>;
|
|
130
|
+
/** A background-agent row's child session: its id and the store the child's run holds it through (`undefined` when a
|
|
131
|
+
* caller outside the bind's types bound the id without one). */
|
|
132
|
+
export interface ChildSessionAnchor {
|
|
133
|
+
readonly sessionId: string;
|
|
134
|
+
readonly store: ChildSessionStore | undefined;
|
|
135
|
+
}
|
|
120
136
|
/** The child session a background-agent row is anchored to right now — the session its child runs on
|
|
121
|
-
* or keeps (transcript / resume anchor) — or `undefined` before the bind,
|
|
122
|
-
* and on every other task type. The ONE reading of the anchor: the list
|
|
123
|
-
*
|
|
124
|
-
|
|
137
|
+
* or keeps (transcript / resume anchor), with the store that holds it — or `undefined` before the bind,
|
|
138
|
+
* after the anchor's release, and on every other task type. The ONE reading of the anchor: the list
|
|
139
|
+
* row's `sessionId`, the transcript read ({@link TaskRegistry.anchoredSession}) and the release and bind
|
|
140
|
+
* matches below all read it here. */
|
|
141
|
+
export declare function childSessionAnchorOf(handle: RegisteredTaskHandle): ChildSessionAnchor | undefined;
|
|
125
142
|
/** A successful release of the child session `sessionId` ends the row's claim on it: both copies of
|
|
126
143
|
* the anchor go — the handle's (the list row reads it) and the durable record's (the heartbeat's F-1
|
|
127
144
|
* arm keeps re-driving a flush-failed lane, so a later successful flush would otherwise persist a row
|
|
@@ -134,8 +151,10 @@ export declare function releaseDurableTranscriptAnchorLane(core: DurableAgentCor
|
|
|
134
151
|
* A row already anchored to that session is left as it is (one fact, no second durable write). A row anchored to ANOTHER session
|
|
135
152
|
* is refused: an anchor changes only by its release ({@link releaseDurableTranscriptAnchorLane}) and a fresh bind, never by being
|
|
136
153
|
* written over, so the earlier session is never silently left unowned. An id that is no non-empty string is no anchor and is
|
|
137
|
-
* refused whatever the row holds.
|
|
138
|
-
|
|
154
|
+
* refused whatever the row holds. `store` is the store the child's run holds that session through, bound with the id (the
|
|
155
|
+
* store is process-local; the durable record keeps the id alone). The store is judged where it is read: the transcript read
|
|
156
|
+
* (`$.session.messages`) refuses, naming why, one it cannot read through. */
|
|
157
|
+
export declare function bindBackgroundAgentSessionLane(core: DurableAgentCore, id: string, sessionId: string, store: ChildSessionStore): void;
|
|
139
158
|
/**
|
|
140
159
|
* #22 — record the org-memory admission verdict THIS leg adjudicated onto the durable row, so the
|
|
141
160
|
* next CROSS-PROCESS revival (which rebuilds the spec from the reviving caller's mount and cannot
|
|
@@ -447,7 +466,7 @@ export declare function deliverToRunningAgentLane(core: DurableAgentCore, id: st
|
|
|
447
466
|
disposition: "queued" | "parked" | "pending";
|
|
448
467
|
} | {
|
|
449
468
|
ok: false;
|
|
450
|
-
reason: "not_found" | "not_running" | "no_channel" | "queue_full";
|
|
469
|
+
reason: "not_found" | "not_running" | "no_channel" | "queue_full" | "refused";
|
|
451
470
|
}>;
|
|
452
471
|
/** CC `ugo`/`rxo` (206:575227-575243 = 220:467937-467951): `id (label)` rows for a not-found footer —
|
|
453
472
|
* running bg agents the CALLER can address (canAccess scopes; CC's self/observer exclusions have no
|
|
@@ -469,8 +488,8 @@ export declare function runningBackgroundAgentLabelsLane(core: DurableAgentCore,
|
|
|
469
488
|
* rows. CC filters `!n.has(i.id)` — a NAMED agent is deliberately NOT repeated here, because
|
|
470
489
|
* its addressable form is the name, not the id. The pre-RB-332 sema code merged both legs
|
|
471
490
|
* into one list and justified it with "named has no counterpart", a claim [c209-D] retired
|
|
472
|
-
* when the explicit `name` field landed. The id stays in these rows because
|
|
473
|
-
*
|
|
491
|
+
* when the explicit `name` field landed. The id stays in these rows because the task faces
|
|
492
|
+
* resolve exact ids: an agent nobody named is the one a retry can reach by its id alone.
|
|
474
493
|
* CC's `YEd` "Running teammates:" leg has no sema counterpart (no teammate registry on this face) and is
|
|
475
494
|
* honestly absent rather than faked.
|
|
476
495
|
*/
|
|
@@ -478,8 +497,8 @@ export declare function runningAgentFooterLane(core: DurableAgentCore, access: T
|
|
|
478
497
|
named: string[];
|
|
479
498
|
background: string[];
|
|
480
499
|
};
|
|
481
|
-
/** The not-found TAIL both task faces share (CC `rxo`, appended by `uMs` for TaskStop
|
|
482
|
-
*
|
|
500
|
+
/** The not-found TAIL both task faces share (CC `rxo`, appended by `uMs` for TaskStop;
|
|
501
|
+
* the host poll's not-found carries the same tail). Empty string when the caller has nothing running. */
|
|
483
502
|
export declare function notFoundRunningAgentsTail(footer: {
|
|
484
503
|
named: string[];
|
|
485
504
|
background: string[];
|
|
@@ -535,44 +554,7 @@ export declare function serveDurableAgentRowLane(row: BackgroundAgentRecord,
|
|
|
535
554
|
* {@link import("./agent-state.js").agentStateSourceOfRecord}(row)): rendered as the `state:` line and
|
|
536
555
|
* carried as `details.agentState`. Absent ⇒ neither appears (a serving layer that does not read it). */
|
|
537
556
|
agentState?: AgentState): UnifiedTaskResult;
|
|
538
|
-
/**
|
|
539
|
-
* design/158 S1 (RB-205-B 半) — spill the FULL text behind a CLIPPED background_agent result to the
|
|
540
|
-
* offload store, and append a ref-disclosure so the middle `clipTaskOutput` drops is not gone for good.
|
|
541
|
-
* `RegisterBackgroundAgentInput` deliberately carries no `outputFile` (ref-not-path is the design/158
|
|
542
|
-
* §2.4 divergence — TOC/TOB compatible, unlike a local path), so this is the only pageback this lane
|
|
543
|
-
* gets; it reuses the SAME vocabulary as the offload face (design/108: {@link OFFLOAD_TOOL_NAME},
|
|
544
|
-
* {@link buildToolResultRef} — RB-273's single mint point) instead of inventing a parallel one.
|
|
545
|
-
*
|
|
546
|
-
* Lazy: only writes on the FIRST poll whose clip actually cut something (`clipped !== full`) — a short
|
|
547
|
-
* result never touches the store, matching design/158 §2.1 ("spill is a fidelity layer, not a new
|
|
548
|
-
* source of truth"). Idempotent PER REVIVE CYCLE: the ref folds in `handle.reviveCycle` (a revive clears
|
|
549
|
-
* `handle.spillRef` — see {@link reviveBackgroundAgentLane} — but `handle.id` itself does NOT change
|
|
550
|
-
* across a revive, so without the cycle in the ref, cycle 2's spill would mint the SAME ref string as
|
|
551
|
-
* cycle 1's and the store's write-once contract would silently keep cycle 1's STALE text under a ref
|
|
552
|
-
* now disclosed as cycle 2's current result). Caching the minted ref on the handle (rather than just
|
|
553
|
-
* re-deriving+re-`put`ting every poll and trusting the store's own write-once no-op) keeps the disclosed
|
|
554
|
-
* ref byte-stable across polls and avoids a redundant round-trip to a durable backend on every poll.
|
|
555
|
-
*
|
|
556
|
-
* No store configured (a deployment that never wired a `toolResultStore`) ⇒ returns `clipped` UNCHANGED
|
|
557
|
-
* — the legal degrade design/158 §2.2 calls for, byte-identical to pre-S1 behavior.
|
|
558
|
-
*
|
|
559
|
-
* Backlog #169 — a FAILING `put` (throwing or rejecting; the store contract admits both dialects) is
|
|
560
|
-
* NOT fatal to the poll: the clipped text is still served, with {@link AGENT_SPILL_FAILED_NOTE} in
|
|
561
|
-
* place of the ref disclosure (advertising a ref nobody can read back would be a false promise), and
|
|
562
|
-
* `handle.spillFailed` latches so later polls of the same cycle repeat the honest note instead of
|
|
563
|
-
* retrying the write — see the catch below for why latch-not-retry. Same "store failure is never
|
|
564
|
-
* fatal" posture as the monitor/offload/budget/compaction write sites. A put that settles AFTER a
|
|
565
|
-
* revive (stale cycle) is generation-guarded: it answers its own caller honestly but never writes
|
|
566
|
-
* spill state onto the new cycle (see `mintCycle` below).
|
|
567
|
-
*/
|
|
568
|
-
export declare function spillClippedAgentResult(handle: BackgroundAgentTaskHandle, full: string, clipped: string, store: ToolResultStore | undefined, sessionId: string | undefined): Promise<string>;
|
|
569
557
|
export declare function pollBackgroundAgentLane(handle: BackgroundAgentTaskHandle, deadline?: number, signal?: AbortSignal,
|
|
570
|
-
/** design/158 S1 — the offload store a clipped result's full text spills to (see
|
|
571
|
-
* {@link spillClippedAgentResult}). Absent ⇒ legal degrade, byte-identical to pre-S1 output. */
|
|
572
|
-
store?: ToolResultStore,
|
|
573
|
-
/** design/158 S1 — the caller's session id, folded into the minted ref for global uniqueness (same
|
|
574
|
-
* role `sessionId` plays at every other {@link buildToolResultRef} call site). */
|
|
575
|
-
sessionId?: string,
|
|
576
558
|
/** The run's checkpoint seat — the store a parked row's approval card is read from
|
|
577
559
|
* ({@link import("./agent-state.js").readAgentState}). Absent ⇒ a parked row reads `approval unreadable`. */
|
|
578
560
|
checkpointSeat?: CheckpointSeat): Promise<UnifiedTaskResult>;
|