@shepai/cli 1.177.0-pr538.cd394e5 → 1.177.0-pr540.38f1c8c

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 (384) hide show
  1. package/apis/json-schema/Language.yaml +1 -0
  2. package/dist/packages/core/src/application/ports/output/services/agent-auth-detector.interface.d.ts +23 -0
  3. package/dist/packages/core/src/application/ports/output/services/agent-auth-detector.interface.d.ts.map +1 -0
  4. package/dist/packages/core/src/application/ports/output/services/agent-auth-detector.interface.js +13 -0
  5. package/dist/packages/core/src/application/ports/output/services/file-system-service.interface.d.ts +18 -0
  6. package/dist/packages/core/src/application/ports/output/services/file-system-service.interface.d.ts.map +1 -0
  7. package/dist/packages/core/src/application/ports/output/services/file-system-service.interface.js +7 -0
  8. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +0 -15
  9. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/ports/output/services/index.d.ts +3 -0
  11. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  12. package/dist/packages/core/src/application/ports/output/services/project-scaffold-service.interface.d.ts +33 -0
  13. package/dist/packages/core/src/application/ports/output/services/project-scaffold-service.interface.d.ts.map +1 -0
  14. package/dist/packages/core/src/application/ports/output/services/project-scaffold-service.interface.js +9 -0
  15. package/dist/packages/core/src/application/use-cases/agents/check-agent-auth.use-case.d.ts +42 -0
  16. package/dist/packages/core/src/application/use-cases/agents/check-agent-auth.use-case.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/use-cases/agents/check-agent-auth.use-case.js +134 -0
  18. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts +3 -46
  19. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
  20. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +5 -153
  21. package/dist/packages/core/src/application/use-cases/projects/create-project.use-case.d.ts +43 -0
  22. package/dist/packages/core/src/application/use-cases/projects/create-project.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/projects/create-project.use-case.js +84 -0
  24. package/dist/packages/core/src/application/use-cases/repositories/delete-repository.use-case.d.ts +13 -2
  25. package/dist/packages/core/src/application/use-cases/repositories/delete-repository.use-case.d.ts.map +1 -1
  26. package/dist/packages/core/src/application/use-cases/repositories/delete-repository.use-case.js +14 -3
  27. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  28. package/dist/packages/core/src/infrastructure/di/container.js +16 -5
  29. package/dist/packages/core/src/infrastructure/services/agent-auth-detector/platform-agent-auth-detector.service.d.ts +35 -0
  30. package/dist/packages/core/src/infrastructure/services/agent-auth-detector/platform-agent-auth-detector.service.d.ts.map +1 -0
  31. package/dist/packages/core/src/infrastructure/services/agent-auth-detector/platform-agent-auth-detector.service.js +165 -0
  32. package/dist/packages/core/src/infrastructure/services/file-system.service.d.ts +10 -0
  33. package/dist/packages/core/src/infrastructure/services/file-system.service.d.ts.map +1 -0
  34. package/dist/packages/core/src/infrastructure/services/file-system.service.js +22 -0
  35. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +0 -1
  36. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  37. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +0 -53
  38. package/dist/packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.d.ts +22 -0
  39. package/dist/packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.d.ts.map +1 -0
  40. package/dist/packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.js +74 -0
  41. package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts +10 -2
  42. package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
  43. package/dist/src/presentation/web/app/actions/check-agent-auth.js +7 -199
  44. package/dist/src/presentation/web/app/actions/create-project-folder.d.ts +16 -0
  45. package/dist/src/presentation/web/app/actions/create-project-folder.d.ts.map +1 -0
  46. package/dist/src/presentation/web/app/actions/create-project-folder.js +18 -0
  47. package/dist/src/presentation/web/app/actions/delete-repository.d.ts +4 -1
  48. package/dist/src/presentation/web/app/actions/delete-repository.d.ts.map +1 -1
  49. package/dist/src/presentation/web/app/actions/delete-repository.js +2 -2
  50. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  51. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +4 -4
  52. package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts +3 -1
  53. package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  55. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +13 -4
  56. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +5 -3
  58. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  59. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +135 -125
  60. package/dist/src/presentation/web/components/features/control-center/new-project-dialog.d.ts +8 -0
  61. package/dist/src/presentation/web/components/features/control-center/new-project-dialog.d.ts.map +1 -0
  62. package/dist/src/presentation/web/components/features/control-center/new-project-dialog.js +43 -0
  63. package/dist/src/presentation/web/components/features/control-center/use-canvas-event-listeners.d.ts +27 -0
  64. package/dist/src/presentation/web/components/features/control-center/use-canvas-event-listeners.d.ts.map +1 -0
  65. package/dist/src/presentation/web/components/features/control-center/use-canvas-event-listeners.js +84 -0
  66. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +3 -2
  67. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  68. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +8 -49
  69. package/dist/src/presentation/web/components/features/control-center/use-fab-actions.d.ts +21 -0
  70. package/dist/src/presentation/web/components/features/control-center/use-fab-actions.d.ts.map +1 -0
  71. package/dist/src/presentation/web/components/features/control-center/use-fab-actions.js +70 -0
  72. package/dist/src/presentation/web/components/features/control-center/use-workspace-fit-view.d.ts +27 -0
  73. package/dist/src/presentation/web/components/features/control-center/use-workspace-fit-view.d.ts.map +1 -0
  74. package/dist/src/presentation/web/components/features/control-center/use-workspace-fit-view.js +48 -0
  75. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
  76. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +8 -1
  77. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.d.ts +3 -1
  78. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.d.ts.map +1 -1
  79. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.js +3 -3
  80. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.d.ts +0 -1
  81. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.d.ts.map +1 -1
  82. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.js +6 -18
  83. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts +0 -3
  84. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts.map +1 -1
  85. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.js +1 -27
  86. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts +1 -2
  87. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
  88. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +3 -14
  89. package/dist/src/presentation/web/components/features/features-canvas/manage-workspace-dialog.d.ts +15 -0
  90. package/dist/src/presentation/web/components/features/features-canvas/manage-workspace-dialog.d.ts.map +1 -0
  91. package/dist/src/presentation/web/components/features/features-canvas/manage-workspace-dialog.js +74 -0
  92. package/dist/src/presentation/web/components/features/features-canvas/workspace-name-dialog.d.ts +11 -0
  93. package/dist/src/presentation/web/components/features/features-canvas/workspace-name-dialog.d.ts.map +1 -0
  94. package/dist/src/presentation/web/components/features/features-canvas/workspace-name-dialog.js +22 -0
  95. package/dist/src/presentation/web/components/features/features-canvas/workspace-selector.d.ts +13 -0
  96. package/dist/src/presentation/web/components/features/features-canvas/workspace-selector.d.ts.map +1 -0
  97. package/dist/src/presentation/web/components/features/features-canvas/workspace-selector.js +21 -0
  98. package/dist/src/presentation/web/hooks/use-graph-state.d.ts +0 -7
  99. package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
  100. package/dist/src/presentation/web/hooks/use-graph-state.js +0 -74
  101. package/dist/src/presentation/web/hooks/use-workspaces.d.ts +37 -0
  102. package/dist/src/presentation/web/hooks/use-workspaces.d.ts.map +1 -0
  103. package/dist/src/presentation/web/hooks/use-workspaces.js +219 -0
  104. package/dist/src/presentation/web/lib/derive-graph.d.ts +3 -1
  105. package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
  106. package/dist/src/presentation/web/lib/derive-graph.js +1 -5
  107. package/dist/translations/ar/web.json +4 -1
  108. package/dist/translations/de/web.json +4 -1
  109. package/dist/translations/en/web.json +4 -1
  110. package/dist/translations/es/web.json +4 -1
  111. package/dist/translations/fr/web.json +4 -1
  112. package/dist/translations/he/web.json +4 -1
  113. package/dist/translations/pt/web.json +4 -1
  114. package/dist/translations/ru/web.json +4 -1
  115. package/dist/translations/uk/web.json +3 -0
  116. package/dist/tsconfig.build.tsbuildinfo +1 -1
  117. package/package.json +1 -1
  118. package/web/.next/BUILD_ID +1 -1
  119. package/web/.next/build-manifest.json +2 -2
  120. package/web/.next/fallback-build-manifest.json +2 -2
  121. package/web/.next/prerender-manifest.json +3 -3
  122. package/web/.next/required-server-files.js +1 -1
  123. package/web/.next/required-server-files.json +1 -1
  124. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +73 -73
  125. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -2
  126. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  127. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +69 -69
  129. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +1 -2
  130. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  131. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  132. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +75 -75
  133. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -2
  134. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  135. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  136. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +91 -91
  137. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -2
  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/server-reference-manifest.json +91 -91
  141. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -2
  142. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  143. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  144. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +71 -71
  145. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -2
  146. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  147. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  148. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +71 -71
  149. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -2
  150. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  151. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  152. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +69 -69
  153. package/web/.next/server/app/(dashboard)/chat/page.js +1 -2
  154. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  155. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  156. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +75 -75
  157. package/web/.next/server/app/(dashboard)/create/page.js +1 -2
  158. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  159. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  160. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +91 -91
  161. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -2
  162. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  163. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  164. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +91 -91
  165. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -2
  166. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  167. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  168. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +69 -69
  169. package/web/.next/server/app/(dashboard)/page.js +1 -2
  170. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  171. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  172. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +71 -71
  173. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -2
  174. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  175. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +71 -71
  177. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -2
  178. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  179. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  180. package/web/.next/server/app/_global-error.html +2 -2
  181. package/web/.next/server/app/_global-error.rsc +1 -1
  182. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  183. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  184. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  185. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  186. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  187. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  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/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  194. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  195. package/web/.next/server/app/features/page.js.nft.json +1 -1
  196. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
  198. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  199. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  200. package/web/.next/server/app/skills/page/server-reference-manifest.json +13 -13
  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/server-reference-manifest.json +11 -11
  204. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  205. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  206. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  207. package/web/.next/server/app/version/page.js.nft.json +1 -1
  208. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  209. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  210. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
  211. package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js +1 -1
  212. package/web/.next/server/chunks/[root-of-the-server]__10852c5c._.js +1 -1
  213. package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js +1 -1
  214. package/web/.next/server/chunks/[root-of-the-server]__2b71641f._.js +1 -1
  215. package/web/.next/server/chunks/[root-of-the-server]__2bb675ff._.js +1 -1
  216. package/web/.next/server/chunks/[root-of-the-server]__31598852._.js +1 -1
  217. package/web/.next/server/chunks/[root-of-the-server]__31944fa2._.js +1 -1
  218. package/web/.next/server/chunks/[root-of-the-server]__32b04219._.js +1 -1
  219. package/web/.next/server/chunks/[root-of-the-server]__4408a5ba._.js +1 -1
  220. package/web/.next/server/chunks/[root-of-the-server]__6565a045._.js +1 -1
  221. package/web/.next/server/chunks/[root-of-the-server]__8a281f8d._.js +1 -1
  222. package/web/.next/server/chunks/[root-of-the-server]__8f8d6afe._.js +1 -1
  223. package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js +1 -1
  224. package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js +1 -1
  225. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  226. package/web/.next/server/chunks/[root-of-the-server]__ab4951b1._.js +1 -1
  227. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +1 -1
  228. package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js +1 -1
  229. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
  230. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  231. package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js +1 -1
  232. package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js +1 -1
  233. package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js +1 -1
  234. package/web/.next/server/chunks/[root-of-the-server]__ea653642._.js +1 -1
  235. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  236. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  237. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  238. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  239. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +1 -1
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__46b10380._.js +3 -0
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__46b10380._.js.map +1 -0
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +2 -2
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b512877._.js +3 -0
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b512877._.js.map +1 -0
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__990dba2d._.js +3 -0
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__990dba2d._.js.map +1 -0
  253. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  254. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  255. package/web/.next/server/chunks/ssr/[root-of-the-server]__cc9c7bbb._.js +3 -0
  256. package/web/.next/server/chunks/ssr/[root-of-the-server]__cc9c7bbb._.js.map +1 -0
  257. package/web/.next/server/chunks/ssr/_02fd22b2._.js +3 -0
  258. package/web/.next/server/chunks/ssr/_02fd22b2._.js.map +1 -0
  259. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  260. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  262. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/_35b56ded._.js +3 -0
  264. package/web/.next/server/chunks/ssr/_35b56ded._.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/{_4cbb7f95._.js → _496c9117._.js} +2 -2
  266. package/web/.next/server/chunks/ssr/{_4cbb7f95._.js.map → _496c9117._.js.map} +1 -1
  267. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  268. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/_6abfa39e._.js +1 -1
  270. package/web/.next/server/chunks/ssr/{_29b58b98._.js → _7c457a33._.js} +2 -2
  271. package/web/.next/server/chunks/ssr/{_29b58b98._.js.map → _7c457a33._.js.map} +1 -1
  272. package/web/.next/server/chunks/ssr/_806df937._.js +4 -0
  273. package/web/.next/server/chunks/ssr/_806df937._.js.map +1 -0
  274. package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
  275. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  276. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  277. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  278. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  279. package/web/.next/server/chunks/ssr/src_presentation_web_06109d28._.js +5 -0
  280. package/web/.next/server/chunks/ssr/src_presentation_web_06109d28._.js.map +1 -0
  281. package/web/.next/server/chunks/ssr/src_presentation_web_0bca70f8._.js +3 -0
  282. package/web/.next/server/chunks/ssr/src_presentation_web_0bca70f8._.js.map +1 -0
  283. package/web/.next/server/chunks/ssr/src_presentation_web_367cdbe0._.js +3 -0
  284. package/web/.next/server/chunks/ssr/src_presentation_web_367cdbe0._.js.map +1 -0
  285. package/web/.next/server/chunks/ssr/src_presentation_web_57fed7fd._.js +3 -0
  286. package/web/.next/server/chunks/ssr/src_presentation_web_57fed7fd._.js.map +1 -0
  287. package/web/.next/server/chunks/ssr/src_presentation_web_7f567f6d._.js +3 -0
  288. package/web/.next/server/chunks/ssr/src_presentation_web_7f567f6d._.js.map +1 -0
  289. package/web/.next/server/chunks/ssr/src_presentation_web_972f58d5._.js +3 -0
  290. package/web/.next/server/chunks/ssr/src_presentation_web_972f58d5._.js.map +1 -0
  291. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +1 -1
  292. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web_a71b18a2._.js +3 -0
  296. package/web/.next/server/chunks/ssr/src_presentation_web_a71b18a2._.js.map +1 -0
  297. package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +2 -2
  298. package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js.map +1 -1
  299. package/web/.next/server/chunks/ssr/src_presentation_web_bebe675e._.js +3 -0
  300. package/web/.next/server/chunks/ssr/src_presentation_web_bebe675e._.js.map +1 -0
  301. package/web/.next/server/chunks/ssr/src_presentation_web_c93e8bc6._.js +3 -0
  302. package/web/.next/server/chunks/ssr/src_presentation_web_c93e8bc6._.js.map +1 -0
  303. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_e729f44a._.js +5 -0
  310. package/web/.next/server/chunks/ssr/src_presentation_web_e729f44a._.js.map +1 -0
  311. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  312. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  313. package/web/.next/server/pages/500.html +2 -2
  314. package/web/.next/server/server-reference-manifest.js +1 -1
  315. package/web/.next/server/server-reference-manifest.json +590 -590
  316. package/web/.next/static/chunks/124b79a5d2a760fb.css +1 -0
  317. package/web/.next/static/chunks/{192e523a9f0e5071.js → 1545e8313e9332bf.js} +1 -1
  318. package/web/.next/static/chunks/{3c66e37dc702475b.js → 26f23df6f2d5c93b.js} +1 -1
  319. package/web/.next/static/chunks/{1d3a8dcbc3f5858e.js → 3812b5ffbdb71036.js} +3 -3
  320. package/web/.next/static/chunks/{73021cde734ba397.js → 3da844a199eb47ba.js} +1 -1
  321. package/web/.next/static/chunks/4052a4971fbbac9c.js +1 -0
  322. package/web/.next/static/chunks/{47cf01554e63af3a.js → 405aa6d885767e6c.js} +1 -1
  323. package/web/.next/static/chunks/{97cfe3feade884be.js → 445b94b64b6b04f4.js} +3 -3
  324. package/web/.next/static/chunks/{241d94501b25fcd6.js → 4bc608dc6b6b4df3.js} +1 -1
  325. package/web/.next/static/chunks/{913b92e59d050146.js → 67c9b5f3f25d4b65.js} +1 -1
  326. package/web/.next/static/chunks/{bb479c31b5b53bac.js → 74c37f189bc83156.js} +2 -2
  327. package/web/.next/static/chunks/8057357cf1f9b4ef.js +1 -0
  328. package/web/.next/static/chunks/8ccba4398e23ab92.js +1 -0
  329. package/web/.next/static/chunks/98a6820ed2bf99f7.js +2 -0
  330. package/web/.next/static/chunks/ad87595a0da986d1.js +1 -0
  331. package/web/.next/static/chunks/{08c621958e83175b.js → bbeb821a2af5c193.js} +1 -1
  332. package/web/.next/static/chunks/{7bb4a040c1567f10.js → e69c1468a1228b59.js} +1 -1
  333. package/web/.next/static/chunks/{6a21973d4b1df590.js → e8768e3ae842d13c.js} +1 -1
  334. package/dist/packages/core/src/application/use-cases/features/reparent-feature.use-case.d.ts +0 -31
  335. package/dist/packages/core/src/application/use-cases/features/reparent-feature.use-case.d.ts.map +0 -1
  336. package/dist/packages/core/src/application/use-cases/features/reparent-feature.use-case.js +0 -127
  337. package/dist/src/presentation/web/app/actions/reparent-feature.d.ts +0 -5
  338. package/dist/src/presentation/web/app/actions/reparent-feature.d.ts.map +0 -1
  339. package/dist/src/presentation/web/app/actions/reparent-feature.js +0 -16
  340. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4869a7bb.js +0 -3
  341. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4869a7bb.js.map +0 -1
  342. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_d92cb436.js +0 -3
  343. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_d92cb436.js.map +0 -1
  344. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_16dd74be.js +0 -3
  345. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_16dd74be.js.map +0 -1
  346. package/web/.next/server/chunks/ssr/[root-of-the-server]__000567d1._.js +0 -3
  347. package/web/.next/server/chunks/ssr/[root-of-the-server]__000567d1._.js.map +0 -1
  348. package/web/.next/server/chunks/ssr/[root-of-the-server]__466d5d10._.js +0 -3
  349. package/web/.next/server/chunks/ssr/[root-of-the-server]__466d5d10._.js.map +0 -1
  350. package/web/.next/server/chunks/ssr/[root-of-the-server]__60b640ad._.js +0 -3
  351. package/web/.next/server/chunks/ssr/[root-of-the-server]__60b640ad._.js.map +0 -1
  352. package/web/.next/server/chunks/ssr/[root-of-the-server]__e68e2b52._.js +0 -3
  353. package/web/.next/server/chunks/ssr/[root-of-the-server]__e68e2b52._.js.map +0 -1
  354. package/web/.next/server/chunks/ssr/_073183f4._.js +0 -3
  355. package/web/.next/server/chunks/ssr/_073183f4._.js.map +0 -1
  356. package/web/.next/server/chunks/ssr/_1cfd3f35._.js +0 -3
  357. package/web/.next/server/chunks/ssr/_1cfd3f35._.js.map +0 -1
  358. package/web/.next/server/chunks/ssr/_a0b8e0f8._.js +0 -4
  359. package/web/.next/server/chunks/ssr/_a0b8e0f8._.js.map +0 -1
  360. package/web/.next/server/chunks/ssr/src_presentation_web_06387c54._.js +0 -3
  361. package/web/.next/server/chunks/ssr/src_presentation_web_06387c54._.js.map +0 -1
  362. package/web/.next/server/chunks/ssr/src_presentation_web_1ccf607e._.js +0 -3
  363. package/web/.next/server/chunks/ssr/src_presentation_web_1ccf607e._.js.map +0 -1
  364. package/web/.next/server/chunks/ssr/src_presentation_web_2c992e9f._.js +0 -5
  365. package/web/.next/server/chunks/ssr/src_presentation_web_2c992e9f._.js.map +0 -1
  366. package/web/.next/server/chunks/ssr/src_presentation_web_476ed91c._.js +0 -5
  367. package/web/.next/server/chunks/ssr/src_presentation_web_476ed91c._.js.map +0 -1
  368. package/web/.next/server/chunks/ssr/src_presentation_web_5b78146e._.js +0 -3
  369. package/web/.next/server/chunks/ssr/src_presentation_web_5b78146e._.js.map +0 -1
  370. package/web/.next/server/chunks/ssr/src_presentation_web_796d2fd5._.js +0 -3
  371. package/web/.next/server/chunks/ssr/src_presentation_web_796d2fd5._.js.map +0 -1
  372. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_3a934437.js +0 -3
  373. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_3a934437.js.map +0 -1
  374. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +0 -3
  375. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +0 -1
  376. package/web/.next/static/chunks/0cf210e5b787a08b.css +0 -1
  377. package/web/.next/static/chunks/0e94e80dd774bdd6.js +0 -2
  378. package/web/.next/static/chunks/62074389c31b349c.js +0 -1
  379. package/web/.next/static/chunks/89666a357f21bc6e.js +0 -1
  380. package/web/.next/static/chunks/f9d948464ed409cb.js +0 -1
  381. package/web/.next/static/chunks/fc0232384ec2b48d.js +0 -1
  382. /package/web/.next/static/{MhvJOx7d-0XyZcYlYxyG7 → k9Ba_bAPumQCPUYFrxLYE}/_buildManifest.js +0 -0
  383. /package/web/.next/static/{MhvJOx7d-0XyZcYlYxyG7 → k9Ba_bAPumQCPUYFrxLYE}/_clientMiddlewareManifest.json +0 -0
  384. /package/web/.next/static/{MhvJOx7d-0XyZcYlYxyG7 → k9Ba_bAPumQCPUYFrxLYE}/_ssgManifest.js +0 -0
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Platform Agent Auth Detector Service
3
+ *
4
+ * Concrete adapter for IAgentAuthDetectorService. Detects whether the user
5
+ * is authenticated with a given AI coding agent using a two-tier strategy:
6
+ *
7
+ * Tier 1 (instant, ~5ms): env vars + credentials file existence + macOS
8
+ * Keychain entry. No subprocess.
9
+ *
10
+ * Tier 2 (subprocess, ~200ms): runs the agent's `auth status` subcommand
11
+ * when one exists. Skipped for Claude Code (no non-interactive auth
12
+ * subcommand — interactive `claude auth status` hangs and gets killed).
13
+ *
14
+ * Conservative by design: any detection failure returns false rather than
15
+ * throwing, so the UI can show "needs auth" instead of crashing.
16
+ *
17
+ * Cross-platform: macOS uses Keychain via `security`, Linux/Windows fall
18
+ * back to the file-based credential location.
19
+ */
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ 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;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ import { execFile, execFileSync } from 'node:child_process';
27
+ import { existsSync } from 'node:fs';
28
+ import { homedir, platform } from 'node:os';
29
+ import { join } from 'node:path';
30
+ import { injectable } from 'tsyringe';
31
+ import { AgentType } from '../../../domain/generated/output.js';
32
+ import { IS_WINDOWS } from '../../platform.js';
33
+ const IS_MACOS = platform() === 'darwin';
34
+ /**
35
+ * On macOS, Claude Code stores OAuth credentials in the Keychain under the
36
+ * service name "Claude Code-credentials" (not in ~/.claude/.credentials.json).
37
+ * Use `security find-generic-password` to detect the entry without reading it.
38
+ */
39
+ function macKeychainHasClaudeCreds() {
40
+ if (!IS_MACOS)
41
+ return false;
42
+ try {
43
+ execFileSync('security', ['find-generic-password', '-s', 'Claude Code-credentials'], {
44
+ stdio: 'ignore',
45
+ timeout: 1500,
46
+ });
47
+ return true;
48
+ }
49
+ catch {
50
+ return false;
51
+ }
52
+ }
53
+ let PlatformAgentAuthDetectorService = class PlatformAgentAuthDetectorService {
54
+ async isAuthenticated(agentType, binaryName) {
55
+ // Tier 1: instant heuristics
56
+ if (!this.tier1AuthCheck(agentType)) {
57
+ return false;
58
+ }
59
+ // Tier 2: optional subprocess verify (best-effort, ~200ms)
60
+ if (binaryName) {
61
+ return this.tier2AuthVerify(agentType, binaryName);
62
+ }
63
+ return true;
64
+ }
65
+ /**
66
+ * Instant credential/env check (~5ms, no subprocess).
67
+ * Returns true if credentials likely exist for this agent type.
68
+ */
69
+ tier1AuthCheck(agentType) {
70
+ const home = homedir();
71
+ switch (agentType) {
72
+ case AgentType.ClaudeCode: {
73
+ if (process.env['ANTHROPIC_API_KEY'])
74
+ return true;
75
+ if (process.env['CLAUDE_CODE_USE_BEDROCK'])
76
+ return true;
77
+ if (process.env['CLAUDE_CODE_USE_VERTEX'])
78
+ return true;
79
+ if (process.env['CLAUDE_CODE_OAUTH_TOKEN'])
80
+ return true;
81
+ // macOS: credentials live in Keychain (no .credentials.json on disk).
82
+ if (macKeychainHasClaudeCreds())
83
+ return true;
84
+ // Linux / Windows: file-based credentials.
85
+ const credPath = join(home, '.claude', '.credentials.json');
86
+ return existsSync(credPath);
87
+ }
88
+ case AgentType.Cursor: {
89
+ if (process.env['CURSOR_API_KEY'])
90
+ return true;
91
+ // Cursor Agent stores creds after `agent login` — check common locations
92
+ const cursorDir = join(home, '.cursor');
93
+ return existsSync(cursorDir);
94
+ }
95
+ case AgentType.GeminiCli: {
96
+ if (process.env['GEMINI_API_KEY'])
97
+ return true;
98
+ if (process.env['GOOGLE_API_KEY'])
99
+ return true;
100
+ if (process.env['GOOGLE_APPLICATION_CREDENTIALS'])
101
+ return true;
102
+ const accountsPath = join(home, '.gemini', 'google_accounts.json');
103
+ return existsSync(accountsPath);
104
+ }
105
+ case AgentType.CopilotCli: {
106
+ if (process.env['GITHUB_TOKEN'])
107
+ return true;
108
+ if (process.env['GH_TOKEN'])
109
+ return true;
110
+ if (process.env['GITHUB_AUTH_TOKEN'])
111
+ return true;
112
+ // GitHub CLI stores creds after `gh auth login` — check common locations
113
+ const ghDir = IS_WINDOWS ? join(home, '.copilot') : join(home, '.config', 'gh');
114
+ return existsSync(ghDir);
115
+ }
116
+ default:
117
+ // dev, aider, continue, codex-cli — assume no auth needed
118
+ return true;
119
+ }
120
+ }
121
+ /**
122
+ * Subprocess verification (~200ms). Only called if tier 1 passes, to
123
+ * confirm tokens aren't expired.
124
+ */
125
+ tier2AuthVerify(agentType, binaryName) {
126
+ return new Promise((resolveAuth) => {
127
+ let cmd;
128
+ let args;
129
+ switch (agentType) {
130
+ case AgentType.ClaudeCode:
131
+ // Claude Code has no non-interactive `auth status` subcommand. Running
132
+ // `claude auth status` launches an interactive session that hangs and
133
+ // gets killed by the timeout, producing a false negative. Trust tier 1
134
+ // (env vars / Keychain on macOS / .credentials.json elsewhere).
135
+ resolveAuth(true);
136
+ return;
137
+ case AgentType.Cursor:
138
+ cmd = binaryName;
139
+ args = ['status'];
140
+ break;
141
+ case AgentType.CopilotCli:
142
+ cmd = 'gh';
143
+ args = ['auth', 'status'];
144
+ break;
145
+ default:
146
+ // No tier 2 command available — trust tier 1
147
+ resolveAuth(true);
148
+ return;
149
+ }
150
+ try {
151
+ const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };
152
+ execFile(cmd, args, opts, (error) => {
153
+ resolveAuth(!error);
154
+ });
155
+ }
156
+ catch {
157
+ resolveAuth(false);
158
+ }
159
+ });
160
+ }
161
+ };
162
+ PlatformAgentAuthDetectorService = __decorate([
163
+ injectable()
164
+ ], PlatformAgentAuthDetectorService);
165
+ export { PlatformAgentAuthDetectorService };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * File System Service Implementation
3
+ *
4
+ * Concrete adapter for IFileSystemService backed by node:fs/promises.
5
+ */
6
+ import type { IFileSystemService } from '../../application/ports/output/services/file-system-service.interface.js';
7
+ export declare class FileSystemService implements IFileSystemService {
8
+ removeDirectory(dirPath: string): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=file-system.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/file-system.service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAC;AAEnH,qBACa,iBAAkB,YAAW,kBAAkB;IACpD,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtD"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * File System Service Implementation
3
+ *
4
+ * Concrete adapter for IFileSystemService backed by node:fs/promises.
5
+ */
6
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
+ 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;
10
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
+ };
12
+ import { rm } from 'node:fs/promises';
13
+ import { injectable } from 'tsyringe';
14
+ let FileSystemService = class FileSystemService {
15
+ async removeDirectory(dirPath) {
16
+ await rm(dirPath, { recursive: true, force: true });
17
+ }
18
+ };
19
+ FileSystemService = __decorate([
20
+ injectable()
21
+ ], FileSystemService);
22
+ export { FileSystemService };
@@ -62,7 +62,6 @@ export declare class GitPrService implements IGitPrService {
62
62
  private parseDiffStat;
63
63
  syncMain(cwd: string, baseBranch: string): Promise<void>;
64
64
  rebaseOnMain(cwd: string, featureBranch: string, baseBranch: string): Promise<void>;
65
- rebaseOnBranch(cwd: string, featureBranch: string, targetBranch: string): Promise<void>;
66
65
  getConflictedFiles(cwd: string): Promise<string[]>;
67
66
  stageFiles(cwd: string, files: string[]): Promise<void>;
68
67
  rebaseContinue(cwd: string): Promise<void>;
@@ -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;AAG1D,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,Q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AC,IAAI,CAAC;IAQlF,OAAO,CAAC,aAAa;IAoBf,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0CxD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyEnF,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkFvF,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAelD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvD,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB1C,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IActD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrC,mBAAmB,CACvB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAe9C"}
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,E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O,CAAC,IAAI,CAAC;IAQpC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrC,mBAAmB,CACvB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAe9C"}
@@ -807,59 +807,6 @@ let GitPrService = class GitPrService {
807
807
  throw new GitPrError(`Rebase of '${featureBranch}' onto '${baseBranch}' failed: ${message}`, GitPrErrorCode.GIT_ERROR, cause);
808
808
  }
809
809
  }
