@treeseed/sdk 0.13.0-rc.13 → 0.13.0-rc.130

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 (558) hide show
  1. package/README.md +69 -9
  2. package/dist/accounts/account-contracts.d.ts +6 -0
  3. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +5485 -0
  4. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +242 -0
  5. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +304 -0
  6. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.js +44 -0
  7. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
  8. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
  9. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +23 -60
  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 +126 -3
  14. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
  15. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +80 -0
  16. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +121 -0
  17. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +103 -0
  18. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +51 -0
  19. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +490 -0
  20. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +170 -0
  21. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +210 -91
  22. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
  23. package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
  24. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -3
  25. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +218 -0
  26. package/dist/agent-capacity/contracts/operations/agent-team-clone.js +57 -0
  27. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -24
  28. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
  29. package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
  30. package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
  31. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +1291 -0
  32. package/dist/agent-capacity/contracts/support/execution-graph.js +122 -0
  33. package/dist/agent-capacity/contracts/support/financial-records.d.ts +3 -6
  34. package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
  35. package/dist/agent-capacity/contracts/support/time-capacity.d.ts +0 -14
  36. package/dist/agent-capacity/contracts/support/time-capacity.js +1 -8
  37. package/dist/agent-capacity/grant.d.ts +34 -0
  38. package/dist/agent-capacity/grant.js +4 -0
  39. package/dist/agent-capacity/validation/activity-profile.d.ts +1 -1
  40. package/dist/agent-capacity/validation/activity-profile.js +3 -259
  41. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +2538 -9020
  42. package/dist/agent-capacity/validation/agent-definition-schema.js +59 -181
  43. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +25 -25
  44. package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
  45. package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
  46. package/dist/agent-capacity/validation/assignment-records.js +49 -35
  47. package/dist/agent-capacity/validation/configuration.d.ts +1 -1
  48. package/dist/agent-capacity/validation/configuration.js +2 -7
  49. package/dist/agent-capacity/validation/execution/execution-graph.d.ts +1 -0
  50. package/dist/agent-capacity/validation/execution/execution-graph.js +16 -0
  51. package/dist/agent-capacity/validation/grant.d.ts +11 -0
  52. package/dist/agent-capacity/validation/grant.js +31 -0
  53. package/dist/agent-capacity/validation/index.d.ts +2 -1
  54. package/dist/agent-capacity/validation/index.js +2 -1
  55. package/dist/agent-capacity/workday.d.ts +13 -4
  56. package/dist/agent-capacity/workday.js +10 -26
  57. package/dist/capacity/agents/agent-capacity.d.ts +11 -4
  58. package/dist/capacity/agents/agent-capacity.js +9 -3
  59. package/dist/capacity-provider/capability-ontology.d.ts +1495 -0
  60. package/dist/capacity-provider/capability-ontology.js +221 -0
  61. package/dist/capacity-provider/client.d.ts +78 -3
  62. package/dist/capacity-provider/client.js +22 -10
  63. package/dist/capacity-provider/contracts/capacity-facts.d.ts +13 -0
  64. package/dist/capacity-provider/contracts/environment-profiles.d.ts +255 -0
  65. package/dist/capacity-provider/contracts/environment-profiles.js +71 -0
  66. package/dist/capacity-provider/contracts/governance.d.ts +110 -51
  67. package/dist/capacity-provider/contracts/index.d.ts +3 -0
  68. package/dist/capacity-provider/contracts/index.js +3 -0
  69. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  70. package/dist/capacity-provider/core-capability-catalog.js +49 -0
  71. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  72. package/dist/capacity-provider/environment-catalog.js +116 -0
  73. package/dist/capacity-provider/index.d.ts +5 -0
  74. package/dist/capacity-provider/index.js +5 -0
  75. package/dist/capacity-provider/install-configuration.d.ts +39 -0
  76. package/dist/capacity-provider/install-configuration.js +18 -0
  77. package/dist/capacity-provider/sandbox-contracts.d.ts +602 -0
  78. package/dist/capacity-provider/sandbox-contracts.js +90 -0
  79. package/dist/capacity-provider/sandbox.d.ts +2 -0
  80. package/dist/capacity-provider/sandbox.js +2 -0
  81. package/dist/capacity-provider/source-workspace.d.ts +740 -0
  82. package/dist/capacity-provider/source-workspace.js +130 -0
  83. package/dist/capacity-provider/validation.d.ts +11 -3
  84. package/dist/capacity-provider/validation.js +136 -70
  85. package/dist/configuration/secrets-capability.d.ts +5 -1
  86. package/dist/configuration/secrets-capability.js +5 -1
  87. package/dist/content/contracts.d.ts +1 -1
  88. package/dist/content/validation/agent-operational-content-schemas.d.ts +430 -777
  89. package/dist/content/validation/agent-operational-content-schemas.js +31 -57
  90. package/dist/content/validation/auxiliary-content-schemas.d.ts +144 -144
  91. package/dist/content/validation/content-model-schemas.d.ts +16063 -19764
  92. package/dist/content/validation/content-model-schemas.js +350 -98
  93. package/dist/content/validation/portable-content-data.d.ts +751 -1782
  94. package/dist/content/validation/portable-content-data.js +10 -4
  95. package/dist/content/validation/schema-constraints.d.ts +80 -0
  96. package/dist/content/validation/schema-constraints.js +173 -0
  97. package/dist/deployment/ai/storage.d.ts +158 -0
  98. package/dist/deployment/ai/storage.js +32 -0
  99. package/dist/deployment/ai-hosting.d.ts +297 -0
  100. package/dist/deployment/ai-hosting.js +63 -0
  101. package/dist/deployment/ai-instance.d.ts +65 -0
  102. package/dist/deployment/ai-instance.js +30 -0
  103. package/dist/deployment/ai-mode.d.ts +454 -0
  104. package/dist/deployment/ai-mode.js +67 -0
  105. package/dist/deployment/canonical.d.ts +2 -0
  106. package/dist/deployment/canonical.js +17 -0
  107. package/dist/deployment/catalog.d.ts +16 -0
  108. package/dist/deployment/catalog.js +48 -0
  109. package/dist/deployment/hosted-topology-template.d.ts +449 -0
  110. package/dist/deployment/hosted-topology-template.js +56 -0
  111. package/dist/deployment/hosted-topology.d.ts +2698 -0
  112. package/dist/deployment/hosted-topology.js +468 -0
  113. package/dist/deployment/index.d.ts +13 -0
  114. package/dist/deployment/index.js +13 -0
  115. package/dist/deployment/postgres/contracts.d.ts +418 -0
  116. package/dist/deployment/postgres/contracts.js +83 -0
  117. package/dist/deployment/postgres/requirements.d.ts +15 -0
  118. package/dist/deployment/postgres/requirements.js +32 -0
  119. package/dist/deployment/postgres/transfer.d.ts +97 -0
  120. package/dist/deployment/postgres/transfer.js +29 -0
  121. package/dist/deployment/schemas.d.ts +8625 -0
  122. package/dist/deployment/schemas.js +455 -0
  123. package/dist/deployment/topology.d.ts +9 -0
  124. package/dist/deployment/topology.js +35 -0
  125. package/dist/development/index.d.ts +1 -0
  126. package/dist/development/index.js +1 -0
  127. package/dist/development/schemas.d.ts +3594 -0
  128. package/dist/development/schemas.js +204 -0
  129. package/dist/development/session-migration.d.ts +3 -0
  130. package/dist/development/session-migration.js +25 -0
  131. package/dist/entrypoints/clients/control-plane-client.d.ts +9 -1
  132. package/dist/entrypoints/clients/control-plane-client.js +17 -5
  133. package/dist/graph/context-query-contracts.d.ts +16 -1
  134. package/dist/graph/context-query-contracts.js +6 -1
  135. package/dist/guarantees/evidence-trust.d.ts +32 -0
  136. package/dist/guarantees/evidence-trust.js +47 -0
  137. package/dist/guarantees/index.d.ts +154 -0
  138. package/dist/guarantees/index.js +44 -0
  139. package/dist/identity/browser-session.d.ts +233 -0
  140. package/dist/identity/browser-session.js +51 -0
  141. package/dist/identity/contracts.d.ts +191 -0
  142. package/dist/identity/contracts.js +77 -0
  143. package/dist/identity/index.d.ts +3 -0
  144. package/dist/identity/index.js +3 -0
  145. package/dist/identity/runtime.d.ts +186 -0
  146. package/dist/identity/runtime.js +49 -0
  147. package/dist/knowledge/contracts.d.ts +9 -2
  148. package/dist/knowledge/contracts.js +2 -2
  149. package/dist/model-registry/agent-operational-models.d.ts +1 -1
  150. package/dist/model-registry/agent-operational-models.js +1 -4
  151. package/dist/model-registry/build-builtin-model-registry.js +44 -72
  152. package/dist/model-registry/discussion-models.js +0 -1
  153. package/dist/operator-contracts/canonical-command-tree.js +415 -44
  154. package/dist/operator-contracts/catalog/admin-account-team-operations.d.ts +36 -0
  155. package/dist/operator-contracts/catalog/admin-account-team-operations.js +52 -0
  156. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +75 -0
  157. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.js +42 -0
  158. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +163 -0
  159. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  160. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +62 -0
  161. package/dist/operator-contracts/catalog/commands/command-tree-builders.js +191 -0
  162. package/dist/operator-contracts/catalog/communication-operations.d.ts +457 -0
  163. package/dist/operator-contracts/catalog/communication-operations.js +92 -0
  164. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  165. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  166. package/dist/operator-contracts/catalog/execution/execution-operations.d.ts +36 -0
  167. package/dist/operator-contracts/catalog/execution/execution-operations.js +39 -0
  168. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +399 -0
  169. package/dist/operator-contracts/catalog/hosted-topology-operations.js +79 -0
  170. package/dist/operator-contracts/catalog/inbox-operations.d.ts +265 -0
  171. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  172. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +53 -0
  173. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +24 -0
  174. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.d.ts +3 -0
  175. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.js +15 -0
  176. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +127 -0
  177. package/dist/operator-contracts/catalog/knowledge-share-operations.js +25 -0
  178. package/dist/operator-contracts/catalog/provider-environment-commands.d.ts +4 -0
  179. package/dist/operator-contracts/catalog/provider-environment-commands.js +69 -0
  180. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +41 -0
  181. package/dist/operator-contracts/catalog/provider-environment-operations.js +61 -0
  182. package/dist/operator-contracts/catalog/services/identity-commands.d.ts +2 -0
  183. package/dist/operator-contracts/catalog/services/identity-commands.js +13 -0
  184. package/dist/operator-contracts/catalog/services/secret-commands.d.ts +2 -0
  185. package/dist/operator-contracts/catalog/services/secret-commands.js +31 -0
  186. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +70 -0
  187. package/dist/operator-contracts/catalog/services/secret-operations.js +52 -0
  188. package/dist/operator-contracts/catalog/treeai-operations.d.ts +13 -0
  189. package/dist/operator-contracts/catalog/treeai-operations.js +61 -0
  190. package/dist/operator-contracts/catalog/workdays/profile-commands.d.ts +4 -0
  191. package/dist/operator-contracts/catalog/workdays/profile-commands.js +20 -0
  192. package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +41 -0
  193. package/dist/operator-contracts/catalog/workdays/profile-operations.js +50 -0
  194. package/dist/operator-contracts/catalog/workdays/selection-commands.d.ts +3 -0
  195. package/dist/operator-contracts/catalog/workdays/selection-commands.js +28 -0
  196. package/dist/operator-contracts/command-tree.d.ts +29 -0
  197. package/dist/operator-contracts/command-tree.js +50 -0
  198. package/dist/operator-contracts/communication/addressing.d.ts +8 -0
  199. package/dist/operator-contracts/communication/addressing.js +57 -0
  200. package/dist/operator-contracts/communication/contracts.d.ts +1966 -0
  201. package/dist/operator-contracts/communication/contracts.js +195 -0
  202. package/dist/operator-contracts/control-plane-operation.d.ts +15 -1
  203. package/dist/operator-contracts/control-plane-operation.js +14 -6
  204. package/dist/operator-contracts/control-plane-operations.d.ts +2496 -328
  205. package/dist/operator-contracts/control-plane-operations.js +280 -127
  206. package/dist/operator-contracts/inbox/contracts.d.ts +1111 -0
  207. package/dist/operator-contracts/inbox/contracts.js +138 -0
  208. package/dist/operator-contracts/index.d.ts +6 -1
  209. package/dist/operator-contracts/index.js +6 -1
  210. package/dist/operator-contracts/knowledge/contracts.d.ts +130 -0
  211. package/dist/operator-contracts/knowledge/contracts.js +39 -0
  212. package/dist/operator-contracts/mcp.d.ts +5 -0
  213. package/dist/operator-contracts/mcp.js +62 -0
  214. package/dist/operator-contracts/oauth.d.ts +45 -0
  215. package/dist/operator-contracts/oauth.js +7 -0
  216. package/dist/operator-contracts/operation-builder.d.ts +18 -0
  217. package/dist/operator-contracts/operation-builder.js +78 -0
  218. package/dist/operator-contracts/seed/seed-bundle.d.ts +138 -0
  219. package/dist/operator-contracts/seed/seed-bundle.js +68 -0
  220. package/dist/operator-contracts/workday-lifecycle.d.ts +383 -28
  221. package/dist/operator-contracts/workday-lifecycle.js +124 -17
  222. package/dist/platform/agent-schema-verification.d.ts +3 -0
  223. package/dist/platform/agent-schema-verification.js +377 -0
  224. package/dist/platform/contracts.d.ts +429 -0
  225. package/dist/platform/contracts.js +93 -0
  226. package/dist/platform/index.d.ts +6 -0
  227. package/dist/platform/index.js +6 -0
  228. package/dist/platform/inventory.d.ts +11 -0
  229. package/dist/platform/inventory.js +53 -0
  230. package/dist/platform/project-create.d.ts +49 -0
  231. package/dist/platform/project-create.js +75 -0
  232. package/dist/platform/schemas.d.ts +1094 -0
  233. package/dist/platform/schemas.js +99 -0
  234. package/dist/platform/verification.d.ts +9 -0
  235. package/dist/platform/verification.js +114 -0
  236. package/dist/platform/workset.d.ts +21 -0
  237. package/dist/platform/workset.js +106 -0
  238. package/dist/sdk-types/support/planning-policy.d.ts +1 -1
  239. package/dist/sdk-types/support/sdk-model-names.d.ts +1 -1
  240. package/dist/sdk-types/support/sdk-model-names.js +0 -3
  241. package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
  242. package/dist/secrets-capability/github-actions-encryption.d.ts +2 -0
  243. package/dist/secrets-capability/github-actions-encryption.js +11 -0
  244. package/dist/secrets-capability/provider-operation-contracts.d.ts +15 -1
  245. package/dist/secrets-capability/secret-contracts.d.ts +33 -0
  246. package/dist/secrets-capability/secret-contracts.js +49 -0
  247. package/dist/secrets-capability/service-provider-contracts.d.ts +5 -3
  248. package/dist/secrets-capability/service-provider-contracts.js +66 -50
  249. package/dist/secrets-capability/shared-access.d.ts +51 -0
  250. package/dist/secrets-capability/shared-access.js +36 -0
  251. package/dist/secrets-capability/shared-resources.d.ts +376 -0
  252. package/dist/secrets-capability/shared-resources.js +91 -0
  253. package/dist/secrets-capability/vault-contracts.d.ts +132 -0
  254. package/dist/secrets-capability/vault-contracts.js +56 -0
  255. package/dist/security/encrypted-envelope.d.ts +177 -0
  256. package/dist/security/encrypted-envelope.js +34 -0
  257. package/dist/security/envelope-codec.d.ts +38 -0
  258. package/dist/security/envelope-codec.js +96 -0
  259. package/dist/security/index.d.ts +2 -0
  260. package/dist/security/index.js +2 -0
  261. package/dist/site-contracts/catalog.d.ts +16 -0
  262. package/dist/site-contracts/catalog.js +19 -0
  263. package/dist/site-contracts/cloudflare.d.ts +48 -0
  264. package/dist/site-contracts/platform.d.ts +94 -0
  265. package/dist/site-contracts/plugin.d.ts +63 -0
  266. package/dist/site-contracts/plugin.js +26 -0
  267. package/dist/treeai/catalog.d.ts +1 -0
  268. package/dist/treeai/catalog.js +1 -0
  269. package/dist/treeai/client.d.ts +793 -0
  270. package/dist/treeai/client.js +44 -0
  271. package/dist/treeai/contract.d.ts +41 -0
  272. package/dist/treeai/contract.js +51 -0
  273. package/dist/treeai/generated/upstream.d.ts +770 -0
  274. package/dist/treeai/generated/upstream.js +4 -0
  275. package/dist/treeai/index.d.ts +4 -0
  276. package/dist/treeai/index.js +4 -0
  277. package/dist/treedx/client.d.ts +605 -0
  278. package/dist/treedx/client.js +39 -0
  279. package/dist/treedx/contract.d.ts +32 -0
  280. package/dist/treedx/contract.js +63 -0
  281. package/dist/treedx/index.d.ts +3 -0
  282. package/dist/treedx/index.js +3 -0
  283. package/dist/treedx/types.d.ts +294 -7
  284. package/dist/treedx/types.js +44 -7
  285. package/dist/types/agents/agent-activity-profile.d.ts +43 -98
  286. package/dist/types/agents/agent-activity-profile.js +23 -0
  287. package/dist/types/agents/agent-trigger-kinds.d.ts +3 -5
  288. package/dist/types/agents/agent-trigger-kinds.js +1 -13
  289. package/dist/types/agents/execution-run-ref.d.ts +1 -8
  290. package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
  291. package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
  292. package/guarantees/agent/golden/product.guarantee.yaml +12 -0
  293. package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +858 -0
  294. package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
  295. package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
  296. package/guarantees/verifiers/golden.verifiers.yaml +1464 -0
  297. package/package.json +72 -13
  298. package/tests/acceptance/golden-product.test.ts +205 -0
  299. package/tests/acceptance/golden-product.ts +404 -0
  300. package/tests/acceptance/product/base-red.ts +73 -0
  301. package/tests/acceptance/product/documentation-examples.ts +68 -0
  302. package/tests/acceptance/product/intent-runtime.ts +145 -0
  303. package/tests/acceptance/product/release-output.ts +160 -0
  304. package/tests/acceptance/product/research-artifact.ts +87 -0
  305. package/tests/acceptance/product/research-revision.ts +82 -0
  306. package/tests/acceptance/product/research-source.ts +91 -0
  307. package/tests/acceptance/product/test-chain.ts +192 -0
  308. package/treeseed.package.yaml +147 -0
  309. package/dist/agent-capacity/allocation.d.ts +0 -186
  310. package/dist/agent-capacity/allocation.js +0 -226
  311. package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
  312. package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
  313. package/dist/agent-capacity/artifacts.d.ts +0 -107
  314. package/dist/agent-capacity/artifacts.js +0 -39
  315. package/dist/agent-capacity/authority/agent-authority-presets.d.ts +0 -13
  316. package/dist/agent-capacity/authority/agent-authority-presets.js +0 -106
  317. package/dist/agent-capacity/contracts/operations/workflow-promotion.d.ts +0 -24
  318. package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -251
  319. package/dist/agent-capacity/policy/capacity/allocations/allocation-hierarchy.d.ts +0 -29
  320. package/dist/agent-capacity/policy/capacity/allocations/allocation-hierarchy.js +0 -110
  321. package/dist/agent-capacity/validation/allocation.d.ts +0 -12
  322. package/dist/agent-capacity/validation/allocation.js +0 -115
  323. package/dist/agent-capacity/validation/workflow-promotion.d.ts +0 -2
  324. package/dist/agent-capacity/validation/workflow-promotion.js +0 -34
  325. package/dist/operator-contracts/workday-profile.d.ts +0 -72
  326. package/dist/operator-contracts/workday-profile.js +0 -106
  327. package/dist/secrets-capability/service-vault-contracts.d.ts +0 -61
  328. package/dist/secrets-capability/service-vault-contracts.js +0 -39
  329. package/dist/treedx/accounts/auth.d.ts +0 -17
  330. package/dist/treedx/accounts/auth.js +0 -48
  331. package/dist/treedx/client/accounts/contracts/auth-mode.d.ts +0 -3
  332. package/dist/treedx/client/accounts/contracts/auth-mode.js +0 -6
  333. package/dist/treedx/client/build/creation/build-context.d.ts +0 -3
  334. package/dist/treedx/client/build/creation/build-context.js +0 -7
  335. package/dist/treedx/client/build/creation/build-snapshot.d.ts +0 -3
  336. package/dist/treedx/client/build/creation/build-snapshot.js +0 -8
  337. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.d.ts +0 -3
  338. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.js +0 -7
  339. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.d.ts +0 -6
  340. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.js +0 -10
  341. package/dist/treedx/client/methods.d.ts +0 -102
  342. package/dist/treedx/client/methods.js +0 -209
  343. package/dist/treedx/client/persistence/contracts/restore-storage.d.ts +0 -3
  344. package/dist/treedx/client/persistence/contracts/restore-storage.js +0 -6
  345. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.d.ts +0 -3
  346. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.js +0 -6
  347. package/dist/treedx/client/repositories/creation/register-repository.d.ts +0 -3
  348. package/dist/treedx/client/repositories/creation/register-repository.js +0 -7
  349. package/dist/treedx/client/repositories/queries/get-repository.d.ts +0 -3
  350. package/dist/treedx/client/repositories/queries/get-repository.js +0 -7
  351. package/dist/treedx/client/repositories/queries/list-repository-paths.d.ts +0 -3
  352. package/dist/treedx/client/repositories/queries/list-repository-paths.js +0 -7
  353. package/dist/treedx/client/repositories/queries/list-repository-refs.d.ts +0 -3
  354. package/dist/treedx/client/repositories/queries/list-repository-refs.js +0 -12
  355. package/dist/treedx/client/repositories/queries/query-repository.d.ts +0 -3
  356. package/dist/treedx/client/repositories/queries/query-repository.js +0 -7
  357. package/dist/treedx/client/repositories/queries/read-repository-file.d.ts +0 -3
  358. package/dist/treedx/client/repositories/queries/read-repository-file.js +0 -6
  359. package/dist/treedx/client/repositories/queries/read-repository-files.d.ts +0 -3
  360. package/dist/treedx/client/repositories/queries/read-repository-files.js +0 -7
  361. package/dist/treedx/client/repositories/queries/search-repository-files.d.ts +0 -3
  362. package/dist/treedx/client/repositories/queries/search-repository-files.js +0 -7
  363. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.d.ts +0 -3
  364. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.js +0 -9
  365. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.d.ts +0 -3
  366. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.js +0 -6
  367. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.d.ts +0 -3
  368. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.js +0 -7
  369. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.d.ts +0 -5
  370. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.js +0 -7
  371. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.d.ts +0 -3
  372. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.js +0 -6
  373. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.d.ts +0 -3
  374. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.js +0 -7
  375. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.d.ts +0 -2
  376. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.js +0 -19
  377. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.d.ts +0 -3
  378. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.js +0 -7
  379. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.d.ts +0 -3
  380. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.js +0 -6
  381. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.d.ts +0 -3
  382. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.js +0 -7
  383. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.d.ts +0 -3
  384. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.js +0 -6
  385. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.d.ts +0 -3
  386. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.js +0 -7
  387. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.d.ts +0 -6
  388. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.js +0 -23
  389. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.d.ts +0 -3
  390. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.js +0 -8
  391. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.d.ts +0 -3
  392. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.js +0 -7
  393. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.d.ts +0 -3
  394. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.js +0 -8
  395. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.d.ts +0 -3
  396. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.js +0 -8
  397. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.d.ts +0 -2
  398. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.js +0 -15
  399. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.d.ts +0 -2
  400. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.js +0 -38
  401. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.d.ts +0 -2
  402. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.js +0 -15
  403. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.d.ts +0 -2
  404. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.js +0 -15
  405. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.d.ts +0 -2
  406. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.js +0 -14
  407. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.d.ts +0 -2
  408. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.js +0 -14
  409. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.d.ts +0 -6
  410. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.js +0 -41
  411. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.d.ts +0 -2
  412. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.js +0 -14
  413. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.d.ts +0 -3
  414. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.js +0 -7
  415. package/dist/treedx/client/support/creation/apply-changeset.d.ts +0 -3
  416. package/dist/treedx/client/support/creation/apply-changeset.js +0 -10
  417. package/dist/treedx/client/support/creation/apply-storage-migration.d.ts +0 -3
  418. package/dist/treedx/client/support/creation/apply-storage-migration.js +0 -7
  419. package/dist/treedx/client/support/creation/create-migration.d.ts +0 -6
  420. package/dist/treedx/client/support/creation/create-migration.js +0 -7
  421. package/dist/treedx/client/support/creation/export-artifact.d.ts +0 -3
  422. package/dist/treedx/client/support/creation/export-artifact.js +0 -8
  423. package/dist/treedx/client/support/creation/plan-storage-migration.d.ts +0 -3
  424. package/dist/treedx/client/support/creation/plan-storage-migration.js +0 -7
  425. package/dist/treedx/client/support/creation/request-binary.d.ts +0 -6
  426. package/dist/treedx/client/support/creation/request-binary.js +0 -42
  427. package/dist/treedx/client/support/creation/write-file.d.ts +0 -3
  428. package/dist/treedx/client/support/creation/write-file.js +0 -10
  429. package/dist/treedx/client/support/creation/write-files.d.ts +0 -3
  430. package/dist/treedx/client/support/creation/write-files.js +0 -12
  431. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.d.ts +0 -3
  432. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.js +0 -7
  433. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.d.ts +0 -3
  434. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.js +0 -7
  435. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.d.ts +0 -3
  436. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.js +0 -9
  437. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.d.ts +0 -4
  438. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.js +0 -6
  439. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.d.ts +0 -3
  440. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.js +0 -7
  441. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.d.ts +0 -3
  442. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.js +0 -7
  443. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.d.ts +0 -3
  444. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.js +0 -7
  445. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.d.ts +0 -3
  446. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.js +0 -7
  447. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.d.ts +0 -3
  448. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.js +0 -10
  449. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.d.ts +0 -3
  450. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.js +0 -9
  451. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.d.ts +0 -3
  452. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.js +0 -7
  453. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.d.ts +0 -6
  454. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.js +0 -7
  455. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.d.ts +0 -6
  456. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.js +0 -7
  457. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.d.ts +0 -6
  458. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.js +0 -6
  459. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.d.ts +0 -15
  460. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.js +0 -6
  461. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.d.ts +0 -3
  462. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.js +0 -7
  463. package/dist/treedx/client/support/retirement/cleanup-artifacts.d.ts +0 -3
  464. package/dist/treedx/client/support/retirement/cleanup-artifacts.js +0 -7
  465. package/dist/treedx/client/support/retirement/delete-artifact.d.ts +0 -3
  466. package/dist/treedx/client/support/retirement/delete-artifact.js +0 -7
  467. package/dist/treedx/client/support/retirement/delete-file.d.ts +0 -3
  468. package/dist/treedx/client/support/retirement/delete-file.js +0 -10
  469. package/dist/treedx/client/support/retirement/rollback-storage-migration.d.ts +0 -3
  470. package/dist/treedx/client/support/retirement/rollback-storage-migration.js +0 -7
  471. package/dist/treedx/client/support/updates/patch-file.d.ts +0 -3
  472. package/dist/treedx/client/support/updates/patch-file.js +0 -10
  473. package/dist/treedx/client/support/updates/refresh-search-index.d.ts +0 -3
  474. package/dist/treedx/client/support/updates/refresh-search-index.js +0 -8
  475. package/dist/treedx/client/treedx/blobs/contracts/download-blob.d.ts +0 -3
  476. package/dist/treedx/client/treedx/blobs/contracts/download-blob.js +0 -6
  477. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.d.ts +0 -3
  478. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.js +0 -8
  479. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.d.ts +0 -3
  480. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.js +0 -27
  481. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.d.ts +0 -3
  482. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.js +0 -41
  483. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.d.ts +0 -3
  484. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.js +0 -27
  485. package/dist/treedx/client/treedx/blobs/creation/upload-blob.d.ts +0 -3
  486. package/dist/treedx/client/treedx/blobs/creation/upload-blob.js +0 -6
  487. package/dist/treedx/client/treedx/blobs/creation/write-blob.d.ts +0 -3
  488. package/dist/treedx/client/treedx/blobs/creation/write-blob.js +0 -8
  489. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.d.ts +0 -3
  490. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.js +0 -8
  491. package/dist/treedx/client/treedx/blobs/queries/read-blob.d.ts +0 -3
  492. package/dist/treedx/client/treedx/blobs/queries/read-blob.js +0 -10
  493. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.d.ts +0 -3
  494. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.js +0 -7
  495. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.d.ts +0 -3
  496. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.js +0 -8
  497. package/dist/treedx/client/treedx/federation/contracts/federated-query.d.ts +0 -3
  498. package/dist/treedx/client/treedx/federation/contracts/federated-query.js +0 -7
  499. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.d.ts +0 -3
  500. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.js +0 -6
  501. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.d.ts +0 -3
  502. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.js +0 -7
  503. package/dist/treedx/client/treedx/federation/updates/promote-mirror.d.ts +0 -3
  504. package/dist/treedx/client/treedx/federation/updates/promote-mirror.js +0 -7
  505. package/dist/treedx/client/treedx/federation/updates/sync-mirror.d.ts +0 -3
  506. package/dist/treedx/client/treedx/federation/updates/sync-mirror.js +0 -7
  507. package/dist/treedx/client/treedx/graph/contracts/federated-context.d.ts +0 -3
  508. package/dist/treedx/client/treedx/graph/contracts/federated-context.js +0 -7
  509. package/dist/treedx/client/treedx/graph/contracts/federated-graph.d.ts +0 -3
  510. package/dist/treedx/client/treedx/graph/contracts/federated-graph.js +0 -7
  511. package/dist/treedx/client/treedx/graph/contracts/graph-search.d.ts +0 -3
  512. package/dist/treedx/client/treedx/graph/contracts/graph-search.js +0 -8
  513. package/dist/treedx/client/treedx/graph/queries/get-graph-node.d.ts +0 -3
  514. package/dist/treedx/client/treedx/graph/queries/get-graph-node.js +0 -10
  515. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.d.ts +0 -3
  516. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.js +0 -7
  517. package/dist/treedx/client/treedx/graph/queries/get-subgraph.d.ts +0 -3
  518. package/dist/treedx/client/treedx/graph/queries/get-subgraph.js +0 -7
  519. package/dist/treedx/client/treedx/graph/queries/query-graph.d.ts +0 -3
  520. package/dist/treedx/client/treedx/graph/queries/query-graph.js +0 -7
  521. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.d.ts +0 -3
  522. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.js +0 -6
  523. package/dist/treedx/client/treedx/graph/queries/search-graph-files.d.ts +0 -3
  524. package/dist/treedx/client/treedx/graph/queries/search-graph-files.js +0 -6
  525. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.d.ts +0 -3
  526. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.js +0 -6
  527. package/dist/treedx/client/treedx/graph/updates/refresh-graph.d.ts +0 -3
  528. package/dist/treedx/client/treedx/graph/updates/refresh-graph.js +0 -7
  529. package/dist/treedx/client/treedx/search/contracts/federated-search.d.ts +0 -3
  530. package/dist/treedx/client/treedx/search/contracts/federated-search.js +0 -7
  531. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.d.ts +0 -3
  532. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.js +0 -7
  533. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.d.ts +0 -3
  534. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.js +0 -12
  535. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.d.ts +0 -2
  536. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.js +0 -6
  537. package/dist/treedx/generated/openapi-types.d.ts +0 -3662
  538. package/dist/treedx/generated/openapi-types.js +0 -0
  539. package/dist/treedx/support/client.d.ts +0 -251
  540. package/dist/treedx/support/client.js +0 -252
  541. package/dist/treedx/support/errors.d.ts +0 -13
  542. package/dist/treedx/support/errors.js +0 -17
  543. package/dist/treedx/types/tree-dx-actor.d.ts +0 -209
  544. package/dist/treedx/types/tree-dx-actor.js +0 -8
  545. package/dist/treedx/types/tree-dx-artifact-list-response.d.ts +0 -13
  546. package/dist/treedx/types/tree-dx-artifact-list-response.js +0 -0
  547. package/dist/treedx/types/tree-dx-changeset.d.ts +0 -51
  548. package/dist/treedx/types/tree-dx-changeset.js +0 -6
  549. package/dist/treedx/types/tree-dx-context-request.d.ts +0 -245
  550. package/dist/treedx/types/tree-dx-context-request.js +0 -0
  551. package/dist/treedx/types/tree-dx-exec-result.d.ts +0 -249
  552. package/dist/treedx/types/tree-dx-exec-result.js +0 -0
  553. package/dist/treedx/types/tree-dx-list-tree-request.d.ts +0 -222
  554. package/dist/treedx/types/tree-dx-list-tree-request.js +0 -0
  555. package/dist/treedx/types/tree-dx-push-request.d.ts +0 -229
  556. package/dist/treedx/types/tree-dx-push-request.js +0 -0
  557. /package/dist/{agent-capacity/contracts/operations/workflow-promotion.js → site-contracts/cloudflare.js} +0 -0
  558. /package/dist/{agent-capacity/contracts/support/decision-work.js → site-contracts/platform.js} +0 -0
