@treeseed/sdk 0.13.0-rc.70 → 0.13.0-rc.72

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.
@@ -0,0 +1,826 @@
1
+ import { z } from 'zod';
2
+ 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"]>;
4
+ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology/v1">;
6
+ id: z.ZodString;
7
+ environment: z.ZodEnum<["staging", "production"]>;
8
+ mutation: z.ZodLiteral<"approval-required">;
9
+ platform: z.ZodObject<{
10
+ repository: z.ZodLiteral<"treeseed-ai/platform">;
11
+ commit: z.ZodString;
12
+ }, "strict", z.ZodTypeAny, {
13
+ repository: "treeseed-ai/platform";
14
+ commit: string;
15
+ }, {
16
+ repository: "treeseed-ai/platform";
17
+ commit: string;
18
+ }>;
19
+ providerConnections: z.ZodRecord<z.ZodEnum<["cloudflare", "railway"]>, z.ZodObject<{
20
+ connectionRef: z.ZodString;
21
+ }, "strict", z.ZodTypeAny, {
22
+ connectionRef: string;
23
+ }, {
24
+ connectionRef: string;
25
+ }>>;
26
+ artifacts: z.ZodRecord<z.ZodString, z.ZodObject<{
27
+ digest: z.ZodString;
28
+ source: z.ZodString;
29
+ }, "strict", z.ZodTypeAny, {
30
+ digest: string;
31
+ source: string;
32
+ }, {
33
+ digest: string;
34
+ source: string;
35
+ }>>;
36
+ resources: z.ZodArray<z.ZodObject<{
37
+ id: z.ZodString;
38
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
39
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
40
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
41
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
42
+ input: z.ZodString;
43
+ }, "strict", z.ZodTypeAny, {
44
+ input: string;
45
+ }, {
46
+ input: string;
47
+ }>, z.ZodObject<{
48
+ artifact: z.ZodString;
49
+ }, "strict", z.ZodTypeAny, {
50
+ artifact: string;
51
+ }, {
52
+ artifact: string;
53
+ }>, z.ZodObject<{
54
+ resourceOutput: z.ZodObject<{
55
+ resourceId: z.ZodString;
56
+ output: z.ZodString;
57
+ }, "strict", z.ZodTypeAny, {
58
+ resourceId: string;
59
+ output: string;
60
+ }, {
61
+ resourceId: string;
62
+ output: string;
63
+ }>;
64
+ }, "strict", z.ZodTypeAny, {
65
+ resourceOutput: {
66
+ resourceId: string;
67
+ output: string;
68
+ };
69
+ }, {
70
+ resourceOutput: {
71
+ resourceId: string;
72
+ output: string;
73
+ };
74
+ }>, z.ZodObject<{
75
+ literal: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ literal: string | number | boolean;
78
+ }, {
79
+ literal: string | number | boolean;
80
+ }>]>>>;
81
+ adoption: z.ZodObject<{
82
+ mode: z.ZodLiteral<"adopt-or-create">;
83
+ externalIdInput: z.ZodOptional<z.ZodString>;
84
+ replacement: z.ZodLiteral<"forbidden">;
85
+ }, "strict", z.ZodTypeAny, {
86
+ mode: "adopt-or-create";
87
+ replacement: "forbidden";
88
+ externalIdInput?: string | undefined;
89
+ }, {
90
+ mode: "adopt-or-create";
91
+ replacement: "forbidden";
92
+ externalIdInput?: string | undefined;
93
+ }>;
94
+ }, "strict", z.ZodTypeAny, {
95
+ id: string;
96
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
97
+ provider: "cloudflare" | "railway";
98
+ dependsOn: string[];
99
+ parameters: Record<string, {
100
+ input: string;
101
+ } | {
102
+ artifact: string;
103
+ } | {
104
+ resourceOutput: {
105
+ resourceId: string;
106
+ output: string;
107
+ };
108
+ } | {
109
+ literal: string | number | boolean;
110
+ }>;
111
+ adoption: {
112
+ mode: "adopt-or-create";
113
+ replacement: "forbidden";
114
+ externalIdInput?: string | undefined;
115
+ };
116
+ }, {
117
+ id: string;
118
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
119
+ provider: "cloudflare" | "railway";
120
+ adoption: {
121
+ mode: "adopt-or-create";
122
+ replacement: "forbidden";
123
+ externalIdInput?: string | undefined;
124
+ };
125
+ dependsOn?: string[] | undefined;
126
+ parameters?: Record<string, {
127
+ input: string;
128
+ } | {
129
+ artifact: string;
130
+ } | {
131
+ resourceOutput: {
132
+ resourceId: string;
133
+ output: string;
134
+ };
135
+ } | {
136
+ literal: string | number | boolean;
137
+ }> | undefined;
138
+ }>, "many">;
139
+ }, "strict", z.ZodTypeAny, {
140
+ schemaVersion: "treeseed.hosted-topology/v1";
141
+ resources: {
142
+ id: string;
143
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
144
+ provider: "cloudflare" | "railway";
145
+ dependsOn: string[];
146
+ parameters: Record<string, {
147
+ input: string;
148
+ } | {
149
+ artifact: string;
150
+ } | {
151
+ resourceOutput: {
152
+ resourceId: string;
153
+ output: string;
154
+ };
155
+ } | {
156
+ literal: string | number | boolean;
157
+ }>;
158
+ adoption: {
159
+ mode: "adopt-or-create";
160
+ replacement: "forbidden";
161
+ externalIdInput?: string | undefined;
162
+ };
163
+ }[];
164
+ id: string;
165
+ platform: {
166
+ repository: "treeseed-ai/platform";
167
+ commit: string;
168
+ };
169
+ mutation: "approval-required";
170
+ environment: "production" | "staging";
171
+ artifacts: Record<string, {
172
+ digest: string;
173
+ source: string;
174
+ }>;
175
+ providerConnections: Partial<Record<"cloudflare" | "railway", {
176
+ connectionRef: string;
177
+ }>>;
178
+ }, {
179
+ schemaVersion: "treeseed.hosted-topology/v1";
180
+ resources: {
181
+ id: string;
182
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
183
+ provider: "cloudflare" | "railway";
184
+ adoption: {
185
+ mode: "adopt-or-create";
186
+ replacement: "forbidden";
187
+ externalIdInput?: string | undefined;
188
+ };
189
+ dependsOn?: string[] | undefined;
190
+ parameters?: Record<string, {
191
+ input: string;
192
+ } | {
193
+ artifact: string;
194
+ } | {
195
+ resourceOutput: {
196
+ resourceId: string;
197
+ output: string;
198
+ };
199
+ } | {
200
+ literal: string | number | boolean;
201
+ }> | undefined;
202
+ }[];
203
+ id: string;
204
+ platform: {
205
+ repository: "treeseed-ai/platform";
206
+ commit: string;
207
+ };
208
+ mutation: "approval-required";
209
+ environment: "production" | "staging";
210
+ artifacts: Record<string, {
211
+ digest: string;
212
+ source: string;
213
+ }>;
214
+ providerConnections: Partial<Record<"cloudflare" | "railway", {
215
+ connectionRef: string;
216
+ }>>;
217
+ }>, {
218
+ schemaVersion: "treeseed.hosted-topology/v1";
219
+ resources: {
220
+ id: string;
221
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
222
+ provider: "cloudflare" | "railway";
223
+ dependsOn: string[];
224
+ parameters: Record<string, {
225
+ input: string;
226
+ } | {
227
+ artifact: string;
228
+ } | {
229
+ resourceOutput: {
230
+ resourceId: string;
231
+ output: string;
232
+ };
233
+ } | {
234
+ literal: string | number | boolean;
235
+ }>;
236
+ adoption: {
237
+ mode: "adopt-or-create";
238
+ replacement: "forbidden";
239
+ externalIdInput?: string | undefined;
240
+ };
241
+ }[];
242
+ id: string;
243
+ platform: {
244
+ repository: "treeseed-ai/platform";
245
+ commit: string;
246
+ };
247
+ mutation: "approval-required";
248
+ environment: "production" | "staging";
249
+ artifacts: Record<string, {
250
+ digest: string;
251
+ source: string;
252
+ }>;
253
+ providerConnections: Partial<Record<"cloudflare" | "railway", {
254
+ connectionRef: string;
255
+ }>>;
256
+ }, {
257
+ schemaVersion: "treeseed.hosted-topology/v1";
258
+ resources: {
259
+ id: string;
260
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
261
+ provider: "cloudflare" | "railway";
262
+ adoption: {
263
+ mode: "adopt-or-create";
264
+ replacement: "forbidden";
265
+ externalIdInput?: string | undefined;
266
+ };
267
+ dependsOn?: string[] | undefined;
268
+ parameters?: Record<string, {
269
+ input: string;
270
+ } | {
271
+ artifact: string;
272
+ } | {
273
+ resourceOutput: {
274
+ resourceId: string;
275
+ output: string;
276
+ };
277
+ } | {
278
+ literal: string | number | boolean;
279
+ }> | undefined;
280
+ }[];
281
+ id: string;
282
+ platform: {
283
+ repository: "treeseed-ai/platform";
284
+ commit: string;
285
+ };
286
+ mutation: "approval-required";
287
+ environment: "production" | "staging";
288
+ artifacts: Record<string, {
289
+ digest: string;
290
+ source: string;
291
+ }>;
292
+ providerConnections: Partial<Record<"cloudflare" | "railway", {
293
+ connectionRef: string;
294
+ }>>;
295
+ }>;
296
+ export declare const hostedResourceObservationSchema: z.ZodObject<{
297
+ resourceId: z.ZodString;
298
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
299
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
300
+ providerResourceId: z.ZodNullable<z.ZodString>;
301
+ state: z.ZodEnum<["missing", "healthy", "degraded"]>;
302
+ managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
303
+ observedDigest: z.ZodNullable<z.ZodString>;
304
+ observedAt: z.ZodString;
305
+ }, "strict", z.ZodTypeAny, {
306
+ state: "missing" | "degraded" | "healthy";
307
+ resourceId: string;
308
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
309
+ provider: "cloudflare" | "railway";
310
+ providerResourceId: string | null;
311
+ managedBy: "external" | "treeseed" | null;
312
+ observedDigest: string | null;
313
+ observedAt: string;
314
+ }, {
315
+ state: "missing" | "degraded" | "healthy";
316
+ resourceId: string;
317
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
318
+ provider: "cloudflare" | "railway";
319
+ providerResourceId: string | null;
320
+ managedBy: "external" | "treeseed" | null;
321
+ observedDigest: string | null;
322
+ observedAt: string;
323
+ }>;
324
+ export declare const hostedTopologyPlanSchema: z.ZodObject<{
325
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
326
+ planId: z.ZodString;
327
+ planDigest: z.ZodString;
328
+ declarationDigest: z.ZodString;
329
+ topologyId: z.ZodString;
330
+ environment: z.ZodEnum<["staging", "production"]>;
331
+ platformCommit: z.ZodString;
332
+ actions: z.ZodArray<z.ZodObject<{
333
+ resourceId: z.ZodString;
334
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
335
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
336
+ action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
337
+ desiredDigest: z.ZodString;
338
+ previousDigest: z.ZodNullable<z.ZodString>;
339
+ providerResourceId: z.ZodNullable<z.ZodString>;
340
+ }, "strict", z.ZodTypeAny, {
341
+ action: "noop" | "create" | "adopt" | "update";
342
+ resourceId: string;
343
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
344
+ provider: "cloudflare" | "railway";
345
+ providerResourceId: string | null;
346
+ desiredDigest: string;
347
+ previousDigest: string | null;
348
+ }, {
349
+ action: "noop" | "create" | "adopt" | "update";
350
+ resourceId: string;
351
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
352
+ provider: "cloudflare" | "railway";
353
+ providerResourceId: string | null;
354
+ desiredDigest: string;
355
+ previousDigest: string | null;
356
+ }>, "many">;
357
+ blockers: z.ZodArray<z.ZodObject<{
358
+ code: z.ZodEnum<["connection-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
359
+ resourceId: z.ZodOptional<z.ZodString>;
360
+ message: z.ZodString;
361
+ }, "strict", z.ZodTypeAny, {
362
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
363
+ message: string;
364
+ resourceId?: string | undefined;
365
+ }, {
366
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
367
+ message: string;
368
+ resourceId?: string | undefined;
369
+ }>, "many">;
370
+ approvalRequired: z.ZodBoolean;
371
+ executable: z.ZodLiteral<false>;
372
+ }, "strict", z.ZodTypeAny, {
373
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
374
+ blockers: {
375
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
376
+ message: string;
377
+ resourceId?: string | undefined;
378
+ }[];
379
+ planDigest: string;
380
+ actions: {
381
+ action: "noop" | "create" | "adopt" | "update";
382
+ resourceId: string;
383
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
384
+ provider: "cloudflare" | "railway";
385
+ providerResourceId: string | null;
386
+ desiredDigest: string;
387
+ previousDigest: string | null;
388
+ }[];
389
+ environment: "production" | "staging";
390
+ executable: false;
391
+ planId: string;
392
+ declarationDigest: string;
393
+ topologyId: string;
394
+ platformCommit: string;
395
+ approvalRequired: boolean;
396
+ }, {
397
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
398
+ blockers: {
399
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
400
+ message: string;
401
+ resourceId?: string | undefined;
402
+ }[];
403
+ planDigest: string;
404
+ actions: {
405
+ action: "noop" | "create" | "adopt" | "update";
406
+ resourceId: string;
407
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
408
+ provider: "cloudflare" | "railway";
409
+ providerResourceId: string | null;
410
+ desiredDigest: string;
411
+ previousDigest: string | null;
412
+ }[];
413
+ environment: "production" | "staging";
414
+ executable: false;
415
+ planId: string;
416
+ declarationDigest: string;
417
+ topologyId: string;
418
+ platformCommit: string;
419
+ approvalRequired: boolean;
420
+ }>;
421
+ export declare const hostedTopologyApprovalSchema: z.ZodObject<{
422
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
423
+ planDigest: z.ZodString;
424
+ environment: z.ZodEnum<["staging", "production"]>;
425
+ decision: z.ZodLiteral<"approved">;
426
+ approvedBy: z.ZodString;
427
+ approvedAt: z.ZodString;
428
+ }, "strict", z.ZodTypeAny, {
429
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
430
+ planDigest: string;
431
+ environment: "production" | "staging";
432
+ decision: "approved";
433
+ approvedBy: string;
434
+ approvedAt: string;
435
+ }, {
436
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
437
+ planDigest: string;
438
+ environment: "production" | "staging";
439
+ decision: "approved";
440
+ approvedBy: string;
441
+ approvedAt: string;
442
+ }>;
443
+ export declare const authorizedHostedTopologyPlanSchema: z.ZodObject<Omit<{
444
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
445
+ planId: z.ZodString;
446
+ planDigest: z.ZodString;
447
+ declarationDigest: z.ZodString;
448
+ topologyId: z.ZodString;
449
+ environment: z.ZodEnum<["staging", "production"]>;
450
+ platformCommit: z.ZodString;
451
+ actions: z.ZodArray<z.ZodObject<{
452
+ resourceId: z.ZodString;
453
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
454
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
455
+ action: z.ZodEnum<["create", "adopt", "update", "noop"]>;
456
+ desiredDigest: z.ZodString;
457
+ previousDigest: z.ZodNullable<z.ZodString>;
458
+ providerResourceId: z.ZodNullable<z.ZodString>;
459
+ }, "strict", z.ZodTypeAny, {
460
+ action: "noop" | "create" | "adopt" | "update";
461
+ resourceId: string;
462
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
463
+ provider: "cloudflare" | "railway";
464
+ providerResourceId: string | null;
465
+ desiredDigest: string;
466
+ previousDigest: string | null;
467
+ }, {
468
+ action: "noop" | "create" | "adopt" | "update";
469
+ resourceId: string;
470
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
471
+ provider: "cloudflare" | "railway";
472
+ providerResourceId: string | null;
473
+ desiredDigest: string;
474
+ previousDigest: string | null;
475
+ }>, "many">;
476
+ blockers: z.ZodArray<z.ZodObject<{
477
+ code: z.ZodEnum<["connection-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]>;
478
+ resourceId: z.ZodOptional<z.ZodString>;
479
+ message: z.ZodString;
480
+ }, "strict", z.ZodTypeAny, {
481
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
482
+ message: string;
483
+ resourceId?: string | undefined;
484
+ }, {
485
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
486
+ message: string;
487
+ resourceId?: string | undefined;
488
+ }>, "many">;
489
+ approvalRequired: z.ZodBoolean;
490
+ } & {
491
+ executable: z.ZodLiteral<true>;
492
+ approval: z.ZodNullable<z.ZodObject<{
493
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
494
+ planDigest: z.ZodString;
495
+ environment: z.ZodEnum<["staging", "production"]>;
496
+ decision: z.ZodLiteral<"approved">;
497
+ approvedBy: z.ZodString;
498
+ approvedAt: z.ZodString;
499
+ }, "strict", z.ZodTypeAny, {
500
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
501
+ planDigest: string;
502
+ environment: "production" | "staging";
503
+ decision: "approved";
504
+ approvedBy: string;
505
+ approvedAt: string;
506
+ }, {
507
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
508
+ planDigest: string;
509
+ environment: "production" | "staging";
510
+ decision: "approved";
511
+ approvedBy: string;
512
+ approvedAt: string;
513
+ }>>;
514
+ }, "approvalRequired">, "strict", z.ZodTypeAny, {
515
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
516
+ blockers: {
517
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
518
+ message: string;
519
+ resourceId?: string | undefined;
520
+ }[];
521
+ planDigest: string;
522
+ actions: {
523
+ action: "noop" | "create" | "adopt" | "update";
524
+ resourceId: string;
525
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
526
+ provider: "cloudflare" | "railway";
527
+ providerResourceId: string | null;
528
+ desiredDigest: string;
529
+ previousDigest: string | null;
530
+ }[];
531
+ environment: "production" | "staging";
532
+ executable: true;
533
+ planId: string;
534
+ declarationDigest: string;
535
+ topologyId: string;
536
+ platformCommit: string;
537
+ approval: {
538
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
539
+ planDigest: string;
540
+ environment: "production" | "staging";
541
+ decision: "approved";
542
+ approvedBy: string;
543
+ approvedAt: string;
544
+ } | null;
545
+ }, {
546
+ schemaVersion: "treeseed.hosted-topology-plan/v1";
547
+ blockers: {
548
+ code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
549
+ message: string;
550
+ resourceId?: string | undefined;
551
+ }[];
552
+ planDigest: string;
553
+ actions: {
554
+ action: "noop" | "create" | "adopt" | "update";
555
+ resourceId: string;
556
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
557
+ provider: "cloudflare" | "railway";
558
+ providerResourceId: string | null;
559
+ desiredDigest: string;
560
+ previousDigest: string | null;
561
+ }[];
562
+ environment: "production" | "staging";
563
+ executable: true;
564
+ planId: string;
565
+ declarationDigest: string;
566
+ topologyId: string;
567
+ platformCommit: string;
568
+ approval: {
569
+ schemaVersion: "treeseed.hosted-topology-approval/v1";
570
+ planDigest: string;
571
+ environment: "production" | "staging";
572
+ decision: "approved";
573
+ approvedBy: string;
574
+ approvedAt: string;
575
+ } | null;
576
+ }>;
577
+ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
578
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-receipt/v1">;
579
+ receiptId: z.ZodString;
580
+ planDigest: z.ZodString;
581
+ declarationDigest: z.ZodString;
582
+ topologyId: z.ZodString;
583
+ environment: z.ZodEnum<["staging", "production"]>;
584
+ platformCommit: z.ZodString;
585
+ resources: z.ZodArray<z.ZodObject<{
586
+ resourceId: z.ZodString;
587
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
588
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
589
+ providerResourceId: z.ZodNullable<z.ZodString>;
590
+ state: z.ZodEnum<["missing", "healthy", "degraded"]>;
591
+ managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
592
+ observedDigest: z.ZodNullable<z.ZodString>;
593
+ observedAt: z.ZodString;
594
+ }, "strict", z.ZodTypeAny, {
595
+ state: "missing" | "degraded" | "healthy";
596
+ resourceId: string;
597
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
598
+ provider: "cloudflare" | "railway";
599
+ providerResourceId: string | null;
600
+ managedBy: "external" | "treeseed" | null;
601
+ observedDigest: string | null;
602
+ observedAt: string;
603
+ }, {
604
+ state: "missing" | "degraded" | "healthy";
605
+ resourceId: string;
606
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
607
+ provider: "cloudflare" | "railway";
608
+ providerResourceId: string | null;
609
+ managedBy: "external" | "treeseed" | null;
610
+ observedDigest: string | null;
611
+ observedAt: string;
612
+ }>, "many">;
613
+ previousResources: z.ZodArray<z.ZodObject<{
614
+ resourceId: z.ZodString;
615
+ provider: z.ZodEnum<["cloudflare", "railway"]>;
616
+ kind: z.ZodEnum<["admin-application", "dns-record", "tls-policy", "api-proxy", "control-plane-api", "postgresql", "operations-runner", "treedx-service"]>;
617
+ providerResourceId: z.ZodNullable<z.ZodString>;
618
+ state: z.ZodEnum<["missing", "healthy", "degraded"]>;
619
+ managedBy: z.ZodNullable<z.ZodEnum<["treeseed", "external"]>>;
620
+ observedDigest: z.ZodNullable<z.ZodString>;
621
+ observedAt: z.ZodString;
622
+ }, "strict", z.ZodTypeAny, {
623
+ state: "missing" | "degraded" | "healthy";
624
+ resourceId: string;
625
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
626
+ provider: "cloudflare" | "railway";
627
+ providerResourceId: string | null;
628
+ managedBy: "external" | "treeseed" | null;
629
+ observedDigest: string | null;
630
+ observedAt: string;
631
+ }, {
632
+ state: "missing" | "degraded" | "healthy";
633
+ resourceId: string;
634
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
635
+ provider: "cloudflare" | "railway";
636
+ providerResourceId: string | null;
637
+ managedBy: "external" | "treeseed" | null;
638
+ observedDigest: string | null;
639
+ observedAt: string;
640
+ }>, "many">;
641
+ state: z.ZodLiteral<"known-good">;
642
+ completedAt: z.ZodString;
643
+ }, "strict", z.ZodTypeAny, {
644
+ schemaVersion: "treeseed.hosted-topology-receipt/v1";
645
+ resources: {
646
+ state: "missing" | "degraded" | "healthy";
647
+ resourceId: string;
648
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
649
+ provider: "cloudflare" | "railway";
650
+ providerResourceId: string | null;
651
+ managedBy: "external" | "treeseed" | null;
652
+ observedDigest: string | null;
653
+ observedAt: string;
654
+ }[];
655
+ planDigest: string;
656
+ state: "known-good";
657
+ environment: "production" | "staging";
658
+ completedAt: string;
659
+ receiptId: string;
660
+ declarationDigest: string;
661
+ topologyId: string;
662
+ platformCommit: string;
663
+ previousResources: {
664
+ state: "missing" | "degraded" | "healthy";
665
+ resourceId: string;
666
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
667
+ provider: "cloudflare" | "railway";
668
+ providerResourceId: string | null;
669
+ managedBy: "external" | "treeseed" | null;
670
+ observedDigest: string | null;
671
+ observedAt: string;
672
+ }[];
673
+ }, {
674
+ schemaVersion: "treeseed.hosted-topology-receipt/v1";
675
+ resources: {
676
+ state: "missing" | "degraded" | "healthy";
677
+ resourceId: string;
678
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
679
+ provider: "cloudflare" | "railway";
680
+ providerResourceId: string | null;
681
+ managedBy: "external" | "treeseed" | null;
682
+ observedDigest: string | null;
683
+ observedAt: string;
684
+ }[];
685
+ planDigest: string;
686
+ state: "known-good";
687
+ environment: "production" | "staging";
688
+ completedAt: string;
689
+ receiptId: string;
690
+ declarationDigest: string;
691
+ topologyId: string;
692
+ platformCommit: string;
693
+ previousResources: {
694
+ state: "missing" | "degraded" | "healthy";
695
+ resourceId: string;
696
+ kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
697
+ provider: "cloudflare" | "railway";
698
+ providerResourceId: string | null;
699
+ managedBy: "external" | "treeseed" | null;
700
+ observedDigest: string | null;
701
+ observedAt: string;
702
+ }[];
703
+ }>;
704
+ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
705
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
706
+ rollbackId: z.ZodString;
707
+ sourceReceiptId: z.ZodString;
708
+ environment: z.ZodEnum<["staging", "production"]>;
709
+ operations: z.ZodArray<z.ZodObject<{
710
+ resourceId: z.ZodString;
711
+ action: z.ZodEnum<["restore", "delete-created", "noop"]>;
712
+ providerResourceId: z.ZodString;
713
+ targetDigest: z.ZodNullable<z.ZodString>;
714
+ }, "strict", z.ZodTypeAny, {
715
+ action: "noop" | "restore" | "delete-created";
716
+ resourceId: string;
717
+ providerResourceId: string;
718
+ targetDigest: string | null;
719
+ }, {
720
+ action: "noop" | "restore" | "delete-created";
721
+ resourceId: string;
722
+ providerResourceId: string;
723
+ targetDigest: string | null;
724
+ }>, "many">;
725
+ rollbackDigest: z.ZodString;
726
+ }, "strict", z.ZodTypeAny, {
727
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
728
+ environment: "production" | "staging";
729
+ operations: {
730
+ action: "noop" | "restore" | "delete-created";
731
+ resourceId: string;
732
+ providerResourceId: string;
733
+ targetDigest: string | null;
734
+ }[];
735
+ rollbackId: string;
736
+ sourceReceiptId: string;
737
+ rollbackDigest: string;
738
+ }, {
739
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
740
+ environment: "production" | "staging";
741
+ operations: {
742
+ action: "noop" | "restore" | "delete-created";
743
+ resourceId: string;
744
+ providerResourceId: string;
745
+ targetDigest: string | null;
746
+ }[];
747
+ rollbackId: string;
748
+ sourceReceiptId: string;
749
+ rollbackDigest: string;
750
+ }>;
751
+ export declare const hostedTopologyRollbackApprovalSchema: z.ZodObject<{
752
+ schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-approval/v1">;
753
+ rollbackDigest: z.ZodString;
754
+ environment: z.ZodEnum<["staging", "production"]>;
755
+ decision: z.ZodLiteral<"approved">;
756
+ approvedBy: z.ZodString;
757
+ approvedAt: z.ZodString;
758
+ }, "strict", z.ZodTypeAny, {
759
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
760
+ environment: "production" | "staging";
761
+ decision: "approved";
762
+ approvedBy: string;
763
+ approvedAt: string;
764
+ rollbackDigest: string;
765
+ }, {
766
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
767
+ environment: "production" | "staging";
768
+ decision: "approved";
769
+ approvedBy: string;
770
+ approvedAt: string;
771
+ rollbackDigest: string;
772
+ }>;
773
+ export type HostedTopologyDeclaration = z.infer<typeof hostedTopologyDeclarationSchema>;
774
+ export type HostedResourceObservation = z.infer<typeof hostedResourceObservationSchema>;
775
+ export type HostedTopologyPlan = z.infer<typeof hostedTopologyPlanSchema>;
776
+ export type HostedTopologyApproval = z.infer<typeof hostedTopologyApprovalSchema>;
777
+ export type AuthorizedHostedTopologyPlan = z.infer<typeof authorizedHostedTopologyPlanSchema>;
778
+ export type HostedTopologyReceipt = z.infer<typeof hostedTopologyReceiptSchema>;
779
+ export declare function planHostedTopology(input: {
780
+ declaration: HostedTopologyDeclaration;
781
+ observations: HostedResourceObservation[];
782
+ availableConnections: string[];
783
+ }): HostedTopologyPlan;
784
+ export declare function authorizeHostedTopologyPlan(planInput: HostedTopologyPlan, approvalInput?: HostedTopologyApproval): AuthorizedHostedTopologyPlan;
785
+ export declare function verifyHostedTopologyReadback(input: {
786
+ plan: AuthorizedHostedTopologyPlan;
787
+ previousResources: HostedResourceObservation[];
788
+ resources: HostedResourceObservation[];
789
+ completedAt: string;
790
+ }): HostedTopologyReceipt;
791
+ export declare function planHostedTopologyRollback(receiptInput: HostedTopologyReceipt): {
792
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
793
+ environment: "production" | "staging";
794
+ operations: {
795
+ action: "noop" | "restore" | "delete-created";
796
+ resourceId: string;
797
+ providerResourceId: string;
798
+ targetDigest: string | null;
799
+ }[];
800
+ rollbackId: string;
801
+ sourceReceiptId: string;
802
+ rollbackDigest: string;
803
+ };
804
+ export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<typeof hostedTopologyRollbackSchema>, approvalInput: z.input<typeof hostedTopologyRollbackApprovalSchema>): {
805
+ rollback: {
806
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
807
+ environment: "production" | "staging";
808
+ operations: {
809
+ action: "noop" | "restore" | "delete-created";
810
+ resourceId: string;
811
+ providerResourceId: string;
812
+ targetDigest: string | null;
813
+ }[];
814
+ rollbackId: string;
815
+ sourceReceiptId: string;
816
+ rollbackDigest: string;
817
+ };
818
+ approval: {
819
+ schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
820
+ environment: "production" | "staging";
821
+ decision: "approved";
822
+ approvedBy: string;
823
+ approvedAt: string;
824
+ rollbackDigest: string;
825
+ };
826
+ };