@sema-agent/core 7.57.0 → 7.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1161 -0
- package/README.md +6 -4
- package/dist/agents/cc-peer-directory.js +8 -8
- package/dist/agents/child-model-seat.d.ts +4 -2
- package/dist/agents/child-model-seat.js +5 -3
- package/dist/agents/peer-directory.d.ts +9 -0
- package/dist/agents/peer-directory.js +6 -2
- package/dist/agents/send-message-tool.js +21 -12
- package/dist/agents/subagent-steps.js +2 -4
- package/dist/agents/subagent.js +33 -34
- package/dist/brain/anthropic.js +161 -45
- package/dist/brain/errors.d.ts +9 -3
- package/dist/brain/errors.js +7 -1
- package/dist/brain/failover.js +2 -1
- package/dist/brain/open-responses.js +3 -3
- package/dist/brain/openai.js +103 -53
- package/dist/brain/provider-dialect.d.ts +11 -0
- package/dist/brain/provider-dialect.js +5 -2
- package/dist/brain/reasoning-request.js +5 -4
- package/dist/brain/reasoning.d.ts +19 -0
- package/dist/brain/reasoning.js +17 -2
- package/dist/brain/request-route.d.ts +4 -1
- package/dist/brain/request-route.js +4 -1
- package/dist/brain/route-adjudicator.d.ts +84 -18
- package/dist/brain/route-adjudicator.js +89 -22
- package/dist/brain/route-conformance.js +1 -1
- package/dist/brain/stream-engine.js +84 -49
- package/dist/brain/stream-shared.d.ts +30 -0
- package/dist/brain/stream-shared.js +34 -1
- package/dist/brain/timeout.d.ts +62 -5
- package/dist/brain/timeout.js +93 -6
- package/dist/core/a2a.d.ts +2 -1
- package/dist/core/a2a.js +23 -10
- package/dist/core/account-row.d.ts +61 -0
- package/dist/core/account-row.js +51 -0
- package/dist/core/advisor-verdict.d.ts +2 -1
- package/dist/core/advisor-verdict.js +1 -1
- package/dist/core/allow-entry.d.ts +20 -7
- package/dist/core/allow-entry.js +18 -9
- package/dist/core/approval-object.d.ts +29 -15
- package/dist/core/approval-object.js +47 -19
- package/dist/core/ask-origin.d.ts +21 -2
- package/dist/core/ask-origin.js +5 -1
- package/dist/core/auto-compaction.d.ts +4 -0
- package/dist/core/auto-compaction.js +2 -2
- package/dist/core/auto-mode-directive.d.ts +29 -5
- package/dist/core/auto-mode-directive.js +38 -8
- package/dist/core/background-agent-store.d.ts +16 -3
- package/dist/core/checkpoint-requirements.d.ts +19 -1
- package/dist/core/checkpoint-requirements.js +5 -1
- package/dist/core/checkpoint-store.d.ts +85 -23
- package/dist/core/checkpoint-store.js +31 -9
- package/dist/core/child-clamp-seats.d.ts +29 -0
- package/dist/core/child-clamp-seats.js +56 -1
- package/dist/core/compliance.d.ts +2 -2
- package/dist/core/compliance.js +1 -1
- package/dist/core/effective-path-target.d.ts +8 -2
- package/dist/core/effective-path-target.js +8 -3
- package/dist/core/engine-notice.d.ts +99 -9
- package/dist/core/engine-notice.js +19 -5
- package/dist/core/fs-write-gate-policy.d.ts +4 -2
- package/dist/core/fs-write-gate-policy.js +7 -3
- package/dist/core/gate-fold.js +7 -4
- package/dist/core/gate-lanes.js +19 -6
- package/dist/core/gate-outcome.d.ts +32 -3
- package/dist/core/gate-outcome.js +19 -1
- package/dist/core/git-worktree-env.d.ts +53 -11
- package/dist/core/git-worktree-env.js +96 -12
- package/dist/core/governance-codes.d.ts +9 -1
- package/dist/core/governance-codes.js +13 -0
- package/dist/core/hooks.d.ts +35 -4
- package/dist/core/hooks.js +17 -11
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +6 -5
- package/dist/core/image-admission.js +18 -14
- package/dist/core/locked-config.d.ts +20 -3
- package/dist/core/locked-config.js +40 -3
- package/dist/core/mailbox-store.d.ts +45 -1
- package/dist/core/mailbox-store.js +53 -9
- package/dist/core/mcp-call-meta.d.ts +66 -0
- package/dist/core/mcp-call-meta.js +103 -0
- package/dist/core/mcp-connection-pool.d.ts +3 -1
- package/dist/core/mcp-connection-pool.js +3 -1
- package/dist/core/mcp-failure.d.ts +117 -15
- package/dist/core/mcp-failure.js +71 -3
- package/dist/core/mcp-probe.d.ts +4 -0
- package/dist/core/mcp-probe.js +1 -1
- package/dist/core/mcp-server-link.d.ts +27 -3
- package/dist/core/mcp-server-link.js +25 -1
- package/dist/core/mcp-server-spec.d.ts +46 -18
- package/dist/core/mcp-server-spec.js +1 -18
- package/dist/core/mcp.d.ts +16 -20
- package/dist/core/mcp.js +112 -55
- package/dist/core/memory-engine/consolidation-driver.d.ts +2 -4
- package/dist/core/memory-engine/consolidation-driver.js +3 -3
- package/dist/core/memory-engine/consolidation.d.ts +4 -0
- package/dist/core/memory-engine/consolidation.js +1 -0
- package/dist/core/memory-engine/delegation-settlement.js +5 -12
- package/dist/core/memory-engine/distiller.js +2 -2
- package/dist/core/memory-engine/dual-root.d.ts +50 -1
- package/dist/core/memory-engine/dual-root.js +44 -1
- package/dist/core/memory-engine/engine.d.ts +67 -14
- package/dist/core/memory-engine/engine.js +384 -212
- package/dist/core/memory-engine/export-bundle.d.ts +23 -0
- package/dist/core/memory-engine/export-bundle.js +23 -4
- package/dist/core/memory-engine/file-backend.d.ts +128 -55
- package/dist/core/memory-engine/file-backend.js +290 -117
- package/dist/core/memory-engine/index.d.ts +1 -1
- package/dist/core/memory-engine/layout.d.ts +59 -11
- package/dist/core/memory-engine/layout.js +190 -40
- package/dist/core/memory-engine/memory-backend-contract.d.ts +1 -1
- package/dist/core/memory-engine/memory-backend-contract.js +39 -2
- package/dist/core/memory-engine/scope-contract.d.ts +45 -4
- package/dist/core/memory-engine/scope-contract.js +80 -11
- package/dist/core/memory-engine/sync-client.d.ts +9 -1
- package/dist/core/memory-engine/sync-client.js +31 -8
- package/dist/core/memory-engine/sync.d.ts +5 -0
- package/dist/core/memory-engine/types.d.ts +6 -0
- package/dist/core/mode-policy.d.ts +8 -5
- package/dist/core/mode-policy.js +5 -4
- package/dist/core/mods/classic-events.d.ts +5 -1
- package/dist/core/mods/host.js +1 -1
- package/dist/core/mods/kernel/dispatch.d.ts +3 -0
- package/dist/core/mods/kernel/dispatch.js +12 -9
- package/dist/core/mods/kernel/events.d.ts +6 -1
- package/dist/core/mods/kernel/events.js +2 -2
- package/dist/core/mods/kernel/registration.d.ts +9 -1
- package/dist/core/mods/kernel/registration.js +3 -0
- package/dist/core/mods/kernel/site-rules.d.ts +3 -0
- package/dist/core/mods/kernel/site-rules.js +10 -0
- package/dist/core/mods/package.d.ts +23 -0
- package/dist/core/mods/package.js +118 -0
- package/dist/core/mods/stations.d.ts +33 -12
- package/dist/core/mods/stations.js +45 -11
- package/dist/core/mods/tool-call.d.ts +5 -1
- package/dist/core/mods/tool-call.js +13 -4
- package/dist/core/parent-spec-seat.d.ts +8 -3
- package/dist/core/parent-spec-seat.js +2 -0
- package/dist/core/park-selfcheck.js +6 -0
- package/dist/core/path-guard-rows.d.ts +20 -0
- package/dist/core/path-guard-rows.js +11 -0
- package/dist/core/peer-seat.d.ts +248 -0
- package/dist/core/peer-seat.js +439 -0
- package/dist/core/permission-rule-consent.js +10 -4
- package/dist/core/permission-rule-model.d.ts +16 -0
- package/dist/core/permission-rule-model.js +1 -1
- package/dist/core/present-plan-tool.d.ts +20 -3
- package/dist/core/present-plan-tool.js +48 -4
- package/dist/core/protocol-http-auth.d.ts +40 -29
- package/dist/core/protocol-http-auth.js +30 -32
- package/dist/core/redaction-marks.d.ts +16 -0
- package/dist/core/redaction-marks.js +16 -0
- package/dist/core/redaction-passes.js +8 -9
- package/dist/core/resume-startup-cause.js +1 -0
- package/dist/core/retention.d.ts +41 -15
- package/dist/core/retention.js +59 -12
- package/dist/core/rewrite-rejudge.d.ts +38 -0
- package/dist/core/rewrite-rejudge.js +42 -2
- package/dist/core/roles.d.ts +34 -2
- package/dist/core/roles.js +43 -4
- package/dist/core/run-origin.d.ts +40 -0
- package/dist/core/run-origin.js +37 -0
- package/dist/core/runner/advertised-writable-dirs.d.ts +57 -38
- package/dist/core/runner/advertised-writable-dirs.js +126 -0
- package/dist/core/runner/announce-once-ledger.d.ts +5 -4
- package/dist/core/runner/announce-once-ledger.js +4 -2
- package/dist/core/runner/call-hook-stations.js +2 -2
- package/dist/core/runner/compaction-restate.d.ts +15 -6
- package/dist/core/runner/compaction-restate.js +28 -2
- package/dist/core/runner/contracts.d.ts +33 -21
- package/dist/core/runner/credential-origin-seat.js +4 -3
- package/dist/core/runner/cwd-alignment-probe.d.ts +20 -0
- package/dist/core/runner/cwd-alignment-probe.js +21 -0
- package/dist/core/runner/decide-continuation.d.ts +2 -2
- package/dist/core/runner/gate-exit.d.ts +30 -8
- package/dist/core/runner/gate-exit.js +15 -8
- package/dist/core/runner/image-removed-seat.d.ts +12 -0
- package/dist/core/runner/image-removed-seat.js +19 -0
- package/dist/core/runner/inline-image.js +1 -1
- package/dist/core/runner/memory-consolidation-driver.js +3 -3
- package/dist/core/runner/park-commit.d.ts +1 -1
- package/dist/core/runner/park-commit.js +3 -0
- package/dist/core/runner/prepare-ask-lane.d.ts +1 -1
- package/dist/core/runner/prepare-ask-lane.js +2 -1
- package/dist/core/runner/prepare-boundary-parks.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +5 -5
- package/dist/core/runner/prepare-caps-and-workflow.js +3 -1
- package/dist/core/runner/prepare-config-doors.d.ts +8 -5
- package/dist/core/runner/prepare-config-doors.js +14 -10
- package/dist/core/runner/prepare-context-lane.js +2 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +8 -0
- package/dist/core/runner/prepare-delegation-surface.js +16 -18
- package/dist/core/runner/prepare-gate-stations.js +1 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +11 -3
- package/dist/core/runner/prepare-hands-readface.js +9 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +1 -3
- package/dist/core/runner/prepare-inherited-gate.js +14 -27
- package/dist/core/runner/prepare-memory.d.ts +3 -0
- package/dist/core/runner/prepare-memory.js +26 -37
- package/dist/core/runner/prepare-park-ask.d.ts +1 -1
- package/dist/core/runner/prepare-park-ask.js +2 -1
- package/dist/core/runner/prepare-policy-chain.d.ts +7 -7
- package/dist/core/runner/prepare-policy-chain.js +18 -15
- package/dist/core/runner/prepare-project-context.d.ts +2 -2
- package/dist/core/runner/prepare-project-context.js +2 -2
- package/dist/core/runner/prepare-prompt-inputs.d.ts +1 -1
- package/dist/core/runner/prepare-prompt-inputs.js +8 -19
- package/dist/core/runner/prepare-protocol-tools.d.ts +4 -2
- package/dist/core/runner/prepare-protocol-tools.js +11 -3
- package/dist/core/runner/prepare-run-refs.d.ts +2 -3
- package/dist/core/runner/prepare-run-refs.js +4 -1
- package/dist/core/runner/prepare-suspend-saga.d.ts +2 -0
- package/dist/core/runner/prepare-suspend-saga.js +2 -1
- package/dist/core/runner/prepare-task.js +28 -13
- package/dist/core/runner/prepare-wiring-manifest.d.ts +2 -1
- package/dist/core/runner/prepare-wiring-manifest.js +4 -3
- package/dist/core/runner/prepare-workspace-restore.d.ts +3 -0
- package/dist/core/runner/prepare-workspace-restore.js +4 -4
- package/dist/core/runner/reply-pricing.d.ts +30 -0
- package/dist/core/runner/reply-pricing.js +19 -0
- package/dist/core/runner/resume-admission.js +5 -3
- package/dist/core/runner/resume-apply.js +6 -1
- package/dist/core/runner/resume-checkpoint-screen.js +2 -0
- package/dist/core/runner/resume-policy-outcome.js +5 -5
- package/dist/core/runner/role-seat-defaulted.d.ts +44 -0
- package/dist/core/runner/role-seat-defaulted.js +40 -0
- package/dist/core/runner/run-brain-sinks.js +2 -0
- package/dist/core/runner/run-harness-handlers.d.ts +3 -4
- package/dist/core/runner/run-harness-handlers.js +1 -8
- package/dist/core/runner/run-identity-wiring.d.ts +2 -5
- package/dist/core/runner/run-identity-wiring.js +6 -4
- package/dist/core/runner/run-leg.d.ts +2 -0
- package/dist/core/runner/run-leg.js +42 -29
- package/dist/core/runner/run-notification-lane.js +3 -0
- package/dist/core/runner/run-stop-and-final-verify.js +2 -2
- package/dist/core/runner/run-terminal-adoption.d.ts +2 -5
- package/dist/core/runner/run-terminal-adoption.js +9 -3
- package/dist/core/runner/run-turn-boundary.js +77 -70
- package/dist/core/runner/runtask.d.ts +1 -1
- package/dist/core/runner/runtask.js +2 -2
- package/dist/core/runner/side-call-account.d.ts +1 -1
- package/dist/core/runner/side-call-account.js +3 -18
- package/dist/core/runner/sub-agent-deny-lists.d.ts +24 -0
- package/dist/core/runner/sub-agent-deny-lists.js +10 -0
- package/dist/core/runner/terminal-account.js +3 -3
- package/dist/core/runner/tool-end-body.js +2 -1
- package/dist/core/runner/tool-occurrence.d.ts +5 -2
- package/dist/core/runner/tool-occurrence.js +4 -3
- package/dist/core/runner/turn-attachments.d.ts +26 -22
- package/dist/core/runner/turn-attachments.js +24 -26
- package/dist/core/runner/write-protection-station.d.ts +8 -2
- package/dist/core/runner/write-protection-station.js +2 -0
- package/dist/core/runner-deps.d.ts +3 -3
- package/dist/core/secret-env.d.ts +32 -2
- package/dist/core/secret-env.js +65 -3
- package/dist/core/sensitive-path-policy.js +9 -10
- package/dist/core/session-log-transfer.d.ts +24 -0
- package/dist/core/session-log-transfer.js +166 -0
- package/dist/core/session-policy-store.d.ts +3 -1
- package/dist/core/session-policy-store.js +13 -9
- package/dist/core/session-store.d.ts +86 -24
- package/dist/core/session-store.js +162 -24
- package/dist/core/session.d.ts +92 -1
- package/dist/core/shell-read-silence.js +1 -0
- package/dist/core/side-query.d.ts +11 -1
- package/dist/core/side-query.js +9 -0
- package/dist/core/skill-grant-binding.d.ts +31 -2
- package/dist/core/skill-grant-binding.js +31 -1
- package/dist/core/skill-grant.d.ts +8 -5
- package/dist/core/skill-grant.js +6 -6
- package/dist/core/steer-replay.d.ts +4 -2
- package/dist/core/steer-replay.js +2 -1
- package/dist/core/store-contracts/background-agent-store-contract.js +27 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +20 -2
- package/dist/core/store-contracts/mailbox-store-contract.js +31 -1
- package/dist/core/store-contracts/session-repo-contract.js +112 -5
- package/dist/core/store-contracts/session-store-contract.d.ts +4 -1
- package/dist/core/store-contracts/session-store-contract.js +236 -2
- package/dist/core/synthetic-read-verdict.js +2 -1
- package/dist/core/task-event.d.ts +92 -8
- package/dist/core/task-notification.js +16 -10
- package/dist/core/task-registry-agent.js +1 -0
- package/dist/core/task-registry-shared.d.ts +7 -1
- package/dist/core/task-spec.d.ts +49 -1
- package/dist/core/task-stream.d.ts +2 -1
- package/dist/core/terminal-cause.d.ts +11 -1
- package/dist/core/tool-catalog-entries.js +1 -0
- package/dist/core/tool-check-reading.d.ts +1 -0
- package/dist/core/tool-check-reading.js +3 -3
- package/dist/core/tool-policy.d.ts +16 -0
- package/dist/core/tool-result-store.d.ts +17 -10
- package/dist/core/tool-result-store.js +3 -1
- package/dist/core/tool-roster.d.ts +112 -5
- package/dist/core/tool-roster.js +42 -1
- package/dist/core/tool-spec.d.ts +3 -1
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-egress.d.ts +0 -2
- package/dist/core/untrusted-egress.js +10 -14
- package/dist/core/user-attachment.js +1 -1
- package/dist/core/wiring-manifest.d.ts +18 -6
- package/dist/core/wiring-manifest.js +4 -3
- package/dist/core/workspace-snapshot.d.ts +44 -0
- package/dist/core/workspace-snapshot.js +34 -0
- package/dist/core/write-protect.d.ts +43 -3
- package/dist/core/write-protect.js +43 -16
- package/dist/engine/compaction/compaction.js +29 -3
- package/dist/engine/execution-env/node-execution-env.d.ts +4 -3
- package/dist/engine/execution-env/node-execution-env.js +24 -23
- package/dist/engine/execution-env/symlink-chain.d.ts +7 -5
- package/dist/engine/harness/agent-harness.d.ts +30 -2
- package/dist/engine/harness/agent-harness.js +43 -12
- package/dist/engine/harness/messages.d.ts +3 -1
- package/dist/engine/harness/messages.js +3 -2
- package/dist/engine/harness/types.d.ts +56 -7
- package/dist/engine/harness/types.js +5 -1
- package/dist/engine/llm/rejected-images.d.ts +46 -0
- package/dist/engine/llm/rejected-images.js +54 -0
- package/dist/engine/llm/tool-turns.d.ts +2 -1
- package/dist/engine/llm/types.d.ts +30 -10
- package/dist/engine/llm/types.js +1 -1
- package/dist/engine/loop/agent-loop.d.ts +8 -0
- package/dist/engine/loop/agent-loop.js +52 -15
- package/dist/engine/loop/types.d.ts +3 -1
- package/dist/engine/session/import-validate.js +3 -0
- package/dist/engine/session/memory-repo.d.ts +17 -9
- package/dist/engine/session/memory-repo.js +44 -34
- package/dist/engine/session/path-to-root.d.ts +38 -0
- package/dist/engine/session/path-to-root.js +39 -0
- package/dist/engine/session/repo-utils.d.ts +22 -4
- package/dist/engine/session/repo-utils.js +49 -1
- package/dist/engine/session/storage-base.d.ts +10 -1
- package/dist/engine/session/storage-base.js +11 -22
- package/dist/index.d.ts +29 -16
- package/dist/index.js +21 -11
- package/dist/internal/harness-types.d.ts +2 -2
- package/dist/internal/harness.d.ts +3 -2
- package/dist/internal/harness.js +2 -2
- package/dist/internal/llm.d.ts +1 -0
- package/dist/orchestration/workflow-observe.d.ts +17 -1
- package/dist/orchestration/workflow-observe.js +20 -0
- package/dist/orchestration/workflow-types.d.ts +32 -7
- package/dist/orchestration/workflow.js +739 -489
- package/dist/shell/counting-pass.d.ts +50 -0
- package/dist/shell/counting-pass.js +502 -0
- package/dist/shell/lex.d.ts +4 -2
- package/dist/shell/lex.js +93 -34
- package/dist/shell/shell-words.d.ts +1 -1
- package/dist/shell/shell-words.js +7 -6
- package/dist/stores/file/index.d.ts +4 -1
- package/dist/stores/file/index.js +4 -1
- package/dist/stores/file/mailbox-store.js +6 -10
- package/dist/stores/file/session-store.d.ts +15 -8
- package/dist/stores/file/session-store.js +28 -13
- package/dist/tools/fs/fs-bash.d.ts +6 -0
- package/dist/tools/fs/fs-bash.js +6 -3
- package/dist/tools/fs/fs-write.d.ts +6 -3
- package/dist/tools/fs/fs-write.js +8 -7
- package/dist/tools/fs/index.d.ts +3 -0
- package/dist/tools/fs/index.js +7 -3
- package/dist/tools/fs/program-read-model.d.ts +13 -0
- package/dist/tools/fs/program-read-model.js +15 -0
- package/dist/tools/fs/program-read-model.rows.js +1 -1
- package/dist/tools/fs/read-deny.d.ts +13 -10
- package/dist/tools/fs/read-deny.js +25 -5
- package/dist/tools/fs/read-floor.d.ts +19 -0
- package/dist/tools/fs/read-floor.js +23 -0
- package/dist/tools/fs/safety.js +40 -8
- package/dist/tools/fs/search.js +6 -24
- package/dist/tools/fs/shell-read-check.d.ts +9 -2
- package/dist/tools/fs/shell-read-check.js +61 -16
- package/dist/tools/fs/shell-read-establish.js +2 -1
- package/dist/tools/fs/shell-read-identity.js +1 -1
- package/dist/tools/fs/shell-read-judge.d.ts +26 -9
- package/dist/tools/fs/shell-read-judge.js +10 -6
- package/dist/tools/fs/shell-read-plan.d.ts +6 -1
- package/dist/tools/fs/shell-read-plan.js +22 -15
- package/dist/tools/fs/shell-read-start.js +1 -0
- package/dist/tools/fs/shell-reentry-text.d.ts +15 -1
- package/dist/tools/fs/shell-reentry-text.js +25 -3
- package/dist/tools/monitor.d.ts +4 -0
- package/dist/tools/monitor.js +2 -0
- package/dist/tools/worktree.d.ts +42 -15
- package/dist/tools/worktree.js +60 -32
- package/package.json +5 -2
- package/test/export-surface.snapshot.json +149 -1
- package/wire-changes/core-stores-sql@7.58.0.json +29 -0
- package/wire-changes/core-stores-sql@7.59.0.json +29 -0
- package/wire-changes/core@7.58.0.json +2188 -0
- package/wire-changes/core@7.59.0.json +2459 -0
- package/wire-changes/mods-kernel@7.58.0.json +81 -0
- package/wire-changes/mods-kernel@7.59.0.json +29 -0
- package/wire-changes/primitives@7.58.0.json +29 -0
- package/wire-changes/primitives@7.59.0.json +29 -0
- package/dist/primitives/credential-ref.d.ts +0 -89
- package/dist/primitives/credential-ref.js +0 -125
- package/dist/primitives/index.d.ts +0 -2
- package/dist/primitives/index.js +0 -1
|
@@ -145,7 +145,7 @@ export type NoticeAudience = "user" | "operator";
|
|
|
145
145
|
* the union's catalog ({@link EngineNotice.code}). The groups below say only which family a row joins,
|
|
146
146
|
* so the catalog is not written a second time here and the two cannot drift.
|
|
147
147
|
*/
|
|
148
|
-
export declare const ENGINE_NOTICE_CODES: readonly ["config.autocompact_window_clamped", "config.env_timeout_discarded", "config.materialize_env_discarded", "config.models_swapped", "config.context_settings_swapped", "config.read_face_swapped", "config.read_face_deployment_clamped", "config.write_face_swapped", "config.write_face_deployment_clamped", "config.read_deny_swapped", "config.tool_model_gate_removed", "config.tool_model_gate_unknown_class", "config.tool_model_gate_env_invalid", "config.artifact_host_invalid", "config.task_root_not_canonical", "config.write_protection_target_view_absent", "config.path_view_unresolved", "config.execution_env_capability_invalid", "config.tool_card_undeclared", "config.tool_face_undeclared", "config.tool_face_invalid", "config.forward_sink_failed", "config.durable_gate_unavailable", "config.peer_admission_out_of_range", "config.peer_lane_unmounted", "config.secret_env_scrubbed", "inherit_env.names_withheld", "config.credential_not_withheld", "config.cross_boundary_posture_undeclared", "config.cross_boundary_record_unwritten", "config.permission_mode_unavailable", "permission.ask_released_by_mode", "permission.read_deny_unapplied", "permission.rule_store_unavailable", "permission.rule_row_dropped", "config.session_rules_earlier_grammar", "permission.allowed_tool_not_granted", "mods.registration_refused", "peer.inbound_disposition", "peer.held_settled", "peer.idle_subscription", "classifier.denial_limit", "classifier.fallback", "classifier.role_defaulted", "classifier.contract_broken", "classifier.unavailable", "checkpoint.execution_outcome_unrecorded", "delegation.transcript_integrity", "delegation.ask_unresolvable", "mcp.injection_dropped", "mcp.revocation_probe_failed", "mcp.server_redialed", "workflow.governance_key_stripped", "workflow.agent_option_ignored", "memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.content_class_declared", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "memory.consolidation_recommended", "memory.consolidation_committed", "memory.consolidation_conflict", "memory.consolidation_incomplete", "memory.consolidation_refused", "memory.consolidation_withheld", "memory.restore_withheld", "memory.project_scope_absent", "route.fallback_to_primary", "route.classifier_unroutable", "route.seat_detached", "advisor.not_attached", "route.credential_origin_mismatch", "route.response_model_mismatch", "route.tool_call_id_folded", "route.finish_reason_unknown", "route.stream_end_ignored", "route.extra_body_reserved_dropped", "model.capability_downgraded", "context.tool_turn_repaired", "task.user_steer_undrained", "task.user_followup_undrained", "steering.parked_input_blocked", "task.turn_interrupted", "task.halt_unconsumed", "task.late_approval", "task.interrupt_unconsumed", "task.tool_turn_incomplete", "approval.read_root_granted", "approval.read_root_grant_rejected", "memory.capture_opted_out", "memory.capture_optout_unpersisted", "skills.listing_truncated", "agents.listing_truncated", "tool_result.offload_put_failed", "tool_result.media_refused", "instructions.source_changed", "session.records_skipped", "memory.layer_locked_legacy", "server.model_unreachable", "permission.entry_mode_clamped"];
|
|
148
|
+
export declare const ENGINE_NOTICE_CODES: readonly ["config.autocompact_window_clamped", "config.env_timeout_discarded", "config.materialize_env_discarded", "config.models_swapped", "config.context_settings_swapped", "config.read_face_swapped", "config.read_face_deployment_clamped", "config.write_face_swapped", "config.write_face_deployment_clamped", "config.read_deny_swapped", "config.tool_model_gate_removed", "config.tool_model_gate_unknown_class", "config.tool_model_gate_env_invalid", "config.artifact_host_invalid", "config.task_root_not_canonical", "config.write_protection_target_view_absent", "config.path_view_unresolved", "config.execution_env_capability_invalid", "config.tool_card_undeclared", "config.tool_face_undeclared", "config.tool_face_invalid", "config.forward_sink_failed", "config.durable_gate_unavailable", "config.peer_admission_out_of_range", "config.peer_lane_unmounted", "config.secret_env_scrubbed", "inherit_env.names_withheld", "config.credential_not_withheld", "config.cross_boundary_posture_undeclared", "config.cross_boundary_record_unwritten", "config.permission_mode_unavailable", "permission.ask_released_by_mode", "permission.read_deny_unapplied", "permission.rule_store_unavailable", "permission.rule_row_dropped", "config.session_rules_earlier_grammar", "permission.allowed_tool_not_granted", "mods.registration_refused", "peer.inbound_disposition", "peer.held_settled", "peer.idle_subscription", "classifier.denial_limit", "classifier.fallback", "classifier.role_defaulted", "classifier.contract_broken", "classifier.unavailable", "checkpoint.execution_outcome_unrecorded", "delegation.transcript_integrity", "delegation.ask_unresolvable", "mcp.injection_dropped", "mcp.revocation_probe_failed", "mcp.server_redialed", "mcp.authorization_required", "workflow.governance_key_stripped", "workflow.agent_option_ignored", "memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.content_class_declared", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "memory.consolidation_recommended", "memory.consolidation_committed", "memory.consolidation_conflict", "memory.consolidation_incomplete", "memory.consolidation_refused", "memory.consolidation_withheld", "memory.restore_withheld", "memory.project_scope_absent", "route.fallback_to_primary", "route.classifier_unroutable", "route.seat_detached", "advisor.not_attached", "route.credential_origin_mismatch", "route.credential_rebound", "route.response_model_mismatch", "route.tool_call_id_folded", "route.finish_reason_unknown", "route.stream_end_ignored", "route.extra_body_reserved_dropped", "model.capability_downgraded", "model.role_defaulted", "context.tool_turn_repaired", "context.image_removed", "task.user_steer_undrained", "task.user_followup_undrained", "steering.parked_input_blocked", "task.turn_interrupted", "task.halt_unconsumed", "task.late_approval", "task.interrupt_unconsumed", "task.tool_turn_incomplete", "approval.read_root_granted", "approval.read_root_grant_rejected", "memory.capture_opted_out", "memory.capture_optout_unpersisted", "skills.listing_truncated", "agents.listing_truncated", "tool_result.offload_put_failed", "tool_result.media_refused", "instructions.source_changed", "session.records_skipped", "memory.layer_locked_legacy", "server.model_unreachable", "permission.entry_mode_clamped"];
|
|
149
149
|
/** A catalogued code (see {@link ENGINE_NOTICE_CODES}); {@link NOTICE_MINTER} says who mints it. NOT the type of
|
|
150
150
|
* `EngineNotice.code`, which stays `string` — a host forwarding its own notices through the same
|
|
151
151
|
* sink is a supported shape, and narrowing that field would break it. */
|
|
@@ -237,6 +237,7 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
237
237
|
readonly "mcp.injection_dropped": "user";
|
|
238
238
|
readonly "mcp.revocation_probe_failed": "operator";
|
|
239
239
|
readonly "mcp.server_redialed": "operator";
|
|
240
|
+
readonly "mcp.authorization_required": "user";
|
|
240
241
|
readonly "workflow.governance_key_stripped": "operator";
|
|
241
242
|
readonly "workflow.agent_option_ignored": "operator";
|
|
242
243
|
readonly "memory.content_class_declared": "operator";
|
|
@@ -250,12 +251,15 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
250
251
|
readonly "route.fallback_to_primary": "operator";
|
|
251
252
|
readonly "route.classifier_unroutable": "operator";
|
|
252
253
|
readonly "route.seat_detached": "operator";
|
|
254
|
+
readonly "route.credential_rebound": "operator";
|
|
253
255
|
readonly "advisor.not_attached": "user";
|
|
254
256
|
readonly "route.response_model_mismatch": "operator";
|
|
255
257
|
readonly "route.tool_call_id_folded": "operator";
|
|
256
258
|
readonly "route.extra_body_reserved_dropped": "operator";
|
|
257
259
|
readonly "model.capability_downgraded": "user";
|
|
260
|
+
readonly "model.role_defaulted": "operator";
|
|
258
261
|
readonly "context.tool_turn_repaired": "operator";
|
|
262
|
+
readonly "context.image_removed": "user";
|
|
259
263
|
readonly "skills.listing_truncated": "operator";
|
|
260
264
|
readonly "agents.listing_truncated": "operator";
|
|
261
265
|
readonly "tool_result.offload_put_failed": "operator";
|
|
@@ -343,6 +347,7 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
343
347
|
readonly "mcp.injection_dropped": "engine";
|
|
344
348
|
readonly "mcp.revocation_probe_failed": "engine";
|
|
345
349
|
readonly "mcp.server_redialed": "engine";
|
|
350
|
+
readonly "mcp.authorization_required": "engine";
|
|
346
351
|
readonly "workflow.governance_key_stripped": "engine";
|
|
347
352
|
readonly "workflow.agent_option_ignored": "engine";
|
|
348
353
|
readonly "memory.session_polluted": "engine";
|
|
@@ -365,13 +370,16 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
365
370
|
readonly "route.seat_detached": "engine";
|
|
366
371
|
readonly "advisor.not_attached": "engine";
|
|
367
372
|
readonly "route.credential_origin_mismatch": "engine";
|
|
373
|
+
readonly "route.credential_rebound": "engine";
|
|
368
374
|
readonly "route.response_model_mismatch": "engine";
|
|
369
375
|
readonly "route.tool_call_id_folded": "engine";
|
|
370
376
|
readonly "route.finish_reason_unknown": "engine";
|
|
371
377
|
readonly "route.stream_end_ignored": "engine";
|
|
372
378
|
readonly "route.extra_body_reserved_dropped": "engine";
|
|
373
379
|
readonly "model.capability_downgraded": "engine";
|
|
380
|
+
readonly "model.role_defaulted": "engine";
|
|
374
381
|
readonly "context.tool_turn_repaired": "engine";
|
|
382
|
+
readonly "context.image_removed": "engine";
|
|
375
383
|
readonly "task.user_steer_undrained": "engine";
|
|
376
384
|
readonly "task.user_followup_undrained": "engine";
|
|
377
385
|
readonly "steering.parked_input_blocked": "engine";
|
|
@@ -15,6 +15,7 @@ export const NON_GOVERNANCE_MEMORY_CODES = new Set([
|
|
|
15
15
|
"memory.secret_detected",
|
|
16
16
|
"memory.promotable_ungated",
|
|
17
17
|
"memory.announce_failed",
|
|
18
|
+
"memory.announcement_withheld",
|
|
18
19
|
"memory.partition_adopt_failed",
|
|
19
20
|
"memory.partition_split",
|
|
20
21
|
"memory.layout_migrated",
|
|
@@ -175,6 +176,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
175
176
|
"mcp.injection_dropped",
|
|
176
177
|
"mcp.revocation_probe_failed",
|
|
177
178
|
"mcp.server_redialed",
|
|
179
|
+
"mcp.authorization_required",
|
|
178
180
|
"workflow.governance_key_stripped",
|
|
179
181
|
"workflow.agent_option_ignored",
|
|
180
182
|
"memory.session_polluted",
|
|
@@ -197,13 +199,16 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
197
199
|
"route.seat_detached",
|
|
198
200
|
"advisor.not_attached",
|
|
199
201
|
"route.credential_origin_mismatch",
|
|
202
|
+
"route.credential_rebound",
|
|
200
203
|
"route.response_model_mismatch",
|
|
201
204
|
"route.tool_call_id_folded",
|
|
202
205
|
"route.finish_reason_unknown",
|
|
203
206
|
"route.stream_end_ignored",
|
|
204
207
|
"route.extra_body_reserved_dropped",
|
|
205
208
|
"model.capability_downgraded",
|
|
209
|
+
"model.role_defaulted",
|
|
206
210
|
"context.tool_turn_repaired",
|
|
211
|
+
"context.image_removed",
|
|
207
212
|
"task.user_steer_undrained",
|
|
208
213
|
"task.user_followup_undrained",
|
|
209
214
|
"steering.parked_input_blocked",
|
|
@@ -300,6 +305,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
300
305
|
"mcp.injection_dropped": "user",
|
|
301
306
|
"mcp.revocation_probe_failed": "operator",
|
|
302
307
|
"mcp.server_redialed": "operator",
|
|
308
|
+
"mcp.authorization_required": "user",
|
|
303
309
|
"workflow.governance_key_stripped": "operator",
|
|
304
310
|
"workflow.agent_option_ignored": "operator",
|
|
305
311
|
"memory.content_class_declared": "operator",
|
|
@@ -313,12 +319,15 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
313
319
|
"route.fallback_to_primary": "operator",
|
|
314
320
|
"route.classifier_unroutable": "operator",
|
|
315
321
|
"route.seat_detached": "operator",
|
|
322
|
+
"route.credential_rebound": "operator",
|
|
316
323
|
"advisor.not_attached": "user",
|
|
317
324
|
"route.response_model_mismatch": "operator",
|
|
318
325
|
"route.tool_call_id_folded": "operator",
|
|
319
326
|
"route.extra_body_reserved_dropped": "operator",
|
|
320
327
|
"model.capability_downgraded": "user",
|
|
328
|
+
"model.role_defaulted": "operator",
|
|
321
329
|
"context.tool_turn_repaired": "operator",
|
|
330
|
+
"context.image_removed": "user",
|
|
322
331
|
"skills.listing_truncated": "operator",
|
|
323
332
|
"agents.listing_truncated": "operator",
|
|
324
333
|
"tool_result.offload_put_failed": "operator",
|
|
@@ -387,6 +396,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
387
396
|
"mcp.injection_dropped": "engine",
|
|
388
397
|
"mcp.revocation_probe_failed": "engine",
|
|
389
398
|
"mcp.server_redialed": "engine",
|
|
399
|
+
"mcp.authorization_required": "engine",
|
|
390
400
|
"workflow.governance_key_stripped": "engine",
|
|
391
401
|
"workflow.agent_option_ignored": "engine",
|
|
392
402
|
"memory.session_polluted": "engine",
|
|
@@ -409,13 +419,16 @@ const NOTICE_MINTER_TABLE = {
|
|
|
409
419
|
"route.seat_detached": "engine",
|
|
410
420
|
"advisor.not_attached": "engine",
|
|
411
421
|
"route.credential_origin_mismatch": "engine",
|
|
422
|
+
"route.credential_rebound": "engine",
|
|
412
423
|
"route.response_model_mismatch": "engine",
|
|
413
424
|
"route.tool_call_id_folded": "engine",
|
|
414
425
|
"route.finish_reason_unknown": "engine",
|
|
415
426
|
"route.stream_end_ignored": "engine",
|
|
416
427
|
"route.extra_body_reserved_dropped": "engine",
|
|
417
428
|
"model.capability_downgraded": "engine",
|
|
429
|
+
"model.role_defaulted": "engine",
|
|
418
430
|
"context.tool_turn_repaired": "engine",
|
|
431
|
+
"context.image_removed": "engine",
|
|
419
432
|
"task.user_steer_undrained": "engine",
|
|
420
433
|
"task.user_followup_undrained": "engine",
|
|
421
434
|
"steering.parked_input_blocked": "engine",
|
package/dist/core/hooks.d.ts
CHANGED
|
@@ -100,8 +100,11 @@ export interface PostToolBatchEvent extends ClassicEventBase {
|
|
|
100
100
|
readonly injectedThisTurn?: "final_verification" | "finalize";
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
* `classic.UserPromptSubmit`'s `e` — EVERY user-lane entrance:
|
|
104
|
-
* (pre-claim, at the verb) and a parked steer's redelivery, discriminated by {@link source}.
|
|
103
|
+
* `classic.UserPromptSubmit`'s `e` — EVERY user-lane entrance: a top-level leg's objective, a live steer, a wake resume's
|
|
104
|
+
* message (pre-claim, at the verb) and a parked steer's redelivery, discriminated by {@link source}. A delegated child's
|
|
105
|
+
* objective is one only when it carries an operator's words (a retained child resumed through its steer handle);
|
|
106
|
+
* otherwise its delegator wrote it, the screen that can refuse it is the delegator's `classic.PreToolUse` on the call that
|
|
107
|
+
* delegates (its `input.prompt`), and the child opens on `classic.SubagentStart` ({@link SubagentStartEvent}). Pinned: `source`,
|
|
105
108
|
* `inputId`, `actor`. A handler that blocks unconditionally therefore refuses steers too — branch on `source` (and
|
|
106
109
|
* `actor`). Answer: {@link UserPromptSubmitResult}. Block per entrance: objective ⇒ the task ends `blocked`; live steer
|
|
107
110
|
* ⇒ typed `steering.blocked_by_hook`; resume message ⇒ typed pre-claim refusal (the checkpoint stays pending); parked
|
|
@@ -114,7 +117,7 @@ export interface UserPromptSubmitEvent extends ClassicEventBase {
|
|
|
114
117
|
/** The caller's text, raw. */
|
|
115
118
|
readonly prompt: string;
|
|
116
119
|
/**
|
|
117
|
-
* WHICH entrance: `"objective"` (
|
|
120
|
+
* WHICH entrance: `"objective"` (a top-level task's opening prompt), `"steer"` (a live mid-run steer), `"resume_message"`
|
|
118
121
|
* (a wake resume's message, screened pre-claim), `"parked_redelivery"` (a parked steer re-screened on the CURRENT
|
|
119
122
|
* process when any resume kind that drains parked steers redelivers it). ⚠️ DOUBLE ARRIVAL IS CONTRACTUAL: one input
|
|
120
123
|
* can arrive twice (screened live as `"steer"`, parked, re-screened as `"parked_redelivery"`) — idempotency is the
|
|
@@ -140,6 +143,31 @@ export interface UserPromptSubmitEvent extends ClassicEventBase {
|
|
|
140
143
|
*/
|
|
141
144
|
readonly userAttachments?: readonly import("./user-attachment.js").UserAttachmentDeclaration[];
|
|
142
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* `classic.SubagentStart`'s `e` — raised on a delegated child's own leg when it opens on its objective (a first spawn,
|
|
148
|
+
* a revival, a retained child's next prompt; every lane — synchronous, background, fork, workflow), before its first
|
|
149
|
+
* request; never on a top-level leg and never on a checkpoint resume (that continues a turn it already opened). The
|
|
150
|
+
* child's prompt is not here: its parent's model wrote it, and the parent's `classic.PreToolUse` on the delegating call
|
|
151
|
+
* is where it is judged. Pinned: `agentId`, `agentType`. Context only — it NEVER keeps a subagent from starting: a
|
|
152
|
+
* handler that fails (throws, overruns its budget, answers what the station cannot take) is skipped and reported.
|
|
153
|
+
* Answer: {@link SubagentStartResult}.
|
|
154
|
+
*/
|
|
155
|
+
export interface SubagentStartEvent extends ClassicEventBase {
|
|
156
|
+
/** The child's id (its task id) — always present on this event. */
|
|
157
|
+
readonly agentId: string;
|
|
158
|
+
/** The resolved subagent type the child was spawned as ({@link HookInvocationIdentity.agentType}; the word a handler
|
|
159
|
+
* matches on). Absent when the spawner threaded none (a workflow-lane agent). */
|
|
160
|
+
readonly agentType?: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* What a `classic.SubagentStart` handler answers. There is no refusal member: an answer carrying `block` is one the
|
|
164
|
+
* station cannot take (the handler is skipped and reported, the child starts) — a deployment that must keep a child from
|
|
165
|
+
* starting denies the delegating call at `classic.PreToolUse`.
|
|
166
|
+
*/
|
|
167
|
+
export interface SubagentStartResult {
|
|
168
|
+
/** Delivered ahead of the child's prompt in its first request (wrapped as a `<system-reminder>`). */
|
|
169
|
+
additionalContext?: string;
|
|
170
|
+
}
|
|
143
171
|
/**
|
|
144
172
|
* `classic.Stop`'s `e` — raised when the agent WOULD OTHERWISE END its run (no more tool calls, steering and follow-up
|
|
145
173
|
* queues dry). Answer: {@link StopHookResult}; `{ block }` pushes back (the reason is injected and the run continues one
|
|
@@ -553,13 +581,16 @@ export interface ToolGateResult {
|
|
|
553
581
|
gate?: GateOutcome;
|
|
554
582
|
/** The args to execute with — the pass's own immutable copy, the value every judge of the call read (the model's args
|
|
555
583
|
* as taken at the gate's entry, or what a hook, a policy or a person rewrote them to); re-validated by the loop. Present
|
|
556
|
-
* on every allow exit, whether or not anything rewrote (
|
|
584
|
+
* on every allow exit, whether or not anything rewrote ({@link rewrite} says whether, and who); absent on a block and a suspend. */
|
|
557
585
|
updatedInput?: unknown;
|
|
558
586
|
/** The input this pass decided on (what a refusal refused, what an allowed call runs with) as a deep, FROZEN plain-data projection
|
|
559
587
|
* taken at the exit — never the live args: on a refusal every member that is not data (a bigint, a Map, a Date, a class instance, a
|
|
560
588
|
* function, an accessor, a symbol-keyed member) is a `[not recorded: …]` marker; an allow exit meets only the gate's own copy, so there
|
|
561
589
|
* just a bigint, a cycle's closing member and containers past 256 levels are. Beside {@link gate} on both terminal exits; absent on the suspend exit. */
|
|
562
590
|
finalInput?: unknown;
|
|
591
|
+
/** The allow exit's record of a rewrite: `finalInput` and who replaced the args, when they are not the ones the entry took
|
|
592
|
+
* (`tool_end.rewrite`, the one home of its contract). Absent on every other exit and on an allow that runs the entry's bytes. */
|
|
593
|
+
rewrite?: import("./task-event.js").ToolInputRewrite;
|
|
563
594
|
/** A blocking refusal's structured details, when the refusing station minted any (the shell read station's
|
|
564
595
|
* `read_path_denied` / `readonly_out_of_root` cards): the loop attaches them to the error result it mints
|
|
565
596
|
* from `reason`, so the refusal reaches `tool_end.structured` / `errorCode` exactly as the tool's own
|
package/dist/core/hooks.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { argsAsTheToolReads, stampArgsReading } from "./effective-path-target.js";
|
|
2
|
+
import { extensionAuthors, noteRewrite, screeningAuthorship } from "./rewrite-rejudge.js";
|
|
2
3
|
import { abortedSeatDeny, decisionText, describeThrown, isEngineRefusal, ownArgs, ownedReading, refuseOutOfContractDecision, unaskedSeatAnswer } from "./tool-policy.js";
|
|
3
4
|
import { createSettlementLedger, engineFailClosedExit, hookDenyExit, unownedArgsExit } from "./runner/gate-exit.js";
|
|
4
|
-
import { classicEventBase, dispatchClassic, ENGINE_CORE_ANSWER, engineCore, failedHandlerClause, judgedInputOf, observePermissionDenied,
|
|
5
|
+
import { classicEventBase, dispatchClassic, ENGINE_CORE_ANSWER, engineCore, failedHandlerClause, judgedInputOf, observePermissionDenied, withInstallation } from "./mods/stations.js";
|
|
5
6
|
import { runGateFold } from "./gate-fold.js";
|
|
6
7
|
import { runGateLanes } from "./gate-lanes.js";
|
|
7
8
|
export { normalizeOrgGateVerdict, normalizePersistedRuleHit } from "./rule-lane-reads.js";
|
|
@@ -128,10 +129,11 @@ export function createPreToolUseScreening(input) {
|
|
|
128
129
|
};
|
|
129
130
|
};
|
|
130
131
|
return {
|
|
131
|
-
screen: async (args, subject) => {
|
|
132
|
+
screen: async (args, subject, readAs) => {
|
|
132
133
|
let outcome;
|
|
134
|
+
const authorship = screeningAuthorship(readAs ?? {});
|
|
133
135
|
try {
|
|
134
|
-
outcome = await dispatchClassic(bus, "classic.PreToolUse", eventOf(args), { ...(input.abortSignal !== undefined ? { signal: input.abortSignal } : {}), checkAnswer: preToolUseAnswerViolation, ranks: PRE_TOOL_USE_RANKS });
|
|
136
|
+
outcome = await dispatchClassic(bus, "classic.PreToolUse", eventOf(args), { ...(input.abortSignal !== undefined ? { signal: input.abortSignal } : {}), checkAnswer: (a, e, by, below) => preToolUseAnswerViolation(a) ?? authorship.record(a, e, by, below), ranks: PRE_TOOL_USE_RANKS });
|
|
135
137
|
}
|
|
136
138
|
catch (err) {
|
|
137
139
|
return { kind: "refused", reason: preToolUseRefusedReason(subject, { kind: "failed", registration: "engine", cause: "threw", reason: `could not raise the screening: ${describeThrown(err)}`, skipped: [] }) };
|
|
@@ -139,9 +141,11 @@ export function createPreToolUseScreening(input) {
|
|
|
139
141
|
if (outcome === undefined || outcome.kind === "aborted")
|
|
140
142
|
return { kind: "refused", reason: preToolUseRefusedReason(subject, undefined) };
|
|
141
143
|
if (outcome.kind === "failed")
|
|
142
|
-
return { kind: "refused", reason: preToolUseRefusedReason(subject, outcome) };
|
|
144
|
+
return { kind: "refused", reason: preToolUseRefusedReason(subject, outcome), extension: outcome.registration };
|
|
143
145
|
const r = screenPreToolUseResult(outcome.answer);
|
|
144
|
-
|
|
146
|
+
const answer = r === null || r === false ? undefined : r;
|
|
147
|
+
const rewrittenBy = authorship.of(outcome.answer);
|
|
148
|
+
return { kind: "answered", answer, ...(outcome.answeredBy !== undefined ? { answeredBy: outcome.answeredBy } : {}), ...(answer?.updatedInput !== undefined ? { rewrittenBy: rewrittenBy.length > 0 || outcome.answeredBy === undefined ? rewrittenBy : [outcome.answeredBy] } : {}) };
|
|
145
149
|
},
|
|
146
150
|
deniedReason: (answer) => decisionText(answer) ?? `tool "${toolName}" blocked by a PreToolUse hook`,
|
|
147
151
|
};
|
|
@@ -191,8 +195,7 @@ export function createPreToolUseConstraintPolicy(chain, env) {
|
|
|
191
195
|
return r.updatedInput !== undefined ? { action: "allow", updatedInput: r.updatedInput } : { action: "allow" };
|
|
192
196
|
},
|
|
193
197
|
}, "hook");
|
|
194
|
-
|
|
195
|
-
return minted;
|
|
198
|
+
return withInstallation(minted, chain);
|
|
196
199
|
}
|
|
197
200
|
export function askCarryRowMembers(carry) {
|
|
198
201
|
if (carry === undefined)
|
|
@@ -237,6 +240,7 @@ export async function runToolGate(input) {
|
|
|
237
240
|
screening,
|
|
238
241
|
afterFold: runGateLanes,
|
|
239
242
|
currentInput: args,
|
|
243
|
+
rewrites: { entry: args, by: [] },
|
|
240
244
|
req: Object.freeze({ toolName, args, toolCallId, ...(() => { const f = input.toolFaceOf?.(toolName); const read = event.readArguments; if (f !== undefined && read !== undefined)
|
|
241
245
|
stampArgsReading(f, ownedReading(read)); return f !== undefined ? { face: f } : {}; })() }),
|
|
242
246
|
preToolContext: [],
|
|
@@ -251,9 +255,9 @@ export async function runToolGate(input) {
|
|
|
251
255
|
if (!owned.ok)
|
|
252
256
|
return await unownedArgsExit(pass, owned.reason);
|
|
253
257
|
if (screening !== undefined) {
|
|
254
|
-
const screened = await screening.screen(pass.currentInput, `this call to "${toolName}"
|
|
258
|
+
const screened = await screening.screen(pass.currentInput, `this call to "${toolName}"`, pass.req);
|
|
255
259
|
if (screened.kind === "refused") {
|
|
256
|
-
return await engineFailClosedExit(pass, screened.reason);
|
|
260
|
+
return await engineFailClosedExit(pass, screened.reason, screened.extension);
|
|
257
261
|
}
|
|
258
262
|
const r = screened.answer;
|
|
259
263
|
if (r) {
|
|
@@ -261,10 +265,12 @@ export async function runToolGate(input) {
|
|
|
261
265
|
pass.preToolContext.push(r.additionalContext);
|
|
262
266
|
}
|
|
263
267
|
if (r.action === "deny") {
|
|
264
|
-
return hookDenyExit(pass, screening.deniedReason(r));
|
|
268
|
+
return hookDenyExit(pass, screening.deniedReason(r), screened.answeredBy);
|
|
265
269
|
}
|
|
266
270
|
if (r.updatedInput !== undefined) {
|
|
267
|
-
|
|
271
|
+
const rewritten = argsAsTheToolReads(pass.req, r.updatedInput);
|
|
272
|
+
noteRewrite(pass.rewrites, pass.req, pass.currentInput, rewritten, extensionAuthors(screened.rewrittenBy ?? []));
|
|
273
|
+
pass.currentInput = rewritten;
|
|
268
274
|
}
|
|
269
275
|
if (r.action === "ask") {
|
|
270
276
|
pass.hookAsk = r;
|
|
@@ -32,6 +32,7 @@ const HANDLED_HUMAN_INPUT_KEYS = {
|
|
|
32
32
|
principal: "forwarded",
|
|
33
33
|
entryId: "forwarded",
|
|
34
34
|
attachments: "forwarded",
|
|
35
|
+
runOrigin: "forwarded",
|
|
35
36
|
};
|
|
36
37
|
export function buildHumanInputEvent(input) {
|
|
37
38
|
void HANDLED_HUMAN_INPUT_KEYS;
|
|
@@ -47,6 +48,7 @@ export function buildHumanInputEvent(input) {
|
|
|
47
48
|
...(input.principal !== undefined ? { principal: input.principal } : {}),
|
|
48
49
|
...(input.entryId !== undefined ? { entryId: input.entryId } : {}),
|
|
49
50
|
...(input.attachments !== undefined && input.attachments.length > 0 ? { attachments: input.attachments.map((a) => ({ ...a })) } : {}),
|
|
51
|
+
...(input.runOrigin !== undefined ? { runOrigin: input.runOrigin } : {}),
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
export function buildAppliedHumanInputEvent(input) {
|
|
@@ -59,5 +61,6 @@ export function buildAppliedHumanInputEvent(input) {
|
|
|
59
61
|
...(input.actor !== undefined ? { actor: input.actor } : {}),
|
|
60
62
|
...(input.actor?.issuer !== undefined ? { issuer: input.actor.issuer } : {}),
|
|
61
63
|
...(input.principal !== undefined ? { principal: input.principal } : {}),
|
|
64
|
+
...(input.runOrigin !== undefined ? { runOrigin: input.runOrigin } : {}),
|
|
62
65
|
});
|
|
63
66
|
}
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* ① the claimed type is one the content API accepts (png / jpeg / gif / webp — the four
|
|
7
7
|
* {@link imageMagicMatches} can verify);
|
|
8
8
|
* ② the raw bytes are within the read cap (5 MiB without a downsampler, 64 MiB with one);
|
|
9
|
-
* ③ the bytes
|
|
10
|
-
*
|
|
9
|
+
* ③ the bytes open with the claimed type's header — its signature and the first structure the format requires
|
|
10
|
+
* ({@link IMAGE_HEADER_CHECKS}); an empty / text / mis-named "png", or an Apple-optimized PNG, would otherwise
|
|
11
|
+
* become a malformed block that 400s the NEXT whole provider request;
|
|
11
12
|
* ④ optional downsample (when a downsampler is supplied; a processing failure keeps the original
|
|
12
13
|
* bytes, CC's catch → createImageResponse(original)), then the provider's hard limit, which is on the
|
|
13
14
|
* BASE64 length, not raw bytes.
|
|
@@ -38,9 +39,9 @@ export declare const MAX_IMAGE_READ_BYTES: number;
|
|
|
38
39
|
export declare const MAX_IMAGE_DOWNSAMPLE_INPUT_BYTES: number;
|
|
39
40
|
/** Max raw size sent whole as a document block (CC `PDF_TARGET_RAW_SIZE`). */
|
|
40
41
|
export declare const PDF_TARGET_RAW_SIZE: number;
|
|
41
|
-
/** Verify the raw bytes actually ARE the image format the
|
|
42
|
-
* is forgeable: a `.png` holding text / an empty file / a truncated blob
|
|
43
|
-
* `ImageContent` that makes the NEXT provider request fail (400). Pure — no I/O. */
|
|
42
|
+
/** Verify the raw bytes actually ARE the image format the claimed type names ({@link IMAGE_HEADER_CHECKS}). Extension
|
|
43
|
+
* alone is forgeable: a `.png` holding text / an empty file / a truncated blob / an Apple-optimized PNG would otherwise
|
|
44
|
+
* become a malformed `ImageContent` that makes the NEXT provider request fail (400). Pure — no I/O. */
|
|
44
45
|
export declare function imageMagicMatches(bytes: Uint8Array, mimeType: string): boolean;
|
|
45
46
|
/** True when the bytes start with the `%PDF-` magic. Magic outranks extension both ways: a mis-named
|
|
46
47
|
* `.pdf` without it is refused, and a non-`.pdf` file carrying it is read AS a PDF. */
|
|
@@ -4,20 +4,24 @@ import { readMember } from "./thrown-value.js";
|
|
|
4
4
|
export const MAX_IMAGE_READ_BYTES = 5 * 1024 * 1024;
|
|
5
5
|
export const MAX_IMAGE_DOWNSAMPLE_INPUT_BYTES = 64 * 1024 * 1024;
|
|
6
6
|
export const PDF_TARGET_RAW_SIZE = 20 * 1024 * 1024;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
case "image/jpeg":
|
|
13
|
-
return b.length >= 3 && b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff;
|
|
14
|
-
case "image/gif":
|
|
15
|
-
return b.length >= 6 && b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x38 && (b[4] === 0x37 || b[4] === 0x39) && b[5] === 0x61;
|
|
16
|
-
case "image/webp":
|
|
17
|
-
return b.length >= 12 && b[0] === 0x52 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x46 && b[8] === 0x57 && b[9] === 0x45 && b[10] === 0x42 && b[11] === 0x50;
|
|
18
|
-
default:
|
|
7
|
+
const spells = (b, at, text) => {
|
|
8
|
+
if (b.length < at + text.length)
|
|
9
|
+
return false;
|
|
10
|
+
for (let i = 0; i < text.length; i++)
|
|
11
|
+
if (b[at + i] !== text.charCodeAt(i))
|
|
19
12
|
return false;
|
|
20
|
-
|
|
13
|
+
return true;
|
|
14
|
+
};
|
|
15
|
+
const u32be = (b, at) => ((b[at] << 24) >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
|
|
16
|
+
const u16le = (b, at) => b[at] + (b[at + 1] << 8);
|
|
17
|
+
const IMAGE_HEADER_CHECKS = {
|
|
18
|
+
"image/png": (b) => b.length >= 24 && spells(b, 0, "\x89PNG\r\n\x1a\n") && u32be(b, 8) === 13 && spells(b, 12, "IHDR") && u32be(b, 16) > 0 && u32be(b, 20) > 0,
|
|
19
|
+
"image/jpeg": (b) => b.length >= 4 && b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff && b[3] >= 0xc0,
|
|
20
|
+
"image/gif": (b) => b.length >= 13 && (spells(b, 0, "GIF87a") || spells(b, 0, "GIF89a")) && u16le(b, 6) > 0 && u16le(b, 8) > 0,
|
|
21
|
+
"image/webp": (b) => b.length >= 16 && spells(b, 0, "RIFF") && spells(b, 8, "WEBP") && (spells(b, 12, "VP8 ") || spells(b, 12, "VP8L") || spells(b, 12, "VP8X")),
|
|
22
|
+
};
|
|
23
|
+
export function imageMagicMatches(bytes, mimeType) {
|
|
24
|
+
return Object.hasOwn(IMAGE_HEADER_CHECKS, mimeType) && IMAGE_HEADER_CHECKS[mimeType](bytes);
|
|
21
25
|
}
|
|
22
26
|
export function pdfMagicMatches(bytes) {
|
|
23
27
|
return bytes.length >= 5 && bytes[0] === 0x25 && bytes[1] === 0x50 && bytes[2] === 0x44 && bytes[3] === 0x46 && bytes[4] === 0x2d;
|
|
@@ -72,7 +76,7 @@ const REFUSAL_CLAUSE = {
|
|
|
72
76
|
undecodable: () => "it carried no base64 payload",
|
|
73
77
|
mime_unsupported: (r) => `${r.mimeType ?? "its media type"} is not a ${r.type} type the model accepts (${ADMITTED_FOR[r.type].join(", ")})`,
|
|
74
78
|
raw_too_large: (r) => `its ${r.bytes} bytes exceed the ${r.limit}-byte cap`,
|
|
75
|
-
magic_mismatch: (r) => `its ${r.bytes} bytes do not
|
|
79
|
+
magic_mismatch: (r) => `its ${r.bytes} bytes do not open with a valid ${r.mimeType ?? `${r.type}`} header`,
|
|
76
80
|
base64_too_large: (r) => `its base64 encoding exceeds the ${r.limit}-character provider limit (${r.bytes} bytes)`,
|
|
77
81
|
};
|
|
78
82
|
const placeholderOf = (toolName, r) => ({
|
|
@@ -3,7 +3,7 @@ import { type ToolAxesSurface } from "./mcp-server-spec.js";
|
|
|
3
3
|
import type { ToolPolicy } from "./tool-policy.js";
|
|
4
4
|
/** The closed set of administratively lockable configuration keys. Adding a member is a deliberate
|
|
5
5
|
* edit HERE (tsc forces the registry row), never a free-form string. */
|
|
6
|
-
export type LockedKey = "mcp" | "toolPolicy" | "compliancePosture" | "retentionPolicy";
|
|
6
|
+
export type LockedKey = "mcp" | "a2a" | "toolPolicy" | "compliancePosture" | "retentionPolicy";
|
|
7
7
|
/**
|
|
8
8
|
* The closed locked-key registry: each key names the exact `TaskSpec` fields it guards. Keys whose
|
|
9
9
|
* field set is EMPTY guard deployment-only surfaces (`compliancePosture` rides
|
|
@@ -18,6 +18,9 @@ export declare const LOCKED_KEY_REGISTRY: {
|
|
|
18
18
|
readonly mcp: {
|
|
19
19
|
readonly specFields: readonly ["mcp"];
|
|
20
20
|
};
|
|
21
|
+
readonly a2a: {
|
|
22
|
+
readonly specFields: readonly ["a2a"];
|
|
23
|
+
};
|
|
21
24
|
readonly toolPolicy: {
|
|
22
25
|
readonly specFields: readonly ["toolPolicy", "basePolicyForResumeEdit"];
|
|
23
26
|
};
|
|
@@ -48,7 +51,7 @@ export interface LockedPreflight {
|
|
|
48
51
|
mcp: TaskSpec["mcp"];
|
|
49
52
|
/** The task's A2A peers: a frozen SNAPSHOT of `spec.a2a` whose `toolAxes` were judged here by the same reader and with the same
|
|
50
53
|
* disposition as an MCP server's (a declaration that does not fit refused the whole prepare), each peer carrying the reader's plain
|
|
51
|
-
* copy; `undefined` when the spec declares no peer (absent or empty). Read once, here: the peers dialed are the peers judged. */
|
|
54
|
+
* copy; `undefined` when the spec declares no peer (absent or empty) or `a2a` is locked (a declared list has already been refused). Read once, here: the peers dialed are the peers judged. */
|
|
52
55
|
a2a: TaskSpec["a2a"];
|
|
53
56
|
/** Effective caller tool policy: the same `spec.toolPolicy ?? deps.toolPolicy` slot the gate has
|
|
54
57
|
* always enforced, resolved ONCE here. With `toolPolicy` locked, the deployment's own
|
|
@@ -184,7 +187,21 @@ export declare function judgeEntryToolFaces(copy: McpServerSpec): {
|
|
|
184
187
|
code: string;
|
|
185
188
|
};
|
|
186
189
|
};
|
|
187
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* The `sessionMetaKey` question for ONE snapshot MCP entry — asked by the door and the materialization entrance like its siblings, through
|
|
192
|
+
* the one judge ({@link judgeSessionMetaKey}); a key that cannot ride refuses under `config.invalid_argument`, naming the server and the key.
|
|
193
|
+
* The entry is unchanged (a string is already the engine's own copy).
|
|
194
|
+
*/
|
|
195
|
+
export declare function judgeEntrySessionMetaKey(copy: McpServerSpec): {
|
|
196
|
+
ok: true;
|
|
197
|
+
entry: McpServerSpec;
|
|
198
|
+
} | {
|
|
199
|
+
ok: false;
|
|
200
|
+
error: Error & {
|
|
201
|
+
code: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
/** Everything a snapshot MCP entry declares beyond its plain data, judged: its `toolAxes` ({@link judgeEntryToolAxes}), its `toolFaces` ({@link judgeEntryToolFaces}), its `sessionMetaKey` ({@link judgeEntrySessionMetaKey}). */
|
|
188
205
|
export declare function judgeMcpEntryDeclarations(copy: McpServerSpec): {
|
|
189
206
|
ok: true;
|
|
190
207
|
entry: McpServerSpec;
|
|
@@ -2,12 +2,15 @@ import { types } from "node:util";
|
|
|
2
2
|
import { DECLARATION_PATH_RULES, NO_DECLARATION_PATH_RULES, declarationFaultOf, declarerWord, readToolAxes, receiveDeclaration, toolAxesRefusal } from "./mcp-server-spec.js";
|
|
3
3
|
import { isPlainRecord, receive } from "./mods/kernel/receive.js";
|
|
4
4
|
import { readToolFaces } from "./tool-face-reader.js";
|
|
5
|
+
import { judgeSessionMetaKey } from "./mcp-call-meta.js";
|
|
5
6
|
import { CONFIG_RECEIPT_MODE } from "./own-property-receipt.js";
|
|
6
7
|
import { isToolContentOrigin, TOOL_CONTENT_ORIGINS } from "./memory-engine/content-origin.js";
|
|
7
8
|
import { inlineUntrusted } from "./untrusted-text.js";
|
|
8
9
|
import { assertNoRetiredToolPolicyKeys } from "./retired-keys.js";
|
|
10
|
+
import { CREDENTIALS_MEMBER, declaredCredentials, peerSeatMissing, retiredValueMember } from "./peer-seat.js";
|
|
9
11
|
export const LOCKED_KEY_REGISTRY = {
|
|
10
12
|
mcp: { specFields: ["mcp"] },
|
|
13
|
+
a2a: { specFields: ["a2a"] },
|
|
11
14
|
toolPolicy: { specFields: ["toolPolicy", "basePolicyForResumeEdit"] },
|
|
12
15
|
compliancePosture: { specFields: [] },
|
|
13
16
|
retentionPolicy: { specFields: [] },
|
|
@@ -89,8 +92,30 @@ export function snapshotDeclaredEntry(entry, at) {
|
|
|
89
92
|
throw entryFaultRefusal(at, declarer, received.fault.path, received.fault.problem);
|
|
90
93
|
if (!isPlainRecord(received.value))
|
|
91
94
|
throw unreadableDeclaration(at, declarer, "an entry", `it is ${inlineUntrusted(describeDeclared(received.value), 80)}, not an object`);
|
|
95
|
+
const retired = retiredValueMember(received.value, at);
|
|
96
|
+
if (retired !== undefined) {
|
|
97
|
+
throw declarationRefusal("config.credential_in_declaration", at, declarer, `declares ${retired.join(".")}, a member that carried values and is retired: a declaration names the peer and at most one opaque reference (${CREDENTIALS_MEMBER[at].join(".")}); the pieces a request carries are answered per send by the deployment's peer seat (RunnerDeps.peerSeat). The value is not repeated here.`);
|
|
98
|
+
}
|
|
99
|
+
const credentials = declaredCredentials(received.value, at);
|
|
100
|
+
if ("problem" in credentials) {
|
|
101
|
+
throw declarationRefusal("config.credential_ref_invalid", at, declarer, `declares ${CREDENTIALS_MEMBER[at].join(".")} that is not a credential reference (${inlineUntrusted(credentials.problem, 160)}).`);
|
|
102
|
+
}
|
|
92
103
|
return received.value;
|
|
93
104
|
}
|
|
105
|
+
function declarationRefusal(code, at, declarer, sentence) {
|
|
106
|
+
const refusal = codedError(code, `${declarerWord(at)}${declarer === undefined ? "" : ` ${declarerNameOf(declarer)}`} ${sentence}`);
|
|
107
|
+
if (declarer !== undefined)
|
|
108
|
+
Object.defineProperty(refusal, "declarer", { value: declarer, enumerable: true, writable: false, configurable: false });
|
|
109
|
+
return refusal;
|
|
110
|
+
}
|
|
111
|
+
function assertPeerSeatFor(entries, at, seat) {
|
|
112
|
+
for (const entry of entries ?? []) {
|
|
113
|
+
const read = declaredCredentials(entry, at);
|
|
114
|
+
const missing = "ref" in read ? peerSeatMissing(`${declarerWord(at)} ${declarerNameOf(entry.name)}`, read.ref, seat) : undefined;
|
|
115
|
+
if (missing !== undefined)
|
|
116
|
+
throw missing;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
94
119
|
function describeDeclared(value) {
|
|
95
120
|
try {
|
|
96
121
|
return JSON.stringify(value) ?? String(value);
|
|
@@ -139,9 +164,16 @@ export function judgeEntryToolFaces(copy) {
|
|
|
139
164
|
return { ok: false, error: toolFacesRefusal(declarerNameOf(copy.name), faces.problem) };
|
|
140
165
|
return { ok: true, entry: Object.freeze((faces.faces === undefined ? rest : { ...rest, toolFaces: deepFrozen(faces.faces) })) };
|
|
141
166
|
}
|
|
167
|
+
export function judgeEntrySessionMetaKey(copy) {
|
|
168
|
+
const read = judgeSessionMetaKey(copy.sessionMetaKey);
|
|
169
|
+
if (!("problem" in read))
|
|
170
|
+
return { ok: true, entry: copy };
|
|
171
|
+
return { ok: false, error: codedError("config.invalid_argument", `${declarerWord("mcp")} ${declarerNameOf(copy.name)} declares ${inlineUntrusted(read.problem, 200)}. The key decides where the leg's session id rides on this server's requests, so it is refused rather than dropped or defaulted — a connector keyed on a session it never receives would share one state across every session.`) };
|
|
172
|
+
}
|
|
142
173
|
export function judgeMcpEntryDeclarations(copy) {
|
|
143
174
|
const axes = judgeEntryToolAxes(copy, "mcp");
|
|
144
|
-
|
|
175
|
+
const faces = axes.ok ? judgeEntryToolFaces(axes.entry) : axes;
|
|
176
|
+
return faces.ok ? judgeEntrySessionMetaKey(faces.entry) : faces;
|
|
145
177
|
}
|
|
146
178
|
function declaredEntriesOf(declared, at) {
|
|
147
179
|
const field = at;
|
|
@@ -210,11 +242,16 @@ export function preflightLockedConfig(spec, deps, enter = ENTER_AS_IS) {
|
|
|
210
242
|
enter(!toolPolicyLocked && task.basePolicyForResumeEdit != null ? "taskConfig" : "deps", () => assertNoRetiredToolPolicyKeys(policies.basePolicyForResumeEdit));
|
|
211
243
|
const declaredServers = lockedKeys.has("mcp") ? undefined : spec.mcp;
|
|
212
244
|
const mcp = declaredServers === undefined ? undefined : enter("taskConfig", () => snapshotAndValidateMcpEntries(declaredServers));
|
|
213
|
-
const declaredPeers = spec.a2a;
|
|
245
|
+
const declaredPeers = lockedKeys.has("a2a") ? undefined : spec.a2a;
|
|
246
|
+
const a2a = declaredPeers === undefined ? undefined : enter("taskConfig", () => snapshotAndValidateA2aEntries(declaredPeers));
|
|
247
|
+
enter("taskConfig", () => {
|
|
248
|
+
assertPeerSeatFor(mcp, "mcp", deps.peerSeat);
|
|
249
|
+
assertPeerSeatFor(a2a, "a2a", deps.peerSeat);
|
|
250
|
+
});
|
|
214
251
|
return {
|
|
215
252
|
lockedKeys,
|
|
216
253
|
mcp,
|
|
217
|
-
a2a
|
|
254
|
+
a2a,
|
|
218
255
|
...policies,
|
|
219
256
|
};
|
|
220
257
|
}
|