@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,719 +0,0 @@
|
|
|
1
|
-
import { createCliProviderClient, ProviderClientError, ProviderNotImplementedError, resolveModalCredentials, resolveModalCredentialsAsync, } from "@boxes-dev/core";
|
|
2
|
-
import { createManagedCheckpoint, fetchManagedDaemonConnectInfo, fetchResolvedModalCredentials, } from "../controlPlane.js";
|
|
3
|
-
import { createModalRuntimeClient } from "./provider/modalRuntime.js";
|
|
4
|
-
import { defaultE2bProviderOperations, mapE2bRecordToProviderInstance, requireE2bControlPlaneToken, } from "./provider/e2bLifecycleShared.js";
|
|
5
|
-
import { findModalSandbox, provisionModalSandbox, terminateModalSandboxesByAlias, } from "./provider/modalLifecycle.js";
|
|
6
|
-
const CORE_SERVICE_NAMES = new Set(["devbox-sprite-daemon", "devbox-sshd"]);
|
|
7
|
-
const DEFAULT_MODAL_APP_NAME = "sandbox-modal-smoke";
|
|
8
|
-
const normalizeServiceStatus = (status) => {
|
|
9
|
-
if (status === "starting")
|
|
10
|
-
return "starting";
|
|
11
|
-
if (status === "running")
|
|
12
|
-
return "running";
|
|
13
|
-
if (status === "failed")
|
|
14
|
-
return "failed";
|
|
15
|
-
return "stopped";
|
|
16
|
-
};
|
|
17
|
-
const mapSpriteServiceToProviderRecord = (service) => {
|
|
18
|
-
const nowIso = new Date().toISOString();
|
|
19
|
-
return {
|
|
20
|
-
spec: {
|
|
21
|
-
name: service.name,
|
|
22
|
-
scope: CORE_SERVICE_NAMES.has(service.name) ? "core" : "user",
|
|
23
|
-
cmd: service.cmd ?? "",
|
|
24
|
-
args: service.args ?? [],
|
|
25
|
-
httpPort: typeof service.httpPort === "number" ? service.httpPort : null,
|
|
26
|
-
workingDir: null,
|
|
27
|
-
autostart: true,
|
|
28
|
-
restartPolicy: "always",
|
|
29
|
-
createdAt: nowIso,
|
|
30
|
-
updatedAt: nowIso,
|
|
31
|
-
},
|
|
32
|
-
state: {
|
|
33
|
-
status: normalizeServiceStatus(service.state?.status),
|
|
34
|
-
pid: typeof service.state?.pid === "number" &&
|
|
35
|
-
Number.isFinite(service.state.pid)
|
|
36
|
-
? service.state.pid
|
|
37
|
-
: null,
|
|
38
|
-
startedAt: typeof service.state?.startedAt === "string"
|
|
39
|
-
? service.state.startedAt
|
|
40
|
-
: null,
|
|
41
|
-
lastExitAt: null,
|
|
42
|
-
lastExitCode: null,
|
|
43
|
-
restartCount: 0,
|
|
44
|
-
nextRestartAt: null,
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
const mapProviderUpsertToSpriteInput = (input) => ({
|
|
49
|
-
cmd: input.cmd,
|
|
50
|
-
args: input.args,
|
|
51
|
-
...(typeof input.httpPort === "number" ? { httpPort: input.httpPort } : {}),
|
|
52
|
-
});
|
|
53
|
-
const trimToNull = (value) => {
|
|
54
|
-
if (typeof value !== "string")
|
|
55
|
-
return null;
|
|
56
|
-
const trimmed = value.trim();
|
|
57
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
58
|
-
};
|
|
59
|
-
const normalizeEpochToIso = (value) => {
|
|
60
|
-
if (!Number.isFinite(value) || value <= 0)
|
|
61
|
-
return null;
|
|
62
|
-
const milliseconds = value >= 1_000_000_000_000 ? value : value * 1000;
|
|
63
|
-
const date = new Date(milliseconds);
|
|
64
|
-
return Number.isNaN(date.getTime()) ? null : date.toISOString();
|
|
65
|
-
};
|
|
66
|
-
const resolveModalRuntimeSeedAppName = () => {
|
|
67
|
-
const configured = process.env.MODAL_SANDBOX_APP?.trim();
|
|
68
|
-
if (configured && configured.length > 0) {
|
|
69
|
-
return configured;
|
|
70
|
-
}
|
|
71
|
-
return DEFAULT_MODAL_APP_NAME;
|
|
72
|
-
};
|
|
73
|
-
const createProviderCredentialContext = (options = {}) => ({
|
|
74
|
-
mode: options.mode ?? "auto",
|
|
75
|
-
controlPlaneToken: trimToNull(options.controlPlaneToken),
|
|
76
|
-
spritesToken: trimToNull(options.spritesToken),
|
|
77
|
-
modalTokenId: trimToNull(options.modalTokenId),
|
|
78
|
-
modalTokenSecret: trimToNull(options.modalTokenSecret),
|
|
79
|
-
e2bApiKey: trimToNull(options.e2bApiKey),
|
|
80
|
-
});
|
|
81
|
-
const resolveModalCommandOperationOptions = async (options = {}) => {
|
|
82
|
-
const providedCredentialContext = options.credentials ??
|
|
83
|
-
createProviderCredentialContext({
|
|
84
|
-
...(options.credentialMode ? { mode: options.credentialMode } : {}),
|
|
85
|
-
});
|
|
86
|
-
const baseCredentialContext = {
|
|
87
|
-
...providedCredentialContext,
|
|
88
|
-
// Modal runtime command flows resolve credentials from control plane only.
|
|
89
|
-
modalTokenId: null,
|
|
90
|
-
modalTokenSecret: null,
|
|
91
|
-
};
|
|
92
|
-
const resolveSharedCredentials = options.resolveSharedCredentials ??
|
|
93
|
-
(async (controlPlaneToken) => await fetchResolvedModalCredentials(controlPlaneToken));
|
|
94
|
-
const resolved = await resolveModalCredentialsAsync({
|
|
95
|
-
...(options.credentialMode
|
|
96
|
-
? { credentialMode: options.credentialMode }
|
|
97
|
-
: {}),
|
|
98
|
-
credentials: baseCredentialContext,
|
|
99
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
100
|
-
resolveSharedCredentials,
|
|
101
|
-
});
|
|
102
|
-
const credentials = {
|
|
103
|
-
...baseCredentialContext,
|
|
104
|
-
mode: resolved.mode,
|
|
105
|
-
modalTokenId: resolved.tokenId,
|
|
106
|
-
modalTokenSecret: resolved.tokenSecret,
|
|
107
|
-
};
|
|
108
|
-
return {
|
|
109
|
-
credentialMode: resolved.mode,
|
|
110
|
-
credentials,
|
|
111
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
const throwModalConnectUnsupported = (method) => {
|
|
115
|
-
throw new Error(`${method} is not supported for modal devboxes yet.`);
|
|
116
|
-
};
|
|
117
|
-
const createModalConnectSpritesClient = ({ alias, appName, sandboxId, operationOptions, ensureActive, runtimeClient, }) => {
|
|
118
|
-
const runtime = runtimeClient ??
|
|
119
|
-
createModalRuntimeClient({
|
|
120
|
-
alias,
|
|
121
|
-
appName,
|
|
122
|
-
sandboxId,
|
|
123
|
-
serviceRole: "user",
|
|
124
|
-
...(ensureActive ? { ensureActive } : {}),
|
|
125
|
-
credentialMode: operationOptions.credentialMode,
|
|
126
|
-
credentials: operationOptions.credentials,
|
|
127
|
-
...(operationOptions.cwd ? { cwd: operationOptions.cwd } : {}),
|
|
128
|
-
});
|
|
129
|
-
return {
|
|
130
|
-
listSprites: async () => throwModalConnectUnsupported("listSprites (modal connect client)"),
|
|
131
|
-
getSprite: async () => throwModalConnectUnsupported("getSprite (modal connect client)"),
|
|
132
|
-
createSprite: async () => throwModalConnectUnsupported("createSprite (modal connect client)"),
|
|
133
|
-
deleteSprite: async () => throwModalConnectUnsupported("deleteSprite (modal connect client)"),
|
|
134
|
-
writeFile: runtime.writeFile,
|
|
135
|
-
readFile: runtime.readFile,
|
|
136
|
-
exec: runtime.exec,
|
|
137
|
-
listExecSessions: runtime.listExecSessions,
|
|
138
|
-
killExecSession: runtime.killExecSession,
|
|
139
|
-
createCheckpoint: runtime.createCheckpoint,
|
|
140
|
-
listServices: runtime.listServices,
|
|
141
|
-
getService: runtime.getService,
|
|
142
|
-
createService: runtime.createService,
|
|
143
|
-
startService: runtime.startService,
|
|
144
|
-
stopService: runtime.stopService,
|
|
145
|
-
signalService: runtime.signalService,
|
|
146
|
-
deleteService: runtime.deleteService,
|
|
147
|
-
readServiceLogs: runtime.readServiceLogs,
|
|
148
|
-
openExecSession: runtime.openExecSession,
|
|
149
|
-
attachExecSession: runtime.attachExecSession,
|
|
150
|
-
openProxySocket: () => throwModalConnectUnsupported("openProxySocket (modal connect client)"),
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
const throwModalNotImplemented = (capability) => {
|
|
154
|
-
throw new ProviderNotImplementedError({
|
|
155
|
-
provider: "modal",
|
|
156
|
-
capability,
|
|
157
|
-
message: `Modal provider capability "${capability}" is not implemented yet.`,
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
const throwE2bNotImplemented = (capability) => {
|
|
161
|
-
throw new ProviderNotImplementedError({
|
|
162
|
-
provider: "e2b",
|
|
163
|
-
capability,
|
|
164
|
-
message: `E2B provider capability "${capability}" is not implemented yet.`,
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
const MODAL_AUTH_ERROR_CODES = new Set(["16", "UNAUTHENTICATED"]);
|
|
168
|
-
const normalizeModalErrorCode = (value) => {
|
|
169
|
-
if (typeof value === "number" && Number.isFinite(value)) {
|
|
170
|
-
return String(value);
|
|
171
|
-
}
|
|
172
|
-
if (typeof value !== "string") {
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
const trimmed = value.trim();
|
|
176
|
-
if (!trimmed) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
if (/^\d+$/.test(trimmed)) {
|
|
180
|
-
return String(Number.parseInt(trimmed, 10));
|
|
181
|
-
}
|
|
182
|
-
return trimmed.toUpperCase();
|
|
183
|
-
};
|
|
184
|
-
const extractModalErrorCode = (error) => {
|
|
185
|
-
if (!error || typeof error !== "object") {
|
|
186
|
-
return null;
|
|
187
|
-
}
|
|
188
|
-
const withCode = error;
|
|
189
|
-
const directCode = normalizeModalErrorCode(withCode.code);
|
|
190
|
-
if (directCode) {
|
|
191
|
-
return directCode;
|
|
192
|
-
}
|
|
193
|
-
const statusCode = normalizeModalErrorCode(withCode.status);
|
|
194
|
-
if (statusCode) {
|
|
195
|
-
return statusCode;
|
|
196
|
-
}
|
|
197
|
-
if (withCode.status && typeof withCode.status === "object") {
|
|
198
|
-
const nested = withCode.status;
|
|
199
|
-
const nestedCode = normalizeModalErrorCode(nested.code);
|
|
200
|
-
if (nestedCode) {
|
|
201
|
-
return nestedCode;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return null;
|
|
205
|
-
};
|
|
206
|
-
const isModalAuthError = (error) => {
|
|
207
|
-
if (error instanceof ProviderClientError) {
|
|
208
|
-
return error.code === "authentication_required";
|
|
209
|
-
}
|
|
210
|
-
if (!error || typeof error !== "object") {
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
const directCode = extractModalErrorCode(error);
|
|
214
|
-
if (directCode && MODAL_AUTH_ERROR_CODES.has(directCode)) {
|
|
215
|
-
return true;
|
|
216
|
-
}
|
|
217
|
-
const withCause = error;
|
|
218
|
-
const causeCode = extractModalErrorCode(withCause.cause);
|
|
219
|
-
return Boolean(causeCode && MODAL_AUTH_ERROR_CODES.has(causeCode));
|
|
220
|
-
};
|
|
221
|
-
const rethrowModalOperationError = (error) => {
|
|
222
|
-
if (error instanceof ProviderClientError) {
|
|
223
|
-
throw error;
|
|
224
|
-
}
|
|
225
|
-
if (isModalAuthError(error)) {
|
|
226
|
-
throw new ProviderClientError({
|
|
227
|
-
provider: "modal",
|
|
228
|
-
code: "authentication_required",
|
|
229
|
-
capability: null,
|
|
230
|
-
message: "Modal authentication failed. Run `dvb setup` or provide Modal BYO credentials.",
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
throw error;
|
|
234
|
-
};
|
|
235
|
-
const mapModalRecordToProviderInstance = (alias, record) => {
|
|
236
|
-
if (!record)
|
|
237
|
-
return null;
|
|
238
|
-
return {
|
|
239
|
-
provider: "modal",
|
|
240
|
-
providerInstanceId: alias,
|
|
241
|
-
status: record.status,
|
|
242
|
-
organization: null,
|
|
243
|
-
createdAt: normalizeEpochToIso(record.createdAt),
|
|
244
|
-
updatedAt: null,
|
|
245
|
-
url: null,
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
const createModalCommandProviderClient = (options = {}) => {
|
|
249
|
-
const providedCredentialContext = options.credentials ??
|
|
250
|
-
createProviderCredentialContext({
|
|
251
|
-
...(options.credentialMode ? { mode: options.credentialMode } : {}),
|
|
252
|
-
});
|
|
253
|
-
const baseCredentialContext = {
|
|
254
|
-
...providedCredentialContext,
|
|
255
|
-
modalTokenId: null,
|
|
256
|
-
modalTokenSecret: null,
|
|
257
|
-
};
|
|
258
|
-
const resolvedCredentials = resolveModalCredentials({
|
|
259
|
-
...(options.credentialMode
|
|
260
|
-
? { credentialMode: options.credentialMode }
|
|
261
|
-
: {}),
|
|
262
|
-
credentials: baseCredentialContext,
|
|
263
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
264
|
-
});
|
|
265
|
-
const syncOperationOptions = {
|
|
266
|
-
credentialMode: resolvedCredentials.mode,
|
|
267
|
-
credentials: {
|
|
268
|
-
...baseCredentialContext,
|
|
269
|
-
mode: resolvedCredentials.mode,
|
|
270
|
-
modalTokenId: resolvedCredentials.tokenId,
|
|
271
|
-
modalTokenSecret: resolvedCredentials.tokenSecret,
|
|
272
|
-
},
|
|
273
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
274
|
-
};
|
|
275
|
-
const modalOperations = options.operations ?? {
|
|
276
|
-
findSandbox: findModalSandbox,
|
|
277
|
-
provisionSandbox: provisionModalSandbox,
|
|
278
|
-
terminateSandboxesByAlias: terminateModalSandboxesByAlias,
|
|
279
|
-
};
|
|
280
|
-
const modalRuntimeByAlias = new Map();
|
|
281
|
-
let modalOperationOptionsPromise = null;
|
|
282
|
-
const resolveModalOperationOptions = async () => {
|
|
283
|
-
if (!modalOperationOptionsPromise) {
|
|
284
|
-
modalOperationOptionsPromise = resolveModalCommandOperationOptions({
|
|
285
|
-
...(options.credentialMode
|
|
286
|
-
? { credentialMode: options.credentialMode }
|
|
287
|
-
: {}),
|
|
288
|
-
credentials: baseCredentialContext,
|
|
289
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
290
|
-
...(options.resolveSharedCredentials
|
|
291
|
-
? { resolveSharedCredentials: options.resolveSharedCredentials }
|
|
292
|
-
: {}),
|
|
293
|
-
}).catch((error) => {
|
|
294
|
-
modalOperationOptionsPromise = null;
|
|
295
|
-
throw error;
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
return await modalOperationOptionsPromise;
|
|
299
|
-
};
|
|
300
|
-
const createModalRuntime = (args) => {
|
|
301
|
-
const controlPlaneToken = trimToNull(args.operationOptions.credentials.controlPlaneToken);
|
|
302
|
-
const issueConnectToken = controlPlaneToken
|
|
303
|
-
? async (intent) => {
|
|
304
|
-
const connectInfo = await fetchManagedDaemonConnectInfo(controlPlaneToken, args.alias, intent);
|
|
305
|
-
if (connectInfo.provider !== "modal") {
|
|
306
|
-
throw new Error(`Managed daemon connect returned provider "${connectInfo.provider}" for modal alias "${args.alias}".`);
|
|
307
|
-
}
|
|
308
|
-
return connectInfo;
|
|
309
|
-
}
|
|
310
|
-
: undefined;
|
|
311
|
-
const createCheckpoint = controlPlaneToken
|
|
312
|
-
? async (comment) => await createManagedCheckpoint(controlPlaneToken, args.alias, comment)
|
|
313
|
-
: undefined;
|
|
314
|
-
const runtimeOptions = {
|
|
315
|
-
alias: args.alias,
|
|
316
|
-
appName: args.appName,
|
|
317
|
-
sandboxId: args.sandboxId,
|
|
318
|
-
operationOptions: args.operationOptions,
|
|
319
|
-
...(options.ensureActive ? { ensureActive: options.ensureActive } : {}),
|
|
320
|
-
};
|
|
321
|
-
if (options.runtimeClientFactory) {
|
|
322
|
-
return options.runtimeClientFactory(runtimeOptions);
|
|
323
|
-
}
|
|
324
|
-
return createModalRuntimeClient({
|
|
325
|
-
alias: runtimeOptions.alias,
|
|
326
|
-
appName: runtimeOptions.appName,
|
|
327
|
-
sandboxId: runtimeOptions.sandboxId,
|
|
328
|
-
serviceRole: "user",
|
|
329
|
-
credentialMode: runtimeOptions.operationOptions.credentialMode,
|
|
330
|
-
credentials: runtimeOptions.operationOptions.credentials,
|
|
331
|
-
...(issueConnectToken
|
|
332
|
-
? {
|
|
333
|
-
createConnectToken: async (intent) => {
|
|
334
|
-
const token = await issueConnectToken(intent);
|
|
335
|
-
return { url: token.url, token: token.token };
|
|
336
|
-
},
|
|
337
|
-
}
|
|
338
|
-
: {}),
|
|
339
|
-
...(createCheckpoint
|
|
340
|
-
? {
|
|
341
|
-
createCheckpoint,
|
|
342
|
-
}
|
|
343
|
-
: {}),
|
|
344
|
-
...(runtimeOptions.operationOptions.cwd
|
|
345
|
-
? { cwd: runtimeOptions.operationOptions.cwd }
|
|
346
|
-
: {}),
|
|
347
|
-
...(runtimeOptions.ensureActive
|
|
348
|
-
? { ensureActive: runtimeOptions.ensureActive }
|
|
349
|
-
: {}),
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
const resolveModalRuntimeClientSync = (alias) => {
|
|
353
|
-
const cached = modalRuntimeByAlias.get(alias);
|
|
354
|
-
if (cached) {
|
|
355
|
-
return cached;
|
|
356
|
-
}
|
|
357
|
-
const runtime = createModalRuntime({
|
|
358
|
-
alias,
|
|
359
|
-
operationOptions: syncOperationOptions,
|
|
360
|
-
appName: resolveModalRuntimeSeedAppName(),
|
|
361
|
-
sandboxId: "pending",
|
|
362
|
-
});
|
|
363
|
-
modalRuntimeByAlias.set(alias, runtime);
|
|
364
|
-
return runtime;
|
|
365
|
-
};
|
|
366
|
-
return {
|
|
367
|
-
provider: "modal",
|
|
368
|
-
credentialMode: resolvedCredentials.mode,
|
|
369
|
-
listInstances: async () => throwModalNotImplemented("instances.list"),
|
|
370
|
-
getInstance: async (name) => {
|
|
371
|
-
try {
|
|
372
|
-
const operationOptions = await resolveModalOperationOptions();
|
|
373
|
-
return mapModalRecordToProviderInstance(name, await modalOperations.findSandbox({ alias: name, includeFinished: true }, operationOptions));
|
|
374
|
-
}
|
|
375
|
-
catch (error) {
|
|
376
|
-
return rethrowModalOperationError(error);
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
createInstance: async (name) => {
|
|
380
|
-
try {
|
|
381
|
-
const operationOptions = await resolveModalOperationOptions();
|
|
382
|
-
const created = await modalOperations.provisionSandbox(name, operationOptions);
|
|
383
|
-
return {
|
|
384
|
-
provider: "modal",
|
|
385
|
-
providerInstanceId: name,
|
|
386
|
-
status: "running",
|
|
387
|
-
organization: null,
|
|
388
|
-
createdAt: null,
|
|
389
|
-
updatedAt: created.sandboxId.trim().length > 0
|
|
390
|
-
? new Date().toISOString()
|
|
391
|
-
: null,
|
|
392
|
-
url: null,
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
catch (error) {
|
|
396
|
-
return rethrowModalOperationError(error);
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
deleteInstance: async (name) => {
|
|
400
|
-
try {
|
|
401
|
-
const operationOptions = await resolveModalOperationOptions();
|
|
402
|
-
await modalOperations.terminateSandboxesByAlias(name, {
|
|
403
|
-
includeFinished: true,
|
|
404
|
-
...operationOptions,
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
catch (error) {
|
|
408
|
-
return rethrowModalOperationError(error);
|
|
409
|
-
}
|
|
410
|
-
},
|
|
411
|
-
writeFile: async (name, remotePath, data, writeOptions) => {
|
|
412
|
-
try {
|
|
413
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
414
|
-
await runtime.writeFile(name, remotePath, data, writeOptions);
|
|
415
|
-
}
|
|
416
|
-
catch (error) {
|
|
417
|
-
return rethrowModalOperationError(error);
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
readFile: async (name, readOptions) => {
|
|
421
|
-
try {
|
|
422
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
423
|
-
return await runtime.readFile(name, readOptions);
|
|
424
|
-
}
|
|
425
|
-
catch (error) {
|
|
426
|
-
return rethrowModalOperationError(error);
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
exec: async (name, cmd, execOptions) => {
|
|
430
|
-
try {
|
|
431
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
432
|
-
return await runtime.exec(name, cmd, execOptions);
|
|
433
|
-
}
|
|
434
|
-
catch (error) {
|
|
435
|
-
return rethrowModalOperationError(error);
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
|
-
listExecSessions: async (name) => {
|
|
439
|
-
try {
|
|
440
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
441
|
-
return await runtime.listExecSessions(name);
|
|
442
|
-
}
|
|
443
|
-
catch (error) {
|
|
444
|
-
return rethrowModalOperationError(error);
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
killExecSession: async (name, sessionId, options) => {
|
|
448
|
-
try {
|
|
449
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
450
|
-
return await runtime.killExecSession(name, sessionId, options);
|
|
451
|
-
}
|
|
452
|
-
catch (error) {
|
|
453
|
-
return rethrowModalOperationError(error);
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
createCheckpoint: async () => throwModalNotImplemented("checkpoints.create"),
|
|
457
|
-
listServices: async (name) => {
|
|
458
|
-
try {
|
|
459
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
460
|
-
return await runtime.listServices(name);
|
|
461
|
-
}
|
|
462
|
-
catch (error) {
|
|
463
|
-
return rethrowModalOperationError(error);
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
getService: async (name, service) => {
|
|
467
|
-
try {
|
|
468
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
469
|
-
return await runtime.getService(name, service);
|
|
470
|
-
}
|
|
471
|
-
catch (error) {
|
|
472
|
-
return rethrowModalOperationError(error);
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
createService: async (name, service, input) => {
|
|
476
|
-
try {
|
|
477
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
478
|
-
return await runtime.createService(name, service, input);
|
|
479
|
-
}
|
|
480
|
-
catch (error) {
|
|
481
|
-
return rethrowModalOperationError(error);
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
startService: async (name, service, options) => {
|
|
485
|
-
try {
|
|
486
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
487
|
-
return await runtime.startService(name, service, options);
|
|
488
|
-
}
|
|
489
|
-
catch (error) {
|
|
490
|
-
return rethrowModalOperationError(error);
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
|
-
stopService: async (name, service, options) => {
|
|
494
|
-
try {
|
|
495
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
496
|
-
return await runtime.stopService(name, service, options);
|
|
497
|
-
}
|
|
498
|
-
catch (error) {
|
|
499
|
-
return rethrowModalOperationError(error);
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
listServiceRecords: async (name) => {
|
|
503
|
-
try {
|
|
504
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
505
|
-
if (runtime.listServiceRecords) {
|
|
506
|
-
return await runtime.listServiceRecords(name);
|
|
507
|
-
}
|
|
508
|
-
const services = await runtime.listServices(name);
|
|
509
|
-
return services.map((service) => mapSpriteServiceToProviderRecord(service));
|
|
510
|
-
}
|
|
511
|
-
catch (error) {
|
|
512
|
-
return rethrowModalOperationError(error);
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
getServiceRecord: async (name, service) => {
|
|
516
|
-
try {
|
|
517
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
518
|
-
if (runtime.getServiceRecord) {
|
|
519
|
-
return await runtime.getServiceRecord(name, service);
|
|
520
|
-
}
|
|
521
|
-
const found = await runtime.getService(name, service);
|
|
522
|
-
return found ? mapSpriteServiceToProviderRecord(found) : null;
|
|
523
|
-
}
|
|
524
|
-
catch (error) {
|
|
525
|
-
return rethrowModalOperationError(error);
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
upsertService: async (name, service, input) => {
|
|
529
|
-
try {
|
|
530
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
531
|
-
if (runtime.upsertServiceRecord) {
|
|
532
|
-
return await runtime.upsertServiceRecord(name, service, input);
|
|
533
|
-
}
|
|
534
|
-
const created = await runtime.createService(name, service, mapProviderUpsertToSpriteInput(input));
|
|
535
|
-
if (created?.state?.status !== "running") {
|
|
536
|
-
await runtime.startService(name, service, { duration: "0" });
|
|
537
|
-
}
|
|
538
|
-
const refreshed = await runtime.getService(name, service);
|
|
539
|
-
return refreshed ? mapSpriteServiceToProviderRecord(refreshed) : null;
|
|
540
|
-
}
|
|
541
|
-
catch (error) {
|
|
542
|
-
return rethrowModalOperationError(error);
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
signalService: async (name, service, options) => {
|
|
546
|
-
try {
|
|
547
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
548
|
-
return await runtime.signalService(name, service, options);
|
|
549
|
-
}
|
|
550
|
-
catch (error) {
|
|
551
|
-
return rethrowModalOperationError(error);
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
deleteService: async (name, service) => {
|
|
555
|
-
try {
|
|
556
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
557
|
-
await runtime.deleteService(name, service);
|
|
558
|
-
}
|
|
559
|
-
catch (error) {
|
|
560
|
-
return rethrowModalOperationError(error);
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
readServiceLogs: async (name, service, options) => {
|
|
564
|
-
try {
|
|
565
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
566
|
-
return await runtime.readServiceLogs(name, service, options);
|
|
567
|
-
}
|
|
568
|
-
catch (error) {
|
|
569
|
-
return rethrowModalOperationError(error);
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
openExecSession: (name, openOptions) => {
|
|
573
|
-
try {
|
|
574
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
575
|
-
return runtime.openExecSession(name, openOptions);
|
|
576
|
-
}
|
|
577
|
-
catch (error) {
|
|
578
|
-
return rethrowModalOperationError(error);
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
attachExecSession: (name, sessionId) => {
|
|
582
|
-
try {
|
|
583
|
-
const runtime = resolveModalRuntimeClientSync(name);
|
|
584
|
-
return runtime.attachExecSession(name, sessionId);
|
|
585
|
-
}
|
|
586
|
-
catch (error) {
|
|
587
|
-
return rethrowModalOperationError(error);
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
openProxySocket: () => throwModalNotImplemented("proxy.open"),
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
const createE2bCommandProviderClient = (options) => {
|
|
594
|
-
const e2bOperations = options.operations ?? defaultE2bProviderOperations;
|
|
595
|
-
const resolveControlPlaneToken = () => requireE2bControlPlaneToken(options.credentials);
|
|
596
|
-
const runtime = options.runtimeClient;
|
|
597
|
-
return {
|
|
598
|
-
provider: "e2b",
|
|
599
|
-
credentialMode: options.credentialMode ?? "shared",
|
|
600
|
-
listInstances: async () => {
|
|
601
|
-
const controlPlaneToken = resolveControlPlaneToken();
|
|
602
|
-
const records = await e2bOperations.listDevboxes(controlPlaneToken);
|
|
603
|
-
return {
|
|
604
|
-
instances: records
|
|
605
|
-
.map((record) => mapE2bRecordToProviderInstance(record))
|
|
606
|
-
.filter((record) => record !== null),
|
|
607
|
-
nextContinuationToken: null,
|
|
608
|
-
hasMore: false,
|
|
609
|
-
};
|
|
610
|
-
},
|
|
611
|
-
getInstance: async (name) => mapE2bRecordToProviderInstance(await e2bOperations.getDevbox(resolveControlPlaneToken(), name)),
|
|
612
|
-
createInstance: async (name) => {
|
|
613
|
-
const created = await e2bOperations.provisionDevbox(resolveControlPlaneToken(), name);
|
|
614
|
-
return {
|
|
615
|
-
provider: "e2b",
|
|
616
|
-
providerInstanceId: created.sandboxId,
|
|
617
|
-
status: created.status,
|
|
618
|
-
organization: null,
|
|
619
|
-
createdAt: null,
|
|
620
|
-
updatedAt: new Date().toISOString(),
|
|
621
|
-
url: null,
|
|
622
|
-
};
|
|
623
|
-
},
|
|
624
|
-
deleteInstance: async (name) => {
|
|
625
|
-
await e2bOperations.destroyDevbox(resolveControlPlaneToken(), name);
|
|
626
|
-
},
|
|
627
|
-
writeFile: runtime.writeFile,
|
|
628
|
-
readFile: runtime.readFile,
|
|
629
|
-
exec: runtime.exec,
|
|
630
|
-
listExecSessions: runtime.listExecSessions,
|
|
631
|
-
killExecSession: runtime.killExecSession,
|
|
632
|
-
createCheckpoint: runtime.createCheckpoint,
|
|
633
|
-
listServices: runtime.listServices,
|
|
634
|
-
getService: runtime.getService,
|
|
635
|
-
createService: runtime.createService,
|
|
636
|
-
startService: runtime.startService,
|
|
637
|
-
stopService: runtime.stopService,
|
|
638
|
-
listServiceRecords: async (name) => {
|
|
639
|
-
if (runtime.listServiceRecords) {
|
|
640
|
-
return await runtime.listServiceRecords(name);
|
|
641
|
-
}
|
|
642
|
-
const services = await runtime.listServices(name);
|
|
643
|
-
return services.map((service) => mapSpriteServiceToProviderRecord(service));
|
|
644
|
-
},
|
|
645
|
-
getServiceRecord: async (name, service) => {
|
|
646
|
-
if (runtime.getServiceRecord) {
|
|
647
|
-
return await runtime.getServiceRecord(name, service);
|
|
648
|
-
}
|
|
649
|
-
const found = await runtime.getService(name, service);
|
|
650
|
-
return found ? mapSpriteServiceToProviderRecord(found) : null;
|
|
651
|
-
},
|
|
652
|
-
upsertService: async (name, service, input) => {
|
|
653
|
-
if (runtime.upsertServiceRecord) {
|
|
654
|
-
return await runtime.upsertServiceRecord(name, service, input);
|
|
655
|
-
}
|
|
656
|
-
const created = await runtime.createService(name, service, mapProviderUpsertToSpriteInput(input));
|
|
657
|
-
if (created?.state?.status !== "running") {
|
|
658
|
-
await runtime.startService(name, service, { duration: "0" });
|
|
659
|
-
}
|
|
660
|
-
const refreshed = await runtime.getService(name, service);
|
|
661
|
-
return refreshed ? mapSpriteServiceToProviderRecord(refreshed) : null;
|
|
662
|
-
},
|
|
663
|
-
signalService: runtime.signalService,
|
|
664
|
-
deleteService: runtime.deleteService,
|
|
665
|
-
readServiceLogs: runtime.readServiceLogs,
|
|
666
|
-
openExecSession: runtime.openExecSession,
|
|
667
|
-
attachExecSession: runtime.attachExecSession,
|
|
668
|
-
openProxySocket: () => throwE2bNotImplemented("proxy.open"),
|
|
669
|
-
};
|
|
670
|
-
};
|
|
671
|
-
const createCommandProviderClient = (options) => {
|
|
672
|
-
if (options.provider === "sprites") {
|
|
673
|
-
return createCliProviderClient({
|
|
674
|
-
provider: "sprites",
|
|
675
|
-
...(options.credentialMode
|
|
676
|
-
? { credentialMode: options.credentialMode }
|
|
677
|
-
: {}),
|
|
678
|
-
...(options.credentials !== undefined
|
|
679
|
-
? { credentials: options.credentials }
|
|
680
|
-
: {}),
|
|
681
|
-
sprites: {
|
|
682
|
-
apiBaseUrl: options.sprites.apiBaseUrl,
|
|
683
|
-
token: options.sprites.token,
|
|
684
|
-
...(options.sprites.client ? { client: options.sprites.client } : {}),
|
|
685
|
-
},
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
if (options.provider === "e2b") {
|
|
689
|
-
return createE2bCommandProviderClient({
|
|
690
|
-
...(options.credentials !== undefined
|
|
691
|
-
? { credentials: options.credentials }
|
|
692
|
-
: {}),
|
|
693
|
-
...(options.credentialMode
|
|
694
|
-
? { credentialMode: options.credentialMode }
|
|
695
|
-
: {}),
|
|
696
|
-
runtimeClient: options.runtimeClient,
|
|
697
|
-
...(options.operations ? { operations: options.operations } : {}),
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
return createModalCommandProviderClient({
|
|
701
|
-
...(options.credentialMode
|
|
702
|
-
? { credentialMode: options.credentialMode }
|
|
703
|
-
: {}),
|
|
704
|
-
...(options.credentials !== undefined
|
|
705
|
-
? { credentials: options.credentials }
|
|
706
|
-
: {}),
|
|
707
|
-
...(options.cwd ? { cwd: options.cwd } : {}),
|
|
708
|
-
...(options.operations ? { operations: options.operations } : {}),
|
|
709
|
-
...(options.ensureActive ? { ensureActive: options.ensureActive } : {}),
|
|
710
|
-
...(options.resolveSharedCredentials
|
|
711
|
-
? { resolveSharedCredentials: options.resolveSharedCredentials }
|
|
712
|
-
: {}),
|
|
713
|
-
...(options.runtimeClientFactory
|
|
714
|
-
? { runtimeClientFactory: options.runtimeClientFactory }
|
|
715
|
-
: {}),
|
|
716
|
-
});
|
|
717
|
-
};
|
|
718
|
-
export { createCommandProviderClient, createModalConnectSpritesClient, createProviderCredentialContext, resolveModalCommandOperationOptions, };
|
|
719
|
-
//# sourceMappingURL=providerClient.js.map
|