@treeseed/sdk 0.13.0-rc.91 → 0.13.0-rc.93
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/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 +12 -12
- package/dist/content/validation/content-model-schemas.d.ts +13 -13
- package/dist/content/validation/portable-content-data.d.ts +1 -1
- 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/index.d.ts +2 -0
- package/dist/deployment/index.js +2 -0
- package/dist/operator-contracts/canonical-command-tree.js +3 -10
- package/dist/operator-contracts/catalog/communication-operations.d.ts +2 -2
- 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 +18 -18
- package/dist/operator-contracts/control-plane-operations.d.ts +35 -2
- package/dist/operator-contracts/control-plane-operations.js +5 -18
- package/dist/operator-contracts/operation-builder.d.ts +1 -0
- package/dist/operator-contracts/operation-builder.js +17 -0
- 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/dist/treedx/client.d.ts +8 -0
- package/dist/treedx/contract.d.ts +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u);
|
|
3
|
+
const name = z.string().trim().min(1).max(128);
|
|
4
|
+
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
|
|
5
|
+
const time = z.string().regex(/^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/u);
|
|
6
|
+
const aiHostingScheduleSchema = z.object({
|
|
7
|
+
timeZone: z.string().refine((value) => {
|
|
8
|
+
try {
|
|
9
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
10
|
+
return true;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}, "Use an IANA time zone."),
|
|
15
|
+
weekdays: z.array(z.number().int().min(1).max(7)).min(1).max(7),
|
|
16
|
+
start: time,
|
|
17
|
+
end: time,
|
|
18
|
+
startupLeadMinutes: z.number().int().min(0).max(120),
|
|
19
|
+
idleAction: z.literal("hibernate"),
|
|
20
|
+
activeWorkPolicy: z.literal("drain-and-checkpoint")
|
|
21
|
+
}).strict().superRefine((value, context) => {
|
|
22
|
+
if (new Set(value.weekdays).size !== value.weekdays.length) context.addIssue({ code: "custom", path: ["weekdays"], message: "Choose each weekday once." });
|
|
23
|
+
if (value.start >= value.end) context.addIssue({ code: "custom", path: ["end"], message: "End must follow start on the same local day." });
|
|
24
|
+
});
|
|
25
|
+
const storage = z.object({
|
|
26
|
+
bindingId: id,
|
|
27
|
+
purpose: z.enum(["datasets", "models", "checkpoints", "artifacts"]),
|
|
28
|
+
access: z.enum(["read", "write"])
|
|
29
|
+
}).strict();
|
|
30
|
+
const component = z.object({ componentId: z.enum(["ai-inference", "ai-training"]), releaseDigest: digest }).strict();
|
|
31
|
+
const aiHostingDeploymentSchema = z.object({
|
|
32
|
+
schemaVersion: z.literal("treeseed.ai-hosting-deployment/v1"),
|
|
33
|
+
teamId: id,
|
|
34
|
+
projectId: id,
|
|
35
|
+
deploymentId: id,
|
|
36
|
+
environment: z.enum(["staging", "production"]),
|
|
37
|
+
provider: z.literal("hyperstack"),
|
|
38
|
+
hostingBindingId: id,
|
|
39
|
+
components: z.array(component).min(1).max(2),
|
|
40
|
+
machine: z.object({ name, environmentName: name, flavorName: name, imageName: name, keypairName: name, volumeName: name }).strict(),
|
|
41
|
+
gpuAdmission: z.literal("exclusive-engine"),
|
|
42
|
+
storage: z.array(storage).min(1).max(16),
|
|
43
|
+
schedule: aiHostingScheduleSchema.optional()
|
|
44
|
+
}).strict().superRefine((value, context) => {
|
|
45
|
+
if (new Set(value.components.map((item) => item.componentId)).size !== value.components.length)
|
|
46
|
+
context.addIssue({ code: "custom", path: ["components"], message: "Each engine can be selected once." });
|
|
47
|
+
if (!value.storage.some((item) => item.purpose === "models" && item.access === "read"))
|
|
48
|
+
context.addIssue({ code: "custom", path: ["storage"], message: "An authorized model read binding is required." });
|
|
49
|
+
if (value.components.some((item) => item.componentId === "ai-training")) {
|
|
50
|
+
for (const [purpose, access] of [["datasets", "read"], ["checkpoints", "write"]])
|
|
51
|
+
if (!value.storage.some((item) => item.purpose === purpose && item.access === access))
|
|
52
|
+
context.addIssue({ code: "custom", path: ["storage"], message: `Training requires ${purpose} ${access} access.` });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const AI_HOSTING_TARGETS = [
|
|
56
|
+
{ id: "ai-inference", project: "ai", engine: "vllm", capability: "ai-inference-hosting", runtimeOwner: "ai", infrastructureOwner: "deployment" },
|
|
57
|
+
{ id: "ai-training", project: "ai", engine: "axolotl", capability: "ai-training-hosting", runtimeOwner: "ai", infrastructureOwner: "deployment" }
|
|
58
|
+
];
|
|
59
|
+
export {
|
|
60
|
+
AI_HOSTING_TARGETS,
|
|
61
|
+
aiHostingDeploymentSchema,
|
|
62
|
+
aiHostingScheduleSchema
|
|
63
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const aiInstanceDraftSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
projectId: z.ZodString;
|
|
5
|
+
purpose: z.ZodEnum<["inference", "training", "both"]>;
|
|
6
|
+
hostingConnectionId: z.ZodString;
|
|
7
|
+
storageConnectionId: z.ZodNullable<z.ZodString>;
|
|
8
|
+
model: z.ZodString;
|
|
9
|
+
schedule: z.ZodEnum<["always", "weekdays"]>;
|
|
10
|
+
timeZone: z.ZodEffects<z.ZodString, string, string>;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
purpose: "inference" | "training" | "both";
|
|
15
|
+
timeZone: string;
|
|
16
|
+
schedule: "weekdays" | "always";
|
|
17
|
+
hostingConnectionId: string;
|
|
18
|
+
storageConnectionId: string | null;
|
|
19
|
+
model: string;
|
|
20
|
+
}, {
|
|
21
|
+
name: string;
|
|
22
|
+
projectId: string;
|
|
23
|
+
purpose: "inference" | "training" | "both";
|
|
24
|
+
timeZone: string;
|
|
25
|
+
schedule: "weekdays" | "always";
|
|
26
|
+
hostingConnectionId: string;
|
|
27
|
+
storageConnectionId: string | null;
|
|
28
|
+
model: string;
|
|
29
|
+
}>, {
|
|
30
|
+
name: string;
|
|
31
|
+
projectId: string;
|
|
32
|
+
purpose: "inference" | "training" | "both";
|
|
33
|
+
timeZone: string;
|
|
34
|
+
schedule: "weekdays" | "always";
|
|
35
|
+
hostingConnectionId: string;
|
|
36
|
+
storageConnectionId: string | null;
|
|
37
|
+
model: string;
|
|
38
|
+
}, {
|
|
39
|
+
name: string;
|
|
40
|
+
projectId: string;
|
|
41
|
+
purpose: "inference" | "training" | "both";
|
|
42
|
+
timeZone: string;
|
|
43
|
+
schedule: "weekdays" | "always";
|
|
44
|
+
hostingConnectionId: string;
|
|
45
|
+
storageConnectionId: string | null;
|
|
46
|
+
model: string;
|
|
47
|
+
}>;
|
|
48
|
+
export type AiInstanceDraft = z.infer<typeof aiInstanceDraftSchema>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const aiInstanceDraftSchema = z.object({
|
|
3
|
+
name: z.string().trim().min(1).max(128),
|
|
4
|
+
projectId: z.string().min(1).max(128),
|
|
5
|
+
purpose: z.enum(["inference", "training", "both"]),
|
|
6
|
+
hostingConnectionId: z.string().min(1).max(128),
|
|
7
|
+
storageConnectionId: z.string().min(1).max(128).nullable(),
|
|
8
|
+
model: z.string().trim().min(1).max(512),
|
|
9
|
+
schedule: z.enum(["always", "weekdays"]),
|
|
10
|
+
timeZone: z.string().refine((value) => {
|
|
11
|
+
try {
|
|
12
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
13
|
+
return true;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}, "Use an IANA time zone.")
|
|
18
|
+
}).strict().superRefine((value, context) => {
|
|
19
|
+
if (value.purpose !== "inference" && !value.storageConnectionId) context.addIssue({ code: "custom", path: ["storageConnectionId"], message: "Training requires a storage connection." });
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
aiInstanceDraftSchema
|
|
23
|
+
};
|
|
@@ -3,5 +3,7 @@ export * from './canonical.js';
|
|
|
3
3
|
export * from './catalog.js';
|
|
4
4
|
export * from './topology.js';
|
|
5
5
|
export * from './ai-mode.js';
|
|
6
|
+
export * from './ai-hosting.js';
|
|
7
|
+
export * from './ai-instance.js';
|
|
6
8
|
export * from './hosted-topology.js';
|
|
7
9
|
export * from './hosted-topology-template.js';
|
package/dist/deployment/index.js
CHANGED
|
@@ -3,5 +3,7 @@ export * from "./canonical.js";
|
|
|
3
3
|
export * from "./catalog.js";
|
|
4
4
|
export * from "./topology.js";
|
|
5
5
|
export * from "./ai-mode.js";
|
|
6
|
+
export * from "./ai-hosting.js";
|
|
7
|
+
export * from "./ai-instance.js";
|
|
6
8
|
export * from "./hosted-topology.js";
|
|
7
9
|
export * from "./hosted-topology-template.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { commandPaths } from "./catalog/infrastructure/command-tree-paths.js";
|
|
1
2
|
import { managedSecretCommands } from "./catalog/services/secret-commands.js";
|
|
2
3
|
import { hostProviderEnvironmentBranch, PROVIDER_ENVIRONMENT_COMMAND_BINDINGS, providerEnvironmentBranches } from "./catalog/provider-environment-commands.js";
|
|
3
4
|
const unavailable = (reason = "This capability is not enabled until its control-plane operation is accepted.") => ({
|
|
@@ -230,6 +231,7 @@ function hostInitialize() {
|
|
|
230
231
|
value.description = "Initialize the generic host foundation from an immutable catalog-bound profile.";
|
|
231
232
|
value.options = [
|
|
232
233
|
...value.options ?? [],
|
|
234
|
+
{ name: "--input-file", description: "Team capacity installation configuration downloaded from Admin. Values are never printed.", type: "string" },
|
|
233
235
|
{ name: "--profile", description: "Catalog-bound host initialization profile.", type: "string", required: true },
|
|
234
236
|
{ name: "--confirm", description: "Confirm installation of the reviewed profile plan.", type: "boolean" },
|
|
235
237
|
{ name: "--yes", description: "Confirm non-interactive execution after reviewing the plan.", type: "boolean" }
|
|
@@ -515,16 +517,7 @@ function attachExecution(nodes, parent = []) {
|
|
|
515
517
|
attachExecution(commandTree.commands);
|
|
516
518
|
const TREESEED_COMMAND_TREE_V1 = commandTree;
|
|
517
519
|
function listCommandPaths(tree = TREESEED_COMMAND_TREE_V1) {
|
|
518
|
-
|
|
519
|
-
const visit = (nodes, parent) => {
|
|
520
|
-
for (const node of nodes) {
|
|
521
|
-
const path = [...parent, node.segment];
|
|
522
|
-
if (node.nodeType === "leaf") paths.push(path.join(" "));
|
|
523
|
-
else visit(node.children, path);
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
visit(tree.commands, []);
|
|
527
|
-
return paths;
|
|
520
|
+
return commandPaths(tree);
|
|
528
521
|
}
|
|
529
522
|
export {
|
|
530
523
|
TREESEED_COMMAND_TREE_V1,
|
|
@@ -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: {
|
|
@@ -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: {
|
|
@@ -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
|
+
};
|
|
@@ -108,12 +108,12 @@ export declare const communicationDiagnosticSchema: z.ZodObject<{
|
|
|
108
108
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
109
109
|
}, "strict", z.ZodTypeAny, {
|
|
110
110
|
capabilities: string[];
|
|
111
|
-
parameters: Record<string, unknown>;
|
|
112
111
|
model: string | null;
|
|
112
|
+
parameters: Record<string, unknown>;
|
|
113
113
|
}, {
|
|
114
114
|
capabilities: string[];
|
|
115
|
-
parameters: Record<string, unknown>;
|
|
116
115
|
model: string | null;
|
|
116
|
+
parameters: Record<string, unknown>;
|
|
117
117
|
}>;
|
|
118
118
|
identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
119
119
|
contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
@@ -126,8 +126,8 @@ export declare const communicationDiagnosticSchema: z.ZodObject<{
|
|
|
126
126
|
resources: Record<string, unknown>;
|
|
127
127
|
selection: {
|
|
128
128
|
capabilities: string[];
|
|
129
|
-
parameters: Record<string, unknown>;
|
|
130
129
|
model: string | null;
|
|
130
|
+
parameters: Record<string, unknown>;
|
|
131
131
|
};
|
|
132
132
|
reason: string | null;
|
|
133
133
|
provider: {
|
|
@@ -146,8 +146,8 @@ export declare const communicationDiagnosticSchema: z.ZodObject<{
|
|
|
146
146
|
resources: Record<string, unknown>;
|
|
147
147
|
selection: {
|
|
148
148
|
capabilities: string[];
|
|
149
|
-
parameters: Record<string, unknown>;
|
|
150
149
|
model: string | null;
|
|
150
|
+
parameters: Record<string, unknown>;
|
|
151
151
|
};
|
|
152
152
|
reason: string | null;
|
|
153
153
|
provider: {
|
|
@@ -264,12 +264,12 @@ export declare const communicationTargetSchema: z.ZodObject<{
|
|
|
264
264
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
265
265
|
}, "strict", z.ZodTypeAny, {
|
|
266
266
|
capabilities: string[];
|
|
267
|
-
parameters: Record<string, unknown>;
|
|
268
267
|
model: string | null;
|
|
268
|
+
parameters: Record<string, unknown>;
|
|
269
269
|
}, {
|
|
270
270
|
capabilities: string[];
|
|
271
|
-
parameters: Record<string, unknown>;
|
|
272
271
|
model: string | null;
|
|
272
|
+
parameters: Record<string, unknown>;
|
|
273
273
|
}>;
|
|
274
274
|
identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
275
275
|
contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
@@ -282,8 +282,8 @@ export declare const communicationTargetSchema: z.ZodObject<{
|
|
|
282
282
|
resources: Record<string, unknown>;
|
|
283
283
|
selection: {
|
|
284
284
|
capabilities: string[];
|
|
285
|
-
parameters: Record<string, unknown>;
|
|
286
285
|
model: string | null;
|
|
286
|
+
parameters: Record<string, unknown>;
|
|
287
287
|
};
|
|
288
288
|
reason: string | null;
|
|
289
289
|
provider: {
|
|
@@ -302,8 +302,8 @@ export declare const communicationTargetSchema: z.ZodObject<{
|
|
|
302
302
|
resources: Record<string, unknown>;
|
|
303
303
|
selection: {
|
|
304
304
|
capabilities: string[];
|
|
305
|
-
parameters: Record<string, unknown>;
|
|
306
305
|
model: string | null;
|
|
306
|
+
parameters: Record<string, unknown>;
|
|
307
307
|
};
|
|
308
308
|
reason: string | null;
|
|
309
309
|
provider: {
|
|
@@ -343,8 +343,8 @@ export declare const communicationTargetSchema: z.ZodObject<{
|
|
|
343
343
|
resources: Record<string, unknown>;
|
|
344
344
|
selection: {
|
|
345
345
|
capabilities: string[];
|
|
346
|
-
parameters: Record<string, unknown>;
|
|
347
346
|
model: string | null;
|
|
347
|
+
parameters: Record<string, unknown>;
|
|
348
348
|
};
|
|
349
349
|
reason: string | null;
|
|
350
350
|
provider: {
|
|
@@ -402,8 +402,8 @@ export declare const communicationTargetSchema: z.ZodObject<{
|
|
|
402
402
|
resources: Record<string, unknown>;
|
|
403
403
|
selection: {
|
|
404
404
|
capabilities: string[];
|
|
405
|
-
parameters: Record<string, unknown>;
|
|
406
405
|
model: string | null;
|
|
406
|
+
parameters: Record<string, unknown>;
|
|
407
407
|
};
|
|
408
408
|
reason: string | null;
|
|
409
409
|
provider: {
|
|
@@ -609,12 +609,12 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
609
609
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
610
610
|
}, "strict", z.ZodTypeAny, {
|
|
611
611
|
capabilities: string[];
|
|
612
|
-
parameters: Record<string, unknown>;
|
|
613
612
|
model: string | null;
|
|
613
|
+
parameters: Record<string, unknown>;
|
|
614
614
|
}, {
|
|
615
615
|
capabilities: string[];
|
|
616
|
-
parameters: Record<string, unknown>;
|
|
617
616
|
model: string | null;
|
|
617
|
+
parameters: Record<string, unknown>;
|
|
618
618
|
}>;
|
|
619
619
|
identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
620
620
|
contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
@@ -627,8 +627,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
627
627
|
resources: Record<string, unknown>;
|
|
628
628
|
selection: {
|
|
629
629
|
capabilities: string[];
|
|
630
|
-
parameters: Record<string, unknown>;
|
|
631
630
|
model: string | null;
|
|
631
|
+
parameters: Record<string, unknown>;
|
|
632
632
|
};
|
|
633
633
|
reason: string | null;
|
|
634
634
|
provider: {
|
|
@@ -647,8 +647,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
647
647
|
resources: Record<string, unknown>;
|
|
648
648
|
selection: {
|
|
649
649
|
capabilities: string[];
|
|
650
|
-
parameters: Record<string, unknown>;
|
|
651
650
|
model: string | null;
|
|
651
|
+
parameters: Record<string, unknown>;
|
|
652
652
|
};
|
|
653
653
|
reason: string | null;
|
|
654
654
|
provider: {
|
|
@@ -688,8 +688,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
688
688
|
resources: Record<string, unknown>;
|
|
689
689
|
selection: {
|
|
690
690
|
capabilities: string[];
|
|
691
|
-
parameters: Record<string, unknown>;
|
|
692
691
|
model: string | null;
|
|
692
|
+
parameters: Record<string, unknown>;
|
|
693
693
|
};
|
|
694
694
|
reason: string | null;
|
|
695
695
|
provider: {
|
|
@@ -747,8 +747,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
747
747
|
resources: Record<string, unknown>;
|
|
748
748
|
selection: {
|
|
749
749
|
capabilities: string[];
|
|
750
|
-
parameters: Record<string, unknown>;
|
|
751
750
|
model: string | null;
|
|
751
|
+
parameters: Record<string, unknown>;
|
|
752
752
|
};
|
|
753
753
|
reason: string | null;
|
|
754
754
|
provider: {
|
|
@@ -911,8 +911,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
911
911
|
resources: Record<string, unknown>;
|
|
912
912
|
selection: {
|
|
913
913
|
capabilities: string[];
|
|
914
|
-
parameters: Record<string, unknown>;
|
|
915
914
|
model: string | null;
|
|
915
|
+
parameters: Record<string, unknown>;
|
|
916
916
|
};
|
|
917
917
|
reason: string | null;
|
|
918
918
|
provider: {
|
|
@@ -1022,8 +1022,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
|
|
|
1022
1022
|
resources: Record<string, unknown>;
|
|
1023
1023
|
selection: {
|
|
1024
1024
|
capabilities: string[];
|
|
1025
|
-
parameters: Record<string, unknown>;
|
|
1026
1025
|
model: string | null;
|
|
1026
|
+
parameters: Record<string, unknown>;
|
|
1027
1027
|
};
|
|
1028
1028
|
reason: string | null;
|
|
1029
1029
|
provider: {
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
import type { ControlPlaneOperationDescriptor } from './control-plane-operation.js';
|
|
2
2
|
export declare const CONTROL_PLANE_OPERATIONS: {
|
|
3
|
+
readonly aiInstances: {
|
|
4
|
+
list: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
5
|
+
teamId: string;
|
|
6
|
+
}, {
|
|
7
|
+
cursor?: string | undefined;
|
|
8
|
+
limit?: number | undefined;
|
|
9
|
+
}, undefined, Record<string, unknown>>;
|
|
10
|
+
show: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
11
|
+
teamId: string;
|
|
12
|
+
instanceId: string;
|
|
13
|
+
}, {}, undefined, Record<string, unknown>>;
|
|
14
|
+
put: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
15
|
+
teamId: string;
|
|
16
|
+
instanceId: string;
|
|
17
|
+
}, {}, {
|
|
18
|
+
name: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
purpose: "inference" | "training" | "both";
|
|
21
|
+
timeZone: string;
|
|
22
|
+
schedule: "weekdays" | "always";
|
|
23
|
+
hostingConnectionId: string;
|
|
24
|
+
storageConnectionId: string | null;
|
|
25
|
+
model: string;
|
|
26
|
+
}, Record<string, unknown>>;
|
|
27
|
+
remove: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
28
|
+
teamId: string;
|
|
29
|
+
instanceId: string;
|
|
30
|
+
}, {}, {}, Record<string, unknown>>;
|
|
31
|
+
};
|
|
3
32
|
readonly infrastructure: {
|
|
4
33
|
readonly topology: {
|
|
5
34
|
readonly plan: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
@@ -1533,8 +1562,8 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
1533
1562
|
resources: Record<string, unknown>;
|
|
1534
1563
|
selection: {
|
|
1535
1564
|
capabilities: string[];
|
|
1536
|
-
parameters: Record<string, unknown>;
|
|
1537
1565
|
model: string | null;
|
|
1566
|
+
parameters: Record<string, unknown>;
|
|
1538
1567
|
};
|
|
1539
1568
|
reason: string | null;
|
|
1540
1569
|
provider: {
|
|
@@ -1650,8 +1679,8 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
1650
1679
|
resources: Record<string, unknown>;
|
|
1651
1680
|
selection: {
|
|
1652
1681
|
capabilities: string[];
|
|
1653
|
-
parameters: Record<string, unknown>;
|
|
1654
1682
|
model: string | null;
|
|
1683
|
+
parameters: Record<string, unknown>;
|
|
1655
1684
|
};
|
|
1656
1685
|
reason: string | null;
|
|
1657
1686
|
provider: {
|
|
@@ -2326,6 +2355,10 @@ export declare const CONTROL_PLANE_OPERATIONS: {
|
|
|
2326
2355
|
projectId: string;
|
|
2327
2356
|
repoId: string;
|
|
2328
2357
|
}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
|
|
2358
|
+
readonly refresh: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
2359
|
+
projectId: string;
|
|
2360
|
+
repoId: string;
|
|
2361
|
+
}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
|
|
2329
2362
|
};
|
|
2330
2363
|
};
|
|
2331
2364
|
readonly providers: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { defineOperation as define, defineTreeDxProxyOperation as treedxProxy } from "./operation-builder.js";
|
|
2
|
+
import { defineOperation as define, defineTreeDxProxyOperation as treedxProxy, defineReadOperation as read } from "./operation-builder.js";
|
|
3
3
|
import { communicationOperations, providerCommunicationLifecycleOperations, providerDiscussionResponseOperation } from "./catalog/communication-operations.js";
|
|
4
4
|
import { inboxOperations } from "./catalog/inbox-operations.js";
|
|
5
5
|
import { adminAccountOperations, adminTeamOperations } from "./catalog/admin-account-team-operations.js";
|
|
@@ -8,25 +8,10 @@ import { capabilityOntologyOperations } from "./catalog/capability-ontology-oper
|
|
|
8
8
|
import { knowledgeShareOperations } from "./catalog/knowledge-share-operations.js";
|
|
9
9
|
import { PROVIDER_ENVIRONMENT_OPERATIONS } from "./catalog/provider-environment-operations.js";
|
|
10
10
|
import { HOSTED_TOPOLOGY_OPERATIONS } from "./catalog/hosted-topology-operations.js";
|
|
11
|
+
import { AI_INSTANCE_OPERATIONS } from "./catalog/infrastructure/ai-instance-operations.js";
|
|
11
12
|
import { SECRET_OPERATIONS } from "./catalog/services/secret-operations.js";
|
|
12
13
|
import { buildControlPlaneCatalog, flattenControlPlaneOperations } from "./catalog/control-plane-catalog.js";
|
|
13
14
|
const empty = z.object({}).strict(), none = z.undefined(), record = z.record(z.unknown()), payload = record;
|
|
14
|
-
function read(operationId, path, capability, surfaces = ["rest"]) {
|
|
15
|
-
return define({
|
|
16
|
-
operationId,
|
|
17
|
-
description: `Read ${operationId}.`,
|
|
18
|
-
rest: { method: "GET", path },
|
|
19
|
-
capability,
|
|
20
|
-
authentication: "oauth",
|
|
21
|
-
oauthScopes: ["treeseed:read"],
|
|
22
|
-
kind: "read",
|
|
23
|
-
riskClass: "ordinary",
|
|
24
|
-
confirmation: "never",
|
|
25
|
-
surfaces,
|
|
26
|
-
cacheScope: "principal",
|
|
27
|
-
pagination: "none"
|
|
28
|
-
}, { path: empty, query: empty, body: none, output: payload });
|
|
29
|
-
}
|
|
30
15
|
function providerPath(operationId, method, path, pathShape, options = {}) {
|
|
31
16
|
const kind = options.read ? "read" : "mutation";
|
|
32
17
|
return define({
|
|
@@ -101,6 +86,7 @@ function resource(operationId, method, path, pathShape, options = { capability:
|
|
|
101
86
|
}, { path: z.object(pathShape).strict(), query: kind === "read" ? record : empty, body: kind === "read" ? none : record, output: payload });
|
|
102
87
|
}
|
|
103
88
|
const CONTROL_PLANE_OPERATIONS = {
|
|
89
|
+
aiInstances: AI_INSTANCE_OPERATIONS,
|
|
104
90
|
infrastructure: { topology: HOSTED_TOPOLOGY_OPERATIONS },
|
|
105
91
|
capabilities: capabilityOntologyOperations(),
|
|
106
92
|
inbox: inboxOperations(),
|
|
@@ -455,7 +441,8 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
455
441
|
remove: treedxProxy("treedx.repositories.artifacts.delete", "deleteArtifact", "DELETE", "/v1/dx/projects/{projectId}/repos/{repoId}/artifacts/{artifactId}", { projectId: z.string().min(1), repoId: z.string().min(1), artifactId: z.string().min(1) }, { risk: "destructive" })
|
|
456
442
|
},
|
|
457
443
|
searchIndex: {
|
|
458
|
-
status: treedxProxy("treedx.repositories.search.index.status", "getSearchIndexStatus", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/search-index", { projectId: z.string().min(1), repoId: z.string().min(1) })
|
|
444
|
+
status: treedxProxy("treedx.repositories.search.index.status", "getSearchIndexStatus", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/search-index", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
445
|
+
refresh: treedxProxy("treedx.repositories.search.index.refresh", "refreshSearchIndex", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/search-index/refresh", { projectId: z.string().min(1), repoId: z.string().min(1) })
|
|
459
446
|
}
|
|
460
447
|
},
|
|
461
448
|
providers: {
|
|
@@ -7,6 +7,7 @@ type Definition = Omit<ControlPlaneOperationDescriptor, 'schemaVersion' | 'schem
|
|
|
7
7
|
concurrencyRequired?: boolean;
|
|
8
8
|
authentication?: ControlPlaneOperationDescriptor['authentication'];
|
|
9
9
|
};
|
|
10
|
+
export declare function defineReadOperation(operationId: `${string}.${string}`, path: `/v1/${string}`, capability: string, surfaces?: ControlPlaneOperationDescriptor['surfaces']): ControlPlaneOperationBinding<{}, {}, undefined, Record<string, unknown>>;
|
|
10
11
|
export declare function defineOperation<TPath, TQuery, TBody, TOutput>(definition: Definition, schema: ControlPlaneOperationBinding<TPath, TQuery, TBody, TOutput>['schema']): ControlPlaneOperationBinding<TPath, TQuery, TBody, TOutput>;
|
|
11
12
|
export declare function defineTreeDxProxyOperation<T extends z.ZodRawShape>(operationId: `${string}.${string}`, upstreamOperationId: string | null, method: 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT', path: `/v1/${string}`, pathShape: T, options?: {
|
|
12
13
|
read?: boolean;
|
|
@@ -3,6 +3,22 @@ import { TREEDX_OPENAPI_CONTRACT } from "@treeseed/treedx/openapi";
|
|
|
3
3
|
import {
|
|
4
4
|
CONTROL_PLANE_OPERATION_SCHEMA_VERSION
|
|
5
5
|
} from "./control-plane-operation.js";
|
|
6
|
+
function defineReadOperation(operationId, path, capability, surfaces = ["rest"]) {
|
|
7
|
+
return defineOperation({
|
|
8
|
+
operationId,
|
|
9
|
+
description: `Read ${operationId}.`,
|
|
10
|
+
rest: { method: "GET", path },
|
|
11
|
+
capability,
|
|
12
|
+
authentication: "oauth",
|
|
13
|
+
oauthScopes: ["treeseed:read"],
|
|
14
|
+
kind: "read",
|
|
15
|
+
riskClass: "ordinary",
|
|
16
|
+
confirmation: "never",
|
|
17
|
+
surfaces,
|
|
18
|
+
cacheScope: "principal",
|
|
19
|
+
pagination: "none"
|
|
20
|
+
}, { path: z.object({}).strict(), query: z.object({}).strict(), body: z.undefined(), output: z.record(z.unknown()) });
|
|
21
|
+
}
|
|
6
22
|
function defineOperation(definition, schema) {
|
|
7
23
|
const { parameters, redactedPaths = [], idempotencyRequired, concurrencyRequired, ...descriptor } = definition;
|
|
8
24
|
const mutation = definition.kind === "mutation";
|
|
@@ -57,5 +73,6 @@ function defineTreeDxProxyOperation(operationId, upstreamOperationId, method, pa
|
|
|
57
73
|
}
|
|
58
74
|
export {
|
|
59
75
|
defineOperation,
|
|
76
|
+
defineReadOperation,
|
|
60
77
|
defineTreeDxProxyOperation
|
|
61
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import sodium from "libsodium-wrappers-sumo";
|
|
2
1
|
async function encryptGitHubActionsSecret(value, providerPublicKey) {
|
|
2
|
+
const { default: sodium } = await import("libsodium-wrappers-sumo");
|
|
3
3
|
await sodium.ready;
|
|
4
4
|
if (!value) throw new Error("GitHub Actions secret value is required.");
|
|
5
5
|
const key = sodium.from_base64(providerPublicKey, sodium.base64_variants.ORIGINAL);
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import type { CredentialAuthorityScheme, ServiceCapabilityType } from './service-provider-contracts.js';
|
|
2
2
|
export declare const PROVIDER_ADAPTER_KINDS: readonly ["repository-hosting", "workflow-execution", "workflow-configuration", "object-storage", "webhook-ingress"];
|
|
3
3
|
export type ProviderAdapterKind = (typeof PROVIDER_ADAPTER_KINDS)[number];
|
|
4
|
+
/** Bounded delivery requirements attached to a workflow-execution binding.
|
|
5
|
+
* Values and vault login material never belong in this declaration.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkflowConfigurationDeclaration = {
|
|
8
|
+
workflowPath: string;
|
|
9
|
+
repositoryBindingId: string;
|
|
10
|
+
kind: 'secrets' | 'variables';
|
|
11
|
+
scope: 'repository' | 'environment';
|
|
12
|
+
environment?: string | null;
|
|
13
|
+
names: string[];
|
|
14
|
+
};
|
|
15
|
+
export type WorkflowConfigurationPolicy = {
|
|
16
|
+
workflowConfiguration: WorkflowConfigurationDeclaration[];
|
|
17
|
+
};
|
|
4
18
|
export type ProviderCredentialAuthority = {
|
|
5
19
|
id: string;
|
|
6
20
|
teamId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const SERVICE_PROVIDER_IDS: readonly ["github", "cloudflare", "railway"];
|
|
2
|
-
export declare const SERVICE_CAPABILITY_TYPES: readonly ["repository-hosting", "workflow-execution", "
|
|
1
|
+
export declare const SERVICE_PROVIDER_IDS: readonly ["github", "cloudflare", "railway", "hyperstack"];
|
|
2
|
+
export declare const SERVICE_CAPABILITY_TYPES: readonly ["repository-hosting", "workflow-execution", "frontend-hosting", "backend-hosting", "dns-management", "object-storage", "state-encryption", "database-hosting", "capacity-runtime-hosting", "private-knowledge-index-hosting", "artifact-hosting", "ai-inference-hosting", "ai-training-hosting"];
|
|
3
3
|
export declare const SERVICE_CONNECTION_STATUSES: readonly ["draft", "active", "degraded", "validation-failed", "reentry-required", "reauthorization-required", "disconnected"];
|
|
4
4
|
export declare const SERVICE_CAPABILITY_STATUSES: readonly ["configured", "disabled", "blocked", "planned"];
|
|
5
5
|
export type ServiceProviderId = (typeof SERVICE_PROVIDER_IDS)[number];
|
|
@@ -11,6 +11,8 @@ export type ServiceFieldDefinition = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
description: string;
|
|
13
13
|
required: boolean;
|
|
14
|
+
requiredForCapabilities?: ServiceCapabilityType[];
|
|
15
|
+
pattern?: string;
|
|
14
16
|
sensitive: boolean;
|
|
15
17
|
input: 'text' | 'password' | 'url';
|
|
16
18
|
placeholder?: string;
|