@treeseed/sdk 0.13.0-rc.11 → 0.13.0-rc.111

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 (453) hide show
  1. package/README.md +23 -9
  2. package/dist/.treeseed-build-complete.json +1 -0
  3. package/dist/accounts/account-contracts.d.ts +6 -0
  4. package/dist/agent-capacity/artifact-mutation-receipt.d.ts +1 -1
  5. package/dist/agent-capacity/artifacts.d.ts +17 -1
  6. package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
  7. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +304 -0
  8. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.js +44 -0
  9. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +10 -1
  10. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.d.ts +25 -0
  11. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.js +67 -0
  12. package/dist/agent-capacity/contracts/capacity/communication/communication-records.d.ts +1 -1
  13. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
  14. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +1 -1
  15. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
  16. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +0 -1
  17. package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +3 -3
  18. package/dist/agent-capacity/contracts/support/decision-work.d.ts +2 -3
  19. package/dist/agent-capacity/validation/activity-profile.js +25 -12
  20. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1092 -1170
  21. package/dist/agent-capacity/validation/agent-definition-schema.js +11 -29
  22. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +20 -20
  23. package/dist/agent-capacity/validation/configuration.d.ts +1 -1
  24. package/dist/agent-capacity/validation/configuration.js +1 -2
  25. package/dist/capacity/agents/agent-capacity.d.ts +2 -0
  26. package/dist/capacity/agents/agent-capacity.js +2 -0
  27. package/dist/capacity-provider/capability-ontology.d.ts +1495 -0
  28. package/dist/capacity-provider/capability-ontology.js +221 -0
  29. package/dist/capacity-provider/client.d.ts +24 -0
  30. package/dist/capacity-provider/client.js +11 -1
  31. package/dist/capacity-provider/contracts/environment-profiles.d.ts +255 -0
  32. package/dist/capacity-provider/contracts/environment-profiles.js +71 -0
  33. package/dist/capacity-provider/contracts/governance.d.ts +103 -35
  34. package/dist/capacity-provider/contracts/index.d.ts +1 -0
  35. package/dist/capacity-provider/contracts/index.js +1 -0
  36. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  37. package/dist/capacity-provider/core-capability-catalog.js +49 -0
  38. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  39. package/dist/capacity-provider/environment-catalog.js +116 -0
  40. package/dist/capacity-provider/index.d.ts +5 -0
  41. package/dist/capacity-provider/index.js +5 -0
  42. package/dist/capacity-provider/install-configuration.d.ts +39 -0
  43. package/dist/capacity-provider/install-configuration.js +18 -0
  44. package/dist/capacity-provider/sandbox-contracts.d.ts +548 -0
  45. package/dist/capacity-provider/sandbox-contracts.js +86 -0
  46. package/dist/capacity-provider/sandbox.d.ts +1 -0
  47. package/dist/capacity-provider/sandbox.js +1 -0
  48. package/dist/capacity-provider/validation.d.ts +2 -2
  49. package/dist/capacity-provider/validation.js +91 -55
  50. package/dist/configuration/secrets-capability.d.ts +5 -1
  51. package/dist/configuration/secrets-capability.js +5 -1
  52. package/dist/content/validation/agent-operational-content-schemas.d.ts +490 -168
  53. package/dist/content/validation/agent-operational-content-schemas.js +18 -3
  54. package/dist/content/validation/auxiliary-content-schemas.d.ts +160 -160
  55. package/dist/content/validation/content-model-schemas.d.ts +2943 -2747
  56. package/dist/content/validation/portable-content-data.d.ts +296 -292
  57. package/dist/deployment/ai/storage.d.ts +158 -0
  58. package/dist/deployment/ai/storage.js +32 -0
  59. package/dist/deployment/ai-hosting.d.ts +297 -0
  60. package/dist/deployment/ai-hosting.js +63 -0
  61. package/dist/deployment/ai-instance.d.ts +65 -0
  62. package/dist/deployment/ai-instance.js +30 -0
  63. package/dist/deployment/ai-mode.d.ts +454 -0
  64. package/dist/deployment/ai-mode.js +67 -0
  65. package/dist/deployment/canonical.d.ts +2 -0
  66. package/dist/deployment/canonical.js +17 -0
  67. package/dist/deployment/catalog.d.ts +16 -0
  68. package/dist/deployment/catalog.js +48 -0
  69. package/dist/deployment/hosted-topology-template.d.ts +449 -0
  70. package/dist/deployment/hosted-topology-template.js +56 -0
  71. package/dist/deployment/hosted-topology.d.ts +2698 -0
  72. package/dist/deployment/hosted-topology.js +468 -0
  73. package/dist/deployment/index.d.ts +13 -0
  74. package/dist/deployment/index.js +13 -0
  75. package/dist/deployment/postgres/contracts.d.ts +418 -0
  76. package/dist/deployment/postgres/contracts.js +83 -0
  77. package/dist/deployment/postgres/requirements.d.ts +14 -0
  78. package/dist/deployment/postgres/requirements.js +30 -0
  79. package/dist/deployment/postgres/transfer.d.ts +97 -0
  80. package/dist/deployment/postgres/transfer.js +29 -0
  81. package/dist/deployment/schemas.d.ts +8625 -0
  82. package/dist/deployment/schemas.js +455 -0
  83. package/dist/deployment/topology.d.ts +9 -0
  84. package/dist/deployment/topology.js +35 -0
  85. package/dist/development/index.d.ts +1 -0
  86. package/dist/development/index.js +1 -0
  87. package/dist/development/schemas.d.ts +3578 -0
  88. package/dist/development/schemas.js +199 -0
  89. package/dist/development/session-migration.d.ts +3 -0
  90. package/dist/development/session-migration.js +25 -0
  91. package/dist/entrypoints/clients/control-plane-client.d.ts +9 -1
  92. package/dist/entrypoints/clients/control-plane-client.js +17 -5
  93. package/dist/graph/context-query-contracts.d.ts +16 -1
  94. package/dist/graph/context-query-contracts.js +5 -0
  95. package/dist/guarantees/evidence-trust.d.ts +32 -0
  96. package/dist/guarantees/evidence-trust.js +47 -0
  97. package/dist/guarantees/index.d.ts +130 -0
  98. package/dist/guarantees/index.js +44 -0
  99. package/dist/identity/browser-session.d.ts +233 -0
  100. package/dist/identity/browser-session.js +51 -0
  101. package/dist/identity/contracts.d.ts +191 -0
  102. package/dist/identity/contracts.js +72 -0
  103. package/dist/identity/index.d.ts +3 -0
  104. package/dist/identity/index.js +3 -0
  105. package/dist/identity/runtime.d.ts +186 -0
  106. package/dist/identity/runtime.js +49 -0
  107. package/dist/model-registry/agent-operational-models.js +1 -1
  108. package/dist/operator-contracts/canonical-command-tree.js +465 -16
  109. package/dist/operator-contracts/catalog/admin-account-team-operations.d.ts +36 -0
  110. package/dist/operator-contracts/catalog/admin-account-team-operations.js +52 -0
  111. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +163 -0
  112. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  113. package/dist/operator-contracts/catalog/communication-operations.d.ts +437 -0
  114. package/dist/operator-contracts/catalog/communication-operations.js +92 -0
  115. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  116. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  117. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +399 -0
  118. package/dist/operator-contracts/catalog/hosted-topology-operations.js +79 -0
  119. package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
  120. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  121. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +53 -0
  122. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +23 -0
  123. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.d.ts +3 -0
  124. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.js +15 -0
  125. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +127 -0
  126. package/dist/operator-contracts/catalog/knowledge-share-operations.js +25 -0
  127. package/dist/operator-contracts/catalog/provider-environment-commands.d.ts +4 -0
  128. package/dist/operator-contracts/catalog/provider-environment-commands.js +69 -0
  129. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +41 -0
  130. package/dist/operator-contracts/catalog/provider-environment-operations.js +61 -0
  131. package/dist/operator-contracts/catalog/services/identity-commands.d.ts +2 -0
  132. package/dist/operator-contracts/catalog/services/identity-commands.js +13 -0
  133. package/dist/operator-contracts/catalog/services/secret-commands.d.ts +2 -0
  134. package/dist/operator-contracts/catalog/services/secret-commands.js +31 -0
  135. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +62 -0
  136. package/dist/operator-contracts/catalog/services/secret-operations.js +51 -0
  137. package/dist/operator-contracts/catalog/treeai-operations.d.ts +13 -0
  138. package/dist/operator-contracts/catalog/treeai-operations.js +61 -0
  139. package/dist/operator-contracts/command-tree.d.ts +28 -0
  140. package/dist/operator-contracts/command-tree.js +49 -0
  141. package/dist/operator-contracts/communication/addressing.d.ts +8 -0
  142. package/dist/operator-contracts/communication/addressing.js +57 -0
  143. package/dist/operator-contracts/communication/contracts.d.ts +1818 -0
  144. package/dist/operator-contracts/communication/contracts.js +188 -0
  145. package/dist/operator-contracts/control-plane-operation.d.ts +9 -0
  146. package/dist/operator-contracts/control-plane-operation.js +12 -2
  147. package/dist/operator-contracts/control-plane-operations.d.ts +2255 -195
  148. package/dist/operator-contracts/control-plane-operations.js +247 -85
  149. package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
  150. package/dist/operator-contracts/inbox/contracts.js +134 -0
  151. package/dist/operator-contracts/index.d.ts +6 -0
  152. package/dist/operator-contracts/index.js +6 -0
  153. package/dist/operator-contracts/knowledge/contracts.d.ts +130 -0
  154. package/dist/operator-contracts/knowledge/contracts.js +39 -0
  155. package/dist/operator-contracts/mcp.d.ts +5 -0
  156. package/dist/operator-contracts/mcp.js +61 -0
  157. package/dist/operator-contracts/oauth.d.ts +45 -0
  158. package/dist/operator-contracts/oauth.js +7 -0
  159. package/dist/operator-contracts/operation-builder.d.ts +18 -0
  160. package/dist/operator-contracts/operation-builder.js +78 -0
  161. package/dist/operator-contracts/seed/seed-bundle.d.ts +138 -0
  162. package/dist/operator-contracts/seed/seed-bundle.js +68 -0
  163. package/dist/platform/contracts.d.ts +429 -0
  164. package/dist/platform/contracts.js +93 -0
  165. package/dist/platform/index.d.ts +6 -0
  166. package/dist/platform/index.js +6 -0
  167. package/dist/platform/inventory.d.ts +11 -0
  168. package/dist/platform/inventory.js +53 -0
  169. package/dist/platform/project-create.d.ts +49 -0
  170. package/dist/platform/project-create.js +75 -0
  171. package/dist/platform/schemas.d.ts +986 -0
  172. package/dist/platform/schemas.js +73 -0
  173. package/dist/platform/verification.d.ts +9 -0
  174. package/dist/platform/verification.js +104 -0
  175. package/dist/platform/workset.d.ts +21 -0
  176. package/dist/platform/workset.js +106 -0
  177. package/dist/secrets-capability/github-actions-encryption.d.ts +2 -0
  178. package/dist/secrets-capability/github-actions-encryption.js +11 -0
  179. package/dist/secrets-capability/provider-operation-contracts.d.ts +15 -1
  180. package/dist/secrets-capability/secret-contracts.d.ts +33 -0
  181. package/dist/secrets-capability/secret-contracts.js +49 -0
  182. package/dist/secrets-capability/service-provider-contracts.d.ts +5 -3
  183. package/dist/secrets-capability/service-provider-contracts.js +66 -50
  184. package/dist/secrets-capability/shared-access.d.ts +51 -0
  185. package/dist/secrets-capability/shared-access.js +36 -0
  186. package/dist/secrets-capability/shared-resources.d.ts +376 -0
  187. package/dist/secrets-capability/shared-resources.js +91 -0
  188. package/dist/secrets-capability/vault-contracts.d.ts +132 -0
  189. package/dist/secrets-capability/vault-contracts.js +56 -0
  190. package/dist/security/encrypted-envelope.d.ts +177 -0
  191. package/dist/security/encrypted-envelope.js +34 -0
  192. package/dist/security/envelope-codec.d.ts +38 -0
  193. package/dist/security/envelope-codec.js +96 -0
  194. package/dist/security/index.d.ts +2 -0
  195. package/dist/security/index.js +2 -0
  196. package/dist/site-contracts/catalog.d.ts +16 -0
  197. package/dist/site-contracts/catalog.js +19 -0
  198. package/dist/site-contracts/cloudflare.d.ts +48 -0
  199. package/dist/site-contracts/platform.d.ts +94 -0
  200. package/dist/site-contracts/plugin.d.ts +63 -0
  201. package/dist/site-contracts/plugin.js +26 -0
  202. package/dist/treeai/catalog.d.ts +1 -0
  203. package/dist/treeai/catalog.js +1 -0
  204. package/dist/treeai/client.d.ts +793 -0
  205. package/dist/treeai/client.js +44 -0
  206. package/dist/treeai/contract.d.ts +41 -0
  207. package/dist/treeai/contract.js +51 -0
  208. package/dist/treeai/generated/upstream.d.ts +770 -0
  209. package/dist/treeai/generated/upstream.js +4 -0
  210. package/dist/treeai/index.d.ts +4 -0
  211. package/dist/treeai/index.js +4 -0
  212. package/dist/treedx/client.d.ts +605 -0
  213. package/dist/treedx/client.js +39 -0
  214. package/dist/treedx/contract.d.ts +32 -0
  215. package/dist/treedx/contract.js +63 -0
  216. package/dist/treedx/index.d.ts +3 -0
  217. package/dist/treedx/index.js +2 -0
  218. package/dist/treedx/types.d.ts +8 -7
  219. package/dist/treedx/types.js +0 -7
  220. package/dist/types/agents/agent-activity-profile.d.ts +18 -36
  221. package/dist/types/agents/agent-trigger-kinds.d.ts +3 -5
  222. package/dist/types/agents/agent-trigger-kinds.js +1 -13
  223. package/package.json +64 -11
  224. package/dist/secrets-capability/service-vault-contracts.d.ts +0 -61
  225. package/dist/secrets-capability/service-vault-contracts.js +0 -39
  226. package/dist/treedx/accounts/auth.d.ts +0 -17
  227. package/dist/treedx/accounts/auth.js +0 -48
  228. package/dist/treedx/client/accounts/contracts/auth-mode.d.ts +0 -3
  229. package/dist/treedx/client/accounts/contracts/auth-mode.js +0 -6
  230. package/dist/treedx/client/build/creation/build-context.d.ts +0 -3
  231. package/dist/treedx/client/build/creation/build-context.js +0 -7
  232. package/dist/treedx/client/build/creation/build-snapshot.d.ts +0 -3
  233. package/dist/treedx/client/build/creation/build-snapshot.js +0 -8
  234. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.d.ts +0 -3
  235. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.js +0 -7
  236. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.d.ts +0 -6
  237. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.js +0 -10
  238. package/dist/treedx/client/methods.d.ts +0 -102
  239. package/dist/treedx/client/methods.js +0 -209
  240. package/dist/treedx/client/persistence/contracts/restore-storage.d.ts +0 -3
  241. package/dist/treedx/client/persistence/contracts/restore-storage.js +0 -6
  242. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.d.ts +0 -3
  243. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.js +0 -6
  244. package/dist/treedx/client/repositories/creation/register-repository.d.ts +0 -3
  245. package/dist/treedx/client/repositories/creation/register-repository.js +0 -7
  246. package/dist/treedx/client/repositories/queries/get-repository.d.ts +0 -3
  247. package/dist/treedx/client/repositories/queries/get-repository.js +0 -7
  248. package/dist/treedx/client/repositories/queries/list-repository-paths.d.ts +0 -3
  249. package/dist/treedx/client/repositories/queries/list-repository-paths.js +0 -7
  250. package/dist/treedx/client/repositories/queries/list-repository-refs.d.ts +0 -3
  251. package/dist/treedx/client/repositories/queries/list-repository-refs.js +0 -12
  252. package/dist/treedx/client/repositories/queries/query-repository.d.ts +0 -3
  253. package/dist/treedx/client/repositories/queries/query-repository.js +0 -7
  254. package/dist/treedx/client/repositories/queries/read-repository-file.d.ts +0 -3
  255. package/dist/treedx/client/repositories/queries/read-repository-file.js +0 -6
  256. package/dist/treedx/client/repositories/queries/read-repository-files.d.ts +0 -3
  257. package/dist/treedx/client/repositories/queries/read-repository-files.js +0 -7
  258. package/dist/treedx/client/repositories/queries/search-repository-files.d.ts +0 -3
  259. package/dist/treedx/client/repositories/queries/search-repository-files.js +0 -7
  260. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.d.ts +0 -3
  261. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.js +0 -9
  262. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.d.ts +0 -3
  263. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.js +0 -6
  264. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.d.ts +0 -3
  265. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.js +0 -7
  266. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.d.ts +0 -5
  267. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.js +0 -7
  268. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.d.ts +0 -3
  269. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.js +0 -6
  270. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.d.ts +0 -3
  271. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.js +0 -7
  272. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.d.ts +0 -2
  273. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.js +0 -19
  274. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.d.ts +0 -3
  275. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.js +0 -7
  276. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.d.ts +0 -3
  277. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.js +0 -6
  278. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.d.ts +0 -3
  279. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.js +0 -7
  280. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.d.ts +0 -3
  281. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.js +0 -6
  282. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.d.ts +0 -3
  283. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.js +0 -7
  284. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.d.ts +0 -6
  285. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.js +0 -23
  286. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.d.ts +0 -3
  287. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.js +0 -8
  288. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.d.ts +0 -3
  289. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.js +0 -7
  290. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.d.ts +0 -3
  291. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.js +0 -8
  292. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.d.ts +0 -3
  293. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.js +0 -8
  294. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.d.ts +0 -2
  295. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.js +0 -15
  296. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.d.ts +0 -2
  297. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.js +0 -38
  298. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.d.ts +0 -2
  299. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.js +0 -15
  300. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.d.ts +0 -2
  301. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.js +0 -15
  302. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.d.ts +0 -2
  303. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.js +0 -14
  304. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.d.ts +0 -2
  305. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.js +0 -14
  306. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.d.ts +0 -6
  307. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.js +0 -41
  308. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.d.ts +0 -2
  309. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.js +0 -14
  310. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.d.ts +0 -3
  311. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.js +0 -7
  312. package/dist/treedx/client/support/creation/apply-changeset.d.ts +0 -3
  313. package/dist/treedx/client/support/creation/apply-changeset.js +0 -10
  314. package/dist/treedx/client/support/creation/apply-storage-migration.d.ts +0 -3
  315. package/dist/treedx/client/support/creation/apply-storage-migration.js +0 -7
  316. package/dist/treedx/client/support/creation/create-migration.d.ts +0 -6
  317. package/dist/treedx/client/support/creation/create-migration.js +0 -7
  318. package/dist/treedx/client/support/creation/export-artifact.d.ts +0 -3
  319. package/dist/treedx/client/support/creation/export-artifact.js +0 -8
  320. package/dist/treedx/client/support/creation/plan-storage-migration.d.ts +0 -3
  321. package/dist/treedx/client/support/creation/plan-storage-migration.js +0 -7
  322. package/dist/treedx/client/support/creation/request-binary.d.ts +0 -6
  323. package/dist/treedx/client/support/creation/request-binary.js +0 -42
  324. package/dist/treedx/client/support/creation/write-file.d.ts +0 -3
  325. package/dist/treedx/client/support/creation/write-file.js +0 -10
  326. package/dist/treedx/client/support/creation/write-files.d.ts +0 -3
  327. package/dist/treedx/client/support/creation/write-files.js +0 -12
  328. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.d.ts +0 -3
  329. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.js +0 -7
  330. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.d.ts +0 -3
  331. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.js +0 -7
  332. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.d.ts +0 -3
  333. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.js +0 -9
  334. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.d.ts +0 -4
  335. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.js +0 -6
  336. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.d.ts +0 -3
  337. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.js +0 -7
  338. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.d.ts +0 -3
  339. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.js +0 -7
  340. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.d.ts +0 -3
  341. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.js +0 -7
  342. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.d.ts +0 -3
  343. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.js +0 -7
  344. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.d.ts +0 -3
  345. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.js +0 -10
  346. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.d.ts +0 -3
  347. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.js +0 -9
  348. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.d.ts +0 -3
  349. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.js +0 -7
  350. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.d.ts +0 -6
  351. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.js +0 -7
  352. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.d.ts +0 -6
  353. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.js +0 -7
  354. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.d.ts +0 -6
  355. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.js +0 -6
  356. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.d.ts +0 -15
  357. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.js +0 -6
  358. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.d.ts +0 -3
  359. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.js +0 -7
  360. package/dist/treedx/client/support/retirement/cleanup-artifacts.d.ts +0 -3
  361. package/dist/treedx/client/support/retirement/cleanup-artifacts.js +0 -7
  362. package/dist/treedx/client/support/retirement/delete-artifact.d.ts +0 -3
  363. package/dist/treedx/client/support/retirement/delete-artifact.js +0 -7
  364. package/dist/treedx/client/support/retirement/delete-file.d.ts +0 -3
  365. package/dist/treedx/client/support/retirement/delete-file.js +0 -10
  366. package/dist/treedx/client/support/retirement/rollback-storage-migration.d.ts +0 -3
  367. package/dist/treedx/client/support/retirement/rollback-storage-migration.js +0 -7
  368. package/dist/treedx/client/support/updates/patch-file.d.ts +0 -3
  369. package/dist/treedx/client/support/updates/patch-file.js +0 -10
  370. package/dist/treedx/client/support/updates/refresh-search-index.d.ts +0 -3
  371. package/dist/treedx/client/support/updates/refresh-search-index.js +0 -8
  372. package/dist/treedx/client/treedx/blobs/contracts/download-blob.d.ts +0 -3
  373. package/dist/treedx/client/treedx/blobs/contracts/download-blob.js +0 -6
  374. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.d.ts +0 -3
  375. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.js +0 -8
  376. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.d.ts +0 -3
  377. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.js +0 -27
  378. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.d.ts +0 -3
  379. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.js +0 -41
  380. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.d.ts +0 -3
  381. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.js +0 -27
  382. package/dist/treedx/client/treedx/blobs/creation/upload-blob.d.ts +0 -3
  383. package/dist/treedx/client/treedx/blobs/creation/upload-blob.js +0 -6
  384. package/dist/treedx/client/treedx/blobs/creation/write-blob.d.ts +0 -3
  385. package/dist/treedx/client/treedx/blobs/creation/write-blob.js +0 -8
  386. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.d.ts +0 -3
  387. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.js +0 -8
  388. package/dist/treedx/client/treedx/blobs/queries/read-blob.d.ts +0 -3
  389. package/dist/treedx/client/treedx/blobs/queries/read-blob.js +0 -10
  390. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.d.ts +0 -3
  391. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.js +0 -7
  392. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.d.ts +0 -3
  393. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.js +0 -8
  394. package/dist/treedx/client/treedx/federation/contracts/federated-query.d.ts +0 -3
  395. package/dist/treedx/client/treedx/federation/contracts/federated-query.js +0 -7
  396. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.d.ts +0 -3
  397. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.js +0 -6
  398. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.d.ts +0 -3
  399. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.js +0 -7
  400. package/dist/treedx/client/treedx/federation/updates/promote-mirror.d.ts +0 -3
  401. package/dist/treedx/client/treedx/federation/updates/promote-mirror.js +0 -7
  402. package/dist/treedx/client/treedx/federation/updates/sync-mirror.d.ts +0 -3
  403. package/dist/treedx/client/treedx/federation/updates/sync-mirror.js +0 -7
  404. package/dist/treedx/client/treedx/graph/contracts/federated-context.d.ts +0 -3
  405. package/dist/treedx/client/treedx/graph/contracts/federated-context.js +0 -7
  406. package/dist/treedx/client/treedx/graph/contracts/federated-graph.d.ts +0 -3
  407. package/dist/treedx/client/treedx/graph/contracts/federated-graph.js +0 -7
  408. package/dist/treedx/client/treedx/graph/contracts/graph-search.d.ts +0 -3
  409. package/dist/treedx/client/treedx/graph/contracts/graph-search.js +0 -8
  410. package/dist/treedx/client/treedx/graph/queries/get-graph-node.d.ts +0 -3
  411. package/dist/treedx/client/treedx/graph/queries/get-graph-node.js +0 -10
  412. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.d.ts +0 -3
  413. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.js +0 -7
  414. package/dist/treedx/client/treedx/graph/queries/get-subgraph.d.ts +0 -3
  415. package/dist/treedx/client/treedx/graph/queries/get-subgraph.js +0 -7
  416. package/dist/treedx/client/treedx/graph/queries/query-graph.d.ts +0 -3
  417. package/dist/treedx/client/treedx/graph/queries/query-graph.js +0 -7
  418. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.d.ts +0 -3
  419. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.js +0 -6
  420. package/dist/treedx/client/treedx/graph/queries/search-graph-files.d.ts +0 -3
  421. package/dist/treedx/client/treedx/graph/queries/search-graph-files.js +0 -6
  422. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.d.ts +0 -3
  423. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.js +0 -6
  424. package/dist/treedx/client/treedx/graph/updates/refresh-graph.d.ts +0 -3
  425. package/dist/treedx/client/treedx/graph/updates/refresh-graph.js +0 -7
  426. package/dist/treedx/client/treedx/search/contracts/federated-search.d.ts +0 -3
  427. package/dist/treedx/client/treedx/search/contracts/federated-search.js +0 -7
  428. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.d.ts +0 -3
  429. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.js +0 -7
  430. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.d.ts +0 -3
  431. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.js +0 -12
  432. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.d.ts +0 -2
  433. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.js +0 -6
  434. package/dist/treedx/generated/openapi-types.d.ts +0 -3662
  435. package/dist/treedx/support/client.d.ts +0 -251
  436. package/dist/treedx/support/client.js +0 -252
  437. package/dist/treedx/support/errors.d.ts +0 -13
  438. package/dist/treedx/support/errors.js +0 -17
  439. package/dist/treedx/types/tree-dx-actor.d.ts +0 -209
  440. package/dist/treedx/types/tree-dx-actor.js +0 -8
  441. package/dist/treedx/types/tree-dx-artifact-list-response.d.ts +0 -13
  442. package/dist/treedx/types/tree-dx-changeset.d.ts +0 -51
  443. package/dist/treedx/types/tree-dx-changeset.js +0 -6
  444. package/dist/treedx/types/tree-dx-context-request.d.ts +0 -245
  445. package/dist/treedx/types/tree-dx-context-request.js +0 -0
  446. package/dist/treedx/types/tree-dx-exec-result.d.ts +0 -249
  447. package/dist/treedx/types/tree-dx-exec-result.js +0 -0
  448. package/dist/treedx/types/tree-dx-list-tree-request.d.ts +0 -222
  449. package/dist/treedx/types/tree-dx-list-tree-request.js +0 -0
  450. package/dist/treedx/types/tree-dx-push-request.d.ts +0 -229
  451. package/dist/treedx/types/tree-dx-push-request.js +0 -0
  452. /package/dist/{treedx/generated/openapi-types.js → site-contracts/cloudflare.js} +0 -0
  453. /package/dist/{treedx/types/tree-dx-artifact-list-response.js → site-contracts/platform.js} +0 -0
