rivet-design 0.17.4 → 0.18.0

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 (938) hide show
  1. package/bin/rivet.js +0 -16
  2. package/dist/agent-variants/SessionStore.d.ts +5 -240
  3. package/dist/agent-variants/SessionStore.d.ts.map +1 -1
  4. package/dist/agent-variants/SessionStore.js +42 -371
  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 +6 -598
  15. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  16. package/dist/agent-variants/WorktreeOrchestrator.js +55 -1288
  17. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  18. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +0 -6
  19. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
  20. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +0 -23
  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 +2016 -600
  31. package/dist/agent-variants/contracts.d.ts.map +1 -1
  32. package/dist/agent-variants/contracts.js +10 -174
  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 +6 -7
  71. package/dist/agent-variants/variantContext.d.ts.map +1 -1
  72. package/dist/agent-variants/variantContext.js +69 -10
  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 +1 -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 +0 -4
  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 +126 -106
  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/profile.d.ts +3 -0
  127. package/dist/cli/commands/profile.d.ts.map +1 -0
  128. package/dist/cli/commands/profile.js +192 -0
  129. package/dist/cli/commands/profile.js.map +1 -0
  130. package/dist/cli/commands/reference.d.ts +0 -5
  131. package/dist/cli/commands/reference.d.ts.map +1 -1
  132. package/dist/cli/commands/reference.js +4 -27
  133. package/dist/cli/commands/reference.js.map +1 -1
  134. package/dist/cli/commands/serve.d.ts +0 -5
  135. package/dist/cli/commands/serve.d.ts.map +1 -1
  136. package/dist/cli/commands/serve.js +0 -34
  137. package/dist/cli/commands/serve.js.map +1 -1
  138. package/dist/cli/commands/shared.d.ts +0 -16
  139. package/dist/cli/commands/shared.d.ts.map +1 -1
  140. package/dist/cli/commands/shared.js +0 -19
  141. package/dist/cli/commands/shared.js.map +1 -1
  142. package/dist/cli/commands/status.d.ts +0 -6
  143. package/dist/cli/commands/status.d.ts.map +1 -1
  144. package/dist/cli/commands/status.js +0 -11
  145. package/dist/cli/commands/status.js.map +1 -1
  146. package/dist/cli/commands/stop.d.ts +0 -5
  147. package/dist/cli/commands/stop.d.ts.map +1 -1
  148. package/dist/cli/commands/stop.js +0 -6
  149. package/dist/cli/commands/stop.js.map +1 -1
  150. package/dist/cli/commands/update.d.ts +0 -1
  151. package/dist/cli/commands/update.d.ts.map +1 -1
  152. package/dist/cli/commands/update.js +0 -1
  153. package/dist/cli/commands/update.js.map +1 -1
  154. package/dist/cli/commands/variants.d.ts +0 -1
  155. package/dist/cli/commands/variants.d.ts.map +1 -1
  156. package/dist/cli/commands/variants.js +13 -32
  157. package/dist/cli/commands/variants.js.map +1 -1
  158. package/dist/cli/commands/wait.d.ts +0 -21
  159. package/dist/cli/commands/wait.d.ts.map +1 -1
  160. package/dist/cli/commands/wait.js +0 -23
  161. package/dist/cli/commands/wait.js.map +1 -1
  162. package/dist/cli/entry.d.ts +0 -10
  163. package/dist/cli/entry.d.ts.map +1 -1
  164. package/dist/cli/entry.js +0 -13
  165. package/dist/cli/entry.js.map +1 -1
  166. package/dist/cli/envelope.d.ts +1 -25
  167. package/dist/cli/envelope.d.ts.map +1 -1
  168. package/dist/cli/envelope.js +0 -19
  169. package/dist/cli/envelope.js.map +1 -1
  170. package/dist/cli/flags.d.ts +0 -7
  171. package/dist/cli/flags.d.ts.map +1 -1
  172. package/dist/cli/flags.js +0 -7
  173. package/dist/cli/flags.js.map +1 -1
  174. package/dist/cli/handoff.d.ts +0 -33
  175. package/dist/cli/handoff.d.ts.map +1 -1
  176. package/dist/cli/handoff.js +0 -42
  177. package/dist/cli/handoff.js.map +1 -1
  178. package/dist/cli/handoffStore.d.ts +0 -11
  179. package/dist/cli/handoffStore.d.ts.map +1 -1
  180. package/dist/cli/handoffStore.js +0 -10
  181. package/dist/cli/handoffStore.js.map +1 -1
  182. package/dist/cli/hostWorkNextAction.d.ts +0 -11
  183. package/dist/cli/hostWorkNextAction.d.ts.map +1 -1
  184. package/dist/cli/hostWorkNextAction.js +0 -4
  185. package/dist/cli/hostWorkNextAction.js.map +1 -1
  186. package/dist/cli/io.d.ts +0 -9
  187. package/dist/cli/io.d.ts.map +1 -1
  188. package/dist/cli/io.js +0 -1
  189. package/dist/cli/io.js.map +1 -1
  190. package/dist/cli/resolveDefaultNodeEnv.d.ts +0 -5
  191. package/dist/cli/resolveDefaultNodeEnv.d.ts.map +1 -1
  192. package/dist/cli/resolveDefaultNodeEnv.js +0 -5
  193. package/dist/cli/resolveDefaultNodeEnv.js.map +1 -1
  194. package/dist/cli/router.d.ts +0 -21
  195. package/dist/cli/router.d.ts.map +1 -1
  196. package/dist/cli/router.js +8 -46
  197. package/dist/cli/router.js.map +1 -1
  198. package/dist/cli/runnerSelection.d.ts +0 -58
  199. package/dist/cli/runnerSelection.d.ts.map +1 -1
  200. package/dist/cli/runnerSelection.js +0 -16
  201. package/dist/cli/runnerSelection.js.map +1 -1
  202. package/dist/cli/serverHandshake.d.ts +0 -36
  203. package/dist/cli/serverHandshake.d.ts.map +1 -1
  204. package/dist/cli/serverHandshake.js +0 -29
  205. package/dist/cli/serverHandshake.js.map +1 -1
  206. package/dist/cli/serverUnavailable.d.ts +0 -1
  207. package/dist/cli/serverUnavailable.d.ts.map +1 -1
  208. package/dist/cli/serverUnavailable.js +0 -1
  209. package/dist/cli/serverUnavailable.js.map +1 -1
  210. package/dist/cli/serverVersion.d.ts +0 -22
  211. package/dist/cli/serverVersion.d.ts.map +1 -1
  212. package/dist/cli/serverVersion.js +0 -12
  213. package/dist/cli/serverVersion.js.map +1 -1
  214. package/dist/cli/telemetry.d.ts +0 -4
  215. package/dist/cli/telemetry.d.ts.map +1 -1
  216. package/dist/cli/telemetry.js +0 -4
  217. package/dist/cli/telemetry.js.map +1 -1
  218. package/dist/config/evaluateFlags.d.ts +0 -4
  219. package/dist/config/evaluateFlags.d.ts.map +1 -1
  220. package/dist/config/evaluateFlags.js +0 -11
  221. package/dist/config/evaluateFlags.js.map +1 -1
  222. package/dist/config/featureFlagUserKey.d.ts +0 -3
  223. package/dist/config/featureFlagUserKey.d.ts.map +1 -1
  224. package/dist/config/featureFlagUserKey.js +0 -3
  225. package/dist/config/featureFlagUserKey.js.map +1 -1
  226. package/dist/config/flags.d.ts +0 -14
  227. package/dist/config/flags.d.ts.map +1 -1
  228. package/dist/config/flags.js +0 -27
  229. package/dist/config/flags.js.map +1 -1
  230. package/dist/config/proxy.d.ts +0 -3
  231. package/dist/config/proxy.d.ts.map +1 -1
  232. package/dist/config/proxy.js +0 -11
  233. package/dist/config/proxy.js.map +1 -1
  234. package/dist/config/telemetry.d.ts +0 -13
  235. package/dist/config/telemetry.d.ts.map +1 -1
  236. package/dist/config/telemetry.js +0 -13
  237. package/dist/config/telemetry.js.map +1 -1
  238. package/dist/config/telemetryContract.d.ts +0 -1
  239. package/dist/config/telemetryContract.d.ts.map +1 -1
  240. package/dist/config/telemetryContract.js +0 -1
  241. package/dist/config/telemetryContract.js.map +1 -1
  242. package/dist/hosts/workerDefaults.d.ts +0 -69
  243. package/dist/hosts/workerDefaults.d.ts.map +1 -1
  244. package/dist/hosts/workerDefaults.js +0 -68
  245. package/dist/hosts/workerDefaults.js.map +1 -1
  246. package/dist/index-core.d.ts.map +1 -1
  247. package/dist/index-core.js +0 -2
  248. package/dist/index-core.js.map +1 -1
  249. package/dist/index.d.ts +0 -20
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +2 -105
  252. package/dist/index.js.map +1 -1
  253. package/dist/install/allowlists.d.ts +0 -32
  254. package/dist/install/allowlists.d.ts.map +1 -1
  255. package/dist/install/allowlists.js +0 -44
  256. package/dist/install/allowlists.js.map +1 -1
  257. package/dist/install/automaticCliUpdate.d.ts +0 -6
  258. package/dist/install/automaticCliUpdate.d.ts.map +1 -1
  259. package/dist/install/automaticCliUpdate.js +0 -13
  260. package/dist/install/automaticCliUpdate.js.map +1 -1
  261. package/dist/install/channelCli.d.ts +0 -1
  262. package/dist/install/channelCli.d.ts.map +1 -1
  263. package/dist/install/channelCli.js +0 -3
  264. package/dist/install/channelCli.js.map +1 -1
  265. package/dist/install/channelManager.d.ts +0 -14
  266. package/dist/install/channelManager.d.ts.map +1 -1
  267. package/dist/install/channelManager.js +0 -22
  268. package/dist/install/channelManager.js.map +1 -1
  269. package/dist/install/codexGuidance.d.ts +0 -1
  270. package/dist/install/codexGuidance.d.ts.map +1 -1
  271. package/dist/install/codexGuidance.js +0 -7
  272. package/dist/install/codexGuidance.js.map +1 -1
  273. package/dist/install/globalBootstrap.d.ts +0 -25
  274. package/dist/install/globalBootstrap.d.ts.map +1 -1
  275. package/dist/install/globalBootstrap.js +0 -10
  276. package/dist/install/globalBootstrap.js.map +1 -1
  277. package/dist/install/harnesses.d.ts +0 -66
  278. package/dist/install/harnesses.d.ts.map +1 -1
  279. package/dist/install/harnesses.js +0 -60
  280. package/dist/install/harnesses.js.map +1 -1
  281. package/dist/install/installationChannel.d.ts +0 -1
  282. package/dist/install/installationChannel.d.ts.map +1 -1
  283. package/dist/install/installationChannel.js +0 -1
  284. package/dist/install/installationChannel.js.map +1 -1
  285. package/dist/install/legacyMcp.d.ts +0 -23
  286. package/dist/install/legacyMcp.d.ts.map +1 -1
  287. package/dist/install/legacyMcp.js +3 -46
  288. package/dist/install/legacyMcp.js.map +1 -1
  289. package/dist/install/mcpRegistration.d.ts +0 -41
  290. package/dist/install/mcpRegistration.d.ts.map +1 -1
  291. package/dist/install/mcpRegistration.js +2 -70
  292. package/dist/install/mcpRegistration.js.map +1 -1
  293. package/dist/library/HubClient.d.ts +1 -2
  294. package/dist/library/HubClient.d.ts.map +1 -1
  295. package/dist/library/HubClient.js +11 -5
  296. package/dist/library/HubClient.js.map +1 -1
  297. package/dist/library/HubServer.d.ts +0 -1
  298. package/dist/library/HubServer.d.ts.map +1 -1
  299. package/dist/library/HubServer.js +19 -1
  300. package/dist/library/HubServer.js.map +1 -1
  301. package/dist/library/StaticPreviewServer.d.ts +0 -1
  302. package/dist/library/StaticPreviewServer.d.ts.map +1 -1
  303. package/dist/library/StaticPreviewServer.js +0 -1
  304. package/dist/library/StaticPreviewServer.js.map +1 -1
  305. package/dist/library/http.d.ts +0 -2
  306. package/dist/library/http.d.ts.map +1 -1
  307. package/dist/library/http.js +0 -2
  308. package/dist/library/http.js.map +1 -1
  309. package/dist/library/importFiles.d.ts +0 -6
  310. package/dist/library/importFiles.d.ts.map +1 -1
  311. package/dist/library/importFiles.js +45 -11
  312. package/dist/library/importFiles.js.map +1 -1
  313. package/dist/mcp/changeBatchClassification.d.ts +0 -40
  314. package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
  315. package/dist/mcp/changeBatchClassification.js +0 -34
  316. package/dist/mcp/changeBatchClassification.js.map +1 -1
  317. package/dist/prompts/commentVariationPrompts.d.ts +0 -5
  318. package/dist/prompts/commentVariationPrompts.d.ts.map +1 -1
  319. package/dist/prompts/commentVariationPrompts.js +0 -5
  320. package/dist/prompts/commentVariationPrompts.js.map +1 -1
  321. package/dist/prototype-host.js +0 -15
  322. package/dist/prototype-host.js.map +1 -1
  323. package/dist/proxy-middleware/preview-bridge.d.ts +0 -2
  324. package/dist/proxy-middleware/preview-bridge.d.ts.map +1 -1
  325. package/dist/proxy-middleware/preview-bridge.js +0 -2
  326. package/dist/proxy-middleware/preview-bridge.js.map +1 -1
  327. package/dist/proxy-middleware/preview-connections.d.ts +0 -1
  328. package/dist/proxy-middleware/preview-connections.d.ts.map +1 -1
  329. package/dist/proxy-middleware/preview-connections.js +0 -1
  330. package/dist/proxy-middleware/preview-connections.js.map +1 -1
  331. package/dist/proxy-middleware/proxy-config.d.ts +0 -12
  332. package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
  333. package/dist/proxy-middleware/proxy-config.js +2 -49
  334. package/dist/proxy-middleware/proxy-config.js.map +1 -1
  335. package/dist/routes/account.d.ts +0 -1
  336. package/dist/routes/account.d.ts.map +1 -1
  337. package/dist/routes/account.js +0 -2
  338. package/dist/routes/account.js.map +1 -1
  339. package/dist/routes/agentVariants.d.ts +0 -15
  340. package/dist/routes/agentVariants.d.ts.map +1 -1
  341. package/dist/routes/agentVariants.js +132 -329
  342. package/dist/routes/agentVariants.js.map +1 -1
  343. package/dist/routes/cli.d.ts +0 -17
  344. package/dist/routes/cli.d.ts.map +1 -1
  345. package/dist/routes/cli.js +0 -13
  346. package/dist/routes/cli.js.map +1 -1
  347. package/dist/routes/emptyStatePage.d.ts +0 -12
  348. package/dist/routes/emptyStatePage.d.ts.map +1 -1
  349. package/dist/routes/emptyStatePage.js +0 -12
  350. package/dist/routes/emptyStatePage.js.map +1 -1
  351. package/dist/routes/git.d.ts.map +1 -1
  352. package/dist/routes/git.js +0 -13
  353. package/dist/routes/git.js.map +1 -1
  354. package/dist/routes/inlineStartTracker.d.ts +0 -16
  355. package/dist/routes/inlineStartTracker.d.ts.map +1 -1
  356. package/dist/routes/inlineStartTracker.js.map +1 -1
  357. package/dist/routes/integrations.d.ts +0 -6
  358. package/dist/routes/integrations.d.ts.map +1 -1
  359. package/dist/routes/integrations.js +0 -6
  360. package/dist/routes/integrations.js.map +1 -1
  361. package/dist/routes/library/app.d.ts +0 -1
  362. package/dist/routes/library/app.d.ts.map +1 -1
  363. package/dist/routes/library/app.js +1 -3
  364. package/dist/routes/library/app.js.map +1 -1
  365. package/dist/routes/library/index.d.ts +0 -1
  366. package/dist/routes/library/index.d.ts.map +1 -1
  367. package/dist/routes/library/index.js +3 -1
  368. package/dist/routes/library/index.js.map +1 -1
  369. package/dist/routes/library/middleware.d.ts +0 -3
  370. package/dist/routes/library/middleware.d.ts.map +1 -1
  371. package/dist/routes/library/middleware.js +0 -4
  372. package/dist/routes/library/middleware.js.map +1 -1
  373. package/dist/routes/library/navigation.d.ts +0 -1
  374. package/dist/routes/library/navigation.d.ts.map +1 -1
  375. package/dist/routes/library/navigation.js +0 -1
  376. package/dist/routes/library/navigation.js.map +1 -1
  377. package/dist/routes/library/profiles.d.ts +5 -0
  378. package/dist/routes/library/profiles.d.ts.map +1 -0
  379. package/dist/routes/library/profiles.js +182 -0
  380. package/dist/routes/library/profiles.js.map +1 -0
  381. package/dist/routes/library/projects.d.ts +0 -1
  382. package/dist/routes/library/projects.d.ts.map +1 -1
  383. package/dist/routes/library/projects.js +0 -1
  384. package/dist/routes/library/projects.js.map +1 -1
  385. package/dist/routes/library/schemas.d.ts +2 -2
  386. package/dist/routes/library/staticPreview.d.ts +0 -1
  387. package/dist/routes/library/staticPreview.d.ts.map +1 -1
  388. package/dist/routes/library/staticPreview.js +0 -1
  389. package/dist/routes/library/staticPreview.js.map +1 -1
  390. package/dist/routes/library/types.d.ts +2 -0
  391. package/dist/routes/library/types.d.ts.map +1 -1
  392. package/dist/routes/library/variants.d.ts +0 -1
  393. package/dist/routes/library/variants.d.ts.map +1 -1
  394. package/dist/routes/library/variants.js +0 -1
  395. package/dist/routes/library/variants.js.map +1 -1
  396. package/dist/routes/mcp.d.ts +0 -3
  397. package/dist/routes/mcp.d.ts.map +1 -1
  398. package/dist/routes/mcp.js +0 -5
  399. package/dist/routes/mcp.js.map +1 -1
  400. package/dist/routes/prototypeHost.d.ts +0 -2
  401. package/dist/routes/prototypeHost.d.ts.map +1 -1
  402. package/dist/routes/prototypeHost.js +6 -32
  403. package/dist/routes/prototypeHost.js.map +1 -1
  404. package/dist/routes/static.d.ts +0 -3
  405. package/dist/routes/static.d.ts.map +1 -1
  406. package/dist/routes/static.js +0 -6
  407. package/dist/routes/static.js.map +1 -1
  408. package/dist/routes/support.d.ts +0 -3
  409. package/dist/routes/support.d.ts.map +1 -1
  410. package/dist/routes/support.js +0 -3
  411. package/dist/routes/support.js.map +1 -1
  412. package/dist/server.d.ts +0 -42
  413. package/dist/server.d.ts.map +1 -1
  414. package/dist/server.js +1 -129
  415. package/dist/server.js.map +1 -1
  416. package/dist/services/AuthService.d.ts +0 -76
  417. package/dist/services/AuthService.d.ts.map +1 -1
  418. package/dist/services/AuthService.js +0 -112
  419. package/dist/services/AuthService.js.map +1 -1
  420. package/dist/services/BrowserAgentClient.d.ts +1 -21
  421. package/dist/services/BrowserAgentClient.d.ts.map +1 -1
  422. package/dist/services/BrowserAgentClient.js +0 -10
  423. package/dist/services/BrowserAgentClient.js.map +1 -1
  424. package/dist/services/BundleStore.d.ts +0 -18
  425. package/dist/services/BundleStore.d.ts.map +1 -1
  426. package/dist/services/BundleStore.js +0 -10
  427. package/dist/services/BundleStore.js.map +1 -1
  428. package/dist/services/CliLogForwarder.d.ts +0 -26
  429. package/dist/services/CliLogForwarder.d.ts.map +1 -1
  430. package/dist/services/CliLogForwarder.js +1 -33
  431. package/dist/services/CliLogForwarder.js.map +1 -1
  432. package/dist/services/CommitMessageGenerator.d.ts +0 -6
  433. package/dist/services/CommitMessageGenerator.d.ts.map +1 -1
  434. package/dist/services/CommitMessageGenerator.js +0 -3
  435. package/dist/services/CommitMessageGenerator.js.map +1 -1
  436. package/dist/services/ComponentSearchService.d.ts +2 -16
  437. package/dist/services/ComponentSearchService.d.ts.map +1 -1
  438. package/dist/services/ComponentSearchService.js +2 -56
  439. package/dist/services/ComponentSearchService.js.map +1 -1
  440. package/dist/services/ConfigManager.d.ts +0 -113
  441. package/dist/services/ConfigManager.d.ts.map +1 -1
  442. package/dist/services/ConfigManager.js +0 -101
  443. package/dist/services/ConfigManager.js.map +1 -1
  444. package/dist/services/DependencyPreparationService.d.ts +0 -6
  445. package/dist/services/DependencyPreparationService.d.ts.map +1 -1
  446. package/dist/services/DependencyPreparationService.js +0 -22
  447. package/dist/services/DependencyPreparationService.js.map +1 -1
  448. package/dist/services/DevServerRuntimeService.d.ts +0 -20
  449. package/dist/services/DevServerRuntimeService.d.ts.map +1 -1
  450. package/dist/services/DevServerRuntimeService.js +0 -46
  451. package/dist/services/DevServerRuntimeService.js.map +1 -1
  452. package/dist/services/FeatureFlagService.d.ts +0 -15
  453. package/dist/services/FeatureFlagService.d.ts.map +1 -1
  454. package/dist/services/FeatureFlagService.js +0 -23
  455. package/dist/services/FeatureFlagService.js.map +1 -1
  456. package/dist/services/GatewayClient.d.ts +0 -27
  457. package/dist/services/GatewayClient.d.ts.map +1 -1
  458. package/dist/services/GatewayClient.js +0 -25
  459. package/dist/services/GatewayClient.js.map +1 -1
  460. package/dist/services/HistoryReplayService.d.ts +0 -31
  461. package/dist/services/HistoryReplayService.d.ts.map +1 -1
  462. package/dist/services/HistoryReplayService.js +2 -55
  463. package/dist/services/HistoryReplayService.js.map +1 -1
  464. package/dist/services/HubDiscovery.d.ts +0 -8
  465. package/dist/services/HubDiscovery.d.ts.map +1 -1
  466. package/dist/services/HubDiscovery.js +0 -8
  467. package/dist/services/HubDiscovery.js.map +1 -1
  468. package/dist/services/HubNavigation.d.ts +0 -6
  469. package/dist/services/HubNavigation.d.ts.map +1 -1
  470. package/dist/services/HubNavigation.js +5 -8
  471. package/dist/services/HubNavigation.js.map +1 -1
  472. package/dist/services/IntegrationsClient.d.ts +20 -38
  473. package/dist/services/IntegrationsClient.d.ts.map +1 -1
  474. package/dist/services/IntegrationsClient.js +71 -31
  475. package/dist/services/IntegrationsClient.js.map +1 -1
  476. package/dist/services/LocalGitService.d.ts +0 -57
  477. package/dist/services/LocalGitService.d.ts.map +1 -1
  478. package/dist/services/LocalGitService.js +4 -85
  479. package/dist/services/LocalGitService.js.map +1 -1
  480. package/dist/services/MCPOnboardingTelemetry.d.ts +0 -9
  481. package/dist/services/MCPOnboardingTelemetry.d.ts.map +1 -1
  482. package/dist/services/MCPOnboardingTelemetry.js +0 -9
  483. package/dist/services/MCPOnboardingTelemetry.js.map +1 -1
  484. package/dist/services/MCPVariantsTelemetry.d.ts +0 -2
  485. package/dist/services/MCPVariantsTelemetry.d.ts.map +1 -1
  486. package/dist/services/MCPVariantsTelemetry.js +0 -2
  487. package/dist/services/MCPVariantsTelemetry.js.map +1 -1
  488. package/dist/services/OperatingSystemServices.d.ts +0 -12
  489. package/dist/services/OperatingSystemServices.d.ts.map +1 -1
  490. package/dist/services/OperatingSystemServices.js +0 -7
  491. package/dist/services/OperatingSystemServices.js.map +1 -1
  492. package/dist/services/PRTitleGenerator.d.ts +0 -7
  493. package/dist/services/PRTitleGenerator.d.ts.map +1 -1
  494. package/dist/services/PRTitleGenerator.js +0 -3
  495. package/dist/services/PRTitleGenerator.js.map +1 -1
  496. package/dist/services/ProjectCardPreviews.d.ts +0 -5
  497. package/dist/services/ProjectCardPreviews.d.ts.map +1 -1
  498. package/dist/services/ProjectCardPreviews.js +0 -5
  499. package/dist/services/ProjectCardPreviews.js.map +1 -1
  500. package/dist/services/ProjectDetectionService.d.ts +0 -4
  501. package/dist/services/ProjectDetectionService.d.ts.map +1 -1
  502. package/dist/services/ProjectDetectionService.js +2 -44
  503. package/dist/services/ProjectDetectionService.js.map +1 -1
  504. package/dist/services/ProjectFolderPicker.d.ts +0 -3
  505. package/dist/services/ProjectFolderPicker.d.ts.map +1 -1
  506. package/dist/services/ProjectFolderPicker.js +0 -4
  507. package/dist/services/ProjectFolderPicker.js.map +1 -1
  508. package/dist/services/ProjectImport.d.ts +0 -1
  509. package/dist/services/ProjectImport.d.ts.map +1 -1
  510. package/dist/services/ProjectImport.js +0 -3
  511. package/dist/services/ProjectImport.js.map +1 -1
  512. package/dist/services/ProjectLibrary.d.ts +0 -18
  513. package/dist/services/ProjectLibrary.d.ts.map +1 -1
  514. package/dist/services/ProjectLibrary.js +0 -20
  515. package/dist/services/ProjectLibrary.js.map +1 -1
  516. package/dist/services/ProjectMetadataStore.d.ts +0 -73
  517. package/dist/services/ProjectMetadataStore.d.ts.map +1 -1
  518. package/dist/services/ProjectMetadataStore.js +0 -90
  519. package/dist/services/ProjectMetadataStore.js.map +1 -1
  520. package/dist/services/ProjectPackageManager.d.ts +0 -12
  521. package/dist/services/ProjectPackageManager.d.ts.map +1 -1
  522. package/dist/services/ProjectPackageManager.js +0 -16
  523. package/dist/services/ProjectPackageManager.js.map +1 -1
  524. package/dist/services/ProjectRegistry.d.ts +2 -18
  525. package/dist/services/ProjectRegistry.d.ts.map +1 -1
  526. package/dist/services/ProjectRegistry.js +0 -18
  527. package/dist/services/ProjectRegistry.js.map +1 -1
  528. package/dist/services/ProjectRuntimeService.d.ts +0 -4
  529. package/dist/services/ProjectRuntimeService.d.ts.map +1 -1
  530. package/dist/services/ProjectRuntimeService.js +0 -5
  531. package/dist/services/ProjectRuntimeService.js.map +1 -1
  532. package/dist/services/ProjectScreenshotService.d.ts +0 -5
  533. package/dist/services/ProjectScreenshotService.d.ts.map +1 -1
  534. package/dist/services/ProjectScreenshotService.js +0 -6
  535. package/dist/services/ProjectScreenshotService.js.map +1 -1
  536. package/dist/services/ProjectStorage.d.ts +0 -4
  537. package/dist/services/ProjectStorage.d.ts.map +1 -1
  538. package/dist/services/ProjectStorage.js +0 -4
  539. package/dist/services/ProjectStorage.js.map +1 -1
  540. package/dist/services/PrototypeBuildService.d.ts +1 -23
  541. package/dist/services/PrototypeBuildService.d.ts.map +1 -1
  542. package/dist/services/PrototypeBuildService.js +6 -31
  543. package/dist/services/PrototypeBuildService.js.map +1 -1
  544. package/dist/services/PrototypeDeployService.d.ts +0 -20
  545. package/dist/services/PrototypeDeployService.d.ts.map +1 -1
  546. package/dist/services/PrototypeDeployService.js +1 -24
  547. package/dist/services/PrototypeDeployService.js.map +1 -1
  548. package/dist/services/RequestAuthContext.d.ts +0 -5
  549. package/dist/services/RequestAuthContext.d.ts.map +1 -1
  550. package/dist/services/RequestAuthContext.js +0 -5
  551. package/dist/services/RequestAuthContext.js.map +1 -1
  552. package/dist/services/SessionBridgeService.d.ts.map +1 -1
  553. package/dist/services/SessionBridgeService.js +0 -2
  554. package/dist/services/SessionBridgeService.js.map +1 -1
  555. package/dist/services/SessionService.d.ts +0 -4
  556. package/dist/services/SessionService.d.ts.map +1 -1
  557. package/dist/services/SessionService.js +1 -22
  558. package/dist/services/SessionService.js.map +1 -1
  559. package/dist/services/StaticFileService.d.ts +0 -9
  560. package/dist/services/StaticFileService.d.ts.map +1 -1
  561. package/dist/services/StaticFileService.js +0 -11
  562. package/dist/services/StaticFileService.js.map +1 -1
  563. package/dist/services/StaticLibraryPreviews.d.ts +0 -3
  564. package/dist/services/StaticLibraryPreviews.d.ts.map +1 -1
  565. package/dist/services/StaticLibraryPreviews.js +0 -3
  566. package/dist/services/StaticLibraryPreviews.js.map +1 -1
  567. package/dist/services/StaticPreviewServer.d.ts +0 -16
  568. package/dist/services/StaticPreviewServer.d.ts.map +1 -1
  569. package/dist/services/StaticPreviewServer.js +2 -28
  570. package/dist/services/StaticPreviewServer.js.map +1 -1
  571. package/dist/services/SupabaseAuthService.d.ts +0 -11
  572. package/dist/services/SupabaseAuthService.d.ts.map +1 -1
  573. package/dist/services/SupabaseAuthService.js +0 -11
  574. package/dist/services/SupabaseAuthService.js.map +1 -1
  575. package/dist/services/SupportTicketService.d.ts +0 -4
  576. package/dist/services/SupportTicketService.d.ts.map +1 -1
  577. package/dist/services/SupportTicketService.js +0 -4
  578. package/dist/services/SupportTicketService.js.map +1 -1
  579. package/dist/services/TelemetryService.d.ts +9 -182
  580. package/dist/services/TelemetryService.d.ts.map +1 -1
  581. package/dist/services/TelemetryService.js +11 -195
  582. package/dist/services/TelemetryService.js.map +1 -1
  583. package/dist/services/TreeStore.d.ts +0 -72
  584. package/dist/services/TreeStore.d.ts.map +1 -1
  585. package/dist/services/TreeStore.js +0 -93
  586. package/dist/services/TreeStore.js.map +1 -1
  587. package/dist/services/VariantGenerationService.d.ts +1 -32
  588. package/dist/services/VariantGenerationService.d.ts.map +1 -1
  589. package/dist/services/VariantGenerationService.js +36 -66
  590. package/dist/services/VariantGenerationService.js.map +1 -1
  591. package/dist/services/VariantHistoryService.d.ts +12 -114
  592. package/dist/services/VariantHistoryService.d.ts.map +1 -1
  593. package/dist/services/VariantHistoryService.js +56 -144
  594. package/dist/services/VariantHistoryService.js.map +1 -1
  595. package/dist/services/VariantRunService.d.ts +6 -31
  596. package/dist/services/VariantRunService.d.ts.map +1 -1
  597. package/dist/services/VariantRunService.js +86 -37
  598. package/dist/services/VariantRunService.js.map +1 -1
  599. package/dist/services/VariantsRuntime.d.ts +0 -3
  600. package/dist/services/VariantsRuntime.d.ts.map +1 -1
  601. package/dist/services/VariantsRuntime.js +2 -5
  602. package/dist/services/VariantsRuntime.js.map +1 -1
  603. package/dist/services/WorktreeManager.d.ts +0 -217
  604. package/dist/services/WorktreeManager.d.ts.map +1 -1
  605. package/dist/services/WorktreeManager.js +3 -321
  606. package/dist/services/WorktreeManager.js.map +1 -1
  607. package/dist/services/accessTokenRefresh.d.ts +0 -25
  608. package/dist/services/accessTokenRefresh.d.ts.map +1 -1
  609. package/dist/services/accessTokenRefresh.js +0 -25
  610. package/dist/services/accessTokenRefresh.js.map +1 -1
  611. package/dist/services/adapters/TailwindTokenAdapter.d.ts +0 -29
  612. package/dist/services/adapters/TailwindTokenAdapter.d.ts.map +1 -1
  613. package/dist/services/adapters/TailwindTokenAdapter.js +1 -46
  614. package/dist/services/adapters/TailwindTokenAdapter.js.map +1 -1
  615. package/dist/services/createAgentVariantsOrchestrator.d.ts +0 -18
  616. package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
  617. package/dist/services/createAgentVariantsOrchestrator.js +0 -22
  618. package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
  619. package/dist/services/extractors/CSSVariableExtractor.d.ts +0 -25
  620. package/dist/services/extractors/CSSVariableExtractor.d.ts.map +1 -1
  621. package/dist/services/extractors/CSSVariableExtractor.js +1 -42
  622. package/dist/services/extractors/CSSVariableExtractor.js.map +1 -1
  623. package/dist/services/historyRoots.d.ts +0 -12
  624. package/dist/services/historyRoots.d.ts.map +1 -1
  625. package/dist/services/historyRoots.js +0 -13
  626. package/dist/services/historyRoots.js.map +1 -1
  627. package/dist/services/libraryErrors.d.ts +0 -1
  628. package/dist/services/libraryErrors.d.ts.map +1 -1
  629. package/dist/services/libraryErrors.js +0 -1
  630. package/dist/services/libraryErrors.js.map +1 -1
  631. package/dist/services/pendingLogin.d.ts +0 -13
  632. package/dist/services/pendingLogin.d.ts.map +1 -1
  633. package/dist/services/pendingLogin.js +0 -3
  634. package/dist/services/pendingLogin.js.map +1 -1
  635. package/dist/services/profiles/DesignProfiles.d.ts +446 -0
  636. package/dist/services/profiles/DesignProfiles.d.ts.map +1 -0
  637. package/dist/services/profiles/DesignProfiles.js +552 -0
  638. package/dist/services/profiles/DesignProfiles.js.map +1 -0
  639. package/dist/services/profiles/MemoryModelService.d.ts +14 -0
  640. package/dist/services/profiles/MemoryModelService.d.ts.map +1 -0
  641. package/dist/services/profiles/MemoryModelService.js +113 -0
  642. package/dist/services/profiles/MemoryModelService.js.map +1 -0
  643. package/dist/services/profiles/MemoryRuntime.d.ts +26 -0
  644. package/dist/services/profiles/MemoryRuntime.d.ts.map +1 -0
  645. package/dist/services/profiles/MemoryRuntime.js +192 -0
  646. package/dist/services/profiles/MemoryRuntime.js.map +1 -0
  647. package/dist/services/profiles/ProfileAgent.d.ts +20 -0
  648. package/dist/services/profiles/ProfileAgent.d.ts.map +1 -0
  649. package/dist/services/profiles/ProfileAgent.js +196 -0
  650. package/dist/services/profiles/ProfileAgent.js.map +1 -0
  651. package/dist/services/profiles/ProfileAnalysis.d.ts +23 -0
  652. package/dist/services/profiles/ProfileAnalysis.d.ts.map +1 -0
  653. package/dist/services/profiles/ProfileAnalysis.js +114 -0
  654. package/dist/services/profiles/ProfileAnalysis.js.map +1 -0
  655. package/dist/services/profiles/ProfileImportSchedule.d.ts +15 -0
  656. package/dist/services/profiles/ProfileImportSchedule.d.ts.map +1 -0
  657. package/dist/services/profiles/ProfileImportSchedule.js +40 -0
  658. package/dist/services/profiles/ProfileImportSchedule.js.map +1 -0
  659. package/dist/services/profiles/ProfileImports.d.ts +47 -0
  660. package/dist/services/profiles/ProfileImports.d.ts.map +1 -0
  661. package/dist/services/profiles/ProfileImports.js +248 -0
  662. package/dist/services/profiles/ProfileImports.js.map +1 -0
  663. package/dist/services/profiles/ProfileIndex.d.ts +18 -0
  664. package/dist/services/profiles/ProfileIndex.d.ts.map +1 -0
  665. package/dist/services/profiles/ProfileIndex.js +119 -0
  666. package/dist/services/profiles/ProfileIndex.js.map +1 -0
  667. package/dist/services/profiles/ProfileMedia.d.ts +10 -0
  668. package/dist/services/profiles/ProfileMedia.d.ts.map +1 -0
  669. package/dist/services/profiles/ProfileMedia.js +76 -0
  670. package/dist/services/profiles/ProfileMedia.js.map +1 -0
  671. package/dist/services/profiles/ProfilePreparation.d.ts +17 -0
  672. package/dist/services/profiles/ProfilePreparation.d.ts.map +1 -0
  673. package/dist/services/profiles/ProfilePreparation.js +214 -0
  674. package/dist/services/profiles/ProfilePreparation.js.map +1 -0
  675. package/dist/services/profiles/ProfileVariants.d.ts +33 -0
  676. package/dist/services/profiles/ProfileVariants.d.ts.map +1 -0
  677. package/dist/services/profiles/ProfileVariants.js +129 -0
  678. package/dist/services/profiles/ProfileVariants.js.map +1 -0
  679. package/dist/services/profiles/analysisBatch.d.ts +53 -0
  680. package/dist/services/profiles/analysisBatch.d.ts.map +1 -0
  681. package/dist/services/profiles/analysisBatch.js +86 -0
  682. package/dist/services/profiles/analysisBatch.js.map +1 -0
  683. package/dist/services/profiles/boardPage.d.ts +12 -0
  684. package/dist/services/profiles/boardPage.d.ts.map +1 -0
  685. package/dist/services/profiles/boardPage.js +156 -0
  686. package/dist/services/profiles/boardPage.js.map +1 -0
  687. package/dist/services/profiles/engineAccess.d.ts +2 -0
  688. package/dist/services/profiles/engineAccess.d.ts.map +1 -0
  689. package/dist/services/profiles/engineAccess.js +55 -0
  690. package/dist/services/profiles/engineAccess.js.map +1 -0
  691. package/dist/services/profiles/memoryComponents.d.ts +7 -0
  692. package/dist/services/profiles/memoryComponents.d.ts.map +1 -0
  693. package/dist/services/profiles/memoryComponents.js +105 -0
  694. package/dist/services/profiles/memoryComponents.js.map +1 -0
  695. package/dist/services/profiles/modelContract.d.ts +14 -0
  696. package/dist/services/profiles/modelContract.d.ts.map +1 -0
  697. package/dist/services/profiles/modelContract.js +124 -0
  698. package/dist/services/profiles/modelContract.js.map +1 -0
  699. package/dist/services/profiles/nativeImages.d.ts +3 -0
  700. package/dist/services/profiles/nativeImages.d.ts.map +1 -0
  701. package/dist/services/profiles/nativeImages.js +72 -0
  702. package/dist/services/profiles/nativeImages.js.map +1 -0
  703. package/dist/services/profiles/profileAccount.d.ts +4 -0
  704. package/dist/services/profiles/profileAccount.d.ts.map +1 -0
  705. package/dist/services/profiles/profileAccount.js +21 -0
  706. package/dist/services/profiles/profileAccount.js.map +1 -0
  707. package/dist/services/profiles/profileContext.d.ts +18 -0
  708. package/dist/services/profiles/profileContext.d.ts.map +1 -0
  709. package/dist/services/profiles/profileContext.js +189 -0
  710. package/dist/services/profiles/profileContext.js.map +1 -0
  711. package/dist/services/profiles/profileEvidence.d.ts +3 -0
  712. package/dist/services/profiles/profileEvidence.d.ts.map +1 -0
  713. package/dist/services/profiles/profileEvidence.js +15 -0
  714. package/dist/services/profiles/profileEvidence.js.map +1 -0
  715. package/dist/services/profiles/profileQueries.d.ts +2 -0
  716. package/dist/services/profiles/profileQueries.d.ts.map +1 -0
  717. package/dist/services/profiles/profileQueries.js +23 -0
  718. package/dist/services/profiles/profileQueries.js.map +1 -0
  719. package/dist/services/profiles/profileSelection.d.ts +29 -0
  720. package/dist/services/profiles/profileSelection.d.ts.map +1 -0
  721. package/dist/services/profiles/profileSelection.js +43 -0
  722. package/dist/services/profiles/profileSelection.js.map +1 -0
  723. package/dist/services/profiles/xPage.d.ts +4 -0
  724. package/dist/services/profiles/xPage.d.ts.map +1 -0
  725. package/dist/services/profiles/xPage.js +58 -0
  726. package/dist/services/profiles/xPage.js.map +1 -0
  727. package/dist/services/referenceImages.d.ts +17 -0
  728. package/dist/services/referenceImages.d.ts.map +1 -0
  729. package/dist/services/referenceImages.js +138 -0
  730. package/dist/services/referenceImages.js.map +1 -0
  731. package/dist/services/staticProjectTarget.d.ts +0 -4
  732. package/dist/services/staticProjectTarget.d.ts.map +1 -1
  733. package/dist/services/staticProjectTarget.js +0 -4
  734. package/dist/services/staticProjectTarget.js.map +1 -1
  735. package/dist/services/staticStarter.d.ts +0 -20
  736. package/dist/services/staticStarter.d.ts.map +1 -1
  737. package/dist/services/staticStarter.js +0 -20
  738. package/dist/services/staticStarter.js.map +1 -1
  739. package/dist/services/templates/designCatalog.d.ts +0 -11
  740. package/dist/services/templates/designCatalog.d.ts.map +1 -1
  741. package/dist/services/templates/designCatalog.js +0 -26
  742. package/dist/services/templates/designCatalog.js.map +1 -1
  743. package/dist/services/templates/viteReactTs.d.ts +0 -26
  744. package/dist/services/templates/viteReactTs.d.ts.map +1 -1
  745. package/dist/services/templates/viteReactTs.js +0 -20
  746. package/dist/services/templates/viteReactTs.js.map +1 -1
  747. package/dist/storage/library/BundleMetadataStore.d.ts +0 -16
  748. package/dist/storage/library/BundleMetadataStore.d.ts.map +1 -1
  749. package/dist/storage/library/BundleMetadataStore.js +0 -17
  750. package/dist/storage/library/BundleMetadataStore.js.map +1 -1
  751. package/dist/storage/library/CoordinatorRecords.d.ts +0 -9
  752. package/dist/storage/library/CoordinatorRecords.d.ts.map +1 -1
  753. package/dist/storage/library/CoordinatorRecords.js +0 -9
  754. package/dist/storage/library/CoordinatorRecords.js.map +1 -1
  755. package/dist/storage/library/ProjectPreviewCache.d.ts +0 -4
  756. package/dist/storage/library/ProjectPreviewCache.d.ts.map +1 -1
  757. package/dist/storage/library/ProjectPreviewCache.js +0 -4
  758. package/dist/storage/library/ProjectPreviewCache.js.map +1 -1
  759. package/dist/storage/library/ProjectRecords.d.ts +0 -17
  760. package/dist/storage/library/ProjectRecords.d.ts.map +1 -1
  761. package/dist/storage/library/ProjectRecords.js +0 -17
  762. package/dist/storage/library/ProjectRecords.js.map +1 -1
  763. package/dist/storage/library/database.d.ts +0 -3
  764. package/dist/storage/library/database.d.ts.map +1 -1
  765. package/dist/storage/library/database.js +0 -3
  766. package/dist/storage/library/database.js.map +1 -1
  767. package/dist/storage/library/migrations.d.ts +0 -2
  768. package/dist/storage/library/migrations.d.ts.map +1 -1
  769. package/dist/storage/library/migrations.js +0 -2
  770. package/dist/storage/library/migrations.js.map +1 -1
  771. package/dist/storage/library/sourcePresentation.d.ts +0 -1
  772. package/dist/storage/library/sourcePresentation.d.ts.map +1 -1
  773. package/dist/storage/library/sourcePresentation.js +0 -1
  774. package/dist/storage/library/sourcePresentation.js.map +1 -1
  775. package/dist/storage/profiles/ProfileRecords.d.ts +199 -0
  776. package/dist/storage/profiles/ProfileRecords.d.ts.map +1 -0
  777. package/dist/storage/profiles/ProfileRecords.js +659 -0
  778. package/dist/storage/profiles/ProfileRecords.js.map +1 -0
  779. package/dist/storage/profiles/contextReceipts.d.ts +14 -0
  780. package/dist/storage/profiles/contextReceipts.d.ts.map +1 -0
  781. package/dist/storage/profiles/contextReceipts.js +52 -0
  782. package/dist/storage/profiles/contextReceipts.js.map +1 -0
  783. package/dist/storage/profiles/migrations.d.ts +4 -0
  784. package/dist/storage/profiles/migrations.d.ts.map +1 -0
  785. package/dist/storage/profiles/migrations.js +41 -0
  786. package/dist/storage/profiles/migrations.js.map +1 -0
  787. package/dist/storage/profiles/schema.d.ts +961 -0
  788. package/dist/storage/profiles/schema.d.ts.map +1 -0
  789. package/dist/storage/profiles/schema.js +102 -0
  790. package/dist/storage/profiles/schema.js.map +1 -0
  791. package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts +0 -11
  792. package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts.map +1 -1
  793. package/dist/storage/project-metadata/ProjectMetadataRecords.js +0 -13
  794. package/dist/storage/project-metadata/ProjectMetadataRecords.js.map +1 -1
  795. package/dist/storage/project-metadata/database.d.ts +0 -1
  796. package/dist/storage/project-metadata/database.d.ts.map +1 -1
  797. package/dist/storage/project-metadata/database.js +0 -7
  798. package/dist/storage/project-metadata/database.js.map +1 -1
  799. package/dist/storage/project-metadata/migrations.d.ts +0 -42
  800. package/dist/storage/project-metadata/migrations.d.ts.map +1 -1
  801. package/dist/storage/project-metadata/migrations.js +0 -41
  802. package/dist/storage/project-metadata/migrations.js.map +1 -1
  803. package/dist/types/account.d.ts +0 -1
  804. package/dist/types/account.d.ts.map +1 -1
  805. package/dist/types/change-request-types.d.ts +5 -167
  806. package/dist/types/change-request-types.d.ts.map +1 -1
  807. package/dist/types/change-types.d.ts +0 -1
  808. package/dist/types/change-types.d.ts.map +1 -1
  809. package/dist/types/change-types.js +0 -1
  810. package/dist/types/change-types.js.map +1 -1
  811. package/dist/types/design-profile.d.ts +570 -0
  812. package/dist/types/design-profile.d.ts.map +1 -0
  813. package/dist/types/design-profile.js +127 -0
  814. package/dist/types/design-profile.js.map +1 -0
  815. package/dist/types/project-library.d.ts +0 -1
  816. package/dist/types/project-library.d.ts.map +1 -1
  817. package/dist/types/style-manipulation-types.d.ts +0 -69
  818. package/dist/types/style-manipulation-types.d.ts.map +1 -1
  819. package/dist/types/style-manipulation-types.js +0 -26
  820. package/dist/types/style-manipulation-types.js.map +1 -1
  821. package/dist/types/token-types.d.ts +0 -30
  822. package/dist/types/token-types.d.ts.map +1 -1
  823. package/dist/types/token-types.js +0 -1
  824. package/dist/types/token-types.js.map +1 -1
  825. package/dist/types/variant-history.d.ts +3 -39
  826. package/dist/types/variant-history.d.ts.map +1 -1
  827. package/dist/types/variant-reference.d.ts +46 -0
  828. package/dist/types/variant-reference.d.ts.map +1 -0
  829. package/dist/types/variant-reference.js +58 -0
  830. package/dist/types/variant-reference.js.map +1 -0
  831. package/dist/types/x-bookmarks.d.ts +352 -0
  832. package/dist/types/x-bookmarks.d.ts.map +1 -0
  833. package/dist/types/x-bookmarks.js +56 -0
  834. package/dist/types/x-bookmarks.js.map +1 -0
  835. package/dist/utils/ProviderRateLimit.d.ts +7 -0
  836. package/dist/utils/ProviderRateLimit.d.ts.map +1 -0
  837. package/dist/utils/ProviderRateLimit.js +36 -0
  838. package/dist/utils/ProviderRateLimit.js.map +1 -0
  839. package/dist/utils/branchNames.d.ts +0 -1
  840. package/dist/utils/branchNames.d.ts.map +1 -1
  841. package/dist/utils/branchNames.js +0 -2
  842. package/dist/utils/branchNames.js.map +1 -1
  843. package/dist/utils/cloneOrCopyDirSync.d.ts +0 -12
  844. package/dist/utils/cloneOrCopyDirSync.d.ts.map +1 -1
  845. package/dist/utils/cloneOrCopyDirSync.js +0 -16
  846. package/dist/utils/cloneOrCopyDirSync.js.map +1 -1
  847. package/dist/utils/devServerCommand.d.ts +0 -23
  848. package/dist/utils/devServerCommand.d.ts.map +1 -1
  849. package/dist/utils/devServerCommand.js +0 -24
  850. package/dist/utils/devServerCommand.js.map +1 -1
  851. package/dist/utils/devServerError.d.ts +0 -16
  852. package/dist/utils/devServerError.d.ts.map +1 -1
  853. package/dist/utils/devServerError.js +0 -17
  854. package/dist/utils/devServerError.js.map +1 -1
  855. package/dist/utils/displayLocale.d.ts +0 -2
  856. package/dist/utils/displayLocale.d.ts.map +1 -1
  857. package/dist/utils/displayLocale.js +0 -2
  858. package/dist/utils/displayLocale.js.map +1 -1
  859. package/dist/utils/elementFileHintSignals.d.ts +0 -5
  860. package/dist/utils/elementFileHintSignals.d.ts.map +1 -1
  861. package/dist/utils/elementFileHintSignals.js +0 -5
  862. package/dist/utils/elementFileHintSignals.js.map +1 -1
  863. package/dist/utils/formatElementTargetingContext.d.ts +0 -6
  864. package/dist/utils/formatElementTargetingContext.d.ts.map +1 -1
  865. package/dist/utils/formatElementTargetingContext.js +3 -9
  866. package/dist/utils/formatElementTargetingContext.js.map +1 -1
  867. package/dist/utils/hostAgentEnv.d.ts +0 -17
  868. package/dist/utils/hostAgentEnv.d.ts.map +1 -1
  869. package/dist/utils/hostAgentEnv.js +0 -17
  870. package/dist/utils/hostAgentEnv.js.map +1 -1
  871. package/dist/utils/htmlDocument.d.ts +0 -5
  872. package/dist/utils/htmlDocument.d.ts.map +1 -1
  873. package/dist/utils/htmlDocument.js +2 -7
  874. package/dist/utils/htmlDocument.js.map +1 -1
  875. package/dist/utils/internalGitIdentity.d.ts +0 -5
  876. package/dist/utils/internalGitIdentity.d.ts.map +1 -1
  877. package/dist/utils/internalGitIdentity.js +0 -5
  878. package/dist/utils/internalGitIdentity.js.map +1 -1
  879. package/dist/utils/logger.d.ts +0 -5
  880. package/dist/utils/logger.d.ts.map +1 -1
  881. package/dist/utils/logger.js +2 -19
  882. package/dist/utils/logger.js.map +1 -1
  883. package/dist/utils/loginShellPath.d.ts +0 -9
  884. package/dist/utils/loginShellPath.d.ts.map +1 -1
  885. package/dist/utils/loginShellPath.js +0 -69
  886. package/dist/utils/loginShellPath.js.map +1 -1
  887. package/dist/utils/loopback.d.ts +0 -1
  888. package/dist/utils/loopback.d.ts.map +1 -1
  889. package/dist/utils/loopback.js +0 -1
  890. package/dist/utils/loopback.js.map +1 -1
  891. package/dist/utils/pid.d.ts +0 -1
  892. package/dist/utils/pid.d.ts.map +1 -1
  893. package/dist/utils/pid.js +0 -1
  894. package/dist/utils/pid.js.map +1 -1
  895. package/dist/utils/portUtils.d.ts +0 -15
  896. package/dist/utils/portUtils.d.ts.map +1 -1
  897. package/dist/utils/portUtils.js +0 -21
  898. package/dist/utils/portUtils.js.map +1 -1
  899. package/dist/utils/queueAccess.d.ts +0 -9
  900. package/dist/utils/queueAccess.d.ts.map +1 -1
  901. package/dist/utils/queueAccess.js +0 -9
  902. package/dist/utils/queueAccess.js.map +1 -1
  903. package/dist/utils/skillWriter.d.ts +0 -17
  904. package/dist/utils/skillWriter.d.ts.map +1 -1
  905. package/dist/utils/skillWriter.js +0 -20
  906. package/dist/utils/skillWriter.js.map +1 -1
  907. package/dist/utils/skills/claude-skill.d.ts +0 -5
  908. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  909. package/dist/utils/skills/claude-skill.js +0 -5
  910. package/dist/utils/skills/claude-skill.js.map +1 -1
  911. package/dist/utils/skills/cli-guidance.d.ts +1 -9
  912. package/dist/utils/skills/cli-guidance.d.ts.map +1 -1
  913. package/dist/utils/skills/cli-guidance.js +6 -10
  914. package/dist/utils/skills/cli-guidance.js.map +1 -1
  915. package/dist/utils/skills/cursor-rules.d.ts +0 -6
  916. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  917. package/dist/utils/skills/cursor-rules.js +0 -6
  918. package/dist/utils/skills/cursor-rules.js.map +1 -1
  919. package/dist/utils/variantPreviewPort.d.ts +0 -3
  920. package/dist/utils/variantPreviewPort.d.ts.map +1 -1
  921. package/dist/utils/variantPreviewPort.js +0 -3
  922. package/dist/utils/variantPreviewPort.js.map +1 -1
  923. package/dist/utils/windowPlacement.d.ts +0 -4
  924. package/dist/utils/windowPlacement.d.ts.map +1 -1
  925. package/dist/utils/windowPlacement.js +0 -4
  926. package/dist/utils/windowPlacement.js.map +1 -1
  927. package/package.json +13 -13
  928. package/scripts/verify-node-version.cjs +0 -3
  929. package/src/ui/dist/assets/{LibraryApp-qbLqcNxM.js → LibraryApp-Bu7hVbt_.js} +1 -1
  930. package/src/ui/dist/assets/main-CHyx_rEa.css +1 -0
  931. package/src/ui/dist/assets/main-CuiPb_rl.js +438 -0
  932. package/src/ui/dist/index.html +2 -2
  933. package/dist/utils/skills/describe-motion-protocol.d.ts +0 -10
  934. package/dist/utils/skills/describe-motion-protocol.d.ts.map +0 -1
  935. package/dist/utils/skills/describe-motion-protocol.js +0 -231
  936. package/dist/utils/skills/describe-motion-protocol.js.map +0 -1
  937. package/src/ui/dist/assets/main-BUZjlAHd.css +0 -1
  938. package/src/ui/dist/assets/main-touv07Dk.js +0 -438
