@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type AttributeValue = string | number | boolean | readonly (string | number | boolean)[];
|
|
2
|
+
type AttributeKey = `namzu.${string}` | `gen_ai.${string}` | `service.${string}` | `exception.${string}`;
|
|
3
|
+
/**
|
|
4
|
+
* A namespaced, shape-safe attribute bag. Deliberately NOT
|
|
5
|
+
* `Partial<Record<...>>`: `Partial` would type every property as
|
|
6
|
+
* `AttributeValue | undefined`, and this repo's tsconfig does not set
|
|
7
|
+
* `exactOptionalPropertyTypes` — so a `Partial` version would let
|
|
8
|
+
* `{ 'namzu.x.y': undefined }` compile, an attribute that is present and
|
|
9
|
+
* holds nothing. Plain `Record` over a template-literal key domain does not
|
|
10
|
+
* require every possible key to appear — there is no finite set of keys to
|
|
11
|
+
* require — so dropping `Partial` costs a caller nothing: it still supplies
|
|
12
|
+
* only the keys it has, and gains that an explicit `undefined` is rejected
|
|
13
|
+
* the same way `null` and a nested object already are.
|
|
14
|
+
*/
|
|
15
|
+
export type LogAttributes = Readonly<Record<AttributeKey, AttributeValue>>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/utils/log/attributes.ts"],"names":[],"mappings":"AA0BA,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;AAExF,KAAK,YAAY,GACd,SAAS,MAAM,EAAE,GACjB,UAAU,MAAM,EAAE,GAClB,WAAW,MAAM,EAAE,GACnB,aAAa,MAAM,EAAE,CAAA;AAExB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/utils/log/attributes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { LogRecord, MutableLogSinkCounters } from './types.js';
|
|
2
|
+
export declare const MAX_ATTRIBUTES = 64;
|
|
3
|
+
export declare const MAX_VALUE_BYTES: number;
|
|
4
|
+
export declare const MAX_RECORD_BYTES: number;
|
|
5
|
+
/**
|
|
6
|
+
* At most 64 attributes. Excess keys are dropped in ascending key order —
|
|
7
|
+
* the same deterministic rule `capTotalSize` uses below, so a reader who has
|
|
8
|
+
* learned one learns both.
|
|
9
|
+
*/
|
|
10
|
+
export declare function capAttributeCount(record: LogRecord, counters: MutableLogSinkCounters): LogRecord;
|
|
11
|
+
/**
|
|
12
|
+
* Each string attribute value truncated at 8 KiB, tail replaced by
|
|
13
|
+
* `…[truncated N bytes]` inside the value — self-describing, so no extra
|
|
14
|
+
* flag field is minted for something the value already says about itself.
|
|
15
|
+
*/
|
|
16
|
+
export declare function truncateValues(record: LogRecord, counters: MutableLogSinkCounters): LogRecord;
|
|
17
|
+
/**
|
|
18
|
+
* Total serialized record ≤ 16 KiB. Per-value and per-count caps are
|
|
19
|
+
* independently satisfiable by a record with many small attributes, so this
|
|
20
|
+
* is the last line and measures the whole record, not one dimension of it.
|
|
21
|
+
* Attributes are dropped in ascending key order until it fits, and
|
|
22
|
+
* `namzu.log.truncated = true` is set on what remains — the marker a
|
|
23
|
+
* downstream reader needs to tell "this record is smaller than what was
|
|
24
|
+
* logged" from "this is genuinely all there was".
|
|
25
|
+
*/
|
|
26
|
+
export declare function capTotalSize(record: LogRecord, counters: MutableLogSinkCounters): LogRecord;
|
|
27
|
+
//# sourceMappingURL=caps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caps.d.ts","sourceRoot":"","sources":["../../../src/utils/log/caps.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnE,eAAO,MAAM,cAAc,KAAK,CAAA;AAChC,eAAO,MAAM,eAAe,QAAW,CAAA;AACvC,eAAO,MAAM,gBAAgB,QAAY,CAAA;AAEzC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,GAAG,SAAS,CAchG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,GAAG,SAAS,CAkB7F;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,GAAG,SAAS,CAqB3F"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Cardinality and size caps, enforced once at the pipeline boundary — not
|
|
2
|
+
// per sink, and not left to whichever sink happens to serialize the record.
|
|
3
|
+
// A prose rule here would not survive the first attribute added under
|
|
4
|
+
// deadline; these are type-and-code boundaries a caller cannot route around
|
|
5
|
+
// by picking a different sink.
|
|
6
|
+
//
|
|
7
|
+
// Order matters and is fixed by createLogger: redact, THEN cap. Truncating
|
|
8
|
+
// first could slice a secret in half and ship the surviving fragment: a
|
|
9
|
+
// `[REDACTED:label]` placeholder is short and never needs truncating itself,
|
|
10
|
+
// but half of a real key still leaks half a key.
|
|
11
|
+
export const MAX_ATTRIBUTES = 64;
|
|
12
|
+
export const MAX_VALUE_BYTES = 8 * 1024;
|
|
13
|
+
export const MAX_RECORD_BYTES = 16 * 1024;
|
|
14
|
+
/**
|
|
15
|
+
* At most 64 attributes. Excess keys are dropped in ascending key order —
|
|
16
|
+
* the same deterministic rule `capTotalSize` uses below, so a reader who has
|
|
17
|
+
* learned one learns both.
|
|
18
|
+
*/
|
|
19
|
+
export function capAttributeCount(record, counters) {
|
|
20
|
+
const keys = Object.keys(record.attributes);
|
|
21
|
+
if (keys.length <= MAX_ATTRIBUTES)
|
|
22
|
+
return record;
|
|
23
|
+
const dropCount = keys.length - MAX_ATTRIBUTES;
|
|
24
|
+
const dropped = new Set([...keys].sort().slice(0, dropCount));
|
|
25
|
+
const attributes = {};
|
|
26
|
+
for (const key of keys) {
|
|
27
|
+
if (!dropped.has(key))
|
|
28
|
+
attributes[key] = record.attributes[key];
|
|
29
|
+
}
|
|
30
|
+
counters.attributesDropped += dropCount;
|
|
31
|
+
return { ...record, attributes };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Each string attribute value truncated at 8 KiB, tail replaced by
|
|
35
|
+
* `…[truncated N bytes]` inside the value — self-describing, so no extra
|
|
36
|
+
* flag field is minted for something the value already says about itself.
|
|
37
|
+
*/
|
|
38
|
+
export function truncateValues(record, counters) {
|
|
39
|
+
let changed = false;
|
|
40
|
+
const attributes = {};
|
|
41
|
+
for (const [key, value] of Object.entries(record.attributes)) {
|
|
42
|
+
if (typeof value !== 'string') {
|
|
43
|
+
attributes[key] = value;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const [text, wasTruncated] = truncateToByteLength(value, MAX_VALUE_BYTES);
|
|
47
|
+
attributes[key] = text;
|
|
48
|
+
if (wasTruncated) {
|
|
49
|
+
changed = true;
|
|
50
|
+
counters.valuesTruncated++;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return changed ? { ...record, attributes } : record;
|
|
54
|
+
}
|
|
55
|
+
function truncateToByteLength(value, maxBytes) {
|
|
56
|
+
const totalBytes = Buffer.byteLength(value, 'utf8');
|
|
57
|
+
if (totalBytes <= maxBytes)
|
|
58
|
+
return [value, false];
|
|
59
|
+
// Walk by Unicode codepoint, not UTF-16 code unit, so the cut point never
|
|
60
|
+
// lands inside a surrogate pair — splitting one produces an unpaired
|
|
61
|
+
// surrogate that some JSON readers choke on or silently mangle.
|
|
62
|
+
let kept = '';
|
|
63
|
+
let bytes = 0;
|
|
64
|
+
for (const ch of value) {
|
|
65
|
+
const chBytes = Buffer.byteLength(ch, 'utf8');
|
|
66
|
+
if (bytes + chBytes > maxBytes)
|
|
67
|
+
break;
|
|
68
|
+
kept += ch;
|
|
69
|
+
bytes += chBytes;
|
|
70
|
+
}
|
|
71
|
+
const removedBytes = totalBytes - bytes;
|
|
72
|
+
return [`${kept}…[truncated ${removedBytes} bytes]`, true];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Total serialized record ≤ 16 KiB. Per-value and per-count caps are
|
|
76
|
+
* independently satisfiable by a record with many small attributes, so this
|
|
77
|
+
* is the last line and measures the whole record, not one dimension of it.
|
|
78
|
+
* Attributes are dropped in ascending key order until it fits, and
|
|
79
|
+
* `namzu.log.truncated = true` is set on what remains — the marker a
|
|
80
|
+
* downstream reader needs to tell "this record is smaller than what was
|
|
81
|
+
* logged" from "this is genuinely all there was".
|
|
82
|
+
*/
|
|
83
|
+
export function capTotalSize(record, counters) {
|
|
84
|
+
if (serializedByteLength(record) <= MAX_RECORD_BYTES)
|
|
85
|
+
return record;
|
|
86
|
+
const sortedKeys = Object.keys(record.attributes).sort();
|
|
87
|
+
for (let dropCount = 1; dropCount <= sortedKeys.length; dropCount++) {
|
|
88
|
+
const keptKeys = sortedKeys.slice(dropCount);
|
|
89
|
+
const attributes = {};
|
|
90
|
+
for (const key of keptKeys)
|
|
91
|
+
attributes[key] = record.attributes[key];
|
|
92
|
+
const candidate = { ...record, attributes };
|
|
93
|
+
if (keptKeys.length === 0 || serializedByteLength(candidate) <= MAX_RECORD_BYTES) {
|
|
94
|
+
counters.recordsTruncated++;
|
|
95
|
+
return { ...record, attributes: { ...attributes, 'namzu.log.truncated': true } };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Unreachable: the final iteration of the loop above always has
|
|
99
|
+
// `keptKeys.length === 0` and returns from inside it. Kept as a typed
|
|
100
|
+
// fallback rather than a non-null assertion on the loop's last candidate.
|
|
101
|
+
counters.recordsTruncated++;
|
|
102
|
+
return { ...record, attributes: { 'namzu.log.truncated': true } };
|
|
103
|
+
}
|
|
104
|
+
function serializedByteLength(record) {
|
|
105
|
+
return Buffer.byteLength(JSON.stringify(record), 'utf8');
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=caps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caps.js","sourceRoot":"","sources":["../../../src/utils/log/caps.ts"],"names":[],"mappings":"AAAA,0EAA0E;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CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Logger } from '../logger.js';
|
|
2
|
+
import { type LogSinkCounters, type LoggerOptions, type MutableLogSinkCounters } from './types.js';
|
|
3
|
+
export type CreatedLogger = Logger & {
|
|
4
|
+
readonly counters: LogSinkCounters;
|
|
5
|
+
};
|
|
6
|
+
export declare function newCounters(): MutableLogSinkCounters;
|
|
7
|
+
/**
|
|
8
|
+
* `shared` lets several loggers write through ONE counter set.
|
|
9
|
+
*
|
|
10
|
+
* Without it the counters answer a question nobody asks. `getRootLogger()`
|
|
11
|
+
* resolves per call and builds a fresh logger each time, so every count it
|
|
12
|
+
* accumulated died with the expression that read it -- the five fields were
|
|
13
|
+
* incremented on every record in the process and read by nothing, which is
|
|
14
|
+
* `declared-but-undriven` with a comment above it promising `namzu doctor`
|
|
15
|
+
* would read them. `installProcessSink` now owns one set for the process,
|
|
16
|
+
* and that promise is discharged rather than deleted.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createLogger(options: LoggerOptions, shared?: MutableLogSinkCounters): CreatedLogger;
|
|
19
|
+
/**
|
|
20
|
+
* A logger that discards everything, countably. Every call is accepted (the
|
|
21
|
+
* level is `debug`, the widest threshold), and every accepted call is routed
|
|
22
|
+
* to `NOOP_SINK` and counted as dropped — a host holding `NOOP_LOGGER` can
|
|
23
|
+
* still tell "N calls happened and were discarded" from "N calls never
|
|
24
|
+
* happened", which a logger that filtered everything out at `silent` could
|
|
25
|
+
* not: a filtered call never reaches dispatch and is never counted at all.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NOOP_LOGGER: CreatedLogger;
|
|
28
|
+
//# sourceMappingURL=create-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-logger.d.ts","sourceRoot":"","sources":["../../../src/utils/log/create-logger.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,cAAc,CAAA;AAKtD,OAAO,EAKN,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAG3B,MAAM,YAAY,CAAA;AAWnB,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAA;AAE3E,wBAAgB,WAAW,IAAI,sBAAsB,CAEpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,sBAAsB,GAC7B,aAAa,CAEf;AAwHD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,aAKxB,CAAA"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// The pipeline: builds a record from a call, runs it through redaction and
|
|
2
|
+
// the size caps, then dispatches to the configured sink — catching whatever
|
|
3
|
+
// that sink does, because a host sink is arbitrary code the kernel does not
|
|
4
|
+
// control.
|
|
5
|
+
//
|
|
6
|
+
// `createLogger` returns a plain `Logger` with one extra, non-Logger
|
|
7
|
+
// property (`counters`) riding along on the same object. That is a
|
|
8
|
+
// deliberate choice over a `{ logger, counters }` pair: the returned value
|
|
9
|
+
// still satisfies `logger?: Logger` at every existing call site with no
|
|
10
|
+
// unwrapping, while a caller that wants to observe the pipeline reads
|
|
11
|
+
// `.counters` off the same reference. That caller is now real: LOG-06's
|
|
12
|
+
// `logging.pipeline` doctor check. It could not have been while every
|
|
13
|
+
// `getRootLogger()` built a logger with its own counters — see `shared`
|
|
14
|
+
// below and `utils/__tests__/log-counters-are-process-wide.test.ts`.
|
|
15
|
+
import { getActiveSpanContext } from '../../telemetry/runtime-accessors.js';
|
|
16
|
+
import { capAttributeCount, capTotalSize, truncateValues } from './caps.js';
|
|
17
|
+
import { errorAttributes } from './exception.js';
|
|
18
|
+
import { redactRecord } from './redact.js';
|
|
19
|
+
import { NOOP_SINK } from './sinks.js';
|
|
20
|
+
import { ERR_ATTRIBUTE, EVENT_NAME_ATTRIBUTE, SCOPE_ATTRIBUTE, } from './types.js';
|
|
21
|
+
const SEVERITY_RANK = { debug: 0, info: 1, warn: 2, error: 3 };
|
|
22
|
+
const LEVEL_RANK = { ...SEVERITY_RANK, silent: 4 };
|
|
23
|
+
const SEVERITY_NUMBER = {
|
|
24
|
+
debug: 5,
|
|
25
|
+
info: 9,
|
|
26
|
+
warn: 13,
|
|
27
|
+
error: 17,
|
|
28
|
+
};
|
|
29
|
+
export function newCounters() {
|
|
30
|
+
return { dropped: 0, redacted: 0, attributesDropped: 0, valuesTruncated: 0, recordsTruncated: 0 };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `shared` lets several loggers write through ONE counter set.
|
|
34
|
+
*
|
|
35
|
+
* Without it the counters answer a question nobody asks. `getRootLogger()`
|
|
36
|
+
* resolves per call and builds a fresh logger each time, so every count it
|
|
37
|
+
* accumulated died with the expression that read it -- the five fields were
|
|
38
|
+
* incremented on every record in the process and read by nothing, which is
|
|
39
|
+
* `declared-but-undriven` with a comment above it promising `namzu doctor`
|
|
40
|
+
* would read them. `installProcessSink` now owns one set for the process,
|
|
41
|
+
* and that promise is discharged rather than deleted.
|
|
42
|
+
*/
|
|
43
|
+
export function createLogger(options, shared) {
|
|
44
|
+
return build(options, shared ?? newCounters(), {});
|
|
45
|
+
}
|
|
46
|
+
function build(options, counters, bound) {
|
|
47
|
+
function emit(severityText, body, data) {
|
|
48
|
+
// Read per record, off the shared mutable holder — never resolved once
|
|
49
|
+
// and captured in this closure. Today's `Logger.child()` bakes its level
|
|
50
|
+
// in exactly that way, which is why three module-scope loggers in the
|
|
51
|
+
// skills/plugin loaders are frozen at `info` forever and unreachable by
|
|
52
|
+
// any later `configureLogger` call.
|
|
53
|
+
if (SEVERITY_RANK[severityText] < LEVEL_RANK[options.level.current])
|
|
54
|
+
return;
|
|
55
|
+
const now = Date.now();
|
|
56
|
+
// Promote the two reserved keys before anything else touches
|
|
57
|
+
// `attributes` — redact/cap below only ever see the caller's real
|
|
58
|
+
// attributes, never the event name or the raw thrown value a second
|
|
59
|
+
// time under a second spelling. `err` maps through `errorAttributes`
|
|
60
|
+
// (bounded, cycle-safe cause walk — see ./exception.ts) rather than
|
|
61
|
+
// being copied verbatim: the whole point of the reserved key is that
|
|
62
|
+
// the THROWN VALUE reaches the mapper, not a string a call site
|
|
63
|
+
// already built with `toErrorMessage` and so already lost the stack
|
|
64
|
+
// and cause off of.
|
|
65
|
+
const merged = { ...bound, ...data };
|
|
66
|
+
const { [EVENT_NAME_ATTRIBUTE]: rawEventName, [ERR_ATTRIBUTE]: rawErr, ...attributes } = merged;
|
|
67
|
+
// Computed here, before redact/cap run, so `exception.stacktrace` gets
|
|
68
|
+
// exactly the same treatment as an attribute any call site set by
|
|
69
|
+
// hand — see the redaction-pipeline test planting a secret inside a
|
|
70
|
+
// NESTED cause's message specifically to pin this ordering. `rawErr`
|
|
71
|
+
// wins over a same-named `exception.*` key set by hand: once a call
|
|
72
|
+
// site hands over the real thrown value, that value is the
|
|
73
|
+
// authoritative source, not whatever text a caller pre-computed
|
|
74
|
+
// before this reserved key existed.
|
|
75
|
+
const attributesWithException = rawErr !== undefined ? { ...attributes, ...errorAttributes(rawErr) } : attributes;
|
|
76
|
+
// Resolved HERE, at emit time, off the live `@opentelemetry/api` global —
|
|
77
|
+
// never once at `createLogger` construction and captured in this
|
|
78
|
+
// closure. `telemetry/metrics.ts` documents the construction-time
|
|
79
|
+
// version of this mistake already happening once, for a meter: a bag
|
|
80
|
+
// that captured the no-op instance at construction stayed no-op for the
|
|
81
|
+
// rest of the process even after a real one registered later.
|
|
82
|
+
// `undefined` with no telemetry configured — see `getActiveSpanContext`'s
|
|
83
|
+
// own doc for why that is the default, not a case this file detects.
|
|
84
|
+
const spanContext = getActiveSpanContext();
|
|
85
|
+
let record = {
|
|
86
|
+
timestamp: now,
|
|
87
|
+
observedTimestamp: now,
|
|
88
|
+
severityNumber: SEVERITY_NUMBER[severityText],
|
|
89
|
+
severityText,
|
|
90
|
+
body,
|
|
91
|
+
scope: { name: options.scope },
|
|
92
|
+
resource: options.resource,
|
|
93
|
+
attributes: attributesWithException,
|
|
94
|
+
...(typeof rawEventName === 'string' ? { eventName: rawEventName } : {}),
|
|
95
|
+
// All three or none: a trace id with no span id would be a
|
|
96
|
+
// half-address (see `LogRecord.traceId`'s doc).
|
|
97
|
+
...(spanContext
|
|
98
|
+
? {
|
|
99
|
+
traceId: spanContext.traceId,
|
|
100
|
+
spanId: spanContext.spanId,
|
|
101
|
+
traceFlags: spanContext.traceFlags,
|
|
102
|
+
}
|
|
103
|
+
: {}),
|
|
104
|
+
};
|
|
105
|
+
// Order matters: redact BEFORE capping. Truncating a value first could
|
|
106
|
+
// slice a secret in half and ship the surviving fragment; the
|
|
107
|
+
// `[REDACTED:label]` placeholder redaction leaves behind is short and
|
|
108
|
+
// never needs truncating itself.
|
|
109
|
+
record = redactRecord(record, counters);
|
|
110
|
+
record = capAttributeCount(record, counters);
|
|
111
|
+
record = truncateValues(record, counters);
|
|
112
|
+
record = capTotalSize(record, counters);
|
|
113
|
+
dispatch(record);
|
|
114
|
+
}
|
|
115
|
+
function dispatch(record) {
|
|
116
|
+
if (options.sink === NOOP_SINK) {
|
|
117
|
+
counters.dropped++;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
options.sink.emit(record);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
// A host sink is arbitrary code the kernel does not control. The old
|
|
125
|
+
// direct `process.stderr.write` implementation could never throw into
|
|
126
|
+
// an in-flight run; a naive seam here would introduce that failure
|
|
127
|
+
// mode for the first time — a broken sink aborting, say, a
|
|
128
|
+
// tool-completion path. Never rethrown, never logged through the same
|
|
129
|
+
// sink that just failed — counted instead, so a doctor check can
|
|
130
|
+
// surface a sink that is silently eating every record.
|
|
131
|
+
counters.dropped++;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
debug: (message, data) => emit('debug', message, data),
|
|
136
|
+
info: (message, data) => emit('info', message, data),
|
|
137
|
+
warn: (message, data) => emit('warn', message, data),
|
|
138
|
+
error: (message, data) => emit('error', message, data),
|
|
139
|
+
child: (context) => {
|
|
140
|
+
// The one context key that changes a PROPERTY OF THE LOGGER
|
|
141
|
+
// (`options.scope`) rather than joining `bound` as an ordinary
|
|
142
|
+
// attribute — see `SCOPE_ATTRIBUTE`'s own doc comment in `./types.js`.
|
|
143
|
+
// Stripped out of `rest` before merging, for the same reason
|
|
144
|
+
// `EVENT_NAME_ATTRIBUTE` is stripped out of `attributes` above: an
|
|
145
|
+
// attribute and a property carrying the same value would be the same
|
|
146
|
+
// name spelled two ways in one record.
|
|
147
|
+
const { [SCOPE_ATTRIBUTE]: scopeOverride, ...rest } = context;
|
|
148
|
+
const nextOptions = typeof scopeOverride === 'string' ? { ...options, scope: scopeOverride } : options;
|
|
149
|
+
return build(nextOptions, counters, { ...bound, ...rest });
|
|
150
|
+
},
|
|
151
|
+
counters,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* A logger that discards everything, countably. Every call is accepted (the
|
|
156
|
+
* level is `debug`, the widest threshold), and every accepted call is routed
|
|
157
|
+
* to `NOOP_SINK` and counted as dropped — a host holding `NOOP_LOGGER` can
|
|
158
|
+
* still tell "N calls happened and were discarded" from "N calls never
|
|
159
|
+
* happened", which a logger that filtered everything out at `silent` could
|
|
160
|
+
* not: a filtered call never reaches dispatch and is never counted at all.
|
|
161
|
+
*/
|
|
162
|
+
export const NOOP_LOGGER = createLogger({
|
|
163
|
+
sink: NOOP_SINK,
|
|
164
|
+
level: { current: 'debug' },
|
|
165
|
+
resource: { 'service.name': '@namzu/sdk' },
|
|
166
|
+
scope: 'namzu.noop',
|
|
167
|
+
});
|
|
168
|
+
//# sourceMappingURL=create-logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-logger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E;IAC3B,QAAQ,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE;IAC1C,KAAK,EAAE,YAAY;CACnB,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LogAttributes } from './attributes.js';
|
|
2
|
+
/**
|
|
3
|
+
* `exception.type` / `exception.message` / `exception.stacktrace` for a
|
|
4
|
+
* thrown value. `causeDepth` overrides the default bound above — exposed
|
|
5
|
+
* for tests, not because a production call site should ordinarily need a
|
|
6
|
+
* different one.
|
|
7
|
+
*/
|
|
8
|
+
export declare function errorAttributes(err: unknown, opts?: {
|
|
9
|
+
readonly causeDepth?: number;
|
|
10
|
+
}): LogAttributes;
|
|
11
|
+
//# sourceMappingURL=exception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../../../src/utils/log/exception.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAkBpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,GAAG,EAAE,OAAO,EACZ,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACrC,aAAa,CAQf"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// Maps a thrown value to the exception.* attributes the OTel Logs Data
|
|
2
|
+
// Model reserves for it — exception.type / exception.message /
|
|
3
|
+
// exception.stacktrace — walking a `cause` chain the way a terminal
|
|
4
|
+
// `console.error` would: newest frame first, oldest cause last.
|
|
5
|
+
//
|
|
6
|
+
// Two things this file deliberately does NOT do:
|
|
7
|
+
//
|
|
8
|
+
// - It does not redact anything itself. `redactRecord` (../log/redact.ts)
|
|
9
|
+
// runs over every attribute value unconditionally, once, at the record
|
|
10
|
+
// boundary — stack text included. A second scan here would be a second
|
|
11
|
+
// place to keep LOG_SECRET_PATTERNS in sync with, and the whole point of
|
|
12
|
+
// a record-boundary scan is that nothing gets to opt out of it by
|
|
13
|
+
// running earlier.
|
|
14
|
+
// - It does not license re-attaching `cause` where it was deliberately
|
|
15
|
+
// dropped. `provider/errors.ts` refuses to keep one on a classified
|
|
16
|
+
// provider error on purpose — a vendor SDK's error message (and so its
|
|
17
|
+
// own `cause`, when the vendor wraps a transport error) can carry a
|
|
18
|
+
// credential the upstream echoed back, and "a `cause` survives every
|
|
19
|
+
// logger that serializes an error chain" is exactly the property this
|
|
20
|
+
// file exists to provide. Being able to walk a `cause` safely is not the
|
|
21
|
+
// same claim as every `cause` being safe to attach in the first place;
|
|
22
|
+
// see that file's own doc comment and docs/conventions/index.md.
|
|
23
|
+
/**
|
|
24
|
+
* How many `cause` hops past the thrown value itself get folded into
|
|
25
|
+
* `exception.stacktrace`. Four, not "as many as there are": an ordinary
|
|
26
|
+
* retry-then-fallback call stack in this codebase is a handful of layers
|
|
27
|
+
* deep, but nothing stops a caller from building a cause chain as long as
|
|
28
|
+
* it likes, and walking all of it turns one log call into an unbounded
|
|
29
|
+
* string build ahead of the 8 KiB per-value cap (caps.ts) that would
|
|
30
|
+
* otherwise be the only thing catching it. The bound is enforced here,
|
|
31
|
+
* explicitly, rather than left to that cap truncating mid-frame with no
|
|
32
|
+
* indication anything was cut.
|
|
33
|
+
*/
|
|
34
|
+
const DEFAULT_CAUSE_DEPTH = 4;
|
|
35
|
+
/** What a thrown non-`Error` still needs a name for. */
|
|
36
|
+
const UNKNOWN_EXCEPTION_TYPE = 'UnknownError';
|
|
37
|
+
/**
|
|
38
|
+
* `exception.type` / `exception.message` / `exception.stacktrace` for a
|
|
39
|
+
* thrown value. `causeDepth` overrides the default bound above — exposed
|
|
40
|
+
* for tests, not because a production call site should ordinarily need a
|
|
41
|
+
* different one.
|
|
42
|
+
*/
|
|
43
|
+
export function errorAttributes(err, opts) {
|
|
44
|
+
const maxDepth = opts?.causeDepth ?? DEFAULT_CAUSE_DEPTH;
|
|
45
|
+
const { type, message } = describe(err);
|
|
46
|
+
return {
|
|
47
|
+
'exception.type': type,
|
|
48
|
+
'exception.message': message,
|
|
49
|
+
'exception.stacktrace': buildStacktrace(err, maxDepth),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function describe(value) {
|
|
53
|
+
if (value instanceof Error) {
|
|
54
|
+
return { type: value.name || UNKNOWN_EXCEPTION_TYPE, message: value.message };
|
|
55
|
+
}
|
|
56
|
+
if (typeof value === 'object' && value !== null) {
|
|
57
|
+
return { type: UNKNOWN_EXCEPTION_TYPE, message: safeStringify(value) };
|
|
58
|
+
}
|
|
59
|
+
return { type: UNKNOWN_EXCEPTION_TYPE, message: String(value) };
|
|
60
|
+
}
|
|
61
|
+
function safeStringify(value) {
|
|
62
|
+
try {
|
|
63
|
+
return JSON.stringify(value);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// A circular non-Error thrown value. `String()` on a plain object gives
|
|
67
|
+
// '[object Object]' — unhelpful, but the one thing this function must
|
|
68
|
+
// never do is itself throw from inside a logging call.
|
|
69
|
+
return String(value);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `err`'s own stack (or a `type: message` line when there is none) followed
|
|
74
|
+
* by each `.cause`'s, newest first, bounded by `maxDepth` hops. Stops early
|
|
75
|
+
* — WITH a note saying so, per refuse-do-not-degrade — on a cycle or on
|
|
76
|
+
* reaching the bound with more chain left to walk. Never loops: every value
|
|
77
|
+
* this function visits is added to `seen` before the value after it is even
|
|
78
|
+
* read, so a self-referencing `cause` is caught on the very next hop rather
|
|
79
|
+
* than by exhausting the depth bound.
|
|
80
|
+
*/
|
|
81
|
+
function buildStacktrace(err, maxDepth) {
|
|
82
|
+
const seen = new Set([err]);
|
|
83
|
+
const frames = [frameText(err)];
|
|
84
|
+
let cursor = err instanceof Error ? err.cause : undefined;
|
|
85
|
+
let depth = 0;
|
|
86
|
+
while (cursor !== undefined && cursor !== null) {
|
|
87
|
+
if (seen.has(cursor)) {
|
|
88
|
+
frames.push(`Caused by: [cause chain cycle detected at depth ${depth + 1} — stopped]`);
|
|
89
|
+
return frames.join('\n');
|
|
90
|
+
}
|
|
91
|
+
if (depth >= maxDepth) {
|
|
92
|
+
frames.push(`Caused by: [cause chain truncated at depth ${maxDepth} — deeper causes not walked]`);
|
|
93
|
+
return frames.join('\n');
|
|
94
|
+
}
|
|
95
|
+
seen.add(cursor);
|
|
96
|
+
frames.push(`Caused by: ${frameText(cursor)}`);
|
|
97
|
+
depth++;
|
|
98
|
+
cursor = cursor instanceof Error ? cursor.cause : undefined;
|
|
99
|
+
}
|
|
100
|
+
return frames.join('\n');
|
|
101
|
+
}
|
|
102
|
+
function frameText(value) {
|
|
103
|
+
if (value instanceof Error) {
|
|
104
|
+
return value.stack ?? `${value.name || UNKNOWN_EXCEPTION_TYPE}: ${value.message}`;
|
|
105
|
+
}
|
|
106
|
+
return String(value);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception.js","sourceRoot":"","sources":["../../../src/utils/log/exception.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,+DAA+D;AAC/D,oEAAoE;AACpE,gEAAgE;AAChE,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,4EAA4E;AAC5E,qEAAqE;AACrE,sBAAsB;AACtB,wEAAwE;AACxE,uEAAuE;AACvE,0EAA0E;AAC1E,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,4EAA4E;AAC5E,0EAA0E;AAC1E,oEAAoE;AAIpE;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B,wDAAwD;AACxD,MAAM,sBAAsB,GAAG,cAAc,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC9B,GAAY,EACZ,IAAuC;IAEvC,MAAM,QAAQ,GAAG,I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'./attributes.js';
|
|
3
|
+
export { createLogger, NOOP_LOGGER } from './create-logger.js';
|
|
4
|
+
export { installProcessSink } from './process-sink.js';
|
|
5
|
+
export { jsonLinesSink, NOOP_SINK, prettySink } from './sinks.js';
|
|
6
|
+
export { EVENT_NAME_ATTRIBUTE, SCOPE_ATTRIBUTE } from './types.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/log/index.ts"],"names":[],"mappings":"AAKA,YAAY,EACX,WAAW,EACX,SAAS,EACT,OAAO,EACP,eAAe,EACf,QAAQ,EACR,QAAQ,GACR,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAOjE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// The LogSink seam. `../logger.ts` keeps `Logger`, `LogContext`,
|
|
2
|
+
// `getRootLogger` and `configureLogger` completely unchanged (now
|
|
3
|
+
// `@deprecated`) — this directory is the additive replacement described in
|
|
4
|
+
// docs/conventions and the observability docs page once those land.
|
|
5
|
+
export { createLogger, NOOP_LOGGER } from './create-logger.js';
|
|
6
|
+
export { installProcessSink } from './process-sink.js';
|
|
7
|
+
export { jsonLinesSink, NOOP_SINK, prettySink } from './sinks.js';
|
|
8
|
+
// A value export, not a type — sits beside the type re-exports above rather
|
|
9
|
+
// than folded into that block, because `export type { ... }` cannot carry a
|
|
10
|
+
// runtime const. `EVENT_NAME_ATTRIBUTE` is how a host OUTSIDE this package
|
|
11
|
+
// (the CLI's boot narrative, NZ-BOOT-05) names an event without duplicating
|
|
12
|
+
// the reserved key `createLogger` promotes off of — see the doc comment on
|
|
13
|
+
// the constant itself in `./types.js`.
|
|
14
|
+
export { EVENT_NAME_ATTRIBUTE, SCOPE_ATTRIBUTE } from './types.js';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/log/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,kEAAkE;AAClE,2EAA2E;AAC3E,oEAAoE;AAWpE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACjE,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,uCAAuC;AACvC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LevelFilter, LogSink, LogSinkCounters, MutableLogSinkCounters } from './types.js';
|
|
2
|
+
export declare function installProcessSink(sink: LogSink, level: LevelFilter, opts?: {
|
|
3
|
+
readonly replace?: boolean;
|
|
4
|
+
}): void;
|
|
5
|
+
/** The installed destination, or `undefined` when nobody claimed the process. */
|
|
6
|
+
export declare function getProcessSink(): {
|
|
7
|
+
readonly sink: LogSink;
|
|
8
|
+
readonly level: LevelFilter;
|
|
9
|
+
readonly counters: LogSinkCounters;
|
|
10
|
+
} | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The mutable counter set the installed destination writes through.
|
|
13
|
+
*
|
|
14
|
+
* Internal: a reader wants {@link getProcessSink}'s readonly view. This
|
|
15
|
+
* exists so `getRootLogger`'s bridge can hand the SAME object to every
|
|
16
|
+
* logger it builds, which is what makes the totals process-wide rather
|
|
17
|
+
* than per-call.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getProcessSinkCounters(): MutableLogSinkCounters | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Test-only: forget the installed sink.
|
|
22
|
+
*
|
|
23
|
+
* Production must never call this — the refusal above is the whole contract,
|
|
24
|
+
* and a reset that production could reach would let a second caller take the
|
|
25
|
+
* destination by clearing the first one rather than by saying `replace`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function __resetProcessSinkForTests(): void;
|
|
28
|
+
//# sourceMappingURL=process-sink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-sink.d.ts","sourceRoot":"","sources":["../../../src/utils/log/process-sink.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAU/F,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,WAAW,EAClB,IAAI,GAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,IAAI,CAmBN;AAED,iFAAiF;AACjF,wBAAgB,cAAc,IAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,GAC3F,SAAS,CAEX;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,sBAAsB,GAAG,SAAS,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
|