@namzu/sdk 45.1.0 → 48.0.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 +436 -8
- package/README.md +7 -8
- package/dist/advisory/history.d.ts.map +1 -1
- package/dist/advisory/history.js +21 -1
- package/dist/advisory/history.js.map +1 -1
- package/dist/advisory/index.d.ts +1 -1
- package/dist/advisory/index.d.ts.map +1 -1
- package/dist/advisory/index.js +1 -1
- package/dist/advisory/index.js.map +1 -1
- package/dist/advisory/registry.d.ts +17 -0
- package/dist/advisory/registry.d.ts.map +1 -1
- package/dist/advisory/registry.js +26 -0
- package/dist/advisory/registry.js.map +1 -1
- package/dist/agents/PipelineAgent.d.ts +2 -46
- package/dist/agents/PipelineAgent.d.ts.map +1 -1
- package/dist/agents/PipelineAgent.js +2 -242
- package/dist/agents/PipelineAgent.js.map +1 -1
- package/dist/agents/QueryAgent.d.ts +21 -0
- package/dist/agents/QueryAgent.d.ts.map +1 -0
- package/dist/agents/QueryAgent.js +214 -0
- package/dist/agents/QueryAgent.js.map +1 -0
- package/dist/agents/ReactiveAgent.d.ts +4 -16
- package/dist/agents/ReactiveAgent.d.ts.map +1 -1
- package/dist/agents/ReactiveAgent.js +4 -183
- package/dist/agents/ReactiveAgent.js.map +1 -1
- package/dist/agents/RouterAgent.d.ts +2 -20
- package/dist/agents/RouterAgent.d.ts.map +1 -1
- package/dist/agents/RouterAgent.js +2 -266
- package/dist/agents/RouterAgent.js.map +1 -1
- package/dist/agents/SupervisorAgent.d.ts +3 -43
- package/dist/agents/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/SupervisorAgent.js +3 -418
- package/dist/agents/SupervisorAgent.js.map +1 -1
- package/dist/agents/defineAgent.d.ts +2 -1
- package/dist/agents/defineAgent.d.ts.map +1 -1
- package/dist/agents/defineAgent.js +6 -1
- package/dist/agents/defineAgent.js.map +1 -1
- package/dist/agents/examples/PipelineAgent.d.ts +46 -0
- package/dist/agents/examples/PipelineAgent.d.ts.map +1 -0
- package/dist/agents/examples/PipelineAgent.js +242 -0
- package/dist/agents/examples/PipelineAgent.js.map +1 -0
- package/dist/agents/examples/RouterAgent.d.ts +22 -0
- package/dist/agents/examples/RouterAgent.d.ts.map +1 -0
- package/dist/agents/examples/RouterAgent.js +268 -0
- package/dist/agents/examples/RouterAgent.js.map +1 -0
- package/dist/agents/examples/SupervisorAgent.d.ts +45 -0
- package/dist/agents/examples/SupervisorAgent.d.ts.map +1 -0
- package/dist/agents/examples/SupervisorAgent.js +406 -0
- package/dist/agents/examples/SupervisorAgent.js.map +1 -0
- package/dist/agents/explore.d.ts +6 -3
- package/dist/agents/explore.d.ts.map +1 -1
- package/dist/agents/explore.js +6 -3
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/forward-options.d.ts +11 -0
- package/dist/agents/forward-options.d.ts.map +1 -0
- package/dist/agents/forward-options.js +15 -0
- package/dist/agents/forward-options.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/runAgent.d.ts +19 -8
- package/dist/agents/runAgent.d.ts.map +1 -1
- package/dist/agents/runAgent.js +99 -29
- package/dist/agents/runAgent.js.map +1 -1
- package/dist/authorization/command-line.d.ts +2 -0
- package/dist/authorization/command-line.d.ts.map +1 -1
- package/dist/authorization/command-line.js +2 -2
- package/dist/authorization/command-line.js.map +1 -1
- package/dist/authorization/gate.d.ts +13 -2
- package/dist/authorization/gate.d.ts.map +1 -1
- package/dist/authorization/gate.js +37 -5
- package/dist/authorization/gate.js.map +1 -1
- package/dist/authorization/program.d.ts +151 -0
- package/dist/authorization/program.d.ts.map +1 -0
- package/dist/authorization/program.js +713 -0
- package/dist/authorization/program.js.map +1 -0
- package/dist/authorization/reexec-wrapper.d.ts +106 -0
- package/dist/authorization/reexec-wrapper.d.ts.map +1 -0
- package/dist/authorization/reexec-wrapper.js +532 -0
- package/dist/authorization/reexec-wrapper.js.map +1 -0
- package/dist/authorization/rules.d.ts +9 -0
- package/dist/authorization/rules.d.ts.map +1 -1
- package/dist/authorization/rules.js +27 -1
- package/dist/authorization/rules.js.map +1 -1
- package/dist/authorization/shell-lexer.d.ts +39 -0
- package/dist/authorization/shell-lexer.d.ts.map +1 -1
- package/dist/authorization/shell-lexer.js +113 -69
- package/dist/authorization/shell-lexer.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +6 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/capabilities/index.d.ts +54 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +92 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/config/registry.d.ts +2 -1
- package/dist/config/registry.d.ts.map +1 -1
- package/dist/config/registry.js +3 -2
- package/dist/config/registry.js.map +1 -1
- package/dist/connector/index.d.ts +4 -4
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +3 -3
- package/dist/connector/index.js.map +1 -1
- package/dist/connector/mcp/adapter.d.ts +16 -1
- package/dist/connector/mcp/adapter.d.ts.map +1 -1
- package/dist/connector/mcp/adapter.js +60 -4
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/connector/mcp/client.d.ts +13 -4
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +20 -3
- package/dist/connector/mcp/client.js.map +1 -1
- package/dist/connector/mcp/discovery.d.ts +24 -1
- package/dist/connector/mcp/discovery.d.ts.map +1 -1
- package/dist/connector/mcp/discovery.js +44 -0
- package/dist/connector/mcp/discovery.js.map +1 -1
- package/dist/connector/mcp/index.d.ts +2 -0
- package/dist/connector/mcp/index.d.ts.map +1 -1
- package/dist/connector/mcp/index.js +11 -0
- package/dist/connector/mcp/index.js.map +1 -1
- package/dist/connector/mcp/mcp-toolset.d.ts +133 -0
- package/dist/connector/mcp/mcp-toolset.d.ts.map +1 -0
- package/dist/connector/mcp/mcp-toolset.js +399 -0
- package/dist/connector/mcp/mcp-toolset.js.map +1 -0
- package/dist/connector/tools/index.d.ts +2 -2
- package/dist/connector/tools/index.d.ts.map +1 -1
- package/dist/connector/tools/index.js +1 -1
- package/dist/connector/tools/index.js.map +1 -1
- package/dist/connector/tools/router.d.ts +15 -13
- package/dist/connector/tools/router.d.ts.map +1 -1
- package/dist/connector/tools/router.js +30 -51
- package/dist/connector/tools/router.js.map +1 -1
- package/dist/contracts/a2a.d.ts +2 -2
- package/dist/directory/derive-supervisor.d.ts +2 -2
- package/dist/directory/derive-supervisor.d.ts.map +1 -1
- package/dist/directory/derive-supervisor.js +6 -7
- package/dist/directory/derive-supervisor.js.map +1 -1
- package/dist/directory/derive.d.ts.map +1 -1
- package/dist/directory/derive.js +5 -5
- package/dist/directory/derive.js.map +1 -1
- package/dist/execution/code-runtime/types.d.ts +2 -2
- package/dist/execution/code-runtime/types.js +1 -1
- package/dist/invariants/index.d.ts +2 -1
- package/dist/invariants/index.d.ts.map +1 -1
- package/dist/invariants/index.js +3 -2
- package/dist/invariants/index.js.map +1 -1
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +9 -0
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/connector/environment.d.ts +6 -0
- package/dist/manager/connector/environment.d.ts.map +1 -1
- package/dist/manager/connector/environment.js +11 -4
- package/dist/manager/connector/environment.js.map +1 -1
- package/dist/manager/connector/index.d.ts +2 -2
- package/dist/manager/connector/index.d.ts.map +1 -1
- package/dist/manager/connector/index.js +2 -2
- package/dist/manager/connector/index.js.map +1 -1
- package/dist/manager/connector/tenant.d.ts +6 -0
- package/dist/manager/connector/tenant.d.ts.map +1 -1
- package/dist/manager/connector/tenant.js +11 -4
- package/dist/manager/connector/tenant.js.map +1 -1
- package/dist/manager/index.d.ts +2 -2
- package/dist/manager/index.d.ts.map +1 -1
- package/dist/manager/index.js +2 -2
- package/dist/manager/index.js.map +1 -1
- package/dist/manager/resident/learning-observation.d.ts +4 -4
- package/dist/manager/resident/learning.d.ts +36 -36
- package/dist/manager/session/attribution.d.ts +22 -0
- package/dist/manager/session/attribution.d.ts.map +1 -0
- package/dist/manager/session/attribution.js +64 -0
- package/dist/manager/session/attribution.js.map +1 -0
- package/dist/manager/session/turn-recorder.d.ts +14 -0
- package/dist/manager/session/turn-recorder.d.ts.map +1 -1
- package/dist/manager/session/turn-recorder.js +208 -55
- package/dist/manager/session/turn-recorder.js.map +1 -1
- package/dist/peers/address.d.ts +36 -0
- package/dist/peers/address.d.ts.map +1 -0
- package/dist/peers/address.js +52 -0
- package/dist/peers/address.js.map +1 -0
- package/dist/peers/client.d.ts +47 -0
- package/dist/peers/client.d.ts.map +1 -0
- package/dist/peers/client.js +132 -0
- package/dist/peers/client.js.map +1 -0
- package/dist/peers/dir.d.ts +88 -0
- package/dist/peers/dir.d.ts.map +1 -0
- package/dist/peers/dir.js +139 -0
- package/dist/peers/dir.js.map +1 -0
- package/dist/peers/endpoint.d.ts +144 -0
- package/dist/peers/endpoint.d.ts.map +1 -0
- package/dist/peers/endpoint.js +420 -0
- package/dist/peers/endpoint.js.map +1 -0
- package/dist/peers/envelope.d.ts +42 -0
- package/dist/peers/envelope.d.ts.map +1 -0
- package/dist/peers/envelope.js +110 -0
- package/dist/peers/envelope.js.map +1 -0
- package/dist/peers/index.d.ts +30 -0
- package/dist/peers/index.d.ts.map +1 -0
- package/dist/peers/index.js +22 -0
- package/dist/peers/index.js.map +1 -0
- package/dist/peers/protocol.d.ts +645 -0
- package/dist/peers/protocol.d.ts.map +1 -0
- package/dist/peers/protocol.js +151 -0
- package/dist/peers/protocol.js.map +1 -0
- package/dist/peers/record.d.ts +71 -0
- package/dist/peers/record.d.ts.map +1 -0
- package/dist/peers/record.js +45 -0
- package/dist/peers/record.js.map +1 -0
- package/dist/peers/registry.d.ts +54 -0
- package/dist/peers/registry.d.ts.map +1 -0
- package/dist/peers/registry.js +213 -0
- package/dist/peers/registry.js.map +1 -0
- package/dist/plugin/define.d.ts +24 -0
- package/dist/plugin/define.d.ts.map +1 -0
- package/dist/plugin/define.js +42 -0
- package/dist/plugin/define.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +1 -0
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/lifecycle.d.ts +27 -3
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +242 -92
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/resolver.d.ts +2 -2
- package/dist/plugin/resolver.d.ts.map +1 -1
- package/dist/plugin/resolver.js.map +1 -1
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +17 -3
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/pricing/catalogue.generated.d.ts.map +1 -1
- package/dist/pricing/catalogue.generated.js +28 -4
- package/dist/pricing/catalogue.generated.js.map +1 -1
- package/dist/probe/errors.d.ts +2 -1
- package/dist/probe/errors.d.ts.map +1 -1
- package/dist/probe/errors.js +3 -2
- package/dist/probe/errors.js.map +1 -1
- package/dist/prompt/coding-agent-doctrine.d.ts +18 -7
- package/dist/prompt/coding-agent-doctrine.d.ts.map +1 -1
- package/dist/prompt/coding-agent-doctrine.js +11 -6
- package/dist/prompt/coding-agent-doctrine.js.map +1 -1
- package/dist/prompt/contributions.d.ts +4 -1
- package/dist/prompt/contributions.d.ts.map +1 -1
- package/dist/prompt/contributions.js +7 -2
- package/dist/prompt/contributions.js.map +1 -1
- package/dist/prompt/index.d.ts +1 -1
- package/dist/prompt/index.d.ts.map +1 -1
- package/dist/prompt/index.js +1 -1
- package/dist/prompt/index.js.map +1 -1
- package/dist/provider/collect-chat-completion.d.ts +6 -1
- package/dist/provider/collect-chat-completion.d.ts.map +1 -1
- package/dist/provider/collect-chat-completion.js +88 -10
- package/dist/provider/collect-chat-completion.js.map +1 -1
- package/dist/provider/mock.d.ts.map +1 -1
- package/dist/provider/mock.js +23 -6
- package/dist/provider/mock.js.map +1 -1
- package/dist/provider/registry.d.ts +2 -1
- package/dist/provider/registry.d.ts.map +1 -1
- package/dist/provider/registry.js +3 -2
- package/dist/provider/registry.js.map +1 -1
- package/dist/provider/tool-call-framing.d.ts +164 -0
- package/dist/provider/tool-call-framing.d.ts.map +1 -0
- package/dist/provider/tool-call-framing.js +163 -0
- package/dist/provider/tool-call-framing.js.map +1 -0
- package/dist/public-runtime.d.ts +27 -14
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +49 -11
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +9 -6
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +13 -5
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +16 -5
- package/dist/public-types.d.ts.map +1 -1
- package/dist/read-model/registry.d.ts +2 -1
- package/dist/read-model/registry.d.ts.map +1 -1
- package/dist/read-model/registry.js +3 -2
- package/dist/read-model/registry.js.map +1 -1
- package/dist/registry/ManagedRegistry.d.ts +30 -0
- package/dist/registry/ManagedRegistry.d.ts.map +1 -1
- package/dist/registry/ManagedRegistry.js +45 -6
- package/dist/registry/ManagedRegistry.js.map +1 -1
- package/dist/registry/collision.d.ts +57 -0
- package/dist/registry/collision.d.ts.map +1 -0
- package/dist/registry/collision.js +41 -0
- package/dist/registry/collision.js.map +1 -0
- package/dist/registry/command/index.d.ts +5 -3
- package/dist/registry/command/index.d.ts.map +1 -1
- package/dist/registry/command/index.js +6 -4
- package/dist/registry/command/index.js.map +1 -1
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +2 -2
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/plugin/index.d.ts.map +1 -1
- package/dist/registry/plugin/index.js +14 -1
- package/dist/registry/plugin/index.js.map +1 -1
- package/dist/registry/tool/callable.d.ts +22 -0
- package/dist/registry/tool/callable.d.ts.map +1 -0
- package/dist/registry/tool/callable.js +28 -0
- package/dist/registry/tool/callable.js.map +1 -0
- package/dist/registry/tool/execute.d.ts +14 -77
- package/dist/registry/tool/execute.d.ts.map +1 -1
- package/dist/registry/tool/execute.js +15 -720
- package/dist/registry/tool/execute.js.map +1 -1
- package/dist/registry/tool/portable.d.ts +25 -0
- package/dist/registry/tool/portable.d.ts.map +1 -1
- package/dist/registry/tool/portable.js +50 -0
- package/dist/registry/tool/portable.js.map +1 -1
- package/dist/registry/tool/presentation.d.ts +6 -5
- package/dist/registry/tool/presentation.d.ts.map +1 -1
- package/dist/registry/tool/presentation.js +3 -3
- package/dist/registry/tool/presentation.js.map +1 -1
- package/dist/runtime/bidi/session.d.ts +5 -4
- package/dist/runtime/bidi/session.d.ts.map +1 -1
- package/dist/runtime/bidi/session.js +18 -1
- package/dist/runtime/bidi/session.js.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts +82 -13
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +227 -17
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +37 -5
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +103 -14
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/file-evidence-replay.d.ts +1 -1
- package/dist/runtime/query/file-evidence-replay.d.ts.map +1 -1
- package/dist/runtime/query/file-evidence-replay.js +8 -7
- package/dist/runtime/query/file-evidence-replay.js.map +1 -1
- package/dist/runtime/query/fork/prepare.d.ts +4 -1
- package/dist/runtime/query/fork/prepare.d.ts.map +1 -1
- package/dist/runtime/query/fork/prepare.js +4 -0
- package/dist/runtime/query/fork/prepare.js.map +1 -1
- package/dist/runtime/query/guardrail-presets.d.ts +4 -3
- package/dist/runtime/query/guardrail-presets.d.ts.map +1 -1
- package/dist/runtime/query/guardrail-presets.js +4 -3
- package/dist/runtime/query/guardrail-presets.js.map +1 -1
- package/dist/runtime/query/index.d.ts +23 -10
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +149 -70
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +8 -1
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +2 -2
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +55 -2
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/iteration/stream-turn.d.ts.map +1 -1
- package/dist/runtime/query/iteration/stream-turn.js +342 -116
- package/dist/runtime/query/iteration/stream-turn.js.map +1 -1
- package/dist/runtime/query/iteration/tool-input.d.ts +79 -0
- package/dist/runtime/query/iteration/tool-input.d.ts.map +1 -0
- package/dist/runtime/query/iteration/tool-input.js +291 -0
- package/dist/runtime/query/iteration/tool-input.js.map +1 -0
- package/dist/runtime/query/observation-context.d.ts +2 -2
- package/dist/runtime/query/observation-context.d.ts.map +1 -1
- package/dist/runtime/query/observation-context.js.map +1 -1
- package/dist/runtime/query/prelude-lease.d.ts +18 -0
- package/dist/runtime/query/prelude-lease.d.ts.map +1 -0
- package/dist/runtime/query/prelude-lease.js +121 -0
- package/dist/runtime/query/prelude-lease.js.map +1 -0
- package/dist/runtime/query/prepare-turn.d.ts.map +1 -1
- package/dist/runtime/query/prepare-turn.js +386 -187
- package/dist/runtime/query/prepare-turn.js.map +1 -1
- package/dist/runtime/query/prompt-cache.d.ts +2 -2
- package/dist/runtime/query/prompt-cache.d.ts.map +1 -1
- package/dist/runtime/query/prompt.d.ts +2 -2
- package/dist/runtime/query/prompt.d.ts.map +1 -1
- package/dist/runtime/query/prompt.js +1 -1
- package/dist/runtime/query/prompt.js.map +1 -1
- package/dist/runtime/query/resume-session.d.ts.map +1 -1
- package/dist/runtime/query/resume-session.js +37 -2
- package/dist/runtime/query/resume-session.js.map +1 -1
- package/dist/runtime/query/review-policy.d.ts +65 -3
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +143 -22
- package/dist/runtime/query/review-policy.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +3 -2
- package/dist/runtime/query/tooling.d.ts.map +1 -1
- package/dist/runtime/query/tooling.js.map +1 -1
- package/dist/runtime/query/turn-state.d.ts.map +1 -1
- package/dist/runtime/query/turn-state.js +5 -0
- package/dist/runtime/query/turn-state.js.map +1 -1
- package/dist/runtime/system-events.d.ts +112 -0
- package/dist/runtime/system-events.d.ts.map +1 -0
- package/dist/runtime/system-events.js +183 -0
- package/dist/runtime/system-events.js.map +1 -0
- package/dist/scheduler/delegating.d.ts +2 -1
- package/dist/scheduler/delegating.d.ts.map +1 -1
- package/dist/scheduler/delegating.js +3 -2
- package/dist/scheduler/delegating.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/registry.d.ts +18 -0
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +20 -0
- package/dist/skills/registry.js.map +1 -1
- package/dist/store/evidence/index-page.d.ts +2 -2
- package/dist/store/session-log/conformance.d.ts +1 -1
- package/dist/store/session-log/conformance.d.ts.map +1 -1
- package/dist/store/session-log/conformance.js +49 -8
- package/dist/store/session-log/conformance.js.map +1 -1
- package/dist/store/session-log/core.d.ts +8 -3
- package/dist/store/session-log/core.d.ts.map +1 -1
- package/dist/store/session-log/core.js +2 -1
- package/dist/store/session-log/core.js.map +1 -1
- package/dist/store/session-log/fold.d.ts +12 -0
- package/dist/store/session-log/fold.d.ts.map +1 -1
- package/dist/store/session-log/fold.js +57 -7
- package/dist/store/session-log/fold.js.map +1 -1
- package/dist/store/session-log/index.d.ts +2 -2
- package/dist/store/session-log/index.d.ts.map +1 -1
- package/dist/store/session-log/index.js +1 -1
- package/dist/store/session-log/index.js.map +1 -1
- package/dist/test-support/toolset.d.ts +19 -0
- package/dist/test-support/toolset.d.ts.map +1 -0
- package/dist/test-support/toolset.js +20 -0
- package/dist/test-support/toolset.js.map +1 -0
- package/dist/tools/builtins/bash.d.ts +29 -0
- package/dist/tools/builtins/bash.d.ts.map +1 -1
- package/dist/tools/builtins/bash.js +19 -9
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/browser-url.d.ts +1 -1
- package/dist/tools/builtins/browser-url.js +1 -1
- package/dist/tools/builtins/browser.d.ts +6 -6
- package/dist/tools/builtins/computer-use-coordinates.d.ts +65 -0
- package/dist/tools/builtins/computer-use-coordinates.d.ts.map +1 -0
- package/dist/tools/builtins/computer-use-coordinates.js +123 -0
- package/dist/tools/builtins/computer-use-coordinates.js.map +1 -0
- package/dist/tools/builtins/computer-use-image.d.ts +77 -0
- package/dist/tools/builtins/computer-use-image.d.ts.map +1 -0
- package/dist/tools/builtins/computer-use-image.js +223 -0
- package/dist/tools/builtins/computer-use-image.js.map +1 -0
- package/dist/tools/builtins/computer-use.d.ts +519 -14
- package/dist/tools/builtins/computer-use.d.ts.map +1 -1
- package/dist/tools/builtins/computer-use.js +1196 -183
- package/dist/tools/builtins/computer-use.js.map +1 -1
- package/dist/tools/builtins/edit.d.ts.map +1 -1
- package/dist/tools/builtins/edit.js +9 -1
- package/dist/tools/builtins/edit.js.map +1 -1
- package/dist/tools/builtins/index.d.ts +2 -1
- package/dist/tools/builtins/index.d.ts.map +1 -1
- package/dist/tools/builtins/index.js +1 -1
- package/dist/tools/builtins/index.js.map +1 -1
- package/dist/tools/builtins/json-string-hint.d.ts +15 -0
- package/dist/tools/builtins/json-string-hint.d.ts.map +1 -0
- package/dist/tools/builtins/json-string-hint.js +17 -0
- package/dist/tools/builtins/json-string-hint.js.map +1 -0
- package/dist/tools/builtins/search-tools.d.ts.map +1 -1
- package/dist/tools/builtins/search-tools.js +7 -15
- package/dist/tools/builtins/search-tools.js.map +1 -1
- package/dist/tools/builtins/skill.d.ts +74 -0
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +214 -174
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/tools/builtins/write-file.d.ts.map +1 -1
- package/dist/tools/builtins/write-file.js +11 -0
- package/dist/tools/builtins/write-file.js.map +1 -1
- package/dist/tools/command-shell.d.ts +10 -0
- package/dist/tools/command-shell.d.ts.map +1 -1
- package/dist/tools/command-shell.js +45 -1
- package/dist/tools/command-shell.js.map +1 -1
- package/dist/tools/coordinator/agent.d.ts.map +1 -1
- package/dist/tools/coordinator/agent.js +5 -0
- package/dist/tools/coordinator/agent.js.map +1 -1
- package/dist/tools/coordinator/ask-user-question.d.ts.map +1 -1
- package/dist/tools/coordinator/ask-user-question.js +26 -13
- package/dist/tools/coordinator/ask-user-question.js.map +1 -1
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +5 -0
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/coordinator/question-options.d.ts +78 -0
- package/dist/tools/coordinator/question-options.d.ts.map +1 -0
- package/dist/tools/coordinator/question-options.js +153 -0
- package/dist/tools/coordinator/question-options.js.map +1 -0
- package/dist/tools/defineTool.d.ts +12 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +24 -0
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/memory/search.d.ts.map +1 -1
- package/dist/tools/memory/search.js +4 -1
- package/dist/tools/memory/search.js.map +1 -1
- package/dist/tools/memory/update.d.ts.map +1 -1
- package/dist/tools/memory/update.js +8 -5
- package/dist/tools/memory/update.js.map +1 -1
- package/dist/tools/render-nonce.d.ts +47 -0
- package/dist/tools/render-nonce.d.ts.map +1 -0
- package/dist/tools/render-nonce.js +63 -0
- package/dist/tools/render-nonce.js.map +1 -0
- package/dist/tools/roster.d.ts +46 -19
- package/dist/tools/roster.d.ts.map +1 -1
- package/dist/tools/roster.js +63 -33
- package/dist/tools/roster.js.map +1 -1
- package/dist/tools/schedules/present.d.ts.map +1 -1
- package/dist/tools/schedules/present.js +2 -0
- package/dist/tools/schedules/present.js.map +1 -1
- package/dist/tools/schedules/schedule-tool.d.ts +6 -5
- package/dist/tools/schedules/schedule-tool.d.ts.map +1 -1
- package/dist/tools/schedules/schedule-tool.js +208 -37
- package/dist/tools/schedules/schedule-tool.js.map +1 -1
- package/dist/tools/schedules/types.d.ts +120 -6
- package/dist/tools/schedules/types.d.ts.map +1 -1
- package/dist/tools/trusted-read-only.d.ts +9 -5
- package/dist/tools/trusted-read-only.d.ts.map +1 -1
- package/dist/tools/trusted-read-only.js +14 -10
- package/dist/tools/trusted-read-only.js.map +1 -1
- package/dist/tools/untrusted-envelope.d.ts +67 -28
- package/dist/tools/untrusted-envelope.d.ts.map +1 -1
- package/dist/tools/untrusted-envelope.js +108 -59
- package/dist/tools/untrusted-envelope.js.map +1 -1
- package/dist/toolsets/combine.d.ts +44 -0
- package/dist/toolsets/combine.d.ts.map +1 -0
- package/dist/toolsets/combine.js +153 -0
- package/dist/toolsets/combine.js.map +1 -0
- package/dist/toolsets/manager.d.ts +201 -0
- package/dist/toolsets/manager.d.ts.map +1 -0
- package/dist/toolsets/manager.js +837 -0
- package/dist/toolsets/manager.js.map +1 -0
- package/dist/toolsets/source-glob.d.ts +15 -0
- package/dist/toolsets/source-glob.d.ts.map +1 -0
- package/dist/toolsets/source-glob.js +23 -0
- package/dist/toolsets/source-glob.js.map +1 -0
- package/dist/toolsets/toolset.d.ts +20 -0
- package/dist/toolsets/toolset.d.ts.map +1 -0
- package/dist/toolsets/toolset.js +28 -0
- package/dist/toolsets/toolset.js.map +1 -0
- package/dist/toolsets/types.d.ts +128 -0
- package/dist/toolsets/types.d.ts.map +1 -0
- package/dist/toolsets/types.js +33 -0
- package/dist/toolsets/types.js.map +1 -0
- package/dist/toolsets/wrappers.d.ts +59 -0
- package/dist/toolsets/wrappers.d.ts.map +1 -0
- package/dist/toolsets/wrappers.js +165 -0
- package/dist/toolsets/wrappers.js.map +1 -0
- package/dist/types/agent/base.d.ts +27 -16
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/index.d.ts +1 -0
- package/dist/types/agent/index.d.ts.map +1 -1
- package/dist/types/agent/index.js +1 -0
- package/dist/types/agent/index.js.map +1 -1
- package/dist/types/agent/pipeline.d.ts +2 -0
- package/dist/types/agent/pipeline.d.ts.map +1 -1
- package/dist/types/agent/query.d.ts +117 -0
- package/dist/types/agent/query.d.ts.map +1 -0
- package/dist/types/agent/query.js +2 -0
- package/dist/types/agent/query.js.map +1 -0
- package/dist/types/agent/reactive.d.ts +2 -129
- package/dist/types/agent/reactive.d.ts.map +1 -1
- package/dist/types/agent/router.d.ts +2 -0
- package/dist/types/agent/router.d.ts.map +1 -1
- package/dist/types/agent/supervisor.d.ts +5 -2
- package/dist/types/agent/supervisor.d.ts.map +1 -1
- package/dist/types/authorization/index.d.ts +70 -12
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/authorization/index.js +11 -0
- package/dist/types/authorization/index.js.map +1 -1
- package/dist/types/computer-use/index.d.ts +176 -0
- package/dist/types/computer-use/index.d.ts.map +1 -1
- package/dist/types/computer-use/index.js.map +1 -1
- package/dist/types/connector/mcp.d.ts +32 -0
- package/dist/types/connector/mcp.d.ts.map +1 -1
- package/dist/types/errors/index.d.ts +15 -0
- package/dist/types/errors/index.d.ts.map +1 -1
- package/dist/types/errors/index.js.map +1 -1
- package/dist/types/hitl/index.d.ts +57 -0
- package/dist/types/hitl/index.d.ts.map +1 -1
- package/dist/types/hitl/index.js.map +1 -1
- package/dist/types/message/index.d.ts +130 -9
- package/dist/types/message/index.d.ts.map +1 -1
- package/dist/types/message/index.js +4 -1
- package/dist/types/message/index.js.map +1 -1
- package/dist/types/plugin/index.d.ts +22 -4
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +1 -0
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/provider/chat.d.ts +5 -0
- package/dist/types/provider/chat.d.ts.map +1 -1
- package/dist/types/provider/config.d.ts +8 -3
- package/dist/types/provider/config.d.ts.map +1 -1
- package/dist/types/provider/stream.d.ts +39 -0
- package/dist/types/provider/stream.d.ts.map +1 -1
- package/dist/types/sandbox/index.d.ts +1 -1
- package/dist/types/session/events.d.ts +14 -3
- package/dist/types/session/events.d.ts.map +1 -1
- package/dist/types/session/events.js.map +1 -1
- package/dist/types/tool/index.d.ts +171 -91
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/toolset/index.d.ts +10 -40
- package/dist/types/toolset/index.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/advisory/history.ts +27 -2
- package/src/advisory/index.ts +1 -1
- package/src/advisory/registry.ts +33 -0
- package/src/agents/AGENTS.md +14 -7
- package/src/agents/PipelineAgent.ts +2 -303
- package/src/agents/QueryAgent.ts +269 -0
- package/src/agents/ReactiveAgent.ts +6 -216
- package/src/agents/RouterAgent.ts +2 -337
- package/src/agents/SupervisorAgent.ts +3 -476
- package/src/agents/defineAgent.ts +13 -2
- package/src/agents/examples/PipelineAgent.ts +302 -0
- package/src/agents/examples/RouterAgent.ts +338 -0
- package/src/agents/examples/SupervisorAgent.ts +472 -0
- package/src/agents/explore.ts +6 -3
- package/src/agents/forward-options.ts +37 -0
- package/src/agents/index.ts +2 -0
- package/src/agents/runAgent.ts +144 -37
- package/src/authorization/command-line.ts +2 -2
- package/src/authorization/gate.ts +46 -5
- package/src/authorization/program.ts +773 -0
- package/src/authorization/reexec-wrapper.ts +589 -0
- package/src/authorization/rules.ts +36 -1
- package/src/authorization/shell-lexer.ts +136 -63
- package/src/bridge/sse/mapper.ts +6 -0
- package/src/capabilities/index.ts +157 -0
- package/src/config/registry.ts +4 -1
- package/src/connector/index.ts +9 -2
- package/src/connector/mcp/adapter.ts +58 -3
- package/src/connector/mcp/client.ts +20 -4
- package/src/connector/mcp/discovery.ts +60 -0
- package/src/connector/mcp/index.ts +13 -0
- package/src/connector/mcp/mcp-toolset.ts +515 -0
- package/src/connector/tools/index.ts +2 -2
- package/src/connector/tools/router.ts +35 -58
- package/src/directory/derive-supervisor.ts +12 -8
- package/src/directory/derive.ts +8 -5
- package/src/execution/code-runtime/types.ts +2 -2
- package/src/invariants/index.ts +4 -1
- package/src/manager/agent/lifecycle.ts +9 -0
- package/src/manager/connector/environment.ts +17 -4
- package/src/manager/connector/index.ts +2 -2
- package/src/manager/connector/tenant.ts +17 -4
- package/src/manager/index.ts +2 -2
- package/src/manager/session/attribution.ts +79 -0
- package/src/manager/session/turn-recorder.ts +211 -55
- package/src/peers/address.ts +58 -0
- package/src/peers/client.ts +202 -0
- package/src/peers/dir.ts +176 -0
- package/src/peers/endpoint.ts +564 -0
- package/src/peers/envelope.ts +121 -0
- package/src/peers/index.ts +96 -0
- package/src/peers/protocol.ts +196 -0
- package/src/peers/record.ts +56 -0
- package/src/peers/registry.ts +241 -0
- package/src/plugin/define.ts +68 -0
- package/src/plugin/index.ts +2 -0
- package/src/plugin/lifecycle.ts +286 -106
- package/src/plugin/resolver.ts +6 -3
- package/src/plugin/shell-hook.ts +21 -5
- package/src/pricing/catalogue.generated.ts +28 -4
- package/src/pricing/rates.source.json +27 -6
- package/src/probe/errors.ts +4 -1
- package/src/prompt/coding-agent-doctrine.ts +22 -10
- package/src/prompt/contributions.ts +12 -2
- package/src/prompt/index.ts +1 -0
- package/src/provider/collect-chat-completion.ts +96 -11
- package/src/provider/mock.ts +24 -6
- package/src/provider/registry.ts +4 -1
- package/src/provider/tool-call-framing.ts +226 -0
- package/src/public-runtime.ts +152 -9
- package/src/public-tools.ts +43 -5
- package/src/public-types.ts +65 -6
- package/src/read-model/registry.ts +7 -2
- package/src/registry/ManagedRegistry.ts +57 -6
- package/src/registry/collision.ts +64 -0
- package/src/registry/command/index.ts +7 -3
- package/src/registry/index.ts +3 -9
- package/src/registry/plugin/index.ts +14 -1
- package/src/registry/tool/callable.ts +36 -0
- package/src/registry/tool/execute.ts +16 -839
- package/src/registry/tool/portable.ts +59 -0
- package/src/registry/tool/presentation.ts +6 -5
- package/src/runtime/bidi/session.ts +24 -5
- package/src/runtime/query/executor/tool-call-admission.ts +288 -22
- package/src/runtime/query/executor.ts +129 -16
- package/src/runtime/query/file-evidence-replay.ts +8 -7
- package/src/runtime/query/fork/prepare.ts +6 -1
- package/src/runtime/query/guardrail-presets.ts +4 -3
- package/src/runtime/query/index.ts +199 -101
- package/src/runtime/query/iteration/index.ts +13 -3
- package/src/runtime/query/iteration/phases/compaction.ts +1 -1
- package/src/runtime/query/iteration/phases/context.ts +2 -2
- package/src/runtime/query/iteration/phases/tool-review.ts +59 -2
- package/src/runtime/query/iteration/stream-turn.ts +390 -136
- package/src/runtime/query/iteration/tool-input.ts +284 -0
- package/src/runtime/query/observation-context.ts +2 -2
- package/src/runtime/query/prelude-lease.ts +132 -0
- package/src/runtime/query/prepare-turn.ts +477 -198
- package/src/runtime/query/prompt-cache.ts +2 -2
- package/src/runtime/query/prompt.ts +4 -4
- package/src/runtime/query/resume-session.ts +42 -3
- package/src/runtime/query/review-policy.ts +190 -24
- package/src/runtime/query/tooling.ts +3 -6
- package/src/runtime/query/turn-state.ts +4 -0
- package/src/runtime/system-events.ts +246 -0
- package/src/scheduler/delegating.ts +7 -2
- package/src/skills/index.ts +1 -1
- package/src/skills/registry.ts +33 -0
- package/src/store/session-log/conformance.ts +51 -8
- package/src/store/session-log/core.ts +10 -4
- package/src/store/session-log/fold.ts +33 -7
- package/src/store/session-log/index.ts +2 -0
- package/src/test-support/toolset.ts +23 -0
- package/src/tools/builtins/bash.ts +27 -10
- package/src/tools/builtins/browser-url.ts +1 -1
- package/src/tools/builtins/computer-use-coordinates.ts +144 -0
- package/src/tools/builtins/computer-use-image.ts +278 -0
- package/src/tools/builtins/computer-use.ts +1495 -191
- package/src/tools/builtins/edit.ts +12 -2
- package/src/tools/builtins/index.ts +7 -1
- package/src/tools/builtins/json-string-hint.ts +16 -0
- package/src/tools/builtins/search-tools.ts +7 -20
- package/src/tools/builtins/skill.ts +304 -174
- package/src/tools/builtins/write-file.ts +12 -0
- package/src/tools/command-shell.ts +46 -1
- package/src/tools/coordinator/agent.ts +6 -0
- package/src/tools/coordinator/ask-user-question.ts +29 -15
- package/src/tools/coordinator/index.ts +6 -0
- package/src/tools/coordinator/question-options.ts +195 -0
- package/src/tools/defineTool.ts +38 -0
- package/src/tools/memory/search.ts +4 -1
- package/src/tools/memory/update.ts +8 -5
- package/src/tools/render-nonce.ts +69 -0
- package/src/tools/roster.ts +84 -33
- package/src/tools/schedules/present.ts +2 -0
- package/src/tools/schedules/schedule-tool.ts +238 -39
- package/src/tools/schedules/types.ts +120 -6
- package/src/tools/trusted-read-only.ts +19 -10
- package/src/tools/untrusted-envelope.ts +121 -57
- package/src/toolsets/combine.ts +181 -0
- package/src/toolsets/manager.ts +996 -0
- package/src/toolsets/source-glob.ts +22 -0
- package/src/toolsets/toolset.ts +31 -0
- package/src/toolsets/types.ts +154 -0
- package/src/toolsets/wrappers.ts +191 -0
- package/src/types/agent/base.ts +29 -16
- package/src/types/agent/index.ts +1 -0
- package/src/types/agent/pipeline.ts +2 -0
- package/src/types/agent/query.ts +129 -0
- package/src/types/agent/reactive.ts +5 -142
- package/src/types/agent/router.ts +2 -0
- package/src/types/agent/supervisor.ts +5 -2
- package/src/types/authorization/index.ts +33 -0
- package/src/types/computer-use/index.ts +202 -0
- package/src/types/connector/mcp.ts +32 -0
- package/src/types/errors/index.ts +15 -0
- package/src/types/hitl/index.ts +57 -0
- package/src/types/message/index.ts +135 -7
- package/src/types/plugin/index.ts +44 -21
- package/src/types/provider/chat.ts +5 -0
- package/src/types/provider/config.ts +8 -3
- package/src/types/provider/stream.ts +39 -0
- package/src/types/sandbox/index.ts +1 -1
- package/src/types/session/events.ts +14 -3
- package/src/types/tool/index.ts +173 -105
- package/src/types/toolset/index.ts +10 -47
- package/dist/registry/toolset/catalog.d.ts +0 -42
- package/dist/registry/toolset/catalog.d.ts.map +0 -1
- package/dist/registry/toolset/catalog.js +0 -234
- package/dist/registry/toolset/catalog.js.map +0 -1
- package/src/registry/toolset/catalog.ts +0 -308
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// CI re-runs the generator and fails on any difference, so a hand edit here is
|
|
6
6
|
// reverted by the next run at best and reported as drift at worst.
|
|
7
7
|
//
|
|
8
|
-
// 4 vendors,
|
|
8
|
+
// 4 vendors, 35 priced models.
|
|
9
9
|
|
|
10
10
|
import type { ModelPricing } from '../utils/cost.js'
|
|
11
11
|
|
|
@@ -35,6 +35,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
35
35
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 1, writeCostPer1M: 12.5 },
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
|
+
[
|
|
39
|
+
'claude-fable-5-1',
|
|
40
|
+
{
|
|
41
|
+
inputCostPer1M: 10,
|
|
42
|
+
outputCostPer1M: 50,
|
|
43
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.25, writeCostPer1M: 12.5 },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
38
46
|
[
|
|
39
47
|
'claude-haiku-4-5',
|
|
40
48
|
{
|
|
@@ -51,6 +59,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
51
59
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 1, writeCostPer1M: 12.5 },
|
|
52
60
|
},
|
|
53
61
|
],
|
|
62
|
+
[
|
|
63
|
+
'claude-mythos-5-1',
|
|
64
|
+
{
|
|
65
|
+
inputCostPer1M: 10,
|
|
66
|
+
outputCostPer1M: 50,
|
|
67
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.25, writeCostPer1M: 12.5 },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
54
70
|
[
|
|
55
71
|
'claude-opus-4-1',
|
|
56
72
|
{
|
|
@@ -91,6 +107,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
91
107
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.5, writeCostPer1M: 6.25 },
|
|
92
108
|
},
|
|
93
109
|
],
|
|
110
|
+
[
|
|
111
|
+
'claude-opus-5-5',
|
|
112
|
+
{
|
|
113
|
+
inputCostPer1M: 4,
|
|
114
|
+
outputCostPer1M: 20,
|
|
115
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.2, writeCostPer1M: 5 },
|
|
116
|
+
},
|
|
117
|
+
],
|
|
94
118
|
[
|
|
95
119
|
'claude-sonnet-4-5',
|
|
96
120
|
{
|
|
@@ -110,9 +134,9 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
110
134
|
[
|
|
111
135
|
'claude-sonnet-5',
|
|
112
136
|
{
|
|
113
|
-
inputCostPer1M:
|
|
114
|
-
outputCostPer1M:
|
|
115
|
-
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.
|
|
137
|
+
inputCostPer1M: 2,
|
|
138
|
+
outputCostPer1M: 10,
|
|
139
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.2, writeCostPer1M: 2.5 },
|
|
116
140
|
},
|
|
117
141
|
],
|
|
118
142
|
]),
|
|
@@ -56,11 +56,32 @@
|
|
|
56
56
|
{
|
|
57
57
|
"providerId": "anthropic",
|
|
58
58
|
"unmetered": false,
|
|
59
|
-
"verified": "2026-
|
|
59
|
+
"verified": "2026-09-24",
|
|
60
60
|
"promptIncludesCacheReads": false,
|
|
61
61
|
"reportsCacheWrites": true,
|
|
62
|
-
"note": "The last two rows exist because the driver's own offline catalogue offers those models and this table did not price them — a lookup-key gap that reads as `cost unknown` and is invisible to the generator's own check, which only proves the module matches this file. `providers/anthropic` asserts the two lists agree. Vendor list prices. Cache read is the vendor's published 0.1x of the input rate
|
|
62
|
+
"note": "The last two rows exist because the driver's own offline catalogue offers those models and this table did not price them — a lookup-key gap that reads as `cost unknown` and is invisible to the generator's own check, which only proves the module matches this file. `providers/anthropic` asserts the two lists agree. Vendor list prices, every row checked against its pricing page on the `verified` date. Cache read is the vendor's published 0.1x of the input rate, except on the three models it prices differently: 0.05x on claude-opus-5-5 and 0.025x on claude-fable-5-1 and claude-mythos-5-1, entered at the published rate rather than derived. Cache write is its published 1.25x for the five-minute entry, which is the default TTL and the one the driver's `cacheControl: { type: 'auto' }` asks for. claude-sonnet-5 launched at an introductory $2/$10 with $3/$15 scheduled from 2026-09-01, and this table recorded the scheduled rate; the vendor has since made $2/$10 the standard price and cancelled the increase. The table has no time dimension, so a future promotional window is still recorded at the list rate and over-reported rather than mis-modelled.",
|
|
63
63
|
"models": [
|
|
64
|
+
{
|
|
65
|
+
"id": "claude-fable-5-1",
|
|
66
|
+
"inputPer1M": 10,
|
|
67
|
+
"outputPer1M": 50,
|
|
68
|
+
"cacheReadPer1M": 0.25,
|
|
69
|
+
"cacheWritePer1M": 12.5
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "claude-mythos-5-1",
|
|
73
|
+
"inputPer1M": 10,
|
|
74
|
+
"outputPer1M": 50,
|
|
75
|
+
"cacheReadPer1M": 0.25,
|
|
76
|
+
"cacheWritePer1M": 12.5
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "claude-opus-5-5",
|
|
80
|
+
"inputPer1M": 4,
|
|
81
|
+
"outputPer1M": 20,
|
|
82
|
+
"cacheReadPer1M": 0.2,
|
|
83
|
+
"cacheWritePer1M": 5
|
|
84
|
+
},
|
|
64
85
|
{
|
|
65
86
|
"id": "claude-fable-5",
|
|
66
87
|
"inputPer1M": 10,
|
|
@@ -105,10 +126,10 @@
|
|
|
105
126
|
},
|
|
106
127
|
{
|
|
107
128
|
"id": "claude-sonnet-5",
|
|
108
|
-
"inputPer1M":
|
|
109
|
-
"outputPer1M":
|
|
110
|
-
"cacheReadPer1M": 0.
|
|
111
|
-
"cacheWritePer1M":
|
|
129
|
+
"inputPer1M": 2,
|
|
130
|
+
"outputPer1M": 10,
|
|
131
|
+
"cacheReadPer1M": 0.2,
|
|
132
|
+
"cacheWritePer1M": 2.5
|
|
112
133
|
},
|
|
113
134
|
{
|
|
114
135
|
"id": "claude-sonnet-4-6",
|
package/src/probe/errors.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { RegistryCollisionError } from '../registry/collision.js'
|
|
1
2
|
import type { VetoableEventKind } from '../types/probe/index.js'
|
|
2
3
|
|
|
3
|
-
export class ProbeNameCollisionError extends
|
|
4
|
+
export class ProbeNameCollisionError extends RegistryCollisionError {
|
|
4
5
|
readonly probeName: string
|
|
5
6
|
|
|
6
7
|
constructor(probeName: string) {
|
|
7
8
|
super(
|
|
9
|
+
'ProbeRegistry',
|
|
10
|
+
probeName,
|
|
8
11
|
`Probe name "${probeName}" is already registered. Pass { override: true } to replace, or pick a different name.`,
|
|
9
12
|
)
|
|
10
13
|
this.name = 'ProbeNameCollisionError'
|
|
@@ -97,14 +97,20 @@ When you have understood the task, reply with the plan: what you would change, i
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Appended after {@link CODING_AGENT_DELEGATION_DOCTRINE} only for a host
|
|
100
|
-
* session that has
|
|
101
|
-
* {@link CodingAgentDoctrineOptions.
|
|
100
|
+
* session that has hypermode (its multi-agent mode) turned on. See
|
|
101
|
+
* {@link CodingAgentDoctrineOptions.hypermode}: this text is a stronger
|
|
102
102
|
* restatement of the existing delegation rule, not a new capability — it
|
|
103
103
|
* creates no roster, starts no work by itself, and names no tool the base
|
|
104
104
|
* doctrine did not already name.
|
|
105
105
|
*/
|
|
106
|
-
export const
|
|
107
|
-
This session has
|
|
106
|
+
export const CODING_AGENT_HYPERMODE_DOCTRINE = `### Hypermode
|
|
107
|
+
This session has hypermode on: treat delegation through \`Agent\` as the default for substantive work, not the exception. Before doing multi-step work yourself, ask whether an independent piece of it — a lookup, a draft, a check — could run as its own delegation, and prefer delegating it when the answer is yes. This changes only how eagerly you reach for \`Agent\` on work you would otherwise do inline; it does not mount a roster or start any delegation by itself. Agents in the same phase are launched in the same response, each with \`run_in_background: true\` when you mean to wait for them together; a phase is never started one agent at a time.`
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Renamed {@link CODING_AGENT_HYPERMODE_DOCTRINE}; the mode it
|
|
111
|
+
* describes is now called hypermode. Same value. Removed in the next major.
|
|
112
|
+
*/
|
|
113
|
+
export const CODING_AGENT_ORCHESTRATE_DOCTRINE = CODING_AGENT_HYPERMODE_DOCTRINE
|
|
108
114
|
|
|
109
115
|
export const CODING_AGENT_DOCTRINE_CONTRIBUTION_ID = 'namzu.coding-agent-doctrine'
|
|
110
116
|
|
|
@@ -116,15 +122,21 @@ export interface CodingAgentDoctrineOptions {
|
|
|
116
122
|
*/
|
|
117
123
|
delegation?: boolean
|
|
118
124
|
/**
|
|
119
|
-
* Append {@link
|
|
120
|
-
* rules, for a host session whose operator turned on
|
|
121
|
-
*
|
|
122
|
-
*
|
|
125
|
+
* Append {@link CODING_AGENT_HYPERMODE_DOCTRINE} after the delegation
|
|
126
|
+
* rules, for a host session whose operator turned hypermode on. Default
|
|
127
|
+
* `false`, and ignored when `delegation` is `false` — a sub-agent prompt
|
|
128
|
+
* never carries delegation guidance of any strength.
|
|
123
129
|
* Display/prompt-only: it creates no scheduling, no roster and no kernel
|
|
124
130
|
* behaviour change, the same guarantee the `workflow`/`phase` labels on
|
|
125
131
|
* `agent_pending` make. With this left at its default the rendered text
|
|
126
132
|
* is byte-identical to before this option existed.
|
|
127
133
|
*/
|
|
134
|
+
hypermode?: boolean
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Renamed {@link CodingAgentDoctrineOptions.hypermode}. Still
|
|
137
|
+
* honoured: either flag set to `true` appends the text. Removed in the
|
|
138
|
+
* next major.
|
|
139
|
+
*/
|
|
128
140
|
orchestrate?: boolean
|
|
129
141
|
}
|
|
130
142
|
|
|
@@ -140,8 +152,8 @@ export function codingAgentDoctrineContribution(
|
|
|
140
152
|
const text = [
|
|
141
153
|
CODING_AGENT_WORKING_DOCTRINE,
|
|
142
154
|
options.delegation === false ? undefined : CODING_AGENT_DELEGATION_DOCTRINE,
|
|
143
|
-
options.delegation !== false && options.orchestrate
|
|
144
|
-
?
|
|
155
|
+
options.delegation !== false && (options.hypermode || options.orchestrate)
|
|
156
|
+
? CODING_AGENT_HYPERMODE_DOCTRINE
|
|
145
157
|
: undefined,
|
|
146
158
|
]
|
|
147
159
|
.filter((part): part is string => Boolean(part))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { renderSkillsSection } from '../persona/assembler.js'
|
|
2
|
+
import { RegistryCollisionError } from '../registry/collision.js'
|
|
2
3
|
import type { AgentRuntimeContext } from '../types/agent/base.js'
|
|
3
4
|
import type { Skill } from '../types/skills/index.js'
|
|
4
5
|
|
|
@@ -112,11 +113,15 @@ export interface PromptContribution {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/** Two contributions claiming one id. */
|
|
115
|
-
export class PromptContributionCollisionError extends
|
|
116
|
+
export class PromptContributionCollisionError extends RegistryCollisionError {
|
|
116
117
|
readonly details: { id: string }
|
|
117
118
|
|
|
118
119
|
constructor(details: { id: string }) {
|
|
119
|
-
super(
|
|
120
|
+
super(
|
|
121
|
+
'PromptContributionRegistry',
|
|
122
|
+
details.id,
|
|
123
|
+
`A prompt contribution with id "${details.id}" is already registered.`,
|
|
124
|
+
)
|
|
120
125
|
this.name = 'PromptContributionCollisionError'
|
|
121
126
|
this.details = details
|
|
122
127
|
}
|
|
@@ -145,6 +150,11 @@ export class PromptContributionRegistry {
|
|
|
145
150
|
this.byId.set(contribution.id, contribution)
|
|
146
151
|
}
|
|
147
152
|
|
|
153
|
+
/** Revoke one contribution when its owner is disabled or uninstalled. */
|
|
154
|
+
unregister(id: string): boolean {
|
|
155
|
+
return this.byId.delete(id)
|
|
156
|
+
}
|
|
157
|
+
|
|
148
158
|
has(id: string): boolean {
|
|
149
159
|
return this.byId.has(id)
|
|
150
160
|
}
|
package/src/prompt/index.ts
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
import { mergeTokenUsage } from '../types/common/index.js'
|
|
2
|
-
import type { ReasoningBlock } from '../types/message/index.js'
|
|
2
|
+
import type { ReasoningBlock, ToolInputError } from '../types/message/index.js'
|
|
3
3
|
import type { ChatCompletionResponse } from '../types/provider/chat.js'
|
|
4
4
|
import type { StreamChunk } from '../types/provider/stream.js'
|
|
5
5
|
import { StreamTextAccumulator } from './stream-text.js'
|
|
6
|
+
import {
|
|
7
|
+
INTERLEAVED_TOOL_INPUT_PARSE_ERROR,
|
|
8
|
+
ToolCallIndexer,
|
|
9
|
+
describeToolCallFramingViolation,
|
|
10
|
+
isUnindexedFragment,
|
|
11
|
+
toolCallFramingViolation,
|
|
12
|
+
} from './tool-call-framing.js'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Whether a streamed argument buffer could still be receiving more of a
|
|
16
|
+
* call's arguments right now: empty, or not yet a complete JSON value. Used
|
|
17
|
+
* only by `ToolCallIndexer.placeUnindexedFragment` to tell which open calls
|
|
18
|
+
* could still be an id-less fragment's target — not to validate a finished
|
|
19
|
+
* call, so it does not need the offset-finding `parseToolArguments` the turn
|
|
20
|
+
* loop uses for the message a model is shown.
|
|
21
|
+
*/
|
|
22
|
+
function canAcceptMoreText(buffer: string): boolean {
|
|
23
|
+
if (!buffer) return true
|
|
24
|
+
try {
|
|
25
|
+
JSON.parse(buffer)
|
|
26
|
+
return false
|
|
27
|
+
} catch {
|
|
28
|
+
return true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
6
31
|
|
|
7
32
|
/**
|
|
8
33
|
* Drains a {@link StreamChunk} async iterable into the equivalent
|
|
@@ -18,7 +43,12 @@ import { StreamTextAccumulator } from './stream-text.js'
|
|
|
18
43
|
* - ordinary text is concatenated in delta order; identified public text
|
|
19
44
|
* items are preserved and explicit final-answer items select the settled text;
|
|
20
45
|
* - tool calls are bucketed by `index` into the existing
|
|
21
|
-
* `Array<{ id, function: { name, arguments } }>` shape
|
|
46
|
+
* `Array<{ id, function: { name, arguments } }>` shape. Arguments that
|
|
47
|
+
* arrive before the call's id belong to the call at their index and are
|
|
48
|
+
* kept; the id is filled in when it arrives. A stream that puts a second
|
|
49
|
+
* call id on an index is refused with an error naming the violation, as
|
|
50
|
+
* the turn loop refuses it: the second call's arguments used to be
|
|
51
|
+
* appended to the first's, which left one call no tool could run;
|
|
22
52
|
* - reasoning blocks are bucketed by `index` the same way, because the
|
|
23
53
|
* assembled message is the thing a caller replays and
|
|
24
54
|
* {@link ReasoningBlock} is documented as replayed verbatim. This was
|
|
@@ -41,6 +71,7 @@ export async function collectChatCompletion(
|
|
|
41
71
|
const text = new StreamTextAccumulator()
|
|
42
72
|
let replayState: unknown
|
|
43
73
|
let finishReason: ChatCompletionResponse['finishReason'] = 'stop'
|
|
74
|
+
let finishDetail: ChatCompletionResponse['finishDetail']
|
|
44
75
|
let usage: ChatCompletionResponse['usage'] = {
|
|
45
76
|
promptTokens: 0,
|
|
46
77
|
completionTokens: 0,
|
|
@@ -49,7 +80,12 @@ export async function collectChatCompletion(
|
|
|
49
80
|
cacheWriteTokens: 0,
|
|
50
81
|
}
|
|
51
82
|
|
|
52
|
-
const toolBuckets = new Map<
|
|
83
|
+
const toolBuckets = new Map<
|
|
84
|
+
number,
|
|
85
|
+
{ id: string; name: string; argsBuf: string; unreadable?: boolean }
|
|
86
|
+
>()
|
|
87
|
+
// Places a fragment that came without an index; see `ToolCallIndexer`.
|
|
88
|
+
const toolIndexer = new ToolCallIndexer()
|
|
53
89
|
// Same bucketing rule the turn loop uses (`runtime/query/iteration/
|
|
54
90
|
// stream-turn.ts`), so a message assembled here and a message assembled
|
|
55
91
|
// there carry the same blocks in the same order.
|
|
@@ -81,18 +117,47 @@ export async function collectChatCompletion(
|
|
|
81
117
|
}
|
|
82
118
|
|
|
83
119
|
for (const tc of chunk.delta.toolCalls ?? []) {
|
|
84
|
-
|
|
85
|
-
id:
|
|
86
|
-
|
|
87
|
-
|
|
120
|
+
if (isUnindexedFragment(tc)) {
|
|
121
|
+
// Neither an id nor an index: never a guess. Evaluated fresh for
|
|
122
|
+
// THIS fragment, not decided once when some call opened.
|
|
123
|
+
const placement = toolIndexer.placeUnindexedFragment((i) =>
|
|
124
|
+
canAcceptMoreText(toolBuckets.get(i)?.argsBuf ?? ''),
|
|
125
|
+
)
|
|
126
|
+
if (typeof placement === 'number') {
|
|
127
|
+
const bucket = toolBuckets.get(placement) ?? { id: '', name: '', argsBuf: '' }
|
|
128
|
+
if (tc.function?.name) bucket.name = tc.function.name
|
|
129
|
+
if (tc.function?.arguments) bucket.argsBuf += tc.function.arguments
|
|
130
|
+
toolBuckets.set(placement, bucket)
|
|
131
|
+
} else {
|
|
132
|
+
// More than one open call could still have taken this
|
|
133
|
+
// fragment, or none could: every candidate is unreadable, and
|
|
134
|
+
// the fragment itself is attributed to none of them —
|
|
135
|
+
// appending it to a guess is exactly the splice this exists
|
|
136
|
+
// to refuse.
|
|
137
|
+
for (const candidate of placement.candidates) {
|
|
138
|
+
const bucket = toolBuckets.get(candidate.index)
|
|
139
|
+
if (bucket) bucket.unreadable = true
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
continue
|
|
88
143
|
}
|
|
89
|
-
|
|
144
|
+
const index = toolIndexer.indexOf(tc)
|
|
145
|
+
const open = toolBuckets.get(index)
|
|
146
|
+
const violation = toolCallFramingViolation(open, tc, index)
|
|
147
|
+
if (violation) {
|
|
148
|
+
throw new Error(`Provider stream error: ${describeToolCallFramingViolation(violation)}`)
|
|
149
|
+
}
|
|
150
|
+
const bucket = open ?? { id: '', name: '', argsBuf: '' }
|
|
151
|
+
if (tc.id && !bucket.id) bucket.id = tc.id
|
|
90
152
|
if (tc.function?.name) bucket.name = tc.function.name
|
|
91
153
|
if (tc.function?.arguments) bucket.argsBuf += tc.function.arguments
|
|
92
|
-
toolBuckets.set(
|
|
154
|
+
toolBuckets.set(index, bucket)
|
|
93
155
|
}
|
|
94
156
|
|
|
95
|
-
if (chunk.finishReason)
|
|
157
|
+
if (chunk.finishReason) {
|
|
158
|
+
finishReason = chunk.finishReason
|
|
159
|
+
finishDetail = chunk.finishReason === 'length' ? chunk.finishDetail : undefined
|
|
160
|
+
}
|
|
96
161
|
// Merge (per-field max), not last-write-wins: a late frame that omits
|
|
97
162
|
// input/cache tokens must not zero the counts captured earlier in the stream.
|
|
98
163
|
if (chunk.usage) usage = mergeTokenUsage(usage, chunk.usage)
|
|
@@ -103,7 +168,26 @@ export async function collectChatCompletion(
|
|
|
103
168
|
.map(([, b]) => ({
|
|
104
169
|
id: b.id,
|
|
105
170
|
type: 'function' as const,
|
|
106
|
-
|
|
171
|
+
// An interleaved call is never returned with the buffer it
|
|
172
|
+
// accumulated: that buffer may hold another call's spliced-in
|
|
173
|
+
// fragments, or may simply be missing whatever an id-less
|
|
174
|
+
// fragment carried elsewhere instead. Normalized to `{}`, exactly
|
|
175
|
+
// as the turn loop normalizes any other unreadable call.
|
|
176
|
+
function: { name: b.name, arguments: b.unreadable ? '{}' : b.argsBuf },
|
|
177
|
+
...(b.unreadable
|
|
178
|
+
? {
|
|
179
|
+
metadata: {
|
|
180
|
+
inputTruncated: true,
|
|
181
|
+
partialArguments: b.argsBuf,
|
|
182
|
+
inputError: {
|
|
183
|
+
reason: 'malformed',
|
|
184
|
+
parseError: INTERLEAVED_TOOL_INPUT_PARSE_ERROR,
|
|
185
|
+
length: b.argsBuf.length,
|
|
186
|
+
precedingLength: 0,
|
|
187
|
+
} satisfies ToolInputError,
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
: {}),
|
|
107
191
|
}))
|
|
108
192
|
|
|
109
193
|
const reasoningBlocks: ReasoningBlock[] = [...reasoningBuckets.entries()]
|
|
@@ -122,6 +206,7 @@ export async function collectChatCompletion(
|
|
|
122
206
|
...(replayState !== undefined ? { replayState } : {}),
|
|
123
207
|
},
|
|
124
208
|
finishReason,
|
|
209
|
+
...(finishDetail ? { finishDetail } : {}),
|
|
125
210
|
usage,
|
|
126
211
|
}
|
|
127
212
|
}
|
package/src/provider/mock.ts
CHANGED
|
@@ -129,8 +129,15 @@ export class MockLLMProvider implements LLMProvider {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
// Arguments arrive as JSON fragments, which is what forces the
|
|
132
|
-
// consumer's partial-JSON buffering to be exercised.
|
|
133
|
-
|
|
132
|
+
// consumer's partial-JSON buffering to be exercised. A truncated
|
|
133
|
+
// call stops halfway, as the output limit stops a real one: it
|
|
134
|
+
// used to send every fragment and only withhold the block close,
|
|
135
|
+
// so the arguments parsed and nothing was truncated at all.
|
|
136
|
+
const fullArgs = call.rawArguments ?? JSON.stringify(call.args ?? {})
|
|
137
|
+
const args =
|
|
138
|
+
call.truncateArguments === true
|
|
139
|
+
? fullArgs.slice(0, Math.max(1, Math.floor(fullArgs.length / 2)))
|
|
140
|
+
: fullArgs
|
|
134
141
|
const step = call.argChunkSize ?? Math.max(1, Math.ceil(args.length / 3))
|
|
135
142
|
for (let i = 0; i < args.length; i += step) {
|
|
136
143
|
yield {
|
|
@@ -143,15 +150,26 @@ export class MockLLMProvider implements LLMProvider {
|
|
|
143
150
|
throw new Error(call.throwAfterArguments)
|
|
144
151
|
}
|
|
145
152
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
153
|
+
// An output limit stops the response where it is, so nothing the
|
|
154
|
+
// script puts after a truncated call is streamed. It used to go on
|
|
155
|
+
// to the next call, which made the cut call one the model had
|
|
156
|
+
// moved on from: malformed, not truncated.
|
|
157
|
+
if (call.truncateArguments === true) break
|
|
158
|
+
yield { id, delta: { toolCallEnd: { index, id: callId } } }
|
|
149
159
|
}
|
|
150
160
|
|
|
151
161
|
yield {
|
|
152
162
|
id,
|
|
153
163
|
delta: {},
|
|
154
|
-
finishReason:
|
|
164
|
+
finishReason:
|
|
165
|
+
turn.finishReason ??
|
|
166
|
+
// A call cut off mid-JSON is what the output limit does, and the
|
|
167
|
+
// finish reason is how a consumer tells that from malformed JSON.
|
|
168
|
+
(toolCalls.some((call) => call.truncateArguments === true)
|
|
169
|
+
? 'length'
|
|
170
|
+
: toolCalls.length > 0
|
|
171
|
+
? 'tool_calls'
|
|
172
|
+
: 'stop'),
|
|
155
173
|
usage: { ...EMPTY_USAGE, ...turn.usage },
|
|
156
174
|
}
|
|
157
175
|
}
|
package/src/provider/registry.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RegistryCollisionError } from '../registry/collision.js'
|
|
1
2
|
import type {
|
|
2
3
|
LLMProvider,
|
|
3
4
|
LLMProviderConstructor,
|
|
@@ -23,11 +24,13 @@ export class UnknownProviderError extends Error {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
export class DuplicateProviderError extends
|
|
27
|
+
export class DuplicateProviderError extends RegistryCollisionError {
|
|
27
28
|
readonly providerType: string
|
|
28
29
|
|
|
29
30
|
constructor(providerType: string) {
|
|
30
31
|
super(
|
|
32
|
+
'ProviderRegistry',
|
|
33
|
+
providerType,
|
|
31
34
|
`Provider type "${providerType}" is already registered. Pass { replace: true } to override an existing registration.`,
|
|
32
35
|
)
|
|
33
36
|
this.name = 'DuplicateProviderError'
|