withruntime 0.49.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 -574
- 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,935 +0,0 @@
|
|
|
1
|
-
/** Agents: a coding or support agent's harness (Claude Code, Codex, Gemini
|
|
2
|
-
* CLI, or your own code on an agents SDK) in a sandbox of its own per
|
|
3
|
-
* session, on your own model key. Your app drives its sessions through this
|
|
4
|
-
* API and webhooks. In a private beta: outside it every call is refused with
|
|
5
|
-
* `product_in_beta`.
|
|
6
|
-
*
|
|
7
|
-
* const agent = await runtime.agents.create({
|
|
8
|
-
* name: "support",
|
|
9
|
-
* definition: {
|
|
10
|
-
* ...runtime.agents.templates["claude-code"].definition,
|
|
11
|
-
* ...runtime.agents.uses.support.definition,
|
|
12
|
-
* instructions: "Answer questions about our product. Be brief.",
|
|
13
|
-
* },
|
|
14
|
-
* });
|
|
15
|
-
* const session = await runtime.agents.start("support", { input: "Hi!", key: "customer:42" });
|
|
16
|
-
* for await (const event of session.events()) if (event.kind === "reply") console.log(event.body.text);
|
|
17
|
-
*
|
|
18
|
-
* A session's sandbox is billed while it runs, at $0.03 per active vCPU-hour
|
|
19
|
-
* and $0.01 per GiB-hour of memory; a waiting session's sandbox is paused.
|
|
20
|
-
* No session fee, no seats. */
|
|
21
|
-
import { Page } from "../page.js";
|
|
22
|
-
import type { RequestOptions, Transport } from "../transport.js";
|
|
23
|
-
export type AgentDefinition = {
|
|
24
|
-
/** What runs the harness, from the sandbox's home. */
|
|
25
|
-
command: string;
|
|
26
|
-
/** Where each session's sandbox starts: an image of yours; a snapshot of
|
|
27
|
-
* a machine you set up by hand (a harness logged in to your own
|
|
28
|
-
* subscription included); or a GitHub repository connected to CI/CD,
|
|
29
|
-
* `owner/name`, whose warm snapshot (checked out at /workspace/repo at its
|
|
30
|
-
* production branch's last passing commit, set up) each session starts
|
|
31
|
-
* as a copy of, its harness run there. The default image has Node and
|
|
32
|
-
* Python. */
|
|
33
|
-
from?: {
|
|
34
|
-
image: string;
|
|
35
|
-
} | {
|
|
36
|
-
snapshot: string;
|
|
37
|
-
} | {
|
|
38
|
-
repo: string;
|
|
39
|
-
};
|
|
40
|
-
/** 1, 2, 4, 8 or 16; default 4. */
|
|
41
|
-
vcpu?: number;
|
|
42
|
-
/** 512 to 65536, a multiple of 256; default 8192 (8 GiB). */
|
|
43
|
-
memoryMiB?: number;
|
|
44
|
-
/** The agent's standing words, at most 64 KiB. */
|
|
45
|
-
instructions?: string;
|
|
46
|
-
/** Settings the harness sees; never a secret. */
|
|
47
|
-
env?: Record<string, string>;
|
|
48
|
-
/** Names of your egress secrets the sandbox may use: it sees a placeholder,
|
|
49
|
-
* and the egress proxy adds the value toward the secret's hosts. Model
|
|
50
|
-
* keys of any provider go here (ANTHROPIC_API_KEY, OPENAI_API_KEY,
|
|
51
|
-
* GEMINI_API_KEY, OPENROUTER_API_KEY, or an OpenAI-compatible endpoint's
|
|
52
|
-
* key with env.OPENAI_BASE_URL). */
|
|
53
|
-
secrets?: string[];
|
|
54
|
-
/** Claude accounts, 1 to 16 egress secrets' names: subscription tokens,
|
|
55
|
-
* or API keys for a name holding API_KEY. Each session takes the one with
|
|
56
|
-
* the most usage left; the review template moves to the next when one is
|
|
57
|
-
* out of usage, and waits for the soonest reset when all are. */
|
|
58
|
-
pool?: string[];
|
|
59
|
-
/** MCP servers the harness may reach. */
|
|
60
|
-
mcp?: {
|
|
61
|
-
name: string;
|
|
62
|
-
url: string;
|
|
63
|
-
}[];
|
|
64
|
-
volumes?: {
|
|
65
|
-
volume: string;
|
|
66
|
-
path: string;
|
|
67
|
-
}[];
|
|
68
|
-
/** Where each session's sandbox may connect, enforced by its network
|
|
69
|
-
* rules from its first packet: with allow, only those hosts. Absent:
|
|
70
|
-
* anywhere. */
|
|
71
|
-
network?: {
|
|
72
|
-
internet: boolean;
|
|
73
|
-
allow?: string[];
|
|
74
|
-
};
|
|
75
|
-
/** How long a session's sandbox runs with nothing happening before it
|
|
76
|
-
* pauses; default 60. */
|
|
77
|
-
idlePauseSeconds?: number;
|
|
78
|
-
/** A session's longest life; default 86400. */
|
|
79
|
-
maxSessionSeconds?: number;
|
|
80
|
-
/** Sessions running at once; more wait, queued. Default 10. */
|
|
81
|
-
maxConcurrent?: number;
|
|
82
|
-
/** What one session may cost, its subagents' sessions included, in
|
|
83
|
-
* dollars; it stops with reason `budget` there. Default 5. */
|
|
84
|
-
maxSessionDollars?: number;
|
|
85
|
-
/** What the agent's sessions may cost in a day, in dollars; past it the
|
|
86
|
-
* agent starts nothing new (`budget_reached`) until the next. Default 100. */
|
|
87
|
-
maxDayDollars?: number;
|
|
88
|
-
/** The use it was set up for (`uses`). */
|
|
89
|
-
template?: "support" | "team";
|
|
90
|
-
/** Whose memory a session reads: `key` (the default), each session key
|
|
91
|
-
* its own; `agent`, one all its sessions share, never a support agent's. */
|
|
92
|
-
memory?: {
|
|
93
|
-
scope: "key" | "agent";
|
|
94
|
-
};
|
|
95
|
-
/** The model the harness runs (claude-opus-5-5, gpt-5.1-codex,
|
|
96
|
-
* gemini-3-pro); absent, the harness's default. The harness reads it as
|
|
97
|
-
* RUNTIME_AGENT_MODEL, and Claude Code, the Claude Agent SDK, Codex,
|
|
98
|
-
* Gemini CLI and the OpenAI Agents SDK each by their own setting. */
|
|
99
|
-
model?: string;
|
|
100
|
-
/** What a session's start may override (`StartAgentSession.overrides`). */
|
|
101
|
-
sessionOverrides?: AgentSessionOverrideLimits;
|
|
102
|
-
/** Child sessions its tree may hold open at once, a workflow's steps
|
|
103
|
-
* from inside it included: 1 to 1000, default 100. */
|
|
104
|
-
maxChildren?: number;
|
|
105
|
-
/** A second model a session asks for advice mid-task (`advise` in the
|
|
106
|
-
* sandbox). Each question and answer is kept in the session's log as a
|
|
107
|
-
* `note` whose body holds `advice`. */
|
|
108
|
-
advisor?: AgentAdvisor;
|
|
109
|
-
/** Which tool calls of the harness run, wait for a person, or are
|
|
110
|
-
* refused. Each call is a `tool_call` event in the session's log; one that
|
|
111
|
-
* waits is an ask of the inbox with the options Allow and Deny
|
|
112
|
-
* (`agents.asks.approve`, `agents.asks.deny`), and only that call waits.
|
|
113
|
-
* Absent: every call runs. */
|
|
114
|
-
permissions?: AgentPermissions;
|
|
115
|
-
};
|
|
116
|
-
/** The limits an agent's owner sets on its sessions' overrides. A session
|
|
117
|
-
* may always narrow its MCP servers and disallow tools. */
|
|
118
|
-
export type AgentSessionOverrideLimits = {
|
|
119
|
-
/** The models a session may name; absent, any. */
|
|
120
|
-
models?: string[];
|
|
121
|
-
/** Whether a session may add to the agent's instructions (`append`, the
|
|
122
|
-
* default), also replace them (`replace`), or neither (`none`). */
|
|
123
|
-
instructions?: "append" | "replace" | "none";
|
|
124
|
-
/** The most vCPU a session may ask for; absent, the agent's `vcpu`. */
|
|
125
|
-
maxVcpu?: number;
|
|
126
|
-
/** The most memory a session may ask for; absent, the agent's `memoryMiB`. */
|
|
127
|
-
maxMemoryMiB?: number;
|
|
128
|
-
/** The most budget a session may ask for; absent, the agent's `maxSessionDollars`. */
|
|
129
|
-
maxSessionDollars?: number;
|
|
130
|
-
};
|
|
131
|
-
/** One session's own model, instructions, MCP servers, disallowed tools,
|
|
132
|
-
* size and budget, within its agent's `sessionOverrides`. Recorded on the
|
|
133
|
-
* session (`overrides`) and noted in its log. */
|
|
134
|
-
export type AgentSessionOverrides = {
|
|
135
|
-
/** The model the harness runs for this session. */
|
|
136
|
-
model?: string;
|
|
137
|
-
/** Added after the agent's instructions, or in their place with
|
|
138
|
-
* `instructionsMode: "replace"`; at most 64 KiB with the agent's. */
|
|
139
|
-
instructions?: string;
|
|
140
|
-
/** `append` (the default) or `replace`. */
|
|
141
|
-
instructionsMode?: "append" | "replace";
|
|
142
|
-
/** Names of the agent's MCP servers this session keeps; `[]` keeps none. */
|
|
143
|
-
mcp?: string[];
|
|
144
|
-
/** Tools the harness may not use: Runtime's own (`spawn`, `pr`, `ask`,
|
|
145
|
-
* `remember`, ...; never `wait`, `reply` or `done`) and the harness's
|
|
146
|
-
* (Claude Code's `Bash` or `mcp__github`, Gemini CLI's `run_shell_command`). */
|
|
147
|
-
disallowedTools?: string[];
|
|
148
|
-
/** At most the agent's `sessionOverrides.maxVcpu`, else its own `vcpu`. */
|
|
149
|
-
vcpu?: number;
|
|
150
|
-
/** At most the agent's `sessionOverrides.maxMemoryMiB`, else its own. */
|
|
151
|
-
memoryMiB?: number;
|
|
152
|
-
/** This session's budget, its subagents included; at most the agent's
|
|
153
|
-
* `sessionOverrides.maxSessionDollars`, else its own. */
|
|
154
|
-
maxSessionDollars?: number;
|
|
155
|
-
};
|
|
156
|
-
/** always_allow: the call runs. always_ask: it waits for a person's Allow or
|
|
157
|
-
* Deny. auto: Runtime reads the call and runs it, refuses it (high_risk) or
|
|
158
|
-
* holds it for a person (indeterminate). */
|
|
159
|
-
export type AgentPermissionPolicy = "always_allow" | "always_ask" | "auto";
|
|
160
|
-
export type AgentPermissions = {
|
|
161
|
-
/** Default always_allow. */
|
|
162
|
-
default?: AgentPermissionPolicy;
|
|
163
|
-
/** By the most particular name that matches: the harness's own tool name
|
|
164
|
-
* (Bash, Edit, apply_patch, run_shell_command, mcp__github__create_issue),
|
|
165
|
-
* an MCP server (mcp:github), or a family (shell, edit, read, web, mcp). */
|
|
166
|
-
tools?: Record<string, AgentPermissionPolicy>;
|
|
167
|
-
};
|
|
168
|
-
export type AgentAdvisor = {
|
|
169
|
-
/** claude-opus-5-5, gpt-5.5, gemini-3-pro, or an OpenRouter name. */
|
|
170
|
-
model: string;
|
|
171
|
-
/** Read from the model's name when left out. */
|
|
172
|
-
provider?: "anthropic" | "openai" | "google" | "openrouter" | "openai-compatible";
|
|
173
|
-
/** The egress secret its key is, which must be in `secrets` or `pool`;
|
|
174
|
-
* the provider's usual one when left out (ANTHROPIC_API_KEY, ...). */
|
|
175
|
-
secret?: string;
|
|
176
|
-
/** An OpenAI-compatible endpoint, or another host for the provider's API. */
|
|
177
|
-
baseUrl?: string;
|
|
178
|
-
/** Advice a session may ask for: 1 to 200, default 20. */
|
|
179
|
-
maxCalls?: number;
|
|
180
|
-
/** The advisor's standing words, at most 16 KiB. */
|
|
181
|
-
instructions?: string;
|
|
182
|
-
};
|
|
183
|
-
export type Agent = {
|
|
184
|
-
id: string;
|
|
185
|
-
name: string;
|
|
186
|
-
version: number;
|
|
187
|
-
/** With its defaults written in. */
|
|
188
|
-
definition: AgentDefinition;
|
|
189
|
-
labels: Record<string, string>;
|
|
190
|
-
/** `subscription_for_customers`: its secrets name CLAUDE_CODE_OAUTH_TOKEN
|
|
191
|
-
* and it is set up to answer your customers (`template: "support"`). A
|
|
192
|
-
* subscription is for your own team's agents; an agent that serves your
|
|
193
|
-
* customers uses an API key. */
|
|
194
|
-
warnings: "subscription_for_customers"[];
|
|
195
|
-
createdAt: string;
|
|
196
|
-
updatedAt: string;
|
|
197
|
-
};
|
|
198
|
-
export type AgentSessionState = "queued" | "running" | "waiting" | "done" | "failed" | "stopped";
|
|
199
|
-
/** One session. Subagents' parentSessionId and rootSessionId, its cost and
|
|
200
|
-
* treeCost, historyBytes and attachmentBytes join it as the API gains
|
|
201
|
-
* them. */
|
|
202
|
-
export type AgentSession = {
|
|
203
|
-
id: string;
|
|
204
|
-
agentId: string;
|
|
205
|
-
agentVersion: number;
|
|
206
|
-
key: string | null;
|
|
207
|
-
trigger: "api" | AgentTriggerKind;
|
|
208
|
-
state: AgentSessionState;
|
|
209
|
-
/** Why it ended. */
|
|
210
|
-
reason: string | null;
|
|
211
|
-
/** What the agent said it ended with: a pull request's address, an answer. */
|
|
212
|
-
result: string | null;
|
|
213
|
-
sandboxId: string | null;
|
|
214
|
-
lastSeq: number;
|
|
215
|
-
labels: Record<string, string>;
|
|
216
|
-
/** What its start overrode of its agent's definition, as given; null,
|
|
217
|
-
* nothing. */
|
|
218
|
-
overrides: AgentSessionOverrides | null;
|
|
219
|
-
/** The workflow it is a step of, or null. */
|
|
220
|
-
workflowId: string | null;
|
|
221
|
-
createdAt: string;
|
|
222
|
-
startedAt: string | null;
|
|
223
|
-
endedAt: string | null;
|
|
224
|
-
};
|
|
225
|
-
export type AgentEvent = {
|
|
226
|
-
seq: number;
|
|
227
|
-
/** turn and tool: a model turn and a tool call of the session's trace,
|
|
228
|
-
* the span in body (`AgentTurn`, `AgentToolCall`). tool_call: one call
|
|
229
|
-
* the harness made under the agent's permissions, body {text, tool,
|
|
230
|
-
* input, toolUseId, evaluatedPermission, evaluation, askId}. */
|
|
231
|
-
kind: "input" | "answer" | "reply" | "ask" | "status" | "result" | "error" | "note" | "child" | "turn" | "tool" | "tool_call";
|
|
232
|
-
/** A key's principal id, slack:<user>, github:<login>, agent (the
|
|
233
|
-
* harness) or runtime. */
|
|
234
|
-
actor: string;
|
|
235
|
-
/** Words are body.text. */
|
|
236
|
-
body: {
|
|
237
|
-
text?: string;
|
|
238
|
-
} & Record<string, unknown>;
|
|
239
|
-
createdAt: string;
|
|
240
|
-
};
|
|
241
|
-
/** Token counts and their cost at the provider's list price, in USD. */
|
|
242
|
-
export type AgentTokens = {
|
|
243
|
-
/** Input tokens not read from or written to the prompt cache. */
|
|
244
|
-
inputTokens: number;
|
|
245
|
-
outputTokens: number;
|
|
246
|
-
cacheReadTokens: number;
|
|
247
|
-
cacheWriteTokens: number;
|
|
248
|
-
costUsd: number;
|
|
249
|
-
};
|
|
250
|
-
/** One model request the session's harness made. */
|
|
251
|
-
export type AgentTurn = Omit<AgentTokens, "costUsd"> & {
|
|
252
|
-
seq: number;
|
|
253
|
-
kind: "turn";
|
|
254
|
-
/** 16 hex digits; a tool call's `turn` names it. */
|
|
255
|
-
id: string;
|
|
256
|
-
provider: "anthropic" | "openai" | "google" | "other";
|
|
257
|
-
model: string;
|
|
258
|
-
startedAt: string;
|
|
259
|
-
durationMs: number;
|
|
260
|
-
/** Until the first bytes of the answer. */
|
|
261
|
-
firstTokenMs: number | null;
|
|
262
|
-
/** null for a model with no list price known. */
|
|
263
|
-
costUsd: number | null;
|
|
264
|
-
stopReason: string | null;
|
|
265
|
-
/** The model API's HTTP status. */
|
|
266
|
-
status: number;
|
|
267
|
-
error: string | null;
|
|
268
|
-
toolCalls: {
|
|
269
|
-
id: string;
|
|
270
|
-
name: string;
|
|
271
|
-
}[];
|
|
272
|
-
};
|
|
273
|
-
/** One tool call: from the turn that asked for it to the request that
|
|
274
|
-
* carried its result back. */
|
|
275
|
-
export type AgentToolCall = {
|
|
276
|
-
seq: number;
|
|
277
|
-
kind: "tool";
|
|
278
|
-
id: string;
|
|
279
|
-
name: string;
|
|
280
|
-
turn: string | null;
|
|
281
|
-
startedAt: string;
|
|
282
|
-
durationMs: number;
|
|
283
|
-
/** The call's input and output, each at most 2,000 characters. */
|
|
284
|
-
input: string;
|
|
285
|
-
output: string;
|
|
286
|
-
error: boolean;
|
|
287
|
-
};
|
|
288
|
-
/** A page of a session's trace: the whole session's totals, by model and
|
|
289
|
-
* by tool, and up to `limit` spans after `after`. Read the next page with
|
|
290
|
-
* `after: nextAfter` until it is null. */
|
|
291
|
-
export type AgentTrace = {
|
|
292
|
-
sessionId: string;
|
|
293
|
-
totals: AgentTokens & {
|
|
294
|
-
turns: number;
|
|
295
|
-
toolCalls: number;
|
|
296
|
-
unpricedTurns: number;
|
|
297
|
-
failedTurns: number;
|
|
298
|
-
failedToolCalls: number;
|
|
299
|
-
modelMs: number;
|
|
300
|
-
toolMs: number;
|
|
301
|
-
};
|
|
302
|
-
models: (AgentTokens & {
|
|
303
|
-
model: string;
|
|
304
|
-
provider: string;
|
|
305
|
-
turns: number;
|
|
306
|
-
unpricedTurns: number;
|
|
307
|
-
})[];
|
|
308
|
-
tools: {
|
|
309
|
-
name: string;
|
|
310
|
-
calls: number;
|
|
311
|
-
failed: number;
|
|
312
|
-
durationMs: number;
|
|
313
|
-
}[];
|
|
314
|
-
spans: (AgentTurn | AgentToolCall)[];
|
|
315
|
-
/** The seq to read the next page after; null when the log held no more. */
|
|
316
|
-
nextAfter: number | null;
|
|
317
|
-
};
|
|
318
|
-
/** OTLP/JSON: an ExportTraceServiceRequest of one page, to POST to a
|
|
319
|
-
* collector's /v1/traces; the first page holds the session's root span. */
|
|
320
|
-
export type AgentTraceOtlp = {
|
|
321
|
-
resourceSpans: Record<string, unknown>[];
|
|
322
|
-
nextAfter: number | null;
|
|
323
|
-
};
|
|
324
|
-
/** Which page of a trace: spans after `after` (0 by default), at most
|
|
325
|
-
* `limit` (200 by default, 500 at most). */
|
|
326
|
-
export type AgentTracePage = {
|
|
327
|
-
after?: number;
|
|
328
|
-
limit?: number;
|
|
329
|
-
};
|
|
330
|
-
export type AgentAskState = "open" | "answered" | "expired" | "withdrawn" | "closed";
|
|
331
|
-
/** One row of the account's inbox: a question a session's harness needs
|
|
332
|
-
* answered to go on. Asks of one agent's sessions sharing a memory, with the same `step` are
|
|
333
|
-
* one row while it is open, and one answer reaches every session asking. */
|
|
334
|
-
export type AgentAsk = {
|
|
335
|
-
id: string;
|
|
336
|
-
/** The agent of the session that asked first. */
|
|
337
|
-
agentId: string;
|
|
338
|
-
/** What it waits on, in the asker's words. */
|
|
339
|
-
step: string | null;
|
|
340
|
-
question: string;
|
|
341
|
-
/** Why it matters. */
|
|
342
|
-
why: string | null;
|
|
343
|
-
options: {
|
|
344
|
-
label: string;
|
|
345
|
-
detail?: string;
|
|
346
|
-
}[];
|
|
347
|
-
/** The recommended option's label; taken as the answer when it expires. */
|
|
348
|
-
pick: string | null;
|
|
349
|
-
/** Who sees it: its agent's labels with the ask's own over them. */
|
|
350
|
-
labels: Record<string, string>;
|
|
351
|
-
state: AgentAskState;
|
|
352
|
-
/** An option's label and/or words; `expired` when the pick was taken at
|
|
353
|
-
* expiry. */
|
|
354
|
-
answer: {
|
|
355
|
-
option?: string;
|
|
356
|
-
text?: string;
|
|
357
|
-
expired?: boolean;
|
|
358
|
-
} | null;
|
|
359
|
-
/** A key's principal id, or `runtime` for a pick taken at expiry. */
|
|
360
|
-
answeredBy: string | null;
|
|
361
|
-
/** The sessions asking it, each with its ask event's seq and the answer
|
|
362
|
-
* event that woke it. */
|
|
363
|
-
sessions: {
|
|
364
|
-
sessionId: string;
|
|
365
|
-
state: "asking" | "answered" | "expired" | "withdrawn" | "ended";
|
|
366
|
-
seq: number;
|
|
367
|
-
answerSeq: number | null;
|
|
368
|
-
}[];
|
|
369
|
-
expiresAt: string | null;
|
|
370
|
-
createdAt: string;
|
|
371
|
-
updatedAt: string;
|
|
372
|
-
closedAt: string | null;
|
|
373
|
-
/** The tool call it holds, answered Allow or Deny; null for any other ask. */
|
|
374
|
-
toolCall: AgentAskToolCall | null;
|
|
375
|
-
};
|
|
376
|
-
/** A tool call the agent's permissions hold for a person. */
|
|
377
|
-
export type AgentAskToolCall = {
|
|
378
|
-
/** The harness's name for it: Bash, apply_patch, mcp__github__create_issue. */
|
|
379
|
-
tool: string;
|
|
380
|
-
input: Record<string, unknown>;
|
|
381
|
-
toolUseId?: string;
|
|
382
|
-
/** Its tool_call event in the session's log. */
|
|
383
|
-
seq?: number;
|
|
384
|
-
policy: "always_ask" | "auto";
|
|
385
|
-
/** Why auto held it: indeterminate. */
|
|
386
|
-
reasonCode?: string;
|
|
387
|
-
};
|
|
388
|
-
export type ListAgentAsks = {
|
|
389
|
-
/** Open by default. */
|
|
390
|
-
state?: AgentAskState[];
|
|
391
|
-
agent?: string;
|
|
392
|
-
/** Asks carrying every one of these labels: who sees an ask. */
|
|
393
|
-
labels?: Record<string, string>;
|
|
394
|
-
cursor?: string;
|
|
395
|
-
limit?: number;
|
|
396
|
-
};
|
|
397
|
-
/** An option's label, words, or both. */
|
|
398
|
-
export type AnswerAgentAsk = {
|
|
399
|
-
option?: string;
|
|
400
|
-
text?: string;
|
|
401
|
-
};
|
|
402
|
-
export type AgentTriggerKind = "slack" | "github" | "schedule" | "webhook";
|
|
403
|
-
/** The link that adds Runtime's Slack app to a workspace. */
|
|
404
|
-
export type SlackInstallLink = {
|
|
405
|
-
url: string;
|
|
406
|
-
expiresAt: string;
|
|
407
|
-
};
|
|
408
|
-
/** A Slack workspace added to the account: its id is a slack trigger's `team`. */
|
|
409
|
-
export type SlackTeam = {
|
|
410
|
-
team: string;
|
|
411
|
-
name: string | null;
|
|
412
|
-
botUser: string;
|
|
413
|
-
installedAt: string;
|
|
414
|
-
};
|
|
415
|
-
/** A trigger's rules, each optional. */
|
|
416
|
-
export type AgentTriggerRules = {
|
|
417
|
-
/** Queue order of its sessions when the agent's maxConcurrent is full:
|
|
418
|
-
* -100 to 100, higher first, then oldest. Default 0. */
|
|
419
|
-
priority?: number;
|
|
420
|
-
/** Sessions it may start in an hour; a call past it is held for you.
|
|
421
|
-
* Joining an open session is never capped. Default none. */
|
|
422
|
-
maxStartsPerHour?: number;
|
|
423
|
-
/** A call whose key's last session has ended: "start" a new one (the
|
|
424
|
-
* default), "note" it in the ended session's log and run nothing, or
|
|
425
|
-
* "ask" you (the call is held until you start it). */
|
|
426
|
-
onEnded?: "start" | "note" | "ask";
|
|
427
|
-
/** Where a held call is told: "email" to who added the trigger (the
|
|
428
|
-
* default), or "webhook", the account's webhooks' agent.call.held alone. */
|
|
429
|
-
notify?: "email" | "webhook";
|
|
430
|
-
/** A webhook's only: the key of a call that sends none, from its JSON's
|
|
431
|
-
* fields: "{cause}", "{alert.host}:{check}". */
|
|
432
|
-
key?: string;
|
|
433
|
-
};
|
|
434
|
-
export type AgentTrigger = {
|
|
435
|
-
id: string;
|
|
436
|
-
agentId: string;
|
|
437
|
-
kind: AgentTriggerKind;
|
|
438
|
-
config: Record<string, unknown>;
|
|
439
|
-
rules: AgentTriggerRules;
|
|
440
|
-
pausedAt: string | null;
|
|
441
|
-
pausedWhy: string | null;
|
|
442
|
-
createdAt: string;
|
|
443
|
-
/** When it last changed: made, paused or resumed. */
|
|
444
|
-
updatedAt: string;
|
|
445
|
-
/** A webhook's secret, which each of its calls carries: answered once,
|
|
446
|
-
* when it is added, and never again. Keep it where you keep your keys. */
|
|
447
|
-
secret?: string;
|
|
448
|
-
};
|
|
449
|
-
export type CreateAgent = {
|
|
450
|
-
name: string;
|
|
451
|
-
definition: AgentDefinition;
|
|
452
|
-
labels?: Record<string, string>;
|
|
453
|
-
};
|
|
454
|
-
export type StartAgentSession = {
|
|
455
|
-
input: string;
|
|
456
|
-
/** Words with the same key join its open session: a Slack thread, a pull
|
|
457
|
-
* request, one of your customers (`customer:42`). */
|
|
458
|
-
key?: string;
|
|
459
|
-
labels?: Record<string, string>;
|
|
460
|
-
/** This session's own model, instructions, MCP servers, disallowed tools,
|
|
461
|
-
* size and budget, within the agent's `sessionOverrides`: one it does not
|
|
462
|
-
* allow is refused (`permission_denied`, naming what it allows). Words
|
|
463
|
-
* that join an open session carry its own overrides or none (else
|
|
464
|
-
* `conflict`). */
|
|
465
|
-
overrides?: AgentSessionOverrides;
|
|
466
|
-
};
|
|
467
|
-
export type CreateAgentTrigger = ({
|
|
468
|
-
kind: "slack";
|
|
469
|
-
config: {
|
|
470
|
-
team: string;
|
|
471
|
-
channel: string;
|
|
472
|
-
};
|
|
473
|
-
} | {
|
|
474
|
-
kind: "github";
|
|
475
|
-
config: {
|
|
476
|
-
installation: number;
|
|
477
|
-
repository: string;
|
|
478
|
-
events?: string[];
|
|
479
|
-
};
|
|
480
|
-
} | {
|
|
481
|
-
kind: "schedule";
|
|
482
|
-
config: {
|
|
483
|
-
cron: string;
|
|
484
|
-
timezone?: string;
|
|
485
|
-
input: string;
|
|
486
|
-
};
|
|
487
|
-
} | {
|
|
488
|
-
kind: "webhook";
|
|
489
|
-
config: Record<string, never>;
|
|
490
|
-
}) & {
|
|
491
|
-
rules?: AgentTriggerRules;
|
|
492
|
-
};
|
|
493
|
-
/** One call to a webhook trigger: its words, and the key and labels of the
|
|
494
|
-
* session it starts or joins. */
|
|
495
|
-
export type AgentTriggerCall = {
|
|
496
|
-
text: string;
|
|
497
|
-
key?: string;
|
|
498
|
-
labels?: Record<string, string>;
|
|
499
|
-
};
|
|
500
|
-
/** What a call did: started a session, joined its key's open one, was
|
|
501
|
-
* noted in its key's ended one, or was held for you (`why`). */
|
|
502
|
-
export type AgentTriggerCallOutcome = {
|
|
503
|
-
outcome: "started" | "joined" | "noted" | "held";
|
|
504
|
-
sessionId: string | null;
|
|
505
|
-
seq: number | null;
|
|
506
|
-
callId: string | null;
|
|
507
|
-
why: AgentHeldCall["why"] | null;
|
|
508
|
-
replayed: boolean;
|
|
509
|
-
};
|
|
510
|
-
/** A call a trigger held for you because no session could take it. None is
|
|
511
|
-
* ever dropped. */
|
|
512
|
-
export type AgentHeldCall = {
|
|
513
|
-
id: string;
|
|
514
|
-
triggerId: string;
|
|
515
|
-
agentId: string;
|
|
516
|
-
key: string | null;
|
|
517
|
-
text: string;
|
|
518
|
-
labels: Record<string, string>;
|
|
519
|
-
/** The trigger was paused; it had started maxStartsPerHour sessions this
|
|
520
|
-
* hour; its key's session had ended and onEnded is "ask"; the agent's day
|
|
521
|
-
* budget was spent; the account's sessions were at their limit; Agents
|
|
522
|
-
* was closed to the account. */
|
|
523
|
-
why: "paused" | "rate" | "ended" | "budget" | "quota" | "closed";
|
|
524
|
-
state: "held" | "started" | "dismissed";
|
|
525
|
-
sessionId: string | null;
|
|
526
|
-
notify: "email" | "webhook";
|
|
527
|
-
createdAt: string;
|
|
528
|
-
resolvedAt: string | null;
|
|
529
|
-
};
|
|
530
|
-
/** The harnesses' names, so `templates["claude-code"]` is known to be there. */
|
|
531
|
-
export type AgentTemplateKey = "claude-code" | "codex" | "gemini-cli" | "claude-agent-sdk" | "openai-agents-sdk" | "review" | "judge" | "browser";
|
|
532
|
-
/** A file of an agent's memory (`memory.list`). `scope` is whose: empty for
|
|
533
|
-
* the shared memory, which every session reads (one keeping memory per key
|
|
534
|
-
* reads what you wrote there, and never changes it), or a session key
|
|
535
|
-
* (`customer:42`) for that key's alone. */
|
|
536
|
-
export type AgentMemoryEntry = {
|
|
537
|
-
scope: string;
|
|
538
|
-
path: string;
|
|
539
|
-
/** Its text and path, in bytes, as billed. */
|
|
540
|
-
bytes: number;
|
|
541
|
-
updatedAt: string;
|
|
542
|
-
/** A key's principal id, or session:<id> when the agent wrote it. */
|
|
543
|
-
updatedBy: string;
|
|
544
|
-
};
|
|
545
|
-
export type AgentMemoryFile = AgentMemoryEntry & {
|
|
546
|
-
content: string;
|
|
547
|
-
};
|
|
548
|
-
export type AgentMemoryHit = {
|
|
549
|
-
scope: string;
|
|
550
|
-
path: string;
|
|
551
|
-
/** Its words around the match, matches in **bold**. */
|
|
552
|
-
snippet: string;
|
|
553
|
-
/** Higher is better. */
|
|
554
|
-
rank: number;
|
|
555
|
-
bytes: number;
|
|
556
|
-
updatedAt: string;
|
|
557
|
-
};
|
|
558
|
-
export type AgentMemoryWritten = {
|
|
559
|
-
scope: string;
|
|
560
|
-
path: string;
|
|
561
|
-
bytes: number;
|
|
562
|
-
/** True for a new file, false for one replaced. */
|
|
563
|
-
created: boolean;
|
|
564
|
-
updatedAt: string;
|
|
565
|
-
};
|
|
566
|
-
/** The agent's whole memory, every scope: what storage is billed on. */
|
|
567
|
-
export type AgentMemoryUsage = {
|
|
568
|
-
bytes: number;
|
|
569
|
-
files: number;
|
|
570
|
-
limitBytes: number;
|
|
571
|
-
limitFiles: number;
|
|
572
|
-
};
|
|
573
|
-
export type AgentMemoryPage = Page<AgentMemoryEntry> & {
|
|
574
|
-
readonly usage: AgentMemoryUsage;
|
|
575
|
-
};
|
|
576
|
-
/** A harness, as data (packages/cloud-guide/agent-templates.json, the same
|
|
577
|
-
* in every SDK and the guide). `definition` is what an agent's definition
|
|
578
|
-
* takes from it; add a use's (`uses`) and your instructions. */
|
|
579
|
-
export type AgentTemplate = {
|
|
580
|
-
key: AgentTemplateKey;
|
|
581
|
-
title: string;
|
|
582
|
-
command: string;
|
|
583
|
-
/** The egress secret its API key is stored as, and the host it is for. */
|
|
584
|
-
apiKeySecret: string;
|
|
585
|
-
apiKeyHost: string;
|
|
586
|
-
/** How your own subscription logs it in, for your own team's agents, or
|
|
587
|
-
* null when it takes an API key alone. */
|
|
588
|
-
subscription: string | null;
|
|
589
|
-
definition: Pick<AgentDefinition, "secrets" | "pool" | "vcpu" | "memoryMiB" | "maxSessionSeconds"> & {
|
|
590
|
-
command: string;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
/** A use: what an agent is for, merged into a template's definition. */
|
|
594
|
-
export type AgentUse = {
|
|
595
|
-
key: "support" | "team";
|
|
596
|
-
title: string;
|
|
597
|
-
/** How its sessions are keyed: the key your app passes per customer, or
|
|
598
|
-
* none. */
|
|
599
|
-
sessionKey: string | null;
|
|
600
|
-
triggers: ("api" | AgentTriggerKind)[];
|
|
601
|
-
definition: Partial<AgentDefinition> & {
|
|
602
|
-
template: "support" | "team";
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
/** The harnesses (agents-contract.md); tests/agents.test.ts holds them
|
|
606
|
-
* to packages/cloud-guide/agent-templates.json. */
|
|
607
|
-
export declare const AGENT_TEMPLATES: Readonly<Record<AgentTemplateKey, AgentTemplate>>;
|
|
608
|
-
/** A harness by a key read from a file or a flag, or undefined. */
|
|
609
|
-
export declare function agentTemplate(key: string): AgentTemplate | undefined;
|
|
610
|
-
export declare const AGENT_USES: Readonly<Record<"support" | "team", AgentUse>>;
|
|
611
|
-
/** One phase of a workflow. */
|
|
612
|
-
export type AgentWorkflowPhase = {
|
|
613
|
-
/** A letter, then letters, digits, _ or -; {{<name>}} reads its results. */
|
|
614
|
-
name: string;
|
|
615
|
-
/** Its sessions' agent, by id or name; the workflow's when left out. */
|
|
616
|
-
agent?: string;
|
|
617
|
-
/** Each session's first words: {{input}}, {{item}}, {{index}} (1-based)
|
|
618
|
-
* and {{<earlier phase>}} (its results, numbered) are filled in. */
|
|
619
|
-
input: string;
|
|
620
|
-
/** A list to fan out over (1 to 1000 items, one session each), or an
|
|
621
|
-
* earlier phase's results split: `json`, the JSON array in each result;
|
|
622
|
-
* `lines`, its non-empty lines. Absent: one session. */
|
|
623
|
-
each?: unknown[] | {
|
|
624
|
-
from: string;
|
|
625
|
-
split?: "json" | "lines";
|
|
626
|
-
};
|
|
627
|
-
/** With `each.from`: start each item the moment its source session ends. */
|
|
628
|
-
pipeline?: boolean;
|
|
629
|
-
};
|
|
630
|
-
/** Many sessions in phases, as one piece of work. */
|
|
631
|
-
export type RunAgentWorkflow = {
|
|
632
|
-
name?: string;
|
|
633
|
-
/** The agent of every phase that names none. */
|
|
634
|
-
agent?: string;
|
|
635
|
-
/** What {{input}} is. */
|
|
636
|
-
input?: string;
|
|
637
|
-
labels?: Record<string, string>;
|
|
638
|
-
/** Sessions it may start in all: 1 to 1000, default 100. */
|
|
639
|
-
maxSessions?: number;
|
|
640
|
-
/** Its sessions open at once: 1 to 200, default 20. */
|
|
641
|
-
maxConcurrent?: number;
|
|
642
|
-
/** What it may cost in all, in dollars: default 10. */
|
|
643
|
-
maxDollars?: number;
|
|
644
|
-
phases: AgentWorkflowPhase[];
|
|
645
|
-
};
|
|
646
|
-
export type AgentWorkflowState = "running" | "done" | "failed" | "stopped";
|
|
647
|
-
export type AgentWorkflow = {
|
|
648
|
-
id: string;
|
|
649
|
-
name: string | null;
|
|
650
|
-
state: AgentWorkflowState;
|
|
651
|
-
/** Why it ended: done, steps_failed, max_sessions, budget, stopped,
|
|
652
|
-
* parent_ended, quota, subagent_quota, agent_gone, permission_denied. */
|
|
653
|
-
reason: string | null;
|
|
654
|
-
/** Its last phase's result: one session's as it is, several as a JSON
|
|
655
|
-
* array of their results. */
|
|
656
|
-
result: string | null;
|
|
657
|
-
/** The session that ran it from inside its sandbox, or null. */
|
|
658
|
-
parentSessionId: string | null;
|
|
659
|
-
spec: RunAgentWorkflow;
|
|
660
|
-
maxSessions: number;
|
|
661
|
-
maxConcurrent: number;
|
|
662
|
-
maxDollars: number;
|
|
663
|
-
/** Sessions it has started. */
|
|
664
|
-
started: number;
|
|
665
|
-
/** Raised at every change. */
|
|
666
|
-
version: number;
|
|
667
|
-
labels: Record<string, string>;
|
|
668
|
-
phases: {
|
|
669
|
-
name: string;
|
|
670
|
-
agentId: string;
|
|
671
|
-
/** Items known so far; final once `ready`. */
|
|
672
|
-
total: number;
|
|
673
|
-
ready: boolean;
|
|
674
|
-
pending: number;
|
|
675
|
-
running: number;
|
|
676
|
-
done: number;
|
|
677
|
-
/** Failed, stopped or skipped. */
|
|
678
|
-
failed: number;
|
|
679
|
-
}[];
|
|
680
|
-
cost: {
|
|
681
|
-
dollars: number;
|
|
682
|
-
vcpuSeconds: number;
|
|
683
|
-
gibSeconds: number;
|
|
684
|
-
};
|
|
685
|
-
createdAt: string;
|
|
686
|
-
updatedAt: string;
|
|
687
|
-
endedAt: string | null;
|
|
688
|
-
};
|
|
689
|
-
export type AgentWorkflowStep = {
|
|
690
|
-
phase: string;
|
|
691
|
-
item: number;
|
|
692
|
-
/** What {{item}} was. */
|
|
693
|
-
itemText: string | null;
|
|
694
|
-
state: "pending" | "running" | "done" | "failed" | "stopped" | "skipped";
|
|
695
|
-
reason: string | null;
|
|
696
|
-
/** What its session ended with. */
|
|
697
|
-
result: string | null;
|
|
698
|
-
sessionId: string | null;
|
|
699
|
-
createdAt: string;
|
|
700
|
-
startedAt: string | null;
|
|
701
|
-
endedAt: string | null;
|
|
702
|
-
};
|
|
703
|
-
/** One workflow, to follow and stop. */
|
|
704
|
-
export type AgentWorkflowHandle = {
|
|
705
|
-
readonly id: string;
|
|
706
|
-
/** The workflow as it was when run or read. */
|
|
707
|
-
readonly workflow: AgentWorkflow;
|
|
708
|
-
/** The workflow at each change, as it happens, until it has ended. */
|
|
709
|
-
follow(options?: {
|
|
710
|
-
after?: number;
|
|
711
|
-
signal?: AbortSignal;
|
|
712
|
-
}): AsyncGenerator<AgentWorkflow>;
|
|
713
|
-
/** Until it has ended; answers it then, with its result. */
|
|
714
|
-
wait(options?: {
|
|
715
|
-
signal?: AbortSignal;
|
|
716
|
-
}): Promise<AgentWorkflow>;
|
|
717
|
-
/** Its steps in phase and item order. */
|
|
718
|
-
steps(query?: {
|
|
719
|
-
state?: AgentWorkflowStep["state"][];
|
|
720
|
-
limit?: number;
|
|
721
|
-
}, options?: RequestOptions): Promise<Page<AgentWorkflowStep>>;
|
|
722
|
-
stop(options?: RequestOptions): Promise<AgentWorkflow>;
|
|
723
|
-
get(options?: RequestOptions): Promise<AgentWorkflow>;
|
|
724
|
-
};
|
|
725
|
-
/** One session, to talk to and follow. */
|
|
726
|
-
export type AgentSessionHandle = {
|
|
727
|
-
readonly id: string;
|
|
728
|
-
/** The session as it was when started or read. */
|
|
729
|
-
readonly session: AgentSession;
|
|
730
|
-
/** Whether the start's words joined a session already open with its key. */
|
|
731
|
-
readonly joined: boolean;
|
|
732
|
-
/** The seq of the words that started or joined it. */
|
|
733
|
-
readonly seq: number;
|
|
734
|
-
/** Words in; answers their seq. */
|
|
735
|
-
send(text: string, options?: RequestOptions): Promise<{
|
|
736
|
-
seq: number;
|
|
737
|
-
}>;
|
|
738
|
-
/** Its log after `after` (0 by default), each event as it comes, waiting
|
|
739
|
-
* up to 30 seconds a call; ends when the session has ended. */
|
|
740
|
-
events(options?: {
|
|
741
|
-
after?: number;
|
|
742
|
-
signal?: AbortSignal;
|
|
743
|
-
}): AsyncGenerator<AgentEvent>;
|
|
744
|
-
stop(options?: RequestOptions): Promise<AgentSession>;
|
|
745
|
-
/** A page of its trace: every model turn and tool call, with timing,
|
|
746
|
-
* tokens and cost, and the session's totals; `{ format: "otlp" }` for
|
|
747
|
-
* OpenTelemetry traces. */
|
|
748
|
-
trace(options?: RequestOptions & AgentTracePage): Promise<AgentTrace>;
|
|
749
|
-
trace(options: RequestOptions & AgentTracePage & {
|
|
750
|
-
format: "otlp";
|
|
751
|
-
}): Promise<AgentTraceOtlp>;
|
|
752
|
-
/** Until it has ended; answers it then. */
|
|
753
|
-
wait(options?: {
|
|
754
|
-
signal?: AbortSignal;
|
|
755
|
-
}): Promise<AgentSession>;
|
|
756
|
-
get(options?: RequestOptions): Promise<AgentSession>;
|
|
757
|
-
};
|
|
758
|
-
export declare function agents(t: Transport): {
|
|
759
|
-
/** Claude Managed Agents' API on Runtime: the options Anthropic's SDK
|
|
760
|
-
* takes, so code written for it runs here unchanged:
|
|
761
|
-
* `new Anthropic(await runtime.agents.anthropic())`. */
|
|
762
|
-
anthropic: () => Promise<{
|
|
763
|
-
baseURL: string;
|
|
764
|
-
apiKey: string;
|
|
765
|
-
}>;
|
|
766
|
-
/** An agent: a name and a definition its sessions start from. */
|
|
767
|
-
create: (input: CreateAgent, options?: RequestOptions) => Promise<Agent>;
|
|
768
|
-
/** By its id or its name. */
|
|
769
|
-
get: (agent: string, options?: RequestOptions) => Promise<Agent>;
|
|
770
|
-
/** Your agents, oldest first. Await for a page, or `for await` for all. */
|
|
771
|
-
list: (query?: {
|
|
772
|
-
cursor?: string;
|
|
773
|
-
limit?: number;
|
|
774
|
-
}, options?: RequestOptions) => Promise<Page<Agent>>;
|
|
775
|
-
/** A new version of the definition, whole; sessions already started keep theirs. */
|
|
776
|
-
update: (agent: string, definition: AgentDefinition, options?: RequestOptions) => Promise<Agent>;
|
|
777
|
-
/** Its triggers go and its open sessions stop. */
|
|
778
|
-
delete: (agent: string, options?: RequestOptions) => Promise<void>;
|
|
779
|
-
/** A session with its first words, or the open one with the same key joined. */
|
|
780
|
-
start(agent: string, input: StartAgentSession, options?: RequestOptions): Promise<AgentSessionHandle>;
|
|
781
|
-
/** A session you already have, by its id. */
|
|
782
|
-
session(id: string, options?: RequestOptions): Promise<AgentSessionHandle>;
|
|
783
|
-
sessions: {
|
|
784
|
-
get: (id: string, options?: RequestOptions) => Promise<AgentSession>;
|
|
785
|
-
/** A session's trace: every model turn and tool call with its timing,
|
|
786
|
-
* tokens and cost, totals by model and tool; `{ format: "otlp" }` for
|
|
787
|
-
* OpenTelemetry traces in the GenAI semantic conventions. */
|
|
788
|
-
trace: {
|
|
789
|
-
(id: string, options?: RequestOptions & AgentTracePage): Promise<AgentTrace>;
|
|
790
|
-
(id: string, options: RequestOptions & AgentTracePage & {
|
|
791
|
-
format: "otlp";
|
|
792
|
-
}): Promise<AgentTraceOtlp>;
|
|
793
|
-
};
|
|
794
|
-
/** Newest first; of one agent, or in some states. */
|
|
795
|
-
list: (query?: {
|
|
796
|
-
agent?: string;
|
|
797
|
-
state?: AgentSessionState[];
|
|
798
|
-
cursor?: string;
|
|
799
|
-
limit?: number;
|
|
800
|
-
}, options?: RequestOptions) => Promise<Page<AgentSession>>;
|
|
801
|
-
/** An ended session and its log go. Its history is storage like any
|
|
802
|
-
* other, kept until you delete it; an open session is refused
|
|
803
|
-
* (`session_open`): stop it first. */
|
|
804
|
-
delete: (id: string, options?: RequestOptions) => Promise<void>;
|
|
805
|
-
};
|
|
806
|
-
/** Many sessions in phases as one piece of work: fanned out over lists
|
|
807
|
-
* or earlier results, in parallel and in pipelines, under maxSessions,
|
|
808
|
-
* maxConcurrent and maxDollars, ending with one result. The database
|
|
809
|
-
* starts each step the moment what it waits on ends; nothing else runs
|
|
810
|
-
* between steps, so a workflow costs only its sessions. */
|
|
811
|
-
workflows: {
|
|
812
|
-
/** Runs it now; answers a handle to follow, wait for and stop. */
|
|
813
|
-
run(input: RunAgentWorkflow, options?: RequestOptions): Promise<AgentWorkflowHandle>;
|
|
814
|
-
/** One you already have, by its id. */
|
|
815
|
-
workflow(id: string, options?: RequestOptions): Promise<AgentWorkflowHandle>;
|
|
816
|
-
get: (id: string, options?: RequestOptions) => Promise<AgentWorkflow>;
|
|
817
|
-
/** The workflow at each change past `after`, as it happens, until it
|
|
818
|
-
* has ended: each read waits up to 30 seconds for the next change. */
|
|
819
|
-
follow: (id: string, options?: {
|
|
820
|
-
after?: number;
|
|
821
|
-
signal?: AbortSignal;
|
|
822
|
-
}) => AsyncGenerator<AgentWorkflow>;
|
|
823
|
-
/** Newest first, each with its phases' progress and cost. */
|
|
824
|
-
list: (query?: {
|
|
825
|
-
state?: AgentWorkflowState[];
|
|
826
|
-
cursor?: string;
|
|
827
|
-
limit?: number;
|
|
828
|
-
}, options?: RequestOptions) => Promise<Page<AgentWorkflow>>;
|
|
829
|
-
steps: (id: string, query?: {
|
|
830
|
-
state?: AgentWorkflowStep["state"][];
|
|
831
|
-
cursor?: string;
|
|
832
|
-
limit?: number;
|
|
833
|
-
}, options?: RequestOptions) => Promise<Page<AgentWorkflowStep>>;
|
|
834
|
-
/** Nothing more of it starts, and its open sessions stop. */
|
|
835
|
-
stop: (id: string, options?: RequestOptions) => Promise<AgentWorkflow>;
|
|
836
|
-
};
|
|
837
|
-
/** The account's inbox: the questions its agents' sessions need answered
|
|
838
|
-
* to go on, one row per step however many sessions ask it. */
|
|
839
|
-
asks: {
|
|
840
|
-
/** Newest first; open ones unless `state` says otherwise. */
|
|
841
|
-
list: (query?: ListAgentAsks, options?: RequestOptions) => Promise<Page<AgentAsk>>;
|
|
842
|
-
get: (id: string, options?: RequestOptions) => Promise<AgentAsk>;
|
|
843
|
-
/** Every session asking it reads the answer next, and wakes. An ask no
|
|
844
|
-
* longer open is refused with `ask_closed`. */
|
|
845
|
-
answer: (id: string, answer: AnswerAgentAsk, options?: RequestOptions) => Promise<AgentAsk>;
|
|
846
|
-
/** Lets a tool call the agent's permissions held run (its ask's Allow). */
|
|
847
|
-
approve: (id: string, options?: RequestOptions) => Promise<AgentAsk>;
|
|
848
|
-
/** Keeps a held tool call from running (its ask's Deny); `message` is
|
|
849
|
-
* told to the agent as the reason. */
|
|
850
|
-
deny: (id: string, message?: string, options?: RequestOptions) => Promise<AgentAsk>;
|
|
851
|
-
};
|
|
852
|
-
/** Runtime's Slack app in your workspaces, for `slack` triggers. */
|
|
853
|
-
slack: {
|
|
854
|
-
/** A link that adds Runtime's Slack app to a workspace, good for 15
|
|
855
|
-
* minutes. Open it in a browser signed in to this account, then
|
|
856
|
-
* approve the app in Slack; Slack sends the browser back to the
|
|
857
|
-
* console once it is added. Opened by anyone outside the account, it
|
|
858
|
-
* adds nothing. */
|
|
859
|
-
install: (options?: RequestOptions) => Promise<SlackInstallLink>;
|
|
860
|
-
/** The workspaces added to this account. */
|
|
861
|
-
teams: (options?: RequestOptions) => Promise<SlackTeam[]>;
|
|
862
|
-
/** Removes a workspace: its token is revoked, and its triggers refuse
|
|
863
|
-
* events until it is added again. */
|
|
864
|
-
remove: (team: string, options?: RequestOptions) => Promise<void>;
|
|
865
|
-
};
|
|
866
|
-
triggers: {
|
|
867
|
-
create: (agent: string, input: CreateAgentTrigger, options?: RequestOptions) => Promise<AgentTrigger>;
|
|
868
|
-
list: (agent: string, options?: RequestOptions) => Promise<AgentTrigger[]>;
|
|
869
|
-
/** Held: a webhook's calls are kept for you (see `held`), saying
|
|
870
|
-
* `why`; nothing else is held. */
|
|
871
|
-
pause: (id: string, why: string, options?: RequestOptions) => Promise<AgentTrigger>;
|
|
872
|
-
resume: (id: string, options?: RequestOptions) => Promise<AgentTrigger>;
|
|
873
|
-
delete: (id: string, options?: RequestOptions) => Promise<void>;
|
|
874
|
-
/** Its rules, whole, in place: its secret stays. `{}` is every default. */
|
|
875
|
-
setRules: (id: string, rules: AgentTriggerRules, options?: RequestOptions) => Promise<AgentTrigger>;
|
|
876
|
-
/** A webhook trigger's call, as its sender makes it: by the trigger's
|
|
877
|
-
* secret, never your key. A call with the key of an open session joins
|
|
878
|
-
* it. Pass `idempotencyKey` to make a retry the same call. */
|
|
879
|
-
call: (id: string, secret: string, call: AgentTriggerCall, options?: RequestOptions) => Promise<AgentTriggerCallOutcome>;
|
|
880
|
-
/** Calls it held for you, newest first. */
|
|
881
|
-
held: (trigger: string, query?: {
|
|
882
|
-
state?: AgentHeldCall["state"][];
|
|
883
|
-
cursor?: string;
|
|
884
|
-
limit?: number;
|
|
885
|
-
}, options?: RequestOptions) => Promise<Page<AgentHeldCall>>;
|
|
886
|
-
/** Start a held call: one session with it and every call held for its
|
|
887
|
-
* key since, oldest first. */
|
|
888
|
-
startHeld: (id: string, call: string, options?: RequestOptions) => Promise<{
|
|
889
|
-
session: AgentSession;
|
|
890
|
-
joined: boolean;
|
|
891
|
-
calls: number;
|
|
892
|
-
}>;
|
|
893
|
-
/** Dismiss a held call: nothing runs. */
|
|
894
|
-
dismissHeld: (id: string, call: string, options?: RequestOptions) => Promise<AgentHeldCall>;
|
|
895
|
-
};
|
|
896
|
-
/** Its built-in memory: text files kept across sessions, which the
|
|
897
|
-
* agent reads, writes and searches from inside its sessions. A scope is
|
|
898
|
-
* whose: "" (the default) for what every session reads, or a session key
|
|
899
|
-
* ("customer:42") for that key's alone. Up to 1 MiB a file, 1 GiB and
|
|
900
|
-
* 100,000 files an agent, billed as storage. */
|
|
901
|
-
memory: {
|
|
902
|
-
/** Its files by scope and path, a page at a time, with its usage.
|
|
903
|
-
* Without scope, every scope. */
|
|
904
|
-
list: (agent: string, query?: {
|
|
905
|
-
scope?: string;
|
|
906
|
-
prefix?: string;
|
|
907
|
-
cursor?: string;
|
|
908
|
-
limit?: number;
|
|
909
|
-
}, options?: RequestOptions) => Promise<AgentMemoryPage>;
|
|
910
|
-
/** The files whose words or paths match, best first, each with a
|
|
911
|
-
* snippet: words, "a phrase", or, -not. Without scope, every scope. */
|
|
912
|
-
search: (agent: string, q: string, query?: {
|
|
913
|
-
scope?: string;
|
|
914
|
-
limit?: number;
|
|
915
|
-
}, options?: RequestOptions) => Promise<AgentMemoryHit[]>;
|
|
916
|
-
/** One file, with its text; not_found when there is none. */
|
|
917
|
-
read: (agent: string, path: string, query?: {
|
|
918
|
-
scope?: string;
|
|
919
|
-
}, options?: RequestOptions) => Promise<AgentMemoryFile>;
|
|
920
|
-
/** Seeds or replaces a file. */
|
|
921
|
-
write: (agent: string, path: string, content: string, query?: {
|
|
922
|
-
scope?: string;
|
|
923
|
-
}, options?: RequestOptions) => Promise<AgentMemoryWritten>;
|
|
924
|
-
/** Answers whether there was a file. */
|
|
925
|
-
delete: (agent: string, path: string, query?: {
|
|
926
|
-
scope?: string;
|
|
927
|
-
}, options?: RequestOptions) => Promise<boolean>;
|
|
928
|
-
};
|
|
929
|
-
/** The harnesses, as data: claude-code, codex, gemini-cli,
|
|
930
|
-
* claude-agent-sdk, openai-agents-sdk, review (a CI/CD agent step's
|
|
931
|
-
* reviewer) and judge (an agent step held to your instructions alone). */
|
|
932
|
-
templates: Readonly<Record<AgentTemplateKey, AgentTemplate>>;
|
|
933
|
-
/** The uses, as data: support (your customers) and team (your team). */
|
|
934
|
-
uses: Readonly<Record<"team" | "support", AgentUse>>;
|
|
935
|
-
};
|