eve 0.12.1 → 0.12.3

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/src/cli/commands/agent-instructions.d.ts +15 -3
  3. package/dist/src/cli/commands/agent-instructions.js +3 -1
  4. package/dist/src/cli/commands/agent-prompt/build-and-verify.md +33 -0
  5. package/dist/src/cli/commands/agent-prompt/collect-intent.md +18 -0
  6. package/dist/src/cli/commands/agent-prompt/intro-handoff.md +4 -0
  7. package/dist/src/cli/commands/agent-prompt/intro-setup.md +5 -0
  8. package/dist/src/cli/commands/agent-prompt/scaffold.md +19 -0
  9. package/dist/src/cli/commands/agent-prompt/vercel-connect.md +3 -0
  10. package/dist/src/cli/commands/init-repl.d.ts +79 -0
  11. package/dist/src/cli/commands/init-repl.js +1 -0
  12. package/dist/src/cli/commands/init.d.ts +6 -0
  13. package/dist/src/cli/commands/init.js +1 -1
  14. package/dist/src/cli/dev/tui/line-editor.d.ts +2 -0
  15. package/dist/src/cli/dev/tui/line-editor.js +2 -2
  16. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  17. package/dist/src/cli/dev/tui/setup-commands.d.ts +26 -7
  18. package/dist/src/cli/dev/tui/setup-commands.js +2 -2
  19. package/dist/src/cli/dev/tui/setup-flow.d.ts +5 -3
  20. package/dist/src/cli/dev/tui/setup-panel.d.ts +12 -7
  21. package/dist/src/cli/dev/tui/setup-panel.js +3 -3
  22. package/dist/src/cli/dev/tui/terminal-renderer.js +10 -10
  23. package/dist/src/cli/dev/tui/terminal-text.d.ts +11 -0
  24. package/dist/src/cli/dev/tui/terminal-text.js +1 -1
  25. package/dist/src/cli/run.d.ts +1 -0
  26. package/dist/src/cli/run.js +2 -2
  27. package/dist/src/cli/ui/live-row.js +1 -1
  28. package/dist/src/cli/ui/progress-pulse.d.ts +10 -0
  29. package/dist/src/cli/ui/progress-pulse.js +1 -0
  30. package/dist/src/compiled/.vendor-stamp.json +1 -1
  31. package/dist/src/compiled/@vercel/sandbox/_async-retry.d.ts +8 -0
  32. package/dist/src/compiled/@vercel/sandbox/_workflow-serde.d.ts +5 -0
  33. package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +1442 -0
  34. package/dist/src/compiled/@vercel/sandbox/api-client/api-error.d.ts +29 -0
  35. package/dist/src/compiled/@vercel/sandbox/api-client/base-client.d.ts +39 -0
  36. package/dist/src/compiled/@vercel/sandbox/api-client/file-writer.d.ts +66 -0
  37. package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +2 -0
  38. package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +878 -0
  39. package/dist/src/compiled/@vercel/sandbox/api-client/with-retry.d.ts +10 -0
  40. package/dist/src/compiled/@vercel/sandbox/auth/error.d.ts +15 -0
  41. package/dist/src/compiled/@vercel/sandbox/auth/file.d.ts +18 -0
  42. package/dist/src/compiled/@vercel/sandbox/auth/index.d.ts +6 -0
  43. package/dist/src/compiled/@vercel/sandbox/auth/oauth.d.ts +111 -0
  44. package/dist/src/compiled/@vercel/sandbox/auth/poll-for-token.d.ts +28 -0
  45. package/dist/src/compiled/@vercel/sandbox/auth/project.d.ts +40 -0
  46. package/dist/src/compiled/@vercel/sandbox/command.d.ts +290 -0
  47. package/dist/src/compiled/@vercel/sandbox/constants.d.ts +5 -0
  48. package/dist/src/compiled/@vercel/sandbox/filesystem.d.ts +258 -0
  49. package/dist/src/compiled/@vercel/sandbox/index.d.ts +10 -129
  50. package/dist/src/compiled/@vercel/sandbox/proxy.d.ts +55 -0
  51. package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +1058 -0
  52. package/dist/src/compiled/@vercel/sandbox/session.d.ts +432 -0
  53. package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +229 -0
  54. package/dist/src/compiled/@vercel/sandbox/utils/get-credentials.d.ts +21 -0
  55. package/dist/src/compiled/@vercel/sandbox/utils/paginator.d.ts +16 -0
  56. package/dist/src/compiled/@vercel/sandbox/utils/resolveSignal.d.ts +15 -0
  57. package/dist/src/compiled/@vercel/sandbox/utils/sandbox-snapshot.d.ts +11 -0
  58. package/dist/src/compiled/@vercel/sandbox/utils/types.d.ts +11 -0
  59. package/dist/src/compiled/chat/_workflow-serde.d.ts +3 -0
  60. package/dist/src/compiled/chat/index.d.ts +1 -1
  61. package/dist/src/discover/discover-agent.js +1 -1
  62. package/dist/src/evals/target.js +1 -1
  63. package/dist/src/execution/node-step.js +1 -1
  64. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  65. package/dist/src/execution/sandbox/bindings/vercel-base-runtime.d.ts +3 -3
  66. package/dist/src/execution/sandbox/bindings/vercel-create-sdk.d.ts +8 -13
  67. package/dist/src/execution/sandbox/bindings/vercel-credentials.d.ts +3 -3
  68. package/dist/src/execution/sandbox/bindings/vercel-lookup.d.ts +4 -5
  69. package/dist/src/execution/sandbox/bindings/vercel-read-stream.d.ts +5 -0
  70. package/dist/src/execution/sandbox/bindings/vercel-read-stream.js +1 -0
  71. package/dist/src/execution/sandbox/bindings/vercel-sdk-types.d.ts +5 -0
  72. package/dist/src/execution/sandbox/bindings/vercel-sdk-types.js +1 -0
  73. package/dist/src/execution/sandbox/bindings/vercel.d.ts +4 -4
  74. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  75. package/dist/src/execution/sandbox/multiplexed-command.d.ts +22 -0
  76. package/dist/src/execution/sandbox/multiplexed-command.js +1 -0
  77. package/dist/src/execution/tool-auth.d.ts +13 -3
  78. package/dist/src/execution/tool-auth.js +1 -1
  79. package/dist/src/execution/workflow-steps.js +1 -1
  80. package/dist/src/harness/tool-loop.js +1 -1
  81. package/dist/src/internal/application/package.js +1 -1
  82. package/dist/src/internal/authored-module-loader.js +2 -2
  83. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  84. package/dist/src/public/channels/slack/connections.d.ts +16 -18
  85. package/dist/src/public/channels/slack/defaults.d.ts +1 -1
  86. package/dist/src/public/channels/slack/defaults.js +1 -1
  87. package/dist/src/public/channels/slack/slackChannel.d.ts +6 -7
  88. package/dist/src/public/definitions/tool.d.ts +64 -20
  89. package/dist/src/public/sandbox/vercel-sandbox.d.ts +12 -9
  90. package/dist/src/public/tools/index.d.ts +1 -1
  91. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  92. package/dist/src/runtime/connections/validate-authorization.js +1 -1
  93. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
  94. package/dist/src/setup/ai-gateway-api-key.d.ts +15 -0
  95. package/dist/src/setup/ai-gateway-api-key.js +1 -0
  96. package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
  97. package/dist/src/setup/boxes/detect-ai-gateway.js +2 -2
  98. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  99. package/dist/src/setup/flows/channels.js +1 -1
  100. package/dist/src/setup/flows/deploy.js +1 -1
  101. package/dist/src/setup/flows/install-vercel-cli.js +1 -1
  102. package/dist/src/setup/flows/link.d.ts +2 -1
  103. package/dist/src/setup/flows/link.js +1 -1
  104. package/dist/src/setup/flows/login.js +1 -1
  105. package/dist/src/setup/flows/model.d.ts +3 -2
  106. package/dist/src/setup/flows/model.js +1 -1
  107. package/dist/src/setup/flows/vercel.js +2 -2
  108. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  109. package/dist/src/setup/scaffold/create/project.js +1 -1
  110. package/dist/src/setup/vercel-project.d.ts +2 -6
  111. package/dist/src/setup/vercel-project.js +1 -1
  112. package/dist/src/setup/with-spinner.d.ts +3 -0
  113. package/dist/src/setup/with-spinner.js +1 -0
  114. package/dist/src/shared/package-name.d.ts +4 -0
  115. package/dist/src/shared/package-name.js +1 -0
  116. package/dist/src/shared/sandbox-network-policy.d.ts +2 -2
  117. package/docs/channels/slack.mdx +1 -1
  118. package/docs/connections.mdx +9 -6
  119. package/docs/getting-started.mdx +8 -3
  120. package/docs/guides/auth-and-route-protection.md +59 -10
  121. package/docs/guides/dev-tui.md +2 -2
  122. package/docs/reference/cli.md +2 -2
  123. package/docs/reference/typescript-api.md +9 -7
  124. package/package.json +1 -1
  125. package/dist/src/cli/commands/init-agent-handoff.md +0 -12
  126. package/dist/src/cli/commands/init-agent-instructions.md +0 -16
