@zvada/agent-server 0.3.22 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +261 -0
- package/dist/types/accounts/chatgpt.d.ts +1 -1
- package/dist/types/accounts/chatgpt.d.ts.map +1 -1
- package/dist/types/accounts/http.d.ts +2 -4
- package/dist/types/accounts/http.d.ts.map +1 -1
- package/dist/types/client/client.d.ts +37 -11
- package/dist/types/client/client.d.ts.map +1 -1
- package/dist/types/client/connection.d.ts +64 -13
- package/dist/types/client/connection.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +1 -1
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/client/logins.d.ts +2 -1
- package/dist/types/client/logins.d.ts.map +1 -1
- package/dist/types/client/streams.d.ts +9 -3
- package/dist/types/client/streams.d.ts.map +1 -1
- package/dist/types/client/turns.d.ts +1 -1
- package/dist/types/client/turns.d.ts.map +1 -1
- package/dist/types/core/agents/acp/acp-agent.d.ts +34 -1
- package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -1
- package/dist/types/core/agents/acp/adapter.d.ts.map +1 -1
- package/dist/types/core/agents/acp/client.d.ts +12 -3
- package/dist/types/core/agents/acp/client.d.ts.map +1 -1
- package/dist/types/core/agents/acp/mappings.d.ts +8 -2
- package/dist/types/core/agents/acp/mappings.d.ts.map +1 -1
- package/dist/types/core/agents/base.d.ts +22 -8
- package/dist/types/core/agents/base.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/adapter.d.ts +7 -0
- package/dist/types/core/agents/claude-code/adapter.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/approvals.d.ts +4 -1
- package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/claude-agent.d.ts +16 -5
- package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/events.d.ts +9 -1
- package/dist/types/core/agents/claude-code/events.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/login.d.ts +4 -1
- package/dist/types/core/agents/claude-code/login.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/mcp.d.ts +21 -7
- package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/models.d.ts +5 -1
- package/dist/types/core/agents/claude-code/models.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/options.d.ts +10 -4
- package/dist/types/core/agents/claude-code/options.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/outcome.d.ts +3 -5
- package/dist/types/core/agents/claude-code/outcome.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/results.d.ts +16 -0
- package/dist/types/core/agents/claude-code/results.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/sdk-pair.d.ts +13 -0
- package/dist/types/core/agents/claude-code/sdk-pair.d.ts.map +1 -0
- package/dist/types/core/agents/claude-code/session.d.ts +50 -12
- package/dist/types/core/agents/claude-code/session.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/spend.d.ts +2 -1
- package/dist/types/core/agents/claude-code/spend.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/tools.d.ts +26 -3
- package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/adapter.d.ts +2 -2
- package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/client.d.ts +12 -2
- package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +58 -13
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/commands.d.ts +2 -2
- package/dist/types/core/agents/codex-app-server/commands.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/credentials.d.ts +5 -1
- package/dist/types/core/agents/codex-app-server/credentials.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/effort.d.ts +2 -1
- package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/homes.d.ts +19 -0
- package/dist/types/core/agents/codex-app-server/homes.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/items.d.ts +27 -2
- package/dist/types/core/agents/codex-app-server/items.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/login.d.ts +4 -1
- package/dist/types/core/agents/codex-app-server/login.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/mcp.d.ts +15 -30
- package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/models.d.ts +3 -10
- package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/options.d.ts +27 -4
- package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts +2 -1
- package/dist/types/core/agents/codex-app-server/plan-approval.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/protocol.d.ts +16 -3
- package/dist/types/core/agents/codex-app-server/protocol.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/session.d.ts +68 -40
- package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/subagents.d.ts +9 -4
- package/dist/types/core/agents/codex-app-server/subagents.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts +3 -2
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts +2 -1
- package/dist/types/core/agents/codex-app-server/turn-items.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/turn.d.ts +31 -8
- package/dist/types/core/agents/codex-app-server/turn.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/user-login.d.ts +28 -0
- package/dist/types/core/agents/codex-app-server/user-login.d.ts.map +1 -0
- package/dist/types/core/agents/credentials.d.ts +3 -1
- package/dist/types/core/agents/credentials.d.ts.map +1 -1
- package/dist/types/core/agents/diffs.d.ts +9 -0
- package/dist/types/core/agents/diffs.d.ts.map +1 -0
- package/dist/types/core/agents/elicitation.d.ts +3 -2
- package/dist/types/core/agents/elicitation.d.ts.map +1 -1
- package/dist/types/core/agents/login.d.ts +6 -0
- package/dist/types/core/agents/login.d.ts.map +1 -1
- package/dist/types/core/agents/mcp-config.d.ts +0 -4
- package/dist/types/core/agents/mcp-config.d.ts.map +1 -1
- package/dist/types/core/agents/process-pool.d.ts +193 -0
- package/dist/types/core/agents/process-pool.d.ts.map +1 -0
- package/dist/types/core/agents/scripted/adapter.d.ts +68 -0
- package/dist/types/core/agents/scripted/adapter.d.ts.map +1 -0
- package/dist/types/core/agents/scripted/mcp-call.d.ts +56 -0
- package/dist/types/core/agents/scripted/mcp-call.d.ts.map +1 -0
- package/dist/types/core/agents/scripted/scripted-agent.d.ts +73 -0
- package/dist/types/core/agents/scripted/scripted-agent.d.ts.map +1 -0
- package/dist/types/core/agents/scripted/scripts.d.ts +29 -0
- package/dist/types/core/agents/scripted/scripts.d.ts.map +1 -0
- package/dist/types/core/agents/scripted/steps.d.ts +132 -0
- package/dist/types/core/agents/scripted/steps.d.ts.map +1 -0
- package/dist/types/core/agents/session-agent.d.ts +49 -6
- package/dist/types/core/agents/session-agent.d.ts.map +1 -1
- package/dist/types/core/diagnostics.d.ts +4 -1
- package/dist/types/core/diagnostics.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +5 -0
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/presets.d.ts +32 -6
- package/dist/types/core/presets.d.ts.map +1 -1
- package/dist/types/core/processes/lifeline.d.ts +0 -20
- package/dist/types/core/processes/lifeline.d.ts.map +1 -1
- package/dist/types/core/provision/index.d.ts +2 -2
- package/dist/types/core/provision/index.d.ts.map +1 -1
- package/dist/types/core/provision/install-build.d.ts +2 -1
- package/dist/types/core/provision/install-build.d.ts.map +1 -1
- package/dist/types/core/provision/npm.d.ts +20 -8
- package/dist/types/core/provision/npm.d.ts.map +1 -1
- package/dist/types/core/provision/provisioner.d.ts +4 -1
- package/dist/types/core/provision/provisioner.d.ts.map +1 -1
- package/dist/types/core/provision/tools.d.ts +2 -1
- package/dist/types/core/provision/tools.d.ts.map +1 -1
- package/dist/types/core/runtime/agent-runtime.d.ts +16 -8
- package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/types/core/runtime/event-processor.d.ts +5 -1
- package/dist/types/core/runtime/event-processor.d.ts.map +1 -1
- package/dist/types/core/runtime/harness-clis.d.ts +9 -0
- package/dist/types/core/runtime/harness-clis.d.ts.map +1 -1
- package/dist/types/core/runtime/harness-logins.d.ts +33 -5
- package/dist/types/core/runtime/harness-logins.d.ts.map +1 -1
- package/dist/types/core/runtime/model-lists.d.ts +2 -0
- package/dist/types/core/runtime/model-lists.d.ts.map +1 -1
- package/dist/types/core/runtime/permission-policy.d.ts +5 -3
- package/dist/types/core/runtime/permission-policy.d.ts.map +1 -1
- package/dist/types/core/runtime/request-broker.d.ts +2 -1
- package/dist/types/core/runtime/request-broker.d.ts.map +1 -1
- package/dist/types/core/runtime/turn.d.ts +12 -1
- package/dist/types/core/runtime/turn.d.ts.map +1 -1
- package/dist/types/core/utils/deadline.d.ts +6 -0
- package/dist/types/core/utils/deadline.d.ts.map +1 -1
- package/dist/types/core/utils/errors.d.ts +7 -1
- package/dist/types/core/utils/errors.d.ts.map +1 -1
- package/dist/types/operator/operator.d.ts.map +1 -1
- package/dist/types/operator/render.d.ts +6 -4
- package/dist/types/operator/render.d.ts.map +1 -1
- package/dist/types/protocol/auth.d.ts +54 -24
- package/dist/types/protocol/auth.d.ts.map +1 -1
- package/dist/types/protocol/clis.d.ts +14 -7
- package/dist/types/protocol/clis.d.ts.map +1 -1
- package/dist/types/protocol/config.d.ts +2 -0
- package/dist/types/protocol/config.d.ts.map +1 -1
- package/dist/types/protocol/conversation.d.ts +40 -3
- package/dist/types/protocol/conversation.d.ts.map +1 -1
- package/dist/types/protocol/credentials.d.ts +7 -0
- package/dist/types/protocol/credentials.d.ts.map +1 -1
- package/dist/types/protocol/execution.d.ts +2 -1
- package/dist/types/protocol/execution.d.ts.map +1 -1
- package/dist/types/protocol/factories.d.ts +12 -2
- package/dist/types/protocol/factories.d.ts.map +1 -1
- package/dist/types/protocol/harness.d.ts +6 -2
- package/dist/types/protocol/harness.d.ts.map +1 -1
- package/dist/types/protocol/history.d.ts +19 -0
- package/dist/types/protocol/history.d.ts.map +1 -1
- package/dist/types/protocol/lifecycle.d.ts +47 -8
- package/dist/types/protocol/lifecycle.d.ts.map +1 -1
- package/dist/types/protocol/model-catalog.d.ts.map +1 -1
- package/dist/types/protocol/models.d.ts +3 -0
- package/dist/types/protocol/models.d.ts.map +1 -1
- package/dist/types/protocol/parts.d.ts +14 -0
- package/dist/types/protocol/parts.d.ts.map +1 -1
- package/dist/types/protocol/tool-state.d.ts +12 -0
- package/dist/types/protocol/tool-state.d.ts.map +1 -1
- package/dist/types/protocol/wire-api.d.ts +129 -23
- package/dist/types/protocol/wire-api.d.ts.map +1 -1
- package/dist/types/protocol/wire.d.ts +70 -10
- package/dist/types/protocol/wire.d.ts.map +1 -1
- package/dist/types/server/acp/binding.d.ts +6 -1
- package/dist/types/server/acp/binding.d.ts.map +1 -1
- package/dist/types/server/acp/translate.d.ts +33 -7
- package/dist/types/server/acp/translate.d.ts.map +1 -1
- package/dist/types/server/agent-server.d.ts +6 -0
- package/dist/types/server/agent-server.d.ts.map +1 -1
- package/dist/types/server/feedback.d.ts +2 -1
- package/dist/types/server/feedback.d.ts.map +1 -1
- package/dist/types/server/install.d.ts +11 -0
- package/dist/types/server/install.d.ts.map +1 -1
- package/dist/types/server/session-gate.d.ts +2 -1
- package/dist/types/server/session-gate.d.ts.map +1 -1
- package/dist/types/server/session-store.d.ts +1 -0
- package/dist/types/server/session-store.d.ts.map +1 -1
- package/dist/types/server/subscriptions.d.ts +2 -1
- package/dist/types/server/subscriptions.d.ts.map +1 -1
- package/dist/types/server/transports.d.ts.map +1 -1
- package/dist/types/sync/fit.d.ts +8 -7
- package/dist/types/sync/fit.d.ts.map +1 -1
- package/dist/types/sync/history-sqlite.d.ts.map +1 -1
- package/dist/types/sync/index.d.ts +1 -0
- package/dist/types/sync/index.d.ts.map +1 -1
- package/dist/types/sync/journal-sqlite.d.ts +2 -1
- package/dist/types/sync/journal-sqlite.d.ts.map +1 -1
- package/dist/types/sync/journal.d.ts +11 -3
- package/dist/types/sync/journal.d.ts.map +1 -1
- package/dist/types/sync/projection.d.ts +6 -0
- package/dist/types/sync/projection.d.ts.map +1 -1
- package/dist/types/sync/recovery.d.ts +2 -1
- package/dist/types/sync/recovery.d.ts.map +1 -1
- package/dist/types/sync/schema.d.ts +10 -0
- package/dist/types/sync/schema.d.ts.map +1 -1
- package/dist/types/sync/sql.d.ts +2 -1
- package/dist/types/sync/sql.d.ts.map +1 -1
- package/docs/consuming.md +278 -28
- package/docs/deploy.md +36 -8
- package/docs/durable-sessions.md +35 -5
- package/docs/harnesses.md +385 -24
- package/package.json +6 -1
- package/src/accounts/chatgpt.ts +2 -2
- package/src/accounts/http.ts +2 -16
- package/src/client/client.ts +92 -31
- package/src/client/connection.ts +103 -22
- package/src/client/index.ts +1 -0
- package/src/client/logins.ts +1 -1
- package/src/client/streams.ts +12 -4
- package/src/client/turns.ts +1 -1
- package/src/core/agents/acp/acp-agent.ts +181 -52
- package/src/core/agents/acp/adapter.ts +9 -1
- package/src/core/agents/acp/client.ts +16 -4
- package/src/core/agents/acp/mappings.ts +27 -0
- package/src/core/agents/base.ts +25 -10
- package/src/core/agents/claude-code/adapter.ts +47 -17
- package/src/core/agents/claude-code/approvals.ts +6 -5
- package/src/core/agents/claude-code/claude-agent.ts +60 -30
- package/src/core/agents/claude-code/events.ts +11 -1
- package/src/core/agents/claude-code/login.ts +14 -2
- package/src/core/agents/claude-code/mcp.ts +31 -15
- package/src/core/agents/claude-code/models.ts +7 -2
- package/src/core/agents/claude-code/options.ts +11 -3
- package/src/core/agents/claude-code/outcome.ts +10 -2
- package/src/core/agents/claude-code/results.ts +73 -0
- package/src/core/agents/claude-code/sdk-pair.ts +66 -0
- package/src/core/agents/claude-code/session.ts +166 -37
- package/src/core/agents/claude-code/spend.ts +1 -1
- package/src/core/agents/claude-code/tools.ts +108 -12
- package/src/core/agents/codex-app-server/adapter.ts +37 -12
- package/src/core/agents/codex-app-server/client.ts +37 -8
- package/src/core/agents/codex-app-server/codex-agent.ts +115 -50
- package/src/core/agents/codex-app-server/commands.ts +2 -2
- package/src/core/agents/codex-app-server/credentials.ts +10 -5
- package/src/core/agents/codex-app-server/effort.ts +1 -1
- package/src/core/agents/codex-app-server/homes.ts +43 -1
- package/src/core/agents/codex-app-server/items.ts +219 -31
- package/src/core/agents/codex-app-server/login.ts +14 -2
- package/src/core/agents/codex-app-server/mcp.ts +47 -32
- package/src/core/agents/codex-app-server/models.ts +9 -8
- package/src/core/agents/codex-app-server/options.ts +69 -10
- package/src/core/agents/codex-app-server/plan-approval.ts +1 -1
- package/src/core/agents/codex-app-server/protocol.ts +14 -4
- package/src/core/agents/codex-app-server/requests.ts +14 -6
- package/src/core/agents/codex-app-server/session.ts +151 -113
- package/src/core/agents/codex-app-server/subagents.ts +21 -14
- package/src/core/agents/codex-app-server/thread-settings.ts +18 -8
- package/src/core/agents/codex-app-server/turn-items.ts +1 -1
- package/src/core/agents/codex-app-server/turn.ts +79 -32
- package/src/core/agents/codex-app-server/user-login.ts +107 -0
- package/src/core/agents/credentials.ts +5 -2
- package/src/core/agents/diffs.ts +25 -0
- package/src/core/agents/elicitation.ts +2 -2
- package/src/core/agents/login.ts +6 -0
- package/src/core/agents/mcp-config.ts +2 -2
- package/src/core/agents/process-pool.ts +432 -0
- package/src/core/agents/scripted/adapter.ts +142 -0
- package/src/core/agents/scripted/mcp-call.ts +134 -0
- package/src/core/agents/scripted/scripted-agent.ts +418 -0
- package/src/core/agents/scripted/scripts.ts +171 -0
- package/src/core/agents/scripted/steps.ts +127 -0
- package/src/core/agents/session-agent.ts +105 -8
- package/src/core/diagnostics.ts +9 -1
- package/src/core/index.ts +11 -0
- package/src/core/presets.ts +99 -14
- package/src/core/processes/lifeline.ts +99 -25
- package/src/core/provision/index.ts +1 -2
- package/src/core/provision/install-build.ts +4 -1
- package/src/core/provision/npm.ts +309 -97
- package/src/core/provision/provisioner.ts +22 -8
- package/src/core/provision/tools.ts +44 -19
- package/src/core/runtime/agent-runtime.ts +48 -18
- package/src/core/runtime/event-processor.ts +18 -2
- package/src/core/runtime/harness-clis.ts +36 -1
- package/src/core/runtime/harness-logins.ts +82 -31
- package/src/core/runtime/model-lists.ts +1 -1
- package/src/core/runtime/permission-policy.ts +4 -3
- package/src/core/runtime/request-broker.ts +1 -1
- package/src/core/runtime/turn.ts +51 -3
- package/src/core/utils/deadline.ts +23 -0
- package/src/core/utils/errors.ts +11 -4
- package/src/operator/operator.ts +8 -4
- package/src/operator/render.ts +46 -8
- package/src/protocol/auth.ts +30 -23
- package/src/protocol/clis.ts +12 -4
- package/src/protocol/credentials.ts +19 -0
- package/src/protocol/execution.ts +5 -0
- package/src/protocol/factories.ts +25 -3
- package/src/protocol/harness.ts +11 -1
- package/src/protocol/history.ts +20 -0
- package/src/protocol/lifecycle.ts +10 -1
- package/src/protocol/model-catalog.ts +19 -8
- package/src/protocol/parts.ts +12 -1
- package/src/protocol/tool-state.ts +14 -1
- package/src/protocol/wire.ts +14 -0
- package/src/server/acp/binding.ts +113 -23
- package/src/server/acp/translate.ts +161 -8
- package/src/server/agent-server.ts +10 -1
- package/src/server/bin.ts +83 -9
- package/src/server/feedback.ts +1 -1
- package/src/server/install.ts +82 -4
- package/src/server/session-gate.ts +1 -1
- package/src/server/session-store.ts +5 -1
- package/src/server/subscriptions.ts +1 -1
- package/src/server/transports.ts +14 -0
- package/src/sync/fit.ts +115 -28
- package/src/sync/history-sqlite.ts +6 -2
- package/src/sync/index.ts +1 -0
- package/src/sync/journal-sqlite.ts +20 -2
- package/src/sync/journal.ts +10 -2
- package/src/sync/projection.ts +10 -0
- package/src/sync/recovery.ts +11 -4
- package/src/sync/schema.ts +7 -5
- package/src/sync/sql.ts +1 -1
- package/dist/types/core/agents/claude-code/session-pool.d.ts +0 -36
- package/dist/types/core/agents/claude-code/session-pool.d.ts.map +0 -1
- package/dist/types/core/agents/session-pool.d.ts +0 -41
- package/dist/types/core/agents/session-pool.d.ts.map +0 -1
- package/src/core/agents/claude-code/session-pool.ts +0 -136
- package/src/core/agents/session-pool.ts +0 -111
|
@@ -24,7 +24,7 @@ export type Follow = "watch" | {
|
|
|
24
24
|
turnId: string;
|
|
25
25
|
} | "all";
|
|
26
26
|
/** What the streams ask of the client around them. */
|
|
27
|
-
|
|
27
|
+
interface StreamsHost {
|
|
28
28
|
/** The transport frames come on now; null between connections. */
|
|
29
29
|
transport(): WireTransport | null;
|
|
30
30
|
/** False once the client closed. */
|
|
@@ -52,7 +52,7 @@ export declare class Streams {
|
|
|
52
52
|
/** Per-session seq discipline — the shared `/protocol` implementation. */
|
|
53
53
|
private readonly cursor;
|
|
54
54
|
private readonly streams;
|
|
55
|
-
/**
|
|
55
|
+
/** Follows every session (`subscribeAll`): from the ask, not its answer, until `unsubscribeAll` or a refusal. */
|
|
56
56
|
private all;
|
|
57
57
|
/** A redialed transport's handshake is pending: frames wait for it to say which server this is. */
|
|
58
58
|
private paused;
|
|
@@ -90,7 +90,12 @@ export declare class Streams {
|
|
|
90
90
|
* was evicted; then the session is let go, unless something else follows it.
|
|
91
91
|
*/
|
|
92
92
|
turnEnded(sessionId: string, turnId: string, headSeq: number): void;
|
|
93
|
-
/**
|
|
93
|
+
/** `subscribeAll` asked: every server from now on is asked for every session, until `unfollowAll`. */
|
|
94
|
+
followAll(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Every session's frames, from now: those with a running turn start at
|
|
97
|
+
* their head. An answer to an ask `unfollowAll` withdrew follows nothing.
|
|
98
|
+
*/
|
|
94
99
|
joinedAll(sessions: Array<{
|
|
95
100
|
sessionId: string;
|
|
96
101
|
headSeq: number;
|
|
@@ -147,4 +152,5 @@ export declare class Streams {
|
|
|
147
152
|
/** Replay the session from what was delivered, page by page, until its held frames drain. */
|
|
148
153
|
private heal;
|
|
149
154
|
}
|
|
155
|
+
export {};
|
|
150
156
|
//# sourceMappingURL=streams.d.ts.map
|
|
@@ -1 +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,GAClB,WAAW,GACX,sBAAsB,CAAC;IAC1B,KAAK,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC;AAiC1D,sDAAsD;AACtD,
|
|
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,CAA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B;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAKpC,8FAA8F;IAC9F,MAAM,IAAI,IAAI;IAKd;;;;OAIG;IACH,cAAc,IAAI,IAAI;IAgBtB,yEAAyE;IACzE,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAUhC;;;OAGG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAU7C,qGAAqG;IACrG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM7B,SAAS,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"}
|
|
@@ -30,7 +30,7 @@ export interface TurnHandle {
|
|
|
30
30
|
* kept events after `headSeq` and the live frames that arrived after the
|
|
31
31
|
* `position`-th frame the client received.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
interface JoinPoint {
|
|
34
34
|
headSeq: number;
|
|
35
35
|
position: number;
|
|
36
36
|
}
|
|
@@ -1 +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,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AAG,MAAM;IAQ7D,sEAAsE;IACtE,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAKnC,QAAQ,IAAI,MAAM,EAAE;IAIpB,mEAAmE;IACnE,OAAO,CAAC,QAAQ,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKlE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAI3C,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI3B,OAAO,CAAC,KAAK;CAKb;AAED,YAAY,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -13,8 +13,21 @@ export interface AcpAgentOptions {
|
|
|
13
13
|
clientName?: string;
|
|
14
14
|
/** `clientInfo.version` advertised to agents. */
|
|
15
15
|
clientVersion?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Idle time before a session's agent is ended (5 minutes by default); 0
|
|
18
|
+
* never ends one for idleness. An agent that can neither resume nor load
|
|
19
|
+
* is never ended for idleness.
|
|
20
|
+
*/
|
|
16
21
|
idleTimeoutMs?: number;
|
|
17
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* How long a cancel waits for the agent's prompt to end before it answers
|
|
24
|
+
* `confirmed: false` (`CANCEL_CONFIRM_MS`, 2 s, by default).
|
|
25
|
+
*/
|
|
26
|
+
cancelConfirmMs?: number;
|
|
27
|
+
/**
|
|
28
|
+
* How long after a cancel an agent whose prompt has not ended is ended
|
|
29
|
+
* (10 s by default); its turn then ends `cancelled`.
|
|
30
|
+
*/
|
|
18
31
|
cancelGraceMs?: number;
|
|
19
32
|
/** Injectable client factory for deterministic tests. */
|
|
20
33
|
createClient?: (options: AcpClientOptions) => Promise<AcpClient>;
|
|
@@ -48,21 +61,41 @@ export declare class AcpAgent extends SessionAgent {
|
|
|
48
61
|
rejectionMessages: boolean;
|
|
49
62
|
turnScopedSubagents?: boolean | undefined;
|
|
50
63
|
steering?: boolean | undefined;
|
|
64
|
+
ignoredSettings?: string[] | undefined;
|
|
51
65
|
};
|
|
52
66
|
/** Its CLIs start here: the runtime's, or this OS process's own when it was made without one. */
|
|
53
67
|
readonly processes: NativeProcesses;
|
|
54
68
|
private readonly sessions;
|
|
55
69
|
constructor(agentOptions: AcpAgentOptions);
|
|
56
70
|
private resolveSession;
|
|
71
|
+
/**
|
|
72
|
+
* Start the session's agent and open its conversation: the one the turn
|
|
73
|
+
* names by `session/resume` or `session/load`, else a new one. The pool
|
|
74
|
+
* starts it once every agent of the session before it has exited, so a
|
|
75
|
+
* successor never loads a conversation another agent still has.
|
|
76
|
+
*/
|
|
77
|
+
private spawn;
|
|
57
78
|
/**
|
|
58
79
|
* Select the requested model and thinking level through the agent's config
|
|
59
80
|
* options. An agent without the option keeps its own default. A model the
|
|
60
81
|
* agent does not offer fails the turn; thinking levels are a normalized
|
|
61
82
|
* vocabulary an agent may not share, so an unmatched level is left alone.
|
|
83
|
+
* Returns the settings it left alone.
|
|
62
84
|
*/
|
|
63
85
|
private applyConfig;
|
|
86
|
+
/**
|
|
87
|
+
* Put the agent in the turn's permission mode (`default` when it names
|
|
88
|
+
* none) through `session/set_mode`, by the agent's own id for it. Returns
|
|
89
|
+
* whether the mode holds: false for one the agent offers none of, which
|
|
90
|
+
* leaves the agent in its own. An agent that offers no modes runs as it
|
|
91
|
+
* does, the engine answering what it asks by the mode (`autoDecide`); it
|
|
92
|
+
* has no plan of its own to make, so `plan` does not hold there.
|
|
93
|
+
*/
|
|
94
|
+
private applyMode;
|
|
64
95
|
protected executeTurn(input: AgentInput, options: AgentExecuteOptions, controller: AbortController): AsyncIterableIterator<RawAgentEvent>;
|
|
65
96
|
release(sessionId: string): Promise<void>;
|
|
97
|
+
/** After a host resume, each session's next turn starts its agent again, on its conversation. */
|
|
98
|
+
invalidateMcpConnections(): void;
|
|
66
99
|
terminateAll(): Promise<void>;
|
|
67
100
|
}
|
|
68
101
|
//# sourceMappingURL=acp-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/acp-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/acp-agent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEX,UAAU,EAGV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,qCAAqC,CAAC;AAGlG,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIrE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAsF/E,MAAM,WAAW,eAAe;IAC/B;;;OAGG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5E,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACjE;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC5B;AA4CD;;;;;;;;GAQG;AACH,qBAAa,QAAS,SAAQ,YAAY;IAO7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IANzC,QAAQ,CAAC,OAAO,EAAG,KAAK,CAAU;IAClC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;MAAgB;IACrC,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;gBAEnC,YAAY,EAAE,eAAe;YAmB5C,cAAc;IAiB5B;;;;;OAKG;YACW,KAAK;IAwHnB;;;;;;OAMG;YACW,WAAW;IAyCzB;;;;;;;OAOG;YACW,SAAS;cAgBG,WAAW,CACpC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,eAAe,GACzB,qBAAqB,CAAC,aAAa,CAAC;IA4GxB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,iGAAiG;IACjG,wBAAwB,IAAI,IAAI;IAIjB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5C"}
|
|
@@ -1 +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;
|
|
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;AAmBlC,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;AAkPF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAEjF"}
|
|
@@ -11,11 +11,11 @@ export interface AcpLaunch {
|
|
|
11
11
|
/** Extra env layered onto the subprocess (over process.env). */
|
|
12
12
|
env?: Record<string, string>;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type SessionUpdateHandler = (notification: SessionNotification) => void;
|
|
15
15
|
/** Answers agent→client `session/request_permission`. Absent handler → cancelled. */
|
|
16
|
-
|
|
16
|
+
type AcpPermissionHandler = (request: RequestPermissionRequest) => Promise<RequestPermissionResponse>;
|
|
17
17
|
/** Answers agent→client `elicitation/create`. Absent handler → declined. */
|
|
18
|
-
|
|
18
|
+
type AcpElicitationHandler = (request: CreateElicitationRequest) => Promise<CreateElicitationResponse>;
|
|
19
19
|
export interface AcpClientOptions {
|
|
20
20
|
launch: AcpLaunch;
|
|
21
21
|
cwd: string;
|
|
@@ -48,6 +48,8 @@ export declare class AcpClient {
|
|
|
48
48
|
private permissionHandler?;
|
|
49
49
|
private elicitationHandler?;
|
|
50
50
|
private exited;
|
|
51
|
+
/** The stop of its process, once one began: what `gone` waits for. */
|
|
52
|
+
private leaving?;
|
|
51
53
|
/** Why the agent stopped, once it has: its exit code and stderr tail. */
|
|
52
54
|
private exitError?;
|
|
53
55
|
private connectionEnded;
|
|
@@ -76,6 +78,12 @@ export declare class AcpClient {
|
|
|
76
78
|
private send;
|
|
77
79
|
/** Send a notification to the agent (`session/cancel`). */
|
|
78
80
|
notify<M extends AgentNotificationMethod>(method: M, params: AgentNotificationParamsByMethod[M]): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Settles once its process has exited after a close or its own exit, its
|
|
83
|
+
* tree stopped (bounded by the stop's grace and SIGKILL, LLP 0007); at
|
|
84
|
+
* once when no process was started or none is stopping.
|
|
85
|
+
*/
|
|
86
|
+
gone(): Promise<void>;
|
|
79
87
|
close(): void;
|
|
80
88
|
/**
|
|
81
89
|
* SIGTERM the agent's group and the tool sessions under it, and SIGKILL
|
|
@@ -87,4 +95,5 @@ export declare class AcpClient {
|
|
|
87
95
|
private onExit;
|
|
88
96
|
private notifyClosed;
|
|
89
97
|
}
|
|
98
|
+
export {};
|
|
90
99
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +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,
|
|
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;A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AC1B,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO;IAEP,kFAAkF;WACrE,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC;IAM/D,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAK1D;mEAC+D;IAC/D,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI;IAIrE,oEAAoE;IACpE,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAAG,SAAS,GAAG,IAAI;IAIvE,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM,IAAI;IAKrD,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;;OAOG;IACG,OAAO,CAAC,CAAC,SAAS,kBAAkB,EACzC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,EACrC,SAAS,CAAC,EAAE,MAAM,GAChB,OAAO,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;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,IAAI;IAWb;;;;OAIG;IACH,OAAO,CAAC,IAAI;YAKE,KAAK;IA0DnB,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,YAAY;CAIpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
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";
|
|
1
|
+
import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, ToolCallContent, ToolCallLocation } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, ToolKind, ToolLocation, ToolResultContent } from "../../../protocol/index.ts";
|
|
3
3
|
/**
|
|
4
4
|
* The single bridge between ACP's vocabulary and the engine's. Everything here
|
|
5
5
|
* is a pure conversion shared by the agent (outbound requests, permission
|
|
@@ -11,6 +11,12 @@ import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, T
|
|
|
11
11
|
export declare function toolKindOf(kind: string | null | undefined): ToolKind | undefined;
|
|
12
12
|
/** ACP `ToolCallLocation[]` → engine `ToolLocation[]` (drop null lines, empty → absent). */
|
|
13
13
|
export declare function toToolLocations(locations: ToolCallLocation[] | null | undefined): ToolLocation[] | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The display content of an ACP tool call: its `diff` entries (a creation's
|
|
16
|
+
* null `oldText` left out) and its `terminal`s, as the agent sent them. Text
|
|
17
|
+
* is the call's `output`, so it is not repeated here.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toToolResultContent(content: ToolCallContent[] | null | undefined): ToolResultContent[];
|
|
14
20
|
/** Engine MCP config map → ACP `McpServer[]` (names come from the record keys). */
|
|
15
21
|
export declare function toAcpMcpServers(mcpServers: Record<string, McpServerConfig> | undefined): McpServer[];
|
|
16
22
|
/** What an ACP agent's `initialize` says its prompts accept beyond text and links. */
|
|
@@ -1 +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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AAI,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;AAGD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,GAAG,SAAS,GAC3C,iBAAiB,EAAE,CAcrB;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,CAaxF;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"}
|
|
@@ -120,6 +120,12 @@ export interface AppliedExecution {
|
|
|
120
120
|
thinkingLevel?: ThinkingLevel;
|
|
121
121
|
/** A model the harness reported for this turn (joins `reportedModels`). */
|
|
122
122
|
model?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Settings this turn set that the harness found, as it ran, it could not
|
|
125
|
+
* apply (`execution.notApplied`); those it never applies are its
|
|
126
|
+
* `capabilities.ignoredSettings`, which the engine adds itself.
|
|
127
|
+
*/
|
|
128
|
+
notApplied?: Array<keyof RunConfig>;
|
|
123
129
|
}
|
|
124
130
|
/** Whose models to list: the same login and folder a turn would use. */
|
|
125
131
|
export interface ListModelsOptions {
|
|
@@ -132,6 +138,12 @@ export interface ListModelsOptions {
|
|
|
132
138
|
}
|
|
133
139
|
/** Raw, harness-specific event. Adapters interpret it; the engine never does. */
|
|
134
140
|
export type RawAgentEvent = unknown;
|
|
141
|
+
/**
|
|
142
|
+
* How long a cancel waits for the harness to show its turn stopped before it
|
|
143
|
+
* answers `confirmed: false`, unless `cancelConfirmMs` says otherwise. One
|
|
144
|
+
* value for every built-in harness.
|
|
145
|
+
*/
|
|
146
|
+
export declare const CANCEL_CONFIRM_MS = 2000;
|
|
135
147
|
/**
|
|
136
148
|
* What `cancel` reports back. `confirmed: true` = the cancelled state holds —
|
|
137
149
|
* either nothing was running (`hadTurn: false`, a clean no-op ack) or the
|
|
@@ -190,16 +202,18 @@ export interface Agent {
|
|
|
190
202
|
/** Its CLI's own login: what it is, signing in through the CLI's flows, signing out. */
|
|
191
203
|
readonly login?: CliLogin;
|
|
192
204
|
/**
|
|
193
|
-
* The CLI's login changed
|
|
194
|
-
*
|
|
195
|
-
*
|
|
205
|
+
* The CLI's login changed in `store` (its login's `store`), or in every
|
|
206
|
+
* store when none is named: each of that store's sessions starts its next
|
|
207
|
+
* turn on a new process, which resumes its conversation, since a running
|
|
208
|
+
* CLI keeps the credentials it started with.
|
|
196
209
|
*/
|
|
197
|
-
loginChanged?(): void;
|
|
210
|
+
loginChanged?(store?: string): void;
|
|
198
211
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
212
|
+
* The `NativeProcesses` through which this agent starts every native
|
|
213
|
+
* process it starts, or, for an agent that starts none, the one it names
|
|
214
|
+
* to say so: the runtime whose registry holds the same one can vouch for
|
|
215
|
+
* its sessions after a restart (`AgentRuntime.recordedHarnesses`). An
|
|
216
|
+
* agent without it has its sessions fenced whenever a restart cuts one off.
|
|
203
217
|
*/
|
|
204
218
|
readonly processes?: NativeProcesses;
|
|
205
219
|
/** Tear down every live session (process shutdown). Built-ins reject subsequent turns. */
|
|
@@ -1 +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,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M,GAAG,OAAO,CAAC,YAAY,CAAC;IAWhD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnC,mGAAmG;IACnG,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,eAAe;IAe/E,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI;CASvE"}
|
|
@@ -21,6 +21,8 @@ export declare class ClaudeCodeTransformer implements EventTransformer<unknown>
|
|
|
21
21
|
private settled?;
|
|
22
22
|
private readonly usage;
|
|
23
23
|
private readonly outcome;
|
|
24
|
+
/** The MCP servers the session knows, which name its MCP tools. */
|
|
25
|
+
private mcpServers;
|
|
24
26
|
constructor(ctx: {
|
|
25
27
|
sessionId: string;
|
|
26
28
|
});
|
|
@@ -48,6 +50,11 @@ export declare class ClaudeCodeTransformer implements EventTransformer<unknown>
|
|
|
48
50
|
*/
|
|
49
51
|
private completeToolInputs;
|
|
50
52
|
private closeBlock;
|
|
53
|
+
/**
|
|
54
|
+
* Tool results complete their parts. The message's `tool_use_result` is the
|
|
55
|
+
* structured result of its one tool result: the CLI sends each in a
|
|
56
|
+
* message of its own, so a message with several has none that is theirs.
|
|
57
|
+
*/
|
|
51
58
|
private handleToolResults;
|
|
52
59
|
/** A query's result: the session's word on what it spent came just before. */
|
|
53
60
|
private captureResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/adapter.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/adapter.ts"],"names":[],"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gB,CAExF"}
|
|
@@ -2,7 +2,7 @@ import type { CanUseTool, OnElicitation } from "@anthropic-ai/claude-agent-sdk";
|
|
|
2
2
|
import { type ClaudeToolPolicy } from "./options.ts";
|
|
3
3
|
import type { ClaudeTurn } from "./turn.ts";
|
|
4
4
|
/** What a request needs of the turn it is asked in. */
|
|
5
|
-
|
|
5
|
+
type ClaudeTurnRequests = Pick<ClaudeTurn, "permissions" | "elicitation" | "cancelByRequest">;
|
|
6
6
|
/**
|
|
7
7
|
* Start a session's query. Under `bypassPermissions` the SDK warns that
|
|
8
8
|
* `canUseTool` is never asked, but Claude still asks it about what needs a
|
|
@@ -27,6 +27,8 @@ export declare function createCanUseTool(deps: {
|
|
|
27
27
|
policy?: ClaudeToolPolicy;
|
|
28
28
|
/** The turn running now; null between turns. */
|
|
29
29
|
turn: () => ClaudeTurnRequests | null;
|
|
30
|
+
/** The MCP servers the session knows, which name its MCP tools. */
|
|
31
|
+
mcpServers?: () => readonly string[];
|
|
30
32
|
}): CanUseTool;
|
|
31
33
|
/**
|
|
32
34
|
* MCP elicitation from Claude's servers (a form, or a URL to visit), asked
|
|
@@ -34,4 +36,5 @@ export declare function createCanUseTool(deps: {
|
|
|
34
36
|
* answer.
|
|
35
37
|
*/
|
|
36
38
|
export declare function createOnElicitation(turn: () => ClaudeTurnRequests | null): OnElicitation;
|
|
39
|
+
export {};
|
|
37
40
|
//# sourceMappingURL=approvals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EAGb,MAAM,gCAAgC,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAA8C,MAAM,cAAc,CAAC;AAEjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,uDAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EAGb,MAAM,gCAAgC,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAA8C,MAAM,cAAc,CAAC;AAEjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,uDAAuD;AACvD,KAAK,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,GAAG,iBAAiB,CAAC,CAAC;AAQ9F;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAYnF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,gDAAgD;IAChD,IAAI,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACtC,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;CACrC,GAAG,UAAU,CAsEb;AA+ID;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,kBAAkB,GAAG,IAAI,GAAG,aAAa,CAWxF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { McpSetServersResult, SDKResultError, SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
|
|
2
2
|
import type { AgentInput, McpServerConfig, ModelDescriptor } from "../../../protocol/index.ts";
|
|
3
3
|
import { type NativeProcesses } from "../../processes/native-processes.ts";
|
|
4
|
-
import type { AgentExecuteOptions,
|
|
4
|
+
import type { AgentExecuteOptions, ListModelsOptions } from "../base.ts";
|
|
5
5
|
import { SessionAgent } from "../session-agent.ts";
|
|
6
6
|
import type { ClaudeRawEvent } from "./events.ts";
|
|
7
7
|
import { ClaudeCliLogin } from "./login.ts";
|
|
@@ -40,6 +40,7 @@ export declare class ClaudeCodeAgent extends SessionAgent {
|
|
|
40
40
|
rejectionMessages: boolean;
|
|
41
41
|
turnScopedSubagents?: boolean | undefined;
|
|
42
42
|
steering?: boolean | undefined;
|
|
43
|
+
ignoredSettings?: string[] | undefined;
|
|
43
44
|
};
|
|
44
45
|
/** Its CLIs start here: the runtime's, or this OS process's own when it was made without one. */
|
|
45
46
|
readonly processes: NativeProcesses;
|
|
@@ -49,20 +50,30 @@ export declare class ClaudeCodeAgent extends SessionAgent {
|
|
|
49
50
|
constructor(agentOptions?: ClaudeCodeAgentOptions);
|
|
50
51
|
/** Options on a credential the product holds, when it holds one. */
|
|
51
52
|
private withDelivery;
|
|
52
|
-
loginChanged(): void;
|
|
53
|
+
loginChanged(store?: string): void;
|
|
53
54
|
protected executeTurn(input: AgentInput, options: AgentExecuteOptions, controller: AbortController): AsyncIterableIterator<ClaudeRawEvent>;
|
|
54
55
|
protected checkSteerInput(input: AgentInput): void;
|
|
55
56
|
/** The models this login offers in `options.cwd`, from the Claude Code CLI. */
|
|
56
57
|
listModels(listing: ListModelsOptions): Promise<ModelDescriptor[]>;
|
|
57
58
|
/**
|
|
58
59
|
* Hot-swap the live session's wire MCP servers without a restart (context
|
|
59
|
-
* intact).
|
|
60
|
-
*
|
|
60
|
+
* intact). A session still starting takes it once ready, after the servers
|
|
61
|
+
* its turn attaches. Returns undefined when the session isn't live. In-process servers
|
|
62
|
+
* are preserved across swaps. The next turn's own `mcpServers` swap back
|
|
63
|
+
* when they still name the old set: keep them in step.
|
|
61
64
|
*/
|
|
62
65
|
setMcpServers(sessionId: string, servers: Record<string, McpServerConfig>): Promise<McpSetServersResult | undefined>;
|
|
63
66
|
/** Resume saved history in a fresh subprocess on the next turn after host suspension. */
|
|
64
67
|
invalidateMcpConnections(): void;
|
|
65
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Interrupt the turn's process for a cancel, which has already aborted the
|
|
70
|
+
* turn: the controller ends the engine's execute loop, so this turn
|
|
71
|
+
* classifies as cancelled even when the generator drains to a natural end
|
|
72
|
+
* before the SDK interrupt lands (the abort-order race that could surface
|
|
73
|
+
* a clean user cancel as `error`/`end_turn`). The SDK interrupt's
|
|
74
|
+
* round-trip is what confirms the cancel.
|
|
75
|
+
*/
|
|
76
|
+
private interrupt;
|
|
66
77
|
release(sessionId: string): Promise<void>;
|
|
67
78
|
terminateAll(): Promise<void>;
|
|
68
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/claude-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAEX,UAAU,EACV,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"claude-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/claude-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAEX,UAAU,EACV,eAAe,EACf,eAAe,EAEf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,qCAAqC,CAAC;AAIlG,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,sBAAsB,EAAuB,MAAM,cAAc,CAAC;AAQhF,KAAK,aAAa,GAAG,cAAc,CAAC,SA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OAAO,CAAC,IAAI,CAAC;IAMzC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAO5C"}
|
|
@@ -9,7 +9,15 @@ import type { ClaudeQuerySpend } from "./spend.ts";
|
|
|
9
9
|
* another (an operator's `$CLAUDE_CLI_PATH`), so readers still tolerate a
|
|
10
10
|
* field an older CLI leaves out.
|
|
11
11
|
*/
|
|
12
|
-
export type ClaudeRawEvent = SDKMessage | ClaudeTurnInterrupted | ClaudeSteerRead | ClaudeQuerySettled;
|
|
12
|
+
export type ClaudeRawEvent = SDKMessage | ClaudeTurnInterrupted | ClaudeSteerRead | ClaudeQuerySettled | ClaudeMcpServerNames;
|
|
13
|
+
/**
|
|
14
|
+
* The MCP servers the session knows as the turn begins, which name its MCP
|
|
15
|
+
* tools (`mcp__<server>__<tool>`): a server's name may hold `__` itself.
|
|
16
|
+
*/
|
|
17
|
+
export interface ClaudeMcpServerNames {
|
|
18
|
+
type: "agentServer/mcpServers";
|
|
19
|
+
names: string[];
|
|
20
|
+
}
|
|
13
21
|
/**
|
|
14
22
|
* The turn was asked to stop. An interrupted query and one that failed end on
|
|
15
23
|
* the same result (`error_during_execution`, the stop reason of the step it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GACvB,UAAU,GACV,qBAAqB,GACrB,eAAe,GACf,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GACvB,UAAU,GACV,qBAAqB,GACrB,eAAe,GACf,kBAAkB,GAClB,oBAAoB,CAAC;AAExB;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,6BAA6B,CAAC;CACpC;AAED,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC3D,IAAI,EAAE,0BAA0B,CAAC;IACjC,0FAA0F;IAC1F,aAAa,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAKpE"}
|
|
@@ -21,7 +21,7 @@ type ClaudeQuery = (params: {
|
|
|
21
21
|
prompt: AsyncIterable<SDKUserMessage>;
|
|
22
22
|
options: CCOptions;
|
|
23
23
|
}) => Query & ClaudeLoginControl;
|
|
24
|
-
|
|
24
|
+
interface ClaudeCliLoginOptions {
|
|
25
25
|
resolveCliPath?: () => Promise<string | undefined>;
|
|
26
26
|
processes: NativeProcesses;
|
|
27
27
|
inheritConfig?: InheritConfig;
|
|
@@ -44,10 +44,13 @@ interface ClaudeAuthStatus {
|
|
|
44
44
|
* as the CLI decides it.
|
|
45
45
|
*/
|
|
46
46
|
export declare function claudeLoginStatus(raw: ClaudeAuthStatus): LoginStatus;
|
|
47
|
+
/** The login store a turn or a login with this `env` uses: its `CLAUDE_CONFIG_DIR`, empty when unset. */
|
|
48
|
+
export declare function claudeLoginStore(env: Record<string, string> | undefined): string;
|
|
47
49
|
/** Claude Code's login: `claude auth status`, its OAuth flows over the SDK, `claude auth logout`. */
|
|
48
50
|
export declare class ClaudeCliLogin implements CliLogin {
|
|
49
51
|
private readonly options;
|
|
50
52
|
constructor(options: ClaudeCliLoginOptions);
|
|
53
|
+
store(env: Record<string, string> | undefined): string;
|
|
51
54
|
/** The CLI to run a command of: the one turns run, else `$CLAUDE_CLI_PATH`, else `claude` on PATH. */
|
|
52
55
|
private commandPath;
|
|
53
56
|
/** The environment a turn with this `env` runs Claude Code in: whose login it is. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAc,KAAK,UAAU,EAAoB,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAI3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAIhB,MAAM,aAAa,CAAC;AAerB;;;;;GAKG;AACH,UAAU,kBAAkB;IAC3B,kBAAkB,CAAC,CAClB,iBAAiB,EAAE,OAAO,GACxB,OAAO,CAAC;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC5D,mBAAmB,CAAC,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjF,4BAA4B,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAClD;AAED,KAAK,WAAW,GAAG,CAAC,MAAM,EAAE;IAC3B,MAAM,EAAE,a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|
|
|
3
3
|
import { UnavailableMcpServers } from "../mcp-config.ts";
|
|
4
4
|
import type { SdkMcpServers } from "./options.ts";
|
|
5
5
|
/** What an MCP update asks of the live query. */
|
|
6
|
-
|
|
6
|
+
type McpControl = Pick<Query, "setMcpServers" | "mcpServerStatus">;
|
|
7
7
|
/**
|
|
8
8
|
* A Claude session's MCP servers: the turn's wire servers it runs with, the
|
|
9
9
|
* host's in-process ones, and what is known of their connections. Every
|
|
@@ -11,8 +11,10 @@ export type McpControl = Pick<Query, "setMcpServers" | "mcpServerStatus">;
|
|
|
11
11
|
* interleave on the CLI's control channel.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ClaudeMcpConnections {
|
|
14
|
+
private readonly hostResumed;
|
|
14
15
|
private wire;
|
|
15
16
|
private host;
|
|
17
|
+
private loaded;
|
|
16
18
|
private updates;
|
|
17
19
|
/**
|
|
18
20
|
* Set while an update has not finished, with the servers that failed in it.
|
|
@@ -21,22 +23,33 @@ export declare class ClaudeMcpConnections {
|
|
|
21
23
|
* uncertainty holds until a verified reattachment succeeds.
|
|
22
24
|
*/
|
|
23
25
|
private failed?;
|
|
24
|
-
private invalidated;
|
|
25
26
|
/** Servers not required that could not connect: the session's turns go on without them. */
|
|
26
27
|
readonly unavailable: UnavailableMcpServers;
|
|
27
|
-
/**
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* `servers`: the spawning turn's, attached before its prompt.
|
|
30
|
+
* `hostResumed`: whether a host resume came since the process began to
|
|
31
|
+
* start (the pool's `startedBeforeResume`).
|
|
32
|
+
*/
|
|
33
|
+
constructor(servers: Record<string, McpServerConfig> | undefined, hostResumed?: () => boolean);
|
|
29
34
|
/** The wire servers the session runs with: the last update's, or the spawning turn's. */
|
|
30
35
|
get servers(): Readonly<Record<string, McpServerConfig>>;
|
|
36
|
+
/**
|
|
37
|
+
* Every server name the session knows: the wire's, the host's, and those
|
|
38
|
+
* Claude loaded from the person's configuration (above `inheritConfig:
|
|
39
|
+
* "none"`), which its `system/init` lists. A tool name is matched against them.
|
|
40
|
+
*/
|
|
41
|
+
get names(): string[];
|
|
42
|
+
/** The servers Claude's `system/init` listed. */
|
|
43
|
+
sawLoaded(names: readonly string[]): void;
|
|
31
44
|
/** The last update did not finish: what the CLI holds now is not known. */
|
|
32
45
|
get uncertain(): boolean;
|
|
33
46
|
/**
|
|
34
47
|
* The process must be replaced: host suspension invalidated its
|
|
35
|
-
* subprocess-wide HTTP pool, which replacing MCP clients cannot clear.
|
|
48
|
+
* subprocess-wide HTTP pool, which replacing MCP clients cannot clear. A
|
|
49
|
+
* thawed VM can retain clients whose sockets still appear connected, so it
|
|
50
|
+
* holds until the process is replaced, whatever an update says after.
|
|
36
51
|
*/
|
|
37
52
|
get respawnRequired(): boolean;
|
|
38
|
-
/** A thawed VM can retain clients whose sockets still appear connected. */
|
|
39
|
-
invalidate(): void;
|
|
40
53
|
/** The host's in-process servers, resolved at spawn: every update keeps them, and they win a name. */
|
|
41
54
|
useHostServers(servers: SdkMcpServers | undefined): void;
|
|
42
55
|
/** Whether a turn asking for `servers` must update the connections before its prompt. */
|
|
@@ -49,4 +62,5 @@ export declare class ClaudeMcpConnections {
|
|
|
49
62
|
update(servers: Record<string, McpServerConfig>, control: () => McpControl | undefined): Promise<McpSetServersResult | undefined>;
|
|
50
63
|
private apply;
|
|
51
64
|
}
|
|
65
|
+
export {};
|
|
52
66
|
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EACN,qBAAqB,EAKrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAA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tG,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;IAIxD,yFAAyF;IACzF,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GAAG,OAAO;IAW1E;;;;OAIG;IACH,MAAM,CACL,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACxC,OAAO,EAAE,MAAM,UAAU,GAAG,SAAS,GACnC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;YAc7B,KAAK;CAyFnB"}
|
|
@@ -13,7 +13,11 @@ export declare function claudeModelDescriptors(models: readonly ClaudeModelInfo[
|
|
|
13
13
|
* lowers a level its model lacks on its own and does not say so (`max` and
|
|
14
14
|
* `xhigh` become `high`), so the level is fitted here, where the model's levels
|
|
15
15
|
* are known. `off` is sent as it is: some models do not let thinking be
|
|
16
|
-
* disabled, and Claude Code then thinks at its default effort
|
|
16
|
+
* disabled, and Claude Code then thinks at its default effort; Haiku, which
|
|
17
|
+
* Claude Code otherwise starts thinking, does not think with it. A model known
|
|
18
|
+
* to have no effort levels (`levels: []`, Haiku) is sent no other level, so it
|
|
19
|
+
* is not started on adaptive thinking at an effort it has no control for; a
|
|
20
|
+
* model whose levels are unknown (`undefined`) is sent the level as asked.
|
|
17
21
|
*/
|
|
18
22
|
export declare function fitClaudeThinking(level: ThinkingLevel | undefined, levels: readonly ThinkingLevel[] | undefined): {
|
|
19
23
|
send?: ThinkingLevel;
|