@zvada/agent-server 0.3.18 → 0.3.19
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/AGENTS.md +11 -26
- package/CHANGELOG.md +1005 -1
- package/README.md +35 -39
- package/dist/types/accounts/chatgpt.d.ts +34 -0
- package/dist/types/accounts/chatgpt.d.ts.map +1 -0
- package/dist/types/accounts/check.d.ts +24 -0
- package/dist/types/accounts/check.d.ts.map +1 -0
- package/dist/types/accounts/claude.d.ts +21 -0
- package/dist/types/accounts/claude.d.ts.map +1 -0
- package/dist/types/accounts/endpoint.d.ts +50 -0
- package/dist/types/accounts/endpoint.d.ts.map +1 -0
- package/dist/types/accounts/http.d.ts +38 -0
- package/dist/types/accounts/http.d.ts.map +1 -0
- package/dist/types/accounts/index.d.ts +6 -0
- package/dist/types/accounts/index.d.ts.map +1 -0
- package/dist/types/client/client.d.ts +272 -0
- package/dist/types/client/client.d.ts.map +1 -0
- package/dist/types/client/connection.d.ts +160 -0
- package/dist/types/client/connection.d.ts.map +1 -0
- package/dist/types/client/history.d.ts +8 -0
- package/dist/types/client/history.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +5 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/listeners.d.ts +8 -0
- package/dist/types/client/listeners.d.ts.map +1 -0
- package/dist/types/client/logins.d.ts +35 -0
- package/dist/types/client/logins.d.ts.map +1 -0
- package/dist/types/client/rpc.d.ts +46 -0
- package/dist/types/client/rpc.d.ts.map +1 -0
- package/dist/types/client/streams.d.ts +150 -0
- package/dist/types/client/streams.d.ts.map +1 -0
- package/dist/types/client/transports.d.ts +35 -0
- package/dist/types/client/transports.d.ts.map +1 -0
- package/dist/types/client/turns.d.ts +81 -0
- package/dist/types/client/turns.d.ts.map +1 -0
- package/dist/types/core/agents/acp/acp-agent.d.ts +68 -0
- package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -0
- package/dist/types/core/agents/acp/adapter.d.ts +39 -0
- package/dist/types/core/agents/acp/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/acp/client.d.ts +90 -0
- package/dist/types/core/agents/acp/client.d.ts.map +1 -0
- package/dist/types/core/agents/acp/known-agents.d.ts +35 -0
- package/dist/types/core/agents/acp/known-agents.d.ts.map +1 -0
- package/dist/types/core/agents/acp/mappings.d.ts +46 -0
- package/dist/types/core/agents/acp/mappings.d.ts.map +1 -0
- package/dist/types/core/agents/acp/requests.d.ts +26 -0
- package/dist/types/core/agents/acp/requests.d.ts.map +1 -0
- package/dist/types/core/agents/attachments.d.ts +11 -0
- package/dist/types/core/agents/attachments.d.ts.map +1 -0
- package/dist/types/core/agents/base.d.ts +227 -0
- package/dist/types/core/agents/base.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/adapter.d.ts +58 -0
- package/dist/types/core/agents/claude-code/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/approvals.d.ts +26 -0
- package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/claude-agent.d.ts +70 -0
- package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/credentials.d.ts +54 -0
- package/dist/types/core/agents/claude-code/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/events.d.ts +42 -0
- package/dist/types/core/agents/claude-code/events.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/login.d.ts +61 -0
- package/dist/types/core/agents/claude-code/login.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/mcp.d.ts +52 -0
- package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/models.d.ts +30 -0
- package/dist/types/core/agents/claude-code/models.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/options.d.ts +183 -0
- package/dist/types/core/agents/claude-code/options.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/outcome.d.ts +50 -0
- package/dist/types/core/agents/claude-code/outcome.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/session-pool.d.ts +36 -0
- package/dist/types/core/agents/claude-code/session-pool.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/session.d.ts +148 -0
- package/dist/types/core/agents/claude-code/session.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/spawn.d.ts +29 -0
- package/dist/types/core/agents/claude-code/spawn.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/spend.d.ts +58 -0
- package/dist/types/core/agents/claude-code/spend.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/tools.d.ts +4 -0
- package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/turn-usage.d.ts +52 -0
- package/dist/types/core/agents/claude-code/turn-usage.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/turn.d.ts +121 -0
- package/dist/types/core/agents/claude-code/turn.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/adapter.d.ts +59 -0
- package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/client.d.ts +116 -0
- package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +113 -0
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/commands.d.ts +66 -0
- package/dist/types/core/agents/codex-app-server/commands.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/credentials.d.ts +49 -0
- package/dist/types/core/agents/codex-app-server/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/effort.d.ts +12 -0
- package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/events.d.ts +45 -0
- package/dist/types/core/agents/codex-app-server/events.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/homes.d.ts +20 -0
- package/dist/types/core/agents/codex-app-server/homes.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/input.d.ts +26 -0
- package/dist/types/core/agents/codex-app-server/input.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/items.d.ts +31 -0
- package/dist/types/core/agents/codex-app-server/items.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/login.d.ts +38 -0
- package/dist/types/core/agents/codex-app-server/login.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/mcp.d.ts +62 -0
- package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/models.d.ts +67 -0
- package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/options.d.ts +40 -0
- package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts +19 -0
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/protocol.d.ts +99 -0
- package/dist/types/core/agents/codex-app-server/protocol.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/requests.d.ts +42 -0
- package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/session.d.ts +96 -0
- package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/subagents.d.ts +53 -0
- package/dist/types/core/agents/codex-app-server/subagents.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts +87 -0
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts +33 -0
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/turn.d.ts +163 -0
- package/dist/types/core/agents/codex-app-server/turn.d.ts.map +1 -0
- package/dist/types/core/agents/config-fingerprint.d.ts +5 -0
- package/dist/types/core/agents/config-fingerprint.d.ts.map +1 -0
- package/dist/types/core/agents/credentials.d.ts +28 -0
- package/dist/types/core/agents/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/elicitation.d.ts +37 -0
- package/dist/types/core/agents/elicitation.d.ts.map +1 -0
- package/dist/types/core/agents/inherit-config.d.ts +18 -0
- package/dist/types/core/agents/inherit-config.d.ts.map +1 -0
- package/dist/types/core/agents/login.d.ts +67 -0
- package/dist/types/core/agents/login.d.ts.map +1 -0
- package/dist/types/core/agents/mcp-config.d.ts +57 -0
- package/dist/types/core/agents/mcp-config.d.ts.map +1 -0
- package/dist/types/core/agents/plan.d.ts +16 -0
- package/dist/types/core/agents/plan.d.ts.map +1 -0
- package/dist/types/core/agents/registry.d.ts +30 -0
- package/dist/types/core/agents/registry.d.ts.map +1 -0
- package/dist/types/core/agents/session-agent.d.ts +48 -0
- package/dist/types/core/agents/session-agent.d.ts.map +1 -0
- package/dist/types/core/agents/session-pool.d.ts +41 -0
- package/dist/types/core/agents/session-pool.d.ts.map +1 -0
- package/dist/types/core/agents/stderr-tail.d.ts +28 -0
- package/dist/types/core/agents/stderr-tail.d.ts.map +1 -0
- package/dist/types/core/agents/thinking-levels.d.ts +4 -0
- package/dist/types/core/agents/thinking-levels.d.ts.map +1 -0
- package/dist/types/core/agents/types.d.ts +124 -0
- package/dist/types/core/agents/types.d.ts.map +1 -0
- package/dist/types/core/diagnostics.d.ts +36 -0
- package/dist/types/core/diagnostics.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +29 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/presets.d.ts +80 -0
- package/dist/types/core/presets.d.ts.map +1 -0
- package/dist/types/core/processes/identity.d.ts +31 -0
- package/dist/types/core/processes/identity.d.ts.map +1 -0
- package/dist/types/core/processes/lifeline.d.ts +47 -0
- package/dist/types/core/processes/lifeline.d.ts.map +1 -0
- package/dist/types/core/processes/native-processes.d.ts +130 -0
- package/dist/types/core/processes/native-processes.d.ts.map +1 -0
- package/dist/types/core/processes/process-table.d.ts +43 -0
- package/dist/types/core/processes/process-table.d.ts.map +1 -0
- package/dist/types/core/provision/cache-trust.d.ts +13 -0
- package/dist/types/core/provision/cache-trust.d.ts.map +1 -0
- package/dist/types/core/provision/cache-usage.d.ts +14 -0
- package/dist/types/core/provision/cache-usage.d.ts.map +1 -0
- package/dist/types/core/provision/checksums.d.ts +46 -0
- package/dist/types/core/provision/checksums.d.ts.map +1 -0
- package/dist/types/core/provision/extract.d.ts +7 -0
- package/dist/types/core/provision/extract.d.ts.map +1 -0
- package/dist/types/core/provision/index.d.ts +5 -0
- package/dist/types/core/provision/index.d.ts.map +1 -0
- package/dist/types/core/provision/install-build.d.ts +36 -0
- package/dist/types/core/provision/install-build.d.ts.map +1 -0
- package/dist/types/core/provision/npm.d.ts +40 -0
- package/dist/types/core/provision/npm.d.ts.map +1 -0
- package/dist/types/core/provision/pins.d.ts +24 -0
- package/dist/types/core/provision/pins.d.ts.map +1 -0
- package/dist/types/core/provision/platform.d.ts +28 -0
- package/dist/types/core/provision/platform.d.ts.map +1 -0
- package/dist/types/core/provision/provisioner.d.ts +189 -0
- package/dist/types/core/provision/provisioner.d.ts.map +1 -0
- package/dist/types/core/provision/releases.d.ts +8 -0
- package/dist/types/core/provision/releases.d.ts.map +1 -0
- package/dist/types/core/provision/tools.d.ts +81 -0
- package/dist/types/core/provision/tools.d.ts.map +1 -0
- package/dist/types/core/proxy/anthropic-proxy.d.ts +52 -0
- package/dist/types/core/proxy/anthropic-proxy.d.ts.map +1 -0
- package/dist/types/core/proxy/api-key-store.d.ts +37 -0
- package/dist/types/core/proxy/api-key-store.d.ts.map +1 -0
- package/dist/types/core/proxy/index.d.ts +3 -0
- package/dist/types/core/proxy/index.d.ts.map +1 -0
- package/dist/types/core/proxy/loopback.d.ts +14 -0
- package/dist/types/core/proxy/loopback.d.ts.map +1 -0
- package/dist/types/core/runtime/agent-runtime.d.ts +181 -0
- package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -0
- package/dist/types/core/runtime/event-processor.d.ts +87 -0
- package/dist/types/core/runtime/event-processor.d.ts.map +1 -0
- package/dist/types/core/runtime/event-sink.d.ts +44 -0
- package/dist/types/core/runtime/event-sink.d.ts.map +1 -0
- package/dist/types/core/runtime/harness-clis.d.ts +10 -0
- package/dist/types/core/runtime/harness-clis.d.ts.map +1 -0
- package/dist/types/core/runtime/harness-logins.d.ts +68 -0
- package/dist/types/core/runtime/harness-logins.d.ts.map +1 -0
- package/dist/types/core/runtime/login-reads.d.ts +28 -0
- package/dist/types/core/runtime/login-reads.d.ts.map +1 -0
- package/dist/types/core/runtime/model-lists.d.ts +37 -0
- package/dist/types/core/runtime/model-lists.d.ts.map +1 -0
- package/dist/types/core/runtime/permission-policy.d.ts +61 -0
- package/dist/types/core/runtime/permission-policy.d.ts.map +1 -0
- package/dist/types/core/runtime/request-broker.d.ts +49 -0
- package/dist/types/core/runtime/request-broker.d.ts.map +1 -0
- package/dist/types/core/runtime/steering.d.ts +38 -0
- package/dist/types/core/runtime/steering.d.ts.map +1 -0
- package/dist/types/core/runtime/turn-outcome.d.ts +21 -0
- package/dist/types/core/runtime/turn-outcome.d.ts.map +1 -0
- package/dist/types/core/runtime/turn.d.ts +121 -0
- package/dist/types/core/runtime/turn.d.ts.map +1 -0
- package/dist/types/core/utils/bounded.d.ts +6 -0
- package/dist/types/core/utils/bounded.d.ts.map +1 -0
- package/dist/types/core/utils/deadline.d.ts +14 -0
- package/dist/types/core/utils/deadline.d.ts.map +1 -0
- package/dist/types/core/utils/errors.d.ts +104 -0
- package/dist/types/core/utils/errors.d.ts.map +1 -0
- package/dist/types/core/utils/is-record.d.ts +3 -0
- package/dist/types/core/utils/is-record.d.ts.map +1 -0
- package/dist/types/core/utils/loopback.d.ts +6 -0
- package/dist/types/core/utils/loopback.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/protocol/account.d.ts +26 -0
- package/dist/types/protocol/account.d.ts.map +1 -0
- package/dist/types/protocol/async-queue.d.ts +21 -0
- package/dist/types/protocol/async-queue.d.ts.map +1 -0
- package/dist/types/protocol/auth.d.ts +228 -0
- package/dist/types/protocol/auth.d.ts.map +1 -0
- package/dist/types/protocol/canonical.d.ts +9 -0
- package/dist/types/protocol/canonical.d.ts.map +1 -0
- package/dist/types/protocol/clis.d.ts +74 -0
- package/dist/types/protocol/clis.d.ts.map +1 -0
- package/dist/types/protocol/config.d.ts +200 -0
- package/dist/types/protocol/config.d.ts.map +1 -0
- package/dist/types/protocol/conversation.d.ts +942 -0
- package/dist/types/protocol/conversation.d.ts.map +1 -0
- package/dist/types/protocol/credentials.d.ts +145 -0
- package/dist/types/protocol/credentials.d.ts.map +1 -0
- package/dist/types/protocol/errors.d.ts +36 -0
- package/dist/types/protocol/errors.d.ts.map +1 -0
- package/dist/types/protocol/execution.d.ts +28 -0
- package/dist/types/protocol/execution.d.ts.map +1 -0
- package/dist/types/protocol/factories.d.ts +94 -0
- package/dist/types/protocol/factories.d.ts.map +1 -0
- package/dist/types/protocol/guards.d.ts +55 -0
- package/dist/types/protocol/guards.d.ts.map +1 -0
- package/dist/types/protocol/harness.d.ts +70 -0
- package/dist/types/protocol/harness.d.ts.map +1 -0
- package/dist/types/protocol/history.d.ts +318 -0
- package/dist/types/protocol/history.d.ts.map +1 -0
- package/dist/types/protocol/ids.d.ts +9 -0
- package/dist/types/protocol/ids.d.ts.map +1 -0
- package/dist/types/protocol/index.d.ts +35 -0
- package/dist/types/protocol/index.d.ts.map +1 -0
- package/dist/types/protocol/lifecycle.d.ts +1190 -0
- package/dist/types/protocol/lifecycle.d.ts.map +1 -0
- package/dist/types/protocol/meta-keys.d.ts +17 -0
- package/dist/types/protocol/meta-keys.d.ts.map +1 -0
- package/dist/types/protocol/meta.d.ts +13 -0
- package/dist/types/protocol/meta.d.ts.map +1 -0
- package/dist/types/protocol/model-catalog.d.ts +11 -0
- package/dist/types/protocol/model-catalog.d.ts.map +1 -0
- package/dist/types/protocol/models.d.ts +107 -0
- package/dist/types/protocol/models.d.ts.map +1 -0
- package/dist/types/protocol/part-input.d.ts +101 -0
- package/dist/types/protocol/part-input.d.ts.map +1 -0
- package/dist/types/protocol/parts.d.ts +357 -0
- package/dist/types/protocol/parts.d.ts.map +1 -0
- package/dist/types/protocol/reduce.d.ts +26 -0
- package/dist/types/protocol/reduce.d.ts.map +1 -0
- package/dist/types/protocol/selectors.d.ts +64 -0
- package/dist/types/protocol/selectors.d.ts.map +1 -0
- package/dist/types/protocol/seq-cursor.d.ts +66 -0
- package/dist/types/protocol/seq-cursor.d.ts.map +1 -0
- package/dist/types/protocol/stop-reasons.d.ts +33 -0
- package/dist/types/protocol/stop-reasons.d.ts.map +1 -0
- package/dist/types/protocol/thinking.d.ts +28 -0
- package/dist/types/protocol/thinking.d.ts.map +1 -0
- package/dist/types/protocol/time.d.ts +21 -0
- package/dist/types/protocol/time.d.ts.map +1 -0
- package/dist/types/protocol/tokens.d.ts +29 -0
- package/dist/types/protocol/tokens.d.ts.map +1 -0
- package/dist/types/protocol/tool-closure.d.ts +25 -0
- package/dist/types/protocol/tool-closure.d.ts.map +1 -0
- package/dist/types/protocol/tool-state.d.ts +209 -0
- package/dist/types/protocol/tool-state.d.ts.map +1 -0
- package/dist/types/protocol/verify.d.ts +52 -0
- package/dist/types/protocol/verify.d.ts.map +1 -0
- package/dist/types/protocol/vocabulary.d.ts +19 -0
- package/dist/types/protocol/vocabulary.d.ts.map +1 -0
- package/dist/types/protocol/wire-api.d.ts +1983 -0
- package/dist/types/protocol/wire-api.d.ts.map +1 -0
- package/dist/types/protocol/wire.d.ts +1758 -0
- package/dist/types/protocol/wire.d.ts.map +1 -0
- package/dist/types/server/acp/binding.d.ts +33 -0
- package/dist/types/server/acp/binding.d.ts.map +1 -0
- package/dist/types/server/acp/session-records.d.ts +17 -0
- package/dist/types/server/acp/session-records.d.ts.map +1 -0
- package/dist/types/server/acp/translate.d.ts +48 -0
- package/dist/types/server/acp/translate.d.ts.map +1 -0
- package/dist/types/server/agent-server.d.ts +121 -0
- package/dist/types/server/agent-server.d.ts.map +1 -0
- package/dist/types/server/feedback.d.ts +37 -0
- package/dist/types/server/feedback.d.ts.map +1 -0
- package/dist/types/server/history.d.ts +15 -0
- package/dist/types/server/history.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +7 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/install.d.ts +42 -0
- package/dist/types/server/install.d.ts.map +1 -0
- package/dist/types/server/open-parts.d.ts +27 -0
- package/dist/types/server/open-parts.d.ts.map +1 -0
- package/dist/types/server/routes.d.ts +61 -0
- package/dist/types/server/routes.d.ts.map +1 -0
- package/dist/types/server/secrets.d.ts +11 -0
- package/dist/types/server/secrets.d.ts.map +1 -0
- package/dist/types/server/session-gate.d.ts +32 -0
- package/dist/types/server/session-gate.d.ts.map +1 -0
- package/dist/types/server/session-log.d.ts +39 -0
- package/dist/types/server/session-log.d.ts.map +1 -0
- package/dist/types/server/session-store.d.ts +119 -0
- package/dist/types/server/session-store.d.ts.map +1 -0
- package/dist/types/server/subscriptions.d.ts +74 -0
- package/dist/types/server/subscriptions.d.ts.map +1 -0
- package/dist/types/server/transports.d.ts +74 -0
- package/dist/types/server/transports.d.ts.map +1 -0
- package/dist/types/server/wire-error.d.ts +9 -0
- package/dist/types/server/wire-error.d.ts.map +1 -0
- package/dist/types/sync/event-log.d.ts +45 -0
- package/dist/types/sync/event-log.d.ts.map +1 -0
- package/dist/types/sync/fit.d.ts +40 -0
- package/dist/types/sync/fit.d.ts.map +1 -0
- package/dist/types/sync/history-reader.d.ts +8 -0
- package/dist/types/sync/history-reader.d.ts.map +1 -0
- package/dist/types/sync/history-sqlite.d.ts +37 -0
- package/dist/types/sync/history-sqlite.d.ts.map +1 -0
- package/dist/types/sync/history.d.ts +70 -0
- package/dist/types/sync/history.d.ts.map +1 -0
- package/dist/types/sync/index.d.ts +4 -0
- package/dist/types/sync/index.d.ts.map +1 -0
- package/dist/types/sync/journal-sqlite.d.ts +51 -0
- package/dist/types/sync/journal-sqlite.d.ts.map +1 -0
- package/dist/types/sync/journal.d.ts +107 -0
- package/dist/types/sync/journal.d.ts.map +1 -0
- package/dist/types/sync/live-tails.d.ts +30 -0
- package/dist/types/sync/live-tails.d.ts.map +1 -0
- package/dist/types/sync/node-sqlite.d.ts +7 -0
- package/dist/types/sync/node-sqlite.d.ts.map +1 -0
- package/dist/types/sync/projection.d.ts +10 -0
- package/dist/types/sync/projection.d.ts.map +1 -0
- package/dist/types/sync/recovery.d.ts +25 -0
- package/dist/types/sync/recovery.d.ts.map +1 -0
- package/dist/types/sync/retry.d.ts +25 -0
- package/dist/types/sync/retry.d.ts.map +1 -0
- package/dist/types/sync/schema.d.ts +4 -0
- package/dist/types/sync/schema.d.ts.map +1 -0
- package/dist/types/sync/sql.d.ts +38 -0
- package/dist/types/sync/sql.d.ts.map +1 -0
- package/dist/types/sync/sqlite-file.d.ts +9 -0
- package/dist/types/sync/sqlite-file.d.ts.map +1 -0
- package/dist/types/sync/sqlite.d.ts +6 -0
- package/dist/types/sync/sqlite.d.ts.map +1 -0
- package/dist/types/sync/worker.d.ts +63 -0
- package/dist/types/sync/worker.d.ts.map +1 -0
- package/docs/consuming.md +452 -53
- package/docs/deploy.md +218 -47
- package/docs/{sync-experiment.md → durable-sessions.md} +77 -72
- package/docs/feedback.md +116 -0
- package/docs/harnesses.md +212 -88
- package/docs/sync-history.md +29 -13
- package/docs/sync-integration.md +52 -66
- package/package.json +43 -25
- package/src/accounts/chatgpt.ts +194 -0
- package/src/accounts/check.ts +112 -0
- package/src/accounts/claude.ts +111 -0
- package/src/accounts/endpoint.ts +151 -0
- package/src/accounts/http.ts +97 -0
- package/src/accounts/index.ts +19 -0
- package/src/client/client.ts +604 -670
- package/src/client/connection.ts +371 -0
- package/src/client/history.ts +29 -52
- package/src/client/index.ts +11 -2
- package/src/client/listeners.ts +20 -0
- package/src/client/logins.ts +105 -0
- package/src/client/rpc.ts +144 -0
- package/src/client/streams.ts +488 -0
- package/src/client/transports.ts +62 -8
- package/src/client/turns.ts +171 -0
- package/src/core/agents/acp/acp-agent.ts +94 -118
- package/src/core/agents/acp/adapter.ts +20 -9
- package/src/core/agents/acp/client.ts +125 -47
- package/src/core/agents/acp/known-agents.ts +36 -4
- package/src/core/agents/acp/mappings.ts +64 -18
- package/src/core/agents/acp/requests.ts +125 -0
- package/src/core/agents/attachments.ts +18 -0
- package/src/core/agents/base.ts +120 -42
- package/src/core/agents/claude-code/adapter.ts +177 -238
- package/src/core/agents/claude-code/approvals.ts +270 -0
- package/src/core/agents/claude-code/claude-agent.ts +175 -158
- package/src/core/agents/claude-code/credentials.ts +171 -0
- package/src/core/agents/claude-code/events.ts +55 -0
- package/src/core/agents/claude-code/login.ts +269 -0
- package/src/core/agents/claude-code/mcp.ts +206 -0
- package/src/core/agents/claude-code/models.ts +15 -9
- package/src/core/agents/claude-code/options.ts +326 -39
- package/src/core/agents/claude-code/outcome.ts +209 -0
- package/src/core/agents/claude-code/session-pool.ts +136 -0
- package/src/core/agents/claude-code/session.ts +513 -0
- package/src/core/agents/claude-code/spawn.ts +144 -0
- package/src/core/agents/claude-code/spend.ts +160 -0
- package/src/core/agents/claude-code/tools.ts +47 -0
- package/src/core/agents/claude-code/turn-usage.ts +135 -0
- package/src/core/agents/claude-code/turn.ts +232 -0
- package/src/core/agents/codex-app-server/adapter.ts +314 -117
- package/src/core/agents/codex-app-server/client.ts +186 -84
- package/src/core/agents/codex-app-server/codex-agent.ts +343 -0
- package/src/core/agents/codex-app-server/commands.ts +228 -0
- package/src/core/agents/codex-app-server/credentials.ts +126 -0
- package/src/core/agents/codex-app-server/effort.ts +29 -0
- package/src/core/agents/codex-app-server/events.ts +47 -0
- package/src/core/agents/codex-app-server/homes.ts +64 -0
- package/src/core/agents/codex-app-server/input.ts +60 -0
- package/src/core/agents/codex-app-server/items.ts +149 -0
- package/src/core/agents/codex-app-server/login.ts +180 -0
- package/src/core/agents/codex-app-server/mcp.ts +182 -37
- package/src/core/agents/codex-app-server/models.ts +99 -46
- package/src/core/agents/codex-app-server/options.ts +146 -0
- package/src/core/agents/codex-app-server/plan-approval.ts +135 -0
- package/src/core/agents/codex-app-server/protocol.ts +117 -0
- package/src/core/agents/codex-app-server/requests.ts +332 -0
- package/src/core/agents/codex-app-server/session.ts +285 -0
- package/src/core/agents/codex-app-server/subagents.ts +108 -42
- package/src/core/agents/codex-app-server/thread-settings.ts +279 -0
- package/src/core/agents/codex-app-server/turn-items.ts +88 -0
- package/src/core/agents/codex-app-server/turn.ts +463 -0
- package/src/core/agents/config-fingerprint.ts +7 -14
- package/src/core/agents/credentials.ts +98 -0
- package/src/core/agents/elicitation.ts +75 -0
- package/src/core/agents/inherit-config.ts +21 -0
- package/src/core/agents/login.ts +116 -0
- package/src/core/agents/mcp-config.ts +112 -8
- package/src/core/agents/plan.ts +25 -0
- package/src/core/agents/registry.ts +21 -4
- package/src/core/agents/session-agent.ts +96 -4
- package/src/core/agents/{session-store.ts → session-pool.ts} +11 -5
- package/src/core/agents/stderr-tail.ts +75 -0
- package/src/core/agents/types.ts +40 -5
- package/src/core/index.ts +58 -48
- package/src/core/presets.ts +100 -39
- package/src/core/processes/identity.ts +113 -0
- package/src/core/processes/lifeline.ts +170 -0
- package/src/core/processes/native-processes.ts +379 -0
- package/src/core/processes/process-table.ts +174 -0
- package/src/core/provision/cache-trust.ts +121 -0
- package/src/core/provision/cache-usage.ts +69 -0
- package/src/core/provision/checksums.ts +64 -0
- package/src/core/provision/extract.ts +11 -2
- package/src/core/provision/index.ts +4 -1
- package/src/core/provision/install-build.ts +136 -0
- package/src/core/provision/npm.ts +112 -17
- package/src/core/provision/pins.ts +9 -33
- package/src/core/provision/platform.ts +12 -1
- package/src/core/provision/provisioner.ts +329 -397
- package/src/core/provision/releases.ts +86 -0
- package/src/core/provision/tools.ts +329 -0
- package/src/core/proxy/anthropic-proxy.ts +55 -25
- package/src/core/proxy/api-key-store.ts +2 -12
- package/src/core/proxy/loopback.ts +106 -0
- package/src/core/runtime/agent-runtime.ts +327 -498
- package/src/core/runtime/event-processor.ts +197 -70
- package/src/core/runtime/harness-clis.ts +61 -0
- package/src/core/runtime/harness-logins.ts +328 -0
- package/src/core/runtime/login-reads.ts +78 -0
- package/src/core/runtime/model-lists.ts +33 -48
- package/src/core/runtime/permission-policy.ts +113 -0
- package/src/core/runtime/request-broker.ts +204 -0
- package/src/core/runtime/steering.ts +112 -0
- package/src/core/runtime/turn-outcome.ts +30 -0
- package/src/core/runtime/turn.ts +360 -0
- package/src/core/utils/bounded.ts +12 -0
- package/src/core/utils/deadline.ts +38 -0
- package/src/core/utils/errors.ts +113 -21
- package/src/core/utils/is-record.ts +4 -0
- package/src/core/utils/loopback.ts +10 -0
- package/src/protocol/account.ts +104 -0
- package/src/protocol/auth.ts +199 -0
- package/src/protocol/canonical.ts +16 -0
- package/src/protocol/clis.ts +69 -0
- package/src/protocol/config.ts +60 -6
- package/src/protocol/conversation.ts +272 -0
- package/src/protocol/credentials.ts +145 -0
- package/src/protocol/errors.ts +78 -20
- package/src/protocol/execution.ts +5 -2
- package/src/protocol/factories.ts +55 -7
- package/src/protocol/guards.ts +55 -2
- package/src/protocol/harness.ts +56 -6
- package/src/protocol/history.ts +72 -64
- package/src/protocol/ids.ts +0 -12
- package/src/protocol/index.ts +9 -0
- package/src/protocol/lifecycle.ts +250 -79
- package/src/protocol/meta-keys.ts +17 -0
- package/src/protocol/meta.ts +3 -3
- package/src/protocol/models.ts +2 -43
- package/src/protocol/part-input.ts +2 -1
- package/src/protocol/parts.ts +12 -3
- package/src/protocol/reduce.ts +302 -413
- package/src/protocol/selectors.ts +1 -20
- package/src/protocol/seq-cursor.ts +14 -0
- package/src/protocol/stop-reasons.ts +1 -1
- package/src/protocol/thinking.ts +1 -30
- package/src/protocol/time.ts +2 -2
- package/src/protocol/tool-closure.ts +93 -0
- package/src/protocol/tool-state.ts +19 -4
- package/src/protocol/verify.ts +222 -92
- package/src/protocol/vocabulary.ts +21 -5
- package/src/protocol/wire-api.ts +232 -0
- package/src/protocol/wire.ts +351 -64
- package/src/server/acp/binding.ts +63 -103
- package/src/server/acp/session-records.ts +53 -0
- package/src/server/acp/translate.ts +129 -20
- package/src/server/agent-server.ts +223 -387
- package/src/server/bin.ts +280 -78
- package/src/server/feedback.ts +204 -14
- package/src/server/history.ts +116 -122
- package/src/server/index.ts +3 -8
- package/src/server/install.ts +107 -8
- package/src/server/open-parts.ts +95 -0
- package/src/server/routes.ts +391 -0
- package/src/server/secrets.ts +24 -0
- package/src/server/session-gate.ts +69 -0
- package/src/server/session-log.ts +14 -2
- package/src/server/session-store.ts +136 -72
- package/src/server/subscriptions.ts +232 -0
- package/src/server/transports.ts +125 -25
- package/src/server/wire-error.ts +31 -45
- package/src/sync/event-log.ts +31 -3
- package/src/sync/fit.ts +27 -11
- package/src/sync/history-reader.ts +10 -5
- package/src/sync/history-sqlite.ts +37 -42
- package/src/sync/history.ts +9 -15
- package/src/sync/index.ts +17 -5
- package/src/sync/journal-sqlite.ts +162 -76
- package/src/sync/journal.ts +91 -32
- package/src/sync/live-tails.ts +107 -0
- package/src/sync/projection.ts +35 -0
- package/src/sync/recovery.ts +80 -51
- package/src/sync/schema.ts +27 -6
- package/docs/rfds/0001-deterministic-echo-ids.md +0 -44
- package/docs/rfds/0002-native-subagents.md +0 -197
- package/src/client/request.ts +0 -19
- package/src/core/agents/claude-code/generator-session.ts +0 -572
- package/src/core/agents/claude-code/session-manager.ts +0 -166
- package/src/core/agents/codex-app-server/codex-app-server-agent.ts +0 -962
- package/src/core/agents/codex-items.ts +0 -149
- package/src/core/agents/codex-sdk/adapter.ts +0 -237
- package/src/core/agents/codex-sdk/codex-sdk-agent.ts +0 -330
- package/src/core/agents/tool-meta.ts +0 -68
|
@@ -0,0 +1,1758 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type DecodedLifecycleEvent, type UnknownEvent } from "./lifecycle.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The standard wire: JSON-RPC 2.0 over a newline-delimited JSON
|
|
5
|
+
* stream (stdio, WebSocket, or any duplex byte channel). Requests flow
|
|
6
|
+
* client -> server only; the server pushes `event` notifications. Turns are
|
|
7
|
+
* quick-ack: `turn/start` acknowledges immediately and completion is observed
|
|
8
|
+
* via the `turn.ended` lifecycle event, mirroring the engine's event-driven
|
|
9
|
+
* model (and ACP v2's prompt lifecycle).
|
|
10
|
+
*
|
|
11
|
+
* Version 3: a `message.part.delta` is no longer sequenced. It carries the
|
|
12
|
+
* `seq` of the session's last kept event, and replay and history never return
|
|
13
|
+
* it (see `MessagePartDeltaEventSchema`).
|
|
14
|
+
*
|
|
15
|
+
* Version 4: one vocabulary — snake_case values (`in_session`), `history/read`,
|
|
16
|
+
* `unknownTurn`.
|
|
17
|
+
*
|
|
18
|
+
* Version 5: a connection receives the sessions it subscribes to
|
|
19
|
+
* (`session/subscribe`; `turn/start` subscribes its caller), and a frame the
|
|
20
|
+
* server does not keep says so (`live: true`): token deltas, and the open
|
|
21
|
+
* parts that follow a subscription. The engine no longer checkpoints a
|
|
22
|
+
* streaming part. A peer of another version is refused at `initialize`, never
|
|
23
|
+
* half served by values it cannot read.
|
|
24
|
+
*
|
|
25
|
+
* Version 6: a connection watches a session (`session/subscribe {sessionId}`)
|
|
26
|
+
* or follows one of its running turns (`turn/start`, `session/subscribe
|
|
27
|
+
* {sessionId, turnId}`), and a turn's subscription ends with the turn.
|
|
28
|
+
* `session/subscribe` takes no `afterSeq`: a client catches up with
|
|
29
|
+
* `events/replay`. Every session is `session/subscribeAll` and
|
|
30
|
+
* `session/unsubscribeAll`, each with its own answer, not `{all: true}`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const WIRE_PROTOCOL_VERSION = 6;
|
|
33
|
+
export declare const JsonRpcIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
34
|
+
export type JsonRpcId = z.infer<typeof JsonRpcIdSchema>;
|
|
35
|
+
export declare const JsonRpcErrorSchema: z.ZodObject<{
|
|
36
|
+
code: z.ZodNumber;
|
|
37
|
+
message: z.ZodString;
|
|
38
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type JsonRpcError = z.infer<typeof JsonRpcErrorSchema>;
|
|
41
|
+
/** JSON-RPC error codes used on this wire (standard + implementation range). */
|
|
42
|
+
export declare const WIRE_ERROR_CODES: {
|
|
43
|
+
readonly parseError: -32700;
|
|
44
|
+
readonly invalidRequest: -32600;
|
|
45
|
+
readonly methodNotFound: -32601;
|
|
46
|
+
readonly invalidParams: -32602;
|
|
47
|
+
readonly internalError: -32603;
|
|
48
|
+
/** `config.harness` is not registered/available in this server process. */
|
|
49
|
+
readonly harnessNotAvailable: -32000;
|
|
50
|
+
/** The sessionId is unknown to this server process (e.g. it restarted). */
|
|
51
|
+
readonly unknownSession: -32001;
|
|
52
|
+
/** The session already has an active turn — one turn per session at a time. */
|
|
53
|
+
readonly turnActive: -32002;
|
|
54
|
+
/** The server is shutting down and no longer accepts turns. */
|
|
55
|
+
readonly shuttingDown: -32003;
|
|
56
|
+
/** The peer requested a wire version this implementation cannot speak. */
|
|
57
|
+
readonly protocolVersionMismatch: -32004;
|
|
58
|
+
/** A session/close for this session is still in flight; retry after it settles. */
|
|
59
|
+
readonly sessionClosing: -32005;
|
|
60
|
+
/**
|
|
61
|
+
* A turn with this turnId already ran (or is running) with DIFFERENT input,
|
|
62
|
+
* or a steerId was reused with different input or in another turn.
|
|
63
|
+
*/
|
|
64
|
+
readonly turnConflict: -32006;
|
|
65
|
+
/** A durable session was closed; its id is not reused. */
|
|
66
|
+
readonly sessionClosed: -32007;
|
|
67
|
+
/**
|
|
68
|
+
* A server restart cut off the session's last turn and could not confirm
|
|
69
|
+
* its native process stopped (`data.reason`, a `RecoveryReason`). Check it
|
|
70
|
+
* stopped, then confirm (`session/confirmStopped` with `data.headSeq`)
|
|
71
|
+
* before starting another turn.
|
|
72
|
+
*/
|
|
73
|
+
readonly recoveryRequired: -32008;
|
|
74
|
+
/**
|
|
75
|
+
* This server process has not run the durable session yet: pass its
|
|
76
|
+
* `data.nativeSessionId` as `config.resumeSessionId`, or use a new session.
|
|
77
|
+
*/
|
|
78
|
+
readonly resumeRequired: -32009;
|
|
79
|
+
/** The host refused this caller the history operation. */
|
|
80
|
+
readonly notAuthorized: -32010;
|
|
81
|
+
/** No such history, or it does not hold the requested version. */
|
|
82
|
+
readonly unknownHistory: -32011;
|
|
83
|
+
/** The request contradicts committed history (payload, hash, expected head or commit id). */
|
|
84
|
+
readonly historyConflict: -32012;
|
|
85
|
+
/** The session is known, but no turn with this turnId was admitted to it. */
|
|
86
|
+
readonly unknownTurn: -32013;
|
|
87
|
+
/** The connection watches `maxSubscriptions` sessions already (`data.limit`): unsubscribe one first. */
|
|
88
|
+
readonly subscriptionLimit: -32014;
|
|
89
|
+
/** No login under way has this loginId: it ended, expired, was cancelled or never started. */
|
|
90
|
+
readonly unknownLogin: -32015;
|
|
91
|
+
};
|
|
92
|
+
export type WireErrorName = keyof typeof WIRE_ERROR_CODES;
|
|
93
|
+
/** Whether a name is one of `WIRE_ERROR_CODES`'. */
|
|
94
|
+
export declare function isWireErrorName(name: string): name is WireErrorName;
|
|
95
|
+
/** The name `WIRE_ERROR_CODES` gives an error response's code, if it is one of them. */
|
|
96
|
+
export declare function wireErrorName(code: number): WireErrorName | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* A refusal: a request this side will not carry out, answered with the wire
|
|
99
|
+
* error it names — as opposed to a fault, which answers `internalError`. The
|
|
100
|
+
* history port's and the journal's refusals are refusals of this kind, so a
|
|
101
|
+
* caller in-process and one over the wire see the same code.
|
|
102
|
+
*/
|
|
103
|
+
export declare class WireRefusal<Code extends WireErrorName = WireErrorName, Data = unknown> extends Error {
|
|
104
|
+
readonly code: Code;
|
|
105
|
+
/** What the caller needs to act on the refusal, e.g. the `headSeq` to confirm. */
|
|
106
|
+
readonly data?: Data | undefined;
|
|
107
|
+
readonly name: string;
|
|
108
|
+
constructor(code: Code, message: string,
|
|
109
|
+
/** What the caller needs to act on the refusal, e.g. the `headSeq` to confirm. */
|
|
110
|
+
data?: Data | undefined);
|
|
111
|
+
}
|
|
112
|
+
export declare const WIRE_METHODS: {
|
|
113
|
+
readonly initialize: "initialize";
|
|
114
|
+
readonly turnStart: "turn/start";
|
|
115
|
+
readonly turnCancel: "turn/cancel";
|
|
116
|
+
readonly turnSteer: "turn/steer";
|
|
117
|
+
readonly sessionClose: "session/close";
|
|
118
|
+
readonly permissionRespond: "permission/respond";
|
|
119
|
+
readonly elicitationRespond: "elicitation/respond";
|
|
120
|
+
readonly eventsReplay: "events/replay";
|
|
121
|
+
readonly modelsList: "models/list";
|
|
122
|
+
readonly clisList: "clis/list";
|
|
123
|
+
readonly clisPrepare: "clis/prepare";
|
|
124
|
+
readonly authStatus: "auth/status";
|
|
125
|
+
readonly authLogin: "auth/login";
|
|
126
|
+
readonly authComplete: "auth/complete";
|
|
127
|
+
readonly authCancel: "auth/cancel";
|
|
128
|
+
readonly authLogout: "auth/logout";
|
|
129
|
+
/** Durable servers only (`historyId` in `initialize`); others answer methodNotFound. */
|
|
130
|
+
readonly turnGet: "turn/get";
|
|
131
|
+
readonly sessionGet: "session/get";
|
|
132
|
+
readonly sessionConfirmStopped: "session/confirmStopped";
|
|
133
|
+
readonly sessionRelease: "session/release";
|
|
134
|
+
readonly sessionSubscribe: "session/subscribe";
|
|
135
|
+
readonly sessionUnsubscribe: "session/unsubscribe";
|
|
136
|
+
readonly sessionSubscribeAll: "session/subscribeAll";
|
|
137
|
+
readonly sessionUnsubscribeAll: "session/unsubscribeAll";
|
|
138
|
+
readonly shutdown: "shutdown";
|
|
139
|
+
/** Server -> client notification carrying one sequenced lifecycle event. */
|
|
140
|
+
readonly event: "event";
|
|
141
|
+
/** Server -> client notification: a subscription the server dropped because the connection fell behind. */
|
|
142
|
+
readonly sessionOverflow: "session/overflow";
|
|
143
|
+
/** Server -> client notification: a harness's CLI being installed. */
|
|
144
|
+
readonly clisProgress: "clis/progress";
|
|
145
|
+
/** Server -> client notification: a harness's login changed, or a login ended. */
|
|
146
|
+
readonly authUpdated: "auth/updated";
|
|
147
|
+
};
|
|
148
|
+
export declare const WireImplementationInfoSchema: z.ZodObject<{
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
version: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type WireImplementationInfo = z.infer<typeof WireImplementationInfoSchema>;
|
|
153
|
+
export declare const InitializeParamsSchema: z.ZodObject<{
|
|
154
|
+
protocolVersion: z.ZodNumber;
|
|
155
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
version: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type InitializeParams = z.infer<typeof InitializeParamsSchema>;
|
|
161
|
+
export declare const InitializeResultSchema: z.ZodObject<{
|
|
162
|
+
protocolVersion: z.ZodNumber;
|
|
163
|
+
server: z.ZodObject<{
|
|
164
|
+
name: z.ZodString;
|
|
165
|
+
version: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
instanceId: z.ZodString;
|
|
168
|
+
historyId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
harnesses: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
170
|
+
multiTurn: z.ZodBoolean;
|
|
171
|
+
sessionResume: z.ZodBoolean;
|
|
172
|
+
modelSwitch: z.ZodType<(string & {}) | "in_session" | "restart_session" | "unsupported", unknown, z.core.$ZodTypeInternals<(string & {}) | "in_session" | "restart_session" | "unsupported", unknown>>;
|
|
173
|
+
thinkingLevels: z.ZodBoolean;
|
|
174
|
+
images: z.ZodBoolean;
|
|
175
|
+
files: z.ZodArray<z.ZodType<(string & {}) | "text" | "pdf" | "binary", unknown, z.core.$ZodTypeInternals<(string & {}) | "text" | "pdf" | "binary", unknown>>>;
|
|
176
|
+
mcpServers: z.ZodBoolean;
|
|
177
|
+
permissionRequests: z.ZodBoolean;
|
|
178
|
+
rejectionMessages: z.ZodBoolean;
|
|
179
|
+
turnScopedSubagents: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
steering: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
export type InitializeResult = z.infer<typeof InitializeResultSchema>;
|
|
184
|
+
/**
|
|
185
|
+
* `turn/start` params are a RunRequest whose ids may be omitted — the server
|
|
186
|
+
* mints UUIDv7s for missing ones and echoes the effective ids in the ack.
|
|
187
|
+
* (The bundled client always mints ids itself so it can route events that
|
|
188
|
+
* arrive before the ack's promise continuation runs.)
|
|
189
|
+
*/
|
|
190
|
+
export declare const TurnStartParamsSchema: z.ZodObject<{
|
|
191
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
192
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
193
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
194
|
+
type: z.ZodLiteral<"text">;
|
|
195
|
+
id: z.ZodOptional<z.ZodString>;
|
|
196
|
+
text: z.ZodString;
|
|
197
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
+
byteRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
199
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"image">;
|
|
203
|
+
id: z.ZodOptional<z.ZodString>;
|
|
204
|
+
url: z.ZodOptional<z.ZodString>;
|
|
205
|
+
data: z.ZodOptional<z.ZodString>;
|
|
206
|
+
mimeType: z.ZodString;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
type: z.ZodLiteral<"file">;
|
|
209
|
+
id: z.ZodOptional<z.ZodString>;
|
|
210
|
+
url: z.ZodOptional<z.ZodString>;
|
|
211
|
+
data: z.ZodOptional<z.ZodString>;
|
|
212
|
+
mimeType: z.ZodString;
|
|
213
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>], "type">>]>;
|
|
215
|
+
config: z.ZodObject<{
|
|
216
|
+
harness: z.ZodEnum<{
|
|
217
|
+
"claude-code": "claude-code";
|
|
218
|
+
"codex-app-server": "codex-app-server";
|
|
219
|
+
acp: "acp";
|
|
220
|
+
}>;
|
|
221
|
+
model: z.ZodOptional<z.ZodString>;
|
|
222
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
off: "off";
|
|
224
|
+
low: "low";
|
|
225
|
+
medium: "medium";
|
|
226
|
+
high: "high";
|
|
227
|
+
xhigh: "xhigh";
|
|
228
|
+
max: "max";
|
|
229
|
+
ultra: "ultra";
|
|
230
|
+
}>>;
|
|
231
|
+
cwd: z.ZodString;
|
|
232
|
+
additionalDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
|
+
systemPromptAppend: z.ZodOptional<z.ZodString>;
|
|
234
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
subagentMode: z.ZodOptional<z.ZodLiteral<"turn">>;
|
|
236
|
+
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
default: "default";
|
|
238
|
+
plan: "plan";
|
|
239
|
+
accept_edits: "accept_edits";
|
|
240
|
+
dont_ask: "dont_ask";
|
|
241
|
+
bypass_permissions: "bypass_permissions";
|
|
242
|
+
}>>;
|
|
243
|
+
elicitation: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
246
|
+
resumeSessionAt: z.ZodOptional<z.ZodString>;
|
|
247
|
+
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
248
|
+
type: z.ZodLiteral<"stdio">;
|
|
249
|
+
command: z.ZodString;
|
|
250
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
252
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"http">;
|
|
255
|
+
url: z.ZodString;
|
|
256
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
257
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
type: z.ZodLiteral<"sse">;
|
|
260
|
+
url: z.ZodString;
|
|
261
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
262
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
}, z.core.$strip>], "type">>>;
|
|
264
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
265
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
266
|
+
disableTools: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
includeRaw: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
subscribe: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
export type TurnStartParams = z.infer<typeof TurnStartParamsSchema>;
|
|
272
|
+
/** Quick-ack: the turn is accepted and running; completion = `turn.ended`. */
|
|
273
|
+
export declare const TurnStartResultSchema: z.ZodObject<{
|
|
274
|
+
sessionId: z.ZodString;
|
|
275
|
+
turnId: z.ZodString;
|
|
276
|
+
deduplicated: z.ZodOptional<z.ZodBoolean>;
|
|
277
|
+
terminal: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
timestamp: z.ZodNumber;
|
|
279
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
280
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
282
|
+
model: z.ZodOptional<z.ZodString>;
|
|
283
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
284
|
+
off: "off";
|
|
285
|
+
low: "low";
|
|
286
|
+
medium: "medium";
|
|
287
|
+
high: "high";
|
|
288
|
+
xhigh: "xhigh";
|
|
289
|
+
max: "max";
|
|
290
|
+
ultra: "ultra";
|
|
291
|
+
}>>;
|
|
292
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
293
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
294
|
+
off: "off";
|
|
295
|
+
low: "low";
|
|
296
|
+
medium: "medium";
|
|
297
|
+
high: "high";
|
|
298
|
+
xhigh: "xhigh";
|
|
299
|
+
max: "max";
|
|
300
|
+
ultra: "ultra";
|
|
301
|
+
}>>;
|
|
302
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
|
|
305
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
306
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
input: z.ZodDefault<z.ZodNumber>;
|
|
308
|
+
output: z.ZodDefault<z.ZodNumber>;
|
|
309
|
+
reasoning: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
read: z.ZodDefault<z.ZodNumber>;
|
|
312
|
+
write: z.ZodDefault<z.ZodNumber>;
|
|
313
|
+
writeEphemeral5m: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
writeEphemeral1h: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
320
|
+
message: z.ZodString;
|
|
321
|
+
}, z.core.$strip>>;
|
|
322
|
+
undeliveredSteers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
|
+
sessionId: z.ZodString;
|
|
324
|
+
turnId: z.ZodString;
|
|
325
|
+
type: z.ZodLiteral<"turn.ended">;
|
|
326
|
+
}, z.core.$strip>>;
|
|
327
|
+
headSeq: z.ZodNumber;
|
|
328
|
+
startedSeq: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
}, z.core.$strip>;
|
|
330
|
+
export type TurnStartResult = z.infer<typeof TurnStartResultSchema>;
|
|
331
|
+
export declare const TurnCancelParamsSchema: z.ZodObject<{
|
|
332
|
+
sessionId: z.ZodString;
|
|
333
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
export type TurnCancelParams = z.infer<typeof TurnCancelParamsSchema>;
|
|
336
|
+
/**
|
|
337
|
+
* What a cancel did, as one outcome:
|
|
338
|
+
* - `cancelled` — the harness confirmed the interrupt.
|
|
339
|
+
* - `unconfirmed` — best-effort dispatched but unacknowledged; the agent
|
|
340
|
+
* process may still be running and the turn's `turn.ended` remains the
|
|
341
|
+
* source of truth.
|
|
342
|
+
* - `no_active_turn` — nothing to cancel: the session had no active turn, or
|
|
343
|
+
* `turnId` was given and a DIFFERENT turn is active (see `activeTurnId`).
|
|
344
|
+
*/
|
|
345
|
+
export declare const TurnCancelResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
346
|
+
outcome: z.ZodLiteral<"cancelled">;
|
|
347
|
+
turnId: z.ZodString;
|
|
348
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
349
|
+
outcome: z.ZodLiteral<"unconfirmed">;
|
|
350
|
+
turnId: z.ZodString;
|
|
351
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
352
|
+
outcome: z.ZodLiteral<"no_active_turn">;
|
|
353
|
+
activeTurnId: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, z.core.$strip>], "outcome">;
|
|
355
|
+
export type TurnCancelResult = z.infer<typeof TurnCancelResultSchema>;
|
|
356
|
+
/**
|
|
357
|
+
* More input for a running turn. `turnId` is required: a steer meant for one
|
|
358
|
+
* turn must never land in the next. `steerId` names the user message the steer
|
|
359
|
+
* becomes (`steerMessageId`), so it is unique in the session, as a turn id is;
|
|
360
|
+
* the server mints one when it is omitted. A retry with the same `steerId` and
|
|
361
|
+
* input converges instead of steering twice; reusing it otherwise is
|
|
362
|
+
* `turnConflict`.
|
|
363
|
+
*/
|
|
364
|
+
export declare const TurnSteerParamsSchema: z.ZodObject<{
|
|
365
|
+
sessionId: z.ZodString;
|
|
366
|
+
turnId: z.ZodString;
|
|
367
|
+
steerId: z.ZodOptional<z.ZodString>;
|
|
368
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
369
|
+
type: z.ZodLiteral<"text">;
|
|
370
|
+
id: z.ZodOptional<z.ZodString>;
|
|
371
|
+
text: z.ZodString;
|
|
372
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
|
+
byteRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
374
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strip>>>;
|
|
376
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
377
|
+
type: z.ZodLiteral<"image">;
|
|
378
|
+
id: z.ZodOptional<z.ZodString>;
|
|
379
|
+
url: z.ZodOptional<z.ZodString>;
|
|
380
|
+
data: z.ZodOptional<z.ZodString>;
|
|
381
|
+
mimeType: z.ZodString;
|
|
382
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
383
|
+
type: z.ZodLiteral<"file">;
|
|
384
|
+
id: z.ZodOptional<z.ZodString>;
|
|
385
|
+
url: z.ZodOptional<z.ZodString>;
|
|
386
|
+
data: z.ZodOptional<z.ZodString>;
|
|
387
|
+
mimeType: z.ZodString;
|
|
388
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
389
|
+
}, z.core.$strip>], "type">>]>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
export type TurnSteerParams = z.infer<typeof TurnSteerParamsSchema>;
|
|
392
|
+
/**
|
|
393
|
+
* What a steer did, as one outcome:
|
|
394
|
+
* - `steered` — accepted. It reaches the agent at its next step and
|
|
395
|
+
* appears as a user message in the turn, or, if the turn ends first, in
|
|
396
|
+
* the turn's `turn.ended.undeliveredSteers`.
|
|
397
|
+
* - `no_active_turn` — the turn is not taking input: it ended or is ending,
|
|
398
|
+
* or another turn is active (`activeTurnId`). Send it as a new turn.
|
|
399
|
+
* - `unsupported` — this harness cannot take input mid-turn
|
|
400
|
+
* (`AgentCapabilities.steering`).
|
|
401
|
+
*/
|
|
402
|
+
export declare const TurnSteerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
403
|
+
outcome: z.ZodLiteral<"steered">;
|
|
404
|
+
steerId: z.ZodString;
|
|
405
|
+
deduplicated: z.ZodOptional<z.ZodBoolean>;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
outcome: z.ZodLiteral<"no_active_turn">;
|
|
408
|
+
activeTurnId: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
410
|
+
outcome: z.ZodLiteral<"unsupported">;
|
|
411
|
+
}, z.core.$strip>], "outcome">;
|
|
412
|
+
export type TurnSteerResult = z.infer<typeof TurnSteerResultSchema>;
|
|
413
|
+
export declare const SessionCloseParamsSchema: z.ZodObject<{
|
|
414
|
+
sessionId: z.ZodString;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
export type SessionCloseParams = z.infer<typeof SessionCloseParamsSchema>;
|
|
417
|
+
/** `closed: false` means the server did not know the session (idempotent). */
|
|
418
|
+
export declare const SessionCloseResultSchema: z.ZodObject<{
|
|
419
|
+
closed: z.ZodBoolean;
|
|
420
|
+
}, z.core.$strip>;
|
|
421
|
+
export type SessionCloseResult = z.infer<typeof SessionCloseResultSchema>;
|
|
422
|
+
export declare const PermissionRespondParamsSchema: z.ZodObject<{
|
|
423
|
+
sessionId: z.ZodString;
|
|
424
|
+
requestId: z.ZodString;
|
|
425
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
426
|
+
outcome: z.ZodLiteral<"selected">;
|
|
427
|
+
optionId: z.ZodString;
|
|
428
|
+
updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
429
|
+
message: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
431
|
+
outcome: z.ZodLiteral<"cancelled">;
|
|
432
|
+
}, z.core.$strip>], "outcome">;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
export type PermissionRespondParams = z.infer<typeof PermissionRespondParamsSchema>;
|
|
435
|
+
/** `accepted: false` means the request was unknown or already resolved. */
|
|
436
|
+
export declare const PermissionRespondResultSchema: z.ZodObject<{
|
|
437
|
+
accepted: z.ZodBoolean;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
export type PermissionRespondResult = z.infer<typeof PermissionRespondResultSchema>;
|
|
440
|
+
export declare const ElicitationRespondParamsSchema: z.ZodObject<{
|
|
441
|
+
sessionId: z.ZodString;
|
|
442
|
+
requestId: z.ZodString;
|
|
443
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
444
|
+
action: z.ZodLiteral<"accept">;
|
|
445
|
+
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
action: z.ZodLiteral<"decline">;
|
|
448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
449
|
+
action: z.ZodLiteral<"cancel">;
|
|
450
|
+
}, z.core.$strip>], "action">;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
export type ElicitationRespondParams = z.infer<typeof ElicitationRespondParamsSchema>;
|
|
453
|
+
/** `accepted: false` means the request was unknown or already resolved. */
|
|
454
|
+
export declare const ElicitationRespondResultSchema: z.ZodObject<{
|
|
455
|
+
accepted: z.ZodBoolean;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
export type ElicitationRespondResult = z.infer<typeof ElicitationRespondResultSchema>;
|
|
458
|
+
/**
|
|
459
|
+
* One frame of a session as sent on the wire. `seq` is per-session,
|
|
460
|
+
* monotonic, and starts at 1. A frame the server does not keep says
|
|
461
|
+
* `live: true`: a token delta, or an open part sent after a subscription (a
|
|
462
|
+
* `message.part` carrying the part's content so far). It takes no seq of its
|
|
463
|
+
* own, carries that of the last kept event before it (fold it with
|
|
464
|
+
* `SeqCursor.advanceLive`; `isLiveEnvelope` tells), and replay and history
|
|
465
|
+
* never return it. The envelope duplicates `sessionId` so consumers can route
|
|
466
|
+
* without parsing the event body.
|
|
467
|
+
*/
|
|
468
|
+
export declare const WireEventEnvelopeSchema: z.ZodObject<{
|
|
469
|
+
sessionId: z.ZodString;
|
|
470
|
+
seq: z.ZodNumber;
|
|
471
|
+
live: z.ZodOptional<z.ZodLiteral<true>>;
|
|
472
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
473
|
+
timestamp: z.ZodNumber;
|
|
474
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
475
|
+
type: z.ZodLiteral<"session.created">;
|
|
476
|
+
sessionId: z.ZodString;
|
|
477
|
+
nativeSessionId: z.ZodString;
|
|
478
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
479
|
+
model: z.ZodOptional<z.ZodString>;
|
|
480
|
+
resumed: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
482
|
+
timestamp: z.ZodNumber;
|
|
483
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
484
|
+
type: z.ZodLiteral<"session.ended">;
|
|
485
|
+
sessionId: z.ZodString;
|
|
486
|
+
reason: z.ZodType<(string & {}) | "closed", unknown, z.core.$ZodTypeInternals<(string & {}) | "closed", unknown>>;
|
|
487
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
488
|
+
timestamp: z.ZodNumber;
|
|
489
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
490
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
491
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
492
|
+
model: z.ZodOptional<z.ZodString>;
|
|
493
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
494
|
+
off: "off";
|
|
495
|
+
low: "low";
|
|
496
|
+
medium: "medium";
|
|
497
|
+
high: "high";
|
|
498
|
+
xhigh: "xhigh";
|
|
499
|
+
max: "max";
|
|
500
|
+
ultra: "ultra";
|
|
501
|
+
}>>;
|
|
502
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
503
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
504
|
+
off: "off";
|
|
505
|
+
low: "low";
|
|
506
|
+
medium: "medium";
|
|
507
|
+
high: "high";
|
|
508
|
+
xhigh: "xhigh";
|
|
509
|
+
max: "max";
|
|
510
|
+
ultra: "ultra";
|
|
511
|
+
}>>;
|
|
512
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
sessionId: z.ZodString;
|
|
515
|
+
turnId: z.ZodString;
|
|
516
|
+
type: z.ZodLiteral<"turn.started">;
|
|
517
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
518
|
+
timestamp: z.ZodNumber;
|
|
519
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
520
|
+
messageId: z.ZodString;
|
|
521
|
+
outputIndex: z.ZodNumber;
|
|
522
|
+
role: z.ZodEnum<{
|
|
523
|
+
user: "user";
|
|
524
|
+
assistant: "assistant";
|
|
525
|
+
}>;
|
|
526
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
527
|
+
model: z.ZodOptional<z.ZodString>;
|
|
528
|
+
sessionId: z.ZodString;
|
|
529
|
+
turnId: z.ZodString;
|
|
530
|
+
type: z.ZodLiteral<"message.started">;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
timestamp: z.ZodNumber;
|
|
533
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
534
|
+
messageId: z.ZodString;
|
|
535
|
+
outputIndex: z.ZodNumber;
|
|
536
|
+
partIndex: z.ZodNumber;
|
|
537
|
+
part: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
538
|
+
id: z.ZodString;
|
|
539
|
+
sessionId: z.ZodString;
|
|
540
|
+
messageId: z.ZodString;
|
|
541
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
542
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
543
|
+
type: z.ZodLiteral<"text">;
|
|
544
|
+
text: z.ZodString;
|
|
545
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
546
|
+
done: "done";
|
|
547
|
+
streaming: "streaming";
|
|
548
|
+
}>>;
|
|
549
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
550
|
+
id: z.ZodString;
|
|
551
|
+
sessionId: z.ZodString;
|
|
552
|
+
messageId: z.ZodString;
|
|
553
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
554
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
555
|
+
type: z.ZodLiteral<"reasoning">;
|
|
556
|
+
text: z.ZodString;
|
|
557
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
558
|
+
done: "done";
|
|
559
|
+
streaming: "streaming";
|
|
560
|
+
}>>;
|
|
561
|
+
time: z.ZodOptional<z.ZodObject<{
|
|
562
|
+
start: z.ZodNumber;
|
|
563
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
}, z.core.$strip>>;
|
|
565
|
+
providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
id: z.ZodString;
|
|
568
|
+
sessionId: z.ZodString;
|
|
569
|
+
messageId: z.ZodString;
|
|
570
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
571
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
572
|
+
type: z.ZodLiteral<"tool">;
|
|
573
|
+
toolCallId: z.ZodString;
|
|
574
|
+
toolName: z.ZodString;
|
|
575
|
+
kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
|
|
576
|
+
title: z.ZodOptional<z.ZodString>;
|
|
577
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
578
|
+
path: z.ZodString;
|
|
579
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
}, z.core.$strip>>>;
|
|
581
|
+
subagent: z.ZodOptional<z.ZodObject<{
|
|
582
|
+
type: z.ZodOptional<z.ZodString>;
|
|
583
|
+
description: z.ZodOptional<z.ZodString>;
|
|
584
|
+
model: z.ZodOptional<z.ZodString>;
|
|
585
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
586
|
+
}, z.core.$strip>>;
|
|
587
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
588
|
+
status: z.ZodLiteral<"pending">;
|
|
589
|
+
partialInput: z.ZodString;
|
|
590
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
591
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
592
|
+
status: z.ZodLiteral<"in_progress">;
|
|
593
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
594
|
+
title: z.ZodOptional<z.ZodString>;
|
|
595
|
+
time: z.ZodObject<{
|
|
596
|
+
start: z.ZodNumber;
|
|
597
|
+
}, z.core.$strip>;
|
|
598
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
599
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
600
|
+
status: z.ZodLiteral<"completed">;
|
|
601
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
602
|
+
output: z.ZodString;
|
|
603
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
604
|
+
type: z.ZodLiteral<"text">;
|
|
605
|
+
text: z.ZodString;
|
|
606
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
607
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
608
|
+
type: z.ZodLiteral<"image">;
|
|
609
|
+
data: z.ZodString;
|
|
610
|
+
mimeType: z.ZodString;
|
|
611
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
612
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
613
|
+
type: z.ZodLiteral<"diff">;
|
|
614
|
+
path: z.ZodString;
|
|
615
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
616
|
+
newText: z.ZodString;
|
|
617
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
618
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
619
|
+
type: z.ZodLiteral<"terminal">;
|
|
620
|
+
terminalId: z.ZodString;
|
|
621
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
622
|
+
}, z.core.$strip>], "type">>>;
|
|
623
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
624
|
+
title: z.ZodOptional<z.ZodString>;
|
|
625
|
+
time: z.ZodObject<{
|
|
626
|
+
start: z.ZodNumber;
|
|
627
|
+
end: z.ZodNumber;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
630
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
631
|
+
status: z.ZodLiteral<"failed">;
|
|
632
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
633
|
+
error: z.ZodString;
|
|
634
|
+
closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
|
|
635
|
+
time: z.ZodObject<{
|
|
636
|
+
start: z.ZodNumber;
|
|
637
|
+
end: z.ZodNumber;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
640
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
641
|
+
status: z.ZodLiteral<"cancelled">;
|
|
642
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
643
|
+
time: z.ZodObject<{
|
|
644
|
+
start: z.ZodNumber;
|
|
645
|
+
end: z.ZodNumber;
|
|
646
|
+
}, z.core.$strip>;
|
|
647
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
648
|
+
}, z.core.$strip>], "status">;
|
|
649
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
650
|
+
id: z.ZodString;
|
|
651
|
+
sessionId: z.ZodString;
|
|
652
|
+
messageId: z.ZodString;
|
|
653
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
654
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
655
|
+
type: z.ZodLiteral<"subagent">;
|
|
656
|
+
nativeActivityId: z.ZodString;
|
|
657
|
+
nativeThreadId: z.ZodString;
|
|
658
|
+
path: z.ZodOptional<z.ZodString>;
|
|
659
|
+
activity: z.ZodEnum<{
|
|
660
|
+
interrupted: "interrupted";
|
|
661
|
+
completed: "completed";
|
|
662
|
+
started: "started";
|
|
663
|
+
interacted: "interacted";
|
|
664
|
+
}>;
|
|
665
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
666
|
+
id: z.ZodString;
|
|
667
|
+
sessionId: z.ZodString;
|
|
668
|
+
messageId: z.ZodString;
|
|
669
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
670
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
671
|
+
type: z.ZodLiteral<"image">;
|
|
672
|
+
data: z.ZodOptional<z.ZodString>;
|
|
673
|
+
url: z.ZodOptional<z.ZodString>;
|
|
674
|
+
mimeType: z.ZodString;
|
|
675
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
676
|
+
id: z.ZodString;
|
|
677
|
+
sessionId: z.ZodString;
|
|
678
|
+
messageId: z.ZodString;
|
|
679
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
680
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
681
|
+
type: z.ZodLiteral<"file">;
|
|
682
|
+
data: z.ZodOptional<z.ZodString>;
|
|
683
|
+
url: z.ZodOptional<z.ZodString>;
|
|
684
|
+
mimeType: z.ZodString;
|
|
685
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
686
|
+
}, z.core.$strip>], "type">;
|
|
687
|
+
sessionId: z.ZodString;
|
|
688
|
+
turnId: z.ZodString;
|
|
689
|
+
type: z.ZodLiteral<"message.part">;
|
|
690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
691
|
+
timestamp: z.ZodNumber;
|
|
692
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
693
|
+
messageId: z.ZodString;
|
|
694
|
+
outputIndex: z.ZodNumber;
|
|
695
|
+
partIndex: z.ZodNumber;
|
|
696
|
+
partId: z.ZodString;
|
|
697
|
+
delta: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
698
|
+
type: z.ZodLiteral<"text">;
|
|
699
|
+
text: z.ZodString;
|
|
700
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
701
|
+
type: z.ZodLiteral<"reasoning">;
|
|
702
|
+
text: z.ZodString;
|
|
703
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
704
|
+
type: z.ZodLiteral<"tool_input">;
|
|
705
|
+
toolCallId: z.ZodString;
|
|
706
|
+
toolName: z.ZodString;
|
|
707
|
+
input: z.ZodString;
|
|
708
|
+
}, z.core.$strip>], "type">;
|
|
709
|
+
sessionId: z.ZodString;
|
|
710
|
+
turnId: z.ZodString;
|
|
711
|
+
type: z.ZodLiteral<"message.part.delta">;
|
|
712
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
713
|
+
timestamp: z.ZodNumber;
|
|
714
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
715
|
+
messageId: z.ZodString;
|
|
716
|
+
sessionId: z.ZodString;
|
|
717
|
+
turnId: z.ZodString;
|
|
718
|
+
type: z.ZodLiteral<"message.ended">;
|
|
719
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
720
|
+
timestamp: z.ZodNumber;
|
|
721
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
722
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
723
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
724
|
+
model: z.ZodOptional<z.ZodString>;
|
|
725
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
726
|
+
off: "off";
|
|
727
|
+
low: "low";
|
|
728
|
+
medium: "medium";
|
|
729
|
+
high: "high";
|
|
730
|
+
xhigh: "xhigh";
|
|
731
|
+
max: "max";
|
|
732
|
+
ultra: "ultra";
|
|
733
|
+
}>>;
|
|
734
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
735
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
736
|
+
off: "off";
|
|
737
|
+
low: "low";
|
|
738
|
+
medium: "medium";
|
|
739
|
+
high: "high";
|
|
740
|
+
xhigh: "xhigh";
|
|
741
|
+
max: "max";
|
|
742
|
+
ultra: "ultra";
|
|
743
|
+
}>>;
|
|
744
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
745
|
+
}, z.core.$strip>>;
|
|
746
|
+
stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
|
|
747
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
748
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
749
|
+
input: z.ZodDefault<z.ZodNumber>;
|
|
750
|
+
output: z.ZodDefault<z.ZodNumber>;
|
|
751
|
+
reasoning: z.ZodOptional<z.ZodNumber>;
|
|
752
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
753
|
+
read: z.ZodDefault<z.ZodNumber>;
|
|
754
|
+
write: z.ZodDefault<z.ZodNumber>;
|
|
755
|
+
writeEphemeral5m: z.ZodOptional<z.ZodNumber>;
|
|
756
|
+
writeEphemeral1h: z.ZodOptional<z.ZodNumber>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
}, z.core.$strip>>;
|
|
759
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
760
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
761
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
762
|
+
message: z.ZodString;
|
|
763
|
+
}, z.core.$strip>>;
|
|
764
|
+
undeliveredSteers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
765
|
+
sessionId: z.ZodString;
|
|
766
|
+
turnId: z.ZodString;
|
|
767
|
+
type: z.ZodLiteral<"turn.ended">;
|
|
768
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
769
|
+
timestamp: z.ZodNumber;
|
|
770
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
771
|
+
used: z.ZodNumber;
|
|
772
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
773
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
774
|
+
sessionId: z.ZodString;
|
|
775
|
+
turnId: z.ZodString;
|
|
776
|
+
type: z.ZodLiteral<"session.usage">;
|
|
777
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
778
|
+
timestamp: z.ZodNumber;
|
|
779
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
780
|
+
status: z.ZodOptional<z.ZodType<(string & {}) | "ok" | "warning" | "limited", unknown, z.core.$ZodTypeInternals<(string & {}) | "ok" | "warning" | "limited", unknown>>>;
|
|
781
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
782
|
+
id: z.ZodString;
|
|
783
|
+
usedPercent: z.ZodOptional<z.ZodNumber>;
|
|
784
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
windowMinutes: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
status: z.ZodOptional<z.ZodType<(string & {}) | "ok" | "warning" | "limited", unknown, z.core.$ZodTypeInternals<(string & {}) | "ok" | "warning" | "limited", unknown>>>;
|
|
787
|
+
}, z.core.$strip>>;
|
|
788
|
+
planType: z.ZodOptional<z.ZodString>;
|
|
789
|
+
sessionId: z.ZodString;
|
|
790
|
+
turnId: z.ZodString;
|
|
791
|
+
type: z.ZodLiteral<"session.limits">;
|
|
792
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
793
|
+
timestamp: z.ZodNumber;
|
|
794
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
795
|
+
permissionMode: z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>;
|
|
796
|
+
sessionId: z.ZodString;
|
|
797
|
+
turnId: z.ZodString;
|
|
798
|
+
type: z.ZodLiteral<"session.mode">;
|
|
799
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
800
|
+
timestamp: z.ZodNumber;
|
|
801
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
802
|
+
compactionId: z.ZodString;
|
|
803
|
+
status: z.ZodType<(string & {}) | "cancelled" | "in_progress" | "completed" | "failed", unknown, z.core.$ZodTypeInternals<(string & {}) | "cancelled" | "in_progress" | "completed" | "failed", unknown>>;
|
|
804
|
+
trigger: z.ZodOptional<z.ZodType<(string & {}) | "auto" | "manual", unknown, z.core.$ZodTypeInternals<(string & {}) | "auto" | "manual", unknown>>>;
|
|
805
|
+
preTokens: z.ZodOptional<z.ZodNumber>;
|
|
806
|
+
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
807
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
808
|
+
abstractsIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
809
|
+
sessionId: z.ZodString;
|
|
810
|
+
turnId: z.ZodString;
|
|
811
|
+
type: z.ZodLiteral<"session.compaction">;
|
|
812
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
813
|
+
timestamp: z.ZodNumber;
|
|
814
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
815
|
+
type: z.ZodLiteral<"error">;
|
|
816
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
817
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
818
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
819
|
+
message: z.ZodString;
|
|
820
|
+
recoverable: z.ZodBoolean;
|
|
821
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
822
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
823
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
824
|
+
delayMs: z.ZodOptional<z.ZodNumber>;
|
|
825
|
+
}, z.core.$strip>>;
|
|
826
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
827
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
828
|
+
timestamp: z.ZodNumber;
|
|
829
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
830
|
+
requestId: z.ZodString;
|
|
831
|
+
title: z.ZodString;
|
|
832
|
+
toolCall: z.ZodOptional<z.ZodObject<{
|
|
833
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
834
|
+
toolName: z.ZodString;
|
|
835
|
+
kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
|
|
836
|
+
title: z.ZodOptional<z.ZodString>;
|
|
837
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
838
|
+
path: z.ZodString;
|
|
839
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
840
|
+
}, z.core.$strip>>>;
|
|
841
|
+
rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
842
|
+
}, z.core.$strip>>;
|
|
843
|
+
options: z.ZodArray<z.ZodObject<{
|
|
844
|
+
optionId: z.ZodString;
|
|
845
|
+
name: z.ZodString;
|
|
846
|
+
kind: z.ZodType<(string & {}) | "allow_once" | "allow_always" | "reject_once" | "reject_always", unknown, z.core.$ZodTypeInternals<(string & {}) | "allow_once" | "allow_always" | "reject_once" | "reject_always", unknown>>;
|
|
847
|
+
}, z.core.$strip>>;
|
|
848
|
+
sessionId: z.ZodString;
|
|
849
|
+
turnId: z.ZodString;
|
|
850
|
+
type: z.ZodLiteral<"permission.requested">;
|
|
851
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
852
|
+
timestamp: z.ZodNumber;
|
|
853
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
854
|
+
requestId: z.ZodString;
|
|
855
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
856
|
+
outcome: z.ZodLiteral<"selected">;
|
|
857
|
+
optionId: z.ZodString;
|
|
858
|
+
updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
859
|
+
message: z.ZodOptional<z.ZodString>;
|
|
860
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
861
|
+
outcome: z.ZodLiteral<"cancelled">;
|
|
862
|
+
}, z.core.$strip>], "outcome">;
|
|
863
|
+
sessionId: z.ZodString;
|
|
864
|
+
turnId: z.ZodString;
|
|
865
|
+
type: z.ZodLiteral<"permission.resolved">;
|
|
866
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
867
|
+
timestamp: z.ZodNumber;
|
|
868
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
869
|
+
requestId: z.ZodString;
|
|
870
|
+
mode: z.ZodType<(string & {}) | "url" | "question" | "form", unknown, z.core.$ZodTypeInternals<(string & {}) | "url" | "question" | "form", unknown>>;
|
|
871
|
+
message: z.ZodString;
|
|
872
|
+
serverName: z.ZodOptional<z.ZodString>;
|
|
873
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
874
|
+
questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
875
|
+
id: z.ZodString;
|
|
876
|
+
question: z.ZodString;
|
|
877
|
+
header: z.ZodOptional<z.ZodString>;
|
|
878
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
879
|
+
label: z.ZodString;
|
|
880
|
+
description: z.ZodOptional<z.ZodString>;
|
|
881
|
+
}, z.core.$strip>>>;
|
|
882
|
+
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
883
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
884
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
885
|
+
}, z.core.$strip>>>;
|
|
886
|
+
requestedSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
887
|
+
url: z.ZodOptional<z.ZodString>;
|
|
888
|
+
elicitationId: z.ZodOptional<z.ZodString>;
|
|
889
|
+
sessionId: z.ZodString;
|
|
890
|
+
turnId: z.ZodString;
|
|
891
|
+
type: z.ZodLiteral<"elicitation.requested">;
|
|
892
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
893
|
+
timestamp: z.ZodNumber;
|
|
894
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
895
|
+
requestId: z.ZodString;
|
|
896
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
897
|
+
action: z.ZodLiteral<"accept">;
|
|
898
|
+
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
899
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
900
|
+
action: z.ZodLiteral<"decline">;
|
|
901
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
902
|
+
action: z.ZodLiteral<"cancel">;
|
|
903
|
+
}, z.core.$strip>], "action">;
|
|
904
|
+
sessionId: z.ZodString;
|
|
905
|
+
turnId: z.ZodString;
|
|
906
|
+
type: z.ZodLiteral<"elicitation.resolved">;
|
|
907
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
908
|
+
timestamp: z.ZodNumber;
|
|
909
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
910
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
911
|
+
data: z.ZodUnknown;
|
|
912
|
+
sessionId: z.ZodString;
|
|
913
|
+
turnId: z.ZodString;
|
|
914
|
+
type: z.ZodLiteral<"raw">;
|
|
915
|
+
}, z.core.$strip>], "type">;
|
|
916
|
+
}, z.core.$strip>;
|
|
917
|
+
export type WireEventEnvelope = z.infer<typeof WireEventEnvelopeSchema>;
|
|
918
|
+
/** An envelope whose event was decoded tolerantly (unknowns preserved). */
|
|
919
|
+
export interface DecodedWireEventEnvelope extends Omit<WireEventEnvelope, "event"> {
|
|
920
|
+
event: DecodedLifecycleEvent | UnknownEvent;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Decode one `event` notification: envelope strict, event lenient. A consumer
|
|
924
|
+
* that instead drops an unknown event type does not degrade gracefully — it
|
|
925
|
+
* leaves a hole where a `seq` was, and every seq-tracking client then reads
|
|
926
|
+
* the next event as an unfillable gap.
|
|
927
|
+
*/
|
|
928
|
+
export declare function decodeWireEventEnvelope(value: unknown): DecodedWireEventEnvelope;
|
|
929
|
+
export declare const EventsReplayParamsSchema: z.ZodObject<{
|
|
930
|
+
sessionId: z.ZodString;
|
|
931
|
+
fromSeq: z.ZodNumber;
|
|
932
|
+
}, z.core.$strip>;
|
|
933
|
+
export type EventsReplayParams = z.infer<typeof EventsReplayParamsSchema>;
|
|
934
|
+
/**
|
|
935
|
+
* Replay is served from a bounded per-session ring buffer. When
|
|
936
|
+
* `firstAvailableSeq > fromSeq`, the requested prefix was evicted and the gap
|
|
937
|
+
* is unfillable — the consumer must treat its local view as stale. A durable
|
|
938
|
+
* server keeps every event and answers in pages: `hasMore` asks for the next.
|
|
939
|
+
*/
|
|
940
|
+
export declare const EventsReplayResultSchema: z.ZodObject<{
|
|
941
|
+
events: z.ZodArray<z.ZodObject<{
|
|
942
|
+
sessionId: z.ZodString;
|
|
943
|
+
seq: z.ZodNumber;
|
|
944
|
+
live: z.ZodOptional<z.ZodLiteral<true>>;
|
|
945
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
946
|
+
timestamp: z.ZodNumber;
|
|
947
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
948
|
+
type: z.ZodLiteral<"session.created">;
|
|
949
|
+
sessionId: z.ZodString;
|
|
950
|
+
nativeSessionId: z.ZodString;
|
|
951
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
952
|
+
model: z.ZodOptional<z.ZodString>;
|
|
953
|
+
resumed: z.ZodOptional<z.ZodBoolean>;
|
|
954
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
955
|
+
timestamp: z.ZodNumber;
|
|
956
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
957
|
+
type: z.ZodLiteral<"session.ended">;
|
|
958
|
+
sessionId: z.ZodString;
|
|
959
|
+
reason: z.ZodType<(string & {}) | "closed", unknown, z.core.$ZodTypeInternals<(string & {}) | "closed", unknown>>;
|
|
960
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
961
|
+
timestamp: z.ZodNumber;
|
|
962
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
963
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
964
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
965
|
+
model: z.ZodOptional<z.ZodString>;
|
|
966
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
967
|
+
off: "off";
|
|
968
|
+
low: "low";
|
|
969
|
+
medium: "medium";
|
|
970
|
+
high: "high";
|
|
971
|
+
xhigh: "xhigh";
|
|
972
|
+
max: "max";
|
|
973
|
+
ultra: "ultra";
|
|
974
|
+
}>>;
|
|
975
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
976
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
977
|
+
off: "off";
|
|
978
|
+
low: "low";
|
|
979
|
+
medium: "medium";
|
|
980
|
+
high: "high";
|
|
981
|
+
xhigh: "xhigh";
|
|
982
|
+
max: "max";
|
|
983
|
+
ultra: "ultra";
|
|
984
|
+
}>>;
|
|
985
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
986
|
+
}, z.core.$strip>>;
|
|
987
|
+
sessionId: z.ZodString;
|
|
988
|
+
turnId: z.ZodString;
|
|
989
|
+
type: z.ZodLiteral<"turn.started">;
|
|
990
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
991
|
+
timestamp: z.ZodNumber;
|
|
992
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
993
|
+
messageId: z.ZodString;
|
|
994
|
+
outputIndex: z.ZodNumber;
|
|
995
|
+
role: z.ZodEnum<{
|
|
996
|
+
user: "user";
|
|
997
|
+
assistant: "assistant";
|
|
998
|
+
}>;
|
|
999
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1000
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
sessionId: z.ZodString;
|
|
1002
|
+
turnId: z.ZodString;
|
|
1003
|
+
type: z.ZodLiteral<"message.started">;
|
|
1004
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1005
|
+
timestamp: z.ZodNumber;
|
|
1006
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1007
|
+
messageId: z.ZodString;
|
|
1008
|
+
outputIndex: z.ZodNumber;
|
|
1009
|
+
partIndex: z.ZodNumber;
|
|
1010
|
+
part: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1011
|
+
id: z.ZodString;
|
|
1012
|
+
sessionId: z.ZodString;
|
|
1013
|
+
messageId: z.ZodString;
|
|
1014
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1015
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1016
|
+
type: z.ZodLiteral<"text">;
|
|
1017
|
+
text: z.ZodString;
|
|
1018
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1019
|
+
done: "done";
|
|
1020
|
+
streaming: "streaming";
|
|
1021
|
+
}>>;
|
|
1022
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1023
|
+
id: z.ZodString;
|
|
1024
|
+
sessionId: z.ZodString;
|
|
1025
|
+
messageId: z.ZodString;
|
|
1026
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1028
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1029
|
+
text: z.ZodString;
|
|
1030
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1031
|
+
done: "done";
|
|
1032
|
+
streaming: "streaming";
|
|
1033
|
+
}>>;
|
|
1034
|
+
time: z.ZodOptional<z.ZodObject<{
|
|
1035
|
+
start: z.ZodNumber;
|
|
1036
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1037
|
+
}, z.core.$strip>>;
|
|
1038
|
+
providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1039
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1040
|
+
id: z.ZodString;
|
|
1041
|
+
sessionId: z.ZodString;
|
|
1042
|
+
messageId: z.ZodString;
|
|
1043
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1045
|
+
type: z.ZodLiteral<"tool">;
|
|
1046
|
+
toolCallId: z.ZodString;
|
|
1047
|
+
toolName: z.ZodString;
|
|
1048
|
+
kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
|
|
1049
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1050
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1051
|
+
path: z.ZodString;
|
|
1052
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
1053
|
+
}, z.core.$strip>>>;
|
|
1054
|
+
subagent: z.ZodOptional<z.ZodObject<{
|
|
1055
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1056
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
}, z.core.$strip>>;
|
|
1060
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1061
|
+
status: z.ZodLiteral<"pending">;
|
|
1062
|
+
partialInput: z.ZodString;
|
|
1063
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1064
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1065
|
+
status: z.ZodLiteral<"in_progress">;
|
|
1066
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1067
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1068
|
+
time: z.ZodObject<{
|
|
1069
|
+
start: z.ZodNumber;
|
|
1070
|
+
}, z.core.$strip>;
|
|
1071
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1072
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1073
|
+
status: z.ZodLiteral<"completed">;
|
|
1074
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1075
|
+
output: z.ZodString;
|
|
1076
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1077
|
+
type: z.ZodLiteral<"text">;
|
|
1078
|
+
text: z.ZodString;
|
|
1079
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1080
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1081
|
+
type: z.ZodLiteral<"image">;
|
|
1082
|
+
data: z.ZodString;
|
|
1083
|
+
mimeType: z.ZodString;
|
|
1084
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1085
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1086
|
+
type: z.ZodLiteral<"diff">;
|
|
1087
|
+
path: z.ZodString;
|
|
1088
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
1089
|
+
newText: z.ZodString;
|
|
1090
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1091
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1092
|
+
type: z.ZodLiteral<"terminal">;
|
|
1093
|
+
terminalId: z.ZodString;
|
|
1094
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1095
|
+
}, z.core.$strip>], "type">>>;
|
|
1096
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1097
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1098
|
+
time: z.ZodObject<{
|
|
1099
|
+
start: z.ZodNumber;
|
|
1100
|
+
end: z.ZodNumber;
|
|
1101
|
+
}, z.core.$strip>;
|
|
1102
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1104
|
+
status: z.ZodLiteral<"failed">;
|
|
1105
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1106
|
+
error: z.ZodString;
|
|
1107
|
+
closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
|
|
1108
|
+
time: z.ZodObject<{
|
|
1109
|
+
start: z.ZodNumber;
|
|
1110
|
+
end: z.ZodNumber;
|
|
1111
|
+
}, z.core.$strip>;
|
|
1112
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1114
|
+
status: z.ZodLiteral<"cancelled">;
|
|
1115
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1116
|
+
time: z.ZodObject<{
|
|
1117
|
+
start: z.ZodNumber;
|
|
1118
|
+
end: z.ZodNumber;
|
|
1119
|
+
}, z.core.$strip>;
|
|
1120
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1121
|
+
}, z.core.$strip>], "status">;
|
|
1122
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1123
|
+
id: z.ZodString;
|
|
1124
|
+
sessionId: z.ZodString;
|
|
1125
|
+
messageId: z.ZodString;
|
|
1126
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1127
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1128
|
+
type: z.ZodLiteral<"subagent">;
|
|
1129
|
+
nativeActivityId: z.ZodString;
|
|
1130
|
+
nativeThreadId: z.ZodString;
|
|
1131
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1132
|
+
activity: z.ZodEnum<{
|
|
1133
|
+
interrupted: "interrupted";
|
|
1134
|
+
completed: "completed";
|
|
1135
|
+
started: "started";
|
|
1136
|
+
interacted: "interacted";
|
|
1137
|
+
}>;
|
|
1138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1139
|
+
id: z.ZodString;
|
|
1140
|
+
sessionId: z.ZodString;
|
|
1141
|
+
messageId: z.ZodString;
|
|
1142
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1143
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1144
|
+
type: z.ZodLiteral<"image">;
|
|
1145
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1146
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
mimeType: z.ZodString;
|
|
1148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1149
|
+
id: z.ZodString;
|
|
1150
|
+
sessionId: z.ZodString;
|
|
1151
|
+
messageId: z.ZodString;
|
|
1152
|
+
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1154
|
+
type: z.ZodLiteral<"file">;
|
|
1155
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
mimeType: z.ZodString;
|
|
1158
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1159
|
+
}, z.core.$strip>], "type">;
|
|
1160
|
+
sessionId: z.ZodString;
|
|
1161
|
+
turnId: z.ZodString;
|
|
1162
|
+
type: z.ZodLiteral<"message.part">;
|
|
1163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1164
|
+
timestamp: z.ZodNumber;
|
|
1165
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1166
|
+
messageId: z.ZodString;
|
|
1167
|
+
outputIndex: z.ZodNumber;
|
|
1168
|
+
partIndex: z.ZodNumber;
|
|
1169
|
+
partId: z.ZodString;
|
|
1170
|
+
delta: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1171
|
+
type: z.ZodLiteral<"text">;
|
|
1172
|
+
text: z.ZodString;
|
|
1173
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1174
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1175
|
+
text: z.ZodString;
|
|
1176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1177
|
+
type: z.ZodLiteral<"tool_input">;
|
|
1178
|
+
toolCallId: z.ZodString;
|
|
1179
|
+
toolName: z.ZodString;
|
|
1180
|
+
input: z.ZodString;
|
|
1181
|
+
}, z.core.$strip>], "type">;
|
|
1182
|
+
sessionId: z.ZodString;
|
|
1183
|
+
turnId: z.ZodString;
|
|
1184
|
+
type: z.ZodLiteral<"message.part.delta">;
|
|
1185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1186
|
+
timestamp: z.ZodNumber;
|
|
1187
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1188
|
+
messageId: z.ZodString;
|
|
1189
|
+
sessionId: z.ZodString;
|
|
1190
|
+
turnId: z.ZodString;
|
|
1191
|
+
type: z.ZodLiteral<"message.ended">;
|
|
1192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1193
|
+
timestamp: z.ZodNumber;
|
|
1194
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1195
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
1196
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
1197
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1198
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
1199
|
+
off: "off";
|
|
1200
|
+
low: "low";
|
|
1201
|
+
medium: "medium";
|
|
1202
|
+
high: "high";
|
|
1203
|
+
xhigh: "xhigh";
|
|
1204
|
+
max: "max";
|
|
1205
|
+
ultra: "ultra";
|
|
1206
|
+
}>>;
|
|
1207
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
1208
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
1209
|
+
off: "off";
|
|
1210
|
+
low: "low";
|
|
1211
|
+
medium: "medium";
|
|
1212
|
+
high: "high";
|
|
1213
|
+
xhigh: "xhigh";
|
|
1214
|
+
max: "max";
|
|
1215
|
+
ultra: "ultra";
|
|
1216
|
+
}>>;
|
|
1217
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1218
|
+
}, z.core.$strip>>;
|
|
1219
|
+
stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
|
|
1220
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
1221
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
1222
|
+
input: z.ZodDefault<z.ZodNumber>;
|
|
1223
|
+
output: z.ZodDefault<z.ZodNumber>;
|
|
1224
|
+
reasoning: z.ZodOptional<z.ZodNumber>;
|
|
1225
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1226
|
+
read: z.ZodDefault<z.ZodNumber>;
|
|
1227
|
+
write: z.ZodDefault<z.ZodNumber>;
|
|
1228
|
+
writeEphemeral5m: z.ZodOptional<z.ZodNumber>;
|
|
1229
|
+
writeEphemeral1h: z.ZodOptional<z.ZodNumber>;
|
|
1230
|
+
}, z.core.$strip>>;
|
|
1231
|
+
}, z.core.$strip>>;
|
|
1232
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
1233
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
1234
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
1235
|
+
message: z.ZodString;
|
|
1236
|
+
}, z.core.$strip>>;
|
|
1237
|
+
undeliveredSteers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1238
|
+
sessionId: z.ZodString;
|
|
1239
|
+
turnId: z.ZodString;
|
|
1240
|
+
type: z.ZodLiteral<"turn.ended">;
|
|
1241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1242
|
+
timestamp: z.ZodNumber;
|
|
1243
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1244
|
+
used: z.ZodNumber;
|
|
1245
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1246
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
1247
|
+
sessionId: z.ZodString;
|
|
1248
|
+
turnId: z.ZodString;
|
|
1249
|
+
type: z.ZodLiteral<"session.usage">;
|
|
1250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1251
|
+
timestamp: z.ZodNumber;
|
|
1252
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1253
|
+
status: z.ZodOptional<z.ZodType<(string & {}) | "ok" | "warning" | "limited", unknown, z.core.$ZodTypeInternals<(string & {}) | "ok" | "warning" | "limited", unknown>>>;
|
|
1254
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
1255
|
+
id: z.ZodString;
|
|
1256
|
+
usedPercent: z.ZodOptional<z.ZodNumber>;
|
|
1257
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1258
|
+
windowMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1259
|
+
status: z.ZodOptional<z.ZodType<(string & {}) | "ok" | "warning" | "limited", unknown, z.core.$ZodTypeInternals<(string & {}) | "ok" | "warning" | "limited", unknown>>>;
|
|
1260
|
+
}, z.core.$strip>>;
|
|
1261
|
+
planType: z.ZodOptional<z.ZodString>;
|
|
1262
|
+
sessionId: z.ZodString;
|
|
1263
|
+
turnId: z.ZodString;
|
|
1264
|
+
type: z.ZodLiteral<"session.limits">;
|
|
1265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1266
|
+
timestamp: z.ZodNumber;
|
|
1267
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1268
|
+
permissionMode: z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>;
|
|
1269
|
+
sessionId: z.ZodString;
|
|
1270
|
+
turnId: z.ZodString;
|
|
1271
|
+
type: z.ZodLiteral<"session.mode">;
|
|
1272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1273
|
+
timestamp: z.ZodNumber;
|
|
1274
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1275
|
+
compactionId: z.ZodString;
|
|
1276
|
+
status: z.ZodType<(string & {}) | "cancelled" | "in_progress" | "completed" | "failed", unknown, z.core.$ZodTypeInternals<(string & {}) | "cancelled" | "in_progress" | "completed" | "failed", unknown>>;
|
|
1277
|
+
trigger: z.ZodOptional<z.ZodType<(string & {}) | "auto" | "manual", unknown, z.core.$ZodTypeInternals<(string & {}) | "auto" | "manual", unknown>>>;
|
|
1278
|
+
preTokens: z.ZodOptional<z.ZodNumber>;
|
|
1279
|
+
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1280
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1281
|
+
abstractsIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1282
|
+
sessionId: z.ZodString;
|
|
1283
|
+
turnId: z.ZodString;
|
|
1284
|
+
type: z.ZodLiteral<"session.compaction">;
|
|
1285
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1286
|
+
timestamp: z.ZodNumber;
|
|
1287
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1288
|
+
type: z.ZodLiteral<"error">;
|
|
1289
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
1291
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
1292
|
+
message: z.ZodString;
|
|
1293
|
+
recoverable: z.ZodBoolean;
|
|
1294
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1295
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
1296
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1297
|
+
delayMs: z.ZodOptional<z.ZodNumber>;
|
|
1298
|
+
}, z.core.$strip>>;
|
|
1299
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
1300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1301
|
+
timestamp: z.ZodNumber;
|
|
1302
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1303
|
+
requestId: z.ZodString;
|
|
1304
|
+
title: z.ZodString;
|
|
1305
|
+
toolCall: z.ZodOptional<z.ZodObject<{
|
|
1306
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1307
|
+
toolName: z.ZodString;
|
|
1308
|
+
kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
|
|
1309
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1311
|
+
path: z.ZodString;
|
|
1312
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
1313
|
+
}, z.core.$strip>>>;
|
|
1314
|
+
rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1315
|
+
}, z.core.$strip>>;
|
|
1316
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1317
|
+
optionId: z.ZodString;
|
|
1318
|
+
name: z.ZodString;
|
|
1319
|
+
kind: z.ZodType<(string & {}) | "allow_once" | "allow_always" | "reject_once" | "reject_always", unknown, z.core.$ZodTypeInternals<(string & {}) | "allow_once" | "allow_always" | "reject_once" | "reject_always", unknown>>;
|
|
1320
|
+
}, z.core.$strip>>;
|
|
1321
|
+
sessionId: z.ZodString;
|
|
1322
|
+
turnId: z.ZodString;
|
|
1323
|
+
type: z.ZodLiteral<"permission.requested">;
|
|
1324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1325
|
+
timestamp: z.ZodNumber;
|
|
1326
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1327
|
+
requestId: z.ZodString;
|
|
1328
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1329
|
+
outcome: z.ZodLiteral<"selected">;
|
|
1330
|
+
optionId: z.ZodString;
|
|
1331
|
+
updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1332
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1334
|
+
outcome: z.ZodLiteral<"cancelled">;
|
|
1335
|
+
}, z.core.$strip>], "outcome">;
|
|
1336
|
+
sessionId: z.ZodString;
|
|
1337
|
+
turnId: z.ZodString;
|
|
1338
|
+
type: z.ZodLiteral<"permission.resolved">;
|
|
1339
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1340
|
+
timestamp: z.ZodNumber;
|
|
1341
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1342
|
+
requestId: z.ZodString;
|
|
1343
|
+
mode: z.ZodType<(string & {}) | "url" | "question" | "form", unknown, z.core.$ZodTypeInternals<(string & {}) | "url" | "question" | "form", unknown>>;
|
|
1344
|
+
message: z.ZodString;
|
|
1345
|
+
serverName: z.ZodOptional<z.ZodString>;
|
|
1346
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1348
|
+
id: z.ZodString;
|
|
1349
|
+
question: z.ZodString;
|
|
1350
|
+
header: z.ZodOptional<z.ZodString>;
|
|
1351
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1352
|
+
label: z.ZodString;
|
|
1353
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1354
|
+
}, z.core.$strip>>>;
|
|
1355
|
+
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
1356
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
1357
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
1358
|
+
}, z.core.$strip>>>;
|
|
1359
|
+
requestedSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1360
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1361
|
+
elicitationId: z.ZodOptional<z.ZodString>;
|
|
1362
|
+
sessionId: z.ZodString;
|
|
1363
|
+
turnId: z.ZodString;
|
|
1364
|
+
type: z.ZodLiteral<"elicitation.requested">;
|
|
1365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1366
|
+
timestamp: z.ZodNumber;
|
|
1367
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1368
|
+
requestId: z.ZodString;
|
|
1369
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1370
|
+
action: z.ZodLiteral<"accept">;
|
|
1371
|
+
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1372
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1373
|
+
action: z.ZodLiteral<"decline">;
|
|
1374
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1375
|
+
action: z.ZodLiteral<"cancel">;
|
|
1376
|
+
}, z.core.$strip>], "action">;
|
|
1377
|
+
sessionId: z.ZodString;
|
|
1378
|
+
turnId: z.ZodString;
|
|
1379
|
+
type: z.ZodLiteral<"elicitation.resolved">;
|
|
1380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1381
|
+
timestamp: z.ZodNumber;
|
|
1382
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1383
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
1384
|
+
data: z.ZodUnknown;
|
|
1385
|
+
sessionId: z.ZodString;
|
|
1386
|
+
turnId: z.ZodString;
|
|
1387
|
+
type: z.ZodLiteral<"raw">;
|
|
1388
|
+
}, z.core.$strip>], "type">;
|
|
1389
|
+
}, z.core.$strip>>;
|
|
1390
|
+
firstAvailableSeq: z.ZodNullable<z.ZodNumber>;
|
|
1391
|
+
latestSeq: z.ZodNullable<z.ZodNumber>;
|
|
1392
|
+
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
1393
|
+
}, z.core.$strip>;
|
|
1394
|
+
export type EventsReplayResult = z.infer<typeof EventsReplayResultSchema>;
|
|
1395
|
+
/** `events/replay` with its envelopes decoded leniently. */
|
|
1396
|
+
export interface DecodedEventsReplayResult extends Omit<EventsReplayResult, "events"> {
|
|
1397
|
+
events: DecodedWireEventEnvelope[];
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* The replay result, decoded envelope-by-envelope. `EventsReplayResultSchema`
|
|
1401
|
+
* embeds the CLOSED event union, so parsing a buffer with it makes one unknown
|
|
1402
|
+
* event type poison the whole replay — the healing path for a gap must not be
|
|
1403
|
+
* the thing that cannot survive an unknown.
|
|
1404
|
+
*/
|
|
1405
|
+
export declare function decodeEventsReplayResult(value: unknown): DecodedEventsReplayResult;
|
|
1406
|
+
/**
|
|
1407
|
+
* `models/list`: the models a harness offers, read from its CLI for the login
|
|
1408
|
+
* and folder a turn with the same `cwd`, `env` and `apiKey` would use (Claude
|
|
1409
|
+
* narrows the list by the folder's `availableModels`; Codex by the account).
|
|
1410
|
+
* Served from a cache; `refresh` reads the CLI again, e.g. after a login.
|
|
1411
|
+
*/
|
|
1412
|
+
export declare const ModelsListParamsSchema: z.ZodObject<{
|
|
1413
|
+
harness: z.ZodEnum<{
|
|
1414
|
+
"claude-code": "claude-code";
|
|
1415
|
+
"codex-app-server": "codex-app-server";
|
|
1416
|
+
acp: "acp";
|
|
1417
|
+
}>;
|
|
1418
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1419
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1420
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1421
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
1422
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
1423
|
+
}, z.core.$strip>;
|
|
1424
|
+
export type ModelsListParams = z.infer<typeof ModelsListParamsSchema>;
|
|
1425
|
+
/**
|
|
1426
|
+
* `turn/get`: a durable turn's receipt. Admission records it, with the input,
|
|
1427
|
+
* before the `turn/start` ack, so a turn whose process died before its first
|
|
1428
|
+
* event is still known; `interrupted` means a restart cut it off.
|
|
1429
|
+
*/
|
|
1430
|
+
export declare const TurnGetParamsSchema: z.ZodObject<{
|
|
1431
|
+
sessionId: z.ZodString;
|
|
1432
|
+
turnId: z.ZodString;
|
|
1433
|
+
}, z.core.$strip>;
|
|
1434
|
+
export type TurnGetParams = z.infer<typeof TurnGetParamsSchema>;
|
|
1435
|
+
export declare const TurnReceiptSchema: z.ZodObject<{
|
|
1436
|
+
sessionId: z.ZodString;
|
|
1437
|
+
turnId: z.ZodString;
|
|
1438
|
+
state: z.ZodEnum<{
|
|
1439
|
+
interrupted: "interrupted";
|
|
1440
|
+
completed: "completed";
|
|
1441
|
+
admitted: "admitted";
|
|
1442
|
+
}>;
|
|
1443
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1444
|
+
type: z.ZodLiteral<"text">;
|
|
1445
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
text: z.ZodString;
|
|
1447
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1448
|
+
byteRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1449
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1450
|
+
}, z.core.$strip>>>;
|
|
1451
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1452
|
+
type: z.ZodLiteral<"image">;
|
|
1453
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1454
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1455
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1456
|
+
mimeType: z.ZodString;
|
|
1457
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1458
|
+
type: z.ZodLiteral<"file">;
|
|
1459
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
mimeType: z.ZodString;
|
|
1463
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1464
|
+
}, z.core.$strip>], "type">>]>>;
|
|
1465
|
+
terminal: z.ZodOptional<z.ZodObject<{
|
|
1466
|
+
timestamp: z.ZodNumber;
|
|
1467
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1468
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
1469
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
1470
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1471
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
1472
|
+
off: "off";
|
|
1473
|
+
low: "low";
|
|
1474
|
+
medium: "medium";
|
|
1475
|
+
high: "high";
|
|
1476
|
+
xhigh: "xhigh";
|
|
1477
|
+
max: "max";
|
|
1478
|
+
ultra: "ultra";
|
|
1479
|
+
}>>;
|
|
1480
|
+
permissionMode: z.ZodOptional<z.ZodType<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "plan" | "accept_edits" | "dont_ask" | "bypass_permissions", unknown>>>;
|
|
1481
|
+
appliedThinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
1482
|
+
off: "off";
|
|
1483
|
+
low: "low";
|
|
1484
|
+
medium: "medium";
|
|
1485
|
+
high: "high";
|
|
1486
|
+
xhigh: "xhigh";
|
|
1487
|
+
max: "max";
|
|
1488
|
+
ultra: "ultra";
|
|
1489
|
+
}>>;
|
|
1490
|
+
reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1491
|
+
}, z.core.$strip>>;
|
|
1492
|
+
stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
|
|
1493
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
1494
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
1495
|
+
input: z.ZodDefault<z.ZodNumber>;
|
|
1496
|
+
output: z.ZodDefault<z.ZodNumber>;
|
|
1497
|
+
reasoning: z.ZodOptional<z.ZodNumber>;
|
|
1498
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1499
|
+
read: z.ZodDefault<z.ZodNumber>;
|
|
1500
|
+
write: z.ZodDefault<z.ZodNumber>;
|
|
1501
|
+
writeEphemeral5m: z.ZodOptional<z.ZodNumber>;
|
|
1502
|
+
writeEphemeral1h: z.ZodOptional<z.ZodNumber>;
|
|
1503
|
+
}, z.core.$strip>>;
|
|
1504
|
+
}, z.core.$strip>>;
|
|
1505
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
1506
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
1507
|
+
category: z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>;
|
|
1508
|
+
message: z.ZodString;
|
|
1509
|
+
}, z.core.$strip>>;
|
|
1510
|
+
undeliveredSteers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1511
|
+
sessionId: z.ZodString;
|
|
1512
|
+
turnId: z.ZodString;
|
|
1513
|
+
type: z.ZodLiteral<"turn.ended">;
|
|
1514
|
+
}, z.core.$strip>>;
|
|
1515
|
+
}, z.core.$strip>;
|
|
1516
|
+
export type TurnReceipt = z.infer<typeof TurnReceiptSchema>;
|
|
1517
|
+
/** `session/get`: what a durable server knows about a session. */
|
|
1518
|
+
export declare const SessionGetParamsSchema: z.ZodObject<{
|
|
1519
|
+
sessionId: z.ZodString;
|
|
1520
|
+
}, z.core.$strip>;
|
|
1521
|
+
export type SessionGetParams = z.infer<typeof SessionGetParamsSchema>;
|
|
1522
|
+
/**
|
|
1523
|
+
* Why a restart could not lift a session's fence: `not_owned`, a host's own
|
|
1524
|
+
* spawner started its agent; `not_verified`, nothing could tell whether its
|
|
1525
|
+
* process still runs (no sweep, no process table, a pid it may not signal);
|
|
1526
|
+
* `not_stopped`, it was still there after SIGKILL.
|
|
1527
|
+
*/
|
|
1528
|
+
export declare const RECOVERY_REASONS: readonly ["not_owned", "not_verified", "not_stopped"];
|
|
1529
|
+
export declare const RecoveryReasonSchema: z.ZodEnum<{
|
|
1530
|
+
not_owned: "not_owned";
|
|
1531
|
+
not_verified: "not_verified";
|
|
1532
|
+
not_stopped: "not_stopped";
|
|
1533
|
+
}>;
|
|
1534
|
+
export type RecoveryReason = z.infer<typeof RecoveryReasonSchema>;
|
|
1535
|
+
export declare const DurableSessionSchema: z.ZodObject<{
|
|
1536
|
+
sessionId: z.ZodString;
|
|
1537
|
+
harness: z.ZodEnum<{
|
|
1538
|
+
"claude-code": "claude-code";
|
|
1539
|
+
"codex-app-server": "codex-app-server";
|
|
1540
|
+
acp: "acp";
|
|
1541
|
+
}>;
|
|
1542
|
+
headSeq: z.ZodNumber;
|
|
1543
|
+
nativeSessionId: z.ZodNullable<z.ZodString>;
|
|
1544
|
+
closed: z.ZodBoolean;
|
|
1545
|
+
recoveryRequired: z.ZodBoolean;
|
|
1546
|
+
recoveryReason: z.ZodOptional<z.ZodEnum<{
|
|
1547
|
+
not_owned: "not_owned";
|
|
1548
|
+
not_verified: "not_verified";
|
|
1549
|
+
not_stopped: "not_stopped";
|
|
1550
|
+
}>>;
|
|
1551
|
+
}, z.core.$strip>;
|
|
1552
|
+
export type DurableSession = z.infer<typeof DurableSessionSchema>;
|
|
1553
|
+
/**
|
|
1554
|
+
* `session/confirmStopped`: the caller checked that the native execution a
|
|
1555
|
+
* restart cut off is no longer running (history alone cannot prove that a
|
|
1556
|
+
* detached agent or tool process died). `expectedHeadSeq` fences a stale
|
|
1557
|
+
* confirmation against a newer interruption.
|
|
1558
|
+
*/
|
|
1559
|
+
export declare const SessionConfirmStoppedParamsSchema: z.ZodObject<{
|
|
1560
|
+
sessionId: z.ZodString;
|
|
1561
|
+
expectedHeadSeq: z.ZodNumber;
|
|
1562
|
+
confirmedStopped: z.ZodLiteral<true>;
|
|
1563
|
+
}, z.core.$strip>;
|
|
1564
|
+
export type SessionConfirmStoppedParams = z.infer<typeof SessionConfirmStoppedParamsSchema>;
|
|
1565
|
+
/** `recovered: false` when nothing awaited confirmation. */
|
|
1566
|
+
export declare const SessionConfirmStoppedResultSchema: z.ZodObject<{
|
|
1567
|
+
recovered: z.ZodBoolean;
|
|
1568
|
+
}, z.core.$strip>;
|
|
1569
|
+
export type SessionConfirmStoppedResult = z.infer<typeof SessionConfirmStoppedResultSchema>;
|
|
1570
|
+
/**
|
|
1571
|
+
* `session/release`: let an idle session's agent go (its process and what it
|
|
1572
|
+
* holds, a Codex home included) while the session stays open. Its next turn
|
|
1573
|
+
* names its native conversation (`config.resumeSessionId`; until then
|
|
1574
|
+
* `resumeRequired`), as after a restart. `session/close` ends a session;
|
|
1575
|
+
* this only frees what it runs on. Nothing is broadcast: another client of
|
|
1576
|
+
* the session learns of it when its next turn is refused `resumeRequired`,
|
|
1577
|
+
* whose data names the conversation, the answer a client that survives a
|
|
1578
|
+
* restart already handles.
|
|
1579
|
+
*/
|
|
1580
|
+
export declare const SessionReleaseParamsSchema: z.ZodObject<{
|
|
1581
|
+
sessionId: z.ZodString;
|
|
1582
|
+
}, z.core.$strip>;
|
|
1583
|
+
export type SessionReleaseParams = z.infer<typeof SessionReleaseParamsSchema>;
|
|
1584
|
+
/** `released: false` when the server holds no open session by that id. */
|
|
1585
|
+
export declare const SessionReleaseResultSchema: z.ZodObject<{
|
|
1586
|
+
released: z.ZodBoolean;
|
|
1587
|
+
}, z.core.$strip>;
|
|
1588
|
+
export type SessionReleaseResult = z.infer<typeof SessionReleaseResultSchema>;
|
|
1589
|
+
/**
|
|
1590
|
+
* `session/subscribe`: stream a session to this connection. The answer marks
|
|
1591
|
+
* the subscription point in the connection's frames. After it come, first,
|
|
1592
|
+
* the session's open parts (`live` `message.part` frames at `headSeq`), then
|
|
1593
|
+
* every kept event after `headSeq` and every delta after the point, each
|
|
1594
|
+
* once. Kept events up to `headSeq` the caller does not hold it reads with
|
|
1595
|
+
* `events/replay`: the server pushes no catch-up. Subscribing again answers
|
|
1596
|
+
* a new point and sends the open parts again; no other frame is sent twice.
|
|
1597
|
+
*
|
|
1598
|
+
* Without `turnId` the connection watches the session until it unsubscribes
|
|
1599
|
+
* or the session ends; with one it follows that turn, while it runs, until
|
|
1600
|
+
* its `turn.ended` (a turn that is not running subscribes nothing, and the
|
|
1601
|
+
* answer's `activeTurn` says so). Refused `unknownSession` when the server has
|
|
1602
|
+
* no log for the session (it never ran, or it was closed), and
|
|
1603
|
+
* `subscriptionLimit` past the connection's cap, which counts the sessions it
|
|
1604
|
+
* watches (`session/subscribeAll` once), never the turns it follows.
|
|
1605
|
+
*/
|
|
1606
|
+
export declare const SessionSubscribeParamsSchema: z.ZodObject<{
|
|
1607
|
+
sessionId: z.ZodString;
|
|
1608
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
1609
|
+
}, z.core.$strip>;
|
|
1610
|
+
export type SessionSubscribeParams = z.infer<typeof SessionSubscribeParamsSchema>;
|
|
1611
|
+
/** The turn a session runs at a subscription point. */
|
|
1612
|
+
export declare const RunningTurnSchema: z.ZodObject<{
|
|
1613
|
+
turnId: z.ZodString;
|
|
1614
|
+
startedSeq: z.ZodOptional<z.ZodNumber>;
|
|
1615
|
+
}, z.core.$strip>;
|
|
1616
|
+
export type RunningTurn = z.infer<typeof RunningTurnSchema>;
|
|
1617
|
+
export declare const SessionSubscribeResultSchema: z.ZodObject<{
|
|
1618
|
+
headSeq: z.ZodNumber;
|
|
1619
|
+
firstAvailableSeq: z.ZodNullable<z.ZodNumber>;
|
|
1620
|
+
activeTurn: z.ZodOptional<z.ZodObject<{
|
|
1621
|
+
turnId: z.ZodString;
|
|
1622
|
+
startedSeq: z.ZodOptional<z.ZodNumber>;
|
|
1623
|
+
}, z.core.$strip>>;
|
|
1624
|
+
}, z.core.$strip>;
|
|
1625
|
+
export type SessionSubscribeResult = z.infer<typeof SessionSubscribeResultSchema>;
|
|
1626
|
+
/**
|
|
1627
|
+
* `session/subscribeAll`: stream every session to this connection, live from
|
|
1628
|
+
* now, with no catch-up: for observers. It counts once against the cap.
|
|
1629
|
+
*/
|
|
1630
|
+
export declare const SessionSubscribeAllParamsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1631
|
+
/** Each session with a running turn, at its point; their open parts follow. */
|
|
1632
|
+
export declare const SessionSubscribeAllResultSchema: z.ZodObject<{
|
|
1633
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
1634
|
+
headSeq: z.ZodNumber;
|
|
1635
|
+
firstAvailableSeq: z.ZodNullable<z.ZodNumber>;
|
|
1636
|
+
activeTurn: z.ZodOptional<z.ZodObject<{
|
|
1637
|
+
turnId: z.ZodString;
|
|
1638
|
+
startedSeq: z.ZodOptional<z.ZodNumber>;
|
|
1639
|
+
}, z.core.$strip>>;
|
|
1640
|
+
sessionId: z.ZodString;
|
|
1641
|
+
}, z.core.$strip>>;
|
|
1642
|
+
}, z.core.$strip>;
|
|
1643
|
+
export type SessionSubscribeAllResult = z.infer<typeof SessionSubscribeAllResultSchema>;
|
|
1644
|
+
/**
|
|
1645
|
+
* `session/unsubscribe`: stop watching a session. A turn the connection
|
|
1646
|
+
* follows streams on until it ends.
|
|
1647
|
+
*/
|
|
1648
|
+
export declare const SessionUnsubscribeParamsSchema: z.ZodObject<{
|
|
1649
|
+
sessionId: z.ZodString;
|
|
1650
|
+
}, z.core.$strip>;
|
|
1651
|
+
export type SessionUnsubscribeParams = z.infer<typeof SessionUnsubscribeParamsSchema>;
|
|
1652
|
+
/** `session/unsubscribeAll`: stop streaming every session; those watched by name stream on. */
|
|
1653
|
+
export declare const SessionUnsubscribeAllParamsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1654
|
+
/** `unsubscribed: false` when this connection did not watch it (or every session). */
|
|
1655
|
+
export declare const SessionUnsubscribeResultSchema: z.ZodObject<{
|
|
1656
|
+
unsubscribed: z.ZodBoolean;
|
|
1657
|
+
}, z.core.$strip>;
|
|
1658
|
+
export type SessionUnsubscribeResult = z.infer<typeof SessionUnsubscribeResultSchema>;
|
|
1659
|
+
/**
|
|
1660
|
+
* `session/overflow` (server -> client): this connection fell
|
|
1661
|
+
* `maxBacklogBytes` behind, so the server stopped sending the session after
|
|
1662
|
+
* `lastSeq`, the last kept seq it sent, and dropped the subscription.
|
|
1663
|
+
* Subscribe again after the last seq you hold; its open parts come with it.
|
|
1664
|
+
* `{all: true}`: the subscription to every session was dropped.
|
|
1665
|
+
*/
|
|
1666
|
+
export declare const SessionOverflowParamsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1667
|
+
sessionId: z.ZodString;
|
|
1668
|
+
lastSeq: z.ZodNumber;
|
|
1669
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1670
|
+
all: z.ZodLiteral<true>;
|
|
1671
|
+
}, z.core.$strip>]>;
|
|
1672
|
+
export type SessionOverflowParams = z.infer<typeof SessionOverflowParamsSchema>;
|
|
1673
|
+
export declare const ShutdownResultSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1674
|
+
/** A decoded incoming wire line, discriminated for dispatch. */
|
|
1675
|
+
export type WireMessage = {
|
|
1676
|
+
kind: "request";
|
|
1677
|
+
id: JsonRpcId;
|
|
1678
|
+
method: string;
|
|
1679
|
+
params?: unknown;
|
|
1680
|
+
} | {
|
|
1681
|
+
kind: "notification";
|
|
1682
|
+
method: string;
|
|
1683
|
+
params?: unknown;
|
|
1684
|
+
}
|
|
1685
|
+
/** `id` is null on protocol-level errors answering unparseable requests. */
|
|
1686
|
+
| {
|
|
1687
|
+
kind: "response";
|
|
1688
|
+
id: JsonRpcId | null;
|
|
1689
|
+
result?: unknown;
|
|
1690
|
+
error?: JsonRpcError;
|
|
1691
|
+
}
|
|
1692
|
+
/** `parseError`: the line was not JSON at all (JSON-RPC's -32700), not just a bad envelope. */
|
|
1693
|
+
| {
|
|
1694
|
+
kind: "invalid";
|
|
1695
|
+
error: string;
|
|
1696
|
+
parseError: boolean;
|
|
1697
|
+
};
|
|
1698
|
+
/** Decode one NDJSON line into a JSON-RPC message (never throws). */
|
|
1699
|
+
export declare function decodeWireMessage(line: string): WireMessage;
|
|
1700
|
+
export declare function encodeRequest(id: JsonRpcId, method: string, params?: unknown): string;
|
|
1701
|
+
export declare function encodeNotification(method: string, params?: unknown): string;
|
|
1702
|
+
export declare function encodeResponse(id: JsonRpcId, result: unknown): string;
|
|
1703
|
+
export declare function encodeErrorResponse(id: JsonRpcId | null, code: number, message: string, data?: unknown): string;
|
|
1704
|
+
/**
|
|
1705
|
+
* A duplex line channel the wire runs over. Implementations exist for stdio,
|
|
1706
|
+
* WebSocket, and in-process pairs (`channelPair`). Handlers registered after
|
|
1707
|
+
* close are never called; `send` after close is a silent no-op.
|
|
1708
|
+
*/
|
|
1709
|
+
export interface WireTransport {
|
|
1710
|
+
send(line: string): void;
|
|
1711
|
+
/**
|
|
1712
|
+
* Bytes sent but not yet written out (a socket's buffered amount, a pipe's
|
|
1713
|
+
* writable length), where the channel can tell: the server stops streaming
|
|
1714
|
+
* a session to a connection this far behind (`session/overflow`).
|
|
1715
|
+
*/
|
|
1716
|
+
bufferedAmount?(): number;
|
|
1717
|
+
/** Register a line handler; returns an unsubscribe function. */
|
|
1718
|
+
onLine(handler: (line: string) => void): () => void;
|
|
1719
|
+
/** Register a close handler; returns an unsubscribe function. */
|
|
1720
|
+
onClose(handler: (reason?: string) => void): () => void;
|
|
1721
|
+
close(): void;
|
|
1722
|
+
readonly closed: boolean;
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Split an inbound transport message into NDJSON lines, defensively: peers
|
|
1726
|
+
* may batch several lines per frame, and WebSocket implementations deliver
|
|
1727
|
+
* text, Uint8Array, or ArrayBuffer depending on runtime. Blank lines are
|
|
1728
|
+
* skipped.
|
|
1729
|
+
*/
|
|
1730
|
+
export declare function pushNdjsonLines(push: (line: string) => void, data: unknown): void;
|
|
1731
|
+
/**
|
|
1732
|
+
* Build a WireTransport from a raw byte-channel binding: the caller supplies
|
|
1733
|
+
* the outbound `send`/`close`, and pushes inbound lines / close through the
|
|
1734
|
+
* returned handles. Every concrete transport (stdio, WebSocket, `channelPair`)
|
|
1735
|
+
* is this bridge plus platform wiring.
|
|
1736
|
+
*/
|
|
1737
|
+
export declare function channelTransport(io: {
|
|
1738
|
+
send(line: string): void;
|
|
1739
|
+
close?(): void;
|
|
1740
|
+
bufferedAmount?(): number;
|
|
1741
|
+
}): {
|
|
1742
|
+
transport: WireTransport;
|
|
1743
|
+
push(line: string): void;
|
|
1744
|
+
end(reason?: string): void;
|
|
1745
|
+
};
|
|
1746
|
+
/**
|
|
1747
|
+
* Two transports wired to each other in one process: the in-process wire
|
|
1748
|
+
* between an `AgentServer` and its client (`server.attach(pair.server)`,
|
|
1749
|
+
* `AgentServerClient.attach(pair.client)`). `deliver` schedules each line's
|
|
1750
|
+
* arrival, a microtask later by default, as a socket's arrives on a later
|
|
1751
|
+
* tick; `kill` drops the connection at both ends.
|
|
1752
|
+
*/
|
|
1753
|
+
export declare function channelPair(deliver?: (arrive: () => void) => void): {
|
|
1754
|
+
client: WireTransport;
|
|
1755
|
+
server: WireTransport;
|
|
1756
|
+
kill(reason?: string): void;
|
|
1757
|
+
};
|
|
1758
|
+
//# sourceMappingURL=wire.d.ts.map
|