@sema-agent/core 7.68.7 → 7.69.1
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 +2139 -0
- package/dist/agents/agent-definition.d.ts +32 -3
- package/dist/agents/agent-definition.js +39 -1
- package/dist/agents/agent-transcript-tool.js +16 -5
- package/dist/agents/cascade.js +9 -6
- package/dist/agents/cc-uds-peer-channel.js +2 -1
- package/dist/agents/cumulative-stats.d.ts +3 -1
- package/dist/agents/cumulative-stats.js +4 -1
- package/dist/agents/delegation-review-faces.d.ts +35 -0
- package/dist/agents/delegation-review-faces.js +26 -0
- package/dist/agents/inherited-tool-pool.d.ts +4 -2
- package/dist/agents/list-agents-tool.d.ts +8 -19
- package/dist/agents/list-agents-tool.js +19 -34
- package/dist/agents/peer-directory.js +3 -2
- package/dist/agents/peer-session-drain.js +3 -3
- package/dist/agents/repair-loop.js +17 -21
- package/dist/agents/retain-ledger.d.ts +122 -58
- package/dist/agents/retain-ledger.js +48 -21
- package/dist/agents/root-session-lane.d.ts +17 -0
- package/dist/agents/root-session-lane.js +9 -0
- package/dist/agents/send-message-tool.js +44 -31
- package/dist/agents/subagent-steps.d.ts +0 -11
- package/dist/agents/subagent-steps.js +1 -14
- package/dist/agents/subagent-transcript-placement.d.ts +4 -3
- package/dist/agents/subagent.d.ts +19 -8
- package/dist/agents/subagent.js +252 -208
- package/dist/agents/tool-filter.d.ts +31 -1
- package/dist/agents/tool-filter.js +28 -4
- package/dist/agents/verifier-independence.js +3 -2
- package/dist/agents/verify.d.ts +6 -2
- package/dist/agents/verify.js +17 -7
- package/dist/agents/yield-adoption.d.ts +17 -0
- package/dist/agents/yield-adoption.js +22 -2
- package/dist/brain/anthropic.js +42 -14
- package/dist/brain/claude-model-id.d.ts +36 -0
- package/dist/brain/claude-model-id.js +44 -0
- package/dist/brain/failover.js +14 -3
- package/dist/brain/fast-mode.d.ts +272 -0
- package/dist/brain/fast-mode.js +130 -0
- package/dist/brain/media-degrade.d.ts +5 -0
- package/dist/brain/media-degrade.js +1 -0
- package/dist/brain/model-capability.d.ts +122 -18
- package/dist/brain/model-capability.js +84 -7
- package/dist/brain/model-lane.d.ts +40 -16
- package/dist/brain/model-lane.js +97 -39
- package/dist/brain/model-presets.d.ts +4 -1
- package/dist/brain/model-presets.js +10 -1
- package/dist/brain/open-responses.js +37 -14
- package/dist/brain/openai.js +27 -15
- package/dist/brain/provider-dialect.d.ts +9 -0
- package/dist/brain/provider-dialect.js +4 -0
- package/dist/brain/provider-message.d.ts +2 -2
- package/dist/brain/provider-message.js +8 -8
- package/dist/brain/reasoning-request.d.ts +26 -0
- package/dist/brain/reasoning-request.js +14 -4
- package/dist/brain/reasoning-stamp.d.ts +3 -2
- package/dist/brain/reasoning.d.ts +8 -4
- package/dist/brain/reasoning.js +4 -3
- package/dist/brain/reference-model-traits.d.ts +59 -0
- package/dist/brain/reference-model-traits.js +46 -0
- package/dist/brain/request-params.js +1 -0
- package/dist/brain/route-adjudicator.d.ts +107 -106
- package/dist/brain/route-adjudicator.js +217 -51
- package/dist/brain/route-conformance.d.ts +6 -4
- package/dist/brain/routing.d.ts +2 -1
- package/dist/brain/routing.js +21 -5
- package/dist/brain/status-sink.d.ts +52 -10
- package/dist/brain/stream-engine.d.ts +68 -11
- package/dist/brain/stream-engine.js +512 -93
- package/dist/brain/stream-shared.d.ts +34 -8
- package/dist/brain/stream-shared.js +20 -7
- package/dist/brain/usage-reading.d.ts +15 -0
- package/dist/brain/usage-reading.js +18 -5
- package/dist/core/a2a.js +28 -21
- package/dist/core/advisor-verdict.d.ts +5 -4
- package/dist/core/advisor-verdict.js +2 -2
- package/dist/core/agent-config-dir.d.ts +39 -3
- package/dist/core/agent-config-dir.js +67 -11
- package/dist/core/agent-definition.d.ts +4 -1
- package/dist/core/agent-state.d.ts +25 -2
- package/dist/core/agent-state.js +50 -3
- package/dist/core/allow-entry.d.ts +11 -11
- package/dist/core/allow-entry.js +39 -32
- package/dist/core/ask-headline.d.ts +28 -16
- package/dist/core/ask-headline.js +18 -8
- package/dist/core/ask-origin.d.ts +108 -33
- package/dist/core/ask-origin.js +40 -11
- package/dist/core/ask-question.d.ts +9 -1
- package/dist/core/ask-question.js +3 -0
- package/dist/core/ask-unresolvable-notice.d.ts +10 -2
- package/dist/core/ask-unresolvable-notice.js +5 -2
- package/dist/core/attachment-source.d.ts +1 -1
- package/dist/core/attachment-source.js +2 -0
- package/dist/core/auto-compaction.d.ts +48 -66
- package/dist/core/auto-compaction.js +48 -106
- package/dist/core/auto-mode-directive.d.ts +30 -60
- package/dist/core/auto-mode-directive.js +36 -38
- package/dist/core/auto-mode.d.ts +40 -9
- package/dist/core/auto-mode.js +20 -5
- package/dist/core/background-agent-store.d.ts +87 -1
- package/dist/core/background-agent-store.js +72 -1
- package/dist/core/background-shell.d.ts +3 -0
- package/dist/core/background-shell.js +1 -0
- package/dist/core/cache-break-detector.d.ts +23 -11
- package/dist/core/cache-break-detector.js +12 -6
- package/dist/core/caller-text.d.ts +27 -8
- package/dist/core/caller-text.js +47 -1
- package/dist/core/checkpoint-features.d.ts +18 -10
- package/dist/core/checkpoint-features.js +1 -1
- package/dist/core/checkpoint-identity.d.ts +53 -0
- package/dist/core/checkpoint-identity.js +29 -0
- package/dist/core/checkpoint-queries.d.ts +4 -3
- package/dist/core/checkpoint-queries.js +5 -3
- package/dist/core/checkpoint-rekey.d.ts +70 -0
- package/dist/core/checkpoint-rekey.js +107 -0
- package/dist/core/checkpoint-requirements.d.ts +83 -10
- package/dist/core/checkpoint-requirements.js +53 -13
- package/dist/core/checkpoint-row-verdict.d.ts +5 -3
- package/dist/core/checkpoint-row-verdict.js +40 -4
- package/dist/core/checkpoint-store.d.ts +84 -7
- package/dist/core/checkpoint-store.js +38 -7
- package/dist/core/child-clamp-seats.d.ts +30 -3
- package/dist/core/child-clamp-seats.js +26 -1
- package/dist/core/classifier-category.d.ts +25 -0
- package/dist/core/classifier-category.js +93 -0
- package/dist/core/classifier-unavailable-arm.d.ts +62 -8
- package/dist/core/classifier-unavailable-arm.js +19 -2
- package/dist/core/command-sandbox-dispatch.d.ts +14 -2
- package/dist/core/command-sandbox.d.ts +209 -28
- package/dist/core/command-sandbox.js +195 -20
- package/dist/core/compaction-retired-members.d.ts +12 -0
- package/dist/core/compaction-retired-members.js +22 -0
- package/dist/core/config-refusal-codes.d.ts +41 -1
- package/dist/core/config-refusal-codes.js +18 -0
- package/dist/core/context-edit.d.ts +34 -18
- package/dist/core/context-edit.js +30 -1
- package/dist/core/context-settings.js +5 -4
- package/dist/core/cron.d.ts +68 -0
- package/dist/core/cron.js +259 -0
- package/dist/core/cross-boundary-taint.d.ts +15 -1
- package/dist/core/cross-boundary-taint.js +6 -0
- package/dist/core/delegation-frames.d.ts +36 -6
- package/dist/core/delegation-frames.js +3 -0
- package/dist/core/delegation-name.d.ts +10 -4
- package/dist/core/delegation-name.js +53 -23
- package/dist/core/engine-attestation.d.ts +26 -2
- package/dist/core/engine-attestation.js +4 -0
- package/dist/core/engine-capabilities.d.ts +53 -3
- package/dist/core/engine-capabilities.js +1 -1
- package/dist/core/engine-notice.d.ts +213 -95
- package/dist/core/engine-notice.js +29 -1
- package/dist/core/engine-version.d.ts +1 -0
- package/dist/core/engine-version.js +1 -0
- package/dist/core/extension-call-id.d.ts +4 -0
- package/dist/core/extension-call-id.js +8 -0
- package/dist/core/fast-tier-door.d.ts +36 -0
- package/dist/core/fast-tier-door.js +65 -0
- package/dist/core/file-history-store.d.ts +343 -67
- package/dist/core/file-history-store.js +320 -93
- package/dist/core/frame-settlement.d.ts +4 -0
- package/dist/core/frame-settlement.js +5 -0
- package/dist/core/gate-fold.js +13 -4
- package/dist/core/gate-lanes.js +27 -20
- package/dist/core/gate-outcome.d.ts +116 -13
- package/dist/core/gate-outcome.js +100 -4
- package/dist/core/git-read-only.d.ts +10 -0
- package/dist/core/git-read-only.js +1 -0
- package/dist/core/git-worktree-env.d.ts +29 -10
- package/dist/core/git-worktree-env.js +38 -18
- package/dist/core/governance-codes.d.ts +240 -8
- package/dist/core/governance-codes.js +204 -6
- package/dist/core/hooks.d.ts +27 -16
- package/dist/core/hooks.js +84 -82
- package/dist/core/host-floor.d.ts +2 -8
- package/dist/core/host-floor.js +6 -42
- package/dist/core/identity-rekey.d.ts +275 -0
- package/dist/core/identity-rekey.js +198 -0
- package/dist/core/image-admission.d.ts +7 -4
- package/dist/core/image-admission.js +24 -11
- package/dist/core/isolation-scope.d.ts +12 -0
- package/dist/core/isolation-scope.js +4 -0
- package/dist/core/leg-identity.d.ts +32 -2
- package/dist/core/leg-identity.js +16 -2
- package/dist/core/locked-config.d.ts +26 -6
- package/dist/core/locked-config.js +38 -17
- package/dist/core/loopback-host.d.ts +18 -0
- package/dist/core/loopback-host.js +40 -0
- package/dist/core/lsp.d.ts +3 -0
- package/dist/core/lsp.js +3 -2
- package/dist/core/mcp-connection-pool.d.ts +57 -33
- package/dist/core/mcp-connection-pool.js +47 -23
- package/dist/core/mcp-failure.d.ts +41 -19
- package/dist/core/mcp-failure.js +14 -8
- package/dist/core/mcp-host-read.js +5 -4
- package/dist/core/mcp-host-seat.js +3 -2
- package/dist/core/mcp-name-judge.js +2 -1
- package/dist/core/mcp-server-link.js +2 -1
- package/dist/core/mcp-server-spec.js +2 -2
- package/dist/core/mcp-server-unavailable-notice.d.ts +26 -16
- package/dist/core/mcp-server-unavailable-notice.js +25 -4
- package/dist/core/mcp.d.ts +15 -9
- package/dist/core/mcp.js +46 -34
- package/dist/core/memory-engine/consolidation-driver.js +8 -8
- package/dist/core/memory-engine/consolidation-write-gate.js +3 -2
- package/dist/core/memory-engine/engine.d.ts +48 -12
- package/dist/core/memory-engine/engine.js +117 -55
- package/dist/core/memory-engine/file-backend.d.ts +2 -1
- package/dist/core/memory-engine/index-copies.d.ts +47 -0
- package/dist/core/memory-engine/index-copies.js +88 -0
- package/dist/core/memory-engine/layout.d.ts +26 -8
- package/dist/core/memory-engine/layout.js +40 -4
- package/dist/core/memory-engine/origin-clearance.d.ts +9 -7
- package/dist/core/memory-engine/origin-clearance.js +2 -4
- package/dist/core/memory-engine/types.d.ts +16 -3
- package/dist/core/memory.d.ts +5 -0
- package/dist/core/memory.js +3 -0
- package/dist/core/mode-policy.d.ts +7 -1
- package/dist/core/mode-policy.js +9 -0
- package/dist/core/model-fallbacks.d.ts +13 -7
- package/dist/core/model-fallbacks.js +5 -3
- package/dist/core/model-receipt.d.ts +15 -0
- package/dist/core/model-receipt.js +54 -1
- package/dist/core/model-seat.d.ts +17 -15
- package/dist/core/mods/agent-stations.js +5 -4
- package/dist/core/mods/extension-call.d.ts +0 -4
- package/dist/core/mods/extension-call.js +0 -8
- package/dist/core/mods/host.d.ts +18 -0
- package/dist/core/mods/host.js +7 -0
- package/dist/core/mods/kernel/events.d.ts +12 -0
- package/dist/core/mods/kernel/events.js +18 -9
- package/dist/core/mods/kernel/registration.d.ts +13 -0
- package/dist/core/mods/kernel/registration.js +34 -1
- package/dist/core/mods/message-display.js +1 -1
- package/dist/core/mods/package.js +3 -3
- package/dist/core/mods/prompt-submit.js +2 -2
- package/dist/core/mods/session-append.js +3 -3
- package/dist/core/mods/session-compact.js +7 -7
- package/dist/core/mods/session-receive.js +3 -3
- package/dist/core/mods/session-send.js +3 -3
- package/dist/core/mods/stations.d.ts +10 -5
- package/dist/core/mods/stations.js +15 -13
- package/dist/core/mods/tool-call.js +12 -12
- package/dist/core/mounted-mcp.d.ts +10 -1
- package/dist/core/mounted-mcp.js +4 -0
- package/dist/core/output-style.d.ts +14 -8
- package/dist/core/output-style.js +6 -6
- package/dist/core/own-property-receipt.js +3 -5
- package/dist/core/owner-identity.d.ts +68 -0
- package/dist/core/owner-identity.js +39 -0
- package/dist/core/parent-spec-seat.d.ts +5 -1
- package/dist/core/parent-spec-seat.js +2 -0
- package/dist/core/park-resumability.js +2 -2
- package/dist/core/park-selfcheck.js +15 -4
- package/dist/core/path-guard-rows.d.ts +8 -3
- package/dist/core/path-guard-rows.js +18 -5
- package/dist/core/peer-seat.d.ts +40 -11
- package/dist/core/peer-seat.js +38 -9
- package/dist/core/permission-rule-model.d.ts +5 -0
- package/dist/core/permission-rule-model.js +27 -6
- package/dist/core/permission-rules.d.ts +42 -5
- package/dist/core/permission-rules.js +74 -10
- package/dist/core/persisted-rule-arms.d.ts +8 -6
- package/dist/core/persisted-rule-arms.js +13 -20
- package/dist/core/physical-path.d.ts +12 -8
- package/dist/core/physical-path.js +24 -14
- package/dist/core/present-plan-tool.js +2 -1
- package/dist/core/pricing.d.ts +65 -8
- package/dist/core/pricing.js +51 -0
- package/dist/core/process-identity.d.ts +11 -3
- package/dist/core/process-identity.js +26 -16
- package/dist/core/prompt-section-seat.js +6 -5
- package/dist/core/protocol-http-auth.d.ts +87 -10
- package/dist/core/protocol-http-auth.js +155 -23
- package/dist/core/reminder-mint.d.ts +4 -0
- package/dist/core/reminder-mint.js +1 -0
- package/dist/core/remote-env.d.ts +46 -1
- package/dist/core/remote-env.js +2 -0
- package/dist/core/resume-at-refusal.d.ts +47 -0
- package/dist/core/resume-at-refusal.js +9 -0
- package/dist/core/resume-startup-cause.d.ts +8 -3
- package/dist/core/resume-startup-cause.js +3 -1
- package/dist/core/retired-keys.d.ts +4 -0
- package/dist/core/retired-keys.js +4 -0
- package/dist/core/roles.d.ts +11 -5
- package/dist/core/roles.js +14 -3
- package/dist/core/rule-store-fault.d.ts +8 -1
- package/dist/core/rule-store-fault.js +5 -0
- package/dist/core/runner/advisor-instructions.d.ts +12 -12
- package/dist/core/runner/advisor-instructions.js +7 -24
- package/dist/core/runner/announce-once-ledger.d.ts +23 -8
- package/dist/core/runner/announce-once-ledger.js +69 -18
- package/dist/core/runner/assemble-result.d.ts +14 -0
- package/dist/core/runner/assemble-result.js +3 -2
- package/dist/core/runner/auto-strip-notice.js +1 -1
- package/dist/core/runner/branch-window.js +5 -3
- package/dist/core/runner/call-hook-stations.d.ts +3 -0
- package/dist/core/runner/call-hook-stations.js +4 -3
- package/dist/core/runner/caller-roster.js +2 -1
- package/dist/core/runner/capability-withheld-seat.js +47 -5
- package/dist/core/runner/classifier-ladder.d.ts +48 -8
- package/dist/core/runner/classifier-ladder.js +88 -38
- package/dist/core/runner/cleared-results-record.d.ts +33 -0
- package/dist/core/runner/cleared-results-record.js +56 -0
- package/dist/core/runner/clock-and-limits.d.ts +13 -2
- package/dist/core/runner/clock-and-limits.js +11 -8
- package/dist/core/runner/command-sandbox-frame.d.ts +56 -0
- package/dist/core/runner/command-sandbox-frame.js +107 -0
- package/dist/core/runner/compact-session.d.ts +3 -1
- package/dist/core/runner/compact-session.js +29 -18
- package/dist/core/runner/compaction-call-options.d.ts +2 -2
- package/dist/core/runner/compaction-knobs.d.ts +1 -1
- package/dist/core/runner/compaction-restate.d.ts +4 -4
- package/dist/core/runner/compaction-restate.js +3 -1
- package/dist/core/runner/construction-doors.js +9 -0
- package/dist/core/runner/continuation-gate.d.ts +39 -0
- package/dist/core/runner/continuation-gate.js +43 -0
- package/dist/core/runner/continues-from.d.ts +57 -0
- package/dist/core/runner/continues-from.js +76 -0
- package/dist/core/runner/contracts.d.ts +216 -86
- package/dist/core/runner/conversation-segment.d.ts +19 -12
- package/dist/core/runner/conversation-segment.js +27 -7
- package/dist/core/runner/credential-refusal-seat.js +31 -12
- package/dist/core/runner/cross-boundary-lane.d.ts +2 -2
- package/dist/core/runner/cross-boundary-lane.js +26 -13
- package/dist/core/runner/delegation-owner.d.ts +99 -9
- package/dist/core/runner/delegation-owner.js +107 -4
- package/dist/core/runner/denial-limit-arms.js +13 -12
- package/dist/core/runner/derived-route-fallback.d.ts +12 -26
- package/dist/core/runner/derived-route-fallback.js +4 -10
- package/dist/core/runner/earlier-grammar-notice.d.ts +6 -0
- package/dist/core/runner/earlier-grammar-notice.js +9 -0
- package/dist/core/runner/env-capability-census.js +2 -1
- package/dist/core/runner/execution-record.d.ts +4 -2
- package/dist/core/runner/execution-record.js +1 -1
- package/dist/core/runner/fast-mode-seat.d.ts +89 -0
- package/dist/core/runner/fast-mode-seat.js +215 -0
- package/dist/core/runner/file-history-restore.d.ts +52 -14
- package/dist/core/runner/file-history-restore.js +50 -8
- package/dist/core/runner/forward-sink.js +2 -2
- package/dist/core/runner/gate-exit.d.ts +43 -4
- package/dist/core/runner/gate-exit.js +59 -12
- package/dist/core/runner/git-leg-delivery.js +6 -3
- package/dist/core/runner/git-status-frame.d.ts +35 -27
- package/dist/core/runner/git-status-frame.js +56 -37
- package/dist/core/runner/halt-attribution.js +2 -2
- package/dist/core/runner/hook-progress-lane.d.ts +26 -0
- package/dist/core/runner/hook-progress-lane.js +72 -0
- package/dist/core/runner/initial-run-state.js +2 -2
- package/dist/core/runner/language-frame.d.ts +10 -8
- package/dist/core/runner/language-frame.js +7 -11
- package/dist/core/runner/left-as-is-seat.d.ts +20 -0
- package/dist/core/runner/left-as-is-seat.js +11 -0
- package/dist/core/runner/leg-caller-places.d.ts +39 -0
- package/dist/core/runner/leg-caller-places.js +23 -0
- package/dist/core/runner/leg-frame.d.ts +8 -2
- package/dist/core/runner/leg-receipt.d.ts +65 -0
- package/dist/core/runner/leg-receipt.js +53 -0
- package/dist/core/runner/listing-fold.d.ts +4 -3
- package/dist/core/runner/listing-fold.js +5 -5
- package/dist/core/runner/listing-replay.d.ts +41 -0
- package/dist/core/runner/listing-replay.js +75 -0
- package/dist/core/runner/main-call-account.d.ts +2 -1
- package/dist/core/runner/main-call-account.js +18 -5
- package/dist/core/runner/mcp-redial.d.ts +4 -2
- package/dist/core/runner/mcp-redial.js +3 -0
- package/dist/core/runner/media-removed-seat.d.ts +10 -6
- package/dist/core/runner/media-removed-seat.js +6 -3
- package/dist/core/runner/memory-consolidation-driver.js +3 -2
- package/dist/core/runner/messages-omitted-seat.d.ts +2 -1
- package/dist/core/runner/messages-omitted-seat.js +15 -5
- package/dist/core/runner/model-fallback-seat.d.ts +12 -9
- package/dist/core/runner/model-fallback-seat.js +24 -20
- package/dist/core/runner/nested-memory-lane.d.ts +16 -8
- package/dist/core/runner/nested-memory-lane.js +64 -53
- package/dist/core/runner/permission-rule-lanes.d.ts +4 -3
- package/dist/core/runner/permission-rule-lanes.js +2 -0
- package/dist/core/runner/person-path-rows.d.ts +25 -7
- package/dist/core/runner/person-path-rows.js +17 -3
- package/dist/core/runner/placement-fence.js +2 -2
- package/dist/core/runner/policy-throw.d.ts +3 -3
- package/dist/core/runner/policy-throw.js +7 -5
- package/dist/core/runner/prefix-ledger.d.ts +120 -0
- package/dist/core/runner/prefix-ledger.js +176 -0
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +7 -1
- package/dist/core/runner/prepare-acquire-reconcile.js +9 -5
- package/dist/core/runner/prepare-advisor.d.ts +5 -0
- package/dist/core/runner/prepare-advisor.js +4 -3
- package/dist/core/runner/prepare-artifact.d.ts +10 -2
- package/dist/core/runner/prepare-artifact.js +19 -8
- package/dist/core/runner/prepare-ask-lane.d.ts +7 -0
- package/dist/core/runner/prepare-ask-lane.js +4 -3
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +11 -5
- package/dist/core/runner/prepare-caps-and-workflow.js +32 -23
- package/dist/core/runner/prepare-config-doors.d.ts +19 -8
- package/dist/core/runner/prepare-config-doors.js +42 -28
- package/dist/core/runner/prepare-context-lane.d.ts +28 -10
- package/dist/core/runner/prepare-context-lane.js +92 -40
- package/dist/core/runner/prepare-defer-classify.d.ts +12 -0
- package/dist/core/runner/prepare-defer-classify.js +5 -2
- package/dist/core/runner/prepare-delegation-surface.d.ts +10 -8
- package/dist/core/runner/prepare-delegation-surface.js +6 -7
- package/dist/core/runner/prepare-execution-env.d.ts +46 -4
- package/dist/core/runner/prepare-execution-env.js +47 -18
- package/dist/core/runner/prepare-file-history.d.ts +4 -1
- package/dist/core/runner/prepare-file-history.js +8 -9
- package/dist/core/runner/prepare-gate-stations.d.ts +18 -11
- package/dist/core/runner/prepare-gate-stations.js +24 -42
- package/dist/core/runner/prepare-hands-readface.d.ts +28 -11
- package/dist/core/runner/prepare-hands-readface.js +64 -54
- package/dist/core/runner/prepare-inherited-gate.d.ts +14 -2
- package/dist/core/runner/prepare-inherited-gate.js +12 -9
- package/dist/core/runner/prepare-leg-adoption.d.ts +36 -0
- package/dist/core/runner/prepare-leg-adoption.js +24 -0
- package/dist/core/runner/prepare-listings.d.ts +3 -0
- package/dist/core/runner/prepare-listings.js +2 -2
- package/dist/core/runner/prepare-lsp.d.ts +0 -3
- package/dist/core/runner/prepare-lsp.js +1 -2
- package/dist/core/runner/prepare-memory-engine-session.js +1 -1
- package/dist/core/runner/prepare-memory.d.ts +10 -2
- package/dist/core/runner/prepare-memory.js +53 -7
- package/dist/core/runner/prepare-offload-wrappers.d.ts +5 -5
- package/dist/core/runner/prepare-offload-wrappers.js +5 -5
- package/dist/core/runner/prepare-park-ask.d.ts +9 -2
- package/dist/core/runner/prepare-park-ask.js +5 -3
- package/dist/core/runner/prepare-policy-chain.d.ts +23 -5
- package/dist/core/runner/prepare-policy-chain.js +44 -27
- package/dist/core/runner/prepare-prompt-assembly.d.ts +23 -6
- package/dist/core/runner/prepare-prompt-assembly.js +15 -6
- package/dist/core/runner/prepare-prompt-inputs.d.ts +6 -10
- package/dist/core/runner/prepare-prompt-inputs.js +7 -8
- package/dist/core/runner/prepare-protocol-tools.d.ts +9 -4
- package/dist/core/runner/prepare-protocol-tools.js +11 -11
- package/dist/core/runner/prepare-run-refs.d.ts +7 -0
- package/dist/core/runner/prepare-run-refs.js +6 -2
- package/dist/core/runner/prepare-safety-scan.js +7 -0
- package/dist/core/runner/prepare-suspend-saga.d.ts +8 -1
- package/dist/core/runner/prepare-suspend-saga.js +6 -2
- package/dist/core/runner/prepare-task.d.ts +1 -30
- package/dist/core/runner/prepare-task.js +156 -186
- package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +5 -11
- package/dist/core/runner/prepare-tool-disclosure-mount.js +7 -8
- package/dist/core/runner/prepare-turn-wiring.d.ts +26 -28
- package/dist/core/runner/prepare-turn-wiring.js +13 -20
- package/dist/core/runner/prepare-wiring-manifest.d.ts +12 -3
- package/dist/core/runner/prepare-wiring-manifest.js +22 -17
- package/dist/core/runner/prompt-block.js +2 -2
- package/dist/core/runner/prompt-suggestions.d.ts +5 -8
- package/dist/core/runner/prompt-suggestions.js +5 -2
- package/dist/core/runner/read-block-judge.d.ts +47 -0
- package/dist/core/runner/read-block-judge.js +33 -0
- package/dist/core/runner/reply-pricing.d.ts +8 -4
- package/dist/core/runner/reply-pricing.js +6 -5
- package/dist/core/runner/resume-admission.js +2 -0
- package/dist/core/runner/resume-apply.js +4 -4
- package/dist/core/runner/resume-checkpoint-screen.d.ts +23 -2
- package/dist/core/runner/resume-checkpoint-screen.js +34 -27
- package/dist/core/runner/resume-preflight.js +3 -3
- package/dist/core/runner/rewind-files.js +21 -14
- package/dist/core/runner/role-resolution-table.d.ts +24 -16
- package/dist/core/runner/role-resolution-table.js +11 -11
- package/dist/core/runner/role-seat-defaulted.js +2 -2
- package/dist/core/runner/rule-store-unreadable-notice.d.ts +7 -2
- package/dist/core/runner/rule-store-unreadable-notice.js +22 -7
- package/dist/core/runner/run-attachment-seats.js +8 -15
- package/dist/core/runner/run-brain-sinks.js +1 -0
- package/dist/core/runner/run-compaction-machinery.d.ts +1 -11
- package/dist/core/runner/run-compaction-machinery.js +3 -40
- package/dist/core/runner/run-harness-handlers.d.ts +2 -2
- package/dist/core/runner/run-harness-handlers.js +22 -22
- package/dist/core/runner/run-identity-wiring.js +15 -10
- package/dist/core/runner/run-leg.js +44 -13
- package/dist/core/runner/run-notification-lane.d.ts +4 -1
- package/dist/core/runner/run-notification-lane.js +21 -8
- package/dist/core/runner/run-recovery-lanes.d.ts +0 -4
- package/dist/core/runner/run-recovery-lanes.js +35 -19
- package/dist/core/runner/run-settle-and-teardown.d.ts +6 -3
- package/dist/core/runner/run-settle-and-teardown.js +42 -52
- package/dist/core/runner/run-stop-and-final-verify.d.ts +4 -1
- package/dist/core/runner/run-stop-and-final-verify.js +12 -49
- package/dist/core/runner/run-telemetry-and-budget-seats.js +29 -11
- package/dist/core/runner/run-terminal-adoption.d.ts +11 -30
- package/dist/core/runner/run-terminal-adoption.js +10 -90
- package/dist/core/runner/run-tool-mount-facts.js +1 -5
- package/dist/core/runner/run-turn-boundary.js +69 -37
- package/dist/core/runner/runtask.d.ts +16 -7
- package/dist/core/runner/runtask.js +55 -34
- package/dist/core/runner/sandbox-network-seat.d.ts +52 -0
- package/dist/core/runner/sandbox-network-seat.js +40 -0
- package/dist/core/runner/seat-model-doors.d.ts +16 -0
- package/dist/core/runner/seat-model-doors.js +13 -0
- package/dist/core/runner/session-file-state-replay.d.ts +20 -0
- package/dist/core/runner/session-file-state-replay.js +17 -5
- package/dist/core/runner/session-hash-salt.d.ts +18 -0
- package/dist/core/runner/session-hash-salt.js +36 -0
- package/dist/core/runner/session-read-file-states.d.ts +37 -0
- package/dist/core/runner/session-read-file-states.js +19 -0
- package/dist/core/runner/session-rule-policy.d.ts +2 -1
- package/dist/core/runner/session-rule-policy.js +3 -2
- package/dist/core/runner/session-verb-doors.js +2 -1
- package/dist/core/runner/session-write-ledger.d.ts +5 -1
- package/dist/core/runner/session-write-ledger.js +19 -5
- package/dist/core/runner/shared-read-classifier.d.ts +48 -0
- package/dist/core/runner/shared-read-classifier.js +33 -0
- package/dist/core/runner/shell-env-withheld.d.ts +13 -7
- package/dist/core/runner/shell-env-withheld.js +28 -3
- package/dist/core/runner/side-call-account.d.ts +39 -3
- package/dist/core/runner/side-call-account.js +53 -9
- package/dist/core/runner/skill-mention.d.ts +12 -0
- package/dist/core/runner/skill-mention.js +50 -0
- package/dist/core/runner/skipped-rules-notice.d.ts +43 -0
- package/dist/core/runner/skipped-rules-notice.js +49 -0
- package/dist/core/runner/steering-preview.js +1 -1
- package/dist/core/runner/stop-tail-notice.d.ts +40 -0
- package/dist/core/runner/stop-tail-notice.js +35 -0
- package/dist/core/runner/stream-halt-verbs.js +1 -1
- package/dist/core/runner/stream-mode-verb.d.ts +11 -4
- package/dist/core/runner/stream-mode-verb.js +19 -7
- package/dist/core/runner/stream-settle-backstop.js +4 -1
- package/dist/core/runner/stream-steer-verb.js +4 -3
- package/dist/core/runner/synthetic-tools.d.ts +11 -11
- package/dist/core/runner/synthetic-tools.js +19 -22
- package/dist/core/runner/task-start-doors.d.ts +86 -0
- package/dist/core/runner/task-start-doors.js +108 -0
- package/dist/core/runner/teardown-bounded.d.ts +5 -5
- package/dist/core/runner/teardown-bounded.js +6 -6
- package/dist/core/runner/terminal-account.d.ts +3 -2
- package/dist/core/runner/terminal-account.js +5 -3
- package/dist/core/runner/tool-disclosure.js +8 -9
- package/dist/core/runner/tool-end-body.d.ts +2 -0
- package/dist/core/runner/tool-end-body.js +1 -0
- package/dist/core/runner/tool-face-overlay.js +1 -0
- package/dist/core/runner/tool-occurrence.d.ts +22 -24
- package/dist/core/runner/tool-occurrence.js +9 -15
- package/dist/core/runner/tool-progress-lane.js +1 -1
- package/dist/core/runner/tool-result-media-seat.d.ts +7 -4
- package/dist/core/runner/tool-result-media-seat.js +16 -4
- package/dist/core/runner/tool-table-view.d.ts +12 -10
- package/dist/core/runner/tool-table-view.js +23 -21
- package/dist/core/runner/tool-turn-repair-seat.d.ts +22 -2
- package/dist/core/runner/tool-turn-repair-seat.js +23 -5
- package/dist/core/runner/turn-attachments.d.ts +74 -148
- package/dist/core/runner/turn-attachments.js +153 -223
- package/dist/core/runner/usage-accounting.d.ts +15 -0
- package/dist/core/runner/usage-accounting.js +12 -4
- package/dist/core/runner/verdict-refusal.d.ts +45 -0
- package/dist/core/runner/verdict-refusal.js +39 -0
- package/dist/core/runner/write-protection-station.d.ts +10 -2
- package/dist/core/runner/write-protection-station.js +7 -7
- package/dist/core/runner-deps.d.ts +40 -32
- package/dist/core/runtime-caps.d.ts +5 -3
- package/dist/core/scheduler.d.ts +13 -3
- package/dist/core/scheduler.js +0 -12
- package/dist/core/secret-env.d.ts +61 -20
- package/dist/core/secret-env.js +83 -15
- package/dist/core/sensitive-path-policy.js +4 -0
- package/dist/core/session-checkout.d.ts +18 -1
- package/dist/core/session-checkout.js +33 -17
- package/dist/core/session-log-transfer.js +2 -2
- package/dist/core/session-policy-store.d.ts +220 -31
- package/dist/core/session-policy-store.js +333 -47
- package/dist/core/session-reconcile.d.ts +12 -0
- package/dist/core/session-reconcile.js +1 -1
- package/dist/core/session-store.d.ts +5 -3
- package/dist/core/session-store.js +11 -11
- package/dist/core/session.d.ts +31 -22
- package/dist/core/session.js +3 -2
- package/dist/core/shared-memory/normalize.js +2 -1
- package/dist/core/shell-run-candidates.d.ts +1 -1
- package/dist/core/shell-run-candidates.js +11 -3
- package/dist/core/side-query.d.ts +4 -0
- package/dist/core/side-query.js +7 -4
- package/dist/core/spec-contract.d.ts +4 -2
- package/dist/core/store-contracts/background-agent-store-contract.js +149 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +55 -0
- package/dist/core/store-contracts/contract-kit-version.d.ts +4 -4
- package/dist/core/store-contracts/file-history-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/file-history-store-contract.js +282 -22
- package/dist/core/store-contracts/session-policy-store-contract.js +202 -0
- package/dist/core/store-contracts/session-store-contract.js +48 -14
- package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/tool-result-store-contract.js +128 -0
- package/dist/core/store-contracts/workflow-journal-store-contract.js +90 -1
- package/dist/core/swappable-deps.d.ts +16 -0
- package/dist/core/swappable-deps.js +61 -1
- package/dist/core/synthetic-read-verdict.d.ts +23 -0
- package/dist/core/synthetic-read-verdict.js +43 -18
- package/dist/core/task-event.d.ts +155 -60
- package/dist/core/task-intake.d.ts +23 -5
- package/dist/core/task-intake.js +33 -3
- package/dist/core/task-limits.d.ts +3 -1
- package/dist/core/task-notification.d.ts +171 -59
- package/dist/core/task-notification.js +162 -104
- package/dist/core/task-registry-agent.d.ts +12 -0
- package/dist/core/task-registry-agent.js +23 -9
- package/dist/core/task-registry-shared.d.ts +4 -2
- package/dist/core/task-registry-shared.js +1 -1
- package/dist/core/task-registry-workflow.js +8 -5
- package/dist/core/task-registry.d.ts +16 -1
- package/dist/core/task-registry.js +35 -23
- package/dist/core/task-result.d.ts +166 -10
- package/dist/core/task-spec-members.d.ts +8 -2
- package/dist/core/task-spec-members.js +11 -7
- package/dist/core/task-spec.d.ts +68 -32
- package/dist/core/task-start-judge.d.ts +41 -0
- package/dist/core/task-start-judge.js +26 -0
- package/dist/core/task-stream.d.ts +12 -1
- package/dist/core/terminal-cause.d.ts +23 -9
- package/dist/core/tool-catalog-entries.js +6 -5
- package/dist/core/tool-face-lists.d.ts +3 -2
- package/dist/core/tool-face-lists.js +6 -0
- package/dist/core/tool-face-reader.d.ts +3 -2
- package/dist/core/tool-face-reader.js +2 -2
- package/dist/core/tool-face.d.ts +27 -3
- package/dist/core/tool-face.js +2 -2
- package/dist/core/tool-model-gate.js +14 -13
- package/dist/core/tool-mount-facts.d.ts +16 -3
- package/dist/core/tool-mount-facts.js +10 -0
- package/dist/core/tool-mount-plan.d.ts +79 -10
- package/dist/core/tool-mount-plan.js +79 -24
- package/dist/core/tool-mount-static.d.ts +52 -6
- package/dist/core/tool-mount-static.js +82 -28
- package/dist/core/tool-name-aliases.js +1 -1
- package/dist/core/tool-policy.d.ts +55 -26
- package/dist/core/tool-policy.js +50 -36
- package/dist/core/tool-registry.d.ts +12 -2
- package/dist/core/tool-registry.js +9 -2
- package/dist/core/tool-result-budget.d.ts +2 -2
- package/dist/core/tool-result-bytes.d.ts +28 -9
- package/dist/core/tool-result-bytes.js +7 -5
- package/dist/core/tool-result-store.d.ts +310 -38
- package/dist/core/tool-result-store.js +325 -30
- package/dist/core/tool-roster.d.ts +41 -15
- package/dist/core/tool-roster.js +50 -12
- package/dist/core/tool-search-setting.js +2 -2
- package/dist/core/tool-spec-members.js +1 -1
- package/dist/core/tool-spec.d.ts +37 -10
- package/dist/core/tools.js +1 -0
- package/dist/core/trace.d.ts +42 -19
- package/dist/core/types.d.ts +5 -5
- package/dist/core/types.js +2 -2
- package/dist/core/unc-spelling.d.ts +145 -3
- package/dist/core/unc-spelling.js +161 -0
- package/dist/core/untrusted-egress.d.ts +82 -10
- package/dist/core/untrusted-egress.js +102 -9
- package/dist/core/untrusted-text.d.ts +28 -0
- package/dist/core/untrusted-text.js +67 -3
- package/dist/core/user-attachment.d.ts +18 -3
- package/dist/core/user-attachment.js +37 -31
- package/dist/core/user-row-origin.d.ts +22 -0
- package/dist/core/user-row-origin.js +15 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +2 -12
- package/dist/core/wiring-manifest.d.ts +151 -30
- package/dist/core/wiring-manifest.js +69 -17
- package/dist/core/workflow-journal-store.d.ts +186 -16
- package/dist/core/workflow-journal-store.js +156 -1
- package/dist/core/workflow-run-store-contract.js +104 -1
- package/dist/core/workflow-run-store.d.ts +44 -4
- package/dist/core/workflow-run-store.js +9 -2
- package/dist/core/workspace-snapshot.d.ts +4 -1
- package/dist/core/workspace-snapshot.js +1 -1
- package/dist/core/write-protect.d.ts +4 -0
- package/dist/core/write-protect.js +17 -15
- package/dist/engine/compaction/compaction.d.ts +51 -101
- package/dist/engine/compaction/compaction.js +142 -224
- package/dist/engine/compaction/utils.d.ts +2 -11
- package/dist/engine/compaction/utils.js +4 -13
- package/dist/engine/execution-env/node-execution-env.d.ts +14 -6
- package/dist/engine/execution-env/node-execution-env.js +66 -20
- package/dist/engine/harness/agent-harness.d.ts +36 -12
- package/dist/engine/harness/agent-harness.js +84 -23
- package/dist/engine/harness/types.d.ts +36 -9
- package/dist/engine/harness/types.js +14 -1
- package/dist/engine/llm/tool-turns.d.ts +19 -2
- package/dist/engine/llm/tool-turns.js +29 -2
- package/dist/engine/llm/types.d.ts +103 -22
- package/dist/engine/llm/types.js +1 -1
- package/dist/engine/loop/agent-loop.d.ts +32 -10
- package/dist/engine/loop/agent-loop.js +144 -33
- package/dist/engine/loop/types.d.ts +21 -7
- package/dist/engine/lsp/node-lsp-manager.d.ts +6 -4
- package/dist/engine/lsp/node-lsp-manager.js +22 -21
- package/dist/engine/session/import-validate.js +2 -0
- package/dist/engine/session/repo-utils.d.ts +13 -7
- package/dist/engine/session/repo-utils.js +9 -4
- package/dist/index.d.ts +55 -31
- package/dist/index.js +44 -24
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/internal/harness.d.ts +2 -2
- package/dist/internal/harness.js +1 -1
- package/dist/internal/llm.d.ts +2 -2
- package/dist/internal/llm.js +1 -1
- package/dist/orchestration/goal.js +1 -1
- package/dist/orchestration/governance-baseline-validity.d.ts +20 -5
- package/dist/orchestration/governance-baseline-validity.js +87 -16
- package/dist/orchestration/run-spec.js +7 -2
- package/dist/orchestration/run-workflow-tool.d.ts +15 -12
- package/dist/orchestration/run-workflow-tool.js +759 -331
- package/dist/orchestration/workflow-governance.d.ts +1 -1
- package/dist/orchestration/workflow-observe.d.ts +22 -2
- package/dist/orchestration/workflow-observe.js +20 -9
- package/dist/orchestration/workflow-park-adoption.d.ts +438 -0
- package/dist/orchestration/workflow-park-adoption.js +767 -0
- package/dist/orchestration/workflow-size-guideline.d.ts +6 -8
- package/dist/orchestration/workflow-size-guideline.js +12 -14
- package/dist/orchestration/workflow-types.d.ts +117 -17
- package/dist/orchestration/workflow-types.js +40 -8
- package/dist/orchestration/workflow.d.ts +71 -26
- package/dist/orchestration/workflow.js +503 -201
- package/dist/prompt-assembly/artifact.js +4 -3
- package/dist/prompt-assembly/assemble.d.ts +2 -0
- package/dist/prompt-assembly/assemble.js +4 -1
- package/dist/prompt-assembly/bands.d.ts +3 -0
- package/dist/prompt-assembly/bands.js +6 -0
- package/dist/prompt-assembly/catalog/constitution.d.ts +1 -1
- package/dist/prompt-assembly/catalog/constitution.js +74 -9
- package/dist/prompt-assembly/catalog/core-behavior.d.ts +5 -4
- package/dist/prompt-assembly/catalog/core-behavior.js +52 -9
- package/dist/prompt-assembly/catalog/engine.d.ts +110 -5
- package/dist/prompt-assembly/catalog/engine.js +13 -0
- package/dist/prompt-assembly/catalog/events.d.ts +860 -0
- package/dist/prompt-assembly/catalog/events.js +62 -0
- package/dist/prompt-assembly/catalog/index.js +2 -1
- package/dist/prompt-assembly/catalog/locales/index.d.ts +2 -2
- package/dist/prompt-assembly/catalog/locales/index.js +4 -2
- package/dist/prompt-assembly/catalog/locales/zh-Hans/constitution.js +53 -1
- package/dist/prompt-assembly/catalog/locales/zh-Hans/core-behavior.js +51 -9
- package/dist/prompt-assembly/catalog/locales/zh-Hans/engine.js +12 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/events.d.ts +7 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/events.js +57 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/mechanism.d.ts +8 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/mechanism.js +57 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/modes.js +8 -2
- package/dist/prompt-assembly/catalog/locales/zh-Hans/role.js +37 -9
- package/dist/prompt-assembly/catalog/mechanism.d.ts +435 -0
- package/dist/prompt-assembly/catalog/mechanism.js +63 -0
- package/dist/prompt-assembly/catalog/memory.d.ts +3 -3
- package/dist/prompt-assembly/catalog/memory.js +12 -3
- package/dist/prompt-assembly/catalog/modes.d.ts +2 -2
- package/dist/prompt-assembly/catalog/modes.js +7 -1
- package/dist/prompt-assembly/catalog/role.d.ts +1 -1
- package/dist/prompt-assembly/catalog/role.js +43 -14
- package/dist/prompt-assembly/catalog/schema.d.ts +43 -20
- package/dist/prompt-assembly/catalog/schema.js +18 -6
- package/dist/prompt-assembly/catalog/sections.d.ts +1 -1
- package/dist/prompt-assembly/catalog/sections.js +28 -12
- package/dist/prompt-assembly/composer.d.ts +3 -0
- package/dist/prompt-assembly/composer.js +11 -5
- package/dist/prompt-assembly/engine-text.d.ts +14 -4
- package/dist/prompt-assembly/engine-text.js +18 -9
- package/dist/prompt-assembly/event-registry.d.ts +38 -31
- package/dist/prompt-assembly/event-registry.js +186 -25
- package/dist/prompt-assembly/explain.d.ts +24 -0
- package/dist/prompt-assembly/explain.js +11 -0
- package/dist/prompt-assembly/locale-review.js +3 -2
- package/dist/prompt-assembly/overlay.d.ts +25 -7
- package/dist/prompt-assembly/overlay.js +68 -14
- package/dist/prompt-assembly/select.d.ts +4 -3
- package/dist/prompt-assembly/select.js +11 -2
- package/dist/prompt-assembly/sugar.d.ts +3 -2
- package/dist/prompt-assembly/sugar.js +2 -2
- package/dist/prompt-assembly/tool-catalog.js +3 -2
- package/dist/prompt-assembly/turn-snapshot.d.ts +15 -27
- package/dist/prompt-assembly/turn-snapshot.js +7 -18
- package/dist/prompt-assembly/types.d.ts +6 -4
- package/dist/prompts/default.d.ts +15 -45
- package/dist/prompts/default.js +7 -21
- package/dist/shell/lex.d.ts +51 -10
- package/dist/shell/lex.js +223 -31
- package/dist/stores/file/adoption/adopt.d.ts +13 -3
- package/dist/stores/file/adoption/adopt.js +90 -95
- package/dist/stores/file/adoption/marker.d.ts +2 -1
- package/dist/stores/file/background-agent-store.d.ts +61 -0
- package/dist/stores/file/background-agent-store.js +64 -15
- package/dist/stores/file/checkpoint-store.d.ts +30 -2
- package/dist/stores/file/checkpoint-store.js +72 -23
- package/dist/stores/file/file-history-store.d.ts +13 -7
- package/dist/stores/file/file-history-store.js +170 -46
- package/dist/stores/file/fs-atomic.d.ts +57 -2
- package/dist/stores/file/fs-atomic.js +116 -48
- package/dist/stores/file/index.d.ts +2 -0
- package/dist/stores/file/index.js +2 -0
- package/dist/stores/file/ledger-damage.d.ts +87 -0
- package/dist/stores/file/ledger-damage.js +103 -0
- package/dist/stores/file/session-policy-store.d.ts +36 -4
- package/dist/stores/file/session-policy-store.js +177 -6
- package/dist/stores/file/shared-ledger.d.ts +123 -11
- package/dist/stores/file/shared-ledger.js +113 -18
- package/dist/stores/file/tool-result-store.d.ts +30 -1
- package/dist/stores/file/tool-result-store.js +60 -6
- package/dist/stores/file/workflow-journal-store.d.ts +73 -26
- package/dist/stores/file/workflow-journal-store.js +195 -32
- package/dist/stores/file/workflow-run-store.d.ts +47 -2
- package/dist/stores/file/workflow-run-store.js +17 -14
- package/dist/tools/artifact/artifact-tool.d.ts +9 -6
- package/dist/tools/artifact/artifact-tool.js +76 -40
- package/dist/tools/fs/bash-program-position.js +2 -6
- package/dist/tools/fs/bash-readonly-classifier.d.ts +18 -3
- package/dist/tools/fs/bash-readonly-classifier.js +12 -6
- package/dist/tools/fs/containment-face.d.ts +12 -3
- package/dist/tools/fs/containment-face.js +16 -7
- package/dist/tools/fs/env-error-detail.d.ts +11 -0
- package/dist/tools/fs/env-error-detail.js +13 -2
- package/dist/tools/fs/file-read-check.d.ts +26 -1
- package/dist/tools/fs/file-read-check.js +20 -2
- package/dist/tools/fs/fs-bash.js +30 -21
- package/dist/tools/fs/fs-pdf.d.ts +1 -1
- package/dist/tools/fs/fs-pdf.js +2 -2
- package/dist/tools/fs/fs-read.d.ts +3 -0
- package/dist/tools/fs/fs-read.js +6 -6
- package/dist/tools/fs/fs-search-tools.d.ts +2 -2
- package/dist/tools/fs/fs-search-tools.js +4 -4
- package/dist/tools/fs/fs-shared.d.ts +26 -9
- package/dist/tools/fs/fs-shared.js +12 -6
- package/dist/tools/fs/fs-write.d.ts +6 -4
- package/dist/tools/fs/fs-write.js +24 -18
- package/dist/tools/fs/index.js +5 -3
- package/dist/tools/fs/pattern-kill-guard.js +2 -1
- package/dist/tools/fs/pdf.d.ts +8 -0
- package/dist/tools/fs/pdf.js +22 -4
- package/dist/tools/fs/program-read-model.d.ts +4 -0
- package/dist/tools/fs/program-read-model.rows.js +3 -3
- package/dist/tools/fs/read-deny-home.d.ts +13 -2
- package/dist/tools/fs/read-deny-home.js +26 -22
- package/dist/tools/fs/read-deny.js +15 -6
- package/dist/tools/fs/read-floor.d.ts +11 -9
- package/dist/tools/fs/read-floor.js +7 -10
- package/dist/tools/fs/removal-targets.d.ts +33 -17
- package/dist/tools/fs/removal-targets.js +176 -59
- package/dist/tools/fs/repo-map.d.ts +1 -1
- package/dist/tools/fs/repo-map.js +2 -2
- package/dist/tools/fs/safety.d.ts +34 -108
- package/dist/tools/fs/safety.js +49 -124
- package/dist/tools/fs/shell-read-bindings.d.ts +8 -2
- package/dist/tools/fs/shell-read-bindings.js +25 -6
- package/dist/tools/fs/shell-read-check.d.ts +7 -2
- package/dist/tools/fs/shell-read-check.js +28 -6
- package/dist/tools/fs/shell-read-environment.d.ts +10 -2
- package/dist/tools/fs/shell-read-environment.js +20 -11
- package/dist/tools/fs/shell-read-establish.js +73 -43
- package/dist/tools/fs/shell-read-judge.d.ts +51 -21
- package/dist/tools/fs/shell-read-judge.js +22 -8
- package/dist/tools/fs/shell-read-object-path.d.ts +5 -1
- package/dist/tools/fs/shell-read-object-path.js +17 -4
- package/dist/tools/fs/shell-read-plan.d.ts +3 -3
- package/dist/tools/fs/shell-read-plan.js +23 -19
- package/dist/tools/fs/shell-read-sourced.js +10 -3
- package/dist/tools/fs/shell-read-start.d.ts +4 -2
- package/dist/tools/fs/shell-read-start.js +3 -3
- package/dist/tools/fs/shell-read-workdir.d.ts +14 -6
- package/dist/tools/fs/shell-read-workdir.js +35 -17
- package/dist/tools/fs/shell-reentry-text.d.ts +8 -0
- package/dist/tools/fs/shell-reentry-text.js +56 -0
- package/dist/tools/monitor.js +7 -5
- package/dist/tools/scheduler-tools.d.ts +44 -16
- package/dist/tools/scheduler-tools.js +87 -114
- package/dist/tools/task-list.d.ts +12 -4
- package/dist/tools/task-list.js +10 -7
- package/dist/tools/web.d.ts +2 -8
- package/dist/tools/web.js +5 -5
- package/dist/tools/worktree.js +23 -19
- package/package.json +7 -3
- package/test/export-surface.snapshot.json +390 -14
- package/wire-changes/{core-stores-sql@7.68.7.json → core-stores-sql@7.69.0.json} +5 -5
- package/wire-changes/core-stores-sql@7.69.1.json +39 -0
- package/wire-changes/core@7.69.0.json +9561 -0
- package/wire-changes/core@7.69.1.json +2561 -0
- package/wire-changes/mods-kernel@7.69.0.json +80 -0
- package/wire-changes/{mods-kernel@7.68.7.json → mods-kernel@7.69.1.json} +5 -5
- package/wire-changes/primitives@7.69.0.json +79 -0
- package/wire-changes/{primitives@7.68.7.json → primitives@7.69.1.json} +5 -5
- package/wire-changes/{wiki-gate@7.68.7.json → wiki-gate@7.69.0.json} +5 -5
- package/wire-changes/wiki-gate@7.69.1.json +39 -0
- package/dist/core/runner/prompt-hash-salt.d.ts +0 -1
- package/dist/core/runner/prompt-hash-salt.js +0 -2
- package/wire-changes/core@7.68.7.json +0 -140
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
1
2
|
import { describeRejectedValue } from "../core/tool-search-setting.js";
|
|
2
3
|
import { createHash } from "node:crypto";
|
|
3
4
|
import { BrainError } from "./errors.js";
|
|
@@ -8,6 +9,8 @@ import { deliverEngineNotice } from "../core/engine-notice.js";
|
|
|
8
9
|
import { uuidv7 } from "../engine/session/uuid.js";
|
|
9
10
|
import { CREDENTIAL_VOCABULARY, REDACTION_MARKS, isRedactionMark } from "@sema-agent/primitives";
|
|
10
11
|
import { PROTOCOL_PLAINTEXT_CREDENTIALS_CODE, crossesNetworkInClear } from "../core/protocol-http-auth.js";
|
|
12
|
+
import { thrownText } from "../core/thrown-value.js";
|
|
13
|
+
import { headerBagOnce } from "./request-params.js";
|
|
11
14
|
const REDACTED_VALUE = REDACTION_MARKS.bare;
|
|
12
15
|
const REDACTED_USERINFO = REDACTION_MARKS.userinfo;
|
|
13
16
|
function servableParse(raw) {
|
|
@@ -215,6 +218,11 @@ function routeOriginOf(rootKey) {
|
|
|
215
218
|
const u = servableParse(rootKey);
|
|
216
219
|
return u === undefined ? rootKey : `${u.protocol}//${u.host}`;
|
|
217
220
|
}
|
|
221
|
+
function declaredOriginOf(raw) {
|
|
222
|
+
if (typeof raw !== "string")
|
|
223
|
+
throw new TypeError(`route pairing: credentialOrigin must be a string (got ${typeof raw})`);
|
|
224
|
+
return routeOriginOf(routeKeyOf(raw));
|
|
225
|
+
}
|
|
218
226
|
const CREDENTIAL_ORIGIN_BINDINGS_MAX = 16_384;
|
|
219
227
|
const CREDENTIAL_ORIGIN_TABLE = Symbol.for("sema.core.credentialOriginTable");
|
|
220
228
|
function credentialOriginTable() {
|
|
@@ -254,10 +262,27 @@ function perModelCredential(base, apiKey, bag, conflict) {
|
|
|
254
262
|
}));
|
|
255
263
|
return proof;
|
|
256
264
|
}
|
|
265
|
+
function withAnswerOrigin(credential, answerOrigin, answered) {
|
|
266
|
+
return withAnswerFact(credential, () => ({ answerOrigin, ...(answered ? { identitiesAnswered: true } : {}) }));
|
|
267
|
+
}
|
|
268
|
+
function withOriginUnsettled(credential, answered) {
|
|
269
|
+
return withAnswerFact(credential, (base) => ({ originUnsettled: Object.freeze({ own: answered ? base.identities : Object.freeze([]) }) }));
|
|
270
|
+
}
|
|
271
|
+
function withAnswerFact(credential, fact) {
|
|
272
|
+
const facts = resolvedCredentialFacts.get(credential);
|
|
273
|
+
const proof = facts !== undefined ? credential : Object.freeze({ ...credential });
|
|
274
|
+
const base = facts ?? { identities: Object.freeze([]), headers: Object.freeze({}) };
|
|
275
|
+
resolvedCredentialFacts.set(proof, Object.freeze({ ...base, ...fact(base) }));
|
|
276
|
+
return proof;
|
|
277
|
+
}
|
|
257
278
|
function boundElsewhere(identities, requestOrigin) {
|
|
258
279
|
const table = credentialOriginTable();
|
|
259
280
|
return identities.map((id) => table.get(id)).find((bound) => bound !== undefined && bound !== requestOrigin);
|
|
260
281
|
}
|
|
282
|
+
function boundHere(identities, requestOrigin) {
|
|
283
|
+
const table = credentialOriginTable();
|
|
284
|
+
return requestOrigin !== "" && identities.length > 0 && identities.every((id) => table.get(id) === requestOrigin);
|
|
285
|
+
}
|
|
261
286
|
function bindCredentialOrigin(identities, requestOrigin) {
|
|
262
287
|
const table = credentialOriginTable();
|
|
263
288
|
for (const id of identities) {
|
|
@@ -287,6 +312,13 @@ function keyHeaderConflict(apiKey, headers, keyHeader) {
|
|
|
287
312
|
return written === undefined ? undefined : { header: written, keyHeader };
|
|
288
313
|
}
|
|
289
314
|
export function resolveRouteCredential(input) {
|
|
315
|
+
const answerOrigin = input.optionsCredentialOrigin === undefined ? undefined : declaredOriginOf(input.optionsCredentialOrigin);
|
|
316
|
+
const { credential, answered } = resolveCredentialSource(input);
|
|
317
|
+
if (answerOrigin !== undefined)
|
|
318
|
+
return withAnswerOrigin(credential, answerOrigin, answered);
|
|
319
|
+
return input.optionsCredentialOriginUnsettled === true ? withOriginUnsettled(credential, answered) : credential;
|
|
320
|
+
}
|
|
321
|
+
function resolveCredentialSource(input) {
|
|
290
322
|
const { optionsApiKey, optionsHeaders, modelHeaders, configApiKey, configHeaders, keyHeader } = input;
|
|
291
323
|
holdOwnCredentialValues(credentialHeaderValues(modelHeaders));
|
|
292
324
|
const answerHeadersBorne = hasAuthCarrier(optionsHeaders);
|
|
@@ -294,8 +326,14 @@ export function resolveRouteCredential(input) {
|
|
|
294
326
|
if (optionsApiKey !== undefined && typeof optionsApiKey !== "string")
|
|
295
327
|
throw new TypeError(`route pairing: apiKey must be a string (got ${typeof optionsApiKey})`);
|
|
296
328
|
const key = keyCarriedBy(optionsApiKey);
|
|
297
|
-
return
|
|
329
|
+
return {
|
|
330
|
+
answered: true,
|
|
331
|
+
credential: perModelCredential({ source: "per-model", ...(key !== undefined ? { apiKey: key } : {}) }, key, answerHeadersBorne ? { from: "options", headers: optionsHeaders } : undefined, keyHeaderConflict(key, optionsHeaders, keyHeader)),
|
|
332
|
+
};
|
|
298
333
|
}
|
|
334
|
+
return { answered: false, credential: resolveFallbackSource(modelHeaders, configApiKey, configHeaders) };
|
|
335
|
+
}
|
|
336
|
+
function resolveFallbackSource(modelHeaders, configApiKey, configHeaders) {
|
|
299
337
|
if (hasAuthCarrier(modelHeaders))
|
|
300
338
|
return perModelCredential({ source: "per-model" }, undefined, { from: "model", headers: modelHeaders });
|
|
301
339
|
const configHeadersBorne = hasAuthCarrier(configHeaders);
|
|
@@ -337,14 +375,57 @@ function plaintextRefusal(model, credential, request, shown) {
|
|
|
337
375
|
},
|
|
338
376
|
};
|
|
339
377
|
}
|
|
378
|
+
function originMismatch(model, boundOrigin, requestOrigin, shown, boundBy) {
|
|
379
|
+
const boundShown = displayUrlOf(boundOrigin);
|
|
380
|
+
const requestOriginShown = displayUrlOf(requestOrigin);
|
|
381
|
+
const fixHint = boundBy === "generation"
|
|
382
|
+
? `model "${model.id}" targets ${shown.request} (origin ${requestOriginShown}) but the host's per-model auth answer names no ` +
|
|
383
|
+
`origin (credentialOrigin), the seat it came from was handed in before a model catalog swap, and the entry this request carries ` +
|
|
384
|
+
`is not, member for member, an entry of both the catalog the seat was handed in under and the one in force now, and the ` +
|
|
385
|
+
`answer's credential is not bound at ${requestOriginShown}: name credentialOrigin in the answer (the ` +
|
|
386
|
+
`origin of the entry its key was read for), or start the run again (a new run takes the seat under the catalog in force)`
|
|
387
|
+
: boundBy === "declaration"
|
|
388
|
+
? `model "${model.id}" targets ${shown.request} (origin ${requestOriginShown}) but the host's per-model auth answer named ` +
|
|
389
|
+
`${boundShown} as the origin it is handed out for (credentialOrigin), and a request carrying that answer goes there or ` +
|
|
390
|
+
`nowhere: if the answer's key was read for this entry, spell credentialOrigin as the entry spells its baseUrl (another ` +
|
|
391
|
+
`scheme, port, trailing dot or host name for the same machine is another origin); a seat that reads its key by name ` +
|
|
392
|
+
`names the origin of the entry the key was read for, never the baseUrl of the entry it is handed (echoing it declares nothing)`
|
|
393
|
+
: `model "${model.id}" targets ${shown.request} (origin ${requestOriginShown}) but its own credential is bound to ${boundShown}, ` +
|
|
394
|
+
`where it was first sent, where an earlier answer named it, or where the host rebound it — a credential ` +
|
|
395
|
+
`does not follow its entry to another host: change ` +
|
|
396
|
+
`the entry's credential reference in the same step as its baseUrl (a new credential is a new binding), or point the entry ` +
|
|
397
|
+
`back at ${boundShown}; ` +
|
|
398
|
+
`if the endpoint takes no credential, ${KEYLESS_EXIT}; ` +
|
|
399
|
+
`a provider that only moved domains and accepts the same credential there needs the host's ` +
|
|
400
|
+
`explicit rebind (rebindCredentialOrigin) where the host offers one, otherwise an engine restart`;
|
|
401
|
+
return {
|
|
402
|
+
ok: false,
|
|
403
|
+
code: "route.credential_origin_mismatch",
|
|
404
|
+
detail: {
|
|
405
|
+
modelId: model.id,
|
|
406
|
+
entryBaseUrl: shown.entry,
|
|
407
|
+
requestBaseUrl: shown.request,
|
|
408
|
+
configBaseUrl: shown.declared,
|
|
409
|
+
boundOrigin: boundShown,
|
|
410
|
+
requestOrigin: requestOriginShown,
|
|
411
|
+
boundBy,
|
|
412
|
+
fixHint,
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
}
|
|
340
416
|
export function adjudicateModelRoute(model, credential, config) {
|
|
341
417
|
const { entry, declared, deploymentRoot, request } = routeHalves(model, config);
|
|
342
418
|
const entryShown = displayUrlOf(entry);
|
|
343
419
|
const declaredShown = displayUrlOf(declared);
|
|
344
420
|
const requestShown = displayUrlOf(request);
|
|
345
421
|
const shown = { entry: entryShown, request: requestShown, declared: declaredShown };
|
|
422
|
+
const facts = resolvedCredentialFacts.get(credential);
|
|
423
|
+
const requestOrigin = routeOriginOf(request);
|
|
424
|
+
if (facts?.answerOrigin !== undefined && facts.answerOrigin !== requestOrigin)
|
|
425
|
+
return originMismatch(model, facts.answerOrigin, requestOrigin, shown, "declaration");
|
|
426
|
+
const unsettled = facts?.originUnsettled;
|
|
427
|
+
const unsettledRefusal = () => unsettled === undefined || boundHere(unsettled.own, requestOrigin) ? undefined : originMismatch(model, "", requestOrigin, shown, "generation");
|
|
346
428
|
if (credential.source === "per-model") {
|
|
347
|
-
const facts = resolvedCredentialFacts.get(credential);
|
|
348
429
|
const conflict = facts?.keyHeaderConflict;
|
|
349
430
|
if (conflict !== undefined) {
|
|
350
431
|
return {
|
|
@@ -364,34 +445,14 @@ export function adjudicateModelRoute(model, credential, config) {
|
|
|
364
445
|
if (plaintext !== undefined)
|
|
365
446
|
return plaintext;
|
|
366
447
|
const identities = facts?.identities;
|
|
367
|
-
const
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
370
|
-
|
|
371
|
-
if (boundOrigin === undefined)
|
|
372
|
-
return { ok: true, posture: "per-model" };
|
|
373
|
-
const boundShown = displayUrlOf(boundOrigin);
|
|
374
|
-
const requestOriginShown = displayUrlOf(requestOrigin);
|
|
375
|
-
return {
|
|
376
|
-
ok: false,
|
|
377
|
-
code: "route.credential_origin_mismatch",
|
|
378
|
-
detail: {
|
|
379
|
-
modelId: model.id,
|
|
380
|
-
entryBaseUrl: entryShown,
|
|
381
|
-
requestBaseUrl: requestShown,
|
|
382
|
-
configBaseUrl: declaredShown,
|
|
383
|
-
boundOrigin: boundShown,
|
|
384
|
-
requestOrigin: requestOriginShown,
|
|
385
|
-
fixHint: `model "${model.id}" targets ${requestShown} (origin ${requestOriginShown}) but its own credential is bound to ${boundShown}, ` +
|
|
386
|
-
`the origin it was first sent to or the host rebound it to — a credential does not follow its entry to another host: change ` +
|
|
387
|
-
`the entry's credential reference in the same step as its baseUrl (a new credential is a new binding), or point the entry ` +
|
|
388
|
-
`back at ${boundShown}; ` +
|
|
389
|
-
`if the endpoint takes no credential, ${KEYLESS_EXIT}; ` +
|
|
390
|
-
`a provider that only moved domains and accepts the same credential there needs the host's ` +
|
|
391
|
-
`explicit rebind (rebindCredentialOrigin) where the host offers one, otherwise an engine restart`,
|
|
392
|
-
},
|
|
393
|
-
};
|
|
448
|
+
const boundOrigin = identities === undefined || requestOrigin === "" || facts?.identitiesAnswered === true ? undefined : boundElsewhere(identities, requestOrigin);
|
|
449
|
+
if (boundOrigin !== undefined)
|
|
450
|
+
return originMismatch(model, boundOrigin, requestOrigin, shown, "table");
|
|
451
|
+
return unsettledRefusal() ?? { ok: true, posture: "per-model" };
|
|
394
452
|
}
|
|
453
|
+
const unsettledOther = unsettledRefusal();
|
|
454
|
+
if (unsettledOther !== undefined)
|
|
455
|
+
return unsettledOther;
|
|
395
456
|
if (credential.source === "deployment-config") {
|
|
396
457
|
const plaintext = plaintextRefusal(model, credential, request, shown);
|
|
397
458
|
if (plaintext !== undefined)
|
|
@@ -438,15 +499,77 @@ export function routeRefusalText(verdict) {
|
|
|
438
499
|
return `${verdict.code}: ${verdict.detail.fixHint}`;
|
|
439
500
|
}
|
|
440
501
|
export function routeRefusalError(verdict) {
|
|
441
|
-
const
|
|
442
|
-
if (verdict.code === "route.credential_origin_mismatch"
|
|
443
|
-
|
|
502
|
+
const named = (value) => (typeof value === "string" ? value : undefined);
|
|
503
|
+
if (verdict.code === "route.credential_origin_mismatch") {
|
|
504
|
+
const { modelId } = verdict.detail;
|
|
505
|
+
const bound = named(verdict.detail.boundOrigin);
|
|
506
|
+
const request = named(verdict.detail.requestOrigin);
|
|
507
|
+
const boundBy = boundByOf(verdict.detail.boundBy);
|
|
508
|
+
if (bound !== undefined && request !== undefined) {
|
|
509
|
+
reportCredentialRefusal({ code: verdict.code, modelId, boundOrigin: bound, requestOrigin: request, ...(boundBy !== undefined ? { boundBy } : {}) });
|
|
510
|
+
}
|
|
444
511
|
}
|
|
445
512
|
else if (verdict.code === "route.credential_mismatch") {
|
|
446
|
-
|
|
513
|
+
const { modelId } = verdict.detail;
|
|
514
|
+
const requestBaseUrl = named(verdict.detail.requestBaseUrl);
|
|
515
|
+
const configBaseUrl = named(verdict.detail.configBaseUrl);
|
|
516
|
+
reportCredentialRefusal({ code: verdict.code, modelId, ...(requestBaseUrl !== undefined ? { requestBaseUrl } : {}), ...(configBaseUrl !== undefined ? { configBaseUrl } : {}) });
|
|
447
517
|
}
|
|
448
518
|
return new BrainError("invalid_request", routeRefusalText(verdict));
|
|
449
519
|
}
|
|
520
|
+
export const ROUTE_JUDGMENT_FAILED = "route.judgment_failed";
|
|
521
|
+
const REFUSAL_ROOTS = ["entryBaseUrl", "requestBaseUrl", "configBaseUrl", "boundOrigin", "requestOrigin"];
|
|
522
|
+
const BOUND_BY_WORDS = { declaration: true, table: true, generation: true };
|
|
523
|
+
function boundByOf(value) {
|
|
524
|
+
return typeof value === "string" && Object.hasOwn(BOUND_BY_WORDS, value) ? value : undefined;
|
|
525
|
+
}
|
|
526
|
+
export function readRouteJudgment(ask, modelId) {
|
|
527
|
+
const failed = (how) => ({ code: ROUTE_JUDGMENT_FAILED, fixHint: `the deployment Brain's route judgment for "${modelId}" ${how}` });
|
|
528
|
+
let answer;
|
|
529
|
+
try {
|
|
530
|
+
answer = ask();
|
|
531
|
+
}
|
|
532
|
+
catch (e) {
|
|
533
|
+
return failed(`threw before anything was sent: ${thrownText(e)}`);
|
|
534
|
+
}
|
|
535
|
+
if (answer === undefined)
|
|
536
|
+
return undefined;
|
|
537
|
+
try {
|
|
538
|
+
const ok = typeof answer === "object" && answer !== null ? answer.ok : undefined;
|
|
539
|
+
if (ok === true)
|
|
540
|
+
return undefined;
|
|
541
|
+
if (ok !== false) {
|
|
542
|
+
const then = typeof answer === "object" && answer !== null ? answer.then : undefined;
|
|
543
|
+
if (typeof then === "function") {
|
|
544
|
+
Promise.resolve(answer).catch(() => undefined);
|
|
545
|
+
return failed("answered a Promise — a route judgment must answer synchronously (a verdict, or undefined for no judgment); nothing was sent");
|
|
546
|
+
}
|
|
547
|
+
return failed(`answered ${describeRejectedValue(answer)}${ok === undefined ? "" : ` whose ok is ${describeRejectedValue(ok)}`} — not a verdict (ok true or false) nor undefined; nothing was sent`);
|
|
548
|
+
}
|
|
549
|
+
const code = answer.code;
|
|
550
|
+
const detail = answer.detail;
|
|
551
|
+
const member = (key) => (typeof detail === "object" && detail !== null ? detail[key] : undefined);
|
|
552
|
+
const fixHint = member("fixHint");
|
|
553
|
+
if (typeof code !== "string" || typeof fixHint !== "string") {
|
|
554
|
+
return { ...(typeof code === "string" ? { code } : {}), ...(typeof fixHint === "string" ? { fixHint } : {}) };
|
|
555
|
+
}
|
|
556
|
+
const named = member("modelId");
|
|
557
|
+
const roots = Object.fromEntries(REFUSAL_ROOTS.flatMap((k) => {
|
|
558
|
+
const v = member(k);
|
|
559
|
+
return typeof v === "string" ? [[k, v]] : [];
|
|
560
|
+
}));
|
|
561
|
+
const boundBy = boundByOf(member("boundBy"));
|
|
562
|
+
const verdict = {
|
|
563
|
+
ok: false,
|
|
564
|
+
code,
|
|
565
|
+
detail: { modelId: typeof named === "string" ? named : modelId, ...roots, ...(boundBy !== undefined ? { boundBy } : {}), fixHint },
|
|
566
|
+
};
|
|
567
|
+
return { code, fixHint, verdict };
|
|
568
|
+
}
|
|
569
|
+
catch (e) {
|
|
570
|
+
return failed(`answered a verdict whose members would not read: ${thrownText(e)}`);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
450
573
|
export function admitRouteRequest(model, credential, config) {
|
|
451
574
|
const judged = { id: model.id, baseUrl: model.baseUrl };
|
|
452
575
|
const { baseUrl, laneDefault } = config;
|
|
@@ -552,6 +675,8 @@ export function createBrainRouteJudge(config) {
|
|
|
552
675
|
configApiKey: config.apiKey,
|
|
553
676
|
configHeaders: config.headers,
|
|
554
677
|
keyHeader: config.keyHeader,
|
|
678
|
+
...(perModelAuth?.credentialOrigin !== undefined ? { optionsCredentialOrigin: perModelAuth.credentialOrigin } : {}),
|
|
679
|
+
...(perModelAuth?.credentialOriginUnsettled === true ? { optionsCredentialOriginUnsettled: true } : {}),
|
|
555
680
|
});
|
|
556
681
|
return adjudicateModelRoute(model, credential, { baseUrl: config.baseUrl, laneDefault: config.laneDefault });
|
|
557
682
|
};
|
|
@@ -562,6 +687,7 @@ const BROKEN_PAIRING_STATUS = {
|
|
|
562
687
|
"route.credential_origin_mismatch": "broken:credential_origin_mismatch",
|
|
563
688
|
"route.credential_answer_conflict": "broken:credential_answer_conflict",
|
|
564
689
|
"config.protocol_plaintext_credentials": "broken:protocol_plaintext_credentials",
|
|
690
|
+
"route.model_unavailable": "broken:model_unavailable",
|
|
565
691
|
};
|
|
566
692
|
export function routePairingStatus(brain, model, perModelAuth) {
|
|
567
693
|
const verdict = brain.adjudicateRoute?.(model, perModelAuth);
|
|
@@ -572,6 +698,48 @@ export function routePairingStatus(brain, model, perModelAuth) {
|
|
|
572
698
|
return BROKEN_PAIRING_STATUS[verdict.code];
|
|
573
699
|
}
|
|
574
700
|
export const DERIVED_ROUTE_PREFLIGHT_HOOK_BOUND_MS = 5_000;
|
|
701
|
+
export async function askPerModelAuth(seat, model, receiver) {
|
|
702
|
+
if (seat === undefined || seat === null)
|
|
703
|
+
return undefined;
|
|
704
|
+
const ask = { unsettled: false };
|
|
705
|
+
const answer = await SEAT_ASK.run(ask, () => Reflect.apply(seat, receiver, [model]));
|
|
706
|
+
if (answer === undefined || answer === null)
|
|
707
|
+
return undefined;
|
|
708
|
+
const { apiKey, headers: given, credentialOrigin } = answer;
|
|
709
|
+
const headers = given === undefined ? undefined : Object.freeze(headerBagOnce(given));
|
|
710
|
+
const carries = (typeof apiKey === "string" && keyCarriedBy(apiKey) !== undefined) || headers !== undefined;
|
|
711
|
+
const unsettled = credentialOrigin === undefined && carries && ask.unsettled;
|
|
712
|
+
return {
|
|
713
|
+
...(apiKey !== undefined ? { apiKey } : {}),
|
|
714
|
+
...(headers !== undefined ? { headers } : {}),
|
|
715
|
+
...(credentialOrigin !== undefined ? { credentialOrigin: servableCredentialOrigin(credentialOrigin, model.id) } : {}),
|
|
716
|
+
...(unsettled ? { credentialOriginUnsettled: true } : {}),
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
const SEAT_ASK = new AsyncLocalStorage();
|
|
720
|
+
export function seatAskMarker() {
|
|
721
|
+
const ask = SEAT_ASK.getStore();
|
|
722
|
+
return ask === undefined ? undefined : () => void (ask.unsettled = true);
|
|
723
|
+
}
|
|
724
|
+
export class PerModelAuthRefusal extends Error {
|
|
725
|
+
code = "config.invalid_argument";
|
|
726
|
+
}
|
|
727
|
+
function servableCredentialOrigin(value, modelId) {
|
|
728
|
+
const refused = (why) => new PerModelAuthRefusal(`per-model auth for model "${modelId}": credentialOrigin ${why} — the answer is refused and nothing is sent; name the ` +
|
|
729
|
+
`http(s) origin the credential is handed out for (an entry's baseUrl may be given as it is), or leave the member out`);
|
|
730
|
+
if (typeof value !== "string" || value.trim() === "")
|
|
731
|
+
throw refused(`must be a non-empty string (got ${describeRejectedValue(value)})`);
|
|
732
|
+
let judged;
|
|
733
|
+
try {
|
|
734
|
+
judged = judgeRequestRoot(value, "credentialOrigin");
|
|
735
|
+
}
|
|
736
|
+
catch (e) {
|
|
737
|
+
throw refused(`is not a servable origin (${e instanceof Error ? e.message.replace(/^\[[a-z_]+\] /, "") : "refused"})`);
|
|
738
|
+
}
|
|
739
|
+
if (judged === undefined)
|
|
740
|
+
throw refused("is empty");
|
|
741
|
+
return declaredOriginOf(judged.trimmed);
|
|
742
|
+
}
|
|
575
743
|
export async function adjudicateDerivedRoute(args) {
|
|
576
744
|
const judge = args.brain.adjudicateRoute;
|
|
577
745
|
if (judge === undefined)
|
|
@@ -584,7 +752,7 @@ export async function adjudicateDerivedRoute(args) {
|
|
|
584
752
|
const bound = new Promise((resolve) => {
|
|
585
753
|
timer = setTimeout(() => resolve(ABSTAIN), DERIVED_ROUTE_PREFLIGHT_HOOK_BOUND_MS);
|
|
586
754
|
});
|
|
587
|
-
const hookResult =
|
|
755
|
+
const hookResult = askPerModelAuth(args.getApiKeyAndHeaders, args.model, args);
|
|
588
756
|
hookResult.catch(() => { });
|
|
589
757
|
const raced = await Promise.race([hookResult, bound]);
|
|
590
758
|
if (raced === ABSTAIN)
|
|
@@ -599,12 +767,7 @@ export async function adjudicateDerivedRoute(args) {
|
|
|
599
767
|
clearTimeout(timer);
|
|
600
768
|
}
|
|
601
769
|
}
|
|
602
|
-
|
|
603
|
-
return judge(args.model, auth);
|
|
604
|
-
}
|
|
605
|
-
catch {
|
|
606
|
-
return undefined;
|
|
607
|
-
}
|
|
770
|
+
return readRouteJudgment(() => judge(args.model, auth), args.model.id);
|
|
608
771
|
}
|
|
609
772
|
export function sameRouteIdentity(a, b) {
|
|
610
773
|
return a.id === b.id && routeKeyOf(a.baseUrl) === routeKeyOf(b.baseUrl);
|
|
@@ -612,29 +775,33 @@ export function sameRouteIdentity(a, b) {
|
|
|
612
775
|
export function fallbackToPrimaryNotice(args) {
|
|
613
776
|
return {
|
|
614
777
|
code: "route.fallback_to_primary",
|
|
615
|
-
message: `derived model "${args.from}" (${args.seat}) is not routable (${args.
|
|
616
|
-
`falling back to the primary model "${args.to}". ${args.
|
|
778
|
+
message: `derived model "${args.from}" (${args.seat}) is not routable (${causeSaid(args.refusal)}) — ` +
|
|
779
|
+
`falling back to the primary model "${args.to}". ${fixSaid(args.refusal)}`,
|
|
617
780
|
detail: {
|
|
618
781
|
seat: args.seat,
|
|
619
782
|
from: args.from,
|
|
620
783
|
to: args.to,
|
|
621
|
-
|
|
622
|
-
fixHint: args.verdict.detail.fixHint,
|
|
784
|
+
...refusalDetail(args.refusal),
|
|
623
785
|
...(args.sessionId !== undefined ? { sessionId: args.sessionId } : {}),
|
|
624
786
|
...(args.runId !== undefined ? { runId: args.runId } : {}),
|
|
625
787
|
},
|
|
626
788
|
};
|
|
627
789
|
}
|
|
790
|
+
const causeSaid = (refusal) => refusal.code ?? "the refusal stated no code";
|
|
791
|
+
const fixSaid = (refusal) => refusal.fixHint ?? "(the refusal gave no fix)";
|
|
792
|
+
const refusalDetail = (refusal) => ({
|
|
793
|
+
...(refusal.code !== undefined ? { cause: refusal.code } : {}),
|
|
794
|
+
...(refusal.fixHint !== undefined ? { fixHint: refusal.fixHint } : {}),
|
|
795
|
+
});
|
|
628
796
|
export function unroutableSeatNotice(args) {
|
|
629
797
|
return {
|
|
630
798
|
code: "route.classifier_unroutable",
|
|
631
|
-
message: `derived model "${args.from}" (${args.seat}) is not routable (${args.
|
|
632
|
-
`the seat is kept and its calls are refused rather than served by "${args.primary}". ${args.
|
|
799
|
+
message: `derived model "${args.from}" (${args.seat}) is not routable (${causeSaid(args.refusal)}) and this deployment declared no fallback — ` +
|
|
800
|
+
`the seat is kept and its calls are refused rather than served by "${args.primary}". ${fixSaid(args.refusal)}`,
|
|
633
801
|
detail: {
|
|
634
802
|
seat: args.seat,
|
|
635
803
|
from: args.from,
|
|
636
|
-
|
|
637
|
-
fixHint: args.verdict.detail.fixHint,
|
|
804
|
+
...refusalDetail(args.refusal),
|
|
638
805
|
action: "refused",
|
|
639
806
|
...(args.sessionId !== undefined ? { sessionId: args.sessionId } : {}),
|
|
640
807
|
...(args.runId !== undefined ? { runId: args.runId } : {}),
|
|
@@ -644,12 +811,11 @@ export function unroutableSeatNotice(args) {
|
|
|
644
811
|
export function seatDetachedNotice(args) {
|
|
645
812
|
return {
|
|
646
813
|
code: "route.seat_detached",
|
|
647
|
-
message: `derived model "${args.from}" (${args.seat}) is not routable (${args.
|
|
814
|
+
message: `derived model "${args.from}" (${args.seat}) is not routable (${causeSaid(args.refusal)}) — the seat is detached for this run and nothing serves it in its place. ${fixSaid(args.refusal)}`,
|
|
648
815
|
detail: {
|
|
649
816
|
seat: args.seat,
|
|
650
817
|
from: args.from,
|
|
651
|
-
|
|
652
|
-
fixHint: args.verdict.detail.fixHint,
|
|
818
|
+
...refusalDetail(args.refusal),
|
|
653
819
|
action: "detached",
|
|
654
820
|
...(args.sessionId !== undefined ? { sessionId: args.sessionId } : {}),
|
|
655
821
|
...(args.runId !== undefined ? { runId: args.runId } : {}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RouteCredential, RoutePairingConfig } from "../internal/llm.js";
|
|
2
|
+
import type { PairingAdjudication } from "./route-adjudicator.js";
|
|
2
3
|
/**
|
|
3
4
|
* The PUBLISHED golden conformance corpus for the key↔URL pairing adjudicator
|
|
4
5
|
* ({@link import("./route-adjudicator.js").adjudicateModelRoute}).
|
|
@@ -37,15 +38,16 @@ export interface RouteAdjudicationVector {
|
|
|
37
38
|
};
|
|
38
39
|
credential: RouteCredential;
|
|
39
40
|
config: RoutePairingConfig;
|
|
40
|
-
/** The `ok` / `posture` / `code` axes of the expected
|
|
41
|
+
/** The `ok` / `posture` / `code` axes of the expected verdict of the pairing law (a credential refusal's code — the law never
|
|
42
|
+
* answers `route.model_unavailable`). */
|
|
41
43
|
expect: {
|
|
42
44
|
ok: true;
|
|
43
|
-
posture: Extract<
|
|
45
|
+
posture: Extract<PairingAdjudication, {
|
|
44
46
|
ok: true;
|
|
45
47
|
}>["posture"];
|
|
46
48
|
} | {
|
|
47
49
|
ok: false;
|
|
48
|
-
code: Extract<
|
|
50
|
+
code: Extract<PairingAdjudication, {
|
|
49
51
|
ok: false;
|
|
50
52
|
}>["code"];
|
|
51
53
|
};
|
package/dist/brain/routing.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { Brain } from "../core/types.js";
|
|
|
2
2
|
export interface RoutingBrainOptions {
|
|
3
3
|
/** Which field of the Model selects the route. Default "provider". */
|
|
4
4
|
by?: "provider" | "api";
|
|
5
|
-
/** Brain used when no route matches. If omitted, an unmatched model
|
|
5
|
+
/** Brain used when no route matches. If omitted, an unmatched model is not served here: its judgment and its request both answer
|
|
6
|
+
* `route.model_unavailable` (`[invalid_request] route.model_unavailable: …` on the request). */
|
|
6
7
|
fallback?: Brain;
|
|
7
8
|
}
|
|
8
9
|
/** The two `Model` fields a route can be named by — a catalog entry that carries only a provider word is as good a subject as a whole `Model`. */
|
package/dist/brain/routing.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createAssistantMessageEventStream, } from "../internal/llm.js";
|
|
2
2
|
import { completeOf } from "./brain-faces.js";
|
|
3
3
|
import { ZERO_USAGE } from "./errors.js";
|
|
4
|
+
import { routeRefusalError } from "./route-adjudicator.js";
|
|
5
|
+
import { readMember } from "../core/thrown-value.js";
|
|
4
6
|
function errorMessage(who, text) {
|
|
5
7
|
return {
|
|
6
8
|
role: "assistant",
|
|
@@ -21,6 +23,17 @@ function spelled(word) {
|
|
|
21
23
|
function routeKeyOf(model, by) {
|
|
22
24
|
return by === "api" ? model.api : model.provider;
|
|
23
25
|
}
|
|
26
|
+
function unservedRefusal(model, by, word) {
|
|
27
|
+
const id = readMember(model, "id");
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
code: "route.model_unavailable",
|
|
31
|
+
detail: {
|
|
32
|
+
modelId: typeof id === "string" ? id : "",
|
|
33
|
+
fixHint: `createRoutingBrain serves no ${by}="${spelled(word)}" (no route under that word and no fallback) — mount a route for it, or give the router a fallback`,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
24
37
|
export function isBrain(value) {
|
|
25
38
|
return value !== null && typeof value === "object" && typeof value.stream === "function";
|
|
26
39
|
}
|
|
@@ -63,10 +76,11 @@ export function createRoutingBrain(routes, opts = {}) {
|
|
|
63
76
|
catch {
|
|
64
77
|
return reject(`createRoutingBrain: the route table threw while ${by}="${spelled(named)}" was looked up`, word);
|
|
65
78
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
if ("broken" in resolved)
|
|
80
|
+
return reject(`createRoutingBrain: ${resolved.broken}`, word);
|
|
81
|
+
if (resolved.target === undefined)
|
|
82
|
+
return reject(routeRefusalError(unservedRefusal(model, by, named)).message, word);
|
|
83
|
+
return { target: resolved.target };
|
|
70
84
|
};
|
|
71
85
|
const stream = (model, context, options) => {
|
|
72
86
|
const placed = place(model);
|
|
@@ -82,7 +96,9 @@ export function createRoutingBrain(routes, opts = {}) {
|
|
|
82
96
|
};
|
|
83
97
|
const adjudicateRoute = (model, perModelAuth) => {
|
|
84
98
|
const resolved = resolveTarget(model);
|
|
85
|
-
|
|
99
|
+
if (!("target" in resolved))
|
|
100
|
+
return undefined;
|
|
101
|
+
return resolved.target === undefined ? unservedRefusal(model, by, routeKeyOf(model, by)) : resolved.target.adjudicateRoute?.(model, perModelAuth);
|
|
86
102
|
};
|
|
87
103
|
return { stream, complete, adjudicateRoute };
|
|
88
104
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BrainRetryErrClass, BrainStatus, BrainStatusSeat } from "../core/types.js";
|
|
2
|
-
import type { CapabilityDeclaration,
|
|
2
|
+
import type { CapabilityDeclaration, CapabilityRequestSpeed } from "./model-capability.js";
|
|
3
|
+
import type { ThinkingLevel } from "../internal/harness-types.js";
|
|
3
4
|
/** Run `fn` with a per-task brain-status sink in scope. ALS propagates it through the async brain calls
|
|
4
5
|
* inside `fn` (the harness's prompt → brain.stream → connect/retry loop), so {@link emitBrainStatus}
|
|
5
6
|
* reaches THIS task's sink and nothing else. */
|
|
@@ -106,19 +107,23 @@ export declare function runWithExtraBodyDropped<T>(observe: (r: ExtraBodyDropped
|
|
|
106
107
|
export declare function reportExtraBodyDropped(report: ExtraBodyDroppedReport): void;
|
|
107
108
|
/** A request refused at the gate because the credential it would carry does not belong to the root it was going to, one member
|
|
108
109
|
* per refusal code, each naming the catalog id it was for and the roots in their DISPLAY spelling (never a value, never a digest
|
|
109
|
-
* of one): `route.credential_origin_mismatch` — a per-model credential bound to another origin (that origin and the request's
|
|
110
|
+
* of one): `route.credential_origin_mismatch` — a per-model credential bound to another origin (that origin and the request's,
|
|
111
|
+
* and what bound it: the answer's declaration or the table — or, empty origin, `"generation"`: an undeclared answer from a seat
|
|
112
|
+
* handed in before a catalog swap, for an entry not unchanged across it, bound nowhere it dials; what bound it absent when the
|
|
113
|
+
* refusal — a host's own judgment — does not say it);
|
|
110
114
|
* `route.credential_mismatch` — the deployment credential paired with another root (the request's root and the declared root,
|
|
111
|
-
* empty when the brain declares none). */
|
|
115
|
+
* empty when the brain declares none; either absent when the refusal — a host's own judgment — does not name it). */
|
|
112
116
|
export type CredentialRefusalReport = {
|
|
113
117
|
code: "route.credential_origin_mismatch";
|
|
114
118
|
modelId: string;
|
|
115
119
|
boundOrigin: string;
|
|
116
120
|
requestOrigin: string;
|
|
121
|
+
boundBy?: "declaration" | "table" | "generation";
|
|
117
122
|
} | {
|
|
118
123
|
code: "route.credential_mismatch";
|
|
119
124
|
modelId: string;
|
|
120
|
-
requestBaseUrl
|
|
121
|
-
configBaseUrl
|
|
125
|
+
requestBaseUrl?: string;
|
|
126
|
+
configBaseUrl?: string;
|
|
122
127
|
};
|
|
123
128
|
/**
|
|
124
129
|
* Run `fn` with a per-run credential refusal sink in scope — the FOURTH brain→runner ALS channel, with the third's
|
|
@@ -131,14 +136,51 @@ export declare function runWithCredentialRefusals<T>(observe: (r: CredentialRefu
|
|
|
131
136
|
* `routeRefusalError`; a judgment that only advises reports nothing). The
|
|
132
137
|
* observer is the Runner's own seat, whose one delivery is the guarded `deliverEngineNotice` — nothing is swallowed here. */
|
|
133
138
|
export declare function reportCredentialRefusal(report: CredentialRefusalReport): void;
|
|
134
|
-
/** A request that withheld a capability from the model it was sent to
|
|
135
|
-
*
|
|
136
|
-
|
|
139
|
+
/** A request that withheld a capability from the model it was sent to — one report per capability, each with its own facts:
|
|
140
|
+
* {@link ImagesWithheldReport} (the message assemblers), {@link FastModeWithheldReport} (the fast-mode applier) and
|
|
141
|
+
* {@link ThinkingWithheldReport} (the stream engine). */
|
|
142
|
+
export type CapabilityWithheldReport = ImagesWithheldReport | FastModeWithheldReport | ThinkingWithheldReport;
|
|
143
|
+
/** A request whose images were replaced by placeholders: the model, the model's declaration that withheld them
|
|
144
|
+
* (`capabilityOf`), and how many blocks it replaced. */
|
|
145
|
+
export interface ImagesWithheldReport {
|
|
137
146
|
modelId: string;
|
|
138
|
-
capability:
|
|
147
|
+
capability: "image";
|
|
139
148
|
cause: Exclude<CapabilityDeclaration, "declared_on">;
|
|
140
149
|
count: number;
|
|
141
150
|
}
|
|
151
|
+
/** A request that asked for fast speed of a model whose catalog entry cannot serve it went at standard speed: the model, the
|
|
152
|
+
* reason word `fastModeUnavailableFor` gave (its wire or its declaration), and 1 (the request). */
|
|
153
|
+
export interface FastModeWithheldReport {
|
|
154
|
+
modelId: string;
|
|
155
|
+
capability: "fast_mode";
|
|
156
|
+
cause: import("./fast-mode.js").FastModeEntryReason;
|
|
157
|
+
count: number;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* A call that asked for a thinking tier which did not take effect: the model's entry does not declare reasoning, and the request
|
|
161
|
+
* without the tier truly succeeded (the call kept its output) after the endpoint refused the request that tried it — on this
|
|
162
|
+
* call (the stream engine's fall-back) — or because the endpoint memory sends it without the tier (cause `downgraded`). A
|
|
163
|
+
* fall-back after a failure that refused nothing (a server error, a page, a tear, a stall) is not reported.
|
|
164
|
+
* - `requested` — the tier the call asked for;
|
|
165
|
+
* - `why` — what the endpoint did: refused in words naming the thinking parameters (`named`, `thinkingRefusalStated`) or in
|
|
166
|
+
* words the engine does not read (`refused`), or a request that carried them broke off after it had begun answering
|
|
167
|
+
* (`broke_off`, remembered at once);
|
|
168
|
+
* - `remembered` — the endpoint is now remembered: its requests go without the thinking parameters until the process restarts;
|
|
169
|
+
* - `speed` — the speed the endpoint memory was read at (the one the call's withheld set was decided at): what `why` and
|
|
170
|
+
* `remembered` say holds for requests at that speed only;
|
|
171
|
+
* - `budgetForm` — the refused request carried the Messages budget form (`thinking.type: "enabled"`), which an endpoint that
|
|
172
|
+
* takes only the adaptive form refuses.
|
|
173
|
+
*/
|
|
174
|
+
export interface ThinkingWithheldReport {
|
|
175
|
+
modelId: string;
|
|
176
|
+
capability: "reasoning";
|
|
177
|
+
cause: "downgraded";
|
|
178
|
+
requested: ThinkingLevel;
|
|
179
|
+
why: "named" | "refused" | "broke_off";
|
|
180
|
+
remembered: boolean;
|
|
181
|
+
speed: CapabilityRequestSpeed;
|
|
182
|
+
budgetForm: boolean;
|
|
183
|
+
}
|
|
142
184
|
/**
|
|
143
185
|
* Run `fn` with a per-run withheld-capability sink in scope — the FIFTH brain→runner ALS channel, with the third's shape
|
|
144
186
|
* and for its reasons: the WHOLE leg (the end-of-task compaction runs after the leg's prompt, and a child leg running
|
|
@@ -147,6 +189,6 @@ export interface CapabilityWithheldReport {
|
|
|
147
189
|
*/
|
|
148
190
|
export declare function runWithCapabilityWithheld<T>(observe: (r: CapabilityWithheldReport) => void, fn: () => Promise<T>): Promise<T>;
|
|
149
191
|
/** Report a withheld capability to the active per-run sink, if any (called by the message assemblers' one emit,
|
|
150
|
-
* `reportImagesWithheld
|
|
192
|
+
* `reportImagesWithheld`, and by the stream engine once a request without an asked thinking tier succeeded). The observer is the Runner's own seat, whose one delivery is the guarded `deliverEngineNotice`
|
|
151
193
|
* — nothing is swallowed here: a seat that fails otherwise fails the request build, never the person's notice in silence. */
|
|
152
194
|
export declare function reportCapabilityWithheld(report: CapabilityWithheldReport): void;
|