@namzu/sdk 48.3.1 → 50.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 +542 -0
- package/README.md +137 -125
- package/dist/agents/QueryAgent.d.ts.map +1 -1
- package/dist/agents/QueryAgent.js +1 -0
- package/dist/agents/QueryAgent.js.map +1 -1
- package/dist/agents/examples/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/examples/SupervisorAgent.js +1 -0
- package/dist/agents/examples/SupervisorAgent.js.map +1 -1
- package/dist/agents/runAgent.d.ts +2 -0
- package/dist/agents/runAgent.d.ts.map +1 -1
- package/dist/agents/runAgent.js +1 -0
- package/dist/agents/runAgent.js.map +1 -1
- package/dist/authorization/shell-lexer.d.ts.map +1 -1
- package/dist/authorization/shell-lexer.js +16 -1
- package/dist/authorization/shell-lexer.js.map +1 -1
- package/dist/bridge/acp/permission.d.ts +8 -2
- package/dist/bridge/acp/permission.d.ts.map +1 -1
- package/dist/bridge/acp/permission.js +1 -0
- package/dist/bridge/acp/permission.js.map +1 -1
- package/dist/bridge/acp/server.d.ts +25 -1
- package/dist/bridge/acp/server.d.ts.map +1 -1
- package/dist/bridge/acp/server.js +205 -21
- package/dist/bridge/acp/server.js.map +1 -1
- package/dist/bridge/acp/tasks.d.ts +5 -0
- package/dist/bridge/acp/tasks.d.ts.map +1 -0
- package/dist/bridge/acp/tasks.js +19 -0
- package/dist/bridge/acp/tasks.js.map +1 -0
- package/dist/bridge/acp/update.d.ts.map +1 -1
- package/dist/bridge/acp/update.js +148 -13
- package/dist/bridge/acp/update.js.map +1 -1
- package/dist/config/registry.d.ts +2 -0
- package/dist/config/registry.d.ts.map +1 -1
- package/dist/config/registry.js +23 -3
- package/dist/config/registry.js.map +1 -1
- package/dist/config/runtime.d.ts +31 -31
- package/dist/connector/mcp/adapter.d.ts.map +1 -1
- package/dist/connector/mcp/adapter.js +11 -4
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +6 -3
- package/dist/connector/mcp/client.js.map +1 -1
- package/dist/connector/mcp/discovery.d.ts +9 -5
- package/dist/connector/mcp/discovery.d.ts.map +1 -1
- package/dist/connector/mcp/discovery.js +16 -8
- package/dist/connector/mcp/discovery.js.map +1 -1
- package/dist/connector/mcp/mcp-toolset.d.ts +3 -0
- package/dist/connector/mcp/mcp-toolset.d.ts.map +1 -1
- package/dist/connector/mcp/mcp-toolset.js +20 -2
- package/dist/connector/mcp/mcp-toolset.js.map +1 -1
- package/dist/connector/mcp/reconnect.d.ts +2 -0
- package/dist/connector/mcp/reconnect.d.ts.map +1 -1
- package/dist/connector/mcp/reconnect.js +36 -5
- package/dist/connector/mcp/reconnect.js.map +1 -1
- package/dist/constants/acp/index.d.ts +3 -0
- package/dist/constants/acp/index.d.ts.map +1 -1
- package/dist/constants/acp/index.js +3 -0
- package/dist/constants/acp/index.js.map +1 -1
- package/dist/contracts/a2a.d.ts +80 -80
- package/dist/contracts/schemas.d.ts +2 -2
- package/dist/contracts/session/schemas.d.ts +10 -10
- package/dist/manager/agent/lifecycle.d.ts +11 -0
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +178 -3
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/plan/lifecycle.d.ts +7 -8
- package/dist/manager/plan/lifecycle.d.ts.map +1 -1
- package/dist/manager/plan/lifecycle.js +7 -8
- package/dist/manager/plan/lifecycle.js.map +1 -1
- package/dist/manager/resident/consumption.d.ts +8 -8
- package/dist/manager/resident/learning-cycle.d.ts +2 -2
- package/dist/manager/resident/learning-observation.d.ts +12 -12
- package/dist/manager/resident/learning.d.ts +82 -82
- package/dist/manager/resident/outbox.d.ts +8 -8
- package/dist/manager/resident/proposal.d.ts +2 -2
- package/dist/manager/resident/store.d.ts +10 -10
- package/dist/manager/session/attribution.d.ts +1 -0
- package/dist/manager/session/attribution.d.ts.map +1 -1
- package/dist/manager/session/attribution.js +9 -1
- package/dist/manager/session/attribution.js.map +1 -1
- package/dist/manager/session/streamed-message-identity.d.ts +6 -0
- package/dist/manager/session/streamed-message-identity.d.ts.map +1 -0
- package/dist/manager/session/streamed-message-identity.js +14 -0
- package/dist/manager/session/streamed-message-identity.js.map +1 -0
- package/dist/manager/session/turn-recorder.d.ts.map +1 -1
- package/dist/manager/session/turn-recorder.js +4 -3
- package/dist/manager/session/turn-recorder.js.map +1 -1
- package/dist/pals/activity/causality.d.ts +23 -0
- package/dist/pals/activity/causality.d.ts.map +1 -0
- package/dist/pals/activity/causality.js +205 -0
- package/dist/pals/activity/causality.js.map +1 -0
- package/dist/pals/activity/projection.d.ts +5 -0
- package/dist/pals/activity/projection.d.ts.map +1 -0
- package/dist/pals/activity/projection.js +79 -0
- package/dist/pals/activity/projection.js.map +1 -0
- package/dist/pals/activity/source.d.ts +16 -0
- package/dist/pals/activity/source.d.ts.map +1 -0
- package/dist/pals/activity/source.js +235 -0
- package/dist/pals/activity/source.js.map +1 -0
- package/dist/pals/activity/subscription-policy.d.ts +38 -0
- package/dist/pals/activity/subscription-policy.d.ts.map +1 -0
- package/dist/pals/activity/subscription-policy.js +183 -0
- package/dist/pals/activity/subscription-policy.js.map +1 -0
- package/dist/pals/activity/subscription-schema.d.ts +353 -0
- package/dist/pals/activity/subscription-schema.d.ts.map +1 -0
- package/dist/pals/activity/subscription-schema.js +24 -0
- package/dist/pals/activity/subscription-schema.js.map +1 -0
- package/dist/pals/activity/subscription-store.d.ts +25 -0
- package/dist/pals/activity/subscription-store.d.ts.map +1 -0
- package/dist/pals/activity/subscription-store.js +152 -0
- package/dist/pals/activity/subscription-store.js.map +1 -0
- package/dist/pals/activity/subscription-types.d.ts +42 -0
- package/dist/pals/activity/subscription-types.d.ts.map +1 -0
- package/dist/pals/activity/subscription-types.js +2 -0
- package/dist/pals/activity/subscription-types.js.map +1 -0
- package/dist/pals/activity/subscriptions.d.ts +32 -0
- package/dist/pals/activity/subscriptions.d.ts.map +1 -0
- package/dist/pals/activity/subscriptions.js +151 -0
- package/dist/pals/activity/subscriptions.js.map +1 -0
- package/dist/pals/activity/types.d.ts +77 -0
- package/dist/pals/activity/types.d.ts.map +1 -0
- package/dist/pals/activity/types.js +2 -0
- package/dist/pals/activity/types.js.map +1 -0
- package/dist/pals/channels/ingress.d.ts +9 -0
- package/dist/pals/channels/ingress.d.ts.map +1 -0
- package/dist/pals/channels/ingress.js +131 -0
- package/dist/pals/channels/ingress.js.map +1 -0
- package/dist/pals/channels/routes.d.ts +20 -0
- package/dist/pals/channels/routes.d.ts.map +1 -0
- package/dist/pals/channels/routes.js +111 -0
- package/dist/pals/channels/routes.js.map +1 -0
- package/dist/pals/channels/routing.d.ts +37 -0
- package/dist/pals/channels/routing.d.ts.map +1 -0
- package/dist/pals/channels/routing.js +150 -0
- package/dist/pals/channels/routing.js.map +1 -0
- package/dist/pals/channels/schema.d.ts +234 -0
- package/dist/pals/channels/schema.d.ts.map +1 -0
- package/dist/pals/channels/schema.js +94 -0
- package/dist/pals/channels/schema.js.map +1 -0
- package/dist/pals/channels/types.d.ts +115 -0
- package/dist/pals/channels/types.d.ts.map +1 -0
- package/dist/pals/channels/types.js +2 -0
- package/dist/pals/channels/types.js.map +1 -0
- package/dist/pals/communication/broker.d.ts +8 -0
- package/dist/pals/communication/broker.d.ts.map +1 -0
- package/dist/pals/communication/broker.js +121 -0
- package/dist/pals/communication/broker.js.map +1 -0
- package/dist/pals/communication/dispatch.d.ts +4 -0
- package/dist/pals/communication/dispatch.d.ts.map +1 -0
- package/dist/pals/communication/dispatch.js +57 -0
- package/dist/pals/communication/dispatch.js.map +1 -0
- package/dist/pals/communication/inbound.d.ts +9 -0
- package/dist/pals/communication/inbound.d.ts.map +1 -0
- package/dist/pals/communication/inbound.js +155 -0
- package/dist/pals/communication/inbound.js.map +1 -0
- package/dist/pals/communication/ingress-dispatch.d.ts +5 -0
- package/dist/pals/communication/ingress-dispatch.d.ts.map +1 -0
- package/dist/pals/communication/ingress-dispatch.js +51 -0
- package/dist/pals/communication/ingress-dispatch.js.map +1 -0
- package/dist/pals/communication/ingress-inbound.d.ts +9 -0
- package/dist/pals/communication/ingress-inbound.d.ts.map +1 -0
- package/dist/pals/communication/ingress-inbound.js +222 -0
- package/dist/pals/communication/ingress-inbound.js.map +1 -0
- package/dist/pals/communication/ingress-schema.d.ts +7829 -0
- package/dist/pals/communication/ingress-schema.d.ts.map +1 -0
- package/dist/pals/communication/ingress-schema.js +479 -0
- package/dist/pals/communication/ingress-schema.js.map +1 -0
- package/dist/pals/communication/ingress-types.d.ts +187 -0
- package/dist/pals/communication/ingress-types.d.ts.map +1 -0
- package/dist/pals/communication/ingress-types.js +73 -0
- package/dist/pals/communication/ingress-types.js.map +1 -0
- package/dist/pals/communication/operator.d.ts +75 -0
- package/dist/pals/communication/operator.d.ts.map +1 -0
- package/dist/pals/communication/operator.js +217 -0
- package/dist/pals/communication/operator.js.map +1 -0
- package/dist/pals/communication/policy.d.ts +41 -0
- package/dist/pals/communication/policy.d.ts.map +1 -0
- package/dist/pals/communication/policy.js +138 -0
- package/dist/pals/communication/policy.js.map +1 -0
- package/dist/pals/communication/schema.d.ts +2000 -0
- package/dist/pals/communication/schema.d.ts.map +1 -0
- package/dist/pals/communication/schema.js +170 -0
- package/dist/pals/communication/schema.js.map +1 -0
- package/dist/pals/communication/store.d.ts +61 -0
- package/dist/pals/communication/store.d.ts.map +1 -0
- package/dist/pals/communication/store.js +450 -0
- package/dist/pals/communication/store.js.map +1 -0
- package/dist/pals/communication/tools.d.ts +23 -0
- package/dist/pals/communication/tools.d.ts.map +1 -0
- package/dist/pals/communication/tools.js +107 -0
- package/dist/pals/communication/tools.js.map +1 -0
- package/dist/pals/communication/types.d.ts +168 -0
- package/dist/pals/communication/types.d.ts.map +1 -0
- package/dist/pals/communication/types.js +24 -0
- package/dist/pals/communication/types.js.map +1 -0
- package/dist/pals/communication/verify.d.ts +22 -0
- package/dist/pals/communication/verify.d.ts.map +1 -0
- package/dist/pals/communication/verify.js +142 -0
- package/dist/pals/communication/verify.js.map +1 -0
- package/dist/pals/lifecycle.d.ts +37 -0
- package/dist/pals/lifecycle.d.ts.map +1 -0
- package/dist/pals/lifecycle.js +22 -0
- package/dist/pals/lifecycle.js.map +1 -0
- package/dist/pals/prompt.d.ts +30 -0
- package/dist/pals/prompt.d.ts.map +1 -0
- package/dist/pals/prompt.js +65 -0
- package/dist/pals/prompt.js.map +1 -0
- package/dist/pals/reference-images.d.ts +44 -0
- package/dist/pals/reference-images.d.ts.map +1 -0
- package/dist/pals/reference-images.js +248 -0
- package/dist/pals/reference-images.js.map +1 -0
- package/dist/pals/runtime.d.ts +46 -0
- package/dist/pals/runtime.d.ts.map +1 -0
- package/dist/pals/runtime.js +624 -0
- package/dist/pals/runtime.js.map +1 -0
- package/dist/pals/store.d.ts +26 -0
- package/dist/pals/store.d.ts.map +1 -0
- package/dist/pals/store.js +334 -0
- package/dist/pals/store.js.map +1 -0
- package/dist/pals/types.d.ts +145 -0
- package/dist/pals/types.d.ts.map +1 -0
- package/dist/pals/types.js +2 -0
- package/dist/pals/types.js.map +1 -0
- package/dist/peers/envelope.js +1 -1
- package/dist/peers/envelope.js.map +1 -1
- package/dist/peers/protocol.d.ts +83 -83
- package/dist/peers/record.d.ts +10 -10
- package/dist/plugin/lifecycle.d.ts +14 -10
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +178 -41
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +7 -2
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/process/kill-tree.d.ts.map +1 -1
- package/dist/process/kill-tree.js +9 -1
- package/dist/process/kill-tree.js.map +1 -1
- package/dist/prompt/resident-learning.js +2 -2
- package/dist/prompt/resident-learning.js.map +1 -1
- package/dist/prompt/resident-step.d.ts +2 -2
- package/dist/prompt/resident-step.js +4 -4
- package/dist/prompt/resident-step.js.map +1 -1
- package/dist/provider/errors.d.ts +19 -0
- package/dist/provider/errors.d.ts.map +1 -1
- package/dist/provider/errors.js +123 -2
- package/dist/provider/errors.js.map +1 -1
- package/dist/public-runtime.d.ts +43 -15
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +37 -9
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +8 -3
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +8 -3
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +27 -7
- package/dist/public-types.d.ts.map +1 -1
- package/dist/registry/tool/presentation.d.ts +1 -0
- package/dist/registry/tool/presentation.d.ts.map +1 -1
- package/dist/registry/tool/presentation.js +9 -7
- package/dist/registry/tool/presentation.js.map +1 -1
- package/dist/registry/tool/screen.d.ts.map +1 -1
- package/dist/registry/tool/screen.js +33 -2
- package/dist/registry/tool/screen.js.map +1 -1
- package/dist/runtime/harness-session/index.d.ts +5 -0
- package/dist/runtime/harness-session/index.d.ts.map +1 -0
- package/dist/runtime/harness-session/index.js +928 -0
- package/dist/runtime/harness-session/index.js.map +1 -0
- package/dist/runtime/harness-session/journal.d.ts +37 -0
- package/dist/runtime/harness-session/journal.d.ts.map +1 -0
- package/dist/runtime/harness-session/journal.js +177 -0
- package/dist/runtime/harness-session/journal.js.map +1 -0
- package/dist/runtime/harness-session/saved-view.d.ts +8 -0
- package/dist/runtime/harness-session/saved-view.d.ts.map +1 -0
- package/dist/runtime/harness-session/saved-view.js +112 -0
- package/dist/runtime/harness-session/saved-view.js.map +1 -0
- package/dist/runtime/jobs/awaited-jobs.d.ts +2 -1
- package/dist/runtime/jobs/awaited-jobs.d.ts.map +1 -1
- package/dist/runtime/jobs/awaited-jobs.js +2 -1
- package/dist/runtime/jobs/awaited-jobs.js.map +1 -1
- package/dist/runtime/jobs/registry.d.ts +56 -1
- package/dist/runtime/jobs/registry.d.ts.map +1 -1
- package/dist/runtime/jobs/registry.js +377 -39
- package/dist/runtime/jobs/registry.js.map +1 -1
- package/dist/runtime/query/abandon-turn.d.ts +12 -1
- package/dist/runtime/query/abandon-turn.d.ts.map +1 -1
- package/dist/runtime/query/abandon-turn.js +3 -1
- package/dist/runtime/query/abandon-turn.js.map +1 -1
- package/dist/runtime/query/checkpoint.d.ts +4 -0
- package/dist/runtime/query/checkpoint.d.ts.map +1 -1
- package/dist/runtime/query/checkpoint.js +10 -0
- package/dist/runtime/query/checkpoint.js.map +1 -1
- package/dist/runtime/query/durable-inbound.d.ts +5 -0
- package/dist/runtime/query/durable-inbound.d.ts.map +1 -0
- package/dist/runtime/query/durable-inbound.js +89 -0
- package/dist/runtime/query/durable-inbound.js.map +1 -0
- package/dist/runtime/query/events.d.ts +4 -0
- package/dist/runtime/query/events.d.ts.map +1 -1
- package/dist/runtime/query/events.js +22 -5
- package/dist/runtime/query/events.js.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts +5 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +85 -13
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +41 -18
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +227 -114
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/index.d.ts +9 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +41 -5
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts +18 -6
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +176 -75
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/outstanding-work.d.ts +9 -5
- package/dist/runtime/query/iteration/outstanding-work.d.ts.map +1 -1
- package/dist/runtime/query/iteration/outstanding-work.js +63 -6
- package/dist/runtime/query/iteration/outstanding-work.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +8 -0
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +106 -17
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/iteration/step-shaping.d.ts +2 -0
- package/dist/runtime/query/iteration/step-shaping.d.ts.map +1 -1
- package/dist/runtime/query/iteration/step-shaping.js +5 -1
- package/dist/runtime/query/iteration/step-shaping.js.map +1 -1
- package/dist/runtime/query/observation-context.d.ts +2 -2
- package/dist/runtime/query/observation-context.d.ts.map +1 -1
- package/dist/runtime/query/observation-context.js +20 -13
- package/dist/runtime/query/observation-context.js.map +1 -1
- package/dist/runtime/query/prepare-turn.js +2 -2
- package/dist/runtime/query/prepare-turn.js.map +1 -1
- package/dist/runtime/query/prompt-cache.d.ts +1 -0
- package/dist/runtime/query/prompt-cache.d.ts.map +1 -1
- package/dist/runtime/query/prompt-cache.js +2 -0
- package/dist/runtime/query/prompt-cache.js.map +1 -1
- package/dist/runtime/query/prompt.d.ts +2 -0
- package/dist/runtime/query/prompt.d.ts.map +1 -1
- package/dist/runtime/query/prompt.js +23 -1
- package/dist/runtime/query/prompt.js.map +1 -1
- package/dist/runtime/query/repeat-call.d.ts +12 -3
- package/dist/runtime/query/repeat-call.d.ts.map +1 -1
- package/dist/runtime/query/repeat-call.js +33 -10
- package/dist/runtime/query/repeat-call.js.map +1 -1
- package/dist/runtime/query/resume-pending.d.ts +5 -6
- package/dist/runtime/query/resume-pending.d.ts.map +1 -1
- package/dist/runtime/query/resume-pending.js +30 -3
- package/dist/runtime/query/resume-pending.js.map +1 -1
- package/dist/runtime/query/resume-session.js +1 -1
- package/dist/runtime/query/resume-session.js.map +1 -1
- package/dist/runtime/query/review-policy.d.ts +8 -1
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +6 -0
- package/dist/runtime/query/review-policy.js.map +1 -1
- package/dist/runtime/query/saved-presentation.d.ts +13 -0
- package/dist/runtime/query/saved-presentation.d.ts.map +1 -0
- package/dist/runtime/query/saved-presentation.js +63 -0
- package/dist/runtime/query/saved-presentation.js.map +1 -0
- package/dist/runtime/query/steering.d.ts +6 -9
- package/dist/runtime/query/steering.d.ts.map +1 -1
- package/dist/runtime/query/steering.js.map +1 -1
- package/dist/runtime/query/tool-executions.d.ts +7 -3
- package/dist/runtime/query/tool-executions.d.ts.map +1 -1
- package/dist/runtime/query/tool-executions.js +89 -9
- package/dist/runtime/query/tool-executions.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +3 -1
- 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/scheduler/completion-inbox.d.ts +25 -1
- package/dist/scheduler/completion-inbox.d.ts.map +1 -1
- package/dist/scheduler/completion-inbox.js +102 -8
- package/dist/scheduler/completion-inbox.js.map +1 -1
- package/dist/scheduler/delegating.d.ts.map +1 -1
- package/dist/scheduler/delegating.js +5 -0
- package/dist/scheduler/delegating.js.map +1 -1
- package/dist/scheduler/local.d.ts.map +1 -1
- package/dist/scheduler/local.js +2 -0
- package/dist/scheduler/local.js.map +1 -1
- package/dist/session/summary/materialize.d.ts +10 -6
- package/dist/session/summary/materialize.d.ts.map +1 -1
- package/dist/session/summary/materialize.js +41 -8
- package/dist/session/summary/materialize.js.map +1 -1
- package/dist/store/budget/ledger.d.ts +9 -0
- package/dist/store/budget/ledger.d.ts.map +1 -1
- package/dist/store/budget/ledger.js +58 -6
- package/dist/store/budget/ledger.js.map +1 -1
- package/dist/store/evidence/index-page.d.ts +12 -12
- package/dist/store/evidence/source-text.d.ts +4 -4
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +1 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/memory/disk.d.ts +7 -2
- package/dist/store/memory/disk.d.ts.map +1 -1
- package/dist/store/memory/disk.js +58 -5
- package/dist/store/memory/disk.js.map +1 -1
- package/dist/store/memory/index.d.ts +9 -0
- package/dist/store/memory/index.d.ts.map +1 -1
- package/dist/store/memory/index.js +43 -5
- package/dist/store/memory/index.js.map +1 -1
- package/dist/store/memory/markdown.d.ts +7 -2
- package/dist/store/memory/markdown.d.ts.map +1 -1
- package/dist/store/memory/markdown.js +33 -0
- package/dist/store/memory/markdown.js.map +1 -1
- package/dist/store/memory/memory.d.ts +7 -2
- package/dist/store/memory/memory.d.ts.map +1 -1
- package/dist/store/memory/memory.js +34 -0
- package/dist/store/memory/memory.js.map +1 -1
- package/dist/store/memory/revision.d.ts +16 -0
- package/dist/store/memory/revision.d.ts.map +1 -0
- package/dist/store/memory/revision.js +144 -0
- package/dist/store/memory/revision.js.map +1 -0
- package/dist/store/session/disk.d.ts +9 -4
- package/dist/store/session/disk.d.ts.map +1 -1
- package/dist/store/session/disk.js +57 -11
- package/dist/store/session/disk.js.map +1 -1
- package/dist/store/session/memory.d.ts +5 -3
- package/dist/store/session/memory.d.ts.map +1 -1
- package/dist/store/session/memory.js +24 -7
- package/dist/store/session/memory.js.map +1 -1
- package/dist/store/session-log/core.d.ts +26 -6
- package/dist/store/session-log/core.d.ts.map +1 -1
- package/dist/store/session-log/core.js +61 -8
- package/dist/store/session-log/core.js.map +1 -1
- package/dist/store/session-log/disk.d.ts +2 -2
- package/dist/store/session-log/disk.d.ts.map +1 -1
- package/dist/store/session-log/disk.js +1 -0
- package/dist/store/session-log/disk.js.map +1 -1
- package/dist/store/session-log/fold.d.ts +7 -0
- package/dist/store/session-log/fold.d.ts.map +1 -1
- package/dist/store/session-log/fold.js +21 -0
- package/dist/store/session-log/fold.js.map +1 -1
- package/dist/store/session-log/index.d.ts +5 -3
- package/dist/store/session-log/index.d.ts.map +1 -1
- package/dist/store/session-log/index.js +3 -1
- package/dist/store/session-log/index.js.map +1 -1
- package/dist/store/session-log/memory.d.ts +1 -1
- package/dist/store/session-log/memory.d.ts.map +1 -1
- package/dist/store/session-log/memory.js +1 -0
- package/dist/store/session-log/memory.js.map +1 -1
- package/dist/store/session-log/spill.d.ts +10 -3
- package/dist/store/session-log/spill.d.ts.map +1 -1
- package/dist/store/session-log/spill.js +70 -5
- package/dist/store/session-log/spill.js.map +1 -1
- package/dist/store/session-log/structured-result.d.ts +21 -0
- package/dist/store/session-log/structured-result.d.ts.map +1 -0
- package/dist/store/session-log/structured-result.js +67 -0
- package/dist/store/session-log/structured-result.js.map +1 -0
- package/dist/store/task/disk.d.ts +11 -0
- package/dist/store/task/disk.d.ts.map +1 -1
- package/dist/store/task/disk.js +41 -2
- package/dist/store/task/disk.js.map +1 -1
- package/dist/store/task/memory.d.ts.map +1 -1
- package/dist/store/task/memory.js +15 -3
- package/dist/store/task/memory.js.map +1 -1
- package/dist/tools/admit-facts.d.ts +13 -0
- package/dist/tools/admit-facts.d.ts.map +1 -0
- package/dist/tools/admit-facts.js +142 -0
- package/dist/tools/admit-facts.js.map +1 -0
- package/dist/tools/builtins/bash.d.ts +4 -1
- package/dist/tools/builtins/bash.d.ts.map +1 -1
- package/dist/tools/builtins/bash.js +108 -22
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/browser.d.ts +10 -10
- package/dist/tools/builtins/computer-use.d.ts +90 -90
- package/dist/tools/builtins/edit.d.ts +17 -0
- 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/file-write-result.d.ts.map +1 -1
- package/dist/tools/builtins/file-write-result.js +13 -0
- package/dist/tools/builtins/file-write-result.js.map +1 -1
- package/dist/tools/builtins/glob.d.ts.map +1 -1
- package/dist/tools/builtins/glob.js +12 -0
- package/dist/tools/builtins/glob.js.map +1 -1
- package/dist/tools/builtins/grep.d.ts.map +1 -1
- package/dist/tools/builtins/grep.js +14 -0
- package/dist/tools/builtins/grep.js.map +1 -1
- package/dist/tools/builtins/index.d.ts +2 -0
- package/dist/tools/builtins/index.d.ts.map +1 -1
- package/dist/tools/builtins/index.js +1 -0
- package/dist/tools/builtins/index.js.map +1 -1
- package/dist/tools/builtins/job.d.ts.map +1 -1
- package/dist/tools/builtins/job.js +4 -1
- package/dist/tools/builtins/job.js.map +1 -1
- package/dist/tools/builtins/lsp.d.ts +2 -2
- package/dist/tools/builtins/read-file.d.ts.map +1 -1
- package/dist/tools/builtins/read-file.js +49 -0
- package/dist/tools/builtins/read-file.js.map +1 -1
- package/dist/tools/builtins/view-image.d.ts +24 -0
- package/dist/tools/builtins/view-image.d.ts.map +1 -0
- package/dist/tools/builtins/view-image.js +385 -0
- package/dist/tools/builtins/view-image.js.map +1 -0
- package/dist/tools/builtins/wait-for-job-bounds.d.ts +8 -4
- package/dist/tools/builtins/wait-for-job-bounds.d.ts.map +1 -1
- package/dist/tools/builtins/wait-for-job-bounds.js +43 -8
- package/dist/tools/builtins/wait-for-job-bounds.js.map +1 -1
- package/dist/tools/builtins/wait-for-job.d.ts +3 -0
- package/dist/tools/builtins/wait-for-job.d.ts.map +1 -1
- package/dist/tools/builtins/wait-for-job.js +127 -15
- package/dist/tools/builtins/wait-for-job.js.map +1 -1
- package/dist/tools/builtins/write-file.d.ts.map +1 -1
- package/dist/tools/builtins/write-file.js +1 -0
- package/dist/tools/builtins/write-file.js.map +1 -1
- package/dist/tools/command-shell.d.ts +37 -2
- package/dist/tools/command-shell.d.ts.map +1 -1
- package/dist/tools/command-shell.js +100 -3
- package/dist/tools/command-shell.js.map +1 -1
- package/dist/tools/coordinator/agent.d.ts +9 -19
- package/dist/tools/coordinator/agent.d.ts.map +1 -1
- package/dist/tools/coordinator/agent.js.map +1 -1
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +127 -67
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts +2 -0
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts.map +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.js +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.js.map +1 -1
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +4 -0
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/failure-facts.d.ts +8 -0
- package/dist/tools/failure-facts.d.ts.map +1 -0
- package/dist/tools/failure-facts.js +24 -0
- package/dist/tools/failure-facts.js.map +1 -0
- package/dist/tools/host-output.d.ts +24 -0
- package/dist/tools/host-output.d.ts.map +1 -0
- package/dist/tools/host-output.js +117 -0
- package/dist/tools/host-output.js.map +1 -0
- package/dist/tools/memory/delete.d.ts.map +1 -1
- package/dist/tools/memory/delete.js +38 -3
- package/dist/tools/memory/delete.js.map +1 -1
- package/dist/tools/memory/read.d.ts.map +1 -1
- package/dist/tools/memory/read.js +38 -2
- package/dist/tools/memory/read.js.map +1 -1
- package/dist/tools/memory/search.d.ts.map +1 -1
- package/dist/tools/memory/search.js +38 -7
- package/dist/tools/memory/search.js.map +1 -1
- package/dist/tools/memory/update.d.ts.map +1 -1
- package/dist/tools/memory/update.js +30 -3
- package/dist/tools/memory/update.js.map +1 -1
- package/dist/tools/oem-code-pages.d.ts +8 -0
- package/dist/tools/oem-code-pages.d.ts.map +1 -0
- package/dist/tools/oem-code-pages.js +23 -0
- package/dist/tools/oem-code-pages.js.map +1 -0
- package/dist/tools/schedules/schedule-tool.d.ts.map +1 -1
- package/dist/tools/schedules/schedule-tool.js +35 -6
- package/dist/tools/schedules/schedule-tool.js.map +1 -1
- package/dist/tools/schedules/types.d.ts +23 -3
- package/dist/tools/schedules/types.d.ts.map +1 -1
- package/dist/tools/task/list.d.ts.map +1 -1
- package/dist/tools/task/list.js +14 -6
- package/dist/tools/task/list.js.map +1 -1
- package/dist/tools/task/present.d.ts.map +1 -1
- package/dist/tools/task/present.js +26 -6
- package/dist/tools/task/present.js.map +1 -1
- package/dist/tools/task/update.d.ts.map +1 -1
- package/dist/tools/task/update.js +12 -5
- package/dist/tools/task/update.js.map +1 -1
- package/dist/tools/text-window.d.ts +19 -0
- package/dist/tools/text-window.d.ts.map +1 -0
- package/dist/tools/text-window.js +83 -0
- package/dist/tools/text-window.js.map +1 -0
- package/dist/toolsets/manager.d.ts +24 -0
- package/dist/toolsets/manager.d.ts.map +1 -1
- package/dist/toolsets/manager.js +105 -2
- package/dist/toolsets/manager.js.map +1 -1
- package/dist/turn/memory-recall.d.ts +2 -0
- package/dist/turn/memory-recall.d.ts.map +1 -1
- package/dist/turn/memory-recall.js +3 -1
- package/dist/turn/memory-recall.js.map +1 -1
- package/dist/types/acp/index.d.ts +137 -1
- package/dist/types/acp/index.d.ts.map +1 -1
- package/dist/types/agent/base.d.ts +3 -0
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/manager.d.ts +8 -23
- package/dist/types/agent/manager.d.ts.map +1 -1
- package/dist/types/agent/scheduler.d.ts +10 -1
- package/dist/types/agent/scheduler.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +4 -0
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/authorization/index.d.ts +30 -30
- package/dist/types/connector/mcp.d.ts +7 -0
- package/dist/types/connector/mcp.d.ts.map +1 -1
- package/dist/types/errors/catalog.d.ts.map +1 -1
- package/dist/types/errors/catalog.js +4 -2
- package/dist/types/errors/catalog.js.map +1 -1
- package/dist/types/harness/schema.d.ts +354 -0
- package/dist/types/harness/schema.d.ts.map +1 -0
- package/dist/types/harness/schema.js +203 -0
- package/dist/types/harness/schema.js.map +1 -0
- package/dist/types/harness/session.d.ts +278 -0
- package/dist/types/harness/session.d.ts.map +1 -0
- package/dist/types/harness/session.js +2 -0
- package/dist/types/harness/session.js.map +1 -0
- package/dist/types/hitl/index.d.ts +12 -0
- package/dist/types/hitl/index.d.ts.map +1 -1
- package/dist/types/hitl/index.js.map +1 -1
- package/dist/types/job/index.d.ts +47 -0
- package/dist/types/job/index.d.ts.map +1 -0
- package/dist/types/job/index.js +2 -0
- package/dist/types/job/index.js.map +1 -0
- package/dist/types/memory/index.d.ts +29 -0
- package/dist/types/memory/index.d.ts.map +1 -1
- package/dist/types/memory/index.js +6 -0
- package/dist/types/memory/index.js.map +1 -1
- package/dist/types/message/inbound-delivery.d.ts +44 -0
- package/dist/types/message/inbound-delivery.d.ts.map +1 -0
- package/dist/types/message/inbound-delivery.js +14 -0
- package/dist/types/message/inbound-delivery.js.map +1 -0
- package/dist/types/message/index.d.ts +4 -1
- package/dist/types/message/index.d.ts.map +1 -1
- package/dist/types/message/index.js +5 -1
- package/dist/types/message/index.js.map +1 -1
- package/dist/types/plugin/index.d.ts +18 -8
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +5 -2
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/sandbox/index.d.ts +39 -2
- package/dist/types/sandbox/index.d.ts.map +1 -1
- package/dist/types/sandbox/index.js.map +1 -1
- package/dist/types/session/checkpoint.d.ts +24 -17
- package/dist/types/session/checkpoint.d.ts.map +1 -1
- package/dist/types/session/checkpoint.js +1 -0
- package/dist/types/session/checkpoint.js.map +1 -1
- package/dist/types/session/events.d.ts +23 -1
- package/dist/types/session/events.d.ts.map +1 -1
- package/dist/types/session/events.js.map +1 -1
- package/dist/types/session/records.d.ts +1514 -565
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +89 -1
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/session/step.d.ts +2 -0
- package/dist/types/session/step.d.ts.map +1 -1
- package/dist/types/session/step.js.map +1 -1
- package/dist/types/session/store.d.ts +19 -10
- package/dist/types/session/store.d.ts.map +1 -1
- package/dist/types/session/tool-execution.d.ts +6 -0
- package/dist/types/session/tool-execution.d.ts.map +1 -1
- package/dist/types/structured-output/index.d.ts +12 -2
- package/dist/types/structured-output/index.d.ts.map +1 -1
- package/dist/types/summary/ref.d.ts +3 -1
- package/dist/types/summary/ref.d.ts.map +1 -1
- package/dist/types/tool/index.d.ts +32 -4
- 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 +106 -0
- package/dist/types/tool/presentation.d.ts.map +1 -1
- package/dist/utils/json-snapshot.d.ts +6 -2
- package/dist/utils/json-snapshot.d.ts.map +1 -1
- package/dist/utils/json-snapshot.js +19 -9
- package/dist/utils/json-snapshot.js.map +1 -1
- package/dist/utils/structured-result-json.d.ts +5 -0
- package/dist/utils/structured-result-json.d.ts.map +1 -0
- package/dist/utils/structured-result-json.js +10 -0
- package/dist/utils/structured-result-json.js.map +1 -0
- package/package.json +1 -1
- package/src/agents/QueryAgent.ts +1 -0
- package/src/agents/examples/SupervisorAgent.ts +1 -0
- package/src/agents/runAgent.ts +3 -0
- package/src/authorization/shell-lexer.ts +16 -1
- package/src/bridge/acp/permission.ts +17 -3
- package/src/bridge/acp/server.ts +271 -25
- package/src/bridge/acp/tasks.ts +23 -0
- package/src/bridge/acp/update.ts +167 -13
- package/src/config/registry.ts +24 -3
- package/src/connector/mcp/adapter.ts +16 -4
- package/src/connector/mcp/client.ts +6 -2
- package/src/connector/mcp/discovery.ts +29 -8
- package/src/connector/mcp/mcp-toolset.ts +25 -4
- package/src/connector/mcp/reconnect.ts +34 -4
- package/src/constants/acp/index.ts +4 -0
- package/src/manager/agent/lifecycle.ts +230 -3
- package/src/manager/plan/lifecycle.ts +11 -9
- package/src/manager/session/attribution.ts +12 -2
- package/src/manager/session/streamed-message-identity.ts +21 -0
- package/src/manager/session/turn-recorder.ts +4 -3
- package/src/pals/activity/causality.ts +261 -0
- package/src/pals/activity/projection.ts +89 -0
- package/src/pals/activity/source.ts +240 -0
- package/src/pals/activity/subscription-policy.ts +230 -0
- package/src/pals/activity/subscription-schema.ts +27 -0
- package/src/pals/activity/subscription-store.ts +172 -0
- package/src/pals/activity/subscription-types.ts +48 -0
- package/src/pals/activity/subscriptions.ts +209 -0
- package/src/pals/activity/types.ts +108 -0
- package/src/pals/channels/ingress.ts +153 -0
- package/src/pals/channels/routes.ts +118 -0
- package/src/pals/channels/routing.ts +197 -0
- package/src/pals/channels/schema.ts +108 -0
- package/src/pals/channels/types.ts +156 -0
- package/src/pals/communication/broker.ts +131 -0
- package/src/pals/communication/dispatch.ts +66 -0
- package/src/pals/communication/inbound.ts +193 -0
- package/src/pals/communication/ingress-dispatch.ts +63 -0
- package/src/pals/communication/ingress-inbound.ts +269 -0
- package/src/pals/communication/ingress-schema.ts +526 -0
- package/src/pals/communication/ingress-types.ts +336 -0
- package/src/pals/communication/operator.ts +315 -0
- package/src/pals/communication/policy.ts +174 -0
- package/src/pals/communication/schema.ts +173 -0
- package/src/pals/communication/store.ts +577 -0
- package/src/pals/communication/tools.ts +139 -0
- package/src/pals/communication/types.ts +227 -0
- package/src/pals/communication/verify.ts +220 -0
- package/src/pals/lifecycle.ts +54 -0
- package/src/pals/prompt.ts +101 -0
- package/src/pals/reference-images.ts +322 -0
- package/src/pals/runtime.ts +670 -0
- package/src/pals/store.ts +369 -0
- package/src/pals/types.ts +157 -0
- package/src/peers/envelope.ts +1 -1
- package/src/plugin/lifecycle.ts +217 -46
- package/src/plugin/shell-hook.ts +8 -2
- package/src/process/kill-tree.ts +10 -1
- package/src/prompt/resident-learning.ts +2 -2
- package/src/prompt/resident-step.ts +4 -4
- package/src/provider/errors.ts +135 -2
- package/src/public-runtime.ts +119 -12
- package/src/public-tools.ts +13 -1
- package/src/public-types.ts +69 -7
- package/src/registry/tool/presentation.ts +9 -4
- package/src/registry/tool/screen.ts +34 -2
- package/src/runtime/harness-session/index.ts +1125 -0
- package/src/runtime/harness-session/journal.ts +209 -0
- package/src/runtime/harness-session/saved-view.ts +122 -0
- package/src/runtime/jobs/awaited-jobs.ts +2 -1
- package/src/runtime/jobs/registry.ts +423 -50
- package/src/runtime/query/abandon-turn.ts +18 -2
- package/src/runtime/query/checkpoint.ts +11 -0
- package/src/runtime/query/durable-inbound.ts +101 -0
- package/src/runtime/query/events.ts +22 -5
- package/src/runtime/query/executor/tool-call-admission.ts +125 -32
- package/src/runtime/query/executor.ts +316 -130
- package/src/runtime/query/index.ts +48 -5
- package/src/runtime/query/iteration/index.ts +253 -114
- package/src/runtime/query/iteration/outstanding-work.ts +57 -7
- package/src/runtime/query/iteration/phases/context.ts +8 -0
- package/src/runtime/query/iteration/phases/tool-review.ts +124 -22
- package/src/runtime/query/iteration/step-shaping.ts +9 -1
- package/src/runtime/query/observation-context.ts +22 -16
- package/src/runtime/query/prepare-turn.ts +2 -2
- package/src/runtime/query/prompt-cache.ts +3 -0
- package/src/runtime/query/prompt.ts +32 -1
- package/src/runtime/query/repeat-call.ts +40 -10
- package/src/runtime/query/resume-pending.ts +60 -7
- package/src/runtime/query/resume-session.ts +1 -1
- package/src/runtime/query/review-policy.ts +23 -2
- package/src/runtime/query/saved-presentation.ts +70 -0
- package/src/runtime/query/steering.ts +6 -9
- package/src/runtime/query/tool-executions.ts +108 -9
- package/src/runtime/query/tooling.ts +6 -1
- package/src/scheduler/completion-inbox.ts +108 -7
- package/src/scheduler/delegating.ts +5 -0
- package/src/scheduler/local.ts +2 -0
- package/src/session/summary/materialize.ts +51 -9
- package/src/store/budget/ledger.ts +60 -5
- package/src/store/index.ts +1 -0
- package/src/store/memory/disk.ts +82 -7
- package/src/store/memory/index.ts +66 -7
- package/src/store/memory/markdown.ts +54 -2
- package/src/store/memory/memory.ts +52 -2
- package/src/store/memory/revision.ts +158 -0
- package/src/store/session/disk.ts +77 -10
- package/src/store/session/memory.ts +32 -7
- package/src/store/session-log/core.ts +118 -11
- package/src/store/session-log/disk.ts +9 -2
- package/src/store/session-log/fold.ts +22 -0
- package/src/store/session-log/index.ts +5 -0
- package/src/store/session-log/memory.ts +2 -1
- package/src/store/session-log/spill.ts +89 -6
- package/src/store/session-log/structured-result.ts +96 -0
- package/src/store/task/disk.ts +46 -2
- package/src/store/task/memory.ts +13 -3
- package/src/tools/admit-facts.ts +145 -0
- package/src/tools/builtins/bash.ts +132 -24
- package/src/tools/builtins/edit.ts +42 -0
- package/src/tools/builtins/file-write-result.ts +14 -0
- package/src/tools/builtins/glob.ts +12 -0
- package/src/tools/builtins/grep.ts +14 -0
- package/src/tools/builtins/index.ts +2 -0
- package/src/tools/builtins/job.ts +4 -1
- package/src/tools/builtins/read-file.ts +57 -0
- package/src/tools/builtins/view-image.ts +409 -0
- package/src/tools/builtins/wait-for-job-bounds.ts +45 -7
- package/src/tools/builtins/wait-for-job.ts +159 -36
- package/src/tools/builtins/write-file.ts +4 -2
- package/src/tools/command-shell.ts +132 -5
- package/src/tools/coordinator/agent.ts +9 -19
- package/src/tools/coordinator/index.ts +150 -75
- package/src/tools/coordinator/wait-with-idle-bound.ts +3 -1
- package/src/tools/defineTool.ts +4 -0
- package/src/tools/failure-facts.ts +24 -0
- package/src/tools/host-output.ts +136 -0
- package/src/tools/memory/delete.ts +33 -3
- package/src/tools/memory/read.ts +35 -2
- package/src/tools/memory/search.ts +38 -7
- package/src/tools/memory/update.ts +28 -3
- package/src/tools/oem-code-pages.ts +22 -0
- package/src/tools/schedules/schedule-tool.ts +38 -5
- package/src/tools/schedules/types.ts +23 -3
- package/src/tools/task/list.ts +15 -7
- package/src/tools/task/present.ts +37 -7
- package/src/tools/task/update.ts +12 -5
- package/src/tools/text-window.ts +87 -0
- package/src/toolsets/manager.ts +132 -2
- package/src/turn/memory-recall.ts +5 -1
- package/src/types/acp/index.ts +150 -4
- package/src/types/agent/base.ts +3 -0
- package/src/types/agent/manager.ts +8 -23
- package/src/types/agent/scheduler.ts +10 -1
- package/src/types/agent/task.ts +4 -0
- package/src/types/connector/mcp.ts +7 -0
- package/src/types/errors/catalog.ts +4 -2
- package/src/types/harness/schema.ts +203 -0
- package/src/types/harness/session.ts +306 -0
- package/src/types/hitl/index.ts +17 -1
- package/src/types/job/index.ts +42 -0
- package/src/types/memory/index.ts +43 -0
- package/src/types/message/inbound-delivery.ts +63 -0
- package/src/types/message/index.ts +8 -1
- package/src/types/plugin/index.ts +11 -6
- package/src/types/sandbox/index.ts +46 -0
- package/src/types/session/checkpoint.ts +4 -1
- package/src/types/session/events.ts +23 -1
- package/src/types/session/records.ts +114 -2
- package/src/types/session/step.ts +2 -0
- package/src/types/session/store.ts +23 -9
- package/src/types/session/tool-execution.ts +6 -0
- package/src/types/structured-output/index.ts +13 -2
- package/src/types/summary/ref.ts +3 -1
- package/src/types/tool/index.ts +39 -5
- package/src/types/tool/presentation.ts +121 -0
- package/src/utils/json-snapshot.ts +26 -9
- package/src/utils/structured-result-json.ts +10 -0
|
@@ -28,13 +28,21 @@ const STOP_REASONS = {
|
|
|
28
28
|
stop_condition: 'end_turn',
|
|
29
29
|
max_iterations: 'max_turns',
|
|
30
30
|
max_tokens: 'max_turns',
|
|
31
|
+
token_budget: 'max_turns',
|
|
32
|
+
cost_limit: 'max_turns',
|
|
33
|
+
cost_unmeasurable: 'error',
|
|
34
|
+
timeout: 'error',
|
|
31
35
|
cancelled: 'cancelled',
|
|
32
36
|
canceled: 'cancelled',
|
|
33
37
|
aborted: 'cancelled',
|
|
34
38
|
paused: 'cancelled',
|
|
35
39
|
guardrail_blocked: 'refused',
|
|
40
|
+
input_guardrail: 'refused',
|
|
41
|
+
output_guardrail: 'refused',
|
|
42
|
+
step_refused: 'refused',
|
|
36
43
|
plan_rejected: 'refused',
|
|
37
44
|
answer_rejected: 'refused',
|
|
45
|
+
structured_output_failed: 'error',
|
|
38
46
|
error: 'error',
|
|
39
47
|
provider_error: 'error',
|
|
40
48
|
};
|
|
@@ -43,6 +51,21 @@ export function toAcpStopReason(reason) {
|
|
|
43
51
|
return 'end_turn';
|
|
44
52
|
return STOP_REASONS[reason] ?? 'error';
|
|
45
53
|
}
|
|
54
|
+
function messageIdentity(event) {
|
|
55
|
+
return {
|
|
56
|
+
...(event.messageId === undefined ? {} : { messageId: event.messageId }),
|
|
57
|
+
...(event.turnId === undefined ? {} : { turnId: event.turnId }),
|
|
58
|
+
...(event.iteration === undefined ? {} : { iteration: event.iteration }),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function thoughtIdentity(event) {
|
|
62
|
+
return {
|
|
63
|
+
...messageIdentity(event),
|
|
64
|
+
...(event.messageId === undefined || event.blockIndex === undefined
|
|
65
|
+
? {}
|
|
66
|
+
: { blockId: `${event.messageId}:${event.blockIndex}` }),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
46
69
|
/**
|
|
47
70
|
* One session event as a session update, or `null`.
|
|
48
71
|
*
|
|
@@ -52,9 +75,44 @@ export function toAcpStopReason(reason) {
|
|
|
52
75
|
export function toAcpSessionUpdate(event, presenter) {
|
|
53
76
|
switch (event.type) {
|
|
54
77
|
case 'text_delta':
|
|
55
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
kind: 'agent_message_chunk',
|
|
80
|
+
text: event.text,
|
|
81
|
+
...messageIdentity(event),
|
|
82
|
+
...(event.textPart
|
|
83
|
+
? {
|
|
84
|
+
textPart: {
|
|
85
|
+
id: event.textPart.id,
|
|
86
|
+
...(event.textPart.phase === undefined ? {} : { phase: event.textPart.phase }),
|
|
87
|
+
},
|
|
88
|
+
...(event.textPart.phase === undefined ? {} : { phase: event.textPart.phase }),
|
|
89
|
+
}
|
|
90
|
+
: {}),
|
|
91
|
+
};
|
|
92
|
+
case 'message_completed':
|
|
93
|
+
return {
|
|
94
|
+
kind: 'agent_message',
|
|
95
|
+
status: 'completed',
|
|
96
|
+
...messageIdentity(event),
|
|
97
|
+
stopReason: event.stopReason,
|
|
98
|
+
...(event.content === undefined ? {} : { content: event.content }),
|
|
99
|
+
...(event.textParts
|
|
100
|
+
? {
|
|
101
|
+
textParts: event.textParts.map((part) => ({
|
|
102
|
+
id: part.id,
|
|
103
|
+
text: part.text,
|
|
104
|
+
...(part.phase === undefined ? {} : { phase: part.phase }),
|
|
105
|
+
})),
|
|
106
|
+
}
|
|
107
|
+
: {}),
|
|
108
|
+
};
|
|
109
|
+
case 'reasoning_started':
|
|
110
|
+
return { kind: 'agent_thought', status: 'pending', ...thoughtIdentity(event) };
|
|
56
111
|
case 'reasoning_delta':
|
|
57
|
-
return { kind: 'agent_thought_chunk', text: event.text };
|
|
112
|
+
return { kind: 'agent_thought_chunk', text: event.text, ...thoughtIdentity(event) };
|
|
113
|
+
case 'reasoning_completed':
|
|
114
|
+
// Readable text arrived as deltas. Never copy signed or opaque replay material.
|
|
115
|
+
return { kind: 'agent_thought', status: 'completed', ...thoughtIdentity(event) };
|
|
58
116
|
case 'tool_executing':
|
|
59
117
|
return {
|
|
60
118
|
kind: 'tool_call',
|
|
@@ -63,26 +121,103 @@ export function toAcpSessionUpdate(event, presenter) {
|
|
|
63
121
|
status: 'pending',
|
|
64
122
|
view: presenter.presentCall(event.toolName, event.input),
|
|
65
123
|
};
|
|
124
|
+
case 'tool_progress':
|
|
125
|
+
return {
|
|
126
|
+
kind: 'tool_call',
|
|
127
|
+
toolCallId: event.toolUseId,
|
|
128
|
+
title: event.toolName,
|
|
129
|
+
status: 'pending',
|
|
130
|
+
view: { kind: 'generic', label: event.toolName },
|
|
131
|
+
progress: {
|
|
132
|
+
message: event.message,
|
|
133
|
+
...(event.fraction === undefined ? {} : { fraction: event.fraction }),
|
|
134
|
+
},
|
|
135
|
+
};
|
|
66
136
|
case 'tool_completed':
|
|
67
137
|
return {
|
|
68
138
|
kind: 'tool_call',
|
|
69
139
|
toolCallId: event.toolUseId,
|
|
70
140
|
title: event.toolName,
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
// asked with `undefined`, and a tool whose `presentResult` needs
|
|
74
|
-
// its input falls back to the generic view rather than being
|
|
75
|
-
// handed a guess at what it was called with.
|
|
141
|
+
// The runtime already presented the result with its real input and
|
|
142
|
+
// data. Older producers may only carry text; keep that fallback.
|
|
76
143
|
status: event.isError === true ? 'failed' : 'completed',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
144
|
+
...(event.durationMs === undefined ? {} : { durationMs: event.durationMs }),
|
|
145
|
+
...(event.facts === undefined ? {} : { facts: event.facts }),
|
|
146
|
+
view: event.presentation ??
|
|
147
|
+
presenter.presentResult(event.toolName, undefined, {
|
|
148
|
+
success: event.isError !== true,
|
|
149
|
+
output: typeof event.result === 'string' ? event.result : String(event.result ?? ''),
|
|
150
|
+
}),
|
|
151
|
+
};
|
|
152
|
+
case 'hosted_tool': {
|
|
153
|
+
// This is provider-executed activity, not a local tool request. Reuse
|
|
154
|
+
// the peer's existing display-only tool row without exposing a raw
|
|
155
|
+
// provider item or asking the host to execute or approve anything.
|
|
156
|
+
const page = Boolean(event.tool.url && !event.tool.query);
|
|
157
|
+
const title = page ? 'Web fetch' : 'Web search';
|
|
158
|
+
const target = (page ? event.tool.url : event.tool.query)?.replace(/\s+/g, ' ').trim();
|
|
159
|
+
const label = event.tool.status === 'running'
|
|
160
|
+
? ''
|
|
161
|
+
: `${title}${target ? `: ${target.slice(0, 200)}` : ''}${event.tool.status === 'failed'
|
|
162
|
+
? ' failed'
|
|
163
|
+
: !page &&
|
|
164
|
+
Number.isSafeInteger(event.tool.results) &&
|
|
165
|
+
(event.tool.results ?? -1) >= 0
|
|
166
|
+
? ` · ${event.tool.results} ${event.tool.results === 1 ? 'source' : 'sources'}`
|
|
167
|
+
: ''}`;
|
|
168
|
+
return {
|
|
169
|
+
kind: 'tool_call',
|
|
170
|
+
toolCallId: `provider-hosted-web-search:${event.iteration}:${event.tool.id}`,
|
|
171
|
+
title,
|
|
172
|
+
status: event.tool.status === 'running'
|
|
173
|
+
? 'pending'
|
|
174
|
+
: event.tool.status === 'completed'
|
|
175
|
+
? 'completed'
|
|
176
|
+
: 'failed',
|
|
177
|
+
view: { kind: 'generic', label, presentation: 'activity' },
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
case 'provider_retry':
|
|
181
|
+
return {
|
|
182
|
+
kind: 'provider_retry',
|
|
183
|
+
attempt: event.attempt,
|
|
184
|
+
maxRetries: event.maxRetries,
|
|
185
|
+
delayMs: event.delayMs,
|
|
186
|
+
...(event.status === undefined ? {} : { status: event.status }),
|
|
187
|
+
serverDirected: event.serverDirected,
|
|
188
|
+
...(event.turnId === undefined ? {} : { turnId: event.turnId }),
|
|
81
189
|
};
|
|
82
190
|
case 'turn_completed':
|
|
83
|
-
return {
|
|
191
|
+
return {
|
|
192
|
+
kind: 'turn_ended',
|
|
193
|
+
stopReason: toAcpStopReason(event.stopReason),
|
|
194
|
+
...(event.turnId === undefined ? {} : { turnId: event.turnId }),
|
|
195
|
+
...(event.settlement?.resultMessageId === undefined
|
|
196
|
+
? {}
|
|
197
|
+
: { messageId: event.settlement.resultMessageId }),
|
|
198
|
+
...(event.stopReason === undefined ? {} : { reason: event.stopReason }),
|
|
199
|
+
...(event.result === undefined ? {} : { result: event.result }),
|
|
200
|
+
};
|
|
201
|
+
case 'turn_paused':
|
|
202
|
+
return {
|
|
203
|
+
kind: 'turn_ended',
|
|
204
|
+
stopReason: 'cancelled',
|
|
205
|
+
reason: 'paused',
|
|
206
|
+
// A checkpointed provider fault is still a failure the operator
|
|
207
|
+
// needs to see. Ordinary review/handoff pauses remain non-errors.
|
|
208
|
+
...(event.failure || event.providerError
|
|
209
|
+
? { error: event.failure?.message || event.reason }
|
|
210
|
+
: {}),
|
|
211
|
+
...(event.turnId === undefined ? {} : { turnId: event.turnId }),
|
|
212
|
+
};
|
|
84
213
|
case 'turn_failed':
|
|
85
|
-
return {
|
|
214
|
+
return {
|
|
215
|
+
kind: 'turn_ended',
|
|
216
|
+
stopReason: 'error',
|
|
217
|
+
reason: 'error',
|
|
218
|
+
error: event.error,
|
|
219
|
+
...(event.turnId === undefined ? {} : { turnId: event.turnId }),
|
|
220
|
+
};
|
|
86
221
|
default:
|
|
87
222
|
// Everything else: iteration boundaries, token accounting, plan and
|
|
88
223
|
// activity events, compaction. Real events with no word in this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/bridge/acp/update.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;GAQG;AACH,MAAM,YAAY,GAA4C;IAC7D,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,UAAU;IAC1B,cAAc,EAAE,WAAW;IAC3B,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,WAAW;IACnB,iBAAiB,EAAE,SAAS;IAC5B,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,SAAS;IAC1B,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,OAAO;CACvB,CAAA;AAED,MAAM,UAAU,eAAe,CAAC,MAAuC;IACtE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,UAAU,CAAA;IAC3C,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,OAAO,CAAA;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CACjC,KAAmB,EACnB,SAAwB;IAExB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,YAAY;YAChB,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/bridge/acp/update.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;GAQG;AACH,MAAM,YAAY,GAA4C;IAC7D,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,UAAU;IAC1B,cAAc,EAAE,WAAW;IAC3B,UAAU,EAAE,WAAW;IACvB,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,WAAW;IACvB,iBAAiB,EAAE,OAAO;IAC1B,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,WAAW;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AAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;aAC/D,CAAA;QAEF,KAAK,aAAa;YACjB,OAAO;gBACN,IAAI,EAAE,YAAY;gBAClB,UAAU,EAAE,WAAW;gBACvB,MAAM,EAAE,QAAQ;gBAChB,gEAAgE;gBAChE,kEAAkE;gBAClE,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,aAAa;oBACvC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;oBACnD,CAAC,CAAC,EAAE,CAAC;gBACN,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;aAC/D,CAAA;QAEF,KAAK,aAAa;YACjB,OAAO;gBACN,IAAI,EAAE,YAAY;gBAClB,UAAU,EAAE,OAAO;gBACnB,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;aAC/D,CAAA;QAEF;YACC,oEAAoE;YACpE,gEAAgE;YAChE,sEAAsE;YACtE,2DAA2D;YAC3D,OAAO,IAAI,CAAA;IACb,CAAC;AACF,CAAC"}
|
|
@@ -45,6 +45,8 @@ export interface ConfigScope<T> {
|
|
|
45
45
|
update(patch: Partial<T> | Record<string, unknown>): T;
|
|
46
46
|
/** Called after a successful update. Returns an unsubscribe. */
|
|
47
47
|
watch(listener: (next: T, previous: T) => void): () => void;
|
|
48
|
+
/** Release this registration, including its watchers, while retaining saved overrides. */
|
|
49
|
+
dispose(): void;
|
|
48
50
|
}
|
|
49
51
|
export declare class ConfigNamespaceCollisionError extends RegistryCollisionError {
|
|
50
52
|
readonly namespace: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/config/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,KAAK,mBAAmB,EAA+B,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,oBAAoB,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC7B;;;;;;OAMG;IACH,GAAG,IAAI,CAAC,CAAA;IACR;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;IACtD,gEAAgE;IAChE,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/config/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,KAAK,mBAAmB,EAA+B,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,oBAAoB,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC7B;;;;;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E;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAO,GACvD,WAAW,CAAC,CAAC,CAAC;IA6CjB,2CAA2C;IAC3C,UAAU,IAAI,SAAS,MAAM,EAAE;IAI/B,OAAO,CAAC,WAAW;IAoCnB,OAAO,CAAC,QAAQ;CAGhB"}
|
package/dist/config/registry.js
CHANGED
|
@@ -53,13 +53,31 @@ export class ConfigRegistry {
|
|
|
53
53
|
watchers: new Set(),
|
|
54
54
|
};
|
|
55
55
|
this.entries.set(namespace, entry);
|
|
56
|
+
const assertOwned = () => {
|
|
57
|
+
if (this.entries.get(namespace) !== entry) {
|
|
58
|
+
throw new Error(`Configuration namespace "${namespace}" is no longer registered.`);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
56
61
|
return {
|
|
57
|
-
get: () =>
|
|
58
|
-
|
|
62
|
+
get: () => {
|
|
63
|
+
assertOwned();
|
|
64
|
+
return entry.resolved;
|
|
65
|
+
},
|
|
66
|
+
update: (patch) => {
|
|
67
|
+
assertOwned();
|
|
68
|
+
return this.applyUpdate(namespace, entry, patch);
|
|
69
|
+
},
|
|
59
70
|
watch: (listener) => {
|
|
71
|
+
assertOwned();
|
|
60
72
|
entry.watchers.add(listener);
|
|
61
73
|
return () => entry.watchers.delete(listener);
|
|
62
74
|
},
|
|
75
|
+
dispose: () => {
|
|
76
|
+
if (this.entries.get(namespace) !== entry)
|
|
77
|
+
return;
|
|
78
|
+
this.entries.delete(namespace);
|
|
79
|
+
entry.watchers.clear();
|
|
80
|
+
},
|
|
63
81
|
};
|
|
64
82
|
}
|
|
65
83
|
/** Namespaces registered on THIS scope. */
|
|
@@ -74,9 +92,11 @@ export class ConfigRegistry {
|
|
|
74
92
|
// every watcher about it.
|
|
75
93
|
const next = entry.schema.parse({ ...entry.base, ...candidateOverride });
|
|
76
94
|
const previous = entry.resolved;
|
|
95
|
+
const storeKey = this.storeKey(namespace);
|
|
96
|
+
this.store.save(storeKey, candidateOverride);
|
|
97
|
+
this.persisted[storeKey] = candidateOverride;
|
|
77
98
|
entry.override = candidateOverride;
|
|
78
99
|
entry.resolved = next;
|
|
79
|
-
this.store.save(this.storeKey(namespace), candidateOverride);
|
|
80
100
|
for (const watcher of entry.watchers) {
|
|
81
101
|
try {
|
|
82
102
|
watcher(next, previous);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/config/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAA4B,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAe,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/config/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAA4B,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAe,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAkD/D,MAAM,OAAO,6BAA8B,SAAQ,sBAAsB;IACnD;IAArB,YAAqB,SAAiB;QACrC,KAAK,CACJ,gBAAgB,EAChB,SAAS,EACT,4BAA4B,SAAS,8IAA8I,CACnL,CAAA;QALmB,cAAS,GAAT,SAAS,CAAQ;QAMrC,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAA;IAC5C,CAAC;CACD;AAuCD,MAAM,OAAO,cAAc;IACT,OAAO,GAAG,IAAI,GAAG,EAA0B,CAAA;IAC3C,KAAK,CAAqB;IAC1B,SAAS,CAAyB;IAClC,GAAG,CAAQ;IACX,OAAO,CAAoB;IAE5C,YAAY,UAAiC,EAAE;QAC9C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,2BAA2B,EAAE,CAAA;QAC/D,IAAI,CAAC,SAAS,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,QAAQ,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC1E,CAAC,CAAC,EAAE,GAAI,KAAiC,EAAE;QAC3C,CAAC,CAAC,EAAE,CAAA;AACN,CAAC"}
|
package/dist/config/runtime.d.ts
CHANGED
|
@@ -10,21 +10,21 @@ export declare const TaskRouterConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
10
10
|
planning: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
11
|
default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
default?: string | null | undefined;
|
|
13
14
|
compaction?: string | null | undefined;
|
|
14
15
|
summarization?: string | null | undefined;
|
|
15
16
|
exploration?: string | null | undefined;
|
|
16
17
|
coding?: string | null | undefined;
|
|
17
18
|
verification?: string | null | undefined;
|
|
18
19
|
planning?: string | null | undefined;
|
|
19
|
-
default?: string | null | undefined;
|
|
20
20
|
}, {
|
|
21
|
+
default?: string | null | undefined;
|
|
21
22
|
compaction?: string | null | undefined;
|
|
22
23
|
summarization?: string | null | undefined;
|
|
23
24
|
exploration?: string | null | undefined;
|
|
24
25
|
coding?: string | null | undefined;
|
|
25
26
|
verification?: string | null | undefined;
|
|
26
27
|
planning?: string | null | undefined;
|
|
27
|
-
default?: string | null | undefined;
|
|
28
28
|
}>>;
|
|
29
29
|
export declare const CompactionConfigSchema: z.ZodObject<{
|
|
30
30
|
/** Request-only exact duplicate observation masking. Enabled unless false; disabled strategy opts out too. */
|
|
@@ -144,7 +144,7 @@ export declare const CompactionConfigSchema: z.ZodObject<{
|
|
|
144
144
|
maxCharsPerRequirement: z.ZodDefault<z.ZodNumber>;
|
|
145
145
|
maxCharsPerTask: z.ZodDefault<z.ZodNumber>;
|
|
146
146
|
}, "strip", z.ZodTypeAny, {
|
|
147
|
-
strategy: "structured" | "salience" | "sliding-window"
|
|
147
|
+
strategy: "disabled" | "structured" | "salience" | "sliding-window";
|
|
148
148
|
triggerThreshold: number;
|
|
149
149
|
resetThreshold: number;
|
|
150
150
|
keepRecentMessages: number;
|
|
@@ -170,7 +170,7 @@ export declare const CompactionConfigSchema: z.ZodObject<{
|
|
|
170
170
|
preserveToolResultsFrom?: string[] | undefined;
|
|
171
171
|
}, {
|
|
172
172
|
deduplicateObservations?: boolean | undefined;
|
|
173
|
-
strategy?: "structured" | "salience" | "sliding-window" |
|
|
173
|
+
strategy?: "disabled" | "structured" | "salience" | "sliding-window" | undefined;
|
|
174
174
|
softTarget?: number | undefined;
|
|
175
175
|
contextWindowTokens?: number | undefined;
|
|
176
176
|
triggerThreshold?: number | undefined;
|
|
@@ -223,10 +223,10 @@ export declare const PromptCacheConfigSchema: z.ZodObject<{
|
|
|
223
223
|
strategy: z.ZodDefault<z.ZodEnum<["auto", "disabled"]>>;
|
|
224
224
|
}, "strip", z.ZodTypeAny, {
|
|
225
225
|
enabled: boolean;
|
|
226
|
-
strategy: "
|
|
226
|
+
strategy: "auto" | "disabled";
|
|
227
227
|
}, {
|
|
228
228
|
enabled?: boolean | undefined;
|
|
229
|
-
strategy?: "
|
|
229
|
+
strategy?: "auto" | "disabled" | undefined;
|
|
230
230
|
}>;
|
|
231
231
|
export declare const PluginRuntimeConfigSchema: z.ZodObject<{
|
|
232
232
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -261,21 +261,21 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
261
261
|
planning: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
262
|
default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
default?: string | null | undefined;
|
|
264
265
|
compaction?: string | null | undefined;
|
|
265
266
|
summarization?: string | null | undefined;
|
|
266
267
|
exploration?: string | null | undefined;
|
|
267
268
|
coding?: string | null | undefined;
|
|
268
269
|
verification?: string | null | undefined;
|
|
269
270
|
planning?: string | null | undefined;
|
|
270
|
-
default?: string | null | undefined;
|
|
271
271
|
}, {
|
|
272
|
+
default?: string | null | undefined;
|
|
272
273
|
compaction?: string | null | undefined;
|
|
273
274
|
summarization?: string | null | undefined;
|
|
274
275
|
exploration?: string | null | undefined;
|
|
275
276
|
coding?: string | null | undefined;
|
|
276
277
|
verification?: string | null | undefined;
|
|
277
278
|
planning?: string | null | undefined;
|
|
278
|
-
default?: string | null | undefined;
|
|
279
279
|
}>>;
|
|
280
280
|
compaction: z.ZodDefault<z.ZodObject<{
|
|
281
281
|
/** Request-only exact duplicate observation masking. Enabled unless false; disabled strategy opts out too. */
|
|
@@ -395,7 +395,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
395
395
|
maxCharsPerRequirement: z.ZodDefault<z.ZodNumber>;
|
|
396
396
|
maxCharsPerTask: z.ZodDefault<z.ZodNumber>;
|
|
397
397
|
}, "strip", z.ZodTypeAny, {
|
|
398
|
-
strategy: "structured" | "salience" | "sliding-window"
|
|
398
|
+
strategy: "disabled" | "structured" | "salience" | "sliding-window";
|
|
399
399
|
triggerThreshold: number;
|
|
400
400
|
resetThreshold: number;
|
|
401
401
|
keepRecentMessages: number;
|
|
@@ -421,7 +421,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
421
421
|
preserveToolResultsFrom?: string[] | undefined;
|
|
422
422
|
}, {
|
|
423
423
|
deduplicateObservations?: boolean | undefined;
|
|
424
|
-
strategy?: "structured" | "salience" | "sliding-window" |
|
|
424
|
+
strategy?: "disabled" | "structured" | "salience" | "sliding-window" | undefined;
|
|
425
425
|
softTarget?: number | undefined;
|
|
426
426
|
contextWindowTokens?: number | undefined;
|
|
427
427
|
triggerThreshold?: number | undefined;
|
|
@@ -498,7 +498,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
498
498
|
timeoutMs: number;
|
|
499
499
|
memoryLimitMb: number;
|
|
500
500
|
maxProcesses: number;
|
|
501
|
-
requireIsolation: ("
|
|
501
|
+
requireIsolation: ("network" | "filesystem" | "process")[];
|
|
502
502
|
}, {
|
|
503
503
|
workspace?: "ephemeral" | "working-directory" | undefined;
|
|
504
504
|
enabled?: boolean | undefined;
|
|
@@ -506,13 +506,13 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
506
506
|
timeoutMs?: number | undefined;
|
|
507
507
|
memoryLimitMb?: number | undefined;
|
|
508
508
|
maxProcesses?: number | undefined;
|
|
509
|
-
requireIsolation?: ("
|
|
509
|
+
requireIsolation?: ("network" | "filesystem" | "process")[] | undefined;
|
|
510
510
|
}>>;
|
|
511
511
|
}, "strip", z.ZodTypeAny, {
|
|
512
512
|
model: string;
|
|
513
513
|
timeoutMs: number;
|
|
514
514
|
compaction: {
|
|
515
|
-
strategy: "structured" | "salience" | "sliding-window"
|
|
515
|
+
strategy: "disabled" | "structured" | "salience" | "sliding-window";
|
|
516
516
|
triggerThreshold: number;
|
|
517
517
|
resetThreshold: number;
|
|
518
518
|
keepRecentMessages: number;
|
|
@@ -548,16 +548,22 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
548
548
|
timeoutMs: number;
|
|
549
549
|
memoryLimitMb: number;
|
|
550
550
|
maxProcesses: number;
|
|
551
|
-
requireIsolation: ("
|
|
551
|
+
requireIsolation: ("network" | "filesystem" | "process")[];
|
|
552
|
+
} | undefined;
|
|
553
|
+
plugins?: {
|
|
554
|
+
enabled: boolean;
|
|
555
|
+
autoDiscovery: boolean;
|
|
556
|
+
allowedScopes: ("user" | "project")[];
|
|
557
|
+
hookTimeoutMs: number;
|
|
552
558
|
} | undefined;
|
|
553
559
|
taskRouter?: {
|
|
560
|
+
default?: string | null | undefined;
|
|
554
561
|
compaction?: string | null | undefined;
|
|
555
562
|
summarization?: string | null | undefined;
|
|
556
563
|
exploration?: string | null | undefined;
|
|
557
564
|
coding?: string | null | undefined;
|
|
558
565
|
verification?: string | null | undefined;
|
|
559
566
|
planning?: string | null | undefined;
|
|
560
|
-
default?: string | null | undefined;
|
|
561
567
|
} | undefined;
|
|
562
568
|
agentBus?: {
|
|
563
569
|
enabled: boolean;
|
|
@@ -567,14 +573,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
567
573
|
breakerFailureThreshold: number;
|
|
568
574
|
breakerResetTimeoutMs: number;
|
|
569
575
|
} | undefined;
|
|
570
|
-
plugins?: {
|
|
571
|
-
enabled: boolean;
|
|
572
|
-
autoDiscovery: boolean;
|
|
573
|
-
allowedScopes: ("user" | "project")[];
|
|
574
|
-
hookTimeoutMs: number;
|
|
575
|
-
} | undefined;
|
|
576
576
|
}, {
|
|
577
|
-
model?: string | undefined;
|
|
578
577
|
sandbox?: {
|
|
579
578
|
workspace?: "ephemeral" | "working-directory" | undefined;
|
|
580
579
|
enabled?: boolean | undefined;
|
|
@@ -582,12 +581,19 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
582
581
|
timeoutMs?: number | undefined;
|
|
583
582
|
memoryLimitMb?: number | undefined;
|
|
584
583
|
maxProcesses?: number | undefined;
|
|
585
|
-
requireIsolation?: ("
|
|
584
|
+
requireIsolation?: ("network" | "filesystem" | "process")[] | undefined;
|
|
585
|
+
} | undefined;
|
|
586
|
+
model?: string | undefined;
|
|
587
|
+
plugins?: {
|
|
588
|
+
enabled?: boolean | undefined;
|
|
589
|
+
autoDiscovery?: boolean | undefined;
|
|
590
|
+
allowedScopes?: ("user" | "project")[] | undefined;
|
|
591
|
+
hookTimeoutMs?: number | undefined;
|
|
586
592
|
} | undefined;
|
|
587
593
|
timeoutMs?: number | undefined;
|
|
588
594
|
compaction?: {
|
|
589
595
|
deduplicateObservations?: boolean | undefined;
|
|
590
|
-
strategy?: "structured" | "salience" | "sliding-window" |
|
|
596
|
+
strategy?: "disabled" | "structured" | "salience" | "sliding-window" | undefined;
|
|
591
597
|
softTarget?: number | undefined;
|
|
592
598
|
contextWindowTokens?: number | undefined;
|
|
593
599
|
triggerThreshold?: number | undefined;
|
|
@@ -616,13 +622,13 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
616
622
|
maxResponseTokens?: number | undefined;
|
|
617
623
|
maxIterations?: number | undefined;
|
|
618
624
|
taskRouter?: {
|
|
625
|
+
default?: string | null | undefined;
|
|
619
626
|
compaction?: string | null | undefined;
|
|
620
627
|
summarization?: string | null | undefined;
|
|
621
628
|
exploration?: string | null | undefined;
|
|
622
629
|
coding?: string | null | undefined;
|
|
623
630
|
verification?: string | null | undefined;
|
|
624
631
|
planning?: string | null | undefined;
|
|
625
|
-
default?: string | null | undefined;
|
|
626
632
|
} | undefined;
|
|
627
633
|
agentBus?: {
|
|
628
634
|
enabled?: boolean | undefined;
|
|
@@ -632,12 +638,6 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
632
638
|
breakerFailureThreshold?: number | undefined;
|
|
633
639
|
breakerResetTimeoutMs?: number | undefined;
|
|
634
640
|
} | undefined;
|
|
635
|
-
plugins?: {
|
|
636
|
-
enabled?: boolean | undefined;
|
|
637
|
-
autoDiscovery?: boolean | undefined;
|
|
638
|
-
allowedScopes?: ("user" | "project")[] | undefined;
|
|
639
|
-
hookTimeoutMs?: number | undefined;
|
|
640
|
-
} | undefined;
|
|
641
641
|
}>;
|
|
642
642
|
export type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;
|
|
643
643
|
export declare const RUNTIME_DEFAULTS: Readonly<RuntimeConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/connector/mcp/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,KAAK,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAe,cAAc,EAAE,UAAU,EAAE,MAAM,2BAA2B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U,CA2BZ;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,CA0H3E;AAaD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAmB3E"}
|
|
@@ -66,7 +66,7 @@ function objectToZod(rawSchema, depth) {
|
|
|
66
66
|
const schema = Array.isArray(allOf) && allOf.length > 0 ? mergeAllOf(allOf, rawSchema) : rawSchema;
|
|
67
67
|
const properties = schema.properties;
|
|
68
68
|
if (!properties || Object.keys(properties).length === 0) {
|
|
69
|
-
return closeOrOpen(z.object({}), schema);
|
|
69
|
+
return closeOrOpen(z.object({}), schema, depth);
|
|
70
70
|
}
|
|
71
71
|
if (depth >= MAX_CONVERSION_DEPTH)
|
|
72
72
|
return z.record(z.unknown());
|
|
@@ -76,7 +76,7 @@ function objectToZod(rawSchema, depth) {
|
|
|
76
76
|
const field = jsonSchemaPropertyToZod(propSchema, depth + 1);
|
|
77
77
|
shape[key] = required.has(key) ? field : field.optional();
|
|
78
78
|
}
|
|
79
|
-
return closeOrOpen(z.object(shape), schema);
|
|
79
|
+
return closeOrOpen(z.object(shape), schema, depth);
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* Honor the server's `additionalProperties`, defaulting to closed.
|
|
@@ -87,9 +87,16 @@ function objectToZod(rawSchema, depth) {
|
|
|
87
87
|
* silently drops undeclared keys rather than rejecting them, so the
|
|
88
88
|
* contract shown to the model tightens without turning a server's
|
|
89
89
|
* incomplete schema into a hard validation failure.
|
|
90
|
+
* A schema-valued additionalProperties explicitly declares a dictionary:
|
|
91
|
+
* preserve those keys and validate each value through the same converter.
|
|
90
92
|
*/
|
|
91
|
-
function closeOrOpen(obj, schema) {
|
|
92
|
-
|
|
93
|
+
function closeOrOpen(obj, schema, depth) {
|
|
94
|
+
const additional = schema.additionalProperties;
|
|
95
|
+
if (additional === true)
|
|
96
|
+
return obj.passthrough();
|
|
97
|
+
if (additional !== null && typeof additional === 'object' && !Array.isArray(additional))
|
|
98
|
+
return obj.catchall(depth >= MAX_CONVERSION_DEPTH ? z.unknown() : jsonSchemaPropertyToZod(additional, depth + 1));
|
|
99
|
+
return obj;
|
|
93
100
|
}
|
|
94
101
|
function jsonSchemaPropertyToZod(prop, depth = 0) {
|
|
95
102
|
if (typeof prop !== 'object' || prop === null)
|