@namzu/sdk 49.0.0 → 50.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +541 -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/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/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/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/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/provider/strict-schema.d.ts +28 -0
- package/dist/provider/strict-schema.d.ts.map +1 -1
- package/dist/provider/strict-schema.js +86 -0
- package/dist/provider/strict-schema.js.map +1 -1
- package/dist/public-runtime.d.ts +42 -14
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +36 -8
- 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/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 +351 -34
- 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 +3 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +21 -4
- 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 +144 -67
- 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 +61 -6
- package/dist/runtime/query/iteration/outstanding-work.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +4 -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 +99 -16
- package/dist/runtime/query/iteration/phases/tool-review.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/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 +46 -1
- 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 +2 -0
- package/dist/tools/builtins/wait-for-job-bounds.d.ts.map +1 -1
- package/dist/tools/builtins/wait-for-job-bounds.js +1 -0
- package/dist/tools/builtins/wait-for-job-bounds.js.map +1 -1
- package/dist/tools/builtins/wait-for-job.d.ts +2 -0
- package/dist/tools/builtins/wait-for-job.d.ts.map +1 -1
- package/dist/tools/builtins/wait-for-job.js +104 -6
- 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/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 +11 -0
- package/dist/toolsets/manager.d.ts.map +1 -1
- package/dist/toolsets/manager.js +45 -1
- package/dist/toolsets/manager.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/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 +6 -6
- 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/connector/mcp/adapter.ts +16 -4
- package/src/connector/mcp/client.ts +6 -2
- 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/shell-hook.ts +8 -2
- package/src/process/kill-tree.ts +10 -1
- package/src/provider/errors.ts +135 -2
- package/src/provider/strict-schema.ts +90 -0
- package/src/public-runtime.ts +118 -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/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 +397 -41
- 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 +24 -4
- package/src/runtime/query/iteration/index.ts +218 -104
- package/src/runtime/query/iteration/outstanding-work.ts +55 -7
- package/src/runtime/query/iteration/phases/context.ts +4 -0
- package/src/runtime/query/iteration/phases/tool-review.ts +118 -21
- 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/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 +54 -1
- 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 +3 -0
- package/src/tools/builtins/wait-for-job.ts +141 -32
- 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/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 +58 -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/message/inbound-delivery.ts +63 -0
- package/src/types/message/index.ts +8 -1
- 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
package/src/provider/errors.ts
CHANGED
|
@@ -386,6 +386,71 @@ function vendorRetryAfter(err: unknown): string | undefined {
|
|
|
386
386
|
return undefined
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
+
/** Response headers that name the request, as the vendors that send one spell it. */
|
|
390
|
+
const REQUEST_ID_HEADERS = ['x-request-id', 'request-id', 'x-goog-request-id'] as const
|
|
391
|
+
|
|
392
|
+
/** A header off an SDK error's captured response headers (a `Headers` or a plain object). */
|
|
393
|
+
function vendorHeader(err: unknown, names: readonly string[]): string | undefined {
|
|
394
|
+
if (typeof err !== 'object' || err === null) return undefined
|
|
395
|
+
const headers =
|
|
396
|
+
(err as { headers?: unknown }).headers ??
|
|
397
|
+
(err as { $response?: { headers?: unknown } }).$response?.headers
|
|
398
|
+
if (!headers) return undefined
|
|
399
|
+
for (const name of names) {
|
|
400
|
+
if (typeof (headers as Headers).get === 'function') {
|
|
401
|
+
const value = (headers as Headers).get(name)
|
|
402
|
+
if (value) return value
|
|
403
|
+
continue
|
|
404
|
+
}
|
|
405
|
+
const value = (headers as Record<string, unknown>)[name]
|
|
406
|
+
if (typeof value === 'string' && value) return value
|
|
407
|
+
}
|
|
408
|
+
return undefined
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const FIELD_VALUE = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/
|
|
412
|
+
|
|
413
|
+
function fieldValue(value: unknown): string | undefined {
|
|
414
|
+
return typeof value === 'string' && FIELD_VALUE.test(value) && redactSecrets(value) === value
|
|
415
|
+
? value
|
|
416
|
+
: undefined
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* The provider's structured fields beside its sentence, in the one body shape every host already
|
|
421
|
+
* reads (`{"error":{"message","type","code","param"},"request_id"}`).
|
|
422
|
+
*
|
|
423
|
+
* A vendor SDK whose error message is only the parsed sentence (OpenAI's "403 <message>") still
|
|
424
|
+
* holds the body's `type`, `code`, `param` and the response's request ID as fields; a host that
|
|
425
|
+
* receives the message alone cannot show them, while Anthropic's message carries its whole body
|
|
426
|
+
* and so shows them. The fields are bounded identifiers (never a body), so nothing echoed can ride
|
|
427
|
+
* along. With nothing but a sentence the result is that sentence unchanged.
|
|
428
|
+
*/
|
|
429
|
+
export function structuredVendorDetail(input: {
|
|
430
|
+
readonly message: string | undefined
|
|
431
|
+
readonly type?: unknown
|
|
432
|
+
readonly code?: unknown
|
|
433
|
+
readonly param?: unknown
|
|
434
|
+
readonly requestId?: unknown
|
|
435
|
+
}): string | undefined {
|
|
436
|
+
const message = vendorDetail(input.message?.replace(/^\d{3}\s+/, ''))
|
|
437
|
+
const type = fieldValue(input.type)
|
|
438
|
+
const code = fieldValue(input.code)
|
|
439
|
+
const param = fieldValue(input.param)
|
|
440
|
+
const requestId = fieldValue(input.requestId)
|
|
441
|
+
if (!type && !code && !param && !requestId) return message
|
|
442
|
+
if (!message) return undefined
|
|
443
|
+
return JSON.stringify({
|
|
444
|
+
error: {
|
|
445
|
+
message,
|
|
446
|
+
...(type ? { type } : {}),
|
|
447
|
+
...(code ? { code } : {}),
|
|
448
|
+
...(param ? { param } : {}),
|
|
449
|
+
},
|
|
450
|
+
...(requestId ? { request_id: requestId } : {}),
|
|
451
|
+
})
|
|
452
|
+
}
|
|
453
|
+
|
|
389
454
|
/**
|
|
390
455
|
* Classify an error thrown by a vendor SDK and replace it.
|
|
391
456
|
*
|
|
@@ -460,7 +525,18 @@ export function providerVendorError(input: {
|
|
|
460
525
|
input.retryAfter ?? vendorRetryAfter(error),
|
|
461
526
|
input.now ?? Date.now(),
|
|
462
527
|
)
|
|
463
|
-
const
|
|
528
|
+
const fields = error as { type?: unknown; param?: unknown; requestID?: unknown } | null
|
|
529
|
+
// A message that already carries its body (Anthropic's) has the fields; one that is only the
|
|
530
|
+
// parsed sentence (OpenAI's) gets them from the SDK error's own properties.
|
|
531
|
+
const detail = carriesBody(message)
|
|
532
|
+
? vendorDetail(message)
|
|
533
|
+
: structuredVendorDetail({
|
|
534
|
+
message,
|
|
535
|
+
type: fields?.type,
|
|
536
|
+
code: exactProviderCode,
|
|
537
|
+
param: fields?.param,
|
|
538
|
+
requestId: fields?.requestID ?? vendorHeader(error, REQUEST_ID_HEADERS),
|
|
539
|
+
})
|
|
464
540
|
return new ProviderRequestError({
|
|
465
541
|
kind,
|
|
466
542
|
providerId: input.providerId,
|
|
@@ -471,6 +547,51 @@ export function providerVendorError(input: {
|
|
|
471
547
|
})
|
|
472
548
|
}
|
|
473
549
|
|
|
550
|
+
/** Anthropic's SDK words a failure "<status> <JSON body>"; OpenAI's is "<status> <sentence>", which may itself hold a brace. */
|
|
551
|
+
function carriesBody(message: string): boolean {
|
|
552
|
+
const rest = message.replace(/^\d{3}\s+/, '').trim()
|
|
553
|
+
if (!rest.startsWith('{')) return false
|
|
554
|
+
try {
|
|
555
|
+
const parsed: unknown = JSON.parse(rest)
|
|
556
|
+
return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
|
|
557
|
+
} catch {
|
|
558
|
+
return false
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function parsedBody(body: unknown): Record<string, unknown> | undefined {
|
|
563
|
+
let decoded = body
|
|
564
|
+
if (typeof decoded === 'string') {
|
|
565
|
+
try {
|
|
566
|
+
decoded = JSON.parse(decoded)
|
|
567
|
+
} catch {
|
|
568
|
+
return undefined
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return typeof decoded === 'object' && decoded !== null && !Array.isArray(decoded)
|
|
572
|
+
? (decoded as Record<string, unknown>)
|
|
573
|
+
: undefined
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/** `type`/`status`, `code` and `param` of a `{ error: {...} }` body, only where it spells them. */
|
|
577
|
+
function bodyErrorFields(body: Record<string, unknown> | undefined): {
|
|
578
|
+
type?: unknown
|
|
579
|
+
code?: unknown
|
|
580
|
+
param?: unknown
|
|
581
|
+
} {
|
|
582
|
+
const inner =
|
|
583
|
+
body && typeof body.error === 'object' && body.error !== null
|
|
584
|
+
? (body.error as Record<string, unknown>)
|
|
585
|
+
: undefined
|
|
586
|
+
if (!inner) return {}
|
|
587
|
+
// Google names its type `status` ("PERMISSION_DENIED") and sends a numeric `code` that is the HTTP status.
|
|
588
|
+
return {
|
|
589
|
+
type: inner.type ?? (typeof inner.status === 'string' ? inner.status : undefined),
|
|
590
|
+
code: typeof inner.code === 'string' ? inner.code : undefined,
|
|
591
|
+
param: inner.param,
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
474
595
|
/**
|
|
475
596
|
* Build a classified error from a failed HTTP response.
|
|
476
597
|
*
|
|
@@ -482,11 +603,23 @@ export function providerHttpError(input: {
|
|
|
482
603
|
readonly status: number
|
|
483
604
|
readonly body?: string | null
|
|
484
605
|
readonly retryAfter?: string | null
|
|
606
|
+
/** The response's request ID header, when the driver read one. */
|
|
607
|
+
readonly requestId?: string | null
|
|
485
608
|
readonly now?: number
|
|
486
609
|
}): ProviderRequestError {
|
|
487
610
|
const kind = classifyProviderHttpStatus(input.status, input.body)
|
|
488
611
|
const retryAfterMs = parseRetryAfterMs(input.retryAfter, input.now ?? Date.now())
|
|
489
|
-
const
|
|
612
|
+
const body = parsedBody(input.body)
|
|
613
|
+
const bodyError = bodyErrorFields(body)
|
|
614
|
+
const detail = body
|
|
615
|
+
? structuredVendorDetail({
|
|
616
|
+
message: vendorDetail(input.body),
|
|
617
|
+
type: bodyError.type,
|
|
618
|
+
code: bodyError.code,
|
|
619
|
+
param: bodyError.param,
|
|
620
|
+
requestId: input.requestId,
|
|
621
|
+
})
|
|
622
|
+
: vendorDetail(input.body)
|
|
490
623
|
const exactProviderCode = providerCode(input.body)
|
|
491
624
|
return new ProviderRequestError({
|
|
492
625
|
kind,
|
|
@@ -157,6 +157,37 @@ export function findStrictSchemaViolations(schema: unknown, path = ''): StrictSc
|
|
|
157
157
|
})
|
|
158
158
|
continue
|
|
159
159
|
}
|
|
160
|
+
// Every branch of a union has to state its `type`.
|
|
161
|
+
//
|
|
162
|
+
// `anyOf` is in the subset but its BRANCHES are still schemas, and a
|
|
163
|
+
// branch that says only `{ const: 'end' }` says what value it admits
|
|
164
|
+
// without saying what kind of value it is. Measured on the Zen
|
|
165
|
+
// free-tier gateway, which enforces `strict` on every model that
|
|
166
|
+
// reaches it: the answer is `Invalid schema for function 'edit': In
|
|
167
|
+
// context=('properties', 'insertLine', 'anyOf', '1'), schema must have
|
|
168
|
+
// a 'type' key`, and it refuses the whole request — so the tool never
|
|
169
|
+
// mounts and the turn dies before a single token.
|
|
170
|
+
//
|
|
171
|
+
// This is the structural half the deny-list could not see: no keyword
|
|
172
|
+
// here is banned, only absent. Stating the type costs nothing, because
|
|
173
|
+
// `{ type: 'string', const: 'end' }` admits exactly the strings the
|
|
174
|
+
// bare form did.
|
|
175
|
+
if ((keyword === 'anyOf' || keyword === 'allOf') && Array.isArray(value)) {
|
|
176
|
+
for (const [index, branch] of value.entries()) {
|
|
177
|
+
if (
|
|
178
|
+
typeof branch !== 'object' ||
|
|
179
|
+
branch === null ||
|
|
180
|
+
Array.isArray(branch) ||
|
|
181
|
+
!('type' in branch)
|
|
182
|
+
) {
|
|
183
|
+
found.push({
|
|
184
|
+
path: `${here}[${index}]`,
|
|
185
|
+
keyword,
|
|
186
|
+
remedy: 'state a `type` on every branch of a union',
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
160
191
|
found.push(...findStrictSchemaViolations(value, here))
|
|
161
192
|
}
|
|
162
193
|
return found
|
|
@@ -180,3 +211,62 @@ export function assertStrictSchema(toolName: string, schema: unknown): void {
|
|
|
180
211
|
`Tool "${toolName}" is marked for strict input validation, but its model-facing schema uses ${violations.length} construct(s) the strict subset does not accept. The request would be rejected whole, taking every other tool in it down as well.\n${detail}`,
|
|
181
212
|
)
|
|
182
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Whether a wire enforcing `strict` would actually take this schema.
|
|
217
|
+
*
|
|
218
|
+
* Wider than {@link findStrictSchemaViolations}, and the difference is not
|
|
219
|
+
* redundancy. That function answers "can this schema be SAID in the strict
|
|
220
|
+
* dialect" — it denies keywords the dialect has no spelling for, and it is
|
|
221
|
+
* what registration checks, because a schema that fails it could never be
|
|
222
|
+
* sent anywhere. A schema can pass it and still be REFUSED by a wire that
|
|
223
|
+
* applies the dialect's structural rules on top, and the two questions have
|
|
224
|
+
* different owners: registration decides whether a tool may ask for the
|
|
225
|
+
* guarantee at all, a driver decides whether to claim it on THIS wire.
|
|
226
|
+
*
|
|
227
|
+
* The structural rule measured here: every object that declares `properties`
|
|
228
|
+
* must list all of them in `required`. The Zen free-tier gateway says so in
|
|
229
|
+
* as many words — `In context=('properties', 'edits', 'items'), 'required' is
|
|
230
|
+
* required to be supplied and to be an array including every key in
|
|
231
|
+
* properties` — and it refuses the WHOLE request, so one optional field in one
|
|
232
|
+
* tool takes every other tool in the call down with it.
|
|
233
|
+
*
|
|
234
|
+
* That is why a driver must ask rather than assume. Namzu's tool contracts are
|
|
235
|
+
* written with optional fields, on purpose: `edit` accepts a find-and-replace
|
|
236
|
+
* OR an insertion, and saying "either, never both" as `required` on a union
|
|
237
|
+
* would be a worse schema, not a stricter one. So the schema stays as it is
|
|
238
|
+
* and the driver stops vouching for a guarantee the wire cannot carry — the
|
|
239
|
+
* same call the Zen driver already makes for the Responses wire, and the one
|
|
240
|
+
* OpenCode makes for every tool on this gateway (`strict: false`).
|
|
241
|
+
*/
|
|
242
|
+
export function acceptsStrictSchema(schema: unknown): boolean {
|
|
243
|
+
// A missing schema cannot be vouched for. `findStrictSchemaViolations`
|
|
244
|
+
// walks nothing in `undefined` and finds nothing, so without this the
|
|
245
|
+
// predicate would answer `true` for a tool that declared no schema at all
|
|
246
|
+
// — and the driver would put `strict: true` on a wire whose `parameters`
|
|
247
|
+
// came from somewhere else entirely.
|
|
248
|
+
if (typeof schema !== 'object' || schema === null || Array.isArray(schema)) return false
|
|
249
|
+
if (findStrictSchemaViolations(schema).length > 0) return false
|
|
250
|
+
return !hasUngatedProperties(schema)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Whether any object declares `properties` without requiring all of them.
|
|
255
|
+
*/
|
|
256
|
+
function hasUngatedProperties(node: unknown): boolean {
|
|
257
|
+
if (Array.isArray(node)) return node.some((item) => hasUngatedProperties(item))
|
|
258
|
+
if (typeof node !== 'object' || node === null) return false
|
|
259
|
+
|
|
260
|
+
const record = node as Record<string, unknown>
|
|
261
|
+
const properties = record.properties
|
|
262
|
+
if (
|
|
263
|
+
typeof properties === 'object' &&
|
|
264
|
+
properties !== null &&
|
|
265
|
+
!Array.isArray(properties) &&
|
|
266
|
+
(!Array.isArray(record.required) ||
|
|
267
|
+
Object.keys(properties).some((key) => !(record.required as unknown[]).includes(key)))
|
|
268
|
+
)
|
|
269
|
+
return true
|
|
270
|
+
|
|
271
|
+
return Object.values(record).some((value) => hasUngatedProperties(value))
|
|
272
|
+
}
|
package/src/public-runtime.ts
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
// ─── version + config ────────────────────────────────────────────────────
|
|
12
12
|
|
|
13
13
|
export { VERSION } from './version.js'
|
|
14
|
+
export { createHarnessSession, HarnessSessionError } from './runtime/harness-session/index.js'
|
|
15
|
+
export { BackgroundJobOutputWaitLimitError } from './runtime/jobs/registry.js'
|
|
14
16
|
|
|
15
17
|
// The opt-in model-authored-code backend. `RunCodeToolOptions.runtime` has
|
|
16
18
|
// always accepted this contract; exporting the implementation and its refusal
|
|
@@ -266,6 +268,7 @@ export {
|
|
|
266
268
|
// Strict tool input is a SUBSET of JSON Schema, and a keyword outside it makes
|
|
267
269
|
// the vendor reject the whole request rather than degrade one field.
|
|
268
270
|
export {
|
|
271
|
+
acceptsStrictSchema,
|
|
269
272
|
assertStrictSchema,
|
|
270
273
|
findStrictSchemaViolations,
|
|
271
274
|
} from './provider/strict-schema.js'
|
|
@@ -355,7 +358,7 @@ export type {
|
|
|
355
358
|
// Closing a paused or interrupted turn without resuming it, and compacting a
|
|
356
359
|
// session between turns.
|
|
357
360
|
export { abandonTurn } from './runtime/query/abandon-turn.js'
|
|
358
|
-
export type { SessionLocatorOptions } from './runtime/query/abandon-turn.js'
|
|
361
|
+
export type { AbandonTurnOptions, SessionLocatorOptions } from './runtime/query/abandon-turn.js'
|
|
359
362
|
export { compactSession } from './runtime/query/compact-session.js'
|
|
360
363
|
export type { CompactSessionParams } from './runtime/query/compact-session.js'
|
|
361
364
|
export { prepareForkState } from './runtime/query/fork/prepare.js'
|
|
@@ -407,7 +410,10 @@ export { SESSION_MEMORY_TAG, createMemoryPromoter } from './turn/index.js'
|
|
|
407
410
|
export type { MemoryPromoterOptions } from './turn/index.js'
|
|
408
411
|
export { createMemoryRecallStep } from './turn/memory-recall.js'
|
|
409
412
|
export type { MemoryRecallOptions } from './turn/memory-recall.js'
|
|
410
|
-
export {
|
|
413
|
+
export {
|
|
414
|
+
createEvidenceRecallStep,
|
|
415
|
+
refineEvidenceRecallTerms,
|
|
416
|
+
} from './turn/evidence-recall.js'
|
|
411
417
|
export type {
|
|
412
418
|
EvidenceRecallOptions,
|
|
413
419
|
EvidenceRecallRequest,
|
|
@@ -563,7 +569,10 @@ export {
|
|
|
563
569
|
RegistryCollisionError,
|
|
564
570
|
ToolNameCollisionError,
|
|
565
571
|
} from './registry/index.js'
|
|
566
|
-
export type {
|
|
572
|
+
export type {
|
|
573
|
+
ManagedRegistryConfig,
|
|
574
|
+
RegistryCollisionPolicy,
|
|
575
|
+
} from './registry/index.js'
|
|
567
576
|
|
|
568
577
|
// Toolsets (plan.md v3 §1-2): the unit every tool comes from, and the
|
|
569
578
|
// runtime-owned resolver of them. `toolset()` builds a plain static one;
|
|
@@ -576,7 +585,10 @@ export type { ManagedRegistryConfig, RegistryCollisionPolicy } from './registry/
|
|
|
576
585
|
export { combineToolsets, ToolsetConflictError } from './toolsets/combine.js'
|
|
577
586
|
export { defineCapability, dynamicCapability } from './capabilities/index.js'
|
|
578
587
|
export { ToolManager } from './toolsets/manager.js'
|
|
579
|
-
export type {
|
|
588
|
+
export type {
|
|
589
|
+
ToolManagerConfig,
|
|
590
|
+
ToolsetChangeReport,
|
|
591
|
+
} from './toolsets/manager.js'
|
|
580
592
|
export { matchesSourceIdGlob } from './toolsets/source-glob.js'
|
|
581
593
|
export { toolset } from './toolsets/toolset.js'
|
|
582
594
|
export { toToolSourceRef } from './toolsets/types.js'
|
|
@@ -729,7 +741,10 @@ export {
|
|
|
729
741
|
SandboxProviderFactory,
|
|
730
742
|
walkFilesViaExec,
|
|
731
743
|
} from './sandbox/index.js'
|
|
732
|
-
export type {
|
|
744
|
+
export type {
|
|
745
|
+
LocalSandboxProviderOptions,
|
|
746
|
+
SandboxFileWalkExec,
|
|
747
|
+
} from './sandbox/index.js'
|
|
733
748
|
|
|
734
749
|
// The classified provider-failure surface: a driver states what went wrong
|
|
735
750
|
// first-hand, and the turn boundary reads it to choose between a pause and a
|
|
@@ -906,6 +921,7 @@ export type {
|
|
|
906
921
|
AcpServerOptions,
|
|
907
922
|
} from './bridge/acp/index.js'
|
|
908
923
|
export type {
|
|
924
|
+
AcpFileChangePreview,
|
|
909
925
|
AcpFsReadParams,
|
|
910
926
|
AcpFsReadResult,
|
|
911
927
|
AcpFsWriteParams,
|
|
@@ -986,7 +1002,10 @@ export {
|
|
|
986
1002
|
resolveScriptPrograms,
|
|
987
1003
|
unknownProgramInLine,
|
|
988
1004
|
} from './authorization/program.js'
|
|
989
|
-
export type {
|
|
1005
|
+
export type {
|
|
1006
|
+
CommandProgramPositions,
|
|
1007
|
+
ProgramPosition,
|
|
1008
|
+
} from './authorization/program.js'
|
|
990
1009
|
|
|
991
1010
|
// NZ-BOOT-03: the module-attributed invariant registry. `compaction.ts` and
|
|
992
1011
|
// `claim-disk.ts` register themselves against the shared `invariants`
|
|
@@ -1216,7 +1235,10 @@ export {
|
|
|
1216
1235
|
planWorkingSet,
|
|
1217
1236
|
scoreMessages,
|
|
1218
1237
|
} from './compaction/salience/index.js'
|
|
1219
|
-
export {
|
|
1238
|
+
export {
|
|
1239
|
+
DEFAULT_SOFT_TARGET,
|
|
1240
|
+
planSalienceWorkingSet,
|
|
1241
|
+
} from './compaction/plan.js'
|
|
1220
1242
|
export {
|
|
1221
1243
|
CONSOLIDATION_TAG,
|
|
1222
1244
|
consolidationEntry,
|
|
@@ -1442,7 +1464,10 @@ export {
|
|
|
1442
1464
|
} from './read-model/index.js'
|
|
1443
1465
|
|
|
1444
1466
|
// Asking a session what happened, including what compaction removed.
|
|
1445
|
-
export {
|
|
1467
|
+
export {
|
|
1468
|
+
SessionQuery,
|
|
1469
|
+
SessionTranscriptUnavailableError,
|
|
1470
|
+
} from './session-query/index.js'
|
|
1446
1471
|
|
|
1447
1472
|
// A host-scoped pseudo-terminal primitive, or a refusal that names the
|
|
1448
1473
|
// binding to install. It neither creates a sandbox nor owns a descendant
|
|
@@ -1515,9 +1540,15 @@ export type {
|
|
|
1515
1540
|
export type { JobProcess } from './runtime/jobs/registry.js'
|
|
1516
1541
|
export { WORKING_STATE_MIME } from './connector/mcp/adapter.js'
|
|
1517
1542
|
|
|
1518
|
-
export {
|
|
1543
|
+
export {
|
|
1544
|
+
snapshotRequestContext,
|
|
1545
|
+
diffRequestContext,
|
|
1546
|
+
} from './runtime/query/request-context.js'
|
|
1519
1547
|
|
|
1520
|
-
export {
|
|
1548
|
+
export {
|
|
1549
|
+
DiskResidentStore,
|
|
1550
|
+
ResidentConflictError,
|
|
1551
|
+
} from './manager/resident/store.js'
|
|
1521
1552
|
export { runResident, stepResident } from './manager/resident/loop.js'
|
|
1522
1553
|
export { DiskResidentAgenda } from './manager/resident/agenda.js'
|
|
1523
1554
|
export { inspectResidentConsumption } from './manager/resident/consumption.js'
|
|
@@ -1529,14 +1560,20 @@ export { validateResidentProposal } from './manager/resident/proposal.js'
|
|
|
1529
1560
|
export { deliverResidentMessage } from './manager/resident/outbox.js'
|
|
1530
1561
|
export { createResidentDeliveryWindow } from './manager/resident/delivery-window.js'
|
|
1531
1562
|
|
|
1532
|
-
export {
|
|
1563
|
+
export {
|
|
1564
|
+
hashResidentSkill,
|
|
1565
|
+
projectResidentLearning,
|
|
1566
|
+
} from './manager/resident/learning.js'
|
|
1533
1567
|
export { runResidentLearningCycle } from './manager/resident/learning-cycle.js'
|
|
1534
1568
|
|
|
1535
1569
|
export {
|
|
1536
1570
|
createSessionEvidenceSource,
|
|
1537
1571
|
createSessionTextEvidenceSource,
|
|
1538
1572
|
} from './store/evidence/disk.js'
|
|
1539
|
-
export {
|
|
1573
|
+
export {
|
|
1574
|
+
classifyEvidenceSource,
|
|
1575
|
+
EVIDENCE_RECORD_GUIDANCE,
|
|
1576
|
+
} from './store/evidence/source-kind.js'
|
|
1540
1577
|
export { createResidentToolEvidenceSource } from './manager/resident/tool-evidence.js'
|
|
1541
1578
|
|
|
1542
1579
|
export { createResidentEvidenceRecallStep } from './manager/resident/evidence-recall.js'
|
|
@@ -1689,3 +1726,72 @@ export {
|
|
|
1689
1726
|
udsPeerAddress,
|
|
1690
1727
|
writePeerRecord,
|
|
1691
1728
|
} from './peers/index.js'
|
|
1729
|
+
export { DiskPalStore, PalConflictError } from './pals/store.js'
|
|
1730
|
+
export { PalRuntime, PalUnavailableError } from './pals/runtime.js'
|
|
1731
|
+
export { buildPalSystemPrompt, palConversationGreeting } from './pals/prompt.js'
|
|
1732
|
+
export {
|
|
1733
|
+
preparePalReferenceImages,
|
|
1734
|
+
importPalReferenceImages,
|
|
1735
|
+
} from './pals/reference-images.js'
|
|
1736
|
+
|
|
1737
|
+
export { isInboundDeliveryRef } from './types/message/inbound-delivery.js'
|
|
1738
|
+
|
|
1739
|
+
export {
|
|
1740
|
+
DiskPalCommunicationStore,
|
|
1741
|
+
PalCommunicationConflictError,
|
|
1742
|
+
} from './pals/communication/store.js'
|
|
1743
|
+
export { PalMessageBroker } from './pals/communication/broker.js'
|
|
1744
|
+
export { PalOperatorMessageBroker } from './pals/communication/operator.js'
|
|
1745
|
+
export { createPalInboxSource } from './pals/communication/inbound.js'
|
|
1746
|
+
export { dispatchPalMessagesOnce } from './pals/communication/dispatch.js'
|
|
1747
|
+
export {
|
|
1748
|
+
DiskPalMessagePolicy,
|
|
1749
|
+
PalMessagePermissionConflictError,
|
|
1750
|
+
} from './pals/communication/policy.js'
|
|
1751
|
+
export {
|
|
1752
|
+
createPalActivitySource,
|
|
1753
|
+
PalActivityAccessDeniedError,
|
|
1754
|
+
PalActivityIntegrityError,
|
|
1755
|
+
PalActivityReadLimitError,
|
|
1756
|
+
} from './pals/activity/source.js'
|
|
1757
|
+
|
|
1758
|
+
export { PalIngressBlockedError } from './pals/communication/store.js'
|
|
1759
|
+
export {
|
|
1760
|
+
createPalIngressInboxSource,
|
|
1761
|
+
reconcilePalIngressDelivery,
|
|
1762
|
+
} from './pals/communication/ingress-inbound.js'
|
|
1763
|
+
export { dispatchPalIngressOnce } from './pals/communication/ingress-dispatch.js'
|
|
1764
|
+
export { verifyIngressRecorded } from './pals/communication/verify.js'
|
|
1765
|
+
export {
|
|
1766
|
+
PAL_OBSERVATION_NAMESPACE,
|
|
1767
|
+
PAL_CHANNEL_NAMESPACE,
|
|
1768
|
+
PAL_OPERATOR_NAMESPACE,
|
|
1769
|
+
ingressMessageRef,
|
|
1770
|
+
} from './pals/communication/ingress-types.js'
|
|
1771
|
+
export { DiskPalChannelRoutes, PalChannelRouteConflictError } from './pals/channels/routes.js'
|
|
1772
|
+
export { PalChannelIngress } from './pals/channels/ingress.js'
|
|
1773
|
+
export { PalChannelRouter } from './pals/channels/routing.js'
|
|
1774
|
+
export {
|
|
1775
|
+
DiskPalActivitySubscriptionStore,
|
|
1776
|
+
PalActivitySubscriptionConflictError,
|
|
1777
|
+
} from './pals/activity/subscription-store.js'
|
|
1778
|
+
export {
|
|
1779
|
+
DiskPalActivitySubscriptionPolicy,
|
|
1780
|
+
PalActivitySubscriptionPermissionConflictError,
|
|
1781
|
+
} from './pals/activity/subscription-policy.js'
|
|
1782
|
+
export {
|
|
1783
|
+
publishPalActivityOnce,
|
|
1784
|
+
PalActivitySubscriptionDeniedError,
|
|
1785
|
+
} from './pals/activity/subscriptions.js'
|
|
1786
|
+
export {
|
|
1787
|
+
createPalActivityCausalityResolver,
|
|
1788
|
+
PalActivityCausalityUnavailableError,
|
|
1789
|
+
} from './pals/activity/causality.js'
|
|
1790
|
+
|
|
1791
|
+
export {
|
|
1792
|
+
ingressIntentId,
|
|
1793
|
+
ingressIntentDigest,
|
|
1794
|
+
ingressRouteId,
|
|
1795
|
+
} from './pals/communication/ingress-schema.js'
|
|
1796
|
+
|
|
1797
|
+
export { ingressAuthorizationRequest } from './pals/communication/ingress-types.js'
|
package/src/public-tools.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// ─── Tool definition primitive ───────────────────────────────────────────
|
|
13
13
|
|
|
14
14
|
export { defineTool } from './tools/defineTool.js'
|
|
15
|
+
export { admitToolFacts } from './tools/admit-facts.js'
|
|
15
16
|
// Containment, for a host or sibling package that resolves caller-supplied
|
|
16
17
|
// paths against a root. Both were internal while three call sites outside
|
|
17
18
|
// this file needed them.
|
|
@@ -20,6 +21,7 @@ export {
|
|
|
20
21
|
isWithin,
|
|
21
22
|
pathOutsideRoots,
|
|
22
23
|
resolveWithin,
|
|
24
|
+
resolveWithinAnyReal,
|
|
23
25
|
resolveWithinReal,
|
|
24
26
|
toolRoots,
|
|
25
27
|
} from './tools/paths.js'
|
|
@@ -55,13 +57,15 @@ export {
|
|
|
55
57
|
findCommandShell,
|
|
56
58
|
findCommandShellForDialect,
|
|
57
59
|
hostCommandShell,
|
|
60
|
+
describeSpawnFailure,
|
|
58
61
|
hostShellSpawn,
|
|
59
62
|
installedCommandShellForDialect,
|
|
63
|
+
spawnHostShell,
|
|
60
64
|
withoutBashStartup,
|
|
61
65
|
} from './tools/command-shell.js'
|
|
62
66
|
export { ReadFileTool } from './tools/builtins/read-file.js'
|
|
63
67
|
export { WriteFileTool } from './tools/builtins/write-file.js'
|
|
64
|
-
export { EditTool } from './tools/builtins/edit.js'
|
|
68
|
+
export { EditTool, dryRunEdit } from './tools/builtins/edit.js'
|
|
65
69
|
export {
|
|
66
70
|
BashTool,
|
|
67
71
|
type ExecHostShellProgress,
|
|
@@ -133,6 +137,11 @@ export type { RunCodeToolOptions } from './tools/builtins/run-code.js'
|
|
|
133
137
|
export { LsTool } from './tools/builtins/ls.js'
|
|
134
138
|
export { SearchToolsTool } from './tools/builtins/search-tools.js'
|
|
135
139
|
export { VerifyOutputsTool } from './tools/builtins/verify-outputs.js'
|
|
140
|
+
export {
|
|
141
|
+
ViewImageTool,
|
|
142
|
+
createViewImageTool,
|
|
143
|
+
} from './tools/builtins/view-image.js'
|
|
144
|
+
export { createPalReferenceImageTool } from './pals/reference-images.js'
|
|
136
145
|
export {
|
|
137
146
|
createStructuredOutputTool,
|
|
138
147
|
STRUCTURED_OUTPUT_TOOL_NAME,
|
|
@@ -235,3 +244,6 @@ export {
|
|
|
235
244
|
} from './runtime/query/file-evidence-seed.js'
|
|
236
245
|
|
|
237
246
|
export { buildResidentToolEvidenceTools } from './tools/resident-tool-evidence.js'
|
|
247
|
+
|
|
248
|
+
export { createPalMessagingTools } from './pals/communication/tools.js'
|
|
249
|
+
export { createPalOperatorMessagingTools } from './pals/communication/operator.js'
|
package/src/public-types.ts
CHANGED
|
@@ -14,11 +14,24 @@
|
|
|
14
14
|
// ─── per-domain shape surfaces ────────────────────────────────────────────
|
|
15
15
|
|
|
16
16
|
export type * from './types/ids/index.js'
|
|
17
|
+
export type * from './types/harness/session.js'
|
|
18
|
+
export type * from './pals/types.js'
|
|
19
|
+
export type { PalConversationGreeting, PalSystemPromptOptions } from './pals/prompt.js'
|
|
20
|
+
export type {
|
|
21
|
+
PalReferenceImage,
|
|
22
|
+
PalReferenceImageImportReceipt,
|
|
23
|
+
PalReferenceImageImportOptions,
|
|
24
|
+
PalReferenceImageToolOptions,
|
|
25
|
+
} from './pals/reference-images.js'
|
|
26
|
+
export type { ViewImageToolOptions } from './tools/builtins/view-image.js'
|
|
17
27
|
export type * from './types/message/index.js'
|
|
28
|
+
export type * from './types/message/inbound-delivery.js'
|
|
18
29
|
export type * from './types/common/index.js'
|
|
30
|
+
export type { AcpPromptOptions, AcpTask, AcpTaskUpdate } from './types/acp/index.js'
|
|
19
31
|
export type { CoalesceOptions } from './streaming/coalesce.js'
|
|
20
32
|
export type * from './types/bidi/index.js'
|
|
21
33
|
export type * from './types/tool/index.js'
|
|
34
|
+
export type * from './types/job/index.js'
|
|
22
35
|
export type { WorkerCodeRuntimeOptions } from './execution/code-runtime/worker.js'
|
|
23
36
|
export type {
|
|
24
37
|
CodeRunOutcome,
|
|
@@ -80,7 +93,10 @@ export type * from './types/structured-output/index.js'
|
|
|
80
93
|
export type * from './types/invocation/index.js'
|
|
81
94
|
export type * from './types/computer-use/index.js'
|
|
82
95
|
export type * from './types/browser/index.js'
|
|
83
|
-
export type {
|
|
96
|
+
export type {
|
|
97
|
+
BrowserActToolInput,
|
|
98
|
+
BrowserToolInput,
|
|
99
|
+
} from './tools/builtins/browser.js'
|
|
84
100
|
export type {
|
|
85
101
|
BrowserOriginVerdict,
|
|
86
102
|
BrowserSitePatternVerdict,
|
|
@@ -270,7 +286,10 @@ export type {
|
|
|
270
286
|
ResolveExternalSessionOptions,
|
|
271
287
|
} from './bridge/external-session.js'
|
|
272
288
|
|
|
273
|
-
export type {
|
|
289
|
+
export type {
|
|
290
|
+
CheckpointRecords,
|
|
291
|
+
RecordedPark,
|
|
292
|
+
} from './runtime/query/checkpoint.js'
|
|
274
293
|
|
|
275
294
|
export type { TaskContextScope } from './store/task/context.js'
|
|
276
295
|
|
|
@@ -486,7 +505,11 @@ export type {
|
|
|
486
505
|
RequestContextChange,
|
|
487
506
|
} from './runtime/query/request-context.js'
|
|
488
507
|
|
|
489
|
-
export type {
|
|
508
|
+
export type {
|
|
509
|
+
ResidentDecision,
|
|
510
|
+
ResidentState,
|
|
511
|
+
ResidentStore,
|
|
512
|
+
} from './manager/resident/store.js'
|
|
490
513
|
export type {
|
|
491
514
|
ResidentActivityScope,
|
|
492
515
|
ResidentAdmission,
|
|
@@ -538,7 +561,10 @@ export type {
|
|
|
538
561
|
ResidentSelection,
|
|
539
562
|
ResidentSelector,
|
|
540
563
|
} from './manager/resident/initiative.js'
|
|
541
|
-
export type {
|
|
564
|
+
export type {
|
|
565
|
+
ResidentHostOptions,
|
|
566
|
+
ResidentObserver,
|
|
567
|
+
} from './manager/resident/host.js'
|
|
542
568
|
export type {
|
|
543
569
|
ResidentProposal,
|
|
544
570
|
ResidentProposalLimits,
|
|
@@ -558,7 +584,10 @@ export type {
|
|
|
558
584
|
} from './manager/resident/outbox.js'
|
|
559
585
|
export type { ResidentDeliveryWindowConfig } from './manager/resident/delivery-window.js'
|
|
560
586
|
|
|
561
|
-
export type {
|
|
587
|
+
export type {
|
|
588
|
+
ResidentStepContext,
|
|
589
|
+
ResidentContextualStep,
|
|
590
|
+
} from './manager/resident/host.js'
|
|
562
591
|
export type {
|
|
563
592
|
ResidentLearningEvidence,
|
|
564
593
|
ResidentSkillCandidate,
|
|
@@ -716,7 +745,10 @@ export type {
|
|
|
716
745
|
ResolvePeerRuntimeDirOptions,
|
|
717
746
|
} from './peers/dir.js'
|
|
718
747
|
export type { PeerRecord } from './peers/record.js'
|
|
719
|
-
export type {
|
|
748
|
+
export type {
|
|
749
|
+
ListLivePeersOptions,
|
|
750
|
+
PeerLivenessOptions,
|
|
751
|
+
} from './peers/registry.js'
|
|
720
752
|
export type {
|
|
721
753
|
DeliverRequest,
|
|
722
754
|
DeliverResponse,
|
|
@@ -735,6 +767,36 @@ export type {
|
|
|
735
767
|
SubscribeIdleRequest,
|
|
736
768
|
SubscribeIdleResponse,
|
|
737
769
|
} from './peers/protocol.js'
|
|
738
|
-
export type {
|
|
770
|
+
export type {
|
|
771
|
+
CreatePeerEndpointOptions,
|
|
772
|
+
PeerEndpoint,
|
|
773
|
+
} from './peers/endpoint.js'
|
|
739
774
|
export type { PeerClientOptions, PeerClientResult } from './peers/client.js'
|
|
740
775
|
export type { PeerMessageEnvelopeInput } from './peers/envelope.js'
|
|
776
|
+
|
|
777
|
+
export type * from './pals/communication/types.js'
|
|
778
|
+
export type { PalMessagingToolsOptions, PalMessagingRecipient } from './pals/communication/tools.js'
|
|
779
|
+
export type {
|
|
780
|
+
PalOperatorConversation,
|
|
781
|
+
PalOperatorMessageBrokerOptions,
|
|
782
|
+
PalOperatorMessageSender,
|
|
783
|
+
PalOperatorMessagingToolsOptions,
|
|
784
|
+
PalOperatorRecipient,
|
|
785
|
+
PalOperatorSendRequest,
|
|
786
|
+
} from './pals/communication/operator.js'
|
|
787
|
+
export type {
|
|
788
|
+
PalMessagePermission,
|
|
789
|
+
PalMessagePermissionUpdate,
|
|
790
|
+
} from './pals/communication/policy.js'
|
|
791
|
+
export type { PalLifecycleEvent, PalLifecycleListener } from './pals/lifecycle.js'
|
|
792
|
+
export type * from './pals/activity/types.js'
|
|
793
|
+
|
|
794
|
+
export type * from './pals/communication/ingress-types.js'
|
|
795
|
+
export type * from './pals/channels/types.js'
|
|
796
|
+
export type * from './pals/activity/subscription-types.js'
|
|
797
|
+
export type {
|
|
798
|
+
PalActivitySubscriptionPermission,
|
|
799
|
+
PalActivitySubscriptionPermissionUpdate,
|
|
800
|
+
} from './pals/activity/subscription-policy.js'
|
|
801
|
+
export type { PalActivitySubscriptionRunnerOptions } from './pals/activity/subscriptions.js'
|
|
802
|
+
export type { PalActivityCausalityOptions } from './pals/activity/causality.js'
|