@namzu/sdk 27.1.0 → 29.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 +1757 -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 -6
- 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 -16
- 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 +107 -36
- 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/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 +46 -46
- package/dist/contracts/api.d.ts +12 -1
- package/dist/contracts/api.d.ts.map +1 -1
- 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 +77 -15
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +168 -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.map +1 -1
- package/dist/registry/tool/execute.js +15 -12
- 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.map +1 -1
- package/dist/registry/tool/screen.js +12 -11
- package/dist/registry/tool/screen.js.map +1 -1
- 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.map +1 -1
- package/dist/runtime/query/guardrail-presets.js +11 -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 +124 -16
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +372 -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 +8 -4
- package/dist/session/handoff/broadcast.d.ts.map +1 -1
- package/dist/session/handoff/broadcast.js +8 -9
- package/dist/session/handoff/broadcast.js.map +1 -1
- package/dist/session/handoff/index.d.ts +1 -1
- package/dist/session/handoff/index.d.ts.map +1 -1
- package/dist/session/handoff/index.js +1 -1
- package/dist/session/handoff/index.js.map +1 -1
- package/dist/session/handoff/single.d.ts +11 -7
- package/dist/session/handoff/single.d.ts.map +1 -1
- package/dist/session/handoff/single.js +5 -11
- 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 +39 -19
- package/dist/session/migration/id-prefix.d.ts.map +1 -1
- package/dist/session/migration/id-prefix.js +43 -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 +13 -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/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 +19 -3
- package/dist/types/agent/reactive.d.ts.map +1 -1
- package/dist/types/agent/{gateway.d.ts → scheduler.d.ts} +31 -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 +13 -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/{verification → authorization}/index.d.ts +68 -12
- package/dist/types/authorization/index.d.ts.map +1 -0
- package/dist/types/authorization/index.js +99 -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 +11 -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 +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 +83 -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 +8 -8
- 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 +23 -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 +1 -1
- package/dist/types/session/ids.d.ts.map +1 -1
- package/dist/types/session/index.d.ts +2 -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 +44 -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 +175 -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 +82 -2
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/id.js +104 -4
- 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 -14
- package/src/agents/RouterAgent.ts +33 -21
- package/src/agents/SupervisorAgent.ts +46 -28
- 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/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/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 +15 -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 +371 -18
- 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 +15 -12
- package/src/registry/tool/presentation.ts +116 -0
- package/src/registry/tool/screen.ts +12 -11
- 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 +11 -14
- package/src/runtime/query/guardrails.ts +16 -12
- package/src/runtime/query/index.ts +539 -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 +16 -12
- package/src/session/handoff/index.ts +1 -1
- package/src/session/handoff/single.ts +16 -17
- package/src/session/migration/filesystem.ts +46 -2
- package/src/session/migration/id-prefix.ts +47 -22
- package/src/session/migration/index.ts +5 -2
- package/src/session/migration/marker.ts +19 -4
- package/src/session/retention/archive.ts +19 -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 +22 -3
- package/src/types/agent/{gateway.ts → scheduler.ts} +30 -4
- package/src/types/agent/supervisor.ts +15 -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 +69 -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 +17 -2
- package/src/types/connector/mcp.ts +8 -0
- package/src/types/guardrail/index.ts +1 -1
- package/src/types/hitl/policy.ts +83 -0
- package/src/types/ids/brand.ts +58 -0
- package/src/types/ids/index.ts +94 -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 +24 -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 +1 -1
- package/src/types/session/index.ts +1 -1
- package/src/types/session/store.ts +53 -22
- package/src/types/session/sub-session.ts +45 -16
- package/src/types/skills/index.ts +50 -0
- package/src/types/tool/index.ts +156 -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 +163 -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.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
|
@@ -15,6 +15,21 @@ export interface LLMProvider {
|
|
|
15
15
|
* i.e. today's behavior (assume everything works, never warn).
|
|
16
16
|
*/
|
|
17
17
|
readonly capabilities?: ProviderCapabilities;
|
|
18
|
+
/**
|
|
19
|
+
* Retry behaviour this DRIVER wants, when the generic default is wrong
|
|
20
|
+
* for the vendor behind it.
|
|
21
|
+
*
|
|
22
|
+
* One config was applied to every member of a chain, so an operator
|
|
23
|
+
* running [expensive primary, cheap self-hosted backup] could not give
|
|
24
|
+
* the backup a shorter budget — the two have different failure shapes
|
|
25
|
+
* and different costs per attempt, and only the driver knows which.
|
|
26
|
+
*
|
|
27
|
+
* Merged UNDER a caller's config, never over it: the host asked for
|
|
28
|
+
* something specific and the driver is expressing a default. Absent
|
|
29
|
+
* means the generic default, which is what every driver had before this
|
|
30
|
+
* existed.
|
|
31
|
+
*/
|
|
32
|
+
readonly retryDefaults?: Partial<import('../../provider/retry.js').ProviderRetryConfig>;
|
|
18
33
|
/**
|
|
19
34
|
* The single LLM entry point. Returns an async iterable of
|
|
20
35
|
* {@link StreamChunk} carrying text deltas, tool-call argument
|
|
@@ -22,8 +37,8 @@ export interface LLMProvider {
|
|
|
22
37
|
*
|
|
23
38
|
* Consumers that need an aggregated response (legacy
|
|
24
39
|
* `ChatCompletionResponse` shape) call
|
|
25
|
-
* `
|
|
26
|
-
* `@namzu/sdk/provider/collect`. The kernel's iteration
|
|
40
|
+
* `collectChatCompletion(provider.chatStream(params))` from
|
|
41
|
+
* `@namzu/sdk/provider/collect-chat-completion`. The kernel's iteration
|
|
27
42
|
* orchestrator consumes the stream directly so it can emit
|
|
28
43
|
* per-delta `RunEvent`s.
|
|
29
44
|
*
|
|
@@ -132,5 +147,31 @@ export interface LLMProvider {
|
|
|
132
147
|
* a vendor rejection rather than a failing build.
|
|
133
148
|
*/
|
|
134
149
|
effortLevelsFor?(model: string, thinking?: import('./chat.js').ThinkingConfig): readonly import('./chat.js').ReasoningEffort[];
|
|
150
|
+
/**
|
|
151
|
+
* How large a context this model actually has, if the vendor says.
|
|
152
|
+
*
|
|
153
|
+
* The kernel's only source below an explicit host config is a
|
|
154
|
+
* hand-maintained prefix table, and its own header records what that
|
|
155
|
+
* costs: one vendor family's entries all carried 200k including the
|
|
156
|
+
* models whose window is 1M, so those runs compacted at roughly 14% full
|
|
157
|
+
* and threw away the prompt-cache prefix to do it. Every model release drifts the table
|
|
158
|
+
* again until somebody edits it. Meanwhile at least one driver already
|
|
159
|
+
* parses a real per-model `context_length` off the vendor listing and
|
|
160
|
+
* throws it away, because there was no member to return it through.
|
|
161
|
+
*
|
|
162
|
+
* Three states, exactly like {@link LLMProvider.effortLevelsFor}: the
|
|
163
|
+
* member ABSENT means this driver cannot answer at all; a resolved
|
|
164
|
+
* `undefined` means it asked and does not know; a number is the answer.
|
|
165
|
+
* The three are different facts and collapsing any two of them turns
|
|
166
|
+
* "I do not know" into a confident wrong number, which is the failure
|
|
167
|
+
* the table already made once.
|
|
168
|
+
*
|
|
169
|
+
* Resolved ONCE per run, not per iteration — the two consumers are
|
|
170
|
+
* synchronous and in the hot loop, so this must never become an await
|
|
171
|
+
* inside it. A rejection or a hang here is not a run failure: the table
|
|
172
|
+
* is still there, and a driver that cannot answer must not take down a
|
|
173
|
+
* run that would otherwise work.
|
|
174
|
+
*/
|
|
175
|
+
resolveContextWindow?(model: string, signal?: AbortSignal): Promise<number | undefined>;
|
|
135
176
|
}
|
|
136
177
|
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/types/provider/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,oBA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AoB,CAAA;IAE5C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,OAAO,yBAAyB,EAAE,mBAAmB,CAAC,CAAA;IAEvF;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAA;IAEpE,UAAU,CAAC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,eAAe,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAEjC;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE9C;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,eAAe,CAAC,CACf,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,OAAO,WAAW,EAAE,cAAc,GAC3C,SAAS,OAAO,WAAW,EAAE,eAAe,EAAE,CAAA;IAEjD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,oBAAoB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACvF"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
export interface ModelInfo {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Tokens the model's context holds, when the driver knows.
|
|
6
|
+
*
|
|
7
|
+
* OPTIONAL, and the optionality is the fix. Four drivers filled this
|
|
8
|
+
* with `0` where the vendor listing carries no value — and zero is not
|
|
9
|
+
* a window, it is "I do not know" written as a number, which reads to
|
|
10
|
+
* every consumer as a real measurement of a model that can hold
|
|
11
|
+
* nothing. A caller dividing by it gets `Infinity`; one comparing
|
|
12
|
+
* against it concludes every prompt is too long.
|
|
13
|
+
*
|
|
14
|
+
* Absent says the same thing honestly, and a consumer can then fall
|
|
15
|
+
* back to its own table instead of trusting a zero.
|
|
16
|
+
*/
|
|
17
|
+
contextWindow?: number;
|
|
18
|
+
/** Same, and absent for the same reason. */
|
|
19
|
+
maxOutputTokens?: number;
|
|
6
20
|
inputPrice: number;
|
|
7
21
|
outputPrice: number;
|
|
8
22
|
supportsToolUse: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/types/provider/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/types/provider/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,iBAAiB,EAAE,OAAO,CAAA;CAC1B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { CostInfo, RunExecutionStatus } from '../common/index.js';
|
|
2
|
+
import type { AuditEventId, RunId, TenantId } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* What happened to the thing this event describes.
|
|
5
|
+
*
|
|
6
|
+
* `'refused'` is a VALUE, not an absent record — the whole reason this type
|
|
7
|
+
* exists rather than reusing whatever shape {@link import('./events.js').RunEvent}
|
|
8
|
+
* already had. Before this, a permission denial (the `AuthorizationGate`) and
|
|
9
|
+
* a guardrail block each produced nothing durable with cost/outcome/identity
|
|
10
|
+
* attached — the one outcome an auditor most needs was the one absent from
|
|
11
|
+
* the trail. See ses_020's logging design §5.
|
|
12
|
+
*/
|
|
13
|
+
export type AuditOutcome = 'success' | 'failure' | 'refused';
|
|
14
|
+
/**
|
|
15
|
+
* Who acted, in the compliance-audit sense: the actor's identity and the
|
|
16
|
+
* tenant it acted under.
|
|
17
|
+
*
|
|
18
|
+
* `persona` is the label a host assigned the agent for THIS run — absent
|
|
19
|
+
* when the run was not configured with one (most runs today), and nothing
|
|
20
|
+
* here invents a value for it. Populated only at call sites that actually
|
|
21
|
+
* have a persona in scope (`runtime/query/index.ts`'s guardrail-block
|
|
22
|
+
* branches, via `params.persona?.identity.role`); a call site with no
|
|
23
|
+
* persona in scope (the verification-gate denial inside `tool-review.ts`)
|
|
24
|
+
* legitimately omits it rather than guessing.
|
|
25
|
+
*/
|
|
26
|
+
export interface AuditActor {
|
|
27
|
+
readonly agentId: string;
|
|
28
|
+
readonly tenantId: TenantId;
|
|
29
|
+
readonly persona?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* What was attempted. `tool` is present for a tool-scoped action; absent for
|
|
33
|
+
* a run-level one (an input/output guardrail, the run's own completion or
|
|
34
|
+
* failure). `resource` names the thing the action targeted when that is
|
|
35
|
+
* narrower than the tool itself — a guardrail's own name, for instance.
|
|
36
|
+
*
|
|
37
|
+
* `action` is deliberately a free-text label, not a closed union: unlike
|
|
38
|
+
* `RunEvent['type']` (which a switch must exhaustively handle, per
|
|
39
|
+
* Convention #16), nothing here switches on `action` today, and closing it
|
|
40
|
+
* prematurely would be inventing a vocabulary nobody has asked to enumerate
|
|
41
|
+
* yet.
|
|
42
|
+
*/
|
|
43
|
+
export interface AuditAction {
|
|
44
|
+
readonly action: string;
|
|
45
|
+
readonly tool?: string;
|
|
46
|
+
readonly resource?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One entry in a run's audit trail — durable evidence of what the agent
|
|
50
|
+
* did, under whose identity, at what cost, and whether it was allowed.
|
|
51
|
+
*
|
|
52
|
+
* ## Why this is a SEPARATE trail from `RunEvent`
|
|
53
|
+
*
|
|
54
|
+
* See {@link import('./store.js').RunStore.appendAuditEvent}'s own doc and
|
|
55
|
+
* ses_020's logging design §5 for the full reasoning. In short: an
|
|
56
|
+
* operational log is level-filtered, sampled, rotatable and legitimately
|
|
57
|
+
* absent when no host installed a sink. None of that is acceptable for the
|
|
58
|
+
* kernel's own claim — "an auditable trail of what it did and what it
|
|
59
|
+
* cost", the README's sentence about itself.
|
|
60
|
+
*
|
|
61
|
+
* ## `seq` is this trail's OWN sequence space
|
|
62
|
+
*
|
|
63
|
+
* Independent of {@link import('./events.js').RunEvent}'s envelope `seq`,
|
|
64
|
+
* which numbers the (much higher-volume) operational transcript. Two logs,
|
|
65
|
+
* two cursors, and forcing them to share one counter would make an
|
|
66
|
+
* unrelated burst on one trail move the other's cursor — see
|
|
67
|
+
* `manager/run/persistence.ts`'s `_lastAuditSeq` for where this is held.
|
|
68
|
+
*
|
|
69
|
+
* ## `cost` is NON-OPTIONAL
|
|
70
|
+
*
|
|
71
|
+
* "What it did and what it cost" is the kernel's own sentence about itself
|
|
72
|
+
* (README) — an audit entry that cannot say what something cost has not
|
|
73
|
+
* answered the question it exists to answer. It carries the run's
|
|
74
|
+
* CUMULATIVE total AT THIS MOMENT, matching `Run.costInfo`'s own semantics
|
|
75
|
+
* (see `utils/cost.ts`'s `accumulateCost`: the field IS the running total,
|
|
76
|
+
* not a delta, so "the most recent entry carries the answer whole" is
|
|
77
|
+
* already how the derived summary treats it — see {@link replayRun}).
|
|
78
|
+
*/
|
|
79
|
+
export interface AuditEvent {
|
|
80
|
+
readonly id: AuditEventId;
|
|
81
|
+
readonly runId: RunId;
|
|
82
|
+
readonly seq: number;
|
|
83
|
+
/** Epoch ms at which the store recorded the event. */
|
|
84
|
+
readonly timestamp: number;
|
|
85
|
+
readonly who: AuditActor;
|
|
86
|
+
readonly what: AuditAction;
|
|
87
|
+
readonly outcome: AuditOutcome;
|
|
88
|
+
readonly cost: CostInfo;
|
|
89
|
+
/** Present on `'refused'` and `'failure'` — the reason a reader needs. */
|
|
90
|
+
readonly reason?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The active span's identity at the moment this entry was recorded —
|
|
93
|
+
* resolved the same way `utils/log/create-logger.ts`'s `emit` resolves
|
|
94
|
+
* `LogRecord.traceId`/`spanId`: fresh per record, off the live
|
|
95
|
+
* `@opentelemetry/api` global, never captured once and reused. Genuinely
|
|
96
|
+
* absent — not `''`, not `'unknown'` — whenever nothing is active. See
|
|
97
|
+
* `telemetry/runtime-accessors.ts`'s `getActiveSpanContext` for why.
|
|
98
|
+
*/
|
|
99
|
+
readonly traceId?: string;
|
|
100
|
+
readonly spanId?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* What a caller hands
|
|
104
|
+
* {@link import('../../manager/run/persistence.js').RunPersistence.recordAudit} —
|
|
105
|
+
* the fields ONLY the call site knows. `id`, `runId`, `seq`, `timestamp`,
|
|
106
|
+
* `who.agentId`/`who.tenantId` and `cost` are filled in by `recordAudit`
|
|
107
|
+
* itself from the run it is bound to; a caller supplying them would be
|
|
108
|
+
* asserting facts about identity and cost that only the run-persistence
|
|
109
|
+
* layer is positioned to know, and could disagree with what the run
|
|
110
|
+
* actually holds.
|
|
111
|
+
*/
|
|
112
|
+
export interface AuditEventInput {
|
|
113
|
+
readonly what: AuditAction;
|
|
114
|
+
readonly outcome: AuditOutcome;
|
|
115
|
+
readonly reason?: string;
|
|
116
|
+
readonly persona?: string;
|
|
117
|
+
}
|
|
118
|
+
/** What {@link replayRun} reconstructs from the trail alone. */
|
|
119
|
+
export interface RunSummary {
|
|
120
|
+
readonly costInfo: CostInfo;
|
|
121
|
+
readonly status: Extract<RunExecutionStatus, 'completed' | 'failed'>;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Reconstruct a completed run's cost and status from its audit trail alone,
|
|
125
|
+
* with no read of the derived `Run` record.
|
|
126
|
+
*
|
|
127
|
+
* This is the verification ses_020's design promises (§5): `Run.costInfo`
|
|
128
|
+
* and `Run.status`, persisted through `RunStore.writeRunMeta`
|
|
129
|
+
* (`manager/run/persistence.ts:221`/`:569`), are a full-record overwrite
|
|
130
|
+
* with no `seq` and no prior-value retention — a DERIVED summary cache, not
|
|
131
|
+
* the evidence. The audit trail is the evidence, and a divergence between
|
|
132
|
+
* what this returns and what `Run.costInfo`/`Run.status` actually hold is a
|
|
133
|
+
* defect in the summary, never in the trail.
|
|
134
|
+
*
|
|
135
|
+
* Walks from the END rather than folding forward: `cost` on each entry is
|
|
136
|
+
* already the run's cumulative total (see {@link AuditEvent.cost}), so the
|
|
137
|
+
* most recent entry that actually SETTLES the run — `'success'` or
|
|
138
|
+
* `'failure'` — carries the answer whole. A `'refused'` entry is a single
|
|
139
|
+
* action inside a still-open run, never the run's own verdict, and is
|
|
140
|
+
* skipped rather than treated as terminal: otherwise a refusal that
|
|
141
|
+
* happened to be the last write before a crash would replay as the run's
|
|
142
|
+
* final status, which is not what it means.
|
|
143
|
+
*
|
|
144
|
+
* `undefined` when no terminal entry exists — a run still in progress, or
|
|
145
|
+
* one that crashed before a terminal write landed. Callers that need "no
|
|
146
|
+
* answer yet" and "diverges from the derived summary" to read differently
|
|
147
|
+
* should treat `undefined` as the former.
|
|
148
|
+
*/
|
|
149
|
+
export declare function replayRun(events: readonly AuditEvent[]): RunSummary | undefined;
|
|
150
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/types/run/audit.ts"],"names":[],"mappings":"AAAA,OA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AAM,CAAA;CACxB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,gEAAgE;AAChE,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAA;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,GAAG,SAAS,CAQ/E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reconstruct a completed run's cost and status from its audit trail alone,
|
|
3
|
+
* with no read of the derived `Run` record.
|
|
4
|
+
*
|
|
5
|
+
* This is the verification ses_020's design promises (§5): `Run.costInfo`
|
|
6
|
+
* and `Run.status`, persisted through `RunStore.writeRunMeta`
|
|
7
|
+
* (`manager/run/persistence.ts:221`/`:569`), are a full-record overwrite
|
|
8
|
+
* with no `seq` and no prior-value retention — a DERIVED summary cache, not
|
|
9
|
+
* the evidence. The audit trail is the evidence, and a divergence between
|
|
10
|
+
* what this returns and what `Run.costInfo`/`Run.status` actually hold is a
|
|
11
|
+
* defect in the summary, never in the trail.
|
|
12
|
+
*
|
|
13
|
+
* Walks from the END rather than folding forward: `cost` on each entry is
|
|
14
|
+
* already the run's cumulative total (see {@link AuditEvent.cost}), so the
|
|
15
|
+
* most recent entry that actually SETTLES the run — `'success'` or
|
|
16
|
+
* `'failure'` — carries the answer whole. A `'refused'` entry is a single
|
|
17
|
+
* action inside a still-open run, never the run's own verdict, and is
|
|
18
|
+
* skipped rather than treated as terminal: otherwise a refusal that
|
|
19
|
+
* happened to be the last write before a crash would replay as the run's
|
|
20
|
+
* final status, which is not what it means.
|
|
21
|
+
*
|
|
22
|
+
* `undefined` when no terminal entry exists — a run still in progress, or
|
|
23
|
+
* one that crashed before a terminal write landed. Callers that need "no
|
|
24
|
+
* answer yet" and "diverges from the derived summary" to read differently
|
|
25
|
+
* should treat `undefined` as the former.
|
|
26
|
+
*/
|
|
27
|
+
export function replayRun(events) {
|
|
28
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
29
|
+
const event = events[i];
|
|
30
|
+
if (event === undefined)
|
|
31
|
+
continue;
|
|
32
|
+
if (event.outcome === 'success')
|
|
33
|
+
return { costInfo: event.cost, status: 'completed' };
|
|
34
|
+
if (event.outcome === 'failure')
|
|
35
|
+
return { costInfo: event.cost, status: 'failed' };
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/types/run/audit.ts"],"names":[],"mappings":"AAiIA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,SAAS,CAAC,MAA6B;IACtD,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;QACvB,IAAI,KAAK,KAAK,SAAS;YAAE,SAAQ;QACjC,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;YAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAA;QACrF,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;YAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;IACnF,CAAC;IACD,OAAO,SAAS,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a run stopped, when it stopped because somebody stopped it.
|
|
3
|
+
*
|
|
4
|
+
* `stopReason: 'cancelled'` says the run was cancelled and nothing more,
|
|
5
|
+
* and the four cases behind it want four different responses. An operator
|
|
6
|
+
* pressing cancel is not a defect. A parent abandoning its children is a
|
|
7
|
+
* fact about the parent, and looking for the child's problem wastes the
|
|
8
|
+
* reader's time. A budget stop is a configuration question. A hook's
|
|
9
|
+
* refusal is a policy one.
|
|
10
|
+
*
|
|
11
|
+
* The gap was not that the information was thrown away — it was never
|
|
12
|
+
* carried. `AbstractAgent.cancel()` aborted with no argument at all, and
|
|
13
|
+
* `AgentManager` aborted a child with the bare string `'canceled'`, which
|
|
14
|
+
* `abortReasonText` deliberately renders as no reason (it would otherwise
|
|
15
|
+
* print "was cancelled: canceled"). So both paths arrived at the run loop
|
|
16
|
+
* indistinguishable.
|
|
17
|
+
*/
|
|
18
|
+
export type CancelCause = 'user' | 'parent' | 'budget' | 'hook';
|
|
19
|
+
/**
|
|
20
|
+
* The abort reason a cancellation carries.
|
|
21
|
+
*
|
|
22
|
+
* An `Error` subclass rather than a bare value, because `AbortController`
|
|
23
|
+
* reasons cross package boundaries and a plain object gives a reader
|
|
24
|
+
* nothing in a stack trace. `name` is checked rather than `instanceof`,
|
|
25
|
+
* the answer this codebase already settled on for provider errors: two
|
|
26
|
+
* copies of a package defeat `instanceof` and nothing announces it.
|
|
27
|
+
*/
|
|
28
|
+
export declare class RunCancelled extends Error {
|
|
29
|
+
readonly name = "RunCancelled";
|
|
30
|
+
/**
|
|
31
|
+
* Named `cancelCause`, not `cause`. `Error.cause` already exists and
|
|
32
|
+
* means "the error this one wrapped", so reusing it would put two
|
|
33
|
+
* unrelated meanings on one property name and silently change what
|
|
34
|
+
* anything reading `err.cause` gets.
|
|
35
|
+
*/
|
|
36
|
+
readonly cancelCause: CancelCause;
|
|
37
|
+
constructor(cancelCause: CancelCause);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The cause an abort reason carries, or `undefined` for one that carries
|
|
41
|
+
* none.
|
|
42
|
+
*
|
|
43
|
+
* `undefined` is a real answer and not a fallback. A cancellation whose
|
|
44
|
+
* origin nobody recorded is not a user cancellation, and substituting
|
|
45
|
+
* `'user'` would put a confident wrong value where an honest absence
|
|
46
|
+
* belongs.
|
|
47
|
+
*/
|
|
48
|
+
export declare function cancelCauseOf(reason: unknown): CancelCause | undefined;
|
|
49
|
+
//# sourceMappingURL=cancel-cause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-cause.d.ts","sourceRoot":"","sources":["../../../src/types/run/cancel-cause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE/D;;;;;;;;GAQG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACtC,SAAkB,IAAI,kBAAiB;IAEvC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;gBAErB,WAAW,EAAE,WAAW;CAIpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAKtE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The abort reason a cancellation carries.
|
|
3
|
+
*
|
|
4
|
+
* An `Error` subclass rather than a bare value, because `AbortController`
|
|
5
|
+
* reasons cross package boundaries and a plain object gives a reader
|
|
6
|
+
* nothing in a stack trace. `name` is checked rather than `instanceof`,
|
|
7
|
+
* the answer this codebase already settled on for provider errors: two
|
|
8
|
+
* copies of a package defeat `instanceof` and nothing announces it.
|
|
9
|
+
*/
|
|
10
|
+
export class RunCancelled extends Error {
|
|
11
|
+
name = 'RunCancelled';
|
|
12
|
+
/**
|
|
13
|
+
* Named `cancelCause`, not `cause`. `Error.cause` already exists and
|
|
14
|
+
* means "the error this one wrapped", so reusing it would put two
|
|
15
|
+
* unrelated meanings on one property name and silently change what
|
|
16
|
+
* anything reading `err.cause` gets.
|
|
17
|
+
*/
|
|
18
|
+
cancelCause;
|
|
19
|
+
constructor(cancelCause) {
|
|
20
|
+
super(`run cancelled by ${cancelCause}`);
|
|
21
|
+
this.cancelCause = cancelCause;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The cause an abort reason carries, or `undefined` for one that carries
|
|
26
|
+
* none.
|
|
27
|
+
*
|
|
28
|
+
* `undefined` is a real answer and not a fallback. A cancellation whose
|
|
29
|
+
* origin nobody recorded is not a user cancellation, and substituting
|
|
30
|
+
* `'user'` would put a confident wrong value where an honest absence
|
|
31
|
+
* belongs.
|
|
32
|
+
*/
|
|
33
|
+
export function cancelCauseOf(reason) {
|
|
34
|
+
if (reason instanceof Error && reason.name === 'RunCancelled') {
|
|
35
|
+
return reason.cancelCause;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=cancel-cause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-cause.js","sourceRoot":"","sources":["../../../src/types/run/cancel-cause.ts"],"names":[],"mappings":"AAmBA;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACpB,IAAI,GAAG,cAAc,CAAA;IAEvC;;;;;OAKG;IACM,WAAW,CAAa;IAEjC,YAAY,WAAwB;QACnC,KAAK,CAAC,oBAAoB,WAAW,EAAE,CAAC,CAAA;QACxC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAC/B,CAAC;CACD;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,MAAe;IAC5C,IAAI,MAAM,YAAY,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QAC/D,OAAQ,MAAuB,CAAC,WAAW,CAAA;IAC5C,CAAC;IACD,OAAO,SAAS,CAAA;AACjB,CAAC"}
|
|
@@ -176,7 +176,7 @@ export interface DurableRunEntry extends CheckpointRunScope {
|
|
|
176
176
|
* neither, or either, and the state a queue worker needs most is parked
|
|
177
177
|
* AND unclaimed, which one union cannot say.
|
|
178
178
|
*/
|
|
179
|
-
readonly claim?:
|
|
179
|
+
readonly claim?: LeaseSummary;
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Which order a listing comes back in.
|
|
@@ -223,13 +223,13 @@ export type DurableRunOrder =
|
|
|
223
223
|
* Not a random token, deliberately: randomness proves identity and cannot
|
|
224
224
|
* establish *order*, and order is the entire mechanism.
|
|
225
225
|
*/
|
|
226
|
-
export type
|
|
226
|
+
export type FencingToken = number;
|
|
227
227
|
/** A holding of a run's claim, as issued to the process that took it. */
|
|
228
|
-
export interface
|
|
228
|
+
export interface RunLease {
|
|
229
229
|
/** Opaque caller-supplied identity — a worker id, a pod name. Evidence, not authority. */
|
|
230
230
|
readonly holder: string;
|
|
231
|
-
/** See {@link
|
|
232
|
-
readonly fence:
|
|
231
|
+
/** See {@link FencingToken}. Present it on every durable write. */
|
|
232
|
+
readonly fence: FencingToken;
|
|
233
233
|
/**
|
|
234
234
|
* Absolute epoch ms after which the claim may be taken by somebody else.
|
|
235
235
|
*
|
|
@@ -240,9 +240,9 @@ export interface RunClaim {
|
|
|
240
240
|
readonly expiresAt: number;
|
|
241
241
|
}
|
|
242
242
|
/** A run's claim as a listing reports it. */
|
|
243
|
-
export interface
|
|
243
|
+
export interface LeaseSummary {
|
|
244
244
|
readonly holder: string;
|
|
245
|
-
readonly fence:
|
|
245
|
+
readonly fence: FencingToken;
|
|
246
246
|
readonly expiresAt: number;
|
|
247
247
|
/**
|
|
248
248
|
* Whether the claim had expired at the instant the listing was taken.
|
|
@@ -254,6 +254,18 @@ export interface ClaimSummary {
|
|
|
254
254
|
*/
|
|
255
255
|
readonly expired: boolean;
|
|
256
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Old spellings of the three above, live for one deprecation window.
|
|
259
|
+
*
|
|
260
|
+
* These are types with no runtime value, so a plain `export type` carries
|
|
261
|
+
* the `@deprecated` tag fine — the `const`+`type` pair the SDK barrel uses
|
|
262
|
+
* for renamed CLASSES is not needed here and would not compile.
|
|
263
|
+
*
|
|
264
|
+
* The verbs did NOT move with them. `claimRun`, `releaseRun` and
|
|
265
|
+
* `toClaimSummary` keep their names: "claim a lease" is idiomatic, and
|
|
266
|
+
* renaming the methods would break every `CheckpointStore` implementor for
|
|
267
|
+
* no reading gain — the opposite of the point.
|
|
268
|
+
*/
|
|
257
269
|
/** What a caller asks for when taking a run. */
|
|
258
270
|
export interface ClaimRunOptions {
|
|
259
271
|
/** Who is taking it. Recorded so an operator can see what holds a stuck run. */
|
|
@@ -344,7 +356,7 @@ export interface CheckpointStore {
|
|
|
344
356
|
/**
|
|
345
357
|
* Persist one checkpoint. Overwrites an existing checkpoint with the same id.
|
|
346
358
|
*
|
|
347
|
-
* @param fence the {@link
|
|
359
|
+
* @param fence the {@link FencingToken} of the holding this write belongs
|
|
348
360
|
* to, when the run is claimed. A store that supports claims REFUSES a
|
|
349
361
|
* write whose fence is below the run's current one — that refusal is
|
|
350
362
|
* what makes a claim a lease rather than a suggestion, because a holder
|
|
@@ -357,7 +369,7 @@ export interface CheckpointStore {
|
|
|
357
369
|
* that would make adding a claim to one worker break every worker that
|
|
358
370
|
* has not adopted it yet.
|
|
359
371
|
*/
|
|
360
|
-
writeCheckpoint(scope: CheckpointRunScope, checkpoint: IterationCheckpoint, fence?:
|
|
372
|
+
writeCheckpoint(scope: CheckpointRunScope, checkpoint: IterationCheckpoint, fence?: FencingToken): Promise<void>;
|
|
361
373
|
/** Load a single checkpoint by id. Returns `null` when it does not exist. */
|
|
362
374
|
readCheckpoint(scope: CheckpointRunScope, checkpointId: CheckpointId): Promise<IterationCheckpoint | null>;
|
|
363
375
|
/**
|
|
@@ -479,7 +491,7 @@ export interface CheckpointStore {
|
|
|
479
491
|
* claim from each other instantly. Use something per-process, not a
|
|
480
492
|
* per-deployment name.
|
|
481
493
|
*/
|
|
482
|
-
claimRun?(scope: CheckpointRunScope, options: ClaimRunOptions): Promise<
|
|
494
|
+
claimRun?(scope: CheckpointRunScope, options: ClaimRunOptions): Promise<RunLease | null>;
|
|
483
495
|
/**
|
|
484
496
|
* Give a claim up early. Idempotent: releasing a claim that already
|
|
485
497
|
* expired, was superseded, or never existed succeeds as a no-op.
|
|
@@ -494,6 +506,6 @@ export interface CheckpointStore {
|
|
|
494
506
|
* difference, never a correctness one, which is the property that lets a
|
|
495
507
|
* crashed worker be indistinguishable from a slow one.
|
|
496
508
|
*/
|
|
497
|
-
releaseRun?(scope: CheckpointRunScope, fence:
|
|
509
|
+
releaseRun?(scope: CheckpointRunScope, fence: FencingToken): Promise<void>;
|
|
498
510
|
}
|
|
499
511
|
//# sourceMappingURL=checkpoint-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint-store.d.ts","sourceRoot":"","sources":["../../../src/types/run/checkpoint-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC9F,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IAClC,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAA;IAClB,gDAAgD;IAChD,SAAS,EAAE,SAAS,CAAA;IACpB,wCAAwC;IACxC,SAAS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 +2,7 @@ import type { ModelPricing } from '../../utils/cost.js';
|
|
|
2
2
|
import type { Logger } from '../../utils/logger.js';
|
|
3
3
|
import type { RunId, SessionId, TenantId } from '../ids/index.js';
|
|
4
4
|
import type { PermissionMode } from '../permission/index.js';
|
|
5
|
-
import type { ProjectId,
|
|
5
|
+
import type { ProjectId, TopicId } from '../session/ids.js';
|
|
6
6
|
import type { CheckpointStore } from './checkpoint-store.js';
|
|
7
7
|
export interface AgentRunConfig {
|
|
8
8
|
model: string;
|
|
@@ -51,6 +51,12 @@ export interface AgentRunConfig {
|
|
|
51
51
|
timeoutMs?: number;
|
|
52
52
|
memoryLimitMb?: number;
|
|
53
53
|
maxProcesses?: number;
|
|
54
|
+
/**
|
|
55
|
+
* What the sandbox is rooted at — see `SandboxConfigSchema.workspace`.
|
|
56
|
+
* Absent means `'ephemeral'`: a fresh temp directory, which is the
|
|
57
|
+
* behaviour every sandboxed run had before this existed.
|
|
58
|
+
*/
|
|
59
|
+
workspace?: 'ephemeral' | 'working-directory';
|
|
54
60
|
};
|
|
55
61
|
/**
|
|
56
62
|
* Iteration-checkpoint cadence: create a checkpoint on every Nth
|
|
@@ -96,11 +102,25 @@ export interface AgentRunConfig {
|
|
|
96
102
|
* Default `undefined` — no deadline, today's behaviour.
|
|
97
103
|
*/
|
|
98
104
|
hitlParkTtlMs?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Override the logger a run's log lines derive from.
|
|
107
|
+
*
|
|
108
|
+
* This is an override of the SOURCE, not a substitute for correlation:
|
|
109
|
+
* `RunContextFactory.buildLogger` always calls `.child()` on whichever
|
|
110
|
+
* logger this resolves to, so a host-supplied logger still gains
|
|
111
|
+
* `namzu.run.id`, `sessionId`, `threadId`, `projectId` and `tenantId` —
|
|
112
|
+
* the same binding the process default gets. A host that wants its own
|
|
113
|
+
* sink, format or destination threaded through every record a run
|
|
114
|
+
* produces sets this once; a host that wants the process default
|
|
115
|
+
* (`getRootLogger()`) sets nothing, which is what absent has always
|
|
116
|
+
* meant.
|
|
117
|
+
*/
|
|
118
|
+
logger?: Logger;
|
|
99
119
|
}
|
|
100
120
|
/**
|
|
101
|
-
* Config for {@link RunPersistence}. `sessionId`, `
|
|
121
|
+
* Config for {@link RunPersistence}. `sessionId`, `topicId`, `tenantId`,
|
|
102
122
|
* and `projectId` are required — every Run is attributed across the full
|
|
103
|
-
* five-layer scope (Tenant → Project →
|
|
123
|
+
* five-layer scope (Tenant → Project → Topic → Session → Run,
|
|
104
124
|
* Convention #17).
|
|
105
125
|
*/
|
|
106
126
|
export interface RunPersistenceConfig {
|
|
@@ -113,7 +133,7 @@ export interface RunPersistenceConfig {
|
|
|
113
133
|
pricing?: ModelPricing;
|
|
114
134
|
log: Logger;
|
|
115
135
|
sessionId: SessionId;
|
|
116
|
-
|
|
136
|
+
topicId: TopicId;
|
|
117
137
|
tenantId: TenantId;
|
|
118
138
|
projectId: ProjectId;
|
|
119
139
|
parentRunId?: RunId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/types/run/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/types/run/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAA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AAW,oBAAoB;IACpC,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,GAAG,EAAE,MAAM,CAAA;IAEX,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,SAAS,CAAA;IAEpB,WAAW,CAAC,EAAE,KAAK,CAAA;IAEnB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,eAAe,CAAC,EAAE,eAAe,CAAA;IAEjC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,YAAY,EAAE,QAAQ,CAAA;CACxC;AAED,MAAM,WAAW,cAAc;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,sBAAsB,EAAE,MAAM,CAAA;CAC9B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RunExecutionStatus } from '../common/index.js';
|
|
2
2
|
import type { PendingDecision } from '../hitl/index.js';
|
|
3
3
|
import type { RunStatus } from './status.js';
|
|
4
4
|
/**
|
|
5
5
|
* Project what the SDK records about a run onto the session-layer
|
|
6
6
|
* {@link RunStatus}.
|
|
7
7
|
*
|
|
8
|
-
* `Run.status` is an {@link
|
|
8
|
+
* `Run.status` is an {@link RunExecutionStatus} — six values, none of which can
|
|
9
9
|
* say "a human owes this run an answer". `RunStatus` has the vocabulary for
|
|
10
10
|
* that and is consumed by session-status derivation and by handoff gating,
|
|
11
11
|
* but nothing in the repo ever produced it: a host implementing a resolver
|
|
@@ -20,7 +20,7 @@ import type { RunStatus } from './status.js';
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function deriveRunStatus(input: {
|
|
22
22
|
/** What the run itself recorded. */
|
|
23
|
-
readonly status:
|
|
23
|
+
readonly status: RunExecutionStatus;
|
|
24
24
|
/** The run's outstanding park, if it has one. */
|
|
25
25
|
readonly park?: PendingDecision;
|
|
26
26
|
/** Injectable for tests; defaults to now. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive-status.d.ts","sourceRoot":"","sources":["../../../src/types/run/derive-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"derive-status.d.ts","sourceRoot":"","sources":["../../../src/types/run/derive-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACtC,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,iDAAiD;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAA;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,SAAS,CAiCZ"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Project what the SDK records about a run onto the session-layer
|
|
3
3
|
* {@link RunStatus}.
|
|
4
4
|
*
|
|
5
|
-
* `Run.status` is an {@link
|
|
5
|
+
* `Run.status` is an {@link RunExecutionStatus} — six values, none of which can
|
|
6
6
|
* say "a human owes this run an answer". `RunStatus` has the vocabulary for
|
|
7
7
|
* that and is consumed by session-status derivation and by handoff gating,
|
|
8
8
|
* but nothing in the repo ever produced it: a host implementing a resolver
|