rivet-design 0.17.3 → 0.17.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 (798) hide show
  1. package/bin/rivet.js +0 -16
  2. package/dist/agent-variants/SessionStore.d.ts +0 -239
  3. package/dist/agent-variants/SessionStore.d.ts.map +1 -1
  4. package/dist/agent-variants/SessionStore.js +10 -368
  5. package/dist/agent-variants/SessionStore.js.map +1 -1
  6. package/dist/agent-variants/VariantWorkspaceManager.d.ts +0 -10
  7. package/dist/agent-variants/VariantWorkspaceManager.d.ts.map +1 -1
  8. package/dist/agent-variants/VariantWorkspaceManager.js +0 -17
  9. package/dist/agent-variants/VariantWorkspaceManager.js.map +1 -1
  10. package/dist/agent-variants/WorkerExecutorService.d.ts +1 -105
  11. package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -1
  12. package/dist/agent-variants/WorkerExecutorService.js +11 -182
  13. package/dist/agent-variants/WorkerExecutorService.js.map +1 -1
  14. package/dist/agent-variants/WorktreeOrchestrator.d.ts +9 -611
  15. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  16. package/dist/agent-variants/WorktreeOrchestrator.js +111 -1468
  17. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  18. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +0 -7
  19. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
  20. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +2 -25
  21. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -1
  22. package/dist/agent-variants/briefContent.d.ts +0 -11
  23. package/dist/agent-variants/briefContent.d.ts.map +1 -1
  24. package/dist/agent-variants/briefContent.js +0 -12
  25. package/dist/agent-variants/briefContent.js.map +1 -1
  26. package/dist/agent-variants/contextAssets.d.ts +0 -3
  27. package/dist/agent-variants/contextAssets.d.ts.map +1 -1
  28. package/dist/agent-variants/contextAssets.js +0 -3
  29. package/dist/agent-variants/contextAssets.js.map +1 -1
  30. package/dist/agent-variants/contracts.d.ts +5 -493
  31. package/dist/agent-variants/contracts.d.ts.map +1 -1
  32. package/dist/agent-variants/contracts.js +2 -167
  33. package/dist/agent-variants/contracts.js.map +1 -1
  34. package/dist/agent-variants/createProjectArtifacts.d.ts +0 -17
  35. package/dist/agent-variants/createProjectArtifacts.d.ts.map +1 -1
  36. package/dist/agent-variants/createProjectArtifacts.js +0 -10
  37. package/dist/agent-variants/createProjectArtifacts.js.map +1 -1
  38. package/dist/agent-variants/diffQa.d.ts +0 -1
  39. package/dist/agent-variants/diffQa.d.ts.map +1 -1
  40. package/dist/agent-variants/diffQa.js +0 -1
  41. package/dist/agent-variants/diffQa.js.map +1 -1
  42. package/dist/agent-variants/directionAuthoring.d.ts +0 -13
  43. package/dist/agent-variants/directionAuthoring.d.ts.map +1 -1
  44. package/dist/agent-variants/directionAuthoring.js +12 -46
  45. package/dist/agent-variants/directionAuthoring.js.map +1 -1
  46. package/dist/agent-variants/elementRefToTarget.d.ts +0 -17
  47. package/dist/agent-variants/elementRefToTarget.d.ts.map +1 -1
  48. package/dist/agent-variants/elementRefToTarget.js +0 -17
  49. package/dist/agent-variants/elementRefToTarget.js.map +1 -1
  50. package/dist/agent-variants/generatedDestination.d.ts +0 -3
  51. package/dist/agent-variants/generatedDestination.d.ts.map +1 -1
  52. package/dist/agent-variants/generatedDestination.js +0 -3
  53. package/dist/agent-variants/generatedDestination.js.map +1 -1
  54. package/dist/agent-variants/previewQa.d.ts +0 -6
  55. package/dist/agent-variants/previewQa.d.ts.map +1 -1
  56. package/dist/agent-variants/previewQa.js +0 -5
  57. package/dist/agent-variants/previewQa.js.map +1 -1
  58. package/dist/agent-variants/runLabel.d.ts +0 -15
  59. package/dist/agent-variants/runLabel.d.ts.map +1 -1
  60. package/dist/agent-variants/runLabel.js +0 -19
  61. package/dist/agent-variants/runLabel.js.map +1 -1
  62. package/dist/agent-variants/runPlan.d.ts +3 -84
  63. package/dist/agent-variants/runPlan.d.ts.map +1 -1
  64. package/dist/agent-variants/runPlan.js +0 -51
  65. package/dist/agent-variants/runPlan.js.map +1 -1
  66. package/dist/agent-variants/sourceContext.d.ts +0 -10
  67. package/dist/agent-variants/sourceContext.d.ts.map +1 -1
  68. package/dist/agent-variants/sourceContext.js +0 -36
  69. package/dist/agent-variants/sourceContext.js.map +1 -1
  70. package/dist/agent-variants/variantContext.d.ts +0 -6
  71. package/dist/agent-variants/variantContext.d.ts.map +1 -1
  72. package/dist/agent-variants/variantContext.js +0 -9
  73. package/dist/agent-variants/variantContext.js.map +1 -1
  74. package/dist/agent-variants/videoKeyframes.d.ts +0 -7
  75. package/dist/agent-variants/videoKeyframes.d.ts.map +1 -1
  76. package/dist/agent-variants/videoKeyframes.js +0 -7
  77. package/dist/agent-variants/videoKeyframes.js.map +1 -1
  78. package/dist/agent-variants/workItemBriefing.d.ts +0 -21
  79. package/dist/agent-variants/workItemBriefing.d.ts.map +1 -1
  80. package/dist/agent-variants/workItemBriefing.js +0 -49
  81. package/dist/agent-variants/workItemBriefing.js.map +1 -1
  82. package/dist/agent-variants/workerRuntime.d.ts +1 -137
  83. package/dist/agent-variants/workerRuntime.d.ts.map +1 -1
  84. package/dist/agent-variants/workerRuntime.js +8 -147
  85. package/dist/agent-variants/workerRuntime.js.map +1 -1
  86. package/dist/cli/browser.d.ts +0 -1
  87. package/dist/cli/browser.d.ts.map +1 -1
  88. package/dist/cli/browser.js +0 -1
  89. package/dist/cli/browser.js.map +1 -1
  90. package/dist/cli/callerRunnerPaths.d.ts +0 -50
  91. package/dist/cli/callerRunnerPaths.d.ts.map +1 -1
  92. package/dist/cli/callerRunnerPaths.js +0 -59
  93. package/dist/cli/callerRunnerPaths.js.map +1 -1
  94. package/dist/cli/client.d.ts +0 -18
  95. package/dist/cli/client.d.ts.map +1 -1
  96. package/dist/cli/client.js +0 -28
  97. package/dist/cli/client.js.map +1 -1
  98. package/dist/cli/commandNames.d.ts +0 -7
  99. package/dist/cli/commandNames.d.ts.map +1 -1
  100. package/dist/cli/commandNames.js +0 -7
  101. package/dist/cli/commandNames.js.map +1 -1
  102. package/dist/cli/commands/auth.d.ts +0 -6
  103. package/dist/cli/commands/auth.d.ts.map +1 -1
  104. package/dist/cli/commands/auth.js +0 -6
  105. package/dist/cli/commands/auth.js.map +1 -1
  106. package/dist/cli/commands/elementSelector.d.ts +0 -6
  107. package/dist/cli/commands/elementSelector.d.ts.map +1 -1
  108. package/dist/cli/commands/elementSelector.js +0 -7
  109. package/dist/cli/commands/elementSelector.js.map +1 -1
  110. package/dist/cli/commands/evidence.d.ts +0 -6
  111. package/dist/cli/commands/evidence.d.ts.map +1 -1
  112. package/dist/cli/commands/evidence.js +0 -6
  113. package/dist/cli/commands/evidence.js.map +1 -1
  114. package/dist/cli/commands/libraryOpen.d.ts +0 -1
  115. package/dist/cli/commands/libraryOpen.d.ts.map +1 -1
  116. package/dist/cli/commands/libraryOpen.js +3 -3
  117. package/dist/cli/commands/libraryOpen.js.map +1 -1
  118. package/dist/cli/commands/mcpServe.d.ts +0 -24
  119. package/dist/cli/commands/mcpServe.d.ts.map +1 -1
  120. package/dist/cli/commands/mcpServe.js +31 -102
  121. package/dist/cli/commands/mcpServe.js.map +1 -1
  122. package/dist/cli/commands/open.d.ts +0 -8
  123. package/dist/cli/commands/open.d.ts.map +1 -1
  124. package/dist/cli/commands/open.js +0 -57
  125. package/dist/cli/commands/open.js.map +1 -1
  126. package/dist/cli/commands/reference.d.ts +0 -5
  127. package/dist/cli/commands/reference.d.ts.map +1 -1
  128. package/dist/cli/commands/reference.js +0 -27
  129. package/dist/cli/commands/reference.js.map +1 -1
  130. package/dist/cli/commands/serve.d.ts +0 -5
  131. package/dist/cli/commands/serve.d.ts.map +1 -1
  132. package/dist/cli/commands/serve.js +0 -34
  133. package/dist/cli/commands/serve.js.map +1 -1
  134. package/dist/cli/commands/shared.d.ts +0 -16
  135. package/dist/cli/commands/shared.d.ts.map +1 -1
  136. package/dist/cli/commands/shared.js +0 -19
  137. package/dist/cli/commands/shared.js.map +1 -1
  138. package/dist/cli/commands/status.d.ts +0 -6
  139. package/dist/cli/commands/status.d.ts.map +1 -1
  140. package/dist/cli/commands/status.js +0 -11
  141. package/dist/cli/commands/status.js.map +1 -1
  142. package/dist/cli/commands/stop.d.ts +0 -5
  143. package/dist/cli/commands/stop.d.ts.map +1 -1
  144. package/dist/cli/commands/stop.js +0 -6
  145. package/dist/cli/commands/stop.js.map +1 -1
  146. package/dist/cli/commands/update.d.ts +0 -1
  147. package/dist/cli/commands/update.d.ts.map +1 -1
  148. package/dist/cli/commands/update.js +0 -1
  149. package/dist/cli/commands/update.js.map +1 -1
  150. package/dist/cli/commands/variants.d.ts +0 -1
  151. package/dist/cli/commands/variants.d.ts.map +1 -1
  152. package/dist/cli/commands/variants.js +0 -31
  153. package/dist/cli/commands/variants.js.map +1 -1
  154. package/dist/cli/commands/wait.d.ts +0 -21
  155. package/dist/cli/commands/wait.d.ts.map +1 -1
  156. package/dist/cli/commands/wait.js +0 -23
  157. package/dist/cli/commands/wait.js.map +1 -1
  158. package/dist/cli/entry.d.ts +0 -10
  159. package/dist/cli/entry.d.ts.map +1 -1
  160. package/dist/cli/entry.js +0 -13
  161. package/dist/cli/entry.js.map +1 -1
  162. package/dist/cli/envelope.d.ts +1 -25
  163. package/dist/cli/envelope.d.ts.map +1 -1
  164. package/dist/cli/envelope.js +0 -19
  165. package/dist/cli/envelope.js.map +1 -1
  166. package/dist/cli/flags.d.ts +0 -7
  167. package/dist/cli/flags.d.ts.map +1 -1
  168. package/dist/cli/flags.js +0 -7
  169. package/dist/cli/flags.js.map +1 -1
  170. package/dist/cli/handoff.d.ts +0 -33
  171. package/dist/cli/handoff.d.ts.map +1 -1
  172. package/dist/cli/handoff.js +0 -42
  173. package/dist/cli/handoff.js.map +1 -1
  174. package/dist/cli/handoffStore.d.ts +0 -11
  175. package/dist/cli/handoffStore.d.ts.map +1 -1
  176. package/dist/cli/handoffStore.js +0 -10
  177. package/dist/cli/handoffStore.js.map +1 -1
  178. package/dist/cli/hostWorkNextAction.d.ts +0 -11
  179. package/dist/cli/hostWorkNextAction.d.ts.map +1 -1
  180. package/dist/cli/hostWorkNextAction.js +0 -4
  181. package/dist/cli/hostWorkNextAction.js.map +1 -1
  182. package/dist/cli/io.d.ts +0 -9
  183. package/dist/cli/io.d.ts.map +1 -1
  184. package/dist/cli/io.js +0 -1
  185. package/dist/cli/io.js.map +1 -1
  186. package/dist/cli/resolveDefaultNodeEnv.d.ts +0 -5
  187. package/dist/cli/resolveDefaultNodeEnv.d.ts.map +1 -1
  188. package/dist/cli/resolveDefaultNodeEnv.js +0 -5
  189. package/dist/cli/resolveDefaultNodeEnv.js.map +1 -1
  190. package/dist/cli/router.d.ts +0 -21
  191. package/dist/cli/router.d.ts.map +1 -1
  192. package/dist/cli/router.js +0 -46
  193. package/dist/cli/router.js.map +1 -1
  194. package/dist/cli/runnerSelection.d.ts +0 -58
  195. package/dist/cli/runnerSelection.d.ts.map +1 -1
  196. package/dist/cli/runnerSelection.js +0 -16
  197. package/dist/cli/runnerSelection.js.map +1 -1
  198. package/dist/cli/serverHandshake.d.ts +0 -36
  199. package/dist/cli/serverHandshake.d.ts.map +1 -1
  200. package/dist/cli/serverHandshake.js +0 -29
  201. package/dist/cli/serverHandshake.js.map +1 -1
  202. package/dist/cli/serverUnavailable.d.ts +0 -1
  203. package/dist/cli/serverUnavailable.d.ts.map +1 -1
  204. package/dist/cli/serverUnavailable.js +0 -1
  205. package/dist/cli/serverUnavailable.js.map +1 -1
  206. package/dist/cli/serverVersion.d.ts +0 -22
  207. package/dist/cli/serverVersion.d.ts.map +1 -1
  208. package/dist/cli/serverVersion.js +0 -12
  209. package/dist/cli/serverVersion.js.map +1 -1
  210. package/dist/cli/telemetry.d.ts +0 -4
  211. package/dist/cli/telemetry.d.ts.map +1 -1
  212. package/dist/cli/telemetry.js +0 -4
  213. package/dist/cli/telemetry.js.map +1 -1
  214. package/dist/config/evaluateFlags.d.ts +0 -4
  215. package/dist/config/evaluateFlags.d.ts.map +1 -1
  216. package/dist/config/evaluateFlags.js +0 -11
  217. package/dist/config/evaluateFlags.js.map +1 -1
  218. package/dist/config/featureFlagUserKey.d.ts +0 -3
  219. package/dist/config/featureFlagUserKey.d.ts.map +1 -1
  220. package/dist/config/featureFlagUserKey.js +0 -3
  221. package/dist/config/featureFlagUserKey.js.map +1 -1
  222. package/dist/config/flags.d.ts +0 -14
  223. package/dist/config/flags.d.ts.map +1 -1
  224. package/dist/config/flags.js +0 -27
  225. package/dist/config/flags.js.map +1 -1
  226. package/dist/config/proxy.d.ts +0 -3
  227. package/dist/config/proxy.d.ts.map +1 -1
  228. package/dist/config/proxy.js +0 -11
  229. package/dist/config/proxy.js.map +1 -1
  230. package/dist/config/telemetry.d.ts +0 -13
  231. package/dist/config/telemetry.d.ts.map +1 -1
  232. package/dist/config/telemetry.js +0 -13
  233. package/dist/config/telemetry.js.map +1 -1
  234. package/dist/config/telemetryContract.d.ts +0 -1
  235. package/dist/config/telemetryContract.d.ts.map +1 -1
  236. package/dist/config/telemetryContract.js +0 -1
  237. package/dist/config/telemetryContract.js.map +1 -1
  238. package/dist/hosts/workerDefaults.d.ts +0 -69
  239. package/dist/hosts/workerDefaults.d.ts.map +1 -1
  240. package/dist/hosts/workerDefaults.js +0 -68
  241. package/dist/hosts/workerDefaults.js.map +1 -1
  242. package/dist/index-core.d.ts.map +1 -1
  243. package/dist/index-core.js +0 -2
  244. package/dist/index-core.js.map +1 -1
  245. package/dist/index.d.ts +0 -20
  246. package/dist/index.d.ts.map +1 -1
  247. package/dist/index.js +2 -105
  248. package/dist/index.js.map +1 -1
  249. package/dist/install/allowlists.d.ts +0 -32
  250. package/dist/install/allowlists.d.ts.map +1 -1
  251. package/dist/install/allowlists.js +0 -44
  252. package/dist/install/allowlists.js.map +1 -1
  253. package/dist/install/automaticCliUpdate.d.ts +0 -6
  254. package/dist/install/automaticCliUpdate.d.ts.map +1 -1
  255. package/dist/install/automaticCliUpdate.js +0 -13
  256. package/dist/install/automaticCliUpdate.js.map +1 -1
  257. package/dist/install/channelCli.d.ts +0 -1
  258. package/dist/install/channelCli.d.ts.map +1 -1
  259. package/dist/install/channelCli.js +0 -3
  260. package/dist/install/channelCli.js.map +1 -1
  261. package/dist/install/channelManager.d.ts +0 -14
  262. package/dist/install/channelManager.d.ts.map +1 -1
  263. package/dist/install/channelManager.js +0 -22
  264. package/dist/install/channelManager.js.map +1 -1
  265. package/dist/install/codexGuidance.d.ts +0 -1
  266. package/dist/install/codexGuidance.d.ts.map +1 -1
  267. package/dist/install/codexGuidance.js +0 -7
  268. package/dist/install/codexGuidance.js.map +1 -1
  269. package/dist/install/globalBootstrap.d.ts +0 -25
  270. package/dist/install/globalBootstrap.d.ts.map +1 -1
  271. package/dist/install/globalBootstrap.js +0 -10
  272. package/dist/install/globalBootstrap.js.map +1 -1
  273. package/dist/install/harnesses.d.ts +0 -66
  274. package/dist/install/harnesses.d.ts.map +1 -1
  275. package/dist/install/harnesses.js +0 -60
  276. package/dist/install/harnesses.js.map +1 -1
  277. package/dist/install/installationChannel.d.ts +0 -1
  278. package/dist/install/installationChannel.d.ts.map +1 -1
  279. package/dist/install/installationChannel.js +0 -1
  280. package/dist/install/installationChannel.js.map +1 -1
  281. package/dist/install/legacyMcp.d.ts +0 -23
  282. package/dist/install/legacyMcp.d.ts.map +1 -1
  283. package/dist/install/legacyMcp.js +3 -46
  284. package/dist/install/legacyMcp.js.map +1 -1
  285. package/dist/install/mcpRegistration.d.ts +0 -41
  286. package/dist/install/mcpRegistration.d.ts.map +1 -1
  287. package/dist/install/mcpRegistration.js +2 -70
  288. package/dist/install/mcpRegistration.js.map +1 -1
  289. package/dist/library/HubClient.d.ts +0 -2
  290. package/dist/library/HubClient.d.ts.map +1 -1
  291. package/dist/library/HubClient.js +0 -4
  292. package/dist/library/HubClient.js.map +1 -1
  293. package/dist/library/HubServer.d.ts +0 -1
  294. package/dist/library/HubServer.d.ts.map +1 -1
  295. package/dist/library/HubServer.js +0 -1
  296. package/dist/library/HubServer.js.map +1 -1
  297. package/dist/library/StaticPreviewServer.d.ts +0 -1
  298. package/dist/library/StaticPreviewServer.d.ts.map +1 -1
  299. package/dist/library/StaticPreviewServer.js +0 -1
  300. package/dist/library/StaticPreviewServer.js.map +1 -1
  301. package/dist/library/http.d.ts +0 -2
  302. package/dist/library/http.d.ts.map +1 -1
  303. package/dist/library/http.js +0 -2
  304. package/dist/library/http.js.map +1 -1
  305. package/dist/library/importFiles.d.ts +0 -6
  306. package/dist/library/importFiles.d.ts.map +1 -1
  307. package/dist/library/importFiles.js +45 -11
  308. package/dist/library/importFiles.js.map +1 -1
  309. package/dist/mcp/changeBatchClassification.d.ts +0 -40
  310. package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
  311. package/dist/mcp/changeBatchClassification.js +0 -34
  312. package/dist/mcp/changeBatchClassification.js.map +1 -1
  313. package/dist/prompts/commentVariationPrompts.d.ts +0 -5
  314. package/dist/prompts/commentVariationPrompts.d.ts.map +1 -1
  315. package/dist/prompts/commentVariationPrompts.js +0 -5
  316. package/dist/prompts/commentVariationPrompts.js.map +1 -1
  317. package/dist/prototype-host.js +0 -15
  318. package/dist/prototype-host.js.map +1 -1
  319. package/dist/proxy-middleware/preview-bridge.d.ts +0 -2
  320. package/dist/proxy-middleware/preview-bridge.d.ts.map +1 -1
  321. package/dist/proxy-middleware/preview-bridge.js +7 -7
  322. package/dist/proxy-middleware/preview-bridge.js.map +1 -1
  323. package/dist/proxy-middleware/preview-connections.d.ts +8 -0
  324. package/dist/proxy-middleware/preview-connections.d.ts.map +1 -0
  325. package/dist/proxy-middleware/preview-connections.js +29 -0
  326. package/dist/proxy-middleware/preview-connections.js.map +1 -0
  327. package/dist/proxy-middleware/proxy-config.d.ts +0 -12
  328. package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
  329. package/dist/proxy-middleware/proxy-config.js +41 -90
  330. package/dist/proxy-middleware/proxy-config.js.map +1 -1
  331. package/dist/routes/account.d.ts +0 -1
  332. package/dist/routes/account.d.ts.map +1 -1
  333. package/dist/routes/account.js +0 -2
  334. package/dist/routes/account.js.map +1 -1
  335. package/dist/routes/agentVariants.d.ts +0 -15
  336. package/dist/routes/agentVariants.d.ts.map +1 -1
  337. package/dist/routes/agentVariants.js +14 -325
  338. package/dist/routes/agentVariants.js.map +1 -1
  339. package/dist/routes/cli.d.ts +0 -17
  340. package/dist/routes/cli.d.ts.map +1 -1
  341. package/dist/routes/cli.js +0 -13
  342. package/dist/routes/cli.js.map +1 -1
  343. package/dist/routes/emptyStatePage.d.ts +0 -12
  344. package/dist/routes/emptyStatePage.d.ts.map +1 -1
  345. package/dist/routes/emptyStatePage.js +0 -12
  346. package/dist/routes/emptyStatePage.js.map +1 -1
  347. package/dist/routes/git.d.ts.map +1 -1
  348. package/dist/routes/git.js +0 -13
  349. package/dist/routes/git.js.map +1 -1
  350. package/dist/routes/inlineStartTracker.d.ts +0 -16
  351. package/dist/routes/inlineStartTracker.d.ts.map +1 -1
  352. package/dist/routes/inlineStartTracker.js.map +1 -1
  353. package/dist/routes/integrations.d.ts +0 -6
  354. package/dist/routes/integrations.d.ts.map +1 -1
  355. package/dist/routes/integrations.js +0 -6
  356. package/dist/routes/integrations.js.map +1 -1
  357. package/dist/routes/library/app.d.ts +0 -1
  358. package/dist/routes/library/app.d.ts.map +1 -1
  359. package/dist/routes/library/app.js +0 -1
  360. package/dist/routes/library/app.js.map +1 -1
  361. package/dist/routes/library/index.d.ts +0 -1
  362. package/dist/routes/library/index.d.ts.map +1 -1
  363. package/dist/routes/library/index.js +0 -1
  364. package/dist/routes/library/index.js.map +1 -1
  365. package/dist/routes/library/middleware.d.ts +0 -3
  366. package/dist/routes/library/middleware.d.ts.map +1 -1
  367. package/dist/routes/library/middleware.js +0 -4
  368. package/dist/routes/library/middleware.js.map +1 -1
  369. package/dist/routes/library/navigation.d.ts +0 -1
  370. package/dist/routes/library/navigation.d.ts.map +1 -1
  371. package/dist/routes/library/navigation.js +0 -1
  372. package/dist/routes/library/navigation.js.map +1 -1
  373. package/dist/routes/library/projects.d.ts +0 -1
  374. package/dist/routes/library/projects.d.ts.map +1 -1
  375. package/dist/routes/library/projects.js +0 -1
  376. package/dist/routes/library/projects.js.map +1 -1
  377. package/dist/routes/library/staticPreview.d.ts +0 -1
  378. package/dist/routes/library/staticPreview.d.ts.map +1 -1
  379. package/dist/routes/library/staticPreview.js +0 -1
  380. package/dist/routes/library/staticPreview.js.map +1 -1
  381. package/dist/routes/library/variants.d.ts +0 -1
  382. package/dist/routes/library/variants.d.ts.map +1 -1
  383. package/dist/routes/library/variants.js +0 -1
  384. package/dist/routes/library/variants.js.map +1 -1
  385. package/dist/routes/mcp.d.ts +0 -3
  386. package/dist/routes/mcp.d.ts.map +1 -1
  387. package/dist/routes/mcp.js +3 -4
  388. package/dist/routes/mcp.js.map +1 -1
  389. package/dist/routes/prototypeHost.d.ts +0 -2
  390. package/dist/routes/prototypeHost.d.ts.map +1 -1
  391. package/dist/routes/prototypeHost.js +6 -32
  392. package/dist/routes/prototypeHost.js.map +1 -1
  393. package/dist/routes/static.d.ts +0 -3
  394. package/dist/routes/static.d.ts.map +1 -1
  395. package/dist/routes/static.js +0 -6
  396. package/dist/routes/static.js.map +1 -1
  397. package/dist/routes/support.d.ts +0 -3
  398. package/dist/routes/support.d.ts.map +1 -1
  399. package/dist/routes/support.js +0 -3
  400. package/dist/routes/support.js.map +1 -1
  401. package/dist/server.d.ts +0 -42
  402. package/dist/server.d.ts.map +1 -1
  403. package/dist/server.js +1 -129
  404. package/dist/server.js.map +1 -1
  405. package/dist/services/AuthService.d.ts +0 -76
  406. package/dist/services/AuthService.d.ts.map +1 -1
  407. package/dist/services/AuthService.js +0 -112
  408. package/dist/services/AuthService.js.map +1 -1
  409. package/dist/services/BrowserAgentClient.d.ts +1 -21
  410. package/dist/services/BrowserAgentClient.d.ts.map +1 -1
  411. package/dist/services/BrowserAgentClient.js +0 -10
  412. package/dist/services/BrowserAgentClient.js.map +1 -1
  413. package/dist/services/BundleStore.d.ts +0 -18
  414. package/dist/services/BundleStore.d.ts.map +1 -1
  415. package/dist/services/BundleStore.js +0 -10
  416. package/dist/services/BundleStore.js.map +1 -1
  417. package/dist/services/CliLogForwarder.d.ts +0 -26
  418. package/dist/services/CliLogForwarder.d.ts.map +1 -1
  419. package/dist/services/CliLogForwarder.js +1 -33
  420. package/dist/services/CliLogForwarder.js.map +1 -1
  421. package/dist/services/CommitMessageGenerator.d.ts +0 -6
  422. package/dist/services/CommitMessageGenerator.d.ts.map +1 -1
  423. package/dist/services/CommitMessageGenerator.js +0 -3
  424. package/dist/services/CommitMessageGenerator.js.map +1 -1
  425. package/dist/services/ComponentSearchService.d.ts +2 -16
  426. package/dist/services/ComponentSearchService.d.ts.map +1 -1
  427. package/dist/services/ComponentSearchService.js +2 -56
  428. package/dist/services/ComponentSearchService.js.map +1 -1
  429. package/dist/services/ConfigManager.d.ts +0 -113
  430. package/dist/services/ConfigManager.d.ts.map +1 -1
  431. package/dist/services/ConfigManager.js +0 -101
  432. package/dist/services/ConfigManager.js.map +1 -1
  433. package/dist/services/DependencyPreparationService.d.ts +28 -0
  434. package/dist/services/DependencyPreparationService.d.ts.map +1 -0
  435. package/dist/services/DependencyPreparationService.js +322 -0
  436. package/dist/services/DependencyPreparationService.js.map +1 -0
  437. package/dist/services/DevServerRuntimeService.d.ts +0 -20
  438. package/dist/services/DevServerRuntimeService.d.ts.map +1 -1
  439. package/dist/services/DevServerRuntimeService.js +0 -46
  440. package/dist/services/DevServerRuntimeService.js.map +1 -1
  441. package/dist/services/FeatureFlagService.d.ts +0 -15
  442. package/dist/services/FeatureFlagService.d.ts.map +1 -1
  443. package/dist/services/FeatureFlagService.js +0 -23
  444. package/dist/services/FeatureFlagService.js.map +1 -1
  445. package/dist/services/GatewayClient.d.ts +0 -27
  446. package/dist/services/GatewayClient.d.ts.map +1 -1
  447. package/dist/services/GatewayClient.js +0 -25
  448. package/dist/services/GatewayClient.js.map +1 -1
  449. package/dist/services/HistoryReplayService.d.ts +2 -32
  450. package/dist/services/HistoryReplayService.d.ts.map +1 -1
  451. package/dist/services/HistoryReplayService.js +55 -65
  452. package/dist/services/HistoryReplayService.js.map +1 -1
  453. package/dist/services/HubDiscovery.d.ts +0 -8
  454. package/dist/services/HubDiscovery.d.ts.map +1 -1
  455. package/dist/services/HubDiscovery.js +0 -8
  456. package/dist/services/HubDiscovery.js.map +1 -1
  457. package/dist/services/HubNavigation.d.ts +0 -6
  458. package/dist/services/HubNavigation.d.ts.map +1 -1
  459. package/dist/services/HubNavigation.js +5 -8
  460. package/dist/services/HubNavigation.js.map +1 -1
  461. package/dist/services/IntegrationsClient.d.ts +0 -34
  462. package/dist/services/IntegrationsClient.d.ts.map +1 -1
  463. package/dist/services/IntegrationsClient.js +0 -27
  464. package/dist/services/IntegrationsClient.js.map +1 -1
  465. package/dist/services/LocalGitService.d.ts +0 -57
  466. package/dist/services/LocalGitService.d.ts.map +1 -1
  467. package/dist/services/LocalGitService.js +4 -85
  468. package/dist/services/LocalGitService.js.map +1 -1
  469. package/dist/services/MCPOnboardingTelemetry.d.ts +0 -9
  470. package/dist/services/MCPOnboardingTelemetry.d.ts.map +1 -1
  471. package/dist/services/MCPOnboardingTelemetry.js +0 -9
  472. package/dist/services/MCPOnboardingTelemetry.js.map +1 -1
  473. package/dist/services/MCPVariantsTelemetry.d.ts +0 -2
  474. package/dist/services/MCPVariantsTelemetry.d.ts.map +1 -1
  475. package/dist/services/MCPVariantsTelemetry.js +0 -2
  476. package/dist/services/MCPVariantsTelemetry.js.map +1 -1
  477. package/dist/services/OperatingSystemServices.d.ts +0 -22
  478. package/dist/services/OperatingSystemServices.d.ts.map +1 -1
  479. package/dist/services/OperatingSystemServices.js +22 -80
  480. package/dist/services/OperatingSystemServices.js.map +1 -1
  481. package/dist/services/PRTitleGenerator.d.ts +0 -7
  482. package/dist/services/PRTitleGenerator.d.ts.map +1 -1
  483. package/dist/services/PRTitleGenerator.js +0 -3
  484. package/dist/services/PRTitleGenerator.js.map +1 -1
  485. package/dist/services/ProjectCardPreviews.d.ts +0 -5
  486. package/dist/services/ProjectCardPreviews.d.ts.map +1 -1
  487. package/dist/services/ProjectCardPreviews.js +0 -5
  488. package/dist/services/ProjectCardPreviews.js.map +1 -1
  489. package/dist/services/ProjectDetectionService.d.ts +0 -4
  490. package/dist/services/ProjectDetectionService.d.ts.map +1 -1
  491. package/dist/services/ProjectDetectionService.js +2 -44
  492. package/dist/services/ProjectDetectionService.js.map +1 -1
  493. package/dist/services/ProjectFolderPicker.d.ts +0 -3
  494. package/dist/services/ProjectFolderPicker.d.ts.map +1 -1
  495. package/dist/services/ProjectFolderPicker.js +0 -4
  496. package/dist/services/ProjectFolderPicker.js.map +1 -1
  497. package/dist/services/ProjectImport.d.ts +0 -1
  498. package/dist/services/ProjectImport.d.ts.map +1 -1
  499. package/dist/services/ProjectImport.js +0 -3
  500. package/dist/services/ProjectImport.js.map +1 -1
  501. package/dist/services/ProjectLibrary.d.ts +0 -18
  502. package/dist/services/ProjectLibrary.d.ts.map +1 -1
  503. package/dist/services/ProjectLibrary.js +0 -20
  504. package/dist/services/ProjectLibrary.js.map +1 -1
  505. package/dist/services/ProjectMetadataStore.d.ts +0 -73
  506. package/dist/services/ProjectMetadataStore.d.ts.map +1 -1
  507. package/dist/services/ProjectMetadataStore.js +0 -90
  508. package/dist/services/ProjectMetadataStore.js.map +1 -1
  509. package/dist/services/ProjectPackageManager.d.ts +23 -0
  510. package/dist/services/ProjectPackageManager.d.ts.map +1 -0
  511. package/dist/services/ProjectPackageManager.js +185 -0
  512. package/dist/services/ProjectPackageManager.js.map +1 -0
  513. package/dist/services/ProjectRegistry.d.ts +0 -16
  514. package/dist/services/ProjectRegistry.d.ts.map +1 -1
  515. package/dist/services/ProjectRegistry.js +0 -18
  516. package/dist/services/ProjectRegistry.js.map +1 -1
  517. package/dist/services/ProjectRuntimeService.d.ts +0 -4
  518. package/dist/services/ProjectRuntimeService.d.ts.map +1 -1
  519. package/dist/services/ProjectRuntimeService.js +0 -5
  520. package/dist/services/ProjectRuntimeService.js.map +1 -1
  521. package/dist/services/ProjectScreenshotService.d.ts +0 -5
  522. package/dist/services/ProjectScreenshotService.d.ts.map +1 -1
  523. package/dist/services/ProjectScreenshotService.js +0 -6
  524. package/dist/services/ProjectScreenshotService.js.map +1 -1
  525. package/dist/services/ProjectStorage.d.ts +0 -4
  526. package/dist/services/ProjectStorage.d.ts.map +1 -1
  527. package/dist/services/ProjectStorage.js +0 -4
  528. package/dist/services/ProjectStorage.js.map +1 -1
  529. package/dist/services/PrototypeBuildService.d.ts +1 -23
  530. package/dist/services/PrototypeBuildService.d.ts.map +1 -1
  531. package/dist/services/PrototypeBuildService.js +6 -31
  532. package/dist/services/PrototypeBuildService.js.map +1 -1
  533. package/dist/services/PrototypeDeployService.d.ts +0 -20
  534. package/dist/services/PrototypeDeployService.d.ts.map +1 -1
  535. package/dist/services/PrototypeDeployService.js +1 -24
  536. package/dist/services/PrototypeDeployService.js.map +1 -1
  537. package/dist/services/RequestAuthContext.d.ts +0 -5
  538. package/dist/services/RequestAuthContext.d.ts.map +1 -1
  539. package/dist/services/RequestAuthContext.js +0 -5
  540. package/dist/services/RequestAuthContext.js.map +1 -1
  541. package/dist/services/SessionBridgeService.d.ts.map +1 -1
  542. package/dist/services/SessionBridgeService.js +0 -2
  543. package/dist/services/SessionBridgeService.js.map +1 -1
  544. package/dist/services/SessionService.d.ts +0 -4
  545. package/dist/services/SessionService.d.ts.map +1 -1
  546. package/dist/services/SessionService.js +1 -22
  547. package/dist/services/SessionService.js.map +1 -1
  548. package/dist/services/StaticFileService.d.ts +0 -9
  549. package/dist/services/StaticFileService.d.ts.map +1 -1
  550. package/dist/services/StaticFileService.js +0 -11
  551. package/dist/services/StaticFileService.js.map +1 -1
  552. package/dist/services/StaticLibraryPreviews.d.ts +0 -3
  553. package/dist/services/StaticLibraryPreviews.d.ts.map +1 -1
  554. package/dist/services/StaticLibraryPreviews.js +0 -3
  555. package/dist/services/StaticLibraryPreviews.js.map +1 -1
  556. package/dist/services/StaticPreviewServer.d.ts +0 -16
  557. package/dist/services/StaticPreviewServer.d.ts.map +1 -1
  558. package/dist/services/StaticPreviewServer.js +2 -28
  559. package/dist/services/StaticPreviewServer.js.map +1 -1
  560. package/dist/services/SupabaseAuthService.d.ts +0 -11
  561. package/dist/services/SupabaseAuthService.d.ts.map +1 -1
  562. package/dist/services/SupabaseAuthService.js +0 -11
  563. package/dist/services/SupabaseAuthService.js.map +1 -1
  564. package/dist/services/SupportTicketService.d.ts +0 -4
  565. package/dist/services/SupportTicketService.d.ts.map +1 -1
  566. package/dist/services/SupportTicketService.js +0 -4
  567. package/dist/services/SupportTicketService.js.map +1 -1
  568. package/dist/services/TelemetryService.d.ts +0 -182
  569. package/dist/services/TelemetryService.d.ts.map +1 -1
  570. package/dist/services/TelemetryService.js +0 -193
  571. package/dist/services/TelemetryService.js.map +1 -1
  572. package/dist/services/TreeStore.d.ts +0 -72
  573. package/dist/services/TreeStore.d.ts.map +1 -1
  574. package/dist/services/TreeStore.js +2 -101
  575. package/dist/services/TreeStore.js.map +1 -1
  576. package/dist/services/VariantGenerationService.d.ts +0 -32
  577. package/dist/services/VariantGenerationService.d.ts.map +1 -1
  578. package/dist/services/VariantGenerationService.js +5 -62
  579. package/dist/services/VariantGenerationService.js.map +1 -1
  580. package/dist/services/VariantHistoryService.d.ts +0 -114
  581. package/dist/services/VariantHistoryService.d.ts.map +1 -1
  582. package/dist/services/VariantHistoryService.js +2 -144
  583. package/dist/services/VariantHistoryService.js.map +1 -1
  584. package/dist/services/VariantRunService.d.ts +0 -31
  585. package/dist/services/VariantRunService.d.ts.map +1 -1
  586. package/dist/services/VariantRunService.js +0 -35
  587. package/dist/services/VariantRunService.js.map +1 -1
  588. package/dist/services/VariantsRuntime.d.ts +0 -3
  589. package/dist/services/VariantsRuntime.d.ts.map +1 -1
  590. package/dist/services/VariantsRuntime.js +0 -5
  591. package/dist/services/VariantsRuntime.js.map +1 -1
  592. package/dist/services/WorktreeManager.d.ts +1 -220
  593. package/dist/services/WorktreeManager.d.ts.map +1 -1
  594. package/dist/services/WorktreeManager.js +75 -372
  595. package/dist/services/WorktreeManager.js.map +1 -1
  596. package/dist/services/accessTokenRefresh.d.ts +0 -25
  597. package/dist/services/accessTokenRefresh.d.ts.map +1 -1
  598. package/dist/services/accessTokenRefresh.js +0 -25
  599. package/dist/services/accessTokenRefresh.js.map +1 -1
  600. package/dist/services/adapters/TailwindTokenAdapter.d.ts +0 -29
  601. package/dist/services/adapters/TailwindTokenAdapter.d.ts.map +1 -1
  602. package/dist/services/adapters/TailwindTokenAdapter.js +1 -46
  603. package/dist/services/adapters/TailwindTokenAdapter.js.map +1 -1
  604. package/dist/services/createAgentVariantsOrchestrator.d.ts +0 -18
  605. package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
  606. package/dist/services/createAgentVariantsOrchestrator.js +0 -22
  607. package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
  608. package/dist/services/extractors/CSSVariableExtractor.d.ts +0 -25
  609. package/dist/services/extractors/CSSVariableExtractor.d.ts.map +1 -1
  610. package/dist/services/extractors/CSSVariableExtractor.js +1 -42
  611. package/dist/services/extractors/CSSVariableExtractor.js.map +1 -1
  612. package/dist/services/historyRoots.d.ts +0 -12
  613. package/dist/services/historyRoots.d.ts.map +1 -1
  614. package/dist/services/historyRoots.js +0 -13
  615. package/dist/services/historyRoots.js.map +1 -1
  616. package/dist/services/libraryErrors.d.ts +0 -1
  617. package/dist/services/libraryErrors.d.ts.map +1 -1
  618. package/dist/services/libraryErrors.js +0 -1
  619. package/dist/services/libraryErrors.js.map +1 -1
  620. package/dist/services/pendingLogin.d.ts +0 -13
  621. package/dist/services/pendingLogin.d.ts.map +1 -1
  622. package/dist/services/pendingLogin.js +0 -3
  623. package/dist/services/pendingLogin.js.map +1 -1
  624. package/dist/services/staticProjectTarget.d.ts +0 -4
  625. package/dist/services/staticProjectTarget.d.ts.map +1 -1
  626. package/dist/services/staticProjectTarget.js +0 -4
  627. package/dist/services/staticProjectTarget.js.map +1 -1
  628. package/dist/services/staticStarter.d.ts +0 -20
  629. package/dist/services/staticStarter.d.ts.map +1 -1
  630. package/dist/services/staticStarter.js +0 -20
  631. package/dist/services/staticStarter.js.map +1 -1
  632. package/dist/services/templates/designCatalog.d.ts +0 -11
  633. package/dist/services/templates/designCatalog.d.ts.map +1 -1
  634. package/dist/services/templates/designCatalog.js +0 -26
  635. package/dist/services/templates/designCatalog.js.map +1 -1
  636. package/dist/services/templates/viteReactTs.d.ts +0 -26
  637. package/dist/services/templates/viteReactTs.d.ts.map +1 -1
  638. package/dist/services/templates/viteReactTs.js +0 -20
  639. package/dist/services/templates/viteReactTs.js.map +1 -1
  640. package/dist/storage/library/BundleMetadataStore.d.ts +0 -16
  641. package/dist/storage/library/BundleMetadataStore.d.ts.map +1 -1
  642. package/dist/storage/library/BundleMetadataStore.js +0 -17
  643. package/dist/storage/library/BundleMetadataStore.js.map +1 -1
  644. package/dist/storage/library/CoordinatorRecords.d.ts +0 -9
  645. package/dist/storage/library/CoordinatorRecords.d.ts.map +1 -1
  646. package/dist/storage/library/CoordinatorRecords.js +0 -9
  647. package/dist/storage/library/CoordinatorRecords.js.map +1 -1
  648. package/dist/storage/library/ProjectPreviewCache.d.ts +0 -4
  649. package/dist/storage/library/ProjectPreviewCache.d.ts.map +1 -1
  650. package/dist/storage/library/ProjectPreviewCache.js +0 -4
  651. package/dist/storage/library/ProjectPreviewCache.js.map +1 -1
  652. package/dist/storage/library/ProjectRecords.d.ts +0 -17
  653. package/dist/storage/library/ProjectRecords.d.ts.map +1 -1
  654. package/dist/storage/library/ProjectRecords.js +0 -17
  655. package/dist/storage/library/ProjectRecords.js.map +1 -1
  656. package/dist/storage/library/database.d.ts +0 -3
  657. package/dist/storage/library/database.d.ts.map +1 -1
  658. package/dist/storage/library/database.js +0 -3
  659. package/dist/storage/library/database.js.map +1 -1
  660. package/dist/storage/library/migrations.d.ts +0 -2
  661. package/dist/storage/library/migrations.d.ts.map +1 -1
  662. package/dist/storage/library/migrations.js +0 -2
  663. package/dist/storage/library/migrations.js.map +1 -1
  664. package/dist/storage/library/sourcePresentation.d.ts +0 -1
  665. package/dist/storage/library/sourcePresentation.d.ts.map +1 -1
  666. package/dist/storage/library/sourcePresentation.js +0 -1
  667. package/dist/storage/library/sourcePresentation.js.map +1 -1
  668. package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts +0 -11
  669. package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts.map +1 -1
  670. package/dist/storage/project-metadata/ProjectMetadataRecords.js +0 -13
  671. package/dist/storage/project-metadata/ProjectMetadataRecords.js.map +1 -1
  672. package/dist/storage/project-metadata/database.d.ts +0 -1
  673. package/dist/storage/project-metadata/database.d.ts.map +1 -1
  674. package/dist/storage/project-metadata/database.js +0 -7
  675. package/dist/storage/project-metadata/database.js.map +1 -1
  676. package/dist/storage/project-metadata/migrations.d.ts +0 -42
  677. package/dist/storage/project-metadata/migrations.d.ts.map +1 -1
  678. package/dist/storage/project-metadata/migrations.js +0 -41
  679. package/dist/storage/project-metadata/migrations.js.map +1 -1
  680. package/dist/types/account.d.ts +0 -1
  681. package/dist/types/account.d.ts.map +1 -1
  682. package/dist/types/change-request-types.d.ts +0 -167
  683. package/dist/types/change-request-types.d.ts.map +1 -1
  684. package/dist/types/change-types.d.ts +0 -1
  685. package/dist/types/change-types.d.ts.map +1 -1
  686. package/dist/types/change-types.js +0 -1
  687. package/dist/types/change-types.js.map +1 -1
  688. package/dist/types/project-library.d.ts +0 -1
  689. package/dist/types/project-library.d.ts.map +1 -1
  690. package/dist/types/style-manipulation-types.d.ts +0 -69
  691. package/dist/types/style-manipulation-types.d.ts.map +1 -1
  692. package/dist/types/style-manipulation-types.js +0 -26
  693. package/dist/types/style-manipulation-types.js.map +1 -1
  694. package/dist/types/token-types.d.ts +0 -30
  695. package/dist/types/token-types.d.ts.map +1 -1
  696. package/dist/types/token-types.js +0 -1
  697. package/dist/types/token-types.js.map +1 -1
  698. package/dist/types/variant-history.d.ts +0 -39
  699. package/dist/types/variant-history.d.ts.map +1 -1
  700. package/dist/utils/branchNames.d.ts +0 -1
  701. package/dist/utils/branchNames.d.ts.map +1 -1
  702. package/dist/utils/branchNames.js +0 -2
  703. package/dist/utils/branchNames.js.map +1 -1
  704. package/dist/utils/cloneOrCopyDirSync.d.ts +0 -12
  705. package/dist/utils/cloneOrCopyDirSync.d.ts.map +1 -1
  706. package/dist/utils/cloneOrCopyDirSync.js +1 -15
  707. package/dist/utils/cloneOrCopyDirSync.js.map +1 -1
  708. package/dist/utils/devServerCommand.d.ts +0 -23
  709. package/dist/utils/devServerCommand.d.ts.map +1 -1
  710. package/dist/utils/devServerCommand.js +0 -24
  711. package/dist/utils/devServerCommand.js.map +1 -1
  712. package/dist/utils/devServerError.d.ts +2 -16
  713. package/dist/utils/devServerError.d.ts.map +1 -1
  714. package/dist/utils/devServerError.js +4 -17
  715. package/dist/utils/devServerError.js.map +1 -1
  716. package/dist/utils/displayLocale.d.ts +0 -2
  717. package/dist/utils/displayLocale.d.ts.map +1 -1
  718. package/dist/utils/displayLocale.js +0 -2
  719. package/dist/utils/displayLocale.js.map +1 -1
  720. package/dist/utils/elementFileHintSignals.d.ts +0 -5
  721. package/dist/utils/elementFileHintSignals.d.ts.map +1 -1
  722. package/dist/utils/elementFileHintSignals.js +0 -5
  723. package/dist/utils/elementFileHintSignals.js.map +1 -1
  724. package/dist/utils/formatElementTargetingContext.d.ts +0 -6
  725. package/dist/utils/formatElementTargetingContext.d.ts.map +1 -1
  726. package/dist/utils/formatElementTargetingContext.js +3 -9
  727. package/dist/utils/formatElementTargetingContext.js.map +1 -1
  728. package/dist/utils/hostAgentEnv.d.ts +0 -17
  729. package/dist/utils/hostAgentEnv.d.ts.map +1 -1
  730. package/dist/utils/hostAgentEnv.js +0 -17
  731. package/dist/utils/hostAgentEnv.js.map +1 -1
  732. package/dist/utils/htmlDocument.d.ts +2 -8
  733. package/dist/utils/htmlDocument.d.ts.map +1 -1
  734. package/dist/utils/htmlDocument.js +20 -16
  735. package/dist/utils/htmlDocument.js.map +1 -1
  736. package/dist/utils/internalGitIdentity.d.ts +2 -0
  737. package/dist/utils/internalGitIdentity.d.ts.map +1 -0
  738. package/dist/utils/internalGitIdentity.js +12 -0
  739. package/dist/utils/internalGitIdentity.js.map +1 -0
  740. package/dist/utils/logger.d.ts +0 -5
  741. package/dist/utils/logger.d.ts.map +1 -1
  742. package/dist/utils/logger.js +2 -19
  743. package/dist/utils/logger.js.map +1 -1
  744. package/dist/utils/loginShellPath.d.ts +0 -9
  745. package/dist/utils/loginShellPath.d.ts.map +1 -1
  746. package/dist/utils/loginShellPath.js +0 -69
  747. package/dist/utils/loginShellPath.js.map +1 -1
  748. package/dist/utils/loopback.d.ts +0 -1
  749. package/dist/utils/loopback.d.ts.map +1 -1
  750. package/dist/utils/loopback.js +0 -1
  751. package/dist/utils/loopback.js.map +1 -1
  752. package/dist/utils/pid.d.ts +0 -1
  753. package/dist/utils/pid.d.ts.map +1 -1
  754. package/dist/utils/pid.js +0 -1
  755. package/dist/utils/pid.js.map +1 -1
  756. package/dist/utils/portUtils.d.ts +1 -14
  757. package/dist/utils/portUtils.d.ts.map +1 -1
  758. package/dist/utils/portUtils.js +1 -21
  759. package/dist/utils/portUtils.js.map +1 -1
  760. package/dist/utils/queueAccess.d.ts +0 -9
  761. package/dist/utils/queueAccess.d.ts.map +1 -1
  762. package/dist/utils/queueAccess.js +0 -9
  763. package/dist/utils/queueAccess.js.map +1 -1
  764. package/dist/utils/skillWriter.d.ts +0 -17
  765. package/dist/utils/skillWriter.d.ts.map +1 -1
  766. package/dist/utils/skillWriter.js +0 -20
  767. package/dist/utils/skillWriter.js.map +1 -1
  768. package/dist/utils/skills/claude-skill.d.ts +0 -5
  769. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  770. package/dist/utils/skills/claude-skill.js +0 -5
  771. package/dist/utils/skills/claude-skill.js.map +1 -1
  772. package/dist/utils/skills/cli-guidance.d.ts +0 -8
  773. package/dist/utils/skills/cli-guidance.d.ts.map +1 -1
  774. package/dist/utils/skills/cli-guidance.js +0 -8
  775. package/dist/utils/skills/cli-guidance.js.map +1 -1
  776. package/dist/utils/skills/cursor-rules.d.ts +0 -6
  777. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  778. package/dist/utils/skills/cursor-rules.js +0 -6
  779. package/dist/utils/skills/cursor-rules.js.map +1 -1
  780. package/dist/utils/variantPreviewPort.d.ts +0 -3
  781. package/dist/utils/variantPreviewPort.d.ts.map +1 -1
  782. package/dist/utils/variantPreviewPort.js +0 -3
  783. package/dist/utils/variantPreviewPort.js.map +1 -1
  784. package/dist/utils/windowPlacement.d.ts +0 -4
  785. package/dist/utils/windowPlacement.d.ts.map +1 -1
  786. package/dist/utils/windowPlacement.js +0 -4
  787. package/dist/utils/windowPlacement.js.map +1 -1
  788. package/package.json +15 -14
  789. package/scripts/verify-node-version.cjs +0 -3
  790. package/src/ui/dist/assets/{LibraryApp-PQNnarmo.js → LibraryApp-x6PbzlGr.js} +1 -1
  791. package/src/ui/dist/assets/{main-C7hdsU-C.js → main-BW1Odsqp.js} +76 -76
  792. package/src/ui/dist/assets/main-DDQRZm89.css +1 -0
  793. package/src/ui/dist/index.html +2 -2
  794. package/dist/utils/skills/describe-motion-protocol.d.ts +0 -10
  795. package/dist/utils/skills/describe-motion-protocol.d.ts.map +0 -1
  796. package/dist/utils/skills/describe-motion-protocol.js +0 -231
  797. package/dist/utils/skills/describe-motion-protocol.js.map +0 -1
  798. package/src/ui/dist/assets/main-BUZjlAHd.css +0 -1
