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
@@ -5,7 +5,7 @@ architectural dependency declaration. Search a heading or filename and read only
5
5
  the relevant source and tests. Feature prefixes group the legacy server files;
6
6
  new bounded modules live under `server/modules/`.
7
7
 
8
- Includes 942 source/build files. Nearby tests are linked where names
8
+ Includes 982 source/build files. Nearby tests are linked where names
9
9
  match; integration suites may live elsewhere. Use `rg` to find other consumers.
10
10
 
11
11
  ## cli
@@ -76,6 +76,7 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
76
76
 
77
77
  ## client/src/features/agents/components
78
78
 
79
+ - [AgentRoleFields.tsx](../../client/src/features/agents/components/AgentRoleFields.tsx) · [test](../../client/src/features/agents/components/__tests__/AgentRoleFields.test.tsx)
79
80
  - [AgentStudio.tsx](../../client/src/features/agents/components/AgentStudio.tsx)
80
81
  - [AgentsCatalogTab.tsx](../../client/src/features/agents/components/AgentsCatalogTab.tsx)
81
82
  - [AiRefineOverlay.tsx](../../client/src/features/agents/components/AiRefineOverlay.tsx)
@@ -96,6 +97,10 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
96
97
 
97
98
  - [useAgentRefine.ts](../../client/src/features/agents/hooks/useAgentRefine.ts)
98
99
 
100
+ ## client/src/features/agents/lib
101
+
102
+ - [agent-role-metadata.ts](../../client/src/features/agents/lib/agent-role-metadata.ts)
103
+
99
104
  ## client/src/features/agents/pages
100
105
 
101
106
  - [AgentsPage.tsx](../../client/src/features/agents/pages/AgentsPage.tsx)
@@ -106,6 +111,7 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
106
111
  - [CostScatter.tsx](../../client/src/features/analytics/components/CostScatter.tsx) · [test](../../client/src/features/analytics/components/__tests__/CostScatter.test.tsx)
107
112
  - [ExportDropdown.tsx](../../client/src/features/analytics/components/ExportDropdown.tsx) · [test](../../client/src/features/analytics/components/__tests__/ExportDropdown.test.tsx)
108
113
  - [InvocationsTable.tsx](../../client/src/features/analytics/components/InvocationsTable.tsx) · [test](../../client/src/features/analytics/components/__tests__/InvocationsTable.test.tsx)
114
+ - [LegacyWorkflowUsage.tsx](../../client/src/features/analytics/components/LegacyWorkflowUsage.tsx) · [test](../../client/src/features/analytics/components/__tests__/LegacyWorkflowUsage.test.tsx)
109
115
  - [ModelBreakdown.tsx](../../client/src/features/analytics/components/ModelBreakdown.tsx) · [test](../../client/src/features/analytics/components/__tests__/ModelBreakdown.test.tsx)
110
116
  - [PeriodSelector.tsx](../../client/src/features/analytics/components/PeriodSelector.tsx) · [test](../../client/src/features/analytics/components/__tests__/PeriodSelector.test.tsx)
111
117
  - [ProviderBreakdownCard.tsx](../../client/src/features/analytics/components/ProviderBreakdownCard.tsx) · [test](../../client/src/features/analytics/components/__tests__/ProviderBreakdownCard.test.tsx)
@@ -368,6 +374,10 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
368
374
 
369
375
  ## client/src/features/loops/components
370
376
 
377
+ - [CoreParameterForm.tsx](../../client/src/features/loops/components/CoreParameterForm.tsx) · [test](../../client/src/features/loops/components/__tests__/CoreParameterForm.test.tsx)
378
+ - [CoreWorkflowInspector.tsx](../../client/src/features/loops/components/CoreWorkflowInspector.tsx) · [test](../../client/src/features/loops/components/__tests__/CoreWorkflowInspector.test.tsx)
379
+ - [LegacyConversionModal.tsx](../../client/src/features/loops/components/LegacyConversionModal.tsx) · [test](../../client/src/features/loops/components/__tests__/LegacyConversionModal.test.tsx)
380
+ - [LoopMigrationPanel.tsx](../../client/src/features/loops/components/LoopMigrationPanel.tsx) · [test](../../client/src/features/loops/components/__tests__/LoopMigrationPanel.test.tsx)
371
381
  - [LoopPreviewModal.tsx](../../client/src/features/loops/components/LoopPreviewModal.tsx)
372
382
  - [LoopRunModal.tsx](../../client/src/features/loops/components/LoopRunModal.tsx) · [test](../../client/src/features/loops/components/__tests__/LoopRunModal.test.tsx)
373
383
  - [TemplatePreviewModal.tsx](../../client/src/features/loops/components/TemplatePreviewModal.tsx) · [test](../../client/src/features/loops/components/__tests__/TemplatePreviewModal.test.tsx)
@@ -379,14 +389,21 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
379
389
  - [LoopStepExplorer.tsx](../../client/src/features/loops/components/loop-log/LoopStepExplorer.tsx) · [test](../../client/src/features/loops/components/loop-log/__tests__/LoopStepExplorer.test.tsx)
380
390
  - [LoopStepSection.tsx](../../client/src/features/loops/components/loop-log/LoopStepSection.tsx)
381
391
  - [NarratedProgress.tsx](../../client/src/features/loops/components/loop-log/NarratedProgress.tsx) · [test](../../client/src/features/loops/components/loop-log/__tests__/NarratedProgress.test.tsx)
392
+ - [RuntimeGraphExplorer.tsx](../../client/src/features/loops/components/loop-log/RuntimeGraphExplorer.tsx) · [test](../../client/src/features/loops/components/loop-log/__tests__/RuntimeGraphExplorer.test.tsx)
382
393
  - [completion-model.ts](../../client/src/features/loops/components/loop-log/completion-model.ts)
383
394
  - [loop-log-model.ts](../../client/src/features/loops/components/loop-log/loop-log-model.ts) · [test](../../client/src/features/loops/components/loop-log/__tests__/loop-log-model.test.ts)
384
395
  - [loop-node-visuals.ts](../../client/src/features/loops/components/loop-log/loop-node-visuals.ts)
385
396
  - [narration-commands.ts](../../client/src/features/loops/components/loop-log/narration-commands.ts) · [test](../../client/src/features/loops/components/loop-log/__tests__/narration-commands.test.ts)
386
397
  - [narration-model.ts](../../client/src/features/loops/components/loop-log/narration-model.ts) · [test](../../client/src/features/loops/components/loop-log/__tests__/narration-model.test.ts)
