@deepraxis/sdk 0.1.1-dev.1b9ba47 → 0.1.1-dev.1ba76a6

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.
@@ -21555,7 +21555,7 @@ export type SandboxSandbox = {
21555
21555
  machine?: 'light' | 'full' | 'none';
21556
21556
  };
21557
21557
  /**
21558
- * State of the sandbox
21558
+ * running while the sandbox's machine is up and drivable, paused while it is stopped and can be resumed. On the own face an android phone (templateID "android") has three device states of its own, because its machine running is not yet the phone program's readiness: starting while the vendor is still building the machine, booting while the machine runs but the phone program has not connected on the sandbox's control connection, and running once it has. Its detail and list rows also carry readyAt, the epoch-milliseconds instant the program said hello, null until it does; a linux sandbox only ever reads running or paused.
21559
21559
  */
21560
21560
  export type SandboxSandboxState = 'running' | 'paused';
21561
21561
  /**
@@ -58795,6 +58795,23 @@ export type ForkSessionResponses = {
58795
58795
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
58796
58796
  */
58797
58797
  cwd: string;
58798
+ /**
58799
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
58800
+ */
58801
+ workspace?: {
58802
+ /**
58803
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
58804
+ */
58805
+ kind: 'shared' | 'isolated';
58806
+ /**
58807
+ * The worktree's own folder; present only when kind is isolated.
58808
+ */
58809
+ path?: string;
58810
+ /**
58811
+ * The worktree's branch; present only when kind is isolated.
58812
+ */
58813
+ branch?: string;
58814
+ };
58798
58815
  /**
58799
58816
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
58800
58817
  */
