@shardflux/sdk 0.12.0 → 0.13.1

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.
@@ -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, 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.
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;
@@ -1588,7 +1588,7 @@ export interface paths {
1588
1588
  put?: never;
1589
1589
  /**
1590
1590
  * Fork a workspace into a new key (independent copy of its committed state)
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.
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).
1592
1592
  */
1593
1593
  post: operations["postV1WorkspacesWorkspaceIdFork"];
1594
1594
  delete?: never;
@@ -1648,7 +1648,7 @@ export interface paths {
1648
1648
  put?: never;
1649
1649
  /**
1650
1650
  * Save a layered workspace as the next version of an organization template
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). 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.
1652
1652
  */
1653
1653
  post: operations["postV1WorkspacesWorkspaceIdSaveAsTemplate"];
1654
1654
  delete?: never;
@@ -1759,7 +1759,7 @@ export interface paths {
1759
1759
  put?: never;
1760
1760
  /**
1761
1761
  * Open a workspace by key (create on first use, reconnect or resume afterwards)
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.
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).
1763
1763
  */
1764
1764
  post: operations["postApiV1WorkspacesOpen"];
1765
1765
  delete?: never;
@@ -1981,7 +1981,7 @@ export interface paths {
1981
1981
  put?: never;
1982
1982
  /**
1983
1983
  * Fork a workspace into a new key (independent copy of its committed state)
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.
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).
1985
1985
  */
1986
1986
  post: operations["postApiV1WorkspacesWorkspaceIdFork"];
1987
1987
  delete?: never;
@@ -2041,7 +2041,7 @@ export interface paths {
2041
2041
  put?: never;
2042
2042
  /**
2043
2043
  * Save a layered workspace as the next version of an organization template
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). 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.
2045
2045
  */
2046
2046
  post: operations["postApiV1WorkspacesWorkspaceIdSaveAsTemplate"];
2047
2047
  delete?: never;
@@ -2453,7 +2453,7 @@ export interface paths {
2453
2453
  put?: never;
2454
2454
  /**
2455
2455
  * Request a custom template build (queued for the isolated builder)
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), 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.
2457
2457
  */
2458
2458
  post: operations["postV1OrganizationsOrganizationIdTemplateBuilds"];
2459
2459
  delete?: never;
@@ -2710,7 +2710,7 @@ export interface paths {
2710
2710
  put?: never;
2711
2711
  /**
2712
2712
  * Publish an organization template version
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. 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.
2714
2714
  */
2715
2715
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionPublish"];
2716
2716
  delete?: never;
@@ -2730,7 +2730,7 @@ export interface paths {
2730
2730
  put?: never;
2731
2731
  /**
2732
2732
  * Archive an organization template version
2733
- * @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.
2734
2734
  */
2735
2735
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionArchive"];
2736
2736
  delete?: never;
@@ -2791,7 +2791,7 @@ export interface paths {
2791
2791
  put?: never;
2792
2792
  /**
2793
2793
  * Request a custom template build (queued for the isolated builder)
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), 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.
2795
2795
  */
2796
2796
  post: operations["postApiV1OrganizationsOrganizationIdTemplateBuilds"];
2797
2797
  delete?: never;
@@ -2968,7 +2968,7 @@ export interface paths {
2968
2968
  put?: never;
2969
2969
  /**
2970
2970
  * Publish an organization template version
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. 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.
2972
2972
  */
2973
2973
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionPublish"];
2974
2974
  delete?: never;
@@ -2988,7 +2988,7 @@ export interface paths {
2988
2988
  put?: never;
2989
2989
  /**
2990
2990
  * Archive an organization template version
2991
- * @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.
2992
2992
  */
2993
2993
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionArchive"];
2994
2994
  delete?: never;
@@ -3154,7 +3154,7 @@ export interface paths {
3154
3154
  put?: never;
3155
3155
  /**
3156
3156
  * Publish the draft as the template’s next version (save-as-template from the draft)
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. 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.
3158
3158
  */
3159
3159
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
3160
3160
  delete?: never;
@@ -3174,7 +3174,7 @@ export interface paths {
3174
3174
  put?: never;
3175
3175
  /**
3176
3176
  * Publish the draft as the template’s next version (save-as-template from the draft)
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. 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.
3178
3178
  */
3179
3179
  post: operations["postV1TemplatesSlugDraftPublish"];
3180
3180
  delete?: never;
@@ -3267,7 +3267,7 @@ export interface paths {
3267
3267
  put?: never;
3268
3268
  /**
3269
3269
  * Publish the draft as the template’s next version (save-as-template from the draft)
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. 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.
3271
3271
  */
3272
3272
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
3273
3273
  delete?: never;
@@ -5630,6 +5630,21 @@ export interface components {
5630
5630
  } & {
5631
5631
  [key: string]: unknown;
5632
5632
  };
5633
+ host_lost?: {
5634
+ /** @description RFC 3339: when the host failure was detected; the workspace was suspended then. */
5635
+ detected_at: string;
5636
+ /**
5637
+ * @description resume and open: disk when the workspace booted from its disk (files kept, processes and memory not); checkpoint when it was restored from its newest checkpoint (see state_as_of). Absent on a suspend.
5638
+ * @enum {string}
5639
+ */
5640
+ restored_from?: "disk" | "checkpoint";
5641
+ /** @description restored_from checkpoint: the checkpoint this resume restored. */
5642
+ restored_checkpoint_id?: string;
5643
+ /** @description restored_from checkpoint, RFC 3339: when that checkpoint committed; the workspace state is as of then. */
5644
+ state_as_of?: string;
5645
+ } & {
5646
+ [key: string]: unknown;
5647
+ };
5633
5648
  } & {
5634
5649
  [key: string]: unknown;
5635
5650
  };
@@ -5649,11 +5664,6 @@ export interface components {
5649
5664
  * @enum {string}
5650
5665
  */
5651
5666
  WorkspacePurpose: "standard" | "template_draft" | "template_test";
5652
- /**
5653
- * @description Reserved (T2). Always `pinned` in T1: a workspace stays on its template version; `auto` is refused with 422 update_policy_not_available.
5654
- * @enum {string}
5655
- */
5656
- UpdatePolicy: "pinned" | "auto";
5657
5667
  /** @description Where the workspace’s disk came from; null for a workspace opened from its template. */
5658
5668
  WorkspaceOrigin: {
5659
5669
  /** @enum {string} */
@@ -5704,7 +5714,6 @@ export interface components {
5704
5714
  } | null;
5705
5715
  egress: components["schemas"]["TemplateEgressDefault"] | null;
5706
5716
  agent_tools: null;
5707
- update_policy: null;
5708
5717
  };
5709
5718
  /** @description The template’s workspace network ceiling (contracts §24.3): the cell intersects it with the effective egress policy. */
5710
5719
  TemplateEgressDefault: {
@@ -5813,7 +5822,7 @@ export interface components {
5813
5822
  ready_timeout_seconds?: number;
5814
5823
  };
5815
5824
  };
5816
- /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
5825
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools stays reserved (null). */
5817
5826
  defaults?: {
5818
5827
  /** @enum {unknown} */
5819
5828
  lifetime?: "persistent" | "session";
@@ -5831,7 +5840,6 @@ export interface components {
5831
5840
  allow_hosts?: string[];
5832
5841
  };
5833
5842
  agent_tools?: null;
5834
- update_policy?: null;
5835
5843
  };
5836
5844
  };
5837
5845
  /** @description Recipe v1: a Dockerfile in the host builder’s dialect (no `schema` field). */
@@ -5864,7 +5872,7 @@ export interface components {
5864
5872
  };
5865
5873
  /**
5866
5874
  * Template recipe v2 (shardflux.template-recipe.v2)
5867
- * @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.
5875
+ * @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).
5868
5876
  */
5869
5877
  TemplateRecipeV2: {
5870
5878
  /** @enum {unknown} */
@@ -5978,7 +5986,7 @@ export interface components {
5978
5986
  ready_timeout_seconds?: number;
5979
5987
  };
5980
5988
  };
5981
- /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
5989
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools stays reserved (null). */
5982
5990
  defaults?: {
5983
5991
  /** @enum {unknown} */
5984
5992
  lifetime?: "persistent" | "session";
@@ -5996,9 +6004,10 @@ export interface components {
5996
6004
  allow_hosts?: string[];
5997
6005
  };
5998
6006
  agent_tools?: null;
5999
- update_policy?: null;
6000
6007
  };
6001
6008
  };
6009
+ /** @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. */
6010
+ immutable?: string[];
6002
6011
  /** @description Builder VM bounds, exactly as recipe v1 `resources` (not part of recipe_sha256). */
6003
6012
  resources?: {
6004
6013
  cpu_millis?: number;
@@ -6391,6 +6400,8 @@ export interface components {
6391
6400
  kind: "file" | "tar";
6392
6401
  }[];
6393
6402
  };
6403
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
6404
+ immutable: string[];
6394
6405
  };
6395
6406
  result: {
6396
6407
  artifact_sha256: string | null;
@@ -6414,8 +6425,13 @@ export interface components {
6414
6425
  } | null;
6415
6426
  };
6416
6427
  failure: {
6428
+ /** @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). */
6417
6429
  code: string;
6418
6430
  message: string;
6431
+ /** @description Code-specific details (immutable_path_missing: {path}). */
6432
+ details?: {
6433
+ [key: string]: unknown;
6434
+ };
6419
6435
  } | null;
6420
6436
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
6421
6437
  log: {
@@ -6453,6 +6469,8 @@ export interface components {
6453
6469
  produced_layer_id: string | null;
6454
6470
  squashed: boolean | null;
6455
6471
  org_bytes: number | null;
6472
+ /** @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. */
6473
+ immutable_paths: string[];
6456
6474
  };
6457
6475
  /** @description A disk-only capture of the draft (contracts §19.9). */
6458
6476
  DraftState: {
@@ -6541,7 +6559,6 @@ export interface components {
6541
6559
  } | null;
6542
6560
  /** @description Reserved (T2). */
6543
6561
  agent_tools?: null;
6544
- update_policy?: ("pinned" | "auto") | null;
6545
6562
  };
6546
6563
  settings?: components["schemas"]["TemplateSettingsInput"];
6547
6564
  /** @default true */
@@ -6572,7 +6589,6 @@ export interface components {
6572
6589
  } | null;
6573
6590
  /** @description Reserved (T2). */
6574
6591
  agent_tools?: null;
6575
- update_policy?: ("pinned" | "auto") | null;
6576
6592
  };
6577
6593
  /**
6578
6594
  * Format: uuid
@@ -6760,7 +6776,7 @@ export interface components {
6760
6776
  * @description UUIDv7, lowercase canonical form.
6761
6777
  */
6762
6778
  template_version_id: string;
6763
- /** @description Immutable template version this workspace was created from. */
6779
+ /** @description The template version this workspace was created from (immutable), and the version its immutable paths show. */
6764
6780
  template: {
6765
6781
  /**
6766
6782
  * Format: uuid
@@ -6774,6 +6790,7 @@ export interface components {
6774
6790
  template_id: string;
6775
6791
  slug: string;
6776
6792
  version: number;
6793
+ immutable_version: number | null;
6777
6794
  };
6778
6795
  /** @enum {string} */
6779
6796
  desired_state: "running" | "suspended" | "deleted";
@@ -6782,11 +6799,29 @@ export interface components {
6782
6799
  cell_id: string | null;
6783
6800
  cell_endpoint: string | null;
6784
6801
  ownership_epoch: number;
6785
- /** @description User caps for this workspace (null = no user restriction). */
6802
+ /** @description User caps for this workspace (null = no user restriction) and its memory allocation mode. */
6786
6803
  caps: {
6787
6804
  cpu_millis: number | null;
6788
6805
  memory_mib: number | null;
6789
6806
  disk_gib: number | null;
6807
+ /**
6808
+ * @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.
6809
+ * @enum {string}
6810
+ */
6811
+ allocation_mode: "fixed" | "elastic";
6812
+ /** @description Elastic only: the memory held while idle (MiB). */
6813
+ memory_mib_held?: number;
6814
+ };
6815
+ /** @description Memory of the workspace (contracts §32.6). */
6816
+ memory: {
6817
+ /**
6818
+ * @description The layout of the running VM, else the one the next start uses.
6819
+ * @enum {string}
6820
+ */
6821
+ allocation_mode: "fixed" | "elastic";
6822
+ promised_mib: number | null;
6823
+ held_mib: number | null;
6824
+ plugged_mib: number | null;
6790
6825
  };
6791
6826
  ceilings: {
6792
6827
  cpu_millis: number;
@@ -6839,7 +6874,6 @@ export interface components {
6839
6874
  origin: components["schemas"]["WorkspaceOrigin"] | null;
6840
6875
  ended_reason: ("closed" | "idle_timeout" | "draft_discarded") | null;
6841
6876
  dev_template_id: string | null;
6842
- update_policy: components["schemas"]["UpdatePolicy"];
6843
6877
  startup: components["schemas"]["WorkspaceStartup"] | null;
6844
6878
  mode: components["schemas"]["WorkspaceMode"];
6845
6879
  /** @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. */
@@ -11592,11 +11626,19 @@ export interface operations {
11592
11626
  };
11593
11627
  /** @description Template slug; new workspaces use its latest published version. */
11594
11628
  template: string;
11595
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
11629
+ /** @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. */
11596
11630
  caps?: {
11597
11631
  cpu_millis?: number;
11598
11632
  memory_mib?: number;
11599
11633
  disk_gib?: number;
11634
+ /**
11635
+ * @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.
11636
+ * @default fixed
11637
+ * @enum {string}
11638
+ */
11639
+ allocation_mode?: "fixed" | "elastic";
11640
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
11641
+ memory_mib_held?: number;
11600
11642
  };
11601
11643
  /**
11602
11644
  * Format: uuid
@@ -12270,7 +12312,9 @@ export interface operations {
12270
12312
  postV1WorkspacesWorkspaceIdFork: {
12271
12313
  parameters: {
12272
12314
  query?: never;
12273
- header?: never;
12315
+ header?: {
12316
+ prefer?: string;
12317
+ };
12274
12318
  path: {
12275
12319
  /** @description UUIDv7, lowercase canonical form. */
12276
12320
  workspace_id: string;
@@ -12282,17 +12326,47 @@ export interface operations {
12282
12326
  "application/json": {
12283
12327
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
12284
12328
  key: string;
12285
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
12329
+ /** @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. */
12286
12330
  caps?: {
12287
12331
  cpu_millis?: number;
12288
12332
  memory_mib?: number;
12289
12333
  disk_gib?: number;
12334
+ /**
12335
+ * @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.
12336
+ * @default fixed
12337
+ * @enum {string}
12338
+ */
12339
+ allocation_mode?: "fixed" | "elastic";
12340
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
12341
+ memory_mib_held?: number;
12290
12342
  };
12291
12343
  lifetime?: components["schemas"]["WorkspaceLifetime"];
12344
+ /** @description Attribution label; one agent session per (workspace, principal, label). */
12345
+ agent_label?: string;
12346
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
12292
12347
  };
12293
12348
  };
12294
12349
  };
12295
12350
  responses: {
12351
+ /** @description Default Response */
12352
+ 200: {
12353
+ headers: {
12354
+ [name: string]: unknown;
12355
+ };
12356
+ content: {
12357
+ "application/json": {
12358
+ operation: components["schemas"]["Operation"];
12359
+ workspace: components["schemas"]["Workspace"];
12360
+ /**
12361
+ * Format: uuid
12362
+ * @description UUIDv7, lowercase canonical form.
12363
+ */
12364
+ source_workspace_id: string;
12365
+ cell_endpoint: string | null;
12366
+ tool_token: components["schemas"]["ToolToken"] | null;
12367
+ };
12368
+ };
12369
+ };
12296
12370
  /** @description Default Response */
12297
12371
  202: {
12298
12372
  headers: {
@@ -12778,11 +12852,19 @@ export interface operations {
12778
12852
  };
12779
12853
  /** @description Template slug; new workspaces use its latest published version. */
12780
12854
  template: string;
12781
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
12855
+ /** @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. */
12782
12856
  caps?: {
12783
12857
  cpu_millis?: number;
12784
12858
  memory_mib?: number;
12785
12859
  disk_gib?: number;
12860
+ /**
12861
+ * @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.
12862
+ * @default fixed
12863
+ * @enum {string}
12864
+ */
12865
+ allocation_mode?: "fixed" | "elastic";
12866
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
12867
+ memory_mib_held?: number;
12786
12868
  };
12787
12869
  /**
12788
12870
  * Format: uuid
@@ -13456,7 +13538,9 @@ export interface operations {
13456
13538
  postApiV1WorkspacesWorkspaceIdFork: {
13457
13539
  parameters: {
13458
13540
  query?: never;
13459
- header?: never;
13541
+ header?: {
13542
+ prefer?: string;
13543
+ };
13460
13544
  path: {
13461
13545
  /** @description UUIDv7, lowercase canonical form. */
13462
13546
  workspace_id: string;
@@ -13468,17 +13552,47 @@ export interface operations {
13468
13552
  "application/json": {
13469
13553
  /** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
13470
13554
  key: string;
13471
- /** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
13555
+ /** @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. */
13472
13556
  caps?: {
13473
13557
  cpu_millis?: number;
13474
13558
  memory_mib?: number;
13475
13559
  disk_gib?: number;
13560
+ /**
13561
+ * @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.
13562
+ * @default fixed
13563
+ * @enum {string}
13564
+ */
13565
+ allocation_mode?: "fixed" | "elastic";
13566
+ /** @description Elastic only: memory held while idle (MiB, default 1024, at most memory_mib). */
13567
+ memory_mib_held?: number;
13476
13568
  };
13477
13569
  lifetime?: components["schemas"]["WorkspaceLifetime"];
13570
+ /** @description Attribution label; one agent session per (workspace, principal, label). */
13571
+ agent_label?: string;
13572
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
13478
13573
  };
13479
13574
  };
13480
13575
  };
13481
13576
  responses: {
13577
+ /** @description Default Response */
13578
+ 200: {
13579
+ headers: {
13580
+ [name: string]: unknown;
13581
+ };
13582
+ content: {
13583
+ "application/json": {
13584
+ operation: components["schemas"]["Operation"];
13585
+ workspace: components["schemas"]["Workspace"];
13586
+ /**
13587
+ * Format: uuid
13588
+ * @description UUIDv7, lowercase canonical form.
13589
+ */
13590
+ source_workspace_id: string;
13591
+ cell_endpoint: string | null;
13592
+ tool_token: components["schemas"]["ToolToken"] | null;
13593
+ };
13594
+ };
13595
+ };
13482
13596
  /** @description Default Response */
13483
13597
  202: {
13484
13598
  headers: {
@@ -14985,6 +15099,12 @@ export interface operations {
14985
15099
  } | null;
14986
15100
  defaults: components["schemas"]["TemplateDefaults"];
14987
15101
  settings: components["schemas"]["TemplateSettings"];
15102
+ immutable: {
15103
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15104
+ paths: string[];
15105
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15106
+ bytes: number;
15107
+ } | null;
14988
15108
  files: components["schemas"]["TemplateFilesSummary"];
14989
15109
  rootfs_bytes: number | null;
14990
15110
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15028,7 +15148,6 @@ export interface operations {
15028
15148
  */
15029
15149
  created_at: string;
15030
15150
  } | null;
15031
- update_policy: components["schemas"]["UpdatePolicy"];
15032
15151
  category: ("os" | "stack") | null;
15033
15152
  }[];
15034
15153
  next_cursor: string | null;
@@ -15197,6 +15316,12 @@ export interface operations {
15197
15316
  } | null;
15198
15317
  defaults: components["schemas"]["TemplateDefaults"];
15199
15318
  settings: components["schemas"]["TemplateSettings"];
15319
+ immutable: {
15320
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15321
+ paths: string[];
15322
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15323
+ bytes: number;
15324
+ } | null;
15200
15325
  files: components["schemas"]["TemplateFilesSummary"];
15201
15326
  rootfs_bytes: number | null;
15202
15327
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15240,7 +15365,6 @@ export interface operations {
15240
15365
  */
15241
15366
  created_at: string;
15242
15367
  } | null;
15243
- update_policy: components["schemas"]["UpdatePolicy"];
15244
15368
  category: ("os" | "stack") | null;
15245
15369
  plan: {
15246
15370
  plan_key: string;
@@ -15356,6 +15480,12 @@ export interface operations {
15356
15480
  } | null;
15357
15481
  defaults: components["schemas"]["TemplateDefaults"];
15358
15482
  settings: components["schemas"]["TemplateSettings"];
15483
+ immutable: {
15484
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15485
+ paths: string[];
15486
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15487
+ bytes: number;
15488
+ } | null;
15359
15489
  files: components["schemas"]["TemplateFilesSummary"];
15360
15490
  rootfs_bytes: number | null;
15361
15491
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15534,6 +15664,12 @@ export interface operations {
15534
15664
  } | null;
15535
15665
  defaults: components["schemas"]["TemplateDefaults"];
15536
15666
  settings: components["schemas"]["TemplateSettings"];
15667
+ immutable: {
15668
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15669
+ paths: string[];
15670
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15671
+ bytes: number;
15672
+ } | null;
15537
15673
  files: components["schemas"]["TemplateFilesSummary"];
15538
15674
  rootfs_bytes: number | null;
15539
15675
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15577,7 +15713,6 @@ export interface operations {
15577
15713
  */
15578
15714
  created_at: string;
15579
15715
  } | null;
15580
- update_policy: components["schemas"]["UpdatePolicy"];
15581
15716
  category: ("os" | "stack") | null;
15582
15717
  }[];
15583
15718
  next_cursor: string | null;
@@ -15744,6 +15879,12 @@ export interface operations {
15744
15879
  } | null;
15745
15880
  defaults: components["schemas"]["TemplateDefaults"];
15746
15881
  settings: components["schemas"]["TemplateSettings"];
15882
+ immutable: {
15883
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
15884
+ paths: string[];
15885
+ /** @description Size of the version’s immutable image (counts toward template storage). */
15886
+ bytes: number;
15887
+ } | null;
15747
15888
  files: components["schemas"]["TemplateFilesSummary"];
15748
15889
  rootfs_bytes: number | null;
15749
15890
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15787,7 +15928,6 @@ export interface operations {
15787
15928
  */
15788
15929
  created_at: string;
15789
15930
  } | null;
15790
- update_policy: components["schemas"]["UpdatePolicy"];
15791
15931
  category: ("os" | "stack") | null;
15792
15932
  plan: {
15793
15933
  plan_key: string;
@@ -15903,6 +16043,12 @@ export interface operations {
15903
16043
  } | null;
15904
16044
  defaults: components["schemas"]["TemplateDefaults"];
15905
16045
  settings: components["schemas"]["TemplateSettings"];
16046
+ immutable: {
16047
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
16048
+ paths: string[];
16049
+ /** @description Size of the version’s immutable image (counts toward template storage). */
16050
+ bytes: number;
16051
+ } | null;
15906
16052
  files: components["schemas"]["TemplateFilesSummary"];
15907
16053
  rootfs_bytes: number | null;
15908
16054
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -16167,6 +16313,8 @@ export interface operations {
16167
16313
  kind: "file" | "tar";
16168
16314
  }[];
16169
16315
  };
16316
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16317
+ immutable: string[];
16170
16318
  };
16171
16319
  result: {
16172
16320
  artifact_sha256: string | null;
@@ -16190,8 +16338,13 @@ export interface operations {
16190
16338
  } | null;
16191
16339
  };
16192
16340
  failure: {
16341
+ /** @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). */
16193
16342
  code: string;
16194
16343
  message: string;
16344
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16345
+ details?: {
16346
+ [key: string]: unknown;
16347
+ };
16195
16348
  } | null;
16196
16349
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16197
16350
  log: {
@@ -16229,6 +16382,8 @@ export interface operations {
16229
16382
  produced_layer_id: string | null;
16230
16383
  squashed: boolean | null;
16231
16384
  org_bytes: number | null;
16385
+ /** @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. */
16386
+ immutable_paths: string[];
16232
16387
  }[];
16233
16388
  next_cursor: string | null;
16234
16389
  };
@@ -16493,6 +16648,8 @@ export interface operations {
16493
16648
  kind: "file" | "tar";
16494
16649
  }[];
16495
16650
  };
16651
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16652
+ immutable: string[];
16496
16653
  };
16497
16654
  result: {
16498
16655
  artifact_sha256: string | null;
@@ -16516,8 +16673,13 @@ export interface operations {
16516
16673
  } | null;
16517
16674
  };
16518
16675
  failure: {
16676
+ /** @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). */
16519
16677
  code: string;
16520
16678
  message: string;
16679
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16680
+ details?: {
16681
+ [key: string]: unknown;
16682
+ };
16521
16683
  } | null;
16522
16684
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16523
16685
  log: {
@@ -16555,6 +16717,8 @@ export interface operations {
16555
16717
  produced_layer_id: string | null;
16556
16718
  squashed: boolean | null;
16557
16719
  org_bytes: number | null;
16720
+ /** @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. */
16721
+ immutable_paths: string[];
16558
16722
  };
16559
16723
  };
16560
16724
  };
@@ -16802,6 +16966,8 @@ export interface operations {
16802
16966
  kind: "file" | "tar";
16803
16967
  }[];
16804
16968
  };
16969
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
16970
+ immutable: string[];
16805
16971
  };
16806
16972
  result: {
16807
16973
  artifact_sha256: string | null;
@@ -16825,8 +16991,13 @@ export interface operations {
16825
16991
  } | null;
16826
16992
  };
16827
16993
  failure: {
16994
+ /** @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). */
16828
16995
  code: string;
16829
16996
  message: string;
16997
+ /** @description Code-specific details (immutable_path_missing: {path}). */
16998
+ details?: {
16999
+ [key: string]: unknown;
17000
+ };
16830
17001
  } | null;
16831
17002
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
16832
17003
  log: {
@@ -16864,6 +17035,8 @@ export interface operations {
16864
17035
  produced_layer_id: string | null;
16865
17036
  squashed: boolean | null;
16866
17037
  org_bytes: number | null;
17038
+ /** @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. */
17039
+ immutable_paths: string[];
16867
17040
  };
16868
17041
  };
16869
17042
  };
@@ -17108,6 +17281,8 @@ export interface operations {
17108
17281
  kind: "file" | "tar";
17109
17282
  }[];
17110
17283
  };
17284
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
17285
+ immutable: string[];
17111
17286
  };
17112
17287
  result: {
17113
17288
  artifact_sha256: string | null;
@@ -17131,8 +17306,13 @@ export interface operations {
17131
17306
  } | null;
17132
17307
  };
17133
17308
  failure: {
17309
+ /** @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). */
17134
17310
  code: string;
17135
17311
  message: string;
17312
+ /** @description Code-specific details (immutable_path_missing: {path}). */
17313
+ details?: {
17314
+ [key: string]: unknown;
17315
+ };
17136
17316
  } | null;
17137
17317
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
17138
17318
  log: {
@@ -17170,6 +17350,8 @@ export interface operations {
17170
17350
  produced_layer_id: string | null;
17171
17351
  squashed: boolean | null;
17172
17352
  org_bytes: number | null;
17353
+ /** @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. */
17354
+ immutable_paths: string[];
17173
17355
  };
17174
17356
  };
17175
17357
  };
@@ -17380,6 +17562,8 @@ export interface operations {
17380
17562
  kind: "file" | "tar";
17381
17563
  }[];
17382
17564
  };
17565
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
17566
+ immutable: string[];
17383
17567
  };
17384
17568
  result: {
17385
17569
  artifact_sha256: string | null;
@@ -17403,8 +17587,13 @@ export interface operations {
17403
17587
  } | null;
17404
17588
  };
17405
17589
  failure: {
17590
+ /** @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). */
17406
17591
  code: string;
17407
17592
  message: string;
17593
+ /** @description Code-specific details (immutable_path_missing: {path}). */
17594
+ details?: {
17595
+ [key: string]: unknown;
17596
+ };
17408
17597
  } | null;
17409
17598
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
17410
17599
  log: {
@@ -17442,6 +17631,8 @@ export interface operations {
17442
17631
  produced_layer_id: string | null;
17443
17632
  squashed: boolean | null;
17444
17633
  org_bytes: number | null;
17634
+ /** @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. */
17635
+ immutable_paths: string[];
17445
17636
  };
17446
17637
  };
17447
17638
  };
@@ -18073,6 +18264,12 @@ export interface operations {
18073
18264
  } | null;
18074
18265
  defaults: components["schemas"]["TemplateDefaults"];
18075
18266
  settings: components["schemas"]["TemplateSettings"];
18267
+ immutable: {
18268
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18269
+ paths: string[];
18270
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18271
+ bytes: number;
18272
+ } | null;
18076
18273
  files: components["schemas"]["TemplateFilesSummary"];
18077
18274
  rootfs_bytes: number | null;
18078
18275
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18116,7 +18313,6 @@ export interface operations {
18116
18313
  */
18117
18314
  created_at: string;
18118
18315
  } | null;
18119
- update_policy: components["schemas"]["UpdatePolicy"];
18120
18316
  category: ("os" | "stack") | null;
18121
18317
  plan: {
18122
18318
  plan_key: string;
@@ -18232,6 +18428,12 @@ export interface operations {
18232
18428
  } | null;
18233
18429
  defaults: components["schemas"]["TemplateDefaults"];
18234
18430
  settings: components["schemas"]["TemplateSettings"];
18431
+ immutable: {
18432
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18433
+ paths: string[];
18434
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18435
+ bytes: number;
18436
+ } | null;
18235
18437
  files: components["schemas"]["TemplateFilesSummary"];
18236
18438
  rootfs_bytes: number | null;
18237
18439
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18408,6 +18610,12 @@ export interface operations {
18408
18610
  } | null;
18409
18611
  defaults: components["schemas"]["TemplateDefaults"];
18410
18612
  settings: components["schemas"]["TemplateSettings"];
18613
+ immutable: {
18614
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18615
+ paths: string[];
18616
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18617
+ bytes: number;
18618
+ } | null;
18411
18619
  files: components["schemas"]["TemplateFilesSummary"];
18412
18620
  rootfs_bytes: number | null;
18413
18621
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18451,7 +18659,6 @@ export interface operations {
18451
18659
  */
18452
18660
  created_at: string;
18453
18661
  } | null;
18454
- update_policy: components["schemas"]["UpdatePolicy"];
18455
18662
  category: ("os" | "stack") | null;
18456
18663
  plan: {
18457
18664
  plan_key: string;
@@ -18567,6 +18774,12 @@ export interface operations {
18567
18774
  } | null;
18568
18775
  defaults: components["schemas"]["TemplateDefaults"];
18569
18776
  settings: components["schemas"]["TemplateSettings"];
18777
+ immutable: {
18778
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18779
+ paths: string[];
18780
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18781
+ bytes: number;
18782
+ } | null;
18570
18783
  files: components["schemas"]["TemplateFilesSummary"];
18571
18784
  rootfs_bytes: number | null;
18572
18785
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18748,6 +18961,12 @@ export interface operations {
18748
18961
  } | null;
18749
18962
  defaults: components["schemas"]["TemplateDefaults"];
18750
18963
  settings: components["schemas"]["TemplateSettings"];
18964
+ immutable: {
18965
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
18966
+ paths: string[];
18967
+ /** @description Size of the version’s immutable image (counts toward template storage). */
18968
+ bytes: number;
18969
+ } | null;
18751
18970
  files: components["schemas"]["TemplateFilesSummary"];
18752
18971
  rootfs_bytes: number | null;
18753
18972
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -18791,7 +19010,6 @@ export interface operations {
18791
19010
  */
18792
19011
  created_at: string;
18793
19012
  } | null;
18794
- update_policy: components["schemas"]["UpdatePolicy"];
18795
19013
  category: ("os" | "stack") | null;
18796
19014
  }[];
18797
19015
  next_cursor: string | null;
@@ -18960,6 +19178,12 @@ export interface operations {
18960
19178
  } | null;
18961
19179
  defaults: components["schemas"]["TemplateDefaults"];
18962
19180
  settings: components["schemas"]["TemplateSettings"];
19181
+ immutable: {
19182
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
19183
+ paths: string[];
19184
+ /** @description Size of the version’s immutable image (counts toward template storage). */
19185
+ bytes: number;
19186
+ } | null;
18963
19187
  files: components["schemas"]["TemplateFilesSummary"];
18964
19188
  rootfs_bytes: number | null;
18965
19189
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -19003,7 +19227,6 @@ export interface operations {
19003
19227
  */
19004
19228
  created_at: string;
19005
19229
  } | null;
19006
- update_policy: components["schemas"]["UpdatePolicy"];
19007
19230
  category: ("os" | "stack") | null;
19008
19231
  plan: {
19009
19232
  plan_key: string;
@@ -19119,6 +19342,12 @@ export interface operations {
19119
19342
  } | null;
19120
19343
  defaults: components["schemas"]["TemplateDefaults"];
19121
19344
  settings: components["schemas"]["TemplateSettings"];
19345
+ immutable: {
19346
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
19347
+ paths: string[];
19348
+ /** @description Size of the version’s immutable image (counts toward template storage). */
19349
+ bytes: number;
19350
+ } | null;
19122
19351
  files: components["schemas"]["TemplateFilesSummary"];
19123
19352
  rootfs_bytes: number | null;
19124
19353
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -19383,6 +19612,8 @@ export interface operations {
19383
19612
  kind: "file" | "tar";
19384
19613
  }[];
19385
19614
  };
19615
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
19616
+ immutable: string[];
19386
19617
  };
19387
19618
  result: {
19388
19619
  artifact_sha256: string | null;
@@ -19406,8 +19637,13 @@ export interface operations {
19406
19637
  } | null;
19407
19638
  };
19408
19639
  failure: {
19640
+ /** @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). */
19409
19641
  code: string;
19410
19642
  message: string;
19643
+ /** @description Code-specific details (immutable_path_missing: {path}). */
19644
+ details?: {
19645
+ [key: string]: unknown;
19646
+ };
19411
19647
  } | null;
19412
19648
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
19413
19649
  log: {
@@ -19445,6 +19681,8 @@ export interface operations {
19445
19681
  produced_layer_id: string | null;
19446
19682
  squashed: boolean | null;
19447
19683
  org_bytes: number | null;
19684
+ /** @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. */
19685
+ immutable_paths: string[];
19448
19686
  }[];
19449
19687
  next_cursor: string | null;
19450
19688
  };
@@ -19709,6 +19947,8 @@ export interface operations {
19709
19947
  kind: "file" | "tar";
19710
19948
  }[];
19711
19949
  };
19950
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
19951
+ immutable: string[];
19712
19952
  };
19713
19953
  result: {
19714
19954
  artifact_sha256: string | null;
@@ -19732,8 +19972,13 @@ export interface operations {
19732
19972
  } | null;
19733
19973
  };
19734
19974
  failure: {
19975
+ /** @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). */
19735
19976
  code: string;
19736
19977
  message: string;
19978
+ /** @description Code-specific details (immutable_path_missing: {path}). */
19979
+ details?: {
19980
+ [key: string]: unknown;
19981
+ };
19737
19982
  } | null;
19738
19983
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
19739
19984
  log: {
@@ -19771,6 +20016,8 @@ export interface operations {
19771
20016
  produced_layer_id: string | null;
19772
20017
  squashed: boolean | null;
19773
20018
  org_bytes: number | null;
20019
+ /** @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. */
20020
+ immutable_paths: string[];
19774
20021
  };
19775
20022
  };
19776
20023
  };
@@ -20018,6 +20265,8 @@ export interface operations {
20018
20265
  kind: "file" | "tar";
20019
20266
  }[];
20020
20267
  };
20268
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20269
+ immutable: string[];
20021
20270
  };
