@treeseed/sdk 0.13.0-rc.55 → 0.13.0-rc.57

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.
Files changed (37) hide show
  1. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
  2. package/dist/agent-capacity/validation/activity-profile.js +18 -9
  3. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +558 -636
  4. package/dist/agent-capacity/validation/agent-definition-schema.js +8 -28
  5. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +11 -11
  6. package/dist/capacity-provider/capability-ontology.d.ts +1211 -0
  7. package/dist/capacity-provider/capability-ontology.js +200 -0
  8. package/dist/capacity-provider/contracts/governance.d.ts +37 -2
  9. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  10. package/dist/capacity-provider/core-capability-catalog.js +63 -0
  11. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  12. package/dist/capacity-provider/environment-catalog.js +116 -0
  13. package/dist/capacity-provider/index.d.ts +3 -0
  14. package/dist/capacity-provider/index.js +3 -0
  15. package/dist/capacity-provider/sandbox-contracts.d.ts +147 -26
  16. package/dist/capacity-provider/sandbox-contracts.js +16 -1
  17. package/dist/capacity-provider/validation.d.ts +2 -1
  18. package/dist/capacity-provider/validation.js +34 -1
  19. package/dist/content/validation/agent-operational-content-schemas.d.ts +16 -16
  20. package/dist/content/validation/auxiliary-content-schemas.d.ts +2 -2
  21. package/dist/content/validation/content-model-schemas.d.ts +1077 -1220
  22. package/dist/content/validation/portable-content-data.d.ts +104 -117
  23. package/dist/deployment/schemas.d.ts +169 -25
  24. package/dist/deployment/schemas.js +27 -1
  25. package/dist/operator-contracts/canonical-command-tree.js +17 -1
  26. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +164 -0
  27. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  28. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  29. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  30. package/dist/operator-contracts/catalog/inbox-operations.d.ts +3 -3
  31. package/dist/operator-contracts/control-plane-operations.d.ts +513 -345
  32. package/dist/operator-contracts/control-plane-operations.js +7 -10
  33. package/dist/operator-contracts/inbox/contracts.d.ts +16 -16
  34. package/dist/operator-contracts/index.d.ts +1 -0
  35. package/dist/operator-contracts/index.js +1 -0
  36. package/dist/types/agents/agent-activity-profile.d.ts +15 -33
  37. package/package.json +1 -1
@@ -1,5 +1,149 @@
1
1
  import { z } from 'zod';
2
2
  export declare const deploymentTrackSchema: z.ZodEnum<["stable", "development"]>;
