@shardflux/sdk 0.14.0 → 0.16.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +85 -23
  2. package/README.md +226 -7
  3. package/dist/account.d.ts +2 -0
  4. package/dist/account.js +6 -0
  5. package/dist/cell.d.ts +27 -0
  6. package/dist/cell.js +71 -0
  7. package/dist/client.d.ts +54 -5
  8. package/dist/client.js +100 -7
  9. package/dist/computer.d.ts +153 -0
  10. package/dist/computer.js +229 -0
  11. package/dist/errors.d.ts +5 -1
  12. package/dist/errors.js +9 -0
  13. package/dist/executions.d.ts +2 -6
  14. package/dist/executions.js +9 -0
  15. package/dist/exit-code.d.ts +7 -0
  16. package/dist/exit-code.js +12 -0
  17. package/dist/generated/app-api.d.ts +1055 -119
  18. package/dist/generated/cell-api.d.ts +334 -0
  19. package/dist/http.d.ts +7 -1
  20. package/dist/http.js +34 -13
  21. package/dist/index.d.ts +13 -6
  22. package/dist/index.js +7 -2
  23. package/dist/ports.d.ts +7 -0
  24. package/dist/ports.js +1 -1
  25. package/dist/progress.d.ts +2 -2
  26. package/dist/progress.js +1 -1
  27. package/dist/templates.d.ts +12 -0
  28. package/dist/templates.js +9 -0
  29. package/dist/testing/index.d.ts +62 -0
  30. package/dist/testing/index.js +585 -0
  31. package/dist/testing/seed.d.ts +433 -0
  32. package/dist/testing/seed.js +449 -0
  33. package/dist/tools.d.ts +21 -3
  34. package/dist/tools.js +113 -22
  35. package/dist/tunnel-assets/linux-amd64.gz +0 -0
  36. package/dist/tunnel-assets/linux-arm64.gz +0 -0
  37. package/dist/tunnel-assets.d.ts +10 -0
  38. package/dist/tunnel-assets.js +11 -0
  39. package/dist/tunnel-packet.d.ts +3 -0
  40. package/dist/tunnel-packet.js +43 -0
  41. package/dist/tunnel-pty.d.ts +86 -0
  42. package/dist/tunnel-pty.js +243 -0
  43. package/dist/tunnels.d.ts +47 -0
  44. package/dist/tunnels.js +454 -0
  45. package/dist/workspace-ref.d.ts +87 -0
  46. package/dist/workspace-ref.js +173 -0
  47. package/dist/workspace.d.ts +40 -1
  48. package/dist/workspace.js +111 -2
  49. package/package.json +7 -2
@@ -1133,6 +1133,27 @@ export interface paths {
1133
1133
  patch?: never;
1134
1134
  trace?: never;
1135
1135
  };
