@shepai/cli 1.124.0 → 1.126.0-pr394.cbc260a

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 (420) hide show
  1. package/apis/json-schema/FeatureFlags.yaml +5 -0
  2. package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts +11 -0
  3. package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -1
  4. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts +13 -2
  5. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +25 -0
  7. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts +49 -0
  9. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -0
  10. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +188 -0
  11. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts +33 -0
  12. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts.map +1 -0
  13. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.js +77 -0
  14. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  15. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
  16. package/dist/packages/core/src/domain/generated/output.d.ts +4 -0
  17. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/di/container.js +7 -0
  20. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
  21. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
  23. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-feature-flag-adopt-branch.d.ts +10 -0
  24. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-feature-flag-adopt-branch.d.ts.map +1 -0
  25. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-feature-flag-adopt-branch.js +15 -0
  26. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-create-dev-servers-table.d.ts +21 -0
  27. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-create-dev-servers-table.d.ts.map +1 -0
  28. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-create-dev-servers-table.js +32 -0
  29. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts +5 -0
  30. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  31. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +9 -0
  32. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts +1 -0
  33. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
  34. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +8 -0
  35. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
  37. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/ci-watch-fix-loop.d.ts.map +1 -1
  38. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/ci-watch-fix-loop.js +9 -0
  39. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +24 -14
  40. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -1
  41. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +203 -31
  42. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts +0 -6
  43. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts.map +1 -1
  44. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.js +6 -1
  45. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  46. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +7 -2
  47. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +2 -0
  48. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
  49. package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +39 -0
  50. package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts +14 -0
  51. package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts.map +1 -0
  52. package/dist/src/presentation/cli/commands/feat/adopt.command.js +46 -0
  53. package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
  54. package/dist/src/presentation/cli/commands/feat/index.js +3 -1
  55. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts +10 -0
  56. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts.map +1 -0
  57. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.js +32 -0
  58. package/dist/src/presentation/web/app/actions/adopt-branch.d.ts +11 -0
  59. package/dist/src/presentation/web/app/actions/adopt-branch.d.ts.map +1 -0
  60. package/dist/src/presentation/web/app/actions/adopt-branch.js +20 -0
  61. package/dist/src/presentation/web/app/actions/deploy-feature.js +1 -1
  62. package/dist/src/presentation/web/app/actions/deploy-repository.js +1 -1
  63. package/dist/src/presentation/web/app/actions/list-branches.d.ts +6 -0
  64. package/dist/src/presentation/web/app/actions/list-branches.d.ts.map +1 -0
  65. package/dist/src/presentation/web/app/actions/list-branches.js +18 -0
  66. package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
  67. package/dist/src/presentation/web/app/build-feature-node-data.js +1 -0
  68. package/dist/src/presentation/web/app/build-graph-nodes.js +1 -0
  69. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts +20 -0
  70. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts.map +1 -0
  71. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +105 -0
  72. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +38 -0
  73. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts.map +1 -0
  74. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +161 -0
  75. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts +7 -0
  76. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts.map +1 -0
  77. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.js +78 -0
  78. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  79. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +4 -1
  80. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.d.ts.map +1 -1
  81. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.js +4 -0
  82. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -0
  83. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  84. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  85. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +7 -4
  86. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  87. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +12 -3
  88. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  89. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -1
  90. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  91. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
  92. package/dist/src/presentation/web/components/features/settings/notification-settings-section.d.ts.map +1 -1
  93. package/dist/src/presentation/web/components/features/settings/notification-settings-section.js +4 -8
  94. package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.js +3 -3
  95. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  96. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +22 -38
  97. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +3 -3
  98. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
  99. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +16 -3
  100. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -1
  101. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  102. package/dist/src/presentation/web/hooks/feature-flags-context.js +6 -1
  103. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -1
  104. package/dist/src/presentation/web/hooks/use-deploy-action.js +69 -10
  105. package/dist/src/presentation/web/hooks/use-feature-logs.d.ts.map +1 -1
  106. package/dist/src/presentation/web/hooks/use-feature-logs.js +7 -2
  107. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
  108. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  109. package/dist/src/presentation/web/lib/feature-flags.js +5 -0
  110. package/dist/src/presentation/web/lib/layout-with-dagre.js +3 -3
  111. package/dist/tsconfig.build.tsbuildinfo +1 -1
  112. package/package.json +1 -1
  113. package/web/.next/BUILD_ID +1 -1
  114. package/web/.next/app-path-routes-manifest.json +1 -0
  115. package/web/.next/build-manifest.json +4 -4
  116. package/web/.next/fallback-build-manifest.json +2 -2
  117. package/web/.next/prerender-manifest.json +3 -3
  118. package/web/.next/required-server-files.js +3 -3
  119. package/web/.next/required-server-files.json +3 -3
  120. package/web/.next/routes-manifest.json +6 -0
  121. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/app-paths-manifest.json +3 -0
  122. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +18 -0
  123. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/next-font-manifest.json +6 -0
  124. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +1 -0
  125. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +335 -0
  126. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +21 -0
  127. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.map +5 -0
  128. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -0
  129. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +2 -0
  130. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
  131. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +57 -57
  132. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +3 -3
  133. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  134. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  135. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  136. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -69
  137. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
  138. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  139. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
  141. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +69 -69
  142. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
  143. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  144. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
  146. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +53 -53
  147. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +3 -3
  148. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  149. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  150. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
  151. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +57 -57
  152. package/web/.next/server/app/(dashboard)/create/page.js +3 -3
  153. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  154. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  155. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  156. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -69
  157. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
  158. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  159. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  160. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
  161. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +69 -69
  162. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
  163. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  164. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  165. package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
  166. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +53 -53
  167. package/web/.next/server/app/(dashboard)/page.js +3 -3
  168. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  169. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
  171. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +53 -53
  172. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +3 -3
  173. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  174. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  175. package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
  176. package/web/.next/server/app/_global-error/page.js +1 -1
  177. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  178. package/web/.next/server/app/_global-error.html +2 -2
  179. package/web/.next/server/app/_global-error.rsc +1 -1
  180. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  181. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  182. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  183. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  184. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  185. package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
  186. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  187. package/web/.next/server/app/_not-found/page.js +1 -1
  188. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  189. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  190. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  191. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  192. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  193. package/web/.next/server/app/settings/page/build-manifest.json +2 -2
  194. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  195. package/web/.next/server/app/settings/page.js +1 -1
  196. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  197. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  198. package/web/.next/server/app/skills/page/build-manifest.json +2 -2
  199. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  200. package/web/.next/server/app/skills/page.js +4 -5
  201. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  202. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  203. package/web/.next/server/app/tools/page/build-manifest.json +2 -2
  204. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  205. package/web/.next/server/app/tools/page.js +2 -3
  206. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  207. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  208. package/web/.next/server/app/version/page/build-manifest.json +2 -2
  209. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  210. package/web/.next/server/app/version/page.js +1 -1
  211. package/web/.next/server/app/version/page.js.nft.json +1 -1
  212. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  213. package/web/.next/server/app-paths-manifest.json +1 -0
  214. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  215. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  216. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  217. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  218. package/web/.next/server/chunks/[root-of-the-server]__dcd4f847._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js +3 -0
  220. package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js.map +1 -0
  221. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js +3 -0
  222. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js.map +1 -0
  223. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  224. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  225. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js +3 -0
  226. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js.map +1 -0
  227. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js +3 -0
  228. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js.map +1 -0
  229. package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js +3 -0
  230. package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js.map +1 -0
  231. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__248b9fc3._.js +3 -0
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__248b9fc3._.js.map +1 -0
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js +4 -0
  235. package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js.map +1 -0
  236. package/web/.next/server/chunks/ssr/{[root-of-the-server]__2dddfea9._.js → [root-of-the-server]__4af0afe0._.js} +2 -2
  237. package/web/.next/server/chunks/ssr/{[root-of-the-server]__2dddfea9._.js.map → [root-of-the-server]__4af0afe0._.js.map} +1 -1
  238. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ed9b909._.js +3 -0
  239. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ed9b909._.js.map +1 -0
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__6677a82c._.js +1 -1
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__6677a82c._.js.map +1 -1
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js +4 -0
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js.map +1 -0
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js +3 -0
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js.map +1 -0
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  253. package/web/.next/server/chunks/ssr/{[root-of-the-server]__4c7486cb._.js → [root-of-the-server]__9bc1434f._.js} +2 -2
  254. package/web/.next/server/chunks/ssr/{[root-of-the-server]__4c7486cb._.js.map → [root-of-the-server]__9bc1434f._.js.map} +1 -1
  255. package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js +4 -0
  256. package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js.map +1 -0
  257. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1262d08._.js +3 -0
  258. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1262d08._.js.map +1 -0
  259. package/web/.next/server/chunks/ssr/[root-of-the-server]__dfc367f2._.js +3 -0
  260. package/web/.next/server/chunks/ssr/[root-of-the-server]__dfc367f2._.js.map +1 -0
  261. package/web/.next/server/chunks/ssr/[root-of-the-server]__e7f61cc6._.js +3 -0
  262. package/web/.next/server/chunks/ssr/[root-of-the-server]__e7f61cc6._.js.map +1 -0
  263. package/web/.next/server/chunks/ssr/[root-of-the-server]__fe48d2dc._.js +3 -0
  264. package/web/.next/server/chunks/ssr/[root-of-the-server]__fe48d2dc._.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/_0067cc45._.js +3 -0
  266. package/web/.next/server/chunks/ssr/_0067cc45._.js.map +1 -0
  267. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  268. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/_4093a637._.js +5 -0
  270. package/web/.next/server/chunks/ssr/_4093a637._.js.map +1 -0
  271. package/web/.next/server/chunks/ssr/_583a83fb._.js +3 -0
  272. package/web/.next/server/chunks/ssr/_583a83fb._.js.map +1 -0
  273. package/web/.next/server/chunks/ssr/_7dca1882._.js +3 -0
  274. package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -0
  275. package/web/.next/server/chunks/ssr/{_0e506641._.js → _918887c5._.js} +2 -2
  276. package/web/.next/server/chunks/ssr/_918887c5._.js.map +1 -0
  277. package/web/.next/server/chunks/ssr/_9f56cf8f._.js +3 -0
  278. package/web/.next/server/chunks/ssr/_9f56cf8f._.js.map +1 -0
  279. package/web/.next/server/chunks/ssr/_a187fd7e._.js +3 -0
  280. package/web/.next/server/chunks/ssr/_a187fd7e._.js.map +1 -0
  281. package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
  282. package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
  283. package/web/.next/server/chunks/ssr/_a5aa6371._.js +9 -0
  284. package/web/.next/server/chunks/ssr/_a5aa6371._.js.map +1 -0
  285. package/web/.next/server/chunks/ssr/_a9f57758._.js +3 -0
  286. package/web/.next/server/chunks/ssr/_a9f57758._.js.map +1 -0
  287. package/web/.next/server/chunks/ssr/_b730ac57._.js +3 -0
  288. package/web/.next/server/chunks/ssr/_b730ac57._.js.map +1 -0
  289. package/web/.next/server/chunks/ssr/{_f84c16ab._.js → _ca985f88._.js} +2 -2
  290. package/web/.next/server/chunks/ssr/{_f84c16ab._.js.map → _ca985f88._.js.map} +1 -1
  291. package/web/.next/server/chunks/ssr/{_1bb131c4._.js → _d4b20e29._.js} +2 -2
  292. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -0
  293. package/web/.next/server/chunks/ssr/_d5206f22._.js +4 -0
  294. package/web/.next/server/chunks/ssr/_d5206f22._.js.map +1 -0
  295. package/web/.next/server/chunks/ssr/_f39a1adb._.js +3 -0
  296. package/web/.next/server/chunks/ssr/{_135edb9c._.js.map → _f39a1adb._.js.map} +1 -1
  297. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  298. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  299. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js +3 -0
  300. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +1 -0
  301. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +3 -0
  302. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +1 -0
  303. package/web/.next/server/chunks/ssr/src_presentation_web_9db47db7._.js +5 -0
  304. package/web/.next/server/chunks/ssr/{src_presentation_web_5f039db1._.js.map → src_presentation_web_9db47db7._.js.map} +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js +3 -0
  306. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js.map +1 -0
  307. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  310. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  311. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  312. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  313. package/web/.next/server/chunks/ssr/src_presentation_web_d447591b._.js +3 -0
  314. package/web/.next/server/chunks/ssr/src_presentation_web_d447591b._.js.map +1 -0
  315. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +3 -0
  316. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -0
  317. package/web/.next/server/chunks/ssr/src_presentation_web_ede4a227._.js +5 -0
  318. package/web/.next/server/chunks/ssr/{src_presentation_web_c4337169._.js.map → src_presentation_web_ede4a227._.js.map} +1 -1
  319. package/web/.next/server/middleware-build-manifest.js +2 -2
  320. package/web/.next/server/pages/500.html +2 -2
  321. package/web/.next/server/server-reference-manifest.js +1 -1
  322. package/web/.next/server/server-reference-manifest.json +493 -323
  323. package/web/.next/static/chunks/01ba448cf76c6014.js +1 -0
  324. package/web/.next/static/chunks/05e9c71e5e4cf531.js +1 -0
  325. package/web/.next/static/chunks/18a2b4684056f84c.js +1 -0
  326. package/web/.next/static/chunks/33d2f67ad4814aba.css +1 -0
  327. package/web/.next/static/chunks/{5b7726ff31c25338.js → 3ada33a2a4ff98c9.js} +2 -2
  328. package/web/.next/static/chunks/410ac44266372b6f.js +1 -0
  329. package/web/.next/static/chunks/5b7f180cc7720fdf.js +1 -0
  330. package/web/.next/static/chunks/7c19a6b91900ce20.js +1 -0
  331. package/web/.next/static/chunks/8080c842b0358904.js +1 -0
  332. package/web/.next/static/chunks/{ed3a602003bcb31b.js → 89aac43287d73b02.js} +1 -1
  333. package/web/.next/static/chunks/9c912c68a5447922.js +1 -0
  334. package/web/.next/static/chunks/a24724c6ad4a288e.js +1 -0
  335. package/web/.next/static/chunks/a8ba3f3e2b0f87aa.js +1 -0
  336. package/web/.next/static/chunks/ab9669444102757d.js +1 -0
  337. package/web/.next/static/chunks/abec065fa72fc75e.js +1 -0
  338. package/web/.next/static/chunks/ae876e7d80026c97.js +1 -0
  339. package/web/.next/static/chunks/b70dd4985a814b27.js +1 -0
  340. package/web/.next/static/chunks/{74fa59dbd04fdfcb.js → c5e851a9786099f1.js} +2 -2
  341. package/web/.next/static/chunks/cd45aed9c46e1bf5.js +11 -0
  342. package/web/.next/static/chunks/d04de4be30ab78ca.js +3 -0
  343. package/web/.next/static/chunks/{turbopack-426d9bc2450816ba.js → turbopack-080e470ea902d0ba.js} +1 -1
  344. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +0 -3
  345. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +0 -1
  346. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +0 -3
  347. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +0 -1
  348. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +0 -3
  349. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +0 -1
  350. package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js +0 -4
  351. package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js.map +0 -1
  352. package/web/.next/server/chunks/ssr/[root-of-the-server]__4993a47c._.js +0 -3
  353. package/web/.next/server/chunks/ssr/[root-of-the-server]__4993a47c._.js.map +0 -1
  354. package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js +0 -3
  355. package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js.map +0 -1
  356. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +0 -3
  357. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +0 -1
  358. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js +0 -3
  359. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js.map +0 -1
  360. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js +0 -3
  361. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +0 -1
  362. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +0 -4
  363. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js.map +0 -1
  364. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js +0 -3
  365. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +0 -1
  366. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +0 -3
  367. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +0 -1
  368. package/web/.next/server/chunks/ssr/_0e506641._.js.map +0 -1
  369. package/web/.next/server/chunks/ssr/_135edb9c._.js +0 -3
  370. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +0 -1
  371. package/web/.next/server/chunks/ssr/_3a4c94e3._.js +0 -3
  372. package/web/.next/server/chunks/ssr/_3a4c94e3._.js.map +0 -1
  373. package/web/.next/server/chunks/ssr/_6d26a08f._.js +0 -3
  374. package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +0 -1
  375. package/web/.next/server/chunks/ssr/_9ac70f88._.js +0 -5
  376. package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +0 -1
  377. package/web/.next/server/chunks/ssr/_b56e7571._.js +0 -3
  378. package/web/.next/server/chunks/ssr/_b56e7571._.js.map +0 -1
  379. package/web/.next/server/chunks/ssr/_b89059c0._.js +0 -3
  380. package/web/.next/server/chunks/ssr/_b89059c0._.js.map +0 -1
  381. package/web/.next/server/chunks/ssr/_cc77a143._.js +0 -3
  382. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +0 -1
  383. package/web/.next/server/chunks/ssr/_e9703421._.js +0 -3
  384. package/web/.next/server/chunks/ssr/_e9703421._.js.map +0 -1
  385. package/web/.next/server/chunks/ssr/_f1a649e3._.js +0 -9
  386. package/web/.next/server/chunks/ssr/_f1a649e3._.js.map +0 -1
  387. package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js +0 -3
  388. package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js.map +0 -1
  389. package/web/.next/server/chunks/ssr/src_presentation_web_164fa933._.js +0 -3
  390. package/web/.next/server/chunks/ssr/src_presentation_web_164fa933._.js.map +0 -1
  391. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +0 -5
  392. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +0 -3
  393. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +0 -1
  394. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +0 -3
  395. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +0 -1
  396. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +0 -3
  397. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +0 -1
  398. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +0 -5
  399. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +0 -3
  400. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +0 -1
  401. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +0 -3
  402. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +0 -1
  403. package/web/.next/static/chunks/0dc102ef519487f5.js +0 -1
  404. package/web/.next/static/chunks/10fc8c2e5ff44bb2.js +0 -1
  405. package/web/.next/static/chunks/303a1217006489b9.js +0 -1
  406. package/web/.next/static/chunks/3925626b99dcd57a.css +0 -1
  407. package/web/.next/static/chunks/4443ee9c7733399b.js +0 -1
  408. package/web/.next/static/chunks/52b56677c842e45f.js +0 -3
  409. package/web/.next/static/chunks/76c038a9d55ca717.js +0 -1
  410. package/web/.next/static/chunks/9d7e0bb6dc2f88ae.js +0 -1
  411. package/web/.next/static/chunks/9db7f24ddea15a4c.js +0 -1
  412. package/web/.next/static/chunks/ac7251026c1e2cdf.js +0 -1
  413. package/web/.next/static/chunks/ad076c0b68dd9971.js +0 -1
  414. package/web/.next/static/chunks/d72044b2826292fe.js +0 -1
  415. package/web/.next/static/chunks/dbbb446493f21874.js +0 -1
  416. package/web/.next/static/chunks/e2ef95d904c360f3.js +0 -1
  417. package/web/.next/static/chunks/eaeabda870a35a9a.js +0 -11
  418. /package/web/.next/static/{Ap_0BUaFHzD8WxrlWsbMg → W_miKk1uDL5R44bTUYFaE}/_buildManifest.js +0 -0
  419. /package/web/.next/static/{Ap_0BUaFHzD8WxrlWsbMg → W_miKk1uDL5R44bTUYFaE}/_clientMiddlewareManifest.json +0 -0
  420. /package/web/.next/static/{Ap_0BUaFHzD8WxrlWsbMg → W_miKk1uDL5R44bTUYFaE}/_ssgManifest.js +0 -0
