@elie-laloum/outpost 2.0.0 → 4.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 +42 -0
- package/README.md +3 -1
- package/SECURITY.md +3 -1
- package/dist/adapters/agents/claude-diagnostics.d.ts +1 -0
- package/dist/adapters/agents/claude-diagnostics.js +7 -0
- package/dist/adapters/agents/claude-diagnostics.js.map +1 -0
- package/dist/adapters/agents/cli-diagnostics.constants.d.ts +12 -0
- package/dist/adapters/agents/cli-diagnostics.constants.js +24 -0
- package/dist/adapters/agents/cli-diagnostics.constants.js.map +1 -0
- package/dist/adapters/agents/cli-diagnostics.d.ts +4 -0
- package/dist/adapters/agents/cli-diagnostics.js +14 -0
- package/dist/adapters/agents/cli-diagnostics.js.map +1 -0
- package/dist/adapters/agents/cli-diagnostics.types.d.ts +13 -0
- package/dist/adapters/agents/cli-diagnostics.types.js +2 -0
- package/dist/adapters/agents/cli-diagnostics.types.js.map +1 -0
- package/dist/adapters/agents/codex-diagnostics.d.ts +1 -0
- package/dist/adapters/agents/codex-diagnostics.js +7 -0
- package/dist/adapters/agents/codex-diagnostics.js.map +1 -0
- package/dist/adapters/agents/gemini-adapter.d.ts +3 -0
- package/dist/adapters/agents/gemini-adapter.js +15 -0
- package/dist/adapters/agents/gemini-adapter.js.map +1 -0
- package/dist/adapters/agents/gemini-diagnostics.d.ts +2 -0
- package/dist/adapters/agents/gemini-diagnostics.js +15 -0
- package/dist/adapters/agents/gemini-diagnostics.js.map +1 -0
- package/dist/adapters/agents/gemini-events.d.ts +2 -0
- package/dist/adapters/agents/gemini-events.js +50 -0
- package/dist/adapters/agents/gemini-events.js.map +1 -0
- package/dist/adapters/agents/gemini-request.d.ts +4 -0
- package/dist/adapters/agents/gemini-request.js +21 -0
- package/dist/adapters/agents/gemini-request.js.map +1 -0
- package/dist/adapters/agents/gemini.types.d.ts +6 -0
- package/dist/adapters/agents/gemini.types.js +2 -0
- package/dist/adapters/agents/gemini.types.js.map +1 -0
- package/dist/adapters/agents/protocol-fixtures.constants.d.ts +2 -0
- package/dist/adapters/agents/protocol-fixtures.constants.js +105 -0
- package/dist/adapters/agents/protocol-fixtures.constants.js.map +1 -0
- package/dist/adapters/agents/protocol-fixtures.types.d.ts +6 -0
- package/dist/adapters/agents/protocol-fixtures.types.js +2 -0
- package/dist/adapters/agents/protocol-fixtures.types.js.map +1 -0
- package/dist/application/agent-bootstrap.constants.d.ts +1 -0
- package/dist/application/agent-bootstrap.constants.js +1 -0
- package/dist/application/agent-bootstrap.constants.js.map +1 -1
- package/dist/application/agent-bootstrap.js +6 -2
- package/dist/application/agent-bootstrap.js.map +1 -1
- package/dist/application/agent-output.js +9 -2
- package/dist/application/agent-output.js.map +1 -1
- package/dist/application/artifact-tasks.d.ts +5 -0
- package/dist/application/artifact-tasks.js +31 -0
- package/dist/application/artifact-tasks.js.map +1 -0
- package/dist/application/artifact-tasks.types.d.ts +8 -0
- package/dist/application/artifact-tasks.types.js +2 -0
- package/dist/application/artifact-tasks.types.js.map +1 -0
- package/dist/application/diagnostic-probe.d.ts +3 -0
- package/dist/application/diagnostic-probe.js +55 -0
- package/dist/application/diagnostic-probe.js.map +1 -0
- package/dist/application/dispatch-validation.js +2 -0
- package/dist/application/dispatch-validation.js.map +1 -1
- package/dist/application/doctor-agent.constants.d.ts +11 -0
- package/dist/application/doctor-agent.constants.js +10 -0
- package/dist/application/doctor-agent.constants.js.map +1 -0
- package/dist/application/doctor-agent.d.ts +3 -0
- package/dist/application/doctor-agent.js +53 -0
- package/dist/application/doctor-agent.js.map +1 -0
- package/dist/application/doctor-image.d.ts +3 -0
- package/dist/application/doctor-image.js +133 -0
- package/dist/application/doctor-image.js.map +1 -0
- package/dist/application/doctor-protocol.d.ts +3 -0
- package/dist/application/doctor-protocol.js +30 -0
- package/dist/application/doctor-protocol.js.map +1 -0
- package/dist/application/doctor-protocol.types.d.ts +10 -0
- package/dist/application/doctor-protocol.types.js +2 -0
- package/dist/application/doctor-protocol.types.js.map +1 -0
- package/dist/application/doctor-sandbox.constants.d.ts +5 -0
- package/dist/application/doctor-sandbox.constants.js +6 -0
- package/dist/application/doctor-sandbox.constants.js.map +1 -0
- package/dist/application/doctor-sandbox.d.ts +4 -0
- package/dist/application/doctor-sandbox.js +133 -0
- package/dist/application/doctor-sandbox.js.map +1 -0
- package/dist/application/doctor-sandbox.types.d.ts +23 -0
- package/dist/application/doctor-sandbox.types.js +2 -0
- package/dist/application/doctor-sandbox.types.js.map +1 -0
- package/dist/application/doctor-transfers.constants.d.ts +6 -0
- package/dist/application/doctor-transfers.constants.js +7 -0
- package/dist/application/doctor-transfers.constants.js.map +1 -0
- package/dist/application/doctor-transfers.d.ts +4 -0
- package/dist/application/doctor-transfers.js +88 -0
- package/dist/application/doctor-transfers.js.map +1 -0
- package/dist/application/doctor.constants.d.ts +9 -0
- package/dist/application/doctor.constants.js +15 -0
- package/dist/application/doctor.constants.js.map +1 -0
- package/dist/application/doctor.d.ts +3 -0
- package/dist/application/doctor.js +106 -0
- package/dist/application/doctor.js.map +1 -0
- package/dist/application/doctor.types.d.ts +39 -0
- package/dist/application/doctor.types.js +2 -0
- package/dist/application/doctor.types.js.map +1 -0
- package/dist/application/execution.js +1 -0
- package/dist/application/execution.js.map +1 -1
- package/dist/application/outpost.types.d.ts +4 -0
- package/dist/application/outpost.types.js.map +1 -1
- package/dist/application/queue-worker.d.ts +2 -0
- package/dist/application/queue-worker.js +75 -0
- package/dist/application/queue-worker.js.map +1 -0
- package/dist/application/queue-worker.types.d.ts +15 -0
- package/dist/application/queue-worker.types.js +2 -0
- package/dist/application/queue-worker.types.js.map +1 -0
- package/dist/application/queued-task.d.ts +3 -0
- package/dist/application/queued-task.js +56 -0
- package/dist/application/queued-task.js.map +1 -0
- package/dist/application/queued-task.types.d.ts +11 -0
- package/dist/application/queued-task.types.js +2 -0
- package/dist/application/queued-task.types.js.map +1 -0
- package/dist/application/recovery-checksum-capture.d.ts +2 -0
- package/dist/application/recovery-checksum-capture.js +32 -0
- package/dist/application/recovery-checksum-capture.js.map +1 -0
- package/dist/application/recovery-checksum-paths.d.ts +2 -0
- package/dist/application/recovery-checksum-paths.js +11 -0
- package/dist/application/recovery-checksum-paths.js.map +1 -0
- package/dist/application/recovery-checksums.constants.d.ts +5 -0
- package/dist/application/recovery-checksums.constants.js +6 -0
- package/dist/application/recovery-checksums.constants.js.map +1 -0
- package/dist/application/recovery-checksums.d.ts +3 -0
- package/dist/application/recovery-checksums.js +94 -0
- package/dist/application/recovery-checksums.js.map +1 -0
- package/dist/application/recovery-checksums.types.d.ts +17 -0
- package/dist/application/recovery-checksums.types.js +2 -0
- package/dist/application/recovery-checksums.types.js.map +1 -0
- package/dist/application/recovery-inspection.d.ts +2 -0
- package/dist/application/recovery-inspection.js +32 -0
- package/dist/application/recovery-inspection.js.map +1 -0
- package/dist/application/recovery-inspection.types.d.ts +18 -0
- package/dist/application/recovery-inspection.types.js +2 -0
- package/dist/application/recovery-inspection.types.js.map +1 -0
- package/dist/application/recovery-restorability.d.ts +2 -0
- package/dist/application/recovery-restorability.js +137 -0
- package/dist/application/recovery-restorability.js.map +1 -0
- package/dist/application/recovery-restore-snapshot.d.ts +2 -0
- package/dist/application/recovery-restore-snapshot.js +57 -0
- package/dist/application/recovery-restore-snapshot.js.map +1 -0
- package/dist/application/recovery-restore.d.ts +3 -0
- package/dist/application/recovery-restore.js +161 -0
- package/dist/application/recovery-restore.js.map +1 -0
- package/dist/application/recovery-restore.types.d.ts +28 -0
- package/dist/application/recovery-restore.types.js +2 -0
- package/dist/application/recovery-restore.types.js.map +1 -0
- package/dist/application/recovery-retention-policy.d.ts +2 -0
- package/dist/application/recovery-retention-policy.js +21 -0
- package/dist/application/recovery-retention-policy.js.map +1 -0
- package/dist/application/recovery-retention.constants.d.ts +3 -0
- package/dist/application/recovery-retention.constants.js +2 -0
- package/dist/application/recovery-retention.constants.js.map +1 -0
- package/dist/application/recovery-retention.d.ts +4 -0
- package/dist/application/recovery-retention.js +207 -0
- package/dist/application/recovery-retention.js.map +1 -0
- package/dist/application/recovery-retention.types.d.ts +52 -0
- package/dist/application/recovery-retention.types.js +2 -0
- package/dist/application/recovery-retention.types.js.map +1 -0
- package/dist/application/recovery-verification.constants.d.ts +5 -0
- package/dist/application/recovery-verification.constants.js +10 -0
- package/dist/application/recovery-verification.constants.js.map +1 -0
- package/dist/application/recovery-verification.d.ts +3 -0
- package/dist/application/recovery-verification.js +107 -0
- package/dist/application/recovery-verification.js.map +1 -0
- package/dist/application/recovery-verification.types.d.ts +26 -0
- package/dist/application/recovery-verification.types.js +2 -0
- package/dist/application/recovery-verification.types.js.map +1 -0
- package/dist/application/remote-apply.js +30 -6
- package/dist/application/remote-apply.js.map +1 -1
- package/dist/application/remote-backup.js +6 -2
- package/dist/application/remote-backup.js.map +1 -1
- package/dist/application/remote-download.js +38 -6
- package/dist/application/remote-download.js.map +1 -1
- package/dist/application/remote-history.d.ts +6 -0
- package/dist/application/remote-history.js +114 -0
- package/dist/application/remote-history.js.map +1 -0
- package/dist/application/remote-upload.d.ts +2 -0
- package/dist/application/remote-upload.js +17 -0
- package/dist/application/remote-upload.js.map +1 -0
- package/dist/application/remote-validation.js +39 -28
- package/dist/application/remote-validation.js.map +1 -1
- package/dist/application/remote-workspace.constants.d.ts +3 -0
- package/dist/application/remote-workspace.constants.js +2 -0
- package/dist/application/remote-workspace.constants.js.map +1 -0
- package/dist/application/remote-workspace.js +10 -10
- package/dist/application/remote-workspace.js.map +1 -1
- package/dist/application/remote-workspace.types.d.ts +3 -1
- package/dist/application/remote-workspace.types.js.map +1 -1
- package/dist/application/sandbox-activity.d.ts +3 -0
- package/dist/application/sandbox-activity.js +25 -0
- package/dist/application/sandbox-activity.js.map +1 -0
- package/dist/application/sandbox-provision.js +55 -10
- package/dist/application/sandbox-provision.js.map +1 -1
- package/dist/application/sandbox-session.types.d.ts +2 -0
- package/dist/application/sandbox-session.types.js.map +1 -1
- package/dist/application/sandbox.js +33 -10
- package/dist/application/sandbox.js.map +1 -1
- package/dist/application/speculation-host.d.ts +2 -0
- package/dist/application/speculation-host.js +30 -0
- package/dist/application/speculation-host.js.map +1 -0
- package/dist/application/speculation.constants.d.ts +4 -0
- package/dist/application/speculation.constants.js +2 -0
- package/dist/application/speculation.constants.js.map +1 -0
- package/dist/application/speculation.d.ts +2 -0
- package/dist/application/speculation.js +166 -0
- package/dist/application/speculation.js.map +1 -0
- package/dist/application/speculation.types.d.ts +56 -0
- package/dist/application/speculation.types.js +2 -0
- package/dist/application/speculation.types.js.map +1 -0
- package/dist/application/storage-reservation.d.ts +3 -0
- package/dist/application/storage-reservation.js +10 -0
- package/dist/application/storage-reservation.js.map +1 -0
- package/dist/application/storage-reservation.types.d.ts +4 -0
- package/dist/application/storage-reservation.types.js +2 -0
- package/dist/application/storage-reservation.types.js.map +1 -0
- package/dist/application/task-usage.d.ts +4 -0
- package/dist/application/task-usage.js +41 -0
- package/dist/application/task-usage.js.map +1 -0
- package/dist/application/task-usage.types.d.ts +5 -0
- package/dist/application/task-usage.types.js +2 -0
- package/dist/application/task-usage.types.js.map +1 -0
- package/dist/application/tasks.js +23 -2
- package/dist/application/tasks.js.map +1 -1
- package/dist/application/tasks.types.d.ts +4 -3
- package/dist/application/tasks.types.js.map +1 -1
- package/dist/application/workspace-allocation.d.ts +3 -0
- package/dist/application/workspace-allocation.js +34 -0
- package/dist/application/workspace-allocation.js.map +1 -0
- package/dist/application/workspace.js +2 -2
- package/dist/application/workspace.js.map +1 -1
- package/dist/cli/commands.js +4 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/doctor-command.d.ts +3 -0
- package/dist/cli/doctor-command.js +38 -0
- package/dist/cli/doctor-command.js.map +1 -0
- package/dist/cli/main.constants.d.ts +38 -2
- package/dist/cli/main.constants.js +21 -2
- package/dist/cli/main.constants.js.map +1 -1
- package/dist/cli/recovery-command.d.ts +2 -0
- package/dist/cli/recovery-command.js +93 -0
- package/dist/cli/recovery-command.js.map +1 -0
- package/dist/cli/recovery-prune-command.d.ts +2 -0
- package/dist/cli/recovery-prune-command.js +34 -0
- package/dist/cli/recovery-prune-command.js.map +1 -0
- package/dist/cli/recovery-restore-command.d.ts +2 -0
- package/dist/cli/recovery-restore-command.js +34 -0
- package/dist/cli/recovery-restore-command.js.map +1 -0
- package/dist/cli/recovery-verify-command.d.ts +2 -0
- package/dist/cli/recovery-verify-command.js +43 -0
- package/dist/cli/recovery-verify-command.js.map +1 -0
- package/dist/cli/scaffold-files.js +2 -2
- package/dist/cli/scaffold-files.js.map +1 -1
- package/dist/cli/scaffold-validation.js +1 -1
- package/dist/cli/scaffold-validation.js.map +1 -1
- package/dist/cli/scaffold.constants.d.ts +5 -0
- package/dist/cli/scaffold.constants.js +7 -2
- package/dist/cli/scaffold.constants.js.map +1 -1
- package/dist/cli/scaffold.types.d.ts +1 -1
- package/dist/cli/scaffold.types.js.map +1 -1
- package/dist/domain/agent.types.d.ts +2 -0
- package/dist/domain/agent.types.js.map +1 -1
- package/dist/domain/artifact-reference.d.ts +4 -0
- package/dist/domain/artifact-reference.js +90 -0
- package/dist/domain/artifact-reference.js.map +1 -0
- package/dist/domain/artifact.constants.d.ts +2 -0
- package/dist/domain/artifact.constants.js +3 -0
- package/dist/domain/artifact.constants.js.map +1 -0
- package/dist/domain/artifact.d.ts +7 -0
- package/dist/domain/artifact.js +104 -0
- package/dist/domain/artifact.js.map +1 -0
- package/dist/domain/artifact.types.d.ts +44 -0
- package/dist/domain/artifact.types.js +2 -0
- package/dist/domain/artifact.types.js.map +1 -0
- package/dist/domain/egress.constants.d.ts +1 -0
- package/dist/domain/egress.constants.js +7 -0
- package/dist/domain/egress.constants.js.map +1 -0
- package/dist/domain/egress.d.ts +2 -0
- package/dist/domain/egress.js +48 -0
- package/dist/domain/egress.js.map +1 -0
- package/dist/domain/egress.types.d.ts +8 -0
- package/dist/domain/egress.types.js +2 -0
- package/dist/domain/egress.types.js.map +1 -0
- package/dist/domain/ports.d.ts +1 -1
- package/dist/domain/ports.js.map +1 -1
- package/dist/domain/sandbox.types.d.ts +13 -0
- package/dist/domain/sandbox.types.js.map +1 -1
- package/dist/domain/task-queue.constants.d.ts +8 -0
- package/dist/domain/task-queue.constants.js +9 -0
- package/dist/domain/task-queue.constants.js.map +1 -0
- package/dist/domain/task-queue.d.ts +11 -0
- package/dist/domain/task-queue.js +105 -0
- package/dist/domain/task-queue.js.map +1 -0
- package/dist/domain/task-queue.types.d.ts +41 -0
- package/dist/domain/task-queue.types.js +2 -0
- package/dist/domain/task-queue.types.js.map +1 -0
- package/dist/domain/workflow/budget.constants.d.ts +1 -0
- package/dist/domain/workflow/budget.constants.js +7 -0
- package/dist/domain/workflow/budget.constants.js.map +1 -0
- package/dist/domain/workflow/budget.d.ts +9 -0
- package/dist/domain/workflow/budget.js +69 -0
- package/dist/domain/workflow/budget.js.map +1 -0
- package/dist/domain/workflow/budget.types.d.ts +15 -0
- package/dist/domain/workflow/budget.types.js +2 -0
- package/dist/domain/workflow/budget.types.js.map +1 -0
- package/dist/domain/workflow/checkpoint-validation.d.ts +3 -0
- package/dist/domain/workflow/checkpoint-validation.js +81 -0
- package/dist/domain/workflow/checkpoint-validation.js.map +1 -0
- package/dist/domain/workflow/checkpoint-value.d.ts +2 -0
- package/dist/domain/workflow/checkpoint-value.js +49 -0
- package/dist/domain/workflow/checkpoint-value.js.map +1 -0
- package/dist/domain/workflow/checkpoint.d.ts +3 -0
- package/dist/domain/workflow/checkpoint.js +70 -0
- package/dist/domain/workflow/checkpoint.js.map +1 -0
- package/dist/domain/workflow/checkpoint.types.d.ts +40 -0
- package/dist/domain/workflow/checkpoint.types.js +2 -0
- package/dist/domain/workflow/checkpoint.types.js.map +1 -0
- package/dist/domain/workflow/gate-validation.d.ts +4 -0
- package/dist/domain/workflow/gate-validation.js +71 -0
- package/dist/domain/workflow/gate-validation.js.map +1 -0
- package/dist/domain/workflow/gates.constants.d.ts +4 -0
- package/dist/domain/workflow/gates.constants.js +5 -0
- package/dist/domain/workflow/gates.constants.js.map +1 -0
- package/dist/domain/workflow/gates.d.ts +7 -0
- package/dist/domain/workflow/gates.js +85 -0
- package/dist/domain/workflow/gates.js.map +1 -0
- package/dist/domain/workflow/gates.types.d.ts +27 -0
- package/dist/domain/workflow/gates.types.js +2 -0
- package/dist/domain/workflow/gates.types.js.map +1 -0
- package/dist/domain/workflow/task-runner.js +22 -3
- package/dist/domain/workflow/task-runner.js.map +1 -1
- package/dist/domain/workflow/usage-receipt.constants.d.ts +2 -0
- package/dist/domain/workflow/usage-receipt.constants.js +3 -0
- package/dist/domain/workflow/usage-receipt.constants.js.map +1 -0
- package/dist/domain/workflow/usage-receipt.d.ts +2 -0
- package/dist/domain/workflow/usage-receipt.js +18 -0
- package/dist/domain/workflow/usage-receipt.js.map +1 -0
- package/dist/domain/workflow/validation.js +6 -0
- package/dist/domain/workflow/validation.js.map +1 -1
- package/dist/domain/workflow/workflow-scheduler.js +68 -33
- package/dist/domain/workflow/workflow-scheduler.js.map +1 -1
- package/dist/domain/workflow/workflow-state.d.ts +2 -1
- package/dist/domain/workflow/workflow-state.js +107 -3
- package/dist/domain/workflow/workflow-state.js.map +1 -1
- package/dist/domain/workflow.d.ts +2 -0
- package/dist/domain/workflow.js +1 -0
- package/dist/domain/workflow.js.map +1 -1
- package/dist/domain/workflow.types.d.ts +23 -3
- package/dist/domain/workflow.types.js.map +1 -1
- package/dist/index.d.ts +44 -5
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/artifact-store.constants.d.ts +1 -0
- package/dist/infrastructure/artifact-store.constants.js +2 -0
- package/dist/infrastructure/artifact-store.constants.js.map +1 -0
- package/dist/infrastructure/artifact-store.d.ts +3 -0
- package/dist/infrastructure/artifact-store.js +100 -0
- package/dist/infrastructure/artifact-store.js.map +1 -0
- package/dist/infrastructure/artifact-store.types.d.ts +4 -0
- package/dist/infrastructure/artifact-store.types.js +2 -0
- package/dist/infrastructure/artifact-store.types.js.map +1 -0
- package/dist/infrastructure/file-manifest.d.ts +6 -0
- package/dist/infrastructure/file-manifest.js +92 -0
- package/dist/infrastructure/file-manifest.js.map +1 -0
- package/dist/infrastructure/git/lock-inspection.constants.d.ts +4 -0
- package/dist/infrastructure/git/lock-inspection.constants.js +5 -0
- package/dist/infrastructure/git/lock-inspection.constants.js.map +1 -0
- package/dist/infrastructure/git/lock-inspection.d.ts +3 -0
- package/dist/infrastructure/git/lock-inspection.js +64 -0
- package/dist/infrastructure/git/lock-inspection.js.map +1 -0
- package/dist/infrastructure/git/lock-inspection.types.d.ts +27 -0
- package/dist/infrastructure/git/lock-inspection.types.js +2 -0
- package/dist/infrastructure/git/lock-inspection.types.js.map +1 -0
- package/dist/infrastructure/git/lock.d.ts +1 -0
- package/dist/infrastructure/git/lock.js +70 -29
- package/dist/infrastructure/git/lock.js.map +1 -1
- package/dist/infrastructure/git/process-identity.d.ts +3 -0
- package/dist/infrastructure/git/process-identity.js +73 -0
- package/dist/infrastructure/git/process-identity.js.map +1 -0
- package/dist/infrastructure/git/process-identity.types.d.ts +10 -0
- package/dist/infrastructure/git/process-identity.types.js +2 -0
- package/dist/infrastructure/git/process-identity.types.js.map +1 -0
- package/dist/infrastructure/git/verification-command.d.ts +1 -0
- package/dist/infrastructure/git/verification-command.js +37 -0
- package/dist/infrastructure/git/verification-command.js.map +1 -0
- package/dist/infrastructure/git/workspace-lease.js +1 -0
- package/dist/infrastructure/git/workspace-lease.js.map +1 -1
- package/dist/infrastructure/git/workspace.js +5 -1
- package/dist/infrastructure/git/workspace.js.map +1 -1
- package/dist/infrastructure/git/worktree-inspection.constants.d.ts +5 -0
- package/dist/infrastructure/git/worktree-inspection.constants.js +16 -0
- package/dist/infrastructure/git/worktree-inspection.constants.js.map +1 -0
- package/dist/infrastructure/git/worktree-inspection.d.ts +3 -0
- package/dist/infrastructure/git/worktree-inspection.js +120 -0
- package/dist/infrastructure/git/worktree-inspection.js.map +1 -0
- package/dist/infrastructure/git/worktree-inspection.types.d.ts +19 -0
- package/dist/infrastructure/git/worktree-inspection.types.js +2 -0
- package/dist/infrastructure/git/worktree-inspection.types.js.map +1 -0
- package/dist/infrastructure/inspection-file.constants.d.ts +1 -0
- package/dist/infrastructure/inspection-file.constants.js +5 -0
- package/dist/infrastructure/inspection-file.constants.js.map +1 -0
- package/dist/infrastructure/inspection-file.d.ts +1 -0
- package/dist/infrastructure/inspection-file.js +43 -0
- package/dist/infrastructure/inspection-file.js.map +1 -0
- package/dist/infrastructure/inspection-hash.constants.d.ts +1 -0
- package/dist/infrastructure/inspection-hash.constants.js +2 -0
- package/dist/infrastructure/inspection-hash.constants.js.map +1 -0
- package/dist/infrastructure/inspection-hash.d.ts +2 -0
- package/dist/infrastructure/inspection-hash.js +62 -0
- package/dist/infrastructure/inspection-hash.js.map +1 -0
- package/dist/infrastructure/inspection-hash.types.d.ts +5 -0
- package/dist/infrastructure/inspection-hash.types.js +2 -0
- package/dist/infrastructure/inspection-hash.types.js.map +1 -0
- package/dist/infrastructure/journal-retention.constants.d.ts +4 -0
- package/dist/infrastructure/journal-retention.constants.js +5 -0
- package/dist/infrastructure/journal-retention.constants.js.map +1 -0
- package/dist/infrastructure/journal-retention.d.ts +2 -0
- package/dist/infrastructure/journal-retention.js +51 -0
- package/dist/infrastructure/journal-retention.js.map +1 -0
- package/dist/infrastructure/journal.js +37 -13
- package/dist/infrastructure/journal.js.map +1 -1
- package/dist/infrastructure/opentelemetry.constants.d.ts +10 -0
- package/dist/infrastructure/opentelemetry.constants.js +11 -0
- package/dist/infrastructure/opentelemetry.constants.js.map +1 -0
- package/dist/infrastructure/opentelemetry.d.ts +3 -0
- package/dist/infrastructure/opentelemetry.js +131 -0
- package/dist/infrastructure/opentelemetry.js.map +1 -0
- package/dist/infrastructure/opentelemetry.types.d.ts +21 -0
- package/dist/infrastructure/opentelemetry.types.js +2 -0
- package/dist/infrastructure/opentelemetry.types.js.map +1 -0
- package/dist/infrastructure/resource-activity-inspection.d.ts +2 -0
- package/dist/infrastructure/resource-activity-inspection.js +152 -0
- package/dist/infrastructure/resource-activity-inspection.js.map +1 -0
- package/dist/infrastructure/resource-activity.constants.d.ts +8 -0
- package/dist/infrastructure/resource-activity.constants.js +26 -0
- package/dist/infrastructure/resource-activity.constants.js.map +1 -0
- package/dist/infrastructure/resource-activity.d.ts +2 -0
- package/dist/infrastructure/resource-activity.js +166 -0
- package/dist/infrastructure/resource-activity.js.map +1 -0
- package/dist/infrastructure/resource-activity.types.d.ts +53 -0
- package/dist/infrastructure/resource-activity.types.js +2 -0
- package/dist/infrastructure/resource-activity.types.js.map +1 -0
- package/dist/infrastructure/storage-inventory.constants.d.ts +6 -0
- package/dist/infrastructure/storage-inventory.constants.js +11 -0
- package/dist/infrastructure/storage-inventory.constants.js.map +1 -0
- package/dist/infrastructure/storage-inventory.d.ts +2 -0
- package/dist/infrastructure/storage-inventory.js +123 -0
- package/dist/infrastructure/storage-inventory.js.map +1 -0
- package/dist/infrastructure/storage-inventory.types.d.ts +38 -0
- package/dist/infrastructure/storage-inventory.types.js +2 -0
- package/dist/infrastructure/storage-inventory.types.js.map +1 -0
- package/dist/infrastructure/storage-mutation-lock.constants.d.ts +5 -0
- package/dist/infrastructure/storage-mutation-lock.constants.js +6 -0
- package/dist/infrastructure/storage-mutation-lock.constants.js.map +1 -0
- package/dist/infrastructure/storage-mutation-lock.d.ts +1 -0
- package/dist/infrastructure/storage-mutation-lock.js +21 -0
- package/dist/infrastructure/storage-mutation-lock.js.map +1 -0
- package/dist/infrastructure/storage-reservations.constants.d.ts +4 -0
- package/dist/infrastructure/storage-reservations.constants.js +5 -0
- package/dist/infrastructure/storage-reservations.constants.js.map +1 -0
- package/dist/infrastructure/storage-reservations.d.ts +2 -0
- package/dist/infrastructure/storage-reservations.js +150 -0
- package/dist/infrastructure/storage-reservations.js.map +1 -0
- package/dist/infrastructure/storage-reservations.types.d.ts +21 -0
- package/dist/infrastructure/storage-reservations.types.js +2 -0
- package/dist/infrastructure/storage-reservations.types.js.map +1 -0
- package/dist/infrastructure/task-queue-http.constants.d.ts +2 -0
- package/dist/infrastructure/task-queue-http.constants.js +3 -0
- package/dist/infrastructure/task-queue-http.constants.js.map +1 -0
- package/dist/infrastructure/task-queue-http.d.ts +4 -0
- package/dist/infrastructure/task-queue-http.js +158 -0
- package/dist/infrastructure/task-queue-http.js.map +1 -0
- package/dist/infrastructure/task-queue-http.types.d.ts +16 -0
- package/dist/infrastructure/task-queue-http.types.js +2 -0
- package/dist/infrastructure/task-queue-http.types.js.map +1 -0
- package/dist/infrastructure/task-queue.d.ts +2 -0
- package/dist/infrastructure/task-queue.js +134 -0
- package/dist/infrastructure/task-queue.js.map +1 -0
- package/dist/infrastructure/transfer.js +17 -0
- package/dist/infrastructure/transfer.js.map +1 -1
- package/dist/infrastructure/workflow-checkpoint.constants.d.ts +1 -0
- package/dist/infrastructure/workflow-checkpoint.constants.js +2 -0
- package/dist/infrastructure/workflow-checkpoint.constants.js.map +1 -0
- package/dist/infrastructure/workflow-checkpoint.d.ts +3 -0
- package/dist/infrastructure/workflow-checkpoint.js +77 -0
- package/dist/infrastructure/workflow-checkpoint.js.map +1 -0
- package/dist/infrastructure/workflow-checkpoint.types.d.ts +4 -0
- package/dist/infrastructure/workflow-checkpoint.types.js +2 -0
- package/dist/infrastructure/workflow-checkpoint.types.js.map +1 -0
- package/dist/providers/agents.d.ts +2 -0
- package/dist/providers/agents.js +1 -0
- package/dist/providers/agents.js.map +1 -1
- package/dist/providers/cloud.constants.d.ts +1 -0
- package/dist/providers/cloud.constants.js +1 -0
- package/dist/providers/cloud.constants.js.map +1 -1
- package/dist/providers/container-cache.constants.d.ts +11 -0
- package/dist/providers/container-cache.constants.js +9 -0
- package/dist/providers/container-cache.constants.js.map +1 -0
- package/dist/providers/container-cache.d.ts +4 -0
- package/dist/providers/container-cache.js +48 -0
- package/dist/providers/container-cache.js.map +1 -0
- package/dist/providers/container-cache.types.d.ts +8 -0
- package/dist/providers/container-cache.types.js +2 -0
- package/dist/providers/container-cache.types.js.map +1 -0
- package/dist/providers/container-isolation.d.ts +2 -0
- package/dist/providers/container-isolation.js +29 -0
- package/dist/providers/container-isolation.js.map +1 -0
- package/dist/providers/container-mounts.js +7 -2
- package/dist/providers/container-mounts.js.map +1 -1
- package/dist/providers/container-network.d.ts +2 -0
- package/dist/providers/container-network.js +14 -0
- package/dist/providers/container-network.js.map +1 -0
- package/dist/providers/container-plan.js +6 -2
- package/dist/providers/container-plan.js.map +1 -1
- package/dist/providers/container.constants.d.ts +1 -0
- package/dist/providers/container.constants.js +1 -0
- package/dist/providers/container.constants.js.map +1 -1
- package/dist/providers/container.js +50 -3
- package/dist/providers/container.js.map +1 -1
- package/dist/providers/container.types.d.ts +5 -0
- package/dist/providers/container.types.js.map +1 -1
- package/dist/providers/daytona-command.js +10 -6
- package/dist/providers/daytona-command.js.map +1 -1
- package/dist/providers/daytona-terminal.d.ts +3 -0
- package/dist/providers/daytona-terminal.js +128 -0
- package/dist/providers/daytona-terminal.js.map +1 -0
- package/dist/providers/daytona.js +15 -4
- package/dist/providers/daytona.js.map +1 -1
- package/dist/providers/diagnostic-container.d.ts +4 -0
- package/dist/providers/diagnostic-container.js +15 -0
- package/dist/providers/diagnostic-container.js.map +1 -0
- package/dist/providers/docker.d.ts +2 -0
- package/dist/providers/docker.js.map +1 -1
- package/dist/providers/file-batches.constants.d.ts +10 -0
- package/dist/providers/file-batches.constants.js +57 -0
- package/dist/providers/file-batches.constants.js.map +1 -0
- package/dist/providers/file-batches.d.ts +2 -0
- package/dist/providers/file-batches.js +160 -0
- package/dist/providers/file-batches.js.map +1 -0
- package/dist/providers/file-upload.constants.d.ts +1 -0
- package/dist/providers/file-upload.constants.js +68 -0
- package/dist/providers/file-upload.constants.js.map +1 -0
- package/dist/providers/file-upload.d.ts +2 -0
- package/dist/providers/file-upload.js +146 -0
- package/dist/providers/file-upload.js.map +1 -0
- package/dist/providers/firecracker-command.d.ts +5 -0
- package/dist/providers/firecracker-command.js +114 -0
- package/dist/providers/firecracker-command.js.map +1 -0
- package/dist/providers/firecracker-files.constants.d.ts +1 -0
- package/dist/providers/firecracker-files.constants.js +21 -0
- package/dist/providers/firecracker-files.constants.js.map +1 -0
- package/dist/providers/firecracker-files.d.ts +3 -0
- package/dist/providers/firecracker-files.js +110 -0
- package/dist/providers/firecracker-files.js.map +1 -0
- package/dist/providers/firecracker-machine.d.ts +3 -0
- package/dist/providers/firecracker-machine.js +155 -0
- package/dist/providers/firecracker-machine.js.map +1 -0
- package/dist/providers/firecracker.constants.d.ts +10 -0
- package/dist/providers/firecracker.constants.js +11 -0
- package/dist/providers/firecracker.constants.js.map +1 -0
- package/dist/providers/firecracker.d.ts +4 -0
- package/dist/providers/firecracker.js +103 -0
- package/dist/providers/firecracker.js.map +1 -0
- package/dist/providers/firecracker.types.d.ts +36 -0
- package/dist/providers/firecracker.types.js +2 -0
- package/dist/providers/firecracker.types.js.map +1 -0
- package/dist/providers/local.js +2 -1
- package/dist/providers/local.js.map +1 -1
- package/dist/providers/podman.d.ts +2 -0
- package/dist/providers/podman.js.map +1 -1
- package/dist/providers/terminal-bridge.d.ts +14 -0
- package/dist/providers/terminal-bridge.js +100 -0
- package/dist/providers/terminal-bridge.js.map +1 -0
- package/dist/providers/vercel-directory.d.ts +2 -0
- package/dist/providers/vercel-directory.js +7 -0
- package/dist/providers/vercel-directory.js.map +1 -0
- package/dist/providers/vercel-files.js +3 -2
- package/dist/providers/vercel-files.js.map +1 -1
- package/dist/providers/vercel-network.d.ts +2 -0
- package/dist/providers/vercel-network.js +18 -0
- package/dist/providers/vercel-network.js.map +1 -0
- package/dist/providers/vercel.d.ts +1 -0
- package/dist/providers/vercel.js +8 -2
- package/dist/providers/vercel.js.map +1 -1
- package/dist/providers/vercel.types.d.ts +2 -0
- package/dist/providers/vercel.types.js.map +1 -1
- package/dist/providers/versions.constants.d.ts +1 -0
- package/dist/providers/versions.constants.js +1 -0
- package/dist/providers/versions.constants.js.map +1 -1
- package/package.json +16 -1
|
@@ -0,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,IAAI,OAAO,CAAC,MAAM,EAAE,OAAO;YAAE,OAAO,SAAS,CAAC;QAC9C,IAAI,WAAW,KAAK,SAAS;YAAE,OAAO,kBAAkB,CAAC;QACzD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,MAAM,uBAAuB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CACjE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACV,MAAM;QACN,KAAK;QACL,OAAO,EACL,MAAM,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW;YACxC,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;KACjC,CAAC,EACF,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CACvD,CAAC;IACF,OAAO;QACL,EAAE;QACF,QAAQ;QACR,IAAI;QACJ,MAAM;QACN,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE;QAC5B,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport { invariant, recoveryDetails } from \"../domain/errors.ts\";\nimport { workflowAccounting } from \"../domain/workflow/budget.ts\";\nimport { speculativeHostSnapshot } from \"./speculation-host.ts\";\nimport type { Sandbox } from \"./outpost.types.ts\";\nimport { createSandbox } from \"./sandbox.ts\";\nimport { speculationLimits } from \"./speculation.constants.ts\";\nimport type {\n SpeculationOptions,\n SpeculationResult,\n SpeculativeCandidateResult,\n SpeculativeOutput,\n} from \"./speculation.types.ts\";\nimport { taskUsage } from \"./task-usage.ts\";\n\nexport async function speculate<T = undefined>(\n options: SpeculationOptions<T>,\n): Promise<SpeculationResult<T>> {\n const { candidates } = options;\n invariant(\n candidates.length > 0 && candidates.length <= speculationLimits.candidates,\n `Speculation requires 1 to ${speculationLimits.candidates} candidates`,\n );\n invariant(\n new Set(candidates.map((candidate) => candidate.key)).size ===\n candidates.length &&\n candidates.every((candidate) =>\n /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(candidate.key),\n ),\n \"Speculative candidate keys must be unique simple names of 1 to 64 characters\",\n );\n const concurrency = options.concurrency ?? speculationLimits.concurrency;\n invariant(\n Number.isSafeInteger(concurrency) &&\n concurrency > 0 &&\n concurrency <= speculationLimits.candidates,\n `Speculation concurrency must be 1 to ${speculationLimits.candidates}`,\n );\n const stop = new AbortController();\n const signal = options.signal\n ? AbortSignal.any([options.signal, stop.signal])\n : stop.signal;\n let budgetError: unknown;\n const accounting = workflowAccounting(options.budget, (error) => {\n budgetError = error;\n // Attempt limits stop admissions; already admitted candidates may finish.\n if (error.dimension !== \"attempts\") stop.abort(error);\n });\n const before = await speculativeHostSnapshot(options.repository);\n const baseline = before.head;\n const id = randomUUID();\n const records: SpeculativeCandidateResult<T>[] = candidates.map(\n (candidate) => ({\n key: candidate.key,\n branch: `outpost/speculation/${id}/${candidate.key}`,\n status: \"skipped\",\n }),\n );\n let winner: SpeculativeCandidateResult<T> | undefined;\n let next = 0;\n async function worker(): Promise<void> {\n while (!signal.aborted && !winner && !accounting.exhausted) {\n const index = next++;\n const candidate = candidates[index];\n if (!candidate) return;\n try {\n accounting.admit();\n } catch {\n return;\n }\n const initial = records[index]!;\n let sandbox: Sandbox | undefined;\n let result: SpeculativeOutput<T> | undefined;\n let error: unknown;\n let accepted = false;\n let cleanupFailed = false;\n let retainedDirectory: string | undefined;\n const usage = taskUsage(\n { reportUsage: (value) => accounting.report(value) },\n candidate.request.observe,\n );\n try {\n sandbox = await createSandbox({\n ...options.sandbox,\n repository: options.repository,\n provider: options.provider,\n branch: { mode: \"named\", name: initial.branch, from: baseline },\n agent: candidate.agent,\n signal,\n });\n signal.throwIfAborted();\n invariant(\n sandbox.workspace.baseline === baseline,\n \"Speculative workspace does not match the pinned baseline\",\n );\n const {\n resume: _resume,\n fork: _fork,\n ...output\n } = await sandbox.dispatch({\n ...candidate.request,\n signal,\n observe: usage.observe,\n });\n result = output;\n usage.reconcile(output.usage);\n signal.throwIfAborted();\n accepted = await options.validate({\n key: candidate.key,\n result,\n sandbox,\n signal,\n });\n signal.throwIfAborted();\n } catch (cause) {\n error = cause;\n }\n if (sandbox) {\n try {\n const disposal = await sandbox.close({\n preserve: error !== undefined,\n });\n retainedDirectory = disposal.retainedDirectory;\n } catch (cause) {\n cleanupFailed = true;\n error =\n error === undefined\n ? cause\n : new AggregateError(\n [error, cause],\n \"Speculative execution and cleanup failed\",\n );\n retainedDirectory = sandbox.workspace.directory;\n }\n }\n const recovery = recoveryDetails(error);\n const recoveredDirectory =\n typeof recovery?.directory === \"string\"\n ? recovery.directory\n : undefined;\n const directory = sandbox?.workspace.directory ?? recoveredDirectory;\n retainedDirectory ??= recoveredDirectory;\n function candidateStatus(): SpeculativeCandidateResult<T>[\"status\"] {\n if (cleanupFailed) return \"failed\";\n if (signal.aborted) return \"cancelled\";\n if (error !== undefined) return \"failed\";\n if (accepted && !winner) return \"winner\";\n return \"rejected\";\n }\n const status = candidateStatus();\n const record: SpeculativeCandidateResult<T> = {\n ...initial,\n status,\n ...(directory ? { directory } : {}),\n ...(retainedDirectory ? { retainedDirectory } : {}),\n ...(result ? { result } : {}),\n ...(error !== undefined ? { error } : {}),\n };\n records[index] = record;\n if (status === \"winner\") {\n winner = record;\n stop.abort(\n new Error(`Speculative candidate ${candidate.key} selected`),\n );\n }\n }\n }\n await Promise.all(\n Array.from({ length: Math.min(concurrency, candidates.length) }, worker),\n );\n function outcome(): SpeculationResult<T>[\"status\"] {\n if (winner) return \"winner\";\n if (options.signal?.aborted) return \"aborted\";\n if (budgetError !== undefined) return \"budget-exhausted\";\n return \"no-winner\";\n }\n const status = outcome();\n const host = await speculativeHostSnapshot(options.repository).then(\n (after) => ({\n before,\n after,\n changed:\n before.fingerprint !== after.fingerprint ||\n before.branch !== after.branch,\n }),\n (error: unknown) => ({ before, changed: true, error }),\n );\n return {\n id,\n baseline,\n host,\n status,\n candidates: records,\n usage: accounting.snapshot(),\n ...(winner ? { winner } : {}),\n ...(budgetError !== undefined ? { error: budgetError } : {}),\n };\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { AgentAdapter } from "../domain/agent.types.ts";
|
|
2
|
+
import type { WorkflowBudget, WorkflowUsage } from "../domain/workflow/budget.types.ts";
|
|
3
|
+
import type { DispatchOptions } from "./execution.types.ts";
|
|
4
|
+
import type { Sandbox, SandboxOptions, WarmDispatchResult } from "./outpost.types.ts";
|
|
5
|
+
export interface SpeculativeCandidate<T = undefined> {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly agent: AgentAdapter;
|
|
8
|
+
readonly request: Omit<DispatchOptions<T>, "agent" | "signal" | "continuation">;
|
|
9
|
+
}
|
|
10
|
+
export type SpeculativeOutput<T> = Omit<WarmDispatchResult<T>, "resume" | "fork">;
|
|
11
|
+
export interface SpeculativeValidation<T> {
|
|
12
|
+
readonly key: string;
|
|
13
|
+
readonly result: SpeculativeOutput<T>;
|
|
14
|
+
readonly sandbox: Sandbox;
|
|
15
|
+
readonly signal: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
export interface SpeculationOptions<T = undefined> {
|
|
18
|
+
readonly repository: string;
|
|
19
|
+
readonly provider: NonNullable<SandboxOptions["provider"]>;
|
|
20
|
+
readonly candidates: readonly SpeculativeCandidate<T>[];
|
|
21
|
+
readonly concurrency?: number;
|
|
22
|
+
readonly budget: WorkflowBudget;
|
|
23
|
+
readonly signal?: AbortSignal;
|
|
24
|
+
readonly sandbox?: Pick<SandboxOptions, "hooks" | "bootstrap" | "logging" | "limits" | "storageQuota" | "conversationHome">;
|
|
25
|
+
readonly validate: (candidate: SpeculativeValidation<T>) => boolean | Promise<boolean>;
|
|
26
|
+
}
|
|
27
|
+
export interface SpeculativeCandidateResult<T = undefined> {
|
|
28
|
+
readonly key: string;
|
|
29
|
+
readonly branch: string;
|
|
30
|
+
readonly status: "winner" | "rejected" | "failed" | "cancelled" | "skipped";
|
|
31
|
+
readonly directory?: string;
|
|
32
|
+
readonly retainedDirectory?: string;
|
|
33
|
+
readonly result?: SpeculativeOutput<T>;
|
|
34
|
+
readonly error?: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface SpeculationResult<T = undefined> {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly baseline: string;
|
|
39
|
+
readonly host: {
|
|
40
|
+
readonly before: SpeculativeHostSnapshot;
|
|
41
|
+
readonly after?: SpeculativeHostSnapshot;
|
|
42
|
+
readonly changed: boolean;
|
|
43
|
+
readonly error?: unknown;
|
|
44
|
+
};
|
|
45
|
+
readonly status: "winner" | "no-winner" | "aborted" | "budget-exhausted";
|
|
46
|
+
readonly winner?: SpeculativeCandidateResult<T>;
|
|
47
|
+
readonly candidates: readonly SpeculativeCandidateResult<T>[];
|
|
48
|
+
readonly usage: WorkflowUsage;
|
|
49
|
+
readonly error?: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface SpeculativeHostSnapshot {
|
|
52
|
+
readonly head: string;
|
|
53
|
+
readonly branch: string;
|
|
54
|
+
readonly fingerprint: string;
|
|
55
|
+
readonly dirty: boolean;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speculation.types.js","sourceRoot":"","sources":["../../src/application/speculation.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAdapter } from \"../domain/agent.types.ts\";\nimport type {\n WorkflowBudget,\n WorkflowUsage,\n} from \"../domain/workflow/budget.types.ts\";\nimport type { DispatchOptions } from \"./execution.types.ts\";\nimport type {\n Sandbox,\n SandboxOptions,\n WarmDispatchResult,\n} from \"./outpost.types.ts\";\n\nexport interface SpeculativeCandidate<T = undefined> {\n readonly key: string;\n readonly agent: AgentAdapter;\n readonly request: Omit<\n DispatchOptions<T>,\n \"agent\" | \"signal\" | \"continuation\"\n >;\n}\n\nexport type SpeculativeOutput<T> = Omit<\n WarmDispatchResult<T>,\n \"resume\" | \"fork\"\n>;\n\nexport interface SpeculativeValidation<T> {\n readonly key: string;\n readonly result: SpeculativeOutput<T>;\n readonly sandbox: Sandbox;\n readonly signal: AbortSignal;\n}\n\nexport interface SpeculationOptions<T = undefined> {\n readonly repository: string;\n readonly provider: NonNullable<SandboxOptions[\"provider\"]>;\n readonly candidates: readonly SpeculativeCandidate<T>[];\n readonly concurrency?: number;\n readonly budget: WorkflowBudget;\n readonly signal?: AbortSignal;\n readonly sandbox?: Pick<\n SandboxOptions,\n | \"hooks\"\n | \"bootstrap\"\n | \"logging\"\n | \"limits\"\n | \"storageQuota\"\n | \"conversationHome\"\n >;\n readonly validate: (\n candidate: SpeculativeValidation<T>,\n ) => boolean | Promise<boolean>;\n}\n\nexport interface SpeculativeCandidateResult<T = undefined> {\n readonly key: string;\n readonly branch: string;\n readonly status: \"winner\" | \"rejected\" | \"failed\" | \"cancelled\" | \"skipped\";\n readonly directory?: string;\n readonly retainedDirectory?: string;\n readonly result?: SpeculativeOutput<T>;\n readonly error?: unknown;\n}\n\nexport interface SpeculationResult<T = undefined> {\n readonly id: string;\n readonly baseline: string;\n readonly host: {\n readonly before: SpeculativeHostSnapshot;\n readonly after?: SpeculativeHostSnapshot;\n readonly changed: boolean;\n readonly error?: unknown;\n };\n readonly status: \"winner\" | \"no-winner\" | \"aborted\" | \"budget-exhausted\";\n readonly winner?: SpeculativeCandidateResult<T>;\n readonly candidates: readonly SpeculativeCandidateResult<T>[];\n readonly usage: WorkflowUsage;\n readonly error?: unknown;\n}\n\nexport interface SpeculativeHostSnapshot {\n readonly head: string;\n readonly branch: string;\n readonly fingerprint: string;\n readonly dirty: boolean;\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StorageReservation } from "../infrastructure/storage-reservations.types.ts";
|
|
2
|
+
import type { RecoveryStorageReservationOptions } from "./storage-reservation.types.ts";
|
|
3
|
+
export declare function reserveRecoveryStorage(options: RecoveryStorageReservationOptions): Promise<StorageReservation>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { directory } from "../infrastructure/files.js";
|
|
2
|
+
import { git } from "../infrastructure/git/command.js";
|
|
3
|
+
import { reserveStorage } from "../infrastructure/storage-reservations.js";
|
|
4
|
+
export async function reserveRecoveryStorage(options) {
|
|
5
|
+
options.signal?.throwIfAborted();
|
|
6
|
+
const requested = await directory(options.repository);
|
|
7
|
+
const root = await directory((await git(requested, ["rev-parse", "--show-toplevel"])).trim());
|
|
8
|
+
return reserveStorage(root, options);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=storage-reservation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-reservation.js","sourceRoot":"","sources":["../../src/application/storage-reservation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAI3E,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAA0C;IAE1C,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,MAAM,SAAS,CAC1B,CAAC,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAChE,CAAC;IACF,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { directory } from \"../infrastructure/files.ts\";\nimport { git } from \"../infrastructure/git/command.ts\";\nimport { reserveStorage } from \"../infrastructure/storage-reservations.ts\";\nimport type { StorageReservation } from \"../infrastructure/storage-reservations.types.ts\";\nimport type { RecoveryStorageReservationOptions } from \"./storage-reservation.types.ts\";\n\nexport async function reserveRecoveryStorage(\n options: RecoveryStorageReservationOptions,\n): Promise<StorageReservation> {\n options.signal?.throwIfAborted();\n const requested = await directory(options.repository);\n const root = await directory(\n (await git(requested, [\"rev-parse\", \"--show-toplevel\"])).trim(),\n );\n return reserveStorage(root, options);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-reservation.types.js","sourceRoot":"","sources":["../../src/application/storage-reservation.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StorageReservationOptions } from \"../infrastructure/storage-reservations.types.ts\";\n\nexport interface RecoveryStorageReservationOptions extends StorageReservationOptions {\n readonly repository?: string;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentObservation } from "../domain/agent.types.ts";
|
|
2
|
+
import type { TaskContext } from "../domain/workflow.types.ts";
|
|
3
|
+
import type { TaskUsageObserver } from "./task-usage.types.ts";
|
|
4
|
+
export declare function taskUsage(context: Pick<TaskContext, "reportUsage">, observer: ((event: AgentObservation) => void) | undefined): TaskUsageObserver;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { addUsage } from "../domain/usage.js";
|
|
2
|
+
import { notify } from "./observation.js";
|
|
3
|
+
export function taskUsage(context, observer) {
|
|
4
|
+
const passes = new Map();
|
|
5
|
+
let total = { input: 0, cached: 0, output: 0 };
|
|
6
|
+
function difference(next, previous) {
|
|
7
|
+
return {
|
|
8
|
+
input: Math.max(0, next.input - previous.input),
|
|
9
|
+
cached: Math.max(0, next.cached - previous.cached),
|
|
10
|
+
output: Math.max(0, next.output - previous.output),
|
|
11
|
+
cacheCreated: Math.max(0, (next.cacheCreated ?? 0) - (previous.cacheCreated ?? 0)),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function report(usage) {
|
|
15
|
+
if (!Object.values(usage).some((value) => value > 0))
|
|
16
|
+
return;
|
|
17
|
+
total = addUsage(total, usage);
|
|
18
|
+
context.reportUsage(usage);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
observe(event) {
|
|
22
|
+
if (event.kind === "usage" || event.kind === "summary") {
|
|
23
|
+
const previous = passes.get(event.pass) ?? {
|
|
24
|
+
input: 0,
|
|
25
|
+
cached: 0,
|
|
26
|
+
output: 0,
|
|
27
|
+
};
|
|
28
|
+
const delta = event.kind === "usage"
|
|
29
|
+
? event.tokens
|
|
30
|
+
: difference(event.tokens, previous);
|
|
31
|
+
passes.set(event.pass, addUsage(previous, delta));
|
|
32
|
+
report(delta);
|
|
33
|
+
}
|
|
34
|
+
notify(observer, event);
|
|
35
|
+
},
|
|
36
|
+
reconcile(usage) {
|
|
37
|
+
report(difference(usage, total));
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=task-usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-usage.js","sourceRoot":"","sources":["../../src/application/task-usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,UAAU,SAAS,CACvB,OAAyC,EACzC,QAAyD;IAEzD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAiB,CAAC;IACxC,IAAI,KAAK,GAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACtD,SAAS,UAAU,CAAC,IAAW,EAAE,QAAe;QAC9C,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,GAAG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,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;gBAClD,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC;YACD,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC1B,CAAC;QACD,SAAS,CAAC,KAAK;YACb,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { AgentObservation, Usage } from \"../domain/agent.types.ts\";\nimport { addUsage } from \"../domain/usage.ts\";\nimport type { TaskContext } from \"../domain/workflow.types.ts\";\nimport { notify } from \"./observation.ts\";\nimport type { TaskUsageObserver } from \"./task-usage.types.ts\";\n\nexport function taskUsage(\n context: Pick<TaskContext, \"reportUsage\">,\n observer: ((event: AgentObservation) => void) | undefined,\n): TaskUsageObserver {\n const passes = new Map<number, Usage>();\n let total: Usage = { input: 0, cached: 0, output: 0 };\n function difference(next: Usage, previous: Usage): Usage {\n return {\n input: Math.max(0, next.input - previous.input),\n cached: Math.max(0, next.cached - previous.cached),\n output: Math.max(0, next.output - previous.output),\n cacheCreated: Math.max(\n 0,\n (next.cacheCreated ?? 0) - (previous.cacheCreated ?? 0),\n ),\n };\n }\n function report(usage: Usage): void {\n if (!Object.values(usage).some((value) => value > 0)) return;\n total = addUsage(total, usage);\n context.reportUsage(usage);\n }\n return {\n observe(event) {\n if (event.kind === \"usage\" || event.kind === \"summary\") {\n const previous = passes.get(event.pass) ?? {\n input: 0,\n cached: 0,\n output: 0,\n };\n const delta =\n event.kind === \"usage\"\n ? event.tokens\n : difference(event.tokens, previous);\n passes.set(event.pass, addUsage(previous, delta));\n report(delta);\n }\n notify(observer, event);\n },\n reconcile(usage) {\n report(difference(usage, total));\n },\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-usage.types.js","sourceRoot":"","sources":["../../src/application/task-usage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentObservation, Usage } from \"../domain/agent.types.ts\";\nexport interface TaskUsageObserver {\n observe(event: AgentObservation): void;\n reconcile(usage: Usage): void;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { taskUsage } from "./task-usage.js";
|
|
1
2
|
import { OutpostError } from "../domain/errors.js";
|
|
2
3
|
import { task } from "../domain/workflow.js";
|
|
3
4
|
import { dispatch } from "./outpost.js";
|
|
@@ -5,14 +6,34 @@ export function agentTask(options) {
|
|
|
5
6
|
const { sandbox, request, ...definition } = options;
|
|
6
7
|
return task({
|
|
7
8
|
...definition,
|
|
8
|
-
perform
|
|
9
|
+
async perform(context) {
|
|
10
|
+
const options = request(context);
|
|
11
|
+
const usage = taskUsage(context, options.observe);
|
|
12
|
+
const result = await sandbox.dispatch({
|
|
13
|
+
...options,
|
|
14
|
+
signal: context.signal,
|
|
15
|
+
observe: usage.observe,
|
|
16
|
+
});
|
|
17
|
+
usage.reconcile(result.usage);
|
|
18
|
+
return result;
|
|
19
|
+
},
|
|
9
20
|
});
|
|
10
21
|
}
|
|
11
22
|
export function isolatedTask(options) {
|
|
12
23
|
const { request, ...definition } = options;
|
|
13
24
|
return task({
|
|
14
25
|
...definition,
|
|
15
|
-
perform
|
|
26
|
+
async perform(context) {
|
|
27
|
+
const options = await request(context);
|
|
28
|
+
const usage = taskUsage(context, options.observe);
|
|
29
|
+
const result = await dispatch({
|
|
30
|
+
...options,
|
|
31
|
+
signal: context.signal,
|
|
32
|
+
observe: usage.observe,
|
|
33
|
+
});
|
|
34
|
+
usage.reconcile(result.usage);
|
|
35
|
+
return result;
|
|
36
|
+
},
|
|
16
37
|
});
|
|
17
38
|
}
|
|
18
39
|
export function commandTask(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/application/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAq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../domain/errors.ts\";\nimport type { CommandResult } from \"../domain/ports.ts\";\nimport { task, type Task, type TaskOptions } from \"../domain/workflow.ts\";\nimport type { DispatchResult } from \"./outpost.ts\";\nimport { dispatch } from \"./outpost.ts\";\nimport type {\n AgentTaskOptions,\n CommandTaskOptions,\n IsolatedTaskOptions,\n} from \"./tasks.types.ts\";\n\nexport function agentTask<T>(\n options: Omit<TaskOptions<DispatchResult<T>>, \"perform\"> &\n AgentTaskOptions<T>,\n): Task<DispatchResult<T>> {\n const { sandbox, request, ...definition } = options;\n return task({\n ...definition,\n async perform(context) {\n const options = request(context);\n const usage = taskUsage(context, options.observe);\n const result = await sandbox.dispatch({\n ...options,\n signal: context.signal,\n observe: usage.observe,\n });\n usage.reconcile(result.usage);\n return result;\n },\n });\n}\n\nexport function isolatedTask<T>(\n options: Omit<TaskOptions<DispatchResult<T>>, \"perform\"> &\n IsolatedTaskOptions<T>,\n): Task<DispatchResult<T>> {\n const { request, ...definition } = options;\n return task({\n ...definition,\n async perform(context) {\n const options = await request(context);\n const usage = taskUsage(context, options.observe);\n const result = await dispatch({\n ...options,\n signal: context.signal,\n observe: usage.observe,\n });\n usage.reconcile(result.usage);\n return result;\n },\n });\n}\n\nexport function commandTask(\n options: Omit<TaskOptions<CommandResult>, \"perform\"> & CommandTaskOptions,\n): Task<CommandResult> {\n const { sandbox, command, ...definition } = options;\n return task({\n ...definition,\n async perform(context) {\n const invocation =\n typeof command === \"function\" ? command(context) : command;\n const result = await sandbox.command({\n ...invocation,\n signal: context.signal,\n });\n if (result.status !== 0)\n throw new OutpostError(\"process\", \"Workflow command failed\", {\n ...result,\n });\n return result;\n },\n });\n}\n"]}
|
|
@@ -8,11 +8,12 @@ export type CommandTaskOptions = {
|
|
|
8
8
|
command: Command | ((context: TaskContext) => Command);
|
|
9
9
|
};
|
|
10
10
|
export type IsolatedTaskOptions<T> = {
|
|
11
|
-
request: (context: TaskContext) =>
|
|
12
|
-
readonly agent: AgentAdapter;
|
|
13
|
-
};
|
|
11
|
+
request: (context: TaskContext) => IsolatedTaskRequest<T> | Promise<IsolatedTaskRequest<T>>;
|
|
14
12
|
};
|
|
15
13
|
export type AgentTaskOptions<T> = {
|
|
16
14
|
sandbox: Sandbox;
|
|
17
15
|
request: (context: TaskContext) => DispatchOptions<T>;
|
|
18
16
|
};
|
|
17
|
+
export type IsolatedTaskRequest<T> = SandboxOptions & DispatchOptions<T> & {
|
|
18
|
+
readonly agent: AgentAdapter;
|
|
19
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.types.js","sourceRoot":"","sources":["../../src/application/tasks.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAdapter } from \"../domain/agent.types.ts\";\nimport type { Command } from \"../domain/command.types.ts\";\nimport type { TaskContext } from \"../domain/workflow.types.ts\";\nimport type { DispatchOptions } from \"./execution.types.ts\";\nimport type { Sandbox, SandboxOptions } from \"./outpost.types.ts\";\n\nexport type CommandTaskOptions = {\n sandbox: Sandbox;\n command: Command | ((context: TaskContext) => Command);\n};\n\nexport type IsolatedTaskOptions<T> = {\n request: (\n context: TaskContext,\n ) =>
|
|
1
|
+
{"version":3,"file":"tasks.types.js","sourceRoot":"","sources":["../../src/application/tasks.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAdapter } from \"../domain/agent.types.ts\";\nimport type { Command } from \"../domain/command.types.ts\";\nimport type { TaskContext } from \"../domain/workflow.types.ts\";\nimport type { DispatchOptions } from \"./execution.types.ts\";\nimport type { Sandbox, SandboxOptions } from \"./outpost.types.ts\";\n\nexport type CommandTaskOptions = {\n sandbox: Sandbox;\n command: Command | ((context: TaskContext) => Command);\n};\n\nexport type IsolatedTaskOptions<T> = {\n request: (\n context: TaskContext,\n ) => IsolatedTaskRequest<T> | Promise<IsolatedTaskRequest<T>>;\n};\n\nexport type AgentTaskOptions<T> = {\n sandbox: Sandbox;\n request: (context: TaskContext) => DispatchOptions<T>;\n};\n\nexport type IsolatedTaskRequest<T> = SandboxOptions &\n DispatchOptions<T> & { readonly agent: AgentAdapter };\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { acquireWorkspace } from "../infrastructure/git/workspace.js";
|
|
2
|
+
import { reserveRecoveryStorage } from "./storage-reservation.js";
|
|
3
|
+
export async function allocateWorkspace(options) {
|
|
4
|
+
if (!options.storageQuota)
|
|
5
|
+
return acquireWorkspace(options);
|
|
6
|
+
const reservation = await reserveRecoveryStorage({
|
|
7
|
+
...options.storageQuota,
|
|
8
|
+
...(options.repository ? { repository: options.repository } : {}),
|
|
9
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
10
|
+
});
|
|
11
|
+
try {
|
|
12
|
+
options.signal?.throwIfAborted();
|
|
13
|
+
const lease = await acquireWorkspace({
|
|
14
|
+
...options,
|
|
15
|
+
repository: reservation.repository,
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
...lease,
|
|
19
|
+
async dispose(preserve) {
|
|
20
|
+
try {
|
|
21
|
+
return await lease.dispose(preserve);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
await reservation.release();
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
await reservation.release();
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=workspace-allocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-allocation.js","sourceRoot":"","sources":["../../src/application/workspace-allocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAyB;IAEzB,IAAI,CAAC,OAAO,CAAC,YAAY;QAAE,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC;QAC/C,GAAG,OAAO,CAAC,YAAY;QACvB,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC,CAAC;IACH,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC;YACnC,GAAG,OAAO;YACV,UAAU,EAAE,WAAW,CAAC,UAAU;SACnC,CAAC,CAAC;QACH,OAAO;YACL,GAAG,KAAK;YACR,KAAK,CAAC,OAAO,CAAC,QAAQ;gBACpB,IAAI,CAAC;oBACH,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACvC,CAAC;wBAAS,CAAC;oBACT,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC9B,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import { acquireWorkspace } from \"../infrastructure/git/workspace.ts\";\nimport type { WorkspaceLease } from \"../infrastructure/git/workspace.types.ts\";\nimport type { WorkspaceOptions } from \"./outpost.types.ts\";\nimport { reserveRecoveryStorage } from \"./storage-reservation.ts\";\n\nexport async function allocateWorkspace(\n options: WorkspaceOptions,\n): Promise<WorkspaceLease> {\n if (!options.storageQuota) return acquireWorkspace(options);\n const reservation = await reserveRecoveryStorage({\n ...options.storageQuota,\n ...(options.repository ? { repository: options.repository } : {}),\n ...(options.signal ? { signal: options.signal } : {}),\n });\n try {\n options.signal?.throwIfAborted();\n const lease = await acquireWorkspace({\n ...options,\n repository: reservation.repository,\n });\n return {\n ...lease,\n async dispose(preserve) {\n try {\n return await lease.dispose(preserve);\n } finally {\n await reservation.release();\n }\n },\n };\n } catch (error) {\n await reservation.release();\n throw error;\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { invariant } from "../domain/errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { allocateWorkspace } from "./workspace-allocation.js";
|
|
3
3
|
import { executeProcess } from "../infrastructure/process.js";
|
|
4
4
|
import { attach } from "./attach.js";
|
|
5
5
|
import { dispatch } from "./dispatch.js";
|
|
@@ -9,7 +9,7 @@ import { startupFailure } from "./startup-recovery.js";
|
|
|
9
9
|
import { workspaces } from "./workspace-registry.js";
|
|
10
10
|
export async function openWorkspace(options = {}) {
|
|
11
11
|
options.signal?.throwIfAborted();
|
|
12
|
-
const lease = await
|
|
12
|
+
const lease = await allocateWorkspace(options);
|
|
13
13
|
try {
|
|
14
14
|
await hooks(options.hooks?.workspaceReady ?? [], lease.directory, executeProcess, options.signal);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/application/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/application/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;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C,OAAO;YACZ,OAAO,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE;YACvB,SAAS,CACP,CAAC,KAAK,CAAC,MAAM,EACb,gDAAgD,CACjD,CAAC;YACF,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;YACpB,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;YACzB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;IACF,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { invariant } from \"../domain/errors.ts\";\nimport { allocateWorkspace } from \"./workspace-allocation.ts\";\nimport { executeProcess } from \"../infrastructure/process.ts\";\nimport { attach } from \"./attach.ts\";\nimport { dispatch } from \"./dispatch.ts\";\nimport { hooks } from \"./lifecycle-hooks.ts\";\nimport type { Workspace, WorkspaceOptions } from \"./outpost.types.ts\";\nimport { createSandbox } from \"./sandbox.ts\";\nimport { startupFailure } from \"./startup-recovery.ts\";\nimport { workspaces } from \"./workspace-registry.ts\";\n\nexport async function openWorkspace(\n options: WorkspaceOptions = {},\n): Promise<Workspace> {\n options.signal?.throwIfAborted();\n const lease = await allocateWorkspace(options);\n try {\n await hooks(\n options.hooks?.workspaceReady ?? [],\n lease.directory,\n executeProcess,\n options.signal,\n );\n } catch (cause) {\n await startupFailure(lease, cause, options);\n await lease.dispose();\n throw cause;\n }\n const state = {\n lease,\n active: false,\n closed: false,\n ...(options.hooks ? { hooks: options.hooks } : {}),\n };\n const result: Workspace = {\n ...lease,\n dispatch(options) {\n return dispatch({ ...options, workspace: result });\n },\n sandbox(options = {}) {\n return createSandbox({ ...options, workspace: result });\n },\n attach(options) {\n return attach({ ...options, workspace: result });\n },\n async close(settings = {}) {\n invariant(\n !state.active,\n \"Close the sandbox before closing its workspace\",\n );\n state.closed = true;\n return lease.dispose(settings.preserve);\n },\n async [Symbol.asyncDispose]() {\n await result.close();\n },\n };\n workspaces.set(result, state);\n return result;\n}\n"]}
|
package/dist/cli/commands.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
|
+
import { recoveryCommand } from "./recovery-command.js";
|
|
3
|
+
import { doctorCommand } from "./doctor-command.js";
|
|
2
4
|
import { imageCommand } from "./image-command.js";
|
|
3
5
|
import { initializeCommand } from "./init-command.js";
|
|
4
6
|
import { cliOptions, help } from "./main.constants.js";
|
|
@@ -13,6 +15,8 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
15
17
|
const commands = {
|
|
18
|
+
doctor: doctorCommand,
|
|
19
|
+
recovery: recoveryCommand,
|
|
16
20
|
init: initializeCommand,
|
|
17
21
|
image: imageCommand,
|
|
18
22
|
};
|
package/dist/cli/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,OAA0B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/C,MAAM,UAAU,GAAG,SAAS,CAAC;QAC3B,IAAI;QACJ,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;IACH,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAyC;QACrD,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,YAAY;KACpB,CAAC;IACF,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;IACxC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,MAAM,QAAQ,CAAC,IAAI,CAAE,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { parseArgs } from \"node:util\";\nimport { imageCommand } from \"./image-command.ts\";\nimport { initializeCommand } from \"./init-command.ts\";\nimport { cliOptions, help } from \"./main.constants.ts\";\nimport type { CliCommand } from \"./main.types.ts\";\n\nexport async function runCli(\n args: readonly string[] = process.argv.slice(2),\n): Promise<void> {\n const invocation = parseArgs({\n args,\n allowPositionals: true,\n options: cliOptions,\n });\n if (invocation.values.help || !invocation.positionals.length) {\n process.stdout.write(help);\n return;\n }\n const commands: Readonly<Record<string, CliCommand>> = {\n init: initializeCommand,\n image: imageCommand,\n };\n const name = invocation.positionals[0]!;\n if (!Object.hasOwn(commands, name))\n throw new Error(\"Unknown command. Run outpost --help.\");\n await commands[name]!(invocation);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,OAA0B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/C,MAAM,UAAU,GAAG,SAAS,CAAC;QAC3B,IAAI;QACJ,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;IACH,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAyC;QACrD,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,YAAY;KACpB,CAAC;IACF,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;IACxC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,MAAM,QAAQ,CAAC,IAAI,CAAE,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { parseArgs } from \"node:util\";\nimport { recoveryCommand } from \"./recovery-command.ts\";\nimport { doctorCommand } from \"./doctor-command.ts\";\nimport { imageCommand } from \"./image-command.ts\";\nimport { initializeCommand } from \"./init-command.ts\";\nimport { cliOptions, help } from \"./main.constants.ts\";\nimport type { CliCommand } from \"./main.types.ts\";\n\nexport async function runCli(\n args: readonly string[] = process.argv.slice(2),\n): Promise<void> {\n const invocation = parseArgs({\n args,\n allowPositionals: true,\n options: cliOptions,\n });\n if (invocation.values.help || !invocation.positionals.length) {\n process.stdout.write(help);\n return;\n }\n const commands: Readonly<Record<string, CliCommand>> = {\n doctor: doctorCommand,\n recovery: recoveryCommand,\n init: initializeCommand,\n image: imageCommand,\n };\n const name = invocation.positionals[0]!;\n if (!Object.hasOwn(commands, name))\n throw new Error(\"Unknown command. Run outpost --help.\");\n await commands[name]!(invocation);\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { doctorDefaults, providerDiagnostics, } from "../application/doctor.constants.js";
|
|
2
|
+
import { diagnose } from "../application/doctor.js";
|
|
3
|
+
import { invariant } from "../domain/errors.js";
|
|
4
|
+
function isProvider(value) {
|
|
5
|
+
return Object.hasOwn(providerDiagnostics, value);
|
|
6
|
+
}
|
|
7
|
+
export async function doctorCommand({ values, positionals }, execute, write = (text) => {
|
|
8
|
+
process.stdout.write(text);
|
|
9
|
+
}) {
|
|
10
|
+
invariant(positionals.length === 1, "Usage: outpost doctor [--provider NAME] [--agent NAME] [--image NAME] [--json]");
|
|
11
|
+
for (const key of Object.keys(values))
|
|
12
|
+
invariant(["provider", "agent", "image", "json"].includes(key), `Unsupported doctor option: --${key}`);
|
|
13
|
+
const provider = values.provider ?? doctorDefaults.provider;
|
|
14
|
+
const agent = values.agent ?? doctorDefaults.agent;
|
|
15
|
+
invariant(isProvider(provider), "Unknown provider. Choose docker, podman, local, vercel or daytona.");
|
|
16
|
+
invariant(agent === "codex" || agent === "claude" || agent === "gemini", "Unknown agent. Choose codex, claude or gemini.");
|
|
17
|
+
const report = await diagnose({
|
|
18
|
+
provider,
|
|
19
|
+
agent,
|
|
20
|
+
...(values.image !== undefined ? { image: values.image } : {}),
|
|
21
|
+
}, execute);
|
|
22
|
+
if (values.json)
|
|
23
|
+
write(`${JSON.stringify(report, null, 2)}\n`);
|
|
24
|
+
else {
|
|
25
|
+
write(`Outpost doctor — ${report.scope === "host" ? "host checks" : "host and image checks"} (${provider}, ${agent})\n`);
|
|
26
|
+
write(`Provider contract: ${report.placement}; interactive terminal: ${report.interactiveTerminal ? "supported" : "unsupported"}. Workflow execution is not tested.\n`);
|
|
27
|
+
if (report.image)
|
|
28
|
+
write(`Image: ${report.image}\n`);
|
|
29
|
+
for (const check of report.checks)
|
|
30
|
+
write(`[${check.status.toUpperCase()}] ${check.id}${check.version ? ` ${check.version}` : ""}${check.referenceVersion ? ` (pinned: ${check.referenceVersion})` : ""}: ${check.message}\n`);
|
|
31
|
+
write(report.hasFailures
|
|
32
|
+
? "Diagnostic checks found failures.\n"
|
|
33
|
+
: "No blocking check failed; warnings and skipped checks still need review.\n");
|
|
34
|
+
}
|
|
35
|
+
if (report.hasFailures)
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=doctor-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-command.js","sourceRoot":"","sources":["../../src/cli/doctor-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,EAAE,MAAM,EAAE,WAAW,EAAiB,EACtC,OAAkB,EAClB,QAAgC,CAAC,IAAI,EAAE,EAAE;IACvC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;IAED,SAAS,CACP,WAAW,CAAC,MAAM,KAAK,CAAC,EACxB,gFAAgF,CACjF,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,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AAC,CAAC;QACpD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;YAC/B,KAAK,CACH,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,OAAO,IAAI,CACpL,CAAC;QACJ,KAAK,CACH,MAAM,CAAC,WAAW;YAChB,CAAC,CAAC,qCAAqC;YACvC,CAAC,CAAC,4EAA4E,CACjF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,WAAW;QAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import {\n doctorDefaults,\n providerDiagnostics,\n} from \"../application/doctor.constants.ts\";\nimport { diagnose } from \"../application/doctor.ts\";\nimport type { DoctorProvider } from \"../application/doctor.types.ts\";\nimport { invariant } from \"../domain/errors.ts\";\nimport type { Executor } from \"../infrastructure/process.types.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nfunction isProvider(value: string): value is DoctorProvider {\n return Object.hasOwn(providerDiagnostics, value);\n}\nexport async function doctorCommand(\n { values, positionals }: CliInvocation,\n execute?: Executor,\n write: (text: string) => void = (text) => {\n process.stdout.write(text);\n },\n): Promise<void> {\n invariant(\n positionals.length === 1,\n \"Usage: outpost doctor [--provider NAME] [--agent NAME] [--image NAME] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\"provider\", \"agent\", \"image\", \"json\"].includes(key),\n `Unsupported doctor option: --${key}`,\n );\n const provider = values.provider ?? doctorDefaults.provider;\n const agent = values.agent ?? doctorDefaults.agent;\n invariant(\n isProvider(provider),\n \"Unknown provider. Choose docker, podman, local, vercel or daytona.\",\n );\n invariant(\n agent === \"codex\" || agent === \"claude\" || agent === \"gemini\",\n \"Unknown agent. Choose codex, claude or gemini.\",\n );\n const report = await diagnose(\n {\n provider,\n agent,\n ...(values.image !== undefined ? { image: values.image } : {}),\n },\n execute,\n );\n if (values.json) write(`${JSON.stringify(report, null, 2)}\\n`);\n else {\n write(\n `Outpost doctor — ${report.scope === \"host\" ? \"host checks\" : \"host and image checks\"} (${provider}, ${agent})\\n`,\n );\n write(\n `Provider contract: ${report.placement}; interactive terminal: ${report.interactiveTerminal ? \"supported\" : \"unsupported\"}. Workflow execution is not tested.\\n`,\n );\n if (report.image) write(`Image: ${report.image}\\n`);\n for (const check of report.checks)\n write(\n `[${check.status.toUpperCase()}] ${check.id}${check.version ? ` ${check.version}` : \"\"}${check.referenceVersion ? ` (pinned: ${check.referenceVersion})` : \"\"}: ${check.message}\\n`,\n );\n write(\n report.hasFailures\n ? \"Diagnostic checks found failures.\\n\"\n : \"No blocking check failed; warnings and skipped checks still need review.\\n\",\n );\n }\n if (report.hasFailures) process.exitCode = 1;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const help = "Outpost \u2014 sandboxed coding agents and workflows\n\noutpost init [--yes] [--agent codex|claude] [--provider docker|podman|vercel|daytona|local]\n [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]\noutpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]\n\nNode.js 24+ and Git are required. Run generated scripts with Node.js.\nInitialization writes run.ts and project files directly into --directory (default: current directory).\n--repository selects the target Git repository; relative paths are resolved from the workflow directory.\n";
|
|
1
|
+
export declare const help = "Outpost \u2014 sandboxed coding agents and workflows\n\noutpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]\n [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]\noutpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]\n\noutpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]\n\noutpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\noutpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]\noutpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]\noutpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]\n\nNode.js 24+ and Git are required. Run generated scripts with Node.js.\nInitialization writes run.ts and project files directly into --directory (default: current directory).\n--repository selects the target Git repository; relative paths are resolved from the workflow directory.\n";
|
|
2
2
|
export declare const cliOptions: {
|
|
3
3
|
readonly help: {
|
|
4
4
|
readonly type: "boolean";
|
|
@@ -14,6 +14,36 @@ export declare const cliOptions: {
|
|
|
14
14
|
readonly build: {
|
|
15
15
|
readonly type: "boolean";
|
|
16
16
|
};
|
|
17
|
+
readonly json: {
|
|
18
|
+
readonly type: "boolean";
|
|
19
|
+
};
|
|
20
|
+
readonly git: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
};
|
|
23
|
+
readonly locks: {
|
|
24
|
+
readonly type: "boolean";
|
|
25
|
+
};
|
|
26
|
+
readonly resources: {
|
|
27
|
+
readonly type: "boolean";
|
|
28
|
+
};
|
|
29
|
+
readonly restorability: {
|
|
30
|
+
readonly type: "boolean";
|
|
31
|
+
};
|
|
32
|
+
readonly apply: {
|
|
33
|
+
readonly type: "boolean";
|
|
34
|
+
};
|
|
35
|
+
readonly policy: {
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
};
|
|
38
|
+
readonly checksums: {
|
|
39
|
+
readonly type: "boolean";
|
|
40
|
+
};
|
|
41
|
+
readonly "max-bytes": {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
};
|
|
44
|
+
readonly "max-entries": {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
};
|
|
17
47
|
readonly agent: {
|
|
18
48
|
readonly type: "string";
|
|
19
49
|
};
|
|
@@ -32,6 +62,12 @@ export declare const cliOptions: {
|
|
|
32
62
|
readonly repository: {
|
|
33
63
|
readonly type: "string";
|
|
34
64
|
};
|
|
65
|
+
readonly destination: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
};
|
|
68
|
+
readonly side: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
};
|
|
35
71
|
readonly engine: {
|
|
36
72
|
readonly type: "string";
|
|
37
73
|
};
|
|
@@ -48,4 +84,4 @@ export declare const cliOptions: {
|
|
|
48
84
|
readonly type: "string";
|
|
49
85
|
};
|
|
50
86
|
};
|
|
51
|
-
export declare const initializationQuestions: readonly [readonly ["agent", "Agent (codex/claude)", "codex"], readonly ["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"]];
|
|
87
|
+
export declare const initializationQuestions: readonly [readonly ["agent", "Agent (codex/claude/gemini)", "codex"], readonly ["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"]];
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export const help = `Outpost — sandboxed coding agents and workflows
|
|
2
2
|
|
|
3
|
-
outpost init [--yes] [--agent codex|claude] [--provider docker|podman|vercel|daytona|local]
|
|
3
|
+
outpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]
|
|
4
4
|
[--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]
|
|
5
5
|
outpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]
|
|
6
6
|
|
|
7
|
+
outpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]
|
|
8
|
+
|
|
9
|
+
outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]
|
|
10
|
+
outpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]
|
|
11
|
+
outpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]
|
|
12
|
+
outpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]
|
|
13
|
+
|
|
7
14
|
Node.js 24+ and Git are required. Run generated scripts with Node.js.
|
|
8
15
|
Initialization writes run.ts and project files directly into --directory (default: current directory).
|
|
9
16
|
--repository selects the target Git repository; relative paths are resolved from the workflow directory.
|
|
@@ -13,12 +20,24 @@ export const cliOptions = {
|
|
|
13
20
|
yes: { type: "boolean", short: "y" },
|
|
14
21
|
install: { type: "boolean" },
|
|
15
22
|
build: { type: "boolean" },
|
|
23
|
+
json: { type: "boolean" },
|
|
24
|
+
git: { type: "boolean" },
|
|
25
|
+
locks: { type: "boolean" },
|
|
26
|
+
resources: { type: "boolean" },
|
|
27
|
+
restorability: { type: "boolean" },
|
|
28
|
+
apply: { type: "boolean" },
|
|
29
|
+
policy: { type: "string" },
|
|
30
|
+
checksums: { type: "boolean" },
|
|
31
|
+
"max-bytes": { type: "string" },
|
|
32
|
+
"max-entries": { type: "string" },
|
|
16
33
|
agent: { type: "string" },
|
|
17
34
|
provider: { type: "string" },
|
|
18
35
|
manager: { type: "string" },
|
|
19
36
|
model: { type: "string" },
|
|
20
37
|
directory: { type: "string" },
|
|
21
38
|
repository: { type: "string" },
|
|
39
|
+
destination: { type: "string" },
|
|
40
|
+
side: { type: "string" },
|
|
22
41
|
engine: { type: "string" },
|
|
23
42
|
file: { type: "string" },
|
|
24
43
|
image: { type: "string" },
|
|
@@ -26,7 +45,7 @@ export const cliOptions = {
|
|
|
26
45
|
gid: { type: "string" },
|
|
27
46
|
};
|
|
28
47
|
export const initializationQuestions = [
|
|
29
|
-
["agent", "Agent (codex/claude)", "codex"],
|
|
48
|
+
["agent", "Agent (codex/claude/gemini)", "codex"],
|
|
30
49
|
["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"],
|
|
31
50
|
];
|
|
32
51
|
//# sourceMappingURL=main.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.constants.js","sourceRoot":"","sources":["../../src/cli/main.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"main.constants.js","sourceRoot":"","sources":["../../src/cli/main.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACrC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACpC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACzB,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACxB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC/B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACjC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC7B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACvB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACf,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,CAAC,OAAO,EAAE,6BAA6B,EAAE,OAAO,CAAC;IACjD,CAAC,UAAU,EAAE,8CAA8C,EAAE,QAAQ,CAAC;CAC9D,CAAC","sourcesContent":["export const help = `Outpost — sandboxed coding agents and workflows\n\noutpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]\n [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]\noutpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]\n\noutpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]\n\noutpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\noutpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]\noutpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]\noutpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]\n\nNode.js 24+ and Git are required. Run generated scripts with Node.js.\nInitialization writes run.ts and project files directly into --directory (default: current directory).\n--repository selects the target Git repository; relative paths are resolved from the workflow directory.\n`;\n\nexport const cliOptions = {\n help: { type: \"boolean\", short: \"h\" },\n yes: { type: \"boolean\", short: \"y\" },\n install: { type: \"boolean\" },\n build: { type: \"boolean\" },\n json: { type: \"boolean\" },\n git: { type: \"boolean\" },\n locks: { type: \"boolean\" },\n resources: { type: \"boolean\" },\n restorability: { type: \"boolean\" },\n apply: { type: \"boolean\" },\n policy: { type: \"string\" },\n checksums: { type: \"boolean\" },\n \"max-bytes\": { type: \"string\" },\n \"max-entries\": { type: \"string\" },\n agent: { type: \"string\" },\n provider: { type: \"string\" },\n manager: { type: \"string\" },\n model: { type: \"string\" },\n directory: { type: \"string\" },\n repository: { type: \"string\" },\n destination: { type: \"string\" },\n side: { type: \"string\" },\n engine: { type: \"string\" },\n file: { type: \"string\" },\n image: { type: \"string\" },\n uid: { type: \"string\" },\n gid: { type: \"string\" },\n} as const;\n\nexport const initializationQuestions = [\n [\"agent\", \"Agent (codex/claude/gemini)\", \"codex\"],\n [\"provider\", \"Sandbox (docker/podman/vercel/daytona/local)\", \"docker\"],\n] as const;\n"]}
|