@treeseed/sdk 0.11.0 → 0.12.4

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 (473) hide show
  1. package/README.md +9 -4
  2. package/dist/agent-capacity.d.ts +916 -0
  3. package/dist/agent-capacity.js +1600 -0
  4. package/dist/agent-tools.d.ts +37 -0
  5. package/dist/agent-tools.js +301 -0
  6. package/dist/api/app.d.ts +1 -1
  7. package/dist/api/auth/d1-database.d.ts +2 -2
  8. package/dist/api/auth/d1-provider.d.ts +4 -4
  9. package/dist/api/auth/d1-store.d.ts +2 -2
  10. package/dist/api/auth/memory-provider.d.ts +1 -1
  11. package/dist/api/auth/tokens.d.ts +1 -1
  12. package/dist/api/config.d.ts +3 -1
  13. package/dist/api/config.js +34 -10
  14. package/dist/api/http.d.ts +2 -2
  15. package/dist/api/index.d.ts +10 -10
  16. package/dist/api/index.js +4 -2
  17. package/dist/api/operations-routes.d.ts +3 -3
  18. package/dist/api/operations.d.ts +1 -1
  19. package/dist/api/providers.d.ts +1 -1
  20. package/dist/api/providers.js +21 -4
  21. package/dist/api/railway.d.ts +3 -2
  22. package/dist/api/sdk-dispatch.d.ts +4 -4
  23. package/dist/api/sdk-routes.d.ts +2 -2
  24. package/dist/api/templates.d.ts +2 -2
  25. package/dist/api/types.d.ts +3 -2
  26. package/dist/capacity-provider.d.ts +117 -60
  27. package/dist/capacity-provider.js +215 -43
  28. package/dist/capacity.d.ts +2 -2
  29. package/dist/cli-tools.d.ts +1 -1
  30. package/dist/content-operations.d.ts +97 -0
  31. package/dist/content-operations.js +250 -0
  32. package/dist/content-store.d.ts +4 -4
  33. package/dist/control-plane-client.d.ts +13 -18
  34. package/dist/control-plane-client.js +8 -86
  35. package/dist/control-plane.d.ts +2 -2
  36. package/dist/copilot.d.ts +3 -0
  37. package/dist/copilot.js +16 -1
  38. package/dist/d1-http.d.ts +1 -1
  39. package/dist/d1-store.d.ts +32 -57
  40. package/dist/d1-store.js +115 -318
  41. package/dist/db/d1.d.ts +1 -232
  42. package/dist/db/index.d.ts +3 -3
  43. package/dist/db/market-schema.d.ts +49037 -11843
  44. package/dist/db/market-schema.js +1788 -50
  45. package/dist/db/node-sqlite.d.ts +1 -232
  46. package/dist/db/schema.d.ts +0 -462
  47. package/dist/db/schema.js +2 -22
  48. package/dist/dispatch.d.ts +1 -1
  49. package/dist/dispatch.js +0 -11
  50. package/dist/fixture-support.js +52 -4
  51. package/dist/governance.d.ts +133 -0
  52. package/dist/governance.js +285 -0
  53. package/dist/graph/build.d.ts +2 -2
  54. package/dist/graph/context-query-contracts.d.ts +1 -1
  55. package/dist/graph/dsl.d.ts +1 -1
  56. package/dist/graph/query.d.ts +4 -4
  57. package/dist/graph/ranking.d.ts +1 -1
  58. package/dist/graph/schema.d.ts +1 -1
  59. package/dist/graph.d.ts +11 -11
  60. package/dist/guarantees/index.d.ts +425 -0
  61. package/dist/guarantees/index.js +1146 -0
  62. package/dist/hosting/apps.d.ts +1 -1
  63. package/dist/hosting/builtins.d.ts +1 -1
  64. package/dist/hosting/builtins.js +9 -198
  65. package/dist/hosting/contracts.d.ts +3 -2
  66. package/dist/hosting/graph.d.ts +24 -21
  67. package/dist/hosting/graph.js +280 -294
  68. package/dist/hosting/index.d.ts +4 -4
  69. package/dist/index.d.ts +88 -74
  70. package/dist/index.js +81 -10
  71. package/dist/local-dev/managed-dev.d.ts +85 -0
  72. package/dist/local-dev/managed-dev.js +368 -0
  73. package/dist/managed-dependencies.d.ts +9 -0
  74. package/dist/managed-dependencies.js +10 -8
  75. package/dist/market-client.d.ts +265 -7
  76. package/dist/market-client.js +381 -9
  77. package/dist/model-registry.d.ts +1 -1
  78. package/dist/model-registry.js +19 -19
  79. package/dist/operations/agent-tools.d.ts +2 -11
  80. package/dist/operations/agent-tools.js +2 -14
  81. package/dist/operations/providers/default.d.ts +1 -1
  82. package/dist/operations/providers/default.js +20 -37
  83. package/dist/operations/repository-operations.d.ts +26 -2
  84. package/dist/operations/repository-operations.js +159 -1
  85. package/dist/operations/runtime.d.ts +3 -3
  86. package/dist/operations/services/bootstrap-runner.d.ts +1 -1
  87. package/dist/operations/services/build-warning-policy.d.ts +34 -0
  88. package/dist/operations/services/build-warning-policy.js +81 -82
  89. package/dist/operations/services/commit-message-provider.js +4 -4
  90. package/dist/operations/services/config-runtime.d.ts +73 -19
  91. package/dist/operations/services/config-runtime.js +276 -100
  92. package/dist/operations/services/deploy.d.ts +41 -622
  93. package/dist/operations/services/deploy.js +181 -213
  94. package/dist/operations/services/deployment-readiness.d.ts +1 -1
  95. package/dist/operations/services/deployment-readiness.js +38 -7
  96. package/dist/operations/services/git-remote-policy.js +12 -4
  97. package/dist/operations/services/git-runner.d.ts +66 -0
  98. package/dist/operations/services/git-runner.js +479 -0
  99. package/dist/operations/services/git-workflow.d.ts +43 -5
  100. package/dist/operations/services/git-workflow.js +242 -20
  101. package/dist/operations/services/github-actions-verification.d.ts +3 -1
  102. package/dist/operations/services/github-actions-verification.js +11 -3
  103. package/dist/operations/services/github-api.js +21 -5
  104. package/dist/operations/services/github-automation.d.ts +3 -3
  105. package/dist/operations/services/github-automation.js +15 -18
  106. package/dist/operations/services/github-credentials.js +2 -1
  107. package/dist/operations/services/hosted-service-checks.d.ts +19 -1
  108. package/dist/operations/services/hosted-service-checks.js +162 -11
  109. package/dist/operations/services/hosting-audit.d.ts +2 -2
  110. package/dist/operations/services/hosting-audit.js +7 -7
  111. package/dist/operations/services/hub-launch.d.ts +1 -1
  112. package/dist/operations/services/hub-provider-launch.d.ts +5 -5
  113. package/dist/operations/services/hub-provider-launch.js +19 -14
  114. package/dist/operations/services/live-hosted-service-checks.d.ts +2 -1
  115. package/dist/operations/services/live-hosted-service-checks.js +193 -80
  116. package/dist/operations/services/local-dev.js +0 -1
  117. package/dist/operations/services/managed-host-security.d.ts +1 -1
  118. package/dist/operations/services/managed-repositories.d.ts +37 -0
  119. package/dist/operations/services/managed-repositories.js +177 -0
  120. package/dist/operations/services/operations-runner-smoke.d.ts +3 -2
  121. package/dist/operations/services/operations-runner-smoke.js +22 -4
  122. package/dist/operations/services/package-adapters.d.ts +77 -2
  123. package/dist/operations/services/package-adapters.js +627 -56
  124. package/dist/operations/services/package-reference-policy.d.ts +12 -88
  125. package/dist/operations/services/package-reference-policy.js +81 -213
  126. package/dist/operations/services/project-host-operations.d.ts +4 -4
  127. package/dist/operations/services/project-platform.d.ts +19 -193
  128. package/dist/operations/services/project-platform.js +31 -103
  129. package/dist/operations/services/project-web-monitor.d.ts +2 -2
  130. package/dist/operations/services/project-web-monitor.js +97 -2
  131. package/dist/operations/services/railway-api.d.ts +36 -7
  132. package/dist/operations/services/railway-api.js +331 -100
  133. package/dist/operations/services/railway-deploy.d.ts +7 -95
  134. package/dist/operations/services/railway-deploy.js +334 -742
  135. package/dist/operations/services/release-history.js +3 -4
  136. package/dist/operations/services/release-proof-ledger.d.ts +13 -0
  137. package/dist/operations/services/release-proof-ledger.js +81 -0
  138. package/dist/operations/services/release-proof-planner.d.ts +48 -0
  139. package/dist/operations/services/release-proof-planner.js +195 -0
  140. package/dist/operations/services/release-proof-runner.d.ts +16 -0
  141. package/dist/operations/services/release-proof-runner.js +169 -0
  142. package/dist/operations/services/release-proof.d.ts +81 -0
  143. package/dist/operations/services/release-proof.js +79 -0
  144. package/dist/operations/services/repository-save-orchestrator.d.ts +6 -7
  145. package/dist/operations/services/repository-save-orchestrator.js +353 -174
  146. package/dist/operations/services/runtime-paths.d.ts +1 -3
  147. package/dist/operations/services/runtime-paths.js +0 -4
  148. package/dist/operations/services/runtime-tools.d.ts +1 -192
  149. package/dist/operations/services/runtime-tools.js +4 -444
  150. package/dist/operations/services/save-deploy-preflight.js +9 -1
  151. package/dist/operations/services/template-host-bindings.d.ts +2 -2
  152. package/dist/operations/services/template-host-bindings.js +3 -2
  153. package/dist/operations/services/template-registry.d.ts +6 -6
  154. package/dist/operations/services/template-registry.js +33 -14
  155. package/dist/operations/services/template-secret-sync.d.ts +3 -3
  156. package/dist/operations/services/workflow-timing.d.ts +25 -0
  157. package/dist/operations/services/workflow-timing.js +79 -0
  158. package/dist/operations/services/workspace-dependency-mode.js +41 -4
  159. package/dist/operations/services/workspace-preflight.js +8 -8
  160. package/dist/operations/services/workspace-save-script.d.ts +4 -4
  161. package/dist/operations/services/workspace-save.d.ts +1 -0
  162. package/dist/operations/services/workspace-save.js +41 -18
  163. package/dist/operations/services/workspace-tools.js +40 -6
  164. package/dist/operations-registry.d.ts +1 -1
  165. package/dist/operations-registry.js +5 -6
  166. package/dist/operations-types.d.ts +1 -1
  167. package/dist/operations.d.ts +17 -11
  168. package/dist/operations.js +57 -3
  169. package/dist/platform/book-export.js +2 -0
  170. package/dist/platform/books-data.d.ts +1 -1
  171. package/dist/platform/config.d.ts +27 -0
  172. package/dist/platform/config.js +100 -0
  173. package/dist/platform/content-runtime-source.d.ts +54 -0
  174. package/dist/platform/content-runtime-source.js +169 -0
  175. package/dist/platform/contracts.d.ts +6 -1
  176. package/dist/platform/deploy-config.d.ts +1 -1
  177. package/dist/platform/deploy-config.js +7 -1
  178. package/dist/platform/deploy-runtime.d.ts +1 -1
  179. package/dist/platform/desired-state.d.ts +63 -0
  180. package/dist/platform/desired-state.js +1021 -0
  181. package/dist/platform/env.yaml +414 -19
  182. package/dist/platform/environment.d.ts +2 -2
  183. package/dist/platform/environment.js +54 -22
  184. package/dist/platform/local-content-materialization.d.ts +9 -0
  185. package/dist/platform/local-content-materialization.js +212 -0
  186. package/dist/platform/plugin.d.ts +5 -5
  187. package/dist/platform/plugins/runtime.d.ts +3 -3
  188. package/dist/platform/plugins/runtime.js +62 -1
  189. package/dist/platform/plugins.d.ts +6 -6
  190. package/dist/platform/published-content-pipeline.d.ts +3 -3
  191. package/dist/platform/published-content-pipeline.js +5 -1
  192. package/dist/platform/published-content.d.ts +4 -3
  193. package/dist/platform/site-config-schema.d.ts +1 -0
  194. package/dist/platform/site-config-schema.js +4 -1
  195. package/dist/platform/tenant/runtime-config.d.ts +152 -2
  196. package/dist/platform/tenant-config.d.ts +1 -1
  197. package/dist/platform/utils/site-config-schema.d.ts +154 -0
  198. package/dist/platform/utils/site-config-schema.js +400 -461
  199. package/dist/platform-operation-store.d.ts +1 -1
  200. package/dist/plugin-default.d.ts +1 -1
  201. package/dist/plugin-default.js +27 -12
  202. package/dist/project-import.d.ts +91 -0
  203. package/dist/project-import.js +257 -0
  204. package/dist/project-workflow.d.ts +1 -1
  205. package/dist/reconcile/bootstrap-systems.d.ts +2 -2
  206. package/dist/reconcile/bootstrap-systems.js +3 -3
  207. package/dist/reconcile/builtin-adapters.d.ts +7 -1
  208. package/dist/reconcile/builtin-adapters.js +2924 -346
  209. package/dist/reconcile/contracts.d.ts +15 -2
  210. package/dist/reconcile/desired-state.d.ts +2 -193
  211. package/dist/reconcile/desired-state.js +24 -33
  212. package/dist/reconcile/engine.d.ts +60 -397
  213. package/dist/reconcile/engine.js +182 -18
  214. package/dist/reconcile/index.d.ts +10 -10
  215. package/dist/reconcile/live-acceptance.d.ts +22 -1
  216. package/dist/reconcile/live-acceptance.js +456 -44
  217. package/dist/reconcile/providers/docker-private.d.ts +54 -0
  218. package/dist/reconcile/providers/docker-private.js +101 -0
  219. package/dist/reconcile/providers/github-private.d.ts +65 -0
  220. package/dist/reconcile/providers/github-private.js +119 -0
  221. package/dist/reconcile/providers/local-private.d.ts +28 -0
  222. package/dist/reconcile/providers/local-private.js +75 -0
  223. package/dist/reconcile/providers/railway-iac.d.ts +66 -0
  224. package/dist/reconcile/providers/railway-iac.js +275 -0
  225. package/dist/reconcile/providers/release-private.d.ts +92 -0
  226. package/dist/reconcile/providers/release-private.js +152 -0
  227. package/dist/reconcile/registry.d.ts +2 -2
  228. package/dist/reconcile/registry.js +16 -1
  229. package/dist/reconcile/state.d.ts +1 -1
  230. package/dist/reconcile/state.js +3 -40
  231. package/dist/reconcile/units.d.ts +1 -1
  232. package/dist/reconcile/units.js +7 -1
  233. package/dist/remote.d.ts +6 -6
  234. package/dist/scenes/artifacts.d.ts +16 -0
  235. package/dist/scenes/artifacts.js +61 -0
  236. package/dist/scenes/auth.d.ts +2 -0
  237. package/dist/scenes/auth.js +28 -0
  238. package/dist/scenes/base-url.d.ts +12 -0
  239. package/dist/scenes/base-url.js +123 -0
  240. package/dist/scenes/builtin-plugins.d.ts +2 -0
  241. package/dist/scenes/builtin-plugins.js +447 -0
  242. package/dist/scenes/checkpoints.d.ts +14 -0
  243. package/dist/scenes/checkpoints.js +33 -0
  244. package/dist/scenes/device-matrix.d.ts +2 -0
  245. package/dist/scenes/device-matrix.js +97 -0
  246. package/dist/scenes/devices.d.ts +11 -0
  247. package/dist/scenes/devices.js +22 -0
  248. package/dist/scenes/diagnostics.d.ts +5 -0
  249. package/dist/scenes/diagnostics.js +22 -0
  250. package/dist/scenes/diagram-providers.d.ts +2 -0
  251. package/dist/scenes/diagram-providers.js +181 -0
  252. package/dist/scenes/diagram-validation.d.ts +22 -0
  253. package/dist/scenes/diagram-validation.js +74 -0
  254. package/dist/scenes/environment.d.ts +2 -0
  255. package/dist/scenes/environment.js +65 -0
  256. package/dist/scenes/evidence-bundle.d.ts +5 -0
  257. package/dist/scenes/evidence-bundle.js +42 -0
  258. package/dist/scenes/evidence-report.d.ts +10 -0
  259. package/dist/scenes/evidence-report.js +73 -0
  260. package/dist/scenes/evidence.d.ts +16 -0
  261. package/dist/scenes/evidence.js +277 -0
  262. package/dist/scenes/index.d.ts +48 -0
  263. package/dist/scenes/index.js +312 -0
  264. package/dist/scenes/inspect.d.ts +9 -0
  265. package/dist/scenes/inspect.js +64 -0
  266. package/dist/scenes/loader.d.ts +3 -0
  267. package/dist/scenes/loader.js +38 -0
  268. package/dist/scenes/logs.d.ts +2 -0
  269. package/dist/scenes/logs.js +47 -0
  270. package/dist/scenes/operations.d.ts +3 -0
  271. package/dist/scenes/operations.js +128 -0
  272. package/dist/scenes/phase0.d.ts +9 -0
  273. package/dist/scenes/phase0.js +637 -0
  274. package/dist/scenes/planner.d.ts +12 -0
  275. package/dist/scenes/planner.js +166 -0
  276. package/dist/scenes/playwright-adapter.d.ts +2 -0
  277. package/dist/scenes/playwright-adapter.js +63 -0
  278. package/dist/scenes/plugins.d.ts +5 -0
  279. package/dist/scenes/plugins.js +115 -0
  280. package/dist/scenes/progress.d.ts +17 -0
  281. package/dist/scenes/progress.js +24 -0
  282. package/dist/scenes/publish-destinations.d.ts +12 -0
  283. package/dist/scenes/publish-destinations.js +99 -0
  284. package/dist/scenes/publish-plan-report.d.ts +10 -0
  285. package/dist/scenes/publish-plan-report.js +70 -0
  286. package/dist/scenes/publish-plan.d.ts +15 -0
  287. package/dist/scenes/publish-plan.js +248 -0
  288. package/dist/scenes/publish-redaction.d.ts +16 -0
  289. package/dist/scenes/publish-redaction.js +148 -0
  290. package/dist/scenes/publish-release-record.d.ts +13 -0
  291. package/dist/scenes/publish-release-record.js +34 -0
  292. package/dist/scenes/publish-report.d.ts +10 -0
  293. package/dist/scenes/publish-report.js +67 -0
  294. package/dist/scenes/publish.d.ts +16 -0
  295. package/dist/scenes/publish.js +298 -0
  296. package/dist/scenes/registry.d.ts +12 -0
  297. package/dist/scenes/registry.js +65 -0
  298. package/dist/scenes/remotion-adapter.d.ts +3 -0
  299. package/dist/scenes/remotion-adapter.js +94 -0
  300. package/dist/scenes/remotion-composition-registry.d.ts +2 -0
  301. package/dist/scenes/remotion-composition-registry.js +12 -0
  302. package/dist/scenes/remotion-compositions.d.ts +15 -0
  303. package/dist/scenes/remotion-compositions.js +464 -0
  304. package/dist/scenes/remotion-diagrams.d.ts +9 -0
  305. package/dist/scenes/remotion-diagrams.js +188 -0
  306. package/dist/scenes/remotion-input.d.ts +13 -0
  307. package/dist/scenes/remotion-input.js +291 -0
  308. package/dist/scenes/remotion-visuals.d.ts +29 -0
  309. package/dist/scenes/remotion-visuals.js +198 -0
  310. package/dist/scenes/render-media-assets.d.ts +9 -0
  311. package/dist/scenes/render-media-assets.js +117 -0
  312. package/dist/scenes/render-report.d.ts +10 -0
  313. package/dist/scenes/render-report.js +27 -0
  314. package/dist/scenes/render.d.ts +2 -0
  315. package/dist/scenes/render.js +218 -0
  316. package/dist/scenes/reporter.d.ts +3 -0
  317. package/dist/scenes/reporter.js +101 -0
  318. package/dist/scenes/resume.d.ts +2 -0
  319. package/dist/scenes/resume.js +79 -0
  320. package/dist/scenes/runner.d.ts +2 -0
  321. package/dist/scenes/runner.js +674 -0
  322. package/dist/scenes/schema.d.ts +6 -0
  323. package/dist/scenes/schema.js +994 -0
  324. package/dist/scenes/seed.d.ts +2 -0
  325. package/dist/scenes/seed.js +83 -0
  326. package/dist/scenes/segments.d.ts +15 -0
  327. package/dist/scenes/segments.js +79 -0
  328. package/dist/scenes/selectors.d.ts +3 -0
  329. package/dist/scenes/selectors.js +21 -0
  330. package/dist/scenes/timeline.d.ts +11 -0
  331. package/dist/scenes/timeline.js +26 -0
  332. package/dist/scenes/timeouts.d.ts +6 -0
  333. package/dist/scenes/timeouts.js +17 -0
  334. package/dist/scenes/training-captions.d.ts +14 -0
  335. package/dist/scenes/training-captions.js +98 -0
  336. package/dist/scenes/training-report.d.ts +10 -0
  337. package/dist/scenes/training-report.js +78 -0
  338. package/dist/scenes/training-transcript.d.ts +24 -0
  339. package/dist/scenes/training-transcript.js +204 -0
  340. package/dist/scenes/training.d.ts +10 -0
  341. package/dist/scenes/training.js +134 -0
  342. package/dist/scenes/types.d.ts +1872 -0
  343. package/dist/scenes/types.js +8 -0
  344. package/dist/scenes/visual-audit-contact-sheets.d.ts +6 -0
  345. package/dist/scenes/visual-audit-contact-sheets.js +119 -0
  346. package/dist/scenes/visual-audit-fixtures.d.ts +25 -0
  347. package/dist/scenes/visual-audit-fixtures.js +210 -0
  348. package/dist/scenes/visual-audit-report.d.ts +11 -0
  349. package/dist/scenes/visual-audit-report.js +85 -0
  350. package/dist/scenes/visual-audit-review.d.ts +23 -0
  351. package/dist/scenes/visual-audit-review.js +829 -0
  352. package/dist/scenes/visual-audit-routes.d.ts +13 -0
  353. package/dist/scenes/visual-audit-routes.js +308 -0
  354. package/dist/scenes/visual-audit.d.ts +3 -0
  355. package/dist/scenes/visual-audit.js +596 -0
  356. package/dist/scripts/build-dist.js +154 -40
  357. package/dist/scripts/check-build-warnings.js +42 -53
  358. package/dist/scripts/cleanup-markdown.js +1 -1
  359. package/dist/scripts/cli-test-fixtures.js +24 -28
  360. package/dist/scripts/migrate-journey-csv-to-guarantees.js +140 -0
  361. package/dist/scripts/package-tools.js +12 -1
  362. package/dist/scripts/prepare.js +3 -7
  363. package/dist/scripts/release-verify.js +2 -5
  364. package/dist/scripts/run-fixture-astro-command.js +1 -1
  365. package/dist/scripts/template-catalog.test.js +68 -82
  366. package/dist/scripts/tenant-dev.js +0 -10
  367. package/dist/scripts/test-cloudflare-local.js +1 -1
  368. package/dist/scripts/test-scaffold.js +0 -1
  369. package/dist/scripts/test-smoke.js +3 -3
  370. package/dist/scripts/treeseed-build-dist.js +4 -7
  371. package/dist/scripts/treeseed-release-verify.js +1 -1
  372. package/dist/scripts/verify-driver.js +30 -21
  373. package/dist/scripts/workflow-commands.test.js +18 -27
  374. package/dist/scripts/workspace-command-e2e.js +1 -1
  375. package/dist/scripts/workspace-lint.js +6 -0
  376. package/dist/scripts/workspace-release-test.js +90 -1
  377. package/dist/scripts/workspace-test.js +6 -0
  378. package/dist/sdk-dispatch.d.ts +1 -1
  379. package/dist/sdk-dispatch.js +0 -16
  380. package/dist/sdk-fields.d.ts +1 -1
  381. package/dist/sdk-filters.d.ts +1 -1
  382. package/dist/sdk-types.d.ts +1184 -113
  383. package/dist/sdk-types.js +393 -0
  384. package/dist/sdk.d.ts +74 -79
  385. package/dist/sdk.js +27 -36
  386. package/dist/secrets-capability.d.ts +421 -0
  387. package/dist/secrets-capability.js +530 -0
  388. package/dist/seeds/normalize.js +1 -0
  389. package/dist/seeds/planner.js +38 -0
  390. package/dist/seeds/schema.js +293 -4
  391. package/dist/seeds/types.d.ts +60 -0
  392. package/dist/seeds/types.js +9 -1
  393. package/dist/service-credentials.d.ts +54 -0
  394. package/dist/service-credentials.js +112 -0
  395. package/dist/stores/cursor-store.d.ts +2 -2
  396. package/dist/stores/envelopes.d.ts +1 -1
  397. package/dist/stores/helpers.d.ts +1 -1
  398. package/dist/stores/lease-store.d.ts +2 -2
  399. package/dist/stores/message-store.d.ts +2 -2
  400. package/dist/stores/operational-store.d.ts +3 -26
  401. package/dist/stores/operational-store.js +0 -225
  402. package/dist/stores/project-workflow-store.d.ts +2 -2
  403. package/dist/stores/run-store.d.ts +2 -3
  404. package/dist/stores/run-store.js +0 -98
  405. package/dist/stores/subscription-store.d.ts +2 -3
  406. package/dist/stores/subscription-store.js +0 -100
  407. package/dist/template-catalog.d.ts +1 -1
  408. package/dist/template-launch-requirements.d.ts +2 -2
  409. package/dist/template-launch-ui.d.ts +2 -2
  410. package/dist/treedx/adapters.d.ts +6 -6
  411. package/dist/treedx/client.d.ts +1 -1
  412. package/dist/treedx/errors.d.ts +1 -1
  413. package/dist/treedx/federated-client.d.ts +3 -3
  414. package/dist/treedx/graph-adapter.d.ts +2 -2
  415. package/dist/treedx/index.d.ts +14 -14
  416. package/dist/treedx/market-integration.d.ts +1 -1
  417. package/dist/treedx/ports.d.ts +30 -30
  418. package/dist/treedx/query-adapter.d.ts +3 -3
  419. package/dist/treedx/registry-client.d.ts +2 -2
  420. package/dist/treedx/repository-adapter.d.ts +4 -4
  421. package/dist/treedx/repository-adapter.js +14 -3
  422. package/dist/treedx/sdk-integration.d.ts +3 -3
  423. package/dist/treedx/types.d.ts +2 -2
  424. package/dist/treedx/workspace-adapter.d.ts +2 -2
  425. package/dist/treedx-backends.d.ts +13 -11
  426. package/dist/treedx-backends.js +52 -50
  427. package/dist/treedx-client.d.ts +3 -0
  428. package/dist/treedx-client.js +10 -1
  429. package/dist/treeseed/services/compose.yml +2 -3
  430. package/dist/treeseed/template-catalog/catalog.fixture.json +4 -4
  431. package/dist/types/agents.d.ts +256 -0
  432. package/dist/types/agents.js +42 -1
  433. package/dist/verification.d.ts +1 -0
  434. package/dist/verification.js +143 -14
  435. package/dist/workflow/operations.d.ts +510 -559
  436. package/dist/workflow/operations.js +1891 -1342
  437. package/dist/workflow/policy.js +19 -7
  438. package/dist/workflow/runs.d.ts +9 -3
  439. package/dist/workflow/runs.js +66 -26
  440. package/dist/workflow/session.d.ts +4 -1
  441. package/dist/workflow/session.js +50 -10
  442. package/dist/workflow/worktrees.d.ts +6 -2
  443. package/dist/workflow/worktrees.js +98 -15
  444. package/dist/workflow-state.d.ts +5 -5
  445. package/dist/workflow-state.js +27 -17
  446. package/dist/workflow-support.d.ts +26 -25
  447. package/dist/workflow-support.js +27 -31
  448. package/dist/workflow.d.ts +46 -16
  449. package/dist/workflow.js +19 -7
  450. package/drizzle/d1/0000_treeseed_d1.sql +0 -18
  451. package/drizzle/market/0000_market_control_plane.sql +1793 -1499
  452. package/drizzle/market/0005_agent_capacity_coordination.sql +145 -0
  453. package/drizzle/market/0006_provider_assignment_lifecycle.sql +9 -0
  454. package/drizzle/market/0007_agent_architecture_gap_closure.sql +157 -0
  455. package/drizzle/market/0008_agent_capacity_operational_closure.sql +27 -0
  456. package/drizzle/market/0009_agent_capacity_runtime_hardening.sql +29 -0
  457. package/drizzle/market/0010_secrets_capability_persistence.sql +130 -0
  458. package/drizzle/market/0011_github_app_adapter.sql +47 -0
  459. package/drizzle/market/0012_workday_test_runs.sql +44 -0
  460. package/drizzle/market/0013_runtime_task_lifecycle.sql +39 -0
  461. package/drizzle/market/0014_governance_pipeline.sql +189 -0
  462. package/package.json +75 -18
  463. package/scripts/{verify-driver.mjs → verify-driver.ts} +19 -4
  464. package/templates/github/deploy-web.workflow.yml +12 -8
  465. package/dist/operations/services/mailpit-runtime.d.ts +0 -20
  466. package/dist/operations/services/mailpit-runtime.js +0 -67
  467. package/dist/operations/services/release-candidate.d.ts +0 -60
  468. package/dist/operations/services/release-candidate.js +0 -953
  469. package/dist/scripts/ensure-mailpit.js +0 -48
  470. package/dist/scripts/logs-mailpit.js +0 -2
  471. package/dist/scripts/run-ts.js +0 -45
  472. package/dist/scripts/stop-mailpit.js +0 -5
  473. package/dist/scripts/treeseed-run-ts.js +0 -45
