specrails-desktop 2.57.0 → 2.58.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 (336) hide show
  1. package/README.md +1 -1
  2. package/cli/dist/args.js +10 -4
  3. package/cli/dist/help.js +1 -1
  4. package/client/dist/assets/{ActivityFeedPage-DdMNmVBk.js → ActivityFeedPage-BQGppIR0.js} +1 -1
  5. package/client/dist/assets/{AgentBrowserCapture-CeerUf--.js → AgentBrowserCapture-PI-cxyxi.js} +1 -1
  6. package/client/dist/assets/{AgentModeAnalyticsPane-BjGb-8rh.js → AgentModeAnalyticsPane-mQsOqdXx.js} +2 -2
  7. package/client/dist/assets/{AgentModeCodePane-8XRkQEo_.js → AgentModeCodePane-BL-vpmlY.js} +2 -2
  8. package/client/dist/assets/{AgentModeJobsPane-BN3dgJOA.js → AgentModeJobsPane-DR_06oqH.js} +1 -1
  9. package/client/dist/assets/AgentsPage-BKIKjm_1.js +118 -0
  10. package/client/dist/assets/{AnalyticsPage-CyfhYiBn.js → AnalyticsPage-069npRVo.js} +1 -1
  11. package/client/dist/assets/{CodePage-C2Nf-Q5W.js → CodePage-Alitorrv.js} +2 -2
  12. package/client/dist/assets/DesktopAnalyticsPage-qtWAPM47.js +1 -0
  13. package/client/dist/assets/{DocsDialog-Br3bczCp.js → DocsDialog-DwL6rgcT.js} +1 -1
  14. package/client/dist/assets/{DocsPage-BcDr2cBm.js → DocsPage-BA1hiJZ-.js} +1 -1
  15. package/client/dist/assets/{ExportDropdown-BVGKEgkd.js → ExportDropdown-BcMpvV89.js} +1 -1
  16. package/client/dist/assets/InteractiveJobComposer-B3H1YHr6.js +19 -0
  17. package/client/dist/assets/JobDetailModal-XZQ9eAAy.js +1 -0
  18. package/client/dist/assets/{JobDetailPage-vBbNeRuz.js → JobDetailPage-B-SIaq_q.js} +1 -1
  19. package/client/dist/assets/{JobsPage-CJCtPhIz.js → JobsPage-iQXAv2mx.js} +1 -1
  20. package/client/dist/assets/LoopBuilderPage-B_gbFAHn.js +1 -0
  21. package/client/dist/assets/LoopPreviewModal-je5pSCf-.js +1 -0
  22. package/client/dist/assets/LoopsPage-BZwcY5cu.js +2 -0
  23. package/client/dist/assets/{MinimizedChatsContext-D3QzgV0B.js → MinimizedChatsContext-CNx_0bZu.js} +1 -1
  24. package/client/dist/assets/{PluginsPage-DOpTV75p.js → PluginsPage-DFocnoHX.js} +2 -2
  25. package/client/dist/assets/{ProjectSettingsDialog-Dkwrn0z1.js → ProjectSettingsDialog-Bh3S6EBB.js} +1 -1
  26. package/client/dist/assets/{RepositoryDeliveries-Du2UCf1a.js → RepositoryDeliveries-BiwJuS8r.js} +1 -1
  27. package/client/dist/assets/{RepositoryScopeSelector-hPGZNRBm.js → RepositoryScopeSelector-C2mvWBQ6.js} +1 -1
  28. package/client/dist/assets/{ReviewPacketPage-DcOq-UTA.js → ReviewPacketPage-CrAf-WDy.js} +2 -2
  29. package/client/dist/assets/TemplatePreviewModal-C7DordpN.js +1 -0
  30. package/client/dist/assets/{TicketDetailModalContext-DAK-NoK6.js → TicketDetailModalContext-B-DySpKL.js} +1 -1
  31. package/client/dist/assets/{Trans-DEbgkuAY.js → Trans-D3AfDylf.js} +1 -1
  32. package/client/dist/assets/agentRuntime-BeUb3g9g.js +1 -0
  33. package/client/dist/assets/agentRuntime-Bg9tbmqm.js +1 -0
  34. package/client/dist/assets/agentRuntime-D-GJVGkj.js +1 -0
  35. package/client/dist/assets/agentRuntime-D2__CVI_.js +1 -0
  36. package/client/dist/assets/agentRuntime-D35dGVOP.js +1 -0
  37. package/client/dist/assets/agentRuntime-DGz_IqKW.js +1 -0
  38. package/client/dist/assets/agentRuntime-O1liDt6G.js +1 -0
  39. package/client/dist/assets/agentRuntime-hInH9Fzj.js +1 -0
  40. package/client/dist/assets/agentstudio-B2CTtQgZ.js +1 -0
  41. package/client/dist/assets/agentstudio-BWAKeGgB.js +1 -0
  42. package/client/dist/assets/{agentstudio-DR7doNBV.js → agentstudio-Cja8Sjcp.js} +1 -1
  43. package/client/dist/assets/agentstudio-DtfPcr99.js +1 -0
  44. package/client/dist/assets/agentstudio-QdAJIDef.js +1 -0
  45. package/client/dist/assets/agentstudio-X70BKf6u.js +1 -0
  46. package/client/dist/assets/agentstudio-fLXpRGIi.js +1 -0
  47. package/client/dist/assets/agentstudio-qXKqVnWS.js +1 -0
  48. package/client/dist/assets/{analytics-jzCkOec3.js → analytics-B1DIQd4m.js} +1 -1
  49. package/client/dist/assets/{analytics-CoEzWPx4.js → analytics-BAIZ9vE_.js} +1 -1
  50. package/client/dist/assets/{analytics-DjLlE7jS.js → analytics-BTqgmgBd.js} +1 -1
  51. package/client/dist/assets/analytics-BWynXPEm.js +1 -0
  52. package/client/dist/assets/{analytics-nZIjjtCc.js → analytics-DGcUsQ44.js} +1 -1
  53. package/client/dist/assets/{analytics-BNgZ1Nj7.js → analytics-GnSnpJ4W.js} +1 -1
  54. package/client/dist/assets/{analytics-DFh5lSOl.js → analytics-TWgYaoO0.js} +1 -1
  55. package/client/dist/assets/{analytics-DZp-DS2U.js → analytics-kJy6Tuko.js} +1 -1
  56. package/client/dist/assets/builder-C0FyvM83.js +1 -0
  57. package/client/dist/assets/builder-C1neIYGR.js +1 -0
  58. package/client/dist/assets/builder-CvnFm0im.js +1 -0
  59. package/client/dist/assets/builder-CzW5ovyI.js +1 -0
  60. package/client/dist/assets/builder-D06L7iPy.js +1 -0
  61. package/client/dist/assets/builder-DGETbtZj.js +1 -0
  62. package/client/dist/assets/builder-DXEJUlC0.js +1 -0
  63. package/client/dist/assets/builder-DyQperXU.js +1 -0
  64. package/client/dist/assets/common-BCK7c9Pv.js +1 -0
  65. package/client/dist/assets/common-C0BOdeNi.js +1 -0
  66. package/client/dist/assets/common-C4Yvvhp6.js +1 -0
  67. package/client/dist/assets/{common-BrlwEnL7.js → common-DmsclwjP.js} +1 -1
  68. package/client/dist/assets/common-DpLWwgI1.js +1 -0
  69. package/client/dist/assets/common-OCvl3c8t.js +1 -0
  70. package/client/dist/assets/common-c0aujEZC.js +1 -0
  71. package/client/dist/assets/common-od8WThlf.js +1 -0
  72. package/client/dist/assets/dashboard-B1ndRHuC.js +1 -0
  73. package/client/dist/assets/dashboard-BX7KXiqA.js +1 -0
  74. package/client/dist/assets/dashboard-B_BSNxcN.js +1 -0
  75. package/client/dist/assets/dashboard-CCeFN7-V.js +1 -0
  76. package/client/dist/assets/dashboard-CRl0WtFJ.js +1 -0
  77. package/client/dist/assets/dashboard-XGdQ5mjw.js +1 -0
  78. package/client/dist/assets/dashboard-_oltA6Jd.js +1 -0
  79. package/client/dist/assets/dashboard-bAuf5KVk.js +1 -0
  80. package/client/dist/assets/{formatDistanceToNow-Cc2u5FwQ.js → formatDistanceToNow-aBss1Nai.js} +1 -1
  81. package/client/dist/assets/{getTimezoneOffsetInMilliseconds-BHm2U-w1.js → getTimezoneOffsetInMilliseconds-DOGj1Mfz.js} +1 -1
  82. package/client/dist/assets/index-BS7KCWkV.css +2 -0
  83. package/client/dist/assets/{index-Cxb288Rj.js → index-C4Mv6tV6.js} +32 -32
  84. package/client/dist/assets/{jira-api-DrGxiD9p.js → jira-api-BYbEPlkr.js} +1 -1
  85. package/client/dist/assets/{jobs-DSp9DoD_.js → jobs-6_-r75yC.js} +1 -1
  86. package/client/dist/assets/{jobs-C6qmvUAi.js → jobs-B1yqyId5.js} +1 -1
  87. package/client/dist/assets/{jobs-DoFaEl9g.js → jobs-BFuV7ttH.js} +1 -1
  88. package/client/dist/assets/{jobs-DTQO08nJ.js → jobs-BKa8LuwA.js} +1 -1
  89. package/client/dist/assets/{jobs-DrF8Do8s.js → jobs-BKiK-ZWh.js} +1 -1
  90. package/client/dist/assets/{jobs-DLHdDkHc.js → jobs-DmKV7b7d.js} +1 -1
  91. package/client/dist/assets/{jobs-C9j2PuwW.js → jobs-KG4Sn12X.js} +1 -1
  92. package/client/dist/assets/{jobs-Dpw6AEOP.js → jobs-pPv4KWjb.js} +1 -1
  93. package/client/dist/assets/loop-layout-BF8xMiNv.js +7 -0
  94. package/client/dist/assets/loops-B4_D-nbg.js +1 -0
  95. package/client/dist/assets/loops-BJDY9FTh.js +1 -0
  96. package/client/dist/assets/loops-BO3V8244.js +1 -0
  97. package/client/dist/assets/loops-C-hZK8pf.js +1 -0
  98. package/client/dist/assets/loops-CDOWZ0ci.js +1 -0
  99. package/client/dist/assets/loops-Dv849ckF.js +1 -0
  100. package/client/dist/assets/loops-Q9LIgGkq.js +1 -0
  101. package/client/dist/assets/loops-eUnCfLjC.js +1 -0
  102. package/client/dist/assets/{project-repositories-9Wzs0coQ.js → project-repositories-CSnfzUpg.js} +1 -1
  103. package/client/dist/assets/settings-3o4Ntzi5.js +1 -0
  104. package/client/dist/assets/settings-B97jlkwD.js +1 -0
  105. package/client/dist/assets/settings-BTaT_bsS.js +1 -0
  106. package/client/dist/assets/settings-CT8w7WiC.js +1 -0
  107. package/client/dist/assets/settings-Cvr8_tvh.js +1 -0
  108. package/client/dist/assets/settings-Dn1qgAC8.js +1 -0
  109. package/client/dist/assets/settings-EShDdg4J.js +1 -0
  110. package/client/dist/assets/settings-tfLhQZRN.js +1 -0
  111. package/client/dist/assets/{setup-Dwzt5nO1.js → setup-CBMu3tqH.js} +1 -1
  112. package/client/dist/assets/{setup-B5FHuxvB.js → setup-CPh-e6J2.js} +1 -1
  113. package/client/dist/assets/{setup-DpqzaEEA.js → setup-CRKLp_ke.js} +1 -1
  114. package/client/dist/assets/{setup-CROyqD5N.js → setup-Cy302v4J.js} +1 -1
  115. package/client/dist/assets/{setup-C9Fy9PKQ.js → setup-D681vTPf.js} +1 -1
  116. package/client/dist/assets/{setup-BihzXadx.js → setup-DYK0VBkE.js} +1 -1
  117. package/client/dist/assets/{setup-BtC6Hg4K.js → setup-KAuiIiVs.js} +1 -1
  118. package/client/dist/assets/{setup-zLEDnG7N.js → setup-OGX-oCfI.js} +1 -1
  119. package/client/dist/assets/{spending-T5GM7wpn.js → spending-HBSk-6jv.js} +1 -1
  120. package/client/dist/assets/{useDesktop-QogiN0zR.js → useDesktop-0unHDBJJ.js} +1 -1
  121. package/client/dist/assets/useRuntimeRuns-BN1rhyEm.js +1 -0
  122. package/client/dist/assets/{useSharedWebSocket-Dz-HI6De.js → useSharedWebSocket-BZMrX4jr.js} +2 -2
  123. package/client/dist/index.html +25 -25
  124. package/docs/agent-live-steering.md +16 -0
  125. package/docs/cli.md +7 -7
  126. package/docs/codex.md +2 -2
  127. package/docs/customizing.md +1 -1
  128. package/docs/gemini.md +1 -1
  129. package/docs/getting-started.md +1 -1
  130. package/docs/guide/de/integrations/7-local-engines.md +1 -1
  131. package/docs/guide/de/pipeline/1-rails-and-jobs.md +8 -6
  132. package/docs/guide/de/pipeline/2-the-job-detail-view.md +11 -2
  133. package/docs/guide/de/pipeline/4-picking-an-engine-per-rail.md +2 -2
  134. package/docs/guide/de/pipeline/5-the-loop-builder.md +24 -5
  135. package/docs/guide/en/integrations/7-local-engines.md +1 -1
  136. package/docs/guide/en/pipeline/1-rails-and-jobs.md +8 -6
  137. package/docs/guide/en/pipeline/2-the-job-detail-view.md +11 -2
  138. package/docs/guide/en/pipeline/4-picking-an-engine-per-rail.md +2 -2
  139. package/docs/guide/en/pipeline/5-the-loop-builder.md +34 -5
  140. package/docs/guide/en/settings/3-pipeline-telemetry-and-diagnostics.md +1 -1
  141. package/docs/guide/es/integrations/7-local-engines.md +1 -1
  142. package/docs/guide/es/pipeline/1-rails-and-jobs.md +8 -6
  143. package/docs/guide/es/pipeline/2-the-job-detail-view.md +11 -2
  144. package/docs/guide/es/pipeline/4-picking-an-engine-per-rail.md +2 -2
  145. package/docs/guide/es/pipeline/5-the-loop-builder.md +30 -5
  146. package/docs/guide/es/settings/3-pipeline-telemetry-and-diagnostics.md +1 -2
  147. package/docs/guide/fr/integrations/7-local-engines.md +1 -1
  148. package/docs/guide/fr/pipeline/1-rails-and-jobs.md +8 -6
  149. package/docs/guide/fr/pipeline/2-the-job-detail-view.md +11 -2
  150. package/docs/guide/fr/pipeline/4-picking-an-engine-per-rail.md +2 -2
  151. package/docs/guide/fr/pipeline/5-the-loop-builder.md +24 -5
  152. package/docs/guide/it/integrations/7-local-engines.md +1 -1
  153. package/docs/guide/it/pipeline/1-rails-and-jobs.md +8 -6
  154. package/docs/guide/it/pipeline/2-the-job-detail-view.md +11 -2
  155. package/docs/guide/it/pipeline/4-picking-an-engine-per-rail.md +2 -2
  156. package/docs/guide/it/pipeline/5-the-loop-builder.md +24 -5
  157. package/docs/guide/ja/integrations/7-local-engines.md +1 -1
  158. package/docs/guide/ja/pipeline/1-rails-and-jobs.md +8 -6
  159. package/docs/guide/ja/pipeline/2-the-job-detail-view.md +11 -2
  160. package/docs/guide/ja/pipeline/4-picking-an-engine-per-rail.md +2 -2
  161. package/docs/guide/ja/pipeline/5-the-loop-builder.md +24 -5
  162. package/docs/guide/pt/integrations/7-local-engines.md +1 -1
  163. package/docs/guide/pt/pipeline/1-rails-and-jobs.md +8 -6
  164. package/docs/guide/pt/pipeline/2-the-job-detail-view.md +11 -2
  165. package/docs/guide/pt/pipeline/4-picking-an-engine-per-rail.md +2 -2
  166. package/docs/guide/pt/pipeline/5-the-loop-builder.md +24 -5
  167. package/docs/guide/zh/integrations/7-local-engines.md +1 -1
  168. package/docs/guide/zh/pipeline/1-rails-and-jobs.md +8 -6
  169. package/docs/guide/zh/pipeline/2-the-job-detail-view.md +11 -2
  170. package/docs/guide/zh/pipeline/4-picking-an-engine-per-rail.md +2 -2
  171. package/docs/guide/zh/pipeline/5-the-loop-builder.md +24 -5
  172. package/docs/internals/api-reference.md +2 -2
  173. package/docs/internals/ci-performance.md +71 -0
  174. package/docs/internals/companion-rails-as-loops-contract.md +4 -3
  175. package/docs/internals/configuration.md +3 -3
  176. package/docs/internals/core-runtime-updates.md +3 -2
  177. package/docs/internals/interactive-jobs.md +2 -2
  178. package/docs/internals/loop-step-log-explorer.md +42 -0
  179. package/docs/internals/mission-rail-cards.md +1 -1
  180. package/docs/internals/operations-runbook.md +22 -0
  181. package/docs/internals/programmatic-agent-runtime.md +130 -7
  182. package/docs/internals/project-builder.md +35 -16
  183. package/docs/internals/source-map.md +48 -2
  184. package/docs/kimi.md +2 -2
  185. package/docs/local-providers.md +1 -1
  186. package/docs/running-pipelines.md +26 -18
  187. package/docs/tracking-cost.md +10 -1
  188. package/package.json +2 -1
  189. package/server/dist/core-compat.js +8 -3
  190. package/server/dist/core-execution.js +49 -3
  191. package/server/dist/db/migrations.js +101 -0
  192. package/server/dist/desktop-db.js +28 -0
  193. package/server/dist/desktop-router.js +2 -0
  194. package/server/dist/mcp/guide.js +6 -3
  195. package/server/dist/mcp/tools/jobs.js +14 -1
  196. package/server/dist/mcp/tools/loops.js +17 -8
  197. package/server/dist/mcp/tools/rails.js +3 -3
  198. package/server/dist/modules/agent-runtime/runtime/agent-runtime-bridge.js +313 -9
  199. package/server/dist/modules/agent-runtime/runtime/agent-runtime-controls-router.js +34 -1
  200. package/server/dist/modules/agent-runtime/runtime/agent-runtime-controls.js +203 -21
  201. package/server/dist/modules/agent-runtime/runtime/agent-runtime-effective-config.js +46 -1
  202. package/server/dist/modules/agent-runtime/runtime/agent-runtime-engines.js +10 -0
  203. package/server/dist/modules/agent-runtime/runtime/agent-runtime-loader.js +68 -3
  204. package/server/dist/modules/agent-runtime/runtime/agent-runtime-metrics.js +16 -8
  205. package/server/dist/modules/agent-runtime/runtime/agent-runtime-package-gc.js +81 -0
  206. package/server/dist/modules/agent-runtime/runtime/agent-runtime-package-lock.js +37 -0
  207. package/server/dist/modules/agent-runtime/runtime/agent-runtime-package.js +30 -24
  208. package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-host.js +87 -0
  209. package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-quarantine.js +231 -0
  210. package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-records.js +32 -0
  211. package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention.js +102 -0
  212. package/server/dist/modules/agent-runtime/runtime/agent-runtime-settings-router.js +12 -7
  213. package/server/dist/modules/agent-runtime/runtime/agent-runtime-settings.js +57 -13
  214. package/server/dist/modules/agents/runtime/agent-catalog.js +32 -0
  215. package/server/dist/modules/agents/runtime/agent-refine-manager.js +12 -0
  216. package/server/dist/modules/agents/runtime/agent-role-descriptor.js +64 -0
  217. package/server/dist/modules/agents/runtime/profiles-router.js +26 -34
  218. package/server/dist/modules/builder/runtime/milestone-chain.js +121 -73
  219. package/server/dist/modules/delivery/runtime/definition-fork.js +158 -0
  220. package/server/dist/modules/delivery/runtime/delivery-evidence.js +56 -10
  221. package/server/dist/modules/delivery/runtime/isolated-settlement-reconstruction.js +99 -0
  222. package/server/dist/modules/delivery/runtime/isolated-settlement-store.js +53 -0
  223. package/server/dist/modules/delivery/runtime/multi-repo-execution-store.js +3 -1
  224. package/server/dist/modules/delivery/runtime/rail-isolated-launch.js +388 -203
  225. package/server/dist/modules/delivery/runtime/rail-launch-parser.js +3 -2
  226. package/server/dist/modules/delivery/runtime/rail-pr-store.js +6 -1
  227. package/server/dist/modules/delivery/runtime/rails-router.js +66 -10
  228. package/server/dist/modules/execution/runtime/queue-manager.js +11 -2
  229. package/server/dist/modules/loops/runtime/builtin-loops.js +70 -0
  230. package/server/dist/modules/loops/runtime/definition-cancellation.js +31 -0
  231. package/server/dist/modules/loops/runtime/legacy-launch-telemetry.js +78 -0
  232. package/server/dist/modules/loops/runtime/loop-command-catalog.js +13 -12
  233. package/server/dist/modules/loops/runtime/loop-compat.js +219 -0
  234. package/server/dist/modules/loops/runtime/loop-core-factory.js +42 -0
  235. package/server/dist/modules/loops/runtime/loop-definition-controls.js +48 -0
  236. package/server/dist/modules/loops/runtime/loop-definition-events.js +145 -0
  237. package/server/dist/modules/loops/runtime/loop-definition-recovery.js +106 -0
  238. package/server/dist/modules/loops/runtime/loop-definition-run.js +36 -0
  239. package/server/dist/modules/loops/runtime/loop-definition.js +246 -0
  240. package/server/dist/modules/loops/runtime/loop-effect.js +10 -1
  241. package/server/dist/modules/loops/runtime/loop-executors.js +63 -3
  242. package/server/dist/modules/loops/runtime/loop-factory.js +35 -15
  243. package/server/dist/modules/loops/runtime/loop-graph.js +84 -8
  244. package/server/dist/modules/loops/runtime/loop-migration.js +36 -0
  245. package/server/dist/modules/loops/runtime/loop-preview.js +10 -0
  246. package/server/dist/modules/loops/runtime/loop-run-manager.js +206 -13
  247. package/server/dist/modules/loops/runtime/loop-runs-store.js +271 -7
  248. package/server/dist/modules/loops/runtime/loop-templates.js +205 -45
  249. package/server/dist/modules/loops/runtime/loops-router.js +246 -29
  250. package/server/dist/modules/loops/runtime/loops-store.js +140 -20
  251. package/server/dist/modules/missions/runtime/agent-operator-prompt.js +14 -11
  252. package/server/dist/modules/specs/runtime/spec-addenda.js +28 -0
  253. package/server/dist/project-registry.js +87 -51
  254. package/server/dist/project-router-jobs.js +17 -6
  255. package/server/dist/project-router-loop-runs.js +200 -0
  256. package/server/dist/project-router-spending.js +17 -0
  257. package/server/dist/project-router.js +8 -6
  258. package/server/dist/schemas/agent-runtime.schema.json +93 -1
  259. package/server/dist/schemas/workflow-definition.schema.json +312 -0
  260. package/server/dist/vitest-setup.js +22 -0
  261. package/server/dist/worktree-overlay.js +1 -1
  262. package/client/dist/assets/AgentsPage-DfHWgP_x.js +0 -87
  263. package/client/dist/assets/DesktopAnalyticsPage-tc0p4jJW.js +0 -1
  264. package/client/dist/assets/InteractiveJobComposer-DFPpdg2D.js +0 -19
  265. package/client/dist/assets/JobDetailModal-BdOv-l-M.js +0 -1
  266. package/client/dist/assets/LoopBuilderPage-BemvUOxy.js +0 -7
  267. package/client/dist/assets/LoopPreviewModal-C6hNAeYN.js +0 -1
  268. package/client/dist/assets/LoopsPage-BZr0quvh.js +0 -1
  269. package/client/dist/assets/TemplatePreviewModal-Cejcquah.js +0 -1
  270. package/client/dist/assets/agentRuntime-BUimiX__.js +0 -1
  271. package/client/dist/assets/agentRuntime-BcN97sAB.js +0 -1
  272. package/client/dist/assets/agentRuntime-Ckyg-ahT.js +0 -1
  273. package/client/dist/assets/agentRuntime-DJCwyX4t.js +0 -1
  274. package/client/dist/assets/agentRuntime-DVzPJOl0.js +0 -1
  275. package/client/dist/assets/agentRuntime-V9AZTG3c.js +0 -1
  276. package/client/dist/assets/agentRuntime-bAAjw1vw.js +0 -1
  277. package/client/dist/assets/agentRuntime-v4qKAYH-.js +0 -1
  278. package/client/dist/assets/agentstudio-BNUth0uj.js +0 -1
  279. package/client/dist/assets/agentstudio-BNdB5hkr.js +0 -1
  280. package/client/dist/assets/agentstudio-C7-bt8FO.js +0 -1
  281. package/client/dist/assets/agentstudio-C8uNchpV.js +0 -1
  282. package/client/dist/assets/agentstudio-CKabyMlg.js +0 -1
  283. package/client/dist/assets/agentstudio-CN2pokQu.js +0 -1
  284. package/client/dist/assets/agentstudio-y2dVDXeM.js +0 -1
  285. package/client/dist/assets/analytics-BlypLLR6.js +0 -1
  286. package/client/dist/assets/builder-765NeYTp.js +0 -1
  287. package/client/dist/assets/builder-8MG3V6ea.js +0 -1
  288. package/client/dist/assets/builder-B-1UBs5K.js +0 -1
  289. package/client/dist/assets/builder-BTiGnPT0.js +0 -1
  290. package/client/dist/assets/builder-Cx9Rz-7u.js +0 -1
  291. package/client/dist/assets/builder-DKFMELBl.js +0 -1
  292. package/client/dist/assets/builder-OcmKrC0h.js +0 -1
  293. package/client/dist/assets/builder-P9qVBXFZ.js +0 -1
  294. package/client/dist/assets/common-B5AZNYMH.js +0 -1
  295. package/client/dist/assets/common-BFZ0c_vN.js +0 -1
  296. package/client/dist/assets/common-BttQx3z4.js +0 -1
  297. package/client/dist/assets/common-CM65k_-e.js +0 -1
  298. package/client/dist/assets/common-D4mvFFlu.js +0 -1
  299. package/client/dist/assets/common-TZ9Ny96S.js +0 -1
  300. package/client/dist/assets/common-nFpSF4GC.js +0 -1
  301. package/client/dist/assets/dashboard-B9uWNGO2.js +0 -1
  302. package/client/dist/assets/dashboard-BIwmO9wc.js +0 -1
  303. package/client/dist/assets/dashboard-BV4vOZkR.js +0 -1
  304. package/client/dist/assets/dashboard-Bf6MPVsM.js +0 -1
  305. package/client/dist/assets/dashboard-C8klWVvZ.js +0 -1
  306. package/client/dist/assets/dashboard-D1ORhPF0.js +0 -1
  307. package/client/dist/assets/dashboard-DSubvs9x.js +0 -1
  308. package/client/dist/assets/dashboard-px_vlRx_.js +0 -1
  309. package/client/dist/assets/index-C51x61Bz.css +0 -2
  310. package/client/dist/assets/loops-B7YpGizO.js +0 -1
  311. package/client/dist/assets/loops-BomD2J-h.js +0 -1
  312. package/client/dist/assets/loops-BrQHSQw3.js +0 -1
  313. package/client/dist/assets/loops-BvBwvTPA.js +0 -1
  314. package/client/dist/assets/loops-CODk6Slz.js +0 -1
  315. package/client/dist/assets/loops-DC6k-Ym-.js +0 -1
  316. package/client/dist/assets/loops-DSEg8-uY.js +0 -1
  317. package/client/dist/assets/loops-DhCoXD_v.js +0 -1
  318. package/client/dist/assets/settings-BsehKpty.js +0 -1
  319. package/client/dist/assets/settings-CQWob3SB.js +0 -1
  320. package/client/dist/assets/settings-CgCl0hzy.js +0 -1
  321. package/client/dist/assets/settings-DLRLd22L.js +0 -1
  322. package/client/dist/assets/settings-Dn5prAFl.js +0 -1
  323. package/client/dist/assets/settings-HZSu-K4l.js +0 -1
  324. package/client/dist/assets/settings-p4OVIyRh.js +0 -1
  325. package/client/dist/assets/settings-rddaldUp.js +0 -1
  326. package/client/dist/assets/useRuntimeRuns-Dqmz9fS9.js +0 -1
  327. package/docs/guide/de/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  328. package/docs/guide/en/pipeline/3-batch-implement-and-multi-feature.md +0 -126
  329. package/docs/guide/es/pipeline/3-batch-implement-and-multi-feature.md +0 -114
  330. package/docs/guide/fr/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  331. package/docs/guide/it/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  332. package/docs/guide/ja/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  333. package/docs/guide/pt/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  334. package/docs/guide/zh/pipeline/3-batch-implement-and-multi-feature.md +0 -84
  335. package/server/dist/modules/loops/runtime/loop-templates-ported.js +0 -675
  336. /package/client/dist/assets/{LoopBuilderPage-DtxX27Jz.css → loop-layout-DtxX27Jz.css} +0 -0