3
+ export declare const hostCredentialInitializerSchema: z.ZodEffects<z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<"treeseed.host-credential-initializer/v1">;
5
+ id: z.ZodString;
6
+ displayName: z.ZodString;
7
+ description: z.ZodString;
8
+ credentialId: z.ZodString;
9
+ sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
10
+ id: z.ZodString;
11
+ label: z.ZodString;
12
+ kind: z.ZodEnum<["file", "secret"]>;
13
+ prompt: z.ZodString;
14
+ suggestedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
+ contentType: z.ZodEnum<["application/json", "text/plain"]>;
16
+ minimumBytes: z.ZodNumber;
17
+ maximumBytes: z.ZodNumber;
18
+ }, "strict", z.ZodTypeAny, {
19
+ kind: "secret" | "file";
20
+ id: string;
21
+ label: string;
22
+ prompt: string;
23
+ suggestedPaths: string[];
24
+ contentType: "application/json" | "text/plain";
25
+ minimumBytes: number;
26
+ maximumBytes: number;
27
+ }, {
28
+ kind: "secret" | "file";
29
+ id: string;
30
+ label: string;
31
+ prompt: string;
32
+ contentType: "application/json" | "text/plain";
33
+ minimumBytes: number;
34
+ maximumBytes: number;
35
+ suggestedPaths?: string[] | undefined;
36
+ }>, {
37
+ kind: "secret" | "file";
38
+ id: string;
39
+ label: string;
40
+ prompt: string;
41
+ suggestedPaths: string[];
42
+ contentType: "application/json" | "text/plain";
43
+ minimumBytes: number;
44
+ maximumBytes: number;
45
+ }, {
46
+ kind: "secret" | "file";
47
+ id: string;
48
+ label: string;
49
+ prompt: string;
50
+ contentType: "application/json" | "text/plain";
51
+ minimumBytes: number;
52
+ maximumBytes: number;
53
+ suggestedPaths?: string[] | undefined;
54
+ }>, "many">;
55
+ activation: z.ZodObject<{
56
+ kind: z.ZodLiteral<"sandbox-model-gateway">;
57
+ authenticationModes: z.ZodRecord<z.ZodString, z.ZodEnum<["api-key", "subscription-file"]>>;
58
+ }, "strict", z.ZodTypeAny, {
59
+ kind: "sandbox-model-gateway";
60
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
61
+ }, {
62
+ kind: "sandbox-model-gateway";
63
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
64
+ }>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ schemaVersion: "treeseed.host-credential-initializer/v1";
67
+ id: string;
68
+ displayName: string;
69
+ description: string;
70
+ credentialId: string;
71
+ sources: {
72
+ kind: "secret" | "file";
73
+ id: string;
74
+ label: string;
75
+ prompt: string;
76
+ suggestedPaths: string[];
77
+ contentType: "application/json" | "text/plain";
78
+ minimumBytes: number;
79
+ maximumBytes: number;
80
+ }[];
81
+ activation: {
82
+ kind: "sandbox-model-gateway";
83
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
84
+ };
85
+ }, {
86
+ schemaVersion: "treeseed.host-credential-initializer/v1";
87
+ id: string;
88
+ displayName: string;
89
+ description: string;
90
+ credentialId: string;
91
+ sources: {
92
+ kind: "secret" | "file";
93
+ id: string;
94
+ label: string;
95
+ prompt: string;
96
+ contentType: "application/json" | "text/plain";
97
+ minimumBytes: number;
98
+ maximumBytes: number;
99
+ suggestedPaths?: string[] | undefined;
100
+ }[];
101
+ activation: {
102
+ kind: "sandbox-model-gateway";
103
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
104
+ };
105
+ }>, {
106
+ schemaVersion: "treeseed.host-credential-initializer/v1";
107
+ id: string;
108
+ displayName: string;
109
+ description: string;
110
+ credentialId: string;
111
+ sources: {
112
+ kind: "secret" | "file";
113
+ id: string;
114
+ label: string;
115
+ prompt: string;
116
+ suggestedPaths: string[];
117
+ contentType: "application/json" | "text/plain";
118
+ minimumBytes: number;
119
+ maximumBytes: number;
120
+ }[];
121
+ activation: {
122
+ kind: "sandbox-model-gateway";
123
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
124
+ };
125
+ }, {
126
+ schemaVersion: "treeseed.host-credential-initializer/v1";
127
+ id: string;
128
+ displayName: string;
129
+ description: string;
130
+ credentialId: string;
131
+ sources: {
132
+ kind: "secret" | "file";
133
+ id: string;
134
+ label: string;
135
+ prompt: string;
136
+ contentType: "application/json" | "text/plain";
137
+ minimumBytes: number;
138
+ maximumBytes: number;
139
+ suggestedPaths?: string[] | undefined;
140
+ }[];
141
+ activation: {
142
+ kind: "sandbox-model-gateway";
143
+ authenticationModes: Record<string, "api-key" | "subscription-file">;
144
+ };
145
+ }>;
146
+ export type HostCredentialInitializer = z.infer<typeof hostCredentialInitializerSchema>;
3
147
  export declare const hostRoleSchema: z.ZodUnion<[z.ZodEnum<["integrated", "capacity-provider", "control-plane", "knowledge", "ai-gpu", "edge"]>, z.ZodString]>;
4
148
  export declare const hostConnectionBindingSchema: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
5
149
  kind: z.ZodLiteral<"local">;
@@ -1167,15 +1311,15 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1167
1311
  allowedModels: string[];
1168
1312
  }>;
