@treeseed/sdk 0.13.0-rc.53 → 0.13.0-rc.55
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/README.md +4 -0
- package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +240 -240
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
- package/dist/capacity-provider/client.d.ts +18 -3
- package/dist/capacity-provider/client.js +6 -0
- package/dist/capacity-provider/contracts/governance.d.ts +28 -1
- package/dist/capacity-provider/index.d.ts +1 -0
- package/dist/capacity-provider/index.js +1 -0
- package/dist/capacity-provider/sandbox-contracts.d.ts +422 -0
- package/dist/capacity-provider/sandbox-contracts.js +71 -0
- package/dist/capacity-provider/validation.d.ts +2 -1
- package/dist/capacity-provider/validation.js +23 -0
- package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
- package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
- package/dist/content/validation/content-model-schemas.d.ts +570 -570
- package/dist/content/validation/portable-content-data.d.ts +61 -61
- package/dist/deployment/ai-mode.d.ts +4 -4
- package/dist/deployment/schemas.d.ts +418 -100
- package/dist/deployment/schemas.js +23 -1
- package/dist/development/schemas.d.ts +22 -22
- package/dist/operator-contracts/canonical-command-tree.js +63 -3
- package/dist/operator-contracts/catalog/communication-operations.d.ts +300 -33
- package/dist/operator-contracts/catalog/communication-operations.js +56 -2
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
- package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
- package/dist/operator-contracts/communication/contracts.d.ts +1261 -71
- package/dist/operator-contracts/communication/contracts.js +99 -7
- package/dist/operator-contracts/control-plane-operations.d.ts +592 -66
- package/dist/operator-contracts/control-plane-operations.js +4 -1
- package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
- package/dist/operator-contracts/inbox/contracts.js +134 -0
- package/dist/operator-contracts/index.d.ts +1 -0
- package/dist/operator-contracts/index.js +1 -0
- package/dist/operator-contracts/mcp.js +1 -1
- package/dist/security/encrypted-envelope.d.ts +177 -0
- package/dist/security/encrypted-envelope.js +34 -0
- package/dist/security/envelope-codec.d.ts +38 -0
- package/dist/security/envelope-codec.js +96 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.js +2 -0
- package/package.json +5 -1
|
@@ -111,7 +111,18 @@ const hostConfigurationSchema = z.object({
|
|
|
111
111
|
secrets: z.record(identifier, z.object({
|
|
112
112
|
provider: z.enum(["file", "systemd-credential", "vault", "aws-secrets-manager"]),
|
|
113
113
|
reference: z.string().min(1)
|
|
114
|
-
}).strict())
|
|
114
|
+
}).strict()),
|
|
115
|
+
security: z.object({
|
|
116
|
+
sandbox: z.object({
|
|
117
|
+
required: z.boolean(),
|
|
118
|
+
runtime: z.literal("kata-runtime-rs-qemu"),
|
|
119
|
+
brokerSocket: z.string().startsWith("/run/treeseed/"),
|
|
120
|
+
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)
|
|
122
|
+
}).strict(),
|
|
123
|
+
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
|
+
applicationEncryption: z.object({ provider: z.literal("systemd-credential"), activeKeyVersion: z.number().int().positive(), diagnosticsKeyVersion: z.number().int().positive() }).strict()
|
|
125
|
+
}).strict().optional()
|
|
115
126
|
}).strict();
|
|
116
127
|
const packageEndpointSchema = z.object({
|
|
117
128
|
id: identifier,
|
|
@@ -313,6 +324,16 @@ const hostRecoverySchema = z.object({
|
|
|
313
324
|
backupId: identifier.nullable(),
|
|
314
325
|
completedAt: z.string().datetime().nullable()
|
|
315
326
|
}).strict();
|
|
327
|
+
const hostSecurityReceiptSchema = z.object({
|
|
328
|
+
schemaVersion: z.literal("treeseed.host-security-receipt/v1"),
|
|
329
|
+
receiptId: identifier,
|
|
330
|
+
hostId: identifier,
|
|
331
|
+
sandbox: z.object({ runtime: z.literal("kata-runtime-rs-qemu"), kvmReady: z.boolean(), brokerReady: z.boolean(), guestImageDigests: z.array(digest) }).strict(),
|
|
332
|
+
providerVolume: z.object({ encrypted: z.boolean(), format: z.literal("luks2"), mountPath: z.string().startsWith("/"), unlock: z.enum(["tpm2", "systemd-credential"]) }).strict(),
|
|
333
|
+
keys: z.object({ provider: z.literal("systemd-credential"), activeCredentialVersion: z.number().int().positive(), activeDiagnosticsVersion: z.number().int().positive(), recoveryBundleVerified: z.boolean() }).strict(),
|
|
334
|
+
state: z.enum(["planned", "migrating", "known-good", "blocked"]),
|
|
335
|
+
completedAt: z.string().datetime()
|
|
336
|
+
}).strict();
|
|
316
337
|
export {
|
|
317
338
|
componentReleaseSchema,
|
|
318
339
|
deploymentTrackSchema,
|
|
@@ -326,6 +347,7 @@ export {
|
|
|
326
347
|
hostReceiptSchema,
|
|
327
348
|
hostRecoverySchema,
|
|
328
349
|
hostRoleSchema,
|
|
350
|
+
hostSecurityReceiptSchema,
|
|
329
351
|
hostUpdateSchema,
|
|
330
352
|
integrationReleaseSchema,
|
|
331
353
|
packageEndpointSchema,
|
|
@@ -2829,8 +2829,9 @@ export declare const developmentSessionSchema: z.ZodObject<{
|
|
|
2829
2829
|
targetId?: string | undefined;
|
|
2830
2830
|
}>, "many">;
|
|
2831
2831
|
}, "strict", z.ZodTypeAny, {
|
|
2832
|
-
status: "planning" | "active" | "degraded" | "restoring" | "stopped" | "expired";
|
|
2833
2832
|
schemaVersion: "treeseed.development-session/v1";
|
|
2833
|
+
status: "planning" | "active" | "degraded" | "restoring" | "stopped" | "expired";
|
|
2834
|
+
createdAt: string;
|
|
2834
2835
|
targets: {
|
|
2835
2836
|
projectId: string;
|
|
2836
2837
|
targetId: string;
|
|
@@ -2842,7 +2843,6 @@ export declare const developmentSessionSchema: z.ZodObject<{
|
|
|
2842
2843
|
sessionId: string;
|
|
2843
2844
|
actor: string;
|
|
2844
2845
|
hostId: string;
|
|
2845
|
-
createdAt: string;
|
|
2846
2846
|
expiresAt: string;
|
|
2847
2847
|
repositories: {
|
|
2848
2848
|
dirty: boolean;
|
|
@@ -2867,8 +2867,9 @@ export declare const developmentSessionSchema: z.ZodObject<{
|
|
|
2867
2867
|
targetId?: string | undefined;
|
|
2868
2868
|
}[];
|
|
2869
2869
|
}, {
|
|
2870
|
-
status: "planning" | "active" | "degraded" | "restoring" | "stopped" | "expired";
|
|
2871
2870
|
schemaVersion: "treeseed.development-session/v1";
|
|
2871
|
+
status: "planning" | "active" | "degraded" | "restoring" | "stopped" | "expired";
|
|
2872
|
+
createdAt: string;
|
|
2872
2873
|
targets: {
|
|
2873
2874
|
projectId: string;
|
|
2874
2875
|
targetId: string;
|
|
@@ -2880,7 +2881,6 @@ export declare const developmentSessionSchema: z.ZodObject<{
|
|
|
2880
2881
|
sessionId: string;
|
|
2881
2882
|
actor: string;
|
|
2882
2883
|
hostId: string;
|
|
2883
|
-
createdAt: string;
|
|
2884
2884
|
expiresAt: string;
|
|
2885
2885
|
repositories: {
|
|
2886
2886
|
dirty: boolean;
|
|
@@ -2993,6 +2993,8 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2993
2993
|
}>;
|
|
2994
2994
|
promotable: z.ZodBoolean;
|
|
2995
2995
|
}, "strict", z.ZodTypeAny, {
|
|
2996
|
+
schemaVersion: "treeseed.development-candidate/v1";
|
|
2997
|
+
createdAt: string;
|
|
2996
2998
|
artifacts: {
|
|
2997
2999
|
kind: "npm-package" | "oci-image" | "archive" | "executable" | "contract-bundle";
|
|
2998
3000
|
projectId: string;
|
|
@@ -3001,9 +3003,7 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3001
3003
|
digest: string;
|
|
3002
3004
|
integrity?: string | undefined;
|
|
3003
3005
|
}[];
|
|
3004
|
-
schemaVersion: "treeseed.development-candidate/v1";
|
|
3005
3006
|
sessionId: string;
|
|
3006
|
-
createdAt: string;
|
|
3007
3007
|
candidateId: string;
|
|
3008
3008
|
source: {
|
|
3009
3009
|
dirty: boolean;
|
|
@@ -3030,6 +3030,8 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3030
3030
|
};
|
|
3031
3031
|
promotable: boolean;
|
|
3032
3032
|
}, {
|
|
3033
|
+
schemaVersion: "treeseed.development-candidate/v1";
|
|
3034
|
+
createdAt: string;
|
|
3033
3035
|
artifacts: {
|
|
3034
3036
|
kind: "npm-package" | "oci-image" | "archive" | "executable" | "contract-bundle";
|
|
3035
3037
|
projectId: string;
|
|
@@ -3038,9 +3040,7 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3038
3040
|
digest: string;
|
|
3039
3041
|
integrity?: string | undefined;
|
|
3040
3042
|
}[];
|
|
3041
|
-
schemaVersion: "treeseed.development-candidate/v1";
|
|
3042
3043
|
sessionId: string;
|
|
3043
|
-
createdAt: string;
|
|
3044
3044
|
candidateId: string;
|
|
3045
3045
|
source: {
|
|
3046
3046
|
dirty: boolean;
|
|
@@ -3067,6 +3067,8 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3067
3067
|
};
|
|
3068
3068
|
promotable: boolean;
|
|
3069
3069
|
}>, {
|
|
3070
|
+
schemaVersion: "treeseed.development-candidate/v1";
|
|
3071
|
+
createdAt: string;
|
|
3070
3072
|
artifacts: {
|
|
3071
3073
|
kind: "npm-package" | "oci-image" | "archive" | "executable" | "contract-bundle";
|
|
3072
3074
|
projectId: string;
|
|
@@ -3075,9 +3077,7 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3075
3077
|
digest: string;
|
|
3076
3078
|
integrity?: string | undefined;
|
|
3077
3079
|
}[];
|
|
3078
|
-
schemaVersion: "treeseed.development-candidate/v1";
|
|
3079
3080
|
sessionId: string;
|
|
3080
|
-
createdAt: string;
|
|
3081
3081
|
candidateId: string;
|
|
3082
3082
|
source: {
|
|
3083
3083
|
dirty: boolean;
|
|
@@ -3104,6 +3104,8 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3104
3104
|
};
|
|
3105
3105
|
promotable: boolean;
|
|
3106
3106
|
}, {
|
|
3107
|
+
schemaVersion: "treeseed.development-candidate/v1";
|
|
3108
|
+
createdAt: string;
|
|
3107
3109
|
artifacts: {
|
|
3108
3110
|
kind: "npm-package" | "oci-image" | "archive" | "executable" | "contract-bundle";
|
|
3109
3111
|
projectId: string;
|
|
@@ -3112,9 +3114,7 @@ export declare const developmentCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3112
3114
|
digest: string;
|
|
3113
3115
|
integrity?: string | undefined;
|
|
3114
3116
|
}[];
|
|
3115
|
-
schemaVersion: "treeseed.development-candidate/v1";
|
|
3116
3117
|
sessionId: string;
|
|
3117
|
-
createdAt: string;
|
|
3118
3118
|
candidateId: string;
|
|
3119
3119
|
source: {
|
|
3120
3120
|
dirty: boolean;
|
|
@@ -3152,15 +3152,15 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3152
3152
|
workflowRunId: z.ZodString;
|
|
3153
3153
|
createdAt: z.ZodString;
|
|
3154
3154
|
}, "strict", z.ZodTypeAny, {
|
|
3155
|
-
id: string;
|
|
3156
3155
|
createdAt: string;
|
|
3156
|
+
id: string;
|
|
3157
3157
|
receiptDigest: string;
|
|
3158
3158
|
sourceCommit: string;
|
|
3159
3159
|
stagingRef: string;
|
|
3160
3160
|
workflowRunId: string;
|
|
3161
3161
|
}, {
|
|
3162
|
-
id: string;
|
|
3163
3162
|
createdAt: string;
|
|
3163
|
+
id: string;
|
|
3164
3164
|
receiptDigest: string;
|
|
3165
3165
|
sourceCommit: string;
|
|
3166
3166
|
stagingRef: string;
|
|
@@ -3244,9 +3244,10 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3244
3244
|
completedAt: string;
|
|
3245
3245
|
}>;
|
|
3246
3246
|
}, "strict", z.ZodTypeAny, {
|
|
3247
|
+
schemaVersion: "treeseed.release-evidence/v1";
|
|
3247
3248
|
candidate: {
|
|
3248
|
-
id: string;
|
|
3249
3249
|
createdAt: string;
|
|
3250
|
+
id: string;
|
|
3250
3251
|
receiptDigest: string;
|
|
3251
3252
|
sourceCommit: string;
|
|
3252
3253
|
stagingRef: string;
|
|
@@ -3260,7 +3261,6 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3260
3261
|
digest: string;
|
|
3261
3262
|
size?: number | undefined;
|
|
3262
3263
|
}[];
|
|
3263
|
-
schemaVersion: "treeseed.release-evidence/v1";
|
|
3264
3264
|
compatibilityAttestations: {
|
|
3265
3265
|
digest: string;
|
|
3266
3266
|
contractId: string;
|
|
@@ -3283,9 +3283,10 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3283
3283
|
digest: string;
|
|
3284
3284
|
}[];
|
|
3285
3285
|
}, {
|
|
3286
|
+
schemaVersion: "treeseed.release-evidence/v1";
|
|
3286
3287
|
candidate: {
|
|
3287
|
-
id: string;
|
|
3288
3288
|
createdAt: string;
|
|
3289
|
+
id: string;
|
|
3289
3290
|
receiptDigest: string;
|
|
3290
3291
|
sourceCommit: string;
|
|
3291
3292
|
stagingRef: string;
|
|
@@ -3299,7 +3300,6 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3299
3300
|
digest: string;
|
|
3300
3301
|
size?: number | undefined;
|
|
3301
3302
|
}[];
|
|
3302
|
-
schemaVersion: "treeseed.release-evidence/v1";
|
|
3303
3303
|
verification: {
|
|
3304
3304
|
status: "passed";
|
|
3305
3305
|
operations: string[];
|
|
@@ -3322,9 +3322,10 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3322
3322
|
digest: string;
|
|
3323
3323
|
}[] | undefined;
|
|
3324
3324
|
}>, {
|
|
3325
|
+
schemaVersion: "treeseed.release-evidence/v1";
|
|
3325
3326
|
candidate: {
|
|
3326
|
-
id: string;
|
|
3327
3327
|
createdAt: string;
|
|
3328
|
+
id: string;
|
|
3328
3329
|
receiptDigest: string;
|
|
3329
3330
|
sourceCommit: string;
|
|
3330
3331
|
stagingRef: string;
|
|
@@ -3338,7 +3339,6 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3338
3339
|
digest: string;
|
|
3339
3340
|
size?: number | undefined;
|
|
3340
3341
|
}[];
|
|
3341
|
-
schemaVersion: "treeseed.release-evidence/v1";
|
|
3342
3342
|
compatibilityAttestations: {
|
|
3343
3343
|
digest: string;
|
|
3344
3344
|
contractId: string;
|
|
@@ -3361,9 +3361,10 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3361
3361
|
digest: string;
|
|
3362
3362
|
}[];
|
|
3363
3363
|
}, {
|
|
3364
|
+
schemaVersion: "treeseed.release-evidence/v1";
|
|
3364
3365
|
candidate: {
|
|
3365
|
-
id: string;
|
|
3366
3366
|
createdAt: string;
|
|
3367
|
+
id: string;
|
|
3367
3368
|
receiptDigest: string;
|
|
3368
3369
|
sourceCommit: string;
|
|
3369
3370
|
stagingRef: string;
|
|
@@ -3377,7 +3378,6 @@ export declare const releaseEvidenceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3377
3378
|
digest: string;
|
|
3378
3379
|
size?: number | undefined;
|
|
3379
3380
|
}[];
|
|
3380
|
-
schemaVersion: "treeseed.release-evidence/v1";
|
|
3381
3381
|
verification: {
|
|
3382
3382
|
status: "passed";
|
|
3383
3383
|
operations: string[];
|
|
@@ -14,7 +14,11 @@ const operationBindings = {
|
|
|
14
14
|
"auth logout": protocol("protocol.oauth.revoke"),
|
|
15
15
|
"auth status": operation("accounts.current.show"),
|
|
16
16
|
"users create": protocol("protocol.accounts.create"),
|
|
17
|
-
"send": operation("communications.send", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "channel"
|
|
17
|
+
"send": operation("communications.send", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "channel"), field("body", "message", "argument", "message"), field("body", "recipients", "option", "to"), field("body", "timeoutSeconds", "option", "timeout", false, "integer")]),
|
|
18
|
+
"topics list": operation("communications.topics.list", [field("path", "teamId", "context", "team", true), ...page()]),
|
|
19
|
+
"topics show": operation("communications.topics.show", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true)]),
|
|
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
|
+
"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)]),
|
|
18
22
|
"teams list": operation("teams.list", page()),
|
|
19
23
|
"teams current": local("local.teams.current"),
|
|
20
24
|
"teams use": local("local.teams.use"),
|
|
@@ -47,6 +51,18 @@ const operationBindings = {
|
|
|
47
51
|
"host topology": local("local.host.topology"),
|
|
48
52
|
"host connections": local("local.host.connections"),
|
|
49
53
|
"host provider status": local("local.host.provider.status"),
|
|
54
|
+
"host storage status": local("local.host.storage.status"),
|
|
55
|
+
"host storage connect": local("local.host.storage.connect"),
|
|
56
|
+
"host storage reconcile": local("local.host.storage.reconcile"),
|
|
57
|
+
"host storage rotate": local("local.host.storage.rotate"),
|
|
58
|
+
"host security plan": local("local.host.security.plan"),
|
|
59
|
+
"host security initialize": local("local.host.security.initialize"),
|
|
60
|
+
"host security status": local("local.host.security.status"),
|
|
61
|
+
"host security verify": local("local.host.security.verify"),
|
|
62
|
+
"host security rotate": local("local.host.security.rotate"),
|
|
63
|
+
"host security recovery verify": local("local.host.security.recovery.verify"),
|
|
64
|
+
"host sandbox status": local("local.host.sandbox.status"),
|
|
65
|
+
"host sandbox doctor": local("local.host.sandbox.doctor"),
|
|
50
66
|
"host fleet status": local("local.host.fleet.status"),
|
|
51
67
|
"host recovery status": local("local.host.recovery.status"),
|
|
52
68
|
"host recovery retry": local("local.host.recovery.retry"),
|
|
@@ -166,7 +182,7 @@ function branch(segment, children) {
|
|
|
166
182
|
return { nodeType: "branch", segment, description: `${segment[0].toUpperCase()}${segment.slice(1)} operations.`, children };
|
|
167
183
|
}
|
|
168
184
|
function configurationAdopt() {
|
|
169
|
-
const value = leaf("adopt", "mutation", "file", "
|
|
185
|
+
const value = leaf("adopt", "mutation", "file", "destructive");
|
|
170
186
|
if (value.nodeType !== "leaf") throw new Error("Configuration adoption must be a leaf command.");
|
|
171
187
|
value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm replacement of the installed configuration identity.", type: "boolean" }];
|
|
172
188
|
return value;
|
|
@@ -178,6 +194,35 @@ function hostReset() {
|
|
|
178
194
|
value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm deletion of all manager-owned component data and receipts.", type: "boolean" }];
|
|
179
195
|
return value;
|
|
180
196
|
}
|
|
197
|
+
function hostSecurityInitialize() {
|
|
198
|
+
const value = leaf("initialize", "mutation", void 0, "credential");
|
|
199
|
+
if (value.nodeType !== "leaf") throw new Error("Host security initialization must be a leaf command.");
|
|
200
|
+
value.description = "Initialize the encrypted provider volume, application keys, and offline recovery bundle.";
|
|
201
|
+
value.options = [...value.options ?? [], { name: "--recovery-bundle", description: "Absolute path for the new encrypted offline recovery bundle.", type: "string", required: true }, { name: "--confirm", description: "Confirm provider-state migration and volume formatting.", type: "boolean", required: true }];
|
|
202
|
+
return value;
|
|
203
|
+
}
|
|
204
|
+
function hostSecurityRotate() {
|
|
205
|
+
const value = leaf("rotate", "mutation", "target", "credential");
|
|
206
|
+
if (value.nodeType !== "leaf") throw new Error("Host security rotation must be a leaf command.");
|
|
207
|
+
value.options = [
|
|
208
|
+
...value.options ?? [],
|
|
209
|
+
{ name: "--recovery-bundle", description: "Absolute path to the currently authenticated recovery bundle.", type: "string", required: true },
|
|
210
|
+
{ name: "--new-recovery-bundle", description: "Absolute non-existing path for the replacement recovery bundle.", type: "string", required: true },
|
|
211
|
+
{ name: "--confirm", description: "Confirm creation and activation of a new key generation.", type: "boolean", required: true }
|
|
212
|
+
];
|
|
213
|
+
return value;
|
|
214
|
+
}
|
|
215
|
+
function hostRecoveryVerify() {
|
|
216
|
+
return {
|
|
217
|
+
nodeType: "leaf",
|
|
218
|
+
segment: "verify",
|
|
219
|
+
description: "Authenticate and inventory an offline recovery bundle without revealing secrets.",
|
|
220
|
+
kind: "read",
|
|
221
|
+
options: [{ name: "--bundle", description: "Absolute recovery bundle path.", type: "string", required: true }],
|
|
222
|
+
resultSchemaId: "treeseed.host-recovery-verification/v1",
|
|
223
|
+
execution: unavailable()
|
|
224
|
+
};
|
|
225
|
+
}
|
|
181
226
|
function aiModeSet() {
|
|
182
227
|
const value = leaf("set", "mutation", "mode", "authority");
|
|
183
228
|
if (value.nodeType !== "leaf") throw new Error("AI mode set must be a leaf command.");
|
|
@@ -246,7 +291,14 @@ const commandTree = {
|
|
|
246
291
|
schemaVersion: "treeseed.command-tree/v1",
|
|
247
292
|
executable: "trsd",
|
|
248
293
|
commands: [
|
|
249
|
-
{ nodeType: "leaf", segment: "
|
|
294
|
+
{ nodeType: "leaf", segment: "inbox", description: "Open the active team governance inbox.", kind: "read", options: [{ name: "--project", description: "Initial project filter.", type: "string" }, { name: "--type", description: "Initial proposal, question, or all filter.", type: "string" }, { name: "--all", description: "Include completed and decided items.", type: "boolean" }], resultSchemaId: "treeseed.inbox-session/v1", execution: local("local.inbox") },
|
|
295
|
+
{ nodeType: "leaf", segment: "send", description: "Send a message or open the interactive team topic browser.", kind: "mutation", arguments: [{ name: "channel", description: "Optional team discussion topic to preselect.", required: false }, { name: "message", description: "Markdown message containing agent addresses.", required: false }], options: [planOption, { name: "--team", description: "One-command team override.", type: "string" }, { name: "--to", description: "Deprecated validation-only address list.", type: "string[]" }, { name: "--timeout", description: "Optional maximum seconds to listen for the complete response chain.", type: "number" }, { name: "--no-wait", description: "Return immediately after durable admission.", type: "boolean" }, { name: "--wait", description: "Deprecated wait duration in seconds.", type: "number" }, { name: "--json-stream", description: "Emit ordered communication events as NDJSON.", type: "boolean" }, { name: "--diagnostics", description: "Diagnostic detail: metadata or full.", type: "string" }], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-send-receipt/v4", execution: unavailable() },
|
|
296
|
+
branch("topics", [
|
|
297
|
+
{ nodeType: "leaf", segment: "list", description: "List discussion topics and active listeners.", kind: "read", options: [{ name: "--status", description: "Topic status.", type: "string" }, { name: "--limit", description: "Maximum topics.", type: "number" }, { name: "--cursor", description: "Pagination cursor.", type: "string" }], resultSchemaId: "treeseed.communication-topic-page/v1", execution: unavailable() },
|
|
298
|
+
{ nodeType: "leaf", segment: "show", description: "Show a discussion topic and its listeners.", kind: "read", arguments: [{ name: "topic", description: "Discussion topic.", required: true }], resultSchemaId: "treeseed.communication-topic/v1", execution: unavailable() },
|
|
299
|
+
{ 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
|
+
{ 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
|
+
]),
|
|
250
302
|
branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
|
|
251
303
|
branch("users", [userCreate()]),
|
|
252
304
|
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() }]),
|
|
@@ -275,6 +327,14 @@ const commandTree = {
|
|
|
275
327
|
leaf("topology"),
|
|
276
328
|
leaf("connections"),
|
|
277
329
|
branch("provider", [leaf("status")]),
|
|
330
|
+
branch("storage", [
|
|
331
|
+
leaf("status"),
|
|
332
|
+
addOptions(leaf("connect", "mutation", "backend", "credential"), [{ name: "--account-id", description: "Optional Cloudflare account ID when the bootstrap authority reaches multiple accounts.", type: "string" }]),
|
|
333
|
+
leaf("reconcile", "mutation", void 0, "authority"),
|
|
334
|
+
leaf("rotate", "mutation", "backend", "credential")
|
|
335
|
+
]),
|
|
336
|
+
branch("security", [leaf("plan"), hostSecurityInitialize(), leaf("status"), leaf("verify"), hostSecurityRotate(), branch("recovery", [hostRecoveryVerify()])]),
|
|
337
|
+
branch("sandbox", [leaf("status"), leaf("doctor")]),
|
|
278
338
|
branch("fleet", [leaf("status")]),
|
|
279
339
|
branch("update", [leaf("status"), leaf("check", "mutation"), leaf("apply", "mutation", void 0, "authority"), leaf("channel", "mutation", "track", "authority"), leaf("pause", "mutation", void 0, "authority"), leaf("resume", "mutation", void 0, "authority")]),
|
|
280
340
|
branch("component", [leaf("list"), leaf("status", "read", "component"), leaf("enable", "mutation", "component", "authority"), leaf("disable", "mutation", "component", "destructive")]),
|