@@ -34,7 +34,7 @@ command. Spike-verified 2026-07-03 against **claude 2.1.198**: the claude CLI ex
34
34
  commands arriving as stream-json stdin user frames **exactly like the argv `-p "/cmd"` path**
35
35
  (evidence pointer: the dated comment block above the interactive gate in
36
36
  `server/modules/execution/runtime/queue-manager.ts` `_startJob`, and `loop-executors.ts` `planInteractiveAiStep`). That
37
- makes every job — `/specrails:implement`, `/specrails:batch-implement`, distilled loop commands,
37
+ makes every job — `/specrails:implement`, distilled loop commands,
38
38
  custom commands — transport-compatible, so the default flipped to interactive for every
39
39
  persistent-stdin-capable provider.
40
40
 
@@ -73,7 +73,7 @@ slipped in meanwhile queues/writes a new turn and **extends the session** instea
73
73
 
74
74
  ## Loop-step ownership and routing
75
75
 
76
- All dashboard rail launches (factory `Implement`/`Batch`/`Freestyle` and custom loops) run
76
+ All dashboard rail launches (factory `Implement`/`Freestyle`/SDD Quick and custom loops) run
77
77
  through the `LoopRunManager`. When interactive jobs are enabled and the provider supports
78
78
  persistent stdin, each claude **ai-step** runs as its own `InteractiveJobSession`
