@treeseed/sdk 0.11.0 → 0.12.5

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 +629 -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 +66 -0
  180. package/dist/platform/desired-state.js +1052 -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
@@ -0,0 +1,1872 @@
1
+ export declare const TREESEED_SCENE_SCHEMA_VERSION: "treeseed.scene/v1";
2
+ export declare const TREESEED_SCENE_ENVIRONMENTS: readonly ["local", "staging", "prod"];
3
+ export declare const TREESEED_SCENE_BROWSERS: readonly ["chromium", "firefox", "webkit"];
4
+ export type TreeseedSceneSchemaVersion = typeof TREESEED_SCENE_SCHEMA_VERSION;
5
+ export type TreeseedSceneEnvironment = typeof TREESEED_SCENE_ENVIRONMENTS[number];
6
+ export type TreeseedSceneBrowser = typeof TREESEED_SCENE_BROWSERS[number];
7
+ export type TreeseedScenePhase = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
8
+ export type TreeseedSceneCapabilityStatus = 'available' | 'deferred' | 'planned' | 'blocked';
9
+ export type TreeseedSceneCapabilityOwner = '@treeseed/sdk' | '@treeseed/cli' | '@treeseed/market' | '@treeseed/ui' | '@treeseed/admin' | '@treeseed/core' | '@treeseed/api' | '@treeseed/agent';
10
+ export type TreeseedSceneCapability = {
11
+ id: string;
12
+ status: TreeseedSceneCapabilityStatus;
13
+ owner: TreeseedSceneCapabilityOwner;
14
+ summary: string;
15
+ };
16
+ export type TreeseedSceneArtifactPathPlan = {
17
+ workspaceRoot: string;
18
+ sceneId: string;
19
+ runId: string;
20
+ runRoot: string;
21
+ normalizedScenePath: string;
22
+ planPath: string;
23
+ runPath: string;
24
+ timelinePath: string;
25
+ markdownReportPath: string;
26
+ htmlReportPath: string;
27
+ playwrightRoot: string;
28
+ logsRoot: string;
29
+ segmentsRoot: string;
30
+ renderRoot: string;
31
+ trainingRoot: string;
32
+ evidenceRoot: string;
33
+ publishRoot: string;
34
+ publishPlanRoot: string;
35
+ progressPath: string;
36
+ checkpointsRoot: string;
37
+ };
38
+ export type TreeseedSceneDiagnosticSeverity = 'error' | 'warning';
39
+ export type TreeseedSceneDiagnostic = {
40
+ severity: TreeseedSceneDiagnosticSeverity;
41
+ code: string;
42
+ message: string;
43
+ path?: string;
44
+ };
45
+ export type TreeseedSceneMode = {
46
+ test: boolean;
47
+ demo: boolean;
48
+ training: boolean;
49
+ };
50
+ export type TreeseedSceneDeviceProfileId = 'desktop' | 'tablet' | 'mobile' | string;
51
+ export type TreeseedSceneDeviceOrientation = 'landscape' | 'portrait';
52
+ export type TreeseedSceneDeviceProfile = {
53
+ id: TreeseedSceneDeviceProfileId;
54
+ title?: string;
55
+ orientation?: TreeseedSceneDeviceOrientation;
56
+ viewport: {
57
+ width: number;
58
+ height: number;
59
+ };
60
+ video?: {
61
+ width: number;
62
+ height: number;
63
+ };
64
+ output?: {
65
+ width: number;
66
+ height: number;
67
+ };
68
+ userAgent?: string;
69
+ deviceScaleFactor?: number;
70
+ isMobile?: boolean;
71
+ hasTouch?: boolean;
72
+ browserFrame?: {
73
+ enabled: boolean;
74
+ title?: string;
75
+ chrome?: 'desktop' | 'tablet' | 'mobile';
76
+ };
77
+ };
78
+ export type TreeseedSceneDeviceConfig = {
79
+ defaultProfile: TreeseedSceneDeviceProfileId;
80
+ profiles: TreeseedSceneDeviceProfile[];
81
+ };
82
+ export type TreeseedSceneTarget = {
83
+ app: string;
84
+ environment: TreeseedSceneEnvironment;
85
+ baseUrl: string | 'auto';
86
+ viewport: {
87
+ width: number;
88
+ height: number;
89
+ };
90
+ browser: TreeseedSceneBrowser;
91
+ };
92
+ export type TreeseedSceneSetup = {
93
+ dev?: {
94
+ required: boolean;
95
+ command?: string;
96
+ reuseExisting: boolean;
97
+ };
98
+ auth?: {
99
+ profile?: string;
100
+ required: boolean;
101
+ role?: TreeseedSceneVisualAuditRole;
102
+ };
103
+ seed?: {
104
+ name?: string;
105
+ environments: TreeseedSceneEnvironment[];
106
+ apply: boolean;
107
+ };
108
+ };
109
+ export type TreeseedSceneArtifacts = {
110
+ trace: boolean;
111
+ video: boolean;
112
+ screenshots: boolean;
113
+ console: boolean;
114
+ network: boolean;
115
+ timeline: boolean;
116
+ appLogs: boolean;
117
+ };
118
+ export type TreeseedSceneVisualAuditConfig = {
119
+ enabled: boolean;
120
+ roles: TreeseedSceneVisualAuditRole[];
121
+ pathRoots: string[];
122
+ pathGlobs: string[];
123
+ excludePathGlobs: string[];
124
+ includeFullPage: boolean;
125
+ review: {
126
+ enabled: boolean;
127
+ detail: TreeseedSceneVisualAuditReviewDetail;
128
+ maxFindings: number;
129
+ contactSheets: boolean;
130
+ };
131
+ routeDiscovery: {
132
+ core: boolean;
133
+ admin: boolean;
134
+ tenantOverrides: boolean;
135
+ contentCollections: boolean;
136
+ };
137
+ };
138
+ export type TreeseedSceneSelector = {
139
+ scene: string;
140
+ } | {
141
+ testId: string;
142
+ } | {
143
+ role: string;
144
+ name?: string;
145
+ } | {
146
+ text: string;
147
+ } | {
148
+ css: string;
149
+ brittle?: boolean;
150
+ internal?: boolean;
151
+ };
152
+ export type TreeseedSceneOperationWaitSpec = {
153
+ id?: string;
154
+ kind?: string;
155
+ status: string[];
156
+ timeoutSeconds?: number;
157
+ pollIntervalSeconds?: number;
158
+ source?: 'linked' | 'latestMatching' | 'explicit';
159
+ };
160
+ export type TreeseedSceneAction = {
161
+ goto: string;
162
+ } | {
163
+ click: TreeseedSceneSelector;
164
+ } | {
165
+ fill: TreeseedSceneSelector & {
166
+ value: string;
167
+ };
168
+ } | {
169
+ select: TreeseedSceneSelector & {
170
+ value?: string;
171
+ label?: string;
172
+ };
173
+ } | {
174
+ keyboard: string;
175
+ } | {
176
+ pause: {
177
+ mode: 'manual' | 'timed';
178
+ prompt?: string;
179
+ durationSeconds?: number;
180
+ };
181
+ } | {
182
+ mailpitConfirmLatest: {
183
+ mailpitUrl: string;
184
+ email: string;
185
+ subjectIncludes?: string;
186
+ displayInboxSeconds?: number;
187
+ displayMessageSeconds?: number;
188
+ };
189
+ } | {
190
+ apiRequest: Record<string, unknown>;
191
+ } | {
192
+ waitForOperation: TreeseedSceneOperationWaitSpec;
193
+ };
194
+ export type TreeseedSceneExpectation = {
195
+ visible?: TreeseedSceneSelector[];
196
+ text?: string;
197
+ urlIncludes?: string;
198
+ operation?: {
199
+ id?: string;
200
+ kind: string;
201
+ status: string[];
202
+ timeoutSeconds?: number;
203
+ pollIntervalSeconds?: number;
204
+ source?: 'linked' | 'latestMatching' | 'explicit';
205
+ };
206
+ };
207
+ export type TreeseedSceneWorkflowStep = {
208
+ id: string;
209
+ title: string;
210
+ action: TreeseedSceneAction;
211
+ expect?: TreeseedSceneExpectation;
212
+ demoOnly?: boolean;
213
+ timeoutSeconds?: number;
214
+ continueOnFailure?: boolean;
215
+ checkpoint?: {
216
+ id?: string;
217
+ resumable?: boolean;
218
+ };
219
+ };
220
+ export type TreeseedSceneChapter = {
221
+ id: string;
222
+ title: string;
223
+ startsAt: string;
224
+ };
225
+ export type TreeseedSceneOverlay = {
226
+ id: string;
227
+ at: string;
228
+ renderer: string;
229
+ type: string;
230
+ text?: string;
231
+ anchor?: TreeseedSceneSelector;
232
+ variant?: TreeseedSceneOverlayVariant;
233
+ region?: TreeseedSceneVisualRegion;
234
+ position?: TreeseedSceneVisualPoint;
235
+ size?: TreeseedSceneVisualSize;
236
+ style?: TreeseedSceneVisualStyle;
237
+ motion?: TreeseedSceneMotion;
238
+ objects?: TreeseedSceneVisualObject[];
239
+ durationSeconds?: number;
240
+ };
241
+ export type TreeseedSceneDiagramPlacement = 'overlay' | 'interstitial' | 'standalone';
242
+ export type TreeseedSceneDiagram = {
243
+ id: string;
244
+ renderer: string;
245
+ at: string;
246
+ component: string;
247
+ durationSeconds?: number;
248
+ placement: TreeseedSceneDiagramPlacement;
249
+ props?: Record<string, unknown>;
250
+ objects?: TreeseedSceneVisualObject[];
251
+ motion?: TreeseedSceneMotion;
252
+ style?: TreeseedSceneVisualStyle;
253
+ };
254
+ export type TreeseedSceneVisualUnit = 'px' | 'percent';
255
+ export type TreeseedSceneVisualPoint = {
256
+ x: number;
257
+ y: number;
258
+ unit?: TreeseedSceneVisualUnit;
259
+ };
260
+ export type TreeseedSceneVisualSize = {
261
+ width: number;
262
+ height: number;
263
+ unit?: TreeseedSceneVisualUnit;
264
+ };
265
+ export type TreeseedSceneVisualRegion = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
266
+ export type TreeseedSceneVisualTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'brand';
267
+ export type TreeseedSceneMotionEasing = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
268
+ export type TreeseedSceneMotionKeyframe = {
269
+ at: number;
270
+ unit?: 'seconds' | 'progress';
271
+ position?: TreeseedSceneVisualPoint;
272
+ size?: TreeseedSceneVisualSize;
273
+ opacity?: number;
274
+ scale?: number;
275
+ rotateDeg?: number;
276
+ easing?: TreeseedSceneMotionEasing;
277
+ };
278
+ export type TreeseedSceneMotion = {
279
+ keyframes: TreeseedSceneMotionKeyframe[];
280
+ loop?: boolean;
281
+ };
282
+ export type TreeseedSceneVisualStyle = {
283
+ tone?: TreeseedSceneVisualTone;
284
+ background?: string;
285
+ color?: string;
286
+ borderColor?: string;
287
+ borderWidth?: number;
288
+ radius?: number;
289
+ shadow?: 'none' | 'soft' | 'medium' | 'strong';
290
+ opacity?: number;
291
+ };
292
+ export type TreeseedSceneVisualObjectType = 'text' | 'box' | 'circle' | 'line' | 'arrow' | 'badge' | 'cursor' | 'spotlight';
293
+ export type TreeseedSceneVisualObject = {
294
+ id: string;
295
+ type: TreeseedSceneVisualObjectType;
296
+ text?: string;
297
+ position?: TreeseedSceneVisualPoint;
298
+ size?: TreeseedSceneVisualSize;
299
+ region?: TreeseedSceneVisualRegion;
300
+ style?: TreeseedSceneVisualStyle;
301
+ motion?: TreeseedSceneMotion;
302
+ from?: TreeseedSceneVisualPoint;
303
+ to?: TreeseedSceneVisualPoint;
304
+ };
305
+ export type TreeseedSceneOverlayVariant = 'callout' | 'spotlight' | 'label' | 'panel' | 'lower-third' | 'badge' | 'cursor' | 'custom';
306
+ export type TreeseedSceneRenderEvidenceFit = 'fixed-browser' | 'contain' | 'cover';
307
+ export type TreeseedSceneRenderCaptureConfig = {
308
+ viewport?: {
309
+ width: number;
310
+ height: number;
311
+ };
312
+ video?: {
313
+ width: number;
314
+ height: number;
315
+ };
316
+ evidenceFit: TreeseedSceneRenderEvidenceFit;
317
+ };
318
+ export type TreeseedSceneRenderConfig = {
319
+ remotion?: {
320
+ composition?: string;
321
+ output?: {
322
+ format?: string;
323
+ fps?: number;
324
+ resolution?: {
325
+ width: number;
326
+ height: number;
327
+ };
328
+ };
329
+ capture?: TreeseedSceneRenderCaptureConfig;
330
+ browserFrame?: {
331
+ enabled: boolean;
332
+ title?: string;
333
+ };
334
+ };
335
+ };
336
+ export type TreeseedSceneTrainingOutputFormat = 'json' | 'markdown' | 'vtt' | 'srt';
337
+ export type TreeseedSceneTrainingNarrationStyle = 'concise' | 'instructional' | 'operator';
338
+ export type TreeseedSceneGlossaryTerm = {
339
+ term: string;
340
+ definition?: string;
341
+ sourceStep?: string;
342
+ tags?: string[];
343
+ };
344
+ export type TreeseedSceneTrainingConfig = {
345
+ enabled: boolean;
346
+ captions: {
347
+ enabled: boolean;
348
+ formats: Array<'vtt' | 'srt'>;
349
+ maxCueSeconds: number;
350
+ renderInTrainingVideo: boolean;
351
+ };
352
+ transcript: {
353
+ enabled: boolean;
354
+ formats: Array<'json' | 'markdown'>;
355
+ };
356
+ narration: {
357
+ enabled: boolean;
358
+ style: TreeseedSceneTrainingNarrationStyle;
359
+ includeDiagnostics: boolean;
360
+ };
361
+ glossary: {
362
+ enabled: boolean;
363
+ terms: TreeseedSceneGlossaryTerm[];
364
+ };
365
+ chapterClips: {
366
+ enabled: boolean;
367
+ format: 'manifest';
368
+ };
369
+ };
370
+ export type TreeseedSceneExecutionMode = 'acceptance' | 'demo' | 'training' | 'record-only';
371
+ export type TreeseedSceneRuntimeConfig = {
372
+ mode: TreeseedSceneExecutionMode;
373
+ timeouts: {
374
+ sceneSeconds: number | null;
375
+ chapterSeconds: number | null;
376
+ stepSeconds: number;
377
+ };
378
+ checkpoints: {
379
+ enabled: boolean;
380
+ defaultResumable: boolean;
381
+ everyStep: boolean;
382
+ };
383
+ progress: {
384
+ heartbeatSeconds: number;
385
+ };
386
+ failure: {
387
+ continueOnFailure: boolean;
388
+ };
389
+ };
390
+ export type TreeseedSceneManifest = {
391
+ schemaVersion: TreeseedSceneSchemaVersion;
392
+ id: string;
393
+ title: string;
394
+ description?: string;
395
+ audience: string[];
396
+ mode: TreeseedSceneMode;
397
+ target: TreeseedSceneTarget;
398
+ devices: TreeseedSceneDeviceConfig;
399
+ setup: TreeseedSceneSetup;
400
+ artifacts: TreeseedSceneArtifacts;
401
+ workflow: TreeseedSceneWorkflowStep[];
402
+ chapters: TreeseedSceneChapter[];
403
+ overlays: TreeseedSceneOverlay[];
404
+ diagrams: TreeseedSceneDiagram[];
405
+ render: TreeseedSceneRenderConfig;
406
+ runtime: TreeseedSceneRuntimeConfig;
407
+ training: TreeseedSceneTrainingConfig;
408
+ visualAudit: TreeseedSceneVisualAuditConfig;
409
+ };
410
+ export type LoadedTreeseedSceneDocument = {
411
+ path: string;
412
+ value: unknown;
413
+ diagnostics: TreeseedSceneDiagnostic[];
414
+ };
415
+ export type TreeseedSceneValidationReport = {
416
+ ok: boolean;
417
+ scenePath: string;
418
+ scene: TreeseedSceneManifest | null;
419
+ diagnostics: TreeseedSceneDiagnostic[];
420
+ };
421
+ export type TreeseedScenePlanStep = {
422
+ id: string;
423
+ title: string;
424
+ actionKind: string;
425
+ assertionKinds: string[];
426
+ chapterId: string | null;
427
+ demoOnly: boolean;
428
+ };
429
+ export type TreeseedScenePlanReport = {
430
+ ok: boolean;
431
+ phase: 1;
432
+ scenePath: string;
433
+ sceneId: string | null;
434
+ title: string | null;
435
+ environment: TreeseedSceneEnvironment;
436
+ baseUrl: string | 'auto';
437
+ browser: TreeseedSceneBrowser | null;
438
+ viewport: {
439
+ width: number;
440
+ height: number;
441
+ } | null;
442
+ workflowSteps: TreeseedScenePlanStep[];
443
+ enabledActions: string[];
444
+ enabledAssertions: string[];
445
+ enabledRenderers: string[];
446
+ enabledDiagrams: string[];
447
+ enabledDiagramPlugins: string[];
448
+ enabledTrainingOutputs: string[];
449
+ enabledNarrationPlugins: string[];
450
+ enabledDeviceProfiles: string[];
451
+ enabledPlugins: string[];
452
+ plugins: TreeseedScenePluginSummary[];
453
+ pluginDiagnostics: TreeseedSceneDiagnostic[];
454
+ artifactPaths: TreeseedSceneArtifactPathPlan | null;
455
+ diagnostics: TreeseedSceneDiagnostic[];
456
+ warnings: TreeseedSceneDiagnostic[];
457
+ blockers: TreeseedSceneDiagnostic[];
458
+ estimatedDurationSeconds: number | null;
459
+ };
460
+ export type TreeseedSceneRunStatus = 'passed' | 'failed' | 'blocked';
461
+ export type TreeseedSceneStepStatus = 'passed' | 'failed' | 'skipped';
462
+ export type TreeseedSceneRunPhase = 2 | 3 | 4 | 5;
463
+ export type TreeseedSceneRenderPhase = 6;
464
+ export type TreeseedSceneVisualAuditPhase = 11;
465
+ export type TreeseedSceneRenderFormat = 'mp4';
466
+ export type TreeseedSceneRenderMode = 'demo' | 'training' | 'failure-review' | 'chapter' | 'diagram-only';
467
+ export type TreeseedSceneRunOptions = {
468
+ projectRoot: string;
469
+ scene: string | TreeseedSceneManifest;
470
+ environment?: TreeseedSceneEnvironment;
471
+ device?: TreeseedSceneDeviceProfileId;
472
+ record?: boolean;
473
+ runId?: string;
474
+ timestamp?: string;
475
+ browserAdapter?: TreeseedSceneBrowserAdapter;
476
+ environmentAdapter?: TreeseedSceneEnvironmentAdapter;
477
+ authResolver?: TreeseedSceneAuthResolver;
478
+ seedRunner?: TreeseedSceneSeedRunner;
479
+ operationWaiter?: TreeseedSceneOperationWaiter;
480
+ logCollector?: TreeseedSceneLogCollector;
481
+ plugins?: TreeseedScenePlugin[];
482
+ mode?: TreeseedSceneExecutionMode;
483
+ interactive?: boolean;
484
+ pauseController?: TreeseedScenePauseController;
485
+ onProgress?: (event: TreeseedSceneProgressEvent) => void;
486
+ sleep?: (ms: number) => Promise<void>;
487
+ };
488
+ export type TreeseedSceneDeviceMatrixOptions = {
489
+ projectRoot: string;
490
+ scene: string;
491
+ environment?: TreeseedSceneEnvironment;
492
+ devices?: TreeseedSceneDeviceProfileId[];
493
+ record?: boolean;
494
+ mode?: TreeseedSceneExecutionMode;
495
+ timestamp?: string;
496
+ browserAdapter?: TreeseedSceneBrowserAdapter;
497
+ };
498
+ export type TreeseedSceneDeviceMatrixReport = {
499
+ ok: boolean;
500
+ phase: 11;
501
+ sceneId: string | null;
502
+ matrixId: string | null;
503
+ scenePath: string;
504
+ devices: TreeseedSceneDeviceProfileId[];
505
+ runReports: TreeseedSceneRunReport[];
506
+ matrixRoot: string | null;
507
+ matrixPath: string | null;
508
+ diagnostics: TreeseedSceneDiagnostic[];
509
+ warnings: TreeseedSceneDiagnostic[];
510
+ blockers: TreeseedSceneDiagnostic[];
511
+ };
512
+ export type TreeseedSceneVisualAuditRole = 'anonymous' | 'owner' | 'admin' | 'member' | string;
513
+ export type TreeseedSceneVisualAuditRouteSource = 'core-route-registry' | 'admin-route-registry' | 'tenant-page-override' | 'content-collection' | 'explicit-manifest';
514
+ export type TreeseedSceneVisualAuditReviewDetail = 'summary' | 'standard' | 'full';
515
+ export type TreeseedSceneVisualAuditReviewCategory = 'functional' | 'client-error' | 'display' | 'content' | 'architecture';
516
+ export type TreeseedSceneVisualAuditFindingSeverity = 'blocking' | 'high' | 'medium' | 'low' | 'info';
517
+ export type TreeseedSceneVisualAuditFindingOwner = '@treeseed/ui' | '@treeseed/admin' | '@treeseed/core' | '@treeseed/market' | '@treeseed/api' | '@treeseed/sdk' | '@treeseed/cli' | 'unknown';
518
+ export type TreeseedSceneVisualAuditRoute = {
519
+ id: string;
520
+ path: string;
521
+ pathRoot: string;
522
+ title?: string | null;
523
+ source: TreeseedSceneVisualAuditRouteSource;
524
+ requiresAuth: boolean;
525
+ roles: TreeseedSceneVisualAuditRole[];
526
+ dynamic: boolean;
527
+ contentCollection?: string | null;
528
+ contentSlug?: string | null;
529
+ expectedStatus?: number | number[] | null;
530
+ expectedFinalPath?: string | null;
531
+ expectedAuthRedirect?: boolean;
532
+ expectedEmpty?: boolean;
533
+ };
534
+ export type TreeseedSceneVisualAuditCapture = {
535
+ id: string;
536
+ routeId: string;
537
+ path: string;
538
+ pathRoot: string;
539
+ role: TreeseedSceneVisualAuditRole;
540
+ device: TreeseedSceneDeviceProfileId;
541
+ url: string;
542
+ status: 'captured' | 'failed' | 'skipped';
543
+ httpStatus: number | null;
544
+ finalUrl: string | null;
545
+ screenshotPath: string | null;
546
+ fullPageScreenshotPath: string | null;
547
+ capturedAt: string;
548
+ durationMs: number;
549
+ dom?: TreeseedSceneVisualAuditDomSummary | null;
550
+ clientErrors?: TreeseedSceneVisualAuditClientError[];
551
+ diagnostics: TreeseedSceneDiagnostic[];
552
+ };
553
+ export type TreeseedSceneVisualAuditClientError = {
554
+ id: string;
555
+ captureId: string;
556
+ kind: 'console' | 'pageerror' | 'requestfailed' | 'http-error' | 'uncaught-exception';
557
+ severity: 'warning' | 'error';
558
+ message: string;
559
+ url: string | null;
560
+ method?: string | null;
561
+ status?: number | null;
562
+ timestamp: string;
563
+ path?: string;
564
+ pathRoot?: string;
565
+ role?: TreeseedSceneVisualAuditRole;
566
+ device?: TreeseedSceneDeviceProfileId;
567
+ screenshotPath?: string | null;
568
+ finalUrl?: string | null;
569
+ };
570
+ export type TreeseedSceneVisualAuditDomSummary = {
571
+ title: string | null;
572
+ h1: string | null;
573
+ headings: string[];
574
+ visibleTextSample: string;
575
+ bodyTextLength: number;
576
+ visibleLinkCount: number;
577
+ visibleButtonCount: number;
578
+ visibleInputCount: number;
579
+ visibleFormCount: number;
580
+ appShellDetected: boolean;
581
+ authShellDetected: boolean;
582
+ publicShellDetected: boolean;
583
+ horizontalOverflow: boolean;
584
+ scrollWidth: number;
585
+ scrollHeight: number;
586
+ viewportWidth: number;
587
+ viewportHeight: number;
588
+ defaultStyledLinks: Array<{
589
+ text: string;
590
+ href: string | null;
591
+ selectorHint: string | null;
592
+ }>;
593
+ defaultStyledButtons: Array<{
594
+ text: string;
595
+ selectorHint: string | null;
596
+ }>;
597
+ visibleErrorTexts: string[];
598
+ seededEntityTexts: string[];
599
+ };
600
+ export type TreeseedSceneVisualAuditFinding = {
601
+ id: string;
602
+ severity: TreeseedSceneVisualAuditFindingSeverity;
603
+ category: TreeseedSceneVisualAuditReviewCategory;
604
+ code: string;
605
+ title: string;
606
+ message: string;
607
+ path: string;
608
+ pathRoot: string;
609
+ role: TreeseedSceneVisualAuditRole;
610
+ device: TreeseedSceneDeviceProfileId;
611
+ captureId: string;
612
+ screenshotPath: string | null;
613
+ finalUrl: string | null;
614
+ suspectedOwner: TreeseedSceneVisualAuditFindingOwner;
615
+ architectureGuidance: string;
616
+ evidence: Record<string, unknown>;
617
+ };
618
+ export type TreeseedSceneVisualAuditRootCause = {
619
+ id: string;
620
+ severity: TreeseedSceneVisualAuditFindingSeverity;
621
+ category: TreeseedSceneVisualAuditReviewCategory;
622
+ code: string;
623
+ title: string;
624
+ message: string;
625
+ suspectedOwner: TreeseedSceneVisualAuditFindingOwner;
626
+ count: number;
627
+ pathRoots: string[];
628
+ paths: string[];
629
+ roles: TreeseedSceneVisualAuditRole[];
630
+ devices: TreeseedSceneDeviceProfileId[];
631
+ findingIds: string[];
632
+ captureIds: string[];
633
+ exampleScreenshotPath: string | null;
634
+ architectureGuidance: string;
635
+ recommendedAction: string;
636
+ priorityScore: number;
637
+ priorityRank: number;
638
+ impact: {
639
+ pathCount: number;
640
+ roleCount: number;
641
+ deviceCount: number;
642
+ captureCount: number;
643
+ };
644
+ query: {
645
+ owner: TreeseedSceneVisualAuditFindingOwner;
646
+ severity: TreeseedSceneVisualAuditFindingSeverity;
647
+ code: string;
648
+ pathRoots: string[];
649
+ };
650
+ };
651
+ export type TreeseedSceneVisualAuditClientErrorIncident = {
652
+ id: string;
653
+ severity: TreeseedSceneVisualAuditFindingSeverity;
654
+ primaryKind: TreeseedSceneVisualAuditClientError['kind'];
655
+ code: string;
656
+ title: string;
657
+ message: string;
658
+ normalizedMessage: string;
659
+ suspectedOwner: TreeseedSceneVisualAuditFindingOwner;
660
+ count: number;
661
+ pathRoots: string[];
662
+ paths: string[];
663
+ roles: TreeseedSceneVisualAuditRole[];
664
+ devices: TreeseedSceneDeviceProfileId[];
665
+ captureIds: string[];
666
+ errorIds: string[];
667
+ exampleScreenshotPath: string | null;
668
+ exampleFinalUrl: string | null;
669
+ status: number | null;
670
+ url: string | null;
671
+ priorityScore: number;
672
+ priorityRank: number;
673
+ recommendedAction: string;
674
+ architectureGuidance: string;
675
+ };
676
+ export type TreeseedSceneVisualAuditReviewSummary = {
677
+ generatedAt: string;
678
+ detail: TreeseedSceneVisualAuditReviewDetail;
679
+ routeCount: number;
680
+ captureCount: number;
681
+ findingCount: number;
682
+ rootCauseCount: number;
683
+ incidentCount: number;
684
+ clientErrorCount: number;
685
+ highestPriorityScore: number;
686
+ byPriorityBand: {
687
+ critical: number;
688
+ high: number;
689
+ medium: number;
690
+ low: number;
691
+ };
692
+ bySeverity: Record<TreeseedSceneVisualAuditFindingSeverity, number>;
693
+ byCategory: Record<TreeseedSceneVisualAuditReviewCategory, number>;
694
+ byOwner: Record<TreeseedSceneVisualAuditFindingOwner, number>;
695
+ byPathRoot: Record<string, number>;
696
+ };
697
+ export type TreeseedSceneVisualAuditReview = {
698
+ schemaVersion: 'treeseed.scene.visual-audit-review/v1';
699
+ generatedAt: string;
700
+ auditId: string;
701
+ sceneId: string | null;
702
+ summary: TreeseedSceneVisualAuditReviewSummary;
703
+ findings: TreeseedSceneVisualAuditFinding[];
704
+ rootCauses: TreeseedSceneVisualAuditRootCause[];
705
+ incidents: TreeseedSceneVisualAuditClientErrorIncident[];
706
+ clientErrors: TreeseedSceneVisualAuditClientError[];
707
+ diagnostics: TreeseedSceneDiagnostic[];
708
+ };
709
+ export type TreeseedSceneVisualAuditManifest = {
710
+ schemaVersion: 'treeseed.scene.visual-audit/v1';
711
+ phase: 11;
712
+ generatedAt: string;
713
+ sceneId: string | null;
714
+ auditId: string;
715
+ baseUrl: string | null;
716
+ roles: TreeseedSceneVisualAuditRole[];
717
+ devices: TreeseedSceneDeviceProfileId[];
718
+ routes: TreeseedSceneVisualAuditRoute[];
719
+ captures: TreeseedSceneVisualAuditCapture[];
720
+ diagnostics: TreeseedSceneDiagnostic[];
721
+ };
722
+ export type TreeseedSceneVisualAuditPaths = {
723
+ auditRoot: string;
724
+ manifestPath: string;
725
+ reportPath: string;
726
+ screenshotsRoot: string;
727
+ reviewRoot: string | null;
728
+ reviewSummaryPath: string | null;
729
+ reviewFindingsPath: string | null;
730
+ reviewAgentBriefPath: string | null;
731
+ };
732
+ export type TreeseedSceneVisualAuditOptions = {
733
+ projectRoot: string;
734
+ scene: string;
735
+ environment?: TreeseedSceneEnvironment;
736
+ roles?: TreeseedSceneVisualAuditRole[];
737
+ devices?: TreeseedSceneDeviceProfileId[];
738
+ pathRoots?: string[];
739
+ pathGlobs?: string[];
740
+ excludePathGlobs?: string[];
741
+ includeFullPage?: boolean;
742
+ review?: boolean;
743
+ reviewDetail?: TreeseedSceneVisualAuditReviewDetail;
744
+ maxFindings?: number;
745
+ preflight?: boolean;
746
+ timestamp?: string;
747
+ };
748
+ export type TreeseedSceneVisualAuditReport = {
749
+ ok: boolean;
750
+ phase: 11;
751
+ sceneId: string | null;
752
+ auditId: string | null;
753
+ scenePath: string;
754
+ baseUrl: string | null;
755
+ roles: TreeseedSceneVisualAuditRole[];
756
+ devices: TreeseedSceneDeviceProfileId[];
757
+ routeCount: number;
758
+ captureCount: number;
759
+ failedCount: number;
760
+ skippedCount: number;
761
+ auditRoot: string | null;
762
+ paths: TreeseedSceneVisualAuditPaths | null;
763
+ manifest: TreeseedSceneVisualAuditManifest | null;
764
+ review: TreeseedSceneVisualAuditReview | null;
765
+ reviewFindingCount: number;
766
+ rootCauseCount: number;
767
+ incidentCount: number;
768
+ clientErrorCount: number;
769
+ diagnostics: TreeseedSceneDiagnostic[];
770
+ warnings: TreeseedSceneDiagnostic[];
771
+ blockers: TreeseedSceneDiagnostic[];
772
+ };
773
+ export type TreeseedSceneObservedError = {
774
+ message: string;
775
+ timestamp: string;
776
+ stepId?: string;
777
+ url?: string;
778
+ method?: string;
779
+ status?: number;
780
+ };
781
+ export type TreeseedSceneAssertionRunReport = {
782
+ kind: string;
783
+ status: 'passed' | 'failed';
784
+ startedAt: string;
785
+ finishedAt: string;
786
+ durationMs: number;
787
+ message?: string;
788
+ selector?: TreeseedSceneSelector;
789
+ error?: TreeseedSceneDiagnostic;
790
+ operationId?: string | null;
791
+ };
792
+ export type TreeseedSceneRunStepReport = {
793
+ id: string;
794
+ title: string;
795
+ actionKind: string;
796
+ startedAt: string;
797
+ finishedAt: string;
798
+ durationMs: number;
799
+ status: TreeseedSceneStepStatus;
800
+ retryCount: 0;
801
+ assertionResults: TreeseedSceneAssertionRunReport[];
802
+ screenshotPath: string | null;
803
+ viewportScreenshotPath?: string | null;
804
+ traceLocation: string | null;
805
+ consoleErrors: TreeseedSceneObservedError[];
806
+ networkErrors: TreeseedSceneObservedError[];
807
+ operationIds: string[];
808
+ error?: TreeseedSceneDiagnostic;
809
+ };
810
+ export type TreeseedSceneRunArtifacts = {
811
+ runRoot: string;
812
+ normalizedScenePath: string;
813
+ planPath: string;
814
+ runPath: string;
815
+ timelinePath: string;
816
+ markdownReportPath: string;
817
+ playwrightTracePath: string | null;
818
+ screenshotPaths: string[];
819
+ viewportScreenshotPaths?: string[];
820
+ videoPaths: string[];
821
+ consoleLogPath: string | null;
822
+ networkLogPath: string | null;
823
+ errorsLogPath: string | null;
824
+ setupPath?: string | null;
825
+ devLogPath?: string | null;
826
+ apiLogPath?: string | null;
827
+ operationsRunnerLogPath?: string | null;
828
+ progressPath?: string | null;
829
+ checkpointsRoot?: string | null;
830
+ };
831
+ export type TreeseedSceneCheckpointStatus = 'created' | 'skipped' | 'not_resumable';
832
+ export type TreeseedSceneCheckpoint = {
833
+ id: string;
834
+ sceneId: string;
835
+ runId: string;
836
+ stepId: string;
837
+ chapterId: string;
838
+ segmentId: string;
839
+ createdAt: string;
840
+ resumable: boolean;
841
+ completedStepIds: string[];
842
+ nextStepId: string | null;
843
+ artifactPaths: {
844
+ checkpointPath: string;
845
+ runRoot: string;
846
+ timelinePath: string;
847
+ reportPath: string;
848
+ };
849
+ };
850
+ export type TreeseedSceneRunChapterReport = {
851
+ id: string;
852
+ title: string;
853
+ startedAt: string;
854
+ finishedAt: string | null;
855
+ durationMs: number;
856
+ status: TreeseedSceneRunStatus;
857
+ stepIds: string[];
858
+ segmentIds: string[];
859
+ };
860
+ export type TreeseedSceneRunSegmentReport = {
861
+ id: string;
862
+ chapterId: string;
863
+ startedAt: string;
864
+ finishedAt: string | null;
865
+ durationMs: number;
866
+ status: TreeseedSceneRunStatus;
867
+ stepIds: string[];
868
+ timelinePath: string;
869
+ stepsPath: string;
870
+ segmentPath: string;
871
+ videoRefs: Array<{
872
+ path: string;
873
+ startOffsetMs: number;
874
+ endOffsetMs: number;
875
+ }>;
876
+ };
877
+ export type TreeseedSceneProgressEventType = 'scene.run.started' | 'scene.run.heartbeat' | 'scene.run.finished' | 'setup.started' | 'setup.finished' | 'chapter.started' | 'chapter.finished' | 'segment.started' | 'segment.finished' | 'step.started' | 'step.finished' | 'checkpoint.written' | 'pause.waiting' | 'pause.resumed' | 'resume.started' | 'resume.replay.started' | 'resume.replay.finished' | 'resume.finished';
878
+ export type TreeseedSceneProgressEvent = {
879
+ type: TreeseedSceneProgressEventType;
880
+ sceneId: string | null;
881
+ runId: string | null;
882
+ timestamp: string;
883
+ offsetMs: number;
884
+ chapterId?: string | null;
885
+ segmentId?: string | null;
886
+ stepId?: string | null;
887
+ checkpointId?: string | null;
888
+ status?: string;
889
+ data: Record<string, unknown>;
890
+ };
891
+ export type TreeseedScenePauseController = (input: {
892
+ sceneId: string;
893
+ stepId: string;
894
+ title: string;
895
+ prompt?: string;
896
+ }) => Promise<{
897
+ ok: boolean;
898
+ diagnostics: TreeseedSceneDiagnostic[];
899
+ }>;
900
+ export type TreeseedSceneEnvironmentPrepareReport = {
901
+ ok: boolean;
902
+ environment: TreeseedSceneEnvironment;
903
+ readiness: unknown | null;
904
+ dev: {
905
+ requested: boolean;
906
+ reused: boolean;
907
+ started: boolean;
908
+ instances: unknown[];
909
+ baseUrl: string | null;
910
+ };
911
+ diagnostics: TreeseedSceneDiagnostic[];
912
+ };
913
+ export type TreeseedSceneAuthReport = {
914
+ ok: boolean;
915
+ required: boolean;
916
+ profileId: string | null;
917
+ authRoot: string | null;
918
+ hasSession: boolean;
919
+ diagnostics: TreeseedSceneDiagnostic[];
920
+ };
921
+ export type TreeseedSceneSeedReport = {
922
+ ok: boolean;
923
+ requested: boolean;
924
+ seedName: string | null;
925
+ mode: 'none' | 'validate' | 'plan' | 'apply';
926
+ environments: TreeseedSceneEnvironment[];
927
+ plan: unknown | null;
928
+ result: unknown | null;
929
+ diagnostics: TreeseedSceneDiagnostic[];
930
+ };
931
+ export type TreeseedSceneOperationWaitReport = {
932
+ ok: boolean;
933
+ operationId: string | null;
934
+ kind: string | null;
935
+ finalStatus: string | null;
936
+ acceptedStatuses: string[];
937
+ events: unknown[];
938
+ durationMs: number;
939
+ diagnostics: TreeseedSceneDiagnostic[];
940
+ };
941
+ export type TreeseedSceneRunSetupReport = {
942
+ environment: TreeseedSceneEnvironmentPrepareReport | null;
943
+ auth: TreeseedSceneAuthReport | null;
944
+ seed: TreeseedSceneSeedReport | null;
945
+ };
946
+ export type TreeseedSceneEnvironmentPrepareOptions = {
947
+ projectRoot: string;
948
+ scene: TreeseedSceneManifest;
949
+ environment: TreeseedSceneEnvironment;
950
+ env?: NodeJS.ProcessEnv | Record<string, string | undefined>;
951
+ };
952
+ export type TreeseedSceneAuthResolveOptions = {
953
+ projectRoot: string;
954
+ scene: TreeseedSceneManifest;
955
+ environment: TreeseedSceneEnvironment;
956
+ };
957
+ export type TreeseedSceneSeedOptions = {
958
+ projectRoot: string;
959
+ scene: TreeseedSceneManifest;
960
+ environment: TreeseedSceneEnvironment;
961
+ auth: TreeseedSceneAuthReport | null;
962
+ env?: NodeJS.ProcessEnv | Record<string, string | undefined>;
963
+ };
964
+ export type TreeseedSceneOperationWaitOptions = {
965
+ projectRoot: string;
966
+ scene: TreeseedSceneManifest;
967
+ environment: TreeseedSceneEnvironment;
968
+ baseUrl: string;
969
+ spec: TreeseedSceneOperationWaitSpec;
970
+ linkedOperationIds?: string[];
971
+ onUpdate?: (report: TreeseedSceneOperationWaitReport) => void;
972
+ fetchOperation?: (operationId: string) => Promise<Record<string, unknown>>;
973
+ fetchEvents?: (operationId: string) => Promise<unknown[]>;
974
+ sleep?: (ms: number) => Promise<void>;
975
+ };
976
+ export type TreeseedSceneLogCollectOptions = {
977
+ projectRoot: string;
978
+ artifacts: TreeseedSceneRunArtifacts;
979
+ environmentReport?: TreeseedSceneEnvironmentPrepareReport | null;
980
+ };
981
+ export type TreeseedSceneEnvironmentAdapter = (input: TreeseedSceneEnvironmentPrepareOptions) => Promise<TreeseedSceneEnvironmentPrepareReport>;
982
+ export type TreeseedSceneAuthResolver = (input: TreeseedSceneAuthResolveOptions) => TreeseedSceneAuthReport;
983
+ export type TreeseedSceneSeedRunner = (input: TreeseedSceneSeedOptions) => Promise<TreeseedSceneSeedReport>;
984
+ export type TreeseedSceneOperationWaiter = (input: TreeseedSceneOperationWaitOptions) => Promise<TreeseedSceneOperationWaitReport>;
985
+ export type TreeseedSceneLogCollector = (input: TreeseedSceneLogCollectOptions) => TreeseedSceneLogReport;
986
+ export type TreeseedSceneLogReport = {
987
+ ok: boolean;
988
+ logs: Record<string, string | null>;
989
+ diagnostics: TreeseedSceneDiagnostic[];
990
+ };
991
+ export type TreeseedSceneBaseUrlResolution = {
992
+ ok: boolean;
993
+ baseUrl: string | null;
994
+ diagnostics: TreeseedSceneDiagnostic[];
995
+ };
996
+ export type TreeseedScenePluginStatus = 'available' | 'planned' | 'deferred';
997
+ export type TreeseedScenePluginCategory = 'action' | 'assertion' | 'environment' | 'capture' | 'artifact' | 'renderer' | 'diagram' | 'narration';
998
+ export type TreeseedScenePluginSummary = {
999
+ id: string;
1000
+ version: string;
1001
+ status: TreeseedScenePluginStatus;
1002
+ categories: TreeseedScenePluginCategory[];
1003
+ phase: TreeseedScenePhase;
1004
+ summary: string;
1005
+ };
1006
+ export type TreeseedSceneActionDefinition = {
1007
+ id: string;
1008
+ phase: TreeseedScenePhase;
1009
+ pluginId: string;
1010
+ status: TreeseedScenePluginStatus;
1011
+ summary: string;
1012
+ };
1013
+ export type TreeseedSceneAssertionDefinition = {
1014
+ id: string;
1015
+ phase: TreeseedScenePhase;
1016
+ pluginId: string;
1017
+ status: TreeseedScenePluginStatus;
1018
+ summary: string;
1019
+ };
1020
+ export type TreeseedSceneRendererDefinition = {
1021
+ id: string;
1022
+ phase: TreeseedScenePhase;
1023
+ pluginId: string;
1024
+ status: TreeseedScenePluginStatus;
1025
+ summary: string;
1026
+ };
1027
+ export type TreeseedScenePluginDiagnostic = TreeseedSceneDiagnostic & {
1028
+ pluginId?: string;
1029
+ category?: TreeseedScenePluginCategory;
1030
+ };
1031
+ export type TreeseedSceneTimelineWriter = {
1032
+ events: TreeseedSceneTimelineEvent[];
1033
+ push(type: TreeseedSceneTimelineEvent['type'], data: Record<string, unknown>, stepId?: string): TreeseedSceneTimelineEvent;
1034
+ };
1035
+ export type TreeseedSceneRuntimePluginContext = {
1036
+ projectRoot: string;
1037
+ scene: TreeseedSceneManifest;
1038
+ environment: TreeseedSceneEnvironment;
1039
+ baseUrl: string;
1040
+ session: TreeseedSceneBrowserSession;
1041
+ timeline: TreeseedSceneTimelineWriter;
1042
+ artifacts: TreeseedSceneRunArtifacts;
1043
+ linkedOperationIds: string[];
1044
+ operationReports: TreeseedSceneOperationWaitReport[];
1045
+ operationWaiter: TreeseedSceneOperationWaiter;
1046
+ interactive: boolean;
1047
+ pauseController?: TreeseedScenePauseController;
1048
+ sleep: (ms: number) => Promise<void>;
1049
+ progress?: {
1050
+ push(type: TreeseedSceneProgressEventType, data?: Record<string, unknown>, options?: {
1051
+ chapterId?: string | null;
1052
+ segmentId?: string | null;
1053
+ stepId?: string | null;
1054
+ checkpointId?: string | null;
1055
+ status?: string;
1056
+ }): TreeseedSceneProgressEvent;
1057
+ };
1058
+ resolveSelector(selector: TreeseedSceneSelector): TreeseedSceneLocator;
1059
+ resolveUrl(value: string): string;
1060
+ };
1061
+ export type TreeseedSceneRuntimePluginContextInput = Omit<TreeseedSceneRuntimePluginContext, 'resolveSelector' | 'resolveUrl'>;
1062
+ export type TreeseedSceneActionHandlerInput = {
1063
+ action: TreeseedSceneAction;
1064
+ actionKind: string;
1065
+ step: TreeseedSceneWorkflowStep;
1066
+ context: TreeseedSceneRuntimePluginContext;
1067
+ };
1068
+ export type TreeseedSceneActionHandlerResult = {
1069
+ ok: boolean;
1070
+ operationReport?: TreeseedSceneOperationWaitReport | null;
1071
+ diagnostics: TreeseedSceneDiagnostic[];
1072
+ };
1073
+ export type TreeseedSceneAssertionHandlerInput = {
1074
+ kind: string;
1075
+ value: unknown;
1076
+ step: TreeseedSceneWorkflowStep;
1077
+ context: TreeseedSceneRuntimePluginContext;
1078
+ };
1079
+ export type TreeseedSceneActionHandler = {
1080
+ id: string;
1081
+ phase: TreeseedScenePhase;
1082
+ status: TreeseedScenePluginStatus;
1083
+ summary: string;
1084
+ run(input: TreeseedSceneActionHandlerInput): Promise<TreeseedSceneActionHandlerResult>;
1085
+ };
1086
+ export type TreeseedSceneAssertionHandler = {
1087
+ id: string;
1088
+ phase: TreeseedScenePhase;
1089
+ status: TreeseedScenePluginStatus;
1090
+ summary: string;
1091
+ run(input: TreeseedSceneAssertionHandlerInput): Promise<TreeseedSceneAssertionRunReport>;
1092
+ };
1093
+ export type TreeseedSceneEnvironmentProvider = {
1094
+ prepare?(input: TreeseedSceneEnvironmentPrepareOptions): Promise<TreeseedSceneEnvironmentPrepareReport>;
1095
+ resolveAuth?(input: TreeseedSceneAuthResolveOptions): TreeseedSceneAuthReport;
1096
+ prepareSeed?(input: TreeseedSceneSeedOptions): Promise<TreeseedSceneSeedReport>;
1097
+ resolveBaseUrl?(input: {
1098
+ projectRoot: string;
1099
+ scene: TreeseedSceneManifest;
1100
+ environment: TreeseedSceneEnvironment;
1101
+ environmentReport?: TreeseedSceneEnvironmentPrepareReport | null;
1102
+ }): TreeseedSceneBaseUrlResolution;
1103
+ };
1104
+ export type TreeseedSceneCaptureProvider = {
1105
+ id: string;
1106
+ phase: TreeseedScenePhase;
1107
+ status: TreeseedScenePluginStatus;
1108
+ summary: string;
1109
+ };
1110
+ export type TreeseedSceneArtifactWriter = {
1111
+ id: string;
1112
+ phase: TreeseedScenePhase;
1113
+ status: TreeseedScenePluginStatus;
1114
+ summary: string;
1115
+ };
1116
+ export type TreeseedSceneRenderer = {
1117
+ id: string;
1118
+ phase: TreeseedScenePhase;
1119
+ status: TreeseedScenePluginStatus;
1120
+ summary: string;
1121
+ };
1122
+ export type TreeseedSceneDiagramRenderKind = 'operation-lifecycle' | 'reconciliation-lifecycle' | 'dev-runtime-topology' | 'scene-execution-timeline';
1123
+ export type TreeseedSceneDiagramDefinition = {
1124
+ id: string;
1125
+ phase: TreeseedScenePhase;
1126
+ status: TreeseedScenePluginStatus;
1127
+ summary: string;
1128
+ component: string;
1129
+ kind: TreeseedSceneDiagramRenderKind;
1130
+ defaultDurationSeconds: number;
1131
+ validateProps(input: {
1132
+ diagram: TreeseedSceneDiagram;
1133
+ path: string;
1134
+ }): TreeseedSceneDiagnostic[];
1135
+ normalizeProps(input: {
1136
+ diagram: TreeseedSceneDiagram;
1137
+ scene: TreeseedSceneManifest;
1138
+ run?: TreeseedSceneRunReport | null;
1139
+ }): Record<string, unknown>;
1140
+ };
1141
+ export type TreeseedSceneDiagramProvider = {
1142
+ id: string;
1143
+ phase: TreeseedScenePhase;
1144
+ status: TreeseedScenePluginStatus;
1145
+ summary: string;
1146
+ diagrams: Record<string, TreeseedSceneDiagramDefinition>;
1147
+ };
1148
+ export type TreeseedSceneNarrationProvider = {
1149
+ id: string;
1150
+ phase: TreeseedScenePhase;
1151
+ status: TreeseedScenePluginStatus;
1152
+ summary: string;
1153
+ generate(input: {
1154
+ scene: TreeseedSceneManifest;
1155
+ run: TreeseedSceneRunReport;
1156
+ transcript: TreeseedSceneTranscriptEntry[];
1157
+ style: TreeseedSceneTrainingNarrationStyle;
1158
+ }): TreeseedSceneNarrationScriptEntry[];
1159
+ };
1160
+ export interface TreeseedScenePlugin {
1161
+ id: string;
1162
+ version: string;
1163
+ phase: TreeseedScenePhase;
1164
+ status: TreeseedScenePluginStatus;
1165
+ summary: string;
1166
+ actions?: Record<string, TreeseedSceneActionHandler>;
1167
+ assertions?: Record<string, TreeseedSceneAssertionHandler>;
1168
+ environment?: TreeseedSceneEnvironmentProvider;
1169
+ captures?: Record<string, TreeseedSceneCaptureProvider>;
1170
+ artifacts?: Record<string, TreeseedSceneArtifactWriter>;
1171
+ renderers?: Record<string, TreeseedSceneRenderer>;
1172
+ diagrams?: Record<string, TreeseedSceneDiagramProvider>;
1173
+ narration?: Record<string, TreeseedSceneNarrationProvider>;
1174
+ }
1175
+ export type TreeseedScenePluginRegistry = {
1176
+ plugins: TreeseedScenePlugin[];
1177
+ actions: Map<string, TreeseedSceneActionHandler>;
1178
+ actionPlugins: Map<string, string>;
1179
+ assertions: Map<string, TreeseedSceneAssertionHandler>;
1180
+ assertionPlugins: Map<string, string>;
1181
+ environmentProviders: TreeseedSceneEnvironmentProvider[];
1182
+ captures: Map<string, TreeseedSceneCaptureProvider>;
1183
+ capturePlugins: Map<string, string>;
1184
+ artifacts: Map<string, TreeseedSceneArtifactWriter>;
1185
+ artifactPlugins: Map<string, string>;
1186
+ renderers: Map<string, TreeseedSceneRenderer>;
1187
+ rendererPlugins: Map<string, string>;
1188
+ diagrams: Map<string, TreeseedSceneDiagramProvider>;
1189
+ diagramPlugins: Map<string, string>;
1190
+ narration: Map<string, TreeseedSceneNarrationProvider>;
1191
+ narrationPlugins: Map<string, string>;
1192
+ diagnostics: TreeseedSceneDiagnostic[];
1193
+ };
1194
+ export type TreeseedScenePluginResolution = {
1195
+ ok: boolean;
1196
+ registry: TreeseedScenePluginRegistry;
1197
+ diagnostics: TreeseedSceneDiagnostic[];
1198
+ summaries: TreeseedScenePluginSummary[];
1199
+ };
1200
+ export type TreeseedSceneRenderProgressEventType = 'scene.render.started' | 'scene.render.input.loaded' | 'scene.render.bundle.started' | 'scene.render.bundle.finished' | 'scene.render.composition.selected' | 'scene.render.media.started' | 'scene.render.media.progress' | 'scene.render.media.finished' | 'scene.render.finished';
1201
+ export type TreeseedSceneRenderProgressEvent = {
1202
+ type: TreeseedSceneRenderProgressEventType;
1203
+ sceneId: string | null;
1204
+ runId: string | null;
1205
+ renderId: string | null;
1206
+ timestamp: string;
1207
+ offsetMs: number;
1208
+ data: Record<string, unknown>;
1209
+ };
1210
+ export type TreeseedSceneRenderInput = {
1211
+ schemaVersion: 'treeseed.scene.render-input/v1';
1212
+ scene: TreeseedSceneManifest;
1213
+ run: TreeseedSceneRunReport;
1214
+ timeline: TreeseedSceneTimelineEvent[];
1215
+ chapters: TreeseedSceneRunChapterReport[];
1216
+ segments: TreeseedSceneRunSegmentReport[];
1217
+ checkpoints: TreeseedSceneCheckpoint[];
1218
+ overlays: TreeseedSceneOverlay[];
1219
+ diagrams: TreeseedSceneDiagram[];
1220
+ renderDiagrams: TreeseedSceneRenderDiagram[];
1221
+ training: {
1222
+ captions: TreeseedSceneCaptionCue[];
1223
+ transcript: TreeseedSceneTranscriptEntry[];
1224
+ narration: TreeseedSceneNarrationScriptEntry[];
1225
+ glossary: TreeseedSceneGlossaryTerm[];
1226
+ chapterClips: TreeseedSceneChapterClipManifest[];
1227
+ };
1228
+ media: {
1229
+ videos: string[];
1230
+ videoRefs?: Array<{
1231
+ path: string;
1232
+ src?: string;
1233
+ staticPath?: string;
1234
+ mimeType: 'video/webm' | 'video/mp4' | 'video/quicktime';
1235
+ source: 'playwright';
1236
+ }>;
1237
+ videoFrames?: Array<{
1238
+ frame: number;
1239
+ path: string;
1240
+ staticPath: string;
1241
+ timestampMs: number;
1242
+ width: number;
1243
+ height: number;
1244
+ source: 'playwright';
1245
+ }>;
1246
+ screenshots: Array<{
1247
+ stepId: string | null;
1248
+ path: string;
1249
+ src?: string;
1250
+ timestamp: string | null;
1251
+ offsetMs: number | null;
1252
+ captureKind?: 'viewport' | 'full-page';
1253
+ width?: number | null;
1254
+ height?: number | null;
1255
+ }>;
1256
+ };
1257
+ render: {
1258
+ mode: TreeseedSceneRenderMode;
1259
+ composition: string;
1260
+ fps: number;
1261
+ width: number;
1262
+ height: number;
1263
+ durationInFrames: number;
1264
+ format: TreeseedSceneRenderFormat;
1265
+ introFrames?: number;
1266
+ evidenceStartFrame?: number;
1267
+ evidenceDurationInFrames?: number;
1268
+ interstitialFrames?: number;
1269
+ };
1270
+ };
1271
+ export type TreeseedSceneRenderDiagram = {
1272
+ id: string;
1273
+ renderer: string;
1274
+ component: string;
1275
+ kind: TreeseedSceneDiagramRenderKind;
1276
+ placement: TreeseedSceneDiagramPlacement;
1277
+ at: string;
1278
+ startOffsetMs: number | null;
1279
+ durationSeconds: number;
1280
+ props: Record<string, unknown>;
1281
+ objects: TreeseedSceneVisualObject[];
1282
+ motion?: TreeseedSceneMotion;
1283
+ style?: TreeseedSceneVisualStyle;
1284
+ };
1285
+ export type TreeseedSceneRendererAdapter = {
1286
+ id: string;
1287
+ render(input: {
1288
+ entryPoint?: string;
1289
+ compositionId: string;
1290
+ inputProps: TreeseedSceneRenderInput;
1291
+ outputPath: string;
1292
+ publicDir?: string;
1293
+ codec: 'h264';
1294
+ onProgress?: (progress: Record<string, unknown>) => void;
1295
+ }): Promise<{
1296
+ ok: boolean;
1297
+ outputPath: string | null;
1298
+ diagnostics: TreeseedSceneDiagnostic[];
1299
+ }>;
1300
+ };
1301
+ export type TreeseedSceneRendererAdapterFactory = (input: {
1302
+ renderer: string;
1303
+ }) => TreeseedSceneRendererAdapter | null;
1304
+ export type TreeseedSceneRenderOptions = {
1305
+ projectRoot: string;
1306
+ scene: string;
1307
+ from: string;
1308
+ device?: TreeseedSceneDeviceProfileId;
1309
+ renderer?: string;
1310
+ format?: TreeseedSceneRenderFormat;
1311
+ mode?: TreeseedSceneRenderMode;
1312
+ composition?: string;
1313
+ chapterId?: string;
1314
+ output?: string;
1315
+ runId?: string;
1316
+ timestamp?: string;
1317
+ plugins?: TreeseedScenePlugin[];
1318
+ rendererAdapter?: TreeseedSceneRendererAdapter;
1319
+ rendererAdapterFactory?: TreeseedSceneRendererAdapterFactory;
1320
+ onProgress?: (event: TreeseedSceneRenderProgressEvent) => void;
1321
+ };
1322
+ export type TreeseedSceneRenderReport = {
1323
+ ok: boolean;
1324
+ phase: 6;
1325
+ renderer: string;
1326
+ renderId: string | null;
1327
+ sceneId: string | null;
1328
+ sourceRunId: string | null;
1329
+ scenePath: string;
1330
+ runRoot: string | null;
1331
+ device?: TreeseedSceneDeviceProfile | null;
1332
+ startedAt: string;
1333
+ finishedAt: string;
1334
+ durationMs: number;
1335
+ mode: TreeseedSceneRenderMode;
1336
+ composition: string | null;
1337
+ format: TreeseedSceneRenderFormat;
1338
+ outputPath: string | null;
1339
+ renderRoot: string | null;
1340
+ inputPath: string | null;
1341
+ compositionPath: string | null;
1342
+ progressPath: string | null;
1343
+ renderedVideoPaths: string[];
1344
+ trainingOutputPaths: TreeseedSceneTrainingOutputPaths | null;
1345
+ sourceArtifacts: {
1346
+ runPath: string | null;
1347
+ timelinePath: string | null;
1348
+ normalizedScenePath: string | null;
1349
+ planPath: string | null;
1350
+ videoPaths: string[];
1351
+ screenshotPaths: string[];
1352
+ segmentPaths: string[];
1353
+ };
1354
+ diagnostics: TreeseedSceneDiagnostic[];
1355
+ warnings: TreeseedSceneDiagnostic[];
1356
+ blockers: TreeseedSceneDiagnostic[];
1357
+ };
1358
+ export type TreeseedSceneCaptionCue = {
1359
+ id: string;
1360
+ startMs: number;
1361
+ endMs: number;
1362
+ text: string;
1363
+ stepId?: string | null;
1364
+ chapterId?: string | null;
1365
+ };
1366
+ export type TreeseedSceneTranscriptEntry = {
1367
+ id: string;
1368
+ timestampMs: number;
1369
+ type: 'scene' | 'chapter' | 'step' | 'overlay' | 'diagram' | 'diagnostic';
1370
+ title: string;
1371
+ text: string;
1372
+ stepId?: string | null;
1373
+ chapterId?: string | null;
1374
+ };
1375
+ export type TreeseedSceneNarrationScriptEntry = {
1376
+ id: string;
1377
+ order: number;
1378
+ chapterId?: string | null;
1379
+ stepId?: string | null;
1380
+ title: string;
1381
+ script: string;
1382
+ source: 'scene' | 'chapter' | 'step' | 'overlay' | 'diagram' | 'diagnostic';
1383
+ };
1384
+ export type TreeseedSceneChapterClipManifest = {
1385
+ id: string;
1386
+ chapterId: string;
1387
+ title: string;
1388
+ startOffsetMs: number;
1389
+ endOffsetMs: number;
1390
+ durationMs: number;
1391
+ stepIds: string[];
1392
+ segmentIds: string[];
1393
+ suggestedOutputName: string;
1394
+ };
1395
+ export type TreeseedSceneTrainingOutputs = {
1396
+ schemaVersion: 'treeseed.scene.training-output/v1';
1397
+ sceneId: string | null;
1398
+ runId: string | null;
1399
+ generatedAt: string;
1400
+ captions: TreeseedSceneCaptionCue[];
1401
+ transcript: TreeseedSceneTranscriptEntry[];
1402
+ narration: TreeseedSceneNarrationScriptEntry[];
1403
+ glossary: TreeseedSceneGlossaryTerm[];
1404
+ chapterClips: TreeseedSceneChapterClipManifest[];
1405
+ };
1406
+ export type TreeseedSceneTrainingOutputPaths = {
1407
+ trainingRoot: string;
1408
+ inputPath: string;
1409
+ reportPath: string;
1410
+ captionsVttPath: string | null;
1411
+ captionsSrtPath: string | null;
1412
+ transcriptJsonPath: string | null;
1413
+ transcriptMarkdownPath: string | null;
1414
+ narrationJsonPath: string | null;
1415
+ narrationMarkdownPath: string | null;
1416
+ glossaryJsonPath: string | null;
1417
+ glossaryMarkdownPath: string | null;
1418
+ chapterClipsPath: string | null;
1419
+ };
1420
+ export type TreeseedSceneTrainingOutputOptions = {
1421
+ projectRoot: string;
1422
+ scene: string;
1423
+ from: string;
1424
+ formats?: TreeseedSceneTrainingOutputFormat[];
1425
+ timestamp?: string;
1426
+ };
1427
+ export type TreeseedSceneTrainingOutputReport = {
1428
+ ok: boolean;
1429
+ phase: 8;
1430
+ sceneId: string | null;
1431
+ sourceRunId: string | null;
1432
+ scenePath: string;
1433
+ runRoot: string | null;
1434
+ trainingRoot: string | null;
1435
+ outputs: TreeseedSceneTrainingOutputs | null;
1436
+ paths: TreeseedSceneTrainingOutputPaths | null;
1437
+ diagnostics: TreeseedSceneDiagnostic[];
1438
+ warnings: TreeseedSceneDiagnostic[];
1439
+ blockers: TreeseedSceneDiagnostic[];
1440
+ };
1441
+ export type TreeseedSceneEvidencePhase = 9;
1442
+ export type TreeseedSceneEvidenceTarget = 'local' | 'ci' | 'release';
1443
+ export type TreeseedSceneEvidenceBundlePolicy = 'metadata-only' | 'sanitized';
1444
+ export type TreeseedSceneEvidenceArtifactKind = 'run-report' | 'markdown-report' | 'timeline' | 'setup' | 'progress' | 'segment' | 'checkpoint' | 'screenshot' | 'render-report' | 'render-video' | 'training-output' | 'log-summary';
1445
+ export type TreeseedSceneEvidenceArtifact = {
1446
+ id: string;
1447
+ kind: TreeseedSceneEvidenceArtifactKind;
1448
+ path: string;
1449
+ relativePath: string;
1450
+ sha256: string | null;
1451
+ bytes: number | null;
1452
+ includedInBundle: boolean;
1453
+ redactionStatus: 'not-required' | 'sanitized' | 'excluded-sensitive' | 'unknown';
1454
+ };
1455
+ export type TreeseedSceneEvidenceSummary = {
1456
+ sceneId: string | null;
1457
+ runId: string | null;
1458
+ workflowStatus: TreeseedSceneRunStatus;
1459
+ ok: boolean;
1460
+ environment: TreeseedSceneEnvironment | null;
1461
+ startedAt: string;
1462
+ finishedAt: string;
1463
+ durationMs: number;
1464
+ failedStep: string | null;
1465
+ stepCounts: {
1466
+ passed: number;
1467
+ failed: number;
1468
+ skipped: number;
1469
+ };
1470
+ chapters: number;
1471
+ segments: number;
1472
+ checkpoints: number;
1473
+ renderedVideos: number;
1474
+ trainingOutputs: boolean;
1475
+ };
1476
+ export type TreeseedSceneEvidenceRecommendation = {
1477
+ id: string;
1478
+ severity: 'info' | 'warning' | 'blocking';
1479
+ command: string;
1480
+ reason: string;
1481
+ };
1482
+ export type TreeseedSceneEvidenceManifest = {
1483
+ schemaVersion: 'treeseed.scene.evidence/v1';
1484
+ phase: 9;
1485
+ generatedAt: string;
1486
+ target: TreeseedSceneEvidenceTarget;
1487
+ bundlePolicy: TreeseedSceneEvidenceBundlePolicy;
1488
+ runRoot: string;
1489
+ summary: TreeseedSceneEvidenceSummary;
1490
+ artifacts: TreeseedSceneEvidenceArtifact[];
1491
+ recommendations: TreeseedSceneEvidenceRecommendation[];
1492
+ diagnostics: TreeseedSceneDiagnostic[];
1493
+ };
1494
+ export type TreeseedSceneEvidencePaths = {
1495
+ evidenceRoot: string;
1496
+ manifestPath: string;
1497
+ reportPath: string;
1498
+ bundleRoot: string | null;
1499
+ bundleManifestPath: string | null;
1500
+ };
1501
+ export type TreeseedSceneEvidenceOptions = {
1502
+ projectRoot: string;
1503
+ scene: string;
1504
+ from: string;
1505
+ target?: TreeseedSceneEvidenceTarget;
1506
+ bundlePolicy?: TreeseedSceneEvidenceBundlePolicy;
1507
+ bundle?: TreeseedSceneEvidenceBundlePolicy;
1508
+ timestamp?: string;
1509
+ };
1510
+ export type TreeseedSceneEvidenceReport = {
1511
+ ok: boolean;
1512
+ phase: TreeseedSceneEvidencePhase;
1513
+ sceneId: string | null;
1514
+ sourceRunId: string | null;
1515
+ scenePath: string;
1516
+ runRoot: string | null;
1517
+ evidenceRoot: string | null;
1518
+ manifest: TreeseedSceneEvidenceManifest | null;
1519
+ paths: TreeseedSceneEvidencePaths | null;
1520
+ diagnostics: TreeseedSceneDiagnostic[];
1521
+ warnings: TreeseedSceneDiagnostic[];
1522
+ blockers: TreeseedSceneDiagnostic[];
1523
+ };
1524
+ export type TreeseedScenePublishPhase = 10;
1525
+ export type TreeseedScenePublishTarget = 'local' | 'release';
1526
+ export type TreeseedScenePublishStatus = 'published' | 'blocked';
1527
+ export type TreeseedSceneRedactionDecision = 'include' | 'exclude-sensitive' | 'exclude-not-allowed' | 'missing';
1528
+ export type TreeseedSceneRedactionRule = {
1529
+ id: string;
1530
+ artifactKind: TreeseedSceneEvidenceArtifactKind;
1531
+ include: boolean;
1532
+ reason: string;
1533
+ allowWhen?: {
1534
+ target?: TreeseedScenePublishTarget[];
1535
+ workflowStatus?: TreeseedSceneRunStatus[];
1536
+ };
1537
+ };
1538
+ export type TreeseedSceneRedactionPolicy = {
1539
+ schemaVersion: 'treeseed.scene.redaction-policy/v1';
1540
+ id: string;
1541
+ mode: 'deny-by-default';
1542
+ rules: TreeseedSceneRedactionRule[];
1543
+ };
1544
+ export type TreeseedScenePublishedArtifact = {
1545
+ id: string;
1546
+ kind: TreeseedSceneEvidenceArtifactKind;
1547
+ sourcePath: string;
1548
+ publishedPath: string | null;
1549
+ relativePath: string;
1550
+ sha256: string | null;
1551
+ bytes: number | null;
1552
+ decision: TreeseedSceneRedactionDecision;
1553
+ reason: string;
1554
+ };
1555
+ export type TreeseedScenePublishManifest = {
1556
+ schemaVersion: 'treeseed.scene.publish/v1';
1557
+ phase: 10;
1558
+ generatedAt: string;
1559
+ target: TreeseedScenePublishTarget;
1560
+ sourceEvidenceManifestPath: string;
1561
+ sourceRunRoot: string;
1562
+ sceneId: string | null;
1563
+ sourceRunId: string | null;
1564
+ workflowStatus: TreeseedSceneRunStatus;
1565
+ redactionPolicy: TreeseedSceneRedactionPolicy;
1566
+ artifacts: TreeseedScenePublishedArtifact[];
1567
+ releaseRecordPath: string | null;
1568
+ diagnostics: TreeseedSceneDiagnostic[];
1569
+ };
1570
+ export type TreeseedScenePublishPaths = {
1571
+ publishRoot: string;
1572
+ manifestPath: string;
1573
+ reportPath: string;
1574
+ bundleRoot: string;
1575
+ releaseRecordPath: string | null;
1576
+ };
1577
+ export type TreeseedScenePublishOptions = {
1578
+ projectRoot: string;
1579
+ scene: string;
1580
+ from: string;
1581
+ target?: TreeseedScenePublishTarget;
1582
+ redactionPolicyPath?: string;
1583
+ timestamp?: string;
1584
+ };
1585
+ export type TreeseedScenePublishReport = {
1586
+ ok: boolean;
1587
+ phase: TreeseedScenePublishPhase;
1588
+ status: TreeseedScenePublishStatus;
1589
+ sceneId: string | null;
1590
+ sourceRunId: string | null;
1591
+ scenePath: string;
1592
+ runRoot: string | null;
1593
+ evidenceRoot: string | null;
1594
+ publishRoot: string | null;
1595
+ manifest: TreeseedScenePublishManifest | null;
1596
+ paths: TreeseedScenePublishPaths | null;
1597
+ diagnostics: TreeseedSceneDiagnostic[];
1598
+ warnings: TreeseedSceneDiagnostic[];
1599
+ blockers: TreeseedSceneDiagnostic[];
1600
+ };
1601
+ export type TreeseedScenePublishPlanPhase = 11;
1602
+ export type TreeseedSceneExternalPublishTarget = 'docs' | 'training' | 'release-evidence' | 'artifact-store';
1603
+ export type TreeseedScenePublishPlanMode = 'plan' | 'local-export';
1604
+ export type TreeseedScenePublishDestination = {
1605
+ id: string;
1606
+ target: TreeseedSceneExternalPublishTarget;
1607
+ title: string;
1608
+ root: string;
1609
+ relativePath: string;
1610
+ plannedUrl: string | null;
1611
+ reconciliationResource: {
1612
+ type: 'scene-evidence-publication';
1613
+ provider: 'local' | 'github' | 'cloudflare' | 'artifact-store';
1614
+ environment: TreeseedSceneEnvironment | 'release' | null;
1615
+ desiredState: Record<string, unknown>;
1616
+ };
1617
+ };
1618
+ export type TreeseedScenePublishPlanArtifact = {
1619
+ id: string;
1620
+ kind: TreeseedSceneEvidenceArtifactKind;
1621
+ sourcePath: string;
1622
+ relativePath: string;
1623
+ destinationIds: string[];
1624
+ sha256: string | null;
1625
+ bytes: number | null;
1626
+ redactionDecision: TreeseedSceneRedactionDecision;
1627
+ };
1628
+ export type TreeseedScenePublishPlanManifest = {
1629
+ schemaVersion: 'treeseed.scene.publish-plan/v1';
1630
+ phase: 11;
1631
+ generatedAt: string;
1632
+ sourcePublishManifestPath: string;
1633
+ sourceRunRoot: string;
1634
+ sceneId: string | null;
1635
+ sourceRunId: string | null;
1636
+ workflowStatus: TreeseedSceneRunStatus;
1637
+ mode: TreeseedScenePublishPlanMode;
1638
+ targets: TreeseedSceneExternalPublishTarget[];
1639
+ destinations: TreeseedScenePublishDestination[];
1640
+ artifacts: TreeseedScenePublishPlanArtifact[];
1641
+ reconciliationIntents: Array<{
1642
+ id: string;
1643
+ target: TreeseedSceneExternalPublishTarget;
1644
+ action: 'plan-only';
1645
+ reason: string;
1646
+ desiredState: Record<string, unknown>;
1647
+ }>;
1648
+ diagnostics: TreeseedSceneDiagnostic[];
1649
+ };
1650
+ export type TreeseedScenePublishPlanPaths = {
1651
+ publishPlanRoot: string;
1652
+ manifestPath: string;
1653
+ reportPath: string;
1654
+ exportRoot: string | null;
1655
+ exportManifestPath: string | null;
1656
+ };
1657
+ export type TreeseedScenePublishPlanOptions = {
1658
+ projectRoot: string;
1659
+ scene: string;
1660
+ from: string;
1661
+ targets?: TreeseedSceneExternalPublishTarget[];
1662
+ mode?: TreeseedScenePublishPlanMode;
1663
+ timestamp?: string;
1664
+ };
1665
+ export type TreeseedScenePublishPlanReport = {
1666
+ ok: boolean;
1667
+ phase: TreeseedScenePublishPlanPhase;
1668
+ sceneId: string | null;
1669
+ sourceRunId: string | null;
1670
+ scenePath: string;
1671
+ runRoot: string | null;
1672
+ publishRoot: string | null;
1673
+ publishPlanRoot: string | null;
1674
+ manifest: TreeseedScenePublishPlanManifest | null;
1675
+ paths: TreeseedScenePublishPlanPaths | null;
1676
+ diagnostics: TreeseedSceneDiagnostic[];
1677
+ warnings: TreeseedSceneDiagnostic[];
1678
+ blockers: TreeseedSceneDiagnostic[];
1679
+ };
1680
+ export type TreeseedSceneRenderInputLoadReport = {
1681
+ ok: boolean;
1682
+ input: TreeseedSceneRenderInput | null;
1683
+ runRoot: string | null;
1684
+ diagnostics: TreeseedSceneDiagnostic[];
1685
+ warnings: TreeseedSceneDiagnostic[];
1686
+ blockers: TreeseedSceneDiagnostic[];
1687
+ };
1688
+ export type TreeseedSceneRemotionCompositionDefinition = {
1689
+ id: string;
1690
+ phase: 6;
1691
+ mode: TreeseedSceneRenderMode;
1692
+ summary: string;
1693
+ };
1694
+ export type TreeseedSceneRunReport = {
1695
+ ok: boolean;
1696
+ phase: TreeseedSceneRunPhase;
1697
+ sceneId: string | null;
1698
+ runId: string | null;
1699
+ scenePath: string;
1700
+ startedAt: string;
1701
+ finishedAt: string;
1702
+ durationMs: number;
1703
+ environment: TreeseedSceneEnvironment;
1704
+ baseUrl: string | null;
1705
+ browser: TreeseedSceneBrowser | null;
1706
+ device?: TreeseedSceneDeviceProfile | null;
1707
+ capture?: {
1708
+ viewport: {
1709
+ width: number;
1710
+ height: number;
1711
+ };
1712
+ videoSize: {
1713
+ width: number;
1714
+ height: number;
1715
+ } | null;
1716
+ renderResolution: {
1717
+ width: number;
1718
+ height: number;
1719
+ } | null;
1720
+ evidenceFit: TreeseedSceneRenderEvidenceFit;
1721
+ } | null;
1722
+ workflowStatus: TreeseedSceneRunStatus;
1723
+ steps: TreeseedSceneRunStepReport[];
1724
+ failedStep: string | null;
1725
+ assertions: TreeseedSceneAssertionRunReport[];
1726
+ artifacts: TreeseedSceneRunArtifacts | null;
1727
+ timelinePath: string | null;
1728
+ playwrightTracePath: string | null;
1729
+ videoPaths: string[];
1730
+ renderedVideoPaths: string[];
1731
+ trainingOutputPaths?: TreeseedSceneTrainingOutputPaths | null;
1732
+ evidencePaths?: TreeseedSceneEvidencePaths | null;
1733
+ publishPaths?: TreeseedScenePublishPaths | null;
1734
+ publishPlanPaths?: TreeseedScenePublishPlanPaths | null;
1735
+ logs: Record<string, string | null>;
1736
+ setup: TreeseedSceneRunSetupReport | null;
1737
+ operations: TreeseedSceneOperationWaitReport[];
1738
+ chapters: TreeseedSceneRunChapterReport[];
1739
+ segments: TreeseedSceneRunSegmentReport[];
1740
+ checkpoints: TreeseedSceneCheckpoint[];
1741
+ resumedFrom?: {
1742
+ runRoot: string;
1743
+ checkpointId: string;
1744
+ sourceRunId: string | null;
1745
+ } | null;
1746
+ progressPath: string | null;
1747
+ warnings: TreeseedSceneDiagnostic[];
1748
+ blockers: TreeseedSceneDiagnostic[];
1749
+ diagnostics: TreeseedSceneDiagnostic[];
1750
+ };
1751
+ export type TreeseedSceneResumeOptions = Omit<TreeseedSceneRunOptions, 'scene'> & {
1752
+ run: string;
1753
+ fromCheckpoint: string;
1754
+ };
1755
+ export type TreeseedSceneInspectOptions = {
1756
+ projectRoot: string;
1757
+ run: string;
1758
+ stepId?: string;
1759
+ };
1760
+ export type TreeseedSceneInspectReport = {
1761
+ ok: boolean;
1762
+ runRoot: string | null;
1763
+ run: TreeseedSceneRunReport | null;
1764
+ timeline: TreeseedSceneTimelineEvent[];
1765
+ chapters: TreeseedSceneRunChapterReport[];
1766
+ segments: TreeseedSceneRunSegmentReport[];
1767
+ checkpoints: TreeseedSceneCheckpoint[];
1768
+ selectedStep: TreeseedSceneRunStepReport | null;
1769
+ diagnostics: TreeseedSceneDiagnostic[];
1770
+ };
1771
+ export type TreeseedSceneTimelineEvent = {
1772
+ id: string;
1773
+ type: 'scene.start' | 'scene.end' | 'step.start' | 'step.end' | 'action.start' | 'action.end' | 'assertion.start' | 'assertion.end' | 'console' | 'network' | 'screenshot' | 'error' | 'setup.start' | 'setup.end' | 'readiness.start' | 'readiness.end' | 'seed.plan.start' | 'seed.plan.end' | 'seed.apply.start' | 'seed.apply.end' | 'auth.resolve' | 'operation.detected' | 'mailpit.confirm.open' | 'operation.poll.start' | 'operation.poll.tick' | 'operation.poll.end' | 'chapter.start' | 'chapter.end' | 'segment.start' | 'segment.end' | 'checkpoint.write' | 'checkpoint.skip' | 'pause.waiting' | 'pause.resumed' | 'resume.start' | 'resume.replay.start' | 'resume.replay.end' | 'resume.end' | 'heartbeat' | 'timeout';
1774
+ sceneId: string;
1775
+ runId: string;
1776
+ stepId?: string;
1777
+ timestamp: string;
1778
+ offsetMs: number;
1779
+ data: Record<string, unknown>;
1780
+ };
1781
+ export type TreeseedSceneBrowserLaunchInput = {
1782
+ browser: TreeseedSceneBrowser;
1783
+ viewport: {
1784
+ width: number;
1785
+ height: number;
1786
+ };
1787
+ videoSize?: {
1788
+ width: number;
1789
+ height: number;
1790
+ } | null;
1791
+ recordVideoDir?: string | null;
1792
+ tracePath?: string | null;
1793
+ userAgent?: string;
1794
+ deviceScaleFactor?: number;
1795
+ isMobile?: boolean;
1796
+ hasTouch?: boolean;
1797
+ };
1798
+ export type TreeseedSceneLocator = {
1799
+ first?(): TreeseedSceneLocator;
1800
+ waitFor(options?: {
1801
+ state?: 'visible';
1802
+ timeout?: number;
1803
+ }): Promise<void>;
1804
+ click(): Promise<void>;
1805
+ fill(value: string): Promise<void>;
1806
+ selectOption?(option: string | {
1807
+ label: string;
1808
+ }): Promise<void>;
1809
+ isVisible(): Promise<boolean>;
1810
+ };
1811
+ export type TreeseedScenePage = {
1812
+ goto(url: string): Promise<void>;
1813
+ url(): string;
1814
+ locator(selector: string): TreeseedSceneLocator;
1815
+ getByTestId(testId: string): TreeseedSceneLocator;
1816
+ getByRole(role: string, options?: {
1817
+ name?: string;
1818
+ }): TreeseedSceneLocator;
1819
+ getByText(text: string): TreeseedSceneLocator;
1820
+ keyboard: {
1821
+ press(key: string): Promise<void>;
1822
+ };
1823
+ screenshot(options: {
1824
+ path: string;
1825
+ fullPage?: boolean;
1826
+ }): Promise<void>;
1827
+ on(event: 'console', handler: (message: {
1828
+ type(): string;
1829
+ text(): string;
1830
+ }) => void): void;
1831
+ on(event: 'requestfailed', handler: (request: {
1832
+ url(): string;
1833
+ method(): string;
1834
+ failure(): {
1835
+ errorText: string;
1836
+ } | null;
1837
+ }) => void): void;
1838
+ on(event: 'response', handler: (response: {
1839
+ url(): string;
1840
+ status(): number;
1841
+ request(): {
1842
+ method(): string;
1843
+ };
1844
+ json?(): Promise<unknown>;
1845
+ }) => void): void;
1846
+ };
1847
+ export type TreeseedSceneBrowserSession = {
1848
+ page: TreeseedScenePage;
1849
+ startTracing?(): Promise<void>;
1850
+ stopTracing?(tracePath: string): Promise<void>;
1851
+ videoPaths?(): Promise<string[]>;
1852
+ close(): Promise<void>;
1853
+ };
1854
+ export type TreeseedSceneBrowserAdapter = {
1855
+ launch(input: TreeseedSceneBrowserLaunchInput): Promise<TreeseedSceneBrowserSession>;
1856
+ };
1857
+ export type TreeseedScenePhase0Report = {
1858
+ ok: boolean;
1859
+ phase: 0;
1860
+ status: 'foundation_ready';
1861
+ name: 'central TreeSeed acceptance test harness and demo / educational video generator';
1862
+ commandSurface: string[];
1863
+ sdkExports: string[];
1864
+ capabilities: TreeseedSceneCapability[];
1865
+ deferredDependencies: string[];
1866
+ activeOptionalDependencies?: string[];
1867
+ nextPhase: {
1868
+ phase: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
1869
+ summary: string;
1870
+ requiredChanges: string[];
1871
+ };
1872
+ };