@@ -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;AAoHrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAiUrE;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;AAqHrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAuUrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -65,6 +65,7 @@ import { ShowFeatureUseCase } from '../../application/use-cases/features/show-fe
65
65
  import { DeleteFeatureUseCase } from '../../application/use-cases/features/delete-feature.use-case.js';
66
66
  import { ResumeFeatureUseCase } from '../../application/use-cases/features/resume-feature.use-case.js';
67
67
  import { StartFeatureUseCase } from '../../application/use-cases/features/start-feature.use-case.js';
68
+ import { AdoptBranchUseCase } from '../../application/use-cases/features/adopt-branch.use-case.js';
68
69
  import { GetFeatureArtifactUseCase } from '../../application/use-cases/features/get-feature-artifact.use-case.js';
69
70
  import { GetResearchArtifactUseCase } from '../../application/use-cases/features/get-research-artifact.use-case.js';
70
71
  import { GetPlanArtifactUseCase } from '../../application/use-cases/features/get-plan-artifact.use-case.js';
@@ -169,6 +170,8 @@ export async function initializeContainer() {
169
170
  container.registerSingleton(AttachmentStorageService);
170
171
  container.register('AttachmentStorageService', { useToken: AttachmentStorageService });
171
172
  const deploymentService = new DeploymentService();
173
+ deploymentService.setDatabase(db);
174
+ deploymentService.recoverAll();
172
175
  container.registerInstance('IDeploymentService', deploymentService);
173
176
  // Register agent infrastructure
174
177
  container.register('IAgentRunRepository', {
@@ -278,6 +281,7 @@ export async function initializeContainer() {
278
281
  container.registerSingleton(DeleteFeatureUseCase);
279
282
  container.registerSingleton(ResumeFeatureUseCase);
280
283
  container.registerSingleton(StartFeatureUseCase);
284
+ container.registerSingleton(AdoptBranchUseCase);
281
285
  container.registerSingleton(GetFeatureArtifactUseCase);
282
286
  container.registerSingleton(GetResearchArtifactUseCase);
283
287
  container.registerSingleton(GetPlanArtifactUseCase);
@@ -328,6 +332,9 @@ export async function initializeContainer() {
328
332
  container.register('StartFeatureUseCase', {
329
333
  useFactory: (c) => c.resolve(StartFeatureUseCase),
330
334
  });
335
+ container.register('AdoptBranchUseCase', {
336
+ useFactory: (c) => c.resolve(AdoptBranchUseCase),
337
+ });
331
338
  container.register('ApproveAgentRunUseCase', {
332
339
  useFactory: (c) => c.resolve(ApproveAgentRunUseCase),
333
340
  });
@@ -71,6 +71,7 @@ export interface SettingsRow {
71
71
  feature_flag_skills: number;
72
72
  feature_flag_env_deploy: number;
73
73
  feature_flag_debug: number;
74
+ feature_flag_adopt_branch: number;
74
75
  }
75
76
  /**
76
77
  * Maps Settings domain object to database row.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAQvE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAInB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAGhC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IAGtB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4BAA4B,EAAE,MAAM,CAAC;IAGrC,iCAAiC,EAAE,MAAM,CAAC;IAG1C,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IAGzB,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,6BAA6B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtC,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAC;IAG/C,mBAAmB,EAAE,MAAM,CAAC;IAG5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,mCAAmC,EAAE,MAAM,CAAC;IAG5C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IAGjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CA4F1D;AAsCD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,QAAQ,CAwFvD"}
1
+ {"version":3,"file":"settings.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAQvE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAInB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAGhC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IAGtB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4BAA4B,EAAE,MAAM,CAAC;IAGrC,iCAAiC,EAAE,MAAM,CAAC;IAG1C,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IAGzB,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,6BAA6B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtC,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAC;IAG/C,mBAAmB,EAAE,MAAM,CAAC;IAG5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,mCAAmC,EAAE,MAAM,CAAC;IAG5C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IAGjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CA6F1D;AAsCD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,QAAQ,CAyFvD"}
@@ -92,6 +92,7 @@ export function toDatabase(settings) {
92
92
  feature_flag_skills: settings.featureFlags?.skills ? 1 : 0,
93
93
  feature_flag_env_deploy: settings.featureFlags?.envDeploy ? 1 : 0,
94
94
  feature_flag_debug: settings.featureFlags?.debug ? 1 : 0,
95
+ feature_flag_adopt_branch: settings.featureFlags?.adoptBranch ? 1 : 0,
95
96
  };
96
97
  }
97
98
  /**
@@ -209,6 +210,7 @@ export function fromDatabase(row) {
209
210
  skills: row.feature_flag_skills === 1,
210
211
  envDeploy: row.feature_flag_env_deploy === 1,
211
212
  debug: row.feature_flag_debug === 1,
213
+ adoptBranch: row.feature_flag_adopt_branch === 1,
212
214
  },
213
215
  // Onboarding (INTEGER → boolean)
214
216
  onboardingComplete: row.onboarding_complete === 1,
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Migration 040: Add feature_flag_adopt_branch column to settings table.
3
+ *
4
+ * Adds the adopt branch feature flag (default 0 = disabled).
5
+ */
6
+ import type { MigrationParams } from 'umzug';
7
+ import type Database from 'better-sqlite3';
8
+ export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
9
+ export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
10
+ //# sourceMappingURL=040-add-feature-flag-adopt-branch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"040-add-feature-flag-adopt-branch.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-feature-flag-adopt-branch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Migration 040: Add feature_flag_adopt_branch column to settings table.
3
+ *
4
+ * Adds the adopt branch feature flag (default 0 = disabled).
5
+ */
6
+ export async function up({ context: db }) {
7
+ const columns = db.pragma('table_info(settings)');
8
+ const existing = new Set(columns.map((c) => c.name));
9
+ if (!existing.has('feature_flag_adopt_branch')) {
10
+ db.exec('ALTER TABLE settings ADD COLUMN feature_flag_adopt_branch INTEGER NOT NULL DEFAULT 0');
11
+ }
12
+ }
13
+ export async function down({ context: db }) {
14
+ void db;
15
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Migration 040: Create dev_servers table.
3
+ *
4
+ * Persists running dev server deployments so they survive page reloads
5
+ * and server restarts. The DeploymentService reconciles on startup by
6
+ * checking PID liveness and cleaning up stale rows.
7
+ *
8
+ * Columns:
9
+ * - target_id TEXT PRIMARY KEY — featureId or repositoryPath
10
+ * - target_type TEXT NOT NULL — 'feature' | 'repository'
11
+ * - pid INTEGER NOT NULL — OS process ID
12
+ * - state TEXT NOT NULL — DeploymentState enum value
13
+ * - url TEXT — detected dev server URL (null while Booting)
14
+ * - target_path TEXT NOT NULL — filesystem path where the dev server runs
15
+ * - started_at INTEGER NOT NULL — unix milliseconds
16
+ */
17
+ import type { MigrationParams } from 'umzug';
18
+ import type Database from 'better-sqlite3';
19
+ export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
20
+ export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
21
+ //# sourceMappingURL=040-create-dev-servers-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"040-create-dev-servers-table.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/040-create-dev-servers-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAY3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Migration 040: Create dev_servers table.
3
+ *
4
+ * Persists running dev server deployments so they survive page reloads
5
+ * and server restarts. The DeploymentService reconciles on startup by
6
+ * checking PID liveness and cleaning up stale rows.
7
+ *
8
+ * Columns:
9
+ * - target_id TEXT PRIMARY KEY — featureId or repositoryPath
10
+ * - target_type TEXT NOT NULL — 'feature' | 'repository'
11
+ * - pid INTEGER NOT NULL — OS process ID
12
+ * - state TEXT NOT NULL — DeploymentState enum value
13
+ * - url TEXT — detected dev server URL (null while Booting)
14
+ * - target_path TEXT NOT NULL — filesystem path where the dev server runs
15
+ * - started_at INTEGER NOT NULL — unix milliseconds
16
+ */
17
+ export async function up({ context: db }) {
18
+ db.exec(`
19
+ CREATE TABLE IF NOT EXISTS dev_servers (
20
+ target_id TEXT PRIMARY KEY,
21
+ target_type TEXT NOT NULL,
22
+ pid INTEGER NOT NULL,
23
+ state TEXT NOT NULL DEFAULT 'Booting',
24
+ url TEXT,
25
+ target_path TEXT NOT NULL,
26
+ started_at INTEGER NOT NULL
27
+ )
28
+ `);
29
+ }
30
+ export async function down({ context: db }) {
31
+ db.exec('DROP TABLE IF EXISTS dev_servers');
32
+ }
@@ -27,5 +27,10 @@ export declare const LATEST_SCHEMA_VERSION = 34;
27
27
  *
28
28
  * @param db - Database instance to run migrations on
29
29
  */
30
+ /**
31
+ * Returns the total number of registered migrations (legacy + discovered).
32
+ * Exported for test assertions so they don't hardcode migration counts.
33
+ */
34
+ export declare function getTotalMigrationCount(): Promise<number>;
30
35
  export declare function runSQLiteMigrations(db: Database.Database): Promise<void>;
31
36
  //# sourceMappingURL=migrations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAoGxC;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAS9E"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAoGxC;;;;;;;;;;;GAWG;AACH;;;GAGG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,CAI9D;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAS9E"}
@@ -115,6 +115,15 @@ function createUmzug(db) {
115
115
  *
116
116
  * @param db - Database instance to run migrations on
117
117
  */
118
+ /**
119
+ * Returns the total number of registered migrations (legacy + discovered).
120
+ * Exported for test assertions so they don't hardcode migration counts.
121
+ */
122
+ export async function getTotalMigrationCount() {
123
+ const migrationsDir = getMigrationsDir();
124
+ const newMigrations = await discoverNewMigrations(migrationsDir);
125
+ return LEGACY_MIGRATIONS.length + newMigrations.length;
126
+ }
118
127
  export async function runSQLiteMigrations(db) {
119
128
  try {
120
129
  const umzug = createUmzug(db);
@@ -19,6 +19,7 @@ export declare class SQLiteFeatureRepository implements IFeatureRepository {
19
19
  findById(id: string): Promise<Feature | null>;
20
20
  findByIdPrefix(prefix: string): Promise<Feature | null>;
21
21
  findBySlug(slug: string, repositoryPath: string): Promise<Feature | null>;
22
+ findByBranch(branch: string, repositoryPath: string): Promise<Feature | null>;
22
23
  list(filters?: FeatureListFilters): Promise<Feature[]>;
23
24
  findByParentId(parentId: string): Promise<Feature[]>;
24
25
  update(feature: Feature): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-feature.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-feature.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,6EAA6E,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAOhE;;;GAGG;AACH,qBACa,uBAAwB,YAAW,kBAAkB;IACpD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BvC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAW7C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAcvD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAazE,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAyBtD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQpD,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCvC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAK5C"}
1
+ {"version":3,"file":"sqlite-feature.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-feature.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,6EAA6E,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAOhE;;;GAGG;AACH,qBACa,uBAAwB,YAAW,kBAAkB;IACpD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BvC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAW7C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAcvD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAazE,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAa7E,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAyBtD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQpD,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCvC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAK5C"}
@@ -78,6 +78,14 @@ let SQLiteFeatureRepository = class SQLiteFeatureRepository {
78
78
  }
79
79
  return fromDatabase(row);
80
80
  }
81
+ async findByBranch(branch, repositoryPath) {
82
+ const stmt = this.db.prepare("SELECT * FROM features WHERE branch = ? AND REPLACE(repository_path, '\\', '/') = ? AND deleted_at IS NULL");
83
+ const row = stmt.get(branch, repositoryPath.replace(/\\/g, '/'));
84
+ if (!row) {
85
+ return null;
86
+ }
87
+ return fromDatabase(row);
88
+ }
81
89
  async list(filters) {
82
90
  const conditions = [];
83
91
  const params = [];
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAmEnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CA6EhD"}
1
+ {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAmEnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CA8EhD"}
@@ -64,7 +64,7 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
64
64
  onboarding_complete,
65
65
  approval_gate_allow_prd, approval_gate_allow_plan,
66
66
  approval_gate_allow_merge, approval_gate_push_on_impl_complete,
67
- feature_flag_skills, feature_flag_env_deploy, feature_flag_debug,
67
+ feature_flag_skills, feature_flag_env_deploy, feature_flag_debug, feature_flag_adopt_branch,
68
68
  workflow_enable_evidence, workflow_commit_evidence
69
69
  ) VALUES (
70
70
  @id, @created_at, @updated_at,
@@ -88,7 +88,7 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
88
88
  @onboarding_complete,
89
89
  @approval_gate_allow_prd, @approval_gate_allow_plan,
90
90
  @approval_gate_allow_merge, @approval_gate_push_on_impl_complete,
91
- @feature_flag_skills, @feature_flag_env_deploy, @feature_flag_debug,
91
+ @feature_flag_skills, @feature_flag_env_deploy, @feature_flag_debug, @feature_flag_adopt_branch,
92
92
  @workflow_enable_evidence, @workflow_commit_evidence
93
93
  )
94
94
  `);
@@ -180,6 +180,7 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
180
180
  feature_flag_skills = @feature_flag_skills,
181
181
  feature_flag_env_deploy = @feature_flag_env_deploy,
182
182
  feature_flag_debug = @feature_flag_debug,
183
+ feature_flag_adopt_branch = @feature_flag_adopt_branch,
183
184
  workflow_enable_evidence = @workflow_enable_evidence,
184
185
  workflow_commit_evidence = @workflow_commit_evidence
185
186
  WHERE id = @id
@@ -1 +1 @@
1
- {"version":3,"file":"ci-watch-fix-loop.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/ci-watch-fix-loop.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iEAAiE,CAAC;AAKrG,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAK3G,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,YAAY,EAAE,aAAa,CAAC;IAC5B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAEpG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,WAAW,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,gBAAgB,CAAC,CA8I3B"}
1
+ {"version":3,"file":"ci-watch-fix-loop.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/ci-watch-fix-loop.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iEAAiE,CAAC;AAKrG,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAK3G,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,YAAY,EAAE,aAAa,CAAC;IAC5B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAEpG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,WAAW,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAuJ3B"}
@@ -84,6 +84,11 @@ export async function runCiWatchFixLoop(deps, params) {
84
84
  }
85
85
  throw err;
86
86
  }
87
+ // Use the run URL from watchCi — it reflects the actual run watched,
88
+ // which may differ from the initial getCiStatus() result when multiple
89
+ // workflow runs exist for the same branch.
90
+ if (watchResult.runUrl)
91
+ runUrl = watchResult.runUrl;
87
92
  if (watchResult.status === 'success') {
88
93
  log.info('CI passed on first watch');
89
94
  return { ciStatus: CiStatus.Success, ciFixAttempts, ciFixHistory, ciFixStatus: 'success' };
@@ -128,6 +133,10 @@ export async function runCiWatchFixLoop(deps, params) {
128
133
  }
129
134
  throw err;
130
135
  }
136
+ // Update runUrl to the run that was actually watched (avoids mismatch
137
+ // when multiple workflow runs exist for the same branch).
138
+ if (fixWatchResult.runUrl)
139
+ runUrl = fixWatchResult.runUrl;
131
140
  const outcome = fixWatchResult.status === 'success' ? 'fixed' : 'failed';
132
141
  ciFixHistory.push({
133
142
  attempt: ciFixAttempts,
@@ -2,11 +2,15 @@
2
2
  * Deployment Service
3
3
  *
4
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).
5
+ * Holds an in-memory Map of active deployments keyed by targetId AND
6
+ * persists deployment records to the `dev_servers` SQLite table so that
7
+ * running dev servers survive page reloads and server restarts.
8
+ *
9
+ * On startup, call `recoverAll()` to reconcile the DB with actual
10
+ * process state (clean up dead PIDs, re-adopt live ones).
8
11
  */
9
12
  import { spawn } from 'node:child_process';
13
+ import type Database from 'better-sqlite3';
10
14
  import type { IDeploymentService, DeploymentStatus, LogEntry } from '../../../application/ports/output/services/deployment-service.interface.js';
11
15
  import { detectDevScript } from './detect-dev-script.js';
12
16
  export interface DeploymentServiceDeps {
@@ -19,15 +23,26 @@ export declare class DeploymentService implements IDeploymentService {
19
23
  private readonly deployments;
20
24
  private readonly deps;
21
25
  private readonly emitter;
26
+ private db;
22
27
  constructor(deps?: Partial<DeploymentServiceDeps>);
28
+ /**
29
+ * Inject the database connection. Called from DI container after DB is ready.
30
+ */
31
+ setDatabase(db: Database.Database): void;
32
+ /**
33
+ * Recover dev servers from the database on startup.
34
+ * Validates each PID is still alive; removes dead rows.
35
+ */
36
+ recoverAll(): void;
23
37
  /**
24
38
  * Start a deployment for the given target.
25
39
  * If a deployment already exists for this target, it is stopped first.
26
40
  */
27
- start(targetId: string, targetPath: string): void;
41
+ start(targetId: string, targetPath: string, targetType?: string): void;
28
42
  /**
29
43
  * Get the current deployment status for a target.
30
- * Returns null if no deployment exists for this target.
44
+ * Checks in-memory Map first, then falls back to DB for recovered deployments.
45
+ * Validates PID liveness — cleans up if dead.
31
46
  */
32
47
  getStatus(targetId: string): DeploymentStatus | null;
33
48
  /**
@@ -50,22 +65,17 @@ export declare class DeploymentService implements IDeploymentService {
50
65
  * Unsubscribe from real-time log events.
51
66
  */
52
67
  off(event: 'log', handler: (entry: LogEntry) => void): void;
53
- /**
54
- * Send SIGKILL to a process tree.
55
- */
68
+ private dbUpsert;
69
+ private dbUpdateState;
70
+ private dbDelete;
71
+ private dbFind;
56
72
  private killProcess;
57
73
  /**
58
74
  * Attach a line-buffered listener on stdout or stderr that calls parsePort
59
75
  * and accumulates log entries.
60
76
  */
61
77
  private attachOutputListener;
62
- /**
63
- * Poll until a process is dead or timeout expires.
64
- */
65
78
  private pollUntilDead;
66
- /**
67
- * Wait for a child process to emit 'exit', with a short timeout.
68
- */
69
79
  private waitForExit;
70
80
  }
71
81
  //# sourceMappingURL=deployment.service.d.ts.map
@@ -1 +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;AAI9D,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACT,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAoBzD,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;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;gBAElC,IAAI,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAIrD;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IA+EjD;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAYpD;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAOf;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,GAAG,IAAI;IAM5C;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAI1D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAI3D;;OAEG;IACH,OAAO,CAAC,WAAW;IAQnB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA+D5B;;OAEG;YACW,aAAa;IAW3B;;OAEG;IACH,OAAO,CAAC,WAAW;CASpB"}
1
+ {"version":3,"file":"deployment.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/deployment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAO3C,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACT,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAgCzD,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;AA6BD,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,EAAE,CAAkC;gBAEhC,IAAI,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAIrD;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI;IAIxC;;;OAGG;IACH,UAAU,IAAI,IAAI;IA4ClB;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,SAAe,GAAG,IAAI;IAqF5E;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IA4CpD;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0D3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAef;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,GAAG,IAAI;IAM5C;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAI1D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAM3D,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,MAAM;IAed,OAAO,CAAC,WAAW;IAQnB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YA4Dd,aAAa;IAW3B,OAAO,CAAC,WAAW;CASpB"}