398
+ - [runtime-topology.ts](../../client/src/features/loops/components/loop-log/runtime-topology.ts) · [test](../../client/src/features/loops/components/loop-log/__tests__/runtime-topology.test.ts)
399
+
400
+ ## client/src/features/loops/hooks
401
+
402
+ - [useDefinitionFork.ts](../../client/src/features/loops/hooks/useDefinitionFork.ts) · [test](../../client/src/features/loops/hooks/__tests__/useDefinitionFork.test.ts)
387
403
 
388
404
  ## client/src/features/loops/lib
389
405
 
406
+ - [core-authoring.ts](../../client/src/features/loops/lib/core-authoring.ts) · [test](../../client/src/features/loops/lib/__tests__/core-authoring.test.ts)
390
407
  - [loop-clipboard.ts](../../client/src/features/loops/lib/loop-clipboard.ts) · [test](../../client/src/features/loops/lib/__tests__/loop-clipboard.test.ts)
391
408
  - [loop-export.ts](../../client/src/features/loops/lib/loop-export.ts) · [test](../../client/src/features/loops/lib/__tests__/loop-export.test.ts)
392
409
  - [loop-graph-rf.ts](../../client/src/features/loops/lib/loop-graph-rf.ts) · [test](../../client/src/features/loops/lib/__tests__/loop-graph-rf.test.ts)
@@ -550,6 +567,7 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
550
567
  - [AppearanceSection.tsx](../../client/src/features/settings/components/AppearanceSection.tsx) · [test](../../client/src/features/settings/components/__tests__/AppearanceSection.test.tsx)
551
568
  - [CodeSectionSettings.tsx](../../client/src/features/settings/components/CodeSectionSettings.tsx) · [test](../../client/src/features/settings/components/__tests__/CodeSectionSettings.test.tsx)
552
569
  - [CoreUpdateSection.tsx](../../client/src/features/settings/components/CoreUpdateSection.tsx) · [test](../../client/src/features/settings/components/__tests__/CoreUpdateSection.test.tsx)
570
+ - [CustomRuntimeRoles.tsx](../../client/src/features/settings/components/CustomRuntimeRoles.tsx) · [test](../../client/src/features/settings/components/__tests__/CustomRuntimeRoles.test.tsx)
553
571
  - [EffectsSection.tsx](../../client/src/features/settings/components/EffectsSection.tsx) · [test](../../client/src/features/settings/components/__tests__/EffectsSection.test.tsx)
554
572
  - [ExternalMcpServersCard.tsx](../../client/src/features/settings/components/ExternalMcpServersCard.tsx) · [test](../../client/src/features/settings/components/__tests__/ExternalMcpServersCard.test.tsx)
555
573
  - [LanguageSection.tsx](../../client/src/features/settings/components/LanguageSection.tsx) · [test](../../client/src/features/settings/components/__tests__/LanguageSection.test.tsx)
@@ -565,7 +583,10 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
565
583
  - [RuntimeEfficiencyControls.tsx](../../client/src/features/settings/components/RuntimeEfficiencyControls.tsx)
566
584
  - [RuntimeExecutionEvidence.tsx](../../client/src/features/settings/components/RuntimeExecutionEvidence.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeExecutionEvidence.test.tsx)
567
585
  - [RuntimeGuardrails.tsx](../../client/src/features/settings/components/RuntimeGuardrails.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeGuardrails.test.tsx)
586
+ - [RuntimeRecovery.tsx](../../client/src/features/settings/components/RuntimeRecovery.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeRecovery.test.tsx)
587
+ - [RuntimeRetention.tsx](../../client/src/features/settings/components/RuntimeRetention.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeRetention.test.tsx)
568
588
  - [RuntimeRolePrompts.tsx](../../client/src/features/settings/components/RuntimeRolePrompts.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeRolePrompts.test.tsx)
589
+ - [RuntimeSteering.tsx](../../client/src/features/settings/components/RuntimeSteering.tsx) · [test](../../client/src/features/settings/components/__tests__/RuntimeSteering.test.tsx)
569
590
  - [TerminalSettingsSection.tsx](../../client/src/features/settings/components/TerminalSettingsSection.tsx)
570
591
 
571
592
  ## client/src/features/settings/components/pickers
@@ -788,7 +809,9 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
788
809
  - [check-core-sync.mjs](../../scripts/check-core-sync.mjs) · [test](../../scripts/check-core-sync.test.mjs)
789
810
  - [check-package.mjs](../../scripts/check-package.mjs) · [test](../../scripts/check-package.test.mjs)
790
811
  - [copy-server-assets.mjs](../../scripts/copy-server-assets.mjs)
812
+ - [coverage-shards.mjs](../../scripts/coverage-shards.mjs) · [test](../../scripts/coverage-shards.test.mjs)
791
813
  - [fix-desktop-bundle.mjs](../../scripts/fix-desktop-bundle.mjs)
814
+ - [generate-core-event-fixture.mjs](../../scripts/generate-core-event-fixture.mjs)
792
815
  - [generate-icons.mjs](../../scripts/generate-icons.mjs)
793
816
  - [generate-mobile-types.mjs](../../scripts/generate-mobile-types.mjs)
794
817
  - [generate-source-map.mjs](../../scripts/generate-source-map.mjs) · [test](../../scripts/generate-source-map.test.mjs)
@@ -811,6 +834,7 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
811
834
  - [smoke-windows-installers.ps1](../../scripts/smoke-windows-installers.ps1)
812
835
  - [stage-windows-pty.mjs](../../scripts/stage-windows-pty.mjs) · [test](../../scripts/stage-windows-pty.test.mjs)
813
836
  - [test-scripts.mjs](../../scripts/test-scripts.mjs)
837
+ - [verified-client.mjs](../../scripts/verified-client.mjs) · [test](../../scripts/verified-client.test.mjs)
814
838
  - [verify-chromium-bundle.mjs](../../scripts/verify-chromium-bundle.mjs) · [test](../../scripts/verify-chromium-bundle.test.mjs)
815
839
 
816
840
  ## server / agent
@@ -1026,14 +1050,21 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
1026
1050
  - [agent-runtime-controls-router.ts](../../server/modules/agent-runtime/runtime/agent-runtime-controls-router.ts)
1027
1051
  - [agent-runtime-controls.ts](../../server/modules/agent-runtime/runtime/agent-runtime-controls.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-controls.test.ts)
1028
1052
  - [agent-runtime-effective-config.ts](../../server/modules/agent-runtime/runtime/agent-runtime-effective-config.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-effective-config.test.ts)
1053
+ - [agent-runtime-engines.ts](../../server/modules/agent-runtime/runtime/agent-runtime-engines.ts)
1029
1054
  - [agent-runtime-events.ts](../../server/modules/agent-runtime/runtime/agent-runtime-events.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-events.test.ts)
