@shardflux/sdk 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -938,7 +938,7 @@ export interface paths {
938
938
  put?: never;
939
939
  /**
940
940
  * Open a workspace by key (create on first use, reconnect or resume afterwards)
941
- * @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. 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). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation.
941
+ * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation.
942
942
  */
943
943
  post: operations["postV1WorkspacesOpen"];
944
944
  delete?: never;
@@ -1008,6 +1008,26 @@ export interface paths {
1008
1008
  patch?: never;
1009
1009
  trace?: never;
1010
1010
  };
1011
+ "/v1/workspaces/{workspace_id}/inputs": {
1012
+ parameters: {
1013
+ query?: never;
1014
+ header?: never;
1015
+ path?: never;
1016
+ cookie?: never;
1017
+ };
1018
+ /**
1019
+ * The workspace’s text inputs (contracts §24.3)
1020
+ * @description The text inputs the workspace was opened with (the given value, else the declared default). Every exec, PTY, start command and service gets them as environment variables, above the template env and below the call’s own env. Secret inputs are bound secrets (GET …/secrets). Set on create; replaced by an open of the key with `inputs`. Deleted workspaces stay readable.
1021
+ */
1022
+ get: operations["getV1WorkspacesWorkspaceIdInputs"];
1023
+ put?: never;
1024
+ post?: never;
1025
+ delete?: never;
1026
+ options?: never;
1027
+ head?: never;
1028
+ patch?: never;
1029
+ trace?: never;
1030
+ };
1011
1031
  "/v1/workspaces/{workspace_id}/idle-policy": {
1012
1032
  parameters: {
1013
1033
  query?: never;
@@ -1270,7 +1290,7 @@ export interface paths {
1270
1290
  put?: never;
1271
1291
  /**
1272
1292
  * Open a workspace by key (create on first use, reconnect or resume afterwards)
1273
- * @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. 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). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation.
1293
+ * @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, deleted key (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation.
1274
1294
  */
1275
1295
  post: operations["postApiV1WorkspacesOpen"];
1276
1296
  delete?: never;
@@ -1340,6 +1360,26 @@ export interface paths {
1340
1360
  patch?: never;
1341
1361
  trace?: never;
1342
1362
  };
1363
+ "/api/v1/workspaces/{workspace_id}/inputs": {
1364
+ parameters: {
1365
+ query?: never;
1366
+ header?: never;
1367
+ path?: never;
1368
+ cookie?: never;
1369
+ };
1370
+ /**
1371
+ * The workspace’s text inputs (contracts §24.3)
1372
+ * @description The text inputs the workspace was opened with (the given value, else the declared default). Every exec, PTY, start command and service gets them as environment variables, above the template env and below the call’s own env. Secret inputs are bound secrets (GET …/secrets). Set on create; replaced by an open of the key with `inputs`. Deleted workspaces stay readable.
1373
+ */
1374
+ get: operations["getApiV1WorkspacesWorkspaceIdInputs"];
1375
+ put?: never;
1376
+ post?: never;
1377
+ delete?: never;
1378
+ options?: never;
1379
+ head?: never;
1380
+ patch?: never;
1381
+ trace?: never;
1382
+ };
1343
1383
  "/api/v1/workspaces/{workspace_id}/idle-policy": {
1344
1384
  parameters: {
1345
1385
  query?: never;
@@ -1903,7 +1943,7 @@ export interface paths {
1903
1943
  put?: never;
1904
1944
  /**
1905
1945
  * Request a custom template build (queued for the isolated builder)
1906
- * @description 202 with the queued build. 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, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
1946
+ * @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.
1907
1947
  */
1908
1948
  post: operations["postV1OrganizationsOrganizationIdTemplateBuilds"];
1909
1949
  delete?: never;
@@ -1972,6 +2012,166 @@ export interface paths {
1972
2012
  patch?: never;
1973
2013
  trace?: never;
1974
2014
  };
2015
+ "/v1/organizations/{organization_id}/template-uploads": {
2016
+ parameters: {
2017
+ query?: never;
2018
+ header?: never;
2019
+ path?: never;
2020
+ cookie?: never;
2021
+ };
2022
+ get?: never;
2023
+ put?: never;
2024
+ /**
2025
+ * Request an upload of a recipe build input (a file, or a folder as an uncompressed tar), by content
2026
+ * @description 200 {upload, put: null} when the organization already has these bytes (a pending upload is checked in the bucket first). 201 with a presigned S3 PUT otherwise (valid 900 s): send the bytes with every header of `put.headers` (x-amz-checksum-sha256 and content-length are signed, so S3 refuses other bytes), then reference `sha256:<hex>` in the recipe’s build.files. Idempotent by content (no Idempotency-Key needed). Errors: 422 upload_too_large (details.limit upload_bytes_max: at most 5 GiB), 422 upload_digest_mismatch (the same sha256 is available with another size), 503 dependency_unavailable (uploads_not_configured). Owners/admins and API keys with a tool permission.
2027
+ */
2028
+ post: operations["postV1OrganizationsOrganizationIdTemplateUploads"];
2029
+ delete?: never;
2030
+ options?: never;
2031
+ head?: never;
2032
+ patch?: never;
2033
+ trace?: never;
2034
+ };
2035
+ "/v1/template-uploads": {
2036
+ parameters: {
2037
+ query?: never;
2038
+ header?: never;
2039
+ path?: never;
2040
+ cookie?: never;
2041
+ };
2042
+ get?: never;
2043
+ put?: never;
2044
+ /**
2045
+ * Request an upload of a recipe build input (a file, or a folder as an uncompressed tar), by content (the API key’s organization)
2046
+ * @description 200 {upload, put: null} when the organization already has these bytes (a pending upload is checked in the bucket first). 201 with a presigned S3 PUT otherwise (valid 900 s): send the bytes with every header of `put.headers` (x-amz-checksum-sha256 and content-length are signed, so S3 refuses other bytes), then reference `sha256:<hex>` in the recipe’s build.files. Idempotent by content (no Idempotency-Key needed). Errors: 422 upload_too_large (details.limit upload_bytes_max: at most 5 GiB), 422 upload_digest_mismatch (the same sha256 is available with another size), 503 dependency_unavailable (uploads_not_configured). Owners/admins and API keys with a tool permission.
2047
+ */
2048
+ post: operations["postV1TemplateUploads"];
2049
+ delete?: never;
2050
+ options?: never;
2051
+ head?: never;
2052
+ patch?: never;
2053
+ trace?: never;
2054
+ };
2055
+ "/v1/organizations/{organization_id}/template-packages": {
2056
+ parameters: {
2057
+ query?: never;
2058
+ header?: never;
2059
+ path?: never;
2060
+ cookie?: never;
2061
+ };
2062
+ /**
2063
+ * Search apt, pip or npm packages for a recipe
2064
+ * @description apt: the base’s package index (409 package_index_unavailable when the base has none); pip: the daily PyPI name list (names only; 409 package_index_unavailable before its first refresh); npm: the registry search. Upstreams are bounded (503 dependency_unavailable, retryable, when they do not answer within 2.5 s) and each organization may make 120 lookups a minute (429 rate_limited). Owners/admins and API keys with a tool permission.
2065
+ */
2066
+ get: operations["getV1OrganizationsOrganizationIdTemplatePackages"];
2067
+ put?: never;
2068
+ post?: never;
2069
+ delete?: never;
2070
+ options?: never;
2071
+ head?: never;
2072
+ patch?: never;
2073
+ trace?: never;
2074
+ };
2075
+ "/v1/organizations/{organization_id}/template-packages/{ecosystem}/{name}": {
2076
+ parameters: {
2077
+ query?: never;
2078
+ header?: never;
2079
+ path?: never;
2080
+ cookie?: never;
2081
+ };
2082
+ /**
2083
+ * Get one apt, pip or npm package: latest version, summary and versions
2084
+ * @description 404 not_found (package_not_found). apt needs base=<slug>@<version>. Same limits as the search.
2085
+ */
2086
+ get: operations["getV1OrganizationsOrganizationIdTemplatePackagesEcosystemName"];
2087
+ put?: never;
2088
+ post?: never;
2089
+ delete?: never;
2090
+ options?: never;
2091
+ head?: never;
2092
+ patch?: never;
2093
+ trace?: never;
2094
+ };
2095
+ "/v1/template-packages": {
2096
+ parameters: {
2097
+ query?: never;
2098
+ header?: never;
2099
+ path?: never;
2100
+ cookie?: never;
2101
+ };
2102
+ /**
2103
+ * Search apt, pip or npm packages for a recipe (the API key’s organization)
2104
+ * @description apt: the base’s package index (409 package_index_unavailable when the base has none); pip: the daily PyPI name list (names only; 409 package_index_unavailable before its first refresh); npm: the registry search. Upstreams are bounded (503 dependency_unavailable, retryable, when they do not answer within 2.5 s) and each organization may make 120 lookups a minute (429 rate_limited). Owners/admins and API keys with a tool permission.
2105
+ */
2106
+ get: operations["getV1TemplatePackages"];
2107
+ put?: never;
2108
+ post?: never;
2109
+ delete?: never;
2110
+ options?: never;
2111
+ head?: never;
2112
+ patch?: never;
2113
+ trace?: never;
2114
+ };
2115
+ "/v1/template-packages/{ecosystem}/{name}": {
2116
+ parameters: {
2117
+ query?: never;
2118
+ header?: never;
2119
+ path?: never;
2120
+ cookie?: never;
2121
+ };
2122
+ /**
2123
+ * Get one apt, pip or npm package: latest version, summary and versions (the API key’s organization)
2124
+ * @description 404 not_found (package_not_found). apt needs base=<slug>@<version>. Same limits as the search.
2125
+ */
2126
+ get: operations["getV1TemplatePackagesEcosystemName"];
2127
+ put?: never;
2128
+ post?: never;
2129
+ delete?: never;
2130
+ options?: never;
2131
+ head?: never;
2132
+ patch?: never;
2133
+ trace?: never;
2134
+ };
2135
+ "/v1/organizations/{organization_id}/template-languages": {
2136
+ parameters: {
2137
+ query?: never;
2138
+ header?: never;
2139
+ path?: never;
2140
+ cookie?: never;
2141
+ };
2142
+ /**
2143
+ * The recipe languages a base offers: version, default, whether the base already has it, and the hosts its install needs
2144
+ * @description The §24.1 language table read for the chain’s platform base of `base`, resolved as a build resolves `recipe.base` (422 validation_failed with details.field "base" and the build’s reasons: base_not_found, base_archived, base_not_published, architecture_not_supported). `included`: the base already has that version (python-node-browser: python and node), so the build installs nothing for it. A version the base has another version of is left out (a build would refuse it with language_conflict). Owners/admins and API keys with a tool permission.
2145
+ */
2146
+ get: operations["getV1OrganizationsOrganizationIdTemplateLanguages"];
2147
+ put?: never;
2148
+ post?: never;
2149
+ delete?: never;
2150
+ options?: never;
2151
+ head?: never;
2152
+ patch?: never;
2153
+ trace?: never;
2154
+ };
2155
+ "/v1/template-languages": {
2156
+ parameters: {
2157
+ query?: never;
2158
+ header?: never;
2159
+ path?: never;
2160
+ cookie?: never;
2161
+ };
2162
+ /**
2163
+ * The recipe languages a base offers: version, default, whether the base already has it, and the hosts its install needs (the API key’s organization)
2164
+ * @description The §24.1 language table read for the chain’s platform base of `base`, resolved as a build resolves `recipe.base` (422 validation_failed with details.field "base" and the build’s reasons: base_not_found, base_archived, base_not_published, architecture_not_supported). `included`: the base already has that version (python-node-browser: python and node), so the build installs nothing for it. A version the base has another version of is left out (a build would refuse it with language_conflict). Owners/admins and API keys with a tool permission.
2165
+ */
2166
+ get: operations["getV1TemplateLanguages"];
2167
+ put?: never;
2168
+ post?: never;
2169
+ delete?: never;
2170
+ options?: never;
2171
+ head?: never;
2172
+ patch?: never;
2173
+ trace?: never;
2174
+ };
1975
2175
  "/v1/organizations/{organization_id}/template-builder-availability": {
1976
2176
  parameters: {
1977
2177
  query?: never;
@@ -2041,7 +2241,7 @@ export interface paths {
2041
2241
  put?: never;
2042
2242
  /**
2043
2243
  * Request a custom template build (queued for the isolated builder)
2044
- * @description 202 with the queued build. 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, base_not_found, base_not_published, base_archived, architecture_not_supported, ...; `line` for line errors), 402 entitlement_required, 403 quota_exceeded (concurrent_template_builds), 409 template_archived. Supports Idempotency-Key.
2244
+ * @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.
2045
2245
  */
2046
2246
  post: operations["postApiV1OrganizationsOrganizationIdTemplateBuilds"];
2047
2247
  delete?: never;
@@ -2110,6 +2310,86 @@ export interface paths {
2110
2310
  patch?: never;
2111
2311
  trace?: never;
2112
2312
  };
2313
+ "/api/v1/organizations/{organization_id}/template-uploads": {
2314
+ parameters: {
2315
+ query?: never;
2316
+ header?: never;
2317
+ path?: never;
2318
+ cookie?: never;
2319
+ };
2320
+ get?: never;
2321
+ put?: never;
2322
+ /**
2323
+ * Request an upload of a recipe build input (a file, or a folder as an uncompressed tar), by content
2324
+ * @description 200 {upload, put: null} when the organization already has these bytes (a pending upload is checked in the bucket first). 201 with a presigned S3 PUT otherwise (valid 900 s): send the bytes with every header of `put.headers` (x-amz-checksum-sha256 and content-length are signed, so S3 refuses other bytes), then reference `sha256:<hex>` in the recipe’s build.files. Idempotent by content (no Idempotency-Key needed). Errors: 422 upload_too_large (details.limit upload_bytes_max: at most 5 GiB), 422 upload_digest_mismatch (the same sha256 is available with another size), 503 dependency_unavailable (uploads_not_configured). Owners/admins and API keys with a tool permission.
2325
+ */
2326
+ post: operations["postApiV1OrganizationsOrganizationIdTemplateUploads"];
2327
+ delete?: never;
2328
+ options?: never;
2329
+ head?: never;
2330
+ patch?: never;
2331
+ trace?: never;
2332
+ };
2333
+ "/api/v1/organizations/{organization_id}/template-packages": {
2334
+ parameters: {
2335
+ query?: never;
2336
+ header?: never;
2337
+ path?: never;
2338
+ cookie?: never;
2339
+ };
2340
+ /**
2341
+ * Search apt, pip or npm packages for a recipe
2342
+ * @description apt: the base’s package index (409 package_index_unavailable when the base has none); pip: the daily PyPI name list (names only; 409 package_index_unavailable before its first refresh); npm: the registry search. Upstreams are bounded (503 dependency_unavailable, retryable, when they do not answer within 2.5 s) and each organization may make 120 lookups a minute (429 rate_limited). Owners/admins and API keys with a tool permission.
2343
+ */
2344
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatePackages"];
2345
+ put?: never;
2346
+ post?: never;
2347
+ delete?: never;
2348
+ options?: never;
2349
+ head?: never;
2350
+ patch?: never;
2351
+ trace?: never;
2352
+ };
2353
+ "/api/v1/organizations/{organization_id}/template-packages/{ecosystem}/{name}": {
2354
+ parameters: {
2355
+ query?: never;
2356
+ header?: never;
2357
+ path?: never;
2358
+ cookie?: never;
2359
+ };
2360
+ /**
2361
+ * Get one apt, pip or npm package: latest version, summary and versions
2362
+ * @description 404 not_found (package_not_found). apt needs base=<slug>@<version>. Same limits as the search.
2363
+ */
2364
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatePackagesEcosystemName"];
2365
+ put?: never;
2366
+ post?: never;
2367
+ delete?: never;
2368
+ options?: never;
2369
+ head?: never;
2370
+ patch?: never;
2371
+ trace?: never;
2372
+ };
2373
+ "/api/v1/organizations/{organization_id}/template-languages": {
2374
+ parameters: {
2375
+ query?: never;
2376
+ header?: never;
2377
+ path?: never;
2378
+ cookie?: never;
2379
+ };
2380
+ /**
2381
+ * The recipe languages a base offers: version, default, whether the base already has it, and the hosts its install needs
2382
+ * @description The §24.1 language table read for the chain’s platform base of `base`, resolved as a build resolves `recipe.base` (422 validation_failed with details.field "base" and the build’s reasons: base_not_found, base_archived, base_not_published, architecture_not_supported). `included`: the base already has that version (python-node-browser: python and node), so the build installs nothing for it. A version the base has another version of is left out (a build would refuse it with language_conflict). Owners/admins and API keys with a tool permission.
2383
+ */
2384
+ get: operations["getApiV1OrganizationsOrganizationIdTemplateLanguages"];
2385
+ put?: never;
2386
+ post?: never;
2387
+ delete?: never;
2388
+ options?: never;
2389
+ head?: never;
2390
+ patch?: never;
2391
+ trace?: never;
2392
+ };
2113
2393
  "/api/v1/organizations/{organization_id}/template-builder-availability": {
2114
2394
  parameters: {
2115
2395
  query?: never;
@@ -2182,7 +2462,7 @@ export interface paths {
2182
2462
  put?: never;
2183
2463
  /**
2184
2464
  * Create the template’s draft (a layered workspace on the draft base)
2185
- * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / base_required. Supports Idempotency-Key.
2465
+ * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template named `display_name`, default the slug). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / reserved_template_slug (new, edit) / base_required. Supports Idempotency-Key.
2186
2466
  */
2187
2467
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraft"];
2188
2468
  /**
@@ -2210,7 +2490,7 @@ export interface paths {
2210
2490
  put?: never;
2211
2491
  /**
2212
2492
  * Create the template’s draft (a layered workspace on the draft base)
2213
- * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / base_required. Supports Idempotency-Key.
2493
+ * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template named `display_name`, default the slug). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / reserved_template_slug (new, edit) / base_required. Supports Idempotency-Key.
2214
2494
  */
2215
2495
  post: operations["postV1TemplatesSlugDraft"];
2216
2496
  /**
@@ -2324,7 +2604,7 @@ export interface paths {
2324
2604
  put?: never;
2325
2605
  /**
2326
2606
  * Publish the draft as the template’s next version (save-as-template from the draft)
2327
- * @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). 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.
2607
+ * @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.
2328
2608
  */
2329
2609
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
2330
2610
  delete?: never;
@@ -2344,7 +2624,7 @@ export interface paths {
2344
2624
  put?: never;
2345
2625
  /**
2346
2626
  * Publish the draft as the template’s next version (save-as-template from the draft)
2347
- * @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). 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.
2627
+ * @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.
2348
2628
  */
2349
2629
  post: operations["postV1TemplatesSlugDraftPublish"];
2350
2630
  delete?: never;
@@ -2368,7 +2648,7 @@ export interface paths {
2368
2648
  put?: never;
2369
2649
  /**
2370
2650
  * Create the template’s draft (a layered workspace on the draft base)
2371
- * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / base_required. Supports Idempotency-Key.
2651
+ * @description Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on `base` (default: the latest published version; required when the template has none, which creates the organization template named `display_name`, default the slug). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / reserved_template_slug (new, edit) / base_required. Supports Idempotency-Key.
2372
2652
  */
2373
2653
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraft"];
2374
2654
  /**
@@ -2437,7 +2717,7 @@ export interface paths {
2437
2717
  put?: never;
2438
2718
  /**
2439
2719
  * Publish the draft as the template’s next version (save-as-template from the draft)
2440
- * @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). 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.
2720
+ * @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.
2441
2721
  */
2442
2722
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
2443
2723
  delete?: never;
@@ -2446,67 +2726,67 @@ export interface paths {
2446
2726
  patch?: never;
2447
2727
  trace?: never;
2448
2728
  };
2449
- "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2729
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/test-instances": {
2450
2730
  parameters: {
2451
2731
  query?: never;
2452
2732
  header?: never;
2453
2733
  path?: never;
2454
2734
  cookie?: never;
2455
2735
  };
2736
+ get?: never;
2737
+ put?: never;
2456
2738
  /**
2457
- * List one directory of a template version’s file tree
2458
- * @description Entries directly inside `path` (default `/`), sorted by name bytes, keyset-paginated. The tree covers the whole filesystem (only the contents of /proc, /sys, /dev, /run and /tmp are left out). 409 file_list_unavailable (no file list) or file_list_indexing (retryable); 404 path_not_found; 422 invalid_path.
2739
+ * Open a test instance of a template version, published or not
2740
+ * @description Opens a layered session workspace (purpose template_test) on that version of the organization’s template: registered and not archived, published or not. It is a fresh workspace (a `create` startup run) with origin {kind: template_version, template_id, version}; it ends on close() or idle. `inputs` as for open (422 input_unknown, input_invalid, input_required). 202 OpenResponse (200 when an existing key is running and ready). Errors: 403 template_dev_mode_role (owners, admins and API keys with a tool permission only), 404 version_not_found, 409 template_not_layered, template_archived, 422 reserved_key_prefix. Supports Idempotency-Key.
2459
2741
  */
2460
- get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles"];
2461
- put?: never;
2462
- post?: never;
2742
+ post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances"];
2463
2743
  delete?: never;
2464
2744
  options?: never;
2465
2745
  head?: never;
2466
2746
  patch?: never;
2467
2747
  trace?: never;
2468
2748
  };
2469
- "/v1/templates/{slug}/versions/{version}/files": {
2749
+ "/v1/templates/{slug}/versions/{version}/test-instances": {
2470
2750
  parameters: {
2471
2751
  query?: never;
2472
2752
  header?: never;
2473
2753
  path?: never;
2474
2754
  cookie?: never;
2475
2755
  };
2756
+ get?: never;
2757
+ put?: never;
2476
2758
  /**
2477
- * List one directory of a template version’s file tree
2478
- * @description Entries directly inside `path` (default `/`), sorted by name bytes, keyset-paginated. The tree covers the whole filesystem (only the contents of /proc, /sys, /dev, /run and /tmp are left out). 409 file_list_unavailable (no file list) or file_list_indexing (retryable); 404 path_not_found; 422 invalid_path.
2759
+ * Open a test instance of a template version, published or not
2760
+ * @description Opens a layered session workspace (purpose template_test) on that version of the organization’s template: registered and not archived, published or not. It is a fresh workspace (a `create` startup run) with origin {kind: template_version, template_id, version}; it ends on close() or idle. `inputs` as for open (422 input_unknown, input_invalid, input_required). 202 OpenResponse (200 when an existing key is running and ready). Errors: 403 template_dev_mode_role (owners, admins and API keys with a tool permission only), 404 version_not_found, 409 template_not_layered, template_archived, 422 reserved_key_prefix. Supports Idempotency-Key.
2479
2761
  */
2480
- get: operations["getV1TemplatesSlugVersionsVersionFiles"];
2481
- put?: never;
2482
- post?: never;
2762
+ post: operations["postV1TemplatesSlugVersionsVersionTestInstances"];
2483
2763
  delete?: never;
2484
2764
  options?: never;
2485
2765
  head?: never;
2486
2766
  patch?: never;
2487
2767
  trace?: never;
2488
2768
  };
2489
- "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files/entry": {
2769
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/test-instances": {
2490
2770
  parameters: {
2491
2771
  query?: never;
2492
2772
  header?: never;
2493
2773
  path?: never;
2494
2774
  cookie?: never;
2495
2775
  };
2776
+ get?: never;
2777
+ put?: never;
2496
2778
  /**
2497
- * Get one entry of a template version’s file tree
2498
- * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2779
+ * Open a test instance of a template version, published or not
2780
+ * @description Opens a layered session workspace (purpose template_test) on that version of the organization’s template: registered and not archived, published or not. It is a fresh workspace (a `create` startup run) with origin {kind: template_version, template_id, version}; it ends on close() or idle. `inputs` as for open (422 input_unknown, input_invalid, input_required). 202 OpenResponse (200 when an existing key is running and ready). Errors: 403 template_dev_mode_role (owners, admins and API keys with a tool permission only), 404 version_not_found, 409 template_not_layered, template_archived, 422 reserved_key_prefix. Supports Idempotency-Key.
2499
2781
  */
2500
- get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFilesEntry"];
2501
- put?: never;
2502
- post?: never;
2782
+ post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances"];
2503
2783
  delete?: never;
2504
2784
  options?: never;
2505
2785
  head?: never;
2506
2786
  patch?: never;
2507
2787
  trace?: never;
2508
2788
  };
2509
- "/v1/templates/{slug}/versions/{version}/files/entry": {
2789
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2510
2790
  parameters: {
2511
2791
  query?: never;
2512
2792
  header?: never;
@@ -2514,10 +2794,70 @@ export interface paths {
2514
2794
  cookie?: never;
2515
2795
  };
2516
2796
  /**
2517
- * Get one entry of a template version’s file tree
2518
- * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2797
+ * List one directory of a template version’s file tree
2798
+ * @description Entries directly inside `path` (default `/`), sorted by name bytes, keyset-paginated. The tree covers the whole filesystem (only the contents of /proc, /sys, /dev, /run and /tmp are left out). 409 file_list_unavailable (no file list) or file_list_indexing (retryable); 404 path_not_found; 422 invalid_path.
2519
2799
  */
2520
- get: operations["getV1TemplatesSlugVersionsVersionFilesEntry"];
2800
+ get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles"];
2801
+ put?: never;
2802
+ post?: never;
2803
+ delete?: never;
2804
+ options?: never;
2805
+ head?: never;
2806
+ patch?: never;
2807
+ trace?: never;
2808
+ };
2809
+ "/v1/templates/{slug}/versions/{version}/files": {
2810
+ parameters: {
2811
+ query?: never;
2812
+ header?: never;
2813
+ path?: never;
2814
+ cookie?: never;
2815
+ };
2816
+ /**
2817
+ * List one directory of a template version’s file tree
2818
+ * @description Entries directly inside `path` (default `/`), sorted by name bytes, keyset-paginated. The tree covers the whole filesystem (only the contents of /proc, /sys, /dev, /run and /tmp are left out). 409 file_list_unavailable (no file list) or file_list_indexing (retryable); 404 path_not_found; 422 invalid_path.
2819
+ */
2820
+ get: operations["getV1TemplatesSlugVersionsVersionFiles"];
2821
+ put?: never;
2822
+ post?: never;
2823
+ delete?: never;
2824
+ options?: never;
2825
+ head?: never;
2826
+ patch?: never;
2827
+ trace?: never;
2828
+ };
2829
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files/entry": {
2830
+ parameters: {
2831
+ query?: never;
2832
+ header?: never;
2833
+ path?: never;
2834
+ cookie?: never;
2835
+ };
2836
+ /**
2837
+ * Get one entry of a template version’s file tree
2838
+ * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2839
+ */
2840
+ get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFilesEntry"];
2841
+ put?: never;
2842
+ post?: never;
2843
+ delete?: never;
2844
+ options?: never;
2845
+ head?: never;
2846
+ patch?: never;
2847
+ trace?: never;
2848
+ };
2849
+ "/v1/templates/{slug}/versions/{version}/files/entry": {
2850
+ parameters: {
2851
+ query?: never;
2852
+ header?: never;
2853
+ path?: never;
2854
+ cookie?: never;
2855
+ };
2856
+ /**
2857
+ * Get one entry of a template version’s file tree
2858
+ * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2859
+ */
2860
+ get: operations["getV1TemplatesSlugVersionsVersionFilesEntry"];
2521
2861
  put?: never;
2522
2862
  post?: never;
2523
2863
  delete?: never;
@@ -2566,6 +2906,46 @@ export interface paths {
2566
2906
  patch?: never;
2567
2907
  trace?: never;
2568
2908
  };
2909
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/recipe": {
2910
+ parameters: {
2911
+ query?: never;
2912
+ header?: never;
2913
+ path?: never;
2914
+ cookie?: never;
2915
+ };
2916
+ /**
2917
+ * Export the recipe and settings of a template version (request form, ready to build again)
2918
+ * @description recipe: v1 {base, dockerfile, network} or the recipe v2 document (base as <slug>@<version>, languages as {id, version}, files without size, settings as stored); building it again from the same base with the same API release, while its uploads exist, gives the same recipe_sha256. null for versions saved from a workspace or published by the platform. settings: the version’s TemplateSettings. Same visibility as the version (unpublished only for owners/admins of the owning organization).
2919
+ */
2920
+ get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe"];
2921
+ put?: never;
2922
+ post?: never;
2923
+ delete?: never;
2924
+ options?: never;
2925
+ head?: never;
2926
+ patch?: never;
2927
+ trace?: never;
2928
+ };
2929
+ "/v1/templates/{slug}/versions/{version}/recipe": {
2930
+ parameters: {
2931
+ query?: never;
2932
+ header?: never;
2933
+ path?: never;
2934
+ cookie?: never;
2935
+ };
2936
+ /**
2937
+ * Export the recipe and settings of a template version (request form, ready to build again)
2938
+ * @description recipe: v1 {base, dockerfile, network} or the recipe v2 document (base as <slug>@<version>, languages as {id, version}, files without size, settings as stored); building it again from the same base with the same API release, while its uploads exist, gives the same recipe_sha256. null for versions saved from a workspace or published by the platform. settings: the version’s TemplateSettings. Same visibility as the version (unpublished only for owners/admins of the owning organization).
2939
+ */
2940
+ get: operations["getV1TemplatesSlugVersionsVersionRecipe"];
2941
+ put?: never;
2942
+ post?: never;
2943
+ delete?: never;
2944
+ options?: never;
2945
+ head?: never;
2946
+ patch?: never;
2947
+ trace?: never;
2948
+ };
2569
2949
  "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2570
2950
  parameters: {
2571
2951
  query?: never;
@@ -2626,6 +3006,26 @@ export interface paths {
2626
3006
  patch?: never;
2627
3007
  trace?: never;
2628
3008
  };
3009
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/recipe": {
3010
+ parameters: {
3011
+ query?: never;
3012
+ header?: never;
3013
+ path?: never;
3014
+ cookie?: never;
3015
+ };
3016
+ /**
3017
+ * Export the recipe and settings of a template version (request form, ready to build again)
3018
+ * @description recipe: v1 {base, dockerfile, network} or the recipe v2 document (base as <slug>@<version>, languages as {id, version}, files without size, settings as stored); building it again from the same base with the same API release, while its uploads exist, gives the same recipe_sha256. null for versions saved from a workspace or published by the platform. settings: the version’s TemplateSettings. Same visibility as the version (unpublished only for owners/admins of the owning organization).
3019
+ */
3020
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe"];
3021
+ put?: never;
3022
+ post?: never;
3023
+ delete?: never;
3024
+ options?: never;
3025
+ head?: never;
3026
+ patch?: never;
3027
+ trace?: never;
3028
+ };
2629
3029
  "/v1/organizations/{organization_id}/secrets": {
2630
3030
  parameters: {
2631
3031
  query?: never;
@@ -2774,7 +3174,7 @@ export interface paths {
2774
3174
  get: operations["getV1WorkspacesWorkspaceIdSecrets"];
2775
3175
  /**
2776
3176
  * Replace the secret names bound to a workspace
2777
- * @description Replaces the whole binding (`names: []` clears it); applies from the next exec/PTY start (running processes keep their environment). Every name must be a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names and nothing changes. Audited when the binding changes. 409 workspace_deleted.
3177
+ * @description Replaces the whole binding (`names: []` clears it); applies from the next exec/PTY start (running processes keep their environment). Every name must be a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names and nothing changes. A name equal to a key of the template version’s env or one of its text inputs is 422 env_collision (details.name; contracts §24.3). Exactly the given names are bound (the version’s secret inputs join the binding only through open). Audited when the binding changes. 409 workspace_deleted.
2778
3178
  */
2779
3179
  put: operations["putV1WorkspacesWorkspaceIdSecrets"];
2780
3180
  post?: never;
@@ -2912,7 +3312,7 @@ export interface paths {
2912
3312
  get: operations["getApiV1WorkspacesWorkspaceIdSecrets"];
2913
3313
  /**
2914
3314
  * Replace the secret names bound to a workspace
2915
- * @description Replaces the whole binding (`names: []` clears it); applies from the next exec/PTY start (running processes keep their environment). Every name must be a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names and nothing changes. Audited when the binding changes. 409 workspace_deleted.
3315
+ * @description Replaces the whole binding (`names: []` clears it); applies from the next exec/PTY start (running processes keep their environment). Every name must be a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names and nothing changes. A name equal to a key of the template version’s env or one of its text inputs is 422 env_collision (details.name; contracts §24.3). Exactly the given names are bound (the version’s secret inputs join the binding only through open). Audited when the binding changes. 409 workspace_deleted.
2916
3316
  */
2917
3317
  put: operations["putApiV1WorkspacesWorkspaceIdSecrets"];
2918
3318
  post?: never;
@@ -2972,12 +3372,12 @@ export interface paths {
2972
3372
  };
2973
3373
  /**
2974
3374
  * Effective egress policy of a workspace and its enforcement state
2975
- * @description effective = workspace override > project policy > platform default (allow_all). enforcement.state is not_enforced until the cell/host acknowledges the current effective policy for the workspace’s current ownership epoch, then pending | enforced | failed. `version` (ETag) is the override history version for If-Match.
3375
+ * @description effective = workspace override > project policy > platform default (allow_all). enforcement.state is not_enforced until the cell/host acknowledges the current effective policy for the workspace’s current ownership epoch, then pending | enforced | failed. `version` (ETag) is the override history version for If-Match. template_egress: the template version’s egress ceiling (contracts §24.3, null = none); effective_policy: what the host enforces, effective intersected with that ceiling.
2976
3376
  */
2977
3377
  get: operations["getV1WorkspacesWorkspaceIdEgressPolicy"];
2978
3378
  /**
2979
3379
  * Set a workspace override of the egress policy (new immutable version)
2980
- * @description Same body and validation as the project policy. Optional If-Match. 409 conflict (details.reason workspace_deleted) for deleted workspaces.
3380
+ * @description Same body and validation as the project policy. Optional If-Match. 409 conflict (details.reason workspace_deleted) for deleted workspaces. 422 egress_widening (details {template_egress, outside: [hosts] | ["cidrs"] | ["allow_all"]}) when the workspace’s template egress ceiling (contracts §24.3) would narrow the policy.
2981
3381
  */
2982
3382
  put: operations["putV1WorkspacesWorkspaceIdEgressPolicy"];
2983
3383
  post?: never;
@@ -3058,12 +3458,12 @@ export interface paths {
3058
3458
  };
3059
3459
  /**
3060
3460
  * Effective egress policy of a workspace and its enforcement state
3061
- * @description effective = workspace override > project policy > platform default (allow_all). enforcement.state is not_enforced until the cell/host acknowledges the current effective policy for the workspace’s current ownership epoch, then pending | enforced | failed. `version` (ETag) is the override history version for If-Match.
3461
+ * @description effective = workspace override > project policy > platform default (allow_all). enforcement.state is not_enforced until the cell/host acknowledges the current effective policy for the workspace’s current ownership epoch, then pending | enforced | failed. `version` (ETag) is the override history version for If-Match. template_egress: the template version’s egress ceiling (contracts §24.3, null = none); effective_policy: what the host enforces, effective intersected with that ceiling.
3062
3462
  */
3063
3463
  get: operations["getApiV1WorkspacesWorkspaceIdEgressPolicy"];
3064
3464
  /**
3065
3465
  * Set a workspace override of the egress policy (new immutable version)
3066
- * @description Same body and validation as the project policy. Optional If-Match. 409 conflict (details.reason workspace_deleted) for deleted workspaces.
3466
+ * @description Same body and validation as the project policy. Optional If-Match. 409 conflict (details.reason workspace_deleted) for deleted workspaces. 422 egress_widening (details {template_egress, outside: [hosts] | ["cidrs"] | ["allow_all"]}) when the workspace’s template egress ceiling (contracts §24.3) would narrow the policy.
3067
3467
  */
3068
3468
  put: operations["putApiV1WorkspacesWorkspaceIdEgressPolicy"];
3069
3469
  post?: never;
@@ -4225,6 +4625,15 @@ export interface components {
4225
4625
  draft_workspace_id: string;
4226
4626
  checkpoint_id: string | null;
4227
4627
  captured_at: string | null;
4628
+ } | {
4629
+ /** @enum {string} */
4630
+ kind: "template_version";
4631
+ /**
4632
+ * Format: uuid
4633
+ * @description UUIDv7, lowercase canonical form.
4634
+ */
4635
+ template_id: string;
4636
+ version: number;
4228
4637
  };
4229
4638
  /** @description Manifest v2 `defaults` (contracts §19.7). Versions without them report the T1 defaults. */
4230
4639
  TemplateDefaults: {
@@ -4235,10 +4644,410 @@ export interface components {
4235
4644
  memory_mib_ceiling: number;
4236
4645
  disk_gib: number;
4237
4646
  } | null;
4238
- egress: null;
4647
+ egress: components["schemas"]["TemplateEgressDefault"] | null;
4239
4648
  agent_tools: null;
4240
4649
  update_policy: null;
4241
4650
  };
4651
+ /** @description The template’s workspace network ceiling (contracts §24.3): the cell intersects it with the effective egress policy. */
4652
+ TemplateEgressDefault: {
4653
+ /** @enum {string} */
4654
+ mode: "allowlist" | "none";
4655
+ /** @description Normalized (lowercase, sorted); empty for none. */
4656
+ allow_hosts: string[];
4657
+ };
4658
+ /** @description An open-time input: text (a value passed to open) or secret (a stored secret of the same name, bound to the workspace). */
4659
+ TemplateInput: {
4660
+ /** @enum {string} */
4661
+ kind: "text" | "secret";
4662
+ required: boolean;
4663
+ default: string | null;
4664
+ description: string | null;
4665
+ };
4666
+ /** @description A start command (§24.4): create = new workspace layer, boot = every cold boot, resume = every memory restore. */
4667
+ TemplateStartCommand: {
4668
+ name: string;
4669
+ /** @enum {string} */
4670
+ when: "create" | "boot" | "resume";
4671
+ run: string;
4672
+ user: string | null;
4673
+ cwd: string | null;
4674
+ timeout_seconds: number;
4675
+ };
4676
+ /** @description A process the guest keeps running (§24.4); ready before open() returns. */
4677
+ TemplateService: {
4678
+ run: string;
4679
+ user: string | null;
4680
+ cwd: string | null;
4681
+ /** @enum {string} */
4682
+ restart: "always" | "on_failure" | "never";
4683
+ ready: ({
4684
+ port: number;
4685
+ } | {
4686
+ command: string;
4687
+ }) | null;
4688
+ ready_timeout_seconds: number;
4689
+ };
4690
+ /** @description What a workspace of the version gets when it opens (contracts §24.3), every key present. `env` is the effective template env (a recipe v2 version: its languages’ build env, then its own env). */
4691
+ TemplateSettings: {
4692
+ env: {
4693
+ [key: string]: string;
4694
+ };
4695
+ inputs: {
4696
+ [key: string]: components["schemas"]["TemplateInput"];
4697
+ };
4698
+ start: components["schemas"]["TemplateStartCommand"][];
4699
+ services: {
4700
+ [key: string]: components["schemas"]["TemplateService"];
4701
+ };
4702
+ defaults: components["schemas"]["TemplateDefaults"];
4703
+ };
4704
+ /** @description What a workspace of the version gets when it opens (§24.3, §24.4). Omitted fields are empty (recipes do not carry settings forward). */
4705
+ TemplateSettingsInput: {
4706
+ /** @description Template environment for every exec, PTY, start command and service (below text inputs and the call's env). */
4707
+ env?: {
4708
+ [key: string]: string;
4709
+ };
4710
+ /** @description Open-time inputs. text: a value passed to open({inputs}); secret: a stored secret of the same name, bound to the workspace (§17). */
4711
+ inputs?: {
4712
+ [key: string]: {
4713
+ /** @enum {unknown} */
4714
+ kind: "text" | "secret";
4715
+ /** @description Default: false. */
4716
+ required?: boolean;
4717
+ /** @description text inputs only. */
4718
+ default?: null | string;
4719
+ description?: null | string;
4720
+ };
4721
+ };
4722
+ /** @description Start commands (§24.4): create = on a new workspace layer, boot = every cold boot, resume = every memory restore. */
4723
+ start?: {
4724
+ name: string;
4725
+ /** @enum {unknown} */
4726
+ when: "create" | "boot" | "resume";
4727
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4728
+ run: string;
4729
+ /** @description Absent or null: the template's default user. */
4730
+ user?: null | string;
4731
+ cwd?: null | string;
4732
+ /** @description Default: 300. */
4733
+ timeout_seconds?: number;
4734
+ }[];
4735
+ /** @description Processes kept running by the guest (§24.4); ready before open() returns. */
4736
+ services?: {
4737
+ [key: string]: {
4738
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4739
+ run: string;
4740
+ /** @description Absent or null: the template's default user. */
4741
+ user?: null | string;
4742
+ cwd?: null | string;
4743
+ /**
4744
+ * @description Default: "on_failure".
4745
+ * @enum {unknown}
4746
+ */
4747
+ restart?: "always" | "on_failure" | "never";
4748
+ ready?: null | {
4749
+ port: number;
4750
+ } | {
4751
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4752
+ command: string;
4753
+ };
4754
+ /** @description Default: 60. */
4755
+ ready_timeout_seconds?: number;
4756
+ };
4757
+ };
4758
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
4759
+ defaults?: {
4760
+ /** @enum {unknown} */
4761
+ lifetime?: "persistent" | "session";
4762
+ idle_timeout_seconds?: null | number;
4763
+ /** @description Ceilings enforced at admission (clamped, §24.3). */
4764
+ limits?: null | {
4765
+ cpu_millis_ceiling: number;
4766
+ memory_mib_ceiling: number;
4767
+ disk_gib: number;
4768
+ };
4769
+ /** @description Workspace network ceiling (§24.3): internet = no ceiling (stored as null), allowlist = only allow_hosts (TCP, any port), none = no egress. */
4770
+ egress?: null | {
4771
+ /** @enum {unknown} */
4772
+ mode: "internet" | "allowlist" | "none";
4773
+ allow_hosts?: string[];
4774
+ };
4775
+ agent_tools?: null;
4776
+ update_policy?: null;
4777
+ };
4778
+ };
4779
+ /** @description Recipe v1: a Dockerfile in the host builder’s dialect (no `schema` field). */
4780
+ TemplateRecipeV1: {
4781
+ /** @description `<template slug>@<version>`: a published, non-archived version this organization can use (its own templates first, then platform). Referenced as `FROM shardflux-base`. */
4782
+ base: string;
4783
+ /** @description Dockerfile in the builder dialect (<= 64 KiB UTF-8): exactly one `FROM shardflux-base` (or `FROM shardflux-base:<recipe.base>`) first (ARG may precede it), then RUN (shell or JSON exec form, no flags or heredocs), ENV, ARG, WORKDIR, USER; LABEL, EXPOSE, CMD, ENTRYPOINT, MAINTAINER, STOPSIGNAL are recorded only. No COPY/ADD (no build context), no multi-stage or external images, at most 128 steps. Refusals are 422 with details.reason and line. */
4784
+ dockerfile: string;
4785
+ /**
4786
+ * @description x86_64 (the default; the only one).
4787
+ * @enum {string}
4788
+ */
4789
+ architecture?: "x86_64";
4790
+ /** @description Builder VM bounds (the host builder’s ranges); clamped to the plan’s per-workspace limits (absent = the plan limit); timeout default 1800 s, maximum 3600 s. */
4791
+ resources?: {
4792
+ /** @description Builder range 500-16000. */
4793
+ cpu_millis?: number;
4794
+ /** @description Builder range 512-32768, even. */
4795
+ memory_mib?: number;
4796
+ /** @description Builder maximum 200. */
4797
+ disk_gib?: number;
4798
+ timeout_seconds?: number;
4799
+ };
4800
+ /** @description Build network: none (default) or egress to the listed DNS names (example.com, *.example.com). */
4801
+ network?: {
4802
+ /** @enum {string} */
4803
+ mode: "none" | "egress_allowlist";
4804
+ allow_hosts?: string[];
4805
+ };
4806
+ };
4807
+ /**
4808
+ * Template recipe v2 (shardflux.template-recipe.v2)
4809
+ * @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.
4810
+ */
4811
+ TemplateRecipeV2: {
4812
+ /** @enum {unknown} */
4813
+ schema: "shardflux.template-recipe.v2";
4814
+ /** @description `<template slug>@<version>`: a published, non-archived, layered-capable version this organization can use (its own templates first, then platform), e.g. ubuntu-24.04@1. */
4815
+ base: string;
4816
+ build: {
4817
+ /** @description Languages from the API's language table (§24.1). version omitted = the table's default for the base. Compiled first, in the table's order (not this array's). */
4818
+ languages?: {
4819
+ /** @enum {unknown} */
4820
+ id: "python" | "node" | "go" | "rust" | "java";
4821
+ version?: string;
4822
+ }[];
4823
+ packages?: {
4824
+ apt?: string[];
4825
+ /** @description Installed into /opt/venv (implies the python language). */
4826
+ pip?: {
4827
+ packages?: string[];
4828
+ /** @description Absolute paths of requirements files inside the template (usually from files[]), installed with pip -r. */
4829
+ requirements?: string[];
4830
+ };
4831
+ /** @description npm install -g (implies the node language unless the base has node). */
4832
+ npm?: string[];
4833
+ };
4834
+ /** @description Uploaded files and folders (§24.2), applied in this order (a later entry overwrites an earlier one). */
4835
+ files?: {
4836
+ /** @description An upload of this organization: sha256:<64 lower-case hex>. */
4837
+ upload?: string;
4838
+ /** @description template.yaml only: a local file (kind file) or directory (kind tar) the client uploads. Refused by the API. */
4839
+ from?: string;
4840
+ /** @enum {unknown} */
4841
+ kind: "file" | "tar";
4842
+ /** @description kind file: the file's path; kind tar: the directory the archive is extracted into. Platform-owned paths are refused (§24.1). */
4843
+ to: string;
4844
+ /** @description Default root. */
4845
+ owner?: string;
4846
+ /** @description Octal permission bits of a file (default 0644); absent or null for kind tar. */
4847
+ mode?: null | string;
4848
+ }[];
4849
+ /** @description Named build scripts, run in this order after languages, apt, files, pip and npm. */
4850
+ steps?: {
4851
+ name: string;
4852
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4853
+ run: string;
4854
+ /** @description Default root. */
4855
+ user?: string;
4856
+ cwd?: null | string;
4857
+ env?: {
4858
+ [key: string]: string;
4859
+ };
4860
+ }[];
4861
+ /** @description Build network (§24.1). auto (default): hosts derived from the recipe plus extra_hosts; none: no egress; allowlist: exactly allow_hosts. */
4862
+ network?: {
4863
+ /** @enum {unknown} */
4864
+ build?: "auto" | "none" | "allowlist";
4865
+ extra_hosts?: string[];
4866
+ allow_hosts?: string[];
4867
+ };
4868
+ };
4869
+ /** @description What a workspace of the version gets when it opens (§24.3, §24.4). Omitted fields are empty (recipes do not carry settings forward). */
4870
+ settings: {
4871
+ /** @description Template environment for every exec, PTY, start command and service (below text inputs and the call's env). */
4872
+ env?: {
4873
+ [key: string]: string;
4874
+ };
4875
+ /** @description Open-time inputs. text: a value passed to open({inputs}); secret: a stored secret of the same name, bound to the workspace (§17). */
4876
+ inputs?: {
4877
+ [key: string]: {
4878
+ /** @enum {unknown} */
4879
+ kind: "text" | "secret";
4880
+ /** @description Default: false. */
4881
+ required?: boolean;
4882
+ /** @description text inputs only. */
4883
+ default?: null | string;
4884
+ description?: null | string;
4885
+ };
4886
+ };
4887
+ /** @description Start commands (§24.4): create = on a new workspace layer, boot = every cold boot, resume = every memory restore. */
4888
+ start?: {
4889
+ name: string;
4890
+ /** @enum {unknown} */
4891
+ when: "create" | "boot" | "resume";
4892
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4893
+ run: string;
4894
+ /** @description Absent or null: the template's default user. */
4895
+ user?: null | string;
4896
+ cwd?: null | string;
4897
+ /** @description Default: 300. */
4898
+ timeout_seconds?: number;
4899
+ }[];
4900
+ /** @description Processes kept running by the guest (§24.4); ready before open() returns. */
4901
+ services?: {
4902
+ [key: string]: {
4903
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4904
+ run: string;
4905
+ /** @description Absent or null: the template's default user. */
4906
+ user?: null | string;
4907
+ cwd?: null | string;
4908
+ /**
4909
+ * @description Default: "on_failure".
4910
+ * @enum {unknown}
4911
+ */
4912
+ restart?: "always" | "on_failure" | "never";
4913
+ ready?: null | {
4914
+ port: number;
4915
+ } | {
4916
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4917
+ command: string;
4918
+ };
4919
+ /** @description Default: 60. */
4920
+ ready_timeout_seconds?: number;
4921
+ };
4922
+ };
4923
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
4924
+ defaults?: {
4925
+ /** @enum {unknown} */
4926
+ lifetime?: "persistent" | "session";
4927
+ idle_timeout_seconds?: null | number;
4928
+ /** @description Ceilings enforced at admission (clamped, §24.3). */
4929
+ limits?: null | {
4930
+ cpu_millis_ceiling: number;
4931
+ memory_mib_ceiling: number;
4932
+ disk_gib: number;
4933
+ };
4934
+ /** @description Workspace network ceiling (§24.3): internet = no ceiling (stored as null), allowlist = only allow_hosts (TCP, any port), none = no egress. */
4935
+ egress?: null | {
4936
+ /** @enum {unknown} */
4937
+ mode: "internet" | "allowlist" | "none";
4938
+ allow_hosts?: string[];
4939
+ };
4940
+ agent_tools?: null;
4941
+ update_policy?: null;
4942
+ };
4943
+ };
4944
+ /** @description Builder VM bounds, exactly as recipe v1 `resources` (not part of recipe_sha256). */
4945
+ resources?: {
4946
+ cpu_millis?: number;
4947
+ memory_mib?: number;
4948
+ disk_gib?: number;
4949
+ timeout_seconds?: number;
4950
+ };
4951
+ };
4952
+ TemplateUploadRequest: {
4953
+ /** @description Lower-case hex SHA-256 of the bytes. */
4954
+ sha256: string;
4955
+ /** @description Bytes, at most 5368709120 (5 GiB; more is 422 upload_too_large). */
4956
+ size: number;
4957
+ /**
4958
+ * @description file, or tar (an uncompressed ustar/pax archive of a folder). Recorded for display; the recipe entry decides.
4959
+ * @enum {string}
4960
+ */
4961
+ kind: "file" | "tar";
4962
+ };
4963
+ TemplateUpload: {
4964
+ sha256: string;
4965
+ size: number;
4966
+ /** @enum {string} */
4967
+ kind: "file" | "tar";
4968
+ /**
4969
+ * @description available: verified in the bucket (a recipe may reference it as sha256:<hex>); pending: PUT the bytes first.
4970
+ * @enum {string}
4971
+ */
4972
+ state: "pending" | "available";
4973
+ /**
4974
+ * Format: date-time
4975
+ * @description RFC 3339 UTC timestamp with Z.
4976
+ */
4977
+ created_at: string;
4978
+ verified_at: string | null;
4979
+ };
4980
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
4981
+ TemplateUploadResponse: {
4982
+ upload: components["schemas"]["TemplateUpload"];
4983
+ put: {
4984
+ /** @description Presigned S3 PutObject URL (a bearer credential until expires_at: do not log or share it). */
4985
+ url: string;
4986
+ /** @enum {string} */
4987
+ method: "PUT";
4988
+ /** @description Send every header verbatim (x-amz-checksum-sha256 and content-length are signed; S3 refuses other bytes). */
4989
+ headers: {
4990
+ [key: string]: string;
4991
+ };
4992
+ /**
4993
+ * Format: date-time
4994
+ * @description RFC 3339 UTC timestamp with Z.
4995
+ */
4996
+ expires_at: string;
4997
+ } | null;
4998
+ };
4999
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
5000
+ TemplateVersionRecipe: {
5001
+ version: number;
5002
+ source_kind: ("recipe" | "workspace" | "git") | null;
5003
+ recipe: (components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"]) | null;
5004
+ settings: components["schemas"]["TemplateSettings"];
5005
+ };
5006
+ TemplatePackagePage: {
5007
+ data: {
5008
+ name: string;
5009
+ version: string | null;
5010
+ summary: string | null;
5011
+ }[];
5012
+ /**
5013
+ * @description apt_index: the base’s apt index; pypi_names: the daily PyPI name list (no versions: fetch one package for them); npm_search: the npm registry search.
5014
+ * @enum {string}
5015
+ */
5016
+ source: "apt_index" | "pypi_names" | "npm_search";
5017
+ };
5018
+ TemplatePackage: {
5019
+ name: string;
5020
+ version: string | null;
5021
+ summary: string | null;
5022
+ /** @description Known versions, newest first (at most 200). */
5023
+ versions: string[];
5024
+ };
5025
+ TemplateLanguages: {
5026
+ /** @description `<slug>@<version>` as asked. */
5027
+ base: string;
5028
+ /** @description The chain’s platform base (the base itself for a platform version): the table is read for it. */
5029
+ platform_base: string;
5030
+ /** @description Hosts apt installs need while an `auto` build runs (the platform base’s `build_inputs.apt_pin.hosts`, else snapshot.ubuntu.com). */
5031
+ apt_hosts: string[];
5032
+ /** @description In table order (python, node, go, rust, java), then newest version first as the table lists them. */
5033
+ data: {
5034
+ /** @enum {string} */
5035
+ id: "python" | "node" | "go" | "rust" | "java";
5036
+ /** @description Display name: Python, Node.js, Go, Rust, Java. */
5037
+ name: string;
5038
+ /** @description The version as a recipe names it (`{id, version}`): "3.12", "24", "1.27". */
5039
+ version: string;
5040
+ /** @description The version `{id}` without a version resolves to on this base. */
5041
+ default: boolean;
5042
+ /** @description The base already has this version (its manifest `tools`): the build installs nothing for it and needs no host (python still gets its /opt/venv). */
5043
+ included: boolean;
5044
+ base_version: string | null;
5045
+ /** @description Hosts its download needs while an `auto` build runs ([] when included, or when it comes from apt). */
5046
+ hosts: string[];
5047
+ /** @description apt packages it installs ([] when included). An `auto` build then also allows `apt_hosts`. */
5048
+ apt: string[];
5049
+ }[];
5050
+ };
4242
5051
  /** @description How the version was produced: a recipe build, a saved workspace (or draft), or git (reserved). */
4243
5052
  TemplateSource: {
4244
5053
  /** @enum {string} */
@@ -4434,11 +5243,14 @@ export interface components {
4434
5243
  /** @enum {string} */
4435
5244
  timeout_seconds: "request" | "plan" | "platform";
4436
5245
  };
5246
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
4437
5247
  network: {
4438
5248
  /** @enum {string} */
4439
5249
  mode: "none" | "egress_allowlist";
4440
5250
  allow_hosts: string[];
4441
5251
  };
5252
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
5253
+ denied_hosts: string[];
4442
5254
  provenance: {
4443
5255
  recipe_schema: string | null;
4444
5256
  recipe_sha256: string | null;
@@ -4446,9 +5258,81 @@ export interface components {
4446
5258
  builder_id: string | null;
4447
5259
  attempt: number;
4448
5260
  };
4449
- /** @description Only on GET of one build. */
5261
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
4450
5262
  recipe?: {
4451
5263
  dockerfile: string;
5264
+ } | {
5265
+ /** @enum {string} */
5266
+ schema: "shardflux.template-recipe.v2";
5267
+ build: {
5268
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
5269
+ languages: {
5270
+ id: string;
5271
+ version: string;
5272
+ /** @enum {string} */
5273
+ source: "install" | "base";
5274
+ url: string | null;
5275
+ sha256: string | null;
5276
+ }[];
5277
+ packages: {
5278
+ apt: string[];
5279
+ pip: {
5280
+ packages: string[];
5281
+ requirements: string[];
5282
+ };
5283
+ npm: string[];
5284
+ };
5285
+ files: {
5286
+ upload: string;
5287
+ /** @enum {string} */
5288
+ kind: "file" | "tar";
5289
+ to: string;
5290
+ owner: string;
5291
+ mode: string | null;
5292
+ size: number;
5293
+ }[];
5294
+ steps: {
5295
+ name: string;
5296
+ run: string;
5297
+ user: string;
5298
+ cwd: string | null;
5299
+ env: {
5300
+ [key: string]: string;
5301
+ };
5302
+ }[];
5303
+ network: {
5304
+ /** @enum {string} */
5305
+ build: "auto" | "none" | "allowlist";
5306
+ extra_hosts: string[];
5307
+ allow_hosts: string[];
5308
+ };
5309
+ };
5310
+ settings: components["schemas"]["TemplateSettings"];
5311
+ compiled: {
5312
+ compiler: string;
5313
+ language_table_sha256: string;
5314
+ build_env: {
5315
+ [key: string]: string;
5316
+ };
5317
+ steps: {
5318
+ [key: string]: unknown;
5319
+ }[];
5320
+ tools: {
5321
+ name: string;
5322
+ argv: string[];
5323
+ }[];
5324
+ network: {
5325
+ /** @enum {string} */
5326
+ mode: "none" | "egress_allowlist";
5327
+ allow_hosts: string[];
5328
+ };
5329
+ objects: {
5330
+ sha256: string;
5331
+ size: number;
5332
+ /** @enum {string} */
5333
+ kind: "file" | "tar";
5334
+ }[];
5335
+ };
4452
5336
  };
4453
5337
  result: {
4454
5338
  artifact_sha256: string | null;
@@ -4496,7 +5380,7 @@ export interface components {
4496
5380
  last_heartbeat_at: string | null;
4497
5381
  };
4498
5382
  /**
4499
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
5383
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
4500
5384
  * @enum {string}
4501
5385
  */
4502
5386
  source_kind: "recipe" | "workspace";
@@ -4542,6 +5426,8 @@ export interface components {
4542
5426
  * @description UUIDv7, lowercase canonical form.
4543
5427
  */
4544
5428
  project_id?: string;
5429
+ /** @description Template name when this draft creates the organization template (default: the slug). */
5430
+ display_name?: string;
4545
5431
  caps?: {
4546
5432
  cpu_millis?: number;
4547
5433
  memory_mib?: number;
@@ -4549,6 +5435,10 @@ export interface components {
4549
5435
  };
4550
5436
  agent_label?: string;
4551
5437
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5438
+ /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
5439
+ inputs?: {
5440
+ [key: string]: unknown;
5441
+ };
4552
5442
  };
4553
5443
  CreateTestInstanceBody: {
4554
5444
  /**
@@ -4565,6 +5455,10 @@ export interface components {
4565
5455
  };
4566
5456
  agent_label?: string;
4567
5457
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5458
+ /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
5459
+ inputs?: {
5460
+ [key: string]: unknown;
5461
+ };
4568
5462
  };
4569
5463
  PublishDraftBody: {
4570
5464
  /**
@@ -4582,12 +5476,16 @@ export interface components {
4582
5476
  memory_mib_ceiling: number;
4583
5477
  disk_gib: number;
4584
5478
  } | null;
4585
- /** @description Reserved (T2). */
4586
- egress?: null;
5479
+ egress?: {
5480
+ /** @enum {string} */
5481
+ mode: "internet" | "allowlist" | "none";
5482
+ allow_hosts?: string[];
5483
+ } | null;
4587
5484
  /** @description Reserved (T2). */
4588
5485
  agent_tools?: null;
4589
5486
  update_policy?: ("pinned" | "auto") | null;
4590
5487
  };
5488
+ settings?: components["schemas"]["TemplateSettingsInput"];
4591
5489
  /** @default true */
4592
5490
  auto_publish: boolean;
4593
5491
  /** @description Up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
@@ -4609,8 +5507,11 @@ export interface components {
4609
5507
  memory_mib_ceiling: number;
4610
5508
  disk_gib: number;
4611
5509
  } | null;
4612
- /** @description Reserved (T2). */
4613
- egress?: null;
5510
+ egress?: {
5511
+ /** @enum {string} */
5512
+ mode: "internet" | "allowlist" | "none";
5513
+ allow_hosts?: string[];
5514
+ } | null;
4614
5515
  /** @description Reserved (T2). */
4615
5516
  agent_tools?: null;
4616
5517
  update_policy?: ("pinned" | "auto") | null;
@@ -4624,6 +5525,7 @@ export interface components {
4624
5525
  auto_publish: boolean;
4625
5526
  /** @description Up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
4626
5527
  acknowledged_scan_findings?: string[];
5528
+ settings?: components["schemas"]["TemplateSettingsInput"];
4627
5529
  };
4628
5530
  /** @description operation: the capture (layer_snapshot) of a running workspace, null otherwise. build: poll GET …/template-builds/{id} until registration.state is registered. */
4629
5531
  SaveAsTemplateResponse: {
@@ -4717,18 +5619,61 @@ export interface components {
4717
5619
  bytes_removed: number;
4718
5620
  } | null;
4719
5621
  };
4720
- Workspace: {
4721
- /**
4722
- * Format: uuid
4723
- * @description UUIDv7, lowercase canonical form.
4724
- */
4725
- id: string;
5622
+ /** @description Start commands and services of the workspace’s template version (contracts §24.4); null when the version has none. */
5623
+ WorkspaceStartup: {
4726
5624
  /**
4727
- * Format: uuid
4728
- * @description UUIDv7, lowercase canonical form.
5625
+ * @description pending: a start is in progress and its startup has not begun (or never ran); running: start commands, services or readiness waits are running; ready: every step succeeded; failed: a step failed (the workspace still runs so it can be inspected; the next open runs the failed step again).
5626
+ * @enum {string}
4729
5627
  */
4730
- organization_id: string;
4731
- /**
5628
+ state: "pending" | "running" | "ready" | "failed";
5629
+ trigger: ("create" | "boot" | "resume") | null;
5630
+ step: string | null;
5631
+ service: string | null;
5632
+ exit_code: number | null;
5633
+ output_tail: string | null;
5634
+ reason: string | null;
5635
+ operation_id: string | null;
5636
+ at: string | null;
5637
+ };
5638
+ WorkspaceInputs: {
5639
+ /** @description The workspace’s text inputs (name → value). Secret inputs are bound secrets (GET …/secrets), never listed here. */
5640
+ inputs: {
5641
+ [key: string]: string;
5642
+ };
5643
+ };
5644
+ /** @description project_id: required for browser sessions (API keys open in their own project). */
5645
+ CreateVersionTestInstanceBody: {
5646
+ /** @description Workspace key (default sf:test:<slug>:<8 hex>); caller keys starting with sf: are reserved. */
5647
+ key?: string;
5648
+ caps?: {
5649
+ cpu_millis?: number;
5650
+ memory_mib?: number;
5651
+ disk_gib?: number;
5652
+ };
5653
+ agent_label?: string;
5654
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5655
+ /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
5656
+ inputs?: {
5657
+ [key: string]: unknown;
5658
+ };
5659
+ /**
5660
+ * Format: uuid
5661
+ * @description UUIDv7, lowercase canonical form.
5662
+ */
5663
+ project_id?: string;
5664
+ };
5665
+ Workspace: {
5666
+ /**
5667
+ * Format: uuid
5668
+ * @description UUIDv7, lowercase canonical form.
5669
+ */
5670
+ id: string;
5671
+ /**
5672
+ * Format: uuid
5673
+ * @description UUIDv7, lowercase canonical form.
5674
+ */
5675
+ organization_id: string;
5676
+ /**
4732
5677
  * Format: uuid
4733
5678
  * @description UUIDv7, lowercase canonical form.
4734
5679
  */
@@ -4817,6 +5762,7 @@ export interface components {
4817
5762
  ended_reason: ("closed" | "idle_timeout" | "draft_discarded") | null;
4818
5763
  dev_template_id: string | null;
4819
5764
  update_policy: components["schemas"]["UpdatePolicy"];
5765
+ startup: components["schemas"]["WorkspaceStartup"] | null;
4820
5766
  /**
4821
5767
  * Format: date-time
4822
5768
  * @description RFC 3339 UTC timestamp with Z.
@@ -8403,6 +9349,10 @@ export interface operations {
8403
9349
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
8404
9350
  /** @description Secret names bound to the workspace (max 50, unique): injected as environment variables into every exec and PTY start (terminal sessions included), together with the call’s own `secret_refs`. Each must name a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names. */
8405
9351
  secrets?: string[];
9352
+ /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
9353
+ inputs?: {
9354
+ [key: string]: unknown;
9355
+ };
8406
9356
  lifetime?: components["schemas"]["WorkspaceLifetime"];
8407
9357
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
8408
9358
  idle_policy?: string;
@@ -8658,6 +9608,47 @@ export interface operations {
8658
9608
  };
8659
9609
  };
8660
9610
  };
9611
+ getV1WorkspacesWorkspaceIdInputs: {
9612
+ parameters: {
9613
+ query?: never;
9614
+ header?: never;
9615
+ path: {
9616
+ /** @description UUIDv7, lowercase canonical form. */
9617
+ workspace_id: string;
9618
+ };
9619
+ cookie?: never;
9620
+ };
9621
+ requestBody?: never;
9622
+ responses: {
9623
+ /** @description Default Response */
9624
+ 200: {
9625
+ headers: {
9626
+ [name: string]: unknown;
9627
+ };
9628
+ content: {
9629
+ "application/json": components["schemas"]["WorkspaceInputs"];
9630
+ };
9631
+ };
9632
+ /** @description Default Response */
9633
+ "4XX": {
9634
+ headers: {
9635
+ [name: string]: unknown;
9636
+ };
9637
+ content: {
9638
+ "application/json": components["schemas"]["ErrorBody"];
9639
+ };
9640
+ };
9641
+ /** @description Default Response */
9642
+ "5XX": {
9643
+ headers: {
9644
+ [name: string]: unknown;
9645
+ };
9646
+ content: {
9647
+ "application/json": components["schemas"]["ErrorBody"];
9648
+ };
9649
+ };
9650
+ };
9651
+ };
8661
9652
  putV1WorkspacesWorkspaceIdIdlePolicy: {
8662
9653
  parameters: {
8663
9654
  query?: never;
@@ -9364,6 +10355,10 @@ export interface operations {
9364
10355
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
9365
10356
  /** @description Secret names bound to the workspace (max 50, unique): injected as environment variables into every exec and PTY start (terminal sessions included), together with the call’s own `secret_refs`. Each must name a live secret this workspace may use (its project, its id, and allowed_tools including exec and pty), else 422 details.reason secret_not_available with details.names. */
9366
10357
  secrets?: string[];
10358
+ /** @description Open-time inputs of the template version (contracts §24.3): {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key `inputs` replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}). */
10359
+ inputs?: {
10360
+ [key: string]: unknown;
10361
+ };
9367
10362
  lifetime?: components["schemas"]["WorkspaceLifetime"];
9368
10363
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
9369
10364
  idle_policy?: string;
@@ -9619,6 +10614,47 @@ export interface operations {
9619
10614
  };
9620
10615
  };
9621
10616
  };
10617
+ getApiV1WorkspacesWorkspaceIdInputs: {
10618
+ parameters: {
10619
+ query?: never;
10620
+ header?: never;
10621
+ path: {
10622
+ /** @description UUIDv7, lowercase canonical form. */
10623
+ workspace_id: string;
10624
+ };
10625
+ cookie?: never;
10626
+ };
10627
+ requestBody?: never;
10628
+ responses: {
10629
+ /** @description Default Response */
10630
+ 200: {
10631
+ headers: {
10632
+ [name: string]: unknown;
10633
+ };
10634
+ content: {
10635
+ "application/json": components["schemas"]["WorkspaceInputs"];
10636
+ };
10637
+ };
10638
+ /** @description Default Response */
10639
+ "4XX": {
10640
+ headers: {
10641
+ [name: string]: unknown;
10642
+ };
10643
+ content: {
10644
+ "application/json": components["schemas"]["ErrorBody"];
10645
+ };
10646
+ };
10647
+ /** @description Default Response */
10648
+ "5XX": {
10649
+ headers: {
10650
+ [name: string]: unknown;
10651
+ };
10652
+ content: {
10653
+ "application/json": components["schemas"]["ErrorBody"];
10654
+ };
10655
+ };
10656
+ };
10657
+ };
9622
10658
  putApiV1WorkspacesWorkspaceIdIdlePolicy: {
9623
10659
  parameters: {
9624
10660
  query?: never;
@@ -11333,6 +12369,7 @@ export interface operations {
11333
12369
  rootfs_sha256: string | null;
11334
12370
  } | null;
11335
12371
  defaults: components["schemas"]["TemplateDefaults"];
12372
+ settings: components["schemas"]["TemplateSettings"];
11336
12373
  files: components["schemas"]["TemplateFilesSummary"];
11337
12374
  rootfs_bytes: number | null;
11338
12375
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11377,6 +12414,7 @@ export interface operations {
11377
12414
  created_at: string;
11378
12415
  } | null;
11379
12416
  update_policy: components["schemas"]["UpdatePolicy"];
12417
+ category: ("os" | "stack") | null;
11380
12418
  }[];
11381
12419
  next_cursor: string | null;
11382
12420
  };
@@ -11543,6 +12581,7 @@ export interface operations {
11543
12581
  rootfs_sha256: string | null;
11544
12582
  } | null;
11545
12583
  defaults: components["schemas"]["TemplateDefaults"];
12584
+ settings: components["schemas"]["TemplateSettings"];
11546
12585
  files: components["schemas"]["TemplateFilesSummary"];
11547
12586
  rootfs_bytes: number | null;
11548
12587
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11587,6 +12626,7 @@ export interface operations {
11587
12626
  created_at: string;
11588
12627
  } | null;
11589
12628
  update_policy: components["schemas"]["UpdatePolicy"];
12629
+ category: ("os" | "stack") | null;
11590
12630
  plan: {
11591
12631
  plan_key: string;
11592
12632
  catalog_version: string;
@@ -11700,6 +12740,7 @@ export interface operations {
11700
12740
  rootfs_sha256: string | null;
11701
12741
  } | null;
11702
12742
  defaults: components["schemas"]["TemplateDefaults"];
12743
+ settings: components["schemas"]["TemplateSettings"];
11703
12744
  files: components["schemas"]["TemplateFilesSummary"];
11704
12745
  rootfs_bytes: number | null;
11705
12746
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11877,6 +12918,7 @@ export interface operations {
11877
12918
  rootfs_sha256: string | null;
11878
12919
  } | null;
11879
12920
  defaults: components["schemas"]["TemplateDefaults"];
12921
+ settings: components["schemas"]["TemplateSettings"];
11880
12922
  files: components["schemas"]["TemplateFilesSummary"];
11881
12923
  rootfs_bytes: number | null;
11882
12924
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11921,6 +12963,7 @@ export interface operations {
11921
12963
  created_at: string;
11922
12964
  } | null;
11923
12965
  update_policy: components["schemas"]["UpdatePolicy"];
12966
+ category: ("os" | "stack") | null;
11924
12967
  }[];
11925
12968
  next_cursor: string | null;
11926
12969
  };
@@ -12085,6 +13128,7 @@ export interface operations {
12085
13128
  rootfs_sha256: string | null;
12086
13129
  } | null;
12087
13130
  defaults: components["schemas"]["TemplateDefaults"];
13131
+ settings: components["schemas"]["TemplateSettings"];
12088
13132
  files: components["schemas"]["TemplateFilesSummary"];
12089
13133
  rootfs_bytes: number | null;
12090
13134
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -12129,6 +13173,7 @@ export interface operations {
12129
13173
  created_at: string;
12130
13174
  } | null;
12131
13175
  update_policy: components["schemas"]["UpdatePolicy"];
13176
+ category: ("os" | "stack") | null;
12132
13177
  plan: {
12133
13178
  plan_key: string;
12134
13179
  catalog_version: string;
@@ -12242,6 +13287,7 @@ export interface operations {
12242
13287
  rootfs_sha256: string | null;
12243
13288
  } | null;
12244
13289
  defaults: components["schemas"]["TemplateDefaults"];
13290
+ settings: components["schemas"]["TemplateSettings"];
12245
13291
  files: components["schemas"]["TemplateFilesSummary"];
12246
13292
  rootfs_bytes: number | null;
12247
13293
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -12416,11 +13462,14 @@ export interface operations {
12416
13462
  /** @enum {string} */
12417
13463
  timeout_seconds: "request" | "plan" | "platform";
12418
13464
  };
13465
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12419
13466
  network: {
12420
13467
  /** @enum {string} */
12421
13468
  mode: "none" | "egress_allowlist";
12422
13469
  allow_hosts: string[];
12423
13470
  };
13471
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
13472
+ denied_hosts: string[];
12424
13473
  provenance: {
12425
13474
  recipe_schema: string | null;
12426
13475
  recipe_sha256: string | null;
@@ -12428,9 +13477,81 @@ export interface operations {
12428
13477
  builder_id: string | null;
12429
13478
  attempt: number;
12430
13479
  };
12431
- /** @description Only on GET of one build. */
13480
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12432
13481
  recipe?: {
12433
13482
  dockerfile: string;
13483
+ } | {
13484
+ /** @enum {string} */
13485
+ schema: "shardflux.template-recipe.v2";
13486
+ build: {
13487
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
13488
+ languages: {
13489
+ id: string;
13490
+ version: string;
13491
+ /** @enum {string} */
13492
+ source: "install" | "base";
13493
+ url: string | null;
13494
+ sha256: string | null;
13495
+ }[];
13496
+ packages: {
13497
+ apt: string[];
13498
+ pip: {
13499
+ packages: string[];
13500
+ requirements: string[];
13501
+ };
13502
+ npm: string[];
13503
+ };
13504
+ files: {
13505
+ upload: string;
13506
+ /** @enum {string} */
13507
+ kind: "file" | "tar";
13508
+ to: string;
13509
+ owner: string;
13510
+ mode: string | null;
13511
+ size: number;
13512
+ }[];
13513
+ steps: {
13514
+ name: string;
13515
+ run: string;
13516
+ user: string;
13517
+ cwd: string | null;
13518
+ env: {
13519
+ [key: string]: string;
13520
+ };
13521
+ }[];
13522
+ network: {
13523
+ /** @enum {string} */
13524
+ build: "auto" | "none" | "allowlist";
13525
+ extra_hosts: string[];
13526
+ allow_hosts: string[];
13527
+ };
13528
+ };
13529
+ settings: components["schemas"]["TemplateSettings"];
13530
+ compiled: {
13531
+ compiler: string;
13532
+ language_table_sha256: string;
13533
+ build_env: {
13534
+ [key: string]: string;
13535
+ };
13536
+ steps: {
13537
+ [key: string]: unknown;
13538
+ }[];
13539
+ tools: {
13540
+ name: string;
13541
+ argv: string[];
13542
+ }[];
13543
+ network: {
13544
+ /** @enum {string} */
13545
+ mode: "none" | "egress_allowlist";
13546
+ allow_hosts: string[];
13547
+ };
13548
+ objects: {
13549
+ sha256: string;
13550
+ size: number;
13551
+ /** @enum {string} */
13552
+ kind: "file" | "tar";
13553
+ }[];
13554
+ };
12434
13555
  };
12435
13556
  result: {
12436
13557
  artifact_sha256: string | null;
@@ -12478,7 +13599,7 @@ export interface operations {
12478
13599
  last_heartbeat_at: string | null;
12479
13600
  };
12480
13601
  /**
12481
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
13602
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12482
13603
  * @enum {string}
12483
13604
  */
12484
13605
  source_kind: "recipe" | "workspace";
@@ -12531,7 +13652,7 @@ export interface operations {
12531
13652
  requestBody: {
12532
13653
  content: {
12533
13654
  "application/json": {
12534
- /** @description Organization template to build into (created by the first build). Platform slugs are refused. */
13655
+ /** @description Organization template to build into (created by the first build). Platform slugs and the reserved slugs new and edit are refused for new templates. */
12535
13656
  template_slug: string;
12536
13657
  /**
12537
13658
  * @description Publish the produced version as soon as it is registered (new workspaces of the slug then use it). false: it stays unpublished until an owner/admin publishes it.
@@ -12540,33 +13661,12 @@ export interface operations {
12540
13661
  auto_publish?: boolean;
12541
13662
  /** @description Template name when this build creates the template. */
12542
13663
  display_name?: string;
12543
- recipe: {
12544
- /** @description `<template slug>@<version>`: a published, non-archived version this organization can use (its own templates first, then platform). Referenced as `FROM shardflux-base`. */
12545
- base: string;
12546
- /** @description Dockerfile in the builder dialect (<= 64 KiB UTF-8): exactly one `FROM shardflux-base` (or `FROM shardflux-base:<recipe.base>`) first (ARG may precede it), then RUN (shell or JSON exec form, no flags or heredocs), ENV, ARG, WORKDIR, USER; LABEL, EXPOSE, CMD, ENTRYPOINT, MAINTAINER, STOPSIGNAL are recorded only. No COPY/ADD (no build context), no multi-stage or external images, at most 128 steps. Refusals are 422 with details.reason and line. */
12547
- dockerfile: string;
12548
- /**
12549
- * @default x86_64
12550
- * @enum {string}
12551
- */
12552
- architecture?: "x86_64";
12553
- /** @description Builder VM bounds (the host builder’s ranges); clamped to the plan’s per-workspace limits (absent = the plan limit); timeout default 1800 s, maximum 3600 s. */
12554
- resources?: {
12555
- /** @description Builder range 500-16000. */
12556
- cpu_millis?: number;
12557
- /** @description Builder range 512-32768, even. */
12558
- memory_mib?: number;
12559
- /** @description Builder maximum 200. */
12560
- disk_gib?: number;
12561
- timeout_seconds?: number;
12562
- };
12563
- /** @description Build network: none (default) or egress to the listed DNS names (example.com, *.example.com). */
12564
- network?: {
12565
- /** @enum {string} */
12566
- mode: "none" | "egress_allowlist";
12567
- allow_hosts?: string[];
12568
- };
12569
- };
13664
+ /** @description Recipe v1 (TemplateRecipeV1: a Dockerfile, no `schema` field) or recipe v2 (TemplateRecipeV2, `schema: "shardflux.template-recipe.v2"`: languages, packages, uploaded files, build steps, auto network and settings; contracts §24.1). */
13665
+ recipe: components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"];
13666
+ /** @description The version description (manifest `description`). */
13667
+ description?: string;
13668
+ /** @description Recipe v2 only: up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
13669
+ acknowledged_scan_findings?: string[];
12570
13670
  };
12571
13671
  };
12572
13672
  };
@@ -12688,11 +13788,14 @@ export interface operations {
12688
13788
  /** @enum {string} */
12689
13789
  timeout_seconds: "request" | "plan" | "platform";
12690
13790
  };
13791
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12691
13792
  network: {
12692
13793
  /** @enum {string} */
12693
13794
  mode: "none" | "egress_allowlist";
12694
13795
  allow_hosts: string[];
12695
13796
  };
13797
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
13798
+ denied_hosts: string[];
12696
13799
  provenance: {
12697
13800
  recipe_schema: string | null;
12698
13801
  recipe_sha256: string | null;
@@ -12700,9 +13803,81 @@ export interface operations {
12700
13803
  builder_id: string | null;
12701
13804
  attempt: number;
12702
13805
  };
12703
- /** @description Only on GET of one build. */
13806
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12704
13807
  recipe?: {
12705
13808
  dockerfile: string;
13809
+ } | {
13810
+ /** @enum {string} */
13811
+ schema: "shardflux.template-recipe.v2";
13812
+ build: {
13813
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
13814
+ languages: {
13815
+ id: string;
13816
+ version: string;
13817
+ /** @enum {string} */
13818
+ source: "install" | "base";
13819
+ url: string | null;
13820
+ sha256: string | null;
13821
+ }[];
13822
+ packages: {
13823
+ apt: string[];
13824
+ pip: {
13825
+ packages: string[];
13826
+ requirements: string[];
13827
+ };
13828
+ npm: string[];
13829
+ };
13830
+ files: {
13831
+ upload: string;
13832
+ /** @enum {string} */
13833
+ kind: "file" | "tar";
13834
+ to: string;
13835
+ owner: string;
13836
+ mode: string | null;
13837
+ size: number;
13838
+ }[];
13839
+ steps: {
13840
+ name: string;
13841
+ run: string;
13842
+ user: string;
13843
+ cwd: string | null;
13844
+ env: {
13845
+ [key: string]: string;
13846
+ };
13847
+ }[];
13848
+ network: {
13849
+ /** @enum {string} */
13850
+ build: "auto" | "none" | "allowlist";
13851
+ extra_hosts: string[];
13852
+ allow_hosts: string[];
13853
+ };
13854
+ };
13855
+ settings: components["schemas"]["TemplateSettings"];
13856
+ compiled: {
13857
+ compiler: string;
13858
+ language_table_sha256: string;
13859
+ build_env: {
13860
+ [key: string]: string;
13861
+ };
13862
+ steps: {
13863
+ [key: string]: unknown;
13864
+ }[];
13865
+ tools: {
13866
+ name: string;
13867
+ argv: string[];
13868
+ }[];
13869
+ network: {
13870
+ /** @enum {string} */
13871
+ mode: "none" | "egress_allowlist";
13872
+ allow_hosts: string[];
13873
+ };
13874
+ objects: {
13875
+ sha256: string;
13876
+ size: number;
13877
+ /** @enum {string} */
13878
+ kind: "file" | "tar";
13879
+ }[];
13880
+ };
12706
13881
  };
12707
13882
  result: {
12708
13883
  artifact_sha256: string | null;
@@ -12750,7 +13925,7 @@ export interface operations {
12750
13925
  last_heartbeat_at: string | null;
12751
13926
  };
12752
13927
  /**
12753
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
13928
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12754
13929
  * @enum {string}
12755
13930
  */
12756
13931
  source_kind: "recipe" | "workspace";
@@ -12922,11 +14097,14 @@ export interface operations {
12922
14097
  /** @enum {string} */
12923
14098
  timeout_seconds: "request" | "plan" | "platform";
12924
14099
  };
14100
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12925
14101
  network: {
12926
14102
  /** @enum {string} */
12927
14103
  mode: "none" | "egress_allowlist";
12928
14104
  allow_hosts: string[];
12929
14105
  };
14106
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
14107
+ denied_hosts: string[];
12930
14108
  provenance: {
12931
14109
  recipe_schema: string | null;
12932
14110
  recipe_sha256: string | null;
@@ -12934,9 +14112,81 @@ export interface operations {
12934
14112
  builder_id: string | null;
12935
14113
  attempt: number;
12936
14114
  };
12937
- /** @description Only on GET of one build. */
14115
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12938
14116
  recipe?: {
12939
14117
  dockerfile: string;
14118
+ } | {
14119
+ /** @enum {string} */
14120
+ schema: "shardflux.template-recipe.v2";
14121
+ build: {
14122
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14123
+ languages: {
14124
+ id: string;
14125
+ version: string;
14126
+ /** @enum {string} */
14127
+ source: "install" | "base";
14128
+ url: string | null;
14129
+ sha256: string | null;
14130
+ }[];
14131
+ packages: {
14132
+ apt: string[];
14133
+ pip: {
14134
+ packages: string[];
14135
+ requirements: string[];
14136
+ };
14137
+ npm: string[];
14138
+ };
14139
+ files: {
14140
+ upload: string;
14141
+ /** @enum {string} */
14142
+ kind: "file" | "tar";
14143
+ to: string;
14144
+ owner: string;
14145
+ mode: string | null;
14146
+ size: number;
14147
+ }[];
14148
+ steps: {
14149
+ name: string;
14150
+ run: string;
14151
+ user: string;
14152
+ cwd: string | null;
14153
+ env: {
14154
+ [key: string]: string;
14155
+ };
14156
+ }[];
14157
+ network: {
14158
+ /** @enum {string} */
14159
+ build: "auto" | "none" | "allowlist";
14160
+ extra_hosts: string[];
14161
+ allow_hosts: string[];
14162
+ };
14163
+ };
14164
+ settings: components["schemas"]["TemplateSettings"];
14165
+ compiled: {
14166
+ compiler: string;
14167
+ language_table_sha256: string;
14168
+ build_env: {
14169
+ [key: string]: string;
14170
+ };
14171
+ steps: {
14172
+ [key: string]: unknown;
14173
+ }[];
14174
+ tools: {
14175
+ name: string;
14176
+ argv: string[];
14177
+ }[];
14178
+ network: {
14179
+ /** @enum {string} */
14180
+ mode: "none" | "egress_allowlist";
14181
+ allow_hosts: string[];
14182
+ };
14183
+ objects: {
14184
+ sha256: string;
14185
+ size: number;
14186
+ /** @enum {string} */
14187
+ kind: "file" | "tar";
14188
+ }[];
14189
+ };
12940
14190
  };
12941
14191
  result: {
12942
14192
  artifact_sha256: string | null;
@@ -12984,7 +14234,7 @@ export interface operations {
12984
14234
  last_heartbeat_at: string | null;
12985
14235
  };
12986
14236
  /**
12987
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14237
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12988
14238
  * @enum {string}
12989
14239
  */
12990
14240
  source_kind: "recipe" | "workspace";
@@ -13153,11 +14403,14 @@ export interface operations {
13153
14403
  /** @enum {string} */
13154
14404
  timeout_seconds: "request" | "plan" | "platform";
13155
14405
  };
14406
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
13156
14407
  network: {
13157
14408
  /** @enum {string} */
13158
14409
  mode: "none" | "egress_allowlist";
13159
14410
  allow_hosts: string[];
13160
14411
  };
14412
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
14413
+ denied_hosts: string[];
13161
14414
  provenance: {
13162
14415
  recipe_schema: string | null;
13163
14416
  recipe_sha256: string | null;
@@ -13165,9 +14418,81 @@ export interface operations {
13165
14418
  builder_id: string | null;
13166
14419
  attempt: number;
13167
14420
  };
13168
- /** @description Only on GET of one build. */
14421
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
13169
14422
  recipe?: {
13170
14423
  dockerfile: string;
14424
+ } | {
14425
+ /** @enum {string} */
14426
+ schema: "shardflux.template-recipe.v2";
14427
+ build: {
14428
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14429
+ languages: {
14430
+ id: string;
14431
+ version: string;
14432
+ /** @enum {string} */
14433
+ source: "install" | "base";
14434
+ url: string | null;
14435
+ sha256: string | null;
14436
+ }[];
14437
+ packages: {
14438
+ apt: string[];
14439
+ pip: {
14440
+ packages: string[];
14441
+ requirements: string[];
14442
+ };
14443
+ npm: string[];
14444
+ };
14445
+ files: {
14446
+ upload: string;
14447
+ /** @enum {string} */
14448
+ kind: "file" | "tar";
14449
+ to: string;
14450
+ owner: string;
14451
+ mode: string | null;
14452
+ size: number;
14453
+ }[];
14454
+ steps: {
14455
+ name: string;
14456
+ run: string;
14457
+ user: string;
14458
+ cwd: string | null;
14459
+ env: {
14460
+ [key: string]: string;
14461
+ };
14462
+ }[];
14463
+ network: {
14464
+ /** @enum {string} */
14465
+ build: "auto" | "none" | "allowlist";
14466
+ extra_hosts: string[];
14467
+ allow_hosts: string[];
14468
+ };
14469
+ };
14470
+ settings: components["schemas"]["TemplateSettings"];
14471
+ compiled: {
14472
+ compiler: string;
14473
+ language_table_sha256: string;
14474
+ build_env: {
14475
+ [key: string]: string;
14476
+ };
14477
+ steps: {
14478
+ [key: string]: unknown;
14479
+ }[];
14480
+ tools: {
14481
+ name: string;
14482
+ argv: string[];
14483
+ }[];
14484
+ network: {
14485
+ /** @enum {string} */
14486
+ mode: "none" | "egress_allowlist";
14487
+ allow_hosts: string[];
14488
+ };
14489
+ objects: {
14490
+ sha256: string;
14491
+ size: number;
14492
+ /** @enum {string} */
14493
+ kind: "file" | "tar";
14494
+ }[];
14495
+ };
13171
14496
  };
13172
14497
  result: {
13173
14498
  artifact_sha256: string | null;
@@ -13215,7 +14540,7 @@ export interface operations {
13215
14540
  last_heartbeat_at: string | null;
13216
14541
  };
13217
14542
  /**
13218
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14543
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
13219
14544
  * @enum {string}
13220
14545
  */
13221
14546
  source_kind: "recipe" | "workspace";
@@ -13350,11 +14675,14 @@ export interface operations {
13350
14675
  /** @enum {string} */
13351
14676
  timeout_seconds: "request" | "plan" | "platform";
13352
14677
  };
14678
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
13353
14679
  network: {
13354
14680
  /** @enum {string} */
13355
14681
  mode: "none" | "egress_allowlist";
13356
14682
  allow_hosts: string[];
13357
14683
  };
14684
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
14685
+ denied_hosts: string[];
13358
14686
  provenance: {
13359
14687
  recipe_schema: string | null;
13360
14688
  recipe_sha256: string | null;
@@ -13362,9 +14690,81 @@ export interface operations {
13362
14690
  builder_id: string | null;
13363
14691
  attempt: number;
13364
14692
  };
13365
- /** @description Only on GET of one build. */
14693
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
13366
14694
  recipe?: {
13367
14695
  dockerfile: string;
14696
+ } | {
14697
+ /** @enum {string} */
14698
+ schema: "shardflux.template-recipe.v2";
14699
+ build: {
14700
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14701
+ languages: {
14702
+ id: string;
14703
+ version: string;
14704
+ /** @enum {string} */
14705
+ source: "install" | "base";
14706
+ url: string | null;
14707
+ sha256: string | null;
14708
+ }[];
14709
+ packages: {
14710
+ apt: string[];
14711
+ pip: {
14712
+ packages: string[];
14713
+ requirements: string[];
14714
+ };
14715
+ npm: string[];
14716
+ };
14717
+ files: {
14718
+ upload: string;
14719
+ /** @enum {string} */
14720
+ kind: "file" | "tar";
14721
+ to: string;
14722
+ owner: string;
14723
+ mode: string | null;
14724
+ size: number;
14725
+ }[];
14726
+ steps: {
14727
+ name: string;
14728
+ run: string;
14729
+ user: string;
14730
+ cwd: string | null;
14731
+ env: {
14732
+ [key: string]: string;
14733
+ };
14734
+ }[];
14735
+ network: {
14736
+ /** @enum {string} */
14737
+ build: "auto" | "none" | "allowlist";
14738
+ extra_hosts: string[];
14739
+ allow_hosts: string[];
14740
+ };
14741
+ };
14742
+ settings: components["schemas"]["TemplateSettings"];
14743
+ compiled: {
14744
+ compiler: string;
14745
+ language_table_sha256: string;
14746
+ build_env: {
14747
+ [key: string]: string;
14748
+ };
14749
+ steps: {
14750
+ [key: string]: unknown;
14751
+ }[];
14752
+ tools: {
14753
+ name: string;
14754
+ argv: string[];
14755
+ }[];
14756
+ network: {
14757
+ /** @enum {string} */
14758
+ mode: "none" | "egress_allowlist";
14759
+ allow_hosts: string[];
14760
+ };
14761
+ objects: {
14762
+ sha256: string;
14763
+ size: number;
14764
+ /** @enum {string} */
14765
+ kind: "file" | "tar";
14766
+ }[];
14767
+ };
13368
14768
  };
13369
14769
  result: {
13370
14770
  artifact_sha256: string | null;
@@ -13412,7 +14812,7 @@ export interface operations {
13412
14812
  last_heartbeat_at: string | null;
13413
14813
  };
13414
14814
  /**
13415
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14815
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
13416
14816
  * @enum {string}
13417
14817
  */
13418
14818
  source_kind: "recipe" | "workspace";
@@ -13450,16 +14850,396 @@ export interface operations {
13450
14850
  };
13451
14851
  };
13452
14852
  };
13453
- getV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
14853
+ getV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
14854
+ parameters: {
14855
+ query?: never;
14856
+ header?: never;
14857
+ path: {
14858
+ /** @description UUIDv7, lowercase canonical form. */
14859
+ organization_id: string;
14860
+ /** @description UUIDv7, lowercase canonical form. */
14861
+ build_id: string;
14862
+ };
14863
+ cookie?: never;
14864
+ };
14865
+ requestBody?: never;
14866
+ responses: {
14867
+ /** @description Default Response */
14868
+ 200: {
14869
+ headers: {
14870
+ [name: string]: unknown;
14871
+ };
14872
+ content: {
14873
+ "application/json": {
14874
+ /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
14875
+ url: string;
14876
+ /** Format: date-time */
14877
+ expires_at: string;
14878
+ /** @description `builds/<build_id>.log`. */
14879
+ object_key: string;
14880
+ bytes: number | null;
14881
+ sha256: string | null;
14882
+ };
14883
+ };
14884
+ };
14885
+ /** @description Default Response */
14886
+ "4XX": {
14887
+ headers: {
14888
+ [name: string]: unknown;
14889
+ };
14890
+ content: {
14891
+ "application/json": components["schemas"]["ErrorBody"];
14892
+ };
14893
+ };
14894
+ /** @description Default Response */
14895
+ "5XX": {
14896
+ headers: {
14897
+ [name: string]: unknown;
14898
+ };
14899
+ content: {
14900
+ "application/json": components["schemas"]["ErrorBody"];
14901
+ };
14902
+ };
14903
+ };
14904
+ };
14905
+ postV1OrganizationsOrganizationIdTemplateUploads: {
14906
+ parameters: {
14907
+ query?: never;
14908
+ header?: never;
14909
+ path: {
14910
+ /** @description UUIDv7, lowercase canonical form. */
14911
+ organization_id: string;
14912
+ };
14913
+ cookie?: never;
14914
+ };
14915
+ requestBody: {
14916
+ content: {
14917
+ "application/json": components["schemas"]["TemplateUploadRequest"];
14918
+ };
14919
+ };
14920
+ responses: {
14921
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14922
+ 200: {
14923
+ headers: {
14924
+ [name: string]: unknown;
14925
+ };
14926
+ content: {
14927
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14928
+ };
14929
+ };
14930
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14931
+ 201: {
14932
+ headers: {
14933
+ [name: string]: unknown;
14934
+ };
14935
+ content: {
14936
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14937
+ };
14938
+ };
14939
+ /** @description Default Response */
14940
+ "4XX": {
14941
+ headers: {
14942
+ [name: string]: unknown;
14943
+ };
14944
+ content: {
14945
+ "application/json": components["schemas"]["ErrorBody"];
14946
+ };
14947
+ };
14948
+ /** @description Default Response */
14949
+ "5XX": {
14950
+ headers: {
14951
+ [name: string]: unknown;
14952
+ };
14953
+ content: {
14954
+ "application/json": components["schemas"]["ErrorBody"];
14955
+ };
14956
+ };
14957
+ };
14958
+ };
14959
+ postV1TemplateUploads: {
14960
+ parameters: {
14961
+ query?: never;
14962
+ header?: never;
14963
+ path?: never;
14964
+ cookie?: never;
14965
+ };
14966
+ requestBody: {
14967
+ content: {
14968
+ "application/json": components["schemas"]["TemplateUploadRequest"];
14969
+ };
14970
+ };
14971
+ responses: {
14972
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14973
+ 200: {
14974
+ headers: {
14975
+ [name: string]: unknown;
14976
+ };
14977
+ content: {
14978
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14979
+ };
14980
+ };
14981
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14982
+ 201: {
14983
+ headers: {
14984
+ [name: string]: unknown;
14985
+ };
14986
+ content: {
14987
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14988
+ };
14989
+ };
14990
+ /** @description Default Response */
14991
+ "4XX": {
14992
+ headers: {
14993
+ [name: string]: unknown;
14994
+ };
14995
+ content: {
14996
+ "application/json": components["schemas"]["ErrorBody"];
14997
+ };
14998
+ };
14999
+ /** @description Default Response */
15000
+ "5XX": {
15001
+ headers: {
15002
+ [name: string]: unknown;
15003
+ };
15004
+ content: {
15005
+ "application/json": components["schemas"]["ErrorBody"];
15006
+ };
15007
+ };
15008
+ };
15009
+ };
15010
+ getV1OrganizationsOrganizationIdTemplatePackages: {
15011
+ parameters: {
15012
+ query: {
15013
+ ecosystem: "apt" | "pip" | "npm";
15014
+ q: string;
15015
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15016
+ base?: string;
15017
+ limit?: number;
15018
+ };
15019
+ header?: never;
15020
+ path: {
15021
+ /** @description UUIDv7, lowercase canonical form. */
15022
+ organization_id: string;
15023
+ };
15024
+ cookie?: never;
15025
+ };
15026
+ requestBody?: never;
15027
+ responses: {
15028
+ /** @description Default Response */
15029
+ 200: {
15030
+ headers: {
15031
+ [name: string]: unknown;
15032
+ };
15033
+ content: {
15034
+ "application/json": components["schemas"]["TemplatePackagePage"];
15035
+ };
15036
+ };
15037
+ /** @description Default Response */
15038
+ "4XX": {
15039
+ headers: {
15040
+ [name: string]: unknown;
15041
+ };
15042
+ content: {
15043
+ "application/json": components["schemas"]["ErrorBody"];
15044
+ };
15045
+ };
15046
+ /** @description Default Response */
15047
+ "5XX": {
15048
+ headers: {
15049
+ [name: string]: unknown;
15050
+ };
15051
+ content: {
15052
+ "application/json": components["schemas"]["ErrorBody"];
15053
+ };
15054
+ };
15055
+ };
15056
+ };
15057
+ getV1OrganizationsOrganizationIdTemplatePackagesEcosystemName: {
15058
+ parameters: {
15059
+ query?: {
15060
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15061
+ base?: string;
15062
+ };
15063
+ header?: never;
15064
+ path: {
15065
+ /** @description UUIDv7, lowercase canonical form. */
15066
+ organization_id: string;
15067
+ ecosystem: "apt" | "pip" | "npm";
15068
+ name: string;
15069
+ };
15070
+ cookie?: never;
15071
+ };
15072
+ requestBody?: never;
15073
+ responses: {
15074
+ /** @description Default Response */
15075
+ 200: {
15076
+ headers: {
15077
+ [name: string]: unknown;
15078
+ };
15079
+ content: {
15080
+ "application/json": components["schemas"]["TemplatePackage"];
15081
+ };
15082
+ };
15083
+ /** @description Default Response */
15084
+ "4XX": {
15085
+ headers: {
15086
+ [name: string]: unknown;
15087
+ };
15088
+ content: {
15089
+ "application/json": components["schemas"]["ErrorBody"];
15090
+ };
15091
+ };
15092
+ /** @description Default Response */
15093
+ "5XX": {
15094
+ headers: {
15095
+ [name: string]: unknown;
15096
+ };
15097
+ content: {
15098
+ "application/json": components["schemas"]["ErrorBody"];
15099
+ };
15100
+ };
15101
+ };
15102
+ };
15103
+ getV1TemplatePackages: {
15104
+ parameters: {
15105
+ query: {
15106
+ ecosystem: "apt" | "pip" | "npm";
15107
+ q: string;
15108
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15109
+ base?: string;
15110
+ limit?: number;
15111
+ };
15112
+ header?: never;
15113
+ path?: never;
15114
+ cookie?: never;
15115
+ };
15116
+ requestBody?: never;
15117
+ responses: {
15118
+ /** @description Default Response */
15119
+ 200: {
15120
+ headers: {
15121
+ [name: string]: unknown;
15122
+ };
15123
+ content: {
15124
+ "application/json": components["schemas"]["TemplatePackagePage"];
15125
+ };
15126
+ };
15127
+ /** @description Default Response */
15128
+ "4XX": {
15129
+ headers: {
15130
+ [name: string]: unknown;
15131
+ };
15132
+ content: {
15133
+ "application/json": components["schemas"]["ErrorBody"];
15134
+ };
15135
+ };
15136
+ /** @description Default Response */
15137
+ "5XX": {
15138
+ headers: {
15139
+ [name: string]: unknown;
15140
+ };
15141
+ content: {
15142
+ "application/json": components["schemas"]["ErrorBody"];
15143
+ };
15144
+ };
15145
+ };
15146
+ };
15147
+ getV1TemplatePackagesEcosystemName: {
15148
+ parameters: {
15149
+ query?: {
15150
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15151
+ base?: string;
15152
+ };
15153
+ header?: never;
15154
+ path: {
15155
+ ecosystem: "apt" | "pip" | "npm";
15156
+ name: string;
15157
+ };
15158
+ cookie?: never;
15159
+ };
15160
+ requestBody?: never;
15161
+ responses: {
15162
+ /** @description Default Response */
15163
+ 200: {
15164
+ headers: {
15165
+ [name: string]: unknown;
15166
+ };
15167
+ content: {
15168
+ "application/json": components["schemas"]["TemplatePackage"];
15169
+ };
15170
+ };
15171
+ /** @description Default Response */
15172
+ "4XX": {
15173
+ headers: {
15174
+ [name: string]: unknown;
15175
+ };
15176
+ content: {
15177
+ "application/json": components["schemas"]["ErrorBody"];
15178
+ };
15179
+ };
15180
+ /** @description Default Response */
15181
+ "5XX": {
15182
+ headers: {
15183
+ [name: string]: unknown;
15184
+ };
15185
+ content: {
15186
+ "application/json": components["schemas"]["ErrorBody"];
15187
+ };
15188
+ };
15189
+ };
15190
+ };
15191
+ getV1OrganizationsOrganizationIdTemplateLanguages: {
15192
+ parameters: {
15193
+ query: {
15194
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15195
+ base: string;
15196
+ };
15197
+ header?: never;
15198
+ path: {
15199
+ /** @description UUIDv7, lowercase canonical form. */
15200
+ organization_id: string;
15201
+ };
15202
+ cookie?: never;
15203
+ };
15204
+ requestBody?: never;
15205
+ responses: {
15206
+ /** @description Default Response */
15207
+ 200: {
15208
+ headers: {
15209
+ [name: string]: unknown;
15210
+ };
15211
+ content: {
15212
+ "application/json": components["schemas"]["TemplateLanguages"];
15213
+ };
15214
+ };
15215
+ /** @description Default Response */
15216
+ "4XX": {
15217
+ headers: {
15218
+ [name: string]: unknown;
15219
+ };
15220
+ content: {
15221
+ "application/json": components["schemas"]["ErrorBody"];
15222
+ };
15223
+ };
15224
+ /** @description Default Response */
15225
+ "5XX": {
15226
+ headers: {
15227
+ [name: string]: unknown;
15228
+ };
15229
+ content: {
15230
+ "application/json": components["schemas"]["ErrorBody"];
15231
+ };
15232
+ };
15233
+ };
15234
+ };
15235
+ getV1TemplateLanguages: {
13454
15236
  parameters: {
13455
- query?: never;
13456
- header?: never;
13457
- path: {
13458
- /** @description UUIDv7, lowercase canonical form. */
13459
- organization_id: string;
13460
- /** @description UUIDv7, lowercase canonical form. */
13461
- build_id: string;
15237
+ query: {
15238
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15239
+ base: string;
13462
15240
  };
15241
+ header?: never;
15242
+ path?: never;
13463
15243
  cookie?: never;
13464
15244
  };
13465
15245
  requestBody?: never;
@@ -13470,16 +15250,7 @@ export interface operations {
13470
15250
  [name: string]: unknown;
13471
15251
  };
13472
15252
  content: {
13473
- "application/json": {
13474
- /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
13475
- url: string;
13476
- /** Format: date-time */
13477
- expires_at: string;
13478
- /** @description `builds/<build_id>.log`. */
13479
- object_key: string;
13480
- bytes: number | null;
13481
- sha256: string | null;
13482
- };
15253
+ "application/json": components["schemas"]["TemplateLanguages"];
13483
15254
  };
13484
15255
  };
13485
15256
  /** @description Default Response */
@@ -13691,6 +15462,7 @@ export interface operations {
13691
15462
  rootfs_sha256: string | null;
13692
15463
  } | null;
13693
15464
  defaults: components["schemas"]["TemplateDefaults"];
15465
+ settings: components["schemas"]["TemplateSettings"];
13694
15466
  files: components["schemas"]["TemplateFilesSummary"];
13695
15467
  rootfs_bytes: number | null;
13696
15468
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -13735,6 +15507,7 @@ export interface operations {
13735
15507
  created_at: string;
13736
15508
  } | null;
13737
15509
  update_policy: components["schemas"]["UpdatePolicy"];
15510
+ category: ("os" | "stack") | null;
13738
15511
  }[];
13739
15512
  next_cursor: string | null;
13740
15513
  };
@@ -13901,6 +15674,7 @@ export interface operations {
13901
15674
  rootfs_sha256: string | null;
13902
15675
  } | null;
13903
15676
  defaults: components["schemas"]["TemplateDefaults"];
15677
+ settings: components["schemas"]["TemplateSettings"];
13904
15678
  files: components["schemas"]["TemplateFilesSummary"];
13905
15679
  rootfs_bytes: number | null;
13906
15680
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -13945,6 +15719,7 @@ export interface operations {
13945
15719
  created_at: string;
13946
15720
  } | null;
13947
15721
  update_policy: components["schemas"]["UpdatePolicy"];
15722
+ category: ("os" | "stack") | null;
13948
15723
  plan: {
13949
15724
  plan_key: string;
13950
15725
  catalog_version: string;
@@ -14058,6 +15833,7 @@ export interface operations {
14058
15833
  rootfs_sha256: string | null;
14059
15834
  } | null;
14060
15835
  defaults: components["schemas"]["TemplateDefaults"];
15836
+ settings: components["schemas"]["TemplateSettings"];
14061
15837
  files: components["schemas"]["TemplateFilesSummary"];
14062
15838
  rootfs_bytes: number | null;
14063
15839
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -14232,11 +16008,14 @@ export interface operations {
14232
16008
  /** @enum {string} */
14233
16009
  timeout_seconds: "request" | "plan" | "platform";
14234
16010
  };
16011
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14235
16012
  network: {
14236
16013
  /** @enum {string} */
14237
16014
  mode: "none" | "egress_allowlist";
14238
16015
  allow_hosts: string[];
14239
16016
  };
16017
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
16018
+ denied_hosts: string[];
14240
16019
  provenance: {
14241
16020
  recipe_schema: string | null;
14242
16021
  recipe_sha256: string | null;
@@ -14244,9 +16023,81 @@ export interface operations {
14244
16023
  builder_id: string | null;
14245
16024
  attempt: number;
14246
16025
  };
14247
- /** @description Only on GET of one build. */
16026
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14248
16027
  recipe?: {
14249
16028
  dockerfile: string;
16029
+ } | {
16030
+ /** @enum {string} */
16031
+ schema: "shardflux.template-recipe.v2";
16032
+ build: {
16033
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16034
+ languages: {
16035
+ id: string;
16036
+ version: string;
16037
+ /** @enum {string} */
16038
+ source: "install" | "base";
16039
+ url: string | null;
16040
+ sha256: string | null;
16041
+ }[];
16042
+ packages: {
16043
+ apt: string[];
16044
+ pip: {
16045
+ packages: string[];
16046
+ requirements: string[];
16047
+ };
16048
+ npm: string[];
16049
+ };
16050
+ files: {
16051
+ upload: string;
16052
+ /** @enum {string} */
16053
+ kind: "file" | "tar";
16054
+ to: string;
16055
+ owner: string;
16056
+ mode: string | null;
16057
+ size: number;
16058
+ }[];
16059
+ steps: {
16060
+ name: string;
16061
+ run: string;
16062
+ user: string;
16063
+ cwd: string | null;
16064
+ env: {
16065
+ [key: string]: string;
16066
+ };
16067
+ }[];
16068
+ network: {
16069
+ /** @enum {string} */
16070
+ build: "auto" | "none" | "allowlist";
16071
+ extra_hosts: string[];
16072
+ allow_hosts: string[];
16073
+ };
16074
+ };
16075
+ settings: components["schemas"]["TemplateSettings"];
16076
+ compiled: {
16077
+ compiler: string;
16078
+ language_table_sha256: string;
16079
+ build_env: {
16080
+ [key: string]: string;
16081
+ };
16082
+ steps: {
16083
+ [key: string]: unknown;
16084
+ }[];
16085
+ tools: {
16086
+ name: string;
16087
+ argv: string[];
16088
+ }[];
16089
+ network: {
16090
+ /** @enum {string} */
16091
+ mode: "none" | "egress_allowlist";
16092
+ allow_hosts: string[];
16093
+ };
16094
+ objects: {
16095
+ sha256: string;
16096
+ size: number;
16097
+ /** @enum {string} */
16098
+ kind: "file" | "tar";
16099
+ }[];
16100
+ };
14250
16101
  };
14251
16102
  result: {
14252
16103
  artifact_sha256: string | null;
@@ -14294,7 +16145,7 @@ export interface operations {
14294
16145
  last_heartbeat_at: string | null;
14295
16146
  };
14296
16147
  /**
14297
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16148
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14298
16149
  * @enum {string}
14299
16150
  */
14300
16151
  source_kind: "recipe" | "workspace";
@@ -14347,7 +16198,7 @@ export interface operations {
14347
16198
  requestBody: {
14348
16199
  content: {
14349
16200
  "application/json": {
14350
- /** @description Organization template to build into (created by the first build). Platform slugs are refused. */
16201
+ /** @description Organization template to build into (created by the first build). Platform slugs and the reserved slugs new and edit are refused for new templates. */
14351
16202
  template_slug: string;
14352
16203
  /**
14353
16204
  * @description Publish the produced version as soon as it is registered (new workspaces of the slug then use it). false: it stays unpublished until an owner/admin publishes it.
@@ -14356,33 +16207,12 @@ export interface operations {
14356
16207
  auto_publish?: boolean;
14357
16208
  /** @description Template name when this build creates the template. */
14358
16209
  display_name?: string;
14359
- recipe: {
14360
- /** @description `<template slug>@<version>`: a published, non-archived version this organization can use (its own templates first, then platform). Referenced as `FROM shardflux-base`. */
14361
- base: string;
14362
- /** @description Dockerfile in the builder dialect (<= 64 KiB UTF-8): exactly one `FROM shardflux-base` (or `FROM shardflux-base:<recipe.base>`) first (ARG may precede it), then RUN (shell or JSON exec form, no flags or heredocs), ENV, ARG, WORKDIR, USER; LABEL, EXPOSE, CMD, ENTRYPOINT, MAINTAINER, STOPSIGNAL are recorded only. No COPY/ADD (no build context), no multi-stage or external images, at most 128 steps. Refusals are 422 with details.reason and line. */
14363
- dockerfile: string;
14364
- /**
14365
- * @default x86_64
14366
- * @enum {string}
14367
- */
14368
- architecture?: "x86_64";
14369
- /** @description Builder VM bounds (the host builder’s ranges); clamped to the plan’s per-workspace limits (absent = the plan limit); timeout default 1800 s, maximum 3600 s. */
14370
- resources?: {
14371
- /** @description Builder range 500-16000. */
14372
- cpu_millis?: number;
14373
- /** @description Builder range 512-32768, even. */
14374
- memory_mib?: number;
14375
- /** @description Builder maximum 200. */
14376
- disk_gib?: number;
14377
- timeout_seconds?: number;
14378
- };
14379
- /** @description Build network: none (default) or egress to the listed DNS names (example.com, *.example.com). */
14380
- network?: {
14381
- /** @enum {string} */
14382
- mode: "none" | "egress_allowlist";
14383
- allow_hosts?: string[];
14384
- };
14385
- };
16210
+ /** @description Recipe v1 (TemplateRecipeV1: a Dockerfile, no `schema` field) or recipe v2 (TemplateRecipeV2, `schema: "shardflux.template-recipe.v2"`: languages, packages, uploaded files, build steps, auto network and settings; contracts §24.1). */
16211
+ recipe: components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"];
16212
+ /** @description The version description (manifest `description`). */
16213
+ description?: string;
16214
+ /** @description Recipe v2 only: up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
16215
+ acknowledged_scan_findings?: string[];
14386
16216
  };
14387
16217
  };
14388
16218
  };
@@ -14504,11 +16334,14 @@ export interface operations {
14504
16334
  /** @enum {string} */
14505
16335
  timeout_seconds: "request" | "plan" | "platform";
14506
16336
  };
16337
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14507
16338
  network: {
14508
16339
  /** @enum {string} */
14509
16340
  mode: "none" | "egress_allowlist";
14510
16341
  allow_hosts: string[];
14511
16342
  };
16343
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
16344
+ denied_hosts: string[];
14512
16345
  provenance: {
14513
16346
  recipe_schema: string | null;
14514
16347
  recipe_sha256: string | null;
@@ -14516,9 +16349,81 @@ export interface operations {
14516
16349
  builder_id: string | null;
14517
16350
  attempt: number;
14518
16351
  };
14519
- /** @description Only on GET of one build. */
16352
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14520
16353
  recipe?: {
14521
16354
  dockerfile: string;
16355
+ } | {
16356
+ /** @enum {string} */
16357
+ schema: "shardflux.template-recipe.v2";
16358
+ build: {
16359
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16360
+ languages: {
16361
+ id: string;
16362
+ version: string;
16363
+ /** @enum {string} */
16364
+ source: "install" | "base";
16365
+ url: string | null;
16366
+ sha256: string | null;
16367
+ }[];
16368
+ packages: {
16369
+ apt: string[];
16370
+ pip: {
16371
+ packages: string[];
16372
+ requirements: string[];
16373
+ };
16374
+ npm: string[];
16375
+ };
16376
+ files: {
16377
+ upload: string;
16378
+ /** @enum {string} */
16379
+ kind: "file" | "tar";
16380
+ to: string;
16381
+ owner: string;
16382
+ mode: string | null;
16383
+ size: number;
16384
+ }[];
16385
+ steps: {
16386
+ name: string;
16387
+ run: string;
16388
+ user: string;
16389
+ cwd: string | null;
16390
+ env: {
16391
+ [key: string]: string;
16392
+ };
16393
+ }[];
16394
+ network: {
16395
+ /** @enum {string} */
16396
+ build: "auto" | "none" | "allowlist";
16397
+ extra_hosts: string[];
16398
+ allow_hosts: string[];
16399
+ };
16400
+ };
16401
+ settings: components["schemas"]["TemplateSettings"];
16402
+ compiled: {
16403
+ compiler: string;
16404
+ language_table_sha256: string;
16405
+ build_env: {
16406
+ [key: string]: string;
16407
+ };
16408
+ steps: {
16409
+ [key: string]: unknown;
16410
+ }[];
16411
+ tools: {
16412
+ name: string;
16413
+ argv: string[];
16414
+ }[];
16415
+ network: {
16416
+ /** @enum {string} */
16417
+ mode: "none" | "egress_allowlist";
16418
+ allow_hosts: string[];
16419
+ };
16420
+ objects: {
16421
+ sha256: string;
16422
+ size: number;
16423
+ /** @enum {string} */
16424
+ kind: "file" | "tar";
16425
+ }[];
16426
+ };
14522
16427
  };
14523
16428
  result: {
14524
16429
  artifact_sha256: string | null;
@@ -14566,7 +16471,7 @@ export interface operations {
14566
16471
  last_heartbeat_at: string | null;
14567
16472
  };
14568
16473
  /**
14569
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16474
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14570
16475
  * @enum {string}
14571
16476
  */
14572
16477
  source_kind: "recipe" | "workspace";
@@ -14738,11 +16643,14 @@ export interface operations {
14738
16643
  /** @enum {string} */
14739
16644
  timeout_seconds: "request" | "plan" | "platform";
14740
16645
  };
16646
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14741
16647
  network: {
14742
16648
  /** @enum {string} */
14743
16649
  mode: "none" | "egress_allowlist";
14744
16650
  allow_hosts: string[];
14745
16651
  };
16652
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
16653
+ denied_hosts: string[];
14746
16654
  provenance: {
14747
16655
  recipe_schema: string | null;
14748
16656
  recipe_sha256: string | null;
@@ -14750,9 +16658,81 @@ export interface operations {
14750
16658
  builder_id: string | null;
14751
16659
  attempt: number;
14752
16660
  };
14753
- /** @description Only on GET of one build. */
16661
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14754
16662
  recipe?: {
14755
16663
  dockerfile: string;
16664
+ } | {
16665
+ /** @enum {string} */
16666
+ schema: "shardflux.template-recipe.v2";
16667
+ build: {
16668
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16669
+ languages: {
16670
+ id: string;
16671
+ version: string;
16672
+ /** @enum {string} */
16673
+ source: "install" | "base";
16674
+ url: string | null;
16675
+ sha256: string | null;
16676
+ }[];
16677
+ packages: {
16678
+ apt: string[];
16679
+ pip: {
16680
+ packages: string[];
16681
+ requirements: string[];
16682
+ };
16683
+ npm: string[];
16684
+ };
16685
+ files: {
16686
+ upload: string;
16687
+ /** @enum {string} */
16688
+ kind: "file" | "tar";
16689
+ to: string;
16690
+ owner: string;
16691
+ mode: string | null;
16692
+ size: number;
16693
+ }[];
16694
+ steps: {
16695
+ name: string;
16696
+ run: string;
16697
+ user: string;
16698
+ cwd: string | null;
16699
+ env: {
16700
+ [key: string]: string;
16701
+ };
16702
+ }[];
16703
+ network: {
16704
+ /** @enum {string} */
16705
+ build: "auto" | "none" | "allowlist";
16706
+ extra_hosts: string[];
16707
+ allow_hosts: string[];
16708
+ };
16709
+ };
16710
+ settings: components["schemas"]["TemplateSettings"];
16711
+ compiled: {
16712
+ compiler: string;
16713
+ language_table_sha256: string;
16714
+ build_env: {
16715
+ [key: string]: string;
16716
+ };
16717
+ steps: {
16718
+ [key: string]: unknown;
16719
+ }[];
16720
+ tools: {
16721
+ name: string;
16722
+ argv: string[];
16723
+ }[];
16724
+ network: {
16725
+ /** @enum {string} */
16726
+ mode: "none" | "egress_allowlist";
16727
+ allow_hosts: string[];
16728
+ };
16729
+ objects: {
16730
+ sha256: string;
16731
+ size: number;
16732
+ /** @enum {string} */
16733
+ kind: "file" | "tar";
16734
+ }[];
16735
+ };
14756
16736
  };
14757
16737
  result: {
14758
16738
  artifact_sha256: string | null;
@@ -14800,7 +16780,7 @@ export interface operations {
14800
16780
  last_heartbeat_at: string | null;
14801
16781
  };
14802
16782
  /**
14803
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16783
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14804
16784
  * @enum {string}
14805
16785
  */
14806
16786
  source_kind: "recipe" | "workspace";
@@ -14969,11 +16949,14 @@ export interface operations {
14969
16949
  /** @enum {string} */
14970
16950
  timeout_seconds: "request" | "plan" | "platform";
14971
16951
  };
16952
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14972
16953
  network: {
14973
16954
  /** @enum {string} */
14974
16955
  mode: "none" | "egress_allowlist";
14975
16956
  allow_hosts: string[];
14976
16957
  };
16958
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
16959
+ denied_hosts: string[];
14977
16960
  provenance: {
14978
16961
  recipe_schema: string | null;
14979
16962
  recipe_sha256: string | null;
@@ -14981,9 +16964,81 @@ export interface operations {
14981
16964
  builder_id: string | null;
14982
16965
  attempt: number;
14983
16966
  };
14984
- /** @description Only on GET of one build. */
16967
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14985
16968
  recipe?: {
14986
16969
  dockerfile: string;
16970
+ } | {
16971
+ /** @enum {string} */
16972
+ schema: "shardflux.template-recipe.v2";
16973
+ build: {
16974
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16975
+ languages: {
16976
+ id: string;
16977
+ version: string;
16978
+ /** @enum {string} */
16979
+ source: "install" | "base";
16980
+ url: string | null;
16981
+ sha256: string | null;
16982
+ }[];
16983
+ packages: {
16984
+ apt: string[];
16985
+ pip: {
16986
+ packages: string[];
16987
+ requirements: string[];
16988
+ };
16989
+ npm: string[];
16990
+ };
16991
+ files: {
16992
+ upload: string;
16993
+ /** @enum {string} */
16994
+ kind: "file" | "tar";
16995
+ to: string;
16996
+ owner: string;
16997
+ mode: string | null;
16998
+ size: number;
16999
+ }[];
17000
+ steps: {
17001
+ name: string;
17002
+ run: string;
17003
+ user: string;
17004
+ cwd: string | null;
17005
+ env: {
17006
+ [key: string]: string;
17007
+ };
17008
+ }[];
17009
+ network: {
17010
+ /** @enum {string} */
17011
+ build: "auto" | "none" | "allowlist";
17012
+ extra_hosts: string[];
17013
+ allow_hosts: string[];
17014
+ };
17015
+ };
17016
+ settings: components["schemas"]["TemplateSettings"];
17017
+ compiled: {
17018
+ compiler: string;
17019
+ language_table_sha256: string;
17020
+ build_env: {
17021
+ [key: string]: string;
17022
+ };
17023
+ steps: {
17024
+ [key: string]: unknown;
17025
+ }[];
17026
+ tools: {
17027
+ name: string;
17028
+ argv: string[];
17029
+ }[];
17030
+ network: {
17031
+ /** @enum {string} */
17032
+ mode: "none" | "egress_allowlist";
17033
+ allow_hosts: string[];
17034
+ };
17035
+ objects: {
17036
+ sha256: string;
17037
+ size: number;
17038
+ /** @enum {string} */
17039
+ kind: "file" | "tar";
17040
+ }[];
17041
+ };
14987
17042
  };
14988
17043
  result: {
14989
17044
  artifact_sha256: string | null;
@@ -15031,7 +17086,7 @@ export interface operations {
15031
17086
  last_heartbeat_at: string | null;
15032
17087
  };
15033
17088
  /**
15034
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
17089
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
15035
17090
  * @enum {string}
15036
17091
  */
15037
17092
  source_kind: "recipe" | "workspace";
@@ -15166,11 +17221,14 @@ export interface operations {
15166
17221
  /** @enum {string} */
15167
17222
  timeout_seconds: "request" | "plan" | "platform";
15168
17223
  };
17224
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
15169
17225
  network: {
15170
17226
  /** @enum {string} */
15171
17227
  mode: "none" | "egress_allowlist";
15172
17228
  allow_hosts: string[];
15173
17229
  };
17230
+ /** @description Host names the builder’s DNS proxy refused during the build (at most 50). Rebuild with a host in build.network.extra_hosts to allow it. */
17231
+ denied_hosts: string[];
15174
17232
  provenance: {
15175
17233
  recipe_schema: string | null;
15176
17234
  recipe_sha256: string | null;
@@ -15178,9 +17236,81 @@ export interface operations {
15178
17236
  builder_id: string | null;
15179
17237
  attempt: number;
15180
17238
  };
15181
- /** @description Only on GET of one build. */
17239
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
15182
17240
  recipe?: {
15183
17241
  dockerfile: string;
17242
+ } | {
17243
+ /** @enum {string} */
17244
+ schema: "shardflux.template-recipe.v2";
17245
+ build: {
17246
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
17247
+ languages: {
17248
+ id: string;
17249
+ version: string;
17250
+ /** @enum {string} */
17251
+ source: "install" | "base";
17252
+ url: string | null;
17253
+ sha256: string | null;
17254
+ }[];
17255
+ packages: {
17256
+ apt: string[];
17257
+ pip: {
17258
+ packages: string[];
17259
+ requirements: string[];
17260
+ };
17261
+ npm: string[];
17262
+ };
17263
+ files: {
17264
+ upload: string;
17265
+ /** @enum {string} */
17266
+ kind: "file" | "tar";
17267
+ to: string;
17268
+ owner: string;
17269
+ mode: string | null;
17270
+ size: number;
17271
+ }[];
17272
+ steps: {
17273
+ name: string;
17274
+ run: string;
17275
+ user: string;
17276
+ cwd: string | null;
17277
+ env: {
17278
+ [key: string]: string;
17279
+ };
17280
+ }[];
17281
+ network: {
17282
+ /** @enum {string} */
17283
+ build: "auto" | "none" | "allowlist";
17284
+ extra_hosts: string[];
17285
+ allow_hosts: string[];
17286
+ };
17287
+ };
17288
+ settings: components["schemas"]["TemplateSettings"];
17289
+ compiled: {
17290
+ compiler: string;
17291
+ language_table_sha256: string;
17292
+ build_env: {
17293
+ [key: string]: string;
17294
+ };
17295
+ steps: {
17296
+ [key: string]: unknown;
17297
+ }[];
17298
+ tools: {
17299
+ name: string;
17300
+ argv: string[];
17301
+ }[];
17302
+ network: {
17303
+ /** @enum {string} */
17304
+ mode: "none" | "egress_allowlist";
17305
+ allow_hosts: string[];
17306
+ };
17307
+ objects: {
17308
+ sha256: string;
17309
+ size: number;
17310
+ /** @enum {string} */
17311
+ kind: "file" | "tar";
17312
+ }[];
17313
+ };
15184
17314
  };
15185
17315
  result: {
15186
17316
  artifact_sha256: string | null;
@@ -15228,7 +17358,7 @@ export interface operations {
15228
17358
  last_heartbeat_at: string | null;
15229
17359
  };
15230
17360
  /**
15231
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
17361
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
15232
17362
  * @enum {string}
15233
17363
  */
15234
17364
  source_kind: "recipe" | "workspace";
@@ -15266,15 +17396,171 @@ export interface operations {
15266
17396
  };
15267
17397
  };
15268
17398
  };
15269
- getApiV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
17399
+ getApiV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
17400
+ parameters: {
17401
+ query?: never;
17402
+ header?: never;
17403
+ path: {
17404
+ /** @description UUIDv7, lowercase canonical form. */
17405
+ organization_id: string;
17406
+ /** @description UUIDv7, lowercase canonical form. */
17407
+ build_id: string;
17408
+ };
17409
+ cookie?: never;
17410
+ };
17411
+ requestBody?: never;
17412
+ responses: {
17413
+ /** @description Default Response */
17414
+ 200: {
17415
+ headers: {
17416
+ [name: string]: unknown;
17417
+ };
17418
+ content: {
17419
+ "application/json": {
17420
+ /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
17421
+ url: string;
17422
+ /** Format: date-time */
17423
+ expires_at: string;
17424
+ /** @description `builds/<build_id>.log`. */
17425
+ object_key: string;
17426
+ bytes: number | null;
17427
+ sha256: string | null;
17428
+ };
17429
+ };
17430
+ };
17431
+ /** @description Default Response */
17432
+ "4XX": {
17433
+ headers: {
17434
+ [name: string]: unknown;
17435
+ };
17436
+ content: {
17437
+ "application/json": components["schemas"]["ErrorBody"];
17438
+ };
17439
+ };
17440
+ /** @description Default Response */
17441
+ "5XX": {
17442
+ headers: {
17443
+ [name: string]: unknown;
17444
+ };
17445
+ content: {
17446
+ "application/json": components["schemas"]["ErrorBody"];
17447
+ };
17448
+ };
17449
+ };
17450
+ };
17451
+ postApiV1OrganizationsOrganizationIdTemplateUploads: {
17452
+ parameters: {
17453
+ query?: never;
17454
+ header?: never;
17455
+ path: {
17456
+ /** @description UUIDv7, lowercase canonical form. */
17457
+ organization_id: string;
17458
+ };
17459
+ cookie?: never;
17460
+ };
17461
+ requestBody: {
17462
+ content: {
17463
+ "application/json": components["schemas"]["TemplateUploadRequest"];
17464
+ };
17465
+ };
17466
+ responses: {
17467
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
17468
+ 200: {
17469
+ headers: {
17470
+ [name: string]: unknown;
17471
+ };
17472
+ content: {
17473
+ "application/json": components["schemas"]["TemplateUploadResponse"];
17474
+ };
17475
+ };
17476
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
17477
+ 201: {
17478
+ headers: {
17479
+ [name: string]: unknown;
17480
+ };
17481
+ content: {
17482
+ "application/json": components["schemas"]["TemplateUploadResponse"];
17483
+ };
17484
+ };
17485
+ /** @description Default Response */
17486
+ "4XX": {
17487
+ headers: {
17488
+ [name: string]: unknown;
17489
+ };
17490
+ content: {
17491
+ "application/json": components["schemas"]["ErrorBody"];
17492
+ };
17493
+ };
17494
+ /** @description Default Response */
17495
+ "5XX": {
17496
+ headers: {
17497
+ [name: string]: unknown;
17498
+ };
17499
+ content: {
17500
+ "application/json": components["schemas"]["ErrorBody"];
17501
+ };
17502
+ };
17503
+ };
17504
+ };
17505
+ getApiV1OrganizationsOrganizationIdTemplatePackages: {
15270
17506
  parameters: {
15271
- query?: never;
17507
+ query: {
17508
+ ecosystem: "apt" | "pip" | "npm";
17509
+ q: string;
17510
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
17511
+ base?: string;
17512
+ limit?: number;
17513
+ };
15272
17514
  header?: never;
15273
17515
  path: {
15274
17516
  /** @description UUIDv7, lowercase canonical form. */
15275
17517
  organization_id: string;
17518
+ };
17519
+ cookie?: never;
17520
+ };
17521
+ requestBody?: never;
17522
+ responses: {
17523
+ /** @description Default Response */
17524
+ 200: {
17525
+ headers: {
17526
+ [name: string]: unknown;
17527
+ };
17528
+ content: {
17529
+ "application/json": components["schemas"]["TemplatePackagePage"];
17530
+ };
17531
+ };
17532
+ /** @description Default Response */
17533
+ "4XX": {
17534
+ headers: {
17535
+ [name: string]: unknown;
17536
+ };
17537
+ content: {
17538
+ "application/json": components["schemas"]["ErrorBody"];
17539
+ };
17540
+ };
17541
+ /** @description Default Response */
17542
+ "5XX": {
17543
+ headers: {
17544
+ [name: string]: unknown;
17545
+ };
17546
+ content: {
17547
+ "application/json": components["schemas"]["ErrorBody"];
17548
+ };
17549
+ };
17550
+ };
17551
+ };
17552
+ getApiV1OrganizationsOrganizationIdTemplatePackagesEcosystemName: {
17553
+ parameters: {
17554
+ query?: {
17555
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
17556
+ base?: string;
17557
+ };
17558
+ header?: never;
17559
+ path: {
15276
17560
  /** @description UUIDv7, lowercase canonical form. */
15277
- build_id: string;
17561
+ organization_id: string;
17562
+ ecosystem: "apt" | "pip" | "npm";
17563
+ name: string;
15278
17564
  };
15279
17565
  cookie?: never;
15280
17566
  };
@@ -15286,16 +17572,51 @@ export interface operations {
15286
17572
  [name: string]: unknown;
15287
17573
  };
15288
17574
  content: {
15289
- "application/json": {
15290
- /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
15291
- url: string;
15292
- /** Format: date-time */
15293
- expires_at: string;
15294
- /** @description `builds/<build_id>.log`. */
15295
- object_key: string;
15296
- bytes: number | null;
15297
- sha256: string | null;
15298
- };
17575
+ "application/json": components["schemas"]["TemplatePackage"];
17576
+ };
17577
+ };
17578
+ /** @description Default Response */
17579
+ "4XX": {
17580
+ headers: {
17581
+ [name: string]: unknown;
17582
+ };
17583
+ content: {
17584
+ "application/json": components["schemas"]["ErrorBody"];
17585
+ };
17586
+ };
17587
+ /** @description Default Response */
17588
+ "5XX": {
17589
+ headers: {
17590
+ [name: string]: unknown;
17591
+ };
17592
+ content: {
17593
+ "application/json": components["schemas"]["ErrorBody"];
17594
+ };
17595
+ };
17596
+ };
17597
+ };
17598
+ getApiV1OrganizationsOrganizationIdTemplateLanguages: {
17599
+ parameters: {
17600
+ query: {
17601
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
17602
+ base: string;
17603
+ };
17604
+ header?: never;
17605
+ path: {
17606
+ /** @description UUIDv7, lowercase canonical form. */
17607
+ organization_id: string;
17608
+ };
17609
+ cookie?: never;
17610
+ };
17611
+ requestBody?: never;
17612
+ responses: {
17613
+ /** @description Default Response */
17614
+ 200: {
17615
+ headers: {
17616
+ [name: string]: unknown;
17617
+ };
17618
+ content: {
17619
+ "application/json": components["schemas"]["TemplateLanguages"];
15299
17620
  };
15300
17621
  };
15301
17622
  /** @description Default Response */
@@ -15502,6 +17823,7 @@ export interface operations {
15502
17823
  rootfs_sha256: string | null;
15503
17824
  } | null;
15504
17825
  defaults: components["schemas"]["TemplateDefaults"];
17826
+ settings: components["schemas"]["TemplateSettings"];
15505
17827
  files: components["schemas"]["TemplateFilesSummary"];
15506
17828
  rootfs_bytes: number | null;
15507
17829
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15546,6 +17868,7 @@ export interface operations {
15546
17868
  created_at: string;
15547
17869
  } | null;
15548
17870
  update_policy: components["schemas"]["UpdatePolicy"];
17871
+ category: ("os" | "stack") | null;
15549
17872
  plan: {
15550
17873
  plan_key: string;
15551
17874
  catalog_version: string;
@@ -15659,6 +17982,7 @@ export interface operations {
15659
17982
  rootfs_sha256: string | null;
15660
17983
  } | null;
15661
17984
  defaults: components["schemas"]["TemplateDefaults"];
17985
+ settings: components["schemas"]["TemplateSettings"];
15662
17986
  files: components["schemas"]["TemplateFilesSummary"];
15663
17987
  rootfs_bytes: number | null;
15664
17988
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15834,6 +18158,7 @@ export interface operations {
15834
18158
  rootfs_sha256: string | null;
15835
18159
  } | null;
15836
18160
  defaults: components["schemas"]["TemplateDefaults"];
18161
+ settings: components["schemas"]["TemplateSettings"];
15837
18162
  files: components["schemas"]["TemplateFilesSummary"];
15838
18163
  rootfs_bytes: number | null;
15839
18164
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15878,6 +18203,7 @@ export interface operations {
15878
18203
  created_at: string;
15879
18204
  } | null;
15880
18205
  update_policy: components["schemas"]["UpdatePolicy"];
18206
+ category: ("os" | "stack") | null;
15881
18207
  plan: {
15882
18208
  plan_key: string;
15883
18209
  catalog_version: string;
@@ -15991,6 +18317,7 @@ export interface operations {
15991
18317
  rootfs_sha256: string | null;
15992
18318
  } | null;
15993
18319
  defaults: components["schemas"]["TemplateDefaults"];
18320
+ settings: components["schemas"]["TemplateSettings"];
15994
18321
  files: components["schemas"]["TemplateFilesSummary"];
15995
18322
  rootfs_bytes: number | null;
15996
18323
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -17002,7 +19329,155 @@ export interface operations {
17002
19329
  };
17003
19330
  cookie?: never;
17004
19331
  };
17005
- requestBody?: never;
19332
+ requestBody?: never;
19333
+ responses: {
19334
+ /** @description Default Response */
19335
+ 200: {
19336
+ headers: {
19337
+ [name: string]: unknown;
19338
+ };
19339
+ content: {
19340
+ "application/json": {
19341
+ data: components["schemas"]["DraftState"][];
19342
+ next_cursor: string | null;
19343
+ };
19344
+ };
19345
+ };
19346
+ /** @description Default Response */
19347
+ "4XX": {
19348
+ headers: {
19349
+ [name: string]: unknown;
19350
+ };
19351
+ content: {
19352
+ "application/json": components["schemas"]["ErrorBody"];
19353
+ };
19354
+ };
19355
+ /** @description Default Response */
19356
+ "5XX": {
19357
+ headers: {
19358
+ [name: string]: unknown;
19359
+ };
19360
+ content: {
19361
+ "application/json": components["schemas"]["ErrorBody"];
19362
+ };
19363
+ };
19364
+ };
19365
+ };
19366
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftStates: {
19367
+ parameters: {
19368
+ query?: never;
19369
+ header?: never;
19370
+ path: {
19371
+ /** @description UUIDv7, lowercase canonical form. */
19372
+ organization_id: string;
19373
+ slug: string;
19374
+ };
19375
+ cookie?: never;
19376
+ };
19377
+ requestBody: {
19378
+ content: {
19379
+ "application/json": {
19380
+ label?: string;
19381
+ };
19382
+ };
19383
+ };
19384
+ responses: {
19385
+ /** @description Default Response */
19386
+ 202: {
19387
+ headers: {
19388
+ [name: string]: unknown;
19389
+ };
19390
+ content: {
19391
+ "application/json": {
19392
+ operation: components["schemas"]["Operation"];
19393
+ };
19394
+ };
19395
+ };
19396
+ /** @description Default Response */
19397
+ "4XX": {
19398
+ headers: {
19399
+ [name: string]: unknown;
19400
+ };
19401
+ content: {
19402
+ "application/json": components["schemas"]["ErrorBody"];
19403
+ };
19404
+ };
19405
+ /** @description Default Response */
19406
+ "5XX": {
19407
+ headers: {
19408
+ [name: string]: unknown;
19409
+ };
19410
+ content: {
19411
+ "application/json": components["schemas"]["ErrorBody"];
19412
+ };
19413
+ };
19414
+ };
19415
+ };
19416
+ getApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19417
+ parameters: {
19418
+ query?: {
19419
+ limit?: number;
19420
+ cursor?: string;
19421
+ include_ended?: boolean;
19422
+ };
19423
+ header?: never;
19424
+ path: {
19425
+ /** @description UUIDv7, lowercase canonical form. */
19426
+ organization_id: string;
19427
+ slug: string;
19428
+ };
19429
+ cookie?: never;
19430
+ };
19431
+ requestBody?: never;
19432
+ responses: {
19433
+ /** @description Default Response */
19434
+ 200: {
19435
+ headers: {
19436
+ [name: string]: unknown;
19437
+ };
19438
+ content: {
19439
+ "application/json": {
19440
+ data: components["schemas"]["Workspace"][];
19441
+ next_cursor: string | null;
19442
+ };
19443
+ };
19444
+ };
19445
+ /** @description Default Response */
19446
+ "4XX": {
19447
+ headers: {
19448
+ [name: string]: unknown;
19449
+ };
19450
+ content: {
19451
+ "application/json": components["schemas"]["ErrorBody"];
19452
+ };
19453
+ };
19454
+ /** @description Default Response */
19455
+ "5XX": {
19456
+ headers: {
19457
+ [name: string]: unknown;
19458
+ };
19459
+ content: {
19460
+ "application/json": components["schemas"]["ErrorBody"];
19461
+ };
19462
+ };
19463
+ };
19464
+ };
19465
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19466
+ parameters: {
19467
+ query?: never;
19468
+ header?: never;
19469
+ path: {
19470
+ /** @description UUIDv7, lowercase canonical form. */
19471
+ organization_id: string;
19472
+ slug: string;
19473
+ };
19474
+ cookie?: never;
19475
+ };
19476
+ requestBody: {
19477
+ content: {
19478
+ "application/json": components["schemas"]["CreateTestInstanceBody"];
19479
+ };
19480
+ };
17006
19481
  responses: {
17007
19482
  /** @description Default Response */
17008
19483
  200: {
@@ -17011,8 +19486,24 @@ export interface operations {
17011
19486
  };
17012
19487
  content: {
17013
19488
  "application/json": {
17014
- data: components["schemas"]["DraftState"][];
17015
- next_cursor: string | null;
19489
+ workspace: components["schemas"]["Workspace"];
19490
+ operation: components["schemas"]["Operation"] | null;
19491
+ cell_endpoint: string | null;
19492
+ tool_token: components["schemas"]["ToolToken"] | null;
19493
+ };
19494
+ };
19495
+ };
19496
+ /** @description Default Response */
19497
+ 202: {
19498
+ headers: {
19499
+ [name: string]: unknown;
19500
+ };
19501
+ content: {
19502
+ "application/json": {
19503
+ workspace: components["schemas"]["Workspace"];
19504
+ operation: components["schemas"]["Operation"] | null;
19505
+ cell_endpoint: string | null;
19506
+ tool_token: components["schemas"]["ToolToken"] | null;
17016
19507
  };
17017
19508
  };
17018
19509
  };
@@ -17036,7 +19527,7 @@ export interface operations {
17036
19527
  };
17037
19528
  };
17038
19529
  };
17039
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftStates: {
19530
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish: {
17040
19531
  parameters: {
17041
19532
  query?: never;
17042
19533
  header?: never;
@@ -17049,21 +19540,17 @@ export interface operations {
17049
19540
  };
17050
19541
  requestBody: {
17051
19542
  content: {
17052
- "application/json": {
17053
- label?: string;
17054
- };
19543
+ "application/json": components["schemas"]["PublishDraftBody"];
17055
19544
  };
17056
19545
  };
17057
19546
  responses: {
17058
- /** @description Default Response */
19547
+ /** @description operation: the capture (layer_snapshot) of a running workspace, null otherwise. build: poll GET …/template-builds/{id} until registration.state is registered. */
17059
19548
  202: {
17060
19549
  headers: {
17061
19550
  [name: string]: unknown;
17062
19551
  };
17063
19552
  content: {
17064
- "application/json": {
17065
- operation: components["schemas"]["Operation"];
17066
- };
19553
+ "application/json": components["schemas"]["SaveAsTemplateResponse"];
17067
19554
  };
17068
19555
  };
17069
19556
  /** @description Default Response */
@@ -17086,32 +19573,49 @@ export interface operations {
17086
19573
  };
17087
19574
  };
17088
19575
  };
17089
- getApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19576
+ postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances: {
17090
19577
  parameters: {
17091
- query?: {
17092
- limit?: number;
17093
- cursor?: string;
17094
- include_ended?: boolean;
17095
- };
19578
+ query?: never;
17096
19579
  header?: never;
17097
19580
  path: {
17098
19581
  /** @description UUIDv7, lowercase canonical form. */
17099
19582
  organization_id: string;
17100
19583
  slug: string;
19584
+ version: number;
17101
19585
  };
17102
19586
  cookie?: never;
17103
19587
  };
17104
- requestBody?: never;
19588
+ requestBody: {
19589
+ content: {
19590
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
19591
+ };
19592
+ };
17105
19593
  responses: {
17106
- /** @description Default Response */
19594
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17107
19595
  200: {
17108
19596
  headers: {
17109
19597
  [name: string]: unknown;
17110
19598
  };
17111
19599
  content: {
17112
19600
  "application/json": {
17113
- data: components["schemas"]["Workspace"][];
17114
- next_cursor: string | null;
19601
+ workspace: components["schemas"]["Workspace"];
19602
+ operation: components["schemas"]["Operation"] | null;
19603
+ cell_endpoint: string | null;
19604
+ tool_token: components["schemas"]["ToolToken"] | null;
19605
+ };
19606
+ };
19607
+ };
19608
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
19609
+ 202: {
19610
+ headers: {
19611
+ [name: string]: unknown;
19612
+ };
19613
+ content: {
19614
+ "application/json": {
19615
+ workspace: components["schemas"]["Workspace"];
19616
+ operation: components["schemas"]["Operation"] | null;
19617
+ cell_endpoint: string | null;
19618
+ tool_token: components["schemas"]["ToolToken"] | null;
17115
19619
  };
17116
19620
  };
17117
19621
  };
@@ -17135,24 +19639,23 @@ export interface operations {
17135
19639
  };
17136
19640
  };
17137
19641
  };
17138
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19642
+ postV1TemplatesSlugVersionsVersionTestInstances: {
17139
19643
  parameters: {
17140
19644
  query?: never;
17141
19645
  header?: never;
17142
19646
  path: {
17143
- /** @description UUIDv7, lowercase canonical form. */
17144
- organization_id: string;
17145
19647
  slug: string;
19648
+ version: number;
17146
19649
  };
17147
19650
  cookie?: never;
17148
19651
  };
17149
19652
  requestBody: {
17150
19653
  content: {
17151
- "application/json": components["schemas"]["CreateTestInstanceBody"];
19654
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
17152
19655
  };
17153
19656
  };
17154
19657
  responses: {
17155
- /** @description Default Response */
19658
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17156
19659
  200: {
17157
19660
  headers: {
17158
19661
  [name: string]: unknown;
@@ -17166,7 +19669,7 @@ export interface operations {
17166
19669
  };
17167
19670
  };
17168
19671
  };
17169
- /** @description Default Response */
19672
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17170
19673
  202: {
17171
19674
  headers: {
17172
19675
  [name: string]: unknown;
@@ -17200,7 +19703,7 @@ export interface operations {
17200
19703
  };
17201
19704
  };
17202
19705
  };
17203
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish: {
19706
+ postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances: {
17204
19707
  parameters: {
17205
19708
  query?: never;
17206
19709
  header?: never;
@@ -17208,22 +19711,42 @@ export interface operations {
17208
19711
  /** @description UUIDv7, lowercase canonical form. */
17209
19712
  organization_id: string;
17210
19713
  slug: string;
19714
+ version: number;
17211
19715
  };
17212
19716
  cookie?: never;
17213
19717
  };
17214
19718
  requestBody: {
17215
19719
  content: {
17216
- "application/json": components["schemas"]["PublishDraftBody"];
19720
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
17217
19721
  };
17218
19722
  };
17219
19723
  responses: {
17220
- /** @description operation: the capture (layer_snapshot) of a running workspace, null otherwise. build: poll GET …/template-builds/{id} until registration.state is registered. */
19724
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
19725
+ 200: {
19726
+ headers: {
19727
+ [name: string]: unknown;
19728
+ };
19729
+ content: {
19730
+ "application/json": {
19731
+ workspace: components["schemas"]["Workspace"];
19732
+ operation: components["schemas"]["Operation"] | null;
19733
+ cell_endpoint: string | null;
19734
+ tool_token: components["schemas"]["ToolToken"] | null;
19735
+ };
19736
+ };
19737
+ };
19738
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17221
19739
  202: {
17222
19740
  headers: {
17223
19741
  [name: string]: unknown;
17224
19742
  };
17225
19743
  content: {
17226
- "application/json": components["schemas"]["SaveAsTemplateResponse"];
19744
+ "application/json": {
19745
+ workspace: components["schemas"]["Workspace"];
19746
+ operation: components["schemas"]["Operation"] | null;
19747
+ cell_endpoint: string | null;
19748
+ tool_token: components["schemas"]["ToolToken"] | null;
19749
+ };
17227
19750
  };
17228
19751
  };
17229
19752
  /** @description Default Response */
@@ -17540,6 +20063,96 @@ export interface operations {
17540
20063
  };
17541
20064
  };
17542
20065
  };
20066
+ getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe: {
20067
+ parameters: {
20068
+ query?: {
20069
+ /** @description Pick the platform template even when an organization template shadows its slug. */
20070
+ owner?: "platform" | "organization";
20071
+ };
20072
+ header?: never;
20073
+ path: {
20074
+ /** @description UUIDv7, lowercase canonical form. */
20075
+ organization_id: string;
20076
+ slug: string;
20077
+ version: number;
20078
+ };
20079
+ cookie?: never;
20080
+ };
20081
+ requestBody?: never;
20082
+ responses: {
20083
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
20084
+ 200: {
20085
+ headers: {
20086
+ [name: string]: unknown;
20087
+ };
20088
+ content: {
20089
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
20090
+ };
20091
+ };
20092
+ /** @description Default Response */
20093
+ "4XX": {
20094
+ headers: {
20095
+ [name: string]: unknown;
20096
+ };
20097
+ content: {
20098
+ "application/json": components["schemas"]["ErrorBody"];
20099
+ };
20100
+ };
20101
+ /** @description Default Response */
20102
+ "5XX": {
20103
+ headers: {
20104
+ [name: string]: unknown;
20105
+ };
20106
+ content: {
20107
+ "application/json": components["schemas"]["ErrorBody"];
20108
+ };
20109
+ };
20110
+ };
20111
+ };
20112
+ getV1TemplatesSlugVersionsVersionRecipe: {
20113
+ parameters: {
20114
+ query?: {
20115
+ /** @description Pick the platform template even when an organization template shadows its slug. */
20116
+ owner?: "platform" | "organization";
20117
+ };
20118
+ header?: never;
20119
+ path: {
20120
+ slug: string;
20121
+ version: number;
20122
+ };
20123
+ cookie?: never;
20124
+ };
20125
+ requestBody?: never;
20126
+ responses: {
20127
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
20128
+ 200: {
20129
+ headers: {
20130
+ [name: string]: unknown;
20131
+ };
20132
+ content: {
20133
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
20134
+ };
20135
+ };
20136
+ /** @description Default Response */
20137
+ "4XX": {
20138
+ headers: {
20139
+ [name: string]: unknown;
20140
+ };
20141
+ content: {
20142
+ "application/json": components["schemas"]["ErrorBody"];
20143
+ };
20144
+ };
20145
+ /** @description Default Response */
20146
+ "5XX": {
20147
+ headers: {
20148
+ [name: string]: unknown;
20149
+ };
20150
+ content: {
20151
+ "application/json": components["schemas"]["ErrorBody"];
20152
+ };
20153
+ };
20154
+ };
20155
+ };
17543
20156
  getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles: {
17544
20157
  parameters: {
17545
20158
  query?: {
@@ -17690,6 +20303,52 @@ export interface operations {
17690
20303
  };
17691
20304
  };
17692
20305
  };
20306
+ getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe: {
20307
+ parameters: {
20308
+ query?: {
20309
+ /** @description Pick the platform template even when an organization template shadows its slug. */
20310
+ owner?: "platform" | "organization";
20311
+ };
20312
+ header?: never;
20313
+ path: {
20314
+ /** @description UUIDv7, lowercase canonical form. */
20315
+ organization_id: string;
20316
+ slug: string;
20317
+ version: number;
20318
+ };
20319
+ cookie?: never;
20320
+ };
20321
+ requestBody?: never;
20322
+ responses: {
20323
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
20324
+ 200: {
20325
+ headers: {
20326
+ [name: string]: unknown;
20327
+ };
20328
+ content: {
20329
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
20330
+ };
20331
+ };
20332
+ /** @description Default Response */
20333
+ "4XX": {
20334
+ headers: {
20335
+ [name: string]: unknown;
20336
+ };
20337
+ content: {
20338
+ "application/json": components["schemas"]["ErrorBody"];
20339
+ };
20340
+ };
20341
+ /** @description Default Response */
20342
+ "5XX": {
20343
+ headers: {
20344
+ [name: string]: unknown;
20345
+ };
20346
+ content: {
20347
+ "application/json": components["schemas"]["ErrorBody"];
20348
+ };
20349
+ };
20350
+ };
20351
+ };
17693
20352
  getV1OrganizationsOrganizationIdSecrets: {
17694
20353
  parameters: {
17695
20354
  query?: {
@@ -20329,6 +22988,18 @@ export interface operations {
20329
22988
  updated_at: string;
20330
22989
  } | null;
20331
22990
  };
22991
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
22992
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
22993
+ effective_policy: {
22994
+ mode: "allow_all" | "allowlist" | "deny_all";
22995
+ rules: {
22996
+ host: string;
22997
+ /** @description [] = any port (a ceiling host). */
22998
+ ports: number[];
22999
+ protocols: "tcp"[];
23000
+ }[];
23001
+ cidrs: string[];
23002
+ };
20332
23003
  };
20333
23004
  };
20334
23005
  };
@@ -20549,6 +23220,18 @@ export interface operations {
20549
23220
  updated_at: string;
20550
23221
  } | null;
20551
23222
  };
23223
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
23224
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
23225
+ effective_policy: {
23226
+ mode: "allow_all" | "allowlist" | "deny_all";
23227
+ rules: {
23228
+ host: string;
23229
+ /** @description [] = any port (a ceiling host). */
23230
+ ports: number[];
23231
+ protocols: "tcp"[];
23232
+ }[];
23233
+ cidrs: string[];
23234
+ };
20552
23235
  };
20553
23236
  };
20554
23237
  };
@@ -21256,6 +23939,18 @@ export interface operations {
21256
23939
  updated_at: string;
21257
23940
  } | null;
21258
23941
  };
23942
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
23943
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
23944
+ effective_policy: {
23945
+ mode: "allow_all" | "allowlist" | "deny_all";
23946
+ rules: {
23947
+ host: string;
23948
+ /** @description [] = any port (a ceiling host). */
23949
+ ports: number[];
23950
+ protocols: "tcp"[];
23951
+ }[];
23952
+ cidrs: string[];
23953
+ };
21259
23954
  };
21260
23955
  };
21261
23956
  };
@@ -21476,6 +24171,18 @@ export interface operations {
21476
24171
  updated_at: string;
21477
24172
  } | null;
21478
24173
  };
24174
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
24175
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
24176
+ effective_policy: {
24177
+ mode: "allow_all" | "allowlist" | "deny_all";
24178
+ rules: {
24179
+ host: string;
24180
+ /** @description [] = any port (a ceiling host). */
24181
+ ports: number[];
24182
+ protocols: "tcp"[];
24183
+ }[];
24184
+ cidrs: string[];
24185
+ };
21479
24186
  };
21480
24187
  };
21481
24188
  };