@sema-agent/core 7.70.0 → 7.71.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 +728 -0
- package/dist/agents/agent-transcript-tool.js +43 -19
- package/dist/agents/inherited-tool-pool.d.ts +5 -1
- package/dist/agents/inherited-tool-pool.js +6 -0
- package/dist/agents/retain-ledger.js +2 -0
- package/dist/agents/send-message-tool.d.ts +12 -1
- package/dist/agents/send-message-tool.js +47 -9
- package/dist/agents/subagent.js +31 -10
- package/dist/agents/tool-filter.js +1 -2
- package/dist/agents/verify.js +13 -2
- package/dist/agents/yield-adoption.js +11 -1
- package/dist/brain/claude-model-id.d.ts +11 -0
- package/dist/brain/claude-model-id.js +3 -1
- package/dist/config/catalog.js +10 -1
- package/dist/config/defaults.d.ts +3 -0
- package/dist/config/defaults.js +1 -0
- package/dist/core/allow-entry.js +1 -2
- package/dist/core/ask-origin.d.ts +55 -21
- package/dist/core/ask-origin.js +19 -11
- package/dist/core/ask-question.d.ts +4 -7
- package/dist/core/ask-question.js +2 -4
- package/dist/core/ask-unresolvable-notice.d.ts +17 -3
- package/dist/core/ask-unresolvable-notice.js +18 -4
- package/dist/core/attachment-source.d.ts +1 -1
- package/dist/core/attachment-source.js +2 -0
- package/dist/core/auto-compaction.d.ts +14 -4
- package/dist/core/auto-compaction.js +3 -2
- package/dist/core/auto-strip.js +2 -0
- package/dist/core/caller-text.d.ts +2 -33
- package/dist/core/caller-text.js +2 -23
- package/dist/core/caller-tool-name.js +1 -2
- package/dist/core/canonical-json.d.ts +9 -0
- package/dist/core/canonical-json.js +6 -0
- package/dist/core/checkpoint-features.d.ts +43 -80
- package/dist/core/checkpoint-features.js +10 -20
- package/dist/core/checkpoint-generation.d.ts +89 -19
- package/dist/core/checkpoint-generation.js +89 -14
- package/dist/core/checkpoint-queries.d.ts +95 -15
- package/dist/core/checkpoint-queries.js +108 -7
- package/dist/core/checkpoint-rekey.d.ts +2 -1
- package/dist/core/checkpoint-rekey.js +2 -2
- package/dist/core/checkpoint-requirements.d.ts +7 -6
- package/dist/core/checkpoint-requirements.js +2 -5
- package/dist/core/checkpoint-row-verdict.d.ts +3 -4
- package/dist/core/checkpoint-row-verdict.js +20 -41
- package/dist/core/checkpoint-store.d.ts +65 -41
- package/dist/core/checkpoint-store.js +28 -14
- package/dist/core/command-sandbox.d.ts +5 -3
- package/dist/core/command-sandbox.js +17 -9
- package/dist/core/config-refusal-codes.d.ts +1 -1
- package/dist/core/config-refusal-codes.js +1 -0
- package/dist/core/declaration-words.d.ts +2 -1
- package/dist/core/declaration-words.js +13 -2
- package/dist/core/effective-path-target.d.ts +23 -0
- package/dist/core/effective-path-target.js +15 -1
- package/dist/core/engine-attestation.d.ts +5 -1
- package/dist/core/engine-attestation.js +1 -0
- package/dist/core/engine-capabilities.d.ts +14 -9
- package/dist/core/engine-capabilities.js +1 -1
- package/dist/core/engine-notice.d.ts +62 -32
- package/dist/core/engine-version.js +1 -1
- package/dist/core/entries-not-applied.d.ts +1 -1
- package/dist/core/entries-not-applied.js +1 -0
- package/dist/core/file-history-store.d.ts +95 -11
- package/dist/core/file-history-store.js +117 -19
- package/dist/core/gate-fold.js +13 -7
- package/dist/core/gate-lanes.js +9 -9
- package/dist/core/governance-codes.d.ts +56 -7
- package/dist/core/governance-codes.js +105 -7
- package/dist/core/grant-holder.d.ts +53 -0
- package/dist/core/grant-holder.js +80 -0
- package/dist/core/hooks.d.ts +7 -3
- package/dist/core/hooks.js +2 -2
- package/dist/core/locked-config.d.ts +7 -1
- package/dist/core/locked-config.js +9 -2
- package/dist/core/mcp-call-meta.d.ts +52 -7
- package/dist/core/mcp-call-meta.js +21 -2
- package/dist/core/mcp-host-read.d.ts +1 -1
- package/dist/core/mcp-server-spec.d.ts +18 -0
- package/dist/core/mcp-server-spec.js +1 -0
- package/dist/core/mcp.js +2 -2
- package/dist/core/member-outcome.d.ts +22 -1
- package/dist/core/member-outcome.js +18 -6
- package/dist/core/memory-engine/delegation-settlement.js +5 -5
- package/dist/core/memory-engine/engine.js +19 -19
- package/dist/core/memory-engine/file-backend.d.ts +7 -2
- package/dist/core/memory-engine/file-backend.js +14 -12
- package/dist/core/memory-engine/frontmatter.js +1 -1
- package/dist/core/memory-engine/index.d.ts +1 -0
- package/dist/core/memory-engine/index.js +1 -0
- package/dist/core/memory-engine/layout.d.ts +34 -9
- package/dist/core/memory-engine/layout.js +36 -19
- package/dist/core/memory-engine/memory-deployment.js +8 -8
- package/dist/core/memory-engine/mount-failed-notice.d.ts +8 -5
- package/dist/core/memory-engine/mount-failed-notice.js +5 -2
- package/dist/core/mode-policy.d.ts +5 -0
- package/dist/core/mode-policy.js +6 -0
- package/dist/core/mods/host.d.ts +2 -1
- package/dist/core/mods/host.js +7 -6
- package/dist/core/mods/kernel/index.d.ts +1 -1
- package/dist/core/mods/kernel/index.js +1 -1
- package/dist/core/mods/kernel/registration.d.ts +5 -2
- package/dist/core/mods/kernel/registration.js +19 -3
- package/dist/core/mods/package.d.ts +12 -1
- package/dist/core/mods/package.js +36 -9
- package/dist/core/mods/stations.d.ts +7 -1
- package/dist/core/mods/stations.js +17 -3
- package/dist/core/mods/teammate-stations.d.ts +4 -1
- package/dist/core/mods/teammate-stations.js +1 -1
- package/dist/core/native-signal.d.ts +13 -0
- package/dist/core/native-signal.js +18 -0
- package/dist/core/park-resumability.d.ts +16 -14
- package/dist/core/park-resumability.js +9 -4
- package/dist/core/path-rule-binding.js +1 -1
- package/dist/core/permission-rule-model.d.ts +11 -5
- package/dist/core/permission-rule-model.js +5 -3
- package/dist/core/permission-rule-org.js +1 -1
- package/dist/core/permission-rule-provider.d.ts +5 -1
- package/dist/core/permission-rule-provider.js +6 -1
- package/dist/core/permission-rule-session.d.ts +35 -5
- package/dist/core/permission-rule-session.js +32 -1
- package/dist/core/permission-rule-store.d.ts +5 -1
- package/dist/core/permission-rule-store.js +28 -5
- package/dist/core/permission-rules.d.ts +2 -2
- package/dist/core/permission-rules.js +2 -3
- package/dist/core/principal-name.d.ts +12 -0
- package/dist/core/principal-name.js +6 -2
- package/dist/core/read-root-grant-screen.d.ts +7 -6
- package/dist/core/read-root-grant-screen.js +7 -8
- package/dist/core/remote-env.d.ts +42 -8
- package/dist/core/resume-config-judge.js +1 -1
- package/dist/core/resume-startup-cause.d.ts +19 -4
- package/dist/core/resume-startup-cause.js +25 -6
- package/dist/core/rewind-conversation.d.ts +4 -0
- package/dist/core/rewrite-rejudge.d.ts +9 -1
- package/dist/core/rewrite-rejudge.js +11 -1
- package/dist/core/rule-offer-read.js +3 -2
- package/dist/core/runner/assemble-result.d.ts +21 -11
- package/dist/core/runner/assemble-result.js +24 -4
- package/dist/core/runner/boundary-reminders.d.ts +104 -0
- package/dist/core/runner/boundary-reminders.js +108 -0
- package/dist/core/runner/branch-writeback.d.ts +21 -7
- package/dist/core/runner/branch-writeback.js +44 -6
- package/dist/core/runner/command-sandbox-frame.js +2 -1
- package/dist/core/runner/compact-session.js +11 -4
- package/dist/core/runner/constraint-layers.d.ts +24 -5
- package/dist/core/runner/constraint-layers.js +21 -2
- package/dist/core/runner/continuation-gate.js +3 -1
- package/dist/core/runner/contracts.d.ts +83 -13
- package/dist/core/runner/cross-boundary-lane.js +2 -1
- package/dist/core/runner/delegation-owner.d.ts +246 -45
- package/dist/core/runner/delegation-owner.js +237 -63
- package/dist/core/runner/expire-settle.d.ts +17 -0
- package/dist/core/runner/expire-settle.js +8 -2
- package/dist/core/runner/file-history-request.d.ts +4 -3
- package/dist/core/runner/file-history-request.js +4 -1
- package/dist/core/runner/file-history-restore.d.ts +11 -3
- package/dist/core/runner/file-history-restore.js +11 -3
- package/dist/core/runner/gate-exit.d.ts +22 -1
- package/dist/core/runner/gate-exit.js +12 -14
- package/dist/core/runner/nested-memory-content.js +1 -1
- package/dist/core/runner/nested-memory-lane.d.ts +10 -2
- package/dist/core/runner/nested-memory-lane.js +29 -8
- package/dist/core/runner/own-model-money-door.d.ts +13 -0
- package/dist/core/runner/own-model-money-door.js +17 -0
- package/dist/core/runner/park-commit.d.ts +4 -2
- package/dist/core/runner/park-commit.js +2 -1
- package/dist/core/runner/permission-rule-lanes.d.ts +4 -0
- package/dist/core/runner/permission-rule-lanes.js +7 -0
- package/dist/core/runner/person-path-rows.js +1 -1
- package/dist/core/runner/placement-fence.d.ts +8 -2
- package/dist/core/runner/placement-fence.js +8 -3
- package/dist/core/runner/policy-throw.d.ts +3 -2
- package/dist/core/runner/policy-throw.js +2 -2
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +23 -14
- package/dist/core/runner/prepare-acquire-reconcile.js +33 -15
- package/dist/core/runner/prepare-artifact.d.ts +14 -1
- package/dist/core/runner/prepare-artifact.js +7 -2
- package/dist/core/runner/prepare-ask-lane.d.ts +8 -0
- package/dist/core/runner/prepare-ask-lane.js +14 -5
- package/dist/core/runner/prepare-boundary-parks.js +5 -4
- package/dist/core/runner/prepare-config-doors.d.ts +9 -4
- package/dist/core/runner/prepare-config-doors.js +25 -8
- package/dist/core/runner/prepare-defer-classify.d.ts +8 -4
- package/dist/core/runner/prepare-defer-classify.js +6 -6
- package/dist/core/runner/prepare-execution-env.d.ts +4 -1
- package/dist/core/runner/prepare-execution-env.js +8 -3
- package/dist/core/runner/prepare-file-history.d.ts +26 -0
- package/dist/core/runner/prepare-file-history.js +15 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -3
- package/dist/core/runner/prepare-inherited-gate.js +9 -2
- package/dist/core/runner/prepare-leg-adoption.d.ts +2 -2
- package/dist/core/runner/prepare-park-ask.js +8 -5
- package/dist/core/runner/prepare-policy-chain.d.ts +5 -0
- package/dist/core/runner/prepare-policy-chain.js +18 -7
- package/dist/core/runner/prepare-prompt-assembly.d.ts +3 -0
- package/dist/core/runner/prepare-prompt-assembly.js +4 -3
- package/dist/core/runner/prepare-suspend-saga.d.ts +4 -1
- package/dist/core/runner/prepare-suspend-saga.js +19 -5
- package/dist/core/runner/prepare-task.d.ts +2 -5
- package/dist/core/runner/prepare-task.js +71 -26
- package/dist/core/runner/prepare-turn-wiring.js +7 -5
- package/dist/core/runner/prepare-workspace-restore.js +59 -28
- package/dist/core/runner/read-root-grant.d.ts +1 -0
- package/dist/core/runner/read-root-grant.js +1 -2
- package/dist/core/runner/resume-admission.d.ts +3 -0
- package/dist/core/runner/resume-admission.js +6 -4
- package/dist/core/runner/resume-apply.js +7 -5
- package/dist/core/runner/resume-claim.d.ts +2 -2
- package/dist/core/runner/resume-claim.js +4 -4
- package/dist/core/runner/resume-policy-outcome.d.ts +1 -1
- package/dist/core/runner/resume-policy-outcome.js +6 -4
- package/dist/core/runner/resume-preflight.d.ts +3 -0
- package/dist/core/runner/resume-preflight.js +10 -3
- package/dist/core/runner/rewind-conversation.js +11 -4
- package/dist/core/runner/rewind-files.js +29 -14
- package/dist/core/runner/rewind-outcome.d.ts +27 -0
- package/dist/core/runner/rewind-outcome.js +14 -0
- package/dist/core/runner/run-attachment-seats.js +2 -1
- package/dist/core/runner/run-clock-and-content.js +2 -0
- package/dist/core/runner/run-identity-wiring.js +2 -0
- package/dist/core/runner/run-leg.js +11 -1
- package/dist/core/runner/run-notification-lane.d.ts +3 -0
- package/dist/core/runner/run-notification-lane.js +2 -2
- package/dist/core/runner/run-settle-and-teardown.d.ts +4 -2
- package/dist/core/runner/run-settle-and-teardown.js +52 -40
- package/dist/core/runner/run-stop-and-final-verify.d.ts +4 -0
- package/dist/core/runner/run-stop-and-final-verify.js +5 -4
- package/dist/core/runner/run-terminal-adoption.d.ts +1 -1
- package/dist/core/runner/run-terminal-adoption.js +3 -3
- package/dist/core/runner/run-turn-boundary.js +7 -0
- package/dist/core/runner/runtask.d.ts +7 -4
- package/dist/core/runner/runtask.js +18 -9
- package/dist/core/runner/session-call-grant-station.d.ts +64 -0
- package/dist/core/runner/session-call-grant-station.js +119 -0
- package/dist/core/runner/session-file-state-replay.js +2 -2
- package/dist/core/runner/session-prompt-seats.d.ts +95 -0
- package/dist/core/runner/session-prompt-seats.js +62 -0
- package/dist/core/runner/session-rule-policy.js +1 -1
- package/dist/core/runner/session-write-ledger.d.ts +8 -0
- package/dist/core/runner/session-write-ledger.js +16 -0
- package/dist/core/runner/side-call-account.js +5 -1
- package/dist/core/runner/stop-tail-notice.d.ts +7 -0
- package/dist/core/runner/stop-tail-notice.js +23 -8
- package/dist/core/runner/stream-reap.js +4 -2
- package/dist/core/runner/stream-settle-backstop.d.ts +1 -1
- package/dist/core/runner/stream-settle-backstop.js +17 -18
- package/dist/core/runner/terminal-account.js +17 -8
- package/dist/core/runner/terminal-projection.d.ts +3 -2
- package/dist/core/runner/terminal-projection.js +1 -1
- package/dist/core/runner/tool-turn-repair-seat.d.ts +2 -2
- package/dist/core/runner/tool-turn-repair-seat.js +12 -7
- package/dist/core/runner/turn-attachments.d.ts +22 -1
- package/dist/core/runner/turn-attachments.js +20 -3
- package/dist/core/runner-deps.d.ts +6 -2
- package/dist/core/secret-env.d.ts +26 -6
- package/dist/core/secret-env.js +6 -6
- package/dist/core/session-call-grant-screen.d.ts +58 -0
- package/dist/core/session-call-grant-screen.js +18 -0
- package/dist/core/session-call-grant.d.ts +93 -0
- package/dist/core/session-call-grant.js +524 -0
- package/dist/core/session-checkout.d.ts +3 -0
- package/dist/core/session-checkout.js +8 -3
- package/dist/core/session-policy-store.d.ts +14 -0
- package/dist/core/session-policy-store.js +16 -2
- package/dist/core/session-store.d.ts +18 -1
- package/dist/core/session-store.js +20 -4
- package/dist/core/session.d.ts +36 -4
- package/dist/core/shared-artifact-reads.d.ts +93 -0
- package/dist/core/shared-artifact-reads.js +94 -0
- package/dist/core/skill-grant.js +1 -1
- package/dist/core/skills-directory.d.ts +9 -45
- package/dist/core/skills-directory.js +9 -722
- package/dist/core/spend-account.js +3 -0
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +22 -4
- package/dist/core/store-contracts/checkpoint-store-contract.js +363 -29
- package/dist/core/store-contracts/file-history-store-contract.d.ts +11 -3
- package/dist/core/store-contracts/file-history-store-contract.js +62 -2
- package/dist/core/store-contracts/grant-fixture.d.ts +52 -0
- package/dist/core/store-contracts/grant-fixture.js +84 -0
- package/dist/core/store-contracts/session-repo-contract.js +18 -0
- package/dist/core/store-contracts/session-store-contract.d.ts +15 -1
- package/dist/core/store-contracts/session-store-contract.js +211 -2
- package/dist/core/store-contracts/workflow-journal-store-contract.js +47 -8
- package/dist/core/suspend-lane-reasons.d.ts +13 -0
- package/dist/core/suspend-lane-reasons.js +5 -0
- package/dist/core/synthetic-read-verdict.d.ts +5 -3
- package/dist/core/synthetic-read-verdict.js +1 -1
- package/dist/core/task-limits.d.ts +15 -0
- package/dist/core/task-notification.d.ts +33 -7
- package/dist/core/task-notification.js +34 -9
- package/dist/core/task-registry-agent.d.ts +1 -1
- package/dist/core/task-registry-agent.js +18 -7
- package/dist/core/task-registry-shared.d.ts +29 -4
- package/dist/core/task-registry-shared.js +7 -0
- package/dist/core/task-registry.d.ts +21 -1
- package/dist/core/task-registry.js +36 -9
- package/dist/core/task-result.d.ts +55 -1
- package/dist/core/task-spec.d.ts +17 -3
- package/dist/core/terminal-cause.d.ts +68 -5
- package/dist/core/tool-catalog-entries.js +1 -1
- package/dist/core/tool-check-reading.js +2 -1
- package/dist/core/tool-errors.js +1 -0
- package/dist/core/tool-list-grammar.d.ts +0 -47
- package/dist/core/tool-list-grammar.js +1 -75
- package/dist/core/tool-model-gate.d.ts +7 -11
- package/dist/core/tool-model-gate.js +5 -8
- package/dist/core/tool-name-aliases.js +2 -3
- package/dist/core/tool-name-readings.d.ts +4 -0
- package/dist/core/tool-name-readings.js +1 -0
- package/dist/core/tool-policy.d.ts +46 -4
- package/dist/core/tool-policy.js +47 -18
- package/dist/core/tool-result-store.d.ts +0 -24
- package/dist/core/tool-result-store.js +1 -36
- package/dist/core/tool-spec.d.ts +8 -4
- package/dist/core/untrusted-egress.js +2 -2
- package/dist/core/untrusted-text.d.ts +8 -0
- package/dist/core/untrusted-text.js +14 -0
- package/dist/core/user-attachment.d.ts +16 -1
- package/dist/core/user-attachment.js +42 -18
- package/dist/core/wiring-manifest.d.ts +4 -9
- package/dist/core/wiring-manifest.js +1 -1
- package/dist/core/workflow-journal-store.d.ts +55 -8
- package/dist/core/workflow-journal-store.js +34 -10
- package/dist/core/workflow-run-store-contract.js +56 -1
- package/dist/core/workflow-run-store.d.ts +43 -19
- package/dist/core/workflow-run-store.js +17 -2
- package/dist/engine/execution-env/node-execution-env.d.ts +3 -0
- package/dist/engine/execution-env/node-execution-env.js +4 -0
- package/dist/engine/harness/agent-harness.d.ts +10 -5
- package/dist/engine/harness/agent-harness.js +12 -4
- package/dist/engine/harness/types.d.ts +18 -0
- package/dist/engine/llm/tool-turns.d.ts +1 -1
- package/dist/engine/llm/types.d.ts +5 -4
- package/dist/engine/session/memory-repo.d.ts +15 -3
- package/dist/engine/session/memory-repo.js +21 -3
- package/dist/engine/session/memory-storage.d.ts +5 -0
- package/dist/engine/session/memory-storage.js +8 -3
- package/dist/engine/session/repo-utils.d.ts +9 -0
- package/dist/engine/session/repo-utils.js +14 -0
- package/dist/engine/session/storage-base.d.ts +20 -7
- package/dist/engine/session/storage-base.js +13 -1
- package/dist/index.d.ts +37 -19
- package/dist/index.js +30 -15
- package/dist/internal/harness.d.ts +1 -1
- package/dist/internal/harness.js +1 -1
- package/dist/orchestration/run-workflow-tool.d.ts +13 -1
- package/dist/orchestration/run-workflow-tool.js +101 -32
- package/dist/orchestration/workflow-park-adoption.d.ts +309 -92
- package/dist/orchestration/workflow-park-adoption.js +588 -323
- package/dist/orchestration/workflow-tree-id.d.ts +66 -0
- package/dist/orchestration/workflow-tree-id.js +66 -0
- package/dist/orchestration/workflow-types.d.ts +90 -11
- package/dist/orchestration/workflow-types.js +10 -1
- package/dist/orchestration/workflow.d.ts +30 -4
- package/dist/orchestration/workflow.js +424 -114
- package/dist/prompt-assembly/catalog/constitution.js +5 -1
- package/dist/prompt-assembly/catalog/core-behavior.d.ts +3 -4
- package/dist/prompt-assembly/catalog/core-behavior.js +61 -22
- package/dist/prompt-assembly/catalog/environment.js +2 -2
- package/dist/prompt-assembly/catalog/events.d.ts +16 -0
- package/dist/prompt-assembly/catalog/events.js +2 -0
- package/dist/prompt-assembly/catalog/locales/zh-Hans/core-behavior.js +72 -44
- package/dist/prompt-assembly/catalog/locales/zh-Hans/environment.js +2 -2
- package/dist/prompt-assembly/catalog/locales/zh-Hans/events.js +2 -0
- package/dist/prompt-assembly/catalog/schema.d.ts +5 -1
- package/dist/prompt-assembly/catalog/schema.js +2 -0
- package/dist/prompt-assembly/catalog/sections.js +3 -14
- package/dist/prompt-assembly/event-registry.js +2 -0
- package/dist/prompt-assembly/select.js +1 -0
- package/dist/prompt-assembly/tool-catalog.d.ts +10 -7
- package/dist/prompt-assembly/tool-catalog.js +21 -7
- package/dist/prompt-assembly/types.d.ts +3 -0
- package/dist/prompts/default.d.ts +4 -1
- package/dist/prompts/default.js +6 -0
- package/dist/stores/file/checkpoint-store.d.ts +11 -10
- package/dist/stores/file/checkpoint-store.js +36 -10
- package/dist/stores/file/file-history-store.d.ts +6 -0
- package/dist/stores/file/file-history-store.js +21 -4
- package/dist/stores/file/fs-atomic.d.ts +1 -1
- package/dist/stores/file/index.d.ts +14 -4
- package/dist/stores/file/index.js +21 -5
- package/dist/stores/file/process-anchor.d.ts +9 -1
- package/dist/stores/file/session-policy-store.js +2 -17
- package/dist/stores/file/session-store.d.ts +27 -0
- package/dist/stores/file/session-store.js +81 -9
- package/dist/stores/file/workflow-journal-store.d.ts +14 -4
- package/dist/stores/file/workflow-journal-store.js +32 -24
- package/dist/stores/file/workflow-run-store.d.ts +15 -4
- package/dist/stores/file/workflow-run-store.js +76 -0
- package/dist/tools/artifact/artifact-tool.d.ts +10 -3
- package/dist/tools/artifact/artifact-tool.js +16 -1
- package/dist/tools/fs/bash-program-position.d.ts +10 -4
- package/dist/tools/fs/bash-program-position.js +11 -8
- package/dist/tools/fs/bash-readonly-classifier.d.ts +3 -1
- package/dist/tools/fs/bash-readonly-classifier.js +9 -2
- package/dist/tools/fs/find-actions.d.ts +30 -16
- package/dist/tools/fs/find-actions.js +272 -19
- package/dist/tools/fs/fs-bash.js +8 -5
- package/dist/tools/fs/fs-shared.d.ts +0 -29
- package/dist/tools/fs/fs-shared.js +0 -5
- package/dist/tools/fs/fs-write.js +2 -1
- package/dist/tools/fs/read-deny.d.ts +6 -1
- package/dist/tools/fs/read-deny.js +6 -1
- package/dist/tools/fs/read-floor.d.ts +6 -0
- package/dist/tools/fs/read-floor.js +5 -1
- package/dist/tools/fs/removal-actions.d.ts +43 -0
- package/dist/tools/fs/removal-actions.js +25 -0
- package/dist/tools/fs/removal-targets.d.ts +2 -21
- package/dist/tools/fs/removal-targets.js +2 -3
- package/dist/tools/fs/safety.d.ts +37 -1
- package/dist/tools/fs/safety.js +52 -0
- package/dist/tools/fs/shell-climb.d.ts +46 -0
- package/dist/tools/fs/shell-climb.js +79 -0
- package/dist/tools/fs/shell-read-check.js +47 -19
- package/dist/tools/fs/shell-read-establish.js +36 -22
- package/dist/tools/fs/shell-read-judge.d.ts +10 -2
- package/dist/tools/fs/shell-read-judge.js +4 -4
- package/dist/tools/fs/shell-read-plan.d.ts +3 -0
- package/dist/tools/fs/shell-read-plan.js +1 -1
- package/dist/tools/fs/shell-read-workdir.js +3 -2
- package/dist/tools/fs/shell-read-write-targets.d.ts +4 -3
- package/dist/tools/fs/shell-read-write-targets.js +3 -0
- package/package.json +2 -2
- package/test/export-surface.snapshot.json +169 -15
- package/wire-changes/core-stores-sql@7.71.0.json +40 -0
- package/wire-changes/core@7.71.0.json +5827 -0
- package/wire-changes/mods-kernel@7.71.0.json +52 -0
- package/wire-changes/primitives@7.71.0.json +473 -0
- package/wire-changes/wiki-gate@7.71.0.json +40 -0
- package/dist/core/frontmatter-fence.d.ts +0 -10
- package/dist/core/frontmatter-fence.js +0 -6
- package/dist/core/permission-rule-syntax.d.ts +0 -46
- package/dist/core/permission-rule-syntax.js +0 -52
|
@@ -443,6 +443,7 @@ const LOOSEN_BOOLS = {
|
|
|
443
443
|
};
|
|
444
444
|
const DENY_LISTS = ["filesystem.denyWrite", "filesystem.denyRead", "network.deniedDomains"];
|
|
445
445
|
const ALLOW_LISTS = ["filesystem.allowWrite", "filesystem.allowRead", "network.allowedDomains", "network.allowUnixSockets", "network.allowMachLookup", "excludedCommands"];
|
|
446
|
+
const SIGV4_WORDS = ["credentials.sigv4.streaming", "credentials.sigv4.presigned", "credentials.sigv4.sigv4a"];
|
|
446
447
|
const at = (o, path) => path.split(".").reduce((v, k) => (typeof v === "object" && v !== null ? v[k] : undefined), o);
|
|
447
448
|
function put(o, path, value) {
|
|
448
449
|
const keys = path.split(".");
|
|
@@ -494,24 +495,31 @@ export function mergeChildSandbox(parent, childValue) {
|
|
|
494
495
|
merged[pattern] = literalIntersection(pv[pattern], listOf(paths) ?? []);
|
|
495
496
|
out["ignoreViolations"] = merged;
|
|
496
497
|
}
|
|
498
|
+
for (const path of SIGV4_WORDS)
|
|
499
|
+
if (at(child, path) === "deny")
|
|
500
|
+
put(out, path, "deny");
|
|
497
501
|
for (const [list, key] of [["credentials.files", "path"], ["credentials.envVars", "name"]]) {
|
|
498
502
|
if (!stated(list))
|
|
499
503
|
continue;
|
|
504
|
+
const fold = (members, a, b) => {
|
|
505
|
+
const [x, y] = [a["onExtractNoMatch"], b["onExtractNoMatch"]];
|
|
506
|
+
const noMatch = x === undefined ? y : y === undefined ? x : NO_MATCH_ORDER.indexOf(String(x)) >= NO_MATCH_ORDER.indexOf(String(y)) ? x : y;
|
|
507
|
+
return { ...members, mode: a["mode"] === "deny" || b["mode"] === "deny" ? "deny" : "mask", ...(noMatch !== undefined ? { onExtractNoMatch: noMatch } : {}) };
|
|
508
|
+
};
|
|
500
509
|
const entries = new Map();
|
|
501
|
-
for (const e of listOf(at(p, list)) ?? [])
|
|
502
|
-
if (typeof e
|
|
503
|
-
|
|
510
|
+
for (const e of listOf(at(p, list)) ?? []) {
|
|
511
|
+
if (typeof e !== "object" || e === null)
|
|
512
|
+
continue;
|
|
513
|
+
const mine = e;
|
|
514
|
+
const prior = entries.get(mine[key]);
|
|
515
|
+
entries.set(mine[key], prior === undefined ? { ...mine } : fold(mine, prior, mine));
|
|
516
|
+
}
|
|
504
517
|
for (const e of listOf(at(child, list)) ?? []) {
|
|
505
518
|
if (typeof e !== "object" || e === null)
|
|
506
519
|
continue;
|
|
507
520
|
const mine = e;
|
|
508
521
|
const theirs = entries.get(mine[key]);
|
|
509
|
-
|
|
510
|
-
entries.set(mine[key], { ...mine });
|
|
511
|
-
continue;
|
|
512
|
-
}
|
|
513
|
-
const strictest = (a, b) => (NO_MATCH_ORDER.indexOf(String(a ?? "warn")) >= NO_MATCH_ORDER.indexOf(String(b ?? "warn")) ? a : b);
|
|
514
|
-
entries.set(mine[key], { ...theirs, mode: theirs["mode"] === "deny" || mine["mode"] === "deny" ? "deny" : "mask", ...(theirs["onExtractNoMatch"] !== undefined || mine["onExtractNoMatch"] !== undefined ? { onExtractNoMatch: strictest(theirs["onExtractNoMatch"], mine["onExtractNoMatch"]) } : {}) });
|
|
522
|
+
entries.set(mine[key], theirs === undefined ? { ...mine } : fold(theirs, theirs, mine));
|
|
515
523
|
}
|
|
516
524
|
put(out, list, [...entries.values()]);
|
|
517
525
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* A CLOSED SET with one home, registered in `docs/CLOSED-SETS.md`; `gate:closed-sets` holds the whole family to it: every family literal under
|
|
19
19
|
* `src/` is a member, a notice word in a notice's `code`, or a ledgered non-word, and every member is still spelled somewhere.
|
|
20
20
|
*/
|
|
21
|
-
export declare const CONFIG_REFUSAL_CODES: readonly ["config.a2a_inside_incomplete", "config.a2a_peer_name_collision", "config.advisor_model_invalid", "config.advisor_tool_invalid", "config.agent.duplicate", "config.agent.invalid", "config.agent.reserved_name", "config.agent.unknown_model", "config.agent.unknown_tool", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid", "config.agents.no_delegation_tool", "config.approval_reach_invalid", "config.attachment_invalid", "config.auto_consolidation", "config.auto_mode_classifier_fallback_invalid", "config.auto_mode_denial_limit_invalid", "config.auto_mode_rate_limit_break_invalid", "config.auto_mode_timeout_invalid", "config.brain_call_guardrail_invalid", "config.cascade_invalid", "config.circuit_breaker_invalid", "config.command_sandbox_unavailable", "config.compliance_denied", "config.compliance_posture", "config.compliance_required", "config.context_settings_unknown_word", "config.credential_in_declaration", "config.credential_ref_invalid", "config.cross_boundary_posture", "config.cwd_conflicts_restore", "config.cwd_not_honored", "config.cwd_outside_root", "config.cwd_unsupported", "config.defer_mode_invalid", "config.delegation_entry_caps", "config.deps_retired_key", "config.egress_requires_write_effect", "config.empty_objective", "config.env_lifetime_invalid", "config.execution_env_home_dir_invalid", "config.extra_body_output_cap", "config.extra_tool_names", "config.host_floor_invalid", "config.host_floor_refused", "config.image_invalid", "config.interaction_posture", "config.interaction_wiring", "config.invalid_argument", "config.invalid_checkpoint_store", "config.invalid_file_history_capture", "config.invalid_file_history_store", "config.invalid_governance_baseline", "config.invalid_on_track_failure", "config.invalid_output_schema", "config.invalid_permission_rules", "config.invalid_task_registry", "config.invalid_tool_name_set", "config.language_invalid", "config.legacy_tool_name", "config.limit_invalid", "config.limit_unknown_key", "config.locked_key", "config.locked_registry", "config.mcp_content_class", "config.mcp_dialable_failed", "config.mcp_fingerprint_invalid", "config.mcp_first_request_wait_invalid", "config.mcp_host_seat_missing", "config.mcp_host_seat_undeclared", "config.mcp_pool_foreign_connection", "config.mcp_probe_option", "config.mcp_server_name_collision", "config.mcp_startup_timeout_invalid", "config.memory_capture_policy", "config.memory_capture_spelling", "config.memory_capture_unsupported", "config.memory_challenge_request", "config.memory_consolidation", "config.memory_consolidation_driver", "config.memory_consolidation_lease_required", "config.memory_consolidation_provenance_off", "config.memory_consolidation_replica_local", "config.memory_consolidation_write_gate", "config.memory_delegation_evidence", "config.memory_dir_not_backend_root", "config.memory_distiller_purity_contract", "config.memory_dual_root_overlap", "config.memory_erasure_request", "config.memory_erasure_scope", "config.memory_export_request", "config.memory_hold_timeout", "config.memory_import_request", "config.memory_persistence_invalid", "config.memory_project_identity", "config.memory_project_key_spelling", "config.memory_project_marker", "config.memory_project_marker_nested", "config.memory_provenance", "config.memory_reanchor", "config.memory_rebuild_reason", "config.memory_scope_key", "config.memory_scope_placement", "config.memory_scope_spelling", "config.memory_sync_cursor_mismatch", "config.memory_sync_store", "config.memory_sync_target_mismatch", "config.memory_write_scope_mismatch", "config.microcompact_invalid", "config.missing_scope", "config.model_fallback_invalid", "config.mods_invalid", "config.nothing_to_wake", "config.output_style_invalid", "config.parent_spec_seat_missing", "config.peer_answer_invalid", "config.peer_presence_invalid", "config.peer_seat_missing", "config.permission_mode_invalid", "config.persisted_rule_bucket_missing", "config.placement_not_honored", "config.placement_root_invalid", "config.plan_file_invalid", "config.principal_inbox_consumer_invalid", "config.project_id_invalid", "config.project_identity_mismatch", "config.prompt_selector_invalid", "config.prompt_trait_unknown", "config.protocol_endpoint_unbound", "config.protocol_header_collision", "config.protocol_plaintext_credentials", "config.read_deny_floor_unkept", "config.read_face_invalid", "config.read_face_org_task_escalation", "config.read_face_read_block_conflict", "config.read_face_readonly_conflict", "config.read_face_seat", "config.registry_scope_mismatch", "config.reserved_tool_name", "config.retention_capability", "config.retention_policy", "config.retention_policy_invalid", "config.run_origin_invalid", "config.safe_vars_reserved_name", "config.sandbox_admission_unavailable", "config.sandbox_settings_invalid", "config.session_box_floor_mismatch", "config.session_rules_unreadable", "config.session_workspace_changed", "config.session_workspace_invalid", "config.shell_gate_value_retired", "config.skill_base_dir_invalid", "config.skill_deny_unreadable", "config.skill_listing_budget_invalid", "config.spec_member_unreadable", "config.spec_retired_key", "config.spec_unknown_key", "config.stale_tool_result_offload_invalid", "config.stall_timeout_invalid", "config.stall_timeout_retired", "config.store_durability_invalid", "config.store_fidelity_invalid", "config.tool_contract_too_long", "config.tool_face_control", "config.tool_face_invalid", "config.tool_materialize_invalid", "config.tool_materialize_unreachable", "config.tool_model_gate_env_invalid", "config.tool_model_gate_invalid", "config.tool_mount_denied", "config.tool_name_invalid", "config.tool_name_too_long", "config.tool_roster_bound", "config.tool_roster_mount_tag", "config.tool_roster_origin", "config.tool_schema_bound", "config.tool_search_invalid", "config.toolpolicy.unmatched_names", "config.unknown_role", "config.usage_window_invalid", "config.usage_window_unpriced", "config.user_attachment_invalid", "config.user_invoked_skill_unknown", "config.verify_internals_invalid", "config.web_max_bytes_invalid", "config.web_search_max_results_invalid", "config.web_summary_max_content_invalid", "config.web_timeout_invalid", "config.write_exempt_dir_covers_root", "config.write_face_invalid", "config.write_face_org_task_escalation", "config.write_face_readonly_conflict", "resume_at.before_root_unsupported", "resume_at.before_target_not_user", "resume_at.conflicts_resume", "resume_at.empty_branch", "resume_at.invalid_mode", "resume_at.mode_without_target", "resume_at.no_session", "resume_at.not_found", "resume_at.open_tool_call", "resume_at.outside_window"];
|
|
21
|
+
export declare const CONFIG_REFUSAL_CODES: readonly ["config.a2a_inside_incomplete", "config.a2a_peer_name_collision", "config.advisor_model_invalid", "config.advisor_tool_invalid", "config.agent.duplicate", "config.agent.invalid", "config.agent.reserved_name", "config.agent.unknown_model", "config.agent.unknown_tool", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid", "config.agents.no_delegation_tool", "config.approval_reach_invalid", "config.attachment_invalid", "config.auto_consolidation", "config.auto_mode_classifier_fallback_invalid", "config.auto_mode_denial_limit_invalid", "config.auto_mode_rate_limit_break_invalid", "config.auto_mode_timeout_invalid", "config.brain_call_guardrail_invalid", "config.cascade_invalid", "config.circuit_breaker_invalid", "config.command_sandbox_unavailable", "config.compliance_denied", "config.compliance_posture", "config.compliance_required", "config.context_settings_unknown_word", "config.credential_in_declaration", "config.credential_ref_invalid", "config.cross_boundary_posture", "config.cwd_conflicts_restore", "config.cwd_not_honored", "config.cwd_outside_root", "config.cwd_unsupported", "config.defer_mode_invalid", "config.delegation_entry_caps", "config.deps_retired_key", "config.egress_requires_write_effect", "config.empty_objective", "config.env_lifetime_invalid", "config.execution_env_home_dir_invalid", "config.extra_body_output_cap", "config.extra_tool_names", "config.host_floor_invalid", "config.host_floor_refused", "config.image_invalid", "config.interaction_posture", "config.interaction_wiring", "config.invalid_argument", "config.invalid_checkpoint_store", "config.invalid_file_history_capture", "config.invalid_file_history_store", "config.invalid_governance_baseline", "config.invalid_on_track_failure", "config.invalid_output_schema", "config.invalid_permission_rules", "config.invalid_session_store", "config.invalid_task_registry", "config.invalid_tool_name_set", "config.language_invalid", "config.legacy_tool_name", "config.limit_invalid", "config.limit_unknown_key", "config.locked_key", "config.locked_registry", "config.mcp_content_class", "config.mcp_dialable_failed", "config.mcp_fingerprint_invalid", "config.mcp_first_request_wait_invalid", "config.mcp_host_seat_missing", "config.mcp_host_seat_undeclared", "config.mcp_pool_foreign_connection", "config.mcp_probe_option", "config.mcp_server_name_collision", "config.mcp_startup_timeout_invalid", "config.memory_capture_policy", "config.memory_capture_spelling", "config.memory_capture_unsupported", "config.memory_challenge_request", "config.memory_consolidation", "config.memory_consolidation_driver", "config.memory_consolidation_lease_required", "config.memory_consolidation_provenance_off", "config.memory_consolidation_replica_local", "config.memory_consolidation_write_gate", "config.memory_delegation_evidence", "config.memory_dir_not_backend_root", "config.memory_distiller_purity_contract", "config.memory_dual_root_overlap", "config.memory_erasure_request", "config.memory_erasure_scope", "config.memory_export_request", "config.memory_hold_timeout", "config.memory_import_request", "config.memory_persistence_invalid", "config.memory_project_identity", "config.memory_project_key_spelling", "config.memory_project_marker", "config.memory_project_marker_nested", "config.memory_provenance", "config.memory_reanchor", "config.memory_rebuild_reason", "config.memory_scope_key", "config.memory_scope_placement", "config.memory_scope_spelling", "config.memory_sync_cursor_mismatch", "config.memory_sync_store", "config.memory_sync_target_mismatch", "config.memory_write_scope_mismatch", "config.microcompact_invalid", "config.missing_scope", "config.model_fallback_invalid", "config.mods_invalid", "config.nothing_to_wake", "config.output_style_invalid", "config.parent_spec_seat_missing", "config.peer_answer_invalid", "config.peer_presence_invalid", "config.peer_seat_missing", "config.permission_mode_invalid", "config.persisted_rule_bucket_missing", "config.placement_not_honored", "config.placement_root_invalid", "config.plan_file_invalid", "config.principal_inbox_consumer_invalid", "config.project_id_invalid", "config.project_identity_mismatch", "config.prompt_selector_invalid", "config.prompt_trait_unknown", "config.protocol_endpoint_unbound", "config.protocol_header_collision", "config.protocol_plaintext_credentials", "config.read_deny_floor_unkept", "config.read_face_invalid", "config.read_face_org_task_escalation", "config.read_face_read_block_conflict", "config.read_face_readonly_conflict", "config.read_face_seat", "config.registry_scope_mismatch", "config.reserved_tool_name", "config.retention_capability", "config.retention_policy", "config.retention_policy_invalid", "config.run_origin_invalid", "config.safe_vars_reserved_name", "config.sandbox_admission_unavailable", "config.sandbox_settings_invalid", "config.session_box_floor_mismatch", "config.session_rules_unreadable", "config.session_workspace_changed", "config.session_workspace_invalid", "config.shell_gate_value_retired", "config.skill_base_dir_invalid", "config.skill_deny_unreadable", "config.skill_listing_budget_invalid", "config.spec_member_unreadable", "config.spec_retired_key", "config.spec_unknown_key", "config.stale_tool_result_offload_invalid", "config.stall_timeout_invalid", "config.stall_timeout_retired", "config.store_durability_invalid", "config.store_fidelity_invalid", "config.tool_contract_too_long", "config.tool_face_control", "config.tool_face_invalid", "config.tool_materialize_invalid", "config.tool_materialize_unreachable", "config.tool_model_gate_env_invalid", "config.tool_model_gate_invalid", "config.tool_mount_denied", "config.tool_name_invalid", "config.tool_name_too_long", "config.tool_roster_bound", "config.tool_roster_mount_tag", "config.tool_roster_origin", "config.tool_schema_bound", "config.tool_search_invalid", "config.toolpolicy.unmatched_names", "config.unknown_role", "config.usage_window_invalid", "config.usage_window_unpriced", "config.user_attachment_invalid", "config.user_invoked_skill_unknown", "config.verify_internals_invalid", "config.web_max_bytes_invalid", "config.web_search_max_results_invalid", "config.web_summary_max_content_invalid", "config.web_timeout_invalid", "config.write_exempt_dir_covers_root", "config.write_face_invalid", "config.write_face_org_task_escalation", "config.write_face_readonly_conflict", "resume_at.before_root_unsupported", "resume_at.before_target_not_user", "resume_at.conflicts_resume", "resume_at.empty_branch", "resume_at.invalid_mode", "resume_at.mode_without_target", "resume_at.no_session", "resume_at.not_found", "resume_at.open_tool_call", "resume_at.outside_window"];
|
|
22
22
|
export type ConfigRefusalCode = (typeof CONFIG_REFUSAL_CODES)[number];
|
|
23
23
|
/**
|
|
24
24
|
* The CLASS of every `resume_at.*` word the ENGINE throws, declared beside the words — so a client that must decide "is the request still
|
|
@@ -55,6 +55,7 @@ export const CONFIG_REFUSAL_CODES = Object.freeze([
|
|
|
55
55
|
"config.invalid_on_track_failure",
|
|
56
56
|
"config.invalid_output_schema",
|
|
57
57
|
"config.invalid_permission_rules",
|
|
58
|
+
"config.invalid_session_store",
|
|
58
59
|
"config.invalid_task_registry",
|
|
59
60
|
"config.invalid_tool_name_set",
|
|
60
61
|
"config.language_invalid",
|
|
@@ -28,7 +28,8 @@ export declare function isToolAxesSurface(at: unknown): at is ToolAxesSurface;
|
|
|
28
28
|
/** The surfaces as a refusal lists them (`"mcp" | "a2a"`), read off the same table. */
|
|
29
29
|
export declare const toolAxesSurfaceList: () => string;
|
|
30
30
|
/** A declarer's name (a server's, a peer's) as every sentence about its declaration spells it: quoted, bounded, total — the entry's
|
|
31
|
-
* published identity (the engine mints it into every tool name it mounts). A name
|
|
31
|
+
* published identity (the engine mints it into every tool name it mounts). A name longer than the part read is spelled from that part
|
|
32
|
+
* alone, with no closing quote and the cut marked, so its spelling never looks whole. A name that is no string is named by its kind
|
|
32
33
|
* (`callerText`, which reads only the value's kind and length and so can never throw while a sentence is built). */
|
|
33
34
|
export declare const declarerNameOf: (name: unknown) => string;
|
|
34
35
|
/** How a sentence names one entry: the surface's declarer word (the row `declarerWord` in mcp-server-spec.ts reads) and, when there is
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inlineUntrusted } from "./untrusted-text.js";
|
|
1
|
+
import { INLINE_TRUNCATION_MARK, inlineUntrusted } from "./untrusted-text.js";
|
|
2
2
|
import { callerText } from "./caller-text.js";
|
|
3
3
|
export const TOOL_AXES_SURFACES = {
|
|
4
4
|
mcp: { key: "tool", declarer: "MCP server", refused: "the engine cannot read", standing: "A per-tool safety-axis declaration is the caller's trust root for the approval gate" },
|
|
@@ -15,7 +15,18 @@ export function isToolAxesSurface(at) {
|
|
|
15
15
|
return typeof at === "string" && Object.hasOwn(TOOL_AXES_SURFACES, at);
|
|
16
16
|
}
|
|
17
17
|
export const toolAxesSurfaceList = () => Object.keys(TOOL_AXES_SURFACES).map((s) => JSON.stringify(s)).join(" | ");
|
|
18
|
-
|
|
18
|
+
const DECLARER_NAME_SHOWN = 80;
|
|
19
|
+
const DECLARER_NAME_READ = 4096;
|
|
20
|
+
export const declarerNameOf = (name) => {
|
|
21
|
+
if (typeof name !== "string")
|
|
22
|
+
return callerText(name);
|
|
23
|
+
if (name.length <= DECLARER_NAME_READ)
|
|
24
|
+
return inlineUntrusted(JSON.stringify(name), DECLARER_NAME_SHOWN);
|
|
25
|
+
const last = name.charCodeAt(DECLARER_NAME_READ - 1);
|
|
26
|
+
const read = name.slice(0, last >= 0xd800 && last <= 0xdbff ? DECLARER_NAME_READ - 1 : DECLARER_NAME_READ);
|
|
27
|
+
const shown = inlineUntrusted(JSON.stringify(read).slice(0, -1), DECLARER_NAME_SHOWN);
|
|
28
|
+
return shown.endsWith(INLINE_TRUNCATION_MARK) ? shown : `${shown}${INLINE_TRUNCATION_MARK}`;
|
|
29
|
+
};
|
|
19
30
|
export function declarationSubject(at, declarer) {
|
|
20
31
|
return `${TOOL_AXES_SURFACES[at].declarer}${declarer === undefined ? "" : ` ${declarerNameOf(declarer)}`}`;
|
|
21
32
|
}
|
|
@@ -321,6 +321,29 @@ export type CallTargetStamp = <R extends ToolCallLike & {
|
|
|
321
321
|
}>(req: R, signal?: AbortSignal) => Promise<R & {
|
|
322
322
|
readonly targetReading: CallTargetReading;
|
|
323
323
|
}> | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* A stamp's answer as the gate takes it: the request it was handed with a target reading added. Each member of the call — its tool
|
|
326
|
+
* name, call id, face and arguments — is compared BY VALUE under one reading: the same value, or bytes the call's binding digest
|
|
327
|
+
* ({@link exactBoundInputHashOf}) reads as the same (a copy of the same bytes is the same call, a whole request cloned included, while
|
|
328
|
+
* its arguments and face are bindable data). The same call is answered by `req`: the request the gate was given — its name, id and face
|
|
329
|
+
* object — with the answer's arguments (the same bytes, the objects its reading binds) and reading on it. An answer that names another call MOVED it: `moved`
|
|
330
|
+
* names the first member that differs, and the gate refuses the call in {@link movedCallReading}'s words — a stamp reads the call and
|
|
331
|
+
* never moves it, so the bytes a card shows and the bytes that run stay one.
|
|
332
|
+
*/
|
|
333
|
+
export declare function stampedCallOf<R extends ToolCallLike & {
|
|
334
|
+
readonly toolCallId?: string;
|
|
335
|
+
}>(given: R, answer: R): {
|
|
336
|
+
readonly req: R;
|
|
337
|
+
readonly moved?: undefined;
|
|
338
|
+
} | {
|
|
339
|
+
readonly moved: "tool name" | "call id" | "face" | "arguments";
|
|
340
|
+
};
|
|
341
|
+
/** A stamp's answer that moved the call, as the gate's failed judgment takes it: the deployment's report (the hook-failure lane) and
|
|
342
|
+
* the model's sentence — the stamp moved the call (never the words of a policy that threw). */
|
|
343
|
+
export declare function movedCallReading(moved: string): {
|
|
344
|
+
readonly error: Error;
|
|
345
|
+
readonly said: string;
|
|
346
|
+
};
|
|
324
347
|
/** The stamp seat of one leg: its execution environment, its root and live working directory, whether its lanes hold a
|
|
325
348
|
* path rule (read per call — an activated skill can add one), and where the heads of the rows its lanes hold lead in its
|
|
326
349
|
* environment (resolved once per location per leg). */
|
|
@@ -3,7 +3,7 @@ import { declaredPathTargetOf, pathTargetValue, protectivePathTargetOf } from ".
|
|
|
3
3
|
import { leafChainMayHold, symlinkChainHops } from "./path-identity.js";
|
|
4
4
|
import { DEFAULT_GATE_AWAIT_TIMEOUT_MS, withGateTimeout } from "./gate-bounded-await.js";
|
|
5
5
|
import { thrownText } from "./thrown-value.js";
|
|
6
|
-
import { canonicalize } from "./canonical-json.js";
|
|
6
|
+
import { canonicalize, exactBoundInputHashOf } from "./canonical-json.js";
|
|
7
7
|
import { withArgsBinding } from "./skill-grant-binding.js";
|
|
8
8
|
export function pathTargetBaseOf(pt, bases) {
|
|
9
9
|
return pathTargetResolutionOf(pt ?? {}).base === "root" ? bases.root : (bases.cwd ?? bases.root);
|
|
@@ -224,6 +224,20 @@ export function callTargetViewsOf(req, direction, bare = {}) {
|
|
|
224
224
|
return { views: [{ path: spellingOfIdentity(target.identity, target.family), kind: "lexical" }] };
|
|
225
225
|
}
|
|
226
226
|
const ALLOW_UNRESOLVED = "where the target resolves was not read, so no allow by path can speak for it";
|
|
227
|
+
export function stampedCallOf(given, answer) {
|
|
228
|
+
const same = (a, b) => a === b || ((d) => d !== undefined && d === exactBoundInputHashOf(given.toolName, b))(exactBoundInputHashOf(given.toolName, a));
|
|
229
|
+
const moved = !same(given.toolName, answer.toolName) ? "tool name" : !same(given.toolCallId, answer.toolCallId) ? "call id" : !same(given.face, answer.face) ? "face" : !same(given.args, answer.args) ? "arguments" : undefined;
|
|
230
|
+
if (moved !== undefined)
|
|
231
|
+
return { moved };
|
|
232
|
+
const reading = answer.targetReading;
|
|
233
|
+
return { req: { ...given, args: answer.args, ...(reading !== undefined ? { targetReading: reading } : {}) } };
|
|
234
|
+
}
|
|
235
|
+
export function movedCallReading(moved) {
|
|
236
|
+
return {
|
|
237
|
+
error: new Error(`the target reading moved the call it was handed (its ${moved}) — a reading adds the call's target and never moves the call`),
|
|
238
|
+
said: `the call's target-reading stamp moved the call it was handed (its ${moved}), so it was denied fail-closed — a stamp adds the call's target and never moves the call (no policy threw)`,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
227
241
|
export function legCallTargetStamp(leg) {
|
|
228
242
|
const taken = new WeakMap();
|
|
229
243
|
return (req, signal) => {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* A leaf (type-only imports): the decision module that receives a record and the class derivation that reads one for its call
|
|
16
16
|
* both depend on it, and neither depends on the other through it.
|
|
17
17
|
*/
|
|
18
|
-
import type { AskClass, AskClassMembers, AskOrigin, AskReason } from "./ask-origin.js";
|
|
18
|
+
import type { AskClass, AskClassMembers, AskOrigin, AskReason, UnansweredMint } from "./ask-origin.js";
|
|
19
19
|
import type { ClassifierDenyCause, Settlement } from "./gate-outcome.js";
|
|
20
20
|
import type { ShellReadRefusalDetails } from "../tools/fs/shell-read-check.js";
|
|
21
21
|
import type { AutoModeClassifierRound, ClassifierSaid } from "./auto-mode.js";
|
|
@@ -79,6 +79,10 @@ export interface EngineAttestation {
|
|
|
79
79
|
/** A seat refused the call's arguments because no approval can be bound to them: the refusal's sentence, carried by the
|
|
80
80
|
* refusal itself — the gate's deny exit reads it (the remedy it gives) instead of judging again. */
|
|
81
81
|
readonly bindingRefusal?: string;
|
|
82
|
+
/** The ask resolver refused an ask nobody could answer with its one sentence for that ({@link UnansweredMint}): the cause, the
|
|
83
|
+
* question it quoted and the sentence. Written only by the resolver arms that mint it; read once, by the gate's deny exit, which
|
|
84
|
+
* re-mints the sentence over the same question in the form the park state allows. */
|
|
85
|
+
readonly unanswered?: UnansweredMint;
|
|
82
86
|
/** The engine's own account of the decision's `message` ({@link EngineSentence}): the sentence a station composed, whether it
|
|
83
87
|
* is the engine's generic question (the chain's entry mint, {@link import("./ask-origin.js").chainAskReasonsOf}, writes no
|
|
84
88
|
* entry for one), and the literals it quotes. Valid only while the decision's `message` is still that sentence — a later
|
|
@@ -53,14 +53,19 @@
|
|
|
53
53
|
* else, each handed to the model once, and a wake with nothing handed over ends `config.nothing_to_wake` before any model
|
|
54
54
|
* request. An engine without the word refuses the key (`config.spec_unknown_key`), so a shell that wakes a session gates
|
|
55
55
|
* on the word.
|
|
56
|
-
* - `file_history.recorded_place` —
|
|
57
|
-
* rewind (`Runner.rewindFiles`, `rewindFilesTo`, `resumeAt` + `restoreFiles`)
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* (`place_unrecorded`
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
56
|
+
* - `file_history.recorded_place` — the ENGINE's invariant, true wherever the engine runs: a file version records the directory it
|
|
57
|
+
* was recorded under (its absolute real path) and a rewind (`Runner.rewindFiles`, `rewindFilesTo`, `resumeAt` + `restoreFiles`)
|
|
58
|
+
* writes or deletes it only there — never anywhere else. How each other file is answered is read off its row's `class`, never
|
|
59
|
+
* off this word: left as it is (`leftAsIs`: `recorded_outside_root`, and the other classes of `FILE_HISTORY_LEFT_AS_IS_CLASSES`)
|
|
60
|
+
* or refused (`recorded_elsewhere` with `recordedUnder`; `place_unrecorded` for a version that records none); a run that does not
|
|
61
|
+
* accept a partial restore moves nothing when its plan finds a file it would refuse (the restore is planned first) — a refusal met
|
|
62
|
+
* only while it writes (`changed_since_plan`, a write the guarded check refused) comes after other files were restored, and that
|
|
63
|
+
* run fails `rewind.restore_failed` on a partly restored tree, every file it wrote named; the preview and the restore answer
|
|
64
|
+
* `files`, one row per file. It says nothing about whether a host takes the input below.
|
|
65
|
+
* - `file_history.unplaced_recorded_under` — the engine reads `unplacedHistoryRecordedUnder` (on `TaskSpec` and on
|
|
66
|
+
* `Runner.rewindFiles`): an absolute path, or the word `"rewind_root"` (the rewind's own root, supplied by the engine), under which
|
|
67
|
+
* a version that records no place is read as recorded. A host projects this word only where its own surface takes the input — the
|
|
68
|
+
* word for "this deployment accepts it" — apart from `file_history.recorded_place`, which holds either way.
|
|
64
69
|
* - `ask.workflow_member` — an ask a workflow member raises (`AskRequest`; a question, `AskQuestionRequest`) and the pending
|
|
65
70
|
* row its card lists as (`CheckpointSummary`) carry `workflowRunId` (the run's id, the one its progress frames and member rows carry) and
|
|
66
71
|
* `workflowAgentLabel` (a display word, not unique, unbounded by the engine — never a key), together, and
|
|
@@ -204,6 +209,6 @@
|
|
|
204
209
|
* the sentence naming the entry and repeating none of its url). An engine without the word ignores the member and says nothing
|
|
205
210
|
* of libraries; a host that declares them gates on the word.
|
|
206
211
|
*/
|
|
207
|
-
export declare const ENGINE_CAPABILITIES: readonly ["inherit_env.own_credentials_withheld", "inherit_env.own_credential_values_withheld", "mods.skill_seat", "user_attachments.read_state", "task.wake", "file_history.recorded_place", "ask.workflow_member", "task.fast_mode", "user_attachments.instruction_access", "task_notification.note_key", "task.continues_from", "execution_env.workspace_sync", "session.rewind_conversation", "instruction_family.external_includes", "instruction_family.host_text", "instruction_family.local_files", "session_changes.checkpoints", "session_changes.git", "task.agent_config_dirs", "task.agent_home_dirs", "artifact_host.libraries"];
|
|
212
|
+
export declare const ENGINE_CAPABILITIES: readonly ["inherit_env.own_credentials_withheld", "inherit_env.own_credential_values_withheld", "mods.skill_seat", "user_attachments.read_state", "task.wake", "file_history.recorded_place", "ask.workflow_member", "task.fast_mode", "user_attachments.instruction_access", "task_notification.note_key", "task.continues_from", "execution_env.workspace_sync", "session.rewind_conversation", "instruction_family.external_includes", "instruction_family.host_text", "instruction_family.local_files", "session_changes.checkpoints", "session_changes.git", "task.agent_config_dirs", "task.agent_home_dirs", "artifact_host.libraries", "file_history.unplaced_recorded_under"];
|
|
208
213
|
/** One word of {@link ENGINE_CAPABILITIES}. */
|
|
209
214
|
export type EngineCapability = (typeof ENGINE_CAPABILITIES)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ENGINE_CAPABILITIES = Object.freeze(["inherit_env.own_credentials_withheld", "inherit_env.own_credential_values_withheld", "mods.skill_seat", "user_attachments.read_state", "task.wake", "file_history.recorded_place", "ask.workflow_member", "task.fast_mode", "user_attachments.instruction_access", "task_notification.note_key", "task.continues_from", "execution_env.workspace_sync", "session.rewind_conversation", "instruction_family.external_includes", "instruction_family.host_text", "instruction_family.local_files", "session_changes.checkpoints", "session_changes.git", "task.agent_config_dirs", "task.agent_home_dirs", "artifact_host.libraries"]);
|
|
1
|
+
export const ENGINE_CAPABILITIES = Object.freeze(["inherit_env.own_credentials_withheld", "inherit_env.own_credential_values_withheld", "mods.skill_seat", "user_attachments.read_state", "task.wake", "file_history.recorded_place", "ask.workflow_member", "task.fast_mode", "user_attachments.instruction_access", "task_notification.note_key", "task.continues_from", "execution_env.workspace_sync", "session.rewind_conversation", "instruction_family.external_includes", "instruction_family.host_text", "instruction_family.local_files", "session_changes.checkpoints", "session_changes.git", "task.agent_config_dirs", "task.agent_home_dirs", "artifact_host.libraries", "file_history.unplaced_recorded_under"]);
|
|
@@ -69,8 +69,16 @@ export interface EngineNotice {
|
|
|
69
69
|
* source) / `request` / `deployment` / `skill`, `reason` from {@link import("./auto-strip.js").AUTO_STRIP_REASONS}.
|
|
70
70
|
* - `"mods.registration_refused"` — an extension registration was not mounted: a registration admitted before it
|
|
71
71
|
* answered `{ refuse }` on `plugin.register`, or failed while judging it (fail-closed). The run goes on without it.
|
|
72
|
-
* Audience `user
|
|
73
|
-
* provenance?, refusedBy, reason, sessionId }` (`
|
|
72
|
+
* Audience `user`, attention `act`. Once per refused registration per run. `detail: { name, seat, tier,
|
|
73
|
+
* provenance?, refusedBy, reason, sessionId }` (`provenance` as the host gave it, absent when none). 7.71.0 narrows it to the task seat.
|
|
74
|
+
* - `"mods.registration_refused_deployment"` (7.71.0) — the same, for the deployment seat (`RunnerDeps.mods`): audience
|
|
75
|
+
* `operator`, attention `act`; the same message, `detail` and frequency.
|
|
76
|
+
* - `"mods.package_key_unread"` — `loadModPackage` read a package whose `plugin.json` or `hooks.json` carries a member it does not
|
|
77
|
+
* read (another reader's — a skill's, a command's — or a misspelling): the package is loaded without it, and the member is listed on
|
|
78
|
+
* the registration's `unread`. Told when the package is read, outside any run, to the process's notice seat. Audience `operator`.
|
|
79
|
+
* Once per member per read; a package refused is told by its refusal alone. `detail: { package, file, key }` — `package` the
|
|
80
|
+
* package's directory (its real path), `file` the manifest's path inside it, `key` the member's name as a foreign line (one line,
|
|
81
|
+
* up to 60 characters, then the cut mark); never the member's value. The sentence sets the directory as a foreign line too.
|
|
74
82
|
* - `"mods.display_withheld"` — an answer for a window of an assistant message's display did not stand: its `classic.MessageDisplay`
|
|
75
83
|
* handler threw, answered a form the station cannot take, or the window was not answered within its own 10 s (counted from when
|
|
76
84
|
* its text settled, a dispatch slot's wait included). The handler is skipped (the ones below it answer in its place) and the window
|
|
@@ -213,11 +221,12 @@ export interface EngineNotice {
|
|
|
213
221
|
* (`model`, `modelName`, `thinking`, …) is REFUSED at the membrane instead — a silently ignored
|
|
214
222
|
* `model` runs a different agent than the author asked for.
|
|
215
223
|
* - `"workflow.parked_decision_unused"` (#4390) — a person's decision for a card a finished workflow run parked on reached
|
|
216
|
-
* this leg (`RunInternals.workflowParkedResume`) and the engine did not use it to continue the run. Once per (leg, run); a decision is told once per state (#4833):
|
|
217
|
-
* `detail: { runId, decisionIds, reason, holder?, code?, changed?, inputs?, why?, rowReason?, terminal?, continuedAs
|
|
218
|
-
* never the token; `reason` ∈ `WORKFLOW_PARK_UNUSED_REASONS`. `ask_unanswerable` = not used, still deliverable; `decision_spent` = used and refused,
|
|
224
|
+
* this leg (`RunInternals.workflowParkedResume`) and the engine did not use it to continue the run. Once per (leg, run) for the run's answer, and once more per reason and code for the decisions of that batch the judgment found settled for good (a drive refused them and no continuation had told it) that the run's answer does not name; a decision is told once per state (#4833): an answer that spends it (its reason's row of `WORKFLOW_PARK_UNUSED_REASON_CLASS` has a `spent` class, and no `kept` one or the answer carries that row's `spentWhen`) once for good, any other reason the park's holder can record once per state it names (the keys `reason`, `code`, `changed`, `inputs`, `holder`, `why`) — recorded on the park's holder, and a later hand-over in that state answered with nothing (`workflowParkDecisionOf` reads it);
|
|
225
|
+
* `detail: { runId, decisionIds, decisionKey, reason, holder?, code?, changed?, inputs?, why?, rowReason?, terminal?, continuedAs?, spent }` plus the leg's address,
|
|
226
|
+
* never the token; `reason` ∈ `WORKFLOW_PARK_UNUSED_REASONS`; `spent` (#5208, always a boolean: whether the answer spent these decisions for good; a notice without it is an older engine's) — what is left to do is `workflowParkUnusedClassOf(reason, spent)`. `ask_unanswerable` = not used, still deliverable; `decision_spent` = used and refused,
|
|
219
227
|
* a person decides again; `card_unresumable` = this engine never resumes the card (`terminal: true` = no release does); `continuing_elsewhere` = the claim
|
|
220
228
|
* is held elsewhere, `waiting_elsewhere` = continuing the run would add a waiting line — another line waits on a card (`holder` = its head run, or every head run when several lines wait): not used, still deliverable (once none of those lines waits); `run_not_ended` = the run that holds a card still waiting is recorded as running (its end was never written): not used, deliverable again only once that run has ended; a card no longer pending is `not_pending` whatever the run's record says. Audience user.
|
|
229
|
+
* - `"workflow.parked_decision_used"` (#5208) — the pair of the row above, the positive word: a continuation the engine started from the decisions this leg carried, told once by the leg that started it (a decision it carries is not among that run's unused notices); `detail: { runId, decisionIds, decisionKey, continuedAs }` plus the leg's address, never the token. `decisionKey` (both codes): the first 32 hex characters of the sha256 of the JSON `[runId, ids]` (`runId` the run the decisions name, never the leg that carried them; `ids` without repeats, ascending code-unit order) — compare it, never parse it; a notice's occurrence is (code, `decisionKey`, `reason`). Both codes are told before the leg's first request to its own model; on a leg that resumed to run the model's own `Workflow({ resumeFromRunId })` call for a run, with a Workflow tool mounted, neither is told for that run's readable decisions. The rest — guarantees, presence, limits — is docs/INTEGRATION-CORE.md's. Audience user; attention `audit` (off the screen).
|
|
221
230
|
* - `"workflow.record_unwritten"` (#4486) — a workflow run ended and its terminal record did not land: said on the default seat
|
|
222
231
|
* after the run has answered, at most once per run's end; its `detail` is on its row in `ENGINE_NOTICE_CODES`. Audience operator.
|
|
223
232
|
* - `"config.host_sink_failed"` — a host seat the run calls failed and was contained: it threw, or —
|
|
@@ -272,6 +281,10 @@ export interface EngineNotice {
|
|
|
272
281
|
* name this pid: `detail: { lock, path, pid }`, `lock` one of `"directory_fence"`, `"boot"` (a file
|
|
273
282
|
* store's data root) or `"mailbox"` (a box lock, unreadable at release or not removable). Said on the
|
|
274
283
|
* default seat; audience `operator`; once per failed release.
|
|
284
|
+
* - `"store.tree_id_stamp_incomplete"` — the file workflow-run store's open could not give some finished records their tree id
|
|
285
|
+
* (a write that failed or lost: `notStamped`), or its closing compaction failed (`notSynced`: the stamps read as written, and a
|
|
286
|
+
* crash before the store's next synced write loses them): `detail: { path, notStamped, notSynced, code }`, `code` the first
|
|
287
|
+
* failure's system code (`ENOSPC`, …). Said on the default seat; audience `operator`; once per open; the next open tries again.
|
|
275
288
|
* - `"store.lock_reclaimed_on_declaration"` — a file store's directory lock whose record names no pid
|
|
276
289
|
* namespace was removed because the host declared, with `declareDataRoot(root, { singleProcessTable:
|
|
277
290
|
* true })`, that every process opening that data root runs in this process table, and the process the
|
|
@@ -682,8 +695,8 @@ export interface EngineNotice {
|
|
|
682
695
|
* Audience `user`; `detail: { path, reason, sessionId, runId }` and, ONLY when the refused probe reached the file through an `@` include (any reason), `includedBy` (the including file's resolved absolute path, or the name of the host text that includes it) and `spelled` (the path after the `@` as the engine read it: a `#fragment` dropped, `\ ` read as a space) — a rules directory's file or a family member carries neither; an `outside_its_root` notice also carries `target` (the key the lane's resolution gave the file it judged — links followed; equal to `path` for a plain file named by its real spelling — present whenever that resolution named a key; the value a host sends back in `externalIncludes` to approve that file); `reason` closed (`INSTRUCTIONS_WITHHELD_REASONS`:
|
|
683
696
|
* `rule_denied`, `outside_roots`, `approval_required`, `admission_unknown`, `target_moved`, `outside_its_root`, `unanchored` — an include that names a place, of a host text named by a label or on a leg with no hands (a relative one in a label's text is told to no one), `path` its spelling — and `too_many_texts` — a host text past the first 20, `path` the first such text's name, no include keys). ONCE PER (FILE, REASON) PER SESSION — keyed on the probed `path` + `reason` (+ `target` where the notice has one), across runs (not once per session: another file, or the same file for another reason, is told again; the same path reached both ways is told by the first probe — a refusal for lying outside the roots by its widest edge when the load ends, and only for a file no edge read in that load);
|
|
684
697
|
* a file an earlier run delivered under an approval stays in the session; the `message` ends with what a person can do about that reason; a delegated leg records it and says nothing. A file that exists but cannot be read
|
|
685
|
-
* (an I/O error, not text, past the read bound) is the operator's line instead (`onError` phase `degraded`,
|
|
686
|
-
*
|
|
698
|
+
* (an I/O error, not text, past the read bound) is the operator's line instead (`onError` phase `degraded`, classification `attachment-read`), once per session per path.
|
|
699
|
+
* - `"instructions.outside_root"` (#4820) — a member the family names was LOADED though its real location (links followed) lies outside its root and the task root, as the reference reads it: audience `user`, attention `inform`, `detail: { path, target, sessionId, runId }` (never the contents), once per session per (`path`, `target`) when its frame reaches the transcript; a delegated leg records it and says nothing.
|
|
687
700
|
* - `"instructions.family_undeclared"` (#4179) — a run was prepared with no instruction family declared (`TaskSpec.instructionFamily`
|
|
688
701
|
* absent, `projectMemory` not `"disabled"`): no run of this deployment reads an instruction file (CLAUDE.md or another) into the
|
|
689
702
|
* model's context, and the wiring manifest says only `projectMemory: "absent"`. Declare the family (which file names, which rules
|
|
@@ -712,19 +725,16 @@ export interface EngineNotice {
|
|
|
712
725
|
* is on that operator line only). Audience `"user"`; `detail: { cause, count, outcome?, finishReason?, inputTokens?,
|
|
713
726
|
* outputTokens?, contextWindow?, maxTokens?, reasksSoFar?, toolCallIds?, sessionId, runId }` — the five turn facts
|
|
714
727
|
* and `reasksSoFar` on `truncated` / `unnamed` only (#4716): `reasksSoFar` the re-asks this run's malformed-tool-use
|
|
715
|
-
* retry made before the turn the line is about (on a Runner run; other recovery lanes' continues are not counted;
|
|
716
|
-
* `
|
|
717
|
-
* `
|
|
718
|
-
*
|
|
719
|
-
* the
|
|
720
|
-
*
|
|
721
|
-
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
* sentence
|
|
725
|
-
* `missing_result_synthesized` only, each id in the provider echo shape (a stored id outside it is not shown;
|
|
726
|
-
* `count` still counts it). Closed-set words, a count and call ids only: never a tool name, an argument or the
|
|
727
|
-
* note's text. ONCE PER RUN PER CAUSE. Absent ⇒ nothing of that cause reached the model.
|
|
728
|
+
* retry made before the turn the line is about (on a Runner run; other recovery lanes' continues are not counted);
|
|
729
|
+
* `count` the calls (or frames) of that cause in the turn or request that first showed it. Once for the cause that
|
|
730
|
+
* first showed it; `toolCallIds` on `missing_result_synthesized` only, each id in the provider echo shape (a stored
|
|
731
|
+
* id outside it is not shown; `count` still counts it). Closed-set words, a count and call ids only: never a tool
|
|
732
|
+
* name, an argument or the note's text. ONCE PER RUN PER CODE PER CAUSE. 7.71.0 narrows it to dropped calls whose turn's
|
|
733
|
+
* own message says what became of them (#1640), attention `inform`: `outcome` `terminal` (the lane failed the run on them,
|
|
734
|
+
* `model_output_invalid`; KL-4808-a) or `reissued` (the turn goes on and the next request asks the model to re-issue them).
|
|
735
|
+
* - `"task.tool_turn_unrecovered"` (7.71.0) — the rest of that line, attention `act`, `detail` without `outcome`: dropped
|
|
736
|
+
* calls whose turn states no outcome (a refusal, an abort, a completed turn with nothing to run, a torn stream; the
|
|
737
|
+
* sentence stops at "so they did not run"), `bad_frame`, `missing_result_synthesized`.
|
|
728
738
|
* - `"config.read_face_deployment_clamped"` (#237) — a deployment-wide `readFace: "open"` is not
|
|
729
739
|
* in force beside a read-only (verifier) mount: it clamps to "roots" without throwing
|
|
730
740
|
* (stricter-wins; the clamp verdict stands, only its occurrence was undisclosed). Announced
|
|
@@ -878,6 +888,7 @@ export interface EngineNotice {
|
|
|
878
888
|
* a form this engine reads: for a file store a link, not an ordinary file, bytes that are no rule file, or a marker that is none), `later_grammar` (a newer engine wrote them), `no_answer` (the read did not answer in time) or `unclassified` (a
|
|
879
889
|
* store that states none of these). The sentence names the partition, the cause and the repair; no path rides the notice (the store's own disclosure line carries where). Audience `user`.
|
|
880
890
|
* - `"permission.rule_store_unreadable_relaxed"` — the same fact where the leg's mode answers the class with nobody asked (`auto`, `bypassPermissions`), so the line above is not minted; once per SESSION per (fault set, mode) — a fault first found at a call, once per run — `detail: { at, mode, sessionId, runId, faults }` (as above; no rule text, no path). Also minted, under those modes only, for deny or ask rows whose rule itself could not be read (`EffectivePermissionRules.unreadableRows` other than `as_read`): the calls they may reach take the same class (`faults`: `damaged` over the sources their scopes name). Audience `operator`.
|
|
891
|
+
* - `"permission.revival_root_policy_unrestated"` (7.71.0) — a resume on the runner that holds a parked agent's chain live (it registered it when the agent last parked there: its spawn, or an earlier revival there), handed no root task policy (`RunInternals.rootPolicy` / `parkedResume.rootPolicy`) for a chain that carries the root task's own layer: the chain it runs under keeps that layer as registered (on another runner the same resume is refused for it). Said on the resuming runner's `onNotice` the moment the resume's claim is won, before the leg starts — an attempt refused before the claim, or one that loses it, says nothing; a start that fails after the claim and reopens the row says it again on the next won claim (no per-token suppression). `detail: { sessionId }` (the revived leg's). Audience `operator`, attention `act`.
|
|
881
892
|
* - `"config.entries_not_applied"` (7.70.0) — an entry the person wrote did not apply. One frame per kind (`detail.kind`, closed
|
|
882
893
|
* `ENTRIES_NOT_APPLIED_KINDS`), each told as its own mint decides and in its own sentence; `detail: { kind, entries, count, identity,
|
|
883
894
|
* …routing }` — `entries` at most the first eight (`ENTRIES_NOT_APPLIED_SHOWN`), each with `entry` (what the person wrote, as written:
|
|
@@ -914,7 +925,7 @@ export interface EngineNotice {
|
|
|
914
925
|
* written in an earlier rule grammar holds entries this engine's grammar reads as no rule (they admit nothing), or that named no
|
|
915
926
|
* tool in grammar 0. Once per session per entry set per rules session. Each entry: `reader`; frame members `bucket`,
|
|
916
927
|
* `storedGrammar`, `rewrite` (`{ by: "rewrite_in_current_grammar", stampsGrammar }`), `rulesSessionId` with `sessionId` (both
|
|
917
|
-
* absent on a hand-built `createSessionRulePolicy`'s notice).
|
|
928
|
+
* absent on a hand-built `createSessionRulePolicy`'s notice). · `setting_not_applied` (7.71.0) — see `src/core/shared-artifact-reads.ts`.
|
|
918
929
|
* RETIRED here (BREAKING, named; `NOTICE_CODE_LINEAGE`): `permission.rule_row_dropped`, `permission.settings_rules_skipped`,
|
|
919
930
|
* `mcp.injection_dropped`, `model.role_defaulted` and `permission.allowed_tool_not_granted` — each fact is one kind above (the
|
|
920
931
|
* last one's refusing side `config.skill_deny_unreadable`); last minted by 7.69.1.
|
|
@@ -1150,18 +1161,36 @@ export interface EngineNotice {
|
|
|
1150
1161
|
* loop's ending stands as it was. A stop that arrives once the result is out is refused typed (`steering.not_running`, every
|
|
1151
1162
|
* verb alike): the refusal itself is the loud answer.
|
|
1152
1163
|
*
|
|
1164
|
+
* - `"task.wait_ceiling_reached"` — a one-shot submission's ending (`TaskSpec.oneShot`) waited for the loop-type
|
|
1165
|
+
* background tasks it started and stopped at the wait's own ceiling (`limits.oneShotWaitCeilingMs`, default 600 000 ms)
|
|
1166
|
+
* with some still owed: no stop arrived — the wait gave up. The answer stands as the result. Once per such run, read as the
|
|
1167
|
+
* notice is built, before the run-end sweep: `detail: { sessionId, runId, taskId?, ceilingMs, waitedFor }`, `waitedFor` the
|
|
1168
|
+
* same reading `task.interrupt_unconsumed` carries (`{ taskId, taskType?, status?, description?, stopped? }`, never empty);
|
|
1169
|
+
* the sentence names each task with what the run's end does to it. A stop that lands on the run's tail after this cut no wait:
|
|
1170
|
+
* its `task.interrupt_unconsumed` carries `waitedFor: []`. Audience `"user"`, attention `act` (the result carries nothing from them).
|
|
1171
|
+
*
|
|
1153
1172
|
* - `"approval.read_root_granted"` / `"approval.read_root_grant_rejected"` — an approver's `readRootGrant`
|
|
1154
1173
|
* (`AskOutcome`, with its `readRootGrantLasts`). GRANTED: it equalled the card's `readRootCandidate.dir` beside
|
|
1155
1174
|
* `allow: true`; the READ directories now include it (never the write roots), for `detail.lasts`: `"session"` — a
|
|
1156
1175
|
* session rule the session's later runs read too — or `"run"` (the sentence says why a session-long answer took the
|
|
1157
1176
|
* run: the card did not offer it, a policy answered, or the rule could not be written — `sessionUnconfirmed: true` when its
|
|
1158
1177
|
* write may have landed all the same); `detail: { dir, covers?, root, lasts, sessionUnconfirmed?, toolName, toolCallId,
|
|
1159
|
-
* sessionId, runId, taskId }`, `root` = the canonical spelling held
|
|
1160
|
-
*
|
|
1161
|
-
* `
|
|
1162
|
-
* beside it) | `no_candidate` | `mismatch` | `unresolvable` | `resolves_elsewhere` |
|
|
1163
|
-
* (the directory contains the wired local artifact store, lies inside it or is it) |
|
|
1164
|
-
* answered ask
|
|
1178
|
+
* checkpointId, sessionId, runId, taskId }`, `root` = the canonical spelling held, `checkpointId` = the card's
|
|
1179
|
+
* `AskRequest.checkpointId`. REJECTED: nothing changed (save a write the message says may have landed), the verdict stands; `detail: { reason,
|
|
1180
|
+
* offered?, requested?, …same ids }`, `reason` ∈ `not_a_string` | `lasts_invalid` (a duration outside `"session"` /
|
|
1181
|
+
* `"run"`, or one with no grant beside it) | `no_candidate` | `mismatch` | `unresolvable` | `resolves_elsewhere` |
|
|
1182
|
+
* `admits_artifact_store` (the directory contains the wired local artifact store, lies inside it or is it) |
|
|
1183
|
+
* `no_read_roots`. Once per answered ask whose grant was a choice that did not take; a grant riding a refusal does not
|
|
1184
|
+
* apply and mints nothing. Audience `"user"`; attention `audit` for both.
|
|
1185
|
+
* - `"approval.session_call_granted"` / `"approval.session_call_grant_rejected"` (`src/core/runner/session-call-grant-station.ts`) —
|
|
1186
|
+
* an approver's `sessionCallGrant` (`AskOutcome`). GRANTED: the card's own `grant` beside `allow: true`, no edit, a person's answer,
|
|
1187
|
+
* and the session row binding the call written (later calls of the session that read back the same binding are allowed by it);
|
|
1188
|
+
* `detail: { rule, cwd, programs, toolName, toolCallId, checkpointId, sessionId, runId, taskId }` (`rule` = the row's text, the key
|
|
1189
|
+
* `removePersistedRule` takes it back by; no word of the command; `checkpointId` = the card's `AskRequest.checkpointId`). REJECTED:
|
|
1190
|
+
* nothing kept (save a write the message says may have landed); `detail: { reason, offered?, requested?, …same ids }` (`offered`: the card's key, when it offered one), `reason` ∈
|
|
1191
|
+
* `SESSION_CALL_GRANT_REJECTIONS` (`not_written`: no longer keeping session rules, or the write failed). Once per answered ask whose
|
|
1192
|
+
* member was a choice that did not take; a refusal, or the card's key in an answer no person gave, mints nothing. Audience `"user"`;
|
|
1193
|
+
* attention `audit` for both (a record of the person's own answer; a surface joins either to its card by `checkpointId`).
|
|
1165
1194
|
* - `"approval.approver_defect"` (`src/core/runner/approver-defect-announcer.ts`, `approverDefectAnnouncer`; minted by the four stations that put an
|
|
1166
1195
|
* ask to an approver) — the approver THREW, or ANSWERED outside its contract (an answer that is not `true` / `false` /
|
|
1167
1196
|
* `"unavailable"` / the `{allow}` object, or an object the seam refuses: a reason that is no string, an attribution or a
|
|
@@ -1268,7 +1297,8 @@ export interface EngineNotice {
|
|
|
1268
1297
|
* (the design/336 §13-2 model-psyche guardrail). `detail.reportId` (#479) is shared by all
|
|
1269
1298
|
* three families AND `"memory.harvest_quarantined"` when they derive from the same harvest
|
|
1270
1299
|
* report — that sharing is the contract (one report, several distinct facts): dedup on
|
|
1271
|
-
* `(code, detail.reportId)`; a repeat with the same pair is a replay, a new pair is a new fact.
|
|
1300
|
+
* `(code, detail.reportId)`; a repeat with the same pair is a replay, a new pair is a new fact. `hold_opened`: attention
|
|
1301
|
+
* `inform` (7.71.0; `act` before).
|
|
1272
1302
|
* - `"memory.harvest_refused"` (#2424) — the boundary harvest was refused wholesale by an incident
|
|
1273
1303
|
* — the deletion fuse: nothing deleted, the removed files back from their saved copies (and how many
|
|
1274
1304
|
* could not); a vanished write root or an unreadable control plane: its memory changes did not take effect.
|
|
@@ -1341,7 +1371,7 @@ export interface EngineNotice {
|
|
|
1341
1371
|
* one-way record say so, rather than claiming the session declared it). Audience `"user"`.
|
|
1342
1372
|
* Dedup unit: once per SESSION — key `(code, detail.sessionId)`, so the standing-record resume
|
|
1343
1373
|
* arm folds into the standing entry instead of double-announcing. 7.70.0 narrows it to the origins the person did not
|
|
1344
|
-
* give on this session (`standing-record`, `delegation-floor`, `fork-origin
|
|
1374
|
+
* give on this session (`standing-record`, `delegation-floor`, `fork-origin`); the person's own switch is next. Attention `inform` (7.71.0).
|
|
1345
1375
|
* - `"memory.capture_switched_off"` (7.70.0) — the same posture and message, landed by the person's own switch: `origin`
|
|
1346
1376
|
* `declaration` (the task declared `capture: "off"`) or `flip-verb` (the live verb). `detail: { sessionId, origin }`. Audience
|
|
1347
1377
|
* `"user"` — the frame still reaches the person's stream, where a surface confirms the switch landed — attention `audit`.
|
|
@@ -1369,9 +1399,9 @@ export interface EngineNotice {
|
|
|
1369
1399
|
* - `"memory.mount_failed"` — a memory store that was asked for did not mount for this run (the memory phase's fail-open
|
|
1370
1400
|
* arm: the task runs without its memory). Minted under the guard that mints the run's `memoryless` / `mount-failed`
|
|
1371
1401
|
* observation, so the two are one fact; the operator's half is `onError` (`{ phase: "memory" }`), this is the person's.
|
|
1372
|
-
* `detail: { sessionId, scopes, cause, outsideReason? }` — `scopes` what the task asked to mount (the whole span failed), `cause`
|
|
1373
|
-
*
|
|
1374
|
-
* `memory.target_outside_store` (its case); never the thrown text or a path. Audience `"user"`. Dedup: once per SESSION — key
|
|
1402
|
+
* `detail: { sessionId, scopes, cause, outsideReason? }` — `scopes` what the task asked to mount (the whole span failed), `cause` the
|
|
1403
|
+
* refusal's code when a member of `STORE_FORM_REFUSAL_CODES` or `memory.root_anchor_damaged`, else `"unclassified"`; `outsideReason`
|
|
1404
|
+
* exactly when `cause` is `memory.target_outside_store` (its case); never the thrown text or a path. Audience `"user"`. Dedup: once per SESSION — key
|
|
1375
1405
|
* `(code, detail.sessionId)`; the phase mints once per leg whose mount failed. The model's half: the memory band's writes-unavailable notice.
|
|
1376
1406
|
* - `"memory.consolidation_incomplete"` (design/376, LLM consolidation driver) — a driver run
|
|
1377
1407
|
* settled without reaching the fixpoint: `detail` names the stop reason (the closed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ENGINE_VERSION = "7.
|
|
1
|
+
export const ENGINE_VERSION = "7.71.0";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The kinds of entry that did not apply — `detail.kind` of `config.entries_not_applied`. */
|
|
2
|
-
export declare const ENTRIES_NOT_APPLIED_KINDS: readonly ["stored_rule_row", "rule_text_unreadable", "mcp_injection_dropped", "model_word_unknown", "allow_entry_inert", "session_rule_unread", "session_rule_named_no_tool"];
|
|
2
|
+
export declare const ENTRIES_NOT_APPLIED_KINDS: readonly ["stored_rule_row", "rule_text_unreadable", "mcp_injection_dropped", "model_word_unknown", "allow_entry_inert", "session_rule_unread", "session_rule_named_no_tool", "setting_not_applied"];
|
|
3
3
|
export type EntriesNotAppliedKind = (typeof ENTRIES_NOT_APPLIED_KINDS)[number];
|
|
4
4
|
/** How many entries a frame lists; `count` counts every one. */
|
|
5
5
|
export declare const ENTRIES_NOT_APPLIED_SHOWN = 8;
|