79
79
  (`planInteractiveAiStep` builds the spawn plan; `_runInteractiveAiStep` owns the lifecycle):
@@ -6,6 +6,38 @@ The explorer does **not** introduce a second log pipeline. It consumes the exact
6
6
 
7
7
  ## Event contract
8
8
 
9
+ ### Core v2 topology and concurrent attempts
10
+
11
+ For v2 runs, `runtime-graph.graph` is the recorded public Core topology, including
12
+ component references and outcome-labelled edges. The collapsible **Run graph**
13
+ renders this snapshot without inventing transitions or exposing executable prompts.
14
+ Selecting a component opens its nested graph; Back restores the parent and fits
15
+ the viewport. Editing remains in Loop Builder.
16
+
17
+ Selecting a node lists its recorded attempts by scope and attempt ID. Each entry
18
+ focuses that exact log segment, including concurrent map branches. Status uses the
19
+ latest attempt within each scope; a successful sibling cannot hide a failed one.
20
+ Trace/span identifiers appear only when present in the recorded event. Core v2
21
+ uses the same stable event-span identity in JSONL and optional OTLP export, so a
22
+ selected attempt's recorded `step_started` span can be located in a collector.
23
+ These are point events, not provider-duration spans. Identifiers do not prove
24
+ that a collector was configured or accepted the export. Malformed
25
+ topology is ignored without interrupting the normal log view. Legacy snapshots
26
+ retain the existing overview strip.
27
+
28
+ The v2 projection adds `attemptId`, `nodePath`, `scopeId`, `traceId` and optional
29
+ `spanId` to step metadata. Log correlation uses an attempt-index map so parallel
30
+ output is not assigned to whichever step happened to arrive last.
31
+
32
+ For custom review roles, the root workflow inspector's **Review evidence node**
33
+ selects an exact role-turn path, including component/map instances such as
34
+ `checks/security`. The frozen run request carries that selection into fresh and
35
+ recovered delivery evidence. Automatic mode reads native implementation reviews.
36
+ Structured custom-role output must provide a review verdict; a role name alone
37
+ does not qualify. Parallel scoped verdicts stay separate and do not acquire an
38
+ invented aggregate confidence score. AI review never replaces host verification,
39
+ and a file-based confidence score retains precedence over the runtime projection.
40
+
9
41
  Emitted by `server/modules/loops/runtime/loop-run-manager.ts` (payload interfaces are exported there — `LoopStepEventPayload`, `LoopStepEndEventPayload`, `LoopGraphEventPayload`). All three ride the run's job row as ordinary persisted `events` rows plus `event` WS broadcasts (`event_type` below, `payload` = JSON of the interface). Purely additive to the existing stream — no DB migration.
