@treeseed/sdk 0.13.0-rc.106 → 0.13.0-rc.107
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.
- package/dist/.treeseed-build-complete.json +1 -1
- package/dist/capacity-provider/capability-ontology.d.ts +6 -6
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +4 -4
- package/dist/deployment/ai/storage.d.ts +10 -10
- package/dist/deployment/ai-mode.d.ts +10 -10
- package/dist/deployment/hosted-topology.d.ts +2 -2
- package/dist/deployment/schemas.d.ts +12 -12
- package/dist/identity/browser-session.d.ts +233 -0
- package/dist/identity/browser-session.js +51 -0
- package/dist/identity/index.d.ts +1 -0
- package/dist/identity/index.js +1 -0
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +1 -1
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +1 -1
- package/dist/operator-contracts/control-plane-operations.d.ts +2 -2
- package/dist/operator-contracts/knowledge/contracts.d.ts +2 -2
- package/dist/platform/contracts.d.ts +6 -6
- package/dist/secrets-capability/shared-resources.d.ts +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"completedAt":"2026-09-
|
|
1
|
+
{"completedAt":"2026-09-09T10:44:07.411Z"}
|
|
@@ -816,10 +816,10 @@ export declare const capabilityConformanceSchema: z.ZodObject<{
|
|
|
816
816
|
}>;
|
|
817
817
|
}, "strict", z.ZodTypeAny, {
|
|
818
818
|
status: "revoked" | "passed" | "failed";
|
|
819
|
+
expiresAt: string | null;
|
|
819
820
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
820
821
|
providerId: string;
|
|
821
822
|
issuedAt: string;
|
|
822
|
-
expiresAt: string | null;
|
|
823
823
|
capability: {
|
|
824
824
|
id: string;
|
|
825
825
|
version: string;
|
|
@@ -838,10 +838,10 @@ export declare const capabilityConformanceSchema: z.ZodObject<{
|
|
|
838
838
|
evidenceDigest: string;
|
|
839
839
|
}, {
|
|
840
840
|
status: "revoked" | "passed" | "failed";
|
|
841
|
+
expiresAt: string | null;
|
|
841
842
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
842
843
|
providerId: string;
|
|
843
844
|
issuedAt: string;
|
|
844
|
-
expiresAt: string | null;
|
|
845
845
|
capability: {
|
|
846
846
|
id: string;
|
|
847
847
|
version: string;
|
|
@@ -1089,10 +1089,10 @@ export declare const capabilityOfferSchema: z.ZodObject<{
|
|
|
1089
1089
|
}>;
|
|
1090
1090
|
}, "strict", z.ZodTypeAny, {
|
|
1091
1091
|
status: "revoked" | "passed" | "failed";
|
|
1092
|
+
expiresAt: string | null;
|
|
1092
1093
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
1093
1094
|
providerId: string;
|
|
1094
1095
|
issuedAt: string;
|
|
1095
|
-
expiresAt: string | null;
|
|
1096
1096
|
capability: {
|
|
1097
1097
|
id: string;
|
|
1098
1098
|
version: string;
|
|
@@ -1111,10 +1111,10 @@ export declare const capabilityOfferSchema: z.ZodObject<{
|
|
|
1111
1111
|
evidenceDigest: string;
|
|
1112
1112
|
}, {
|
|
1113
1113
|
status: "revoked" | "passed" | "failed";
|
|
1114
|
+
expiresAt: string | null;
|
|
1114
1115
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
1115
1116
|
providerId: string;
|
|
1116
1117
|
issuedAt: string;
|
|
1117
|
-
expiresAt: string | null;
|
|
1118
1118
|
capability: {
|
|
1119
1119
|
id: string;
|
|
1120
1120
|
version: string;
|
|
@@ -1300,10 +1300,10 @@ export declare const capabilityOfferSchema: z.ZodObject<{
|
|
|
1300
1300
|
}>;
|
|
1301
1301
|
conformance: {
|
|
1302
1302
|
status: "revoked" | "passed" | "failed";
|
|
1303
|
+
expiresAt: string | null;
|
|
1303
1304
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
1304
1305
|
providerId: string;
|
|
1305
1306
|
issuedAt: string;
|
|
1306
|
-
expiresAt: string | null;
|
|
1307
1307
|
capability: {
|
|
1308
1308
|
id: string;
|
|
1309
1309
|
version: string;
|
|
@@ -1381,10 +1381,10 @@ export declare const capabilityOfferSchema: z.ZodObject<{
|
|
|
1381
1381
|
}>;
|
|
1382
1382
|
conformance: {
|
|
1383
1383
|
status: "revoked" | "passed" | "failed";
|
|
1384
|
+
expiresAt: string | null;
|
|
1384
1385
|
schemaVersion: "treeseed.capability-conformance/v1";
|
|
1385
1386
|
providerId: string;
|
|
1386
1387
|
issuedAt: string;
|
|
1387
|
-
expiresAt: string | null;
|
|
1388
1388
|
capability: {
|
|
1389
1389
|
id: string;
|
|
1390
1390
|
version: string;
|
|
@@ -156,12 +156,12 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodEffects<z.ZodObject<
|
|
|
156
156
|
issuedAt: z.ZodString;
|
|
157
157
|
expiresAt: z.ZodString;
|
|
158
158
|
}, "strict", z.ZodTypeAny, {
|
|
159
|
+
expiresAt: string;
|
|
159
160
|
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
160
161
|
projectId: string;
|
|
161
162
|
teamId: string;
|
|
162
163
|
providerId: string;
|
|
163
164
|
issuedAt: string;
|
|
164
|
-
expiresAt: string;
|
|
165
165
|
variables: string[];
|
|
166
166
|
assignmentId: string;
|
|
167
167
|
profileId: string;
|
|
@@ -179,12 +179,12 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodEffects<z.ZodObject<
|
|
|
179
179
|
};
|
|
180
180
|
grantId: string;
|
|
181
181
|
}, {
|
|
182
|
+
expiresAt: string;
|
|
182
183
|
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
183
184
|
projectId: string;
|
|
184
185
|
teamId: string;
|
|
185
186
|
providerId: string;
|
|
186
187
|
issuedAt: string;
|
|
187
|
-
expiresAt: string;
|
|
188
188
|
variables: string[];
|
|
189
189
|
assignmentId: string;
|
|
190
190
|
profileId: string;
|
|
@@ -202,12 +202,12 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodEffects<z.ZodObject<
|
|
|
202
202
|
};
|
|
203
203
|
grantId: string;
|
|
204
204
|
}>, {
|
|
205
|
+
expiresAt: string;
|
|
205
206
|
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
206
207
|
projectId: string;
|
|
207
208
|
teamId: string;
|
|
208
209
|
providerId: string;
|
|
209
210
|
issuedAt: string;
|
|
210
|
-
expiresAt: string;
|
|
211
211
|
variables: string[];
|
|
212
212
|
assignmentId: string;
|
|
213
213
|
profileId: string;
|
|
@@ -225,12 +225,12 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodEffects<z.ZodObject<
|
|
|
225
225
|
};
|
|
226
226
|
grantId: string;
|
|
227
227
|
}, {
|
|
228
|
+
expiresAt: string;
|
|
228
229
|
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
229
230
|
projectId: string;
|
|
230
231
|
teamId: string;
|
|
231
232
|
providerId: string;
|
|
232
233
|
issuedAt: string;
|
|
233
|
-
expiresAt: string;
|
|
234
234
|
variables: string[];
|
|
235
235
|
assignmentId: string;
|
|
236
236
|
profileId: string;
|
|
@@ -23,46 +23,46 @@ export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23
23
|
nonce: z.ZodString;
|
|
24
24
|
}, "strict", z.ZodTypeAny, {
|
|
25
25
|
service: "inference" | "training" | "lab";
|
|
26
|
+
nonce: string;
|
|
26
27
|
key: string;
|
|
27
28
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
28
29
|
action: "read" | "write" | "list" | "delete";
|
|
29
30
|
projectId: string;
|
|
30
31
|
teamId: string;
|
|
31
32
|
issuedAt: number;
|
|
32
|
-
nonce: string;
|
|
33
33
|
nodeId: string;
|
|
34
34
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
35
35
|
}, {
|
|
36
36
|
service: "inference" | "training" | "lab";
|
|
37
|
+
nonce: string;
|
|
37
38
|
key: string;
|
|
38
39
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
39
40
|
action: "read" | "write" | "list" | "delete";
|
|
40
41
|
projectId: string;
|
|
41
42
|
teamId: string;
|
|
42
43
|
issuedAt: number;
|
|
43
|
-
nonce: string;
|
|
44
44
|
nodeId: string;
|
|
45
45
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
46
46
|
}>, {
|
|
47
47
|
service: "inference" | "training" | "lab";
|
|
48
|
+
nonce: string;
|
|
48
49
|
key: string;
|
|
49
50
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
50
51
|
action: "read" | "write" | "list" | "delete";
|
|
51
52
|
projectId: string;
|
|
52
53
|
teamId: string;
|
|
53
54
|
issuedAt: number;
|
|
54
|
-
nonce: string;
|
|
55
55
|
nodeId: string;
|
|
56
56
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
57
57
|
}, {
|
|
58
58
|
service: "inference" | "training" | "lab";
|
|
59
|
+
nonce: string;
|
|
59
60
|
key: string;
|
|
60
61
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
61
62
|
action: "read" | "write" | "list" | "delete";
|
|
62
63
|
projectId: string;
|
|
63
64
|
teamId: string;
|
|
64
65
|
issuedAt: number;
|
|
65
|
-
nonce: string;
|
|
66
66
|
nodeId: string;
|
|
67
67
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
68
68
|
}>;
|
|
@@ -81,46 +81,46 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
|
|
|
81
81
|
nonce: z.ZodString;
|
|
82
82
|
}, "strict", z.ZodTypeAny, {
|
|
83
83
|
service: "inference" | "training" | "lab";
|
|
84
|
+
nonce: string;
|
|
84
85
|
key: string;
|
|
85
86
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
86
87
|
action: "read" | "write" | "list" | "delete";
|
|
87
88
|
projectId: string;
|
|
88
89
|
teamId: string;
|
|
89
90
|
issuedAt: number;
|
|
90
|
-
nonce: string;
|
|
91
91
|
nodeId: string;
|
|
92
92
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
93
93
|
}, {
|
|
94
94
|
service: "inference" | "training" | "lab";
|
|
95
|
+
nonce: string;
|
|
95
96
|
key: string;
|
|
96
97
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
97
98
|
action: "read" | "write" | "list" | "delete";
|
|
98
99
|
projectId: string;
|
|
99
100
|
teamId: string;
|
|
100
101
|
issuedAt: number;
|
|
101
|
-
nonce: string;
|
|
102
102
|
nodeId: string;
|
|
103
103
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
104
104
|
}>, {
|
|
105
105
|
service: "inference" | "training" | "lab";
|
|
106
|
+
nonce: string;
|
|
106
107
|
key: string;
|
|
107
108
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
108
109
|
action: "read" | "write" | "list" | "delete";
|
|
109
110
|
projectId: string;
|
|
110
111
|
teamId: string;
|
|
111
112
|
issuedAt: number;
|
|
112
|
-
nonce: string;
|
|
113
113
|
nodeId: string;
|
|
114
114
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
115
115
|
}, {
|
|
116
116
|
service: "inference" | "training" | "lab";
|
|
117
|
+
nonce: string;
|
|
117
118
|
key: string;
|
|
118
119
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
119
120
|
action: "read" | "write" | "list" | "delete";
|
|
120
121
|
projectId: string;
|
|
121
122
|
teamId: string;
|
|
122
123
|
issuedAt: number;
|
|
123
|
-
nonce: string;
|
|
124
124
|
nodeId: string;
|
|
125
125
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
126
126
|
}>;
|
|
@@ -128,13 +128,13 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
|
|
|
128
128
|
}, "strict", z.ZodTypeAny, {
|
|
129
129
|
proof: {
|
|
130
130
|
service: "inference" | "training" | "lab";
|
|
131
|
+
nonce: string;
|
|
131
132
|
key: string;
|
|
132
133
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
133
134
|
action: "read" | "write" | "list" | "delete";
|
|
134
135
|
projectId: string;
|
|
135
136
|
teamId: string;
|
|
136
137
|
issuedAt: number;
|
|
137
|
-
nonce: string;
|
|
138
138
|
nodeId: string;
|
|
139
139
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
140
140
|
};
|
|
@@ -142,13 +142,13 @@ export declare const aiStorageRequestSchema: z.ZodObject<{
|
|
|
142
142
|
}, {
|
|
143
143
|
proof: {
|
|
144
144
|
service: "inference" | "training" | "lab";
|
|
145
|
+
nonce: string;
|
|
145
146
|
key: string;
|
|
146
147
|
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
147
148
|
action: "read" | "write" | "list" | "delete";
|
|
148
149
|
projectId: string;
|
|
149
150
|
teamId: string;
|
|
150
151
|
issuedAt: number;
|
|
151
|
-
nonce: string;
|
|
152
152
|
nodeId: string;
|
|
153
153
|
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
154
154
|
};
|
|
@@ -79,13 +79,13 @@ export declare const aiModeTransitionReceiptSchema: z.ZodObject<{
|
|
|
79
79
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
80
80
|
}, "strict", z.ZodTypeAny, {
|
|
81
81
|
resource: "ai-gpu";
|
|
82
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
82
83
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
83
84
|
steps: {
|
|
84
85
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
85
86
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
86
87
|
completedAt: string | null;
|
|
87
88
|
}[];
|
|
88
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
89
89
|
completedAt: string | null;
|
|
90
90
|
idempotencyKey: string;
|
|
91
91
|
transitionId: string;
|
|
@@ -100,13 +100,13 @@ export declare const aiModeTransitionReceiptSchema: z.ZodObject<{
|
|
|
100
100
|
startedAt: string;
|
|
101
101
|
}, {
|
|
102
102
|
resource: "ai-gpu";
|
|
103
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
103
104
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
104
105
|
steps: {
|
|
105
106
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
106
107
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
107
108
|
completedAt: string | null;
|
|
108
109
|
}[];
|
|
109
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
110
110
|
completedAt: string | null;
|
|
111
111
|
idempotencyKey: string;
|
|
112
112
|
transitionId: string;
|
|
@@ -172,13 +172,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
172
172
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
173
173
|
}, "strict", z.ZodTypeAny, {
|
|
174
174
|
resource: "ai-gpu";
|
|
175
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
175
176
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
176
177
|
steps: {
|
|
177
178
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
178
179
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
179
180
|
completedAt: string | null;
|
|
180
181
|
}[];
|
|
181
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
182
182
|
completedAt: string | null;
|
|
183
183
|
idempotencyKey: string;
|
|
184
184
|
transitionId: string;
|
|
@@ -193,13 +193,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
193
193
|
startedAt: string;
|
|
194
194
|
}, {
|
|
195
195
|
resource: "ai-gpu";
|
|
196
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
196
197
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
197
198
|
steps: {
|
|
198
199
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
199
200
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
200
201
|
completedAt: string | null;
|
|
201
202
|
}[];
|
|
202
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
203
203
|
completedAt: string | null;
|
|
204
204
|
idempotencyKey: string;
|
|
205
205
|
transitionId: string;
|
|
@@ -250,13 +250,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
250
250
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
251
251
|
}, "strict", z.ZodTypeAny, {
|
|
252
252
|
resource: "ai-gpu";
|
|
253
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
253
254
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
254
255
|
steps: {
|
|
255
256
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
256
257
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
257
258
|
completedAt: string | null;
|
|
258
259
|
}[];
|
|
259
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
260
260
|
completedAt: string | null;
|
|
261
261
|
idempotencyKey: string;
|
|
262
262
|
transitionId: string;
|
|
@@ -271,13 +271,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
271
271
|
startedAt: string;
|
|
272
272
|
}, {
|
|
273
273
|
resource: "ai-gpu";
|
|
274
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
274
275
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
275
276
|
steps: {
|
|
276
277
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
277
278
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
278
279
|
completedAt: string | null;
|
|
279
280
|
}[];
|
|
280
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
281
281
|
completedAt: string | null;
|
|
282
282
|
idempotencyKey: string;
|
|
283
283
|
transitionId: string;
|
|
@@ -302,13 +302,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
302
302
|
} | null;
|
|
303
303
|
activeTransition: {
|
|
304
304
|
resource: "ai-gpu";
|
|
305
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
305
306
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
306
307
|
steps: {
|
|
307
308
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
308
309
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
309
310
|
completedAt: string | null;
|
|
310
311
|
}[];
|
|
311
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
312
312
|
completedAt: string | null;
|
|
313
313
|
idempotencyKey: string;
|
|
314
314
|
transitionId: string;
|
|
@@ -324,13 +324,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
324
324
|
} | null;
|
|
325
325
|
lastReceipt: {
|
|
326
326
|
resource: "ai-gpu";
|
|
327
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
327
328
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
328
329
|
steps: {
|
|
329
330
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
330
331
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
331
332
|
completedAt: string | null;
|
|
332
333
|
}[];
|
|
333
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
334
334
|
completedAt: string | null;
|
|
335
335
|
idempotencyKey: string;
|
|
336
336
|
transitionId: string;
|
|
@@ -355,13 +355,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
355
355
|
} | null;
|
|
356
356
|
activeTransition: {
|
|
357
357
|
resource: "ai-gpu";
|
|
358
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
358
359
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
359
360
|
steps: {
|
|
360
361
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
361
362
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
362
363
|
completedAt: string | null;
|
|
363
364
|
}[];
|
|
364
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
365
365
|
completedAt: string | null;
|
|
366
366
|
idempotencyKey: string;
|
|
367
367
|
transitionId: string;
|
|
@@ -377,13 +377,13 @@ export declare const aiModeStatusSchema: z.ZodObject<{
|
|
|
377
377
|
} | null;
|
|
378
378
|
lastReceipt: {
|
|
379
379
|
resource: "ai-gpu";
|
|
380
|
+
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
380
381
|
schemaVersion: "treeseed.ai-mode-transition-receipt/v1";
|
|
381
382
|
steps: {
|
|
382
383
|
id: "close-inference" | "drain-inference" | "stop-vllm" | "start-training" | "open-training" | "close-training" | "drain-training" | "stop-training" | "start-vllm" | "warm-vllm" | "open-inference" | "rollback";
|
|
383
384
|
state: "pending" | "failed" | "running" | "succeeded" | "skipped";
|
|
384
385
|
completedAt: string | null;
|
|
385
386
|
}[];
|
|
386
|
-
state: "degraded" | "running" | "succeeded" | "planned" | "postponed" | "rolled-back";
|
|
387
387
|
completedAt: string | null;
|
|
388
388
|
idempotencyKey: string;
|
|
389
389
|
transitionId: string;
|
|
@@ -2193,6 +2193,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
|
|
|
2193
2193
|
state: z.ZodLiteral<"known-good">;
|
|
2194
2194
|
completedAt: z.ZodString;
|
|
2195
2195
|
}, "strict", z.ZodTypeAny, {
|
|
2196
|
+
state: "known-good";
|
|
2196
2197
|
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
2197
2198
|
resources: {
|
|
2198
2199
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
@@ -2206,7 +2207,6 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
|
|
|
2206
2207
|
}[];
|
|
2207
2208
|
planDigest: string;
|
|
2208
2209
|
teamId: string;
|
|
2209
|
-
state: "known-good";
|
|
2210
2210
|
environment: "production" | "staging";
|
|
2211
2211
|
completedAt: string;
|
|
2212
2212
|
receiptId: string;
|
|
@@ -2227,6 +2227,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
|
|
|
2227
2227
|
observedAt: string;
|
|
2228
2228
|
}[];
|
|
2229
2229
|
}, {
|
|
2230
|
+
state: "known-good";
|
|
2230
2231
|
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
2231
2232
|
resources: {
|
|
2232
2233
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
@@ -2240,7 +2241,6 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
|
|
|
2240
2241
|
}[];
|
|
2241
2242
|
planDigest: string;
|
|
2242
2243
|
teamId: string;
|
|
2243
|
-
state: "known-good";
|
|
2244
2244
|
environment: "production" | "staging";
|
|
2245
2245
|
completedAt: string;
|
|
2246
2246
|
receiptId: string;
|
|
@@ -8222,6 +8222,7 @@ export declare const hostUpdateSchema: z.ZodObject<{
|
|
|
8222
8222
|
}>;
|
|
8223
8223
|
state: z.ZodEnum<["planned", "draining", "applying", "healthy", "failed", "rolled-back"]>;
|
|
8224
8224
|
}, "strict", z.ZodTypeAny, {
|
|
8225
|
+
state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
|
|
8225
8226
|
schemaVersion: "treeseed.host-update/v1";
|
|
8226
8227
|
components: {
|
|
8227
8228
|
from: string | null;
|
|
@@ -8229,7 +8230,6 @@ export declare const hostUpdateSchema: z.ZodObject<{
|
|
|
8229
8230
|
componentId: string;
|
|
8230
8231
|
imageDigests: string[];
|
|
8231
8232
|
}[];
|
|
8232
|
-
state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
|
|
8233
8233
|
activation: {
|
|
8234
8234
|
policy: "maintenance-window" | "continuous";
|
|
8235
8235
|
eligibleAt: string;
|
|
@@ -8240,6 +8240,7 @@ export declare const hostUpdateSchema: z.ZodObject<{
|
|
|
8240
8240
|
fromCatalogDigest: string;
|
|
8241
8241
|
toCatalogDigest: string;
|
|
8242
8242
|
}, {
|
|
8243
|
+
state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
|
|
8243
8244
|
schemaVersion: "treeseed.host-update/v1";
|
|
8244
8245
|
components: {
|
|
8245
8246
|
from: string | null;
|
|
@@ -8247,7 +8248,6 @@ export declare const hostUpdateSchema: z.ZodObject<{
|
|
|
8247
8248
|
componentId: string;
|
|
8248
8249
|
imageDigests: string[];
|
|
8249
8250
|
}[];
|
|
8250
|
-
state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
|
|
8251
8251
|
activation: {
|
|
8252
8252
|
policy: "maintenance-window" | "continuous";
|
|
8253
8253
|
eligibleAt: string;
|
|
@@ -8321,9 +8321,9 @@ export declare const hostReceiptSchema: z.ZodObject<{
|
|
|
8321
8321
|
}>, "many">;
|
|
8322
8322
|
completedAt: z.ZodString;
|
|
8323
8323
|
}, "strict", z.ZodTypeAny, {
|
|
8324
|
+
state: "degraded" | "rolled-back" | "known-good";
|
|
8324
8325
|
role: string;
|
|
8325
8326
|
schemaVersion: "treeseed.host-receipt/v1";
|
|
8326
|
-
state: "degraded" | "rolled-back" | "known-good";
|
|
8327
8327
|
packages: {
|
|
8328
8328
|
version: string;
|
|
8329
8329
|
name: string;
|
|
@@ -8351,9 +8351,9 @@ export declare const hostReceiptSchema: z.ZodObject<{
|
|
|
8351
8351
|
runtimeDigest: string;
|
|
8352
8352
|
}[];
|
|
8353
8353
|
}, {
|
|
8354
|
+
state: "degraded" | "rolled-back" | "known-good";
|
|
8354
8355
|
role: string;
|
|
8355
8356
|
schemaVersion: "treeseed.host-receipt/v1";
|
|
8356
|
-
state: "degraded" | "rolled-back" | "known-good";
|
|
8357
8357
|
packages: {
|
|
8358
8358
|
version: string;
|
|
8359
8359
|
name: string;
|
|
@@ -8406,8 +8406,8 @@ export declare const hostBackupSchema: z.ZodObject<{
|
|
|
8406
8406
|
createdAt: z.ZodString;
|
|
8407
8407
|
verifiedAt: z.ZodNullable<z.ZodString>;
|
|
8408
8408
|
}, "strict", z.ZodTypeAny, {
|
|
8409
|
-
schemaVersion: "treeseed.host-backup/v1";
|
|
8410
8409
|
state: "pending" | "failed" | "complete" | "verified";
|
|
8410
|
+
schemaVersion: "treeseed.host-backup/v1";
|
|
8411
8411
|
createdAt: string;
|
|
8412
8412
|
artifacts: {
|
|
8413
8413
|
digest: string;
|
|
@@ -8420,8 +8420,8 @@ export declare const hostBackupSchema: z.ZodObject<{
|
|
|
8420
8420
|
backupId: string;
|
|
8421
8421
|
verifiedAt: string | null;
|
|
8422
8422
|
}, {
|
|
8423
|
-
schemaVersion: "treeseed.host-backup/v1";
|
|
8424
8423
|
state: "pending" | "failed" | "complete" | "verified";
|
|
8424
|
+
schemaVersion: "treeseed.host-backup/v1";
|
|
8425
8425
|
createdAt: string;
|
|
8426
8426
|
artifacts: {
|
|
8427
8427
|
digest: string;
|
|
@@ -8446,8 +8446,8 @@ export declare const hostMigrationSchema: z.ZodObject<{
|
|
|
8446
8446
|
sourceWritersStopped: z.ZodBoolean;
|
|
8447
8447
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
8448
8448
|
}, "strict", z.ZodTypeAny, {
|
|
8449
|
-
schemaVersion: "treeseed.host-migration/v1";
|
|
8450
8449
|
state: "pending" | "failed" | "rolled-back" | "verified" | "quiesced" | "copied" | "activated";
|
|
8450
|
+
schemaVersion: "treeseed.host-migration/v1";
|
|
8451
8451
|
operation: string;
|
|
8452
8452
|
completedAt: string | null;
|
|
8453
8453
|
componentId: string;
|
|
@@ -8457,8 +8457,8 @@ export declare const hostMigrationSchema: z.ZodObject<{
|
|
|
8457
8457
|
toGeneration: number;
|
|
8458
8458
|
sourceWritersStopped: boolean;
|
|
8459
8459
|
}, {
|
|
8460
|
-
schemaVersion: "treeseed.host-migration/v1";
|
|
8461
8460
|
state: "pending" | "failed" | "rolled-back" | "verified" | "quiesced" | "copied" | "activated";
|
|
8461
|
+
schemaVersion: "treeseed.host-migration/v1";
|
|
8462
8462
|
operation: string;
|
|
8463
8463
|
completedAt: string | null;
|
|
8464
8464
|
componentId: string;
|
|
@@ -8480,9 +8480,9 @@ export declare const hostRecoverySchema: z.ZodObject<{
|
|
|
8480
8480
|
backupId: z.ZodNullable<z.ZodString>;
|
|
8481
8481
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
8482
8482
|
}, "strict", z.ZodTypeAny, {
|
|
8483
|
+
state: "pending" | "failed" | "running" | "healthy";
|
|
8483
8484
|
schemaVersion: "treeseed.host-recovery/v1";
|
|
8484
8485
|
action: "rollback" | "retry" | "restore";
|
|
8485
|
-
state: "pending" | "failed" | "running" | "healthy";
|
|
8486
8486
|
completedAt: string | null;
|
|
8487
8487
|
componentId: string | null;
|
|
8488
8488
|
receiptId: string;
|
|
@@ -8491,9 +8491,9 @@ export declare const hostRecoverySchema: z.ZodObject<{
|
|
|
8491
8491
|
trigger: "operator" | "health-gate" | "boot" | "interrupted-update";
|
|
8492
8492
|
targetGeneration: number;
|
|
8493
8493
|
}, {
|
|
8494
|
+
state: "pending" | "failed" | "running" | "healthy";
|
|
8494
8495
|
schemaVersion: "treeseed.host-recovery/v1";
|
|
8495
8496
|
action: "rollback" | "retry" | "restore";
|
|
8496
|
-
state: "pending" | "failed" | "running" | "healthy";
|
|
8497
8497
|
completedAt: string | null;
|
|
8498
8498
|
componentId: string | null;
|
|
8499
8499
|
receiptId: string;
|
|
@@ -8580,8 +8580,8 @@ export declare const hostSecurityReceiptSchema: z.ZodObject<{
|
|
|
8580
8580
|
activeDiagnosticsVersion: number;
|
|
8581
8581
|
recoveryBundleVerified: boolean;
|
|
8582
8582
|
};
|
|
8583
|
-
schemaVersion: "treeseed.host-security-receipt/v1";
|
|
8584
8583
|
state: "blocked" | "planned" | "known-good" | "migrating";
|
|
8584
|
+
schemaVersion: "treeseed.host-security-receipt/v1";
|
|
8585
8585
|
hostId: string;
|
|
8586
8586
|
completedAt: string;
|
|
8587
8587
|
sandbox: {
|
|
@@ -8604,8 +8604,8 @@ export declare const hostSecurityReceiptSchema: z.ZodObject<{
|
|
|
8604
8604
|
activeDiagnosticsVersion: number;
|
|
8605
8605
|
recoveryBundleVerified: boolean;
|
|
8606
8606
|
};
|
|
8607
|
-
schemaVersion: "treeseed.host-security-receipt/v1";
|
|
8608
8607
|
state: "blocked" | "planned" | "known-good" | "migrating";
|
|
8608
|
+
schemaVersion: "treeseed.host-security-receipt/v1";
|
|
8609
8609
|
hostId: string;
|
|
8610
8610
|
completedAt: string;
|
|
8611
8611
|
sandbox: {
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Encrypted, single-use server-side state; never an application cookie value. */
|
|
3
|
+
export declare const browserLoginTransactionSchema: z.ZodObject<{
|
|
4
|
+
state: z.ZodString;
|
|
5
|
+
nonce: z.ZodString;
|
|
6
|
+
verifier: z.ZodString;
|
|
7
|
+
expiresAt: z.ZodNumber;
|
|
8
|
+
issuer: z.ZodEffects<z.ZodString, string, string>;
|
|
9
|
+
clientId: z.ZodString;
|
|
10
|
+
redirectUri: z.ZodEffects<z.ZodString, string, string>;
|
|
11
|
+
resource: z.ZodEffects<z.ZodString, string, string>;
|
|
12
|
+
scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
13
|
+
}, "strict", z.ZodTypeAny, {
|
|
14
|
+
issuer: string;
|
|
15
|
+
resource: string;
|
|
16
|
+
scopes: string[];
|
|
17
|
+
clientId: string;
|
|
18
|
+
state: string;
|
|
19
|
+
nonce: string;
|
|
20
|
+
verifier: string;
|
|
21
|
+
expiresAt: number;
|
|
22
|
+
redirectUri: string;
|
|
23
|
+
}, {
|
|
24
|
+
issuer: string;
|
|
25
|
+
resource: string;
|
|
26
|
+
scopes: string[];
|
|
27
|
+
clientId: string;
|
|
28
|
+
state: string;
|
|
29
|
+
nonce: string;
|
|
30
|
+
verifier: string;
|
|
31
|
+
expiresAt: number;
|
|
32
|
+
redirectUri: string;
|
|
33
|
+
}>;
|
|
34
|
+
export type BrowserLoginTransaction = z.infer<typeof browserLoginTransactionSchema>;
|
|
35
|
+
/** Private BFF protocol, authenticated with a registered application workload.
|
|
36
|
+
* These operations are not user/browser or agent-tool credential endpoints.
|
|
37
|
+
* The server chooses the app namespace from authentication, not request fields.
|
|
38
|
+
*/
|
|
39
|
+
export declare const BROWSER_SESSION_BRIDGE_PATH = "/internal/identity/browser/v1";
|
|
40
|
+
export declare const BROWSER_SESSION_PERMISSION = "identity:sessions:manage";
|
|
41
|
+
export declare const BROWSER_SESSION_SCOPE = "treeseed:identity:sessions";
|
|
42
|
+
export declare const browserSessionRequests: {
|
|
43
|
+
begin: z.ZodObject<{
|
|
44
|
+
browserBinding: z.ZodString;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
browserBinding: string;
|
|
47
|
+
}, {
|
|
48
|
+
browserBinding: string;
|
|
49
|
+
}>;
|
|
50
|
+
finish: z.ZodObject<{
|
|
51
|
+
browserBinding: z.ZodString;
|
|
52
|
+
callback: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
}, "strict", z.ZodTypeAny, {
|
|
54
|
+
browserBinding: string;
|
|
55
|
+
callback: string;
|
|
56
|
+
}, {
|
|
57
|
+
browserBinding: string;
|
|
58
|
+
callback: string;
|
|
59
|
+
}>;
|
|
60
|
+
credentials: z.ZodObject<{
|
|
61
|
+
handle: z.ZodString;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
handle: string;
|
|
64
|
+
}, {
|
|
65
|
+
handle: string;
|
|
66
|
+
}>;
|
|
67
|
+
logout: z.ZodObject<{
|
|
68
|
+
handle: z.ZodString;
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
|
+
handle: string;
|
|
71
|
+
}, {
|
|
72
|
+
handle: string;
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
export declare const browserSessionResponses: {
|
|
76
|
+
begin: z.ZodObject<{
|
|
77
|
+
authorizationUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
78
|
+
}, "strict", z.ZodTypeAny, {
|
|
79
|
+
authorizationUrl: string;
|
|
80
|
+
}, {
|
|
81
|
+
authorizationUrl: string;
|
|
82
|
+
}>;
|
|
83
|
+
finish: z.ZodObject<{
|
|
84
|
+
handle: z.ZodString;
|
|
85
|
+
expiresAt: z.ZodString;
|
|
86
|
+
}, "strict", z.ZodTypeAny, {
|
|
87
|
+
expiresAt: string;
|
|
88
|
+
handle: string;
|
|
89
|
+
}, {
|
|
90
|
+
expiresAt: string;
|
|
91
|
+
handle: string;
|
|
92
|
+
}>;
|
|
93
|
+
credentials: z.ZodEffects<z.ZodObject<{
|
|
94
|
+
accessToken: z.ZodString;
|
|
95
|
+
resource: z.ZodEffects<z.ZodString, string, string>;
|
|
96
|
+
expiresAt: z.ZodNumber;
|
|
97
|
+
principal: z.ZodObject<{
|
|
98
|
+
principalId: z.ZodEffects<z.ZodString, string, string>;
|
|
99
|
+
kind: z.ZodEnum<["human", "service", "provider", "agent"]>;
|
|
100
|
+
identity: z.ZodObject<{
|
|
101
|
+
issuer: z.ZodEffects<z.ZodString, string, string>;
|
|
102
|
+
subject: z.ZodEffects<z.ZodString, string, string>;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
issuer: string;
|
|
105
|
+
subject: string;
|
|
106
|
+
}, {
|
|
107
|
+
issuer: string;
|
|
108
|
+
subject: string;
|
|
109
|
+
}>;
|
|
110
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
issuer: z.ZodEffects<z.ZodString, string, string>;
|
|
112
|
+
subject: z.ZodEffects<z.ZodString, string, string>;
|
|
113
|
+
}, "strict", z.ZodTypeAny, {
|
|
114
|
+
issuer: string;
|
|
115
|
+
subject: string;
|
|
116
|
+
}, {
|
|
117
|
+
issuer: string;
|
|
118
|
+
subject: string;
|
|
119
|
+
}>>;
|
|
120
|
+
audience: z.ZodEffects<z.ZodString, string, string>;
|
|
121
|
+
scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
122
|
+
}, "strict", z.ZodTypeAny, {
|
|
123
|
+
scopes: string[];
|
|
124
|
+
identity: {
|
|
125
|
+
issuer: string;
|
|
126
|
+
subject: string;
|
|
127
|
+
};
|
|
128
|
+
principalId: string;
|
|
129
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
130
|
+
audience: string;
|
|
131
|
+
actor?: {
|
|
132
|
+
issuer: string;
|
|
133
|
+
subject: string;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
scopes: string[];
|
|
137
|
+
identity: {
|
|
138
|
+
issuer: string;
|
|
139
|
+
subject: string;
|
|
140
|
+
};
|
|
141
|
+
principalId: string;
|
|
142
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
143
|
+
audience: string;
|
|
144
|
+
actor?: {
|
|
145
|
+
issuer: string;
|
|
146
|
+
subject: string;
|
|
147
|
+
} | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
}, "strict", z.ZodTypeAny, {
|
|
150
|
+
resource: string;
|
|
151
|
+
expiresAt: number;
|
|
152
|
+
accessToken: string;
|
|
153
|
+
principal: {
|
|
154
|
+
scopes: string[];
|
|
155
|
+
identity: {
|
|
156
|
+
issuer: string;
|
|
157
|
+
subject: string;
|
|
158
|
+
};
|
|
159
|
+
principalId: string;
|
|
160
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
161
|
+
audience: string;
|
|
162
|
+
actor?: {
|
|
163
|
+
issuer: string;
|
|
164
|
+
subject: string;
|
|
165
|
+
} | undefined;
|
|
166
|
+
};
|
|
167
|
+
}, {
|
|
168
|
+
resource: string;
|
|
169
|
+
expiresAt: number;
|
|
170
|
+
accessToken: string;
|
|
171
|
+
principal: {
|
|
172
|
+
scopes: string[];
|
|
173
|
+
identity: {
|
|
174
|
+
issuer: string;
|
|
175
|
+
subject: string;
|
|
176
|
+
};
|
|
177
|
+
principalId: string;
|
|
178
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
179
|
+
audience: string;
|
|
180
|
+
actor?: {
|
|
181
|
+
issuer: string;
|
|
182
|
+
subject: string;
|
|
183
|
+
} | undefined;
|
|
184
|
+
};
|
|
185
|
+
}>, {
|
|
186
|
+
resource: string;
|
|
187
|
+
expiresAt: number;
|
|
188
|
+
accessToken: string;
|
|
189
|
+
principal: {
|
|
190
|
+
scopes: string[];
|
|
191
|
+
identity: {
|
|
192
|
+
issuer: string;
|
|
193
|
+
subject: string;
|
|
194
|
+
};
|
|
195
|
+
principalId: string;
|
|
196
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
197
|
+
audience: string;
|
|
198
|
+
actor?: {
|
|
199
|
+
issuer: string;
|
|
200
|
+
subject: string;
|
|
201
|
+
} | undefined;
|
|
202
|
+
};
|
|
203
|
+
}, {
|
|
204
|
+
resource: string;
|
|
205
|
+
expiresAt: number;
|
|
206
|
+
accessToken: string;
|
|
207
|
+
principal: {
|
|
208
|
+
scopes: string[];
|
|
209
|
+
identity: {
|
|
210
|
+
issuer: string;
|
|
211
|
+
subject: string;
|
|
212
|
+
};
|
|
213
|
+
principalId: string;
|
|
214
|
+
kind: "human" | "service" | "provider" | "agent";
|
|
215
|
+
audience: string;
|
|
216
|
+
actor?: {
|
|
217
|
+
issuer: string;
|
|
218
|
+
subject: string;
|
|
219
|
+
} | undefined;
|
|
220
|
+
};
|
|
221
|
+
}>;
|
|
222
|
+
logout: z.ZodObject<{
|
|
223
|
+
loggedOut: z.ZodLiteral<true>;
|
|
224
|
+
upstreamRevoked: z.ZodBoolean;
|
|
225
|
+
}, "strict", z.ZodTypeAny, {
|
|
226
|
+
loggedOut: true;
|
|
227
|
+
upstreamRevoked: boolean;
|
|
228
|
+
}, {
|
|
229
|
+
loggedOut: true;
|
|
230
|
+
upstreamRevoked: boolean;
|
|
231
|
+
}>;
|
|
232
|
+
};
|
|
233
|
+
export type BrowserSessionCredentials = z.infer<typeof browserSessionResponses.credentials>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { identityEndpointSchema, identityPrincipalSchema, resourceTokenRequestSchema } from "./contracts.js";
|
|
3
|
+
const opaque = z.string().regex(/^[A-Za-z0-9_-]{43}$/u);
|
|
4
|
+
const clientId = z.string().min(1).max(256);
|
|
5
|
+
const authorizationUrl = z.string().url().max(8192).superRefine((value, context) => {
|
|
6
|
+
const url = new URL(value);
|
|
7
|
+
if (url.protocol !== "https:" || url.username || url.password || url.hash)
|
|
8
|
+
context.addIssue({ code: z.ZodIssueCode.custom, message: "Authorization URLs require HTTPS without credentials or fragments." });
|
|
9
|
+
});
|
|
10
|
+
const browserLoginTransactionSchema = z.object({
|
|
11
|
+
state: opaque,
|
|
12
|
+
nonce: opaque,
|
|
13
|
+
verifier: opaque,
|
|
14
|
+
expiresAt: z.number().int().positive(),
|
|
15
|
+
issuer: identityEndpointSchema,
|
|
16
|
+
clientId,
|
|
17
|
+
redirectUri: identityEndpointSchema,
|
|
18
|
+
resource: identityEndpointSchema,
|
|
19
|
+
scopes: resourceTokenRequestSchema.shape.scopes
|
|
20
|
+
}).strict();
|
|
21
|
+
const BROWSER_SESSION_BRIDGE_PATH = "/internal/identity/browser/v1";
|
|
22
|
+
const BROWSER_SESSION_PERMISSION = "identity:sessions:manage";
|
|
23
|
+
const BROWSER_SESSION_SCOPE = "treeseed:identity:sessions";
|
|
24
|
+
const browserSessionRequests = {
|
|
25
|
+
begin: z.object({ browserBinding: opaque }).strict(),
|
|
26
|
+
finish: z.object({ browserBinding: opaque, callback: authorizationUrl }).strict(),
|
|
27
|
+
credentials: z.object({ handle: opaque }).strict(),
|
|
28
|
+
logout: z.object({ handle: opaque }).strict()
|
|
29
|
+
};
|
|
30
|
+
const browserSessionResponses = {
|
|
31
|
+
begin: z.object({ authorizationUrl }).strict(),
|
|
32
|
+
finish: z.object({ handle: opaque, expiresAt: z.string().datetime() }).strict(),
|
|
33
|
+
credentials: z.object({
|
|
34
|
+
accessToken: z.string().min(1).max(16384),
|
|
35
|
+
resource: identityEndpointSchema,
|
|
36
|
+
expiresAt: z.number().int().positive(),
|
|
37
|
+
principal: identityPrincipalSchema
|
|
38
|
+
}).strict().superRefine((value, context) => {
|
|
39
|
+
if (value.resource !== value.principal.audience || value.principal.kind !== "human")
|
|
40
|
+
context.addIssue({ code: z.ZodIssueCode.custom, message: "Browser credentials require a human principal for this resource." });
|
|
41
|
+
}),
|
|
42
|
+
logout: z.object({ loggedOut: z.literal(true), upstreamRevoked: z.boolean() }).strict()
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
BROWSER_SESSION_BRIDGE_PATH,
|
|
46
|
+
BROWSER_SESSION_PERMISSION,
|
|
47
|
+
BROWSER_SESSION_SCOPE,
|
|
48
|
+
browserLoginTransactionSchema,
|
|
49
|
+
browserSessionRequests,
|
|
50
|
+
browserSessionResponses
|
|
51
|
+
};
|
package/dist/identity/index.d.ts
CHANGED
package/dist/identity/index.js
CHANGED
|
@@ -155,6 +155,7 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
155
155
|
}, {}, undefined, {
|
|
156
156
|
operation: Record<string, unknown> | null;
|
|
157
157
|
receipt: {
|
|
158
|
+
state: "known-good";
|
|
158
159
|
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
159
160
|
resources: {
|
|
160
161
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
@@ -168,7 +169,6 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
168
169
|
}[];
|
|
169
170
|
planDigest: string;
|
|
170
171
|
teamId: string;
|
|
171
|
-
state: "known-good";
|
|
172
172
|
environment: "production" | "staging";
|
|
173
173
|
completedAt: string;
|
|
174
174
|
receiptId: string;
|
|
@@ -3,8 +3,8 @@ export declare function inboxOperations(): {
|
|
|
3
3
|
teamId: string;
|
|
4
4
|
}, {
|
|
5
5
|
kind?: "all" | "proposal" | "question" | undefined;
|
|
6
|
-
projectId?: string | undefined;
|
|
7
6
|
state?: "all" | "outstanding" | undefined;
|
|
7
|
+
projectId?: string | undefined;
|
|
8
8
|
cursor?: string | undefined;
|
|
9
9
|
limit?: number | undefined;
|
|
10
10
|
}, undefined, {
|
|
@@ -211,6 +211,7 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
211
211
|
}, {}, undefined, {
|
|
212
212
|
operation: Record<string, unknown> | null;
|
|
213
213
|
receipt: {
|
|
214
|
+
state: "known-good";
|
|
214
215
|
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
215
216
|
resources: {
|
|
216
217
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
@@ -224,7 +225,6 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
224
225
|
}[];
|
|
225
226
|
planDigest: string;
|
|
226
227
|
teamId: string;
|
|
227
|
-
state: "known-good";
|
|
228
228
|
environment: "production" | "staging";
|
|
229
229
|
completedAt: string;
|
|
230
230
|
receiptId: string;
|
|
@@ -622,8 +622,8 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
622
622
|
teamId: string;
|
|
623
623
|
}, {
|
|
624
624
|
kind?: "all" | "proposal" | "question" | undefined;
|
|
625
|
-
projectId?: string | undefined;
|
|
626
625
|
state?: "all" | "outstanding" | undefined;
|
|
626
|
+
projectId?: string | undefined;
|
|
627
627
|
cursor?: string | undefined;
|
|
628
628
|
limit?: number | undefined;
|
|
629
629
|
}, undefined, {
|
|
@@ -40,9 +40,9 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
40
40
|
}, "strict", z.ZodTypeAny, {
|
|
41
41
|
status: "active" | "revoked" | "expired";
|
|
42
42
|
id: string;
|
|
43
|
+
expiresAt: string | null;
|
|
43
44
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
44
45
|
createdAt: string;
|
|
45
|
-
expiresAt: string | null;
|
|
46
46
|
operations: ("read" | "context" | "query" | "graph")[];
|
|
47
47
|
paths: string[];
|
|
48
48
|
updatedAt: string;
|
|
@@ -68,9 +68,9 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
68
68
|
}>, {
|
|
69
69
|
status: "active" | "revoked" | "expired";
|
|
70
70
|
id: string;
|
|
71
|
+
expiresAt: string | null;
|
|
71
72
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
72
73
|
createdAt: string;
|
|
73
|
-
expiresAt: string | null;
|
|
74
74
|
operations: ("read" | "context" | "query" | "graph")[];
|
|
75
75
|
paths: string[];
|
|
76
76
|
updatedAt: string;
|
|
@@ -311,20 +311,20 @@ export declare const providerRegistrationRequestSchema: z.ZodObject<{
|
|
|
311
311
|
state: z.ZodEnum<["pending-approval", "approved", "rejected", "revoked"]>;
|
|
312
312
|
createdAt: z.ZodString;
|
|
313
313
|
}, "strict", z.ZodTypeAny, {
|
|
314
|
+
state: "pending-approval" | "approved" | "rejected" | "revoked";
|
|
314
315
|
schemaVersion: "treeseed.provider-registration-request/v1";
|
|
315
316
|
requestId: string;
|
|
316
317
|
teamId: string;
|
|
317
318
|
publicKey: string;
|
|
318
319
|
capabilities: string[];
|
|
319
|
-
state: "pending-approval" | "approved" | "rejected" | "revoked";
|
|
320
320
|
createdAt: string;
|
|
321
321
|
}, {
|
|
322
|
+
state: "pending-approval" | "approved" | "rejected" | "revoked";
|
|
322
323
|
schemaVersion: "treeseed.provider-registration-request/v1";
|
|
323
324
|
requestId: string;
|
|
324
325
|
teamId: string;
|
|
325
326
|
publicKey: string;
|
|
326
327
|
capabilities: string[];
|
|
327
|
-
state: "pending-approval" | "approved" | "rejected" | "revoked";
|
|
328
328
|
createdAt: string;
|
|
329
329
|
}>;
|
|
330
330
|
export declare const providerSessionSchema: z.ZodObject<{
|
|
@@ -335,18 +335,18 @@ export declare const providerSessionSchema: z.ZodObject<{
|
|
|
335
335
|
expiresAt: z.ZodString;
|
|
336
336
|
token: z.ZodString;
|
|
337
337
|
}, "strict", z.ZodTypeAny, {
|
|
338
|
+
expiresAt: string;
|
|
338
339
|
schemaVersion: "treeseed.provider-session/v1";
|
|
339
340
|
providerId: string;
|
|
340
341
|
scope: string[];
|
|
341
342
|
issuedAt: string;
|
|
342
|
-
expiresAt: string;
|
|
343
343
|
token: string;
|
|
344
344
|
}, {
|
|
345
|
+
expiresAt: string;
|
|
345
346
|
schemaVersion: "treeseed.provider-session/v1";
|
|
346
347
|
providerId: string;
|
|
347
348
|
scope: string[];
|
|
348
349
|
issuedAt: string;
|
|
349
|
-
expiresAt: string;
|
|
350
350
|
token: string;
|
|
351
351
|
}>;
|
|
352
352
|
export declare const environmentProfileDescriptorSchema: z.ZodObject<{
|
|
@@ -399,8 +399,8 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodObject<{
|
|
|
399
399
|
}>;
|
|
400
400
|
expiresAt: z.ZodString;
|
|
401
401
|
}, "strict", z.ZodTypeAny, {
|
|
402
|
-
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
403
402
|
expiresAt: string;
|
|
403
|
+
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
404
404
|
variables: string[];
|
|
405
405
|
assignmentId: string;
|
|
406
406
|
profileId: string;
|
|
@@ -409,8 +409,8 @@ export declare const assignmentEnvironmentGrantSchema: z.ZodObject<{
|
|
|
409
409
|
destinations: string[];
|
|
410
410
|
};
|
|
411
411
|
}, {
|
|
412
|
-
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
413
412
|
expiresAt: string;
|
|
413
|
+
schemaVersion: "treeseed.assignment-environment-grant/v1";
|
|
414
414
|
variables: string[];
|
|
415
415
|
assignmentId: string;
|
|
416
416
|
profileId: string;
|
|
@@ -54,8 +54,8 @@ export declare const organizationTeamInvitationSchema: z.ZodObject<{
|
|
|
54
54
|
status: "rejected" | "revoked" | "expired" | "pending" | "accepted";
|
|
55
55
|
id: string;
|
|
56
56
|
version: number;
|
|
57
|
-
teamId: string;
|
|
58
57
|
expiresAt: string;
|
|
58
|
+
teamId: string;
|
|
59
59
|
organizationId: string;
|
|
60
60
|
organizationAuthorizedBy: string;
|
|
61
61
|
teamAuthorizedBy: string | null;
|
|
@@ -63,8 +63,8 @@ export declare const organizationTeamInvitationSchema: z.ZodObject<{
|
|
|
63
63
|
status: "rejected" | "revoked" | "expired" | "pending" | "accepted";
|
|
64
64
|
id: string;
|
|
65
65
|
version: number;
|
|
66
|
-
teamId: string;
|
|
67
66
|
expiresAt: string;
|
|
67
|
+
teamId: string;
|
|
68
68
|
organizationId: string;
|
|
69
69
|
organizationAuthorizedBy: string;
|
|
70
70
|
teamAuthorizedBy: string | null;
|
|
@@ -189,13 +189,13 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
189
189
|
};
|
|
190
190
|
id: string;
|
|
191
191
|
version: number;
|
|
192
|
+
expiresAt: string | null;
|
|
192
193
|
scope: {
|
|
193
194
|
environment: "production" | "staging" | "shared";
|
|
194
195
|
projectIds: string[];
|
|
195
196
|
resourceIds: string[];
|
|
196
197
|
assignmentIds: string[];
|
|
197
198
|
};
|
|
198
|
-
expiresAt: string | null;
|
|
199
199
|
origin: "explicit" | "default-policy";
|
|
200
200
|
authority: {
|
|
201
201
|
kind: "organization";
|
|
@@ -225,13 +225,13 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
225
225
|
};
|
|
226
226
|
id: string;
|
|
227
227
|
version: number;
|
|
228
|
+
expiresAt: string | null;
|
|
228
229
|
scope: {
|
|
229
230
|
environment: "production" | "staging" | "shared";
|
|
230
231
|
projectIds: string[];
|
|
231
232
|
resourceIds: string[];
|
|
232
233
|
assignmentIds: string[];
|
|
233
234
|
};
|
|
234
|
-
expiresAt: string | null;
|
|
235
235
|
origin: "explicit" | "default-policy";
|
|
236
236
|
authority: {
|
|
237
237
|
kind: "organization";
|
|
@@ -261,13 +261,13 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
261
261
|
};
|
|
262
262
|
id: string;
|
|
263
263
|
version: number;
|
|
264
|
+
expiresAt: string | null;
|
|
264
265
|
scope: {
|
|
265
266
|
environment: "production" | "staging" | "shared";
|
|
266
267
|
projectIds: string[];
|
|
267
268
|
resourceIds: string[];
|
|
268
269
|
assignmentIds: string[];
|
|
269
270
|
};
|
|
270
|
-
expiresAt: string | null;
|
|
271
271
|
origin: "explicit" | "default-policy";
|
|
272
272
|
authority: {
|
|
273
273
|
kind: "organization";
|
|
@@ -297,13 +297,13 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
297
297
|
};
|
|
298
298
|
id: string;
|
|
299
299
|
version: number;
|
|
300
|
+
expiresAt: string | null;
|
|
300
301
|
scope: {
|
|
301
302
|
environment: "production" | "staging" | "shared";
|
|
302
303
|
projectIds: string[];
|
|
303
304
|
resourceIds: string[];
|
|
304
305
|
assignmentIds: string[];
|
|
305
306
|
};
|
|
306
|
-
expiresAt: string | null;
|
|
307
307
|
origin: "explicit" | "default-policy";
|
|
308
308
|
authority: {
|
|
309
309
|
kind: "organization";
|