@treeseed/sdk 0.13.0-rc.77 → 0.13.0-rc.80

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.
@@ -1,6 +1,199 @@
1
1
  import { z } from 'zod';
2
+ export declare function hostedTopologyStateKey(input: {
3
+ teamId: string;
4
+ deploymentId: string;
5
+ environment: 'staging' | 'production';
6
+ stackId: string;
7
+ }): string;
8
+ declare const hostedStateBackendCoreSchema: z.ZodObject<{
9
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-state-backend/v1">;
10
+ type: z.ZodLiteral<"s3">;
11
+ teamId: z.ZodString;
12
+ deploymentId: z.ZodString;
13
+ environment: z.ZodEnum<["staging", "production"]>;
14
+ stackId: z.ZodString;
15
+ connectionRef: z.ZodString;
16
+ bucket: z.ZodString;
17
+ key: z.ZodString;
18
+ region: z.ZodString;
19
+ endpoint: z.ZodOptional<z.ZodString>;
20
+ usePathStyle: z.ZodOptional<z.ZodBoolean>;
21
+ encryptionKeyRef: z.ZodString;
22
+ }, "strict", z.ZodTypeAny, {
23
+ key: string;
24
+ type: "s3";
25
+ schemaVersion: "treeseed.hosted-state-backend/v1";
26
+ teamId: string;
27
+ environment: "production" | "staging";
28
+ deploymentId: string;
29
+ stackId: string;
30
+ connectionRef: string;
31
+ bucket: string;
32
+ region: string;
33
+ encryptionKeyRef: string;
34
+ endpoint?: string | undefined;
35
+ usePathStyle?: boolean | undefined;
36
+ }, {
37
+ key: string;
38
+ type: "s3";
39
+ schemaVersion: "treeseed.hosted-state-backend/v1";
40
+ teamId: string;
41
+ environment: "production" | "staging";
42
+ deploymentId: string;
43
+ stackId: string;
44
+ connectionRef: string;
45
+ bucket: string;
46
+ region: string;
47
+ encryptionKeyRef: string;
48
+ endpoint?: string | undefined;
49
+ usePathStyle?: boolean | undefined;
50
+ }>;
51
+ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
52
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-state-backend/v1">;
53
+ type: z.ZodLiteral<"s3">;
54
+ teamId: z.ZodString;
55
+ deploymentId: z.ZodString;
56
+ environment: z.ZodEnum<["staging", "production"]>;
57
+ stackId: z.ZodString;
58
+ connectionRef: z.ZodString;
59
+ bucket: z.ZodString;
60
+ key: z.ZodString;
61
+ region: z.ZodString;
62
+ endpoint: z.ZodOptional<z.ZodString>;
63
+ usePathStyle: z.ZodOptional<z.ZodBoolean>;
64
+ encryptionKeyRef: z.ZodString;
65
+ } & {
66
+ bindingDigest: z.ZodString;
67
+ }, "strict", z.ZodTypeAny, {
68
+ key: string;
69
+ type: "s3";
70
+ schemaVersion: "treeseed.hosted-state-backend/v1";
71
+ teamId: string;
72
+ environment: "production" | "staging";
73
+ deploymentId: string;
74
+ stackId: string;
75
+ connectionRef: string;
76
+ bucket: string;
77
+ region: string;
78
+ encryptionKeyRef: string;
79
+ bindingDigest: string;
80
+ endpoint?: string | undefined;
81
+ usePathStyle?: boolean | undefined;
82
+ }, {
83
+ key: string;
84
+ type: "s3";
85
+ schemaVersion: "treeseed.hosted-state-backend/v1";
86
+ teamId: string;
87
+ environment: "production" | "staging";
88
+ deploymentId: string;
89
+ stackId: string;
90
+ connectionRef: string;
91
+ bucket: string;
92
+ region: string;
93
+ encryptionKeyRef: string;
94
+ bindingDigest: string;
95
+ endpoint?: string | undefined;
96
+ usePathStyle?: boolean | undefined;
97
+ }>, {
98
+ key: string;
99
+ type: "s3";
100
+ schemaVersion: "treeseed.hosted-state-backend/v1";
101
+ teamId: string;
102
+ environment: "production" | "staging";
103
+ deploymentId: string;
104
+ stackId: string;
105
+ connectionRef: string;
106
+ bucket: string;
107
+ region: string;
108
+ encryptionKeyRef: string;
109
+ bindingDigest: string;
110
+ endpoint?: string | undefined;
111
+ usePathStyle?: boolean | undefined;
112
+ }, {
113
+ key: string;
114
+ type: "s3";
115
+ schemaVersion: "treeseed.hosted-state-backend/v1";
116
+ teamId: string;
117
+ environment: "production" | "staging";
118
+ deploymentId: string;
119
+ stackId: string;
120
+ connectionRef: string;
121
+ bucket: string;
122
+ region: string;
123
+ encryptionKeyRef: string;
124
+ bindingDigest: string;
125
+ endpoint?: string | undefined;
126
+ usePathStyle?: boolean | undefined;
127
+ }>;
128
+ export declare function bindHostedStateBackend(input: z.input<typeof hostedStateBackendCoreSchema>): {
129
+ key: string;
130
+ type: "s3";
131
+ schemaVersion: "treeseed.hosted-state-backend/v1";
132
+ teamId: string;
133
+ environment: "production" | "staging";
134
+ deploymentId: string;
135
+ stackId: string;
136
+ connectionRef: string;
137
+ bucket: string;
138
+ region: string;
139
+ encryptionKeyRef: string;
140
+ bindingDigest: string;
141
+ endpoint?: string | undefined;
142
+ usePathStyle?: boolean | undefined;
143
+ };
2
144
  export declare const hostedProviderSchema: z.ZodEnum<["cloudflare", "railway"]>;
3
- export declare const hostedResourceKindSchema: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
145
+ export declare const hostedResourceKindSchema: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
146
+ export declare const hostedArtifactSchema: z.ZodUnion<[z.ZodObject<{
147
+ kind: z.ZodLiteral<"archive">;
148
+ format: z.ZodLiteral<"tar+gzip">;
149
+ digest: z.ZodString;
150
+ source: z.ZodString;
151
+ }, "strict", z.ZodTypeAny, {
152
+ digest: string;
153
+ source: string;
154
+ kind: "archive";
155
+ format: "tar+gzip";
156
+ }, {
157
+ digest: string;
158
+ source: string;
159
+ kind: "archive";
160
+ format: "tar+gzip";
161
+ }>, z.ZodObject<{
162
+ kind: z.ZodLiteral<"file">;
163
+ mediaType: z.ZodString;
164
+ digest: z.ZodString;
165
+ source: z.ZodString;
166
+ }, "strict", z.ZodTypeAny, {
167
+ digest: string;
168
+ source: string;
169
+ kind: "file";
170
+ mediaType: string;
171
+ }, {
172
+ digest: string;
173
+ source: string;
174
+ kind: "file";
175
+ mediaType: string;
176
+ }>, z.ZodEffects<z.ZodObject<{
177
+ kind: z.ZodLiteral<"oci-image">;
178
+ digest: z.ZodString;
179
+ identity: z.ZodString;
180
+ }, "strict", z.ZodTypeAny, {
181
+ digest: string;
182
+ kind: "oci-image";
183
+ identity: string;
184
+ }, {
185
+ digest: string;
186
+ kind: "oci-image";
187
+ identity: string;
188
+ }>, {
189
+ digest: string;
190
+ kind: "oci-image";
191
+ identity: string;
192
+ }, {
193
+ digest: string;
194
+ kind: "oci-image";
195
+ identity: string;
196
+ }>]>;
4
197
  declare const hostedConnectionSnapshotSchema: z.ZodEffects<z.ZodObject<{
5
198
  connectionRef: z.ZodString;
6
199
  nonSecretConfig: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -17,9 +210,115 @@ declare const hostedConnectionSnapshotSchema: z.ZodEffects<z.ZodObject<{
17
210
  connectionRef: string;
18
211
  nonSecretConfig: Record<string, string | number | boolean>;
19
212
  }>;
213
+ export declare const hostedResourceDeclarationSchema: z.ZodObject<{
214
+ id: z.ZodString;
215
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
216
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
217
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
218
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodString]>, z.ZodUnion<[z.ZodObject<{
219
+ input: z.ZodString;
220
+ }, "strict", z.ZodTypeAny, {
221
+ input: string;
222
+ }, {
223
+ input: string;
224
+ }>, z.ZodObject<{
225
+ artifact: z.ZodString;
226
+ }, "strict", z.ZodTypeAny, {
227
+ artifact: string;
228
+ }, {
229
+ artifact: string;
230
+ }>, z.ZodObject<{
231
+ resourceOutput: z.ZodObject<{
232
+ resourceId: z.ZodString;
233
+ output: z.ZodString;
234
+ }, "strict", z.ZodTypeAny, {
235
+ resourceId: string;
236
+ output: string;
237
+ }, {
238
+ resourceId: string;
239
+ output: string;
240
+ }>;
241
+ }, "strict", z.ZodTypeAny, {
242
+ resourceOutput: {
243
+ resourceId: string;
244
+ output: string;
245
+ };
246
+ }, {
247
+ resourceOutput: {
248
+ resourceId: string;
249
+ output: string;
250
+ };
251
+ }>, z.ZodObject<{
252
+ literal: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ literal: string | number | boolean;
255
+ }, {
256
+ literal: string | number | boolean;
257
+ }>]>>>;
258
+ adoption: z.ZodObject<{
259
+ mode: z.ZodLiteral<"adopt-or-create">;
260
+ externalIdInput: z.ZodOptional<z.ZodString>;
261
+ replacement: z.ZodLiteral<"forbidden">;
262
+ }, "strict", z.ZodTypeAny, {
263
+ mode: "adopt-or-create";
264
+ replacement: "forbidden";
265
+ externalIdInput?: string | undefined;
266
+ }, {
267
+ mode: "adopt-or-create";
268
+ replacement: "forbidden";
269
+ externalIdInput?: string | undefined;
270
+ }>;
271
+ }, "strict", z.ZodTypeAny, {
272
+ id: string;
273
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
274
+ provider: "cloudflare" | "railway";
275
+ dependsOn: string[];
276
+ parameters: Record<string, {
277
+ input: string;
278
+ } | {
279
+ artifact: string;
280
+ } | {
281
+ resourceOutput: {
282
+ resourceId: string;
283
+ output: string;
284
+ };
285
+ } | {
286
+ literal: string | number | boolean;
287
+ }>;
288
+ adoption: {
289
+ mode: "adopt-or-create";
290
+ replacement: "forbidden";
291
+ externalIdInput?: string | undefined;
292
+ };
293
+ }, {
294
+ id: string;
295
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
296
+ provider: "cloudflare" | "railway";
297
+ adoption: {
298
+ mode: "adopt-or-create";
299
+ replacement: "forbidden";
300
+ externalIdInput?: string | undefined;
301
+ };
302
+ dependsOn?: string[] | undefined;
303
+ parameters?: Record<string, {
304
+ input: string;
305
+ } | {
306
+ artifact: string;
307
+ } | {
308
+ resourceOutput: {
309
+ resourceId: string;
310
+ output: string;
311
+ };
312
+ } | {
313
+ literal: string | number | boolean;
314
+ }> | undefined;
315
+ }>;
20
316
  export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