1136
+ "/v1/projects/{project_id}/retention": {
1137
+ parameters: {
1138
+ query?: never;
1139
+ header?: never;
1140
+ path?: never;
1141
+ cookie?: never;
1142
+ };
1143
+ /** Get project idle deletion default */
1144
+ get: operations["getV1ProjectsProjectIdRetention"];
1145
+ /**
1146
+ * Set or clear project idle deletion default
1147
+ * @description Policy {delete_after_idle_days: 1..3650, labels?: exact-match map}, or null to clear. Applies to persistent workspaces with no own policy. All labels must match. Owner/admin/member role or own project API key required.
1148
+ */
1149
+ put: operations["putV1ProjectsProjectIdRetention"];
1150
+ post?: never;
1151
+ delete?: never;
1152
+ options?: never;
1153
+ head?: never;
1154
+ patch?: never;
1155
+ trace?: never;
1156
+ };
1136
1157
  "/v1/projects/{project_id}/api-keys": {
1137
1158
  parameters: {
1138
1159
  query?: never;
@@ -1354,6 +1375,27 @@ export interface paths {
1354
1375
  patch?: never;
1355
1376
  trace?: never;
1356
1377
  };
1378
+ "/api/v1/projects/{project_id}/retention": {
1379
+ parameters: {
1380
+ query?: never;
1381
+ header?: never;
1382
+ path?: never;
1383
+ cookie?: never;
1384
+ };
1385
+ /** Get project idle deletion default */
1386
+ get: operations["getApiV1ProjectsProjectIdRetention"];
1387
+ /**
1388
+ * Set or clear project idle deletion default
1389
+ * @description Policy {delete_after_idle_days: 1..3650, labels?: exact-match map}, or null to clear. Applies to persistent workspaces with no own policy. All labels must match. Owner/admin/member role or own project API key required.
1390
+ */
1391
+ put: operations["putApiV1ProjectsProjectIdRetention"];
1392
+ post?: never;
1393
+ delete?: never;
1394
+ options?: never;
1395
+ head?: never;
1396
+ patch?: never;
1397
+ trace?: never;
1398
+ };
1357
1399
  "/api/v1/projects/{project_id}/api-keys": {
1358
1400
  parameters: {
1359
1401
  query?: never;
@@ -1513,6 +1555,26 @@ export interface paths {
1513
1555
  patch?: never;
1514
1556
  trace?: never;
1515
1557
  };
1558
+ "/v1/workspaces/{workspace_id}/retention": {
1559
+ parameters: {
1560
+ query?: never;
1561
+ header?: never;
1562
+ path?: never;
1563
+ cookie?: never;
1564
+ };
1565
+ get?: never;
1566
+ /**
1567
+ * Set or clear idle deletion retention
1568
+ * @description JSON policy {delete_after_idle_days: 1..3650}, or null to follow the project default. Persistent only (422 retention_requires_persistent); deleted workspace 409 workspace_deleted. Returns the workspace with projected deletion time.
1569
+ */
1570
+ put: operations["putV1WorkspacesWorkspaceIdRetention"];
1571
+ post?: never;
1572
+ delete?: never;
1573
+ options?: never;
1574
+ head?: never;
1575
+ patch?: never;
1576
+ trace?: never;
1577
+ };
1516
1578
  "/v1/workspaces/{workspace_id}/idle-policy": {
1517
1579
  parameters: {
1518
1580
  query?: never;
@@ -1533,6 +1595,26 @@ export interface paths {
1533
1595
  patch?: never;
1534
1596
  trace?: never;
1535
1597
  };
1598
+ "/v1/workspaces/{workspace_id}/computer-use": {
1599
+ parameters: {
1600
+ query?: never;
1601
+ header?: never;
1602
+ path?: never;
1603
+ cookie?: never;
1604
+ };
1605
+ get?: never;
1606
+ /**
1607
+ * Switch computer use on or off for the workspace (contracts §45.1)
1608
+ * @description enabled: true or false overrides the template’s switch; null follows it. While computer use is on, tool tokens carry the computer tool and the workspace desktop starts on the first computer call. Takes effect on the next tool token. 409 computer_use_unavailable when the workspace’s template version cannot run a desktop, 409 not_supported_for_mode for file-first workspaces (§29), 409 workspace_deleted. Returns the switch.
1609
+ */
1610
+ put: operations["putV1WorkspacesWorkspaceIdComputerUse"];
1611
+ post?: never;
1612
+ delete?: never;
1613
+ options?: never;
1614
+ head?: never;
1615
+ patch?: never;
1616
+ trace?: never;
1617
+ };
1536
1618
  "/v1/workspaces/{workspace_id}/suspend": {
1537
1619
  parameters: {
1538
1620
  query?: never;
@@ -1593,6 +1675,26 @@ export interface paths {
1593
1675
  patch?: never;
1594
1676
  trace?: never;
1595
1677
  };
1678
+ "/v1/workspaces/{workspace_id}/upgrade": {
1679
+ parameters: {
1680
+ query?: never;
1681
+ header?: never;
1682
+ path?: never;
1683
+ cookie?: never;
1684
+ };
1685
+ get?: never;
1686
+ put?: never;
1687
+ /**
1688
+ * Upgrade a workspace in place, preserving its disk
1689
+ * @description Opt-in cold start: preserves files, installed package files and home; drops memory and processes. now boots immediately; next_resume schedules a pinned target. Layered disks refresh the template base and guest; legacy disks upgrade memory only. Returns an upgrade operation. Errors: 409 already_current, legacy_disk_layout, upgrade_base_unavailable, not_upgradable, operation_in_progress, workspace_deleted; 422 not_supported_for_mode. Supports Idempotency-Key.
1690
+ */
1691
+ post: operations["postV1WorkspacesWorkspaceIdUpgrade"];
1692
+ delete?: never;
1693
+ options?: never;
1694
+ head?: never;
1695
+ patch?: never;
1696
+ trace?: never;
1697
+ };
1596
1698
  "/v1/workspaces/{workspace_id}/caps": {
1597
1699
  parameters: {
1598
1700
  query?: never;
@@ -1926,6 +2028,26 @@ export interface paths {
1926
2028
  patch?: never;
1927
2029
  trace?: never;
1928
2030
  };
2031
+ "/api/v1/workspaces/{workspace_id}/retention": {
2032
+ parameters: {
2033
+ query?: never;
2034
+ header?: never;
2035
+ path?: never;
2036
+ cookie?: never;
2037
+ };
2038
+ get?: never;
2039
+ /**
2040
+ * Set or clear idle deletion retention
2041
+ * @description JSON policy {delete_after_idle_days: 1..3650}, or null to follow the project default. Persistent only (422 retention_requires_persistent); deleted workspace 409 workspace_deleted. Returns the workspace with projected deletion time.
2042
+ */
2043
+ put: operations["putApiV1WorkspacesWorkspaceIdRetention"];
2044
+ post?: never;
2045
+ delete?: never;
2046
+ options?: never;
2047
+ head?: never;
2048
+ patch?: never;
2049
+ trace?: never;
2050
+ };
1929
2051
  "/api/v1/workspaces/{workspace_id}/idle-policy": {
1930
2052
  parameters: {
1931
2053
  query?: never;
@@ -1946,6 +2068,26 @@ export interface paths {
1946
2068
  patch?: never;
1947
2069
  trace?: never;
1948
2070
  };
2071
+ "/api/v1/workspaces/{workspace_id}/computer-use": {
2072
+ parameters: {
2073
+ query?: never;
2074
+ header?: never;
2075
+ path?: never;
2076
+ cookie?: never;
2077
+ };
2078
+ get?: never;
2079
+ /**
2080
+ * Switch computer use on or off for the workspace (contracts §45.1)
2081
+ * @description enabled: true or false overrides the template’s switch; null follows it. While computer use is on, tool tokens carry the computer tool and the workspace desktop starts on the first computer call. Takes effect on the next tool token. 409 computer_use_unavailable when the workspace’s template version cannot run a desktop, 409 not_supported_for_mode for file-first workspaces (§29), 409 workspace_deleted. Returns the switch.
2082
+ */
2083
+ put: operations["putApiV1WorkspacesWorkspaceIdComputerUse"];
2084
+ post?: never;
2085
+ delete?: never;
2086
+ options?: never;
2087
+ head?: never;
2088
+ patch?: never;
2089
+ trace?: never;
2090
+ };
1949
2091
  "/api/v1/workspaces/{workspace_id}/suspend": {
1950
2092
  parameters: {
1951
2093
  query?: never;
@@ -2006,6 +2148,26 @@ export interface paths {
2006
2148
  patch?: never;
2007
2149
  trace?: never;
2008
2150
  };
2151
+ "/api/v1/workspaces/{workspace_id}/upgrade": {
2152
+ parameters: {
2153
+ query?: never;
2154
+ header?: never;
2155
+ path?: never;
2156
+ cookie?: never;
2157
+ };
2158
+ get?: never;
2159
+ put?: never;
2160
+ /**
2161
+ * Upgrade a workspace in place, preserving its disk
2162
+ * @description Opt-in cold start: preserves files, installed package files and home; drops memory and processes. now boots immediately; next_resume schedules a pinned target. Layered disks refresh the template base and guest; legacy disks upgrade memory only. Returns an upgrade operation. Errors: 409 already_current, legacy_disk_layout, upgrade_base_unavailable, not_upgradable, operation_in_progress, workspace_deleted; 422 not_supported_for_mode. Supports Idempotency-Key.
2163
+ */
2164
+ post: operations["postApiV1WorkspacesWorkspaceIdUpgrade"];
2165
+ delete?: never;
2166
+ options?: never;
2167
+ head?: never;
2168
+ patch?: never;
2169
+ trace?: never;
2170
+ };
2009
2171
  "/api/v1/workspaces/{workspace_id}/caps": {
2010
2172
  parameters: {
2011
2173
  query?: never;
@@ -2251,13 +2413,13 @@ export interface paths {
2251
2413
  get?: never;
2252
2414
  /**
2253
2415
  * Expose a port of the workspace at its own HTTPS URL
2254
- * @description Serves TCP `port` inside the workspace at `https://<port>-<handle>.<ingress domain>` (contracts §39.3). The port is private: every request needs a port token (POST …/tokens), a signed link (POST …/links) or the port’s callback URL (POST …/callback). A request to a suspended workspace resumes it and is held until it runs; a parked one wakes inside the request. 201 when exposed now, 200 when it already was (unchanged: its tokens, links and callback URL stay valid). The handle is the workspace’s for good (kept when ports are closed and exposed again, across suspend, resume and reset; a fork gets none). At most 10 exposed ports: 409 conflict details.reason port_limit (details.limit 10). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2416
+ * @description Serves TCP `port` inside the workspace at `https://<port>-<handle>.<ingress domain>` (contracts §39.3). The port is private: every request needs a port token (POST …/tokens), a signed link (POST …/links) or the port’s callback URL (POST …/callback). A request to a suspended workspace resumes it and is held until it runs; a parked one wakes inside the request. 201 when exposed now, 200 when it already was (unchanged: its tokens, links and callback URL stay valid). The handle is the workspace’s for good (kept when ports are closed and exposed again, across suspend, resume and reset; a fork gets none). At most 10 exposed ports: 409 conflict details.reason port_limit (details.limit 10). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2255
2417
  */
2256
2418
  put: operations["putV1WorkspacesWorkspaceIdPortsPort"];
2257
2419
  post?: never;
2258
2420
  /**
2259
2421
  * Close an exposed port
2260
- * @description 204, also when the port was not exposed. Its tokens, links and callback URL stop working at once (the gateway caches for at most 5 s), and stay revoked if the port is exposed again. The workspace keeps its URL handle. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2422
+ * @description 204, also when the port was not exposed. Its tokens, links and callback URL stop working at once (the gateway caches for at most 5 s), and stay revoked if the port is exposed again. The workspace keeps its URL handle. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2261
2423
  */
2262
2424
  delete: operations["deleteV1WorkspacesWorkspaceIdPortsPort"];
2263
2425
  options?: never;
@@ -2274,7 +2436,7 @@ export interface paths {
2274
2436
  };
2275
2437
  /**
2276
2438
  * List the workspace’s exposed ports
2277
- * @description Ordered by port. `callback` is set when the port has a callback URL (its secret is never shown again). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2439
+ * @description Ordered by port. `callback` is set when the port has a callback URL (its secret is never shown again). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2278
2440
  */
2279
2441
  get: operations["getV1WorkspacesWorkspaceIdPorts"];
2280
2442
  put?: never;
@@ -2296,7 +2458,7 @@ export interface paths {
2296
2458
  put?: never;
2297
2459
  /**
2298
2460
  * Mint a port token for an exposed port
2299
- * @description A bearer token for requests to the port’s URL: `Authorization: Bearer <token>` (or `X-Shardflux-Token: <token>` when the app uses Authorization itself). `sfp_` + an ES256 JWS (claims iss, aud `shardflux-ports`, sub, pty, org, prj, ws, port, pxid, use `bearer`, iat, exp, jti; keys at GET /v1/.well-known/tool-token-keys). Revoked by closing the port, deleting the workspace, revoking the API key that minted it, or the minting member’s removal or role change. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2461
+ * @description A bearer token for requests to the port’s URL: `Authorization: Bearer <token>` (or `X-Shardflux-Token: <token>` when the app uses Authorization itself). `sfp_` + an ES256 JWS (claims iss, aud `shardflux-ports`, sub, pty, org, prj, ws, port, pxid, use `bearer`, iat, exp, jti; keys at GET /v1/.well-known/tool-token-keys). Revoked by closing the port, deleting the workspace, revoking the API key that minted it, or the minting member’s removal or role change. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2300
2462
  */
2301
2463
  post: operations["postV1WorkspacesWorkspaceIdPortsPortTokens"];
2302
2464
  delete?: never;
@@ -2316,7 +2478,7 @@ export interface paths {
2316
2478
  put?: never;
2317
2479
  /**
2318
2480
  * Create a signed link that opens an exposed port in a browser
2319
- * @description Opening the link sets a session cookie for the port’s host (HttpOnly, Secure, until `expires_at`) and redirects to `path`, so a person can use the app in a browser without a header. Share it like a password: anyone with the link can open the port until it expires. Revoked like a port token (closing the port, deleting the workspace, revoking the minting API key). 422 validation_failed details.field path for a path that does not start with one `/` or has characters other than printable ASCII. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2481
+ * @description Opt-in `embed: {origins: ["https://app.example.com"]}` creates a partitioned browser session with a frame-ancestors allowlist (contracts §48). Opening the link sets a session cookie for the port’s host (HttpOnly, Secure, until `expires_at`) and redirects to `path`, so a person can use the app in a browser without a header. Share it like a password: anyone with the link can open the port until it expires. Revoked like a port token (closing the port, deleting the workspace, revoking the minting API key). 422 validation_failed details.field path for a path that does not start with one `/` or has characters other than printable ASCII. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2320
2482
  */
2321
2483
  post: operations["postV1WorkspacesWorkspaceIdPortsPortLinks"];
2322
2484
  delete?: never;
@@ -2336,12 +2498,12 @@ export interface paths {
2336
2498
  put?: never;
2337
2499
  /**
2338
2500
  * Create or replace the port’s callback URL (webhooks, OAuth redirects)
2339
- * @description A URL with a secret in its path that reaches the port without a token header: register `<url><your path>` with GitHub, Slack, Stripe or an OAuth provider; a request to `/__shardflux/callback/<secret>/<rest>` reaches `/<rest>` (query kept) and wakes the workspace like any request. Creating it again replaces it (the previous URL stops working). The secret is shown only in this response (stored as a SHA-256 hash). Revoke it with DELETE, by closing the port, or by deleting the workspace; it also stops waking the workspace when its creator can no longer manage the workspace. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2501
+ * @description A URL with a secret in its path that reaches the port without a token header: register `<url><your path>` with GitHub, Slack, Stripe or an OAuth provider; a request to `/__shardflux/callback/<secret>/<rest>` reaches `/<rest>` (query kept) and wakes the workspace like any request. Creating it again replaces it (the previous URL stops working). The secret is shown only in this response (stored as a SHA-256 hash). Revoke it with DELETE, by closing the port, or by deleting the workspace; it also stops waking the workspace when its creator can no longer manage the workspace. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2340
2502
  */
2341
2503
  post: operations["postV1WorkspacesWorkspaceIdPortsPortCallback"];
2342
2504
  /**
2343
2505
  * Revoke the port’s callback URL
2344
- * @description 204, also when the port has no callback URL. The URL stops working at once (the gateway caches for at most 5 s). 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2506
+ * @description 204, also when the port has no callback URL. The URL stops working at once (the gateway caches for at most 5 s). 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2345
2507
  */
2346
2508
  delete: operations["deleteV1WorkspacesWorkspaceIdPortsPortCallback"];
2347
2509
  options?: never;
@@ -2359,13 +2521,13 @@ export interface paths {
2359
2521
  get?: never;
2360
2522
  /**
2361
2523
  * Expose a port of the workspace at its own HTTPS URL
2362
- * @description Serves TCP `port` inside the workspace at `https://<port>-<handle>.<ingress domain>` (contracts §39.3). The port is private: every request needs a port token (POST …/tokens), a signed link (POST …/links) or the port’s callback URL (POST …/callback). A request to a suspended workspace resumes it and is held until it runs; a parked one wakes inside the request. 201 when exposed now, 200 when it already was (unchanged: its tokens, links and callback URL stay valid). The handle is the workspace’s for good (kept when ports are closed and exposed again, across suspend, resume and reset; a fork gets none). At most 10 exposed ports: 409 conflict details.reason port_limit (details.limit 10). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2524
+ * @description Serves TCP `port` inside the workspace at `https://<port>-<handle>.<ingress domain>` (contracts §39.3). The port is private: every request needs a port token (POST …/tokens), a signed link (POST …/links) or the port’s callback URL (POST …/callback). A request to a suspended workspace resumes it and is held until it runs; a parked one wakes inside the request. 201 when exposed now, 200 when it already was (unchanged: its tokens, links and callback URL stay valid). The handle is the workspace’s for good (kept when ports are closed and exposed again, across suspend, resume and reset; a fork gets none). At most 10 exposed ports: 409 conflict details.reason port_limit (details.limit 10). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2363
2525
  */
2364
2526
  put: operations["putApiV1WorkspacesWorkspaceIdPortsPort"];
2365
2527
  post?: never;
2366
2528
  /**
2367
2529
  * Close an exposed port
2368
- * @description 204, also when the port was not exposed. Its tokens, links and callback URL stop working at once (the gateway caches for at most 5 s), and stay revoked if the port is exposed again. The workspace keeps its URL handle. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2530
+ * @description 204, also when the port was not exposed. Its tokens, links and callback URL stop working at once (the gateway caches for at most 5 s), and stay revoked if the port is exposed again. The workspace keeps its URL handle. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2369
2531
  */
2370
2532
  delete: operations["deleteApiV1WorkspacesWorkspaceIdPortsPort"];
2371
2533
  options?: never;
@@ -2382,7 +2544,7 @@ export interface paths {
2382
2544
  };
2383
2545
  /**
2384
2546
  * List the workspace’s exposed ports
2385
- * @description Ordered by port. `callback` is set when the port has a callback URL (its secret is never shown again). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2547
+ * @description Ordered by port. `callback` is set when the port has a callback URL (its secret is never shown again). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2386
2548
  */
2387
2549
  get: operations["getApiV1WorkspacesWorkspaceIdPorts"];
2388
2550
  put?: never;
@@ -2404,7 +2566,7 @@ export interface paths {
2404
2566
  put?: never;
2405
2567
  /**
2406
2568
  * Mint a port token for an exposed port
2407
- * @description A bearer token for requests to the port’s URL: `Authorization: Bearer <token>` (or `X-Shardflux-Token: <token>` when the app uses Authorization itself). `sfp_` + an ES256 JWS (claims iss, aud `shardflux-ports`, sub, pty, org, prj, ws, port, pxid, use `bearer`, iat, exp, jti; keys at GET /v1/.well-known/tool-token-keys). Revoked by closing the port, deleting the workspace, revoking the API key that minted it, or the minting member’s removal or role change. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2569
+ * @description A bearer token for requests to the port’s URL: `Authorization: Bearer <token>` (or `X-Shardflux-Token: <token>` when the app uses Authorization itself). `sfp_` + an ES256 JWS (claims iss, aud `shardflux-ports`, sub, pty, org, prj, ws, port, pxid, use `bearer`, iat, exp, jti; keys at GET /v1/.well-known/tool-token-keys). Revoked by closing the port, deleting the workspace, revoking the API key that minted it, or the minting member’s removal or role change. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2408
2570
  */
2409
2571
  post: operations["postApiV1WorkspacesWorkspaceIdPortsPortTokens"];
2410
2572
  delete?: never;
@@ -2424,7 +2586,7 @@ export interface paths {
2424
2586
  put?: never;
2425
2587
  /**
2426
2588
  * Create a signed link that opens an exposed port in a browser
2427
- * @description Opening the link sets a session cookie for the port’s host (HttpOnly, Secure, until `expires_at`) and redirects to `path`, so a person can use the app in a browser without a header. Share it like a password: anyone with the link can open the port until it expires. Revoked like a port token (closing the port, deleting the workspace, revoking the minting API key). 422 validation_failed details.field path for a path that does not start with one `/` or has characters other than printable ASCII. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2589
+ * @description Opt-in `embed: {origins: ["https://app.example.com"]}` creates a partitioned browser session with a frame-ancestors allowlist (contracts §48). Opening the link sets a session cookie for the port’s host (HttpOnly, Secure, until `expires_at`) and redirects to `path`, so a person can use the app in a browser without a header. Share it like a password: anyone with the link can open the port until it expires. Revoked like a port token (closing the port, deleting the workspace, revoking the minting API key). 422 validation_failed details.field path for a path that does not start with one `/` or has characters other than printable ASCII. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2428
2590
  */
2429
2591
  post: operations["postApiV1WorkspacesWorkspaceIdPortsPortLinks"];
2430
2592
  delete?: never;
@@ -2444,12 +2606,12 @@ export interface paths {
2444
2606
  put?: never;
2445
2607
  /**
2446
2608
  * Create or replace the port’s callback URL (webhooks, OAuth redirects)
2447
- * @description A URL with a secret in its path that reaches the port without a token header: register `<url><your path>` with GitHub, Slack, Stripe or an OAuth provider; a request to `/__shardflux/callback/<secret>/<rest>` reaches `/<rest>` (query kept) and wakes the workspace like any request. Creating it again replaces it (the previous URL stops working). The secret is shown only in this response (stored as a SHA-256 hash). Revoke it with DELETE, by closing the port, or by deleting the workspace; it also stops waking the workspace when its creator can no longer manage the workspace. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2609
+ * @description A URL with a secret in its path that reaches the port without a token header: register `<url><your path>` with GitHub, Slack, Stripe or an OAuth provider; a request to `/__shardflux/callback/<secret>/<rest>` reaches `/<rest>` (query kept) and wakes the workspace like any request. Creating it again replaces it (the previous URL stops working). The secret is shown only in this response (stored as a SHA-256 hash). Revoke it with DELETE, by closing the port, or by deleting the workspace; it also stops waking the workspace when its creator can no longer manage the workspace. 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2448
2610
  */
2449
2611
  post: operations["postApiV1WorkspacesWorkspaceIdPortsPortCallback"];
2450
2612
  /**
2451
2613
  * Revoke the port’s callback URL
2452
- * @description 204, also when the port has no callback URL. The URL stops working at once (the gateway caches for at most 5 s). 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535.
2614
+ * @description 204, also when the port has no callback URL. The URL stops working at once (the gateway caches for at most 5 s). 404 not_found details.reason port_not_exposed. Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port, contracts §45.5).
2453
2615
  */
2454
2616
  delete: operations["deleteApiV1WorkspacesWorkspaceIdPortsPortCallback"];
2455
2617
  options?: never;
@@ -2757,6 +2919,46 @@ export interface paths {
2757
2919
  patch?: never;
2758
2920
  trace?: never;
2759
2921
  };
2922
+ "/v1/organizations/{organization_id}/templates/{slug}/computer-use": {
2923
+ parameters: {
2924
+ query?: never;
2925
+ header?: never;
2926
+ path?: never;
2927
+ cookie?: never;
2928
+ };
2929
+ get?: never;
2930
+ /**
2931
+ * Switch computer use on or off for the workspaces of an organization template (contracts §45.1)
2932
+ * @description Every workspace of the template follows it unless the workspace sets its own value; takes effect on their next tool token. Owners and admins (sessions) or API keys of the organization with a tool permission. 403 for platform templates (switch a workspace on instead), 404 outside the organization.
2933
+ */
2934
+ put: operations["putV1OrganizationsOrganizationIdTemplatesSlugComputerUse"];
2935
+ post?: never;
2936
+ delete?: never;
2937
+ options?: never;
2938
+ head?: never;
2939
+ patch?: never;
2940
+ trace?: never;
2941
+ };
2942
+ "/v1/templates/{slug}/computer-use": {
2943
+ parameters: {
2944
+ query?: never;
2945
+ header?: never;
2946
+ path?: never;
2947
+ cookie?: never;
2948
+ };
2949
+ get?: never;
2950
+ /**
2951
+ * Switch computer use on or off for the workspaces of an organization template (contracts §45.1) (the API key’s organization)
2952
+ * @description Every workspace of the template follows it unless the workspace sets its own value; takes effect on their next tool token. Owners and admins (sessions) or API keys of the organization with a tool permission. 403 for platform templates (switch a workspace on instead), 404 outside the organization.
2953
+ */
2954
+ put: operations["putV1TemplatesSlugComputerUse"];
2955
+ post?: never;
2956
+ delete?: never;
2957
+ options?: never;
2958
+ head?: never;
2959
+ patch?: never;
2960
+ trace?: never;
2961
+ };
2760
2962
  "/v1/organizations/{organization_id}/template-builds": {
2761
2963
  parameters: {
2762
2964
  query?: never;
@@ -3095,6 +3297,26 @@ export interface paths {
3095
3297
  patch?: never;
3096
3298
  trace?: never;
3097
3299
  };
3300
+ "/api/v1/organizations/{organization_id}/templates/{slug}/computer-use": {
3301
+ parameters: {
3302
+ query?: never;
3303
+ header?: never;
3304
+ path?: never;
3305
+ cookie?: never;
3306
+ };
3307
+ get?: never;
3308
+ /**
3309
+ * Switch computer use on or off for the workspaces of an organization template (contracts §45.1)
3310
+ * @description Every workspace of the template follows it unless the workspace sets its own value; takes effect on their next tool token. Owners and admins (sessions) or API keys of the organization with a tool permission. 403 for platform templates (switch a workspace on instead), 404 outside the organization.
3311
+ */
3312
+ put: operations["putApiV1OrganizationsOrganizationIdTemplatesSlugComputerUse"];
3313
+ post?: never;
3314
+ delete?: never;
3315
+ options?: never;
3316
+ head?: never;
3317
+ patch?: never;
3318
+ trace?: never;
3319
+ };
3098
3320
  "/api/v1/organizations/{organization_id}/template-builds": {
3099
3321
  parameters: {
3100
3322
  query?: never;
@@ -5849,13 +6071,13 @@ export interface paths {
5849
6071
  };
5850
6072
  /**
5851
6073
  * Describe a hosted MCP connection request (consent page)
5852
- * @description Validates an authorization request for the hosted MCP endpoint and returns the client, where the browser goes afterwards and the projects the user may connect. 422 `validation_failed` (details.oauth_error) when the client or its redirect_uri cannot be trusted; otherwise a request with another problem still describes the client, and the POST answers it with the OAuth error.
6074
+ * @description Describes the pending authorization request /connect?request=<id> names: the client, where the browser goes afterwards and the projects the user may connect. 422 `validation_failed`: details.reason `request_expired` (unknown, expired after 15 minutes, or already answered), details.oauth_error when the client or its redirect_uri cannot be trusted, or details.redirect_to (the error redirect) for any other problem.
5853
6075
  */
5854
6076
  get: operations["getApiV1OauthAuthorization"];
5855
6077
  put?: never;
5856
6078
  /**
5857
6079
  * Approve or decline a hosted MCP connection request
5858
- * @description approve (with project_id, a project where the user is owner or admin) creates the connection: a project API key named "<client> (MCP connector)" with every tool permission, held by Shardflux for the client, and a single-use authorization code (5 minutes). deny sends access_denied. Either way the answer is redirect_to, where the browser goes next.
6080
+ * @description Answers the pending request (it is consumed). approve (with project_id, a project where the user is owner or admin; checked before the request is consumed) creates the connection: a project API key named "<client> (MCP connector)" with every tool permission, held by Shardflux for the client, and a single-use authorization code (5 minutes). deny sends access_denied. Either way the answer is redirect_to, where the browser goes next.
5859
6081
  */
5860
6082
  post: operations["postApiV1OauthAuthorization"];
5861
6083
  delete?: never;
@@ -5896,7 +6118,7 @@ export interface components {
5896
6118
  */
5897
6119
  id: string;
5898
6120
  /** @enum {string} */
5899
- kind: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
6121
+ kind: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "upgrade" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
5900
6122
  /** @enum {string} */
5901
6123
  state: "queued" | "capacity_pending" | "running" | "succeeded" | "failed" | "canceled";
5902
6124
  workspace_id: string | null;
@@ -6850,7 +7072,7 @@ export interface components {
6850
7072
  disk_gib?: number;
6851
7073
  };
6852
7074
  agent_label?: string;
6853
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
7075
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
6854
7076
  /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
6855
7077
  inputs?: {
6856
7078
  [key: string]: unknown;
@@ -6870,7 +7092,7 @@ export interface components {
6870
7092
  disk_gib?: number;
6871
7093
  };
6872
7094
  agent_label?: string;
6873
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
7095
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
6874
7096
  /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
6875
7097
  inputs?: {
6876
7098
  [key: string]: unknown;
@@ -7065,7 +7287,7 @@ export interface components {
7065
7287
  disk_gib?: number;
7066
7288
  };
7067
7289
  agent_label?: string;
7068
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
7290
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
7069
7291
  /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
7070
7292
  inputs?: {
7071
7293
  [key: string]: unknown;
@@ -7103,8 +7325,10 @@ export interface components {
7103
7325
  allocation_mode?: "fixed" | "elastic";
7104
7326
  /** @description CPU (millicores). Bounded by the plan and the template. */
7105
7327
  cpu_millis?: number;
7106
- /** @description Disk (GiB). Grow only. Bounded by the plan and the template. */
7328
+ /** @description Disk (GiB). Grow only. With at_least, a smaller or equal disk is unchanged. Bounded by the plan and the template. */
7107
7329
  disk_gib?: number;
7330
+ /** @description Only increase each named numeric resource; values at or below its current configured size leave it unchanged. The explicit allocation mode still switches. */
7331
+ at_least?: boolean;
7108
7332
  };
7109
7333
  /** @description Per resource the request named (allocation_mode and memory_mib_held report under memory): what applied now and what applies later. caps: the workspace caps every later start uses. */
7110
7334
  ResizeResult: {
@@ -7186,6 +7410,15 @@ export interface components {
7186
7410
  memory_mib_held?: number;
7187
7411
  };
7188
7412
  };
7413
+ ComputerUse: {
7414
+ /** @description Effective: tool tokens carry the computer tool (the workspace’s value, else the template’s, and the version runs a desktop). */
7415
+ enabled: boolean;
7416
+ workspace: boolean | null;
7417
+ /** @description The template’s switch for its workspaces. */
7418
+ template: boolean;
7419
+ /** @description The workspace’s template version can run a desktop (its guest agent has desktop.v1). */
7420
+ available: boolean;
7421
+ };
7189
7422
  Workspace: {
7190
7423
  /**
7191
7424
  * Format: uuid
@@ -7207,12 +7440,16 @@ export interface components {
7207
7440
  labels: {
7208
7441
  [key: string]: string;
7209
7442
  };
7443
+ retention?: {
7444
+ delete_after_idle_days: number;
7445
+ delete_at: string | null;
7446
+ } | null;
7210
7447
  /**
7211
7448
  * Format: uuid
7212
7449
  * @description UUIDv7, lowercase canonical form.
7213
7450
  */
7214
7451
  template_version_id: string;
7215
- /** @description The template version this workspace was created from (immutable), and the version its immutable paths show. */
7452
+ /** @description The workspace’s current template base (changed only by an explicit upgrade), and the version its immutable paths show. */
7216
7453
  template: {
7217
7454
  /**
7218
7455
  * Format: uuid
@@ -7314,6 +7551,15 @@ export interface components {
7314
7551
  mode: components["schemas"]["WorkspaceMode"];
7315
7552
  /** @description file_first: the latest revision of the file tree (0 = the empty tree the workspace starts with; each mutating file call or execution publishes the next one; cell file responses carry it as X-Tree-Revision). Always 0 for processful workspaces. */
7316
7553
  tree_revision: number;
7554
+ upgrade_available?: {
7555
+ memory_layout: number | null;
7556
+ guest_revision: number | null;
7557
+ template_version: number | null;
7558
+ } | null;
7559
+ upgrade_pending?: {
7560
+ [key: string]: unknown;
7561
+ } | null;
7562
+ computer_use: components["schemas"]["ComputerUse"];
7317
7563
  /**
7318
7564
  * Format: date-time
7319
7565
  * @description RFC 3339 UTC timestamp with Z.
@@ -7386,7 +7632,7 @@ export interface components {
7386
7632
  */
7387
7633
  agent_session_id: string;
7388
7634
  ownership_epoch: number;
7389
- tools: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
7635
+ tools: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
7390
7636
  cell_endpoint: string;
7391
7637
  };
7392
7638
  /** @description An exposed port of a workspace (contracts §39.3). Private: every request needs a credential. */
@@ -10198,7 +10444,7 @@ export interface operations {
10198
10444
  * @description UUIDv7, lowercase canonical form.
10199
10445
  */
10200
10446
  project_id: string;
10201
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
10447
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
10202
10448
  } | null;
10203
10449
  };
10204
10450
  };
@@ -11000,6 +11246,107 @@ export interface operations {
11000
11246
  };
11001
11247
  };
11002
11248
  };
11249
+ getV1ProjectsProjectIdRetention: {
11250
+ parameters: {
11251
+ query?: never;
11252
+ header?: never;
11253
+ path: {
11254
+ /** @description UUIDv7, lowercase canonical form. */
11255
+ project_id: string;
11256
+ };
11257
+ cookie?: never;
11258
+ };
11259
+ requestBody?: never;
11260
+ responses: {
11261
+ /** @description Default Response */
11262
+ 200: {
11263
+ headers: {
11264
+ [name: string]: unknown;
11265
+ };
11266
+ content: {
11267
+ "application/json": {
11268
+ delete_after_idle_days: number;
11269
+ labels?: {
11270
+ [key: string]: string;
11271
+ };
11272
+ } | null;
11273
+ };
11274
+ };
11275
+ /** @description Default Response */
11276
+ "4XX": {
11277
+ headers: {
11278
+ [name: string]: unknown;
11279
+ };
11280
+ content: {
11281
+ "application/json": components["schemas"]["ErrorBody"];
11282
+ };
11283
+ };
11284
+ /** @description Default Response */
11285
+ "5XX": {
11286
+ headers: {
11287
+ [name: string]: unknown;
11288
+ };
11289
+ content: {
11290
+ "application/json": components["schemas"]["ErrorBody"];
11291
+ };
11292
+ };
11293
+ };
11294
+ };
11295
+ putV1ProjectsProjectIdRetention: {
11296
+ parameters: {
11297
+ query?: never;
11298
+ header?: never;
11299
+ path: {
11300
+ /** @description UUIDv7, lowercase canonical form. */
11301
+ project_id: string;
11302
+ };
11303
+ cookie?: never;
11304
+ };
11305
+ requestBody: {
11306
+ content: {
11307
+ "application/json": {
11308
+ delete_after_idle_days: number;
11309
+ labels?: {
11310
+ [key: string]: string;
11311
+ };
11312
+ } | null;
11313
+ };
11314
+ };
11315
+ responses: {
11316
+ /** @description Default Response */
11317
+ 200: {
11318
+ headers: {
11319
+ [name: string]: unknown;
11320
+ };
11321
+ content: {
11322
+ "application/json": {
11323
+ delete_after_idle_days: number;
11324
+ labels?: {
11325
+ [key: string]: string;
11326
+ };
11327
+ } | null;
11328
+ };
11329
+ };
11330
+ /** @description Default Response */
11331
+ "4XX": {
11332
+ headers: {
11333
+ [name: string]: unknown;
11334
+ };
11335
+ content: {
11336
+ "application/json": components["schemas"]["ErrorBody"];
11337
+ };
11338
+ };
11339
+ /** @description Default Response */
11340
+ "5XX": {
11341
+ headers: {
11342
+ [name: string]: unknown;
11343
+ };
11344
+ content: {
11345
+ "application/json": components["schemas"]["ErrorBody"];
11346
+ };
11347
+ };
11348
+ };
11349
+ };
11003
11350
  getV1ProjectsProjectIdApiKeys: {
11004
11351
  parameters: {
11005
11352
  query?: {
@@ -11041,7 +11388,7 @@ export interface operations {
11041
11388
  */
11042
11389
  project_id: string;
11043
11390
  name: string;
11044
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
11391
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
11045
11392
  /**
11046
11393
  * Format: date-time
11047
11394
  * @description RFC 3339 UTC timestamp with Z.
@@ -11089,7 +11436,7 @@ export interface operations {
11089
11436
  content: {
11090
11437
  "application/json": {
11091
11438
  name: string;
11092
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
11439
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
11093
11440
  /**
11094
11441
  * Format: date-time
11095
11442
  * @description RFC 3339 UTC timestamp with Z.
@@ -11125,7 +11472,7 @@ export interface operations {
11125
11472
  */
11126
11473
  project_id: string;
11127
11474
  name: string;
11128
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
11475
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
11129
11476
  /**
11130
11477
  * Format: date-time
11131
11478
  * @description RFC 3339 UTC timestamp with Z.
@@ -11257,7 +11604,7 @@ export interface operations {
11257
11604
  * @description UUIDv7, lowercase canonical form.
11258
11605
  */
11259
11606
  project_id: string;
11260
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
11607
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
11261
11608
  } | null;
11262
11609
  };
11263
11610
  };
@@ -12000,7 +12347,112 @@ export interface operations {
12000
12347
  };
12001
12348
  };
12002
12349
  };
12003
- getApiV1ProjectsProjectId: {
12350
+ getApiV1ProjectsProjectId: {
12351
+ parameters: {
12352
+ query?: never;
12353
+ header?: never;
12354
+ path: {
12355
+ /** @description UUIDv7, lowercase canonical form. */
12356
+ project_id: string;
12357
+ };
12358
+ cookie?: never;
12359
+ };
12360
+ requestBody?: never;
12361
+ responses: {
12362
+ /** @description Default Response */
12363
+ 200: {
12364
+ headers: {
12365
+ [name: string]: unknown;
12366
+ };
12367
+ content: {
12368
+ "application/json": {
12369
+ /**
12370
+ * Format: uuid
12371
+ * @description UUIDv7, lowercase canonical form.
12372
+ */
12373
+ id: string;
12374
+ /**
12375
+ * Format: uuid
12376
+ * @description UUIDv7, lowercase canonical form.
12377
+ */
12378
+ organization_id: string;
12379
+ name: string;
12380
+ slug: string;
12381
+ /**
12382
+ * Format: date-time
12383
+ * @description RFC 3339 UTC timestamp with Z.
12384
+ */
12385
+ created_at: string;
12386
+ };
12387
+ };
12388
+ };
12389
+ /** @description Default Response */
12390
+ "4XX": {
12391
+ headers: {
12392
+ [name: string]: unknown;
12393
+ };
12394
+ content: {
12395
+ "application/json": components["schemas"]["ErrorBody"];
12396
+ };
12397
+ };
12398
+ /** @description Default Response */
12399
+ "5XX": {
12400
+ headers: {
12401
+ [name: string]: unknown;
12402
+ };
12403
+ content: {
12404
+ "application/json": components["schemas"]["ErrorBody"];
12405
+ };
12406
+ };
12407
+ };
12408
+ };
12409
+ getApiV1ProjectsProjectIdRetention: {
12410
+ parameters: {
12411
+ query?: never;
12412
+ header?: never;
12413
+ path: {
12414
+ /** @description UUIDv7, lowercase canonical form. */
12415
+ project_id: string;
12416
+ };
12417
+ cookie?: never;
12418
+ };
12419
+ requestBody?: never;
12420
+ responses: {
12421
+ /** @description Default Response */
12422
+ 200: {
12423
+ headers: {
12424
+ [name: string]: unknown;
12425
+ };
12426
+ content: {
12427
+ "application/json": {
12428
+ delete_after_idle_days: number;
12429
+ labels?: {
12430
+ [key: string]: string;
12431
+ };
12432
+ } | null;
12433
+ };
12434
+ };
12435
+ /** @description Default Response */
12436
+ "4XX": {
12437
+ headers: {
12438
+ [name: string]: unknown;
12439
+ };
12440
+ content: {
12441
+ "application/json": components["schemas"]["ErrorBody"];
12442
+ };
12443
+ };
12444
+ /** @description Default Response */
12445
+ "5XX": {
12446
+ headers: {
12447
+ [name: string]: unknown;
12448
+ };
12449
+ content: {
12450
+ "application/json": components["schemas"]["ErrorBody"];
12451
+ };
12452
+ };
12453
+ };
12454
+ };
12455
+ putApiV1ProjectsProjectIdRetention: {
12004
12456
  parameters: {
12005
12457
  query?: never;
12006
12458
  header?: never;
@@ -12010,7 +12462,16 @@ export interface operations {
12010
12462
  };
12011
12463
  cookie?: never;
12012
12464
  };
12013
- requestBody?: never;
12465
+ requestBody: {
12466
+ content: {
12467
+ "application/json": {
12468
+ delete_after_idle_days: number;
12469
+ labels?: {
12470
+ [key: string]: string;
12471
+ };
12472
+ } | null;
12473
+ };
12474
+ };
12014
12475
  responses: {
12015
12476
  /** @description Default Response */
12016
12477
  200: {
@@ -12019,24 +12480,11 @@ export interface operations {
12019
12480
  };
12020
12481
  content: {
12021
12482
  "application/json": {
12022
- /**
12023
- * Format: uuid
12024
- * @description UUIDv7, lowercase canonical form.
12025
- */
12026
- id: string;
12027
- /**
12028
- * Format: uuid
12029
- * @description UUIDv7, lowercase canonical form.
12030
- */
12031
- organization_id: string;
12032
- name: string;
12033
- slug: string;
12034
- /**
12035
- * Format: date-time
12036
- * @description RFC 3339 UTC timestamp with Z.
12037
- */
12038
- created_at: string;
12039
- };
12483
+ delete_after_idle_days: number;
12484
+ labels?: {
12485
+ [key: string]: string;
12486
+ };
12487
+ } | null;
12040
12488
  };
12041
12489
  };
12042
12490
  /** @description Default Response */
@@ -12100,7 +12548,7 @@ export interface operations {
12100
12548
  */
12101
12549
  project_id: string;
12102
12550
  name: string;
12103
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12551
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
12104
12552
  /**
12105
12553
  * Format: date-time
12106
12554
  * @description RFC 3339 UTC timestamp with Z.
@@ -12148,7 +12596,7 @@ export interface operations {
12148
12596
  content: {
12149
12597
  "application/json": {
12150
12598
  name: string;
12151
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12599
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
12152
12600
  /**
12153
12601
  * Format: date-time
12154
12602
  * @description RFC 3339 UTC timestamp with Z.
@@ -12184,7 +12632,7 @@ export interface operations {
12184
12632
  */
12185
12633
  project_id: string;
12186
12634
  name: string;
12187
- tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12635
+ tool_permissions: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
12188
12636
  /**
12189
12637
  * Format: date-time
12190
12638
  * @description RFC 3339 UTC timestamp with Z.
@@ -12284,10 +12732,11 @@ export interface operations {
12284
12732
  /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. Given caps replace the stored ones (a reopen keeps an elastic workspace’s mode when elastic is the organization’s default and allocation_mode is omitted). */
12285
12733
  caps?: {
12286
12734
  cpu_millis?: number;
12735
+ /** @description Fixed: size in MiB; omitted uses the template default (template defaults.memory_mib, else manifest default_caps.memory_mib_base, else 1024), bounded by plan and template. Elastic: maximum memory promise. */
12287
12736
  memory_mib?: number;
12288
12737
  disk_gib?: number;
12289
12738
  /**
12290
- * @description Memory allocation (contracts §32): fixed boots memory_mib and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
12739
+ * @description Memory allocation (contracts §32): fixed boots memory_mib (the template default when omitted) and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
12291
12740
  * @enum {string}
12292
12741
  */
12293
12742
  allocation_mode?: "fixed" | "elastic";
@@ -12301,7 +12750,7 @@ export interface operations {
12301
12750
  project_id?: string;
12302
12751
  /** @description Attribution label; one agent session per (workspace, principal, label). */
12303
12752
  agent_label?: string;
12304
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12753
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
12305
12754
  /** @description Secret names bound to the workspace (max 50, unique): injected as environment variables into every exec and PTY start (terminal sessions included), together with the call’s own `secret_refs`. Each must name a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names. */
12306
12755
  secrets?: string[];
12307
12756
  /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
@@ -12311,7 +12760,12 @@ export interface operations {
12311
12760
  lifetime?: components["schemas"]["WorkspaceLifetime"];
12312
12761
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
12313
12762
  idle_policy?: string;
12763
+ retention?: {
12764
+ delete_after_idle_days: number;
12765
+ };
12314
12766
  mode?: components["schemas"]["WorkspaceMode"];
12767
+ /** @description Contracts §45.1: the workspace’s computer use switch (null follows the template); set on create, replaced on an existing key when given. */
12768
+ computer_use?: boolean | null;
12315
12769
  };
12316
12770
  };
12317
12771
  };
@@ -12327,6 +12781,8 @@ export interface operations {
12327
12781
  operation: components["schemas"]["Operation"] | null;
12328
12782
  cell_endpoint: string | null;
12329
12783
  tool_token: components["schemas"]["ToolToken"] | null;
12784
+ /** @description Contracts §46.2: true when this request created the workspace (a new key, or a key whose session ended), false when it reconnected to or resumed an existing one. Of concurrent opens of one new key exactly one says true; a replay with the same Idempotency-Key repeats it. */
12785
+ created: boolean;
12330
12786
  };
12331
12787
  };
12332
12788
  };
@@ -12341,6 +12797,8 @@ export interface operations {
12341
12797
  operation: components["schemas"]["Operation"] | null;
12342
12798
  cell_endpoint: string | null;
12343
12799
  tool_token: components["schemas"]["ToolToken"] | null;
12800
+ /** @description Contracts §46.2: true when this request created the workspace (a new key, or a key whose session ended), false when it reconnected to or resumed an existing one. Of concurrent opens of one new key exactly one says true; a replay with the same Idempotency-Key repeats it. */
12801
+ created: boolean;
12344
12802
  };
12345
12803
  };
12346
12804
  };
@@ -12659,6 +13117,53 @@ export interface operations {
12659
13117
  };
12660
13118
  };
12661
13119
  };
13120
+ putV1WorkspacesWorkspaceIdRetention: {
13121
+ parameters: {
13122
+ query?: never;
13123
+ header?: never;
13124
+ path: {
13125
+ /** @description UUIDv7, lowercase canonical form. */
13126
+ workspace_id: string;
13127
+ };
13128
+ cookie?: never;
13129
+ };
13130
+ requestBody: {
13131
+ content: {
13132
+ "application/json": {
13133
+ delete_after_idle_days: number;
13134
+ } | null;
13135
+ };
13136
+ };
13137
+ responses: {
13138
+ /** @description Default Response */
13139
+ 200: {
13140
+ headers: {
13141
+ [name: string]: unknown;
13142
+ };
13143
+ content: {
13144
+ "application/json": components["schemas"]["Workspace"];
13145
+ };
13146
+ };
13147
+ /** @description Default Response */
13148
+ "4XX": {
13149
+ headers: {
13150
+ [name: string]: unknown;
13151
+ };
13152
+ content: {
13153
+ "application/json": components["schemas"]["ErrorBody"];
13154
+ };
13155
+ };
13156
+ /** @description Default Response */
13157
+ "5XX": {
13158
+ headers: {
13159
+ [name: string]: unknown;
13160
+ };
13161
+ content: {
13162
+ "application/json": components["schemas"]["ErrorBody"];
13163
+ };
13164
+ };
13165
+ };
13166
+ };
12662
13167
  putV1WorkspacesWorkspaceIdIdlePolicy: {
12663
13168
  parameters: {
12664
13169
  query?: never;
@@ -12706,6 +13211,54 @@ export interface operations {
12706
13211
  };
12707
13212
  };
12708
13213
  };
13214
+ putV1WorkspacesWorkspaceIdComputerUse: {
13215
+ parameters: {
13216
+ query?: never;
13217
+ header?: never;
13218
+ path: {
13219
+ /** @description UUIDv7, lowercase canonical form. */
13220
+ workspace_id: string;
13221
+ };
13222
+ cookie?: never;
13223
+ };
13224
+ requestBody: {
13225
+ content: {
13226
+ "application/json": {
13227
+ /** @description true or false overrides the template; null follows it. */
13228
+ enabled: boolean | null;
13229
+ };
13230
+ };
13231
+ };
13232
+ responses: {
13233
+ /** @description Default Response */
13234
+ 200: {
13235
+ headers: {
13236
+ [name: string]: unknown;
13237
+ };
13238
+ content: {
13239
+ "application/json": components["schemas"]["ComputerUse"];
13240
+ };
13241
+ };
13242
+ /** @description Default Response */
13243
+ "4XX": {
13244
+ headers: {
13245
+ [name: string]: unknown;
13246
+ };
13247
+ content: {
13248
+ "application/json": components["schemas"]["ErrorBody"];
13249
+ };
13250
+ };
13251
+ /** @description Default Response */
13252
+ "5XX": {
13253
+ headers: {
13254
+ [name: string]: unknown;
13255
+ };
13256
+ content: {
13257
+ "application/json": components["schemas"]["ErrorBody"];
13258
+ };
13259
+ };
13260
+ };
13261
+ };
12709
13262
  postV1WorkspacesWorkspaceIdSuspend: {
12710
13263
  parameters: {
12711
13264
  query?: never;
@@ -12769,7 +13322,7 @@ export interface operations {
12769
13322
  "application/json": {
12770
13323
  /** @description Attribution label; one agent session per (workspace, principal, label). */
12771
13324
  agent_label?: string;
12772
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
13325
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
12773
13326
  };
12774
13327
  };
12775
13328
  };
@@ -12870,6 +13423,57 @@ export interface operations {
12870
13423
  };
12871
13424
  };
12872
13425
  };
13426
+ postV1WorkspacesWorkspaceIdUpgrade: {
13427
+ parameters: {
13428
+ query?: never;
13429
+ header?: never;
13430
+ path: {
13431
+ /** @description UUIDv7, lowercase canonical form. */
13432
+ workspace_id: string;
13433
+ };
13434
+ cookie?: never;
13435
+ };
13436
+ requestBody: {
13437
+ content: {
13438
+ "application/json": {
13439
+ /** @enum {string} */
13440
+ at?: "now" | "next_resume";
13441
+ };
13442
+ };
13443
+ };
13444
+ responses: {
13445
+ /** @description Default Response */
13446
+ 202: {
13447
+ headers: {
13448
+ [name: string]: unknown;
13449
+ };
13450
+ content: {
13451
+ "application/json": {
13452
+ operation: components["schemas"]["Operation"];
13453
+ workspace: components["schemas"]["Workspace"];
13454
+ };
13455
+ };
13456
+ };
13457
+ /** @description Default Response */
13458
+ "4XX": {
13459
+ headers: {
13460
+ [name: string]: unknown;
13461
+ };
13462
+ content: {
13463
+ "application/json": components["schemas"]["ErrorBody"];
13464
+ };
13465
+ };
13466
+ /** @description Default Response */
13467
+ "5XX": {
13468
+ headers: {
13469
+ [name: string]: unknown;
13470
+ };
13471
+ content: {
13472
+ "application/json": components["schemas"]["ErrorBody"];
13473
+ };
13474
+ };
13475
+ };
13476
+ };
12873
13477
  patchV1WorkspacesWorkspaceIdCaps: {
12874
13478
  parameters: {
12875
13479
  query?: never;
@@ -13043,10 +13647,11 @@ export interface operations {
13043
13647
  /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. Given caps replace the stored ones (a reopen keeps an elastic workspace’s mode when elastic is the organization’s default and allocation_mode is omitted). */
13044
13648
  caps?: {
13045
13649
  cpu_millis?: number;
13650
+ /** @description Fixed: size in MiB; omitted uses the template default (template defaults.memory_mib, else manifest default_caps.memory_mib_base, else 1024), bounded by plan and template. Elastic: maximum memory promise. */
13046
13651
  memory_mib?: number;
13047
13652
  disk_gib?: number;
13048
13653
  /**
13049
- * @description Memory allocation (contracts §32): fixed boots memory_mib and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
13654
+ * @description Memory allocation (contracts §32): fixed boots memory_mib (the template default when omitted) and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
13050
13655
  * @enum {string}
13051
13656
  */
13052
13657
  allocation_mode?: "fixed" | "elastic";
@@ -13056,7 +13661,7 @@ export interface operations {
13056
13661
  lifetime?: components["schemas"]["WorkspaceLifetime"];
13057
13662
  /** @description Attribution label; one agent session per (workspace, principal, label). */
13058
13663
  agent_label?: string;
13059
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
13664
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
13060
13665
  };
13061
13666
  };
13062
13667
  };
@@ -13306,7 +13911,7 @@ export interface operations {
13306
13911
  limit?: number;
13307
13912
  cursor?: string;
13308
13913
  state?: "queued" | "capacity_pending" | "running" | "succeeded" | "failed" | "canceled";
13309
- kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
13914
+ kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "upgrade" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
13310
13915
  };
13311
13916
  header?: never;
13312
13917
  path: {
@@ -13364,7 +13969,7 @@ export interface operations {
13364
13969
  "application/json": {
13365
13970
  /** @description Attribution label; one agent session per (workspace, principal, label). */
13366
13971
  agent_label?: string;
13367
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
13972
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
13368
13973
  };
13369
13974
  };
13370
13975
  };
@@ -13568,10 +14173,11 @@ export interface operations {
13568
14173
  /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. Given caps replace the stored ones (a reopen keeps an elastic workspace’s mode when elastic is the organization’s default and allocation_mode is omitted). */
13569
14174
  caps?: {
13570
14175
  cpu_millis?: number;
14176
+ /** @description Fixed: size in MiB; omitted uses the template default (template defaults.memory_mib, else manifest default_caps.memory_mib_base, else 1024), bounded by plan and template. Elastic: maximum memory promise. */
13571
14177
  memory_mib?: number;
13572
14178
  disk_gib?: number;
13573
14179
  /**
13574
- * @description Memory allocation (contracts §32): fixed boots memory_mib and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
14180
+ * @description Memory allocation (contracts §32): fixed boots memory_mib (the template default when omitted) and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
13575
14181
  * @enum {string}
13576
14182
  */
13577
14183
  allocation_mode?: "fixed" | "elastic";
@@ -13585,7 +14191,7 @@ export interface operations {
13585
14191
  project_id?: string;
13586
14192
  /** @description Attribution label; one agent session per (workspace, principal, label). */
13587
14193
  agent_label?: string;
13588
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
14194
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
13589
14195
  /** @description Secret names bound to the workspace (max 50, unique): injected as environment variables into every exec and PTY start (terminal sessions included), together with the call’s own `secret_refs`. Each must name a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names. */
13590
14196
  secrets?: string[];
13591
14197
  /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
@@ -13595,7 +14201,12 @@ export interface operations {
13595
14201
  lifetime?: components["schemas"]["WorkspaceLifetime"];
13596
14202
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
13597
14203
  idle_policy?: string;
14204
+ retention?: {
14205
+ delete_after_idle_days: number;
14206
+ };
13598
14207
  mode?: components["schemas"]["WorkspaceMode"];
14208
+ /** @description Contracts §45.1: the workspace’s computer use switch (null follows the template); set on create, replaced on an existing key when given. */
14209
+ computer_use?: boolean | null;
13599
14210
  };
13600
14211
  };
13601
14212
  };
@@ -13611,6 +14222,8 @@ export interface operations {
13611
14222
  operation: components["schemas"]["Operation"] | null;
13612
14223
  cell_endpoint: string | null;
13613
14224
  tool_token: components["schemas"]["ToolToken"] | null;
14225
+ /** @description Contracts §46.2: true when this request created the workspace (a new key, or a key whose session ended), false when it reconnected to or resumed an existing one. Of concurrent opens of one new key exactly one says true; a replay with the same Idempotency-Key repeats it. */
14226
+ created: boolean;
13614
14227
  };
13615
14228
  };
13616
14229
  };
@@ -13625,6 +14238,8 @@ export interface operations {
13625
14238
  operation: components["schemas"]["Operation"] | null;
13626
14239
  cell_endpoint: string | null;
13627
14240
  tool_token: components["schemas"]["ToolToken"] | null;
14241
+ /** @description Contracts §46.2: true when this request created the workspace (a new key, or a key whose session ended), false when it reconnected to or resumed an existing one. Of concurrent opens of one new key exactly one says true; a replay with the same Idempotency-Key repeats it. */
14242
+ created: boolean;
13628
14243
  };
13629
14244
  };
13630
14245
  };
@@ -13767,7 +14382,92 @@ export interface operations {
13767
14382
  };
13768
14383
  };
13769
14384
  };
13770
- getApiV1WorkspacesWorkspaceId: {
14385
+ getApiV1WorkspacesWorkspaceId: {
14386
+ parameters: {
14387
+ query?: never;
14388
+ header?: never;
14389
+ path: {
14390
+ /** @description UUIDv7, lowercase canonical form. */
14391
+ workspace_id: string;
14392
+ };
14393
+ cookie?: never;
14394
+ };
14395
+ requestBody?: never;
14396
+ responses: {
14397
+ /** @description Default Response */
14398
+ 200: {
14399
+ headers: {
14400
+ [name: string]: unknown;
14401
+ };
14402
+ content: {
14403
+ "application/json": components["schemas"]["Workspace"];
14404
+ };
14405
+ };
14406
+ /** @description Default Response */
14407
+ "4XX": {
14408
+ headers: {
14409
+ [name: string]: unknown;
14410
+ };
14411
+ content: {
14412
+ "application/json": components["schemas"]["ErrorBody"];
14413
+ };
14414
+ };
14415
+ /** @description Default Response */
14416
+ "5XX": {
14417
+ headers: {
14418
+ [name: string]: unknown;
14419
+ };
14420
+ content: {
14421
+ "application/json": components["schemas"]["ErrorBody"];
14422
+ };
14423
+ };
14424
+ };
14425
+ };
14426
+ deleteApiV1WorkspacesWorkspaceId: {
14427
+ parameters: {
14428
+ query?: never;
14429
+ header?: never;
14430
+ path: {
14431
+ /** @description UUIDv7, lowercase canonical form. */
14432
+ workspace_id: string;
14433
+ };
14434
+ cookie?: never;
14435
+ };
14436
+ requestBody?: never;
14437
+ responses: {
14438
+ /** @description Default Response */
14439
+ 202: {
14440
+ headers: {
14441
+ [name: string]: unknown;
14442
+ };
14443
+ content: {
14444
+ "application/json": {
14445
+ operation: components["schemas"]["Operation"];
14446
+ workspace: components["schemas"]["Workspace"];
14447
+ };
14448
+ };
14449
+ };
14450
+ /** @description Default Response */
14451
+ "4XX": {
14452
+ headers: {
14453
+ [name: string]: unknown;
14454
+ };
14455
+ content: {
14456
+ "application/json": components["schemas"]["ErrorBody"];
14457
+ };
14458
+ };
14459
+ /** @description Default Response */
14460
+ "5XX": {
14461
+ headers: {
14462
+ [name: string]: unknown;
14463
+ };
14464
+ content: {
14465
+ "application/json": components["schemas"]["ErrorBody"];
14466
+ };
14467
+ };
14468
+ };
14469
+ };
14470
+ getApiV1WorkspacesWorkspaceIdInputs: {
13771
14471
  parameters: {
13772
14472
  query?: never;
13773
14473
  header?: never;
@@ -13785,7 +14485,7 @@ export interface operations {
13785
14485
  [name: string]: unknown;
13786
14486
  };
13787
14487
  content: {
13788
- "application/json": components["schemas"]["Workspace"];
14488
+ "application/json": components["schemas"]["WorkspaceInputs"];
13789
14489
  };
13790
14490
  };
13791
14491
  /** @description Default Response */
@@ -13808,7 +14508,7 @@ export interface operations {
13808
14508
  };
13809
14509
  };
13810
14510
  };
13811
- deleteApiV1WorkspacesWorkspaceId: {
14511
+ putApiV1WorkspacesWorkspaceIdLabels: {
13812
14512
  parameters: {
13813
14513
  query?: never;
13814
14514
  header?: never;
@@ -13818,18 +14518,24 @@ export interface operations {
13818
14518
  };
13819
14519
  cookie?: never;
13820
14520
  };
13821
- requestBody?: never;
14521
+ requestBody: {
14522
+ content: {
14523
+ "application/json": {
14524
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
14525
+ labels: {
14526
+ [key: string]: string;
14527
+ };
14528
+ };
14529
+ };
14530
+ };
13822
14531
  responses: {
13823
14532
  /** @description Default Response */
13824
- 202: {
14533
+ 200: {
13825
14534
  headers: {
13826
14535
  [name: string]: unknown;
13827
14536
  };
13828
14537
  content: {
13829
- "application/json": {
13830
- operation: components["schemas"]["Operation"];
13831
- workspace: components["schemas"]["Workspace"];
13832
- };
14538
+ "application/json": components["schemas"]["Workspace"];
13833
14539
  };
13834
14540
  };
13835
14541
  /** @description Default Response */
@@ -13852,7 +14558,7 @@ export interface operations {
13852
14558
  };
13853
14559
  };
13854
14560
  };
13855
- getApiV1WorkspacesWorkspaceIdInputs: {
14561
+ putApiV1WorkspacesWorkspaceIdRetention: {
13856
14562
  parameters: {
13857
14563
  query?: never;
13858
14564
  header?: never;
@@ -13862,7 +14568,13 @@ export interface operations {
13862
14568
  };
13863
14569
  cookie?: never;
13864
14570
  };
13865
- requestBody?: never;
14571
+ requestBody: {
14572
+ content: {
14573
+ "application/json": {
14574
+ delete_after_idle_days: number;
14575
+ } | null;
14576
+ };
14577
+ };
13866
14578
  responses: {
13867
14579
  /** @description Default Response */
13868
14580
  200: {
@@ -13870,7 +14582,7 @@ export interface operations {
13870
14582
  [name: string]: unknown;
13871
14583
  };
13872
14584
  content: {
13873
- "application/json": components["schemas"]["WorkspaceInputs"];
14585
+ "application/json": components["schemas"]["Workspace"];
13874
14586
  };
13875
14587
  };
13876
14588
  /** @description Default Response */
@@ -13893,7 +14605,7 @@ export interface operations {
13893
14605
  };
13894
14606
  };
13895
14607
  };
13896
- putApiV1WorkspacesWorkspaceIdLabels: {
14608
+ putApiV1WorkspacesWorkspaceIdIdlePolicy: {
13897
14609
  parameters: {
13898
14610
  query?: never;
13899
14611
  header?: never;
@@ -13906,10 +14618,7 @@ export interface operations {
13906
14618
  requestBody: {
13907
14619
  content: {
13908
14620
  "application/json": {
13909
- /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
13910
- labels: {
13911
- [key: string]: string;
13912
- };
14621
+ idle_policy: string | null;
13913
14622
  };
13914
14623
  };
13915
14624
  };
@@ -13943,7 +14652,7 @@ export interface operations {
13943
14652
  };
13944
14653
  };
13945
14654
  };
13946
- putApiV1WorkspacesWorkspaceIdIdlePolicy: {
14655
+ putApiV1WorkspacesWorkspaceIdComputerUse: {
13947
14656
  parameters: {
13948
14657
  query?: never;
13949
14658
  header?: never;
@@ -13956,7 +14665,8 @@ export interface operations {
13956
14665
  requestBody: {
13957
14666
  content: {
13958
14667
  "application/json": {
13959
- idle_policy: string | null;
14668
+ /** @description true or false overrides the template; null follows it. */
14669
+ enabled: boolean | null;
13960
14670
  };
13961
14671
  };
13962
14672
  };
@@ -13967,7 +14677,7 @@ export interface operations {
13967
14677
  [name: string]: unknown;
13968
14678
  };
13969
14679
  content: {
13970
- "application/json": components["schemas"]["Workspace"];
14680
+ "application/json": components["schemas"]["ComputerUse"];
13971
14681
  };
13972
14682
  };
13973
14683
  /** @description Default Response */
@@ -14053,7 +14763,7 @@ export interface operations {
14053
14763
  "application/json": {
14054
14764
  /** @description Attribution label; one agent session per (workspace, principal, label). */
14055
14765
  agent_label?: string;
14056
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
14766
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
14057
14767
  };
14058
14768
  };
14059
14769
  };
@@ -14154,6 +14864,57 @@ export interface operations {
14154
14864
  };
14155
14865
  };
14156
14866
  };
14867
+ postApiV1WorkspacesWorkspaceIdUpgrade: {
14868
+ parameters: {
14869
+ query?: never;
14870
+ header?: never;
14871
+ path: {
14872
+ /** @description UUIDv7, lowercase canonical form. */
14873
+ workspace_id: string;
14874
+ };
14875
+ cookie?: never;
14876
+ };
14877
+ requestBody: {
14878
+ content: {
14879
+ "application/json": {
14880
+ /** @enum {string} */
14881
+ at?: "now" | "next_resume";
14882
+ };
14883
+ };
14884
+ };
14885
+ responses: {
14886
+ /** @description Default Response */
14887
+ 202: {
14888
+ headers: {
14889
+ [name: string]: unknown;
14890
+ };
14891
+ content: {
14892
+ "application/json": {
14893
+ operation: components["schemas"]["Operation"];
14894
+ workspace: components["schemas"]["Workspace"];
14895
+ };
14896
+ };
14897
+ };
14898
+ /** @description Default Response */
14899
+ "4XX": {
14900
+ headers: {
14901
+ [name: string]: unknown;
14902
+ };
14903
+ content: {
14904
+ "application/json": components["schemas"]["ErrorBody"];
14905
+ };
14906
+ };
14907
+ /** @description Default Response */
14908
+ "5XX": {
14909
+ headers: {
14910
+ [name: string]: unknown;
14911
+ };
14912
+ content: {
14913
+ "application/json": components["schemas"]["ErrorBody"];
14914
+ };
14915
+ };
14916
+ };
14917
+ };
14157
14918
  patchApiV1WorkspacesWorkspaceIdCaps: {
14158
14919
  parameters: {
14159
14920
  query?: never;
@@ -14327,10 +15088,11 @@ export interface operations {
14327
15088
  /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. Given caps replace the stored ones (a reopen keeps an elastic workspace’s mode when elastic is the organization’s default and allocation_mode is omitted). */
14328
15089
  caps?: {
14329
15090
  cpu_millis?: number;
15091
+ /** @description Fixed: size in MiB; omitted uses the template default (template defaults.memory_mib, else manifest default_caps.memory_mib_base, else 1024), bounded by plan and template. Elastic: maximum memory promise. */
14330
15092
  memory_mib?: number;
14331
15093
  disk_gib?: number;
14332
15094
  /**
14333
- * @description Memory allocation (contracts §32): fixed boots memory_mib and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
15095
+ * @description Memory allocation (contracts §32): fixed boots memory_mib (the template default when omitted) and holds it; elastic makes memory_mib a promise: the VM holds memory_mib_held while idle and is grown towards the promise when a command needs it. Needs the elastic memory entitlement (422 details.reason allocation_mode_not_available). A promise that does not exceed the held floor by at least 512 MiB is fixed at the promise (the response caps say which). Omitted: fixed, or elastic where that is the organization’s default (a reopen then keeps the stored mode). Takes effect at the next VM start.
14334
15096
  * @enum {string}
14335
15097
  */
14336
15098
  allocation_mode?: "fixed" | "elastic";
@@ -14340,7 +15102,7 @@ export interface operations {
14340
15102
  lifetime?: components["schemas"]["WorkspaceLifetime"];
14341
15103
  /** @description Attribution label; one agent session per (workspace, principal, label). */
14342
15104
  agent_label?: string;
14343
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
15105
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
14344
15106
  };
14345
15107
  };
14346
15108
  };
@@ -14590,7 +15352,7 @@ export interface operations {
14590
15352
  limit?: number;
14591
15353
  cursor?: string;
14592
15354
  state?: "queued" | "capacity_pending" | "running" | "succeeded" | "failed" | "canceled";
14593
- kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
15355
+ kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "upgrade" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
14594
15356
  };
14595
15357
  header?: never;
14596
15358
  path: {
@@ -14648,7 +15410,7 @@ export interface operations {
14648
15410
  "application/json": {
14649
15411
  /** @description Attribution label; one agent session per (workspace, principal, label). */
14650
15412
  agent_label?: string;
14651
- tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
15413
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser" | "computer")[];
14652
15414
  };
14653
15415
  };
14654
15416
  };
@@ -14795,8 +15557,11 @@ export interface operations {
14795
15557
  * @description UUIDv7, lowercase canonical form.
14796
15558
  */
14797
15559
  workspace_id: string;
14798
- /** @enum {string} */
14799
- tool: "exec" | "files" | "pty" | "process" | "git" | "browser";
15560
+ /**
15561
+ * @description computer (contracts §45): the workspace desktop; a tool token carries it only while the workspace’s computer use is on.
15562
+ * @enum {string}
15563
+ */
15564
+ tool: "exec" | "files" | "pty" | "process" | "git" | "browser" | "computer";
14800
15565
  /**
14801
15566
  * Format: uuid
14802
15567
  * @description UUIDv7, lowercase canonical form.
@@ -15120,6 +15885,10 @@ export interface operations {
15120
15885
  * @default 86400
15121
15886
  */
15122
15887
  ttl_seconds?: number;
15888
+ /** @description Embed in these 1–10 canonical HTTPS origins, at most 2048 total origin characters. */
15889
+ embed?: {
15890
+ origins: string[];
15891
+ };
15123
15892
  /** @description Where the link lands (default `/`): a path starting with one `/`, printable ASCII, query allowed. */
15124
15893
  path?: string;
15125
15894
  };
@@ -15474,6 +16243,10 @@ export interface operations {
15474
16243
  * @default 86400
15475
16244
  */
15476
16245
  ttl_seconds?: number;
16246
+ /** @description Embed in these 1–10 canonical HTTPS origins, at most 2048 total origin characters. */
16247
+ embed?: {
16248
+ origins: string[];
16249
+ };
15477
16250
  /** @description Where the link lands (default `/`): a path starting with one `/`, printable ASCII, query allowed. */
15478
16251
  path?: string;
15479
16252
  };
@@ -16570,6 +17343,8 @@ export interface operations {
16570
17343
  memory_mib: number | null;
16571
17344
  idle_policy: string | null;
16572
17345
  };
17346
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
17347
+ computer_use: boolean;
16573
17348
  open_version: {
16574
17349
  /**
16575
17350
  * Format: uuid
@@ -16787,6 +17562,8 @@ export interface operations {
16787
17562
  memory_mib: number | null;
16788
17563
  idle_policy: string | null;
16789
17564
  };
17565
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
17566
+ computer_use: boolean;
16790
17567
  open_version: {
16791
17568
  /**
16792
17569
  * Format: uuid
@@ -17135,6 +17912,8 @@ export interface operations {
17135
17912
  memory_mib: number | null;
17136
17913
  idle_policy: string | null;
17137
17914
  };
17915
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
17916
+ computer_use: boolean;
17138
17917
  open_version: {
17139
17918
  /**
17140
17919
  * Format: uuid
@@ -17350,6 +18129,8 @@ export interface operations {
17350
18129
  memory_mib: number | null;
17351
18130
  idle_policy: string | null;
17352
18131
  };
18132
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
18133
+ computer_use: boolean;
17353
18134
  open_version: {
17354
18135
  /**
17355
18136
  * Format: uuid
@@ -17652,6 +18433,104 @@ export interface operations {
17652
18433
  };
17653
18434
  };
17654
18435
  };
18436
+ putV1OrganizationsOrganizationIdTemplatesSlugComputerUse: {
18437
+ parameters: {
18438
+ query?: never;
18439
+ header?: never;
18440
+ path: {
18441
+ /** @description UUIDv7, lowercase canonical form. */
18442
+ organization_id: string;
18443
+ slug: string;
18444
+ };
18445
+ cookie?: never;
18446
+ };
18447
+ requestBody: {
18448
+ content: {
18449
+ "application/json": {
18450
+ enabled: boolean;
18451
+ };
18452
+ };
18453
+ };
18454
+ responses: {
18455
+ /** @description Default Response */
18456
+ 200: {
18457
+ headers: {
18458
+ [name: string]: unknown;
18459
+ };
18460
+ content: {
18461
+ "application/json": {
18462
+ enabled: boolean;
18463
+ };
18464
+ };
18465
+ };
18466
+ /** @description Default Response */
18467
+ "4XX": {
18468
+ headers: {
18469
+ [name: string]: unknown;
18470
+ };
18471
+ content: {
18472
+ "application/json": components["schemas"]["ErrorBody"];
18473
+ };
18474
+ };
18475
+ /** @description Default Response */
18476
+ "5XX": {
18477
+ headers: {
18478
+ [name: string]: unknown;
18479
+ };
18480
+ content: {
18481
+ "application/json": components["schemas"]["ErrorBody"];
18482
+ };
18483
+ };
18484
+ };
18485
+ };
18486
+ putV1TemplatesSlugComputerUse: {
18487
+ parameters: {
18488
+ query?: never;
18489
+ header?: never;
18490
+ path: {
18491
+ slug: string;
18492
+ };
18493
+ cookie?: never;
18494
+ };
18495
+ requestBody: {
18496
+ content: {
18497
+ "application/json": {
18498
+ enabled: boolean;
18499
+ };
18500
+ };
18501
+ };
18502
+ responses: {
18503
+ /** @description Default Response */
18504
+ 200: {
18505
+ headers: {
18506
+ [name: string]: unknown;
18507
+ };
18508
+ content: {
18509
+ "application/json": {
18510
+ enabled: boolean;
18511
+ };
18512
+ };
18513
+ };
18514
+ /** @description Default Response */
18515
+ "4XX": {
18516
+ headers: {
18517
+ [name: string]: unknown;
18518
+ };
18519
+ content: {
18520
+ "application/json": components["schemas"]["ErrorBody"];
18521
+ };
18522
+ };
18523
+ /** @description Default Response */
18524
+ "5XX": {
18525
+ headers: {
18526
+ [name: string]: unknown;
18527
+ };
18528
+ content: {
18529
+ "application/json": components["schemas"]["ErrorBody"];
18530
+ };
18531
+ };
18532
+ };
18533
+ };
17655
18534
  getV1OrganizationsOrganizationIdTemplateBuilds: {
17656
18535
  parameters: {
17657
18536
  query?: {
@@ -19735,6 +20614,8 @@ export interface operations {
19735
20614
  memory_mib: number | null;
19736
20615
  idle_policy: string | null;
19737
20616
  };
20617
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
20618
+ computer_use: boolean;
19738
20619
  open_version: {
19739
20620
  /**
19740
20621
  * Format: uuid
@@ -20081,6 +20962,8 @@ export interface operations {
20081
20962
  memory_mib: number | null;
20082
20963
  idle_policy: string | null;
20083
20964
  };
20965
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
20966
+ computer_use: boolean;
20084
20967
  open_version: {
20085
20968
  /**
20086
20969
  * Format: uuid
@@ -20432,6 +21315,8 @@ export interface operations {
20432
21315
  memory_mib: number | null;
20433
21316
  idle_policy: string | null;
20434
21317
  };
21318
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
21319
+ computer_use: boolean;
20435
21320
  open_version: {
20436
21321
  /**
20437
21322
  * Format: uuid
@@ -20649,6 +21534,8 @@ export interface operations {
20649
21534
  memory_mib: number | null;
20650
21535
  idle_policy: string | null;
20651
21536
  };
21537
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
21538
+ computer_use: boolean;
20652
21539
  open_version: {
20653
21540
  /**
20654
21541
  * Format: uuid
@@ -20951,6 +21838,56 @@ export interface operations {
20951
21838
  };
20952
21839
  };
20953
21840
  };
21841
+ putApiV1OrganizationsOrganizationIdTemplatesSlugComputerUse: {
21842
+ parameters: {
21843
+ query?: never;
21844
+ header?: never;
21845
+ path: {
21846
+ /** @description UUIDv7, lowercase canonical form. */
21847
+ organization_id: string;
21848
+ slug: string;
21849
+ };
21850
+ cookie?: never;
21851
+ };
21852
+ requestBody: {
21853
+ content: {
21854
+ "application/json": {
21855
+ enabled: boolean;
21856
+ };
21857
+ };
21858
+ };
21859
+ responses: {
21860
+ /** @description Default Response */
21861
+ 200: {
21862
+ headers: {
21863
+ [name: string]: unknown;
21864
+ };
21865
+ content: {
21866
+ "application/json": {
21867
+ enabled: boolean;
21868
+ };
21869
+ };
21870
+ };
21871
+ /** @description Default Response */
21872
+ "4XX": {
21873
+ headers: {
21874
+ [name: string]: unknown;
21875
+ };
21876
+ content: {
21877
+ "application/json": components["schemas"]["ErrorBody"];
21878
+ };
21879
+ };
21880
+ /** @description Default Response */
21881
+ "5XX": {
21882
+ headers: {
21883
+ [name: string]: unknown;
21884
+ };
21885
+ content: {
21886
+ "application/json": components["schemas"]["ErrorBody"];
21887
+ };
21888
+ };
21889
+ };
21890
+ };
20954
21891
  getApiV1OrganizationsOrganizationIdTemplateBuilds: {
20955
21892
  parameters: {
20956
21893
  query?: {
@@ -22854,6 +23791,8 @@ export interface operations {
22854
23791
  memory_mib: number | null;
22855
23792
  idle_policy: string | null;
22856
23793
  };
23794
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
23795
+ computer_use: boolean;
22857
23796
  open_version: {
22858
23797
  /**
22859
23798
  * Format: uuid
@@ -23200,6 +24139,8 @@ export interface operations {
23200
24139
  memory_mib: number | null;
23201
24140
  idle_policy: string | null;
23202
24141
  };
24142
+ /** @description Contracts §45.1: the template’s computer use switch for its workspaces (a workspace may override it). Set by the owning organization; platform templates are off. */
24143
+ computer_use: boolean;
23203
24144
  open_version: {
23204
24145
  /**
23205
24146
  * Format: uuid
@@ -26332,8 +27273,11 @@ export interface operations {
26332
27273
  */
26333
27274
  id: string;
26334
27275
  };
26335
- /** @enum {string} */
26336
- tool: "exec" | "files" | "pty" | "process" | "git" | "browser";
27276
+ /**
27277
+ * @description computer (contracts §45): the workspace desktop; a tool token carries it only while the workspace’s computer use is on.
27278
+ * @enum {string}
27279
+ */
27280
+ tool: "exec" | "files" | "pty" | "process" | "git" | "browser" | "computer";
26337
27281
  outcome: "granted" | "denied" | "failed";
26338
27282
  reason: string | null;
26339
27283
  ownership_epoch: number | null;
@@ -26384,8 +27328,11 @@ export interface operations {
26384
27328
  * @description UUIDv7, lowercase canonical form.
26385
27329
  */
26386
27330
  workspace_id: string;
26387
- /** @enum {string} */
26388
- tool: "exec" | "files" | "pty" | "process" | "git" | "browser";
27331
+ /**
27332
+ * @description computer (contracts §45): the workspace desktop; a tool token carries it only while the workspace’s computer use is on.
27333
+ * @enum {string}
27334
+ */
27335
+ tool: "exec" | "files" | "pty" | "process" | "git" | "browser" | "computer";
26389
27336
  /** @description The start’s `secret_refs` together with the workspace’s bound names (app.workspace_secret_bindings), each name once: at most 50 + 50. */
26390
27337
  names: string[];
26391
27338
  /** @description The cell’s exec/PTY session id, recorded for correlation. */
@@ -26406,8 +27353,11 @@ export interface operations {
26406
27353
  * @description UUIDv7, lowercase canonical form.
26407
27354
  */
26408
27355
  workspace_id: string;
26409
- /** @enum {string} */
26410
- tool: "exec" | "files" | "pty" | "process" | "git" | "browser";
27356
+ /**
27357
+ * @description computer (contracts §45): the workspace desktop; a tool token carries it only while the workspace’s computer use is on.
27358
+ * @enum {string}
27359
+ */
27360
+ tool: "exec" | "files" | "pty" | "process" | "git" | "browser" | "computer";
26411
27361
  /**
26412
27362
  * Format: uuid
26413
27363
  * @description UUIDv7, lowercase canonical form.
@@ -27420,8 +28370,11 @@ export interface operations {
27420
28370
  */
27421
28371
  id: string;
27422
28372
  };
27423
- /** @enum {string} */
27424
- tool: "exec" | "files" | "pty" | "process" | "git" | "browser";
28373
+ /**
28374
+ * @description computer (contracts §45): the workspace desktop; a tool token carries it only while the workspace’s computer use is on.
28375
+ * @enum {string}
28376
+ */
28377
+ tool: "exec" | "files" | "pty" | "process" | "git" | "browser" | "computer";
27425
28378
  outcome: "granted" | "denied" | "failed";
27426
28379
  reason: string | null;
27427
28380
  ownership_epoch: number | null;
@@ -35950,7 +36903,7 @@ export interface operations {
35950
36903
  parameters: {
35951
36904
  query?: {
35952
36905
  state?: "queued" | "capacity_pending" | "running" | "failed" | "canceled";
35953
- kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
36906
+ kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "upgrade" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
35954
36907
  /** @description UUIDv7, lowercase canonical form. */
35955
36908
  organization_id?: string;
35956
36909
  /** @description UUIDv7, lowercase canonical form. */
@@ -37944,7 +38897,7 @@ export interface operations {
37944
38897
  /** @description latency: per operation kind; psi: fleet and top hosts. */
37945
38898
  metric: "latency" | "psi";
37946
38899
  window?: "7d" | "30d" | "90d";
37947
- kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
38900
+ kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "upgrade" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
37948
38901
  };
37949
38902
  header?: never;
37950
38903
  path?: never;
@@ -38700,15 +39653,9 @@ export interface operations {
38700
39653
  };
38701
39654
  getApiV1OauthAuthorization: {
38702
39655
  parameters: {
38703
- query?: {
38704
- response_type?: string;
38705
- client_id?: string;
38706
- redirect_uri?: string;
38707
- code_challenge?: string;
38708
- code_challenge_method?: string;
38709
- scope?: string;
38710
- state?: string;
38711
- resource?: string;
39656
+ query: {
39657
+ /** @description The `request` parameter of /connect: the pending authorization request /oauth/authorize stored. */
39658
+ request: string;
38712
39659
  };
38713
39660
  header?: never;
38714
39661
  path?: never;
@@ -38755,19 +39702,8 @@ export interface operations {
38755
39702
  requestBody: {
38756
39703
  content: {
38757
39704
  "application/json": {
38758
- /** @description The authorization request exactly as /oauth/authorize received it (RFC 6749 §4.1.1, PKCE S256, RFC 8707 resource). */
38759
- request: {
38760
- response_type?: string;
38761
- client_id?: string;
38762
- redirect_uri?: string;
38763
- code_challenge?: string;
38764
- code_challenge_method?: string;
38765
- scope?: string;
38766
- state?: string;
38767
- resource?: string;
38768
- } & {
38769
- [key: string]: unknown;
38770
- };
39705
+ /** @description The `request` parameter of /connect: the pending authorization request /oauth/authorize stored. */
39706
+ request: string;
38771
39707
  decision: "approve" | "deny";
38772
39708
  /**
38773
39709
  * Format: uuid