810
- async rebaseOnBranch(cwd, featureBranch, targetBranch) {
811
- // Check for dirty worktree before starting
812
- const dirty = await this.hasUncommittedChanges(cwd);
813
- if (dirty) {
814
- throw new GitPrError(`Cannot rebase: working directory has uncommitted changes. ` +
815
- `Please commit or stash your changes before rebasing.`, GitPrErrorCode.GIT_ERROR);
816
- }
817
- // Fetch the target branch from remote — it may not be locally available
818
- try {
819
- await this.execFile('git', ['fetch', 'origin', targetBranch], { cwd });
820
- }
821
- catch (error) {
822
- const message = error instanceof Error ? error.message : String(error);
823
- const cause = error instanceof Error ? error : undefined;
824
- throw new GitPrError(`Failed to fetch target branch '${targetBranch}': ${message}`, GitPrErrorCode.GIT_ERROR, cause);
825
- }
826
- // Checkout the feature branch
827
- try {
828
- await this.execFile('git', ['checkout', featureBranch], { cwd });
829
- }
830
- catch (error) {
831
- const message = error instanceof Error ? error.message : String(error);
832
- const cause = error instanceof Error ? error : undefined;
833
- if (message.includes('did not match') ||
834
- message.includes('not a commit') ||
835
- message.includes('pathspec')) {
836
- throw new GitPrError(`Branch '${featureBranch}' not found.`, GitPrErrorCode.BRANCH_NOT_FOUND, cause);
837
- }
838
- throw new GitPrError(`Failed to checkout '${featureBranch}': ${message}`, GitPrErrorCode.GIT_ERROR, cause);
839
- }
840
- // Rebase onto origin/<targetBranch>
841
- const rebaseTarget = `origin/${targetBranch}`;
842
- try {
843
- await this.execFile('git', ['rebase', rebaseTarget], { cwd });
844
- }
845
- catch (error) {
846
- const message = error instanceof Error ? error.message : String(error);
847
- const cause = error instanceof Error ? error : undefined;
848
- // Detect rebase conflict from git stderr/exit code
849
- if (message.includes('CONFLICT') || message.includes('could not apply')) {
850
- let conflictedFiles = [];
851
- try {
852
- conflictedFiles = await this.getConflictedFiles(cwd);
853
- }
854
- catch {
855
- // Failed to get conflicted files — still report the conflict
856
- }
857
- const fileList = conflictedFiles.length > 0 ? ` Conflicted files: ${conflictedFiles.join(', ')}` : '';
858
- throw new GitPrError(`Rebase of '${featureBranch}' onto '${targetBranch}' encountered conflicts.${fileList}`, GitPrErrorCode.REBASE_CONFLICT, cause);
859
- }
860
- throw new GitPrError(`Rebase of '${featureBranch}' onto '${targetBranch}' failed: ${message}`, GitPrErrorCode.GIT_ERROR, cause);
861
- }
862
- }
863
810
  async getConflictedFiles(cwd) {
864
811
  try {
865
812
  const { stdout } = await this.execFile('git', ['diff', '--name-only', '--diff-filter=U'], {
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Filesystem Project Scaffold Service
3
+ *
4
+ * Concrete adapter for IProjectScaffoldService. Owns "where projects live"
5
+ * ($SHEP_HOME/projects) and how they are bootstrapped: mkdir + git init +
6
+ * empty initial commit so the canvas can resolve a real HEAD immediately.
7
+ *
8
+ * Cross-platform: uses path.join (no hardcoded separators), windowsHide on
9
+ * spawned processes, and normalizes the returned path to forward slashes.
10
+ */
11
+ import type { IProjectScaffoldService, ScaffoldProjectInput, ScaffoldProjectResult } from '../../../application/ports/output/services/project-scaffold-service.interface.js';
12
+ export declare class FsProjectScaffoldService implements IProjectScaffoldService {
13
+ /**
14
+ * Resolve the projects root lazily so test isolation via SHEP_HOME works
15
+ * even when this adapter is constructed before the env var is set.
16
+ */
17
+ private getProjectsRoot;
18
+ private getProjectPath;
19
+ projectExists(slug: string): Promise<boolean>;
20
+ scaffoldProject(input: ScaffoldProjectInput): Promise<ScaffoldProjectResult>;
21
+ }
22
+ //# sourceMappingURL=fs-project-scaffold.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-project-scaffold.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,kFAAkF,CAAC;AAM1F,qBACa,wBAAyB,YAAW,uBAAuB;IACtE;;;OAGG;IACH,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,cAAc;IAIhB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7C,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAoCnF"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Filesystem Project Scaffold Service
3
+ *
4
+ * Concrete adapter for IProjectScaffoldService. Owns "where projects live"
5
+ * ($SHEP_HOME/projects) and how they are bootstrapped: mkdir + git init +
6
+ * empty initial commit so the canvas can resolve a real HEAD immediately.
7
+ *
8
+ * Cross-platform: uses path.join (no hardcoded separators), windowsHide on
9
+ * spawned processes, and normalizes the returned path to forward slashes.
10
+ */
11
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
12
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14
+ 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;
15
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16
+ };
17
+ import { execFile } from 'node:child_process';
18
+ import { existsSync } from 'node:fs';
19
+ import { mkdir } from 'node:fs/promises';
20
+ import { join } from 'node:path';
21
+ import { promisify } from 'node:util';
22
+ import { injectable } from 'tsyringe';
23
+ import { IS_WINDOWS } from '../../platform.js';
24
+ import { getShepHomeDir } from '../filesystem/shep-directory.service.js';
25
+ const execFileAsync = promisify(execFile);
26
+ let FsProjectScaffoldService = class FsProjectScaffoldService {
27
+ /**
28
+ * Resolve the projects root lazily so test isolation via SHEP_HOME works
29
+ * even when this adapter is constructed before the env var is set.
30
+ */
31
+ getProjectsRoot() {
32
+ return join(getShepHomeDir(), 'projects');
33
+ }
34
+ getProjectPath(slug) {
35
+ return join(this.getProjectsRoot(), slug);
36
+ }
37
+ async projectExists(slug) {
38
+ return existsSync(this.getProjectPath(slug));
39
+ }
40
+ async scaffoldProject(input) {
41
+ const projectPath = this.getProjectPath(input.slug);
42
+ await mkdir(projectPath, { recursive: true });
43
+ // Initialise git so the canvas can resolve a real HEAD immediately
44
+ // (otherwise `git rev-parse HEAD` fails and the repo node is stuck in
45
+ // the "loading" skeleton state). Pass user.name/user.email as command-
46
+ // level config so the empty commit works regardless of whether the user
47
+ // has configured global git identity. Tolerate failures: the folder
48
+ // still exists, so the caller can continue.
49
+ try {
50
+ const opts = IS_WINDOWS ? { cwd: projectPath, windowsHide: true } : { cwd: projectPath };
51
+ await execFileAsync('git', ['init', '-b', 'main'], opts);
52
+ await execFileAsync('git', [
53
+ '-c',
54
+ 'user.name=Shep',
55
+ '-c',
56
+ 'user.email=shep@local',
57
+ 'commit',
58
+ '--allow-empty',
59
+ '-m',
60
+ 'Initial commit',
61
+ ], opts);
62
+ }
63
+ catch (err) {
64
+ // eslint-disable-next-line no-console -- adapter: surface git init failures in dev logs
65
+ console.warn('[FsProjectScaffoldService] git init failed:', err);
66
+ }
67
+ // Normalise to forward slashes per the cross-platform path rule.
68
+ return { path: projectPath.replace(/\\/g, '/') };
69
+ }
70
+ };
71
+ FsProjectScaffoldService = __decorate([
72
+ injectable()
73
+ ], FsProjectScaffoldService);
74
+ export { FsProjectScaffoldService };
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Result shape for the agent auth checklist on the onboarding empty state.
3
+ * Matches CheckAgentAuthResult from the use case 1:1 — kept locally so the
4
+ * web type stays serializable through the Server Actions boundary.
5
+ */
1
6
  export interface AgentAuthStatus {
2
7
  agentType: string;
3
8
  /** Whether the CLI tool binary is installed */
@@ -14,8 +19,11 @@ export interface AgentAuthStatus {
14
19
  authCommand: string | null;
15
20
  }
16
21
  /**
17
- * Check agent tool installation + auth status.
18
- * Uses two-tier detection: instant file/env check, then optional subprocess verify.
22
+ * Thin server-action wrapper around CheckAgentAuthUseCase. All agent-type
23
+ * mapping, tool lookup, and platform credential detection live in:
24
+ *
25
+ * packages/core/src/application/use-cases/agents/check-agent-auth.use-case.ts
26
+ * packages/core/src/infrastructure/services/agent-auth-detector/platform-agent-auth-detector.service.ts
19
27
  */
20
28
  export declare function checkAgentAuth(): Promise<AgentAuthStatus>;
21
29
  //# sourceMappingURL=check-agent-auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-agent-auth.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/check-agent-auth.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,aAAa,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0FAA0F;IAC1F,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,wDAAwD;IACxD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AA6GD;;;GAGG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC,CAwF/D"}
1
+ {"version":3,"file":"check-agent-auth.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/check-agent-auth.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,aAAa,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0FAA0F;IAC1F,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,wDAAwD;IACxD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC,CAG/D"}
@@ -1,205 +1,13 @@
1
1
  'use server';
2
- import { existsSync } from 'node:fs';
3
- import { join } from 'node:path';
4
- import { homedir } from 'node:os';
5
- import { execFile } from 'node:child_process';
6
- import { IS_WINDOWS } from '../../../../../packages/core/src/infrastructure/platform.js';
7
- import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
8
2
  import { resolve } from '../../lib/server-container.js';
9
- const AGENT_LABELS = {
10
- 'claude-code': 'Claude Code',
11
- cursor: 'Cursor Agent',
12
- 'gemini-cli': 'Gemini CLI',
13
- aider: 'Aider',
14
- copilot: 'Copilot CLI',
15
- continue: 'Continue',
16
- dev: 'Demo',
17
- };
18
- const AGENT_TOOL_MAP = {
19
- 'claude-code': 'claude-code',
20
- cursor: 'cursor-cli',
21
- 'gemini-cli': 'gemini-cli',
22
- copilot: 'copilot-cli',
23
- };
24
- const AGENT_BINARY_MAP = {
25
- 'claude-code': 'claude',
26
- cursor: 'cursor-agent',
27
- 'gemini-cli': 'gemini',
28
- copilot: 'copilot',
29
- };
30
3
  /**
31
- * Tier 1: Instant credential/env check (~5ms, no subprocess).
32
- * Returns true if credentials likely exist.
33
- */
34
- function tier1AuthCheck(agentType) {
35
- const home = homedir();
36
- switch (agentType) {
37
- case 'claude-code': {
38
- if (process.env['ANTHROPIC_API_KEY'])
39
- return true;
40
- if (process.env['CLAUDE_CODE_USE_BEDROCK'])
41
- return true;
42
- if (process.env['CLAUDE_CODE_USE_VERTEX'])
43
- return true;
44
- if (process.env['CLAUDE_CODE_OAUTH_TOKEN'])
45
- return true;
46
- const credPath = join(home, '.claude', '.credentials.json');
47
- return existsSync(credPath);
48
- }
49
- case 'cursor': {
50
- if (process.env['CURSOR_API_KEY'])
51
- return true;
52
- // Cursor Agent stores creds after `agent login` — check common locations
53
- const cursorDir = join(home, '.cursor');
54
- return existsSync(cursorDir);
55
- }
56
- case 'gemini-cli': {
57
- if (process.env['GEMINI_API_KEY'])
58
- return true;
59
- if (process.env['GOOGLE_API_KEY'])
60
- return true;
61
- if (process.env['GOOGLE_APPLICATION_CREDENTIALS'])
62
- return true;
63
- const accountsPath = join(home, '.gemini', 'google_accounts.json');
64
- return existsSync(accountsPath);
65
- }
66
- case 'copilot-cli': {
67
- if (process.env['GITHUB_TOKEN'])
68
- return true;
69
- if (process.env['GH_TOKEN'])
70
- return true;
71
- if (process.env['GITHUB_AUTH_TOKEN'])
72
- return true;
73
- // GitHub CLI stores creds after `gh auth login` — check common locations
74
- const ghDir = IS_WINDOWS ? join(home, '.copilot') : join(home, '.config', 'gh');
75
- return existsSync(ghDir);
76
- }
77
- default:
78
- // dev, aider, continue — assume no auth needed
79
- return true;
80
- }
81
- }
82
- /**
83
- * Tier 2: Subprocess verification (~200ms).
84
- * Only called if tier 1 passes, to confirm tokens aren't expired.
85
- */
86
- function tier2AuthVerify(agentType, binaryName) {
87
- return new Promise((resolve) => {
88
- let cmd;
89
- let args;
90
- switch (agentType) {
91
- case 'claude-code':
92
- cmd = binaryName;
93
- args = ['auth', 'status'];
94
- break;
95
- case 'cursor':
96
- cmd = binaryName;
97
- args = ['status'];
98
- break;
99
- case 'copilot-cli':
100
- cmd = 'gh';
101
- args = ['auth', 'status'];
102
- break;
103
- default:
104
- // No tier 2 command available — trust tier 1
105
- resolve(true);
106
- return;
107
- }
108
- try {
109
- const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };
110
- execFile(cmd, args, opts, (error) => {
111
- resolve(!error);
112
- });
113
- }
114
- catch {
115
- resolve(false);
116
- }
117
- });
118
- }
119
- /**
120
- * Check agent tool installation + auth status.
121
- * Uses two-tier detection: instant file/env check, then optional subprocess verify.
4
+ * Thin server-action wrapper around CheckAgentAuthUseCase. All agent-type
5
+ * mapping, tool lookup, and platform credential detection live in:
6
+ *
7
+ * packages/core/src/application/use-cases/agents/check-agent-auth.use-case.ts
8
+ * packages/core/src/infrastructure/services/agent-auth-detector/platform-agent-auth-detector.service.ts
122
9
  */
123
10
  export async function checkAgentAuth() {
124
- let agentType;
125
- try {
126
- agentType = getSettings().agent.type;
127
- }
128
- catch {
129
- return {
130
- agentType: 'unknown',
131
- installed: false,
132
- authenticated: false,
133
- label: 'Unknown',
134
- binaryName: null,
135
- installCommand: null,
136
- authCommand: null,
137
- };
138
- }
139
- const label = AGENT_LABELS[agentType] ?? agentType;
140
- const toolId = AGENT_TOOL_MAP[agentType] ?? null;
141
- const binaryName = AGENT_BINARY_MAP[agentType] ?? null;
142
- // Dev/demo agents — always good
143
- if (!toolId) {
144
- return {
145
- agentType,
146
- installed: true,
147
- authenticated: true,
148
- label,
149
- binaryName: null,
150
- installCommand: null,
151
- authCommand: null,
152
- };
153
- }
154
- // Check if tool is installed (also grab install command from metadata)
155
- let installed = false;
156
- let installCommand = null;
157
- try {
158
- const useCase = resolve('ListToolsUseCase');
159
- const tools = await useCase.execute();
160
- const tool = tools.find((t) => t.id === toolId);
161
- installed = tool?.status.status === 'available';
162
- installCommand = tool?.installCommand ?? null;
163
- }
164
- catch {
165
- installed = false;
166
- }
167
- if (!installed) {
168
- return {
169
- agentType,
170
- installed: false,
171
- authenticated: false,
172
- label,
173
- binaryName,
174
- installCommand,
175
- authCommand: binaryName ? `Install ${label} first` : null,
176
- };
177
- }
178
- // Tier 1: instant file/env check
179
- const tier1 = tier1AuthCheck(agentType);
180
- if (!tier1) {
181
- return {
182
- agentType,
183
- installed: true,
184
- authenticated: false,
185
- label,
186
- binaryName,
187
- installCommand,
188
- authCommand: binaryName,
189
- };
190
- }
191
- // Tier 2: subprocess verify (best effort, ~200ms)
192
- let authenticated = true;
193
- if (binaryName) {
194
- authenticated = await tier2AuthVerify(agentType, binaryName);
195
- }
196
- return {
197
- agentType,
198
- installed: true,
199
- authenticated,
200
- label,
201
- binaryName,
202
- installCommand,
203
- authCommand: authenticated ? null : binaryName,
204
- };
11
+ const useCase = resolve('CheckAgentAuthUseCase');
12
+ return useCase.execute();
205
13
  }
@@ -0,0 +1,16 @@
1
+ export interface CreateProjectFolderResult {
2
+ ok: boolean;
3
+ /** Absolute path to the created folder, normalized to forward slashes. */
4
+ path?: string;
5
+ error?: string;
6
+ }
7
+ /**
8
+ * Thin server-action wrapper around CreateProjectUseCase. All slug rules,
9
+ * existence checks, filesystem mutations, and git bootstrapping live in the
10
+ * use case + IProjectScaffoldService adapter — see:
11
+ *
12
+ * packages/core/src/application/use-cases/projects/create-project.use-case.ts
13
+ * packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.ts
14
+ */
15
+ export declare function createProjectFolder(name: string): Promise<CreateProjectFolderResult>;
16
+ //# sourceMappingURL=create-project-folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-project-folder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/create-project-folder.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,OAAO,CAAC;IACZ,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAO1F"}