21
317
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology/v1">;
22
318
  id: z.ZodString;
319
+ teamId: z.ZodString;
320
+ deploymentId: z.ZodString;
321
+ stackId: z.ZodString;
23
322
  environment: z.ZodEnum<["staging", "production"]>;
24
323
  mutation: z.ZodLiteral<"approval-required">;
25
324
  platform: z.ZodObject<{
@@ -32,6 +331,13 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
32
331
  repository: "treeseed-ai/platform";
33
332
  commit: string;
34
333
  }>;
334
+ stateBackend: z.ZodObject<{
335
+ connectionRef: z.ZodString;
336
+ }, "strict", z.ZodTypeAny, {
337
+ connectionRef: string;
338
+ }, {
339
+ connectionRef: string;
340
+ }>;
35
341
  providerConnections: z.ZodRecord<z.ZodEnum<["cloudflare", "railway"]>, z.ZodObject<{
36
342
  connectionRef: z.ZodString;
37
343
  }, "strict", z.ZodTypeAny, {
@@ -39,22 +345,63 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
39
345
  }, {
40
346
  connectionRef: string;
41
347
  }>>;
42
- artifacts: z.ZodRecord<z.ZodString, z.ZodObject<{
348
+ artifacts: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
349
+ kind: z.ZodLiteral<"archive">;
350
+ format: z.ZodLiteral<"tar+gzip">;
43
351
  digest: z.ZodString;
44
352
  source: z.ZodString;
45
353
  }, "strict", z.ZodTypeAny, {
46
354
  digest: string;
47
355
  source: string;
356
+ kind: "archive";
357
+ format: "tar+gzip";
48
358
  }, {
49
359
  digest: string;
50
360
  source: string;
51
- }>>;
361
+ kind: "archive";
362
+ format: "tar+gzip";
363
+ }>, z.ZodObject<{
364
+ kind: z.ZodLiteral<"file">;
365
+ mediaType: z.ZodString;
366
+ digest: z.ZodString;
367
+ source: z.ZodString;
368
+ }, "strict", z.ZodTypeAny, {
369
+ digest: string;
370
+ source: string;
371
+ kind: "file";
372
+ mediaType: string;
373
+ }, {
374
+ digest: string;
375
+ source: string;
376
+ kind: "file";
377
+ mediaType: string;
378
+ }>, z.ZodEffects<z.ZodObject<{
379
+ kind: z.ZodLiteral<"oci-image">;
380
+ digest: z.ZodString;
381
+ identity: z.ZodString;
382
+ }, "strict", z.ZodTypeAny, {
383
+ digest: string;
384
+ kind: "oci-image";
385
+ identity: string;
386
+ }, {
387
+ digest: string;
388
+ kind: "oci-image";
389
+ identity: string;
390
+ }>, {
391
+ digest: string;
392
+ kind: "oci-image";
393
+ identity: string;
394
+ }, {
395
+ digest: string;
396
+ kind: "oci-image";
397
+ identity: string;
398
+ }>]>>;
52
399
  resources: z.ZodArray<z.ZodObject<{
53
400
  id: z.ZodString;
54
401
  provider: z.ZodEnum<["cloudflare", "railway"]>;
55
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
402
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
56
403
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
57
- parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
404
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodString]>, z.ZodUnion<[z.ZodObject<{
58
405
  input: z.ZodString;
59
406
  }, "strict", z.ZodTypeAny, {
60
407
  input: string;
@@ -109,7 +456,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
109
456
  }>;
110
457
  }, "strict", z.ZodTypeAny, {
111
458
  id: string;
112
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
459
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
113
460
  provider: "cloudflare" | "railway";
114
461
  dependsOn: string[];
115
462
  parameters: Record<string, {
@@ -131,7 +478,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
131
478
  };
132
479
  }, {
133
480
  id: string;
134
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
481
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
135
482
  provider: "cloudflare" | "railway";
136
483
  adoption: {
137
484
  mode: "adopt-or-create";
@@ -156,7 +503,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
156
503
  schemaVersion: "treeseed.hosted-topology/v1";
157
504
  resources: {
158
505
  id: string;
159
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
506
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
160
507
  provider: "cloudflare" | "railway";
161
508
  dependsOn: string[];
162
509
  parameters: Record<string, {
@@ -178,6 +525,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
178
525
  };
179
526
  }[];
180
527
  id: string;
528
+ teamId: string;
181
529
  platform: {
182
530
  repository: "treeseed-ai/platform";
183
531
  commit: string;
@@ -187,7 +535,23 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
187
535
  artifacts: Record<string, {
188
536
  digest: string;
189
537
  source: string;
538
+ kind: "archive";
539
+ format: "tar+gzip";
540
+ } | {
541
+ digest: string;
542
+ source: string;
543
+ kind: "file";
544
+ mediaType: string;
545
+ } | {
546
+ digest: string;
547
+ kind: "oci-image";
548
+ identity: string;
190
549
  }>;
550
+ deploymentId: string;
551
+ stackId: string;
552
+ stateBackend: {
553
+ connectionRef: string;
554
+ };
191
555
  providerConnections: Partial<Record<"cloudflare" | "railway", {
192
556
  connectionRef: string;
193
557
  }>>;
@@ -195,7 +559,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
195
559
  schemaVersion: "treeseed.hosted-topology/v1";
196
560
  resources: {
197
561
  id: string;
198
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
562
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
199
563
  provider: "cloudflare" | "railway";
200
564
  adoption: {
201
565
  mode: "adopt-or-create";
@@ -217,6 +581,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
217
581
  }> | undefined;
218
582
  }[];
219
583
  id: string;
584
+ teamId: string;
220
585
  platform: {
221
586
  repository: "treeseed-ai/platform";
222
587
  commit: string;
@@ -226,7 +591,23 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
226
591
  artifacts: Record<string, {
227
592
  digest: string;
228
593
  source: string;
594
+ kind: "archive";
595
+ format: "tar+gzip";
596
+ } | {
597
+ digest: string;
598
+ source: string;
599
+ kind: "file";
600
+ mediaType: string;
601
+ } | {
602
+ digest: string;
603
+ kind: "oci-image";
604
+ identity: string;
229
605
  }>;
606
+ deploymentId: string;
607
+ stackId: string;
608
+ stateBackend: {
609
+ connectionRef: string;
610
+ };
230
611
  providerConnections: Partial<Record<"cloudflare" | "railway", {
231
612
  connectionRef: string;
232
613
  }>>;
@@ -234,7 +615,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
234
615
  schemaVersion: "treeseed.hosted-topology/v1";
235
616
  resources: {
236
617
  id: string;
237
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
618
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
238
619
  provider: "cloudflare" | "railway";
239
620
  dependsOn: string[];
240
621
  parameters: Record<string, {
@@ -256,6 +637,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
256
637
  };
257
638
  }[];
258
639
  id: string;
640
+ teamId: string;
259
641
  platform: {
260
642
  repository: "treeseed-ai/platform";
261
643
  commit: string;
@@ -265,7 +647,23 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
265
647
  artifacts: Record<string, {
266
648
  digest: string;
267
649
  source: string;
650
+ kind: "archive";
651
+ format: "tar+gzip";
652
+ } | {
653
+ digest: string;
654
+ source: string;
655
+ kind: "file";
656
+ mediaType: string;
657
+ } | {
658
+ digest: string;
659
+ kind: "oci-image";
660
+ identity: string;
268
661
  }>;
662
+ deploymentId: string;
663
+ stackId: string;
664
+ stateBackend: {
665
+ connectionRef: string;
666
+ };
269
667
  providerConnections: Partial<Record<"cloudflare" | "railway", {
270
668
  connectionRef: string;
271
669
  }>>;
@@ -273,7 +671,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
273
671
  schemaVersion: "treeseed.hosted-topology/v1";
274
672
  resources: {
275
673
  id: string;
276
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
674
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
277
675
  provider: "cloudflare" | "railway";
278
676
  adoption: {
279
677
  mode: "adopt-or-create";
@@ -295,6 +693,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
295
693
  }> | undefined;
296
694
  }[];
297
695
  id: string;
696
+ teamId: string;
298
697
  platform: {
299
698
  repository: "treeseed-ai/platform";
300
699
  commit: string;
@@ -304,7 +703,23 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
304
703
  artifacts: Record<string, {
305
704
  digest: string;
306
705
  source: string;
706
+ kind: "archive";
707
+ format: "tar+gzip";
708
+ } | {
709
+ digest: string;
710
+ source: string;
711
+ kind: "file";
712
+ mediaType: string;
713
+ } | {
714
+ digest: string;
715
+ kind: "oci-image";
716
+ identity: string;
307
717
  }>;
718
+ deploymentId: string;
719
+ stackId: string;
720
+ stateBackend: {
721
+ connectionRef: string;
722
+ };
308
723
  providerConnections: Partial<Record<"cloudflare" | "railway", {
309
724
  connectionRef: string;
310
725
  }>>;
@@ -312,7 +727,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
312
727
  export declare const hostedResourceObservationSchema: z.ZodObject<{
313
728
  resourceId: z.ZodString;
314
729
  provider: z.ZodEnum<["cloudflare", "railway"]>;
315
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
730
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
316
731
  providerResourceId: z.ZodNullable<z.ZodString>;
317
732
  state: z.ZodEnum<["missing", "healthy", "degraded"]>;
318
733
  managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
@@ -321,7 +736,7 @@ export declare const hostedResourceObservationSchema: z.ZodObject<{
321
736
  }, "strict", z.ZodTypeAny, {
322
737
  state: "missing" | "degraded" | "healthy";
323
738
  resourceId: string;
324
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
739
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
325
740
  provider: "cloudflare" | "railway";
326
741
  providerResourceId: string | null;
327
742
  managedBy: "external" | "treeseed" | null;
@@ -330,7 +745,7 @@ export declare const hostedResourceObservationSchema: z.ZodObject<{
330
745
  }, {
331
746
  state: "missing" | "degraded" | "healthy";
332
747
  resourceId: string;
333
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
748
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
334
749
  provider: "cloudflare" | "railway";
335
750
  providerResourceId: string | null;
336
751
  managedBy: "external" | "treeseed" | null;
@@ -343,18 +758,139 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
343
758
  readonly planDigest: z.ZodString;
344
759
  readonly declarationDigest: z.ZodString;
345
760
  readonly topologyId: z.ZodString;
761
+ readonly teamId: z.ZodString;
762
+ readonly deploymentId: z.ZodString;
763
+ readonly stackId: z.ZodString;
346
764
  readonly environment: z.ZodEnum<["staging", "production"]>;
347
765
  readonly platformCommit: z.ZodString;
348
- readonly artifacts: z.ZodRecord<z.ZodString, z.ZodObject<{
766
+ readonly stateBackend: z.ZodNullable<z.ZodEffects<z.ZodObject<{
767
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-state-backend/v1">;
768
+ type: z.ZodLiteral<"s3">;
769
+ teamId: z.ZodString;
770
+ deploymentId: z.ZodString;
771
+ environment: z.ZodEnum<["staging", "production"]>;
772
+ stackId: z.ZodString;
773
+ connectionRef: z.ZodString;
774
+ bucket: z.ZodString;
775
+ key: z.ZodString;
776
+ region: z.ZodString;
777
+ endpoint: z.ZodOptional<z.ZodString>;
778
+ usePathStyle: z.ZodOptional<z.ZodBoolean>;
779
+ encryptionKeyRef: z.ZodString;
780
+ } & {
781
+ bindingDigest: z.ZodString;
782
+ }, "strict", z.ZodTypeAny, {
783
+ key: string;
784
+ type: "s3";
785
+ schemaVersion: "treeseed.hosted-state-backend/v1";
786
+ teamId: string;
787
+ environment: "production" | "staging";
788
+ deploymentId: string;
789
+ stackId: string;
790
+ connectionRef: string;
791
+ bucket: string;
792
+ region: string;
793
+ encryptionKeyRef: string;
794
+ bindingDigest: string;
795
+ endpoint?: string | undefined;
796
+ usePathStyle?: boolean | undefined;
797
+ }, {
798
+ key: string;
799
+ type: "s3";
800
+ schemaVersion: "treeseed.hosted-state-backend/v1";
801
+ teamId: string;
802
+ environment: "production" | "staging";
803
+ deploymentId: string;
804
+ stackId: string;
805
+ connectionRef: string;
806
+ bucket: string;
807
+ region: string;
808
+ encryptionKeyRef: string;
809
+ bindingDigest: string;
810
+ endpoint?: string | undefined;
811
+ usePathStyle?: boolean | undefined;
812
+ }>, {
813
+ key: string;
814
+ type: "s3";
815
+ schemaVersion: "treeseed.hosted-state-backend/v1";
816
+ teamId: string;
817
+ environment: "production" | "staging";
818
+ deploymentId: string;
819
+ stackId: string;
820
+ connectionRef: string;
821
+ bucket: string;
822
+ region: string;
823
+ encryptionKeyRef: string;
824
+ bindingDigest: string;
825
+ endpoint?: string | undefined;
826
+ usePathStyle?: boolean | undefined;
827
+ }, {
828
+ key: string;
829
+ type: "s3";
830
+ schemaVersion: "treeseed.hosted-state-backend/v1";
831
+ teamId: string;
832
+ environment: "production" | "staging";
833
+ deploymentId: string;
834
+ stackId: string;
835
+ connectionRef: string;
836
+ bucket: string;
837
+ region: string;
838
+ encryptionKeyRef: string;
839
+ bindingDigest: string;
840
+ endpoint?: string | undefined;
841
+ usePathStyle?: boolean | undefined;
842
+ }>>;
843
+ readonly artifacts: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
844
+ kind: z.ZodLiteral<"archive">;
845
+ format: z.ZodLiteral<"tar+gzip">;
349
846
  digest: z.ZodString;
350
847
  source: z.ZodString;
351
848
  }, "strict", z.ZodTypeAny, {
352
849
  digest: string;
353
850
  source: string;
851
+ kind: "archive";
852
+ format: "tar+gzip";
354
853
  }, {
355
854
  digest: string;
356
855
  source: string;
357
- }>>;
856
+ kind: "archive";
857
+ format: "tar+gzip";
858
+ }>, z.ZodObject<{
859
+ kind: z.ZodLiteral<"file">;
860
+ mediaType: z.ZodString;
861
+ digest: z.ZodString;
862
+ source: z.ZodString;
863
+ }, "strict", z.ZodTypeAny, {
864
+ digest: string;
865
+ source: string;
866
+ kind: "file";
867
+ mediaType: string;
868
+ }, {
869
+ digest: string;
870
+ source: string;
871
+ kind: "file";
872
+ mediaType: string;
873
+ }>, z.ZodEffects<z.ZodObject<{
874
+ kind: z.ZodLiteral<"oci-image">;
875
+ digest: z.ZodString;
876
+ identity: z.ZodString;
877
+ }, "strict", z.ZodTypeAny, {
878
+ digest: string;
879
+ kind: "oci-image";
880
+ identity: string;
881
+ }, {
882
+ digest: string;
883
+ kind: "oci-image";
884
+ identity: string;
885
+ }>, {
886
+ digest: string;
887
+ kind: "oci-image";
888
+ identity: string;
889
+ }, {
890
+ digest: string;
891
+ kind: "oci-image";
892
+ identity: string;
893
+ }>]>>;
358
894
  readonly providerConnections: z.ZodRecord<z.ZodEnum<["cloudflare", "railway"]>, z.ZodEffects<z.ZodObject<{
359
895
  connectionRef: z.ZodString;
360
896
  nonSecretConfig: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -374,14 +910,14 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
374
910
  readonly actions: z.ZodArray<z.ZodObject<{
375
911
  resourceId: z.ZodString;
376
912
  provider: z.ZodEnum<["cloudflare", "railway"]>;
377
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
913
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
378
914
  action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
379
915
  desiredResource: z.ZodObject<{
380
916
  id: z.ZodString;
381
917
  provider: z.ZodEnum<["cloudflare", "railway"]>;
382
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
918
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
383
919
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
384
- parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
920
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodString]>, z.ZodUnion<[z.ZodObject<{
385
921
  input: z.ZodString;
386
922
  }, "strict", z.ZodTypeAny, {
387
923
  input: string;
@@ -436,7 +972,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
436
972
  }>;
437
973
  }, "strict", z.ZodTypeAny, {
438
974
  id: string;
439
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
975
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
440
976
  provider: "cloudflare" | "railway";
441
977
  dependsOn: string[];
442
978
  parameters: Record<string, {
@@ -458,7 +994,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
458
994
  };
459
995
  }, {
460
996
  id: string;
461
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
997
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
462
998
  provider: "cloudflare" | "railway";
463
999
  adoption: {
464
1000
  mode: "adopt-or-create";
@@ -485,12 +1021,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
485
1021
  }, "strict", z.ZodTypeAny, {
486
1022
  action: "noop" | "create" | "adopt" | "update";
487
1023
  resourceId: string;
488
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1024
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
489
1025
  provider: "cloudflare" | "railway";
490
1026
  providerResourceId: string | null;
491
1027
  desiredResource: {
492
1028
  id: string;
493
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1029
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
494
1030
  provider: "cloudflare" | "railway";
495
1031
  dependsOn: string[];
496
1032
  parameters: Record<string, {
@@ -516,12 +1052,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
516
1052
  }, {
517
1053
  action: "noop" | "create" | "adopt" | "update";
518
1054
  resourceId: string;
519
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1055
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
520
1056
  provider: "cloudflare" | "railway";
521
1057
  providerResourceId: string | null;
522
1058
  desiredResource: {
523
1059
  id: string;
524
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1060
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
525
1061
  provider: "cloudflare" | "railway";
526
1062
  adoption: {
527
1063
  mode: "adopt-or-create";
@@ -546,15 +1082,15 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
546
1082
  previousDigest: string | null;
547
1083
  }>, "many">;
548
1084
  readonly blockers: z.ZodArray<z.ZodObject<{
549
- code: z.ZodEnum<["connection-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
1085
+ code: z.ZodEnum<["connection-unavailable", "state-backend-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
550
1086
  resourceId: z.ZodOptional<z.ZodString>;
551
1087
  message: z.ZodString;
552
1088
  }, "strict", z.ZodTypeAny, {
553
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1089
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
554
1090
  message: string;
555
1091
  resourceId?: string | undefined;
556
1092
  }, {
557
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1093
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
558
1094
  message: string;
559
1095
  resourceId?: string | undefined;
560
1096
  }>, "many">;
@@ -563,7 +1099,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
563
1099
  }, "strict", z.ZodTypeAny, {
564
1100
  schemaVersion: "treeseed.hosted-topology-plan/v1";
565
1101
  blockers: {
566
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1102
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
567
1103
  message: string;
568
1104
  resourceId?: string | undefined;
569
1105
  }[];
@@ -571,12 +1107,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
571
1107
  actions: {
572
1108
  action: "noop" | "create" | "adopt" | "update";
573
1109
  resourceId: string;
574
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1110
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
575
1111
  provider: "cloudflare" | "railway";
576
1112
  providerResourceId: string | null;
577
1113
  desiredResource: {
578
1114
  id: string;
579
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1115
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
580
1116
  provider: "cloudflare" | "railway";
581
1117
  dependsOn: string[];
582
1118
  parameters: Record<string, {
@@ -600,13 +1136,43 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
600
1136
  desiredDigest: string;
601
1137
  previousDigest: string | null;
602
1138
  }[];
1139
+ teamId: string;
603
1140
  environment: "production" | "staging";
604
1141
  executable: false;
605
1142
  artifacts: Record<string, {
606
1143
  digest: string;
607
1144
  source: string;
1145
+ kind: "archive";
1146
+ format: "tar+gzip";
1147
+ } | {
1148
+ digest: string;
1149
+ source: string;
1150
+ kind: "file";
1151
+ mediaType: string;
1152
+ } | {
1153
+ digest: string;
1154
+ kind: "oci-image";
1155
+ identity: string;
608
1156
  }>;
609
1157
  planId: string;
1158
+ deploymentId: string;
1159
+ stackId: string;
1160
+ stateBackend: {
1161
+ key: string;
1162
+ type: "s3";
1163
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1164
+ teamId: string;
1165
+ environment: "production" | "staging";
1166
+ deploymentId: string;
1167
+ stackId: string;
1168
+ connectionRef: string;
1169
+ bucket: string;
1170
+ region: string;
1171
+ encryptionKeyRef: string;
1172
+ bindingDigest: string;
1173
+ endpoint?: string | undefined;
1174
+ usePathStyle?: boolean | undefined;
1175
+ } | null;
610
1176
  providerConnections: Partial<Record<"cloudflare" | "railway", {
611
1177
  connectionRef: string;
612
1178
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -618,7 +1184,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
618
1184
  }, {
619
1185
  schemaVersion: "treeseed.hosted-topology-plan/v1";
620
1186
  blockers: {
621
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1187
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
622
1188
  message: string;
623
1189
  resourceId?: string | undefined;
624
1190
  }[];
@@ -626,12 +1192,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
626
1192
  actions: {
627
1193
  action: "noop" | "create" | "adopt" | "update";
628
1194
  resourceId: string;
629
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1195
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
630
1196
  provider: "cloudflare" | "railway";
631
1197
  providerResourceId: string | null;
632
1198
  desiredResource: {
633
1199
  id: string;
634
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1200
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
635
1201
  provider: "cloudflare" | "railway";
636
1202
  adoption: {
637
1203
  mode: "adopt-or-create";
@@ -655,13 +1221,43 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
655
1221
  desiredDigest: string;
656
1222
  previousDigest: string | null;
657
1223
  }[];
1224
+ teamId: string;
658
1225
  environment: "production" | "staging";
659
1226
  executable: false;
660
1227
  artifacts: Record<string, {
661
1228
  digest: string;
662
1229
  source: string;
1230
+ kind: "archive";
1231
+ format: "tar+gzip";
1232
+ } | {
1233
+ digest: string;
1234
+ source: string;
1235
+ kind: "file";
1236
+ mediaType: string;
1237
+ } | {
1238
+ digest: string;
1239
+ kind: "oci-image";
1240
+ identity: string;
663
1241
  }>;
664
1242
  planId: string;
1243
+ deploymentId: string;
1244
+ stackId: string;
1245
+ stateBackend: {
1246
+ key: string;
1247
+ type: "s3";
1248
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1249
+ teamId: string;
1250
+ environment: "production" | "staging";
1251
+ deploymentId: string;
1252
+ stackId: string;
1253
+ connectionRef: string;
1254
+ bucket: string;
1255
+ region: string;
1256
+ encryptionKeyRef: string;
1257
+ bindingDigest: string;
1258
+ endpoint?: string | undefined;
1259
+ usePathStyle?: boolean | undefined;
1260
+ } | null;
665
1261
  providerConnections: Partial<Record<"cloudflare" | "railway", {
666
1262
  connectionRef: string;
667
1263
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -673,7 +1269,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
673
1269
  }>, {
674
1270
  schemaVersion: "treeseed.hosted-topology-plan/v1";
675
1271
  blockers: {
676
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1272
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
677
1273
  message: string;
678
1274
  resourceId?: string | undefined;
679
1275
  }[];
@@ -681,12 +1277,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
681
1277
  actions: {
682
1278
  action: "noop" | "create" | "adopt" | "update";
683
1279
  resourceId: string;
684
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1280
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
685
1281
  provider: "cloudflare" | "railway";
686
1282
  providerResourceId: string | null;
687
1283
  desiredResource: {
688
1284
  id: string;
689
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1285
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
690
1286
  provider: "cloudflare" | "railway";
691
1287
  dependsOn: string[];
692
1288
  parameters: Record<string, {
@@ -710,13 +1306,43 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
710
1306
  desiredDigest: string;
711
1307
  previousDigest: string | null;
712
1308
  }[];
1309
+ teamId: string;
713
1310
  environment: "production" | "staging";
714
1311
  executable: false;
715
1312
  artifacts: Record<string, {
716
1313
  digest: string;
717
1314
  source: string;
1315
+ kind: "archive";
1316
+ format: "tar+gzip";
1317
+ } | {
1318
+ digest: string;
1319
+ source: string;
1320
+ kind: "file";
1321
+ mediaType: string;
1322
+ } | {
1323
+ digest: string;
1324
+ kind: "oci-image";
1325
+ identity: string;
718
1326
  }>;
719
1327
  planId: string;
1328
+ deploymentId: string;
1329
+ stackId: string;
1330
+ stateBackend: {
1331
+ key: string;
1332
+ type: "s3";
1333
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1334
+ teamId: string;
1335
+ environment: "production" | "staging";
1336
+ deploymentId: string;
1337
+ stackId: string;
1338
+ connectionRef: string;
1339
+ bucket: string;
1340
+ region: string;
1341
+ encryptionKeyRef: string;
1342
+ bindingDigest: string;
1343
+ endpoint?: string | undefined;
1344
+ usePathStyle?: boolean | undefined;
1345
+ } | null;
720
1346
  providerConnections: Partial<Record<"cloudflare" | "railway", {
721
1347
  connectionRef: string;
722
1348
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -728,7 +1354,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
728
1354
  }, {
729
1355
  schemaVersion: "treeseed.hosted-topology-plan/v1";
730
1356
  blockers: {
731
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1357
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
732
1358
  message: string;
733
1359
  resourceId?: string | undefined;
734
1360
  }[];
@@ -736,12 +1362,12 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
736
1362
  actions: {
737
1363
  action: "noop" | "create" | "adopt" | "update";
738
1364
  resourceId: string;
739
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1365
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
740
1366
  provider: "cloudflare" | "railway";
741
1367
  providerResourceId: string | null;
742
1368
  desiredResource: {
743
1369
  id: string;
744
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1370
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
745
1371
  provider: "cloudflare" | "railway";
746
1372
  adoption: {
747
1373
  mode: "adopt-or-create";
@@ -765,13 +1391,43 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
765
1391
  desiredDigest: string;
766
1392
  previousDigest: string | null;
767
1393
  }[];
1394
+ teamId: string;
768
1395
  environment: "production" | "staging";
769
1396
  executable: false;
770
1397
  artifacts: Record<string, {
771
1398
  digest: string;
772
1399
  source: string;
1400
+ kind: "archive";
1401
+ format: "tar+gzip";
1402
+ } | {
1403
+ digest: string;
1404
+ source: string;
1405
+ kind: "file";
1406
+ mediaType: string;
1407
+ } | {
1408
+ digest: string;
1409
+ kind: "oci-image";
1410
+ identity: string;
773
1411
  }>;
774
1412
  planId: string;
1413
+ deploymentId: string;
1414
+ stackId: string;
1415
+ stateBackend: {
1416
+ key: string;
1417
+ type: "s3";
1418
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1419
+ teamId: string;
1420
+ environment: "production" | "staging";
1421
+ deploymentId: string;
1422
+ stackId: string;
1423
+ connectionRef: string;
1424
+ bucket: string;
1425
+ region: string;
1426
+ encryptionKeyRef: string;
1427
+ bindingDigest: string;
1428
+ endpoint?: string | undefined;
1429
+ usePathStyle?: boolean | undefined;
1430
+ } | null;
775
1431
  providerConnections: Partial<Record<"cloudflare" | "railway", {
776
1432
  connectionRef: string;
777
1433
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -784,21 +1440,33 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
784
1440
  export declare const hostedTopologyApprovalSchema: z.ZodObject<{
785
1441
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
786
1442
  planDigest: z.ZodString;
1443
+ teamId: z.ZodString;
1444
+ deploymentId: z.ZodString;
1445
+ stackId: z.ZodString;
787
1446
  environment: z.ZodEnum<["staging", "production"]>;
1447
+ backendBindingDigest: z.ZodString;
788
1448
  decision: z.ZodLiteral<"approved">;
789
1449
  approvedBy: z.ZodString;
790
1450
  approvedAt: z.ZodString;
791
1451
  }, "strict", z.ZodTypeAny, {
792
1452
  schemaVersion: "treeseed.hosted-topology-approval/v1";
793
1453
  planDigest: string;
1454
+ teamId: string;
794
1455
  environment: "production" | "staging";
1456
+ deploymentId: string;
1457
+ stackId: string;
1458
+ backendBindingDigest: string;
795
1459
  decision: "approved";
796
1460
  approvedBy: string;
797
1461
  approvedAt: string;
798
1462
  }, {
799
1463
  schemaVersion: "treeseed.hosted-topology-approval/v1";
800
1464
  planDigest: string;
1465
+ teamId: string;
801
1466
  environment: "production" | "staging";
1467
+ deploymentId: string;
1468
+ stackId: string;
1469
+ backendBindingDigest: string;
802
1470
  decision: "approved";
803
1471
  approvedBy: string;
804
1472
  approvedAt: string;
@@ -808,21 +1476,33 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
808
1476
  approval: z.ZodNullable<z.ZodObject<{
809
1477
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
810
1478
  planDigest: z.ZodString;
1479
+ teamId: z.ZodString;
1480
+ deploymentId: z.ZodString;
1481
+ stackId: z.ZodString;
811
1482
  environment: z.ZodEnum<["staging", "production"]>;
1483
+ backendBindingDigest: z.ZodString;
812
1484
  decision: z.ZodLiteral<"approved">;
813
1485
  approvedBy: z.ZodString;
814
1486
  approvedAt: z.ZodString;
815
1487
  }, "strict", z.ZodTypeAny, {
816
1488
  schemaVersion: "treeseed.hosted-topology-approval/v1";
817
1489
  planDigest: string;
1490
+ teamId: string;
818
1491
  environment: "production" | "staging";
1492
+ deploymentId: string;
1493
+ stackId: string;
1494
+ backendBindingDigest: string;
819
1495
  decision: "approved";
820
1496
  approvedBy: string;
821
1497
  approvedAt: string;
822
1498
  }, {
823
1499
  schemaVersion: "treeseed.hosted-topology-approval/v1";
824
1500
  planDigest: string;
1501
+ teamId: string;
825
1502
  environment: "production" | "staging";
1503
+ deploymentId: string;
1504
+ stackId: string;
1505
+ backendBindingDigest: string;
826
1506
  decision: "approved";
827
1507
  approvedBy: string;
828
1508
  approvedAt: string;
@@ -832,18 +1512,139 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
832
1512
  planDigest: z.ZodString;
833
1513
  declarationDigest: z.ZodString;
834
1514
  topologyId: z.ZodString;
1515
+ teamId: z.ZodString;
1516
+ deploymentId: z.ZodString;
1517
+ stackId: z.ZodString;
835
1518
  environment: z.ZodEnum<["staging", "production"]>;
836
1519
  platformCommit: z.ZodString;
837
- artifacts: z.ZodRecord<z.ZodString, z.ZodObject<{
1520
+ stateBackend: z.ZodNullable<z.ZodEffects<z.ZodObject<{
1521
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-state-backend/v1">;
1522
+ type: z.ZodLiteral<"s3">;
1523
+ teamId: z.ZodString;
1524
+ deploymentId: z.ZodString;
1525
+ environment: z.ZodEnum<["staging", "production"]>;
1526
+ stackId: z.ZodString;
1527
+ connectionRef: z.ZodString;
1528
+ bucket: z.ZodString;
1529
+ key: z.ZodString;
1530
+ region: z.ZodString;
1531
+ endpoint: z.ZodOptional<z.ZodString>;
1532
+ usePathStyle: z.ZodOptional<z.ZodBoolean>;
1533
+ encryptionKeyRef: z.ZodString;
1534
+ } & {
1535
+ bindingDigest: z.ZodString;
1536
+ }, "strict", z.ZodTypeAny, {
1537
+ key: string;
1538
+ type: "s3";
1539
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1540
+ teamId: string;
1541
+ environment: "production" | "staging";
1542
+ deploymentId: string;
1543
+ stackId: string;
1544
+ connectionRef: string;
1545
+ bucket: string;
1546
+ region: string;
1547
+ encryptionKeyRef: string;
1548
+ bindingDigest: string;
1549
+ endpoint?: string | undefined;
1550
+ usePathStyle?: boolean | undefined;
1551
+ }, {
1552
+ key: string;
1553
+ type: "s3";
1554
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1555
+ teamId: string;
1556
+ environment: "production" | "staging";
1557
+ deploymentId: string;
1558
+ stackId: string;
1559
+ connectionRef: string;
1560
+ bucket: string;
1561
+ region: string;
1562
+ encryptionKeyRef: string;
1563
+ bindingDigest: string;
1564
+ endpoint?: string | undefined;
1565
+ usePathStyle?: boolean | undefined;
1566
+ }>, {
1567
+ key: string;
1568
+ type: "s3";
1569
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1570
+ teamId: string;
1571
+ environment: "production" | "staging";
1572
+ deploymentId: string;
1573
+ stackId: string;
1574
+ connectionRef: string;
1575
+ bucket: string;
1576
+ region: string;
1577
+ encryptionKeyRef: string;
1578
+ bindingDigest: string;
1579
+ endpoint?: string | undefined;
1580
+ usePathStyle?: boolean | undefined;
1581
+ }, {
1582
+ key: string;
1583
+ type: "s3";
1584
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1585
+ teamId: string;
1586
+ environment: "production" | "staging";
1587
+ deploymentId: string;
1588
+ stackId: string;
1589
+ connectionRef: string;
1590
+ bucket: string;
1591
+ region: string;
1592
+ encryptionKeyRef: string;
1593
+ bindingDigest: string;
1594
+ endpoint?: string | undefined;
1595
+ usePathStyle?: boolean | undefined;
1596
+ }>>;
1597
+ artifacts: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1598
+ kind: z.ZodLiteral<"archive">;
1599
+ format: z.ZodLiteral<"tar+gzip">;
838
1600
  digest: z.ZodString;
839
1601
  source: z.ZodString;
840
1602
  }, "strict", z.ZodTypeAny, {
841
1603
  digest: string;
842
1604
  source: string;
1605
+ kind: "archive";
1606
+ format: "tar+gzip";
843
1607
  }, {
844
1608
  digest: string;
845
1609
  source: string;
846
- }>>;
1610
+ kind: "archive";
1611
+ format: "tar+gzip";
1612
+ }>, z.ZodObject<{
1613
+ kind: z.ZodLiteral<"file">;
1614
+ mediaType: z.ZodString;
1615
+ digest: z.ZodString;
1616
+ source: z.ZodString;
1617
+ }, "strict", z.ZodTypeAny, {
1618
+ digest: string;
1619
+ source: string;
1620
+ kind: "file";
1621
+ mediaType: string;
1622
+ }, {
1623
+ digest: string;
1624
+ source: string;
1625
+ kind: "file";
1626
+ mediaType: string;
1627
+ }>, z.ZodEffects<z.ZodObject<{
1628
+ kind: z.ZodLiteral<"oci-image">;
1629
+ digest: z.ZodString;
1630
+ identity: z.ZodString;
1631
+ }, "strict", z.ZodTypeAny, {
1632
+ digest: string;
1633
+ kind: "oci-image";
1634
+ identity: string;
1635
+ }, {
1636
+ digest: string;
1637
+ kind: "oci-image";
1638
+ identity: string;
1639
+ }>, {
1640
+ digest: string;
1641
+ kind: "oci-image";
1642
+ identity: string;
1643
+ }, {
1644
+ digest: string;
1645
+ kind: "oci-image";
1646
+ identity: string;
1647
+ }>]>>;
847
1648
  providerConnections: z.ZodRecord<z.ZodEnum<["cloudflare", "railway"]>, z.ZodEffects<z.ZodObject<{
848
1649
  connectionRef: z.ZodString;
849
1650
  nonSecretConfig: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -863,14 +1664,14 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
863
1664
  actions: z.ZodArray<z.ZodObject<{
864
1665
  resourceId: z.ZodString;
865
1666
  provider: z.ZodEnum<["cloudflare", "railway"]>;
866
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
1667
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
867
1668
  action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
868
1669
  desiredResource: z.ZodObject<{
869
1670
  id: z.ZodString;
870
1671
  provider: z.ZodEnum<["cloudflare", "railway"]>;
871
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
1672
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
872
1673
  dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
873
- parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1674
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodString]>, z.ZodUnion<[z.ZodObject<{
874
1675
  input: z.ZodString;
875
1676
  }, "strict", z.ZodTypeAny, {
876
1677
  input: string;
@@ -925,7 +1726,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
925
1726
  }>;
926
1727
  }, "strict", z.ZodTypeAny, {
927
1728
  id: string;
928
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1729
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
929
1730
  provider: "cloudflare" | "railway";
930
1731
  dependsOn: string[];
931
1732
  parameters: Record<string, {
@@ -947,7 +1748,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
947
1748
  };
948
1749
  }, {
949
1750
  id: string;
950
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1751
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
951
1752
  provider: "cloudflare" | "railway";
952
1753
  adoption: {
953
1754
  mode: "adopt-or-create";
@@ -974,12 +1775,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
974
1775
  }, "strict", z.ZodTypeAny, {
975
1776
  action: "noop" | "create" | "adopt" | "update";
976
1777
  resourceId: string;
977
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1778
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
978
1779
  provider: "cloudflare" | "railway";
979
1780
  providerResourceId: string | null;
980
1781
  desiredResource: {
981
1782
  id: string;
982
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1783
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
983
1784
  provider: "cloudflare" | "railway";
984
1785
  dependsOn: string[];
985
1786
  parameters: Record<string, {
@@ -1005,12 +1806,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1005
1806
  }, {
1006
1807
  action: "noop" | "create" | "adopt" | "update";
1007
1808
  resourceId: string;
1008
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1809
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1009
1810
  provider: "cloudflare" | "railway";
1010
1811
  providerResourceId: string | null;
1011
1812
  desiredResource: {
1012
1813
  id: string;
1013
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1814
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1014
1815
  provider: "cloudflare" | "railway";
1015
1816
  adoption: {
1016
1817
  mode: "adopt-or-create";
@@ -1035,15 +1836,15 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1035
1836
  previousDigest: string | null;
1036
1837
  }>, "many">;
1037
1838
  blockers: z.ZodArray<z.ZodObject<{
1038
- code: z.ZodEnum<["connection-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
1839
+ code: z.ZodEnum<["connection-unavailable", "state-backend-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
1039
1840
  resourceId: z.ZodOptional<z.ZodString>;
1040
1841
  message: z.ZodString;
1041
1842
  }, "strict", z.ZodTypeAny, {
1042
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1843
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1043
1844
  message: string;
1044
1845
  resourceId?: string | undefined;
1045
1846
  }, {
1046
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1847
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1047
1848
  message: string;
1048
1849
  resourceId?: string | undefined;
1049
1850
  }>, "many">;
@@ -1051,7 +1852,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1051
1852
  }, "approvalRequired">, "strict", z.ZodTypeAny, {
1052
1853
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1053
1854
  blockers: {
1054
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1855
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1055
1856
  message: string;
1056
1857
  resourceId?: string | undefined;
1057
1858
  }[];
@@ -1059,12 +1860,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1059
1860
  actions: {
1060
1861
  action: "noop" | "create" | "adopt" | "update";
1061
1862
  resourceId: string;
1062
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1863
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1063
1864
  provider: "cloudflare" | "railway";
1064
1865
  providerResourceId: string | null;
1065
1866
  desiredResource: {
1066
1867
  id: string;
1067
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1868
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1068
1869
  provider: "cloudflare" | "railway";
1069
1870
  dependsOn: string[];
1070
1871
  parameters: Record<string, {
@@ -1088,13 +1889,43 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1088
1889
  desiredDigest: string;
1089
1890
  previousDigest: string | null;
1090
1891
  }[];
1892
+ teamId: string;
1091
1893
  environment: "production" | "staging";
1092
1894
  executable: true;
1093
1895
  artifacts: Record<string, {
1094
1896
  digest: string;
1095
1897
  source: string;
1898
+ kind: "archive";
1899
+ format: "tar+gzip";
1900
+ } | {
1901
+ digest: string;
1902
+ source: string;
1903
+ kind: "file";
1904
+ mediaType: string;
1905
+ } | {
1906
+ digest: string;
1907
+ kind: "oci-image";
1908
+ identity: string;
1096
1909
  }>;
1097
1910
  planId: string;
1911
+ deploymentId: string;
1912
+ stackId: string;
1913
+ stateBackend: {
1914
+ key: string;
1915
+ type: "s3";
1916
+ schemaVersion: "treeseed.hosted-state-backend/v1";
1917
+ teamId: string;
1918
+ environment: "production" | "staging";
1919
+ deploymentId: string;
1920
+ stackId: string;
1921
+ connectionRef: string;
1922
+ bucket: string;
1923
+ region: string;
1924
+ encryptionKeyRef: string;
1925
+ bindingDigest: string;
1926
+ endpoint?: string | undefined;
1927
+ usePathStyle?: boolean | undefined;
1928
+ } | null;
1098
1929
  providerConnections: Partial<Record<"cloudflare" | "railway", {
1099
1930
  connectionRef: string;
1100
1931
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -1105,7 +1936,11 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1105
1936
  approval: {
1106
1937
  schemaVersion: "treeseed.hosted-topology-approval/v1";
1107
1938
  planDigest: string;
1939
+ teamId: string;
1108
1940
  environment: "production" | "staging";
1941
+ deploymentId: string;
1942
+ stackId: string;
1943
+ backendBindingDigest: string;
1109
1944
  decision: "approved";
1110
1945
  approvedBy: string;
1111
1946
  approvedAt: string;
@@ -1113,7 +1948,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1113
1948
  }, {
1114
1949
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1115
1950
  blockers: {
1116
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1951
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1117
1952
  message: string;
1118
1953
  resourceId?: string | undefined;
1119
1954
  }[];
@@ -1121,12 +1956,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1121
1956
  actions: {
1122
1957
  action: "noop" | "create" | "adopt" | "update";
1123
1958
  resourceId: string;
1124
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1959
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1125
1960
  provider: "cloudflare" | "railway";
1126
1961
  providerResourceId: string | null;
1127
1962
  desiredResource: {
1128
1963
  id: string;
1129
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1964
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1130
1965
  provider: "cloudflare" | "railway";
1131
1966
  adoption: {
1132
1967
  mode: "adopt-or-create";
@@ -1150,13 +1985,43 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1150
1985
  desiredDigest: string;
1151
1986
  previousDigest: string | null;
1152
1987
  }[];
1988
+ teamId: string;
1153
1989
  environment: "production" | "staging";
1154
1990
  executable: true;
1155
1991
  artifacts: Record<string, {
1156
1992
  digest: string;
1157
1993
  source: string;
1994
+ kind: "archive";
1995
+ format: "tar+gzip";
1996
+ } | {
1997
+ digest: string;
1998
+ source: string;
1999
+ kind: "file";
2000
+ mediaType: string;
2001
+ } | {
2002
+ digest: string;
2003
+ kind: "oci-image";
2004
+ identity: string;
1158
2005
  }>;
1159
2006
  planId: string;
2007
+ deploymentId: string;
2008
+ stackId: string;
2009
+ stateBackend: {
2010
+ key: string;
2011
+ type: "s3";
2012
+ schemaVersion: "treeseed.hosted-state-backend/v1";
2013
+ teamId: string;
2014
+ environment: "production" | "staging";
2015
+ deploymentId: string;
2016
+ stackId: string;
2017
+ connectionRef: string;
2018
+ bucket: string;
2019
+ region: string;
2020
+ encryptionKeyRef: string;
2021
+ bindingDigest: string;
2022
+ endpoint?: string | undefined;
2023
+ usePathStyle?: boolean | undefined;
2024
+ } | null;
1160
2025
  providerConnections: Partial<Record<"cloudflare" | "railway", {
1161
2026
  connectionRef: string;
1162
2027
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -1167,7 +2032,11 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1167
2032
  approval: {
1168
2033
  schemaVersion: "treeseed.hosted-topology-approval/v1";
1169
2034
  planDigest: string;
2035
+ teamId: string;
1170
2036
  environment: "production" | "staging";
2037
+ deploymentId: string;
2038
+ stackId: string;
2039
+ backendBindingDigest: string;
1171
2040
  decision: "approved";
1172
2041
  approvedBy: string;
1173
2042
  approvedAt: string;
@@ -1175,7 +2044,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1175
2044
  }>, {
1176
2045
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1177
2046
  blockers: {
1178
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
2047
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1179
2048
  message: string;
1180
2049
  resourceId?: string | undefined;
1181
2050
  }[];
@@ -1183,12 +2052,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1183
2052
  actions: {
1184
2053
  action: "noop" | "create" | "adopt" | "update";
1185
2054
  resourceId: string;
1186
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2055
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1187
2056
  provider: "cloudflare" | "railway";
1188
2057
  providerResourceId: string | null;
1189
2058
  desiredResource: {
1190
2059
  id: string;
1191
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2060
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1192
2061
  provider: "cloudflare" | "railway";
1193
2062
  dependsOn: string[];
1194
2063
  parameters: Record<string, {
@@ -1212,13 +2081,43 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1212
2081
  desiredDigest: string;
1213
2082
  previousDigest: string | null;
1214
2083
  }[];
2084
+ teamId: string;
1215
2085
  environment: "production" | "staging";
1216
2086
  executable: true;
1217
2087
  artifacts: Record<string, {
1218
2088
  digest: string;
1219
2089
  source: string;
2090
+ kind: "archive";
2091
+ format: "tar+gzip";
2092
+ } | {
2093
+ digest: string;
2094
+ source: string;
2095
+ kind: "file";
2096
+ mediaType: string;
2097
+ } | {
2098
+ digest: string;
2099
+ kind: "oci-image";
2100
+ identity: string;
1220
2101
  }>;
1221
2102
  planId: string;
2103
+ deploymentId: string;
2104
+ stackId: string;
2105
+ stateBackend: {
2106
+ key: string;
2107
+ type: "s3";
2108
+ schemaVersion: "treeseed.hosted-state-backend/v1";
2109
+ teamId: string;
2110
+ environment: "production" | "staging";
2111
+ deploymentId: string;
2112
+ stackId: string;
2113
+ connectionRef: string;
2114
+ bucket: string;
2115
+ region: string;
2116
+ encryptionKeyRef: string;
2117
+ bindingDigest: string;
2118
+ endpoint?: string | undefined;
2119
+ usePathStyle?: boolean | undefined;
2120
+ } | null;
1222
2121
  providerConnections: Partial<Record<"cloudflare" | "railway", {
1223
2122
  connectionRef: string;
1224
2123
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -1229,7 +2128,11 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1229
2128
  approval: {
1230
2129
  schemaVersion: "treeseed.hosted-topology-approval/v1";
1231
2130
  planDigest: string;
2131
+ teamId: string;
1232
2132
  environment: "production" | "staging";
2133
+ deploymentId: string;
2134
+ stackId: string;
2135
+ backendBindingDigest: string;
1233
2136
  decision: "approved";
1234
2137
  approvedBy: string;
1235
2138
  approvedAt: string;
@@ -1237,7 +2140,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1237
2140
  }, {
1238
2141
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1239
2142
  blockers: {
1240
- code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
2143
+ code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
1241
2144
  message: string;
1242
2145
  resourceId?: string | undefined;
1243
2146
  }[];
@@ -1245,12 +2148,12 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1245
2148
  actions: {
1246
2149
  action: "noop" | "create" | "adopt" | "update";
1247
2150
  resourceId: string;
1248
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2151
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1249
2152
  provider: "cloudflare" | "railway";
1250
2153
  providerResourceId: string | null;
1251
2154
  desiredResource: {
1252
2155
  id: string;
1253
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2156
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1254
2157
  provider: "cloudflare" | "railway";
1255
2158
  adoption: {
1256
2159
  mode: "adopt-or-create";
@@ -1274,13 +2177,43 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1274
2177
  desiredDigest: string;
1275
2178
  previousDigest: string | null;
1276
2179
  }[];
2180
+ teamId: string;
1277
2181
  environment: "production" | "staging";
1278
2182
  executable: true;
1279
2183
  artifacts: Record<string, {
1280
2184
  digest: string;
1281
2185
  source: string;
2186
+ kind: "archive";
2187
+ format: "tar+gzip";
2188
+ } | {
2189
+ digest: string;
2190
+ source: string;
2191
+ kind: "file";
2192
+ mediaType: string;
2193
+ } | {
2194
+ digest: string;
2195
+ kind: "oci-image";
2196
+ identity: string;
1282
2197
  }>;
1283
2198
  planId: string;
2199
+ deploymentId: string;
2200
+ stackId: string;
2201
+ stateBackend: {
2202
+ key: string;
2203
+ type: "s3";
2204
+ schemaVersion: "treeseed.hosted-state-backend/v1";
2205
+ teamId: string;
2206
+ environment: "production" | "staging";
2207
+ deploymentId: string;
2208
+ stackId: string;
2209
+ connectionRef: string;
2210
+ bucket: string;
2211
+ region: string;
2212
+ encryptionKeyRef: string;
2213
+ bindingDigest: string;
2214
+ endpoint?: string | undefined;
2215
+ usePathStyle?: boolean | undefined;
2216
+ } | null;
1284
2217
  providerConnections: Partial<Record<"cloudflare" | "railway", {
1285
2218
  connectionRef: string;
1286
2219
  nonSecretConfig: Record<string, string | number | boolean>;
@@ -1291,7 +2224,11 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1291
2224
  approval: {
1292
2225
  schemaVersion: "treeseed.hosted-topology-approval/v1";
1293
2226
  planDigest: string;
2227
+ teamId: string;
1294
2228
  environment: "production" | "staging";
2229
+ deploymentId: string;
2230
+ stackId: string;
2231
+ backendBindingDigest: string;
1295
2232
  decision: "approved";
1296
2233
  approvedBy: string;
1297
2234
  approvedAt: string;
@@ -1303,12 +2240,16 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1303
2240
  planDigest: z.ZodString;
1304
2241
  declarationDigest: z.ZodString;
1305
2242
  topologyId: z.ZodString;
2243
+ teamId: z.ZodString;
2244
+ deploymentId: z.ZodString;
2245
+ stackId: z.ZodString;
1306
2246
  environment: z.ZodEnum<["staging", "production"]>;
2247
+ backendBindingDigest: z.ZodString;
1307
2248
  platformCommit: z.ZodString;
1308
2249
  resources: z.ZodArray<z.ZodObject<{
1309
2250
  resourceId: z.ZodString;
1310
2251
  provider: z.ZodEnum<["cloudflare", "railway"]>;
1311
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
2252
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
1312
2253
  providerResourceId: z.ZodNullable<z.ZodString>;
1313
2254
  state: z.ZodEnum<["missing", "healthy", "degraded"]>;
1314
2255
  managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
@@ -1317,7 +2258,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1317
2258
  }, "strict", z.ZodTypeAny, {
1318
2259
  state: "missing" | "degraded" | "healthy";
1319
2260
  resourceId: string;
1320
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2261
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1321
2262
  provider: "cloudflare" | "railway";
1322
2263
  providerResourceId: string | null;
1323
2264
  managedBy: "external" | "treeseed" | null;
@@ -1326,7 +2267,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1326
2267
  }, {
1327
2268
  state: "missing" | "degraded" | "healthy";
1328
2269
  resourceId: string;
1329
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2270
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1330
2271
  provider: "cloudflare" | "railway";
1331
2272
  providerResourceId: string | null;
1332
2273
  managedBy: "external" | "treeseed" | null;
@@ -1336,7 +2277,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1336
2277
  previousResources: z.ZodArray<z.ZodObject<{
1337
2278
  resourceId: z.ZodString;
1338
2279
  provider: z.ZodEnum<["cloudflare", "railway"]>;
1339
- kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
2280
+ kind: z.ZodEnum<["admin-application", "pages-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
1340
2281
  providerResourceId: z.ZodNullable<z.ZodString>;
1341
2282
  state: z.ZodEnum<["missing", "healthy", "degraded"]>;
1342
2283
  managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
@@ -1345,7 +2286,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1345
2286
  }, "strict", z.ZodTypeAny, {
1346
2287
  state: "missing" | "degraded" | "healthy";
1347
2288
  resourceId: string;
1348
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2289
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1349
2290
  provider: "cloudflare" | "railway";
1350
2291
  providerResourceId: string | null;
1351
2292
  managedBy: "external" | "treeseed" | null;
@@ -1354,7 +2295,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1354
2295
  }, {
1355
2296
  state: "missing" | "degraded" | "healthy";
1356
2297
  resourceId: string;
1357
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2298
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1358
2299
  provider: "cloudflare" | "railway";
1359
2300
  providerResourceId: string | null;
1360
2301
  managedBy: "external" | "treeseed" | null;
@@ -1368,7 +2309,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1368
2309
  resources: {
1369
2310
  state: "missing" | "degraded" | "healthy";
1370
2311
  resourceId: string;
1371
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2312
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1372
2313
  provider: "cloudflare" | "railway";
1373
2314
  providerResourceId: string | null;
1374
2315
  managedBy: "external" | "treeseed" | null;
@@ -1376,17 +2317,21 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1376
2317
  observedAt: string;
1377
2318
  }[];
1378
2319
  planDigest: string;
2320
+ teamId: string;
1379
2321
  state: "known-good";
1380
2322
  environment: "production" | "staging";
1381
2323
  completedAt: string;
1382
2324
  receiptId: string;
2325
+ deploymentId: string;
2326
+ stackId: string;
1383
2327
  declarationDigest: string;
1384
2328
  topologyId: string;
1385
2329
  platformCommit: string;
2330
+ backendBindingDigest: string;
1386
2331
  previousResources: {
1387
2332
  state: "missing" | "degraded" | "healthy";
1388
2333
  resourceId: string;
1389
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2334
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1390
2335
  provider: "cloudflare" | "railway";
1391
2336
  providerResourceId: string | null;
1392
2337
  managedBy: "external" | "treeseed" | null;
@@ -1398,7 +2343,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1398
2343
  resources: {
1399
2344
  state: "missing" | "degraded" | "healthy";
1400
2345
  resourceId: string;
1401
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2346
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1402
2347
  provider: "cloudflare" | "railway";
1403
2348
  providerResourceId: string | null;
1404
2349
  managedBy: "external" | "treeseed" | null;
@@ -1406,17 +2351,21 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
1406
2351
  observedAt: string;
1407
2352
  }[];
1408
2353
  planDigest: string;
2354
+ teamId: string;
1409
2355
  state: "known-good";
1410
2356
  environment: "production" | "staging";
1411
2357
  completedAt: string;
1412
2358
  receiptId: string;
2359
+ deploymentId: string;
2360
+ stackId: string;
1413
2361
  declarationDigest: string;
1414
2362
  topologyId: string;
1415
2363
  platformCommit: string;
2364
+ backendBindingDigest: string;
1416
2365
  previousResources: {
1417
2366
  state: "missing" | "degraded" | "healthy";
1418
2367
  resourceId: string;
1419
- kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
2368
+ kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
1420
2369
  provider: "cloudflare" | "railway";
1421
2370
  providerResourceId: string | null;
1422
2371
  managedBy: "external" | "treeseed" | null;
@@ -1428,7 +2377,11 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
1428
2377
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
1429
2378
  rollbackId: z.ZodString;
1430
2379
  sourceReceiptId: z.ZodString;
2380
+ teamId: z.ZodString;
2381
+ deploymentId: z.ZodString;
2382
+ stackId: z.ZodString;
1431
2383
  environment: z.ZodEnum<["staging", "production"]>;
2384
+ backendBindingDigest: z.ZodString;
1432
2385
  operations: z.ZodArray<z.ZodObject<{
1433
2386
  resourceId: z.ZodString;
1434
2387
  action: z.ZodEnum<["restore", "delete-created", "noop"]>;
@@ -1448,6 +2401,7 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
1448
2401
  rollbackDigest: z.ZodString;
1449
2402
  }, "strict", z.ZodTypeAny, {
1450
2403
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2404
+ teamId: string;
1451
2405
  environment: "production" | "staging";
1452
2406
  operations: {
1453
2407
  action: "noop" | "restore" | "delete-created";
@@ -1455,11 +2409,15 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
1455
2409
  providerResourceId: string;
1456
2410
  targetDigest: string | null;
1457
2411
  }[];
2412
+ deploymentId: string;
2413
+ stackId: string;
2414
+ backendBindingDigest: string;
1458
2415
  rollbackId: string;
1459
2416
  sourceReceiptId: string;
1460
2417
  rollbackDigest: string;
1461
2418
  }, {
1462
2419
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2420
+ teamId: string;
1463
2421
  environment: "production" | "staging";
1464
2422
  operations: {
1465
2423
  action: "noop" | "restore" | "delete-created";
@@ -1467,6 +2425,9 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
1467
2425
  providerResourceId: string;
1468
2426
  targetDigest: string | null;
1469
2427
  }[];
2428
+ deploymentId: string;
2429
+ stackId: string;
2430
+ backendBindingDigest: string;
1470
2431
  rollbackId: string;
1471
2432
  sourceReceiptId: string;
1472
2433
  rollbackDigest: string;
@@ -1474,20 +2435,32 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
1474
2435
  export declare const hostedTopologyRollbackApprovalSchema: z.ZodObject<{
1475
2436
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-approval/v1">;
1476
2437
  rollbackDigest: z.ZodString;
2438
+ teamId: z.ZodString;
2439
+ deploymentId: z.ZodString;
2440
+ stackId: z.ZodString;
1477
2441
  environment: z.ZodEnum<["staging", "production"]>;
2442
+ backendBindingDigest: z.ZodString;
1478
2443
  decision: z.ZodLiteral<"approved">;
1479
2444
  approvedBy: z.ZodString;
1480
2445
  approvedAt: z.ZodString;
1481
2446
  }, "strict", z.ZodTypeAny, {
1482
2447
  schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2448
+ teamId: string;
1483
2449
  environment: "production" | "staging";
2450
+ deploymentId: string;
2451
+ stackId: string;
2452
+ backendBindingDigest: string;
1484
2453
  decision: "approved";
1485
2454
  approvedBy: string;
1486
2455
  approvedAt: string;
1487
2456
  rollbackDigest: string;
1488
2457
  }, {
1489
2458
  schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2459
+ teamId: string;
1490
2460
  environment: "production" | "staging";
2461
+ deploymentId: string;
2462
+ stackId: string;
2463
+ backendBindingDigest: string;
1491
2464
  decision: "approved";
1492
2465
  approvedBy: string;
1493
2466
  approvedAt: string;
@@ -1499,7 +2472,11 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1499
2472
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
1500
2473
  rollbackId: z.ZodString;
1501
2474
  sourceReceiptId: z.ZodString;
2475
+ teamId: z.ZodString;
2476
+ deploymentId: z.ZodString;
2477
+ stackId: z.ZodString;
1502
2478
  environment: z.ZodEnum<["staging", "production"]>;
2479
+ backendBindingDigest: z.ZodString;
1503
2480
  operations: z.ZodArray<z.ZodObject<{
1504
2481
  resourceId: z.ZodString;
1505
2482
  action: z.ZodEnum<["restore", "delete-created", "noop"]>;
@@ -1519,6 +2496,7 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1519
2496
  rollbackDigest: z.ZodString;
1520
2497
  }, "strict", z.ZodTypeAny, {
1521
2498
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2499
+ teamId: string;
1522
2500
  environment: "production" | "staging";
1523
2501
  operations: {
1524
2502
  action: "noop" | "restore" | "delete-created";
@@ -1526,11 +2504,15 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1526
2504
  providerResourceId: string;
1527
2505
  targetDigest: string | null;
1528
2506
  }[];
2507
+ deploymentId: string;
2508
+ stackId: string;
2509
+ backendBindingDigest: string;
1529
2510
  rollbackId: string;
1530
2511
  sourceReceiptId: string;
1531
2512
  rollbackDigest: string;
1532
2513
  }, {
1533
2514
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2515
+ teamId: string;
1534
2516
  environment: "production" | "staging";
1535
2517
  operations: {
1536
2518
  action: "noop" | "restore" | "delete-created";
@@ -1538,21 +2520,30 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1538
2520
  providerResourceId: string;
1539
2521
  targetDigest: string | null;
1540
2522
  }[];
2523
+ deploymentId: string;
2524
+ stackId: string;
2525
+ backendBindingDigest: string;
1541
2526
  rollbackId: string;
1542
2527
  sourceReceiptId: string;
1543
2528
  rollbackDigest: string;
1544
2529
  }>;
1545
2530
  sourceReceiptId: z.ZodString;
1546
2531
  topologyId: z.ZodString;
2532
+ teamId: z.ZodString;
2533
+ deploymentId: z.ZodString;
2534
+ stackId: z.ZodString;
1547
2535
  environment: z.ZodEnum<["staging", "production"]>;
2536
+ backendBindingDigest: z.ZodString;
1548
2537
  sourcePlanDigest: z.ZodString;
1549
2538
  targetPlanDigest: z.ZodString;
1550
2539
  executionDigest: z.ZodString;
1551
2540
  }, "strict", z.ZodTypeAny, {
1552
2541
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2542
+ teamId: string;
1553
2543
  environment: "production" | "staging";
1554
2544
  rollback: {
1555
2545
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2546
+ teamId: string;
1556
2547
  environment: "production" | "staging";
1557
2548
  operations: {
1558
2549
  action: "noop" | "restore" | "delete-created";
@@ -1560,20 +2551,28 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1560
2551
  providerResourceId: string;
1561
2552
  targetDigest: string | null;
1562
2553
  }[];
2554
+ deploymentId: string;
2555
+ stackId: string;
2556
+ backendBindingDigest: string;
1563
2557
  rollbackId: string;
1564
2558
  sourceReceiptId: string;
1565
2559
  rollbackDigest: string;
1566
2560
  };
2561
+ deploymentId: string;
2562
+ stackId: string;
1567
2563
  topologyId: string;
2564
+ backendBindingDigest: string;
1568
2565
  sourceReceiptId: string;
1569
2566
  sourcePlanDigest: string;
1570
2567
  targetPlanDigest: string;
1571
2568
  executionDigest: string;
1572
2569
  }, {
1573
2570
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2571
+ teamId: string;
1574
2572
  environment: "production" | "staging";
1575
2573
  rollback: {
1576
2574
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2575
+ teamId: string;
1577
2576
  environment: "production" | "staging";
1578
2577
  operations: {
1579
2578
  action: "noop" | "restore" | "delete-created";
@@ -1581,20 +2580,28 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1581
2580
  providerResourceId: string;
1582
2581
  targetDigest: string | null;
1583
2582
  }[];
2583
+ deploymentId: string;
2584
+ stackId: string;
2585
+ backendBindingDigest: string;
1584
2586
  rollbackId: string;
1585
2587
  sourceReceiptId: string;
1586
2588
  rollbackDigest: string;
1587
2589
  };
2590
+ deploymentId: string;
2591
+ stackId: string;
1588
2592
  topologyId: string;
2593
+ backendBindingDigest: string;
1589
2594
  sourceReceiptId: string;
1590
2595
  sourcePlanDigest: string;
1591
2596
  targetPlanDigest: string;
1592
2597
  executionDigest: string;
1593
2598
  }>, {
1594
2599
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2600
+ teamId: string;
1595
2601
  environment: "production" | "staging";
1596
2602
  rollback: {
1597
2603
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2604
+ teamId: string;
1598
2605
  environment: "production" | "staging";
1599
2606
  operations: {
1600
2607
  action: "noop" | "restore" | "delete-created";
@@ -1602,20 +2609,28 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1602
2609
  providerResourceId: string;
1603
2610
  targetDigest: string | null;
1604
2611
  }[];
2612
+ deploymentId: string;
2613
+ stackId: string;
2614
+ backendBindingDigest: string;
1605
2615
  rollbackId: string;
1606
2616
  sourceReceiptId: string;
1607
2617
  rollbackDigest: string;
1608
2618
  };
2619
+ deploymentId: string;
2620
+ stackId: string;
1609
2621
  topologyId: string;
2622
+ backendBindingDigest: string;
1610
2623
  sourceReceiptId: string;
1611
2624
  sourcePlanDigest: string;
1612
2625
  targetPlanDigest: string;
1613
2626
  executionDigest: string;
1614
2627
  }, {
1615
2628
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2629
+ teamId: string;
1616
2630
  environment: "production" | "staging";
1617
2631
  rollback: {
1618
2632
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2633
+ teamId: string;
1619
2634
  environment: "production" | "staging";
1620
2635
  operations: {
1621
2636
  action: "noop" | "restore" | "delete-created";
@@ -1623,11 +2638,17 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1623
2638
  providerResourceId: string;
1624
2639
  targetDigest: string | null;
1625
2640
  }[];
2641
+ deploymentId: string;
2642
+ stackId: string;
2643
+ backendBindingDigest: string;
1626
2644
  rollbackId: string;
1627
2645
  sourceReceiptId: string;
1628
2646
  rollbackDigest: string;
1629
2647
  };
2648
+ deploymentId: string;
2649
+ stackId: string;
1630
2650
  topologyId: string;
2651
+ backendBindingDigest: string;
1631
2652
  sourceReceiptId: string;
1632
2653
  sourcePlanDigest: string;
1633
2654
  targetPlanDigest: string;
@@ -1636,26 +2657,39 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
1636
2657
  export declare const hostedTopologyRollbackExecutionApprovalSchema: z.ZodObject<{
1637
2658
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-execution-approval/v1">;
1638
2659
  executionDigest: z.ZodString;
2660
+ teamId: z.ZodString;
2661
+ deploymentId: z.ZodString;
2662
+ stackId: z.ZodString;
1639
2663
  environment: z.ZodEnum<["staging", "production"]>;
2664
+ backendBindingDigest: z.ZodString;
1640
2665
  decision: z.ZodLiteral<"approved">;
1641
2666
  approvedBy: z.ZodString;
1642
2667
  approvedAt: z.ZodString;
1643
2668
  }, "strict", z.ZodTypeAny, {
1644
2669
  schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2670
+ teamId: string;
1645
2671
  environment: "production" | "staging";
2672
+ deploymentId: string;
2673
+ stackId: string;
2674
+ backendBindingDigest: string;
1646
2675
  decision: "approved";
1647
2676
  approvedBy: string;
1648
2677
  approvedAt: string;
1649
2678
  executionDigest: string;
1650
2679
  }, {
1651
2680
  schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2681
+ teamId: string;
1652
2682
  environment: "production" | "staging";
2683
+ deploymentId: string;
2684
+ stackId: string;
2685
+ backendBindingDigest: string;
1653
2686
  decision: "approved";
1654
2687
  approvedBy: string;
1655
2688
  approvedAt: string;
1656
2689
  executionDigest: string;
1657
2690
  }>;
1658
2691
  export type HostedTopologyDeclaration = z.infer<typeof hostedTopologyDeclarationSchema>;
2692
+ export type HostedStateBackend = z.infer<typeof hostedStateBackendSchema>;
1659
2693
  export type HostedResourceObservation = z.infer<typeof hostedResourceObservationSchema>;
1660
2694
  export type HostedTopologyPlan = z.infer<typeof hostedTopologyPlanSchema>;
1661
2695
  export type HostedTopologyApproval = z.infer<typeof hostedTopologyApprovalSchema>;
@@ -1666,6 +2700,7 @@ export declare function planHostedTopology(input: {
1666
2700
  declaration: HostedTopologyDeclaration;
1667
2701
  observations: HostedResourceObservation[];
1668
2702
  connections: Partial<Record<z.infer<typeof hostedProviderSchema>, z.input<typeof hostedConnectionSnapshotSchema>>>;
2703
+ stateBackend?: z.input<typeof hostedStateBackendSchema>;
1669
2704
  }): HostedTopologyPlan;
1670
2705
  export declare function authorizeHostedTopologyPlan(planInput: HostedTopologyPlan, approvalInput?: HostedTopologyApproval): AuthorizedHostedTopologyPlan;
1671
2706
  export declare function verifyHostedTopologyReadback(input: {
@@ -1676,6 +2711,7 @@ export declare function verifyHostedTopologyReadback(input: {
1676
2711
  }): HostedTopologyReceipt;
1677
2712
  export declare function planHostedTopologyRollback(receiptInput: HostedTopologyReceipt): {
1678
2713
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2714
+ teamId: string;
1679
2715
  environment: "production" | "staging";
1680
2716
  operations: {
1681
2717
  action: "noop" | "restore" | "delete-created";
@@ -1683,6 +2719,9 @@ export declare function planHostedTopologyRollback(receiptInput: HostedTopologyR
1683
2719
  providerResourceId: string;
1684
2720
  targetDigest: string | null;
1685
2721
  }[];
2722
+ deploymentId: string;
2723
+ stackId: string;
2724
+ backendBindingDigest: string;
1686
2725
  rollbackId: string;
1687
2726
  sourceReceiptId: string;
1688
2727
  rollbackDigest: string;
@@ -1690,6 +2729,7 @@ export declare function planHostedTopologyRollback(receiptInput: HostedTopologyR
1690
2729
  export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<typeof hostedTopologyRollbackSchema>, approvalInput: z.input<typeof hostedTopologyRollbackApprovalSchema>): {
1691
2730
  rollback: {
1692
2731
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2732
+ teamId: string;
1693
2733
  environment: "production" | "staging";
1694
2734
  operations: {
1695
2735
  action: "noop" | "restore" | "delete-created";
@@ -1697,13 +2737,20 @@ export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<t
1697
2737
  providerResourceId: string;
1698
2738
  targetDigest: string | null;
1699
2739
  }[];
2740
+ deploymentId: string;
2741
+ stackId: string;
2742
+ backendBindingDigest: string;
1700
2743
  rollbackId: string;
1701
2744
  sourceReceiptId: string;
1702
2745
  rollbackDigest: string;
1703
2746
  };
1704
2747
  approval: {
1705
2748
  schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2749
+ teamId: string;
1706
2750
  environment: "production" | "staging";
2751
+ deploymentId: string;
2752
+ stackId: string;
2753
+ backendBindingDigest: string;
1707
2754
  decision: "approved";
1708
2755
  approvedBy: string;
1709
2756
  approvedAt: string;
@@ -1717,9 +2764,11 @@ export declare function planHostedTopologyRollbackExecution(input: {
1717
2764
  targetPlan: z.input<typeof hostedTopologyPlanSchema>;
1718
2765
  }): {
1719
2766
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2767
+ teamId: string;
1720
2768
  environment: "production" | "staging";
1721
2769
  rollback: {
1722
2770
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2771
+ teamId: string;
1723
2772
  environment: "production" | "staging";
1724
2773
  operations: {
1725
2774
  action: "noop" | "restore" | "delete-created";
@@ -1727,11 +2776,17 @@ export declare function planHostedTopologyRollbackExecution(input: {
1727
2776
  providerResourceId: string;
1728
2777
  targetDigest: string | null;
1729
2778
  }[];
2779
+ deploymentId: string;
2780
+ stackId: string;
2781
+ backendBindingDigest: string;
1730
2782
  rollbackId: string;
1731
2783
  sourceReceiptId: string;
1732
2784
  rollbackDigest: string;
1733
2785
  };
2786
+ deploymentId: string;
2787
+ stackId: string;
1734
2788
  topologyId: string;
2789
+ backendBindingDigest: string;
1735
2790
  sourceReceiptId: string;
1736
2791
  sourcePlanDigest: string;
1737
2792
  targetPlanDigest: string;
@@ -1740,9 +2795,11 @@ export declare function planHostedTopologyRollbackExecution(input: {
1740
2795
  export declare function authorizeHostedTopologyRollbackExecution(executionInput: z.input<typeof hostedTopologyRollbackExecutionSchema>, approvalInput: z.input<typeof hostedTopologyRollbackExecutionApprovalSchema>): {
1741
2796
  execution: {
1742
2797
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2798
+ teamId: string;
1743
2799
  environment: "production" | "staging";
1744
2800
  rollback: {
1745
2801
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2802
+ teamId: string;
1746
2803
  environment: "production" | "staging";
1747
2804
  operations: {
1748
2805
  action: "noop" | "restore" | "delete-created";
@@ -1750,11 +2807,17 @@ export declare function authorizeHostedTopologyRollbackExecution(executionInput:
1750
2807
  providerResourceId: string;
1751
2808
  targetDigest: string | null;
1752
2809
  }[];
2810
+ deploymentId: string;
2811
+ stackId: string;
2812
+ backendBindingDigest: string;
1753
2813
  rollbackId: string;
1754
2814
  sourceReceiptId: string;
1755
2815
  rollbackDigest: string;
1756
2816
  };
2817
+ deploymentId: string;
2818
+ stackId: string;
1757
2819
  topologyId: string;
2820
+ backendBindingDigest: string;
1758
2821
  sourceReceiptId: string;
1759
2822
  sourcePlanDigest: string;
1760
2823
  targetPlanDigest: string;
@@ -1762,7 +2825,11 @@ export declare function authorizeHostedTopologyRollbackExecution(executionInput:
1762
2825
  };
1763
2826
  approval: {
1764
2827
  schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2828
+ teamId: string;
1765
2829
  environment: "production" | "staging";
2830
+ deploymentId: string;
2831
+ stackId: string;
2832
+ backendBindingDigest: string;
1766
2833
  decision: "approved";
1767
2834
  approvedBy: string;
1768
2835
  approvedAt: string;