@shepai/cli 1.136.0-pr396.e077930 → 1.136.0-pr437.9f802f1

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 (310) hide show
  1. package/apis/json-schema/FeatureFlags.yaml +5 -5
  2. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts +132 -0
  3. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts.map +1 -0
  4. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.js +12 -0
  5. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +5 -91
  6. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  7. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js +4 -6
  8. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  9. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  10. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -1
  11. package/dist/packages/core/src/domain/generated/output.d.ts +4 -4
  12. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  14. package/dist/packages/core/src/infrastructure/di/container.js +10 -20
  15. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -1
  16. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  17. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -2
  18. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/{042-add-feature-flag-git-rebase-sync.d.ts → 044-add-feature-flag-coasts-dev-server.d.ts} +3 -3
  19. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.d.ts.map +1 -0
  20. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/{042-add-feature-flag-git-rebase-sync.js → 044-add-feature-flag-coasts-dev-server.js} +4 -4
  21. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +5 -5
  22. package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts +42 -0
  23. package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts.map +1 -0
  24. package/dist/packages/core/src/infrastructure/services/coasts.service.js +185 -0
  25. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +0 -10
  26. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  27. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +0 -150
  28. package/dist/src/presentation/cli/commands/coasts/index.d.ts +3 -0
  29. package/dist/src/presentation/cli/commands/coasts/index.d.ts.map +1 -0
  30. package/dist/src/presentation/cli/commands/coasts/index.js +7 -0
  31. package/dist/src/presentation/cli/commands/coasts/init.command.d.ts +3 -0
  32. package/dist/src/presentation/cli/commands/coasts/init.command.d.ts.map +1 -0
  33. package/dist/src/presentation/cli/commands/coasts/init.command.js +40 -0
  34. package/dist/src/presentation/cli/index.js +2 -0
  35. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  36. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +12 -5
  37. package/dist/src/presentation/web/app/actions/check-coastfile.d.ts +5 -0
  38. package/dist/src/presentation/web/app/actions/check-coastfile.d.ts.map +1 -0
  39. package/dist/src/presentation/web/app/actions/check-coastfile.js +16 -0
  40. package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts +7 -0
  41. package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts.map +1 -0
  42. package/dist/src/presentation/web/app/actions/generate-coastfile.js +22 -0
  43. package/dist/src/presentation/web/coasts-dev-server.d.ts +34 -0
  44. package/dist/src/presentation/web/coasts-dev-server.d.ts.map +1 -0
  45. package/dist/src/presentation/web/coasts-dev-server.js +69 -0
  46. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  47. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +1 -16
  48. package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
  49. package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +4 -4
  50. package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts +0 -4
  51. package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts.map +1 -1
  52. package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.js +1 -32
  53. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +0 -1
  55. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +1 -9
  56. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
  58. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts +1 -9
  59. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
  60. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +2 -3
  61. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +0 -6
  62. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
  63. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +0 -30
  64. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts.map +1 -1
  65. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.js +0 -3
  66. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  67. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +3 -5
  68. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +10 -3
  70. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts +12 -0
  71. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts.map +1 -0
  72. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.js +76 -0
  73. package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts +0 -4
  74. package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.js +0 -11
  76. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  77. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -3
  78. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -3
  79. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +5 -5
  80. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -1
  81. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -1
  82. package/dist/src/presentation/web/dev-server.js +62 -1
  83. package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -1
  84. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -2
  85. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  86. package/dist/src/presentation/web/lib/feature-flags.js +5 -5
  87. package/dist/tsconfig.build.tsbuildinfo +1 -1
  88. package/package.json +2 -1
  89. package/web/.next/BUILD_ID +1 -1
  90. package/web/.next/build-manifest.json +2 -2
  91. package/web/.next/fallback-build-manifest.json +2 -2
  92. package/web/.next/prerender-manifest.json +3 -3
  93. package/web/.next/required-server-files.js +1 -1
  94. package/web/.next/required-server-files.json +1 -1
  95. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +71 -56
  96. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  97. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +71 -56
  100. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  101. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  102. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  103. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +83 -98
  104. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  105. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  106. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +83 -98
  108. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  109. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  110. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  111. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +67 -52
  112. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  113. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  114. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +71 -56
  116. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  117. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  118. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +83 -98
  120. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  121. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  122. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  123. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +83 -98
  124. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  125. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  126. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  127. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +67 -52
  128. package/web/.next/server/app/(dashboard)/page.js +1 -1
  129. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  130. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  131. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +67 -52
  132. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  133. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  134. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  135. package/web/.next/server/app/_global-error.html +2 -2
  136. package/web/.next/server/app/_global-error.rsc +1 -1
  137. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  138. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  139. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  140. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  141. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  142. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  143. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  144. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  145. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  146. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  147. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  148. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  149. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  150. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  151. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  152. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  153. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  154. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  155. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  156. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  157. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  158. package/web/.next/server/chunks/403f9_next_567de315._.js +2 -2
  159. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  160. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  161. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  162. package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
  163. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  165. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cf9161b._.js +4 -0
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cf9161b._.js.map +1 -0
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  171. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js.map +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__71b5d4e8._.js +4 -0
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__71b5d4e8._.js.map +1 -0
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/[root-of-the-server]__944b653f._.js +4 -0
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__944b653f._.js.map +1 -0
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js +2 -2
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/[root-of-the-server]__a9079247._.js +4 -0
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__a9079247._.js.map +1 -0
  183. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  184. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3dbadca._.js +3 -0
  186. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3dbadca._.js.map +1 -0
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  188. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/_0020fddd._.js +1 -1
  190. package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/{_1a09002f._.js → _01383b12._.js} +2 -2
  192. package/web/.next/server/chunks/ssr/{_939287c5._.js.map → _01383b12._.js.map} +1 -1
  193. package/web/.next/server/chunks/ssr/_02ec1aea._.js +1 -1
  194. package/web/.next/server/chunks/ssr/_02ec1aea._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/{_6e8c85b1._.js → _112b6fbf._.js} +3 -3
  196. package/web/.next/server/chunks/ssr/{_48a8ee28._.js.map → _112b6fbf._.js.map} +1 -1
  197. package/web/.next/server/chunks/ssr/{_13f3c0ec._.js → _12282083._.js} +2 -2
  198. package/web/.next/server/chunks/ssr/{_13f3c0ec._.js.map → _12282083._.js.map} +1 -1
  199. package/web/.next/server/chunks/ssr/{_83220ba0._.js → _3b9ec2d7._.js} +2 -2
  200. package/web/.next/server/chunks/ssr/{_83220ba0._.js.map → _3b9ec2d7._.js.map} +1 -1
  201. package/web/.next/server/chunks/ssr/{_48a8ee28._.js → _7a4bfe44._.js} +3 -3
  202. package/web/.next/server/chunks/ssr/{_6e8c85b1._.js.map → _7a4bfe44._.js.map} +1 -1
  203. package/web/.next/server/chunks/ssr/_7bc4a733._.js +3 -0
  204. package/web/.next/server/chunks/ssr/_7bc4a733._.js.map +1 -0
  205. package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
  206. package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
  207. package/web/.next/server/chunks/ssr/{_149f6559._.js → _7dd6c393._.js} +2 -2
  208. package/web/.next/server/chunks/ssr/{_149f6559._.js.map → _7dd6c393._.js.map} +1 -1
  209. package/web/.next/server/chunks/ssr/{_939287c5._.js → _82cc1fcf._.js} +2 -2
  210. package/web/.next/server/chunks/ssr/{_1a09002f._.js.map → _82cc1fcf._.js.map} +1 -1
  211. package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
  212. package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  216. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
  218. package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  220. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  221. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +3 -0
  222. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -0
  223. package/web/.next/server/chunks/ssr/{src_presentation_web_28f803bd._.js → src_presentation_web_99db45e9._.js} +2 -2
  224. package/web/.next/server/chunks/ssr/{src_presentation_web_28f803bd._.js.map → src_presentation_web_99db45e9._.js.map} +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  230. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  232. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  233. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  234. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  236. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  237. package/web/.next/server/pages/500.html +2 -2
  238. package/web/.next/server/server-reference-manifest.js +1 -1
  239. package/web/.next/server/server-reference-manifest.json +418 -412
  240. package/web/.next/static/chunks/{ed248df9e975fd1f.js → 08d0fd276fa7ac89.js} +1 -1
  241. package/web/.next/static/chunks/0d4f2f0257e78c06.css +1 -0
  242. package/web/.next/static/chunks/{4148e7a319ea7ec4.js → 12511f976fedf4cb.js} +1 -1
  243. package/web/.next/static/chunks/{f070c67389a686ff.js → 18616dda443b7ed1.js} +7 -7
  244. package/web/.next/static/chunks/{6bfc9e17e141ac36.js → 1f321d18af8d8b30.js} +1 -1
  245. package/web/.next/static/chunks/{eeec829933170d8a.js → 47d110d7472840fd.js} +1 -1
  246. package/web/.next/static/chunks/{f010c3293515ab73.js → 745234c95baaf6df.js} +1 -1
  247. package/web/.next/static/chunks/891d57985c5f3a0b.js +1 -0
  248. package/web/.next/static/chunks/{aa2236a4b7c3bd45.js → ac7469534efcc3b0.js} +1 -1
  249. package/web/.next/static/chunks/{20a66a7159b97299.js → acd8d06ded15d1ed.js} +2 -2
  250. package/web/.next/static/chunks/{9db1dd8ad063626c.js → cfcc46c87d712da6.js} +1 -1
  251. package/web/.next/static/chunks/d0dff217a94d4ee1.js +1 -0
  252. package/web/.next/static/chunks/{5f67ffe1879b8536.js → dc8683ddff12ef38.js} +1 -1
  253. package/web/.next/static/chunks/{132d824e337f12fe.js → dfe1ea2ffdc06c44.js} +2 -2
  254. package/web/.next/static/chunks/eb9841ec4d80af01.js +1 -0
  255. package/web/.next/static/chunks/{031e65a4305571f7.js → fe54542759c9fd27.js} +1 -1
  256. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts +0 -25
  257. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts.map +0 -1
  258. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +0 -62
  259. package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts +0 -34
  260. package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts.map +0 -1
  261. package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +0 -139
  262. package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts +0 -16
  263. package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts.map +0 -1
  264. package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.js +0 -43
  265. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/042-add-feature-flag-git-rebase-sync.d.ts.map +0 -1
  266. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts +0 -35
  267. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts.map +0 -1
  268. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.js +0 -66
  269. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts +0 -42
  270. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts.map +0 -1
  271. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js +0 -169
  272. package/dist/src/presentation/web/app/actions/get-branch-sync-status.d.ts +0 -11
  273. package/dist/src/presentation/web/app/actions/get-branch-sync-status.d.ts.map +0 -1
  274. package/dist/src/presentation/web/app/actions/get-branch-sync-status.js +0 -22
  275. package/dist/src/presentation/web/app/actions/rebase-feature.d.ts +0 -5
  276. package/dist/src/presentation/web/app/actions/rebase-feature.d.ts.map +0 -1
  277. package/dist/src/presentation/web/app/actions/rebase-feature.js +0 -16
  278. package/dist/src/presentation/web/app/actions/sync-repository.d.ts +0 -5
  279. package/dist/src/presentation/web/app/actions/sync-repository.d.ts.map +0 -1
  280. package/dist/src/presentation/web/app/actions/sync-repository.js +0 -16
  281. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.d.ts +0 -12
  282. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.d.ts.map +0 -1
  283. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.js +0 -13
  284. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts +0 -15
  285. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts.map +0 -1
  286. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.js +0 -86
  287. package/dist/src/presentation/web/hooks/use-branch-sync-status.d.ts +0 -14
  288. package/dist/src/presentation/web/hooks/use-branch-sync-status.d.ts.map +0 -1
  289. package/dist/src/presentation/web/hooks/use-branch-sync-status.js +0 -67
  290. package/web/.next/server/chunks/ssr/[root-of-the-server]__1626f5d7._.js +0 -4
  291. package/web/.next/server/chunks/ssr/[root-of-the-server]__1626f5d7._.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/[root-of-the-server]__49557873._.js +0 -4
  293. package/web/.next/server/chunks/ssr/[root-of-the-server]__49557873._.js.map +0 -1
  294. package/web/.next/server/chunks/ssr/[root-of-the-server]__90fdc0ee._.js +0 -4
  295. package/web/.next/server/chunks/ssr/[root-of-the-server]__90fdc0ee._.js.map +0 -1
  296. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7259d16._.js +0 -4
  297. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7259d16._.js.map +0 -1
  298. package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js +0 -3
  299. package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js.map +0 -1
  300. package/web/.next/server/chunks/ssr/_51ed80a4._.js +0 -3
  301. package/web/.next/server/chunks/ssr/_51ed80a4._.js.map +0 -1
  302. package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +0 -3
  303. package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +0 -1
  304. package/web/.next/static/chunks/6a370f2709c81d83.js +0 -1
  305. package/web/.next/static/chunks/ab3afb0b942c1eb2.css +0 -1
  306. package/web/.next/static/chunks/b3cc94a1e319bee8.js +0 -1
  307. package/web/.next/static/chunks/f66c996402a430f5.js +0 -1
  308. /package/web/.next/static/{8o0yazCw1kyy56LNhgtTp → YPdE95T5GezMRcw-C6nfC}/_buildManifest.js +0 -0
  309. /package/web/.next/static/{8o0yazCw1kyy56LNhgtTp → YPdE95T5GezMRcw-C6nfC}/_clientMiddlewareManifest.json +0 -0
  310. /package/web/.next/static/{8o0yazCw1kyy56LNhgtTp → YPdE95T5GezMRcw-C6nfC}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"044-add-feature-flag-coasts-dev-server.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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,CAS3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7F"}
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Migration 042: Add feature_flag_git_rebase_sync column to settings table.
2
+ * Migration 044: Add feature_flag_coasts_dev_server column to settings table.
3
3
  *
