@treeseed/sdk 0.13.0-rc.107 → 0.13.0-rc.109

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.
@@ -641,8 +641,8 @@ export declare function validatePortableContentData(model: string, value: unknow
641
641
  }>, "many">>;
642
642
  requiresArtifactKinds: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodArray<import("zod").ZodString, "many">, string[], string[]>>;
643
643
  }, "strict", import("zod").ZodTypeAny, {
644
- objective?: string | undefined;
645
644
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
645
+ objective?: string | undefined;
646
646
  proposalTypes?: string[] | undefined;
647
647
  artifactKind?: string | undefined;
648
648
  subjectModel?: string | undefined;
@@ -672,8 +672,8 @@ export declare function validatePortableContentData(model: string, value: unknow
672
672
  }[] | undefined;
673
673
  requiresArtifactKinds?: string[] | undefined;
674
674
  }, {
675
- objective?: string | undefined;
676
675
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
676
+ objective?: string | undefined;
677
677
  proposalTypes?: string[] | undefined;
678
678
  artifactKind?: string | undefined;
679
679
  subjectModel?: string | undefined;
@@ -966,8 +966,8 @@ export declare function validatePortableContentData(model: string, value: unknow
966
966
  publishes?: string[] | undefined;
967
967
  } | undefined;
968
968
  planningIntent?: {
969
- objective?: string | undefined;
970
969
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
970
+ objective?: string | undefined;
971
971
  proposalTypes?: string[] | undefined;
972
972
  artifactKind?: string | undefined;
973
973
  subjectModel?: string | undefined;
@@ -1138,8 +1138,8 @@ export declare function validatePortableContentData(model: string, value: unknow
1138
1138
  publishes?: string[] | undefined;
1139
1139
  } | undefined;
1140
1140
  planningIntent?: {
1141
- objective?: string | undefined;
1142
1141
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
1142
+ objective?: string | undefined;
1143
1143
  proposalTypes?: string[] | undefined;
1144
1144
  artifactKind?: string | undefined;
1145
1145
  subjectModel?: string | undefined;
@@ -1310,8 +1310,8 @@ export declare function validatePortableContentData(model: string, value: unknow
1310
1310
  publishes?: string[] | undefined;
1311
1311
  } | undefined;
1312
1312
  planningIntent?: {
1313
- objective?: string | undefined;
1314
1313
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
1314
+ objective?: string | undefined;
1315
1315
  proposalTypes?: string[] | undefined;
1316
1316
  artifactKind?: string | undefined;
1317
1317
  subjectModel?: string | undefined;
@@ -1482,8 +1482,8 @@ export declare function validatePortableContentData(model: string, value: unknow
1482
1482
  publishes?: string[] | undefined;
1483
1483
  } | undefined;
1484
1484
  planningIntent?: {
1485
- objective?: string | undefined;
1486
1485
  stage?: "revision" | "closeout" | "discovery" | "synthesis" | "deliberation" | "evaluation" | undefined;
1486
+ objective?: string | undefined;
1487
1487
  proposalTypes?: string[] | undefined;
1488
1488
  artifactKind?: string | undefined;
1489
1489
  subjectModel?: string | undefined;
@@ -1886,8 +1886,8 @@ export declare function validatePortableContentData(model: string, value: unknow
1886
1886
  audience?: string[] | undefined;
1887
1887
  slug?: string | undefined;
1888
1888
  description?: string | undefined;
1889
- summary?: string | undefined;
1890
1889
  stage?: string | undefined;
1890
+ summary?: string | undefined;
1891
1891
  updated_at?: Date | undefined;
1892
1892
  page_layout?: "article" | "bridge" | undefined;
1893
1893
  } | {
@@ -2006,8 +2006,8 @@ export declare function validatePortableContentData(model: string, value: unknow
2006
2006
  } | {
2007
2007
  status: "review" | "archived" | "draft" | "published";
2008
2008
  id: string;
2009
- slug: string;
2010
2009
  schemaVersion: "treeseed.book/v2";
2010
+ slug: string;
2011
2011
  visibility: "project" | "team" | "public" | "admin" | "authenticated";
2012
2012
  order: number;
2013
2013
  summary: string;
@@ -2019,8 +2019,8 @@ export declare function validatePortableContentData(model: string, value: unknow
2019
2019
  } | {
2020
2020
  status: "review" | "archived" | "draft" | "published";
2021
2021
  id: string;
2022
- slug: string;
2023
2022
  schemaVersion: "treeseed.knowledge-page/v1";
2023
+ slug: string;
2024
2024
  visibility: "project" | "team" | "public" | "admin" | "authenticated";
2025
2025
  summary: string;
2026
2026
  title: string;
@@ -24,8 +24,8 @@ export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
24
24
  }, "strict", z.ZodTypeAny, {
25
25
  service: "inference" | "training" | "lab";
26
26
  nonce: string;
27
- key: string;
28
27
  schemaVersion: "treeseed.ai-storage-proof/v1";
28
+ key: string;
29
29
  action: "read" | "write" | "list" | "delete";
30
30
  projectId: string;
31
31
  teamId: string;
@@ -35,8 +35,8 @@ export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
35
35
  }, {
36
36
  service: "inference" | "training" | "lab";
37
37
  nonce: string;
38
- key: string;
39
38
  schemaVersion: "treeseed.ai-storage-proof/v1";
39
+ key: string;
40
40
  action: "read" | "write" | "list" | "delete";
41
41
  projectId: string;
42
42
  teamId: string;
@@ -46,8 +46,8 @@ export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
46
46
  }>, {
47
47
  service: "inference" | "training" | "lab";
48
48
  nonce: string;
49
- key: string;
50
49
  schemaVersion: "treeseed.ai-storage-proof/v1";
50
+ key: string;
51
51
  action: "read" | "write" | "list" | "delete";
52
52
  projectId: string;
53
53
  teamId: string;
@@ -57,8 +57,8 @@ export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
57
57
  }, {
58
58
  service: "inference" | "training" | "lab";
59
59
  nonce: string;
60
- key: string;
61
60
  schemaVersion: "treeseed.ai-storage-proof/v1";
61
+ key: string;
62
62
  action: "read" | "write" | "list" | "delete";
63
63
  projectId: string;
64
64
  teamId: string;
@@ -82,8 +82,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
82
82
  }, "strict", z.ZodTypeAny, {
83
83
  service: "inference" | "training" | "lab";
84
84
  nonce: string;
85
- key: string;
86
85
  schemaVersion: "treeseed.ai-storage-proof/v1";
86
+ key: string;
87
87
  action: "read" | "write" | "list" | "delete";
88
88
  projectId: string;
89
89
  teamId: string;
@@ -93,8 +93,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
93
93
  }, {
94
94
  service: "inference" | "training" | "lab";
95
95
  nonce: string;
96
- key: string;
97
96
  schemaVersion: "treeseed.ai-storage-proof/v1";
97
+ key: string;
98
98
  action: "read" | "write" | "list" | "delete";
99
99
  projectId: string;
100
100
  teamId: string;
@@ -104,8 +104,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
104
104
  }>, {
105
105
  service: "inference" | "training" | "lab";
106
106
  nonce: string;
107
- key: string;
108
107
  schemaVersion: "treeseed.ai-storage-proof/v1";
108
+ key: string;
109
109
  action: "read" | "write" | "list" | "delete";
110
110
  projectId: string;
111
111
  teamId: string;
@@ -115,8 +115,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
115
115
  }, {
116
116
  service: "inference" | "training" | "lab";
117
117
  nonce: string;
118
- key: string;
119
118
  schemaVersion: "treeseed.ai-storage-proof/v1";
119
+ key: string;
120
120
  action: "read" | "write" | "list" | "delete";
121
121
  projectId: string;
122
122
  teamId: string;
@@ -129,8 +129,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
129
129
  proof: {
130
130
  service: "inference" | "training" | "lab";
131
131
  nonce: string;
132
- key: string;
133
132
  schemaVersion: "treeseed.ai-storage-proof/v1";
133
+ key: string;
134
134
  action: "read" | "write" | "list" | "delete";
135
135
  projectId: string;
136
136
  teamId: string;
@@ -143,8 +143,8 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
143
143
  proof: {
144
144
  service: "inference" | "training" | "lab";
145
145
  nonce: string;
146
- key: string;
147
146
  schemaVersion: "treeseed.ai-storage-proof/v1";
147
+ key: string;
148
148
  action: "read" | "write" | "list" | "delete";
149
149
  projectId: string;
150
150
  teamId: string;
@@ -21,8 +21,8 @@ declare const hostedStateBackendCoreSchema: z.ZodObject<{
21
21
  encryptionKeyRef: z.ZodString;
22
22
  }, "strict", z.ZodTypeAny, {
23
23
  type: "s3";
24
- key: string;
25
24
  schemaVersion: "treeseed.hosted-state-backend/v1";
25
+ key: string;
26
26
  teamId: string;
27
27
  environment: "production" | "staging";
28
28
  deploymentId: string;
@@ -35,8 +35,8 @@ declare const hostedStateBackendCoreSchema: z.ZodObject<{
35
35
  usePathStyle?: boolean | undefined;
36
36
  }, {
37
37
  type: "s3";
38
- key: string;
39
38
  schemaVersion: "treeseed.hosted-state-backend/v1";
39
+ key: string;
40
40
  teamId: string;
41
41
  environment: "production" | "staging";
42
42
  deploymentId: string;
@@ -66,8 +66,8 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
66
66
  bindingDigest: z.ZodString;
67
67
  }, "strict", z.ZodTypeAny, {
68
68
  type: "s3";
69
- key: string;
70
69
  schemaVersion: "treeseed.hosted-state-backend/v1";
70
+ key: string;
71
71
  teamId: string;
72
72
  environment: "production" | "staging";
73
73
  deploymentId: string;
@@ -81,8 +81,8 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
81
81
  usePathStyle?: boolean | undefined;
82
82
  }, {
83
83
  type: "s3";
84
- key: string;
85
84
  schemaVersion: "treeseed.hosted-state-backend/v1";
85
+ key: string;
86
86
  teamId: string;
87
87
  environment: "production" | "staging";
88
88
  deploymentId: string;
@@ -96,8 +96,8 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
96
96
  usePathStyle?: boolean | undefined;
97
97
  }>, {
98
98
  type: "s3";
99
- key: string;
100
99
  schemaVersion: "treeseed.hosted-state-backend/v1";
100
+ key: string;
101
101
  teamId: string;
102
102
  environment: "production" | "staging";
103
103
  deploymentId: string;
@@ -111,8 +111,8 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
111
111
  usePathStyle?: boolean | undefined;
112
112
  }, {
113
113
  type: "s3";
114
- key: string;
115
114
  schemaVersion: "treeseed.hosted-state-backend/v1";
115
+ key: string;
116
116
  teamId: string;
117
117
  environment: "production" | "staging";
118
118
  deploymentId: string;
@@ -127,8 +127,8 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
127
127
  }>;
128
128
  export declare function bindHostedStateBackend(input: z.input<typeof hostedStateBackendCoreSchema>): {
129
129
  type: "s3";
130
- key: string;
131
130
  schemaVersion: "treeseed.hosted-state-backend/v1";
131
+ key: string;
132
132
  teamId: string;
133
133
  environment: "production" | "staging";
134
134
  deploymentId: string;
@@ -781,8 +781,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
781
781
  bindingDigest: z.ZodString;
782
782
  }, "strict", z.ZodTypeAny, {
783
783
  type: "s3";
784
- key: string;
785
784
  schemaVersion: "treeseed.hosted-state-backend/v1";
785
+ key: string;
786
786
  teamId: string;
787
787
  environment: "production" | "staging";
788
788
  deploymentId: string;
@@ -796,8 +796,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
796
796
  usePathStyle?: boolean | undefined;
797
797
  }, {
798
798
  type: "s3";
799
- key: string;
800
799
  schemaVersion: "treeseed.hosted-state-backend/v1";
800
+ key: string;
801
801
  teamId: string;
802
802
  environment: "production" | "staging";
803
803
  deploymentId: string;
@@ -811,8 +811,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
811
811
  usePathStyle?: boolean | undefined;
812
812
  }>, {
813
813
  type: "s3";
814
- key: string;
815
814
  schemaVersion: "treeseed.hosted-state-backend/v1";
815
+ key: string;
816
816
  teamId: string;
817
817
  environment: "production" | "staging";
818
818
  deploymentId: string;
@@ -826,8 +826,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
826
826
  usePathStyle?: boolean | undefined;
827
827
  }, {
828
828
  type: "s3";
829
- key: string;
830
829
  schemaVersion: "treeseed.hosted-state-backend/v1";
830
+ key: string;
831
831
  teamId: string;
832
832
  environment: "production" | "staging";
833
833
  deploymentId: string;
@@ -1159,8 +1159,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1159
1159
  stackId: string;
1160
1160
  stateBackend: {
1161
1161
  type: "s3";
1162
- key: string;
1163
1162
  schemaVersion: "treeseed.hosted-state-backend/v1";
1163
+ key: string;
1164
1164
  teamId: string;
1165
1165
  environment: "production" | "staging";
1166
1166
  deploymentId: string;
@@ -1244,8 +1244,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1244
1244
  stackId: string;
1245
1245
  stateBackend: {
1246
1246
  type: "s3";
1247
- key: string;
1248
1247
  schemaVersion: "treeseed.hosted-state-backend/v1";
1248
+ key: string;
1249
1249
  teamId: string;
1250
1250
  environment: "production" | "staging";
1251
1251
  deploymentId: string;
@@ -1329,8 +1329,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1329
1329
  stackId: string;
1330
1330
  stateBackend: {
1331
1331
  type: "s3";
1332
- key: string;
1333
1332
  schemaVersion: "treeseed.hosted-state-backend/v1";
1333
+ key: string;
1334
1334
  teamId: string;
1335
1335
  environment: "production" | "staging";
1336
1336
  deploymentId: string;
@@ -1414,8 +1414,8 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1414
1414
  stackId: string;
1415
1415
  stateBackend: {
1416
1416
  type: "s3";
1417
- key: string;
1418
1417
  schemaVersion: "treeseed.hosted-state-backend/v1";
1418
+ key: string;
1419
1419
  teamId: string;
1420
1420
  environment: "production" | "staging";
1421
1421
  deploymentId: string;
@@ -1467,8 +1467,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1467
1467
  bindingDigest: z.ZodString;
1468
1468
  }, "strict", z.ZodTypeAny, {
1469
1469
  type: "s3";
1470
- key: string;
1471
1470
  schemaVersion: "treeseed.hosted-state-backend/v1";
1471
+ key: string;
1472
1472
  teamId: string;
1473
1473
  environment: "production" | "staging";
1474
1474
  deploymentId: string;
@@ -1482,8 +1482,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1482
1482
  usePathStyle?: boolean | undefined;
1483
1483
  }, {
1484
1484
  type: "s3";
1485
- key: string;
1486
1485
  schemaVersion: "treeseed.hosted-state-backend/v1";
1486
+ key: string;
1487
1487
  teamId: string;
1488
1488
  environment: "production" | "staging";
1489
1489
  deploymentId: string;
@@ -1497,8 +1497,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1497
1497
  usePathStyle?: boolean | undefined;
1498
1498
  }>, {
1499
1499
  type: "s3";
1500
- key: string;
1501
1500
  schemaVersion: "treeseed.hosted-state-backend/v1";
1501
+ key: string;
1502
1502
  teamId: string;
1503
1503
  environment: "production" | "staging";
1504
1504
  deploymentId: string;
@@ -1512,8 +1512,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1512
1512
  usePathStyle?: boolean | undefined;
1513
1513
  }, {
1514
1514
  type: "s3";
1515
- key: string;
1516
1515
  schemaVersion: "treeseed.hosted-state-backend/v1";
1516
+ key: string;
1517
1517
  teamId: string;
1518
1518
  environment: "production" | "staging";
1519
1519
  deploymentId: string;
@@ -1844,8 +1844,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1844
1844
  stackId: string;
1845
1845
  stateBackend: {
1846
1846
  type: "s3";
1847
- key: string;
1848
1847
  schemaVersion: "treeseed.hosted-state-backend/v1";
1848
+ key: string;
1849
1849
  teamId: string;
1850
1850
  environment: "production" | "staging";
1851
1851
  deploymentId: string;
@@ -1929,8 +1929,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1929
1929
  stackId: string;
1930
1930
  stateBackend: {
1931
1931
  type: "s3";
1932
- key: string;
1933
1932
  schemaVersion: "treeseed.hosted-state-backend/v1";
1933
+ key: string;
1934
1934
  teamId: string;
1935
1935
  environment: "production" | "staging";
1936
1936
  deploymentId: string;
@@ -2014,8 +2014,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
2014
2014
  stackId: string;
2015
2015
  stateBackend: {
2016
2016
  type: "s3";
2017
- key: string;
2018
2017
  schemaVersion: "treeseed.hosted-state-backend/v1";
2018
+ key: string;
2019
2019
  teamId: string;
2020
2020
  environment: "production" | "staging";
2021
2021
  deploymentId: string;
@@ -2099,8 +2099,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
2099
2099
  stackId: string;
2100
2100
  stateBackend: {
2101
2101
  type: "s3";
2102
- key: string;
2103
2102
  schemaVersion: "treeseed.hosted-state-backend/v1";
2103
+ key: string;
2104
2104
  teamId: string;
2105
2105
  environment: "production" | "staging";
2106
2106
  deploymentId: string;
@@ -1,6 +1,7 @@
1
1
  export * from './schemas.js';
2
2
  export * from './postgres/contracts.js';
3
3
  export * from './postgres/requirements.js';
4
+ export * from './postgres/transfer.js';
4
5
  export * from './canonical.js';
5
6
  export * from './catalog.js';
6
7
  export * from './topology.js';
@@ -1,6 +1,7 @@
1
1
  export * from "./schemas.js";
2
2
  export * from "./postgres/contracts.js";
3
3
  export * from "./postgres/requirements.js";
4
+ export * from "./postgres/transfer.js";
4
5
  export * from "./canonical.js";
5
6
  export * from "./catalog.js";
6
7
  export * from "./topology.js";
@@ -0,0 +1,97 @@
1
+ import { z } from 'zod';
2
+ /** Exact future activation selection, not permission to execute caller SQL or
3
+ * restart a source database. Deployment reattests retained source custody and
4
+ * performs transfer only inside coordinated backup/reconciliation. */
5
+ export declare const postgresTransitionSelectionSchema: z.ZodEffects<z.ZodObject<{
6
+ componentId: z.ZodString;
7
+ sourceRuntimeDigest: z.ZodString;
8
+ targetRuntimeDigest: z.ZodString;
9
+ topologyDigest: z.ZodString;
10
+ configurationDigest: z.ZodString;
11
+ allowLocaleConversion: z.ZodBoolean;
12
+ }, "strict", z.ZodTypeAny, {
13
+ configurationDigest: string;
14
+ componentId: string;
15
+ sourceRuntimeDigest: string;
16
+ targetRuntimeDigest: string;
17
+ topologyDigest: string;
18
+ allowLocaleConversion: boolean;
19
+ }, {
20
+ configurationDigest: string;
21
+ componentId: string;
22
+ sourceRuntimeDigest: string;
23
+ targetRuntimeDigest: string;
24
+ topologyDigest: string;
25
+ allowLocaleConversion: boolean;
26
+ }>, {
27
+ configurationDigest: string;
28
+ componentId: string;
29
+ sourceRuntimeDigest: string;
30
+ targetRuntimeDigest: string;
31
+ topologyDigest: string;
32
+ allowLocaleConversion: boolean;
33
+ }, {
34
+ configurationDigest: string;
35
+ componentId: string;
36
+ sourceRuntimeDigest: string;
37
+ targetRuntimeDigest: string;
38
+ topologyDigest: string;
39
+ allowLocaleConversion: boolean;
40
+ }>;
41
+ export type PostgresTransitionSelection = z.infer<typeof postgresTransitionSelectionSchema>;
42
+ export declare const postgresTransferPreparationResultSchema: z.ZodObject<{
43
+ action: z.ZodEnum<["planned", "prepared", "noop"]>;
44
+ selectionDigest: z.ZodString;
45
+ }, "strict", z.ZodTypeAny, {
46
+ action: "noop" | "planned" | "prepared";
47
+ selectionDigest: string;
48
+ }, {
49
+ action: "noop" | "planned" | "prepared";
50
+ selectionDigest: string;
51
+ }>;
52
+ /** Redacted durable status: no database contents, connection settings, paths,
53
+ * credentials or process output. A held transfer requires coordinated restore. */
54
+ export declare const postgresTransferRecordSchema: z.ZodObject<{
55
+ schemaVersion: z.ZodLiteral<"treeseed.postgres-transfer-journal/v1">;
56
+ intentDigest: z.ZodString;
57
+ restoreGeneration: z.ZodNumber;
58
+ restoreDigest: z.ZodString;
59
+ stage: z.ZodEnum<["fencing", "export", "restore", "verify", "switch", "activate", "accepted", "recovery-required", "rolled-back"]>;
60
+ archiveDigest: z.ZodOptional<z.ZodString>;
61
+ }, "strict", z.ZodTypeAny, {
62
+ schemaVersion: "treeseed.postgres-transfer-journal/v1";
63
+ intentDigest: string;
64
+ restoreGeneration: number;
65
+ restoreDigest: string;
66
+ stage: "verify" | "rolled-back" | "restore" | "fencing" | "export" | "switch" | "activate" | "accepted" | "recovery-required";
67
+ archiveDigest?: string | undefined;
68
+ }, {
69
+ schemaVersion: "treeseed.postgres-transfer-journal/v1";
70
+ intentDigest: string;
71
+ restoreGeneration: number;
72
+ restoreDigest: string;
73
+ stage: "verify" | "rolled-back" | "restore" | "fencing" | "export" | "switch" | "activate" | "accepted" | "recovery-required";
74
+ archiveDigest?: string | undefined;
75
+ }>;
76
+ export declare const postgresTransferStatusSchema: z.ZodNullable<z.ZodObject<{
77
+ schemaVersion: z.ZodLiteral<"treeseed.postgres-transfer-journal/v1">;
78
+ intentDigest: z.ZodString;
79
+ restoreGeneration: z.ZodNumber;
80
+ restoreDigest: z.ZodString;
81
+ stage: z.ZodEnum<["fencing", "export", "restore", "verify", "switch", "activate", "accepted", "recovery-required", "rolled-back"]>;
82
+ archiveDigest: z.ZodOptional<z.ZodString>;
83
+ }, "strict", z.ZodTypeAny, {
84
+ schemaVersion: "treeseed.postgres-transfer-journal/v1";
85
+ intentDigest: string;
86
+ restoreGeneration: number;
87
+ restoreDigest: string;
88
+ stage: "verify" | "rolled-back" | "restore" | "fencing" | "export" | "switch" | "activate" | "accepted" | "recovery-required";
89
+ archiveDigest?: string | undefined;
90
+ }, {
91
+ schemaVersion: "treeseed.postgres-transfer-journal/v1";
92
+ intentDigest: string;
93
+ restoreGeneration: number;
94
+ restoreDigest: string;
95
+ stage: "verify" | "rolled-back" | "restore" | "fencing" | "export" | "switch" | "activate" | "accepted" | "recovery-required";
96
+ archiveDigest?: string | undefined;
97
+ }>>;
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
3
+ const postgresTransitionSelectionSchema = z.object({
4
+ componentId: z.string().regex(/^[a-z][a-z0-9.-]{0,127}$/u),
5
+ sourceRuntimeDigest: digest,
6
+ targetRuntimeDigest: digest,
7
+ topologyDigest: digest,
8
+ configurationDigest: digest,
9
+ allowLocaleConversion: z.boolean()
10
+ }).strict().refine((value) => value.sourceRuntimeDigest !== value.targetRuntimeDigest, "Distinct source and target runtimes required");
11
+ const postgresTransferPreparationResultSchema = z.object({
12
+ action: z.enum(["planned", "prepared", "noop"]),
13
+ selectionDigest: digest
14
+ }).strict();
15
+ const postgresTransferRecordSchema = z.object({
16
+ schemaVersion: z.literal("treeseed.postgres-transfer-journal/v1"),
17
+ intentDigest: digest,
18
+ restoreGeneration: z.number().int().positive().safe(),
19
+ restoreDigest: digest,
20
+ stage: z.enum(["fencing", "export", "restore", "verify", "switch", "activate", "accepted", "recovery-required", "rolled-back"]),
21
+ archiveDigest: digest.optional()
22
+ }).strict();
23
+ const postgresTransferStatusSchema = postgresTransferRecordSchema.nullable();
24
+ export {
25
+ postgresTransferPreparationResultSchema,
26
+ postgresTransferRecordSchema,
27
+ postgresTransferStatusSchema,
28
+ postgresTransitionSelectionSchema
29
+ };