@@ -19,69 +19,23 @@ const internalGitIdentity_1 = require("../utils/internalGitIdentity");
19
19
  const ProjectPackageManager_1 = require("./ProjectPackageManager");
20
20
  const OperatingSystemServices_1 = require("./OperatingSystemServices");
21
21
  const log = (0, logger_1.createLogger)('WorktreeManager');
22
- // How long a freshly-spawned dev server may go SILENT (no stdout/stderr)
23
- // before we give up on it answering on its port. Inactivity-based rather than
24
- // a flat wall clock: a large Next/Vite project's cold first compile can chew
25
- // through 30s+ while chattering progress output, and killing it mid-compile
26
- // manufactured `timeout` failures. A server that is still printing is still
27
- // making progress; only a genuinely silent one is presumed wedged. The probe
28
- // fails fast on early process exit regardless.
29
22
  const DEV_SERVER_READY_INACTIVITY_MS = 30_000;
30
- // Absolute ceiling on the readiness wait, however chatty the process is —
31
- // bounds worst-case UX for a dev server that logs forever without serving.
32
23
  const DEV_SERVER_READY_MAX_MS = 120_000;
33
24
  const DEV_SERVER_PROBE_TIMEOUT_MS = 1_000;
34
- // Keep a rolling tail of the dev server's output so a failed start is
35
- // diagnosable (which port it tried, EADDRINUSE, missing script) without
36
- // retaining unbounded logs.
37
25
  const DEV_SERVER_OUTPUT_TAIL_LIMIT = 4_000;