@@ -1,3 +1,193 @@
1
+ import { commandPaths } from "./catalog/infrastructure/command-tree-paths.js";
2
+ import { managedSecretCommands } from "./catalog/services/secret-commands.js";
3
+ import { identityLoginCommand } from "./catalog/services/identity-commands.js";
4
+ import { hostProviderEnvironmentBranch, PROVIDER_ENVIRONMENT_COMMAND_BINDINGS, providerEnvironmentBranches } from "./catalog/provider-environment-commands.js";
5
+ const unavailable = (reason = "This capability is not enabled until its control-plane operation is accepted.") => ({
6
+ kind: "unavailable",
7
+ code: "standards_migration_not_enabled",
8
+ reason
9
+ });
10
+ const protocol = (handlerId) => ({ kind: "protocol", handlerId });
11
+ const local = (handlerId) => ({ kind: "local", handlerId });
12
+ const field = (target, name, source, sourceName = name, required = false, transform = "identity") => ({ target, field: name, source, name: sourceName, required, transform });
13
+ const operation = (operationId, input = []) => ({ kind: "operation", operationId, input });
14
+ const page = () => [field("query", "status", "option"), field("query", "limit", "option", "limit", false, "integer"), field("query", "cursor", "option")];
15
+ const aiNode = () => field("path", "nodeId", "context", "node", true);
16
+ const aiInstance = () => [field("path", "teamId", "context", "team", true), field("path", "instanceId", "context", "node", true)];
17
+ const operationBindings = {
18
+ ...PROVIDER_ENVIRONMENT_COMMAND_BINDINGS,
19
+ "auth login": protocol("protocol.identity.login"),
20
+ "auth logout": protocol("protocol.oauth.revoke"),
21
+ "auth status": operation("accounts.current.show"),
22
+ "users create": protocol("protocol.accounts.create"),
23
+ "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")]),
24
+ "topics list": operation("communications.topics.list", [field("path", "teamId", "context", "team", true), ...page()]),
25
+ "topics show": operation("communications.topics.show", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true)]),
26
+ "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)]),
27
+ "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)]),
28
+ "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")]),
29
+ "capabilities show": operation("capabilities.show", [field("path", "capabilityId", "argument", "capability", true), field("query", "version", "option")]),
30
+ "teams list": operation("teams.list", page()),
31
+ "teams current": local("local.teams.current"),
32
+ "teams use": local("local.teams.use"),
33
+ "secrets list": local("local.secrets.list"),
34
+ "secrets status": local("local.secrets.status"),
35
+ "secrets unlock": local("local.secrets.unlock"),
36
+ "secrets lock": local("local.secrets.lock"),
37
+ "platform verify": local("local.platform.verify"),
38
+ "platform workset": local("local.platform.workset"),
39
+ "platform project create": local("local.platform.project.create"),
40
+ "platform topology plan": local("local.platform.topology.plan"),
41
+ "platform topology apply": local("local.platform.topology.apply"),
42
+ "platform topology status": local("local.platform.topology.status"),
43
+ "platform topology rollback": local("local.platform.topology.rollback"),
44
+ "host status": local("local.host.status"),
45
+ "host doctor": local("local.host.doctor"),
46
+ "host plan": local("local.host.plan"),
47
+ "host apply": local("local.host.apply"),
48
+ "host reconcile": local("local.host.reconcile"),
49
+ "host events": local("local.host.events"),
50
+ "host update status": local("local.host.update.status"),
51
+ "host update check": local("local.host.update.check"),
52
+ "host update apply": local("local.host.update.apply"),
53
+ "host update channel": local("local.host.update.channel"),
54
+ "host update pause": local("local.host.update.pause"),
55
+ "host update resume": local("local.host.update.resume"),
56
+ "host component list": local("local.host.component.list"),
57
+ "host component status": local("local.host.component.status"),
58
+ "host component enable": local("local.host.component.enable"),
59
+ "host component disable": local("local.host.component.disable"),
60
+ "host aliases list": local("local.host.aliases.list"),
61
+ "host config show": local("local.host.config.show"),
62
+ "host config plan": local("local.host.config.plan"),
63
+ "host config apply": local("local.host.config.apply"),
64
+ "host config adopt": local("local.host.config.adopt"),
65
+ "host postgres transfer prepare": local("local.host.postgres.transfer.prepare"),
66
+ "host postgres transfer status": local("local.host.postgres.transfer.status"),
67
+ "host topology": local("local.host.topology"),
68
+ "host connections": local("local.host.connections"),
69
+ "host provider status": local("local.host.provider.status"),
70
+ "host provider credentials list": local("local.host.provider.credentials.list"),
71
+ "host provider credentials status": local("local.host.provider.credentials.status"),
72
+ "host provider credentials initialize": local("local.host.provider.credentials.initialize"),
73
+ "host storage status": local("local.host.storage.status"),
74
+ "host storage connect": local("local.host.storage.connect"),
75
+ "host storage reconcile": local("local.host.storage.reconcile"),
76
+ "host storage rotate": local("local.host.storage.rotate"),
77
+ "host storage reset": local("local.host.storage.reset"),
78
+ "host security plan": local("local.host.security.plan"),
79
+ "host security initialize": local("local.host.security.initialize"),
80
+ "host security status": local("local.host.security.status"),
81
+ "host security verify": local("local.host.security.verify"),
82
+ "host security rotate": local("local.host.security.rotate"),
83
+ "host security recovery verify": local("local.host.security.recovery.verify"),
84
+ "host sandbox status": local("local.host.sandbox.status"),
85
+ "host sandbox doctor": local("local.host.sandbox.doctor"),
86
+ "host fleet status": local("local.host.fleet.status"),
87
+ "host recovery status": local("local.host.recovery.status"),
88
+ "host recovery retry": local("local.host.recovery.retry"),
89
+ "host recovery restore": local("local.host.recovery.restore"),
90
+ "host bootstrap status": local("local.host.bootstrap.status"),
91
+ "host bootstrap enroll": local("local.host.bootstrap.enroll"),
92
+ "host reset": local("local.host.reset"),
93
+ "host uninstall": local("local.host.uninstall"),
94
+ "host initialize": local("local.host.initialize"),
95
+ "dev session start": local("local.dev.session.start"),
96
+ "dev session stop": local("local.dev.session.stop"),
97
+ "dev session recover": local("local.dev.session.recover"),
98
+ "dev use": local("local.dev.use"),
99
+ "dev rebuild": local("local.dev.rebuild"),
100
+ "dev status": local("local.dev.status"),
101
+ "dev logs": local("local.dev.logs"),
102
+ "dev plan": local("local.dev.plan"),
103
+ "dev freeze": local("local.dev.freeze"),
104
+ "dev verify": local("local.dev.verify"),
105
+ "agents list": operation("agents.list", [field("path", "projectId", "context", "project", true), ...page()]),
106
+ "agents show": operation("agents.show", [field("path", "projectId", "context", "project", true), field("path", "agentSlug", "argument", "agent", true)]),
107
+ "agents classes list": operation("agents.classes.list", [field("path", "projectId", "context", "project", true)]),
108
+ "agents classes show": operation("agents.classes.show", [field("path", "projectId", "context", "project", true), field("path", "classId", "argument", "class", true)]),
109
+ "providers list": operation("providers.list", [field("path", "teamId", "context", "team", true), ...page()]),
110
+ "providers show": operation("providers.show", [field("path", "teamId", "context", "team", true), field("path", "providerId", "argument", "provider", true)]),
111
+ "providers status": operation("providers.status", [field("path", "teamId", "context", "team", true), field("path", "providerId", "argument", "provider", true)]),
112
+ "providers diagnose": operation("providers.diagnose", [field("path", "teamId", "context", "team", true), field("path", "providerId", "argument", "provider", true)]),
113
+ "providers connect": operation("providers.connect", [field("path", "teamId", "context", "team", true)]),
114
+ "providers disconnect": operation("providers.disconnect", [field("path", "teamId", "context", "team", true), field("path", "connectionId", "argument", "connection", true), field("body", "reason", "option")]),
115
+ "providers requests list": operation("providers.requests.list", [field("path", "teamId", "context", "team", true), ...page()]),
116
+ "providers requests show": operation("providers.requests.show", [field("path", "teamId", "context", "team", true), field("path", "requestId", "argument", "request", true)]),
117
+ "providers requests approve": operation("providers.requests.approve", [field("path", "teamId", "context", "team", true), field("path", "requestId", "argument", "request", true)]),
118
+ "providers requests reject": operation("providers.requests.reject", [field("path", "teamId", "context", "team", true), field("path", "requestId", "argument", "request", true)]),
119
+ "providers credentials status": operation("providers.credentials.status", [field("path", "teamId", "context", "team", true), field("path", "connectionId", "argument", "connection", true)]),
120
+ "providers credentials rotate": operation("providers.credentials.rotate", [field("path", "teamId", "context", "team", true), field("path", "connectionId", "argument", "connection", true)]),
121
+ "providers credentials revoke": operation("providers.credentials.revoke", [field("path", "teamId", "context", "team", true), field("path", "connectionId", "argument", "connection", true)]),
122
+ "capacity status": operation("capacity.status", [field("path", "teamId", "context", "team", true), ...page()]),
123
+ "capacity explain": operation("capacity.explain", [field("path", "teamId", "context", "team", true)]),
124
+ "capacity usage": operation("capacity.usage", [field("path", "teamId", "context", "team", true)]),
125
+ "capacity ledger": operation("capacity.ledger", [field("path", "teamId", "context", "team", true), ...page()]),
126
+ "capacity audit": operation("capacity.audit", [field("path", "teamId", "context", "team", true), ...page()]),
127
+ "seeds validate": operation("seeds.validate", [field("body", "file", "argument", "file", true)]),
128
+ "seeds plan": operation("seeds.plan", [field("path", "name", "context", "seed", true), field("body", "file", "argument", "file", true)]),
129
+ "seeds apply": operation("seeds.apply", [field("path", "name", "context", "seed", true), field("body", "file", "argument", "file", true)]),
130
+ "seeds show": operation("seeds.show", [field("path", "name", "argument", "seed", true)]),
131
+ "seeds verify": operation("seeds.verify", [field("path", "name", "argument", "seed", true)]),
132
+ "plans list": operation("plans.list", [field("path", "decisionId", "option", "decision", true), ...page()]),
133
+ "plans show": operation("plans.show", [field("path", "capacityPlanId", "argument", "plan", true)]),
134
+ "workdays plan": operation("workdays.plan", [field("path", "teamId", "context", "team", true), field("body", "profileId", "option", "profile"), field("body", "projects", "option", "projects", false, "csv"), field("body", "startsAt", "option", "start"), field("body", "endsAt", "option", "end"), field("body", "durationSeconds", "option", "duration", false, "integer"), field("body", "objectiveFilters", "option", "objective", false, "csv")]),
135
+ "workdays start": operation("workdays.start", [field("path", "teamId", "context", "team", true), field("body", "preflightId", "option", "preflight", true), field("body", "preflightDigest", "option", "digest", true)]),
136
+ "workdays list": operation("workdays.list", [field("path", "teamId", "context", "team", true), ...page()]),
137
+ "workdays show": operation("workdays.show", [field("path", "teamId", "context", "team", true), field("path", "runId", "argument", "workday", true)]),
138
+ "workdays schedules list": operation("workdays.schedules.list", [field("path", "teamId", "context", "team", true)]),
139
+ "workdays schedules start": operation("workdays.schedules.create", [field("path", "teamId", "context", "team", true), field("body", "profile", "option"), field("body", "projects", "option", "projects", false, "csv"), field("body", "duration", "option", "duration", false, "integer")]),
140
+ "assignments list": operation("assignments.list", [field("path", "teamId", "context", "team", true), ...page()]),
141
+ "assignments show": operation("assignments.show", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true)]),
142
+ "assignments explain": operation("assignments.explain", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true)]),
143
+ "assignments retry": operation("assignments.retry", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true), field("body", "reason", "option")]),
144
+ "assignments cancel": operation("assignments.cancel", [field("path", "teamId", "context", "team", true), field("path", "assignmentId", "argument", "assignment", true), field("body", "reason", "option")]),
145
+ "projects treedx show": operation("treedx.library.show", [field("path", "projectId", "argument", "project", true)]),
146
+ "projects treedx bind": operation("treedx.library.bind", [field("path", "projectId", "argument", "project", true), field("body", "connectionId", "option", "connection", true)]),
147
+ "projects treedx status": operation("treedx.health.show", [field("path", "projectId", "argument", "project", true)]),
148
+ "projects treedx diagnose": operation("treedx.service.contract", [field("path", "projectId", "argument", "project", true)]),
149
+ "projects treedx capabilities": operation("treedx.capabilities.list", [field("path", "projectId", "argument", "project", true)]),
150
+ "projects treedx workspaces list": operation("treedx.workspaces.list", [field("path", "projectId", "argument", "project", true), ...page()]),
151
+ "projects treedx workspaces show": operation("treedx.workspaces.show", [field("path", "projectId", "context", "project", true), field("path", "workspaceId", "argument", "workspace", true)]),
152
+ "projects treedx workspaces abandon": operation("treedx.workspaces.abandon", [field("path", "projectId", "context", "project", true), field("path", "workspaceId", "argument", "workspace", true)]),
153
+ "ai status": operation("ai.instances.show", aiInstance()),
154
+ "ai storage show": operation("ai.instances.storage.show", aiInstance()),
155
+ "ai storage connect": operation("ai.instances.storage.put", [...aiInstance(), field("body", "connectionId", "option", "connection", true), field("body", "bucket", "option", "bucket", true)]),
156
+ "ai storage disconnect": operation("ai.instances.storage.remove", aiInstance()),
157
+ "ai storage verify": local("local.host.ai.storage.verify"),
158
+ "ai mode show": local("local.host.ai.mode.show"),
159
+ "ai mode set": local("local.host.ai.mode.set"),
160
+ "ai inference models": operation("treeai.inference.get.models", [aiNode()]),
161
+ "ai inference jobs": operation("treeai.inference.get.jobs", [aiNode()]),
162
+ "ai inference rollback": operation("treeai.inference.post.deployments.rollback", [aiNode()]),
163
+ "ai training libraries": operation("treeai.training.get.libraries", [aiNode()]),
164
+ "ai training jobs": operation("treeai.training.get.jobs", [aiNode()]),
165
+ "ai training runs": operation("treeai.training.get.library.runs", [aiNode()]),
166
+ "ai lab status": operation("treeai.lab.get.status", [aiNode()]),
167
+ "ai lab agents": operation("treeai.lab.get.agents", [aiNode()]),
168
+ "ai lab libraries": operation("treeai.lab.get.libraries", [aiNode()]),
169
+ "library show": local("local.library.show"),
170
+ "library status": local("local.library.status"),
171
+ "library paths": local("local.library.paths"),
172
+ "library read": local("local.library.read"),
173
+ "library search": local("local.library.search"),
174
+ "library query": local("local.library.query"),
175
+ "library context": local("local.library.context"),
176
+ "library workspace create": operation("knowledge.workspaces.create", [field("path", "projectId", "argument", "project", true), field("body", "requestId", "option", "request")]),
177
+ "library workspace show": operation("knowledge.workspaces.show", [field("path", "workspaceId", "argument", "workspace", true)]),
178
+ "library workspace read": operation("knowledge.workspaces.content.show", [field("path", "workspaceId", "argument", "workspace", true), field("query", "path", "argument", "path", true)]),
179
+ "library workspace diff": operation("knowledge.workspaces.diff", [field("path", "workspaceId", "argument", "workspace", true)]),
180
+ "library workspace write": operation("knowledge.workspaces.content.update", [field("path", "workspaceId", "argument", "workspace", true), field("body", "file", "option", "input", true)]),
181
+ "library workspace submit": operation("knowledge.workspaces.submit", [field("path", "workspaceId", "argument", "workspace", true), field("body", "version", "option", "version", true, "integer"), field("body", "message", "option"), field("body", "notes", "option"), field("body", "contextDigest", "option", "contextDigest")]),
182
+ "library workspace abandon": operation("knowledge.workspaces.abandon", [field("path", "workspaceId", "argument", "workspace", true), field("body", "version", "option", "version", true, "integer")]),
183
+ "library reviews list": operation("knowledge.reviews.list", [field("path", "teamId", "context", "team", true), ...page()]),
184
+ "library reviews decide": operation("knowledge.reviews.decide", [field("path", "reviewId", "argument", "review", true), field("body", "file", "option", "input", true)]),
185
+ "library reviews publish": operation("knowledge.reviews.publish", [field("path", "reviewId", "argument", "review", true), field("body", "file", "option", "input")]),
186
+ "status": operation("status.show"),
187
+ "save": unavailable("Unified GitHub-backed save is intentionally fail-closed during this cutover."),
188
+ "stage": unavailable("Unified GitHub-backed stage is intentionally fail-closed during this cutover."),
189
+ "release": unavailable("Production release is intentionally fail-closed during this cutover.")
190
+ };
1
191
  const planOption = { name: "--plan", description: "Return the exact proposed outcome without mutation.", type: "boolean" };