10
42
 
11
43
  ### `loop_graph` — once, at run start
@@ -144,3 +176,13 @@ All explorer strings live under the `jobs` namespace, `loopExplorer.*` (16 keys
144
176
  | `client/src/features/loops/components/loop-log/LoopStepSection.tsx` | Per-step / Setup collapsible sections (memoized) |
145
177
  | `client/src/features/loops/components/loop-log/loop-node-visuals.ts` | Node-kind icon + accent mapping |
146
178
  | `client/src/components/loop-log/__tests__/` | Model + explorer tests |
179
+
180
+ ### Repeat from an exact attempt
181
+
182
+ Recorded v2 attempts expose **Repeat from here**, including internal component
183
+ nodes. The request carries the node path, scope and visit; Core rejects ambiguous
184
+ cuts. A stable request ID survives lost responses through the recovery endpoint.
185
+ The linked child opens in the same project and starts paused for an explicit
186
+ resume. Its original frozen inputs, worktree and delivery settlement are retained.
187
+ The source remains historical; its resume/cancel/settlement effects are fenced once
188
+ ownership moves. The engine does not roll back working-tree files automatically.
@@ -56,7 +56,7 @@ Mission mode (Agent Mode) replaces the routed dashboard, so `RailsBoard`, `Specs
56
56
  Parser pair `server/modules/delivery/runtime/rail-launch-parser.ts` ⇄ `client/src/features/rails/lib/rail-launch-draft.ts` (byte-identical except the mirror note; `server/modules/delivery/runtime/rail-launch-parser.test.ts` enforces parity). `extractRailLaunchProposals(content, streaming)` returns `{ body, proposals, rejected, pending, truncated, repaired }`:
57
57
 
58
58
  - tolerant JSON repair (`json-tolerant`) before rejecting; `repaired` flags it;
59
- - unknown keys dropped; `ticketIds` accepts `12`, `"12"`, `"#12"` (also under `specs` / `tickets`); `mode` accepts `batch` for `batch-implement`, `newRail: true` for an unnamed rail; `railIndex` is ignored when `newRail` is set;
59
+ - unknown keys dropped; `ticketIds` accepts `12`, `"12"`, `"#12"` (also under `specs` / `tickets`); `mode` folds the removed `batch` / `batch-implement` into `implement`, `newRail: true` for an unnamed rail; `railIndex` is ignored when `newRail` is set;
60
60
  - rejection reasons: `invalid_json | not_object | unsupported_version | no_tickets | invalid_mode`, each with a ≤160-char excerpt — never silent;
61
61
  - while streaming an open fence is cut from the body (`pending`); once settled an unreadable open fence is cut and reported `truncated`;
62
62
  - every valid block is kept in order: a batch proposal is N blocks, N cards.
@@ -207,3 +207,25 @@ Regenerates every icon size (PNG/ICNS/ICO) from `src-tauri/icons/icon.svg` via `
207
207
  - [CLI reference](../cli.md) — every command and flag in detail
208
208
  - [Architecture](architecture.md) — server modules, data flow, WebSocket protocol
209
209
  - [macOS](../platforms/macos.md) · [Windows](../platforms/windows.md) — platform-specific operations
210
+
211
+ ## CI verification lanes
212
+
213
+ The `CI` workflow runs quality checks (types, compatibility, scripts, build, npm
214
+ package, module boundaries and generated source map), server/CLI coverage and
215
+ client coverage on independent runners. Both coverage suites retain their existing
216
+ thresholds and publish separate reports. Native macOS, Windows Core assembly and
217
+ runtime portability jobs remain required. The final `test` job preserves the check
218
+ name used by branch protection and rejects any failed, skipped or cancelled lane.
219
+
220
+ Push CI still runs on every branch: native release validation requires a trusted
221
+ push run for the exact branch and commit. PR and merge-queue runs remain enabled.
222
+ Concurrency cancels superseded runs within the same event/ref. No path filters
223
+ exclude runtime or package verification during the engine migration.
224
+
225
+ Before this split, CI run [36225340897](https://github.com/fjpulidop/specrails-desktop/actions/runs/36225340897)
226
+ spent 18m40s in the sequential `test` job, including 6m13s server coverage and
227
+ 10m11s client coverage. The split removes that serial dependency; actual runtime
228
+ and runner-minute changes must be measured from subsequent runs.
229
+
230
+
231
+ CI partitioning and reuse of verified frontend assets are described in [CI performance](ci-performance.md).
@@ -1,6 +1,6 @@
1
1
  # Programmatic agent runtime
2
2
 
3
- Desktop can hand implementation to Core's **runtime API 1**. Core runs architect, developer, deterministic verification, reviewer and archive as separate LangGraph phases. Desktop keeps project/worktree selection, rail lifecycle, logs, accounting and delivery ownership.
3
+ Desktop can hand implementation to Core's **runtime API 1**. Core runs architect, developer, fixer, deterministic verification, reviewer and archive as separate LangGraph phases. Desktop keeps project/worktree selection, rail lifecycle, logs, accounting and delivery ownership.
4
4
 
5
5
  This is the only implementation engine in the current source tree. It applies to implementation rail steps and their Core completion check. Mission chat and unrelated AI features keep their existing transports. Provider-native implementation prompts and skills are not invoked inside the programmatic phases.
6
6
 
@@ -29,7 +29,7 @@ npm run build:server
29
29
  node scripts/smoke-agent-runtime-pair.mjs
30
30
  ```
31
31
 
32
- This runs the compiled Desktop bridge and real bundled Core against a temporary localhost model fixture. It checks tool writes, a real verification subprocess, archive approval, resume, usage and host Git ownership. It uses a temporary repository and deletes it afterward. Pass `--core /absolute/path/to/Core/dist/agent-runtime/index.js` to exercise another built Core checkout.
32
+ This runs the compiled Desktop bridge and real bundled Core against a temporary localhost model fixture. It checks tool writes, a real verification subprocess, archive approval, resume, usage and host Git ownership. The fixture explicitly selects the `free` agent loop; Core's compact pipeline has its own protocol tests. It uses a temporary repository and deletes it afterward. Pass `--core /absolute/path/to/Core/dist/agent-runtime/index.js` to exercise another built Core checkout.
33
33
 
34
34
  For web development, an explicit runtime override can point to the built module:
35
35
 
@@ -64,6 +64,19 @@ Desktop negotiates `runtime api` and sends configuration to `runtime validate --
64
64
 
65
65
  Settings are saved at `<project execution .specrails directory>/agent-runtime.json`. Missing configuration uses the default agent runtime. The retired enabled flag cannot select another engine. Malformed configuration blocks admission; it is not ignored. Saving verifies that Core exposes the expected API. Connections are stored globally in `~/.specrails/runtime-providers.json`; project files retain role references, models, limits and verification. Existing embedded connections migrate once, with stable disambiguated IDs on endpoint conflicts. New runs freeze the resolved configuration, while saved runs retain their original snapshot.
66
66
 
67
+ With a paired Core advertising `openRoles: 1`, **Custom roles** adds named project
68
+ roles with their own provider, model, prompt and explicit source/artifact access.
69
+ New roles start with read-only source access and no artifact writes. Artifact
70
+ access is independent: an analyst may read code and write OpenSpec documents
71
+ without gaining source write access. Optional OpenSpec skills use the provider's
72
+ native syntax. Custom roles reuse effort, turns and escalation controls; escalation
73
+ can use the one permitted protocol repair and does not add another retry. Existing
74
+ architect/developer/reviewer policies remain fixed. Removing a custom role affects
75
+ future runs; admitted runs retain their frozen role configuration. Older Core
76
+ packages keep ordinary settings available and reject saving unsupported roles.
77
+
78
+ **A package of a larger checkout.** A repository registered as a subdirectory of its git checkout (for example `apps/web` inside a monorepo) is isolated in a worktree of the whole checkout, so Desktop passes that directory to Core as the repository `scope` in `desktop-context.json` (Core capability `repositoryScope`). Configured checks run inside the package: a check without `cwd`, or with a `cwd` relative to the registered directory, never runs at the checkout root, where a monorepo test script fans out to every workspace. Core keeps the change inside the scope: after each developer or fixer turn it undoes edits outside it, the reviewer judges only the git change set measured against the run's base, a check that fails for missing credentials, variables or registry access stops the run for the host instead of starting a correction round, and a correction loop that stops converging stops with the reason instead of repeating the same checks. Runs admitted before scopes existed keep their frozen whole-checkout context.
79
+
67
80
  Core owns role instructions and permissions. The developer role edits and runs commands inside its CLI sandbox (the same autonomy as the legacy Implement step); architect and reviewer are read-only. A legacy rail profile/model selection does not override the runtime's per-role provider configuration. The JSON schema is [server/schemas/agent-runtime.schema.json](../../server/schemas/agent-runtime.schema.json), mirrored from Core. For a complete configuration, custom executor examples, Kimi capabilities and API tooling details, see [Core's runtime guide](https://github.com/fjpulidop/specrails-core/blob/main/docs/agent-runtime.md) in the paired revision.
68
81
 
69
82
  The built-in Claude adapter supports its native dollar cap. Built-in Codex, Gemini, Kimi and OpenAI-compatible adapters reject `maxCostUsd`; remove that limit for mixed-provider/local runs. Kimi also rejects token caps because its usage is unavailable. Unknown cost/tokens remain unknown in accounting, rather than becoming zero. Attempt, timeout and tool limits remain available. Existing provider services, licenses and inference costs are separate from the free open-source orchestration runtime.
@@ -107,15 +120,37 @@ All routes are under `/api/projects/:projectId`:
107
120
  | `POST /agent-runtime/runs/:runId/resume` | Accept `{}`, `{ "approve": ["archive"] }`, `{ "recover": ["developer"] }`, explicit `invalidate` phase IDs, or `{ "answer": "…" }` for a pending question (required while one is open) |
108
121
  | `POST /agent-runtime/runs/:runId/cancel` | Cancel a continuation owned by this controller |
109
122
 
110
- Resume responds `202` after admission and continues asynchronously. The valid phase IDs are `architect`, `developer`, `verify`, `reviewer` and `archive`. Core's lease remains the cross-process concurrency guard. A run cannot be resumed while its original Desktop execution is active.
123
+ Resume responds `202` after admission and continues asynchronously. Legacy phase IDs are `architect`, `developer`, `fixer`, `verify`, `reviewer` and `archive`. For engine v2, use `POST /loop-runs/:runId/resume` instead. `recover` contains exact attempt IDs from `GET /loop-runs/:runId/recovery`; approval and answer controls use pending interrupt IDs. Node paths are display context, not recovery identities. The saved-execution panel and job header expose explicit per-attempt selection. Core's lease and Desktop's execution/mount claim jointly prevent competing writers. Resident human pauses keep their original settlement callback; restart recovery reconnects to the frozen delivery allocation and terminal outbox.
111
124
 
112
- Desktop launches `node <Core>/dist/agent-runtime/cli.js` with structured argv (`--approve`, `--recover`, `--invalidate`, `--answer <text>` on resume) and consumes JSON lines for phase events (`workflow-event`), agent output (`agent-event`), verification output, trace spans (`span`: `{ traceId, spanId, name, stepId, attempt, visit, startedAt, endedAt, status, usage?, error? }`) and the terminal `runtime-result`. Spans are stored verbatim as job events for diagnostics and are not narrated in the log. `runtime status --compact` returns `state.traceId`, `pendingApproval`, `pendingQuestion` and per-step `{ status, visits }`. Desktop probes `runtime api` once per Core CLI file revision (path plus mtime/size); `runtime validate --stdin` runs on every save. The job log shows phase transitions (`[runtime] step_started: developer`), live tool activity per role (`[developer] Read src/app.ts`, `[developer] Bash npm test`) and Core's own phase notes (architecture written, verification passed, review approved or corrections requested); the final JSON of architect and reviewer is not echoed. The narrated view (Relato) derives its milestones from the same events: each runtime phase, the tools used, correction loops and a stopped workflow with Core's structural reason. Accounting uses the invocation's new attempts, so resuming a completed phase does not bill its cumulative history twice. Status queries use `--compact`, are read-only and do not invoke providers; accumulated logs stay in Core's checkpoint instead of overflowing the process status response.
125
+ Desktop launches `node <Core>/dist/agent-runtime/cli.js` with structured argv (`--approve`, `--recover`, `--invalidate`, `--answer <text>` on resume) and consumes JSON lines for phase events (`workflow-event`), agent output (`agent-event`), verification output, trace spans (`span`: `{ traceId, spanId, name, stepId, attempt, visit, startedAt, endedAt, status, usage?, error? }`) and the terminal `runtime-result`. Spans are stored verbatim as job events for diagnostics and are not narrated in the log. `runtime status --compact` returns `state.traceId`, `pendingApproval`, `pendingQuestion` and per-step `{ status, visits }`. Desktop probes `runtime api` once per executable package content digest; `runtime validate --stdin` runs on every save. The job log shows phase transitions (`[runtime] step_started: developer`), live tool activity per role (`[developer] Read src/app.ts`, `[developer] Bash npm test`) and Core's own phase notes (architecture written, verification passed, review approved or corrections requested); the final JSON of architect and reviewer is not echoed. The narrated view (Relato) derives its milestones from the same events: each runtime phase, the tools used, correction loops and a stopped workflow with Core's structural reason. Accounting uses the invocation's new attempts, so resuming a completed phase does not bill its cumulative history twice. Status queries use `--compact`, are read-only and do not invoke providers; accumulated logs stay in Core's checkpoint instead of overflowing the process status response.
113
126
 
114
127
  Provider invocation/cancellation supports native macOS processes and Windows executables/npm shims. Actual provider behavior still depends on the installed CLI version and capabilities. The offline tests cover fake CLI/ACP frames, Windows argv rules, a local HTTP coding fixture and real verification subprocesses; live provider smoke tests and Windows CI remain separate validation.
115
128
 
129
+ ## Definition catalog compatibility (D0)
130
+
131
+ Desktop accepts optional `engineVersion`, `nodeKindsVersion`, `nodeKinds` and
132
+ `builtins` metadata from `runtime api`; malformed descriptors are protocol errors.
133
+ An empty catalog can use version 0. The integration contract target is 5.1;
134
+ engine/catalog/builtin metadata is informational and older supported Core
135
+ packages remain compatible. D0 does not enable definition execution.
136
+
137
+ `validateWorkflowDefinition` invokes `workflows validate --stdin` only when Core
138
+ advertises `workflowDefinitions: 1`. Core returns the canonical hash and graph or
139
+ structured node errors, including valid error responses with exit 1. Desktop
140
+ does not calculate a competing definition hash.
141
+
142
+ Compact v2 status normalizes `nextNodePath` to existing controls and accepts
143
+ metrics from the top-level response. Resume validates syntax first, then exact
144
+ membership in the run's step catalog. Role metrics use the frozen runtime config,
145
+ so later settings changes cannot add roles to an existing run. Legacy readers
146
+ remain the fallback when no catalog exists. Historical projections will gain the
147
+ authoritative graph catalog in D2; D0 does not infer one from metrics themselves.
148
+ V2 inspection is uncached because a legacy journal does not track SQLite/WAL
149
+ changes. C0 published-package pairing remains a separate release gate.
150
+
116
151
  ## Rollout and release pairing
117
152
 
118
- The committed registry bundle lock and `CORE_BUNDLE_VERSION` currently pin **Core 5.1.1**, a previously published package. That pin does not incorporate these source changes. Source assembly is the supported development route until the paired Core runtime release is available.
153
+ The committed registry bundle lock and `CORE_BUNDLE_VERSION` currently pin **Core 6.0.0**, a previously published package. The inspected source pair is Core 6.0.1 with workflow identity 7 and role instructions 10; D0 keeps those identities intact. That pin does not incorporate these source changes. Source assembly is the supported development route until the paired Core runtime release is available.
119
154
 
120
155
  A production release must:
121
156
 
@@ -123,7 +158,7 @@ A production release must:
123
158
  2. Update `scripts/assemble-bundled-core.lock.json` and `CORE_BUNDLE_VERSION` together to that exact release, capturing the full dependency integrity closure.
124
159
  3. Run Core package checks, Desktop compatibility/package checks and both macOS/Windows native validation before packaging the paired app.
125
160
 
126
- Do not relabel an old 5.1.1 bundle or copy only `dist/agent-runtime`: LangGraph and the complete runtime dependency closure are required. Source assembly writes `source-bundle.json` with the Core version, runtime API and lock hash for traceability; it does not publish Core or update the production registry lock.
161
+ Do not relabel an existing 6.0.0 bundle or copy only `dist/agent-runtime`: LangGraph and the complete runtime dependency closure are required. Source assembly writes `source-bundle.json` with the Core version, runtime API and lock hash for traceability; it does not publish Core or update the production registry lock.
127
162
 
128
163
  Verify role outputs, delivery ownership and saved-run recovery before releasing the paired app. Implementation has no legacy fallback; profile v1 remains only for other workflows. Core's programmatic archive writes reviewed **complete specification replacements**; it does not merge partial OpenSpec delta snippets. Preserve unchanged requirements in the architect's output and inspect that behavior during the pilot.
129
164
 
@@ -135,7 +170,7 @@ The [implementation verification record](programmatic-agent-runtime-validation.m
135
170
 
136
171
  Core's additive runtime metrics v1 are passed from compact status to each saved run's optional `metrics` field. The contextual run panels and Jobs history render a collapsed **Usage and time** panel with reported cost, active execution/agent time, calls and token/cache totals, plus per-phase attempts, duration, provider calls and cost. All eight locales include the panel labels.
137
172
 
138
- Older Core versions continue to work without the panel. The server validates numeric fields and known phase IDs, drops unsupported/malformed metrics and projects only the supported fields; it never forwards arbitrary transcripts from the metrics object. Missing billing is displayed as unavailable rather than zero. Cache tokens are already included in input tokens, and agent duration already includes native tool work. The panel does not estimate savings or measure implementation quality.
173
+ Older Core versions continue to work without the panel. The server validates numeric fields and legacy phase IDs, or the authoritative step and frozen-role catalogs of a v2 run, drops unsupported/malformed metrics and projects only the supported fields; it never forwards arbitrary transcripts from the metrics object. Missing billing is displayed as unavailable rather than zero. Cache tokens are already included in input tokens, and agent duration already includes native tool work. The panel does not estimate savings or measure implementation quality.
139
174
 
140
175
  The paired `agent-runtime-efficiency` OpenSpec change in specrails-core documents verification ownership, efficient API tools and the measurement contract. Core exposes the same report through `runtime status` / `runtime-result`, so a fixed set of real tasks can be compared without a Desktop database migration.
141
176
 
@@ -204,3 +239,91 @@ uses Core's existing evidence/receipt store and cannot mark workflow phases done
204
239
  OpenSpec checks validate real files without copying or archiving them. Old retained
205
240
  Core packages lacking `scopedRecovery` are not upgraded/migrated behind the run's
206
241
  back: the tool returns a manual-repair limitation rather than recommending Relaunch.
242
+
243
+ ### Definition cancellation after restart
244
+
245
+ `POST /loop-runs/:runId/cancel` accepts an optional stable `requestId`. A `202`
246
+ means the retained Core inbox acknowledged cancellation. The original resident
247
+ execution still owns its callback. For a restarted execution, Desktop observes
248
+ Core until its writer lease is inactive, then replays terminal events through
249
+ Loop Manager and reconnects the original isolated settlement. A completed result
250
+ that wins the race remains completed; cancellation never rewrites its verdict.
251
+
252
+ The observer stops on project shutdown and leaves Core's durable intent for
253
+ startup recovery. Unavailable status or a lease that remains active beyond the
254
+ bounded observation window records a `definition-control-error` event in the
255
+ original job. That diagnostic does not mark the job or delivery successful.
256
+ Recovery preserves repository mounts, frozen verification policy, accounting,
257
+ worktree ownership and the terminal outbox. Missing original isolated allocation
258
+ data blocks settlement instead of treating the execution as a standalone job.
259
+ For historical v2 multi-repository records, explicit recovery can reconstruct a
260
+ missing allocation snapshot when the original frozen manifest/context, worktree
261
+ ledger and delivery branch records agree, including the captured initial SHA and
262
+ never-commit exclusions. All repository legs restore atomically. Reconstruction
263
+ checks the original Git common directory, grants no automatic cleanup permission
264
+ and does not infer missing values from current checkouts or project settings.
265
+ Incomplete records and borrowed-PR continuations without their original contract
266
+ remain blocked with a recovery diagnostic.
267
+
268
+ ### Lost fork acknowledgement
269
+
270
+ Once Desktop adopts a child, the parent remains immutable history. Restart does
271
+ not mark that historical parent as a new interrupted execution. Active-run counts,
272
+ workflow edit guards and repository execution references follow the child; a
273
+ completed child therefore does not leave its paused parent blocking edits forever.
274
+ The host crash fixture kills the settlement process between two repository legs,
275
+ reopens the real project database and replays startup reconciliation before retry.
276
+ It checks one commit and one provenance receipt per leg, cleared orphan claims,
277
+ verified delivery to review and unchanged parent database/journal state.
278
+
279
+ Core forks may include a stable `requestId`. The retained engine stores the exact
280
+ fork request and original receipt before publication. Desktop preserves a child
281
+ if acknowledgement or host metadata writing fails, and reuses that request ID to
282
+ finish missing frozen files. Existing files must match exactly. A conflicting
283
+ request or destination is rejected; the source and child Core databases are never
284
+ replaced by host cleanup. Older children without receipts cannot be adopted by a
285
+ new request.
286
+
287
+ ### Workflow decision role
288
+
289
+ Factories and starters use `loop-decider` for evidence-based continuation. The
290
+ bridge binds this role only when the compiled definition declares it, after
291
+ effective provider/model overrides. Its default inherits the review engine with
292
+ `access: read`, `artifacts: none` and no OpenSpec skill. Explicit project engine
293
+ and prompt settings win; incompatible permission/skill settings fail before
294
+ execution. The generated descriptor and selection origin are frozen per run,
295
+ without modifying the project config. The config endpoint exposes available
296
+ workflow defaults separately for builder choices. Native implementation's
297
+ reviewer still requires its original OpenSpec workflow.
298
+
299
+ ### Paired engine CI
300
+
301
+ The required `paired-core-engine` matrix builds the commit-pinned Core checkout
302
+ on Linux, macOS and Windows and exports both source-root variables. It checks
303
+ schema parity, four factories, custom-role read-only CLI arguments, durable
304
+ fork/control recovery, real host/Core crashes during read/write/human pauses or between nodes,
305
+ and two-repository settlement. Crash acceptance retains production lease TTLs,
306
+ requires exact write-attempt recovery and verifies frozen configuration plus
307
+ idempotent physical-call accounting. Transport fixtures make no
308
+ paid provider calls. Review and advance the Core pin with paired changes; ordinary
309
+ coverage lanes may omit optional source fixtures, but the required matrix cannot.
310
+
311
+ ### Inspecting released workflow mounts
312
+
313
+ Definition recovery can inspect an existing retained Core journal after its
314
+ original repository mount disappears. This uses the read-only `status --run-dir`
315
+ operation against the original owned journal, rejects redirected journal paths,
316
+ and does not recreate a worktree or replace frozen paths with current settings.
317
+ Status retains Core's recorded completion or pause and reports
318
+ `runtime_scope_unavailable`; resume remains disabled until the original scope is
319
+ available and validated. Inspection alone does not authorize delivery settlement.
320
+
321
+ ### Per-piece invocation limits
322
+
323
+ With a Core catalog that exposes them, `prompt`, `role-turn` and `decider` accept
324
+ `timeoutMs` and `idleTimeoutMs` in their parameter forms. An explicit `0` disables
325
+ that invocation timer; removing the optional field restores the inherited
326
+ default. Workflow duration/cost/token budgets and cancellation still apply.
327
+ Role repair and session fallback retain the selected bounds, including Kimi ACP
328
+ transport. A verification prompt reporting `LOOP_BLOCKED` pauses for the human
329
+ answer before its success sentinel can be accepted.
@@ -2,11 +2,12 @@
2
2
 
3
3
  > OpenSpec change `add-project-builder`. Greenfield project creation from an
4
4
  > idea: a day-0 blueprint conversation, an orchestrated bootstrap commit, and a
5
- > milestone lifecycle (Launch M1 batch rail, sidebar re-entry, Generate M2+).
5
+ > milestone lifecycle (Launch M1 — one spec per rail, sequential —, sidebar
6
+ > re-entry, Generate M2+).
6
7
 
7
8
  > **Kimi capability boundary:** Kimi may be selected as a target provider for
8
9
  > the materialized project, and it may launch an already committed milestone
9
- > through the normal agentic Batch rail. Day-0 blueprint snapshots and M2+
10
+ > through ordinary agentic Implement rails. Day-0 blueprint snapshots and M2+
10
11
  > milestone generation are pure structured-output actions and therefore fail
11
12
  > closed for Kimi 0.27 `-p`; no Kimi process is spawned for them.
12
13
 
@@ -505,22 +506,29 @@ step 6 it is an ordinary project missing only the remote.
505
506
 
506
507
  Generating detailed M2+ specs uses the same pure-output capability gate as
507
508
  day-0 blueprint generation. Kimi cannot be selected for that generation turn.
508
- Launching the already committed M1/M2+ tickets is ordinary Batch rail
509
- execution and can use Kimi.
509
+ Launching the already committed M1/M2+ tickets is ordinary Implement rail
510
+ execution (one spec per rail) and can use Kimi.
510
511
 
511
512
  - **Launch Milestone N is SERVER-owned** (premium-milestone-progress D3):
512
- `POST /api/projects/:id/blueprint/milestones/:n/launch { mode }`
513
+ `POST /api/projects/:id/blueprint/milestones/:n/launch { autoAdvance? }`
514
+ (always sequential: the retired `mode: 'parallel'` is still accepted from
515
+ old clients and runs sequentially — the 202 echoes `mode: 'sequential'`;
516
+ any other `mode` is a 400)
513
517
  (`client/src/features/builder/lib/milestone-launch.ts` `launchMilestone` is one POST; the
514
518
  old browser-local `MilestoneSequencerContext` + its `localStorage` plan are
515
519
  GONE — `dropLegacySequentialPlans()` forgets the leftover key on load).
516
520
  `server/modules/builder/runtime/milestone-chain.ts` `MilestoneChainManager` gathers the `M<n>`
517
- `todo` tickets, chunks them (≤3, `chainRailName` → `M<n>` / `M<n> · k`),
521
+ `todo` tickets, orders them by dependencies (`orderChainTickets`: stable
522
+ topological order over `prerequisites` inside the set, ties by
523
+ `execution_order` then id; a cycle never blocks), puts ONE spec on each
524
+ rail (`MAX_TICKETS_PER_CHAIN_CHUNK = 1`, `chainRailName` → `M<n> · #<id>`,
525
+ launch body `mode: 'implement'`),
518
526
  persists ONE `milestone_launch_chains` row (`server/modules/builder/runtime/milestone-chain-store.ts`,
519
527
  migration 58, partial unique index = one non-terminal chain per milestone;
520
528
  CAS `updateChain`) and launches chunk 1 through the app's OWN rails launch
521
529
  route over loopback (`server/internal-api.ts`, lifted from the MCP tools'
522
530
  `apiCall`) so every existing guard applies and each 4xx becomes a typed
523
- `pause_reason` (`launch_rejected:<error>`). **Sequential (default)** chains
531
+ `pause_reason` (`launch_rejected:<error>`). The chain
524
532
  the next chunk when the in-flight chunk's DELIVERY settles — the manager taps
525
533
  the project's bound broadcast for `rail.pr_state` (the engine's
526
534
  `onLoopRunFinished` fires BEFORE the delivery row leaves `building`, so it is
@@ -546,12 +554,23 @@ execution and can use Kimi.
546
554
  the same milestone likewise reuses a rail already named for the chunk
547
555
  (`io.findRailByName` → `rails-store` `getRails`) when it holds no undecided
548
556
  delivery, so relaunching M1 never piles up duplicate "M1 · 1" rails;
557
+ **Rail limit (MAX_RAILS 12).** Before creating a rail the manager reuses a
558
+ free builder-owned rail — the retried chunk's rail, a rail already named for
559
+ the spec, a rail this chain used, then any `M<n>`-named rail — where "free"
560
+ means no undecided delivery, no active job/loop run (`io.railBusy`) and no
561
+ other chain mid-flight on it; a reused rail is renamed after its spec
562
+ (`io.renameRail`, best effort). When no rail is free and `POST /rails`
563
+ answers `rail_limit_reached`, a later spec PAUSES the chain with
564
+ `pause_reason: rail_limit_reached` (localized: decide pending PRs to free a
565
+ rail, then Resume launches the same spec); on the FIRST spec nothing
566
+ launches, the row is cancelled and the route relays 409
567
+ `rail_limit_reached`.
549
568
  `…/cancel` stops the chain and leaves in-flight rails alone. Startup
550
569
  recovery (`recoverOnStartup`, run once the HTTP server listens) replays a
551
570
  chunk that settled while the server was down exactly once.
552
- **Wave checkpoints (D9).** The row carries `auto_advance` (default 1 for
553
- API callers; the UI sends the user's stored preference
554
- `localStorage['specrails-desktop:milestone-auto-advance']`, default OFF)
571
+ **Wave checkpoints (D9).** The row carries `auto_advance` (default 1 when
572
+ omitted; the UI sends the user's stored preference
573
+ `localStorage['specrails-desktop:milestone-auto-advance']`, default ON)
555
574
  and a non-terminal status `awaiting_approval`. When a chunk's delivery
556
575
  settles successfully and auto-advance is off (and chunks remain), the
557
576
  manager records the head and parks the chain at `awaiting_approval`
@@ -563,13 +582,13 @@ execution and can use Kimi.
563
582
  counts as active (one non-terminal chain per milestone, cancellable) and is
564
583
  ignored by startup recovery (waiting for the user is the point); a failure
565
584
  always PAUSES regardless of the flag (checkpoints are reached only by
566
- success). Client: `launchMilestone(projectId, n, mode, { autoAdvance })`,
585
+ success). Client: `launchMilestone(projectId, n, { autoAdvance })`,
567
586
  `setChainAutoAdvance`, `readMilestoneAutoAdvance`/`saveMilestoneAutoAdvance`
568
587
  (`milestone-launch.ts`); `chainAtCheckpoint` + `isMilestoneLaunchable`
569
- excludes a checkpoint (`milestone-progress.ts`). **Parallel**
570
- launches every chunk at once from the integration branch (row recorded
571
- `completed` so the progress model still orders the rails). Kill switch
572
- `SPECRAILS_MILESTONE_CHAIN=false` ⇒ parallel, no row. Merging a STACKED
588
+ excludes a checkpoint (`milestone-progress.ts`). The former **Parallel**
589
+ option and the `SPECRAILS_MILESTONE_CHAIN=false` kill switch were removed
590
+ (`remove-batch-and-sequential-builder`); completed `mode: 'parallel'` rows
591
+ already in the database still render ("Parallel launch"). Merging a STACKED
573
592
  chunk sweeps its merged ancestors (`sweepMergedChainAncestors` in
574
593
  `rail-pr-decision.ts`: chain-local, `git merge-base --is-ancestor`, same
575
594
  CAS + ticket effect + Jira hook) and merge-local integrates into the CHAIN's
@@ -577,7 +596,7 @@ execution and can use Kimi.
577
596
  discarding a delivery a later chunk was built on pauses its chain
578
597
  (`pauseChainsForDiscardedHead`) and the decision surfaces warn first
579
598
  (`discardStackedNote` ×3 namespaces). Offered on the Builder done screen and
580
- the sidebar entry with the Sequential | Parallel toggle.
599
+ the sidebar entry with the auto-continue switch (no launch-mode toggle).
581
600
  - **Milestone progress is SERVER-derived** (premium-milestone-progress D2):
582
601
  `server/modules/builder/runtime/milestone-progress.ts` `deriveMilestoneProgress` builds, per
583
602
  milestone, counts by spec state (`total/done/onReview/inProgress/todo/failed`