@sema-agent/core 7.59.0 → 7.60.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 +564 -0
- package/dist/agents/agent-definition.d.ts +7 -0
- package/dist/agents/agent-definition.js +12 -0
- package/dist/agents/agent-transcript-tool.d.ts +2 -1
- package/dist/agents/agent-transcript-tool.js +3 -1
- package/dist/agents/child-model-seat.js +6 -3
- package/dist/agents/cumulative-stats.js +0 -1
- package/dist/agents/inherited-tool-pool.d.ts +26 -1
- package/dist/agents/inherited-tool-pool.js +22 -0
- package/dist/agents/retain-ledger.d.ts +11 -1
- package/dist/agents/retain-ledger.js +13 -2
- package/dist/agents/roster-store.d.ts +1 -1
- package/dist/agents/roster-store.js +3 -1
- package/dist/agents/send-message-tool.d.ts +8 -19
- package/dist/agents/send-message-tool.js +11 -38
- package/dist/agents/subagent.d.ts +51 -17
- package/dist/agents/subagent.js +117 -78
- package/dist/agents/tool-filter.d.ts +1 -3
- package/dist/agents/tool-filter.js +4 -12
- package/dist/bench/metrics.d.ts +3 -5
- package/dist/bench/metrics.js +0 -1
- package/dist/brain/degrading.js +3 -1
- package/dist/brain/route-adjudicator.js +3 -1
- package/dist/brain/status-sink.d.ts +7 -1
- package/dist/brain/status-sink.js +6 -0
- package/dist/brain/timeout.d.ts +3 -1
- package/dist/brain/timeout.js +18 -5
- package/dist/core/a2a.d.ts +15 -5
- package/dist/core/a2a.js +34 -19
- package/dist/core/agent-definition.d.ts +20 -0
- package/dist/core/allow-entry.d.ts +2 -0
- package/dist/core/allow-entry.js +3 -1
- package/dist/core/artifact-host.d.ts +0 -2
- package/dist/core/artifact-host.js +0 -1
- package/dist/core/auto-mode-defaults.d.ts +8 -0
- package/dist/core/auto-mode-defaults.js +1 -0
- package/dist/core/auto-mode-rebuild.d.ts +2 -1
- package/dist/core/auto-mode.d.ts +39 -4
- package/dist/core/auto-mode.js +63 -12
- package/dist/core/background-agent-store.d.ts +10 -1
- package/dist/core/background-agent-store.js +3 -2
- package/dist/core/background-shell.d.ts +12 -1
- package/dist/core/background-shell.js +12 -0
- package/dist/core/checkpoint-store.d.ts +8 -13
- package/dist/core/checkpoint-store.js +4 -3
- package/dist/core/compliance.d.ts +1 -1
- package/dist/core/credential-echo.d.ts +52 -0
- package/dist/core/credential-echo.js +65 -0
- package/dist/core/credential-vocabulary.d.ts +13 -3
- package/dist/core/credential-vocabulary.js +12 -4
- package/dist/core/cross-boundary-taint.d.ts +4 -5
- package/dist/core/engine-notice.d.ts +58 -15
- package/dist/core/frame-settlement.d.ts +5 -0
- package/dist/core/frame-settlement.js +4 -0
- package/dist/core/gate-fold.js +7 -5
- package/dist/core/gate-lanes.js +39 -8
- package/dist/core/governance-codes.d.ts +9 -1
- package/dist/core/governance-codes.js +12 -0
- package/dist/core/hands-band-screen.js +0 -1
- package/dist/core/hands-band.d.ts +0 -3
- package/dist/core/hooks.d.ts +39 -56
- package/dist/core/hooks.js +123 -77
- package/dist/core/image-admission.d.ts +104 -51
- package/dist/core/image-admission.js +170 -46
- package/dist/core/image-downsample.d.ts +36 -69
- package/dist/core/image-downsample.js +111 -73
- package/dist/core/integer-option.d.ts +21 -0
- package/dist/core/integer-option.js +13 -0
- package/dist/core/locked-config.d.ts +54 -3
- package/dist/core/locked-config.js +81 -50
- package/dist/core/mcp-call-meta.d.ts +2 -2
- package/dist/core/mcp-call-meta.js +9 -10
- package/dist/core/mcp-failure.d.ts +9 -3
- package/dist/core/mcp-failure.js +10 -0
- package/dist/core/mcp-host-seat.d.ts +92 -0
- package/dist/core/mcp-host-seat.js +131 -0
- package/dist/core/mcp-probe.d.ts +7 -2
- package/dist/core/mcp-probe.js +7 -2
- package/dist/core/mcp-server-spec.d.ts +38 -9
- package/dist/core/mcp-server-spec.js +55 -21
- package/dist/core/mcp.d.ts +17 -6
- package/dist/core/mcp.js +67 -55
- package/dist/core/memory-admission.d.ts +23 -6
- package/dist/core/memory-admission.js +19 -9
- package/dist/core/memory-engine/content-origin.d.ts +13 -0
- package/dist/core/memory-engine/content-origin.js +21 -3
- package/dist/core/memory-engine/index.d.ts +2 -1
- package/dist/core/memory-engine/index.js +2 -1
- package/dist/core/memory-engine/scope-contract.d.ts +13 -3
- package/dist/core/memory-engine/scope-contract.js +2 -2
- package/dist/core/memory-engine/sync-client.d.ts +45 -11
- package/dist/core/memory-engine/sync-client.js +82 -11
- package/dist/core/memory-engine/sync-report.d.ts +103 -0
- package/dist/core/memory-engine/sync-report.js +119 -0
- package/dist/core/memory-engine/sync.d.ts +4 -2
- package/dist/core/mode-policy.d.ts +9 -1
- package/dist/core/mode-policy.js +11 -1
- package/dist/core/model-receipt.d.ts +39 -0
- package/dist/core/model-receipt.js +139 -0
- package/dist/core/mods/agent-stations.d.ts +65 -0
- package/dist/core/mods/agent-stations.js +105 -0
- package/dist/core/mods/kernel/dispatch.d.ts +5 -1
- package/dist/core/mods/kernel/dispatch.js +4 -4
- package/dist/core/mods/kernel/events.d.ts +10 -4
- package/dist/core/mods/kernel/events.js +10 -6
- package/dist/core/mods/kernel/receive.d.ts +5 -0
- package/dist/core/mods/kernel/receive.js +10 -0
- package/dist/core/mods/lifecycle-stations.d.ts +41 -0
- package/dist/core/mods/lifecycle-stations.js +35 -0
- package/dist/core/mods/stations.d.ts +51 -59
- package/dist/core/mods/stations.js +32 -42
- package/dist/core/mods/tool-call.d.ts +10 -4
- package/dist/core/mods/tool-call.js +28 -12
- package/dist/core/mounted-mcp.d.ts +5 -0
- package/dist/core/mounted-mcp.js +2 -2
- package/dist/core/namespaced-rule-name.d.ts +7 -1
- package/dist/core/namespaced-rule-name.js +13 -2
- package/dist/core/oracle-isolation.js +1 -1
- package/dist/core/own-property-receipt.d.ts +3 -0
- package/dist/core/own-property-receipt.js +3 -0
- package/dist/core/park-selfcheck.js +8 -8
- package/dist/core/peer-seat.d.ts +63 -8
- package/dist/core/peer-seat.js +179 -34
- package/dist/core/permission-rule-consent.d.ts +0 -21
- package/dist/core/permission-rule-consent.js +1 -2
- package/dist/core/permission-rule-model.d.ts +4 -2
- package/dist/core/permission-rule-model.js +7 -6
- package/dist/core/protocol-http-auth.d.ts +14 -2
- package/dist/core/protocol-http-auth.js +16 -7
- package/dist/core/read-face-seats.d.ts +7 -5
- package/dist/core/read-face-seats.js +4 -1
- package/dist/core/redaction-marks.d.ts +4 -3
- package/dist/core/redaction-marks.js +2 -2
- package/dist/core/remote-env.d.ts +146 -98
- package/dist/core/remote-env.js +113 -14
- package/dist/core/retention.js +37 -12
- package/dist/core/retired-keys.d.ts +6 -1
- package/dist/core/retired-keys.js +4 -1
- package/dist/core/rewrite-rejudge.d.ts +12 -5
- package/dist/core/rewrite-rejudge.js +9 -5
- package/dist/core/roles.d.ts +37 -3
- package/dist/core/roles.js +126 -78
- package/dist/core/rule-owner.d.ts +3 -0
- package/dist/core/runner/assemble-result.d.ts +0 -5
- package/dist/core/runner/assemble-result.js +0 -1
- package/dist/core/runner/call-hook-stations.d.ts +17 -10
- package/dist/core/runner/call-hook-stations.js +21 -10
- package/dist/core/runner/child-tree.d.ts +7 -8
- package/dist/core/runner/child-tree.js +6 -6
- package/dist/core/runner/classifier-ladder.d.ts +10 -2
- package/dist/core/runner/classifier-ladder.js +39 -8
- package/dist/core/runner/construction-doors.js +5 -0
- package/dist/core/runner/contracts.d.ts +62 -41
- package/dist/core/runner/cross-boundary-lane.d.ts +3 -5
- package/dist/core/runner/cross-boundary-lane.js +11 -2
- package/dist/core/runner/env-capability-census.d.ts +15 -20
- package/dist/core/runner/env-capability-census.js +25 -34
- package/dist/core/runner/file-history-request.d.ts +2 -2
- package/dist/core/runner/file-history-request.js +0 -8
- package/dist/core/runner/gate-exit.d.ts +75 -7
- package/dist/core/runner/gate-exit.js +20 -1
- package/dist/core/runner/git-status-frame.d.ts +5 -2
- package/dist/core/runner/git-status-frame.js +3 -4
- package/dist/core/runner/image.d.ts +7 -2
- package/dist/core/runner/image.js +14 -8
- package/dist/core/runner/inline-image.d.ts +10 -8
- package/dist/core/runner/inline-image.js +11 -9
- package/dist/core/runner/memory-consolidation-driver.js +4 -4
- package/dist/core/runner/permission-rule-lanes.js +1 -1
- package/dist/core/runner/prepare-boundary-parks.d.ts +2 -2
- package/dist/core/runner/prepare-boundary-parks.js +3 -3
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +4 -3
- package/dist/core/runner/prepare-config-doors.d.ts +6 -1
- package/dist/core/runner/prepare-config-doors.js +14 -9
- package/dist/core/runner/prepare-delegation-surface.d.ts +5 -3
- package/dist/core/runner/prepare-delegation-surface.js +4 -4
- package/dist/core/runner/prepare-file-history.d.ts +10 -12
- package/dist/core/runner/prepare-file-history.js +3 -12
- package/dist/core/runner/prepare-gate-stations.d.ts +4 -3
- package/dist/core/runner/prepare-gate-stations.js +4 -3
- package/dist/core/runner/prepare-hands-readface.d.ts +3 -1
- package/dist/core/runner/prepare-hands-readface.js +15 -7
- package/dist/core/runner/prepare-inherited-gate.d.ts +5 -4
- package/dist/core/runner/prepare-inherited-gate.js +9 -5
- package/dist/core/runner/prepare-memory-engine-session.js +1 -1
- package/dist/core/runner/prepare-memory.d.ts +2 -2
- package/dist/core/runner/prepare-memory.js +2 -2
- package/dist/core/runner/prepare-park-ask.d.ts +3 -5
- package/dist/core/runner/prepare-park-ask.js +3 -8
- package/dist/core/runner/prepare-policy-chain.d.ts +5 -4
- package/dist/core/runner/prepare-policy-chain.js +120 -108
- package/dist/core/runner/prepare-project-context.js +8 -5
- package/dist/core/runner/prepare-prompt-inputs.d.ts +4 -1
- package/dist/core/runner/prepare-prompt-inputs.js +3 -2
- package/dist/core/runner/prepare-protocol-tools.d.ts +5 -3
- package/dist/core/runner/prepare-protocol-tools.js +9 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +0 -2
- package/dist/core/runner/prepare-suspend-saga.js +5 -7
- package/dist/core/runner/prepare-task.js +41 -27
- package/dist/core/runner/prepare-turn-wiring.d.ts +2 -0
- package/dist/core/runner/prepare-turn-wiring.js +7 -2
- package/dist/core/runner/prepare-wiring-manifest.d.ts +4 -3
- package/dist/core/runner/prepare-wiring-manifest.js +32 -18
- package/dist/core/runner/prepare-workspace-restore.js +3 -3
- package/dist/core/runner/resume-checkpoint-screen.js +4 -4
- package/dist/core/runner/retired-runner-deps.js +4 -1
- package/dist/core/runner/run-attachment-seats.js +3 -3
- package/dist/core/runner/run-brain-sinks.js +1 -0
- package/dist/core/runner/run-git-lane.d.ts +3 -1
- package/dist/core/runner/run-git-lane.js +1 -1
- package/dist/core/runner/run-harness-handlers.d.ts +3 -1
- package/dist/core/runner/run-harness-handlers.js +3 -1
- package/dist/core/runner/run-identity-wiring.js +1 -1
- package/dist/core/runner/run-leg.js +26 -28
- package/dist/core/runner/run-notification-lane.d.ts +3 -1
- package/dist/core/runner/run-notification-lane.js +16 -10
- package/dist/core/runner/run-settle-and-teardown.js +5 -1
- package/dist/core/runner/run-stop-and-final-verify.d.ts +4 -0
- package/dist/core/runner/run-stop-and-final-verify.js +12 -4
- package/dist/core/runner/run-turn-boundary.js +12 -7
- package/dist/core/runner/runtask.d.ts +7 -4
- package/dist/core/runner/runtask.js +19 -11
- package/dist/core/runner/skills-seat.js +2 -2
- package/dist/core/runner/sub-agent-deny-lists.js +10 -7
- package/dist/core/runner/synthetic-tools.js +2 -2
- package/dist/core/runner/tool-disclosure.js +0 -2
- package/dist/core/runner/tool-face-overlay.d.ts +1 -1
- package/dist/core/runner/tool-face-overlay.js +26 -19
- package/dist/core/runner/tool-result-media-seat.d.ts +9 -1
- package/dist/core/runner/tool-result-media-seat.js +17 -1
- package/dist/core/runner/turn-attachments.d.ts +3 -5
- package/dist/core/runner/turn-attachments.js +3 -16
- package/dist/core/runner-deps.d.ts +31 -18
- package/dist/core/secret-env.d.ts +3 -2
- package/dist/core/session-policy-store.d.ts +9 -2
- package/dist/core/session-policy-store.js +16 -1
- package/dist/core/session-store.d.ts +3 -2
- package/dist/core/session-store.js +50 -11
- package/dist/core/skill-grant.d.ts +9 -0
- package/dist/core/skill-grant.js +18 -0
- package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
- package/dist/core/store-contracts/tool-result-store-contract.js +37 -0
- package/dist/core/stub-env.d.ts +5 -5
- package/dist/core/stub-env.js +11 -1
- package/dist/core/swappable-deps.d.ts +17 -43
- package/dist/core/swappable-deps.js +15 -5
- package/dist/core/synthetic-read-verdict.d.ts +1 -1
- package/dist/core/task-event.d.ts +18 -2
- package/dist/core/task-notification.d.ts +88 -5
- package/dist/core/task-notification.js +130 -7
- package/dist/core/task-registry-agent.d.ts +18 -12
- package/dist/core/task-registry-agent.js +18 -6
- package/dist/core/task-registry-monitor.d.ts +7 -0
- package/dist/core/task-registry-monitor.js +28 -1
- package/dist/core/task-registry-shared.d.ts +38 -3
- package/dist/core/task-registry-shared.js +21 -7
- package/dist/core/task-registry-workflow.js +1 -1
- package/dist/core/task-registry.d.ts +50 -35
- package/dist/core/task-registry.js +64 -23
- package/dist/core/task-result.d.ts +3 -12
- package/dist/core/task-spec.d.ts +3 -6
- package/dist/core/task-stream.d.ts +1 -1
- package/dist/core/tool-catalog-entries.js +1 -1
- package/dist/core/tool-face-reader.d.ts +7 -6
- package/dist/core/tool-face-reader.js +4 -3
- package/dist/core/tool-name-aliases.d.ts +19 -0
- package/dist/core/tool-name-aliases.js +54 -2
- package/dist/core/tool-policy.d.ts +5 -4
- package/dist/core/tool-policy.js +1 -1
- package/dist/core/tool-registry.d.ts +5 -5
- package/dist/core/tool-registry.js +2 -2
- package/dist/core/tool-result-store.d.ts +88 -5
- package/dist/core/tool-result-store.js +51 -12
- package/dist/core/tool-spec.d.ts +20 -4
- package/dist/core/trace.d.ts +0 -1
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-text.js +1 -1
- package/dist/core/user-attachment.d.ts +10 -5
- package/dist/core/user-attachment.js +14 -6
- package/dist/engine/execution-env/node-execution-env.d.ts +7 -2
- package/dist/engine/execution-env/node-execution-env.js +12 -1
- package/dist/engine/harness/agent-harness.d.ts +1 -1
- package/dist/engine/harness/agent-harness.js +8 -4
- package/dist/engine/harness/types.d.ts +112 -29
- package/dist/engine/loop/agent-loop.d.ts +12 -12
- package/dist/engine/loop/agent-loop.js +153 -21
- package/dist/engine/loop/types.d.ts +9 -2
- package/dist/engine/lsp/node-lsp-manager.d.ts +3 -3
- package/dist/engine/lsp/node-lsp-manager.js +32 -13
- package/dist/index.d.ts +22 -14
- package/dist/index.js +15 -10
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/orchestration/run-workflow-tool.d.ts +9 -3
- package/dist/orchestration/run-workflow-tool.js +59 -29
- package/dist/orchestration/workflow-governance.d.ts +1 -1
- package/dist/orchestration/workflow-governance.js +2 -1
- package/dist/orchestration/workflow.d.ts +4 -0
- package/dist/orchestration/workflow.js +25 -4
- package/dist/prompts/default.d.ts +1 -10
- package/dist/prompts/default.js +0 -2
- package/dist/stores/file/background-agent-store.d.ts +1 -1
- package/dist/stores/file/background-agent-store.js +3 -1
- package/dist/stores/file/checkpoint-store.d.ts +127 -2
- package/dist/stores/file/checkpoint-store.js +19 -14
- package/dist/stores/file/file-history-store.d.ts +1 -1
- package/dist/stores/file/file-history-store.js +3 -1
- package/dist/stores/file/index.d.ts +4 -3
- package/dist/stores/file/index.js +17 -8
- package/dist/stores/file/mailbox-store.d.ts +1 -1
- package/dist/stores/file/mailbox-store.js +3 -1
- package/dist/stores/file/memory-store.d.ts +1 -1
- package/dist/stores/file/memory-store.js +3 -1
- package/dist/stores/file/session-policy-store.d.ts +1 -1
- package/dist/stores/file/session-policy-store.js +3 -1
- package/dist/stores/file/session-store.d.ts +1 -1
- package/dist/stores/file/session-store.js +3 -1
- package/dist/stores/file/shared-ledger.d.ts +26 -0
- package/dist/stores/file/shared-ledger.js +38 -9
- package/dist/stores/file/tool-result-store.d.ts +20 -2
- package/dist/stores/file/tool-result-store.js +74 -6
- package/dist/stores/file/usage-window-store.d.ts +1 -1
- package/dist/stores/file/usage-window-store.js +3 -1
- package/dist/stores/file/workflow-journal-store.d.ts +1 -11
- package/dist/stores/file/workflow-journal-store.js +3 -2
- package/dist/tools/fs/containment-face.d.ts +5 -0
- package/dist/tools/fs/encoding.d.ts +13 -4
- package/dist/tools/fs/encoding.js +17 -2
- package/dist/tools/fs/fs-bash-background-text.d.ts +7 -0
- package/dist/tools/fs/fs-bash-background-text.js +1 -0
- package/dist/tools/fs/fs-bash.d.ts +8 -4
- package/dist/tools/fs/fs-bash.js +26 -35
- package/dist/tools/fs/fs-pdf.d.ts +2 -2
- package/dist/tools/fs/fs-pdf.js +26 -21
- package/dist/tools/fs/fs-read.d.ts +5 -4
- package/dist/tools/fs/fs-read.js +35 -18
- package/dist/tools/fs/fs-search-tools.js +4 -1
- package/dist/tools/fs/fs-shared.d.ts +11 -13
- package/dist/tools/fs/fs-shared.js +11 -7
- package/dist/tools/fs/fs-write.js +5 -5
- package/dist/tools/fs/index.d.ts +14 -8
- package/dist/tools/fs/index.js +8 -4
- package/dist/tools/fs/read-floor.d.ts +44 -1
- package/dist/tools/fs/read-floor.js +35 -0
- package/dist/tools/fs/removal-targets.d.ts +9 -4
- package/dist/tools/fs/removal-targets.js +17 -9
- package/dist/tools/fs/search.d.ts +3 -3
- package/dist/tools/fs/search.js +4 -4
- package/dist/tools/monitor.d.ts +5 -4
- package/dist/tools/monitor.js +15 -8
- package/dist/tools/scheduler-tools.js +42 -4
- package/dist/tools/web.d.ts +0 -10
- package/dist/tools/web.js +1 -4
- package/package.json +4 -2
- package/test/export-surface.snapshot.json +75 -21
- package/wire-changes/core-stores-sql@7.60.0.json +30 -0
- package/wire-changes/core@7.60.0.json +3274 -0
- package/wire-changes/mods-kernel@7.60.0.json +62 -0
- package/wire-changes/primitives@7.60.0.json +30 -0
|
@@ -97,11 +97,16 @@ export interface EngineNotice {
|
|
|
97
97
|
* losses of one ref apart. Dedup key: (code, occurrenceId).
|
|
98
98
|
* - `"tool_result.media_refused"` — an executed call's result carried media blocks (an image or a document, from
|
|
99
99
|
* an MCP server, a host tool, an engine tool or a `tool_result` hook's replacement) whose bytes the tool-result
|
|
100
|
-
* seat's admission refused: not a base64 payload, a media type outside the closed set, over the cap,
|
|
101
|
-
* without the claimed type's signature
|
|
100
|
+
* seat's admission refused: not a base64 payload, a media type outside the closed set, over the cap, bytes
|
|
101
|
+
* without the claimed type's signature, or bytes no processor could bring within the reject edge (or whose header
|
|
102
|
+
* states no size). Each such block already stands in the result as a text placeholder naming
|
|
102
103
|
* the tool and the refusal (never the bytes), so the model, `tool_end.output` and the transcript read that; this is
|
|
103
104
|
* the operator's account. ONCE PER CALL. `detail: { toolName, toolCallId, refused: [{ type, reason, bytes, limit?,
|
|
104
|
-
* mimeType? }], sessionId, runId }` — closed-set words, counts and a media type only when it can be one.
|
|
105
|
+
* width?, height?, mimeType? }], sessionId, runId }` — closed-set words, counts and a media type only when it can be one.
|
|
106
|
+
* - `"config.image_processor_unavailable"` — an image went to the model as it was, over the image admission's soft
|
|
107
|
+
* target (`IMAGE_ADMISSION.soft.targetBytes`), because the run has no image processor (`RunnerDeps.imageProcessor`
|
|
108
|
+
* is `false`, or sharp did not resolve). ONCE PER RUN, at the first such image wherever it entered (a tool's result,
|
|
109
|
+
* the task's images, an attachment). `detail: { bytes, targetBytes, sessionId, runId }`.
|
|
105
110
|
* - `"workflow.governance_key_stripped"` (#235) — the fields of an LLM-authored workflow `agent(spec)`
|
|
106
111
|
* that did NOT cross the governed default-deny whitelist: an unrecognized/control-plane field, or a
|
|
107
112
|
* `readFace` value that is not the containment-tightening one. The spawn PROCEEDS on the deployment
|
|
@@ -178,6 +183,17 @@ export interface EngineNotice {
|
|
|
178
183
|
* authorize; `sessionId` REQUIRED at the mint. Dedup unit: once per (leg, server) — a resume is a new
|
|
179
184
|
* leg and may announce again. A deployment that waits for the authorization keys on this notice; the
|
|
180
185
|
* leg itself does not park on it.
|
|
186
|
+
* - `"mcp.credential_echoed"` — a protocol peer (an MCP server, an A2A peer) echoed a credential its
|
|
187
|
+
* connection's requests carried into what it said about itself: an MCP server's `serverInfo`, its
|
|
188
|
+
* instructions or its tool listing, an A2A peer's agent card. The engine reads that account through
|
|
189
|
+
* one eraser whose needle is the connection's credentials (`PeerCarrier.credentials`): free text
|
|
190
|
+
* holding one is erased in place (the redaction mark), a NAME holding one is refused, never
|
|
191
|
+
* rewritten (a tool or skill is not mounted, the server's info or the card's name is not
|
|
192
|
+
* projected). `detail: { protocol, server, where, sessionId, runId }` — `protocol` is `mcp` / `a2a`,
|
|
193
|
+
* `server` the declared entry's name, `where` the closed set `CREDENTIAL_ECHO_SITES`
|
|
194
|
+
* (`server_info` / `instructions` / `tool_listing` / `agent_card`); never a value. `"operator"`
|
|
195
|
+
* audience: the endpoint repeats what it is sent, which only whoever wired it can act on. Dedup unit:
|
|
196
|
+
* once per (materialization, server, site) for MCP and per (materialization, peer) for A2A.
|
|
181
197
|
* - `"mcp.injection_dropped"` (L-167) — an entry of the user's own request-lane MCP injection
|
|
182
198
|
* was NOT mounted for the leg. The HOST owns the drop sites and supplies the facts; CORE composes
|
|
183
199
|
* the notice ({@link import("./mcp-injection-drop.js").mcpInjectionDroppedNotice}, the one mint).
|
|
@@ -188,12 +204,16 @@ export interface EngineNotice {
|
|
|
188
204
|
* routes nowhere — refused, never fabricated). Dedup unit: per leg per server name, the host's.
|
|
189
205
|
* - `"config.models_swapped"` — `Runner.swapDeps` replaced the model catalog generation
|
|
190
206
|
* (zero-restart model switching; the `models` / `tiers` seats of the swappable set). `detail:
|
|
191
|
-
* { models, tiers, occurrenceId }` — key COUNTS
|
|
207
|
+
* { models, tiers, generation, occurrenceId }` — key COUNTS and the `generation` the swap leaves in force (a digest of
|
|
208
|
+
* its key material: the model names the candidate declares and the tier bindings in force over them,
|
|
209
|
+
* `catalogGenerationOf`), never the catalog itself. Every Runner a driver swaps to the SAME model names under the
|
|
210
|
+
* SAME tier bindings announces the SAME `generation` (and its own `occurrenceId`), so a consumer folds one swap
|
|
211
|
+
* announced by N Runners by (code, generation); equal key material is one generation. In-flight tasks
|
|
192
212
|
* finish on the models they resolved at prepare (natural snapshot); every later prepare resolves
|
|
193
213
|
* against the new generation. A failed swap (illegal tier binding, a refused candidate) throws
|
|
194
214
|
* atomically and mints nothing. The verb carries no run and no session and the payload is a pair
|
|
195
|
-
* of counts, so the uuidv7 `occurrenceId` minted at the announcement is what tells two
|
|
196
|
-
* same shape apart. Dedup key: (code, occurrenceId).
|
|
215
|
+
* of counts, so the uuidv7 `occurrenceId` minted at the announcement is what tells two deliveries of the
|
|
216
|
+
* same shape apart. Dedup key of one delivery: (code, occurrenceId); of one swap announced by several Runners: (code, generation).
|
|
197
217
|
* - `"config.read_face_swapped"` — `Runner.swapDeps` replaced the deployment's read-face
|
|
198
218
|
* declaration (`RunnerDeps.readFace`, the `readFace` seat of the swappable set) without a
|
|
199
219
|
* restart. `detail: { from, to, occurrenceId }` — the seat's previous and new value, each
|
|
@@ -207,10 +227,10 @@ export interface EngineNotice {
|
|
|
207
227
|
* same payload, same laws. A SEPARATE code rather than a face field on the line above: the audience
|
|
208
228
|
* table and every consumer table are keyed by code.
|
|
209
229
|
* - `"config.read_deny_swapped"` — `Runner.swapDeps` replaced the deployment's read-deny declaration
|
|
210
|
-
* (any of `readDenyPatterns` / `readDenyBuiltinTiers` / `readDenyBuiltinExclude`) without a
|
|
211
|
-
* ONE line per swap. `detail: { seats, patterns, tiers, exclude, occurrenceId }` — the seats the
|
|
212
|
-
* named, then the declaration in force after it (additions and removals as counts, the tier selection
|
|
213
|
-
* by name; `null` = no declaration). In-flight legs keep the deny face they prepared under; every later
|
|
230
|
+
* (any of `readDenyPatterns` / `readDenyBuiltinTiers` / `readDenyBuiltinExclude` / `readDenyFloorRequired`) without a
|
|
231
|
+
* restart; ONE line per swap. `detail: { seats, patterns, tiers, exclude, floorRequired, occurrenceId }` — the seats the
|
|
232
|
+
* swap named, then the declaration in force after it (additions and removals as counts, the tier selection
|
|
233
|
+
* by name, the floor requirement as its boolean; `null` = no declaration). In-flight legs keep the deny face they prepared under; every later
|
|
214
234
|
* prepare compiles against the new declaration. A candidate outside the seats' gates throws atomically
|
|
215
235
|
* and mints nothing. Dedup key: (code, occurrenceId).
|
|
216
236
|
* - `"config.context_settings_swapped"` — `Runner.swapDeps` replaced the deployment's per-model
|
|
@@ -259,6 +279,16 @@ export interface EngineNotice {
|
|
|
259
279
|
* `detail: { from, to, cause, sessionId?, runId? }` — `cause` is the `AutoModeFallbackCause` word, the
|
|
260
280
|
* two ids are the rungs. Dedup key: (code, from, cause) PER RUN; a second CAUSE on the same rung is
|
|
261
281
|
* its own line.
|
|
282
|
+
* - `"classifier.seat_rate_limited"` (same file, the per-decision observer; the decider's retirement,
|
|
283
|
+
* `src/core/auto-mode.ts`) — the classifier seat's dispatch ended on the provider's rate limit (an HTTP 429 that
|
|
284
|
+
* outlived the brain's backoff ladder) on `RunnerDeps.autoMode.rateLimitBreakAfter` CONSECUTIVE classifications, so
|
|
285
|
+
* for the rest of this run the seat is NOT ASKED again: every gated call is judged on the model behind it, without
|
|
286
|
+
* first waiting out the seat's backoff. Different fact from `classifier.fallback` (a call re-asked behind the
|
|
287
|
+
* seat; its throttle is the rung's cause) — this is the seat leaving the walk. `detail: { model, to, rung,
|
|
288
|
+
* consecutive, sessionId?, runId? }` — `model` the retired rung's id, `to` the model the walk now starts at,
|
|
289
|
+
* `rung` its ladder position, `consecutive` the count that tripped it (the configured bound). Once per retired
|
|
290
|
+
* rung per run (the retirement is the dedup); only a rung with a rung behind it can retire, so a one-rung ladder
|
|
291
|
+
* (`classifierFallback: "none"`) never mints it. Audience `operator`.
|
|
262
292
|
* - `"classifier.role_defaulted"` (`src/core/runner/classifier-ladder.ts`, the seat resolver) — no
|
|
263
293
|
* `classifier` role names a model, so another model STANDS IN for the seat. `detail: { model, reason,
|
|
264
294
|
* thinkingOffSpelled, sessionId?, runId? }` — `reason` ∈ `tier_below_main` (the nearest directly-bound
|
|
@@ -436,12 +466,22 @@ export interface EngineNotice {
|
|
|
436
466
|
* threw: the `Artifact` tool is not mounted for the task and this is the loud half (an absent seat
|
|
437
467
|
* is silent; a broken one must not look the same). Once per prepared leg;
|
|
438
468
|
* `detail: { problem, sessionId, runId }`.
|
|
439
|
-
* - `"config.execution_env_capability_invalid"` —
|
|
440
|
-
* (`isolation`, `suspendable`, `
|
|
441
|
-
*
|
|
442
|
-
*
|
|
469
|
+
* - `"config.execution_env_capability_invalid"` — an env (any env, local or remote) does not declare a key of its
|
|
470
|
+
* REQUIRED capability block (`ExecutionEnvCapabilities`: `isolation`, `suspendable`, `sharesProcessTable`,
|
|
471
|
+
* `canonicalPathAuthoritative`, `hostLocalPaths`, `externalContentTarget`, `io`, `keepsReadFloor`) as a boolean — absent
|
|
472
|
+
* (`valueType: "undefined"`), another type, or unreadable — and each reader takes that key's safe side, which the
|
|
473
|
+
* sentence names; or the block itself is not an object or cannot be read (`key: "capabilities"`), or an optional
|
|
474
|
+
* seam method is present but not a function (`key` = the method). Once per key per run, at admission;
|
|
475
|
+
* `detail: { key, valueType }`. Also minted for
|
|
443
476
|
* `withheldEnv` (key `"withheldEnv"`) when it is neither a list of findings nor `"unknown"`, read at a shell call of
|
|
444
477
|
* a root leg (once per run).
|
|
478
|
+
* - `"config.read_deny_floor_unkept"` (#2936) — the run's read-deny table holds rows and its execution environment does
|
|
479
|
+
* not declare it keeps the byte floor (`capabilities.keepsReadFloor`): the engine refuses what a command names, but a
|
|
480
|
+
* recursive read under a root reads the files below it there, deny rows included. The notice dialect of the refusal
|
|
481
|
+
* `RunnerDeps.readDenyFloorRequired` turns it into (the prepare then fails with the same code); never minted for an
|
|
482
|
+
* empty table or an environment that keeps the floor (the Stub of a run without hands keeps it by refusing every
|
|
483
|
+
* start). Once per run — each delegated child on its own environment — and once per construction of a library-direct
|
|
484
|
+
* band that compiles its own table; `detail: { rowCount, sessionId?, runId? }` (the two ids on a run's notice).
|
|
445
485
|
* - `"config.secret_env_scrubbed"` (#1081) — the D1 fail-closed `scrub` policy, or the deployment's
|
|
446
486
|
* own credentials (`declareWithheldEnv`: a declared name, or a value equal to a declared or engine-held
|
|
447
487
|
* credential value), withheld one or more keys from a spawned child's environment (a tool's shell, an
|
|
@@ -948,7 +988,10 @@ export interface EngineNotice {
|
|
|
948
988
|
*
|
|
949
989
|
* - `"delegation.transcript_integrity"` (subagent transcript persistence) — a durable agent row
|
|
950
990
|
* with a BOUND transcript sessionId met a session store that attests `not_found` for it: the
|
|
951
|
-
* deployment's declared transcript durability is being contradicted by reality.
|
|
991
|
+
* deployment's declared transcript durability is being contradicted by reality. Minted only where
|
|
992
|
+
* durability IS declared — a deployment whose `fleet.subagentTranscripts` tier is `full`; under `rows`
|
|
993
|
+
* (transcripts follow a process-local store's fate) a gone transcript is the declared fate and nothing
|
|
994
|
+
* is announced (the per-call refusals still answer), and under `none` no row binds one. Announced at
|
|
952
995
|
* most once per (scope, handle, process) — `detail: { handle, scope? }`, scope = the resolved
|
|
953
996
|
* access scope of the read that found the gap — from the continuation read faces (SendMessage preflight /
|
|
954
997
|
* AgentTranscript's durable leg); the per-call honest refusals are unchanged, and the declared
|
|
@@ -81,6 +81,11 @@ export declare function frameSurvivesInToolResult(committedContent: unknown, fra
|
|
|
81
81
|
/** The station that applies a HOST hook's `updatedOutput` marks the carrier — only when an ask rides it, so an
|
|
82
82
|
* ordinary rewritten result leaves nothing behind. */
|
|
83
83
|
export declare function noteHostRewrite(seam: FrameSettlement, toolCallId: string): void;
|
|
84
|
+
/** A station WITHHELD a call's result in place of what it produced (a checking extension could not hand back its answer):
|
|
85
|
+
* the host side decided what the model reads, so the carrier is marked as rewritten and its asks are answered now,
|
|
86
|
+
* against the content that replaces the result, through the one writer below — a call whose result no transcript commit
|
|
87
|
+
* follows (an extension's own call) is settled all the same, and the commit of one that does follow finds nothing left. */
|
|
88
|
+
export declare function settleWithheldResult(seam: FrameSettlement, toolCallId: string, content: unknown): void;
|
|
84
89
|
/** The receipt sink's ONE writer: every ask riding `carrier` is answered — a receipt when its frame is in
|
|
85
90
|
* the committed content (or it is its own carrier); when it is not, host-withheld if a host hook rewrote the
|
|
86
91
|
* carrier (the host's decision), withheld otherwise (owed again). */
|
|
@@ -22,6 +22,10 @@ export function noteHostRewrite(seam, toolCallId) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
export function settleWithheldResult(seam, toolCallId, content) {
|
|
26
|
+
noteHostRewrite(seam, toolCallId);
|
|
27
|
+
recordFrameReceipt(seam, toolResultReceiptKey(toolCallId), content, "");
|
|
28
|
+
}
|
|
25
29
|
export function recordFrameReceipt(seam, carrier, committedContent, entryId) {
|
|
26
30
|
const hostRewrote = seam.hostRewritten.delete(carrier);
|
|
27
31
|
for (const [key, ask] of seam.awaiting) {
|
package/dist/core/gate-fold.js
CHANGED
|
@@ -2,7 +2,7 @@ import { inlineUntrusted } from "./untrusted-text.js";
|
|
|
2
2
|
import { markTightenMessage } from "./safety-axis-vocab.js";
|
|
3
3
|
import { PROBE_REASON_MAX, normalizeProbeCause } from "./checkpoint-store.js";
|
|
4
4
|
import { normalizeReadRootCandidate } from "./read-root-candidate.js";
|
|
5
|
-
import { engineFailClosedExit, hookDenyExit } from "./runner/gate-exit.js";
|
|
5
|
+
import { engineFailClosedExit, hookDenyExit, settledScreenExit, takeInheritedScreen } from "./runner/gate-exit.js";
|
|
6
6
|
import { noteRewrite, POLICY_AUTHOR, readRejudge, screenRewrite } from "./rewrite-rejudge.js";
|
|
7
7
|
import { traceHookCrash } from "./gate-crash-trace.js";
|
|
8
8
|
import { writeProtectionMandated, writeProtectionReachOf, writeProtectionTightenDecision } from "./write-protect.js";
|
|
@@ -43,14 +43,16 @@ export async function runGateFold(pass) {
|
|
|
43
43
|
const rewritten = pass.screening !== undefined && pass.decision.action !== "deny" ? readRejudge(pass.req, pass.currentInput, pass.decision) : undefined;
|
|
44
44
|
if (pass.screening !== undefined && rewritten?.kind === "rewritten") {
|
|
45
45
|
const second = await screenRewrite(pass.screening, pass.req, rewritten.form, `the rewritten call to "${toolName}"`);
|
|
46
|
-
if (second.kind === "refused") {
|
|
47
|
-
pass.currentInput = rewritten.form;
|
|
46
|
+
if (second.kind === "refused" || second.kind === "settled") {
|
|
47
|
+
pass.currentInput = second.judged !== undefined ? second.judged : rewritten.form;
|
|
48
|
+
if (second.kind === "settled")
|
|
49
|
+
return await settledScreenExit(pass, second);
|
|
48
50
|
return second.by === "hook" ? hookDenyExit(pass, second.reason, second.extension) : await engineFailClosedExit(pass, second.reason, second.extension);
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
pass.preToolContext.push(second.answer.additionalContext);
|
|
52
|
+
pass.preToolContext.push(...second.contexts);
|
|
52
53
|
pass.hookAsk = second.answer?.action === "ask" ? second.answer : undefined;
|
|
53
54
|
pass.hookAllowedBy = second.answer?.action === "allow" ? (second.answeredBy !== undefined ? [second.answeredBy] : []) : undefined;
|
|
55
|
+
takeInheritedScreen(pass, second.inherited);
|
|
54
56
|
}
|
|
55
57
|
if ((pass.decision.action === "allow" || pass.decision.action === "ask") && pass.decision.updatedInput !== undefined) {
|
|
56
58
|
pass.policyRewrite = argsAsTheToolReads(pass.req, pass.decision.updatedInput);
|
package/dist/core/gate-lanes.js
CHANGED
|
@@ -19,7 +19,7 @@ import { callFaceSeat } from "./tool-roster.js";
|
|
|
19
19
|
import { wireOf } from "./tool-name-readings.js";
|
|
20
20
|
import { modeAcceptsFileCommand } from "./mode-policy.js";
|
|
21
21
|
import { ORG_RULE_DECISION_REASON, ORG_UNAVAILABLE_DECISION_REASON, orgUnreadableClause } from "./permission-rule-org.js";
|
|
22
|
-
import { exitGate, passAskFace, untakenValueExit } from "./runner/gate-exit.js";
|
|
22
|
+
import { exitGate, passAskFace, takeSettledScreen, untakenValueExit } from "./runner/gate-exit.js";
|
|
23
23
|
import { readOrgRuleLane, readPersistedRuleLane } from "./rule-lane-reads.js";
|
|
24
24
|
import { traceHookCrash } from "./gate-crash-trace.js";
|
|
25
25
|
import { createGateDeadline, awaitWriteProtectionJudgment, withGateTimeout } from "./gate-bounded-await.js";
|
|
@@ -193,7 +193,7 @@ export async function runGateLanes(pass) {
|
|
|
193
193
|
};
|
|
194
194
|
const chains = [
|
|
195
195
|
...(own !== undefined ? [{ raise: (p) => raiseToolCheck(own, { ...e }, p, signal), ...(mayClear !== undefined ? { mayClear } : {}) }] : []),
|
|
196
|
-
...(input.
|
|
196
|
+
...(input.inheritedInstallations ?? []).map((c) => ({ raise: (p) => raiseToolCheck(c.bus, { ...e }, p, signal, c.judges), settle: settleThroughLedger(c.settle) })),
|
|
197
197
|
];
|
|
198
198
|
const project = (current, clears) => {
|
|
199
199
|
const reason = decisionText(current);
|
|
@@ -208,7 +208,9 @@ export async function runGateLanes(pass) {
|
|
|
208
208
|
pass.deniedExtension = settledRefusal === undefined ? by : undefined;
|
|
209
209
|
pass.denyCause = settledRefusal?.cause;
|
|
210
210
|
};
|
|
211
|
-
if (pass.decision.action
|
|
211
|
+
if (pass.screenApproval !== undefined && pass.decision.action !== "deny")
|
|
212
|
+
takeApprovedEdit({ kind: "approved", allow: pass.screenApproval });
|
|
213
|
+
if (pass.decision.action === "allow" && !approvedWithArgs) {
|
|
212
214
|
const read = await checkTool(pass.decision, finalArgs, orgAnswer.org, pass.policyRewrite);
|
|
213
215
|
if (read !== undefined)
|
|
214
216
|
pass.toolCheckRaised = true;
|
|
@@ -274,6 +276,7 @@ export async function runGateLanes(pass) {
|
|
|
274
276
|
const storedAllows = laneAnswer?.hit?.behavior === "allow" ? laneAnswer.hit.rules : undefined;
|
|
275
277
|
const members = [
|
|
276
278
|
["hook", () => (pass.hookAllowedBy !== undefined ? { entries: pass.hookAllowedBy, clear: () => extensionAllowOf(pass.hookAllowedBy ?? [], pass.policyRewrite), afterClear: async () => undefined } : undefined)],
|
|
279
|
+
["hook", () => (pass.inheritedAllowedBy !== undefined ? { entries: pass.inheritedAllowedBy, clear: () => extensionAllowOf(pass.inheritedAllowedBy ?? [], pass.policyRewrite), afterClear: async () => undefined, discloseOnly: true } : undefined)],
|
|
277
280
|
["deployment", () => {
|
|
278
281
|
const hit = input.deploymentAllows?.allowing(pass.req, mode);
|
|
279
282
|
return hit && { entries: hit.entries, ...(hit.positions !== undefined ? { positions: hit.positions } : {}), clear: () => listAllow("deployment_rule", "the deployment's", hit.entries), afterClear: () => notifier.notifyAsync(() => input.deploymentAllows?.onAllowed?.({ toolName: pass.req.toolName, toolCallId, entries: hit.entries }), "toolGate.allowedToolsResolved") };
|
|
@@ -309,7 +312,7 @@ export async function runGateLanes(pass) {
|
|
|
309
312
|
const hit = match();
|
|
310
313
|
if (hit === undefined)
|
|
311
314
|
continue;
|
|
312
|
-
if (allowMayClear()) {
|
|
315
|
+
if (hit.discloseOnly !== true && allowMayClear()) {
|
|
313
316
|
pass.decision = await clearAs(member, hit);
|
|
314
317
|
break;
|
|
315
318
|
}
|
|
@@ -585,16 +588,27 @@ export async function runGateLanes(pass) {
|
|
|
585
588
|
let rewrittenEdit = false;
|
|
586
589
|
if (screening !== undefined) {
|
|
587
590
|
const screened = await screening.screen(editArgs, `the approved edit for "${toolName}"`, pass.req);
|
|
591
|
+
if ((screened.kind !== "answered" || screened.answer?.action === "deny") && screened.judged !== undefined)
|
|
592
|
+
editArgs = screened.judged;
|
|
588
593
|
if (screened.kind === "refused") {
|
|
589
594
|
editDenied = { action: "deny", message: screened.reason };
|
|
590
595
|
pass.deniedBy = "hook";
|
|
591
596
|
pass.deniedExtension = screened.extension;
|
|
592
597
|
break;
|
|
593
598
|
}
|
|
599
|
+
if (screened.kind === "settled") {
|
|
600
|
+
editDenied = takeSettledScreen(pass, screened);
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
pass.preToolContext.push(...screened.contexts);
|
|
604
|
+
if (screened.inherited?.approved !== undefined) {
|
|
605
|
+
shownToApprover = { bytes: editArgs };
|
|
606
|
+
editArgs = screened.inherited.approved.updatedInput;
|
|
607
|
+
editAnswer = screened.inherited.approved;
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
594
610
|
const hr = screened.answer;
|
|
595
611
|
if (hr) {
|
|
596
|
-
if (hr.additionalContext)
|
|
597
|
-
pass.preToolContext.push(hr.additionalContext);
|
|
598
612
|
if (hr.action === "deny") {
|
|
599
613
|
editDenied = { action: "deny", message: decisionText(hr) ?? `the approved edit for "${toolName}" was blocked by a PreToolUse hook` };
|
|
600
614
|
pass.deniedBy = "hook";
|
|
@@ -612,6 +626,9 @@ export async function runGateLanes(pass) {
|
|
|
612
626
|
rewrittenEdit = true;
|
|
613
627
|
}
|
|
614
628
|
}
|
|
629
|
+
const floatedAsk = screened.inherited?.floated;
|
|
630
|
+
if (floatedAsk !== undefined)
|
|
631
|
+
editHookAsk = editHookAsk !== undefined ? foldHookAsk(editHookAsk, floatedAsk) : floatedAsk;
|
|
615
632
|
}
|
|
616
633
|
let recheck = { action: "allow" };
|
|
617
634
|
if (adjudicate) {
|
|
@@ -655,16 +672,30 @@ export async function runGateLanes(pass) {
|
|
|
655
672
|
editArgs = policyRead.form;
|
|
656
673
|
rewrittenEdit = true;
|
|
657
674
|
const second = screening !== undefined ? await screenRewrite(screening, pass.req, editArgs, `the rewritten edit for "${toolName}"`) : undefined;
|
|
675
|
+
if ((second?.kind === "refused" || second?.kind === "settled") && second.judged !== undefined)
|
|
676
|
+
editArgs = second.judged;
|
|
658
677
|
if (second?.kind === "refused") {
|
|
659
678
|
editDenied = { action: "deny", message: second.reason };
|
|
660
679
|
pass.deniedBy = "hook";
|
|
661
680
|
pass.deniedExtension = second.extension;
|
|
662
681
|
break;
|
|
663
682
|
}
|
|
683
|
+
if (second?.kind === "settled") {
|
|
684
|
+
editDenied = takeSettledScreen(pass, second);
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
664
687
|
if (second?.kind === "stands") {
|
|
665
|
-
|
|
666
|
-
pass.preToolContext.push(second.answer.additionalContext);
|
|
688
|
+
pass.preToolContext.push(...second.contexts);
|
|
667
689
|
editHookAsk = second.answer?.action === "ask" ? second.answer : undefined;
|
|
690
|
+
const floatedAsk = second.inherited?.floated;
|
|
691
|
+
if (floatedAsk !== undefined)
|
|
692
|
+
editHookAsk = editHookAsk !== undefined ? foldHookAsk(editHookAsk, floatedAsk) : floatedAsk;
|
|
693
|
+
if (second.inherited?.approved !== undefined) {
|
|
694
|
+
shownToApprover = { bytes: editArgs };
|
|
695
|
+
editArgs = second.inherited.approved.updatedInput;
|
|
696
|
+
editAnswer = second.inherited.approved;
|
|
697
|
+
continue;
|
|
698
|
+
}
|
|
668
699
|
}
|
|
669
700
|
}
|
|
670
701
|
const editOrg = await applyOrgLayer(recheck, editArgs);
|
|
@@ -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", "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"];
|
|
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.read_deny_floor_unkept", "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.seat_rate_limited", "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", "mcp.credential_echoed", "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", "config.image_processor_unavailable", "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. */
|
|
@@ -175,6 +175,7 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
175
175
|
readonly "classifier.denial_limit": "user";
|
|
176
176
|
readonly "classifier.unavailable": "user";
|
|
177
177
|
readonly "classifier.fallback": "operator";
|
|
178
|
+
readonly "classifier.seat_rate_limited": "operator";
|
|
178
179
|
readonly "classifier.role_defaulted": "operator";
|
|
179
180
|
readonly "classifier.contract_broken": "operator";
|
|
180
181
|
readonly "task.turn_interrupted": "user";
|
|
@@ -220,6 +221,7 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
220
221
|
readonly "config.write_protection_target_view_absent": "operator";
|
|
221
222
|
readonly "config.path_view_unresolved": "operator";
|
|
222
223
|
readonly "config.execution_env_capability_invalid": "operator";
|
|
224
|
+
readonly "config.read_deny_floor_unkept": "operator";
|
|
223
225
|
readonly "config.tool_card_undeclared": "operator";
|
|
224
226
|
readonly "config.tool_face_undeclared": "operator";
|
|
225
227
|
readonly "config.tool_face_invalid": "operator";
|
|
@@ -238,6 +240,7 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
238
240
|
readonly "mcp.revocation_probe_failed": "operator";
|
|
239
241
|
readonly "mcp.server_redialed": "operator";
|
|
240
242
|
readonly "mcp.authorization_required": "user";
|
|
243
|
+
readonly "mcp.credential_echoed": "operator";
|
|
241
244
|
readonly "workflow.governance_key_stripped": "operator";
|
|
242
245
|
readonly "workflow.agent_option_ignored": "operator";
|
|
243
246
|
readonly "memory.content_class_declared": "operator";
|
|
@@ -264,6 +267,7 @@ declare const NOTICE_AUDIENCE_TABLE: {
|
|
|
264
267
|
readonly "agents.listing_truncated": "operator";
|
|
265
268
|
readonly "tool_result.offload_put_failed": "operator";
|
|
266
269
|
readonly "tool_result.media_refused": "operator";
|
|
270
|
+
readonly "config.image_processor_unavailable": "operator";
|
|
267
271
|
readonly "config.forward_sink_failed": "operator";
|
|
268
272
|
readonly "instructions.source_changed": "user";
|
|
269
273
|
readonly "session.records_skipped": "user";
|
|
@@ -313,6 +317,7 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
313
317
|
readonly "config.write_protection_target_view_absent": "engine";
|
|
314
318
|
readonly "config.path_view_unresolved": "engine";
|
|
315
319
|
readonly "config.execution_env_capability_invalid": "engine";
|
|
320
|
+
readonly "config.read_deny_floor_unkept": "engine";
|
|
316
321
|
readonly "config.tool_card_undeclared": "engine";
|
|
317
322
|
readonly "config.tool_face_undeclared": "engine";
|
|
318
323
|
readonly "config.tool_face_invalid": "engine";
|
|
@@ -338,6 +343,7 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
338
343
|
readonly "peer.idle_subscription": "engine";
|
|
339
344
|
readonly "classifier.denial_limit": "engine";
|
|
340
345
|
readonly "classifier.fallback": "engine";
|
|
346
|
+
readonly "classifier.seat_rate_limited": "engine";
|
|
341
347
|
readonly "classifier.role_defaulted": "engine";
|
|
342
348
|
readonly "classifier.contract_broken": "engine";
|
|
343
349
|
readonly "classifier.unavailable": "engine";
|
|
@@ -348,6 +354,7 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
348
354
|
readonly "mcp.revocation_probe_failed": "engine";
|
|
349
355
|
readonly "mcp.server_redialed": "engine";
|
|
350
356
|
readonly "mcp.authorization_required": "engine";
|
|
357
|
+
readonly "mcp.credential_echoed": "engine";
|
|
351
358
|
readonly "workflow.governance_key_stripped": "engine";
|
|
352
359
|
readonly "workflow.agent_option_ignored": "engine";
|
|
353
360
|
readonly "memory.session_polluted": "engine";
|
|
@@ -396,6 +403,7 @@ declare const NOTICE_MINTER_TABLE: {
|
|
|
396
403
|
readonly "agents.listing_truncated": "engine";
|
|
397
404
|
readonly "tool_result.offload_put_failed": "engine";
|
|
398
405
|
readonly "tool_result.media_refused": "engine";
|
|
406
|
+
readonly "config.image_processor_unavailable": "engine";
|
|
399
407
|
readonly "instructions.source_changed": "server";
|
|
400
408
|
readonly "session.records_skipped": "server";
|
|
401
409
|
readonly "memory.layer_locked_legacy": "server";
|
|
@@ -142,6 +142,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
142
142
|
"config.write_protection_target_view_absent",
|
|
143
143
|
"config.path_view_unresolved",
|
|
144
144
|
"config.execution_env_capability_invalid",
|
|
145
|
+
"config.read_deny_floor_unkept",
|
|
145
146
|
"config.tool_card_undeclared",
|
|
146
147
|
"config.tool_face_undeclared",
|
|
147
148
|
"config.tool_face_invalid",
|
|
@@ -167,6 +168,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
167
168
|
"peer.idle_subscription",
|
|
168
169
|
"classifier.denial_limit",
|
|
169
170
|
"classifier.fallback",
|
|
171
|
+
"classifier.seat_rate_limited",
|
|
170
172
|
"classifier.role_defaulted",
|
|
171
173
|
"classifier.contract_broken",
|
|
172
174
|
"classifier.unavailable",
|
|
@@ -177,6 +179,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
177
179
|
"mcp.revocation_probe_failed",
|
|
178
180
|
"mcp.server_redialed",
|
|
179
181
|
"mcp.authorization_required",
|
|
182
|
+
"mcp.credential_echoed",
|
|
180
183
|
"workflow.governance_key_stripped",
|
|
181
184
|
"workflow.agent_option_ignored",
|
|
182
185
|
"memory.session_polluted",
|
|
@@ -225,6 +228,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
225
228
|
"agents.listing_truncated",
|
|
226
229
|
"tool_result.offload_put_failed",
|
|
227
230
|
"tool_result.media_refused",
|
|
231
|
+
"config.image_processor_unavailable",
|
|
228
232
|
"instructions.source_changed",
|
|
229
233
|
"session.records_skipped",
|
|
230
234
|
"memory.layer_locked_legacy",
|
|
@@ -243,6 +247,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
243
247
|
"classifier.denial_limit": "user",
|
|
244
248
|
"classifier.unavailable": "user",
|
|
245
249
|
"classifier.fallback": "operator",
|
|
250
|
+
"classifier.seat_rate_limited": "operator",
|
|
246
251
|
"classifier.role_defaulted": "operator",
|
|
247
252
|
"classifier.contract_broken": "operator",
|
|
248
253
|
"task.turn_interrupted": "user",
|
|
@@ -288,6 +293,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
288
293
|
"config.write_protection_target_view_absent": "operator",
|
|
289
294
|
"config.path_view_unresolved": "operator",
|
|
290
295
|
"config.execution_env_capability_invalid": "operator",
|
|
296
|
+
"config.read_deny_floor_unkept": "operator",
|
|
291
297
|
"config.tool_card_undeclared": "operator",
|
|
292
298
|
"config.tool_face_undeclared": "operator",
|
|
293
299
|
"config.tool_face_invalid": "operator",
|
|
@@ -306,6 +312,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
306
312
|
"mcp.revocation_probe_failed": "operator",
|
|
307
313
|
"mcp.server_redialed": "operator",
|
|
308
314
|
"mcp.authorization_required": "user",
|
|
315
|
+
"mcp.credential_echoed": "operator",
|
|
309
316
|
"workflow.governance_key_stripped": "operator",
|
|
310
317
|
"workflow.agent_option_ignored": "operator",
|
|
311
318
|
"memory.content_class_declared": "operator",
|
|
@@ -332,6 +339,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
332
339
|
"agents.listing_truncated": "operator",
|
|
333
340
|
"tool_result.offload_put_failed": "operator",
|
|
334
341
|
"tool_result.media_refused": "operator",
|
|
342
|
+
"config.image_processor_unavailable": "operator",
|
|
335
343
|
"config.forward_sink_failed": "operator",
|
|
336
344
|
"instructions.source_changed": "user",
|
|
337
345
|
"session.records_skipped": "user",
|
|
@@ -362,6 +370,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
362
370
|
"config.write_protection_target_view_absent": "engine",
|
|
363
371
|
"config.path_view_unresolved": "engine",
|
|
364
372
|
"config.execution_env_capability_invalid": "engine",
|
|
373
|
+
"config.read_deny_floor_unkept": "engine",
|
|
365
374
|
"config.tool_card_undeclared": "engine",
|
|
366
375
|
"config.tool_face_undeclared": "engine",
|
|
367
376
|
"config.tool_face_invalid": "engine",
|
|
@@ -387,6 +396,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
387
396
|
"peer.idle_subscription": "engine",
|
|
388
397
|
"classifier.denial_limit": "engine",
|
|
389
398
|
"classifier.fallback": "engine",
|
|
399
|
+
"classifier.seat_rate_limited": "engine",
|
|
390
400
|
"classifier.role_defaulted": "engine",
|
|
391
401
|
"classifier.contract_broken": "engine",
|
|
392
402
|
"classifier.unavailable": "engine",
|
|
@@ -397,6 +407,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
397
407
|
"mcp.revocation_probe_failed": "engine",
|
|
398
408
|
"mcp.server_redialed": "engine",
|
|
399
409
|
"mcp.authorization_required": "engine",
|
|
410
|
+
"mcp.credential_echoed": "engine",
|
|
400
411
|
"workflow.governance_key_stripped": "engine",
|
|
401
412
|
"workflow.agent_option_ignored": "engine",
|
|
402
413
|
"memory.session_polluted": "engine",
|
|
@@ -445,6 +456,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
445
456
|
"agents.listing_truncated": "engine",
|
|
446
457
|
"tool_result.offload_put_failed": "engine",
|
|
447
458
|
"tool_result.media_refused": "engine",
|
|
459
|
+
"config.image_processor_unavailable": "engine",
|
|
448
460
|
"instructions.source_changed": "server",
|
|
449
461
|
"session.records_skipped": "server",
|
|
450
462
|
"memory.layer_locked_legacy": "server",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const HANDS_BAND_MEMBERS = {
|
|
2
2
|
bashReadonlyAllow: { takes: "a list of command-name strings", ok: (v) => Array.isArray(v) && v.every((c) => typeof c === "string") },
|
|
3
3
|
commitCoAuthor: { takes: "a string or false", ok: (v) => typeof v === "string" || v === false },
|
|
4
|
-
readImageDownsampler: { takes: "a function or false", ok: (v) => typeof v === "function" || v === false },
|
|
5
4
|
beforeWrite: { takes: "a function", ok: (v) => typeof v === "function" },
|
|
6
5
|
autoBackgroundOnTimeout: { takes: "a boolean", ok: (v) => typeof v === "boolean" },
|
|
7
6
|
};
|
|
@@ -104,9 +104,6 @@ export interface HandsBandOptions {
|
|
|
104
104
|
/** Co-Authored-By trailer for the bash git protocol. Default NONE ([c209] BREAKING: attribution is a
|
|
105
105
|
* deployment identity asset — the branded scenario sets `"Name <email>"`); `false` ≡ unset. */
|
|
106
106
|
commitCoAuthor?: string | false;
|
|
107
|
-
/** Read-tool image downsampler: inject your own, or `false` to force-disable (deterministic no-sharp).
|
|
108
|
-
* Omitted ⇒ auto-detect sharp. Same contract as the MCP-side {@link import("./mcp.js").ImageDownsampler}. */
|
|
109
|
-
readImageDownsampler?: ((input: Buffer, mimeType: string) => Promise<import("./mcp.js").DownsampledImage | undefined>) | false;
|
|
110
107
|
/** Deployment write gate — COMPOSED with (never replacing) the engine's MemoryEngine write-scan gate:
|
|
111
108
|
* this hook judges first (a rejection short-circuits), the engine gate then still runs in full. */
|
|
112
109
|
beforeWrite?: BeforeWriteHook;
|