@treeseed/sdk 0.13.0-rc.95 → 0.13.0-rc.97
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 +20 -20
- package/dist/capacity-provider/environment-catalog.d.ts +84 -84
- package/dist/capacity-provider/sandbox-contracts.d.ts +2 -2
- package/dist/content/validation/agent-operational-content-schemas.d.ts +8 -8
- package/dist/content/validation/content-model-schemas.d.ts +9 -9
- package/dist/content/validation/portable-content-data.d.ts +1 -1
- package/dist/deployment/ai/storage.d.ts +158 -0
- package/dist/deployment/ai/storage.js +32 -0
- package/dist/deployment/hosted-topology.d.ts +23 -23
- package/dist/deployment/index.d.ts +1 -0
- package/dist/deployment/index.js +1 -0
- package/dist/operator-contracts/canonical-command-tree.js +9 -5
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +5 -5
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +3 -3
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +15 -0
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +4 -0
- package/dist/operator-contracts/catalog/treeai-operations.d.ts +3 -4
- package/dist/operator-contracts/catalog/treeai-operations.js +3 -4
- package/dist/operator-contracts/control-plane-operations.d.ts +23 -8
- package/dist/treeai/client.d.ts +0 -120
- package/dist/treeai/contract.d.ts +11 -12
- package/dist/treeai/contract.js +4 -4
- package/dist/treeai/generated/upstream.d.ts +0 -120
- package/dist/treeai/generated/upstream.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Public selection contains references only; the API resolves current service custody. */
|
|
3
|
+
export declare const aiStorageBindingSchema: z.ZodObject<{
|
|
4
|
+
connectionId: z.ZodString;
|
|
5
|
+
bucket: z.ZodString;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
connectionId: string;
|
|
8
|
+
bucket: string;
|
|
9
|
+
}, {
|
|
10
|
+
connectionId: string;
|
|
11
|
+
bucket: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const aiStorageProofSchema: z.ZodEffects<z.ZodObject<{
|
|
14
|
+
schemaVersion: z.ZodLiteral<"treeseed.ai-storage-proof/v1">;
|
|
15
|
+
teamId: z.ZodString;
|
|
16
|
+
projectId: z.ZodString;
|
|
17
|
+
nodeId: z.ZodString;
|
|
18
|
+
service: z.ZodEnum<["inference", "training", "lab"]>;
|
|
19
|
+
storeId: z.ZodEnum<["managed-inference", "managed-training", "managed-lab"]>;
|
|
20
|
+
action: z.ZodEnum<["read", "write", "list", "delete"]>;
|
|
21
|
+
key: z.ZodEffects<z.ZodString, string, string>;
|
|
22
|
+
issuedAt: z.ZodNumber;
|
|
23
|
+
nonce: z.ZodString;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
key: string;
|
|
26
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
27
|
+
action: "read" | "write" | "list" | "delete";
|
|
28
|
+
projectId: string;
|
|
29
|
+
teamId: string;
|
|
30
|
+
issuedAt: number;
|
|
31
|
+
nonce: string;
|
|
32
|
+
service: "inference" | "training" | "lab";
|
|
33
|
+
nodeId: string;
|
|
34
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
35
|
+
}, {
|
|
36
|
+
key: string;
|
|
37
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
38
|
+
action: "read" | "write" | "list" | "delete";
|
|
39
|
+
projectId: string;
|
|
40
|
+
teamId: string;
|
|
41
|
+
issuedAt: number;
|
|
42
|
+
nonce: string;
|
|
43
|
+
service: "inference" | "training" | "lab";
|
|
44
|
+
nodeId: string;
|
|
45
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
46
|
+
}>, {
|
|
47
|
+
key: string;
|
|
48
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
49
|
+
action: "read" | "write" | "list" | "delete";
|
|
50
|
+
projectId: string;
|
|
51
|
+
teamId: string;
|
|
52
|
+
issuedAt: number;
|
|
53
|
+
nonce: string;
|
|
54
|
+
service: "inference" | "training" | "lab";
|
|
55
|
+
nodeId: string;
|
|
56
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
57
|
+
}, {
|
|
58
|
+
key: string;
|
|
59
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
60
|
+
action: "read" | "write" | "list" | "delete";
|
|
61
|
+
projectId: string;
|
|
62
|
+
teamId: string;
|
|
63
|
+
issuedAt: number;
|
|
64
|
+
nonce: string;
|
|
65
|
+
service: "inference" | "training" | "lab";
|
|
66
|
+
nodeId: string;
|
|
67
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
68
|
+
}>;
|
|
69
|
+
export type AiStorageProof = z.infer<typeof aiStorageProofSchema>;
|
|
70
|
+
export declare const aiStorageRequestSchema: z.ZodObject<{
|
|
71
|
+
proof: z.ZodEffects<z.ZodObject<{
|
|
72
|
+
schemaVersion: z.ZodLiteral<"treeseed.ai-storage-proof/v1">;
|
|
73
|
+
teamId: z.ZodString;
|
|
74
|
+
projectId: z.ZodString;
|
|
75
|
+
nodeId: z.ZodString;
|
|
76
|
+
service: z.ZodEnum<["inference", "training", "lab"]>;
|
|
77
|
+
storeId: z.ZodEnum<["managed-inference", "managed-training", "managed-lab"]>;
|
|
78
|
+
action: z.ZodEnum<["read", "write", "list", "delete"]>;
|
|
79
|
+
key: z.ZodEffects<z.ZodString, string, string>;
|
|
80
|
+
issuedAt: z.ZodNumber;
|
|
81
|
+
nonce: z.ZodString;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
key: string;
|
|
84
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
85
|
+
action: "read" | "write" | "list" | "delete";
|
|
86
|
+
projectId: string;
|
|
87
|
+
teamId: string;
|
|
88
|
+
issuedAt: number;
|
|
89
|
+
nonce: string;
|
|
90
|
+
service: "inference" | "training" | "lab";
|
|
91
|
+
nodeId: string;
|
|
92
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
93
|
+
}, {
|
|
94
|
+
key: string;
|
|
95
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
96
|
+
action: "read" | "write" | "list" | "delete";
|
|
97
|
+
projectId: string;
|
|
98
|
+
teamId: string;
|
|
99
|
+
issuedAt: number;
|
|
100
|
+
nonce: string;
|
|
101
|
+
service: "inference" | "training" | "lab";
|
|
102
|
+
nodeId: string;
|
|
103
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
104
|
+
}>, {
|
|
105
|
+
key: string;
|
|
106
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
107
|
+
action: "read" | "write" | "list" | "delete";
|
|
108
|
+
projectId: string;
|
|
109
|
+
teamId: string;
|
|
110
|
+
issuedAt: number;
|
|
111
|
+
nonce: string;
|
|
112
|
+
service: "inference" | "training" | "lab";
|
|
113
|
+
nodeId: string;
|
|
114
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
115
|
+
}, {
|
|
116
|
+
key: string;
|
|
117
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
118
|
+
action: "read" | "write" | "list" | "delete";
|
|
119
|
+
projectId: string;
|
|
120
|
+
teamId: string;
|
|
121
|
+
issuedAt: number;
|
|
122
|
+
nonce: string;
|
|
123
|
+
service: "inference" | "training" | "lab";
|
|
124
|
+
nodeId: string;
|
|
125
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
126
|
+
}>;
|
|
127
|
+
signature: z.ZodString;
|
|
128
|
+
}, "strict", z.ZodTypeAny, {
|
|
129
|
+
proof: {
|
|
130
|
+
key: string;
|
|
131
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
132
|
+
action: "read" | "write" | "list" | "delete";
|
|
133
|
+
projectId: string;
|
|
134
|
+
teamId: string;
|
|
135
|
+
issuedAt: number;
|
|
136
|
+
nonce: string;
|
|
137
|
+
service: "inference" | "training" | "lab";
|
|
138
|
+
nodeId: string;
|
|
139
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
140
|
+
};
|
|
141
|
+
signature: string;
|
|
142
|
+
}, {
|
|
143
|
+
proof: {
|
|
144
|
+
key: string;
|
|
145
|
+
schemaVersion: "treeseed.ai-storage-proof/v1";
|
|
146
|
+
action: "read" | "write" | "list" | "delete";
|
|
147
|
+
projectId: string;
|
|
148
|
+
teamId: string;
|
|
149
|
+
issuedAt: number;
|
|
150
|
+
nonce: string;
|
|
151
|
+
service: "inference" | "training" | "lab";
|
|
152
|
+
nodeId: string;
|
|
153
|
+
storeId: "managed-inference" | "managed-training" | "managed-lab";
|
|
154
|
+
};
|
|
155
|
+
signature: string;
|
|
156
|
+
}>;
|
|
157
|
+
/** Domain-separated, deterministic bytes signed by a Deployment-owned Ed25519 identity. */
|
|
158
|
+
export declare function aiStorageProofMessage(input: AiStorageProof): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const aiStorageBindingSchema = z.object({
|
|
3
|
+
connectionId: z.string().uuid(),
|
|
4
|
+
bucket: z.string().regex(/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/u)
|
|
5
|
+
}).strict();
|
|
6
|
+
const aiStorageProofSchema = z.object({
|
|
7
|
+
schemaVersion: z.literal("treeseed.ai-storage-proof/v1"),
|
|
8
|
+
teamId: z.string().uuid(),
|
|
9
|
+
projectId: z.string().uuid(),
|
|
10
|
+
nodeId: z.string().uuid(),
|
|
11
|
+
service: z.enum(["inference", "training", "lab"]),
|
|
12
|
+
storeId: z.enum(["managed-inference", "managed-training", "managed-lab"]),
|
|
13
|
+
action: z.enum(["read", "write", "list", "delete"]),
|
|
14
|
+
key: z.string().max(1024).refine((value) => !/[\\\x00-\x1f\x7f%?#]/u.test(value) && (!value || !value.split("/").some((part) => !part || part === "." || part === "..")), "Use a relative artifact key."),
|
|
15
|
+
issuedAt: z.number().int().positive(),
|
|
16
|
+
nonce: z.string().uuid()
|
|
17
|
+
}).strict().refine((value) => value.action === "list" || value.key.length > 0, "An object key is required.");
|
|
18
|
+
const aiStorageRequestSchema = z.object({
|
|
19
|
+
proof: aiStorageProofSchema,
|
|
20
|
+
signature: z.string().regex(/^[A-Za-z0-9_-]{86}$/u)
|
|
21
|
+
}).strict();
|
|
22
|
+
function aiStorageProofMessage(input) {
|
|
23
|
+
const proof = aiStorageProofSchema.parse(input);
|
|
24
|
+
return `treeseed.ai-storage-proof/v1
|
|
25
|
+
${JSON.stringify(Object.fromEntries(Object.entries(proof).sort(([a], [b]) => a.localeCompare(b))))}`;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
aiStorageBindingSchema,
|
|
29
|
+
aiStorageProofMessage,
|
|
30
|
+
aiStorageProofSchema,
|
|
31
|
+
aiStorageRequestSchema
|
|
32
|
+
};
|
|
@@ -26,9 +26,9 @@ declare const hostedStateBackendCoreSchema: z.ZodObject<{
|
|
|
26
26
|
teamId: string;
|
|
27
27
|
environment: "production" | "staging";
|
|
28
28
|
deploymentId: string;
|
|
29
|
+
bucket: string;
|
|
29
30
|
stackId: string;
|
|
30
31
|
connectionRef: string;
|
|
31
|
-
bucket: string;
|
|
32
32
|
region: string;
|
|
33
33
|
encryptionKeyRef: string;
|
|
34
34
|
endpoint?: string | undefined;
|
|
@@ -40,9 +40,9 @@ declare const hostedStateBackendCoreSchema: z.ZodObject<{
|
|
|
40
40
|
teamId: string;
|
|
41
41
|
environment: "production" | "staging";
|
|
42
42
|
deploymentId: string;
|
|
43
|
+
bucket: string;
|
|
43
44
|
stackId: string;
|
|
44
45
|
connectionRef: string;
|
|
45
|
-
bucket: string;
|
|
46
46
|
region: string;
|
|
47
47
|
encryptionKeyRef: string;
|
|
48
48
|
endpoint?: string | undefined;
|
|
@@ -71,9 +71,9 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
|
|
|
71
71
|
teamId: string;
|
|
72
72
|
environment: "production" | "staging";
|
|
73
73
|
deploymentId: string;
|
|
74
|
+
bucket: string;
|
|
74
75
|
stackId: string;
|
|
75
76
|
connectionRef: string;
|
|
76
|
-
bucket: string;
|
|
77
77
|
region: string;
|
|
78
78
|
encryptionKeyRef: string;
|
|
79
79
|
bindingDigest: string;
|
|
@@ -86,9 +86,9 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
|
|
|
86
86
|
teamId: string;
|
|
87
87
|
environment: "production" | "staging";
|
|
88
88
|
deploymentId: string;
|
|
89
|
+
bucket: string;
|
|
89
90
|
stackId: string;
|
|
90
91
|
connectionRef: string;
|
|
91
|
-
bucket: string;
|
|
92
92
|
region: string;
|
|
93
93
|
encryptionKeyRef: string;
|
|
94
94
|
bindingDigest: string;
|
|
@@ -101,9 +101,9 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
|
|
|
101
101
|
teamId: string;
|
|
102
102
|
environment: "production" | "staging";
|
|
103
103
|
deploymentId: string;
|
|
104
|
+
bucket: string;
|
|
104
105
|
stackId: string;
|
|
105
106
|
connectionRef: string;
|
|
106
|
-
bucket: string;
|
|
107
107
|
region: string;
|
|
108
108
|
encryptionKeyRef: string;
|
|
109
109
|
bindingDigest: string;
|
|
@@ -116,9 +116,9 @@ export declare const hostedStateBackendSchema: z.ZodEffects<z.ZodObject<{
|
|
|
116
116
|
teamId: string;
|
|
117
117
|
environment: "production" | "staging";
|
|
118
118
|
deploymentId: string;
|
|
119
|
+
bucket: string;
|
|
119
120
|
stackId: string;
|
|
120
121
|
connectionRef: string;
|
|
121
|
-
bucket: string;
|
|
122
122
|
region: string;
|
|
123
123
|
encryptionKeyRef: string;
|
|
124
124
|
bindingDigest: string;
|
|
@@ -132,9 +132,9 @@ export declare function bindHostedStateBackend(input: z.input<typeof hostedState
|
|
|
132
132
|
teamId: string;
|
|
133
133
|
environment: "production" | "staging";
|
|
134
134
|
deploymentId: string;
|
|
135
|
+
bucket: string;
|
|
135
136
|
stackId: string;
|
|
136
137
|
connectionRef: string;
|
|
137
|
-
bucket: string;
|
|
138
138
|
region: string;
|
|
139
139
|
encryptionKeyRef: string;
|
|
140
140
|
bindingDigest: string;
|
|
@@ -786,9 +786,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
786
786
|
teamId: string;
|
|
787
787
|
environment: "production" | "staging";
|
|
788
788
|
deploymentId: string;
|
|
789
|
+
bucket: string;
|
|
789
790
|
stackId: string;
|
|
790
791
|
connectionRef: string;
|
|
791
|
-
bucket: string;
|
|
792
792
|
region: string;
|
|
793
793
|
encryptionKeyRef: string;
|
|
794
794
|
bindingDigest: string;
|
|
@@ -801,9 +801,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
801
801
|
teamId: string;
|
|
802
802
|
environment: "production" | "staging";
|
|
803
803
|
deploymentId: string;
|
|
804
|
+
bucket: string;
|
|
804
805
|
stackId: string;
|
|
805
806
|
connectionRef: string;
|
|
806
|
-
bucket: string;
|
|
807
807
|
region: string;
|
|
808
808
|
encryptionKeyRef: string;
|
|
809
809
|
bindingDigest: string;
|
|
@@ -816,9 +816,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
816
816
|
teamId: string;
|
|
817
817
|
environment: "production" | "staging";
|
|
818
818
|
deploymentId: string;
|
|
819
|
+
bucket: string;
|
|
819
820
|
stackId: string;
|
|
820
821
|
connectionRef: string;
|
|
821
|
-
bucket: string;
|
|
822
822
|
region: string;
|
|
823
823
|
encryptionKeyRef: string;
|
|
824
824
|
bindingDigest: string;
|
|
@@ -831,9 +831,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
831
831
|
teamId: string;
|
|
832
832
|
environment: "production" | "staging";
|
|
833
833
|
deploymentId: string;
|
|
834
|
+
bucket: string;
|
|
834
835
|
stackId: string;
|
|
835
836
|
connectionRef: string;
|
|
836
|
-
bucket: string;
|
|
837
837
|
region: string;
|
|
838
838
|
encryptionKeyRef: string;
|
|
839
839
|
bindingDigest: string;
|
|
@@ -1164,9 +1164,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1164
1164
|
teamId: string;
|
|
1165
1165
|
environment: "production" | "staging";
|
|
1166
1166
|
deploymentId: string;
|
|
1167
|
+
bucket: string;
|
|
1167
1168
|
stackId: string;
|
|
1168
1169
|
connectionRef: string;
|
|
1169
|
-
bucket: string;
|
|
1170
1170
|
region: string;
|
|
1171
1171
|
encryptionKeyRef: string;
|
|
1172
1172
|
bindingDigest: string;
|
|
@@ -1249,9 +1249,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1249
1249
|
teamId: string;
|
|
1250
1250
|
environment: "production" | "staging";
|
|
1251
1251
|
deploymentId: string;
|
|
1252
|
+
bucket: string;
|
|
1252
1253
|
stackId: string;
|
|
1253
1254
|
connectionRef: string;
|
|
1254
|
-
bucket: string;
|
|
1255
1255
|
region: string;
|
|
1256
1256
|
encryptionKeyRef: string;
|
|
1257
1257
|
bindingDigest: string;
|
|
@@ -1334,9 +1334,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1334
1334
|
teamId: string;
|
|
1335
1335
|
environment: "production" | "staging";
|
|
1336
1336
|
deploymentId: string;
|
|
1337
|
+
bucket: string;
|
|
1337
1338
|
stackId: string;
|
|
1338
1339
|
connectionRef: string;
|
|
1339
|
-
bucket: string;
|
|
1340
1340
|
region: string;
|
|
1341
1341
|
encryptionKeyRef: string;
|
|
1342
1342
|
bindingDigest: string;
|
|
@@ -1419,9 +1419,9 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1419
1419
|
teamId: string;
|
|
1420
1420
|
environment: "production" | "staging";
|
|
1421
1421
|
deploymentId: string;
|
|
1422
|
+
bucket: string;
|
|
1422
1423
|
stackId: string;
|
|
1423
1424
|
connectionRef: string;
|
|
1424
|
-
bucket: string;
|
|
1425
1425
|
region: string;
|
|
1426
1426
|
encryptionKeyRef: string;
|
|
1427
1427
|
bindingDigest: string;
|
|
@@ -1472,9 +1472,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1472
1472
|
teamId: string;
|
|
1473
1473
|
environment: "production" | "staging";
|
|
1474
1474
|
deploymentId: string;
|
|
1475
|
+
bucket: string;
|
|
1475
1476
|
stackId: string;
|
|
1476
1477
|
connectionRef: string;
|
|
1477
|
-
bucket: string;
|
|
1478
1478
|
region: string;
|
|
1479
1479
|
encryptionKeyRef: string;
|
|
1480
1480
|
bindingDigest: string;
|
|
@@ -1487,9 +1487,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1487
1487
|
teamId: string;
|
|
1488
1488
|
environment: "production" | "staging";
|
|
1489
1489
|
deploymentId: string;
|
|
1490
|
+
bucket: string;
|
|
1490
1491
|
stackId: string;
|
|
1491
1492
|
connectionRef: string;
|
|
1492
|
-
bucket: string;
|
|
1493
1493
|
region: string;
|
|
1494
1494
|
encryptionKeyRef: string;
|
|
1495
1495
|
bindingDigest: string;
|
|
@@ -1502,9 +1502,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1502
1502
|
teamId: string;
|
|
1503
1503
|
environment: "production" | "staging";
|
|
1504
1504
|
deploymentId: string;
|
|
1505
|
+
bucket: string;
|
|
1505
1506
|
stackId: string;
|
|
1506
1507
|
connectionRef: string;
|
|
1507
|
-
bucket: string;
|
|
1508
1508
|
region: string;
|
|
1509
1509
|
encryptionKeyRef: string;
|
|
1510
1510
|
bindingDigest: string;
|
|
@@ -1517,9 +1517,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1517
1517
|
teamId: string;
|
|
1518
1518
|
environment: "production" | "staging";
|
|
1519
1519
|
deploymentId: string;
|
|
1520
|
+
bucket: string;
|
|
1520
1521
|
stackId: string;
|
|
1521
1522
|
connectionRef: string;
|
|
1522
|
-
bucket: string;
|
|
1523
1523
|
region: string;
|
|
1524
1524
|
encryptionKeyRef: string;
|
|
1525
1525
|
bindingDigest: string;
|
|
@@ -1849,9 +1849,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1849
1849
|
teamId: string;
|
|
1850
1850
|
environment: "production" | "staging";
|
|
1851
1851
|
deploymentId: string;
|
|
1852
|
+
bucket: string;
|
|
1852
1853
|
stackId: string;
|
|
1853
1854
|
connectionRef: string;
|
|
1854
|
-
bucket: string;
|
|
1855
1855
|
region: string;
|
|
1856
1856
|
encryptionKeyRef: string;
|
|
1857
1857
|
bindingDigest: string;
|
|
@@ -1934,9 +1934,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
1934
1934
|
teamId: string;
|
|
1935
1935
|
environment: "production" | "staging";
|
|
1936
1936
|
deploymentId: string;
|
|
1937
|
+
bucket: string;
|
|
1937
1938
|
stackId: string;
|
|
1938
1939
|
connectionRef: string;
|
|
1939
|
-
bucket: string;
|
|
1940
1940
|
region: string;
|
|
1941
1941
|
encryptionKeyRef: string;
|
|
1942
1942
|
bindingDigest: string;
|
|
@@ -2019,9 +2019,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
2019
2019
|
teamId: string;
|
|
2020
2020
|
environment: "production" | "staging";
|
|
2021
2021
|
deploymentId: string;
|
|
2022
|
+
bucket: string;
|
|
2022
2023
|
stackId: string;
|
|
2023
2024
|
connectionRef: string;
|
|
2024
|
-
bucket: string;
|
|
2025
2025
|
region: string;
|
|
2026
2026
|
encryptionKeyRef: string;
|
|
2027
2027
|
bindingDigest: string;
|
|
@@ -2104,9 +2104,9 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
|
|
|
2104
2104
|
teamId: string;
|
|
2105
2105
|
environment: "production" | "staging";
|
|
2106
2106
|
deploymentId: string;
|
|
2107
|
+
bucket: string;
|
|
2107
2108
|
stackId: string;
|
|
2108
2109
|
connectionRef: string;
|
|
2109
|
-
bucket: string;
|
|
2110
2110
|
region: string;
|
|
2111
2111
|
encryptionKeyRef: string;
|
|
2112
2112
|
bindingDigest: string;
|
package/dist/deployment/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const field = (target, name, source, sourceName = name, required = false, transf
|
|
|
12
12
|
const operation = (operationId, input = []) => ({ kind: "operation", operationId, input });
|
|
13
13
|
const page = () => [field("query", "status", "option"), field("query", "limit", "option", "limit", false, "integer"), field("query", "cursor", "option")];
|
|
14
14
|
const aiNode = () => field("path", "nodeId", "context", "node", true);
|
|
15
|
+
const aiInstance = () => [field("path", "teamId", "context", "team", true), field("path", "instanceId", "context", "node", true)];
|
|
15
16
|
const operationBindings = {
|
|
16
17
|
...PROVIDER_ENVIRONMENT_COMMAND_BINDINGS,
|
|
17
18
|
"auth login": protocol("protocol.oauth.device.login"),
|
|
@@ -146,7 +147,10 @@ const operationBindings = {
|
|
|
146
147
|
"projects treedx workspaces list": operation("treedx.workspaces.list", [field("path", "projectId", "argument", "project", true), ...page()]),
|
|
147
148
|
"projects treedx workspaces show": operation("treedx.workspaces.show", [field("path", "projectId", "context", "project", true), field("path", "workspaceId", "argument", "workspace", true)]),
|
|
148
149
|
"projects treedx workspaces abandon": operation("treedx.workspaces.abandon", [field("path", "projectId", "context", "project", true), field("path", "workspaceId", "argument", "workspace", true)]),
|
|
149
|
-
"ai status": operation("
|
|
150
|
+
"ai status": operation("ai.instances.show", aiInstance()),
|
|
151
|
+
"ai storage show": operation("ai.instances.storage.show", aiInstance()),
|
|
152
|
+
"ai storage connect": operation("ai.instances.storage.put", [...aiInstance(), field("body", "connectionId", "option", "connection", true), field("body", "bucket", "option", "bucket", true)]),
|
|
153
|
+
"ai storage disconnect": operation("ai.instances.storage.remove", aiInstance()),
|
|
150
154
|
"ai mode show": local("local.host.ai.mode.show"),
|
|
151
155
|
"ai mode set": local("local.host.ai.mode.set"),
|
|
152
156
|
"ai inference models": operation("treeai.inference.get.models", [aiNode()]),
|
|
@@ -158,9 +162,6 @@ const operationBindings = {
|
|
|
158
162
|
"ai lab status": operation("treeai.lab.get.status", [aiNode()]),
|
|
159
163
|
"ai lab agents": operation("treeai.lab.get.agents", [aiNode()]),
|
|
160
164
|
"ai lab libraries": operation("treeai.lab.get.libraries", [aiNode()]),
|
|
161
|
-
"ai qualify status": operation("treeai.qualification.get.qualification.profile", [aiNode()]),
|
|
162
|
-
"ai qualify run": operation("treeai.qualification.post.qualification.campaigns", [aiNode()]),
|
|
163
|
-
"ai qualify campaigns": operation("treeai.qualification.get.qualification.campaigns", [aiNode()]),
|
|
164
165
|
"library show": local("local.library.show"),
|
|
165
166
|
"library status": local("local.library.status"),
|
|
166
167
|
"library paths": local("local.library.paths"),
|
|
@@ -481,7 +482,10 @@ const commandTree = {
|
|
|
481
482
|
branch("inference", [leaf("models"), leaf("jobs"), leaf("rollback", "mutation", void 0, "destructive")]),
|
|
482
483
|
branch("training", [leaf("libraries"), leaf("jobs"), leaf("runs")]),
|
|
483
484
|
branch("lab", [leaf("status"), leaf("agents"), leaf("libraries")]),
|
|
484
|
-
branch("
|
|
485
|
+
branch("storage", [leaf("show"), addOptions(leaf("connect", "mutation"), [
|
|
486
|
+
{ name: "--connection", description: "Team object-storage service connection ID.", type: "string", required: true },
|
|
487
|
+
{ name: "--bucket", description: "Private artifact bucket to ensure and bind.", type: "string", required: true }
|
|
488
|
+
]), leaf("disconnect", "mutation")])
|
|
485
489
|
]),
|
|
486
490
|
branch("library", [
|
|
487
491
|
libraryRead("show"),
|
|
@@ -109,6 +109,11 @@ export declare function capabilityOntologyOperations(): {
|
|
|
109
109
|
digest: string;
|
|
110
110
|
createdAt: string;
|
|
111
111
|
generation: number;
|
|
112
|
+
signature: {
|
|
113
|
+
value: string;
|
|
114
|
+
algorithm: "Ed25519" | "release-catalog";
|
|
115
|
+
keyId: string;
|
|
116
|
+
};
|
|
112
117
|
definitions: {
|
|
113
118
|
status: "revoked" | "active" | "deprecated";
|
|
114
119
|
schemaVersion: "treeseed.capability-definition/v1";
|
|
@@ -154,10 +159,5 @@ export declare function capabilityOntologyOperations(): {
|
|
|
154
159
|
}[];
|
|
155
160
|
qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
|
|
156
161
|
}[];
|
|
157
|
-
signature: {
|
|
158
|
-
value: string;
|
|
159
|
-
algorithm: "Ed25519" | "release-catalog";
|
|
160
|
-
keyId: string;
|
|
161
|
-
};
|
|
162
162
|
}>;
|
|
163
163
|
};
|
|
@@ -131,9 +131,9 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
131
131
|
teamId: string;
|
|
132
132
|
environment: "production" | "staging";
|
|
133
133
|
deploymentId: string;
|
|
134
|
+
bucket: string;
|
|
134
135
|
stackId: string;
|
|
135
136
|
connectionRef: string;
|
|
136
|
-
bucket: string;
|
|
137
137
|
region: string;
|
|
138
138
|
encryptionKeyRef: string;
|
|
139
139
|
bindingDigest: string;
|
|
@@ -291,9 +291,9 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
291
291
|
teamId: string;
|
|
292
292
|
environment: "production" | "staging";
|
|
293
293
|
deploymentId: string;
|
|
294
|
+
bucket: string;
|
|
294
295
|
stackId: string;
|
|
295
296
|
connectionRef: string;
|
|
296
|
-
bucket: string;
|
|
297
297
|
region: string;
|
|
298
298
|
encryptionKeyRef: string;
|
|
299
299
|
bindingDigest: string;
|
|
@@ -377,9 +377,9 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
|
|
|
377
377
|
teamId: string;
|
|
378
378
|
environment: "production" | "staging";
|
|
379
379
|
deploymentId: string;
|
|
380
|
+
bucket: string;
|
|
380
381
|
stackId: string;
|
|
381
382
|
connectionRef: string;
|
|
382
|
-
bucket: string;
|
|
383
383
|
region: string;
|
|
384
384
|
encryptionKeyRef: string;
|
|
385
385
|
bindingDigest: string;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
export declare const AI_INSTANCE_OPERATIONS: {
|
|
2
|
+
storageShow: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
3
|
+
teamId: string;
|
|
4
|
+
instanceId: string;
|
|
5
|
+
}, {}, undefined, Record<string, unknown>>;
|
|
6
|
+
storagePut: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
7
|
+
teamId: string;
|
|
8
|
+
instanceId: string;
|
|
9
|
+
}, {}, {
|
|
10
|
+
connectionId: string;
|
|
11
|
+
bucket: string;
|
|
12
|
+
}, Record<string, unknown>>;
|
|
13
|
+
storageRemove: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
14
|
+
teamId: string;
|
|
15
|
+
instanceId: string;
|
|
16
|
+
}, {}, {}, Record<string, unknown>>;
|
|
2
17
|
register: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
3
18
|
teamId: string;
|
|
4
19
|
instanceId: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineOperation } from "../../operation-builder.js";
|
|
3
3
|
import { aiInstanceDraftSchema, aiNodeRegistrationSchema } from "../../../deployment/ai-instance.js";
|
|
4
|
+
import { aiStorageBindingSchema } from "../../../deployment/ai/storage.js";
|
|
4
5
|
const team = z.object({ teamId: z.string().min(1) }).strict(), instance = team.extend({ instanceId: z.string().uuid() });
|
|
5
6
|
const empty = z.object({}).strict(), record = z.record(z.unknown());
|
|
6
7
|
function descriptor(action, method, path) {
|
|
@@ -8,6 +9,9 @@ function descriptor(action, method, path) {
|
|
|
8
9
|
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
|
}
|
|
10
11
|
const AI_INSTANCE_OPERATIONS = {
|
|
12
|
+
storageShow: defineOperation({ ...descriptor("storageShow", "GET", "/v1/teams/{teamId}/ai-instances/{instanceId}/storage"), operationId: "ai.instances.storage.show", parameters: "treeseed.ai.instances.storage.show.parameters/v1" }, { path: instance, query: empty, body: z.undefined(), output: record }),
|
|
13
|
+
storagePut: defineOperation({ ...descriptor("storagePut", "PUT", "/v1/teams/{teamId}/ai-instances/{instanceId}/storage"), operationId: "ai.instances.storage.put", parameters: "treeseed.ai.instances.storage.put.parameters/v1" }, { path: instance, query: empty, body: aiStorageBindingSchema, output: record }),
|
|
14
|
+
storageRemove: defineOperation({ ...descriptor("storageRemove", "DELETE", "/v1/teams/{teamId}/ai-instances/{instanceId}/storage"), operationId: "ai.instances.storage.remove", parameters: "treeseed.ai.instances.storage.remove.parameters/v1" }, { path: instance, query: empty, body: empty, output: record }),
|
|
11
15
|
register: defineOperation(descriptor("register", "PUT", "/v1/teams/{teamId}/ai-instances/{instanceId}/registration"), { path: instance, query: empty, body: aiNodeRegistrationSchema, output: record }),
|
|
12
16
|
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 }),
|
|
13
17
|
show: defineOperation(descriptor("show", "GET", "/v1/teams/{teamId}/ai-instances/{instanceId}"), { path: instance, query: empty, body: z.undefined(), output: record }),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ControlPlaneOperationBinding } from '../control-plane-operation.js';
|
|
2
2
|
export declare const TREEAI_OPENAPI_DIGESTS: {
|
|
3
|
-
readonly inference: "sha256:
|
|
4
|
-
readonly training: "sha256:
|
|
5
|
-
readonly lab: "sha256:
|
|
6
|
-
readonly qualification: "sha256:3f68b78845ec19c5de389663f1cb677ab4df0683ecd113c4f5780885a89370b7";
|
|
3
|
+
readonly inference: "sha256:29255fae4e74aa0fb96d8abd1cdc5d869f469fc9bb55a68060eeae6d86f4273d";
|
|
4
|
+
readonly training: "sha256:de80f39ca9d0d5a2a7ca6ce588326d3a562c771bc7e077b7e6c4949134ef2143";
|
|
5
|
+
readonly lab: "sha256:8f9a3ca31a63143506e1b28ddb78eda50b2f6760278531b723047d968f56aa07";
|
|
7
6
|
};
|
|
8
7
|
export declare const TREEAI_CONTROL_PLANE_OPERATION_LIST: readonly ControlPlaneOperationBinding<{
|
|
9
8
|
nodeId: string;
|
|
@@ -2,10 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
import { defineOperation } from "../operation-builder.js";
|
|
3
3
|
import { TREEAI_UPSTREAM_OPERATIONS } from "../../treeai/generated/upstream.js";
|
|
4
4
|
const TREEAI_OPENAPI_DIGESTS = {
|
|
5
|
-
inference: "sha256:
|
|
6
|
-
training: "sha256:
|
|
7
|
-
lab: "sha256:
|
|
8
|
-
qualification: "sha256:3f68b78845ec19c5de389663f1cb677ab4df0683ecd113c4f5780885a89370b7"
|
|
5
|
+
inference: "sha256:29255fae4e74aa0fb96d8abd1cdc5d869f469fc9bb55a68060eeae6d86f4273d",
|
|
6
|
+
training: "sha256:de80f39ca9d0d5a2a7ca6ce588326d3a562c771bc7e077b7e6c4949134ef2143",
|
|
7
|
+
lab: "sha256:8f9a3ca31a63143506e1b28ddb78eda50b2f6760278531b723047d968f56aa07"
|
|
9
8
|
};
|
|
10
9
|
function treeSeedOperationId(operation) {
|
|
11
10
|
return `treeai.${operation.operationId.toLowerCase().replace(/[^a-z0-9]+/gu, ".").replace(/^\.|\.$/gu, "")}`;
|