@sema-agent/core 7.48.0 → 7.49.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 +418 -0
- package/README.md +2 -2
- package/dist/agents/cascade.d.ts +2 -5
- package/dist/agents/child-failure.d.ts +20 -0
- package/dist/agents/child-failure.js +28 -0
- package/dist/agents/cross-session-ref.d.ts +11 -3
- package/dist/agents/cross-session-ref.js +6 -0
- package/dist/agents/cumulative-stats.d.ts +12 -15
- package/dist/agents/cumulative-stats.js +1 -1
- package/dist/agents/extra-tool-names.js +1 -1
- package/dist/agents/inherited-tool-pool.d.ts +17 -13
- package/dist/agents/inherited-tool-pool.js +4 -3
- package/dist/agents/peer-session-drain.d.ts +3 -2
- package/dist/agents/peer-session-drain.js +5 -4
- package/dist/agents/send-message-tool.js +2 -9
- package/dist/agents/subagent.d.ts +10 -29
- package/dist/agents/subagent.js +65 -53
- package/dist/agents/suspend-guard.d.ts +1 -1
- package/dist/agents/tool-filter.d.ts +76 -65
- package/dist/agents/tool-filter.js +122 -92
- package/dist/agents/verify.d.ts +4 -7
- package/dist/agents/verify.js +6 -7
- package/dist/bench/metrics.d.ts +1 -2
- package/dist/brain/anthropic.js +133 -79
- package/dist/brain/errors.d.ts +53 -6
- package/dist/brain/errors.js +22 -2
- package/dist/brain/input-too-long.d.ts +40 -19
- package/dist/brain/input-too-long.js +3 -16
- package/dist/brain/open-responses.js +19 -10
- package/dist/brain/openai.js +123 -32
- package/dist/brain/provider-dialect.d.ts +214 -0
- package/dist/brain/provider-dialect.js +186 -0
- package/dist/brain/request-params.d.ts +27 -8
- package/dist/brain/request-params.js +7 -12
- package/dist/brain/request-route.d.ts +84 -0
- package/dist/brain/request-route.js +41 -0
- package/dist/brain/retry.d.ts +8 -0
- package/dist/brain/retry.js +10 -4
- package/dist/brain/route-adjudicator.d.ts +7 -0
- package/dist/brain/route-adjudicator.js +5 -1
- package/dist/brain/status-sink.d.ts +20 -0
- package/dist/brain/status-sink.js +11 -0
- package/dist/brain/stream-engine.d.ts +52 -1
- package/dist/brain/stream-engine.js +81 -24
- package/dist/brain/stream-shared.d.ts +57 -11
- package/dist/brain/stream-shared.js +28 -2
- package/dist/core/a2a.d.ts +1 -0
- package/dist/core/agent-config-dir.js +3 -2
- package/dist/core/allow-entry.d.ts +21 -12
- package/dist/core/allow-entry.js +38 -31
- package/dist/core/arg-summary.d.ts +17 -24
- package/dist/core/arg-summary.js +169 -68
- package/dist/core/ask-origin.d.ts +42 -24
- package/dist/core/ask-origin.js +18 -13
- package/dist/core/auto-mode-prompt-assets.d.ts +2 -2
- package/dist/core/auto-mode-prompt-assets.js +1 -1
- package/dist/core/auto-mode-prompt.d.ts +11 -1
- package/dist/core/auto-mode-prompt.js +13 -10
- package/dist/core/auto-mode-rebuild.d.ts +7 -0
- package/dist/core/auto-mode-rebuild.js +4 -1
- package/dist/core/canonical-json.d.ts +3 -0
- package/dist/core/canonical-json.js +2 -1
- package/dist/core/checkpoint-requirements.d.ts +892 -0
- package/dist/core/checkpoint-requirements.js +333 -0
- package/dist/core/checkpoint-store.d.ts +94 -65
- package/dist/core/checkpoint-store.js +14 -26
- package/dist/core/child-clamp-seats.d.ts +228 -69
- package/dist/core/child-clamp-seats.js +211 -17
- package/dist/core/classifier-unavailable-arm.d.ts +5 -1
- package/dist/core/classifier-unavailable-arm.js +3 -3
- package/dist/core/compliance.d.ts +3 -0
- package/dist/core/compliance.js +9 -4
- package/dist/core/credential-vocabulary.d.ts +140 -0
- package/dist/core/credential-vocabulary.js +131 -0
- package/dist/core/decision-receipt.js +1 -1
- package/dist/core/effective-path-target.d.ts +73 -16
- package/dist/core/effective-path-target.js +63 -33
- package/dist/core/engine-notice.d.ts +32 -7
- package/dist/core/file-history-store.js +2 -2
- package/dist/core/fs-write-gate-policy.d.ts +4 -0
- package/dist/core/fs-write-gate-policy.js +22 -5
- package/dist/core/gate-bounded-await.d.ts +28 -13
- package/dist/core/gate-bounded-await.js +41 -4
- package/dist/core/gate-fold.d.ts +1 -1
- package/dist/core/gate-fold.js +24 -25
- package/dist/core/gate-lanes.js +16 -15
- package/dist/core/gate-outcome.d.ts +20 -5
- package/dist/core/gate-outcome.js +5 -0
- package/dist/core/governance-codes.d.ts +11 -4
- package/dist/core/governance-codes.js +14 -3
- package/dist/core/hooks.d.ts +4 -0
- package/dist/core/locked-config.d.ts +8 -0
- package/dist/core/locked-config.js +14 -2
- package/dist/core/lsp.js +3 -5
- package/dist/core/mailbox-store.d.ts +3 -4
- package/dist/core/mcp-connection-pool.d.ts +75 -0
- package/dist/core/mcp-connection-pool.js +128 -0
- package/dist/core/mcp-failure.d.ts +2 -1
- package/dist/core/mcp-failure.js +13 -2
- package/dist/core/mcp.d.ts +4 -0
- package/dist/core/mcp.js +70 -43
- package/dist/core/memory-engine/content-origin.js +2 -14
- package/dist/core/memory-engine/engine.d.ts +32 -22
- package/dist/core/memory-engine/engine.js +103 -55
- package/dist/core/memory-engine/file-backend.d.ts +13 -30
- package/dist/core/memory-engine/file-backend.js +37 -252
- package/dist/core/memory-engine/index.d.ts +1 -1
- package/dist/core/memory-engine/index.js +1 -1
- package/dist/core/memory-engine/layout.d.ts +139 -9
- package/dist/core/memory-engine/layout.js +350 -7
- package/dist/core/memory-engine/scope-contract.d.ts +10 -0
- package/dist/core/memory-engine/scope-contract.js +8 -0
- package/dist/core/memory-engine/session-incarnation.d.ts +14 -4
- package/dist/core/memory-engine/session-incarnation.js +5 -2
- package/dist/core/memory-engine/types.d.ts +10 -1
- package/dist/core/memory.js +5 -17
- package/dist/core/model-seat.d.ts +4 -4
- package/dist/core/model-seat.js +1 -1
- package/dist/core/mounted-mcp.d.ts +57 -0
- package/dist/core/mounted-mcp.js +19 -0
- package/dist/core/namespaced-rule-name.d.ts +29 -0
- package/dist/core/namespaced-rule-name.js +52 -0
- package/dist/core/park-selfcheck.d.ts +1 -1
- package/dist/core/park-selfcheck.js +16 -6
- package/dist/core/path-guard-rows.d.ts +99 -0
- package/dist/core/path-guard-rows.js +45 -0
- package/dist/core/path-identity.d.ts +22 -16
- package/dist/core/path-identity.js +10 -10
- package/dist/core/path-rule-binding.d.ts +2 -1
- package/dist/core/path-rule-binding.js +3 -1
- package/dist/core/pause-registry.d.ts +16 -2
- package/dist/core/pause-registry.js +6 -0
- package/dist/core/permission-rule-consent.js +0 -7
- package/dist/core/permission-rule-model.d.ts +68 -24
- package/dist/core/permission-rule-model.js +105 -24
- package/dist/core/permission-rule-store.js +2 -2
- package/dist/core/permission-rules.d.ts +3 -30
- package/dist/core/permission-rules.js +4 -54
- package/dist/core/read-root-candidate.d.ts +1 -3
- package/dist/core/read-root-candidate.js +4 -15
- package/dist/core/real-approval.d.ts +4 -3
- package/dist/core/retired-keys.d.ts +13 -0
- package/dist/core/retired-keys.js +14 -0
- package/dist/core/roles.d.ts +2 -3
- package/dist/core/roles.js +15 -6
- package/dist/core/runner/assemble-result.d.ts +0 -7
- package/dist/core/runner/assemble-result.js +19 -31
- package/dist/core/runner/caller-roster.d.ts +78 -0
- package/dist/core/runner/caller-roster.js +219 -0
- package/dist/core/runner/checkpoint-scope.d.ts +16 -16
- package/dist/core/runner/checkpoint-scope.js +2 -2
- package/dist/core/runner/child-tree.js +2 -2
- package/dist/core/runner/contracts.d.ts +68 -35
- package/dist/core/runner/decide-continuation.d.ts +51 -3
- package/dist/core/runner/decide-continuation.js +76 -21
- package/dist/core/runner/denial-limit-arms.d.ts +17 -5
- package/dist/core/runner/denial-limit-arms.js +11 -9
- package/dist/core/runner/extra-body-dropped-seat.d.ts +8 -0
- package/dist/core/runner/extra-body-dropped-seat.js +22 -0
- package/dist/core/runner/finish-reason-seat.d.ts +9 -0
- package/dist/core/runner/finish-reason-seat.js +40 -0
- package/dist/core/runner/gate-exit.d.ts +44 -32
- package/dist/core/runner/gate-exit.js +112 -25
- package/dist/core/runner/inherited-ask-grants.js +6 -4
- package/dist/core/runner/mcp-redial.d.ts +3 -3
- package/dist/core/runner/mcp-redial.js +3 -4
- package/dist/core/runner/permission-rule-lanes.d.ts +1 -2
- package/dist/core/runner/permission-rule-lanes.js +5 -4
- package/dist/core/runner/prepare-artifact.d.ts +4 -0
- package/dist/core/runner/prepare-artifact.js +2 -1
- package/dist/core/runner/prepare-ask-lane.d.ts +2 -0
- package/dist/core/runner/prepare-ask-lane.js +12 -6
- package/dist/core/runner/prepare-boundary-parks.d.ts +5 -8
- package/dist/core/runner/prepare-boundary-parks.js +4 -7
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +11 -15
- package/dist/core/runner/prepare-caps-and-workflow.js +19 -27
- package/dist/core/runner/prepare-config-doors.d.ts +9 -9
- package/dist/core/runner/prepare-config-doors.js +10 -5
- package/dist/core/runner/prepare-defer-classify.d.ts +2 -2
- package/dist/core/runner/prepare-defer-classify.js +5 -3
- package/dist/core/runner/prepare-delegation-surface.d.ts +1 -1
- package/dist/core/runner/prepare-delegation-surface.js +3 -3
- package/dist/core/runner/prepare-gate-stations.d.ts +4 -4
- package/dist/core/runner/prepare-gate-stations.js +9 -7
- package/dist/core/runner/prepare-hands-readface.d.ts +7 -7
- package/dist/core/runner/prepare-hands-readface.js +7 -7
- package/dist/core/runner/prepare-inherited-gate.d.ts +7 -6
- package/dist/core/runner/prepare-inherited-gate.js +14 -15
- package/dist/core/runner/prepare-listings.d.ts +7 -24
- package/dist/core/runner/prepare-listings.js +4 -5
- package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -0
- package/dist/core/runner/prepare-memory-engine-session.js +4 -3
- package/dist/core/runner/prepare-memory.d.ts +6 -0
- package/dist/core/runner/prepare-memory.js +13 -13
- package/dist/core/runner/prepare-offload-wrappers.d.ts +5 -0
- package/dist/core/runner/prepare-offload-wrappers.js +3 -3
- package/dist/core/runner/prepare-park-ask.d.ts +7 -8
- package/dist/core/runner/prepare-park-ask.js +17 -10
- package/dist/core/runner/prepare-policy-chain.js +24 -44
- package/dist/core/runner/prepare-project-context.d.ts +1 -1
- package/dist/core/runner/prepare-project-context.js +3 -4
- package/dist/core/runner/prepare-protocol-tools.d.ts +9 -3
- package/dist/core/runner/prepare-protocol-tools.js +3 -4
- package/dist/core/runner/prepare-run-refs.d.ts +3 -0
- package/dist/core/runner/prepare-run-refs.js +2 -1
- package/dist/core/runner/prepare-safety-scan.d.ts +4 -8
- package/dist/core/runner/prepare-safety-scan.js +1 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +7 -1
- package/dist/core/runner/prepare-suspend-saga.js +28 -12
- package/dist/core/runner/prepare-task.d.ts +1 -1
- package/dist/core/runner/prepare-task.js +67 -56
- package/dist/core/runner/prepare-wiring-manifest.d.ts +11 -10
- package/dist/core/runner/prepare-wiring-manifest.js +5 -8
- package/dist/core/runner/resume-apply.js +7 -14
- package/dist/core/runner/resume-checkpoint-screen.js +11 -4
- package/dist/core/runner/resume-internals-and-config.js +2 -2
- package/dist/core/runner/resume-policy-outcome.js +5 -32
- package/dist/core/runner/resume-review-outcome.js +4 -1
- package/dist/core/runner/retired-runner-deps.d.ts +6 -0
- package/dist/core/runner/retired-runner-deps.js +10 -1
- package/dist/core/runner/run-brain-sinks.d.ts +4 -0
- package/dist/core/runner/run-brain-sinks.js +5 -2
- package/dist/core/runner/run-harness-handlers.js +27 -34
- package/dist/core/runner/run-leg.d.ts +0 -2
- package/dist/core/runner/run-leg.js +32 -33
- package/dist/core/runner/run-terminal-adoption.js +4 -3
- package/dist/core/runner/runtask.js +8 -8
- package/dist/core/runner/session-rule-policy.js +5 -5
- package/dist/core/runner/stream-settle-backstop.js +7 -4
- package/dist/core/runner/sub-agent-deny-lists.d.ts +51 -12
- package/dist/core/runner/sub-agent-deny-lists.js +111 -80
- package/dist/core/runner/terminal-account.d.ts +48 -0
- package/dist/core/runner/terminal-account.js +186 -0
- package/dist/core/runner/tool-end-body.d.ts +54 -17
- package/dist/core/runner/tool-end-body.js +27 -2
- package/dist/core/runner/tool-face-overlay.d.ts +3 -1
- package/dist/core/runner/tool-face-overlay.js +6 -4
- package/dist/core/runner/tool-occurrence.d.ts +106 -0
- package/dist/core/runner/tool-occurrence.js +123 -0
- package/dist/core/runner/tool-progress-lane.d.ts +16 -8
- package/dist/core/runner/tool-progress-lane.js +25 -34
- package/dist/core/runner/turn-attachments.d.ts +1 -1
- package/dist/core/runner/write-protection-station.d.ts +21 -9
- package/dist/core/runner/write-protection-station.js +20 -17
- package/dist/core/runner-deps.d.ts +12 -22
- package/dist/core/secret-env.d.ts +16 -5
- package/dist/core/secret-env.js +23 -63
- package/dist/core/sensitive-path-policy.d.ts +19 -18
- package/dist/core/sensitive-path-policy.js +73 -49
- package/dist/core/session-reconcile.d.ts +3 -0
- package/dist/core/session-reconcile.js +5 -4
- package/dist/core/session-store.d.ts +5 -0
- package/dist/core/session-store.js +12 -0
- package/dist/core/session.d.ts +13 -0
- package/dist/core/shared-memory/normalize.d.ts +17 -4
- package/dist/core/shared-memory/normalize.js +7 -7
- package/dist/core/shell-lexer.js +5 -4
- package/dist/core/skill-grant.js +1 -1
- package/dist/core/store-contracts/checkpoint-store-contract.js +13 -0
- package/dist/core/store-contracts/mailbox-store-contract.d.ts +7 -14
- package/dist/core/store-contracts/session-store-incarnation-contract.d.ts +27 -0
- package/dist/core/store-contracts/session-store-incarnation-contract.js +92 -0
- package/dist/core/stub-env.d.ts +2 -0
- package/dist/core/stub-env.js +1 -0
- package/dist/core/synthetic-read-verdict.js +2 -2
- package/dist/core/task-event.d.ts +59 -5
- package/dist/core/task-result.d.ts +1 -1
- package/dist/core/task-spec.d.ts +42 -9
- package/dist/core/terminal-cause.d.ts +94 -11
- package/dist/core/tighten-task-spec.d.ts +5 -4
- package/dist/core/tighten-task-spec.js +20 -25
- package/dist/core/tool-catalog-entries.d.ts +5 -7
- package/dist/core/tool-catalog-entries.js +14 -15
- package/dist/core/tool-face.d.ts +47 -0
- package/dist/core/tool-face.js +5 -0
- package/dist/core/tool-model-gate.d.ts +5 -5
- package/dist/core/tool-name-aliases.d.ts +26 -2
- package/dist/core/tool-name-aliases.js +13 -0
- package/dist/core/tool-name-list.d.ts +30 -0
- package/dist/core/tool-name-list.js +55 -0
- package/dist/core/tool-name-readings.d.ts +1 -9
- package/dist/core/tool-name-readings.js +1 -3
- package/dist/core/tool-policy.d.ts +195 -85
- package/dist/core/tool-policy.js +165 -380
- package/dist/core/tool-registry.d.ts +44 -1
- package/dist/core/tool-registry.js +26 -0
- package/dist/core/tool-roster.d.ts +19 -1
- package/dist/core/tool-roster.js +21 -2
- package/dist/core/tool-spec-members.d.ts +45 -0
- package/dist/core/tool-spec-members.js +169 -0
- package/dist/core/tool-spec.d.ts +46 -8
- package/dist/core/tools.d.ts +6 -2
- package/dist/core/tools.js +8 -4
- package/dist/core/untrusted-egress.js +29 -26
- package/dist/core/untrusted-text.d.ts +13 -10
- package/dist/core/untrusted-text.js +6 -44
- package/dist/core/workflow-journal-store.d.ts +4 -1
- package/dist/core/write-protect.d.ts +65 -29
- package/dist/core/write-protect.js +235 -177
- package/dist/engine/compaction/compaction.d.ts +2 -2
- package/dist/engine/execution-env/node-execution-env.d.ts +5 -23
- package/dist/engine/execution-env/node-execution-env.js +16 -38
- package/dist/engine/execution-env/symlink-chain.d.ts +23 -0
- package/dist/engine/execution-env/symlink-chain.js +32 -0
- package/dist/engine/harness/types.d.ts +7 -0
- package/dist/engine/llm/tool-turns.d.ts +3 -0
- package/dist/engine/llm/tool-turns.js +1 -0
- package/dist/engine/llm/types.d.ts +59 -23
- package/dist/engine/loop/agent-loop.js +16 -2
- package/dist/engine/session/memory-repo.js +11 -3
- package/dist/engine/session/repo-utils.d.ts +8 -0
- package/dist/engine/session/repo-utils.js +13 -0
- package/dist/index.d.ts +20 -23
- package/dist/index.js +17 -20
- package/dist/internal/harness.d.ts +1 -1
- package/dist/internal/harness.js +1 -1
- package/dist/internal/llm.d.ts +2 -2
- package/dist/internal/llm.js +1 -1
- package/dist/orchestration/governance-baseline-validity.js +1 -1
- package/dist/orchestration/run-spec.js +3 -3
- package/dist/orchestration/run-workflow-tool.d.ts +16 -35
- package/dist/orchestration/run-workflow-tool.js +38 -78
- package/dist/orchestration/workflow-governance.d.ts +21 -25
- package/dist/orchestration/workflow-governance.js +38 -78
- package/dist/orchestration/workflow-primitives.d.ts +7 -22
- package/dist/orchestration/workflow-primitives.js +5 -12
- package/dist/orchestration/workflow-types.d.ts +1 -1
- package/dist/orchestration/workflow.d.ts +61 -11
- package/dist/orchestration/workflow.js +189 -117
- package/dist/scenarios/full-body.d.ts +1 -1
- package/dist/shell/lex.d.ts +0 -21
- package/dist/shell/lex.js +250 -68
- package/dist/shell/shell-words.d.ts +35 -0
- package/dist/shell/shell-words.js +65 -0
- package/dist/stores/file/checkpoint-store.d.ts +5 -5
- package/dist/stores/file/checkpoint-store.js +5 -2
- package/dist/stores/file/index.d.ts +0 -8
- package/dist/stores/file/index.js +0 -12
- package/dist/stores/file/session-store.d.ts +3 -0
- package/dist/stores/file/session-store.js +44 -19
- package/dist/tools/artifact/artifact-tool.js +2 -0
- package/dist/tools/fs/bash-program-position.d.ts +10 -3
- package/dist/tools/fs/bash-program-position.js +21 -9
- package/dist/tools/fs/bash-readonly-classifier.d.ts +1 -1
- package/dist/tools/fs/bash-readonly-classifier.js +8 -7
- package/dist/tools/fs/containment-face.d.ts +4 -0
- package/dist/tools/fs/containment-face.js +3 -0
- package/dist/tools/fs/fs-shared.d.ts +10 -0
- package/dist/tools/fs/fs-shared.js +18 -0
- package/dist/tools/fs/fs-write.js +4 -2
- package/dist/tools/fs/index.d.ts +1 -1
- package/dist/tools/fs/program-read-model.d.ts +39 -18
- package/dist/tools/fs/program-read-model.js +29 -19
- package/dist/tools/fs/program-read-model.rows.d.ts +0 -14
- package/dist/tools/fs/program-read-model.rows.js +5 -5
- package/dist/tools/fs/read-deny-home.d.ts +33 -47
- package/dist/tools/fs/read-deny-home.js +35 -49
- package/dist/tools/fs/read-deny.d.ts +23 -22
- package/dist/tools/fs/read-deny.js +114 -89
- package/dist/tools/fs/removal-targets.d.ts +56 -23
- package/dist/tools/fs/removal-targets.js +65 -87
- package/dist/tools/fs/safety.d.ts +29 -22
- package/dist/tools/fs/safety.js +17 -11
- package/dist/tools/fs/search.js +10 -8
- package/dist/tools/fs/shell-read-argv.js +1 -1
- package/dist/tools/fs/shell-read-bindings.d.ts +169 -37
- package/dist/tools/fs/shell-read-bindings.js +324 -86
- package/dist/tools/fs/shell-read-builtins.d.ts +35 -0
- package/dist/tools/fs/shell-read-builtins.js +43 -0
- package/dist/tools/fs/shell-read-check.d.ts +15 -1
- package/dist/tools/fs/shell-read-check.js +51 -42
- package/dist/tools/fs/shell-read-establish.js +6 -6
- package/dist/tools/fs/shell-read-functions.d.ts +22 -0
- package/dist/tools/fs/shell-read-functions.js +29 -0
- package/dist/tools/fs/shell-read-judge.d.ts +48 -18
- package/dist/tools/fs/shell-read-judge.js +33 -4
- package/dist/tools/fs/shell-read-plan.d.ts +12 -6
- package/dist/tools/fs/shell-read-plan.js +118 -113
- package/dist/tools/fs/shell-read-start.d.ts +29 -6
- package/dist/tools/fs/shell-read-start.js +16 -9
- package/dist/tools/fs/shell-read-word.js +4 -0
- package/dist/tools/fs/shell-read-workdir.d.ts +156 -0
- package/dist/tools/fs/shell-read-workdir.js +281 -0
- package/dist/tools/fs/shell-read-write-targets.d.ts +5 -2
- package/dist/tools/fs/shell-read-write-targets.js +14 -5
- package/dist/tools/fs/shell-reentry-text.d.ts +4 -6
- package/dist/tools/fs/shell-reentry-text.js +3 -11
- package/dist/tools/task-list.d.ts +1 -2
- package/dist/tools/web.js +1 -1
- package/package.json +4 -1
- package/test/export-surface.snapshot.json +107 -143
- package/wire-changes/core@7.49.0.json +4765 -0
- package/dist/agents/teacher.d.ts +0 -159
- package/dist/agents/teacher.js +0 -577
- package/dist/agents/team.d.ts +0 -226
- package/dist/agents/team.js +0 -257
- package/dist/core/strategy-store.d.ts +0 -238
- package/dist/core/strategy-store.js +0 -253
- package/dist/orchestration/builtin-workflows.d.ts +0 -133
- package/dist/orchestration/builtin-workflows.js +0 -159
- package/dist/scenarios/env.d.ts +0 -40
- package/dist/scenarios/env.js +0 -39
- package/dist/scenarios/scenario-registry.d.ts +0 -110
- package/dist/scenarios/scenario-registry.js +0 -140
- package/dist/scenarios/teacher-quickstart.d.ts +0 -40
- package/dist/scenarios/teacher-quickstart.js +0 -12
- package/dist/stores/cc/lockfile.d.ts +0 -10
- package/dist/stores/cc/lockfile.js +0 -98
- package/dist/stores/cc/mailbox-store.d.ts +0 -20
- package/dist/stores/cc/mailbox-store.js +0 -255
- package/dist/stores/cc/roster-adapter.d.ts +0 -12
- package/dist/stores/cc/roster-adapter.js +0 -117
- package/dist/stores/cc/sidecar-transcript.d.ts +0 -97
- package/dist/stores/cc/sidecar-transcript.js +0 -264
- package/dist/stores/cc/task-list-store.d.ts +0 -2
- package/dist/stores/cc/task-list-store.js +0 -125
- package/dist/stores/file/strategy-store.d.ts +0 -97
- package/dist/stores/file/strategy-store.js +0 -341
|
@@ -34,6 +34,11 @@ import type { ContainmentFace } from "../tools/fs/containment-face.js";
|
|
|
34
34
|
*
|
|
35
35
|
* - `content_question` — the reserved question tool: a content-ROUTING signal, not a permission
|
|
36
36
|
* question; it leaves the gate through the content channel, never through a permission decider.
|
|
37
|
+
* - `plan_review` — a durable PLAN pause: the model's own request (the first-party plan tool) stopped the run for a human
|
|
38
|
+
* verdict on a PLAN. Same family as `content_question` — a content-routing ask, never a permission question, so no
|
|
39
|
+
* permission decider, classifier or mode answers it and it never reaches an approver as an `AskRequest`. The word is stamped
|
|
40
|
+
* by the plan pause's decide lane alone (derived from the row's kind, nothing persisted), so the decided row's record names
|
|
41
|
+
* the ask it settled like every other settlement does.
|
|
37
42
|
* - `ancestor_marked` — the call is MARKED by an ancestor (an inherited approver-unavailable float, or
|
|
38
43
|
* a durable mandate floated down because this task can park it): it must reach the park with no
|
|
39
44
|
* synchronous decision-maker in between. The word names WHO raised it (an ancestor's mark), like every
|
|
@@ -70,7 +75,7 @@ import type { ContainmentFace } from "../tools/fs/containment-face.js";
|
|
|
70
75
|
* observer or an approval card can say WHICH engine layer raised the question, which one word
|
|
71
76
|
* could not.
|
|
72
77
|
*/
|
|
73
|
-
export declare const ASK_ORIGINS: readonly ["content_question", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"];
|
|
78
|
+
export declare const ASK_ORIGINS: readonly ["content_question", "plan_review", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"];
|
|
74
79
|
export type AskOrigin = (typeof ASK_ORIGINS)[number];
|
|
75
80
|
/** Whether a value is a member of the closed origin set. Exported because the word crosses process
|
|
76
81
|
* boundaries: a host validating one it received must not hand-roll the set. */
|
|
@@ -263,6 +268,7 @@ export declare function ownedClearanceFacts(d: Extract<PermissionResult, {
|
|
|
263
268
|
*/
|
|
264
269
|
export declare const ORIGIN_IMPLIES_REAL_APPROVAL: {
|
|
265
270
|
readonly content_question: false;
|
|
271
|
+
readonly plan_review: false;
|
|
266
272
|
readonly ancestor_marked: false;
|
|
267
273
|
readonly org_unavailable: "at_derivation";
|
|
268
274
|
readonly org_rule: "at_derivation";
|
|
@@ -288,10 +294,10 @@ export type RealApprovalTableCoversEveryOrigin = AssertAllKeysHandled<Exclude<As
|
|
|
288
294
|
* - `probe_unanswered` — the probe was consulted and did not answer: the boundary is UNKNOWN.
|
|
289
295
|
* - `write_protection` — the table covers this write's target. A write onto load-executed configuration
|
|
290
296
|
* re-authorizes the agent, so the question is a property of the TARGET, not of anyone's hesitation.
|
|
291
|
-
* - `
|
|
292
|
-
* doctrine one layer over.
|
|
297
|
+
* - `target_unresolved` — the reading of a written target could not say where it leads on disk:
|
|
298
|
+
* `probe_unanswered`'s doctrine one layer over.
|
|
293
299
|
*/
|
|
294
|
-
export declare const PERSISTED_RULE_MANDATES: readonly ["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "
|
|
300
|
+
export declare const PERSISTED_RULE_MANDATES: readonly ["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "target_unresolved"];
|
|
295
301
|
export type PersistedRuleMandate = (typeof PERSISTED_RULE_MANDATES)[number];
|
|
296
302
|
/** Membership test for {@link PersistedRuleMandate} — the screen a row reader applies to a stored word. */
|
|
297
303
|
export declare function isPersistedRuleMandate(v: unknown): v is PersistedRuleMandate;
|
|
@@ -303,7 +309,7 @@ declare const MANDATE_DISCLOSURE: {
|
|
|
303
309
|
readonly operator_always: "this deployment mandates per-call confirmation for shell commands (shellGate: always)";
|
|
304
310
|
readonly tool_marks: "this tool carries egress/irreversibility/interaction marks (a mandated confirmation a rule cannot clear)";
|
|
305
311
|
readonly write_protection: "this write's target is on the deployment's write-protection table (the agent's own configuration is guarded one look per write) — it is cleared by confirming this call, never by a standing allow rule";
|
|
306
|
-
readonly
|
|
312
|
+
readonly target_unresolved: "where this write leads on disk could not be determined (a link on the way could not be examined, or the environment could not resolve the target), so whether it lands on a guarded path is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can";
|
|
307
313
|
};
|
|
308
314
|
/** The fence over the disclosure table: `never` while every word has a row. */
|
|
309
315
|
export type DisclosureTableCoversEveryMandate = AssertAllKeysHandled<Exclude<PersistedRuleMandate, keyof typeof MANDATE_DISCLOSURE>>;
|
|
@@ -330,10 +336,11 @@ export declare function mandateDisclosureOf(mandate: PersistedRuleMandate | unde
|
|
|
330
336
|
* above is deliberately the ONLY thing that carves a mandate out of it;
|
|
331
337
|
* · a tool's OWN `"always"`/`"maybe"` irreversibility tier without the doctrine (`"tool_marks"`).
|
|
332
338
|
*
|
|
333
|
-
* The
|
|
334
|
-
*
|
|
335
|
-
* property of the tool. Judged HERE, not
|
|
336
|
-
* shares: such a write is not an irreversible action, and
|
|
339
|
+
* The unresolved written target sits ABOVE the probe words (the read station mints both on one call, and this one names
|
|
340
|
+
* why its finding stands); the matched write-protection row sits BELOW them and ABOVE the seat marks, on the ladder's rule:
|
|
341
|
+
* a word no lane may answer outranks the rest, and a fact about THIS call outranks a property of the tool. Judged HERE, not
|
|
342
|
+
* in {@link irreversibilityMandateOf} which {@link safetyAxisOf} shares: such a write is not an irreversible action, and
|
|
343
|
+
* its park stays budgetable.
|
|
337
344
|
*
|
|
338
345
|
* Two consumers, one derivation: the gate's silencing arm (a matching rule is disclosed as shadowed
|
|
339
346
|
* instead of clearing the ask) and the runner's suggestion factory (a mandated ask offers no
|
|
@@ -361,9 +368,10 @@ export interface MandateMarks {
|
|
|
361
368
|
* for a shell command's written targets). A GATE fact like the org words: it rides the pass, not the decision, so no
|
|
362
369
|
* layer outside the engine declares it. */
|
|
363
370
|
writeProtected?: boolean;
|
|
364
|
-
/** The
|
|
365
|
-
*
|
|
366
|
-
|
|
371
|
+
/** The gate's record that the READING of a written target could not say where it leads on disk (`GatePass.targetUnresolved`:
|
|
372
|
+
* a target a shell command's program writes, placed, whose destination the read station could not resolve) — a fact of
|
|
373
|
+
* the reading, never a judge's verdict. The write face's twin of `probeUnanswered`. */
|
|
374
|
+
targetUnresolved?: boolean;
|
|
367
375
|
/** The pass's own record that the probe was consulted and did not answer (`GatePass.probeUnanswered`):
|
|
368
376
|
* the boundary is unknown, which no standing yes may stand in for. The runner's suggestion factory does
|
|
369
377
|
* not see the pass and never passes it — a card may offer a rule the lane then discloses as shadowed
|
|
@@ -452,9 +460,13 @@ export type ToolMarkSource = "deployment" | "mcp_annotation" | "a2a_default";
|
|
|
452
460
|
* `dangerous_delete` is a removal whose target is a protected location (`dangerousRemovalOf`: the filesystem root, a
|
|
453
461
|
* top-level directory, a home directory, or a workspace directory — the task root, the working directory, an additional
|
|
454
462
|
* working directory — or an ancestor of one): the reference implementation's dangerous-removal breaker, which no mode,
|
|
455
|
-
* allow rule or classifier answers. `unverifiable_delete` is its sibling for a target the command text cannot resolve
|
|
463
|
+
* allow rule or classifier answers. `unverifiable_delete` is its sibling for a target the command text cannot resolve;
|
|
464
|
+
* `unverifiable_shell_text` is a shell handed text the command does not spell (a program's output, a substitution, a
|
|
465
|
+
* file's content, an argv a stream fills in): the engine cannot read what that shell will execute. Its row is
|
|
466
|
+
* `unverifiable_delete`'s save the classifier column — such a shell was `dangerous_delete` before it had a word of its own,
|
|
467
|
+
* and the classifier did not answer that.
|
|
456
468
|
*/
|
|
457
|
-
export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "unverifiable_delete", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "ask_rule", "denial_limit_fallback", "classifier_no_ruling", "requires_user_interaction", "operator_forced", "shell_floor", "
|
|
469
|
+
export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "unverifiable_delete", "unverifiable_shell_text", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "ask_rule", "denial_limit_fallback", "classifier_no_ruling", "requires_user_interaction", "operator_forced", "shell_floor", "target_unresolved", "probe", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "policy_rra", "artifact_shared_read", "mode", "unstated", "ordinary"];
|
|
458
470
|
export type AskClass = (typeof ASK_CLASSES)[number];
|
|
459
471
|
/** Membership test for {@link AskClass} — the word crosses the wire on `tool_end.gate.disposition`. */
|
|
460
472
|
export declare function isAskClass(v: unknown): v is AskClass;
|
|
@@ -488,7 +500,7 @@ export interface ModeArbitrationRow {
|
|
|
488
500
|
* tool's effect lands at a remote peer, outside any containment the leg declares). `hookAskFloor` marks the classes the reference's rule / safety check answers
|
|
489
501
|
* `ask` for — an ask rule, a question the tool needs a person for, a dangerous removal, a protected or unresolvable write
|
|
490
502
|
* target, the session transcript, another's shared artifact.
|
|
491
|
-
* A row is a class's reading on every face but the ones {@link RELEASED_ON_SHELL_FACE} names: `
|
|
503
|
+
* A row is a class's reading on every face but the ones {@link RELEASED_ON_SHELL_FACE} names: `target_unresolved`'s
|
|
492
504
|
* `bypassImmune` is the file face's (and every other face's) reading, and the shell face reads it released — folded where the
|
|
493
505
|
* ask's row is ({@link foldArbitrationRow}), listed per face by {@link releasableAskClassesFor}.
|
|
494
506
|
*/
|
|
@@ -528,6 +540,13 @@ export declare const MODE_ARBITRATION: {
|
|
|
528
540
|
readonly ruleMayClear: false;
|
|
529
541
|
readonly hookAskFloor: true;
|
|
530
542
|
};
|
|
543
|
+
readonly unverifiable_shell_text: {
|
|
544
|
+
readonly bypassImmune: true;
|
|
545
|
+
readonly classifierEligible: false;
|
|
546
|
+
readonly sandboxAdmission: false;
|
|
547
|
+
readonly ruleMayClear: false;
|
|
548
|
+
readonly hookAskFloor: true;
|
|
549
|
+
};
|
|
531
550
|
readonly transcript_write: {
|
|
532
551
|
readonly bypassImmune: false;
|
|
533
552
|
readonly classifierEligible: true;
|
|
@@ -598,7 +617,7 @@ export declare const MODE_ARBITRATION: {
|
|
|
598
617
|
readonly ruleMayClear: false;
|
|
599
618
|
readonly hookAskFloor: false;
|
|
600
619
|
};
|
|
601
|
-
readonly
|
|
620
|
+
readonly target_unresolved: {
|
|
602
621
|
readonly bypassImmune: true;
|
|
603
622
|
readonly classifierEligible: false;
|
|
604
623
|
readonly sandboxAdmission: true;
|
|
@@ -695,13 +714,13 @@ export declare function releasableAskClassesFor(face: AskFace): readonly AskClas
|
|
|
695
714
|
/**
|
|
696
715
|
* The closed set of `reason` words a mode release carries (`GateDisposition.released.reason`, the `released` arm of
|
|
697
716
|
* {@link Arbitration}): each is a releasable class the release record names on its own — `rule_unreadable`, a release
|
|
698
|
-
* over a person's rule the call could not be read against; `
|
|
699
|
-
* {@link RELEASED_ON_SHELL_FACE}) over a write target
|
|
717
|
+
* over a person's rule the call could not be read against; `target_unresolved`, a release (the shell face only,
|
|
718
|
+
* {@link RELEASED_ON_SHELL_FACE}) over a write target whose reading could not say where it leads. A release carries the first member (array order) its class
|
|
700
719
|
* set holds, and none when it holds no member. {@link arbitrateByMode} and {@link isModeReleaseReason} read one copy
|
|
701
720
|
* of this list taken at load (a caller that writes into the exported array changes neither), so a new reason is one
|
|
702
721
|
* word here.
|
|
703
722
|
*/
|
|
704
|
-
export declare const MODE_RELEASE_REASONS: readonly ["rule_unreadable", "
|
|
723
|
+
export declare const MODE_RELEASE_REASONS: readonly ["rule_unreadable", "target_unresolved"];
|
|
705
724
|
export type ModeReleaseReason = (typeof MODE_RELEASE_REASONS)[number];
|
|
706
725
|
/** Membership test for {@link ModeReleaseReason} — the word crosses the wire on `tool_end.gate.disposition.released.reason`. */
|
|
707
726
|
export declare function isModeReleaseReason(v: unknown): v is ModeReleaseReason;
|
|
@@ -834,11 +853,10 @@ export type Arbitration = {
|
|
|
834
853
|
* The ONE mode read point. `dontAsk` refuses every ask — one value for every class — but a hook's that no member of the
|
|
835
854
|
* set floors (`hookAskFloor`: a hook's ask beside a rule's or a safety check's ask is refused, as the reference's full
|
|
836
855
|
* pipeline refuses it; a hook's ask alone is the reference's forced decision, which never reaches that conversion);
|
|
837
|
-
* `bypassPermissions` refuses a write whose
|
|
838
|
-
* face: a person cannot be asked
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
* than a refusal (`writeProtectionTightenDecision` reads the face), so on neither face is the release looser than an allow;
|
|
856
|
+
* `bypassPermissions` refuses a write whose target's reading could not say where it leads where that class stays immune
|
|
857
|
+
* (every face but the shell's: a person cannot be asked — the folded row says it, {@link foldArbitrationRow}), keeps every
|
|
858
|
+
* immune class and releases the rest: the shell face releases that class ({@link RELEASED_ON_SHELL_FACE}), the reference
|
|
859
|
+
* implementation's answer for a command whose written target could not be resolved;
|
|
842
860
|
* `acceptEdits` answers an ORDINARY ask itself on a call the caller vouches is one of the mode's file commands
|
|
843
861
|
* (`call.fileCommand`, `accepted`); `plan`, `default` and `auto` hand every ask on (plan's own questions were raised by
|
|
844
862
|
* its write gate; the reference implementation refuses nothing at this point under plan — auto's classifier reads the
|
package/dist/core/ask-origin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isShellFaceToolName } from "./tool-registry.js";
|
|
2
|
-
export const ASK_ORIGINS = Object.freeze(["content_question", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"]);
|
|
2
|
+
export const ASK_ORIGINS = Object.freeze(["content_question", "plan_review", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"]);
|
|
3
3
|
const ASK_ORIGIN_SET = new Set(ASK_ORIGINS);
|
|
4
4
|
export function isAskOrigin(v) {
|
|
5
5
|
return ASK_ORIGIN_SET.has(v);
|
|
@@ -93,6 +93,7 @@ function originLadder(decision, facts) {
|
|
|
93
93
|
}
|
|
94
94
|
export const ORIGIN_IMPLIES_REAL_APPROVAL = {
|
|
95
95
|
content_question: false,
|
|
96
|
+
plan_review: false,
|
|
96
97
|
ancestor_marked: false,
|
|
97
98
|
org_unavailable: "at_derivation",
|
|
98
99
|
org_rule: "at_derivation",
|
|
@@ -104,7 +105,7 @@ export const ORIGIN_IMPLIES_REAL_APPROVAL = {
|
|
|
104
105
|
safety_tighten: false,
|
|
105
106
|
policy: false,
|
|
106
107
|
};
|
|
107
|
-
export const PERSISTED_RULE_MANDATES = Object.freeze(["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "
|
|
108
|
+
export const PERSISTED_RULE_MANDATES = Object.freeze(["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "target_unresolved"]);
|
|
108
109
|
const PERSISTED_RULE_MANDATE_SET = new Set(PERSISTED_RULE_MANDATES);
|
|
109
110
|
export function isPersistedRuleMandate(v) {
|
|
110
111
|
return PERSISTED_RULE_MANDATE_SET.has(v);
|
|
@@ -115,17 +116,17 @@ const MANDATE_DISCLOSURE = {
|
|
|
115
116
|
operator_always: "this deployment mandates per-call confirmation for shell commands (shellGate: always)",
|
|
116
117
|
tool_marks: "this tool carries egress/irreversibility/interaction marks (a mandated confirmation a rule cannot clear)",
|
|
117
118
|
write_protection: "this write's target is on the deployment's write-protection table (the agent's own configuration is guarded one look per write) — it is cleared by confirming this call, never by a standing allow rule",
|
|
118
|
-
|
|
119
|
+
target_unresolved: "where this write leads on disk could not be determined (a link on the way could not be examined, or the environment could not resolve the target), so whether it lands on a guarded path is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can",
|
|
119
120
|
};
|
|
120
121
|
export function mandateDisclosureOf(mandate) {
|
|
121
122
|
return mandate === undefined ? "an explicit ask rule matched this call (a person's or the deployment's ask-me-each-time outranks a standing allow rule)" : MANDATE_DISCLOSURE[mandate];
|
|
122
123
|
}
|
|
123
124
|
export function persistedRuleMandateOf(marks) {
|
|
125
|
+
if (marks.targetUnresolved === true)
|
|
126
|
+
return "target_unresolved";
|
|
124
127
|
const word = irreversibilityMandateOf(marks);
|
|
125
128
|
if (word === "probe_mandate" || word === "probe_unanswered")
|
|
126
129
|
return word;
|
|
127
|
-
if (marks.writeProtectionUnresolved === true)
|
|
128
|
-
return "write_protection_unresolved";
|
|
129
130
|
if (marks.writeProtected === true)
|
|
130
131
|
return "write_protection";
|
|
131
132
|
return marks.egress === true || marks.requiresUserInteraction === true ? "tool_marks" : word;
|
|
@@ -173,6 +174,7 @@ export const ASK_CLASSES = Object.freeze([
|
|
|
173
174
|
"ancestor",
|
|
174
175
|
"dangerous_delete",
|
|
175
176
|
"unverifiable_delete",
|
|
177
|
+
"unverifiable_shell_text",
|
|
176
178
|
"transcript_write",
|
|
177
179
|
"org_rule",
|
|
178
180
|
"governance_unavailable",
|
|
@@ -183,7 +185,7 @@ export const ASK_CLASSES = Object.freeze([
|
|
|
183
185
|
"requires_user_interaction",
|
|
184
186
|
"operator_forced",
|
|
185
187
|
"shell_floor",
|
|
186
|
-
"
|
|
188
|
+
"target_unresolved",
|
|
187
189
|
"probe",
|
|
188
190
|
"write_protection",
|
|
189
191
|
"tool_marks_mcp",
|
|
@@ -204,6 +206,7 @@ export const MODE_ARBITRATION = {
|
|
|
204
206
|
ancestor: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
205
207
|
dangerous_delete: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
206
208
|
unverifiable_delete: { bypassImmune: true, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
209
|
+
unverifiable_shell_text: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
207
210
|
transcript_write: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
208
211
|
org_rule: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
209
212
|
governance_unavailable: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
@@ -214,7 +217,7 @@ export const MODE_ARBITRATION = {
|
|
|
214
217
|
requires_user_interaction: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
|
|
215
218
|
operator_forced: { bypassImmune: true, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
|
|
216
219
|
shell_floor: { bypassImmune: true, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
|
|
217
|
-
|
|
220
|
+
target_unresolved: { bypassImmune: true, classifierEligible: false, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: true },
|
|
218
221
|
probe: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
|
|
219
222
|
write_protection: { bypassImmune: false, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: true },
|
|
220
223
|
tool_marks_mcp: { bypassImmune: false, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
|
|
@@ -229,12 +232,12 @@ export const ASK_FACES = Object.freeze(["shell", "other"]);
|
|
|
229
232
|
export function askFaceOf(toolName) {
|
|
230
233
|
return isShellFaceToolName(toolName) ? "shell" : "other";
|
|
231
234
|
}
|
|
232
|
-
const RELEASED_ON_SHELL_FACE = new Set(["
|
|
235
|
+
const RELEASED_ON_SHELL_FACE = new Set(["target_unresolved"]);
|
|
233
236
|
function bypassImmuneOn(c, face) {
|
|
234
237
|
return MODE_ARBITRATION[c].bypassImmune && !(face === "shell" && RELEASED_ON_SHELL_FACE.has(c));
|
|
235
238
|
}
|
|
236
239
|
const CLASSIFIER_WITHHELD_ON_ROOTS = new Set(["probe"]);
|
|
237
|
-
export const RRA_EXPLAINERS = new Set(["dangerous_delete", "unverifiable_delete", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "denial_limit_fallback", "classifier_no_ruling", "ancestor", "artifact_shared_read", "requires_user_interaction"]);
|
|
240
|
+
export const RRA_EXPLAINERS = new Set(["dangerous_delete", "unverifiable_delete", "unverifiable_shell_text", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "denial_limit_fallback", "classifier_no_ruling", "ancestor", "artifact_shared_read", "requires_user_interaction"]);
|
|
238
241
|
const RELEASABLE_BY_FACE = Object.freeze({
|
|
239
242
|
shell: Object.freeze(ASK_CLASSES.filter((c) => !bypassImmuneOn(c, "shell"))),
|
|
240
243
|
other: Object.freeze(ASK_CLASSES.filter((c) => !bypassImmuneOn(c, "other"))),
|
|
@@ -244,7 +247,7 @@ export function releasableAskClassesFor(face) {
|
|
|
244
247
|
throw new TypeError(`releasableAskClassesFor: "${String(face)}" is not an ask face (${ASK_FACES.join(", ")})`);
|
|
245
248
|
return RELEASABLE_BY_FACE[face];
|
|
246
249
|
}
|
|
247
|
-
export const MODE_RELEASE_REASONS = Object.freeze(["rule_unreadable", "
|
|
250
|
+
export const MODE_RELEASE_REASONS = Object.freeze(["rule_unreadable", "target_unresolved"]);
|
|
248
251
|
const MODE_RELEASE_REASON_SET = new Set(MODE_RELEASE_REASONS);
|
|
249
252
|
export function isModeReleaseReason(v) {
|
|
250
253
|
return MODE_RELEASE_REASON_SET.has(v);
|
|
@@ -267,6 +270,8 @@ export function decisionAskClassesOf(d) {
|
|
|
267
270
|
out.add("dangerous_delete");
|
|
268
271
|
if (d.guard === "unverifiable_delete")
|
|
269
272
|
out.add("unverifiable_delete");
|
|
273
|
+
if (d.guard === "unverifiable_shell_text")
|
|
274
|
+
out.add("unverifiable_shell_text");
|
|
270
275
|
if (d.guard === "transcript_write")
|
|
271
276
|
out.add("transcript_write");
|
|
272
277
|
if (d.guard === "artifact_shared_read")
|
|
@@ -340,8 +345,8 @@ export function classifyAsk(d, facts) {
|
|
|
340
345
|
}
|
|
341
346
|
if (marks.probeUnanswered === true)
|
|
342
347
|
classes.add("probe");
|
|
343
|
-
if (marks.
|
|
344
|
-
classes.add("
|
|
348
|
+
if (marks.targetUnresolved === true)
|
|
349
|
+
classes.add("target_unresolved");
|
|
345
350
|
if (marks.writeProtected === true)
|
|
346
351
|
classes.add("write_protection");
|
|
347
352
|
if (facts.tightened === "unstated")
|
|
@@ -396,7 +401,7 @@ export function arbitrateByMode(mode, c, disclosure, call) {
|
|
|
396
401
|
case "dontAsk":
|
|
397
402
|
return has("hook") && !c.row.hookAskFloor ? { kind: "ask" } : { kind: "denied_by_mode", mode, askClass: c.askClass, classes };
|
|
398
403
|
case "bypassPermissions":
|
|
399
|
-
if (has("
|
|
404
|
+
if (has("target_unresolved") && c.row.bypassImmune)
|
|
400
405
|
return { kind: "denied_by_mode", mode, askClass: c.askClass, classes };
|
|
401
406
|
if (c.row.bypassImmune)
|
|
402
407
|
return { kind: "ask" };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** The auto-mode classifier SYSTEM prompt shell (CC 2.1.207 `auto_mode_system_prompt`,
|
|
2
|
-
*
|
|
1
|
+
/** The auto-mode classifier SYSTEM prompt shell (CC 2.1.207 `auto_mode_system_prompt`, with consent-bar
|
|
2
|
+
* principle 7 at its CC 2.1.291 text — see the header note).
|
|
3
3
|
* Contains two assembly placeholders consumed by `buildAutoModePrompt`: `<permissions_template>`
|
|
4
4
|
* (replaced by the permissions document) and `<cross_session_messages_rule>` (replaced with "" —
|
|
5
5
|
* the 206/207 default). */
|