@zvada/agent-server 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +11 -26
- package/CHANGELOG.md +1005 -1
- package/README.md +35 -39
- package/dist/types/accounts/chatgpt.d.ts +34 -0
- package/dist/types/accounts/chatgpt.d.ts.map +1 -0
- package/dist/types/accounts/check.d.ts +24 -0
- package/dist/types/accounts/check.d.ts.map +1 -0
- package/dist/types/accounts/claude.d.ts +21 -0
- package/dist/types/accounts/claude.d.ts.map +1 -0
- package/dist/types/accounts/endpoint.d.ts +50 -0
- package/dist/types/accounts/endpoint.d.ts.map +1 -0
- package/dist/types/accounts/http.d.ts +38 -0
- package/dist/types/accounts/http.d.ts.map +1 -0
- package/dist/types/accounts/index.d.ts +6 -0
- package/dist/types/accounts/index.d.ts.map +1 -0
- package/dist/types/client/client.d.ts +272 -0
- package/dist/types/client/client.d.ts.map +1 -0
- package/dist/types/client/connection.d.ts +160 -0
- package/dist/types/client/connection.d.ts.map +1 -0
- package/dist/types/client/history.d.ts +8 -0
- package/dist/types/client/history.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +5 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/listeners.d.ts +8 -0
- package/dist/types/client/listeners.d.ts.map +1 -0
- package/dist/types/client/logins.d.ts +35 -0
- package/dist/types/client/logins.d.ts.map +1 -0
- package/dist/types/client/rpc.d.ts +46 -0
- package/dist/types/client/rpc.d.ts.map +1 -0
- package/dist/types/client/streams.d.ts +150 -0
- package/dist/types/client/streams.d.ts.map +1 -0
- package/dist/types/client/transports.d.ts +35 -0
- package/dist/types/client/transports.d.ts.map +1 -0
- package/dist/types/client/turns.d.ts +81 -0
- package/dist/types/client/turns.d.ts.map +1 -0
- package/dist/types/core/agents/acp/acp-agent.d.ts +68 -0
- package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -0
- package/dist/types/core/agents/acp/adapter.d.ts +39 -0
- package/dist/types/core/agents/acp/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/acp/client.d.ts +90 -0
- package/dist/types/core/agents/acp/client.d.ts.map +1 -0
- package/dist/types/core/agents/acp/known-agents.d.ts +35 -0
- package/dist/types/core/agents/acp/known-agents.d.ts.map +1 -0
- package/dist/types/core/agents/acp/mappings.d.ts +46 -0
- package/dist/types/core/agents/acp/mappings.d.ts.map +1 -0
- package/dist/types/core/agents/acp/requests.d.ts +26 -0
- package/dist/types/core/agents/acp/requests.d.ts.map +1 -0
- package/dist/types/core/agents/attachments.d.ts +11 -0
- package/dist/types/core/agents/attachments.d.ts.map +1 -0
- package/dist/types/core/agents/base.d.ts +227 -0
- package/dist/types/core/agents/base.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/adapter.d.ts +58 -0
- package/dist/types/core/agents/claude-code/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/approvals.d.ts +26 -0
- package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/claude-agent.d.ts +70 -0
- package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/credentials.d.ts +54 -0
- package/dist/types/core/agents/claude-code/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/events.d.ts +42 -0
- package/dist/types/core/agents/claude-code/events.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/login.d.ts +61 -0
- package/dist/types/core/agents/claude-code/login.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/mcp.d.ts +52 -0
- package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/models.d.ts +30 -0
- package/dist/types/core/agents/claude-code/models.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/options.d.ts +183 -0
- package/dist/types/core/agents/claude-code/options.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/outcome.d.ts +50 -0
- package/dist/types/core/agents/claude-code/outcome.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/session-pool.d.ts +36 -0
- package/dist/types/core/agents/claude-code/session-pool.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/session.d.ts +148 -0
- package/dist/types/core/agents/claude-code/session.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/spawn.d.ts +29 -0
- package/dist/types/core/agents/claude-code/spawn.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/spend.d.ts +58 -0
- package/dist/types/core/agents/claude-code/spend.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/tools.d.ts +4 -0
- package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/turn-usage.d.ts +52 -0
- package/dist/types/core/agents/claude-code/turn-usage.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/turn.d.ts +121 -0
- package/dist/types/core/agents/claude-code/turn.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/adapter.d.ts +59 -0
- package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/client.d.ts +116 -0
- package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +113 -0
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/commands.d.ts +66 -0
- package/dist/types/core/agents/codex-app-server/commands.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/credentials.d.ts +49 -0
- package/dist/types/core/agents/codex-app-server/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/effort.d.ts +12 -0
- package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/events.d.ts +45 -0
- package/dist/types/core/agents/codex-app-server/events.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/homes.d.ts +20 -0
- package/dist/types/core/agents/codex-app-server/homes.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/input.d.ts +26 -0
- package/dist/types/core/agents/codex-app-server/input.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/items.d.ts +31 -0
- package/dist/types/core/agents/codex-app-server/items.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/login.d.ts +38 -0
- package/dist/types/core/agents/codex-app-server/login.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/mcp.d.ts +62 -0
- package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/models.d.ts +67 -0
- package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/options.d.ts +40 -0
- package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts +19 -0
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/protocol.d.ts +99 -0
- package/dist/types/core/agents/codex-app-server/protocol.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/requests.d.ts +42 -0
- package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/session.d.ts +96 -0
- package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/subagents.d.ts +53 -0
- package/dist/types/core/agents/codex-app-server/subagents.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts +87 -0
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts +33 -0
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts.map +1 -0
- package/dist/types/core/agents/codex-app-server/turn.d.ts +163 -0
- package/dist/types/core/agents/codex-app-server/turn.d.ts.map +1 -0
- package/dist/types/core/agents/config-fingerprint.d.ts +5 -0
- package/dist/types/core/agents/config-fingerprint.d.ts.map +1 -0
- package/dist/types/core/agents/credentials.d.ts +28 -0
- package/dist/types/core/agents/credentials.d.ts.map +1 -0
- package/dist/types/core/agents/elicitation.d.ts +37 -0
- package/dist/types/core/agents/elicitation.d.ts.map +1 -0
- package/dist/types/core/agents/inherit-config.d.ts +18 -0
- package/dist/types/core/agents/inherit-config.d.ts.map +1 -0
- package/dist/types/core/agents/login.d.ts +67 -0
- package/dist/types/core/agents/login.d.ts.map +1 -0
- package/dist/types/core/agents/mcp-config.d.ts +57 -0
- package/dist/types/core/agents/mcp-config.d.ts.map +1 -0
- package/dist/types/core/agents/plan.d.ts +16 -0
- package/dist/types/core/agents/plan.d.ts.map +1 -0
- package/dist/types/core/agents/registry.d.ts +30 -0
- package/dist/types/core/agents/registry.d.ts.map +1 -0
- package/dist/types/core/agents/session-agent.d.ts +48 -0
- package/dist/types/core/agents/session-agent.d.ts.map +1 -0
- package/dist/types/core/agents/session-pool.d.ts +41 -0
- package/dist/types/core/agents/session-pool.d.ts.map +1 -0
- package/dist/types/core/agents/stderr-tail.d.ts +28 -0
- package/dist/types/core/agents/stderr-tail.d.ts.map +1 -0
- package/dist/types/core/agents/thinking-levels.d.ts +4 -0
- package/dist/types/core/agents/thinking-levels.d.ts.map +1 -0
- package/dist/types/core/agents/types.d.ts +124 -0
- package/dist/types/core/agents/types.d.ts.map +1 -0
- package/dist/types/core/diagnostics.d.ts +36 -0
- package/dist/types/core/diagnostics.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +29 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/presets.d.ts +80 -0
- package/dist/types/core/presets.d.ts.map +1 -0
- package/dist/types/core/processes/identity.d.ts +31 -0
- package/dist/types/core/processes/identity.d.ts.map +1 -0
- package/dist/types/core/processes/lifeline.d.ts +47 -0
- package/dist/types/core/processes/lifeline.d.ts.map +1 -0
- package/dist/types/core/processes/native-processes.d.ts +130 -0
- package/dist/types/core/processes/native-processes.d.ts.map +1 -0
- package/dist/types/core/processes/process-table.d.ts +43 -0
- package/dist/types/core/processes/process-table.d.ts.map +1 -0
- package/dist/types/core/provision/cache-trust.d.ts +13 -0
- package/dist/types/core/provision/cache-trust.d.ts.map +1 -0
- package/dist/types/core/provision/cache-usage.d.ts +14 -0
- package/dist/types/core/provision/cache-usage.d.ts.map +1 -0
- package/dist/types/core/provision/checksums.d.ts +46 -0
- package/dist/types/core/provision/checksums.d.ts.map +1 -0
- package/dist/types/core/provision/extract.d.ts +7 -0
- package/dist/types/core/provision/extract.d.ts.map +1 -0
- package/dist/types/core/provision/index.d.ts +5 -0
- package/dist/types/core/provision/index.d.ts.map +1 -0
- package/dist/types/core/provision/install-build.d.ts +36 -0
- package/dist/types/core/provision/install-build.d.ts.map +1 -0
- package/dist/types/core/provision/npm.d.ts +40 -0
- package/dist/types/core/provision/npm.d.ts.map +1 -0
- package/dist/types/core/provision/pins.d.ts +24 -0
- package/dist/types/core/provision/pins.d.ts.map +1 -0
- package/dist/types/core/provision/platform.d.ts +28 -0
- package/dist/types/core/provision/platform.d.ts.map +1 -0
- package/dist/types/core/provision/provisioner.d.ts +189 -0
- package/dist/types/core/provision/provisioner.d.ts.map +1 -0
- package/dist/types/core/provision/releases.d.ts +8 -0
- package/dist/types/core/provision/releases.d.ts.map +1 -0
- package/dist/types/core/provision/tools.d.ts +81 -0
- package/dist/types/core/provision/tools.d.ts.map +1 -0
- package/dist/types/core/proxy/anthropic-proxy.d.ts +52 -0
- package/dist/types/core/proxy/anthropic-proxy.d.ts.map +1 -0
- package/dist/types/core/proxy/api-key-store.d.ts +37 -0
- package/dist/types/core/proxy/api-key-store.d.ts.map +1 -0
- package/dist/types/core/proxy/index.d.ts +3 -0
- package/dist/types/core/proxy/index.d.ts.map +1 -0
- package/dist/types/core/proxy/loopback.d.ts +14 -0
- package/dist/types/core/proxy/loopback.d.ts.map +1 -0
- package/dist/types/core/runtime/agent-runtime.d.ts +181 -0
- package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -0
- package/dist/types/core/runtime/event-processor.d.ts +87 -0
- package/dist/types/core/runtime/event-processor.d.ts.map +1 -0
- package/dist/types/core/runtime/event-sink.d.ts +44 -0
- package/dist/types/core/runtime/event-sink.d.ts.map +1 -0
- package/dist/types/core/runtime/harness-clis.d.ts +10 -0
- package/dist/types/core/runtime/harness-clis.d.ts.map +1 -0
- package/dist/types/core/runtime/harness-logins.d.ts +68 -0
- package/dist/types/core/runtime/harness-logins.d.ts.map +1 -0
- package/dist/types/core/runtime/login-reads.d.ts +28 -0
- package/dist/types/core/runtime/login-reads.d.ts.map +1 -0
- package/dist/types/core/runtime/model-lists.d.ts +37 -0
- package/dist/types/core/runtime/model-lists.d.ts.map +1 -0
- package/dist/types/core/runtime/permission-policy.d.ts +61 -0
- package/dist/types/core/runtime/permission-policy.d.ts.map +1 -0
- package/dist/types/core/runtime/request-broker.d.ts +49 -0
- package/dist/types/core/runtime/request-broker.d.ts.map +1 -0
- package/dist/types/core/runtime/steering.d.ts +38 -0
- package/dist/types/core/runtime/steering.d.ts.map +1 -0
- package/dist/types/core/runtime/turn-outcome.d.ts +21 -0
- package/dist/types/core/runtime/turn-outcome.d.ts.map +1 -0
- package/dist/types/core/runtime/turn.d.ts +121 -0
- package/dist/types/core/runtime/turn.d.ts.map +1 -0
- package/dist/types/core/utils/bounded.d.ts +6 -0
- package/dist/types/core/utils/bounded.d.ts.map +1 -0
- package/dist/types/core/utils/deadline.d.ts +14 -0
- package/dist/types/core/utils/deadline.d.ts.map +1 -0
- package/dist/types/core/utils/errors.d.ts +104 -0
- package/dist/types/core/utils/errors.d.ts.map +1 -0
- package/dist/types/core/utils/is-record.d.ts +3 -0
- package/dist/types/core/utils/is-record.d.ts.map +1 -0
- package/dist/types/core/utils/loopback.d.ts +6 -0
- package/dist/types/core/utils/loopback.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/protocol/account.d.ts +26 -0
- package/dist/types/protocol/account.d.ts.map +1 -0
- package/dist/types/protocol/async-queue.d.ts +21 -0
- package/dist/types/protocol/async-queue.d.ts.map +1 -0
- package/dist/types/protocol/auth.d.ts +228 -0
- package/dist/types/protocol/auth.d.ts.map +1 -0
- package/dist/types/protocol/canonical.d.ts +9 -0
- package/dist/types/protocol/canonical.d.ts.map +1 -0
- package/dist/types/protocol/clis.d.ts +74 -0
- package/dist/types/protocol/clis.d.ts.map +1 -0
- package/dist/types/protocol/config.d.ts +200 -0
- package/dist/types/protocol/config.d.ts.map +1 -0
- package/dist/types/protocol/conversation.d.ts +942 -0
- package/dist/types/protocol/conversation.d.ts.map +1 -0
- package/dist/types/protocol/credentials.d.ts +145 -0
- package/dist/types/protocol/credentials.d.ts.map +1 -0
- package/dist/types/protocol/errors.d.ts +36 -0
- package/dist/types/protocol/errors.d.ts.map +1 -0
- package/dist/types/protocol/execution.d.ts +28 -0
- package/dist/types/protocol/execution.d.ts.map +1 -0
- package/dist/types/protocol/factories.d.ts +94 -0
- package/dist/types/protocol/factories.d.ts.map +1 -0
- package/dist/types/protocol/guards.d.ts +55 -0
- package/dist/types/protocol/guards.d.ts.map +1 -0
- package/dist/types/protocol/harness.d.ts +70 -0
- package/dist/types/protocol/harness.d.ts.map +1 -0
- package/dist/types/protocol/history.d.ts +318 -0
- package/dist/types/protocol/history.d.ts.map +1 -0
- package/dist/types/protocol/ids.d.ts +9 -0
- package/dist/types/protocol/ids.d.ts.map +1 -0
- package/dist/types/protocol/index.d.ts +35 -0
- package/dist/types/protocol/index.d.ts.map +1 -0
- package/dist/types/protocol/lifecycle.d.ts +1190 -0
- package/dist/types/protocol/lifecycle.d.ts.map +1 -0
- package/dist/types/protocol/meta-keys.d.ts +17 -0
- package/dist/types/protocol/meta-keys.d.ts.map +1 -0
- package/dist/types/protocol/meta.d.ts +13 -0
- package/dist/types/protocol/meta.d.ts.map +1 -0
- package/dist/types/protocol/model-catalog.d.ts +11 -0
- package/dist/types/protocol/model-catalog.d.ts.map +1 -0
- package/dist/types/protocol/models.d.ts +107 -0
- package/dist/types/protocol/models.d.ts.map +1 -0
- package/dist/types/protocol/part-input.d.ts +101 -0
- package/dist/types/protocol/part-input.d.ts.map +1 -0
- package/dist/types/protocol/parts.d.ts +357 -0
- package/dist/types/protocol/parts.d.ts.map +1 -0
- package/dist/types/protocol/reduce.d.ts +26 -0
- package/dist/types/protocol/reduce.d.ts.map +1 -0
- package/dist/types/protocol/selectors.d.ts +64 -0
- package/dist/types/protocol/selectors.d.ts.map +1 -0
- package/dist/types/protocol/seq-cursor.d.ts +66 -0
- package/dist/types/protocol/seq-cursor.d.ts.map +1 -0
- package/dist/types/protocol/stop-reasons.d.ts +33 -0
- package/dist/types/protocol/stop-reasons.d.ts.map +1 -0
- package/dist/types/protocol/thinking.d.ts +28 -0
- package/dist/types/protocol/thinking.d.ts.map +1 -0
- package/dist/types/protocol/time.d.ts +21 -0
- package/dist/types/protocol/time.d.ts.map +1 -0
- package/dist/types/protocol/tokens.d.ts +29 -0
- package/dist/types/protocol/tokens.d.ts.map +1 -0
- package/dist/types/protocol/tool-closure.d.ts +25 -0
- package/dist/types/protocol/tool-closure.d.ts.map +1 -0
- package/dist/types/protocol/tool-state.d.ts +209 -0
- package/dist/types/protocol/tool-state.d.ts.map +1 -0
- package/dist/types/protocol/verify.d.ts +52 -0
- package/dist/types/protocol/verify.d.ts.map +1 -0
- package/dist/types/protocol/vocabulary.d.ts +19 -0
- package/dist/types/protocol/vocabulary.d.ts.map +1 -0
- package/dist/types/protocol/wire-api.d.ts +1983 -0
- package/dist/types/protocol/wire-api.d.ts.map +1 -0
- package/dist/types/protocol/wire.d.ts +1758 -0
- package/dist/types/protocol/wire.d.ts.map +1 -0
- package/dist/types/server/acp/binding.d.ts +33 -0
- package/dist/types/server/acp/binding.d.ts.map +1 -0
- package/dist/types/server/acp/session-records.d.ts +17 -0
- package/dist/types/server/acp/session-records.d.ts.map +1 -0
- package/dist/types/server/acp/translate.d.ts +48 -0
- package/dist/types/server/acp/translate.d.ts.map +1 -0
- package/dist/types/server/agent-server.d.ts +121 -0
- package/dist/types/server/agent-server.d.ts.map +1 -0
- package/dist/types/server/feedback.d.ts +37 -0
- package/dist/types/server/feedback.d.ts.map +1 -0
- package/dist/types/server/history.d.ts +15 -0
- package/dist/types/server/history.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +7 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/install.d.ts +42 -0
- package/dist/types/server/install.d.ts.map +1 -0
- package/dist/types/server/open-parts.d.ts +27 -0
- package/dist/types/server/open-parts.d.ts.map +1 -0
- package/dist/types/server/routes.d.ts +61 -0
- package/dist/types/server/routes.d.ts.map +1 -0
- package/dist/types/server/secrets.d.ts +11 -0
- package/dist/types/server/secrets.d.ts.map +1 -0
- package/dist/types/server/session-gate.d.ts +32 -0
- package/dist/types/server/session-gate.d.ts.map +1 -0
- package/dist/types/server/session-log.d.ts +39 -0
- package/dist/types/server/session-log.d.ts.map +1 -0
- package/dist/types/server/session-store.d.ts +119 -0
- package/dist/types/server/session-store.d.ts.map +1 -0
- package/dist/types/server/subscriptions.d.ts +74 -0
- package/dist/types/server/subscriptions.d.ts.map +1 -0
- package/dist/types/server/transports.d.ts +74 -0
- package/dist/types/server/transports.d.ts.map +1 -0
- package/dist/types/server/wire-error.d.ts +9 -0
- package/dist/types/server/wire-error.d.ts.map +1 -0
- package/dist/types/sync/event-log.d.ts +45 -0
- package/dist/types/sync/event-log.d.ts.map +1 -0
- package/dist/types/sync/fit.d.ts +40 -0
- package/dist/types/sync/fit.d.ts.map +1 -0
- package/dist/types/sync/history-reader.d.ts +8 -0
- package/dist/types/sync/history-reader.d.ts.map +1 -0
- package/dist/types/sync/history-sqlite.d.ts +37 -0
- package/dist/types/sync/history-sqlite.d.ts.map +1 -0
- package/dist/types/sync/history.d.ts +70 -0
- package/dist/types/sync/history.d.ts.map +1 -0
- package/dist/types/sync/index.d.ts +4 -0
- package/dist/types/sync/index.d.ts.map +1 -0
- package/dist/types/sync/journal-sqlite.d.ts +51 -0
- package/dist/types/sync/journal-sqlite.d.ts.map +1 -0
- package/dist/types/sync/journal.d.ts +107 -0
- package/dist/types/sync/journal.d.ts.map +1 -0
- package/dist/types/sync/live-tails.d.ts +30 -0
- package/dist/types/sync/live-tails.d.ts.map +1 -0
- package/dist/types/sync/node-sqlite.d.ts +7 -0
- package/dist/types/sync/node-sqlite.d.ts.map +1 -0
- package/dist/types/sync/projection.d.ts +10 -0
- package/dist/types/sync/projection.d.ts.map +1 -0
- package/dist/types/sync/recovery.d.ts +25 -0
- package/dist/types/sync/recovery.d.ts.map +1 -0
- package/dist/types/sync/retry.d.ts +25 -0
- package/dist/types/sync/retry.d.ts.map +1 -0
- package/dist/types/sync/schema.d.ts +4 -0
- package/dist/types/sync/schema.d.ts.map +1 -0
- package/dist/types/sync/sql.d.ts +38 -0
- package/dist/types/sync/sql.d.ts.map +1 -0
- package/dist/types/sync/sqlite-file.d.ts +9 -0
- package/dist/types/sync/sqlite-file.d.ts.map +1 -0
- package/dist/types/sync/sqlite.d.ts +6 -0
- package/dist/types/sync/sqlite.d.ts.map +1 -0
- package/dist/types/sync/worker.d.ts +63 -0
- package/dist/types/sync/worker.d.ts.map +1 -0
- package/docs/consuming.md +452 -53
- package/docs/deploy.md +218 -47
- package/docs/{sync-experiment.md → durable-sessions.md} +77 -72
- package/docs/feedback.md +116 -0
- package/docs/harnesses.md +212 -88
- package/docs/sync-history.md +29 -13
- package/docs/sync-integration.md +52 -66
- package/package.json +43 -25
- package/src/accounts/chatgpt.ts +194 -0
- package/src/accounts/check.ts +112 -0
- package/src/accounts/claude.ts +111 -0
- package/src/accounts/endpoint.ts +151 -0
- package/src/accounts/http.ts +97 -0
- package/src/accounts/index.ts +19 -0
- package/src/client/client.ts +604 -670
- package/src/client/connection.ts +371 -0
- package/src/client/history.ts +29 -52
- package/src/client/index.ts +11 -2
- package/src/client/listeners.ts +20 -0
- package/src/client/logins.ts +105 -0
- package/src/client/rpc.ts +144 -0
- package/src/client/streams.ts +488 -0
- package/src/client/transports.ts +62 -8
- package/src/client/turns.ts +171 -0
- package/src/core/agents/acp/acp-agent.ts +94 -118
- package/src/core/agents/acp/adapter.ts +20 -9
- package/src/core/agents/acp/client.ts +125 -47
- package/src/core/agents/acp/known-agents.ts +36 -4
- package/src/core/agents/acp/mappings.ts +64 -18
- package/src/core/agents/acp/requests.ts +125 -0
- package/src/core/agents/attachments.ts +18 -0
- package/src/core/agents/base.ts +120 -42
- package/src/core/agents/claude-code/adapter.ts +177 -238
- package/src/core/agents/claude-code/approvals.ts +270 -0
- package/src/core/agents/claude-code/claude-agent.ts +175 -158
- package/src/core/agents/claude-code/credentials.ts +171 -0
- package/src/core/agents/claude-code/events.ts +55 -0
- package/src/core/agents/claude-code/login.ts +269 -0
- package/src/core/agents/claude-code/mcp.ts +206 -0
- package/src/core/agents/claude-code/models.ts +15 -9
- package/src/core/agents/claude-code/options.ts +326 -39
- package/src/core/agents/claude-code/outcome.ts +209 -0
- package/src/core/agents/claude-code/session-pool.ts +136 -0
- package/src/core/agents/claude-code/session.ts +513 -0
- package/src/core/agents/claude-code/spawn.ts +144 -0
- package/src/core/agents/claude-code/spend.ts +160 -0
- package/src/core/agents/claude-code/tools.ts +47 -0
- package/src/core/agents/claude-code/turn-usage.ts +135 -0
- package/src/core/agents/claude-code/turn.ts +232 -0
- package/src/core/agents/codex-app-server/adapter.ts +314 -117
- package/src/core/agents/codex-app-server/client.ts +186 -84
- package/src/core/agents/codex-app-server/codex-agent.ts +343 -0
- package/src/core/agents/codex-app-server/commands.ts +228 -0
- package/src/core/agents/codex-app-server/credentials.ts +126 -0
- package/src/core/agents/codex-app-server/effort.ts +29 -0
- package/src/core/agents/codex-app-server/events.ts +47 -0
- package/src/core/agents/codex-app-server/homes.ts +64 -0
- package/src/core/agents/codex-app-server/input.ts +60 -0
- package/src/core/agents/codex-app-server/items.ts +149 -0
- package/src/core/agents/codex-app-server/login.ts +180 -0
- package/src/core/agents/codex-app-server/mcp.ts +182 -37
- package/src/core/agents/codex-app-server/models.ts +99 -46
- package/src/core/agents/codex-app-server/options.ts +146 -0
- package/src/core/agents/codex-app-server/plan-approval.ts +135 -0
- package/src/core/agents/codex-app-server/protocol.ts +117 -0
- package/src/core/agents/codex-app-server/requests.ts +332 -0
- package/src/core/agents/codex-app-server/session.ts +285 -0
- package/src/core/agents/codex-app-server/subagents.ts +108 -42
- package/src/core/agents/codex-app-server/thread-settings.ts +279 -0
- package/src/core/agents/codex-app-server/turn-items.ts +88 -0
- package/src/core/agents/codex-app-server/turn.ts +463 -0
- package/src/core/agents/config-fingerprint.ts +7 -14
- package/src/core/agents/credentials.ts +98 -0
- package/src/core/agents/elicitation.ts +75 -0
- package/src/core/agents/inherit-config.ts +21 -0
- package/src/core/agents/login.ts +116 -0
- package/src/core/agents/mcp-config.ts +112 -8
- package/src/core/agents/plan.ts +25 -0
- package/src/core/agents/registry.ts +21 -4
- package/src/core/agents/session-agent.ts +96 -4
- package/src/core/agents/{session-store.ts → session-pool.ts} +11 -5
- package/src/core/agents/stderr-tail.ts +75 -0
- package/src/core/agents/types.ts +40 -5
- package/src/core/index.ts +58 -48
- package/src/core/presets.ts +100 -39
- package/src/core/processes/identity.ts +113 -0
- package/src/core/processes/lifeline.ts +170 -0
- package/src/core/processes/native-processes.ts +379 -0
- package/src/core/processes/process-table.ts +174 -0
- package/src/core/provision/cache-trust.ts +121 -0
- package/src/core/provision/cache-usage.ts +69 -0
- package/src/core/provision/checksums.ts +64 -0
- package/src/core/provision/extract.ts +11 -2
- package/src/core/provision/index.ts +4 -1
- package/src/core/provision/install-build.ts +136 -0
- package/src/core/provision/npm.ts +112 -17
- package/src/core/provision/pins.ts +9 -33
- package/src/core/provision/platform.ts +12 -1
- package/src/core/provision/provisioner.ts +329 -397
- package/src/core/provision/releases.ts +86 -0
- package/src/core/provision/tools.ts +329 -0
- package/src/core/proxy/anthropic-proxy.ts +55 -25
- package/src/core/proxy/api-key-store.ts +2 -12
- package/src/core/proxy/loopback.ts +106 -0
- package/src/core/runtime/agent-runtime.ts +327 -498
- package/src/core/runtime/event-processor.ts +197 -70
- package/src/core/runtime/harness-clis.ts +61 -0
- package/src/core/runtime/harness-logins.ts +328 -0
- package/src/core/runtime/login-reads.ts +78 -0
- package/src/core/runtime/model-lists.ts +33 -48
- package/src/core/runtime/permission-policy.ts +113 -0
- package/src/core/runtime/request-broker.ts +204 -0
- package/src/core/runtime/steering.ts +112 -0
- package/src/core/runtime/turn-outcome.ts +30 -0
- package/src/core/runtime/turn.ts +360 -0
- package/src/core/utils/bounded.ts +12 -0
- package/src/core/utils/deadline.ts +38 -0
- package/src/core/utils/errors.ts +113 -21
- package/src/core/utils/is-record.ts +4 -0
- package/src/core/utils/loopback.ts +10 -0
- package/src/protocol/account.ts +104 -0
- package/src/protocol/auth.ts +199 -0
- package/src/protocol/canonical.ts +16 -0
- package/src/protocol/clis.ts +69 -0
- package/src/protocol/config.ts +60 -6
- package/src/protocol/conversation.ts +272 -0
- package/src/protocol/credentials.ts +145 -0
- package/src/protocol/errors.ts +78 -20
- package/src/protocol/execution.ts +5 -2
- package/src/protocol/factories.ts +55 -7
- package/src/protocol/guards.ts +55 -2
- package/src/protocol/harness.ts +56 -6
- package/src/protocol/history.ts +72 -64
- package/src/protocol/ids.ts +0 -12
- package/src/protocol/index.ts +9 -0
- package/src/protocol/lifecycle.ts +250 -79
- package/src/protocol/meta-keys.ts +17 -0
- package/src/protocol/meta.ts +3 -3
- package/src/protocol/models.ts +2 -43
- package/src/protocol/part-input.ts +2 -1
- package/src/protocol/parts.ts +12 -3
- package/src/protocol/reduce.ts +302 -413
- package/src/protocol/selectors.ts +1 -20
- package/src/protocol/seq-cursor.ts +14 -0
- package/src/protocol/stop-reasons.ts +1 -1
- package/src/protocol/thinking.ts +1 -30
- package/src/protocol/time.ts +2 -2
- package/src/protocol/tool-closure.ts +93 -0
- package/src/protocol/tool-state.ts +19 -4
- package/src/protocol/verify.ts +222 -92
- package/src/protocol/vocabulary.ts +21 -5
- package/src/protocol/wire-api.ts +232 -0
- package/src/protocol/wire.ts +351 -64
- package/src/server/acp/binding.ts +63 -103
- package/src/server/acp/session-records.ts +53 -0
- package/src/server/acp/translate.ts +129 -20
- package/src/server/agent-server.ts +223 -387
- package/src/server/bin.ts +280 -78
- package/src/server/feedback.ts +204 -14
- package/src/server/history.ts +116 -122
- package/src/server/index.ts +3 -8
- package/src/server/install.ts +107 -8
- package/src/server/open-parts.ts +95 -0
- package/src/server/routes.ts +391 -0
- package/src/server/secrets.ts +24 -0
- package/src/server/session-gate.ts +69 -0
- package/src/server/session-log.ts +14 -2
- package/src/server/session-store.ts +136 -72
- package/src/server/subscriptions.ts +232 -0
- package/src/server/transports.ts +125 -25
- package/src/server/wire-error.ts +31 -45
- package/src/sync/event-log.ts +31 -3
- package/src/sync/fit.ts +27 -11
- package/src/sync/history-reader.ts +10 -5
- package/src/sync/history-sqlite.ts +37 -42
- package/src/sync/history.ts +9 -15
- package/src/sync/index.ts +17 -5
- package/src/sync/journal-sqlite.ts +162 -76
- package/src/sync/journal.ts +91 -32
- package/src/sync/live-tails.ts +107 -0
- package/src/sync/projection.ts +35 -0
- package/src/sync/recovery.ts +80 -51
- package/src/sync/schema.ts +27 -6
- package/docs/rfds/0001-deterministic-echo-ids.md +0 -44
- package/docs/rfds/0002-native-subagents.md +0 -197
- package/src/client/request.ts +0 -19
- package/src/core/agents/claude-code/generator-session.ts +0 -572
- package/src/core/agents/claude-code/session-manager.ts +0 -166
- package/src/core/agents/codex-app-server/codex-app-server-agent.ts +0 -962
- package/src/core/agents/codex-items.ts +0 -149
- package/src/core/agents/codex-sdk/adapter.ts +0 -237
- package/src/core/agents/codex-sdk/codex-sdk-agent.ts +0 -330
- package/src/core/agents/tool-meta.ts +0 -68
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AgentInput } from "../../../protocol/index.ts";
|
|
2
|
+
import { type NativeProcesses } from "../../processes/native-processes.ts";
|
|
3
|
+
import type { AgentExecuteOptions, RawAgentEvent } from "../base.ts";
|
|
4
|
+
import { SessionAgent } from "../session-agent.ts";
|
|
5
|
+
import { AcpClient, type AcpClientOptions, type AcpLaunch } from "./client.ts";
|
|
6
|
+
export interface AcpAgentOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the ACP agent subprocess to launch. Operator-level only — never
|
|
9
|
+
* sourced from the wire (the command is arbitrary code execution).
|
|
10
|
+
*/
|
|
11
|
+
resolveLaunch: () => Promise<AcpLaunch | undefined> | AcpLaunch | undefined;
|
|
12
|
+
/** `clientInfo.name` advertised to agents. */
|
|
13
|
+
clientName?: string;
|
|
14
|
+
/** `clientInfo.version` advertised to agents. */
|
|
15
|
+
clientVersion?: string;
|
|
16
|
+
idleTimeoutMs?: number;
|
|
17
|
+
/** Grace period for a `session/cancel` to resolve the in-flight prompt. */
|
|
18
|
+
cancelGraceMs?: number;
|
|
19
|
+
/** Injectable client factory for deterministic tests. */
|
|
20
|
+
createClient?: (options: AcpClientOptions) => Promise<AcpClient>;
|
|
21
|
+
/**
|
|
22
|
+
* Where the agents start: each in a group of its own, held by the lifeline
|
|
23
|
+
* and recorded for its session (`createAgentRegistry` passes the runtime's).
|
|
24
|
+
*/
|
|
25
|
+
processes?: NativeProcesses;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ACP harness: drives any Agent Client Protocol v1 agent as a long-lived
|
|
29
|
+
* subprocess (one per logical session, reused across turns). The launch
|
|
30
|
+
* command comes from the operator's `resolveLaunch`; `initialize` negotiates
|
|
31
|
+
* the protocol version and gates optional features (resume, images) on the
|
|
32
|
+
* agent's advertised capabilities. The turn's stopReason arrives as the
|
|
33
|
+
* `session/prompt` *response*, so `execute` re-injects it into the raw stream
|
|
34
|
+
* as a synthetic `session/prompt_result` event for the adapter.
|
|
35
|
+
*/
|
|
36
|
+
export declare class AcpAgent extends SessionAgent {
|
|
37
|
+
private readonly agentOptions;
|
|
38
|
+
readonly harness: "acp";
|
|
39
|
+
readonly capabilities: {
|
|
40
|
+
multiTurn: boolean;
|
|
41
|
+
sessionResume: boolean;
|
|
42
|
+
modelSwitch: (string & {}) | "in_session" | "restart_session" | "unsupported";
|
|
43
|
+
thinkingLevels: boolean;
|
|
44
|
+
images: boolean;
|
|
45
|
+
files: ((string & {}) | "text" | "pdf" | "binary")[];
|
|
46
|
+
mcpServers: boolean;
|
|
47
|
+
permissionRequests: boolean;
|
|
48
|
+
rejectionMessages: boolean;
|
|
49
|
+
turnScopedSubagents?: boolean | undefined;
|
|
50
|
+
steering?: boolean | undefined;
|
|
51
|
+
};
|
|
52
|
+
/** Its CLIs start here: the runtime's, or this OS process's own when it was made without one. */
|
|
53
|
+
readonly processes: NativeProcesses;
|
|
54
|
+
private readonly sessions;
|
|
55
|
+
constructor(agentOptions: AcpAgentOptions);
|
|
56
|
+
private resolveSession;
|
|
57
|
+
/**
|
|
58
|
+
* Select the requested model and thinking level through the agent's config
|
|
59
|
+
* options. An agent without the option keeps its own default. A model the
|
|
60
|
+
* agent does not offer fails the turn; thinking levels are a normalized
|
|
61
|
+
* vocabulary an agent may not share, so an unmatched level is left alone.
|
|
62
|
+
*/
|
|
63
|
+
private applyConfig;
|
|
64
|
+
protected executeTurn(input: AgentInput, options: AgentExecuteOptions, controller: AbortController): AsyncIterableIterator<RawAgentEvent>;
|
|
65
|
+
release(sessionId: string): Promise<void>;
|
|
66
|
+
terminateAll(): Promise<void>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=acp-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/acp-agent.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,qCAAqC,CAAC;AAGlG,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrE,OAAO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
|
1
|
+
import type { PromptResponse, SessionNotification } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { EventTransformer } from "../types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Parses ACP v1 raw events into AdapterEvents. The mapping is nearly identity:
|
|
5
|
+
* our part vocabulary (ToolKind, tool status, locations) was aligned to ACP up
|
|
6
|
+
* front, so chunks append to text/reasoning parts and
|
|
7
|
+
* `tool_call`/`tool_call_update` upsert tool parts by `toolCallId`. Everything
|
|
8
|
+
* arrives through the SDK connection, which zod-validates inbound payloads —
|
|
9
|
+
* so the SDK's own types ARE the raw shapes (no defensive re-modelling).
|
|
10
|
+
*
|
|
11
|
+
* Raw events are the shapes AcpAgent yields:
|
|
12
|
+
* - `{method: "session/update", params: SessionNotification}`
|
|
13
|
+
* - `{method: "session/prompt_result", params: PromptResponse}` (synthetic —
|
|
14
|
+
* ACP returns the turn's stopReason as the prompt *response*, not as a
|
|
15
|
+
* notification, so the agent re-injects it into the event stream)
|
|
16
|
+
* - `{method: "error", params: {message}}` (synthetic, prompt failure)
|
|
17
|
+
*
|
|
18
|
+
* v1 `messageId` on chunks is optional: when present, a change opens a new
|
|
19
|
+
* wire message; when absent the whole turn is one message (the processor
|
|
20
|
+
* synthesizes the boundary).
|
|
21
|
+
*/
|
|
22
|
+
export type AcpRawEvent = {
|
|
23
|
+
method: "session/update";
|
|
24
|
+
params: SessionNotification;
|
|
25
|
+
} | {
|
|
26
|
+
method: "session/prompt_result";
|
|
27
|
+
params: Partial<PromptResponse>;
|
|
28
|
+
} | {
|
|
29
|
+
method: "error";
|
|
30
|
+
params: {
|
|
31
|
+
message?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/** How a turn the agent did not get to answer ends: cancelled. */
|
|
35
|
+
export declare const CANCELLED_PROMPT_RESULT: AcpRawEvent;
|
|
36
|
+
export declare function createAcpTransformer(ctx: {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
}): EventTransformer;
|
|
39
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,cAAc,EACd,mBAAmB,EAInB,MAAM,0BAA0B,CAAC;AAkBlC,OAAO,KAAK,EAAgB,gBAAgB,EAAmB,MAAM,aAAa,CAAC;AAGnF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,WAAW,GACpB;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAAE,GACpE;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAErD,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,EAAE,WAGrC,CAAC;AA2OF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAEjF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { AgentNotificationMethod, AgentNotificationParamsByMethod, AgentRequestMethod, AgentRequestParamsByMethod, AgentRequestResponsesByMethod, CreateElicitationRequest, CreateElicitationResponse, RequestPermissionRequest, RequestPermissionResponse, SessionNotification } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { NativeProcesses } from "../../processes/native-processes.ts";
|
|
3
|
+
/**
|
|
4
|
+
* How to start one ACP agent subprocess. Operator-level only — the wire never
|
|
5
|
+
* carries commands (same rule as `resolveCliPath`): an attacker who controls
|
|
6
|
+
* the launch command controls code execution on the host.
|
|
7
|
+
*/
|
|
8
|
+
export interface AcpLaunch {
|
|
9
|
+
command: string;
|
|
10
|
+
args?: string[];
|
|
11
|
+
/** Extra env layered onto the subprocess (over process.env). */
|
|
12
|
+
env?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export type SessionUpdateHandler = (notification: SessionNotification) => void;
|
|
15
|
+
/** Answers agent→client `session/request_permission`. Absent handler → cancelled. */
|
|
16
|
+
export type AcpPermissionHandler = (request: RequestPermissionRequest) => Promise<RequestPermissionResponse>;
|
|
17
|
+
/** Answers agent→client `elicitation/create`. Absent handler → declined. */
|
|
18
|
+
export type AcpElicitationHandler = (request: CreateElicitationRequest) => Promise<CreateElicitationResponse>;
|
|
19
|
+
export interface AcpClientOptions {
|
|
20
|
+
launch: AcpLaunch;
|
|
21
|
+
cwd: string;
|
|
22
|
+
/** Per-session env on top of the launch env (RunConfig.env). */
|
|
23
|
+
env?: Record<string, string>;
|
|
24
|
+
clientName?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Where the agent starts: in a group of its own, held by the lifeline and
|
|
27
|
+
* recorded for `sessionId` (`createAgentRegistry` passes the runtime's).
|
|
28
|
+
*/
|
|
29
|
+
processes: NativeProcesses;
|
|
30
|
+
/** The logical session it serves, which its record names. */
|
|
31
|
+
sessionId?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One ACP agent subprocess + its SDK connection. The engine talks to any
|
|
35
|
+
* ACP v1 agent through this: JSON-RPC framing, routing, and schema types come
|
|
36
|
+
* from `@agentclientprotocol/sdk` (dynamic-imported, optional peer dep);
|
|
37
|
+
* this wrapper owns the child process, close fan-out, and the mutable
|
|
38
|
+
* per-turn handlers (the SDK app's handlers are fixed at connect time, so
|
|
39
|
+
* they dispatch through this class's current fields — mirroring the
|
|
40
|
+
* codex-app-server client's `setRequestHandler` pattern).
|
|
41
|
+
*/
|
|
42
|
+
export declare class AcpClient {
|
|
43
|
+
private readonly opts;
|
|
44
|
+
private native?;
|
|
45
|
+
private connection?;
|
|
46
|
+
private readonly updateHandlers;
|
|
47
|
+
private readonly closeHandlers;
|
|
48
|
+
private permissionHandler?;
|
|
49
|
+
private elicitationHandler?;
|
|
50
|
+
private exited;
|
|
51
|
+
/** Why the agent stopped, once it has: its exit code and stderr tail. */
|
|
52
|
+
private exitError?;
|
|
53
|
+
private connectionEnded;
|
|
54
|
+
private constructor();
|
|
55
|
+
/** Spawn the agent and connect. Fails if `@agentclientprotocol/sdk` is absent. */
|
|
56
|
+
static create(opts: AcpClientOptions): Promise<AcpClient>;
|
|
57
|
+
onSessionUpdate(handler: SessionUpdateHandler): () => void;
|
|
58
|
+
/** Install the answerer for permission round-trips (set once per session;
|
|
59
|
+
* per-turn context lives inside the handler's own closure). */
|
|
60
|
+
setPermissionHandler(handler: AcpPermissionHandler | undefined): void;
|
|
61
|
+
/** Install the answerer for the agent's requests for user input. */
|
|
62
|
+
setElicitationHandler(handler: AcpElicitationHandler | undefined): void;
|
|
63
|
+
onClose(handler: (error?: Error) => void): () => void;
|
|
64
|
+
get closed(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Send a request to the agent (`initialize`, `session/new`, `session/prompt`, …).
|
|
67
|
+
* `timeoutMs` bounds the wait for handshake-style requests — a spawned-but-wedged
|
|
68
|
+
* agent must not stall the turn forever. The SDK's `cancellationSignal` is
|
|
69
|
+
* cooperative (the peer still decides when to respond), so the local race is
|
|
70
|
+
* what actually enforces the deadline. Turn-long requests (`session/prompt`)
|
|
71
|
+
* pass no timeout.
|
|
72
|
+
*/
|
|
73
|
+
request<M extends AgentRequestMethod>(method: M, params: AgentRequestParamsByMethod[M], timeoutMs?: number): Promise<AgentRequestResponsesByMethod[M]>;
|
|
74
|
+
/** Why the agent exited, waiting briefly for its exit when the connection went first. */
|
|
75
|
+
private whyExited;
|
|
76
|
+
private send;
|
|
77
|
+
/** Send a notification to the agent (`session/cancel`). */
|
|
78
|
+
notify<M extends AgentNotificationMethod>(method: M, params: AgentNotificationParamsByMethod[M]): Promise<void>;
|
|
79
|
+
close(): void;
|
|
80
|
+
/**
|
|
81
|
+
* SIGTERM the agent's group and the tool sessions under it, and SIGKILL
|
|
82
|
+
* what is left after the grace. An agent that runs Claude through the SDK's
|
|
83
|
+
* own spawner keeps that `claude` in its group, which the SIGTERM reaches.
|
|
84
|
+
*/
|
|
85
|
+
private stop;
|
|
86
|
+
private start;
|
|
87
|
+
private onExit;
|
|
88
|
+
private notifyClosed;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,uBAAuB,EACvB,+BAA+B,EAC/B,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAE7B,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAGX,eAAe,EACf,MAAM,qCAAqC,CAAC;AAI7C;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAUD,MAAM,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAE/E,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,CAClC,OAAO,EAAE,wBAAwB,KAC7B,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAExC,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CACnC,OAAO,EAAE,wBAAwB,KAC7B,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,GAAG,CAA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O,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;IAa5C,yFAAyF;YAC3E,SAAS;YAKT,IAAI;IAkBlB,2DAA2D;IACrD,MAAM,CAAC,CAAC,SAAS,uBAAuB,EAC7C,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,+BAA+B,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC;IAKhB,KAAK,IAAI,IAAI;IAWb;;;;OAIG;IACH,OAAO,CAAC,IAAI;YAIE,KAAK;IA0DnB,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,YAAY;CAIpB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type AgentHarness } from "../../../protocol/index.ts";
|
|
2
|
+
import type { AcpLaunch } from "./client.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Advisory catalog of well-known ACP agents — UX sugar, not wire vocabulary
|
|
5
|
+
* (like the model catalog). On the wire the harness is always `acp`; these names
|
|
6
|
+
* let entry points offer "pi" or "gemini" as first-class choices and expand
|
|
7
|
+
* them to launch commands at the operator edge. Anything not listed here runs
|
|
8
|
+
* via an explicit launch command — any ACP-compatible agent works.
|
|
9
|
+
*/
|
|
10
|
+
export declare const KNOWN_ACP_AGENTS: Record<string, {
|
|
11
|
+
label: string;
|
|
12
|
+
launch: AcpLaunch;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Parse an operator-supplied launch spec (`"npx -y pi-acp"`) into an AcpLaunch.
|
|
16
|
+
* Naive whitespace split — no shell quoting; env vars come from the caller.
|
|
17
|
+
* The canonical parser for `--acp-agent` flags / `$AGENT_SERVER_ACP_AGENT`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseAcpLaunch(spec: string | undefined): AcpLaunch | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Read a harness name typed at an operator edge (`--harness`, the CLI's
|
|
22
|
+
* `/harness`): a harness, or a known ACP agent's name, which rides the `acp`
|
|
23
|
+
* harness. Undefined for anything else.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveHarnessName(name: string): {
|
|
26
|
+
harness: AgentHarness;
|
|
27
|
+
acpAgent?: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve an operator spec that is either a known agent name (`"pi"`) or a
|
|
31
|
+
* raw launch command (`"npx -y pi-acp"`). The canonical resolver behind
|
|
32
|
+
* `--acp-agent` and `$AGENT_SERVER_ACP_AGENT`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveAcpLaunch(spec: string | undefined): AcpLaunch | undefined;
|
|
35
|
+
//# sourceMappingURL=known-agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"known-agents.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/known-agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAWjF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAI9E;AAOD;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,MAAM,GACV;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAI1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAGhF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, ToolCallLocation } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, ToolKind, ToolLocation } from "../../../protocol/index.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The single bridge between ACP's vocabulary and the engine's. Everything here
|
|
5
|
+
* is a pure conversion shared by the agent (outbound requests, permission
|
|
6
|
+
* round-trips) and the adapter (inbound session updates) — the harness
|
|
7
|
+
* seat's single bridge, so its two halves cannot drift. (The ACP *server*
|
|
8
|
+
* binding in src/server/acp/ is the inverse direction, not a copy.)
|
|
9
|
+
*/
|
|
10
|
+
/** ACP's ToolKind strings are ours verbatim; narrow with a membership check. */
|
|
11
|
+
export declare function toolKindOf(kind: string | null | undefined): ToolKind | undefined;
|
|
12
|
+
/** ACP `ToolCallLocation[]` → engine `ToolLocation[]` (drop null lines, empty → absent). */
|
|
13
|
+
export declare function toToolLocations(locations: ToolCallLocation[] | null | undefined): ToolLocation[] | undefined;
|
|
14
|
+
/** Engine MCP config map → ACP `McpServer[]` (names come from the record keys). */
|
|
15
|
+
export declare function toAcpMcpServers(mcpServers: Record<string, McpServerConfig> | undefined): McpServer[];
|
|
16
|
+
/** What an ACP agent's `initialize` says its prompts accept beyond text and links. */
|
|
17
|
+
export interface AcpPromptCapabilities {
|
|
18
|
+
image: boolean;
|
|
19
|
+
embeddedContext: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Engine turn input → ACP prompt content blocks. Every agent takes text and
|
|
23
|
+
* resource links; image data needs the `image` capability and inline files
|
|
24
|
+
* `embeddedContext`. A text file falls back to prompt text, and anything else
|
|
25
|
+
* the agent cannot take fails the turn instead of vanishing.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toPromptBlocks(input: AgentInput, prompt: AcpPromptCapabilities): ContentBlock[];
|
|
28
|
+
/** ACP permission request → the engine's PermissionToolCall (SDK-validated, no casts). */
|
|
29
|
+
export declare function permissionToolCall(request: RequestPermissionRequest): PermissionToolCall;
|
|
30
|
+
export declare const CANCELLED_OUTCOME: RequestPermissionResponse;
|
|
31
|
+
/**
|
|
32
|
+
* Pick the option matching the decision: allow → `allow_once` only, deny →
|
|
33
|
+
* `reject_once`, else `reject_always`; no matching option → cancelled. An
|
|
34
|
+
* allow never selects `allow_always`: that would leave a standing rule in the
|
|
35
|
+
* agent nobody chose, and the engine already keeps the user's own "always"
|
|
36
|
+
* answers.
|
|
37
|
+
*/
|
|
38
|
+
export declare function chooseOutcome(options: PermissionOption[], allow: boolean): RequestPermissionResponse;
|
|
39
|
+
/**
|
|
40
|
+
* Decide an ACP permission request without the engine broker: mirrors the
|
|
41
|
+
* codex posture where only `default` mode asks — every other mode auto-decides.
|
|
42
|
+
*/
|
|
43
|
+
export declare function autoDecide(request: RequestPermissionRequest, mode: PermissionMode | undefined): RequestPermissionResponse;
|
|
44
|
+
/** An ACP mode id the engine has a name for: its own, or Claude's (claude-agent-acp). */
|
|
45
|
+
export declare function permissionModeOf(modeId: string): PermissionMode | undefined;
|
|
46
|
+
//# sourceMappingURL=mappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/mappings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,MAAM,4BAA4B,CAAC;AAUpC;;;;;;GAMG;AAGH,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAEhF;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAC9B,SAAS,EAAE,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GAC9C,YAAY,EAAE,GAAG,SAAS,CAG5B;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GACrD,SAAS,EAAE,CAkBb;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,qBAAqB,GAAG,YAAY,EAAE,CA+B/F;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CAYxF;AAED,eAAO,MAAM,iBAAiB,EAAE,yBAE/B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,gBAAgB,EAAE,EAC3B,KAAK,EAAE,OAAO,GACZ,yBAAyB,CAO3B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACzB,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAE,cAAc,GAAG,SAAS,GAC9B,yBAAyB,CAM3B;AAED,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAY3E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CreateElicitationRequest, CreateElicitationResponse, RequestPermissionRequest, RequestPermissionResponse } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { PermissionMode } from "../../../protocol/index.ts";
|
|
3
|
+
import type { ElicitationRequestHandler, PermissionRequestHandler } from "../base.ts";
|
|
4
|
+
/**
|
|
5
|
+
* What the turn running on a session answers the agent's requests with: set
|
|
6
|
+
* and cleared as ONE value, so stale partial state (an authorization bypass)
|
|
7
|
+
* is unrepresentable. Between turns there is none, and the auto policy
|
|
8
|
+
* rejects.
|
|
9
|
+
*/
|
|
10
|
+
export interface TurnScope {
|
|
11
|
+
broker?: PermissionRequestHandler;
|
|
12
|
+
/** Present when the turn's client answers the agent's requests for input. */
|
|
13
|
+
elicitation?: ElicitationRequestHandler;
|
|
14
|
+
mode?: PermissionMode;
|
|
15
|
+
signal: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
/** The session a request is answered against: its ACP id and the turn running on it. */
|
|
18
|
+
export interface RequestScope {
|
|
19
|
+
readonly acpSessionId: string;
|
|
20
|
+
turn?: TurnScope;
|
|
21
|
+
}
|
|
22
|
+
/** Answer an agent permission request against the session's current turn. */
|
|
23
|
+
export declare function answerPermission(scope: RequestScope, request: RequestPermissionRequest): Promise<RequestPermissionResponse>;
|
|
24
|
+
/** Answer an agent's request for user input against the session's current turn. */
|
|
25
|
+
export declare function answerElicitation(scope: RequestScope, request: CreateElicitationRequest): Promise<CreateElicitationResponse>;
|
|
26
|
+
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAUtF;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACzB,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,6EAA6E;IAC7E,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;CACpB;AAED,wFAAwF;AACxF,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB;AAED,6EAA6E;AAC7E,wBAAsB,gBAAgB,CACrC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,yBAAyB,CAAC,CAuCpC;AAcD,mFAAmF;AACnF,wBAAsB,iBAAiB,CACtC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,yBAAyB,CAAC,CA0BpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FilePartInput } from "../../protocol/index.ts";
|
|
2
|
+
export { UnsupportedAttachmentError } from "../utils/errors.ts";
|
|
3
|
+
/** A media type a model reads as text when a file arrives inline. */
|
|
4
|
+
export declare function isTextMedia(mimeType: string): boolean;
|
|
5
|
+
/** The content of a text file attached as base64 data. */
|
|
6
|
+
export declare function attachedText(data: string): string;
|
|
7
|
+
/** A text file as prompt text, for a harness with no file input of its own. */
|
|
8
|
+
export declare function inlineTextAttachment(part: FilePartInput & {
|
|
9
|
+
data: string;
|
|
10
|
+
}): string;
|
|
11
|
+
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../../src/core/agents/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEnF"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { AgentCapabilities, AgentHarness, AgentInput, ElicitationOutcome, ElicitationRequestedEvent, ErrorInfo, ModelDescriptor, PermissionOption, PermissionToolCall, RunConfig, ThinkingLevel } from "../../protocol/index.ts";
|
|
2
|
+
import type { NativeProcesses } from "../processes/native-processes.ts";
|
|
3
|
+
import type { CliLogin } from "./login.ts";
|
|
4
|
+
/**
|
|
5
|
+
* What the engine tells a harness after brokering a permission round-trip.
|
|
6
|
+
* The harness maps this onto its native approval vocabulary (Claude
|
|
7
|
+
* `allow`/`deny`, codex `accept`/`decline`/`cancel`).
|
|
8
|
+
*/
|
|
9
|
+
export type PermissionDecision = ({
|
|
10
|
+
decision: "allow";
|
|
11
|
+
/**
|
|
12
|
+
* Allow-with-modified-input (`permission.resolved.outcome.updatedInput`):
|
|
13
|
+
* the harness MUST execute this input, not the original — what was
|
|
14
|
+
* approved is what runs. Absent = the original input was approved as-is.
|
|
15
|
+
*/
|
|
16
|
+
updatedInput?: Record<string, unknown>;
|
|
17
|
+
} & ChosenOption) | ({
|
|
18
|
+
decision: "deny";
|
|
19
|
+
reason?: string;
|
|
20
|
+
} & ChosenOption)
|
|
21
|
+
/** The turn is being cancelled — abort rather than merely skip the tool. */
|
|
22
|
+
| {
|
|
23
|
+
decision: "cancel";
|
|
24
|
+
};
|
|
25
|
+
/** What the user picked, and said, answering a permission request. */
|
|
26
|
+
export interface ChosenOption {
|
|
27
|
+
/** The option picked, from the request's options (a harness's own, when it offered them). */
|
|
28
|
+
optionId?: string;
|
|
29
|
+
/** What the user said with it (`permission.resolved.outcome.message`). */
|
|
30
|
+
message?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Provided by the engine; called by a harness when its backend blocks on an
|
|
34
|
+
* approval. The engine emits `permission.requested`, waits for
|
|
35
|
+
* `respondPermission` (or cancellation), and returns the decision. `signal`
|
|
36
|
+
* lets the harness abort the wait when its own backend gives up.
|
|
37
|
+
*/
|
|
38
|
+
export type PermissionRequestHandler = (toolCall: PermissionToolCall, opts?: {
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
/**
|
|
41
|
+
* The harness's own choices, offered instead of the standard four (a
|
|
42
|
+
* plan's approval: the mode to go on in). No standing rule answers or
|
|
43
|
+
* comes from them; the decision says which was picked.
|
|
44
|
+
*/
|
|
45
|
+
options?: PermissionOption[];
|
|
46
|
+
/**
|
|
47
|
+
* How an "always" answer works for this request. `{ rule }`: the harness
|
|
48
|
+
* keeps it itself, scoped as `rule` says (Claude's own session rule,
|
|
49
|
+
* Codex's approval for the session); the always option names the rule
|
|
50
|
+
* and the engine keeps no standing rule of its own. `null`: the harness
|
|
51
|
+
* cannot scope one, so none is offered. Absent: the engine keeps a
|
|
52
|
+
* standing rule for the tool (a harness with no memory of its own).
|
|
53
|
+
*/
|
|
54
|
+
always?: {
|
|
55
|
+
rule: string;
|
|
56
|
+
} | null;
|
|
57
|
+
}) => Promise<PermissionDecision>;
|
|
58
|
+
/** What a harness asks the user through the engine: an `elicitation.requested` without its envelope. */
|
|
59
|
+
export type ElicitationRequest = Omit<ElicitationRequestedEvent, "type" | "sessionId" | "turnId" | "requestId" | "timestamp" | "_meta">;
|
|
60
|
+
/**
|
|
61
|
+
* Provided by the engine only when the turn's client answers elicitations
|
|
62
|
+
* (`config.elicitation`). The engine emits `elicitation.requested`, waits for
|
|
63
|
+
* `respondElicitation` (or cancellation), and returns the user's answer.
|
|
64
|
+
*/
|
|
65
|
+
export type ElicitationRequestHandler = (request: ElicitationRequest, opts?: {
|
|
66
|
+
signal?: AbortSignal;
|
|
67
|
+
}) => Promise<ElicitationOutcome>;
|
|
68
|
+
/**
|
|
69
|
+
* Everything a harness needs to run one turn. The engine builds this from a
|
|
70
|
+
* RunRequest: its whole config but what the engine handles itself (which
|
|
71
|
+
* harness, whether the client answers questions, how long a request waits,
|
|
72
|
+
* raw passthrough), plus the engine's callbacks. `sessionId` is our stable
|
|
73
|
+
* logical id (the session-manager key); `resumeSessionId` is the
|
|
74
|
+
* harness-native id to continue (from a prior `session.created`). A harness
|
|
75
|
+
* reports its discovered native id via `onNativeSession` so the engine can
|
|
76
|
+
* surface it for future resumes.
|
|
77
|
+
*/
|
|
78
|
+
export interface AgentExecuteOptions extends Omit<RunConfig, "harness" | "elicitation" | "requestTimeoutMs" | "includeRaw"> {
|
|
79
|
+
sessionId: string;
|
|
80
|
+
turnId: string;
|
|
81
|
+
/**
|
|
82
|
+
* The levels `model` runs, lowest first, when the engine knows them (a live
|
|
83
|
+
* list or the catalog). A harness fits `thinkingLevel` to them. Empty: the
|
|
84
|
+
* model has no thinking control.
|
|
85
|
+
*/
|
|
86
|
+
modelThinking?: readonly ThinkingLevel[];
|
|
87
|
+
signal?: AbortSignal;
|
|
88
|
+
/**
|
|
89
|
+
* Called once with the harness-native session/thread id (for resume).
|
|
90
|
+
* Pass the harness's honest `resumed` judgment unconditionally — the
|
|
91
|
+
* runtime surfaces it only on turns that requested a resume. Built-in
|
|
92
|
+
* harnesses throw if a requested conversation cannot be loaded.
|
|
93
|
+
*/
|
|
94
|
+
onNativeSession?: (nativeSessionId: string, info?: {
|
|
95
|
+
resumed?: boolean;
|
|
96
|
+
}) => void;
|
|
97
|
+
/** Engine-brokered approval round-trip (see PermissionRequestHandler). */
|
|
98
|
+
onPermissionRequest?: PermissionRequestHandler;
|
|
99
|
+
/**
|
|
100
|
+
* Engine-brokered questions and MCP input (see ElicitationRequestHandler).
|
|
101
|
+
* Absent: the client cannot answer, so the harness declines on the user's
|
|
102
|
+
* behalf and tells the agent to carry on.
|
|
103
|
+
*/
|
|
104
|
+
onElicitationRequest?: ElicitationRequestHandler;
|
|
105
|
+
/** What the harness configured for this turn, once known (see `AppliedExecution`). */
|
|
106
|
+
onExecution?: (applied: AppliedExecution) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Something the turn goes on without, such as an MCP server it does not
|
|
109
|
+
* require that could not connect: a recoverable `error` on the stream.
|
|
110
|
+
* Await it, so it comes before what the harness yields next.
|
|
111
|
+
*/
|
|
112
|
+
onWarning?: (warning: ErrorInfo) => Promise<void>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* What a harness runs a turn with, as far as it knows. Report only facts: a
|
|
116
|
+
* level the harness may still lower on its own is not an applied level.
|
|
117
|
+
*/
|
|
118
|
+
export interface AppliedExecution {
|
|
119
|
+
/** The thinking level the turn runs at (`turn.ended.execution.appliedThinkingLevel`). */
|
|
120
|
+
thinkingLevel?: ThinkingLevel;
|
|
121
|
+
/** A model the harness reported for this turn (joins `reportedModels`). */
|
|
122
|
+
model?: string;
|
|
123
|
+
}
|
|
124
|
+
/** Whose models to list: the same login and folder a turn would use. */
|
|
125
|
+
export interface ListModelsOptions {
|
|
126
|
+
cwd: string;
|
|
127
|
+
/** On credentials the product holds, each session may list as a different account. */
|
|
128
|
+
sessionId?: string;
|
|
129
|
+
env?: Record<string, string>;
|
|
130
|
+
apiKey?: string;
|
|
131
|
+
signal?: AbortSignal;
|
|
132
|
+
}
|
|
133
|
+
/** Raw, harness-specific event. Adapters interpret it; the engine never does. */
|
|
134
|
+
export type RawAgentEvent = unknown;
|
|
135
|
+
/**
|
|
136
|
+
* What `cancel` reports back. `confirmed: true` = the cancelled state holds —
|
|
137
|
+
* either nothing was running (`hadTurn: false`, a clean no-op ack) or the
|
|
138
|
+
* harness acknowledged the interrupt and the turn will end promptly.
|
|
139
|
+
* `confirmed: false` = a turn existed and the cancel was dispatched
|
|
140
|
+
* best-effort but NOT acknowledged (the backend's interrupt timed out) — the
|
|
141
|
+
* underlying agent may still be running, and the turn's `turn.ended` event
|
|
142
|
+
* remains the source of truth.
|
|
143
|
+
*/
|
|
144
|
+
export interface CancelResult {
|
|
145
|
+
confirmed: boolean;
|
|
146
|
+
/** Whether an in-flight turn existed when the cancel arrived. */
|
|
147
|
+
hadTurn: boolean;
|
|
148
|
+
}
|
|
149
|
+
/** More input for a running turn (`turn/steer`). */
|
|
150
|
+
export interface SteerRequest {
|
|
151
|
+
/** The engine turn the input is for; any other turn refuses it. */
|
|
152
|
+
turnId: string;
|
|
153
|
+
steerId: string;
|
|
154
|
+
input: AgentInput;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* What a harness did with a steer. `steered`: accepted — the harness yields a
|
|
158
|
+
* raw event its adapter maps to `steer-inserted` once the agent reads it, at
|
|
159
|
+
* its next step. `no_active_turn`: that turn is not taking input any more (it
|
|
160
|
+
* ended, is ending, or another turn runs).
|
|
161
|
+
*/
|
|
162
|
+
export type SteerOutcome = "steered" | "no_active_turn";
|
|
163
|
+
/**
|
|
164
|
+
* A harness: a thin wrapper over one agent backend (Claude Code, Codex
|
|
165
|
+
* app-server, an ACP agent). `execute` yields raw backend events; normalization is the
|
|
166
|
+
* adapter's job. Harnesses own session reuse and cancellation.
|
|
167
|
+
*/
|
|
168
|
+
export interface Agent {
|
|
169
|
+
readonly harness: AgentHarness;
|
|
170
|
+
readonly capabilities: AgentCapabilities;
|
|
171
|
+
execute(input: AgentInput, options: AgentExecuteOptions): AsyncIterableIterator<RawAgentEvent>;
|
|
172
|
+
/** Cancel the in-flight turn for a logical session (see `CancelResult`). */
|
|
173
|
+
cancel(sessionId: string): Promise<CancelResult>;
|
|
174
|
+
/**
|
|
175
|
+
* Add input to the session's running turn (`capabilities.steering`). Throws
|
|
176
|
+
* for input the harness cannot take, as `execute` would.
|
|
177
|
+
*/
|
|
178
|
+
steer?(sessionId: string, request: SteerRequest): Promise<SteerOutcome>;
|
|
179
|
+
/** Release all harness-owned state for one idle logical session. */
|
|
180
|
+
release?(sessionId: string): Promise<void>;
|
|
181
|
+
/** Mark retained MCP connections stale after host suspension; repair before the next turn. */
|
|
182
|
+
invalidateMcpConnections?(): void;
|
|
183
|
+
/**
|
|
184
|
+
* The models this harness's CLI offers for a login and folder. Throws when
|
|
185
|
+
* the CLI cannot answer; the runtime then serves the catalog.
|
|
186
|
+
*/
|
|
187
|
+
listModels?(options: ListModelsOptions): Promise<ModelDescriptor[]>;
|
|
188
|
+
/** Whether `listModels` depends on `sessionId` (credentials the host selects per session). */
|
|
189
|
+
readonly modelsPerSession?: boolean;
|
|
190
|
+
/** Its CLI's own login: what it is, signing in through the CLI's flows, signing out. */
|
|
191
|
+
readonly login?: CliLogin;
|
|
192
|
+
/**
|
|
193
|
+
* The CLI's login changed: each session's next turn starts a new process,
|
|
194
|
+
* which resumes its conversation, since a running CLI keeps the
|
|
195
|
+
* credentials it started with.
|
|
196
|
+
*/
|
|
197
|
+
loginChanged?(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Where this agent starts its native processes, when it starts them through
|
|
200
|
+
* a `NativeProcesses`: the runtime whose registry holds the same one can
|
|
201
|
+
* vouch for its sessions after a restart (`AgentRuntime.recordedHarnesses`).
|
|
202
|
+
* An agent without it has its sessions fenced whenever a restart cuts one off.
|
|
203
|
+
*/
|
|
204
|
+
readonly processes?: NativeProcesses;
|
|
205
|
+
/** Tear down every live session (process shutdown). Built-ins reject subsequent turns. */
|
|
206
|
+
terminateAll(): Promise<void>;
|
|
207
|
+
}
|
|
208
|
+
export declare abstract class BaseAgent implements Agent {
|
|
209
|
+
abstract readonly harness: AgentHarness;
|
|
210
|
+
abstract readonly capabilities: AgentCapabilities;
|
|
211
|
+
/**
|
|
212
|
+
* In-flight turn controllers per logical sessionId. A set (not a single
|
|
213
|
+
* controller) so overlapping turns on one session can't clobber each other's
|
|
214
|
+
* cancellation — `cancel(sessionId)` aborts all of them, and `endTurn`
|
|
215
|
+
* removes only the specific controller it created.
|
|
216
|
+
*/
|
|
217
|
+
protected readonly inflight: Map<string, Set<AbortController>>;
|
|
218
|
+
private readonly unlinkAbort;
|
|
219
|
+
abstract execute(input: AgentInput, options: AgentExecuteOptions): AsyncIterableIterator<RawAgentEvent>;
|
|
220
|
+
cancel(sessionId: string): Promise<CancelResult>;
|
|
221
|
+
release(sessionId: string): Promise<void>;
|
|
222
|
+
terminateAll(): Promise<void>;
|
|
223
|
+
/** Create a per-turn controller bound to `sessionId`, optionally chained to an external signal. */
|
|
224
|
+
protected trackTurn(sessionId: string, external?: AbortSignal): AbortController;
|
|
225
|
+
protected endTurn(sessionId: string, controller: AbortController): void;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/core/agents/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,yBAAyB,EACzB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC3B,CAAC;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,GAAG,YAAY,CAAC,GACjB,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC;AACxD,4EAA4E;GAC1E;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE1B,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC5B,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACtC,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,CAAC,EAAE;IACN,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,OAAO,C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