@@ -0,0 +1,138 @@
1
+ import type { ProviderLanePurpose } from '../../agent-capacity/contracts/capacity/communication/communication-records.js';
2
+ export declare const SEED_BUNDLE_SCHEMA_VERSION: "treeseed.seed-bundle/v3";
3
+ export declare const HISTORICAL_SEED_BUNDLE_SCHEMA_VERSION: "treeseed.seed-bundle/v2";
4
+ export type SeedEnvironment = 'local' | 'staging' | 'prod' | string;
5
+ export interface SeedTeamResource {
6
+ key: string;
7
+ slug: string;
8
+ name: string;
9
+ displayName: string;
10
+ profileSummary?: string;
11
+ }
12
+ export interface SeedUserMembershipResource {
13
+ key: string;
14
+ team: string;
15
+ principal: {
16
+ kind: 'user';
17
+ email: string;
18
+ };
19
+ roles: string[];
20
+ missingUser: 'defer' | 'reject';
21
+ }
22
+ export interface SeedServicePrincipalMembershipResource {
23
+ key: string;
24
+ team: string;
25
+ principal: {
26
+ kind: 'service-principal';
27
+ key: string;
28
+ displayName: string;
29
+ interactiveLogin: false;
30
+ };
31
+ roles: string[];
32
+ }
33
+ export type SeedMembershipResource = SeedUserMembershipResource | SeedServicePrincipalMembershipResource;
34
+ export interface SeedRepositoryPolicy {
35
+ visibility: 'public' | 'private';
36
+ lifecycle: 'adopt' | 'create-or-adopt';
37
+ deletionPolicy: 'retain';
38
+ defaultBranch: string;
39
+ stagingBranch: string;
40
+ issues: boolean;
41
+ actions: boolean;
42
+ workflows: string[];
43
+ }
44
+ export interface SeedRepositoryResource {
45
+ key: string;
46
+ project: string;
47
+ role: 'primary' | 'library' | 'fixture' | 'support' | 'template';
48
+ provider: 'github';
49
+ owner: string;
50
+ name: string;
51
+ gitUrl: string;
52
+ defaultBranch: string;
53
+ checkoutPath?: string;
54
+ submodulePath?: string;
55
+ repositoryPolicy: SeedRepositoryPolicy;
56
+ metadata?: Record<string, unknown>;
57
+ }
58
+ export interface SeedProjectResource {
59
+ key: string;
60
+ team: string;
61
+ slug: string;
62
+ name: string;
63
+ description: string;
64
+ kind: string;
65
+ primaryRepository?: string;
66
+ libraryRepository: string;
67
+ metadata?: Record<string, unknown>;
68
+ }
69
+ export interface SeedCapacityProviderPrerequisite {
70
+ key: string;
71
+ team: string;
72
+ environments: SeedEnvironment[];
73
+ manifestDigest: `sha256:${string}`;
74
+ manifestRef: string;
75
+ approval: 'trusted-local-owner';
76
+ projects: string[];
77
+ allowedModes: Array<'planning' | 'acting'>;
78
+ requiredLanePurposes: ProviderLanePurpose[];
79
+ }
80
+ interface SeedBundleBody {
81
+ name: string;
82
+ version: number;
83
+ description: string;
84
+ environments: SeedEnvironment[];
85
+ digest: `sha256:${string}`;
86
+ resources: {
87
+ teams: SeedTeamResource[];
88
+ memberships: SeedMembershipResource[];
89
+ projects: SeedProjectResource[];
90
+ repositories: SeedRepositoryResource[];
91
+ };
92
+ runtime: {
93
+ capacityProviders: SeedCapacityProviderPrerequisite[];
94
+ };
95
+ }
96
+ export interface SeedBundleV3 extends SeedBundleBody {
97
+ schemaVersion: typeof SEED_BUNDLE_SCHEMA_VERSION;
98
+ }
99
+ /** Historical receipt shape. It is decodable, but cannot be planned or applied. */
100
+ export interface SeedBundleV2 extends Omit<SeedBundleBody, 'resources'> {
101
+ schemaVersion: typeof HISTORICAL_SEED_BUNDLE_SCHEMA_VERSION;
102
+ resources: Omit<SeedBundleBody['resources'], 'projects'> & {
103
+ projects: Array<Omit<SeedProjectResource, 'libraryRepository'> & {
104
+ libraryRepository?: string;
105
+ }>;
106
+ };
107
+ }
108
+ export type SeedBundle = SeedBundleV3 | SeedBundleV2;
109
+ export interface SeedResourceReceipt {
110
+ resourceKey: string;
111
+ action: 'create' | 'adopt' | 'update' | 'noop' | 'blocked';
112
+ resourceId?: string;
113
+ digest: `sha256:${string}`;
114
+ readBackAt?: string;
115
+ blockers?: string[];
116
+ }
117
+ export interface SeedReconciliationReceipt {
118
+ schemaVersion: 'treeseed.seed-reconciliation-receipt/v1';
119
+ runId: string;
120
+ seedName: string;
121
+ seedVersion: number;
122
+ seedDigest: `sha256:${string}`;
123
+ mode: 'plan' | 'apply' | 'verify';
124
+ status: 'planned' | 'waiting_provider' | 'verified' | 'blocked' | 'failed';
125
+ resources: SeedResourceReceipt[];
126
+ providerRequestIds: string[];
127
+ createdAt: string;
128
+ completedAt?: string;
129
+ }
130
+ export interface SeedBundleDiagnostic {
131
+ code: string;
132
+ path: string;
133
+ message: string;
134
+ }
135
+ export declare function canonicalSeedBundlePayload(bundle: Omit<SeedBundle, 'digest'> | SeedBundle): string;
136
+ export declare function digestSeedBundle(bundle: Omit<SeedBundle, 'digest'> | SeedBundle): Promise<`sha256:${string}`>;
137
+ export declare function validateSeedBundle(bundle: SeedBundle): SeedBundleDiagnostic[];
138
+ export {};
@@ -0,0 +1,68 @@
1
+ const SEED_BUNDLE_SCHEMA_VERSION = "treeseed.seed-bundle/v3";
2
+ const HISTORICAL_SEED_BUNDLE_SCHEMA_VERSION = "treeseed.seed-bundle/v2";
3
+ function text(value) {
4
+ return typeof value === "string" && value.trim().length > 0;
5
+ }
6
+ function canonical(value) {
7
+ if (Array.isArray(value)) return value.map(canonical);
8
+ if (!value || typeof value !== "object") return value;
9
+ return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, canonical(entry)]));
10
+ }
11
+ function canonicalSeedBundlePayload(bundle) {
12
+ const { digest: _digest, ...payload } = bundle;
13
+ return JSON.stringify(canonical(payload));
14
+ }
15
+ async function digestSeedBundle(bundle) {
16
+ const bytes = new TextEncoder().encode(canonicalSeedBundlePayload(bundle));
17
+ const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
18
+ return `sha256:${Array.from(new Uint8Array(digest), (value) => value.toString(16).padStart(2, "0")).join("")}`;
19
+ }
20
+ function validateSeedBundle(bundle) {
21
+ const diagnostics = [];
22
+ const add = (code, path, message) => diagnostics.push({ code, path, message });
23
+ if (bundle?.schemaVersion === HISTORICAL_SEED_BUNDLE_SCHEMA_VERSION) {
24
+ add("seed_bundle_v2_migration_required", "schemaVersion", `Historical v2 bundles remain readable but must be migrated to ${SEED_BUNDLE_SCHEMA_VERSION} before planning or apply.`);
25
+ } else if (bundle?.schemaVersion !== SEED_BUNDLE_SCHEMA_VERSION) {
26
+ add("seed_bundle_schema_invalid", "schemaVersion", `schemaVersion must be ${SEED_BUNDLE_SCHEMA_VERSION}.`);
27
+ }
28
+ if (!text(bundle?.name) || !Number.isInteger(bundle?.version) || bundle.version < 1) add("seed_bundle_identity_invalid", "name", "Seed name and positive version are required.");
29
+ if (!/^sha256:[a-f0-9]{64}$/u.test(bundle?.digest ?? "")) add("seed_bundle_digest_invalid", "digest", "Seed digest must be an exact SHA-256 digest.");
30
+ const teams = new Set((bundle?.resources?.teams ?? []).map((entry) => entry.key));
31
+ const projects = new Set((bundle?.resources?.projects ?? []).map((entry) => entry.key));
32
+ const repositories = new Set((bundle?.resources?.repositories ?? []).map((entry) => entry.key));
33
+ const allKeys = [...teams, ...projects, ...repositories, ...(bundle?.resources?.memberships ?? []).map((entry) => entry.key)];
34
+ if (new Set(allKeys).size !== allKeys.length) add("seed_bundle_resource_key_duplicate", "resources", "Every resource key must be globally unique.");
35
+ for (const [index, membership] of (bundle?.resources?.memberships ?? []).entries()) {
36
+ if (!teams.has(membership.team)) add("seed_bundle_membership_team_unknown", `resources.memberships[${index}].team`, "Membership references an unknown team.");
37
+ if (membership.principal.kind === "service-principal" && membership.principal.interactiveLogin !== false) add("seed_bundle_service_principal_interactive_forbidden", `resources.memberships[${index}].principal.interactiveLogin`, "Service principals cannot log in interactively.");
38
+ }
39
+ for (const [index, project] of (bundle?.resources?.projects ?? []).entries()) {
40
+ if (!teams.has(project.team)) add("seed_bundle_project_team_unknown", `resources.projects[${index}].team`, "Project references an unknown team.");
41
+ if (!project.primaryRepository && project.kind !== "content") add("seed_bundle_primary_repository_required", `resources.projects[${index}].primaryRepository`, "Non-content projects require a primary source repository.");
42
+ if (project.primaryRepository && !repositories.has(project.primaryRepository)) add("seed_bundle_primary_repository_unknown", `resources.projects[${index}].primaryRepository`, "Project primary repository is missing.");
43
+ if (!project.libraryRepository) add("seed_bundle_library_repository_required", `resources.projects[${index}].libraryRepository`, "Every project requires one library repository.");
44
+ if (project.libraryRepository && !repositories.has(project.libraryRepository)) add("seed_bundle_library_repository_unknown", `resources.projects[${index}].libraryRepository`, "Project library repository is missing.");
45
+ }
46
+ for (const [index, repository] of (bundle?.resources?.repositories ?? []).entries()) {
47
+ if (repository.role === "content") add("seed_bundle_content_repository_renamed", `resources.repositories[${index}].role`, "Repository-backed knowledge uses role library.");
48
+ }
49
+ for (const [index, project] of (bundle?.resources?.projects ?? []).entries()) {
50
+ const library = (bundle?.resources?.repositories ?? []).find((entry) => entry.key === project.libraryRepository);
51
+ if (library && (library.role !== "library" || library.project !== project.key)) add("seed_bundle_library_repository_mismatch", `resources.projects[${index}].libraryRepository`, "libraryRepository must reference a library-role repository owned by this project.");
52
+ const projectLibraries = (bundle?.resources?.repositories ?? []).filter((entry) => entry.project === project.key && entry.role === "library");
53
+ if (projectLibraries.length !== 1) add("seed_bundle_library_repository_count_invalid", `resources.projects[${index}].libraryRepository`, "Every project must declare exactly one library-role repository.");
54
+ }
55
+ for (const [index, provider] of (bundle?.runtime?.capacityProviders ?? []).entries()) {
56
+ if (!teams.has(provider.team)) add("seed_bundle_provider_team_unknown", `runtime.capacityProviders[${index}].team`, "Provider references an unknown team.");
57
+ for (const project of provider.projects) if (!projects.has(project)) add("seed_bundle_provider_project_unknown", `runtime.capacityProviders[${index}].projects`, `Provider references unknown project ${project}.`);
58
+ for (const purpose of ["communication", "platform", "workday"]) if (!provider.requiredLanePurposes.includes(purpose)) add("seed_bundle_provider_lane_required", `runtime.capacityProviders[${index}].requiredLanePurposes`, `Provider prerequisite requires the ${purpose} lane.`);
59
+ }
60
+ return diagnostics;
61
+ }
62
+ export {
63
+ HISTORICAL_SEED_BUNDLE_SCHEMA_VERSION,
64
+ SEED_BUNDLE_SCHEMA_VERSION,
65
+ canonicalSeedBundlePayload,
66
+ digestSeedBundle,
67
+ validateSeedBundle
68
+ };
@@ -1,28 +1,398 @@
1
- import { type WorkdayBorrowingEvidence } from './workday-profile.js';
1
+ import { type WorkdayAgentSelection } from '../agent-capacity/workday.js';
2
+ import { z } from 'zod';
3
+ export { normalizeWorkdayAgentSelection } from '../agent-capacity/workday.js';
4
+ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<"treeseed.workday-intent/v1">;
6
+ teamId: z.ZodString;
7
+ profileId: z.ZodString;
8
+ projects: z.ZodEffects<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>, any, any>;
9
+ executionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["simulation", "production"]>>>;
10
+ startsAt: z.ZodString;
11
+ endsAt: z.ZodOptional<z.ZodString>;
12
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
13
+ planningOnly: z.ZodOptional<z.ZodBoolean>;
14
+ objectiveFilters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
+ proposalIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
16
+ decisionIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
17
+ groupIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
18
+ continueFromWorkdayId: z.ZodOptional<z.ZodString>;
19
+ allocation: z.ZodOptional<z.ZodObject<{
20
+ planningPercent: z.ZodOptional<z.ZodNumber>;
21
+ allocationWeight: z.ZodOptional<z.ZodNumber>;
22
+ planningTurnMaximumSeconds: z.ZodOptional<z.ZodNumber>;
23
+ projectPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
24
+ agentClassPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
25
+ }, "strict", z.ZodTypeAny, {
26
+ planningPercent?: number | undefined;
27
+ allocationWeight?: number | undefined;
28
+ planningTurnMaximumSeconds?: number | undefined;
29
+ projectPercentages?: Record<string, number> | undefined;
30
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
31
+ }, {
32
+ planningPercent?: number | undefined;
33
+ allocationWeight?: number | undefined;
34
+ planningTurnMaximumSeconds?: number | undefined;
35
+ projectPercentages?: Record<string, number> | undefined;
36
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
37
+ }>>;
38
+ agentSelection: z.ZodOptional<z.ZodEffects<z.ZodObject<{
39
+ mode: z.ZodOptional<z.ZodLiteral<"intersection">>;
40
+ } & {
41
+ activityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["planning", "estimating", "reviewing", "reporting", "chat"]>, "many">>;
42
+ }, "strict", z.ZodTypeAny, {
43
+ mode?: "intersection" | undefined;
44
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
45
+ }, {
46
+ mode?: "intersection" | undefined;
47
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
48
+ }>, {
49
+ [x: string]: any;
50
+ }, {
51
+ [x: string]: any;
52
+ }>>;
53
+ operatorConstraints: z.ZodOptional<z.ZodObject<{
54
+ providerIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
55
+ maxConcurrency: z.ZodOptional<z.ZodNumber>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ providerIds?: string[] | undefined;
58
+ maxConcurrency?: number | undefined;
59
+ }, {
60
+ providerIds?: string[] | undefined;
61
+ maxConcurrency?: number | undefined;
62
+ }>>;
63
+ }, "strict", z.ZodTypeAny, {
64
+ schemaVersion: "treeseed.workday-intent/v1";
65
+ teamId: string;
66
+ profileId: string;
67
+ startsAt: string;
68
+ groupIds?: string[] | undefined;
69
+ durationSeconds?: number | undefined;
70
+ projects?: any;
71
+ executionMode?: "simulation" | "production" | undefined;
72
+ endsAt?: string | undefined;
73
+ planningOnly?: boolean | undefined;
74
+ objectiveFilters?: string[] | undefined;
75
+ proposalIds?: string[] | undefined;
76
+ decisionIds?: string[] | undefined;
77
+ continueFromWorkdayId?: string | undefined;
78
+ allocation?: {
79
+ planningPercent?: number | undefined;
80
+ allocationWeight?: number | undefined;
81
+ planningTurnMaximumSeconds?: number | undefined;
82
+ projectPercentages?: Record<string, number> | undefined;
83
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
84
+ } | undefined;
85
+ agentSelection?: {
86
+ [x: string]: any;
87
+ } | undefined;
88
+ operatorConstraints?: {
89
+ providerIds?: string[] | undefined;
90
+ maxConcurrency?: number | undefined;
91
+ } | undefined;
92
+ }, {
93
+ schemaVersion: "treeseed.workday-intent/v1";
94
+ teamId: string;
95
+ profileId: string;
96
+ startsAt: string;
97
+ groupIds?: string[] | undefined;
98
+ durationSeconds?: number | undefined;
99
+ projects?: any;
100
+ executionMode?: "simulation" | "production" | undefined;
101
+ endsAt?: string | undefined;
102
+ planningOnly?: boolean | undefined;
103
+ objectiveFilters?: string[] | undefined;
104
+ proposalIds?: string[] | undefined;
105
+ decisionIds?: string[] | undefined;
106
+ continueFromWorkdayId?: string | undefined;
107
+ allocation?: {
108
+ planningPercent?: number | undefined;
109
+ allocationWeight?: number | undefined;
110
+ planningTurnMaximumSeconds?: number | undefined;
111
+ projectPercentages?: Record<string, number> | undefined;
112
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
113
+ } | undefined;
114
+ agentSelection?: {
115
+ [x: string]: any;
116
+ } | undefined;
117
+ operatorConstraints?: {
118
+ providerIds?: string[] | undefined;
119
+ maxConcurrency?: number | undefined;
120
+ } | undefined;
121
+ }>, {
122
+ schemaVersion: "treeseed.workday-intent/v1";
123
+ teamId: string;
124
+ profileId: string;
125
+ startsAt: string;
126
+ groupIds?: string[] | undefined;
127
+ durationSeconds?: number | undefined;
128
+ projects?: any;
129
+ executionMode?: "simulation" | "production" | undefined;
130
+ endsAt?: string | undefined;
131
+ planningOnly?: boolean | undefined;
132
+ objectiveFilters?: string[] | undefined;
133
+ proposalIds?: string[] | undefined;
134
+ decisionIds?: string[] | undefined;
135
+ continueFromWorkdayId?: string | undefined;
136
+ allocation?: {
137
+ planningPercent?: number | undefined;
138
+ allocationWeight?: number | undefined;
139
+ planningTurnMaximumSeconds?: number | undefined;
140
+ projectPercentages?: Record<string, number> | undefined;
141
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
142
+ } | undefined;
143
+ agentSelection?: {
144
+ [x: string]: any;
145
+ } | undefined;
146
+ operatorConstraints?: {
147
+ providerIds?: string[] | undefined;
148
+ maxConcurrency?: number | undefined;
149
+ } | undefined;
150
+ }, {
151
+ schemaVersion: "treeseed.workday-intent/v1";
152
+ teamId: string;
153
+ profileId: string;
154
+ startsAt: string;
155
+ groupIds?: string[] | undefined;
156
+ durationSeconds?: number | undefined;
157
+ projects?: any;
158
+ executionMode?: "simulation" | "production" | undefined;
159
+ endsAt?: string | undefined;
160
+ planningOnly?: boolean | undefined;
161
+ objectiveFilters?: string[] | undefined;
162
+ proposalIds?: string[] | undefined;
163
+ decisionIds?: string[] | undefined;
164
+ continueFromWorkdayId?: string | undefined;
165
+ allocation?: {
166
+ planningPercent?: number | undefined;
167
+ allocationWeight?: number | undefined;
168
+ planningTurnMaximumSeconds?: number | undefined;
169
+ projectPercentages?: Record<string, number> | undefined;
170
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
171
+ } | undefined;
172
+ agentSelection?: {
173
+ [x: string]: any;
174
+ } | undefined;
175
+ operatorConstraints?: {
176
+ providerIds?: string[] | undefined;
177
+ maxConcurrency?: number | undefined;
178
+ } | undefined;
179
+ }>, any, any>;
180
+ /** Public request metadata is route-owned; every represented intent field retains its canonical rule. */
181
+ declare const requestIntentFields: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
182
+ schemaVersion: z.ZodOptional<z.ZodLiteral<"treeseed.workday-intent/v1">>;
183
+ groupIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
184
+ teamId: z.ZodOptional<z.ZodString>;
185
+ profileId: z.ZodString;
186
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
187
+ projects: z.ZodEffects<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>, any, any>;
188
+ executionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["simulation", "production"]>>>;
189
+ startsAt: z.ZodString;
190
+ endsAt: z.ZodOptional<z.ZodString>;
191
+ planningOnly: z.ZodOptional<z.ZodBoolean>;
192
+ objectiveFilters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
193
+ proposalIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
194
+ decisionIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
195
+ continueFromWorkdayId: z.ZodOptional<z.ZodString>;
196
+ allocation: z.ZodOptional<z.ZodObject<{
197
+ planningPercent: z.ZodOptional<z.ZodNumber>;
198
+ allocationWeight: z.ZodOptional<z.ZodNumber>;
199
+ planningTurnMaximumSeconds: z.ZodOptional<z.ZodNumber>;
200
+ projectPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
201
+ agentClassPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
202
+ }, "strict", z.ZodTypeAny, {
203
+ planningPercent?: number | undefined;
204
+ allocationWeight?: number | undefined;
205
+ planningTurnMaximumSeconds?: number | undefined;
206
+ projectPercentages?: Record<string, number> | undefined;
207
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
208
+ }, {
209
+ planningPercent?: number | undefined;
210
+ allocationWeight?: number | undefined;
211
+ planningTurnMaximumSeconds?: number | undefined;
212
+ projectPercentages?: Record<string, number> | undefined;
213
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
214
+ }>>;
215
+ agentSelection: z.ZodOptional<z.ZodEffects<z.ZodObject<{
216
+ mode: z.ZodOptional<z.ZodLiteral<"intersection">>;
217
+ } & {
218
+ activityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["planning", "estimating", "reviewing", "reporting", "chat"]>, "many">>;
219
+ }, "strict", z.ZodTypeAny, {
220
+ mode?: "intersection" | undefined;
221
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
222
+ }, {
223
+ mode?: "intersection" | undefined;
224
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
225
+ }>, {
226
+ [x: string]: any;
227
+ }, {
228
+ [x: string]: any;
229
+ }>>;
230
+ operatorConstraints: z.ZodOptional<z.ZodObject<{
231
+ providerIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
232
+ maxConcurrency: z.ZodOptional<z.ZodNumber>;
233
+ }, "strict", z.ZodTypeAny, {
234
+ providerIds?: string[] | undefined;
235
+ maxConcurrency?: number | undefined;
236
+ }, {
237
+ providerIds?: string[] | undefined;
238
+ maxConcurrency?: number | undefined;
239
+ }>>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ profileId: string;
242
+ startsAt: string;
243
+ schemaVersion?: "treeseed.workday-intent/v1" | undefined;
244
+ groupIds?: string[] | undefined;
245
+ teamId?: string | undefined;
246
+ durationSeconds?: number | undefined;
247
+ projects?: any;
248
+ executionMode?: "simulation" | "production" | undefined;
249
+ endsAt?: string | undefined;
250
+ planningOnly?: boolean | undefined;
251
+ objectiveFilters?: string[] | undefined;
252
+ proposalIds?: string[] | undefined;
253
+ decisionIds?: string[] | undefined;
254
+ continueFromWorkdayId?: string | undefined;
255
+ allocation?: {
256
+ planningPercent?: number | undefined;
257
+ allocationWeight?: number | undefined;
258
+ planningTurnMaximumSeconds?: number | undefined;
259
+ projectPercentages?: Record<string, number> | undefined;
260
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
261
+ } | undefined;
262
+ agentSelection?: {
263
+ [x: string]: any;
264
+ } | undefined;
265
+ operatorConstraints?: {
266
+ providerIds?: string[] | undefined;
267
+ maxConcurrency?: number | undefined;
268
+ } | undefined;
269
+ }, {
270
+ profileId: string;
271
+ startsAt: string;
272
+ schemaVersion?: "treeseed.workday-intent/v1" | undefined;
273
+ groupIds?: string[] | undefined;
274
+ teamId?: string | undefined;
275
+ durationSeconds?: number | undefined;
276
+ projects?: any;
277
+ executionMode?: "simulation" | "production" | undefined;
278
+ endsAt?: string | undefined;
279
+ planningOnly?: boolean | undefined;
280
+ objectiveFilters?: string[] | undefined;
281
+ proposalIds?: string[] | undefined;
282
+ decisionIds?: string[] | undefined;
283
+ continueFromWorkdayId?: string | undefined;
284
+ allocation?: {
285
+ planningPercent?: number | undefined;
286
+ allocationWeight?: number | undefined;
287
+ planningTurnMaximumSeconds?: number | undefined;
288
+ projectPercentages?: Record<string, number> | undefined;
289
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
290
+ } | undefined;
291
+ agentSelection?: {
292
+ [x: string]: any;
293
+ } | undefined;
294
+ operatorConstraints?: {
295
+ providerIds?: string[] | undefined;
296
+ maxConcurrency?: number | undefined;
297
+ } | undefined;
298
+ }>, {
299
+ profileId: string;
300
+ startsAt: string;
301
+ schemaVersion?: "treeseed.workday-intent/v1" | undefined;
302
+ groupIds?: string[] | undefined;
303
+ teamId?: string | undefined;
304
+ durationSeconds?: number | undefined;
305
+ projects?: any;
306
+ executionMode?: "simulation" | "production" | undefined;
307
+ endsAt?: string | undefined;
308
+ planningOnly?: boolean | undefined;
309
+ objectiveFilters?: string[] | undefined;
310
+ proposalIds?: string[] | undefined;
311
+ decisionIds?: string[] | undefined;
312
+ continueFromWorkdayId?: string | undefined;
313
+ allocation?: {
314
+ planningPercent?: number | undefined;
315
+ allocationWeight?: number | undefined;
316
+ planningTurnMaximumSeconds?: number | undefined;
317
+ projectPercentages?: Record<string, number> | undefined;
318
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
319
+ } | undefined;
320
+ agentSelection?: {
321
+ [x: string]: any;
322
+ } | undefined;
323
+ operatorConstraints?: {
324
+ providerIds?: string[] | undefined;
325
+ maxConcurrency?: number | undefined;
326
+ } | undefined;
327
+ }, {
328
+ profileId: string;
329
+ startsAt: string;
330
+ schemaVersion?: "treeseed.workday-intent/v1" | undefined;
331
+ groupIds?: string[] | undefined;
332
+ teamId?: string | undefined;
333
+ durationSeconds?: number | undefined;
334
+ projects?: any;
335
+ executionMode?: "simulation" | "production" | undefined;
336
+ endsAt?: string | undefined;
337
+ planningOnly?: boolean | undefined;
338
+ objectiveFilters?: string[] | undefined;
339
+ proposalIds?: string[] | undefined;
340
+ decisionIds?: string[] | undefined;
341
+ continueFromWorkdayId?: string | undefined;
342
+ allocation?: {
343
+ planningPercent?: number | undefined;
344
+ allocationWeight?: number | undefined;
345
+ planningTurnMaximumSeconds?: number | undefined;
346
+ projectPercentages?: Record<string, number> | undefined;
347
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
348
+ } | undefined;
349
+ agentSelection?: {
350
+ [x: string]: any;
351
+ } | undefined;
352
+ operatorConstraints?: {
353
+ providerIds?: string[] | undefined;
354
+ maxConcurrency?: number | undefined;
355
+ } | undefined;
356
+ }>, any, any>, any, unknown>, any, unknown>;
357
+ export declare const workdayIntentRequestSchema: z.ZodEffects<z.ZodType<Record<string, unknown>, z.ZodTypeDef, Record<string, unknown>>, Record<string, unknown>, Record<string, unknown>>;
2
358
  export type WorkdayDemandMode = 'planning' | 'acting';