@@ -60520,6 +60537,23 @@ export type RenameSessionResponses = {
60520
60537
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
60521
60538
  */
60522
60539
  cwd: string;
60540
+ /**
60541
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
60542
+ */
60543
+ workspace?: {
60544
+ /**
60545
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
60546
+ */
60547
+ kind: 'shared' | 'isolated';
60548
+ /**
60549
+ * The worktree's own folder; present only when kind is isolated.
60550
+ */
60551
+ path?: string;
60552
+ /**
60553
+ * The worktree's branch; present only when kind is isolated.
60554
+ */
60555
+ branch?: string;
60556
+ };
60523
60557
  /**
60524
60558
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
60525
60559
  */
@@ -62251,6 +62285,23 @@ export type UpdateSessionAgentVersionResponses = {
62251
62285
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
62252
62286
  */
62253
62287
  cwd: string;
62288
+ /**
62289
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
62290
+ */
62291
+ workspace?: {
62292
+ /**
62293
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
62294
+ */
62295
+ kind: 'shared' | 'isolated';
62296
+ /**
62297
+ * The worktree's own folder; present only when kind is isolated.
62298
+ */
62299
+ path?: string;
62300
+ /**
62301
+ * The worktree's branch; present only when kind is isolated.
62302
+ */
62303
+ branch?: string;
62304
+ };
62254
62305
  /**
62255
62306
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
62256
62307
  */
@@ -74284,6 +74335,268 @@ export type RenameSandboxResponses = {
74284
74335
  };
74285
74336
  };
74286
74337
  export type RenameSandboxResponse = RenameSandboxResponses[keyof RenameSandboxResponses];
74338
+ export type ActOnSandboxDisplayData = {
74339
+ body: {
74340
+ /**
74341
+ * Action kind; exactly "snapshot".
74342
+ */
74343
+ type: 'snapshot';
74344
+ } | {
74345
+ /**
74346
+ * Action kind; exactly "screenshot".
74347
+ */
74348
+ type: 'screenshot';
74349
+ } | {
74350
+ /**
74351
+ * Action kind; exactly "tap".
74352
+ */
74353
+ type: 'tap';
74354
+ /**
74355
+ * Ref of a node in the latest snapshot, such as e5; a snapshot mints the refs and a later snapshot replaces them, so a ref from an older snapshot is refused with INVALID_PARAMS.
74356
+ */
74357
+ ref?: string;
74358
+ /**
74359
+ * Screen x in pixels, 0 to 10000; 0 is the left edge.
74360
+ */
74361
+ x?: number;
74362
+ /**
74363
+ * Screen y in pixels, 0 to 10000; 0 is the top edge.
74364
+ */
74365
+ y?: number;
74366
+ } | {
74367
+ /**
74368
+ * Action kind; exactly "long_press".
74369
+ */
74370
+ type: 'long_press';
74371
+ /**
74372
+ * Ref of a node in the latest snapshot, such as e5; a snapshot mints the refs and a later snapshot replaces them, so a ref from an older snapshot is refused with INVALID_PARAMS.
74373
+ */
74374
+ ref?: string;
74375
+ /**
74376
+ * Screen x in pixels, 0 to 10000; 0 is the left edge.
74377
+ */
74378
+ x?: number;
74379
+ /**
74380
+ * Screen y in pixels, 0 to 10000; 0 is the top edge.
74381
+ */
74382
+ y?: number;
74383
+ /**
74384
+ * How long the gesture lasts, in milliseconds, 1 to 10000; omitted uses a natural flick for swipe and 1000 for long_press.
74385
+ */
74386
+ durationMs?: number;
74387
+ } | {
74388
+ /**
74389
+ * Action kind; exactly "swipe".
74390
+ */
74391
+ type: 'swipe';
74392
+ /**
74393
+ * Where the finger starts.
74394
+ */
74395
+ from: {
74396
+ /**
74397
+ * Screen x in pixels, 0 to 10000; 0 is the left edge.
74398
+ */
74399
+ x: number;
74400
+ /**
74401
+ * Screen y in pixels, 0 to 10000; 0 is the top edge.
74402
+ */
74403
+ y: number;
74404
+ };
74405
+ /**
74406
+ * Where the finger ends.
74407
+ */
74408
+ to: {
74409
+ /**
74410
+ * Screen x in pixels, 0 to 10000; 0 is the left edge.
74411
+ */
74412
+ x: number;
74413
+ /**
74414
+ * Screen y in pixels, 0 to 10000; 0 is the top edge.
74415
+ */
74416
+ y: number;
74417
+ };
74418
+ /**
74419
+ * How long the gesture lasts, in milliseconds, 1 to 10000; omitted uses a natural flick for swipe and 1000 for long_press.
74420
+ */
74421
+ durationMs?: number;
74422
+ } | {
74423
+ /**
74424
+ * Action kind; exactly "scroll".
74425
+ */
74426
+ type: 'scroll';
74427
+ /**
74428
+ * Which way the content moves.
74429
+ */
74430
+ direction: 'up' | 'down' | 'left' | 'right';
74431
+ /**
74432
+ * Ref of a node in the latest snapshot, such as e5; a snapshot mints the refs and a later snapshot replaces them, so a ref from an older snapshot is refused with INVALID_PARAMS.
74433
+ */
74434
+ ref?: string;
74435
+ } | {
74436
+ /**
74437
+ * Action kind; exactly "type".
74438
+ */
74439
+ type: 'type';
74440
+ /**
74441
+ * Text to type, at most 10000 characters. ASCII only, because the phone types character by character; non-ASCII text is refused with INVALID_PARAMS.
74442
+ */
74443
+ text: string;
74444
+ /**
74445
+ * Ref of a node in the latest snapshot, such as e5; a snapshot mints the refs and a later snapshot replaces them, so a ref from an older snapshot is refused with INVALID_PARAMS.
74446
+ */
74447
+ ref?: string;
74448
+ } | {
74449
+ /**
74450
+ * Action kind; exactly "key".
74451
+ */
74452
+ type: 'key';
74453
+ /**
74454
+ * Which key to press.
74455
+ */
74456
+ key: 'back' | 'home' | 'recents' | 'enter' | 'delete' | 'power' | 'volume_up' | 'volume_down';
74457
+ } | {
74458
+ /**
74459
+ * Action kind; exactly "open_app".
74460
+ */
74461
+ type: 'open_app';
74462
+ /**
74463
+ * Java package name of the app, such as com.android.settings.
74464
+ */
74465
+ package: string;
74466
+ /**
74467
+ * Activity to open as android:name, such as com.example.app.MainActivity; omitted opens the package's launcher activity.
74468
+ */
74469
+ activity?: string;
74470
+ } | {
74471
+ /**
74472
+ * Action kind; exactly "close_app".
74473
+ */
74474
+ type: 'close_app';
74475
+ /**
74476
+ * Java package name of the app, such as com.android.settings.
74477
+ */
74478
+ package: string;
74479
+ } | {
74480
+ /**
74481
+ * Action kind; exactly "open_url".
74482
+ */
74483
+ type: 'open_url';
74484
+ /**
74485
+ * Absolute http or https URL to open in the phone's browser.
74486
+ */
74487
+ url: string;
74488
+ } | {
74489
+ /**
74490
+ * Action kind; exactly "wait".
74491
+ */
74492
+ type: 'wait';
74493
+ /**
74494
+ * How long to wait, in milliseconds, 1 to 10000, before the call returns.
74495
+ */
74496
+ ms: number;
74497
+ };
74498
+ path: {
74499
+ /**
74500
+ * Id of the sandbox, the `sandboxID` returned by the create call (or listed by listSandboxes). Another team's sandbox and an unknown id both answer 404.
74501
+ */
74502
+ sandboxID: string;
74503
+ };
74504
+ query?: never;
74505
+ url: '/sandbox/v1/sandboxes/{sandboxID}/act';
74506
+ };
74507
+ export type ActOnSandboxDisplayErrors = {
74508
+ /**
74509
+ * INVALID_PARAMS: the body is not one known action, a field is missing, wrongly typed or outside its range, a target names both a ref and coordinates (or neither), a ref is not in the latest snapshot, or the text is not ASCII.
74510
+ */
74511
+ 400: unknown;
74512
+ /**
74513
+ * Authentication required: supply an organization API key.
74514
+ */
74515
+ 401: unknown;
74516
+ /**
74517
+ * NOT_FOUND: the sandbox is absent or belongs to another organization.
74518
+ */
74519
+ 404: unknown;
74520
+ /**
74521
+ * CAPABILITY_UNSUPPORTED: this sandbox is not a phone, so it has no screen; create one with templateID "android".
74522
+ */
74523
+ 501: unknown;
74524
+ /**
74525
+ * DEVICE_NOT_READY: the phone is not drivable yet, and the body names the state it is in — starting while its machine is still being built, booting while the machine runs but the phone program has not connected. Both carry retryable: true and Retry-After: 2; wait that long and send the action again. SERVICE_UNAVAILABLE: the phone is connected but answered nothing this time (its own timeout, or a connection that went away mid-action); retry the same way. The sandbox's state and readyAt on GET /sandbox/v1/sandboxes/{sandboxID} tell the same story: readyAt is the instant the phone program said hello, and its absence is booting.
74526
+ */
74527
+ 503: unknown;
74528
+ };
74529
+ export type ActOnSandboxDisplayResponses = {
74530
+ /**
74531
+ * The action's result: the UI hierarchy and refs for snapshot, image bytes for screenshot, the applied duration for a long press, or an acknowledgement with no data.
74532
+ */
74533
+ 200: {
74534
+ /**
74535
+ * Result kind; "snapshot" for this shape.
74536
+ */
74537
+ type: 'snapshot';
74538
+ /**
74539
+ * The phone's UI hierarchy as XML: one element per node with its bounds, text and other attributes.
74540
+ */
74541
+ snapshot: string;
74542
+ /**
74543
+ * How many nodes received a ref that tap, long_press, scroll and type accept.
74544
+ */
74545
+ refs: number;
74546
+ /**
74547
+ * True when the hierarchy was too large and was cut; the returned refs still name their nodes.
74548
+ */
74549
+ truncated: boolean;
74550
+ /**
74551
+ * Package name of the app that was in the foreground at the snapshot, such as com.android.settings.
74552
+ */
74553
+ package: string;
74554
+ } | {
74555
+ /**
74556
+ * Result kind; "screenshot" for this shape.
74557
+ */
74558
+ type: 'screenshot';
74559
+ /**
74560
+ * Image MIME type of the encoded bytes; image/png.
74561
+ */
74562
+ mediaType: string;
74563
+ /**
74564
+ * Base64-encoded image bytes; decode before saving or viewing.
74565
+ */
74566
+ data: string;
74567
+ /**
74568
+ * Image width in pixels.
74569
+ */
74570
+ width: number;
74571
+ /**
74572
+ * Image height in pixels.
74573
+ */
74574
+ height: number;
74575
+ /**
74576
+ * Decoded image size in bytes.
74577
+ */
74578
+ bytes: number;
74579
+ } | {
74580
+ /**
74581
+ * Result kind; "ok" for an action with no result of its own.
74582
+ */
74583
+ type: 'ok';
74584
+ /**
74585
+ * For a long press, the duration that was applied, in milliseconds; absent for the other actions.
74586
+ */
74587
+ ms?: number;
74588
+ } | {
74589
+ /**
74590
+ * Result kind; "wait" for the wait action.
74591
+ */
74592
+ type: 'wait';
74593
+ /**
74594
+ * How long the call waited, in milliseconds; echoes the requested ms.
74595
+ */
74596
+ ms: number;
74597
+ };
74598
+ };
74599
+ export type ActOnSandboxDisplayResponse = ActOnSandboxDisplayResponses[keyof ActOnSandboxDisplayResponses];
74287
74600
  export type RemoveSandboxFileData = {
74288
74601
  body?: never;
74289
74602
  path: {
@@ -74859,6 +75172,23 @@ export type SessionsRetrieveResponses = {
74859
75172
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
74860
75173
  */
74861
75174
  cwd: string;
75175
+ /**
75176
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
75177
+ */
75178
+ workspace?: {
75179
+ /**
75180
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
75181
+ */
75182
+ kind: 'shared' | 'isolated';
75183
+ /**
75184
+ * The worktree's own folder; present only when kind is isolated.
75185
+ */
75186
+ path?: string;
75187
+ /**
75188
+ * The worktree's branch; present only when kind is isolated.
75189
+ */
75190
+ branch?: string;
75191
+ };
74862
75192
  /**
74863
75193
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
74864
75194
  */
@@ -75154,6 +75484,23 @@ export type SessionsUpdateResponses = {
75154
75484
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
75155
75485
  */
75156
75486
  cwd: string;
75487
+ /**
75488
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
75489
+ */
75490
+ workspace?: {
75491
+ /**
75492
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
75493
+ */
75494
+ kind: 'shared' | 'isolated';
75495
+ /**
75496
+ * The worktree's own folder; present only when kind is isolated.
75497
+ */
75498
+ path?: string;
75499
+ /**
75500
+ * The worktree's branch; present only when kind is isolated.
75501
+ */
75502
+ branch?: string;
75503
+ };
75157
75504
  /**
75158
75505
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
75159
75506
  */
@@ -80503,6 +80850,23 @@ export type SessionsListResponses = {
80503
80850
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
80504
80851
  */
80505
80852
  cwd: string;
80853
+ /**
80854
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
80855
+ */
80856
+ workspace?: {
80857
+ /**
80858
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
80859
+ */
80860
+ kind: 'shared' | 'isolated';
80861
+ /**
80862
+ * The worktree's own folder; present only when kind is isolated.
80863
+ */
80864
+ path?: string;
80865
+ /**
80866
+ * The worktree's branch; present only when kind is isolated.
80867
+ */
80868
+ branch?: string;
80869
+ };
80506
80870
  /**
80507
80871
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
80508
80872
  */
@@ -80615,6 +80979,10 @@ export type SessionsCreateData = {
80615
80979
  * Session working directory on any machine. Must be an absolute path within /home/user with no . or .. segments. Repeated and trailing slashes are normalized. Invalid values return 400 invalid_request_error with Invalid cwd.
80616
80980
  */
80617
80981
  cwd?: string;
80982
+ /**
80983
+ * Praxis extension: where the session's work happens. shared (default) opens it in the project's own folder; isolated asks for a session-owned git worktree when a named project's folder is a git repository, so concurrent desks in one project never touch each other's files. An explicit cwd is always taken as given, and a project that is not a git repository is always shared.
80984
+ */
80985
+ workspace?: 'shared' | 'isolated';
80618
80986
  /**
80619
80987
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined.
80620
80988
  */
@@ -80837,6 +81205,23 @@ export type SessionsCreateResponses = {
80837
81205
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
80838
81206
  */
80839
81207
  cwd: string;
81208
+ /**
81209
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
81210
+ */
81211
+ workspace?: {
81212
+ /**
81213
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
81214
+ */
81215
+ kind: 'shared' | 'isolated';
81216
+ /**
81217
+ * The worktree's own folder; present only when kind is isolated.
81218
+ */
81219
+ path?: string;
81220
+ /**
81221
+ * The worktree's branch; present only when kind is isolated.
81222
+ */
81223
+ branch?: string;
81224
+ };
80840
81225
  /**
80841
81226
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
80842
81227
  */
@@ -81091,6 +81476,23 @@ export type SessionsArchiveResponses = {
81091
81476
  * Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory.
81092
81477
  */
81093
81478
  cwd: string;
81479
+ /**
81480
+ * Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch.
81481
+ */
81482
+ workspace?: {
81483
+ /**
81484
+ * Kind of background task: bash for a command started with run_in_background, monitor for a monitor watch.
81485
+ */
81486
+ kind: 'shared' | 'isolated';
81487
+ /**
81488
+ * The worktree's own folder; present only when kind is isolated.
81489
+ */
81490
+ path?: string;
81491
+ /**
81492
+ * The worktree's branch; present only when kind is isolated.
81493
+ */
81494
+ branch?: string;
81495
+ };
81094
81496
  /**
81095
81497
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
81096
81498
  */
@@ -1610,7 +1610,7 @@ export const operations = [
1610
1610
  "resource": "agent.deployments",
1611
1611
  "method": "create",
1612
1612
  "summary": "Create deployment",
1613
- "description": "Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.",
1613
+ "description": "Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {\"agent\":\"agent_123\",\"name\":\"weekly report\",\"initial_events\":[{\"type\":\"user.message\",\"content\":[{\"type\":\"text\",\"text\":\"Write the weekly report.\"}]}],\"target\":{\"type\":\"computer\"},\"schedule\":{\"type\":\"cron\",\"expression\":\"0 9 * * 1\",\"timezone\":\"America/Los_Angeles\"}}.",
1614
1614
  "http": "POST",
1615
1615
  "path": "/agent/v1/deployments",
1616
1616
  "streaming": "no",
@@ -2229,6 +2229,16 @@ export const operations = [
2229
2229
  "required": false,
2230
2230
  "description": "Session working directory on any machine. Must be an absolute path within /home/user with no . or .. segments. Repeated and trailing slashes are normalized. Invalid values return 400 invalid_request_error with Invalid cwd."
2231
2231
  },
2232
+ {
2233
+ "name": "workspace",
2234
+ "type": "string",
2235
+ "enum": [
2236
+ "shared",
2237
+ "isolated"
2238
+ ],
2239
+ "required": false,
2240
+ "description": "Praxis extension: where the session's work happens. shared (default) opens it in the project's own folder; isolated asks for a session-owned git worktree when a named project's folder is a git repository, so concurrent desks in one project never touch each other's files. An explicit cwd is always taken as given, and a project that is not a git repository is always shared."
2241
+ },
2232
2242
  {
2233
2243
  "name": "computer_id",
2234
2244
  "type": "string",
@@ -25362,7 +25372,7 @@ export const operations = [
25362
25372
  "resource": "sandbox.sandboxes",
25363
25373
  "method": "create",
25364
25374
  "summary": "Create sandbox (v2)",
25365
- "description": "Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox. To keep results, declare outputs: [{ path }] on the own face (up to eight absolute paths, a directory or a file): when the sandbox ends for any reason except provider loss or a failed start, each path is packed as .tar.gz and stored in File, and the killed event of GET /sandbox/v1/events/sandboxes/{sandboxID} lists each fileId or the reason it was not kept. Paths not declared are not kept. The E2B face refuses outputs.",
25375
+ "description": "Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox. To keep results, declare outputs: [{ path }] on the own face (up to eight absolute paths, a directory or a file): when the sandbox ends for any reason except provider loss or a failed start, each path is packed as .tar.gz and stored in File, and the killed event of GET /sandbox/v1/events/sandboxes/{sandboxID} lists each fileId or the reason it was not kept. Paths not declared are not kept. The E2B face refuses outputs. On the own face an android phone accepts waitForReady: true, an own-face-only option: the create then waits until the phone program has connected (state running) or 120 seconds pass, and answers with the state it reached — a timeout is not an error; omit it (the default) and the create answers at once, before the phone connects, with state starting or booting, which you follow with the detail read or the act socket.",
25366
25376
  "http": "POST",
25367
25377
  "path": "/sandbox/v1/sandboxes",
25368
25378
  "streaming": "no",
@@ -25513,6 +25523,28 @@ export const operations = [
25513
25523
  ]
25514
25524
  }
25515
25525
  },
25526
+ {
25527
+ "resource": "sandbox.sandboxes",
25528
+ "method": "act",
25529
+ "summary": "Act on a phone sandbox's screen",
25530
+ "description": "See and operate an android sandbox's phone screen: take a screenshot, read the UI hierarchy to get a ref for each node, then tap a node or a screen point, long-press, swipe, scroll, type text, press a key, open or close an app, open a URL, or wait. Use it to drive and automate a mobile app on a phone sandbox created with templateID \"android\"; those machines have no terminal or file API, so drive the screen with this operation and run shell commands with commands.run. Start with a snapshot to learn what is on screen and to mint the refs the tap-like actions use; a ref names a node in the latest snapshot only, so after a newer snapshot, or after an action that changed the screen, take a fresh snapshot — a stale ref is refused with INVALID_PARAMS. The phone runs one action at a time, so actions on one sandbox are serial: send the next only after the previous call returns. A phone that has just been created may not have connected yet and answers 503 SERVICE_UNAVAILABLE with Retry-After: 2; retry after that delay (measured on develop: the sandbox is created in about 45 s and the phone program connects about 15 s later). Text is entered through the phone's own input, which supports ASCII only, so typing non-ASCII text into a Chinese app is not supported and answers INVALID_PARAMS. A linux sandbox has no screen and answers CAPABILITY_UNSUPPORTED.\n\nThe same path is the caller's action socket: send GET with the standard WebSocket upgrade headers instead of POST and drive many actions over one connection. The server answers {\"type\":\"ready\",\"instanceId\":\"<id>\"} first, then every frame {\"id\":\"<your correlation id>\",\"action\":{…}} (an action of the same shape as this operation's body, at most 64 characters of id) is answered by its own id, in submission order, as {\"id\":\"…\",\"result\":{…}} or {\"id\":\"…\",\"error\":{\"code\":\"…\",\"message\":\"…\",\"retryable\":true}}. At most 8 actions may be in flight on one connection (the next answers RATE_LIMITED), and 10 malformed frames in a row close the connection 1008. Authentication is the caller's own (an organization API key), never the phone's token. Closing the connection ends only that client's view: actions already accepted are answered, and the phone stays connected. Before the handshake, a phone that is still being built or has not connected yet answers 503 DEVICE_NOT_READY with the state it is in and Retry-After: 2.",
25531
+ "http": "POST",
25532
+ "path": "/sandbox/v1/sandboxes/{sandboxID}/act",
25533
+ "streaming": "no",
25534
+ "pagination": false,
25535
+ "pathParams": [
25536
+ {
25537
+ "name": "sandboxID",
25538
+ "sdkName": "sandboxID",
25539
+ "description": "Id of the sandbox, the `sandboxID` returned by the create call (or listed by listSandboxes). Another team's sandbox and an unknown id both answer 404."
25540
+ }
25541
+ ],
25542
+ "query": [],
25543
+ "body": {
25544
+ "required": true,
25545
+ "fields": []
25546
+ }
25547
+ },
25516
25548
  {
25517
25549
  "resource": "sandbox.sandboxes",
25518
25550
  "method": "connect",
@@ -26025,7 +26057,7 @@ export const operations = [
26025
26057
  "resource": "sandbox.sandboxes.commands",
26026
26058
  "method": "run",
26027
26059
  "summary": "Run a command in the sandbox",
26028
- "description": "Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {\"cmd\":\"echo hi\"}.",
26060
+ "description": "Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. On an android sandbox the command runs in the phone's root shell, its stderr is merged into stdout (read stdout and expect stderr to come back empty), and background mode is unavailable. Example body: {\"cmd\":\"echo hi\"}.",
26029
26061
  "http": "POST",
26030
26062
  "path": "/sandbox/v1/sandboxes/{sandbox_id}/commands",
26031
26063
  "streaming": "no",