2
192
  function leaf(segment, kind = "read", argument, confirmation = "never") {
3
193
  const value = {
@@ -7,19 +197,238 @@ function leaf(segment, kind = "read", argument, confirmation = "never") {
7
197
  arguments: argument ? [{ name: argument, description: `${argument} identity or path.`, required: true }] : void 0,
8
198
  options: kind === "mutation" ? [planOption] : void 0,
9
199
  authorization: kind === "mutation" ? { capability: `command.${segment}`, confirmation } : void 0,
10
- resultSchemaId: `treeseed.command.${segment}/v1`
200
+ resultSchemaId: `treeseed.command.${segment}/v1`,
201
+ execution: unavailable()
11
202
  };
12
203
  return { nodeType: "leaf", ...value };
13
204
  }
14
205
  function branch(segment, children) {
15
206
  return { nodeType: "branch", segment, description: `${segment[0].toUpperCase()}${segment.slice(1)} operations.`, children };
16
207
  }
17
- const TREESEED_COMMAND_TREE_V1 = {
208
+ function configurationAdopt() {
209
+ const value = leaf("adopt", "mutation", "file", "destructive");
210
+ if (value.nodeType !== "leaf") throw new Error("Configuration adoption must be a leaf command.");
211
+ value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm replacement of the installed configuration identity.", type: "boolean" }];
212
+ return value;
213
+ }
214
+ function hostReset() {
215
+ const value = leaf("reset", "mutation", void 0, "irreversible");
216
+ if (value.nodeType !== "leaf") throw new Error("Host reset must be a leaf command.");
217
+ value.description = "Stop managed components, erase their state, and reconcile a fresh unseeded platform.";
218
+ value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm deletion of all manager-owned component data and receipts.", type: "boolean" }];
219
+ return value;
220
+ }
221
+ function hostUninstall() {
222
+ const value = leaf("uninstall", "mutation", void 0, "irreversible");
223
+ if (value.nodeType !== "leaf") throw new Error("Host uninstall must be a leaf command.");
224
+ value.description = "Plan or remove every inventoried TreeSeed-owned host resource while preserving unrelated infrastructure and source repositories.";
225
+ value.options = [
226
+ ...value.options ?? [],
227
+ { name: "--confirm", description: "Confirm removal of the reviewed TreeSeed resource inventory.", type: "boolean" },
228
+ { name: "--purge-security", description: "Separately select destruction of encrypted state, credentials, users, and groups.", type: "boolean" },
229
+ { name: "--yes", description: "Confirm non-interactive execution after reviewing the plan.", type: "boolean" }
230
+ ];
231
+ value.resultSchemaId = "treeseed.host-uninstall-result/v1";
232
+ return value;
233
+ }
234
+ function hostInitialize() {
235
+ const value = leaf("initialize", "mutation", void 0, "authority");
236
+ if (value.nodeType !== "leaf") throw new Error("Host initialize must be a leaf command.");
237
+ value.description = "Initialize the generic host foundation from an immutable catalog-bound profile.";
238
+ value.options = [
239
+ ...value.options ?? [],
240
+ { name: "--input-file", description: "Team capacity installation configuration downloaded from Admin. Values are never printed.", type: "string" },
241
+ { name: "--profile", description: "Catalog-bound host initialization profile.", type: "string", required: true },
242
+ { name: "--confirm", description: "Confirm installation of the reviewed profile plan.", type: "boolean" },
243
+ { name: "--yes", description: "Confirm non-interactive execution after reviewing the plan.", type: "boolean" }
244
+ ];
245
+ value.resultSchemaId = "treeseed.host-initialization-result/v1";
246
+ return value;
247
+ }
248
+ function hostSecurityInitialize() {
249
+ const value = leaf("initialize", "mutation", void 0, "credential");
250
+ if (value.nodeType !== "leaf") throw new Error("Host security initialization must be a leaf command.");
251
+ value.description = "Initialize the encrypted provider volume, application keys, and offline recovery bundle.";
252
+ 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 }];
253
+ return value;
254
+ }
255
+ function hostSecurityRotate() {
256
+ const value = leaf("rotate", "mutation", "target", "credential");
257
+ if (value.nodeType !== "leaf") throw new Error("Host security rotation must be a leaf command.");
258
+ value.options = [
259
+ ...value.options ?? [],
260
+ { name: "--recovery-bundle", description: "Absolute path to the currently authenticated recovery bundle.", type: "string", required: true },
261
+ { name: "--new-recovery-bundle", description: "Absolute non-existing path for the replacement recovery bundle.", type: "string", required: true },
262
+ { name: "--confirm", description: "Confirm creation and activation of a new key generation.", type: "boolean", required: true }
263
+ ];
264
+ return value;
265
+ }
266
+ function hostProviderCredentialInitialize() {
267
+ const value = leaf("initialize", "mutation", "initializer", "credential");
268
+ if (value.nodeType !== "leaf") throw new Error("Provider credential initialization must be a leaf command.");
269
+ value.description = "Initialize an execution-provider credential through its registered host initializer.";
270
+ value.options = [...value.options ?? [], { name: "--source", description: "Registered credential source to use instead of automatic selection.", type: "string" }];
271
+ return value;
272
+ }
273
+ function hostRecoveryVerify() {
274
+ return {
275
+ nodeType: "leaf",
276
+ segment: "verify",
277
+ description: "Authenticate and inventory an offline recovery bundle without revealing secrets.",
278
+ kind: "read",
279
+ options: [{ name: "--bundle", description: "Absolute recovery bundle path.", type: "string", required: true }],
280
+ resultSchemaId: "treeseed.host-recovery-verification/v1",
281
+ execution: unavailable()
282
+ };
283
+ }
284
+ function aiModeSet() {
285
+ const value = leaf("set", "mutation", "mode", "authority");
286
+ if (value.nodeType !== "leaf") throw new Error("AI mode set must be a leaf command.");
287
+ value.description = "Transition the exclusive AI GPU resource to awake or sleep.";
288
+ value.options = [
289
+ ...value.options ?? [],
290
+ { name: "--idempotency-key", description: "Replay-safe transition identity.", type: "string" },
291
+ { name: "--drain-timeout", description: "Maximum drain wait in seconds.", type: "number" }
292
+ ];
293
+ value.authorization = { capability: "host.ai.mode", confirmation: "authority" };
294
+ value.resultSchemaId = "treeseed.ai-mode-transition-receipt/v1";
295
+ return value;
296
+ }
297
+ function userCreate() {
298
+ const value = leaf("create", "mutation");
299
+ if (value.nodeType !== "leaf") throw new Error("User creation must be a leaf command.");
300
+ value.description = "Create a local TreeSeed user with a securely prompted password.";
301
+ value.options = [
302
+ ...value.options ?? [],
303
+ { name: "--email", description: "Email address for the new user.", type: "string" },
304
+ { name: "--username", description: "Unique username for the new user.", type: "string" },
305
+ { name: "--display-name", description: "Human-readable display name.", type: "string" },
306
+ { name: "--timeout", description: "Maximum seconds to wait for registration.", type: "number" }
307
+ ];
308
+ return value;
309
+ }
310
+ function authLogin() {
311
+ return identityLoginCommand(leaf("login", "mutation"));
312
+ }
313
+ function libraryRead(segment, extraArguments = [], extraOptions = []) {
314
+ return {
315
+ nodeType: "leaf",
316
+ segment,
317
+ description: `${segment[0].toUpperCase()}${segment.slice(1)} project library knowledge.`,
318
+ kind: "read",
319
+ arguments: ["project", ...extraArguments].map((name) => ({ name, description: `${name} value.`, required: true })),
320
+ options: [{ name: "--ref", description: "Earlier historical revision; omit for the current library.", type: "string" }, ...extraOptions],
321
+ resultSchemaId: `treeseed.command.library.${segment}/v1`,
322
+ execution: local(`local.library.${segment}`)
323
+ };
324
+ }
325
+ function addOptions(node, options) {
326
+ if (node.nodeType === "leaf") node.options = [...node.options ?? [], ...options];
327
+ return node;
328
+ }
329
+ function developmentCommand(segment, kind, argument, options = []) {
330
+ return {
331
+ nodeType: "leaf",
332
+ segment,
333
+ description: `${segment[0].toUpperCase()}${segment.slice(1)} a local development session.`,
334
+ kind,
335
+ arguments: argument ? [{ name: argument, description: `${argument} value.`, required: true }] : void 0,
336
+ options: [...kind === "mutation" ? [planOption] : [], ...options],
337
+ authorization: kind === "mutation" ? { capability: `development.${segment}`, confirmation: "never" } : void 0,
338
+ resultSchemaId: `treeseed.command.dev.${segment}/v1`,
339
+ execution: local(`local.dev.${segment}`)
340
+ };
341
+ }
342
+ const commandTree = {
18
343
  schemaVersion: "treeseed.command-tree/v1",
19
344
  executable: "trsd",
20
345
  commands: [
21
- branch("auth", [leaf("login", "mutation", void 0, "credential"), leaf("logout", "mutation"), leaf("status")]),
22
- branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation"), leaf("rotate", "mutation", void 0, "credential")]),
346
+ { 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") },
347
+ { 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() },
348
+ branch("topics", [
349
+ { 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() },
350
+ { 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() },
351
+ { 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() },
352
+ { 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() }
353
+ ]),
354
+ branch("capabilities", [
355
+ { 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() },
356
+ { 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() }
357
+ ]),
358
+ branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
359
+ branch("users", [userCreate()]),
360
+ 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() }]),
361
+ branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation")]),
362
+ managedSecretCommands,
363
+ branch("platform", [
364
+ { nodeType: "leaf", segment: "verify", description: "Verify a declarative Platform repository without package checkouts or a control-plane API.", kind: "read", arguments: [{ name: "root", description: "Platform root; defaults to the current directory.", required: false }], options: [{ name: "--profile", description: "Composable profile to verify.", type: "string[]" }, { name: "--json", description: "Emit the stable command-result envelope.", type: "boolean" }], resultSchemaId: "treeseed.platform-verification/v1", execution: local("local.platform.verify") },
365
+ { nodeType: "leaf", segment: "workset", description: "Plan or safely materialize exact primary source checkouts beneath packages/.", kind: "mutation", options: [planOption, { name: "--apply", description: "Apply the frozen workset plan.", type: "boolean" }, { name: "--yes", description: "Confirm the planned checkout mutations.", type: "boolean" }, { name: "--profile", description: "Composable source profile; repeat to union profiles.", type: "string[]" }, { name: "--project", description: "Explicit project slug; repeat to select projects.", type: "string[]" }, { name: "--exclude", description: "Project slug to exclude; repeat as needed.", type: "string[]" }, { name: "--json", description: "Emit the stable command-result envelope.", type: "boolean" }], authorization: { capability: "development.workset", confirmation: "never" }, resultSchemaId: "treeseed.platform-workset-result/v1", execution: local("local.platform.workset") },
366
+ branch("project", [
367
+ { nodeType: "leaf", segment: "create", description: "Plan or reconcile a project, repository, template, library binding, and live inventory without writing application source into Platform Git.", kind: "mutation", arguments: [{ name: "slug", description: "Portable project slug.", required: true }], options: [planOption, { name: "--apply", description: "Apply the accepted creation plan.", type: "boolean" }, { name: "--yes", description: "Confirm authority-bearing project creation.", type: "boolean" }, { name: "--template", description: "Published template identity.", type: "string", required: true }, { name: "--visibility", description: "Repository visibility: public or private (default private).", type: "string" }, { name: "--json", description: "Emit the stable command-result envelope.", type: "boolean" }], authorization: { capability: "projects.create", confirmation: "authority" }, resultSchemaId: "treeseed.platform-project-create-result/v1", execution: local("local.platform.project.create") }
368
+ ]),
369
+ branch("topology", [
370
+ { nodeType: "leaf", segment: "plan", description: "Plan Cloudflare and Railway reconciliation from a portable hosted-topology declaration or template.", kind: "read", arguments: [{ name: "file", description: "Hosted topology YAML or JSON declaration or template.", required: true }], options: [{ name: "--artifacts", description: "Exact runtime artifact-input YAML or JSON required by a portable template.", type: "string" }], resultSchemaId: "treeseed.hosted-topology-plan/v1", execution: local("local.platform.topology.plan") },
371
+ { nodeType: "leaf", segment: "apply", description: "Apply an exact agent-authorized hosted-topology plan through the operations runner.", kind: "mutation", arguments: [{ name: "plan", description: "Exact plan JSON file.", required: true }], options: [planOption, { name: "--yes", description: "Confirm the authority-bearing mutation.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "authority" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.apply") },
372
+ { nodeType: "leaf", segment: "status", description: "Read the latest hosted-topology operation and known-good receipt.", kind: "read", resultSchemaId: "treeseed.infrastructure.topology.status.output/v1", execution: local("local.platform.topology.status") },
373
+ { nodeType: "leaf", segment: "rollback", description: "Restore exact prior hosted-topology state from a known-good receipt.", kind: "mutation", arguments: [{ name: "rollback", description: "Exact rollback JSON file.", required: true }], options: [planOption, { name: "--yes", description: "Confirm the destructive rollback.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "destructive" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.rollback") }
374
+ ])
375
+ ]),
376
+ branch("dev", [
377
+ branch("host", [
378
+ { nodeType: "leaf", segment: "activate", description: "Build and activate a local host-runtime development generation.", kind: "mutation", arguments: [{ name: "worktree", description: "Deployment worktree (defaults to the current workspace deployment package).", required: false }], options: [planOption, { name: "--guest-image", description: "Optional exact sandbox guest image digest to bind while activating.", type: "string" }], authorization: { capability: "development.activate", confirmation: "never" }, resultSchemaId: "treeseed.command.dev.host.activate/v1", execution: local("local.dev.host.activate") },
379
+ { nodeType: "leaf", segment: "status", description: "Show the active local host-runtime development generation.", kind: "read", resultSchemaId: "treeseed.command.dev.host.status/v1", execution: local("local.dev.host.status") },
380
+ { nodeType: "leaf", segment: "deactivate", description: "Restore the installed host runtime.", kind: "mutation", options: [planOption], authorization: { capability: "development.deactivate", confirmation: "never" }, resultSchemaId: "treeseed.command.dev.host.deactivate/v1", execution: local("local.dev.host.deactivate") },
381
+ branch("guest", [
382
+ branch("image", [
383
+ { nodeType: "leaf", segment: "import", description: "Import a locally built provider sandbox image into the Kata development runtime.", kind: "mutation", arguments: [{ name: "image", description: "Local treeseed/sandbox-*:local image reference.", required: true }], options: [planOption], authorization: { capability: "development.activate", confirmation: "never" }, resultSchemaId: "treeseed.command.dev.host.guest-image.import/v1", execution: local("local.dev.host.guest-image.import") }
384
+ ])
385
+ ])
386
+ ]),
387
+ branch("session", [
388
+ developmentCommand("start", "mutation", "manifest", [{ name: "--actor", description: "Audited development-session actor.", type: "string" }]),
389
+ developmentCommand("stop", "mutation", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--restore", description: "Restore released routes and targets.", type: "boolean" }]),
390
+ developmentCommand("recover", "mutation", void 0, [{ name: "--session", description: "Exact manager session whose local custody should be recovered.", type: "string", required: true }])
391
+ ]),
392
+ developmentCommand("use", "mutation", "selection", [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--target", description: "Additional project.target=mode selections.", type: "string[]" }]),
393
+ developmentCommand("rebuild", "mutation", "target", [{ name: "--session", description: "Development session identity.", type: "string" }]),
394
+ developmentCommand("restart", "mutation", "target", [{ name: "--session", description: "Development session identity.", type: "string" }]),
395
+ developmentCommand("status", "read", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--all", description: "Include stopped sessions.", type: "boolean" }]),
396
+ 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" }]),
397
+ developmentCommand("plan", "read", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--affected", description: "Show the smallest affected closure.", type: "boolean" }]),
398
+ 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" }]),
399
+ developmentCommand("verify", "mutation", void 0, [{ name: "--session", description: "Development session identity.", type: "string" }, { name: "--candidate", description: "Candidate identity.", type: "string" }])
400
+ ]),
401
+ branch("host", [
402
+ hostInitialize(),
403
+ leaf("status"),
404
+ leaf("doctor"),
405
+ leaf("plan"),
406
+ leaf("apply", "mutation", void 0, "authority"),
407
+ leaf("reconcile", "mutation", void 0, "authority"),
408
+ leaf("events"),
409
+ branch("config", [leaf("show"), leaf("plan", "read", "file"), leaf("apply", "mutation", "file", "authority"), configurationAdopt()]),
410
+ branch("postgres", [branch("transfer", [leaf("prepare", "mutation", "file", "authority"), leaf("status")])]),
411
+ leaf("topology"),
412
+ leaf("connections"),
413
+ branch("provider", [leaf("status"), branch("credentials", [leaf("list"), leaf("status"), hostProviderCredentialInitialize()]), hostProviderEnvironmentBranch()]),
414
+ branch("storage", [
415
+ leaf("status"),
416
+ addOptions(leaf("connect", "mutation", "backend", "credential"), [{ name: "--account-id", description: "Optional Cloudflare account ID when the bootstrap authority reaches multiple accounts.", type: "string" }]),
417
+ leaf("reconcile", "mutation", void 0, "authority"),
418
+ leaf("rotate", "mutation", "backend", "credential"),
419
+ addOptions(leaf("reset", "mutation", "backend", "destructive"), [{ name: "--environment", description: "Exact storage environment to empty and recreate.", type: "string", required: true }])
420
+ ]),
421
+ branch("security", [leaf("plan"), hostSecurityInitialize(), leaf("status"), leaf("verify"), hostSecurityRotate(), branch("recovery", [hostRecoveryVerify()])]),
422
+ branch("sandbox", [leaf("status"), leaf("doctor")]),
423
+ branch("fleet", [leaf("status")]),
424
+ 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")]),
425
+ branch("component", [leaf("list"), leaf("status", "read", "component"), leaf("enable", "mutation", "component", "authority"), leaf("disable", "mutation", "component", "destructive")]),
426
+ branch("aliases", [leaf("list")]),
427
+ branch("recovery", [leaf("status"), leaf("retry", "mutation", void 0, "authority"), leaf("restore", "mutation", "generation", "destructive")]),
428
+ branch("bootstrap", [leaf("status"), leaf("enroll", "mutation", void 0, "credential")]),
429
+ hostReset(),
430
+ hostUninstall()
431
+ ]),
23
432
  branch("agents", [
24
433
  leaf("list"),
25
434
  leaf("show", "read", "agent"),
@@ -36,15 +445,17 @@ const TREESEED_COMMAND_TREE_V1 = {
36
445
  leaf("diagnose", "read", "provider"),
37
446
  leaf("connect", "mutation", void 0, "credential"),
38
447
  leaf("disconnect", "mutation", "connection", "destructive"),
448
+ ...providerEnvironmentBranches(),
39
449
  branch("requests", [leaf("list"), leaf("show", "read", "request"), leaf("approve", "mutation", "request", "authority"), leaf("reject", "mutation", "request", "authority")]),
40
450
  branch("credentials", [leaf("status", "read", "connection"), leaf("rotate", "mutation", "connection", "credential"), leaf("revoke", "mutation", "connection", "irreversible")]),
41
451
  branch("offers", [leaf("show", "read", "connection"), leaf("validate", "read", "file"), leaf("plan", "read", "file"), leaf("apply", "mutation", "file", "authority")])
42
452
  ]),
453
+ branch("seeds", [leaf("validate", "read", "file"), leaf("plan", "read", "file"), leaf("apply", "mutation", "file", "authority"), leaf("show", "read", "seed"), leaf("verify", "read", "seed")]),
43
454
  branch("capacity", [leaf("status"), leaf("explain"), leaf("usage"), leaf("ledger"), leaf("audit")]),
44
- branch("plans", [leaf("list"), leaf("show", "read", "plan"), leaf("explain", "read", "plan"), { nodeType: "leaf", segment: "diff", description: "Compare two API-derived plans.", kind: "read", arguments: [{ name: "left", description: "Left plan identity.", required: true }, { name: "right", description: "Right plan identity.", required: true }], resultSchemaId: "treeseed.command.plans.diff/v1" }]),
455
+ branch("plans", [leaf("list"), leaf("show", "read", "plan"), leaf("explain", "read", "plan"), { nodeType: "leaf", segment: "diff", description: "Compare two API-derived plans.", kind: "read", arguments: [{ name: "left", description: "Left plan identity.", required: true }, { name: "right", description: "Right plan identity.", required: true }], resultSchemaId: "treeseed.command.plans.diff/v1", execution: unavailable() }]),
45
456
  branch("workdays", [
46
457
  branch("profiles", [leaf("list"), leaf("show", "read", "profile"), leaf("validate", "read", "file")]),
47
- leaf("plan"),
458
+ leaf("plan", "mutation"),
48
459
  leaf("start", "mutation", void 0, "authority"),
49
460
  leaf("list"),
50
461
  leaf("show", "read", "workday"),
@@ -56,6 +467,44 @@ const TREESEED_COMMAND_TREE_V1 = {
56
467
  branch("schedules", [leaf("list"), leaf("show", "read", "schedule"), leaf("plan"), leaf("start", "mutation", void 0, "authority"), leaf("pause", "mutation", "schedule", "authority"), leaf("resume", "mutation", "schedule", "authority"), leaf("retire", "mutation", "schedule", "destructive")])
57
468
  ]),
58
469
  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")]),
470
+ branch("projects", [branch("treedx", [
471
+ leaf("show", "read", "project"),
472
+ leaf("bind", "mutation", "project"),
473
+ leaf("status", "read", "project"),
474
+ leaf("diagnose", "read", "project"),
475
+ leaf("capabilities", "read", "project"),
476
+ branch("workspaces", [leaf("list", "read", "project"), leaf("show", "read", "workspace"), leaf("abandon", "mutation", "workspace", "destructive")])
477
+ ])]),
478
+ branch("ai", [
479
+ leaf("status"),
480
+ branch("mode", [leaf("show"), aiModeSet()]),
481
+ branch("inference", [leaf("models"), leaf("jobs"), leaf("rollback", "mutation", void 0, "destructive")]),
482
+ branch("training", [leaf("libraries"), leaf("jobs"), leaf("runs")]),
483
+ branch("lab", [leaf("status"), leaf("agents"), leaf("libraries")]),
484
+ branch("storage", [leaf("show"), addOptions(leaf("connect", "mutation"), [
485
+ { name: "--connection", description: "Team object-storage service connection ID.", type: "string", required: true },
486
+ { name: "--bucket", description: "Private artifact bucket to ensure and bind.", type: "string", required: true }
487
+ ]), leaf("disconnect", "mutation"), leaf("verify", "mutation", void 0, "authority")])
488
+ ]),
489
+ branch("library", [
490
+ libraryRead("show"),
491
+ libraryRead("status"),
492
+ libraryRead("paths", [], [{ name: "--prefix", description: "Repository-relative path prefix.", type: "string" }, { name: "--limit", description: "Page size.", type: "number" }, { name: "--cursor", description: "Opaque page cursor.", type: "string" }]),
493
+ libraryRead("read", ["path"]),
494
+ libraryRead("search", ["query"], [{ name: "--path", description: "Restrict search to a repository-relative path.", type: "string" }, { name: "--limit", description: "Page size.", type: "number" }, { name: "--cursor", description: "Opaque page cursor.", type: "string" }]),
495
+ libraryRead("query", ["query"], [{ name: "--model", description: "TreeDX content model.", type: "string" }, { name: "--input", description: "YAML or JSON query body.", type: "string" }]),
496
+ libraryRead("context", ["query"], [{ name: "--max-items", description: "Maximum context items.", type: "number" }, { name: "--max-tokens", description: "Maximum context tokens.", type: "number" }]),
497
+ branch("workspace", [
498
+ addOptions(leaf("create", "mutation", "project"), [{ name: "--request", description: "Replay-safe UUID request identity.", type: "string" }]),
499
+ leaf("show", "read", "workspace"),
500
+ { nodeType: "leaf", segment: "read", description: "Read a file from a governed library workspace.", kind: "read", arguments: [{ name: "workspace", description: "Workspace identity.", required: true }, { name: "path", description: "Repository-relative path.", required: true }], resultSchemaId: "treeseed.command.library.workspace.read/v1", execution: unavailable() },
501
+ leaf("diff", "read", "workspace"),
502
+ addOptions(leaf("write", "mutation", "workspace"), [{ name: "--input", description: "YAML or JSON draft body.", type: "string", required: true }]),
503
+ addOptions(leaf("submit", "mutation", "workspace"), [{ name: "--version", description: "Expected workspace version.", type: "number", required: true }, { name: "--message", description: "Commit message.", type: "string" }, { name: "--notes", description: "Review notes.", type: "string" }, { name: "--context-digest", description: "Verified editorial context digest.", type: "string" }]),
504
+ addOptions(leaf("abandon", "mutation", "workspace", "destructive"), [{ name: "--version", description: "Expected workspace version.", type: "number", required: true }])
505
+ ]),
506
+ branch("reviews", [leaf("list"), addOptions(leaf("decide", "mutation", "review"), [{ name: "--input", description: "YAML or JSON review decision.", type: "string", required: true }]), addOptions(leaf("publish", "mutation", "review"), [{ name: "--input", description: "Optional YAML or JSON publication body.", type: "string" }])])
507
+ ]),
59
508
  leaf("save", "mutation"),
60
509
  leaf("stage", "mutation", void 0, "authority"),
61
510
  leaf("release", "mutation", void 0, "production"),
@@ -63,17 +512,17 @@ const TREESEED_COMMAND_TREE_V1 = {
63
512
  leaf("diagnose")
64
513
  ]
65
514
  };
515
+ function attachExecution(nodes, parent = []) {
516
+ for (const node of nodes) {
517
+ const path = [...parent, node.segment];
518
+ if (node.nodeType === "branch") attachExecution(node.children, path);
519
+ else node.execution = operationBindings[path.join(" ")] ?? node.execution;
520
+ }
521
+ }
522
+ attachExecution(commandTree.commands);
523
+ const TREESEED_COMMAND_TREE_V1 = commandTree;
66
524
  function listCommandPaths(tree = TREESEED_COMMAND_TREE_V1) {
67
- const paths = [];
68
- const visit = (nodes, parent) => {
69
- for (const node of nodes) {
70
- const path = [...parent, node.segment];
71
- if (node.nodeType === "leaf") paths.push(path.join(" "));
72
- else visit(node.children, path);
73
- }
74
- };
75
- visit(tree.commands, []);
76
- return paths;
525
+ return commandPaths(tree);
77
526
  }
78
527
  export {
79
528
  TREESEED_COMMAND_TREE_V1,