3
359
  export interface WorkdayIntent {
4
360
  schemaVersion: 'treeseed.workday-intent/v1';
5
361
  teamId: string;
6
362
  profileId: string;
7
363
  projects: 'all' | string[];
364
+ /** Selects the existing execution custody mode; omission defaults safely to simulation. */
365
+ executionMode?: 'simulation' | 'production';
8
366
  startsAt: string;
9
367
  endsAt?: string;
10
368
  durationSeconds?: number;
11
369
  objectiveFilters?: string[];
370
+ /** Runs cooperative planning profiles without admitting accepted acting work. */
371
+ planningOnly?: boolean;
372
+ /** Selects exact governed proposals for cooperative planning and estimating. */
373
+ proposalIds?: string[];
374
+ /** Shared proposal groups; membership, never named-agent selection, supplies participants. */
375
+ groupIds?: string[];
376
+ /** Selects accepted decisions for API-derived acting work; it does not grant acting authority. */
377
+ decisionIds?: string[];
378
+ /** Continue exact accepted work from a settled workday; omission starts a fresh simulation. */
379
+ continueFromWorkdayId?: string;
380
+ /** Selects activity phases without excluding group participants by identity or class. */
381
+ agentSelection?: Partial<Pick<WorkdayAgentSelection, 'activityTypes' | 'mode'>>;
382
+ /** High-level overrides of the canonical workday allocation policy. */
383
+ allocation?: Partial<Pick<import('../agent-capacity/contracts/capacity/workdays/workday-allocation.js').WorkdayPolicy, 'planningPercent' | 'allocationWeight' | 'planningTurnMaximumSeconds' | 'projectPercentages' | 'agentClassPercentages'>>;
12
384
  operatorConstraints?: {
13
385
  providerIds?: string[];
14
386
  maxConcurrency?: number;
15
- reservePercent?: number;
16
387
  };
17
388
  }