@@ -0,0 +1,1442 @@
1
+ import { BaseClient, Parsed, RequestParams } from "./base-client.js";
2
+ import { CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, InteractiveSessionResponse, LogLineStderr, LogLineStdout, SessionResponse, SnapshotResponse, StopSessionResponse } from "./validators.js";
3
+ import { FileWriter } from "./file-writer.js";
4
+ import { NetworkPolicy } from "../network-policy.js";
5
+ import { WithPrivate } from "../utils/types.js";
6
+ import { RUNTIMES } from "../constants.js";
7
+ import { z } from "#compiled/zod/index.js";
8
+ import { Readable } from "stream";
9
+
10
+ //#region src/api-client/api-client.d.ts
11
+ interface WithFetchOptions {
12
+ fetch?: typeof globalThis.fetch;
13
+ }
14
+ declare class APIClient extends BaseClient {
15
+ private teamId;
16
+ private projectId;
17
+ private isJwtToken;
18
+ constructor(params: {
19
+ baseUrl?: string;
20
+ teamId: string;
21
+ token: string;
22
+ fetch?: typeof globalThis.fetch;
23
+ });
24
+ private ensureValidToken;
25
+ protected request(path: string, params?: RequestParams): Promise<Response>;
26
+ getSession(params: WithPrivate<{
27
+ sessionId: string;
28
+ signal?: AbortSignal;
29
+ }>): Promise<Parsed<{
30
+ session: {
31
+ [x: string]: unknown;
32
+ id: string;
33
+ memory: number;
34
+ vcpus: number;
35
+ region: string;
36
+ runtime: string;
37
+ timeout: number;
38
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
39
+ requestedAt: number;
40
+ createdAt: number;
41
+ cwd: string;
42
+ updatedAt: number;
43
+ startedAt?: number | undefined;
44
+ requestedStopAt?: number | undefined;
45
+ stoppedAt?: number | undefined;
46
+ abortedAt?: number | undefined;
47
+ duration?: number | undefined;
48
+ sourceSnapshotId?: string | undefined;
49
+ snapshottedAt?: number | undefined;
50
+ interactivePort?: number | undefined;
51
+ networkPolicy?: {
52
+ [x: string]: unknown;
53
+ mode: "allow-all";
54
+ } | {
55
+ [x: string]: unknown;
56
+ mode: "deny-all";
57
+ } | {
58
+ [x: string]: unknown;
59
+ mode: "custom";
60
+ allowedDomains?: string[] | undefined;
61
+ allowedCIDRs?: string[] | undefined;
62
+ deniedCIDRs?: string[] | undefined;
63
+ injectionRules?: {
64
+ domain: string;
65
+ headers?: Record<string, string> | undefined;
66
+ headerNames?: string[] | undefined;
67
+ match?: {
68
+ path?: {
69
+ exact?: string | undefined;
70
+ startsWith?: string | undefined;
71
+ regex?: string | undefined;
72
+ } | undefined;
73
+ method?: string[] | undefined;
74
+ queryString?: {
75
+ key?: {
76
+ exact?: string | undefined;
77
+ startsWith?: string | undefined;
78
+ regex?: string | undefined;
79
+ } | undefined;
80
+ value?: {
81
+ exact?: string | undefined;
82
+ startsWith?: string | undefined;
83
+ regex?: string | undefined;
84
+ } | undefined;
85
+ }[] | undefined;
86
+ headers?: {
87
+ key?: {
88
+ exact?: string | undefined;
89
+ startsWith?: string | undefined;
90
+ regex?: string | undefined;
91
+ } | undefined;
92
+ value?: {
93
+ exact?: string | undefined;
94
+ startsWith?: string | undefined;
95
+ regex?: string | undefined;
96
+ } | undefined;
97
+ }[] | undefined;
98
+ } | undefined;
99
+ }[] | undefined;
100
+ forwardRules?: {
101
+ domain: string;
102
+ forwardURL: string;
103
+ match?: {
104
+ path?: {
105
+ exact?: string | undefined;
106
+ startsWith?: string | undefined;
107
+ regex?: string | undefined;
108
+ } | undefined;
109
+ method?: string[] | undefined;
110
+ queryString?: {
111
+ key?: {
112
+ exact?: string | undefined;
113
+ startsWith?: string | undefined;
114
+ regex?: string | undefined;
115
+ } | undefined;
116
+ value?: {
117
+ exact?: string | undefined;
118
+ startsWith?: string | undefined;
119
+ regex?: string | undefined;
120
+ } | undefined;
121
+ }[] | undefined;
122
+ headers?: {
123
+ key?: {
124
+ exact?: string | undefined;
125
+ startsWith?: string | undefined;
126
+ regex?: string | undefined;
127
+ } | undefined;
128
+ value?: {
129
+ exact?: string | undefined;
130
+ startsWith?: string | undefined;
131
+ regex?: string | undefined;
132
+ } | undefined;
133
+ }[] | undefined;
134
+ } | undefined;
135
+ }[] | undefined;
136
+ } | undefined;
137
+ activeCpuDurationMs?: number | undefined;
138
+ networkTransfer?: {
139
+ ingress: number;
140
+ egress: number;
141
+ } | undefined;
142
+ };
143
+ routes: {
144
+ url: string;
145
+ subdomain: string;
146
+ port: number;
147
+ }[];
148
+ }>>;
149
+ createSandbox(params: WithPrivate<{
150
+ name?: string;
151
+ ports?: number[];
152
+ projectId: string;
153
+ source?: {
154
+ type: "git";
155
+ url: string;
156
+ depth?: number;
157
+ revision?: string;
158
+ username?: string;
159
+ password?: string;
160
+ } | {
161
+ type: "tarball";
162
+ url: string;
163
+ } | {
164
+ type: "snapshot";
165
+ snapshotId: string;
166
+ };
167
+ timeout?: number;
168
+ resources?: {
169
+ vcpus: number;
170
+ };
171
+ persistent?: boolean;
172
+ runtime?: RUNTIMES | (string & {});
173
+ networkPolicy?: NetworkPolicy;
174
+ env?: Record<string, string>;
175
+ tags?: Record<string, string>;
176
+ snapshotExpiration?: number;
177
+ keepLastSnapshots?: {
178
+ count: number;
179
+ expiration?: number;
180
+ deleteEvicted?: boolean;
181
+ };
182
+ signal?: AbortSignal;
183
+ }>): Promise<Parsed<{
184
+ sandbox: {
185
+ name: string;
186
+ persistent: boolean;
187
+ createdAt: number;
188
+ updatedAt: number;
189
+ currentSessionId: string;
190
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
191
+ region?: string | undefined;
192
+ vcpus?: number | undefined;
193
+ memory?: number | undefined;
194
+ runtime?: string | undefined;
195
+ timeout?: number | undefined;
196
+ networkPolicy?: {
197
+ [x: string]: unknown;
198
+ mode: "allow-all";
199
+ } | {
200
+ [x: string]: unknown;
201
+ mode: "deny-all";
202
+ } | {
203
+ [x: string]: unknown;
204
+ mode: "custom";
205
+ allowedDomains?: string[] | undefined;
206
+ allowedCIDRs?: string[] | undefined;
207
+ deniedCIDRs?: string[] | undefined;
208
+ injectionRules?: {
209
+ domain: string;
210
+ headers?: Record<string, string> | undefined;
211
+ headerNames?: string[] | undefined;
212
+ match?: {
213
+ path?: {
214
+ exact?: string | undefined;
215
+ startsWith?: string | undefined;
216
+ regex?: string | undefined;
217
+ } | undefined;
218
+ method?: string[] | undefined;
219
+ queryString?: {
220
+ key?: {
221
+ exact?: string | undefined;
222
+ startsWith?: string | undefined;
223
+ regex?: string | undefined;
224
+ } | undefined;
225
+ value?: {
226
+ exact?: string | undefined;
227
+ startsWith?: string | undefined;
228
+ regex?: string | undefined;
229
+ } | undefined;
230
+ }[] | undefined;
231
+ headers?: {
232
+ key?: {
233
+ exact?: string | undefined;
234
+ startsWith?: string | undefined;
235
+ regex?: string | undefined;
236
+ } | undefined;
237
+ value?: {
238
+ exact?: string | undefined;
239
+ startsWith?: string | undefined;
240
+ regex?: string | undefined;
241
+ } | undefined;
242
+ }[] | undefined;
243
+ } | undefined;
244
+ }[] | undefined;
245
+ forwardRules?: {
246
+ domain: string;
247
+ forwardURL: string;
248
+ match?: {
249
+ path?: {
250
+ exact?: string | undefined;
251
+ startsWith?: string | undefined;
252
+ regex?: string | undefined;
253
+ } | undefined;
254
+ method?: string[] | undefined;
255
+ queryString?: {
256
+ key?: {
257
+ exact?: string | undefined;
258
+ startsWith?: string | undefined;
259
+ regex?: string | undefined;
260
+ } | undefined;
261
+ value?: {
262
+ exact?: string | undefined;
263
+ startsWith?: string | undefined;
264
+ regex?: string | undefined;
265
+ } | undefined;
266
+ }[] | undefined;
267
+ headers?: {
268
+ key?: {
269
+ exact?: string | undefined;
270
+ startsWith?: string | undefined;
271
+ regex?: string | undefined;
272
+ } | undefined;
273
+ value?: {
274
+ exact?: string | undefined;
275
+ startsWith?: string | undefined;
276
+ regex?: string | undefined;
277
+ } | undefined;
278
+ }[] | undefined;
279
+ } | undefined;
280
+ }[] | undefined;
281
+ } | undefined;
282
+ totalEgressBytes?: number | undefined;
283
+ totalIngressBytes?: number | undefined;
284
+ totalActiveCpuDurationMs?: number | undefined;
285
+ totalDurationMs?: number | undefined;
286
+ currentSnapshotId?: string | undefined;
287
+ statusUpdatedAt?: number | undefined;
288
+ cwd?: string | undefined;
289
+ tags?: Record<string, string> | undefined;
290
+ snapshotExpiration?: number | undefined;
291
+ keepLastSnapshots?: {
292
+ count: number;
293
+ expiration?: number | undefined;
294
+ deleteEvicted?: boolean | undefined;
295
+ } | undefined;
296
+ };
297
+ session: {
298
+ [x: string]: unknown;
299
+ id: string;
300
+ memory: number;
301
+ vcpus: number;
302
+ region: string;
303
+ runtime: string;
304
+ timeout: number;
305
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
306
+ requestedAt: number;
307
+ createdAt: number;
308
+ cwd: string;
309
+ updatedAt: number;
310
+ startedAt?: number | undefined;
311
+ requestedStopAt?: number | undefined;
312
+ stoppedAt?: number | undefined;
313
+ abortedAt?: number | undefined;
314
+ duration?: number | undefined;
315
+ sourceSnapshotId?: string | undefined;
316
+ snapshottedAt?: number | undefined;
317
+ interactivePort?: number | undefined;
318
+ networkPolicy?: {
319
+ [x: string]: unknown;
320
+ mode: "allow-all";
321
+ } | {
322
+ [x: string]: unknown;
323
+ mode: "deny-all";
324
+ } | {
325
+ [x: string]: unknown;
326
+ mode: "custom";
327
+ allowedDomains?: string[] | undefined;
328
+ allowedCIDRs?: string[] | undefined;
329
+ deniedCIDRs?: string[] | undefined;
330
+ injectionRules?: {
331
+ domain: string;
332
+ headers?: Record<string, string> | undefined;
333
+ headerNames?: string[] | undefined;
334
+ match?: {
335
+ path?: {
336
+ exact?: string | undefined;
337
+ startsWith?: string | undefined;
338
+ regex?: string | undefined;
339
+ } | undefined;
340
+ method?: string[] | undefined;
341
+ queryString?: {
342
+ key?: {
343
+ exact?: string | undefined;
344
+ startsWith?: string | undefined;
345
+ regex?: string | undefined;
346
+ } | undefined;
347
+ value?: {
348
+ exact?: string | undefined;
349
+ startsWith?: string | undefined;
350
+ regex?: string | undefined;
351
+ } | undefined;
352
+ }[] | undefined;
353
+ headers?: {
354
+ key?: {
355
+ exact?: string | undefined;
356
+ startsWith?: string | undefined;
357
+ regex?: string | undefined;
358
+ } | undefined;
359
+ value?: {
360
+ exact?: string | undefined;
361
+ startsWith?: string | undefined;
362
+ regex?: string | undefined;
363
+ } | undefined;
364
+ }[] | undefined;
365
+ } | undefined;
366
+ }[] | undefined;
367
+ forwardRules?: {
368
+ domain: string;
369
+ forwardURL: string;
370
+ match?: {
371
+ path?: {
372
+ exact?: string | undefined;
373
+ startsWith?: string | undefined;
374
+ regex?: string | undefined;
375
+ } | undefined;
376
+ method?: string[] | undefined;
377
+ queryString?: {
378
+ key?: {
379
+ exact?: string | undefined;
380
+ startsWith?: string | undefined;
381
+ regex?: string | undefined;
382
+ } | undefined;
383
+ value?: {
384
+ exact?: string | undefined;
385
+ startsWith?: string | undefined;
386
+ regex?: string | undefined;
387
+ } | undefined;
388
+ }[] | undefined;
389
+ headers?: {
390
+ key?: {
391
+ exact?: string | undefined;
392
+ startsWith?: string | undefined;
393
+ regex?: string | undefined;
394
+ } | undefined;
395
+ value?: {
396
+ exact?: string | undefined;
397
+ startsWith?: string | undefined;
398
+ regex?: string | undefined;
399
+ } | undefined;
400
+ }[] | undefined;
401
+ } | undefined;
402
+ }[] | undefined;
403
+ } | undefined;
404
+ activeCpuDurationMs?: number | undefined;
405
+ networkTransfer?: {
406
+ ingress: number;
407
+ egress: number;
408
+ } | undefined;
409
+ };
410
+ routes: {
411
+ url: string;
412
+ subdomain: string;
413
+ port: number;
414
+ }[];
415
+ resumed?: boolean | undefined;
416
+ }>>;
417
+ runCommand(params: {
418
+ sessionId: string;
419
+ cwd?: string;
420
+ command: string;
421
+ args: string[];
422
+ env: Record<string, string>;
423
+ sudo: boolean;
424
+ wait: true;
425
+ timeout?: number;
426
+ signal?: AbortSignal;
427
+ }): Promise<{
428
+ command: CommandData;
429
+ finished: Promise<CommandFinishedData>;
430
+ }>;
431
+ runCommand(params: {
432
+ sessionId: string;
433
+ cwd?: string;
434
+ command: string;
435
+ args: string[];
436
+ env: Record<string, string>;
437
+ sudo: boolean;
438
+ wait?: false;
439
+ timeout?: number;
440
+ signal?: AbortSignal;
441
+ }): Promise<Parsed<z.infer<typeof CommandResponse>>>;
442
+ getCommand(params: {
443
+ sessionId: string;
444
+ cmdId: string;
445
+ wait: true;
446
+ signal?: AbortSignal;
447
+ }): Promise<Parsed<z.infer<typeof CommandFinishedResponse>>>;
448
+ getCommand(params: {
449
+ sessionId: string;
450
+ cmdId: string;
451
+ wait?: boolean;
452
+ signal?: AbortSignal;
453
+ }): Promise<Parsed<z.infer<typeof CommandResponse>>>;
454
+ openInteractive(params: {
455
+ sessionId: string;
456
+ signal?: AbortSignal;
457
+ }): Promise<Parsed<z.infer<typeof InteractiveSessionResponse>>>;
458
+ mkDir(params: {
459
+ sessionId: string;
460
+ path: string;
461
+ cwd?: string;
462
+ signal?: AbortSignal;
463
+ }): Promise<Parsed<Record<string, never>>>;
464
+ getFileWriter(params: {
465
+ sessionId: string;
466
+ extractDir: string;
467
+ signal?: AbortSignal;
468
+ }): {
469
+ response: Promise<Response>;
470
+ writer: FileWriter;
471
+ };
472
+ listSessions(params: {
473
+ /**
474
+ * The ID or name of the project to which the sessions belong.
475
+ * @example "my-project"
476
+ */
477
+ projectId: string;
478
+ /**
479
+ * Filter sessions by sandbox name.
480
+ */
481
+ name?: string;
482
+ /**
483
+ * Maximum number of sessions to list from a request.
484
+ * @example 10
485
+ */
486
+ limit?: number;
487
+ /**
488
+ * Cursor for pagination.
489
+ */
490
+ cursor?: string;
491
+ /**
492
+ * Sort order for results.
493
+ */
494
+ sortOrder?: "asc" | "desc";
495
+ signal?: AbortSignal;
496
+ }): Promise<Parsed<{
497
+ sessions: {
498
+ [x: string]: unknown;
499
+ id: string;
500
+ memory: number;
501
+ vcpus: number;
502
+ region: string;
503
+ runtime: string;
504
+ timeout: number;
505
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
506
+ requestedAt: number;
507
+ createdAt: number;
508
+ cwd: string;
509
+ updatedAt: number;
510
+ startedAt?: number | undefined;
511
+ requestedStopAt?: number | undefined;
512
+ stoppedAt?: number | undefined;
513
+ abortedAt?: number | undefined;
514
+ duration?: number | undefined;
515
+ sourceSnapshotId?: string | undefined;
516
+ snapshottedAt?: number | undefined;
517
+ interactivePort?: number | undefined;
518
+ networkPolicy?: {
519
+ [x: string]: unknown;
520
+ mode: "allow-all";
521
+ } | {
522
+ [x: string]: unknown;
523
+ mode: "deny-all";
524
+ } | {
525
+ [x: string]: unknown;
526
+ mode: "custom";
527
+ allowedDomains?: string[] | undefined;
528
+ allowedCIDRs?: string[] | undefined;
529
+ deniedCIDRs?: string[] | undefined;
530
+ injectionRules?: {
531
+ domain: string;
532
+ headers?: Record<string, string> | undefined;
533
+ headerNames?: string[] | undefined;
534
+ match?: {
535
+ path?: {
536
+ exact?: string | undefined;
537
+ startsWith?: string | undefined;
538
+ regex?: string | undefined;
539
+ } | undefined;
540
+ method?: string[] | undefined;
541
+ queryString?: {
542
+ key?: {
543
+ exact?: string | undefined;
544
+ startsWith?: string | undefined;
545
+ regex?: string | undefined;
546
+ } | undefined;
547
+ value?: {
548
+ exact?: string | undefined;
549
+ startsWith?: string | undefined;
550
+ regex?: string | undefined;
551
+ } | undefined;
552
+ }[] | undefined;
553
+ headers?: {
554
+ key?: {
555
+ exact?: string | undefined;
556
+ startsWith?: string | undefined;
557
+ regex?: string | undefined;
558
+ } | undefined;
559
+ value?: {
560
+ exact?: string | undefined;
561
+ startsWith?: string | undefined;
562
+ regex?: string | undefined;
563
+ } | undefined;
564
+ }[] | undefined;
565
+ } | undefined;
566
+ }[] | undefined;
567
+ forwardRules?: {
568
+ domain: string;
569
+ forwardURL: string;
570
+ match?: {
571
+ path?: {
572
+ exact?: string | undefined;
573
+ startsWith?: string | undefined;
574
+ regex?: string | undefined;
575
+ } | undefined;
576
+ method?: string[] | undefined;
577
+ queryString?: {
578
+ key?: {
579
+ exact?: string | undefined;
580
+ startsWith?: string | undefined;
581
+ regex?: string | undefined;
582
+ } | undefined;
583
+ value?: {
584
+ exact?: string | undefined;
585
+ startsWith?: string | undefined;
586
+ regex?: string | undefined;
587
+ } | undefined;
588
+ }[] | undefined;
589
+ headers?: {
590
+ key?: {
591
+ exact?: string | undefined;
592
+ startsWith?: string | undefined;
593
+ regex?: string | undefined;
594
+ } | undefined;
595
+ value?: {
596
+ exact?: string | undefined;
597
+ startsWith?: string | undefined;
598
+ regex?: string | undefined;
599
+ } | undefined;
600
+ }[] | undefined;
601
+ } | undefined;
602
+ }[] | undefined;
603
+ } | undefined;
604
+ activeCpuDurationMs?: number | undefined;
605
+ networkTransfer?: {
606
+ ingress: number;
607
+ egress: number;
608
+ } | undefined;
609
+ }[];
610
+ pagination: {
611
+ count: number;
612
+ next: string | null;
613
+ };
614
+ }>>;
615
+ listSnapshots(params: {
616
+ /**
617
+ * The ID or name of the project to which the snapshots belong.
618
+ * @example "my-project"
619
+ */
620
+ projectId: string;
621
+ /**
622
+ * Filter snapshots by sandbox name.
623
+ */
624
+ name?: string;
625
+ /**
626
+ * Maximum number of snapshots to list from a request.
627
+ * @example 10
628
+ */
629
+ limit?: number;
630
+ /**
631
+ * Cursor for pagination.
632
+ */
633
+ cursor?: string;
634
+ /**
635
+ * Sort order for results.
636
+ */
637
+ sortOrder?: "asc" | "desc";
638
+ signal?: AbortSignal;
639
+ }): Promise<Parsed<{
640
+ snapshots: {
641
+ id: string;
642
+ sourceSessionId: string;
643
+ region: string;
644
+ status: "created" | "deleted" | "failed";
645
+ sizeBytes: number;
646
+ createdAt: number;
647
+ updatedAt: number;
648
+ expiresAt?: number | undefined;
649
+ lastUsedAt?: number | undefined;
650
+ creationMethod?: string | undefined;
651
+ parentId?: string | undefined;
652
+ }[];
653
+ pagination: {
654
+ count: number;
655
+ next: string | null;
656
+ };
657
+ }>>;
658
+ getSnapshotTree(params: {
659
+ /**
660
+ * The ID or name of the project to which the snapshots belong.
661
+ */
662
+ projectId: string;
663
+ /**
664
+ * The snapshot ID to use as the anchor for the tree traversal.
665
+ */
666
+ snapshotId: string;
667
+ /**
668
+ * Maximum number of nodes to return.
669
+ */
670
+ limit?: number;
671
+ /**
672
+ * Sort order: "asc" for descendants, "desc" for ancestors.
673
+ */
674
+ sortOrder?: "asc" | "desc";
675
+ signal?: AbortSignal;
676
+ }): Promise<Parsed<{
677
+ snapshots: {
678
+ snapshot: {
679
+ id: string;
680
+ sourceSessionId: string;
681
+ region: string;
682
+ status: "created" | "deleted" | "failed";
683
+ sizeBytes: number;
684
+ createdAt: number;
685
+ updatedAt: number;
686
+ expiresAt?: number | undefined;
687
+ lastUsedAt?: number | undefined;
688
+ creationMethod?: string | undefined;
689
+ parentId?: string | undefined;
690
+ };
691
+ siblings: {
692
+ id: string;
693
+ sourceSessionId: string;
694
+ region: string;
695
+ status: "created" | "deleted" | "failed";
696
+ sizeBytes: number;
697
+ createdAt: number;
698
+ updatedAt: number;
699
+ expiresAt?: number | undefined;
700
+ lastUsedAt?: number | undefined;
701
+ creationMethod?: string | undefined;
702
+ parentId?: string | undefined;
703
+ }[];
704
+ count: string;
705
+ }[];
706
+ pagination: {
707
+ count: number;
708
+ next: string | null;
709
+ };
710
+ anchor?: {
711
+ snapshot: {
712
+ id: string;
713
+ sourceSessionId: string;
714
+ region: string;
715
+ status: "created" | "deleted" | "failed";
716
+ sizeBytes: number;
717
+ createdAt: number;
718
+ updatedAt: number;
719
+ expiresAt?: number | undefined;
720
+ lastUsedAt?: number | undefined;
721
+ creationMethod?: string | undefined;
722
+ parentId?: string | undefined;
723
+ };
724
+ siblings: {
725
+ id: string;
726
+ sourceSessionId: string;
727
+ region: string;
728
+ status: "created" | "deleted" | "failed";
729
+ sizeBytes: number;
730
+ createdAt: number;
731
+ updatedAt: number;
732
+ expiresAt?: number | undefined;
733
+ lastUsedAt?: number | undefined;
734
+ creationMethod?: string | undefined;
735
+ parentId?: string | undefined;
736
+ }[];
737
+ count: string;
738
+ } | undefined;
739
+ }>>;
740
+ writeFiles(params: {
741
+ sessionId: string;
742
+ cwd: string;
743
+ files: {
744
+ path: string;
745
+ content: string | Uint8Array;
746
+ mode?: number;
747
+ }[];
748
+ extractDir: string;
749
+ signal?: AbortSignal;
750
+ }): Promise<void>;
751
+ readFile(params: {
752
+ sessionId: string;
753
+ path: string;
754
+ cwd?: string;
755
+ signal?: AbortSignal;
756
+ }): Promise<Readable | null>;
757
+ killCommand(params: {
758
+ sessionId: string;
759
+ commandId: string;
760
+ signal: number;
761
+ abortSignal?: AbortSignal;
762
+ }): Promise<Parsed<{
763
+ command: {
764
+ id: string;
765
+ name: string;
766
+ args: string[];
767
+ cwd: string;
768
+ sessionId: string;
769
+ exitCode: number | null;
770
+ startedAt: number;
771
+ };
772
+ }>>;
773
+ getLogs(params: {
774
+ sessionId: string;
775
+ cmdId: string;
776
+ signal?: AbortSignal;
777
+ }): AsyncGenerator<z.infer<typeof LogLineStdout> | z.infer<typeof LogLineStderr>, void, void> & Disposable & {
778
+ close(): void;
779
+ };
780
+ stopSession(params: {
781
+ sessionId: string;
782
+ signal?: AbortSignal;
783
+ }): Promise<Parsed<z.infer<typeof StopSessionResponse>>>;
784
+ updateNetworkPolicy(params: {
785
+ sessionId: string;
786
+ networkPolicy: NetworkPolicy;
787
+ signal?: AbortSignal;
788
+ }): Promise<Parsed<z.infer<typeof SessionResponse>>>;
789
+ extendTimeout(params: {
790
+ sessionId: string;
791
+ duration: number;
792
+ signal?: AbortSignal;
793
+ }): Promise<Parsed<z.infer<typeof SessionResponse>>>;
794
+ createSnapshot(params: {
795
+ sessionId: string;
796
+ expiration?: number;
797
+ signal?: AbortSignal;
798
+ }): Promise<Parsed<z.infer<typeof CreateSnapshotResponse>>>;
799
+ deleteSnapshot(params: {
800
+ snapshotId: string;
801
+ signal?: AbortSignal;
802
+ }): Promise<Parsed<z.infer<typeof SnapshotResponse>>>;
803
+ getSnapshot(params: {
804
+ snapshotId: string;
805
+ signal?: AbortSignal;
806
+ }): Promise<Parsed<z.infer<typeof SnapshotResponse>>>;
807
+ getSandbox(params: WithPrivate<{
808
+ name: string;
809
+ projectId: string;
810
+ resume?: boolean;
811
+ signal?: AbortSignal;
812
+ }>): Promise<Parsed<{
813
+ sandbox: {
814
+ name: string;
815
+ persistent: boolean;
816
+ createdAt: number;
817
+ updatedAt: number;
818
+ currentSessionId: string;
819
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
820
+ region?: string | undefined;
821
+ vcpus?: number | undefined;
822
+ memory?: number | undefined;
823
+ runtime?: string | undefined;
824
+ timeout?: number | undefined;
825
+ networkPolicy?: {
826
+ [x: string]: unknown;
827
+ mode: "allow-all";
828
+ } | {
829
+ [x: string]: unknown;
830
+ mode: "deny-all";
831
+ } | {
832
+ [x: string]: unknown;
833
+ mode: "custom";
834
+ allowedDomains?: string[] | undefined;
835
+ allowedCIDRs?: string[] | undefined;
836
+ deniedCIDRs?: string[] | undefined;
837
+ injectionRules?: {
838
+ domain: string;
839
+ headers?: Record<string, string> | undefined;
840
+ headerNames?: string[] | undefined;
841
+ match?: {
842
+ path?: {
843
+ exact?: string | undefined;
844
+ startsWith?: string | undefined;
845
+ regex?: string | undefined;
846
+ } | undefined;
847
+ method?: string[] | undefined;
848
+ queryString?: {
849
+ key?: {
850
+ exact?: string | undefined;
851
+ startsWith?: string | undefined;
852
+ regex?: string | undefined;
853
+ } | undefined;
854
+ value?: {
855
+ exact?: string | undefined;
856
+ startsWith?: string | undefined;
857
+ regex?: string | undefined;
858
+ } | undefined;
859
+ }[] | undefined;
860
+ headers?: {
861
+ key?: {
862
+ exact?: string | undefined;
863
+ startsWith?: string | undefined;
864
+ regex?: string | undefined;
865
+ } | undefined;
866
+ value?: {
867
+ exact?: string | undefined;
868
+ startsWith?: string | undefined;
869
+ regex?: string | undefined;
870
+ } | undefined;
871
+ }[] | undefined;
872
+ } | undefined;
873
+ }[] | undefined;
874
+ forwardRules?: {
875
+ domain: string;
876
+ forwardURL: string;
877
+ match?: {
878
+ path?: {
879
+ exact?: string | undefined;
880
+ startsWith?: string | undefined;
881
+ regex?: string | undefined;
882
+ } | undefined;
883
+ method?: string[] | undefined;
884
+ queryString?: {
885
+ key?: {
886
+ exact?: string | undefined;
887
+ startsWith?: string | undefined;
888
+ regex?: string | undefined;
889
+ } | undefined;
890
+ value?: {
891
+ exact?: string | undefined;
892
+ startsWith?: string | undefined;
893
+ regex?: string | undefined;
894
+ } | undefined;
895
+ }[] | undefined;
896
+ headers?: {
897
+ key?: {
898
+ exact?: string | undefined;
899
+ startsWith?: string | undefined;
900
+ regex?: string | undefined;
901
+ } | undefined;
902
+ value?: {
903
+ exact?: string | undefined;
904
+ startsWith?: string | undefined;
905
+ regex?: string | undefined;
906
+ } | undefined;
907
+ }[] | undefined;
908
+ } | undefined;
909
+ }[] | undefined;
910
+ } | undefined;
911
+ totalEgressBytes?: number | undefined;
912
+ totalIngressBytes?: number | undefined;
913
+ totalActiveCpuDurationMs?: number | undefined;
914
+ totalDurationMs?: number | undefined;
915
+ currentSnapshotId?: string | undefined;
916
+ statusUpdatedAt?: number | undefined;
917
+ cwd?: string | undefined;
918
+ tags?: Record<string, string> | undefined;
919
+ snapshotExpiration?: number | undefined;
920
+ keepLastSnapshots?: {
921
+ count: number;
922
+ expiration?: number | undefined;
923
+ deleteEvicted?: boolean | undefined;
924
+ } | undefined;
925
+ };
926
+ session: {
927
+ [x: string]: unknown;
928
+ id: string;
929
+ memory: number;
930
+ vcpus: number;
931
+ region: string;
932
+ runtime: string;
933
+ timeout: number;
934
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
935
+ requestedAt: number;
936
+ createdAt: number;
937
+ cwd: string;
938
+ updatedAt: number;
939
+ startedAt?: number | undefined;
940
+ requestedStopAt?: number | undefined;
941
+ stoppedAt?: number | undefined;
942
+ abortedAt?: number | undefined;
943
+ duration?: number | undefined;
944
+ sourceSnapshotId?: string | undefined;
945
+ snapshottedAt?: number | undefined;
946
+ interactivePort?: number | undefined;
947
+ networkPolicy?: {
948
+ [x: string]: unknown;
949
+ mode: "allow-all";
950
+ } | {
951
+ [x: string]: unknown;
952
+ mode: "deny-all";
953
+ } | {
954
+ [x: string]: unknown;
955
+ mode: "custom";
956
+ allowedDomains?: string[] | undefined;
957
+ allowedCIDRs?: string[] | undefined;
958
+ deniedCIDRs?: string[] | undefined;
959
+ injectionRules?: {
960
+ domain: string;
961
+ headers?: Record<string, string> | undefined;
962
+ headerNames?: string[] | undefined;
963
+ match?: {
964
+ path?: {
965
+ exact?: string | undefined;
966
+ startsWith?: string | undefined;
967
+ regex?: string | undefined;
968
+ } | undefined;
969
+ method?: string[] | undefined;
970
+ queryString?: {
971
+ key?: {
972
+ exact?: string | undefined;
973
+ startsWith?: string | undefined;
974
+ regex?: string | undefined;
975
+ } | undefined;
976
+ value?: {
977
+ exact?: string | undefined;
978
+ startsWith?: string | undefined;
979
+ regex?: string | undefined;
980
+ } | undefined;
981
+ }[] | undefined;
982
+ headers?: {
983
+ key?: {
984
+ exact?: string | undefined;
985
+ startsWith?: string | undefined;
986
+ regex?: string | undefined;
987
+ } | undefined;
988
+ value?: {
989
+ exact?: string | undefined;
990
+ startsWith?: string | undefined;
991
+ regex?: string | undefined;
992
+ } | undefined;
993
+ }[] | undefined;
994
+ } | undefined;
995
+ }[] | undefined;
996
+ forwardRules?: {
997
+ domain: string;
998
+ forwardURL: string;
999
+ match?: {
1000
+ path?: {
1001
+ exact?: string | undefined;
1002
+ startsWith?: string | undefined;
1003
+ regex?: string | undefined;
1004
+ } | undefined;
1005
+ method?: string[] | undefined;
1006
+ queryString?: {
1007
+ key?: {
1008
+ exact?: string | undefined;
1009
+ startsWith?: string | undefined;
1010
+ regex?: string | undefined;
1011
+ } | undefined;
1012
+ value?: {
1013
+ exact?: string | undefined;
1014
+ startsWith?: string | undefined;
1015
+ regex?: string | undefined;
1016
+ } | undefined;
1017
+ }[] | undefined;
1018
+ headers?: {
1019
+ key?: {
1020
+ exact?: string | undefined;
1021
+ startsWith?: string | undefined;
1022
+ regex?: string | undefined;
1023
+ } | undefined;
1024
+ value?: {
1025
+ exact?: string | undefined;
1026
+ startsWith?: string | undefined;
1027
+ regex?: string | undefined;
1028
+ } | undefined;
1029
+ }[] | undefined;
1030
+ } | undefined;
1031
+ }[] | undefined;
1032
+ } | undefined;
1033
+ activeCpuDurationMs?: number | undefined;
1034
+ networkTransfer?: {
1035
+ ingress: number;
1036
+ egress: number;
1037
+ } | undefined;
1038
+ };
1039
+ routes: {
1040
+ url: string;
1041
+ subdomain: string;
1042
+ port: number;
1043
+ }[];
1044
+ resumed?: boolean | undefined;
1045
+ }>>;
1046
+ listSandboxes(params: {
1047
+ projectId: string;
1048
+ limit?: number;
1049
+ sortBy?: "createdAt" | "name" | "statusUpdatedAt";
1050
+ sortOrder?: "asc" | "desc";
1051
+ namePrefix?: string;
1052
+ cursor?: string;
1053
+ tags?: Record<string, string>;
1054
+ signal?: AbortSignal;
1055
+ }): Promise<Parsed<{
1056
+ sandboxes: {
1057
+ name: string;
1058
+ persistent: boolean;
1059
+ createdAt: number;
1060
+ updatedAt: number;
1061
+ currentSessionId: string;
1062
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
1063
+ region?: string | undefined;
1064
+ vcpus?: number | undefined;
1065
+ memory?: number | undefined;
1066
+ runtime?: string | undefined;
1067
+ timeout?: number | undefined;
1068
+ networkPolicy?: {
1069
+ [x: string]: unknown;
1070
+ mode: "allow-all";
1071
+ } | {
1072
+ [x: string]: unknown;
1073
+ mode: "deny-all";
1074
+ } | {
1075
+ [x: string]: unknown;
1076
+ mode: "custom";
1077
+ allowedDomains?: string[] | undefined;
1078
+ allowedCIDRs?: string[] | undefined;
1079
+ deniedCIDRs?: string[] | undefined;
1080
+ injectionRules?: {
1081
+ domain: string;
1082
+ headers?: Record<string, string> | undefined;
1083
+ headerNames?: string[] | undefined;
1084
+ match?: {
1085
+ path?: {
1086
+ exact?: string | undefined;
1087
+ startsWith?: string | undefined;
1088
+ regex?: string | undefined;
1089
+ } | undefined;
1090
+ method?: string[] | undefined;
1091
+ queryString?: {
1092
+ key?: {
1093
+ exact?: string | undefined;
1094
+ startsWith?: string | undefined;
1095
+ regex?: string | undefined;
1096
+ } | undefined;
1097
+ value?: {
1098
+ exact?: string | undefined;
1099
+ startsWith?: string | undefined;
1100
+ regex?: string | undefined;
1101
+ } | undefined;
1102
+ }[] | undefined;
1103
+ headers?: {
1104
+ key?: {
1105
+ exact?: string | undefined;
1106
+ startsWith?: string | undefined;
1107
+ regex?: string | undefined;
1108
+ } | undefined;
1109
+ value?: {
1110
+ exact?: string | undefined;
1111
+ startsWith?: string | undefined;
1112
+ regex?: string | undefined;
1113
+ } | undefined;
1114
+ }[] | undefined;
1115
+ } | undefined;
1116
+ }[] | undefined;
1117
+ forwardRules?: {
1118
+ domain: string;
1119
+ forwardURL: string;
1120
+ match?: {
1121
+ path?: {
1122
+ exact?: string | undefined;
1123
+ startsWith?: string | undefined;
1124
+ regex?: string | undefined;
1125
+ } | undefined;
1126
+ method?: string[] | undefined;
1127
+ queryString?: {
1128
+ key?: {
1129
+ exact?: string | undefined;
1130
+ startsWith?: string | undefined;
1131
+ regex?: string | undefined;
1132
+ } | undefined;
1133
+ value?: {
1134
+ exact?: string | undefined;
1135
+ startsWith?: string | undefined;
1136
+ regex?: string | undefined;
1137
+ } | undefined;
1138
+ }[] | undefined;
1139
+ headers?: {
1140
+ key?: {
1141
+ exact?: string | undefined;
1142
+ startsWith?: string | undefined;
1143
+ regex?: string | undefined;
1144
+ } | undefined;
1145
+ value?: {
1146
+ exact?: string | undefined;
1147
+ startsWith?: string | undefined;
1148
+ regex?: string | undefined;
1149
+ } | undefined;
1150
+ }[] | undefined;
1151
+ } | undefined;
1152
+ }[] | undefined;
1153
+ } | undefined;
1154
+ totalEgressBytes?: number | undefined;
1155
+ totalIngressBytes?: number | undefined;
1156
+ totalActiveCpuDurationMs?: number | undefined;
1157
+ totalDurationMs?: number | undefined;
1158
+ currentSnapshotId?: string | undefined;
1159
+ statusUpdatedAt?: number | undefined;
1160
+ cwd?: string | undefined;
1161
+ tags?: Record<string, string> | undefined;
1162
+ snapshotExpiration?: number | undefined;
1163
+ keepLastSnapshots?: {
1164
+ count: number;
1165
+ expiration?: number | undefined;
1166
+ deleteEvicted?: boolean | undefined;
1167
+ } | undefined;
1168
+ }[];
1169
+ pagination: {
1170
+ count: number;
1171
+ next: string | null;
1172
+ };
1173
+ }>>;
1174
+ updateSandbox(params: {
1175
+ name: string;
1176
+ projectId: string;
1177
+ persistent?: boolean;
1178
+ resources?: {
1179
+ vcpus?: number;
1180
+ memory?: number;
1181
+ };
1182
+ runtime?: RUNTIMES | (string & {});
1183
+ timeout?: number;
1184
+ networkPolicy?: NetworkPolicy;
1185
+ tags?: Record<string, string>;
1186
+ ports?: number[];
1187
+ snapshotExpiration?: number;
1188
+ keepLastSnapshots?: {
1189
+ count: number;
1190
+ expiration?: number;
1191
+ deleteEvicted?: boolean;
1192
+ } | null;
1193
+ currentSnapshotId?: string;
1194
+ signal?: AbortSignal;
1195
+ }): Promise<Parsed<{
1196
+ sandbox: {
1197
+ name: string;
1198
+ persistent: boolean;
1199
+ createdAt: number;
1200
+ updatedAt: number;
1201
+ currentSessionId: string;
1202
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
1203
+ region?: string | undefined;
1204
+ vcpus?: number | undefined;
1205
+ memory?: number | undefined;
1206
+ runtime?: string | undefined;
1207
+ timeout?: number | undefined;
1208
+ networkPolicy?: {
1209
+ [x: string]: unknown;
1210
+ mode: "allow-all";
1211
+ } | {
1212
+ [x: string]: unknown;
1213
+ mode: "deny-all";
1214
+ } | {
1215
+ [x: string]: unknown;
1216
+ mode: "custom";
1217
+ allowedDomains?: string[] | undefined;
1218
+ allowedCIDRs?: string[] | undefined;
1219
+ deniedCIDRs?: string[] | undefined;
1220
+ injectionRules?: {
1221
+ domain: string;
1222
+ headers?: Record<string, string> | undefined;
1223
+ headerNames?: string[] | undefined;
1224
+ match?: {
1225
+ path?: {
1226
+ exact?: string | undefined;
1227
+ startsWith?: string | undefined;
1228
+ regex?: string | undefined;
1229
+ } | undefined;
1230
+ method?: string[] | undefined;
1231
+ queryString?: {
1232
+ key?: {
1233
+ exact?: string | undefined;
1234
+ startsWith?: string | undefined;
1235
+ regex?: string | undefined;
1236
+ } | undefined;
1237
+ value?: {
1238
+ exact?: string | undefined;
1239
+ startsWith?: string | undefined;
1240
+ regex?: string | undefined;
1241
+ } | undefined;
1242
+ }[] | undefined;
1243
+ headers?: {
1244
+ key?: {
1245
+ exact?: string | undefined;
1246
+ startsWith?: string | undefined;
1247
+ regex?: string | undefined;
1248
+ } | undefined;
1249
+ value?: {
1250
+ exact?: string | undefined;
1251
+ startsWith?: string | undefined;
1252
+ regex?: string | undefined;
1253
+ } | undefined;
1254
+ }[] | undefined;
1255
+ } | undefined;
1256
+ }[] | undefined;
1257
+ forwardRules?: {
1258
+ domain: string;
1259
+ forwardURL: string;
1260
+ match?: {
1261
+ path?: {
1262
+ exact?: string | undefined;
1263
+ startsWith?: string | undefined;
1264
+ regex?: string | undefined;
1265
+ } | undefined;
1266
+ method?: string[] | undefined;
1267
+ queryString?: {
1268
+ key?: {
1269
+ exact?: string | undefined;
1270
+ startsWith?: string | undefined;
1271
+ regex?: string | undefined;
1272
+ } | undefined;
1273
+ value?: {
1274
+ exact?: string | undefined;
1275
+ startsWith?: string | undefined;
1276
+ regex?: string | undefined;
1277
+ } | undefined;
1278
+ }[] | undefined;
1279
+ headers?: {
1280
+ key?: {
1281
+ exact?: string | undefined;
1282
+ startsWith?: string | undefined;
1283
+ regex?: string | undefined;
1284
+ } | undefined;
1285
+ value?: {
1286
+ exact?: string | undefined;
1287
+ startsWith?: string | undefined;
1288
+ regex?: string | undefined;
1289
+ } | undefined;
1290
+ }[] | undefined;
1291
+ } | undefined;
1292
+ }[] | undefined;
1293
+ } | undefined;
1294
+ totalEgressBytes?: number | undefined;
1295
+ totalIngressBytes?: number | undefined;
1296
+ totalActiveCpuDurationMs?: number | undefined;
1297
+ totalDurationMs?: number | undefined;
1298
+ currentSnapshotId?: string | undefined;
1299
+ statusUpdatedAt?: number | undefined;
1300
+ cwd?: string | undefined;
1301
+ tags?: Record<string, string> | undefined;
1302
+ snapshotExpiration?: number | undefined;
1303
+ keepLastSnapshots?: {
1304
+ count: number;
1305
+ expiration?: number | undefined;
1306
+ deleteEvicted?: boolean | undefined;
1307
+ } | undefined;
1308
+ };
1309
+ routes?: {
1310
+ url: string;
1311
+ subdomain: string;
1312
+ port: number;
1313
+ }[] | undefined;
1314
+ }>>;
1315
+ deleteSandbox(params: {
1316
+ name: string;
1317
+ projectId: string;
1318
+ signal?: AbortSignal;
1319
+ }): Promise<Parsed<{
1320
+ sandbox: {
1321
+ name: string;
1322
+ persistent: boolean;
1323
+ createdAt: number;
1324
+ updatedAt: number;
1325
+ currentSessionId: string;
1326
+ status: "failed" | "aborted" | "pending" | "running" | "stopping" | "stopped" | "snapshotting";
1327
+ region?: string | undefined;
1328
+ vcpus?: number | undefined;
1329
+ memory?: number | undefined;
1330
+ runtime?: string | undefined;
1331
+ timeout?: number | undefined;
1332
+ networkPolicy?: {
1333
+ [x: string]: unknown;
1334
+ mode: "allow-all";
1335
+ } | {
1336
+ [x: string]: unknown;
1337
+ mode: "deny-all";
1338
+ } | {
1339
+ [x: string]: unknown;
1340
+ mode: "custom";
1341
+ allowedDomains?: string[] | undefined;
1342
+ allowedCIDRs?: string[] | undefined;
1343
+ deniedCIDRs?: string[] | undefined;
1344
+ injectionRules?: {
1345
+ domain: string;
1346
+ headers?: Record<string, string> | undefined;
1347
+ headerNames?: string[] | undefined;
1348
+ match?: {
1349
+ path?: {
1350
+ exact?: string | undefined;
1351
+ startsWith?: string | undefined;
1352
+ regex?: string | undefined;
1353
+ } | undefined;
1354
+ method?: string[] | undefined;
1355
+ queryString?: {
1356
+ key?: {
1357
+ exact?: string | undefined;
1358
+ startsWith?: string | undefined;
1359
+ regex?: string | undefined;
1360
+ } | undefined;
1361
+ value?: {
1362
+ exact?: string | undefined;
1363
+ startsWith?: string | undefined;
1364
+ regex?: string | undefined;
1365
+ } | undefined;
1366
+ }[] | undefined;
1367
+ headers?: {
1368
+ key?: {
1369
+ exact?: string | undefined;
1370
+ startsWith?: string | undefined;
1371
+ regex?: string | undefined;
1372
+ } | undefined;
1373
+ value?: {
1374
+ exact?: string | undefined;
1375
+ startsWith?: string | undefined;
1376
+ regex?: string | undefined;
1377
+ } | undefined;
1378
+ }[] | undefined;
1379
+ } | undefined;
1380
+ }[] | undefined;
1381
+ forwardRules?: {
1382
+ domain: string;
1383
+ forwardURL: string;
1384
+ match?: {
1385
+ path?: {
1386
+ exact?: string | undefined;
1387
+ startsWith?: string | undefined;
1388
+ regex?: string | undefined;
1389
+ } | undefined;
1390
+ method?: string[] | undefined;
1391
+ queryString?: {
1392
+ key?: {
1393
+ exact?: string | undefined;
1394
+ startsWith?: string | undefined;
1395
+ regex?: string | undefined;
1396
+ } | undefined;
1397
+ value?: {
1398
+ exact?: string | undefined;
1399
+ startsWith?: string | undefined;
1400
+ regex?: string | undefined;
1401
+ } | undefined;
1402
+ }[] | undefined;
1403
+ headers?: {
1404
+ key?: {
1405
+ exact?: string | undefined;
1406
+ startsWith?: string | undefined;
1407
+ regex?: string | undefined;
1408
+ } | undefined;
1409
+ value?: {
1410
+ exact?: string | undefined;
1411
+ startsWith?: string | undefined;
1412
+ regex?: string | undefined;
1413
+ } | undefined;
1414
+ }[] | undefined;
1415
+ } | undefined;
1416
+ }[] | undefined;
1417
+ } | undefined;
1418
+ totalEgressBytes?: number | undefined;
1419
+ totalIngressBytes?: number | undefined;
1420
+ totalActiveCpuDurationMs?: number | undefined;
1421
+ totalDurationMs?: number | undefined;
1422
+ currentSnapshotId?: string | undefined;
1423
+ statusUpdatedAt?: number | undefined;
1424
+ cwd?: string | undefined;
1425
+ tags?: Record<string, string> | undefined;
1426
+ snapshotExpiration?: number | undefined;
1427
+ keepLastSnapshots?: {
1428
+ count: number;
1429
+ expiration?: number | undefined;
1430
+ deleteEvicted?: boolean | undefined;
1431
+ } | undefined;
1432
+ };
1433
+ routes?: {
1434
+ url: string;
1435
+ subdomain: string;
1436
+ port: number;
1437
+ }[] | undefined;
1438
+ }>>;
1439
+ }
1440
+ //#endregion
1441
+ export { APIClient, WithFetchOptions };
1442
+ //# sourceMappingURL=api-client.d.ts.map