@treeseed/sdk 0.13.0-rc.90 → 0.13.0-rc.92
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/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +6 -6
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +144 -144
- package/dist/capacity-provider/environment-catalog.d.ts +12 -12
- package/dist/capacity-provider/index.d.ts +1 -0
- package/dist/capacity-provider/index.js +1 -0
- package/dist/capacity-provider/install-configuration.d.ts +39 -0
- package/dist/capacity-provider/install-configuration.js +18 -0
- package/dist/configuration/secrets-capability.d.ts +3 -0
- package/dist/configuration/secrets-capability.js +3 -0
- package/dist/content/validation/agent-operational-content-schemas.d.ts +16 -16
- package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
- package/dist/content/validation/content-model-schemas.d.ts +304 -304
- package/dist/content/validation/portable-content-data.d.ts +28 -28
- package/dist/deployment/ai-hosting.d.ts +297 -0
- package/dist/deployment/ai-hosting.js +63 -0
- package/dist/deployment/ai-instance.d.ts +48 -0
- package/dist/deployment/ai-instance.js +23 -0
- package/dist/deployment/hosted-topology-template.d.ts +24 -24
- package/dist/deployment/hosted-topology.d.ts +114 -114
- package/dist/deployment/index.d.ts +2 -0
- package/dist/deployment/index.js +2 -0
- package/dist/deployment/schemas.d.ts +38 -38
- package/dist/development/schemas.d.ts +76 -76
- package/dist/operator-contracts/canonical-command-tree.js +3 -10
- package/dist/operator-contracts/catalog/communication-operations.d.ts +5 -5
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +21 -21
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +8 -8
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +29 -0
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +18 -0
- package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.d.ts +3 -0
- package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.js +15 -0
- package/dist/operator-contracts/communication/contracts.d.ts +34 -34
- package/dist/operator-contracts/control-plane-operations.d.ts +63 -34
- package/dist/operator-contracts/control-plane-operations.js +3 -17
- package/dist/operator-contracts/inbox/contracts.d.ts +30 -30
- package/dist/operator-contracts/operation-builder.d.ts +1 -0
- package/dist/operator-contracts/operation-builder.js +17 -0
- package/dist/platform/schemas.d.ts +220 -40
- package/dist/platform/schemas.js +7 -2
- package/dist/platform/workset.js +5 -1
- package/dist/secrets-capability/github-actions-encryption.js +1 -1
- package/dist/secrets-capability/provider-operation-contracts.d.ts +14 -0
- package/dist/secrets-capability/service-provider-contracts.d.ts +4 -2
- package/dist/secrets-capability/service-provider-contracts.js +41 -27
- package/dist/secrets-capability/shared-access.d.ts +51 -0
- package/dist/secrets-capability/shared-access.js +36 -0
- package/dist/secrets-capability/shared-resources.d.ts +376 -0
- package/dist/secrets-capability/shared-resources.js +91 -0
- package/dist/secrets-capability/vault-contracts.d.ts +132 -0
- package/dist/secrets-capability/vault-contracts.js +56 -0
- package/package.json +1 -1
|
@@ -33,8 +33,8 @@ export declare function communicationOperations(): {
|
|
|
33
33
|
resources: Record<string, unknown>;
|
|
34
34
|
selection: {
|
|
35
35
|
capabilities: string[];
|
|
36
|
-
parameters: Record<string, unknown>;
|
|
37
36
|
model: string | null;
|
|
37
|
+
parameters: Record<string, unknown>;
|
|
38
38
|
};
|
|
39
39
|
reason: string | null;
|
|
40
40
|
provider: {
|
|
@@ -100,8 +100,8 @@ export declare function communicationOperations(): {
|
|
|
100
100
|
sequence: number;
|
|
101
101
|
payload: Record<string, unknown>;
|
|
102
102
|
actor: {
|
|
103
|
-
id: string;
|
|
104
103
|
kind: "control-plane" | "provider" | "agent" | "user";
|
|
104
|
+
id: string;
|
|
105
105
|
handle: string | null;
|
|
106
106
|
};
|
|
107
107
|
summary: string;
|
|
@@ -150,8 +150,8 @@ export declare function communicationOperations(): {
|
|
|
150
150
|
resources: Record<string, unknown>;
|
|
151
151
|
selection: {
|
|
152
152
|
capabilities: string[];
|
|
153
|
-
parameters: Record<string, unknown>;
|
|
154
153
|
model: string | null;
|
|
154
|
+
parameters: Record<string, unknown>;
|
|
155
155
|
};
|
|
156
156
|
reason: string | null;
|
|
157
157
|
provider: {
|
|
@@ -217,8 +217,8 @@ export declare function communicationOperations(): {
|
|
|
217
217
|
sequence: number;
|
|
218
218
|
payload: Record<string, unknown>;
|
|
219
219
|
actor: {
|
|
220
|
-
id: string;
|
|
221
220
|
kind: "control-plane" | "provider" | "agent" | "user";
|
|
221
|
+
id: string;
|
|
222
222
|
handle: string | null;
|
|
223
223
|
};
|
|
224
224
|
summary: string;
|
|
@@ -340,8 +340,8 @@ export declare function communicationOperations(): {
|
|
|
340
340
|
sequence: number;
|
|
341
341
|
payload: Record<string, unknown>;
|
|
342
342
|
actor: {
|
|
343
|
-
id: string;
|
|
344
343
|
kind: "control-plane" | "provider" | "agent" | "user";
|
|
344
|
+
id: string;
|
|
345
345
|
handle: string | null;
|
|
346
346
|
};
|
|
347
347
|
summary: string;
|
|
@@ -5,8 +5,8 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
5
5
|
declaration: {
|
|
6
6
|
schemaVersion: "treeseed.hosted-topology/v1";
|
|
7
7
|
resources: {
|
|
8
|
-
id: string;
|
|
9
8
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
9
|
+
id: string;
|
|
10
10
|
provider: "cloudflare" | "railway";
|
|
11
11
|
adoption: {
|
|
12
12
|
mode: "adopt-or-create";
|
|
@@ -36,18 +36,18 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
36
36
|
mutation: "agent-authorized";
|
|
37
37
|
environment: "production" | "staging";
|
|
38
38
|
artifacts: Record<string, {
|
|
39
|
+
kind: "archive";
|
|
39
40
|
digest: string;
|
|
40
41
|
source: string;
|
|
41
|
-
kind: "archive";
|
|
42
42
|
format: "tar+gzip";
|
|
43
43
|
} | {
|
|
44
|
+
kind: "file";
|
|
44
45
|
digest: string;
|
|
45
46
|
source: string;
|
|
46
|
-
kind: "file";
|
|
47
47
|
mediaType: string;
|
|
48
48
|
} | {
|
|
49
|
-
digest: string;
|
|
50
49
|
kind: "oci-image";
|
|
50
|
+
digest: string;
|
|
51
51
|
identity: string;
|
|
52
52
|
}>;
|
|
53
53
|
deploymentId: string;
|
|
@@ -72,14 +72,14 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
72
72
|
}[];
|
|
73
73
|
planDigest: string;
|
|
74
74
|
actions: {
|
|
75
|
+
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
75
76
|
action: "noop" | "create" | "adopt" | "update";
|
|
76
77
|
resourceId: string;
|
|
77
|
-
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
78
78
|
provider: "cloudflare" | "railway";
|
|
79
79
|
providerResourceId: string | null;
|
|
80
80
|
desiredResource: {
|
|
81
|
-
id: string;
|
|
82
81
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
82
|
+
id: string;
|
|
83
83
|
provider: "cloudflare" | "railway";
|
|
84
84
|
adoption: {
|
|
85
85
|
mode: "adopt-or-create";
|
|
@@ -107,18 +107,18 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
107
107
|
environment: "production" | "staging";
|
|
108
108
|
executable: false;
|
|
109
109
|
artifacts: Record<string, {
|
|
110
|
+
kind: "archive";
|
|
110
111
|
digest: string;
|
|
111
112
|
source: string;
|
|
112
|
-
kind: "archive";
|
|
113
113
|
format: "tar+gzip";
|
|
114
114
|
} | {
|
|
115
|
+
kind: "file";
|
|
115
116
|
digest: string;
|
|
116
117
|
source: string;
|
|
117
|
-
kind: "file";
|
|
118
118
|
mediaType: string;
|
|
119
119
|
} | {
|
|
120
|
-
digest: string;
|
|
121
120
|
kind: "oci-image";
|
|
121
|
+
digest: string;
|
|
122
122
|
identity: string;
|
|
123
123
|
}>;
|
|
124
124
|
planId: string;
|
|
@@ -157,9 +157,9 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
157
157
|
receipt: {
|
|
158
158
|
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
159
159
|
resources: {
|
|
160
|
+
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
160
161
|
state: "missing" | "degraded" | "healthy";
|
|
161
162
|
resourceId: string;
|
|
162
|
-
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
163
163
|
provider: "cloudflare" | "railway";
|
|
164
164
|
providerResourceId: string | null;
|
|
165
165
|
managedBy: "external" | "treeseed" | null;
|
|
@@ -179,9 +179,9 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
179
179
|
platformCommit: string;
|
|
180
180
|
backendBindingDigest: string;
|
|
181
181
|
previousResources: {
|
|
182
|
+
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
182
183
|
state: "missing" | "degraded" | "healthy";
|
|
183
184
|
resourceId: string;
|
|
184
|
-
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
185
185
|
provider: "cloudflare" | "railway";
|
|
186
186
|
providerResourceId: string | null;
|
|
187
187
|
managedBy: "external" | "treeseed" | null;
|
|
@@ -232,14 +232,14 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
232
232
|
}[];
|
|
233
233
|
planDigest: string;
|
|
234
234
|
actions: {
|
|
235
|
+
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
235
236
|
action: "noop" | "create" | "adopt" | "update";
|
|
236
237
|
resourceId: string;
|
|
237
|
-
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
238
238
|
provider: "cloudflare" | "railway";
|
|
239
239
|
providerResourceId: string | null;
|
|
240
240
|
desiredResource: {
|
|
241
|
-
id: string;
|
|
242
241
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
242
|
+
id: string;
|
|
243
243
|
provider: "cloudflare" | "railway";
|
|
244
244
|
adoption: {
|
|
245
245
|
mode: "adopt-or-create";
|
|
@@ -267,18 +267,18 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
267
267
|
environment: "production" | "staging";
|
|
268
268
|
executable: false;
|
|
269
269
|
artifacts: Record<string, {
|
|
270
|
+
kind: "archive";
|
|
270
271
|
digest: string;
|
|
271
272
|
source: string;
|
|
272
|
-
kind: "archive";
|
|
273
273
|
format: "tar+gzip";
|
|
274
274
|
} | {
|
|
275
|
+
kind: "file";
|
|
275
276
|
digest: string;
|
|
276
277
|
source: string;
|
|
277
|
-
kind: "file";
|
|
278
278
|
mediaType: string;
|
|
279
279
|
} | {
|
|
280
|
-
digest: string;
|
|
281
280
|
kind: "oci-image";
|
|
281
|
+
digest: string;
|
|
282
282
|
identity: string;
|
|
283
283
|
}>;
|
|
284
284
|
planId: string;
|
|
@@ -318,14 +318,14 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
318
318
|
}[];
|
|
319
319
|
planDigest: string;
|
|
320
320
|
actions: {
|
|
321
|
+
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
321
322
|
action: "noop" | "create" | "adopt" | "update";
|
|
322
323
|
resourceId: string;
|
|
323
|
-
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
324
324
|
provider: "cloudflare" | "railway";
|
|
325
325
|
providerResourceId: string | null;
|
|
326
326
|
desiredResource: {
|
|
327
|
-
id: string;
|
|
328
327
|
kind: "admin-application" | "pages-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
328
|
+
id: string;
|
|
329
329
|
provider: "cloudflare" | "railway";
|
|
330
330
|
adoption: {
|
|
331
331
|
mode: "adopt-or-create";
|
|
@@ -353,18 +353,18 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
353
353
|
environment: "production" | "staging";
|
|
354
354
|
executable: false;
|
|
355
355
|
artifacts: Record<string, {
|
|
356
|
+
kind: "archive";
|
|
356
357
|
digest: string;
|
|
357
358
|
source: string;
|
|
358
|
-
kind: "archive";
|
|
359
359
|
format: "tar+gzip";
|
|
360
360
|
} | {
|
|
361
|
+
kind: "file";
|
|
361
362
|
digest: string;
|
|
362
363
|
source: string;
|
|
363
|
-
kind: "file";
|
|
364
364
|
mediaType: string;
|
|
365
365
|
} | {
|
|
366
|
-
digest: string;
|
|
367
366
|
kind: "oci-image";
|
|
367
|
+
digest: string;
|
|
368
368
|
identity: string;
|
|
369
369
|
}>;
|
|
370
370
|
planId: string;
|
|
@@ -2,21 +2,21 @@ export declare function inboxOperations(): {
|
|
|
2
2
|
list: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
3
3
|
teamId: string;
|
|
4
4
|
}, {
|
|
5
|
+
kind?: "all" | "proposal" | "question" | undefined;
|
|
5
6
|
projectId?: string | undefined;
|
|
6
7
|
state?: "all" | "outstanding" | undefined;
|
|
7
|
-
kind?: "all" | "proposal" | "question" | undefined;
|
|
8
8
|
cursor?: string | undefined;
|
|
9
9
|
limit?: number | undefined;
|
|
10
10
|
}, undefined, {
|
|
11
11
|
schemaVersion: "treeseed.inbox-page/v1";
|
|
12
12
|
items: {
|
|
13
13
|
status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
|
|
14
|
+
kind: "proposal" | "question";
|
|
14
15
|
id: string;
|
|
15
16
|
version: number;
|
|
16
17
|
projectId: string;
|
|
17
18
|
teamId: string;
|
|
18
19
|
createdAt: string;
|
|
19
|
-
kind: "proposal" | "question";
|
|
20
20
|
projectSlug: string;
|
|
21
21
|
updatedAt: string;
|
|
22
22
|
authorId: string;
|
|
@@ -31,13 +31,13 @@ export declare function inboxOperations(): {
|
|
|
31
31
|
itemId: string;
|
|
32
32
|
}, {}, undefined, {
|
|
33
33
|
status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
|
|
34
|
+
kind: "proposal" | "question";
|
|
34
35
|
schemaVersion: "treeseed.inbox-item/v1";
|
|
35
36
|
id: string;
|
|
36
37
|
version: number;
|
|
37
38
|
projectId: string;
|
|
38
39
|
teamId: string;
|
|
39
40
|
createdAt: string;
|
|
40
|
-
kind: "proposal" | "question";
|
|
41
41
|
provenance: {
|
|
42
42
|
digest: string | null;
|
|
43
43
|
repositoryId: string | null;
|
|
@@ -60,9 +60,9 @@ export declare function inboxOperations(): {
|
|
|
60
60
|
requiresFeedback: boolean;
|
|
61
61
|
}[];
|
|
62
62
|
comments: {
|
|
63
|
+
kind: "comment" | "answer" | "reply";
|
|
63
64
|
id: string;
|
|
64
65
|
createdAt: string;
|
|
65
|
-
kind: "comment" | "answer" | "reply";
|
|
66
66
|
provenance: {
|
|
67
67
|
digest: string | null;
|
|
68
68
|
repositoryId: string | null;
|
|
@@ -109,13 +109,13 @@ export declare function inboxOperations(): {
|
|
|
109
109
|
schemaVersion: "treeseed.inbox-mutation-receipt/v1";
|
|
110
110
|
item: {
|
|
111
111
|
status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
|
|
112
|
+
kind: "proposal" | "question";
|
|
112
113
|
schemaVersion: "treeseed.inbox-item/v1";
|
|
113
114
|
id: string;
|
|
114
115
|
version: number;
|
|
115
116
|
projectId: string;
|
|
116
117
|
teamId: string;
|
|
117
118
|
createdAt: string;
|
|
118
|
-
kind: "proposal" | "question";
|
|
119
119
|
provenance: {
|
|
120
120
|
digest: string | null;
|
|
121
121
|
repositoryId: string | null;
|
|
@@ -138,9 +138,9 @@ export declare function inboxOperations(): {
|
|
|
138
138
|
requiresFeedback: boolean;
|
|
139
139
|
}[];
|
|
140
140
|
comments: {
|
|
141
|
+
kind: "comment" | "answer" | "reply";
|
|
141
142
|
id: string;
|
|
142
143
|
createdAt: string;
|
|
143
|
-
kind: "comment" | "answer" | "reply";
|
|
144
144
|
provenance: {
|
|
145
145
|
digest: string | null;
|
|
146
146
|
repositoryId: string | null;
|
|
@@ -209,13 +209,13 @@ export declare function inboxOperations(): {
|
|
|
209
209
|
schemaVersion: "treeseed.inbox-mutation-receipt/v1";
|
|
210
210
|
item: {
|
|
211
211
|
status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
|
|
212
|
+
kind: "proposal" | "question";
|
|
212
213
|
schemaVersion: "treeseed.inbox-item/v1";
|
|
213
214
|
id: string;
|
|
214
215
|
version: number;
|
|
215
216
|
projectId: string;
|
|
216
217
|
teamId: string;
|
|
217
218
|
createdAt: string;
|
|
218
|
-
kind: "proposal" | "question";
|
|
219
219
|
provenance: {
|
|
220
220
|
digest: string | null;
|
|
221
221
|
repositoryId: string | null;
|
|
@@ -238,9 +238,9 @@ export declare function inboxOperations(): {
|
|
|
238
238
|
requiresFeedback: boolean;
|
|
239
239
|
}[];
|
|
240
240
|
comments: {
|
|
241
|
+
kind: "comment" | "answer" | "reply";
|
|
241
242
|
id: string;
|
|
242
243
|
createdAt: string;
|
|
243
|
-
kind: "comment" | "answer" | "reply";
|
|
244
244
|
provenance: {
|
|
245
245
|
digest: string | null;
|
|
246
246
|
repositoryId: string | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const AI_INSTANCE_OPERATIONS: {
|
|
2
|
+
list: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
3
|
+
teamId: string;
|
|
4
|
+
}, {
|
|
5
|
+
cursor?: string | undefined;
|
|
6
|
+
limit?: number | undefined;
|
|
7
|
+
}, undefined, Record<string, unknown>>;
|
|
8
|
+
show: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
9
|
+
teamId: string;
|
|
10
|
+
instanceId: string;
|
|
11
|
+
}, {}, undefined, Record<string, unknown>>;
|
|
12
|
+
put: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
13
|
+
teamId: string;
|
|
14
|
+
instanceId: string;
|
|
15
|
+
}, {}, {
|
|
16
|
+
name: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
purpose: "inference" | "training" | "both";
|
|
19
|
+
timeZone: string;
|
|
20
|
+
schedule: "weekdays" | "always";
|
|
21
|
+
hostingConnectionId: string;
|
|
22
|
+
storageConnectionId: string | null;
|
|
23
|
+
model: string;
|
|
24
|
+
}, Record<string, unknown>>;
|
|
25
|
+
remove: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
26
|
+
teamId: string;
|
|
27
|
+
instanceId: string;
|
|
28
|
+
}, {}, {}, Record<string, unknown>>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineOperation } from "../../operation-builder.js";
|
|
3
|
+
import { aiInstanceDraftSchema } from "../../../deployment/ai-instance.js";
|
|
4
|
+
const team = z.object({ teamId: z.string().min(1) }).strict(), instance = team.extend({ instanceId: z.string().uuid() });
|
|
5
|
+
const empty = z.object({}).strict(), record = z.record(z.unknown());
|
|
6
|
+
function descriptor(action, method, path) {
|
|
7
|
+
const read = method === "GET";
|
|
8
|
+
return { operationId: `ai.instances.${action}`, description: `${action} a team-owned AI configuration; no cloud provisioning.`, rest: { method, path }, parameters: `treeseed.ai.instances.${action}.parameters/v1`, capability: read ? "infrastructure.read" : "infrastructure.write", authentication: "oauth", oauthScopes: read ? ["treeseed:read"] : ["treeseed:admin"], kind: read ? "read" : "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli"], cacheScope: read ? "principal" : "none", pagination: "none", concurrencyRequired: !read };
|
|
9
|
+
}
|
|
10
|
+
const AI_INSTANCE_OPERATIONS = {
|
|
11
|
+
list: defineOperation({ ...descriptor("list", "GET", "/v1/teams/{teamId}/ai-instances"), pagination: "cursor" }, { path: team, query: z.object({ cursor: z.string().optional(), limit: z.coerce.number().int().min(1).max(100).optional() }).strict(), body: z.undefined(), output: record }),
|
|
12
|
+
show: defineOperation(descriptor("show", "GET", "/v1/teams/{teamId}/ai-instances/{instanceId}"), { path: instance, query: empty, body: z.undefined(), output: record }),
|
|
13
|
+
put: defineOperation(descriptor("put", "PUT", "/v1/teams/{teamId}/ai-instances/{instanceId}"), { path: instance, query: empty, body: aiInstanceDraftSchema, output: record }),
|
|
14
|
+
remove: defineOperation(descriptor("remove", "DELETE", "/v1/teams/{teamId}/ai-instances/{instanceId}"), { path: instance, query: empty, body: empty, output: record })
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
AI_INSTANCE_OPERATIONS
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function commandPaths(tree) {
|
|
2
|
+
const paths = [];
|
|
3
|
+
const visit = (nodes, parent) => {
|
|
4
|
+
for (const node of nodes) {
|
|
5
|
+
const path = [...parent, node.segment];
|
|
6
|
+
if (node.nodeType === "leaf") paths.push(path.join(" "));
|
|
7
|
+
else visit(node.children, path);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
visit(tree.commands, []);
|
|
11
|
+
return paths;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
commandPaths
|
|
15
|
+
};
|