20022
20271
  result: {
20023
20272
  artifact_sha256: string | null;
@@ -20041,8 +20290,13 @@ export interface operations {
20041
20290
  } | null;
20042
20291
  };
20043
20292
  failure: {
20293
+ /** @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). */
20044
20294
  code: string;
20045
20295
  message: string;
20296
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20297
+ details?: {
20298
+ [key: string]: unknown;
20299
+ };
20046
20300
  } | null;
20047
20301
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
20048
20302
  log: {
@@ -20080,6 +20334,8 @@ export interface operations {
20080
20334
  produced_layer_id: string | null;
20081
20335
  squashed: boolean | null;
20082
20336
  org_bytes: number | null;
20337
+ /** @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. */
20338
+ immutable_paths: string[];
20083
20339
  };
20084
20340
  };
20085
20341
  };
@@ -20324,6 +20580,8 @@ export interface operations {
20324
20580
  kind: "file" | "tar";
20325
20581
  }[];
20326
20582
  };
20583
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20584
+ immutable: string[];
20327
20585
  };
20328
20586
  result: {
20329
20587
  artifact_sha256: string | null;
@@ -20347,8 +20605,13 @@ export interface operations {
20347
20605
  } | null;
20348
20606
  };
20349
20607
  failure: {
20608
+ /** @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). */
20350
20609
  code: string;
20351
20610
  message: string;
20611
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20612
+ details?: {
20613
+ [key: string]: unknown;
20614
+ };
20352
20615
  } | null;