4
- * Adds a boolean (INTEGER 0/1) column for the git rebase-sync feature flag.
4
+ * Adds a boolean (INTEGER 0/1) column for the Coasts dev server feature flag.
5
5
  * Defaults to 0 (disabled).
6
6
  */
7
7
  export async function up({ context: db }) {
8
8
  const columns = db.pragma('table_info(settings)');
9
9
  const existing = new Set(columns.map((c) => c.name));
10
- if (!existing.has('feature_flag_git_rebase_sync')) {
11
- db.exec('ALTER TABLE settings ADD COLUMN feature_flag_git_rebase_sync INTEGER NOT NULL DEFAULT 0');
10
+ if (!existing.has('feature_flag_coasts_dev_server')) {
11
+ db.exec('ALTER TABLE settings ADD COLUMN feature_flag_coasts_dev_server INTEGER NOT NULL DEFAULT 0');
12
12
  }
13
13
  }
14
14
  export async function down({ context: db }) {
@@ -64,8 +64,8 @@ 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, feature_flag_github_import, feature_flag_adopt_branch, feature_flag_git_rebase_sync,
68
- feature_flag_react_file_manager,
67
+ feature_flag_skills, feature_flag_env_deploy, feature_flag_debug, feature_flag_github_import, feature_flag_adopt_branch,
68
+ feature_flag_react_file_manager, feature_flag_coasts_dev_server,
69
69
  workflow_enable_evidence, workflow_commit_evidence,
70
70
  hide_ci_status
71
71
  ) VALUES (
@@ -90,8 +90,8 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
90
90
  @onboarding_complete,
91
91
  @approval_gate_allow_prd, @approval_gate_allow_plan,
92
92
  @approval_gate_allow_merge, @approval_gate_push_on_impl_complete,
93
- @feature_flag_skills, @feature_flag_env_deploy, @feature_flag_debug, @feature_flag_github_import, @feature_flag_adopt_branch, @feature_flag_git_rebase_sync,
94
- @feature_flag_react_file_manager,
93
+ @feature_flag_skills, @feature_flag_env_deploy, @feature_flag_debug, @feature_flag_github_import, @feature_flag_adopt_branch,
94
+ @feature_flag_react_file_manager, @feature_flag_coasts_dev_server,
95
95
  @workflow_enable_evidence, @workflow_commit_evidence,
96
96
  @hide_ci_status
97
97
  )
@@ -186,8 +186,8 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
186
186
  feature_flag_debug = @feature_flag_debug,
187
187
  feature_flag_github_import = @feature_flag_github_import,
188
188
  feature_flag_adopt_branch = @feature_flag_adopt_branch,
189
- feature_flag_git_rebase_sync = @feature_flag_git_rebase_sync,
190
189
  feature_flag_react_file_manager = @feature_flag_react_file_manager,
190
+ feature_flag_coasts_dev_server = @feature_flag_coasts_dev_server,
191
191
  workflow_enable_evidence = @workflow_enable_evidence,
192
192
  workflow_commit_evidence = @workflow_commit_evidence,
193
193
  hide_ci_status = @hide_ci_status
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Coasts Service Implementation
3
+ *
4
+ * Infrastructure adapter wrapping the coast CLI binary for containerized
5
+ * runtime isolation. Uses constructor-injected ExecFunction for subprocess
6
+ * invocation and IStructuredAgentCaller for AI-powered Coastfile generation.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Implements the ICoastsService application port
10
+ * - Lives in the infrastructure layer
11
+ * - No direct child_process imports (injected via ExecFunction)
12
+ */
13
+ import type { ICoastsService, PrerequisiteCheckResult, CoastInstance } from '../../application/ports/output/services/coasts-service.interface.js';
14
+ import type { IStructuredAgentCaller } from '../../application/ports/output/agents/structured-agent-caller.interface.js';
15
+ import type { ExecFunction } from './git/worktree.service.js';
16
+ export declare class CoastsService implements ICoastsService {
17
+ private readonly execFile;
18
+ private readonly structuredCaller;
19
+ private cachedInstallationPrompt;
20
+ private readonly isWindows;
21
+ constructor(execFile: ExecFunction, structuredCaller: IStructuredAgentCaller, isWindows?: boolean);
22
+ checkPrerequisites(workDir: string): Promise<PrerequisiteCheckResult>;
23
+ build(workDir: string): Promise<void>;
24
+ run(workDir: string): Promise<CoastInstance>;
25
+ stop(workDir: string): Promise<void>;
26
+ lookup(workDir: string): Promise<CoastInstance | null>;
27
+ isRunning(workDir: string): Promise<boolean>;
28
+ checkout(workDir: string): Promise<void>;
29
+ getInstallationPrompt(): Promise<string>;
30
+ generateCoastfile(workDir: string): Promise<string>;
31
+ hasCoastfile(workDir: string): Promise<boolean>;
32
+ private checkCoastBinary;
33
+ private checkDocker;
34
+ private checkCoastdRunning;
35
+ private execCoast;
36
+ /**
37
+ * Parse coast CLI output to extract port and URL from stdout.
38
+ * Looks for patterns like "port 3000" and "http://localhost:3000".
39
+ */
40
+ private parseCoastInstance;
41
+ }
42
+ //# sourceMappingURL=coasts.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coasts.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/coasts.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,aAAa,EACd,MAAM,qEAAqE,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4EAA4E,CAAC;AACzH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgC9D,qBACa,aAAc,YAAW,cAAc;IAKxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACf,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IALrE,OAAO,CAAC,wBAAwB,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;gBAGO,QAAQ,EAAE,YAAY,EACZ,gBAAgB,EAAE,sBAAsB,EAC3F,SAAS,CAAC,EAAE,OAAO;IAKf,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAiDrE,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAK5C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAStD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAaxC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBnD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAMvC,gBAAgB;YAIhB,WAAW;YAIX,kBAAkB;YAIlB,SAAS;IAQvB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAS3B"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Coasts Service Implementation
3
+ *
4
+ * Infrastructure adapter wrapping the coast CLI binary for containerized
5
+ * runtime isolation. Uses constructor-injected ExecFunction for subprocess
6
+ * invocation and IStructuredAgentCaller for AI-powered Coastfile generation.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Implements the ICoastsService application port
10
+ * - Lives in the infrastructure layer
11
+ * - No direct child_process imports (injected via ExecFunction)
12
+ */
13
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
14
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
18
+ };
19
+ var __metadata = (this && this.__metadata) || function (k, v) {
20
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
21
+ };
22
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
23
+ return function (target, key) { decorator(target, key, paramIndex); }
24
+ };
25
+ import { existsSync, writeFileSync } from 'node:fs';
26
+ import path from 'node:path';
27
+ import { injectable, inject } from 'tsyringe';
28
+ import { IS_WINDOWS } from '../platform.js';
29
+ /** Timeout for coast build (may need to pull Docker images). */
30
+ const BUILD_TIMEOUT_MS = 30_000;
31
+ /** Timeout for all other coast CLI commands. */
32
+ const DEFAULT_TIMEOUT_MS = 10_000;
33
+ /** JSON schema for Coastfile generation via structured agent caller. */
34
+ const COASTFILE_SCHEMA = {
35
+ type: 'object',
36
+ properties: {
37
+ content: {
38
+ type: 'string',
39
+ description: 'The complete Coastfile content in TOML format',
40
+ },
41
+ warnings: {
42
+ type: 'array',
43
+ items: { type: 'string' },
44
+ description: 'Any warnings or notes about the generated Coastfile',
45
+ },
46
+ },
47
+ required: ['content'],
48
+ additionalProperties: false,
49
+ };
50
+ let CoastsService = class CoastsService {
51
+ execFile;
52
+ structuredCaller;
53
+ cachedInstallationPrompt = null;
54
+ isWindows;
55
+ constructor(execFile, structuredCaller, isWindows) {
56
+ this.execFile = execFile;
57
+ this.structuredCaller = structuredCaller;
58
+ this.isWindows = isWindows ?? IS_WINDOWS;
59
+ }
60
+ async checkPrerequisites(workDir) {
61
+ if (this.isWindows) {
62
+ return {
63
+ coastBinary: false,
64
+ docker: false,
65
+ coastdRunning: false,
66
+ allMet: false,
67
+ missingMessages: [
68
+ 'Coasts dev server is not supported on Windows. See https://coasts.dev/docs for platform support.',
69
+ ],
70
+ };
71
+ }
72
+ const [coastResult, dockerResult, coastdResult] = await Promise.allSettled([
73
+ this.checkCoastBinary(),
74
+ this.checkDocker(),
75
+ this.checkCoastdRunning(workDir),
76
+ ]);
77
+ const coastBinary = coastResult.status === 'fulfilled';
78
+ const docker = dockerResult.status === 'fulfilled';
79
+ const coastdRunning = coastdResult.status === 'fulfilled';
80
+ const missingMessages = [];
81
+ if (!coastBinary) {
82
+ missingMessages.push('coast binary not found on PATH. Install it with: curl -fsSL https://coasts.dev/install | sh. See https://coasts.dev/docs');
83
+ }
84
+ if (!docker) {
85
+ missingMessages.push('Docker daemon is not reachable. Start Docker Desktop or run: sudo systemctl start docker');
86
+ }
87
+ if (!coastdRunning) {
88
+ missingMessages.push('coastd daemon is not running. Start it with: coastd &. See https://coasts.dev/docs/daemon');
89
+ }
90
+ return {
91
+ coastBinary,
92
+ docker,
93
+ coastdRunning,
94
+ allMet: coastBinary && docker && coastdRunning,
95
+ missingMessages,
96
+ };
97
+ }
98
+ async build(workDir) {
99
+ await this.execCoast(['build'], workDir, BUILD_TIMEOUT_MS);
100
+ }
101
+ async run(workDir) {
102
+ const { stdout } = await this.execCoast(['run'], workDir);
103
+ return this.parseCoastInstance(stdout);
104
+ }
105
+ async stop(workDir) {
106
+ try {
107
+ await this.execCoast(['stop'], workDir);
108
+ }
109
+ catch {
110
+ // No-op if no instance is running
111
+ }
112
+ }
113
+ async lookup(workDir) {
114
+ try {
115
+ const { stdout } = await this.execCoast(['lookup'], workDir);
116
+ return this.parseCoastInstance(stdout);
117
+ }
118
+ catch {
119
+ return null;
120
+ }
121
+ }
122
+ async isRunning(workDir) {
123
+ const instance = await this.lookup(workDir);
124
+ return instance !== null;
125
+ }
126
+ async checkout(workDir) {
127
+ await this.execCoast(['checkout'], workDir);
128
+ }
129
+ async getInstallationPrompt() {
130
+ if (this.cachedInstallationPrompt !== null) {
131
+ return this.cachedInstallationPrompt;
132
+ }
133
+ const { stdout } = await this.execFile('coast', ['installation-prompt'], {
134
+ timeout: DEFAULT_TIMEOUT_MS,
135
+ });
136
+ this.cachedInstallationPrompt = stdout;
137
+ return stdout;
138
+ }
139
+ async generateCoastfile(workDir) {
140
+ const installationPrompt = await this.getInstallationPrompt();
141
+ const prompt = `${installationPrompt}\n\nAnalyze the project at the working directory and generate a Coastfile.\nReturn the complete Coastfile content as valid TOML in the "content" field.`;
142
+ const result = await this.structuredCaller.call(prompt, COASTFILE_SCHEMA, {
143
+ allowedTools: [],
144
+ silent: true,
145
+ maxTurns: 10,
146
+ });
147
+ const coastfilePath = path.join(workDir, 'Coastfile');
148
+ writeFileSync(coastfilePath, result.content, 'utf-8');
149
+ return coastfilePath;
150
+ }
151
+ async hasCoastfile(workDir) {
152
+ return existsSync(path.join(workDir, 'Coastfile'));
153
+ }
154
+ // --- Private helpers ---
155
+ async checkCoastBinary() {
156
+ await this.execFile('coast', ['--version'], { timeout: 500 });
157
+ }
158
+ async checkDocker() {
159
+ await this.execFile('docker', ['info'], { timeout: 500 });
160
+ }
161
+ async checkCoastdRunning(workDir) {
162
+ await this.execFile('coast', ['ls'], { cwd: workDir, timeout: 500 });
163
+ }
164
+ async execCoast(args, workDir, timeout = DEFAULT_TIMEOUT_MS) {
165
+ return this.execFile('coast', args, { cwd: workDir, timeout });
166
+ }
167
+ /**
168
+ * Parse coast CLI output to extract port and URL from stdout.
169
+ * Looks for patterns like "port 3000" and "http://localhost:3000".
170
+ */
171
+ parseCoastInstance(stdout) {
172
+ const portMatch = stdout.match(/port\s+(\d+)/i);
173
+ const urlMatch = stdout.match(/(https?:\/\/[^\s]+)/i);
174
+ const port = portMatch ? parseInt(portMatch[1], 10) : 3000;
175
+ const url = urlMatch ? urlMatch[1] : `http://localhost:${port}`;
176
+ return { port, url };
177
+ }
178
+ };
179
+ CoastsService = __decorate([
180
+ injectable(),
181
+ __param(0, inject('ExecFunction')),
182
+ __param(1, inject('IStructuredAgentCaller')),
183
+ __metadata("design:paramtypes", [Function, Object, Boolean])
184
+ ], CoastsService);
185
+ export { CoastsService };
@@ -45,15 +45,5 @@ export declare class GitPrService implements IGitPrService {
45
45
  private parseGhError;
46
46
  private parsePrNumberFromUrl;
47
47
  private parseDiffStat;
48
- syncMain(cwd: string, baseBranch: string): Promise<void>;
49
- rebaseOnMain(cwd: string, featureBranch: string, baseBranch: string): Promise<void>;
50
- getConflictedFiles(cwd: string): Promise<string[]>;
51
- stageFiles(cwd: string, files: string[]): Promise<void>;
52
- rebaseContinue(cwd: string): Promise<void>;
53
- rebaseAbort(cwd: string): Promise<void>;
54
- getBranchSyncStatus(cwd: string, featureBranch: string, baseBranch: string): Promise<{
55
- ahead: number;
56
- behind: number;
57
- }>;
58
48
  }
