@treeseed/sdk 0.13.0-rc.122 → 0.13.0-rc.124

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 (126) hide show
  1. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +1392 -974
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +72 -27
  3. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +34 -34
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
  5. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
  6. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +1 -0
  7. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +126 -1
  8. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
  9. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +1 -3
  10. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +21 -15
  11. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +3 -42
  12. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +8 -8
  13. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +227 -66
  14. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +54 -19
  15. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +214 -5
  16. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
  17. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +47 -47
  18. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -0
  19. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
  20. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +434 -230
  21. package/dist/agent-capacity/contracts/support/execution-graph.js +20 -18
  22. package/dist/agent-capacity/contracts/support/financial-records.d.ts +2 -0
  23. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +286 -254
  24. package/dist/agent-capacity/validation/agent-definition-schema.js +22 -28
  25. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
  26. package/dist/agent-capacity/validation/assignment-records.js +45 -0
  27. package/dist/capacity/agents/agent-capacity.d.ts +1 -0
  28. package/dist/capacity/agents/agent-capacity.js +1 -0
  29. package/dist/capacity-provider/capability-ontology.d.ts +102 -102
  30. package/dist/capacity-provider/client.d.ts +14 -7
  31. package/dist/capacity-provider/client.js +1 -4
  32. package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
  33. package/dist/capacity-provider/contracts/environment-profiles.d.ts +40 -40
  34. package/dist/capacity-provider/contracts/governance.d.ts +2 -17
  35. package/dist/capacity-provider/contracts/index.d.ts +2 -0
  36. package/dist/capacity-provider/contracts/index.js +2 -0
  37. package/dist/capacity-provider/core-capability-catalog.d.ts +7 -7
  38. package/dist/capacity-provider/environment-catalog.d.ts +22 -22
  39. package/dist/capacity-provider/environment-catalog.js +1 -1
  40. package/dist/capacity-provider/install-configuration.d.ts +4 -4
  41. package/dist/capacity-provider/sandbox-contracts.d.ts +54 -54
  42. package/dist/capacity-provider/source-workspace.d.ts +76 -76
  43. package/dist/capacity-provider/validation.d.ts +10 -2
  44. package/dist/capacity-provider/validation.js +52 -22
  45. package/dist/content/validation/agent-operational-content-schemas.d.ts +120 -118
  46. package/dist/content/validation/agent-operational-content-schemas.js +2 -0
  47. package/dist/content/validation/auxiliary-content-schemas.d.ts +92 -92
  48. package/dist/content/validation/content-model-schemas.d.ts +3155 -2512
  49. package/dist/content/validation/content-model-schemas.js +97 -87
  50. package/dist/content/validation/portable-content-data.d.ts +173 -168
  51. package/dist/content/validation/schema-constraints.d.ts +78 -0
  52. package/dist/content/validation/schema-constraints.js +149 -0
  53. package/dist/deployment/ai/storage.d.ts +20 -20
  54. package/dist/deployment/ai-hosting.d.ts +12 -12
  55. package/dist/deployment/ai-instance.d.ts +12 -12
  56. package/dist/deployment/ai-mode.d.ts +34 -34
  57. package/dist/deployment/hosted-topology-template.d.ts +25 -25
  58. package/dist/deployment/hosted-topology.d.ts +146 -146
  59. package/dist/deployment/postgres/transfer.d.ts +2 -2
  60. package/dist/deployment/schemas.d.ts +504 -504
  61. package/dist/development/schemas.d.ts +325 -325
  62. package/dist/graph/context-query-contracts.js +1 -1
  63. package/dist/guarantees/index.d.ts +26 -2
  64. package/dist/identity/contracts.js +6 -1
  65. package/dist/operator-contracts/canonical-command-tree.js +22 -8
  66. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +27 -27
  67. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +25 -25
  68. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +11 -9
  69. package/dist/operator-contracts/catalog/communication-operations.d.ts +108 -90
  70. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +33 -33
  71. package/dist/operator-contracts/catalog/inbox-operations.d.ts +27 -27
  72. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +4 -4
  73. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
  74. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +5 -5
  75. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +3 -3
  76. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +16 -8
  77. package/dist/operator-contracts/catalog/services/secret-operations.js +2 -1
  78. package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +11 -11
  79. package/dist/operator-contracts/catalog/workdays/selection-commands.js +7 -6
  80. package/dist/operator-contracts/communication/contracts.d.ts +340 -198
  81. package/dist/operator-contracts/communication/contracts.js +6 -1
  82. package/dist/operator-contracts/control-plane-operation.d.ts +7 -0
  83. package/dist/operator-contracts/control-plane-operation.js +6 -0
  84. package/dist/operator-contracts/control-plane-operations.d.ts +469 -442
  85. package/dist/operator-contracts/control-plane-operations.js +26 -10
  86. package/dist/operator-contracts/inbox/contracts.d.ts +100 -100
  87. package/dist/operator-contracts/knowledge/contracts.d.ts +6 -6
  88. package/dist/operator-contracts/mcp.js +4 -3
  89. package/dist/operator-contracts/workday-lifecycle.d.ts +192 -2
  90. package/dist/operator-contracts/workday-lifecycle.js +108 -45
  91. package/dist/platform/agent-schema-verification.js +316 -33
  92. package/dist/platform/contracts.d.ts +72 -72
  93. package/dist/platform/schemas.d.ts +144 -36
  94. package/dist/platform/schemas.js +26 -0
  95. package/dist/platform/verification.js +4 -0
  96. package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
  97. package/dist/secrets-capability/secret-contracts.d.ts +2 -2
  98. package/dist/secrets-capability/shared-access.d.ts +1 -1
  99. package/dist/secrets-capability/shared-resources.d.ts +30 -30
  100. package/dist/security/encrypted-envelope.d.ts +6 -6
  101. package/dist/treedx/client.d.ts +4 -4
  102. package/dist/treedx/index.d.ts +1 -1
  103. package/dist/treedx/index.js +1 -0
  104. package/dist/treedx/types.d.ts +286 -0
  105. package/dist/treedx/types.js +44 -0
  106. package/dist/types/agents/agent-activity-profile.d.ts +1 -0
  107. package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
  108. package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
  109. package/guarantees/agent/golden/product.guarantee.yaml +12 -0
  110. package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +837 -0
  111. package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
  112. package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
  113. package/guarantees/verifiers/golden.verifiers.yaml +1429 -0
  114. package/package.json +10 -5
  115. package/tests/acceptance/golden-product.test.ts +205 -0
  116. package/tests/acceptance/golden-product.ts +404 -0
  117. package/tests/acceptance/product/base-red.ts +73 -0
  118. package/tests/acceptance/product/documentation-examples.ts +68 -0
  119. package/tests/acceptance/product/intent-runtime.ts +145 -0
  120. package/tests/acceptance/product/release-output.ts +160 -0
  121. package/tests/acceptance/product/research-artifact.ts +87 -0
  122. package/tests/acceptance/product/research-revision.ts +82 -0
  123. package/tests/acceptance/product/research-source.ts +91 -0
  124. package/tests/acceptance/product/test-chain.ts +192 -0
  125. package/treeseed.package.yaml +147 -0
  126. package/dist/.treeseed-build-complete.json +0 -1