@@ -1,4 +1,4 @@
1
- import type { TreeseedFieldAliasBinding } from './field-aliases.ts';
1
+ import type { TreeseedFieldAliasBinding } from './field-aliases.js';
2
2
  export declare const SDK_MODEL_NAMES: readonly ["page", "note", "question", "proposal", "decision", "book", "knowledge", "objective", "person", "subscription", "message", "agent", "agent_run", "agent_cursor", "content_lease", "work_day", "task", "task_event", "task_output", "graph_run", "report", "approval_request", "team_inbox_item", "workday_manager_lease", "worker_runner", "repository_claim"];
3
3
  export declare const SDK_OPERATIONS: readonly ["get", "read", "search", "follow", "pick", "create", "update"];
4
4
  export declare const SDK_STORAGE_BACKENDS: readonly ["content", "d1"];
@@ -65,7 +65,7 @@ export type ProjectDeploymentEnvironment = (typeof PROJECT_DEPLOYMENT_ENVIRONMEN
65
65
  export type ProjectDeploymentStatus = (typeof PROJECT_DEPLOYMENT_STATUSES)[number];
66
66
  export type ProjectWebMonitorStatus = 'healthy' | 'degraded' | 'failed' | 'unknown';
67
67
  export type ProjectWebMonitorCheckStatus = 'passed' | 'warning' | 'failed' | 'skipped';
68
- export type ProjectWebMonitorCheckSource = 'market' | 'github' | 'cloudflare' | 'http' | 'sdk' | 'treedx';
68
+ export type ProjectWebMonitorCheckSource = 'market' | 'github' | 'cloudflare' | 'http' | 'sdk' | 'treedx' | 'r2';
69
69
  export type ProjectInfrastructureResourceProvider = (typeof PROJECT_INFRA_RESOURCE_PROVIDERS)[number];
70
70
  export type ProjectInfrastructureResourceKind = (typeof PROJECT_INFRA_RESOURCE_KINDS)[number];
71
71
  export type AgentPoolStatus = (typeof AGENT_POOL_STATUSES)[number];
@@ -325,7 +325,1108 @@ export interface ProjectConnection {
325
325
  updatedAt: string;
326
326
  metadata?: Record<string, unknown>;
327
327
  }
328
- export type CatalogItemOfferMode = 'free' | 'paid' | 'contact' | 'one_time_current_version' | 'subscription_updates' | 'private';
328
+ export declare const COMMERCE_PRODUCT_KINDS: readonly ["template", "knowledge_pack", "ui_library", "admin_interface", "api_platform", "hosted_project", "professional_hosting", "scoped_service", "capacity_listing"];
329
+ export type CommerceProductKind = typeof COMMERCE_PRODUCT_KINDS[number];
330
+ export declare const COMMERCE_OFFER_MODES: readonly ["free", "private", "contact", "one_time", "one_time_current_version", "subscription", "subscription_updates", "professional_hosting", "scoped_contract", "external"];
331
+ export type CommerceOfferMode = typeof COMMERCE_OFFER_MODES[number];
332
+ export type CatalogItemOfferMode = CommerceOfferMode;
333
+ export declare const COMMERCE_VENDOR_TRUST_LEVELS: readonly ["public_publisher", "verified_seller", "trusted_service_vendor", "trusted_capacity_vendor", "integration_partner"];
334
+ export type CommerceVendorTrustLevel = typeof COMMERCE_VENDOR_TRUST_LEVELS[number];
335
+ export declare const COMMERCE_GOVERNANCE_STATES: readonly ["draft", "submitted", "approved", "rejected", "suspended", "archived"];
336
+ export type CommerceGovernanceState = typeof COMMERCE_GOVERNANCE_STATES[number];
337
+ export declare const COMMERCE_ENTITLEMENT_STATUSES: readonly ["pending", "active", "past_due", "expired", "revoked", "refunded", "canceled"];
338
+ export type CommerceEntitlementStatus = typeof COMMERCE_ENTITLEMENT_STATUSES[number];
339
+ export declare const COMMERCE_OWNERSHIP_MODELS: readonly ["team_owned", "individual_contributor_owned", "multi_contributor_attributed", "steward_maintained", "cooperative_owned", "community_governed", "foundation_or_trust_held", "transferred_or_succeeded"];
340
+ export type CommerceOwnershipModel = typeof COMMERCE_OWNERSHIP_MODELS[number];
341
+ export declare const COMMERCE_STEWARDSHIP_ROLES: readonly ["owner", "seller", "maintainer", "governance_steward", "support_steward", "security_steward", "community_steward", "successor"];
342
+ export type CommerceStewardshipRole = typeof COMMERCE_STEWARDSHIP_ROLES[number];
343
+ export declare const COMMERCE_OWNERSHIP_TRANSFER_STATUSES: readonly ["draft", "submitted", "approved", "rejected", "canceled", "superseded"];
344
+ export type CommerceOwnershipTransferStatus = typeof COMMERCE_OWNERSHIP_TRANSFER_STATUSES[number];
345
+ export declare const COMMERCE_SUCCESSION_EVENT_TYPES: readonly ["successor_named", "successor_accepted", "succession_triggered", "succession_completed", "succession_canceled"];
346
+ export type CommerceSuccessionEventType = typeof COMMERCE_SUCCESSION_EVENT_TYPES[number];
347
+ export declare const COMMERCE_GOVERNANCE_DECISION_TYPES: readonly ["ownership_record", "stewardship_assignment", "contribution", "governance_policy", "ownership_transfer", "succession"];
348
+ export type CommerceGovernanceDecisionType = typeof COMMERCE_GOVERNANCE_DECISION_TYPES[number];
349
+ export declare const COMMONS_PARTICIPANT_STATUSES: readonly ["active", "limited", "suspended", "archived"];
350
+ export type CommonsParticipantStatus = typeof COMMONS_PARTICIPANT_STATUSES[number];
351
+ export declare const COMMONS_PROPOSAL_STATUSES: readonly ["draft", "submitted", "backing", "qualified", "under_review", "voting", "accepted", "rejected", "deferred", "implemented", "archived"];
352
+ export type CommonsProposalStatus = typeof COMMONS_PROPOSAL_STATUSES[number];
353
+ export declare const COMMONS_QUESTION_STATUSES: readonly ["open", "answered", "converted_to_proposal", "archived"];
354
+ export type CommonsQuestionStatus = typeof COMMONS_QUESTION_STATUSES[number];
355
+ export declare const COMMONS_VOTE_VALUES: readonly ["support", "object", "abstain"];
356
+ export type CommonsVoteValue = typeof COMMONS_VOTE_VALUES[number];
357
+ export declare const COMMONS_DECISION_STATUSES: readonly ["proposed", "accepted", "rejected", "scheduled", "implemented", "archived"];
358
+ export type CommonsDecisionStatus = typeof COMMONS_DECISION_STATUSES[number];
359
+ export declare const COMMONS_GOVERNANCE_EVENT_TYPES: readonly ["participant.joined", "question.created", "question.answered", "question.converted_to_proposal", "proposal.created", "proposal.submitted", "proposal.backed", "proposal.qualified", "proposal.review_started", "proposal.voting_started", "proposal.voted", "proposal.steward_decision", "proposal.archived", "delegation.created", "delegation.revoked", "decision.created", "decision.updated"];
360
+ export type CommonsGovernanceEventType = typeof COMMONS_GOVERNANCE_EVENT_TYPES[number];
361
+ export declare const COMMERCE_STRIPE_ACCOUNT_STATUSES: readonly ["not_started", "pending", "restricted", "enabled", "disabled"];
362
+ export type CommerceStripeAccountStatus = typeof COMMERCE_STRIPE_ACCOUNT_STATUSES[number];
363
+ export declare const COMMERCE_STRIPE_ONBOARDING_STATUSES: readonly ["not_started", "started", "returned", "completed", "expired"];
364
+ export type CommerceStripeOnboardingStatus = typeof COMMERCE_STRIPE_ONBOARDING_STATUSES[number];
365
+ export declare const COMMERCE_STRIPE_ENVIRONMENTS: readonly ["test", "live"];
366
+ export type CommerceStripeEnvironment = typeof COMMERCE_STRIPE_ENVIRONMENTS[number];
367
+ export declare const COMMERCE_STRIPE_SYNC_STATUSES: readonly ["not_synced", "pending", "synced", "blocked", "drifted", "failed"];
368
+ export type CommerceStripeSyncStatus = typeof COMMERCE_STRIPE_SYNC_STATUSES[number];
369
+ export declare const COMMERCE_CART_STATUSES: readonly ["active", "checkout_pending", "converted", "abandoned"];
370
+ export type CommerceCartStatus = typeof COMMERCE_CART_STATUSES[number];
371
+ export declare const COMMERCE_CHECKOUT_STATUSES: readonly ["draft", "requires_confirmation", "processing", "partially_confirmed", "confirmed", "completed", "canceled", "failed"];
372
+ export type CommerceCheckoutStatus = typeof COMMERCE_CHECKOUT_STATUSES[number];
373
+ export declare const COMMERCE_ORDER_STATUSES: readonly ["draft", "pending_payment", "requires_action", "processing", "paid", "partially_refunded", "refunded", "canceled", "failed"];
374
+ export type CommerceOrderStatus = typeof COMMERCE_ORDER_STATUSES[number];
375
+ export declare const COMMERCE_ORDER_ITEM_STATUSES: readonly ["pending", "paid", "fulfilled", "refunded", "revoked", "canceled"];
376
+ export type CommerceOrderItemStatus = typeof COMMERCE_ORDER_ITEM_STATUSES[number];
377
+ export declare const COMMERCE_SUBSCRIPTION_STATUSES: readonly ["incomplete", "trialing", "active", "past_due", "canceled", "unpaid", "paused"];
378
+ export type CommerceSubscriptionStatus = typeof COMMERCE_SUBSCRIPTION_STATUSES[number];
379
+ export declare const COMMERCE_PAYMENT_GROUP_STATUSES: readonly ["pending", "requires_confirmation", "requires_action", "processing", "succeeded", "failed", "canceled"];
380
+ export type CommercePaymentGroupStatus = typeof COMMERCE_PAYMENT_GROUP_STATUSES[number];
381
+ export declare const COMMERCE_WEBHOOK_EVENT_STATUSES: readonly ["received", "processing", "processed", "ignored", "failed"];
382
+ export type CommerceWebhookEventStatus = typeof COMMERCE_WEBHOOK_EVENT_STATUSES[number];
383
+ export declare const COMMERCE_REFUND_STATUSES: readonly ["processing", "succeeded", "failed", "canceled"];
384
+ export type CommerceRefundStatus = typeof COMMERCE_REFUND_STATUSES[number];
385
+ export declare const COMMERCE_FULFILLMENT_STATUSES: readonly ["pending", "ready", "delivered", "failed", "revoked"];
386
+ export type CommerceFulfillmentStatus = typeof COMMERCE_FULFILLMENT_STATUSES[number];
387
+ export declare const COMMERCE_FULFILLMENT_EVENT_TYPES: readonly ["artifact_released", "artifact_delivered", "manual_status", "revoked"];
388
+ export type CommerceFulfillmentEventType = typeof COMMERCE_FULFILLMENT_EVENT_TYPES[number];
389
+ export declare const COMMERCE_SERVICE_REQUEST_STATUSES: readonly ["requested", "scoping", "quoted", "buyer_approved", "vendor_approved", "checkout_pending", "active", "fulfilled", "declined", "canceled", "expired"];
390
+ export type CommerceServiceRequestStatus = typeof COMMERCE_SERVICE_REQUEST_STATUSES[number];
391
+ export declare const COMMERCE_SERVICE_QUOTE_STATUSES: readonly ["draft", "submitted", "buyer_approved", "vendor_approved", "accepted", "rejected", "expired", "superseded", "canceled"];
392
+ export type CommerceServiceQuoteStatus = typeof COMMERCE_SERVICE_QUOTE_STATUSES[number];
393
+ export declare const COMMERCE_SERVICE_CONTRACT_STATUSES: readonly ["pending_checkout", "active", "fulfilled", "canceled", "disputed"];
394
+ export type CommerceServiceContractStatus = typeof COMMERCE_SERVICE_CONTRACT_STATUSES[number];
395
+ export declare const COMMERCE_SERVICE_EVENT_TYPES: readonly ["requested", "scoping_started", "scope_updated", "quote_created", "quote_submitted", "quote_buyer_approved", "quote_vendor_approved", "quote_rejected", "quote_expired", "checkout_created", "contract_activated", "work_linked", "manual_update", "fulfilled", "declined", "canceled"];
396
+ export type CommerceServiceEventType = typeof COMMERCE_SERVICE_EVENT_TYPES[number];
397
+ export declare const COMMERCE_CAPACITY_LISTING_STATUSES: readonly ["draft", "submitted", "approved", "rejected", "suspended", "archived"];
398
+ export type CommerceCapacityListingStatus = typeof COMMERCE_CAPACITY_LISTING_STATUSES[number];
399
+ export declare const COMMERCE_CAPACITY_INQUIRY_STATUSES: readonly ["requested", "reviewing", "approved_for_scoping", "declined", "canceled"];
400
+ export type CommerceCapacityInquiryStatus = typeof COMMERCE_CAPACITY_INQUIRY_STATUSES[number];
401
+ export declare const COMMERCE_CAPACITY_ACCESS_LEVELS: readonly ["public_summary", "buyer_gated", "governance_required", "private_invite"];
402
+ export type CommerceCapacityAccessLevel = typeof COMMERCE_CAPACITY_ACCESS_LEVELS[number];
403
+ export declare const COMMERCE_CAPACITY_RUNTIME_ISOLATION_LEVELS: readonly ["none", "project_scoped", "tenant_isolated", "dedicated_runtime", "external_only"];
404
+ export type CommerceCapacityRuntimeIsolationLevel = typeof COMMERCE_CAPACITY_RUNTIME_ISOLATION_LEVELS[number];
405
+ export declare const COMMERCE_CAPACITY_HUMAN_INVOLVEMENT_LEVELS: readonly ["none", "review_only", "operator_assisted", "human_delivered"];
406
+ export type CommerceCapacityHumanInvolvementLevel = typeof COMMERCE_CAPACITY_HUMAN_INVOLVEMENT_LEVELS[number];
407
+ export declare const COMMERCE_CAPACITY_AI_INVOLVEMENT_LEVELS: readonly ["none", "assistive", "agentic", "model_hosted"];
408
+ export type CommerceCapacityAiInvolvementLevel = typeof COMMERCE_CAPACITY_AI_INVOLVEMENT_LEVELS[number];
409
+ export declare const COMMERCE_CAPACITY_DATA_ACCESS_LEVELS: readonly ["none", "public_only", "buyer_provided", "project_scoped", "sensitive_review_required"];
410
+ export type CommerceCapacityDataAccessLevel = typeof COMMERCE_CAPACITY_DATA_ACCESS_LEVELS[number];
411
+ export declare const COMMERCE_CAPACITY_SECRET_ACCESS_LEVELS: readonly ["none", "buyer_managed", "delegated_scoped", "market_admin_review_required"];
412
+ export type CommerceCapacitySecretAccessLevel = typeof COMMERCE_CAPACITY_SECRET_ACCESS_LEVELS[number];
413
+ export interface CommerceVendor {
414
+ id: string;
415
+ teamId: string;
416
+ displayName: string;
417
+ slug: string;
418
+ status: CommerceGovernanceState;
419
+ trustLevel: CommerceVendorTrustLevel;
420
+ professionalEntitlementId: string | null;
421
+ stripeAccountId: string | null;
422
+ salesEnabled: boolean;
423
+ serviceSalesEnabled: boolean;
424
+ capacityListingsEnabled: boolean;
425
+ metadata?: Record<string, unknown>;
426
+ createdAt: string;
427
+ updatedAt: string;
428
+ }
429
+ export interface StripeConnectedAccount {
430
+ id: string;
431
+ vendorId: string;
432
+ teamId: string;
433
+ environment: CommerceStripeEnvironment;
434
+ stripeAccountId: string;
435
+ accountStatus: CommerceStripeAccountStatus;
436
+ onboardingStatus: CommerceStripeOnboardingStatus;
437
+ chargesEnabled: boolean;
438
+ payoutsEnabled: boolean;
439
+ detailsSubmitted: boolean;
440
+ requirementsCurrentlyDue: string[];
441
+ requirementsEventuallyDue: string[];
442
+ requirementsPastDue: string[];
443
+ requirementsDisabledReason: string | null;
444
+ capabilities: Record<string, string>;
445
+ onboardingStartedAt: string | null;
446
+ onboardingCompletedAt: string | null;
447
+ lastSyncedAt: string | null;
448
+ metadata?: Record<string, unknown>;
449
+ createdAt: string;
450
+ updatedAt: string;
451
+ }
452
+ export interface CommerceStripeOnboardingRequestInput {
453
+ returnUrl?: string | null;
454
+ refreshUrl?: string | null;
455
+ }
456
+ export interface CommerceStripeOnboardingResponse {
457
+ account: StripeConnectedAccount;
458
+ onboardingUrl: string;
459
+ }
460
+ export interface CommerceStripeLoginLinkResponse {
461
+ account: StripeConnectedAccount;
462
+ loginUrl: string;
463
+ }
464
+ export interface CommerceProduct {
465
+ id: string;
466
+ vendorId: string;
467
+ sellerTeamId: string;
468
+ kind: CommerceProductKind;
469
+ slug: string;
470
+ title: string;
471
+ summary: string | null;
472
+ description: string | null;
473
+ status: CommerceGovernanceState;
474
+ visibility: 'public' | 'authenticated' | 'team' | 'private';
475
+ catalogItemId: string | null;
476
+ currentVersionId: string | null;
477
+ ownershipModel: CommerceOwnershipModel;
478
+ ownershipRecordId: string | null;
479
+ supportPolicy: string | null;
480
+ license: string | null;
481
+ metadata?: Record<string, unknown>;
482
+ createdAt: string;
483
+ updatedAt: string;
484
+ }
485
+ export interface CommerceOwnershipRecord {
486
+ id: string;
487
+ productId: string;
488
+ model: CommerceOwnershipModel;
489
+ canonicalOwnerType: 'user' | 'team' | 'organization' | 'cooperative' | 'community' | 'foundation' | 'external';
490
+ canonicalOwnerId: string | null;
491
+ sellerTeamId: string;
492
+ stewardTeamId: string | null;
493
+ governancePolicyId: string | null;
494
+ publicSummary: string | null;
495
+ buyerVisible: boolean;
496
+ effectiveAt: string;
497
+ supersededAt: string | null;
498
+ metadata?: Record<string, unknown>;
499
+ createdAt: string;
500
+ updatedAt: string;
501
+ }
502
+ export interface CommerceStewardshipAssignment {
503
+ id: string;
504
+ ownershipRecordId: string;
505
+ productId: string;
506
+ role: CommerceStewardshipRole;
507
+ assigneeType: 'user' | 'team' | 'organization' | 'community' | 'external';
508
+ assigneeId: string | null;
509
+ displayName: string | null;
510
+ responsibilities: string[];
511
+ visibleToBuyers: boolean;
512
+ startsAt: string;
513
+ endsAt: string | null;
514
+ metadata?: Record<string, unknown>;
515
+ createdAt: string;
516
+ updatedAt: string;
517
+ }
518
+ export interface CommerceContribution {
519
+ id: string;
520
+ productId: string;
521
+ productVersionId: string | null;
522
+ contributorType: 'user' | 'team' | 'organization' | 'external';
523
+ contributorId: string | null;
524
+ displayName: string | null;
525
+ role: string;
526
+ summary: string | null;
527
+ attributionVisibility: 'public' | 'buyer' | 'vendor' | 'private';
528
+ agreementRef: string | null;
529
+ benefitWeight: number | null;
530
+ effectiveAt: string;
531
+ metadata?: Record<string, unknown>;
532
+ createdAt: string;
533
+ updatedAt: string;
534
+ }
535
+ export interface CommerceGovernancePolicy {
536
+ id: string;
537
+ productId: string | null;
538
+ teamId: string | null;
539
+ policyKind: 'product' | 'vendor' | 'cooperative' | 'community';
540
+ title: string;
541
+ approvalRules: Record<string, unknown>;
542
+ quorumRules: Record<string, unknown>;
543
+ buyerVisibleSummary: string | null;
544
+ status: 'draft' | 'active' | 'superseded' | 'archived';
545
+ createdAt: string;
546
+ updatedAt: string;
547
+ }
548
+ export interface CommerceOwnershipTransfer {
549
+ id: string;
550
+ productId: string;
551
+ fromOwnershipRecordId: string;
552
+ toOwnershipRecordId: string;
553
+ status: CommerceOwnershipTransferStatus;
554
+ reason: string;
555
+ approvalEvidence: Record<string, unknown>;
556
+ buyerVisibleImpact: string | null;
557
+ effectiveAt: string;
558
+ requestedByType: string;
559
+ requestedById: string;
560
+ approvedByType: string | null;
561
+ approvedById: string | null;
562
+ approvedAt: string | null;
563
+ rejectedAt: string | null;
564
+ supersededAt: string | null;
565
+ metadata?: Record<string, unknown>;
566
+ createdAt: string;
567
+ }
568
+ export interface CommerceSuccessionEvent {
569
+ id: string;
570
+ productId: string;
571
+ ownershipRecordId: string | null;
572
+ stewardshipAssignmentId: string | null;
573
+ successorType: string;
574
+ successorId: string;
575
+ eventType: CommerceSuccessionEventType;
576
+ status: CommerceOwnershipTransferStatus;
577
+ reason: string | null;
578
+ evidence?: Record<string, unknown>;
579
+ effectiveAt: string | null;
580
+ createdByType: string;
581
+ createdById: string;
582
+ metadata?: Record<string, unknown>;
583
+ createdAt: string;
584
+ }
585
+ export interface CommerceOwnershipWorkflowSummary {
586
+ productId: string;
587
+ currentOwnershipRecord: CommerceOwnershipRecord | null;
588
+ buyerVisibleOwnershipRecords: CommerceOwnershipRecord[];
589
+ stewardshipAssignments: CommerceStewardshipAssignment[];
590
+ contributions: CommerceContribution[];
591
+ governancePolicies: CommerceGovernancePolicy[];
592
+ pendingTransfers: CommerceOwnershipTransfer[];
593
+ successionEvents: CommerceSuccessionEvent[];
594
+ }
595
+ export interface CommerceOwnershipRecordUpdateInput {
596
+ publicSummary?: string | null;
597
+ buyerVisible?: boolean;
598
+ metadata?: Record<string, unknown>;
599
+ }
600
+ export interface CommerceStewardshipAssignmentUpdateInput {
601
+ displayName?: string | null;
602
+ responsibilities?: Record<string, unknown>;
603
+ visibleToBuyers?: boolean;
604
+ endsAt?: string | null;
605
+ metadata?: Record<string, unknown>;
606
+ }
607
+ export interface CommerceContributionUpdateInput {
608
+ summary?: string | null;
609
+ attributionVisibility?: string;
610
+ benefitWeight?: number | null;
611
+ metadata?: Record<string, unknown>;
612
+ }
613
+ export interface CommerceGovernancePolicyUpdateInput {
614
+ title?: string;
615
+ approvalRules?: Record<string, unknown>;
616
+ quorumRules?: Record<string, unknown>;
617
+ buyerVisibleSummary?: string | null;
618
+ status?: CommerceGovernanceState;
619
+ }
620
+ export interface CommerceOwnershipTransferDecisionInput {
621
+ reason?: string | null;
622
+ evidence?: Record<string, unknown>;
623
+ }
624
+ export interface CommerceSuccessionEventInput {
625
+ ownershipRecordId?: string | null;
626
+ stewardshipAssignmentId?: string | null;
627
+ successorType: string;
628
+ successorId: string;
629
+ eventType: CommerceSuccessionEventType;
630
+ reason?: string | null;
631
+ evidence?: Record<string, unknown>;
632
+ effectiveAt?: string | null;
633
+ metadata?: Record<string, unknown>;
634
+ }
635
+ export interface CommerceCapacityListing {
636
+ id: string;
637
+ productId: string;
638
+ vendorId: string;
639
+ sellerTeamId: string;
640
+ capacityProviderId: string | null;
641
+ capacityProviderLaneId: string | null;
642
+ status: CommerceCapacityListingStatus;
643
+ accessLevel: CommerceCapacityAccessLevel;
644
+ runtimeIsolationLevel: CommerceCapacityRuntimeIsolationLevel;
645
+ humanInvolvementLevel: CommerceCapacityHumanInvolvementLevel;
646
+ aiInvolvementLevel: CommerceCapacityAiInvolvementLevel;
647
+ dataAccessLevel: CommerceCapacityDataAccessLevel;
648
+ secretAccessLevel: CommerceCapacitySecretAccessLevel;
649
+ supportedServiceTypes: string[];
650
+ supportedRegions: string[];
651
+ runtimeRequirements: Record<string, unknown>;
652
+ dataHandlingSummary: string | null;
653
+ buyerVisibleRiskSummary: string | null;
654
+ governanceRequirements: Record<string, unknown>;
655
+ supportPolicy: string | null;
656
+ availabilitySummary: string | null;
657
+ ownershipSnapshot?: Record<string, unknown>;
658
+ metadata?: Record<string, unknown>;
659
+ createdAt: string;
660
+ updatedAt: string;
661
+ }
662
+ export interface CommerceCapacityListingInquiry {
663
+ id: string;
664
+ listingId: string;
665
+ productId: string;
666
+ vendorId: string;
667
+ sellerTeamId: string;
668
+ buyerTeamId: string | null;
669
+ buyerUserId: string | null;
670
+ status: CommerceCapacityInquiryStatus;
671
+ requestedServiceType: string | null;
672
+ requestedScope: string;
673
+ dataAccessRequested: Record<string, unknown>;
674
+ secretAccessRequested: Record<string, unknown>;
675
+ relatedProjectId: string | null;
676
+ relatedWorkdayId: string | null;
677
+ governanceEvidence?: Record<string, unknown>;
678
+ metadata?: Record<string, unknown>;
679
+ createdAt: string;
680
+ updatedAt: string;
681
+ }
682
+ export interface CommerceCapacityListingInput {
683
+ capacityProviderId?: string | null;
684
+ capacityProviderLaneId?: string | null;
685
+ accessLevel?: CommerceCapacityAccessLevel;
686
+ runtimeIsolationLevel?: CommerceCapacityRuntimeIsolationLevel;
687
+ humanInvolvementLevel?: CommerceCapacityHumanInvolvementLevel;
688
+ aiInvolvementLevel?: CommerceCapacityAiInvolvementLevel;
689
+ dataAccessLevel?: CommerceCapacityDataAccessLevel;
690
+ secretAccessLevel?: CommerceCapacitySecretAccessLevel;
691
+ supportedServiceTypes?: string[];
692
+ supportedRegions?: string[];
693
+ runtimeRequirements?: Record<string, unknown>;
694
+ dataHandlingSummary?: string | null;
695
+ buyerVisibleRiskSummary?: string | null;
696
+ governanceRequirements?: Record<string, unknown>;
697
+ supportPolicy?: string | null;
698
+ availabilitySummary?: string | null;
699
+ metadata?: Record<string, unknown>;
700
+ }
701
+ export interface CommerceCapacityListingInquiryInput {
702
+ requestedServiceType?: string | null;
703
+ requestedScope: string;
704
+ dataAccessRequested?: Record<string, unknown>;
705
+ secretAccessRequested?: Record<string, unknown>;
706
+ relatedProjectId?: string | null;
707
+ relatedWorkdayId?: string | null;
708
+ metadata?: Record<string, unknown>;
709
+ }
710
+ export interface CommerceCapacityInquiryDecisionInput {
711
+ reason?: string | null;
712
+ evidence?: Record<string, unknown>;
713
+ }
714
+ export interface CommerceProductVersion {
715
+ id: string;
716
+ productId: string;
717
+ version: string;
718
+ status: CommerceGovernanceState;
719
+ catalogArtifactVersionId: string | null;
720
+ manifestKey: string | null;
721
+ artifactKey: string | null;
722
+ integrity: string | null;
723
+ releaseNotes: string | null;
724
+ compatibility: Record<string, unknown>;
725
+ metadata?: Record<string, unknown>;
726
+ publishedAt: string | null;
727
+ createdAt: string;
728
+ updatedAt: string;
729
+ }
730
+ export interface CommerceOffer {
731
+ id: string;
732
+ productId: string;
733
+ productVersionId: string | null;
734
+ vendorId: string;
735
+ sellerTeamId: string;
736
+ mode: CommerceOfferMode;
737
+ status: CommerceGovernanceState;
738
+ title: string;
739
+ termsSummary: string | null;
740
+ accessScope: Record<string, unknown>;
741
+ supportScope: Record<string, unknown>;
742
+ fulfillmentMode: 'automatic' | 'manual' | 'scoped' | 'external';
743
+ activePriceId: string | null;
744
+ stripeProductId: string | null;
745
+ stripeProductStatus: CommerceStripeSyncStatus;
746
+ stripeProductSyncedAt: string | null;
747
+ stripeProductSyncError: string | null;
748
+ stripeProductMetadata?: Record<string, unknown>;
749
+ startsAt: string | null;
750
+ endsAt: string | null;
751
+ metadata?: Record<string, unknown>;
752
+ createdAt: string;
753
+ updatedAt: string;
754
+ }
755
+ export interface CommercePrice {
756
+ id: string;
757
+ offerId: string;
758
+ amount: number;
759
+ currency: string;
760
+ billingInterval: 'one_time' | 'month' | 'year' | 'custom';
761
+ status: 'draft' | 'active' | 'archived';
762
+ stripeProductId: string | null;
763
+ stripePriceId: string | null;
764
+ stripeLookupKey: string | null;
765
+ stripeSyncStatus: CommerceStripeSyncStatus;
766
+ stripeSyncedAt: string | null;
767
+ stripeSyncError: string | null;
768
+ stripeMetadata?: Record<string, unknown>;
769
+ priceVersion: number;
770
+ taxBehavior: 'exclusive' | 'inclusive' | 'unspecified';
771
+ metadata?: Record<string, unknown>;
772
+ createdAt: string;
773
+ updatedAt: string;
774
+ }
775
+ export interface CommerceStripeProductSyncResult {
776
+ offer: CommerceOffer;
777
+ product: CommerceProduct;
778
+ vendor: CommerceVendor;
779
+ connectedAccount: StripeConnectedAccount;
780
+ stripeProductId: string;
781
+ status: CommerceStripeSyncStatus;
782
+ reconciled: boolean;
783
+ }
784
+ export interface CommerceStripePriceSyncResult {
785
+ offer: CommerceOffer;
786
+ price: CommercePrice;
787
+ connectedAccount: StripeConnectedAccount;
788
+ stripeProductId: string;
789
+ stripePriceId: string;
790
+ stripeLookupKey: string;
791
+ status: CommerceStripeSyncStatus;
792
+ reconciled: boolean;
793
+ }
794
+ export interface CommerceCart {
795
+ id: string;
796
+ buyerTeamId: string | null;
797
+ buyerUserId: string | null;
798
+ status: CommerceCartStatus;
799
+ currency: string | null;
800
+ metadata?: Record<string, unknown>;
801
+ createdAt: string;
802
+ updatedAt: string;
803
+ }
804
+ export interface CommerceCartItem {
805
+ id: string;
806
+ cartId: string;
807
+ vendorId: string;
808
+ sellerTeamId: string;
809
+ productId: string;
810
+ productVersionId: string | null;
811
+ offerId: string;
812
+ priceId: string | null;
813
+ quantity: number;
814
+ unitAmount: number;
815
+ currency: string;
816
+ mode: CommerceOfferMode;
817
+ status: 'active' | 'removed' | 'converted';
818
+ metadata?: Record<string, unknown>;
819
+ createdAt: string;
820
+ updatedAt: string;
821
+ }
822
+ export interface CommerceCheckout {
823
+ id: string;
824
+ cartId: string;
825
+ buyerTeamId: string | null;
826
+ buyerUserId: string | null;
827
+ status: CommerceCheckoutStatus;
828
+ checkoutMode: 'stripe_elements_grouped_vendor';
829
+ groupCount: number;
830
+ completedGroupCount: number;
831
+ metadata?: Record<string, unknown>;
832
+ createdAt: string;
833
+ updatedAt: string;
834
+ }
835
+ export interface CommerceOrder {
836
+ id: string;
837
+ checkoutId: string | null;
838
+ cartId: string | null;
839
+ buyerTeamId: string | null;
840
+ buyerUserId: string | null;
841
+ vendorId: string | null;
842
+ sellerTeamId: string | null;
843
+ status: CommerceOrderStatus;
844
+ currency: string;
845
+ subtotalAmount: number;
846
+ totalAmount: number;
847
+ refundedAmount: number;
848
+ refundStatus: 'none' | 'partial' | 'full';
849
+ stripeCheckoutSessionId: string | null;
850
+ stripePaymentIntentId: string | null;
851
+ stripeSubscriptionId: string | null;
852
+ stripeCustomerId: string | null;
853
+ stripeConnectedAccountId: string | null;
854
+ ownershipSnapshot?: Record<string, unknown>;
855
+ metadata?: Record<string, unknown>;
856
+ createdAt: string;
857
+ updatedAt: string;
858
+ }
859
+ export interface CommerceOrderItem {
860
+ id: string;
861
+ orderId: string;
862
+ vendorId: string;
863
+ sellerTeamId: string;
864
+ productId: string;
865
+ productVersionId: string | null;
866
+ offerId: string;
867
+ priceId: string;
868
+ mode: CommerceOfferMode;
869
+ quantity: number;
870
+ unitAmount: number;
871
+ totalAmount: number;
872
+ refundedAmount: number;
873
+ refundStatus: 'none' | 'partial' | 'full';
874
+ currency: string;
875
+ status: CommerceOrderItemStatus;
876
+ entitlementId: string | null;
877
+ ownershipSnapshot?: Record<string, unknown>;
878
+ accessScope: Record<string, unknown>;
879
+ supportScope: Record<string, unknown>;
880
+ metadata?: Record<string, unknown>;
881
+ createdAt: string;
882
+ updatedAt: string;
883
+ }
884
+ export interface CommercePaymentGroup {
885
+ id: string;
886
+ checkoutId: string;
887
+ orderId: string;
888
+ vendorId: string;
889
+ sellerTeamId: string;
890
+ connectedAccountId: string | null;
891
+ groupKind: 'free' | 'one_time' | 'subscription';
892
+ billingInterval: 'one_time' | 'month' | 'year' | null;
893
+ status: CommercePaymentGroupStatus;
894
+ currency: string;
895
+ subtotalAmount: number;
896
+ totalAmount: number;
897
+ stripePaymentIntentId: string | null;
898
+ stripeSubscriptionId: string | null;
899
+ stripeCustomerId: string | null;
900
+ clientSecret: string | null;
901
+ metadata?: Record<string, unknown>;
902
+ createdAt: string;
903
+ updatedAt: string;
904
+ }
905
+ export interface CommerceSubscription {
906
+ id: string;
907
+ orderId: string;
908
+ vendorId: string;
909
+ sellerTeamId: string;
910
+ buyerTeamId: string | null;
911
+ buyerUserId: string | null;
912
+ offerId: string;
913
+ priceId: string;
914
+ status: CommerceSubscriptionStatus;
915
+ renewalState: CommerceEntitlement['renewalState'];
916
+ stripeSubscriptionId: string;
917
+ stripeCustomerId: string | null;
918
+ stripeConnectedAccountId: string;
919
+ currentPeriodStart: string | null;
920
+ currentPeriodEnd: string | null;
921
+ cancelAtPeriodEnd: boolean;
922
+ canceledAt: string | null;
923
+ metadata?: Record<string, unknown>;
924
+ createdAt: string;
925
+ updatedAt: string;
926
+ }
927
+ export interface CommerceEntitlement {
928
+ id: string;
929
+ buyerTeamId: string | null;
930
+ buyerUserId: string | null;
931
+ sellerTeamId: string;
932
+ productId: string;
933
+ productVersionId: string | null;
934
+ offerId: string;
935
+ orderId: string | null;
936
+ orderItemId: string | null;
937
+ subscriptionId: string | null;
938
+ status: CommerceEntitlementStatus;
939
+ accessScope: Record<string, unknown>;
940
+ startsAt: string | null;
941
+ endsAt: string | null;
942
+ renewalState: 'none' | 'active' | 'past_due' | 'canceling' | 'canceled';
943
+ fulfillmentArtifactRefs: string[];
944
+ projectId: string | null;
945
+ catalogItemId: string | null;
946
+ ownershipSnapshot?: Record<string, unknown>;
947
+ metadata?: Record<string, unknown>;
948
+ createdAt: string;
949
+ updatedAt: string;
950
+ }
951
+ export interface CommerceBuyerStripeCustomer {
952
+ id: string;
953
+ buyerTeamId: string | null;
954
+ buyerUserId: string | null;
955
+ vendorId: string;
956
+ connectedAccountId: string;
957
+ environment: CommerceStripeEnvironment;
958
+ stripeCustomerId: string;
959
+ metadata?: Record<string, unknown>;
960
+ createdAt: string;
961
+ updatedAt: string;
962
+ }
963
+ export interface CommerceWebhookEvent {
964
+ id: string;
965
+ provider: 'stripe';
966
+ environment: CommerceStripeEnvironment;
967
+ eventId: string;
968
+ eventType: string;
969
+ connectedAccountId: string | null;
970
+ status: CommerceWebhookEventStatus;
971
+ objectType: string | null;
972
+ objectId: string | null;
973
+ relatedOrderId: string | null;
974
+ relatedSubscriptionId: string | null;
975
+ payloadHash: string;
976
+ processingError: string | null;
977
+ receivedAt: string;
978
+ processedAt: string | null;
979
+ createdAt: string;
980
+ updatedAt: string;
981
+ }
982
+ export interface CommerceCheckoutCreateInput {
983
+ buyerTeamId?: string | null;
984
+ items: Array<{
985
+ offerId: string;
986
+ priceId?: string | null;
987
+ quantity?: number;
988
+ }>;
989
+ }
990
+ export interface CommerceCheckoutResponse {
991
+ checkout: CommerceCheckout;
992
+ orders: CommerceOrder[];
993
+ paymentGroups: CommercePaymentGroup[];
994
+ entitlements: CommerceEntitlement[];
995
+ }
996
+ export interface CommercePaymentGroupRefreshResponse {
997
+ paymentGroup: CommercePaymentGroup;
998
+ clientSecret: string | null;
999
+ }
1000
+ export interface CommerceMarketplaceOfferSummary {
1001
+ id: string;
1002
+ mode: CommerceOfferMode;
1003
+ title: string;
1004
+ status: CommerceGovernanceState;
1005
+ priceId: string | null;
1006
+ unitAmount: number | null;
1007
+ currency: string | null;
1008
+ billingInterval: string | null;
1009
+ checkoutEligible: boolean;
1010
+ serviceEligible: boolean;
1011
+ capacityInquiryEligible: boolean;
1012
+ stripeSyncStatus: CommerceStripeSyncStatus | null;
1013
+ }
1014
+ export interface CommerceMarketplaceProductSummary {
1015
+ id: string;
1016
+ kind: CommerceProductKind;
1017
+ title: string;
1018
+ slug: string | null;
1019
+ summary: string | null;
1020
+ status: CommerceGovernanceState;
1021
+ vendorId: string;
1022
+ sellerTeamId: string;
1023
+ vendorDisplayName: string | null;
1024
+ ownershipModel: CommerceOwnershipModel | null;
1025
+ buyerVisibleOwnershipSummary: string | null;
1026
+ stewardshipSummary: Record<string, unknown>[];
1027
+ offers: CommerceMarketplaceOfferSummary[];
1028
+ capacityListingId: string | null;
1029
+ serviceRequestEligible: boolean;
1030
+ checkoutEligible: boolean;
1031
+ updatedAt: string;
1032
+ }
1033
+ export interface CommerceMarketplaceCatalogResponse {
1034
+ products: CommerceMarketplaceProductSummary[];
1035
+ }
1036
+ export interface CommerceRefund {
1037
+ id: string;
1038
+ orderId: string;
1039
+ orderItemId: string | null;
1040
+ paymentGroupId: string | null;
1041
+ vendorId: string;
1042
+ sellerTeamId: string;
1043
+ buyerTeamId: string | null;
1044
+ buyerUserId: string | null;
1045
+ amount: number;
1046
+ currency: string;
1047
+ status: CommerceRefundStatus;
1048
+ reason: string | null;
1049
+ stripeRefundId: string | null;
1050
+ stripePaymentIntentId: string | null;
1051
+ stripeConnectedAccountId: string | null;
1052
+ idempotencyKey: string;
1053
+ requestedByType: string;
1054
+ requestedById: string;
1055
+ failureReason: string | null;
1056
+ metadata?: Record<string, unknown>;
1057
+ createdAt: string;
1058
+ updatedAt: string;
1059
+ }
1060
+ export interface CommerceVendorSalesSummary {
1061
+ vendorId: string;
1062
+ sellerTeamId: string;
1063
+ currency: string | null;
1064
+ grossPaidAmount: number;
1065
+ refundedAmount: number;
1066
+ netPaidAmount: number;
1067
+ paidOrderCount: number;
1068
+ refundedOrderCount: number;
1069
+ activeSubscriptionCount: number;
1070
+ activeEntitlementCount: number;
1071
+ pendingFulfillmentCount: number;
1072
+ }
1073
+ export interface CommerceCommerceMonitor {
1074
+ vendorId: string | null;
1075
+ sellerTeamId: string;
1076
+ stripeReady: boolean;
1077
+ blockedStripeSyncCount: number;
1078
+ driftedStripeSyncCount: number;
1079
+ pendingFulfillmentCount: number;
1080
+ failedRefundCount: number;
1081
+ failedWebhookCount: number;
1082
+ pendingServiceRequestCount: number;
1083
+ pendingCapacityInquiryCount: number;
1084
+ pendingGovernanceTransferCount: number;
1085
+ recentGovernanceEvents: CommerceGovernanceEvent[];
1086
+ updatedAt: string;
1087
+ }
1088
+ export interface CommerceVendorOrderSummary {
1089
+ id: string;
1090
+ checkoutId: string | null;
1091
+ status: CommerceOrderStatus;
1092
+ currency: string;
1093
+ totalAmount: number;
1094
+ refundedAmount: number;
1095
+ buyerTeamId: string | null;
1096
+ buyerDisplayName: string | null;
1097
+ buyerUserIdRedacted: string | null;
1098
+ itemCount: number;
1099
+ createdAt: string;
1100
+ updatedAt: string;
1101
+ }
1102
+ export interface CommerceRefundCreateInput {
1103
+ orderItemId?: string | null;
1104
+ amount?: number | null;
1105
+ reason?: string | null;
1106
+ idempotencyKey?: string | null;
1107
+ metadata?: Record<string, unknown>;
1108
+ }
1109
+ export interface CommerceArtifactDeliveryInput {
1110
+ catalogArtifactVersionId?: string | null;
1111
+ artifactRefs?: Record<string, unknown>[];
1112
+ message?: string | null;
1113
+ }
1114
+ export interface CommerceServiceRequest {
1115
+ id: string;
1116
+ buyerTeamId: string | null;
1117
+ buyerUserId: string | null;
1118
+ vendorId: string;
1119
+ sellerTeamId: string;
1120
+ productId: string;
1121
+ offerId: string;
1122
+ status: CommerceServiceRequestStatus;
1123
+ requestedScope: string;
1124
+ approvedScope: string | null;
1125
+ accessNeeds: Record<string, unknown>;
1126
+ buyerVisibleSummary: string | null;
1127
+ vendorPrivateNotes: string | null;
1128
+ activeQuoteId: string | null;
1129
+ approvedQuoteId: string | null;
1130
+ contractId: string | null;
1131
+ relatedProjectId: string | null;
1132
+ relatedWorkdayId: string | null;
1133
+ orderId: string | null;
1134
+ entitlementId: string | null;
1135
+ ownershipSnapshot?: Record<string, unknown>;
1136
+ metadata?: Record<string, unknown>;
1137
+ createdAt: string;
1138
+ updatedAt: string;
1139
+ }
1140
+ export interface CommerceServiceQuote {
1141
+ id: string;
1142
+ requestId: string;
1143
+ vendorId: string;
1144
+ sellerTeamId: string;
1145
+ buyerTeamId: string | null;
1146
+ buyerUserId: string | null;
1147
+ quoteVersion: number;
1148
+ status: CommerceServiceQuoteStatus;
1149
+ title: string;
1150
+ scopeSummary: string;
1151
+ deliverables: Record<string, unknown>[];
1152
+ assumptions: Record<string, unknown>[];
1153
+ accessRequirements: Record<string, unknown>;
1154
+ governanceRequirements: Record<string, unknown>;
1155
+ amount: number;
1156
+ currency: string;
1157
+ expiresAt: string | null;
1158
+ buyerApprovedAt: string | null;
1159
+ vendorApprovedAt: string | null;
1160
+ acceptedAt: string | null;
1161
+ rejectedAt: string | null;
1162
+ metadata?: Record<string, unknown>;
1163
+ createdAt: string;
1164
+ updatedAt: string;
1165
+ }
1166
+ export interface CommerceServiceContract {
1167
+ id: string;
1168
+ requestId: string;
1169
+ quoteId: string;
1170
+ vendorId: string;
1171
+ sellerTeamId: string;
1172
+ buyerTeamId: string | null;
1173
+ buyerUserId: string | null;
1174
+ productId: string;
1175
+ offerId: string;
1176
+ status: CommerceServiceContractStatus;
1177
+ amount: number;
1178
+ currency: string;
1179
+ orderId: string | null;
1180
+ orderItemId: string | null;
1181
+ paymentGroupId: string | null;
1182
+ entitlementId: string | null;
1183
+ relatedProjectId: string | null;
1184
+ relatedWorkdayId: string | null;
1185
+ ownershipSnapshot?: Record<string, unknown>;
1186
+ accessApprovalSnapshot?: Record<string, unknown>;
1187
+ fulfillmentSummary: string | null;
1188
+ metadata?: Record<string, unknown>;
1189
+ createdAt: string;
1190
+ updatedAt: string;
1191
+ }
1192
+ export interface CommerceServiceEvent {
1193
+ id: string;
1194
+ requestId: string;
1195
+ quoteId: string | null;
1196
+ contractId: string | null;
1197
+ eventType: CommerceServiceEventType;
1198
+ actorType: string;
1199
+ actorId: string | null;
1200
+ priorState: string | null;
1201
+ nextState: string | null;
1202
+ message: string | null;
1203
+ evidence?: Record<string, unknown>;
1204
+ createdAt: string;
1205
+ }
1206
+ export interface CommerceServiceRequestInput {
1207
+ buyerTeamId?: string | null;
1208
+ offerId: string;
1209
+ requestedScope: string;
1210
+ accessNeeds?: Record<string, unknown>;
1211
+ relatedProjectId?: string | null;
1212
+ relatedWorkdayId?: string | null;
1213
+ metadata?: Record<string, unknown>;
1214
+ }
1215
+ export interface CommerceServiceQuoteInput {
1216
+ title: string;
1217
+ scopeSummary: string;
1218
+ deliverables?: Record<string, unknown>[];
1219
+ assumptions?: Record<string, unknown>[];
1220
+ accessRequirements?: Record<string, unknown>;
1221
+ governanceRequirements?: Record<string, unknown>;
1222
+ amount: number;
1223
+ currency: string;
1224
+ expiresAt?: string | null;
1225
+ metadata?: Record<string, unknown>;
1226
+ }
1227
+ export interface CommerceServiceDecisionInput {
1228
+ reason?: string | null;
1229
+ evidence?: Record<string, unknown>;
1230
+ }
1231
+ export interface CommerceServiceFulfillmentInput {
1232
+ summary?: string | null;
1233
+ artifactRefs?: Record<string, unknown>[];
1234
+ deliveryRefs?: Record<string, unknown>[];
1235
+ metadata?: Record<string, unknown>;
1236
+ }
1237
+ export interface CommerceFulfillmentEvent {
1238
+ id: string;
1239
+ orderId: string;
1240
+ orderItemId: string | null;
1241
+ entitlementId: string | null;
1242
+ vendorId: string;
1243
+ sellerTeamId: string;
1244
+ productId: string;
1245
+ productVersionId: string | null;
1246
+ catalogItemId: string | null;
1247
+ catalogArtifactVersionId: string | null;
1248
+ eventType: CommerceFulfillmentEventType;
1249
+ status: CommerceFulfillmentStatus;
1250
+ artifactRefs: Record<string, unknown>[];
1251
+ deliveryRefs: Record<string, unknown>[];
1252
+ message: string | null;
1253
+ actorType: string;
1254
+ actorId: string;
1255
+ metadata?: Record<string, unknown>;
1256
+ createdAt: string;
1257
+ }
1258
+ export interface CommerceGovernanceEvent {
1259
+ id: string;
1260
+ actorType: 'system' | 'user' | 'team' | 'operator';
1261
+ actorId: string | null;
1262
+ action: string;
1263
+ objectType: string;
1264
+ objectId: string;
1265
+ priorState: string | null;
1266
+ nextState: string | null;
1267
+ reason: string | null;
1268
+ evidence: Record<string, unknown>;
1269
+ relatedOrderId: string | null;
1270
+ relatedOfferId: string | null;
1271
+ relatedProductId: string | null;
1272
+ relatedTeamId: string | null;
1273
+ createdAt: string;
1274
+ }
1275
+ export interface CommonsParticipant {
1276
+ id: string;
1277
+ userId: string;
1278
+ teamId: string;
1279
+ status: CommonsParticipantStatus;
1280
+ displayName: string | null;
1281
+ verifiedEmail: boolean;
1282
+ baseWeight: number;
1283
+ trustWeight: number;
1284
+ contributionWeight: number;
1285
+ stakeholderWeight: number;
1286
+ delegatedWeight: number;
1287
+ totalWeight: number;
1288
+ metadata?: Record<string, unknown>;
1289
+ createdAt: string;
1290
+ updatedAt: string;
1291
+ }
1292
+ export interface CommonsQuestion {
1293
+ id: string;
1294
+ participantId: string;
1295
+ userId: string;
1296
+ teamId: string;
1297
+ status: CommonsQuestionStatus;
1298
+ title: string;
1299
+ body: string;
1300
+ answer: string | null;
1301
+ convertedProposalId: string | null;
1302
+ metadata?: Record<string, unknown>;
1303
+ createdAt: string;
1304
+ updatedAt: string;
1305
+ }
1306
+ export interface CommonsProposal {
1307
+ id: string;
1308
+ participantId: string;
1309
+ userId: string;
1310
+ teamId: string;
1311
+ status: CommonsProposalStatus;
1312
+ title: string;
1313
+ summary: string;
1314
+ body: string;
1315
+ scope: string;
1316
+ decisionType: string;
1317
+ contentProposalSlug: string | null;
1318
+ contentDecisionSlug: string | null;
1319
+ backingCount: number;
1320
+ voteSupportWeight: number;
1321
+ voteObjectWeight: number;
1322
+ voteAbstainWeight: number;
1323
+ qualifiedAt: string | null;
1324
+ votingStartsAt: string | null;
1325
+ votingEndsAt: string | null;
1326
+ stewardDecisionAt: string | null;
1327
+ stewardDecisionBy: string | null;
1328
+ metadata?: Record<string, unknown>;
1329
+ createdAt: string;
1330
+ updatedAt: string;
1331
+ }
1332
+ export interface CommonsProposalBacking {
1333
+ id: string;
1334
+ proposalId: string;
1335
+ participantId: string;
1336
+ userId: string;
1337
+ weightSnapshotId: string;
1338
+ weight: number;
1339
+ reason: string | null;
1340
+ createdAt: string;
1341
+ }
1342
+ export interface CommonsProposalVote {
1343
+ id: string;
1344
+ proposalId: string;
1345
+ participantId: string;
1346
+ userId: string;
1347
+ vote: CommonsVoteValue;
1348
+ weightSnapshotId: string;
1349
+ weight: number;
1350
+ reason: string | null;
1351
+ createdAt: string;
1352
+ updatedAt: string;
1353
+ }
1354
+ export interface CommonsDelegation {
1355
+ id: string;
1356
+ fromParticipantId: string;
1357
+ toParticipantId: string;
1358
+ scope: string;
1359
+ status: 'active' | 'revoked';
1360
+ weightLimit: number | null;
1361
+ reason: string | null;
1362
+ createdAt: string;
1363
+ revokedAt: string | null;
1364
+ }
1365
+ export interface CommonsWeightSnapshot {
1366
+ id: string;
1367
+ participantId: string;
1368
+ policyVersion: string;
1369
+ baseWeight: number;
1370
+ verifiedEmailWeight: number;
1371
+ accountAgeWeight: number;
1372
+ contributionWeight: number;
1373
+ stakeholderWeight: number;
1374
+ trustRoleWeight: number;
1375
+ delegatedWeight: number;
1376
+ totalWeight: number;
1377
+ evidence?: Record<string, unknown>;
1378
+ createdAt: string;
1379
+ }
1380
+ export interface CommonsDecision {
1381
+ id: string;
1382
+ proposalId: string;
1383
+ status: CommonsDecisionStatus;
1384
+ decisionRecordId: string | null;
1385
+ decisionRecordSlug: string | null;
1386
+ title: string;
1387
+ summary: string;
1388
+ stewardReason: string | null;
1389
+ capacityBudget: string | null;
1390
+ scheduledFor: string | null;
1391
+ implementedAt: string | null;
1392
+ metadata?: Record<string, unknown>;
1393
+ createdAt: string;
1394
+ updatedAt: string;
1395
+ }
1396
+ export interface CommonsGovernanceEvent {
1397
+ id: string;
1398
+ eventType: CommonsGovernanceEventType;
1399
+ actorType: string;
1400
+ actorId: string | null;
1401
+ participantId: string | null;
1402
+ proposalId: string | null;
1403
+ questionId: string | null;
1404
+ decisionId: string | null;
1405
+ priorState: string | null;
1406
+ nextState: string | null;
1407
+ message: string | null;
1408
+ evidence?: Record<string, unknown>;
1409
+ createdAt: string;
1410
+ }
1411
+ export interface CommonsQuestionInput {
1412
+ title: string;
1413
+ body: string;
1414
+ metadata?: Record<string, unknown>;
1415
+ }
1416
+ export interface CommonsProposalInput {
1417
+ title: string;
1418
+ summary: string;
1419
+ body: string;
1420
+ scope?: string;
1421
+ decisionType?: string;
1422
+ metadata?: Record<string, unknown>;
1423
+ }
1424
+ export interface CommonsDecisionInput {
1425
+ reason?: string | null;
1426
+ evidence?: Record<string, unknown>;
1427
+ capacityBudget?: string | null;
1428
+ scheduledFor?: string | null;
1429
+ }
329
1430
  export interface TeamStorageLocator {
330
1431
  id: string;
331
1432
  teamId: string;
@@ -499,6 +1600,20 @@ export interface ProjectWebMonitorResult {
499
1600
  checks: ProjectWebMonitorCheck[];
500
1601
  urls: string[];
501
1602
  warnings: string[];
1603
+ contentRuntime?: {
1604
+ contentRuntimeSource: string;
1605
+ effectiveContentSource: string;
1606
+ manifestKey: string | null;
1607
+ overlayKey?: string | null;
1608
+ revision?: string | null;
1609
+ snapshotId?: string | null;
1610
+ diagnostics: Array<{
1611
+ code: string;
1612
+ status: string;
1613
+ summary: string;
1614
+ source: string;
1615
+ }>;
1616
+ };
502
1617
  }
503
1618
  export interface ProjectDeploymentEvent {
504
1619
  id: string;
@@ -1550,7 +2665,7 @@ export interface SdkDispatchConfig {
1550
2665
  }
1551
2666
  export type SdkFilterOperator = 'eq' | 'in' | 'contains' | 'prefix' | 'gt' | 'gte' | 'lt' | 'lte' | 'updated_since' | 'related_to';
1552
2667
  export type TreeseedSchemaVersion = number;
1553
- export type TreeseedRuntimeRecordType = 'subscription' | 'contact_submission' | 'agent_run' | 'message' | 'agent_cursor' | 'content_lease' | 'work_day' | 'task' | 'task_event' | 'task_output' | 'graph_run' | 'report';
2668
+ export type TreeseedRuntimeRecordType = 'subscription' | 'contact_submission' | 'agent_run' | 'message' | 'agent_cursor' | 'content_lease' | 'work_day' | 'graph_run' | 'report';
1554
2669
  export interface TreeseedRecordEnvelope<TPayload, TMeta = Record<string, unknown>> {
1555
2670
  recordType: TreeseedRuntimeRecordType;
1556
2671
  schemaVersion: TreeseedSchemaVersion;
@@ -1737,38 +2852,53 @@ export interface SdkWorkDayEntity {
1737
2852
  createdAt: string;
1738
2853
  updatedAt: string;
1739
2854
  }
2855
+ export interface SdkGraphRunEntity {
2856
+ [key: string]: unknown;
2857
+ id: string;
2858
+ workDayId: string;
2859
+ corpusHash: string;
2860
+ graphVersion: string;
2861
+ queryJson?: string | null;
2862
+ seedIdsJson?: string | null;
2863
+ selectedNodeIdsJson?: string | null;
2864
+ statsJson: string | null;
2865
+ snapshotRef: string | null;
2866
+ createdAt: string;
2867
+ }
2868
+ export interface SdkReportEntity {
2869
+ [key: string]: unknown;
2870
+ id: string;
2871
+ workDayId: string;
2872
+ kind: string;
2873
+ bodyJson: string;
2874
+ renderedRef: string | null;
2875
+ sentAt: string | null;
2876
+ createdAt: string;
2877
+ }
2878
+ export type SdkTaskState = 'pending' | 'claimed' | 'running' | 'completed' | 'failed';
1740
2879
  export interface SdkTaskEntity {
1741
2880
  [key: string]: unknown;
1742
2881
  id: string;
1743
2882
  workDayId: string;
1744
2883
  agentId: string;
1745
2884
  type: string;
1746
- state: string;
1747
- priority: number;
1748
2885
  idempotencyKey: string;
1749
2886
  payloadJson: string;
1750
- payloadHash: string | null;
1751
- attemptCount: number;
1752
- maxAttempts: number;
2887
+ state: SdkTaskState;
1753
2888
  claimedBy: string | null;
2889
+ claimedAt: string | null;
1754
2890
  leaseExpiresAt: string | null;
1755
- availableAt: string;
1756
- lastErrorCode: string | null;
1757
- lastErrorMessage: string | null;
1758
- graphVersion: string | null;
1759
- parentTaskId: string | null;
2891
+ attempts: number;
1760
2892
  createdAt: string;
1761
- startedAt: string | null;
1762
- completedAt: string | null;
1763
2893
  updatedAt: string;
1764
2894
  }
1765
2895
  export interface SdkTaskEventEntity {
1766
2896
  [key: string]: unknown;
1767
2897
  id: string;
1768
2898
  taskId: string;
1769
- seq: number;
1770
2899
  kind: string;
1771
2900
  dataJson: string;
2901
+ actor: string | null;
1772
2902
  createdAt: string;
1773
2903
  }
1774
2904
  export interface SdkTaskOutputEntity {
@@ -1777,30 +2907,47 @@ export interface SdkTaskOutputEntity {
1777
2907
  taskId: string;
1778
2908
  outputJson: string;
1779
2909
  outputRef: string | null;
2910
+ summaryJson: string | null;
2911
+ actor: string | null;
1780
2912
  createdAt: string;
2913
+ updatedAt: string;
1781
2914
  }
1782
- export interface SdkGraphRunEntity {
1783
- [key: string]: unknown;
1784
- id: string;
2915
+ export interface SdkCreateTaskRequest {
2916
+ id?: string;
1785
2917
  workDayId: string;
1786
- corpusHash: string;
1787
- graphVersion: string;
1788
- queryJson?: string | null;
1789
- seedIdsJson?: string | null;
1790
- selectedNodeIdsJson?: string | null;
1791
- statsJson: string | null;
1792
- snapshotRef: string | null;
1793
- createdAt: string;
2918
+ agentId: string;
2919
+ type: string;
2920
+ idempotencyKey: string;
2921
+ payload?: Record<string, unknown>;
2922
+ actor?: string | null;
1794
2923
  }
1795
- export interface SdkReportEntity {
1796
- [key: string]: unknown;
2924
+ export interface SdkClaimTaskRequest {
1797
2925
  id: string;
1798
- workDayId: string;
1799
- kind: string;
1800
- bodyJson: string;
1801
- renderedRef: string | null;
1802
- sentAt: string | null;
1803
- createdAt: string;
2926
+ workerId: string;
2927
+ leaseSeconds?: number;
2928
+ actor?: string | null;
2929
+ }
2930
+ export interface SdkRecordTaskProgressRequest {
2931
+ id: string;
2932
+ state?: SdkTaskState;
2933
+ appendEvent?: {
2934
+ kind: string;
2935
+ data?: Record<string, unknown>;
2936
+ };
2937
+ actor?: string | null;
2938
+ }
2939
+ export interface SdkCompleteTaskRequest {
2940
+ id: string;
2941
+ output?: Record<string, unknown>;
2942
+ outputRef?: string | null;
2943
+ summary?: Record<string, unknown>;
2944
+ actor?: string | null;
2945
+ }
2946
+ export interface SdkTaskManagerContext {
2947
+ task: SdkTaskEntity | null;
2948
+ workDay: SdkWorkDayEntity | null;
2949
+ events: SdkTaskEventEntity[];
2950
+ outputs: SdkTaskOutputEntity[];
1804
2951
  }
1805
2952
  export interface SdkContentEntry {
1806
2953
  id: string;
@@ -2600,66 +3747,6 @@ export interface SdkCloseWorkDayRequest {
2600
3747
  summary?: Record<string, unknown> | null;
2601
3748
  actor: string;
2602
3749
  }
2603
- export interface SdkCreateTaskRequest {
2604
- id?: string;
2605
- workDayId: string;
2606
- agentId: string;
2607
- type: string;
2608
- state?: string;
2609
- priority?: number;
2610
- idempotencyKey: string;
2611
- payload: Record<string, unknown>;
2612
- payloadHash?: string | null;
2613
- maxAttempts?: number;
2614
- availableAt?: string;
2615
- graphVersion?: string | null;
2616
- parentTaskId?: string | null;
2617
- actor: string;
2618
- }
2619
- export interface SdkClaimTaskRequest {
2620
- id: string;
2621
- workerId: string;
2622
- leaseSeconds: number;
2623
- actor: string;
2624
- }
2625
- export interface SdkTaskProgressRequest {
2626
- id: string;
2627
- workerId?: string | null;
2628
- state?: string;
2629
- appendEvent?: {
2630
- kind: string;
2631
- data?: Record<string, unknown>;
2632
- } | null;
2633
- patch?: Record<string, unknown>;
2634
- actor: string;
2635
- }
2636
- export interface SdkCompleteTaskRequest {
2637
- id: string;
2638
- output?: Record<string, unknown> | null;
2639
- outputRef?: string | null;
2640
- summary?: Record<string, unknown> | null;
2641
- actor: string;
2642
- }
2643
- export interface SdkFailTaskRequest {
2644
- id: string;
2645
- errorCode?: string | null;
2646
- errorMessage: string;
2647
- retryable?: boolean;
2648
- nextVisibleAt?: string | null;
2649
- actor: string;
2650
- }
2651
- export interface SdkAppendTaskEventRequest {
2652
- taskId: string;
2653
- kind: string;
2654
- data?: Record<string, unknown>;
2655
- actor: string;
2656
- }
2657
- export interface SdkEnqueueTaskRequest {
2658
- taskId: string;
2659
- queueName?: string;
2660
- deliveryDelaySeconds?: number;
2661
- actor: string;
2662
- }
2663
3750
  export interface SdkCreateReportRequest {
2664
3751
  id?: string;
2665
3752
  workDayId: string;
@@ -2669,22 +3756,6 @@ export interface SdkCreateReportRequest {
2669
3756
  sentAt?: string | null;
2670
3757
  actor: string;
2671
3758
  }
2672
- export interface SdkTaskSearchRequest {
2673
- workDayId?: string;
2674
- agentId?: string;
2675
- state?: string | string[];
2676
- limit?: number;
2677
- }
2678
- export interface SdkManagerContextRequest {
2679
- taskId: string;
2680
- includeGraph?: boolean;
2681
- }
2682
- export interface SdkManagerContextPayload {
2683
- task: SdkTaskEntity | null;
2684
- workDay: SdkWorkDayEntity | null;
2685
- agent: Record<string, unknown> | null;
2686
- graph: Record<string, unknown> | null;
2687
- }
2688
3759
  export interface SdkQueuePullClientConfig {
2689
3760
  accountId: string;
2690
3761
  queueId: string;
@@ -2782,7 +3853,7 @@ export interface SdkTemplateCatalogEntry {
2782
3853
  supportsReconcile: boolean;
2783
3854
  };
2784
3855
  offer?: {
2785
- priceModel?: 'free' | 'paid' | 'contact' | 'one_time_current_version' | 'subscription_updates' | 'private';
3856
+ priceModel?: CommerceOfferMode;
2786
3857
  license?: string;
2787
3858
  support?: string;
2788
3859
  };