1169
1313
  profiles: z.ZodArray<z.ZodObject<{
1170
- id: z.ZodEnum<["read", "unit", "integration", "platform", "connected"]>;
1314
+ id: z.ZodString;
1171
1315
  guestImage: z.ZodString;
1172
1316
  guestImageDigest: z.ZodString;
1173
1317
  }, "strict", z.ZodTypeAny, {
1174
- id: "read" | "unit" | "integration" | "platform" | "connected";
1318
+ id: string;
1175
1319
  guestImage: string;
1176
1320
  guestImageDigest: string;
1177
1321
  }, {
1178
- id: "read" | "unit" | "integration" | "platform" | "connected";
1322
+ id: string;
1179
1323
  guestImage: string;
1180
1324
  guestImageDigest: string;
1181
1325
  }>, "many">;
@@ -1189,7 +1333,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1189
1333
  allowedModels: string[];
1190
1334
  };
1191
1335
  profiles: {
1192
- id: "read" | "unit" | "integration" | "platform" | "connected";
1336
+ id: string;
1193
1337
  guestImage: string;
1194
1338
  guestImageDigest: string;
1195
1339
  }[];
@@ -1203,7 +1347,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1203
1347
  allowedModels: string[];
1204
1348
  };
1205
1349
  profiles: {
1206
- id: "read" | "unit" | "integration" | "platform" | "connected";
1350
+ id: string;
1207
1351
  guestImage: string;
1208
1352
  guestImageDigest: string;
1209
1353
  }[];
@@ -1254,7 +1398,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1254
1398
  allowedModels: string[];
1255
1399
  };
1256
1400
  profiles: {
1257
- id: "read" | "unit" | "integration" | "platform" | "connected";
1401
+ id: string;
1258
1402
  guestImage: string;
1259
1403
  guestImageDigest: string;
1260
1404
  }[];
@@ -1283,7 +1427,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1283
1427
  allowedModels: string[];
1284
1428
  };
1285
1429
  profiles: {
1286
- id: "read" | "unit" | "integration" | "platform" | "connected";
1430
+ id: string;
1287
1431
  guestImage: string;
1288
1432
  guestImageDigest: string;
1289
1433
  }[];
@@ -1423,7 +1567,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1423
1567
  allowedModels: string[];
1424
1568
  };
1425
1569
  profiles: {
1426
- id: "read" | "unit" | "integration" | "platform" | "connected";
1570
+ id: string;
1427
1571
  guestImage: string;
1428
1572
  guestImageDigest: string;
1429
1573
  }[];
@@ -1563,7 +1707,7 @@ export declare const hostConfigurationSchema: z.ZodObject<{
1563
1707
  allowedModels: string[];
1564
1708
  };
1565
1709
  profiles: {
1566
- id: "read" | "unit" | "integration" | "platform" | "connected";
1710
+ id: string;
1567
1711
  guestImage: string;
1568
1712
  guestImageDigest: string;
1569
1713
  }[];
@@ -3965,12 +4109,12 @@ export declare const integrationReleaseSchema: z.ZodEffects<z.ZodObject<{
3965
4109
  url: string;
3966
4110
  };
3967
4111
  }[];
4112
+ release: string;
4113
+ compatibilityId: string;
3968
4114
  platform: {
3969
4115
  repository: "treeseed-ai/platform";
3970
4116
  commit: string;
3971
4117
  };
3972
- release: string;
3973
- compatibilityId: string;
3974
4118
  deployment: {
3975
4119
  repository: "treeseed-ai/deployment";
3976
4120
  commit: string;
@@ -4005,12 +4149,12 @@ export declare const integrationReleaseSchema: z.ZodEffects<z.ZodObject<{
4005
4149
  url: string;
4006
4150
  };
4007
4151
  }[];
4152
+ release: string;
4153
+ compatibilityId: string;
4008
4154
  platform: {
4009
4155
  repository: "treeseed-ai/platform";
4010
4156
  commit: string;
4011
4157
  };
4012
- release: string;
4013
- compatibilityId: string;
4014
4158
  deployment: {
4015
4159
  repository: "treeseed-ai/deployment";
4016
4160
  commit: string;
@@ -4045,12 +4189,12 @@ export declare const integrationReleaseSchema: z.ZodEffects<z.ZodObject<{
4045
4189
  url: string;
4046
4190
  };
4047
4191
  }[];