18
389
  export interface WorkdayActingAuthorityEvidence {
19
390
  decisionId: string;
20
- decisionStatus: 'approved';
21
- executionInputId: string;
22
- executionInputStatus: 'accepted';
23
- estimateId: string;
24
- capacityPlanId: string;
25
- capacityPlanDigest: string;
391
+ decisionRevision: number;
392
+ executionNodeId: string;
393
+ executionNodeRevision: number;
394
+ graphRevision: number;
395
+ sourceDigest: string;
26
396
  }
27
397
  export interface WorkdaySelectedDemand {
28
398
  id: string;
@@ -38,8 +408,6 @@ export interface WorkdaySelectedDemand {
38
408
  export interface WorkdayClassAccounting {
39
409
  classSlug: string;
40
410
  allocatedSeconds: number;
41
- borrowedSeconds: number;
42
- lentSeconds: number;
43
411
  idleSeconds: number;
44
412
  reservedSeconds: number;
45
413
  activeSeconds: number;
@@ -61,11 +429,9 @@ export interface WorkdayPreflightReceipt {
61
429
  reservationDigest: string;
62
430
  selectedDemands: WorkdaySelectedDemand[];
63
431
  classAccounting: WorkdayClassAccounting[];
64
- borrowing: WorkdayBorrowingEvidence[];
65
432
  startsAt: string;
66
433
  endsAt: string;
67
434
  maxConcurrency: number;
68
- reserveSeconds: number;
69
435
  preflightDigest: string;
70
436
  expiresAt: string;
71
437
  }
@@ -87,28 +453,13 @@ export interface WorkdayStartReceipt {
87
453
  workdayId: string;
88
454
  preflightId: string;
89
455
  preflightDigest: string;
90
- acceptedCapacityPlanIds: string[];
456
+ acceptedExecutionNodeIds: string[];
91
457
  assignmentIds: string[];
92
458
  reservationIds: string[];
93
459
  startedAt: string;
94
460
  providerReceiptRefs: string[];
95
461
  transactionReceiptId: string;
96
462
  }
97
- export interface WorkdaySchedule {
98
- schemaVersion: 'treeseed.workday-schedule/v1';
99
- id: string;
100
- teamId: string;
101
- profileId: string;
102
- profileVersion: string;
103
- projectScope: 'all' | string[];
104
- cadence: {
105
- timezone: string;
106
- expression: string;
107
- };
108
- durationSeconds: number;
109
- status: 'active' | 'paused' | 'retired';
110
- nextStartAt: string | null;
111
- }
112
463
  export interface WorkdaySettlement {
113
464
  schemaVersion: 'treeseed.workday-settlement/v1';
114
465
  workdayId: string;
@@ -151,6 +502,10 @@ export interface WorkdayLifecycleDiagnostic {
151
502
  message: string;
152
503
  }
153
504
  export declare function validateWorkdayIntent(intent: WorkdayIntent): WorkdayLifecycleDiagnostic[];
505
+ /** Preserve raw caller evidence; normalize only legitimate selector input. */
506
+ export declare function normalizeWorkdayIntent(intent: WorkdayIntent): WorkdayIntent;
507
+ export declare function normalizeWorkdayIntent(intent: unknown, shape: 'request'): z.output<typeof requestIntentFields>;
508
+ export declare function validateWorkdayIntentSelection(value: unknown): WorkdayLifecycleDiagnostic[];
154
509
  export declare function validateSelectedDemand(demand: WorkdaySelectedDemand): WorkdayLifecycleDiagnostic[];
155
510
  export declare function validateWorkdayPreflight(receipt: WorkdayPreflightReceipt, now?: Date): WorkdayLifecycleDiagnostic[];
156
511
  export declare function validateWorkdayPreflightFreshness(receipt: WorkdayPreflightReceipt, observed: WorkdayPreflightObservation): WorkdayLifecycleDiagnostic[];