@namzu/sdk 27.0.0 → 28.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 +1714 -0
- package/README.md +45 -42
- package/dist/advisory/executor.d.ts.map +1 -1
- package/dist/advisory/executor.js +14 -12
- package/dist/advisory/executor.js.map +1 -1
- package/dist/advisory/registry.d.ts +2 -2
- package/dist/advisory/registry.d.ts.map +1 -1
- package/dist/advisory/registry.js +2 -2
- package/dist/advisory/registry.js.map +1 -1
- package/dist/agents/AbstractAgent.d.ts +44 -2
- package/dist/agents/AbstractAgent.d.ts.map +1 -1
- package/dist/agents/AbstractAgent.js +62 -13
- package/dist/agents/AbstractAgent.js.map +1 -1
- package/dist/agents/PipelineAgent.d.ts +29 -1
- package/dist/agents/PipelineAgent.d.ts.map +1 -1
- package/dist/agents/PipelineAgent.js +33 -4
- package/dist/agents/PipelineAgent.js.map +1 -1
- package/dist/agents/ReactiveAgent.d.ts +2 -1
- package/dist/agents/ReactiveAgent.d.ts.map +1 -1
- package/dist/agents/ReactiveAgent.js +15 -5
- package/dist/agents/ReactiveAgent.js.map +1 -1
- package/dist/agents/RouterAgent.d.ts +2 -1
- package/dist/agents/RouterAgent.d.ts.map +1 -1
- package/dist/agents/RouterAgent.js +21 -13
- package/dist/agents/RouterAgent.js.map +1 -1
- package/dist/agents/SupervisorAgent.d.ts +3 -2
- package/dist/agents/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/SupervisorAgent.js +29 -14
- package/dist/agents/SupervisorAgent.js.map +1 -1
- package/dist/agents/handle.d.ts +85 -0
- package/dist/agents/handle.d.ts.map +1 -0
- package/dist/agents/handle.js +79 -0
- package/dist/agents/handle.js.map +1 -0
- package/dist/agents/runAgent.d.ts +10 -5
- package/dist/agents/runAgent.d.ts.map +1 -1
- package/dist/agents/runAgent.js +3 -2
- package/dist/agents/runAgent.js.map +1 -1
- package/dist/{verification → authorization}/gate.d.ts +4 -4
- package/dist/authorization/gate.d.ts.map +1 -0
- package/dist/{verification → authorization}/gate.js +31 -24
- package/dist/authorization/gate.js.map +1 -0
- package/dist/authorization/index.d.ts +6 -0
- package/dist/authorization/index.d.ts.map +1 -0
- package/dist/authorization/index.js +14 -0
- package/dist/authorization/index.js.map +1 -0
- package/dist/authorization/permission-presets.d.ts +119 -0
- package/dist/authorization/permission-presets.d.ts.map +1 -0
- package/dist/authorization/permission-presets.js +137 -0
- package/dist/authorization/permission-presets.js.map +1 -0
- package/dist/{verification → authorization}/presets.d.ts +3 -3
- package/dist/authorization/presets.d.ts.map +1 -0
- package/dist/{verification → authorization}/presets.js +12 -0
- package/dist/authorization/presets.js.map +1 -0
- package/dist/authorization/rules.d.ts +4 -0
- package/dist/authorization/rules.d.ts.map +1 -0
- package/dist/{verification → authorization}/rules.js +14 -1
- package/dist/authorization/rules.js.map +1 -0
- package/dist/bridge/a2a/client.d.ts +107 -0
- package/dist/bridge/a2a/client.d.ts.map +1 -0
- package/dist/bridge/a2a/client.js +275 -0
- package/dist/bridge/a2a/client.js.map +1 -0
- package/dist/bridge/a2a/mapper.d.ts.map +1 -1
- package/dist/bridge/a2a/mapper.js +16 -0
- package/dist/bridge/a2a/mapper.js.map +1 -1
- package/dist/bridge/acp/filesystem.d.ts +33 -0
- package/dist/bridge/acp/filesystem.d.ts.map +1 -0
- package/dist/bridge/acp/filesystem.js +30 -0
- package/dist/bridge/acp/filesystem.js.map +1 -0
- package/dist/bridge/acp/index.d.ts +8 -0
- package/dist/bridge/acp/index.d.ts.map +1 -0
- package/dist/bridge/acp/index.js +5 -0
- package/dist/bridge/acp/index.js.map +1 -0
- package/dist/bridge/acp/permission.d.ts +51 -0
- package/dist/bridge/acp/permission.d.ts.map +1 -0
- package/dist/bridge/acp/permission.js +37 -0
- package/dist/bridge/acp/permission.js.map +1 -0
- package/dist/bridge/acp/server.d.ts +163 -0
- package/dist/bridge/acp/server.d.ts.map +1 -0
- package/dist/bridge/acp/server.js +312 -0
- package/dist/bridge/acp/server.js.map +1 -0
- package/dist/bridge/acp/update.d.ts +13 -0
- package/dist/bridge/acp/update.d.ts.map +1 -0
- package/dist/bridge/acp/update.js +94 -0
- package/dist/bridge/acp/update.js.map +1 -0
- package/dist/bridge/mcp/connector/adapter.d.ts +2 -0
- package/dist/bridge/mcp/connector/adapter.d.ts.map +1 -1
- package/dist/bridge/mcp/connector/adapter.js +7 -3
- package/dist/bridge/mcp/connector/adapter.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +27 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/bus/breaker.d.ts.map +1 -1
- package/dist/bus/breaker.js +15 -10
- package/dist/bus/breaker.js.map +1 -1
- package/dist/bus/index.d.ts.map +1 -1
- package/dist/bus/index.js +10 -8
- package/dist/bus/index.js.map +1 -1
- package/dist/bus/lock.d.ts.map +1 -1
- package/dist/bus/lock.js +36 -19
- package/dist/bus/lock.js.map +1 -1
- package/dist/bus/ownership.d.ts.map +1 -1
- package/dist/bus/ownership.js +17 -9
- package/dist/bus/ownership.js.map +1 -1
- package/dist/compaction/context-window.d.ts +18 -2
- package/dist/compaction/context-window.d.ts.map +1 -1
- package/dist/compaction/context-window.js +15 -1
- package/dist/compaction/context-window.js.map +1 -1
- package/dist/compaction/index.d.ts +3 -0
- package/dist/compaction/index.d.ts.map +1 -1
- package/dist/compaction/index.js +4 -0
- package/dist/compaction/index.js.map +1 -1
- package/dist/compaction/manual.d.ts +58 -0
- package/dist/compaction/manual.d.ts.map +1 -0
- package/dist/compaction/manual.js +104 -0
- package/dist/compaction/manual.js.map +1 -0
- package/dist/compaction/plan.d.ts +92 -0
- package/dist/compaction/plan.d.ts.map +1 -0
- package/dist/compaction/plan.js +149 -0
- package/dist/compaction/plan.js.map +1 -0
- package/dist/compaction/summary.d.ts +23 -0
- package/dist/compaction/summary.d.ts.map +1 -0
- package/dist/compaction/summary.js +27 -0
- package/dist/compaction/summary.js.map +1 -0
- package/dist/compaction/verifier.js +2 -2
- package/dist/compaction/verifier.js.map +1 -1
- package/dist/config/registry.d.ts +104 -0
- package/dist/config/registry.d.ts.map +1 -0
- package/dist/config/registry.js +105 -0
- package/dist/config/registry.js.map +1 -0
- package/dist/config/runtime.d.ts +99 -28
- package/dist/config/runtime.d.ts.map +1 -1
- package/dist/config/runtime.js +27 -0
- package/dist/config/runtime.js.map +1 -1
- package/dist/connector/BaseConnector.d.ts +1 -1
- package/dist/connector/BaseConnector.d.ts.map +1 -1
- package/dist/connector/BaseConnector.js +8 -3
- package/dist/connector/BaseConnector.js.map +1 -1
- package/dist/connector/builtins/http.d.ts +1 -1
- package/dist/connector/builtins/http.d.ts.map +1 -1
- package/dist/connector/builtins/http.js +11 -2
- package/dist/connector/builtins/http.js.map +1 -1
- package/dist/connector/builtins/webhook.d.ts +1 -1
- package/dist/connector/builtins/webhook.d.ts.map +1 -1
- package/dist/connector/builtins/webhook.js +5 -2
- package/dist/connector/builtins/webhook.js.map +1 -1
- package/dist/connector/index.d.ts +4 -15
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +12 -12
- package/dist/connector/index.js.map +1 -1
- package/dist/connector/mcp/adapter.d.ts +30 -0
- package/dist/connector/mcp/adapter.d.ts.map +1 -1
- package/dist/connector/mcp/adapter.js +43 -1
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +31 -20
- package/dist/connector/mcp/client.js.map +1 -1
- package/dist/connector/mcp/discovery.d.ts.map +1 -1
- package/dist/connector/mcp/discovery.js +31 -20
- package/dist/connector/mcp/discovery.js.map +1 -1
- package/dist/connector/mcp/http-sse.d.ts +2 -1
- package/dist/connector/mcp/http-sse.d.ts.map +1 -1
- package/dist/connector/mcp/http-sse.js +9 -6
- package/dist/connector/mcp/http-sse.js.map +1 -1
- package/dist/connector/mcp/index.d.ts +2 -3
- package/dist/connector/mcp/index.d.ts.map +1 -1
- package/dist/connector/mcp/index.js +5 -4
- package/dist/connector/mcp/index.js.map +1 -1
- package/dist/connector/mcp/reconnect.d.ts +123 -0
- package/dist/connector/mcp/reconnect.d.ts.map +1 -0
- package/dist/connector/mcp/reconnect.js +121 -0
- package/dist/connector/mcp/reconnect.js.map +1 -0
- package/dist/connector/mcp/server/index.d.ts +28 -0
- package/dist/connector/mcp/server/index.d.ts.map +1 -0
- package/dist/connector/mcp/server/index.js +27 -0
- package/dist/connector/mcp/server/index.js.map +1 -0
- package/dist/connector/mcp/{server-stdio.d.ts → server/server-stdio.d.ts} +3 -2
- package/dist/connector/mcp/server/server-stdio.d.ts.map +1 -0
- package/dist/connector/mcp/{server-stdio.js → server/server-stdio.js} +4 -3
- package/dist/connector/mcp/server/server-stdio.js.map +1 -0
- package/dist/connector/mcp/{server.d.ts → server/server.d.ts} +5 -4
- package/dist/connector/mcp/server/server.d.ts.map +1 -0
- package/dist/connector/mcp/{server.js → server/server.js} +14 -9
- package/dist/connector/mcp/server/server.js.map +1 -0
- package/dist/connector/mcp/stdio.d.ts +2 -1
- package/dist/connector/mcp/stdio.d.ts.map +1 -1
- package/dist/connector/mcp/stdio.js +15 -7
- package/dist/connector/mcp/stdio.js.map +1 -1
- package/dist/connector/mcp/streamable-http.d.ts +2 -1
- package/dist/connector/mcp/streamable-http.d.ts.map +1 -1
- package/dist/connector/mcp/streamable-http.js +5 -4
- package/dist/connector/mcp/streamable-http.js.map +1 -1
- package/dist/{bridge/tools/connector → connector/tools}/adapter.d.ts +4 -4
- package/dist/connector/tools/adapter.d.ts.map +1 -0
- package/dist/{bridge/tools/connector → connector/tools}/adapter.js +1 -1
- package/dist/connector/tools/adapter.js.map +1 -0
- package/dist/{bridge/tools/connector → connector/tools}/definitions.d.ts +2 -2
- package/dist/connector/tools/definitions.d.ts.map +1 -0
- package/dist/{bridge/tools/connector → connector/tools}/definitions.js +2 -2
- package/dist/connector/tools/definitions.js.map +1 -0
- package/dist/connector/tools/index.d.ts.map +1 -0
- package/dist/connector/tools/index.js.map +1 -0
- package/dist/{bridge/tools/connector → connector/tools}/router.d.ts +4 -2
- package/dist/connector/tools/router.d.ts.map +1 -0
- package/dist/{bridge/tools/connector → connector/tools}/router.js +14 -7
- package/dist/connector/tools/router.js.map +1 -0
- package/dist/connector/web/guarded-fetch.d.ts +60 -0
- package/dist/connector/web/guarded-fetch.d.ts.map +1 -0
- package/dist/connector/web/guarded-fetch.js +233 -0
- package/dist/connector/web/guarded-fetch.js.map +1 -0
- package/dist/connector/web/index.d.ts +5 -0
- package/dist/connector/web/index.d.ts.map +1 -0
- package/dist/connector/web/index.js +7 -0
- package/dist/connector/web/index.js.map +1 -0
- package/dist/connector/web/types.d.ts +87 -0
- package/dist/connector/web/types.d.ts.map +1 -0
- package/dist/connector/web/types.js +25 -0
- package/dist/connector/web/types.js.map +1 -0
- package/dist/constants/acp/index.d.ts +97 -0
- package/dist/constants/acp/index.d.ts.map +1 -0
- package/dist/constants/acp/index.js +96 -0
- package/dist/constants/acp/index.js.map +1 -0
- package/dist/constants/authorization/index.d.ts.map +1 -0
- package/dist/constants/authorization/index.js.map +1 -0
- package/dist/constants/credential-env-keys.d.ts +36 -0
- package/dist/constants/credential-env-keys.d.ts.map +1 -0
- package/dist/constants/credential-env-keys.js +62 -0
- package/dist/constants/credential-env-keys.js.map +1 -0
- package/dist/constants/index.d.ts +3 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/secret-patterns.d.ts +78 -0
- package/dist/constants/secret-patterns.d.ts.map +1 -0
- package/dist/constants/secret-patterns.js +99 -0
- package/dist/constants/secret-patterns.js.map +1 -0
- package/dist/constants/telemetry/index.d.ts +42 -0
- package/dist/constants/telemetry/index.d.ts.map +1 -1
- package/dist/constants/telemetry/index.js +87 -0
- package/dist/constants/telemetry/index.js.map +1 -1
- package/dist/contracts/a2a.d.ts +54 -54
- package/dist/contracts/api.d.ts +12 -1
- package/dist/contracts/api.d.ts.map +1 -1
- package/dist/contracts/schemas.d.ts +12 -12
- package/dist/deprecated-aliases.d.ts +80 -0
- package/dist/deprecated-aliases.d.ts.map +1 -0
- package/dist/deprecated-aliases.js +60 -0
- package/dist/deprecated-aliases.js.map +1 -0
- package/dist/eval/judge.js +2 -2
- package/dist/eval/judge.js.map +1 -1
- package/dist/execution/base.d.ts +1 -1
- package/dist/execution/base.d.ts.map +1 -1
- package/dist/execution/base.js +18 -7
- package/dist/execution/base.js.map +1 -1
- package/dist/execution/code-runtime/types.d.ts +114 -0
- package/dist/execution/code-runtime/types.d.ts.map +1 -0
- package/dist/execution/code-runtime/types.js +40 -0
- package/dist/execution/code-runtime/types.js.map +1 -0
- package/dist/execution/code-runtime/worker.d.ts +6 -0
- package/dist/execution/code-runtime/worker.d.ts.map +1 -0
- package/dist/execution/code-runtime/worker.js +248 -0
- package/dist/execution/code-runtime/worker.js.map +1 -0
- package/dist/{connector/execution → execution}/factory.d.ts +3 -3
- package/dist/execution/factory.d.ts.map +1 -0
- package/dist/{connector/execution → execution}/factory.js +1 -1
- package/dist/execution/factory.js.map +1 -0
- package/dist/{connector/execution → execution}/hybrid.d.ts +5 -3
- package/dist/execution/hybrid.d.ts.map +1 -0
- package/dist/{connector/execution → execution}/hybrid.js +10 -4
- package/dist/execution/hybrid.js.map +1 -0
- package/dist/execution/index.d.ts +23 -0
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +21 -0
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/local.d.ts +2 -0
- package/dist/execution/local.d.ts.map +1 -1
- package/dist/execution/local.js +2 -2
- package/dist/execution/local.js.map +1 -1
- package/dist/{connector/execution → execution}/remote.d.ts +4 -2
- package/dist/execution/remote.d.ts.map +1 -0
- package/dist/{connector/execution → execution}/remote.js +12 -5
- package/dist/execution/remote.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/invariants/index.d.ts +111 -0
- package/dist/invariants/index.d.ts.map +1 -0
- package/dist/invariants/index.js +138 -0
- package/dist/invariants/index.js.map +1 -0
- package/dist/manager/agent/lifecycle.d.ts +29 -7
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +140 -50
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/connector/environment.d.ts +2 -0
- package/dist/manager/connector/environment.d.ts.map +1 -1
- package/dist/manager/connector/environment.js +20 -9
- package/dist/manager/connector/environment.js.map +1 -1
- package/dist/manager/connector/lifecycle.d.ts +10 -0
- package/dist/manager/connector/lifecycle.d.ts.map +1 -1
- package/dist/manager/connector/lifecycle.js +21 -11
- package/dist/manager/connector/lifecycle.js.map +1 -1
- package/dist/manager/connector/tenant.d.ts +9 -0
- package/dist/manager/connector/tenant.d.ts.map +1 -1
- package/dist/manager/connector/tenant.js +24 -10
- package/dist/manager/connector/tenant.js.map +1 -1
- package/dist/manager/index.d.ts +6 -2
- package/dist/manager/index.d.ts.map +1 -1
- package/dist/manager/index.js +7 -1
- package/dist/manager/index.js.map +1 -1
- package/dist/manager/project/lifecycle.d.ts +1 -1
- package/dist/manager/project/lifecycle.js +1 -1
- package/dist/manager/run/emergency.d.ts.map +1 -1
- package/dist/manager/run/emergency.js +9 -7
- package/dist/manager/run/emergency.js.map +1 -1
- package/dist/manager/run/persistence.d.ts +46 -4
- package/dist/manager/run/persistence.d.ts.map +1 -1
- package/dist/manager/run/persistence.js +102 -7
- package/dist/manager/run/persistence.js.map +1 -1
- package/dist/manager/topic/lifecycle.d.ts +123 -0
- package/dist/manager/topic/lifecycle.d.ts.map +1 -0
- package/dist/manager/{thread → topic}/lifecycle.js +79 -61
- package/dist/manager/topic/lifecycle.js.map +1 -0
- package/dist/manager/topic/objective.d.ts +77 -0
- package/dist/manager/topic/objective.d.ts.map +1 -0
- package/dist/manager/topic/objective.js +133 -0
- package/dist/manager/topic/objective.js.map +1 -0
- package/dist/model-router/task-router.d.ts.map +1 -0
- package/dist/model-router/task-router.js.map +1 -0
- package/dist/persona/assembler.d.ts +1 -1
- package/dist/persona/assembler.d.ts.map +1 -1
- package/dist/persona/assembler.js +14 -2
- package/dist/persona/assembler.js.map +1 -1
- package/dist/plugin/lifecycle.d.ts +24 -0
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +112 -20
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/loader.d.ts +17 -2
- package/dist/plugin/loader.d.ts.map +1 -1
- package/dist/plugin/loader.js +46 -26
- package/dist/plugin/loader.js.map +1 -1
- package/dist/probe/index.d.ts +1 -0
- package/dist/probe/index.d.ts.map +1 -1
- package/dist/probe/registry.d.ts +34 -1
- package/dist/probe/registry.d.ts.map +1 -1
- package/dist/probe/registry.js +5 -4
- package/dist/probe/registry.js.map +1 -1
- package/dist/process/kill-tree.d.ts +40 -0
- package/dist/process/kill-tree.d.ts.map +1 -0
- package/dist/process/kill-tree.js +54 -0
- package/dist/process/kill-tree.js.map +1 -0
- package/dist/prompt/contributions.d.ts +138 -0
- package/dist/prompt/contributions.d.ts.map +1 -0
- package/dist/prompt/contributions.js +78 -0
- package/dist/prompt/contributions.js.map +1 -0
- package/dist/prompt/index.d.ts +3 -0
- package/dist/prompt/index.d.ts.map +1 -0
- package/dist/prompt/index.js +6 -0
- package/dist/prompt/index.js.map +1 -0
- package/dist/provider/attribution.d.ts +45 -0
- package/dist/provider/attribution.d.ts.map +1 -0
- package/dist/provider/attribution.js +23 -0
- package/dist/provider/attribution.js.map +1 -0
- package/dist/provider/{collect.d.ts → collect-chat-completion.d.ts} +3 -3
- package/dist/provider/collect-chat-completion.d.ts.map +1 -0
- package/dist/provider/{collect.js → collect-chat-completion.js} +3 -3
- package/dist/provider/collect-chat-completion.js.map +1 -0
- package/dist/provider/conformance.d.ts +93 -0
- package/dist/provider/conformance.d.ts.map +1 -0
- package/dist/provider/conformance.js +124 -0
- package/dist/provider/conformance.js.map +1 -0
- package/dist/provider/errors.d.ts +29 -0
- package/dist/provider/errors.d.ts.map +1 -1
- package/dist/provider/errors.js +27 -10
- package/dist/provider/errors.js.map +1 -1
- package/dist/provider/fallback.d.ts +1 -1
- package/dist/provider/fallback.d.ts.map +1 -1
- package/dist/provider/fallback.js +27 -9
- package/dist/provider/fallback.js.map +1 -1
- package/dist/provider/idle-timeout.d.ts +47 -0
- package/dist/provider/idle-timeout.d.ts.map +1 -0
- package/dist/provider/idle-timeout.js +61 -0
- package/dist/provider/idle-timeout.js.map +1 -0
- package/dist/provider/instrumentation.d.ts +3 -2
- package/dist/provider/instrumentation.d.ts.map +1 -1
- package/dist/provider/instrumentation.js.map +1 -1
- package/dist/provider/retry.d.ts.map +1 -1
- package/dist/provider/retry.js +58 -21
- package/dist/provider/retry.js.map +1 -1
- package/dist/public-runtime.d.ts +79 -15
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +173 -17
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +8 -1
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +29 -1
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +21 -4
- package/dist/public-types.d.ts.map +1 -1
- package/dist/rag/rag-tool.d.ts.map +1 -1
- package/dist/rag/rag-tool.js +4 -1
- package/dist/rag/rag-tool.js.map +1 -1
- package/dist/read-model/index.d.ts +5 -0
- package/dist/read-model/index.d.ts.map +1 -0
- package/dist/read-model/index.js +7 -0
- package/dist/read-model/index.js.map +1 -0
- package/dist/read-model/registry.d.ts +112 -0
- package/dist/read-model/registry.d.ts.map +1 -0
- package/dist/read-model/registry.js +105 -0
- package/dist/read-model/registry.js.map +1 -0
- package/dist/read-model/run-status.d.ts +43 -0
- package/dist/read-model/run-status.d.ts.map +1 -0
- package/dist/read-model/run-status.js +89 -0
- package/dist/read-model/run-status.js.map +1 -0
- package/dist/registry/{Registry.d.ts → BaseRegistry.d.ts} +2 -2
- package/dist/registry/BaseRegistry.d.ts.map +1 -0
- package/dist/registry/{Registry.js → BaseRegistry.js} +2 -2
- package/dist/registry/BaseRegistry.js.map +1 -0
- package/dist/registry/ManagedRegistry.d.ts +2 -2
- package/dist/registry/ManagedRegistry.d.ts.map +1 -1
- package/dist/registry/ManagedRegistry.js +26 -9
- package/dist/registry/ManagedRegistry.js.map +1 -1
- package/dist/registry/command/index-exports.d.ts +3 -0
- package/dist/registry/command/index-exports.d.ts.map +1 -0
- package/dist/registry/command/index-exports.js +5 -0
- package/dist/registry/command/index-exports.js.map +1 -0
- package/dist/registry/command/index.d.ts +53 -0
- package/dist/registry/command/index.d.ts.map +1 -0
- package/dist/registry/command/index.js +87 -0
- package/dist/registry/command/index.js.map +1 -0
- package/dist/registry/command/kernel-commands.d.ts +32 -0
- package/dist/registry/command/kernel-commands.d.ts.map +1 -0
- package/dist/registry/command/kernel-commands.js +78 -0
- package/dist/registry/command/kernel-commands.js.map +1 -0
- package/dist/registry/connector/scoped.d.ts +2 -1
- package/dist/registry/connector/scoped.d.ts.map +1 -1
- package/dist/registry/connector/scoped.js +6 -5
- package/dist/registry/connector/scoped.js.map +1 -1
- package/dist/registry/index.d.ts +4 -1
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +5 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/tool/execute.d.ts +1 -0
- package/dist/registry/tool/execute.d.ts.map +1 -1
- package/dist/registry/tool/execute.js +46 -13
- package/dist/registry/tool/execute.js.map +1 -1
- package/dist/registry/tool/presentation.d.ts +32 -0
- package/dist/registry/tool/presentation.d.ts.map +1 -0
- package/dist/registry/tool/presentation.js +92 -0
- package/dist/registry/tool/presentation.js.map +1 -0
- package/dist/registry/tool/screen.d.ts +33 -0
- package/dist/registry/tool/screen.d.ts.map +1 -0
- package/dist/registry/tool/screen.js +103 -0
- package/dist/registry/tool/screen.js.map +1 -0
- package/dist/run/drain.d.ts +13 -3
- package/dist/run/drain.d.ts.map +1 -1
- package/dist/run/drain.js +10 -0
- package/dist/run/drain.js.map +1 -1
- package/dist/run/reporter.d.ts.map +1 -1
- package/dist/run/reporter.js +203 -149
- package/dist/run/reporter.js.map +1 -1
- package/dist/run-query/index.d.ts +74 -0
- package/dist/run-query/index.d.ts.map +1 -0
- package/dist/run-query/index.js +73 -0
- package/dist/run-query/index.js.map +1 -0
- package/dist/runtime/bidi/session.d.ts.map +1 -1
- package/dist/runtime/bidi/session.js +7 -2
- package/dist/runtime/bidi/session.js.map +1 -1
- package/dist/runtime/decision/fallback.d.ts.map +1 -1
- package/dist/runtime/decision/fallback.js +6 -3
- package/dist/runtime/decision/fallback.js.map +1 -1
- package/dist/runtime/decision/parser.d.ts.map +1 -1
- package/dist/runtime/decision/parser.js +10 -9
- package/dist/runtime/decision/parser.js.map +1 -1
- package/dist/runtime/jobs/registry.d.ts +147 -0
- package/dist/runtime/jobs/registry.d.ts.map +1 -0
- package/dist/runtime/jobs/registry.js +242 -0
- package/dist/runtime/jobs/registry.js.map +1 -0
- package/dist/runtime/query/approval-policy.d.ts +22 -0
- package/dist/runtime/query/approval-policy.d.ts.map +1 -0
- package/dist/runtime/query/approval-policy.js +61 -0
- package/dist/runtime/query/approval-policy.js.map +1 -0
- package/dist/runtime/query/checkpoint.d.ts +3 -3
- package/dist/runtime/query/checkpoint.d.ts.map +1 -1
- package/dist/runtime/query/checkpoint.js +2 -2
- package/dist/runtime/query/checkpoint.js.map +1 -1
- package/dist/runtime/query/context.d.ts +85 -15
- package/dist/runtime/query/context.d.ts.map +1 -1
- package/dist/runtime/query/context.js +57 -14
- package/dist/runtime/query/context.js.map +1 -1
- package/dist/runtime/query/events.d.ts +5 -4
- package/dist/runtime/query/events.d.ts.map +1 -1
- package/dist/runtime/query/events.js +9 -6
- package/dist/runtime/query/events.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +113 -4
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +228 -62
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/guardrail-presets.d.ts +30 -1
- package/dist/runtime/query/guardrail-presets.d.ts.map +1 -1
- package/dist/runtime/query/guardrail-presets.js +59 -14
- package/dist/runtime/query/guardrail-presets.js.map +1 -1
- package/dist/runtime/query/guardrails.d.ts.map +1 -1
- package/dist/runtime/query/guardrails.js +16 -12
- package/dist/runtime/query/guardrails.js.map +1 -1
- package/dist/runtime/query/index.d.ts +140 -16
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +379 -76
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts +32 -0
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +256 -88
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/advisory.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/advisory.js +17 -16
- package/dist/runtime/query/iteration/phases/advisory.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.d.ts +1 -8
- package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +202 -178
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +52 -6
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js +26 -17
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts +2 -2
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +27 -7
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/iteration/phases/working-memory.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/working-memory.js +3 -2
- package/dist/runtime/query/iteration/phases/working-memory.js.map +1 -1
- package/dist/runtime/query/iteration/stream-turn.js +14 -14
- package/dist/runtime/query/iteration/stream-turn.js.map +1 -1
- package/dist/runtime/query/{context-cache.d.ts → prompt-cache.d.ts} +6 -4
- package/dist/runtime/query/prompt-cache.d.ts.map +1 -0
- package/dist/runtime/query/{context-cache.js → prompt-cache.js} +20 -2
- package/dist/runtime/query/prompt-cache.js.map +1 -0
- package/dist/runtime/query/prompt.d.ts +50 -0
- package/dist/runtime/query/prompt.d.ts.map +1 -1
- package/dist/runtime/query/prompt.js +83 -4
- package/dist/runtime/query/prompt.js.map +1 -1
- package/dist/runtime/query/repeat-call.d.ts +42 -0
- package/dist/runtime/query/repeat-call.d.ts.map +1 -0
- package/dist/runtime/query/repeat-call.js +107 -0
- package/dist/runtime/query/repeat-call.js.map +1 -0
- package/dist/runtime/query/replay/mutate.js +8 -1
- package/dist/runtime/query/replay/mutate.js.map +1 -1
- package/dist/runtime/query/result.d.ts +7 -0
- package/dist/runtime/query/result.d.ts.map +1 -1
- package/dist/runtime/query/result.js +38 -10
- package/dist/runtime/query/result.js.map +1 -1
- package/dist/runtime/query/resume-pending.d.ts.map +1 -1
- package/dist/runtime/query/resume-pending.js +19 -17
- package/dist/runtime/query/resume-pending.js.map +1 -1
- package/dist/runtime/query/resume-run.d.ts +2 -2
- package/dist/runtime/query/resume-run.d.ts.map +1 -1
- package/dist/runtime/query/run-state.d.ts +3 -3
- package/dist/runtime/query/run-state.d.ts.map +1 -1
- package/dist/runtime/query/run-state.js +2 -2
- package/dist/runtime/query/run-state.js.map +1 -1
- package/dist/runtime/query/tool-grants.d.ts +7 -0
- package/dist/runtime/query/tool-grants.d.ts.map +1 -1
- package/dist/runtime/query/tool-grants.js +1 -1
- package/dist/runtime/query/tool-grants.js.map +1 -1
- package/dist/runtime/query/tool-output-budget.js +34 -3
- package/dist/runtime/query/tool-output-budget.js.map +1 -1
- package/dist/runtime/query/tool-pause.d.ts.map +1 -1
- package/dist/runtime/query/tool-pause.js +2 -1
- package/dist/runtime/query/tool-pause.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +10 -2
- package/dist/runtime/query/tooling.d.ts.map +1 -1
- package/dist/runtime/query/tooling.js +3 -0
- package/dist/runtime/query/tooling.js.map +1 -1
- package/dist/sandbox/provider/local.d.ts +10 -0
- package/dist/sandbox/provider/local.d.ts.map +1 -1
- package/dist/sandbox/provider/local.js +77 -23
- package/dist/sandbox/provider/local.js.map +1 -1
- package/dist/sandbox/terminal.d.ts +130 -0
- package/dist/sandbox/terminal.d.ts.map +1 -0
- package/dist/sandbox/terminal.js +119 -0
- package/dist/sandbox/terminal.js.map +1 -0
- package/dist/{gateway → scheduler}/completion-inbox.d.ts +12 -5
- package/dist/scheduler/completion-inbox.d.ts.map +1 -0
- package/dist/{gateway → scheduler}/completion-inbox.js +19 -7
- package/dist/scheduler/completion-inbox.js.map +1 -0
- package/dist/scheduler/delegating.d.ts +90 -0
- package/dist/scheduler/delegating.d.ts.map +1 -0
- package/dist/scheduler/delegating.js +230 -0
- package/dist/scheduler/delegating.js.map +1 -0
- package/dist/{gateway → scheduler}/local.d.ts +10 -2
- package/dist/scheduler/local.d.ts.map +1 -0
- package/dist/{gateway → scheduler}/local.js +20 -11
- package/dist/scheduler/local.js.map +1 -0
- package/dist/session/actor-scope.d.ts +52 -0
- package/dist/session/actor-scope.d.ts.map +1 -0
- package/dist/session/actor-scope.js +112 -0
- package/dist/session/actor-scope.js.map +1 -0
- package/dist/session/errors.d.ts +31 -8
- package/dist/session/errors.d.ts.map +1 -1
- package/dist/session/errors.js +21 -1
- package/dist/session/errors.js.map +1 -1
- package/dist/session/handoff/assignment.d.ts +5 -5
- package/dist/session/handoff/assignment.d.ts.map +1 -1
- package/dist/session/handoff/broadcast.d.ts +2 -2
- package/dist/session/handoff/broadcast.d.ts.map +1 -1
- package/dist/session/handoff/broadcast.js +7 -7
- package/dist/session/handoff/broadcast.js.map +1 -1
- package/dist/session/handoff/single.d.ts +4 -4
- package/dist/session/handoff/single.d.ts.map +1 -1
- package/dist/session/handoff/single.js +4 -4
- package/dist/session/handoff/single.js.map +1 -1
- package/dist/session/migration/filesystem.d.ts +28 -0
- package/dist/session/migration/filesystem.d.ts.map +1 -1
- package/dist/session/migration/filesystem.js +44 -2
- package/dist/session/migration/filesystem.js.map +1 -1
- package/dist/session/migration/id-prefix.d.ts +50 -19
- package/dist/session/migration/id-prefix.d.ts.map +1 -1
- package/dist/session/migration/id-prefix.js +54 -22
- package/dist/session/migration/id-prefix.js.map +1 -1
- package/dist/session/migration/index.d.ts +6 -2
- package/dist/session/migration/index.d.ts.map +1 -1
- package/dist/session/migration/index.js +6 -2
- package/dist/session/migration/index.js.map +1 -1
- package/dist/session/migration/marker.d.ts.map +1 -1
- package/dist/session/migration/marker.js +21 -4
- package/dist/session/migration/marker.js.map +1 -1
- package/dist/session/retention/archive.d.ts.map +1 -1
- package/dist/session/retention/archive.js +25 -11
- package/dist/session/retention/archive.js.map +1 -1
- package/dist/session/workspace/git-worktree.d.ts.map +1 -1
- package/dist/session/workspace/git-worktree.js +17 -8
- package/dist/session/workspace/git-worktree.js.map +1 -1
- package/dist/skills/loader.d.ts +4 -2
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +36 -9
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/registry.d.ts +59 -1
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +154 -20
- package/dist/skills/registry.js.map +1 -1
- package/dist/store/attachment/index.d.ts +111 -0
- package/dist/store/attachment/index.d.ts.map +1 -0
- package/dist/store/attachment/index.js +94 -0
- package/dist/store/attachment/index.js.map +1 -0
- package/dist/store/config/index.d.ts +43 -0
- package/dist/store/config/index.d.ts.map +1 -0
- package/dist/store/config/index.js +51 -0
- package/dist/store/config/index.js.map +1 -0
- package/dist/store/feedback/conformance.d.ts +44 -0
- package/dist/store/feedback/conformance.d.ts.map +1 -0
- package/dist/store/feedback/conformance.js +127 -0
- package/dist/store/feedback/conformance.js.map +1 -0
- package/dist/store/feedback/disk.d.ts +46 -0
- package/dist/store/feedback/disk.d.ts.map +1 -0
- package/dist/store/feedback/disk.js +141 -0
- package/dist/store/feedback/disk.js.map +1 -0
- package/dist/store/feedback/index.d.ts +9 -0
- package/dist/store/feedback/index.d.ts.map +1 -0
- package/dist/store/feedback/index.js +5 -0
- package/dist/store/feedback/index.js.map +1 -0
- package/dist/store/feedback/memory.d.ts +33 -0
- package/dist/store/feedback/memory.d.ts.map +1 -0
- package/dist/store/feedback/memory.js +0 -0
- package/dist/store/feedback/memory.js.map +1 -0
- package/dist/store/feedback/types.d.ts +95 -0
- package/dist/store/feedback/types.d.ts.map +1 -0
- package/dist/store/feedback/types.js +27 -0
- package/dist/store/feedback/types.js.map +1 -0
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +4 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/kv/record-store.d.ts +54 -0
- package/dist/store/kv/record-store.d.ts.map +1 -0
- package/dist/store/kv/record-store.js +94 -0
- package/dist/store/kv/record-store.js.map +1 -0
- package/dist/store/memory/disk.d.ts +2 -0
- package/dist/store/memory/disk.d.ts.map +1 -1
- package/dist/store/memory/disk.js +36 -30
- package/dist/store/memory/disk.js.map +1 -1
- package/dist/store/run/checkpoint-disk.d.ts +4 -4
- package/dist/store/run/checkpoint-disk.d.ts.map +1 -1
- package/dist/store/run/checkpoint-disk.js +22 -1
- package/dist/store/run/checkpoint-disk.js.map +1 -1
- package/dist/store/run/checkpoint-memory.d.ts +4 -4
- package/dist/store/run/checkpoint-memory.d.ts.map +1 -1
- package/dist/store/run/checkpoint-memory.js.map +1 -1
- package/dist/store/run/claim-disk.d.ts +5 -5
- package/dist/store/run/claim-disk.d.ts.map +1 -1
- package/dist/store/run/claim-disk.js +20 -0
- package/dist/store/run/claim-disk.js.map +1 -1
- package/dist/store/run/conformance.d.ts.map +1 -1
- package/dist/store/run/conformance.js +10 -9
- package/dist/store/run/conformance.js.map +1 -1
- package/dist/store/run/disk.d.ts +3 -1
- package/dist/store/run/disk.d.ts.map +1 -1
- package/dist/store/run/disk.js +73 -4
- package/dist/store/run/disk.js.map +1 -1
- package/dist/store/run/listing.d.ts +4 -4
- package/dist/store/run/listing.d.ts.map +1 -1
- package/dist/store/run/listing.js.map +1 -1
- package/dist/store/run/memory.d.ts +5 -0
- package/dist/store/run/memory.d.ts.map +1 -1
- package/dist/store/run/memory.js +20 -1
- package/dist/store/run/memory.js.map +1 -1
- package/dist/store/session/canonical-path.d.ts +32 -0
- package/dist/store/session/canonical-path.d.ts.map +1 -0
- package/dist/store/session/canonical-path.js +46 -0
- package/dist/store/session/canonical-path.js.map +1 -0
- package/dist/store/session/disk.d.ts +46 -2
- package/dist/store/session/disk.d.ts.map +1 -1
- package/dist/store/session/disk.js +191 -205
- package/dist/store/session/disk.js.map +1 -1
- package/dist/store/session/memory.d.ts +10 -2
- package/dist/store/session/memory.d.ts.map +1 -1
- package/dist/store/session/memory.js +36 -4
- package/dist/store/session/memory.js.map +1 -1
- package/dist/store/task/disk.d.ts.map +1 -1
- package/dist/store/task/disk.js +76 -68
- package/dist/store/task/disk.js.map +1 -1
- package/dist/store/topic/index.d.ts +6 -0
- package/dist/store/topic/index.d.ts.map +1 -0
- package/dist/store/topic/index.js +20 -0
- package/dist/store/topic/index.js.map +1 -0
- package/dist/store/topic/memory.d.ts +30 -0
- package/dist/store/topic/memory.d.ts.map +1 -0
- package/dist/store/topic/memory.js +97 -0
- package/dist/store/topic/memory.js.map +1 -0
- package/dist/store/topic/objective.d.ts +104 -0
- package/dist/store/topic/objective.d.ts.map +1 -0
- package/dist/store/topic/objective.js +195 -0
- package/dist/store/topic/objective.js.map +1 -0
- package/dist/store/topic/state.d.ts +60 -0
- package/dist/store/topic/state.d.ts.map +1 -0
- package/dist/store/topic/state.js +128 -0
- package/dist/store/topic/state.js.map +1 -0
- package/dist/streaming/coalesce.d.ts +19 -6
- package/dist/streaming/coalesce.d.ts.map +1 -1
- package/dist/streaming/coalesce.js +13 -4
- package/dist/streaming/coalesce.js.map +1 -1
- package/dist/telemetry/runtime-accessors.d.ts +27 -1
- package/dist/telemetry/runtime-accessors.d.ts.map +1 -1
- package/dist/telemetry/runtime-accessors.js +45 -1
- package/dist/telemetry/runtime-accessors.js.map +1 -1
- package/dist/test-support/ids.d.ts +68 -0
- package/dist/test-support/ids.d.ts.map +1 -0
- package/dist/test-support/ids.js +70 -0
- package/dist/test-support/ids.js.map +1 -0
- package/dist/testing.d.ts +24 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +22 -0
- package/dist/testing.js.map +1 -0
- package/dist/tools/builtins/bash.d.ts +1 -0
- package/dist/tools/builtins/bash.d.ts.map +1 -1
- package/dist/tools/builtins/bash.js +77 -3
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/computer-use.d.ts +8 -8
- package/dist/tools/builtins/edit.d.ts +1 -1
- package/dist/tools/builtins/edit.d.ts.map +1 -1
- package/dist/tools/builtins/edit.js +34 -0
- package/dist/tools/builtins/edit.js.map +1 -1
- package/dist/tools/builtins/index.d.ts +6 -0
- package/dist/tools/builtins/index.d.ts.map +1 -1
- package/dist/tools/builtins/index.js +24 -1
- package/dist/tools/builtins/index.js.map +1 -1
- package/dist/tools/builtins/job.d.ts +6 -0
- package/dist/tools/builtins/job.d.ts.map +1 -0
- package/dist/tools/builtins/job.js +114 -0
- package/dist/tools/builtins/job.js.map +1 -0
- package/dist/tools/builtins/lsp.d.ts +21 -0
- package/dist/tools/builtins/lsp.d.ts.map +1 -0
- package/dist/tools/builtins/lsp.js +186 -0
- package/dist/tools/builtins/lsp.js.map +1 -0
- package/dist/tools/builtins/run-code.d.ts +13 -0
- package/dist/tools/builtins/run-code.d.ts.map +1 -0
- package/dist/tools/builtins/run-code.js +126 -0
- package/dist/tools/builtins/run-code.js.map +1 -0
- package/dist/tools/builtins/skill.d.ts +14 -0
- package/dist/tools/builtins/skill.d.ts.map +1 -0
- package/dist/tools/builtins/skill.js +120 -0
- package/dist/tools/builtins/skill.js.map +1 -0
- package/dist/tools/builtins/web-guidance.d.ts +31 -0
- package/dist/tools/builtins/web-guidance.d.ts.map +1 -0
- package/dist/tools/builtins/web-guidance.js +42 -0
- package/dist/tools/builtins/web-guidance.js.map +1 -0
- package/dist/tools/builtins/web.d.ts +10 -0
- package/dist/tools/builtins/web.d.ts.map +1 -0
- package/dist/tools/builtins/web.js +137 -0
- package/dist/tools/builtins/web.js.map +1 -0
- package/dist/tools/builtins/write-file.d.ts.map +1 -1
- package/dist/tools/builtins/write-file.js +35 -0
- package/dist/tools/builtins/write-file.js.map +1 -1
- package/dist/tools/coordinator/agent.d.ts +2 -2
- package/dist/tools/coordinator/agent.d.ts.map +1 -1
- package/dist/tools/coordinator/index.d.ts +13 -4
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +125 -38
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/coordinator/outcome.d.ts +2 -2
- package/dist/tools/coordinator/outcome.d.ts.map +1 -1
- package/dist/tools/coordinator/outcome.js +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts +3 -3
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts.map +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.js.map +1 -1
- package/dist/tools/defineTool.d.ts +12 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +2 -0
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/env-scrub.d.ts +66 -0
- package/dist/tools/env-scrub.d.ts.map +1 -0
- package/dist/tools/env-scrub.js +68 -0
- package/dist/tools/env-scrub.js.map +1 -0
- package/dist/tools/memory/read.d.ts.map +1 -1
- package/dist/tools/memory/read.js +5 -1
- package/dist/tools/memory/read.js.map +1 -1
- package/dist/tools/task/create.d.ts.map +1 -1
- package/dist/tools/task/create.js +2 -1
- package/dist/tools/task/create.js.map +1 -1
- package/dist/tools/task/update.d.ts.map +1 -1
- package/dist/tools/task/update.js +7 -3
- package/dist/tools/task/update.js.map +1 -1
- package/dist/types/acp/index.d.ts +161 -0
- package/dist/types/acp/index.d.ts.map +1 -0
- package/dist/types/acp/index.js +2 -0
- package/dist/types/acp/index.js.map +1 -0
- package/dist/types/agent/base.d.ts +62 -5
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/delegate.d.ts +102 -0
- package/dist/types/agent/delegate.d.ts.map +1 -0
- package/dist/types/agent/delegate.js +2 -0
- package/dist/types/agent/delegate.js.map +1 -0
- package/dist/types/agent/index.d.ts +1 -1
- package/dist/types/agent/index.d.ts.map +1 -1
- package/dist/types/agent/index.js +1 -1
- package/dist/types/agent/index.js.map +1 -1
- package/dist/types/agent/manager.d.ts +7 -1
- package/dist/types/agent/manager.d.ts.map +1 -1
- package/dist/types/agent/reactive.d.ts +24 -3
- package/dist/types/agent/reactive.d.ts.map +1 -1
- package/dist/types/agent/{gateway.d.ts → scheduler.d.ts} +41 -5
- package/dist/types/agent/scheduler.d.ts.map +1 -0
- package/dist/types/agent/scheduler.js +2 -0
- package/dist/types/agent/scheduler.js.map +1 -0
- package/dist/types/agent/supervisor.d.ts +23 -5
- package/dist/types/agent/supervisor.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +31 -9
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/agent/working-memory.d.ts +1 -1
- package/dist/types/authorization/index.d.ts +634 -0
- package/dist/types/authorization/index.d.ts.map +1 -0
- package/dist/types/authorization/index.js +103 -0
- package/dist/types/authorization/index.js.map +1 -0
- package/dist/types/bus/index.d.ts +24 -1
- package/dist/types/bus/index.d.ts.map +1 -1
- package/dist/types/code-navigation/index.d.ts +112 -0
- package/dist/types/code-navigation/index.d.ts.map +1 -0
- package/dist/types/code-navigation/index.js +17 -0
- package/dist/types/code-navigation/index.js.map +1 -0
- package/dist/types/command/index.d.ts +74 -0
- package/dist/types/command/index.d.ts.map +1 -0
- package/dist/types/command/index.js +18 -0
- package/dist/types/command/index.js.map +1 -0
- package/dist/types/common/index.d.ts +19 -2
- package/dist/types/common/index.d.ts.map +1 -1
- package/dist/types/common/index.js.map +1 -1
- package/dist/types/connector/mcp.d.ts +8 -0
- package/dist/types/connector/mcp.d.ts.map +1 -1
- package/dist/types/guardrail/index.d.ts +74 -1
- package/dist/types/guardrail/index.d.ts.map +1 -1
- package/dist/types/hitl/policy.d.ts +79 -0
- package/dist/types/hitl/policy.d.ts.map +1 -0
- package/dist/types/hitl/policy.js +2 -0
- package/dist/types/hitl/policy.js.map +1 -0
- package/dist/types/ids/brand.d.ts +55 -0
- package/dist/types/ids/brand.d.ts.map +1 -0
- package/dist/types/ids/brand.js +45 -0
- package/dist/types/ids/brand.js.map +1 -0
- package/dist/types/ids/index.d.ts +98 -39
- package/dist/types/ids/index.d.ts.map +1 -1
- package/dist/types/ids/index.js +5 -1
- package/dist/types/ids/index.js.map +1 -1
- package/dist/types/message/index.d.ts +24 -1
- package/dist/types/message/index.d.ts.map +1 -1
- package/dist/types/message/index.js.map +1 -1
- package/dist/types/plugin/index.d.ts +2 -2
- package/dist/types/project/entity.d.ts +22 -2
- package/dist/types/project/entity.d.ts.map +1 -1
- package/dist/types/provider/interface.d.ts +43 -2
- package/dist/types/provider/interface.d.ts.map +1 -1
- package/dist/types/provider/model.d.ts +16 -2
- package/dist/types/provider/model.d.ts.map +1 -1
- package/dist/types/run/audit.d.ts +150 -0
- package/dist/types/run/audit.d.ts.map +1 -0
- package/dist/types/run/audit.js +39 -0
- package/dist/types/run/audit.js.map +1 -0
- package/dist/types/run/cancel-cause.d.ts +49 -0
- package/dist/types/run/cancel-cause.d.ts.map +1 -0
- package/dist/types/run/cancel-cause.js +39 -0
- package/dist/types/run/cancel-cause.js.map +1 -0
- package/dist/types/run/checkpoint-store.d.ts +29 -11
- package/dist/types/run/checkpoint-store.d.ts.map +1 -1
- package/dist/types/run/config.d.ts +24 -4
- package/dist/types/run/config.d.ts.map +1 -1
- package/dist/types/run/derive-status.d.ts +3 -3
- package/dist/types/run/derive-status.d.ts.map +1 -1
- package/dist/types/run/derive-status.js +1 -1
- package/dist/types/run/entity.d.ts +2 -3
- package/dist/types/run/entity.d.ts.map +1 -1
- package/dist/types/run/event-cursor.d.ts +3 -3
- package/dist/types/run/event-cursor.d.ts.map +1 -1
- package/dist/types/run/events.d.ts +159 -4
- package/dist/types/run/events.d.ts.map +1 -1
- package/dist/types/run/events.js.map +1 -1
- package/dist/types/run/index.d.ts +2 -0
- package/dist/types/run/index.d.ts.map +1 -1
- package/dist/types/run/index.js +2 -0
- package/dist/types/run/index.js.map +1 -1
- package/dist/types/run/metadata.d.ts +2 -2
- package/dist/types/run/metadata.d.ts.map +1 -1
- package/dist/types/run/prepare-step.d.ts +29 -0
- package/dist/types/run/prepare-step.d.ts.map +1 -1
- package/dist/types/run/state.d.ts +33 -10
- package/dist/types/run/state.d.ts.map +1 -1
- package/dist/types/run/state.js +60 -3
- package/dist/types/run/state.js.map +1 -1
- package/dist/types/run/stop-reason.d.ts +9 -0
- package/dist/types/run/stop-reason.d.ts.map +1 -1
- package/dist/types/run/store.d.ts +38 -0
- package/dist/types/run/store.d.ts.map +1 -1
- package/dist/types/sandbox/index.d.ts +38 -0
- package/dist/types/sandbox/index.d.ts.map +1 -1
- package/dist/types/sandbox/index.js +21 -0
- package/dist/types/sandbox/index.js.map +1 -1
- package/dist/types/session/actor.d.ts +2 -2
- package/dist/types/session/actor.d.ts.map +1 -1
- package/dist/types/session/entity.d.ts +9 -7
- package/dist/types/session/entity.d.ts.map +1 -1
- package/dist/types/session/ids.d.ts +3 -1
- package/dist/types/session/ids.d.ts.map +1 -1
- package/dist/types/session/index.d.ts +4 -2
- package/dist/types/session/index.d.ts.map +1 -1
- package/dist/types/session/store.d.ts +51 -22
- package/dist/types/session/store.d.ts.map +1 -1
- package/dist/types/session/sub-session.d.ts +55 -5
- package/dist/types/session/sub-session.d.ts.map +1 -1
- package/dist/types/skills/index.d.ts +41 -0
- package/dist/types/skills/index.d.ts.map +1 -1
- package/dist/types/skills/index.js +17 -1
- package/dist/types/skills/index.js.map +1 -1
- package/dist/types/tool/index.d.ts +186 -1
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/tool/presentation.d.ts +53 -0
- package/dist/types/tool/presentation.d.ts.map +1 -0
- package/dist/types/tool/presentation.js +2 -0
- package/dist/types/tool/presentation.js.map +1 -0
- package/dist/types/{thread → topic}/entity.d.ts +34 -26
- package/dist/types/topic/entity.d.ts.map +1 -0
- package/dist/types/{thread → topic}/entity.js.map +1 -1
- package/dist/types/topic/index.d.ts +5 -0
- package/dist/types/topic/index.d.ts.map +1 -0
- package/dist/types/topic/index.js +11 -0
- package/dist/types/topic/index.js.map +1 -0
- package/dist/types/topic/objective.d.ts +86 -0
- package/dist/types/topic/objective.d.ts.map +1 -0
- package/dist/types/topic/objective.js +10 -0
- package/dist/types/topic/objective.js.map +1 -0
- package/dist/types/topic/state.d.ts +56 -0
- package/dist/types/topic/state.d.ts.map +1 -0
- package/dist/types/topic/state.js +10 -0
- package/dist/types/topic/state.js.map +1 -0
- package/dist/types/topic/store.d.ts +95 -0
- package/dist/types/topic/store.d.ts.map +1 -0
- package/dist/types/topic/store.js +29 -0
- package/dist/types/topic/store.js.map +1 -0
- package/dist/types/workspace/ref.d.ts +7 -0
- package/dist/types/workspace/ref.d.ts.map +1 -1
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js +13 -1
- package/dist/utils/abort.js.map +1 -1
- package/dist/utils/hash.d.ts +10 -0
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/hash.js +15 -0
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/id.d.ts +90 -2
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/id.js +113 -5
- package/dist/utils/id.js.map +1 -1
- package/dist/utils/log/attributes.d.ts +17 -0
- package/dist/utils/log/attributes.d.ts.map +1 -0
- package/dist/utils/log/attributes.js +2 -0
- package/dist/utils/log/attributes.js.map +1 -0
- package/dist/utils/log/caps.d.ts +27 -0
- package/dist/utils/log/caps.d.ts.map +1 -0
- package/dist/utils/log/caps.js +107 -0
- package/dist/utils/log/caps.js.map +1 -0
- package/dist/utils/log/create-logger.d.ts +28 -0
- package/dist/utils/log/create-logger.d.ts.map +1 -0
- package/dist/utils/log/create-logger.js +168 -0
- package/dist/utils/log/create-logger.js.map +1 -0
- package/dist/utils/log/exception.d.ts +11 -0
- package/dist/utils/log/exception.d.ts.map +1 -0
- package/dist/utils/log/exception.js +108 -0
- package/dist/utils/log/exception.js.map +1 -0
- package/dist/utils/log/index.d.ts +7 -0
- package/dist/utils/log/index.d.ts.map +1 -0
- package/dist/utils/log/index.js +15 -0
- package/dist/utils/log/index.js.map +1 -0
- package/dist/utils/log/process-sink.d.ts +28 -0
- package/dist/utils/log/process-sink.d.ts.map +1 -0
- package/dist/utils/log/process-sink.js +56 -0
- package/dist/utils/log/process-sink.js.map +1 -0
- package/dist/utils/log/redact.d.ts +3 -0
- package/dist/utils/log/redact.d.ts.map +1 -0
- package/dist/utils/log/redact.js +71 -0
- package/dist/utils/log/redact.js.map +1 -0
- package/dist/utils/log/sinks.d.ts +43 -0
- package/dist/utils/log/sinks.d.ts.map +1 -0
- package/dist/utils/log/sinks.js +184 -0
- package/dist/utils/log/sinks.js.map +1 -0
- package/dist/utils/log/templates.d.ts +63 -0
- package/dist/utils/log/templates.d.ts.map +1 -0
- package/dist/utils/log/templates.js +119 -0
- package/dist/utils/log/templates.js.map +1 -0
- package/dist/utils/log/types.d.ts +183 -0
- package/dist/utils/log/types.d.ts.map +1 -0
- package/dist/utils/log/types.js +55 -0
- package/dist/utils/log/types.js.map +1 -0
- package/dist/utils/logger.d.ts +44 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +102 -2
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/renamed-field.d.ts +19 -0
- package/dist/utils/renamed-field.d.ts.map +1 -0
- package/dist/utils/renamed-field.js +29 -0
- package/dist/utils/renamed-field.js.map +1 -0
- package/dist/vault/CredentialProvider.d.ts +89 -0
- package/dist/vault/CredentialProvider.d.ts.map +1 -0
- package/dist/vault/CredentialProvider.js +64 -0
- package/dist/vault/CredentialProvider.js.map +1 -0
- package/dist/vault/InMemoryCredentialVault.d.ts +2 -1
- package/dist/vault/InMemoryCredentialVault.d.ts.map +1 -1
- package/dist/vault/InMemoryCredentialVault.js +15 -5
- package/dist/vault/InMemoryCredentialVault.js.map +1 -1
- package/dist/vault/index.d.ts +3 -0
- package/dist/vault/index.d.ts.map +1 -1
- package/dist/vault/index.js +5 -0
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/instrumentation.d.ts +18 -2
- package/dist/vault/instrumentation.d.ts.map +1 -1
- package/dist/vault/instrumentation.js +47 -0
- package/dist/vault/instrumentation.js.map +1 -1
- package/package.json +4 -4
- package/src/advisory/executor.ts +14 -12
- package/src/advisory/registry.ts +2 -2
- package/src/agents/AGENTS.md +91 -0
- package/src/agents/AbstractAgent.ts +67 -14
- package/src/agents/PipelineAgent.ts +46 -12
- package/src/agents/ReactiveAgent.ts +27 -13
- package/src/agents/RouterAgent.ts +33 -21
- package/src/agents/SupervisorAgent.ts +51 -26
- package/src/agents/handle.ts +149 -0
- package/src/agents/runAgent.ts +14 -7
- package/src/{verification → authorization}/gate.ts +39 -32
- package/src/authorization/index.ts +26 -0
- package/src/authorization/permission-presets.ts +215 -0
- package/src/{verification → authorization}/presets.ts +15 -3
- package/src/{verification → authorization}/rules.ts +16 -3
- package/src/bridge/a2a/client.ts +369 -0
- package/src/bridge/a2a/mapper.ts +17 -0
- package/src/bridge/acp/filesystem.ts +63 -0
- package/src/bridge/acp/index.ts +11 -0
- package/src/bridge/acp/permission.ts +71 -0
- package/src/bridge/acp/server.ts +500 -0
- package/src/bridge/acp/update.ts +109 -0
- package/src/bridge/mcp/connector/adapter.ts +8 -4
- package/src/bridge/sse/mapper.ts +30 -0
- package/src/bus/breaker.ts +15 -10
- package/src/bus/index.ts +10 -8
- package/src/bus/lock.ts +36 -19
- package/src/bus/ownership.ts +17 -9
- package/src/compaction/context-window.ts +23 -1
- package/src/compaction/index.ts +6 -0
- package/src/compaction/manual.ts +177 -0
- package/src/compaction/plan.ts +226 -0
- package/src/compaction/summary.ts +31 -0
- package/src/compaction/verifier.ts +2 -2
- package/src/config/registry.ts +208 -0
- package/src/config/runtime.ts +27 -0
- package/src/connector/BaseConnector.ts +8 -3
- package/src/connector/builtins/http.ts +12 -2
- package/src/connector/builtins/webhook.ts +6 -2
- package/src/connector/index.ts +45 -29
- package/src/connector/mcp/adapter.ts +51 -1
- package/src/connector/mcp/client.ts +32 -20
- package/src/connector/mcp/discovery.ts +31 -20
- package/src/connector/mcp/http-sse.ts +12 -6
- package/src/connector/mcp/index.ts +8 -7
- package/src/connector/mcp/reconnect.ts +194 -0
- package/src/connector/mcp/server/index.ts +32 -0
- package/src/connector/mcp/{server-stdio.ts → server/server-stdio.ts} +5 -4
- package/src/connector/mcp/{server.ts → server/server.ts} +17 -11
- package/src/connector/mcp/stdio.ts +18 -9
- package/src/connector/mcp/streamable-http.ts +8 -4
- package/src/{bridge/tools/connector → connector/tools}/adapter.ts +5 -5
- package/src/{bridge/tools/connector → connector/tools}/definitions.ts +4 -4
- package/src/{bridge/tools/connector → connector/tools}/router.ts +17 -9
- package/src/connector/web/guarded-fetch.ts +288 -0
- package/src/connector/web/index.ts +17 -0
- package/src/connector/web/types.ts +99 -0
- package/src/constants/acp/index.ts +104 -0
- package/src/constants/credential-env-keys.ts +63 -0
- package/src/constants/index.ts +3 -1
- package/src/constants/secret-patterns.ts +102 -0
- package/src/constants/telemetry/index.ts +98 -0
- package/src/contracts/api.ts +11 -0
- package/src/deprecated-aliases.ts +86 -0
- package/src/eval/judge.ts +2 -2
- package/src/execution/base.ts +18 -7
- package/src/execution/code-runtime/types.ts +116 -0
- package/src/execution/code-runtime/worker.ts +266 -0
- package/src/{connector/execution → execution}/factory.ts +3 -3
- package/src/{connector/execution → execution}/hybrid.ts +13 -7
- package/src/execution/index.ts +24 -0
- package/src/execution/local.ts +4 -2
- package/src/{connector/execution → execution}/remote.ts +15 -8
- package/src/index.ts +17 -0
- package/src/invariants/index.ts +201 -0
- package/src/manager/agent/lifecycle.ts +172 -58
- package/src/manager/connector/environment.ts +22 -11
- package/src/manager/connector/lifecycle.ts +30 -11
- package/src/manager/connector/tenant.ts +33 -14
- package/src/manager/index.ts +16 -2
- package/src/manager/project/lifecycle.ts +1 -1
- package/src/manager/run/emergency.ts +9 -7
- package/src/manager/run/persistence.ts +110 -8
- package/src/manager/topic/lifecycle.ts +235 -0
- package/src/manager/topic/objective.ts +203 -0
- package/src/persona/assembler.ts +14 -3
- package/src/plugin/lifecycle.ts +156 -20
- package/src/plugin/loader.ts +67 -16
- package/src/probe/index.ts +1 -0
- package/src/probe/registry.ts +41 -5
- package/src/process/kill-tree.ts +52 -0
- package/src/prompt/contributions.ts +173 -0
- package/src/prompt/index.ts +15 -0
- package/src/provider/attribution.ts +57 -0
- package/src/provider/{collect.ts → collect-chat-completion.ts} +4 -2
- package/src/provider/conformance.ts +189 -0
- package/src/provider/errors.ts +27 -12
- package/src/provider/fallback.ts +32 -10
- package/src/provider/idle-timeout.ts +112 -0
- package/src/provider/instrumentation.ts +4 -2
- package/src/provider/retry.ts +63 -21
- package/src/public-runtime.ts +378 -14
- package/src/public-tools.ts +41 -1
- package/src/public-types.ts +101 -4
- package/src/rag/rag-tool.ts +4 -2
- package/src/read-model/index.ts +14 -0
- package/src/read-model/registry.ts +152 -0
- package/src/read-model/run-status.ts +127 -0
- package/src/registry/{Registry.ts → BaseRegistry.ts} +1 -1
- package/src/registry/ManagedRegistry.ts +26 -9
- package/src/registry/command/index-exports.ts +4 -0
- package/src/registry/command/index.ts +105 -0
- package/src/registry/command/kernel-commands.ts +110 -0
- package/src/registry/connector/scoped.ts +6 -5
- package/src/registry/index.ts +7 -1
- package/src/registry/tool/execute.ts +52 -13
- package/src/registry/tool/presentation.ts +116 -0
- package/src/registry/tool/screen.ts +132 -0
- package/src/run/drain.ts +13 -3
- package/src/run/reporter.ts +208 -153
- package/src/run-query/index.ts +108 -0
- package/src/runtime/bidi/session.ts +7 -2
- package/src/runtime/decision/fallback.ts +6 -3
- package/src/runtime/decision/parser.ts +10 -9
- package/src/runtime/jobs/registry.ts +346 -0
- package/src/runtime/query/approval-policy.ts +78 -0
- package/src/runtime/query/checkpoint.ts +6 -6
- package/src/runtime/query/context.ts +120 -30
- package/src/runtime/query/events.ts +19 -11
- package/src/runtime/query/executor.ts +287 -66
- package/src/runtime/query/guardrail-presets.ts +61 -14
- package/src/runtime/query/guardrails.ts +16 -12
- package/src/runtime/query/index.ts +579 -96
- package/src/runtime/query/iteration/index.ts +269 -87
- package/src/runtime/query/iteration/phases/advisory.ts +17 -16
- package/src/runtime/query/iteration/phases/compaction.ts +235 -187
- package/src/runtime/query/iteration/phases/context.ts +82 -21
- package/src/runtime/query/iteration/phases/tool-review.ts +28 -9
- package/src/runtime/query/iteration/phases/working-memory.ts +3 -2
- package/src/runtime/query/iteration/stream-turn.ts +14 -14
- package/src/runtime/query/{context-cache.ts → prompt-cache.ts} +23 -3
- package/src/runtime/query/prompt.ts +104 -4
- package/src/runtime/query/repeat-call.ts +130 -0
- package/src/runtime/query/replay/mutate.ts +6 -0
- package/src/runtime/query/result.ts +47 -10
- package/src/runtime/query/resume-pending.ts +19 -17
- package/src/runtime/query/resume-run.ts +2 -2
- package/src/runtime/query/run-state.ts +5 -5
- package/src/runtime/query/tool-grants.ts +1 -1
- package/src/runtime/query/tool-output-budget.ts +36 -3
- package/src/runtime/query/tool-pause.ts +2 -1
- package/src/runtime/query/tooling.ts +17 -2
- package/src/sandbox/provider/local.ts +94 -21
- package/src/sandbox/terminal.ts +197 -0
- package/src/{gateway → scheduler}/completion-inbox.ts +20 -10
- package/src/scheduler/delegating.ts +297 -0
- package/src/{gateway → scheduler}/local.ts +24 -15
- package/src/session/actor-scope.ts +121 -0
- package/src/session/errors.ts +30 -8
- package/src/session/handoff/assignment.ts +5 -5
- package/src/session/handoff/broadcast.ts +9 -9
- package/src/session/handoff/single.ts +8 -8
- package/src/session/migration/filesystem.ts +46 -2
- package/src/session/migration/id-prefix.ts +60 -22
- package/src/session/migration/index.ts +5 -0
- package/src/session/migration/marker.ts +19 -4
- package/src/session/retention/archive.ts +32 -12
- package/src/session/workspace/git-worktree.ts +17 -8
- package/src/skills/loader.ts +39 -9
- package/src/skills/registry.ts +177 -20
- package/src/store/attachment/index.ts +182 -0
- package/src/store/config/index.ts +74 -0
- package/src/store/feedback/conformance.ts +193 -0
- package/src/store/feedback/disk.ts +184 -0
- package/src/store/feedback/index.ts +13 -0
- package/src/store/feedback/memory.ts +0 -0
- package/src/store/feedback/types.ts +107 -0
- package/src/store/index.ts +5 -0
- package/src/store/kv/record-store.ts +91 -0
- package/src/store/memory/disk.ts +35 -32
- package/src/store/run/checkpoint-disk.ts +27 -6
- package/src/store/run/checkpoint-memory.ts +8 -8
- package/src/store/run/claim-disk.ts +58 -13
- package/src/store/run/conformance.ts +11 -10
- package/src/store/run/disk.ts +77 -5
- package/src/store/run/listing.ts +6 -6
- package/src/store/run/memory.ts +24 -1
- package/src/store/session/canonical-path.ts +45 -0
- package/src/store/session/disk.ts +216 -191
- package/src/store/session/memory.ts +43 -5
- package/src/store/task/disk.ts +77 -67
- package/src/store/topic/index.ts +33 -0
- package/src/store/topic/memory.ts +111 -0
- package/src/store/topic/objective.ts +290 -0
- package/src/store/topic/state.ts +204 -0
- package/src/streaming/coalesce.ts +19 -5
- package/src/telemetry/runtime-accessors.ts +45 -1
- package/src/test-support/ids.ts +117 -0
- package/src/testing.ts +40 -0
- package/src/tools/builtins/bash.ts +82 -3
- package/src/tools/builtins/edit.ts +36 -0
- package/src/tools/builtins/index.ts +29 -1
- package/src/tools/builtins/job.ts +133 -0
- package/src/tools/builtins/lsp.ts +214 -0
- package/src/tools/builtins/run-code.ts +154 -0
- package/src/tools/builtins/skill.ts +134 -0
- package/src/tools/builtins/web-guidance.ts +46 -0
- package/src/tools/builtins/web.ts +156 -0
- package/src/tools/builtins/write-file.ts +37 -1
- package/src/tools/coordinator/agent.ts +2 -2
- package/src/tools/coordinator/index.ts +144 -40
- package/src/tools/coordinator/outcome.ts +2 -2
- package/src/tools/coordinator/wait-with-idle-bound.ts +3 -3
- package/src/tools/defineTool.ts +14 -0
- package/src/tools/env-scrub.ts +91 -0
- package/src/tools/memory/read.ts +5 -2
- package/src/tools/task/create.ts +2 -1
- package/src/tools/task/update.ts +7 -4
- package/src/types/acp/index.ts +163 -0
- package/src/types/agent/base.ts +67 -5
- package/src/types/agent/delegate.ts +110 -0
- package/src/types/agent/index.ts +1 -1
- package/src/types/agent/manager.ts +7 -1
- package/src/types/agent/reactive.ts +27 -3
- package/src/types/agent/{gateway.ts → scheduler.ts} +41 -4
- package/src/types/agent/supervisor.ts +26 -5
- package/src/types/agent/task.ts +31 -9
- package/src/types/agent/working-memory.ts +1 -1
- package/src/types/{verification → authorization}/index.ts +79 -10
- package/src/types/bus/index.ts +30 -1
- package/src/types/code-navigation/index.ts +99 -0
- package/src/types/command/index.ts +68 -0
- package/src/types/common/index.ts +26 -2
- package/src/types/connector/mcp.ts +8 -0
- package/src/types/guardrail/index.ts +72 -1
- package/src/types/hitl/policy.ts +83 -0
- package/src/types/ids/brand.ts +58 -0
- package/src/types/ids/index.ts +109 -42
- package/src/types/message/index.ts +25 -1
- package/src/types/project/entity.ts +22 -2
- package/src/types/provider/interface.ts +45 -2
- package/src/types/provider/model.ts +16 -2
- package/src/types/run/audit.ts +164 -0
- package/src/types/run/cancel-cause.ts +60 -0
- package/src/types/run/checkpoint-store.ts +31 -11
- package/src/types/run/config.ts +25 -4
- package/src/types/run/derive-status.ts +3 -3
- package/src/types/run/entity.ts +2 -4
- package/src/types/run/event-cursor.ts +3 -3
- package/src/types/run/events.ts +165 -6
- package/src/types/run/index.ts +2 -0
- package/src/types/run/metadata.ts +2 -2
- package/src/types/run/prepare-step.ts +33 -0
- package/src/types/run/state.ts +78 -11
- package/src/types/run/stop-reason.ts +9 -0
- package/src/types/run/store.ts +40 -0
- package/src/types/sandbox/index.ts +37 -0
- package/src/types/session/actor.ts +10 -2
- package/src/types/session/entity.ts +9 -7
- package/src/types/session/ids.ts +2 -0
- package/src/types/session/index.ts +2 -0
- package/src/types/session/store.ts +53 -22
- package/src/types/session/sub-session.ts +50 -9
- package/src/types/skills/index.ts +50 -0
- package/src/types/tool/index.ts +171 -1
- package/src/types/tool/presentation.ts +48 -0
- package/src/types/{thread → topic}/entity.ts +34 -26
- package/src/types/topic/index.ts +23 -0
- package/src/types/topic/objective.ts +93 -0
- package/src/types/topic/state.ts +60 -0
- package/src/types/topic/store.ts +101 -0
- package/src/types/workspace/ref.ts +7 -0
- package/src/utils/abort.ts +16 -1
- package/src/utils/hash.ts +16 -0
- package/src/utils/id.ts +172 -12
- package/src/utils/log/attributes.ts +47 -0
- package/src/utils/log/caps.ts +118 -0
- package/src/utils/log/create-logger.ts +198 -0
- package/src/utils/log/exception.ts +124 -0
- package/src/utils/log/index.ts +24 -0
- package/src/utils/log/process-sink.ts +76 -0
- package/src/utils/log/redact.ts +77 -0
- package/src/utils/log/sinks.ts +205 -0
- package/src/utils/log/templates.ts +161 -0
- package/src/utils/log/types.ts +195 -0
- package/src/utils/logger.ts +121 -2
- package/src/utils/renamed-field.ts +35 -0
- package/src/vault/CredentialProvider.ts +147 -0
- package/src/vault/InMemoryCredentialVault.ts +16 -5
- package/src/vault/index.ts +16 -0
- package/src/vault/instrumentation.ts +63 -2
- package/dist/bridge/tools/connector/adapter.d.ts.map +0 -1
- package/dist/bridge/tools/connector/adapter.js.map +0 -1
- package/dist/bridge/tools/connector/definitions.d.ts.map +0 -1
- package/dist/bridge/tools/connector/definitions.js.map +0 -1
- package/dist/bridge/tools/connector/index.d.ts.map +0 -1
- package/dist/bridge/tools/connector/index.js.map +0 -1
- package/dist/bridge/tools/connector/router.d.ts.map +0 -1
- package/dist/bridge/tools/connector/router.js.map +0 -1
- package/dist/connector/execution/factory.d.ts.map +0 -1
- package/dist/connector/execution/factory.js.map +0 -1
- package/dist/connector/execution/hybrid.d.ts.map +0 -1
- package/dist/connector/execution/hybrid.js.map +0 -1
- package/dist/connector/execution/index.d.ts +0 -6
- package/dist/connector/execution/index.d.ts.map +0 -1
- package/dist/connector/execution/index.js +0 -4
- package/dist/connector/execution/index.js.map +0 -1
- package/dist/connector/execution/remote.d.ts.map +0 -1
- package/dist/connector/execution/remote.js.map +0 -1
- package/dist/connector/mcp/server-stdio.d.ts.map +0 -1
- package/dist/connector/mcp/server-stdio.js.map +0 -1
- package/dist/connector/mcp/server.d.ts.map +0 -1
- package/dist/connector/mcp/server.js.map +0 -1
- package/dist/constants/verification/index.d.ts.map +0 -1
- package/dist/constants/verification/index.js.map +0 -1
- package/dist/gateway/completion-inbox.d.ts.map +0 -1
- package/dist/gateway/completion-inbox.js.map +0 -1
- package/dist/gateway/local.d.ts.map +0 -1
- package/dist/gateway/local.js.map +0 -1
- package/dist/manager/thread/lifecycle.d.ts +0 -105
- package/dist/manager/thread/lifecycle.d.ts.map +0 -1
- package/dist/manager/thread/lifecycle.js.map +0 -1
- package/dist/provider/collect.d.ts.map +0 -1
- package/dist/provider/collect.js.map +0 -1
- package/dist/registry/Registry.d.ts.map +0 -1
- package/dist/registry/Registry.js.map +0 -1
- package/dist/router/task-router.d.ts.map +0 -1
- package/dist/router/task-router.js.map +0 -1
- package/dist/runtime/query/context-cache.d.ts.map +0 -1
- package/dist/runtime/query/context-cache.js.map +0 -1
- package/dist/store/thread/disk.d.ts +0 -41
- package/dist/store/thread/disk.d.ts.map +0 -1
- package/dist/store/thread/disk.js +0 -238
- package/dist/store/thread/disk.js.map +0 -1
- package/dist/store/thread/index.d.ts +0 -4
- package/dist/store/thread/index.d.ts.map +0 -1
- package/dist/store/thread/index.js +0 -6
- package/dist/store/thread/index.js.map +0 -1
- package/dist/store/thread/memory.d.ts +0 -23
- package/dist/store/thread/memory.d.ts.map +0 -1
- package/dist/store/thread/memory.js +0 -90
- package/dist/store/thread/memory.js.map +0 -1
- package/dist/types/agent/gateway.d.ts.map +0 -1
- package/dist/types/agent/gateway.js +0 -2
- package/dist/types/agent/gateway.js.map +0 -1
- package/dist/types/thread/entity.d.ts.map +0 -1
- package/dist/types/thread/index.d.ts +0 -3
- package/dist/types/thread/index.d.ts.map +0 -1
- package/dist/types/thread/index.js +0 -5
- package/dist/types/thread/index.js.map +0 -1
- package/dist/types/thread/store.d.ts +0 -86
- package/dist/types/thread/store.d.ts.map +0 -1
- package/dist/types/thread/store.js +0 -22
- package/dist/types/thread/store.js.map +0 -1
- package/dist/types/verification/index.d.ts +0 -317
- package/dist/types/verification/index.d.ts.map +0 -1
- package/dist/types/verification/index.js +0 -53
- package/dist/types/verification/index.js.map +0 -1
- package/dist/verification/gate.d.ts.map +0 -1
- package/dist/verification/gate.js.map +0 -1
- package/dist/verification/index.d.ts +0 -4
- package/dist/verification/index.d.ts.map +0 -1
- package/dist/verification/index.js +0 -4
- package/dist/verification/index.js.map +0 -1
- package/dist/verification/presets.d.ts.map +0 -1
- package/dist/verification/presets.js.map +0 -1
- package/dist/verification/rules.d.ts +0 -4
- package/dist/verification/rules.d.ts.map +0 -1
- package/dist/verification/rules.js.map +0 -1
- package/src/connector/execution/index.ts +0 -5
- package/src/manager/thread/lifecycle.ts +0 -217
- package/src/store/thread/disk.ts +0 -272
- package/src/store/thread/index.ts +0 -7
- package/src/store/thread/memory.ts +0 -104
- package/src/types/thread/index.ts +0 -6
- package/src/types/thread/store.ts +0 -92
- package/src/verification/index.ts +0 -3
- /package/dist/{bridge/tools/connector → connector/tools}/index.d.ts +0 -0
- /package/dist/{bridge/tools/connector → connector/tools}/index.js +0 -0
- /package/dist/constants/{verification → authorization}/index.d.ts +0 -0
- /package/dist/constants/{verification → authorization}/index.js +0 -0
- /package/dist/{router → model-router}/task-router.d.ts +0 -0
- /package/dist/{router → model-router}/task-router.js +0 -0
- /package/dist/types/{thread → topic}/entity.js +0 -0
- /package/src/{bridge/tools/connector → connector/tools}/index.ts +0 -0
- /package/src/constants/{verification → authorization}/index.ts +0 -0
- /package/src/{router → model-router}/task-router.ts +0 -0
|
@@ -19,22 +19,22 @@ import type {
|
|
|
19
19
|
import type { SessionSummaryRef } from '../../types/summary/ref.js'
|
|
20
20
|
import type { MessageId, SessionId, TenantId } from '../ids/index.js'
|
|
21
21
|
import type { Message } from '../message/index.js'
|
|
22
|
-
import type { ProjectId, SubSessionId, SummaryId,
|
|
22
|
+
import type { ProjectId, SubSessionId, SummaryId, TopicId } from '../session/ids.js'
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Params for {@link SessionStore.createSession}. The store owns id generation,
|
|
26
26
|
* `ownerVersion` initialization, and timestamps.
|
|
27
27
|
*
|
|
28
|
-
* Both `
|
|
29
|
-
* `projectId` of the
|
|
30
|
-
* perform that cross-store consistency check (it has no
|
|
31
|
-
* by design — see the store-boundary rationale in {@link
|
|
28
|
+
* Both `topicId` and `projectId` are required. `projectId` must equal the
|
|
29
|
+
* `projectId` of the topic identified by `topicId`; the store does NOT
|
|
30
|
+
* perform that cross-store consistency check (it has no TopicStore handle
|
|
31
|
+
* by design — see the store-boundary rationale in {@link import('../topic/store.js').TopicStore}). The
|
|
32
32
|
* caller is the authority; typically spawn and handoff paths copy both from
|
|
33
|
-
* a freshly-loaded `
|
|
33
|
+
* a freshly-loaded `Topic` record or from their own context which already
|
|
34
34
|
* tracks both.
|
|
35
35
|
*/
|
|
36
36
|
export interface CreateSessionParams {
|
|
37
|
-
|
|
37
|
+
topicId: TopicId
|
|
38
38
|
projectId: ProjectId
|
|
39
39
|
/**
|
|
40
40
|
* Initial owner of the session. May be `null` for bootstrap scenarios where
|
|
@@ -101,6 +101,19 @@ export interface CreateProjectParams {
|
|
|
101
101
|
* workspaces is for.
|
|
102
102
|
*/
|
|
103
103
|
config?: ProjectConfigInput
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The directory this project's work happens in. Canonicalized through
|
|
107
|
+
* `realpath` before storage, so a symlink or a trailing slash cannot
|
|
108
|
+
* produce a second record for one directory.
|
|
109
|
+
*
|
|
110
|
+
* A second project for the same canonical directory is REFUSED, not
|
|
111
|
+
* deduplicated into the first — a caller who wanted the existing one
|
|
112
|
+
* should say so with {@link SessionStore.findProjectByRootPath}, and
|
|
113
|
+
* silently returning it would hide that their `name` and `config` were
|
|
114
|
+
* discarded.
|
|
115
|
+
*/
|
|
116
|
+
rootPath?: string
|
|
104
117
|
}
|
|
105
118
|
|
|
106
119
|
/**
|
|
@@ -132,6 +145,19 @@ export interface SessionStore {
|
|
|
132
145
|
|
|
133
146
|
getProject(projectId: ProjectId, tenantId: TenantId): Promise<Project | null>
|
|
134
147
|
|
|
148
|
+
/**
|
|
149
|
+
* The project bound to a directory, or `null`. OPTIONAL.
|
|
150
|
+
*
|
|
151
|
+
* Optional for the reason `updateProjectConfig` below gives: this
|
|
152
|
+
* interface is implemented by hosts, and a required method stops them
|
|
153
|
+
* compiling for a capability they never asked for.
|
|
154
|
+
*
|
|
155
|
+
* The argument is canonicalized here too, so a caller may pass whatever
|
|
156
|
+
* they have — a relative path, a symlink, a trailing slash — and get the
|
|
157
|
+
* same answer the writer got.
|
|
158
|
+
*/
|
|
159
|
+
findProjectByRootPath?(rootPath: string, tenantId: TenantId): Promise<Project | null>
|
|
160
|
+
|
|
135
161
|
/**
|
|
136
162
|
* Change a Project's limits after it exists. OPTIONAL.
|
|
137
163
|
*
|
|
@@ -218,32 +244,37 @@ export interface SessionStore {
|
|
|
218
244
|
updateSession(session: Session, tenantId: TenantId, expectedOwnerVersion?: number): Promise<void>
|
|
219
245
|
|
|
220
246
|
/**
|
|
221
|
-
* List every Session that belongs to the given
|
|
247
|
+
* List every Session that belongs to the given Topic for the caller's
|
|
222
248
|
* tenant, ordered by `createdAt` ascending. Returns an empty array when
|
|
223
249
|
* none exist.
|
|
224
250
|
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
251
|
+
* Renamed from `listSessions` alongside the `threadId` → `topicId` field
|
|
252
|
+
* rename (NZ-TOPIC-03) — a query method named after the retired word
|
|
253
|
+
* would have kept pointing at the concept this whole chain exists to
|
|
254
|
+
* rename. Topic-scoped queries rely on `session.topicId` (set at
|
|
255
|
+
* creation, never rewritten). Cross-tenant sessions that happen to share
|
|
256
|
+
* the supplied `topicId` are silently skipped — the listing is
|
|
257
|
+
* tenant-scoped, not an isolation violation (the caller did not request
|
|
258
|
+
* a specific record).
|
|
229
259
|
*
|
|
230
|
-
* Exists to back
|
|
231
|
-
* ({@link import('../../manager/
|
|
260
|
+
* Exists to back TopicManager's archival + delete preconditions
|
|
261
|
+
* ({@link import('../../manager/topic/lifecycle.js').TopicManager.archive}
|
|
232
262
|
* rejects when any session is in a non-terminal state; `delete` rejects
|
|
233
|
-
* while any session still references the
|
|
263
|
+
* while any session still references the topic). Keeping this primitive
|
|
234
264
|
* on {@link SessionStore} preserves the store-ownership boundary —
|
|
235
|
-
*
|
|
265
|
+
* TopicStore stays unaware of session layout (Convention #0).
|
|
236
266
|
*/
|
|
237
|
-
|
|
267
|
+
listSessionsByTopic(topicId: TopicId, tenantId: TenantId): Promise<readonly Session[]>
|
|
238
268
|
|
|
239
269
|
/**
|
|
240
270
|
* Every Session attached to a workspace, oldest first. OPTIONAL.
|
|
241
271
|
*
|
|
242
|
-
* The project-scoped sibling of {@link SessionStore.
|
|
243
|
-
* one the archive precondition reads: closing a workspace has to
|
|
244
|
-
* is still running in it, and "what is running in this
|
|
245
|
-
* the question — a project can hold sessions across many
|
|
246
|
-
* the
|
|
272
|
+
* The project-scoped sibling of {@link SessionStore.listSessionsByTopic},
|
|
273
|
+
* and the one the archive precondition reads: closing a workspace has to
|
|
274
|
+
* know what is still running in it, and "what is running in this topic"
|
|
275
|
+
* was never the question — a project can hold sessions across many
|
|
276
|
+
* topics, and after the Topic level is removed it is the only grouping
|
|
277
|
+
* left.
|
|
247
278
|
*/
|
|
248
279
|
listSessionsByProject?(projectId: ProjectId, tenantId: TenantId): Promise<readonly Session[]>
|
|
249
280
|
|
|
@@ -5,23 +5,56 @@ import type { ActorRef } from './actor.js'
|
|
|
5
5
|
import type { SubSessionId, SummaryId, WorkspaceId } from './ids.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* The lifecycle of the DELEGATION — the edge from parent to child, not the
|
|
9
|
+
* child.
|
|
10
|
+
*
|
|
11
|
+
* This is the distinction the eleven-variant union lost. A `SubSession`
|
|
12
|
+
* record describes one parent's handoff to one child; the child is an
|
|
13
|
+
* ordinary `Session` in `SessionStore` with its own `SessionStatus`. Both
|
|
14
|
+
* unions carry `active`, `idle` and `archived`, and `SessionStatus`
|
|
15
|
+
* additionally carries `awaiting_merge` — so "is this thing active" had two
|
|
16
|
+
* answers and nothing said which record to ask.
|
|
17
|
+
*
|
|
18
|
+
* Ask this one about the delegation: has the parent handed off yet, is the
|
|
19
|
+
* child working, did the handoff fail, has the edge been retired. Ask
|
|
20
|
+
* `SessionStatus` about the child's own work.
|
|
21
|
+
*
|
|
22
|
+
* These five are every value the kernel produces. Absence of a `closed`
|
|
23
|
+
* state is load-bearing: a completed sub-session lands on `idle` and stays
|
|
24
|
+
* there so it can still be drilled into.
|
|
25
|
+
*/
|
|
26
|
+
export type SubSessionDelegationStatus = 'pending' | 'active' | 'idle' | 'failed' | 'archived'
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use {@link SubSessionDelegationStatus}. Removal is a later
|
|
30
|
+
* major, and the six extra members go with it.
|
|
31
|
+
*
|
|
32
|
+
* The merge half of this union was declared and never driven. Grepping
|
|
33
|
+
* `packages/sdk` and `packages/cli` for each of `awaiting_merge`,
|
|
34
|
+
* `pending_merge`, `merging`, `merged`, `merge_conflict` and
|
|
35
|
+
* `merge_rejected` AS A SUB-SESSION STATUS finds no writer at all — the
|
|
36
|
+
* many hits on `awaiting_merge` are `SessionStatus`, which is the shadowing
|
|
37
|
+
* this type's replacement exists to end. Two of them (`merged`,
|
|
38
|
+
* `merge_rejected`) had a READER: they sat in `ARCHIVABLE_STATUSES`, a set
|
|
39
|
+
* that could never match on them.
|
|
40
|
+
*
|
|
41
|
+
* The union stays this wide for one release so a host that persisted one of
|
|
42
|
+
* these values still typechecks while it migrates.
|
|
12
43
|
*/
|
|
13
44
|
export type SubSessionStatus =
|
|
14
|
-
|
|
|
15
|
-
|
|
16
|
-
| 'idle'
|
|
17
|
-
| 'failed'
|
|
45
|
+
| SubSessionDelegationStatus
|
|
46
|
+
/** @deprecated no producer since ratification */
|
|
18
47
|
| 'awaiting_merge'
|
|
48
|
+
/** @deprecated no producer since ratification */
|
|
19
49
|
| 'pending_merge'
|
|
50
|
+
/** @deprecated no producer since ratification */
|
|
20
51
|
| 'merging'
|
|
52
|
+
/** @deprecated no producer since ratification */
|
|
21
53
|
| 'merged'
|
|
54
|
+
/** @deprecated no producer since ratification */
|
|
22
55
|
| 'merge_conflict'
|
|
56
|
+
/** @deprecated no producer since ratification */
|
|
23
57
|
| 'merge_rejected'
|
|
24
|
-
| 'archived'
|
|
25
58
|
|
|
26
59
|
/**
|
|
27
60
|
* Discriminator for how a sub-session was created. Pattern doc §4.4
|
|
@@ -65,6 +98,14 @@ export interface SubSession {
|
|
|
65
98
|
parentSessionId: SessionId
|
|
66
99
|
childSessionId: SessionId
|
|
67
100
|
kind: SubSessionKind
|
|
101
|
+
/**
|
|
102
|
+
* The DELEGATION's lifecycle, not the child's. The child session has its
|
|
103
|
+
* own {@link import('./entity.js').SessionStatus}; when the two disagree
|
|
104
|
+
* this one is authoritative about whether the parent still has a live
|
|
105
|
+
* handoff, and that one is authoritative about whether the child is
|
|
106
|
+
* working. Typed as the wide alias for one more release; every value the
|
|
107
|
+
* kernel writes is a {@link SubSessionDelegationStatus}.
|
|
108
|
+
*/
|
|
68
109
|
status: SubSessionStatus
|
|
69
110
|
spawnedBy: ActorRef
|
|
70
111
|
spawnedAt: Date
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may reach for a skill.
|
|
3
|
+
*
|
|
4
|
+
* Every skill was offered to the model and to nobody else, and the two
|
|
5
|
+
* halves of that are both wrong. A skill that only an operator can
|
|
6
|
+
* meaningfully run — "collect a support bundle", "rotate the deploy key" —
|
|
7
|
+
* sat in the model's manifest as something to attempt, and the model would
|
|
8
|
+
* attempt it. A skill that is purely model guidance had no way to be
|
|
9
|
+
* offered to an operator at all.
|
|
10
|
+
*
|
|
11
|
+
* `both` is the default because it is what every existing skill silently
|
|
12
|
+
* was, and narrowing one is a decision its author makes rather than one a
|
|
13
|
+
* version bump makes for them.
|
|
14
|
+
*/
|
|
15
|
+
export type SkillInvocation = 'model' | 'operator' | 'both'
|
|
16
|
+
|
|
1
17
|
export interface SkillMetadata {
|
|
2
18
|
name: string
|
|
3
19
|
|
|
@@ -9,9 +25,43 @@ export interface SkillMetadata {
|
|
|
9
25
|
|
|
10
26
|
allowedTools?: string
|
|
11
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Who may invoke this skill. Absent means {@link SKILL_INVOCATION_DEFAULT}.
|
|
30
|
+
*
|
|
31
|
+
* Optional rather than required, so that a `SkillMetadata` written
|
|
32
|
+
* before this existed still type-checks — and resolved through
|
|
33
|
+
* {@link skillInvocation} rather than with `?? 'both'` at each reader,
|
|
34
|
+
* because the default is one decision and four copies of it is three
|
|
35
|
+
* chances to disagree.
|
|
36
|
+
*/
|
|
37
|
+
invocation?: SkillInvocation
|
|
38
|
+
|
|
12
39
|
metadata?: Record<string, string>
|
|
13
40
|
}
|
|
14
41
|
|
|
42
|
+
/** What a skill that says nothing means. */
|
|
43
|
+
export const SKILL_INVOCATION_DEFAULT: SkillInvocation = 'both'
|
|
44
|
+
|
|
45
|
+
/** The skill's stated policy, or the default. */
|
|
46
|
+
export function skillInvocation(skill: { metadata: SkillMetadata }): SkillInvocation {
|
|
47
|
+
return skill.metadata.invocation ?? SKILL_INVOCATION_DEFAULT
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* May this audience reach for this skill?
|
|
52
|
+
*
|
|
53
|
+
* `both` satisfies either side, which is the only reason the third value
|
|
54
|
+
* exists — a two-value policy would force every author to pick a side for a
|
|
55
|
+
* skill that genuinely serves both.
|
|
56
|
+
*/
|
|
57
|
+
export function isInvocableBy(
|
|
58
|
+
skill: { metadata: SkillMetadata },
|
|
59
|
+
audience: 'model' | 'operator',
|
|
60
|
+
): boolean {
|
|
61
|
+
const policy = skillInvocation(skill)
|
|
62
|
+
return policy === 'both' || policy === audience
|
|
63
|
+
}
|
|
64
|
+
|
|
15
65
|
export interface Skill {
|
|
16
66
|
metadata: SkillMetadata
|
|
17
67
|
|
package/src/types/tool/index.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { z } from 'zod'
|
|
2
2
|
import type { Logger } from '../../utils/logger.js'
|
|
3
|
+
import type { CodeNavigationProvider } from '../code-navigation/index.js'
|
|
4
|
+
// Type-only, and circular by design: a tool-result guardrail is described in
|
|
5
|
+
// terms of the tool that produced the result, and the registry that holds
|
|
6
|
+
// the guardrails is described here. Erased at compile time, so neither
|
|
7
|
+
// module exists at runtime to depend on the other.
|
|
8
|
+
import type { ToolResultGuardrailSpec } from '../guardrail/index.js'
|
|
3
9
|
import type { RunId } from '../ids/index.js'
|
|
4
10
|
import type { InvocationState } from '../invocation/index.js'
|
|
5
11
|
import type { PermissionMode } from '../permission/index.js'
|
|
6
12
|
import type { Sandbox } from '../sandbox/index.js'
|
|
13
|
+
import type { ToolPresentation } from './presentation.js'
|
|
7
14
|
|
|
8
15
|
export interface ToolRegistryRef {
|
|
9
16
|
searchDeferred(query: string): ToolDefinition[]
|
|
@@ -11,6 +18,72 @@ export interface ToolRegistryRef {
|
|
|
11
18
|
getAvailability(name: string): ToolAvailability
|
|
12
19
|
}
|
|
13
20
|
|
|
21
|
+
/**
|
|
22
|
+
* The slice of the background job registry a tool is given.
|
|
23
|
+
*
|
|
24
|
+
* A structural reference rather than the class, for the reason
|
|
25
|
+
* `ToolRegistryRef` exists: this type file is imported by everything, and
|
|
26
|
+
* naming the implementation here would drag a `node:child_process` module
|
|
27
|
+
* into every consumer's type graph. `owner` is not on this surface at all —
|
|
28
|
+
* the executor binds it to the run, so a tool cannot start a job that
|
|
29
|
+
* outlives, or is billed to, somebody else's run.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The slice of the skills registry a tool is given.
|
|
33
|
+
*
|
|
34
|
+
* Structural for the reason `ToolRegistryRef` is: this file is imported by
|
|
35
|
+
* everything, and naming `SkillRegistry` here would drag the skill loader's
|
|
36
|
+
* filesystem imports into every consumer's type graph.
|
|
37
|
+
*/
|
|
38
|
+
export interface SkillRegistryRef {
|
|
39
|
+
/**
|
|
40
|
+
* Load a skill's full body, or `undefined` for a name nobody registered.
|
|
41
|
+
*
|
|
42
|
+
* Full disclosure by design: a tool call asking for a skill is asking
|
|
43
|
+
* for its instructions, and returning metadata the model already has in
|
|
44
|
+
* its manifest would answer a question it did not ask.
|
|
45
|
+
*/
|
|
46
|
+
load(name: string): Promise<
|
|
47
|
+
| {
|
|
48
|
+
skill: {
|
|
49
|
+
metadata: {
|
|
50
|
+
name: string
|
|
51
|
+
description: string
|
|
52
|
+
allowedTools?: string
|
|
53
|
+
/**
|
|
54
|
+
* The literal union, not `string`. Widening it here would
|
|
55
|
+
* let a ref satisfy this interface while carrying a value
|
|
56
|
+
* `isInvocableBy` cannot read, and the failure would be a
|
|
57
|
+
* silent `both` — the fail-open answer.
|
|
58
|
+
*/
|
|
59
|
+
invocation?: 'model' | 'operator' | 'both'
|
|
60
|
+
}
|
|
61
|
+
body?: string
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
| undefined
|
|
65
|
+
>
|
|
66
|
+
/** Every registered name, for a "did you mean" that names real options. */
|
|
67
|
+
names(): readonly string[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface BackgroundJobRegistryRef {
|
|
71
|
+
start(params: { command: string; workingDirectory: string }): { id: string; status: string }
|
|
72
|
+
get(id: string): { id: string; status: string; exitCode?: number }
|
|
73
|
+
read(
|
|
74
|
+
id: string,
|
|
75
|
+
opts?: { fromOffset?: number },
|
|
76
|
+
): {
|
|
77
|
+
chunk: string
|
|
78
|
+
nextOffset: number
|
|
79
|
+
droppedBytes: number
|
|
80
|
+
status: string
|
|
81
|
+
exitCode?: number
|
|
82
|
+
}
|
|
83
|
+
kill(id: string): Promise<{ id: string; status: string }>
|
|
84
|
+
list(): readonly { id: string; command: string; status: string }[]
|
|
85
|
+
}
|
|
86
|
+
|
|
14
87
|
/**
|
|
15
88
|
* Tracks which files the agent has read in the current run.
|
|
16
89
|
* Write tool consults this to enforce the "read before overwrite" invariant
|
|
@@ -115,8 +188,93 @@ export interface ToolContext {
|
|
|
115
188
|
*/
|
|
116
189
|
allowedTools?: readonly string[]
|
|
117
190
|
sandbox?: Sandbox
|
|
191
|
+
/**
|
|
192
|
+
* Symbol resolution for this run, when a host wired one up.
|
|
193
|
+
*
|
|
194
|
+
* Absent means the `lsp` tool is not registered at all — see
|
|
195
|
+
* `tools/builtins/lsp.ts` for why a tool that is always present and
|
|
196
|
+
* always says "unavailable" is worse than one that is not there.
|
|
197
|
+
*/
|
|
198
|
+
codeNavigation?: CodeNavigationProvider
|
|
118
199
|
fileReadTracker?: FileReadTracker
|
|
119
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Where work that outlives this call is held.
|
|
203
|
+
*
|
|
204
|
+
* Absent means the host has provided nowhere to put a background job, and
|
|
205
|
+
* a tool asked for one must REFUSE rather than fall back to `cmd &`. The
|
|
206
|
+
* fallback is not a lesser version of this — under the local sandbox's
|
|
207
|
+
* `linux-namespace` tier the wrapping `sh` is PID 1 of a fresh PID
|
|
208
|
+
* namespace, so a backgrounded grandchild dies the moment that shell
|
|
209
|
+
* exits, on the successful path. It returns in milliseconds looking like
|
|
210
|
+
* it worked, with the work already dead.
|
|
211
|
+
*/
|
|
212
|
+
backgroundJobs?: BackgroundJobRegistryRef
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Where the `skill` tool reads from.
|
|
216
|
+
*
|
|
217
|
+
* Absent means the run has no skills, and the tool says so rather than
|
|
218
|
+
* reporting an empty list — "no skills here" and "no registry" are
|
|
219
|
+
* different answers.
|
|
220
|
+
*/
|
|
221
|
+
skills?: SkillRegistryRef
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* How this run reaches the web.
|
|
225
|
+
*
|
|
226
|
+
* Two independent halves, and either may be absent. This kernel ships a
|
|
227
|
+
* guarded fetch provider and NO search backend, so `search` missing is
|
|
228
|
+
* the ordinary case rather than a failure — the tools say which piece is
|
|
229
|
+
* missing so an operator can tell a wiring decision from a fault.
|
|
230
|
+
*/
|
|
231
|
+
web?: {
|
|
232
|
+
readonly fetch?: {
|
|
233
|
+
fetch(request: { url: string; signal?: AbortSignal }): Promise<{
|
|
234
|
+
url: string
|
|
235
|
+
status: number
|
|
236
|
+
contentType?: string
|
|
237
|
+
body: string
|
|
238
|
+
truncated: boolean
|
|
239
|
+
redirects: readonly string[]
|
|
240
|
+
}>
|
|
241
|
+
}
|
|
242
|
+
readonly search?: {
|
|
243
|
+
search(request: { query: string; limit?: number; signal?: AbortSignal }): Promise<{
|
|
244
|
+
query: string
|
|
245
|
+
hits: readonly { title: string; url: string; snippet?: string }[]
|
|
246
|
+
}>
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Adopt the tool scope a skill declared.
|
|
252
|
+
*
|
|
253
|
+
* Called by the `skill` tool when a loaded skill names `allowed-tools`.
|
|
254
|
+
* The scope INTERSECTS what the turn already allows and takes effect from
|
|
255
|
+
* the next batch — a skill loaded alongside other calls must not
|
|
256
|
+
* retroactively refuse them.
|
|
257
|
+
*/
|
|
258
|
+
adoptSkillScope?: (scope: { skill: string; allowedTools: readonly string[] }) => void
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Run another tool through the same dispatch this call came through.
|
|
262
|
+
*
|
|
263
|
+
* For `run_code`, whose whole purpose is calling tools in a loop. NOT
|
|
264
|
+
* added to {@link ToolRegistryRef}: that ref is about discovering and
|
|
265
|
+
* activating tools, and putting `execute` on it would make "can dispatch"
|
|
266
|
+
* a property of holding a registry reference rather than a capability a
|
|
267
|
+
* host wired deliberately.
|
|
268
|
+
*
|
|
269
|
+
* Available to every tool, which is worth being explicit about rather
|
|
270
|
+
* than quietly true. Tools are host-installed code — the model cannot add
|
|
271
|
+
* one — so the trust boundary this protects is the MODEL's reach, and
|
|
272
|
+
* that is bounded where it has always been: `allowedTools` is enforced at
|
|
273
|
+
* dispatch, so a tool calling through here reaches exactly what a
|
|
274
|
+
* `tool_use` block would have.
|
|
275
|
+
*/
|
|
276
|
+
dispatchTool?: (name: string, input: unknown) => Promise<ToolResult>
|
|
277
|
+
|
|
120
278
|
/**
|
|
121
279
|
* The `tool_use_id` of the assistant block that triggered this
|
|
122
280
|
* execution. Tools that spawn background work (e.g. coordinator
|
|
@@ -217,7 +375,7 @@ export interface ToolResult {
|
|
|
217
375
|
retryable?: boolean
|
|
218
376
|
}
|
|
219
377
|
|
|
220
|
-
export interface ToolDefinition<TInput = unknown> {
|
|
378
|
+
export interface ToolDefinition<TInput = unknown> extends ToolPresentation<TInput> {
|
|
221
379
|
name: string
|
|
222
380
|
description: string
|
|
223
381
|
inputSchema: z.ZodType<TInput, z.ZodTypeDef, unknown>
|
|
@@ -390,6 +548,16 @@ export interface ToolTierConfig {
|
|
|
390
548
|
export interface ToolRegistryConfig {
|
|
391
549
|
logger?: Logger
|
|
392
550
|
tierConfig?: ToolTierConfig
|
|
551
|
+
/**
|
|
552
|
+
* Screens run against every tool result before anything downstream
|
|
553
|
+
* reads it — the output budget, compaction, and the model itself are
|
|
554
|
+
* all past this point.
|
|
555
|
+
*
|
|
556
|
+
* Absent means no screening, which is what shipped before this existed:
|
|
557
|
+
* a connected server's text reached the model unexamined. See
|
|
558
|
+
* {@link ToolResultGuardrailSpec}.
|
|
559
|
+
*/
|
|
560
|
+
resultGuardrails?: readonly ToolResultGuardrailSpec[]
|
|
393
561
|
}
|
|
394
562
|
|
|
395
563
|
export interface ToolExecutionResult extends ToolResult {
|
|
@@ -435,3 +603,5 @@ export interface ToolRegistryContract {
|
|
|
435
603
|
}
|
|
436
604
|
|
|
437
605
|
export * from './repair.js'
|
|
606
|
+
|
|
607
|
+
export type { ToolCallView, ToolPresentation, ToolResultView } from './presentation.js'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ToolResult } from './index.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a tool call should be shown, decided by the tool.
|
|
5
|
+
*
|
|
6
|
+
* Presentation lived in one host as four free functions switching on a
|
|
7
|
+
* lowercased tool NAME: `name === 'write'` and `name === 'edit'` got a
|
|
8
|
+
* diff, everything else got a truncated string. So a tool the host had
|
|
9
|
+
* never heard of — an MCP server's, a plugin's, a second host's — could
|
|
10
|
+
* not get a diff no matter what it did, and every new host started from
|
|
11
|
+
* the raw arguments and rebuilt the same switch.
|
|
12
|
+
*
|
|
13
|
+
* The tool knows what it is doing; the host knows how its surface renders.
|
|
14
|
+
* These are the three shapes one host had already found it needed, closed
|
|
15
|
+
* deliberately: an open union would let a tool ask for a rendering no host
|
|
16
|
+
* has, which is a request that fails silently at the far end.
|
|
17
|
+
*/
|
|
18
|
+
export type ToolCallView =
|
|
19
|
+
/** A line of text. What everything that is not a diff or a command gets. */
|
|
20
|
+
| { readonly kind: 'generic'; readonly label: string }
|
|
21
|
+
/**
|
|
22
|
+
* A change to a document. `path` is optional because not every diff is
|
|
23
|
+
* a file — a tool patching a remote record has a before and an after
|
|
24
|
+
* and no path a host could open.
|
|
25
|
+
*/
|
|
26
|
+
| {
|
|
27
|
+
readonly kind: 'diff'
|
|
28
|
+
readonly path?: string
|
|
29
|
+
readonly before: string
|
|
30
|
+
readonly after: string
|
|
31
|
+
}
|
|
32
|
+
/** A command and what it printed. */
|
|
33
|
+
| { readonly kind: 'terminal'; readonly command?: string; readonly output: string }
|
|
34
|
+
|
|
35
|
+
/** The same three shapes, for what a call produced. */
|
|
36
|
+
export type ToolResultView = ToolCallView
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Optional presentation hooks on a tool definition.
|
|
40
|
+
*
|
|
41
|
+
* Both may return `undefined`, which means "no opinion" and is different
|
|
42
|
+
* from returning a generic view: the first defers to the host's fallback,
|
|
43
|
+
* the second asserts that a plain label is the right rendering.
|
|
44
|
+
*/
|
|
45
|
+
export interface ToolPresentation<TInput = unknown> {
|
|
46
|
+
presentCall?(input: TInput): ToolCallView | undefined
|
|
47
|
+
presentResult?(input: TInput, result: ToolResult): ToolResultView | undefined
|
|
48
|
+
}
|
|
@@ -1,51 +1,57 @@
|
|
|
1
1
|
import type { TenantId } from '../ids/index.js'
|
|
2
|
-
import type { ProjectId,
|
|
2
|
+
import type { ProjectId, TopicId } from '../session/ids.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Lifecycle state of a
|
|
5
|
+
* Lifecycle state of a Topic.
|
|
6
6
|
*
|
|
7
7
|
* - `open` — accepts new Sessions and new Runs under existing Sessions.
|
|
8
8
|
* - `archived` — read-only tombstone. No new Sessions may be created; existing
|
|
9
9
|
* Sessions remain navigable. Transitioning `open → archived` requires that
|
|
10
|
-
* no Session under the
|
|
10
|
+
* no Session under the Topic is in a non-terminal state (guarded at the
|
|
11
11
|
* store level by listing + status fan-in).
|
|
12
12
|
*
|
|
13
|
-
* There is no `active` variant —
|
|
14
|
-
* Sessions the way a Session does from its Runs.
|
|
15
|
-
* (Phase 0 decision B.1:
|
|
13
|
+
* There is no `active` variant — Topic does NOT derive status from its child
|
|
14
|
+
* Sessions the way a Session does from its Runs. Topic is a pure container
|
|
15
|
+
* (Phase 0 decision B.1: Topic is container-only, no message stream, no
|
|
16
16
|
* fan-in). Its status is an explicit owner action.
|
|
17
17
|
*/
|
|
18
|
-
export type
|
|
18
|
+
export type TopicStatus = 'open' | 'archived'
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Topic-level container sitting between {@link ProjectId Project} and
|
|
22
22
|
* {@link import('../session/ids.js').SessionId Session} in the five-layer hierarchy
|
|
23
|
-
* (Project →
|
|
23
|
+
* (Project → Topic → Session → SubSession → Run).
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* NZ-TOPIC-01 renamed this entity from `Thread` to `Topic` — its own docstring
|
|
26
|
+
* already called it a "Topic-level container" before the identifier caught up.
|
|
27
|
+
* NZ-TOPIC-04 narrows the exported {@link import('../ids/index.js').TopicId}
|
|
28
|
+
* from the pre-0.2.0 `thd_` shape to `top_`; on-disk records written under
|
|
29
|
+
* the old prefix are migrated on read (`store/session/disk.ts`).
|
|
30
|
+
*
|
|
31
|
+
* A Topic groups together many Sessions that address the same coherent
|
|
26
32
|
* topic or line-of-work within a Project (e.g. "auth refactor", "billing
|
|
27
|
-
* incident"). Sessions under the same
|
|
33
|
+
* incident"). Sessions under the same Topic share Project-level shared
|
|
28
34
|
* resources (memory, vaults, knowledge bases) but have independent actor
|
|
29
35
|
* state, handoff history, and Run streams.
|
|
30
36
|
*
|
|
31
|
-
* ## Why
|
|
37
|
+
* ## Why Topic is a first-class layer (A2A-connection surface)
|
|
32
38
|
*
|
|
33
39
|
* The layer exists because of how enterprise sharing works in Namzu:
|
|
34
40
|
*
|
|
35
41
|
* - **Project is the folder-bound sharing unit.** An enterprise team shares
|
|
36
42
|
* a Project (`.namzu/` in a repo, a long-lived goal scope). Everyone with
|
|
37
43
|
* Project access sees its shape but not necessarily its active work.
|
|
38
|
-
* - **
|
|
39
|
-
* Project can have multiple
|
|
40
|
-
* and the
|
|
41
|
-
* A2A (agent-to-agent) connections attach at the
|
|
42
|
-
* to a
|
|
44
|
+
* - **Topic is the path-independent, A2A-attachable topic surface.** A
|
|
45
|
+
* Project can have multiple Topics — one per objective or line-of-work —
|
|
46
|
+
* and the Topics can be partitioned by device, user, or agent identity.
|
|
47
|
+
* A2A (agent-to-agent) connections attach at the Topic level: connecting
|
|
48
|
+
* to a Topic exposes every Session under it and the ability to join the
|
|
43
49
|
* ongoing work.
|
|
44
50
|
* - **Sessions are the immediate work unit.** A user or agent enters a
|
|
45
|
-
*
|
|
51
|
+
* Topic and opens/resumes Sessions for the concrete interval of work.
|
|
46
52
|
*
|
|
47
53
|
* This is the mental model ses_001 ratified (Phase 0, 2026-04-18). The
|
|
48
|
-
*
|
|
54
|
+
* Topic layer has no counterpart elsewhere — it is Namzu's answer to
|
|
49
55
|
* the question "how do you expose a multi-session topic to A2A without
|
|
50
56
|
* coupling it to the Project's filesystem identity?".
|
|
51
57
|
*
|
|
@@ -55,23 +61,25 @@ export type ThreadStatus = 'open' | 'archived'
|
|
|
55
61
|
* - Container only. No own message stream, no own Run stream. Messages
|
|
56
62
|
* live in Sessions (Phase 0 decision B.1).
|
|
57
63
|
* - `title` is a user-facing label. **Titles are NOT unique within a
|
|
58
|
-
* Project.** Callers disambiguate by {@link
|
|
64
|
+
* Project.** Callers disambiguate by {@link TopicId}; the title is
|
|
59
65
|
* freeform display text. If a product surface needs uniqueness (e.g.
|
|
60
66
|
* a human-typed slug), that constraint lives at the API layer, not in
|
|
61
67
|
* the kernel.
|
|
62
|
-
* - `ownerVersion` is the CAS counter for mutations — `
|
|
68
|
+
* - `ownerVersion` is the CAS counter for mutations — `updateTopic` and
|
|
63
69
|
* archival transitions require a matching version and reject
|
|
64
|
-
* {@link StaleThreadError} on mismatch
|
|
65
|
-
*
|
|
70
|
+
* {@link import('../../session/errors.js').StaleThreadError} on mismatch
|
|
71
|
+
* (error class name is unchanged this release — see NZ-TOPIC-01 risks).
|
|
72
|
+
* Mirrors the {@link import('./entity.js').Session} handoff CAS pattern
|
|
73
|
+
* (§6.1).
|
|
66
74
|
* - No fan-in `deriveStatus()` helper — status is owner-managed, not
|
|
67
|
-
* Run-derived. This is the
|
|
75
|
+
* Run-derived. This is the Topic-vs-Session contract boundary.
|
|
68
76
|
*/
|
|
69
|
-
export interface
|
|
70
|
-
id:
|
|
77
|
+
export interface Topic {
|
|
78
|
+
id: TopicId
|
|
71
79
|
projectId: ProjectId
|
|
72
80
|
tenantId: TenantId
|
|
73
81
|
title: string
|
|
74
|
-
status:
|
|
82
|
+
status: TopicStatus
|
|
75
83
|
ownerVersion: number
|
|
76
84
|
createdAt: Date
|
|
77
85
|
updatedAt: Date
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Sub-barrel for the Topic type surface (Convention #4).
|
|
2
|
+
// Concrete types live in sibling files; re-export them here so consumers
|
|
3
|
+
// import via `../types/topic/index.js`.
|
|
4
|
+
//
|
|
5
|
+
// NZ-TOPIC-01: this barrel used to be `types/thread/index.ts`, exporting
|
|
6
|
+
// `ThreadStore`/`CreateThreadParams`/`Thread`/`ThreadStatus`. None of those
|
|
7
|
+
// four names was ever part of the SDK's public surface (verified against
|
|
8
|
+
// public-runtime.ts / public-types.ts, including their wildcard re-export
|
|
9
|
+
// chains), so they were free to rename outright with no deprecated alias.
|
|
10
|
+
|
|
11
|
+
export type { TopicStore, CreateTopicParams } from './store.js'
|
|
12
|
+
export type { Topic, TopicStatus } from './entity.js'
|
|
13
|
+
|
|
14
|
+
export { StaleObjectiveError } from './objective.js'
|
|
15
|
+
export type {
|
|
16
|
+
ObjectiveAdvance,
|
|
17
|
+
ObjectiveAdvanceResult,
|
|
18
|
+
ObjectiveBlock,
|
|
19
|
+
ObjectivePhase,
|
|
20
|
+
ObjectiveRefusal,
|
|
21
|
+
ObjectiveRoundVerdict,
|
|
22
|
+
TopicObjective,
|
|
23
|
+
} from './objective.js'
|