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
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { RequestOptions, Transport } from "../transport.js";
|
|
2
|
-
/** What a key limited to sandboxes may do to them. get reads them; create
|
|
3
|
-
* starts, wakes and restarts them (never makes one), and is the one that
|
|
4
|
-
* spends; stop stops and pauses them; exec runs commands and processes;
|
|
5
|
-
* read_file and write_file reach their files. */
|
|
6
|
-
export type LimitedKeyAction = "get" | "create" | "stop" | "exec" | "read_file" | "write_file";
|
|
7
|
-
export type NewKey = FullOrReadKey | LimitedKey;
|
|
8
|
-
type FullOrReadKey = {
|
|
9
|
-
/** The key's name, and its agent's: up to 80 characters. */
|
|
10
|
-
name: string;
|
|
11
|
-
/** full (the default): every action. read: every read, nothing else. */
|
|
12
|
-
access?: "full" | "read";
|
|
13
|
-
/** agent (the default): the key sees and acts on only what it makes.
|
|
14
|
-
* account: everything in the account; only an account-wide key makes one. */
|
|
15
|
-
reach?: "agent" | "account";
|
|
16
|
-
/** The most its agent may commit in any 24 hours, or null for none. Needed
|
|
17
|
-
* when the making key has a limit: the limits of the keys a key made add
|
|
18
|
-
* up to at most its own. */
|
|
19
|
-
dailyLimitMicros?: number | null;
|
|
20
|
-
sandboxes?: never;
|
|
21
|
-
actions?: never;
|
|
22
|
-
};
|
|
23
|
-
/** A key limited to these sandboxes and these actions on them. */
|
|
24
|
-
export type LimitedKey = {
|
|
25
|
-
name: string;
|
|
26
|
-
/** 1 to 20 sandbox ids this key acts on, outside every compartment. */
|
|
27
|
-
sandboxes: string[];
|
|
28
|
-
actions: LimitedKeyAction[];
|
|
29
|
-
/** Only with create, the one action that spends. */
|
|
30
|
-
dailyLimitMicros?: number | null;
|
|
31
|
-
access?: never;
|
|
32
|
-
reach?: never;
|
|
33
|
-
};
|
|
34
|
-
export type MadeKey = {
|
|
35
|
-
/** The key itself. Shown once: store it now. */
|
|
36
|
-
key: string;
|
|
37
|
-
keyId: string;
|
|
38
|
-
agentId: string;
|
|
39
|
-
orgId: string;
|
|
40
|
-
name: string;
|
|
41
|
-
/** selected: a key limited to sandboxes. */
|
|
42
|
-
access: "full" | "read" | "selected";
|
|
43
|
-
/** sandboxes: only the sandboxes it names. */
|
|
44
|
-
reach: "agent" | "account" | "sandboxes";
|
|
45
|
-
dailyLimitMicros: number | null;
|
|
46
|
-
/** The sandboxes it is limited to, or null. */
|
|
47
|
-
sandboxes: string[] | null;
|
|
48
|
-
/** Its actions, when it has named ones, or null. */
|
|
49
|
-
actions: string[] | null;
|
|
50
|
-
/** The making key's expiry, or null for until revoked. */
|
|
51
|
-
expires: string | null;
|
|
52
|
-
/** The id of the key that made it. */
|
|
53
|
-
madeBy: string;
|
|
54
|
-
};
|
|
55
|
-
/** What `keys.update` changes: either or both. */
|
|
56
|
-
export type KeyChange = {
|
|
57
|
-
/** account: everything in the account (only from an account-wide key).
|
|
58
|
-
* agent: back to only what the key's own agent makes. */
|
|
59
|
-
reach?: "agent" | "account";
|
|
60
|
-
/** The most its agent may commit in any 24 hours, or null for none. */
|
|
61
|
-
dailyLimitMicros?: number | null;
|
|
62
|
-
};
|
|
63
|
-
export type ListedKey = {
|
|
64
|
-
keyId: string;
|
|
65
|
-
agentId: string;
|
|
66
|
-
name: string;
|
|
67
|
-
access: "full" | "read" | "selected";
|
|
68
|
-
reach: "agent" | "account" | "sandboxes";
|
|
69
|
-
dailyLimitMicros: number | null;
|
|
70
|
-
sandboxes: string[] | null;
|
|
71
|
-
actions: string[] | null;
|
|
72
|
-
/** Committed in the last 24 hours: settled plus held, as the limit counts. */
|
|
73
|
-
dailyUsedMicros: number;
|
|
74
|
-
/** The key that made it, or null for one made on the website. */
|
|
75
|
-
madeBy: string | null;
|
|
76
|
-
createdAt: string;
|
|
77
|
-
expiresAt: string | null;
|
|
78
|
-
revokedAt: string | null;
|
|
79
|
-
};
|
|
80
|
-
/** One key's spend, from `GET /v1/usage?key=`. Microdollars as strings. */
|
|
81
|
-
export type KeyUsage = {
|
|
82
|
-
keyId: string;
|
|
83
|
-
agentId: string;
|
|
84
|
-
name: string;
|
|
85
|
-
madeBy: string | null;
|
|
86
|
-
revokedAt: string | null;
|
|
87
|
-
dailyLimitMicros: string | null;
|
|
88
|
-
dailyUsedMicros: string;
|
|
89
|
-
spentMicros: string;
|
|
90
|
-
heldMicros: string;
|
|
91
|
-
runningSandboxes: number;
|
|
92
|
-
resources: number;
|
|
93
|
-
};
|
|
94
|
-
export declare function keys(t: Transport): {
|
|
95
|
-
/** Make a key with this one. It never has more than this key, and is in
|
|
96
|
-
* the audit log as made by it. At most 100 live in an account. */
|
|
97
|
-
create: (input: NewKey, options?: RequestOptions) => Promise<MadeKey>;
|
|
98
|
-
/** This key and the keys it made (every key, for an account-wide key),
|
|
99
|
-
* live first, with what each spent in the last 24 hours. */
|
|
100
|
-
list: (options?: RequestOptions) => Promise<ListedKey[]>;
|
|
101
|
-
/** Change a key's reach or daily limit (null removes it). A key widens
|
|
102
|
-
* only the keys it made, never past itself; it narrows any key it sees,
|
|
103
|
-
* and never changes itself. Returns the key as `list` shows it. */
|
|
104
|
-
update: (keyId: string, change: KeyChange, options?: RequestOptions) => Promise<ListedKey>;
|
|
105
|
-
/** Revoke this key or one it made: a worker's, when the worker is done. */
|
|
106
|
-
revoke: (keyId: string, options?: RequestOptions) => Promise<{
|
|
107
|
-
keyId: string;
|
|
108
|
-
revokedAt: string;
|
|
109
|
-
}>;
|
|
110
|
-
/** What one key spent: itself, or a key it made. */
|
|
111
|
-
usage: (keyId: string, options?: RequestOptions) => Promise<KeyUsage>;
|
|
112
|
-
};
|
|
113
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export function keys(t) {
|
|
2
|
-
return {
|
|
3
|
-
/** Make a key with this one. It never has more than this key, and is in
|
|
4
|
-
* the audit log as made by it. At most 100 live in an account. */
|
|
5
|
-
create: (input, options) => t.json({ method: "POST", path: "/v1/keys", body: input, ...options }),
|
|
6
|
-
/** This key and the keys it made (every key, for an account-wide key),
|
|
7
|
-
* live first, with what each spent in the last 24 hours. */
|
|
8
|
-
list: async (options) => (await t.json({ method: "GET", path: "/v1/keys", ...options })).keys,
|
|
9
|
-
/** Change a key's reach or daily limit (null removes it). A key widens
|
|
10
|
-
* only the keys it made, never past itself; it narrows any key it sees,
|
|
11
|
-
* and never changes itself. Returns the key as `list` shows it. */
|
|
12
|
-
update: (keyId, change, options) => t.json({
|
|
13
|
-
method: "PATCH",
|
|
14
|
-
path: `/v1/keys/${encodeURIComponent(keyId)}`,
|
|
15
|
-
body: change,
|
|
16
|
-
...options,
|
|
17
|
-
}),
|
|
18
|
-
/** Revoke this key or one it made: a worker's, when the worker is done. */
|
|
19
|
-
revoke: (keyId, options) => t.json({
|
|
20
|
-
method: "DELETE",
|
|
21
|
-
path: `/v1/keys/${encodeURIComponent(keyId)}`,
|
|
22
|
-
...options,
|
|
23
|
-
}),
|
|
24
|
-
/** What one key spent: itself, or a key it made. */
|
|
25
|
-
usage: async (keyId, options) => (await t.json({
|
|
26
|
-
method: "GET",
|
|
27
|
-
path: "/v1/usage",
|
|
28
|
-
query: { key: keyId },
|
|
29
|
-
...options,
|
|
30
|
-
})).key,
|
|
31
|
-
};
|
|
32
|
-
}
|
package/dist/products/apps.d.ts
DELETED
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
import { Sandbox } from "../sandbox.js";
|
|
2
|
-
import { type RequestOptions, type Transport } from "../transport.js";
|
|
3
|
-
import { type ResourceDeleteOptions, type ResourceGetOptions, type ResourceListQuery, type ResourceWaitOptions } from "./resources.js";
|
|
4
|
-
/** On the client as runtime.apps for Apps' private beta: an account outside
|
|
5
|
-
* it is refused with product_in_beta. Plain request builders over Transport:
|
|
6
|
-
* nothing runs at import, no dependency beyond this package. A deployment's
|
|
7
|
-
* completion follows its own record, not the app's state. */
|
|
8
|
-
export type AppState = "waiting" | "live" | "failed" | "deleting" | "deleted";
|
|
9
|
-
/** What Runtime does when a new version's errors or speed get clearly worse
|
|
10
|
-
* in its first 15 minutes: tell the owners (alert, the default), go back to
|
|
11
|
-
* the previous version and tell them (rollback), or neither (off). */
|
|
12
|
-
export type ReleaseWatch = "rollback" | "alert" | "off";
|
|
13
|
-
export type AppSettings = {
|
|
14
|
-
minCopies: number;
|
|
15
|
-
maxCopies: number;
|
|
16
|
-
concurrency: number;
|
|
17
|
-
spares: number;
|
|
18
|
-
vcpu: number;
|
|
19
|
-
memoryMiB: number;
|
|
20
|
-
port: number;
|
|
21
|
-
healthPath?: string;
|
|
22
|
-
releaseWatch: ReleaseWatch;
|
|
23
|
-
/** Cloudflare's CDN in front of the App's addresses (its runtimehost.com
|
|
24
|
-
* address and its custom domains). On by default; false sends visitors
|
|
25
|
-
* straight to Runtime's routers, with nothing cached. */
|
|
26
|
-
cdn: boolean;
|
|
27
|
-
/** A live copy out of every router's rotation this long is replaced. */
|
|
28
|
-
healthFailSeconds: number;
|
|
29
|
-
};
|
|
30
|
-
/** One read-write volume of this account (POST /v1/volumes), mounted at path
|
|
31
|
-
* in the App's one copy. */
|
|
32
|
-
export type AppVolume = {
|
|
33
|
-
volumeId: string;
|
|
34
|
-
/** Under /data, /mnt, /state, /storage or /volumes, with no . or .. segments. */
|
|
35
|
-
path: string;
|
|
36
|
-
};
|
|
37
|
-
export type StatefulSettings = {
|
|
38
|
-
volume: AppVolume | null;
|
|
39
|
-
/** Seconds a stopped copy has after SIGTERM to exit. */
|
|
40
|
-
stopGraceSeconds: number;
|
|
41
|
-
};
|
|
42
|
-
/** How an App's new version goes live: every copy together (at_once, the
|
|
43
|
-
* default), or staged: one copy of it beside the live version's, then about
|
|
44
|
-
* 10%, 50% and all of them, each stage judged on its visitors' errors and
|
|
45
|
-
* speed before the next. A stage that does worse goes back: its copies
|
|
46
|
-
* finish their requests and stop, then the deploy fails (deploy_stage_failed)
|
|
47
|
-
* and the live version never stops serving. */
|
|
48
|
-
export type ReleaseStages = "at_once" | "staged";
|
|
49
|
-
export type ReleaseSettings = {
|
|
50
|
-
releaseStages: ReleaseStages;
|
|
51
|
-
/** 60 to 3600 seconds; defaults to 300. How long each stage runs once its
|
|
52
|
-
* copies serve before it is judged. */
|
|
53
|
-
releaseSoakSeconds: number;
|
|
54
|
-
};
|
|
55
|
-
/** An App's staged release under way, or its last. */
|
|
56
|
-
export type StagedRelease = {
|
|
57
|
-
version: number;
|
|
58
|
-
/** The version live when it began, serving beside it. */
|
|
59
|
-
from: number;
|
|
60
|
-
/** rolling: its stages go live; back: a stage did worse and its copies
|
|
61
|
-
* leave; done: every copy runs it; failed: it went back (or its copies
|
|
62
|
-
* failed their health check) and the version failed; ended: another
|
|
63
|
-
* deploy or a rollback took its place. */
|
|
64
|
-
state: "rolling" | "back" | "done" | "failed" | "ended";
|
|
65
|
-
stage: number;
|
|
66
|
-
stages: number;
|
|
67
|
-
/** Copies of the new version the stage serves beside the old version's. */
|
|
68
|
-
copies: number;
|
|
69
|
-
/** Copies the release walks to. */
|
|
70
|
-
of: number;
|
|
71
|
-
soakSeconds: number;
|
|
72
|
-
/** Its last step, in words. */
|
|
73
|
-
detail: string;
|
|
74
|
-
startedAt: number;
|
|
75
|
-
updatedAt: number;
|
|
76
|
-
};
|
|
77
|
-
export type App = AppSettings & StatefulSettings & ReleaseSettings & {
|
|
78
|
-
id: string;
|
|
79
|
-
name: string | null;
|
|
80
|
-
/** Its address for life, its name then its account's:
|
|
81
|
-
* `https://shop-3f9a1c2e7b04d915-acme1.runtimehost.com/`. A rename leaves it as it is; its
|
|
82
|
-
* id's address (`https://<id without dashes>.runtimehost.com/`) answers
|
|
83
|
-
* too. */
|
|
84
|
-
url: string;
|
|
85
|
-
labels: Record<string, string>;
|
|
86
|
-
state: AppState;
|
|
87
|
-
createdAt: number;
|
|
88
|
-
updatedAt: number;
|
|
89
|
-
deletedAt: number | null;
|
|
90
|
-
error: {
|
|
91
|
-
code: string;
|
|
92
|
-
message: string;
|
|
93
|
-
} | null;
|
|
94
|
-
liveVersion: number | null;
|
|
95
|
-
previousVersion: number | null;
|
|
96
|
-
/** Its staged release under way, or its last; null before its first. */
|
|
97
|
-
stagedRelease: StagedRelease | null;
|
|
98
|
-
/** While a copy waits for room in its region: its account's lane, its
|
|
99
|
-
* place in line (1 is next), how many wait ahead by lane, and why.
|
|
100
|
-
* Higher lanes get room first. Absent while nothing of it waits. */
|
|
101
|
-
line?: AppLine;
|
|
102
|
-
};
|
|
103
|
-
export type AppLine = {
|
|
104
|
-
lane: string;
|
|
105
|
-
place: number;
|
|
106
|
-
ahead: Record<string, number>;
|
|
107
|
-
words: string;
|
|
108
|
-
};
|
|
109
|
-
export type RuntimeFunction = Omit<App, "minCopies" | keyof StatefulSettings | keyof ReleaseSettings | "stagedRelease"> & {
|
|
110
|
-
minCopies: 0;
|
|
111
|
-
/** 250 to 5000 ms: at most how long a copy stays awake after its last request ends. */
|
|
112
|
-
sleepAfterMs: number;
|
|
113
|
-
};
|
|
114
|
-
export type CreateFunction = {
|
|
115
|
-
/** Up to 128 letters, digits, dots, dashes or underscores; alphanumeric first. */
|
|
116
|
-
name?: string;
|
|
117
|
-
/** At most 32 entries, each value at most 256 characters. */
|
|
118
|
-
labels?: Record<string, string>;
|
|
119
|
-
/** Required, 1 to the account's App copies at once (its plan's sandboxes at
|
|
120
|
-
* once, GET /v1/limits `instance.count`). Bounds the number of awake copies. */
|
|
121
|
-
maxCopies: number;
|
|
122
|
-
/** Required, 1 to 16. */
|
|
123
|
-
vcpu: number;
|
|
124
|
-
/** Required, 128 to 65536 MiB. */
|
|
125
|
-
memoryMiB: number;
|
|
126
|
-
/** 1 to 10000; defaults to 100. */
|
|
127
|
-
concurrency?: number;
|
|
128
|
-
/** 0 to 16; defaults to 2. */
|
|
129
|
-
spares?: number;
|
|
130
|
-
/** 1 to 65535; defaults to 8080. */
|
|
131
|
-
port?: number;
|
|
132
|
-
/** Starts with /, no whitespace, at most 256 characters.
|
|
133
|
-
* Omit to check whether the port accepts connections. */
|
|
134
|
-
healthPath?: string;
|
|
135
|
-
/** Defaults to "alert"; "rollback" is opted into. */
|
|
136
|
-
releaseWatch?: ReleaseWatch;
|
|
137
|
-
/** Cloudflare's CDN in front of the address and custom domains; defaults to
|
|
138
|
-
* true. false sends visitors straight to Runtime's routers, nothing cached. */
|
|
139
|
-
cdn?: boolean;
|
|
140
|
-
/** 10 to 3600; defaults to 60. A live copy failing its health check this
|
|
141
|
-
* long is replaced, and the version's history says so. */
|
|
142
|
-
healthFailSeconds?: number;
|
|
143
|
-
/** Only Apps can keep copies awake. Omit this field, including zero. */
|
|
144
|
-
minCopies?: never;
|
|
145
|
-
/** 250 to 5000 ms; defaults to 1000. How long a copy stays awake after its
|
|
146
|
-
* last request ends before it goes back to sleep, at most (copies whose
|
|
147
|
-
* requests come closer together than this stay awake between them; a lone
|
|
148
|
-
* first request may sleep sooner, from 250 ms). Awake time with no
|
|
149
|
-
* request in flight is not billed. */
|
|
150
|
-
sleepAfterMs?: number;
|
|
151
|
-
};
|
|
152
|
-
export type CreateApp = Omit<CreateFunction, "minCopies" | "sleepAfterMs"> & {
|
|
153
|
-
/** Defaults to 0, or 1 with a volume. No greater than maxCopies. */
|
|
154
|
-
minCopies?: number;
|
|
155
|
-
/** Only Functions sleep on this rule; an App is refused it. */
|
|
156
|
-
sleepAfterMs?: never;
|
|
157
|
-
/** Needs maxCopies 1, minCopies 1 and spares 0 (spares defaults to 0 with a
|
|
158
|
-
* volume), placed on the volume's server. Deploys, rollbacks and restarts
|
|
159
|
-
* then stop the old copy before the new one boots fresh with the volume:
|
|
160
|
-
* an image's start, or a build's files with its start command (a build
|
|
161
|
-
* deployed here saves its files rather than its memory). The deploy record
|
|
162
|
-
* says the downtime. */
|
|
163
|
-
volume?: AppVolume;
|
|
164
|
-
/** 0 to 900; defaults to 30. */
|
|
165
|
-
stopGraceSeconds?: number;
|
|
166
|
-
/** Defaults to "at_once"; see ReleaseStages. */
|
|
167
|
-
releaseStages?: ReleaseStages;
|
|
168
|
-
/** 60 to 3600; defaults to 300. */
|
|
169
|
-
releaseSoakSeconds?: number;
|
|
170
|
-
};
|
|
171
|
-
export type UpdateApp = Partial<AppSettings & StatefulSettings & ReleaseSettings> & {
|
|
172
|
-
name?: string | null;
|
|
173
|
-
labels?: Record<string, string>;
|
|
174
|
-
/** Only Functions sleep on this rule; an App is refused it. */
|
|
175
|
-
sleepAfterMs?: never;
|
|
176
|
-
};
|
|
177
|
-
export type UpdateFunction = Omit<UpdateApp, "minCopies" | "sleepAfterMs" | keyof StatefulSettings | keyof ReleaseSettings> & {
|
|
178
|
-
minCopies?: never;
|
|
179
|
-
/** 250 to 5000 ms; see CreateFunction.sleepAfterMs. */
|
|
180
|
-
sleepAfterMs?: number;
|
|
181
|
-
};
|
|
182
|
-
export type DeployState = "building" | "warming" | "switching" | "live" | "failed" | "superseded";
|
|
183
|
-
export type AppDowntime = {
|
|
184
|
-
stopMs: number;
|
|
185
|
-
bootMs: number;
|
|
186
|
-
totalMs: number;
|
|
187
|
-
};
|
|
188
|
-
export type AppDeploy = {
|
|
189
|
-
id: string;
|
|
190
|
-
version: number;
|
|
191
|
-
url: string;
|
|
192
|
-
/** The account secrets whose placeholders its copies see; absent when none. */
|
|
193
|
-
secrets?: string[];
|
|
194
|
-
/** A restart's: the version it started afresh. */
|
|
195
|
-
restartOf?: number;
|
|
196
|
-
/** A stop-then-start's (an App with a volume), once live. */
|
|
197
|
-
downtime?: AppDowntime;
|
|
198
|
-
} & ({
|
|
199
|
-
state: "building" | "warming" | "switching" | "live";
|
|
200
|
-
error?: never;
|
|
201
|
-
} | {
|
|
202
|
-
state: "failed" | "superseded";
|
|
203
|
-
error: {
|
|
204
|
-
code: "deploy_build_failed" | "deploy_health_failed" | "deploy_stop_failed" | "deploy_stage_failed" | "deploy_switch_failed" | "deploy_superseded";
|
|
205
|
-
message: string;
|
|
206
|
-
hint: string;
|
|
207
|
-
lastOutput: string;
|
|
208
|
-
};
|
|
209
|
-
});
|
|
210
|
-
/** `image`: an image of this account (id, name, name:tag or name@version),
|
|
211
|
-
* ready; the version records its id. */
|
|
212
|
-
export type DeployApp = ({
|
|
213
|
-
image: string;
|
|
214
|
-
build?: never;
|
|
215
|
-
} | {
|
|
216
|
-
build: string;
|
|
217
|
-
image?: never;
|
|
218
|
-
}) & {
|
|
219
|
-
env?: Record<string, string>;
|
|
220
|
-
/** Carry the last deploy's environment, still sealed. With env, that
|
|
221
|
-
* environment with env's names set: change one value without sending the rest
|
|
222
|
-
* (needs a key that may reveal the App's secrets, secrets_reveal; else 403).
|
|
223
|
-
* For a build: only one a push to the production branch made, from the
|
|
224
|
-
* repository the environment came with. For an image: only from a key that
|
|
225
|
-
* may reveal the App's secrets, and only an environment named with an image
|
|
226
|
-
* deploy. Otherwise refused with keep_env_refused (409). */
|
|
227
|
-
keepEnv?: boolean;
|
|
228
|
-
/** Account secrets whose placeholders every copy of this version sees, each
|
|
229
|
-
* in the environment variable of its name; the egress proxy puts the value
|
|
230
|
-
* into the copy's requests to the secret's hosts, so the value never enters
|
|
231
|
-
* a copy. Each a secret of the whole account or one scoped to this App
|
|
232
|
-
* (`secrets.scope(name, { apps: [id] })`), and not also in `env`. Naming
|
|
233
|
-
* any needs a key that may reveal secrets. Absent: the last deploy's stay
|
|
234
|
-
* (refused for a key that may only deploy an image); `[]` names none. */
|
|
235
|
-
secrets?: string[];
|
|
236
|
-
port?: number;
|
|
237
|
-
healthPath?: string;
|
|
238
|
-
/** Return live, failed or superseded, including its URL/version or failure details. */
|
|
239
|
-
wait?: boolean;
|
|
240
|
-
};
|
|
241
|
-
export type AppVersion = {
|
|
242
|
-
version: number;
|
|
243
|
-
live: boolean;
|
|
244
|
-
previous: boolean;
|
|
245
|
-
saved: boolean;
|
|
246
|
-
/** Its deploy's id, for GET /v1/apps/{id}/deploys/{deploy}. */
|
|
247
|
-
deploy: string;
|
|
248
|
-
/** The build it was deployed from, or null for an image. */
|
|
249
|
-
build: string | null;
|
|
250
|
-
/** saved: copies start from a saved server; cold: they boot fresh (an
|
|
251
|
-
* image, or a build's files) and start its process. */
|
|
252
|
-
boot: "saved" | "cold";
|
|
253
|
-
restartOf: number | null;
|
|
254
|
-
/** Live copies replaced for failing their health check or exiting. */
|
|
255
|
-
replacements: {
|
|
256
|
-
at: number;
|
|
257
|
-
reason: "health" | "exited";
|
|
258
|
-
downtimeMs?: number;
|
|
259
|
-
}[];
|
|
260
|
-
downtime: AppDowntime | null;
|
|
261
|
-
};
|
|
262
|
-
export type AppCopy = {
|
|
263
|
-
id: string;
|
|
264
|
-
version: number;
|
|
265
|
-
region: string;
|
|
266
|
-
state: "starting" | "serving" | "draining" | "frozen" | "parked";
|
|
267
|
-
since: number;
|
|
268
|
-
};
|
|
269
|
-
/** One copy's commands, processes and files, as a sandbox's: `exec`,
|
|
270
|
-
* `execStream`, `processes`, `files` (write, read, upload, download, ...).
|
|
271
|
-
* Only an owner's or admin's key reaches into a copy (403 otherwise): it holds
|
|
272
|
-
* the App's environment, its secrets included. */
|
|
273
|
-
export type AppCopyMachine = Pick<Sandbox, "id" | "exec" | "execStream" | "processes" | "files">;
|
|
274
|
-
export type AppCopyOptions = RequestOptions & {
|
|
275
|
-
/** A copy id from `copies()`. Omitted: a serving copy of the live version,
|
|
276
|
-
* or any serving copy while a deploy switches. */
|
|
277
|
-
copy?: string;
|
|
278
|
-
};
|
|
279
|
-
/** One line a copy printed. */
|
|
280
|
-
export type AppLogLine = {
|
|
281
|
-
/** Unix milliseconds, within a second of when the copy printed it. */
|
|
282
|
-
at: number;
|
|
283
|
-
stream: "stdout" | "stderr";
|
|
284
|
-
/** The copy that printed it. */
|
|
285
|
-
copy: string | null;
|
|
286
|
-
/** Its version, as versions() lists them. */
|
|
287
|
-
version: number | null;
|
|
288
|
-
text: string;
|
|
289
|
-
};
|
|
290
|
-
/** The newest lines of a window, oldest first. */
|
|
291
|
-
export type AppLogPage = {
|
|
292
|
-
lines: AppLogLine[];
|
|
293
|
-
nextCursor: string | null;
|
|
294
|
-
hasMore: boolean;
|
|
295
|
-
};
|
|
296
|
-
/** A follow's events: each line once, and a gap where the log store dropped
|
|
297
|
-
* lines before they could be read. */
|
|
298
|
-
export type AppLogEvent = ({
|
|
299
|
-
type: "line";
|
|
300
|
-
cursor: string;
|
|
301
|
-
} & AppLogLine) | {
|
|
302
|
-
type: "gap";
|
|
303
|
-
cursor: string;
|
|
304
|
-
};
|
|
305
|
-
export type AppLogOptions = {
|
|
306
|
-
/** A time (2026-10-18T20:00:00Z) or a duration back from now (30s, 15m,
|
|
307
|
-
* 2h, 7d). Default 1h; lines are kept 14 days. */
|
|
308
|
-
since?: string;
|
|
309
|
-
/** Only this version's copies. */
|
|
310
|
-
version?: number;
|
|
311
|
-
/** Only this copy. */
|
|
312
|
-
copy?: string;
|
|
313
|
-
stream?: "stdout" | "stderr";
|
|
314
|
-
/** 1 to 500, default 100: a page, or the lines a follow starts with. */
|
|
315
|
-
limit?: number;
|
|
316
|
-
/** A page's nextCursor (the page before it), or with follow an event's
|
|
317
|
-
* cursor to resume after it. */
|
|
318
|
-
cursor?: string;
|
|
319
|
-
/** Stream new lines as copies print them, until the signal aborts or
|
|
320
|
-
* timeoutMs passes (none by default); the SDK reconnects by itself. */
|
|
321
|
-
follow?: boolean;
|
|
322
|
-
};
|
|
323
|
-
export type DeployGetOptions = RequestOptions & {
|
|
324
|
-
waitFor?: DeployState;
|
|
325
|
-
timeoutSeconds?: number;
|
|
326
|
-
};
|
|
327
|
-
/** Defaults to waiting, live and failed. */
|
|
328
|
-
export type AppListQuery = ResourceListQuery<AppState>;
|
|
329
|
-
export type AppGetOptions = ResourceGetOptions<AppState>;
|
|
330
|
-
export type AppWaitOptions = ResourceWaitOptions;
|
|
331
|
-
export type AppDeleteOptions = ResourceDeleteOptions;
|
|
332
|
-
/** The copy `wanted` names, else a serving copy of the live version, else any
|
|
333
|
-
* serving copy (a deploy may be switching). Refuses with what to do rather
|
|
334
|
-
* than wake a frozen copy, which the App's own traffic does. */
|
|
335
|
-
export declare function pickCopy(app: Pick<App, "id" | "liveVersion">, list: readonly AppCopy[], wanted?: string): AppCopy;
|
|
336
|
-
export declare function apps(t: Transport): {
|
|
337
|
-
/** Create a resource waiting for its first version. Defaults belong to
|
|
338
|
-
* the API, so the SDK does not override them. */
|
|
339
|
-
create: (input: CreateApp, options?: RequestOptions) => Promise<App>;
|
|
340
|
-
get: (id: string, options?: ResourceGetOptions<AppState>) => Promise<App>;
|
|
341
|
-
list: (query?: ResourceListQuery<AppState>, options?: RequestOptions) => Promise<import("../page.js").Page<App>>;
|
|
342
|
-
deploy: (id: string, input: DeployApp, options?: AppWaitOptions) => Promise<AppDeploy>;
|
|
343
|
-
getDeploy: (id: string, deployId: string, options?: DeployGetOptions) => Promise<AppDeploy>;
|
|
344
|
-
/** Resume by deploy id after a process restart, without creating another version. */
|
|
345
|
-
waitDeploy: (id: string, deployId: string, options?: AppWaitOptions) => Promise<AppDeploy>;
|
|
346
|
-
rollback: (id: string, options?: AppDeleteOptions) => Promise<AppDeploy>;
|
|
347
|
-
/** Start a fresh copy of the live version as a deploy of its own; with a
|
|
348
|
-
* volume, the old copy stops first. restart_unavailable: nothing is live. */
|
|
349
|
-
restart: (id: string, options?: AppDeleteOptions) => Promise<AppDeploy>;
|
|
350
|
-
versions: (id: string, options?: RequestOptions) => Promise<AppVersion[]>;
|
|
351
|
-
copies: (id: string, options?: RequestOptions) => Promise<AppCopy[]>;
|
|
352
|
-
/** Reach into one copy: `(await runtime.apps.copy(id)).exec("ls /srv")`.
|
|
353
|
-
* Picks the copy once, by GET .../copies; a copy the App replaces later
|
|
354
|
-
* answers not found, so pick again then. */
|
|
355
|
-
copy: (id: string, options?: AppCopyOptions) => Promise<AppCopyMachine>;
|
|
356
|
-
/** What its copies printed: a page of the newest lines, oldest first, or
|
|
357
|
-
* with follow: true each new line as it is printed. */
|
|
358
|
-
logs: {
|
|
359
|
-
(id: string, query: AppLogOptions & {
|
|
360
|
-
follow: true;
|
|
361
|
-
}, options?: RequestOptions): AsyncGenerator<AppLogEvent>;
|
|
362
|
-
(id: string, query?: (AppLogOptions & {
|
|
363
|
-
follow?: false;
|
|
364
|
-
}) | undefined, options?: RequestOptions): Promise<AppLogPage>;
|
|
365
|
-
(id: string, query: AppLogOptions, options?: RequestOptions): Promise<AppLogPage> | AsyncGenerator<AppLogEvent>;
|
|
366
|
-
};
|
|
367
|
-
update: (id: string, input: UpdateApp, options?: RequestOptions) => Promise<App>;
|
|
368
|
-
/** Follow resource state, not a deployment: an
|
|
369
|
-
* older live version can survive a failed rollout of a newer version. */
|
|
370
|
-
wait: (id: string, target: "live" | "deleted", options?: AppWaitOptions) => Promise<App>;
|
|
371
|
-
delete: (id: string, options?: ResourceDeleteOptions) => Promise<App>;
|
|
372
|
-
};
|
|
373
|
-
export declare function functions(t: Transport): {
|
|
374
|
-
/** Create a resource waiting for its first version. Defaults belong to
|
|
375
|
-
* the API, so the SDK does not override them. */
|
|
376
|
-
create: (input: CreateFunction, options?: RequestOptions) => Promise<RuntimeFunction>;
|
|
377
|
-
get: (id: string, options?: ResourceGetOptions<AppState>) => Promise<RuntimeFunction>;
|
|
378
|
-
list: (query?: ResourceListQuery<AppState>, options?: RequestOptions) => Promise<import("../page.js").Page<RuntimeFunction>>;
|
|
379
|
-
deploy: (id: string, input: DeployApp, options?: AppWaitOptions) => Promise<AppDeploy>;
|
|
380
|
-
getDeploy: (id: string, deployId: string, options?: DeployGetOptions) => Promise<AppDeploy>;
|
|
381
|
-
/** Resume by deploy id after a process restart, without creating another version. */
|
|
382
|
-
waitDeploy: (id: string, deployId: string, options?: AppWaitOptions) => Promise<AppDeploy>;
|
|
383
|
-
rollback: (id: string, options?: AppDeleteOptions) => Promise<AppDeploy>;
|
|
384
|
-
/** Start a fresh copy of the live version as a deploy of its own; with a
|
|
385
|
-
* volume, the old copy stops first. restart_unavailable: nothing is live. */
|
|
386
|
-
restart: (id: string, options?: AppDeleteOptions) => Promise<AppDeploy>;
|
|
387
|
-
versions: (id: string, options?: RequestOptions) => Promise<AppVersion[]>;
|
|
388
|
-
copies: (id: string, options?: RequestOptions) => Promise<AppCopy[]>;
|
|
389
|
-
/** Reach into one copy: `(await runtime.apps.copy(id)).exec("ls /srv")`.
|
|
390
|
-
* Picks the copy once, by GET .../copies; a copy the App replaces later
|
|
391
|
-
* answers not found, so pick again then. */
|
|
392
|
-
copy: (id: string, options?: AppCopyOptions) => Promise<AppCopyMachine>;
|
|
393
|
-
/** What its copies printed: a page of the newest lines, oldest first, or
|
|
394
|
-
* with follow: true each new line as it is printed. */
|
|
395
|
-
logs: {
|
|
396
|
-
(id: string, query: AppLogOptions & {
|
|
397
|
-
follow: true;
|
|
398
|
-
}, options?: RequestOptions): AsyncGenerator<AppLogEvent>;
|
|
399
|
-
(id: string, query?: (AppLogOptions & {
|
|
400
|
-
follow?: false;
|
|
401
|
-
}) | undefined, options?: RequestOptions): Promise<AppLogPage>;
|
|
402
|
-
(id: string, query: AppLogOptions, options?: RequestOptions): Promise<AppLogPage> | AsyncGenerator<AppLogEvent>;
|
|
403
|
-
};
|
|
404
|
-
update: (id: string, input: UpdateFunction, options?: RequestOptions) => Promise<RuntimeFunction>;
|
|
405
|
-
/** Follow resource state, not a deployment: an
|
|
406
|
-
* older live version can survive a failed rollout of a newer version. */
|
|
407
|
-
wait: (id: string, target: "live" | "deleted", options?: AppWaitOptions) => Promise<RuntimeFunction>;
|
|
408
|
-
delete: (id: string, options?: ResourceDeleteOptions) => Promise<RuntimeFunction>;
|
|
409
|
-
};
|