1030
1055
  - [agent-runtime-history.ts](../../server/modules/agent-runtime/runtime/agent-runtime-history.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-history.test.ts)
1031
1056
  - [agent-runtime-loader.ts](../../server/modules/agent-runtime/runtime/agent-runtime-loader.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-loader.test.ts)
1032
1057
  - [agent-runtime-metrics.ts](../../server/modules/agent-runtime/runtime/agent-runtime-metrics.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-metrics.test.ts)
1058
+ - [agent-runtime-package-gc.ts](../../server/modules/agent-runtime/runtime/agent-runtime-package-gc.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-package-gc.test.ts)
1059
+ - [agent-runtime-package-lock.ts](../../server/modules/agent-runtime/runtime/agent-runtime-package-lock.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-package-lock.test.ts)
1033
1060
  - [agent-runtime-package.ts](../../server/modules/agent-runtime/runtime/agent-runtime-package.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-package.test.ts)
1034
1061
  - [agent-runtime-paths.ts](../../server/modules/agent-runtime/runtime/agent-runtime-paths.ts)
1035
1062
  - [agent-runtime-recovery.ts](../../server/modules/agent-runtime/runtime/agent-runtime-recovery.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-recovery.test.ts)
1036
1063
  - [agent-runtime-repositories.ts](../../server/modules/agent-runtime/runtime/agent-runtime-repositories.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-repositories.test.ts)
1064
+ - [agent-runtime-retention-host.ts](../../server/modules/agent-runtime/runtime/agent-runtime-retention-host.ts)
1065
+ - [agent-runtime-retention-quarantine.ts](../../server/modules/agent-runtime/runtime/agent-runtime-retention-quarantine.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-retention-quarantine.test.ts)
1066
+ - [agent-runtime-retention-records.ts](../../server/modules/agent-runtime/runtime/agent-runtime-retention-records.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-retention-records.test.ts)
1067
+ - [agent-runtime-retention.ts](../../server/modules/agent-runtime/runtime/agent-runtime-retention.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-retention.test.ts)
1037
1068
  - [agent-runtime-settings-router.ts](../../server/modules/agent-runtime/runtime/agent-runtime-settings-router.ts)
1038
1069
  - [agent-runtime-settings.ts](../../server/modules/agent-runtime/runtime/agent-runtime-settings.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-settings.test.ts)
1039
1070
  - [agent-runtime-settlement.ts](../../server/modules/agent-runtime/runtime/agent-runtime-settlement.ts) · [test](../../server/modules/agent-runtime/runtime/agent-runtime-settlement.test.ts)
@@ -1041,10 +1072,12 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
1041
1072
 
1042
1073
  ## server/modules/agents/runtime
1043
1074
 
1075
+ - [agent-catalog.ts](../../server/modules/agents/runtime/agent-catalog.ts)
1044
1076
  - [agent-defaults.ts](../../server/modules/agents/runtime/agent-defaults.ts) · [test](../../server/modules/agents/runtime/agent-defaults.test.ts)
1045
1077
  - [agent-generator.ts](../../server/modules/agents/runtime/agent-generator.ts) · [test](../../server/modules/agents/runtime/agent-generator.test.ts)
1046
1078
  - [agent-refine-db.ts](../../server/modules/agents/runtime/agent-refine-db.ts) · [test](../../server/modules/agents/runtime/agent-refine-db.test.ts)
1047
1079
  - [agent-refine-manager.ts](../../server/modules/agents/runtime/agent-refine-manager.ts) · [test](../../server/modules/agents/runtime/agent-refine-manager.test.ts)
1080
+ - [agent-role-descriptor.ts](../../server/modules/agents/runtime/agent-role-descriptor.ts) · [test](../../server/modules/agents/runtime/agent-role-descriptor.test.ts)
1048
1081
  - [agent-store.ts](../../server/modules/agents/runtime/agent-store.ts)
1049
1082
  - [profile-manager.ts](../../server/modules/agents/runtime/profile-manager.ts) · [test](../../server/modules/agents/runtime/profile-manager.test.ts)
1050
1083
  - [profiles-router.ts](../../server/modules/agents/runtime/profiles-router.ts) · [test](../../server/modules/agents/runtime/profiles-router.test.ts)
@@ -1137,7 +1170,10 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
1137
1170
  ## server/modules/delivery/runtime
1138
1171
 
1139
1172
  - [active-pr-continuation.ts](../../server/modules/delivery/runtime/active-pr-continuation.ts) · [test](../../server/modules/delivery/runtime/active-pr-continuation.test.ts)
1173
+ - [definition-fork.ts](../../server/modules/delivery/runtime/definition-fork.ts) · [test](../../server/modules/delivery/runtime/definition-fork.test.ts)
1140
1174
  - [delivery-evidence.ts](../../server/modules/delivery/runtime/delivery-evidence.ts) · [test](../../server/modules/delivery/runtime/delivery-evidence.test.ts)
1175
+ - [isolated-settlement-reconstruction.ts](../../server/modules/delivery/runtime/isolated-settlement-reconstruction.ts) · [test](../../server/modules/delivery/runtime/isolated-settlement-reconstruction.test.ts)
1176
+ - [isolated-settlement-store.ts](../../server/modules/delivery/runtime/isolated-settlement-store.ts)
1141
1177
  - [merge-manager.ts](../../server/modules/delivery/runtime/merge-manager.ts) · [test](../../server/modules/delivery/runtime/merge-manager.test.ts)
1142
1178
  - [multi-repo-bases.ts](../../server/modules/delivery/runtime/multi-repo-bases.ts) · [test](../../server/modules/delivery/runtime/multi-repo-bases.test.ts)
1143
1179
  - [multi-repo-checkout.ts](../../server/modules/delivery/runtime/multi-repo-checkout.ts)
@@ -1203,20 +1239,30 @@ match; integration suites may live elsewhere. Use `rg` to find other consumers.
1203
1239
 
1204
1240
  ## server/modules/loops/runtime
1205
1241
 
1242
+ - [builtin-loops.ts](../../server/modules/loops/runtime/builtin-loops.ts) · [test](../../server/modules/loops/runtime/builtin-loops.test.ts)
1243
+ - [definition-cancellation.ts](../../server/modules/loops/runtime/definition-cancellation.ts) · [test](../../server/modules/loops/runtime/definition-cancellation.test.ts)
1244
+ - [legacy-launch-telemetry.ts](../../server/modules/loops/runtime/legacy-launch-telemetry.ts) · [test](../../server/modules/loops/runtime/legacy-launch-telemetry.test.ts)
1206
1245
  - [loop-command-catalog.ts](../../server/modules/loops/runtime/loop-command-catalog.ts) · [test](../../server/modules/loops/runtime/loop-command-catalog.test.ts)
