@zvada/agent-server 0.3.17 → 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 +1060 -0
- package/README.md +50 -26
- 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 +460 -54
- package/docs/deploy.md +218 -47
- package/docs/durable-sessions.md +195 -0
- package/docs/feedback.md +116 -0
- package/docs/harnesses.md +219 -87
- package/docs/sync-history.md +197 -0
- package/docs/sync-integration.md +119 -0
- package/package.json +53 -23
- 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 +641 -602
- package/src/client/connection.ts +371 -0
- package/src/client/history.ts +65 -0
- 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 +60 -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 +11 -34
- 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 +340 -481
- package/src/core/runtime/event-processor.ts +207 -75
- package/src/core/runtime/event-sink.ts +45 -2
- 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 +57 -57
- 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 +275 -0
- package/src/protocol/ids.ts +4 -17
- package/src/protocol/index.ts +10 -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 +425 -57
- 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 +275 -366
- package/src/server/bin.ts +295 -72
- package/src/server/feedback.ts +204 -14
- package/src/server/history.ts +160 -0
- package/src/server/index.ts +4 -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 +289 -0
- package/src/server/subscriptions.ts +232 -0
- package/src/server/transports.ts +125 -25
- package/src/server/wire-error.ts +38 -0
- package/src/sync/event-log.ts +160 -0
- package/src/sync/fit.ts +140 -0
- package/src/sync/history-reader.ts +57 -0
- package/src/sync/history-sqlite.ts +339 -0
- package/src/sync/history.ts +220 -0
- package/src/sync/index.ts +18 -0
- package/src/sync/journal-sqlite.ts +439 -0
- package/src/sync/journal.ts +132 -0
- package/src/sync/live-tails.ts +107 -0
- package/src/sync/node-sqlite.ts +20 -0
- package/src/sync/projection.ts +35 -0
- package/src/sync/recovery.ts +141 -0
- package/src/sync/retry.ts +49 -0
- package/src/sync/schema.ts +77 -0
- package/src/sync/sql.ts +106 -0
- package/src/sync/sqlite-file.ts +38 -0
- package/src/sync/sqlite.ts +21 -0
- package/src/sync/worker.ts +259 -0
- package/docs/rfds/0001-deterministic-echo-ids.md +0 -44
- package/docs/rfds/0002-native-subagents.md +0 -197
- 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,160 @@
|
|
|
1
|
+
import { type InitializeResult, type WireDecodedResult, type WireImplementationInfo, type WireParams, type WireRequestMethod, type WireTransport } from "../protocol/index.ts";
|
|
2
|
+
import { Listeners } from "./listeners.ts";
|
|
3
|
+
import { type OnAnswer, Rpc } from "./rpc.ts";
|
|
4
|
+
/** The transport dropped (and reconnection, if enabled, gave up). */
|
|
5
|
+
export declare class ConnectionClosedError extends Error {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Why a server refused this client, which it answers 401: the token it sent
|
|
10
|
+
* (`token_refused`), or that it sent none (`token_required`).
|
|
11
|
+
*/
|
|
12
|
+
export type ConnectionRefusal = "token_refused" | "token_required";
|
|
13
|
+
/**
|
|
14
|
+
* The server answered, and refused this client (`reason`). Asked again it
|
|
15
|
+
* answers the same, so a client that redials stops: the connection is closed
|
|
16
|
+
* for good, and what waits on it fails with this.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConnectionRefusedError extends ConnectionClosedError {
|
|
19
|
+
readonly reason: ConnectionRefusal;
|
|
20
|
+
/** The server that refused it. */
|
|
21
|
+
readonly url: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
constructor(reason: ConnectionRefusal,
|
|
24
|
+
/** The server that refused it. */
|
|
25
|
+
url: string);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What the client's connection does (`onConnection`): an outage, each redial,
|
|
29
|
+
* and its end. A consumer shows these; the client heals the streams itself.
|
|
30
|
+
*/
|
|
31
|
+
export type ConnectionEvent =
|
|
32
|
+
/** The transport dropped. A client that redials (`reconnect`) starts now. */
|
|
33
|
+
{
|
|
34
|
+
state: "disconnected";
|
|
35
|
+
reason: string;
|
|
36
|
+
}
|
|
37
|
+
/** Redial `attempt` (from 1) starts in `delayMs`; `error` says why the one before failed. */
|
|
38
|
+
| {
|
|
39
|
+
state: "reconnecting";
|
|
40
|
+
attempt: number;
|
|
41
|
+
delayMs: number;
|
|
42
|
+
error?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Redialed and handshaken again, `downMs` after the drop. `serverChanged`:
|
|
46
|
+
* the server does not hold the logs this client followed (it restarted
|
|
47
|
+
* without a journal, or with another one). Their turns failed with
|
|
48
|
+
* `EventGapError`, and a session continued there begins a new history: its
|
|
49
|
+
* native conversation continues only when a turn names it
|
|
50
|
+
* (`config.resumeSessionId`).
|
|
51
|
+
*/
|
|
52
|
+
| {
|
|
53
|
+
state: "reconnected";
|
|
54
|
+
attempts: number;
|
|
55
|
+
downMs: number;
|
|
56
|
+
serverChanged: boolean;
|
|
57
|
+
initialize: InitializeResult;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A redial the server refused (`ConnectionRefusedError`): no outage, its
|
|
61
|
+
* answer, which every redial would get. The client stops; `closed` follows.
|
|
62
|
+
*/
|
|
63
|
+
| {
|
|
64
|
+
state: "refused";
|
|
65
|
+
reason: ConnectionRefusal;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* For good: `close()`, a dropped connection that does not redial,
|
|
69
|
+
* redialing gave up, or the server refused it.
|
|
70
|
+
*/
|
|
71
|
+
| {
|
|
72
|
+
state: "closed";
|
|
73
|
+
reason: string;
|
|
74
|
+
};
|
|
75
|
+
export interface AgentServerClientOptions {
|
|
76
|
+
/**
|
|
77
|
+
* Redial and resubscribe on transport drop. Defaults to true for
|
|
78
|
+
* `connect`, false for `spawn`/`attach` (a respawned server is a new
|
|
79
|
+
* process with empty session state).
|
|
80
|
+
*/
|
|
81
|
+
reconnect?: boolean;
|
|
82
|
+
/** Redials before the client gives up and closes. Default 8; `Infinity` redials until `close()`. */
|
|
83
|
+
maxReconnectAttempts?: number;
|
|
84
|
+
/** Base reconnect delay; grows exponentially, capped at 10s. */
|
|
85
|
+
reconnectDelayMs?: number;
|
|
86
|
+
/** A request unanswered this long fails. With reconnection (connect mode)
|
|
87
|
+
* the connection is presumed half-open and redialed, and the request fails
|
|
88
|
+
* with ConnectionClosedError. Default 30s. */
|
|
89
|
+
requestTimeoutMs?: number;
|
|
90
|
+
/** Attempts to heal one sequence gap before failing its turn. Default 3. */
|
|
91
|
+
maxReplayAttempts?: number;
|
|
92
|
+
/** Delay between failed replay requests. Defaults to reconnectDelayMs. */
|
|
93
|
+
replayRetryDelayMs?: number;
|
|
94
|
+
/** Sent in `initialize`. */
|
|
95
|
+
clientInfo?: WireImplementationInfo;
|
|
96
|
+
}
|
|
97
|
+
export type TransportFactory = () => Promise<WireTransport> | WireTransport;
|
|
98
|
+
/** What the connection tells the client around it. */
|
|
99
|
+
export interface ConnectionHost {
|
|
100
|
+
/** A line from the current transport. */
|
|
101
|
+
line(line: string, transport: WireTransport): void;
|
|
102
|
+
/** A new transport opened; `redialed`: its handshake comes next, before anything else may run. */
|
|
103
|
+
opened(redialed: boolean): void;
|
|
104
|
+
/** The handshake found another server: the logs the client followed are gone. */
|
|
105
|
+
serverChanged(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Redialed and handshaken, after `onConnection` handlers ran and before
|
|
108
|
+
* the requests waiting on the redial are sent again: subscribe again.
|
|
109
|
+
*/
|
|
110
|
+
reconnected(): void;
|
|
111
|
+
/** Gone for good: whatever waits on the connection fails with `error`. */
|
|
112
|
+
closed(error: Error): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The client's connection to its server: the transport, its handshake and
|
|
116
|
+
* the identity of the server behind it, redialing with backoff, the requests
|
|
117
|
+
* in flight, and re-sending those the server converges on.
|
|
118
|
+
*/
|
|
119
|
+
export declare class Connection {
|
|
120
|
+
private readonly factory;
|
|
121
|
+
private readonly options;
|
|
122
|
+
readonly redials: boolean;
|
|
123
|
+
private readonly host;
|
|
124
|
+
transport: WireTransport | null;
|
|
125
|
+
readonly rpc: Rpc;
|
|
126
|
+
readonly events: Listeners<ConnectionEvent>;
|
|
127
|
+
closed: boolean;
|
|
128
|
+
/** The server refused a redial: what every request since fails with. */
|
|
129
|
+
private refusal;
|
|
130
|
+
/** The server process (or, durable, the journal) whose logs the client follows. */
|
|
131
|
+
private serverIdentity;
|
|
132
|
+
private initializing;
|
|
133
|
+
private reconnecting;
|
|
134
|
+
/** Ends the redial backoff early: `close()` must not wait it out. */
|
|
135
|
+
private stopBackoff;
|
|
136
|
+
/** The running reconnect loop, for a request that waits to be re-sent. */
|
|
137
|
+
private reconnection;
|
|
138
|
+
constructor(factory: TransportFactory, options: AgentServerClientOptions, redials: boolean, host: ConnectionHost);
|
|
139
|
+
open(): Promise<void>;
|
|
140
|
+
/** Handshake (memoized). */
|
|
141
|
+
initialize(): Promise<InitializeResult>;
|
|
142
|
+
/** A request, its answer read as `WIRE_API` reads the method's. */
|
|
143
|
+
request<M extends WireRequestMethod>(method: M, params: WireParams<M>, onAnswer?: OnAnswer<WireDecodedResult<M>>): Promise<WireDecodedResult<M>>;
|
|
144
|
+
/**
|
|
145
|
+
* A request the server converges on when repeated (`turn/start`,
|
|
146
|
+
* `turn/steer`), re-sent over a redialed connection: a start whose ack was
|
|
147
|
+
* lost continues instead of failing while the turn runs unseen. Not to a
|
|
148
|
+
* server with fresh logs (a volatile restart): the turn died with the old
|
|
149
|
+
* process, or never reached it, and a re-send could run it again. A few
|
|
150
|
+
* re-sends at most: a server that accepts connections but never answers
|
|
151
|
+
* would otherwise be retried forever.
|
|
152
|
+
*/
|
|
153
|
+
resend<M extends WireRequestMethod>(method: M, params: WireParams<M>, onAnswer?: OnAnswer<WireDecodedResult<M>>): Promise<WireDecodedResult<M>>;
|
|
154
|
+
close(): void;
|
|
155
|
+
private dropped;
|
|
156
|
+
private redial;
|
|
157
|
+
/** Closed for good by the server's refusal, which what waits on the connection fails with. */
|
|
158
|
+
private refused;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/client/connection.ts"],"names":[],"mappings":"AAAA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|
+
/** History RPC adaptation has no execution, reconnection or event-cursor state.
|
|
4
|
+
* A refusal fails with the HistoryError a local store would have thrown. */
|
|
5
|
+
export declare function createHistoryClient(sendRequest: Request, initialize: () => Promise<unknown>, options: {
|
|
6
|
+
requestTimeoutMs?: number;
|
|
7
|
+
}): AsyncHistoryApi;
|
|
8
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/client/history.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,eAAe,EASpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA8B,KAAK,OAAO,EAAoB,MAAM,UAAU,CAAC;AAEtF;4EAC4E;AAC5E,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,OAAO,EACpB,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAClC,OAAO,EAAE;IAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,eAAe,CA6CjB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AgentServerClient, type AgentServerClientOptions, type ConnectOptions, ConnectionClosedError, type ConnectionEvent, type ConnectionRefusal, ConnectionRefusedError, EventGapError, type FollowOptions, type JoinTurnOptions, type SessionEventGap, type SessionSubscription, type SubscribeOptions, type TurnHandle, } from "./client.ts";
|
|
2
|
+
export { LoginError, type LoginHandle } from "./logins.ts";
|
|
3
|
+
export { WireRequestError, refusalData } from "./rpc.ts";
|
|
4
|
+
export { connectTransport, type SpawnServerOptions, socketTransport, spawnTransport, type WebSocketLike, } from "./transports.ts";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACN,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,eAAe,EACf,cAAc,EACd,KAAK,aAAa,GAClB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The handlers of one kind of client event, called in turn: one that throws is ignored. */
|
|
2
|
+
export declare class Listeners<T> {
|
|
3
|
+
private readonly handlers;
|
|
4
|
+
/** Add a handler; returns its removal. */
|
|
5
|
+
add(handler: (value: T) => void): () => void;
|
|
6
|
+
emit(value: T): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=listeners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../../src/client/listeners.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,qBAAa,SAAS,CAAC,CAAC;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,0CAA0C;IAC1C,GAAG,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI;IAK5C,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CASpB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AuthLogin, AuthLoginEnd, AuthUpdated, HarnessAuth } from "../protocol/index.ts";
|
|
2
|
+
import type { ConnectionEvent } from "./connection.ts";
|
|
3
|
+
import type { Listeners } from "./listeners.ts";
|
|
4
|
+
/** A login that ended without succeeding: `outcome` says how (`failed`, `cancelled`, `expired`), the message why. */
|
|
5
|
+
export declare class LoginError extends Error {
|
|
6
|
+
readonly end: AuthLoginEnd;
|
|
7
|
+
readonly outcome: string;
|
|
8
|
+
constructor(end: AuthLoginEnd);
|
|
9
|
+
}
|
|
10
|
+
/** A login under way on the server: where the user signs in, and its end. */
|
|
11
|
+
export interface LoginHandle extends AuthLogin {
|
|
12
|
+
/**
|
|
13
|
+
* Resolves with the harness's login once this one succeeded; rejects with
|
|
14
|
+
* a `LoginError` when it failed, was cancelled or expired, or the
|
|
15
|
+
* connection to the server was lost.
|
|
16
|
+
*/
|
|
17
|
+
readonly done: Promise<HarnessAuth>;
|
|
18
|
+
/** Finish with the code the `codeUrl` page showed; settles as `done` does. */
|
|
19
|
+
complete(code: string): Promise<HarnessAuth>;
|
|
20
|
+
/** Stop it: `done` rejects, `cancelled`. */
|
|
21
|
+
cancel(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/** What a login handle asks of the client. */
|
|
24
|
+
export interface LoginsPort {
|
|
25
|
+
readonly updates: Listeners<AuthUpdated>;
|
|
26
|
+
readonly connection: Listeners<ConnectionEvent>;
|
|
27
|
+
complete(loginId: string, code: string): Promise<AuthUpdated>;
|
|
28
|
+
cancel(loginId: string): Promise<unknown>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Start a login and follow it to its end. Its end is watched for from before
|
|
32
|
+
* the request: `auth/updated` may come before the answer.
|
|
33
|
+
*/
|
|
34
|
+
export declare function startLogin(port: LoginsPort, request: () => Promise<AuthLogin>): Promise<LoginHandle>;
|
|
35
|
+
//# sourceMappingURL=logins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logins.d.ts","sourceRoot":"","sources":["../../../src/client/logins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,qHAAqH;AACrH,qBAAa,UAAW,SAAQ,KAAK;IAGxB,QAAQ,CAAC,GAAG,EAAE,YAAY;IAFtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEJ,GAAG,EAAE,YAAY;CAOtC;AAED,6EAA6E;AAC7E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7C,4CAA4C;IAC5C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC/B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GAC/B,OAAO,CAAC,WAAW,CAAC,CA0DtB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type WireDecodedResult, type WireMessage, type WireParams, type WireRefusalData, type WireRefusalWithData, type WireRequestMethod, type WireTransport } from "../protocol/index.ts";
|
|
2
|
+
export declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000;
|
|
3
|
+
/** The server answered a request with a JSON-RPC error. */
|
|
4
|
+
export declare class WireRequestError extends Error {
|
|
5
|
+
readonly code: number;
|
|
6
|
+
readonly data?: unknown | undefined;
|
|
7
|
+
readonly name = "WireRequestError";
|
|
8
|
+
constructor(code: number, message: string, data?: unknown | undefined);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* What a refusal carries, read by its name (`WIRE_REFUSAL_DATA`): undefined
|
|
12
|
+
* unless `error` is that refusal and its data is well formed. A
|
|
13
|
+
* `resumeRequired` names the conversation to resume, a `recoveryRequired` the
|
|
14
|
+
* head to confirm at.
|
|
15
|
+
*/
|
|
16
|
+
export declare function refusalData<C extends WireRefusalWithData>(error: unknown, name: C): WireRefusalData<C> | undefined;
|
|
17
|
+
/** A request to the server, typed by its method (`WIRE_API`). */
|
|
18
|
+
export type Request = <M extends WireRequestMethod>(method: M, params: WireParams<M>, onAnswer?: OnAnswer<WireDecodedResult<M>>) => Promise<WireDecodedResult<M>>;
|
|
19
|
+
/**
|
|
20
|
+
* What must happen the moment a request's answer arrives, before the line
|
|
21
|
+
* after it runs: a subscription's answer marks a point among the frames, and
|
|
22
|
+
* a frame after it may already be waiting.
|
|
23
|
+
*/
|
|
24
|
+
export type OnAnswer<T> = (result: T) => void;
|
|
25
|
+
/**
|
|
26
|
+
* The client's requests in flight: ids, timeouts and their answers. A
|
|
27
|
+
* response settles its request synchronously, as its line is read.
|
|
28
|
+
*/
|
|
29
|
+
export declare class Rpc {
|
|
30
|
+
private readonly options;
|
|
31
|
+
private nextId;
|
|
32
|
+
private readonly pending;
|
|
33
|
+
constructor(options: {
|
|
34
|
+
requestTimeoutMs?: number;
|
|
35
|
+
/** The error a request unanswered in time fails with. */
|
|
36
|
+
timedOut(transport: WireTransport, method: string): Error;
|
|
37
|
+
});
|
|
38
|
+
/** `decode` reads the answer (the method's `WIRE_API` decoder), throwing on what it cannot read. */
|
|
39
|
+
request<T>(transport: WireTransport, method: string, params: unknown, decode: (raw: unknown) => T, onAnswer?: OnAnswer<T>): Promise<T>;
|
|
40
|
+
/** A response line: settle the request it answers. */
|
|
41
|
+
settle(message: Extract<WireMessage, {
|
|
42
|
+
kind: "response";
|
|
43
|
+
}>): void;
|
|
44
|
+
failAll(error: Error): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/client/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAGlB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,2DAA2D;AAC3D,qBAAa,gBAAiB,SAAQ,KAAK;IAGzC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;IAJxB,SAAkB,IAAI,sBAAsB;gBAElC,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACN,IAAI,CAAC,EAAE,OAAO,YAAA;CAIxB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,mBAAmB,EACxD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,CAAC,GACL,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAEhC;AAED,iEAAiE;AACjE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,iBAAiB,EACjD,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnC;;;;GAIG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AAQ9C;;;GAGG;AACH,qBAAa,GAAG;IAKd,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJzB,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;gBAGvC,OAAO,EAAE;QACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,yDAAyD;QACzD,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;KAC1D;IAGF,oGAAoG;IACpG,OAAO,CAAC,CAAC,EACR,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,CAAC,EAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC;IAwCb,sDAAsD;IACtD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,GAAG,IAAI;IAWjE,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAO3B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type DecodedEventsReplayResult, type DecodedWireEventEnvelope, type SessionOverflowParams, type WireTransport } from "../protocol/index.ts";
|
|
2
|
+
import { Listeners } from "./listeners.ts";
|
|
3
|
+
import type { Turns } from "./turns.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Events were lost irrecoverably: the replay window was evicted or the server
|
|
6
|
+
* restarted. The consumer's local view of the session is stale.
|
|
7
|
+
*/
|
|
8
|
+
export declare class EventGapError extends Error {
|
|
9
|
+
readonly name = "EventGapError";
|
|
10
|
+
}
|
|
11
|
+
/** A delivery failure, reported before surviving events. Execution may continue. */
|
|
12
|
+
export interface SessionEventGap {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
/** `subscription_refused`: the server refused to stream the session again (a redial, an overflow). */
|
|
15
|
+
reason: "evicted" | "replay_failed" | "session_missing" | "server_restarted" | "log_reset" | "subscription_refused";
|
|
16
|
+
error: EventGapError;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Why the client follows a session: it watches it (`subscribe`, `joinTurn`),
|
|
20
|
+
* follows one of its running turns (a start, or a steer), or hears every
|
|
21
|
+
* session (`subscribeAll`).
|
|
22
|
+
*/
|
|
23
|
+
export type Follow = "watch" | {
|
|
24
|
+
turnId: string;
|
|
25
|
+
} | "all";
|
|
26
|
+
/** What the streams ask of the client around them. */
|
|
27
|
+
export interface StreamsHost {
|
|
28
|
+
/** The transport frames come on now; null between connections. */
|
|
29
|
+
transport(): WireTransport | null;
|
|
30
|
+
/** False once the client closed. */
|
|
31
|
+
open(): boolean;
|
|
32
|
+
replay(sessionId: string, fromSeq: number): Promise<DecodedEventsReplayResult>;
|
|
33
|
+
/** Subscribe to the session again, for one of the client's turns or watching it: replay heals the rest. */
|
|
34
|
+
resubscribe(sessionId: string, turnId?: string): void;
|
|
35
|
+
/** Subscribe to every session again. */
|
|
36
|
+
resubscribeAll(): void;
|
|
37
|
+
readonly maxReplayAttempts: number;
|
|
38
|
+
readonly replayRetryDelayMs: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The sessions the client follows, each delivered once and in order: a frame
|
|
42
|
+
* is held, then everything contiguous with what was delivered drains, and a
|
|
43
|
+
* gap heals by replay. A session is followed from a subscription's answer
|
|
44
|
+
* (`subscribe`, `joinTurn`, `runTurn`, `startTurn`) — or, under a
|
|
45
|
+
* subscription to every session, from its first frame — for as long as the
|
|
46
|
+
* server streams it: while it is watched, or one of this client's turns runs
|
|
47
|
+
* in it, or every session is. Then what the client kept of it is let go.
|
|
48
|
+
*/
|
|
49
|
+
export declare class Streams {
|
|
50
|
+
private readonly host;
|
|
51
|
+
private readonly turns;
|
|
52
|
+
/** Per-session seq discipline — the shared `/protocol` implementation. */
|
|
53
|
+
private readonly cursor;
|
|
54
|
+
private readonly streams;
|
|
55
|
+
/** Subscribed to every session (`subscribeAll`). */
|
|
56
|
+
private all;
|
|
57
|
+
/** A redialed transport's handshake is pending: frames wait for it to say which server this is. */
|
|
58
|
+
private paused;
|
|
59
|
+
/** The frames received so far: a subscription's answer marks a point among them. */
|
|
60
|
+
position: number;
|
|
61
|
+
readonly events: Listeners<DecodedWireEventEnvelope>;
|
|
62
|
+
readonly gaps: Listeners<SessionEventGap>;
|
|
63
|
+
constructor(host: StreamsHost, turns: Turns);
|
|
64
|
+
/**
|
|
65
|
+
* What to subscribe to again after a redial: the sessions its turns run in
|
|
66
|
+
* first (a turn's subscription never counts against the server's cap), then
|
|
67
|
+
* those it watches.
|
|
68
|
+
*/
|
|
69
|
+
resubscriptions(): Array<{
|
|
70
|
+
sessionId: string;
|
|
71
|
+
turnId?: string;
|
|
72
|
+
}>;
|
|
73
|
+
get followsAll(): boolean;
|
|
74
|
+
follows(sessionId: string): boolean;
|
|
75
|
+
watches(sessionId: string): boolean;
|
|
76
|
+
/** A frame from the transport. */
|
|
77
|
+
accept(envelope: DecodedWireEventEnvelope, transport: WireTransport): void;
|
|
78
|
+
/**
|
|
79
|
+
* A subscription's answer, the moment it arrives: the point it marks, and
|
|
80
|
+
* why the session is followed from then on. A session followed already
|
|
81
|
+
* keeps its place; a new one starts at `afterSeq`, or at the head and
|
|
82
|
+
* downloads no history. What was kept before the point and the client does
|
|
83
|
+
* not hold is replayed.
|
|
84
|
+
*/
|
|
85
|
+
joined(sessionId: string, headSeq: number, follow: Follow, afterSeq?: number): void;
|
|
86
|
+
/**
|
|
87
|
+
* A subscription's answer says the turn the session is followed for runs
|
|
88
|
+
* no more, so the server streams none of it: it ended by `headSeq`. What
|
|
89
|
+
* the client missed up to there heals, the turn's end with it unless that
|
|
90
|
+
* was evicted; then the session is let go, unless something else follows it.
|
|
91
|
+
*/
|
|
92
|
+
turnEnded(sessionId: string, turnId: string, headSeq: number): void;
|
|
93
|
+
/** Every session's frames, from now: those with a running turn start at their head. */
|
|
94
|
+
joinedAll(sessions: Array<{
|
|
95
|
+
sessionId: string;
|
|
96
|
+
headSeq: number;
|
|
97
|
+
}>): void;
|
|
98
|
+
unfollowAll(): void;
|
|
99
|
+
/** Stop watching the session: a turn of this client's that runs there is followed to its end. */
|
|
100
|
+
unwatch(sessionId: string): void;
|
|
101
|
+
/** The server stopped streaming to this connection: subscribe again from what the client holds. */
|
|
102
|
+
overflowed(notice: SessionOverflowParams): void;
|
|
103
|
+
/** No longer followed: its frames are dropped, and a later subscription starts afresh. */
|
|
104
|
+
forget(sessionId: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* A new transport: replay cannot recover deltas lost during an outage, so
|
|
107
|
+
* each part's next deltas wait for its next snapshot on this one (the open
|
|
108
|
+
* parts a subscription sends).
|
|
109
|
+
*/
|
|
110
|
+
reconnected(redialed: boolean): void;
|
|
111
|
+
/** The redial's handshake is done (fresh logs adopted, if any): what waited for it drains. */
|
|
112
|
+
resume(): void;
|
|
113
|
+
/**
|
|
114
|
+
* The server behind the transport is another one: every log the client
|
|
115
|
+
* followed died with the old process. Their turns fail, and each followed
|
|
116
|
+
* session replays its fresh log from its start, if the new server has one.
|
|
117
|
+
*/
|
|
118
|
+
adoptFreshLogs(): void;
|
|
119
|
+
/** A session's subscription was refused: the server does not know it. */
|
|
120
|
+
missing(sessionId: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* The server refused to stream the session again: it is followed no more,
|
|
123
|
+
* and its turns fail instead of waiting for frames that will not come.
|
|
124
|
+
*/
|
|
125
|
+
refused(sessionId: string, why: string): void;
|
|
126
|
+
/** The server refused to stream every session again: the sessions heard only that way are let go. */
|
|
127
|
+
refusedAll(why: string): void;
|
|
128
|
+
reportGap(sessionId: string, reason: SessionEventGap["reason"], error: EventGapError): void;
|
|
129
|
+
private follow;
|
|
130
|
+
/** Let a session go once nothing follows it: it is not watched, runs no turn of this client's, and not every session is followed. */
|
|
131
|
+
private release;
|
|
132
|
+
/** The turn the session is followed for is over: so is following it for the turn. */
|
|
133
|
+
private endTurn;
|
|
134
|
+
/** Through the seq its turn ended by, the session is followed for it no more. */
|
|
135
|
+
private pastTurn;
|
|
136
|
+
/** Deliver what is contiguous; a gap heals by replay, unless a replay is already under way. */
|
|
137
|
+
private drain;
|
|
138
|
+
/**
|
|
139
|
+
* Deliver the held frames contiguous with what was delivered, in seq
|
|
140
|
+
* order, a kept event before the live frames that carry its seq (which keep
|
|
141
|
+
* the order they arrived in, open parts first). The verdicts come from the
|
|
142
|
+
* shared `SeqCursor`.
|
|
143
|
+
*/
|
|
144
|
+
private settle;
|
|
145
|
+
/** A frame the cursor accepted: to `onEvent`, then to the session's turn handles. */
|
|
146
|
+
private deliver;
|
|
147
|
+
/** Replay the session from what was delivered, page by page, until its held frames drain. */
|
|
148
|
+
private heal;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=streams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../../src/client/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACvC,SAAkB,IAAI,mBAAmB;CACzC;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,MAAM,EACH,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,kBAAkB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AAS,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI;IAK3F,OAAO,CAAC,MAAM;IAMd,qIAAqI;IACrI,OAAO,CAAC,OAAO;IAIf,qFAAqF;IACrF,OAAO,CAAC,OAAO;IAKf,iFAAiF;IACjF,OAAO,CAAC,QAAQ;IAQhB,+FAA+F;IAC/F,OAAO,CAAC,KAAK;IAKb;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IA0Cd,qFAAqF;IACrF,OAAO,CAAC,OAAO;IAsBf,6FAA6F;YAC/E,IAAI;CA8ElB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type WireTransport } from "../protocol/index.ts";
|
|
2
|
+
export interface SpawnServerOptions {
|
|
3
|
+
command: string;
|
|
4
|
+
args?: string[];
|
|
5
|
+
cwd?: string;
|
|
6
|
+
env?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Spawn an agent-server subprocess and talk NDJSON over its stdio
|
|
10
|
+
* (deus-machine's model). The child's stderr passes through to ours.
|
|
11
|
+
*/
|
|
12
|
+
export declare function spawnTransport(opts: SpawnServerOptions): WireTransport;
|
|
13
|
+
/**
|
|
14
|
+
* Dial a listening agent-server; resolves once the socket is open. `headers`
|
|
15
|
+
* go with the upgrade (Bun and Node; a browser's WebSocket sends none). A
|
|
16
|
+
* server that refuses the client rejects it with `ConnectionRefusedError`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function connectTransport(url: string, headers?: Record<string, string>): Promise<WireTransport>;
|
|
19
|
+
/**
|
|
20
|
+
* The subset of a WebSocket this package needs — matches browser/Bun/Node and
|
|
21
|
+
* Cloudflare Workers sockets alike.
|
|
22
|
+
*/
|
|
23
|
+
export interface WebSocketLike {
|
|
24
|
+
send(data: string): void;
|
|
25
|
+
close(): void;
|
|
26
|
+
addEventListener(type: "message" | "close", listener: (event: {
|
|
27
|
+
data?: unknown;
|
|
28
|
+
}) => void): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Wrap an already-accepted socket (echo's model: the sandboxed server dialed
|
|
32
|
+
* out to us and this is the accepted end).
|
|
33
|
+
*/
|
|
34
|
+
export declare function socketTransport(socket: WebSocketLike): WireTransport;
|
|
35
|
+
//# sourceMappingURL=transports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../../src/client/transports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAqC,MAAM,sBAAsB,CAAC;AAG7F,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,aAAa,CA0BtE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,aAAa,CAAC,CA8BxB;AAsCD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,IAAI,IAAI,CAAC;IACd,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,GAAG,IAAI,CAAC;CACjG;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAQpE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type AgentInput, AsyncQueue, type DecodedLifecycleEvent, type DecodedWireEventEnvelope, type TurnEndedEvent, type TurnSteerResult, type UnknownEvent } from "../protocol/index.ts";
|
|
2
|
+
/** What a turn's handle yields: an unknown event type is delivered in order, not dropped. */
|
|
3
|
+
export type TurnEvent = DecodedLifecycleEvent | UnknownEvent;
|
|
4
|
+
/**
|
|
5
|
+
* A running turn: consume `events` (ends after `turn.ended`) or await `result`.
|
|
6
|
+
*
|
|
7
|
+
* `events` yields `UnknownEvent`s too: a newer server's event type is
|
|
8
|
+
* delivered in order rather than dropped, so consumers persist and forward it.
|
|
9
|
+
* Narrow with `isUnknownEvent` before switching on a known `type`;
|
|
10
|
+
* `reduceConversation` already accepts the union as-is.
|
|
11
|
+
*/
|
|
12
|
+
export interface TurnHandle {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
turnId: string;
|
|
15
|
+
events: AsyncIterableIterator<TurnEvent>;
|
|
16
|
+
result: Promise<TurnEndedEvent>;
|
|
17
|
+
/**
|
|
18
|
+
* How many of the first `events` are the catch-up: the session's kept
|
|
19
|
+
* events, replayed, from where the handle joined (`joinTurn`'s `fromSeq`,
|
|
20
|
+
* a retried start's `startedSeq`) up to the point it joined at. 0 for a
|
|
21
|
+
* turn this client started. A request among them may already be answered
|
|
22
|
+
* further on.
|
|
23
|
+
*/
|
|
24
|
+
readonly catchUp: number;
|
|
25
|
+
/** Add input to this turn while it runs (see `AgentServerClient.steerTurn`). */
|
|
26
|
+
steer(input: AgentInput, steerId?: string): Promise<TurnSteerResult>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Where a handle joined its session: what came after the point is its, the
|
|
30
|
+
* kept events after `headSeq` and the live frames that arrived after the
|
|
31
|
+
* `position`-th frame the client received.
|
|
32
|
+
*/
|
|
33
|
+
export interface JoinPoint {
|
|
34
|
+
headSeq: number;
|
|
35
|
+
position: number;
|
|
36
|
+
}
|
|
37
|
+
/** One handle's view of its session, from its point through its turn's end. */
|
|
38
|
+
declare class Handle {
|
|
39
|
+
readonly sessionId: string;
|
|
40
|
+
readonly turnId: string;
|
|
41
|
+
/** This client started the turn (`runTurn`), as opposed to joining it. */
|
|
42
|
+
readonly own: boolean;
|
|
43
|
+
private readonly settled;
|
|
44
|
+
readonly queue: AsyncQueue<TurnEvent>;
|
|
45
|
+
readonly result: Promise<TurnEndedEvent>;
|
|
46
|
+
catchUp: number;
|
|
47
|
+
point: JoinPoint | undefined;
|
|
48
|
+
done: boolean;
|
|
49
|
+
/** Frames after the point, waiting for the catch-up before them. */
|
|
50
|
+
private waiting;
|
|
51
|
+
private resolve;
|
|
52
|
+
private reject;
|
|
53
|
+
constructor(sessionId: string, turnId: string,
|
|
54
|
+
/** This client started the turn (`runTurn`), as opposed to joining it. */
|
|
55
|
+
own: boolean, settled: (handle: Handle) => void);
|
|
56
|
+
/** A frame the client delivered for the session: the handle's if it is after its point. */
|
|
57
|
+
take(envelope: DecodedWireEventEnvelope, arrival: number): void;
|
|
58
|
+
/** Hold what comes after the point until the catch-up before it is in. */
|
|
59
|
+
catchingUp(): void;
|
|
60
|
+
/** The catch-up is in: it goes first, then what waited for it. */
|
|
61
|
+
caughtUp(replayed: TurnEvent[]): void;
|
|
62
|
+
push(event: TurnEvent): void;
|
|
63
|
+
end(ended: TurnEndedEvent): void;
|
|
64
|
+
fail(error: unknown): void;
|
|
65
|
+
}
|
|
66
|
+
/** The turn handles of a client, by session; a session may have several (`joinTurn`). */
|
|
67
|
+
export declare class Turns {
|
|
68
|
+
private readonly bySession;
|
|
69
|
+
/** A handle for a turn of the session: it takes frames once it `join`s a point. */
|
|
70
|
+
open(sessionId: string, turnId: string, own: boolean): Handle;
|
|
71
|
+
/** Whether this client runs a turn of the session (one at a time). */
|
|
72
|
+
running(sessionId: string): boolean;
|
|
73
|
+
sessions(): string[];
|
|
74
|
+
/** A frame the client delivered: to each handle of its session. */
|
|
75
|
+
deliver(envelope: DecodedWireEventEnvelope, arrival: number): void;
|
|
76
|
+
fail(sessionId: string, error: Error): void;
|
|
77
|
+
failAll(error: Error): void;
|
|
78
|
+
private close;
|
|
79
|
+
}
|
|
80
|
+
export type { Handle };
|
|
81
|
+
//# sourceMappingURL=turns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turns.d.ts","sourceRoot":"","sources":["../../../src/client/turns.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAGjB,MAAM,sBAAsB,CAAC;AAE9B,6FAA6F;AAC7F,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG,YAAY,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrE;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,+EAA+E;AAC/E,cAAM,MAAM;IAYV,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,OAAO;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAfzB,QAAQ,CAAC,KAAK,wBAA+B;IAC7C,QAAQ,C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