@namzu/sdk 46.0.0 → 48.1.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 +351 -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 +8 -0
- package/dist/authorization/gate.d.ts.map +1 -1
- package/dist/authorization/gate.js +12 -1
- 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 +8 -1
- package/dist/authorization/rules.js.map +1 -1
- package/dist/authorization/shell-lexer.d.ts +19 -4
- package/dist/authorization/shell-lexer.d.ts.map +1 -1
- package/dist/authorization/shell-lexer.js +91 -65
- 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 +71 -4
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/connector/mcp/client.d.ts +32 -4
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +383 -5
- 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/era.d.ts.map +1 -1
- package/dist/connector/mcp/era.js +7 -0
- package/dist/connector/mcp/era.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/mcp/streamable-http.d.ts +15 -0
- package/dist/connector/mcp/streamable-http.d.ts.map +1 -1
- package/dist/connector/mcp/streamable-http.js +281 -6
- package/dist/connector/mcp/streamable-http.js.map +1 -1
- 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 +1 -0
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +146 -18
- 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/initiative.d.ts +6 -6
- package/dist/manager/resident/learning-observation.d.ts +4 -4
- package/dist/manager/resident/learning.d.ts +36 -36
- package/dist/manager/resident/outbox.d.ts +4 -4
- 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/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 +24 -11
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +45 -9
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +6 -4
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +8 -3
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +13 -2
- 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 +7 -7
- package/dist/registry/tool/callable.d.ts.map +1 -1
- package/dist/registry/tool/callable.js +6 -7
- package/dist/registry/tool/callable.js.map +1 -1
- 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 -727
- 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 +45 -2
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +189 -5
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +33 -3
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +86 -10
- 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 +22 -3
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +84 -6
- 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/scheduler/local.d.ts.map +1 -1
- package/dist/scheduler/local.js +2 -0
- package/dist/scheduler/local.js.map +1 -1
- package/dist/session/retention/archive.js +1 -1
- package/dist/session/retention/archive.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 +12 -0
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +19 -0
- package/dist/skills/registry.js.map +1 -1
- package/dist/store/evidence/index-page.d.ts +2 -2
- package/dist/store/session/disk.d.ts.map +1 -1
- package/dist/store/session/disk.js +2 -0
- package/dist/store/session/disk.js.map +1 -1
- 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/browser.js +2 -2
- package/dist/tools/builtins/browser.js.map +1 -1
- package/dist/tools/builtins/computer-use.d.ts.map +1 -1
- package/dist/tools/builtins/computer-use.js +19 -11
- 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/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/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 +10 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +17 -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/schedule-tool.d.ts.map +1 -1
- package/dist/tools/schedules/schedule-tool.js +94 -14
- package/dist/tools/schedules/schedule-tool.js.map +1 -1
- package/dist/tools/schedules/types.d.ts +52 -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/scheduler.d.ts +6 -1
- package/dist/types/agent/scheduler.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/agent/task.d.ts +19 -1
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/agent/task.js.map +1 -1
- package/dist/types/authorization/index.d.ts +49 -12
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/authorization/index.js +6 -0
- package/dist/types/authorization/index.js.map +1 -1
- package/dist/types/connector/mcp.d.ts +45 -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/session/sub-session.d.ts +2 -0
- package/dist/types/session/sub-session.d.ts.map +1 -1
- package/dist/types/tool/index.d.ts +152 -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 +1 -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 +21 -1
- package/src/authorization/program.ts +773 -0
- package/src/authorization/reexec-wrapper.ts +589 -0
- package/src/authorization/rules.ts +18 -1
- package/src/authorization/shell-lexer.ts +104 -59
- 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 +73 -3
- package/src/connector/mcp/client.ts +425 -6
- package/src/connector/mcp/discovery.ts +60 -0
- package/src/connector/mcp/era.ts +7 -0
- package/src/connector/mcp/index.ts +13 -0
- package/src/connector/mcp/mcp-toolset.ts +515 -0
- package/src/connector/mcp/streamable-http.ts +302 -5
- 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 +167 -19
- 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/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 +136 -7
- package/src/public-tools.ts +24 -4
- package/src/public-types.ts +60 -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 +8 -9
- package/src/registry/tool/execute.ts +16 -846
- 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 +228 -6
- package/src/runtime/query/executor.ts +110 -12
- 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 +87 -9
- 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/scheduler/local.ts +2 -0
- package/src/session/retention/archive.ts +1 -1
- package/src/skills/index.ts +1 -1
- package/src/skills/registry.ts +25 -0
- package/src/store/session/disk.ts +3 -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/browser.ts +2 -2
- package/src/tools/builtins/computer-use.ts +21 -11
- package/src/tools/builtins/edit.ts +12 -2
- package/src/tools/builtins/json-string-hint.ts +16 -0
- package/src/tools/builtins/search-tools.ts +7 -20
- 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 +28 -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/schedule-tool.ts +107 -14
- package/src/tools/schedules/types.ts +52 -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/scheduler.ts +6 -1
- package/src/types/agent/supervisor.ts +5 -2
- package/src/types/agent/task.ts +21 -1
- package/src/types/authorization/index.ts +12 -0
- package/src/types/connector/mcp.ts +46 -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/session/sub-session.ts +2 -0
- package/src/types/tool/index.ts +154 -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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GoalId } from '../ids/index.js';
|
|
1
|
+
import type { GoalId, MessageId } from '../ids/index.js';
|
|
2
2
|
export type MessageRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
3
3
|
export type CacheHint = 'cache' | 'ephemeral' | 'none';
|
|
4
4
|
/** Why durable rich content must not be sent to a model again. */
|
|
@@ -98,7 +98,7 @@ export interface Citation {
|
|
|
98
98
|
* An attachment whose bytes are held by a store, not by the message.
|
|
99
99
|
*
|
|
100
100
|
* Structural rather than an import from `store/attachment`, so this types
|
|
101
|
-
* module keeps depending on nothing — the same reasoning `
|
|
101
|
+
* module keeps depending on nothing — the same reasoning `ToolsView`
|
|
102
102
|
* gives. `store/attachment` owns the resolution and its refusals; this is
|
|
103
103
|
* the shape a message may carry.
|
|
104
104
|
*
|
|
@@ -132,17 +132,103 @@ export interface ToolCall {
|
|
|
132
132
|
* JSON payload, while provider/runtime recovery state lives here.
|
|
133
133
|
*/
|
|
134
134
|
metadata?: {
|
|
135
|
+
/**
|
|
136
|
+
* The streamed arguments could not be read, and `function.arguments`
|
|
137
|
+
* was normalized to `"{}"`. Set for every unreadable call, cut off or
|
|
138
|
+
* malformed alike: the name predates that distinction, and
|
|
139
|
+
* {@link inputError} is what says which it was.
|
|
140
|
+
*/
|
|
135
141
|
inputTruncated?: boolean;
|
|
136
142
|
/**
|
|
137
|
-
* The
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
143
|
+
* The argument buffer as it arrived, when it could not be read.
|
|
144
|
+
* `function.arguments` is normalized to `"{}"` in that case so tool
|
|
145
|
+
* args stay clean, which leaves this as the only record of what the
|
|
146
|
+
* model was actually saying — and a `repairToolCall` hook has nothing
|
|
147
|
+
* to repair without it.
|
|
142
148
|
*/
|
|
143
149
|
partialArguments?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Why the arguments could not be read. Present with
|
|
152
|
+
* {@link inputTruncated} on every call the runtime marked; absent on a
|
|
153
|
+
* call marked by an older runtime, which recorded only the flag.
|
|
154
|
+
*/
|
|
155
|
+
inputError?: ToolInputError;
|
|
144
156
|
};
|
|
145
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Why a streamed tool call's arguments could not be read. See
|
|
160
|
+
* {@link ToolInputError}.
|
|
161
|
+
*/
|
|
162
|
+
export type ToolInputErrorReason = 'truncated' | 'malformed';
|
|
163
|
+
/**
|
|
164
|
+
* A tool call whose streamed arguments did not parse as JSON, and why.
|
|
165
|
+
*
|
|
166
|
+
* An output limit, a content filter or a dropped stream stops a response
|
|
167
|
+
* wherever it is, so only the call the response was streaming at that moment
|
|
168
|
+
* can have been cut off: the last one, with nothing the model streamed after
|
|
169
|
+
* it. For that call the finish reason decides, never the text:
|
|
170
|
+
*
|
|
171
|
+
* - `truncated` — the response stopped before the model closed the
|
|
172
|
+
* arguments. It reached its output limit (`finishReason: 'length'`), a
|
|
173
|
+
* content filter stopped it (`'content_filter'`), or the stream ended
|
|
174
|
+
* without reporting a finish reason at all.
|
|
175
|
+
* - `malformed` — the response finished normally (`'stop'` or
|
|
176
|
+
* `'tool_calls'`) and the arguments still were not valid JSON.
|
|
177
|
+
*
|
|
178
|
+
* Every other unreadable call is `malformed`, whatever the finish reason:
|
|
179
|
+
* the model moved on to more text, reasoning or another call, so it had
|
|
180
|
+
* finished writing this one.
|
|
181
|
+
*/
|
|
182
|
+
export interface ToolInputError {
|
|
183
|
+
readonly reason: ToolInputErrorReason;
|
|
184
|
+
/** How the response ended, as the provider reported it. Absent when the stream reported nothing. */
|
|
185
|
+
readonly finishReason?: 'stop' | 'tool_calls' | 'length' | 'content_filter';
|
|
186
|
+
/**
|
|
187
|
+
* `'context_window'` when a `'length'` finish was the model's context
|
|
188
|
+
* window rather than its output token limit (`StreamChunk.finishDetail`).
|
|
189
|
+
*/
|
|
190
|
+
readonly finishDetail?: 'context_window';
|
|
191
|
+
/** The JSON parser's own message. */
|
|
192
|
+
readonly parseError: string;
|
|
193
|
+
/**
|
|
194
|
+
* Zero-based character offset in the arguments where parsing failed: the
|
|
195
|
+
* first character that cannot continue valid JSON, or their length when
|
|
196
|
+
* the text simply ended. Found by scanning the arguments, so it is there
|
|
197
|
+
* when {@link parseError} names no position, as for a bare `True` or
|
|
198
|
+
* `None`.
|
|
199
|
+
*/
|
|
200
|
+
readonly offset?: number;
|
|
201
|
+
/** How many characters of arguments arrived. */
|
|
202
|
+
readonly length: number;
|
|
203
|
+
/**
|
|
204
|
+
* How many characters the response streamed before this call began: its
|
|
205
|
+
* text, its visible reasoning and the arguments of earlier tool calls.
|
|
206
|
+
* Text a driver adds of its own is not counted. For a `truncated` call,
|
|
207
|
+
* which nothing followed, this plus {@link length} is everything the
|
|
208
|
+
* response streamed as text. It is not everything the response spent:
|
|
209
|
+
* reasoning a provider does not stream (encrypted, summarised, or only
|
|
210
|
+
* counted) uses the output limit too, and {@link outputTokens} and
|
|
211
|
+
* {@link reasoningTokens} are what show it.
|
|
212
|
+
*/
|
|
213
|
+
readonly precedingLength: number;
|
|
214
|
+
/**
|
|
215
|
+
* The output tokens the whole response used, reasoning included, as the
|
|
216
|
+
* provider reported them when it ended. Present on a `truncated` call when
|
|
217
|
+
* the provider reported any.
|
|
218
|
+
*
|
|
219
|
+
* After an output limit it says whether the visible text accounts for the
|
|
220
|
+
* limit: when most of the output went to reasoning, or to anything else
|
|
221
|
+
* the stream did not carry, the call is not what filled the response, and
|
|
222
|
+
* the model is told so rather than told to shrink the call.
|
|
223
|
+
*/
|
|
224
|
+
readonly outputTokens?: number;
|
|
225
|
+
/**
|
|
226
|
+
* Of {@link outputTokens}, the tokens the provider says went to reasoning.
|
|
227
|
+
* Present only when the provider reports that split; absent means unknown,
|
|
228
|
+
* not zero.
|
|
229
|
+
*/
|
|
230
|
+
readonly reasoningTokens?: number;
|
|
231
|
+
}
|
|
146
232
|
export interface BaseMessage {
|
|
147
233
|
/**
|
|
148
234
|
* Widened from `string | null` so `ToolMessage` can carry content
|
|
@@ -154,6 +240,22 @@ export interface BaseMessage {
|
|
|
154
240
|
content: string | null | readonly ToolResultBlock[];
|
|
155
241
|
timestamp?: number;
|
|
156
242
|
cacheHint?: CacheHint;
|
|
243
|
+
/**
|
|
244
|
+
* The id of the durable `message` record this message was written as, or
|
|
245
|
+
* a `message_replaced` record's `targetMessageId` when a guardrail,
|
|
246
|
+
* review or structured-output override replaced its content in place.
|
|
247
|
+
* Absent means the kernel has not recorded this exact message: a host
|
|
248
|
+
* just constructed it, or it is a compaction's own summary (a bulk
|
|
249
|
+
* spilled or inline array, which carries no per-message id — see
|
|
250
|
+
* `docs/sdk/session-log.md`).
|
|
251
|
+
*
|
|
252
|
+
* Set by the kernel alone, never by a caller: `query()` stamps every
|
|
253
|
+
* message it folds from the session log or records fresh, on `Turn.messages`,
|
|
254
|
+
* on the messages `onConversationMessages` reports, and on a checkpoint's
|
|
255
|
+
* restored messages. A caller that mints its own id here gets `conflict`
|
|
256
|
+
* on the next turn — this log never recorded it under that name.
|
|
257
|
+
*/
|
|
258
|
+
readonly id?: MessageId;
|
|
157
259
|
/**
|
|
158
260
|
* Exempt this message from compaction and from tool-result clearing.
|
|
159
261
|
*
|
|
@@ -226,7 +328,7 @@ export interface ProjectInstructionMessageSource {
|
|
|
226
328
|
* transcript, export, or previous-prompt editor from presenting kernel context
|
|
227
329
|
* as something the operator typed.
|
|
228
330
|
*/
|
|
229
|
-
export declare const RUNTIME_CONTEXT_MESSAGE_KINDS: readonly ["advisory", "answer-review", "auto-continuation", "job-exit", "limit-finalization", "repeat-call", "steering", "step-context", "structured-output", "task-completion"];
|
|
331
|
+
export declare const RUNTIME_CONTEXT_MESSAGE_KINDS: readonly ["advisory", "answer-review", "auto-continuation", "job-exit", "limit-finalization", "peer-message", "peer-notice", "repeat-call", "steering", "step-context", "structured-output", "task-completion"];
|
|
230
332
|
export type RuntimeContextMessageKind = (typeof RUNTIME_CONTEXT_MESSAGE_KINDS)[number];
|
|
231
333
|
/** Host-generated context carried in the provider's required user role. */
|
|
232
334
|
export interface RuntimeContextMessageSource {
|
|
@@ -350,6 +452,12 @@ export type ToolResultBlock = {
|
|
|
350
452
|
* driver compiles unchanged while the block array is added beside it.
|
|
351
453
|
*/
|
|
352
454
|
export type ToolResultContent = string | readonly ToolResultBlock[];
|
|
455
|
+
/** A schema reveal bound to the source that contributed that exact tool. */
|
|
456
|
+
export interface ToolRevealReceipt {
|
|
457
|
+
readonly name: string;
|
|
458
|
+
readonly sourceId: string;
|
|
459
|
+
readonly sourceKind: import('../toolset/index.js').ToolSourceKind;
|
|
460
|
+
}
|
|
353
461
|
export interface ToolMessage extends BaseMessage {
|
|
354
462
|
role: 'tool';
|
|
355
463
|
content: ToolResultContent;
|
|
@@ -365,6 +473,19 @@ export interface ToolMessage extends BaseMessage {
|
|
|
365
473
|
* fired and namzu relied on prose formatting to convey failure.
|
|
366
474
|
*/
|
|
367
475
|
isError?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Source-bound receipts for deferred schemas loaded by a successful
|
|
478
|
+
* {@link ToolResult.reveals} (`types/tool/index.ts`). The executor writes
|
|
479
|
+
* these onto the message it built from that result.
|
|
480
|
+
*
|
|
481
|
+
* This is what `ToolManager.availability` (`toolsets/manager.ts`) scans
|
|
482
|
+
* the post-compaction history for, instead of a mutable activation map:
|
|
483
|
+
* a deferred tool is active once a matching receipt appears after the
|
|
484
|
+
* last compaction summary and the host still reports it ready. Persisted
|
|
485
|
+
* like any other message field — a session log or checkpoint already
|
|
486
|
+
* carries this too, with nothing extra to serialize.
|
|
487
|
+
*/
|
|
488
|
+
revealedTools?: readonly ToolRevealReceipt[];
|
|
368
489
|
}
|
|
369
490
|
export type Message = SystemMessage | UserMessage | AssistantMessage | ToolMessage;
|
|
370
491
|
export declare function createSystemMessage(content: string, cacheHint?: CacheHint): SystemMessage;
|
|
@@ -374,6 +495,6 @@ export declare function createRuntimeContextMessage(content: string, kind: Runti
|
|
|
374
495
|
/** Build the retained user-context message that carries live project policy. */
|
|
375
496
|
export declare function createProjectInstructionMessage(content: string, files: readonly string[]): UserMessage;
|
|
376
497
|
export declare function createAssistantMessage(content: string | null, toolCalls?: ToolCall[], reasoning?: readonly ReasoningBlock[], citations?: readonly Citation[], source?: AssistantMessageSource, textParts?: readonly AssistantTextPart[]): AssistantMessage;
|
|
377
|
-
export declare function createToolMessage(content: ToolResultContent, toolCallId: string, isError?: boolean): ToolMessage;
|
|
498
|
+
export declare function createToolMessage(content: ToolResultContent, toolCallId: string, isError?: boolean, revealedTools?: readonly ToolRevealReceipt[]): ToolMessage;
|
|
378
499
|
export { hasNonTextBlocks, toToolResultBlocks, toolResultToText, } from './content.js';
|
|
379
500
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/message/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/message/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;AAElE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAA;AAEtD,kEAAkE;AAClE,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,eAAe,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aAAa,CAOzF;AAED,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,SAAS,iBAAiB,EAAE,EAC1C,MAAM,CAAC,EAAE,iBAAiB,GACxB,WAAW,CAQb;AAED,gEAAgE;AAChE,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,yBAAyB,GAC7B,WAAW,CAKb;AAED,gFAAgF;AAChF,wBAAgB,+BAA+B,CAC9C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,MAAM,EAAE,GACtB,WAAW,CAWb;AAED,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,SAAS,CAAC,EAAE,QAAQ,EAAE,EACtB,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,EACrC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,EAC/B,MAAM,CAAC,EAAE,sBAAsB,EAC/B,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,GACtC,gBAAgB,CAWlB;AAED,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,SAAS,iBAAiB,EAAE,GAC1C,WAAW,CASb;AAED,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GAChB,MAAM,cAAc,CAAA"}
|
|
@@ -23,6 +23,8 @@ export const RUNTIME_CONTEXT_MESSAGE_KINDS = [
|
|
|
23
23
|
'auto-continuation',
|
|
24
24
|
'job-exit',
|
|
25
25
|
'limit-finalization',
|
|
26
|
+
'peer-message',
|
|
27
|
+
'peer-notice',
|
|
26
28
|
'repeat-call',
|
|
27
29
|
'steering',
|
|
28
30
|
'step-context',
|
|
@@ -123,12 +125,13 @@ export function createAssistantMessage(content, toolCalls, reasoning, citations,
|
|
|
123
125
|
timestamp: Date.now(),
|
|
124
126
|
};
|
|
125
127
|
}
|
|
126
|
-
export function createToolMessage(content, toolCallId, isError) {
|
|
128
|
+
export function createToolMessage(content, toolCallId, isError, revealedTools) {
|
|
127
129
|
return {
|
|
128
130
|
role: 'tool',
|
|
129
131
|
content,
|
|
130
132
|
toolCallId,
|
|
131
133
|
...(isError !== undefined ? { isError } : {}),
|
|
134
|
+
...(revealedTools && revealedTools.length > 0 ? { revealedTools } : {}),
|
|
132
135
|
timestamp: Date.now(),
|
|
133
136
|
};
|
|
134
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/message/index.ts"],"names":[],"mappings":"AAWA,gEAAgE;AAChE,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACpD,OAAO,CACN,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,CAAE,KAAuC,CAAC,MAAM,KAAK,mBAAmB;YACtE,KAAuC,CAAC,MAAM,KAAK,eAAe,CAAC,CACrE,CAAA;AACF,CAAC;AA6GD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,UAA6B,EACM,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/message/index.ts"],"names":[],"mappings":"AAWA,gEAAgE;AAChE,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACpD,OAAO,CACN,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,CAAE,KAAuC,CAAC,MAAM,KAAK,mBAAmB;YACtE,KAAuC,CAAC,MAAM,KAAK,eAAe,CAAC,CACrE,CAAA;AACF,CAAC;AA6GD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,UAA6B,EACM,EAAE,CAAC,UAAU,CAAC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
195
|
content?: ToolResultContent;
|
|
196
196
|
};
|
|
197
197
|
export declare function assertPluginHookResult(result: PluginHookResult): asserts result;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
/** Actions the query can interpret for a particular hook event. */
|
|
199
|
+
export type PluginHookResultFor<E extends PluginHookEvent> = E extends 'user_prompt_submit' ? Extract<PluginHookResult, {
|
|
200
|
+
action: 'continue' | 'annotate' | 'skip' | 'error';
|
|
201
|
+
}> : E extends 'pre_tool_use' ? Extract<PluginHookResult, {
|
|
202
|
+
action: 'continue' | 'skip' | 'modify' | 'error';
|
|
203
|
+
}> : E extends 'post_tool_use' ? Extract<PluginHookResult, {
|
|
204
|
+
action: 'continue' | 'replace' | 'retry' | 'error';
|
|
205
|
+
}> : E extends 'turn_interrupt' | 'session_start' | 'session_end' ? Extract<PluginHookResult, {
|
|
206
|
+
action: 'continue';
|
|
207
|
+
}> : Extract<PluginHookResult, {
|
|
208
|
+
action: 'continue' | 'error';
|
|
209
|
+
}>;
|
|
210
|
+
/** The event and its handler verdict stay correlated, including in hook arrays. */
|
|
211
|
+
export type PluginHookDefinition<E extends PluginHookEvent = PluginHookEvent> = E extends PluginHookEvent ? {
|
|
212
|
+
readonly event: E;
|
|
213
|
+
readonly handler: (context: PluginHookContext) => Promise<PluginHookResultFor<E>>;
|
|
201
214
|
/**
|
|
202
215
|
* Lower runs first. Default 100.
|
|
203
216
|
*
|
|
@@ -214,7 +227,7 @@ export interface PluginHookDefinition {
|
|
|
214
227
|
* above.
|
|
215
228
|
*/
|
|
216
229
|
readonly priority?: number;
|
|
217
|
-
}
|
|
230
|
+
} : never;
|
|
218
231
|
export interface PluginMCPServerConfig {
|
|
219
232
|
readonly name: string;
|
|
220
233
|
readonly command: string;
|
|
@@ -226,6 +239,8 @@ export interface PluginManifest {
|
|
|
226
239
|
readonly version: string;
|
|
227
240
|
readonly description: string;
|
|
228
241
|
readonly author?: string;
|
|
242
|
+
/** Plugin-authored request context, present only while this plugin is enabled. */
|
|
243
|
+
readonly instructions?: string;
|
|
229
244
|
readonly tools?: readonly string[];
|
|
230
245
|
readonly skills?: readonly string[];
|
|
231
246
|
readonly hooks?: readonly string[];
|
|
@@ -254,6 +269,7 @@ export declare const PluginManifestSchema: z.ZodObject<{
|
|
|
254
269
|
version: z.ZodString;
|
|
255
270
|
description: z.ZodString;
|
|
256
271
|
author: z.ZodOptional<z.ZodString>;
|
|
272
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
257
273
|
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
258
274
|
skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
259
275
|
hooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -282,6 +298,7 @@ export declare const PluginManifestSchema: z.ZodObject<{
|
|
|
282
298
|
skills?: string[] | undefined;
|
|
283
299
|
tools?: string[] | undefined;
|
|
284
300
|
author?: string | undefined;
|
|
301
|
+
instructions?: string | undefined;
|
|
285
302
|
hooks?: string[] | undefined;
|
|
286
303
|
mcpServers?: {
|
|
287
304
|
name: string;
|
|
@@ -298,6 +315,7 @@ export declare const PluginManifestSchema: z.ZodObject<{
|
|
|
298
315
|
skills?: string[] | undefined;
|
|
299
316
|
tools?: string[] | undefined;
|
|
300
317
|
author?: string | undefined;
|
|
318
|
+
instructions?: string | undefined;
|
|
301
319
|
hooks?: string[] | undefined;
|
|
302
320
|
mcpServers?: {
|
|
303
321
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,OAAO,KAAK,EACX,oBAAoB,EACpB,sBAAsB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAA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Q,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACzE;IACA,IAAI,EAAE,sBAAsB,CAAA;IAC5B,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;CACjB,CAAA;AAEJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA"}
|
|
@@ -108,6 +108,7 @@ export const PluginManifestSchema = z.object({
|
|
|
108
108
|
version: z.string().min(1),
|
|
109
109
|
description: z.string().min(1),
|
|
110
110
|
author: z.string().optional(),
|
|
111
|
+
instructions: z.string().min(1).optional(),
|
|
111
112
|
tools: z.array(z.string()).max(MAX_TOOLS_PER_PLUGIN).optional(),
|
|
112
113
|
skills: z.array(z.string()).max(MAX_SKILLS_PER_PLUGIN).optional(),
|
|
113
114
|
hooks: z.array(z.string()).max(MAX_HOOKS_PER_PLUGIN).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACN,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACtB,MAAM,iCAAiC,CAAA;AAgBxC,MAAM,UAAU,iBAAiB,CAAC,KAAkB;IACnD,QAAQ,KAAK,EAAE,CAAC;QACf,KAAK,SAAS,CAAC;QACf,KAAK,MAAM;YACV,OAAM;QACP,OAAO,CAAC,CAAC,CAAC;YACT,MAAM,WAAW,GAAU,KAAK,CAAA;YAChC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,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;IAC3F,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE;IACzE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;CACrE,CAAC,CAAA"}
|
|
@@ -172,6 +172,11 @@ export interface ChatCompletionResponse {
|
|
|
172
172
|
citations?: readonly import('../message/index.js').Citation[];
|
|
173
173
|
};
|
|
174
174
|
finishReason: 'stop' | 'tool_calls' | 'length' | 'content_filter';
|
|
175
|
+
/**
|
|
176
|
+
* `'context_window'` when a `'length'` finish was the model's context
|
|
177
|
+
* window rather than the output token limit; see `StreamChunk.finishDetail`.
|
|
178
|
+
*/
|
|
179
|
+
finishDetail?: 'context_window';
|
|
175
180
|
usage: TokenUsage;
|
|
176
181
|
}
|
|
177
182
|
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/types/provider/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,MAAM,UAAU,GACnB,MAAM,GACN,MAAM,GACN,UAAU,GACV;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAA;AAEnD,MAAM,MAAM,cAAc,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ACrC,yEAAyE;QACzE,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,kEAAkE;QAClE,SAAS,CAAC,EAAE,SAAS,OAAO,qBAAqB,EAAE,QAAQ,EAAE,CAAA;KAC7D,CAAA;IACD,YAAY,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,gBAAgB,CAAA;IACjE;;;OAGG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,KAAK,EAAE,UAAU,CAAA;CACjB"}
|
|
@@ -34,9 +34,14 @@ export interface MockToolCall {
|
|
|
34
34
|
/** Fragment size for the argument JSON; smaller exercises more buffering. */
|
|
35
35
|
argChunkSize?: number;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* Send only the first half of the arguments, omit the block-close signal
|
|
38
|
+
* and finish with `'length'` (unless the turn sets `finishReason`),
|
|
39
|
+
* reproducing the provider cutting a tool call off at `max_tokens`. The
|
|
40
|
+
* response ends at this call, as an output limit ends it: later calls in
|
|
41
|
+
* the turn's `toolCalls` are not streamed. The consumer should mark the
|
|
42
|
+
* call `inputTruncated` with a `truncated` `inputError` rather than
|
|
43
|
+
* crashing on a parse; under a scripted `finishReason` of `'stop'` or
|
|
44
|
+
* `'tool_calls'` it is `malformed` instead.
|
|
40
45
|
*/
|
|
41
46
|
truncateArguments?: boolean;
|
|
42
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/types/provider/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,kBAAkB,CAAA;CACxB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,sBAAsB,GAAG,MAAM,CAAA;AAEhE,MAAM,MAAM,qBAAqB,GAAG;KAClC,CA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link content}. Absent means the model. `'driver'` marks
|
|
32
|
+
* text a driver adds of its own after the model's output, such as a
|
|
33
|
+
* list of the sources a hosted search used. It is shown and kept in
|
|
34
|
+
* the message like any other text, but it is not output the model
|
|
35
|
+
* produced: the turn loop does not read it as the model moving on from
|
|
36
|
+
* its last tool call, which would turn a call the output limit cut
|
|
37
|
+
* off into a malformed one.
|
|
38
|
+
*/
|
|
39
|
+
contentOrigin?: 'driver';
|
|
30
40
|
/** Identity and phase of this content fragment, when the provider supplies them. */
|
|
31
41
|
textPart?: Omit<import('../message/index.js').AssistantTextPart, 'text'>;
|
|
42
|
+
/**
|
|
43
|
+
* Fragments of tool calls. `index` is what groups them: every fragment
|
|
44
|
+
* of one call carries the same index, and no other call in the
|
|
45
|
+
* response uses it. The call's `id` and `function.name` may arrive on
|
|
46
|
+
* any of its fragments, including after arguments; arguments that
|
|
47
|
+
* arrive first are kept for the call at their index. The turn loop gives
|
|
48
|
+
* a call whose id never arrives, here or on `toolCallEnd`, an id of its
|
|
49
|
+
* own. A second id on an index another call holds is refused, by the
|
|
50
|
+
* turn loop and by `collectChatCompletion`.
|
|
51
|
+
*/
|
|
32
52
|
toolCalls?: Array<{
|
|
33
53
|
index: number;
|
|
34
54
|
id?: string;
|
|
@@ -50,6 +70,12 @@ export interface StreamChunk {
|
|
|
50
70
|
* leave this undefined; the orchestrator infers from
|
|
51
71
|
* end-of-stream instead.
|
|
52
72
|
*
|
|
73
|
+
* `id` fills in the call's id when no fragment carried one. The
|
|
74
|
+
* completion always carries the id the call was announced with, and
|
|
75
|
+
* follows the announcement: a close with an empty `id` for a call no
|
|
76
|
+
* fragment named, or for a call whose name has not arrived, is
|
|
77
|
+
* settled when the stream ends instead.
|
|
78
|
+
*
|
|
53
79
|
* Added 2026-05-01 (ses_001-tool-stream-events A9).
|
|
54
80
|
*/
|
|
55
81
|
toolCallEnd?: {
|
|
@@ -89,6 +115,19 @@ export interface StreamChunk {
|
|
|
89
115
|
citation?: import('../message/index.js').Citation;
|
|
90
116
|
};
|
|
91
117
|
finishReason?: 'stop' | 'tool_calls' | 'length' | 'content_filter';
|
|
118
|
+
/**
|
|
119
|
+
* Which limit a `'length'` finish reached, when it was not the output
|
|
120
|
+
* token limit: `'context_window'` when the response filled the model's
|
|
121
|
+
* context window (a stop reason such as `model_context_window_exceeded`
|
|
122
|
+
* or `model_length`).
|
|
123
|
+
*
|
|
124
|
+
* Both stop the output where it stands, so both are `'length'`, and a
|
|
125
|
+
* tool call either one cut off is truncated. They differ in what can
|
|
126
|
+
* follow: after the output limit the turn loop asks the model to continue
|
|
127
|
+
* a reply it cut off mid-text, and after the context window there is no
|
|
128
|
+
* room to continue into. Set only with `finishReason: 'length'`.
|
|
129
|
+
*/
|
|
130
|
+
finishDetail?: 'context_window';
|
|
92
131
|
usage?: TokenUsage;
|
|
93
132
|
error?: string;
|
|
94
133
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/types/provider/stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,SAAS,OAAO,qBAAqB,EAAE,iBAAiB,EAAE,CAAA;IACtE,KAAK,EAAE;QACN,8EAA8E;QAC9E,UAAU,CAAC,EAAE;YACZ,EAAE,EAAE,MAAM,CAAA;YACV,IAAI,EAAE,YAAY,CAAA;YAClB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAA;YAC1C;;;;eAIG;YACH,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,8FAA8F;YAC9F,GAAG,CAAC,EAAE,MAAM,CAAA;YACZ,4FAA4F;YAC5F,OAAO,CAAC,EAAE,MAAM,CAAA;SAChB,CAAA;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;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,uEAAuE;IACvE,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;CAChC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -364,7 +364,7 @@ export interface SandboxDestroyOptions {
|
|
|
364
364
|
* - `azureFileShare` — mount an Azure Files SMB share into the
|
|
365
365
|
* container. Used by managed Azure Container Instances (incl.
|
|
366
366
|
* Standby Pool) which have no host filesystem to bind from; the
|
|
367
|
-
*
|
|
367
|
+
* host provisions a per-task share before claim and
|
|
368
368
|
* the ACI backend translates this variant to ACI's `volume +
|
|
369
369
|
* azureFile` shape.
|
|
370
370
|
*/
|
|
@@ -1067,11 +1067,22 @@ type CoreSessionEvent = {
|
|
|
1067
1067
|
toolUseId: ToolUseId;
|
|
1068
1068
|
input: unknown;
|
|
1069
1069
|
/**
|
|
1070
|
-
* True when the
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1070
|
+
* True when the streamed arguments could not be read, whether the
|
|
1071
|
+
* response stopped before they closed or they were not valid JSON;
|
|
1072
|
+
* {@link inputError} says which. `input` is then `{}`, a sanitized
|
|
1073
|
+
* object, so public consumers never receive internal recovery
|
|
1074
|
+
* sentinels.
|
|
1073
1075
|
*/
|
|
1074
1076
|
inputTruncated?: boolean;
|
|
1077
|
+
/** Why the arguments could not be read. Present exactly when `inputTruncated` is. */
|
|
1078
|
+
inputError?: import('../message/index.js').ToolInputError;
|
|
1079
|
+
/**
|
|
1080
|
+
* The arguments as they arrived, when they could not be read: at most
|
|
1081
|
+
* the first 16 384 characters, with `inputError.length` saying how many
|
|
1082
|
+
* there were. The whole text stays on the assistant message, as
|
|
1083
|
+
* `ToolCall.metadata.partialArguments`.
|
|
1084
|
+
*/
|
|
1085
|
+
partialArguments?: string;
|
|
1075
1086
|
};
|
|
1076
1087
|
/**
|
|
1077
1088
|
* A child session was created to do delegated work. Appended to the PARENT
|