@boxes-dev/dvb-runtime 1.0.297 → 1.0.299
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/dist/bin/.bundle-state.json +2 -2
- package/dist/bin/dvb.cjs +6 -6
- package/dist/bin/dvbd.cjs +6 -6
- package/package.json +7 -5
- package/dist/devbox/auth.d.ts +0 -22
- package/dist/devbox/auth.d.ts.map +0 -1
- package/dist/devbox/auth.js +0 -233
- package/dist/devbox/auth.js.map +0 -1
- package/dist/devbox/browser.d.ts +0 -19
- package/dist/devbox/browser.d.ts.map +0 -1
- package/dist/devbox/browser.js +0 -60
- package/dist/devbox/browser.js.map +0 -1
- package/dist/devbox/cli.d.ts +0 -7
- package/dist/devbox/cli.d.ts.map +0 -1
- package/dist/devbox/cli.js +0 -124
- package/dist/devbox/cli.js.map +0 -1
- package/dist/devbox/commandRegistry/args.d.ts +0 -18
- package/dist/devbox/commandRegistry/args.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/args.js +0 -107
- package/dist/devbox/commandRegistry/args.js.map +0 -1
- package/dist/devbox/commandRegistry/catalog.d.ts +0 -4
- package/dist/devbox/commandRegistry/catalog.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/catalog.js +0 -763
- package/dist/devbox/commandRegistry/catalog.js.map +0 -1
- package/dist/devbox/commandRegistry/dispatch.d.ts +0 -3
- package/dist/devbox/commandRegistry/dispatch.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/dispatch.js +0 -61
- package/dist/devbox/commandRegistry/dispatch.js.map +0 -1
- package/dist/devbox/commandRegistry/errors.d.ts +0 -8
- package/dist/devbox/commandRegistry/errors.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/errors.js +0 -26
- package/dist/devbox/commandRegistry/errors.js.map +0 -1
- package/dist/devbox/commandRegistry/help.d.ts +0 -5
- package/dist/devbox/commandRegistry/help.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/help.js +0 -94
- package/dist/devbox/commandRegistry/help.js.map +0 -1
- package/dist/devbox/commandRegistry/resolve.d.ts +0 -7
- package/dist/devbox/commandRegistry/resolve.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/resolve.js +0 -32
- package/dist/devbox/commandRegistry/resolve.js.map +0 -1
- package/dist/devbox/commandRegistry/tab.d.ts +0 -10
- package/dist/devbox/commandRegistry/tab.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/tab.js +0 -83
- package/dist/devbox/commandRegistry/tab.js.map +0 -1
- package/dist/devbox/commandRegistry/types.d.ts +0 -32
- package/dist/devbox/commandRegistry/types.d.ts.map +0 -1
- package/dist/devbox/commandRegistry/types.js +0 -2
- package/dist/devbox/commandRegistry/types.js.map +0 -1
- package/dist/devbox/commands/agent.d.ts +0 -52
- package/dist/devbox/commands/agent.d.ts.map +0 -1
- package/dist/devbox/commands/agent.js +0 -397
- package/dist/devbox/commands/agent.js.map +0 -1
- package/dist/devbox/commands/boxSelect.d.ts +0 -25
- package/dist/devbox/commands/boxSelect.d.ts.map +0 -1
- package/dist/devbox/commands/boxSelect.js +0 -94
- package/dist/devbox/commands/boxSelect.js.map +0 -1
- package/dist/devbox/commands/checkpoint.d.ts +0 -9
- package/dist/devbox/commands/checkpoint.d.ts.map +0 -1
- package/dist/devbox/commands/checkpoint.js +0 -105
- package/dist/devbox/commands/checkpoint.js.map +0 -1
- package/dist/devbox/commands/commandProvider.d.ts +0 -33
- package/dist/devbox/commands/commandProvider.d.ts.map +0 -1
- package/dist/devbox/commands/commandProvider.js +0 -156
- package/dist/devbox/commands/commandProvider.js.map +0 -1
- package/dist/devbox/commands/connect.d.ts +0 -39
- package/dist/devbox/commands/connect.d.ts.map +0 -1
- package/dist/devbox/commands/connect.js +0 -1367
- package/dist/devbox/commands/connect.js.map +0 -1
- package/dist/devbox/commands/connectSessionMapping.d.ts +0 -64
- package/dist/devbox/commands/connectSessionMapping.d.ts.map +0 -1
- package/dist/devbox/commands/connectSessionMapping.js +0 -153
- package/dist/devbox/commands/connectSessionMapping.js.map +0 -1
- package/dist/devbox/commands/cp.d.ts +0 -60
- package/dist/devbox/commands/cp.d.ts.map +0 -1
- package/dist/devbox/commands/cp.js +0 -383
- package/dist/devbox/commands/cp.js.map +0 -1
- package/dist/devbox/commands/daemon.d.ts +0 -4
- package/dist/devbox/commands/daemon.d.ts.map +0 -1
- package/dist/devbox/commands/daemon.js +0 -49
- package/dist/devbox/commands/daemon.js.map +0 -1
- package/dist/devbox/commands/destroy.d.ts +0 -2
- package/dist/devbox/commands/destroy.d.ts.map +0 -1
- package/dist/devbox/commands/destroy.js +0 -204
- package/dist/devbox/commands/destroy.js.map +0 -1
- package/dist/devbox/commands/destroyE2b.d.ts +0 -22
- package/dist/devbox/commands/destroyE2b.d.ts.map +0 -1
- package/dist/devbox/commands/destroyE2b.js +0 -12
- package/dist/devbox/commands/destroyE2b.js.map +0 -1
- package/dist/devbox/commands/destroyLocalState.d.ts +0 -34
- package/dist/devbox/commands/destroyLocalState.d.ts.map +0 -1
- package/dist/devbox/commands/destroyLocalState.js +0 -187
- package/dist/devbox/commands/destroyLocalState.js.map +0 -1
- package/dist/devbox/commands/destroyModal.d.ts +0 -21
- package/dist/devbox/commands/destroyModal.d.ts.map +0 -1
- package/dist/devbox/commands/destroyModal.js +0 -13
- package/dist/devbox/commands/destroyModal.js.map +0 -1
- package/dist/devbox/commands/destroyShared.d.ts +0 -14
- package/dist/devbox/commands/destroyShared.d.ts.map +0 -1
- package/dist/devbox/commands/destroyShared.js +0 -37
- package/dist/devbox/commands/destroyShared.js.map +0 -1
- package/dist/devbox/commands/fork.d.ts +0 -9
- package/dist/devbox/commands/fork.d.ts.map +0 -1
- package/dist/devbox/commands/fork.js +0 -94
- package/dist/devbox/commands/fork.js.map +0 -1
- package/dist/devbox/commands/ide.d.ts +0 -35
- package/dist/devbox/commands/ide.d.ts.map +0 -1
- package/dist/devbox/commands/ide.js +0 -987
- package/dist/devbox/commands/ide.js.map +0 -1
- package/dist/devbox/commands/init/args.d.ts +0 -18
- package/dist/devbox/commands/init/args.d.ts.map +0 -1
- package/dist/devbox/commands/init/args.js +0 -44
- package/dist/devbox/commands/init/args.js.map +0 -1
- package/dist/devbox/commands/init/clack.d.ts +0 -22
- package/dist/devbox/commands/init/clack.d.ts.map +0 -1
- package/dist/devbox/commands/init/clack.js +0 -158
- package/dist/devbox/commands/init/clack.js.map +0 -1
- package/dist/devbox/commands/init/claudeBootstrap.d.ts +0 -49
- package/dist/devbox/commands/init/claudeBootstrap.d.ts.map +0 -1
- package/dist/devbox/commands/init/claudeBootstrap.js +0 -504
- package/dist/devbox/commands/init/claudeBootstrap.js.map +0 -1
- package/dist/devbox/commands/init/codex/artifacts.d.ts +0 -49
- package/dist/devbox/commands/init/codex/artifacts.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/artifacts.js +0 -278
- package/dist/devbox/commands/init/codex/artifacts.js.map +0 -1
- package/dist/devbox/commands/init/codex/config.d.ts +0 -6
- package/dist/devbox/commands/init/codex/config.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/config.js +0 -43
- package/dist/devbox/commands/init/codex/config.js.map +0 -1
- package/dist/devbox/commands/init/codex/events.d.ts +0 -14
- package/dist/devbox/commands/init/codex/events.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/events.js +0 -435
- package/dist/devbox/commands/init/codex/events.js.map +0 -1
- package/dist/devbox/commands/init/codex/execConfig.d.ts +0 -5
- package/dist/devbox/commands/init/codex/execConfig.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/execConfig.js +0 -10
- package/dist/devbox/commands/init/codex/execConfig.js.map +0 -1
- package/dist/devbox/commands/init/codex/index.d.ts +0 -136
- package/dist/devbox/commands/init/codex/index.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/index.js +0 -1115
- package/dist/devbox/commands/init/codex/index.js.map +0 -1
- package/dist/devbox/commands/init/codex/local.d.ts +0 -124
- package/dist/devbox/commands/init/codex/local.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/local.js +0 -1381
- package/dist/devbox/commands/init/codex/local.js.map +0 -1
- package/dist/devbox/commands/init/codex/localExecArgs.d.ts +0 -25
- package/dist/devbox/commands/init/codex/localExecArgs.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/localExecArgs.js +0 -48
- package/dist/devbox/commands/init/codex/localExecArgs.js.map +0 -1
- package/dist/devbox/commands/init/codex/plan.d.ts +0 -99
- package/dist/devbox/commands/init/codex/plan.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/plan.js +0 -231
- package/dist/devbox/commands/init/codex/plan.js.map +0 -1
- package/dist/devbox/commands/init/codex/prompts.d.ts +0 -9
- package/dist/devbox/commands/init/codex/prompts.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/prompts.js +0 -51
- package/dist/devbox/commands/init/codex/prompts.js.map +0 -1
- package/dist/devbox/commands/init/codex/proxy.d.ts +0 -10
- package/dist/devbox/commands/init/codex/proxy.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/proxy.js +0 -32
- package/dist/devbox/commands/init/codex/proxy.js.map +0 -1
- package/dist/devbox/commands/init/codex/remote.d.ts +0 -96
- package/dist/devbox/commands/init/codex/remote.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/remote.js +0 -927
- package/dist/devbox/commands/init/codex/remote.js.map +0 -1
- package/dist/devbox/commands/init/codex/retry.d.ts +0 -17
- package/dist/devbox/commands/init/codex/retry.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/retry.js +0 -17
- package/dist/devbox/commands/init/codex/retry.js.map +0 -1
- package/dist/devbox/commands/init/codex/scanStatus.d.ts +0 -5
- package/dist/devbox/commands/init/codex/scanStatus.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/scanStatus.js +0 -27
- package/dist/devbox/commands/init/codex/scanStatus.js.map +0 -1
- package/dist/devbox/commands/init/codex/shellHistory.d.ts +0 -39
- package/dist/devbox/commands/init/codex/shellHistory.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/shellHistory.js +0 -258
- package/dist/devbox/commands/init/codex/shellHistory.js.map +0 -1
- package/dist/devbox/commands/init/codex/template.d.ts +0 -3
- package/dist/devbox/commands/init/codex/template.d.ts.map +0 -1
- package/dist/devbox/commands/init/codex/template.js +0 -3
- package/dist/devbox/commands/init/codex/template.js.map +0 -1
- package/dist/devbox/commands/init/finalizeFlow.d.ts +0 -95
- package/dist/devbox/commands/init/finalizeFlow.d.ts.map +0 -1
- package/dist/devbox/commands/init/finalizeFlow.js +0 -786
- package/dist/devbox/commands/init/finalizeFlow.js.map +0 -1
- package/dist/devbox/commands/init/index.d.ts +0 -11
- package/dist/devbox/commands/init/index.d.ts.map +0 -1
- package/dist/devbox/commands/init/index.js +0 -1058
- package/dist/devbox/commands/init/index.js.map +0 -1
- package/dist/devbox/commands/init/modal.d.ts +0 -5
- package/dist/devbox/commands/init/modal.d.ts.map +0 -1
- package/dist/devbox/commands/init/modal.js +0 -4
- package/dist/devbox/commands/init/modal.js.map +0 -1
- package/dist/devbox/commands/init/packaging.d.ts +0 -5
- package/dist/devbox/commands/init/packaging.d.ts.map +0 -1
- package/dist/devbox/commands/init/packaging.js +0 -81
- package/dist/devbox/commands/init/packaging.js.map +0 -1
- package/dist/devbox/commands/init/progress.d.ts +0 -31
- package/dist/devbox/commands/init/progress.d.ts.map +0 -1
- package/dist/devbox/commands/init/progress.js +0 -205
- package/dist/devbox/commands/init/progress.js.map +0 -1
- package/dist/devbox/commands/init/provider/e2b.d.ts +0 -29
- package/dist/devbox/commands/init/provider/e2b.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/e2b.js +0 -130
- package/dist/devbox/commands/init/provider/e2b.js.map +0 -1
- package/dist/devbox/commands/init/provider/e2bRuntime.d.ts +0 -39
- package/dist/devbox/commands/init/provider/e2bRuntime.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/e2bRuntime.js +0 -679
- package/dist/devbox/commands/init/provider/e2bRuntime.js.map +0 -1
- package/dist/devbox/commands/init/provider/index.d.ts +0 -8
- package/dist/devbox/commands/init/provider/index.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/index.js +0 -5
- package/dist/devbox/commands/init/provider/index.js.map +0 -1
- package/dist/devbox/commands/init/provider/modal.d.ts +0 -34
- package/dist/devbox/commands/init/provider/modal.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/modal.js +0 -274
- package/dist/devbox/commands/init/provider/modal.js.map +0 -1
- package/dist/devbox/commands/init/provider/modalRuntime.d.ts +0 -3
- package/dist/devbox/commands/init/provider/modalRuntime.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/modalRuntime.js +0 -2
- package/dist/devbox/commands/init/provider/modalRuntime.js.map +0 -1
- package/dist/devbox/commands/init/provider/resolve.d.ts +0 -44
- package/dist/devbox/commands/init/provider/resolve.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/resolve.js +0 -172
- package/dist/devbox/commands/init/provider/resolve.js.map +0 -1
- package/dist/devbox/commands/init/provider/shared.d.ts +0 -10
- package/dist/devbox/commands/init/provider/shared.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/shared.js +0 -2
- package/dist/devbox/commands/init/provider/shared.js.map +0 -1
- package/dist/devbox/commands/init/provider/sprites.d.ts +0 -30
- package/dist/devbox/commands/init/provider/sprites.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/sprites.js +0 -183
- package/dist/devbox/commands/init/provider/sprites.js.map +0 -1
- package/dist/devbox/commands/init/provider/types.d.ts +0 -19
- package/dist/devbox/commands/init/provider/types.d.ts.map +0 -1
- package/dist/devbox/commands/init/provider/types.js +0 -2
- package/dist/devbox/commands/init/provider/types.js.map +0 -1
- package/dist/devbox/commands/init/provisionFlow.d.ts +0 -53
- package/dist/devbox/commands/init/provisionFlow.d.ts.map +0 -1
- package/dist/devbox/commands/init/provisionFlow.js +0 -541
- package/dist/devbox/commands/init/provisionFlow.js.map +0 -1
- package/dist/devbox/commands/init/registry.d.ts +0 -15
- package/dist/devbox/commands/init/registry.d.ts.map +0 -1
- package/dist/devbox/commands/init/registry.js +0 -38
- package/dist/devbox/commands/init/registry.js.map +0 -1
- package/dist/devbox/commands/init/remote.d.ts +0 -48
- package/dist/devbox/commands/init/remote.d.ts.map +0 -1
- package/dist/devbox/commands/init/remote.js +0 -766
- package/dist/devbox/commands/init/remote.js.map +0 -1
- package/dist/devbox/commands/init/repo.d.ts +0 -45
- package/dist/devbox/commands/init/repo.d.ts.map +0 -1
- package/dist/devbox/commands/init/repo.js +0 -235
- package/dist/devbox/commands/init/repo.js.map +0 -1
- package/dist/devbox/commands/init/retryableErrors.d.ts +0 -4
- package/dist/devbox/commands/init/retryableErrors.d.ts.map +0 -1
- package/dist/devbox/commands/init/retryableErrors.js +0 -42
- package/dist/devbox/commands/init/retryableErrors.js.map +0 -1
- package/dist/devbox/commands/init/scanProgress.d.ts +0 -18
- package/dist/devbox/commands/init/scanProgress.d.ts.map +0 -1
- package/dist/devbox/commands/init/scanProgress.js +0 -47
- package/dist/devbox/commands/init/scanProgress.js.map +0 -1
- package/dist/devbox/commands/init/session.d.ts +0 -72
- package/dist/devbox/commands/init/session.d.ts.map +0 -1
- package/dist/devbox/commands/init/session.js +0 -348
- package/dist/devbox/commands/init/session.js.map +0 -1
- package/dist/devbox/commands/init/setupArtifactsValidation.d.ts +0 -28
- package/dist/devbox/commands/init/setupArtifactsValidation.d.ts.map +0 -1
- package/dist/devbox/commands/init/setupArtifactsValidation.js +0 -113
- package/dist/devbox/commands/init/setupArtifactsValidation.js.map +0 -1
- package/dist/devbox/commands/init/setupPlanFlow.d.ts +0 -34
- package/dist/devbox/commands/init/setupPlanFlow.d.ts.map +0 -1
- package/dist/devbox/commands/init/setupPlanFlow.js +0 -967
- package/dist/devbox/commands/init/setupPlanFlow.js.map +0 -1
- package/dist/devbox/commands/init/ssh.d.ts +0 -19
- package/dist/devbox/commands/init/ssh.d.ts.map +0 -1
- package/dist/devbox/commands/init/ssh.js +0 -276
- package/dist/devbox/commands/init/ssh.js.map +0 -1
- package/dist/devbox/commands/init/state.d.ts +0 -73
- package/dist/devbox/commands/init/state.d.ts.map +0 -1
- package/dist/devbox/commands/init/state.js +0 -118
- package/dist/devbox/commands/init/state.js.map +0 -1
- package/dist/devbox/commands/init/statusFlow.d.ts +0 -27
- package/dist/devbox/commands/init/statusFlow.d.ts.map +0 -1
- package/dist/devbox/commands/init/statusFlow.js +0 -160
- package/dist/devbox/commands/init/statusFlow.js.map +0 -1
- package/dist/devbox/commands/list.d.ts +0 -35
- package/dist/devbox/commands/list.d.ts.map +0 -1
- package/dist/devbox/commands/list.js +0 -311
- package/dist/devbox/commands/list.js.map +0 -1
- package/dist/devbox/commands/listFormatting.d.ts +0 -27
- package/dist/devbox/commands/listFormatting.d.ts.map +0 -1
- package/dist/devbox/commands/listFormatting.js +0 -155
- package/dist/devbox/commands/listFormatting.js.map +0 -1
- package/dist/devbox/commands/logout.d.ts +0 -2
- package/dist/devbox/commands/logout.d.ts.map +0 -1
- package/dist/devbox/commands/logout.js +0 -64
- package/dist/devbox/commands/logout.js.map +0 -1
- package/dist/devbox/commands/managedProviderClient.d.ts +0 -24
- package/dist/devbox/commands/managedProviderClient.d.ts.map +0 -1
- package/dist/devbox/commands/managedProviderClient.js +0 -42
- package/dist/devbox/commands/managedProviderClient.js.map +0 -1
- package/dist/devbox/commands/managedProviderContext.d.ts +0 -34
- package/dist/devbox/commands/managedProviderContext.d.ts.map +0 -1
- package/dist/devbox/commands/managedProviderContext.js +0 -34
- package/dist/devbox/commands/managedProviderContext.js.map +0 -1
- package/dist/devbox/commands/mount.d.ts +0 -25
- package/dist/devbox/commands/mount.d.ts.map +0 -1
- package/dist/devbox/commands/mount.js +0 -200
- package/dist/devbox/commands/mount.js.map +0 -1
- package/dist/devbox/commands/ports.d.ts +0 -11
- package/dist/devbox/commands/ports.d.ts.map +0 -1
- package/dist/devbox/commands/ports.js +0 -183
- package/dist/devbox/commands/ports.js.map +0 -1
- package/dist/devbox/commands/power.d.ts +0 -10
- package/dist/devbox/commands/power.d.ts.map +0 -1
- package/dist/devbox/commands/power.js +0 -139
- package/dist/devbox/commands/power.js.map +0 -1
- package/dist/devbox/commands/provider/daemonRuntimeShared.d.ts +0 -25
- package/dist/devbox/commands/provider/daemonRuntimeShared.d.ts.map +0 -1
- package/dist/devbox/commands/provider/daemonRuntimeShared.js +0 -217
- package/dist/devbox/commands/provider/daemonRuntimeShared.js.map +0 -1
- package/dist/devbox/commands/provider/directDaemonRuntime.d.ts +0 -106
- package/dist/devbox/commands/provider/directDaemonRuntime.d.ts.map +0 -1
- package/dist/devbox/commands/provider/directDaemonRuntime.js +0 -1442
- package/dist/devbox/commands/provider/directDaemonRuntime.js.map +0 -1
- package/dist/devbox/commands/provider/e2bCommandContext.d.ts +0 -11
- package/dist/devbox/commands/provider/e2bCommandContext.d.ts.map +0 -1
- package/dist/devbox/commands/provider/e2bCommandContext.js +0 -16
- package/dist/devbox/commands/provider/e2bCommandContext.js.map +0 -1
- package/dist/devbox/commands/provider/e2bLifecycleShared.d.ts +0 -20
- package/dist/devbox/commands/provider/e2bLifecycleShared.d.ts.map +0 -1
- package/dist/devbox/commands/provider/e2bLifecycleShared.js +0 -42
- package/dist/devbox/commands/provider/e2bLifecycleShared.js.map +0 -1
- package/dist/devbox/commands/provider/modalCommandContext.d.ts +0 -22
- package/dist/devbox/commands/provider/modalCommandContext.d.ts.map +0 -1
- package/dist/devbox/commands/provider/modalCommandContext.js +0 -47
- package/dist/devbox/commands/provider/modalCommandContext.js.map +0 -1
- package/dist/devbox/commands/provider/modalLifecycle.d.ts +0 -158
- package/dist/devbox/commands/provider/modalLifecycle.d.ts.map +0 -1
- package/dist/devbox/commands/provider/modalLifecycle.js +0 -702
- package/dist/devbox/commands/provider/modalLifecycle.js.map +0 -1
- package/dist/devbox/commands/provider/modalRuntime.d.ts +0 -25
- package/dist/devbox/commands/provider/modalRuntime.d.ts.map +0 -1
- package/dist/devbox/commands/provider/modalRuntime.js +0 -791
- package/dist/devbox/commands/provider/modalRuntime.js.map +0 -1
- package/dist/devbox/commands/provider/runtimeTypes.d.ts +0 -8
- package/dist/devbox/commands/provider/runtimeTypes.d.ts.map +0 -1
- package/dist/devbox/commands/provider/runtimeTypes.js +0 -2
- package/dist/devbox/commands/provider/runtimeTypes.js.map +0 -1
- package/dist/devbox/commands/providerClient.d.ts +0 -82
- package/dist/devbox/commands/providerClient.d.ts.map +0 -1
- package/dist/devbox/commands/providerClient.js +0 -719
- package/dist/devbox/commands/providerClient.js.map +0 -1
- package/dist/devbox/commands/reboot.d.ts +0 -8
- package/dist/devbox/commands/reboot.d.ts.map +0 -1
- package/dist/devbox/commands/reboot.js +0 -100
- package/dist/devbox/commands/reboot.js.map +0 -1
- package/dist/devbox/commands/reset.d.ts +0 -30
- package/dist/devbox/commands/reset.d.ts.map +0 -1
- package/dist/devbox/commands/reset.js +0 -114
- package/dist/devbox/commands/reset.js.map +0 -1
- package/dist/devbox/commands/runtimeClient.d.ts +0 -65
- package/dist/devbox/commands/runtimeClient.d.ts.map +0 -1
- package/dist/devbox/commands/runtimeClient.js +0 -127
- package/dist/devbox/commands/runtimeClient.js.map +0 -1
- package/dist/devbox/commands/sentryTest.d.ts +0 -2
- package/dist/devbox/commands/sentryTest.d.ts.map +0 -1
- package/dist/devbox/commands/sentryTest.js +0 -117
- package/dist/devbox/commands/sentryTest.js.map +0 -1
- package/dist/devbox/commands/services.d.ts +0 -2
- package/dist/devbox/commands/services.d.ts.map +0 -1
- package/dist/devbox/commands/services.js +0 -619
- package/dist/devbox/commands/services.js.map +0 -1
- package/dist/devbox/commands/servicesConfig.d.ts +0 -19
- package/dist/devbox/commands/servicesConfig.d.ts.map +0 -1
- package/dist/devbox/commands/servicesConfig.js +0 -61
- package/dist/devbox/commands/servicesConfig.js.map +0 -1
- package/dist/devbox/commands/servicesToml.d.ts +0 -13
- package/dist/devbox/commands/servicesToml.d.ts.map +0 -1
- package/dist/devbox/commands/servicesToml.js +0 -201
- package/dist/devbox/commands/servicesToml.js.map +0 -1
- package/dist/devbox/commands/sessionUtils.d.ts +0 -10
- package/dist/devbox/commands/sessionUtils.d.ts.map +0 -1
- package/dist/devbox/commands/sessionUtils.js +0 -48
- package/dist/devbox/commands/sessionUtils.js.map +0 -1
- package/dist/devbox/commands/sessions.d.ts +0 -3
- package/dist/devbox/commands/sessions.d.ts.map +0 -1
- package/dist/devbox/commands/sessions.js +0 -490
- package/dist/devbox/commands/sessions.js.map +0 -1
- package/dist/devbox/commands/setup.d.ts +0 -36
- package/dist/devbox/commands/setup.d.ts.map +0 -1
- package/dist/devbox/commands/setup.js +0 -816
- package/dist/devbox/commands/setup.js.map +0 -1
- package/dist/devbox/commands/setupClaude.d.ts +0 -51
- package/dist/devbox/commands/setupClaude.d.ts.map +0 -1
- package/dist/devbox/commands/setupClaude.js +0 -202
- package/dist/devbox/commands/setupClaude.js.map +0 -1
- package/dist/devbox/commands/setupTooling.d.ts +0 -56
- package/dist/devbox/commands/setupTooling.d.ts.map +0 -1
- package/dist/devbox/commands/setupTooling.js +0 -187
- package/dist/devbox/commands/setupTooling.js.map +0 -1
- package/dist/devbox/commands/sshAccess.d.ts +0 -31
- package/dist/devbox/commands/sshAccess.d.ts.map +0 -1
- package/dist/devbox/commands/sshAccess.js +0 -353
- package/dist/devbox/commands/sshAccess.js.map +0 -1
- package/dist/devbox/commands/sshConfig.d.ts +0 -23
- package/dist/devbox/commands/sshConfig.d.ts.map +0 -1
- package/dist/devbox/commands/sshConfig.js +0 -366
- package/dist/devbox/commands/sshConfig.js.map +0 -1
- package/dist/devbox/commands/sshProxy.d.ts +0 -2
- package/dist/devbox/commands/sshProxy.d.ts.map +0 -1
- package/dist/devbox/commands/sshProxy.js +0 -215
- package/dist/devbox/commands/sshProxy.js.map +0 -1
- package/dist/devbox/commands/uninstall.d.ts +0 -2
- package/dist/devbox/commands/uninstall.d.ts.map +0 -1
- package/dist/devbox/commands/uninstall.js +0 -365
- package/dist/devbox/commands/uninstall.js.map +0 -1
- package/dist/devbox/commands/upgrade.d.ts +0 -14
- package/dist/devbox/commands/upgrade.d.ts.map +0 -1
- package/dist/devbox/commands/upgrade.js +0 -60
- package/dist/devbox/commands/upgrade.js.map +0 -1
- package/dist/devbox/commands/version.d.ts +0 -8
- package/dist/devbox/commands/version.d.ts.map +0 -1
- package/dist/devbox/commands/version.js +0 -134
- package/dist/devbox/commands/version.js.map +0 -1
- package/dist/devbox/commands/whoami.d.ts +0 -2
- package/dist/devbox/commands/whoami.d.ts.map +0 -1
- package/dist/devbox/commands/whoami.js +0 -114
- package/dist/devbox/commands/whoami.js.map +0 -1
- package/dist/devbox/completions/cache.d.ts +0 -53
- package/dist/devbox/completions/cache.d.ts.map +0 -1
- package/dist/devbox/completions/cache.js +0 -227
- package/dist/devbox/completions/cache.js.map +0 -1
- package/dist/devbox/completions/index.d.ts +0 -18
- package/dist/devbox/completions/index.d.ts.map +0 -1
- package/dist/devbox/completions/index.js +0 -759
- package/dist/devbox/completions/index.js.map +0 -1
- package/dist/devbox/controlPlane.d.ts +0 -460
- package/dist/devbox/controlPlane.d.ts.map +0 -1
- package/dist/devbox/controlPlane.js +0 -1910
- package/dist/devbox/controlPlane.js.map +0 -1
- package/dist/devbox/daemonClient.d.ts +0 -44
- package/dist/devbox/daemonClient.d.ts.map +0 -1
- package/dist/devbox/daemonClient.js +0 -677
- package/dist/devbox/daemonClient.js.map +0 -1
- package/dist/devbox/e2bExecErrors.d.ts +0 -11
- package/dist/devbox/e2bExecErrors.d.ts.map +0 -1
- package/dist/devbox/e2bExecErrors.js +0 -19
- package/dist/devbox/e2bExecErrors.js.map +0 -1
- package/dist/devbox/latency.d.ts +0 -25
- package/dist/devbox/latency.d.ts.map +0 -1
- package/dist/devbox/latency.js +0 -186
- package/dist/devbox/latency.js.map +0 -1
- package/dist/devbox/logger.d.ts +0 -2
- package/dist/devbox/logger.d.ts.map +0 -1
- package/dist/devbox/logger.js +0 -3
- package/dist/devbox/logger.js.map +0 -1
- package/dist/devbox/terminal/kittyCtrlCReleaseSuppressor.d.ts +0 -11
- package/dist/devbox/terminal/kittyCtrlCReleaseSuppressor.d.ts.map +0 -1
- package/dist/devbox/terminal/kittyCtrlCReleaseSuppressor.js +0 -118
- package/dist/devbox/terminal/kittyCtrlCReleaseSuppressor.js.map +0 -1
- package/dist/devbox/terminal/osc.d.ts +0 -11
- package/dist/devbox/terminal/osc.d.ts.map +0 -1
- package/dist/devbox/terminal/osc.js +0 -84
- package/dist/devbox/terminal/osc.js.map +0 -1
- package/dist/devbox/terminal/sessionProtocol.d.ts +0 -46
- package/dist/devbox/terminal/sessionProtocol.d.ts.map +0 -1
- package/dist/devbox/terminal/sessionProtocol.js +0 -631
- package/dist/devbox/terminal/sessionProtocol.js.map +0 -1
- package/dist/devbox/ui/colors.d.ts +0 -19
- package/dist/devbox/ui/colors.d.ts.map +0 -1
- package/dist/devbox/ui/colors.js +0 -22
- package/dist/devbox/ui/colors.js.map +0 -1
- package/dist/devbox/ui/copyableUrl.d.ts +0 -4
- package/dist/devbox/ui/copyableUrl.d.ts.map +0 -1
- package/dist/devbox/ui/copyableUrl.js +0 -10
- package/dist/devbox/ui/copyableUrl.js.map +0 -1
- package/dist/devbox/ui/qr.d.ts +0 -3
- package/dist/devbox/ui/qr.d.ts.map +0 -1
- package/dist/devbox/ui/qr.js +0 -17
- package/dist/devbox/ui/qr.js.map +0 -1
- package/dist/devbox/ui/statusLine.d.ts +0 -14
- package/dist/devbox/ui/statusLine.d.ts.map +0 -1
- package/dist/devbox/ui/statusLine.js +0 -92
- package/dist/devbox/ui/statusLine.js.map +0 -1
- package/dist/devbox/updateNotice.d.ts +0 -2
- package/dist/devbox/updateNotice.d.ts.map +0 -1
- package/dist/devbox/updateNotice.js +0 -43
- package/dist/devbox/updateNotice.js.map +0 -1
|
@@ -1,786 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { confirm as clackConfirm, isCancel, log as clackLog, select as clackSelect, } from "@clack/prompts";
|
|
3
|
-
import { resolveSocketInfo, SpritesApiError, } from "@boxes-dev/core";
|
|
4
|
-
import { logger } from "../../logger.js";
|
|
5
|
-
import { colors } from "../../ui/colors.js";
|
|
6
|
-
import { showCopyableUrl, showCopyableValue } from "../../ui/copyableUrl.js";
|
|
7
|
-
import { writeRepoMarker } from "./registry.js";
|
|
8
|
-
import { ensureRemoteCodexConfig, expandHome, shellQuote, stageRemoteSetupArtifacts, } from "./remote.js";
|
|
9
|
-
import { ensureSshConfig, ensureSshKey, copyToClipboard, openBrowser, parseGitRemote, readRemoteOrigin, setRemoteOrigin, verifySshAuth, } from "./ssh.js";
|
|
10
|
-
import { runRemoteCodexSetup, } from "./codex/index.js";
|
|
11
|
-
import {} from "./codex/plan.js";
|
|
12
|
-
import { bootstrapRemoteClaudeConfig } from "./claudeBootstrap.js";
|
|
13
|
-
import { mergeServicesToml, splitShellCommand, } from "../servicesToml.js";
|
|
14
|
-
import { runInitStep } from "./progress.js";
|
|
15
|
-
import { hasCompletedManagedInitSetup, hasManagedDaemonValidated, hasRemoteCodexApplied, } from "./state.js";
|
|
16
|
-
const parseExecUnexpectedResponseStatus = (error) => {
|
|
17
|
-
if (!(error instanceof Error))
|
|
18
|
-
return null;
|
|
19
|
-
const match = /Unexpected server response: (\d{3})/.exec(error.message);
|
|
20
|
-
if (!match)
|
|
21
|
-
return null;
|
|
22
|
-
const status = Number(match[1]);
|
|
23
|
-
return Number.isFinite(status) ? status : null;
|
|
24
|
-
};
|
|
25
|
-
const isRetryableCheckpointForbiddenError = (error) => {
|
|
26
|
-
if (error instanceof SpritesApiError)
|
|
27
|
-
return error.status === 403;
|
|
28
|
-
const execStatus = parseExecUnexpectedResponseStatus(error);
|
|
29
|
-
return execStatus === 403;
|
|
30
|
-
};
|
|
31
|
-
const buildServicesTomlUpdates = (services) => {
|
|
32
|
-
const updates = {};
|
|
33
|
-
for (const service of services) {
|
|
34
|
-
const name = service.name.trim();
|
|
35
|
-
if (!name) {
|
|
36
|
-
throw new Error("Service name is required in setup.json services.");
|
|
37
|
-
}
|
|
38
|
-
const parts = splitShellCommand(service.command ?? "");
|
|
39
|
-
const [cmd, ...args] = parts;
|
|
40
|
-
if (!cmd) {
|
|
41
|
-
throw new Error(`Service "${name}" is missing a command.`);
|
|
42
|
-
}
|
|
43
|
-
updates[name] = {
|
|
44
|
-
name,
|
|
45
|
-
cmd,
|
|
46
|
-
...(args.length > 0 ? { args } : {}),
|
|
47
|
-
...(service.httpPort !== null ? { httpPort: service.httpPort } : {}),
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
return updates;
|
|
51
|
-
};
|
|
52
|
-
const readRemoteSetupTodo = async ({ client, spriteAlias, workdir, }) => {
|
|
53
|
-
try {
|
|
54
|
-
const bytes = await client.readFile(spriteAlias, {
|
|
55
|
-
path: ".devbox/setup.todo",
|
|
56
|
-
workingDir: workdir,
|
|
57
|
-
});
|
|
58
|
-
const summary = Buffer.from(bytes).toString("utf8").trim();
|
|
59
|
-
return summary.length > 0 ? summary : null;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
if (error instanceof SpritesApiError && error.status === 404) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const completeCodexApply = async ({ progressEnabled, validateManagedInitCompletion, updateInitState, clearResumeState, updateRegistryProjectStatus, resolveInitStatus, getInitState, }) => {
|
|
69
|
-
if (!hasRemoteCodexApplied(getInitState()?.steps)) {
|
|
70
|
-
await updateInitState({ steps: { remoteCodexApplied: true } });
|
|
71
|
-
await updateRegistryProjectStatus(resolveInitStatus(getInitState()?.steps, getInitState()?.complete));
|
|
72
|
-
}
|
|
73
|
-
if (!hasManagedDaemonValidated(getInitState()?.steps)) {
|
|
74
|
-
if (validateManagedInitCompletion) {
|
|
75
|
-
await runInitStep({
|
|
76
|
-
enabled: progressEnabled,
|
|
77
|
-
title: "Validating managed daemon",
|
|
78
|
-
fn: async ({ status }) => {
|
|
79
|
-
status.stage("Checking managed daemon readiness");
|
|
80
|
-
await validateManagedInitCompletion(status);
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
await updateInitState({ steps: { managedDaemonValidated: true } });
|
|
85
|
-
}
|
|
86
|
-
await clearResumeState();
|
|
87
|
-
await updateRegistryProjectStatus(resolveInitStatus(getInitState()?.steps, getInitState()?.complete));
|
|
88
|
-
};
|
|
89
|
-
const normalizeStoredPath = (value) => {
|
|
90
|
-
const trimmed = value?.trim();
|
|
91
|
-
return trimmed ? trimmed : null;
|
|
92
|
-
};
|
|
93
|
-
const getCodexSetupResumeState = (state) => {
|
|
94
|
-
const threadId = normalizeStoredPath(state?.codexSetupThreadId);
|
|
95
|
-
const execSessionId = normalizeStoredPath(state?.codexSetupExecSessionId);
|
|
96
|
-
if (!threadId && !execSessionId) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
threadId,
|
|
101
|
-
execSessionId,
|
|
102
|
-
runRoot: normalizeStoredPath(state?.codexSetupRunRoot),
|
|
103
|
-
lastMessagePath: normalizeStoredPath(state?.codexSetupLastMessagePath),
|
|
104
|
-
setupTodoPath: normalizeStoredPath(state?.codexSetupTodoPath),
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
const codexSetupResumeStatesEqual = (left, right) => left?.threadId === right?.threadId &&
|
|
108
|
-
left?.execSessionId === right?.execSessionId &&
|
|
109
|
-
left?.runRoot === right?.runRoot &&
|
|
110
|
-
left?.lastMessagePath === right?.lastMessagePath &&
|
|
111
|
-
left?.setupTodoPath === right?.setupTodoPath;
|
|
112
|
-
const writeRemoteServicesToml = async ({ client, spriteAlias, workdir, services, }) => {
|
|
113
|
-
if (services.length === 0)
|
|
114
|
-
return;
|
|
115
|
-
let baseContent = "";
|
|
116
|
-
try {
|
|
117
|
-
const bytes = await client.readFile(spriteAlias, {
|
|
118
|
-
path: "devbox.toml",
|
|
119
|
-
workingDir: workdir,
|
|
120
|
-
});
|
|
121
|
-
baseContent = Buffer.from(bytes).toString("utf8");
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
if (!(error instanceof SpritesApiError && error.status === 404)) {
|
|
125
|
-
throw error;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const updates = buildServicesTomlUpdates(services);
|
|
129
|
-
if (Object.keys(updates).length === 0)
|
|
130
|
-
return;
|
|
131
|
-
const merged = mergeServicesToml(baseContent, updates);
|
|
132
|
-
await client.writeFile(spriteAlias, path.posix.join(workdir.replace(/\/$/, ""), "devbox.toml"), Buffer.from(merged));
|
|
133
|
-
};
|
|
134
|
-
const enableRemoteServices = async ({ client, spriteAlias, services, status, }) => {
|
|
135
|
-
if (services.length === 0)
|
|
136
|
-
return;
|
|
137
|
-
logger.info("init_services_enable_start", {
|
|
138
|
-
box: spriteAlias,
|
|
139
|
-
serviceCount: services.length,
|
|
140
|
-
});
|
|
141
|
-
for (const service of services) {
|
|
142
|
-
const name = service.name.trim();
|
|
143
|
-
if (!name) {
|
|
144
|
-
throw new Error("Service name is required in setup.json services.");
|
|
145
|
-
}
|
|
146
|
-
status?.stage(`Enabling service: ${name}`);
|
|
147
|
-
const parts = splitShellCommand(service.command ?? "");
|
|
148
|
-
const [cmd, ...args] = parts;
|
|
149
|
-
if (!cmd) {
|
|
150
|
-
throw new Error(`Service "${name}" is missing a command.`);
|
|
151
|
-
}
|
|
152
|
-
const input = {
|
|
153
|
-
cmd,
|
|
154
|
-
...(args.length > 0 ? { args } : {}),
|
|
155
|
-
...(service.httpPort !== null ? { httpPort: service.httpPort } : {}),
|
|
156
|
-
};
|
|
157
|
-
await client.createService(spriteAlias, name, input);
|
|
158
|
-
}
|
|
159
|
-
logger.info("init_services_enable_complete", { box: spriteAlias });
|
|
160
|
-
};
|
|
161
|
-
const promptBeforeOpenBrowser = async ({ url, title, promptMessage, consequence, throwInitCanceled, }) => {
|
|
162
|
-
if (!process.stdin.isTTY)
|
|
163
|
-
return false;
|
|
164
|
-
showCopyableUrl(url, title);
|
|
165
|
-
const message = typeof promptMessage === "string" && promptMessage.trim().length > 0
|
|
166
|
-
? promptMessage
|
|
167
|
-
: `Open ${title} in your browser?`;
|
|
168
|
-
const choice = await clackSelect({
|
|
169
|
-
message,
|
|
170
|
-
options: [
|
|
171
|
-
{ value: "open", label: "Open in browser" },
|
|
172
|
-
{ value: "skip", label: "Skip" },
|
|
173
|
-
],
|
|
174
|
-
initialValue: "open",
|
|
175
|
-
});
|
|
176
|
-
if (isCancel(choice)) {
|
|
177
|
-
throwInitCanceled();
|
|
178
|
-
}
|
|
179
|
-
if (choice === "skip") {
|
|
180
|
-
clackLog.warn(consequence);
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
return true;
|
|
184
|
-
};
|
|
185
|
-
const ensureGitSafeDirectory = async ({ client, spriteAlias, workdir, remoteHome, status, }) => {
|
|
186
|
-
status.stage("Configuring git safe dir");
|
|
187
|
-
logger.info("init_git_safe_directory_configure_start", {
|
|
188
|
-
box: spriteAlias,
|
|
189
|
-
workdir,
|
|
190
|
-
});
|
|
191
|
-
const script = [
|
|
192
|
-
"set -euo pipefail",
|
|
193
|
-
`repo=${shellQuote(workdir)}`,
|
|
194
|
-
'if [ ! -d "$repo" ]; then',
|
|
195
|
-
' echo "Missing repo workdir: $repo" >&2',
|
|
196
|
-
" exit 1",
|
|
197
|
-
"fi",
|
|
198
|
-
'if [ ! -d "$repo/.git" ]; then',
|
|
199
|
-
" exit 0",
|
|
200
|
-
"fi",
|
|
201
|
-
"if ! command -v git >/dev/null 2>&1; then",
|
|
202
|
-
" exit 0",
|
|
203
|
-
"fi",
|
|
204
|
-
"",
|
|
205
|
-
"ensure_safe_in_file() {",
|
|
206
|
-
' cfg="$1"',
|
|
207
|
-
' existing="$(git config --file "$cfg" --get-all safe.directory 2>/dev/null || true)"',
|
|
208
|
-
' if printf \'%s\\n\' "$existing" | grep -Fxq "$repo"; then',
|
|
209
|
-
" return 0",
|
|
210
|
-
" fi",
|
|
211
|
-
' git config --file "$cfg" --add safe.directory "$repo"',
|
|
212
|
-
"}",
|
|
213
|
-
"",
|
|
214
|
-
// Ensure the repo is trusted for the modal runtime home.
|
|
215
|
-
`ensure_safe_in_file ${shellQuote(path.posix.join(remoteHome, ".gitconfig"))}`,
|
|
216
|
-
].join("\n");
|
|
217
|
-
const result = await client.exec(spriteAlias, [
|
|
218
|
-
"/bin/bash",
|
|
219
|
-
"--noprofile",
|
|
220
|
-
"--norc",
|
|
221
|
-
"-e",
|
|
222
|
-
"-u",
|
|
223
|
-
"-o",
|
|
224
|
-
"pipefail",
|
|
225
|
-
"-c",
|
|
226
|
-
script,
|
|
227
|
-
]);
|
|
228
|
-
if (result.exitCode !== 0) {
|
|
229
|
-
const details = result.stderr || result.stdout || "";
|
|
230
|
-
throw new Error(details
|
|
231
|
-
? `Failed to configure git safe.directory: ${details.trim()}`
|
|
232
|
-
: `Failed to configure git safe.directory (exit ${result.exitCode})`);
|
|
233
|
-
}
|
|
234
|
-
logger.info("init_git_safe_directory_configure_complete", {
|
|
235
|
-
box: spriteAlias,
|
|
236
|
-
workdir,
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
const formatCompleteInitSummaryLines = ({ alias, workdir, isTty, }) => {
|
|
240
|
-
const heading = (value) => (isTty ? colors.bold(value) : value);
|
|
241
|
-
const formattedAlias = isTty ? colors.boldWhite(alias) : alias;
|
|
242
|
-
const formattedWorkdir = isTty ? colors.gray(workdir) : workdir;
|
|
243
|
-
return [
|
|
244
|
-
`Your devbox ${formattedAlias} is set up!`,
|
|
245
|
-
`project directory on devbox: ${formattedWorkdir}`,
|
|
246
|
-
"",
|
|
247
|
-
"Connect to this devbox from the desktop app or the terminal.",
|
|
248
|
-
"",
|
|
249
|
-
heading("Desktop app"),
|
|
250
|
-
"- open the Boxes.dev desktop app",
|
|
251
|
-
"- chat with Claude or Codex",
|
|
252
|
-
"- run your app in the terminal tabs",
|
|
253
|
-
"",
|
|
254
|
-
heading("Terminal"),
|
|
255
|
-
`- run \`dvb connect ${alias}\` to get a shell on your devbox`,
|
|
256
|
-
"- run claude / codex from one tab, run your app in another tab.",
|
|
257
|
-
"",
|
|
258
|
-
"Ports are forwarded automatically when you run your app on the devbox, so you can open your app at localhost:<port> in your local browser.",
|
|
259
|
-
];
|
|
260
|
-
};
|
|
261
|
-
const runFinalizeFlow = async ({ client, canonical, spriteAlias, alias, computeProvider, workdir, repoRoot, projectDir, fingerprint, projectOrigin, projectCreatedAt, finalApprovedPlan, shouldResume, nonInteractive, progressEnabled, parsed, skipCodexApply, skipServicesConfig, skipServicesEnable, remoteHome, remoteSetupPath, remoteArtifactsBundlePath, remoteArtifactsManifestPath, socketInfo, pathSetup, initCodexProxyOptions, throwInitCanceled, getInitState, updateInitState, updateRegistryProjectStatus, resolveInitStatus, validateManagedInitCompletion, isRetryableInitError, retryInitStep, recordCodexCheckpoint, }) => {
|
|
262
|
-
const expandedWorkdir = expandHome(workdir, remoteHome);
|
|
263
|
-
let remoteCodexAlreadyApplied = skipCodexApply || hasRemoteCodexApplied(getInitState()?.steps);
|
|
264
|
-
let managedValidationCompleted = hasManagedDaemonValidated(getInitState()?.steps);
|
|
265
|
-
const readCodexSetupResumeState = () => getCodexSetupResumeState(getInitState());
|
|
266
|
-
const persistCodexSetupResumeState = async (resumeState) => {
|
|
267
|
-
const current = readCodexSetupResumeState();
|
|
268
|
-
if (codexSetupResumeStatesEqual(current, resumeState)) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
await updateInitState({
|
|
272
|
-
codexSetupThreadId: resumeState?.threadId ?? null,
|
|
273
|
-
codexSetupExecSessionId: resumeState?.execSessionId ?? null,
|
|
274
|
-
codexSetupRunRoot: resumeState?.runRoot ?? null,
|
|
275
|
-
codexSetupLastMessagePath: resumeState?.lastMessagePath ?? null,
|
|
276
|
-
codexSetupTodoPath: resumeState?.setupTodoPath ?? null,
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
if (remoteCodexAlreadyApplied && managedValidationCompleted) {
|
|
280
|
-
await persistCodexSetupResumeState(null);
|
|
281
|
-
}
|
|
282
|
-
const skipGitSafeDirectory = Boolean(shouldResume && getInitState()?.steps.gitSafeDirectoryConfigured);
|
|
283
|
-
if (!skipGitSafeDirectory) {
|
|
284
|
-
await runInitStep({
|
|
285
|
-
enabled: progressEnabled,
|
|
286
|
-
title: "Configuring git safe dir",
|
|
287
|
-
fn: async ({ status }) => {
|
|
288
|
-
await ensureGitSafeDirectory({
|
|
289
|
-
client,
|
|
290
|
-
spriteAlias,
|
|
291
|
-
workdir: expandedWorkdir,
|
|
292
|
-
remoteHome,
|
|
293
|
-
status,
|
|
294
|
-
});
|
|
295
|
-
await updateInitState({
|
|
296
|
-
steps: { gitSafeDirectoryConfigured: true },
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
const skipSshAuth = Boolean(nonInteractive || (shouldResume && getInitState()?.steps.sshAuthConfigured));
|
|
302
|
-
if (!skipSshAuth) {
|
|
303
|
-
const { remoteOrigin, remoteInfo } = await runInitStep({
|
|
304
|
-
enabled: progressEnabled,
|
|
305
|
-
title: "Checking git SSH remote",
|
|
306
|
-
fn: async () => {
|
|
307
|
-
const remoteOrigin = await readRemoteOrigin(client, spriteAlias, expandedWorkdir);
|
|
308
|
-
const remoteInfo = remoteOrigin ? parseGitRemote(remoteOrigin) : null;
|
|
309
|
-
return { remoteOrigin, remoteInfo };
|
|
310
|
-
},
|
|
311
|
-
});
|
|
312
|
-
if (!remoteOrigin) {
|
|
313
|
-
if (!parsed.json) {
|
|
314
|
-
console.warn("Warning: unable to detect remote origin on sprite. Skipping SSH setup.");
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else if (!remoteInfo) {
|
|
318
|
-
if (!parsed.json) {
|
|
319
|
-
console.warn(`Warning: unrecognized git remote format (${remoteOrigin}). Skipping SSH setup.`);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
let activeOrigin = remoteOrigin;
|
|
324
|
-
if (remoteInfo.protocol === "https") {
|
|
325
|
-
if (!parsed.json) {
|
|
326
|
-
clackLog.info(`Origin is HTTPS (${remoteOrigin}).`);
|
|
327
|
-
clackLog.info("This only changes the remote devbox checkout (your local checkout is unchanged).");
|
|
328
|
-
clackLog.info("Switching the remote devbox checkout to SSH automatically.");
|
|
329
|
-
showCopyableValue(remoteInfo.sshUrl, "Git remote");
|
|
330
|
-
clackLog.info("If you do not add the SSH key below, git pull/push on the remote will not work.");
|
|
331
|
-
}
|
|
332
|
-
await runInitStep({
|
|
333
|
-
enabled: progressEnabled,
|
|
334
|
-
title: "Switching remote git to SSH",
|
|
335
|
-
fn: async () => {
|
|
336
|
-
await setRemoteOrigin(client, spriteAlias, expandedWorkdir, remoteInfo.sshUrl);
|
|
337
|
-
},
|
|
338
|
-
});
|
|
339
|
-
activeOrigin = remoteInfo.sshUrl;
|
|
340
|
-
}
|
|
341
|
-
if (activeOrigin) {
|
|
342
|
-
const publicKey = await runInitStep({
|
|
343
|
-
enabled: progressEnabled,
|
|
344
|
-
title: "Generating SSH key",
|
|
345
|
-
fn: async () => await ensureSshKey(client, spriteAlias, `${alias}@devbox`),
|
|
346
|
-
});
|
|
347
|
-
await runInitStep({
|
|
348
|
-
enabled: progressEnabled,
|
|
349
|
-
title: "Updating SSH config",
|
|
350
|
-
fn: async () => await ensureSshConfig(client, spriteAlias, remoteInfo.host),
|
|
351
|
-
});
|
|
352
|
-
if (!parsed.json) {
|
|
353
|
-
showCopyableValue(publicKey, `Add this SSH public key to ${remoteInfo.host}`);
|
|
354
|
-
const copied = await copyToClipboard(publicKey);
|
|
355
|
-
if (copied) {
|
|
356
|
-
clackLog.success("Copied SSH public key to clipboard.");
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
clackLog.warn("Could not copy the SSH key automatically.");
|
|
360
|
-
}
|
|
361
|
-
const openBrowserPromptMessage = copied
|
|
362
|
-
? `SSH key copied to clipboard; click "Add SSH key". Open ${remoteInfo.host} SSH key page in your browser?`
|
|
363
|
-
: `Open ${remoteInfo.host} SSH key page in your browser?`;
|
|
364
|
-
const shouldOpen = await promptBeforeOpenBrowser({
|
|
365
|
-
url: remoteInfo.settingsUrl,
|
|
366
|
-
title: `${remoteInfo.host} SSH key page`,
|
|
367
|
-
promptMessage: openBrowserPromptMessage,
|
|
368
|
-
consequence: [
|
|
369
|
-
"Skipping browser open.",
|
|
370
|
-
"You must add the SSH key before git pull/push will work via SSH.",
|
|
371
|
-
].join(" "),
|
|
372
|
-
throwInitCanceled,
|
|
373
|
-
});
|
|
374
|
-
if (shouldOpen) {
|
|
375
|
-
const opened = openBrowser(remoteInfo.settingsUrl);
|
|
376
|
-
if (!opened) {
|
|
377
|
-
clackLog.warn("Unable to open the browser automatically.");
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
const added = await clackConfirm({
|
|
382
|
-
message: "Have you added the SSH key? Remote git pull/push will not work until you do.",
|
|
383
|
-
active: "Yes, verify now",
|
|
384
|
-
inactive: "Not yet",
|
|
385
|
-
initialValue: true,
|
|
386
|
-
});
|
|
387
|
-
if (isCancel(added)) {
|
|
388
|
-
throwInitCanceled();
|
|
389
|
-
}
|
|
390
|
-
if (!added) {
|
|
391
|
-
if (!parsed.json) {
|
|
392
|
-
console.warn("Skipping SSH verification. Add the key and re-run `dvb init --resume` to verify.");
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
const verified = await runInitStep({
|
|
397
|
-
enabled: progressEnabled,
|
|
398
|
-
title: "Verifying git SSH auth",
|
|
399
|
-
fn: async () => await verifySshAuth(client, spriteAlias, remoteInfo.host, expandedWorkdir),
|
|
400
|
-
});
|
|
401
|
-
if (!verified) {
|
|
402
|
-
if (!parsed.json) {
|
|
403
|
-
console.warn("SSH auth verification failed. Confirm the key is added and that the repo access is granted.");
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
await updateInitState({
|
|
408
|
-
steps: { sshAuthConfigured: true },
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
if (!skipServicesConfig) {
|
|
416
|
-
await runInitStep({
|
|
417
|
-
enabled: progressEnabled,
|
|
418
|
-
title: "Writing services config",
|
|
419
|
-
fn: async () => {
|
|
420
|
-
await writeRemoteServicesToml({
|
|
421
|
-
client,
|
|
422
|
-
spriteAlias,
|
|
423
|
-
workdir: expandedWorkdir,
|
|
424
|
-
services: finalApprovedPlan.services.backgroundServices,
|
|
425
|
-
});
|
|
426
|
-
await updateInitState({ steps: { servicesConfigWritten: true } });
|
|
427
|
-
},
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
const projectMeta = {
|
|
431
|
-
fingerprint,
|
|
432
|
-
canonical,
|
|
433
|
-
alias,
|
|
434
|
-
computeProvider,
|
|
435
|
-
workdir,
|
|
436
|
-
origin: projectOrigin,
|
|
437
|
-
createdAt: projectCreatedAt,
|
|
438
|
-
};
|
|
439
|
-
const projectMetaPath = `${remoteHome}/.devbox/projects/${fingerprint}.json`;
|
|
440
|
-
await runInitStep({
|
|
441
|
-
enabled: progressEnabled,
|
|
442
|
-
title: "Registering project",
|
|
443
|
-
fn: async () => {
|
|
444
|
-
let existing = {};
|
|
445
|
-
try {
|
|
446
|
-
const raw = await client.readFile(spriteAlias, {
|
|
447
|
-
path: projectMetaPath,
|
|
448
|
-
});
|
|
449
|
-
const parsed = JSON.parse(Buffer.from(raw).toString("utf8"));
|
|
450
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
451
|
-
existing = parsed;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
catch (error) {
|
|
455
|
-
if (!(error instanceof SpritesApiError && error.status === 404)) {
|
|
456
|
-
throw error;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
const existingCheckpoints = existing.checkpoints &&
|
|
460
|
-
typeof existing.checkpoints === "object" &&
|
|
461
|
-
!Array.isArray(existing.checkpoints)
|
|
462
|
-
? existing.checkpoints
|
|
463
|
-
: {};
|
|
464
|
-
const stateCheckpoints = getInitState()?.checkpoints ?? {};
|
|
465
|
-
const merged = {
|
|
466
|
-
...existing,
|
|
467
|
-
...projectMeta,
|
|
468
|
-
checkpoints: { ...existingCheckpoints, ...stateCheckpoints },
|
|
469
|
-
};
|
|
470
|
-
await client.writeFile(spriteAlias, projectMetaPath, Buffer.from(JSON.stringify(merged, null, 2)));
|
|
471
|
-
},
|
|
472
|
-
});
|
|
473
|
-
await runInitStep({
|
|
474
|
-
enabled: progressEnabled,
|
|
475
|
-
title: "Writing local metadata",
|
|
476
|
-
fn: async () => {
|
|
477
|
-
await writeRepoMarker(projectDir, {
|
|
478
|
-
fingerprint,
|
|
479
|
-
canonical,
|
|
480
|
-
alias,
|
|
481
|
-
computeProvider,
|
|
482
|
-
});
|
|
483
|
-
},
|
|
484
|
-
});
|
|
485
|
-
await runInitStep({
|
|
486
|
-
enabled: progressEnabled,
|
|
487
|
-
title: "Bootstrapping Claude config (opt)",
|
|
488
|
-
fn: async ({ status, ok }) => {
|
|
489
|
-
status.stage("Checking Claude config state");
|
|
490
|
-
try {
|
|
491
|
-
const result = await bootstrapRemoteClaudeConfig({
|
|
492
|
-
client,
|
|
493
|
-
spriteAlias,
|
|
494
|
-
localRepoRoot: repoRoot,
|
|
495
|
-
remoteWorkdir: expandedWorkdir,
|
|
496
|
-
remoteHome,
|
|
497
|
-
});
|
|
498
|
-
if (result.status === "skipped_existing") {
|
|
499
|
-
ok("Bootstrapping Claude config (opt) (already configured)");
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
if (result.status === "updated_existing") {
|
|
503
|
-
ok("Bootstrapping Claude config (opt) (updated existing state)");
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
if (result.parseWarnings.length > 0) {
|
|
507
|
-
logger.warn("init_claude_bootstrap_local_parse_warnings", {
|
|
508
|
-
box: spriteAlias,
|
|
509
|
-
warningCount: result.parseWarnings.length,
|
|
510
|
-
warnings: result.parseWarnings,
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
ok("Bootstrapping Claude config (opt)");
|
|
514
|
-
}
|
|
515
|
-
catch (error) {
|
|
516
|
-
logger.warn("init_claude_bootstrap_failed", {
|
|
517
|
-
box: spriteAlias,
|
|
518
|
-
workdir: expandedWorkdir,
|
|
519
|
-
error: error instanceof Error ? error.message : String(error),
|
|
520
|
-
});
|
|
521
|
-
if (!parsed.json) {
|
|
522
|
-
const message = error instanceof Error && error.message
|
|
523
|
-
? error.message
|
|
524
|
-
: String(error);
|
|
525
|
-
console.warn(`Warning: failed to bootstrap Claude config (optional). ${message}`);
|
|
526
|
-
}
|
|
527
|
-
ok("Bootstrapping Claude config (opt) (skipped)");
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
});
|
|
531
|
-
const skipCodexConfigUpdate = Boolean(shouldResume && getInitState()?.steps.codexConfigUpdated);
|
|
532
|
-
if (!skipCodexConfigUpdate) {
|
|
533
|
-
await runInitStep({
|
|
534
|
-
enabled: progressEnabled,
|
|
535
|
-
title: "Updating Codex config",
|
|
536
|
-
fn: async ({ status }) => {
|
|
537
|
-
await retryInitStep({
|
|
538
|
-
status,
|
|
539
|
-
title: "Updating Codex config",
|
|
540
|
-
fn: async () => await ensureRemoteCodexConfig({
|
|
541
|
-
client,
|
|
542
|
-
spriteAlias,
|
|
543
|
-
trustedPaths: [remoteHome, expandedWorkdir],
|
|
544
|
-
}),
|
|
545
|
-
});
|
|
546
|
-
},
|
|
547
|
-
});
|
|
548
|
-
await updateInitState({ steps: { codexConfigUpdated: true } });
|
|
549
|
-
}
|
|
550
|
-
const skipSetupArtifactsStage = Boolean(skipCodexApply ||
|
|
551
|
-
(shouldResume && getInitState()?.steps.setupArtifactsStaged));
|
|
552
|
-
if (!skipSetupArtifactsStage) {
|
|
553
|
-
await runInitStep({
|
|
554
|
-
enabled: progressEnabled,
|
|
555
|
-
title: "Staging setup artifacts",
|
|
556
|
-
fn: async ({ status }) => {
|
|
557
|
-
status.stage("Staging repo + external artifacts");
|
|
558
|
-
await stageRemoteSetupArtifacts({
|
|
559
|
-
client,
|
|
560
|
-
spriteAlias,
|
|
561
|
-
computeProvider,
|
|
562
|
-
workdir: expandedWorkdir,
|
|
563
|
-
artifactsBundlePath: remoteArtifactsBundlePath,
|
|
564
|
-
artifactsManifestPath: remoteArtifactsManifestPath,
|
|
565
|
-
});
|
|
566
|
-
},
|
|
567
|
-
});
|
|
568
|
-
await updateInitState({ steps: { setupArtifactsStaged: true } });
|
|
569
|
-
}
|
|
570
|
-
if (!skipCodexApply) {
|
|
571
|
-
await runInitStep({
|
|
572
|
-
enabled: progressEnabled,
|
|
573
|
-
title: "Snapshot FS (pre-setup)",
|
|
574
|
-
fn: async ({ status, fail, ok }) => {
|
|
575
|
-
try {
|
|
576
|
-
const checkpoint = await retryInitStep({
|
|
577
|
-
status,
|
|
578
|
-
title: "Snapshot FS (pre-setup)",
|
|
579
|
-
shouldRetry: (error) => isRetryableInitError(error) ||
|
|
580
|
-
isRetryableCheckpointForbiddenError(error),
|
|
581
|
-
fn: async () => await recordCodexCheckpoint({
|
|
582
|
-
client,
|
|
583
|
-
canonical,
|
|
584
|
-
spriteAlias,
|
|
585
|
-
phase: "preCodexSetup",
|
|
586
|
-
}),
|
|
587
|
-
});
|
|
588
|
-
if (checkpoint.id) {
|
|
589
|
-
ok(`Snapshot created: ${checkpoint.id}`);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
catch (error) {
|
|
593
|
-
logger.warn("init_checkpoint_create_failed", {
|
|
594
|
-
box: canonical,
|
|
595
|
-
fingerprint,
|
|
596
|
-
phase: "pre-codex-setup",
|
|
597
|
-
error: error instanceof Error ? error.message : String(error),
|
|
598
|
-
});
|
|
599
|
-
fail("Snapshot FS (pre-setup) (failed)");
|
|
600
|
-
throw error;
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
if (!skipServicesEnable) {
|
|
606
|
-
await runInitStep({
|
|
607
|
-
enabled: progressEnabled,
|
|
608
|
-
title: "Enabling services",
|
|
609
|
-
fn: async ({ status }) => {
|
|
610
|
-
await enableRemoteServices({
|
|
611
|
-
client,
|
|
612
|
-
spriteAlias,
|
|
613
|
-
services: finalApprovedPlan.services.backgroundServices,
|
|
614
|
-
status,
|
|
615
|
-
});
|
|
616
|
-
await updateInitState({ steps: { servicesEnabled: true } });
|
|
617
|
-
},
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
if (remoteCodexAlreadyApplied && !managedValidationCompleted) {
|
|
621
|
-
await completeCodexApply({
|
|
622
|
-
progressEnabled,
|
|
623
|
-
validateManagedInitCompletion,
|
|
624
|
-
updateInitState,
|
|
625
|
-
clearResumeState: async () => {
|
|
626
|
-
await persistCodexSetupResumeState(null);
|
|
627
|
-
},
|
|
628
|
-
updateRegistryProjectStatus,
|
|
629
|
-
resolveInitStatus,
|
|
630
|
-
getInitState,
|
|
631
|
-
});
|
|
632
|
-
remoteCodexAlreadyApplied = hasRemoteCodexApplied(getInitState()?.steps);
|
|
633
|
-
managedValidationCompleted = hasManagedDaemonValidated(getInitState()?.steps);
|
|
634
|
-
}
|
|
635
|
-
if (shouldResume &&
|
|
636
|
-
!remoteCodexAlreadyApplied &&
|
|
637
|
-
getInitState()?.steps.setupArtifactsStaged) {
|
|
638
|
-
const setupTodo = await runInitStep({
|
|
639
|
-
enabled: progressEnabled,
|
|
640
|
-
title: "Checking remote setup state",
|
|
641
|
-
fn: async () => await readRemoteSetupTodo({
|
|
642
|
-
client,
|
|
643
|
-
spriteAlias,
|
|
644
|
-
workdir: expandedWorkdir,
|
|
645
|
-
}),
|
|
646
|
-
});
|
|
647
|
-
if (setupTodo) {
|
|
648
|
-
logger.info("init_codex_resume_detected_remote_completion", {
|
|
649
|
-
box: spriteAlias,
|
|
650
|
-
workdir: expandedWorkdir,
|
|
651
|
-
});
|
|
652
|
-
await completeCodexApply({
|
|
653
|
-
progressEnabled,
|
|
654
|
-
validateManagedInitCompletion,
|
|
655
|
-
updateInitState,
|
|
656
|
-
clearResumeState: async () => {
|
|
657
|
-
await persistCodexSetupResumeState(null);
|
|
658
|
-
},
|
|
659
|
-
updateRegistryProjectStatus,
|
|
660
|
-
resolveInitStatus,
|
|
661
|
-
getInitState,
|
|
662
|
-
});
|
|
663
|
-
remoteCodexAlreadyApplied = hasRemoteCodexApplied(getInitState()?.steps);
|
|
664
|
-
managedValidationCompleted = hasManagedDaemonValidated(getInitState()?.steps);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
if (!remoteCodexAlreadyApplied) {
|
|
668
|
-
await runInitStep({
|
|
669
|
-
enabled: progressEnabled,
|
|
670
|
-
title: "Running Codex setup",
|
|
671
|
-
fn: async ({ status }) => {
|
|
672
|
-
await runRemoteCodexSetup({
|
|
673
|
-
client,
|
|
674
|
-
spriteAlias,
|
|
675
|
-
computeProvider,
|
|
676
|
-
expandedWorkdir,
|
|
677
|
-
remoteSetupPath,
|
|
678
|
-
remoteArtifactsBundlePath,
|
|
679
|
-
remoteArtifactsManifestPath,
|
|
680
|
-
socketInfo,
|
|
681
|
-
status,
|
|
682
|
-
pathSetup,
|
|
683
|
-
entrypoints: finalApprovedPlan.services.appEntrypoints,
|
|
684
|
-
resumeState: readCodexSetupResumeState(),
|
|
685
|
-
onResumeStateChange: async (resumeState) => {
|
|
686
|
-
await persistCodexSetupResumeState(resumeState);
|
|
687
|
-
},
|
|
688
|
-
interactiveLoginAllowed: !nonInteractive,
|
|
689
|
-
emitCodexOutput: !parsed.json,
|
|
690
|
-
...(initCodexProxyOptions
|
|
691
|
-
? { proxyOptions: initCodexProxyOptions }
|
|
692
|
-
: {}),
|
|
693
|
-
});
|
|
694
|
-
},
|
|
695
|
-
});
|
|
696
|
-
await completeCodexApply({
|
|
697
|
-
progressEnabled,
|
|
698
|
-
validateManagedInitCompletion,
|
|
699
|
-
updateInitState,
|
|
700
|
-
clearResumeState: async () => {
|
|
701
|
-
await persistCodexSetupResumeState(null);
|
|
702
|
-
},
|
|
703
|
-
updateRegistryProjectStatus,
|
|
704
|
-
resolveInitStatus,
|
|
705
|
-
getInitState,
|
|
706
|
-
});
|
|
707
|
-
remoteCodexAlreadyApplied = hasRemoteCodexApplied(getInitState()?.steps);
|
|
708
|
-
managedValidationCompleted = hasManagedDaemonValidated(getInitState()?.steps);
|
|
709
|
-
}
|
|
710
|
-
const needsPostSetupSnapshot = () => {
|
|
711
|
-
const state = getInitState();
|
|
712
|
-
const hasPostSnapshot = Boolean(state?.checkpoints?.postCodexSetup?.id);
|
|
713
|
-
return (!hasPostSnapshot &&
|
|
714
|
-
(!skipCodexApply || hasCompletedManagedInitSetup(state?.steps)));
|
|
715
|
-
};
|
|
716
|
-
if (needsPostSetupSnapshot()) {
|
|
717
|
-
await runInitStep({
|
|
718
|
-
enabled: progressEnabled,
|
|
719
|
-
title: "Snapshot FS (post-setup)",
|
|
720
|
-
fn: async ({ status, fail, ok }) => {
|
|
721
|
-
try {
|
|
722
|
-
const checkpoint = await retryInitStep({
|
|
723
|
-
status,
|
|
724
|
-
title: "Snapshot FS (post-setup)",
|
|
725
|
-
shouldRetry: (error) => isRetryableInitError(error) ||
|
|
726
|
-
isRetryableCheckpointForbiddenError(error),
|
|
727
|
-
fn: async () => await recordCodexCheckpoint({
|
|
728
|
-
client,
|
|
729
|
-
canonical,
|
|
730
|
-
spriteAlias,
|
|
731
|
-
phase: "postCodexSetup",
|
|
732
|
-
}),
|
|
733
|
-
});
|
|
734
|
-
if (checkpoint.id) {
|
|
735
|
-
ok(`Snapshot created: ${checkpoint.id}`);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
catch (error) {
|
|
739
|
-
logger.warn("init_checkpoint_create_failed", {
|
|
740
|
-
box: canonical,
|
|
741
|
-
fingerprint,
|
|
742
|
-
phase: "post-codex-setup",
|
|
743
|
-
error: error instanceof Error ? error.message : String(error),
|
|
744
|
-
});
|
|
745
|
-
fail("Snapshot FS (post-setup) (failed)");
|
|
746
|
-
throw error;
|
|
747
|
-
}
|
|
748
|
-
},
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
const finalStatus = resolveInitStatus(getInitState()?.steps, getInitState()?.complete);
|
|
752
|
-
const isComplete = finalStatus === "complete";
|
|
753
|
-
await runInitStep({
|
|
754
|
-
enabled: progressEnabled,
|
|
755
|
-
title: "Finalizing init",
|
|
756
|
-
fn: async () => {
|
|
757
|
-
await updateInitState({ complete: isComplete });
|
|
758
|
-
await updateRegistryProjectStatus(finalStatus);
|
|
759
|
-
},
|
|
760
|
-
});
|
|
761
|
-
if (parsed.json) {
|
|
762
|
-
console.log(JSON.stringify({
|
|
763
|
-
ok: true,
|
|
764
|
-
status: finalStatus,
|
|
765
|
-
canonical,
|
|
766
|
-
alias,
|
|
767
|
-
workdir,
|
|
768
|
-
fingerprint,
|
|
769
|
-
}, null, 2));
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
if (!isComplete) {
|
|
773
|
-
console.log(`devbox initialized (setup incomplete): ${alias} -> ${canonical}`);
|
|
774
|
-
console.log(`workdir: ${workdir}`);
|
|
775
|
-
console.log("next: run `dvb init --resume` from this repo to finish setup");
|
|
776
|
-
console.log("sprites: synced to control plane");
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
console.log(formatCompleteInitSummaryLines({
|
|
780
|
-
alias,
|
|
781
|
-
workdir,
|
|
782
|
-
isTty: Boolean(process.stdout.isTTY),
|
|
783
|
-
}).join("\n"));
|
|
784
|
-
};
|
|
785
|
-
export { completeCodexApply, enableRemoteServices, formatCompleteInitSummaryLines, readRemoteSetupTodo, runFinalizeFlow, };
|
|
786
|
-
//# sourceMappingURL=finalizeFlow.js.map
|