withruntime 0.50.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/apps.d.ts +309 -0
- package/dist/generated/apps.js +333 -0
- package/dist/generated/audit.d.ts +47 -0
- package/dist/generated/audit.js +14 -0
- package/dist/generated/browsers.d.ts +309 -0
- package/dist/generated/browsers.js +333 -0
- package/dist/generated/builds.d.ts +309 -0
- package/dist/generated/builds.js +333 -0
- package/dist/generated/ci.d.ts +309 -0
- package/dist/generated/ci.js +333 -0
- package/dist/generated/containers.d.ts +309 -0
- package/dist/generated/containers.js +333 -0
- package/dist/generated/desktops.d.ts +309 -0
- package/dist/generated/desktops.js +333 -0
- package/dist/generated/domains.d.ts +80 -0
- package/dist/generated/domains.js +58 -0
- package/dist/generated/egressIps.d.ts +36 -0
- package/dist/generated/egressIps.js +14 -0
- package/dist/generated/events.d.ts +37 -0
- package/dist/generated/events.js +14 -0
- package/dist/generated/feedback.d.ts +44 -0
- package/dist/generated/feedback.js +13 -0
- package/dist/generated/functions.d.ts +309 -0
- package/dist/generated/functions.js +333 -0
- package/dist/generated/identities.d.ts +36 -0
- package/dist/generated/identities.js +22 -0
- package/dist/generated/images.d.ts +200 -0
- package/dist/generated/images.js +65 -0
- package/dist/generated/index.d.ts +143 -0
- package/dist/generated/index.js +184 -0
- package/dist/generated/jobRuns.d.ts +68 -0
- package/dist/generated/jobRuns.js +22 -0
- package/dist/generated/jobs.d.ts +144 -0
- package/dist/generated/jobs.js +85 -0
- package/dist/generated/keys.d.ts +105 -0
- package/dist/generated/keys.js +26 -0
- package/dist/generated/me.d.ts +33 -0
- package/dist/generated/me.js +13 -0
- package/dist/generated/networks.d.ts +32 -0
- package/dist/generated/networks.js +14 -0
- package/dist/generated/notebooks.d.ts +309 -0
- package/dist/generated/notebooks.js +333 -0
- package/dist/generated/otel.d.ts +46 -0
- package/dist/generated/otel.js +22 -0
- package/dist/generated/ports.d.ts +55 -0
- package/dist/generated/ports.js +22 -0
- package/dist/generated/previews.d.ts +86 -0
- package/dist/generated/previews.js +67 -0
- package/dist/generated/projects.d.ts +47 -0
- package/dist/generated/projects.js +26 -0
- package/dist/generated/roles.d.ts +36 -0
- package/dist/generated/roles.js +22 -0
- package/dist/generated/routes.d.ts +3 -0
- package/dist/generated/routes.js +4 -0
- package/dist/generated/runtime.d.ts +176 -0
- package/dist/generated/runtime.js +416 -0
- package/dist/generated/sandboxes.d.ts +952 -0
- package/dist/generated/sandboxes.js +342 -0
- package/dist/generated/secrets.d.ts +116 -0
- package/dist/generated/secrets.js +54 -0
- package/dist/generated/sessions.d.ts +47 -0
- package/dist/generated/sessions.js +17 -0
- package/dist/generated/signing.d.ts +68 -0
- package/dist/generated/signing.js +187 -0
- package/dist/generated/sites.d.ts +309 -0
- package/dist/generated/sites.js +333 -0
- package/dist/generated/snapshots.d.ts +27 -0
- package/dist/generated/snapshots.js +22 -0
- package/dist/generated/tunnels.d.ts +68 -0
- package/dist/generated/tunnels.js +14 -0
- package/dist/generated/usage.d.ts +155 -0
- package/dist/generated/usage.js +17 -0
- package/dist/generated/volumes.d.ts +36 -0
- package/dist/generated/volumes.js +26 -0
- package/dist/generated/webhooks.d.ts +44 -0
- package/dist/generated/webhooks.js +22 -0
- package/dist/generated/workspaces.d.ts +309 -0
- package/dist/generated/workspaces.js +333 -0
- package/dist/v2/cli.d.ts +7 -0
- package/dist/v2/cli.js +283 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/index.js +4 -0
- package/dist/v2/login.d.ts +35 -0
- package/dist/v2/login.js +225 -0
- package/dist/v2/mcp.d.ts +1 -0
- package/dist/v2/mcp.js +49 -0
- package/dist/v2/openapi.json +75750 -0
- package/dist/v2/shims/base.d.ts +33 -0
- package/dist/v2/shims/base.js +54 -0
- package/dist/v2/shims/blaxel.d.ts +60 -0
- package/dist/v2/shims/blaxel.js +71 -0
- package/dist/v2/shims/cloudflare.d.ts +52 -0
- package/dist/v2/shims/cloudflare.js +55 -0
- package/dist/v2/shims/daytona.d.ts +58 -0
- package/dist/v2/shims/daytona.js +74 -0
- package/dist/v2/shims/e2b.d.ts +142 -0
- package/dist/v2/shims/e2b.js +238 -0
- package/dist/v2/shims/fly.d.ts +6 -0
- package/dist/v2/shims/fly.js +91 -0
- package/dist/v2/shims/modal.d.ts +54 -0
- package/dist/v2/shims/modal.js +79 -0
- package/dist/v2/shims/morph.d.ts +60 -0
- package/dist/v2/shims/morph.js +87 -0
- package/dist/v2/shims/vercel.d.ts +53 -0
- package/dist/v2/shims/vercel.js +90 -0
- package/dist/v2/table.d.ts +53 -0
- package/dist/v2/table.js +122 -0
- package/package.json +20 -310
- package/BLAXEL.md +0 -290
- package/COMPATIBILITY.md +0 -447
- package/DAYTONA.md +0 -237
- package/E2B.md +0 -314
- package/README.md +0 -331
- package/README.src.md +0 -333
- package/VERCEL.md +0 -230
- package/agent-platforms-inventory.json +0 -387
- package/compatibility-lock.json +0 -305
- package/dist/agents/browser.d.ts +0 -12
- package/dist/agents/browser.js +0 -12
- package/dist/agents/index.d.ts +0 -11
- package/dist/agents/index.js +0 -11
- package/dist/agents-cli.d.ts +0 -16
- package/dist/agents-cli.js +0 -1237
- package/dist/agents-deploy.d.ts +0 -196
- package/dist/agents-deploy.js +0 -872
- package/dist/agents-file.d.ts +0 -19
- package/dist/agents-file.js +0 -135
- package/dist/ai/index.d.ts +0 -49
- package/dist/ai/index.js +0 -31
- package/dist/ai-harness/index.d.ts +0 -194
- package/dist/ai-harness/index.js +0 -522
- package/dist/api-defaults.d.ts +0 -17
- package/dist/api-defaults.js +0 -22
- package/dist/apps/index.d.ts +0 -10
- package/dist/apps/index.js +0 -11
- package/dist/apps-cli.d.ts +0 -16
- package/dist/apps-cli.js +0 -1021
- package/dist/billing-cli.d.ts +0 -23
- package/dist/billing-cli.js +0 -264
- package/dist/blaxel/client.d.ts +0 -59
- package/dist/blaxel/client.js +0 -86
- package/dist/blaxel/context.d.ts +0 -59
- package/dist/blaxel/context.js +0 -162
- package/dist/blaxel/errors.d.ts +0 -130
- package/dist/blaxel/errors.js +0 -315
- package/dist/blaxel/filesystem.d.ts +0 -147
- package/dist/blaxel/filesystem.js +0 -585
- package/dist/blaxel/index.d.ts +0 -287
- package/dist/blaxel/index.js +0 -351
- package/dist/blaxel/interpreter.d.ts +0 -71
- package/dist/blaxel/interpreter.js +0 -256
- package/dist/blaxel/lookup.d.ts +0 -39
- package/dist/blaxel/lookup.js +0 -84
- package/dist/blaxel/pagination.d.ts +0 -39
- package/dist/blaxel/pagination.js +0 -88
- package/dist/blaxel/preview.d.ts +0 -136
- package/dist/blaxel/preview.js +0 -304
- package/dist/blaxel/process.d.ts +0 -126
- package/dist/blaxel/process.js +0 -581
- package/dist/blaxel/sandbox.d.ts +0 -198
- package/dist/blaxel/sandbox.js +0 -856
- package/dist/blaxel/session.d.ts +0 -31
- package/dist/blaxel/session.js +0 -136
- package/dist/blaxel/snapshot.d.ts +0 -123
- package/dist/blaxel/snapshot.js +0 -199
- package/dist/blaxel/types.d.ts +0 -145
- package/dist/blaxel/types.js +0 -60
- package/dist/blaxel/unsupported.d.ts +0 -20
- package/dist/blaxel/unsupported.js +0 -32
- package/dist/browser-stub.d.ts +0 -1
- package/dist/browser-stub.js +0 -1
- package/dist/browsers/index.d.ts +0 -9
- package/dist/browsers/index.js +0 -10
- package/dist/browsers-cli.d.ts +0 -13
- package/dist/browsers-cli.js +0 -279
- package/dist/builds/index.d.ts +0 -10
- package/dist/builds/index.js +0 -11
- package/dist/ci/index.d.ts +0 -13
- package/dist/ci/index.js +0 -14
- package/dist/ci-cli.d.ts +0 -20
- package/dist/ci-cli.js +0 -537
- package/dist/ci-import.d.ts +0 -23
- package/dist/ci-import.js +0 -565
- package/dist/claude-agent-sdk/index.d.ts +0 -7
- package/dist/claude-agent-sdk/index.js +0 -65
- package/dist/cli/logs.d.ts +0 -21
- package/dist/cli/logs.js +0 -188
- package/dist/cli-extras.d.ts +0 -39
- package/dist/cli-extras.js +0 -267
- package/dist/cli-name.d.ts +0 -6
- package/dist/cli-name.js +0 -8
- package/dist/cli-update.d.ts +0 -11
- package/dist/cli-update.js +0 -46
- package/dist/cli-words.d.ts +0 -36
- package/dist/cli-words.js +0 -167
- package/dist/cli.d.ts +0 -92
- package/dist/cli.js +0 -5463
- package/dist/client.d.ts +0 -189
- package/dist/client.js +0 -205
- package/dist/cloudflare/errors.d.ts +0 -166
- package/dist/cloudflare/errors.js +0 -183
- package/dist/cloudflare/identity.d.ts +0 -7
- package/dist/cloudflare/identity.js +0 -13
- package/dist/cloudflare/index.d.ts +0 -545
- package/dist/cloudflare/index.js +0 -1106
- package/dist/cloudflare/interpreter.d.ts +0 -119
- package/dist/cloudflare/interpreter.js +0 -232
- package/dist/cloudflare/mime.d.ts +0 -1
- package/dist/cloudflare/mime.js +0 -66
- package/dist/cloudflare/streams.d.ts +0 -46
- package/dist/cloudflare/streams.js +0 -175
- package/dist/cloudflare/types.d.ts +0 -338
- package/dist/cloudflare/types.js +0 -80
- package/dist/cloudflare/watch.d.ts +0 -9
- package/dist/cloudflare/watch.js +0 -24
- package/dist/cloudflare/worker.d.ts +0 -706
- package/dist/cloudflare/worker.js +0 -633
- package/dist/codesandbox/guest-service.d.ts +0 -31
- package/dist/codesandbox/guest-service.js +0 -490
- package/dist/codesandbox/index.d.ts +0 -574
- package/dist/codesandbox/index.js +0 -1747
- package/dist/compat/core.d.ts +0 -58
- package/dist/compat/core.js +0 -267
- package/dist/compat/files.d.ts +0 -27
- package/dist/compat/files.js +0 -157
- package/dist/compat/lease.d.ts +0 -37
- package/dist/compat/lease.js +0 -93
- package/dist/compat/shell.d.ts +0 -4
- package/dist/compat/shell.js +0 -165
- package/dist/containers/index.d.ts +0 -10
- package/dist/containers/index.js +0 -11
- package/dist/credentials.d.ts +0 -71
- package/dist/credentials.js +0 -340
- package/dist/daytona/client.d.ts +0 -48
- package/dist/daytona/client.js +0 -45
- package/dist/daytona/computer-use.d.ts +0 -171
- package/dist/daytona/computer-use.js +0 -382
- package/dist/daytona/context.d.ts +0 -41
- package/dist/daytona/context.js +0 -50
- package/dist/daytona/daytona.d.ts +0 -213
- package/dist/daytona/daytona.js +0 -578
- package/dist/daytona/errors.d.ts +0 -117
- package/dist/daytona/errors.js +0 -201
- package/dist/daytona/filesystem.d.ts +0 -99
- package/dist/daytona/filesystem.js +0 -300
- package/dist/daytona/git.d.ts +0 -33
- package/dist/daytona/git.js +0 -128
- package/dist/daytona/image.d.ts +0 -49
- package/dist/daytona/image.js +0 -146
- package/dist/daytona/index.d.ts +0 -87
- package/dist/daytona/index.js +0 -102
- package/dist/daytona/process.d.ts +0 -143
- package/dist/daytona/process.js +0 -565
- package/dist/daytona/sandbox.d.ts +0 -222
- package/dist/daytona/sandbox.js +0 -505
- package/dist/desktops/index.d.ts +0 -9
- package/dist/desktops/index.js +0 -10
- package/dist/domains/index.d.ts +0 -9
- package/dist/domains/index.js +0 -10
- package/dist/e2b/client.d.ts +0 -76
- package/dist/e2b/client.js +0 -124
- package/dist/e2b/code-interpreter.d.ts +0 -134
- package/dist/e2b/code-interpreter.js +0 -239
- package/dist/e2b/commands.d.ts +0 -135
- package/dist/e2b/commands.js +0 -452
- package/dist/e2b/errors.d.ts +0 -125
- package/dist/e2b/errors.js +0 -247
- package/dist/e2b/filesystem.d.ts +0 -111
- package/dist/e2b/filesystem.js +0 -374
- package/dist/e2b/index.d.ts +0 -35
- package/dist/e2b/index.js +0 -69
- package/dist/e2b/pty.d.ts +0 -24
- package/dist/e2b/pty.js +0 -83
- package/dist/e2b/sandbox.d.ts +0 -248
- package/dist/e2b/sandbox.js +0 -781
- package/dist/e2b/unsupported.d.ts +0 -38
- package/dist/e2b/unsupported.js +0 -48
- package/dist/e2b/users.d.ts +0 -39
- package/dist/e2b/users.js +0 -207
- package/dist/errors.d.ts +0 -100
- package/dist/errors.js +0 -198
- package/dist/file-source.d.ts +0 -16
- package/dist/file-source.js +0 -162
- package/dist/fly/index.d.ts +0 -102
- package/dist/fly/index.js +0 -930
- package/dist/freestyle/index.d.ts +0 -629
- package/dist/freestyle/index.js +0 -1187
- package/dist/functions/index.d.ts +0 -10
- package/dist/functions/index.js +0 -11
- package/dist/identity.d.ts +0 -30
- package/dist/identity.js +0 -141
- package/dist/image-context.d.ts +0 -39
- package/dist/image-context.js +0 -176
- package/dist/images/index.d.ts +0 -9
- package/dist/images/index.js +0 -10
- package/dist/index.d.ts +0 -87
- package/dist/index.js +0 -51
- package/dist/inngest/index.d.ts +0 -96
- package/dist/inngest/index.js +0 -183
- package/dist/ips/index.d.ts +0 -9
- package/dist/ips/index.js +0 -10
- package/dist/jobs/index.d.ts +0 -9
- package/dist/jobs/index.js +0 -10
- package/dist/jobs-code/cron.d.ts +0 -12
- package/dist/jobs-code/cron.js +0 -93
- package/dist/jobs-code/registry.d.ts +0 -31
- package/dist/jobs-code/registry.js +0 -30
- package/dist/jobs-code/runner.d.ts +0 -1
- package/dist/jobs-code/runner.js +0 -74
- package/dist/jobs-deploy.d.ts +0 -22
- package/dist/jobs-deploy.js +0 -247
- package/dist/jobs-import.d.ts +0 -15
- package/dist/jobs-import.js +0 -231
- package/dist/keys.d.ts +0 -55
- package/dist/keys.js +0 -211
- package/dist/login.d.ts +0 -88
- package/dist/login.js +0 -369
- package/dist/machine.d.ts +0 -222
- package/dist/machine.js +0 -578
- package/dist/mcp.d.ts +0 -16
- package/dist/mcp.js +0 -377
- package/dist/modal/index.d.ts +0 -532
- package/dist/modal/index.js +0 -1284
- package/dist/morph/index.d.ts +0 -255
- package/dist/morph/index.js +0 -641
- package/dist/network-cli.d.ts +0 -17
- package/dist/network-cli.js +0 -523
- package/dist/networks/index.d.ts +0 -11
- package/dist/networks/index.js +0 -10
- package/dist/openai-agents/index.d.ts +0 -132
- package/dist/openai-agents/index.js +0 -738
- package/dist/page.d.ts +0 -13
- package/dist/page.js +0 -39
- package/dist/ports/index.d.ts +0 -9
- package/dist/ports/index.js +0 -10
- package/dist/product-names.d.ts +0 -52
- package/dist/product-names.js +0 -174
- package/dist/product-renames.d.ts +0 -103
- package/dist/product-renames.js +0 -189
- package/dist/products/agents.d.ts +0 -935
- package/dist/products/agents.js +0 -581
- package/dist/products/api-keys.d.ts +0 -113
- package/dist/products/api-keys.js +0 -32
- package/dist/products/apps.d.ts +0 -409
- package/dist/products/apps.js +0 -231
- package/dist/products/audit.d.ts +0 -51
- package/dist/products/audit.js +0 -10
- package/dist/products/balancers.d.ts +0 -87
- package/dist/products/balancers.js +0 -8
- package/dist/products/billing.d.ts +0 -76
- package/dist/products/billing.js +0 -26
- package/dist/products/browser.d.ts +0 -73
- package/dist/products/browser.js +0 -29
- package/dist/products/browsers.d.ts +0 -184
- package/dist/products/browsers.js +0 -180
- package/dist/products/builds.d.ts +0 -175
- package/dist/products/builds.js +0 -234
- package/dist/products/ci.d.ts +0 -406
- package/dist/products/ci.js +0 -133
- package/dist/products/containers.d.ts +0 -71
- package/dist/products/containers.js +0 -6
- package/dist/products/desktop.d.ts +0 -141
- package/dist/products/desktop.js +0 -83
- package/dist/products/desktops.d.ts +0 -71
- package/dist/products/desktops.js +0 -27
- package/dist/products/functions.d.ts +0 -2
- package/dist/products/functions.js +0 -5
- package/dist/products/images.d.ts +0 -229
- package/dist/products/images.js +0 -235
- package/dist/products/index.d.ts +0 -84
- package/dist/products/index.js +0 -105
- package/dist/products/interpreter.d.ts +0 -97
- package/dist/products/interpreter.js +0 -106
- package/dist/products/jobs.d.ts +0 -408
- package/dist/products/jobs.js +0 -256
- package/dist/products/limits.d.ts +0 -61
- package/dist/products/limits.js +0 -10
- package/dist/products/logs.d.ts +0 -245
- package/dist/products/logs.js +0 -274
- package/dist/products/mcp.d.ts +0 -88
- package/dist/products/mcp.js +0 -58
- package/dist/products/mounts.d.ts +0 -49
- package/dist/products/mounts.js +0 -21
- package/dist/products/network-products.d.ts +0 -268
- package/dist/products/network-products.js +0 -127
- package/dist/products/network.d.ts +0 -62
- package/dist/products/network.js +0 -19
- package/dist/products/observability.d.ts +0 -264
- package/dist/products/observability.js +0 -123
- package/dist/products/plans.d.ts +0 -133
- package/dist/products/plans.js +0 -24
- package/dist/products/previews.d.ts +0 -70
- package/dist/products/previews.js +0 -39
- package/dist/products/private-network.d.ts +0 -22
- package/dist/products/private-network.js +0 -10
- package/dist/products/queues.d.ts +0 -149
- package/dist/products/queues.js +0 -213
- package/dist/products/referrals.d.ts +0 -50
- package/dist/products/referrals.js +0 -8
- package/dist/products/reservations.d.ts +0 -108
- package/dist/products/reservations.js +0 -41
- package/dist/products/resources.d.ts +0 -55
- package/dist/products/resources.js +0 -122
- package/dist/products/secrets.d.ts +0 -316
- package/dist/products/secrets.js +0 -333
- package/dist/products/signed-requests.d.ts +0 -21
- package/dist/products/signed-requests.js +0 -11
- package/dist/products/sso.d.ts +0 -44
- package/dist/products/sso.js +0 -8
- package/dist/products/streams.d.ts +0 -73
- package/dist/products/streams.js +0 -17
- package/dist/products/switching.d.ts +0 -123
- package/dist/products/switching.js +0 -26
- package/dist/products/tailscale.d.ts +0 -57
- package/dist/products/tailscale.js +0 -17
- package/dist/products/uptime.d.ts +0 -97
- package/dist/products/uptime.js +0 -42
- package/dist/products/volumes.d.ts +0 -190
- package/dist/products/volumes.js +0 -114
- package/dist/products/watch.d.ts +0 -112
- package/dist/products/watch.js +0 -249
- package/dist/proxy.d.ts +0 -30
- package/dist/proxy.js +0 -200
- package/dist/record-cli.d.ts +0 -23
- package/dist/record-cli.js +0 -308
- package/dist/renamed-products.d.ts +0 -38
- package/dist/renamed-products.js +0 -34
- package/dist/resumable.d.ts +0 -32
- package/dist/resumable.js +0 -201
- package/dist/runloop/index.d.ts +0 -333
- package/dist/runloop/index.js +0 -560
- package/dist/runloop/pagination.d.ts +0 -46
- package/dist/runloop/pagination.js +0 -82
- package/dist/runloop/sdk.d.ts +0 -131
- package/dist/runloop/sdk.js +0 -167
- package/dist/runloop/snapshots.d.ts +0 -52
- package/dist/runloop/snapshots.js +0 -244
- package/dist/sandbox.d.ts +0 -371
- package/dist/sandbox.js +0 -1500
- package/dist/sandboxes/index.d.ts +0 -11
- package/dist/sandboxes/index.js +0 -12
- package/dist/sealing.d.ts +0 -6
- package/dist/sealing.js +0 -14
- package/dist/snapshots/index.d.ts +0 -9
- package/dist/snapshots/index.js +0 -11
- package/dist/snapshots.d.ts +0 -82
- package/dist/snapshots.js +0 -65
- package/dist/sprites/index.d.ts +0 -563
- package/dist/sprites/index.js +0 -1370
- package/dist/ssh.d.ts +0 -56
- package/dist/ssh.js +0 -416
- package/dist/switched-off.d.ts +0 -5
- package/dist/switched-off.js +0 -8
- package/dist/tar.d.ts +0 -15
- package/dist/tar.js +0 -526
- package/dist/terminal.d.ts +0 -24
- package/dist/terminal.js +0 -32
- package/dist/tools/index.d.ts +0 -62
- package/dist/tools/index.js +0 -181
- package/dist/transport.d.ts +0 -165
- package/dist/transport.js +0 -883
- package/dist/trigger/index.d.ts +0 -202
- package/dist/trigger/index.js +0 -244
- package/dist/tunnel.d.ts +0 -70
- package/dist/tunnel.js +0 -316
- package/dist/types.d.ts +0 -585
- package/dist/types.js +0 -1
- package/dist/vercel/client.d.ts +0 -40
- package/dist/vercel/client.js +0 -39
- package/dist/vercel/command.d.ts +0 -117
- package/dist/vercel/command.js +0 -391
- package/dist/vercel/errors.d.ts +0 -53
- package/dist/vercel/errors.js +0 -131
- package/dist/vercel/filesystem.d.ts +0 -153
- package/dist/vercel/filesystem.js +0 -297
- package/dist/vercel/index.d.ts +0 -24
- package/dist/vercel/index.js +0 -36
- package/dist/vercel/sandbox-user.d.ts +0 -70
- package/dist/vercel/sandbox-user.js +0 -207
- package/dist/vercel/sandbox.d.ts +0 -372
- package/dist/vercel/sandbox.js +0 -1037
- package/dist/vercel/snapshot.d.ts +0 -94
- package/dist/vercel/snapshot.js +0 -137
- package/dist/volumes/index.d.ts +0 -9
- package/dist/volumes/index.js +0 -10
- package/dist/wait.d.ts +0 -12
- package/dist/wait.js +0 -47
- package/dist/wallet.d.ts +0 -45
- package/dist/wallet.js +0 -56
- package/dist/wireguard.d.ts +0 -7
- package/dist/wireguard.js +0 -13
package/dist/types.d.ts
DELETED
|
@@ -1,585 +0,0 @@
|
|
|
1
|
-
/** A sandbox as the API answers it. Times are ISO 8601 strings, money is
|
|
2
|
-
* integer microdollars (1,000,000 = $1). */
|
|
3
|
-
export type SandboxInfo = {
|
|
4
|
-
id: string;
|
|
5
|
-
kind: "sandbox";
|
|
6
|
-
name: string | null;
|
|
7
|
-
labels: Record<string, string>;
|
|
8
|
-
/** @deprecated Read `state`. An older, coarser name for it, still sent for
|
|
9
|
-
* older clients. */
|
|
10
|
-
status: "pending" | "active" | "paused" | "stopping" | "stopped";
|
|
11
|
-
state: "starting" | "running" | "pausing" | "paused" | "resuming" | "stopping" | "stopped";
|
|
12
|
-
region: string;
|
|
13
|
-
funding: "trial" | "paid";
|
|
14
|
-
vcpu: number;
|
|
15
|
-
memoryMiB: number;
|
|
16
|
-
diskMiB: number;
|
|
17
|
-
cpu: "shared" | "reserved";
|
|
18
|
-
cpuFloorMillis: number;
|
|
19
|
-
/** @deprecated Always true for a sandbox created since 5 October 2026:
|
|
20
|
-
* every sandbox can pause. */
|
|
21
|
-
pausable: boolean;
|
|
22
|
-
/** Its time limit in seconds; 0 is none: it runs while it works. */
|
|
23
|
-
timeoutSeconds: number;
|
|
24
|
-
/** Pauses after this many idle seconds; 0 is never. */
|
|
25
|
-
idlePauseSeconds?: number;
|
|
26
|
-
/** True only for a sandbox created before 27 September 2026 with the old
|
|
27
|
-
* default idle pause, which paused it only while nothing had used it. */
|
|
28
|
-
idlePauseUnusedOnly?: boolean;
|
|
29
|
-
/** A request (exec, files, terminal, a visit to a shared port) wakes it when paused. */
|
|
30
|
-
autoWake?: boolean;
|
|
31
|
-
/** Who its commands, processes and terminals run as when one names no
|
|
32
|
-
* user: "sandbox" (uid 1000) or "root". Absent from APIs before 25 October 2026. */
|
|
33
|
-
user?: "sandbox" | "root";
|
|
34
|
-
/** With no time limit, how far ahead each renewal funds it, in seconds;
|
|
35
|
-
* it runs for at least half of this even if Runtime cannot renew it.
|
|
36
|
-
* Absent from APIs before 25 October 2026. */
|
|
37
|
-
leaseSeconds?: number;
|
|
38
|
-
/** Runs until stopped while credit lasts, never paused for idleness or a
|
|
39
|
-
* time limit, and its disk is kept after a stop. */
|
|
40
|
-
persistent?: boolean;
|
|
41
|
-
/** Runtime may delete it once it has been paused or stopped for 15 minutes
|
|
42
|
-
* and its server needs the disk. Absent from APIs before 30 October 2026. */
|
|
43
|
-
evictable?: boolean;
|
|
44
|
-
/** The last exec, file, terminal, desktop or preview request, to within a minute. */
|
|
45
|
-
lastActiveAt?: string | null;
|
|
46
|
-
/** What happens when its time limit, credit or a spending limit ends it. */
|
|
47
|
-
onLeaseEnd: "pause" | "stop" | "delete";
|
|
48
|
-
/** onLeaseEnd's newer name (0381): the same value. */
|
|
49
|
-
onTimeout?: "pause" | "stop" | "delete";
|
|
50
|
-
createdAt: string;
|
|
51
|
-
readyAt: string | null;
|
|
52
|
-
/** Paid up to: a time ahead of now that moves on by itself while it runs.
|
|
53
|
-
* Not when it ends; that is `endsAt`. */
|
|
54
|
-
expiresAt: string;
|
|
55
|
-
/** When it stops or pauses by itself: its time limit, or where its funding
|
|
56
|
-
* ends once credit or a spending limit stops its renewal. Null when it
|
|
57
|
-
* never will, and when it is not running. Absent from older servers. */
|
|
58
|
-
endsAt?: string | null;
|
|
59
|
-
endedAt: string | null;
|
|
60
|
-
/** Why it stopped or paused, such as `requested`, `idle` or `time_limit`
|
|
61
|
-
* (its `timeoutSeconds` ran out). A server before 4 October 2026 sent
|
|
62
|
-
* `lease_expired` for `time_limit`. */
|
|
63
|
-
stopReason: string | null;
|
|
64
|
-
/** Present only while it is running and does not respond: since when, and
|
|
65
|
-
* why. `agent_not_answering` and `host_quarantined` clear on a restart;
|
|
66
|
-
* `disk_stalled` clears when its server finishes the write. The events
|
|
67
|
-
* `sandbox.unreachable` and `sandbox.reachable` mark its start and end.
|
|
68
|
-
* Absent from older servers. */
|
|
69
|
-
unreachable?: {
|
|
70
|
-
since: string;
|
|
71
|
-
reason: "agent_not_answering" | "disk_stalled" | "host_quarantined";
|
|
72
|
-
};
|
|
73
|
-
pausedAt: string | null;
|
|
74
|
-
pausedExpiresAt: string | null;
|
|
75
|
-
chargedMicros: number;
|
|
76
|
-
/** @deprecated Read `chargedMicros` and `runtime.usage()`. Still sent for
|
|
77
|
-
* older clients. */
|
|
78
|
-
heldMicros: number;
|
|
79
|
-
simulated?: boolean;
|
|
80
|
-
replayed?: boolean;
|
|
81
|
-
/** The names of its own environment variables (`env`), on a create, an
|
|
82
|
-
* update and a read of one sandbox. Values are never shown. */
|
|
83
|
-
envNames?: string[];
|
|
84
|
-
/** The egress secrets this sandbox may use, by name: only those of your
|
|
85
|
-
* egress secrets that would otherwise reach it. Null is every secret that
|
|
86
|
-
* reaches it. Fixed for the sandbox's life; a fork or a copy of a snapshot
|
|
87
|
-
* may only narrow its source's list. On a create, an update, a fork and a
|
|
88
|
-
* read of one sandbox; absent from list pages and older servers. */
|
|
89
|
-
secrets?: string[] | null;
|
|
90
|
-
/** On an update with labels by a key that may read secrets, when one of
|
|
91
|
-
* the account's egress secrets is scoped: true once every server running its sandboxes holds the change,
|
|
92
|
-
* so the next request uses the new scope; false while one has not
|
|
93
|
-
* confirmed (it takes it within 15 seconds). */
|
|
94
|
-
secretsEnforced?: boolean;
|
|
95
|
-
/** On a create from an image with a start command: whether it started
|
|
96
|
-
* (and was still running half a second later), became ready (readyMs),
|
|
97
|
-
* timed out, or exited first (exitCode, and stderr's last lines). The create's answer
|
|
98
|
-
* alone carries it, and the Sandbox that create returned keeps it through
|
|
99
|
-
* later reads; `sandboxes.get` and `list` have none, because the API keeps
|
|
100
|
-
* no record of it. */
|
|
101
|
-
start?: {
|
|
102
|
-
state: "started" | "ready" | "timeout" | "exited" | "not_running";
|
|
103
|
-
processId?: string;
|
|
104
|
-
exitCode?: number | null;
|
|
105
|
-
readyMs?: number;
|
|
106
|
-
/** With exited: the last lines the start command wrote to stderr. */
|
|
107
|
-
stderr?: string;
|
|
108
|
-
};
|
|
109
|
-
/** Present and true when getOrCreate answered a sandbox that already held the name. */
|
|
110
|
-
reused?: boolean;
|
|
111
|
-
/** An opaque tag for the server it is on, like `pl_3f9a0c1b2d4e5f60`. Your
|
|
112
|
-
* sandboxes and snapshots with the same tag are on the same server. It is
|
|
113
|
-
* never the server's name, and other accounts see unrelated tags. Null
|
|
114
|
-
* before it is placed. Absent from older servers. */
|
|
115
|
-
placement?: string | null;
|
|
116
|
-
[key: string]: unknown;
|
|
117
|
-
};
|
|
118
|
-
export type CreateSandbox = {
|
|
119
|
-
name?: string;
|
|
120
|
-
/** What the end of an `await using` block does to it. By default the
|
|
121
|
-
* block deletes it; `keep: true` stops it instead, which keeps its disk
|
|
122
|
-
* (billed while it is kept). Not sent to the API. */
|
|
123
|
-
keep?: boolean;
|
|
124
|
-
labels?: Record<string, string>;
|
|
125
|
-
/** Environment variables for every command, process, terminal, SSH session
|
|
126
|
-
* and the image's start command in this sandbox, under each command's own
|
|
127
|
-
* `env`. At most 32 variables and 32 KiB. Values are never shown again;
|
|
128
|
-
* answers list only `envNames`. Copies made by fork() keep them. */
|
|
129
|
-
env?: Record<string, string>;
|
|
130
|
-
/** The egress secrets this sandbox may use, by name: only those of your
|
|
131
|
-
* egress secrets that would otherwise reach it. [] is none; leave it out
|
|
132
|
-
* for every secret that reaches it. Fixed for the sandbox's life; a fork or
|
|
133
|
-
* a copy of a snapshot may only narrow its source's list. At most 64. */
|
|
134
|
-
secrets?: string[];
|
|
135
|
-
/** Omit to use the free usage while it lasts, then prepaid credit. */
|
|
136
|
-
funding?: "trial" | "paid";
|
|
137
|
-
region?: string;
|
|
138
|
-
vcpu?: number;
|
|
139
|
-
memoryMiB?: number;
|
|
140
|
-
diskMiB?: number;
|
|
141
|
-
cpu?: "shared" | "reserved";
|
|
142
|
-
cpuFloorMillis?: number;
|
|
143
|
-
/** A time limit, 60 to 86400 seconds (24 hours). Leave it out (or 0) for
|
|
144
|
-
* none: the sandbox runs while it works and pauses when idle, until you
|
|
145
|
-
* stop it or credit runs out. */
|
|
146
|
-
timeoutSeconds?: number;
|
|
147
|
-
/** @deprecated Ignored since 5 October 2026: every sandbox can pause. */
|
|
148
|
-
pausable?: boolean;
|
|
149
|
-
/** What happens when its time limit, credit or a spending limit ends it:
|
|
150
|
-
* "pause" (default), "stop", or "delete" (when the time limit runs out,
|
|
151
|
-
* delete it and its files; credit or a spending limit only stops it). */
|
|
152
|
-
onLeaseEnd?: "pause" | "stop" | "delete";
|
|
153
|
-
/** Pause after this many seconds in which nothing happens in it: no
|
|
154
|
-
* request, no command or terminal running, no open connection, no network
|
|
155
|
-
* traffic and no CPU use. Default 300 unless persistent; 0 never;
|
|
156
|
-
* otherwise 60 to 86400 (a shorter time is raised to 60). A request wakes
|
|
157
|
-
* it again. */
|
|
158
|
-
idlePauseSeconds?: number;
|
|
159
|
-
/** A request to a paused sandbox wakes it. Default true. */
|
|
160
|
-
autoWake?: boolean;
|
|
161
|
-
/** "root": its commands, processes and terminals run as root, through the
|
|
162
|
-
* sandbox's passwordless sudo, unless one says `user: "sandbox"`. Default
|
|
163
|
-
* "sandbox"; a sandbox made from a snapshot runs as its source did. Files
|
|
164
|
-
* written through `files` stay the sandbox user's. */
|
|
165
|
-
user?: "sandbox" | "root";
|
|
166
|
-
/** With no time limit, how far ahead each renewal funds it: 300 to 43200
|
|
167
|
-
* seconds (12 hours). It is renewed when half is left, so it keeps running
|
|
168
|
-
* for at least half of this through an outage of Runtime's control plane.
|
|
169
|
-
* Each renewal holds that much time's credit; what it does not use is
|
|
170
|
-
* released. Default: its first lease, usually 1800. */
|
|
171
|
-
leaseSeconds?: number;
|
|
172
|
-
/** Keep it running until you stop it, while credit lasts, with no idle
|
|
173
|
-
* pause unless idlePauseSeconds asks for one. Its disk is billed as any
|
|
174
|
-
* sandbox's, and kept after a stop, for restart(), as any sandbox's is.
|
|
175
|
-
* Paid only. */
|
|
176
|
-
persistent?: boolean;
|
|
177
|
-
/** The most it may cost over its whole life, in microdollars. */
|
|
178
|
-
maxTotalCostMicros?: number;
|
|
179
|
-
/** With name: return the sandbox that already has the name, woken if paused. */
|
|
180
|
-
getOrCreate?: boolean;
|
|
181
|
-
/** @deprecated Use `maxTotalCostMicros`. Still accepted for older clients. */
|
|
182
|
-
maxCostMicros?: number;
|
|
183
|
-
/** Network rules from the first start; the same shape as sandbox.network.set.
|
|
184
|
-
* Omit for the public web on ports 80 and 443. */
|
|
185
|
-
network?: {
|
|
186
|
-
internet: boolean;
|
|
187
|
-
allow?: string[];
|
|
188
|
-
deny?: string[];
|
|
189
|
-
connect?: string[];
|
|
190
|
-
};
|
|
191
|
-
/** A ready image (runtime.images.build): its id, name (its latest tag),
|
|
192
|
-
* name:tag or name@version. When the image has a start command, create
|
|
193
|
-
* answers once its ready check passes and says how in `start`. */
|
|
194
|
-
image?: string;
|
|
195
|
-
/** A ready snapshot's id: the sandbox starts as a copy of it, with its shape. Not with image. */
|
|
196
|
-
snapshot?: string;
|
|
197
|
-
/** One to 16 ids of your own sandboxes or snapshots. The new sandbox starts
|
|
198
|
-
* on a server none of them is on, and stays apart if its start is moved.
|
|
199
|
-
* With no other server that has room, the create answers 503 `no_capacity`
|
|
200
|
-
* and nothing is made or charged. A copy of a snapshot starts only where that
|
|
201
|
-
* snapshot is kept, so a `snapshot` with `spreadFrom` naming its server also
|
|
202
|
-
* answers `no_capacity`. */
|
|
203
|
-
spreadFrom?: string[];
|
|
204
|
-
/** When true, Runtime may delete the sandbox once it has been paused or
|
|
205
|
-
* stopped for at least 15 minutes and its server needs the disk, the one
|
|
206
|
-
* idle longest first; a running one is never deleted for it. For work you
|
|
207
|
-
* can recreate, such as build caches and CI machines. Default false. */
|
|
208
|
-
evictable?: boolean;
|
|
209
|
-
/** Up to four volumes: read-write ("rw", one sandbox at a time) or a
|
|
210
|
-
* read-only "snapshot" copy. */
|
|
211
|
-
volumes?: {
|
|
212
|
-
volumeId: string;
|
|
213
|
-
path: string;
|
|
214
|
-
mode?: "rw" | "snapshot";
|
|
215
|
-
}[];
|
|
216
|
-
/** Paid only: join your Tailscale network once running. `authKeySecret`
|
|
217
|
-
* names a job secret holding the auth key. */
|
|
218
|
-
tailscale?: {
|
|
219
|
-
authKeySecret: string;
|
|
220
|
-
hostname?: string;
|
|
221
|
-
tags?: string[];
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
/** Present on a command the sandbox's out-of-memory killer ended (the
|
|
225
|
-
* program, or anything it started): a bare exit -9, or 137 from a shell,
|
|
226
|
-
* does not say why. */
|
|
227
|
-
export type OutOfMemory = {
|
|
228
|
-
code: "out_of_memory";
|
|
229
|
-
processesKilled: number;
|
|
230
|
-
/** The sandbox's memory size; null if it could not be read. */
|
|
231
|
-
memoryMiB: number | null;
|
|
232
|
-
message: string;
|
|
233
|
-
/** What to do: a larger memoryMiB, or a program that uses less. */
|
|
234
|
-
hint: string;
|
|
235
|
-
};
|
|
236
|
-
/** What a command run with `traceFiles` opened and wrote, until it exited. */
|
|
237
|
-
export type TracedFiles = {
|
|
238
|
-
/** Every file and directory it, or anything it started, opened: sorted
|
|
239
|
-
* absolute paths, links resolved; a directory (a listing) ends in "/". */
|
|
240
|
-
read: string[];
|
|
241
|
-
/** Every file it wrote. */
|
|
242
|
-
written: string[];
|
|
243
|
-
/** Some paths are missing: the lists are not the whole story. */
|
|
244
|
-
truncated: boolean;
|
|
245
|
-
};
|
|
246
|
-
export type CommandResult = {
|
|
247
|
-
exitCode: number | null;
|
|
248
|
-
stdout: string;
|
|
249
|
-
stderr: string;
|
|
250
|
-
timedOut: boolean;
|
|
251
|
-
stdoutTruncated?: boolean;
|
|
252
|
-
stderrTruncated?: boolean;
|
|
253
|
-
durationMs?: number | null;
|
|
254
|
-
processId?: string;
|
|
255
|
-
replayed?: boolean;
|
|
256
|
-
outOfMemory?: OutOfMemory;
|
|
257
|
-
/** With `traceFiles` only. */
|
|
258
|
-
files?: TracedFiles;
|
|
259
|
-
};
|
|
260
|
-
export type ExecOptions = {
|
|
261
|
-
cwd?: string;
|
|
262
|
-
/** Who runs it: "sandbox" (uid 1000, HOME=/workspace) or "root", through
|
|
263
|
-
* the sandbox's passwordless sudo with the same environment and PATH and
|
|
264
|
-
* HOME=/root: no need to prefix it with sudo. Default: the sandbox's own
|
|
265
|
-
* `user`, the sandbox user unless it was made with "root". */
|
|
266
|
-
user?: "sandbox" | "root";
|
|
267
|
-
/** Merged over the sandbox's environment. Put secrets here, never in the command. */
|
|
268
|
-
env?: Record<string, string>;
|
|
269
|
-
/** Given to standard input, then closed. */
|
|
270
|
-
stdin?: string | Uint8Array;
|
|
271
|
-
/** Default 60 000, or 24 hours when the output streams (onStdout, onStderr or
|
|
272
|
-
* execStream); up to 24 hours. A timeout is a result (timedOut), not an error. */
|
|
273
|
-
timeoutMs?: number;
|
|
274
|
-
onStdout?: (text: string) => unknown;
|
|
275
|
-
onStderr?: (text: string) => unknown;
|
|
276
|
-
/** Throw CommandError when the exit code is not 0. */
|
|
277
|
-
check?: boolean;
|
|
278
|
-
/** Answer `files`: what the command read and wrote, for keying a cache by
|
|
279
|
-
* what a test really read. */
|
|
280
|
-
traceFiles?: boolean;
|
|
281
|
-
signal?: AbortSignal;
|
|
282
|
-
idempotencyKey?: string;
|
|
283
|
-
};
|
|
284
|
-
export type ProcessInfo = {
|
|
285
|
-
id: string;
|
|
286
|
-
kind: "process";
|
|
287
|
-
state: "running" | "exited" | "killed" | "timed_out" | "unknown";
|
|
288
|
-
exitCode: number | null;
|
|
289
|
-
command: string;
|
|
290
|
-
/** Who it runs as; absent from APIs before 17 October 2026. */
|
|
291
|
-
user?: "sandbox" | "root";
|
|
292
|
-
cwd: string;
|
|
293
|
-
pty: boolean;
|
|
294
|
-
stdinOpen: boolean;
|
|
295
|
-
stdinOffset: number;
|
|
296
|
-
outputEncoding?: "utf8" | "base64";
|
|
297
|
-
startedAt: string;
|
|
298
|
-
endedAt: string | null;
|
|
299
|
-
timeoutMs: number | null;
|
|
300
|
-
outputBytes: number;
|
|
301
|
-
firstOffset: number;
|
|
302
|
-
outOfMemory?: OutOfMemory;
|
|
303
|
-
};
|
|
304
|
-
export type OutputEvent = {
|
|
305
|
-
type: "start";
|
|
306
|
-
processId: string;
|
|
307
|
-
replayed?: boolean;
|
|
308
|
-
} | {
|
|
309
|
-
type: "stdout" | "stderr";
|
|
310
|
-
data: string;
|
|
311
|
-
offset: number;
|
|
312
|
-
base64?: string;
|
|
313
|
-
} | {
|
|
314
|
-
type: "exit";
|
|
315
|
-
exitCode: number | null;
|
|
316
|
-
state: string;
|
|
317
|
-
timedOut: boolean;
|
|
318
|
-
durationMs?: number;
|
|
319
|
-
outOfMemory?: OutOfMemory;
|
|
320
|
-
/** An exec with `traceFiles`. */
|
|
321
|
-
files?: TracedFiles;
|
|
322
|
-
} | {
|
|
323
|
-
type: "truncated";
|
|
324
|
-
droppedBytes: number;
|
|
325
|
-
resumeAt: number;
|
|
326
|
-
} | {
|
|
327
|
-
type: "continue";
|
|
328
|
-
processId: string;
|
|
329
|
-
cursor: number;
|
|
330
|
-
} | {
|
|
331
|
-
type: "error";
|
|
332
|
-
error: {
|
|
333
|
-
code: string;
|
|
334
|
-
message: string;
|
|
335
|
-
status?: number;
|
|
336
|
-
requestId?: string;
|
|
337
|
-
};
|
|
338
|
-
};
|
|
339
|
-
export type BinaryOutputEvent = Exclude<OutputEvent, {
|
|
340
|
-
type: "stdout" | "stderr";
|
|
341
|
-
}> | {
|
|
342
|
-
type: "stdout" | "stderr";
|
|
343
|
-
data: Uint8Array;
|
|
344
|
-
offset: number;
|
|
345
|
-
};
|
|
346
|
-
export type FileEntry = {
|
|
347
|
-
name: string;
|
|
348
|
-
path: string;
|
|
349
|
-
type: "file" | "directory" | "symlink" | "other";
|
|
350
|
-
size: number;
|
|
351
|
-
mode: string;
|
|
352
|
-
modifiedAt: string;
|
|
353
|
-
uid?: number;
|
|
354
|
-
gid?: number;
|
|
355
|
-
owner?: string;
|
|
356
|
-
group?: string;
|
|
357
|
-
symlinkTarget?: string;
|
|
358
|
-
};
|
|
359
|
-
/** A signed link to one file of a sandbox (POST .../files:link): `url` opens
|
|
360
|
-
* with no API key, GET to download (Range works) or PUT to upload, until
|
|
361
|
-
* `expiresAt`. */
|
|
362
|
-
export type FileLink = {
|
|
363
|
-
url: string;
|
|
364
|
-
method: "GET" | "PUT";
|
|
365
|
-
path: string;
|
|
366
|
-
sandboxId: string;
|
|
367
|
-
expiresAt: string;
|
|
368
|
-
filename?: string;
|
|
369
|
-
maxBytes?: number;
|
|
370
|
-
archive?: boolean;
|
|
371
|
-
};
|
|
372
|
-
/** GET /v1/usage. Money is integer microdollars in strings (1,000,000 = $1),
|
|
373
|
-
* exact past 2^53: available = credited - spent - expired - held. */
|
|
374
|
-
export type Usage = {
|
|
375
|
-
orgId: string;
|
|
376
|
-
unit: "microdollars";
|
|
377
|
-
credited: string;
|
|
378
|
-
spent: string;
|
|
379
|
-
/** What running sandboxes and the hour ahead of stored items are about to
|
|
380
|
-
* use, already taken out of `available`. */
|
|
381
|
-
held: string;
|
|
382
|
-
/** Credit that expired, or grant credit taken back. */
|
|
383
|
-
expired: string;
|
|
384
|
-
/** What can still be spent. */
|
|
385
|
-
available: string;
|
|
386
|
-
/** The part of spent that refunds and disputes took. */
|
|
387
|
-
takenBack: string;
|
|
388
|
-
/** Machine time the account can still run without credit, in
|
|
389
|
-
* milliseconds, or null when it has none. `totalMs` and `usedMs` count free
|
|
390
|
-
* hours given before 5 October 2026 (0 for an account given none);
|
|
391
|
-
* `availableMs` is the larger of those hours left and this month's included
|
|
392
|
-
* usage, as time at 2 vCPU and 4 GiB, after what running sandboxes hold: a
|
|
393
|
-
* create without credit is refused exactly when it is 0. The field keeps
|
|
394
|
-
* its older name. */
|
|
395
|
-
trial: {
|
|
396
|
-
totalMs: number;
|
|
397
|
-
usedMs: number;
|
|
398
|
-
/** @deprecated Read `availableMs`. Still sent for older clients. */
|
|
399
|
-
reservedMs: number;
|
|
400
|
-
availableMs: number;
|
|
401
|
-
/** `monthly`: the free usage every month only. `hours`: free hours
|
|
402
|
-
* given before 5 October 2026, kept, beside the free usage. Absent
|
|
403
|
-
* from an API older than 5 October 2026. */
|
|
404
|
-
offer?: "monthly" | "hours";
|
|
405
|
-
/** When the free usage renews: the 1st of next month, 00:00 UTC. */
|
|
406
|
-
renewsAt?: string;
|
|
407
|
-
} | null;
|
|
408
|
-
/** Why the account has no free machine time, or null: `reason` is
|
|
409
|
-
* `withheld`, `hosting` (opened from a data-center or VPN network),
|
|
410
|
-
* `region` (opened outside the listed countries), `card` (opened by email,
|
|
411
|
-
* no card saved yet), `no-source` or `unknown`, and `message` says it and
|
|
412
|
-
* what starts it. Absent from an API older than 30 October 2026. */
|
|
413
|
-
freeUsageHold?: {
|
|
414
|
-
reason: string;
|
|
415
|
-
message: string;
|
|
416
|
-
} | null;
|
|
417
|
-
/** What the account uses free this calendar month (UTC), one row per
|
|
418
|
-
* product, drawn before credit and never charged
|
|
419
|
-
* (https://withruntime.com/docs/included-usage). */
|
|
420
|
-
allowances?: Array<{
|
|
421
|
-
/** machine-memory, machine-cpu, saved-copies or disks. */
|
|
422
|
-
pool: string;
|
|
423
|
-
/** GiB-hour, vCPU-hour or GB-month. */
|
|
424
|
-
unit: string;
|
|
425
|
-
quantity: number;
|
|
426
|
-
used: number;
|
|
427
|
-
/** Held for what is running now; given back unless used. */
|
|
428
|
-
reserved: number;
|
|
429
|
-
left: number;
|
|
430
|
-
/** The month's first day, YYYY-MM-DD. */
|
|
431
|
-
month: string;
|
|
432
|
-
renewsAt: string;
|
|
433
|
-
/** When the free machine time ends for an account that has never paid
|
|
434
|
-
* (30 days after it opened); null once it has paid, when it renews
|
|
435
|
-
* every month. Absent from an API older than 14 October 2026. */
|
|
436
|
-
freeUntil?: string | null;
|
|
437
|
-
}>;
|
|
438
|
-
/** What Runtime for Startups includes (https://withruntime.com/startups).
|
|
439
|
-
* Startup hours are given once, used after this month's free usage
|
|
440
|
-
* and before credit, never renewed, and gone after 12 months. Storage is
|
|
441
|
-
* GB kept free each month for those 12 months. Empty unless the account
|
|
442
|
-
* was accepted to the program or given it; absent from an older API. */
|
|
443
|
-
startupIncluded?: Array<{
|
|
444
|
-
/** machine-cpu, machine-memory, saved-copies (snapshots, images and
|
|
445
|
-
* backups) or disks (volumes). */
|
|
446
|
-
pool: string;
|
|
447
|
-
/** vCPU-hour or GiB-hour for startup hours given `once`, GB for `month` storage. */
|
|
448
|
-
unit: string;
|
|
449
|
-
/** `once`: given once and used up by what runs. `month`: `quantity` GB
|
|
450
|
-
* added to each month's included storage until `expiresAt`, never used
|
|
451
|
-
* up; storage past it bills at the published rate. Absent from an API
|
|
452
|
-
* before startup storage (7 October 2026): `once`. */
|
|
453
|
-
period?: "once" | "month";
|
|
454
|
-
quantity: number;
|
|
455
|
-
/** Null for monthly storage. */
|
|
456
|
-
used: number | null;
|
|
457
|
-
/** Held for what is running now; given back unless used. Null for
|
|
458
|
-
* monthly storage. */
|
|
459
|
-
reserved: number | null;
|
|
460
|
-
/** Null for monthly storage. */
|
|
461
|
-
left: number | null;
|
|
462
|
-
/** Storage GB kept now; null for startup hours given `once`. */
|
|
463
|
-
keptGB?: number | null;
|
|
464
|
-
/** `startup`. */
|
|
465
|
-
source: string;
|
|
466
|
-
grantedAt: string;
|
|
467
|
-
/** 12 months after `grantedAt`: what is left then is gone. */
|
|
468
|
-
expiresAt?: string;
|
|
469
|
-
}>;
|
|
470
|
-
/** What Runtime for Startups includes at once for its 12 months:
|
|
471
|
-
* image builds, and sandboxes (past it, a create answers quota_exceeded).
|
|
472
|
-
* Null without one or after them, when the account's own limits apply;
|
|
473
|
-
* absent from an API older than 7 October 2026. */
|
|
474
|
-
startupLimits?: {
|
|
475
|
-
buildsAtOnce: number;
|
|
476
|
-
sandboxesAtOnce: number;
|
|
477
|
-
} | null;
|
|
478
|
-
/** @deprecated Renamed `startupIncluded`; works for 30 days after the rename, with a warning. */
|
|
479
|
-
readonly pot?: Usage["startupIncluded"];
|
|
480
|
-
/** @deprecated Renamed `startupLimits`; works for 30 days after the rename, with a warning. */
|
|
481
|
-
readonly potLimits?: Usage["startupLimits"];
|
|
482
|
-
/** Outbound traffic this calendar month, UTC: the first `allowanceBytes` an
|
|
483
|
-
* account sends are free, and the rest is charged at the rate in the pricing
|
|
484
|
-
* guide (https://withruntime.com/docs/pricing#network-products). */
|
|
485
|
-
outbound?: {
|
|
486
|
-
month: string;
|
|
487
|
-
sentBytes: number;
|
|
488
|
-
freeBytes: number;
|
|
489
|
-
billableBytes: number;
|
|
490
|
-
allowanceBytes: number;
|
|
491
|
-
chargedMicros: string;
|
|
492
|
-
/** What the balance or a spending limit could not cover; never charged. */
|
|
493
|
-
writtenOffMicros: string;
|
|
494
|
-
} | null;
|
|
495
|
-
/** The account's pilot while it serves its sandboxes, a free run agreed
|
|
496
|
-
* with Runtime: `hours` sandbox-hours of running time, `usedMs` and
|
|
497
|
-
* `leftMs` of it used and left, and `running`, its sandboxes running now:
|
|
498
|
-
* `leftMs / running` is how long the hours last at this rate. Null on every
|
|
499
|
-
* other account. */
|
|
500
|
-
pilot?: {
|
|
501
|
-
id: string;
|
|
502
|
-
sandboxes: number;
|
|
503
|
-
vcpu: number;
|
|
504
|
-
memoryMiB: number;
|
|
505
|
-
diskMiB: number;
|
|
506
|
-
startsAt: string;
|
|
507
|
-
endsAt: string;
|
|
508
|
-
graceEndsAt: string;
|
|
509
|
-
endedAt: string | null;
|
|
510
|
-
hours: number;
|
|
511
|
-
usedMs: number;
|
|
512
|
-
leftMs: number;
|
|
513
|
-
running?: number;
|
|
514
|
-
} | null;
|
|
515
|
-
/** Everything this key acts for, a row a kind, past the hundred newest
|
|
516
|
-
* `resources` lists: how many, and what was charged and is held, in
|
|
517
|
-
* integer microdollars as strings. Absent from an API before 6 October 2026. */
|
|
518
|
-
kinds?: Array<{
|
|
519
|
-
kind: string;
|
|
520
|
-
resources: number;
|
|
521
|
-
chargedMicros: string;
|
|
522
|
-
heldMicros: string;
|
|
523
|
-
}>;
|
|
524
|
-
resources: Array<Record<string, unknown>>;
|
|
525
|
-
[key: string]: unknown;
|
|
526
|
-
};
|
|
527
|
-
export type FeedbackKind = "bug" | "missing_feature" | "competitor_gap" | "migration_blocker" | "docs" | "pricing" | "praise" | "other";
|
|
528
|
-
/** What `sandbox.update()` changes; fields left out stay as they are. */
|
|
529
|
-
export type SandboxSettings = {
|
|
530
|
-
name?: string;
|
|
531
|
-
labels?: Record<string, string>;
|
|
532
|
-
/** Changes its environment: a value sets a variable, null removes it, and
|
|
533
|
-
* the rest stay. Commands started afterwards get the change. */
|
|
534
|
-
env?: Record<string, string | null>;
|
|
535
|
-
/** A request to a paused sandbox wakes it. */
|
|
536
|
-
autoWake?: boolean;
|
|
537
|
-
/** Who later commands, processes and terminals run as when one names no
|
|
538
|
-
* user; running ones keep theirs. */
|
|
539
|
-
user?: "sandbox" | "root";
|
|
540
|
-
/** Pause after this many seconds with no activity, counted from now; 0
|
|
541
|
-
* never, otherwise 60 to 86400 (a shorter time is raised to 60). */
|
|
542
|
-
idlePauseSeconds?: number;
|
|
543
|
-
/** With no time limit, how far ahead each renewal funds it: 300 to 43200
|
|
544
|
-
* seconds; null the default again. A running one is renewed by it within
|
|
545
|
-
* seconds. */
|
|
546
|
-
leaseSeconds?: number | null;
|
|
547
|
-
/** True lets Runtime delete it once it has been paused or stopped for 15
|
|
548
|
-
* minutes and its server needs the disk; false keeps it. */
|
|
549
|
-
evictable?: boolean;
|
|
550
|
-
/** Keep it running until you stop it, while credit lasts, and keep its disk
|
|
551
|
-
* after a stop. Paid only. */
|
|
552
|
-
persistent?: boolean;
|
|
553
|
-
/** Lifetime cap in microdollars; null removes it. */
|
|
554
|
-
maxTotalCostMicros?: number | null;
|
|
555
|
-
/** A new time limit counted from now, 60 to 86400 seconds, sooner or later
|
|
556
|
-
* than the one it had; 0 takes the limit away. A paused sandbox counts it
|
|
557
|
-
* from its next wake. Not for a persistent sandbox. */
|
|
558
|
-
timeoutSeconds?: number;
|
|
559
|
-
/** What the end of its time limit does: pause, stop (keep the disk) or
|
|
560
|
-
* delete. */
|
|
561
|
-
onTimeout?: "pause" | "stop" | "delete";
|
|
562
|
-
};
|
|
563
|
-
/** A deleted sandbox, as `delete()` answers it the first time and every time
|
|
564
|
-
* after. It reads nowhere else afterwards. */
|
|
565
|
-
export type DeletedSandbox = {
|
|
566
|
-
id: string;
|
|
567
|
-
kind: "sandbox";
|
|
568
|
-
name: string | null;
|
|
569
|
-
labels: Record<string, string>;
|
|
570
|
-
status: "deleted";
|
|
571
|
-
/** "stopping" until its machine has stopped, usually well under a second. */
|
|
572
|
-
state: string;
|
|
573
|
-
deletedAt: string;
|
|
574
|
-
endedAt: string | null;
|
|
575
|
-
replayed?: boolean;
|
|
576
|
-
};
|
|
577
|
-
/** How `sandbox.keepAlive()` moves on the time limit of a sandbox that has one. */
|
|
578
|
-
export type KeepAliveOptions = {
|
|
579
|
-
/** How often it checks, in seconds. Default 60. */
|
|
580
|
-
everySeconds?: number;
|
|
581
|
-
/** How much of its time limit it keeps ahead of now, in seconds (60 to 3600). Default 600. */
|
|
582
|
-
marginSeconds?: number;
|
|
583
|
-
/** Called with an error an extension met; the loop carries on. */
|
|
584
|
-
onError?: (error: unknown) => void;
|
|
585
|
-
};
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/vercel/client.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Runtime } from "../client.js";
|
|
2
|
-
/** The Runtime sandbox the adapter drives. */
|
|
3
|
-
export type RuntimeSandbox = Awaited<ReturnType<Runtime["sandboxes"]["create"]>>;
|
|
4
|
-
/** What `Sandbox.create` sends to Runtime. */
|
|
5
|
-
export type RuntimeCreate = NonNullable<Parameters<Runtime["sandboxes"]["create"]>[0]>;
|
|
6
|
-
/** Vercel's credentials. A Vercel token is never sent anywhere: only a
|
|
7
|
-
* Runtime key (`rtcloud_...`) given as `token` is used. */
|
|
8
|
-
export interface Credentials {
|
|
9
|
-
token?: string;
|
|
10
|
-
teamId?: string;
|
|
11
|
-
projectId?: string;
|
|
12
|
-
}
|
|
13
|
-
/** Runtime-only options, for code that has been through the switch. The key
|
|
14
|
-
* is `withruntime` because Vercel's own `runtime` field names a Node.js or
|
|
15
|
-
* Python version. */
|
|
16
|
-
export interface WithRuntime {
|
|
17
|
-
/** A Runtime client to use instead of one made from the key. */
|
|
18
|
-
client?: Runtime;
|
|
19
|
-
/** Fields sent as they are with the create, over the adapter's own: for
|
|
20
|
-
* example `{ funding: "trial" }` or `{ memoryMiB: 8192 }`. */
|
|
21
|
-
create?: Partial<RuntimeCreate>;
|
|
22
|
-
}
|
|
23
|
-
/** The key to use: a Runtime key given as `token`, then RUNTIME_API_KEY, then
|
|
24
|
-
* the key `npx withruntime login` saved (undefined lets the Runtime SDK find
|
|
25
|
-
* it). A Vercel token passed as `token` is refused, never sent. */
|
|
26
|
-
export declare function pickKey(token?: string): string | undefined;
|
|
27
|
-
/** The Runtime client for these options: an explicit client, else one per key,
|
|
28
|
-
* made once and reused so its connections stay open. */
|
|
29
|
-
export declare function clientFor(opts?: Credentials & {
|
|
30
|
-
withruntime?: WithRuntime;
|
|
31
|
-
}): Runtime;
|
|
32
|
-
/** Test hook: forget the cached clients. */
|
|
33
|
-
export declare function resetClients(): void;
|
|
34
|
-
export declare function signalOf(opts?: {
|
|
35
|
-
signal?: AbortSignal;
|
|
36
|
-
}): {
|
|
37
|
-
signal: AbortSignal;
|
|
38
|
-
} | {
|
|
39
|
-
signal?: undefined;
|
|
40
|
-
};
|
package/dist/vercel/client.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Runtime } from "../client.js";
|
|
2
|
-
import { AuthenticationError } from "./errors.js";
|
|
3
|
-
const env = (name) => typeof process === "undefined" ? undefined : process.env[name];
|
|
4
|
-
const isRuntimeKey = (key) => key.startsWith("rtcloud_");
|
|
5
|
-
const clients = new Map();
|
|
6
|
-
/** The key to use: a Runtime key given as `token`, then RUNTIME_API_KEY, then
|
|
7
|
-
* the key `npx withruntime login` saved (undefined lets the Runtime SDK find
|
|
8
|
-
* it). A Vercel token passed as `token` is refused, never sent. */
|
|
9
|
-
export function pickKey(token) {
|
|
10
|
-
if (token !== undefined && isRuntimeKey(token))
|
|
11
|
-
return token;
|
|
12
|
-
const runtimeKey = env("RUNTIME_API_KEY");
|
|
13
|
-
if (runtimeKey)
|
|
14
|
-
return runtimeKey;
|
|
15
|
-
if (token !== undefined && token !== "")
|
|
16
|
-
throw new AuthenticationError("The token passed is a Vercel token, and it was not sent. Set RUNTIME_API_KEY to a Runtime key " +
|
|
17
|
-
"(https://withruntime.com/account/keys, or run `npx withruntime login`), or pass the Runtime key as token.");
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
/** The Runtime client for these options: an explicit client, else one per key,
|
|
21
|
-
* made once and reused so its connections stay open. */
|
|
22
|
-
export function clientFor(opts = {}) {
|
|
23
|
-
if (opts.withruntime?.client)
|
|
24
|
-
return opts.withruntime.client;
|
|
25
|
-
const key = pickKey(opts.token);
|
|
26
|
-
let client = clients.get(key ?? "");
|
|
27
|
-
if (!client) {
|
|
28
|
-
client = new Runtime(key ? { apiKey: key } : {});
|
|
29
|
-
clients.set(key ?? "", client);
|
|
30
|
-
}
|
|
31
|
-
return client;
|
|
32
|
-
}
|
|
33
|
-
/** Test hook: forget the cached clients. */
|
|
34
|
-
export function resetClients() {
|
|
35
|
-
clients.clear();
|
|
36
|
-
}
|
|
37
|
-
export function signalOf(opts) {
|
|
38
|
-
return opts?.signal ? { signal: opts.signal } : {};
|
|
39
|
-
}
|