4192
+ release: string;
4193
+ compatibilityId: string;
4048
4194
  platform: {
4049
4195
  repository: "treeseed-ai/platform";
4050
4196
  commit: string;
4051
4197
  };
4052
- release: string;
4053
- compatibilityId: string;
4054
4198
  deployment: {
4055
4199
  repository: "treeseed-ai/deployment";
4056
4200
  commit: string;
@@ -4085,12 +4229,12 @@ export declare const integrationReleaseSchema: z.ZodEffects<z.ZodObject<{
4085
4229
  url: string;
4086
4230
  };
4087
4231
  }[];
4232
+ release: string;
4233
+ compatibilityId: string;
4088
4234
  platform: {
4089
4235
  repository: "treeseed-ai/platform";
4090
4236
  commit: string;
4091
4237
  };
4092
- release: string;
4093
- compatibilityId: string;
4094
4238
  deployment: {
4095
4239
  repository: "treeseed-ai/deployment";
4096
4240
  commit: string;
@@ -6281,6 +6425,11 @@ export declare const hostUpdateSchema: z.ZodObject<{
6281
6425
  }, "strict", z.ZodTypeAny, {
6282
6426
  schemaVersion: "treeseed.host-update/v1";
6283
6427
  state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
6428
+ activation: {
6429
+ policy: "maintenance-window" | "continuous";
6430
+ eligibleAt: string;
6431
+ jitterSeconds: number;
6432
+ };
6284
6433
  track: "stable" | "development";
6285
6434
  components: {
6286
6435
  from: string | null;
@@ -6291,14 +6440,14 @@ export declare const hostUpdateSchema: z.ZodObject<{
6291
6440
  updateId: string;
6292
6441
  fromCatalogDigest: string;
6293
6442
  toCatalogDigest: string;
6443
+ }, {
6444
+ schemaVersion: "treeseed.host-update/v1";
6445
+ state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
6294
6446
  activation: {
6295
6447
  policy: "maintenance-window" | "continuous";
6296
6448
  eligibleAt: string;
6297
6449
  jitterSeconds: number;
6298
6450
  };
6299
- }, {
6300
- schemaVersion: "treeseed.host-update/v1";
6301
- state: "failed" | "planned" | "rolled-back" | "draining" | "applying" | "healthy";
6302
6451
  track: "stable" | "development";
6303
6452
  components: {
6304
6453
  from: string | null;
@@ -6309,11 +6458,6 @@ export declare const hostUpdateSchema: z.ZodObject<{
6309
6458
  updateId: string;
6310
6459
  fromCatalogDigest: string;
6311
6460
  toCatalogDigest: string;
6312
- activation: {
6313
- policy: "maintenance-window" | "continuous";
6314
- eligibleAt: string;
6315
- jitterSeconds: number;
6316
- };
6317
6461
  }>;
6318
6462
  export declare const hostReceiptSchema: z.ZodObject<{
6319
6463
  schemaVersion: z.ZodLiteral<"treeseed.host-receipt/v1">;
@@ -15,6 +15,31 @@ const localAlias = z.string().regex(
15
15
  const binding = z.string().regex(/^(?:\[[0-9a-f:]+\]|[^:]+):[1-9][0-9]{0,4}$/iu);
16
16
  const httpsUrl = z.string().url().refine((value) => new URL(value).protocol === "https:", "Remote TreeSeed connections require HTTPS.");
17
17
  const deploymentTrackSchema = z.enum(["stable", "development"]);
18
+ const hostCredentialInitializerSchema = z.object({
19
+ schemaVersion: z.literal("treeseed.host-credential-initializer/v1"),
20
+ id: identifier,
21
+ displayName: z.string().min(1).max(128),
22
+ description: z.string().min(1).max(1024),
23
+ credentialId: identifier,
24
+ sources: z.array(z.object({
25
+ id: identifier,
26
+ label: z.string().min(1).max(128),
27
+ kind: z.enum(["file", "secret"]),
28
+ prompt: z.string().min(1).max(256),
29
+ suggestedPaths: z.array(z.string().min(1).max(4096)).max(16).default([]),
30
+ contentType: z.enum(["application/json", "text/plain"]),
31
+ minimumBytes: z.number().int().positive().max(1048576),
32
+ maximumBytes: z.number().int().positive().max(1048576)
33
+ }).strict().refine((source) => source.maximumBytes >= source.minimumBytes, "Credential source maximum must be at least its minimum.")).min(1),
34
+ activation: z.object({
35
+ kind: z.literal("sandbox-model-gateway"),
36
+ authenticationModes: z.record(identifier, z.enum(["api-key", "subscription-file"]))
37
+ }).strict()
38
+ }).strict().superRefine((initializer, context) => {
39
+ for (const source of initializer.sources) if (!initializer.activation.authenticationModes[source.id]) {
40
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ["activation", "authenticationModes", source.id], message: "Every credential source requires an activation mode." });
41
+ }
42
+ });
18
43
  const hostRoleSchema = z.union([
19
44
  z.enum(["integrated", "capacity-provider", "control-plane", "knowledge", "ai-gpu", "edge"]),
20
45
  identifier
@@ -118,7 +143,7 @@ const hostConfigurationSchema = z.object({
118
143
  runtime: z.literal("kata-runtime-rs-qemu"),
119
144
  brokerSocket: z.string().startsWith("/run/treeseed/"),
120
145
  modelGateway: z.object({ provider: z.literal("openai"), upstreamBaseUrl: z.literal("https://api.openai.com"), allowedModels: z.array(z.string().min(1)).min(1) }).strict(),
121
- profiles: z.array(z.object({ id: z.enum(["read", "unit", "integration", "platform", "connected"]), guestImage: z.string().min(1), guestImageDigest: digest }).strict()).min(1)
146
+ profiles: z.array(z.object({ id: identifier, guestImage: z.string().min(1), guestImageDigest: digest }).strict()).min(1)
122
147
  }).strict(),
123
148
  providerVolume: z.object({ encryption: z.literal("luks2"), backingPath: z.string().startsWith("/"), mountPath: z.string().startsWith("/"), sizeBytes: z.number().int().min(1073741824), unlock: z.enum(["tpm2", "systemd-credential"]), recoveryRequired: z.literal(true) }).strict(),
124
149
  applicationEncryption: z.object({ provider: z.literal("systemd-credential"), activeKeyVersion: z.number().int().positive(), diagnosticsKeyVersion: z.number().int().positive() }).strict()
@@ -342,6 +367,7 @@ export {
342
367
  hostComponentSchema,
343
368
  hostConfigurationSchema,
344
369
  hostConnectionBindingSchema,
370
+ hostCredentialInitializerSchema,
345
371
  hostMigrationSchema,
346
372
  hostPlanSchema,
347
373
  hostReceiptSchema,
@@ -19,6 +19,8 @@ const operationBindings = {
19
19
  "topics show": operation("communications.topics.show", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true)]),
20
20
  "topics subscribe": operation("communications.topics.subscriptions.put", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true), field("body", "agent", "argument", "agent", true)]),
21
21
  "topics unsubscribe": operation("communications.topics.subscriptions.delete", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true), field("body", "agent", "argument", "agent", true)]),
22
+ "capabilities list": operation("capabilities.list", [field("query", "status", "option"), field("query", "family", "option"), field("query", "namespace", "option"), field("query", "limit", "option", "limit", false, "integer"), field("query", "cursor", "option")]),
23
+ "capabilities show": operation("capabilities.show", [field("path", "capabilityId", "argument", "capability", true), field("query", "version", "option")]),
22
24
  "teams list": operation("teams.list", page()),
23
25
  "teams current": local("local.teams.current"),
24
26
  "teams use": local("local.teams.use"),
@@ -51,6 +53,9 @@ const operationBindings = {
51
53
  "host topology": local("local.host.topology"),
52
54
  "host connections": local("local.host.connections"),
53
55
  "host provider status": local("local.host.provider.status"),
56
+ "host provider credentials list": local("local.host.provider.credentials.list"),
57
+ "host provider credentials status": local("local.host.provider.credentials.status"),
58
+ "host provider credentials initialize": local("local.host.provider.credentials.initialize"),
54
59
  "host storage status": local("local.host.storage.status"),
55
60
  "host storage connect": local("local.host.storage.connect"),
56
61
  "host storage reconcile": local("local.host.storage.reconcile"),
@@ -212,6 +217,13 @@ function hostSecurityRotate() {
212
217
  ];
213
218
  return value;
214
219
  }
220
+ function hostProviderCredentialInitialize() {
221
+ const value = leaf("initialize", "mutation", "initializer", "credential");
222
+ if (value.nodeType !== "leaf") throw new Error("Provider credential initialization must be a leaf command.");
223
+ value.description = "Initialize an execution-provider credential through its registered host initializer.";
224
+ value.options = [...value.options ?? [], { name: "--source", description: "Registered credential source to use instead of automatic selection.", type: "string" }];
225
+ return value;
226
+ }
215
227
  function hostRecoveryVerify() {
216
228
  return {
217
229
  nodeType: "leaf",
@@ -299,6 +311,10 @@ const commandTree = {
299
311
  { nodeType: "leaf", segment: "subscribe", description: "Subscribe an agent to a discussion topic.", kind: "mutation", arguments: [{ name: "topic", description: "Discussion topic.", required: true }, { name: "agent", description: "@project/agent handle.", required: true }], options: [planOption], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-topic-subscription-receipt/v1", execution: unavailable() },
300
312
  { nodeType: "leaf", segment: "unsubscribe", description: "Remove an agent subscription from a discussion topic.", kind: "mutation", arguments: [{ name: "topic", description: "Discussion topic.", required: true }, { name: "agent", description: "@project/agent handle.", required: true }], options: [planOption], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-topic-subscription-receipt/v1", execution: unavailable() }
301
313
  ]),
314
+ branch("capabilities", [
315
+ { nodeType: "leaf", segment: "list", description: "List standardized services in the active capability ontology.", kind: "read", options: [{ name: "--family", description: "Capability family filter.", type: "string" }, { name: "--namespace", description: "Namespace filter.", type: "string" }, { name: "--status", description: "Definition status.", type: "string" }, { name: "--limit", description: "Maximum definitions.", type: "number" }, { name: "--cursor", description: "Pagination cursor.", type: "string" }], resultSchemaId: "treeseed.capability-page/v1", execution: unavailable() },
316
+ { nodeType: "leaf", segment: "show", description: "Show one standardized capability definition.", kind: "read", arguments: [{ name: "capability", description: "Namespaced capability ID.", required: true }], options: [{ name: "--version", description: "Exact semantic version.", type: "string" }], resultSchemaId: "treeseed.capability-definition/v1", execution: unavailable() }
317
+ ]),
302
318
  branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
303
319
  branch("users", [userCreate()]),
304
320
  branch("teams", [leaf("list"), { nodeType: "leaf", segment: "current", description: "Show the active team for this authenticated server session.", kind: "read", resultSchemaId: "treeseed.command.teams.current/v1", execution: unavailable() }, { nodeType: "leaf", segment: "use", description: "Select the active team for this authenticated server session.", kind: "mutation", arguments: [{ name: "team", description: "Team UUID or unambiguous slug.", required: true }], options: [planOption], authorization: { capability: "teams.read", confirmation: "never" }, resultSchemaId: "treeseed.command.teams.use/v1", execution: unavailable() }]),
@@ -326,7 +342,7 @@ const commandTree = {
326
342
  branch("config", [leaf("show"), leaf("plan", "read", "file"), leaf("apply", "mutation", "file", "authority"), configurationAdopt()]),
327
343
  leaf("topology"),
328
344
  leaf("connections"),
329
- branch("provider", [leaf("status")]),
345
+ branch("provider", [leaf("status"), branch("credentials", [leaf("list"), leaf("status"), hostProviderCredentialInitialize()])]),
330
346
  branch("storage", [
331
347
  leaf("status"),
332
348
  addOptions(leaf("connect", "mutation", "backend", "credential"), [{ name: "--account-id", description: "Optional Cloudflare account ID when the bootstrap authority reaches multiple accounts.", type: "string" }]),
@@ -0,0 +1,164 @@
1
+ export declare function capabilityOntologyOperations(): {
2
+ list: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {
3
+ status?: "active" | "deprecated" | "revoked" | undefined;
4
+ family?: string | undefined;
5
+ cursor?: string | undefined;
6
+ limit?: number | undefined;
7
+ namespace?: string | undefined;
8
+ }, undefined, {
9
+ generation: number;
10
+ items: {
11
+ schemaVersion: "treeseed.capability-definition/v1";
12
+ status: "active" | "deprecated" | "revoked";
13
+ createdAt: string;
14
+ id: string;
15
+ outputs: {
16
+ id: string;
17
+ digest: string;
18
+ version: string;
19
+ mediaTypes?: string[] | undefined;
20
+ }[];
21
+ digest: string;
22
+ version: string;
23
+ description: string;
24
+ configuration: {
25
+ key: string;
26
+ description: string;
27
+ schema: Record<string, unknown>;
28
+ requirementSupport: ("required" | "preferred")[];
29
+ securityCritical?: boolean | undefined;
30
+ }[];
31
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
32
+ title: string;
33
+ features: string[];
34
+ inputs: {
35
+ id: string;
36
+ digest: string;
37
+ version: string;
38
+ mediaTypes?: string[] | undefined;
39
+ }[];
40
+ permissionClasses: string[];
41
+ contextModes: string[];
42
+ interactionModes: string[];
43
+ implies: {
44
+ id: string;
45
+ digest: string;
46
+ version: string;
47
+ }[];
48
+ conflicts: {
49
+ id: string;
50
+ digest: string;
51
+ version: string;
52
+ }[];
53
+ qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
54
+ }[];
55
+ ontologyDigest: string;
56
+ nextCursor: string | null;
57
+ }>;
58
+ show: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
59
+ capabilityId: string;
60
+ }, {
61
+ version?: string | undefined;
62
+ }, undefined, {
63
+ schemaVersion: "treeseed.capability-definition/v1";
64
+ status: "active" | "deprecated" | "revoked";
65
+ createdAt: string;
66
+ id: string;
67
+ outputs: {
68
+ id: string;
69
+ digest: string;
70
+ version: string;
71
+ mediaTypes?: string[] | undefined;
72
+ }[];
73
+ digest: string;
74
+ version: string;
75
+ description: string;
76
+ configuration: {
77
+ key: string;
78
+ description: string;
79
+ schema: Record<string, unknown>;
80
+ requirementSupport: ("required" | "preferred")[];
81
+ securityCritical?: boolean | undefined;
82
+ }[];
83
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
84
+ title: string;
85
+ features: string[];
86
+ inputs: {
87
+ id: string;
88
+ digest: string;
89
+ version: string;
90
+ mediaTypes?: string[] | undefined;
91
+ }[];
92
+ permissionClasses: string[];
93
+ contextModes: string[];
94
+ interactionModes: string[];
95
+ implies: {
96
+ id: string;
97
+ digest: string;
98
+ version: string;
99
+ }[];
100
+ conflicts: {
101
+ id: string;
102
+ digest: string;
103
+ version: string;
104
+ }[];
105
+ qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
106
+ }>;
107
+ generation: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, undefined, {
108
+ schemaVersion: "treeseed.capability-ontology/v1";
109
+ createdAt: string;
110
+ generation: number;
111
+ digest: string;
112
+ aliases: Record<string, string>;
113
+ definitions: {
114
+ schemaVersion: "treeseed.capability-definition/v1";
115
+ status: "active" | "deprecated" | "revoked";
116
+ createdAt: string;
117
+ id: string;
118
+ outputs: {
119
+ id: string;
120
+ digest: string;
121
+ version: string;
122
+ mediaTypes?: string[] | undefined;
123
+ }[];
124
+ digest: string;
125
+ version: string;
126
+ description: string;
127
+ configuration: {
128
+ key: string;
129
+ description: string;
130
+ schema: Record<string, unknown>;
131
+ requirementSupport: ("required" | "preferred")[];
132
+ securityCritical?: boolean | undefined;
133
+ }[];
134
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
135
+ title: string;
136
+ features: string[];
137
+ inputs: {
138
+ id: string;
139
+ digest: string;
140
+ version: string;
141
+ mediaTypes?: string[] | undefined;
142
+ }[];
143
+ permissionClasses: string[];
144
+ contextModes: string[];
145
+ interactionModes: string[];
146
+ implies: {
147
+ id: string;
148
+ digest: string;
149
+ version: string;
150
+ }[];
151
+ conflicts: {
152
+ id: string;
153
+ digest: string;
154
+ version: string;
155
+ }[];
156
+ qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
157
+ }[];
158
+ signature: {
159
+ value: string;
160
+ algorithm: "Ed25519" | "release-catalog";
161
+ keyId: string;
162
+ };
163
+ }>;
164
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { capabilityDefinitionSchema, capabilityOntologySchema } from "../../capacity-provider/capability-ontology.js";
3
+ import { defineOperation } from "../operation-builder.js";
4
+ const none = z.undefined(), empty = z.object({}).strict();
5
+ function capabilityOntologyOperations() {
6
+ return {
7
+ list: defineOperation({ operationId: "capabilities.list", description: "List standardized execution capabilities from the active ontology generation.", rest: { method: "GET", path: "/v1/capability-ontology" }, parameters: "treeseed.capabilities.list.parameters/v1", capability: "capabilities.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "cursor" }, {
8
+ path: empty,
9
+ query: z.object({ family: z.string().optional(), status: z.enum(["active", "deprecated", "revoked"]).optional(), namespace: z.string().optional(), limit: z.coerce.number().int().min(1).max(500).optional(), cursor: z.string().optional() }).strict(),
10
+ body: none,
11
+ output: z.object({ generation: z.number().int().positive(), ontologyDigest: z.string(), items: z.array(capabilityDefinitionSchema), nextCursor: z.string().nullable() }).strict()
12
+ }),
13
+ show: defineOperation({ operationId: "capabilities.show", description: "Read one exact standardized execution capability.", rest: { method: "GET", path: "/v1/capability-ontology/{capabilityId}" }, parameters: "treeseed.capabilities.show.parameters/v1", capability: "capabilities.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "none" }, {
14
+ path: z.object({ capabilityId: z.string().min(1) }).strict(),
15
+ query: z.object({ version: z.string().optional() }).strict(),
16
+ body: none,
17
+ output: capabilityDefinitionSchema
18
+ }),
19
+ generation: defineOperation({ operationId: "capabilities.generation.show", description: "Read the complete active immutable capability ontology.", rest: { method: "GET", path: "/v1/capability-ontology/generations/active" }, capability: "capabilities.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "mcp_resource"], cacheScope: "principal", pagination: "none" }, { path: empty, query: empty, body: none, output: capabilityOntologySchema })
20
+ };
21
+ }
22
+ export {
23
+ capabilityOntologyOperations
24
+ };
@@ -0,0 +1,6 @@
1
+ import type { ControlPlaneOperationBinding, ControlPlaneOperationDescriptor } from '../control-plane-operation.js';
2
+ export declare function flattenControlPlaneOperations(value: unknown, output?: ControlPlaneOperationBinding<any, any, any, any>[]): ControlPlaneOperationBinding<any, any, any, any>[];
3
+ export declare function buildControlPlaneCatalog(operations: readonly ControlPlaneOperationBinding<any, any, any, any>[]): Readonly<{
4
+ schemaVersion: "treeseed.control-plane-catalog/v1";
5
+ operations: ControlPlaneOperationDescriptor[];
6
+ }>;
@@ -0,0 +1,18 @@
1
+ function flattenControlPlaneOperations(value, output = []) {
2
+ if (value && typeof value === "object" && "descriptor" in value && "schema" in value) {
3
+ output.push(value);
4
+ } else if (value && typeof value === "object") {
5
+ for (const child of Object.values(value)) flattenControlPlaneOperations(child, output);
6
+ }
7
+ return output;
8
+ }
9
+ function buildControlPlaneCatalog(operations) {
10
+ return Object.freeze({
11
+ schemaVersion: "treeseed.control-plane-catalog/v1",
12
+ operations: operations.map((operation) => operation.descriptor)
13
+ });
14
+ }
15
+ export {
16
+ buildControlPlaneCatalog,
17
+ flattenControlPlaneOperations
18
+ };