@@ -5,80 +5,28 @@ import type { ActiveProjectContext, ActiveVariantSnapshot, Brief, DesignContextE
5
5
  import { VariantHistoryService } from '../services/VariantHistoryService';
6
6
  import type { MCPVariantsTelemetryMetadata } from '../services/MCPVariantsTelemetry';
7
7
  import type { Framework } from '../services/ProjectDetectionService';
8
- /**
9
- * Subset of WorktreeManager that the orchestrator depends on. Defined as an
10
- * interface so unit tests can mock it without spinning up real git/processes.
11
- *
12
- * Each succeeded variant gets its own dev server so the user can cycle
13
- * between live, running variants in the iframe via a proxy retarget.
14
- */
15
8
  export interface WorktreeManagerLike {
16
- /** `instanceKeyPrefix` namespaces appended batches so a sequential "Vary"
17
- * on the same session doesn't collide with the first batch's worktree
18
- * dirs (still inside the per-session cleanup glob). */
19
9
  createWorktrees(sessionId: string, count: number, instanceKeyPrefix?: string): Promise<string[]>;
20
- /** Copy an existing variant worktree into N new sibling worktrees. Used when
21
- * a code_gen "Vary" targets a parent variant so forks inherit its diff. */
22
10
  forkWorktreesFrom?(sourceWorktreePath: string, sessionId: string, count: number, instanceKeyPrefix?: string): Promise<string[]>;
23
11
  getDiff(worktreePath: string): Promise<string>;
24
- /** Absolute git root of the host project's repo. Used as the base-snapshot
25
- * root for tree-store history persistence (see the tree-root contract in
26
- * the design doc). Optional so lightweight test doubles needn't implement
27
- * it — persistence degrades to no base ref. */
28
12
  getGitRoot?(): Promise<string>;
29
- /** Apply a unified diff to a project working tree (no commit). Used by
30
- * commitVariant to land the chosen variant on the user's branch
31
- * immediately rather than waiting for an agent to pick up pending-changes. */
32
13
  applyDiffToProject?(diff: string, projectPath: string): Promise<void>;
33
- /** `freshDestinationParent` is required when the session was fresh — it
34
- * tells WorktreeManager which `<destinationParent>/.rivet-variants/` root
35
- * the worktrees live under (since fresh worktrees are no longer in /tmp). */
36
14
  cleanupSession(sessionId: string, freshDestinationParent?: string): Promise<void>;
37
15
  getFreePort(): Promise<number>;
38
- /** Find a free port scanning upward from `startPort` (the framework default),
39
- * so previews come up on a sensible port near the project's normal one and
40
- * step past a port the user's own dev server already holds. */
41
16
  findFreePortFrom(startPort: number): Promise<number>;
42
- /** Release a port handed out by `findFreePortFrom` once its dev server has
43
- * bound it or failed to start, so concurrent variant starts stop avoiding
44
- * it. Optional so lightweight test doubles needn't implement it. */
45
17
  releasePort?(port: number): void;
46
18
  startDevServer(worktreePath: string, port: number, cmd: string, args: string[], env: Record<string, string>): Promise<ChildProcess>;
47
19
  stopDevServer(proc: ChildProcess, timeoutMs?: number): Promise<void>;
48
20
  getProjectCwdInWorktree(worktreePath: string): Promise<string>;
49
- /** Optional fresh-project scaffold support — present in production but
50
- * optional so unit tests can mock with the minimum surface they need.
51
- * `destinationParent` is the user-supplied workspace parent directory;
52
- * fresh worktrees are scaffolded under `<destinationParent>/.rivet-variants/`
53
- * so commit time can be a same-volume rename. */
54
21
  createFreshWorktrees?(sessionId: string, count: number, template: import('../services/templates/viteReactTs').TemplateBundle, designContext: ReadonlyArray<DesignContextEntry | undefined> | undefined, destinationParent: string): Promise<string[]>;
55
- /** Move a fresh-worktree directory to its history location, preserving
56
- * contents. Optional on the interface so unit tests can stub partially. */
57
22
  moveWorktreeToHistory?(srcWorktreePath: string, historyDir: string, folderName: string): string;
58
- /** Repoint a worktree's node_modules to a shared install via relative
59
- * symlink. Optional on the interface so unit tests can stub partially. */
60
- repointNodeModulesSymlink?(worktreePath: string, sharedNodeModulesAbsPath: string): void;
61
23
  }
62
- /**
63
- * Per-session resolved environment. Used to populate destinationPath on the
64
- * variant envelope and (in fresh-project flows) the workspace target. Also
65
- * identifies either the selected static entry or the dev-server command.
66
- * Static projects cannot carry package-manager fields, so a missing entry can
67
- * never fall through to an invalid package-manager invocation.
68
- */
69
24
  type DevServerProjectEnvironment = {
70
25
  projectPath: string;
71
26
  framework: Exclude<Framework, 'static'>;
72
27
  packageManager: string;
73
28
  devCommand: string;
74
- /** The framework's conventional dev-server port (e.g. 3000 for Next, 5173
75
- * for Vite). Used as the starting point when allocating a variant's preview
76
- * port so it lands somewhere sensible near the project's normal port. */
77
29
  defaultPort?: number;
78
- /** Builds (cmd, args, env) for spawning a dev server in a worktree on a
79
- * specific port. Defaults to a generic { packageManager, [devCommand,
80
- * '--port', port] } shape if not provided, but production wires this to
81
- * buildDevServerCommand from utils/devServerCommand.ts. */
82
30
  buildDevCommand?: (port: number) => {
83
31
  cmd: string;
84
32
  args: string[];
@@ -91,23 +39,11 @@ type StaticProjectEnvironment = {
91
39
  entryPath: string;
92
40
  };
93
41
  export type ProjectEnvironment = DevServerProjectEnvironment | StaticProjectEnvironment;
94
- /**
95
- * Checks a static-preview artifact before the orchestrator marks it as
96
- * succeeded. The default implementation validates non-empty HTML without
97
- * starting a browser. Tests may inject a runner to exercise pass and
98
- * terminal-failure paths deterministically.
99
- */
100
42
  export type PreviewQaRunner = (args: {
101
43
  sessionId: string;
102
44
  workItemId: string;
103
45
  html: string;
104
46
  }) => Promise<VariantQaResult>;
105
- /**
106
- * An in-place refine target that could not be applied (the variant was already
107
- * sent / is no longer editable and there was no pending refinement to fold the
108
- * instruction into). Returned by {@link AgentVariantsOrchestrator.beginStaticPreviewRefinements}
109
- * so the caller surfaces it to the agent instead of dropping it silently.
110
- */
111
47
  export type DroppedRefinement = {
112
48
  variantId: string;
113
49
  reason: string;
@@ -117,65 +53,25 @@ export interface OrchestratorDeps {
117
53
  worktreeManager: WorktreeManagerLike;
118
54
  resolveProjectEnvironment: (sessionId: string) => Promise<ProjectEnvironment>;
119
55
  telemetry?: VariantsTelemetry;
120
- /** Background dependency installer for worktrees. Defaults to a real
121
- * spawn-based runner; tests inject a fast no-op or rejecting stub. */
122
- installDependencies?: (worktreePath: string, packageManager?: PreviewPackageManager) => Promise<void>;
123
- /** Server-side materialize step for fresh-project commits. Copies the
124
- * source worktree to `destinationPath` excluding install artifacts and
125
- * initializes a fresh git repo. Defaults to a real fs.cp + simpleGit
126
- * implementation; tests inject a stub. */
56
+ installDependencies?: (worktreePath: string, options?: {
57
+ workspaceRoot: string;
58
+ force?: boolean;
59
+ signal?: AbortSignal;
60
+ }) => Promise<void>;
127
61
  materializeProject?: (sourceWorktreePath: string, destinationPath: string) => Promise<void>;
128
- /** Override the preview QA runner. See `PreviewQaRunner` for the contract. */
129
62
  previewQaRunner?: PreviewQaRunner;
130
- /** Retarget the iframe proxy to a different dev-server port (or back to the
131
- * default upstream when `null`). Used by `commitVariant` on the fresh
132
- * vite_app rename path: after the chosen variant is renamed into
133
- * destinationPath, the orchestrator spawns a fresh dev server there and
134
- * retargets so the iframe stays live instead of flashing "preview
135
- * disconnected." Optional — tests can omit, and production wires it to
136
- * `SessionBridgeService.switchPreviewPort`. */
137
63
  switchPreviewPort?: (port: number | null) => void;
138
- /** Advertise a Rivet-spawned committed dev/static server on the bridge's
139
- * `devServerHealth` so `/api/mcp/status` and the iframe's upstream-probe
140
- * see `ownership: 'rivet_owned'`. Distinct from `switchPreviewPort`
141
- * (which is also called during variant cycling and on cancel — those
142
- * must NOT mutate the user's external dev-server health). Only the
143
- * commit-handoff path calls this. Production wires it to
144
- * `SessionBridgeService.setCommittedDevServerHealth`. */
145
64
  setCommittedDevServerHealth?: (port: number | null) => void;
146
- /** Local persistence for the variant-history feature. Writes every
147
- * completed code_gen variant (and committed/rejected fresh-project
148
- * variants) into `<projectPath>/.rivet/variants/` so the UI and
149
- * MCP `list_past_variants` tool can surface prior runs. Optional in the
150
- * constructor for tests; production wires a real instance. */
151
65
  variantHistory?: VariantHistoryService;
152
- /** Spawn a static file server bound to a committed `static_preview`
153
- * project. Defaults to the real `startStaticPreviewServer` (spawns a Node
154
- * child process). Tests inject a fake that returns a stub `ChildProcess`
155
- * so they don't bind real ports. */
156
66
  startStaticPreviewServer?: (args: {
157
67
  rootPath: string;
158
68
  port: number;
159
69
  host?: string;
160
70
  }) => Promise<ChildProcess>;
161
- /** Hard ceiling (ms) on worktree provisioning before the kickoff fails fast.
162
- * Defaults to `RIVET_VARIANTS_PROVISION_TIMEOUT_MS` / 540s. Tests inject a
163
- * tiny value to exercise the timeout path without real slow I/O. */
164
71
  provisionTimeoutMs?: number;
165
- /** Idle TTL (ms) for active variant dev servers. Defaults to
166
- * `RIVET_ACTIVE_VARIANT_SERVER_IDLE_TTL_MS` / 30m. Tests inject a short
167
- * value so server reclamation is deterministic. */
168
72
  activeVariantServerIdleTtlMs?: number;
169
- /** Grace (ms) before auto-restarting a ready dev server that crashed, so
170
- * the dying process's port and file locks are released first. Defaults to
171
- * `DEV_SERVER_RESTART_DELAY_MS`; tests inject a tiny value. */
172
73
  devServerRestartDelayMs?: number;
173
74
  }
174
- /**
175
- * Minimal telemetry surface the orchestrator depends on. Decoupled from
176
- * TelemetryService so unit tests can pass a stub. Production wires this
177
- * to the singleton TelemetryService instance.
178
- */
179
75
  export interface VariantsTelemetry {
180
76
  track(event: string, properties?: Record<string, unknown>): void;
181
77
  trackAgentVariantsRequestStarted?: (data: MCPVariantsTelemetryMetadata) => void;
@@ -224,15 +120,10 @@ export interface VariantsTelemetry {
224
120
  sessionId: string;
225
121
  variantId: string;
226
122
  errorCode: string;
227
- /** Coarse cause: 'spawn_error' | 'exited' | 'timeout' |
228
- * 'missing_dev_script' | 'unknown'. */
229
123
  reason?: string;
230
- /** True when the failure was a port collision (EADDRINUSE / already running). */
231
124
  portInUse?: boolean;
232
- /** Child exit code / signal when reason is 'exited'. */
233
125
  exitCode?: number | null;
234
126
  signal?: string | null;
235
- /** True when the output matched module-resolution failure markers. */
236
127
  missingDeps?: boolean;
237
128
  }) => void;
238
129
  trackAgentVariantsPreviewStarted?: (data: {
@@ -289,9 +180,6 @@ export interface VariantsTelemetry {
289
180
  durationMs: number | null;
290
181
  }) => void;
291
182
  }
292
- /** Snapshot shape consumed by the iframe chip, both via SSE and the legacy
293
- * GET /api/variants/active endpoint. Single source of truth lives on the
294
- * orchestrator (`buildActiveSnapshot`) so both transports are consistent. */
295
183
  export type ActiveSnapshot = {
296
184
  active: false;
297
185
  } | {
@@ -305,41 +193,13 @@ export type ActiveSnapshot = {
305
193
  };
306
194
  summary: TerminalSummary | null;
307
195
  variants: ActiveVariantSnapshot[];
308
- /** Project context for the session — surfaced so the chip can render
309
- * a "Creating new project at {destinationPath}" header for fresh
310
- * sessions vs the default refinement header. */
311
196
  projectContext: ActiveProjectContext;
312
- /** For fresh sessions, the user-facing destination path the materialize
313
- * step will land at. Undefined for existing-project sessions. */
314
197
  destinationPath?: string;
315
- /** Supporting artifacts the agent used or generated for this session
316
- * (e.g. the DESIGN.md inspirations for a 0→1 run). Surfaced under the
317
- * variants list so the user can inspect the hidden MCP context. */
318
198
  artifacts?: VariantSessionArtifact[];
319
199
  hostWork?: import('./contracts').HostVariantWorkItemSnapshot[];
320
- /** One-line summary of the run's worker-runtime lease decision —
321
- * `"codex (initiator)"` / `"host path (cursor: …)"` — so status
322
- * surfaces can answer "what is running these directions?" while
323
- * workers are still in flight (per-variant `runtime` lands only on
324
- * completion). Reflects the most recent batch in the session. */
325
200
  workerRuntime?: string;
326
- /** Depth of the server's variant-request/refine FIFO at snapshot time.
327
- * Stamped onto the SSE payload from the live bridge (the FIFO does not
328
- * live on the orchestrator), so `buildActiveSnapshot()` itself leaves it
329
- * undefined and the SSE route fills it in. */
330
201
  pendingVariantRequests?: number;
331
202
  };
332
- /**
333
- * Wraps SessionStore for the operations that have side effects: approve
334
- * (provision worktrees), reportComplete (capture diff), commit (apply picked
335
- * output), cancel (teardown). Pure read paths bypass and call SessionStore
336
- * directly.
337
- *
338
- * This is the terminal-native variant of the orchestrator: the user picks
339
- * a single brief upfront, so there's only ever one code-gen item per
340
- * session and no live preview / proxy retarget. Once the agent reports
341
- * the variant succeeded, the CLI can commit the chosen output directly.
342
- */
343
203
  export declare class AgentVariantsOrchestrator {
344
204
  private readonly store;
345
205
  private readonly worktrees;
@@ -356,75 +216,23 @@ export declare class AgentVariantsOrchestrator {
356
216
  private readonly activeVariantServerIdleTtlMs;
357
217
  private readonly devServerRestartDelayMs;
358
218
  private readonly resources;
359
- /**
360
- * Committed dev servers from prior sessions that survived teardown. The
361
- * orchestrator outlives any single session — once a new session starts, the
362
- * prior committed dev server is no longer needed (the next session opens
363
- * its own preview chip), so stop it before the new session's first preview
364
- * goes live. Keyed by sessionId for diagnostics; values are kept alive
365
- * intentionally between commit and next `propose` / `shutdown`.
366
- */
367
219
  private readonly lingeringCommittedDevServers;
368
- /**
369
- * Per-session in-flight commit chain. Two overlapping commitVariant calls
370
- * would otherwise both pass the `getVariantPick` idempotency check (the
371
- * pick isn't recorded until after `applyDiffToProject`) and double-invoke
372
- * `git apply` — which corrupts the working tree on the second run. The
373
- * chain serializes commits per session so the second caller waits for the
374
- * first to finish and then hits the idempotency check (returning
375
- * `duplicate: true` for the same variantId, or `PENDING_CHANGE_CONFLICT`
376
- * for a different one).
377
- */
378
220
  private readonly inflightCommits;
379
- /** Most recent agent-variants sessionId — read by the iframe chip via
380
- * GET /api/variants/active. Cleared on cancel or commit. */
381
221
  private activeSessionId;
382
- /** Push channel for the iframe chip's SSE subscription. Emits an
383
- * ActiveSnapshot on every state change so the chip never has to poll. */
384
222
  private readonly events;
385
223
  constructor(deps: OrchestratorDeps);
386
224
  propose(args: ProposeArgs): ProposeResult;
387
- /** Returns the most recent agent-variants sessionId (or null). */
388
225
  getActiveSessionId(): string | null;
389
- /** Subscribe to active-snapshot pushes. Returns an unsubscribe fn. */
390
226
  subscribeToEvents(listener: (snapshot: ActiveSnapshot) => void): () => void;
391
- /** Number of live Rivet UI clients subscribed to the variants SSE stream.
392
- * A subscribed client means a Rivet page is open in the browser. */
393
227
  private uiClientCount;
394
- /** Wall-clock of the last UI-client connect/disconnect. `hasUiClients`
395
- * treats a very recent disconnect as still-connected to ride out the brief
396
- * gap when an EventSource drops and auto-reconnects (default retry ~3s) —
397
- * otherwise a `propose`/`start` landing in that window reads zero clients
398
- * and spawns a duplicate browser tab. */
399
228
  private lastUiClientActivityAt;
400
- /** Grace window covering an EventSource reconnect (its default retry is ~3s;
401
- * the SSE heartbeat is 30s). Long enough to span a reconnect, short enough
402
- * that a genuine page close frees the "reopen on next propose" path quickly. */
403
229
  private static readonly UI_CLIENT_GRACE_MS;
404
- /**
405
- * Register a live Rivet UI client (called when the variants SSE stream opens).
406
- * Returns a release fn to call on disconnect. Used as the "a Rivet page is
407
- * already open" signal so the MCP server can avoid spawning a duplicate tab
408
- * every time the variants flow re-enters an already-active editor session.
409
- */
410
230
  registerUiClient(): () => void;
411
- /** True when at least one Rivet UI page is currently connected — or one
412
- * disconnected within the grace window (an EventSource mid-reconnect). */
413
231
  hasUiClients(): boolean;
414
- /** @effect Records activity for the current variants session, if one exists. */
415
232
  touchActiveSession(): void;
416
- /** @effect Resets idle cleanup for active variant preview servers. */
417
233
  touchSession(sessionId: string): void;
418
- /** Build the snapshot the chip cares about. Reads from SessionStore +
419
- * per-resource state; safe to call at any time. */
420
234
  buildActiveSnapshot(): ActiveSnapshot;
421
- /** Record which worker runtime this session's current batch leases to —
422
- * called by the generation services right after the lease-owner decision
423
- * so `variants start`/status can answer "what is running these?". */
424
235
  setWorkerRuntime(sessionId: string, summary: string): void;
425
- /** User reference files stored in the work item's context bundle (uploaded
426
- * or copied local images). Surfaced on the snapshot so briefings can point
427
- * workers at the files directly — one Read instead of a bundle walk. */
428
236
  private static contextFilesOf;
429
237
  getHostWork(sessionId: string): HostVariantWorkItemSnapshot[];
430
238
  private getAssignedWorkspace;
@@ -461,24 +269,10 @@ export declare class AgentVariantsOrchestrator {
461
269
  workItemId?: string;
462
270
  workItemIds?: string[];
463
271
  }): RequestWorkResult;
464
- /** @effect Copies caller-supplied context assets into each leased workspace. */
465
272
  private materializeContextAssets;
466
- /**
467
- * @effect Records how an existing project's worktrees will be previewed so
468
- * context assets receive references that resolve on that serving surface.
469
- */
470
273
  private resolveContextAssetPreviewKind;
471
- /**
472
- * @effect Writes each leased implementation item's server-authored briefing
473
- * BESIDE its workspace so the coordinating host dispatches workers with a
474
- * short pointer prompt instead of composing prose per worker. Best-effort:
475
- * a briefing write failure never blocks the lease (the host guidance's
476
- * packet fields still carry the same data).
477
- */
478
274
  private writeLeasedWorkItemBriefings;
479
- /** @effect Assigns isolated, server-owned artifact workspaces to leased static work. */
480
275
  private ensureStaticWorkspaces;
481
- /** Reads a completed static artifact while enforcing its assigned directory boundary. */
482
276
  private readAssignedStaticArtifact;
483
277
  beginStaticPreviewRefinements(args: {
484
278
  sessionId: string;
@@ -497,24 +291,6 @@ export declare class AgentVariantsOrchestrator {
497
291
  droppedRefinements: DroppedRefinement[];
498
292
  createdWorkItemIds: string[];
499
293
  };
500
- /**
501
- * Adopt a PAST variant (from a prior session's persisted history) into the
502
- * active session, rehydrating it from its on-disk static snapshot so the
503
- * comment / refine / Vary machinery treats it as a live, first-class variant.
504
- *
505
- * Triggered when the user makes their first edit on a selected past direction.
506
- * The store appends an already-`succeeded` `static_preview` work item keyed by
507
- * the past identity (idempotent); this method registers the matching static-
508
- * preview record so {@link getStaticPreviewHtml}, {@link getVariants}
509
- * (preview.kind = 'static_artifact', view enabled), and the
510
- * `/api/variants/:sid/static/:vid` routes all light up exactly as they do for a
511
- * freshly-generated static_preview variant.
512
- *
513
- * `filesDir` is the absolute path to the persisted `files/` snapshot and
514
- * `entryPath` is its selected HTML document. Returns the stable active-session
515
- * `workItemId` so the caller can route the triggering edit to it, plus whether
516
- * it was already adopted.
517
- */
518
294
  adoptPastVariant(args: {
519
295
  sessionId: string;
520
296
  source: {
@@ -530,11 +306,6 @@ export declare class AgentVariantsOrchestrator {
530
306
  workItemId: string;
531
307
  alreadyAdopted: boolean;
532
308
  }>;
533
- /**
534
- * Rehydrate a static history variant into the current active session when it
535
- * can still accept edits; otherwise create a replacement active session whose
536
- * only visible direction is the selected history artifact.
537
- */
538
309
  bootstrapPastVariantSession(args: {
539
310
  source: {
540
311
  sessionId: string;
@@ -555,18 +326,7 @@ export declare class AgentVariantsOrchestrator {
555
326
  }>;
556
327
  private getUsableActiveSessionId;
557
328
  private resolveAdoptedStaticPreviewFiles;
558
- /**
559
- * True when the variant is an HTML-only static_preview work item. Adopted past
560
- * variants and fresh `static_preview` variants both qualify. Existing-project
561
- * `code_gen` variants can still expose a static artifact for preview, but Vary
562
- * must keep those on the worktree-backed code_gen append path.
563
- */
564
329
  isStaticPreviewVariant(sessionId: string, workItemId: string): boolean;
565
- /**
566
- * Resolve the history source for a forked Vary row. If the immediate parent
567
- * is an adopted past direction, collapse against that original history row;
568
- * otherwise collapse against the same-session parent variant.
569
- */
570
330
  private resolveHistoryParentVariant;
571
331
  getVariantPick(sessionId: string): ReturnType<SessionStore['getVariantPick']>;
572
332
  refineVariant(args: {
@@ -577,7 +337,6 @@ export declare class AgentVariantsOrchestrator {
577
337
  }): RequestWorkResult;
578
338
  getStage(sessionId: string): Stage;
579
339
  getWorkItemInput(sessionId: string, workItemId: string): unknown;
580
- /** Returns status after orchestration QA and refinement post-processing. */
581
340
  getWorkItemStatus(sessionId: string, workItemId: string): WorkItemStatus;
582
341
  getBriefs(sessionId: string): Brief[];
583
342
  getProgress(sessionId: string): {
@@ -587,65 +346,19 @@ export declare class AgentVariantsOrchestrator {
587
346
  getSummary(sessionId: string): TerminalSummary;
588
347
  getVariants(sessionId: string): ActiveVariantSnapshot[];
589
348
  hasSession(sessionId: string): boolean;
590
- /** Read the projectContext for a session — used by Express routes that
591
- * build the chip snapshot via `stateForSession`. */
592
349
  getProjectContext(sessionId: string): ProjectContext;
593
- /** Resolve a worktree path for a code-gen work item, if provisioned. */
594
350
  getWorktreePath(sessionId: string, workItemId: string): string | undefined;
595
- /**
596
- * Resolve the project cwd inside a worktree so subdirectory projects run
597
- * from the same repo-relative location.
598
- */
599
351
  getProjectCwdInWorktree(worktreePath: string): Promise<string>;
600
- /** Resolve the dev server port for a code-gen work item, if running. */
601
352
  getDevServerPort(sessionId: string, workItemId: string): number | undefined;
602
- /**
603
- * Restores a Rivet-owned variant preview that the active-session idle timer
604
- * reclaimed. Other missing-preview causes remain terminal so this path never
605
- * attempts to restart user-owned or repeatedly failing servers.
606
- *
607
- * @effect Clears the idle marker and prior crash budget, starts the worktree
608
- * dev server, and emits preview-state snapshots.
609
- * @deps Uses the live session resources, project context, and dev-server
610
- * manager owned by this orchestrator.
611
- */
612
- restoreVariantPreview(sessionId: string, workItemId: string): Promise<number | undefined>;
613
- /**
614
- * @effect Resolves the dev server port for a preview request and refreshes
615
- * active-preview retention for that session while the port is still live.
616
- */
353
+ restoreVariantPreview(sessionId: string, workItemId: string, options?: {
354
+ retryFailed?: boolean;
355
+ }): Promise<number | undefined>;
617
356
  resolveDevServerPortForPreview(sessionId: string, workItemId: string): number | undefined;
618
- /**
619
- * True work-item kind for a variant, or undefined when the session/item is
620
- * unknown. This is the authoritative routing signal for Vary/refine intakes:
621
- * an existing-project `code_gen` variant materialized as a static preview
622
- * (registerExistingStaticPreview) DISPLAYS as `static_artifact` and serves
623
- * HTML, but must fork via the code_gen/worktree path — HTML presence is not
624
- * a valid discriminator.
625
- */
626
357
  getVariantWorkItemKind(sessionId: string, workItemId: string): string | undefined;
627
358
  getStaticPreviewHtml(sessionId: string, workItemId: string): string | undefined;
628
- /** Resolve the DESIGN.md markdown behind an artifact link. */
629
359
  getDesignContextMarkdown(sessionId: string, artifactId: string): string | undefined;
630
- /** Build the rendered DesignMD document for an artifact link. */
631
360
  getDesignContextViewerHtml(sessionId: string, artifactId: string): string | undefined;
632
- /**
633
- * `true` when the variant has a non-empty `assetBase` — i.e. its inlined
634
- * HTML references sibling files served by the asset route. The route
635
- * uses this to decide whether to inject a `<base href>` (only needed
636
- * when relative URLs in the HTML must resolve against the asset
637
- * sub-path). Self-contained HTML keeps its natural URL resolution.
638
- */
639
361
  hasStaticPreviewAssets(sessionId: string, workItemId: string): boolean;
640
- /**
641
- * Resolve an absolute, sandboxed path for a sibling asset that the
642
- * variant's inlined HTML references (e.g. `./avatar.glb`, `./hero.png`).
643
- * Returns `undefined` when the variant has no `assetBase`, the requested
644
- * path escapes the base (path traversal), or the file does not exist.
645
- *
646
- * Used by the `/api/variants/:sessionId/static/:variantId/<asset>` route
647
- * to serve assets from the agent's on-disk variant workspace pre-commit.
648
- */
649
362
  resolveStaticPreviewAssetPath(sessionId: string, workItemId: string, requestedPath: string): string | undefined;
650
363
  private getStaticPreviewByBriefId;
651
364
  private buildStaticPreviewUrl;
@@ -653,66 +366,19 @@ export declare class AgentVariantsOrchestrator {
653
366
  sessionId: string;
654
367
  selections: ApprovedBriefSelection[];
655
368
  }): Promise<ApproveResult>;
656
- /**
657
- * Unified one-call kickoff that collapses propose → report_briefs →
658
- * approve. Uses AI-authored briefs supplied by agent callers, with a
659
- * deterministic prompt-derived fallback for human-direct calls, and
660
- * immediately approves so the session lands in `work_items_ready`.
661
- *
662
- * Supports both existing-project sessions (spawns code_gen work items
663
- * for the agent to lease) and zero-to-one sessions (spawns
664
- * static_preview work items; the server runs scaffold_base in the
665
- * background). This is the single-call path; source-grounded zero-to-one
666
- * sessions (source URLs / inspiration extraction) run through `propose`
667
- * instead so the source-research flow can gate generation — start_variants
668
- * routes them there. This method does not run source research.
669
- *
670
- * Host-agnostic: no LLM calls happen here. The agent (Claude Code,
671
- * Cursor, Codex) generates the label and code when it leases the
672
- * work items via continue_variants(action="request_work").
673
- */
674
369
  startUnified(args: {
675
370
  prompt: string;
676
371
  count?: number;
677
372
  target?: Target;
678
373
  projectContext?: ProjectContext;
679
- /** Pre-generated session id. Lets the caller build a variant context
680
- * bundle (whose on-disk path embeds the session id) before the session
681
- * exists, then hand both in together. Defaults to a fresh id. */
682
374
  sessionId?: string;
683
- /** Agent-supplied short label for the run's intent (heuristic fallback
684
- * when absent). Shared by every variant in the run. */
685
375
  runLabel?: string;
686
- /** When provided, the orchestrator leases all spawned variant work
687
- * items immediately so the caller can hand the lease + worktreePaths
688
- * back to the agent in the same response — saving a separate
689
- * continue_variants(request_work) round-trip. */
690
376
  leaseOwner?: string;
691
- /** Per-variant briefs supplied by the agent (label + body, optional
692
- * visualReferenceUrl). When provided, briefs.length overrides any
693
- * explicit count. When absent, the server derives a run-intent label
694
- * per slot from the prompt and a copy of the prompt as each body. */
695
377
  briefs?: import('./contracts').StartVariantsBriefContent[];
696
- /** UI correlation id (the originating change batch's agentRunId/traceId).
697
- * Stamped onto each spawned variant so the panel can map its optimistic
698
- * placeholders to the real cards. */
699
378
  requestId?: string;
700
- /** Opt in to cross-Vary accumulation: when an existing-project session for
701
- * the same `projectPath` is already active, append these variants to it
702
- * instead of starting a fresh session. Only the MCP `start_variants`
703
- * existing path sets this — the inline-element-variant flow leaves it off
704
- * so it always gets its own session (it cancels that session on failure
705
- * and must never tear down an accumulated one). */
706
379
  allowAccumulate?: boolean;
707
- /** When set with {@link allowAccumulate}, fork new code_gen variants from
708
- * this parent variant's worktree instead of git HEAD / Original. */
709
380
  sourceVariantId?: string;
710
- /** Known project files from the initiating selection. Workers inspect
711
- * these first and expand only when dependencies require it. */
712
381
  relevantFiles?: string[];
713
- /** User-selected design fidelity (worker tier selector). Each batch stamps
714
- * its own selection onto its implementation items; absent means the
715
- * server default. */
716
382
  fidelity?: import('./contracts').WorkerFidelity;
717
383
  }): Promise<{
718
384
  sessionId: string;
@@ -723,47 +389,15 @@ export declare class AgentVariantsOrchestrator {
723
389
  status: 'pending';
724
390
  }>;
725
391
  scaffoldBaseWorkItemId: string | null;
726
- /** Populated when `leaseOwner` was provided. */
727
392
  leaseId?: string;
728
393
  leaseTtlMs?: number;
729
394
  leasedWorkItems?: import('./SessionStore').RequestWorkResult['leasedWorkItems'];
730
395
  }>;
731
- /**
732
- * Build the per-variant briefs for a unified start. Supplied briefs keep
733
- * meaningful direction labels, while duplicate or empty labels are made
734
- * unique against the visible session rows. The fallback derives a short
735
- * run-intent label from the prompt (e.g. "make it brighter" →
736
- * "Brighter 1/2/…") rather than an indistinct "Variant N". `uniqueBriefIds`
737
- * is set for the append path so the new batch's briefIds can't collide with
738
- * the live session's existing ones.
739
- */
740
396
  private buildUnifiedBriefs;
741
- /**
742
- * The active sessionId IF it is an existing-project session for `projectPath`
743
- * that can still accept appended variants — i.e. not committed, not
744
- * cancelled/failed. Returns null otherwise, so start_variants falls back to
745
- * creating a fresh session (first Vary, a different project, or after the
746
- * prior session was committed/cancelled).
747
- */
748
397
  private getAppendableExistingSessionId;
749
- /** @effect Registers a provisioned git worktree with runtime and workspace state. */
750
398
  private registerWorktreeWorkspace;
751
- /**
752
- * Provision a worktree for each appended existing-project variant. Mirrors
753
- * {@link provisionExistingWorktrees} but only for the newly appended ids, and
754
- * passes a per-batch `instanceKeyPrefix` so the new worktree dirs do not
755
- * collide with the first batch's `${sessionId}-${i}` paths.
756
- */
757
- /** Emits provisioning started/completed/failed telemetry around `run` for
758
- * the vary-fork/append lanes that bypass provisionWorktrees (and its
759
- * telemetry). Rethrows failures untouched. */
760
399
  private withProvisioningTelemetry;
761
400
  private provisionAppendedExistingWorktrees;
762
- /**
763
- * Provision worktrees for a code_gen Vary forked from a parent variant.
764
- * Copies the parent's worktree tree so each sibling starts from the parent's
765
- * diff rather than git HEAD / Original.
766
- */
767
401
  private provisionForkedFromVariantWorktrees;
768
402
  reportComplete(args: {
769
403
  sessionId: string;
@@ -780,13 +414,9 @@ export declare class AgentVariantsOrchestrator {
780
414
  tokensIn?: number;
781
415
  tokensOut?: number;
782
416
  model?: string;
783
- /** Worker cost in USD (executor-run workers bill outside any host
784
- * session; this keeps them cost-accountable in telemetry). */
785
417
  costUsd?: number;
786
418
  title?: string;
787
419
  description?: string;
788
- /** The runtime that executed the worker — persisted on the work item so
789
- * status/history surfaces can attribute the variant to a vendor/model. */
790
420
  runtime?: import('./contracts').WorkerRuntimeInfo;
791
421
  }): Promise<ReportCompleteResult>;
792
422
  cancel(args: {
@@ -796,13 +426,6 @@ export declare class AgentVariantsOrchestrator {
796
426
  stage: 'cancelled';
797
427
  cleanupStatus: 'pending' | 'complete' | 'partial';
798
428
  }>;
799
- /**
800
- * Cancel a single variant within a session. Siblings continue. Idempotent
801
- * on terminal states. Per-variant worktree teardown is deferred to a
802
- * follow-up; the lease is released, so requestWork won't re-surface this
803
- * variant and the agent's report_variant_complete for it (if it lands
804
- * after cancellation) is rejected by the stale-lease check.
805
- */
806
429
  cancelVariant(args: {
807
430
  sessionId: string;
808
431
  variantId: string;
@@ -814,12 +437,6 @@ export declare class AgentVariantsOrchestrator {
814
437
  sessionStage: Stage;
815
438
  alreadyTerminal: boolean;
816
439
  }>;
817
- /**
818
- * Remove a variant from the UI. Hides it from the active snapshot for good
819
- * (it's filtered out of progress/summary/terminal accounting too) while
820
- * retaining it in `.rivet/variants/` with status `removed` so the work is
821
- * kept, never rendered again. Mirrors `cancelVariant`'s shape; idempotent.
822
- */
823
440
  removeVariant(args: {
824
441
  sessionId: string;
825
442
  variantId: string;
@@ -830,13 +447,6 @@ export declare class AgentVariantsOrchestrator {
830
447
  sessionStage: Stage;
831
448
  alreadyRemoved: boolean;
832
449
  }>;
833
- /**
834
- * Rename a variant's user-visible title. Patches the in-memory work item so
835
- * the next snapshot carries the new label, persists it to the variant's
836
- * `.rivet/variants/` manifest (best-effort — a never-persisted variant simply
837
- * skips the disk write), and pushes the updated snapshot over SSE. Mirrors
838
- * `removeVariant`'s shape.
839
- */
840
450
  renameVariant(args: {
841
451
  sessionId: string;
842
452
  variantId: string;
@@ -847,10 +457,6 @@ export declare class AgentVariantsOrchestrator {
847
457
  label: string;
848
458
  sessionStage: Stage;
849
459
  }>;
850
- /**
851
- * Rename a run folder: re-home one request batch in a single store pass,
852
- * persist each affected manifest best-effort, and push one updated snapshot.
853
- */
854
460
  renameRun(args: {
855
461
  sessionId: string;
856
462
  requestId?: string;
@@ -863,12 +469,6 @@ export declare class AgentVariantsOrchestrator {
863
469
  renamedCount: number;
864
470
  sessionStage: Stage;
865
471
  }>;
866
- /**
867
- * User has reviewed the rendered variants and picked one. Look up the
868
- * captured diff or generated project, apply it to the destination, and record
869
- * the pick. Idempotent on (sessionId, variantId): repeating the call returns
870
- * duplicate=true without applying again.
871
- */
872
472
  commitVariant(args: {
873
473
  sessionId: string;
874
474
  variantId: string;
@@ -883,248 +483,47 @@ export declare class AgentVariantsOrchestrator {
883
483
  }>;
884
484
  private commitVariantImpl;
885
485
  cleanupCommittedSession(sessionId: string): Promise<void>;
886
- /**
887
- * Ensure the user-facing destination path can receive the new project.
888
- * Rejects when the path exists and is non-empty.
889
- *
890
- * `.rivet/` (pre-commit snapshots + history manifests) and `.gitignore`
891
- * (written by VariantHistoryService.ensureGitignore when variants persist
892
- * at success time) are both tolerated — neither is user-authored content
893
- * that would be clobbered by the materialize step.
894
- */
895
486
  private assertDestinationAvailable;
896
- /** Read the captured diff for a code-gen variant, if available. */
897
487
  getVariantDiff(sessionId: string, variantId: string): string | undefined;
898
488
  private provisionWorktrees;
899
- /**
900
- * Existing-project flow: clone the user's repo N times via git worktree.
901
- * Runs synchronously because the operation is fast (no install needed —
902
- * node_modules is symlinked from the source project).
903
- */
904
489
  private provisionExistingWorktrees;
905
- /**
906
- * Fresh-project flow: scaffold one template per variant + DESIGN.md per
907
- * slot synchronously (fast — just file writes + git init), then dispatch a
908
- * background `npm install` task per worktree. Returns immediately so the
909
- * `approve_variant_briefs` MCP tool doesn't time out on cold installs.
910
- *
911
- * On install success: `sessionStore.completeInternal(scaffold_base)` runs,
912
- * which unblocks the dependent code_gen items.
913
- *
914
- * On install failure: the scaffold_base work item is marked failed via
915
- * `failInternal`, which cascades DEPENDENCY_FAILED to all dependent
916
- * code_gen items so the session degrades cleanly.
917
- */
918
490
  private provisionFreshWorktrees;
919
- /**
920
- * Run `npm install` in parallel across all fresh worktrees. On all-success,
921
- * mark scaffold_base succeeded via `completeInternal`. On any failure,
922
- * mark scaffold_base failed via `failInternal` and emit telemetry.
923
- */
924
491
  private runBackgroundInstall;
925
- /**
926
- * Checks succeeded implementation reports before they reach the store.
927
- * Static previews must contain a structurally complete local artifact;
928
- * applicable existing-project variants must contain an added diff. Returns
929
- * a pass, a single repair retry, or a terminal integrity failure.
930
- */
931
492
  private evaluateQaForReport;
932
493
  private evaluateExistingCodeGenQa;
933
- /** Run the injected preview QA runner, converting a thrown runner into a
934
- * failed `VariantQaResult` (mirrors the prior inline behavior). */
935
494
  private runPreviewQaSafely;
936
495
  private memoizeQa;
937
- /**
938
- * Handle a `retry` QA verdict: consume the agent's report, re-open the
939
- * variant work item so it can be re-leased and regenerated against the QA
940
- * notes, and record that it has now used its single retry.
941
- */
942
496
  private handleQaRegenRetry;
943
497
  private startVariantDevServer;
944
498
  private handleSucceededReport;
945
499
  private handleStaticPreviewRefinement;
946
- /** The worktree/dev-server manager this orchestrator boots previews with.
947
- * Exposed so HistoryReplayService shares the SAME instance: the
948
- * reserved-but-not-yet-bound port set is per-instance, and a second
949
- * manager scanning the same range can hand a live variant's pending port
950
- * to a replay (EADDRINUSE for the loser). */
951
500
  get devServerManager(): WorktreeManagerLike;
952
- /** In-flight fire-and-forget history persists. Tree-store snapshots spawn
953
- * git subprocesses, so these can outlive the microtask flushes that used
954
- * to be enough to drain them — {@link teardownSession} (and the test
955
- * helpers' settleBackgroundWork) await {@link settleHistoryPersists}
956
- * instead of racing the writes. */
957
501
  private readonly pendingHistoryPersists;
958
502
  private trackHistoryPersist;
959
- /** Await every in-flight history persist, including ones that start while
960
- * draining (a refine can persist mid-settle). */
961
503
  settleHistoryPersists(): Promise<void>;
962
- /**
963
- * Persist a completed existing-project code_gen variant into
964
- * `<env.projectPath>/.rivet/variants/<sessionId>/<variantId>/`. Called from
965
- * `handleSucceededReport` once the worktree diff has been captured but
966
- * before the user picks. Status is `completed` until `commitVariant` or a
967
- * cancellation transitions it.
968
- */
969
504
  private persistCompletedExistingVariant;
970
- /**
971
- * Existing-mode `framework: 'static'` projects have no dev command, so there
972
- * is no per-variant dev server for the iframe to proxy. Register the variant's
973
- * materialized static site as a {@link StaticPreviewRecord} so the existing
974
- * static-file plumbing — the `/api/variants/:sid/static/:vid[/asset]` routes,
975
- * {@link getStaticPreviewHtml}, and {@link getVariants} (preview.kind=
976
- * 'static_artifact', view enabled) — all light up exactly as they do for
977
- * fresh `static_preview` variants. The entry HTML and its sibling assets are
978
- * served straight from the variant's worktree project root (session-scoped,
979
- * pre-commit; the persisted `.rivet/variants/.../files/` copy backs the
980
- * post-session history route separately).
981
- *
982
- * Returns `registered` when the static preview is ready, `unavailable` when
983
- * the project is static but its selected entry cannot be served, and
984
- * `not_static` when the caller should start a dev server instead.
985
- */
986
505
  private registerExistingStaticPreview;
987
- /**
988
- * Persist a completed fresh-project variant into
989
- * `<projectContext.workspacePath>/.rivet/variants/<sessionId>/<variantId>/`.
990
- * Called from `handleSucceededReport` right after the per-variant snapshot
991
- * lands on disk — for static_preview that's the `.rivet/<slug>/` snapshot
992
- * dir; for vite_app fresh variants it's the worktree itself. Status starts
993
- * as 'completed' and transitions to 'committed' / 'rejected' / 'cancelled'
994
- * via `markStatus` at commit or teardown time.
995
- *
996
- * Running at success time (rather than commit time) means the history panel
997
- * populates live as variants generate — including when the user never picks
998
- * one. Mirrors the existing-project persistCompletedExistingVariant flow.
999
- */
1000
506
  private persistCompletedFreshVariant;
1001
- /**
1002
- * @effect Drains fresh-project history writes before commit moves or rewrites
1003
- * the generated project folder.
1004
- */
1005
507
  private persistCompletedFreshVariantsForCommit;
1006
- /**
1007
- * At commit time, flip persisted variant manifests to terminal statuses
1008
- * ('committed' for the chosen, 'rejected' for the rest). Both existing- and
1009
- * fresh-project variants have already been persisted at code_gen success
1010
- * time, so this is a pure status update — no source-dir copy required.
1011
- * Also records the destination path on the chosen variant so history can
1012
- * surface "this variant became <path>".
1013
- */
1014
508
  private persistVariantHistoryAtCommit;
1015
- /**
1016
- * Flip persisted variant manifests to status='cancelled' for every variant
1017
- * in the session that was already snapshotted to disk. Fresh- and existing-
1018
- * project variants both persist at success time now, so both need their
1019
- * manifests flipped here. Best-effort — missing manifests are silently
1020
- * skipped by VariantHistoryService.markStatus.
1021
- */
1022
509
  private markPersistedVariantsCancelled;
1023
510
  private markPersistedVariantCancelled;
1024
511
  private markPersistedVariantRemoved;
1025
512
  private markPersistedVariantRenamed;
1026
- /**
1027
- * Resolve the project path that owns `.rivet/variants/` for a session.
1028
- * Existing sessions use the user's project. Fresh sessions use the generated
1029
- * project folder. Must match what `persistCompletedFreshVariant` writes to.
1030
- */
1031
513
  private resolveHistoryProjectPath;
1032
514
  private readManifest;
1033
- /**
1034
- * The port to start scanning from when allocating a variant's preview dev
1035
- * server. Fresh worktrees run the Vite template (5173); existing projects use
1036
- * their detected framework's default (3000 for Next, etc.), falling back to
1037
- * 3000 if detection fails. Scanning upward from here lands the preview on a
1038
- * sensible, predictable port near the project's normal one.
1039
- */
1040
515
  private resolveDevServerStartPort;
1041
- /**
1042
- * Resolve dev server invocation for a worktree. Fresh-project worktrees
1043
- * always use the Vite template's npm command at the worktree root; existing
1044
- * projects defer to the user's framework/packageManager config.
1045
- */
1046
516
  private resolveDevServer;
1047
- /**
1048
- * Pure invocation resolution — no dependency installs, no side effects.
1049
- * Split from {@link resolveDevServer} so history persistence can capture
1050
- * the SAME deterministic resolution the boot path uses without booting:
1051
- * persist fires at code-gen success, before the dev server starts, so the
1052
- * live record's stashed command usually isn't available yet.
1053
- */
1054
517
  private resolveDevServerCommand;
1055
- /**
1056
- * Existing-project variants usually reuse the user's installed
1057
- * node_modules. Nested example projects may be standalone packages with no
1058
- * install in the cloned worktree; install only when the package has no
1059
- * node_modules so normal user projects are not penalized.
1060
- */
1061
- private ensureExistingProjectDependencies;
1062
- /**
1063
- * Resolve the dev-server working directory for an existing-project variant.
1064
- * WorktreeManager is constructed around the editor/root project, but
1065
- * `start_variants` can target a nested app (for example `examples/blog`).
1066
- * In that case the worktree root is still the git root clone, while the dev
1067
- * server must run from the nested project path.
1068
- */
518
+ private ensureProjectDependencies;
1069
519
  private resolveExistingProjectCwd;
1070
- /**
1071
- * After the chosen variant has been renamed into `destinationPath`, move
1072
- * each unchosen sibling worktree into a `<destinationParent>/<slug>-variants/NN-<label>/`
1073
- * folder and repoint its `node_modules` symlink at the chosen project's
1074
- * real install. Writes a manifest documenting all 5 variants (the chosen
1075
- * one with `folder: null` and `chosenPath: '../<slug>'`).
1076
- *
1077
- * Sets `vitePreservedSiblings = true` on session resources so the
1078
- * subsequent teardown skips `cleanupFreshWorktrees` (which would otherwise
1079
- * delete the just-preserved history). Dev servers still get stopped.
1080
- */
1081
520
  private preserveUnchosenVariants;
1082
- /**
1083
- * Rename `sourceWorktreePath` into `destinationPath`, then replace the
1084
- * worktree's `.git` with a fresh-history init + initial commit. Matches
1085
- * the historical materializeProject behavior of "user sees a fresh repo
1086
- * at destinationPath" so we don't surprise them with a `rivet: variant
1087
- * baseline` commit they didn't intend.
1088
- *
1089
- * The rename is the load-bearing operation: it moves the entire variant
1090
- * tree (template files + materialized node_modules) in O(1) when the
1091
- * source and destination share a volume. The git reset that follows is
1092
- * best-effort housekeeping; a failure there leaves files in place.
1093
- */
1094
521
  private renameWorktreeIntoDestination;
1095
- /**
1096
- * Stop every variant dev server currently running for `resources`. Clears
1097
- * the `devServerProcess` / `port` fields on each record so subsequent
1098
- * teardown logic doesn't try to stop them a second time. Called from
1099
- * `commitVariant` (vite_app rename path) BEFORE the worktree directory is
1100
- * renamed — leaving Vite alive across the rename leaks empty `.vite/`
1101
- * stub dirs at the old paths.
1102
- */
1103
522
  private stopAllDevServersForSession;
1104
523
  private scheduleActivePreviewIdleTimer;
1105
524
  private clearActivePreviewIdleTimer;
1106
- /** @effect Stops idle variant child processes and clears dead preview ports. */
1107
525
  private stopIdleVariantDevServers;
1108
- /**
1109
- * Spawn a fresh dev server at the user-facing destinationPath and retarget
1110
- * the proxy so the iframe stays live across commit. Stores the process on
1111
- * `resources.committedDevServer` so teardown can hand it off to the
1112
- * lingering registry instead of killing it. Best-effort: a failure here is
1113
- * non-fatal — the commit still succeeds; the user just has to run
1114
- * `npm run dev` themselves to bring the preview back.
1115
- *
1116
- * `mode` selects the server flavor: `vite_app` spawns Vite via `npm run
1117
- * dev`; `static_preview` spawns the in-tree static file server bound to
1118
- * the destination directory (no install, no build, ~ms startup).
1119
- */
1120
526
  private startCommittedDevServer;
1121
- /**
1122
- * Stop any committed dev servers that were left alive past their session's
1123
- * teardown. Called at the start of a new `propose` (so the next session's
1124
- * preview doesn't compete with stale processes) and exposed for explicit
1125
- * shutdown hooks. Best-effort: per-server failures are logged but don't
1126
- * propagate.
1127
- */
1128
527
  private stopLingeringCommittedDevServers;
1129
528
  private teardownSession;
1130
529
  private ensureResources;
@@ -1134,6 +533,5 @@ export declare function buildStaticPreviewDocument(input: {
1134
533
  css?: string;
1135
534
  js?: string;
1136
535
  }): string;
1137
- type PreviewPackageManager = 'npm' | 'yarn' | 'pnpm';
1138
536
  export type { AgentVariantsError };
1139
537
  //# sourceMappingURL=WorktreeOrchestrator.d.ts.map