@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
package/dist/agents/subagent.js
CHANGED
|
@@ -5,6 +5,7 @@ import { bindDelegationName } from "../core/delegation-name.js";
|
|
|
5
5
|
import { resumeRefusalDetailOf, resumeStartupCauseOf } from "../core/resume-startup-cause.js";
|
|
6
6
|
import { errorCodeOf, thrownFailureOf } from "../core/runner/terminal-account.js";
|
|
7
7
|
import { applyParentSpecSeat, parentSpecSeatOfCtx } from "../core/parent-spec-seat.js";
|
|
8
|
+
import { ADVISOR_FORK_SENTENCE, ADVISOR_TOOL_NAME } from "../core/advisor-verdict.js";
|
|
8
9
|
import { applyClampSeats, assertClampRecord, childClampSeats, clampSeatsOf, clampSourceOf, engineHeadlessLegSeats, foldClampSources, postureUnderClamps } from "../core/child-clamp-seats.js";
|
|
9
10
|
import { assertNoRetiredKeys } from "../core/retired-keys.js";
|
|
10
11
|
import { stripSpawnTurnQuestionFace } from "../core/ask-question.js";
|
|
@@ -17,7 +18,7 @@ import { enqueueMemoryAnnouncement } from "../core/memory-engine/layout.js";
|
|
|
17
18
|
import { resolveModel, resolveModelDisplayLabel } from "../core/roles.js";
|
|
18
19
|
import { childModelSeat, childThinkingSeat, deploymentStatesSubagentModel, deploymentSubagentThinking, forkModelSeat, inheritedParentModel, runnerRoleMap } from "./child-model-seat.js";
|
|
19
20
|
export { childThinkingSeat, deploymentSubagentThinking, deploymentSubagentTierModel } from "./child-model-seat.js";
|
|
20
|
-
import {
|
|
21
|
+
import { REPORT_BLOCKED_TOOL_NAME } from "../core/runner/synthetic-tools.js";
|
|
21
22
|
import { TOOL_SEARCH_NAME } from "../core/runner/tool-disclosure.js";
|
|
22
23
|
import { OFFLOAD_TOOL_NAME } from "../core/tool-result-store.js";
|
|
23
24
|
import { compileToolSelector, delegationListWhere, snapshotDefinitionLists, toolListsDigest, toolNameAllowed, toolNameListFlaw } from "./tool-filter.js";
|
|
@@ -73,7 +74,8 @@ import { recordRosterSpawn } from "./roster-store.js";
|
|
|
73
74
|
import { LAUNCH_RECEIPT_OWN_WORDS_CLAUSE, launchReceiptNoQuoteClause } from "./launch-receipt-contract.js";
|
|
74
75
|
import { ObserverDigestTap, ObserverPairing, createObserverReportToolSpec, markObserverTaskId, unmarkObserverTaskId, isObserverTaskId, ObserverResumeStateError, ObserverStoppedByUserError, observerFramingPrompt, observerSlug, resolveObserverDeclaration, } from "./observer.js";
|
|
75
76
|
import { SubagentStepRecorder } from "./subagent-steps.js";
|
|
76
|
-
import { toolFace } from "../core/tool-catalog-entries.js";
|
|
77
|
+
import { OUTPUT_TOOL_NAME, mountRuleFace, toolFace } from "../core/tool-catalog-entries.js";
|
|
78
|
+
import { canonicalNameValue } from "../core/permission-rule-model.js";
|
|
77
79
|
import { inheritedChildPool, inheritedMcpDeclarations } from "./inherited-tool-pool.js";
|
|
78
80
|
import { readMember, thrownText } from "../core/thrown-value.js";
|
|
79
81
|
const BG_AGENT_RESULT_MAX = 4_000;
|
|
@@ -1182,18 +1184,36 @@ function chargeDelegationEntryHandle(registry, key, store, handle) {
|
|
|
1182
1184
|
armDelegationLedgerLifecycle(registry);
|
|
1183
1185
|
sweepDelegationLedgerRound(registry, 3);
|
|
1184
1186
|
}
|
|
1185
|
-
export
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
function foldGeneralPurposeAlias(args, shadowed) {
|
|
1189
|
-
if (shadowed)
|
|
1187
|
+
export { normalizeSubagentType } from "../core/permission-rule-model.js";
|
|
1188
|
+
function canonicalSubagentTypeArgs(args, accepted, generalPurposeShadowed) {
|
|
1189
|
+
if (args === null || typeof args !== "object" || Array.isArray(args))
|
|
1190
1190
|
return args;
|
|
1191
1191
|
const raw = args;
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1192
|
+
const requested = raw["subagent_type"];
|
|
1193
|
+
if (requested === undefined || requested === "") {
|
|
1194
|
+
if (!generalPurposeShadowed)
|
|
1195
|
+
return { ...raw, subagent_type: GENERAL_PURPOSE_SUBAGENT_TYPE };
|
|
1196
|
+
if (requested === undefined)
|
|
1197
|
+
return args;
|
|
1198
|
+
const { subagent_type: _empty, ...omitted } = raw;
|
|
1199
|
+
return omitted;
|
|
1195
1200
|
}
|
|
1196
|
-
|
|
1201
|
+
if (typeof requested !== "string")
|
|
1202
|
+
return args;
|
|
1203
|
+
const resolved = canonicalNameValue(requested, accepted);
|
|
1204
|
+
return resolved.kind === "entry" && resolved.entry !== requested ? { ...raw, subagent_type: resolved.entry } : args;
|
|
1205
|
+
}
|
|
1206
|
+
function subagentTypeRefusal(requested, accepted) {
|
|
1207
|
+
if (requested === undefined || requested === "")
|
|
1208
|
+
return undefined;
|
|
1209
|
+
if (typeof requested !== "string")
|
|
1210
|
+
return { content: `Sub-agent not started: subagent_type must be a string. Available subagent_type values: ${accepted.join(", ")}.`, error: "unknown subagent_type" };
|
|
1211
|
+
const resolved = canonicalNameValue(requested, accepted);
|
|
1212
|
+
if (resolved.kind === "ambiguous")
|
|
1213
|
+
return { content: `Sub-agent not started: subagent_type "${requested}" is ambiguous — it matches ${resolved.entries.join(", ")}. Use the exact name.`, error: "ambiguous subagent_type" };
|
|
1214
|
+
if (resolved.kind === "unknown")
|
|
1215
|
+
return { content: `Sub-agent not started: unknown subagent_type "${requested}". Available subagent_type values: ${accepted.join(", ")}.`, error: "unknown subagent_type" };
|
|
1216
|
+
return undefined;
|
|
1197
1217
|
}
|
|
1198
1218
|
export const SUBAGENT_SYSTEM_NOTE = "You can delegate a self-contained subtask to an isolated sub-agent via the delegation tool. " +
|
|
1199
1219
|
"The sub-agent runs in a clean context and returns a single report. Delegate slow, parallelizable, " +
|
|
@@ -1379,6 +1399,7 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1379
1399
|
return bindDelegationName(delegationToolName, {
|
|
1380
1400
|
name: opts.name ?? DEFAULT_SUBAGENT_TOOL_NAME,
|
|
1381
1401
|
...toolFace("agent"),
|
|
1402
|
+
ruleFace: { ...mountRuleFace("agent"), nameValues: acceptedSubagentTypes() },
|
|
1382
1403
|
agentListing,
|
|
1383
1404
|
agentToolFaces,
|
|
1384
1405
|
...(depth === 0 && opts.allowTools !== undefined ? { agentToolLevelAllowTools: opts.allowTools } : {}),
|
|
@@ -1471,9 +1492,13 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1471
1492
|
}
|
|
1472
1493
|
: {}),
|
|
1473
1494
|
}),
|
|
1474
|
-
prepareArguments: (args) =>
|
|
1495
|
+
prepareArguments: (args) => canonicalSubagentTypeArgs(args, acceptedSubagentTypes(), generalPurposeShadowed),
|
|
1496
|
+
validateInput: (args) => {
|
|
1497
|
+
const refusal = subagentTypeRefusal(args.subagent_type, acceptedSubagentTypes());
|
|
1498
|
+
return refusal === undefined ? { ok: true } : { ok: false, message: refusal.content, code: refusal.error };
|
|
1499
|
+
},
|
|
1475
1500
|
execute: async (args, ctx) => {
|
|
1476
|
-
const a =
|
|
1501
|
+
const a = canonicalSubagentTypeArgs(args, acceptedSubagentTypes(), generalPurposeShadowed);
|
|
1477
1502
|
const parentSpecSeat = parentSpecSeatOfCtx(ctx);
|
|
1478
1503
|
const reviveClaim = ctx.reviveClaim;
|
|
1479
1504
|
if (reviveClaim !== undefined && opts.background === undefined) {
|
|
@@ -1487,31 +1512,10 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1487
1512
|
if (!prompt) {
|
|
1488
1513
|
return notStartedResult({ isError: true, content: "Sub-agent not started: 'prompt' was empty.", details: { error: "empty prompt" } });
|
|
1489
1514
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
details: { error: "unknown subagent_type" },
|
|
1495
|
-
});
|
|
1496
|
-
}
|
|
1497
|
-
const requestedType = a.subagent_type ?? "";
|
|
1498
|
-
let rawType = requestedType;
|
|
1499
|
-
if (requestedType !== "") {
|
|
1500
|
-
const accepted = acceptedSubagentTypes();
|
|
1501
|
-
if (!accepted.includes(requestedType)) {
|
|
1502
|
-
const wanted = normalizeSubagentType(requestedType);
|
|
1503
|
-
const hits = wanted === "" ? [] : accepted.filter((n) => normalizeSubagentType(n) === wanted);
|
|
1504
|
-
if (hits.length > 1) {
|
|
1505
|
-
return notStartedResult({
|
|
1506
|
-
isError: true,
|
|
1507
|
-
content: `Sub-agent not started: subagent_type "${requestedType}" is ambiguous — it matches ${hits.join(", ")}. Use the exact name.`,
|
|
1508
|
-
details: { error: "ambiguous subagent_type" },
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
if (hits.length === 1)
|
|
1512
|
-
rawType = hits[0];
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
+
const typeRefusal = subagentTypeRefusal(a.subagent_type, acceptedSubagentTypes());
|
|
1516
|
+
if (typeRefusal !== undefined)
|
|
1517
|
+
return notStartedResult({ isError: true, content: typeRefusal.content, details: { error: typeRefusal.error } });
|
|
1518
|
+
const rawType = typeof a.subagent_type === "string" ? a.subagent_type : "";
|
|
1515
1519
|
const wantsFork = forkOffered && rawType === FORK_SUBAGENT_TYPE;
|
|
1516
1520
|
if (reviveClaim !== undefined && wantsFork) {
|
|
1517
1521
|
return notStartedResult({ isError: true, content: `Sub-agent not revived: a "${FORK_SUBAGENT_TYPE}" agent cannot be revived — launch a new agent with the needed context instead.`, details: { error: "revive.fork_unsupported" } });
|
|
@@ -1520,13 +1524,6 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1520
1524
|
const def = hasAgents && !wantsFork && !omitted ? agentMap.get(rawType) : undefined;
|
|
1521
1525
|
const wantsBackground = opts.background !== undefined && (a.run_in_background !== false || def?.background === true);
|
|
1522
1526
|
const spawnAgentType = wantsFork ? FORK_SUBAGENT_TYPE : omitted ? GENERAL_PURPOSE_SUBAGENT_TYPE : rawType;
|
|
1523
|
-
if (!def && !wantsFork && !omitted) {
|
|
1524
|
-
return notStartedResult({
|
|
1525
|
-
isError: true,
|
|
1526
|
-
content: `Sub-agent not started: unknown subagent_type "${rawType}". Available subagent_type values: ${acceptedSubagentTypes().join(", ")}.`,
|
|
1527
|
-
details: { error: "unknown subagent_type" },
|
|
1528
|
-
});
|
|
1529
|
-
}
|
|
1530
1527
|
const allowFlaw = toolNameListFlaw(delegationListWhere(toolName, def?.name), "allowed", def !== undefined ? def.allowTools : opts.allowTools);
|
|
1531
1528
|
if (allowFlaw !== undefined)
|
|
1532
1529
|
return notStartedResult({ isError: true, content: `Sub-agent not started: ${inlineUntrusted(allowFlaw, 480)}`, details: { error: "config.agent.unknown_tool" } });
|
|
@@ -1922,6 +1919,7 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1922
1919
|
...(ctx.getApiKeyAndHeaders !== undefined ? { getApiKeyAndHeaders: ctx.getApiKeyAndHeaders } : {}),
|
|
1923
1920
|
...(ctx.checkpointStoreForChildren !== undefined ? { checkpointStore: ctx.checkpointStoreForChildren } : {}),
|
|
1924
1921
|
tools: [reportTool],
|
|
1922
|
+
...(parentSpecSeat?.advisorModel !== undefined ? { excludeTools: [ADVISOR_TOOL_NAME] } : {}),
|
|
1925
1923
|
...(ctx.deferTools !== undefined ? { deferTools: [...ctx.deferTools] } : {}),
|
|
1926
1924
|
...(ctx.alwaysLoadTools !== undefined ? { alwaysLoadTools: [...ctx.alwaysLoadTools] } : {}),
|
|
1927
1925
|
...(ctx.restoreGatedTools !== undefined ? { restoreGatedTools: ctx.restoreGatedTools === true ? true : [...ctx.restoreGatedTools] } : {}),
|
|
@@ -1942,6 +1940,7 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
1942
1940
|
const observerGate = parentGate === undefined
|
|
1943
1941
|
? undefined
|
|
1944
1942
|
: {
|
|
1943
|
+
...(parentGate.ancestorRules !== undefined ? { ancestorRules: parentGate.ancestorRules } : {}),
|
|
1945
1944
|
...(parentGate.permissionMode !== undefined ? { permissionMode: parentGate.permissionMode } : {}),
|
|
1946
1945
|
...(parentGate.permissionModeCeiling !== undefined ? { permissionModeCeiling: parentGate.permissionModeCeiling } : {}),
|
|
1947
1946
|
...(parentGate.shellGate !== undefined ? { shellGate: parentGate.shellGate } : {}),
|
|
@@ -2423,7 +2422,7 @@ function createSubagentToolNode(opts, depth, excluded, extraToolsBudget) {
|
|
|
2423
2422
|
const forkInternals = { ...childInternals, insideFork: true, ...(ctx.reminderMark !== undefined ? { reminderMark: ctx.reminderMark } : {}) };
|
|
2424
2423
|
stepRecorder.lockTo(forkedId);
|
|
2425
2424
|
const forkWorktreeNote = worktreeDir !== undefined ? forkWorktreeTranslationNote(ctx.parentCwd, worktreeDir) : undefined;
|
|
2426
|
-
const forkObjective = `${FORK_DIRECTIVE_FRAME}${prompt}${forkWorktreeNote !== undefined ? `\n\n${forkWorktreeNote}` : ""}`;
|
|
2425
|
+
const forkObjective = `${FORK_DIRECTIVE_FRAME}${prompt}${forkWorktreeNote !== undefined ? `\n\n${forkWorktreeNote}` : ""}${parentSpecSeat?.advisorModel !== undefined ? `\n\n${ADVISOR_FORK_SENTENCE}` : ""}`;
|
|
2427
2426
|
if (wantsBackground) {
|
|
2428
2427
|
const bg = opts.background;
|
|
2429
2428
|
const notify = ctx.onTaskNotification ?? bg.notify;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AgentDefinition, ToolSpec } from "../core/types.js";
|
|
2
2
|
import { type ToolLegKind, type ToolSelector, type ToolSelectorLayer } from "../core/tool-face.js";
|
|
3
|
-
import { type ProtocolId } from "../core/protocol-table.js";
|
|
4
3
|
import { type ToolNameListReading } from "../core/tool-name-list.js";
|
|
5
4
|
/**
|
|
6
5
|
* The tool selector (design/38 1A, one operation since #1623): what tools a run may use, read once over the universe it can get
|
|
@@ -10,27 +9,23 @@ import { type ToolNameListReading } from "../core/tool-name-list.js";
|
|
|
10
9
|
* run that spawned it), so there is no spawn-time filter and no complement anywhere.
|
|
11
10
|
*
|
|
12
11
|
* - an allowed list absent, or holding `"*"` (any spelling the rule syntax reads as it: `*()`, `*(*)`), sets no allowlist on
|
|
13
|
-
* its layer; otherwise the layer keeps only what it names
|
|
14
|
-
* (`[]` keeps nothing — intentional, not a mistake);
|
|
12
|
+
* its layer; otherwise the layer keeps only what it names (`[]` keeps nothing — intentional);
|
|
15
13
|
* - a denied list removes what it names from whatever remains (a denied tool always loses);
|
|
16
14
|
* - a layer above a run (its ceiling) bounds it: a child's `"*"` never widens what its parent could use.
|
|
17
15
|
*
|
|
18
|
-
* An entry is read by the rule syntax ({@link readDeniedEntry}
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* Judged at the prepare that receives it: a spelling no tool name can have is refused, an unknown name told (`sub-agent-deny-lists.ts`).
|
|
16
|
+
* An entry is read by the rule syntax ({@link readDeniedEntry}); a protocol spelling (`mcp__srv`, `mcp__srv__*`, a glob over the
|
|
17
|
+
* tool segment) reaches the tools of that peer, including ones it lists later; an entry no tool answers to is kept by name and
|
|
18
|
+
* reaches one mounted later. Judged at the prepare that receives it (`sub-agent-deny-lists.ts`).
|
|
22
19
|
*
|
|
23
|
-
* `"*"` in an allowed list is the "allow all" sentinel and never a name
|
|
24
|
-
* contract, `caller-tool-name.ts`, refuses it at the mount; engine and protocol-minted names never are).
|
|
20
|
+
* `"*"` in an allowed list is the "allow all" sentinel and never a name (`caller-tool-name.ts` refuses it at the mount).
|
|
25
21
|
*/
|
|
26
22
|
/**
|
|
27
23
|
* How ONE denied-tools entry is read — by the rule syntax's own test of a rule spelling (`ruleSpellingOf`, the one every entry
|
|
28
24
|
* list's reader asks), exactly as written: `Tool(content)` names `Tool` (the content is not read here, so the whole tool is
|
|
29
25
|
* hidden), `Tool()` and `Tool(*)` are the bare name. An entry the syntax cannot read — surrounding whitespace, a tool name
|
|
30
26
|
* outside its spelling (a blank or an invisible character before the `(`, a leading `-`), a parenthesis that does not close
|
|
31
|
-
* the entry — names no tool: `unreadable`, the entry as written. A value that is not a string
|
|
32
|
-
*
|
|
33
|
-
* value is read, converted or printed — `typeof` and the array test only.
|
|
27
|
+
* the entry — names no tool: `unreadable`, the entry as written. A value that is not a string names no tool either: it reads as
|
|
28
|
+
* `not_a_string` with a fixed label of its TYPE, and nothing about the value is read, converted or printed.
|
|
34
29
|
*/
|
|
35
30
|
export type DeniedEntryReading = {
|
|
36
31
|
readonly kind: "name";
|
|
@@ -57,9 +52,9 @@ export declare function notAListSentence(where: string, side: ToolNameListSide,
|
|
|
57
52
|
export declare function delegationListWhere(toolName: string, definitionName: string | undefined): string;
|
|
58
53
|
/**
|
|
59
54
|
* The digest of a run's own two tool lists as its selector reads them (an absent denied list reads as an empty one): sha256 over the
|
|
60
|
-
* binding serializer's canonical form
|
|
61
|
-
*
|
|
62
|
-
*
|
|
55
|
+
* binding serializer's canonical form. It is the evidence that the spawning run judged EXACTLY these lists
|
|
56
|
+
* (`RunInternals.toolListsJudged`, and the row's `CheckpointState.toolListsJudged` on a resume); `undefined` for lists the
|
|
57
|
+
* serializer cannot encode, which therefore never match any evidence.
|
|
63
58
|
*/
|
|
64
59
|
export declare function toolListsDigest(allow: readonly unknown[] | undefined, deny: readonly unknown[] | undefined): string | undefined;
|
|
65
60
|
/**
|
|
@@ -67,46 +62,36 @@ export declare function toolListsDigest(allow: readonly unknown[] | undefined, d
|
|
|
67
62
|
* of strings. The one reading the judgment before the run and the spawn-time check of a tool that never went through prepare share.
|
|
68
63
|
*/
|
|
69
64
|
export declare function toolNameListFlaw(where: string, side: ToolNameListSide, value: unknown): string | undefined;
|
|
70
|
-
/** A definition with its two tool-name lists replaced by their one copy — the copy every later reader
|
|
71
|
-
* run, the roster, the filter at each spawn) takes instead of the host's container. */
|
|
65
|
+
/** A definition with its two tool-name lists replaced by their one copy — the copy every later reader takes instead of the host's container. */
|
|
72
66
|
export declare function snapshotDefinitionLists(def: AgentDefinition): AgentDefinition;
|
|
73
67
|
/**
|
|
74
|
-
* What ONE tool-name list reaches — the single reading every consumer of an allowed or a denied list takes
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* - `covering`: the protocol spellings that cover a SET — a peer (`mcp__srv`), the same set written with the star
|
|
78
|
-
* (`mcp__srv__*`), a glob over the tool segment (`mcp__srv__get_*`) — matched by the allow layer's own covering matcher,
|
|
79
|
-
* peers compared exactly, both sides in the same namespace;
|
|
80
|
-
* - `wholeProtocols`: a denied list's `mcp__*` — every tool of that protocol. An allowed list reads it as nothing (the
|
|
81
|
-
* reference's allow resolution has no such form: it keeps no MCP tool by it).
|
|
68
|
+
* What ONE tool-name list reaches — the single reading every consumer of an allowed or a denied list takes: `names` are exact
|
|
69
|
+
* spellings (a tool answers to its wire name and every alias it declares); `covering` the protocol spellings that cover a SET
|
|
70
|
+
* (`mcp__srv`, `mcp__srv__*`, `mcp__srv__get_*`; on a denied list also `mcp__*` / `mcp__*__*`, which an allowed list reads as nothing).
|
|
82
71
|
*/
|
|
83
72
|
export interface ToolNameListReach {
|
|
84
73
|
readonly names: ReadonlySet<string>;
|
|
85
74
|
readonly covering: readonly string[];
|
|
86
|
-
readonly wholeProtocols: ReadonlySet<ProtocolId>;
|
|
87
75
|
}
|
|
88
76
|
/**
|
|
89
77
|
* The tool ONE entry of a list on `side` reaches ({@link readDeniedEntry}) — the one per-entry reading every list reader takes:
|
|
90
|
-
* `Tool()` / `Tool(*)` are the bare `Tool
|
|
91
|
-
*
|
|
78
|
+
* `Tool()` / `Tool(*)` are the bare `Tool`; a denied `Tool(content)` hides the whole `Tool`; an allowed one, an unreadable entry
|
|
79
|
+
* or a non-string reaches nothing (`undefined`).
|
|
92
80
|
*/
|
|
93
81
|
export declare function toolNameOfEntry(entry: unknown, side: ToolNameListSide): string | undefined;
|
|
94
82
|
/**
|
|
95
|
-
* Is this entry a bare tool name as the rule syntax reads it, written as such (`Read`, `mcp__srv__*`, `*`; never `Read()
|
|
96
|
-
* `Read(
|
|
97
|
-
*/
|
|
83
|
+
* Is this entry a bare tool name as the rule syntax reads it, written as such (`Read`, `mcp__srv__*`, `*`; never `Read()` or
|
|
84
|
+
* `Read(x)`)? The one form a checkpoint row records and is read back in. */
|
|
98
85
|
export declare function isCanonicalToolName(entry: unknown): boolean;
|
|
99
86
|
/**
|
|
100
|
-
* A tool-name list as a checkpoint row records it: each entry as {@link toolNameOfEntry} reads it, in canonical spelling
|
|
101
|
-
* allowed entry that admits nothing left out
|
|
102
|
-
*
|
|
87
|
+
* A tool-name list as a checkpoint row records it: each entry as {@link toolNameOfEntry} reads it, in canonical spelling
|
|
88
|
+
* ({@link isCanonicalToolName}), an allowed entry that admits nothing left out. An unreadable entry stays as written: prepare
|
|
89
|
+
* refuses it before the park, the reader again.
|
|
103
90
|
*/
|
|
104
91
|
export declare function persistedToolNameList(entries: readonly string[], side: ToolNameListSide): string[];
|
|
105
92
|
/**
|
|
106
|
-
* What an allowed-tools value admits, or `undefined` when it names no allowlist: absent, `null`, or a list holding the
|
|
107
|
-
*
|
|
108
|
-
* is not a string admits nothing); a value that is not a list admits NOTHING — the judge before the run refuses it, and a
|
|
109
|
-
* reader that meets it first fails closed.
|
|
93
|
+
* What an allowed-tools value admits, or `undefined` when it names no allowlist: absent, `null`, or a list holding the wildcard
|
|
94
|
+
* ({@link toolNameOfEntry} reads `*`, `*()`, `*(*)` as it). A value that is not a list admits NOTHING (refused before the run).
|
|
110
95
|
*/
|
|
111
96
|
export declare function readAllowedToolList(allowTools: unknown): ToolNameListReach | undefined;
|
|
112
97
|
/** What a denied value hides: its string entries read as {@link readDeniedEntry} reads them (an entry it reads as `unreadable` or not a string, or a value that is not a list, hides nothing here — the judgment before the run refuses each). */
|
|
@@ -132,17 +117,15 @@ export declare function isToolSelectorLayer(layer: unknown): layer is ToolSelect
|
|
|
132
117
|
/**
|
|
133
118
|
* Compile ONE run's tool selector from its layers (the ceiling it was spawned under, then its own lists — the LAST layer is its own)
|
|
134
119
|
* and the kinds of leg it is. Each list is read by the one reading ({@link readAllowedToolList} / {@link readDeniedToolList}) and
|
|
135
|
-
* matched by the one matcher ({@link listReaches}); a protocol tool of one of `legs` is admitted whatever the leg's own lists say
|
|
136
|
-
* and whatever the ceiling says
|
|
137
|
-
* the ceiling layers decide it. Whether a list may reach a protocol tool at all is judged at prepare.
|
|
138
|
-
* the producer passes frozen copies of the lists it read.
|
|
120
|
+
* matched by the one matcher ({@link listReaches}); a protocol tool of one of `legs` is admitted whatever the leg's own lists say,
|
|
121
|
+
* and whatever the ceiling says unless a kind of its row shares its spawner's tool surface ({@link protocolRowUnderCeiling}), when
|
|
122
|
+
* the ceiling layers decide it. Whether a list may reach a protocol tool at all is judged at prepare.
|
|
139
123
|
*/
|
|
140
124
|
export declare function compileToolSelector(layers: readonly ToolSelectorLayer[], legs?: readonly ToolLegKind[]): ToolSelector;
|
|
141
125
|
/**
|
|
142
126
|
* What a leg's tool valve leaves mounted — its one reading: nothing under the run's whole-face switch (`excludeAllTools`: every
|
|
143
127
|
* tool unmounts, protocol tools included), else what the compiled selector admits. The valve unmounts by it, and every question
|
|
144
|
-
* prepare asks about the post-valve roster before the valve runs
|
|
145
|
-
* persistence verdict, the two memory pairs' planning) asks it too.
|
|
128
|
+
* prepare asks about the post-valve roster before the valve runs asks it too.
|
|
146
129
|
*/
|
|
147
130
|
export declare function valveLeaves(spec: {
|
|
148
131
|
readonly excludeAllTools?: true;
|
|
@@ -150,8 +133,8 @@ export declare function valveLeaves(spec: {
|
|
|
150
133
|
/**
|
|
151
134
|
* The valve's reading at the SERVER level — {@link valveLeaves} asked of a whole peer before any of its tools is known: can the valve
|
|
152
135
|
* leave a tool of the peer `prefix` (`mcp__srv__`) at all? Nothing under the run's whole-face switch; else what the compiled selector's
|
|
153
|
-
* lists can reach of the peer ({@link ToolSelector.admitsPeer}
|
|
154
|
-
*
|
|
136
|
+
* lists can reach of the peer ({@link ToolSelector.admitsPeer}). A peer answered `false` leaves no tool on the roster, so a run has no
|
|
137
|
+
* reason to dial it or to teach its instructions.
|
|
155
138
|
*/
|
|
156
139
|
export declare function valveLeavesPeer(spec: {
|
|
157
140
|
readonly excludeAllTools?: true;
|
|
@@ -3,9 +3,8 @@ import { canonicalize, UNCANONICALIZABLE } from "../core/canonical-json.js";
|
|
|
3
3
|
import { SPAWNER_SURFACE_LEG_KINDS } from "../core/tool-face.js";
|
|
4
4
|
import { ruleSpellingOf } from "../core/permission-rule-syntax.js";
|
|
5
5
|
import { TOOL_CATALOG_ENTRIES } from "../core/tool-catalog-entries.js";
|
|
6
|
-
import { isNamespacedCoveringRuleName, namespacedRuleNameCovers } from "../core/namespaced-rule-name.js";
|
|
7
|
-
import {
|
|
8
|
-
import { splitNamespacedName } from "../core/tool-name-aliases.js";
|
|
6
|
+
import { isNamespacedCoveringRuleName, namespacedRuleNameCovers, namespacedRuleReachInto } from "../core/namespaced-rule-name.js";
|
|
7
|
+
import { splitNamespacedName, wholeProtocolOf } from "../core/tool-name-aliases.js";
|
|
9
8
|
import { readToolNameList, snapshotToolNameList, valueTypeLabel } from "../core/tool-name-list.js";
|
|
10
9
|
export function readDeniedEntry(entry) {
|
|
11
10
|
if (typeof entry !== "string")
|
|
@@ -72,23 +71,16 @@ export function persistedToolNameList(entries, side) {
|
|
|
72
71
|
function reachOf(entries, side) {
|
|
73
72
|
const names = new Set();
|
|
74
73
|
const covering = [];
|
|
75
|
-
const wholeProtocols = new Set();
|
|
76
74
|
for (const entry of entries) {
|
|
77
75
|
const name = toolNameOfEntry(entry, side);
|
|
78
76
|
if (name === undefined)
|
|
79
77
|
continue;
|
|
80
|
-
|
|
81
|
-
if (split !== undefined && split.tool === undefined && split.peer === "*") {
|
|
82
|
-
if (side === "denied")
|
|
83
|
-
wholeProtocols.add(split.ns.id);
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (isNamespacedCoveringRuleName(name))
|
|
78
|
+
if (isNamespacedCoveringRuleName(name, side === "denied" ? "deny" : "allow"))
|
|
87
79
|
covering.push(name);
|
|
88
|
-
else
|
|
80
|
+
else if (wholeProtocolOf(name) === undefined)
|
|
89
81
|
names.add(name);
|
|
90
82
|
}
|
|
91
|
-
return { names, covering
|
|
83
|
+
return { names, covering };
|
|
92
84
|
}
|
|
93
85
|
export function readAllowedToolList(allowTools) {
|
|
94
86
|
if (allowTools === undefined || allowTools === null)
|
|
@@ -111,11 +103,6 @@ export function listReaches(reach, tool) {
|
|
|
111
103
|
for (const pattern of reach.covering)
|
|
112
104
|
if (namespacedRuleNameCovers(pattern, spelling))
|
|
113
105
|
return true;
|
|
114
|
-
if (reach.wholeProtocols.size > 0) {
|
|
115
|
-
const ns = protocolOf(spelling);
|
|
116
|
-
if (ns !== undefined && reach.wholeProtocols.has(ns.id))
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
106
|
}
|
|
120
107
|
return false;
|
|
121
108
|
}
|
|
@@ -127,21 +114,11 @@ export function protocolToolNames(legs) {
|
|
|
127
114
|
return [...new Set(PROTOCOL_ROWS.filter((r) => r.legs.some((l) => legs.includes(l))).map((r) => r.name))];
|
|
128
115
|
}
|
|
129
116
|
function reachTouchesPeer(reach, peer) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const inPeer = (spelling) => {
|
|
133
|
-
const split = splitNamespacedName(spelling);
|
|
134
|
-
return split !== undefined && split.ns.id === peer.ns && split.peer === peer.peer;
|
|
135
|
-
};
|
|
136
|
-
return [...reach.names].some(inPeer) || reach.covering.some(inPeer);
|
|
117
|
+
const into = (spelling) => namespacedRuleReachInto(spelling, peer.ns, peer.peer) !== "none";
|
|
118
|
+
return [...reach.names].some(into) || reach.covering.some(into);
|
|
137
119
|
}
|
|
138
120
|
function reachCoversPeer(reach, peer) {
|
|
139
|
-
|
|
140
|
-
return true;
|
|
141
|
-
return reach.covering.some((pattern) => {
|
|
142
|
-
const split = splitNamespacedName(pattern);
|
|
143
|
-
return split !== undefined && split.ns.id === peer.ns && split.peer === peer.peer && (split.tool === undefined || split.tool === "*");
|
|
144
|
-
});
|
|
121
|
+
return reach.covering.some((pattern) => namespacedRuleReachInto(pattern, peer.ns, peer.peer) === "all");
|
|
145
122
|
}
|
|
146
123
|
export function isToolSelectorLayer(layer) {
|
|
147
124
|
return typeof layer === "object" && layer !== null && !Array.isArray(layer);
|
package/dist/agents/verify.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ import type { ModelRef, TaskResult, TaskSpec, TaskStatus, ToolSpec } from "../co
|
|
|
7
7
|
* an implementation task and tries to BREAK it — read-only, evidence-required, returning a structured
|
|
8
8
|
* verdict — then the gate loops fix→re-verify until PASS or a round cap.
|
|
9
9
|
*
|
|
10
|
-
* PROVENANCE (2026-07-14; re-verified and CORRECTED
|
|
10
|
+
* PROVENANCE (2026-07-14; re-verified and CORRECTED): distilled and de-branded from the
|
|
11
11
|
* MIT-era upstream source's dedicated `verification` agent — which was an Anthropic-internal A/B experiment
|
|
12
|
-
* (third-party default OFF) and has since been RETIRED upstream:
|
|
12
|
+
* (third-party default OFF) and has since been RETIRED upstream: later releases ship NO verification
|
|
13
13
|
* agent. The current upstream completion-gate shape is (a) the Stop hook (`decision:"block"` + reason fed
|
|
14
14
|
* back — sema's Stop hook is at full parity) and (b) — corrected — NOT a bundled skill. There is no built-in
|
|
15
15
|
* `verify` skill in the 220 corpus. What 220 ships is an INSTRUCTION TO CREATE ONE PER PROJECT: its memory
|
|
16
|
-
* prompt
|
|
16
|
+
* prompt forbids creating project skills ("never create one — a new project skill
|
|
17
17
|
* silently shadows a same-named built-in skill") and makes exactly one exception — "The single exception is
|
|
18
18
|
* verify, because how a project verifies changes is project-specific: put a verify correction in the
|
|
19
19
|
* `.claude/skills/verify/ SKILL.md` closest to the code it covers … and if that file does not exist, create
|
package/dist/brain/anthropic.js
CHANGED
|
@@ -9,6 +9,7 @@ import { errorResultMediaNote, IMAGE_OMITTED_NO_VISION, modelSupportsVision, sen
|
|
|
9
9
|
import { ANTHROPIC_RESERVED, OUTPUT_CAP_KEYS, applyExtraBody, effectiveOutputCap, headerBagOnce, lockHeader, mergeHeaders, takeHeaderCasefold } from "./request-params.js";
|
|
10
10
|
import { admitRouteRequest, applyRouteCredentialHeaders, assertServableRequestRoot, brainConfigSnapshot, createBrainRouteJudge, joinRequestUrl, resolveRequestRootOf, resolveRouteCredential } from "./route-adjudicator.js";
|
|
11
11
|
import { requestRouteOf } from "./request-route.js";
|
|
12
|
+
import { NAMES_AS_WRITTEN, resolveProviderDialect, endpointToolNames } from "./provider-dialect.js";
|
|
12
13
|
import { MIN_THINKING_TOKENS, budgetCapSkipsThinking, declaredEffortLevels, reasoningBudgetShare, reasoningRequestCarried, resolveEffort } from "./reasoning.js";
|
|
13
14
|
import { runStreamingBrain } from "./stream-engine.js";
|
|
14
15
|
import { refuseRetiredTimeoutKnobs } from "./timeout.js";
|
|
@@ -49,7 +50,7 @@ function toUserBlocks(content, supportsVision = true) {
|
|
|
49
50
|
emitBrainTelemetry({ kind: "vision_placeholder", count: omitted });
|
|
50
51
|
return blocks;
|
|
51
52
|
}
|
|
52
|
-
function toAnthropicMessages(ctx, model) {
|
|
53
|
+
function toAnthropicMessages(ctx, model, toolNames) {
|
|
53
54
|
const supportsVision = modelSupportsVision(model);
|
|
54
55
|
const raw = [];
|
|
55
56
|
let pendingDocs = [];
|
|
@@ -86,7 +87,7 @@ function toAnthropicMessages(ctx, model) {
|
|
|
86
87
|
blocks.push({ type: "text", text: c.text });
|
|
87
88
|
}
|
|
88
89
|
else if (c.type === "toolCall") {
|
|
89
|
-
blocks.push({ type: "tool_use", id: providerToolCallId(c), name: c.name, input: c.arguments ?? {} });
|
|
90
|
+
blocks.push({ type: "tool_use", id: providerToolCallId(c), name: toolNames.sent(c.name), input: c.arguments ?? {} });
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
raw.push({ role: "assistant", content: blocks.length ? blocks : [{ type: "text", text: NO_CONTENT }] });
|
|
@@ -155,12 +156,12 @@ function toAnthropicMessages(ctx, model) {
|
|
|
155
156
|
}
|
|
156
157
|
return merged;
|
|
157
158
|
}
|
|
158
|
-
function toAnthropicTools(ctx, cacheBreakpoints) {
|
|
159
|
+
function toAnthropicTools(ctx, cacheBreakpoints, toolNames) {
|
|
159
160
|
if (!ctx.tools || ctx.tools.length === 0) {
|
|
160
161
|
return undefined;
|
|
161
162
|
}
|
|
162
163
|
return ctx.tools.map((t, i) => ({
|
|
163
|
-
name: t.name,
|
|
164
|
+
name: toolNames.sent(t.name),
|
|
164
165
|
description: t.description,
|
|
165
166
|
input_schema: t.parameters,
|
|
166
167
|
...(cacheBreakpoints && i === ctx.tools.length - 1 ? { cache_control: EPHEMERAL } : {}),
|
|
@@ -238,6 +239,7 @@ export function createAnthropicBrain(given = {}) {
|
|
|
238
239
|
let thinkingRequested = false;
|
|
239
240
|
let sentMaxTokens;
|
|
240
241
|
let sentMaxTokensLane = "config-default";
|
|
242
|
+
let sentToolNames = NAMES_AS_WRITTEN;
|
|
241
243
|
return runStreamingBrain({
|
|
242
244
|
model,
|
|
243
245
|
doFetch,
|
|
@@ -249,6 +251,8 @@ export function createAnthropicBrain(given = {}) {
|
|
|
249
251
|
buildRequest: (overrides) => {
|
|
250
252
|
const routed = { id: model.id, baseUrl: model.baseUrl };
|
|
251
253
|
const { root, origin: rootOrigin } = resolveRequestRootOf(routed.baseUrl, config.baseUrl, ANTHROPIC_DEFAULT_BASE_URL);
|
|
254
|
+
const url = joinRequestUrl(root, "/v1/messages");
|
|
255
|
+
const builtToolNames = endpointToolNames(resolveProviderDialect(url, model.api), model.api, (context.tools ?? []).map((t) => t.name));
|
|
252
256
|
const modelHeaders = headerBagOnce(model.headers);
|
|
253
257
|
const optionsHeaders = headerBagOnce(options?.headers);
|
|
254
258
|
const routeCredential = resolveRouteCredential({
|
|
@@ -274,12 +278,12 @@ export function createAnthropicBrain(given = {}) {
|
|
|
274
278
|
const body = {
|
|
275
279
|
model: model.id,
|
|
276
280
|
max_tokens: overrides?.maxOutputTokens ?? options?.maxTokens ?? model.maxTokens ?? config.defaultMaxTokens ?? 4096,
|
|
277
|
-
messages: toAnthropicMessages(context, model),
|
|
281
|
+
messages: toAnthropicMessages(context, model, builtToolNames),
|
|
278
282
|
stream: true,
|
|
279
283
|
};
|
|
280
284
|
if (system)
|
|
281
285
|
body.system = system;
|
|
282
|
-
const tools = toAnthropicTools(context, cacheBreakpoints);
|
|
286
|
+
const tools = toAnthropicTools(context, cacheBreakpoints, builtToolNames);
|
|
283
287
|
if (tools)
|
|
284
288
|
body.tools = tools;
|
|
285
289
|
const anthCompat = (model.compat ?? {});
|
|
@@ -355,9 +359,9 @@ export function createAnthropicBrain(given = {}) {
|
|
|
355
359
|
: model.maxTokens !== undefined
|
|
356
360
|
? "model"
|
|
357
361
|
: "config-default";
|
|
358
|
-
const { body: wire, dropped: extraBodyDropped } = applyExtraBody(body, model
|
|
362
|
+
const { body: wire, dropped: extraBodyDropped } = applyExtraBody(body, model, ANTHROPIC_RESERVED);
|
|
359
363
|
return {
|
|
360
|
-
url
|
|
364
|
+
url,
|
|
361
365
|
headers,
|
|
362
366
|
body: JSON.stringify(wire),
|
|
363
367
|
extraBodyDropped,
|
|
@@ -369,6 +373,7 @@ export function createAnthropicBrain(given = {}) {
|
|
|
369
373
|
thinkingRequested = builtThinkingRequested;
|
|
370
374
|
sentMaxTokens = builtMaxTokens;
|
|
371
375
|
sentMaxTokensLane = builtMaxTokensLane;
|
|
376
|
+
sentToolNames = builtToolNames;
|
|
372
377
|
if (builtReasoningFacts !== undefined)
|
|
373
378
|
reportReasoningWireFacts(builtReasoningFacts);
|
|
374
379
|
},
|
|
@@ -540,7 +545,7 @@ export function createAnthropicBrain(given = {}) {
|
|
|
540
545
|
else if (cb.type === "tool_use") {
|
|
541
546
|
acc.type = "tool_use";
|
|
542
547
|
acc.toolId = cb.id ?? "";
|
|
543
|
-
acc.toolName = cb.name ?? "";
|
|
548
|
+
acc.toolName = sentToolNames.called(cb.name ?? "");
|
|
544
549
|
}
|
|
545
550
|
else {
|
|
546
551
|
acc.type = "text";
|
package/dist/brain/errors.d.ts
CHANGED
|
@@ -256,6 +256,21 @@ export declare function abortLikeName(err: unknown): "AbortError" | "TimeoutErro
|
|
|
256
256
|
* rather than testing `instanceof BrainError`, which walks a chain a revoked proxy traps — and the one
|
|
257
257
|
* site that did so sits in an async IIFE with no `.catch`. */
|
|
258
258
|
export declare function brainErrorCodeOf(e: unknown): BrainErrorCode | undefined;
|
|
259
|
+
/** What a thrown brain failure says about itself in machine words: its code, and the structural input-too-long cause
|
|
260
|
+
* its minter declared (or ruled out). Empty for a value that carries no brain code. */
|
|
261
|
+
export interface ThrownBrainFailure {
|
|
262
|
+
readonly code?: BrainErrorCode;
|
|
263
|
+
readonly errorKind?: "input_too_long";
|
|
264
|
+
readonly inputTooLongRuledOut?: true;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* The one reading of a thrown brain failure's structure: the code word ({@link brainErrorCodeOf}, never `instanceof`)
|
|
268
|
+
* and, only when the value carries a code, the input-too-long cause it was minted with — read by brand, so a value from
|
|
269
|
+
* another realm or behind a revoked proxy reads the same as a local `BrainError`. The stream engine's terminal shell and
|
|
270
|
+
* every caller that catches a brain call read it, so a failure that is thrown and one that is returned on a message
|
|
271
|
+
* carry the same facts.
|
|
272
|
+
*/
|
|
273
|
+
export declare function thrownBrainFailure(e: unknown): ThrownBrainFailure;
|
|
259
274
|
/** Render a transport-level error WITHOUT folding away its cause chain: undici rejects with
|
|
260
275
|
* `TypeError("fetch failed", { cause })` where the CAUSE carries the actionable fact, and the shell
|
|
261
276
|
* alone reads the same for refused / DNS / mid-stream disconnect. Walks the chain (bounded), appending
|
package/dist/brain/errors.js
CHANGED
|
@@ -247,6 +247,16 @@ export function brainErrorCodeOf(e) {
|
|
|
247
247
|
const code = readMember(e, "code");
|
|
248
248
|
return typeof code === "string" && BRAIN_ERROR_CODES.includes(code) ? code : undefined;
|
|
249
249
|
}
|
|
250
|
+
export function thrownBrainFailure(e) {
|
|
251
|
+
const code = brainErrorCodeOf(e);
|
|
252
|
+
if (code === undefined)
|
|
253
|
+
return {};
|
|
254
|
+
if (readMember(e, "inputTooLong") === true)
|
|
255
|
+
return { code, errorKind: "input_too_long" };
|
|
256
|
+
if (readMember(e, "inputTooLongRuledOut") === true)
|
|
257
|
+
return { code, inputTooLongRuledOut: true };
|
|
258
|
+
return { code };
|
|
259
|
+
}
|
|
250
260
|
export function describeNetworkError(e) {
|
|
251
261
|
const top = thrownText(e);
|
|
252
262
|
const parts = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* First-party model presets (design/119
|
|
2
|
+
* First-party model presets (design/119).
|
|
3
3
|
*
|
|
4
4
|
* sema stays caller-injects-`Model` by design (no baked catalog — the CC catalog/alias/family layer
|
|
5
5
|
* is a product surface we deliberately don't carry). What IS worth shipping is the per-model
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* (adaptive thinking form, effort tiers, temperature rejection) that a wrong guess turns into a
|
|
8
8
|
* hard 400. These presets are DATA, not mechanism — every field can be overridden by the caller.
|
|
9
9
|
*
|
|
10
|
-
* Pricing is deliberately NOT baked (
|
|
10
|
+
* Pricing is deliberately NOT baked (the reference doesn't bake it either): `cost` defaults to zeros and a
|
|
11
11
|
* deployment that wants cost accounting fills in the current official per-MTok rates.
|
|
12
12
|
*/
|
|
13
13
|
import type { AnthropicMessagesCompat, Model } from "../internal/llm.js";
|
|
14
14
|
/**
|
|
15
|
-
* The Fable-5-class Anthropic wire contract (
|
|
15
|
+
* The Fable-5-class Anthropic wire contract (capability bits, design/119 P0):
|
|
16
16
|
* - `thinkingMode: "adaptive"` — `thinking: { type: "adaptive" }`, NO budget_tokens (400 on budget).
|
|
17
17
|
* - `effortLevels` — the full five-tier `output_config.effort` range (fable-5 has `xhigh_effort` +
|
|
18
18
|
* `max_effort`; a model without those bits should declare a shorter list and higher requests clamp).
|
|
@@ -26,7 +26,7 @@ export declare const FABLE_5_COMPAT: AnthropicMessagesCompat;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const FABLE_5_PROMPT_GUIDANCE: readonly string[];
|
|
28
28
|
/**
|
|
29
|
-
* A ready-to-use `claude-fable-5` {@link Model} (
|
|
29
|
+
* A ready-to-use `claude-fable-5` {@link Model} (registry facts: 1M-token native context
|
|
30
30
|
* window, 64k default max output — the 128k tier is opt-in via `maxTokens` override, knowledge
|
|
31
31
|
* cutoff Jan 2026, `default_effort: "high"`). Override anything per deployment; set `cost` for
|
|
32
32
|
* accounting (not baked — see module note).
|