1246
+ - [loop-compat.ts](../../server/modules/loops/runtime/loop-compat.ts) · [test](../../server/modules/loops/runtime/loop-compat.test.ts)
1207
1247
  - [loop-constants.ts](../../server/modules/loops/runtime/loop-constants.ts) · [test](../../server/modules/loops/runtime/loop-constants.test.ts)
1248
+ - [loop-core-factory.ts](../../server/modules/loops/runtime/loop-core-factory.ts) · [test](../../server/modules/loops/runtime/loop-core-factory.test.ts)
1208
1249
  - [loop-decider.ts](../../server/modules/loops/runtime/loop-decider.ts) · [test](../../server/modules/loops/runtime/loop-decider.test.ts)
1250
+ - [loop-definition-controls.ts](../../server/modules/loops/runtime/loop-definition-controls.ts) · [test](../../server/modules/loops/runtime/loop-definition-controls.test.ts)
1251
+ - [loop-definition-events.ts](../../server/modules/loops/runtime/loop-definition-events.ts) · [test](../../server/modules/loops/runtime/loop-definition-events.test.ts)
1252
+ - [loop-definition-recovery.ts](../../server/modules/loops/runtime/loop-definition-recovery.ts) · [test](../../server/modules/loops/runtime/loop-definition-recovery.test.ts)
1253
+ - [loop-definition-run.ts](../../server/modules/loops/runtime/loop-definition-run.ts) · [test](../../server/modules/loops/runtime/loop-definition-run.test.ts)
1254
+ - [loop-definition.ts](../../server/modules/loops/runtime/loop-definition.ts) · [test](../../server/modules/loops/runtime/loop-definition.test.ts)
1209
1255
  - [loop-effect.ts](../../server/modules/loops/runtime/loop-effect.ts) · [test](../../server/modules/loops/runtime/loop-effect.test.ts)
1210
1256
  - [loop-executors.ts](../../server/modules/loops/runtime/loop-executors.ts) · [test](../../server/modules/loops/runtime/loop-executors.test.ts)
1211
1257
  - [loop-factory.ts](../../server/modules/loops/runtime/loop-factory.ts) · [test](../../server/modules/loops/runtime/loop-factory.test.ts)
1212
1258
  - [loop-graph.ts](../../server/modules/loops/runtime/loop-graph.ts) · [test](../../server/modules/loops/runtime/loop-graph.test.ts)
1259
+ - [loop-migration.ts](../../server/modules/loops/runtime/loop-migration.ts)
1213
1260
  - [loop-preview.ts](../../server/modules/loops/runtime/loop-preview.ts) · [test](../../server/modules/loops/runtime/loop-preview.test.ts)
1214
1261
  - [loop-role-engines.ts](../../server/modules/loops/runtime/loop-role-engines.ts) · [test](../../server/modules/loops/runtime/loop-role-engines.test.ts)
1215
1262
  - [loop-run-manager.ts](../../server/modules/loops/runtime/loop-run-manager.ts) · [test](../../server/modules/loops/runtime/loop-run-manager.test.ts)
1216
1263
  - [loop-runs-store.ts](../../server/modules/loops/runtime/loop-runs-store.ts) · [test](../../server/modules/loops/runtime/loop-runs-store.test.ts)
1217
1264
  - [loop-shell-invocation.ts](../../server/modules/loops/runtime/loop-shell-invocation.ts)
1218
1265
  - [loop-step-idle.ts](../../server/modules/loops/runtime/loop-step-idle.ts) · [test](../../server/modules/loops/runtime/loop-step-idle.test.ts)
1219
- - [loop-templates-ported.ts](../../server/modules/loops/runtime/loop-templates-ported.ts)
1220
1266
  - [loop-templates.ts](../../server/modules/loops/runtime/loop-templates.ts) · [test](../../server/modules/loops/runtime/loop-templates.test.ts)
1221
1267
  - [loops-router.ts](../../server/modules/loops/runtime/loops-router.ts) · [test](../../server/modules/loops/runtime/loops-router.test.ts)
1222
1268
  - [loops-store.ts](../../server/modules/loops/runtime/loops-store.ts) · [test](../../server/modules/loops/runtime/loops-store.test.ts)
package/docs/kimi.md CHANGED
@@ -180,9 +180,9 @@ or read-only behavior.
180
180
  | Project Chat and Agent Chat | Text, tools, errors, cancellation, session resume, attachments, and proposals use a fresh owned `kimi -p` process per turn. |
181
181
  | Explore | Conversation and proposal/draft work are available under Kimi's autonomous prompt-mode policy. It is not a filesystem sandbox. |
182
182
  | Quick Launcher | Agentic commands such as `/opsx:ff` are available. This is distinct from the pure-output **Quick Spec** form. |
183
- | Rails | Implement, Batch, Freestyle, retry/rerun, worktree isolation, cancellation, and ask-first PR delivery use Core's Kimi skills. |
183
+ | Rails | Implement, Freestyle, retry/rerun, worktree isolation, cancellation, and ask-first PR delivery use Core's Kimi skills. |
184
184
  | Loops | Built-in and custom loops are available when the graph has no **Loop Decider**. AI and shell steps keep their normal agentic semantics. |
185
- | Project Builder delivery | Selecting Kimi as a target project provider and launching an already committed milestone through its Batch rail are available. Blueprint and milestone generation are not. |
185
+ | Project Builder delivery | Selecting Kimi as a target project provider and launching an already committed milestone through its rails (one spec per rail) are available. Blueprint and milestone generation are not. |
186
186
  | Profiles and roles | Provider-scoped profiles, exact Kimi models, per-role routing, and manual `custom-*` role creation/editing/execution are available. |
187
187
  | MCP and integrations | Project `.kimi-code/mcp.json`, the Desktop bridge, provider-scoped plugins, and Serena are available through additive merges. |
188
188
  | Terminal and attachments | The integrated terminal launches the external CLI. Text and validated image references are available; Kimi reads images with `ReadMediaFile`. |
@@ -45,7 +45,7 @@ without any of this.
45
45
 
46
46
  | Surface | How the local engine executes |
47
47
  |---|---|
48
- | Rails: implement / batch / custom loops | specrails-core's programmatic runtime, all three roles on the connection (`OpenAICompatibleExecutor`) |
48
+ | Rails: implement / custom loops | specrails-core's programmatic runtime, all three roles on the connection (`OpenAICompatibleExecutor`) |
49
49
  | Rails: freestyle, verify / fix / decider steps, loop ai-steps | the bundled **local agent runner** |
50
50
  | Add Spec Quick + Explore, sidebar chat | the local agent runner (read-only tool set for Explore) |