59
49
  //# sourceMappingURL=git-pr.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgF9C,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKnD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvE,QAAQ,CAA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6CnB;;;OAGG;YACW,UAAU;IAmBlB,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,WAAW,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC;IAWlB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
@@ -617,14 +617,6 @@ let GitPrService = class GitPrService {
617
617
  parseGitError(error) {
618
618
  const message = error instanceof Error ? error.message : String(error);
619
619
  const cause = error instanceof Error ? error : undefined;
620
- // Rebase-specific: detect "CONFLICT" during rebase operations
621
- if (message.includes('CONFLICT') && message.includes('rebase')) {
622
- return new GitPrError(message, GitPrErrorCode.REBASE_CONFLICT, cause);
623
- }
624
- // Sync-specific: non-fast-forward or diverged branch
625
- if (message.includes('non-fast-forward') || message.includes('diverged')) {
626
- return new GitPrError(message, GitPrErrorCode.SYNC_FAILED, cause);
627
- }
628
620
  if (message.includes('rejected') || message.includes('conflict')) {
629
621
  return new GitPrError(message, GitPrErrorCode.MERGE_CONFLICT, cause);
630
622
  }
@@ -665,148 +657,6 @@ let GitPrService = class GitPrService {
665
657
  commitCount,
666
658
  };
667
659
  }
668
- // --- Rebase & Sync operations ---
669
- async syncMain(cwd, baseBranch) {
670
- try {
671
- // Detect current branch
672
- const { stdout } = await this.execFile('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { cwd });
673
- const currentBranch = stdout.trim();
674
- if (currentBranch === baseBranch) {
675
- // On the base branch — use git pull --ff-only
676
- await this.execFile('git', ['pull', '--ff-only', 'origin', baseBranch], { cwd });
677
- }
678
- else {
679
- // On a different branch — fetch the remote ref only (updates origin/<baseBranch>).
680
- // We intentionally do NOT update the local <baseBranch> ref because it may be
681
- // checked out in another worktree, which causes git to refuse the update with:
682
- // "fatal: refusing to fetch into branch 'refs/heads/main' checked out at ..."
683
- await this.execFile('git', ['fetch', 'origin', baseBranch], { cwd });
684
- }
685
- }
686
- catch (error) {
687
- const message = error instanceof Error ? error.message : String(error);
688
- const cause = error instanceof Error ? error : undefined;
689
- if (message.includes('non-fast-forward') ||
690
- message.includes('Not possible to fast-forward') ||
691
- message.includes('diverged')) {
692
- throw new GitPrError(`Cannot fast-forward '${baseBranch}': local branch has diverged from remote. ` +
693
- `Resolve the divergence manually with 'git checkout ${baseBranch} && git reset --hard origin/${baseBranch}' ` +
694
- `if you want to discard local changes on ${baseBranch}.`, GitPrErrorCode.SYNC_FAILED, cause);
695
- }
696
- throw new GitPrError(`Failed to sync '${baseBranch}' with remote: ${message}`, GitPrErrorCode.GIT_ERROR, cause);
697
- }
698
- }
699
- async rebaseOnMain(cwd, featureBranch, baseBranch) {
700
- // Check for dirty worktree before starting
701
- const dirty = await this.hasUncommittedChanges(cwd);
702
- if (dirty) {
703
- throw new GitPrError(`Cannot rebase: working directory has uncommitted changes. ` +
704
- `Please commit or stash your changes before rebasing.`, GitPrErrorCode.GIT_ERROR);
705
- }
706
- // Checkout the feature branch
707
- try {
708
- await this.execFile('git', ['checkout', featureBranch], { cwd });
709
- }
710
- catch (error) {
711
- const message = error instanceof Error ? error.message : String(error);
712
- const cause = error instanceof Error ? error : undefined;
713
- if (message.includes('did not match') ||
714
- message.includes('not a commit') ||
715
- message.includes('pathspec')) {
716
- throw new GitPrError(`Branch '${featureBranch}' not found.`, GitPrErrorCode.BRANCH_NOT_FOUND, cause);
717
- }
718
- throw new GitPrError(`Failed to checkout '${featureBranch}': ${message}`, GitPrErrorCode.GIT_ERROR, cause);
719
- }
720
- // Rebase onto origin/<baseBranch> (the remote-tracking ref).
721
- // We use origin/<baseBranch> rather than the local <baseBranch> because:
722
- // 1. syncMain fetches origin/<baseBranch> — it's always up-to-date
723
- // 2. The local <baseBranch> may be checked out in another worktree and stale
724
- const rebaseTarget = `origin/${baseBranch}`;
725
- try {
726
- await this.execFile('git', ['rebase', rebaseTarget], { cwd });
727
- }
728
- catch (error) {
729
- const message = error instanceof Error ? error.message : String(error);
730
- const cause = error instanceof Error ? error : undefined;
731
- // Detect rebase conflict from git stderr/exit code
732
- if (message.includes('CONFLICT') || message.includes('could not apply')) {
733
- // Get the list of conflicted files to include in the error message
734
- let conflictedFiles = [];
735
- try {
736
- conflictedFiles = await this.getConflictedFiles(cwd);
737
- }
738
- catch {
739
- // Failed to get conflicted files — still report the conflict
740
- }
741
- const fileList = conflictedFiles.length > 0 ? ` Conflicted files: ${conflictedFiles.join(', ')}` : '';
742
- throw new GitPrError(`Rebase of '${featureBranch}' onto '${baseBranch}' encountered conflicts.${fileList}`, GitPrErrorCode.REBASE_CONFLICT, cause);
743
- }
744
- throw new GitPrError(`Rebase of '${featureBranch}' onto '${baseBranch}' failed: ${message}`, GitPrErrorCode.GIT_ERROR, cause);
745
- }
746
- }
747
- async getConflictedFiles(cwd) {
748
- try {
749
- const { stdout } = await this.execFile('git', ['diff', '--name-only', '--diff-filter=U'], {
750
- cwd,
751
- });
752
- return stdout
753
- .trim()
754
- .split('\n')
755
- .filter((f) => f.length > 0)
756
- .map((f) => f.replace(/\\/g, '/'));
757
- }
758
- catch (error) {
759
- throw this.parseGitError(error);
760
- }
761
- }
762
- async stageFiles(cwd, files) {
763
- try {
764
- await this.execFile('git', ['add', ...files], { cwd });
765
- }
766
- catch (error) {
767
- throw this.parseGitError(error);
768
- }
769
- }
770
- async rebaseContinue(cwd) {
771
- try {
772
- await this.execFile('git', ['rebase', '--continue'], {
773
- cwd,
774
- env: { ...process.env, GIT_EDITOR: 'true' },
775
- });
776
- }
777
- catch (error) {
778
- const message = error instanceof Error ? error.message : String(error);
779
- const cause = error instanceof Error ? error : undefined;
780
- if (message.includes('CONFLICT') || message.includes('could not apply')) {
781
- throw new GitPrError(`Rebase continue encountered new conflicts: ${message}`, GitPrErrorCode.REBASE_CONFLICT, cause);
782
- }
783
- throw this.parseGitError(error);
784
- }
785
- }
786
- async rebaseAbort(cwd) {
787
- try {
788
- await this.execFile('git', ['rebase', '--abort'], { cwd });
789
- }
790
- catch (error) {
791
- throw this.parseGitError(error);
792
- }
793
- }
794
- async getBranchSyncStatus(cwd, featureBranch, baseBranch) {
795
- try {
796
- const remoteRef = `origin/${baseBranch}`;
797
- const [aheadResult, behindResult] = await Promise.all([
798
- this.execFile('git', ['rev-list', '--count', `${remoteRef}..${featureBranch}`], { cwd }),
799
- this.execFile('git', ['rev-list', '--count', `${featureBranch}..${remoteRef}`], { cwd }),
800
- ]);
801
- return {
802
- ahead: parseInt(aheadResult.stdout.trim(), 10) || 0,
803
- behind: parseInt(behindResult.stdout.trim(), 10) || 0,
804
- };
805
- }
806
- catch (error) {
807
- throw this.parseGitError(error);
808
- }
809
- }
810
660
  };
811
661
  GitPrService = __decorate([
812
662
  injectable(),
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createCoastsCommand(): Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/coasts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,mBAAmB,IAAI,OAAO,CAI7C"}
@@ -0,0 +1,7 @@
1
+ import { Command } from 'commander';
2
+ import { createInitCommand } from './init.command.js';
3
+ export function createCoastsCommand() {
4
+ return new Command('coasts')
5
+ .description('Manage Coasts containerized runtime')
6
+ .addCommand(createInitCommand());
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createInitCommand(): Command;
3
+ //# sourceMappingURL=init.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/coasts/init.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,iBAAiB,IAAI,OAAO,CA0C3C"}
@@ -0,0 +1,40 @@
1
+ import { Command } from 'commander';
2
+ import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
3
+ import { messages, spinner } from '../../ui/index.js';
4
+ export function createInitCommand() {
5
+ return new Command('init')
6
+ .description('Generate a Coastfile for the current repository')
7
+ .option('-f, --force', 'Overwrite existing Coastfile without prompting')
8
+ .action(async (options) => {
9
+ const workDir = process.cwd();
10
+ try {
11
+ const coastsService = container.resolve('ICoastsService');
12
+ // Check if Coastfile already exists
13
+ const exists = await coastsService.hasCoastfile(workDir);
14
+ if (exists && !options.force) {
15
+ messages.warning('Coastfile already exists. Use --force to regenerate.');
16
+ return;
17
+ }
18
+ // Check prerequisites
19
+ const prereqs = await coastsService.checkPrerequisites(workDir);
20
+ if (!prereqs.allMet) {
21
+ for (const msg of prereqs.missingMessages) {
22
+ messages.error(msg);
23
+ }
24
+ process.exitCode = 1;
25
+ return;
26
+ }
27
+ // Generate Coastfile
28
+ const coastfilePath = await spinner('Generating Coastfile via AI agent...', () => coastsService.generateCoastfile(workDir));
29
+ messages.success(`Coastfile generated at ${coastfilePath}`);
30
+ // Build container
31
+ await spinner('Building coast container...', () => coastsService.build(workDir));
32
+ messages.success('Coast container built successfully.');
33
+ }
34
+ catch (error) {
35
+ const err = error instanceof Error ? error : new Error(String(error));
36
+ messages.error('Failed to initialize Coasts', err);
37
+ process.exitCode = 1;
38
+ }
39
+ });
40
+ }
@@ -42,6 +42,7 @@ import { createIdeOpenCommand } from './commands/ide-open.command.js';
42
42
  import { createInstallCommand } from './commands/install.command.js';
43
43
  import { createUpgradeCommand } from './commands/upgrade.command.js';
44
44
  import { createToolsCommand } from './commands/tools.command.js';
45
+ import { createCoastsCommand } from './commands/coasts/index.js';
45
46
  import { messages } from './ui/index.js';
46
47
  // Daemon lifecycle commands
47
48
  import { createStartCommand } from './commands/start.command.js';
@@ -110,6 +111,7 @@ async function bootstrap() {
110
111
  program.addCommand(createInstallCommand());
111
112
  program.addCommand(createToolsCommand());
112
113
  program.addCommand(createUpgradeCommand());
114
+ program.addCommand(createCoastsCommand());
113
115
  // Daemon lifecycle commands (task-9)
114
116
  program.addCommand(createStartCommand());
115
117
  program.addCommand(createStopCommand());
@@ -1 +1 @@
1
- {"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAiFD,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GACtC;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC;AA6B7B,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CA6DxF"}
1
+ {"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAwFD,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GACtC;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC;AA6B7B,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CA6DxF"}
@@ -31,7 +31,13 @@ async function refreshRepoGitInfo(repo) {
31
31
  gitInfoCache.set(repo.path, { kind: 'not-a-repo', checkedAt: Date.now() });
32
32
  return;
33
33
  }
34
- // Fetch branch + subject & author in parallel
34
+ const cached = gitInfoCache.get(repo.path);
35
+ if (cached?.kind === 'repo' && cached.sha === headSha) {
36
+ // HEAD unchanged — just bump checkedAt
37
+ cached.checkedAt = Date.now();
38
+ return;
39
+ }
40
+ // HEAD changed — fetch branch + subject & author in parallel
35
41
  const [currentBranch, logLine] = await Promise.all([
36
42
  gitCommand(repo.path, ['symbolic-ref', '--short', 'HEAD']),
37
43
  gitCommand(repo.path, ['log', '-1', `--format=%s${FIELD_SEP}%an`]),
@@ -39,8 +45,7 @@ async function refreshRepoGitInfo(repo) {
39
45
  if (!currentBranch)
40
46
  return;
41
47
  const [commitMessage, committer] = (logLine ?? '').split(FIELD_SEP);
42
- // Behind count — always compute, even when on the default branch,
43
- // because local main can be behind origin/main.
48
+ // Behind count
44
49
  let behindCount = null;
45
50
  const defaultBranchRef = await gitCommand(repo.path, [
46
51
  'symbolic-ref',
@@ -48,8 +53,7 @@ async function refreshRepoGitInfo(repo) {
48
53
  'refs/remotes/origin/HEAD',
49
54
  ]);
50
55
  const defaultBranch = defaultBranchRef?.replace('origin/', '') ?? null;
51
- if (defaultBranch) {
52
- // Compare current branch (or default branch itself) against origin
56
+ if (defaultBranch && currentBranch !== defaultBranch) {
53
57
  const behind = await gitCommand(repo.path, [
54
58
  'rev-list',
55
59
  '--count',
@@ -59,6 +63,9 @@ async function refreshRepoGitInfo(repo) {
59
63
  if (isNaN(behindCount))
60
64
  behindCount = null;
61
65
  }
66
+ else {
67
+ behindCount = 0;
68
+ }
62
69
  gitInfoCache.set(repo.path, {
63
70
  kind: 'repo',
64
71
  sha: headSha,
@@ -0,0 +1,5 @@
1
+ export interface CheckCoastfileResult {
2
+ exists: boolean;
3
+ }
4
+ export declare function checkCoastfileAction(repositoryPath: string): Promise<CheckCoastfileResult>;
5
+ //# sourceMappingURL=check-coastfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-coastfile.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/check-coastfile.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAYhG"}
@@ -0,0 +1,16 @@
1
+ 'use server';
2
+ import path from 'node:path';
3
+ import { resolve } from '../../lib/server-container.js';
4
+ export async function checkCoastfileAction(repositoryPath) {
5
+ if (!repositoryPath || !path.isAbsolute(repositoryPath)) {
6
+ return { exists: false };
7
+ }
8
+ try {
9
+ const coastsService = resolve('ICoastsService');
10
+ const exists = await coastsService.hasCoastfile(repositoryPath);
11
+ return { exists };
12
+ }
13
+ catch {
14
+ return { exists: false };
15
+ }
16
+ }