@opensoha/contracts 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/COMPATIBILITY.md +24 -0
  2. package/README.md +1 -1
  3. package/agent/environment/export.go +1 -0
  4. package/agent/environment/protocol_test.go +1 -1
  5. package/agent/guest/protocol_test.go +2 -2
  6. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  7. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  8. package/delivery/document.schema.json +127 -9
  9. package/examples/relations_compat_test.go +18 -0
  10. package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-build-template.json +30 -0
  11. package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-deployment-template.json +30 -0
  12. package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-workflow-template.json +27 -0
  13. package/fixtures/openapi/DeliveryDocument/valid/migration-build-template.json +31 -0
  14. package/fixtures/openapi/DeliveryDocument/valid/migration-deployment-template.json +31 -0
  15. package/fixtures/openapi/DeliveryDocument/valid/migration-workflow-template.json +28 -0
  16. package/fixtures/openapi/DeliveryPlanInput/invalid/manual-plan.json +7 -0
  17. package/fixtures/openapi/DeliveryPlanInput/valid/manual-plan.json +6 -0
  18. package/fixtures/openapi/DeliveryTargetInput/invalid/candidate-on-runtime-deploy.json +9 -0
  19. package/fixtures/openapi/DeliveryTargetInput/invalid/config-update-missing-service.json +7 -0
  20. package/fixtures/openapi/DeliveryTargetInput/valid/template-configuration-only.json +8 -0
  21. package/fixtures/openapi/DeliveryTargetInput/valid/template-configuration-without-runtime-environment.json +1 -0
  22. package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/source-with-spec.json +33 -0
  23. package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/source-without-uid.json +29 -0
  24. package/fixtures/openapi/KubernetesImportCandidateListEnvelope/valid/stable-source.json +30 -0
  25. package/fixtures/openapi/KubernetesPod/invalid/pod-uid.json +9 -0
  26. package/fixtures/openapi/KubernetesPod/valid/pod-uid.json +9 -0
  27. package/fixtures/openapi/KubernetesPodDetail/invalid/pod-uid.json +6 -0
  28. package/fixtures/openapi/KubernetesPodDetail/valid/pod-uid.json +6 -0
  29. package/fixtures/openapi/KubernetesServiceImportRequest/invalid/empty-source-uid.json +48 -0
  30. package/fixtures/openapi/KubernetesServiceImportRequest/valid/pinned-workloads-and-cr.json +48 -0
  31. package/fixtures/openapi/ManifestExecutionTaskPayload/invalid/initialization.json +7 -0
  32. package/fixtures/openapi/ManifestExecutionTaskPayload/valid/initialization.json +7 -0
  33. package/fixtures/openapi/ManifestRootResource/invalid/root.json +1 -0
  34. package/fixtures/openapi/ManifestRootResource/valid/root.json +1 -0
  35. package/fixtures/openapi/ResourceRelationConfig/invalid/executable-rule.json +17 -0
  36. package/fixtures/openapi/ResourceRelationConfig/valid/unknown-kind.json +13 -0
  37. package/fixtures/openapi/ServiceDeploymentTemplateInput/invalid/migration-missing-guide-valid-yaml.json +38 -0
  38. package/fixtures/openapi/ServiceDeploymentTemplateInput/valid/migration-valid-yaml.json +39 -0
  39. package/fixtures/openapi/TemplateMigrationAssessment/invalid/initialization.json +9 -0
  40. package/fixtures/openapi/TemplateMigrationAssessment/valid/initialization.json +9 -0
  41. package/fixtures/openapi/TemplateMigrationPolicy/invalid/blank-guide.json +5 -0
  42. package/fixtures/openapi/TemplateMigrationPolicy/invalid/missing-guide.json +4 -0
  43. package/fixtures/openapi/TemplateMigrationPolicy/invalid/unknown-escape-hatch.json +6 -0
  44. package/fixtures/openapi/TemplateMigrationPolicy/valid/legacy-safe.json +4 -0
  45. package/fixtures/openapi/TemplateMigrationPolicy/valid/ordered-data-change.json +5 -0
  46. package/fixtures/openapi/TemplateUpdateBatchInput/invalid/duplicate-candidates.json +11 -0
  47. package/fixtures/openapi/TemplateUpdateBatchInput/invalid/empty-identities.json +10 -0
  48. package/fixtures/openapi/TemplateUpdateBatchInput/valid/staged-adoption.json +10 -0
  49. package/fixtures/openapi/TemplateUpdatePolicyInput/invalid/unknown-mode.json +8 -0
  50. package/fixtures/openapi/TemplateUpdatePolicyInput/valid/explicit-automatic.json +8 -0
  51. package/fixtures/openapi/TemplateUpdatePreviewInput/invalid/empty-identities.json +10 -0
  52. package/fixtures/openapi/TemplateUpdatePreviewInput/invalid/empty-targets.json +6 -0
  53. package/fixtures/openapi/TemplateUpdatePreviewInput/valid/cross-version-manual.json +14 -0
  54. package/gen/go/sohaapi/client.go +1 -1
  55. package/gen/go/sohaapi/client_test.go +2 -2
  56. package/gen/go/sohaapi/import_source_compat_test.go +12 -0
  57. package/gen/go/sohaapi/types.go +945 -159
  58. package/gen/ts/sohaapi/index.ts +746 -4
  59. package/go.mod +2 -2
  60. package/helmrelease/delivery.go +4 -1
  61. package/helmrelease/initialization.go +10 -0
  62. package/helmrelease/runtime/delivery.go +40 -10
  63. package/helmrelease/runtime/delivery_test.go +4 -0
  64. package/helmrelease/runtime/initialization.go +186 -0
  65. package/helmrelease/runtime/initialization_test.go +203 -0
  66. package/openapi/soha-api.json +2195 -55
  67. package/openapi/soha-api.yaml +349 -9
  68. package/openapi/spec_generated.go +3 -3
  69. package/openapi/spec_test.go +42 -0
  70. package/package.json +1 -1
  71. package/resource/models.go +2 -0
  72. package/resource/relations.go +225 -0
  73. package/resource/relations_test.go +47 -0
  74. package/resource/root_cr.go +38 -0
  75. package/resource/runtime/argocd_integration_test.go +1 -1
  76. package/resource/runtime/initialization.go +66 -0
  77. package/resource/runtime/initialization_test.go +80 -0
  78. package/resource/runtime/relations.go +161 -0
  79. package/resource/runtime/relations_test.go +100 -0
  80. package/resource/runtime/root_cr.go +79 -0
  81. package/resource/runtime/root_cr_test.go +118 -0
@@ -1,11 +1,13 @@
1
1
  openapi: 3.1.0
2
2
  info:
3
3
  title: Soha API
4
- version: 0.1.25
4
+ version: 0.1.26
5
5
  description: >
6
6
  Public OpenSoha core API contract. This first contract focuses on stable
7
7
  cross-repository boundaries: auth, health, runner-facing control-plane
8
8
  callbacks, AI Gateway, and MCP capability discovery.