38
- // Abort any git child process that goes silent (no stdout/stderr) for this
39
- // long. Provisioning worktrees for a large project (e.g. React Native, whose
40
- // working tree carries native build dirs) used to hang indefinitely because
41
- // none of these git calls had a timeout — a stuck `worktree add`/`commit`
42
- // would stall the whole `start_variants` tool call. `block` resets on every
43
- // data chunk, so a slow-but-progressing checkout keeps running; only a
44
- // genuinely wedged process (lock contention, credential/hook prompt) trips it.
45
26
  const GIT_BLOCK_TIMEOUT_MS = 120_000;
46
27
  const GIT_OPTS = { timeout: { block: GIT_BLOCK_TIMEOUT_MS } };
47
- // Existing-project worktrees still go under /tmp — `git worktree add` refuses
48
- // to nest inside the main worktree, so the user's project tree is off-limits
49
- // and /tmp is the right neutral location.
50
28
  const EXISTING_WORKTREE_BASE = '/tmp';
51
- // Fresh-project worktrees live under destinationParent so commit time is a
52
- // same-volume rename instead of a cross-volume cp. Tucked under a
53
- // dot-prefixed dir so the editor file tree collapses them cleanly.
54
29
  exports.FRESH_WORKTREES_DIRNAME = '.rivet-variants';
