@elie-laloum/outpost 3.0.0 → 4.1.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 +32 -0
- package/README.md +5 -3
- package/SECURITY.md +3 -1
- package/dist/adapters/agents/codex-adapter.js +2 -0
- package/dist/adapters/agents/codex-adapter.js.map +1 -1
- package/dist/adapters/agents/codex-provider.d.ts +2 -0
- package/dist/adapters/agents/codex-provider.js +32 -0
- package/dist/adapters/agents/codex-provider.js.map +1 -0
- package/dist/adapters/agents/codex-request.js +2 -1
- package/dist/adapters/agents/codex-request.js.map +1 -1
- 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 +23 -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 +1 -1
- package/dist/adapters/agents/protocol-fixtures.constants.js +37 -0
- package/dist/adapters/agents/protocol-fixtures.constants.js.map +1 -1
- package/dist/adapters/agents/settings.types.d.ts +5 -0
- package/dist/adapters/agents/settings.types.js.map +1 -1
- 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/dispatch-validation.js +2 -0
- package/dist/application/dispatch-validation.js.map +1 -1
- package/dist/application/doctor-agent.constants.d.ts +2 -0
- package/dist/application/doctor-agent.constants.js +2 -0
- package/dist/application/doctor-agent.constants.js.map +1 -1
- package/dist/application/doctor-agent.js +1 -1
- package/dist/application/doctor-agent.js.map +1 -1
- package/dist/application/doctor-protocol.js +2 -1
- package/dist/application/doctor-protocol.js.map +1 -1
- package/dist/application/doctor.constants.js +1 -1
- package/dist/application/doctor.constants.js.map +1 -1
- package/dist/application/doctor.types.d.ts +1 -1
- package/dist/application/doctor.types.js.map +1 -1
- package/dist/application/outpost.types.d.ts +2 -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-inspection.js +5 -0
- package/dist/application/recovery-inspection.js.map +1 -1
- package/dist/application/recovery-inspection.types.d.ts +3 -0
- package/dist/application/recovery-inspection.types.js.map +1 -1
- 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.js +5 -0
- package/dist/application/recovery-retention.js.map +1 -1
- package/dist/application/recovery-verification.d.ts +2 -1
- package/dist/application/recovery-verification.js +1 -1
- package/dist/application/recovery-verification.js.map +1 -1
- package/dist/application/remote-apply.js +6 -0
- package/dist/application/remote-apply.js.map +1 -1
- package/dist/application/remote-download.js +2 -2
- 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 +20 -28
- package/dist/application/remote-validation.js.map +1 -1
- package/dist/application/remote-workspace.js +4 -10
- package/dist/application/remote-workspace.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 +23 -11
- 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 +1 -1
- package/dist/application/task-usage.js.map +1 -1
- package/dist/application/tasks.js +1 -1
- 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 +55 -18
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/doctor-command.js +1 -1
- package/dist/cli/doctor-command.js.map +1 -1
- package/dist/cli/init-authentication.constants.d.ts +13 -0
- package/dist/cli/init-authentication.constants.js +10 -0
- package/dist/cli/init-authentication.constants.js.map +1 -0
- package/dist/cli/init-authentication.d.ts +4 -0
- package/dist/cli/init-authentication.js +43 -0
- package/dist/cli/init-authentication.js.map +1 -0
- package/dist/cli/init-command.js +74 -15
- package/dist/cli/init-command.js.map +1 -1
- package/dist/cli/main.constants.d.ts +111 -2
- package/dist/cli/main.constants.js +148 -42
- package/dist/cli/main.constants.js.map +1 -1
- package/dist/cli/recovery-command.js +28 -4
- package/dist/cli/recovery-command.js.map +1 -1
- 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/scaffold-files.js +3 -2
- package/dist/cli/scaffold-files.js.map +1 -1
- package/dist/cli/scaffold-validation.js +20 -1
- package/dist/cli/scaffold-validation.js.map +1 -1
- package/dist/cli/scaffold.constants.js +2 -2
- package/dist/cli/scaffold.constants.js.map +1 -1
- package/dist/cli/scaffold.js +13 -0
- package/dist/cli/scaffold.js.map +1 -1
- package/dist/cli/scaffold.types.d.ts +4 -1
- package/dist/cli/scaffold.types.js.map +1 -1
- package/dist/cli/starters.js +9 -2
- package/dist/cli/starters.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/sandbox.types.d.ts +1 -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.d.ts +2 -2
- package/dist/domain/workflow/budget.js +5 -3
- package/dist/domain/workflow/budget.js.map +1 -1
- 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 +14 -2
- 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 +65 -32
- 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 +91 -16
- package/dist/domain/workflow/workflow-state.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 +32 -2
- package/dist/index.js +14 -1
- 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 +1 -1
- package/dist/infrastructure/file-manifest.js +3 -2
- package/dist/infrastructure/file-manifest.js.map +1 -1
- package/dist/infrastructure/git/verification-command.d.ts +1 -1
- package/dist/infrastructure/git/verification-command.js +3 -2
- package/dist/infrastructure/git/verification-command.js.map +1 -1
- package/dist/infrastructure/opentelemetry.js +1 -1
- package/dist/infrastructure/opentelemetry.js.map +1 -1
- 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-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 +5 -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 +3 -1
- package/dist/providers/agents.js +1 -0
- package/dist/providers/agents.js.map +1 -1
- 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 +4 -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 +19 -2
- package/dist/providers/container.js.map +1 -1
- package/dist/providers/container.types.d.ts +3 -0
- package/dist/providers/container.types.js.map +1 -1
- package/dist/providers/daytona-command.constants.d.ts +2 -0
- package/dist/providers/daytona-command.constants.js +13 -0
- package/dist/providers/daytona-command.constants.js.map +1 -0
- package/dist/providers/daytona-command.js +12 -5
- package/dist/providers/daytona-command.js.map +1 -1
- package/dist/providers/daytona-output.d.ts +4 -0
- package/dist/providers/daytona-output.js +37 -0
- package/dist/providers/daytona-output.js.map +1 -0
- package/dist/providers/daytona-terminal.d.ts +3 -0
- package/dist/providers/daytona-terminal.js +130 -0
- package/dist/providers/daytona-terminal.js.map +1 -0
- package/dist/providers/daytona.js +2 -0
- package/dist/providers/daytona.js.map +1 -1
- package/dist/providers/docker.d.ts +1 -0
- package/dist/providers/docker.js.map +1 -1
- package/dist/providers/file-batches.d.ts +1 -1
- package/dist/providers/file-batches.js +9 -0
- package/dist/providers/file-batches.js.map +1 -1
- 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 +1 -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-command.js +2 -2
- package/dist/providers/vercel-command.js.map +1 -1
- 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 +5 -1
- 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 +10 -2
|
@@ -1,78 +1,187 @@
|
|
|
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\noutpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude] [--image NAME] [--json]\n\noutpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--json]\noutpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--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
1
|
export declare const cliOptions: {
|
|
2
|
+
readonly "base-url": {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly description: "Custom Codex Responses API base URL (requires --model)";
|
|
5
|
+
};
|
|
6
|
+
readonly "api-key-env": {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly description: "Custom provider API-key environment variable";
|
|
9
|
+
};
|
|
10
|
+
readonly authentication: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "Authentication: api-key, oauth-token (Claude), login (Codex)";
|
|
13
|
+
};
|
|
3
14
|
readonly help: {
|
|
4
15
|
readonly type: "boolean";
|
|
5
16
|
readonly short: "h";
|
|
17
|
+
readonly description: "Help";
|
|
6
18
|
};
|
|
7
19
|
readonly yes: {
|
|
8
20
|
readonly type: "boolean";
|
|
9
21
|
readonly short: "y";
|
|
22
|
+
readonly description: "Accept defaults without prompting";
|
|
10
23
|
};
|
|
11
24
|
readonly install: {
|
|
12
25
|
readonly type: "boolean";
|
|
26
|
+
readonly description: "Install project dependencies";
|
|
13
27
|
};
|
|
14
28
|
readonly build: {
|
|
15
29
|
readonly type: "boolean";
|
|
30
|
+
readonly description: "Build the container image";
|
|
16
31
|
};
|
|
17
32
|
readonly json: {
|
|
18
33
|
readonly type: "boolean";
|
|
34
|
+
readonly description: "Write a machine-readable JSON report";
|
|
19
35
|
};
|
|
20
36
|
readonly git: {
|
|
21
37
|
readonly type: "boolean";
|
|
38
|
+
readonly description: "Inspect workspace Git state";
|
|
22
39
|
};
|
|
23
40
|
readonly locks: {
|
|
24
41
|
readonly type: "boolean";
|
|
42
|
+
readonly description: "Inspect local lock ownership";
|
|
43
|
+
};
|
|
44
|
+
readonly resources: {
|
|
45
|
+
readonly type: "boolean";
|
|
46
|
+
readonly description: "Inspect recorded sandbox activity";
|
|
25
47
|
};
|
|
26
48
|
readonly restorability: {
|
|
27
49
|
readonly type: "boolean";
|
|
50
|
+
readonly description: "Check whether the retained transfer can be restored";
|
|
28
51
|
};
|
|
29
52
|
readonly apply: {
|
|
30
53
|
readonly type: "boolean";
|
|
54
|
+
readonly description: "Apply changes (default: preview)";
|
|
31
55
|
};
|
|
32
56
|
readonly policy: {
|
|
33
57
|
readonly type: "string";
|
|
58
|
+
readonly description: "Retention policy file";
|
|
34
59
|
};
|
|
35
60
|
readonly checksums: {
|
|
36
61
|
readonly type: "boolean";
|
|
62
|
+
readonly description: "Verify retained file checksums";
|
|
37
63
|
};
|
|
38
64
|
readonly "max-bytes": {
|
|
39
65
|
readonly type: "string";
|
|
66
|
+
readonly description: "Maximum bytes to inspect";
|
|
40
67
|
};
|
|
41
68
|
readonly "max-entries": {
|
|
42
69
|
readonly type: "string";
|
|
70
|
+
readonly description: "Maximum inventory entries";
|
|
43
71
|
};
|
|
44
72
|
readonly agent: {
|
|
45
73
|
readonly type: "string";
|
|
74
|
+
readonly description: "Agent: codex, claude or gemini";
|
|
46
75
|
};
|
|
47
76
|
readonly provider: {
|
|
48
77
|
readonly type: "string";
|
|
78
|
+
readonly description: "Provider: docker, podman, local, vercel or daytona";
|
|
49
79
|
};
|
|
50
80
|
readonly manager: {
|
|
51
81
|
readonly type: "string";
|
|
82
|
+
readonly description: "Package manager: npm, pnpm, yarn or bun";
|
|
52
83
|
};
|
|
53
84
|
readonly model: {
|
|
54
85
|
readonly type: "string";
|
|
86
|
+
readonly description: "Agent model name";
|
|
55
87
|
};
|
|
56
88
|
readonly directory: {
|
|
57
89
|
readonly type: "string";
|
|
90
|
+
readonly description: "Workflow or retained transfer directory";
|
|
58
91
|
};
|
|
59
92
|
readonly repository: {
|
|
60
93
|
readonly type: "string";
|
|
94
|
+
readonly description: "Target Git repository";
|
|
95
|
+
};
|
|
96
|
+
readonly destination: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly description: "New restoration directory";
|
|
99
|
+
};
|
|
100
|
+
readonly side: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly description: "Transfer side: previous or incoming";
|
|
61
103
|
};
|
|
62
104
|
readonly engine: {
|
|
63
105
|
readonly type: "string";
|
|
106
|
+
readonly description: "Container engine: docker or podman";
|
|
64
107
|
};
|
|
65
108
|
readonly file: {
|
|
66
109
|
readonly type: "string";
|
|
110
|
+
readonly description: "Container recipe path";
|
|
67
111
|
};
|
|
68
112
|
readonly image: {
|
|
69
113
|
readonly type: "string";
|
|
114
|
+
readonly description: "Container image name";
|
|
70
115
|
};
|
|
71
116
|
readonly uid: {
|
|
72
117
|
readonly type: "string";
|
|
118
|
+
readonly description: "Container user ID";
|
|
73
119
|
};
|
|
74
120
|
readonly gid: {
|
|
75
121
|
readonly type: "string";
|
|
122
|
+
readonly description: "Container group ID";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export declare const commandOptions: {
|
|
126
|
+
readonly init: {
|
|
127
|
+
readonly description: "Create a standalone workflow project";
|
|
128
|
+
readonly options: readonly ["yes", "agent", "provider", "manager", "authentication", "model", "base-url", "api-key-env", "install", "build", "image", "directory", "repository"];
|
|
129
|
+
};
|
|
130
|
+
readonly doctor: {
|
|
131
|
+
readonly description: "Diagnose host and sandbox prerequisites";
|
|
132
|
+
readonly options: readonly ["provider", "agent", "image", "json"];
|
|
133
|
+
};
|
|
134
|
+
readonly "image build": {
|
|
135
|
+
readonly description: "Build a container image";
|
|
136
|
+
readonly options: readonly ["directory", "engine", "file", "image", "uid", "gid"];
|
|
137
|
+
};
|
|
138
|
+
readonly "image remove": {
|
|
139
|
+
readonly description: "Remove a container image";
|
|
140
|
+
readonly options: readonly ["directory", "engine", "image"];
|
|
76
141
|
};
|
|
142
|
+
readonly "recovery inspect": {
|
|
143
|
+
readonly description: "Inspect recovery inventory";
|
|
144
|
+
readonly options: readonly ["repository", "max-entries", "git", "locks", "resources", "json"];
|
|
145
|
+
};
|
|
146
|
+
readonly "recovery verify": {
|
|
147
|
+
readonly description: "Verify a retained transfer";
|
|
148
|
+
readonly options: readonly ["directory", "checksums", "max-bytes", "restorability", "repository", "json"];
|
|
149
|
+
};
|
|
150
|
+
readonly "recovery restore": {
|
|
151
|
+
readonly description: "Restore a retained transfer";
|
|
152
|
+
readonly options: readonly ["directory", "repository", "destination", "side", "max-bytes", "apply", "json"];
|
|
153
|
+
};
|
|
154
|
+
readonly "recovery prune": {
|
|
155
|
+
readonly description: "Apply an explicit retention policy";
|
|
156
|
+
readonly options: readonly ["policy", "repository", "apply", "json"];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const initializationQuestions: readonly [{
|
|
160
|
+
readonly key: "agent";
|
|
161
|
+
readonly message: "Coding agent";
|
|
162
|
+
readonly choices: readonly ["codex", "claude", "gemini"];
|
|
163
|
+
}, {
|
|
164
|
+
readonly key: "provider";
|
|
165
|
+
readonly message: "Sandbox provider";
|
|
166
|
+
readonly choices: readonly ["docker", "podman", "vercel", "daytona", "local"];
|
|
167
|
+
}];
|
|
168
|
+
export declare const authenticationChoices: {
|
|
169
|
+
readonly codex: readonly [{
|
|
170
|
+
readonly value: "api-key";
|
|
171
|
+
readonly label: "OpenAI API key (API billing)";
|
|
172
|
+
}, {
|
|
173
|
+
readonly value: "login";
|
|
174
|
+
readonly label: "Existing Codex account login";
|
|
175
|
+
}];
|
|
176
|
+
readonly claude: readonly [{
|
|
177
|
+
readonly value: "api-key";
|
|
178
|
+
readonly label: "Anthropic API key (API billing)";
|
|
179
|
+
}, {
|
|
180
|
+
readonly value: "oauth-token";
|
|
181
|
+
readonly label: "Claude subscription token (claude setup-token)";
|
|
182
|
+
}];
|
|
183
|
+
readonly gemini: readonly [{
|
|
184
|
+
readonly value: "api-key";
|
|
185
|
+
readonly label: "Gemini API key";
|
|
186
|
+
}];
|
|
77
187
|
};
|
|
78
|
-
export declare const initializationQuestions: readonly [readonly ["agent", "Agent (codex/claude)", "codex"], readonly ["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"]];
|
|
@@ -1,47 +1,153 @@
|
|
|
1
|
-
export const help = `Outpost — sandboxed coding agents and workflows
|
|
2
|
-
|
|
3
|
-
outpost init [--yes] [--agent codex|claude] [--provider docker|podman|vercel|daytona|local]
|
|
4
|
-
[--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]
|
|
5
|
-
outpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]
|
|
6
|
-
|
|
7
|
-
outpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude] [--image NAME] [--json]
|
|
8
|
-
|
|
9
|
-
outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--json]
|
|
10
|
-
outpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]
|
|
11
|
-
outpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]
|
|
12
|
-
|
|
13
|
-
Node.js 24+ and Git are required. Run generated scripts with Node.js.
|
|
14
|
-
Initialization writes run.ts and project files directly into --directory (default: current directory).
|
|
15
|
-
--repository selects the target Git repository; relative paths are resolved from the workflow directory.
|
|
16
|
-
`;
|
|
17
1
|
export const cliOptions = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
"base-url": {
|
|
3
|
+
type: "string",
|
|
4
|
+
description: "Custom Codex Responses API base URL (requires --model)",
|
|
5
|
+
},
|
|
6
|
+
"api-key-env": {
|
|
7
|
+
type: "string",
|
|
8
|
+
description: "Custom provider API-key environment variable",
|
|
9
|
+
},
|
|
10
|
+
authentication: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "Authentication: api-key, oauth-token (Claude), login (Codex)",
|
|
13
|
+
},
|
|
14
|
+
help: { type: "boolean", short: "h", description: "Help" },
|
|
15
|
+
yes: {
|
|
16
|
+
type: "boolean",
|
|
17
|
+
short: "y",
|
|
18
|
+
description: "Accept defaults without prompting",
|
|
19
|
+
},
|
|
20
|
+
install: { type: "boolean", description: "Install project dependencies" },
|
|
21
|
+
build: { type: "boolean", description: "Build the container image" },
|
|
22
|
+
json: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
description: "Write a machine-readable JSON report",
|
|
25
|
+
},
|
|
26
|
+
git: { type: "boolean", description: "Inspect workspace Git state" },
|
|
27
|
+
locks: { type: "boolean", description: "Inspect local lock ownership" },
|
|
28
|
+
resources: {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
description: "Inspect recorded sandbox activity",
|
|
31
|
+
},
|
|
32
|
+
restorability: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
description: "Check whether the retained transfer can be restored",
|
|
35
|
+
},
|
|
36
|
+
apply: { type: "boolean", description: "Apply changes (default: preview)" },
|
|
37
|
+
policy: { type: "string", description: "Retention policy file" },
|
|
38
|
+
checksums: { type: "boolean", description: "Verify retained file checksums" },
|
|
39
|
+
"max-bytes": { type: "string", description: "Maximum bytes to inspect" },
|
|
40
|
+
"max-entries": { type: "string", description: "Maximum inventory entries" },
|
|
41
|
+
agent: { type: "string", description: "Agent: codex, claude or gemini" },
|
|
42
|
+
provider: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Provider: docker, podman, local, vercel or daytona",
|
|
45
|
+
},
|
|
46
|
+
manager: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Package manager: npm, pnpm, yarn or bun",
|
|
49
|
+
},
|
|
50
|
+
model: { type: "string", description: "Agent model name" },
|
|
51
|
+
directory: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Workflow or retained transfer directory",
|
|
54
|
+
},
|
|
55
|
+
repository: { type: "string", description: "Target Git repository" },
|
|
56
|
+
destination: { type: "string", description: "New restoration directory" },
|
|
57
|
+
side: { type: "string", description: "Transfer side: previous or incoming" },
|
|
58
|
+
engine: { type: "string", description: "Container engine: docker or podman" },
|
|
59
|
+
file: { type: "string", description: "Container recipe path" },
|
|
60
|
+
image: { type: "string", description: "Container image name" },
|
|
61
|
+
uid: { type: "string", description: "Container user ID" },
|
|
62
|
+
gid: { type: "string", description: "Container group ID" },
|
|
63
|
+
};
|
|
64
|
+
export const commandOptions = {
|
|
65
|
+
init: {
|
|
66
|
+
description: "Create a standalone workflow project",
|
|
67
|
+
options: [
|
|
68
|
+
"yes",
|
|
69
|
+
"agent",
|
|
70
|
+
"provider",
|
|
71
|
+
"manager",
|
|
72
|
+
"authentication",
|
|
73
|
+
"model",
|
|
74
|
+
"base-url",
|
|
75
|
+
"api-key-env",
|
|
76
|
+
"install",
|
|
77
|
+
"build",
|
|
78
|
+
"image",
|
|
79
|
+
"directory",
|
|
80
|
+
"repository",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
doctor: {
|
|
84
|
+
description: "Diagnose host and sandbox prerequisites",
|
|
85
|
+
options: ["provider", "agent", "image", "json"],
|
|
86
|
+
},
|
|
87
|
+
"image build": {
|
|
88
|
+
description: "Build a container image",
|
|
89
|
+
options: ["directory", "engine", "file", "image", "uid", "gid"],
|
|
90
|
+
},
|
|
91
|
+
"image remove": {
|
|
92
|
+
description: "Remove a container image",
|
|
93
|
+
options: ["directory", "engine", "image"],
|
|
94
|
+
},
|
|
95
|
+
"recovery inspect": {
|
|
96
|
+
description: "Inspect recovery inventory",
|
|
97
|
+
options: ["repository", "max-entries", "git", "locks", "resources", "json"],
|
|
98
|
+
},
|
|
99
|
+
"recovery verify": {
|
|
100
|
+
description: "Verify a retained transfer",
|
|
101
|
+
options: [
|
|
102
|
+
"directory",
|
|
103
|
+
"checksums",
|
|
104
|
+
"max-bytes",
|
|
105
|
+
"restorability",
|
|
106
|
+
"repository",
|
|
107
|
+
"json",
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
"recovery restore": {
|
|
111
|
+
description: "Restore a retained transfer",
|
|
112
|
+
options: [
|
|
113
|
+
"directory",
|
|
114
|
+
"repository",
|
|
115
|
+
"destination",
|
|
116
|
+
"side",
|
|
117
|
+
"max-bytes",
|
|
118
|
+
"apply",
|
|
119
|
+
"json",
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
"recovery prune": {
|
|
123
|
+
description: "Apply an explicit retention policy",
|
|
124
|
+
options: ["policy", "repository", "apply", "json"],
|
|
125
|
+
},
|
|
42
126
|
};
|
|
43
127
|
export const initializationQuestions = [
|
|
44
|
-
|
|
45
|
-
|
|
128
|
+
{
|
|
129
|
+
key: "agent",
|
|
130
|
+
message: "Coding agent",
|
|
131
|
+
choices: ["codex", "claude", "gemini"],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
key: "provider",
|
|
135
|
+
message: "Sandbox provider",
|
|
136
|
+
choices: ["docker", "podman", "vercel", "daytona", "local"],
|
|
137
|
+
},
|
|
46
138
|
];
|
|
139
|
+
export const authenticationChoices = {
|
|
140
|
+
codex: [
|
|
141
|
+
{ value: "api-key", label: "OpenAI API key (API billing)" },
|
|
142
|
+
{ value: "login", label: "Existing Codex account login" },
|
|
143
|
+
],
|
|
144
|
+
claude: [
|
|
145
|
+
{ value: "api-key", label: "Anthropic API key (API billing)" },
|
|
146
|
+
{
|
|
147
|
+
value: "oauth-token",
|
|
148
|
+
label: "Claude subscription token (claude setup-token)",
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
gemini: [{ value: "api-key", label: "Gemini API key" }],
|
|
152
|
+
};
|
|
47
153
|
//# 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,
|
|
1
|
+
{"version":3,"file":"main.constants.js","sourceRoot":"","sources":["../../src/cli/main.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wDAAwD;KACtE;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8CAA8C;KAC5D;IACD,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8DAA8D;KAC5E;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE;IAC1D,GAAG,EAAE;QACH,IA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E,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,iCAAiC,EAAE;QAC9D;YACE,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,gDAAgD;SACxD;KACF;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC/C,CAAC","sourcesContent":["export const cliOptions = {\n \"base-url\": {\n type: \"string\",\n description: \"Custom Codex Responses API base URL (requires --model)\",\n },\n \"api-key-env\": {\n type: \"string\",\n description: \"Custom provider API-key environment variable\",\n },\n authentication: {\n type: \"string\",\n description: \"Authentication: api-key, oauth-token (Claude), login (Codex)\",\n },\n help: { type: \"boolean\", short: \"h\", description: \"Help\" },\n yes: {\n type: \"boolean\",\n short: \"y\",\n description: \"Accept defaults without prompting\",\n },\n install: { type: \"boolean\", description: \"Install project dependencies\" },\n build: { type: \"boolean\", description: \"Build the container image\" },\n json: {\n type: \"boolean\",\n description: \"Write a machine-readable JSON report\",\n },\n git: { type: \"boolean\", description: \"Inspect workspace Git state\" },\n locks: { type: \"boolean\", description: \"Inspect local lock ownership\" },\n resources: {\n type: \"boolean\",\n description: \"Inspect recorded sandbox activity\",\n },\n restorability: {\n type: \"boolean\",\n description: \"Check whether the retained transfer can be restored\",\n },\n apply: { type: \"boolean\", description: \"Apply changes (default: preview)\" },\n policy: { type: \"string\", description: \"Retention policy file\" },\n checksums: { type: \"boolean\", description: \"Verify retained file checksums\" },\n \"max-bytes\": { type: \"string\", description: \"Maximum bytes to inspect\" },\n \"max-entries\": { type: \"string\", description: \"Maximum inventory entries\" },\n agent: { type: \"string\", description: \"Agent: codex, claude or gemini\" },\n provider: {\n type: \"string\",\n description: \"Provider: docker, podman, local, vercel or daytona\",\n },\n manager: {\n type: \"string\",\n description: \"Package manager: npm, pnpm, yarn or bun\",\n },\n model: { type: \"string\", description: \"Agent model name\" },\n directory: {\n type: \"string\",\n description: \"Workflow or retained transfer directory\",\n },\n repository: { type: \"string\", description: \"Target Git repository\" },\n destination: { type: \"string\", description: \"New restoration directory\" },\n side: { type: \"string\", description: \"Transfer side: previous or incoming\" },\n engine: { type: \"string\", description: \"Container engine: docker or podman\" },\n file: { type: \"string\", description: \"Container recipe path\" },\n image: { type: \"string\", description: \"Container image name\" },\n uid: { type: \"string\", description: \"Container user ID\" },\n gid: { type: \"string\", description: \"Container group ID\" },\n} as const;\n\nexport const commandOptions = {\n init: {\n description: \"Create a standalone workflow project\",\n options: [\n \"yes\",\n \"agent\",\n \"provider\",\n \"manager\",\n \"authentication\",\n \"model\",\n \"base-url\",\n \"api-key-env\",\n \"install\",\n \"build\",\n \"image\",\n \"directory\",\n \"repository\",\n ],\n },\n doctor: {\n description: \"Diagnose host and sandbox prerequisites\",\n options: [\"provider\", \"agent\", \"image\", \"json\"],\n },\n \"image build\": {\n description: \"Build a container image\",\n options: [\"directory\", \"engine\", \"file\", \"image\", \"uid\", \"gid\"],\n },\n \"image remove\": {\n description: \"Remove a container image\",\n options: [\"directory\", \"engine\", \"image\"],\n },\n \"recovery inspect\": {\n description: \"Inspect recovery inventory\",\n options: [\"repository\", \"max-entries\", \"git\", \"locks\", \"resources\", \"json\"],\n },\n \"recovery verify\": {\n description: \"Verify a retained transfer\",\n options: [\n \"directory\",\n \"checksums\",\n \"max-bytes\",\n \"restorability\",\n \"repository\",\n \"json\",\n ],\n },\n \"recovery restore\": {\n description: \"Restore a retained transfer\",\n options: [\n \"directory\",\n \"repository\",\n \"destination\",\n \"side\",\n \"max-bytes\",\n \"apply\",\n \"json\",\n ],\n },\n \"recovery prune\": {\n description: \"Apply an explicit retention policy\",\n options: [\"policy\", \"repository\", \"apply\", \"json\"],\n },\n} as const;\n\nexport const initializationQuestions = [\n {\n key: \"agent\",\n message: \"Coding agent\",\n choices: [\"codex\", \"claude\", \"gemini\"],\n },\n {\n key: \"provider\",\n message: \"Sandbox provider\",\n choices: [\"docker\", \"podman\", \"vercel\", \"daytona\", \"local\"],\n },\n] as const;\n\nexport const authenticationChoices = {\n codex: [\n { value: \"api-key\", label: \"OpenAI API key (API billing)\" },\n { value: \"login\", label: \"Existing Codex account login\" },\n ],\n claude: [\n { value: \"api-key\", label: \"Anthropic API key (API billing)\" },\n {\n value: \"oauth-token\",\n label: \"Claude subscription token (claude setup-token)\",\n },\n ],\n gemini: [{ value: \"api-key\", label: \"Gemini API key\" }],\n} as const;\n"]}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
import { recoveryRestoreCommand } from "./recovery-restore-command.js";
|
|
1
2
|
import { recoveryPruneCommand } from "./recovery-prune-command.js";
|
|
2
3
|
import { recoveryVerifyCommand } from "./recovery-verify-command.js";
|
|
3
4
|
import { inspectRecovery } from "../application/recovery-inspection.js";
|
|
4
5
|
import { invariant, positive } from "../domain/errors.js";
|
|
5
6
|
export async function recoveryCommand({ values, positionals, }) {
|
|
7
|
+
if (positionals[1] === "restore")
|
|
8
|
+
return recoveryRestoreCommand({ values, positionals });
|
|
6
9
|
if (positionals[1] === "prune")
|
|
7
10
|
return recoveryPruneCommand({ values, positionals });
|
|
8
11
|
if (positionals[1] === "verify")
|
|
9
12
|
return recoveryVerifyCommand({ values, positionals });
|
|
10
|
-
invariant(positionals.length === 2 && positionals[1] === "inspect", "Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--json]");
|
|
13
|
+
invariant(positionals.length === 2 && positionals[1] === "inspect", "Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]");
|
|
11
14
|
for (const key of Object.keys(values))
|
|
12
|
-
invariant([
|
|
15
|
+
invariant([
|
|
16
|
+
"repository",
|
|
17
|
+
"max-entries",
|
|
18
|
+
"git",
|
|
19
|
+
"locks",
|
|
20
|
+
"resources",
|
|
21
|
+
"json",
|
|
22
|
+
].includes(key), `Unsupported recovery option: --${key}`);
|
|
13
23
|
const maxEntries = values["max-entries"] === undefined
|
|
14
24
|
? undefined
|
|
15
25
|
: positive(Number(values["max-entries"]), "max-entries");
|
|
@@ -19,6 +29,7 @@ export async function recoveryCommand({ values, positionals, }) {
|
|
|
19
29
|
: {}),
|
|
20
30
|
...(maxEntries !== undefined ? { maxEntries } : {}),
|
|
21
31
|
...(values.git ? { git: true } : {}),
|
|
32
|
+
...(values.resources ? { resources: true } : {}),
|
|
22
33
|
...(values.locks ? { locks: true } : {}),
|
|
23
34
|
});
|
|
24
35
|
if (values.json)
|
|
@@ -53,17 +64,30 @@ export async function recoveryCommand({ values, positionals, }) {
|
|
|
53
64
|
process.stdout.write(`[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\n`);
|
|
54
65
|
process.stdout.write("PID presence does not prove lock ownership; PID absence does not authorize deletion.\n");
|
|
55
66
|
}
|
|
67
|
+
if (report.resources) {
|
|
68
|
+
process.stdout.write(`Recorded sandbox activity: ${report.resources.complete ? "complete for listed records" : "partial"}\n`);
|
|
69
|
+
for (const entry of report.resources.entries) {
|
|
70
|
+
const detail = entry.record
|
|
71
|
+
? `${JSON.stringify(entry.record.provider)} | ${entry.record.phase} | ${entry.record.operations.map((operation) => `${operation.kind} (${operation.count})`).join(", ") || "idle"}`
|
|
72
|
+
: "unreadable";
|
|
73
|
+
process.stdout.write(` ${JSON.stringify(entry.path)} | ${detail} | ownership ${entry.ownership.status}: ${entry.ownership.reason}\n`);
|
|
74
|
+
}
|
|
75
|
+
for (const issue of report.resources.issues)
|
|
76
|
+
process.stdout.write(`[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\n`);
|
|
77
|
+
process.stdout.write("Recorded activity is a snapshot; stale or unknown ownership does not authorize resource deletion. Provider resources are not queried.\n");
|
|
78
|
+
}
|
|
56
79
|
for (const issue of report.issues)
|
|
57
80
|
process.stdout.write(`[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\n`);
|
|
58
81
|
process.stdout.write(`Total observed: ${report.usage.bytes} bytes in ${report.usage.files} files; ${report.scannedEntries}/${report.maxEntries} entries scanned.\n`);
|
|
59
82
|
process.stdout.write(`${report.complete ? "Inventory complete." : "Inventory incomplete; totals are partial."} File sizes are logical bytes; symlink targets are excluded.\n`);
|
|
60
|
-
process.stdout.write(report.git || report.locks
|
|
83
|
+
process.stdout.write(report.git || report.locks || report.resources
|
|
61
84
|
? "Activity and recovery integrity are unverified. No raw file contents were displayed or files removed.\n"
|
|
62
85
|
: "Activity and recovery integrity are unverified. No files were read for content or removed.\n");
|
|
63
86
|
}
|
|
64
87
|
if (!report.complete ||
|
|
65
88
|
report.git?.complete === false ||
|
|
66
|
-
report.locks?.complete === false
|
|
89
|
+
report.locks?.complete === false ||
|
|
90
|
+
report.resources?.complete === false)
|
|
67
91
|
process.exitCode = 1;
|
|
68
92
|
}
|
|
69
93
|
//# sourceMappingURL=recovery-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recovery-command.js","sourceRoot":"","sources":["../../src/cli/recovery-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG1D,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EACpC,MAAM,EACN,WAAW,GACG;IACd,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,OAAO;QAC5B,OAAO,oBAAoB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACvD,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC7B,OAAO,qBAAqB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACxD,SAAS,CACP,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,SAAS,EACxD,uGAAuG,CACxG,CAAC;IACF,KAAK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;YACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM;gBACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,aAAa,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAC3D,CAAC;YACJ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wFAAwF,CACzF,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;YAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,aAAa,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAC3D,CAAC;QACJ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,mBAAmB,MAAM,CAAC,KAAK,CAAC,KAAK,aAAa,MAAM,CAAC,KAAK,CAAC,KAAK,WAAW,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,UAAU,qBAAqB,CAC/I,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,2CAA2C,gEAAgE,CACzJ,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK;YACxB,CAAC,CAAC,yGAAyG;YAC3G,CAAC,CAAC,8FAA8F,CACnG,CAAC;IACJ,CAAC;IACD,IACE,CAAC,MAAM,CAAC,QAAQ;QAChB,MAAM,CAAC,GAAG,EAAE,QAAQ,KAAK,KAAK;QAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK;QAEhC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { recoveryPruneCommand } from \"./recovery-prune-command.ts\";\nimport { recoveryVerifyCommand } from \"./recovery-verify-command.ts\";\nimport { inspectRecovery } from \"../application/recovery-inspection.ts\";\nimport { invariant, positive } from \"../domain/errors.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nexport async function recoveryCommand({\n values,\n positionals,\n}: CliInvocation): Promise<void> {\n if (positionals[1] === \"prune\")\n return recoveryPruneCommand({ values, positionals });\n if (positionals[1] === \"verify\")\n return recoveryVerifyCommand({ values, positionals });\n invariant(\n positionals.length === 2 && positionals[1] === \"inspect\",\n \"Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\"repository\", \"max-entries\", \"git\", \"locks\", \"json\"].includes(key),\n `Unsupported recovery option: --${key}`,\n );\n const maxEntries =\n values[\"max-entries\"] === undefined\n ? undefined\n : positive(Number(values[\"max-entries\"]), \"max-entries\");\n const report = await inspectRecovery({\n ...(values.repository !== undefined\n ? { repository: values.repository }\n : {}),\n ...(maxEntries !== undefined ? { maxEntries } : {}),\n ...(values.git ? { git: true } : {}),\n ...(values.locks ? { locks: true } : {}),\n });\n if (values.json) process.stdout.write(`${JSON.stringify(report, null, 2)}\\n`);\n else {\n process.stdout.write(\n `Outpost recovery inspection — ${JSON.stringify(report.repository)}\\n`,\n );\n for (const category of report.categories) {\n process.stdout.write(\n `${category.name}: ${category.entries.length} listed entries\\n`,\n );\n for (const entry of category.entries)\n process.stdout.write(\n ` ${JSON.stringify(entry.name)} | ${entry.kind} | ${entry.bytes} bytes | ${entry.files} files | ${entry.symlinks} symlinks | ${entry.modifiedAt ?? \"unknown time\"} | ${entry.complete ? \"complete\" : \"partial\"}\\n`,\n );\n }\n if (report.git) {\n process.stdout.write(\n `Workspace Git inspection: ${report.git.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const workspace of report.git.workspaces) {\n const detail =\n workspace.state === \"registered\"\n ? `${workspace.branch === null ? \"detached HEAD\" : JSON.stringify(workspace.branch)} | ${workspace.dirty ? \"dirty\" : \"clean\"} | ${workspace.head}${workspace.locked ? \" | Git locked\" : \"\"}`\n : workspace.state;\n process.stdout.write(\n ` ${JSON.stringify(workspace.name)} | ${detail}\\n`,\n );\n }\n for (const issue of report.git.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Git status excludes ignored files. Clean does not mean safe to delete.\\n\",\n );\n }\n if (report.locks) {\n process.stdout.write(\n `Lock PID inspection (local host): ${report.locks.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const lock of report.locks.entries) {\n const pid = \"pid\" in lock ? ` | PID ${lock.pid}` : \"\";\n const reason = \"reason\" in lock ? ` | ${lock.reason}` : \"\";\n process.stdout.write(\n ` ${JSON.stringify(lock.name)} | ${lock.state}${pid}${reason}${lock.ownership ? ` | ownership ${lock.ownership.status}: ${lock.ownership.reason}` : \"\"}\\n`,\n );\n }\n for (const issue of report.locks.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"PID presence does not prove lock ownership; PID absence does not authorize deletion.\\n\",\n );\n }\n for (const issue of report.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n `Total observed: ${report.usage.bytes} bytes in ${report.usage.files} files; ${report.scannedEntries}/${report.maxEntries} entries scanned.\\n`,\n );\n process.stdout.write(\n `${report.complete ? \"Inventory complete.\" : \"Inventory incomplete; totals are partial.\"} File sizes are logical bytes; symlink targets are excluded.\\n`,\n );\n process.stdout.write(\n report.git || report.locks\n ? \"Activity and recovery integrity are unverified. No raw file contents were displayed or files removed.\\n\"\n : \"Activity and recovery integrity are unverified. No files were read for content or removed.\\n\",\n );\n }\n if (\n !report.complete ||\n report.git?.complete === false ||\n report.locks?.complete === false\n )\n process.exitCode = 1;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"recovery-command.js","sourceRoot":"","sources":["../../src/c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,KAAK,CAClB,aAAa,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAC3D,CAAC;QACJ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,mBAAmB,MAAM,CAAC,KAAK,CAAC,KAAK,aAAa,MAAM,CAAC,KAAK,CAAC,KAAK,WAAW,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,UAAU,qBAAqB,CAC/I,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,2CAA2C,gEAAgE,CACzJ,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS;YAC5C,CAAC,CAAC,yGAAyG;YAC3G,CAAC,CAAC,8FAA8F,CACnG,CAAC;IACJ,CAAC;IACD,IACE,CAAC,MAAM,CAAC,QAAQ;QAChB,MAAM,CAAC,GAAG,EAAE,QAAQ,KAAK,KAAK;QAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK;QAChC,MAAM,CAAC,SAAS,EAAE,QAAQ,KAAK,KAAK;QAEpC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { recoveryRestoreCommand } from \"./recovery-restore-command.ts\";\nimport { recoveryPruneCommand } from \"./recovery-prune-command.ts\";\nimport { recoveryVerifyCommand } from \"./recovery-verify-command.ts\";\nimport { inspectRecovery } from \"../application/recovery-inspection.ts\";\nimport { invariant, positive } from \"../domain/errors.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nexport async function recoveryCommand({\n values,\n positionals,\n}: CliInvocation): Promise<void> {\n if (positionals[1] === \"restore\")\n return recoveryRestoreCommand({ values, positionals });\n if (positionals[1] === \"prune\")\n return recoveryPruneCommand({ values, positionals });\n if (positionals[1] === \"verify\")\n return recoveryVerifyCommand({ values, positionals });\n invariant(\n positionals.length === 2 && positionals[1] === \"inspect\",\n \"Usage: outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\n \"repository\",\n \"max-entries\",\n \"git\",\n \"locks\",\n \"resources\",\n \"json\",\n ].includes(key),\n `Unsupported recovery option: --${key}`,\n );\n const maxEntries =\n values[\"max-entries\"] === undefined\n ? undefined\n : positive(Number(values[\"max-entries\"]), \"max-entries\");\n const report = await inspectRecovery({\n ...(values.repository !== undefined\n ? { repository: values.repository }\n : {}),\n ...(maxEntries !== undefined ? { maxEntries } : {}),\n ...(values.git ? { git: true } : {}),\n ...(values.resources ? { resources: true } : {}),\n ...(values.locks ? { locks: true } : {}),\n });\n if (values.json) process.stdout.write(`${JSON.stringify(report, null, 2)}\\n`);\n else {\n process.stdout.write(\n `Outpost recovery inspection — ${JSON.stringify(report.repository)}\\n`,\n );\n for (const category of report.categories) {\n process.stdout.write(\n `${category.name}: ${category.entries.length} listed entries\\n`,\n );\n for (const entry of category.entries)\n process.stdout.write(\n ` ${JSON.stringify(entry.name)} | ${entry.kind} | ${entry.bytes} bytes | ${entry.files} files | ${entry.symlinks} symlinks | ${entry.modifiedAt ?? \"unknown time\"} | ${entry.complete ? \"complete\" : \"partial\"}\\n`,\n );\n }\n if (report.git) {\n process.stdout.write(\n `Workspace Git inspection: ${report.git.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const workspace of report.git.workspaces) {\n const detail =\n workspace.state === \"registered\"\n ? `${workspace.branch === null ? \"detached HEAD\" : JSON.stringify(workspace.branch)} | ${workspace.dirty ? \"dirty\" : \"clean\"} | ${workspace.head}${workspace.locked ? \" | Git locked\" : \"\"}`\n : workspace.state;\n process.stdout.write(\n ` ${JSON.stringify(workspace.name)} | ${detail}\\n`,\n );\n }\n for (const issue of report.git.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Git status excludes ignored files. Clean does not mean safe to delete.\\n\",\n );\n }\n if (report.locks) {\n process.stdout.write(\n `Lock PID inspection (local host): ${report.locks.complete ? \"complete for listed entries\" : \"partial\"}\\n`,\n );\n for (const lock of report.locks.entries) {\n const pid = \"pid\" in lock ? ` | PID ${lock.pid}` : \"\";\n const reason = \"reason\" in lock ? ` | ${lock.reason}` : \"\";\n process.stdout.write(\n ` ${JSON.stringify(lock.name)} | ${lock.state}${pid}${reason}${lock.ownership ? ` | ownership ${lock.ownership.status}: ${lock.ownership.reason}` : \"\"}\\n`,\n );\n }\n for (const issue of report.locks.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"PID presence does not prove lock ownership; PID absence does not authorize deletion.\\n\",\n );\n }\n if (report.resources) {\n process.stdout.write(\n `Recorded sandbox activity: ${report.resources.complete ? \"complete for listed records\" : \"partial\"}\\n`,\n );\n for (const entry of report.resources.entries) {\n const detail = entry.record\n ? `${JSON.stringify(entry.record.provider)} | ${entry.record.phase} | ${entry.record.operations.map((operation) => `${operation.kind} (${operation.count})`).join(\", \") || \"idle\"}`\n : \"unreadable\";\n process.stdout.write(\n ` ${JSON.stringify(entry.path)} | ${detail} | ownership ${entry.ownership.status}: ${entry.ownership.reason}\\n`,\n );\n }\n for (const issue of report.resources.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n \"Recorded activity is a snapshot; stale or unknown ownership does not authorize resource deletion. Provider resources are not queried.\\n\",\n );\n }\n for (const issue of report.issues)\n process.stdout.write(\n `[PARTIAL] ${issue.code}: ${JSON.stringify(issue.path)}\\n`,\n );\n process.stdout.write(\n `Total observed: ${report.usage.bytes} bytes in ${report.usage.files} files; ${report.scannedEntries}/${report.maxEntries} entries scanned.\\n`,\n );\n process.stdout.write(\n `${report.complete ? \"Inventory complete.\" : \"Inventory incomplete; totals are partial.\"} File sizes are logical bytes; symlink targets are excluded.\\n`,\n );\n process.stdout.write(\n report.git || report.locks || report.resources\n ? \"Activity and recovery integrity are unverified. No raw file contents were displayed or files removed.\\n\"\n : \"Activity and recovery integrity are unverified. No files were read for content or removed.\\n\",\n );\n }\n if (\n !report.complete ||\n report.git?.complete === false ||\n report.locks?.complete === false ||\n report.resources?.complete === false\n )\n process.exitCode = 1;\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { planRecoveryRestore, restoreRecoveryTransfer, } from "../application/recovery-restore.js";
|
|
2
|
+
import { invariant, positive } from "../domain/errors.js";
|
|
3
|
+
export async function recoveryRestoreCommand({ values, positionals, }) {
|
|
4
|
+
invariant(positionals.length === 2 &&
|
|
5
|
+
!!values.directory &&
|
|
6
|
+
!!values.repository &&
|
|
7
|
+
!!values.destination &&
|
|
8
|
+
(values.side === "previous" || values.side === "incoming"), "Usage: outpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]");
|
|
9
|
+
for (const key of Object.keys(values))
|
|
10
|
+
invariant([
|
|
11
|
+
"directory",
|
|
12
|
+
"repository",
|
|
13
|
+
"destination",
|
|
14
|
+
"side",
|
|
15
|
+
"max-bytes",
|
|
16
|
+
"apply",
|
|
17
|
+
"json",
|
|
18
|
+
].includes(key), `Unsupported recovery restore option: --${key}`);
|
|
19
|
+
const plan = await planRecoveryRestore({
|
|
20
|
+
directory: values.directory,
|
|
21
|
+
repository: values.repository,
|
|
22
|
+
destination: values.destination,
|
|
23
|
+
side: values.side,
|
|
24
|
+
...(values["max-bytes"] === undefined
|
|
25
|
+
? {}
|
|
26
|
+
: { maxBytes: positive(Number(values["max-bytes"]), "max-bytes") }),
|
|
27
|
+
});
|
|
28
|
+
const result = values.apply ? await restoreRecoveryTransfer(plan) : plan;
|
|
29
|
+
if (values.json)
|
|
30
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
31
|
+
else
|
|
32
|
+
process.stdout.write(`${values.apply ? "Restored" : "Planned"} ${plan.side} recovery at ${JSON.stringify(plan.destination)}\nCommit: ${plan.commit}; staging: ${plan.staging}. Source retained.\n${values.apply ? "Review the detached checkout before explicitly integrating it.\n" : "No destination created. Use --apply to restore into this new directory.\n"}`);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=recovery-restore-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-restore-command.js","sourceRoot":"","sources":["../../src/cli/recovery-restore-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG1D,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,MAAM,EACN,WAAW,GACG;IACd,SAAS,CACP,WAAW,CAAC,MAAM,KAAK,CAAC;QACtB,CAAC,CAAC,MAAM,CAAC,SAAS;QAClB,CAAC,CAAC,MAAM,CAAC,UAAU;QACnB,CAAC,CAAC,MAAM,CAAC,WAAW;QACpB,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,EAC5D,qKAAqK,CACtK,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACnC,SAAS,CACP;YACE,WAAW;YACX,YAAY;YACZ,aAAa;YACb,MAAM;YACN,WAAW;YACX,OAAO;YACP,MAAM;SACP,CAAC,QAAQ,CAAC,GAAG,CAAC,EACf,0CAA0C,GAAG,EAAE,CAChD,CAAC;IACJ,MAAM,IAAI,GAAG,MAAM,mBAAmB,CAAC;QACrC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,SAAS;YACnC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;KACtE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzE,IAAI,MAAM,CAAC,IAAI;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;;QAE5E,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,gBAAgB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,MAAM,cAAc,IAAI,CAAC,OAAO,uBAAuB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,kEAAkE,CAAC,CAAC,CAAC,2EAA2E,EAAE,CAChV,CAAC;AACN,CAAC","sourcesContent":["import {\n planRecoveryRestore,\n restoreRecoveryTransfer,\n} from \"../application/recovery-restore.ts\";\nimport { invariant, positive } from \"../domain/errors.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\n\nexport async function recoveryRestoreCommand({\n values,\n positionals,\n}: CliInvocation): Promise<void> {\n invariant(\n positionals.length === 2 &&\n !!values.directory &&\n !!values.repository &&\n !!values.destination &&\n (values.side === \"previous\" || values.side === \"incoming\"),\n \"Usage: outpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]\",\n );\n for (const key of Object.keys(values))\n invariant(\n [\n \"directory\",\n \"repository\",\n \"destination\",\n \"side\",\n \"max-bytes\",\n \"apply\",\n \"json\",\n ].includes(key),\n `Unsupported recovery restore option: --${key}`,\n );\n const plan = await planRecoveryRestore({\n directory: values.directory,\n repository: values.repository,\n destination: values.destination,\n side: values.side,\n ...(values[\"max-bytes\"] === undefined\n ? {}\n : { maxBytes: positive(Number(values[\"max-bytes\"]), \"max-bytes\") }),\n });\n const result = values.apply ? await restoreRecoveryTransfer(plan) : plan;\n if (values.json) process.stdout.write(`${JSON.stringify(result, null, 2)}\\n`);\n else\n process.stdout.write(\n `${values.apply ? \"Restored\" : \"Planned\"} ${plan.side} recovery at ${JSON.stringify(plan.destination)}\\nCommit: ${plan.commit}; staging: ${plan.staging}. Source retained.\\n${values.apply ? \"Review the detached checkout before explicitly integrating it.\\n\" : \"No destination created. Use --apply to restore into this new directory.\\n\"}`,\n );\n}\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { imageRecipe, providerPackages } from "./scaffold.constants.js";
|
|
3
|
+
import { authenticationEnvironment } from "./init-authentication.js";
|
|
3
4
|
import { starter } from "./starters.js";
|
|
4
5
|
export async function scaffoldFiles(options, hasPackage, extension) {
|
|
5
|
-
const
|
|
6
|
+
const provider = options.provider ?? "docker";
|
|
6
7
|
const files = {
|
|
7
8
|
[`run.${extension}`]: starter(options),
|
|
8
9
|
"brief.md": "Objective: {{OBJECTIVE}}\n\nWork on {{WORK_BRANCH}} from {{BASE_BRANCH}}. Inspect the repository, implement the objective, run relevant tests and commit your changes. When finished, write <outpost>done</outpost>.\n",
|
|
9
|
-
".env.example":
|
|
10
|
+
".env.example": authenticationEnvironment(options),
|
|
10
11
|
".gitignore": "node_modules/\n.env\n.outpost/workspaces/\n.outpost/locks/\n.outpost/recovery/\n.outpost/logs/\n",
|
|
11
12
|
};
|
|
12
13
|
if (provider === "docker" || provider === "podman")
|