@shardflux/sdk 0.11.1 → 0.13.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.
@@ -188,7 +188,7 @@ export interface paths {
188
188
  put?: never;
189
189
  /**
190
190
  * Consume an email verification token
191
- * @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`; sign in again). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /api/auth/password/reset/confirm, and no sign-in is possible until a password is set.
191
+ * @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /api/auth/password/reset/confirm, and no sign-in is possible until a password is set. Consumed in the browser whose registration sent the link (its __Host-sf_signup cookie), a `verified` link also signs that browser in: `signed_in: true` with the new session cookie and its `csrf_token`. Anywhere else `signed_in` is false: sign in.
192
192
  */
193
193
  post: operations["postApiAuthVerifyEmail"];
194
194
  delete?: never;
@@ -576,7 +576,7 @@ export interface paths {
576
576
  put?: never;
577
577
  /**
578
578
  * Consume an email verification token
579
- * @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`; sign in again). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /v1/auth/password/reset/confirm, and no sign-in is possible until a password is set.
579
+ * @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /v1/auth/password/reset/confirm, and no sign-in is possible until a password is set. Sign in afterwards.
580
580
  */
581
581
  post: operations["postV1AuthVerifyEmail"];
582
582
  delete?: never;
@@ -1366,7 +1366,7 @@ export interface paths {
1366
1366
  put?: never;
1367
1367
  /**
1368
1368
  * Open a workspace by key (create on first use, reconnect or resume afterwards)
1369
- * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch.
1369
+ * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, key whose deletion is still in progress (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch. Memory allocation (contracts §32): caps.allocation_mode elastic with caps.memory_mib_held; 422 validation_failed details.field caps.allocation_mode reason allocation_mode_not_available (the organization lacks elastic memory; nothing is created or changed), reason not_supported_for_mode (file_first); details.field caps.memory_mib_held reason requires_elastic (held without elastic) or exceeds_memory_mib (held above caps.memory_mib).
1370
1370
  */
1371
1371
  post: operations["postV1WorkspacesOpen"];
1372
1372
  delete?: never;
@@ -1428,7 +1428,7 @@ export interface paths {
1428
1428
  post?: never;
1429
1429
  /**
1430
1430
  * Delete a workspace (tombstone now, storage cleanup by the cell)
1431
- * @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. The key is never reused. Supports Idempotency-Key.
1431
+ * @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. After deletion finishes (observed_state deleted), the key can open a new workspace ID; old IDs and tokens remain deleted. Supports Idempotency-Key.
1432
1432
  */
1433
1433
  delete: operations["deleteV1WorkspacesWorkspaceId"];
1434
1434
  options?: never;
@@ -1456,6 +1456,23 @@ export interface paths {
1456
1456
  patch?: never;
1457
1457
  trace?: never;
1458
1458
  };
1459
+ "/v1/workspaces/{workspace_id}/labels": {
1460
+ parameters: {
1461
+ query?: never;
1462
+ header?: never;
1463
+ path?: never;
1464
+ cookie?: never;
1465
+ };
1466
+ get?: never;
1467
+ /** Replace workspace labels */
1468
+ put: operations["putV1WorkspacesWorkspaceIdLabels"];
1469
+ post?: never;
1470
+ delete?: never;
1471
+ options?: never;
1472
+ head?: never;
1473
+ patch?: never;
1474
+ trace?: never;
1475
+ };
1459
1476
  "/v1/workspaces/{workspace_id}/idle-policy": {
1460
1477
  parameters: {
1461
1478
  query?: never;
@@ -1507,7 +1524,7 @@ export interface paths {
1507
1524
  put?: never;
1508
1525
  /**
1509
1526
  * Resume a suspended workspace (admitted like a start)
1510
- * @description Creates a `resume` operation executed by the cell, or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
1527
+ * @description Creates a `resume` operation for a suspended workspace, or an `open` recovery for a failed workspace (same ID and disk, no reset), or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
1511
1528
  */
1512
1529
  post: operations["postV1WorkspacesWorkspaceIdResume"];
1513
1530
  delete?: never;
@@ -1571,7 +1588,7 @@ export interface paths {
1571
1588
  put?: never;
1572
1589
  /**
1573
1590
  * Fork a workspace into a new key (independent copy of its committed state)
1574
- * @description Creates the target workspace (same template version and disk layout) and a `fork` operation on it, admitted like a start. Caps default to the source’s. `lifetime` is the fork’s own (default persistent): forking a session keeps its state. A file-first source (contracts §29) is 409 not_supported_for_mode. Supports Idempotency-Key.
1591
+ * @description Creates the target workspace (same template version and disk layout) and a `fork` operation on it, admitted like a start. Caps default to the source’s. `lifetime` is the fork’s own (default persistent): forking a session keeps its state. A file-first source (contracts §29) is 409 not_supported_for_mode. Supports Idempotency-Key. Caps (and the memory allocation mode) default to the source’s. Held fork (contracts §22.7): with Prefer: wait=<seconds> (at most 20), holds through the terminal operation. Success returns 200 with the running target, succeeded operation and a final-epoch tool token for agent_label/tools. Otherwise returns 202 with the fresh operation. Preference-Applied confirms the wait; without it, poll as usual. A token that could not be issued is null; fetch it from the target tool-token route. Memory allocation (contracts §32): caps.allocation_mode elastic with caps.memory_mib_held; 422 validation_failed details.field caps.allocation_mode reason allocation_mode_not_available (the organization lacks elastic memory; nothing is created or changed), reason not_supported_for_mode (file_first); details.field caps.memory_mib_held reason requires_elastic (held without elastic) or exceeds_memory_mib (held above caps.memory_mib).
1575
1592
  */
1576
1593
  post: operations["postV1WorkspacesWorkspaceIdFork"];
1577
1594
  delete?: never;
@@ -1631,7 +1648,7 @@ export interface paths {
1631
1648
  put?: never;
1632
1649
  /**
1633
1650
  * Save a layered workspace as the next version of an organization template
1634
- * @description Everything in the workspace becomes template content (its whole filesystem, minus the sf-scrub.v1 list, the contents of /proc, /sys, /dev, /run and /tmp, and shared-volume contents), stored as one new org layer on the workspace’s template chain. A running workspace is captured briefly (`operation`, layer_snapshot); a suspended one uses its current checkpoint; `checkpoint_id` saves a committed checkpoint instead. 202 SaveAsTemplateResponse: poll the build. Owners/admins and API keys with a tool permission (403 otherwise). Errors: 409 legacy_disk_layout, workspace_not_running, operation_in_progress, not_supported_for_mode (file-first, contracts §29), template_archived, 422 platform_template_slug, invalid_defaults, update_policy_not_available, too_many_acknowledged_findings, invalid_path, 403 quota_exceeded (concurrent_template_builds). Supports Idempotency-Key.
1651
+ * @description Everything in the workspace becomes template content (its whole filesystem, minus the sf-scrub.v1 list, the contents of /proc, /sys, /dev, /run and /tmp, and shared-volume contents), stored as one new org layer on the workspace’s template chain. A running workspace is captured briefly (`operation`, layer_snapshot); a suspended one uses its current checkpoint; `checkpoint_id` saves a committed checkpoint instead. 202 SaveAsTemplateResponse: poll the build. Owners/admins and API keys with a tool permission (403 otherwise). Immutable paths (contracts §34.1): the new version declares the target template’s open version’s immutable paths (else the workspace’s version’s); their content comes from that template’s newest published version, not from the workspace (a draft publish keeps the draft’s own content). Errors: 409 legacy_disk_layout, workspace_not_running, operation_in_progress, not_supported_for_mode (file-first, contracts §29), template_archived, 422 platform_template_slug, invalid_defaults, too_many_acknowledged_findings, invalid_path, immutable_paths_unsupported_base (the workspace’s base has no guest agent with immutable_paths.v1; details.base), 403 quota_exceeded (concurrent_template_builds). Supports Idempotency-Key.
1635
1652
  */
1636
1653
  post: operations["postV1WorkspacesWorkspaceIdSaveAsTemplate"];
1637
1654
  delete?: never;
@@ -1742,7 +1759,7 @@ export interface paths {
1742
1759
  put?: never;
1743
1760
  /**
1744
1761
  * Open a workspace by key (create on first use, reconnect or resume afterwards)
1745
- * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch.
1762
+ * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, key whose deletion is still in progress (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch. Memory allocation (contracts §32): caps.allocation_mode elastic with caps.memory_mib_held; 422 validation_failed details.field caps.allocation_mode reason allocation_mode_not_available (the organization lacks elastic memory; nothing is created or changed), reason not_supported_for_mode (file_first); details.field caps.memory_mib_held reason requires_elastic (held without elastic) or exceeds_memory_mib (held above caps.memory_mib).
1746
1763
  */
1747
1764
  post: operations["postApiV1WorkspacesOpen"];
1748
1765
  delete?: never;
@@ -1804,7 +1821,7 @@ export interface paths {
1804
1821
  post?: never;
1805
1822
  /**
1806
1823
  * Delete a workspace (tombstone now, storage cleanup by the cell)
1807
- * @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. The key is never reused. Supports Idempotency-Key.
1824
+ * @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. After deletion finishes (observed_state deleted), the key can open a new workspace ID; old IDs and tokens remain deleted. Supports Idempotency-Key.
1808
1825
  */
1809
1826
  delete: operations["deleteApiV1WorkspacesWorkspaceId"];
1810
1827
  options?: never;
@@ -1832,6 +1849,23 @@ export interface paths {
1832
1849
  patch?: never;
1833
1850
  trace?: never;
1834
1851
  };
1852
+ "/api/v1/workspaces/{workspace_id}/labels": {
1853
+ parameters: {
1854
+ query?: never;
1855
+ header?: never;
1856
+ path?: never;
1857
+ cookie?: never;
1858
+ };
1859
+ get?: never;
1860
+ /** Replace workspace labels */
1861
+ put: operations["putApiV1WorkspacesWorkspaceIdLabels"];
1862
+ post?: never;
1863
+ delete?: never;
1864
+ options?: never;
1865
+ head?: never;
1866
+ patch?: never;
1867
+ trace?: never;
1868
+ };
1835
1869
  "/api/v1/workspaces/{workspace_id}/idle-policy": {
1836
1870
  parameters: {
1837
1871
  query?: never;
@@ -1883,7 +1917,7 @@ export interface paths {
1883
1917
  put?: never;
1884
1918
  /**
1885
1919
  * Resume a suspended workspace (admitted like a start)
1886
- * @description Creates a `resume` operation executed by the cell, or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
1920
+ * @description Creates a `resume` operation for a suspended workspace, or an `open` recovery for a failed workspace (same ID and disk, no reset), or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
1887
1921
  */
1888
1922
  post: operations["postApiV1WorkspacesWorkspaceIdResume"];
1889
1923
  delete?: never;
@@ -1947,7 +1981,7 @@ export interface paths {
1947
1981
  put?: never;
1948
1982
  /**
1949
1983
  * Fork a workspace into a new key (independent copy of its committed state)
1950
- * @description Creates the target workspace (same template version and disk layout) and a `fork` operation on it, admitted like a start. Caps default to the source’s. `lifetime` is the fork’s own (default persistent): forking a session keeps its state. A file-first source (contracts §29) is 409 not_supported_for_mode. Supports Idempotency-Key.
1984
+ * @description Creates the target workspace (same template version and disk layout) and a `fork` operation on it, admitted like a start. Caps default to the source’s. `lifetime` is the fork’s own (default persistent): forking a session keeps its state. A file-first source (contracts §29) is 409 not_supported_for_mode. Supports Idempotency-Key. Caps (and the memory allocation mode) default to the source’s. Held fork (contracts §22.7): with Prefer: wait=<seconds> (at most 20), holds through the terminal operation. Success returns 200 with the running target, succeeded operation and a final-epoch tool token for agent_label/tools. Otherwise returns 202 with the fresh operation. Preference-Applied confirms the wait; without it, poll as usual. A token that could not be issued is null; fetch it from the target tool-token route. Memory allocation (contracts §32): caps.allocation_mode elastic with caps.memory_mib_held; 422 validation_failed details.field caps.allocation_mode reason allocation_mode_not_available (the organization lacks elastic memory; nothing is created or changed), reason not_supported_for_mode (file_first); details.field caps.memory_mib_held reason requires_elastic (held without elastic) or exceeds_memory_mib (held above caps.memory_mib).
1951
1985
  */
1952
1986
  post: operations["postApiV1WorkspacesWorkspaceIdFork"];
1953
1987
  delete?: never;
@@ -2007,7 +2041,7 @@ export interface paths {
2007
2041
  put?: never;
2008
2042
  /**
2009
2043
  * Save a layered workspace as the next version of an organization template
2010
- * @description Everything in the workspace becomes template content (its whole filesystem, minus the sf-scrub.v1 list, the contents of /proc, /sys, /dev, /run and /tmp, and shared-volume contents), stored as one new org layer on the workspace’s template chain. A running workspace is captured briefly (`operation`, layer_snapshot); a suspended one uses its current checkpoint; `checkpoint_id` saves a committed checkpoint instead. 202 SaveAsTemplateResponse: poll the build. Owners/admins and API keys with a tool permission (403 otherwise). Errors: 409 legacy_disk_layout, workspace_not_running, operation_in_progress, not_supported_for_mode (file-first, contracts §29), template_archived, 422 platform_template_slug, invalid_defaults, update_policy_not_available, too_many_acknowledged_findings, invalid_path, 403 quota_exceeded (concurrent_template_builds). Supports Idempotency-Key.
2044
+ * @description Everything in the workspace becomes template content (its whole filesystem, minus the sf-scrub.v1 list, the contents of /proc, /sys, /dev, /run and /tmp, and shared-volume contents), stored as one new org layer on the workspace’s template chain. A running workspace is captured briefly (`operation`, layer_snapshot); a suspended one uses its current checkpoint; `checkpoint_id` saves a committed checkpoint instead. 202 SaveAsTemplateResponse: poll the build. Owners/admins and API keys with a tool permission (403 otherwise). Immutable paths (contracts §34.1): the new version declares the target template’s open version’s immutable paths (else the workspace’s version’s); their content comes from that template’s newest published version, not from the workspace (a draft publish keeps the draft’s own content). Errors: 409 legacy_disk_layout, workspace_not_running, operation_in_progress, not_supported_for_mode (file-first, contracts §29), template_archived, 422 platform_template_slug, invalid_defaults, too_many_acknowledged_findings, invalid_path, immutable_paths_unsupported_base (the workspace’s base has no guest agent with immutable_paths.v1; details.base), 403 quota_exceeded (concurrent_template_builds). Supports Idempotency-Key.
2011
2045
  */
2012
2046
  post: operations["postApiV1WorkspacesWorkspaceIdSaveAsTemplate"];
2013
2047
  delete?: never;
@@ -2419,7 +2453,7 @@ export interface paths {
2419
2453
  put?: never;
2420
2454
  /**
2421
2455
  * Request a custom template build (queued for the isolated builder)
2422
- * @description 202 with the queued build. Takes recipe v1 (a Dockerfile) or recipe v2 (contracts §24.1: validated against the base, compiled to the builder’s steps, uploads locked). Records the canonical recipe and its SHA-256 (provenance input), pins the base version, clamps resources to the plan and assigns `target_version`. The cell executes it (building -> testing -> publishing -> published) and the API then registers the version (published at once unless auto_publish=false); poll GET .../template-builds/{id} until `registration.state` is registered (or the build failed/was canceled). `builder_availability` says whether a builder is running. Errors: 422 when the recipe is outside the host builder Dockerfile dialect or the slug is not a builder slug (`details.reason`: multi_stage_not_supported, from_not_template_base, stage_names_not_supported, from_flags_not_supported, base_mismatch, run_flags_not_supported, heredoc_not_supported, instruction_not_supported, no_build_context, env_invalid, user_invalid, too_many_steps, recipe_too_large, slug_not_supported_by_builder, platform_template_slug, reserved_template_slug, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors; recipe v2: invalid_recipe (details.field, details.detail), base_not_layered, language_unavailable, language_conflict, invalid_package, too_many_files, platform_owned_path, invalid_path, upload_required, upload_missing, upload_digest_mismatch, upload_too_large, too_many_steps, recipe_too_large, allowlist_empty, allow_hosts_without_allowlist, extra_hosts_without_auto, too_many_hosts, invalid_host, ip_literal_not_allowed, host_not_allowed, invalid_settings, services_unsupported, too_many_acknowledged_findings), 503 dependency_unavailable (uploads_not_configured), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
2456
+ * @description 202 with the queued build. Takes recipe v1 (a Dockerfile) or recipe v2 (contracts §24.1: validated against the base, compiled to the builder’s steps, uploads locked). Records the canonical recipe and its SHA-256 (provenance input), pins the base version, clamps resources to the plan and assigns `target_version`. The cell executes it (building -> testing -> publishing -> published) and the API then registers the version (published at once unless auto_publish=false); poll GET .../template-builds/{id} until `registration.state` is registered (or the build failed/was canceled). `builder_availability` says whether a builder is running. Errors: 422 when the recipe is outside the host builder Dockerfile dialect or the slug is not a builder slug (`details.reason`: multi_stage_not_supported, from_not_template_base, stage_names_not_supported, from_flags_not_supported, base_mismatch, run_flags_not_supported, heredoc_not_supported, instruction_not_supported, no_build_context, env_invalid, user_invalid, too_many_steps, recipe_too_large, slug_not_supported_by_builder, platform_template_slug, reserved_template_slug, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors; recipe v2: invalid_recipe (details.field, details.detail), base_not_layered, language_unavailable, language_conflict, invalid_package, too_many_files, platform_owned_path, invalid_path, upload_required, upload_missing, upload_digest_mismatch, upload_too_large, too_many_steps, recipe_too_large, allowlist_empty, allow_hosts_without_allowlist, extra_hosts_without_auto, too_many_hosts, invalid_host, ip_literal_not_allowed, host_not_allowed, invalid_settings, services_unsupported, too_many_acknowledged_findings; immutable paths (contracts §34.1): invalid_path (details.field recipe.immutable[<i>]), immutable_path_removed (the recipe drops a path of the template’s open version; details.removed), immutable_paths_unsupported_base (a non-empty list on a base whose guest agent lacks immutable_paths.v1, or a recipe v1 build of a template with immutable paths; details.base {name, version})), 503 dependency_unavailable (uploads_not_configured), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
2423
2457
  */
2424
2458
  post: operations["postV1OrganizationsOrganizationIdTemplateBuilds"];
2425
2459
  delete?: never;
@@ -2676,7 +2710,7 @@ export interface paths {
2676
2710
  put?: never;
2677
2711
  /**
2678
2712
  * Publish an organization template version
2679
- * @description Only a version produced by a registered `published` build (or a legacy `succeeded` one) whose scan and compatibility checks passed (409 `not_produced_by_succeeded_build` otherwise; 409 `version_archived`). New workspaces of the slug then use the latest published version; existing workspaces keep theirs. Idempotent. Owner/admin.
2713
+ * @description Only a version produced by a registered `published` build (or a legacy `succeeded` one) whose scan and compatibility checks passed (409 `not_produced_by_succeeded_build` otherwise; 409 `version_archived`). New workspaces of the slug then use the latest published version; existing workspaces keep theirs, except their immutable paths (contracts §34), which show the latest published version from their next cold boot or resume. Idempotent. Owner/admin.
2680
2714
  */
2681
2715
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionPublish"];
2682
2716
  delete?: never;
@@ -2696,7 +2730,7 @@ export interface paths {
2696
2730
  put?: never;
2697
2731
  /**
2698
2732
  * Archive an organization template version
2699
- * @description Hides the version and stops `open` from picking it for new workspaces; existing workspaces are never changed (versions are immutable). Idempotent. Owner/admin.
2733
+ * @description Hides the version and stops `open` from picking it for new workspaces; existing workspaces keep their version (versions are immutable). Archiving the latest published version rolls immutable paths (contracts §34) back: workspaces show the previous published version there from their next cold boot or resume. Idempotent. Owner/admin.
2700
2734
  */
2701
2735
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionArchive"];
2702
2736
  delete?: never;
@@ -2757,7 +2791,7 @@ export interface paths {
2757
2791
  put?: never;
2758
2792
  /**
2759
2793
  * Request a custom template build (queued for the isolated builder)
2760
- * @description 202 with the queued build. Takes recipe v1 (a Dockerfile) or recipe v2 (contracts §24.1: validated against the base, compiled to the builder’s steps, uploads locked). Records the canonical recipe and its SHA-256 (provenance input), pins the base version, clamps resources to the plan and assigns `target_version`. The cell executes it (building -> testing -> publishing -> published) and the API then registers the version (published at once unless auto_publish=false); poll GET .../template-builds/{id} until `registration.state` is registered (or the build failed/was canceled). `builder_availability` says whether a builder is running. Errors: 422 when the recipe is outside the host builder Dockerfile dialect or the slug is not a builder slug (`details.reason`: multi_stage_not_supported, from_not_template_base, stage_names_not_supported, from_flags_not_supported, base_mismatch, run_flags_not_supported, heredoc_not_supported, instruction_not_supported, no_build_context, env_invalid, user_invalid, too_many_steps, recipe_too_large, slug_not_supported_by_builder, platform_template_slug, reserved_template_slug, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors; recipe v2: invalid_recipe (details.field, details.detail), base_not_layered, language_unavailable, language_conflict, invalid_package, too_many_files, platform_owned_path, invalid_path, upload_required, upload_missing, upload_digest_mismatch, upload_too_large, too_many_steps, recipe_too_large, allowlist_empty, allow_hosts_without_allowlist, extra_hosts_without_auto, too_many_hosts, invalid_host, ip_literal_not_allowed, host_not_allowed, invalid_settings, services_unsupported, too_many_acknowledged_findings), 503 dependency_unavailable (uploads_not_configured), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
2794
+ * @description 202 with the queued build. Takes recipe v1 (a Dockerfile) or recipe v2 (contracts §24.1: validated against the base, compiled to the builder’s steps, uploads locked). Records the canonical recipe and its SHA-256 (provenance input), pins the base version, clamps resources to the plan and assigns `target_version`. The cell executes it (building -> testing -> publishing -> published) and the API then registers the version (published at once unless auto_publish=false); poll GET .../template-builds/{id} until `registration.state` is registered (or the build failed/was canceled). `builder_availability` says whether a builder is running. Errors: 422 when the recipe is outside the host builder Dockerfile dialect or the slug is not a builder slug (`details.reason`: multi_stage_not_supported, from_not_template_base, stage_names_not_supported, from_flags_not_supported, base_mismatch, run_flags_not_supported, heredoc_not_supported, instruction_not_supported, no_build_context, env_invalid, user_invalid, too_many_steps, recipe_too_large, slug_not_supported_by_builder, platform_template_slug, reserved_template_slug, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors; recipe v2: invalid_recipe (details.field, details.detail), base_not_layered, language_unavailable, language_conflict, invalid_package, too_many_files, platform_owned_path, invalid_path, upload_required, upload_missing, upload_digest_mismatch, upload_too_large, too_many_steps, recipe_too_large, allowlist_empty, allow_hosts_without_allowlist, extra_hosts_without_auto, too_many_hosts, invalid_host, ip_literal_not_allowed, host_not_allowed, invalid_settings, services_unsupported, too_many_acknowledged_findings; immutable paths (contracts §34.1): invalid_path (details.field recipe.immutable[<i>]), immutable_path_removed (the recipe drops a path of the template’s open version; details.removed), immutable_paths_unsupported_base (a non-empty list on a base whose guest agent lacks immutable_paths.v1, or a recipe v1 build of a template with immutable paths; details.base {name, version})), 503 dependency_unavailable (uploads_not_configured), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
2761
2795
  */
2762
2796
  post: operations["postApiV1OrganizationsOrganizationIdTemplateBuilds"];
2763
2797
  delete?: never;
@@ -2934,7 +2968,7 @@ export interface paths {
2934
2968
  put?: never;
2935
2969
  /**
2936
2970
  * Publish an organization template version
2937
- * @description Only a version produced by a registered `published` build (or a legacy `succeeded` one) whose scan and compatibility checks passed (409 `not_produced_by_succeeded_build` otherwise; 409 `version_archived`). New workspaces of the slug then use the latest published version; existing workspaces keep theirs. Idempotent. Owner/admin.
2971
+ * @description Only a version produced by a registered `published` build (or a legacy `succeeded` one) whose scan and compatibility checks passed (409 `not_produced_by_succeeded_build` otherwise; 409 `version_archived`). New workspaces of the slug then use the latest published version; existing workspaces keep theirs, except their immutable paths (contracts §34), which show the latest published version from their next cold boot or resume. Idempotent. Owner/admin.
2938
2972
  */
2939
2973
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionPublish"];
2940
2974
  delete?: never;
@@ -2954,7 +2988,7 @@ export interface paths {
2954
2988
  put?: never;
2955
2989
  /**
2956
2990
  * Archive an organization template version
2957
- * @description Hides the version and stops `open` from picking it for new workspaces; existing workspaces are never changed (versions are immutable). Idempotent. Owner/admin.
2991
+ * @description Hides the version and stops `open` from picking it for new workspaces; existing workspaces keep their version (versions are immutable). Archiving the latest published version rolls immutable paths (contracts §34) back: workspaces show the previous published version there from their next cold boot or resume. Idempotent. Owner/admin.
2958
2992
  */
2959
2993
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionArchive"];
2960
2994
  delete?: never;
@@ -3120,7 +3154,7 @@ export interface paths {
3120
3154
  put?: never;
3121
3155
  /**
3122
3156
  * Publish the draft as the template’s next version (save-as-template from the draft)
3123
- * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3157
+ * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. Immutable paths (contracts §34.1): the new version declares the template’s open version’s immutable paths (else the draft base’s) with the content the draft holds there; 422 immutable_paths_unsupported_base when the draft’s base has no guest agent with immutable_paths.v1 (details.base). 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3124
3158
  */
3125
3159
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
3126
3160
  delete?: never;
@@ -3140,7 +3174,7 @@ export interface paths {
3140
3174
  put?: never;
3141
3175
  /**
3142
3176
  * Publish the draft as the template’s next version (save-as-template from the draft)
3143
- * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3177
+ * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. Immutable paths (contracts §34.1): the new version declares the template’s open version’s immutable paths (else the draft base’s) with the content the draft holds there; 422 immutable_paths_unsupported_base when the draft’s base has no guest agent with immutable_paths.v1 (details.base). 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3144
3178
  */
3145
3179
  post: operations["postV1TemplatesSlugDraftPublish"];
3146
3180
  delete?: never;
@@ -3233,7 +3267,7 @@ export interface paths {
3233
3267
  put?: never;
3234
3268
  /**
3235
3269
  * Publish the draft as the template’s next version (save-as-template from the draft)
3236
- * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3270
+ * @description Builds one new org layer holding every change since the draft base, from `state_id` or the draft’s current state (a fresh capture when running). `settings` (TemplateSettingsInput, contracts §24.3): each given field replaces that field of the draft base’s settings, each absent one is carried forward (settings.defaults and defaults together: 422 invalid_settings). Refused with 409 draft_stale (details latest_version, draft_base_version) when the template has a version newer than the draft base that this draft did not produce, and 409 build_in_progress while a build from another source is unfinished. Immutable paths (contracts §34.1): the new version declares the template’s open version’s immutable paths (else the draft base’s) with the content the draft holds there; 422 immutable_paths_unsupported_base when the draft’s base has no guest agent with immutable_paths.v1 (details.base). 202 SaveAsTemplateResponse. Supports Idempotency-Key.
3237
3271
  */
3238
3272
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
3239
3273
  delete?: never;
@@ -5548,6 +5582,55 @@ export interface components {
5548
5582
  [key: string]: unknown;
5549
5583
  };
5550
5584
  result?: {
5585
+ /** @description suspend and fork: whether the capture is in durable storage. false while `durability.state` is pending (the suspend completed on its host) or lost; true once it committed. Absent on other kinds. */
5586
+ durable?: boolean;
5587
+ /** @description suspend: `local_commit` when the suspend completed on its host and the durable copy followed in the background. */
5588
+ suspend_path?: string;
5589
+ durability?: {
5590
+ /**
5591
+ * @description pending: sealed on its host, the durable copy is being written; durable: the copy committed; lost: the copy could not be made and the previous recovery point stays current.
5592
+ * @enum {string}
5593
+ */
5594
+ state: "pending" | "durable" | "lost";
5595
+ /** @description The checkpoint being made durable. */
5596
+ checkpoint_id?: string;
5597
+ /** @description Its generation on the host. */
5598
+ generation_id?: string;
5599
+ /** @description RFC 3339: when the suspend (or fork) completed on its host. */
5600
+ local_commit_at?: string;
5601
+ /** @description RFC 3339: when the durable copy is expected to have committed (local_commit_at + the deadline). */
5602
+ durable_by?: string;
5603
+ /** @description RFC 3339 (state durable): when the durable copy committed. */
5604
+ durable_at?: string;
5605
+ /** @description State durable: local_commit_at to durable_at, in milliseconds. */
5606
+ local_commit_to_durable_ms?: number;
5607
+ /** @description RFC 3339: set once durable_by passed while the copy was still pending; it keeps retrying. */
5608
+ overdue_at?: string;
5609
+ /** @description State lost: why, e.g. host_lost. */
5610
+ reason?: string;
5611
+ /** @description State lost: the error code of the failed copy. */
5612
+ code?: string;
5613
+ recovery_point_checkpoint_id?: string | null;
5614
+ } & {
5615
+ [key: string]: unknown;
5616
+ };
5617
+ lost_suspend?: {
5618
+ /** @description The suspend checkpoint whose durable copy was lost. */
5619
+ checkpoint_id: string;
5620
+ /** @description Its generation on the host. */
5621
+ generation_id?: string;
5622
+ /** @description Why it was lost, e.g. host_lost. */
5623
+ reason?: string;
5624
+ /** @description RFC 3339: when that suspend captured the workspace. */
5625
+ suspended_at?: string;
5626
+ /** @description The earlier durable checkpoint this resume restored. */
5627
+ restored_checkpoint_id?: string;
5628
+ /** @description RFC 3339: when the restored checkpoint committed; the workspace state is as of then. */
5629
+ state_as_of?: string;
5630
+ } & {
5631
+ [key: string]: unknown;
5632
+ };
5633
+ } & {
5551
5634
  [key: string]: unknown;
5552
5635
  };
5553
5636
  };
@@ -5566,11 +5649,6 @@ export interface components {
5566
5649
  * @enum {string}
5567
5650
  */
5568
5651
  WorkspacePurpose: "standard" | "template_draft" | "template_test";
5569
- /**
5570
- * @description Reserved (T2). Always `pinned` in T1: a workspace stays on its template version; `auto` is refused with 422 update_policy_not_available.
5571
- * @enum {string}
5572
- */
5573
- UpdatePolicy: "pinned" | "auto";
5574
5652
  /** @description Where the workspace’s disk came from; null for a workspace opened from its template. */
5575
5653
  WorkspaceOrigin: {
5576
5654
  /** @enum {string} */
@@ -5621,7 +5699,6 @@ export interface components {
5621
5699
  } | null;
5622
5700
  egress: components["schemas"]["TemplateEgressDefault"] | null;
5623
5701
  agent_tools: null;
5624
- update_policy: null;
5625
5702
  };
5626
5703
  /** @description The template’s workspace network ceiling (contracts §24.3): the cell intersects it with the effective egress policy. */
5627
5704
  TemplateEgressDefault: {
@@ -5730,7 +5807,7 @@ export interface components {
5730
5807
  ready_timeout_seconds?: number;
5731
5808
  };
5732
5809
  };
5733
- /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
5810
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools stays reserved (null). */
5734
5811
  defaults?: {
5735
5812
  /** @enum {unknown} */
5736
5813
  lifetime?: "persistent" | "session";
@@ -5748,7 +5825,6 @@ export interface components {
5748
5825
  allow_hosts?: string[];
5749
5826
  };
5750
5827
  agent_tools?: null;
5751
- update_policy?: null;
5752
5828
  };
5753
5829
  };
5754
5830
  /** @description Recipe v1: a Dockerfile in the host builder’s dialect (no `schema` field). */
@@ -5781,7 +5857,7 @@ export interface components {
5781
5857
  };
5782
5858
  /**
5783
5859
  * Template recipe v2 (shardflux.template-recipe.v2)
5784
- * @description A template without a Dockerfile (docs/INTEGRATION_CONTRACTS.md §24.1): `build` changes the filesystem through the host builder's structured steps, `settings` goes into the manifest and applies when a workspace opens. This document is the body field `recipe` of POST …/template-builds, the `recipe` of GET …/templates/{slug}/versions/{v}/recipe (export), and the content of template.yaml (the same document in YAML; only clients parse YAML). In template.yaml a file entry may name a local path (`from`) instead of an upload; clients upload it and send `upload` (the API refuses `from`). Rules JSON Schema cannot express, enforced by the API with 422 validation_failed and details.reason (§24.1, §24.6): input names are unique across settings.env and settings.inputs; a secret input has no default; a required input has no default; start command names are unique; `to` is not platform-owned; build.network.allow_hosts only with build "allowlist" and extra_hosts only with "auto"; the sum of every run/command script is at most 262144 bytes; start timeout_seconds sum to at most 3600; languages are in the API's language table for the base; services need a base whose guest agent has services.v1.
5860
+ * @description A template without a Dockerfile (docs/INTEGRATION_CONTRACTS.md §24.1): `build` changes the filesystem through the host builder's structured steps, `settings` goes into the manifest and applies when a workspace opens. This document is the body field `recipe` of POST …/template-builds, the `recipe` of GET …/templates/{slug}/versions/{v}/recipe (export), and the content of template.yaml (the same document in YAML; only clients parse YAML). In template.yaml a file entry may name a local path (`from`) instead of an upload; clients upload it and send `upload` (the API refuses `from`). Rules JSON Schema cannot express, enforced by the API with 422 validation_failed and details.reason (§24.1, §24.6): input names are unique across settings.env and settings.inputs; a secret input has no default; a required input has no default; start command names are unique; `to` is not platform-owned; build.network.allow_hosts only with build "allowlist" and extra_hosts only with "auto"; the sum of every run/command script is at most 262144 bytes; start timeout_seconds sum to at most 3600; languages are in the API's language table for the base; services need a base whose guest agent has services.v1; immutable paths are not platform-owned, do not contain a platform-owned path and do not nest (§34.1).
5785
5861
  */
5786
5862
  TemplateRecipeV2: {
5787
5863
  /** @enum {unknown} */
@@ -5895,7 +5971,7 @@ export interface components {
5895
5971
  ready_timeout_seconds?: number;
5896
5972
  };
5897
5973
  };
5898
- /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
5974
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools stays reserved (null). */
5899
5975
  defaults?: {
5900
5976
  /** @enum {unknown} */
5901
5977
  lifetime?: "persistent" | "session";
@@ -5913,9 +5989,10 @@ export interface components {
5913
5989
  allow_hosts?: string[];
5914
5990
  };
5915
5991
  agent_tools?: null;
5916
- update_policy?: null;
5917
5992
  };
5918
5993
  };
5994
+ /** @description Directories every workspace of the template mounts read-only from the template's newest published version (§34.1): workspaces pick up a newer version when they cold-boot or resume. Not `/`, not equal to or under /proc, /sys, /dev, /run, /tmp, /lost+found or a platform-owned path, not containing a platform-owned path, none equal to or containing another (422 invalid_path). Omitted: the list of the template's newest published version. A version keeps every path of that list (422 immutable_path_removed) and a non-empty list needs a base whose guest agent has immutable_paths.v1 (422 immutable_paths_unsupported_base). Each path is a directory in the built filesystem. */
5995
+ immutable?: string[];
5919
5996
  /** @description Builder VM bounds, exactly as recipe v1 `resources` (not part of recipe_sha256). */
5920
5997
  resources?: {
5921
5998
  cpu_millis?: number;
@@ -6308,6 +6385,8 @@ export interface components {
6308
6385
  kind: "file" | "tar";
6309
6386
  }[];
6310
6387
  };
6388
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
6389
+ immutable: string[];
6311
6390
  };
6312
6391
  result: {
6313
6392
  artifact_sha256: string | null;
@@ -6331,8 +6410,13 @@ export interface components {
6331
6410
  } | null;
6332
6411
  };
6333
6412
  failure: {
6413
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
6334
6414
  code: string;
6335
6415
  message: string;
6416
+ /** @description Code-specific details (immutable_path_missing: {path}). */
6417
+ details?: {
6418
+ [key: string]: unknown;
6419
+ };
6336
6420
  } | null;
6337
6421
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
6338
6422
  log: {
@@ -6370,6 +6454,8 @@ export interface components {
6370
6454
  produced_layer_id: string | null;
6371
6455
  squashed: boolean | null;
6372
6456
  org_bytes: number | null;
6457
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
6458
+ immutable_paths: string[];
6373
6459
  };
6374
6460
  /** @description A disk-only capture of the draft (contracts §19.9). */
6375
6461
  DraftState: {
@@ -6458,7 +6544,6 @@ export interface components {
6458
6544
  } | null;
6459
6545
  /** @description Reserved (T2). */
6460
6546
  agent_tools?: null;
6461
- update_policy?: ("pinned" | "auto") | null;
6462
6547
  };
6463
6548
  settings?: components["schemas"]["TemplateSettingsInput"];
6464
6549
  /** @default true */
@@ -6489,7 +6574,6 @@ export interface components {
6489
6574
  } | null;
6490
6575
  /** @description Reserved (T2). */
6491
6576
  agent_tools?: null;
6492
- update_policy?: ("pinned" | "auto") | null;
6493
6577
  };
6494
6578
  /**
6495
6579
  * Format: uuid
@@ -6668,12 +6752,16 @@ export interface components {
6668
6752
  */
6669
6753
  project_id: string;
6670
6754
  workspace_key: string;
6755
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
6756
+ labels: {
6757
+ [key: string]: string;
6758
+ };
6671
6759
  /**
6672
6760
  * Format: uuid
6673
6761
  * @description UUIDv7, lowercase canonical form.
6674
6762
  */
6675
6763
  template_version_id: string;
6676
- /** @description Immutable template version this workspace was created from. */
6764
+ /** @description The template version this workspace was created from (immutable), and the version its immutable paths show. */
6677
6765
  template: {
6678
6766
  /**
6679
6767
  * Format: uuid
@@ -6687,6 +6775,7 @@ export interface components {
6687
6775
  template_id: string;
6688
6776
  slug: string;
6689
6777
  version: number;
6778
+ immutable_version: number | null;
6690
6779
  };
6691
6780
  /** @enum {string} */
6692
6781
  desired_state: "running" | "suspended" | "deleted";
@@ -6695,11 +6784,29 @@ export interface components {
6695
6784
  cell_id: string | null;
6696
6785
  cell_endpoint: string | null;
6697
6786
  ownership_epoch: number;
6698
- /** @description User caps for this workspace (null = no user restriction). */
6787
+ /** @description User caps for this workspace (null = no user restriction) and its memory allocation mode. */
6699
6788
  caps: {
6700
6789
  cpu_millis: number | null;
6701
6790
  memory_mib: number | null;
6702
6791
  disk_gib: number | null;
6792
+ /**
6793
+ * @description Memory allocation (contracts §32): fixed (default) boots memory_mib and holds it; elastic holds memory_mib_held while idle and is grown up to memory_mib (the promise) when a command needs it. The mode the next VM start uses: an elastic request whose promise does not exceed the held floor by at least 512 MiB is fixed at the promise.
6794
+ * @enum {string}
6795
+ */
6796
+ allocation_mode: "fixed" | "elastic";
6797
+ /** @description Elastic only: the memory held while idle (MiB). */
6798
+ memory_mib_held?: number;
6799
+ };
6800
+ /** @description Memory of the workspace (contracts §32.6). */
6801
+ memory: {
6802
+ /**
6803
+ * @description The layout of the running VM, else the one the next start uses.
6804
+ * @enum {string}
6805
+ */
6806
+ allocation_mode: "fixed" | "elastic";
6807
+ promised_mib: number | null;
6808
+ held_mib: number | null;
6809
+ plugged_mib: number | null;
6703
6810
  };
6704
6811
  ceilings: {
6705
6812
  cpu_millis: number;
@@ -6752,7 +6859,6 @@ export interface components {
6752
6859
  origin: components["schemas"]["WorkspaceOrigin"] | null;
6753
6860
  ended_reason: ("closed" | "idle_timeout" | "draft_discarded") | null;
6754
6861
  dev_template_id: string | null;
6755
- update_policy: components["schemas"]["UpdatePolicy"];
6756
6862
  startup: components["schemas"]["WorkspaceStartup"] | null;
6757
6863
  mode: components["schemas"]["WorkspaceMode"];
6758
6864
  /** @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. */
@@ -7488,6 +7594,10 @@ export interface operations {
7488
7594
  status: "verified" | "password_reset_required";
7489
7595
  /** @description Present with password_reset_required: single-use token for POST /api/auth/password/reset/confirm. */
7490
7596
  reset_token?: string;
7597
+ /** @description True when this response opened a session (the registering browser); false: sign in. */
7598
+ signed_in: boolean;
7599
+ /** @description Send as X-CSRF-Token on subsequent mutations. */
7600
+ csrf_token?: string;
7491
7601
  };
7492
7602
  };
7493
7603
  };
@@ -8487,7 +8597,7 @@ export interface operations {
8487
8597
  content: {
8488
8598
  "application/json": {
8489
8599
  status: "verified" | "password_reset_required";
8490
- /** @description Present with password_reset_required: single-use token for POST /api/auth/password/reset/confirm. */
8600
+ /** @description Present with password_reset_required: single-use token for POST /v1/auth/password/reset/confirm. */
8491
8601
  reset_token?: string;
8492
8602
  };
8493
8603
  };
@@ -11495,13 +11605,25 @@ export interface operations {
11495
11605
  "application/json": {
11496
11606
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
11497
11607
  key: string;
11608
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
11609
+ labels?: {
11610
+ [key: string]: string;
11611
+ };
11498
11612
  /** @description Template slug; new workspaces use its latest published version. */
11499
11613
  template: string;
11500
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
11614
+ /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction (allocation_mode: fixed). Given caps replace the stored ones. */
11501
11615
  caps?: {
11502
11616
  cpu_millis?: number;
11503
11617
  memory_mib?: number;
11504
11618
  disk_gib?: number;
11619
+ /**
11620
+ * @description Memory allocation (contracts §32): fixed (default) 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). Takes effect at the next VM start.
11621
+ * @default fixed
11622
+ * @enum {string}
11623
+ */
11624
+ allocation_mode?: "fixed" | "elastic";
11625
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
11626
+ memory_mib_held?: number;
11505
11627
  };
11506
11628
  /**
11507
11629
  * Format: uuid
@@ -11586,6 +11708,8 @@ export interface operations {
11586
11708
  state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
11587
11709
  desired_state?: "running" | "suspended" | "deleted";
11588
11710
  key_prefix?: string;
11711
+ /** @description JSON object of exact label matches; all pairs must match. */
11712
+ labels?: string;
11589
11713
  include_deleted?: boolean;
11590
11714
  /** @description persistent (default), session or any. Key lookups pass any. */
11591
11715
  lifetime?: "persistent" | "session" | "any";
@@ -11641,6 +11765,8 @@ export interface operations {
11641
11765
  state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
11642
11766
  desired_state?: "running" | "suspended" | "deleted";
11643
11767
  key_prefix?: string;
11768
+ /** @description JSON object of exact label matches; all pairs must match. */
11769
+ labels?: string;
11644
11770
  include_deleted?: boolean;
11645
11771
  /** @description persistent (default), session or any. Key lookups pass any. */
11646
11772
  lifetime?: "persistent" | "session" | "any";
@@ -11814,6 +11940,56 @@ export interface operations {
11814
11940
  };
11815
11941
  };
11816
11942
  };
11943
+ putV1WorkspacesWorkspaceIdLabels: {
11944
+ parameters: {
11945
+ query?: never;
11946
+ header?: never;
11947
+ path: {
11948
+ /** @description UUIDv7, lowercase canonical form. */
11949
+ workspace_id: string;
11950
+ };
11951
+ cookie?: never;
11952
+ };
11953
+ requestBody: {
11954
+ content: {
11955
+ "application/json": {
11956
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
11957
+ labels: {
11958
+ [key: string]: string;
11959
+ };
11960
+ };
11961
+ };
11962
+ };
11963
+ responses: {
11964
+ /** @description Default Response */
11965
+ 200: {
11966
+ headers: {
11967
+ [name: string]: unknown;
11968
+ };
11969
+ content: {
11970
+ "application/json": components["schemas"]["Workspace"];
11971
+ };
11972
+ };
11973
+ /** @description Default Response */
11974
+ "4XX": {
11975
+ headers: {
11976
+ [name: string]: unknown;
11977
+ };
11978
+ content: {
11979
+ "application/json": components["schemas"]["ErrorBody"];
11980
+ };
11981
+ };
11982
+ /** @description Default Response */
11983
+ "5XX": {
11984
+ headers: {
11985
+ [name: string]: unknown;
11986
+ };
11987
+ content: {
11988
+ "application/json": components["schemas"]["ErrorBody"];
11989
+ };
11990
+ };
11991
+ };
11992
+ };
11817
11993
  putV1WorkspacesWorkspaceIdIdlePolicy: {
11818
11994
  parameters: {
11819
11995
  query?: never;
@@ -12121,7 +12297,9 @@ export interface operations {
12121
12297
  postV1WorkspacesWorkspaceIdFork: {
12122
12298
  parameters: {
12123
12299
  query?: never;
12124
- header?: never;
12300
+ header?: {
12301
+ prefer?: string;
12302
+ };
12125
12303
  path: {
12126
12304
  /** @description UUIDv7, lowercase canonical form. */
12127
12305
  workspace_id: string;
@@ -12133,17 +12311,47 @@ export interface operations {
12133
12311
  "application/json": {
12134
12312
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
12135
12313
  key: string;
12136
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
12314
+ /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction (allocation_mode: fixed). Given caps replace the stored ones. */
12137
12315
  caps?: {
12138
12316
  cpu_millis?: number;
12139
12317
  memory_mib?: number;
12140
12318
  disk_gib?: number;
12319
+ /**
12320
+ * @description Memory allocation (contracts §32): fixed (default) 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). Takes effect at the next VM start.
12321
+ * @default fixed
12322
+ * @enum {string}
12323
+ */
12324
+ allocation_mode?: "fixed" | "elastic";
12325
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
12326
+ memory_mib_held?: number;
12141
12327
  };
12142
12328
  lifetime?: components["schemas"]["WorkspaceLifetime"];
12329
+ /** @description Attribution label; one agent session per (workspace, principal, label). */
12330
+ agent_label?: string;
12331
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12143
12332
  };
12144
12333
  };
12145
12334
  };
12146
12335
  responses: {
12336
+ /** @description Default Response */
12337
+ 200: {
12338
+ headers: {
12339
+ [name: string]: unknown;
12340
+ };
12341
+ content: {
12342
+ "application/json": {
12343
+ operation: components["schemas"]["Operation"];
12344
+ workspace: components["schemas"]["Workspace"];
12345
+ /**
12346
+ * Format: uuid
12347
+ * @description UUIDv7, lowercase canonical form.
12348
+ */
12349
+ source_workspace_id: string;
12350
+ cell_endpoint: string | null;
12351
+ tool_token: components["schemas"]["ToolToken"] | null;
12352
+ };
12353
+ };
12354
+ };
12147
12355
  /** @description Default Response */
12148
12356
  202: {
12149
12357
  headers: {
@@ -12623,13 +12831,25 @@ export interface operations {
12623
12831
  "application/json": {
12624
12832
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
12625
12833
  key: string;
12834
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
12835
+ labels?: {
12836
+ [key: string]: string;
12837
+ };
12626
12838
  /** @description Template slug; new workspaces use its latest published version. */
12627
12839
  template: string;
12628
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
12840
+ /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction (allocation_mode: fixed). Given caps replace the stored ones. */
12629
12841
  caps?: {
12630
12842
  cpu_millis?: number;
12631
12843
  memory_mib?: number;
12632
12844
  disk_gib?: number;
12845
+ /**
12846
+ * @description Memory allocation (contracts §32): fixed (default) 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). Takes effect at the next VM start.
12847
+ * @default fixed
12848
+ * @enum {string}
12849
+ */
12850
+ allocation_mode?: "fixed" | "elastic";
12851
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
12852
+ memory_mib_held?: number;
12633
12853
  };
12634
12854
  /**
12635
12855
  * Format: uuid
@@ -12714,6 +12934,8 @@ export interface operations {
12714
12934
  state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
12715
12935
  desired_state?: "running" | "suspended" | "deleted";
12716
12936
  key_prefix?: string;
12937
+ /** @description JSON object of exact label matches; all pairs must match. */
12938
+ labels?: string;
12717
12939
  include_deleted?: boolean;
12718
12940
  /** @description persistent (default), session or any. Key lookups pass any. */
12719
12941
  lifetime?: "persistent" | "session" | "any";
@@ -12769,6 +12991,8 @@ export interface operations {
12769
12991
  state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
12770
12992
  desired_state?: "running" | "suspended" | "deleted";
12771
12993
  key_prefix?: string;
12994
+ /** @description JSON object of exact label matches; all pairs must match. */
12995
+ labels?: string;
12772
12996
  include_deleted?: boolean;
12773
12997
  /** @description persistent (default), session or any. Key lookups pass any. */
12774
12998
  lifetime?: "persistent" | "session" | "any";
@@ -12942,6 +13166,56 @@ export interface operations {
12942
13166
  };
12943
13167
  };
12944
13168
  };
13169
+ putApiV1WorkspacesWorkspaceIdLabels: {
13170
+ parameters: {
13171
+ query?: never;
13172
+ header?: never;
13173
+ path: {
13174
+ /** @description UUIDv7, lowercase canonical form. */
13175
+ workspace_id: string;
13176
+ };
13177
+ cookie?: never;
13178
+ };
13179
+ requestBody: {
13180
+ content: {
13181
+ "application/json": {
13182
+ /** @description Searchable workspace metadata; not secrets. At most 50 labels. */
13183
+ labels: {
13184
+ [key: string]: string;
13185
+ };
13186
+ };
13187
+ };
13188
+ };
13189
+ responses: {
13190
+ /** @description Default Response */
13191
+ 200: {
13192
+ headers: {
13193
+ [name: string]: unknown;
13194
+ };
13195
+ content: {
13196
+ "application/json": components["schemas"]["Workspace"];
13197
+ };
13198
+ };
13199
+ /** @description Default Response */
13200
+ "4XX": {
13201
+ headers: {
13202
+ [name: string]: unknown;
13203
+ };
13204
+ content: {
13205
+ "application/json": components["schemas"]["ErrorBody"];
13206
+ };
13207
+ };
13208
+ /** @description Default Response */
13209
+ "5XX": {
13210
+ headers: {
13211
+ [name: string]: unknown;
13212
+ };
13213
+ content: {
13214
+ "application/json": components["schemas"]["ErrorBody"];
13215
+ };
13216
+ };
13217
+ };
13218
+ };
12945
13219
  putApiV1WorkspacesWorkspaceIdIdlePolicy: {
12946
13220
  parameters: {
12947
13221
  query?: never;
@@ -13249,7 +13523,9 @@ export interface operations {
13249
13523
  postApiV1WorkspacesWorkspaceIdFork: {
13250
13524
  parameters: {
13251
13525
  query?: never;
13252
- header?: never;
13526
+ header?: {
13527
+ prefer?: string;
13528
+ };
13253
13529
  path: {
13254
13530
  /** @description UUIDv7, lowercase canonical form. */
13255
13531
  workspace_id: string;
@@ -13261,17 +13537,47 @@ export interface operations {
13261
13537
  "application/json": {
13262
13538
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
13263
13539
  key: string;
13264
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
13540
+ /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction (allocation_mode: fixed). Given caps replace the stored ones. */
13265
13541
  caps?: {
13266
13542
  cpu_millis?: number;
13267
13543
  memory_mib?: number;
13268
13544
  disk_gib?: number;
13545
+ /**
13546
+ * @description Memory allocation (contracts §32): fixed (default) 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). Takes effect at the next VM start.
13547
+ * @default fixed
13548
+ * @enum {string}
13549
+ */
13550
+ allocation_mode?: "fixed" | "elastic";
13551
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
13552
+ memory_mib_held?: number;
13269
13553
  };
13270
13554
  lifetime?: components["schemas"]["WorkspaceLifetime"];
13555
+ /** @description Attribution label; one agent session per (workspace, principal, label). */
13556
+ agent_label?: string;
13557
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
13271
13558
  };
13272
13559
  };
13273
13560
  };
13274
13561
  responses: {
13562
+ /** @description Default Response */
13563
+ 200: {
13564
+ headers: {
13565
+ [name: string]: unknown;
13566
+ };
13567
+ content: {
13568
+ "application/json": {
13569
+ operation: components["schemas"]["Operation"];
13570
+ workspace: components["schemas"]["Workspace"];
13571
+ /**
13572
+ * Format: uuid
13573
+ * @description UUIDv7, lowercase canonical form.
13574
+ */
13575
+ source_workspace_id: string;
13576
+ cell_endpoint: string | null;
13577
+ tool_token: components["schemas"]["ToolToken"] | null;
13578
+ };
13579
+ };
13580
+ };
13275
13581
  /** @description Default Response */
13276
13582
  202: {
13277
13583
  headers: {
@@ -14778,6 +15084,12 @@ export interface operations {
14778
15084
  } | null;
14779
15085
  defaults: components["schemas"]["TemplateDefaults"];
14780
15086
  settings: components["schemas"]["TemplateSettings"];
15087
+ immutable: {
15088
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15089
+ paths: string[];
15090
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15091
+ bytes: number;
15092
+ } | null;
14781
15093
  files: components["schemas"]["TemplateFilesSummary"];
14782
15094
  rootfs_bytes: number | null;
14783
15095
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -14821,7 +15133,6 @@ export interface operations {
14821
15133
  */
14822
15134
  created_at: string;
14823
15135
  } | null;
14824
- update_policy: components["schemas"]["UpdatePolicy"];
14825
15136
  category: ("os" | "stack") | null;
14826
15137
  }[];
14827
15138
  next_cursor: string | null;
@@ -14990,6 +15301,12 @@ export interface operations {
14990
15301
  } | null;
14991
15302
  defaults: components["schemas"]["TemplateDefaults"];
14992
15303
  settings: components["schemas"]["TemplateSettings"];
15304
+ immutable: {
15305
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15306
+ paths: string[];
15307
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15308
+ bytes: number;
15309
+ } | null;
14993
15310
  files: components["schemas"]["TemplateFilesSummary"];
14994
15311
  rootfs_bytes: number | null;
14995
15312
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15033,7 +15350,6 @@ export interface operations {
15033
15350
  */
15034
15351
  created_at: string;
15035
15352
  } | null;
15036
- update_policy: components["schemas"]["UpdatePolicy"];
15037
15353
  category: ("os" | "stack") | null;
15038
15354
  plan: {
15039
15355
  plan_key: string;
@@ -15149,6 +15465,12 @@ export interface operations {
15149
15465
  } | null;
15150
15466
  defaults: components["schemas"]["TemplateDefaults"];
15151
15467
  settings: components["schemas"]["TemplateSettings"];
15468
+ immutable: {
15469
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15470
+ paths: string[];
15471
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15472
+ bytes: number;
15473
+ } | null;
15152
15474
  files: components["schemas"]["TemplateFilesSummary"];
15153
15475
  rootfs_bytes: number | null;
15154
15476
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15327,6 +15649,12 @@ export interface operations {
15327
15649
  } | null;
15328
15650
  defaults: components["schemas"]["TemplateDefaults"];
15329
15651
  settings: components["schemas"]["TemplateSettings"];
15652
+ immutable: {
15653
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15654
+ paths: string[];
15655
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15656
+ bytes: number;
15657
+ } | null;
15330
15658
  files: components["schemas"]["TemplateFilesSummary"];
15331
15659
  rootfs_bytes: number | null;
15332
15660
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15370,7 +15698,6 @@ export interface operations {
15370
15698
  */
15371
15699
  created_at: string;
15372
15700
  } | null;
15373
- update_policy: components["schemas"]["UpdatePolicy"];
15374
15701
  category: ("os" | "stack") | null;
15375
15702
  }[];
15376
15703
  next_cursor: string | null;
@@ -15537,6 +15864,12 @@ export interface operations {
15537
15864
  } | null;
15538
15865
  defaults: components["schemas"]["TemplateDefaults"];
15539
15866
  settings: components["schemas"]["TemplateSettings"];
15867
+ immutable: {
15868
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15869
+ paths: string[];
15870
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15871
+ bytes: number;
15872
+ } | null;
15540
15873
  files: components["schemas"]["TemplateFilesSummary"];
15541
15874
  rootfs_bytes: number | null;
15542
15875
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15580,7 +15913,6 @@ export interface operations {
15580
15913
  */
15581
15914
  created_at: string;
15582
15915
  } | null;
15583
- update_policy: components["schemas"]["UpdatePolicy"];
15584
15916
  category: ("os" | "stack") | null;
15585
15917
  plan: {
15586
15918
  plan_key: string;
@@ -15696,6 +16028,12 @@ export interface operations {
15696
16028
  } | null;
15697
16029
  defaults: components["schemas"]["TemplateDefaults"];
15698
16030
  settings: components["schemas"]["TemplateSettings"];
16031
+ immutable: {
16032
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
16033
+ paths: string[];
16034
+ /** @description Size of the version’s immutable image (counts toward template storage). */
16035
+ bytes: number;
16036
+ } | null;
15699
16037
  files: components["schemas"]["TemplateFilesSummary"];
15700
16038
  rootfs_bytes: number | null;
15701
16039
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15960,6 +16298,8 @@ export interface operations {
15960
16298
  kind: "file" | "tar";
15961
16299
  }[];
15962
16300
  };
16301
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16302
+ immutable: string[];
15963
16303
  };
15964
16304
  result: {
15965
16305
  artifact_sha256: string | null;
@@ -15983,8 +16323,13 @@ export interface operations {
15983
16323
  } | null;
15984
16324
  };
15985
16325
  failure: {
16326
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
15986
16327
  code: string;
15987
16328
  message: string;
16329
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16330
+ details?: {
16331
+ [key: string]: unknown;
16332
+ };
15988
16333
  } | null;
15989
16334
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
15990
16335
  log: {
@@ -16022,6 +16367,8 @@ export interface operations {
16022
16367
  produced_layer_id: string | null;
16023
16368
  squashed: boolean | null;
16024
16369
  org_bytes: number | null;
16370
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
16371
+ immutable_paths: string[];
16025
16372
  }[];
16026
16373
  next_cursor: string | null;
16027
16374
  };
@@ -16286,6 +16633,8 @@ export interface operations {
16286
16633
  kind: "file" | "tar";
16287
16634
  }[];
16288
16635
  };
16636
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16637
+ immutable: string[];
16289
16638
  };
16290
16639
  result: {
16291
16640
  artifact_sha256: string | null;
@@ -16309,8 +16658,13 @@ export interface operations {
16309
16658
  } | null;
16310
16659
  };
16311
16660
  failure: {
16661
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
16312
16662
  code: string;
16313
16663
  message: string;
16664
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16665
+ details?: {
16666
+ [key: string]: unknown;
16667
+ };
16314
16668
  } | null;
16315
16669
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16316
16670
  log: {
@@ -16348,6 +16702,8 @@ export interface operations {
16348
16702
  produced_layer_id: string | null;
16349
16703
  squashed: boolean | null;
16350
16704
  org_bytes: number | null;
16705
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
16706
+ immutable_paths: string[];
16351
16707
  };
16352
16708
  };
16353
16709
  };
@@ -16595,6 +16951,8 @@ export interface operations {
16595
16951
  kind: "file" | "tar";
16596
16952
  }[];
16597
16953
  };
16954
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16955
+ immutable: string[];
16598
16956
  };
16599
16957
  result: {
16600
16958
  artifact_sha256: string | null;
@@ -16618,8 +16976,13 @@ export interface operations {
16618
16976
  } | null;
16619
16977
  };
16620
16978
  failure: {
16979
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
16621
16980
  code: string;
16622
16981
  message: string;
16982
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16983
+ details?: {
16984
+ [key: string]: unknown;
16985
+ };
16623
16986
  } | null;
16624
16987
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16625
16988
  log: {
@@ -16657,6 +17020,8 @@ export interface operations {
16657
17020
  produced_layer_id: string | null;
16658
17021
  squashed: boolean | null;
16659
17022
  org_bytes: number | null;
17023
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
17024
+ immutable_paths: string[];
16660
17025
  };
16661
17026
  };
16662
17027
  };
@@ -16901,6 +17266,8 @@ export interface operations {
16901
17266
  kind: "file" | "tar";
16902
17267
  }[];
16903
17268
  };
17269
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
17270
+ immutable: string[];
16904
17271
  };
16905
17272
  result: {
16906
17273
  artifact_sha256: string | null;
@@ -16924,8 +17291,13 @@ export interface operations {
16924
17291
  } | null;
16925
17292
  };
16926
17293
  failure: {
17294
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
16927
17295
  code: string;
16928
17296
  message: string;
17297
+ /** @description Code-specific details (immutable_path_missing: {path}). */
17298
+ details?: {
17299
+ [key: string]: unknown;
17300
+ };
16929
17301
  } | null;
16930
17302
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16931
17303
  log: {
@@ -16963,6 +17335,8 @@ export interface operations {
16963
17335
  produced_layer_id: string | null;
16964
17336
  squashed: boolean | null;
16965
17337
  org_bytes: number | null;
17338
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
17339
+ immutable_paths: string[];
16966
17340
  };
16967
17341
  };
16968
17342
  };
@@ -17173,6 +17547,8 @@ export interface operations {
17173
17547
  kind: "file" | "tar";
17174
17548
  }[];
17175
17549
  };
17550
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
17551
+ immutable: string[];
17176
17552
  };
17177
17553
  result: {
17178
17554
  artifact_sha256: string | null;
@@ -17196,8 +17572,13 @@ export interface operations {
17196
17572
  } | null;
17197
17573
  };
17198
17574
  failure: {
17575
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
17199
17576
  code: string;
17200
17577
  message: string;
17578
+ /** @description Code-specific details (immutable_path_missing: {path}). */
17579
+ details?: {
17580
+ [key: string]: unknown;
17581
+ };
17201
17582
  } | null;
17202
17583
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
17203
17584
  log: {
@@ -17235,6 +17616,8 @@ export interface operations {
17235
17616
  produced_layer_id: string | null;
17236
17617
  squashed: boolean | null;
17237
17618
  org_bytes: number | null;
17619
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
17620
+ immutable_paths: string[];
17238
17621
  };
17239
17622
  };
17240
17623
  };
@@ -17866,6 +18249,12 @@ export interface operations {
17866
18249
  } | null;
17867
18250
  defaults: components["schemas"]["TemplateDefaults"];
17868
18251
  settings: components["schemas"]["TemplateSettings"];
18252
+ immutable: {
18253
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18254
+ paths: string[];
18255
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18256
+ bytes: number;
18257
+ } | null;
17869
18258
  files: components["schemas"]["TemplateFilesSummary"];
17870
18259
  rootfs_bytes: number | null;
17871
18260
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -17909,7 +18298,6 @@ export interface operations {
17909
18298
  */
17910
18299
  created_at: string;
17911
18300
  } | null;
17912
- update_policy: components["schemas"]["UpdatePolicy"];
17913
18301
  category: ("os" | "stack") | null;
17914
18302
  plan: {
17915
18303
  plan_key: string;
@@ -18025,6 +18413,12 @@ export interface operations {
18025
18413
  } | null;
18026
18414
  defaults: components["schemas"]["TemplateDefaults"];
18027
18415
  settings: components["schemas"]["TemplateSettings"];
18416
+ immutable: {
18417
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18418
+ paths: string[];
18419
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18420
+ bytes: number;
18421
+ } | null;
18028
18422
  files: components["schemas"]["TemplateFilesSummary"];
18029
18423
  rootfs_bytes: number | null;
18030
18424
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18201,6 +18595,12 @@ export interface operations {
18201
18595
  } | null;
18202
18596
  defaults: components["schemas"]["TemplateDefaults"];
18203
18597
  settings: components["schemas"]["TemplateSettings"];
18598
+ immutable: {
18599
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18600
+ paths: string[];
18601
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18602
+ bytes: number;
18603
+ } | null;
18204
18604
  files: components["schemas"]["TemplateFilesSummary"];
18205
18605
  rootfs_bytes: number | null;
18206
18606
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18244,7 +18644,6 @@ export interface operations {
18244
18644
  */
18245
18645
  created_at: string;
18246
18646
  } | null;
18247
- update_policy: components["schemas"]["UpdatePolicy"];
18248
18647
  category: ("os" | "stack") | null;
18249
18648
  plan: {
18250
18649
  plan_key: string;
@@ -18360,6 +18759,12 @@ export interface operations {
18360
18759
  } | null;
18361
18760
  defaults: components["schemas"]["TemplateDefaults"];
18362
18761
  settings: components["schemas"]["TemplateSettings"];
18762
+ immutable: {
18763
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18764
+ paths: string[];
18765
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18766
+ bytes: number;
18767
+ } | null;
18363
18768
  files: components["schemas"]["TemplateFilesSummary"];
18364
18769
  rootfs_bytes: number | null;
18365
18770
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18541,6 +18946,12 @@ export interface operations {
18541
18946
  } | null;
18542
18947
  defaults: components["schemas"]["TemplateDefaults"];
18543
18948
  settings: components["schemas"]["TemplateSettings"];
18949
+ immutable: {
18950
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18951
+ paths: string[];
18952
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18953
+ bytes: number;
18954
+ } | null;
18544
18955
  files: components["schemas"]["TemplateFilesSummary"];
18545
18956
  rootfs_bytes: number | null;
18546
18957
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18584,7 +18995,6 @@ export interface operations {
18584
18995
  */
18585
18996
  created_at: string;
18586
18997
  } | null;
18587
- update_policy: components["schemas"]["UpdatePolicy"];
18588
18998
  category: ("os" | "stack") | null;
18589
18999
  }[];
18590
19000
  next_cursor: string | null;
@@ -18753,6 +19163,12 @@ export interface operations {
18753
19163
  } | null;
18754
19164
  defaults: components["schemas"]["TemplateDefaults"];
18755
19165
  settings: components["schemas"]["TemplateSettings"];
19166
+ immutable: {
19167
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
19168
+ paths: string[];
19169
+ /** @description Size of the version’s immutable image (counts toward template storage). */
19170
+ bytes: number;
19171
+ } | null;
18756
19172
  files: components["schemas"]["TemplateFilesSummary"];
18757
19173
  rootfs_bytes: number | null;
18758
19174
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18796,7 +19212,6 @@ export interface operations {
18796
19212
  */
18797
19213
  created_at: string;
18798
19214
  } | null;
18799
- update_policy: components["schemas"]["UpdatePolicy"];
18800
19215
  category: ("os" | "stack") | null;
18801
19216
  plan: {
18802
19217
  plan_key: string;
@@ -18912,6 +19327,12 @@ export interface operations {
18912
19327
  } | null;
18913
19328
  defaults: components["schemas"]["TemplateDefaults"];
18914
19329
  settings: components["schemas"]["TemplateSettings"];
19330
+ immutable: {
19331
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
19332
+ paths: string[];
19333
+ /** @description Size of the version’s immutable image (counts toward template storage). */
19334
+ bytes: number;
19335
+ } | null;
18915
19336
  files: components["schemas"]["TemplateFilesSummary"];
18916
19337
  rootfs_bytes: number | null;
18917
19338
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -19176,6 +19597,8 @@ export interface operations {
19176
19597
  kind: "file" | "tar";
19177
19598
  }[];
19178
19599
  };
19600
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
19601
+ immutable: string[];
19179
19602
  };
19180
19603
  result: {
19181
19604
  artifact_sha256: string | null;
@@ -19199,8 +19622,13 @@ export interface operations {
19199
19622
  } | null;
19200
19623
  };
19201
19624
  failure: {
19625
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
19202
19626
  code: string;
19203
19627
  message: string;
19628
+ /** @description Code-specific details (immutable_path_missing: {path}). */
19629
+ details?: {
19630
+ [key: string]: unknown;
19631
+ };
19204
19632
  } | null;
19205
19633
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
19206
19634
  log: {
@@ -19238,6 +19666,8 @@ export interface operations {
19238
19666
  produced_layer_id: string | null;
19239
19667
  squashed: boolean | null;
19240
19668
  org_bytes: number | null;
19669
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
19670
+ immutable_paths: string[];
19241
19671
  }[];
19242
19672
  next_cursor: string | null;
19243
19673
  };
@@ -19502,6 +19932,8 @@ export interface operations {
19502
19932
  kind: "file" | "tar";
19503
19933
  }[];
19504
19934
  };
19935
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
19936
+ immutable: string[];
19505
19937
  };
19506
19938
  result: {
19507
19939
  artifact_sha256: string | null;
@@ -19525,8 +19957,13 @@ export interface operations {
19525
19957
  } | null;
19526
19958
  };
19527
19959
  failure: {
19960
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
19528
19961
  code: string;
19529
19962
  message: string;
19963
+ /** @description Code-specific details (immutable_path_missing: {path}). */
19964
+ details?: {
19965
+ [key: string]: unknown;
19966
+ };
19530
19967
  } | null;
19531
19968
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
19532
19969
  log: {
@@ -19564,6 +20001,8 @@ export interface operations {
19564
20001
  produced_layer_id: string | null;
19565
20002
  squashed: boolean | null;
19566
20003
  org_bytes: number | null;
20004
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
20005
+ immutable_paths: string[];
19567
20006
  };
19568
20007
  };
19569
20008
  };
@@ -19811,6 +20250,8 @@ export interface operations {
19811
20250
  kind: "file" | "tar";
19812
20251
  }[];
19813
20252
  };
20253
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20254
+ immutable: string[];
19814
20255
  };
19815
20256
  result: {
19816
20257
  artifact_sha256: string | null;
@@ -19834,8 +20275,13 @@ export interface operations {
19834
20275
  } | null;
19835
20276
  };
19836
20277
  failure: {
20278
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
19837
20279
  code: string;
19838
20280
  message: string;
20281
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20282
+ details?: {
20283
+ [key: string]: unknown;
20284
+ };
19839
20285
  } | null;
19840
20286
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
19841
20287
  log: {
@@ -19873,6 +20319,8 @@ export interface operations {
19873
20319
  produced_layer_id: string | null;
19874
20320
  squashed: boolean | null;
19875
20321
  org_bytes: number | null;
20322
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
20323
+ immutable_paths: string[];
19876
20324
  };
19877
20325
  };
19878
20326
  };
@@ -20117,6 +20565,8 @@ export interface operations {
20117
20565
  kind: "file" | "tar";
20118
20566
  }[];
20119
20567
  };
20568
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20569
+ immutable: string[];
20120
20570
  };
20121
20571
  result: {
20122
20572
  artifact_sha256: string | null;
@@ -20140,8 +20590,13 @@ export interface operations {
20140
20590
  } | null;
20141
20591
  };
20142
20592
  failure: {
20593
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
20143
20594
  code: string;
20144
20595
  message: string;
20596
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20597
+ details?: {
20598
+ [key: string]: unknown;
20599
+ };
20145
20600
  } | null;
20146
20601
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
20147
20602
  log: {
@@ -20179,6 +20634,8 @@ export interface operations {
20179
20634
  produced_layer_id: string | null;
20180
20635
  squashed: boolean | null;
20181
20636
  org_bytes: number | null;
20637
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
20638
+ immutable_paths: string[];
20182
20639
  };
20183
20640
  };
20184
20641
  };
@@ -20389,6 +20846,8 @@ export interface operations {
20389
20846
  kind: "file" | "tar";
20390
20847
  }[];
20391
20848
  };
20849
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20850
+ immutable: string[];
20392
20851
  };
20393
20852
  result: {
20394
20853
  artifact_sha256: string | null;
@@ -20412,8 +20871,13 @@ export interface operations {
20412
20871
  } | null;
20413
20872
  };
20414
20873
  failure: {
20874
+ /** @description build_error, timeout, resource_limit, scan_failed, compatibility_failed, base_unavailable, network_denied, internal_error, publish_failed, source_unavailable, immutable_path_missing (an immutable path is not a directory in the built filesystem: details.path), immutable_image_too_large (the immutable image exceeds 16 GiB). */
20415
20875
  code: string;
20416
20876
  message: string;
20877
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20878
+ details?: {
20879
+ [key: string]: unknown;
20880
+ };
20417
20881
  } | null;
20418
20882
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
20419
20883
  log: {
@@ -20451,6 +20915,8 @@ export interface operations {
20451
20915
  produced_layer_id: string | null;
20452
20916
  squashed: boolean | null;
20453
20917
  org_bytes: number | null;
20918
+ /** @description The immutable paths the produced version declares (contracts §34.1), in byte order: the recipe’s `immutable`, else the list of the template’s open version (a save from a workspace: the target template’s open version’s list, else the workspace’s version’s). Empty for none. */
20919
+ immutable_paths: string[];
20454
20920
  };
20455
20921
  };
20456
20922
  };
@@ -20902,6 +21368,12 @@ export interface operations {
20902
21368
  } | null;
20903
21369
  defaults: components["schemas"]["TemplateDefaults"];
20904
21370
  settings: components["schemas"]["TemplateSettings"];
21371
+ immutable: {
21372
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21373
+ paths: string[];
21374
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21375
+ bytes: number;
21376
+ } | null;
20905
21377
  files: components["schemas"]["TemplateFilesSummary"];
20906
21378
  rootfs_bytes: number | null;
20907
21379
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -20945,7 +21417,6 @@ export interface operations {
20945
21417
  */
20946
21418
  created_at: string;
20947
21419
  } | null;
20948
- update_policy: components["schemas"]["UpdatePolicy"];
20949
21420
  category: ("os" | "stack") | null;
20950
21421
  plan: {
20951
21422
  plan_key: string;
@@ -21061,6 +21532,12 @@ export interface operations {
21061
21532
  } | null;
21062
21533
  defaults: components["schemas"]["TemplateDefaults"];
21063
21534
  settings: components["schemas"]["TemplateSettings"];
21535
+ immutable: {
21536
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21537
+ paths: string[];
21538
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21539
+ bytes: number;
21540
+ } | null;
21064
21541
  files: components["schemas"]["TemplateFilesSummary"];
21065
21542
  rootfs_bytes: number | null;
21066
21543
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -21237,6 +21714,12 @@ export interface operations {
21237
21714
  } | null;
21238
21715
  defaults: components["schemas"]["TemplateDefaults"];
21239
21716
  settings: components["schemas"]["TemplateSettings"];
21717
+ immutable: {
21718
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21719
+ paths: string[];
21720
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21721
+ bytes: number;
21722
+ } | null;
21240
21723
  files: components["schemas"]["TemplateFilesSummary"];
21241
21724
  rootfs_bytes: number | null;
21242
21725
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -21280,7 +21763,6 @@ export interface operations {
21280
21763
  */
21281
21764
  created_at: string;
21282
21765
  } | null;
21283
- update_policy: components["schemas"]["UpdatePolicy"];
21284
21766
  category: ("os" | "stack") | null;
21285
21767
  plan: {
21286
21768
  plan_key: string;
@@ -21396,6 +21878,12 @@ export interface operations {
21396
21878
  } | null;
21397
21879
  defaults: components["schemas"]["TemplateDefaults"];
21398
21880
  settings: components["schemas"]["TemplateSettings"];
21881
+ immutable: {
21882
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21883
+ paths: string[];
21884
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21885
+ bytes: number;
21886
+ } | null;
21399
21887
  files: components["schemas"]["TemplateFilesSummary"];
21400
21888
  rootfs_bytes: number | null;
21401
21889
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -33652,6 +34140,10 @@ export interface operations {
33652
34140
  controller_leases: {
33653
34141
  total: number;
33654
34142
  expired: number;
34143
+ /** @description Leases whose loop_state is late. */
34144
+ late: number;
34145
+ /** @description Leases whose loop_state is stalled (what Status alerts on). */
34146
+ stalled: number;
33655
34147
  leases: {
33656
34148
  name: string;
33657
34149
  holder: string;
@@ -33673,6 +34165,13 @@ export interface operations {
33673
34165
  expires_at: string;
33674
34166
  expired: boolean;
33675
34167
  renewed_age_seconds: number;
34168
+ /**
34169
+ * @description Against the loop's cell-loop-stalled CloudWatch alarm threshold: running (held), handover (no holder for at most one interval + 60 s, e.g. a deploy's release), late (no holder for longer, not stalled yet), stalled (no renewal for longer than the threshold).
34170
+ * @enum {string}
34171
+ */
34172
+ loop_state: "running" | "handover" | "late" | "stalled";
34173
+ /** @description The loop's alarm threshold: stalled past this many seconds without a renewal. */
34174
+ stall_after_seconds: number;
33676
34175
  }[];
33677
34176
  };
33678
34177
  stale_after_seconds: number;