20353
20616
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
20354
20617
  log: {
@@ -20386,6 +20649,8 @@ export interface operations {
20386
20649
  produced_layer_id: string | null;
20387
20650
  squashed: boolean | null;
20388
20651
  org_bytes: number | null;
20652
+ /** @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. */
20653
+ immutable_paths: string[];
20389
20654
  };
20390
20655
  };
20391
20656
  };
@@ -20596,6 +20861,8 @@ export interface operations {
20596
20861
  kind: "file" | "tar";
20597
20862
  }[];
20598
20863
  };
20864
+ /** @description The effective immutable paths (contracts §34.1: the recipe’s, else inherited), in byte order; empty for none. */
20865
+ immutable: string[];
20599
20866
  };
20600
20867
  result: {
20601
20868
  artifact_sha256: string | null;
@@ -20619,8 +20886,13 @@ export interface operations {
20619
20886
  } | null;
20620
20887
  };
20621
20888
  failure: {
20889
+ /** @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). */
20622
20890
  code: string;
20623
20891
  message: string;
20892
+ /** @description Code-specific details (immutable_path_missing: {path}). */
20893
+ details?: {
20894
+ [key: string]: unknown;
20895
+ };
20624
20896
  } | null;
20625
20897
  /** @description Build log: the tail inline, the full log through a short-lived signed URL (log-url). */
