@sema-agent/core 7.54.1 → 7.55.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 +437 -0
- package/dist/agents/agent-transcript-tool.js +2 -1
- package/dist/agents/builtin-agents.d.ts +12 -14
- package/dist/agents/cc-peer-directory.d.ts +36 -0
- package/dist/agents/cc-peer-directory.js +138 -0
- package/dist/agents/cc-peer-wire.d.ts +105 -0
- package/dist/agents/cc-peer-wire.js +98 -0
- package/dist/agents/cc-uds-peer-channel.d.ts +40 -0
- package/dist/agents/cc-uds-peer-channel.js +457 -0
- package/dist/agents/cross-session-envelope.d.ts +4 -1
- package/dist/agents/cross-session-envelope.js +8 -1
- package/dist/agents/cross-session-judge.d.ts +2 -2
- package/dist/agents/list-agents-tool.js +2 -1
- package/dist/agents/observer.d.ts +4 -5
- package/dist/agents/observer.js +2 -1
- package/dist/agents/peer-admission.d.ts +6 -0
- package/dist/agents/peer-admission.js +4 -1
- package/dist/agents/peer-directory.d.ts +43 -9
- package/dist/agents/peer-directory.js +66 -23
- package/dist/agents/peer-notices.d.ts +1 -1
- package/dist/agents/peer-session-drain.d.ts +3 -1
- package/dist/agents/peer-session-drain.js +1 -0
- package/dist/agents/read-inbox-tool.js +2 -1
- package/dist/agents/retain-ledger.d.ts +1 -1
- package/dist/agents/roster-store.d.ts +1 -1
- package/dist/agents/send-message-tool.d.ts +10 -0
- package/dist/agents/send-message-tool.js +34 -5
- package/dist/agents/subagent.d.ts +34 -79
- package/dist/agents/subagent.js +45 -46
- package/dist/agents/tool-filter.d.ts +29 -46
- package/dist/agents/tool-filter.js +8 -31
- package/dist/agents/verify.d.ts +3 -3
- package/dist/brain/anthropic.js +14 -9
- package/dist/brain/errors.d.ts +15 -0
- package/dist/brain/errors.js +10 -0
- package/dist/brain/model-presets.d.ts +4 -4
- package/dist/brain/open-responses.js +15 -10
- package/dist/brain/openai.js +17 -12
- package/dist/brain/provider-dialect.d.ts +39 -3
- package/dist/brain/provider-dialect.js +28 -0
- package/dist/brain/reasoning.d.ts +1 -1
- package/dist/brain/request-params.d.ts +55 -5
- package/dist/brain/request-params.js +35 -3
- package/dist/brain/retry.d.ts +1 -1
- package/dist/brain/route-adjudicator.d.ts +15 -0
- package/dist/brain/route-adjudicator.js +15 -0
- package/dist/brain/stream-engine.js +6 -5
- package/dist/brain/stream-shared.d.ts +1 -1
- package/dist/core/advisor-verdict.d.ts +120 -0
- package/dist/core/advisor-verdict.js +92 -0
- package/dist/core/agent-definition.d.ts +7 -8
- package/dist/core/allow-entry.d.ts +49 -23
- package/dist/core/allow-entry.js +57 -32
- package/dist/core/allow-rule-shadow.d.ts +7 -0
- package/dist/core/approval-object.d.ts +2 -1
- package/dist/core/approval-object.js +6 -6
- package/dist/core/ask-origin.d.ts +63 -11
- package/dist/core/ask-origin.js +27 -5
- package/dist/core/ask-question.js +10 -4
- package/dist/core/auto-compaction.d.ts +11 -8
- package/dist/core/auto-compaction.js +4 -2
- package/dist/core/auto-mode-arming.d.ts +2 -2
- package/dist/core/auto-mode-defaults.d.ts +8 -8
- package/dist/core/auto-mode-prompt-assets.d.ts +3 -3
- package/dist/core/auto-mode-prompt.d.ts +1 -1
- package/dist/core/auto-mode.d.ts +17 -9
- package/dist/core/auto-mode.js +9 -6
- package/dist/core/background-agent-store.d.ts +3 -3
- package/dist/core/canonical-json.d.ts +1 -1
- package/dist/core/canonical-json.js +2 -2
- package/dist/core/checkpoint-requirements.d.ts +6 -3
- package/dist/core/checkpoint-requirements.js +4 -14
- package/dist/core/checkpoint-store.d.ts +80 -51
- package/dist/core/checkpoint-store.js +56 -74
- package/dist/core/child-clamp-seats.d.ts +6 -0
- package/dist/core/child-clamp-seats.js +3 -16
- package/dist/core/compliance.d.ts +2 -2
- package/dist/core/context-edit.d.ts +6 -7
- package/dist/core/cross-boundary-taint.d.ts +9 -3
- package/dist/core/cross-boundary-taint.js +5 -3
- package/dist/core/decision-receipt.js +2 -2
- package/dist/core/effective-path-target.d.ts +1 -1
- package/dist/core/engine-notice.d.ts +19 -5
- package/dist/core/exec-output-tail.d.ts +1 -1
- package/dist/core/file-history-retention.d.ts +1 -1
- package/dist/core/file-history-store.d.ts +59 -9
- package/dist/core/file-history-store.js +35 -17
- package/dist/core/gate-fold.js +3 -2
- package/dist/core/gate-lanes.js +12 -8
- package/dist/core/gate-outcome.d.ts +17 -4
- package/dist/core/gate-outcome.js +30 -0
- package/dist/core/governance-codes.d.ts +13 -3
- package/dist/core/governance-codes.js +10 -0
- package/dist/core/hands-band.d.ts +1 -1
- package/dist/core/hooks.d.ts +4 -4
- package/dist/core/host-target.d.ts +49 -0
- package/dist/core/host-target.js +59 -0
- package/dist/core/image-downsample.d.ts +1 -1
- package/dist/core/lsp-diagnostics.d.ts +4 -4
- package/dist/core/lsp.d.ts +3 -3
- package/dist/core/mailbox-store.d.ts +4 -0
- package/dist/core/mcp-connection-pool.d.ts +18 -2
- package/dist/core/mcp-connection-pool.js +53 -6
- package/dist/core/mcp-failure.d.ts +23 -4
- package/dist/core/mcp-failure.js +26 -11
- package/dist/core/mcp-listing-drift.d.ts +10 -0
- package/dist/core/mcp-listing-drift.js +6 -0
- package/dist/core/mcp-server-link.d.ts +173 -0
- package/dist/core/mcp-server-link.js +127 -0
- package/dist/core/mcp-server-spec.d.ts +4 -2
- package/dist/core/mcp-session-end.d.ts +26 -0
- package/dist/core/mcp-session-end.js +29 -0
- package/dist/core/mcp-startup-request.d.ts +17 -0
- package/dist/core/mcp-startup-request.js +17 -0
- package/dist/core/mcp.d.ts +13 -13
- package/dist/core/mcp.js +187 -162
- package/dist/core/media-byte-cap.d.ts +1 -1
- package/dist/core/memory-engine/engine.d.ts +9 -9
- package/dist/core/memory-engine/provenance-wording.d.ts +1 -1
- package/dist/core/memory-engine/tools.js +4 -1
- package/dist/core/mode-policy.d.ts +1 -1
- package/dist/core/namespaced-rule-name.d.ts +33 -7
- package/dist/core/namespaced-rule-name.js +39 -25
- package/dist/core/output-style.d.ts +1 -1
- package/dist/core/param-rule-reach.d.ts +15 -0
- package/dist/core/param-rule-reach.js +30 -0
- package/dist/core/parent-spec-seat.d.ts +8 -1
- package/dist/core/parent-spec-seat.js +4 -0
- package/dist/core/pause-registry.d.ts +16 -5
- package/dist/core/pause-registry.js +6 -2
- package/dist/core/peer-channel.d.ts +70 -0
- package/dist/core/peer-channel.js +1 -0
- package/dist/core/permission-rule-consent.d.ts +11 -5
- package/dist/core/permission-rule-consent.js +37 -30
- package/dist/core/permission-rule-model.d.ts +233 -64
- package/dist/core/permission-rule-model.js +384 -85
- package/dist/core/permission-rule-provider.d.ts +2 -1
- package/dist/core/permission-rule-store.d.ts +20 -25
- package/dist/core/permission-rule-store.js +1 -4
- package/dist/core/permission-rule-sync.d.ts +11 -2
- package/dist/core/permission-rule-sync.js +8 -1
- package/dist/core/permission-rules.d.ts +49 -11
- package/dist/core/permission-rules.js +123 -89
- package/dist/core/persisted-rule-arms.d.ts +4 -2
- package/dist/core/present-plan-tool.js +3 -1
- package/dist/core/protocol-naming.d.ts +2 -2
- package/dist/core/read-only-shell-table.d.ts +1 -1
- package/dist/core/read-only-shell.d.ts +1 -1
- package/dist/core/roles.d.ts +6 -2
- package/dist/core/roles.js +45 -44
- package/dist/core/rule-offer-read.d.ts +53 -0
- package/dist/core/rule-offer-read.js +146 -0
- package/dist/core/rule-owner.d.ts +46 -0
- package/dist/core/rule-owner.js +28 -0
- package/dist/core/runner/advisor-instructions.d.ts +70 -0
- package/dist/core/runner/advisor-instructions.js +61 -0
- package/dist/core/runner/advisor-tool.d.ts +33 -0
- package/dist/core/runner/advisor-tool.js +112 -0
- package/dist/core/runner/announce-once-ledger.d.ts +4 -26
- package/dist/core/runner/announce-once-ledger.js +14 -46
- package/dist/core/runner/approval-feedback.js +6 -3
- package/dist/core/runner/assemble-result.d.ts +1 -1
- package/dist/core/runner/caller-roster.d.ts +7 -0
- package/dist/core/runner/caller-roster.js +11 -0
- package/dist/core/runner/classifier-ladder.d.ts +27 -5
- package/dist/core/runner/classifier-ladder.js +12 -11
- package/dist/core/runner/compaction-restate.d.ts +10 -6
- package/dist/core/runner/compaction-restate.js +9 -3
- package/dist/core/runner/contracts.d.ts +13 -9
- package/dist/core/runner/conversation-segment.d.ts +28 -0
- package/dist/core/runner/conversation-segment.js +42 -0
- package/dist/core/runner/cross-boundary-lane.d.ts +6 -5
- package/dist/core/runner/cross-boundary-lane.js +26 -15
- package/dist/core/runner/decide-continuation.d.ts +7 -4
- package/dist/core/runner/decide-continuation.js +2 -2
- package/dist/core/runner/denial-limit-arms.d.ts +2 -2
- package/dist/core/runner/derived-route-fallback.d.ts +24 -24
- package/dist/core/runner/derived-route-fallback.js +9 -7
- package/dist/core/runner/gate-exit.d.ts +6 -0
- package/dist/core/runner/gate-exit.js +7 -2
- package/dist/core/runner/initial-run-state.js +1 -1
- package/dist/core/runner/permission-rule-lanes.d.ts +2 -2
- package/dist/core/runner/permission-rule-lanes.js +14 -7
- package/dist/core/runner/person-path-rows.js +1 -1
- package/dist/core/runner/prepare-advisor.d.ts +63 -0
- package/dist/core/runner/prepare-advisor.js +77 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +1 -1
- package/dist/core/runner/prepare-config-doors.d.ts +6 -4
- package/dist/core/runner/prepare-config-doors.js +18 -12
- package/dist/core/runner/prepare-delegation-surface.d.ts +2 -2
- package/dist/core/runner/prepare-delegation-surface.js +1 -1
- package/dist/core/runner/prepare-file-history.js +39 -39
- package/dist/core/runner/prepare-gate-stations.d.ts +1 -4
- package/dist/core/runner/prepare-gate-stations.js +2 -7
- package/dist/core/runner/prepare-inherited-gate.d.ts +5 -4
- package/dist/core/runner/prepare-inherited-gate.js +3 -3
- package/dist/core/runner/prepare-park-ask.js +7 -7
- package/dist/core/runner/prepare-policy-chain.d.ts +1 -1
- package/dist/core/runner/prepare-policy-chain.js +4 -10
- package/dist/core/runner/prepare-project-context.d.ts +5 -2
- package/dist/core/runner/prepare-project-context.js +6 -3
- package/dist/core/runner/prepare-prompt-inputs.js +1 -1
- package/dist/core/runner/prepare-protocol-tools.d.ts +2 -2
- package/dist/core/runner/prepare-protocol-tools.js +3 -2
- package/dist/core/runner/prepare-safety-scan.d.ts +9 -12
- package/dist/core/runner/prepare-safety-scan.js +8 -6
- package/dist/core/runner/prepare-task.js +15 -18
- package/dist/core/runner/prepare-tool-disclosure-mount.js +6 -4
- package/dist/core/runner/prepare-wiring-manifest.d.ts +6 -3
- package/dist/core/runner/prepare-wiring-manifest.js +2 -2
- package/dist/core/runner/resume-policy-outcome.js +1 -1
- package/dist/core/runner/retired-runner-deps.js +1 -1
- package/dist/core/runner/run-attachment-seats.js +0 -1
- package/dist/core/runner/run-compaction-machinery.d.ts +1 -1
- package/dist/core/runner/run-compaction-machinery.js +2 -12
- package/dist/core/runner/run-git-lane.d.ts +1 -0
- package/dist/core/runner/run-harness-handlers.js +2 -3
- package/dist/core/runner/run-leg.js +13 -0
- package/dist/core/runner/run-settle-and-teardown.js +1 -1
- package/dist/core/runner/run-telemetry-and-budget-seats.js +1 -1
- package/dist/core/runner/run-turn-boundary.d.ts +1 -0
- package/dist/core/runner/run-turn-boundary.js +14 -12
- package/dist/core/runner/session-rule-policy.d.ts +22 -21
- package/dist/core/runner/session-rule-policy.js +13 -28
- package/dist/core/runner/side-call-account.d.ts +32 -8
- package/dist/core/runner/side-call-account.js +23 -1
- package/dist/core/runner/strict-output-schema.d.ts +1 -1
- package/dist/core/runner/sub-agent-deny-lists.js +4 -3
- package/dist/core/runner/synthetic-tools.d.ts +10 -13
- package/dist/core/runner/synthetic-tools.js +4 -2
- package/dist/core/runner/tool-disclosure.js +2 -1
- package/dist/core/runner/tool-face-overlay.d.ts +2 -1
- package/dist/core/runner/tool-face-overlay.js +17 -1
- package/dist/core/runner/tool-progress-lane.d.ts +2 -2
- package/dist/core/runner/tool-turn-repair-seat.d.ts +3 -2
- package/dist/core/runner/turn-attachments.d.ts +60 -67
- package/dist/core/runner-deps.d.ts +37 -37
- package/dist/core/runtime-caps.d.ts +4 -4
- package/dist/core/safety-merge-corpus.js +17 -1
- package/dist/core/same-plain-value.d.ts +40 -0
- package/dist/core/same-plain-value.js +49 -0
- package/dist/core/scheduler.d.ts +1 -1
- package/dist/core/sensitive-path-policy.d.ts +1 -1
- package/dist/core/sensitive-path-policy.js +1 -1
- package/dist/core/session-policy-store.d.ts +77 -22
- package/dist/core/session-policy-store.js +56 -14
- package/dist/core/session-reconcile.d.ts +2 -2
- package/dist/core/session-store.d.ts +80 -30
- package/dist/core/session-store.js +118 -76
- package/dist/core/session.d.ts +24 -46
- package/dist/core/shared-memory/tools.js +3 -1
- package/dist/core/shared-memory/types.d.ts +1 -1
- package/dist/core/side-query.d.ts +10 -0
- package/dist/core/side-query.js +5 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +29 -2
- package/dist/core/store-contracts/file-history-store-contract.js +43 -3
- package/dist/core/store-contracts/session-policy-store-contract.d.ts +7 -0
- package/dist/core/store-contracts/session-policy-store-contract.js +130 -0
- package/dist/core/store-contracts/session-repo-contract.js +125 -0
- package/dist/core/store-contracts/session-store-contract.d.ts +4 -7
- package/dist/core/store-contracts/session-store-contract.js +215 -41
- package/dist/core/store-contracts/workflow-journal-store-contract.js +26 -1
- package/dist/core/surrogate-safe-slice.d.ts +3 -3
- package/dist/core/task-event.d.ts +10 -4
- package/dist/core/task-notification.d.ts +3 -3
- package/dist/core/task-registry-agent.d.ts +4 -4
- package/dist/core/task-registry-shared.d.ts +4 -4
- package/dist/core/task-registry-shared.js +1 -0
- package/dist/core/task-registry.d.ts +4 -4
- package/dist/core/task-registry.js +3 -1
- package/dist/core/task-result.d.ts +3 -3
- package/dist/core/task-spec.d.ts +52 -52
- package/dist/core/task-stream.d.ts +6 -6
- package/dist/core/task-tool-shape.d.ts +4 -4
- package/dist/core/tighten-task-spec.d.ts +1 -1
- package/dist/core/tool-catalog-entries.d.ts +19 -2
- package/dist/core/tool-catalog-entries.js +57 -42
- package/dist/core/tool-conformance.js +1 -0
- package/dist/core/tool-errors.d.ts +2 -2
- package/dist/core/tool-face-reader.js +5 -3
- package/dist/core/tool-face.d.ts +21 -2
- package/dist/core/tool-face.js +1 -1
- package/dist/core/tool-model-gate.d.ts +3 -3
- package/dist/core/tool-name-aliases.d.ts +29 -8
- package/dist/core/tool-name-aliases.js +27 -3
- package/dist/core/tool-name-readings.d.ts +5 -8
- package/dist/core/tool-name-readings.js +1 -2
- package/dist/core/tool-policy.d.ts +24 -5
- package/dist/core/tool-policy.js +34 -10
- package/dist/core/tool-registry.d.ts +14 -7
- package/dist/core/tool-registry.js +17 -7
- package/dist/core/tool-result-store.js +2 -1
- package/dist/core/tool-roster.d.ts +47 -18
- package/dist/core/tool-roster.js +53 -32
- package/dist/core/tool-spec-members.js +1 -1
- package/dist/core/tool-spec.d.ts +35 -21
- package/dist/core/tools.js +3 -2
- package/dist/core/trace.d.ts +4 -0
- package/dist/core/untrusted-egress.d.ts +1 -1
- package/dist/core/untrusted-text.d.ts +1 -1
- package/dist/core/warm-resume.d.ts +1 -1
- package/dist/core/wiring-manifest.d.ts +49 -0
- package/dist/core/wiring-manifest.js +13 -5
- package/dist/core/workflow-journal-store.d.ts +62 -0
- package/dist/core/workflow-journal-store.js +77 -1
- package/dist/core/workflow-run-store.d.ts +6 -0
- package/dist/core/workflow-run-store.js +2 -0
- package/dist/engine/compaction/compaction.d.ts +9 -9
- package/dist/engine/execution-env/node-execution-env.d.ts +19 -5
- package/dist/engine/execution-env/node-execution-env.js +43 -22
- package/dist/engine/harness/agent-harness.d.ts +14 -8
- package/dist/engine/harness/agent-harness.js +33 -26
- package/dist/engine/harness/types.d.ts +29 -7
- package/dist/engine/harness/types.js +12 -1
- package/dist/engine/llm/types.d.ts +9 -9
- package/dist/engine/llm/validation.d.ts +4 -1
- package/dist/engine/llm/validation.js +13 -1
- package/dist/engine/loop/agent-loop.d.ts +1 -1
- package/dist/engine/loop/agent-loop.js +10 -8
- package/dist/engine/loop/types.d.ts +15 -13
- package/dist/engine/lsp/node-lsp-manager.d.ts +2 -2
- package/dist/engine/session/memory-repo.d.ts +10 -11
- package/dist/engine/session/memory-repo.js +13 -8
- package/dist/engine/session/parent-chain-guard.d.ts +3 -2
- package/dist/engine/session/parent-chain-guard.js +1 -1
- package/dist/engine/session/repo-utils.d.ts +31 -3
- package/dist/engine/session/repo-utils.js +42 -5
- package/dist/index.d.ts +27 -15
- package/dist/index.js +21 -11
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/internal/harness.d.ts +3 -3
- package/dist/internal/harness.js +2 -2
- package/dist/internal/llm.d.ts +1 -1
- package/dist/internal/llm.js +1 -1
- package/dist/orchestration/goal.js +2 -2
- package/dist/orchestration/run-workflow-tool.d.ts +2 -2
- package/dist/orchestration/run-workflow-tool.js +5 -3
- package/dist/orchestration/workflow-size-guideline.d.ts +4 -4
- package/dist/orchestration/workflow-types.d.ts +18 -0
- package/dist/orchestration/workflow-types.js +6 -0
- package/dist/orchestration/workflow.d.ts +2 -13
- package/dist/orchestration/workflow.js +21 -31
- package/dist/prompt-assembly/event-registry.js +1 -0
- package/dist/prompt-assembly/tool-catalog.d.ts +3 -0
- package/dist/prompt-assembly/tool-catalog.js +3 -0
- package/dist/prompts/default.d.ts +14 -14
- package/dist/scenarios/full-body.d.ts +4 -4
- package/dist/stores/file/adoption/adopt.d.ts +4 -3
- package/dist/stores/file/adoption/adopt.js +24 -31
- package/dist/stores/file/adoption/marker.d.ts +6 -13
- package/dist/stores/file/adoption/marker.js +6 -15
- package/dist/stores/file/checkpoint-store.d.ts +3 -0
- package/dist/stores/file/checkpoint-store.js +9 -3
- package/dist/stores/file/file-history-store.d.ts +20 -19
- package/dist/stores/file/file-history-store.js +152 -135
- package/dist/stores/file/fs-atomic.d.ts +15 -0
- package/dist/stores/file/fs-atomic.js +89 -14
- package/dist/stores/file/index.d.ts +1 -1
- package/dist/stores/file/mailbox-store.d.ts +3 -0
- package/dist/stores/file/mailbox-store.js +3 -1
- package/dist/stores/file/permission-rule-adopt.d.ts +1 -1
- package/dist/stores/file/permission-rule-adopt.js +15 -16
- package/dist/stores/file/permission-rule-store.d.ts +18 -2
- package/dist/stores/file/permission-rule-store.js +21 -14
- package/dist/stores/file/session-policy-store.d.ts +3 -3
- package/dist/stores/file/session-store.d.ts +26 -11
- package/dist/stores/file/session-store.js +77 -40
- package/dist/stores/file/workflow-journal-store.d.ts +10 -4
- package/dist/stores/file/workflow-journal-store.js +28 -13
- package/dist/tools/artifact/artifact-text.d.ts +1 -1
- package/dist/tools/artifact/artifact-tool.js +2 -1
- package/dist/tools/fs/bash-readonly-classifier.d.ts +3 -3
- package/dist/tools/fs/fs-bash.d.ts +2 -2
- package/dist/tools/fs/fs-bash.js +3 -1
- package/dist/tools/fs/fs-shared.d.ts +8 -8
- package/dist/tools/fs/gh-rate-limit.d.ts +1 -1
- package/dist/tools/fs/notebook.d.ts +2 -2
- package/dist/tools/fs/read-deny.d.ts +29 -7
- package/dist/tools/fs/read-deny.js +63 -22
- package/dist/tools/fs/removal-targets.d.ts +1 -1
- package/dist/tools/fs/safety.d.ts +9 -9
- package/dist/tools/fs/search.d.ts +6 -6
- package/dist/tools/fs/shell-read-check.js +6 -1
- package/dist/tools/fs/shell-read-judge.d.ts +4 -0
- package/dist/tools/fs/shell-read-judge.js +5 -2
- package/dist/tools/loop-tick.d.ts +2 -2
- package/dist/tools/scheduler-tools.js +5 -1
- package/dist/tools/task-list.d.ts +7 -7
- package/dist/tools/task-list.js +5 -1
- package/dist/tools/todo.js +2 -1
- package/dist/tools/web.d.ts +1 -1
- package/dist/tools/web.js +40 -37
- package/dist/tools/worktree.d.ts +3 -3
- package/dist/tools/worktree.js +3 -1
- package/package.json +1 -1
- package/test/export-surface.snapshot.json +5756 -5638
- package/wire-changes/core@7.55.0.json +3318 -0
- package/dist/core/store-contracts/session-store-incarnation-contract.d.ts +0 -39
- package/dist/core/store-contracts/session-store-incarnation-contract.js +0 -95
|
@@ -863,7 +863,7 @@ export interface TaskResult {
|
|
|
863
863
|
*/
|
|
864
864
|
costBreakdown?: {
|
|
865
865
|
/** Root-agent LLM cost (micro-USD) = `costMicroUsd − compactionMicroUsd` (the sub-category folded into
|
|
866
|
-
* it). NOT minus nested — nested cost is never folded into `costMicroUsd` (it lands in `nested`).
|
|
866
|
+
* it): the advisor consultations the root agent made are in it. NOT minus nested — nested cost is never folded into `costMicroUsd` (it lands in `nested`).
|
|
867
867
|
* ⚠️ APPROXIMATE on a multi-slice `resource_limit` RESUME (design/80 D-E-core): the
|
|
868
868
|
* durable resource ledger persists only the AGGREGATE prior spend, not its compaction subtotal, so
|
|
869
869
|
* prior slices' compaction folds in HERE rather than into `compactionMicroUsd`. The TOTAL (`costMicroUsd`)
|
|
@@ -881,8 +881,8 @@ export interface TaskResult {
|
|
|
881
881
|
/** Within-task compaction LLM cost (micro-USD) — part of `costMicroUsd`, so subtracted from root.
|
|
882
882
|
* ⚠️ See {@link llmRootMicroUsd}: under-reports prior slices' compaction on a multi-slice resource resume. */
|
|
883
883
|
compactionMicroUsd: number;
|
|
884
|
-
/** The model calls made beside the main loop — the permission classifier's
|
|
885
|
-
* micro-USD. An **"of which" line**, not a partition member: this cost is part of `costMicroUsd` and stays INSIDE
|
|
884
|
+
/** The model calls made beside the main loop — the permission classifier's, mods' `$.model.complete` and the advisor
|
|
885
|
+
* tool's consultations — in micro-USD. An **"of which" line**, not a partition member: this cost is part of `costMicroUsd` and stays INSIDE
|
|
886
886
|
* {@link llmRootMicroUsd}, so `llmRootMicroUsd + compactionMicroUsd === costMicroUsd` keeps holding. Present once
|
|
887
887
|
* at least one such call was booked this leg (absent ⇒ none; a result with no such call is unchanged). A call
|
|
888
888
|
* whose reply carried no usage marks `stats.usageMissing` instead of adding here.
|
package/dist/core/task-spec.d.ts
CHANGED
|
@@ -121,8 +121,7 @@ export interface TaskSpec {
|
|
|
121
121
|
* long-lived child's per-request face is correct design, not a configuration lie, so those legs
|
|
122
122
|
* are exempt). The park lane is deliberately NOT required (interactive-without-park is a
|
|
123
123
|
* legitimate light deployment — a synchronous CLI/local UI). `"headless"` declares the opposite
|
|
124
|
-
* and checks nothing (a batch deployment carrying an onAsk for audit is legal). Absent = no
|
|
125
|
-
* check, bytes unchanged.
|
|
124
|
+
* and checks nothing (a batch deployment carrying an onAsk for audit is legal). Absent = no check, bytes unchanged.
|
|
126
125
|
*
|
|
127
126
|
* Seat resolution is THREE-leg: `spec.interactionPosture ?? <the spawning run's resolved posture>
|
|
128
127
|
* ?? deps.interactionPosture` — a Runner serving both an interactive session and cron/batch legs
|
|
@@ -271,8 +270,7 @@ export interface TaskSpec {
|
|
|
271
270
|
* when that turn began", so B(target) IS the before-state. A target with no boundary of its own (a
|
|
272
271
|
* steer / follow-up entry, a turn that recorded no history, a mixed-epoch session) refuses at prepare
|
|
273
272
|
* (`rewind_snapshot.unresolvable`) with the files untouched: an earlier boundary would also revert edits
|
|
274
|
-
* the conversation keeps, so the anchor never falls back to an ancestor and never crosses into an
|
|
275
|
-
* earlier turn.
|
|
273
|
+
* the conversation keeps, so the anchor never falls back to an ancestor and never crosses into an earlier turn.
|
|
276
274
|
* Fail-loud: setting this without {@link resumeAt}, or an unknown mode value, rejects at prepare.
|
|
277
275
|
*/
|
|
278
276
|
resumeAtMode?: "at" | "before";
|
|
@@ -294,6 +292,8 @@ export interface TaskSpec {
|
|
|
294
292
|
* self-compacts on its own main model, so the window-safety judgment is structurally never
|
|
295
293
|
* triggered in a subagent (guard-tested). */
|
|
296
294
|
compactionModel?: ModelRef;
|
|
295
|
+
/** The ADVISOR model (CC's `advisorModel` setting): any ref {@link model} takes. Present ⇒ prepare judges it against this leg's own model (`advisorAttachVerdict`) and, when it attaches, mounts the no-argument `advisor` tool; a value that is neither a string nor a Model refuses prepare (`config.advisor_model_invalid`) unless `RunnerDeps.advisorTool` is `"disabled"`, which ignores it unread. Rides the parent spec seat — unlike {@link compactionModel}, a child inherits it and judges it against its own model. */
|
|
296
|
+
advisorModel?: ModelRef;
|
|
297
297
|
/** Thinking level. If omitted, a default from the resolved role's `RoleSpec.thinking` applies. */
|
|
298
298
|
thinking?: ThinkingLevel;
|
|
299
299
|
/** This task's role text: it replaces the selected role base (`promptRole`). Text carrying a locked section verbatim
|
|
@@ -344,10 +344,9 @@ export interface TaskSpec {
|
|
|
344
344
|
/**
|
|
345
345
|
* Enable long-term memory for this task. **design/138 S4 (BREAKING): requires `RunnerDeps.memoryBackend`**
|
|
346
346
|
* (the injection-first memory engine — materialize → file ops → harvest). With a backend configured the
|
|
347
|
-
* task gets the
|
|
348
|
-
* ordinary file tools. WITHOUT a backend this field is INERT: the
|
|
349
|
-
*
|
|
350
|
-
* one deprecation warning is emitted via `onError` (phase `"config"`).
|
|
347
|
+
* task gets the `# Memory` instruction + fenced derived index and works memory through its
|
|
348
|
+
* ordinary file tools. WITHOUT a backend this field is INERT: the task runs memory-less and one warning is
|
|
349
|
+
* emitted via `onError` (phase `"config"`).
|
|
351
350
|
*
|
|
352
351
|
* **design/84 Seam A** — single opaque scope → an **ordered, opaque scope list + a single writeScope**.
|
|
353
352
|
* The engine only does read-side **layered injection** (one `<user_memory>` block, a `<scope …>` subsection
|
|
@@ -396,6 +395,14 @@ export interface TaskSpec {
|
|
|
396
395
|
* such a run, for that cycle); no word turns it back on below. Any other value refuses (`rewind.invalid_spec`).
|
|
397
396
|
*/
|
|
398
397
|
fileHistory?: "disabled";
|
|
398
|
+
/** The per-run OFF SWITCH for the deployment's project context (`"disabled"`, the only word; {@link fileHistory}'s spelling). Omitted ⇒ the
|
|
399
|
+
* deployment's `RunnerDeps.loadProjectMemory` is called as it always is. `"disabled"` ⇒ this leg's prepare does not call it: no project layer is
|
|
400
|
+
* injected, no instruction source is declared (the instruction-change lane never runs), none of the seam's files is seeded as already read,
|
|
401
|
+
* and the compaction lanes carry no instruction-file text. Not that seam, and unaffected: the engine's own git-status lane and the memory
|
|
402
|
+
* engine (its index seed included). The manifest reports `projectMemory: "disabled"` (`"absent"` where no seam is wired). Children inherit it
|
|
403
|
+
* (parent spec seat, a revived cycle included); no word turns it back on below. Any other value refuses prepare, and a resume's screen before its
|
|
404
|
+
* claim, `config.invalid_argument`. */
|
|
405
|
+
projectMemory?: "disabled";
|
|
399
406
|
/**
|
|
400
407
|
* design/381 (DV-9) — the RESTORE half of file rewind: when this task uses {@link resumeAt} to branch at
|
|
401
408
|
* a prior entry, ALSO converge the working tree's **agent-edited files** (the tracked set — files this
|
|
@@ -445,8 +452,7 @@ export interface TaskSpec {
|
|
|
445
452
|
* that should cover those edits is the root session's action; a restore request on such a child run
|
|
446
453
|
* is refused loud (`rewind.child_scope_unsupported`) rather than converging a scope that holds none
|
|
447
454
|
* of its edits. A delegated child that was handed NO lineage — a revival, a workflow/team member —
|
|
448
|
-
* keeps its own scope: its edits are outside this target's reach, and its own restore request is an
|
|
449
|
-
* ordinary one.
|
|
455
|
+
* keeps its own scope: its edits are outside this target's reach, and its own restore request is an ordinary one.
|
|
450
456
|
*/
|
|
451
457
|
rewindFilesTo?: string;
|
|
452
458
|
/**
|
|
@@ -478,8 +484,8 @@ export interface TaskSpec {
|
|
|
478
484
|
*
|
|
479
485
|
* Entries are read like {@link excludeTools}: a wire name or an alias it declares, `mcp__srv` / `mcp__srv__*` for every tool
|
|
480
486
|
* of a server (including tools it lists later), a glob over the tool segment. The engine resolves the list against its OWN
|
|
481
|
-
* roster at prepare — a host passes the names it was given. A spelling no tool name can have, `mcp__
|
|
482
|
-
* a string is REFUSED at prepare (`config.tool_face_control`); a name no tool answers to is kept and told once (`onError`, phase
|
|
487
|
+
* roster at prepare — a host passes the names it was given. A spelling no tool name can have, `mcp__*` / `mcp__*__*` (an allowed
|
|
488
|
+
* list names no peer by them), or an entry that is not a string is REFUSED at prepare (`config.tool_face_control`); a name no tool answers to is kept and told once (`onError`, phase
|
|
483
489
|
* `"config"`). The same compiled selector is applied on every later roster change (an MCP refresh or re-dial, the
|
|
484
490
|
* deferred-search lane). Deferral is reached through ToolSearch, so a list that leaves it out defers nothing.
|
|
485
491
|
*
|
|
@@ -493,8 +499,8 @@ export interface TaskSpec {
|
|
|
493
499
|
* mounted tool set AFTER assembly — their schemas never reach `tools[]` (unlike a policy deny, which gates calls but still
|
|
494
500
|
* ships the schema bytes every request — measured at zero token savings). The DENY half of the run's tool selector, read
|
|
495
501
|
* exactly as a sub-agent's denied tools are: a wire name or an alias it declares; `Tool(content)` names the whole `Tool`;
|
|
496
|
-
* `mcp__srv` / `mcp__srv__*` / a glob over the tool segment for a server's tools, `mcp__*` for every MCP tool
|
|
497
|
-
* a server lists later). A spelling no tool name can have, `"*"`, or an entry that is not a string is REFUSED at prepare; a name
|
|
502
|
+
* `mcp__srv` / `mcp__srv__*` / a glob over the tool segment for a server's tools, `mcp__*` / `mcp__*__*` for every MCP tool
|
|
503
|
+
* (including tools a server lists later). A spelling no tool name can have, `"*"`, or an entry that is not a string is REFUSED at prepare; a name
|
|
498
504
|
* no tool answers to is kept (it hides a tool of that name mounted later) and told once. A deny wins over {@link allowTools}.
|
|
499
505
|
* ⚠️ A list that reaches a tool this kind of leg relies on (see {@link allowTools}) is refused; excluding a host-requested
|
|
500
506
|
* structural tool (the structured-output tool) can still strand the task — the caller owns that risk.
|
|
@@ -557,7 +563,7 @@ export interface TaskSpec {
|
|
|
557
563
|
toolMaterializeStrategy?: "swap" | "static";
|
|
558
564
|
/**
|
|
559
565
|
* The inline-pin counterpart of {@link deferTools} (same wire-name addressing, opposite
|
|
560
|
-
* direction
|
|
566
|
+
* direction): names listed here are NEVER deferred — not by
|
|
561
567
|
* `ToolSpec.defer`, not by the MCP constant-defer arm (besides the server's own
|
|
562
568
|
* `_meta["anthropic/alwaysLoad"]` declaration this list is the only channel that keeps a chosen
|
|
563
569
|
* MCP tool's full schema inlined), not by `deferTools`, not by the deferral gate under any `deferMode`. Unknown names
|
|
@@ -590,13 +596,12 @@ export interface TaskSpec {
|
|
|
590
596
|
* arguments succeeds; activation only controls whether the model has SEEN the schema). Set
|
|
591
597
|
* `false` to restore the strict posture: every call on an un-activated placeholder is rejected
|
|
592
598
|
* with the ToolSearch teaching message regardless of argument shape. Governance is unaffected
|
|
593
|
-
* either way — policy/effect/irreversibility gates key on the tool NAME maps and run upstream
|
|
594
|
-
* of any execute.
|
|
599
|
+
* either way — policy/effect/irreversibility gates key on the tool NAME maps and run upstream of any execute.
|
|
595
600
|
*/
|
|
596
601
|
deferSelfResolve?: boolean;
|
|
597
602
|
/**
|
|
598
603
|
* R2 双形轴(2026-07-18 裁): which prompt-profile face this task speaks — "simple" (default;
|
|
599
|
-
*
|
|
604
|
+
* the short-form tool descriptions + lean system sections, what CC serves every non-claude
|
|
600
605
|
* model id) or "classic" (the long-form face, ≈ CC 4.x-era wording — switchable per task/model,
|
|
601
606
|
* e.g. serving classic to a model that scores better on it; center distribution rides this field).
|
|
602
607
|
* Affects PRESENTATION only (descriptions/section wording), never tool behavior or policy.
|
|
@@ -649,7 +654,7 @@ export interface TaskSpec {
|
|
|
649
654
|
* this manager. Overrides `RunnerDeps.lspManager`. Neither seat set, or no hands ⇒ the engine mounts no `lsp` tool (the model uses grep/read_file). */
|
|
650
655
|
lspManager?: import("./lsp.js").LspServerManager;
|
|
651
656
|
/**
|
|
652
|
-
* design/121
|
|
657
|
+
* design/121: after the agent edits a file, NEW language-server diagnostics are
|
|
653
658
|
* injected into the model (`<new-diagnostics>` context message, 10/file · 30 total · 4000-char cap)
|
|
654
659
|
* and emitted as a structured `diagnostics` event for the shell. **Default ON** whenever the
|
|
655
660
|
* preconditions hold — an LSP manager with a diagnostics registry is wired AND the roster has
|
|
@@ -831,8 +836,7 @@ export interface TaskSpec {
|
|
|
831
836
|
* request is dropped with the existing `preempt.ignored` trace instead of pausing the run.
|
|
832
837
|
*
|
|
833
838
|
* Delegated children inherit it: the sync / background / fork spawn lanes copy the `"disabled"` word
|
|
834
|
-
* into every child spec (same discipline as `principal`), so a store-less run's whole tree stays
|
|
835
|
-
* store-less.
|
|
839
|
+
* into every child spec (same discipline as `principal`), so a store-less run's whole tree stays store-less.
|
|
836
840
|
*
|
|
837
841
|
* The off switch is the WORD `"disabled"`, never `null`: a string is not nullish, so the ordinary
|
|
838
842
|
* `spec ?? deps` coalesce is the whole resolution rule and no reader has to remember a special
|
|
@@ -895,8 +899,7 @@ export interface TaskSpec {
|
|
|
895
899
|
* notebook_edit refuse these paths exactly as before). Use `additionalDirectories` when the task
|
|
896
900
|
* should also write there. Same canonicalization and fail-closed skip rules as
|
|
897
901
|
* `additionalDirectories`. Typical use: a deployment's own user-config directory in an interactive
|
|
898
|
-
* assembly, where a read-classifying shell gate would otherwise consult the approver for every
|
|
899
|
-
* config read.
|
|
902
|
+
* assembly, where a read-classifying shell gate would otherwise consult the approver for every config read.
|
|
900
903
|
*/
|
|
901
904
|
additionalReadDirectories?: string[];
|
|
902
905
|
/**
|
|
@@ -970,7 +973,7 @@ export interface TaskSpec {
|
|
|
970
973
|
*/
|
|
971
974
|
enablePlanMode?: boolean;
|
|
972
975
|
/**
|
|
973
|
-
* Interactive-tool mounting override (
|
|
976
|
+
* Interactive-tool mounting override (AskUserQuestion / ExitPlanMode /
|
|
974
977
|
* EnterPlanMode share one `isEnabled` gate — in non-interactive mode without an SDK permission-prompt
|
|
975
978
|
* tool the tool is NOT offered at all, so the model never asks into the void). sema's automatic
|
|
976
979
|
* criterion (this knob unset): a human-facing tool mounts only when the deployment has SOME face that
|
|
@@ -997,8 +1000,7 @@ export interface TaskSpec {
|
|
|
997
1000
|
* OPT-OUT default (flipped from the pre-136 opt-IN): `undefined`/`true` = fork is AVAILABLE, bounded by the
|
|
998
1001
|
* session capability (`hasSessionFork` durable store + a session id + not inside a fork — honest refusal
|
|
999
1002
|
* otherwise); an EXPLICIT `false` = fork is DENIED for this task with the honest `fork.disabled` result
|
|
1000
|
-
* (never a silent downgrade)
|
|
1001
|
-
* now send `enableFork: false` explicitly (or deny per-principal via `RuntimeCaps.allowFork`).
|
|
1003
|
+
* (never a silent downgrade); `RuntimeCaps.allowFork` denies it per principal.
|
|
1002
1004
|
*/
|
|
1003
1005
|
enableFork?: boolean;
|
|
1004
1006
|
/**
|
|
@@ -1080,7 +1082,7 @@ export interface TaskSpec {
|
|
|
1080
1082
|
*
|
|
1081
1083
|
* Lives for this run — the steers it takes in included; a delegated child holds the entries until it ends; a resumed leg
|
|
1082
1084
|
* holds them only when its spec supplies them again (they are not written into a checkpoint). An entry this grammar
|
|
1083
|
-
* reads as nothing (`*`, `mcp__*`, a write-path or domain pattern) grants nothing and is announced at the start of the
|
|
1085
|
+
* reads as nothing (`*`, `mcp__*` / `mcp__*__*`, a write-path or domain pattern) grants nothing and is announced at the start of the
|
|
1084
1086
|
* run (`permission.allowed_tool_not_granted`); a list holding `*` grants nothing at all. A value that is not a list of
|
|
1085
1087
|
* strings refuses the run before it starts (`config.invalid_permission_rules`, with its issues).
|
|
1086
1088
|
*/
|
|
@@ -1164,8 +1166,7 @@ export interface TaskSpec {
|
|
|
1164
1166
|
/**
|
|
1165
1167
|
* design/164 — the SINGLE task-limit surface. Every budget axis lives here (the former top-level
|
|
1166
1168
|
* `maxTokens` / `maxCostUsd` / `budgetStreamCancel` / `degrade` were folded in), and **every axis is
|
|
1167
|
-
* DEFAULT-EMPTY**: a task with no `limits` runs with no engine-imposed turn / token / cost / wall-clock
|
|
1168
|
-
* ceiling at all.
|
|
1169
|
+
* DEFAULT-EMPTY**: a task with no `limits` runs with no engine-imposed turn / token / cost / wall-clock ceiling at all.
|
|
1169
1170
|
*
|
|
1170
1171
|
* Consequence, stated plainly (ruled 2026-08-04): a zero-config runaway has NO task-level backstop.
|
|
1171
1172
|
* What still binds is the ENGINEERING GUARDRAIL family — {@link TaskLimits.brainCallGuardrailMs} (a
|
|
@@ -1258,16 +1259,16 @@ export interface TaskSpec {
|
|
|
1258
1259
|
streamingToolExecution?: boolean;
|
|
1259
1260
|
/**
|
|
1260
1261
|
* **Structured output** (1.41): constrain the task's FINAL result to this JSON schema (a typebox
|
|
1261
|
-
* object schema). Injects a built-in `
|
|
1262
|
+
* object schema). Injects a built-in `StructuredOutput` tool whose parameters ARE this schema; the model
|
|
1262
1263
|
* calls it to finish, the validated object is surfaced as `TaskResult.structuredOutput`, and the task
|
|
1263
1264
|
* ends. Provider-agnostic (it's just a tool). If the model can't produce a valid object within a few
|
|
1264
|
-
* tries the task fails with `errorCode="output.invalid"`.
|
|
1265
|
-
* rejected (reserved). The model may still answer in prose (then `structuredOutput`
|
|
1266
|
-
* `
|
|
1265
|
+
* tries the task fails with `errorCode="output.invalid"`. While this is set, a caller tool named
|
|
1266
|
+
* `StructuredOutput` is rejected (reserved). The model may still answer in prose (then `structuredOutput`
|
|
1267
|
+
* is undefined) or call `ReportBlocked`. Cast the result with `Static<typeof yourSchema>`.
|
|
1267
1268
|
*/
|
|
1268
1269
|
outputSchema?: TSchema;
|
|
1269
1270
|
/**
|
|
1270
|
-
* How many times the model may **retry** a rejected `
|
|
1271
|
+
* How many times the model may **retry** a rejected `StructuredOutput` call before the task fails with
|
|
1271
1272
|
* `errorCode="output.invalid"` (only meaningful when {@link outputSchema} is set). `0` = fail on the
|
|
1272
1273
|
* first invalid submit (no in-loop retry); the caller decides whether to re-run. Default `2`
|
|
1273
1274
|
* (3 total attempts). Clamped to a non-negative integer. This bounds only the *in-task* retry of a
|
|
@@ -1309,7 +1310,7 @@ export interface TaskSpec {
|
|
|
1309
1310
|
* the recovery-class forced lanes (design/374 slice 3): a prompt-too-long recovery or the guard
|
|
1310
1311
|
* chain's arm B may still legitimately compact WITHIN the task — error/pressure recovery is not
|
|
1311
1312
|
* a routine boundary pass, so a within-task compaction under this flag is contract-conforming.
|
|
1312
|
-
* `attachWorkingFiles` (LONGRUN-2; **default ON since 2026-07-03** —
|
|
1313
|
+
* `attachWorkingFiles` (LONGRUN-2; **default ON since 2026-07-03** — the reference hard-codes its
|
|
1313
1314
|
* post-compact file restore, and LONGRUN-2 measured ≈2.3 extra read round-trips per compaction
|
|
1314
1315
|
* without it): after each compaction, re-read the task's most recently READ files (CC
|
|
1315
1316
|
* readFileState semantics; else modified-by-recency) the summary leaves out of view, with the Read tool's
|
|
@@ -1330,7 +1331,7 @@ export interface TaskSpec {
|
|
|
1330
1331
|
maxCharsPerFile?: number;
|
|
1331
1332
|
};
|
|
1332
1333
|
/**
|
|
1333
|
-
* design/169-F (
|
|
1334
|
+
* design/169-F (lightweight-clear posture) — OPT-IN stale
|
|
1334
1335
|
* tool-result offload, a projection-layer clear below full compaction: in the REQUEST sent to
|
|
1335
1336
|
* the model, same-tool results older than the most recent `keepRecentPerTool` are replaced by a
|
|
1336
1337
|
* short pointer ("offloaded … saved to persisted output ref …", readable back via the
|
|
@@ -1371,7 +1372,7 @@ export interface TaskSpec {
|
|
|
1371
1372
|
* coalesced `<system-reminder>` steer per clean turn boundary, lowest lane: finalize/deadline-nudge/
|
|
1372
1373
|
* diagnostics at the same boundary — and the design/130 P2 / design/132 end-game latches — all
|
|
1373
1374
|
* suppress it. The listing family ALSO delivers its initial full frames on the FIRST user turn
|
|
1374
|
-
* (prompt-adjacent
|
|
1375
|
+
* (prompt-adjacent) — that first-frame delivery is part of the first
|
|
1375
1376
|
* message, not a boundary steer, so none of the boundary gates apply to it.
|
|
1376
1377
|
*
|
|
1377
1378
|
* - `todoReminder`: CC 10/10 cadence — when TodoWrite (or the task tools; both mounted ⇒ the
|
|
@@ -1392,7 +1393,7 @@ export interface TaskSpec {
|
|
|
1392
1393
|
* (re)announced; no deferred tools ⇒ permanently silent.
|
|
1393
1394
|
* - `agentListing` (G1 续批 — CC `agent_listing_delta` parity; [c209-C] DEFAULT-ON, see above):
|
|
1394
1395
|
* when a delegation tool built by `createSubagentTool` is mounted, the FIRST user turn carries
|
|
1395
|
-
* the full agent-type roster ("Available agent types for the Agent tool:"
|
|
1396
|
+
* the full agent-type roster ("Available agent types for the Agent tool:"; + the
|
|
1396
1397
|
* concurrency note when more than one type; + the Q4 "Models available for the 'model'
|
|
1397
1398
|
* parameter:" tail when a catalog is mounted). Boundaries announce only roster drift
|
|
1398
1399
|
* (adds/removals — static in practice; the delta lane serves dynamic-registration deployments
|
|
@@ -1409,7 +1410,7 @@ export interface TaskSpec {
|
|
|
1409
1410
|
* instructions stay in the stable system prompt (`# MCP Server Instructions`, design/64 §17.3 —
|
|
1410
1411
|
* deliberate CC deviation: CC injects them as reminders, sema's stable-prompt carrier is
|
|
1411
1412
|
* prefix-cache-correct). This member announces only DELTAS: a mid-task disconnect of an
|
|
1412
|
-
* instruction-bearing server ("The following MCP servers have disconnected…"
|
|
1413
|
+
* instruction-bearing server ("The following MCP servers have disconnected…"), and
|
|
1413
1414
|
* the add lane for a future dynamic-connect face. Added instruction text is UNTRUSTED server
|
|
1414
1415
|
* text → fenced with `delimitUntrusted` (deliberate CC deviation: CC injects it raw).
|
|
1415
1416
|
*
|
|
@@ -1425,8 +1426,8 @@ export interface TaskSpec {
|
|
|
1425
1426
|
attachments?: {
|
|
1426
1427
|
todoReminder?: true;
|
|
1427
1428
|
/**
|
|
1428
|
-
* task #51 口径③ —
|
|
1429
|
-
* producers consume it as `if (r2o() === "off") return []
|
|
1429
|
+
* task #51 口径③ — kill-switch parity (both reminder
|
|
1430
|
+
* producers consume it as `if (r2o() === "off") return []`). `"off"` silences the
|
|
1430
1431
|
* todo/task reminder lane even when `todoReminder` is wired on (the other attachment producers are
|
|
1431
1432
|
* untouched — CC's nudge gate is lane-scoped); any other value (or absence) = CC `"baseline"`.
|
|
1432
1433
|
* CC resolves this from env `CLAUDE_CODE_TODO_REMINDER_MODE` / the `tengu_soft_slate_nudge` gate;
|
|
@@ -1434,7 +1435,7 @@ export interface TaskSpec {
|
|
|
1434
1435
|
*/
|
|
1435
1436
|
todoReminderMode?: "baseline" | "off";
|
|
1436
1437
|
/**
|
|
1437
|
-
* `tool_search_usage_reminder
|
|
1438
|
+
* `tool_search_usage_reminder`: the
|
|
1438
1439
|
* REVERSE nudge for delayed tool disclosure. When tools are deferred (design/36), a model that has
|
|
1439
1440
|
* gone N turns without calling `ToolSearch` and still has unloaded schemas is told they exist and
|
|
1440
1441
|
* how to load them, so "this capability does not exist, I will build a workaround" stops being the
|
|
@@ -1452,12 +1453,12 @@ export interface TaskSpec {
|
|
|
1452
1453
|
maxFiles?: number;
|
|
1453
1454
|
};
|
|
1454
1455
|
/**
|
|
1455
|
-
* SR-3 (
|
|
1456
|
-
* progressive $-budget readout `USD budget: $used/$total; $remaining remaining` (
|
|
1456
|
+
* SR-3 (the `budget_usd` lane): the
|
|
1457
|
+
* progressive $-budget readout `USD budget: $used/$total; $remaining remaining` (fixed
|
|
1457
1458
|
* template). CC-exact activation: live ONLY while the task carries an effective cost ceiling
|
|
1458
1459
|
* (`maxCostUsd`, or a resource-slice ledger remaining — CC `options.maxBudgetUsd`); no ceiling ⇒
|
|
1459
1460
|
* permanently silent even when opted in. CC-exact cadence: NO threshold ladder and NO throttle —
|
|
1460
|
-
* CC mounts it on every attachment cycle whose task carries a ceiling (RB-311: CC
|
|
1461
|
+
* CC mounts it on every attachment cycle whose task carries a ceiling (RB-311: CC puts
|
|
1461
1462
|
* it in the SHARED producer group, so a SUBAGENT with its own ceiling sees it too — the `!agentId`
|
|
1462
1463
|
* flag gates the main-agent-exclusive group next to it, not this lane), so
|
|
1463
1464
|
* sema emits one line at every collected clean turn boundary; the "progression" is the numbers
|
|
@@ -1472,9 +1473,9 @@ export interface TaskSpec {
|
|
|
1472
1473
|
*/
|
|
1473
1474
|
budgetUsd?: true;
|
|
1474
1475
|
/**
|
|
1475
|
-
* `total_tokens_reminder
|
|
1476
|
+
* `total_tokens_reminder`:
|
|
1476
1477
|
* the TOKEN twin of {@link budgetUsd}. One line per collected boundary,
|
|
1477
|
-
* `<total_tokens>N tokens left</total_tokens
|
|
1478
|
+
* `<total_tokens>N tokens left</total_tokens>`.
|
|
1478
1479
|
*
|
|
1479
1480
|
* Activation, CC-exact in shape and BYOM-honest in substance: opted in here AND — for the two
|
|
1480
1481
|
* COUNTDOWN arms — the task carries a token ceiling (`limits.maxTokens`, or a resource-slice
|
|
@@ -1494,7 +1495,7 @@ export interface TaskSpec {
|
|
|
1494
1495
|
* `true`-only 133 form. BREAKING for a deployment that declares a token ceiling: pre-flip it saw
|
|
1495
1496
|
* no `<total_tokens>` frame without opting in, and a probe pinning that absence reds.
|
|
1496
1497
|
*
|
|
1497
|
-
* WHY THIS LANE AND NOT {@link budgetUsd}.
|
|
1498
|
+
* WHY THIS LANE AND NOT {@link budgetUsd}. The reference ships the readout on by default (its own
|
|
1498
1499
|
* settings schema reads "Defaults to padded-countdown"), which is the fact that reopened the
|
|
1499
1500
|
* 2026-07-30 registration; the design/74 "no budget language reaches the model" default is
|
|
1500
1501
|
* relaxed here for the same reason CC relaxed it. The BYOM honesty objection does not survive
|
|
@@ -1508,7 +1509,7 @@ export interface TaskSpec {
|
|
|
1508
1509
|
*/
|
|
1509
1510
|
totalTokensReminder?: boolean;
|
|
1510
1511
|
/**
|
|
1511
|
-
* Which arm of the readout,
|
|
1512
|
+
* Which arm of the readout, the reference's closed set (`off` / `infinite` / `fixed` /
|
|
1512
1513
|
* `countdown` / `padded-countdown`); absent ⇒ CC's own default `"padded-countdown"`.
|
|
1513
1514
|
*
|
|
1514
1515
|
* - `countdown` — remaining = ceiling − spend, raw.
|
|
@@ -1545,9 +1546,8 @@ export interface TaskSpec {
|
|
|
1545
1546
|
mcpInstructions?: true;
|
|
1546
1547
|
};
|
|
1547
1548
|
/**
|
|
1548
|
-
* Inject a built-in `
|
|
1549
|
-
* (missing info, permission, ambiguity). When called, the task ends with status "blocked".
|
|
1550
|
-
* Default: true.
|
|
1549
|
+
* Inject a built-in `ReportBlocked` tool the agent can call when it cannot finish
|
|
1550
|
+
* (missing info, permission, ambiguity). When called, the task ends with status "blocked". Default: true.
|
|
1551
1551
|
*/
|
|
1552
1552
|
enableBlockedReport?: boolean;
|
|
1553
1553
|
/**
|
|
@@ -96,7 +96,7 @@ export interface TaskStream extends AsyncIterable<TaskEvent> {
|
|
|
96
96
|
* - `"now"` — `"next"`'s delivery guarantee PLUS the boundary is manufactured early: the frame
|
|
97
97
|
* takes the queue's class head and, when a turn is in flight, the engine CUTS that turn at a
|
|
98
98
|
* reconciled boundary (finished tool calls keep their real results; never-started ones settle
|
|
99
|
-
* as paired interrupted results; the
|
|
99
|
+
* as paired interrupted results; the interruption marker lands) and the run
|
|
100
100
|
* CONTINUES with this input — never the run-level `interrupt()`. Best-effort accelerator:
|
|
101
101
|
* with nothing in flight (idle tail, between turns) delivery is exactly `"next"`'s. Every
|
|
102
102
|
* real cut is announced (`task.turn_interrupted` notice) and counts toward `maxTurns` —
|
|
@@ -202,11 +202,11 @@ export interface TaskStream extends AsyncIterable<TaskEvent> {
|
|
|
202
202
|
* (the run-end backstop resolves "mooted" without a frame; the task's terminal events are the signal).
|
|
203
203
|
*
|
|
204
204
|
* design/145 §4 (additive): `opts.instructions` — the CC `/compact <instructions>` parity face.
|
|
205
|
-
* Injected into the summarization prompt in the
|
|
205
|
+
* Injected into the summarization prompt in the standard shape (`\n\nAdditional Instructions:`),
|
|
206
206
|
* REPLACING the spec-level `compaction.instructions` / default instructions for THIS pass (a
|
|
207
207
|
* one-shot directive should out-rank standing configuration — sema judgment inside the superset;
|
|
208
|
-
* CC has no spec level). A `preCompact` hook's `additionalInstructions` still APPENDS
|
|
209
|
-
*
|
|
208
|
+
* CC has no spec level). A `preCompact` hook's `additionalInstructions` still APPENDS.
|
|
209
|
+
* Sanitized like every instructions channel (break-out tags defused, fence
|
|
210
210
|
* sentinels capped, ≤2048 code points). Concurrent `compact()` calls coalesce onto one boundary:
|
|
211
211
|
* the LAST caller's instructions win that pass (all waiters share its outcome — same coalescing
|
|
212
212
|
* contract as before).
|
|
@@ -302,7 +302,7 @@ export interface TaskStream extends AsyncIterable<TaskEvent> {
|
|
|
302
302
|
* is not (its contract is "never dials or re-dials"). Core holds no MCP connection across task
|
|
303
303
|
* legs, so once a server's transport closes this leg is stuck with it: every one of its tools fails
|
|
304
304
|
* fast and a refresh can only keep reporting `not_connected`. This is the verb a host hangs a
|
|
305
|
-
* "Reconnect" control on. ONE NAMED SERVER, required —
|
|
305
|
+
* "Reconnect" control on. ONE NAMED SERVER, required — the reference's control-channel request carries
|
|
306
306
|
* a required `serverName` and has no all-servers form, and an all-servers form would CLOSE HEALTHY
|
|
307
307
|
* connections to re-dial them (the stdio server owning a device or a port — the case this verb
|
|
308
308
|
* exists for — is the one that cannot be re-dialed while its predecessor still holds the device).
|
|
@@ -353,7 +353,7 @@ export interface TaskStream extends AsyncIterable<TaskEvent> {
|
|
|
353
353
|
*
|
|
354
354
|
* The CUT half is the design/373 S1 turn-scoped settle, verbatim: finished tool calls keep their
|
|
355
355
|
* REAL results; never-started ones settle as paired interrupted results
|
|
356
|
-
* (`errorKind:"interrupted_never_started"`); the
|
|
356
|
+
* (`errorKind:"interrupted_never_started"`); the interruption marker lands in the
|
|
357
357
|
* session as an engine-note user frame. Every REAL cut is announced (`task.turn_interrupted`
|
|
358
358
|
* notice, `detail.cause:"user_halt"` — the steer-now landing keeps its own message and no
|
|
359
359
|
* `cause` key). The STOP half: from acceptance on, NO new model turn starts — the loop ends at
|
|
@@ -44,13 +44,13 @@ export interface TaskToolCapabilities {
|
|
|
44
44
|
/** TaskStop accepts a background agent's spawn NAME as task_id (registry name resolution only). */
|
|
45
45
|
nameAddressing: boolean;
|
|
46
46
|
}
|
|
47
|
-
/** Full-capability profile = the registry-backed mount with notifications wired
|
|
47
|
+
/** Full-capability profile = the registry-backed mount with notifications wired. */
|
|
48
48
|
export declare const REGISTRY_TASK_TOOL_CAPS: TaskToolCapabilities;
|
|
49
49
|
/** The env-direct thin-shell profile: cursor polling over a background shell, nothing else. */
|
|
50
50
|
export declare const ENV_DIRECT_TASK_TOOL_CAPS: TaskToolCapabilities;
|
|
51
51
|
/**
|
|
52
52
|
* TaskOutput description, composed per capability. With every flag true this reproduces the registry's
|
|
53
|
-
* pre-S2 literal byte-for-byte — the first two sentences are the
|
|
53
|
+
* pre-S2 literal byte-for-byte — the first two sentences are the A5 deprecated form
|
|
54
54
|
* (209-verbatim except the task-type names, mapped to sema's lanes; divergence-logged; the anchor
|
|
55
55
|
* commentary lives at the registry factory). With `notification` false the <task-notification> half is
|
|
56
56
|
* honestly omitted and the cursor-polling guidance (the env side's long-standing wording) is composed in
|
|
@@ -58,8 +58,8 @@ export declare const ENV_DIRECT_TASK_TOOL_CAPS: TaskToolCapabilities;
|
|
|
58
58
|
*/
|
|
59
59
|
export declare function composeTaskOutputDescription(caps: TaskToolCapabilities): string;
|
|
60
60
|
/**
|
|
61
|
-
* TaskStop description, composed per capability. All-true reproduces the registry literal (
|
|
62
|
-
* the named-agent bullet is
|
|
61
|
+
* TaskStop description, composed per capability. All-true reproduces the registry literal (
|
|
62
|
+
* the named-agent bullet is the reference's; its teammate bullet stays honestly omitted — sema's team face is
|
|
63
63
|
* in-process, not registry-addressable); `nameAddressing:false` drops exactly that bullet (the env shell
|
|
64
64
|
* has no agent-name resolution), which reproduces the env-direct literal.
|
|
65
65
|
*/
|
|
@@ -12,7 +12,7 @@ export declare class TaskSpecTightenError extends Error {
|
|
|
12
12
|
* the override can only ADD denials/asks). Either alone ⇒ that one. This is the central fix: a blind spread
|
|
13
13
|
* would drop the base policy entirely.
|
|
14
14
|
* - **every row of the clamp table** (`CLAMP_SET`: `handsReadOnly`, `interactiveTools`, `approvalReach`, the two
|
|
15
|
-
* containment faces, `readDenyPatterns`, `oneShot`, `memoryPersistenceCapable`, `fileHistory`, `promptForm`, and
|
|
15
|
+
* containment faces, `readDenyPatterns`, `oneShot`, `memoryPersistenceCapable`, `fileHistory`, `projectMemory`, `promptForm`, and
|
|
16
16
|
* `memory.enabled`) — a base carrying the row's restricting value meeting an override that states a different one ⇒
|
|
17
17
|
* **throw** (loosening); otherwise the restricting value wins if either side carries it, an add-only list unions, and an
|
|
18
18
|
* override writing `undefined` erases nothing. `memory` is an object seat with ONE clamped member (`enabled: false`):
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SINGLE SOURCE, TWO READERS. Each definition module spreads its row's `face` into the `ToolSpec` it
|
|
8
8
|
* hands `defineTool` (`...TOOL_FACES.read`), so the face a tool declares at mount time IS the face
|
|
9
|
-
* listed here — there is no second declaration to drift
|
|
9
|
+
* listed here — there is no second declaration to drift (a definition whose schema is built per mount leaves its row's rule
|
|
10
|
+
* `params` to the static view, `mountRuleFace`). The effect roster (tool-roster.ts) reads every
|
|
10
11
|
* axis off the MOUNTED INSTANCE; the static catalog (`describeToolCatalog()`) reads this table without
|
|
11
12
|
* an env or a deps object. The conformance gate (test/tool-catalog-conformance.test.ts) proves the two
|
|
12
13
|
* agree for every definition it can instantiate; the catalog completeness gate
|
|
@@ -31,11 +32,16 @@ export declare const TASK_GET_TOOL_NAME = "TaskGet";
|
|
|
31
32
|
export declare const TASK_UPDATE_TOOL_NAME = "TaskUpdate";
|
|
32
33
|
export declare const TASK_LIST_TOOL_NAME = "TaskList";
|
|
33
34
|
export declare const TODO_WRITE_TOOL_NAME = "TodoWrite";
|
|
35
|
+
/** Reserved name of the injected structured-output tool (`StructuredOutput`). The name it retired, `submit_output`, resolves to
|
|
36
|
+
* nothing: the retired-name table (`RETIRED_TOOL_NAMES`) only tells a caller this one. */
|
|
37
|
+
export declare const OUTPUT_TOOL_NAME = "StructuredOutput";
|
|
34
38
|
export declare const REFRESH_MCP_TOOLS_TOOL_NAME = "RefreshMcpTools";
|
|
35
39
|
export declare const ARTIFACT_TOOL_NAME = "Artifact";
|
|
36
40
|
/**
|
|
37
41
|
* Every row. Order is documentation order (hands → delegation → scaffolds → memory → scheduler → host
|
|
38
|
-
* scenarios); nothing reads the order.
|
|
42
|
+
* scenarios); nothing reads the order. A row's rule `params` is its definition's FULLEST mount's scalar vocabulary, the
|
|
43
|
+
* static view's (`catalogRuleFaceOf`); a row that declares none (StructuredOutput: its schema is each task's) can be judged
|
|
44
|
+
* on a leg only.
|
|
39
45
|
*/
|
|
40
46
|
export declare const TOOL_CATALOG_ENTRIES: readonly ToolCatalogEntry[];
|
|
41
47
|
/**
|
|
@@ -45,6 +51,17 @@ export declare const TOOL_CATALOG_ENTRIES: readonly ToolCatalogEntry[];
|
|
|
45
51
|
export declare const ENGINE_CARDS: Readonly<Record<string, string>>;
|
|
46
52
|
/** The declared face of one definition, by definition id — what a definition module spreads into its spec. */
|
|
47
53
|
export declare function toolFace(id: string): ToolFaceDeclaration;
|
|
54
|
+
/** Is `contract` a contract object the catalog minted for an engine definition ({@link toolFace}) — the one record of "the engine
|
|
55
|
+
* declared this", which a value written by hand (the same id spelled out) is not. */
|
|
56
|
+
export declare function isCatalogContract(contract: unknown): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The rule face a definition whose schema is BUILT PER MOUNT puts on its instance: its row's primaries only (none ⇒ no rule
|
|
59
|
+
* face). The row's `params` is the static view's vocabulary, the fullest mount's; a mount's own is read off the schema it
|
|
60
|
+
* carries — whatever a summarizer, a host's capabilities or a host's own schema made it (`ruleFaceOfInstance`).
|
|
61
|
+
*/
|
|
62
|
+
export declare function mountRuleFace(id: string): {
|
|
63
|
+
primaryParams: string[];
|
|
64
|
+
} | undefined;
|
|
48
65
|
/** Definition-id → face, for the modules that spread one (`...TOOL_FACES.read`). Frozen: a face is data. */
|
|
49
66
|
export declare const TOOL_FACES: Readonly<Record<string, ToolFaceDeclaration>>;
|
|
50
67
|
/**
|