@zvada/agent-server 0.3.21 → 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 +332 -0
- package/README.md +2 -1
- 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 +66 -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 +4 -3
- 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 +21 -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 +61 -14
- 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 +26 -5
- 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 +45 -20
- 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 +32 -5
- 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 +70 -33
- 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 +37 -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/plan.d.ts +2 -13
- package/dist/types/core/agents/plan.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 +6 -1
- 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 +18 -9
- 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 +14 -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 +15 -1
- package/dist/types/core/utils/errors.d.ts.map +1 -1
- package/dist/types/operator/index.d.ts +11 -0
- package/dist/types/operator/index.d.ts.map +1 -0
- package/dist/types/operator/mcp.d.ts +33 -0
- package/dist/types/operator/mcp.d.ts.map +1 -0
- package/dist/types/operator/operator.d.ts +206 -0
- package/dist/types/operator/operator.d.ts.map +1 -0
- package/dist/types/operator/render.d.ts +89 -0
- package/dist/types/operator/render.d.ts.map +1 -0
- package/dist/types/operator/view.d.ts +44 -0
- package/dist/types/operator/view.d.ts.map +1 -0
- 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/plan.d.ts +20 -0
- package/dist/types/protocol/plan.d.ts.map +1 -0
- 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/dist/types/sync/worker.d.ts.map +1 -1
- package/docs/consuming.md +464 -40
- package/docs/deploy.md +36 -8
- package/docs/durable-sessions.md +35 -5
- package/docs/harnesses.md +396 -30
- package/package.json +11 -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 +113 -22
- package/src/client/index.ts +1 -0
- package/src/client/logins.ts +24 -15
- 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 +69 -10
- package/src/core/agents/codex-app-server/codex-agent.ts +141 -55
- 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 +59 -10
- 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 +142 -26
- package/src/core/agents/codex-app-server/models.ts +9 -8
- package/src/core/agents/codex-app-server/options.ts +79 -11
- 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 +156 -81
- 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 +96 -35
- 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/plan.ts +3 -19
- 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 +12 -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 +70 -34
- 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 +53 -3
- package/src/core/utils/deadline.ts +23 -0
- package/src/core/utils/errors.ts +24 -4
- package/src/operator/index.ts +40 -0
- package/src/operator/mcp.ts +171 -0
- package/src/operator/operator.ts +782 -0
- package/src/operator/render.ts +473 -0
- package/src/operator/view.ts +82 -0
- 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/plan.ts +35 -0
- package/src/protocol/tool-state.ts +14 -1
- package/src/protocol/wire.ts +14 -0
- package/src/server/acp/binding.ts +113 -22
- 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/src/sync/worker.ts +4 -0
- 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
|
@@ -50,7 +50,10 @@ export declare class AgentRuntime {
|
|
|
50
50
|
* turn with the same `cwd`, `env` and `apiKey` would use, and cached. Never
|
|
51
51
|
* rejects for a registered harness: without a live list it returns the
|
|
52
52
|
* catalog, with `error` saying why. Turns then fit their thinking level to
|
|
53
|
-
* the listed levels of the model they run.
|
|
53
|
+
* the listed levels of the model they run. A read installs nothing: while
|
|
54
|
+
* the harness's CLI is not installed yet, being installed or failed to,
|
|
55
|
+
* the answer is the catalog with that `error`, kept by no cache, so the
|
|
56
|
+
* first read after the install is live.
|
|
54
57
|
*/
|
|
55
58
|
models(query: ModelsListParams): Promise<ModelList>;
|
|
56
59
|
/**
|
|
@@ -68,9 +71,9 @@ export declare class AgentRuntime {
|
|
|
68
71
|
*/
|
|
69
72
|
prepareClis(harnesses?: readonly AgentHarness[]): Promise<HarnessCli[]>;
|
|
70
73
|
/**
|
|
71
|
-
* Every install of a harness's CLI, whoever caused it (a turn,
|
|
72
|
-
*
|
|
73
|
-
* Returns the unsubscribe.
|
|
74
|
+
* Every install of a harness's CLI, whoever caused it (a turn,
|
|
75
|
+
* `prepareClis`, a login or logout; a read installs nothing): at most four
|
|
76
|
+
* a second, and always its last phase. Returns the unsubscribe.
|
|
74
77
|
*/
|
|
75
78
|
onCliProgress(observer: (progress: HarnessCliProgress) => void): () => void;
|
|
76
79
|
/**
|
|
@@ -79,7 +82,11 @@ export declare class AgentRuntime {
|
|
|
79
82
|
* absent): signed in, with what and as whom, signed out, or unknown and
|
|
80
83
|
* why; and the logins it offers. A login made elsewhere (a terminal) that
|
|
81
84
|
* a read notices counts as a change, as `login` and `logout` do: each
|
|
82
|
-
* session's next turn starts a new CLI, and `onAuthUpdated` hears it.
|
|
85
|
+
* session's next turn starts a new CLI, and `onAuthUpdated` hears it. A
|
|
86
|
+
* login under way to the store is `loginUnderWay`. A read installs
|
|
87
|
+
* nothing: a harness whose CLI is not installed yet, being installed or
|
|
88
|
+
* failed to is `unknown`, with no methods and `error` saying which, and
|
|
89
|
+
* its CLI is not run.
|
|
83
90
|
*/
|
|
84
91
|
authStatus(harnesses?: readonly AgentHarness[], env?: Record<string, string>): Promise<HarnessAuth[]>;
|
|
85
92
|
/**
|
|
@@ -112,7 +119,8 @@ export declare class AgentRuntime {
|
|
|
112
119
|
* `new` (would run), `inflight`/`completed` (an identical request was
|
|
113
120
|
* already admitted — a retry must converge, not re-execute). Throws
|
|
114
121
|
* `TurnConflictError` when this turnId was admitted with DIFFERENT input,
|
|
115
|
-
*
|
|
122
|
+
* or ran too long ago to converge on (`TurnForgottenError`), and the turn's
|
|
123
|
+
* `EventSinkError` when its durable sink stopped it.
|
|
116
124
|
* Wire seats use this to quick-ack a duplicate instead of starting it.
|
|
117
125
|
*/
|
|
118
126
|
admission(request: RunRequest): TurnAdmission;
|
|
@@ -142,9 +150,10 @@ export declare class AgentRuntime {
|
|
|
142
150
|
private steerIdTaken;
|
|
143
151
|
/**
|
|
144
152
|
* Call after the host resumes from suspension, before admitting new turns.
|
|
145
|
-
* Retains conversations and admission receipts
|
|
146
|
-
*
|
|
147
|
-
*
|
|
153
|
+
* Retains conversations and admission receipts, and ends no process: Claude,
|
|
154
|
+
* Codex app-server and ACP replace each retained subprocess before its
|
|
155
|
+
* session's next prompt and strictly resume saved history. Their MCP
|
|
156
|
+
* reset/reload controls can retain dead connections.
|
|
148
157
|
*/
|
|
149
158
|
invalidateMcpConnections(): void;
|
|
150
159
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":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AS,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAI1F,yEAAyE;IACnE,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW3E,QAAQ,CAAC,IAAI,GAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC;YAMjD,eAAe;IAqB7B,0DAA0D;IAC1D,OAAO,CAAC,OAAO;IAIf,yFAAyF;IACzF,OAAO,CAAC,QAAQ;CAQhB"}
|
|
@@ -32,6 +32,8 @@ export declare class EventProcessor {
|
|
|
32
32
|
private permissionMode;
|
|
33
33
|
/** What the harness runs the turn with, once it says (`AgentExecuteOptions.onExecution`). */
|
|
34
34
|
private applied?;
|
|
35
|
+
/** The settings the turn set that were not applied, in the order they were found. */
|
|
36
|
+
private readonly notApplied;
|
|
35
37
|
/** The model writing what follows, by sub-agent tool call ("" for the turn's own). */
|
|
36
38
|
private readonly writtenBy;
|
|
37
39
|
/** The model the open message named. */
|
|
@@ -40,7 +42,9 @@ export declare class EventProcessor {
|
|
|
40
42
|
/** The turn's steers: the echo of one the agent read, and those left unread. */
|
|
41
43
|
steers: TurnSteers);
|
|
42
44
|
/** What the harness runs the turn with, as it learns it: its model names the messages no event names. */
|
|
43
|
-
applyExecution(update: AppliedExecution): void;
|
|
45
|
+
applyExecution({ notApplied, ...update }: AppliedExecution): void;
|
|
46
|
+
/** Settings the turn set that were not applied: `turn.ended.execution.notApplied`. */
|
|
47
|
+
markNotApplied(fields: Iterable<string>): void;
|
|
44
48
|
/**
|
|
45
49
|
* The user echo: emits the submitted input back onto the stream as a
|
|
46
50
|
* complete user message at outputIndex 0, before any harness output — the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-processor.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/event-processor.ts"],"names":[],"mappings":"AAQ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
5
|
* running is joined; a failure is reported, not thrown).
|
|
6
6
|
*/
|
|
7
7
|
export declare function harnessClis(provisioner: CliProvisioner | undefined, harnesses: readonly AgentHarness[], prepare: boolean): Promise<HarnessCli[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Why a read (a model list, a login's status) of this harness waits for an
|
|
10
|
+
* install it does not start: its CLI is not ready and the provisioner names
|
|
11
|
+
* the version an install would fetch (`missing` where the engine installs,
|
|
12
|
+
* `installing`, or `failed` after an install). `undefined` where a read goes
|
|
13
|
+
* ahead: the CLI is ready, nothing installs (`system`, which names no
|
|
14
|
+
* version), or the harness has no managed CLI.
|
|
15
|
+
*/
|
|
16
|
+
export declare function awaitingInstall(provisioner: CliProvisioner | undefined, harness: AgentHarness): Promise<string | undefined>;
|
|
8
17
|
/** An install's progress, once per harness that runs its CLI. */
|
|
9
18
|
export declare function harnessCliProgress(progress: CliProgress, harnesses: readonly AgentHarness[]): HarnessCliProgress[];
|
|
10
19
|
//# sourceMappingURL=harness-clis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-clis.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/harness-clis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"harness-clis.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/harness-clis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,6BAA6B,CAAC;AA+B1F;;;GAGG;AACH,wBAAsB,WAAW,CAChC,WAAW,EAAE,cAAc,GAAG,SAAS,EACvC,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,OAAO,EAAE,OAAO,GACd,OAAO,CAAC,UAAU,EAAE,CAAC,CASvB;AAGD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACpC,WAAW,EAAE,cAAc,GAAG,SAAS,EACvC,OAAO,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B;AAED,iEAAiE;AACjE,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,SAAS,YAAY,EAAE,GAChC,kBAAkB,EAAE,CAYtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentHarness, type AuthLogin, type AuthLoginParams, type AuthUpdated, type HarnessAuth } from "../../protocol/index.ts";
|
|
2
2
|
import type { Agent } from "../agents/base.ts";
|
|
3
|
-
|
|
3
|
+
interface HarnessLoginsOptions {
|
|
4
4
|
now?: () => number;
|
|
5
5
|
newId?: () => string;
|
|
6
6
|
loginTtlMs?: number;
|
|
@@ -12,8 +12,13 @@ export interface HarnessLoginsOptions {
|
|
|
12
12
|
* Each harness's login, read from its CLI, and the logins under way. A login
|
|
13
13
|
* that succeeds and a logout change the login, and so does a read that
|
|
14
14
|
* differs from the last one of its store (a login in a terminal): `onChanged`
|
|
15
|
-
* hears it
|
|
16
|
-
*
|
|
15
|
+
* hears it, with the store as the harness names it (each of that store's
|
|
16
|
+
* sessions starts its next turn on a new CLI, model lists are read again),
|
|
17
|
+
* and `onUpdated` listeners are told, as they are when a login starts
|
|
18
|
+
* and when it ends. Every login that leaves here carries the store's login
|
|
19
|
+
* under way (`loginUnderWay`), added as it leaves: a reading kept for its
|
|
20
|
+
* store never holds it, so a login starting or ending is no change of the
|
|
21
|
+
* login.
|
|
17
22
|
*/
|
|
18
23
|
export declare class HarnessLogins {
|
|
19
24
|
private readonly agentFor;
|
|
@@ -24,10 +29,24 @@ export declare class HarnessLogins {
|
|
|
24
29
|
private readonly reads;
|
|
25
30
|
private readonly listeners;
|
|
26
31
|
private stopped;
|
|
27
|
-
constructor(agentFor: (harness: AgentHarness) => Agent, onChanged: (harness: AgentHarness) => void, options?: HarnessLoginsOptions);
|
|
32
|
+
constructor(agentFor: (harness: AgentHarness) => Agent, onChanged: (harness: AgentHarness, store: string | undefined) => void, options?: HarnessLoginsOptions);
|
|
28
33
|
private now;
|
|
34
|
+
/**
|
|
35
|
+
* The login changed in the store a turn with this `env` uses, as its
|
|
36
|
+
* harness names it. Status reads stay keyed by the whole `env`, which can
|
|
37
|
+
* differ in more than the store.
|
|
38
|
+
*/
|
|
39
|
+
private changed;
|
|
29
40
|
/** Each harness's login: a read under way, or one a moment old, is shared. */
|
|
30
41
|
status(harnesses: readonly AgentHarness[], env?: Record<string, string>): Promise<HarnessAuth[]>;
|
|
42
|
+
/** One harness's login, with the store's login under way. */
|
|
43
|
+
statusOf(harness: AgentHarness, env?: Record<string, string>): Promise<HarnessAuth>;
|
|
44
|
+
/**
|
|
45
|
+
* The login as it leaves here: with the store's login under way, as
|
|
46
|
+
* `auth/login` answered it, when there is one. Made at the moment it is
|
|
47
|
+
* told, so no answer or update shows a login a newer one replaced.
|
|
48
|
+
*/
|
|
49
|
+
private withLogin;
|
|
31
50
|
private reread;
|
|
32
51
|
/** Its login and the ways to sign in, each read apart: a login that cannot be read can still be made. */
|
|
33
52
|
private read;
|
|
@@ -39,6 +58,14 @@ export declare class HarnessLogins {
|
|
|
39
58
|
* wins.
|
|
40
59
|
*/
|
|
41
60
|
login({ harness, method, apiKey, env }: AuthLoginParams): Promise<AuthLogin>;
|
|
61
|
+
/**
|
|
62
|
+
* Tell every listener a login started, after `auth/login` is answered:
|
|
63
|
+
* the store's login (its recent reading, else a new one) with this one
|
|
64
|
+
* under way. Nothing when it ended meanwhile, as its end says it; a read
|
|
65
|
+
* of its own that noticed a change is told all the same. A recent
|
|
66
|
+
* reading's change is its reader's, who told it already.
|
|
67
|
+
*/
|
|
68
|
+
private tellStarted;
|
|
42
69
|
/** Keep a started login until it ends, and expire it. */
|
|
43
70
|
private track;
|
|
44
71
|
/**
|
|
@@ -50,7 +77,7 @@ export declare class HarnessLogins {
|
|
|
50
77
|
cancel(loginId: string): "cancelled" | "not_found";
|
|
51
78
|
/** Remove the CLI's own login: the harness's login after it. */
|
|
52
79
|
logout(harness: AgentHarness, env?: Record<string, string>): Promise<HarnessAuth>;
|
|
53
|
-
/** Every change of a harness's login, and every login's end. Returns the unsubscribe. */
|
|
80
|
+
/** Every change of a harness's login, and every login's start and end. Returns the unsubscribe. */
|
|
54
81
|
onUpdated(listener: (update: AuthUpdated) => void): () => void;
|
|
55
82
|
/** Stop every login under way, and start none: its CLI goes, and no other starts to say so. */
|
|
56
83
|
shutdown(): void;
|
|
@@ -65,4 +92,5 @@ export declare class HarnessLogins {
|
|
|
65
92
|
private finish;
|
|
66
93
|
private emit;
|
|
67
94
|
}
|
|
95
|
+
export {};
|
|
68
96
|
//# sourceMappingURL=harness-logins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-logins.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/harness-logins.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAKhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA8B/C,
|
|
1
|
+
{"version":3,"file":"harness-logins.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/harness-logins.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAKhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA8B/C,UAAU,oBAAoB;IAC7B,GAAG,CAAC,EAAE,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,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC;IAsClF;;;;;;OAMG;YACW,WAAW;IAUzB,yDAAyD;IACzD,OAAO,CAAC,KAAK;IAyCb;;;OAGG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAgBnE,8BAA8B;IAC9B,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW;IAOlD,gEAAgE;IAC1D,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IASvF,mGAAmG;IACnG,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI;IAK9D,+FAA+F;IAC/F,QAAQ,IAAI,IAAI;IAKhB,OAAO,CAAC,QAAQ;IAIhB,uEAAuE;IACvE,OAAO,CAAC,GAAG;IAKX;;;;OAIG;YACW,MAAM;IAoBpB,OAAO,CAAC,IAAI;CASZ"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type AgentHarness, type ModelList, type ModelsListParams, type ThinkingLevel } from "../../protocol/index.ts";
|
|
2
2
|
import type { Agent } from "../agents/base.ts";
|
|
3
|
+
/** The catalog's models for a harness, as a list (`source: "catalog"`). */
|
|
4
|
+
export declare function catalogModelList(harness: AgentHarness, fetchedAt: number): ModelList;
|
|
3
5
|
/**
|
|
4
6
|
* Model lists per harness, login and folder. Concurrent reads of one key share
|
|
5
7
|
* a single CLI read, and a result is stored only if no newer read started
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-lists.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/model-lists.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,K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AAI;CAwBlB"}
|
|
@@ -4,7 +4,7 @@ import type { PermissionDecision, PermissionRequestHandler } from "../agents/bas
|
|
|
4
4
|
* What a harness's request offers, and so who keeps an "always" answer: read
|
|
5
5
|
* once from `PermissionRequestHandler`'s `options` and `always`.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type PermissionAsk =
|
|
8
8
|
/** The harness's own choices (a plan's approval: the mode to go on in). */
|
|
9
9
|
{
|
|
10
10
|
kind: "own_options";
|
|
@@ -28,8 +28,9 @@ export type PermissionAsk =
|
|
|
28
28
|
* standing answer covers. "Always" covers what the harness says it does,
|
|
29
29
|
* never every call to the tool: one `npm test` must not approve every later
|
|
30
30
|
* command, so a harness that keeps it itself, or cannot scope one, says so,
|
|
31
|
-
* and the engine keeps no standing rule for its requests
|
|
32
|
-
*
|
|
31
|
+
* and the engine keeps no standing rule for its requests. A request no
|
|
32
|
+
* "always" is kept for at all (an ACP agent's, Codex's consent for an MCP
|
|
33
|
+
* tool call) leaves the engine one per tool.
|
|
33
34
|
*/
|
|
34
35
|
export declare function permissionAsk(opts: Parameters<PermissionRequestHandler>[1]): PermissionAsk;
|
|
35
36
|
/** The options a request offers. A harness that keeps "always" keeps no refusal: there is no "always reject" for it. */
|
|
@@ -58,4 +59,5 @@ export declare class StandingRules {
|
|
|
58
59
|
/** An `*_always` answer becomes the tool's standing rule. */
|
|
59
60
|
learn(toolName: string, selected: PermissionOption | undefined): void;
|
|
60
61
|
}
|
|
62
|
+
export {};
|
|
61
63
|
//# sourceMappingURL=permission-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-policy.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/permission-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAEhB,iBAAiB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEt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7D,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI;CAIrE"}
|
|
@@ -7,7 +7,7 @@ export interface RequestAnswers {
|
|
|
7
7
|
}
|
|
8
8
|
export type RequestKind = keyof RequestAnswers;
|
|
9
9
|
/** What a broker writes to and how long a request may wait. */
|
|
10
|
-
|
|
10
|
+
interface BrokerTurn {
|
|
11
11
|
sessionId: string;
|
|
12
12
|
turnId: string;
|
|
13
13
|
emit(event: LifecycleEvent): Promise<void>;
|
|
@@ -46,4 +46,5 @@ export declare class RequestBroker {
|
|
|
46
46
|
drain(): Promise<void>;
|
|
47
47
|
private park;
|
|
48
48
|
}
|
|
49
|
+
export {};
|
|
49
50
|
//# sourceMappingURL=request-broker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-broker.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/request-broker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAElB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC9B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,kBAAkB,CAAC;CAChC;AACD,MAAM,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC;AAgB/C,+DAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"request-broker.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/request-broker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAElB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG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AAC,IAAI,CAAC;YAMd,IAAI;CAkClB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentHarness, ErrorInfo, RunRequest, StopReason, TokenUsage, TurnExecution } from "../../protocol/index.ts";
|
|
1
|
+
import type { AgentHarness, AgentInput, ErrorInfo, RunConfig, RunRequest, StopReason, TokenUsage, TurnExecution } from "../../protocol/index.ts";
|
|
2
2
|
import type { AgentRegistry } from "../agents/registry.ts";
|
|
3
3
|
import { type DiagnosticHandler } from "../diagnostics.ts";
|
|
4
4
|
import { type EventSink, EventSinkError } from "./event-sink.ts";
|
|
@@ -43,6 +43,8 @@ export interface SessionMemory {
|
|
|
43
43
|
announcedNative?: string;
|
|
44
44
|
/** Its recently settled turns, oldest first: a retry converges on one. */
|
|
45
45
|
readonly settled: Map<string, SettledTurn>;
|
|
46
|
+
/** The turns that fell out of `settled`, by id: a retry of one is refused, never run again. */
|
|
47
|
+
readonly forgotten: Set<string>;
|
|
46
48
|
}
|
|
47
49
|
/** What the runtime lends its turns. */
|
|
48
50
|
export interface TurnHost {
|
|
@@ -57,6 +59,17 @@ export interface TurnHost {
|
|
|
57
59
|
/** Cancel the session's turn, as `AgentRuntime.cancel` does. */
|
|
58
60
|
cancel(harness: AgentHarness, sessionId: string): Promise<unknown>;
|
|
59
61
|
}
|
|
62
|
+
/** The settings a turn set that its harness never applies. */
|
|
63
|
+
export declare function ignoredSettingsOf(config: RunConfig, ignored?: readonly string[]): string[];
|
|
64
|
+
/**
|
|
65
|
+
* Input as an agent is given it: every string of it well-formed, a lone
|
|
66
|
+
* UTF-16 surrogate (a string cut in the middle of an emoji) made U+FFFD.
|
|
67
|
+
* Codex cannot read a line that carries one and never answers it. The user
|
|
68
|
+
* echo is made of the caller's own input, not this (LLP 0002, The user echo
|
|
69
|
+
* comes first). A text element's byte range still holds: UTF-8 writes a lone
|
|
70
|
+
* surrogate as U+FFFD, three bytes.
|
|
71
|
+
*/
|
|
72
|
+
export declare function wellFormedInput(input: AgentInput): AgentInput;
|
|
60
73
|
/**
|
|
61
74
|
* One admitted turn, from admission until it settles. It executes the request
|
|
62
75
|
* on its harness, streams what the harness does through the processor to its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,SAAS,EAET,UAAU,EACV,UAAU,EAEV,UAAU,EACV,aAAa,EACb,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,KAAK,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,KAAK,aAAa,EAA0C,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG7D,6FAA6F;AAC7F,MAAM,WAAW,UAAU;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,yEAAyE;IACzE,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,kFAAkF;IA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,SAAS,CAAS;gBAGR,OAAO,EAAE,UAAU;IACpC,wEAAwE;IAC/D,QAAQ,EAAE,MAAM,EACR,IAAI,EAAE,SAAS;IAChC,gEAAgE;IAC/C,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,QAAQ;IAsBhC;;;;OAIG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;YAKhB,OAAO;IAwGrB,6GAA6G;IAC7G,OAAO,CAAC,YAAY;IAyCpB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAgBhC;IAEF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CACkB;YAEvC,qBAAqB;IAqBnC;;;;;OAKG;YACW,IAAI;CAuBlB"}
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
export declare function withTimeout<T>(promise: Promise<T>, ms: number): Promise<{
|
|
7
7
|
value: T;
|
|
8
8
|
} | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Wait for `promise` until `signal` aborts: its value, or the signal's reason
|
|
11
|
+
* thrown once the signal aborts first. Only the wait ends: the work goes on
|
|
12
|
+
* for whoever else waits for it. Without a signal it waits for the work.
|
|
13
|
+
*/
|
|
14
|
+
export declare function untilAborted<T>(promise: Promise<T>, signal: AbortSignal | undefined): Promise<T>;
|
|
9
15
|
/**
|
|
10
16
|
* Run `fn` once `signal` aborts, or at once if it already has. Returns what
|
|
11
17
|
* removes it again. Without a signal it never runs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deadline.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/deadline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,CAAC,EAClC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,EAAE,EAAE,MAAM,GACR,OAAO,CAAC;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG,SAAS,CAAC,CAanC;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAUnF"}
|
|
1
|
+
{"version":3,"file":"deadline.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/deadline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,CAAC,EAClC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,EAAE,EAAE,MAAM,GACR,OAAO,CAAC;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG,SAAS,CAAC,CAanC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,CAAC,EACnC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,MAAM,EAAE,WAAW,GAAG,SAAS,GAC7B,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAUnF"}
|
|
@@ -32,6 +32,14 @@ export declare class TurnConflictError extends AgentServerError {
|
|
|
32
32
|
/** Set when a steer's id was reused, rather than the turn's. */
|
|
33
33
|
steerId?: string | undefined);
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A turn id the session already ran, whose answer the runtime no longer keeps
|
|
37
|
+
* (a volatile session remembers its last 16 turns): a retry this late cannot
|
|
38
|
+
* converge, and is never run a second time. The wire's `turnConflict`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class TurnForgottenError extends TurnConflictError {
|
|
41
|
+
constructor(sessionId: string, turnId: string);
|
|
42
|
+
}
|
|
35
43
|
/**
|
|
36
44
|
* A turn's request that `RunRequestSchema` refuses: it never runs. The wire
|
|
37
45
|
* refuses the same request as `invalidParams` before it reaches the engine.
|
|
@@ -95,10 +103,16 @@ export declare class McpUnavailableError extends AgentServerError {
|
|
|
95
103
|
export declare class CliNotFoundError extends AgentServerError {
|
|
96
104
|
constructor(name: string, hint?: string);
|
|
97
105
|
}
|
|
98
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Managed CLI provisioning failed (download, integrity, or a bad override).
|
|
108
|
+
* `category` says what failed where the install knows (`network` for a
|
|
109
|
+
* registry that cannot be reached or answers 5xx, and for a cut transfer);
|
|
110
|
+
* otherwise its message is classified. `clis/*` and the turn carry it alike.
|
|
111
|
+
*/
|
|
99
112
|
export declare class CliProvisionError extends AgentServerError {
|
|
100
113
|
constructor(message: string, options?: {
|
|
101
114
|
cause?: unknown;
|
|
115
|
+
category?: ErrorCategory;
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,yBAAyB,CAAC;AAc5E;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAGzC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa;IACjC,qDAAqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAJjD,OAAO,EAAE,MAAM,EACN,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,aAAa,YAAA;IACjC,qDAAqD;IAC5C,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,YAAA;CAKlD;AAED,qBAAa,wBAAyB,SAAQ,gBAAgB;gBACjD,OAAO,EAAE,MAA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KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAW9B;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;IAC5C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAAzC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAW9D;AAED,qBAAa,gBAAiB,SAAQ,gBAAgB;gBACzC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAOvC;AAED;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;gBAC1C,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,aAAa,CAAA;KAAE;CAKpF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@zvada/agent-server/operator`: the session tools an outside agent operates a
|
|
3
|
+
* product's coding agents with, and their MCP binding. Imports only the
|
|
4
|
+
* protocol and zod; the product is the `OperatorHost` (LLP 0014).
|
|
5
|
+
*/
|
|
6
|
+
export { PLAN_OPTIONS, PLAN_TITLE } from "../protocol/plan.ts";
|
|
7
|
+
export { type McpHandler, type McpServerInfo, type ToolSource, createMcpHandler, } from "./mcp.ts";
|
|
8
|
+
export { type Operator, type OperatorClock, type OperatorHost, type OperatorOptions, type SendOptions, type SendResult, type SessionEntry, type StartInput, type StartResult, type Tool, type ToolInfo, type ViewOptions, OperatorError, createOperator, tool, } from "./operator.ts";
|
|
9
|
+
export { type Answer, callHint, oneLine, quote, quoted } from "./render.ts";
|
|
10
|
+
export { type DecisionRequest, type Phase, type QuestionRequest, type SessionView, type ViewMessage, type Waiting, phaseOf, viewOf, } from "./view.ts";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operator/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACN,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,aAAa,EACb,cAAc,EACd,IAAI,GACJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,OAAO,EACP,MAAM,GACN,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The operator tools over MCP, with no dependency: one function answers one
|
|
3
|
+
* JSON-RPC message (or a batch) of the Model Context Protocol's tool surface.
|
|
4
|
+
*
|
|
5
|
+
* It serves stateless Streamable HTTP. A product's route parses the POST
|
|
6
|
+
* body, calls the handler with the caller it authenticated, and answers
|
|
7
|
+
* `200 application/json` with the result, or `202` with no body when the
|
|
8
|
+
* result is null (a notification). It answers GET with `405`: the server
|
|
9
|
+
* never opens a stream of its own.
|
|
10
|
+
*/
|
|
11
|
+
import { type ToolInfo } from "./operator.ts";
|
|
12
|
+
/** Anything that lists and runs tools: an operator, or a host's wrapper around one. */
|
|
13
|
+
export interface ToolSource<Caller> {
|
|
14
|
+
tools(caller: Caller): ToolInfo[];
|
|
15
|
+
call(name: string, args: unknown, caller: Caller): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
export interface McpServerInfo {
|
|
18
|
+
name: string;
|
|
19
|
+
version: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Words for the client's model about how to use the server. */
|
|
22
|
+
instructions?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The MCP protocol versions this binding answers, newest first: the list the
|
|
26
|
+
* official SDK (`@modelcontextprotocol/sdk` 1.32, `SUPPORTED_PROTOCOL_VERSIONS`
|
|
27
|
+
* in its `types.js`) accepts. The tool methods used here are the same in each.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MCP_PROTOCOL_VERSIONS: readonly ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
30
|
+
export type McpHandler<Caller> = (message: unknown, caller: Caller) => Promise<unknown | null>;
|
|
31
|
+
/** Answer one MCP JSON-RPC message (or batch array). Returns the response, or null for a notification. */
|
|
32
|
+
export declare function createMcpHandler<Caller>(source: ToolSource<Caller>, info: McpServerInfo): McpHandler<Caller>;
|
|
33
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/operator/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG7D,uFAAuF;AACvF,MAAM,WAAW,UAAU,CAAC,MAAM;IACjC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,iFAMxB,CAAC;AAKX,MAAM,MAAM,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAgB/F,0GAA0G;AAC1G,wBAAgB,gBAAgB,CAAC,MAAM,EACtC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAC1B,IAAI,EAAE,aAAa,GACjB,UAAU,CAAC,MAAM,CAAC,CA+FpB"}
|