@shardflux/sdk 0.6.0 → 0.6.2

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,126 @@ 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
+ };
1975
2135
  "/v1/organizations/{organization_id}/template-builder-availability": {
1976
2136
  parameters: {
1977
2137
  query?: never;
@@ -2041,7 +2201,7 @@ export interface paths {
2041
2201
  put?: never;
2042
2202
  /**
2043
2203
  * 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.
2204
+ * @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
2205
  */
2046
2206
  post: operations["postApiV1OrganizationsOrganizationIdTemplateBuilds"];
2047
2207
  delete?: never;
@@ -2110,6 +2270,66 @@ export interface paths {
2110
2270
  patch?: never;
2111
2271
  trace?: never;
2112
2272
  };
2273
+ "/api/v1/organizations/{organization_id}/template-uploads": {
2274
+ parameters: {
2275
+ query?: never;
2276
+ header?: never;
2277
+ path?: never;
2278
+ cookie?: never;
2279
+ };
2280
+ get?: never;
2281
+ put?: never;
2282
+ /**
2283
+ * Request an upload of a recipe build input (a file, or a folder as an uncompressed tar), by content
2284
+ * @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.
2285
+ */
2286
+ post: operations["postApiV1OrganizationsOrganizationIdTemplateUploads"];
2287
+ delete?: never;
2288
+ options?: never;
2289
+ head?: never;
2290
+ patch?: never;
2291
+ trace?: never;
2292
+ };
2293
+ "/api/v1/organizations/{organization_id}/template-packages": {
2294
+ parameters: {
2295
+ query?: never;
2296
+ header?: never;
2297
+ path?: never;
2298
+ cookie?: never;
2299
+ };
2300
+ /**
2301
+ * Search apt, pip or npm packages for a recipe
2302
+ * @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.
2303
+ */
2304
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatePackages"];
2305
+ put?: never;
2306
+ post?: never;
2307
+ delete?: never;
2308
+ options?: never;
2309
+ head?: never;
2310
+ patch?: never;
2311
+ trace?: never;
2312
+ };
2313
+ "/api/v1/organizations/{organization_id}/template-packages/{ecosystem}/{name}": {
2314
+ parameters: {
2315
+ query?: never;
2316
+ header?: never;
2317
+ path?: never;
2318
+ cookie?: never;
2319
+ };
2320
+ /**
2321
+ * Get one apt, pip or npm package: latest version, summary and versions
2322
+ * @description 404 not_found (package_not_found). apt needs base=<slug>@<version>. Same limits as the search.
2323
+ */
2324
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatePackagesEcosystemName"];
2325
+ put?: never;
2326
+ post?: never;
2327
+ delete?: never;
2328
+ options?: never;
2329
+ head?: never;
2330
+ patch?: never;
2331
+ trace?: never;
2332
+ };
2113
2333
  "/api/v1/organizations/{organization_id}/template-builder-availability": {
2114
2334
  parameters: {
2115
2335
  query?: never;
@@ -2182,7 +2402,7 @@ export interface paths {
2182
2402
  put?: never;
2183
2403
  /**
2184
2404
  * 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.
2405
+ * @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
2406
  */
2187
2407
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraft"];
2188
2408
  /**
@@ -2210,7 +2430,7 @@ export interface paths {
2210
2430
  put?: never;
2211
2431
  /**
2212
2432
  * 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.
2433
+ * @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
2434
  */
2215
2435
  post: operations["postV1TemplatesSlugDraft"];
2216
2436
  /**
@@ -2324,7 +2544,7 @@ export interface paths {
2324
2544
  put?: never;
2325
2545
  /**
2326
2546
  * 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.
2547
+ * @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
2548
  */
2329
2549
  post: operations["postV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
2330
2550
  delete?: never;
@@ -2344,7 +2564,7 @@ export interface paths {
2344
2564
  put?: never;
2345
2565
  /**
2346
2566
  * 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.
2567
+ * @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
2568
  */
2349
2569
  post: operations["postV1TemplatesSlugDraftPublish"];
2350
2570
  delete?: never;
@@ -2368,7 +2588,7 @@ export interface paths {
2368
2588
  put?: never;
2369
2589
  /**
2370
2590
  * 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.
2591
+ * @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
2592
  */
2373
2593
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraft"];
2374
2594
  /**
@@ -2437,7 +2657,7 @@ export interface paths {
2437
2657
  put?: never;
2438
2658
  /**
2439
2659
  * 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.
2660
+ * @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
2661
  */
2442
2662
  post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish"];
2443
2663
  delete?: never;
@@ -2446,6 +2666,66 @@ export interface paths {
2446
2666
  patch?: never;
2447
2667
  trace?: never;
2448
2668
  };
2669
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/test-instances": {
2670
+ parameters: {
2671
+ query?: never;
2672
+ header?: never;
2673
+ path?: never;
2674
+ cookie?: never;
2675
+ };
2676
+ get?: never;
2677
+ put?: never;
2678
+ /**
2679
+ * Open a test instance of a template version, published or not
2680
+ * @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.
2681
+ */
2682
+ post: operations["postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances"];
2683
+ delete?: never;
2684
+ options?: never;
2685
+ head?: never;
2686
+ patch?: never;
2687
+ trace?: never;
2688
+ };
2689
+ "/v1/templates/{slug}/versions/{version}/test-instances": {
2690
+ parameters: {
2691
+ query?: never;
2692
+ header?: never;
2693
+ path?: never;
2694
+ cookie?: never;
2695
+ };
2696
+ get?: never;
2697
+ put?: never;
2698
+ /**
2699
+ * Open a test instance of a template version, published or not
2700
+ * @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.
2701
+ */
2702
+ post: operations["postV1TemplatesSlugVersionsVersionTestInstances"];
2703
+ delete?: never;
2704
+ options?: never;
2705
+ head?: never;
2706
+ patch?: never;
2707
+ trace?: never;
2708
+ };
2709
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/test-instances": {
2710
+ parameters: {
2711
+ query?: never;
2712
+ header?: never;
2713
+ path?: never;
2714
+ cookie?: never;
2715
+ };
2716
+ get?: never;
2717
+ put?: never;
2718
+ /**
2719
+ * Open a test instance of a template version, published or not
2720
+ * @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.
2721
+ */
2722
+ post: operations["postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances"];
2723
+ delete?: never;
2724
+ options?: never;
2725
+ head?: never;
2726
+ patch?: never;
2727
+ trace?: never;
2728
+ };
2449
2729
  "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2450
2730
  parameters: {
2451
2731
  query?: never;
@@ -2566,7 +2846,7 @@ export interface paths {
2566
2846
  patch?: never;
2567
2847
  trace?: never;
2568
2848
  };
2569
- "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2849
+ "/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/recipe": {
2570
2850
  parameters: {
2571
2851
  query?: never;
2572
2852
  header?: never;
@@ -2574,10 +2854,10 @@ export interface paths {
2574
2854
  cookie?: never;
2575
2855
  };
2576
2856
  /**
2577
- * List one directory of a template version’s file tree
2578
- * @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.
2857
+ * Export the recipe and settings of a template version (request form, ready to build again)
2858
+ * @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).
2579
2859
  */
2580
- get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles"];
2860
+ get: operations["getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe"];
2581
2861
  put?: never;
2582
2862
  post?: never;
2583
2863
  delete?: never;
@@ -2586,7 +2866,7 @@ export interface paths {
2586
2866
  patch?: never;
2587
2867
  trace?: never;
2588
2868
  };
2589
- "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files/entry": {
2869
+ "/v1/templates/{slug}/versions/{version}/recipe": {
2590
2870
  parameters: {
2591
2871
  query?: never;
2592
2872
  header?: never;
@@ -2594,10 +2874,10 @@ export interface paths {
2594
2874
  cookie?: never;
2595
2875
  };
2596
2876
  /**
2597
- * Get one entry of a template version’s file tree
2598
- * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2877
+ * Export the recipe and settings of a template version (request form, ready to build again)
2878
+ * @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).
2599
2879
  */
2600
- get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFilesEntry"];
2880
+ get: operations["getV1TemplatesSlugVersionsVersionRecipe"];
2601
2881
  put?: never;
2602
2882
  post?: never;
2603
2883
  delete?: never;
@@ -2606,7 +2886,7 @@ export interface paths {
2606
2886
  patch?: never;
2607
2887
  trace?: never;
2608
2888
  };
2609
- "/api/v1/organizations/{organization_id}/templates/{slug}/diff": {
2889
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files": {
2610
2890
  parameters: {
2611
2891
  query?: never;
2612
2892
  header?: never;
@@ -2614,10 +2894,10 @@ export interface paths {
2614
2894
  cookie?: never;
2615
2895
  };
2616
2896
  /**
2617
- * Diff two versions of a template (path, change, before, after)
2618
- * @description `from` is a version number of this template or `base` (the `to` version’s build base, which may be a platform version). Keyset-paginated by path; `path_prefix` narrows it (string prefix), `change` filters one kind. The first page (no cursor) carries `summary`. 409 file_list_unavailable / file_list_indexing when either version has no loaded file list.
2897
+ * List one directory of a template version’s file tree
2898
+ * @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.
2619
2899
  */
2620
- get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugDiff"];
2900
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles"];
2621
2901
  put?: never;
2622
2902
  post?: never;
2623
2903
  delete?: never;
@@ -2626,28 +2906,27 @@ export interface paths {
2626
2906
  patch?: never;
2627
2907
  trace?: never;
2628
2908
  };
2629
- "/v1/organizations/{organization_id}/secrets": {
2909
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/files/entry": {
2630
2910
  parameters: {
2631
2911
  query?: never;
2632
2912
  header?: never;
2633
2913
  path?: never;
2634
2914
  cookie?: never;
2635
2915
  };
2636
- /** List organization-wide secrets (metadata only; owner/admin/member) */
2637
- get: operations["getV1OrganizationsOrganizationIdSecrets"];
2638
- put?: never;
2639
2916
  /**
2640
- * Create an organization-wide secret (owner/admin)
2641
- * @description The value is encrypted (KMS envelope) and never returned. `allowed_tools` defaults to [exec, pty]; `allowed_project_ids` defaults to [] (grant projects explicitly, or null for every project). API keys cannot manage organization secrets (403). 409 when the name exists in this scope. Supports Idempotency-Key.
2917
+ * Get one entry of a template version’s file tree
2918
+ * @description 404 path_not_found; 409 file_list_unavailable / file_list_indexing; 422 invalid_path.
2642
2919
  */
2643
- post: operations["postV1OrganizationsOrganizationIdSecrets"];
2920
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFilesEntry"];
2921
+ put?: never;
2922
+ post?: never;
2644
2923
  delete?: never;
2645
2924
  options?: never;
2646
2925
  head?: never;
2647
2926
  patch?: never;
2648
2927
  trace?: never;
2649
2928
  };
2650
- "/v1/projects/{project_id}/secrets": {
2929
+ "/api/v1/organizations/{organization_id}/templates/{slug}/diff": {
2651
2930
  parameters: {
2652
2931
  query?: never;
2653
2932
  header?: never;
@@ -2655,7 +2934,68 @@ export interface paths {
2655
2934
  cookie?: never;
2656
2935
  };
2657
2936
  /**
2658
- * List a project’s secrets (metadata only)
2937
+ * Diff two versions of a template (path, change, before, after)
2938
+ * @description `from` is a version number of this template or `base` (the `to` version’s build base, which may be a platform version). Keyset-paginated by path; `path_prefix` narrows it (string prefix), `change` filters one kind. The first page (no cursor) carries `summary`. 409 file_list_unavailable / file_list_indexing when either version has no loaded file list.
2939
+ */
2940
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugDiff"];
2941
+ put?: never;
2942
+ post?: never;
2943
+ delete?: never;
2944
+ options?: never;
2945
+ head?: never;
2946
+ patch?: never;
2947
+ trace?: never;
2948
+ };
2949
+ "/api/v1/organizations/{organization_id}/templates/{slug}/versions/{version}/recipe": {
2950
+ parameters: {
2951
+ query?: never;
2952
+ header?: never;
2953
+ path?: never;
2954
+ cookie?: never;
2955
+ };
2956
+ /**
2957
+ * Export the recipe and settings of a template version (request form, ready to build again)
2958
+ * @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).
2959
+ */
2960
+ get: operations["getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe"];
2961
+ put?: never;
2962
+ post?: never;
2963
+ delete?: never;
2964
+ options?: never;
2965
+ head?: never;
2966
+ patch?: never;
2967
+ trace?: never;
2968
+ };
2969
+ "/v1/organizations/{organization_id}/secrets": {
2970
+ parameters: {
2971
+ query?: never;
2972
+ header?: never;
2973
+ path?: never;
2974
+ cookie?: never;
2975
+ };
2976
+ /** List organization-wide secrets (metadata only; owner/admin/member) */
2977
+ get: operations["getV1OrganizationsOrganizationIdSecrets"];
2978
+ put?: never;
2979
+ /**
2980
+ * Create an organization-wide secret (owner/admin)
2981
+ * @description The value is encrypted (KMS envelope) and never returned. `allowed_tools` defaults to [exec, pty]; `allowed_project_ids` defaults to [] (grant projects explicitly, or null for every project). API keys cannot manage organization secrets (403). 409 when the name exists in this scope. Supports Idempotency-Key.
2982
+ */
2983
+ post: operations["postV1OrganizationsOrganizationIdSecrets"];
2984
+ delete?: never;
2985
+ options?: never;
2986
+ head?: never;
2987
+ patch?: never;
2988
+ trace?: never;
2989
+ };
2990
+ "/v1/projects/{project_id}/secrets": {
2991
+ parameters: {
2992
+ query?: never;
2993
+ header?: never;
2994
+ path?: never;
2995
+ cookie?: never;
2996
+ };
2997
+ /**
2998
+ * List a project’s secrets (metadata only)
2659
2999
  * @description Project-scoped secrets only; organization secrets are listed under the organization.
2660
3000
  */
2661
3001
  get: operations["getV1ProjectsProjectIdSecrets"];
@@ -2774,7 +3114,7 @@ export interface paths {
2774
3114
  get: operations["getV1WorkspacesWorkspaceIdSecrets"];
2775
3115
  /**
2776
3116
  * 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.
3117
+ * @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
3118
  */
2779
3119
  put: operations["putV1WorkspacesWorkspaceIdSecrets"];
2780
3120
  post?: never;
@@ -2912,7 +3252,7 @@ export interface paths {
2912
3252
  get: operations["getApiV1WorkspacesWorkspaceIdSecrets"];
2913
3253
  /**
2914
3254
  * 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.
3255
+ * @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
3256
  */
2917
3257
  put: operations["putApiV1WorkspacesWorkspaceIdSecrets"];
2918
3258
  post?: never;
@@ -2972,12 +3312,12 @@ export interface paths {
2972
3312
  };
2973
3313
  /**
2974
3314
  * 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.
3315
+ * @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
3316
  */
2977
3317
  get: operations["getV1WorkspacesWorkspaceIdEgressPolicy"];
2978
3318
  /**
2979
3319
  * 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.
3320
+ * @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
3321
  */
2982
3322
  put: operations["putV1WorkspacesWorkspaceIdEgressPolicy"];
2983
3323
  post?: never;
@@ -3058,12 +3398,12 @@ export interface paths {
3058
3398
  };
3059
3399
  /**
3060
3400
  * 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.
3401
+ * @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
3402
  */
3063
3403
  get: operations["getApiV1WorkspacesWorkspaceIdEgressPolicy"];
3064
3404
  /**
3065
3405
  * 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.
3406
+ * @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
3407
  */
3068
3408
  put: operations["putApiV1WorkspacesWorkspaceIdEgressPolicy"];
3069
3409
  post?: never;
@@ -4225,6 +4565,15 @@ export interface components {
4225
4565
  draft_workspace_id: string;
4226
4566
  checkpoint_id: string | null;
4227
4567
  captured_at: string | null;
4568
+ } | {
4569
+ /** @enum {string} */
4570
+ kind: "template_version";
4571
+ /**
4572
+ * Format: uuid
4573
+ * @description UUIDv7, lowercase canonical form.
4574
+ */
4575
+ template_id: string;
4576
+ version: number;
4228
4577
  };
4229
4578
  /** @description Manifest v2 `defaults` (contracts §19.7). Versions without them report the T1 defaults. */
4230
4579
  TemplateDefaults: {
@@ -4235,10 +4584,384 @@ export interface components {
4235
4584
  memory_mib_ceiling: number;
4236
4585
  disk_gib: number;
4237
4586
  } | null;
4238
- egress: null;
4587
+ egress: components["schemas"]["TemplateEgressDefault"] | null;
4239
4588
  agent_tools: null;
4240
4589
  update_policy: null;
4241
4590
  };
4591
+ /** @description The template’s workspace network ceiling (contracts §24.3): the cell intersects it with the effective egress policy. */
4592
+ TemplateEgressDefault: {
4593
+ /** @enum {string} */
4594
+ mode: "allowlist" | "none";
4595
+ /** @description Normalized (lowercase, sorted); empty for none. */
4596
+ allow_hosts: string[];
4597
+ };
4598
+ /** @description An open-time input: text (a value passed to open) or secret (a stored secret of the same name, bound to the workspace). */
4599
+ TemplateInput: {
4600
+ /** @enum {string} */
4601
+ kind: "text" | "secret";
4602
+ required: boolean;
4603
+ default: string | null;
4604
+ description: string | null;
4605
+ };
4606
+ /** @description A start command (§24.4): create = new workspace layer, boot = every cold boot, resume = every memory restore. */
4607
+ TemplateStartCommand: {
4608
+ name: string;
4609
+ /** @enum {string} */
4610
+ when: "create" | "boot" | "resume";
4611
+ run: string;
4612
+ user: string | null;
4613
+ cwd: string | null;
4614
+ timeout_seconds: number;
4615
+ };
4616
+ /** @description A process the guest keeps running (§24.4); ready before open() returns. */
4617
+ TemplateService: {
4618
+ run: string;
4619
+ user: string | null;
4620
+ cwd: string | null;
4621
+ /** @enum {string} */
4622
+ restart: "always" | "on_failure" | "never";
4623
+ ready: ({
4624
+ port: number;
4625
+ } | {
4626
+ command: string;
4627
+ }) | null;
4628
+ ready_timeout_seconds: number;
4629
+ };
4630
+ /** @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). */
4631
+ TemplateSettings: {
4632
+ env: {
4633
+ [key: string]: string;
4634
+ };
4635
+ inputs: {
4636
+ [key: string]: components["schemas"]["TemplateInput"];
4637
+ };
4638
+ start: components["schemas"]["TemplateStartCommand"][];
4639
+ services: {
4640
+ [key: string]: components["schemas"]["TemplateService"];
4641
+ };
4642
+ defaults: components["schemas"]["TemplateDefaults"];
4643
+ };
4644
+ /** @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). */
4645
+ TemplateSettingsInput: {
4646
+ /** @description Template environment for every exec, PTY, start command and service (below text inputs and the call's env). */
4647
+ env?: {
4648
+ [key: string]: string;
4649
+ };
4650
+ /** @description Open-time inputs. text: a value passed to open({inputs}); secret: a stored secret of the same name, bound to the workspace (§17). */
4651
+ inputs?: {
4652
+ [key: string]: {
4653
+ /** @enum {unknown} */
4654
+ kind: "text" | "secret";
4655
+ /** @description Default: false. */
4656
+ required?: boolean;
4657
+ /** @description text inputs only. */
4658
+ default?: null | string;
4659
+ description?: null | string;
4660
+ };
4661
+ };
4662
+ /** @description Start commands (§24.4): create = on a new workspace layer, boot = every cold boot, resume = every memory restore. */
4663
+ start?: {
4664
+ name: string;
4665
+ /** @enum {unknown} */
4666
+ when: "create" | "boot" | "resume";
4667
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4668
+ run: string;
4669
+ /** @description Absent or null: the template's default user. */
4670
+ user?: null | string;
4671
+ cwd?: null | string;
4672
+ /** @description Default: 300. */
4673
+ timeout_seconds?: number;
4674
+ }[];
4675
+ /** @description Processes kept running by the guest (§24.4); ready before open() returns. */
4676
+ services?: {
4677
+ [key: string]: {
4678
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4679
+ run: string;
4680
+ /** @description Absent or null: the template's default user. */
4681
+ user?: null | string;
4682
+ cwd?: null | string;
4683
+ /**
4684
+ * @description Default: "on_failure".
4685
+ * @enum {unknown}
4686
+ */
4687
+ restart?: "always" | "on_failure" | "never";
4688
+ ready?: null | {
4689
+ port: number;
4690
+ } | {
4691
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4692
+ command: string;
4693
+ };
4694
+ /** @description Default: 60. */
4695
+ ready_timeout_seconds?: number;
4696
+ };
4697
+ };
4698
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
4699
+ defaults?: {
4700
+ /** @enum {unknown} */
4701
+ lifetime?: "persistent" | "session";
4702
+ idle_timeout_seconds?: null | number;
4703
+ /** @description Ceilings enforced at admission (clamped, §24.3). */
4704
+ limits?: null | {
4705
+ cpu_millis_ceiling: number;
4706
+ memory_mib_ceiling: number;
4707
+ disk_gib: number;
4708
+ };
4709
+ /** @description Workspace network ceiling (§24.3): internet = no ceiling (stored as null), allowlist = only allow_hosts (TCP, any port), none = no egress. */
4710
+ egress?: null | {
4711
+ /** @enum {unknown} */
4712
+ mode: "internet" | "allowlist" | "none";
4713
+ allow_hosts?: string[];
4714
+ };
4715
+ agent_tools?: null;
4716
+ update_policy?: null;
4717
+ };
4718
+ };
4719
+ /** @description Recipe v1: a Dockerfile in the host builder’s dialect (no `schema` field). */
4720
+ TemplateRecipeV1: {
4721
+ /** @description `<template slug>@<version>`: a published, non-archived version this organization can use (its own templates first, then platform). Referenced as `FROM shardflux-base`. */
4722
+ base: string;
4723
+ /** @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. */
4724
+ dockerfile: string;
4725
+ /**
4726
+ * @description x86_64 (the default; the only one).
4727
+ * @enum {string}
4728
+ */
4729
+ architecture?: "x86_64";
4730
+ /** @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. */
4731
+ resources?: {
4732
+ /** @description Builder range 500-16000. */
4733
+ cpu_millis?: number;
4734
+ /** @description Builder range 512-32768, even. */
4735
+ memory_mib?: number;
4736
+ /** @description Builder maximum 200. */
4737
+ disk_gib?: number;
4738
+ timeout_seconds?: number;
4739
+ };
4740
+ /** @description Build network: none (default) or egress to the listed DNS names (example.com, *.example.com). */
4741
+ network?: {
4742
+ /** @enum {string} */
4743
+ mode: "none" | "egress_allowlist";
4744
+ allow_hosts?: string[];
4745
+ };
4746
+ };
4747
+ /**
4748
+ * Template recipe v2 (shardflux.template-recipe.v2)
4749
+ * @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.
4750
+ */
4751
+ TemplateRecipeV2: {
4752
+ /** @enum {unknown} */
4753
+ schema: "shardflux.template-recipe.v2";
4754
+ /** @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. */
4755
+ base: string;
4756
+ build: {
4757
+ /** @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). */
4758
+ languages?: {
4759
+ /** @enum {unknown} */
4760
+ id: "python" | "node" | "go" | "rust" | "java";
4761
+ version?: string;
4762
+ }[];
4763
+ packages?: {
4764
+ apt?: string[];
4765
+ /** @description Installed into /opt/venv (implies the python language). */
4766
+ pip?: {
4767
+ packages?: string[];
4768
+ /** @description Absolute paths of requirements files inside the template (usually from files[]), installed with pip -r. */
4769
+ requirements?: string[];
4770
+ };
4771
+ /** @description npm install -g (implies the node language unless the base has node). */
4772
+ npm?: string[];
4773
+ };
4774
+ /** @description Uploaded files and folders (§24.2), applied in this order (a later entry overwrites an earlier one). */
4775
+ files?: {
4776
+ /** @description An upload of this organization: sha256:<64 lower-case hex>. */
4777
+ upload?: string;
4778
+ /** @description template.yaml only: a local file (kind file) or directory (kind tar) the client uploads. Refused by the API. */
4779
+ from?: string;
4780
+ /** @enum {unknown} */
4781
+ kind: "file" | "tar";
4782
+ /** @description kind file: the file's path; kind tar: the directory the archive is extracted into. Platform-owned paths are refused (§24.1). */
4783
+ to: string;
4784
+ /** @description Default root. */
4785
+ owner?: string;
4786
+ /** @description Octal permission bits of a file (default 0644); absent or null for kind tar. */
4787
+ mode?: null | string;
4788
+ }[];
4789
+ /** @description Named build scripts, run in this order after languages, apt, files, pip and npm. */
4790
+ steps?: {
4791
+ name: string;
4792
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4793
+ run: string;
4794
+ /** @description Default root. */
4795
+ user?: string;
4796
+ cwd?: null | string;
4797
+ env?: {
4798
+ [key: string]: string;
4799
+ };
4800
+ }[];
4801
+ /** @description Build network (§24.1). auto (default): hosts derived from the recipe plus extra_hosts; none: no egress; allowlist: exactly allow_hosts. */
4802
+ network?: {
4803
+ /** @enum {unknown} */
4804
+ build?: "auto" | "none" | "allowlist";
4805
+ extra_hosts?: string[];
4806
+ allow_hosts?: string[];
4807
+ };
4808
+ };
4809
+ /** @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). */
4810
+ settings: {
4811
+ /** @description Template environment for every exec, PTY, start command and service (below text inputs and the call's env). */
4812
+ env?: {
4813
+ [key: string]: string;
4814
+ };
4815
+ /** @description Open-time inputs. text: a value passed to open({inputs}); secret: a stored secret of the same name, bound to the workspace (§17). */
4816
+ inputs?: {
4817
+ [key: string]: {
4818
+ /** @enum {unknown} */
4819
+ kind: "text" | "secret";
4820
+ /** @description Default: false. */
4821
+ required?: boolean;
4822
+ /** @description text inputs only. */
4823
+ default?: null | string;
4824
+ description?: null | string;
4825
+ };
4826
+ };
4827
+ /** @description Start commands (§24.4): create = on a new workspace layer, boot = every cold boot, resume = every memory restore. */
4828
+ start?: {
4829
+ name: string;
4830
+ /** @enum {unknown} */
4831
+ when: "create" | "boot" | "resume";
4832
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4833
+ run: string;
4834
+ /** @description Absent or null: the template's default user. */
4835
+ user?: null | string;
4836
+ cwd?: null | string;
4837
+ /** @description Default: 300. */
4838
+ timeout_seconds?: number;
4839
+ }[];
4840
+ /** @description Processes kept running by the guest (§24.4); ready before open() returns. */
4841
+ services?: {
4842
+ [key: string]: {
4843
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4844
+ run: string;
4845
+ /** @description Absent or null: the template's default user. */
4846
+ user?: null | string;
4847
+ cwd?: null | string;
4848
+ /**
4849
+ * @description Default: "on_failure".
4850
+ * @enum {unknown}
4851
+ */
4852
+ restart?: "always" | "on_failure" | "never";
4853
+ ready?: null | {
4854
+ port: number;
4855
+ } | {
4856
+ /** @description Shell script run by /bin/bash -euo pipefail -c; 1..65536 bytes, no NUL. */
4857
+ command: string;
4858
+ };
4859
+ /** @description Default: 60. */
4860
+ ready_timeout_seconds?: number;
4861
+ };
4862
+ };
4863
+ /** @description Manifest defaults (§19.7, §24.3). agent_tools and update_policy stay reserved (null). */
4864
+ defaults?: {
4865
+ /** @enum {unknown} */
4866
+ lifetime?: "persistent" | "session";
4867
+ idle_timeout_seconds?: null | number;
4868
+ /** @description Ceilings enforced at admission (clamped, §24.3). */
4869
+ limits?: null | {
4870
+ cpu_millis_ceiling: number;
4871
+ memory_mib_ceiling: number;
4872
+ disk_gib: number;
4873
+ };
4874
+ /** @description Workspace network ceiling (§24.3): internet = no ceiling (stored as null), allowlist = only allow_hosts (TCP, any port), none = no egress. */
4875
+ egress?: null | {
4876
+ /** @enum {unknown} */
4877
+ mode: "internet" | "allowlist" | "none";
4878
+ allow_hosts?: string[];
4879
+ };
4880
+ agent_tools?: null;
4881
+ update_policy?: null;
4882
+ };
4883
+ };
4884
+ /** @description Builder VM bounds, exactly as recipe v1 `resources` (not part of recipe_sha256). */
4885
+ resources?: {
4886
+ cpu_millis?: number;
4887
+ memory_mib?: number;
4888
+ disk_gib?: number;
4889
+ timeout_seconds?: number;
4890
+ };
4891
+ };
4892
+ TemplateUploadRequest: {
4893
+ /** @description Lower-case hex SHA-256 of the bytes. */
4894
+ sha256: string;
4895
+ /** @description Bytes, at most 5368709120 (5 GiB; more is 422 upload_too_large). */
4896
+ size: number;
4897
+ /**
4898
+ * @description file, or tar (an uncompressed ustar/pax archive of a folder). Recorded for display; the recipe entry decides.
4899
+ * @enum {string}
4900
+ */
4901
+ kind: "file" | "tar";
4902
+ };
4903
+ TemplateUpload: {
4904
+ sha256: string;
4905
+ size: number;
4906
+ /** @enum {string} */
4907
+ kind: "file" | "tar";
4908
+ /**
4909
+ * @description available: verified in the bucket (a recipe may reference it as sha256:<hex>); pending: PUT the bytes first.
4910
+ * @enum {string}
4911
+ */
4912
+ state: "pending" | "available";
4913
+ /**
4914
+ * Format: date-time
4915
+ * @description RFC 3339 UTC timestamp with Z.
4916
+ */
4917
+ created_at: string;
4918
+ verified_at: string | null;
4919
+ };
4920
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
4921
+ TemplateUploadResponse: {
4922
+ upload: components["schemas"]["TemplateUpload"];
4923
+ put: {
4924
+ /** @description Presigned S3 PutObject URL (a bearer credential until expires_at: do not log or share it). */
4925
+ url: string;
4926
+ /** @enum {string} */
4927
+ method: "PUT";
4928
+ /** @description Send every header verbatim (x-amz-checksum-sha256 and content-length are signed; S3 refuses other bytes). */
4929
+ headers: {
4930
+ [key: string]: string;
4931
+ };
4932
+ /**
4933
+ * Format: date-time
4934
+ * @description RFC 3339 UTC timestamp with Z.
4935
+ */
4936
+ expires_at: string;
4937
+ } | null;
4938
+ };
4939
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
4940
+ TemplateVersionRecipe: {
4941
+ version: number;
4942
+ source_kind: ("recipe" | "workspace" | "git") | null;
4943
+ recipe: (components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"]) | null;
4944
+ settings: components["schemas"]["TemplateSettings"];
4945
+ };
4946
+ TemplatePackagePage: {
4947
+ data: {
4948
+ name: string;
4949
+ version: string | null;
4950
+ summary: string | null;
4951
+ }[];
4952
+ /**
4953
+ * @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.
4954
+ * @enum {string}
4955
+ */
4956
+ source: "apt_index" | "pypi_names" | "npm_search";
4957
+ };
4958
+ TemplatePackage: {
4959
+ name: string;
4960
+ version: string | null;
4961
+ summary: string | null;
4962
+ /** @description Known versions, newest first (at most 200). */
4963
+ versions: string[];
4964
+ };
4242
4965
  /** @description How the version was produced: a recipe build, a saved workspace (or draft), or git (reserved). */
4243
4966
  TemplateSource: {
4244
4967
  /** @enum {string} */
@@ -4434,11 +5157,14 @@ export interface components {
4434
5157
  /** @enum {string} */
4435
5158
  timeout_seconds: "request" | "plan" | "platform";
4436
5159
  };
5160
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
4437
5161
  network: {
4438
5162
  /** @enum {string} */
4439
5163
  mode: "none" | "egress_allowlist";
4440
5164
  allow_hosts: string[];
4441
5165
  };
5166
+ /** @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. */
5167
+ denied_hosts: string[];
4442
5168
  provenance: {
4443
5169
  recipe_schema: string | null;
4444
5170
  recipe_sha256: string | null;
@@ -4446,9 +5172,81 @@ export interface components {
4446
5172
  builder_id: string | null;
4447
5173
  attempt: number;
4448
5174
  };
4449
- /** @description Only on GET of one build. */
5175
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
4450
5176
  recipe?: {
4451
5177
  dockerfile: string;
5178
+ } | {
5179
+ /** @enum {string} */
5180
+ schema: "shardflux.template-recipe.v2";
5181
+ build: {
5182
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
5183
+ languages: {
5184
+ id: string;
5185
+ version: string;
5186
+ /** @enum {string} */
5187
+ source: "install" | "base";
5188
+ url: string | null;
5189
+ sha256: string | null;
5190
+ }[];
5191
+ packages: {
5192
+ apt: string[];
5193
+ pip: {
5194
+ packages: string[];
5195
+ requirements: string[];
5196
+ };
5197
+ npm: string[];
5198
+ };
5199
+ files: {
5200
+ upload: string;
5201
+ /** @enum {string} */
5202
+ kind: "file" | "tar";
5203
+ to: string;
5204
+ owner: string;
5205
+ mode: string | null;
5206
+ size: number;
5207
+ }[];
5208
+ steps: {
5209
+ name: string;
5210
+ run: string;
5211
+ user: string;
5212
+ cwd: string | null;
5213
+ env: {
5214
+ [key: string]: string;
5215
+ };
5216
+ }[];
5217
+ network: {
5218
+ /** @enum {string} */
5219
+ build: "auto" | "none" | "allowlist";
5220
+ extra_hosts: string[];
5221
+ allow_hosts: string[];
5222
+ };
5223
+ };
5224
+ settings: components["schemas"]["TemplateSettings"];
5225
+ compiled: {
5226
+ compiler: string;
5227
+ language_table_sha256: string;
5228
+ build_env: {
5229
+ [key: string]: string;
5230
+ };
5231
+ steps: {
5232
+ [key: string]: unknown;
5233
+ }[];
5234
+ tools: {
5235
+ name: string;
5236
+ argv: string[];
5237
+ }[];
5238
+ network: {
5239
+ /** @enum {string} */
5240
+ mode: "none" | "egress_allowlist";
5241
+ allow_hosts: string[];
5242
+ };
5243
+ objects: {
5244
+ sha256: string;
5245
+ size: number;
5246
+ /** @enum {string} */
5247
+ kind: "file" | "tar";
5248
+ }[];
5249
+ };
4452
5250
  };
4453
5251
  result: {
4454
5252
  artifact_sha256: string | null;
@@ -4496,7 +5294,7 @@ export interface components {
4496
5294
  last_heartbeat_at: string | null;
4497
5295
  };
4498
5296
  /**
4499
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
5297
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
4500
5298
  * @enum {string}
4501
5299
  */
4502
5300
  source_kind: "recipe" | "workspace";
@@ -4542,6 +5340,8 @@ export interface components {
4542
5340
  * @description UUIDv7, lowercase canonical form.
4543
5341
  */
4544
5342
  project_id?: string;
5343
+ /** @description Template name when this draft creates the organization template (default: the slug). */
5344
+ display_name?: string;
4545
5345
  caps?: {
4546
5346
  cpu_millis?: number;
4547
5347
  memory_mib?: number;
@@ -4549,6 +5349,10 @@ export interface components {
4549
5349
  };
4550
5350
  agent_label?: string;
4551
5351
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5352
+ /** @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}). */
5353
+ inputs?: {
5354
+ [key: string]: unknown;
5355
+ };
4552
5356
  };
4553
5357
  CreateTestInstanceBody: {
4554
5358
  /**
@@ -4565,6 +5369,10 @@ export interface components {
4565
5369
  };
4566
5370
  agent_label?: string;
4567
5371
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5372
+ /** @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}). */
5373
+ inputs?: {
5374
+ [key: string]: unknown;
5375
+ };
4568
5376
  };
4569
5377
  PublishDraftBody: {
4570
5378
  /**
@@ -4582,12 +5390,16 @@ export interface components {
4582
5390
  memory_mib_ceiling: number;
4583
5391
  disk_gib: number;
4584
5392
  } | null;
4585
- /** @description Reserved (T2). */
4586
- egress?: null;
5393
+ egress?: {
5394
+ /** @enum {string} */
5395
+ mode: "internet" | "allowlist" | "none";
5396
+ allow_hosts?: string[];
5397
+ } | null;
4587
5398
  /** @description Reserved (T2). */
4588
5399
  agent_tools?: null;
4589
5400
  update_policy?: ("pinned" | "auto") | null;
4590
5401
  };
5402
+ settings?: components["schemas"]["TemplateSettingsInput"];
4591
5403
  /** @default true */
4592
5404
  auto_publish: boolean;
4593
5405
  /** @description Up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
@@ -4609,8 +5421,11 @@ export interface components {
4609
5421
  memory_mib_ceiling: number;
4610
5422
  disk_gib: number;
4611
5423
  } | null;
4612
- /** @description Reserved (T2). */
4613
- egress?: null;
5424
+ egress?: {
5425
+ /** @enum {string} */
5426
+ mode: "internet" | "allowlist" | "none";
5427
+ allow_hosts?: string[];
5428
+ } | null;
4614
5429
  /** @description Reserved (T2). */
4615
5430
  agent_tools?: null;
4616
5431
  update_policy?: ("pinned" | "auto") | null;
@@ -4624,6 +5439,7 @@ export interface components {
4624
5439
  auto_publish: boolean;
4625
5440
  /** @description Up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
4626
5441
  acknowledged_scan_findings?: string[];
5442
+ settings?: components["schemas"]["TemplateSettingsInput"];
4627
5443
  };
4628
5444
  /** @description operation: the capture (layer_snapshot) of a running workspace, null otherwise. build: poll GET …/template-builds/{id} until registration.state is registered. */
4629
5445
  SaveAsTemplateResponse: {
@@ -4717,6 +5533,49 @@ export interface components {
4717
5533
  bytes_removed: number;
4718
5534
  } | null;
4719
5535
  };
5536
+ /** @description Start commands and services of the workspace’s template version (contracts §24.4); null when the version has none. */
5537
+ WorkspaceStartup: {
5538
+ /**
5539
+ * @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).
5540
+ * @enum {string}
5541
+ */
5542
+ state: "pending" | "running" | "ready" | "failed";
5543
+ trigger: ("create" | "boot" | "resume") | null;
5544
+ step: string | null;
5545
+ service: string | null;
5546
+ exit_code: number | null;
5547
+ output_tail: string | null;
5548
+ reason: string | null;
5549
+ operation_id: string | null;
5550
+ at: string | null;
5551
+ };
5552
+ WorkspaceInputs: {
5553
+ /** @description The workspace’s text inputs (name → value). Secret inputs are bound secrets (GET …/secrets), never listed here. */
5554
+ inputs: {
5555
+ [key: string]: string;
5556
+ };
5557
+ };
5558
+ /** @description project_id: required for browser sessions (API keys open in their own project). */
5559
+ CreateVersionTestInstanceBody: {
5560
+ /** @description Workspace key (default sf:test:<slug>:<8 hex>); caller keys starting with sf: are reserved. */
5561
+ key?: string;
5562
+ caps?: {
5563
+ cpu_millis?: number;
5564
+ memory_mib?: number;
5565
+ disk_gib?: number;
5566
+ };
5567
+ agent_label?: string;
5568
+ tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
5569
+ /** @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}). */
5570
+ inputs?: {
5571
+ [key: string]: unknown;
5572
+ };
5573
+ /**
5574
+ * Format: uuid
5575
+ * @description UUIDv7, lowercase canonical form.
5576
+ */
5577
+ project_id?: string;
5578
+ };
4720
5579
  Workspace: {
4721
5580
  /**
4722
5581
  * Format: uuid
@@ -4817,6 +5676,7 @@ export interface components {
4817
5676
  ended_reason: ("closed" | "idle_timeout" | "draft_discarded") | null;
4818
5677
  dev_template_id: string | null;
4819
5678
  update_policy: components["schemas"]["UpdatePolicy"];
5679
+ startup: components["schemas"]["WorkspaceStartup"] | null;
4820
5680
  /**
4821
5681
  * Format: date-time
4822
5682
  * @description RFC 3339 UTC timestamp with Z.
@@ -8403,6 +9263,10 @@ export interface operations {
8403
9263
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
8404
9264
  /** @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
9265
  secrets?: string[];
9266
+ /** @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}). */
9267
+ inputs?: {
9268
+ [key: string]: unknown;
9269
+ };
8406
9270
  lifetime?: components["schemas"]["WorkspaceLifetime"];
8407
9271
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
8408
9272
  idle_policy?: string;
@@ -8658,6 +9522,47 @@ export interface operations {
8658
9522
  };
8659
9523
  };
8660
9524
  };
9525
+ getV1WorkspacesWorkspaceIdInputs: {
9526
+ parameters: {
9527
+ query?: never;
9528
+ header?: never;
9529
+ path: {
9530
+ /** @description UUIDv7, lowercase canonical form. */
9531
+ workspace_id: string;
9532
+ };
9533
+ cookie?: never;
9534
+ };
9535
+ requestBody?: never;
9536
+ responses: {
9537
+ /** @description Default Response */
9538
+ 200: {
9539
+ headers: {
9540
+ [name: string]: unknown;
9541
+ };
9542
+ content: {
9543
+ "application/json": components["schemas"]["WorkspaceInputs"];
9544
+ };
9545
+ };
9546
+ /** @description Default Response */
9547
+ "4XX": {
9548
+ headers: {
9549
+ [name: string]: unknown;
9550
+ };
9551
+ content: {
9552
+ "application/json": components["schemas"]["ErrorBody"];
9553
+ };
9554
+ };
9555
+ /** @description Default Response */
9556
+ "5XX": {
9557
+ headers: {
9558
+ [name: string]: unknown;
9559
+ };
9560
+ content: {
9561
+ "application/json": components["schemas"]["ErrorBody"];
9562
+ };
9563
+ };
9564
+ };
9565
+ };
8661
9566
  putV1WorkspacesWorkspaceIdIdlePolicy: {
8662
9567
  parameters: {
8663
9568
  query?: never;
@@ -9364,6 +10269,10 @@ export interface operations {
9364
10269
  tools?: ("exec" | "files" | "pty" | "process" | "git" | "browser")[];
9365
10270
  /** @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
10271
  secrets?: string[];
10272
+ /** @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}). */
10273
+ inputs?: {
10274
+ [key: string]: unknown;
10275
+ };
9367
10276
  lifetime?: components["schemas"]["WorkspaceLifetime"];
9368
10277
  /** @description adaptive (the learned timeout, default), never, or fixed:<seconds> (60..604800). Contracts §20.7. */
9369
10278
  idle_policy?: string;
@@ -9619,7 +10528,7 @@ export interface operations {
9619
10528
  };
9620
10529
  };
9621
10530
  };
9622
- putApiV1WorkspacesWorkspaceIdIdlePolicy: {
10531
+ getApiV1WorkspacesWorkspaceIdInputs: {
9623
10532
  parameters: {
9624
10533
  query?: never;
9625
10534
  header?: never;
@@ -9629,7 +10538,48 @@ export interface operations {
9629
10538
  };
9630
10539
  cookie?: never;
9631
10540
  };
9632
- requestBody: {
10541
+ requestBody?: never;
10542
+ responses: {
10543
+ /** @description Default Response */
10544
+ 200: {
10545
+ headers: {
10546
+ [name: string]: unknown;
10547
+ };
10548
+ content: {
10549
+ "application/json": components["schemas"]["WorkspaceInputs"];
10550
+ };
10551
+ };
10552
+ /** @description Default Response */
10553
+ "4XX": {
10554
+ headers: {
10555
+ [name: string]: unknown;
10556
+ };
10557
+ content: {
10558
+ "application/json": components["schemas"]["ErrorBody"];
10559
+ };
10560
+ };
10561
+ /** @description Default Response */
10562
+ "5XX": {
10563
+ headers: {
10564
+ [name: string]: unknown;
10565
+ };
10566
+ content: {
10567
+ "application/json": components["schemas"]["ErrorBody"];
10568
+ };
10569
+ };
10570
+ };
10571
+ };
10572
+ putApiV1WorkspacesWorkspaceIdIdlePolicy: {
10573
+ parameters: {
10574
+ query?: never;
10575
+ header?: never;
10576
+ path: {
10577
+ /** @description UUIDv7, lowercase canonical form. */
10578
+ workspace_id: string;
10579
+ };
10580
+ cookie?: never;
10581
+ };
10582
+ requestBody: {
9633
10583
  content: {
9634
10584
  "application/json": {
9635
10585
  idle_policy: string | null;
@@ -11333,6 +12283,7 @@ export interface operations {
11333
12283
  rootfs_sha256: string | null;
11334
12284
  } | null;
11335
12285
  defaults: components["schemas"]["TemplateDefaults"];
12286
+ settings: components["schemas"]["TemplateSettings"];
11336
12287
  files: components["schemas"]["TemplateFilesSummary"];
11337
12288
  rootfs_bytes: number | null;
11338
12289
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11377,6 +12328,7 @@ export interface operations {
11377
12328
  created_at: string;
11378
12329
  } | null;
11379
12330
  update_policy: components["schemas"]["UpdatePolicy"];
12331
+ category: ("os" | "stack") | null;
11380
12332
  }[];
11381
12333
  next_cursor: string | null;
11382
12334
  };
@@ -11543,6 +12495,7 @@ export interface operations {
11543
12495
  rootfs_sha256: string | null;
11544
12496
  } | null;
11545
12497
  defaults: components["schemas"]["TemplateDefaults"];
12498
+ settings: components["schemas"]["TemplateSettings"];
11546
12499
  files: components["schemas"]["TemplateFilesSummary"];
11547
12500
  rootfs_bytes: number | null;
11548
12501
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11587,6 +12540,7 @@ export interface operations {
11587
12540
  created_at: string;
11588
12541
  } | null;
11589
12542
  update_policy: components["schemas"]["UpdatePolicy"];
12543
+ category: ("os" | "stack") | null;
11590
12544
  plan: {
11591
12545
  plan_key: string;
11592
12546
  catalog_version: string;
@@ -11700,6 +12654,7 @@ export interface operations {
11700
12654
  rootfs_sha256: string | null;
11701
12655
  } | null;
11702
12656
  defaults: components["schemas"]["TemplateDefaults"];
12657
+ settings: components["schemas"]["TemplateSettings"];
11703
12658
  files: components["schemas"]["TemplateFilesSummary"];
11704
12659
  rootfs_bytes: number | null;
11705
12660
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11877,6 +12832,7 @@ export interface operations {
11877
12832
  rootfs_sha256: string | null;
11878
12833
  } | null;
11879
12834
  defaults: components["schemas"]["TemplateDefaults"];
12835
+ settings: components["schemas"]["TemplateSettings"];
11880
12836
  files: components["schemas"]["TemplateFilesSummary"];
11881
12837
  rootfs_bytes: number | null;
11882
12838
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -11921,6 +12877,7 @@ export interface operations {
11921
12877
  created_at: string;
11922
12878
  } | null;
11923
12879
  update_policy: components["schemas"]["UpdatePolicy"];
12880
+ category: ("os" | "stack") | null;
11924
12881
  }[];
11925
12882
  next_cursor: string | null;
11926
12883
  };
@@ -12085,6 +13042,7 @@ export interface operations {
12085
13042
  rootfs_sha256: string | null;
12086
13043
  } | null;
12087
13044
  defaults: components["schemas"]["TemplateDefaults"];
13045
+ settings: components["schemas"]["TemplateSettings"];
12088
13046
  files: components["schemas"]["TemplateFilesSummary"];
12089
13047
  rootfs_bytes: number | null;
12090
13048
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -12129,6 +13087,7 @@ export interface operations {
12129
13087
  created_at: string;
12130
13088
  } | null;
12131
13089
  update_policy: components["schemas"]["UpdatePolicy"];
13090
+ category: ("os" | "stack") | null;
12132
13091
  plan: {
12133
13092
  plan_key: string;
12134
13093
  catalog_version: string;
@@ -12242,6 +13201,7 @@ export interface operations {
12242
13201
  rootfs_sha256: string | null;
12243
13202
  } | null;
12244
13203
  defaults: components["schemas"]["TemplateDefaults"];
13204
+ settings: components["schemas"]["TemplateSettings"];
12245
13205
  files: components["schemas"]["TemplateFilesSummary"];
12246
13206
  rootfs_bytes: number | null;
12247
13207
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -12416,11 +13376,14 @@ export interface operations {
12416
13376
  /** @enum {string} */
12417
13377
  timeout_seconds: "request" | "plan" | "platform";
12418
13378
  };
13379
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12419
13380
  network: {
12420
13381
  /** @enum {string} */
12421
13382
  mode: "none" | "egress_allowlist";
12422
13383
  allow_hosts: string[];
12423
13384
  };
13385
+ /** @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. */
13386
+ denied_hosts: string[];
12424
13387
  provenance: {
12425
13388
  recipe_schema: string | null;
12426
13389
  recipe_sha256: string | null;
@@ -12428,9 +13391,81 @@ export interface operations {
12428
13391
  builder_id: string | null;
12429
13392
  attempt: number;
12430
13393
  };
12431
- /** @description Only on GET of one build. */
13394
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12432
13395
  recipe?: {
12433
13396
  dockerfile: string;
13397
+ } | {
13398
+ /** @enum {string} */
13399
+ schema: "shardflux.template-recipe.v2";
13400
+ build: {
13401
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
13402
+ languages: {
13403
+ id: string;
13404
+ version: string;
13405
+ /** @enum {string} */
13406
+ source: "install" | "base";
13407
+ url: string | null;
13408
+ sha256: string | null;
13409
+ }[];
13410
+ packages: {
13411
+ apt: string[];
13412
+ pip: {
13413
+ packages: string[];
13414
+ requirements: string[];
13415
+ };
13416
+ npm: string[];
13417
+ };
13418
+ files: {
13419
+ upload: string;
13420
+ /** @enum {string} */
13421
+ kind: "file" | "tar";
13422
+ to: string;
13423
+ owner: string;
13424
+ mode: string | null;
13425
+ size: number;
13426
+ }[];
13427
+ steps: {
13428
+ name: string;
13429
+ run: string;
13430
+ user: string;
13431
+ cwd: string | null;
13432
+ env: {
13433
+ [key: string]: string;
13434
+ };
13435
+ }[];
13436
+ network: {
13437
+ /** @enum {string} */
13438
+ build: "auto" | "none" | "allowlist";
13439
+ extra_hosts: string[];
13440
+ allow_hosts: string[];
13441
+ };
13442
+ };
13443
+ settings: components["schemas"]["TemplateSettings"];
13444
+ compiled: {
13445
+ compiler: string;
13446
+ language_table_sha256: string;
13447
+ build_env: {
13448
+ [key: string]: string;
13449
+ };
13450
+ steps: {
13451
+ [key: string]: unknown;
13452
+ }[];
13453
+ tools: {
13454
+ name: string;
13455
+ argv: string[];
13456
+ }[];
13457
+ network: {
13458
+ /** @enum {string} */
13459
+ mode: "none" | "egress_allowlist";
13460
+ allow_hosts: string[];
13461
+ };
13462
+ objects: {
13463
+ sha256: string;
13464
+ size: number;
13465
+ /** @enum {string} */
13466
+ kind: "file" | "tar";
13467
+ }[];
13468
+ };
12434
13469
  };
12435
13470
  result: {
12436
13471
  artifact_sha256: string | null;
@@ -12478,7 +13513,7 @@ export interface operations {
12478
13513
  last_heartbeat_at: string | null;
12479
13514
  };
12480
13515
  /**
12481
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
13516
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12482
13517
  * @enum {string}
12483
13518
  */
12484
13519
  source_kind: "recipe" | "workspace";
@@ -12531,7 +13566,7 @@ export interface operations {
12531
13566
  requestBody: {
12532
13567
  content: {
12533
13568
  "application/json": {
12534
- /** @description Organization template to build into (created by the first build). Platform slugs are refused. */
13569
+ /** @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
13570
  template_slug: string;
12536
13571
  /**
12537
13572
  * @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 +13575,12 @@ export interface operations {
12540
13575
  auto_publish?: boolean;
12541
13576
  /** @description Template name when this build creates the template. */
12542
13577
  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
- };
13578
+ /** @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). */
13579
+ recipe: components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"];
13580
+ /** @description The version description (manifest `description`). */
13581
+ description?: string;
13582
+ /** @description Recipe v2 only: up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
13583
+ acknowledged_scan_findings?: string[];
12570
13584
  };
12571
13585
  };
12572
13586
  };
@@ -12688,11 +13702,14 @@ export interface operations {
12688
13702
  /** @enum {string} */
12689
13703
  timeout_seconds: "request" | "plan" | "platform";
12690
13704
  };
13705
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12691
13706
  network: {
12692
13707
  /** @enum {string} */
12693
13708
  mode: "none" | "egress_allowlist";
12694
13709
  allow_hosts: string[];
12695
13710
  };
13711
+ /** @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. */
13712
+ denied_hosts: string[];
12696
13713
  provenance: {
12697
13714
  recipe_schema: string | null;
12698
13715
  recipe_sha256: string | null;
@@ -12700,9 +13717,81 @@ export interface operations {
12700
13717
  builder_id: string | null;
12701
13718
  attempt: number;
12702
13719
  };
12703
- /** @description Only on GET of one build. */
13720
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12704
13721
  recipe?: {
12705
13722
  dockerfile: string;
13723
+ } | {
13724
+ /** @enum {string} */
13725
+ schema: "shardflux.template-recipe.v2";
13726
+ build: {
13727
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
13728
+ languages: {
13729
+ id: string;
13730
+ version: string;
13731
+ /** @enum {string} */
13732
+ source: "install" | "base";
13733
+ url: string | null;
13734
+ sha256: string | null;
13735
+ }[];
13736
+ packages: {
13737
+ apt: string[];
13738
+ pip: {
13739
+ packages: string[];
13740
+ requirements: string[];
13741
+ };
13742
+ npm: string[];
13743
+ };
13744
+ files: {
13745
+ upload: string;
13746
+ /** @enum {string} */
13747
+ kind: "file" | "tar";
13748
+ to: string;
13749
+ owner: string;
13750
+ mode: string | null;
13751
+ size: number;
13752
+ }[];
13753
+ steps: {
13754
+ name: string;
13755
+ run: string;
13756
+ user: string;
13757
+ cwd: string | null;
13758
+ env: {
13759
+ [key: string]: string;
13760
+ };
13761
+ }[];
13762
+ network: {
13763
+ /** @enum {string} */
13764
+ build: "auto" | "none" | "allowlist";
13765
+ extra_hosts: string[];
13766
+ allow_hosts: string[];
13767
+ };
13768
+ };
13769
+ settings: components["schemas"]["TemplateSettings"];
13770
+ compiled: {
13771
+ compiler: string;
13772
+ language_table_sha256: string;
13773
+ build_env: {
13774
+ [key: string]: string;
13775
+ };
13776
+ steps: {
13777
+ [key: string]: unknown;
13778
+ }[];
13779
+ tools: {
13780
+ name: string;
13781
+ argv: string[];
13782
+ }[];
13783
+ network: {
13784
+ /** @enum {string} */
13785
+ mode: "none" | "egress_allowlist";
13786
+ allow_hosts: string[];
13787
+ };
13788
+ objects: {
13789
+ sha256: string;
13790
+ size: number;
13791
+ /** @enum {string} */
13792
+ kind: "file" | "tar";
13793
+ }[];
13794
+ };
12706
13795
  };
12707
13796
  result: {
12708
13797
  artifact_sha256: string | null;
@@ -12750,7 +13839,7 @@ export interface operations {
12750
13839
  last_heartbeat_at: string | null;
12751
13840
  };
12752
13841
  /**
12753
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
13842
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12754
13843
  * @enum {string}
12755
13844
  */
12756
13845
  source_kind: "recipe" | "workspace";
@@ -12922,11 +14011,14 @@ export interface operations {
12922
14011
  /** @enum {string} */
12923
14012
  timeout_seconds: "request" | "plan" | "platform";
12924
14013
  };
14014
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
12925
14015
  network: {
12926
14016
  /** @enum {string} */
12927
14017
  mode: "none" | "egress_allowlist";
12928
14018
  allow_hosts: string[];
12929
14019
  };
14020
+ /** @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. */
14021
+ denied_hosts: string[];
12930
14022
  provenance: {
12931
14023
  recipe_schema: string | null;
12932
14024
  recipe_sha256: string | null;
@@ -12934,9 +14026,81 @@ export interface operations {
12934
14026
  builder_id: string | null;
12935
14027
  attempt: number;
12936
14028
  };
12937
- /** @description Only on GET of one build. */
14029
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
12938
14030
  recipe?: {
12939
14031
  dockerfile: string;
14032
+ } | {
14033
+ /** @enum {string} */
14034
+ schema: "shardflux.template-recipe.v2";
14035
+ build: {
14036
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14037
+ languages: {
14038
+ id: string;
14039
+ version: string;
14040
+ /** @enum {string} */
14041
+ source: "install" | "base";
14042
+ url: string | null;
14043
+ sha256: string | null;
14044
+ }[];
14045
+ packages: {
14046
+ apt: string[];
14047
+ pip: {
14048
+ packages: string[];
14049
+ requirements: string[];
14050
+ };
14051
+ npm: string[];
14052
+ };
14053
+ files: {
14054
+ upload: string;
14055
+ /** @enum {string} */
14056
+ kind: "file" | "tar";
14057
+ to: string;
14058
+ owner: string;
14059
+ mode: string | null;
14060
+ size: number;
14061
+ }[];
14062
+ steps: {
14063
+ name: string;
14064
+ run: string;
14065
+ user: string;
14066
+ cwd: string | null;
14067
+ env: {
14068
+ [key: string]: string;
14069
+ };
14070
+ }[];
14071
+ network: {
14072
+ /** @enum {string} */
14073
+ build: "auto" | "none" | "allowlist";
14074
+ extra_hosts: string[];
14075
+ allow_hosts: string[];
14076
+ };
14077
+ };
14078
+ settings: components["schemas"]["TemplateSettings"];
14079
+ compiled: {
14080
+ compiler: string;
14081
+ language_table_sha256: string;
14082
+ build_env: {
14083
+ [key: string]: string;
14084
+ };
14085
+ steps: {
14086
+ [key: string]: unknown;
14087
+ }[];
14088
+ tools: {
14089
+ name: string;
14090
+ argv: string[];
14091
+ }[];
14092
+ network: {
14093
+ /** @enum {string} */
14094
+ mode: "none" | "egress_allowlist";
14095
+ allow_hosts: string[];
14096
+ };
14097
+ objects: {
14098
+ sha256: string;
14099
+ size: number;
14100
+ /** @enum {string} */
14101
+ kind: "file" | "tar";
14102
+ }[];
14103
+ };
12940
14104
  };
12941
14105
  result: {
12942
14106
  artifact_sha256: string | null;
@@ -12984,7 +14148,7 @@ export interface operations {
12984
14148
  last_heartbeat_at: string | null;
12985
14149
  };
12986
14150
  /**
12987
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14151
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
12988
14152
  * @enum {string}
12989
14153
  */
12990
14154
  source_kind: "recipe" | "workspace";
@@ -13153,11 +14317,14 @@ export interface operations {
13153
14317
  /** @enum {string} */
13154
14318
  timeout_seconds: "request" | "plan" | "platform";
13155
14319
  };
14320
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
13156
14321
  network: {
13157
14322
  /** @enum {string} */
13158
14323
  mode: "none" | "egress_allowlist";
13159
14324
  allow_hosts: string[];
13160
14325
  };
14326
+ /** @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. */
14327
+ denied_hosts: string[];
13161
14328
  provenance: {
13162
14329
  recipe_schema: string | null;
13163
14330
  recipe_sha256: string | null;
@@ -13165,9 +14332,81 @@ export interface operations {
13165
14332
  builder_id: string | null;
13166
14333
  attempt: number;
13167
14334
  };
13168
- /** @description Only on GET of one build. */
14335
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
13169
14336
  recipe?: {
13170
14337
  dockerfile: string;
14338
+ } | {
14339
+ /** @enum {string} */
14340
+ schema: "shardflux.template-recipe.v2";
14341
+ build: {
14342
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14343
+ languages: {
14344
+ id: string;
14345
+ version: string;
14346
+ /** @enum {string} */
14347
+ source: "install" | "base";
14348
+ url: string | null;
14349
+ sha256: string | null;
14350
+ }[];
14351
+ packages: {
14352
+ apt: string[];
14353
+ pip: {
14354
+ packages: string[];
14355
+ requirements: string[];
14356
+ };
14357
+ npm: string[];
14358
+ };
14359
+ files: {
14360
+ upload: string;
14361
+ /** @enum {string} */
14362
+ kind: "file" | "tar";
14363
+ to: string;
14364
+ owner: string;
14365
+ mode: string | null;
14366
+ size: number;
14367
+ }[];
14368
+ steps: {
14369
+ name: string;
14370
+ run: string;
14371
+ user: string;
14372
+ cwd: string | null;
14373
+ env: {
14374
+ [key: string]: string;
14375
+ };
14376
+ }[];
14377
+ network: {
14378
+ /** @enum {string} */
14379
+ build: "auto" | "none" | "allowlist";
14380
+ extra_hosts: string[];
14381
+ allow_hosts: string[];
14382
+ };
14383
+ };
14384
+ settings: components["schemas"]["TemplateSettings"];
14385
+ compiled: {
14386
+ compiler: string;
14387
+ language_table_sha256: string;
14388
+ build_env: {
14389
+ [key: string]: string;
14390
+ };
14391
+ steps: {
14392
+ [key: string]: unknown;
14393
+ }[];
14394
+ tools: {
14395
+ name: string;
14396
+ argv: string[];
14397
+ }[];
14398
+ network: {
14399
+ /** @enum {string} */
14400
+ mode: "none" | "egress_allowlist";
14401
+ allow_hosts: string[];
14402
+ };
14403
+ objects: {
14404
+ sha256: string;
14405
+ size: number;
14406
+ /** @enum {string} */
14407
+ kind: "file" | "tar";
14408
+ }[];
14409
+ };
13171
14410
  };
13172
14411
  result: {
13173
14412
  artifact_sha256: string | null;
@@ -13215,7 +14454,7 @@ export interface operations {
13215
14454
  last_heartbeat_at: string | null;
13216
14455
  };
13217
14456
  /**
13218
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14457
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
13219
14458
  * @enum {string}
13220
14459
  */
13221
14460
  source_kind: "recipe" | "workspace";
@@ -13350,11 +14589,14 @@ export interface operations {
13350
14589
  /** @enum {string} */
13351
14590
  timeout_seconds: "request" | "plan" | "platform";
13352
14591
  };
14592
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
13353
14593
  network: {
13354
14594
  /** @enum {string} */
13355
14595
  mode: "none" | "egress_allowlist";
13356
14596
  allow_hosts: string[];
13357
14597
  };
14598
+ /** @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. */
14599
+ denied_hosts: string[];
13358
14600
  provenance: {
13359
14601
  recipe_schema: string | null;
13360
14602
  recipe_sha256: string | null;
@@ -13362,9 +14604,81 @@ export interface operations {
13362
14604
  builder_id: string | null;
13363
14605
  attempt: number;
13364
14606
  };
13365
- /** @description Only on GET of one build. */
14607
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
13366
14608
  recipe?: {
13367
14609
  dockerfile: string;
14610
+ } | {
14611
+ /** @enum {string} */
14612
+ schema: "shardflux.template-recipe.v2";
14613
+ build: {
14614
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
14615
+ languages: {
14616
+ id: string;
14617
+ version: string;
14618
+ /** @enum {string} */
14619
+ source: "install" | "base";
14620
+ url: string | null;
14621
+ sha256: string | null;
14622
+ }[];
14623
+ packages: {
14624
+ apt: string[];
14625
+ pip: {
14626
+ packages: string[];
14627
+ requirements: string[];
14628
+ };
14629
+ npm: string[];
14630
+ };
14631
+ files: {
14632
+ upload: string;
14633
+ /** @enum {string} */
14634
+ kind: "file" | "tar";
14635
+ to: string;
14636
+ owner: string;
14637
+ mode: string | null;
14638
+ size: number;
14639
+ }[];
14640
+ steps: {
14641
+ name: string;
14642
+ run: string;
14643
+ user: string;
14644
+ cwd: string | null;
14645
+ env: {
14646
+ [key: string]: string;
14647
+ };
14648
+ }[];
14649
+ network: {
14650
+ /** @enum {string} */
14651
+ build: "auto" | "none" | "allowlist";
14652
+ extra_hosts: string[];
14653
+ allow_hosts: string[];
14654
+ };
14655
+ };
14656
+ settings: components["schemas"]["TemplateSettings"];
14657
+ compiled: {
14658
+ compiler: string;
14659
+ language_table_sha256: string;
14660
+ build_env: {
14661
+ [key: string]: string;
14662
+ };
14663
+ steps: {
14664
+ [key: string]: unknown;
14665
+ }[];
14666
+ tools: {
14667
+ name: string;
14668
+ argv: string[];
14669
+ }[];
14670
+ network: {
14671
+ /** @enum {string} */
14672
+ mode: "none" | "egress_allowlist";
14673
+ allow_hosts: string[];
14674
+ };
14675
+ objects: {
14676
+ sha256: string;
14677
+ size: number;
14678
+ /** @enum {string} */
14679
+ kind: "file" | "tar";
14680
+ }[];
14681
+ };
13368
14682
  };
13369
14683
  result: {
13370
14684
  artifact_sha256: string | null;
@@ -13412,7 +14726,7 @@ export interface operations {
13412
14726
  last_heartbeat_at: string | null;
13413
14727
  };
13414
14728
  /**
13415
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
14729
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
13416
14730
  * @enum {string}
13417
14731
  */
13418
14732
  source_kind: "recipe" | "workspace";
@@ -13450,15 +14764,310 @@ export interface operations {
13450
14764
  };
13451
14765
  };
13452
14766
  };
13453
- getV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
14767
+ getV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
14768
+ parameters: {
14769
+ query?: never;
14770
+ header?: never;
14771
+ path: {
14772
+ /** @description UUIDv7, lowercase canonical form. */
14773
+ organization_id: string;
14774
+ /** @description UUIDv7, lowercase canonical form. */
14775
+ build_id: string;
14776
+ };
14777
+ cookie?: never;
14778
+ };
14779
+ requestBody?: never;
14780
+ responses: {
14781
+ /** @description Default Response */
14782
+ 200: {
14783
+ headers: {
14784
+ [name: string]: unknown;
14785
+ };
14786
+ content: {
14787
+ "application/json": {
14788
+ /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
14789
+ url: string;
14790
+ /** Format: date-time */
14791
+ expires_at: string;
14792
+ /** @description `builds/<build_id>.log`. */
14793
+ object_key: string;
14794
+ bytes: number | null;
14795
+ sha256: string | null;
14796
+ };
14797
+ };
14798
+ };
14799
+ /** @description Default Response */
14800
+ "4XX": {
14801
+ headers: {
14802
+ [name: string]: unknown;
14803
+ };
14804
+ content: {
14805
+ "application/json": components["schemas"]["ErrorBody"];
14806
+ };
14807
+ };
14808
+ /** @description Default Response */
14809
+ "5XX": {
14810
+ headers: {
14811
+ [name: string]: unknown;
14812
+ };
14813
+ content: {
14814
+ "application/json": components["schemas"]["ErrorBody"];
14815
+ };
14816
+ };
14817
+ };
14818
+ };
14819
+ postV1OrganizationsOrganizationIdTemplateUploads: {
14820
+ parameters: {
14821
+ query?: never;
14822
+ header?: never;
14823
+ path: {
14824
+ /** @description UUIDv7, lowercase canonical form. */
14825
+ organization_id: string;
14826
+ };
14827
+ cookie?: never;
14828
+ };
14829
+ requestBody: {
14830
+ content: {
14831
+ "application/json": components["schemas"]["TemplateUploadRequest"];
14832
+ };
14833
+ };
14834
+ responses: {
14835
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14836
+ 200: {
14837
+ headers: {
14838
+ [name: string]: unknown;
14839
+ };
14840
+ content: {
14841
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14842
+ };
14843
+ };
14844
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14845
+ 201: {
14846
+ headers: {
14847
+ [name: string]: unknown;
14848
+ };
14849
+ content: {
14850
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14851
+ };
14852
+ };
14853
+ /** @description Default Response */
14854
+ "4XX": {
14855
+ headers: {
14856
+ [name: string]: unknown;
14857
+ };
14858
+ content: {
14859
+ "application/json": components["schemas"]["ErrorBody"];
14860
+ };
14861
+ };
14862
+ /** @description Default Response */
14863
+ "5XX": {
14864
+ headers: {
14865
+ [name: string]: unknown;
14866
+ };
14867
+ content: {
14868
+ "application/json": components["schemas"]["ErrorBody"];
14869
+ };
14870
+ };
14871
+ };
14872
+ };
14873
+ postV1TemplateUploads: {
14874
+ parameters: {
14875
+ query?: never;
14876
+ header?: never;
14877
+ path?: never;
14878
+ cookie?: never;
14879
+ };
14880
+ requestBody: {
14881
+ content: {
14882
+ "application/json": components["schemas"]["TemplateUploadRequest"];
14883
+ };
14884
+ };
14885
+ responses: {
14886
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14887
+ 200: {
14888
+ headers: {
14889
+ [name: string]: unknown;
14890
+ };
14891
+ content: {
14892
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14893
+ };
14894
+ };
14895
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
14896
+ 201: {
14897
+ headers: {
14898
+ [name: string]: unknown;
14899
+ };
14900
+ content: {
14901
+ "application/json": components["schemas"]["TemplateUploadResponse"];
14902
+ };
14903
+ };
14904
+ /** @description Default Response */
14905
+ "4XX": {
14906
+ headers: {
14907
+ [name: string]: unknown;
14908
+ };
14909
+ content: {
14910
+ "application/json": components["schemas"]["ErrorBody"];
14911
+ };
14912
+ };
14913
+ /** @description Default Response */
14914
+ "5XX": {
14915
+ headers: {
14916
+ [name: string]: unknown;
14917
+ };
14918
+ content: {
14919
+ "application/json": components["schemas"]["ErrorBody"];
14920
+ };
14921
+ };
14922
+ };
14923
+ };
14924
+ getV1OrganizationsOrganizationIdTemplatePackages: {
14925
+ parameters: {
14926
+ query: {
14927
+ ecosystem: "apt" | "pip" | "npm";
14928
+ q: string;
14929
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
14930
+ base?: string;
14931
+ limit?: number;
14932
+ };
14933
+ header?: never;
14934
+ path: {
14935
+ /** @description UUIDv7, lowercase canonical form. */
14936
+ organization_id: string;
14937
+ };
14938
+ cookie?: never;
14939
+ };
14940
+ requestBody?: never;
14941
+ responses: {
14942
+ /** @description Default Response */
14943
+ 200: {
14944
+ headers: {
14945
+ [name: string]: unknown;
14946
+ };
14947
+ content: {
14948
+ "application/json": components["schemas"]["TemplatePackagePage"];
14949
+ };
14950
+ };
14951
+ /** @description Default Response */
14952
+ "4XX": {
14953
+ headers: {
14954
+ [name: string]: unknown;
14955
+ };
14956
+ content: {
14957
+ "application/json": components["schemas"]["ErrorBody"];
14958
+ };
14959
+ };
14960
+ /** @description Default Response */
14961
+ "5XX": {
14962
+ headers: {
14963
+ [name: string]: unknown;
14964
+ };
14965
+ content: {
14966
+ "application/json": components["schemas"]["ErrorBody"];
14967
+ };
14968
+ };
14969
+ };
14970
+ };
14971
+ getV1OrganizationsOrganizationIdTemplatePackagesEcosystemName: {
14972
+ parameters: {
14973
+ query?: {
14974
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
14975
+ base?: string;
14976
+ };
14977
+ header?: never;
14978
+ path: {
14979
+ /** @description UUIDv7, lowercase canonical form. */
14980
+ organization_id: string;
14981
+ ecosystem: "apt" | "pip" | "npm";
14982
+ name: string;
14983
+ };
14984
+ cookie?: never;
14985
+ };
14986
+ requestBody?: never;
14987
+ responses: {
14988
+ /** @description Default Response */
14989
+ 200: {
14990
+ headers: {
14991
+ [name: string]: unknown;
14992
+ };
14993
+ content: {
14994
+ "application/json": components["schemas"]["TemplatePackage"];
14995
+ };
14996
+ };
14997
+ /** @description Default Response */
14998
+ "4XX": {
14999
+ headers: {
15000
+ [name: string]: unknown;
15001
+ };
15002
+ content: {
15003
+ "application/json": components["schemas"]["ErrorBody"];
15004
+ };
15005
+ };
15006
+ /** @description Default Response */
15007
+ "5XX": {
15008
+ headers: {
15009
+ [name: string]: unknown;
15010
+ };
15011
+ content: {
15012
+ "application/json": components["schemas"]["ErrorBody"];
15013
+ };
15014
+ };
15015
+ };
15016
+ };
15017
+ getV1TemplatePackages: {
13454
15018
  parameters: {
13455
- query?: never;
15019
+ query: {
15020
+ ecosystem: "apt" | "pip" | "npm";
15021
+ q: string;
15022
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15023
+ base?: string;
15024
+ limit?: number;
15025
+ };
15026
+ header?: never;
15027
+ path?: never;
15028
+ cookie?: never;
15029
+ };
15030
+ requestBody?: never;
15031
+ responses: {
15032
+ /** @description Default Response */
15033
+ 200: {
15034
+ headers: {
15035
+ [name: string]: unknown;
15036
+ };
15037
+ content: {
15038
+ "application/json": components["schemas"]["TemplatePackagePage"];
15039
+ };
15040
+ };
15041
+ /** @description Default Response */
15042
+ "4XX": {
15043
+ headers: {
15044
+ [name: string]: unknown;
15045
+ };
15046
+ content: {
15047
+ "application/json": components["schemas"]["ErrorBody"];
15048
+ };
15049
+ };
15050
+ /** @description Default Response */
15051
+ "5XX": {
15052
+ headers: {
15053
+ [name: string]: unknown;
15054
+ };
15055
+ content: {
15056
+ "application/json": components["schemas"]["ErrorBody"];
15057
+ };
15058
+ };
15059
+ };
15060
+ };
15061
+ getV1TemplatePackagesEcosystemName: {
15062
+ parameters: {
15063
+ query?: {
15064
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
15065
+ base?: string;
15066
+ };
13456
15067
  header?: never;
13457
15068
  path: {
13458
- /** @description UUIDv7, lowercase canonical form. */
13459
- organization_id: string;
13460
- /** @description UUIDv7, lowercase canonical form. */
13461
- build_id: string;
15069
+ ecosystem: "apt" | "pip" | "npm";
15070
+ name: string;
13462
15071
  };
13463
15072
  cookie?: never;
13464
15073
  };
@@ -13470,16 +15079,7 @@ export interface operations {
13470
15079
  [name: string]: unknown;
13471
15080
  };
13472
15081
  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
- };
15082
+ "application/json": components["schemas"]["TemplatePackage"];
13483
15083
  };
13484
15084
  };
13485
15085
  /** @description Default Response */
@@ -13691,6 +15291,7 @@ export interface operations {
13691
15291
  rootfs_sha256: string | null;
13692
15292
  } | null;
13693
15293
  defaults: components["schemas"]["TemplateDefaults"];
15294
+ settings: components["schemas"]["TemplateSettings"];
13694
15295
  files: components["schemas"]["TemplateFilesSummary"];
13695
15296
  rootfs_bytes: number | null;
13696
15297
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -13735,6 +15336,7 @@ export interface operations {
13735
15336
  created_at: string;
13736
15337
  } | null;
13737
15338
  update_policy: components["schemas"]["UpdatePolicy"];
15339
+ category: ("os" | "stack") | null;
13738
15340
  }[];
13739
15341
  next_cursor: string | null;
13740
15342
  };
@@ -13901,6 +15503,7 @@ export interface operations {
13901
15503
  rootfs_sha256: string | null;
13902
15504
  } | null;
13903
15505
  defaults: components["schemas"]["TemplateDefaults"];
15506
+ settings: components["schemas"]["TemplateSettings"];
13904
15507
  files: components["schemas"]["TemplateFilesSummary"];
13905
15508
  rootfs_bytes: number | null;
13906
15509
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -13945,6 +15548,7 @@ export interface operations {
13945
15548
  created_at: string;
13946
15549
  } | null;
13947
15550
  update_policy: components["schemas"]["UpdatePolicy"];
15551
+ category: ("os" | "stack") | null;
13948
15552
  plan: {
13949
15553
  plan_key: string;
13950
15554
  catalog_version: string;
@@ -14058,6 +15662,7 @@ export interface operations {
14058
15662
  rootfs_sha256: string | null;
14059
15663
  } | null;
14060
15664
  defaults: components["schemas"]["TemplateDefaults"];
15665
+ settings: components["schemas"]["TemplateSettings"];
14061
15666
  files: components["schemas"]["TemplateFilesSummary"];
14062
15667
  rootfs_bytes: number | null;
14063
15668
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -14232,11 +15837,14 @@ export interface operations {
14232
15837
  /** @enum {string} */
14233
15838
  timeout_seconds: "request" | "plan" | "platform";
14234
15839
  };
15840
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14235
15841
  network: {
14236
15842
  /** @enum {string} */
14237
15843
  mode: "none" | "egress_allowlist";
14238
15844
  allow_hosts: string[];
14239
15845
  };
15846
+ /** @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. */
15847
+ denied_hosts: string[];
14240
15848
  provenance: {
14241
15849
  recipe_schema: string | null;
14242
15850
  recipe_sha256: string | null;
@@ -14244,9 +15852,81 @@ export interface operations {
14244
15852
  builder_id: string | null;
14245
15853
  attempt: number;
14246
15854
  };
14247
- /** @description Only on GET of one build. */
15855
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14248
15856
  recipe?: {
14249
15857
  dockerfile: string;
15858
+ } | {
15859
+ /** @enum {string} */
15860
+ schema: "shardflux.template-recipe.v2";
15861
+ build: {
15862
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
15863
+ languages: {
15864
+ id: string;
15865
+ version: string;
15866
+ /** @enum {string} */
15867
+ source: "install" | "base";
15868
+ url: string | null;
15869
+ sha256: string | null;
15870
+ }[];
15871
+ packages: {
15872
+ apt: string[];
15873
+ pip: {
15874
+ packages: string[];
15875
+ requirements: string[];
15876
+ };
15877
+ npm: string[];
15878
+ };
15879
+ files: {
15880
+ upload: string;
15881
+ /** @enum {string} */
15882
+ kind: "file" | "tar";
15883
+ to: string;
15884
+ owner: string;
15885
+ mode: string | null;
15886
+ size: number;
15887
+ }[];
15888
+ steps: {
15889
+ name: string;
15890
+ run: string;
15891
+ user: string;
15892
+ cwd: string | null;
15893
+ env: {
15894
+ [key: string]: string;
15895
+ };
15896
+ }[];
15897
+ network: {
15898
+ /** @enum {string} */
15899
+ build: "auto" | "none" | "allowlist";
15900
+ extra_hosts: string[];
15901
+ allow_hosts: string[];
15902
+ };
15903
+ };
15904
+ settings: components["schemas"]["TemplateSettings"];
15905
+ compiled: {
15906
+ compiler: string;
15907
+ language_table_sha256: string;
15908
+ build_env: {
15909
+ [key: string]: string;
15910
+ };
15911
+ steps: {
15912
+ [key: string]: unknown;
15913
+ }[];
15914
+ tools: {
15915
+ name: string;
15916
+ argv: string[];
15917
+ }[];
15918
+ network: {
15919
+ /** @enum {string} */
15920
+ mode: "none" | "egress_allowlist";
15921
+ allow_hosts: string[];
15922
+ };
15923
+ objects: {
15924
+ sha256: string;
15925
+ size: number;
15926
+ /** @enum {string} */
15927
+ kind: "file" | "tar";
15928
+ }[];
15929
+ };
14250
15930
  };
14251
15931
  result: {
14252
15932
  artifact_sha256: string | null;
@@ -14294,7 +15974,7 @@ export interface operations {
14294
15974
  last_heartbeat_at: string | null;
14295
15975
  };
14296
15976
  /**
14297
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
15977
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14298
15978
  * @enum {string}
14299
15979
  */
14300
15980
  source_kind: "recipe" | "workspace";
@@ -14347,7 +16027,7 @@ export interface operations {
14347
16027
  requestBody: {
14348
16028
  content: {
14349
16029
  "application/json": {
14350
- /** @description Organization template to build into (created by the first build). Platform slugs are refused. */
16030
+ /** @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
16031
  template_slug: string;
14352
16032
  /**
14353
16033
  * @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 +16036,12 @@ export interface operations {
14356
16036
  auto_publish?: boolean;
14357
16037
  /** @description Template name when this build creates the template. */
14358
16038
  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
- };
16039
+ /** @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). */
16040
+ recipe: components["schemas"]["TemplateRecipeV1"] | components["schemas"]["TemplateRecipeV2"];
16041
+ /** @description The version description (manifest `description`). */
16042
+ description?: string;
16043
+ /** @description Recipe v2 only: up to 200 absolute paths the credential scan may report without failing the build (recorded in the manifest). */
16044
+ acknowledged_scan_findings?: string[];
14386
16045
  };
14387
16046
  };
14388
16047
  };
@@ -14504,11 +16163,14 @@ export interface operations {
14504
16163
  /** @enum {string} */
14505
16164
  timeout_seconds: "request" | "plan" | "platform";
14506
16165
  };
16166
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14507
16167
  network: {
14508
16168
  /** @enum {string} */
14509
16169
  mode: "none" | "egress_allowlist";
14510
16170
  allow_hosts: string[];
14511
16171
  };
16172
+ /** @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. */
16173
+ denied_hosts: string[];
14512
16174
  provenance: {
14513
16175
  recipe_schema: string | null;
14514
16176
  recipe_sha256: string | null;
@@ -14516,9 +16178,81 @@ export interface operations {
14516
16178
  builder_id: string | null;
14517
16179
  attempt: number;
14518
16180
  };
14519
- /** @description Only on GET of one build. */
16181
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14520
16182
  recipe?: {
14521
16183
  dockerfile: string;
16184
+ } | {
16185
+ /** @enum {string} */
16186
+ schema: "shardflux.template-recipe.v2";
16187
+ build: {
16188
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16189
+ languages: {
16190
+ id: string;
16191
+ version: string;
16192
+ /** @enum {string} */
16193
+ source: "install" | "base";
16194
+ url: string | null;
16195
+ sha256: string | null;
16196
+ }[];
16197
+ packages: {
16198
+ apt: string[];
16199
+ pip: {
16200
+ packages: string[];
16201
+ requirements: string[];
16202
+ };
16203
+ npm: string[];
16204
+ };
16205
+ files: {
16206
+ upload: string;
16207
+ /** @enum {string} */
16208
+ kind: "file" | "tar";
16209
+ to: string;
16210
+ owner: string;
16211
+ mode: string | null;
16212
+ size: number;
16213
+ }[];
16214
+ steps: {
16215
+ name: string;
16216
+ run: string;
16217
+ user: string;
16218
+ cwd: string | null;
16219
+ env: {
16220
+ [key: string]: string;
16221
+ };
16222
+ }[];
16223
+ network: {
16224
+ /** @enum {string} */
16225
+ build: "auto" | "none" | "allowlist";
16226
+ extra_hosts: string[];
16227
+ allow_hosts: string[];
16228
+ };
16229
+ };
16230
+ settings: components["schemas"]["TemplateSettings"];
16231
+ compiled: {
16232
+ compiler: string;
16233
+ language_table_sha256: string;
16234
+ build_env: {
16235
+ [key: string]: string;
16236
+ };
16237
+ steps: {
16238
+ [key: string]: unknown;
16239
+ }[];
16240
+ tools: {
16241
+ name: string;
16242
+ argv: string[];
16243
+ }[];
16244
+ network: {
16245
+ /** @enum {string} */
16246
+ mode: "none" | "egress_allowlist";
16247
+ allow_hosts: string[];
16248
+ };
16249
+ objects: {
16250
+ sha256: string;
16251
+ size: number;
16252
+ /** @enum {string} */
16253
+ kind: "file" | "tar";
16254
+ }[];
16255
+ };
14522
16256
  };
14523
16257
  result: {
14524
16258
  artifact_sha256: string | null;
@@ -14566,7 +16300,7 @@ export interface operations {
14566
16300
  last_heartbeat_at: string | null;
14567
16301
  };
14568
16302
  /**
14569
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16303
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14570
16304
  * @enum {string}
14571
16305
  */
14572
16306
  source_kind: "recipe" | "workspace";
@@ -14738,11 +16472,14 @@ export interface operations {
14738
16472
  /** @enum {string} */
14739
16473
  timeout_seconds: "request" | "plan" | "platform";
14740
16474
  };
16475
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14741
16476
  network: {
14742
16477
  /** @enum {string} */
14743
16478
  mode: "none" | "egress_allowlist";
14744
16479
  allow_hosts: string[];
14745
16480
  };
16481
+ /** @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. */
16482
+ denied_hosts: string[];
14746
16483
  provenance: {
14747
16484
  recipe_schema: string | null;
14748
16485
  recipe_sha256: string | null;
@@ -14750,9 +16487,81 @@ export interface operations {
14750
16487
  builder_id: string | null;
14751
16488
  attempt: number;
14752
16489
  };
14753
- /** @description Only on GET of one build. */
16490
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14754
16491
  recipe?: {
14755
16492
  dockerfile: string;
16493
+ } | {
16494
+ /** @enum {string} */
16495
+ schema: "shardflux.template-recipe.v2";
16496
+ build: {
16497
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16498
+ languages: {
16499
+ id: string;
16500
+ version: string;
16501
+ /** @enum {string} */
16502
+ source: "install" | "base";
16503
+ url: string | null;
16504
+ sha256: string | null;
16505
+ }[];
16506
+ packages: {
16507
+ apt: string[];
16508
+ pip: {
16509
+ packages: string[];
16510
+ requirements: string[];
16511
+ };
16512
+ npm: string[];
16513
+ };
16514
+ files: {
16515
+ upload: string;
16516
+ /** @enum {string} */
16517
+ kind: "file" | "tar";
16518
+ to: string;
16519
+ owner: string;
16520
+ mode: string | null;
16521
+ size: number;
16522
+ }[];
16523
+ steps: {
16524
+ name: string;
16525
+ run: string;
16526
+ user: string;
16527
+ cwd: string | null;
16528
+ env: {
16529
+ [key: string]: string;
16530
+ };
16531
+ }[];
16532
+ network: {
16533
+ /** @enum {string} */
16534
+ build: "auto" | "none" | "allowlist";
16535
+ extra_hosts: string[];
16536
+ allow_hosts: string[];
16537
+ };
16538
+ };
16539
+ settings: components["schemas"]["TemplateSettings"];
16540
+ compiled: {
16541
+ compiler: string;
16542
+ language_table_sha256: string;
16543
+ build_env: {
16544
+ [key: string]: string;
16545
+ };
16546
+ steps: {
16547
+ [key: string]: unknown;
16548
+ }[];
16549
+ tools: {
16550
+ name: string;
16551
+ argv: string[];
16552
+ }[];
16553
+ network: {
16554
+ /** @enum {string} */
16555
+ mode: "none" | "egress_allowlist";
16556
+ allow_hosts: string[];
16557
+ };
16558
+ objects: {
16559
+ sha256: string;
16560
+ size: number;
16561
+ /** @enum {string} */
16562
+ kind: "file" | "tar";
16563
+ }[];
16564
+ };
14756
16565
  };
14757
16566
  result: {
14758
16567
  artifact_sha256: string | null;
@@ -14800,7 +16609,7 @@ export interface operations {
14800
16609
  last_heartbeat_at: string | null;
14801
16610
  };
14802
16611
  /**
14803
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16612
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
14804
16613
  * @enum {string}
14805
16614
  */
14806
16615
  source_kind: "recipe" | "workspace";
@@ -14969,11 +16778,14 @@ export interface operations {
14969
16778
  /** @enum {string} */
14970
16779
  timeout_seconds: "request" | "plan" | "platform";
14971
16780
  };
16781
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
14972
16782
  network: {
14973
16783
  /** @enum {string} */
14974
16784
  mode: "none" | "egress_allowlist";
14975
16785
  allow_hosts: string[];
14976
16786
  };
16787
+ /** @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. */
16788
+ denied_hosts: string[];
14977
16789
  provenance: {
14978
16790
  recipe_schema: string | null;
14979
16791
  recipe_sha256: string | null;
@@ -14981,9 +16793,81 @@ export interface operations {
14981
16793
  builder_id: string | null;
14982
16794
  attempt: number;
14983
16795
  };
14984
- /** @description Only on GET of one build. */
16796
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
14985
16797
  recipe?: {
14986
16798
  dockerfile: string;
16799
+ } | {
16800
+ /** @enum {string} */
16801
+ schema: "shardflux.template-recipe.v2";
16802
+ build: {
16803
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
16804
+ languages: {
16805
+ id: string;
16806
+ version: string;
16807
+ /** @enum {string} */
16808
+ source: "install" | "base";
16809
+ url: string | null;
16810
+ sha256: string | null;
16811
+ }[];
16812
+ packages: {
16813
+ apt: string[];
16814
+ pip: {
16815
+ packages: string[];
16816
+ requirements: string[];
16817
+ };
16818
+ npm: string[];
16819
+ };
16820
+ files: {
16821
+ upload: string;
16822
+ /** @enum {string} */
16823
+ kind: "file" | "tar";
16824
+ to: string;
16825
+ owner: string;
16826
+ mode: string | null;
16827
+ size: number;
16828
+ }[];
16829
+ steps: {
16830
+ name: string;
16831
+ run: string;
16832
+ user: string;
16833
+ cwd: string | null;
16834
+ env: {
16835
+ [key: string]: string;
16836
+ };
16837
+ }[];
16838
+ network: {
16839
+ /** @enum {string} */
16840
+ build: "auto" | "none" | "allowlist";
16841
+ extra_hosts: string[];
16842
+ allow_hosts: string[];
16843
+ };
16844
+ };
16845
+ settings: components["schemas"]["TemplateSettings"];
16846
+ compiled: {
16847
+ compiler: string;
16848
+ language_table_sha256: string;
16849
+ build_env: {
16850
+ [key: string]: string;
16851
+ };
16852
+ steps: {
16853
+ [key: string]: unknown;
16854
+ }[];
16855
+ tools: {
16856
+ name: string;
16857
+ argv: string[];
16858
+ }[];
16859
+ network: {
16860
+ /** @enum {string} */
16861
+ mode: "none" | "egress_allowlist";
16862
+ allow_hosts: string[];
16863
+ };
16864
+ objects: {
16865
+ sha256: string;
16866
+ size: number;
16867
+ /** @enum {string} */
16868
+ kind: "file" | "tar";
16869
+ }[];
16870
+ };
14987
16871
  };
14988
16872
  result: {
14989
16873
  artifact_sha256: string | null;
@@ -15031,7 +16915,7 @@ export interface operations {
15031
16915
  last_heartbeat_at: string | null;
15032
16916
  };
15033
16917
  /**
15034
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
16918
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
15035
16919
  * @enum {string}
15036
16920
  */
15037
16921
  source_kind: "recipe" | "workspace";
@@ -15166,11 +17050,14 @@ export interface operations {
15166
17050
  /** @enum {string} */
15167
17051
  timeout_seconds: "request" | "plan" | "platform";
15168
17052
  };
17053
+ /** @description The build network (recipe v2: compiled.network, derived from the recipe for `auto`). */
15169
17054
  network: {
15170
17055
  /** @enum {string} */
15171
17056
  mode: "none" | "egress_allowlist";
15172
17057
  allow_hosts: string[];
15173
17058
  };
17059
+ /** @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. */
17060
+ denied_hosts: string[];
15174
17061
  provenance: {
15175
17062
  recipe_schema: string | null;
15176
17063
  recipe_sha256: string | null;
@@ -15178,9 +17065,81 @@ export interface operations {
15178
17065
  builder_id: string | null;
15179
17066
  attempt: number;
15180
17067
  };
15181
- /** @description Only on GET of one build. */
17068
+ /** @description Only on GET of one build: recipe v1 {dockerfile}, or recipe v2 {schema, build, settings, compiled} (the stored document, contracts §24.1). */
15182
17069
  recipe?: {
15183
17070
  dockerfile: string;
17071
+ } | {
17072
+ /** @enum {string} */
17073
+ schema: "shardflux.template-recipe.v2";
17074
+ build: {
17075
+ /** @description Resolved languages in compile order (implied ones included); source base = the base already has it. */
17076
+ languages: {
17077
+ id: string;
17078
+ version: string;
17079
+ /** @enum {string} */
17080
+ source: "install" | "base";
17081
+ url: string | null;
17082
+ sha256: string | null;
17083
+ }[];
17084
+ packages: {
17085
+ apt: string[];
17086
+ pip: {
17087
+ packages: string[];
17088
+ requirements: string[];
17089
+ };
17090
+ npm: string[];
17091
+ };
17092
+ files: {
17093
+ upload: string;
17094
+ /** @enum {string} */
17095
+ kind: "file" | "tar";
17096
+ to: string;
17097
+ owner: string;
17098
+ mode: string | null;
17099
+ size: number;
17100
+ }[];
17101
+ steps: {
17102
+ name: string;
17103
+ run: string;
17104
+ user: string;
17105
+ cwd: string | null;
17106
+ env: {
17107
+ [key: string]: string;
17108
+ };
17109
+ }[];
17110
+ network: {
17111
+ /** @enum {string} */
17112
+ build: "auto" | "none" | "allowlist";
17113
+ extra_hosts: string[];
17114
+ allow_hosts: string[];
17115
+ };
17116
+ };
17117
+ settings: components["schemas"]["TemplateSettings"];
17118
+ compiled: {
17119
+ compiler: string;
17120
+ language_table_sha256: string;
17121
+ build_env: {
17122
+ [key: string]: string;
17123
+ };
17124
+ steps: {
17125
+ [key: string]: unknown;
17126
+ }[];
17127
+ tools: {
17128
+ name: string;
17129
+ argv: string[];
17130
+ }[];
17131
+ network: {
17132
+ /** @enum {string} */
17133
+ mode: "none" | "egress_allowlist";
17134
+ allow_hosts: string[];
17135
+ };
17136
+ objects: {
17137
+ sha256: string;
17138
+ size: number;
17139
+ /** @enum {string} */
17140
+ kind: "file" | "tar";
17141
+ }[];
17142
+ };
15184
17143
  };
15185
17144
  result: {
15186
17145
  artifact_sha256: string | null;
@@ -15228,7 +17187,7 @@ export interface operations {
15228
17187
  last_heartbeat_at: string | null;
15229
17188
  };
15230
17189
  /**
15231
- * @description recipe (Dockerfile dialect) or workspace (save-as-template, draft publish).
17190
+ * @description recipe (recipe v1 Dockerfile dialect or recipe v2) or workspace (save-as-template, draft publish).
15232
17191
  * @enum {string}
15233
17192
  */
15234
17193
  source_kind: "recipe" | "workspace";
@@ -15266,15 +17225,125 @@ export interface operations {
15266
17225
  };
15267
17226
  };
15268
17227
  };
15269
- getApiV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
17228
+ getApiV1OrganizationsOrganizationIdTemplateBuildsBuildIdLogUrl: {
17229
+ parameters: {
17230
+ query?: never;
17231
+ header?: never;
17232
+ path: {
17233
+ /** @description UUIDv7, lowercase canonical form. */
17234
+ organization_id: string;
17235
+ /** @description UUIDv7, lowercase canonical form. */
17236
+ build_id: string;
17237
+ };
17238
+ cookie?: never;
17239
+ };
17240
+ requestBody?: never;
17241
+ responses: {
17242
+ /** @description Default Response */
17243
+ 200: {
17244
+ headers: {
17245
+ [name: string]: unknown;
17246
+ };
17247
+ content: {
17248
+ "application/json": {
17249
+ /** @description Presigned S3 GET URL (SigV4 query auth). A bearer credential until expires_at: do not log or share it. */
17250
+ url: string;
17251
+ /** Format: date-time */
17252
+ expires_at: string;
17253
+ /** @description `builds/<build_id>.log`. */
17254
+ object_key: string;
17255
+ bytes: number | null;
17256
+ sha256: string | null;
17257
+ };
17258
+ };
17259
+ };
17260
+ /** @description Default Response */
17261
+ "4XX": {
17262
+ headers: {
17263
+ [name: string]: unknown;
17264
+ };
17265
+ content: {
17266
+ "application/json": components["schemas"]["ErrorBody"];
17267
+ };
17268
+ };
17269
+ /** @description Default Response */
17270
+ "5XX": {
17271
+ headers: {
17272
+ [name: string]: unknown;
17273
+ };
17274
+ content: {
17275
+ "application/json": components["schemas"]["ErrorBody"];
17276
+ };
17277
+ };
17278
+ };
17279
+ };
17280
+ postApiV1OrganizationsOrganizationIdTemplateUploads: {
15270
17281
  parameters: {
15271
17282
  query?: never;
15272
17283
  header?: never;
15273
17284
  path: {
15274
17285
  /** @description UUIDv7, lowercase canonical form. */
15275
17286
  organization_id: string;
17287
+ };
17288
+ cookie?: never;
17289
+ };
17290
+ requestBody: {
17291
+ content: {
17292
+ "application/json": components["schemas"]["TemplateUploadRequest"];
17293
+ };
17294
+ };
17295
+ responses: {
17296
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
17297
+ 200: {
17298
+ headers: {
17299
+ [name: string]: unknown;
17300
+ };
17301
+ content: {
17302
+ "application/json": components["schemas"]["TemplateUploadResponse"];
17303
+ };
17304
+ };
17305
+ /** @description 200: the bytes are already available (put null). 201: PUT the bytes with `put`, then reference `sha256:<hex>` in the recipe. */
17306
+ 201: {
17307
+ headers: {
17308
+ [name: string]: unknown;
17309
+ };
17310
+ content: {
17311
+ "application/json": components["schemas"]["TemplateUploadResponse"];
17312
+ };
17313
+ };
17314
+ /** @description Default Response */
17315
+ "4XX": {
17316
+ headers: {
17317
+ [name: string]: unknown;
17318
+ };
17319
+ content: {
17320
+ "application/json": components["schemas"]["ErrorBody"];
17321
+ };
17322
+ };
17323
+ /** @description Default Response */
17324
+ "5XX": {
17325
+ headers: {
17326
+ [name: string]: unknown;
17327
+ };
17328
+ content: {
17329
+ "application/json": components["schemas"]["ErrorBody"];
17330
+ };
17331
+ };
17332
+ };
17333
+ };
17334
+ getApiV1OrganizationsOrganizationIdTemplatePackages: {
17335
+ parameters: {
17336
+ query: {
17337
+ ecosystem: "apt" | "pip" | "npm";
17338
+ q: string;
17339
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
17340
+ base?: string;
17341
+ limit?: number;
17342
+ };
17343
+ header?: never;
17344
+ path: {
15276
17345
  /** @description UUIDv7, lowercase canonical form. */
15277
- build_id: string;
17346
+ organization_id: string;
15278
17347
  };
15279
17348
  cookie?: never;
15280
17349
  };
@@ -15286,16 +17355,53 @@ export interface operations {
15286
17355
  [name: string]: unknown;
15287
17356
  };
15288
17357
  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
- };
17358
+ "application/json": components["schemas"]["TemplatePackagePage"];
17359
+ };
17360
+ };
17361
+ /** @description Default Response */
17362
+ "4XX": {
17363
+ headers: {
17364
+ [name: string]: unknown;
17365
+ };
17366
+ content: {
17367
+ "application/json": components["schemas"]["ErrorBody"];
17368
+ };
17369
+ };
17370
+ /** @description Default Response */
17371
+ "5XX": {
17372
+ headers: {
17373
+ [name: string]: unknown;
17374
+ };
17375
+ content: {
17376
+ "application/json": components["schemas"]["ErrorBody"];
17377
+ };
17378
+ };
17379
+ };
17380
+ };
17381
+ getApiV1OrganizationsOrganizationIdTemplatePackagesEcosystemName: {
17382
+ parameters: {
17383
+ query?: {
17384
+ /** @description `<slug>@<version>` (apt: the base whose apt index is searched). */
17385
+ base?: string;
17386
+ };
17387
+ header?: never;
17388
+ path: {
17389
+ /** @description UUIDv7, lowercase canonical form. */
17390
+ organization_id: string;
17391
+ ecosystem: "apt" | "pip" | "npm";
17392
+ name: string;
17393
+ };
17394
+ cookie?: never;
17395
+ };
17396
+ requestBody?: never;
17397
+ responses: {
17398
+ /** @description Default Response */
17399
+ 200: {
17400
+ headers: {
17401
+ [name: string]: unknown;
17402
+ };
17403
+ content: {
17404
+ "application/json": components["schemas"]["TemplatePackage"];
15299
17405
  };
15300
17406
  };
15301
17407
  /** @description Default Response */
@@ -15502,6 +17608,7 @@ export interface operations {
15502
17608
  rootfs_sha256: string | null;
15503
17609
  } | null;
15504
17610
  defaults: components["schemas"]["TemplateDefaults"];
17611
+ settings: components["schemas"]["TemplateSettings"];
15505
17612
  files: components["schemas"]["TemplateFilesSummary"];
15506
17613
  rootfs_bytes: number | null;
15507
17614
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15546,6 +17653,7 @@ export interface operations {
15546
17653
  created_at: string;
15547
17654
  } | null;
15548
17655
  update_policy: components["schemas"]["UpdatePolicy"];
17656
+ category: ("os" | "stack") | null;
15549
17657
  plan: {
15550
17658
  plan_key: string;
15551
17659
  catalog_version: string;
@@ -15659,6 +17767,7 @@ export interface operations {
15659
17767
  rootfs_sha256: string | null;
15660
17768
  } | null;
15661
17769
  defaults: components["schemas"]["TemplateDefaults"];
17770
+ settings: components["schemas"]["TemplateSettings"];
15662
17771
  files: components["schemas"]["TemplateFilesSummary"];
15663
17772
  rootfs_bytes: number | null;
15664
17773
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15834,6 +17943,7 @@ export interface operations {
15834
17943
  rootfs_sha256: string | null;
15835
17944
  } | null;
15836
17945
  defaults: components["schemas"]["TemplateDefaults"];
17946
+ settings: components["schemas"]["TemplateSettings"];
15837
17947
  files: components["schemas"]["TemplateFilesSummary"];
15838
17948
  rootfs_bytes: number | null;
15839
17949
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -15878,6 +17988,7 @@ export interface operations {
15878
17988
  created_at: string;
15879
17989
  } | null;
15880
17990
  update_policy: components["schemas"]["UpdatePolicy"];
17991
+ category: ("os" | "stack") | null;
15881
17992
  plan: {
15882
17993
  plan_key: string;
15883
17994
  catalog_version: string;
@@ -15991,6 +18102,7 @@ export interface operations {
15991
18102
  rootfs_sha256: string | null;
15992
18103
  } | null;
15993
18104
  defaults: components["schemas"]["TemplateDefaults"];
18105
+ settings: components["schemas"]["TemplateSettings"];
15994
18106
  files: components["schemas"]["TemplateFilesSummary"];
15995
18107
  rootfs_bytes: number | null;
15996
18108
  /** @description The org layers of this version’s chain, bottom to top (empty for images). */
@@ -17002,7 +19114,155 @@ export interface operations {
17002
19114
  };
17003
19115
  cookie?: never;
17004
19116
  };
17005
- requestBody?: never;
19117
+ requestBody?: never;
19118
+ responses: {
19119
+ /** @description Default Response */
19120
+ 200: {
19121
+ headers: {
19122
+ [name: string]: unknown;
19123
+ };
19124
+ content: {
19125
+ "application/json": {
19126
+ data: components["schemas"]["DraftState"][];
19127
+ next_cursor: string | null;
19128
+ };
19129
+ };
19130
+ };
19131
+ /** @description Default Response */
19132
+ "4XX": {
19133
+ headers: {
19134
+ [name: string]: unknown;
19135
+ };
19136
+ content: {
19137
+ "application/json": components["schemas"]["ErrorBody"];
19138
+ };
19139
+ };
19140
+ /** @description Default Response */
19141
+ "5XX": {
19142
+ headers: {
19143
+ [name: string]: unknown;
19144
+ };
19145
+ content: {
19146
+ "application/json": components["schemas"]["ErrorBody"];
19147
+ };
19148
+ };
19149
+ };
19150
+ };
19151
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftStates: {
19152
+ parameters: {
19153
+ query?: never;
19154
+ header?: never;
19155
+ path: {
19156
+ /** @description UUIDv7, lowercase canonical form. */
19157
+ organization_id: string;
19158
+ slug: string;
19159
+ };
19160
+ cookie?: never;
19161
+ };
19162
+ requestBody: {
19163
+ content: {
19164
+ "application/json": {
19165
+ label?: string;
19166
+ };
19167
+ };
19168
+ };
19169
+ responses: {
19170
+ /** @description Default Response */
19171
+ 202: {
19172
+ headers: {
19173
+ [name: string]: unknown;
19174
+ };
19175
+ content: {
19176
+ "application/json": {
19177
+ operation: components["schemas"]["Operation"];
19178
+ };
19179
+ };
19180
+ };
19181
+ /** @description Default Response */
19182
+ "4XX": {
19183
+ headers: {
19184
+ [name: string]: unknown;
19185
+ };
19186
+ content: {
19187
+ "application/json": components["schemas"]["ErrorBody"];
19188
+ };
19189
+ };
19190
+ /** @description Default Response */
19191
+ "5XX": {
19192
+ headers: {
19193
+ [name: string]: unknown;
19194
+ };
19195
+ content: {
19196
+ "application/json": components["schemas"]["ErrorBody"];
19197
+ };
19198
+ };
19199
+ };
19200
+ };
19201
+ getApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19202
+ parameters: {
19203
+ query?: {
19204
+ limit?: number;
19205
+ cursor?: string;
19206
+ include_ended?: boolean;
19207
+ };
19208
+ header?: never;
19209
+ path: {
19210
+ /** @description UUIDv7, lowercase canonical form. */
19211
+ organization_id: string;
19212
+ slug: string;
19213
+ };
19214
+ cookie?: never;
19215
+ };
19216
+ requestBody?: never;
19217
+ responses: {
19218
+ /** @description Default Response */
19219
+ 200: {
19220
+ headers: {
19221
+ [name: string]: unknown;
19222
+ };
19223
+ content: {
19224
+ "application/json": {
19225
+ data: components["schemas"]["Workspace"][];
19226
+ next_cursor: string | null;
19227
+ };
19228
+ };
19229
+ };
19230
+ /** @description Default Response */
19231
+ "4XX": {
19232
+ headers: {
19233
+ [name: string]: unknown;
19234
+ };
19235
+ content: {
19236
+ "application/json": components["schemas"]["ErrorBody"];
19237
+ };
19238
+ };
19239
+ /** @description Default Response */
19240
+ "5XX": {
19241
+ headers: {
19242
+ [name: string]: unknown;
19243
+ };
19244
+ content: {
19245
+ "application/json": components["schemas"]["ErrorBody"];
19246
+ };
19247
+ };
19248
+ };
19249
+ };
19250
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19251
+ parameters: {
19252
+ query?: never;
19253
+ header?: never;
19254
+ path: {
19255
+ /** @description UUIDv7, lowercase canonical form. */
19256
+ organization_id: string;
19257
+ slug: string;
19258
+ };
19259
+ cookie?: never;
19260
+ };
19261
+ requestBody: {
19262
+ content: {
19263
+ "application/json": components["schemas"]["CreateTestInstanceBody"];
19264
+ };
19265
+ };
17006
19266
  responses: {
17007
19267
  /** @description Default Response */
17008
19268
  200: {
@@ -17011,8 +19271,24 @@ export interface operations {
17011
19271
  };
17012
19272
  content: {
17013
19273
  "application/json": {
17014
- data: components["schemas"]["DraftState"][];
17015
- next_cursor: string | null;
19274
+ workspace: components["schemas"]["Workspace"];
19275
+ operation: components["schemas"]["Operation"] | null;
19276
+ cell_endpoint: string | null;
19277
+ tool_token: components["schemas"]["ToolToken"] | null;
19278
+ };
19279
+ };
19280
+ };
19281
+ /** @description Default Response */
19282
+ 202: {
19283
+ headers: {
19284
+ [name: string]: unknown;
19285
+ };
19286
+ content: {
19287
+ "application/json": {
19288
+ workspace: components["schemas"]["Workspace"];
19289
+ operation: components["schemas"]["Operation"] | null;
19290
+ cell_endpoint: string | null;
19291
+ tool_token: components["schemas"]["ToolToken"] | null;
17016
19292
  };
17017
19293
  };
17018
19294
  };
@@ -17036,7 +19312,7 @@ export interface operations {
17036
19312
  };
17037
19313
  };
17038
19314
  };
17039
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftStates: {
19315
+ postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish: {
17040
19316
  parameters: {
17041
19317
  query?: never;
17042
19318
  header?: never;
@@ -17049,21 +19325,17 @@ export interface operations {
17049
19325
  };
17050
19326
  requestBody: {
17051
19327
  content: {
17052
- "application/json": {
17053
- label?: string;
17054
- };
19328
+ "application/json": components["schemas"]["PublishDraftBody"];
17055
19329
  };
17056
19330
  };
17057
19331
  responses: {
17058
- /** @description Default Response */
19332
+ /** @description operation: the capture (layer_snapshot) of a running workspace, null otherwise. build: poll GET …/template-builds/{id} until registration.state is registered. */
17059
19333
  202: {
17060
19334
  headers: {
17061
19335
  [name: string]: unknown;
17062
19336
  };
17063
19337
  content: {
17064
- "application/json": {
17065
- operation: components["schemas"]["Operation"];
17066
- };
19338
+ "application/json": components["schemas"]["SaveAsTemplateResponse"];
17067
19339
  };
17068
19340
  };
17069
19341
  /** @description Default Response */
@@ -17086,32 +19358,49 @@ export interface operations {
17086
19358
  };
17087
19359
  };
17088
19360
  };
17089
- getApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19361
+ postV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances: {
17090
19362
  parameters: {
17091
- query?: {
17092
- limit?: number;
17093
- cursor?: string;
17094
- include_ended?: boolean;
17095
- };
19363
+ query?: never;
17096
19364
  header?: never;
17097
19365
  path: {
17098
19366
  /** @description UUIDv7, lowercase canonical form. */
17099
19367
  organization_id: string;
17100
19368
  slug: string;
19369
+ version: number;
17101
19370
  };
17102
19371
  cookie?: never;
17103
19372
  };
17104
- requestBody?: never;
19373
+ requestBody: {
19374
+ content: {
19375
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
19376
+ };
19377
+ };
17105
19378
  responses: {
17106
- /** @description Default Response */
19379
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17107
19380
  200: {
17108
19381
  headers: {
17109
19382
  [name: string]: unknown;
17110
19383
  };
17111
19384
  content: {
17112
19385
  "application/json": {
17113
- data: components["schemas"]["Workspace"][];
17114
- next_cursor: string | null;
19386
+ workspace: components["schemas"]["Workspace"];
19387
+ operation: components["schemas"]["Operation"] | null;
19388
+ cell_endpoint: string | null;
19389
+ tool_token: components["schemas"]["ToolToken"] | null;
19390
+ };
19391
+ };
19392
+ };
19393
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
19394
+ 202: {
19395
+ headers: {
19396
+ [name: string]: unknown;
19397
+ };
19398
+ content: {
19399
+ "application/json": {
19400
+ workspace: components["schemas"]["Workspace"];
19401
+ operation: components["schemas"]["Operation"] | null;
19402
+ cell_endpoint: string | null;
19403
+ tool_token: components["schemas"]["ToolToken"] | null;
17115
19404
  };
17116
19405
  };
17117
19406
  };
@@ -17135,24 +19424,23 @@ export interface operations {
17135
19424
  };
17136
19425
  };
17137
19426
  };
17138
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftTestInstances: {
19427
+ postV1TemplatesSlugVersionsVersionTestInstances: {
17139
19428
  parameters: {
17140
19429
  query?: never;
17141
19430
  header?: never;
17142
19431
  path: {
17143
- /** @description UUIDv7, lowercase canonical form. */
17144
- organization_id: string;
17145
19432
  slug: string;
19433
+ version: number;
17146
19434
  };
17147
19435
  cookie?: never;
17148
19436
  };
17149
19437
  requestBody: {
17150
19438
  content: {
17151
- "application/json": components["schemas"]["CreateTestInstanceBody"];
19439
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
17152
19440
  };
17153
19441
  };
17154
19442
  responses: {
17155
- /** @description Default Response */
19443
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17156
19444
  200: {
17157
19445
  headers: {
17158
19446
  [name: string]: unknown;
@@ -17166,7 +19454,7 @@ export interface operations {
17166
19454
  };
17167
19455
  };
17168
19456
  };
17169
- /** @description Default Response */
19457
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17170
19458
  202: {
17171
19459
  headers: {
17172
19460
  [name: string]: unknown;
@@ -17200,7 +19488,7 @@ export interface operations {
17200
19488
  };
17201
19489
  };
17202
19490
  };
17203
- postApiV1OrganizationsOrganizationIdTemplatesSlugDraftPublish: {
19491
+ postApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionTestInstances: {
17204
19492
  parameters: {
17205
19493
  query?: never;
17206
19494
  header?: never;
@@ -17208,22 +19496,42 @@ export interface operations {
17208
19496
  /** @description UUIDv7, lowercase canonical form. */
17209
19497
  organization_id: string;
17210
19498
  slug: string;
19499
+ version: number;
17211
19500
  };
17212
19501
  cookie?: never;
17213
19502
  };
17214
19503
  requestBody: {
17215
19504
  content: {
17216
- "application/json": components["schemas"]["PublishDraftBody"];
19505
+ "application/json": components["schemas"]["CreateVersionTestInstanceBody"];
17217
19506
  };
17218
19507
  };
17219
19508
  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. */
19509
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
19510
+ 200: {
19511
+ headers: {
19512
+ [name: string]: unknown;
19513
+ };
19514
+ content: {
19515
+ "application/json": {
19516
+ workspace: components["schemas"]["Workspace"];
19517
+ operation: components["schemas"]["Operation"] | null;
19518
+ cell_endpoint: string | null;
19519
+ tool_token: components["schemas"]["ToolToken"] | null;
19520
+ };
19521
+ };
19522
+ };
19523
+ /** @description 202: poll `operation`; 200: an existing instance that is running and ready (tool_token set). */
17221
19524
  202: {
17222
19525
  headers: {
17223
19526
  [name: string]: unknown;
17224
19527
  };
17225
19528
  content: {
17226
- "application/json": components["schemas"]["SaveAsTemplateResponse"];
19529
+ "application/json": {
19530
+ workspace: components["schemas"]["Workspace"];
19531
+ operation: components["schemas"]["Operation"] | null;
19532
+ cell_endpoint: string | null;
19533
+ tool_token: components["schemas"]["ToolToken"] | null;
19534
+ };
17227
19535
  };
17228
19536
  };
17229
19537
  /** @description Default Response */
@@ -17540,6 +19848,96 @@ export interface operations {
17540
19848
  };
17541
19849
  };
17542
19850
  };
19851
+ getV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe: {
19852
+ parameters: {
19853
+ query?: {
19854
+ /** @description Pick the platform template even when an organization template shadows its slug. */
19855
+ owner?: "platform" | "organization";
19856
+ };
19857
+ header?: never;
19858
+ path: {
19859
+ /** @description UUIDv7, lowercase canonical form. */
19860
+ organization_id: string;
19861
+ slug: string;
19862
+ version: number;
19863
+ };
19864
+ cookie?: never;
19865
+ };
19866
+ requestBody?: never;
19867
+ responses: {
19868
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
19869
+ 200: {
19870
+ headers: {
19871
+ [name: string]: unknown;
19872
+ };
19873
+ content: {
19874
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
19875
+ };
19876
+ };
19877
+ /** @description Default Response */
19878
+ "4XX": {
19879
+ headers: {
19880
+ [name: string]: unknown;
19881
+ };
19882
+ content: {
19883
+ "application/json": components["schemas"]["ErrorBody"];
19884
+ };
19885
+ };
19886
+ /** @description Default Response */
19887
+ "5XX": {
19888
+ headers: {
19889
+ [name: string]: unknown;
19890
+ };
19891
+ content: {
19892
+ "application/json": components["schemas"]["ErrorBody"];
19893
+ };
19894
+ };
19895
+ };
19896
+ };
19897
+ getV1TemplatesSlugVersionsVersionRecipe: {
19898
+ parameters: {
19899
+ query?: {
19900
+ /** @description Pick the platform template even when an organization template shadows its slug. */
19901
+ owner?: "platform" | "organization";
19902
+ };
19903
+ header?: never;
19904
+ path: {
19905
+ slug: string;
19906
+ version: number;
19907
+ };
19908
+ cookie?: never;
19909
+ };
19910
+ requestBody?: never;
19911
+ responses: {
19912
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
19913
+ 200: {
19914
+ headers: {
19915
+ [name: string]: unknown;
19916
+ };
19917
+ content: {
19918
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
19919
+ };
19920
+ };
19921
+ /** @description Default Response */
19922
+ "4XX": {
19923
+ headers: {
19924
+ [name: string]: unknown;
19925
+ };
19926
+ content: {
19927
+ "application/json": components["schemas"]["ErrorBody"];
19928
+ };
19929
+ };
19930
+ /** @description Default Response */
19931
+ "5XX": {
19932
+ headers: {
19933
+ [name: string]: unknown;
19934
+ };
19935
+ content: {
19936
+ "application/json": components["schemas"]["ErrorBody"];
19937
+ };
19938
+ };
19939
+ };
19940
+ };
17543
19941
  getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionFiles: {
17544
19942
  parameters: {
17545
19943
  query?: {
@@ -17690,6 +20088,52 @@ export interface operations {
17690
20088
  };
17691
20089
  };
17692
20090
  };
20091
+ getApiV1OrganizationsOrganizationIdTemplatesSlugVersionsVersionRecipe: {
20092
+ parameters: {
20093
+ query?: {
20094
+ /** @description Pick the platform template even when an organization template shadows its slug. */
20095
+ owner?: "platform" | "organization";
20096
+ };
20097
+ header?: never;
20098
+ path: {
20099
+ /** @description UUIDv7, lowercase canonical form. */
20100
+ organization_id: string;
20101
+ slug: string;
20102
+ version: number;
20103
+ };
20104
+ cookie?: never;
20105
+ };
20106
+ requestBody?: never;
20107
+ responses: {
20108
+ /** @description The recipe and settings a version was built from (feeds "Edit template" and `shard templates export`). */
20109
+ 200: {
20110
+ headers: {
20111
+ [name: string]: unknown;
20112
+ };
20113
+ content: {
20114
+ "application/json": components["schemas"]["TemplateVersionRecipe"];
20115
+ };
20116
+ };
20117
+ /** @description Default Response */
20118
+ "4XX": {
20119
+ headers: {
20120
+ [name: string]: unknown;
20121
+ };
20122
+ content: {
20123
+ "application/json": components["schemas"]["ErrorBody"];
20124
+ };
20125
+ };
20126
+ /** @description Default Response */
20127
+ "5XX": {
20128
+ headers: {
20129
+ [name: string]: unknown;
20130
+ };
20131
+ content: {
20132
+ "application/json": components["schemas"]["ErrorBody"];
20133
+ };
20134
+ };
20135
+ };
20136
+ };
17693
20137
  getV1OrganizationsOrganizationIdSecrets: {
17694
20138
  parameters: {
17695
20139
  query?: {
@@ -20329,6 +22773,18 @@ export interface operations {
20329
22773
  updated_at: string;
20330
22774
  } | null;
20331
22775
  };
22776
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
22777
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
22778
+ effective_policy: {
22779
+ mode: "allow_all" | "allowlist" | "deny_all";
22780
+ rules: {
22781
+ host: string;
22782
+ /** @description [] = any port (a ceiling host). */
22783
+ ports: number[];
22784
+ protocols: "tcp"[];
22785
+ }[];
22786
+ cidrs: string[];
22787
+ };
20332
22788
  };
20333
22789
  };
20334
22790
  };
@@ -20549,6 +23005,18 @@ export interface operations {
20549
23005
  updated_at: string;
20550
23006
  } | null;
20551
23007
  };
23008
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
23009
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
23010
+ effective_policy: {
23011
+ mode: "allow_all" | "allowlist" | "deny_all";
23012
+ rules: {
23013
+ host: string;
23014
+ /** @description [] = any port (a ceiling host). */
23015
+ ports: number[];
23016
+ protocols: "tcp"[];
23017
+ }[];
23018
+ cidrs: string[];
23019
+ };
20552
23020
  };
20553
23021
  };
20554
23022
  };
@@ -21256,6 +23724,18 @@ export interface operations {
21256
23724
  updated_at: string;
21257
23725
  } | null;
21258
23726
  };
23727
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
23728
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
23729
+ effective_policy: {
23730
+ mode: "allow_all" | "allowlist" | "deny_all";
23731
+ rules: {
23732
+ host: string;
23733
+ /** @description [] = any port (a ceiling host). */
23734
+ ports: number[];
23735
+ protocols: "tcp"[];
23736
+ }[];
23737
+ cidrs: string[];
23738
+ };
21259
23739
  };
21260
23740
  };
21261
23741
  };
@@ -21476,6 +23956,18 @@ export interface operations {
21476
23956
  updated_at: string;
21477
23957
  } | null;
21478
23958
  };
23959
+ template_egress: components["schemas"]["TemplateEgressDefault"] | null;
23960
+ /** @description What the host enforces: the effective policy intersected with the template egress ceiling (equal to `effective` without a ceiling). */
23961
+ effective_policy: {
23962
+ mode: "allow_all" | "allowlist" | "deny_all";
23963
+ rules: {
23964
+ host: string;
23965
+ /** @description [] = any port (a ceiling host). */
23966
+ ports: number[];
23967
+ protocols: "tcp"[];
23968
+ }[];
23969
+ cidrs: string[];
23970
+ };
21479
23971
  };
21480
23972
  };
21481
23973
  };