@zvada/agent-server 0.3.18 → 0.3.20
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 +1041 -1
- package/README.md +40 -40
- 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 +45 -28
- 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 +155 -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,228 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a harness's turns can authenticate:
|
|
4
|
+
* - `signed_in` — they run with `credential`;
|
|
5
|
+
* - `signed_out` — they would fail: log in with one of `methods`, or give
|
|
6
|
+
* each turn an `apiKey`;
|
|
7
|
+
* - `unknown` — the CLI could not say, `error` says why.
|
|
8
|
+
* OPEN: treat a state this build does not know as `unknown`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AUTH_STATES: readonly ["signed_in", "signed_out", "unknown"];
|
|
11
|
+
export type AuthState = (typeof AUTH_STATES)[number] | (string & {});
|
|
12
|
+
/**
|
|
13
|
+
* What kind of credential a signed-in harness's turns run on: a
|
|
14
|
+
* `subscription` (a Claude or ChatGPT plan, also as a token such as
|
|
15
|
+
* `CLAUDE_CODE_OAUTH_TOKEN`; `source` says where it comes from), an
|
|
16
|
+
* `api_key`, or a `cloud` provider's credentials (Bedrock, Vertex, Foundry).
|
|
17
|
+
* OPEN.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AUTH_CREDENTIALS: readonly ["subscription", "api_key", "cloud"];
|
|
20
|
+
export type AuthCredential = (typeof AUTH_CREDENTIALS)[number] | (string & {});
|
|
21
|
+
/**
|
|
22
|
+
* Where that credential comes from: the CLI's own `login` (what `auth/login`
|
|
23
|
+
* and the CLI's login command store), the server's `environment`, which wins
|
|
24
|
+
* over a login, the CLI's `settings` (Claude's `apiKeyHelper`), or the
|
|
25
|
+
* `product`, which holds it and hands it to each turn (`grantAuth`). A turn's
|
|
26
|
+
* own `apiKey` wins over the first three. OPEN.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AUTH_SOURCES: readonly ["login", "environment", "settings", "product"];
|
|
29
|
+
export type AuthSource = (typeof AUTH_SOURCES)[number] | (string & {});
|
|
30
|
+
/**
|
|
31
|
+
* How a login method signs in:
|
|
32
|
+
* - `browser` — the user signs in at the login's `url`, and the CLI hears
|
|
33
|
+
* back on the server's machine; where the login has a `codeUrl`, a browser
|
|
34
|
+
* on another device signs in there and the user pastes the code it shows
|
|
35
|
+
* (`auth/complete`);
|
|
36
|
+
* - `device_code` — the user enters the login's `userCode` at its `url`, on
|
|
37
|
+
* any device;
|
|
38
|
+
* - `api_key` — `auth/login` carries the key;
|
|
39
|
+
* - `terminal` — the user runs the method's `command` in a terminal; it is
|
|
40
|
+
* not an `auth/login` method.
|
|
41
|
+
* OPEN.
|
|
42
|
+
*/
|
|
43
|
+
export declare const AUTH_METHOD_KINDS: readonly ["browser", "device_code", "api_key", "terminal"];
|
|
44
|
+
export type AuthMethodKind = (typeof AUTH_METHOD_KINDS)[number] | (string & {});
|
|
45
|
+
/** One way to log a harness in. */
|
|
46
|
+
export declare const AuthMethodSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
kind: z.ZodType<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown, z.core.$ZodTypeInternals<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown>>;
|
|
49
|
+
label: z.ZodString;
|
|
50
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
51
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type AuthMethod = z.infer<typeof AuthMethodSchema>;
|
|
55
|
+
/**
|
|
56
|
+
* One harness's login, as `auth/status` and `auth/logout` answer it, and as
|
|
57
|
+
* a product shows one it holds (`grantAuth`): who, on what kind of
|
|
58
|
+
* credential, from where, and what to call it.
|
|
59
|
+
*/
|
|
60
|
+
export declare const HarnessAuthSchema: z.ZodObject<{
|
|
61
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
62
|
+
email: z.ZodOptional<z.ZodString>;
|
|
63
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
64
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
65
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
66
|
+
state: z.ZodType<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown>>;
|
|
67
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
68
|
+
source: z.ZodOptional<z.ZodType<(string & {}) | "login" | "environment" | "settings" | "product", unknown, z.core.$ZodTypeInternals<(string & {}) | "login" | "environment" | "settings" | "product", unknown>>>;
|
|
69
|
+
label: z.ZodOptional<z.ZodString>;
|
|
70
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
kind: z.ZodType<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown, z.core.$ZodTypeInternals<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown>>;
|
|
74
|
+
label: z.ZodString;
|
|
75
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
76
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
error: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type HarnessAuth = z.infer<typeof HarnessAuthSchema>;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the harness already runs on the login this method would make: the
|
|
84
|
+
* CLI's own, of the method's credential. A product then shows it connected
|
|
85
|
+
* and starts no sign-in, as a local login is picked up where the user already
|
|
86
|
+
* made one. A credential from the environment or settings is not one.
|
|
87
|
+
*/
|
|
88
|
+
export declare function signedInBy(auth: HarnessAuth, method: AuthMethod): boolean;
|
|
89
|
+
/** `auth/status`: each harness's login; every registered harness's when `harnesses` is absent. */
|
|
90
|
+
export declare const AuthStatusParamsSchema: z.ZodObject<{
|
|
91
|
+
harnesses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
92
|
+
"claude-code": "claude-code";
|
|
93
|
+
"codex-app-server": "codex-app-server";
|
|
94
|
+
acp: "acp";
|
|
95
|
+
}>>>;
|
|
96
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type AuthStatusParams = z.infer<typeof AuthStatusParamsSchema>;
|
|
99
|
+
export declare const AuthStatusResultSchema: z.ZodObject<{
|
|
100
|
+
auth: z.ZodArray<z.ZodObject<{
|
|
101
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
102
|
+
email: z.ZodOptional<z.ZodString>;
|
|
103
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
104
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
105
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
106
|
+
state: z.ZodType<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown>>;
|
|
107
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
108
|
+
source: z.ZodOptional<z.ZodType<(string & {}) | "login" | "environment" | "settings" | "product", unknown, z.core.$ZodTypeInternals<(string & {}) | "login" | "environment" | "settings" | "product", unknown>>>;
|
|
109
|
+
label: z.ZodOptional<z.ZodString>;
|
|
110
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
112
|
+
id: z.ZodString;
|
|
113
|
+
kind: z.ZodType<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown, z.core.$ZodTypeInternals<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown>>;
|
|
114
|
+
label: z.ZodString;
|
|
115
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
116
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
error: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type AuthStatusResult = z.infer<typeof AuthStatusResultSchema>;
|
|
123
|
+
/**
|
|
124
|
+
* `auth/login`: start one of a harness's `methods`. A newer login for the same
|
|
125
|
+
* harness and store cancels this one.
|
|
126
|
+
*/
|
|
127
|
+
export declare const AuthLoginParamsSchema: z.ZodObject<{
|
|
128
|
+
harness: z.ZodEnum<{
|
|
129
|
+
"claude-code": "claude-code";
|
|
130
|
+
"codex-app-server": "codex-app-server";
|
|
131
|
+
acp: "acp";
|
|
132
|
+
}>;
|
|
133
|
+
method: z.ZodString;
|
|
134
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
135
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
export type AuthLoginParams = z.infer<typeof AuthLoginParamsSchema>;
|
|
138
|
+
/**
|
|
139
|
+
* A login under way, answered at once: the user signs in at `url` (entering
|
|
140
|
+
* `userCode` there, for a device code) or, from another device, at `codeUrl`
|
|
141
|
+
* and pastes the code it shows (`auth/complete`). An `api_key` login has none
|
|
142
|
+
* of them. `auth/updated` says how it ended.
|
|
143
|
+
*/
|
|
144
|
+
export declare const AuthLoginSchema: z.ZodObject<{
|
|
145
|
+
loginId: z.ZodString;
|
|
146
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
147
|
+
method: z.ZodString;
|
|
148
|
+
url: z.ZodOptional<z.ZodString>;
|
|
149
|
+
codeUrl: z.ZodOptional<z.ZodString>;
|
|
150
|
+
userCode: z.ZodOptional<z.ZodString>;
|
|
151
|
+
expiresAt: z.ZodNumber;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type AuthLogin = z.infer<typeof AuthLoginSchema>;
|
|
154
|
+
/** `auth/complete`: the code a `codeUrl` page showed, as pasted (`code#state`, or the page's address). */
|
|
155
|
+
export declare const AuthCompleteParamsSchema: z.ZodObject<{
|
|
156
|
+
loginId: z.ZodString;
|
|
157
|
+
code: z.ZodString;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export type AuthCompleteParams = z.infer<typeof AuthCompleteParamsSchema>;
|
|
160
|
+
/** How a login ended; `disconnected`: the client lost its connection first, and reads the status again. OPEN. */
|
|
161
|
+
export declare const LOGIN_OUTCOMES: readonly ["succeeded", "failed", "cancelled", "expired", "disconnected"];
|
|
162
|
+
export type LoginOutcome = (typeof LOGIN_OUTCOMES)[number] | (string & {});
|
|
163
|
+
/** How a login ended, as `auth/updated` carries it. */
|
|
164
|
+
export declare const AuthLoginEndSchema: z.ZodObject<{
|
|
165
|
+
loginId: z.ZodString;
|
|
166
|
+
outcome: z.ZodType<(string & {}) | "cancelled" | "failed" | "succeeded" | "expired" | "disconnected", unknown, z.core.$ZodTypeInternals<(string & {}) | "cancelled" | "failed" | "succeeded" | "expired" | "disconnected", unknown>>;
|
|
167
|
+
error: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
export type AuthLoginEnd = z.infer<typeof AuthLoginEndSchema>;
|
|
170
|
+
/**
|
|
171
|
+
* `auth/updated` (server -> every connection): a harness's login changed, or
|
|
172
|
+
* a login ended (`login`), whoever caused it: `auth/login`, `auth/logout`, or
|
|
173
|
+
* a login in a terminal that a status read noticed. A login's end is always
|
|
174
|
+
* one of these, with the harness's login after it, as `auth/complete`
|
|
175
|
+
* answers it.
|
|
176
|
+
*/
|
|
177
|
+
export declare const AuthUpdatedSchema: z.ZodObject<{
|
|
178
|
+
auth: z.ZodObject<{
|
|
179
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
180
|
+
email: z.ZodOptional<z.ZodString>;
|
|
181
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
182
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
183
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
184
|
+
state: z.ZodType<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "signed_in" | "signed_out", unknown>>;
|
|
185
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
186
|
+
source: z.ZodOptional<z.ZodType<(string & {}) | "login" | "environment" | "settings" | "product", unknown, z.core.$ZodTypeInternals<(string & {}) | "login" | "environment" | "settings" | "product", unknown>>>;
|
|
187
|
+
label: z.ZodOptional<z.ZodString>;
|
|
188
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
190
|
+
id: z.ZodString;
|
|
191
|
+
kind: z.ZodType<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown, z.core.$ZodTypeInternals<(string & {}) | "terminal" | "api_key" | "browser" | "device_code", unknown>>;
|
|
192
|
+
label: z.ZodString;
|
|
193
|
+
credential: z.ZodOptional<z.ZodType<(string & {}) | "subscription" | "api_key" | "cloud", unknown, z.core.$ZodTypeInternals<(string & {}) | "subscription" | "api_key" | "cloud", unknown>>>;
|
|
194
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
195
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
error: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
loginId: z.ZodString;
|
|
201
|
+
outcome: z.ZodType<(string & {}) | "cancelled" | "failed" | "succeeded" | "expired" | "disconnected", unknown, z.core.$ZodTypeInternals<(string & {}) | "cancelled" | "failed" | "succeeded" | "expired" | "disconnected", unknown>>;
|
|
202
|
+
error: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
export type AuthUpdated = z.infer<typeof AuthUpdatedSchema>;
|
|
206
|
+
/** `auth/cancel`: stop a login under way. */
|
|
207
|
+
export declare const AuthCancelParamsSchema: z.ZodObject<{
|
|
208
|
+
loginId: z.ZodString;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
export type AuthCancelParams = z.infer<typeof AuthCancelParamsSchema>;
|
|
211
|
+
export declare const AuthCancelResultSchema: z.ZodObject<{
|
|
212
|
+
outcome: z.ZodEnum<{
|
|
213
|
+
cancelled: "cancelled";
|
|
214
|
+
not_found: "not_found";
|
|
215
|
+
}>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export type AuthCancelResult = z.infer<typeof AuthCancelResultSchema>;
|
|
218
|
+
/** `auth/logout`: remove the CLI's own login; answers the harness's login after it. */
|
|
219
|
+
export declare const AuthLogoutParamsSchema: z.ZodObject<{
|
|
220
|
+
harness: z.ZodEnum<{
|
|
221
|
+
"claude-code": "claude-code";
|
|
222
|
+
"codex-app-server": "codex-app-server";
|
|
223
|
+
acp: "acp";
|
|
224
|
+
}>;
|
|
225
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
export type AuthLogoutParams = z.infer<typeof AuthLogoutParamsSchema>;
|
|
228
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/protocol/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,iDAAkD,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,+CAAgD,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,0DAA2D,CAAC;AACrF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,4DAA6D,CAAC;AAC5F,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEhF,mCAAmC;AACnC,eAAO,MAAM,gBAAgB;;;;;;;iBAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;iBAY5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAOzE;AAKD,kGAAkG;AAClG,eAAO,MAAM,sBAAsB;;;;;;;iBAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;iBAAiD,CAAC;AACrF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;iBAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;iBAS1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,0GAA0G;AAC1G,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,iHAAiH;AACjH,eAAO,MAAM,cAAc,0EAMjB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE3E,uDAAuD;AACvD,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB;;iBAAoC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,sBAAsB;;;;;iBAA4D,CAAC;AAChG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,uFAAuF;AACvF,eAAO,MAAM,sBAAsB;;;;;;;iBAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic JSON: object keys sorted, `undefined` members dropped, as
|
|
3
|
+
* `JSON.stringify` drops them. The one definition of "the same value" here:
|
|
4
|
+
* a turn's identity (the runtime's admission and the journal's fingerprint
|
|
5
|
+
* agree on it) and the history hash chain, whose stored versions depend on
|
|
6
|
+
* this exact output. Pure JS, so the contract stays safe in any runtime.
|
|
7
|
+
*/
|
|
8
|
+
export declare function canonicalJson(value: unknown): string;
|
|
9
|
+
//# sourceMappingURL=canonical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../../../src/protocol/canonical.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQpD"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Where a harness's CLI is:
|
|
4
|
+
* - `ready` — a turn runs it at once;
|
|
5
|
+
* - `missing` — its first turn (or `clis/prepare`) installs `version`;
|
|
6
|
+
* without a `version`, nothing will (a `system` server): the harness
|
|
7
|
+
* cannot run here;
|
|
8
|
+
* - `installing` — being installed now, `receivedBytes` of `totalBytes`
|
|
9
|
+
* downloaded (none before its download starts);
|
|
10
|
+
* - `failed` — the last install failed, `error` says why; the next turn or
|
|
11
|
+
* prepare tries again;
|
|
12
|
+
* - `unmanaged` — the engine does not install this harness's agent (ACP: the
|
|
13
|
+
* operator's launch command).
|
|
14
|
+
* OPEN: treat a state this build does not know as `missing`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CLI_STATES: readonly ["ready", "missing", "installing", "failed", "unmanaged"];
|
|
17
|
+
export type CliState = (typeof CLI_STATES)[number] | (string & {});
|
|
18
|
+
/**
|
|
19
|
+
* Where a ready CLI comes from: the operator's `override`, a `bundled`
|
|
20
|
+
* folder, the `host`'s install, or the engine's `cache` (where an install
|
|
21
|
+
* puts it). OPEN.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CLI_SOURCES: readonly ["override", "bundled", "host", "cache"];
|
|
24
|
+
export type CliSource = (typeof CLI_SOURCES)[number] | (string & {});
|
|
25
|
+
/** One harness's CLI, as `clis/list` and `clis/prepare` answer it. */
|
|
26
|
+
export declare const HarnessCliSchema: z.ZodObject<{
|
|
27
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
28
|
+
state: z.ZodType<(string & {}) | "failed" | "ready" | "missing" | "installing" | "unmanaged", unknown, z.core.$ZodTypeInternals<(string & {}) | "failed" | "ready" | "missing" | "installing" | "unmanaged", unknown>>;
|
|
29
|
+
version: z.ZodOptional<z.ZodString>;
|
|
30
|
+
source: z.ZodOptional<z.ZodType<(string & {}) | "cache" | "override" | "bundled" | "host", unknown, z.core.$ZodTypeInternals<(string & {}) | "cache" | "override" | "bundled" | "host", unknown>>>;
|
|
31
|
+
receivedBytes: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
error: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type HarnessCli = z.infer<typeof HarnessCliSchema>;
|
|
36
|
+
/** Which harnesses' CLIs to list or prepare: every registered harness's when absent. */
|
|
37
|
+
export declare const ClisParamsSchema: z.ZodObject<{
|
|
38
|
+
harnesses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
39
|
+
"claude-code": "claude-code";
|
|
40
|
+
"codex-app-server": "codex-app-server";
|
|
41
|
+
acp: "acp";
|
|
42
|
+
}>>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type ClisParams = z.infer<typeof ClisParamsSchema>;
|
|
45
|
+
export declare const ClisResultSchema: z.ZodObject<{
|
|
46
|
+
clis: z.ZodArray<z.ZodObject<{
|
|
47
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
48
|
+
state: z.ZodType<(string & {}) | "failed" | "ready" | "missing" | "installing" | "unmanaged", unknown, z.core.$ZodTypeInternals<(string & {}) | "failed" | "ready" | "missing" | "installing" | "unmanaged", unknown>>;
|
|
49
|
+
version: z.ZodOptional<z.ZodString>;
|
|
50
|
+
source: z.ZodOptional<z.ZodType<(string & {}) | "cache" | "override" | "bundled" | "host", unknown, z.core.$ZodTypeInternals<(string & {}) | "cache" | "override" | "bundled" | "host", unknown>>>;
|
|
51
|
+
receivedBytes: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
error: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type ClisResult = z.infer<typeof ClisResultSchema>;
|
|
57
|
+
/** An install's phases: `downloading`, then `verifying`, then `ready`; `failed` at any point. OPEN. */
|
|
58
|
+
export declare const CLI_PHASES: readonly ["downloading", "verifying", "ready", "failed"];
|
|
59
|
+
export type CliPhase = (typeof CLI_PHASES)[number] | (string & {});
|
|
60
|
+
/**
|
|
61
|
+
* `clis/progress` (server -> every connection): a harness's CLI being
|
|
62
|
+
* installed, whoever caused it (a turn, a model list, `clis/prepare`). At
|
|
63
|
+
* most four a second per install, and always its last phase.
|
|
64
|
+
*/
|
|
65
|
+
export declare const HarnessCliProgressSchema: z.ZodObject<{
|
|
66
|
+
harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
|
|
67
|
+
version: z.ZodString;
|
|
68
|
+
phase: z.ZodType<(string & {}) | "failed" | "ready" | "downloading" | "verifying", unknown, z.core.$ZodTypeInternals<(string & {}) | "failed" | "ready" | "downloading" | "verifying", unknown>>;
|
|
69
|
+
receivedBytes: z.ZodNumber;
|
|
70
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
error: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type HarnessCliProgress = z.infer<typeof HarnessCliProgressSchema>;
|
|
74
|
+
//# sourceMappingURL=clis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clis.d.ts","sourceRoot":"","sources":["../../../src/protocol/clis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,oEAAqE,CAAC;AAC7F,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,WAAW,mDAAoD,CAAC;AAC7E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAErE,sEAAsE;AACtE,eAAO,MAAM,gBAAgB;;;;;;;;iBAS3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,wFAAwF;AACxF,eAAO,MAAM,gBAAgB;;;;;;iBAE3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAAgD,CAAC;AAC9E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,uGAAuG;AACvG,eAAO,MAAM,UAAU,0DAA2D,CAAC;AACnF,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Permission posture for a turn. `bypass_permissions` auto-approves every
|
|
4
|
+
* tool (the right default inside a sandbox); `plan` is read-only planning;
|
|
5
|
+
* `dont_ask` never prompts — unapproved tools are denied, sandboxes stay at
|
|
6
|
+
* their normal (non-dangerous) level. Values are snake_case (LLP 0002, Casing);
|
|
7
|
+
* adapters map to provider vocabulary at the edge (Claude SDK: acceptEdits,
|
|
8
|
+
* bypassPermissions).
|
|
9
|
+
*/
|
|
10
|
+
export declare const PermissionModeSchema: z.ZodEnum<{
|
|
11
|
+
default: "default";
|
|
12
|
+
plan: "plan";
|
|
13
|
+
accept_edits: "accept_edits";
|
|
14
|
+
dont_ask: "dont_ask";
|
|
15
|
+
bypass_permissions: "bypass_permissions";
|
|
16
|
+
}>;
|
|
17
|
+
export type PermissionMode = z.infer<typeof PermissionModeSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* A permission mode as the stream reports it (`session.mode`, a turn's
|
|
20
|
+
* `execution`): open, so a mode a newer engine adds reaches an older client
|
|
21
|
+
* intact. A turn's config stays strict.
|
|
22
|
+
*/
|
|
23
|
+
export type ReportedPermissionMode = PermissionMode | (string & {});
|
|
24
|
+
export declare const ReportedPermissionModeSchema: 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>>;
|
|
25
|
+
/** The longest `requestTimeoutMs`: a timer's own limit, about 24.8 days. */
|
|
26
|
+
export declare const MAX_REQUEST_TIMEOUT_MS = 2147483647;
|
|
27
|
+
/** Minimal external MCP server descriptor (stdio or http/sse). */
|
|
28
|
+
export declare const McpServerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"stdio">;
|
|
30
|
+
command: z.ZodString;
|
|
31
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
33
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"http">;
|
|
36
|
+
url: z.ZodString;
|
|
37
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
38
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"sse">;
|
|
41
|
+
url: z.ZodString;
|
|
42
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>], "type">;
|
|
45
|
+
export type McpServerConfig = z.infer<typeof McpServerConfigSchema>;
|
|
46
|
+
/** Everything needed to configure a turn against a harness. */
|
|
47
|
+
export declare const RunConfigSchema: z.ZodObject<{
|
|
48
|
+
harness: z.ZodEnum<{
|
|
49
|
+
"claude-code": "claude-code";
|
|
50
|
+
"codex-app-server": "codex-app-server";
|
|
51
|
+
acp: "acp";
|
|
52
|
+
}>;
|
|
53
|
+
model: z.ZodOptional<z.ZodString>;
|
|
54
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
off: "off";
|
|
56
|
+
low: "low";
|
|
57
|
+
medium: "medium";
|
|
58
|
+
high: "high";
|
|
59
|
+
xhigh: "xhigh";
|
|
60
|
+
max: "max";
|
|
61
|
+
ultra: "ultra";
|
|
62
|
+
}>>;
|
|
63
|
+
cwd: z.ZodString;
|
|
64
|
+
additionalDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
+
systemPromptAppend: z.ZodOptional<z.ZodString>;
|
|
66
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
subagentMode: z.ZodOptional<z.ZodLiteral<"turn">>;
|
|
68
|
+
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
default: "default";
|
|
70
|
+
plan: "plan";
|
|
71
|
+
accept_edits: "accept_edits";
|
|
72
|
+
dont_ask: "dont_ask";
|
|
73
|
+
bypass_permissions: "bypass_permissions";
|
|
74
|
+
}>>;
|
|
75
|
+
elicitation: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
78
|
+
resumeSessionAt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"stdio">;
|
|
81
|
+
command: z.ZodString;
|
|
82
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
84
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"http">;
|
|
87
|
+
url: z.ZodString;
|
|
88
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"sse">;
|
|
92
|
+
url: z.ZodString;
|
|
93
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
94
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
}, z.core.$strip>], "type">>>;
|
|
96
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
97
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
98
|
+
disableTools: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
includeRaw: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type RunConfig = z.infer<typeof RunConfigSchema>;
|
|
102
|
+
/**
|
|
103
|
+
* A single request to run one turn.
|
|
104
|
+
* - `sessionId` is OUR stable logical id (the session-manager key). It is the
|
|
105
|
+
* same across every turn of a conversation.
|
|
106
|
+
* - the harness-native id (for resume) is discovered at runtime and surfaced
|
|
107
|
+
* via the `session.created` lifecycle event.
|
|
108
|
+
*/
|
|
109
|
+
export declare const RunRequestSchema: z.ZodObject<{
|
|
110
|
+
sessionId: z.ZodString;
|
|
111
|
+
turnId: z.ZodString;
|
|
112
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"text">;
|
|
114
|
+
id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
text: z.ZodString;
|
|
116
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
byteRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
118
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
120
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
+
type: z.ZodLiteral<"image">;
|
|
122
|
+
id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
url: z.ZodOptional<z.ZodString>;
|
|
124
|
+
data: z.ZodOptional<z.ZodString>;
|
|
125
|
+
mimeType: z.ZodString;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
type: z.ZodLiteral<"file">;
|
|
128
|
+
id: z.ZodOptional<z.ZodString>;
|
|
129
|
+
url: z.ZodOptional<z.ZodString>;
|
|
130
|
+
data: z.ZodOptional<z.ZodString>;
|
|
131
|
+
mimeType: z.ZodString;
|
|
132
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>], "type">>]>;
|
|
134
|
+
config: z.ZodObject<{
|
|
135
|
+
harness: z.ZodEnum<{
|
|
136
|
+
"claude-code": "claude-code";
|
|
137
|
+
"codex-app-server": "codex-app-server";
|
|
138
|
+
acp: "acp";
|
|
139
|
+
}>;
|
|
140
|
+
model: z.ZodOptional<z.ZodString>;
|
|
141
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
off: "off";
|
|
143
|
+
low: "low";
|
|
144
|
+
medium: "medium";
|
|
145
|
+
high: "high";
|
|
146
|
+
xhigh: "xhigh";
|
|
147
|
+
max: "max";
|
|
148
|
+
ultra: "ultra";
|
|
149
|
+
}>>;
|
|
150
|
+
cwd: z.ZodString;
|
|
151
|
+
additionalDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
152
|
+
systemPromptAppend: z.ZodOptional<z.ZodString>;
|
|
153
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
subagentMode: z.ZodOptional<z.ZodLiteral<"turn">>;
|
|
155
|
+
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
default: "default";
|
|
157
|
+
plan: "plan";
|
|
158
|
+
accept_edits: "accept_edits";
|
|
159
|
+
dont_ask: "dont_ask";
|
|
160
|
+
bypass_permissions: "bypass_permissions";
|
|
161
|
+
}>>;
|
|
162
|
+
elicitation: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
resumeSessionAt: z.ZodOptional<z.ZodString>;
|
|
166
|
+
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
167
|
+
type: z.ZodLiteral<"stdio">;
|
|
168
|
+
command: z.ZodString;
|
|
169
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
170
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
171
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
type: z.ZodLiteral<"http">;
|
|
174
|
+
url: z.ZodString;
|
|
175
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
176
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
type: z.ZodLiteral<"sse">;
|
|
179
|
+
url: z.ZodString;
|
|
180
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
181
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
}, z.core.$strip>], "type">>>;
|
|
183
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
184
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
185
|
+
disableTools: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
includeRaw: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export type RunRequest = z.infer<typeof RunRequestSchema>;
|
|
190
|
+
/**
|
|
191
|
+
* What makes a turn the same turn when a client sends its ids again: its input
|
|
192
|
+
* and the config that shapes what the agent does. What a client's own restart
|
|
193
|
+
* can change without making it another turn stays out: MCP endpoints (a fresh
|
|
194
|
+
* per-session URL), the environment, the API key, and raw passthrough.
|
|
195
|
+
*/
|
|
196
|
+
export declare function turnIdentity(request: Pick<RunRequest, "input" | "config">): {
|
|
197
|
+
input: RunRequest["input"];
|
|
198
|
+
config: Omit<RunConfig, "mcpServers" | "env" | "apiKey" | "includeRaw">;
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/protocol/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACpE,eAAO,MAAM,4BAA4B,yOAA+C,CAAC;AAEzF,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,aAAgB,CAAC;AAWpD,kEAAkE;AAClE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;2BAoBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2D1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;IAC5E,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;CACxE,CAGA"}
|