51
51
  | Agent chat / missions | the local agent runner with the Specrails MCP bridge + your enabled external MCP servers |
@@ -23,7 +23,7 @@ A **rail** is an execution lane. Drag a spec card from the SpecsBoard onto a rai
23
23
 
24
24
  Rails default to the project's primary provider. If several are installed, a
25
25
  per-rail engine selector can launch on **Claude**, **Codex**, **Gemini**, or
26
- **Kimi** — see [Using Kimi](kimi.md). Implement and Batch run on every
26
+ **Kimi** — see [Using Kimi](kimi.md). Implement runs on every
27
27
  registered provider; Freestyle is offered by Claude and Kimi.
28
28
 
29
29
  > **One job at a time per project.** Each project has a single queue, so within a project only one rail job runs at a time; the rest queue behind it. Real parallelism is **across projects** — open two projects and their rails run independently. See [Running multiple rails](#running-multiple-rails).
@@ -34,7 +34,7 @@ Each rail has a header with:
34
34
 
35
35
  - **Status pill** — `idle`, `running`, or `failed`. (There's no separate "completed" state — a rail returns to `idle` when its job finishes cleanly.)
36
36
  - **Spec list** — the IDs of the specs assigned to this rail. Drag in more, drag out to detach. You can also use the **Move to rail** popover from a spec card; it shows a status dot per rail so you don't push work onto a busy lane.
37
- - **Loop picker** — the **Loop** this rail runs: a built-in (`Implement`, `Batch`, or `Freestyle`) or one of your published custom loops. See [Loops](#loops).
37
+ - **Loop picker** — the **Loop** this rail runs: a built-in (`Implement`, `SDD Quick (OpenSpec)`, or `Freestyle`) or one of your published custom loops. See [Loops](#loops).
38
38
  - **Profile picker** — which agent profile this rail uses. This only appears once the project has **at least one** profile (create them on the Agents page). When present, `No profile` runs the rail in legacy mode.
39
39
  - **Engine selector** — pick which installed provider (Claude, Codex, Gemini,
40
40
  or Kimi) runs this rail. It renders only for multi-provider projects.
@@ -42,13 +42,21 @@ Each rail has a header with:
42
42
 
43
43
  ### Loops
44
44
 
45
- A rail runs a **Loop**, picked in the rail header and persisted per rail. The three **built-in** loops cover the common cases:
45
+ A rail runs a **Loop**, picked in the rail header and persisted per rail. With a compatible Core definition engine, three built-in graphs cover the common cases. Older Core installations retain their existing factories.
46
46
 
47
- | Built-in loop | Command | What it does |
48
- |------|---------|--------------|
49
- | **Implement** | `/specrails:implement` | One job covering all the specs on the rail. Runs the full Architect → Developer → Reviewer → Ship pipeline. |
50
- | **Batch** | `/specrails:batch-implement` | One job that works through the rail's specs sequentially, in dependency-aware waves. |
51
- | **Freestyle** | (Freestyle) | A provider with native Freestyle capability implements each spec autonomously, bypassing the OpenSpec pipeline. Claude and Kimi support it. |
47
+ | Built-in loop | What it does |
48
+ |------|--------------|
49
+ | **Implement** | Native Architect → Developer → Verify → Reviewer → Archive, with acceptance and verification required for delivery. |
50
+ | **Quick SDD** | Prepare an OpenSpec change, validate it, apply it, verify, archive and verify again. The `revision` and `openspec` aliases remain valid. |
51
+ | **Freestyle** | Implement directly, run configured checks, ask a read-only decider whether every requirement is met, and fix/recheck when necessary. |
52
+
53
+ The Core palette also offers role turns, questions, approvals, gates, reusable
54
+ components, maps and joins. Drag a piece onto the canvas, connect its named
55
+ outcomes, then edit its parameters. Role turns select from the project's role
56
+ library. The `loop-decider` role inherits the selected review engine and has read
57
+ access with no artifact writes or OpenSpec requirement; its engine and prompt can
58
+ be explicitly configured. A printed `VERIFICATION: PASS` never replaces host-run
59
+ checks. The eight starter templates use these same Core pieces when supported.
52
60
 
53
61
  Beyond the built-ins, the **Loops** section (left sidebar, above the project list) is a global, n8n-style **visual builder** shared across all your projects. A loop is a graph of typed steps:
54
62
 
@@ -57,14 +65,14 @@ Beyond the built-ins, the **Loops** section (left sidebar, above the project lis
57
65
  - **Loop Decider** — an AI node that, each iteration, decides **continue** (loop back) or **stop** (exit) based on a goal you write — e.g. *“the verification step reported VERIFICATION: PASS”*. This is what powers autonomous **verify → fix → verify until green** loops.
58
66
  - **Start / End** — entry and terminal nodes.
59
67
 
60
- Each run is bounded by **max iterations**, a wall-clock **timeout**, and an optional **cost cap** (USD, checked between steps). The builder also has live validation, a dry-run preview (resolve every step's exact text without spawning), import/export to JSON, and copy/paste of steps across loops. **Fork** a built-in to start from a working graph, then **Publish** to make a loop selectable on any rail.
68
+ Each run is bounded by **max iterations**, a wall-clock **timeout**, and an optional **cost cap** (USD, checked between steps). The builder also has live validation, a dry-run preview (resolve every step's exact text without spawning), import/export to JSON, and copy/paste of steps across loops. **Publish** makes a loop selectable on any rail. Built-ins are editable loops too: edit one in place and publish it to change that built-in for every rail, agent-chat launch and Companion launch that uses it (rails keep the last published version while your edit is a Draft); **Restore original** resets it and **Duplicate** copies it into a separate loop. Built-ins cannot be deleted.
61
69
 
62
- Kimi runs built-in and custom loops whose graph contains AI/shell steps but no
70
+ On the legacy traversal, Kimi runs built-in and custom loops whose graph contains AI/shell steps but no
63
71
  **Loop Decider**. A Decider's constrained `continue`/`stop` verdict is a
64
72
  pure-output action; Kimi 0.27 `-p` cannot enforce the required no-tools
65
73
  boundary, so Kimi + Decider is rejected before the loop starts.
66
74
 
67
- > Loop runs stream live in the Jobs view like any rail job — and the Job Detail view groups a loop's log **by step**: a live chip map of the graph on top, one collapsible section per step below, with follow mode tracking the running step. Provider/model/effort are governed by the **rail**, not the loop's steps.
75
+ > Loop runs stream live in the Jobs view, grouped by scoped attempts. Core runs also expose their nested graph. Project role settings apply unless a deliberate launch override selects an engine for the run. Legacy profile routing and orchestrator settings remain available for older workflows.
68
76
 
69
77
  ### Pipeline phases
70
78
 
@@ -72,8 +80,8 @@ Core versions that declare the shared execution runtime also keep a durable
72
80
  journal for each run. Desktop freezes the selected specs, repository roots and
73
81
  ownership in `.specrails/pipeline/<runId>/desktop-context.json`; Core owns the
74
82
  separate normalized context, phase state and verification receipts. Retries keep
75
- valid completed work and resume the first incomplete or invalid phase. A batch
76
- uses one aggregate change, retaining each ticket's requirements and repository
83
+ valid completed work and resume the first incomplete or invalid phase. A multi-spec
84
+ implement run uses one aggregate change, retaining each ticket's requirements and repository
77
85
  scope.
78
86
 
79
87
  Verification can reuse an actual successful command receipt only when its scope,
@@ -82,7 +90,7 @@ are still required, and confidence must pass before archive. A new verification
82
90
  step checks receipt freshness again before reporting success. Older Core versions
83
91
  continue through the ordinary verification path.
84
92
 
85
- `Implement` and `Batch` run the pipeline phases defined by the slash command's frontmatter — by default:
93
+ `Implement` runs the pipeline phases defined by the slash command's frontmatter — by default:
86
94
 
87
95
  ```
88
96
  Architect ──► Developer ──► Reviewer ──► Ship
@@ -286,13 +294,13 @@ specrails-core's installer also guarantees it never touches `.specrails/plugins/
286
294
 
287
295
  ## Running many specs at once
288
296
 
289
- Want a whole batch of specs to run from one rail? Use the **Batch** loop:
297
+ Want several specs to run from one rail? Use the built-in **Implement** loop:
290
298
 
291
- 1. Drag all the specs you want onto a single rail.
292
- 2. Pick the **Batch** loop on that rail.
299
+ 1. Drag the related specs onto a single rail (keep it to 3 or fewer).
300
+ 2. Keep the **Implement** loop on that rail.
293
301
  3. Press **▶ Play**.
294
302
 
295
- The rail launches one `/specrails:batch-implement` job that works through every assigned spec in dependency-aware waves. Monitor progress on the Jobs page. Because a project runs one job at a time, this is also the way to chain a list of specs without juggling multiple rails.
303
+ The rail launches one `/specrails:implement` job that treats every assigned spec as one aggregate unit of work. For independent specs, spread them across several rails instead — each git-backed rail runs in its own isolated worktree. There is no separate Batch mode any more: rails saved with the old Batch mode run as Implement.
296
304
 
297
305
  ## Stopping everything
298
306
 
@@ -8,7 +8,7 @@ Six surfaces, all per-project:
8
8
 
9
9
  | Surface | What it captures |
10
10
  |---------|------------------|
11
- | **`job`** | Every rail run (the Architect → Developer → Reviewer → Ship pipeline, plus Freestyle and Batch runs) |
11
+ | **`job`** | Every rail run (the Architect → Developer → Reviewer → Ship pipeline, plus Freestyle runs) |
12
12
  | **`quick-spec`** | One-shot Quick spec generation (including a Quick-mode Contract Refine run) |
13
13
  | **`explore-spec`** | Every Explore conversation turn (including the Explore Contract Refine run) |
14
14
  | **`ai-edit`** | The **AI Edit / Refine** overlay (refining an agent or a ticket) |
@@ -178,3 +178,12 @@ For the cross-project view, open **Analytics** from the Arc sidebar on the left.
178
178
  - [Using Codex](codex.md) — how cost works when you run a project on Codex (estimated, ~ tilde).
179
179
  - [Using Gemini](gemini.md) — how cost works when you run a project on Gemini (also estimated, ~ tilde).
180
180
  - [Using Kimi](kimi.md) — why Kimi duration/outcome are recorded while tokens and cost remain unavailable.
181
+
182
+ ## Legacy workflow usage
183
+
184
+ Project Analytics also shows recorded uses of classic loops, queued native
185
+ commands and local merge-back. This card covers all recorded history for the
186
+ project and is independent of spending filters. Refresh its counters to inspect
187
+ recent use; unavailable storage is shown as unavailable, never zero. A zero count
188
+ alone does not prove the two-release observation period required before retiring
189
+ legacy compatibility. These counts are execution observations, not billed costs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specrails-desktop",
3
- "version": "2.57.0",
3
+ "version": "2.58.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,6 +37,7 @@
37
37
  "build:mcp-bridge": "node scripts/build-mcp-bridge.mjs",
38
38
  "build:local-runner": "node scripts/build-local-runner.mjs",
39
39
  "build:desktop": "npm run build:server && cd client && npm run build && cd .. && npm run build:sidecar && npm run build:mcp-bridge && npm run build:local-runner && tauri build",
40
+ "build:desktop:verified": "npm run build:server && npm run build:sidecar && npm run build:mcp-bridge && npm run build:local-runner && tauri build",
40
41
  "assemble-runtimes": "node scripts/assemble-runtimes-local.mjs",
41
42
  "build:desktop:local": "npm run assemble-runtimes && npm run build:desktop",
42
43
  "generate-icons": "tauri icon src-tauri/icons/icon.svg",
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EXPECTED_CORE_CONTRACT_SCHEMA_VERSION = void 0;
6
7
  exports.findCoreContract = findCoreContract;
7
8
  exports.detectCLISync = detectCLISync;
8
9
  exports.detectAvailableCLIs = detectAvailableCLIs;
@@ -18,12 +19,16 @@ const bundled_core_1 = require("./bundled-core");
18
19
  const core_runtime_1 = require("./core-runtime");
19
20
  // Windows has no `which`; probe PATH via `where` instead.
20
21
  const WHICH_CMD = process.platform === 'win32' ? 'where' : 'which';
22
+ /** Paired development target; older supported contracts remain compatible. */
23
+ exports.EXPECTED_CORE_CONTRACT_SCHEMA_VERSION = '5.1';
21
24
  // These must mirror KNOWN_VERBS in cli/specrails-desktop.ts
22
25
  const DESKTOP_KNOWN_COMMANDS = new Set([
23
26
  'implement',
24
- 'batch-implement',
25
27
  'retry',
26
28
  ]);
29
+ // Commands older Cores still ship that Desktop no longer invokes. They are
30
+ // tolerated (not drift) but never required: Batch was folded into implement.
31
+ const DESKTOP_TOLERATED_LEGACY_COMMANDS = new Set(['batch-implement']);
27
32
  function isRecord(value) {
28
33
  return typeof value === 'object' && value !== null && !Array.isArray(value);
29
34
  }
@@ -50,7 +55,7 @@ function isRenderedProviderContract(provider, value) {
50
55
  if (value.updateCommand === 'update' && (!isStringArray(value.cli.updateArgs) || !value.cli.updateArgs.includes('update')))
51
56
  return false;
52
57
  const workflows = value.workflows;
53
- if (!['implement', 'batch-implement', 'retry'].every(name => typeof workflows[name] === 'string' && workflows[name]))
58
+ if (!['implement', 'retry'].every(name => typeof workflows[name] === 'string' && workflows[name]))
54
59
  return false;
55
60
  return provider !== 'kimi' || (value.cli.providerBinary === 'kimi'
56
61
  && value.cli.skillRunner === '.kimi-code/specrails/run-skill.mjs'
@@ -236,7 +241,7 @@ async function checkCoreCompat() {
236
241
  // v3 dropped the `commands` field from the contract — when absent, the
237
242
  // command-set check is a no-op (cannot prove drift either way).
238
243
  const contractCommands = Array.isArray(contract.commands) ? contract.commands : [];
239
- const missingCommands = contractCommands.filter((c) => !DESKTOP_KNOWN_COMMANDS.has(c));
244
+ const missingCommands = contractCommands.filter((c) => !DESKTOP_KNOWN_COMMANDS.has(c) && !DESKTOP_TOLERATED_LEGACY_COMMANDS.has(c));
240
245
  const extraCommands = contract.commands === undefined
241
246
  ? []
242
247
  : [...DESKTOP_KNOWN_COMMANDS].filter((c) => !contractCommands.includes(c));
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkoutSubdirectory = checkoutSubdirectory;
3
4
  exports.prepareCoreExecution = prepareCoreExecution;
4
5
  exports.coreVerificationContext = coreVerificationContext;
5
6
  exports.checkCoreCompletion = checkCoreCompletion;
@@ -25,6 +26,45 @@ function canonicalPath(path) {
25
26
  return (0, node_path_1.join)(canonicalPath(parent), (0, node_path_1.basename)(path));
26
27
  }
27
28
  }
29
+ /** Where a directory sits inside its git checkout: '' for the checkout root or a directory outside git. */
30
+ function checkoutSubdirectory(directory) {
31
+ let start;
32
+ try {
33
+ start = (0, node_fs_1.realpathSync)(directory);
34
+ }
35
+ catch {
36
+ return '';
37
+ }
38
+ for (let current = start;; current = (0, node_path_1.dirname)(current)) {
39
+ if ((0, node_fs_1.existsSync)((0, node_path_1.join)(current, '.git')))
40
+ return (0, node_path_1.relative)(current, start).split(node_path_1.sep).join('/');
41
+ if ((0, node_path_1.dirname)(current) === current)
42
+ return '';
43
+ }
44
+ }
45
+ /**
46
+ * A registered repository may be one package of a larger git checkout (a
47
+ * monorepo app). An isolated worktree always mounts the whole checkout, so the
48
+ * registered directory travels to Core as the repository scope; otherwise Core
49
+ * verifies, edits and reviews every workspace of the checkout.
50
+ */
51
+ function registeredScope(checkout, sourcePath) {
52
+ if (!sourcePath)
53
+ return undefined;
54
+ const prefix = checkoutSubdirectory(sourcePath);
55
+ // Core already receives the registered directory itself when it is not a checkout root.
56
+ if (!prefix || checkoutSubdirectory(checkout) !== '')
57
+ return undefined;
58
+ try {
59
+ return (0, node_fs_1.statSync)((0, node_path_1.join)(checkout, ...prefix.split('/'))).isDirectory() ? [prefix] : undefined;
60
+ }
61
+ catch {
62
+ return undefined;
63
+ }
64
+ }
65
+ function withoutScope(context) {
66
+ return { ...context, repositories: context.repositories.map(({ scope: _scope, ...repository }) => repository) };
67
+ }
28
68
  /** Stable run identity and frozen inputs are shared by every provider and retry.
29
69
  * No cwd/global singleton: two rails in the same workspace get separate files.
30
70
  */
@@ -34,9 +74,13 @@ function prepareCoreExecution(input) {
34
74
  throw new Error('Invalid Core execution run id');
35
75
  const cwd = (0, node_fs_1.realpathSync)(input.cwd);
36
76
  (0, core_update_state_1.assertWorkspaceCoreReady)(cwd);
77
+ const scoped = (repository, sourcePath) => {
78
+ const scope = registeredScope(repository.path, sourcePath);
79
+ return scope ? { ...repository, scope } : repository;
80
+ };
37
81
  const repositories = manifest
38
- ? manifest.repositories.map(repo => ({ id: repo.repositoryId, name: repo.name, path: (0, node_fs_1.realpathSync)(repo.worktreePath), baseSha: repo.baseSha }))
39
- : [{ id: run.repositoryId ?? (run.spec?.repositoryIds?.length === 1 ? run.spec.repositoryIds[0] : run.projectId ? `primary-${run.projectId}` : 'primary'), name: (0, node_path_1.basename)(input.repoDir ?? cwd), path: (0, node_fs_1.realpathSync)(input.repoDir ?? cwd) }];
82
+ ? manifest.repositories.map(repo => scoped({ id: repo.repositoryId, name: repo.name, path: (0, node_fs_1.realpathSync)(repo.worktreePath), baseSha: repo.baseSha }, repo.sourcePath))
83
+ : [scoped({ id: run.repositoryId ?? (run.spec?.repositoryIds?.length === 1 ? run.spec.repositoryIds[0] : run.projectId ? `primary-${run.projectId}` : 'primary'), name: (0, node_path_1.basename)(input.repoDir ?? cwd), path: (0, node_fs_1.realpathSync)(input.repoDir ?? cwd) }, input.sourcePath)];
40
84
  if (!repositories.length || repositories.some(repo => !SAFE_ID.test(repo.id)))
41
85
  throw new Error('Invalid Core repository scope');
42
86
  const artifactRepositoryId = manifest?.artifactRepositoryId ?? repositories[0].id;
@@ -76,7 +120,9 @@ function prepareCoreExecution(input) {
76
120
  catch (error) {
77
121
  if (error.code !== 'EEXIST')
78
122
  throw error;
79
- if ((0, node_fs_1.readFileSync)(contextPath, 'utf8') !== serialized)
123
+ const frozen = (0, node_fs_1.readFileSync)(contextPath, 'utf8');
124
+ // A run admitted before repository scopes existed keeps its frozen whole-checkout context.
125
+ if (frozen !== serialized && frozen !== JSON.stringify(withoutScope(context), null, 2) + '\n')
80
126
  throw new Error('Core execution context changed during an active run; start a new run for changed scope');
81
127
  }
82
128
  const env = { ...input.env, SPECRAILS_EXECUTION_CONTEXT: contextPath };
@@ -1507,6 +1507,107 @@ const MIGRATIONS = [
1507
1507
  if (!cols.includes('spec_addenda'))
1508
1508
  db.exec(`ALTER TABLE rail_pr_deliveries ADD COLUMN spec_addenda TEXT`);
1509
1509
  },
1510
+ // Migration 64: frozen Core definition launches and restart/fork provenance.
1511
+ // Historical runs stay NULL (legacy); no graph is silently migrated to v2.
1512
+ (db) => {
1513
+ const cols = new Set(db.prepare('PRAGMA table_info(loop_runs)').all().map(row => row.name));
1514
+ for (const [name, type] of Object.entries({ run_request_json: 'TEXT', engine_version: 'INTEGER', fork_of: 'TEXT',
1515
+ runtime_metadata_json: 'TEXT', runtime_status_json: 'TEXT', core_revision: 'INTEGER', core_event_cursor: 'INTEGER',
1516
+ fork_cut_json: 'TEXT', restart_reason: 'TEXT' })) {
1517
+ if (!cols.has(name))
1518
+ db.exec(`ALTER TABLE loop_runs ADD COLUMN ${name} ${type}`);
1519
+ }
1520
+ db.exec('CREATE INDEX IF NOT EXISTS idx_loop_runs_fork_of ON loop_runs(fork_of)');
1521
+ },
1522
+ // Migration 65: definition execution claims — the synchronous admission guard
1523
+ // that keeps a v2 run and its forks from writing to one shared worktree at the
1524
+ // same time. A row is a LIVE owner, never a paused run: settlement, cancel and
1525
+ // restart reconciliation delete it. Additive + idempotent.
1526
+ (db) => {
1527
+ db.exec(`
1528
+ CREATE TABLE IF NOT EXISTS definition_execution_claims (
1529
+ run_id TEXT PRIMARY KEY,
1530
+ owner TEXT NOT NULL,
1531
+ repository_mounts_json TEXT NOT NULL,
1532
+ claimed_at TEXT NOT NULL DEFAULT (datetime('now')),
1533
+ heartbeat_at TEXT NOT NULL DEFAULT (datetime('now'))
1534
+ );
1535
+ CREATE INDEX IF NOT EXISTS idx_definition_execution_claims_owner ON definition_execution_claims(owner);
1536
+ `);
1537
+ },
1538
+ // Migration 66: observed legacy launches, independent of release eligibility.
1539
+ (db) => {
1540
+ db.exec(`
1541
+ CREATE TABLE IF NOT EXISTS legacy_launch_events (
1542
+ id TEXT PRIMARY KEY,
1543
+ kind TEXT NOT NULL CHECK (kind IN ('legacy_loop_traversal','queue_manager_slash','merge_back')),
1544
+ project_id TEXT NOT NULL,
1545
+ run_id TEXT,
1546
+ at TEXT NOT NULL
1547
+ );
1548
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_legacy_launch_identity ON legacy_launch_events(kind, run_id) WHERE run_id IS NOT NULL;
1549
+ CREATE INDEX IF NOT EXISTS idx_legacy_launch_at ON legacy_launch_events(at);
1550
+ `);
1551
+ },
1552
+ // Migration 67: original isolated-delivery continuation, admitted before Core starts.
1553
+ (db) => {
1554
+ db.exec(`
1555
+ CREATE TABLE definition_delivery_settlements (
1556
+ delivery_id TEXT NOT NULL REFERENCES rail_pr_deliveries(id),
1557
+ run_id TEXT NOT NULL,
1558
+ project_id TEXT NOT NULL,
1559
+ snapshot_json TEXT NOT NULL,
1560
+ result_json TEXT,
1561
+ provenance_recorded INTEGER NOT NULL DEFAULT 0 CHECK(provenance_recorded IN (0,1)),
1562
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
1563
+ updated_at TEXT NOT NULL DEFAULT (datetime('now')),
1564
+ PRIMARY KEY (delivery_id, run_id)
1565
+ );
1566
+ CREATE INDEX idx_definition_delivery_run ON definition_delivery_settlements(run_id);
1567
+ `);
1568
+ },
1569
+ // Migration 68: durable fork admission and transfer of settlement ownership.
1570
+ (db) => {
1571
+ db.exec(`
1572
+ CREATE TABLE definition_fork_operations (
1573
+ project_id TEXT NOT NULL,
1574
+ source_run_id TEXT NOT NULL REFERENCES loop_runs(id),
1575
+ request_id TEXT NOT NULL,
1576
+ child_run_id TEXT NOT NULL UNIQUE,
1577
+ request_json TEXT NOT NULL,
1578
+ result_json TEXT,
1579
+ adopted INTEGER NOT NULL DEFAULT 0 CHECK(adopted IN (0,1)),
1580
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
1581
+ PRIMARY KEY (project_id, source_run_id, request_id)
1582
+ );
1583
+ CREATE UNIQUE INDEX idx_definition_fork_adopted_source ON definition_fork_operations(source_run_id) WHERE adopted=1;
1584
+ ALTER TABLE definition_delivery_settlements ADD COLUMN superseded_by TEXT;
1585
+ `);
1586
+ },
1587
+ // Migration 69: durable runtime-history expiration, independent of UI dismissal.
1588
+ // The token identifies owned quarantine for restart-safe cleanup; historical
1589
+ // job/loop accounting remains in its original tables.
1590
+ (db) => {
1591
+ db.exec(`
1592
+ CREATE TABLE runtime_retention_policy (
1593
+ id INTEGER PRIMARY KEY CHECK(id=1),
1594
+ days INTEGER CHECK(days IS NULL OR (days BETWEEN 1 AND 3650))
1595
+ );
1596
+ CREATE TABLE runtime_retention_records (
1597
+ run_id TEXT PRIMARY KEY,
1598
+ expired_at TEXT NOT NULL,
1599
+ disposition TEXT NOT NULL CHECK(disposition IN ('settled','discarded')),
1600
+ previous_status TEXT NOT NULL,
1601
+ quarantine_token TEXT NOT NULL UNIQUE,
1602
+ summary_json TEXT NOT NULL
1603
+ );
1604
+ `);
1605
+ },
1606
+ // Migration 70: the Batch rail mode was removed — `implement` already runs
1607
+ // every rail ticket in one aggregate run. Stored batch rails become implement.
1608
+ (db) => {
1609
+ db.exec(`UPDATE rails SET mode='implement' WHERE mode IN ('batch-implement','batch')`);
1610
+ },
1510
1611
  ];
1511
1612
  function applyMigrations(db) {
1512
1613
  // Ensure the migrations table exists (migration 1 creates it, but we need