55
30
  const WORKTREE_PREFIX = 'rivet-variants';
56
31
  const SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
57
- // Include the PID so each server instance only cleans up its own worktrees.
58
32
  exports.INSTANCE_PREFIX = `${WORKTREE_PREFIX}-pid${process.pid}`;
59
- // Registry of every destinationParent that has ever housed a fresh-worktree
60
- // root in this user account. Read at startup so orphan cleanup can sweep
61
- // roots created by prior MCP processes that crashed before teardown ran.
62
33
  const FRESH_ROOTS_REGISTRY_PATH = path_1.default.join(os_1.default.homedir(), '.rivet', 'fresh-worktree-roots.json');
63
34
  const FRESH_SESSION_ERROR = 'Fresh-project sessions have no source project — this operation requires an existing project path.';
64
35
  class WorktreeManager {
65
36
  operatingSystemServices;
66
37
  resolveProjectPath;
67
- /**
68
- * Ports handed out by `findFreePortFrom` to a dev server that hasn't bound
69
- * them yet. Until a port is actually listening, a bind/connect probe still
70
- * sees it as free, so without this set two concurrent variant starts would
71
- * both walk away with the same "free" port and collide. Released (see
72
- * `releasePort`) once the dev server has bound the port — at which point the
73
- * listener check sees it taken — or has failed to start.
74
- */
75
38
  reservedPorts = new Set();
76
- /**
77
- * Accepts either a static path, null, or a lazy getter. The getter form
78
- * lets long-lived callers (e.g. the agent-variants orchestrator) defer the
79
- * project path until each operation, since `bridge.getProjectPath()`
80
- * isn't known until `open_visual_editor` runs. A null projectPath is
81
- * allowed for fresh-project sessions that scaffold from scratch and
82
- * therefore have no source repo; methods that need a real project path
83
- * throw a clear error in that case.
84
- */
85
39
  constructor(projectPath, operatingSystemServices = OperatingSystemServices_1.selectedOperatingSystemServices) {
86
40
  this.operatingSystemServices = operatingSystemServices;
87
41
  if (typeof projectPath === 'function') {
@@ -99,29 +53,12 @@ class WorktreeManager {
99
53
  }
100
54
  return resolved;
101
55
  }
102
- /**
103
- * Return the absolute git root for the repo containing this.projectPath.
104
- * When projectPath is a subdirectory (e.g. examples/microsoft-paint inside
105
- * rivet-core), this returns the repo root — not the subdirectory.
106
- */
107
56
  async getGitRoot() {
108
57
  const root = await (0, simple_git_1.simpleGit)(this.projectPath, GIT_OPTS).revparse([
109
58
  '--show-toplevel',
110
59
  ]);
111
60
  return root.trim();
112
61
  }
113
- /**
114
- * Resolve a path to its canonical (symlinks-followed) form.
115
- *
116
- * `getGitRoot` returns a git-canonicalized path (`rev-parse
117
- * --show-toplevel` resolves symlinks), but `this.projectPath` may be a
118
- * symlinked path — on macOS `/tmp` → `/private/tmp`. Computing
119
- * `path.relative` between a canonical git root and a symlinked project path
120
- * yields an ESCAPING relative path (e.g. `../../../tmp/...`), which then
121
- * resolves OUTSIDE the worktree. Canonicalizing both sides first keeps the
122
- * relative path inside the tree. Falls back to a plain `path.resolve` when
123
- * the path doesn't exist yet (realpath throws ENOENT).
124
- */
125
62
  async realPath(p) {
126
63
  try {
127
64
  return await fs_1.default.promises.realpath(p);
@@ -130,21 +67,6 @@ class WorktreeManager {
130
67
  return path_1.default.resolve(p);
131
68
  }
132
69
  }
133
- /**
134
- * Ensure `this.projectPath` is inside a git repo, bootstrapping one if not.
135
- *
136
- * Fresh / blank projects (an empty folder, or a plain HTML preview) that the
137
- * user opens outside any repo would otherwise fail at `git worktree add`
138
- * (and `getGitRoot`'s `rev-parse --show-toplevel`) with "expected a git
139
- * workspace". We `git init` the folder and create an EMPTY initial commit so
140
- * `HEAD` exists — `git worktree add HEAD` requires a commit to point at, so a
141
- * bare `git init` on a blank folder isn't enough. `add -A` first captures
142
- * whatever is already there (e.g. an `index.html`) as the starting point.
143
- *
144
- * No-op when an enclosing repo already has a HEAD commit — we never nest a
145
- * repo inside another. Best-effort: a failure here surfaces at the
146
- * subsequent worktree step rather than masking the original operation.
147
- */
148
70
  async ensureGitRepo() {
149
71
  const projectPath = this.projectPath;
150
72
  const git = (0, simple_git_1.simpleGit)(projectPath, GIT_OPTS);
@@ -167,9 +89,6 @@ class WorktreeManager {
167
89
  else {
168
90
  log.info(`Git repo at ${projectPath} has no HEAD — creating one for Rivet`);
169
91
  }
170
- // Stage anything already present so a non-empty start point (e.g. an
171
- // HTML preview) lands in the initial commit. Empty dir → nothing staged,
172
- // and `--allow-empty` still produces the HEAD commit we need.
173
92
  await git.add(['-A']).catch(() => { });
174
93
  await git.raw([
175
94
  '-c',
@@ -183,18 +102,7 @@ class WorktreeManager {
183
102
  'rivet: initial',
184
103
  ]);
185
104
  }
186
- /**
187
- * Return the path to the project within a worktree.
188
- * When projectPath == gitRoot this is just worktreePath.
189
- * When projectPath is a subdirectory (e.g. rivet-core/examples/microsoft-paint),
190
- * this returns worktreePath/examples/microsoft-paint so the dev server starts
191
- * from the right directory.
192
- */
193
105
  async getProjectCwdInWorktree(worktreePath) {
194
- // Canonicalize both sides so a symlinked projectPath (e.g. /tmp on macOS,
195
- // which is a symlink to /private/tmp) matches the git-resolved gitRoot.
196
- // Without this, path.relative produces an escaping `../../..` path that
197
- // resolves back to the ORIGINAL project dir instead of inside the worktree.
198
106
  const gitRoot = await this.realPath(await this.getGitRoot());
199
107
  const projectPath = await this.realPath(this.projectPath);
200
108
  const relPath = path_1.default.relative(gitRoot, projectPath);
@@ -204,14 +112,7 @@ class WorktreeManager {
204
112
  }
205
113
  return relPath ? path_1.default.join(worktreePath, relPath) : worktreePath;
206
114
  }
207
- /**
208
- * Translate an absolute path that lives inside the main project tree to its
209
- * equivalent path inside a worktree. Paths outside the git root are returned
210
- * unchanged so the method is safe to call on arbitrary strings.
211
- */
212
115
  async translateToWorktreePath(absPath, worktreePath) {
213
- // Canonicalize both sides (see getProjectCwdInWorktree) so a symlinked
214
- // absPath doesn't compute an escaping rel against the git-resolved root.
215
116
  const gitRoot = await this.realPath(await this.getGitRoot());
216
117
  const realAbsPath = await this.realPath(absPath);
217
118
  const rel = path_1.default.relative(gitRoot, realAbsPath);
@@ -219,17 +120,11 @@ class WorktreeManager {
219
120
  return absPath;
220
121
  return path_1.default.join(worktreePath, rel);
221
122
  }
222
- /** Get diff of all uncommitted changes (staged + unstaged) vs HEAD */
223
123
  async getUncommittedPatch() {
224
124
  const git = (0, simple_git_1.simpleGit)(this.projectPath, GIT_OPTS);
225
125
  const diff = await git.diff(['--binary', '--full-index', 'HEAD']);
226
126
  return diff;
227
127
  }
228
- /**
229
- * Return untracked, non-ignored file paths relative to the git root.
230
- * These are files present in the working tree but not yet in any commit,
231
- * so `git diff HEAD` won't include them.
232
- */
233
128
  async getUntrackedFiles() {
234
129
  const gitRoot = await this.getGitRoot();
235
130
  const git = (0, simple_git_1.simpleGit)(gitRoot, GIT_OPTS);
@@ -241,21 +136,15 @@ class WorktreeManager {
241
136
  ]);
242
137
  return result.split('\0').filter(Boolean);
243
138
  }
244
- /** Copy untracked files from the source repo into a worktree */
245
139
  copyUntrackedFiles(untrackedFiles, gitRoot, worktreePath) {
246
140
  for (const relPath of untrackedFiles) {
247
141
  try {
248
142
  const src = path_1.default.join(gitRoot, relPath);
249
143
  const dest = path_1.default.join(worktreePath, relPath);
250
144
  fs_1.default.mkdirSync(path_1.default.dirname(dest), { recursive: true });
251
- // Clone-on-write where the filesystem supports it (free), plain copy
252
- // elsewhere — untracked trees can hold large binary assets.
253
145
  fs_1.default.copyFileSync(src, dest, fs_1.default.constants.COPYFILE_FICLONE);
254
146
  }
255
147
  catch (err) {
256
- // The listing races live edits: a file with no readable source
257
- // (deleted since `git ls-files`, or a dangling symlink) has nothing
258
- // to copy. Any other failure aborts provisioning.
259
148
  if (err.code === 'ENOENT') {
260
149
  log.warn(`Skipped untracked file ${relPath} with no readable source`);
261
150
  continue;
@@ -264,12 +153,6 @@ class WorktreeManager {
264
153
  }
265
154
  }
266
155
  }
267
- /**
268
- * @effect Commits the staged worktree state onto its detached HEAD with Git
269
- * plumbing, so project commit hooks can neither block nor mutate the
270
- * internal baseline. The commit lives only on this worktree's detached HEAD
271
- * and disappears with it — the user's branches and config are untouched.
272
- */
273
156
  async commitDetachedBaseline(worktreeGit, message) {
274
157
  const tree = (await worktreeGit.raw(['write-tree'])).trim();
275
158
  const baseline = (await worktreeGit.raw([
@@ -283,7 +166,6 @@ class WorktreeManager {
283
166
  ])).trim();
284
167
  await worktreeGit.raw(['update-ref', '--no-deref', 'HEAD', baseline]);
285
168
  }
286
- /** Apply a patch string via stdin to the given cwd using git apply */
287
169
  applyPatchViaStdin(patch, cwd) {
288
170
  return new Promise((resolve, reject) => {
289
171
  const cp = (0, child_process_1.spawn)('git', ['apply', '--whitespace=nowarn', '-'], {
@@ -304,23 +186,11 @@ class WorktreeManager {
304
186
  cp.stdin.end();
305
187
  });
306
188
  }
307
- /**
308
- * Create N worktrees for a session, apply uncommitted patch to each, return paths.
309
- *
310
- * `instanceKeyPrefix` namespaces the worktree directory names so a second
311
- * batch appended to the same session (sequential "Vary") does not collide
312
- * with the first batch's `${INSTANCE_PREFIX}-${sessionId}-${i}` paths. It
313
- * stays within the `${INSTANCE_PREFIX}-${sessionId}-` cleanup glob, so
314
- * `cleanupSession` still removes appended worktrees.
315
- */
316
189
  async createWorktrees(sessionId, count, instanceKeyPrefix = '') {
317
190
  this.assertSafeSessionId(sessionId);
318
191
  if (instanceKeyPrefix && !SESSION_ID_PATTERN.test(instanceKeyPrefix)) {
319
192
  throw new Error('Invalid instanceKeyPrefix: expected a safe path segment');
320
193
  }
321
- // Blank / non-repo workspaces (empty folder or a bare HTML preview) have
322
- // no git history for `git worktree add` to branch from — bootstrap one
323
- // first so variants work outside an existing repo.
324
194
  await this.ensureGitRepo();
325
195
  const git = (0, simple_git_1.simpleGit)(this.projectPath, GIT_OPTS);
326
196
  const patch = await this.getUncommittedPatch();
@@ -333,17 +203,9 @@ class WorktreeManager {
333
203
  try {
334
204
  await git.raw(['worktree', 'add', '--detach', worktreePath, 'HEAD']);
335
205
  isWorktreeCreated = true;
336
- // Apply uncommitted changes so agent sees current state, then commit
337
- // them as a "baseline" so getDiff returns only the agent's delta.
338
- // Without this, getDiff (git diff HEAD) would include the user's
339
- // pre-existing changes, and reverting the combined diff would wipe them.
340
206
  if (patch.trim()) {
341
207
  await this.applyPatchViaStdin(patch, worktreePath);
342
208
  }
343
- // Copy untracked files — git diff HEAD only covers tracked files, so
344
- // untracked-but-not-ignored files (e.g. new components not yet committed)
345
- // must be copied manually or the worktree's dev server will fail to
346
- // resolve their imports.
347
209
  if (untrackedFiles.length > 0) {
348
210
  this.copyUntrackedFiles(untrackedFiles, gitRoot, worktreePath);
349
211
  }
@@ -353,8 +215,6 @@ class WorktreeManager {
353
215
  paths.push(worktreePath);
354
216
  }
355
217
  catch (e) {
356
- // Roll back only worktrees created by this batch; prior directions
357
- // in the same session still belong to the user's exploration.
358
218
  const incompletePaths = isWorktreeCreated
359
219
  ? [...paths, worktreePath]
360
220
  : paths;
@@ -383,11 +243,6 @@ class WorktreeManager {
383
243
  }
384
244
  return paths;
385
245
  }
386
- /**
387
- * Copy a variant worktree into N new sibling worktrees. Each destination
388
- * inherits the source tree (including the baseline commit and agent delta)
389
- * so a code_gen "Vary" starts from the parent variant rather than git HEAD.
390
- */
391
246
  async forkWorktreesFrom(sourceWorktreePath, sessionId, count, instanceKeyPrefix = '') {
392
247
  this.assertSafeSessionId(sessionId);
393
248
  if (instanceKeyPrefix && !SESSION_ID_PATTERN.test(instanceKeyPrefix)) {
@@ -401,11 +256,9 @@ class WorktreeManager {
401
256
  for (let i = 0; i < count; i++) {
402
257
  const worktreePath = path_1.default.join(EXISTING_WORKTREE_BASE, `${exports.INSTANCE_PREFIX}-${sessionId}-${instanceKeyPrefix}${i}`);
403
258
  fs_1.default.mkdirSync(path_1.default.dirname(worktreePath), { recursive: true });
404
- // Each fork prepares its dependencies from its own manifests.
405
259
  await fs_1.default.promises.cp(resolvedSource, worktreePath, {
406
260
  recursive: true,
407
261
  verbatimSymlinks: true,
408
- // Copy-on-write clone on Linux (btrfs/XFS); plain copy elsewhere.
409
262
  mode: fs_1.default.constants.COPYFILE_FICLONE,
410
263
  filter: (source) => !(0, ProjectPackageManager_1.isInstallOutputPath)(path_1.default.relative(resolvedSource, source)),
411
264
  });
@@ -413,31 +266,12 @@ class WorktreeManager {
413
266
  }
414
267
  return paths;
415
268
  }
416
- /** Get git diff of all changes made in a worktree vs HEAD.
417
- *
418
- * `git diff HEAD` only covers tracked files. New files created by the agent
419
- * are untracked and would be silently omitted, breaking imports/styles when
420
- * the diff is applied to the main tree. `git add --intent-to-add .` marks
421
- * every untracked file in the index as a zero-length blob so `git diff HEAD`
422
- * includes them as pure additions without actually staging their content.
423
- */
424
269
  async getDiff(worktreePath) {
425
270
  const git = (0, simple_git_1.simpleGit)(worktreePath);
426
- // Stage new files with intent-to-add so they appear in the diff
427
271
  await git.raw(['add', '--intent-to-add', '.']).catch(() => {
428
- // Non-fatal — if this fails, fall back to tracked-only diff
429
272
  });
430
273
  return git.diff(['--binary', '--full-index', 'HEAD']);
431
274
  }
432
- /**
433
- * Apply or revert a diff to the main project working tree.
434
- *
435
- * Because getDiff now diffs against the worktree baseline commit (HEAD +
436
- * user's uncommitted changes), the codeDiff contains only the agent's delta.
437
- * This means git apply --reverse reliably restores to the baseline state
438
- * (user's uncommitted changes intact) without touching git checkout HEAD,
439
- * which would wipe the user's pre-existing work.
440
- */
441
275
  async applyDiff(diff, reverse) {
442
276
  if (!diff.trim())
443
277
  return;
@@ -464,9 +298,6 @@ class WorktreeManager {
464
298
  cp.stdin.end();
465
299
  });
466
300
  }
467
- /**
468
- * Apply a unified diff to the repository that contains the target project path.
469
- */
470
301
  async applyDiffToProject(diff, projectPath) {
471
302
  if (!diff.trim())
472
303
  return;
@@ -474,7 +305,6 @@ class WorktreeManager {
474
305
  const gitRoot = (await git.revparse(['--show-toplevel'])).trim();
475
306
  return this.applyPatchViaStdin(diff, gitRoot);
476
307
  }
477
- /** Bind port 0 to get an OS-assigned free port */
478
308
  getFreePort() {
479
309
  return new Promise((resolve, reject) => {
480
310
  const server = net_1.default.createServer();
@@ -486,24 +316,6 @@ class WorktreeManager {
486
316
  server.on('error', reject);
487
317
  });
488
318
  }
489
- /**
490
- * Find a free port by scanning upward from `startPort` (the framework's
491
- * default, e.g. 3000 for Next, 5173 for Vite). Returns the first port that is
492
- * both bindable and not already reserved by a concurrent variant start, so a
493
- * preview comes up on a sensible, predictable port near the project's normal
494
- * one — and naturally steps past a port the user's own dev server already
495
- * holds — instead of a random high port. Falls back to an OS-assigned port if
496
- * the scan window is exhausted.
497
- *
498
- * Port availability is delegated to {@link findAvailablePort}, which (unlike a
499
- * plain bind check) also rejects a port with an active listener on 127.0.0.1
500
- * or ::1 — the ports that actually carry `localhost` preview traffic.
501
- *
502
- * The returned port is reserved synchronously; the caller MUST `releasePort`
503
- * it once the dev server has bound it or failed to start (the orchestrator
504
- * does this in a `finally`). Reserving here is what stops two concurrent
505
- * starts — neither of which has bound its port yet — from both picking it.
506
- */
507
319
  async findFreePortFrom(startPort, scanWindow = 64) {
508
320
  const base = Number.isInteger(startPort) && startPort > 0 && startPort <= 65535
509
321
  ? startPort
@@ -516,33 +328,23 @@ class WorktreeManager {
516
328
  candidate = await (0, portUtils_1.findAvailablePort)(from);
517
329
  }
518
330
  catch {
519
- break; // no bindable port between `from` and 65535
331
+ break;
520
332
  }
521
333
  if (candidate > limit)
522
- break; // first free port is outside the scan window
523
- // Check-and-claim with no `await` in between, so two concurrent callers
524
- // can't both observe the same port as unreserved before claiming it.
334
+ break;
525
335
  if (!this.reservedPorts.has(candidate)) {
526
336
  this.reservedPorts.add(candidate);
527
337
  return candidate;
528
338
  }
529
- from = candidate + 1; // reserved by a sibling start — step past it
339
+ from = candidate + 1;
530
340
  }
531
- // Scan window exhausted (or every free port in it is reserved by a sibling
532
- // that hasn't bound yet) — fall back to an OS-assigned ephemeral port.
533
341
  const fallback = await this.getFreePort();
534
342
  this.reservedPorts.add(fallback);
535
343
  return fallback;
536
344
  }
537
- /**
538
- * Release a port previously handed out by {@link findFreePortFrom}. Call once
539
- * the dev server has bound it (the listener check now sees it taken, so the
540
- * reservation is redundant) or has failed to start (the port is free again).
541
- */
542
345
  releasePort(port) {
543
346
  this.reservedPorts.delete(port);
544
347
  }
545
- /** Validate a diff via `git apply --check` without modifying files */
546
348
  validateDiff(diff, reverse) {
547
349
  if (!diff.trim())
548
350
  return Promise.resolve();
@@ -569,26 +371,13 @@ class WorktreeManager {
569
371
  cp.stdin.end();
570
372
  });
571
373
  }
572
- /**
573
- * Spawn a dev server and poll until it responds without a server error.
574
- * Compilation failures and process exits fail promptly; active startup output
575
- * extends the readiness wait up to the hard deadline.
576
- */
577
374
  async startDevServer(worktreePath, port, cmd, args, env) {
578
375
  const proc = this.operatingSystemServices.projectProcesses.start({ executable: cmd, args }, {
579
376
  cwd: worktreePath,
580
- // Preview servers need development transforms even when the installed
581
- // Rivet CLI runs in production. Explicit recipe settings take priority.
582
377
  env: { ...process.env, NODE_ENV: 'development', ...env },
583
378
  stdio: 'pipe',
584
379
  detached: false,
585
380
  });
586
- // Capture a rolling tail of the child's output so a failed start is
587
- // diagnosable (EADDRINUSE, missing dev script, build crash) instead of a
588
- // blind timeout. Draining the pipes is also required: with `stdio: 'pipe'`
589
- // and no consumer, the OS pipe buffer (~64KB) fills within seconds of
590
- // Vite's HMR/request logging and the child blocks on write, freezing the
591
- // dev server even though it passed the readiness probe.
592
381
  let outputTail = '';
593
382
  let lastOutputAt = Date.now();
594
383
  const drain = (data) => {
@@ -598,10 +387,6 @@ class WorktreeManager {
598
387
  };
599
388
  proc.stdout?.on('data', drain);
600
389
  proc.stderr?.on('data', drain);
601
- // Track early termination so the probe can fail fast: a dev server that
602
- // exits (or never spawns) before answering on `port` is never coming up —
603
- // commonly because the project's dev script ignored the injected port and
604
- // tried to bind its own default, which was already taken (EADDRINUSE).
605
390
  const term = {};
606
391
  const onExit = (code, signal) => {
607
392
  term.exited = { code, signal };
@@ -669,8 +454,6 @@ class WorktreeManager {
669
454
  }
670
455
  await new Promise((r) => setTimeout(r, 500));
671
456
  }
672
- // Deadline hit. If the child died during the final wait, report that
673
- // (actionable) rather than a generic timeout.
674
457
  if (term.spawnError)
675
458
  fail('spawn_error');
676
459
  if (term.exited)
@@ -681,13 +464,9 @@ class WorktreeManager {
681
464
  });
682
465
  }
683
466
  catch {
684
- /* ignore */
685
467
  }
686
468
  return fail('timeout');
687
469
  }
688
- /**
689
- * @effect Stops a project dev server through the selected operating-system service.
690
- */
691
470
  async stopDevServer(proc, timeoutMs = 5_000) {
692
471
  if (proc.killed || proc.exitCode !== null || proc.pid == null)
693
472
  return;
@@ -706,7 +485,6 @@ class WorktreeManager {
706
485
  });
707
486
  }
708
487
  catch {
709
- /* ignore */
710
488
  }
711
489
  let timeout;
712
490
  const timedOut = await Promise.race([
@@ -726,34 +504,17 @@ class WorktreeManager {
726
504
  });
727
505
  }
728
506
  catch {
729
- /* ignore */
730
507
  }
731
508
  await exited;
732
509
  }
733
- /** Remove all worktrees for a session.
734
- *
735
- * For existing-project sessions, asks git to unregister the worktree
736
- * (handles `.git/worktrees/*` cleanup) and falls back to plain rm. For
737
- * fresh-project sessions (no projectPath) the worktrees are detached
738
- * directories with their own `.git` under `<destinationParent>/.rivet-variants/`
739
- * — git registry cleanup is a no-op and we just rm the matching dirs.
740
- *
741
- * `freshDestinationParent` is required when the session was fresh; pass
742
- * `path.dirname(projectContext.workspacePath)` so we know which
743
- * `.rivet-variants/` root to sweep.
744
- */
745
510
  async cleanupSession(sessionId, freshDestinationParent) {
746
511
  this.assertSafeSessionId(sessionId);
747
512
  if (!this.resolveProjectPath()) {
748
- // Fresh sessions: no source repo, no git registry to clean. Just rm.
749
513
  if (freshDestinationParent) {
750
514
  this.cleanupFreshWorktrees(sessionId, freshDestinationParent);
751
515
  }
752
516
  return;
753
517
  }
754
- // GIT_OPTS so cleanup can't re-hang: this path runs from teardown after a
755
- // provision timeout/stall, and an unbounded `git worktree list`/`remove`
756
- // would leave the tool hanging on cleanup instead of returning the error.
757
518
  const git = (0, simple_git_1.simpleGit)(this.projectPath, GIT_OPTS);
758
519
  const pattern = path_1.default.join(EXISTING_WORKTREE_BASE, `${exports.INSTANCE_PREFIX}-${sessionId}-`);
759
520
  try {
@@ -768,7 +529,6 @@ class WorktreeManager {
768
529
  await git.raw(['worktree', 'remove', '--force', wPath]);
769
530
  }
770
531
  catch {
771
- // Force remove directory if git command fails
772
532
  fs_1.default.rmSync(wPath, { recursive: true, force: true });
773
533
  }
774
534
  }
@@ -776,31 +536,10 @@ class WorktreeManager {
776
536
  catch (e) {
777
537
  log.warn('Worktree cleanup error:', e);
778
538
  }
779
- // Always also remove any leftover fresh-style directories for this
780
- // session (e.g. mixed-mode sessions, or git registry mismatch).
781
539
  if (freshDestinationParent) {
782
540
  this.cleanupFreshWorktrees(sessionId, freshDestinationParent);
783
541
  }
784
542
  }
785
- /**
786
- * Create N worktrees for a fresh-project session by writing a template
787
- * bundle into each `<destinationParent>/.rivet-variants/rivet-variants-pid<PID>-<sessionId>-<i>`
788
- * directory, optionally writing a DESIGN.md per slot, and committing a
789
- * baseline.
790
- *
791
- * Worktrees live under the user's destinationParent (not /tmp) so commit
792
- * time can be a same-volume rename instead of a cross-volume copy. The
793
- * destinationParent is registered to a small JSON file so a future MCP
794
- * startup can sweep orphans even when the original process crashed.
795
- *
796
- * Does NOT run `npm install` — the orchestrator dispatches that as a
797
- * background task so failures surface via work-item state without blocking
798
- * the MCP tool response.
799
- *
800
- * @effect Creates directories under destinationParent, writes template
801
- * files, runs git init/add/commit, appends destinationParent to
802
- * the fresh-worktree-roots registry.
803
- */
804
543
  async createFreshWorktrees(sessionId, count, template, designContext, destinationParent) {
805
544
  this.assertSafeSessionId(sessionId);
806
545
  if (!destinationParent || !path_1.default.isAbsolute(destinationParent)) {
@@ -835,19 +574,12 @@ class WorktreeManager {
835
574
  });
836
575
  }
837
576
  catch (err) {
838
- // Best-effort: even without a baseline commit the worktree is usable
839
- // for the agent — log and continue.
840
577
  log.warn(`Fresh worktree ${i}: git init failed`, err);
841
578
  }
842
579
  paths.push(worktreePath);
843
580
  }
844
581
  return paths;
845
582
  }
846
- /**
847
- * Write the per-slot DESIGN.md for a fresh worktree.
848
- *
849
- * @effect Writes DESIGN.md when a design context is available.
850
- */
851
583
  writeDesignContext(worktreePath, slot, entry) {
852
584
  if (!entry)
853
585
  return;
@@ -863,34 +595,12 @@ class WorktreeManager {
863
595
  }
864
596
  log.warn(`Fresh worktree ${slot}: unknown design system slug '${entry.slug}' — DESIGN.md skipped`);
865
597
  }
866
- /**
867
- * Move a worktree to its history location preserving contents. Used by the
868
- * orchestrator at commit time so unchosen variants survive on disk as
869
- * runnable references (siblings of the chosen project).
870
- *
871
- * Returns the destination path (`<historyDir>/<folderName>`).
872
- *
873
- * @effect renames `srcWorktreePath` → `<historyDir>/<folderName>`, creating
874
- * the historyDir if needed.
875
- */
876
598
  moveWorktreeToHistory(srcWorktreePath, historyDir, folderName) {
877
599
  fs_1.default.mkdirSync(historyDir, { recursive: true });
878
600
  const dest = path_1.default.join(historyDir, folderName);
879
601
  fs_1.default.renameSync(srcWorktreePath, dest);
880
602
  return dest;
881
603
  }
882
- /** Remove all fresh worktrees for a session.
883
- *
884
- * @effect Removes directories under <destinationParent>/.rivet-variants/
885
- * matching ${INSTANCE_PREFIX}-<sessionId>-*. Also removes the
886
- * .rivet-variants/ parent if it becomes empty so the editor file
887
- * tree doesn't accumulate noise.
888
- *
889
- * When `preserve` is provided, entries whose basenames are in the set are
890
- * skipped — used by the orchestrator after a vite_app commit, where the
891
- * unchosen variant worktrees have already been moved to a sibling history
892
- * dir and must not be re-deleted.
893
- */
894
604
  cleanupFreshWorktrees(sessionId, destinationParent, preserve) {
895
605
  this.assertSafeSessionId(sessionId);
896
606
  if (!destinationParent || !path_1.default.isAbsolute(destinationParent)) {
@@ -910,7 +620,6 @@ class WorktreeManager {
910
620
  force: true,
911
621
  });
912
622
  }
913
- // If the freshRoot is now empty, remove it too.
914
623
  try {
915
624
  const remaining = fs_1.default.readdirSync(freshRoot);
916
625
  if (remaining.length === 0) {
@@ -918,12 +627,9 @@ class WorktreeManager {
918
627
  }
919
628
  }
920
629
  catch {
921
- // Non-fatal — leaving the dir is harmless.
922
630
  }
923
631
  }
924
632
  catch (e) {
925
- // ENOENT is expected when the dir was already cleaned up — only log
926
- // when it's a different failure mode.
927
633
  if (e.code !== 'ENOENT') {
928
634
  log.warn('Fresh worktree cleanup error:', e);
929
635
  }
@@ -936,10 +642,6 @@ class WorktreeManager {
936
642
  }
937
643
  }
938
644
  exports.WorktreeManager = WorktreeManager;
939
- /**
940
- * Read the fresh-worktree-root registry, dropping entries whose dir no
941
- * longer exists so the file stays small.
942
- */
943
645
  const loadFreshWorktreeRoots = () => {
944
646
  try {
945
647
  const raw = fs_1.default.readFileSync(FRESH_ROOTS_REGISTRY_PATH, 'utf8');
@@ -965,11 +667,6 @@ const saveFreshWorktreeRoots = (roots) => {
965
667
  log.warn('Could not persist fresh-worktree-roots registry:', err);
966
668
  }
967
669
  };
968
- /**
969
- * Append a freshRoot path to the registry (de-duped). Called by
970
- * createFreshWorktrees so future MCP startups can sweep orphans even if
971
- * the original process crashed before teardown ran.
972
- */
973
670
  const registerFreshWorktreeRoot = (freshRoot) => {
974
671
  const existing = loadFreshWorktreeRoots();
975
672
  if (existing.includes(freshRoot))
@@ -978,13 +675,6 @@ const registerFreshWorktreeRoot = (freshRoot) => {
978
675
  saveFreshWorktreeRoots(existing);
979
676
  };
980
677
  exports.registerFreshWorktreeRoot = registerFreshWorktreeRoot;
981
- /**
982
- * Sweep orphan worktrees from /tmp (existing-project flow) and from every
983
- * registered fresh-worktree root (fresh-project flow). Filters by
984
- * INSTANCE_PREFIX (includes PID) so each server instance only removes its
985
- * own worktrees and never touches those of sibling instances. Prunes
986
- * registry entries whose directory no longer exists so the file stays small.
987
- */
988
678
  const cleanupOrphanedWorktrees = () => {
989
679
  try {
990
680
  const entries = fs_1.default
@@ -998,7 +688,6 @@ const cleanupOrphanedWorktrees = () => {
998
688
  }
999
689
  }
1000
690
  catch {
1001
- /* ignore */
1002
691
  }
1003
692
  const roots = loadFreshWorktreeRoots();
1004
693
  const survivingRoots = [];
@@ -1025,19 +714,12 @@ const cleanupOrphanedWorktrees = () => {
1025
714
  }
1026
715
  };
1027
716
  exports.cleanupOrphanedWorktrees = cleanupOrphanedWorktrees;
1028
- // Clean up on natural exit (covers process.exit() calls from server shutdown)
1029
717
  process.on('exit', exports.cleanupOrphanedWorktrees);
1030
- /**
1031
- * Prune stale worktree registry entries for a project (`.git/worktrees/<name>`
1032
- * entries where the referenced directory no longer exists). Safe to call at
1033
- * startup — only removes entries for directories that are already gone.
1034
- */
1035
718
  const pruneWorktrees = async (projectPath) => {
1036
719
  try {
1037
720
  await (0, simple_git_1.simpleGit)(projectPath, GIT_OPTS).raw(['worktree', 'prune']);
1038
721
  }
1039
722
  catch {
1040
- // Non-fatal — prune is best-effort housekeeping
1041
723
  }
1042
724
  };
1043
725
  exports.pruneWorktrees = pruneWorktrees;