@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/credentials.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,6EAA6E;AAC7E,UAAU,aAAa;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC;IAAC,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC,CAAA;CAAE,CAAC;AAS3F
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/credentials.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,mBAAmB,CAAC;A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Aa,CAClC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqBlC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ThinkingLevel } from "../../../protocol/index.ts";
|
|
2
2
|
/** Codex reasoning-effort string for a level (matches the `ReasoningEffort` enum). */
|
|
3
|
-
|
|
3
|
+
type CodexReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
4
4
|
/**
|
|
5
5
|
* The effort Codex runs for `level`. `supported` is what the model accepts, in
|
|
6
6
|
* this vocabulary, where `off` stands for its least effort: `offEffort`, the
|
|
@@ -9,4 +9,5 @@ export type CodexReasoningEffort = "none" | "minimal" | "low" | "medium" | "high
|
|
|
9
9
|
* pinned CLI lists accepts `none` or `minimal`, and every one accepts `low`.
|
|
10
10
|
*/
|
|
11
11
|
export declare function codexReasoningEffort<Off extends "none" | "minimal" = "minimal">(level: ThinkingLevel, supported?: readonly ThinkingLevel[], offEffort?: Off): Exclude<CodexReasoningEffort, "none" | "minimal"> | Off;
|
|
12
|
+
export {};
|
|
12
13
|
//# sourceMappingURL=effort.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effort.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/effort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAEpF,sFAAsF;AACtF,
|
|
1
|
+
{"version":3,"file":"effort.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/effort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAEpF,sFAAsF;AACtF,KAAK,oBAAoB,GACtB,MAAM,GACN,SAAS,GACT,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,GACL,OAAO,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EAC9E,KAAK,EAAE,aAAa,EACpB,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,EACpC,SAAS,CAAC,EAAE,GAAG,GACb,OAAO,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,GAAG,CAIzD"}
|
|
@@ -19,4 +19,23 @@ export declare class CodexHomes {
|
|
|
19
19
|
release(sessionId: string): void;
|
|
20
20
|
clear(): void;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Which folder a `CODEX_HOME` is now (its device and inode), `"gone"` when
|
|
24
|
+
* there is none; nothing when the turn names no home. A process keeps the
|
|
25
|
+
* files it opened in the home it started in, so a home removed or replaced
|
|
26
|
+
* under it is another home: the conversation it writes is in deleted files,
|
|
27
|
+
* and the `config.toml` it reads is not the one there. The comparison holds
|
|
28
|
+
* only while the session holds its home open (`holdHome`): on ext4 a removed
|
|
29
|
+
* folder's inode number goes to the next folder made, at once, unless a
|
|
30
|
+
* handle on the old one is open (measured under Node 22 and Bun 1.3.14), so
|
|
31
|
+
* `rm -rf home; mkdir home` would otherwise read as the same folder.
|
|
32
|
+
*/
|
|
33
|
+
export declare function homeIdentity(home: string | undefined): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Hold the folder a `CODEX_HOME` is now open, keeping its inode number its
|
|
36
|
+
* own (`homeIdentity`), until the answer is called; calling it again does
|
|
37
|
+
* nothing. A turn that names no home, or a home that cannot be opened (no
|
|
38
|
+
* folder, a platform that does not open directories), holds nothing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function holdHome(home: string | undefined): () => void;
|
|
22
41
|
//# sourceMappingURL=homes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homes.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/homes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;;GASG;AACH,qBAAa,UAAU;IAGV,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;gBAEvB,KAAK,GAAE,aAAqB;IAEzD,6EAA6E;IAC7E,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO;IAwC5C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIhC,KAAK,IAAI,IAAI;CAGb"}
|
|
1
|
+
{"version":3,"file":"homes.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/homes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;;GASG;AACH,qBAAa,UAAU;IAGV,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;gBAEvB,KAAK,GAAE,aAAqB;IAEzD,6EAA6E;IAC7E,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO;IAwC5C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIhC,KAAK,IAAI,IAAI;CAGb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQzE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,IAAI,CAa7D"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { ToolMeta } from "../../../protocol/index.ts";
|
|
2
|
-
import type { CodexItem } from "./protocol.ts";
|
|
1
|
+
import type { ToolLocation, ToolMeta, ToolResultContent } from "../../../protocol/index.ts";
|
|
2
|
+
import type { CodexFileChange, CodexItem } from "./protocol.ts";
|
|
3
3
|
/** Codex tools are already normalized names; kinds are fixed per item type. */
|
|
4
4
|
export declare const CODEX_TOOL_KINDS: {
|
|
5
5
|
readonly shell: "execute";
|
|
6
6
|
readonly apply_patch: "edit";
|
|
7
7
|
readonly web_search: "fetch";
|
|
8
8
|
readonly mcp: "other";
|
|
9
|
+
readonly image_generation: "other";
|
|
9
10
|
/** The plan Codex proposes in Plan mode, put to the user like Claude's ExitPlanMode. */
|
|
10
11
|
readonly plan: "switch_mode";
|
|
11
12
|
};
|
|
@@ -17,12 +18,36 @@ export declare const CODEX_TOOL_KINDS: {
|
|
|
17
18
|
export interface CodexToolDescriptor {
|
|
18
19
|
toolName(item: CodexItem): string;
|
|
19
20
|
input(item: CodexItem): Record<string, unknown>;
|
|
21
|
+
/** Codex says this tool's input only once it is done: its completed item sets it again. */
|
|
22
|
+
inputAtCompletion?: true;
|
|
20
23
|
meta(item: CodexItem): ToolMeta;
|
|
21
24
|
result(item: CodexItem): {
|
|
22
25
|
output: string;
|
|
23
26
|
isError: boolean;
|
|
27
|
+
content?: ToolResultContent[];
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
24
29
|
};
|
|
25
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The line a Codex command runs: Codex wraps it in a shell
|
|
33
|
+
* (`/bin/zsh -lc '<line>'`, quoted as Codex quotes it), and the line is that
|
|
34
|
+
* shell's one argument, unquoted. Codex's `commandActions` are not it: they
|
|
35
|
+
* keep only the pieces Codex recognizes (`cd sub && cat c.txt` is one read of
|
|
36
|
+
* `cat c.txt`) and normalize their quoting. A command of any other shape is
|
|
37
|
+
* as Codex reports it; one that is not a string, nothing.
|
|
38
|
+
*/
|
|
39
|
+
export declare function codexCommandLine(command: unknown): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* What a file change shows: a `diff` entry per hunk of an update, at the
|
|
42
|
+
* file it leaves (a move's destination); an add's content as `newText`; a
|
|
43
|
+
* delete's as `oldText`, its `newText` empty. Its locations are each hunk's
|
|
44
|
+
* start in the new file, a move's source too, and an add's or a delete's
|
|
45
|
+
* path alone.
|
|
46
|
+
*/
|
|
47
|
+
export declare function codexChangeView(changes: CodexFileChange[] | undefined): {
|
|
48
|
+
content: ToolResultContent[];
|
|
49
|
+
locations: ToolLocation[];
|
|
50
|
+
};
|
|
26
51
|
/**
|
|
27
52
|
* The descriptor of an item type that is a tool. Its own keys only: an item
|
|
28
53
|
* typed `constructor` is no tool, whatever the object's prototype holds.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB;;;;;;IAM5B,wFAAwF;;CAE5C,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IAClC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;CACF;AAoHD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIrE;AA0BD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS,GAAG;IACxE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,SAAS,EAAE,YAAY,EAAE,CAAC;CAC1B,CA2BA;AAqGD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAErF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AuthMethod } from "../../../protocol/index.ts";
|
|
2
2
|
import { type CliLogin, type LoginOptions, type LoginStatus, type NativeLogin } from "../login.ts";
|
|
3
3
|
import type { CodexConnection } from "./client.ts";
|
|
4
|
-
|
|
4
|
+
interface CodexCliLoginOptions {
|
|
5
5
|
/**
|
|
6
6
|
* A new app-server, not yet initialized, for a turn's `env`: its
|
|
7
7
|
* `CODEX_HOME` is the store a login lands in.
|
|
@@ -21,10 +21,13 @@ interface CodexAccountRead {
|
|
|
21
21
|
}
|
|
22
22
|
/** A login as Codex's app-server says it (`account/read`). */
|
|
23
23
|
export declare function codexLoginStatus(read: CodexAccountRead): LoginStatus;
|
|
24
|
+
/** The login store a turn or a login with this `env` uses: its `CODEX_HOME`, empty when unset. */
|
|
25
|
+
export declare function codexLoginStore(env: Record<string, string> | undefined): string;
|
|
24
26
|
/** Codex's login, through its app-server: `account/read`, `account/login/start`, `account/logout`. */
|
|
25
27
|
export declare class CodexCliLogin implements CliLogin {
|
|
26
28
|
private readonly options;
|
|
27
29
|
constructor(options: CodexCliLoginOptions);
|
|
30
|
+
store(env: Record<string, string> | undefined): string;
|
|
28
31
|
/** Initialize a new app-server, run `use` on it, and end it. */
|
|
29
32
|
private with;
|
|
30
33
|
methods(options: LoginOptions): Promise<AuthMethod[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI7D,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqBnD,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI7D,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqBnD,UAAU,oBAAoB;IAC7B;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3E,+CAA+C;IAC/C,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,mCAAmC;AACnC,UAAU,gBAAgB;IACzB,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACpF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CA4BpE;AAKD,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM,CAE/E;AAED,sGAAsG;AACtG,qBAAa,aAAc,YAAW,QAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAE1D,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM;IAItD,gEAAgE;YAClD,IAAI;IAgBZ,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAWrD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IASnD,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAuDpF,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD"}
|
|
@@ -3,35 +3,11 @@ import type { AgentExecuteOptions } from "../base.ts";
|
|
|
3
3
|
import { type CodexConnection } from "./client.ts";
|
|
4
4
|
import type { CodexHomes } from "./homes.ts";
|
|
5
5
|
import type { CodexNotification } from "./protocol.ts";
|
|
6
|
-
/** Codex supports stdio and Streamable HTTP, not the legacy SSE transport. */
|
|
7
|
-
export declare function codexMcpServers(servers: Record<string, McpServerConfig>): Record<string, unknown>;
|
|
8
|
-
/** Only call against an explicitly isolated, engine-managed CODEX_HOME. */
|
|
9
|
-
export declare function writeCodexMcpServers(client: Pick<CodexConnection, "request">, servers: Record<string, unknown>): Promise<void>;
|
|
10
|
-
/** User-layer write acknowledgements do not account for repository overrides. */
|
|
11
|
-
export declare function assertCodexMcpConfig(client: Pick<CodexConnection, "request">, cwd: string, servers: Record<string, unknown>): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Refuse a turn's server that Codex's own configuration would change. A
|
|
14
|
-
* server in a thread's config is the top layer of Codex's, merged table by
|
|
15
|
-
* table over one of the same name in the user's or the repository's: the
|
|
16
|
-
* turn's values win, and whatever else the other sets stays (its headers
|
|
17
|
-
* and environment sent to the turn's server, its tool filter, `enabled =
|
|
18
|
-
* false`). One that sets nothing more is the turn's server whole, and
|
|
19
|
-
* goes on. Asked before the thread opens, so no connection is made first.
|
|
20
|
-
*/
|
|
21
|
-
export declare function assertCodexThreadMcp(client: Pick<CodexConnection, "request">, cwd: string, servers: Record<string, unknown>): Promise<void>;
|
|
22
6
|
/**
|
|
23
7
|
* Codex's startup error for a server, readable: its Rust type paths out, a
|
|
24
8
|
* chain it repeats said once, and no prefix naming the server again.
|
|
25
9
|
*/
|
|
26
10
|
export declare function codexMcpCause(name: string, error: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Wait for the thread's MCP servers to start, and settle the ones that did
|
|
29
|
-
* not: a required server's failure fails the turn (`McpUnavailableError`);
|
|
30
|
-
* the others are returned, each with why, for the turn to say and go on
|
|
31
|
-
* without. `servers` is the turn's wire configuration, by name, and `causes`
|
|
32
|
-
* why each server last failed, as Codex said.
|
|
33
|
-
*/
|
|
34
|
-
export declare function settleCodexMcp(client: CodexConnection, threadId: string, servers: Readonly<Record<string, McpServerConfig>>, causes: ReadonlyMap<string, string>): Promise<Record<string, string>>;
|
|
35
11
|
/**
|
|
36
12
|
* A turn's MCP servers: as the wire gave them, and as Codex takes them, by
|
|
37
13
|
* where they go. A turn that names a home has them written there
|
|
@@ -47,8 +23,11 @@ export interface CodexTurnMcp {
|
|
|
47
23
|
}
|
|
48
24
|
/** The turn's servers, snapshotted before anything asynchronous can let the caller change them. */
|
|
49
25
|
export declare function codexTurnMcp(options: AgentExecuteOptions, homes: CodexHomes): CodexTurnMcp;
|
|
50
|
-
/**
|
|
51
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Which `mcp_servers` table a thread was opened with (`threadServers`): a
|
|
28
|
+
* turn that needs another runs on the thread opened again in a new process.
|
|
29
|
+
*/
|
|
30
|
+
export declare function threadServersFingerprint(table: Record<string, unknown> | undefined): string;
|
|
52
31
|
/**
|
|
53
32
|
* A session's MCP servers on Codex, for one process: the configuration last
|
|
54
33
|
* written to its home, why each server last failed to start, and the ones
|
|
@@ -74,12 +53,18 @@ export declare class CodexMcpState {
|
|
|
74
53
|
/** Note what Codex says of a server's startup on the session's own thread, not a subagent's. */
|
|
75
54
|
observe({ method, params }: CodexNotification, threadId: string): void;
|
|
76
55
|
/**
|
|
77
|
-
* Before the thread opens, and before each turn
|
|
56
|
+
* Before the thread opens, and before each turn: servers for the home the
|
|
78
57
|
* turn names are written there, checked as Codex took them, and reloaded
|
|
79
|
-
* when they changed
|
|
80
|
-
|
|
58
|
+
* when they changed.
|
|
59
|
+
*/
|
|
60
|
+
configure({ servers }: CodexTurnMcp): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* The `mcp_servers` table the thread carries, for a turn that names no
|
|
63
|
+
* home: the turn's servers, checked against Codex's own configuration.
|
|
64
|
+
* Read before the thread opens, so no connection is made first, and
|
|
65
|
+
* before each turn.
|
|
81
66
|
*/
|
|
82
|
-
|
|
67
|
+
threadServers({ servers, thread, }: CodexTurnMcp): Promise<Record<string, unknown> | undefined>;
|
|
83
68
|
/**
|
|
84
69
|
* Get the thread's servers ready for a turn: configured, started, and the
|
|
85
70
|
* ones it goes on without said through `onWarning`. A required server that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAA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One `model/list` entry, as far as agent-server reads it. */
|
|
4
|
-
|
|
4
|
+
type CodexModel = Record<string, unknown>;
|
|
5
5
|
/** A model's thinking levels, and the native effort that `off` means for it. */
|
|
6
6
|
export interface CodexModelThinking {
|
|
7
7
|
levels: readonly ThinkingLevel[];
|
|
@@ -11,14 +11,6 @@ export interface CodexModelThinking {
|
|
|
11
11
|
}
|
|
12
12
|
/** The level a native Codex effort is: `none` and `minimal` are `off`. */
|
|
13
13
|
export declare function codexThinkingLevel(effort: unknown): ThinkingLevel | undefined;
|
|
14
|
-
/** Every page of `model/list`, hidden models included. Throws when the CLI cannot answer. */
|
|
15
|
-
export declare function readCodexModels(client: Pick<CodexConnection, "request">): Promise<CodexModel[]>;
|
|
16
|
-
/**
|
|
17
|
-
* What each model accepts, by its `model` and `id`. Codex's `none` or
|
|
18
|
-
* `minimal` is `off`, remembered so `off` sends the value the model
|
|
19
|
-
* advertised (`none` when it offers both).
|
|
20
|
-
*/
|
|
21
|
-
export declare function codexModelThinking(models: readonly CodexModel[]): Map<string, CodexModelThinking>;
|
|
22
14
|
/**
|
|
23
15
|
* The thinking levels each model the logged-in account can run accepts, from
|
|
24
16
|
* `model/list`. `undefined` when the CLI cannot answer; callers fall back to
|
|
@@ -44,7 +36,7 @@ export declare function readCodexThreadDefaults(client: Pick<CodexConnection, "r
|
|
|
44
36
|
*/
|
|
45
37
|
export declare function codexModelDescriptors(models: readonly CodexModel[], harness: Extract<AgentHarness, "codex-app-server">, configuredModel?: string): ModelDescriptor[];
|
|
46
38
|
/** What one `codex app-server` says about its models. */
|
|
47
|
-
|
|
39
|
+
interface CodexModelListing {
|
|
48
40
|
models: CodexModel[];
|
|
49
41
|
/**
|
|
50
42
|
* The model a new thread in the listing's folder runs when the turn names
|
|
@@ -64,4 +56,5 @@ export declare function listCodexModels(client: CodexConnection, cwd: string, {
|
|
|
64
56
|
signal?: AbortSignal;
|
|
65
57
|
login?: (client: CodexConnection) => Promise<void>;
|
|
66
58
|
}): Promise<CodexModelListing>;
|
|
59
|
+
export {};
|
|
67
60
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI/F,OAAO,EAAE,KAAK,eAAe,EAAS,MAAM,aAAa,CAAC;AAO1D,+DAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI/F,OAAO,EAAE,KAAK,eAAe,EAAS,MAAM,aAAa,CAAC;AAO1D,+DAA+D;AAC/D,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAK7E;AAuDD;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GACtC,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,SAAS,CAAC,CAQ9D;AAED,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAsBD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC5C,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EACxC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,mBAAmB,CAAC,CAQ9B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAClD,eAAe,CAAC,EAAE,MAAM,GACtB,eAAe,EAAE,CA0BnB;AAED,yDAAyD;AACzD,UAAU,iBAAiB;IAC1B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,4EAA4E;AAC5E,wBAAsB,gBAAgB,CACrC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EACxC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,iBAAiB,CAAC,CAO5B;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,MAAM,EACX,EACC,MAAM,EACN,KAAK,GACL,GAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAAO,GAClF,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
|
|
@@ -7,7 +7,8 @@ import type { CodexAuth } from "./credentials.ts";
|
|
|
7
7
|
* Why a turn without tools (`disableTools`) fails on Codex. With every
|
|
8
8
|
* feature that offers one turned off, Codex 0.160 still gives a code-mode
|
|
9
9
|
* model its `exec` and `wait`, `apply_patch` inside `exec`, its sub-agent
|
|
10
|
-
* tools and `request_user_input` (
|
|
10
|
+
* tools and `request_user_input` (LLP 0017, Codex's own tools, which found
|
|
11
|
+
* the same with every `builtInTools` group off), so the
|
|
11
12
|
* model would still act: the turn is refused instead of running tools the
|
|
12
13
|
* caller turned off.
|
|
13
14
|
*/
|
|
@@ -30,15 +31,37 @@ export declare function processIdentity(options: AgentExecuteOptions): CodexProc
|
|
|
30
31
|
export declare function codexSessionCompatible(existing: CodexProcessIdentity & {
|
|
31
32
|
threadId: string;
|
|
32
33
|
}, options: AgentExecuteOptions): boolean;
|
|
33
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* How the harness starts `codex app-server` for a folder, its `env` and a
|
|
36
|
+
* login, at the operator's `inheritConfig`.
|
|
37
|
+
*/
|
|
34
38
|
export declare function clientOptionsFor(codexPath: string, { cwd, env }: {
|
|
35
39
|
cwd: string;
|
|
36
40
|
env?: Record<string, string>;
|
|
37
|
-
}, auth: CodexAuth | undefined, experimentalApi: boolean): Omit<CodexAppServerClientOptions, "processes">;
|
|
41
|
+
}, auth: CodexAuth | undefined, experimentalApi: boolean, inheritConfig?: InheritConfig): Omit<CodexAppServerClientOptions, "processes">;
|
|
42
|
+
/**
|
|
43
|
+
* Codex's own tools, by group, that the operator leaves on (the default for
|
|
44
|
+
* each, Codex's own behaviour) or turns off for every thread (LLP 0017).
|
|
45
|
+
*/
|
|
46
|
+
export interface CodexBuiltInTools {
|
|
47
|
+
/** The local environment: the shell, unified exec, `apply_patch`, `view_image`, `write_stdin`. */
|
|
48
|
+
local?: boolean;
|
|
49
|
+
webSearch?: boolean;
|
|
50
|
+
imageGeneration?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** What the operator decides for every thread the harness opens. Never from the wire. */
|
|
53
|
+
export interface CodexThreadPolicy {
|
|
54
|
+
inheritConfig?: InheritConfig;
|
|
55
|
+
builtInTools?: CodexBuiltInTools;
|
|
56
|
+
}
|
|
57
|
+
/** `thread/start` and `thread/resume` params, as far as the engine reads them. */
|
|
58
|
+
export interface CodexThreadParams extends Record<string, unknown> {
|
|
59
|
+
config: Record<string, unknown>;
|
|
60
|
+
}
|
|
38
61
|
/**
|
|
39
62
|
* The params `thread/start` and `thread/resume` take for a turn with these
|
|
40
63
|
* options. `mcpServers`: the servers the thread carries in its own config,
|
|
41
64
|
* for a turn that names no home.
|
|
42
65
|
*/
|
|
43
|
-
export declare function threadParams(options: AgentExecuteOptions,
|
|
66
|
+
export declare function threadParams(options: AgentExecuteOptions, policy?: CodexThreadPolicy, mcpServers?: Record<string, unknown>): CodexThreadParams;
|
|
44
67
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,gOAC6L,CAAC;AAE/N,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,MAAM,CAcnE;AAkBD,0FAA0F;AAC1F,MAAM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EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,mBAAmB,EAC5B,MAAM,GAAE,iBAAsB,EAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,iBAAiB,CA0DnB"}
|
|
@@ -2,7 +2,7 @@ import { type CodexRawEvent } from "./events.ts";
|
|
|
2
2
|
import { type ThreadSettings } from "./thread-settings.ts";
|
|
3
3
|
import type { CodexTurn, NativeTurn } from "./turn.ts";
|
|
4
4
|
/** Codex's turn that carries out the user's answer to its plan. */
|
|
5
|
-
|
|
5
|
+
interface NextTurn {
|
|
6
6
|
params: Record<string, unknown>;
|
|
7
7
|
settings: ThreadSettings;
|
|
8
8
|
/** The thread's sandbox once it runs. */
|
|
@@ -16,4 +16,5 @@ export interface NextTurn {
|
|
|
16
16
|
* one), or has nobody to ask, presents the plan as written.
|
|
17
17
|
*/
|
|
18
18
|
export declare function askPlan(turn: CodexTurn, native: NativeTurn): AsyncGenerator<CodexRawEvent, NextTurn | undefined>;
|
|
19
|
+
export {};
|
|
19
20
|
//# sourceMappingURL=plan-approval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-approval.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/plan-approval.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6C,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5F,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAWvD,mEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"plan-approval.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/plan-approval.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6C,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5F,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAWvD,mEAAmE;AACnE,UAAU,QAAQ;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,QAAQ,EAAE,cAAc,CAAC;IACzB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CAChB;AAQD;;;;;;GAMG;AACH,wBAAuB,OAAO,CAC7B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,UAAU,GAChB,cAAc,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC,CA0FrD"}
|
|
@@ -51,6 +51,15 @@ export interface CodexItem {
|
|
|
51
51
|
} | string;
|
|
52
52
|
/** A `webSearch`. */
|
|
53
53
|
query?: string;
|
|
54
|
+
/**
|
|
55
|
+
* An `imageGeneration`: the prompt Codex wrote, once done; where Codex
|
|
56
|
+
* saved the picture; why it failed. (Its base64 `result` is not read.)
|
|
57
|
+
*/
|
|
58
|
+
revisedPrompt?: string | null;
|
|
59
|
+
savedPath?: string;
|
|
60
|
+
failure?: {
|
|
61
|
+
type?: string;
|
|
62
|
+
} | null;
|
|
54
63
|
/** A `collabAgentToolCall`: a sub-agent spawned, messaged or waited on. */
|
|
55
64
|
receiverThreadIds?: string[];
|
|
56
65
|
prompt?: string | null;
|
|
@@ -67,7 +76,7 @@ export interface CodexItem {
|
|
|
67
76
|
clientId?: string | null;
|
|
68
77
|
}
|
|
69
78
|
/** A turn as `turn/started` and `turn/completed` name it (`Turn`). */
|
|
70
|
-
|
|
79
|
+
interface CodexTurnInfo {
|
|
71
80
|
id?: string;
|
|
72
81
|
/** `completed`, `interrupted` (stopped: a cancel, or an approval answered cancel), `failed`. */
|
|
73
82
|
status?: string;
|
|
@@ -92,8 +101,12 @@ export interface CodexThreadOpened {
|
|
|
92
101
|
export declare function codexItem(n: CodexNotification): CodexItem | undefined;
|
|
93
102
|
/** The turn a notification names (`turn/started`, `turn/completed`). */
|
|
94
103
|
export declare function codexTurn(n: CodexNotification): CodexTurnInfo | undefined;
|
|
95
|
-
/**
|
|
96
|
-
|
|
104
|
+
/**
|
|
105
|
+
* An `error` Codex will not retry: its turn failed, and it ends that turn with
|
|
106
|
+
* `turn/completed` next. Seen on 0.160, some time later.
|
|
107
|
+
*/
|
|
108
|
+
export declare function failing(n: CodexNotification): boolean;
|
|
97
109
|
/** An `error` Codex retries what failed after: the turn goes on, and more is to come. */
|
|
98
110
|
export declare function retrying(n: CodexNotification): boolean;
|
|
111
|
+
export {};
|
|
99
112
|
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/protocol.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzE;AAED,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,OAAO,CAAC,EAAE,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,IAAI,EAAE,cAAc,CAAC;CACrB;AAkDD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAoB9D;
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/codex-app-server/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAQtF,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,kBAAkB,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,yBAAyB,CAAC;IACjD,MAAM,EAAE,WAAW,CAAC;IACpB,wDAAwD;IACxD,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACrB;AAkDD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAoB9D;AA2MD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAazB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { AgentExecuteOptions } from "../base.ts";
|
|
2
|
-
import type { InheritConfig } from "../inherit-config.ts";
|
|
3
2
|
import type { CodexConnection } from "./client.ts";
|
|
4
3
|
import { type CodexAuth } from "./credentials.ts";
|
|
5
4
|
import { CodexMcpState, type CodexTurnMcp } from "./mcp.ts";
|
|
6
5
|
import type { CodexModelThinking } from "./models.ts";
|
|
7
|
-
import { type CodexProcessIdentity } from "./options.ts";
|
|
6
|
+
import { type CodexProcessIdentity, type CodexThreadPolicy } from "./options.ts";
|
|
8
7
|
import { type CodexTurnScope } from "./requests.ts";
|
|
9
8
|
import { CodexThread } from "./thread-settings.ts";
|
|
10
9
|
/** One `codex app-server` process, running a logical session's thread. */
|
|
@@ -15,61 +14,67 @@ export interface CodexSession extends CodexProcessIdentity {
|
|
|
15
14
|
authFingerprint?: string;
|
|
16
15
|
mcp: CodexMcpState;
|
|
17
16
|
/**
|
|
18
|
-
* The
|
|
19
|
-
* (`
|
|
17
|
+
* The `mcp_servers` table its thread was opened with
|
|
18
|
+
* (`threadServersFingerprint`): a turn that needs another runs in another
|
|
19
|
+
* process.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
threadServers: string;
|
|
22
|
+
/**
|
|
23
|
+
* The environments each `turn/start` names, when the operator turned
|
|
24
|
+
* Codex's local tools off (`CodexTurn` sends them; it knows no policy).
|
|
25
|
+
*/
|
|
26
|
+
environments?: [];
|
|
22
27
|
/** The logical session's thread settings, which outlive this process. */
|
|
23
28
|
thread: CodexThread;
|
|
24
29
|
/** The turn that has the session: Codex's requests answer for it alone. */
|
|
25
30
|
turn?: CodexTurnScope;
|
|
26
31
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
32
|
+
* Whether a host resume came since it started, which left its MCP
|
|
33
|
+
* connections dead: no `turn/start` is sent on it, and the next turn
|
|
34
|
+
* replaces it (the pool's `startedBeforeResume`).
|
|
29
35
|
*/
|
|
30
|
-
|
|
31
|
-
/** The
|
|
32
|
-
|
|
36
|
+
startedBeforeResume(): boolean;
|
|
37
|
+
/** The folder its `CODEX_HOME` was when it started (`homeIdentity`): another one's turn replaces it. */
|
|
38
|
+
home?: string;
|
|
33
39
|
/** What each model accepts, from this process's `model/list`; read once. */
|
|
34
40
|
modelThinking?: Promise<ReadonlyMap<string, CodexModelThinking> | undefined>;
|
|
35
|
-
idleTimer?: ReturnType<typeof setTimeout>;
|
|
36
41
|
}
|
|
37
42
|
/** Starts a connection to a new `codex app-server` for a turn's folder, `env` and login. */
|
|
38
|
-
|
|
43
|
+
type CodexConnector = (options: AgentExecuteOptions, auth: CodexAuth | undefined, signal: AbortSignal) => Promise<CodexConnection>;
|
|
39
44
|
/**
|
|
40
|
-
* The Codex harness's sessions:
|
|
41
|
-
*
|
|
42
|
-
*
|
|
45
|
+
* The Codex harness's sessions: what is Codex's own of each logical
|
|
46
|
+
* session's process (its thread, its home, its account, its MCP table), on
|
|
47
|
+
* the process pool, which decides when one is reused, replaced or ended;
|
|
48
|
+
* what outlives a process (its thread settings, its home); and the managed
|
|
49
|
+
* sessions whose native cleanup was not confirmed.
|
|
43
50
|
*/
|
|
44
51
|
export declare class CodexSessions {
|
|
45
52
|
private readonly connect;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
private readonly inheritConfig;
|
|
53
|
+
/** The operator's: what a thread loads by itself, whether every turn needs a home, and Codex's own tools. */
|
|
54
|
+
private readonly policy;
|
|
49
55
|
private readonly pool;
|
|
50
56
|
private readonly threads;
|
|
51
57
|
private readonly homes;
|
|
52
58
|
/** Managed sessions whose process was not confirmed stopped: no successor runs until it is. */
|
|
53
59
|
private readonly unsettled;
|
|
54
|
-
/** Counts the login changes: a process keeps the login it read at its start. */
|
|
55
|
-
private login;
|
|
56
|
-
/** Each session's process that was ended and has not exited yet: when it has. */
|
|
57
|
-
private readonly leaving;
|
|
58
60
|
constructor(connect: CodexConnector, idleMs: number,
|
|
59
|
-
/** The operator's: what a thread loads by itself,
|
|
60
|
-
|
|
61
|
+
/** The operator's: what a thread loads by itself, whether every turn needs a home, and Codex's own tools. */
|
|
62
|
+
policy?: CodexThreadPolicy);
|
|
61
63
|
get(sessionId: string): CodexSession | undefined;
|
|
62
64
|
/** The turn's MCP servers, in the `CODEX_HOME` the session claims when the turn names one. */
|
|
63
65
|
mcpFor(options: AgentExecuteOptions): CodexTurnMcp;
|
|
64
66
|
/**
|
|
65
|
-
* The session's process for the turn, which takes it
|
|
66
|
-
* the turn can run there as the same account, else a
|
|
67
|
-
* thread. Codex caches an authenticated model WebSocket across turns, so
|
|
67
|
+
* The session's process for the turn, which takes it (the pool's rule):
|
|
68
|
+
* the running one when the turn can run there as the same account, else a
|
|
69
|
+
* new one, on the same thread. Codex caches an authenticated model WebSocket across turns, so
|
|
68
70
|
* login alone cannot switch its identity: an account or key change
|
|
69
71
|
* restarts the process and resumes the thread. Same-account token renewal
|
|
70
|
-
* keeps it warm. So does an unchanged
|
|
71
|
-
* carries
|
|
72
|
-
* resumes the thread in a new process
|
|
72
|
+
* keeps it warm. So does an unchanged `mcp_servers` table, the servers
|
|
73
|
+
* the thread carries. A thread's config is fixed once it is open, so
|
|
74
|
+
* another table resumes the thread in a new process, which checks them
|
|
75
|
+
* against Codex's configuration again before the thread opens: the user
|
|
76
|
+
* may change it while the old process exits. A home removed or made again
|
|
77
|
+
* under the process starts a new one too.
|
|
73
78
|
*/
|
|
74
79
|
acquire(options: AgentExecuteOptions, turn: CodexTurnScope, mcp: CodexTurnMcp): Promise<CodexSession>;
|
|
75
80
|
/** The turn is done with the session: an open process waits for the next one, at most `idleMs`. */
|
|
@@ -85,21 +90,44 @@ export declare class CodexSessions {
|
|
|
85
90
|
stopUnsettled(sessionId: string): Promise<boolean> | undefined;
|
|
86
91
|
/**
|
|
87
92
|
* Unchanged MCP config reloads retain dead remote connections after VM
|
|
88
|
-
* resume:
|
|
89
|
-
*
|
|
90
|
-
*
|
|
93
|
+
* resume: each session's next turn replaces its process and resumes its
|
|
94
|
+
* thread (the strict thread/resume path). Nothing is ended now; a turn
|
|
95
|
+
* still setting up sends no `turn/start` on its process (`CodexTurn`).
|
|
91
96
|
*/
|
|
92
97
|
invalidate(): void;
|
|
93
98
|
/**
|
|
94
|
-
* The login changed
|
|
95
|
-
*
|
|
99
|
+
* The login changed in `store` (every store when none is named): an
|
|
100
|
+
* app-server keeps the one it read at its start, so each of that store's
|
|
101
|
+
* sessions starts its next turn on a new one, resuming its thread. A turn
|
|
96
102
|
* already setting up or running finishes on its own.
|
|
97
103
|
*/
|
|
98
|
-
loginChanged(): void;
|
|
99
|
-
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
loginChanged(store?: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Forget the session: its process, its thread settings and its home.
|
|
107
|
+
* Settles once every app-server of the session has exited, one an idle
|
|
108
|
+
* eviction or a replacement ended earlier included (the pool's
|
|
109
|
+
* `release`): a product removes the session's home on this answer, and an
|
|
110
|
+
* exiting app-server still writes there.
|
|
111
|
+
*/
|
|
112
|
+
release(sessionId: string): Promise<void>;
|
|
113
|
+
/** End every app-server, and settle once each has exited. */
|
|
114
|
+
terminateAll(): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* What changes on the warm process without a restart, for the turn: its
|
|
117
|
+
* account logged in again (a renewed token), and the `mcp_servers` table
|
|
118
|
+
* its thread needs checked against Codex's own configuration. Another
|
|
119
|
+
* table cannot be changed on an open thread, so the thread resumes in a
|
|
120
|
+
* new process. A cancel meanwhile ends the process, as Codex's answer is
|
|
121
|
+
* not waited for; a refused login ends it too, and a refused table read
|
|
122
|
+
* leaves it for the session's next turn.
|
|
123
|
+
*/
|
|
124
|
+
private applyLiveChange;
|
|
125
|
+
/**
|
|
126
|
+
* Start an app-server for the turn and open the session's thread on it.
|
|
127
|
+
* The pool starts it once every app-server of the session before it has
|
|
128
|
+
* exited.
|
|
129
|
+
*/
|
|
103
130
|
private spawn;
|
|
104
131
|
}
|
|
132
|
+
export {};
|
|
105
133
|
//# sourceMappingURL=session.d.ts.map
|