9
+ Pod session WebSocket targets and their UID-aware ticket requirements are
10
+ described separately in x-soha-websocket-paths to preserve HTTP client generation.
9
11
  servers:
10
12
  - url: /api/v1
11
13
  description: Soha API v1
@@ -40,6 +42,78 @@ tags:
40
42
  - name: Portal
41
43
  - name: Directory
42
44
  - name: Network Access
45
+ x-soha-websocket-paths:
46
+ /clusters/{clusterID}/workloads/pods/{podName}/logs/stream:
47
+ get:
48
+ tags: [Platform]
49
+ operationId: streamKubernetesPodLogs
50
+ x-soha-permissions:
51
+ mode: all
52
+ keys: [platform.pods.logs]
53
+ x-soha-implementation-status: implemented
54
+ description: >-
55
+ Existing WebSocket logs endpoint. Saved sessions must provide expectedUid.
56
+ Each upstream open checks the current Pod UID and current action authorization.
57
+ A stream ticket issued with expectedUid binds namespace, container and shell too.
58
+ parameters:
59
+ - $ref: "#/components/parameters/ClusterID"
60
+ - $ref: "#/components/parameters/KubernetesPodName"
61
+ - $ref: "#/components/parameters/KubernetesNamespaceDefaultQuery"
62
+ - name: expectedUid
63
+ in: query
64
+ schema: { type: string, minLength: 1 }
65
+ - name: container
66
+ in: query
67
+ schema: { type: string, minLength: 1 }
68
+ - name: stream_ticket
69
+ in: query
70
+ schema: { type: string, minLength: 1 }
71
+ - name: tailLines
72
+ in: query
73
+ schema: { type: integer, minimum: 0, default: 200 }
74
+ - name: sinceSeconds
75
+ in: query
76
+ schema: { type: integer, minimum: 0, default: 0 }
77
+ responses:
78
+ "101":
79
+ description: WebSocket opened; terminalMessage envelopes carry stream output and safe exit status. Authentication, UID, permission or provider failures terminate the stream without attaching to a replacement Pod.
80
+ "401": { $ref: "#/components/responses/Error" }
81
+ "403": { $ref: "#/components/responses/Error" }
82
+ "503": { $ref: "#/components/responses/Error" }
83
+ /clusters/{clusterID}/workloads/pods/{podName}/terminal:
84
+ get:
85
+ tags: [Platform]
86
+ operationId: streamKubernetesPodTerminal
87
+ x-soha-permissions:
88
+ mode: all
89
+ keys: [platform.pods.exec]
90
+ x-soha-implementation-status: implemented
91
+ description: >-
92
+ Existing WebSocket exec endpoint. Saved sessions must provide expectedUid.
93
+ Each upstream open checks the current Pod UID and current action authorization.
94
+ A stream ticket issued with expectedUid binds namespace, container and shell too.
95
+ parameters:
96
+ - $ref: "#/components/parameters/ClusterID"
97
+ - $ref: "#/components/parameters/KubernetesPodName"
98
+ - $ref: "#/components/parameters/KubernetesNamespaceDefaultQuery"
99
+ - name: expectedUid
100
+ in: query
101
+ schema: { type: string, minLength: 1 }
102
+ - name: container
103
+ in: query
104
+ schema: { type: string, minLength: 1 }
105
+ - name: stream_ticket
106
+ in: query
107
+ schema: { type: string, minLength: 1 }
108
+ - name: shell
109
+ in: query
110
+ schema: { type: string, default: /bin/sh }
111
+ responses:
112
+ "101":
113
+ description: WebSocket opened; terminalMessage envelopes carry stream output and safe exit status. Authentication, UID, permission or provider failures terminate the stream without attaching to a replacement Pod.
114
+ "401": { $ref: "#/components/responses/Error" }
115
+ "403": { $ref: "#/components/responses/Error" }
116
+ "503": { $ref: "#/components/responses/Error" }
43
117
  paths:
44
118
  /network-access/vpn/profiles:
45
119
  get:
@@ -2640,11 +2714,81 @@ paths:
2640
2714
  $ref: "#/components/schemas/ApplicationEnvironmentEnvelope"
2641
2715
  "400":
2642
2716
  $ref: "#/components/responses/Error"
2717
+ /application-environments/{applicationEnvironmentID}/targets/{targetID}/source:
2718
+ get:
2719
+ tags: [Delivery]
2720
+ operationId: getApplicationEnvironmentTargetSource
2721
+ description: Read a linked source through existing Kubernetes authorization. Rejects replaced UIDs. Custom resource YAML additionally requires sensitive-data read permission. Responses must not be persisted in browser caches.
2722
+ parameters:
2723
+ - name: applicationEnvironmentID
2724
+ in: path
2725
+ required: true
2726
+ schema: { type: string, minLength: 1 }
2727
+ - name: targetID
2728
+ in: path
2729
+ required: true
2730
+ schema: { type: string, minLength: 1 }
2731
+ responses:
2732
+ "200":
2733
+ description: Current cluster YAML for the linked resource, never a fabricated source file.
2734
+ headers:
2735
+ Cache-Control:
2736
+ required: true
2737
+ schema: { type: string, const: no-store }
2738
+ content:
2739
+ application/json:
2740
+ schema:
2741
+ $ref: "#/components/schemas/KubernetesResourceYamlEnvelope"
2742
+ "403":
2743
+ $ref: "#/components/responses/Error"
2744
+ "404":
2745
+ $ref: "#/components/responses/Error"
2746
+ "409":
2747
+ $ref: "#/components/responses/Error"
2748
+ /application-environments/{applicationEnvironmentID}/targets/{targetID}/relations:
2749
+ get:
2750
+ tags: [Delivery]
2751
+ operationId: getApplicationEnvironmentTargetRelations
2752
+ description: Read UID-verified metadata relationships for an imported root. Every source retains Kubernetes and Soha authorization. Rules are observational metadata, never permission grants. Partial coverage is explicit; no provider configuration values are returned.
2753
+ parameters:
2754
+ - name: applicationEnvironmentID
2755
+ in: path
2756
+ required: true
2757
+ schema: { type: string, minLength: 1 }
2758
+ - name: targetID
2759
+ in: path
2760
+ required: true
2761
+ schema: { type: string, minLength: 1 }
2762
+ responses:
2763
+ "200":
2764
+ description: Bounded observed relations, including coverage gaps.
2765
+ headers:
2766
+ Cache-Control:
2767
+ required: true
2768
+ schema: { type: string, const: no-store }
2769
+ content:
2770
+ application/json:
2771
+ schema: { $ref: "#/components/schemas/ResourceRelationsEnvelope" }
2772
+ "400": { $ref: "#/components/responses/Error" }
2773
+ "403": { $ref: "#/components/responses/Error" }
2774
+ "404": { $ref: "#/components/responses/Error" }
2775
+ "409": { $ref: "#/components/responses/Error" }
2643
2776
  /application-environments/target-candidates:
2644
2777
  get:
2645
2778
  tags: [Delivery]
2646
2779
  operationId: listApplicationEnvironmentTargetCandidates
2647
2780
  parameters:
2781
+ - name: workloadKind
2782
+ in: query
2783
+ required: false
2784
+ schema:
2785
+ type: string
2786
+ enum: [Deployment, StatefulSet, DaemonSet, Job, CronJob, CustomResource]
2787
+ - name: crdName
2788
+ in: query
2789
+ required: false
2790
+ description: Explicit CRD selection for CustomResource discovery. Only this served resource and namespace are queried.
2791
+ schema: { type: string, minLength: 1 }
2648
2792
  - name: clusterId
2649
2793
  in: query
2650
2794
  required: true
@@ -4196,6 +4340,23 @@ paths:
4196
4340
  $ref: "#/components/schemas/DeliveryEnvironmentListEnvelope"
4197
4341
  "403":
4198
4342
  $ref: "#/components/responses/Error"
4343
+ /delivery/template-updates/targets:
4344
+ get:
4345
+ {"tags": ["Delivery"], "operationId": "listTemplateUpdateTargets", "summary": "Preview affected application bindings with honest paginated totals", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdateTargetPageEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "parameters": [{"in": "query", "name": "kind", "required": true, "schema": {"$ref": "#/components/schemas/TemplateUpdateKind"}}, {"in": "query", "name": "templateId", "required": true, "schema": {"type": "string", "maxLength": 256}}, {"in": "query", "name": "applicationId", "required": false, "schema": {"type": "string", "maxLength": 256}}, {"in": "query", "name": "page", "required": false, "schema": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}}, {"in": "query", "name": "pageSize", "required": false, "schema": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 100}}, {"name": "serviceId", "in": "query", "required": false, "schema": {"type": "string", "maxLength": 256}}, {"name": "applicationEnvironmentId", "in": "query", "required": false, "schema": {"type": "string", "maxLength": 256}}]}
4346
+ /delivery/template-updates/previews:
4347
+ post:
4348
+ {"tags": ["Delivery"], "operationId": "createTemplateUpdatePreview", "summary": "Freeze final template adoption and cumulative plus adjacent-version differences", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePreviewEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePreviewInput"}}}}}
4349
+ /delivery/template-updates/previews/{previewID}:
4350
+ get:
4351
+ {"tags": ["Delivery"], "operationId": "getTemplateUpdatePreview", "summary": "Read a frozen adoption preview with current scope revalidation", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePreviewEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "parameters": [{"in": "path", "name": "previewID", "required": true, "schema": {"type": "string", "maxLength": 256}}]}
4352
+ /delivery/template-updates/previews/{previewID}/batches:
4353
+ post:
4354
+ {"tags": ["Delivery"], "operationId": "createTemplateUpdateBatch", "summary": "Adopt selected candidates in waves through existing DeliveryBatch and Plan approvals", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeliveryBatchEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "parameters": [{"in": "path", "name": "previewID", "required": true, "schema": {"type": "string", "maxLength": 256}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdateBatchInput"}}}}}
4355
+ /delivery/template-updates/policies:
4356
+ get:
4357
+ {"tags": ["Delivery"], "operationId": "listTemplateUpdatePolicies", "summary": "List explicit adoption policies visible to the current principal", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePolicyListEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "parameters": [{"in": "query", "name": "kind", "required": true, "schema": {"$ref": "#/components/schemas/TemplateUpdateKind"}}, {"in": "query", "name": "templateId", "required": true, "schema": {"type": "string", "maxLength": 256}}, {"in": "query", "name": "applicationId", "required": false, "schema": {"type": "string", "maxLength": 256}}]}
4358
+ put:
4359
+ {"tags": ["Delivery"], "operationId": "saveTemplateUpdatePolicy", "summary": "Save fixed manual automatic or approval policy using a binding-scoped CAS", "description": "Uses current application and environment permissions. Published immutable template versions only; adoption changes configuration and never deploys resources. Fixed and detached bindings are excluded from automatic propagation. Concurrent changes return 409.", "responses": {"200": {"description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePolicyEnvelope"}}}}, "400": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateUpdatePolicyInput"}}}}}
4199
4360
  /delivery/manifest-packages:
4200
4361
  get:
4201
4362
  tags: [Delivery]
@@ -8661,6 +8822,10 @@ paths:
8661
8822
  - $ref: "#/components/parameters/ClusterID"
8662
8823
  - $ref: "#/components/parameters/KubernetesPodName"
8663
8824
  - $ref: "#/components/parameters/KubernetesNamespaceDefaultQuery"
8825
+ - name: expectedUid
8826
+ in: query
8827
+ description: Reject the request if the live Pod UID differs. Omit only for legacy clients, never when restoring a saved session.
8828
+ schema: { type: string, minLength: 1 }
8664
8829
  - name: container
8665
8830
  in: query
8666
8831
  schema: { type: string, minLength: 1 }
@@ -8682,6 +8847,11 @@ paths:
8682
8847
  $ref: "#/components/schemas/KubernetesPodLogsEnvelope"
8683
8848
  "403": { $ref: "#/components/responses/Error" }
8684
8849
  "404": { $ref: "#/components/responses/Error" }
8850
+ "409":
8851
+ description: The current Pod UID differs from expectedUid; open the current Pod instead of adopting it by name.
8852
+ content:
8853
+ application/json:
8854
+ schema: { $ref: "#/components/schemas/ErrorEnvelope" }
8685
8855
  "503": { $ref: "#/components/responses/Error" }
8686
8856
  /clusters/{clusterID}/workloads/pods/{podName}/yaml:
8687
8857
  get:
@@ -30106,6 +30276,7 @@ components:
30106
30276
  properties:
30107
30277
  path:
30108
30278
  type: string
30279
+ description: Same-origin stream pathname. UID-aware Pod sessions include expectedUid, namespace, container and shell query fields to bind the one-use ticket to that exact target; other query fields are not part of the binding.
30109
30280
  additionalProperties: false
30110
30281
  StreamTicket:
30111
30282
  type: object
@@ -31103,6 +31274,14 @@ components:
31103
31274
  type: string
31104
31275
  format: date-time
31105
31276
  additionalProperties: false
31277
+ ResourceRelationSource: {"type": "object", "required": ["apiVersion", "resource", "kind", "namespace"], "properties": {"apiVersion": {"type": "string", "minLength": 1}, "resource": {"type": "string", "minLength": 1}, "kind": {"type": "string", "minLength": 1}, "namespace": {"type": "string", "minLength": 1}}, "additionalProperties": false}
31278
+ ResourceRelationRule: {"type": "object", "required": ["id", "type", "target"], "properties": {"id": {"type": "string", "minLength": 1}, "type": {"type": "string", "enum": ["reference", "manual", "selector"]}, "target": {"$ref": "#/components/schemas/ResourceRelationSource"}, "name": {"type": "string"}, "uid": {"type": "string"}, "selector": {"type": "object", "additionalProperties": {"type": "string"}, "maxProperties": 16}}, "additionalProperties": false}
31279
+ ResourceRelationConfig: {"type": "object", "required": ["version", "rootUid", "sources", "rules"], "properties": {"version": {"type": "string", "const": "v1"}, "rootUid": {"type": "string", "minLength": 1}, "sources": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceRelationSource"}, "maxItems": 8}, "rules": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceRelationRule"}, "maxItems": 8}}, "additionalProperties": false}
31280
+ ResourceRelationNode: {"type": "object", "required": ["resource", "role", "depth"], "properties": {"resource": {"$ref": "#/components/schemas/KubernetesResourceRef"}, "role": {"type": "string", "enum": ["root", "owned", "manual", "reference", "candidate"]}, "depth": {"type": "integer", "minimum": 0, "maximum": 8}}, "additionalProperties": false}
31281
+ ResourceRelationEdge: {"type": "object", "required": ["fromUid", "toUid", "type"], "properties": {"fromUid": {"type": "string", "minLength": 1}, "toUid": {"type": "string", "minLength": 1}, "type": {"type": "string", "enum": ["owns", "manual", "references", "selector_candidate"]}, "ruleId": {"type": "string"}}, "additionalProperties": false}
31282
+ ResourceRelationCoverage: {"type": "object", "required": ["queryId", "state", "truncated"], "properties": {"queryId": {"type": "string", "minLength": 1}, "state": {"type": "string", "enum": ["available", "partial", "denied", "error", "not_installed", "unsupported"]}, "reasonCode": {"type": "string"}, "truncated": {"type": "boolean"}}, "additionalProperties": false}
31283
+ ResourceRelationsView: {"type": "object", "required": ["root", "config", "nodes", "edges", "coverage", "partial", "observedAt"], "properties": {"root": {"$ref": "#/components/schemas/KubernetesResourceRef"}, "config": {"$ref": "#/components/schemas/ResourceRelationConfig"}, "nodes": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceRelationNode"}, "maxItems": 500}, "edges": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceRelationEdge"}}, "coverage": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceRelationCoverage"}}, "partial": {"type": "boolean"}, "observedAt": {"type": "string"}}, "additionalProperties": false}
31284
+ ResourceRelationsEnvelope: {"type": "object", "required": ["data"], "properties": {"data": {"$ref": "#/components/schemas/ResourceRelationsView"}}, "additionalProperties": false}
31106
31285
  ReleaseTarget:
31107
31286
  type: object
31108
31287
  required: [id, applicationEnvironmentId, clusterId, namespace, workloadKind, workloadName, enabled]
@@ -31488,6 +31667,8 @@ components:
31488
31667
  type: object
31489
31668
  required: [deliveryPlanId, targetId, applicationId, applicationEnvironmentId, serviceId, serviceVersion, clusterId, namespace, releaseName, operation, chart, chartVersion, chartDigest, configurationDigest, valuesDigest, renderedDigest, expectedRevision, resources, preflightTaskId]
31490
31669
  properties:
31670
+ templateInputs: {"$ref": "#/components/schemas/TemplateVersionReference"}
31671
+ migration: {"$ref": "#/components/schemas/TemplateMigrationAssessment"}
31491
31672
  deliveryPlanId: { type: string, minLength: 1 }
31492
31673
  targetId: { type: string, minLength: 1 }
31493
31674
  applicationId: { type: string, minLength: 1 }
@@ -31535,6 +31716,11 @@ components:
31535
31716
  action: { type: string, enum: [preflight, apply, observe] }
31536
31717
  snapshot: { $ref: "#/components/schemas/HelmDeliverySnapshot" }
31537
31718
  prepared: { $ref: "#/components/schemas/HelmPreparedRelease" }
31719
+ initializationResources:
31720
+ type: array
31721
+ maxItems: 300
31722
+ description: Server-derived original successful initialization apply receipt. Required for initialization observation or already-applied recovery; current same-name objects cannot establish original ownership.
31723
+ items: { $ref: "#/components/schemas/ManifestResourceInventory" }
31538
31724
  additionalProperties: false
31539
31725
  HelmExecutionTaskResult:
31540
31726
  type: object
@@ -31610,6 +31796,7 @@ components:
31610
31796
  type: object
31611
31797
  required: [key, name, source, parameterSchema, defaults, health, enabled]
31612
31798
  properties:
31799
+ migrationPolicy: { $ref: "#/components/schemas/TemplateMigrationPolicy" }
31613
31800
  copiedFrom: { $ref: '#/components/schemas/TemplateCopyOrigin' }
31614
31801
  key: { type: string, minLength: 1, maxLength: 128, pattern: '^[a-z0-9][a-z0-9._-]*$' }
31615
31802
  name: { type: string, minLength: 1, maxLength: 200 }
@@ -31635,6 +31822,7 @@ components:
31635
31822
  type: object
31636
31823
  required: [id, key, name, source, parameterSchema, defaults, health, enabled, revision, publishedVersion, publicationState, createdAt, updatedAt]
31637
31824
  properties:
31825
+ migrationPolicy: { $ref: "#/components/schemas/TemplateMigrationPolicy" }
31638
31826
  id: { type: string, minLength: 1 }
31639
31827
  key: { type: string, minLength: 1 }
31640
31828
  name: { type: string, minLength: 1 }
@@ -31728,6 +31916,7 @@ components:
31728
31916
  type: object
31729
31917
  required: [id, key, name, enabled, createdAt, updatedAt]
31730
31918
  properties:
31919
+ migrationPolicy: {"$ref": "#/components/schemas/TemplateMigrationPolicy"}
31731
31920
  revision:
31732
31921
  type: integer
31733
31922
  minimum: 1
@@ -31769,6 +31958,7 @@ components:
31769
31958
  type: object
31770
31959
  required: [key, name, enabled]
31771
31960
  properties:
31961
+ migrationPolicy: {"$ref": "#/components/schemas/TemplateMigrationPolicy"}
31772
31962
  copiedFrom: { $ref: '#/components/schemas/TemplateCopyOrigin' }
31773
31963
  expectedRevision:
31774
31964
  type: integer
@@ -31925,10 +32115,44 @@ components:
31925
32115
  type: string
31926
32116
  minLength: 1
31927
32117
  additionalProperties: false
32118
+ KubernetesImportOwnerReference:
32119
+ type: object
32120
+ required: [apiVersion, kind, name, uid]
32121
+ properties:
32122
+ apiVersion: { type: string, minLength: 1 }
32123
+ kind: { type: string, minLength: 1 }
32124
+ name: { type: string, minLength: 1 }
32125
+ uid: { type: string, minLength: 1 }
32126
+ controller: { type: boolean }
32127
+ blockOwnerDeletion: { type: boolean }
32128
+ additionalProperties: false
32129
+ KubernetesImportSource:
32130
+ type: object
32131
+ description: Safe source identity captured from an authorized live read. No YAML, spec values, annotations or status are persisted here. For native workloads specDigest covers configuration and ownership metadata excluding status/resourceVersion. For CRs it fences the public UID, generation and owner references without hashing secret content; metadata-only edits are outside that fence. CRs without a positive generation are rejected. UID identifies recreation.
32132
+ required: [resource, specDigest, observedAt]
32133
+ properties:
32134
+ resource:
32135
+ allOf:
32136
+ - $ref: "#/components/schemas/KubernetesResourceRef"
32137
+ - type: object
32138
+ required: [uid]
32139
+ properties:
32140
+ uid: { type: string, minLength: 1 }
32141
+ specDigest: { type: string, pattern: '^[a-f0-9]{64}$' }
32142
+ generation: { type: integer, format: int64, minimum: 0 }
32143
+ crdName: { type: string, minLength: 1 }
32144
+ plural: { type: string, minLength: 1 }
32145
+ observedAt: { type: string, format: date-time }
32146
+ owners:
32147
+ type: array
32148
+ maxItems: 32
32149
+ items: { $ref: "#/components/schemas/KubernetesImportOwnerReference" }
32150
+ additionalProperties: false
31928
32151
  KubernetesImportCandidate:
31929
32152
  type: object
31930
32153
  required: [clusterId, namespace, workloadKind, workloadName, desiredReplicas, readyReplicas, relatedResources]
31931
32154
  properties:
32155
+ source: { $ref: "#/components/schemas/KubernetesImportSource" }
31932
32156
  clusterId:
31933
32157
  type: string
31934
32158
  minLength: 1
@@ -31937,7 +32161,7 @@ components:
31937
32161
  minLength: 1
31938
32162
  workloadKind:
31939
32163
  type: string
31940
- enum: [Deployment, StatefulSet, DaemonSet]
32164
+ enum: [Deployment, StatefulSet, DaemonSet, Job, CronJob, CustomResource]
31941
32165
  workloadName:
31942
32166
  type: string
31943
32167
  minLength: 1
@@ -31976,14 +32200,21 @@ components:
31976
32200
  type: object
31977
32201
  required: [workloadKind, workloadName]
31978
32202
  properties:
32203
+ expectedUid: { type: string, minLength: 1 }
32204
+ expectedSpecDigest: { type: string, pattern: '^[a-f0-9]{64}$' }
32205
+ crdName:
32206
+ type: string
32207
+ minLength: 1
32208
+ description: Required for CustomResource. Resolve the served GVR and scope from this CRD; never infer API group or plural from Kind.
31979
32209
  workloadKind:
31980
32210
  type: string
31981
- enum: [Deployment, StatefulSet, DaemonSet]
32211
+ enum: [Deployment, StatefulSet, DaemonSet, Job, CronJob, CustomResource]
31982
32212
  workloadName:
31983
32213
  type: string
31984
32214
  minLength: 1
31985
32215
  additionalProperties: false
31986
32216
  KubernetesServiceImportRequest:
32217
+ description: Initial association is observe_only. A managed request is rejected until a separate UID-aware ownership handoff and release preflight are available; it must never silently enable publishing.
31987
32218
  type: object
31988
32219
  required: [clusterId, namespace, applicationKey, applicationName, environmentKey, environmentName, ownershipMode, workloads]
31989
32220
  properties:
@@ -32041,7 +32272,7 @@ components:
32041
32272
  type: string
32042
32273
  workloadKind:
32043
32274
  type: string
32044
- enum: [Deployment, StatefulSet, DaemonSet]
32275
+ enum: [Deployment, StatefulSet, DaemonSet, Job, CronJob, CustomResource]
32045
32276
  workloadName:
32046
32277
  type: string
32047
32278
  created:
@@ -32051,11 +32282,12 @@ components:
32051
32282
  type: object
32052
32283
  required: [id, workloadKind, workloadName, created]
32053
32284
  properties:
32285
+ source: { $ref: "#/components/schemas/KubernetesImportSource" }
32054
32286
  id:
32055
32287
  type: string
32056
32288
  workloadKind:
32057
32289
  type: string
32058
- enum: [Deployment, StatefulSet, DaemonSet]
32290
+ enum: [Deployment, StatefulSet, DaemonSet, Job, CronJob, CustomResource]
32059
32291
  workloadName:
32060
32292
  type: string
32061
32293
  created:
@@ -32194,6 +32426,7 @@ components:
32194
32426
  type: object
32195
32427
  required: [id, key, name, enabled, createdAt, updatedAt]
32196
32428
  properties:
32429
+ migrationPolicy: {"$ref": "#/components/schemas/TemplateMigrationPolicy"}
32197
32430
  revision:
32198
32431
  type: integer
32199
32432
  minimum: 1
@@ -32245,6 +32478,7 @@ components:
32245
32478
  type: object
32246
32479
  required: [key, name, enabled]
32247
32480
  properties:
32481
+ migrationPolicy: {"$ref": "#/components/schemas/TemplateMigrationPolicy"}
32248
32482
  copiedFrom: { $ref: '#/components/schemas/TemplateCopyOrigin' }
32249
32483
  expectedRevision:
32250
32484
  type: integer
@@ -32347,9 +32581,10 @@ components:
32347
32581
  type: object
32348
32582
  required: [id, applicationId, serviceId, action]
32349
32583
  properties:
32584
+ templateCandidateId: { type: string, minLength: 1, maxLength: 256 }
32350
32585
  id: { type: string, pattern: '^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$' }
32351
32586
  applicationId: { type: string, minLength: 1 }
32352
- serviceId: { type: string, minLength: 1 }
32587
+ serviceId: { type: string }
32353
32588
  applicationEnvironmentId: { type: string, minLength: 1 }
32354
32589
  releaseTargetId: { type: string }
32355
32590
  helmRevision: { type: integer, minimum: 1, description: Existing owned Helm revision to restore through a new config_update batch. }
@@ -32370,10 +32605,25 @@ components:
32370
32605
  items: { type: string }
32371
32606
  allOf:
32372
32607
  - if:
32373
- properties:
32374
- action: { enum: [build_deploy, deploy, config_update] }
32608
+ required: [templateCandidateId]
32375
32609
  then:
32376
- required: [applicationEnvironmentId]
32610
+ properties:
32611
+ action: { const: config_update }
32612
+ releaseBundleId: { type: string, maxLength: 0 }
32613
+ not:
32614
+ anyOf:
32615
+ - required: [helmRevision]
32616
+ - required: [buildArgs]
32617
+ - required: [repositoryRefs]
32618
+ else:
32619
+ properties:
32620
+ serviceId: { type: string, minLength: 1 }
32621
+ allOf:
32622
+ - if:
32623
+ properties:
32624
+ action: { enum: [build_deploy, deploy, config_update] }
32625
+ then:
32626
+ required: [applicationEnvironmentId]
32377
32627
  - if:
32378
32628
  properties:
32379
32629
  action: { const: deploy }
@@ -32421,6 +32671,7 @@ components:
32421
32671
  type: object
32422
32672
  additionalProperties: false
32423
32673
  properties:
32674
+ migrationPolicy: { $ref: "#/components/schemas/TemplateMigrationPolicy" }
32424
32675
  builderKind: { type: string, minLength: 1, maxLength: 128, default: custom }
32425
32676
  dockerfileTemplate: { type: string, maxLength: 1048576 }
32426
32677
  buildCommands:
@@ -32453,6 +32704,7 @@ components:
32453
32704
  additionalProperties: false
32454
32705
  required: [source, parameterSchema, defaults, health]
32455
32706
  properties:
32707
+ migrationPolicy: {"$ref": "#/components/schemas/TemplateMigrationPolicy"}
32456
32708
  source: { $ref: '#/components/schemas/DeploymentTemplateSource' }
32457
32709
  parameterSchema: { $ref: '#/components/schemas/TemplateParameterSchema' }
32458
32710
  defaults: { $ref: '#/components/schemas/TemplateParameterValues' }
@@ -32609,6 +32861,7 @@ components:
32609
32861
  additionalProperties: false
32610
32862
  required: [definition]
32611
32863
  properties:
32864
+ migrationPolicy: { $ref: "#/components/schemas/TemplateMigrationPolicy" }
32612
32865
  category: { type: string, minLength: 1, maxLength: 128, not: { pattern: '^application:' }, default: release }
32613
32866
  definition:
32614
32867
  oneOf:
@@ -33329,6 +33582,7 @@ components:
33329
33582
  type: object
33330
33583
  required: [target, applicationName, serviceName, serviceVersion, configurationDigest]
33331
33584
  properties:
33585
+ templateUpdate: { $ref: "#/components/schemas/TemplateUpdateReceipt" }
33332
33586
  target: { $ref: "#/components/schemas/DeliveryTargetInput" }
33333
33587
  applicationName: { type: string }
33334
33588
  serviceName: { type: string }
@@ -33690,6 +33944,13 @@ components:
33690
33944
  type: object
33691
33945
  required: [applicationEnvironmentId, clusterId, namespace, workloadKind, workloadName, desiredReplicas, readyReplicas, updatedReplicas, availableReplicas]
33692
33946
  properties:
33947
+ targetId:
33948
+ type: string
33949
+ source:
33950
+ $ref: "#/components/schemas/KubernetesImportSource"
33951
+ sourceStatus:
33952
+ type: string
33953
+ enum: [linked, changed, replaced, missing, unavailable, forbidden]
33693
33954
  applicationEnvironmentId:
33694
33955
  type: string
33695
33956
  clusterId:
@@ -34239,11 +34500,28 @@ components:
34239
34500
  type: string
34240
34501
  enum: [preflight, apply, observe, repair, adopt, rollback, sync, rollout_control]
34241
34502
  x-enum-varnames: [ManifestTaskActionPreflight, ManifestTaskActionApply, ManifestTaskActionObserve, ManifestTaskActionRepair, ManifestTaskActionAdopt, ManifestTaskActionRollback, ManifestTaskActionSync, ManifestTaskActionRolloutControl]
34503
+ ManifestRootResource:
34504
+ type: object
34505
+ description: Server-frozen imported namespaced CR identity and user-reviewed generation. Publication requires the original imported target with metadata ownershipMode=managed, rootCRGeneration matching the reviewed generation, and configRef selecting its Manifest binding. Only spec may be updated; missing roots are never created. Current user or token permissions, external ownership and UID are rechecked. Requires manifest.root-cr.v1 Agent capability and manifest_root_cr_v1 provider. Configuration copies, revisions, plans and deployments retain the sensitive configuration read permission; ordinary task summaries omit root documents.
34506
+ required: [apiVersion, kind, namespace, name, uid, generation, crdName, targetId, deliveryPlanId]
34507
+ properties:
34508
+ targetId: { type: string, minLength: 1 }
34509
+ deliveryPlanId: { type: string, minLength: 1 }
34510
+ apiVersion: { type: string, minLength: 3 }
34511
+ kind: { type: string, minLength: 1 }
34512
+ namespace: { type: string, minLength: 1 }
34513
+ name: { type: string, minLength: 1 }
34514
+ uid: { type: string, minLength: 1 }
34515
+ generation: { type: integer, format: int64, minimum: 1 }
34516
+ crdName: { type: string, minLength: 1 }
34517
+ additionalProperties: false
34242
34518
  ManifestExecutionTaskPayload:
34243
34519
  type: object
34244
34520
  description: Controller-aware tasks use providerKind manifest_agent_v3.<clusterId> and require manifest.execution.v3. Older runners must not claim these tasks or bypass GitOps and Rollout ownership.
34245
34521
  required: [action, packageId, generation, idempotencyKey]
34246
34522
  properties:
34523
+ initializationPlanId: { type: string, minLength: 1, maxLength: 128, description: "Server-frozen initialization Plan identity. Requires manifest.initialize.v1 and its dedicated provider; preflight uses create dry-run, apply creates only, and observation verifies the created UIDs. Never a force or adoption flag." }
34524
+ rootResource: { $ref: "#/components/schemas/ManifestRootResource" }
34247
34525
  rolloutControl: { $ref: "#/components/schemas/ProgressiveRolloutControlInput" }
34248
34526
  gitOpsDocuments:
34249
34527
  type: array
@@ -34306,6 +34584,7 @@ components:
34306
34584
  type: object
34307
34585
  required: [ready, capability, renderedDigest, resourceCount, diagnostics]
34308
34586
  properties:
34587
+ initializationPlanId: { type: string, minLength: 1, maxLength: 128, description: "Server-frozen initialization Plan identity. Requires manifest.initialize.v1 and its dedicated provider; preflight uses create dry-run, apply creates only, and observation verifies the created UIDs. Never a force or adoption flag." }
34309
34588
  ready: { type: boolean }
34310
34589
  capability: { type: string, enum: [available, degraded, unsupported] }
34311
34590
  renderedDigest: { type: string }
@@ -34352,6 +34631,7 @@ components:
34352
34631
  type: object
34353
34632
  required: [action, generation, stale, diagnostics, inventory]
34354
34633
  properties:
34634
+ initializationPlanId: { type: string, minLength: 1, maxLength: 128, description: "Server-frozen initialization Plan identity. Requires manifest.initialize.v1 and its dedicated provider; preflight uses create dry-run, apply creates only, and observation verifies the created UIDs. Never a force or adoption flag." }
34355
34635
  rollout: { $ref: "#/components/schemas/ProgressiveRolloutStatus" }
34356
34636
  action: { $ref: "#/components/schemas/ManifestTaskAction" }
34357
34637
  deploymentId: { type: string }
@@ -34464,6 +34744,7 @@ components:
34464
34744
  type: object
34465
34745
  required: [id, packageId, applicationEnvironmentId, environmentKey, clusterId, namespace, overlay, driftPolicy, deletionPolicy, enabled, version, createdAt, updatedAt]
34466
34746
  properties:
34747
+ templateSelection: { $ref: "#/components/schemas/ManifestTemplateSelection" }
34467
34748
  templateParameters: { $ref: "#/components/schemas/TemplateParameterValues" }
34468
34749
  id: { type: string, minLength: 1 }
34469
34750
  packageId: { type: string, minLength: 1 }
@@ -34601,6 +34882,7 @@ components:
34601
34882
  type: object
34602
34883
  required: [observedGeneration, phase, conditions, inventory]
34603
34884
  properties:
34885
+ appliedTemplate: {"$ref": "#/components/schemas/TemplateVersionReference"}
34604
34886
  observedGeneration: { type: integer, format: int64, minimum: 0 }
34605
34887
  appliedRevision: { type: integer, minimum: 1 }
34606
34888
  appliedDigest: { type: string }
@@ -35145,6 +35427,7 @@ components:
35145
35427
  type: object
35146
35428
  required: [id, source, status, applicationId, applicationEnvironmentId, action, requiresApproval, createdAt, updatedAt]
35147
35429
  properties:
35430
+ templateCandidateId: { type: string, minLength: 1, maxLength: 256 }
35148
35431
  dockerSnapshots:
35149
35432
  type: array
35150
35433
  maxItems: 50
@@ -35243,6 +35526,8 @@ components:
35243
35526
  type: object
35244
35527
  required: [deliveryPlanId, targetId, packageId, bindingId, bindingVersion, applicationEnvironmentId, clusterId, namespace, revision, revisionDigest, packageUpdatedAt, rendererVersion, inputDigest, renderedDigest, documents, preflightTaskId, expectedGeneration]
35245
35528
  properties:
35529
+ migration: {"$ref": "#/components/schemas/TemplateMigrationAssessment"}
35530
+ rootResource: { $ref: "#/components/schemas/ManifestRootResource" }
35246
35531
  gitOpsDocuments:
35247
35532
  type: array
35248
35533
  minItems: 1
@@ -38022,6 +38307,10 @@ components:
38022
38307
  type: object
38023
38308
  required: [name, namespace, phase, readyContainers, restarts, ageSeconds]
38024
38309
  properties:
38310
+ uid:
38311
+ type: string
38312
+ minLength: 1
38313
+ description: Immutable Pod identity. Required by clients restoring a saved live session; absent on older providers.
38025
38314
  name:
38026
38315
  type: string
38027
38316
  namespace:
@@ -38181,6 +38470,10 @@ components:
38181
38470
  type: object
38182
38471
  required: [name, namespace, phase]
38183
38472
  properties:
38473
+ uid:
38474
+ type: string
38475
+ minLength: 1
38476
+ description: Immutable Pod identity. Required by clients restoring a saved live session; absent on older providers.
38184
38477
  name:
38185
38478
  type: string
38186
38479
  namespace:
@@ -50520,3 +50813,50 @@ components:
50520
50813
  properties:
50521
50814
  data: { $ref: "#/components/schemas/NetworkPolicyPreviewResult" }
50522
50815
  additionalProperties: false
50816
+
50817
+ TemplateUpdateKind:
50818
+ {"type": "string", "enum": ["deployment", "build", "workflow", "blueprint"]}
50819
+ TemplateUpdateMode:
50820
+ {"type": "string", "enum": ["fixed", "manual", "automatic", "approval"]}
50821
+ ManifestTemplateSelection:
50822
+ {"type": "object", "properties": {"templateId": {"type": "string", "maxLength": 256}, "version": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "parameters": {"$ref": "#/components/schemas/TemplateParameterValues"}, "baseFilesDigest": {"type": "string", "maxLength": 80}, "adoptionId": {"type": "string", "maxLength": 256}}, "required": ["templateId", "version", "parameters", "baseFilesDigest", "adoptionId"], "additionalProperties": false}
50823
+ TemplateUpdateTarget:
50824
+ {"type": "object", "properties": {"id": {"type": "string", "maxLength": 256}, "kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "maxLength": 256}, "applicationId": {"type": "string", "maxLength": 256}, "applicationName": {"type": "string", "maxLength": 256}, "serviceId": {"type": "string", "maxLength": 256}, "serviceName": {"type": "string", "maxLength": 256}, "applicationEnvironmentId": {"type": "string", "maxLength": 256}, "environmentName": {"type": "string", "maxLength": 256}, "releaseTargetId": {"type": "string", "maxLength": 256}, "fromVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "mode": {"$ref": "#/components/schemas/TemplateUpdateMode"}, "requiresApproval": {"type": "boolean"}, "eligible": {"type": "boolean"}, "reason": {"type": "string", "maxLength": 1024}, "independentOverrides": {"type": "array", "items": {"type": "string", "maxLength": 256}, "maxItems": 100}, "bindingRevision": {"type": "string", "maxLength": 256}, "scope": {"type": "string", "enum": ["environment", "application", "creation_only"]}}, "required": ["id", "kind", "templateId", "applicationId", "applicationName", "serviceId", "serviceName", "applicationEnvironmentId", "environmentName", "releaseTargetId", "fromVersion", "mode", "requiresApproval", "eligible", "reason", "independentOverrides", "bindingRevision", "scope"], "additionalProperties": false}
50825
+ TemplateUpdateTargetPage:
50826
+ {"type": "object", "properties": {"items": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdateTarget"}, "maxItems": 100}, "total": {"type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647}, "page": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "pageSize": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 100}}, "required": ["items", "total", "page", "pageSize"], "additionalProperties": false}
50827
+ TemplateUpdateSelection:
50828
+ {"type": "object", "properties": {"targetId": {"type": "string", "maxLength": 256, "minLength": 1}, "parameters": {"$ref": "#/components/schemas/TemplateParameterValues"}, "useNewDefaults": {"type": "array", "items": {"type": "string", "maxLength": 256}, "maxItems": 100, "uniqueItems": true}, "wave": {"type": "integer", "format": "int64", "minimum": 0, "maximum": 199}}, "required": ["targetId"], "additionalProperties": false}
50829
+ TemplateUpdatePreviewInput:
50830
+ {"type": "object", "properties": {"kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "maxLength": 256, "minLength": 1}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "targets": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdateSelection"}, "maxItems": 100, "minItems": 1}, "applicationId": {"type": "string", "minLength": 1, "maxLength": 256}}, "required": ["kind", "templateId", "toVersion", "targets"], "additionalProperties": false}
50831
+ TemplateUpdateChange:
50832
+ {"type": "object", "properties": {"section": {"type": "string", "enum": ["source", "schema", "defaults", "parameters", "resources"]}, "path": {"type": "string", "maxLength": 1024}, "before": {"type": "string", "maxLength": 32768}, "after": {"type": "string", "maxLength": 32768}}, "required": ["section", "path", "before", "after"], "additionalProperties": false}
50833
+ TemplateUpdateDiff:
50834
+ {"type": "object", "properties": {"fromVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "changes": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdateChange"}, "maxItems": 500}, "renderStatus": {"type": "string", "enum": ["available", "unavailable", "invalid"]}, "diagnostics": {"type": "array", "items": {"type": "string", "maxLength": 2048}, "maxItems": 32}, "historyGap": {"type": "boolean"}, "migration": {"$ref": "#/components/schemas/TemplateMigrationAssessment"}}, "required": ["fromVersion", "toVersion", "changes", "renderStatus", "diagnostics", "historyGap"], "additionalProperties": false}
50835
+ TemplateUpdateCandidate:
50836
+ {"type": "object", "properties": {"id": {"type": "string", "maxLength": 256}, "target": {"$ref": "#/components/schemas/TemplateUpdateTarget"}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "digest": {"type": "string", "maxLength": 80}, "parameters": {"$ref": "#/components/schemas/TemplateParameterValues"}, "cumulative": {"$ref": "#/components/schemas/TemplateUpdateDiff"}, "versions": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdateDiff"}, "maxItems": 200}, "eligible": {"type": "boolean"}, "reason": {"type": "string", "maxLength": 1024}, "requiresApproval": {"type": "boolean"}, "wave": {"type": "integer", "format": "int64", "minimum": 0, "maximum": 199}}, "required": ["id", "target", "toVersion", "digest", "parameters", "cumulative", "versions", "eligible", "reason", "requiresApproval", "wave"], "additionalProperties": false}
50837
+ TemplateUpdatePreview:
50838
+ {"type": "object", "properties": {"id": {"type": "string", "maxLength": 256}, "kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "maxLength": 256}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "digest": {"type": "string", "maxLength": 80}, "candidates": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdateCandidate"}, "maxItems": 100}, "createdAt": {"type": "string", "format": "date-time"}, "expiresAt": {"type": "string", "format": "date-time"}, "configurationOnly": {"type": "boolean", "const": true}}, "required": ["id", "kind", "templateId", "toVersion", "digest", "candidates", "createdAt", "expiresAt", "configurationOnly"], "additionalProperties": false}
50839
+ TemplateUpdateBatchInput:
50840
+ {"type": "object", "properties": {"previewDigest": {"type": "string", "maxLength": 80, "minLength": 1}, "candidateIds": {"type": "array", "items": {"type": "string", "maxLength": 256, "minLength": 1}, "maxItems": 100, "minItems": 1, "uniqueItems": true}, "waveSize": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 100}, "stopOnFailure": {"type": "boolean"}, "acknowledgeHistoryGaps": {"type": "boolean"}, "idempotencyKey": {"type": "string", "maxLength": 128, "minLength": 8}}, "required": ["previewDigest", "candidateIds", "waveSize", "stopOnFailure", "acknowledgeHistoryGaps", "idempotencyKey"], "additionalProperties": false}
50841
+ TemplateUpdatePolicyInput:
50842
+ {"type": "object", "properties": {"kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "maxLength": 256, "minLength": 1}, "targetId": {"type": "string", "maxLength": 256, "minLength": 1}, "mode": {"$ref": "#/components/schemas/TemplateUpdateMode"}, "paused": {"type": "boolean"}, "expectedVersion": {"type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647}}, "required": ["kind", "templateId", "targetId", "mode", "paused", "expectedVersion"], "additionalProperties": false}
50843
+ TemplateUpdatePolicy:
50844
+ {"type": "object", "properties": {"id": {"type": "string", "maxLength": 256}, "kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "maxLength": 256}, "targetId": {"type": "string", "maxLength": 256}, "mode": {"$ref": "#/components/schemas/TemplateUpdateMode"}, "paused": {"type": "boolean"}, "version": {"type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647}, "lastBatchId": {"type": "string", "maxLength": 256}, "lastError": {"type": "string", "maxLength": 1024}, "updatedAt": {"type": "string", "format": "date-time"}}, "required": ["id", "kind", "templateId", "targetId", "mode", "paused", "version", "lastBatchId", "lastError", "updatedAt"], "additionalProperties": false}
50845
+ TemplateUpdateTargetPageEnvelope:
50846
+ {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/TemplateUpdateTargetPage"}}, "required": ["data"], "additionalProperties": false}
50847
+ TemplateUpdatePreviewEnvelope:
50848
+ {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/TemplateUpdatePreview"}}, "required": ["data"], "additionalProperties": false}
50849
+ TemplateUpdatePolicyEnvelope:
50850
+ {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/TemplateUpdatePolicy"}}, "required": ["data"], "additionalProperties": false}
50851
+ TemplateUpdatePolicyListEnvelope:
50852
+ {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/TemplateUpdatePolicy"}, "maxItems": 2000}}, "required": ["data"], "additionalProperties": false}
50853
+ TemplateUpdateReceipt:
50854
+ {"type": "object", "required": ["kind", "templateId", "bindingId", "previewId", "candidateId", "fromVersion", "toVersion", "requiresApproval"], "properties": {"kind": {"$ref": "#/components/schemas/TemplateUpdateKind"}, "templateId": {"type": "string", "minLength": 1, "maxLength": 256}, "bindingId": {"type": "string", "minLength": 1, "maxLength": 256}, "previewId": {"type": "string", "minLength": 1, "maxLength": 256}, "candidateId": {"type": "string", "minLength": 1, "maxLength": 256}, "fromVersion": {"type": "integer", "format": "int64", "minimum": 1}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1}, "requiresApproval": {"type": "boolean"}}, "additionalProperties": false}
50855
+ TemplateMigrationPolicy:
50856
+ {"type": "object", "additionalProperties": false, "properties": {"sequential": {"type": "boolean", "description": "Must cross this boundary as adjacent published versions; approval cannot waive it."}, "irreversible": {"type": "boolean", "description": "Forward changes require approval; ordinary rollback across this boundary is forbidden."}, "guide": {"type": "string", "maxLength": 2000, "description": "Human migration/recovery instructions. Never executed as a script."}}, "required": ["sequential", "irreversible"], "if": {"anyOf": [{"required": ["sequential"], "properties": {"sequential": {"const": true}}}, {"required": ["irreversible"], "properties": {"irreversible": {"const": true}}}]}, "then": {"required": ["guide"], "properties": {"guide": {"minLength": 1, "pattern": "\\S"}}}}
50857
+ TemplateVersionReference:
50858
+ {"type": "object", "additionalProperties": false, "properties": {"templateId": {"type": "string", "maxLength": 128, "minLength": 1}, "templateVersion": {"type": "integer", "format": "int64", "minimum": 1}, "templateDigest": {"type": "string", "maxLength": 80, "minLength": 1}}, "required": ["templateId", "templateVersion", "templateDigest"]}
50859
+ TemplateMigrationStep:
50860
+ {"type": "object", "additionalProperties": false, "properties": {"version": {"type": "integer", "format": "int64", "minimum": 1}, "contentDigest": {"type": "string", "maxLength": 80}, "policy": {"$ref": "#/components/schemas/TemplateMigrationPolicy"}}, "required": ["version", "contentDigest", "policy"]}
50861
+ TemplateMigrationAssessment:
50862
+ {"type": "object", "additionalProperties": false, "properties": {"initialization": {"type": "boolean", "description": "Server-classified first-deployment candidate; requires create-only preflight and explicit Plan approval. It is not a successful runtime baseline or proof that external data is empty."}, "fromVersion": {"type": "integer", "format": "int64", "minimum": 0}, "toVersion": {"type": "integer", "format": "int64", "minimum": 1}, "blocked": {"type": "boolean"}, "requiresApproval": {"type": "boolean"}, "reason": {"type": "string", "maxLength": 1024}, "steps": {"type": "array", "maxItems": 200, "items": {"$ref": "#/components/schemas/TemplateMigrationStep"}}}, "required": ["fromVersion", "toVersion", "blocked", "requiresApproval", "reason", "steps"]}