@elie-laloum/outpost 5.0.0 → 7.0.0
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 +54 -0
- package/README.md +11 -11
- package/SECURITY.md +10 -0
- package/dist/adapters/agents/antigravity-adapter.d.ts +3 -0
- package/dist/adapters/agents/antigravity-adapter.js +41 -0
- package/dist/adapters/agents/antigravity-adapter.js.map +1 -0
- package/dist/adapters/agents/antigravity-authentication.d.ts +2 -0
- package/dist/adapters/agents/antigravity-authentication.js +27 -0
- package/dist/adapters/agents/antigravity-authentication.js.map +1 -0
- package/dist/adapters/agents/antigravity-diagnostics.d.ts +1 -0
- package/dist/adapters/agents/antigravity-diagnostics.js +6 -0
- package/dist/adapters/agents/antigravity-diagnostics.js.map +1 -0
- package/dist/adapters/agents/antigravity-events.d.ts +2 -0
- package/dist/adapters/agents/antigravity-events.js +75 -0
- package/dist/adapters/agents/antigravity-events.js.map +1 -0
- package/dist/adapters/agents/antigravity-request.d.ts +5 -0
- package/dist/adapters/agents/antigravity-request.js +37 -0
- package/dist/adapters/agents/antigravity-request.js.map +1 -0
- package/dist/adapters/agents/antigravity.constants.d.ts +3 -0
- package/dist/adapters/agents/antigravity.constants.js +4 -0
- package/dist/adapters/agents/antigravity.constants.js.map +1 -0
- package/dist/adapters/agents/{gemini.types.d.ts → antigravity.types.d.ts} +2 -2
- package/dist/adapters/agents/antigravity.types.js +2 -0
- package/dist/adapters/agents/antigravity.types.js.map +1 -0
- package/dist/adapters/agents/authentication.constants.d.ts +19 -9
- package/dist/adapters/agents/authentication.constants.js +12 -9
- package/dist/adapters/agents/authentication.constants.js.map +1 -1
- package/dist/adapters/agents/authentication.d.ts +11 -2
- package/dist/adapters/agents/authentication.js +70 -47
- package/dist/adapters/agents/authentication.js.map +1 -1
- package/dist/adapters/agents/authentication.types.d.ts +20 -0
- package/dist/adapters/agents/authentication.types.js +2 -0
- package/dist/adapters/agents/authentication.types.js.map +1 -0
- package/dist/adapters/agents/claude-adapter.js +4 -2
- package/dist/adapters/agents/claude-adapter.js.map +1 -1
- package/dist/adapters/agents/claude-authentication.d.ts +2 -0
- package/dist/adapters/agents/claude-authentication.js +34 -0
- package/dist/adapters/agents/claude-authentication.js.map +1 -0
- package/dist/adapters/agents/claude-events.js +52 -9
- package/dist/adapters/agents/claude-events.js.map +1 -1
- package/dist/adapters/agents/claude-request.js +2 -0
- package/dist/adapters/agents/claude-request.js.map +1 -1
- package/dist/adapters/agents/cli-diagnostics.constants.d.ts +6 -6
- package/dist/adapters/agents/cli-diagnostics.constants.js +6 -6
- package/dist/adapters/agents/cli-diagnostics.constants.js.map +1 -1
- package/dist/adapters/agents/cli-diagnostics.d.ts +1 -0
- package/dist/adapters/agents/cli-diagnostics.js +18 -0
- package/dist/adapters/agents/cli-diagnostics.js.map +1 -1
- package/dist/adapters/agents/codex-adapter.js +4 -2
- package/dist/adapters/agents/codex-adapter.js.map +1 -1
- package/dist/adapters/agents/codex-authentication.d.ts +3 -0
- package/dist/adapters/agents/codex-authentication.js +47 -0
- package/dist/adapters/agents/codex-authentication.js.map +1 -0
- package/dist/adapters/agents/codex-events.js +28 -2
- package/dist/adapters/agents/codex-events.js.map +1 -1
- package/dist/adapters/agents/copilot-adapter.d.ts +3 -0
- package/dist/adapters/agents/copilot-adapter.js +45 -0
- package/dist/adapters/agents/copilot-adapter.js.map +1 -0
- package/dist/adapters/agents/copilot-authentication.d.ts +2 -0
- package/dist/adapters/agents/copilot-authentication.js +46 -0
- package/dist/adapters/agents/copilot-authentication.js.map +1 -0
- package/dist/adapters/agents/copilot-diagnostics.d.ts +1 -0
- package/dist/adapters/agents/copilot-diagnostics.js +6 -0
- package/dist/adapters/agents/copilot-diagnostics.js.map +1 -0
- package/dist/adapters/agents/copilot-events.d.ts +2 -0
- package/dist/adapters/agents/copilot-events.js +66 -0
- package/dist/adapters/agents/copilot-events.js.map +1 -0
- package/dist/adapters/agents/copilot-request.d.ts +5 -0
- package/dist/adapters/agents/copilot-request.js +24 -0
- package/dist/adapters/agents/copilot-request.js.map +1 -0
- package/dist/adapters/agents/copilot-usage.d.ts +3 -0
- package/dist/adapters/agents/copilot-usage.js +19 -0
- package/dist/adapters/agents/copilot-usage.js.map +1 -0
- package/dist/adapters/agents/copilot.types.d.ts +6 -0
- package/dist/adapters/agents/copilot.types.js +2 -0
- package/dist/adapters/agents/copilot.types.js.map +1 -0
- package/dist/adapters/agents/event-decoder.d.ts +2 -2
- package/dist/adapters/agents/event-decoder.js +6 -5
- package/dist/adapters/agents/event-decoder.js.map +1 -1
- package/dist/adapters/agents/kimi-adapter.d.ts +3 -0
- package/dist/adapters/agents/kimi-adapter.js +51 -0
- package/dist/adapters/agents/kimi-adapter.js.map +1 -0
- package/dist/adapters/agents/kimi-authentication.d.ts +3 -0
- package/dist/adapters/agents/kimi-authentication.js +63 -0
- package/dist/adapters/agents/kimi-authentication.js.map +1 -0
- package/dist/adapters/agents/kimi-diagnostics.d.ts +2 -0
- package/dist/adapters/agents/kimi-diagnostics.js +14 -0
- package/dist/adapters/agents/kimi-diagnostics.js.map +1 -0
- package/dist/adapters/agents/kimi-events.d.ts +2 -0
- package/dist/adapters/agents/kimi-events.js +55 -0
- package/dist/adapters/agents/kimi-events.js.map +1 -0
- package/dist/adapters/agents/kimi-fork.d.ts +2 -0
- package/dist/adapters/agents/kimi-fork.js +11 -0
- package/dist/adapters/agents/kimi-fork.js.map +1 -0
- package/dist/adapters/agents/{gemini-request.d.ts → kimi-request.d.ts} +2 -2
- package/dist/adapters/agents/kimi-request.js +33 -0
- package/dist/adapters/agents/kimi-request.js.map +1 -0
- package/dist/adapters/agents/kimi-usage.d.ts +2 -0
- package/dist/adapters/agents/kimi-usage.js +7 -0
- package/dist/adapters/agents/kimi-usage.js.map +1 -0
- package/dist/adapters/agents/kimi.constants.d.ts +13 -0
- package/dist/adapters/agents/kimi.constants.js +14 -0
- package/dist/adapters/agents/kimi.constants.js.map +1 -0
- package/dist/adapters/agents/kimi.types.d.ts +7 -0
- package/dist/adapters/agents/kimi.types.js +2 -0
- package/dist/adapters/agents/kimi.types.js.map +1 -0
- package/dist/adapters/agents/model-support.constants.d.ts +3 -1
- package/dist/adapters/agents/model-support.constants.js +12 -2
- package/dist/adapters/agents/model-support.constants.js.map +1 -1
- package/dist/adapters/agents/protocol-fixtures.constants.d.ts +2 -2
- package/dist/adapters/agents/protocol-fixtures.constants.js +131 -9
- package/dist/adapters/agents/protocol-fixtures.constants.js.map +1 -1
- package/dist/adapters/agents/protocol-fixtures.types.d.ts +1 -0
- package/dist/adapters/agents/protocol-fixtures.types.js.map +1 -1
- package/dist/adapters/agents/protocol.d.ts +1 -0
- package/dist/adapters/agents/protocol.js +9 -0
- package/dist/adapters/agents/protocol.js.map +1 -1
- package/dist/adapters/agents/session-usage.constants.d.ts +10 -0
- package/dist/adapters/agents/session-usage.constants.js +110 -0
- package/dist/adapters/agents/session-usage.constants.js.map +1 -0
- package/dist/adapters/agents/session-usage.d.ts +5 -0
- package/dist/adapters/agents/session-usage.js +45 -0
- package/dist/adapters/agents/session-usage.js.map +1 -0
- package/dist/adapters/agents/settings.types.d.ts +1 -0
- package/dist/adapters/agents/settings.types.js.map +1 -1
- package/dist/adapters/agents/tool-result.d.ts +2 -0
- package/dist/adapters/agents/tool-result.js +17 -0
- package/dist/adapters/agents/tool-result.js.map +1 -0
- package/dist/adapters/models/anthropic-response.js +3 -0
- package/dist/adapters/models/anthropic-response.js.map +1 -1
- package/dist/adapters/models/http-provider.js +6 -1
- package/dist/adapters/models/http-provider.js.map +1 -1
- package/dist/adapters/models/openai-responses.js +10 -0
- package/dist/adapters/models/openai-responses.js.map +1 -1
- package/dist/adapters/models/retry-after.d.ts +1 -0
- package/dist/adapters/models/retry-after.js +16 -0
- package/dist/adapters/models/retry-after.js.map +1 -0
- package/dist/application/activity-watchdog.js +1 -2
- package/dist/application/activity-watchdog.js.map +1 -1
- package/dist/application/agent-authentication.d.ts +4 -0
- package/dist/application/agent-authentication.js +32 -0
- package/dist/application/agent-authentication.js.map +1 -0
- package/dist/application/agent-bootstrap.constants.d.ts +2 -5
- package/dist/application/agent-bootstrap.constants.js +27 -4
- package/dist/application/agent-bootstrap.constants.js.map +1 -1
- package/dist/application/agent-bootstrap.js +39 -12
- package/dist/application/agent-bootstrap.js.map +1 -1
- package/dist/application/agent-bootstrap.types.d.ts +19 -0
- package/dist/application/agent-bootstrap.types.js +2 -0
- package/dist/application/agent-bootstrap.types.js.map +1 -0
- package/dist/application/agent-output.js +74 -8
- package/dist/application/agent-output.js.map +1 -1
- package/dist/application/agent-request.d.ts +3 -0
- package/dist/application/agent-request.js +11 -0
- package/dist/application/agent-request.js.map +1 -0
- package/dist/application/agent-turn.js +74 -6
- package/dist/application/agent-turn.js.map +1 -1
- package/dist/application/agent-usage.d.ts +6 -0
- package/dist/application/agent-usage.js +57 -0
- package/dist/application/agent-usage.js.map +1 -0
- package/dist/application/attach.js +2 -0
- package/dist/application/attach.js.map +1 -1
- package/dist/application/credential-installer.constants.d.ts +1 -0
- package/dist/application/credential-installer.constants.js +22 -0
- package/dist/application/credential-installer.constants.js.map +1 -0
- package/dist/application/custom-turn.js +44 -49
- package/dist/application/custom-turn.js.map +1 -1
- package/dist/application/dispatch-observation.d.ts +1 -1
- package/dist/application/dispatch-observation.js +141 -21
- package/dist/application/dispatch-observation.js.map +1 -1
- package/dist/application/dispatch-observation.types.d.ts +2 -0
- package/dist/application/dispatch-observation.types.js.map +1 -1
- package/dist/application/dispatch-validation.js +2 -0
- package/dist/application/dispatch-validation.js.map +1 -1
- package/dist/application/dispatch.js +1 -1
- package/dist/application/dispatch.js.map +1 -1
- package/dist/application/doctor-agent.constants.d.ts +2 -8
- package/dist/application/doctor-agent.constants.js +43 -6
- package/dist/application/doctor-agent.constants.js.map +1 -1
- package/dist/application/doctor-agent.d.ts +2 -1
- package/dist/application/doctor-agent.js +15 -3
- package/dist/application/doctor-agent.js.map +1 -1
- package/dist/application/doctor-image.js +4 -6
- package/dist/application/doctor-image.js.map +1 -1
- package/dist/application/doctor-protocol.js +6 -11
- package/dist/application/doctor-protocol.js.map +1 -1
- package/dist/application/doctor-protocol.types.d.ts +1 -1
- package/dist/application/doctor-protocol.types.js.map +1 -1
- package/dist/application/doctor-sandbox.js +2 -5
- package/dist/application/doctor-sandbox.js.map +1 -1
- package/dist/application/doctor.js +28 -10
- package/dist/application/doctor.js.map +1 -1
- package/dist/application/doctor.types.d.ts +10 -1
- package/dist/application/doctor.types.js.map +1 -1
- package/dist/application/execution.constants.d.ts +2 -0
- package/dist/application/execution.constants.js +2 -0
- package/dist/application/execution.constants.js.map +1 -1
- package/dist/application/execution.types.d.ts +8 -0
- package/dist/application/execution.types.js.map +1 -1
- package/dist/application/harness-budget.d.ts +3 -0
- package/dist/application/harness-budget.js +42 -0
- package/dist/application/harness-budget.js.map +1 -0
- package/dist/application/harness-budget.types.d.ts +5 -0
- package/dist/application/harness-budget.types.js +2 -0
- package/dist/application/harness-budget.types.js.map +1 -0
- package/dist/application/harness-hooks.js +34 -3
- package/dist/application/harness-hooks.js.map +1 -1
- package/dist/application/harness-loop.js +52 -24
- package/dist/application/harness-loop.js.map +1 -1
- package/dist/application/harness-model-provider.d.ts +3 -0
- package/dist/application/harness-model-provider.js +49 -0
- package/dist/application/harness-model-provider.js.map +1 -0
- package/dist/application/harness-model-provider.types.d.ts +10 -0
- package/dist/application/harness-model-provider.types.js +2 -0
- package/dist/application/harness-model-provider.types.js.map +1 -0
- package/dist/application/harness-subagent.d.ts +4 -0
- package/dist/application/harness-subagent.js +110 -0
- package/dist/application/harness-subagent.js.map +1 -0
- package/dist/application/harness.types.d.ts +11 -0
- package/dist/application/harness.types.js.map +1 -1
- package/dist/application/lifecycle-hooks.d.ts +1 -1
- package/dist/application/lifecycle-hooks.js +5 -4
- package/dist/application/lifecycle-hooks.js.map +1 -1
- package/dist/application/observed-lease.d.ts +3 -0
- package/dist/application/observed-lease.js +26 -0
- package/dist/application/observed-lease.js.map +1 -0
- package/dist/application/outpost.types.d.ts +3 -1
- package/dist/application/outpost.types.js.map +1 -1
- package/dist/application/output-lines.d.ts +4 -0
- package/dist/application/output-lines.js +28 -0
- package/dist/application/output-lines.js.map +1 -0
- package/dist/application/queue-worker.js +1 -1
- package/dist/application/queue-worker.js.map +1 -1
- package/dist/application/queue-worker.types.d.ts +1 -0
- package/dist/application/queue-worker.types.js.map +1 -1
- package/dist/application/queued-task.js +24 -5
- package/dist/application/queued-task.js.map +1 -1
- package/dist/application/recovery-archive.d.ts +3 -2
- package/dist/application/recovery-archive.js +9 -2
- package/dist/application/recovery-archive.js.map +1 -1
- package/dist/application/recovery-restore.d.ts +3 -2
- package/dist/application/recovery-restore.js +9 -2
- package/dist/application/recovery-restore.js.map +1 -1
- package/dist/application/recovery-retention.d.ts +3 -2
- package/dist/application/recovery-retention.js +74 -26
- package/dist/application/recovery-retention.js.map +1 -1
- package/dist/application/remote-workspace.js +5 -4
- package/dist/application/remote-workspace.js.map +1 -1
- package/dist/application/remote-workspace.types.d.ts +1 -0
- package/dist/application/remote-workspace.types.js.map +1 -1
- package/dist/application/sandbox-agents.js +19 -19
- package/dist/application/sandbox-agents.js.map +1 -1
- package/dist/application/sandbox-attach.js +12 -3
- package/dist/application/sandbox-attach.js.map +1 -1
- package/dist/application/sandbox-dispatch.js +13 -27
- package/dist/application/sandbox-dispatch.js.map +1 -1
- package/dist/application/sandbox-provision.js +15 -9
- package/dist/application/sandbox-provision.js.map +1 -1
- package/dist/application/sandbox-session.types.d.ts +7 -2
- package/dist/application/sandbox-session.types.js.map +1 -1
- package/dist/application/sandbox.js +13 -6
- package/dist/application/sandbox.js.map +1 -1
- package/dist/application/speculation-checkpoint.d.ts +6 -0
- package/dist/application/speculation-checkpoint.js +206 -0
- package/dist/application/speculation-checkpoint.js.map +1 -0
- package/dist/application/speculation-checkpoint.types.d.ts +24 -0
- package/dist/application/speculation-checkpoint.types.js +2 -0
- package/dist/application/speculation-checkpoint.types.js.map +1 -0
- package/dist/application/speculation-integration.constants.d.ts +4 -0
- package/dist/application/speculation-integration.constants.js +5 -0
- package/dist/application/speculation-integration.constants.js.map +1 -0
- package/dist/application/speculation-integration.d.ts +2 -0
- package/dist/application/speculation-integration.js +67 -0
- package/dist/application/speculation-integration.js.map +1 -0
- package/dist/application/speculation-resume.d.ts +4 -0
- package/dist/application/speculation-resume.js +71 -0
- package/dist/application/speculation-resume.js.map +1 -0
- package/dist/application/speculation-run.d.ts +4 -0
- package/dist/application/speculation-run.js +320 -0
- package/dist/application/speculation-run.js.map +1 -0
- package/dist/application/speculation-timeout.d.ts +1 -0
- package/dist/application/speculation-timeout.js +15 -0
- package/dist/application/speculation-timeout.js.map +1 -0
- package/dist/application/speculation.constants.d.ts +1 -0
- package/dist/application/speculation.constants.js +5 -1
- package/dist/application/speculation.constants.js.map +1 -1
- package/dist/application/speculation.js +41 -149
- package/dist/application/speculation.js.map +1 -1
- package/dist/application/speculation.types.d.ts +23 -0
- package/dist/application/speculation.types.js.map +1 -1
- package/dist/application/startup-recovery.js +14 -1
- package/dist/application/startup-recovery.js.map +1 -1
- package/dist/application/startup-recovery.types.d.ts +1 -0
- package/dist/application/startup-recovery.types.js.map +1 -1
- package/dist/application/stop-reason.d.ts +2 -0
- package/dist/application/stop-reason.js +21 -0
- package/dist/application/stop-reason.js.map +1 -0
- package/dist/application/stop-reason.types.d.ts +4 -0
- package/dist/application/stop-reason.types.js +2 -0
- package/dist/application/stop-reason.types.js.map +1 -0
- package/dist/application/storage-reservation.js +9 -2
- package/dist/application/storage-reservation.js.map +1 -1
- package/dist/application/task-observation.d.ts +3 -0
- package/dist/application/task-observation.js +22 -0
- package/dist/application/task-observation.js.map +1 -0
- package/dist/application/task-usage.js +5 -12
- package/dist/application/task-usage.js.map +1 -1
- package/dist/application/tasks.js +41 -16
- package/dist/application/tasks.js.map +1 -1
- package/dist/application/tool-execution.js +42 -19
- package/dist/application/tool-execution.js.map +1 -1
- package/dist/application/workspace.js +6 -4
- package/dist/application/workspace.js.map +1 -1
- package/dist/cli/doctor-command.js +6 -2
- package/dist/cli/doctor-command.js.map +1 -1
- package/dist/cli/init-authentication.d.ts +4 -1
- package/dist/cli/init-authentication.js +28 -33
- package/dist/cli/init-authentication.js.map +1 -1
- package/dist/cli/init-command.js +3 -3
- package/dist/cli/init-command.js.map +1 -1
- package/dist/cli/main.constants.d.ts +50 -13
- package/dist/cli/main.constants.js +70 -8
- package/dist/cli/main.constants.js.map +1 -1
- package/dist/cli/main.js +2 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/scaffold-files.js +1 -1
- package/dist/cli/scaffold-files.js.map +1 -1
- package/dist/cli/scaffold-validation.js +29 -22
- package/dist/cli/scaffold-validation.js.map +1 -1
- package/dist/cli/scaffold.constants.d.ts +0 -1
- package/dist/cli/scaffold.constants.js +6 -2
- package/dist/cli/scaffold.constants.js.map +1 -1
- package/dist/cli/scaffold.types.d.ts +8 -2
- package/dist/cli/scaffold.types.js.map +1 -1
- package/dist/cli/starters.js +1 -3
- package/dist/cli/starters.js.map +1 -1
- package/dist/domain/agent-observation.d.ts +4 -0
- package/dist/domain/agent-observation.js +27 -0
- package/dist/domain/agent-observation.js.map +1 -0
- package/dist/domain/agent.types.d.ts +122 -14
- package/dist/domain/agent.types.js.map +1 -1
- package/dist/domain/authentication.constants.d.ts +3 -0
- package/dist/domain/authentication.constants.js +11 -0
- package/dist/domain/authentication.constants.js.map +1 -0
- package/dist/domain/authentication.d.ts +3 -0
- package/dist/domain/authentication.js +22 -0
- package/dist/domain/authentication.js.map +1 -0
- package/dist/domain/authentication.types.d.ts +5 -0
- package/dist/domain/authentication.types.js +2 -0
- package/dist/domain/authentication.types.js.map +1 -0
- package/dist/domain/harness.d.ts +2 -2
- package/dist/domain/harness.js +6 -0
- package/dist/domain/harness.js.map +1 -1
- package/dist/domain/harness.types.d.ts +4 -3
- package/dist/domain/harness.types.js.map +1 -1
- package/dist/domain/model.types.d.ts +8 -0
- package/dist/domain/model.types.js.map +1 -1
- package/dist/domain/observation.constants.d.ts +8 -0
- package/dist/domain/observation.constants.js +9 -0
- package/dist/domain/observation.constants.js.map +1 -0
- package/dist/domain/observation.d.ts +2 -0
- package/dist/domain/observation.js +190 -0
- package/dist/domain/observation.js.map +1 -0
- package/dist/domain/observation.types.d.ts +84 -0
- package/dist/domain/observation.types.js +2 -0
- package/dist/domain/observation.types.js.map +1 -0
- package/dist/domain/observed-operation.d.ts +2 -0
- package/dist/domain/observed-operation.js +30 -0
- package/dist/domain/observed-operation.js.map +1 -0
- package/dist/domain/sandbox.types.d.ts +2 -0
- package/dist/domain/sandbox.types.js.map +1 -1
- package/dist/domain/subagent.constants.d.ts +13 -0
- package/dist/domain/subagent.constants.js +9 -0
- package/dist/domain/subagent.constants.js.map +1 -0
- package/dist/domain/subagent.d.ts +4 -0
- package/dist/domain/subagent.js +28 -0
- package/dist/domain/subagent.js.map +1 -0
- package/dist/domain/subagent.types.d.ts +13 -0
- package/dist/domain/subagent.types.js +2 -0
- package/dist/domain/subagent.types.js.map +1 -0
- package/dist/domain/transcript.types.d.ts +2 -0
- package/dist/domain/transcript.types.js.map +1 -1
- package/dist/domain/usage.d.ts +1 -0
- package/dist/domain/usage.js +16 -0
- package/dist/domain/usage.js.map +1 -1
- package/dist/domain/workflow/budget.d.ts +7 -3
- package/dist/domain/workflow/budget.js +26 -0
- package/dist/domain/workflow/budget.js.map +1 -1
- package/dist/domain/workflow/budget.types.d.ts +1 -1
- package/dist/domain/workflow/budget.types.js.map +1 -1
- package/dist/domain/workflow/checkpoint-validation.js +7 -1
- package/dist/domain/workflow/checkpoint-validation.js.map +1 -1
- package/dist/domain/workflow/checkpoint.js +3 -0
- package/dist/domain/workflow/checkpoint.js.map +1 -1
- package/dist/domain/workflow/gate-validation.js +14 -1
- package/dist/domain/workflow/gate-validation.js.map +1 -1
- package/dist/domain/workflow/gates.d.ts +1 -1
- package/dist/domain/workflow/gates.js +52 -4
- package/dist/domain/workflow/gates.js.map +1 -1
- package/dist/domain/workflow/gates.types.d.ts +15 -1
- package/dist/domain/workflow/gates.types.js.map +1 -1
- package/dist/domain/workflow/idempotency.d.ts +1 -0
- package/dist/domain/workflow/idempotency.js +7 -0
- package/dist/domain/workflow/idempotency.js.map +1 -0
- package/dist/domain/workflow/retry.constants.d.ts +2 -0
- package/dist/domain/workflow/retry.constants.js +3 -0
- package/dist/domain/workflow/retry.constants.js.map +1 -0
- package/dist/domain/workflow/retry.d.ts +4 -0
- package/dist/domain/workflow/retry.js +49 -0
- package/dist/domain/workflow/retry.js.map +1 -0
- package/dist/domain/workflow/task-runner.js +9 -5
- package/dist/domain/workflow/task-runner.js.map +1 -1
- package/dist/domain/workflow/task.js +6 -6
- package/dist/domain/workflow/task.js.map +1 -1
- package/dist/domain/workflow/workflow-scheduler.js +110 -72
- package/dist/domain/workflow/workflow-scheduler.js.map +1 -1
- package/dist/domain/workflow/workflow-state.js +28 -12
- package/dist/domain/workflow/workflow-state.js.map +1 -1
- package/dist/domain/workflow.d.ts +1 -1
- package/dist/domain/workflow.js +1 -1
- package/dist/domain/workflow.js.map +1 -1
- package/dist/domain/workflow.types.d.ts +13 -2
- package/dist/domain/workflow.types.js.map +1 -1
- package/dist/index.d.ts +16 -11
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/conversations/capture.js +10 -0
- package/dist/infrastructure/conversations/capture.js.map +1 -1
- package/dist/infrastructure/conversations/harness-transcript.js +6 -0
- package/dist/infrastructure/conversations/harness-transcript.js.map +1 -1
- package/dist/infrastructure/conversations/harness-transcript.types.d.ts +2 -0
- package/dist/infrastructure/conversations/harness-transcript.types.js.map +1 -1
- package/dist/infrastructure/conversations/layout.js +2 -0
- package/dist/infrastructure/conversations/layout.js.map +1 -1
- package/dist/infrastructure/conversations/locate.js +7 -1
- package/dist/infrastructure/conversations/locate.js.map +1 -1
- package/dist/infrastructure/conversations/native-store.js +8 -1
- package/dist/infrastructure/conversations/native-store.js.map +1 -1
- package/dist/infrastructure/conversations/paths.js +3 -0
- package/dist/infrastructure/conversations/paths.js.map +1 -1
- package/dist/infrastructure/conversations/restore.js +7 -0
- package/dist/infrastructure/conversations/restore.js.map +1 -1
- package/dist/infrastructure/conversations/session-bundle.constants.d.ts +5 -0
- package/dist/infrastructure/conversations/session-bundle.constants.js +173 -0
- package/dist/infrastructure/conversations/session-bundle.constants.js.map +1 -0
- package/dist/infrastructure/conversations/session-bundle.d.ts +6 -0
- package/dist/infrastructure/conversations/session-bundle.js +98 -0
- package/dist/infrastructure/conversations/session-bundle.js.map +1 -0
- package/dist/infrastructure/conversations/session-bundle.types.d.ts +1 -0
- package/dist/infrastructure/conversations/session-bundle.types.js +2 -0
- package/dist/infrastructure/conversations/session-bundle.types.js.map +1 -0
- package/dist/infrastructure/conversations.js +4 -2
- package/dist/infrastructure/conversations.js.map +1 -1
- package/dist/infrastructure/conversations.types.d.ts +1 -1
- package/dist/infrastructure/conversations.types.js.map +1 -1
- package/dist/infrastructure/custom-reporter.js +32 -24
- package/dist/infrastructure/custom-reporter.js.map +1 -1
- package/dist/infrastructure/custom-reporter.types.d.ts +2 -0
- package/dist/infrastructure/custom-reporter.types.js.map +1 -1
- package/dist/infrastructure/git/git.constants.d.ts +1 -1
- package/dist/infrastructure/git/git.constants.js +1 -0
- package/dist/infrastructure/git/git.constants.js.map +1 -1
- package/dist/infrastructure/git/workspace-lease.js +4 -3
- package/dist/infrastructure/git/workspace-lease.js.map +1 -1
- package/dist/infrastructure/git/workspace.js +7 -6
- package/dist/infrastructure/git/workspace.js.map +1 -1
- package/dist/infrastructure/git/workspace.types.d.ts +1 -0
- package/dist/infrastructure/git/workspace.types.js.map +1 -1
- package/dist/infrastructure/host-credentials.constants.d.ts +1 -0
- package/dist/infrastructure/host-credentials.constants.js +2 -0
- package/dist/infrastructure/host-credentials.constants.js.map +1 -0
- package/dist/infrastructure/host-credentials.d.ts +4 -0
- package/dist/infrastructure/host-credentials.js +89 -0
- package/dist/infrastructure/host-credentials.js.map +1 -0
- package/dist/infrastructure/inspection-path.js +4 -3
- package/dist/infrastructure/inspection-path.js.map +1 -1
- package/dist/infrastructure/journal.constants.js +10 -1
- package/dist/infrastructure/journal.constants.js.map +1 -1
- package/dist/infrastructure/journal.d.ts +1 -1
- package/dist/infrastructure/journal.js +8 -75
- package/dist/infrastructure/journal.js.map +1 -1
- package/dist/infrastructure/journal.types.d.ts +2 -4
- package/dist/infrastructure/journal.types.js.map +1 -1
- package/dist/infrastructure/local-transport.js +9 -4
- package/dist/infrastructure/local-transport.js.map +1 -1
- package/dist/infrastructure/opentelemetry-dispatch.d.ts +3 -3
- package/dist/infrastructure/opentelemetry-dispatch.js +5 -4
- package/dist/infrastructure/opentelemetry-dispatch.js.map +1 -1
- package/dist/infrastructure/opentelemetry-observation.d.ts +5 -0
- package/dist/infrastructure/opentelemetry-observation.js +59 -0
- package/dist/infrastructure/opentelemetry-observation.js.map +1 -0
- package/dist/infrastructure/opentelemetry.js +15 -1
- package/dist/infrastructure/opentelemetry.js.map +1 -1
- package/dist/infrastructure/opentelemetry.types.d.ts +9 -1
- package/dist/infrastructure/opentelemetry.types.js.map +1 -1
- package/dist/infrastructure/reporter.d.ts +2 -2
- package/dist/infrastructure/reporter.js +5 -1
- package/dist/infrastructure/reporter.js.map +1 -1
- package/dist/infrastructure/repository-transport.constants.d.ts +1 -0
- package/dist/infrastructure/repository-transport.constants.js +2 -0
- package/dist/infrastructure/repository-transport.constants.js.map +1 -0
- package/dist/infrastructure/repository-transport.d.ts +2 -0
- package/dist/infrastructure/repository-transport.js +9 -0
- package/dist/infrastructure/repository-transport.js.map +1 -0
- package/dist/infrastructure/resource-activity-inspection.js +19 -24
- package/dist/infrastructure/resource-activity-inspection.js.map +1 -1
- package/dist/infrastructure/resource-activity.constants.d.ts +0 -1
- package/dist/infrastructure/resource-activity.constants.js +0 -1
- package/dist/infrastructure/resource-activity.constants.js.map +1 -1
- package/dist/infrastructure/resource-activity.js +20 -83
- package/dist/infrastructure/resource-activity.js.map +1 -1
- package/dist/infrastructure/s3-transport.constants.d.ts +2 -0
- package/dist/infrastructure/s3-transport.constants.js +3 -0
- package/dist/infrastructure/s3-transport.constants.js.map +1 -0
- package/dist/infrastructure/s3-transport.js +57 -3
- package/dist/infrastructure/s3-transport.js.map +1 -1
- package/dist/infrastructure/s3-transport.types.d.ts +1 -0
- package/dist/infrastructure/s3-transport.types.js.map +1 -1
- package/dist/infrastructure/speculation-store.constants.d.ts +3 -0
- package/dist/infrastructure/speculation-store.constants.js +2 -0
- package/dist/infrastructure/speculation-store.constants.js.map +1 -0
- package/dist/infrastructure/speculation-store.d.ts +4 -0
- package/dist/infrastructure/speculation-store.js +73 -0
- package/dist/infrastructure/speculation-store.js.map +1 -0
- package/dist/infrastructure/speculation-store.types.d.ts +12 -0
- package/dist/infrastructure/speculation-store.types.js +2 -0
- package/dist/infrastructure/speculation-store.types.js.map +1 -0
- package/dist/infrastructure/storage-inventory.constants.js +1 -0
- package/dist/infrastructure/storage-inventory.constants.js.map +1 -1
- package/dist/infrastructure/storage-inventory.types.d.ts +1 -1
- package/dist/infrastructure/storage-inventory.types.js.map +1 -1
- package/dist/infrastructure/storage-reservations.types.d.ts +0 -8
- package/dist/infrastructure/storage-reservations.types.js.map +1 -1
- package/dist/infrastructure/task-queue-bullmq-resources.js +3 -0
- package/dist/infrastructure/task-queue-bullmq-resources.js.map +1 -1
- package/dist/infrastructure/task-queue-http.js +29 -4
- package/dist/infrastructure/task-queue-http.js.map +1 -1
- package/dist/infrastructure/task-queue-http.types.d.ts +2 -2
- package/dist/infrastructure/task-queue-http.types.js.map +1 -1
- package/dist/infrastructure/transport-conversations.js +2 -0
- package/dist/infrastructure/transport-conversations.js.map +1 -1
- package/dist/infrastructure/transport-journal.d.ts +1 -1
- package/dist/infrastructure/transport-journal.js +8 -2
- package/dist/infrastructure/transport-journal.js.map +1 -1
- package/dist/infrastructure/transport-reservations.d.ts +1 -1
- package/dist/infrastructure/transport-reservations.js +14 -8
- package/dist/infrastructure/transport-reservations.js.map +1 -1
- package/dist/infrastructure/workflow-decision-signature.constants.d.ts +4 -0
- package/dist/infrastructure/workflow-decision-signature.constants.js +5 -0
- package/dist/infrastructure/workflow-decision-signature.constants.js.map +1 -0
- package/dist/infrastructure/workflow-decision-signature.d.ts +4 -0
- package/dist/infrastructure/workflow-decision-signature.js +83 -0
- package/dist/infrastructure/workflow-decision-signature.js.map +1 -0
- package/dist/infrastructure/workflow-decision-signature.types.d.ts +16 -0
- package/dist/infrastructure/workflow-decision-signature.types.js +2 -0
- package/dist/infrastructure/workflow-decision-signature.types.js.map +1 -0
- package/dist/providers/agents.d.ts +7 -2
- package/dist/providers/agents.js +4 -1
- package/dist/providers/agents.js.map +1 -1
- package/dist/providers/antigravity-install.constants.d.ts +2 -0
- package/dist/providers/antigravity-install.constants.js +28 -0
- package/dist/providers/antigravity-install.constants.js.map +1 -0
- package/dist/providers/antigravity-install.d.ts +2 -0
- package/dist/providers/antigravity-install.js +29 -0
- package/dist/providers/antigravity-install.js.map +1 -0
- package/dist/providers/antigravity-install.types.d.ts +4 -0
- package/dist/providers/antigravity-install.types.js +2 -0
- package/dist/providers/antigravity-install.types.js.map +1 -0
- package/dist/providers/container-recovery.d.ts +4 -0
- package/dist/providers/container-recovery.js +28 -0
- package/dist/providers/container-recovery.js.map +1 -0
- package/dist/providers/container.js +8 -0
- package/dist/providers/container.js.map +1 -1
- package/dist/providers/daytona-network.constants.d.ts +5 -0
- package/dist/providers/daytona-network.constants.js +8 -0
- package/dist/providers/daytona-network.constants.js.map +1 -0
- package/dist/providers/daytona-network.d.ts +4 -0
- package/dist/providers/daytona-network.js +33 -0
- package/dist/providers/daytona-network.js.map +1 -0
- package/dist/providers/daytona.d.ts +1 -0
- package/dist/providers/daytona.js +9 -3
- package/dist/providers/daytona.js.map +1 -1
- package/dist/providers/daytona.types.d.ts +2 -0
- package/dist/providers/daytona.types.js.map +1 -1
- package/dist/providers/firecracker-command.js +1 -1
- package/dist/providers/firecracker-command.js.map +1 -1
- package/dist/providers/firecracker-jailer.constants.d.ts +9 -0
- package/dist/providers/firecracker-jailer.constants.js +10 -0
- package/dist/providers/firecracker-jailer.constants.js.map +1 -0
- package/dist/providers/firecracker-jailer.d.ts +4 -0
- package/dist/providers/firecracker-jailer.js +171 -0
- package/dist/providers/firecracker-jailer.js.map +1 -0
- package/dist/providers/firecracker-machine.js +30 -8
- package/dist/providers/firecracker-machine.js.map +1 -1
- package/dist/providers/firecracker.types.d.ts +16 -0
- package/dist/providers/firecracker.types.js.map +1 -1
- package/dist/providers/vercel-network.js +1 -1
- package/dist/providers/vercel-network.js.map +1 -1
- package/dist/providers/vercel.js +6 -3
- package/dist/providers/vercel.js.map +1 -1
- package/dist/providers/versions.constants.d.ts +3 -1
- package/dist/providers/versions.constants.js +3 -1
- package/dist/providers/versions.constants.js.map +1 -1
- package/package.json +3 -3
- package/dist/adapters/agents/gemini-adapter.d.ts +0 -3
- package/dist/adapters/agents/gemini-adapter.js +0 -34
- package/dist/adapters/agents/gemini-adapter.js.map +0 -1
- package/dist/adapters/agents/gemini-diagnostics.d.ts +0 -2
- package/dist/adapters/agents/gemini-diagnostics.js +0 -15
- package/dist/adapters/agents/gemini-diagnostics.js.map +0 -1
- package/dist/adapters/agents/gemini-events.d.ts +0 -2
- package/dist/adapters/agents/gemini-events.js +0 -50
- package/dist/adapters/agents/gemini-events.js.map +0 -1
- package/dist/adapters/agents/gemini-request.js +0 -23
- package/dist/adapters/agents/gemini-request.js.map +0 -1
- package/dist/adapters/agents/gemini.types.js +0 -2
- package/dist/adapters/agents/gemini.types.js.map +0 -1
- package/dist/infrastructure/artifact-store.d.ts +0 -3
- package/dist/infrastructure/artifact-store.js +0 -110
- package/dist/infrastructure/artifact-store.js.map +0 -1
- package/dist/infrastructure/artifact-store.types.d.ts +0 -6
- package/dist/infrastructure/artifact-store.types.js +0 -2
- package/dist/infrastructure/artifact-store.types.js.map +0 -1
- package/dist/infrastructure/journal-retention.constants.d.ts +0 -4
- package/dist/infrastructure/journal-retention.constants.js +0 -5
- package/dist/infrastructure/journal-retention.constants.js.map +0 -1
- package/dist/infrastructure/journal-retention.d.ts +0 -2
- package/dist/infrastructure/journal-retention.js +0 -51
- package/dist/infrastructure/journal-retention.js.map +0 -1
- package/dist/infrastructure/storage-mutation-lock.constants.d.ts +0 -5
- package/dist/infrastructure/storage-mutation-lock.constants.js +0 -6
- package/dist/infrastructure/storage-mutation-lock.constants.js.map +0 -1
- package/dist/infrastructure/storage-mutation-lock.d.ts +0 -1
- package/dist/infrastructure/storage-mutation-lock.js +0 -21
- package/dist/infrastructure/storage-mutation-lock.js.map +0 -1
- package/dist/infrastructure/storage-reservations.constants.d.ts +0 -4
- package/dist/infrastructure/storage-reservations.constants.js +0 -5
- package/dist/infrastructure/storage-reservations.constants.js.map +0 -1
- package/dist/infrastructure/storage-reservations.d.ts +0 -2
- package/dist/infrastructure/storage-reservations.js +0 -150
- package/dist/infrastructure/storage-reservations.js.map +0 -1
- package/dist/infrastructure/workflow-checkpoint.d.ts +0 -3
- package/dist/infrastructure/workflow-checkpoint.js +0 -84
- package/dist/infrastructure/workflow-checkpoint.js.map +0 -1
- package/dist/infrastructure/workflow-checkpoint.types.d.ts +0 -6
- package/dist/infrastructure/workflow-checkpoint.types.js +0 -2
- package/dist/infrastructure/workflow-checkpoint.types.js.map +0 -1
|
@@ -1,10 +1,47 @@
|
|
|
1
|
+
import { antigravityVariables } from "../adapters/agents/antigravity.constants.js";
|
|
2
|
+
import { antigravityHarness } from "../adapters/agents/antigravity-adapter.js";
|
|
3
|
+
import { antigravityDiagnostics } from "../adapters/agents/antigravity-diagnostics.js";
|
|
4
|
+
import { claudeHarness } from "../adapters/agents/claude-adapter.js";
|
|
1
5
|
import { claudeDiagnostics } from "../adapters/agents/claude-diagnostics.js";
|
|
6
|
+
import { codexHarness } from "../adapters/agents/codex-adapter.js";
|
|
2
7
|
import { codexDiagnostics } from "../adapters/agents/codex-diagnostics.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import { copilotHarness } from "../adapters/agents/copilot-adapter.js";
|
|
9
|
+
import { copilotDiagnostics } from "../adapters/agents/copilot-diagnostics.js";
|
|
10
|
+
import { kimiHarness } from "../adapters/agents/kimi-adapter.js";
|
|
11
|
+
import { kimiDiagnostics } from "../adapters/agents/kimi-diagnostics.js";
|
|
12
|
+
import { agentVersions } from "../providers/versions.constants.js";
|
|
13
|
+
export const doctorAgents = Object.freeze({
|
|
14
|
+
codex: {
|
|
15
|
+
executable: "codex",
|
|
16
|
+
referenceVersion: agentVersions.codex,
|
|
17
|
+
diagnostics: codexDiagnostics,
|
|
18
|
+
harness: () => codexHarness(),
|
|
19
|
+
},
|
|
20
|
+
claude: {
|
|
21
|
+
executable: "claude",
|
|
22
|
+
referenceVersion: agentVersions.claude,
|
|
23
|
+
diagnostics: claudeDiagnostics,
|
|
24
|
+
harness: () => claudeHarness(),
|
|
25
|
+
},
|
|
26
|
+
antigravity: {
|
|
27
|
+
executable: "agy",
|
|
28
|
+
referenceVersion: agentVersions.antigravity,
|
|
29
|
+
variables: antigravityVariables,
|
|
30
|
+
diagnostics: antigravityDiagnostics,
|
|
31
|
+
harness: () => antigravityHarness(),
|
|
32
|
+
},
|
|
33
|
+
copilot: {
|
|
34
|
+
executable: "copilot",
|
|
35
|
+
referenceVersion: agentVersions.copilot,
|
|
36
|
+
diagnostics: copilotDiagnostics,
|
|
37
|
+
harness: () => copilotHarness(),
|
|
38
|
+
},
|
|
39
|
+
kimi: {
|
|
40
|
+
executable: "kimi",
|
|
41
|
+
referenceVersion: agentVersions.kimi,
|
|
42
|
+
diagnostics: kimiDiagnostics,
|
|
43
|
+
harness: () => kimiHarness(),
|
|
44
|
+
},
|
|
45
|
+
});
|
|
9
46
|
export const agentDiagnosticDefaults = Object.freeze({ retain: 65_536 });
|
|
10
47
|
//# sourceMappingURL=doctor-agent.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-agent.constants.js","sourceRoot":"","sources":["../../src/application/doctor-agent.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"doctor-agent.constants.js","sourceRoot":"","sources":["../../src/application/doctor-agent.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,MAAM,CAAC,MAAM,YAAY,GACvB,MAAM,CAAC,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,UAAU,EAAE,OAAO;QACnB,gBAAgB,EAAE,aAAa,CAAC,KAAK;QACrC,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;KAC9B;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,aAAa,CAAC,MAAM;QACtC,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE;KAC/B;IACD,WAAW,EAAE;QACX,UAAU,EAAE,KAAK;QACjB,gBAAgB,EAAE,aAAa,CAAC,WAAW;QAC3C,SAAS,EAAE,oBAAoB;QAC/B,WAAW,EAAE,sBAAsB;QACnC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,EAAE;KACpC;IACD,OAAO,EAAE;QACP,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,aAAa,CAAC,OAAO;QACvC,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE;KAChC;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM;QAClB,gBAAgB,EAAE,aAAa,CAAC,IAAI;QACpC,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE;KAC7B;CACF,CAAC,CAAC;AACL,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC","sourcesContent":["import { antigravityVariables } from \"../adapters/agents/antigravity.constants.ts\";\nimport { antigravityHarness } from \"../adapters/agents/antigravity-adapter.ts\";\nimport { antigravityDiagnostics } from \"../adapters/agents/antigravity-diagnostics.ts\";\nimport { claudeHarness } from \"../adapters/agents/claude-adapter.ts\";\nimport { claudeDiagnostics } from \"../adapters/agents/claude-diagnostics.ts\";\nimport { codexHarness } from \"../adapters/agents/codex-adapter.ts\";\nimport { codexDiagnostics } from \"../adapters/agents/codex-diagnostics.ts\";\nimport { copilotHarness } from \"../adapters/agents/copilot-adapter.ts\";\nimport { copilotDiagnostics } from \"../adapters/agents/copilot-diagnostics.ts\";\nimport { kimiHarness } from \"../adapters/agents/kimi-adapter.ts\";\nimport { kimiDiagnostics } from \"../adapters/agents/kimi-diagnostics.ts\";\nimport { agentVersions } from \"../providers/versions.constants.ts\";\nimport type { DoctorAgent, DoctorAgentProfile } from \"./doctor.types.ts\";\n\nexport const doctorAgents: Readonly<Record<DoctorAgent, DoctorAgentProfile>> =\n Object.freeze({\n codex: {\n executable: \"codex\",\n referenceVersion: agentVersions.codex,\n diagnostics: codexDiagnostics,\n harness: () => codexHarness(),\n },\n claude: {\n executable: \"claude\",\n referenceVersion: agentVersions.claude,\n diagnostics: claudeDiagnostics,\n harness: () => claudeHarness(),\n },\n antigravity: {\n executable: \"agy\",\n referenceVersion: agentVersions.antigravity,\n variables: antigravityVariables,\n diagnostics: antigravityDiagnostics,\n harness: () => antigravityHarness(),\n },\n copilot: {\n executable: \"copilot\",\n referenceVersion: agentVersions.copilot,\n diagnostics: copilotDiagnostics,\n harness: () => copilotHarness(),\n },\n kimi: {\n executable: \"kimi\",\n referenceVersion: agentVersions.kimi,\n diagnostics: kimiDiagnostics,\n harness: () => kimiHarness(),\n },\n });\nexport const agentDiagnosticDefaults = Object.freeze({ retain: 65_536 });\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Executor } from "../infrastructure/process.types.ts";
|
|
2
|
-
import type { DiagnosticCheck, DoctorAgent } from "./doctor.types.ts";
|
|
2
|
+
import type { DiagnosticCheck, DiagnosticProbe, DoctorAgent } from "./doctor.types.ts";
|
|
3
|
+
export declare function agentVersionProbe(agent: DoctorAgent): Pick<DiagnosticProbe, "command" | "readVersion" | "referenceVersion">;
|
|
3
4
|
export declare function diagnoseAgentCli(agent: DoctorAgent, execute: Executor): Promise<readonly DiagnosticCheck[]>;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from "node:util";
|
|
2
2
|
import { diagnosticProbe } from "./diagnostic-probe.js";
|
|
3
|
-
import { agentDiagnosticDefaults,
|
|
3
|
+
import { agentDiagnosticDefaults, doctorAgents, } from "./doctor-agent.constants.js";
|
|
4
|
+
export function agentVersionProbe(agent) {
|
|
5
|
+
const { executable, referenceVersion, variables } = doctorAgents[agent];
|
|
6
|
+
return {
|
|
7
|
+
command: {
|
|
8
|
+
executable,
|
|
9
|
+
arguments: ["--version"],
|
|
10
|
+
...(variables ? { variables } : {}),
|
|
11
|
+
},
|
|
12
|
+
readVersion: true,
|
|
13
|
+
...(referenceVersion === undefined ? {} : { referenceVersion }),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
4
16
|
export async function diagnoseAgentCli(agent, execute) {
|
|
5
17
|
const checks = [];
|
|
6
|
-
for (const plan of
|
|
18
|
+
for (const plan of doctorAgents[agent].diagnostics()) {
|
|
7
19
|
let help = "";
|
|
8
20
|
const check = await diagnosticProbe({
|
|
9
21
|
id: `agent.cli.${plan.mode}`,
|
|
@@ -21,7 +33,7 @@ export async function diagnoseAgentCli(agent, execute) {
|
|
|
21
33
|
}
|
|
22
34
|
const usage = help
|
|
23
35
|
.split(/\r?\n/)
|
|
24
|
-
.some((line) => line.trim().startsWith(
|
|
36
|
+
.some((line) => line.trim().startsWith(plan.usage));
|
|
25
37
|
if (!usage) {
|
|
26
38
|
checks.push({
|
|
27
39
|
id: check.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-agent.js","sourceRoot":"","sources":["../../src/application/doctor-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"doctor-agent.js","sourceRoot":"","sources":["../../src/application/doctor-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,YAAY,GACb,MAAM,6BAA6B,CAAC;AAOrC,MAAM,UAAU,iBAAiB,CAC/B,KAAkB;IAElB,MAAM,E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ACD,MAAM,KAAK,GAAG,IAAI;aACf,KAAK,CAAC,OAAO,CAAC;aACd,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,MAAM,EAAE,MAAM;gBACd,OAAO,EACL,uGAAuG;aAC1G,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,MAAM,QAAQ,GAAG,IAAI,GAAG,CACtB;YACE,GAAG,IAAI,CAAC,QAAQ,CAAC,mDAAmD,CAAC;SACtE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC3B,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACvE,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,2CAA2C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,yEAAyE;aAChJ,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,MAAM,EAAE,MAAM;YACd,OAAO,EACL,sJAAsJ;SACzJ,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { stripVTControlCharacters } from \"node:util\";\nimport type { Executor } from \"../infrastructure/process.types.ts\";\nimport { diagnosticProbe } from \"./diagnostic-probe.ts\";\nimport {\n agentDiagnosticDefaults,\n doctorAgents,\n} from \"./doctor-agent.constants.ts\";\nimport type {\n DiagnosticCheck,\n DiagnosticProbe,\n DoctorAgent,\n} from \"./doctor.types.ts\";\n\nexport function agentVersionProbe(\n agent: DoctorAgent,\n): Pick<DiagnosticProbe, \"command\" | \"readVersion\" | \"referenceVersion\"> {\n const { executable, referenceVersion, variables } = doctorAgents[agent];\n return {\n command: {\n executable,\n arguments: [\"--version\"],\n ...(variables ? { variables } : {}),\n },\n readVersion: true,\n ...(referenceVersion === undefined ? {} : { referenceVersion }),\n };\n}\n\nexport async function diagnoseAgentCli(\n agent: DoctorAgent,\n execute: Executor,\n): Promise<readonly DiagnosticCheck[]> {\n const checks: DiagnosticCheck[] = [];\n for (const plan of doctorAgents[agent].diagnostics()) {\n let help = \"\";\n const check = await diagnosticProbe(\n {\n id: `agent.cli.${plan.mode}`,\n command: { ...plan.command, retain: agentDiagnosticDefaults.retain },\n failureStatus: \"fail\",\n remedy:\n \"The agent CLI help command failed. Check the agent CLI in this image and rebuild it if needed.\",\n },\n async (command) => {\n const result = await execute(command);\n help = stripVTControlCharacters(`${result.stdout}\\n${result.stderr}`);\n return result;\n },\n );\n if (check.status !== \"pass\") {\n checks.push(check);\n continue;\n }\n const usage = help\n .split(/\\r?\\n/)\n .some((line) => line.trim().startsWith(plan.usage));\n if (!usage) {\n checks.push({\n id: check.id,\n status: \"warn\",\n message:\n \"Command exited successfully but the expected help could not be identified; CLI support is unverified.\",\n });\n continue;\n }\n const declared = new Set(\n [\n ...help.matchAll(/^\\s*(?:-[A-Za-z0-9?],?\\s+)?(--[A-Za-z][\\w-]*)\\b/gm),\n ].map((match) => match[1]),\n );\n const missing = plan.options.filter((option) => !declared.has(option));\n if (missing.length) {\n checks.push({\n id: check.id,\n status: \"fail\",\n message: `Help does not declare required options: ${missing.join(\", \")}. Rebuild the image with a CLI supporting Outpost's default invocation.`,\n });\n continue;\n }\n checks.push({\n id: check.id,\n status: \"pass\",\n message:\n \"Help identifies the command and declares the options used by Outpost's default invocation. Conversation execution and event decoding are not tested.\",\n });\n }\n return checks;\n}\n"]}
|
|
@@ -5,8 +5,8 @@ import { OutpostError } from "../domain/errors.js";
|
|
|
5
5
|
import { executeProcess } from "../infrastructure/process.js";
|
|
6
6
|
import { registerCleanup } from "../infrastructure/shutdown.js";
|
|
7
7
|
import { diagnosticContainer } from "../providers/diagnostic-container.js";
|
|
8
|
-
import {
|
|
9
|
-
import { diagnoseAgentCli } from "./doctor-agent.js";
|
|
8
|
+
import { doctorAgents } from "./doctor-agent.constants.js";
|
|
9
|
+
import { agentVersionProbe, diagnoseAgentCli } from "./doctor-agent.js";
|
|
10
10
|
import { diagnosticProbe } from "./diagnostic-probe.js";
|
|
11
11
|
import { doctorDefaults } from "./doctor.constants.js";
|
|
12
12
|
export async function diagnoseImage(options, execute = executeProcess) {
|
|
@@ -71,11 +71,9 @@ async function inspectImage({ sandboxProvider, agent, image }, execute, signal)
|
|
|
71
71
|
}, invoke));
|
|
72
72
|
const agentVersion = await diagnosticProbe({
|
|
73
73
|
id: "agent.sandbox",
|
|
74
|
-
|
|
74
|
+
...agentVersionProbe(agent),
|
|
75
75
|
failureStatus: "fail",
|
|
76
|
-
|
|
77
|
-
referenceVersion: agentVersions[agent],
|
|
78
|
-
remedy: `Install ${agent} in the image and rebuild it. This check does not bootstrap agents.`,
|
|
76
|
+
remedy: `Install ${doctorAgents[agent].executable} in the image and rebuild it. This check does not bootstrap agents.`,
|
|
79
77
|
}, invoke);
|
|
80
78
|
checks.push(agentVersion);
|
|
81
79
|
if (agentVersion.status === "fail")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-image.js","sourceRoot":"","sources":["../../src/application/doctor-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,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, rm } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { OutpostError } from \"../domain/errors.ts\";\nimport type { SandboxLease } from \"../domain/sandbox.types.ts\";\nimport { executeProcess } from \"../infrastructure/process.ts\";\nimport type { Executor } from \"../infrastructure/process.types.ts\";\nimport { registerCleanup } from \"../infrastructure/shutdown.ts\";\nimport { diagnosticContainer } from \"../providers/diagnostic-container.ts\";\nimport { doctorAgents } from \"./doctor-agent.constants.ts\";\nimport { agentVersionProbe, diagnoseAgentCli } from \"./doctor-agent.ts\";\nimport { diagnosticProbe } from \"./diagnostic-probe.ts\";\nimport { doctorDefaults } from \"./doctor.constants.ts\";\nimport type { DiagnosticCheck, DoctorImageOptions } from \"./doctor.types.ts\";\n\nexport async function diagnoseImage(\n options: DoctorImageOptions,\n execute: Executor = executeProcess,\n): Promise<readonly DiagnosticCheck[]> {\n const stop = new AbortController();\n const pending = inspectImage(options, execute, stop.signal);\n const unregister = registerCleanup(async () => {\n stop.abort(new OutpostError(\"aborted\", \"Image diagnostics interrupted\"));\n await pending;\n });\n try {\n return await pending;\n } finally {\n unregister();\n }\n}\n\nasync function inspectImage(\n { sandboxProvider, agent, image }: DoctorImageOptions,\n execute: Executor,\n signal: AbortSignal,\n): Promise<readonly DiagnosticCheck[]> {\n const directory = await mkdtemp(join(tmpdir(), \"outpost-doctor-\"));\n const checks: DiagnosticCheck[] = [];\n let lease: SandboxLease | undefined;\n let retained = false;\n let container: string | undefined;\n const tracked: Executor = (command) => {\n if (command.arguments?.[0] === \"create\") {\n const index = command.arguments.indexOf(\"--name\");\n container = command.arguments[index + 1];\n }\n return execute(command);\n };\n try {\n lease = await diagnosticContainer(\n sandboxProvider,\n image,\n doctorDefaults.deadlineMs,\n tracked,\n ).acquire({\n repository: directory,\n directory,\n gitDirectories: [],\n variables: {},\n signal,\n });\n checks.push({\n id: \"image.runtime\",\n status: \"pass\",\n message:\n \"Temporary sandbox started with network disabled and an empty workspace.\",\n });\n const sandbox = lease;\n const invoke: Executor = (command) =>\n sandbox.invoke({ ...command, signal });\n for (const executable of [\"node\", \"git\"]) {\n checks.push(\n await diagnosticProbe(\n {\n id: `image.${executable}`,\n command: { executable, arguments: [\"--version\"] },\n failureStatus: \"fail\",\n readVersion: true,\n remedy: `Install ${executable} in the image and rebuild it.`,\n },\n invoke,\n ),\n );\n }\n checks.push(\n await diagnosticProbe(\n {\n id: \"image.home\",\n command: {\n executable: \"sh\",\n arguments: [\"-c\", 'test -d \"$HOME\" && test -w \"$HOME\"'],\n },\n failureStatus: \"fail\",\n remedy:\n \"Check the image user and permissions of the private agent home.\",\n },\n invoke,\n ),\n );\n const agentVersion = await diagnosticProbe(\n {\n id: \"agent.sandbox\",\n ...agentVersionProbe(agent),\n failureStatus: \"fail\",\n remedy: `Install ${doctorAgents[agent].executable} in the image and rebuild it. This check does not bootstrap agents.`,\n },\n invoke,\n );\n checks.push(agentVersion);\n if (agentVersion.status === \"fail\")\n checks.push({\n id: \"agent.cli\",\n status: \"skipped\",\n message: \"CLI help checks require a successful agent version probe.\",\n });\n else checks.push(...(await diagnoseAgentCli(agent, invoke)));\n } catch (error) {\n retained = error instanceof AggregateError;\n checks.push({\n id: \"image.runtime\",\n status: \"fail\",\n message:\n \"Image diagnostics could not start. Check that the image exists locally, its UID matches the host, and sh, sleep, setsid, kill, tar and cp are installed. No image is downloaded.\",\n });\n } finally {\n if (lease) {\n try {\n await lease.release();\n checks.push({\n id: \"image.cleanup\",\n status: \"pass\",\n message: \"Diagnostic container removed.\",\n });\n } catch {\n retained = true;\n }\n }\n if (retained)\n checks.push({\n id: \"image.cleanup\",\n status: \"fail\",\n message: `Cleanup could not be confirmed. Inspect container ${container ?? \"creation state\"} with ${sandboxProvider}; temporary workspace retained at ${directory}.`,\n });\n if (!retained) {\n try {\n await rm(directory, { recursive: true, force: true });\n } catch {\n checks.push({\n id: \"image.workspace\",\n status: \"fail\",\n message: `Could not remove temporary workspace ${directory}.`,\n });\n }\n }\n }\n return checks;\n}\n"]}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { isDeepStrictEqual } from "node:util";
|
|
2
|
-
import { claudeHarness } from "../adapters/agents/claude-adapter.js";
|
|
3
|
-
import { codexHarness } from "../adapters/agents/codex-adapter.js";
|
|
4
|
-
import { geminiHarness } from "../adapters/agents/gemini-adapter.js";
|
|
5
2
|
import { protocolFixtures } from "../adapters/agents/protocol-fixtures.constants.js";
|
|
6
|
-
import {
|
|
3
|
+
import { doctorAgents } from "./doctor-agent.constants.js";
|
|
7
4
|
export function diagnoseAgentProtocol(agent) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
codex: codexHarness,
|
|
11
|
-
gemini: geminiHarness,
|
|
12
|
-
}[agent]()
|
|
13
|
-
.bind();
|
|
5
|
+
const profile = doctorAgents[agent];
|
|
6
|
+
const adapter = profile.harness().bind();
|
|
14
7
|
const checks = protocolFixtures[agent].map((fixture) => {
|
|
15
8
|
const events = fixture.lines.flatMap((line) => adapter.events(line));
|
|
16
9
|
const passed = isDeepStrictEqual(events, fixture.expected);
|
|
@@ -25,7 +18,9 @@ export function diagnoseAgentProtocol(agent) {
|
|
|
25
18
|
return {
|
|
26
19
|
scope: "bundled-protocol-fixtures",
|
|
27
20
|
agent,
|
|
28
|
-
referenceVersion
|
|
21
|
+
...(profile.referenceVersion === undefined
|
|
22
|
+
? {}
|
|
23
|
+
: { referenceVersion: profile.referenceVersion }),
|
|
29
24
|
installedCli: "unverified",
|
|
30
25
|
modelCompatibility: "unverified",
|
|
31
26
|
checks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-protocol.js","sourceRoot":"","sources":["../../src/application/doctor-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"doctor-protocol.js","sourceRoot":"","sources":["../../src/application/doctor-protocol.ts"],"names":[],"mappings":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KAAK,MAAM,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import { isDeepStrictEqual } from \"node:util\";\nimport { protocolFixtures } from \"../adapters/agents/protocol-fixtures.constants.ts\";\nimport { doctorAgents } from \"./doctor-agent.constants.ts\";\nimport type { AgentProtocolReport } from \"./doctor-protocol.types.ts\";\nimport type { DiagnosticCheck, DoctorAgent } from \"./doctor.types.ts\";\n\nexport function diagnoseAgentProtocol(agent: DoctorAgent): AgentProtocolReport {\n const profile = doctorAgents[agent];\n const adapter = profile.harness().bind();\n const checks: DiagnosticCheck[] = protocolFixtures[agent].map((fixture) => {\n const events = fixture.lines.flatMap((line) => adapter.events(line));\n const passed = isDeepStrictEqual(events, fixture.expected);\n return {\n id: `protocol.fixture.${fixture.name}`,\n status: passed ? \"pass\" : \"fail\",\n message: passed\n ? \"Bundled synthetic events decode to the expected structural observations. No installed CLI or model was invoked.\"\n : \"Bundled synthetic events do not match the expected structural observations.\",\n };\n });\n return {\n scope: \"bundled-protocol-fixtures\",\n agent,\n ...(profile.referenceVersion === undefined\n ? {}\n : { referenceVersion: profile.referenceVersion }),\n installedCli: \"unverified\",\n modelCompatibility: \"unverified\",\n checks,\n hasFailures: checks.some((check) => check.status === \"fail\"),\n };\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import type { DiagnosticCheck, DoctorAgent } from "./doctor.types.ts";
|
|
|
2
2
|
export interface AgentProtocolReport {
|
|
3
3
|
readonly scope: "bundled-protocol-fixtures";
|
|
4
4
|
readonly agent: DoctorAgent;
|
|
5
|
-
readonly referenceVersion
|
|
5
|
+
readonly referenceVersion?: string;
|
|
6
6
|
readonly installedCli: "unverified";
|
|
7
7
|
readonly modelCompatibility: "unverified";
|
|
8
8
|
readonly checks: readonly DiagnosticCheck[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-protocol.types.js","sourceRoot":"","sources":["../../src/application/doctor-protocol.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DiagnosticCheck, DoctorAgent } from \"./doctor.types.ts\";\n\nexport interface AgentProtocolReport {\n readonly scope: \"bundled-protocol-fixtures\";\n readonly agent: DoctorAgent;\n readonly referenceVersion
|
|
1
|
+
{"version":3,"file":"doctor-protocol.types.js","sourceRoot":"","sources":["../../src/application/doctor-protocol.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DiagnosticCheck, DoctorAgent } from \"./doctor.types.ts\";\n\nexport interface AgentProtocolReport {\n readonly scope: \"bundled-protocol-fixtures\";\n readonly agent: DoctorAgent;\n readonly referenceVersion?: string;\n readonly installedCli: \"unverified\";\n readonly modelCompatibility: \"unverified\";\n readonly checks: readonly DiagnosticCheck[];\n readonly hasFailures: boolean;\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { invariant } from "../domain/errors.js";
|
|
2
|
-
import {
|
|
3
|
-
import { diagnoseAgentCli } from "./doctor-agent.js";
|
|
2
|
+
import { agentVersionProbe, diagnoseAgentCli } from "./doctor-agent.js";
|
|
4
3
|
import { diagnosticProbe } from "./diagnostic-probe.js";
|
|
5
4
|
import { doctorDefaults } from "./doctor.constants.js";
|
|
6
5
|
import { diagnoseTransfers } from "./doctor-transfers.js";
|
|
@@ -69,9 +68,7 @@ export async function diagnoseSandbox(target, options = {}) {
|
|
|
69
68
|
if (options.agent) {
|
|
70
69
|
const version = await diagnosticProbe({
|
|
71
70
|
id: "agent.sandbox",
|
|
72
|
-
|
|
73
|
-
readVersion: true,
|
|
74
|
-
referenceVersion: agentVersions[options.agent],
|
|
71
|
+
...agentVersionProbe(options.agent),
|
|
75
72
|
failureStatus: "fail",
|
|
76
73
|
remedy: "Install the agent explicitly; diagnostics never bootstrap it.",
|
|
77
74
|
}, invoke);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-sandbox.js","sourceRoot":"","sources":["../../src/application/doctor-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;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,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK;YAAE,OAAO,YAAqB,CAAC;QACzC,OAAO,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAE,MAAgB,CAAC;IACzE,CAAC,CAAC;IACF,OAAO;QACL,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,QAAQ;QACnB,GAAG,CAAC,OAAO,CAAC,eAAe;YACzB,CAAC,CAAC;gBACE,eAAe,EAAE;oBACf,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI;oBAClC,SAAS,EAAE,OAAO,CAAC,eAAe,CAAC,SAAS;iBAC7C;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,YAAY,EAAE;YACZ;gBACE,EAAE,EAAE,SAAS;gBACb,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC;aACtC;YACD;gBACE,EAAE,EAAE,WAAW;gBACf,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC;aACxC;YACD;gBACE,EAAE,EAAE,gBAAgB;gBACpB,UAAU,EAAE,MAAM,CAAC,aAAa,KAAK,SAAS;gBAC9C,QAAQ,EAAE,YAAY;aACvB;YACD;gBACE,EAAE,EAAE,qBAAqB;gBACzB,UAAU,EAAE,SAAS;gBACrB,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,MAAM;QACN,kBAAkB,EAAE,YAAY;QAChC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import { invariant } from \"../domain/errors.ts\";\nimport type { SandboxLease } from \"../domain/sandbox.types.ts\";\nimport type { Executor } from \"../infrastructure/process.types.ts\";\nimport { agentVersionProbe, diagnoseAgentCli } from \"./doctor-agent.ts\";\nimport { diagnosticProbe } from \"./diagnostic-probe.ts\";\nimport { doctorDefaults } from \"./doctor.constants.ts\";\nimport type { DiagnosticCheck } from \"./doctor.types.ts\";\nimport { diagnoseTransfers } from \"./doctor-transfers.ts\";\nimport { sandboxDiagnosticDefaults } from \"./doctor-sandbox.constants.ts\";\nimport type {\n SandboxDiagnosticOptions,\n SandboxDiagnosticReport,\n} from \"./doctor-sandbox.types.ts\";\nimport type { Sandbox } from \"./outpost.types.ts\";\n\nexport async function diagnoseSandbox(\n target: Sandbox | SandboxLease,\n options: SandboxDiagnosticOptions = {},\n): Promise<SandboxDiagnosticReport> {\n if (\"diagnose\" in target) return target.diagnose(options);\n const deadlineMs = options.deadlineMs ?? doctorDefaults.deadlineMs;\n invariant(\n Number.isInteger(deadlineMs) &&\n deadlineMs > 0 &&\n deadlineMs <= sandboxDiagnosticDefaults.maximumDeadlineMs,\n \"Diagnostic deadlineMs must be an integer from 1 to 60000\",\n );\n options.signal?.throwIfAborted();\n const invoke: Executor = (command) => {\n options.signal?.throwIfAborted();\n return target.invoke({\n ...command,\n deadlineMs,\n retain: command.retain ?? doctorDefaults.retain,\n signal: options.signal\n ? AbortSignal.any([options.signal, AbortSignal.timeout(deadlineMs)])\n : AbortSignal.timeout(deadlineMs),\n });\n };\n const checks: DiagnosticCheck[] = [];\n for (const executable of [\"node\", \"git\"]) {\n checks.push(\n await diagnosticProbe(\n {\n id: `sandbox.${executable}`,\n command: { executable, arguments: [\"--version\"] },\n readVersion: true,\n failureStatus: \"fail\",\n remedy: `Install ${executable} in this sandbox.`,\n },\n invoke,\n ),\n );\n }\n try {\n const result = await invoke({\n executable: \"node\",\n arguments: [\"-e\", sandboxDiagnosticDefaults.command],\n });\n const passed =\n result.status === 7 &&\n result.stdout === \"outpost-stdout\" &&\n result.stderr === \"outpost-stderr\";\n checks.push({\n id: \"sandbox.command\",\n status: passed ? \"pass\" : \"fail\",\n message: passed\n ? \"Observed separate output streams and nonzero process exit status.\"\n : \"Command output or exit status did not match the diagnostic sentinel.\",\n });\n } catch {\n checks.push({\n id: \"sandbox.command\",\n status: \"fail\",\n message: \"Bounded command probe failed or was interrupted.\",\n });\n }\n checks.push(\n await diagnosticProbe(\n {\n id: \"sandbox.home\",\n command: {\n executable: \"node\",\n arguments: [\"-e\", sandboxDiagnosticDefaults.home, target.home],\n },\n failureStatus: \"fail\",\n remedy: \"Check the lease home directory and its permissions.\",\n },\n invoke,\n ),\n );\n if (options.agent) {\n const version = await diagnosticProbe(\n {\n id: \"agent.sandbox\",\n ...agentVersionProbe(options.agent),\n failureStatus: \"fail\",\n remedy: \"Install the agent explicitly; diagnostics never bootstrap it.\",\n },\n invoke,\n );\n checks.push(version);\n if (version.status !== \"fail\")\n checks.push(...(await diagnoseAgentCli(options.agent, invoke)));\n }\n if (options.transfers === true)\n checks.push(\n ...(await diagnoseTransfers(\n target,\n { deadlineMs, ...(options.signal ? { signal: options.signal } : {}) },\n invoke,\n )),\n );\n checks.push({\n id: \"model\",\n status: \"skipped\",\n message:\n \"Authentication, model access and installed agent protocol compatibility are unverified. No model request was made.\",\n });\n const observed = (id: string) => {\n const check = checks.find((check) => check.id === id);\n if (!check) return \"unverified\" as const;\n return check.status === \"pass\" ? (\"pass\" as const) : (\"fail\" as const);\n };\n return {\n scope: \"owned-sandbox\",\n ownership: \"caller\",\n ...(options.sandboxProvider\n ? {\n sandboxProvider: {\n name: options.sandboxProvider.name,\n placement: options.sandboxProvider.placement,\n },\n }\n : {}),\n capabilities: [\n {\n id: \"command\",\n advertised: true,\n observed: observed(\"sandbox.command\"),\n },\n {\n id: \"transfers\",\n advertised: true,\n observed: observed(\"sandbox.transfers\"),\n },\n {\n id: \"batchTransfers\",\n advertised: target.fileTransfers !== undefined,\n observed: \"unverified\",\n },\n {\n id: \"interactiveTerminal\",\n advertised: \"unknown\",\n observed: \"unverified\",\n },\n ],\n checks,\n modelCompatibility: \"unverified\",\n hasFailures: checks.some((check) => check.status === \"fail\"),\n };\n}\n"]}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import { invariant } from "../domain/errors.js";
|
|
1
|
+
import { invariant, OutpostError } from "../domain/errors.js";
|
|
2
|
+
import { registerCleanup } from "../infrastructure/shutdown.js";
|
|
2
3
|
import { executeProcess } from "../infrastructure/process.js";
|
|
3
|
-
import {
|
|
4
|
+
import { agentVersionProbe } from "./doctor-agent.js";
|
|
4
5
|
import { diagnoseImage } from "./doctor-image.js";
|
|
5
6
|
import { diagnosticProbe } from "./diagnostic-probe.js";
|
|
6
7
|
import { doctorDefaults, providerDiagnostics } from "./doctor.constants.js";
|
|
7
8
|
export async function diagnose(options, execute = executeProcess) {
|
|
9
|
+
const stop = new AbortController();
|
|
10
|
+
const pending = inspect(options, execute, stop.signal);
|
|
11
|
+
const unregister = registerCleanup(async () => {
|
|
12
|
+
stop.abort(new OutpostError("aborted", "Host diagnostics interrupted"));
|
|
13
|
+
await pending;
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
return await pending;
|
|
17
|
+
}
|
|
18
|
+
finally {
|
|
19
|
+
unregister();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function inspect(options, execute, signal) {
|
|
23
|
+
const probe = (command) => {
|
|
24
|
+
signal.throwIfAborted();
|
|
25
|
+
return execute({ ...command, signal });
|
|
26
|
+
};
|
|
8
27
|
const { sandboxProvider, agent, image } = options;
|
|
9
28
|
if (image !== undefined) {
|
|
10
29
|
invariant(sandboxProvider === "docker" || sandboxProvider === "podman", "--image requires docker or podman.");
|
|
@@ -30,7 +49,7 @@ export async function diagnose(options, execute = executeProcess) {
|
|
|
30
49
|
failureStatus: "fail",
|
|
31
50
|
remedy: "Install Git and make it available on PATH.",
|
|
32
51
|
readVersion: true,
|
|
33
|
-
},
|
|
52
|
+
}, probe));
|
|
34
53
|
if (capabilities.placement === "mounted") {
|
|
35
54
|
const engine = await diagnosticProbe({
|
|
36
55
|
id: "provider.cli",
|
|
@@ -38,7 +57,7 @@ export async function diagnose(options, execute = executeProcess) {
|
|
|
38
57
|
failureStatus: "fail",
|
|
39
58
|
remedy: `Install ${sandboxProvider} and make it available on PATH.`,
|
|
40
59
|
readVersion: true,
|
|
41
|
-
},
|
|
60
|
+
}, probe);
|
|
42
61
|
checks.push(engine);
|
|
43
62
|
if (engine.status === "pass")
|
|
44
63
|
checks.push(await diagnosticProbe({
|
|
@@ -49,13 +68,13 @@ export async function diagnose(options, execute = executeProcess) {
|
|
|
49
68
|
},
|
|
50
69
|
failureStatus: "fail",
|
|
51
70
|
remedy: `Check ${sandboxProvider} is running and accessible to this user; on macOS, start its virtual machine.`,
|
|
52
|
-
},
|
|
71
|
+
}, probe));
|
|
53
72
|
checks.push(await diagnosticProbe({
|
|
54
73
|
id: "host.tar",
|
|
55
74
|
command: { executable: "tar", arguments: ["--version"] },
|
|
56
75
|
failureStatus: "fail",
|
|
57
76
|
remedy: "Install GNU tar or bsdtar for container transfers.",
|
|
58
|
-
},
|
|
77
|
+
}, probe));
|
|
59
78
|
}
|
|
60
79
|
if (capabilities.placement === "remote")
|
|
61
80
|
checks.push({
|
|
@@ -65,12 +84,11 @@ export async function diagnose(options, execute = executeProcess) {
|
|
|
65
84
|
});
|
|
66
85
|
checks.push(await diagnosticProbe({
|
|
67
86
|
id: "agent.host",
|
|
68
|
-
|
|
87
|
+
...agentVersionProbe(agent),
|
|
69
88
|
failureStatus: "warn",
|
|
70
89
|
remedy: "Host CLI is unavailable or unverified. A sandbox may have its own CLI; dispatch can bootstrap a missing agent.",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, execute));
|
|
90
|
+
}, probe));
|
|
91
|
+
signal.throwIfAborted();
|
|
74
92
|
if (image !== undefined &&
|
|
75
93
|
(sandboxProvider === "docker" || sandboxProvider === "podman")) {
|
|
76
94
|
const connected = checks.some((check) => check.id === "provider.connection" && check.status === "pass");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/application/doctor.ts"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eAAe,KAAK,QAAQ,IAAI,eAAe,KAAK,QAAQ,CAAC,EAC9D,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAC3B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,qBAAqB,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CACzE,CAAC;QACF,IAAI,SAAS;YACX,MAAM,CAAC,IAAI,CACT,GAAG,CAAC,MAAM,aAAa,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CACrE,CAAC;;YAEF,MAAM,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,eAAe;gBACnB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,oDAAoD;aAC9D,CAAC,CAAC;IACP,CAAC;IACD,IAAI,YAAY,CAAC,SAAS,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS;QAC1D,MAAM,CAAC,IAAI,CAAC;YACV,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE,SAAS;YACjB,OAAO,EACL,kGAAkG;SACrG,CAAC,CAAC;IACL,MAAM,CAAC,IAAI,CAAC;QACV,EAAE,EAAE,WAAW;QACf,MAAM,EAAE,SAAS;QACjB,OAAO,EACL,KAAK,KAAK,SAAS;YACjB,CAAC,CAAC,4GAA4G;YAC9G,CAAC,CAAC,mIAAmI;KAC1I,CAAC,CAAC;IACH,OAAO;QACL,GAAG,OAAO;QACV,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB;QACtD,GAAG,YAAY;QACf,MAAM;QACN,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import { invariant, OutpostError } from \"../domain/errors.ts\";\nimport { registerCleanup } from \"../infrastructure/shutdown.ts\";\nimport { executeProcess } from \"../infrastructure/process.ts\";\nimport type { Executor } from \"../infrastructure/process.types.ts\";\nimport { agentVersionProbe } from \"./doctor-agent.ts\";\nimport { diagnoseImage } from \"./doctor-image.ts\";\nimport { diagnosticProbe } from \"./diagnostic-probe.ts\";\nimport { doctorDefaults, providerDiagnostics } from \"./doctor.constants.ts\";\nimport type {\n DiagnosticCheck,\n DoctorOptions,\n DoctorReport,\n} from \"./doctor.types.ts\";\n\nexport async function diagnose(\n options: DoctorOptions,\n execute: Executor = executeProcess,\n): Promise<DoctorReport> {\n const stop = new AbortController();\n const pending = inspect(options, execute, stop.signal);\n const unregister = registerCleanup(async () => {\n stop.abort(new OutpostError(\"aborted\", \"Host diagnostics interrupted\"));\n await pending;\n });\n try {\n return await pending;\n } finally {\n unregister();\n }\n}\n\nasync function inspect(\n options: DoctorOptions,\n execute: Executor,\n signal: AbortSignal,\n): Promise<DoctorReport> {\n const probe: Executor = (command) => {\n signal.throwIfAborted();\n return execute({ ...command, signal });\n };\n const { sandboxProvider, agent, image } = options;\n if (image !== undefined) {\n invariant(\n sandboxProvider === \"docker\" || sandboxProvider === \"podman\",\n \"--image requires docker or podman.\",\n );\n invariant(\n image.length > 0 &&\n !image.startsWith(\"-\") &&\n !/[\\x00-\\x20\\x7f]/.test(image),\n \"Invalid diagnostic image name.\",\n );\n }\n const capabilities = providerDiagnostics[sandboxProvider];\n const checks: DiagnosticCheck[] = [\n {\n id: \"host.node\",\n status:\n Number(process.versions.node.split(\".\")[0]) >=\n doctorDefaults.minimumNodeMajor\n ? \"pass\"\n : \"fail\",\n version: process.versions.node,\n message: `Outpost requires Node.js ${doctorDefaults.minimumNodeMajor}+.`,\n },\n ];\n checks.push(\n await diagnosticProbe(\n {\n id: \"host.git\",\n command: { executable: \"git\", arguments: [\"--version\"] },\n failureStatus: \"fail\",\n remedy: \"Install Git and make it available on PATH.\",\n readVersion: true,\n },\n probe,\n ),\n );\n if (capabilities.placement === \"mounted\") {\n const engine = await diagnosticProbe(\n {\n id: \"provider.cli\",\n command: { executable: sandboxProvider, arguments: [\"--version\"] },\n failureStatus: \"fail\",\n remedy: `Install ${sandboxProvider} and make it available on PATH.`,\n readVersion: true,\n },\n probe,\n );\n checks.push(engine);\n if (engine.status === \"pass\")\n checks.push(\n await diagnosticProbe(\n {\n id: \"provider.connection\",\n command: {\n executable: sandboxProvider,\n arguments: [\"info\"],\n },\n failureStatus: \"fail\",\n remedy: `Check ${sandboxProvider} is running and accessible to this user; on macOS, start its virtual machine.`,\n },\n probe,\n ),\n );\n checks.push(\n await diagnosticProbe(\n {\n id: \"host.tar\",\n command: { executable: \"tar\", arguments: [\"--version\"] },\n failureStatus: \"fail\",\n remedy: \"Install GNU tar or bsdtar for container transfers.\",\n },\n probe,\n ),\n );\n }\n if (capabilities.placement === \"remote\")\n checks.push({\n id: \"provider.cloud\",\n status: \"skipped\",\n message:\n \"Cloud SDK, credentials, account access and allocation are not checked.\",\n });\n checks.push(\n await diagnosticProbe(\n {\n id: \"agent.host\",\n ...agentVersionProbe(agent),\n failureStatus: \"warn\",\n remedy:\n \"Host CLI is unavailable or unverified. A sandbox may have its own CLI; dispatch can bootstrap a missing agent.\",\n },\n probe,\n ),\n );\n signal.throwIfAborted();\n if (\n image !== undefined &&\n (sandboxProvider === \"docker\" || sandboxProvider === \"podman\")\n ) {\n const connected = checks.some(\n (check) => check.id === \"provider.connection\" && check.status === \"pass\",\n );\n if (connected)\n checks.push(\n ...(await diagnoseImage({ sandboxProvider, agent, image }, execute)),\n );\n else\n checks.push({\n id: \"image.runtime\",\n status: \"skipped\",\n message: \"Image checks require a reachable container engine.\",\n });\n }\n if (capabilities.placement !== \"host\" && image === undefined)\n checks.push({\n id: \"agent.sandbox\",\n status: \"skipped\",\n message:\n \"Agent version inside the sandbox is not checked; the host version does not describe the sandbox.\",\n });\n checks.push({\n id: \"execution\",\n status: \"skipped\",\n message:\n image === undefined\n ? \"Images, mounts, repository state, authentication and model access are not tested. No sandbox is allocated.\"\n : \"Workflow mounts, repository state, authentication and model access are not tested. Image checks use a separate temporary sandbox.\",\n });\n return {\n ...options,\n scope: image === undefined ? \"host\" : \"host-and-image\",\n ...capabilities,\n checks,\n hasFailures: checks.some((check) => check.status === \"fail\"),\n };\n}\n"]}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import type { AgentCliDiagnostic } from "../adapters/agents/cli-diagnostics.types.ts";
|
|
2
|
+
import type { CliHarness } from "../domain/agent.types.ts";
|
|
1
3
|
import type { Command } from "../domain/command.types.ts";
|
|
2
4
|
export type DoctorProvider = "docker" | "podman" | "local" | "vercel" | "daytona";
|
|
3
|
-
export type DoctorAgent = "codex" | "claude" | "
|
|
5
|
+
export type DoctorAgent = "codex" | "claude" | "antigravity" | "copilot" | "kimi";
|
|
6
|
+
export interface DoctorAgentProfile {
|
|
7
|
+
readonly executable: string;
|
|
8
|
+
readonly referenceVersion?: string;
|
|
9
|
+
readonly variables?: Command["variables"];
|
|
10
|
+
diagnostics(): readonly AgentCliDiagnostic[];
|
|
11
|
+
harness(): CliHarness;
|
|
12
|
+
}
|
|
4
13
|
export type DiagnosticStatus = "pass" | "warn" | "fail" | "skipped";
|
|
5
14
|
export interface DiagnosticCheck {
|
|
6
15
|
readonly id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.types.js","sourceRoot":"","sources":["../../src/application/doctor.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Command } from \"../domain/command.types.ts\";\nexport type DoctorProvider =\n \"docker\" | \"podman\" | \"local\" | \"vercel\" | \"daytona\";\nexport type DoctorAgent
|
|
1
|
+
{"version":3,"file":"doctor.types.js","sourceRoot":"","sources":["../../src/application/doctor.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentCliDiagnostic } from \"../adapters/agents/cli-diagnostics.types.ts\";\nimport type { CliHarness } from \"../domain/agent.types.ts\";\nimport type { Command } from \"../domain/command.types.ts\";\nexport type DoctorProvider =\n \"docker\" | \"podman\" | \"local\" | \"vercel\" | \"daytona\";\nexport type DoctorAgent =\n \"codex\" | \"claude\" | \"antigravity\" | \"copilot\" | \"kimi\";\nexport interface DoctorAgentProfile {\n readonly executable: string;\n readonly referenceVersion?: string;\n readonly variables?: Command[\"variables\"];\n diagnostics(): readonly AgentCliDiagnostic[];\n harness(): CliHarness;\n}\nexport type DiagnosticStatus = \"pass\" | \"warn\" | \"fail\" | \"skipped\";\nexport interface DiagnosticCheck {\n readonly id: string;\n readonly status: DiagnosticStatus;\n readonly message: string;\n readonly version?: string;\n readonly referenceVersion?: string;\n}\nexport interface DoctorOptions {\n readonly image?: string;\n readonly sandboxProvider: DoctorProvider;\n readonly agent: DoctorAgent;\n}\nexport interface DoctorImageOptions {\n readonly sandboxProvider: \"docker\" | \"podman\";\n readonly agent: DoctorAgent;\n readonly image: string;\n}\nexport interface DoctorReport {\n readonly sandboxProvider: DoctorProvider;\n readonly agent: DoctorAgent;\n readonly scope: \"host\" | \"host-and-image\";\n readonly image?: string;\n readonly placement: \"mounted\" | \"host\" | \"remote\";\n readonly interactiveTerminal: boolean;\n readonly checks: readonly DiagnosticCheck[];\n readonly hasFailures: boolean;\n}\nexport interface DiagnosticProbe {\n readonly id: string;\n readonly command: Command;\n readonly failureStatus: \"fail\" | \"warn\";\n readonly remedy: string;\n readonly readVersion?: boolean;\n readonly referenceVersion?: string;\n}\n"]}
|
|
@@ -5,9 +5,11 @@ export declare const executionDefaults: Readonly<{
|
|
|
5
5
|
settleMs: 60000;
|
|
6
6
|
deadlineMs: 3600000;
|
|
7
7
|
expansionMs: 30000;
|
|
8
|
+
usageMs: 5000;
|
|
8
9
|
attachMs: 86400000;
|
|
9
10
|
completion: "<outpost>done</outpost>";
|
|
10
11
|
rawTailBytes: 65536;
|
|
11
12
|
eventBytes: 16777216;
|
|
12
13
|
}>;
|
|
13
14
|
export declare const dispatchDeadlines: readonly ["idleMs", "idleWarningMs", "settleMs", "deadlineMs", "expansionMs"];
|
|
15
|
+
export declare const agentConnectionFailurePattern: RegExp;
|
|
@@ -5,6 +5,7 @@ export const executionDefaults = Object.freeze({
|
|
|
5
5
|
settleMs: 60_000,
|
|
6
6
|
deadlineMs: 3_600_000,
|
|
7
7
|
expansionMs: 30_000,
|
|
8
|
+
usageMs: 5000,
|
|
8
9
|
attachMs: 86_400_000,
|
|
9
10
|
completion: "<outpost>done</outpost>",
|
|
10
11
|
rawTailBytes: 65_536,
|
|
@@ -17,4 +18,5 @@ export const dispatchDeadlines = [
|
|
|
17
18
|
"deadlineMs",
|
|
18
19
|
"expansionMs",
|
|
19
20
|
];
|
|
21
|
+
export const agentConnectionFailurePattern = /\b(?:connection (?:failed|refused|reset)|error sending request|ECONNREFUSED|ENOTFOUND|EAI_AGAIN)\b/i;
|
|
20
22
|
//# sourceMappingURL=execution.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.constants.js","sourceRoot":"","sources":["../../src/application/execution.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,OAAO;IACf,aAAa,EAAE,MAAM;IACrB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,yBAAyB;IACrC,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,UAAU;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,eAAe;IACf,UAAU;IACV,YAAY;IACZ,aAAa;CACL,CAAC","sourcesContent":["export const executionDefaults = Object.freeze({\n passes: 1,\n idleMs: 600_000,\n idleWarningMs: 60_000,\n settleMs: 60_000,\n deadlineMs: 3_600_000,\n expansionMs: 30_000,\n attachMs: 86_400_000,\n completion: \"<outpost>done</outpost>\",\n rawTailBytes: 65_536,\n eventBytes: 16_777_216,\n});\n\nexport const dispatchDeadlines = [\n \"idleMs\",\n \"idleWarningMs\",\n \"settleMs\",\n \"deadlineMs\",\n \"expansionMs\",\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"execution.constants.js","sourceRoot":"","sources":["../../src/application/execution.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,OAAO;IACf,aAAa,EAAE,MAAM;IACrB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,yBAAyB;IACrC,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,UAAU;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,eAAe;IACf,UAAU;IACV,YAAY;IACZ,aAAa;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GACxC,qGAAqG,CAAC","sourcesContent":["export const executionDefaults = Object.freeze({\n passes: 1,\n idleMs: 600_000,\n idleWarningMs: 60_000,\n settleMs: 60_000,\n deadlineMs: 3_600_000,\n expansionMs: 30_000,\n usageMs: 5000,\n attachMs: 86_400_000,\n completion: \"<outpost>done</outpost>\",\n rawTailBytes: 65_536,\n eventBytes: 16_777_216,\n});\n\nexport const dispatchDeadlines = [\n \"idleMs\",\n \"idleWarningMs\",\n \"settleMs\",\n \"deadlineMs\",\n \"expansionMs\",\n] as const;\n\nexport const agentConnectionFailurePattern =\n /\\b(?:connection (?:failed|refused|reset)|error sending request|ECONNREFUSED|ENOTFOUND|EAI_AGAIN)\\b/i;\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ObservationHub } from "../domain/observation.types.ts";
|
|
1
2
|
import type { TransportReference } from "../domain/transport.types.ts";
|
|
2
3
|
import type { Agent, AgentObservation, Usage } from "../domain/agent.types.ts";
|
|
3
4
|
import type { DispatchTelemetry } from "../domain/dispatch-telemetry.types.ts";
|
|
@@ -5,6 +6,7 @@ import type { Brief } from "../domain/prompts.types.ts";
|
|
|
5
6
|
import type { ResponseSpec } from "../domain/response.types.ts";
|
|
6
7
|
import type { Logging } from "../infrastructure/journal.types.ts";
|
|
7
8
|
export interface DispatchOptions<T = undefined> {
|
|
9
|
+
readonly observation?: ObservationHub;
|
|
8
10
|
readonly agent?: Agent;
|
|
9
11
|
readonly logging?: Logging;
|
|
10
12
|
readonly label?: string;
|
|
@@ -41,6 +43,12 @@ export interface Turn {
|
|
|
41
43
|
readonly durationMs: number;
|
|
42
44
|
}
|
|
43
45
|
export interface AgentOutput {
|
|
46
|
+
readonly usage: Usage;
|
|
47
|
+
readonly reportedUsage: boolean;
|
|
48
|
+
readonly finalUsage: boolean;
|
|
49
|
+
recordUsage(tokens: Usage, cumulative?: boolean): void;
|
|
50
|
+
setUsageBaseline(tokens: Usage | undefined): void;
|
|
51
|
+
readonly failure: string | undefined;
|
|
44
52
|
readonly completed: boolean;
|
|
45
53
|
readonly conversation: string | undefined;
|
|
46
54
|
append(chunk: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.types.js","sourceRoot":"","sources":["../../src/application/execution.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TransportReference } from \"../domain/transport.types.ts\";\nimport type { Agent, AgentObservation, Usage } from \"../domain/agent.types.ts\";\nimport type { DispatchTelemetry } from \"../domain/dispatch-telemetry.types.ts\";\nimport type { Brief } from \"../domain/prompts.types.ts\";\nimport type { ResponseSpec } from \"../domain/response.types.ts\";\nimport type { Logging } from \"../infrastructure/journal.types.ts\";\n\nexport interface DispatchOptions<T = undefined> {\n readonly agent?: Agent;\n readonly logging?: Logging;\n readonly label?: string;\n readonly brief: Brief;\n readonly passes?: number;\n readonly until?: string | readonly string[];\n readonly idleMs?: number;\n readonly idleWarningMs?: number;\n readonly settleMs?: number;\n readonly deadlineMs?: number;\n readonly expansionMs?: number;\n readonly signal?: AbortSignal;\n readonly continuation?: { readonly id: string; readonly fork?: boolean };\n readonly response?: ResponseSpec<T>;\n readonly telemetry?: DispatchTelemetry;\n readonly observe?: (event: AgentObservation) => void;\n readonly warn?: (message: string) => void;\n readonly diagnostic?: (message: string) => void;\n}\n\nexport interface TurnContext {\n readonly repository: string;\n readonly repair: boolean;\n}\n\nexport interface Turn {\n readonly text: string;\n readonly status: number;\n readonly conversation?: string;\n readonly transcript?: string;\n readonly transcriptReference?: TransportReference;\n readonly usage: Usage;\n readonly durationMs: number;\n}\n\nexport interface AgentOutput {\n readonly completed: boolean;\n readonly conversation: string | undefined;\n append(chunk: string): void;\n flush(): void;\n result(): Pick<Turn, \"text\" | \"usage\" | \"conversation\">;\n}\n\nexport interface ActivityWatchdog {\n refresh(completed: boolean): void;\n hold(): () => void;\n close(): void;\n}\n\nexport interface Execution<T> {\n readonly text: string;\n readonly turns: readonly Turn[];\n readonly usage: Usage;\n readonly conversation?: string;\n readonly value: T;\n readonly completed: boolean;\n readonly completion?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"execution.types.js","sourceRoot":"","sources":["../../src/application/execution.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ObservationHub } from \"../domain/observation.types.ts\";\nimport type { TransportReference } from \"../domain/transport.types.ts\";\nimport type { Agent, AgentObservation, Usage } from \"../domain/agent.types.ts\";\nimport type { DispatchTelemetry } from \"../domain/dispatch-telemetry.types.ts\";\nimport type { Brief } from \"../domain/prompts.types.ts\";\nimport type { ResponseSpec } from \"../domain/response.types.ts\";\nimport type { Logging } from \"../infrastructure/journal.types.ts\";\n\nexport interface DispatchOptions<T = undefined> {\n readonly observation?: ObservationHub;\n readonly agent?: Agent;\n readonly logging?: Logging;\n readonly label?: string;\n readonly brief: Brief;\n readonly passes?: number;\n readonly until?: string | readonly string[];\n readonly idleMs?: number;\n readonly idleWarningMs?: number;\n readonly settleMs?: number;\n readonly deadlineMs?: number;\n readonly expansionMs?: number;\n readonly signal?: AbortSignal;\n readonly continuation?: { readonly id: string; readonly fork?: boolean };\n readonly response?: ResponseSpec<T>;\n readonly telemetry?: DispatchTelemetry;\n readonly observe?: (event: AgentObservation) => void;\n readonly warn?: (message: string) => void;\n readonly diagnostic?: (message: string) => void;\n}\n\nexport interface TurnContext {\n readonly repository: string;\n readonly repair: boolean;\n}\n\nexport interface Turn {\n readonly text: string;\n readonly status: number;\n readonly conversation?: string;\n readonly transcript?: string;\n readonly transcriptReference?: TransportReference;\n readonly usage: Usage;\n readonly durationMs: number;\n}\n\nexport interface AgentOutput {\n readonly usage: Usage;\n readonly reportedUsage: boolean;\n readonly finalUsage: boolean;\n recordUsage(tokens: Usage, cumulative?: boolean): void;\n setUsageBaseline(tokens: Usage | undefined): void;\n readonly failure: string | undefined;\n readonly completed: boolean;\n readonly conversation: string | undefined;\n append(chunk: string): void;\n flush(): void;\n result(): Pick<Turn, \"text\" | \"usage\" | \"conversation\">;\n}\n\nexport interface ActivityWatchdog {\n refresh(completed: boolean): void;\n hold(): () => void;\n close(): void;\n}\n\nexport interface Execution<T> {\n readonly text: string;\n readonly turns: readonly Turn[];\n readonly usage: Usage;\n readonly conversation?: string;\n readonly value: T;\n readonly completed: boolean;\n readonly completion?: string;\n}\n"]}
|