@shepai/cli 1.65.1 → 1.66.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 (326) hide show
  1. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +1 -1
  2. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts +62 -0
  4. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts.map +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.js +12 -0
  6. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  7. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  9. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +4 -1
  10. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/container.js +3 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +25 -0
  14. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +1 -1
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +5 -2
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +6 -2
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +11 -7
  21. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +11 -7
  23. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +11 -7
  25. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +57 -0
  26. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -0
  27. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +192 -0
  28. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts +26 -0
  29. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map +1 -0
  30. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.js +59 -0
  31. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts +15 -0
  32. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts.map +1 -0
  33. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.js +52 -0
  34. package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
  35. package/dist/src/presentation/cli/commands/_serve.command.js +2 -0
  36. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts +7 -0
  37. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts.map +1 -0
  38. package/dist/src/presentation/web/app/actions/deploy-feature.js +28 -0
  39. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts +7 -0
  40. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -0
  41. package/dist/src/presentation/web/app/actions/deploy-repository.js +21 -0
  42. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts +3 -0
  43. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts.map +1 -0
  44. package/dist/src/presentation/web/app/actions/get-deployment-status.js +9 -0
  45. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts +5 -0
  46. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts.map +1 -0
  47. package/dist/src/presentation/web/app/actions/stop-deployment.js +16 -0
  48. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +20 -0
  49. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -0
  50. package/dist/src/presentation/web/app/build-graph-nodes.js +142 -0
  51. package/dist/src/presentation/web/app/page.d.ts.map +1 -1
  52. package/dist/src/presentation/web/app/page.js +2 -112
  53. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts +3 -1
  54. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  55. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +13 -3
  56. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +2 -0
  57. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
  58. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.js +9 -0
  59. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts +7 -0
  60. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -0
  61. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +14 -0
  62. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +14 -0
  63. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -0
  64. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.js +27 -0
  65. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts +2 -0
  66. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts.map +1 -0
  67. package/dist/src/presentation/web/components/common/deployment-status-badge/index.js +1 -0
  68. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +8 -1
  70. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +7 -1
  72. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  73. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +13 -2
  74. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.js +12 -2
  76. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts +18 -0
  77. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -0
  78. package/dist/src/presentation/web/hooks/use-deploy-action.js +130 -0
  79. package/dist/src/presentation/web/lib/feature-flags.d.ts +1 -0
  80. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  81. package/dist/src/presentation/web/lib/feature-flags.js +1 -0
  82. package/dist/tsconfig.build.tsbuildinfo +1 -1
  83. package/package.json +1 -1
  84. package/web/.next/BUILD_ID +1 -1
  85. package/web/.next/build-manifest.json +7 -6
  86. package/web/.next/cache/.previewinfo +1 -1
  87. package/web/.next/cache/.rscinfo +1 -1
  88. package/web/.next/cache/.tsbuildinfo +1 -1
  89. package/web/.next/cache/config.json +3 -3
  90. package/web/.next/fallback-build-manifest.json +2 -2
  91. package/web/.next/prerender-manifest.json +3 -3
  92. package/web/.next/required-server-files.js +1 -1
  93. package/web/.next/required-server-files.json +1 -1
  94. package/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  95. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  96. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/_global-error.html +2 -2
  98. package/web/.next/server/app/_global-error.rsc +1 -1
  99. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  100. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  105. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  106. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  107. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  109. package/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  110. package/web/.next/server/app/page/build-manifest.json +5 -4
  111. package/web/.next/server/app/page/server-reference-manifest.json +88 -28
  112. package/web/.next/server/app/page.js +2 -2
  113. package/web/.next/server/app/page.js.nft.json +1 -1
  114. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/skills/page/build-manifest.json +5 -4
  116. package/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  117. package/web/.next/server/app/skills/page.js +2 -2
  118. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  119. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/tools/page/build-manifest.json +5 -4
  121. package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  122. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  123. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/version/page/build-manifest.json +5 -4
  125. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  126. package/web/.next/server/app/version/page.js +1 -1
  127. package/web/.next/server/app/version/page.js.nft.json +1 -1
  128. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  129. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  130. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js.map → [root-of-the-server]__09413611._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  132. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js.map +1 -0
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js.map → [root-of-the-server]__248ee887._.js.map} +1 -1
  137. package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__fbc89707._.js → server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js.map +1 -0
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js.map +1 -0
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js.map +1 -0
  150. package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js.map +1 -0
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js.map +1 -0
  154. package/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  155. package/web/.next/server/chunks/ssr/_28993370._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_380c6567._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  159. package/web/.next/server/chunks/ssr/{_d81184e2._.js.map → _45715073._.js.map} +1 -1
  160. package/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  161. package/web/.next/server/chunks/ssr/_6978d868._.js.map +1 -0
  162. package/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  163. package/web/.next/server/chunks/ssr/_85965278._.js.map +1 -0
  164. package/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  165. package/web/.next/server/chunks/ssr/_c52cace8._.js.map +1 -0
  166. package/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  167. package/web/.next/server/chunks/ssr/_ed9132c9._.js.map +1 -0
  168. package/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  169. package/web/.next/server/chunks/ssr/node_modules__pnpm_febcbea6._.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  171. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  173. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
  174. package/web/.next/server/middleware-build-manifest.js +5 -4
  175. package/web/.next/server/pages/500.html +2 -2
  176. package/web/.next/server/server-reference-manifest.js +1 -1
  177. package/web/.next/server/server-reference-manifest.json +118 -30
  178. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  179. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +7 -6
  180. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  181. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  182. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  183. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  184. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  185. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  186. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  187. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  188. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  189. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  190. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  191. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  192. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  193. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  194. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  195. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  196. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  197. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  198. package/web/.next/standalone/src/presentation/web/.next/server/app/page/build-manifest.json +5 -4
  199. package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +88 -28
  200. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js +2 -2
  201. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js.nft.json +1 -1
  202. package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
  203. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/build-manifest.json +5 -4
  204. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  205. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js +2 -2
  206. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js.nft.json +1 -1
  207. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  208. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/build-manifest.json +5 -4
  209. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  210. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page.js.nft.json +1 -1
  211. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  212. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/build-manifest.json +5 -4
  213. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  214. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js +1 -1
  215. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
  216. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  217. package/web/.next/standalone/src/presentation/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  218. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  219. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  220. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
  221. package/web/.next/{server/chunks/ssr/[root-of-the-server]__fbc89707._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
  222. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  223. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  224. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  225. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  226. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  227. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  228. package/web/.next/{server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
  229. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  230. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  231. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  232. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  233. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  234. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  235. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  236. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  237. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  238. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  239. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  240. package/web/.next/standalone/src/presentation/web/.next/server/middleware-build-manifest.js +5 -4
  241. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  242. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  243. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +118 -30
  244. package/web/.next/standalone/src/presentation/web/app/actions/deploy-feature.ts +39 -0
  245. package/web/.next/standalone/src/presentation/web/app/actions/deploy-repository.ts +28 -0
  246. package/web/.next/standalone/src/presentation/web/app/actions/get-deployment-status.ts +16 -0
  247. package/web/.next/standalone/src/presentation/web/app/actions/stop-deployment.ts +22 -0
  248. package/web/.next/standalone/src/presentation/web/app/build-graph-nodes.ts +180 -0
  249. package/web/.next/standalone/src/presentation/web/app/page.tsx +2 -129
  250. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.stories.tsx +26 -0
  251. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +45 -1
  252. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.tsx +35 -0
  253. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.tsx +42 -0
  254. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/index.ts +1 -0
  255. package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/feature-drawer.tsx +10 -0
  256. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-drawer.tsx +9 -0
  257. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-node.tsx +43 -2
  258. package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.tsx +79 -44
  259. package/web/.next/standalone/src/presentation/web/hooks/use-deploy-action.ts +161 -0
  260. package/web/.next/standalone/src/presentation/web/lib/feature-flags.ts +1 -0
  261. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  262. package/web/.next/static/chunks/0b99eb9664d47ca7.js +1 -0
  263. package/web/.next/static/chunks/177f1dcbe83c136a.js +1 -0
  264. package/web/.next/static/chunks/41a2adc09edfffaf.js +1 -0
  265. package/web/.next/static/chunks/5054c72b1c8f5912.js +1 -0
  266. package/web/.next/static/chunks/71d2618e41d7da6d.js +1 -0
  267. package/web/.next/static/chunks/7ad36bef63f15bc6.js +1 -0
  268. package/web/.next/static/chunks/{3b941e59ac013e12.js → 87421ab1062a39b7.js} +2 -2
  269. package/web/.next/static/chunks/{21541b346dd4dd28.js → 8c60d1bd87239066.js} +1 -1
  270. package/web/.next/static/chunks/96f49affaceab206.css +2 -0
  271. package/web/.next/static/chunks/a6d1d774260fc927.js +2 -0
  272. package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
  273. package/web/.next/static/chunks/f54ff9c15fb7b383.js +1 -0
  274. package/web/.next/static/chunks/f5fb2f182ae9b015.js +1 -0
  275. package/web/.next/static/chunks/{15f4f62844c3ea0e.js → f6766e799a69fb5d.js} +7 -7
  276. package/web/.next/static/chunks/turbopack-b6b5b4f015327a9a.js +4 -0
  277. package/web/.next/trace +1 -1
  278. package/web/.next/trace-build +1 -1
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js.map +0 -1
  281. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js.map +0 -1
  283. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js.map +0 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js.map +0 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js.map +0 -1
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js.map +0 -1
  290. package/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  291. package/web/.next/server/chunks/ssr/_73d14b70._.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  293. package/web/.next/server/chunks/ssr/_7f386377._.js.map +0 -1
  294. package/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  295. package/web/.next/server/chunks/ssr/_d3711354._.js.map +0 -1
  296. package/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  297. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  298. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/node_modules__pnpm_87f920e7._.js.map +0 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  301. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js.map +0 -1
  302. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  303. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  304. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  305. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  306. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  307. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  308. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  309. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  310. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  311. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  312. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  313. package/web/.next/static/chunks/0c6654ec27f11c7e.js +0 -1
  314. package/web/.next/static/chunks/12c70bfd5951cf9b.js +0 -1
  315. package/web/.next/static/chunks/1887af4ad3781531.js +0 -2
  316. package/web/.next/static/chunks/78919481e7c5ad4f.js +0 -1
  317. package/web/.next/static/chunks/a5b6a22de303e877.css +0 -2
  318. package/web/.next/static/chunks/aa33d2874dacee4a.js +0 -1
  319. package/web/.next/static/chunks/acdb8af5a21f1ae9.js +0 -1
  320. package/web/.next/static/chunks/af7a5bcb7c49e46e.js +0 -1
  321. package/web/.next/static/chunks/be784143669bb992.js +0 -1
  322. package/web/.next/static/chunks/turbopack-eb24b869babb34b4.js +0 -4
  323. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__fbc89707._.js.map → [root-of-the-server]__249c74f6._.js.map} +0 -0
  324. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_buildManifest.js +0 -0
  325. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_clientMiddlewareManifest.json +0 -0
  326. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_ssgManifest.js +0 -0
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { Repository } from '../../../../domain/generated/output.js';
7
7
  export interface IRepositoryRepository {
8
- create(repository: Repository): Promise<void>;
8
+ create(repository: Repository): Promise<Repository>;
9
9
  findById(id: string): Promise<Repository | null>;
10
10
  findByPath(path: string): Promise<Repository | null>;
11
11
  /** Find by path including soft-deleted records (for re-activation). */
@@ -1 +1 @@
1
- {"version":3,"file":"repository-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/repository-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrD,uEAAuE;IACvE,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrE,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC"}
1
+ {"version":3,"file":"repository-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/repository-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrD,uEAAuE;IACvE,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrE,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Deployment Service Interface
3
+ *
4
+ * Output port for managing local dev server deployments.
5
+ * Infrastructure layer provides the concrete DeploymentService implementation
6
+ * backed by an in-memory process registry.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Application layer depends on this interface
10
+ * - Infrastructure layer provides concrete implementations
11
+ */
12
+ import type { DeploymentState } from '../../../../domain/generated/output.js';
13
+ /** Status snapshot returned by getStatus(). */
14
+ export interface DeploymentStatus {
15
+ /** Current lifecycle state of the deployment. */
16
+ state: DeploymentState;
17
+ /** Detected URL when the dev server is Ready, null while Booting. */
18
+ url: string | null;
19
+ }
20
+ /**
21
+ * Port interface for managing local dev server deployments.
22
+ *
23
+ * Implementations must:
24
+ * - Maintain an in-memory registry of active deployments keyed by targetId
25
+ * - Enforce one deployment per target (stop existing before starting new)
26
+ * - Detect the dev script from package.json and spawn via the correct package manager
27
+ * - Parse stdout/stderr for port/URL detection
28
+ * - Support graceful shutdown (SIGTERM → SIGKILL) for individual and bulk stops
29
+ */
30
+ export interface IDeploymentService {
31
+ /**
32
+ * Start a dev server deployment for the given target.
33
+ * If a deployment already exists for this targetId, it is stopped first.
34
+ *
35
+ * @param targetId - Unique identifier for the deployment target (featureId or repositoryId)
36
+ * @param targetPath - Absolute filesystem path to the directory to run the dev server in
37
+ * @returns The initial deployment state (always Booting on success)
38
+ * @throws Error if no dev script is found in package.json or the process fails to spawn
39
+ */
40
+ start(targetId: string, targetPath: string): void;
41
+ /**
42
+ * Stop a running deployment gracefully.
43
+ * Sends SIGTERM to the process group, then SIGKILL after a timeout.
44
+ * No-op if no deployment exists for this targetId.
45
+ *
46
+ * @param targetId - Unique identifier for the deployment target
47
+ */
48
+ stop(targetId: string): Promise<void>;
49
+ /**
50
+ * Get the current deployment status for a target.
51
+ *
52
+ * @param targetId - Unique identifier for the deployment target
53
+ * @returns Status snapshot with state and url, or null if no deployment exists
54
+ */
55
+ getStatus(targetId: string): DeploymentStatus | null;
56
+ /**
57
+ * Force-stop all tracked deployments immediately.
58
+ * Called during daemon shutdown to prevent orphaned dev server processes.
59
+ */
60
+ stopAll(): void;
61
+ }
62
+ //# sourceMappingURL=deployment-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/deployment-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,KAAK,EAAE,eAAe,CAAC;IACvB,qEAAqE;IACrE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD;;;;;;OAMG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAErD;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Deployment Service Interface
3
+ *
4
+ * Output port for managing local dev server deployments.
5
+ * Infrastructure layer provides the concrete DeploymentService implementation
6
+ * backed by an in-memory process registry.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Application layer depends on this interface
10
+ * - Infrastructure layer provides concrete implementations
11
+ */
12
+ export {};
@@ -16,4 +16,5 @@ export type { IGitPrService, CiStatus, CiStatusResult, DiffSummary, MergeStrateg
16
16
  export { GitPrError, GitPrErrorCode } from './git-pr-service.interface.js';
17
17
  export type { IIdeLauncherService, LaunchIdeInput, LaunchIdeResult, LaunchIdeSuccess, LaunchIdeFailed, } from './ide-launcher-service.interface.js';
18
18
  export type { IDaemonService, DaemonState } from './daemon-service.interface.js';
19
+ export type { IDeploymentService, DeploymentStatus } from './deployment-service.interface.js';
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,YAAY,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,YAAY,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,YAAY,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,YAAY,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AACrG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uEAAuE,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAGhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE1E,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAhBZ,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,iBAAiB,EAAE,iBAAiB,EAEpC,YAAY,EAAE,YAAY,EAE1B,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa;IAGxC,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAyJvE"}
1
+ {"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AACrG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uEAAuE,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAGhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE1E,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAhBZ,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,iBAAiB,EAAE,iBAAiB,EAEpC,YAAY,EAAE,YAAY,EAE1B,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa;IAGxC,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA8JvE"}
@@ -127,7 +127,10 @@ let CreateFeatureUseCase = class CreateFeatureUseCase {
127
127
  createdAt: now,
128
128
  updatedAt: now,
129
129
  };
130
- await this.repositoryRepo.create(repository);
130
+ repository = await this.repositoryRepo.create(repository);
131
+ if (!repository) {
132
+ throw new Error(`Failed to create or retrieve repository record for path: ${normalizedPath}`);
133
+ }
131
134
  }
132
135
  const feature = {
133
136
  id: randomUUID(),
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA+GrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAkQrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiHrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAoQrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -25,6 +25,7 @@ import { ToolInstallerServiceImpl } from '../services/tool-installer/tool-instal
25
25
  import { GitPrService } from '../services/git/git-pr.service.js';
26
26
  import { JsonDrivenIdeLauncherService } from '../services/ide-launchers/json-driven-ide-launcher.service.js';
27
27
  import { DaemonPidService } from '../services/daemon/daemon-pid.service.js';
28
+ import { DeploymentService } from '../services/deployment/deployment.service.js';
28
29
  import { AgentExecutorFactory } from '../services/agents/common/agent-executor-factory.service.js';
29
30
  import { AgentExecutorProvider } from '../services/agents/common/agent-executor-provider.service.js';
30
31
  import { StructuredAgentCallerService } from '../services/agents/common/structured-agent-caller.service.js';
@@ -136,6 +137,8 @@ export async function initializeContainer() {
136
137
  container.registerSingleton('IGitPrService', GitPrService);
137
138
  container.registerSingleton('IIdeLauncherService', JsonDrivenIdeLauncherService);
138
139
  container.registerSingleton('IDaemonService', DaemonPidService);
140
+ const deploymentService = new DeploymentService();
141
+ container.registerInstance('IDeploymentService', deploymentService);
139
142
  // Register agent infrastructure
140
143
  container.register('IAgentRunRepository', {
141
144
  useFactory: (c) => {
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AA8W3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAuY3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
@@ -359,6 +359,31 @@ ALTER TABLE features ADD COLUMN ci_fix_history TEXT;
359
359
  add('notif_evt_pr_checks_failed');
360
360
  },
361
361
  },
362
+ {
363
+ version: 23,
364
+ sql: `
365
+ -- Migration 023: Back-fill repositories rows for orphaned features
366
+ -- Inserts a repository row for every distinct repository_path in the features table
367
+ -- that has no matching row in repositories. INSERT OR IGNORE ensures idempotency.
368
+ INSERT OR IGNORE INTO repositories (id, name, path, created_at, updated_at)
369
+ SELECT
370
+ lower(hex(randomblob(16))) AS id,
371
+ CASE
372
+ WHEN instr(repository_path, '/') > 0
373
+ THEN replace(repository_path, rtrim(repository_path, replace(repository_path, '/', '')), '')
374
+ ELSE repository_path
375
+ END AS name,
376
+ repository_path AS path,
377
+ strftime('%s', 'now') * 1000 AS created_at,
378
+ strftime('%s', 'now') * 1000 AS updated_at
379
+ FROM (
380
+ SELECT DISTINCT repository_path
381
+ FROM features
382
+ WHERE repository_path IS NOT NULL AND repository_path != ''
383
+ )
384
+ WHERE repository_path NOT IN (SELECT path FROM repositories WHERE path IS NOT NULL);
385
+ `,
386
+ },
362
387
  ];
363
388
  /**
364
389
  * The latest schema version (highest migration version number).
@@ -9,7 +9,7 @@ import type { Repository } from '../../domain/generated/output.js';
9
9
  export declare class SQLiteRepositoryRepository implements IRepositoryRepository {
10
10
  private readonly db;
11
11
  constructor(db: Database.Database);
12
- create(repository: Repository): Promise<void>;
12
+ create(repository: Repository): Promise<Repository>;
13
13
  findById(id: string): Promise<Repository | null>;
14
14
  findByPath(path: string): Promise<Repository | null>;
15
15
  list(): Promise<Repository[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-repository.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-repository.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gFAAgF,CAAC;AAC5H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAOnE,qBACa,0BAA2B,YAAW,qBAAqB;IAC1D,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMhD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAQpD,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAQ7B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjC,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMpE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOzC"}
1
+ {"version":3,"file":"sqlite-repository.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-repository.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gFAAgF,CAAC;AAC5H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAOnE,qBACa,0BAA2B,YAAW,qBAAqB;IAC1D,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAYnD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMhD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAQpD,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAQ7B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjC,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMpE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOzC"}
@@ -21,11 +21,14 @@ let SQLiteRepositoryRepository = class SQLiteRepositoryRepository {
21
21
  }
22
22
  async create(repository) {
23
23
  const row = toDatabase(repository);
24
- const stmt = this.db.prepare(`
24
+ const insertStmt = this.db.prepare(`
25
25
  INSERT OR IGNORE INTO repositories (id, name, path, created_at, updated_at)
26
26
  VALUES (@id, @name, @path, @created_at, @updated_at)
27
27
  `);
28
- stmt.run(row);
28
+ insertStmt.run(row);
29
+ const selectStmt = this.db.prepare('SELECT * FROM repositories WHERE path = ?');
30
+ const existing = selectStmt.get(row.path);
31
+ return fromDatabase(existing);
29
32
  }
30
33
  async findById(id) {
31
34
  const stmt = this.db.prepare('SELECT * FROM repositories WHERE id = ? AND deleted_at IS NULL');
@@ -1 +1 @@
1
- {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAsBzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1F,YAAY,EAAE,aAAa,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA6M7E"}
1
+ {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAsBzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1F,YAAY,EAAE,aAAa,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAiN7E"}
@@ -131,9 +131,13 @@ export function createMergeNode(deps) {
131
131
  log.info('Merge approved — skipping commit/push/PR, continuing to post-merge');
132
132
  messages.push(`[merge] Approved — continuing`);
133
133
  }
134
- // --- Agent Call 2: Merge (if enabled) ---
134
+ // --- Agent Call 2: Merge ---
135
+ // Merge when: allowMerge is true (auto-merge), OR user explicitly
136
+ // approved at the merge gate (isResumeAfterInterrupt means they
137
+ // clicked Approve). The approval IS permission to merge.
135
138
  let merged = false;
136
- if (state.approvalGates?.allowMerge) {
139
+ const userApprovedMerge = isResumeAfterInterrupt && state._approvalAction !== 'rejected';
140
+ if (state.approvalGates?.allowMerge || userApprovedMerge) {
137
141
  log.info('Agent call 2: merge/squash');
138
142
  const mergePrompt = buildMergeSquashPrompt({ ...state, prUrl, prNumber, commitHash }, branch, baseBranch, remoteAvailable);
139
143
  // Run merge in the ORIGINAL repo, not the worktree — the worktree IS
@@ -1 +1 @@
1
- {"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAqCxD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAyDR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CA0BR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,UAAQ,GAChB,MAAM,CAkER"}
1
+ {"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwCxD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAyDR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CA0BR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,UAAQ,GAChB,MAAM,CAkER"}
@@ -17,18 +17,22 @@ function getMergeRejectionFeedback(specContent) {
17
17
  if (rejectionFeedback && rejectionFeedback.length > 0) {
18
18
  const mergeRejections = rejectionFeedback.filter((e) => e.phase === 'merge');
19
19
  if (mergeRejections.length > 0) {
20
- const entries = mergeRejections
21
- .map((entry) => `- **Iteration ${entry.iteration}** (${entry.timestamp}): ${entry.message}`)
22
- .join('\n');
20
+ const latest = mergeRejections[mergeRejections.length - 1];
21
+ const older = mergeRejections.slice(0, -1);
22
+ const olderSection = older.length > 0
23
+ ? `\n### Earlier feedback (for context only)\n${older.map((e) => `- Iteration ${e.iteration}: ${e.message}`).join('\n')}\n`
24
+ : '';
23
25
  return `
24
- ## Previous Merge Rejection Feedback
26
+ ## ⚠️ CRITICAL — User Rejection Feedback (MUST ADDRESS)
25
27
 
26
- The user has previously rejected this merge with the following feedback. You MUST address these concerns in your revised output:
28
+ **YOUR PRIMARY TASK: The user rejected the previous result and gave this feedback. You MUST act on it:**
27
29
 
28
- ${entries}
30
+ > ${latest.message}
29
31
 
30
- Focus on the most recent feedback (highest iteration number) while ensuring earlier feedback is still addressed.
32
+ (Iteration ${latest.iteration}, ${latest.timestamp})
31
33
 
34
+ Do NOT just record this feedback — you must actually make the changes the user requested.
35
+ ${olderSection}
32
36
  `;
33
37
  }
34
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plan.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAkMhE"}
1
+ {"version":3,"file":"plan.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAqMhE"}
@@ -20,18 +20,22 @@ export function buildPlanPrompt(state) {
20
20
  // Filter to plan-phase rejections only
21
21
  const planRejections = rejectionFeedback.filter((e) => e.phase === 'plan');
22
22
  if (planRejections.length > 0) {
23
- const entries = planRejections
24
- .map((entry) => `- **Iteration ${entry.iteration}** (${entry.timestamp}): ${entry.message}`)
25
- .join('\n');
23
+ const latest = planRejections[planRejections.length - 1];
24
+ const older = planRejections.slice(0, -1);
25
+ const olderSection = older.length > 0
26
+ ? `\n### Earlier feedback (for context only)\n${older.map((e) => `- Iteration ${e.iteration}: ${e.message}`).join('\n')}\n`
27
+ : '';
26
28
  rejectionFeedbackSection = `
27
- ## Previous Plan Rejection Feedback
29
+ ## ⚠️ CRITICAL — User Rejection Feedback (MUST ADDRESS)
28
30
 
29
- The user has previously rejected this plan with the following feedback. You MUST address these concerns in your revised output:
31
+ **YOUR PRIMARY TASK: The user rejected the previous result and gave this feedback. You MUST act on it:**
30
32
 
31
- ${entries}
33
+ > ${latest.message}
32
34
 
33
- Focus on the most recent feedback (highest iteration number) while ensuring earlier feedback is still addressed.
35
+ (Iteration ${latest.iteration}, ${latest.timestamp})
34
36
 
37
+ Do NOT just record this feedback — you must actually make the changes the user requested.
38
+ ${olderSection}
35
39
  `;
36
40
  }
37
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"requirements.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAyKxE"}
1
+ {"version":3,"file":"requirements.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CA4KxE"}
@@ -19,18 +19,22 @@ export function buildRequirementsPrompt(state) {
19
19
  // Filter to requirements-phase rejections (or legacy entries without phase)
20
20
  const reqRejections = rejectionFeedback.filter((e) => !e.phase || e.phase === 'requirements');
21
21
  if (reqRejections.length > 0) {
22
- const entries = reqRejections
23
- .map((entry) => `- **Iteration ${entry.iteration}** (${entry.timestamp}): ${entry.message}`)
24
- .join('\n');
22
+ const latest = reqRejections[reqRejections.length - 1];
23
+ const older = reqRejections.slice(0, -1);
24
+ const olderSection = older.length > 0
25
+ ? `\n### Earlier feedback (for context only)\n${older.map((e) => `- Iteration ${e.iteration}: ${e.message}`).join('\n')}\n`
26
+ : '';
25
27
  rejectionFeedbackSection = `
26
- ## Previous Rejection Feedback
28
+ ## ⚠️ CRITICAL — User Rejection Feedback (MUST ADDRESS)
27
29
 
28
- The user has previously rejected this PRD with the following feedback. You MUST address these concerns in your revised output:
30
+ **YOUR PRIMARY TASK: The user rejected the previous result and gave this feedback. You MUST act on it:**
29
31
 
30
- ${entries}
32
+ > ${latest.message}
31
33
 
32
- Focus on the most recent feedback (highest iteration number) while ensuring earlier feedback is still addressed.
34
+ (Iteration ${latest.iteration}, ${latest.timestamp})
33
35
 
36
+ Do NOT just record this feedback — you must actually make the changes the user requested.
37
+ ${olderSection}
34
38
  `;
35
39
  }
36
40
  }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Deployment Service
3
+ *
4
+ * Infrastructure service that manages local dev server deployments.
5
+ * Holds an in-memory Map of active deployments keyed by targetId.
6
+ * Handles process spawning, stdout-based port detection, and graceful
7
+ * shutdown (SIGTERM → poll → SIGKILL).
8
+ */
9
+ import { spawn } from 'node:child_process';
10
+ import type { IDeploymentService, DeploymentStatus } from '../../../application/ports/output/services/deployment-service.interface.js';
11
+ import { detectDevScript } from './detect-dev-script.js';
12
+ export interface DeploymentServiceDeps {
13
+ spawn: typeof spawn;
14
+ detectDevScript: typeof detectDevScript;
15
+ kill: (pid: number, signal: NodeJS.Signals | string) => void;
16
+ isAlive: (pid: number) => boolean;
17
+ }
18
+ export declare class DeploymentService implements IDeploymentService {
19
+ private readonly deployments;
20
+ private readonly deps;
21
+ constructor(deps?: Partial<DeploymentServiceDeps>);
22
+ /**
23
+ * Start a deployment for the given target.
24
+ * If a deployment already exists for this target, it is stopped first.
25
+ */
26
+ start(targetId: string, targetPath: string): void;
27
+ /**
28
+ * Get the current deployment status for a target.
29
+ * Returns null if no deployment exists for this target.
30
+ */
31
+ getStatus(targetId: string): DeploymentStatus | null;
32
+ /**
33
+ * Stop a deployment gracefully: SIGTERM → poll → SIGKILL.
34
+ */
35
+ stop(targetId: string): Promise<void>;
36
+ /**
37
+ * Force-stop all tracked deployments immediately (for daemon shutdown).
38
+ */
39
+ stopAll(): void;
40
+ /**
41
+ * Send SIGKILL to a process group.
42
+ */
43
+ private killProcess;
44
+ /**
45
+ * Attach a line-buffered listener on stdout or stderr that calls parsePort.
46
+ */
47
+ private attachOutputListener;
48
+ /**
49
+ * Poll until a process is dead or timeout expires.
50
+ */
51
+ private pollUntilDead;
52
+ /**
53
+ * Wait for a child process to emit 'exit', with a short timeout.
54
+ */
55
+ private waitForExit;
56
+ }
57
+ //# sourceMappingURL=deployment.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/deployment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAgBzD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnC;AAgBD,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;gBAEjC,IAAI,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAIrD;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAmDjD;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAMpD;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;OAEG;IACH,OAAO,CAAC,WAAW;IAQnB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA0B5B;;OAEG;YACW,aAAa;IAW3B;;OAEG;IACH,OAAO,CAAC,WAAW;CASpB"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Deployment Service
3
+ *
4
+ * Infrastructure service that manages local dev server deployments.
5
+ * Holds an in-memory Map of active deployments keyed by targetId.
6
+ * Handles process spawning, stdout-based port detection, and graceful
7
+ * shutdown (SIGTERM → poll → SIGKILL).
8
+ */
9
+ import { spawn } from 'node:child_process';
10
+ import { DeploymentState } from '../../../domain/generated/output.js';
11
+ import { detectDevScript } from './detect-dev-script.js';
12
+ import { parsePort } from './parse-port.js';
13
+ const POLL_INTERVAL_MS = 200;
14
+ const MAX_WAIT_MS = 5000;
15
+ const defaultDeps = {
16
+ spawn,
17
+ detectDevScript,
18
+ kill: (pid, signal) => process.kill(pid, signal),
19
+ isAlive: (pid) => {
20
+ try {
21
+ process.kill(pid, 0);
22
+ return true;
23
+ }
24
+ catch {
25
+ return false;
26
+ }
27
+ },
28
+ };
29
+ export class DeploymentService {
30
+ deployments = new Map();
31
+ deps;
32
+ constructor(deps = {}) {
33
+ this.deps = { ...defaultDeps, ...deps };
34
+ }
35
+ /**
36
+ * Start a deployment for the given target.
37
+ * If a deployment already exists for this target, it is stopped first.
38
+ */
39
+ start(targetId, targetPath) {
40
+ // Stop any existing deployment for this target
41
+ const existing = this.deployments.get(targetId);
42
+ if (existing) {
43
+ this.killProcess(existing);
44
+ this.deployments.delete(targetId);
45
+ }
46
+ // Detect the dev script
47
+ const detection = this.deps.detectDevScript(targetPath);
48
+ if (!detection.success) {
49
+ throw new Error(detection.error);
50
+ }
51
+ // Build spawn args based on package manager
52
+ const { packageManager, scriptName } = detection;
53
+ const args = packageManager === 'npm' ? ['run', scriptName] : [scriptName];
54
+ const child = this.deps.spawn(packageManager, args, {
55
+ shell: true,
56
+ cwd: targetPath,
57
+ detached: true,
58
+ stdio: ['ignore', 'pipe', 'pipe'],
59
+ });
60
+ if (!child.pid) {
61
+ throw new Error('Failed to spawn dev server: no PID returned');
62
+ }
63
+ const entry = {
64
+ pid: child.pid,
65
+ child: child,
66
+ state: DeploymentState.Booting,
67
+ url: null,
68
+ targetId,
69
+ stdoutBuffer: '',
70
+ stderrBuffer: '',
71
+ };
72
+ this.deployments.set(targetId, entry);
73
+ // Attach stdout/stderr listeners for port detection
74
+ this.attachOutputListener(entry, 'stdout');
75
+ this.attachOutputListener(entry, 'stderr');
76
+ // Clean up on process exit
77
+ child.on('exit', () => {
78
+ this.deployments.delete(targetId);
79
+ });
80
+ }
81
+ /**
82
+ * Get the current deployment status for a target.
83
+ * Returns null if no deployment exists for this target.
84
+ */
85
+ getStatus(targetId) {
86
+ const entry = this.deployments.get(targetId);
87
+ if (!entry)
88
+ return null;
89
+ return { state: entry.state, url: entry.url };
90
+ }
91
+ /**
92
+ * Stop a deployment gracefully: SIGTERM → poll → SIGKILL.
93
+ */
94
+ async stop(targetId) {
95
+ const entry = this.deployments.get(targetId);
96
+ if (!entry)
97
+ return;
98
+ // Send SIGTERM to process group
99
+ try {
100
+ this.deps.kill(-entry.pid, 'SIGTERM');
101
+ }
102
+ catch {
103
+ // Process may already be dead
104
+ this.deployments.delete(targetId);
105
+ return;
106
+ }
107
+ // Wait for the process to exit
108
+ const died = await this.pollUntilDead(entry.pid, MAX_WAIT_MS, POLL_INTERVAL_MS);
109
+ if (!died) {
110
+ // Escalate to SIGKILL
111
+ try {
112
+ this.deps.kill(-entry.pid, 'SIGKILL');
113
+ }
114
+ catch {
115
+ // Process may have exited between check and kill
116
+ }
117
+ }
118
+ // Wait for the exit event to clean up the map
119
+ await this.waitForExit(entry.child);
120
+ }
121
+ /**
122
+ * Force-stop all tracked deployments immediately (for daemon shutdown).
123
+ */
124
+ stopAll() {
125
+ for (const entry of this.deployments.values()) {
126
+ this.killProcess(entry);
127
+ }
128
+ }
129
+ /**
130
+ * Send SIGKILL to a process group.
131
+ */
132
+ killProcess(entry) {
133
+ try {
134
+ this.deps.kill(-entry.pid, 'SIGKILL');
135
+ }
136
+ catch {
137
+ // Process may already be dead
138
+ }
139
+ }
140
+ /**
141
+ * Attach a line-buffered listener on stdout or stderr that calls parsePort.
142
+ */
143
+ attachOutputListener(entry, stream) {
144
+ const bufferKey = stream === 'stdout' ? 'stdoutBuffer' : 'stderrBuffer';
145
+ const childStream = entry.child[stream];
146
+ if (!childStream)
147
+ return;
148
+ childStream.on('data', (chunk) => {
149
+ // Append chunk to buffer
150
+ entry[bufferKey] += chunk.toString();
151
+ // Process complete lines
152
+ const lines = entry[bufferKey].split('\n');
153
+ // Keep the last element (incomplete line) in the buffer
154
+ entry[bufferKey] = lines.pop() ?? '';
155
+ for (const line of lines) {
156
+ if (entry.state !== DeploymentState.Booting)
157
+ break;
158
+ const url = parsePort(line);
159
+ if (url) {
160
+ entry.state = DeploymentState.Ready;
161
+ entry.url = url;
162
+ break;
163
+ }
164
+ }
165
+ });
166
+ }
167
+ /**
168
+ * Poll until a process is dead or timeout expires.
169
+ */
170
+ async pollUntilDead(pid, maxMs, intervalMs) {
171
+ const deadline = Date.now() + maxMs;
172
+ while (Date.now() < deadline) {
173
+ await new Promise((resolve) => setTimeout(resolve, intervalMs));
174
+ if (!this.deps.isAlive(pid)) {
175
+ return true;
176
+ }
177
+ }
178
+ return false;
179
+ }
180
+ /**
181
+ * Wait for a child process to emit 'exit', with a short timeout.
182
+ */
183
+ waitForExit(child) {
184
+ return new Promise((resolve) => {
185
+ const timeout = setTimeout(() => resolve(), 1000);
186
+ child.on('exit', () => {
187
+ clearTimeout(timeout);
188
+ resolve();
189
+ });
190
+ });
191
+ }
192
+ }