20626
20898
  log: {
@@ -20658,6 +20930,8 @@ export interface operations {
20658
20930
  produced_layer_id: string | null;
20659
20931
  squashed: boolean | null;
20660
20932
  org_bytes: number | null;
20933
+ /** @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. */
20934
+ immutable_paths: string[];
20661
20935
  };
20662
20936
  };
20663
20937
  };
@@ -21109,6 +21383,12 @@ export interface operations {
21109
21383
  } | null;
21110
21384
  defaults: components["schemas"]["TemplateDefaults"];
21111
21385
  settings: components["schemas"]["TemplateSettings"];
21386
+ immutable: {
21387
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21388
+ paths: string[];
21389
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21390
+ bytes: number;
21391
+ } | null;
21112
21392
  files: components["schemas"]["TemplateFilesSummary"];
21113
21393
  rootfs_bytes: number | null;
21114
21394
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -21152,7 +21432,6 @@ export interface operations {
21152
21432
  */
21153
21433
  created_at: string;
21154
21434
  } | null;
21155
- update_policy: components["schemas"]["UpdatePolicy"];
21156
21435
  category: ("os" | "stack") | null;
21157
21436
  plan: {
21158
21437
  plan_key: string;
@@ -21268,6 +21547,12 @@ export interface operations {
21268
21547
  } | null;
21269
21548
  defaults: components["schemas"]["TemplateDefaults"];
21270
21549
  settings: components["schemas"]["TemplateSettings"];
21550
+ immutable: {
21551
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21552
+ paths: string[];
21553
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21554
+ bytes: number;
21555
+ } | null;
21271
21556
  files: components["schemas"]["TemplateFilesSummary"];
21272
21557
  rootfs_bytes: number | null;
21273
21558
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -21444,6 +21729,12 @@ export interface operations {
21444
21729
  } | null;
21445
21730
  defaults: components["schemas"]["TemplateDefaults"];
21446
21731
  settings: components["schemas"]["TemplateSettings"];
21732
+ immutable: {
21733
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21734
+ paths: string[];
21735
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21736
+ bytes: number;
21737
+ } | null;
21447
21738
  files: components["schemas"]["TemplateFilesSummary"];
21448
21739
  rootfs_bytes: number | null;
21449
21740
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -21487,7 +21778,6 @@ export interface operations {
21487
21778
  */
21488
21779
  created_at: string;
21489
21780
  } | null;
21490
- update_policy: components["schemas"]["UpdatePolicy"];
21491
21781
  category: ("os" | "stack") | null;
21492
21782
  plan: {
21493
21783
  plan_key: string;
@@ -21603,6 +21893,12 @@ export interface operations {
21603
21893
  } | null;
21604
21894
  defaults: components["schemas"]["TemplateDefaults"];
21605
21895
  settings: components["schemas"]["TemplateSettings"];
21896
+ immutable: {
21897
+ /** @description The directories every workspace of the template mounts read-only from its newest published version, in byte order. */
21898
+ paths: string[];
21899
+ /** @description Size of the version’s immutable image (counts toward template storage). */
21900
+ bytes: number;
21901
+ } | null;
21606
21902
  files: components["schemas"]["TemplateFilesSummary"];
21607
21903
  rootfs_bytes: number | null;
21608
21904
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -27726,8 +28022,8 @@ export interface operations {
27726
28022
  display_name: string;
27727
28023
  unit: string;
27728
28024
  meters: ("cpu_seconds" | "memory_gib_seconds" | "storage_gib_seconds" | "egress_bytes" | "ingress_bytes" | "volume_storage_gib_seconds")[];
27729
- /** @description hard_cap: exhausting it refuses opens/resumes (402 allowance_exhausted) and running workspaces are suspended; spare_capacity: no allowance cap (runs on reclaimable spare capacity); reported: shown and notified, never enforced by refusing access; egress_block (outbound_transfer_gb, contracts §18): at 100% outbound internet traffic is blocked by an organization egress override until upgrade, purchase or the next period (workspaces keep running, starts are not refused). */
27730
- enforcement: "hard_cap" | "spare_capacity" | "reported" | "egress_block";
28025
+ /** @description hard_cap: exhausting it refuses opens/resumes (402 allowance_exhausted) and running workspaces are suspended; spare_capacity: no allowance cap (runs on reclaimable spare capacity); reported: shown and notified, never enforced by refusing access; egress_block (outbound_transfer_gb, contracts §18): at 100% outbound internet traffic is blocked by an organization egress override until upgrade, purchase or the next period (workspaces keep running, starts are not refused); storage_block (retained_state_gib, contracts §40): at 100% opening a new workspace key and forking are refused (403 quota_exceeded, details.limit retained_state) until retained state is below the allowance (existing workspaces keep running, waking, suspending and resuming; nothing is deleted or charged). */
28026
+ enforcement: "hard_cap" | "spare_capacity" | "reported" | "egress_block" | "storage_block";
27731
28027
  included: number | null;
27732
28028
  used: number;
27733
28029
  remaining: number | null;
@@ -27735,8 +28031,8 @@ export interface operations {
27735
28031
  included_meter_units: number | null;
27736
28032
  used_meter_units: number | null;
27737
28033
  remaining_meter_units: number | null;
27738
- /** @description ok: below 80 %. warning: 80 % or more of the allowance. exhausted: a hard cap is used up and starts are refused (402 allowance_exhausted; see exhausted_reason). overage: a CPU-hours or RAM GiB-hours allowance is used up while opt-in overage is on and below its spend cap, so starts are admitted and the usage past it is charged (spend_cap). over_allowance: a reported allowance is exceeded (never refused). egress_blocked: the outbound transfer allowance is used up and outbound traffic is blocked. uncapped: runs on spare capacity. not_included: the plan does not define it. */
27739
- cap_state: "ok" | "warning" | "exhausted" | "overage" | "over_allowance" | "egress_blocked" | "uncapped" | "not_included";
28034
+ /** @description ok: below 80 %. warning: 80 % or more of the allowance. exhausted: a hard cap is used up and starts are refused (402 allowance_exhausted; see exhausted_reason). overage: a CPU-hours or RAM GiB-hours allowance is used up while opt-in overage is on and below its spend cap, so starts are admitted and the usage past it is charged (spend_cap). over_allowance: a reported allowance is exceeded (never refused). egress_blocked: the outbound transfer allowance is used up and outbound traffic is blocked. storage_blocked: the retained state allowance is used up and new workspaces and forks are refused (403 quota_exceeded). uncapped: runs on spare capacity. not_included: the plan does not define it. */
28035
+ cap_state: "ok" | "warning" | "exhausted" | "overage" | "over_allowance" | "egress_blocked" | "storage_blocked" | "uncapped" | "not_included";
27740
28036
  }[];
27741
28037
  meters: {
27742
28038
  /** @enum {string} */
@@ -28781,8 +29077,8 @@ export interface operations {
28781
29077
  display_name: string;
28782
29078
  unit: string;
28783
29079
  meters: ("cpu_seconds" | "memory_gib_seconds" | "storage_gib_seconds" | "egress_bytes" | "ingress_bytes" | "volume_storage_gib_seconds")[];
28784
- /** @description hard_cap: exhausting it refuses opens/resumes (402 allowance_exhausted) and running workspaces are suspended; spare_capacity: no allowance cap (runs on reclaimable spare capacity); reported: shown and notified, never enforced by refusing access; egress_block (outbound_transfer_gb, contracts §18): at 100% outbound internet traffic is blocked by an organization egress override until upgrade, purchase or the next period (workspaces keep running, starts are not refused). */
28785
- enforcement: "hard_cap" | "spare_capacity" | "reported" | "egress_block";
29080
+ /** @description hard_cap: exhausting it refuses opens/resumes (402 allowance_exhausted) and running workspaces are suspended; spare_capacity: no allowance cap (runs on reclaimable spare capacity); reported: shown and notified, never enforced by refusing access; egress_block (outbound_transfer_gb, contracts §18): at 100% outbound internet traffic is blocked by an organization egress override until upgrade, purchase or the next period (workspaces keep running, starts are not refused); storage_block (retained_state_gib, contracts §40): at 100% opening a new workspace key and forking are refused (403 quota_exceeded, details.limit retained_state) until retained state is below the allowance (existing workspaces keep running, waking, suspending and resuming; nothing is deleted or charged). */
29081
+ enforcement: "hard_cap" | "spare_capacity" | "reported" | "egress_block" | "storage_block";
28786
29082
  included: number | null;
28787
29083
  used: number;
28788
29084
  remaining: number | null;
@@ -28790,8 +29086,8 @@ export interface operations {
28790
29086
  included_meter_units: number | null;
28791
29087
  used_meter_units: number | null;
28792
29088
  remaining_meter_units: number | null;
28793
- /** @description ok: below 80 %. warning: 80 % or more of the allowance. exhausted: a hard cap is used up and starts are refused (402 allowance_exhausted; see exhausted_reason). overage: a CPU-hours or RAM GiB-hours allowance is used up while opt-in overage is on and below its spend cap, so starts are admitted and the usage past it is charged (spend_cap). over_allowance: a reported allowance is exceeded (never refused). egress_blocked: the outbound transfer allowance is used up and outbound traffic is blocked. uncapped: runs on spare capacity. not_included: the plan does not define it. */
28794
- cap_state: "ok" | "warning" | "exhausted" | "overage" | "over_allowance" | "egress_blocked" | "uncapped" | "not_included";
29089
+ /** @description ok: below 80 %. warning: 80 % or more of the allowance. exhausted: a hard cap is used up and starts are refused (402 allowance_exhausted; see exhausted_reason). overage: a CPU-hours or RAM GiB-hours allowance is used up while opt-in overage is on and below its spend cap, so starts are admitted and the usage past it is charged (spend_cap). over_allowance: a reported allowance is exceeded (never refused). egress_blocked: the outbound transfer allowance is used up and outbound traffic is blocked. storage_blocked: the retained state allowance is used up and new workspaces and forks are refused (403 quota_exceeded). uncapped: runs on spare capacity. not_included: the plan does not define it. */
29090
+ cap_state: "ok" | "warning" | "exhausted" | "overage" | "over_allowance" | "egress_blocked" | "storage_blocked" | "uncapped" | "not_included";
28795
29091
  }[];
28796
29092
  meters: {
28797
29093
  /** @enum {string} */