@@ -78,7 +78,7 @@ function compileDeclarativeContextQuery(query, options = {}) {
78
78
  errors.push(`Context query "${id || "<unknown>"}" scope must start with "/".`);
79
79
  }
80
80
  const codeScopes = query.codeScopes === void 0 ? void 0 : Array.isArray(query.codeScopes) ? [...new Set(query.codeScopes.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean))] : [];
81
- if (query.codeScopes !== void 0 && (!Array.isArray(query.codeScopes) || codeScopes.length === 0)) {
81
+ if (codeScopes !== void 0 && (!Array.isArray(query.codeScopes) || codeScopes.length === 0)) {
82
82
  errors.push(`Context query "${id || "<unknown>"}" codeScopes must be a non-empty array of strings.`);
83
83
  }
84
84
  const targetPaths = [...new Set((query.target?.paths ?? []).map((entry) => entry.trim()).filter(Boolean))];
@@ -1,6 +1,14 @@
1
1
  export { runUiEvidenceTrustVerifier, validateUiEvidenceTrust } from './evidence-trust.js';
2
2
  export type GuaranteeRunStatus = 'passed' | 'failed' | 'skipped' | 'blocked';
3
- export type GuaranteeFilter = Record<string, unknown>;
3
+ export interface GuaranteeFilter {
4
+ ownerPackage?: string;
5
+ type?: string;
6
+ subtype?: string;
7
+ gate?: string;
8
+ status?: string;
9
+ ids?: string[];
10
+ journeyIndexes?: number[];
11
+ }
4
12
  export interface GuaranteeDiagnostic {
5
13
  severity: 'error' | 'warning' | 'info';
6
14
  code: string;
@@ -12,6 +20,8 @@ export interface GuaranteeRunStep {
12
20
  id: string;
13
21
  kind: string;
14
22
  status: GuaranteeRunStatus;
23
+ summary?: string;
24
+ ref?: string;
15
25
  evidence?: string[];
16
26
  diagnostics?: GuaranteeDiagnostic[];
17
27
  [key: string]: unknown;
@@ -27,6 +37,10 @@ export interface GuaranteePlanEntry {
27
37
  sourcePath: string;
28
38
  selected: boolean;
29
39
  dependency: boolean;
40
+ sceneManifest?: string;
41
+ verifierRefs?: string[];
42
+ sceneVerifierRefs?: string[];
43
+ journeyIndex?: number;
30
44
  [key: string]: unknown;
31
45
  }
32
46
  export interface GuaranteePlanReport {
@@ -45,6 +59,7 @@ export interface GuaranteeRunResult {
45
59
  selected: boolean;
46
60
  dependency: boolean;
47
61
  sourcePath: string;
62
+ journeyIndex?: number;
48
63
  steps: GuaranteeRunStep[];
49
64
  diagnostics: GuaranteeDiagnostic[];
50
65
  evidence: string[];
@@ -84,7 +99,16 @@ export interface CatalogOperationGuaranteeVerifier {
84
99
  caseId: string;
85
100
  description?: string;
86
101
  }
87
- export type GuaranteeVerifierDefinition = ArtifactGuaranteeVerifier | CatalogOperationGuaranteeVerifier;
102
+ /** Local development verification against package-owned tests, never release-artifact proof. */
103
+ export interface DevelopmentTestGuaranteeVerifier {
104
+ kind: 'vitestCase' | 'nodeTestCase';
105
+ ownerPackage: string;
106
+ testFile: string;
107
+ testName: string;
108
+ /** Test-process watchdog only; milliseconds, 1..86_400_000. Default: 120_000. Never an assignment budget. */
109
+ timeoutMs?: number;
110
+ }
111
+ export type GuaranteeVerifierDefinition = ArtifactGuaranteeVerifier | CatalogOperationGuaranteeVerifier | DevelopmentTestGuaranteeVerifier;
88
112
  export interface GuaranteeVerifierCheck {
89
113
  id: string;
90
114
  status: 'passed' | 'failed';
@@ -1,6 +1,11 @@
1
1
  import { z } from "zod";
2
2
  const identityEndpointSchema = z.string().url().superRefine((value, context) => {
3
- const url = new URL(value);
3
+ let url;
4
+ try {
5
+ url = new URL(value);
6
+ } catch {
7
+ return;
8
+ }
4
9
  if (url.protocol !== "https:" || url.username || url.password || url.hash || url.search) {
5
10
  context.addIssue({ code: z.ZodIssueCode.custom, message: "Identity endpoints require HTTPS without credentials, query, or fragment." });
6
11
  }
@@ -15,6 +15,7 @@ const workdayIntentInputs = [
15
15
  field("body", "planningOnly", "option", "planningOnly"),
16
16
  field("body", "proposalIds", "option", "proposal", false, "csv"),
17
17
  field("body", "decisionIds", "option", "decision", false, "csv"),
18
+ field("body", "continueFromWorkdayId", "option", "continueFrom"),
18
19
  ...WORKDAY_SELECTION_INPUTS
19
20
  ];
20
21
  const operationBindings = {
@@ -43,6 +44,8 @@ const operationBindings = {
43
44
  "proposals voting start": operation("governance.proposals.voting.start", [field("path", "projectId", "context", "project", true), field("path", "proposalId", "argument", "proposal", true)]),
44
45
  "proposals vote": operation("governance.proposals.vote", [field("path", "projectId", "context", "project", true), field("path", "proposalId", "argument", "proposal", true), field("body", "file", "option", "input", true)]),
45
46
  "proposals evaluate": operation("governance.proposals.evaluate", [field("path", "projectId", "context", "project", true), field("path", "proposalId", "argument", "proposal", true), field("body", "file", "option", "input")]),
47
+ "proposals withdraw": operation("governance.proposals.withdraw", [field("path", "projectId", "context", "project", true), field("path", "proposalId", "argument", "proposal", true), field("body", "file", "option", "input")]),
48
+ "proposals supersede": operation("governance.proposals.supersede", [field("path", "projectId", "context", "project", true), field("path", "proposalId", "argument", "proposal", true), field("body", "file", "option", "input")]),
46
49
  "decisions list": operation("governance.decisions.list", [field("path", "projectId", "context", "project", true), ...page()]),
47
50
  "decisions show": operation("governance.decisions.show", [field("path", "projectId", "context", "project", true), field("path", "decisionId", "argument", "decision", true)]),
48
51
  "secrets list": local("local.secrets.list"),
@@ -85,6 +88,8 @@ const operationBindings = {
85
88
  "host topology": local("local.host.topology"),
86
89
  "host connections": local("local.host.connections"),
87
90
  "host provider status": local("local.host.provider.status"),
91
+ "host provider limits show": local("local.host.provider.limits.show"),
92
+ "host provider limits set": local("local.host.provider.limits.set"),
88
93
  "host provider credentials list": local("local.host.provider.credentials.list"),
89
94
  "host provider credentials status": local("local.host.provider.credentials.status"),
90
95
  "host provider credentials initialize": local("local.host.provider.credentials.initialize"),
@@ -146,7 +151,7 @@ const operationBindings = {
146
151
  "providers credentials revoke": operation("providers.credentials.revoke", [field("path", "teamId", "context", "team", true), field("path", "connectionId", "argument", "connection", true)]),
147
152
  "capacity status": operation("capacity.status", [field("path", "teamId", "context", "team", true), ...page()]),
148
153
  "capacity explain": operation("capacity.explain", [field("path", "teamId", "context", "team", true)]),
149
- "capacity usage": operation("capacity.usage", [field("path", "teamId", "context", "team", true), field("query", "projectId", "option", "project", true), field("query", "workDayId", "option", "workday")]),
154
+ "capacity usage": operation("capacity.usage", [field("path", "teamId", "context", "team", true), field("query", "projectId", "option", "project", true), field("query", "workDayId", "option", "workday"), ...page()]),
150
155
  "capacity ledger": operation("capacity.ledger", [field("path", "teamId", "context", "team", true), field("query", "projectId", "option", "project", true), field("query", "workDayId", "option", "workday"), ...page()]),
151
156
  "capacity audit": operation("capacity.audit", [field("path", "teamId", "context", "team", true), ...page()]),
152
157
  "seeds validate": operation("seeds.validate", [field("body", "file", "argument", "file", true)]),
@@ -159,19 +164,21 @@ const operationBindings = {
159
164
  "workdays start": operation("workdays.start", [field("path", "teamId", "context", "team", true), field("body", "preflightId", "option", "preflight", true), field("body", "preflightDigest", "option", "digest", true)]),
160
165
  "workdays list": operation("workdays.list", [field("path", "teamId", "context", "team", true), ...page()]),
161
166
  "workdays show": operation("workdays.show", [field("path", "teamId", "context", "team", true), field("path", "runId", "argument", "workday", true)]),
167
+ "workdays events list": operation("workdays.events.list", [field("path", "teamId", "context", "team", true), field("path", "runId", "argument", "workday", true), ...page(), field("query", "diagnostics", "option")]),
162
168
  "workdays stop": operation("workdays.stop", [field("path", "teamId", "context", "team", true), field("path", "runId", "argument", "workday", true), field("body", "reason", "option", "reason")]),
163
169
  "workdays schedules list": operation("workdays.schedules.list", [field("path", "teamId", "context", "team", true)]),
164
170
  "workdays schedules start": operation("workdays.schedules.create", [field("path", "teamId", "context", "team", true), ...workdayIntentInputs.map((binding) => ({ ...binding, field: `intent.${binding.field}` })), field("body", "cadenceSeconds", "option", "cadenceSeconds", false, "integer")]),
165
- "assignments list": operation("assignments.list", [field("path", "teamId", "context", "team", true), ...page()]),
171
+ "assignments list": operation("assignments.list", [field("path", "teamId", "context", "team", true), field("query", "workdayId", "option", "workday"), ...page()]),
166
172
  "assignments show": operation("assignments.show", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true)]),
167
173
  "assignments explain": operation("assignments.explain", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true)]),
168
174
  "assignments retry": operation("assignments.retry", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true), field("body", "reason", "option")]),
169
175
  "assignments cancel": operation("assignments.cancel", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true), field("body", "reason", "option")]),
176
+ "assignments recover": operation("assignments.recover", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true), field("body", "expectedStateVersion", "option", "stateVersion", true, "integer"), field("body", "reason", "option", "reason", true)]),
170
177
  "execution graph show": operation("execution.graph.show", [field("path", "teamId", "context", "team", true), field("query", "projectId", "option", "project"), field("query", "decisionId", "option", "decision")]),
171
178
  "execution graph watch": operation("execution.graph.watch", [field("path", "teamId", "context", "team", true), field("query", "cursor", "option"), field("query", "waitSeconds", "option", "wait", false, "integer")]),
172
179
  "execution node show": operation("execution.nodes.show", [field("path", "teamId", "context", "team", true), field("path", "nodeId", "argument", "node", true)]),
173
180
  "execution node explain": operation("execution.nodes.explain", [field("path", "teamId", "context", "team", true), field("path", "nodeId", "argument", "node", true)]),
174
- "execution reconcile": operation("execution.reconcile", [field("path", "teamId", "context", "team", true), field("body", "projectId", "option", "project"), field("body", "plan", "option", "plan", false, "boolean")]),
181
+ "execution reconcile": operation("execution.reconcile", [field("path", "teamId", "context", "team", true), field("body", "projectId", "option", "project"), field("body", "plan", "option", "plan")]),
175
182
  "execution assignments list": operation("execution.assignments.list", [field("path", "teamId", "context", "team", true), ...page()]),
176
183
  "projects treedx show": operation("treedx.library.show", [field("path", "projectId", "argument", "project", true)]),
177
184
  "projects treedx bind": operation("treedx.library.bind", [field("path", "projectId", "argument", "project", true), field("body", "connectionId", "option", "connection", true)]),
@@ -250,7 +257,9 @@ const commandTree = {
250
257
  ])]),
251
258
  branch("voting", [leaf("start", "mutation", "proposal")]),
252
259
  addOptions(leaf("vote", "mutation", "proposal"), [{ name: "--input", description: "YAML or JSON vote.", type: "string", required: true }]),
253
- addOptions(leaf("evaluate", "mutation", "proposal"), [{ name: "--input", description: "Optional YAML or JSON evaluation decision.", type: "string" }])
260
+ addOptions(leaf("evaluate", "mutation", "proposal"), [{ name: "--input", description: "Optional YAML or JSON evaluation decision.", type: "string" }]),
261
+ addOptions(leaf("withdraw", "mutation", "proposal", "destructive"), [{ name: "--input", description: "Optional YAML or JSON withdrawal reason and evidence.", type: "string" }]),
262
+ addOptions(leaf("supersede", "mutation", "proposal"), [{ name: "--input", description: "Optional YAML or JSON successor, reason, and evidence.", type: "string" }])
254
263
  ]),
255
264
  branch("decisions", [leaf("list"), leaf("show", "read", "decision")]),
256
265
  branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation")]),
@@ -291,7 +300,7 @@ const commandTree = {
291
300
  developmentCommand("status", "read", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--all", description: "Include stopped sessions.", type: "boolean" }]),
292
301
  developmentCommand("logs", "read", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--target", description: "Development target identity.", type: "string" }, { name: "--follow", description: "Follow target logs.", type: "boolean" }]),
293
302
  developmentCommand("plan", "read", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--affected", description: "Show the smallest affected closure.", type: "boolean" }]),
294
- developmentCommand("freeze", "mutation", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--allow-dirty", description: "Create a non-promotable dirty-source candidate.", type: "boolean" }]),
303
+ developmentCommand("freeze", "mutation", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--target", description: "Freeze only these exact project.target roots and their declared dependencies.", type: "string[]" }, { name: "--allow-dirty", description: "Create a non-promotable dirty-source candidate.", type: "boolean" }]),
295
304
  developmentCommand("verify", "mutation", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--candidate", description: "Candidate identity.", type: "string" }])
296
305
  ]),
297
306
  branch("host", [
@@ -308,7 +317,11 @@ const commandTree = {
308
317
  branch("postgres", [branch("transfer", [leaf("prepare", "mutation", "file", "authority"), leaf("status")])]),
309
318
  leaf("topology"),
310
319
  leaf("connections"),
311
- branch("provider", [leaf("status"), branch("credentials", [leaf("list"), leaf("status"), hostProviderCredentialInitialize()]), hostProviderEnvironmentBranch()]),
320
+ branch("provider", [leaf("status"), branch("limits", [leaf("show"), addOptions(leaf("set", "mutation", "provider", "authority"), [
321
+ { name: "--daily-active-seconds", description: "Daily active-time cap in seconds.", type: "number", required: true },
322
+ { name: "--capability", description: "Set only this capability; otherwise set the shared model and all its capabilities.", type: "string" },
323
+ { name: "--expected-generation", description: "Reject if the host configuration generation changed.", type: "number" }
324
+ ])]), branch("credentials", [leaf("list"), leaf("status"), hostProviderCredentialInitialize()]), hostProviderEnvironmentBranch()]),
312
325
  branch("storage", [
313
326
  leaf("status"),
314
327
  addOptions(leaf("connect", "mutation", "backend", "credential"), [{ name: "--account-id", description: "Optional Cloudflare account ID when the bootstrap authority reaches multiple accounts.", type: "string" }]),
@@ -351,7 +364,7 @@ const commandTree = {
351
364
  branch("capacity", [
352
365
  leaf("status"),
353
366
  leaf("explain"),
354
- addOptions(leaf("usage"), [{ name: "--workday", description: "Restrict evidence to one workday.", type: "string" }]),
367
+ addOptions(leaf("usage"), [{ name: "--workday", description: "Restrict evidence to one workday.", type: "string" }, { name: "--limit", description: "Page size.", type: "number" }, { name: "--cursor", description: "Opaque page cursor.", type: "string" }]),
355
368
  addOptions(leaf("ledger"), [{ name: "--workday", description: "Restrict evidence to one workday.", type: "string" }]),
356
369
  leaf("audit")
357
370
  ]),
@@ -365,9 +378,10 @@ const commandTree = {
365
378
  leaf("show", "read", "workday"),
366
379
  leaf("watch", "read", "workday"),
367
380
  leaf("stop", "mutation", "workday", "authority"),
381
+ branch("events", [addOptions(leaf("list", "read", "workday"), [{ name: "--diagnostics", description: "Diagnostic detail: metadata or full.", type: "string" }])]),
368
382
  branch("schedules", [leaf("list"), leaf("show", "read", "schedule"), leaf("plan"), addOptions(leaf("start", "mutation", void 0, "authority"), [...WORKDAY_PLAN_OPTIONS.filter((option) => option.name !== "--plan"), { name: "--cadence-seconds", description: "Seconds between recurring workday starts.", type: "number" }]), leaf("pause", "mutation", "schedule", "authority"), leaf("resume", "mutation", "schedule", "authority"), leaf("retire", "mutation", "schedule", "destructive")])
369
383
  ]),
370
- branch("assignments", [leaf("list"), leaf("show", "read", "assignment"), leaf("explain", "read", "assignment"), leaf("watch", "read", "assignment"), leaf("retry", "mutation", "assignment", "authority"), leaf("cancel", "mutation", "assignment", "destructive"), leaf("artifacts", "read", "assignment")]),
384
+ branch("assignments", [addOptions(leaf("list"), [{ name: "--workday", description: "Restrict assignments to one exact workday.", type: "string" }]), leaf("show", "read", "assignment"), leaf("explain", "read", "assignment"), leaf("watch", "read", "assignment"), leaf("retry", "mutation", "assignment", "authority"), leaf("cancel", "mutation", "assignment", "destructive"), addOptions(leaf("recover", "mutation", "assignment", "destructive"), [{ name: "--state-version", description: "Exact expired assignment state version.", type: "number", required: true }, { name: "--reason", description: "Why actual usage remains unresolved.", type: "string", required: true }]), leaf("artifacts", "read", "assignment")]),
371
385
  branch("execution", [
372
386
  branch("graph", [addOptions(leaf("show"), [{ name: "--project", description: "Filter the team graph by project.", type: "string" }, { name: "--decision", description: "Filter the team graph by decision.", type: "string" }]), addOptions(leaf("watch"), [{ name: "--cursor", description: "Resume after this graph event cursor.", type: "string" }, { name: "--wait", description: "Long-poll duration in seconds.", type: "number" }, { name: "--json-stream", description: "Emit graph events as NDJSON.", type: "boolean" }])]),
373
387
  branch("node", [leaf("show", "read", "node"), leaf("explain", "read", "node")]),
@@ -7,69 +7,69 @@ export declare const AGENT_TEAM_CLONE_OPERATIONS: {
7
7
  allEligible?: boolean | undefined;
8
8
  }, {
9
9
  schemaVersion: "treeseed.agent-team-clone-plan/v1";
10
- targets: {
10
+ source: {
11
11
  name: string;
12
- slug: string;
13
- repository: string;
14
12
  commit: string;
15
- action: "noop" | "create" | "update";
13
+ repository: string;
14
+ slug: string;
16
15
  projectId: string;
16
+ };
17
+ teamId: string;
18
+ digest: string;
19
+ targets: {
20
+ name: string;
17
21
  definitions: {
18
22
  path: string;
19
23
  agentClass: string;
20
24
  desiredDigest: string;
21
25
  sourceDigest: string;
22
26
  }[];
23
- }[];
24
- digest: string;
25
- teamId: string;
26
- source: {
27
- name: string;
28
- slug: string;
29
- repository: string;
30
27
  commit: string;
28
+ repository: string;
29
+ slug: string;
31
30
  projectId: string;
32
- };
31
+ action: "create" | "update" | "noop";
32
+ }[];
33
33
  }>;
34
34
  readonly apply: import("../../control-plane-operation.js").ControlPlaneOperationBinding<{
35
35
  teamId: string;
36
36
  }, {}, {
37
37
  schemaVersion: "treeseed.agent-team-clone-plan/v1";
38
- targets: {
38
+ source: {
39
39
  name: string;
40
- slug: string;
41
- repository: string;
42
40
  commit: string;
43
- action: "noop" | "create" | "update";
41
+ repository: string;
42
+ slug: string;
44
43
  projectId: string;
44
+ };
45
+ teamId: string;
46
+ digest: string;
47
+ targets: {
48
+ name: string;
45
49
  definitions: {
46
50
  path: string;
47
51
  agentClass: string;
48
52
  desiredDigest: string;
49
53
  sourceDigest: string;
50
54
  }[];
51
- }[];
52
- digest: string;
53
- teamId: string;
54
- source: {
55
- name: string;
56
- slug: string;
57
- repository: string;
58
55
  commit: string;
56
+ repository: string;
57
+ slug: string;
59
58
  projectId: string;
60
- };
59
+ action: "create" | "update" | "noop";
60
+ }[];
61
61
  }, {
62
62
  schemaVersion: "treeseed.agent-team-clone-receipt/v1";
63
+ teamId: string;
63
64
  targets: {
64
- repository: string;
65
65
  commit: string;
66
- action: "noop" | "created" | "updated";
66
+ repository: string;
67
67
  projectId: string;
68
+ action: "created" | "noop" | "updated";
68
69
  definitionCount: number;
69
70
  }[];
70
71
  noop: boolean;
71
72
  planDigest: string;
72
- teamId: string;
73
73
  mutation: boolean;
74
74
  }>;
75
75
  };
@@ -6,24 +6,23 @@ export declare function capabilityOntologyOperations(): {
6
6
  limit?: number | undefined;
7
7
  namespace?: string | undefined;
8
8
  }, undefined, {
9
- generation: number;
10
9
  items: {
11
10
  status: "active" | "revoked" | "deprecated";
12
11
  id: string;
13
12
  version: string;
14
13
  schemaVersion: "treeseed.capability-definition/v1";
14
+ title: string;
15
+ description: string;
16
+ createdAt: string;
15
17
  digest: string;
18
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
19
+ features: string[];
16
20
  inputs: {
17
21
  id: string;
18
22
  version: string;
19
23
  digest: string;
20
24
  mediaTypes?: string[] | undefined;
21
25
  }[];
22
- createdAt: string;
23
- title: string;
24
- description: string;
25
- family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
26
- features: string[];
27
26
  outputs: {
28
27
  id: string;
29
28
  version: string;
@@ -31,9 +30,9 @@ export declare function capabilityOntologyOperations(): {
31
30
  mediaTypes?: string[] | undefined;
32
31
  }[];
33
32
  configuration: {
34
- key: string;
35
- description: string;
36
33
  schema: Record<string, unknown>;
34
+ description: string;
35
+ key: string;
37
36
  requirementSupport: ("required" | "preferred")[];
38
37
  securityCritical?: boolean | undefined;
39
38
  }[];
@@ -52,6 +51,7 @@ export declare function capabilityOntologyOperations(): {
52
51
  }[];
53
52
  qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
54
53
  }[];
54
+ generation: number;
55
55
  ontologyDigest: string;
56
56
  nextCursor: string | null;
57
57
  }>;
@@ -64,18 +64,18 @@ export declare function capabilityOntologyOperations(): {
64
64
  id: string;
65
65
  version: string;
66
66
  schemaVersion: "treeseed.capability-definition/v1";
67
+ title: string;
68
+ description: string;
69
+ createdAt: string;
67
70
  digest: string;
71
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
72
+ features: string[];
68
73
  inputs: {
69
74
  id: string;
70
75
  version: string;
71
76
  digest: string;
72
77
  mediaTypes?: string[] | undefined;
73
78
  }[];
74
- createdAt: string;
75
- title: string;
76
- description: string;
77
- family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
78
- features: string[];
79
79
  outputs: {
80
80
  id: string;
81
81
  version: string;
@@ -83,9 +83,9 @@ export declare function capabilityOntologyOperations(): {
83
83
  mediaTypes?: string[] | undefined;
84
84
  }[];
85
85
  configuration: {
86
- key: string;
87
- description: string;
88
86
  schema: Record<string, unknown>;
87
+ description: string;
88
+ key: string;
89
89
  requirementSupport: ("required" | "preferred")[];
90
90
  securityCritical?: boolean | undefined;
91
91
  }[];
@@ -106,26 +106,23 @@ export declare function capabilityOntologyOperations(): {
106
106
  }>;
107
107
  generation: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, undefined, {
108
108
  schemaVersion: "treeseed.capability-ontology/v1";
109
- digest: string;
110
- createdAt: string;
111
- generation: number;
112
109
  definitions: {
113
110
  status: "active" | "revoked" | "deprecated";
114
111
  id: string;
115
112
  version: string;
116
113
  schemaVersion: "treeseed.capability-definition/v1";
114
+ title: string;
115
+ description: string;
116
+ createdAt: string;
117
117
  digest: string;
118
+ family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
119
+ features: string[];
118
120
  inputs: {
119
121
  id: string;
120
122
  version: string;
121
123
  digest: string;
122
124
  mediaTypes?: string[] | undefined;
123
125
  }[];
124
- createdAt: string;
125
- title: string;
126
- description: string;
127
- family: "research" | "coordination" | "data" | "engineering" | "publishing" | "external-work";
128
- features: string[];
129
126
  outputs: {
130
127
  id: string;
131
128
  version: string;
@@ -133,9 +130,9 @@ export declare function capabilityOntologyOperations(): {
133
130
  mediaTypes?: string[] | undefined;
134
131
  }[];
135
132
  configuration: {
136
- key: string;
137
- description: string;
138
133
  schema: Record<string, unknown>;
134
+ description: string;
135
+ key: string;
139
136
  requirementSupport: ("required" | "preferred")[];
140
137
  securityCritical?: boolean | undefined;
141
138
  }[];
@@ -154,6 +151,9 @@ export declare function capabilityOntologyOperations(): {
154
151
  }[];
155
152
  qualificationTier: "signed-attestation" | "automated-suite" | "reviewed-certification";
156
153
  }[];
154
+ createdAt: string;
155
+ generation: number;
156
+ digest: string;
157
157
  signature: {
158
158
  value: string;
159
159
  keyId: string;
@@ -1,24 +1,24 @@
1
- import type { CommandLeafDescriptor, CommandNodeDescriptor } from '../../command-tree.js';
1
+ import type { CommandInputBinding, CommandLeafDescriptor, CommandNodeDescriptor } from '../../command-tree.js';
2
2
  type Execution = CommandLeafDescriptor['execution'];
3
3
  export declare const unavailable: (reason?: string) => Execution;
4
4
  export declare const protocol: (handlerId: `protocol.${string}`) => Execution;
5
5
  export declare const local: (handlerId: `local.${string}`) => Execution;
6
- export declare const field: (target: "path" | "query" | "body", name: string, source: "argument" | "context" | "option", sourceName?: string, required?: boolean, transform?: "identity" | "integer" | "csv") => {
6
+ export declare const field: (target: "path" | "query" | "body", name: string, source: "argument" | "context" | "option", sourceName?: string, required?: boolean, transform?: CommandInputBinding["transform"]) => {
7
7
  target: "path" | "query" | "body";
8
8
  field: string;
9
9
  source: "context" | "argument" | "option";
10
10
  name: string;
11
11
  required: boolean;
12
- transform: "integer" | "identity" | "csv";
12
+ transform: "number" | "integer" | "identity" | "csv" | "json";
13
13
  };
14
- export declare const operation: (operationId: `${string}.${string}`, input?: ReturnType<typeof field>[]) => Execution;
14
+ export declare const operation: (operationId: `${string}.${string}`, input?: CommandInputBinding[]) => Execution;
15
15
  export declare const page: () => {
16
16
  target: "path" | "query" | "body";
17
17
  field: string;
18
18
  source: "context" | "argument" | "option";
19
19
  name: string;
20
20
  required: boolean;
21
- transform: "integer" | "identity" | "csv";
21
+ transform: "number" | "integer" | "identity" | "csv" | "json";
22
22
  }[];
23
23
  export declare const aiNode: () => {
24
24
  target: "path" | "query" | "body";
@@ -26,7 +26,7 @@ export declare const aiNode: () => {
26
26
  source: "context" | "argument" | "option";
27
27
  name: string;
28
28
  required: boolean;
29
- transform: "integer" | "identity" | "csv";
29
+ transform: "number" | "integer" | "identity" | "csv" | "json";
30
30
  };
31
31
  export declare const aiInstance: () => {
32
32
  target: "path" | "query" | "body";
@@ -34,14 +34,16 @@ export declare const aiInstance: () => {
34
34
  source: "context" | "argument" | "option";
35
35
  name: string;
36
36
  required: boolean;
37
- transform: "integer" | "identity" | "csv";
37
+ transform: "number" | "integer" | "identity" | "csv" | "json";
38
38
  }[];
39
39
  export declare const planOption: {
40
- name: string;
40
+ name: "--plan";
41
41
  description: string;
42
42
  type: "boolean";
43
43
  };
44
- export declare function leaf(segment: string, kind?: 'read' | 'mutation', argument?: string, confirmation?: 'never' | 'destructive' | 'credential' | 'authority' | 'production' | 'irreversible'): CommandNodeDescriptor;
44
+ export declare function leaf(segment: string, kind?: 'read' | 'mutation', argument?: string, confirmation?: 'never' | 'destructive' | 'credential' | 'authority' | 'production' | 'irreversible'): Extract<CommandNodeDescriptor, {
45
+ nodeType: 'leaf';
46
+ }>;
45
47
  export declare function branch(segment: string, children: CommandNodeDescriptor[]): CommandNodeDescriptor;
46
48
  export declare function addOptions(node: CommandNodeDescriptor, options: NonNullable<CommandLeafDescriptor['options']>): CommandNodeDescriptor;
47
49
  export declare function configurationAdopt(): CommandNodeDescriptor;