@shepai/cli 1.127.3 → 1.129.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/apis/json-schema/EnvironmentConfig.yaml +3 -0
  2. package/apis/json-schema/FeatureFlags.yaml +5 -0
  3. package/apis/json-schema/Repository.yaml +3 -0
  4. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +4 -0
  5. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +118 -0
  7. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -0
  8. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +58 -0
  9. package/dist/packages/core/src/application/ports/output/services/index.d.ts +2 -0
  10. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  11. package/dist/packages/core/src/application/ports/output/services/index.js +1 -0
  12. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts +1 -0
  13. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
  14. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +46 -15
  15. package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts +31 -0
  16. package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.js +86 -0
  18. package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.d.ts +13 -0
  19. package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/use-cases/repositories/list-github-repositories.use-case.js +35 -0
  21. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  22. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +2 -0
  23. package/dist/packages/core/src/domain/generated/output.d.ts +12 -0
  24. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  25. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/di/container.js +12 -0
  27. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts +1 -0
  28. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.js +2 -0
  30. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
  31. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  32. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
  33. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.d.ts +12 -0
  34. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.d.ts.map +1 -0
  35. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/040-add-repository-remote-url.js +29 -0
  36. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.d.ts +11 -0
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.d.ts.map +1 -0
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/041-add-feature-flag-github-import.js +17 -0
  39. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +3 -0
  40. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
  41. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +38 -2
  42. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  43. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
  44. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +18 -0
  45. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -0
  46. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +171 -0
  47. package/dist/src/presentation/cli/commands/feat/del.command.d.ts +2 -1
  48. package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -1
  49. package/dist/src/presentation/cli/commands/feat/del.command.js +28 -2
  50. package/dist/src/presentation/cli/commands/repo/add.command.d.ts +13 -0
  51. package/dist/src/presentation/cli/commands/repo/add.command.d.ts.map +1 -0
  52. package/dist/src/presentation/cli/commands/repo/add.command.js +82 -0
  53. package/dist/src/presentation/cli/commands/repo/index.d.ts +1 -0
  54. package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
  55. package/dist/src/presentation/cli/commands/repo/index.js +4 -1
  56. package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts +33 -0
  57. package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts.map +1 -0
  58. package/dist/src/presentation/tui/wizards/github-import.wizard.js +121 -0
  59. package/dist/src/presentation/web/app/actions/delete-feature.d.ts +1 -1
  60. package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -1
  61. package/dist/src/presentation/web/app/actions/delete-feature.js +3 -1
  62. package/dist/src/presentation/web/app/actions/import-github-repository.d.ts +11 -0
  63. package/dist/src/presentation/web/app/actions/import-github-repository.d.ts.map +1 -0
  64. package/dist/src/presentation/web/app/actions/import-github-repository.js +27 -0
  65. package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts +11 -0
  66. package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts.map +1 -0
  67. package/dist/src/presentation/web/app/actions/list-github-repositories.js +17 -0
  68. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts +4 -3
  69. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts.map +1 -1
  70. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.js +22 -5
  71. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  72. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +3 -3
  73. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts +2 -1
  74. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts +1 -1
  76. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -1
  77. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +12 -2
  78. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +3 -0
  79. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -1
  80. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +17 -0
  81. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -1
  82. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  83. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  84. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +3 -3
  85. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.d.ts +8 -0
  86. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.d.ts.map +1 -0
  87. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.js +33 -0
  88. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts +10 -0
  89. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts.map +1 -0
  90. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.js +26 -0
  91. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts +15 -0
  92. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts.map +1 -0
  93. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +52 -0
  94. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts +10 -0
  95. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts.map +1 -0
  96. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.js +78 -0
  97. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.d.ts +7 -0
  98. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.d.ts.map +1 -0
  99. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.js +46 -0
  100. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts +10 -0
  101. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts.map +1 -0
  102. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.js +29 -0
  103. package/dist/src/presentation/web/components/common/github-import-dialog/index.d.ts +4 -0
  104. package/dist/src/presentation/web/components/common/github-import-dialog/index.d.ts.map +1 -0
  105. package/dist/src/presentation/web/components/common/github-import-dialog/index.js +3 -0
  106. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  107. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +2 -2
  108. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -1
  109. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  110. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +2 -2
  111. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  112. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +9 -1
  113. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  114. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
  115. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  116. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +5 -0
  117. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  118. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
  119. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
  120. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +56 -27
  121. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  122. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +7 -1
  123. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  124. package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
  125. package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
  126. package/dist/src/presentation/web/hooks/use-graph-state.js +1 -1
  127. package/dist/src/presentation/web/lib/derive-graph.d.ts +1 -1
  128. package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
  129. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
  130. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  131. package/dist/src/presentation/web/lib/feature-flags.js +5 -0
  132. package/dist/tsconfig.build.tsbuildinfo +1 -1
  133. package/package.json +1 -1
  134. package/web/.next/BUILD_ID +1 -1
  135. package/web/.next/build-manifest.json +2 -2
  136. package/web/.next/fallback-build-manifest.json +2 -2
  137. package/web/.next/prerender-manifest.json +3 -3
  138. package/web/.next/required-server-files.js +2 -2
  139. package/web/.next/required-server-files.json +2 -2
  140. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +74 -44
  141. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +3 -3
  142. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  143. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  144. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +74 -44
  145. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +3 -3
  146. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  147. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  148. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +86 -56
  149. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
  150. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  151. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  152. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +86 -56
  153. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
  154. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  155. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  156. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +70 -40
  157. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +3 -3
  158. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  159. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  160. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +74 -44
  161. package/web/.next/server/app/(dashboard)/create/page.js +3 -3
  162. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  163. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  164. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +86 -56
  165. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
  166. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  167. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  168. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +86 -56
  169. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
  170. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  171. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  172. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +70 -40
  173. package/web/.next/server/app/(dashboard)/page.js +3 -3
  174. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  175. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +70 -40
  177. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +3 -3
  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 +32 -2
  188. package/web/.next/server/app/_not-found/page.js +1 -1
  189. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  190. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  191. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  192. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  193. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  194. package/web/.next/server/app/settings/page/server-reference-manifest.json +42 -12
  195. package/web/.next/server/app/settings/page.js +2 -2
  196. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  197. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  198. package/web/.next/server/app/skills/page/server-reference-manifest.json +42 -12
  199. package/web/.next/server/app/skills/page.js +2 -1
  200. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  201. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  202. package/web/.next/server/app/tools/page/server-reference-manifest.json +42 -12
  203. package/web/.next/server/app/tools/page.js +2 -1
  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 +32 -2
  207. package/web/.next/server/app/version/page.js +2 -2
  208. package/web/.next/server/app/version/page.js.nft.json +1 -1
  209. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  210. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  211. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  212. package/web/.next/server/chunks/[root-of-the-server]__dcd4f847._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js +3 -0
  214. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js.map +1 -0
  215. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  216. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js +3 -0
  218. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js.map +1 -0
  219. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js +3 -0
  220. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js.map +1 -0
  221. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js +3 -0
  222. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js.map +1 -0
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js +3 -0
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js.map +1 -0
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js +4 -0
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js.map +1 -0
  227. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +3 -0
  228. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js.map +1 -0
  229. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +4 -0
  230. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -0
  231. package/web/.next/server/chunks/ssr/[root-of-the-server]__60684242._.js +4 -0
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__60684242._.js.map +1 -0
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6cc70784._.js → [root-of-the-server]__755cfe02._.js} +2 -2
  236. package/web/.next/server/chunks/ssr/{[root-of-the-server]__430169b6._.js.map → [root-of-the-server]__755cfe02._.js.map} +1 -1
  237. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +4 -0
  238. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -0
  239. package/web/.next/server/chunks/ssr/{[root-of-the-server]__34323a67._.js → [root-of-the-server]__a21eef5a._.js} +2 -2
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__a21eef5a._.js.map +1 -0
  241. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1aa034e9._.js → [root-of-the-server]__a628fb91._.js} +2 -2
  242. package/web/.next/server/chunks/ssr/{[root-of-the-server]__e44ae5ca._.js.map → [root-of-the-server]__a628fb91._.js.map} +1 -1
  243. package/web/.next/server/chunks/ssr/{[root-of-the-server]__e44ae5ca._.js → [root-of-the-server]__bfba58e6._.js} +2 -2
  244. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6cc70784._.js.map → [root-of-the-server]__bfba58e6._.js.map} +1 -1
  245. package/web/.next/server/chunks/ssr/{[root-of-the-server]__430169b6._.js → [root-of-the-server]__c3ab8422._.js} +2 -2
  246. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1aa034e9._.js.map → [root-of-the-server]__c3ab8422._.js.map} +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__d61bd462._.js +3 -0
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__d61bd462._.js.map +1 -0
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js +4 -0
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js.map +1 -0
  251. package/web/.next/server/chunks/ssr/{_918887c5._.js → _0020fddd._.js} +2 -2
  252. package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -0
  253. package/web/.next/server/chunks/ssr/_01046927._.js +9 -0
  254. package/web/.next/server/chunks/ssr/_01046927._.js.map +1 -0
  255. package/web/.next/server/chunks/ssr/{_2f6f48b8._.js → _02ec1aea._.js} +2 -2
  256. package/web/.next/server/chunks/ssr/{_2f6f48b8._.js.map → _02ec1aea._.js.map} +1 -1
  257. package/web/.next/server/chunks/ssr/_04c9e229._.js +3 -0
  258. package/web/.next/server/chunks/ssr/_04c9e229._.js.map +1 -0
  259. package/web/.next/server/chunks/ssr/_67104d9e._.js +3 -0
  260. package/web/.next/server/chunks/ssr/_67104d9e._.js.map +1 -0
  261. package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
  262. package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
  264. package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
  265. package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
  266. package/web/.next/server/chunks/ssr/{_4207f708._.js → _ade68272._.js} +2 -2
  267. package/web/.next/server/chunks/ssr/_ade68272._.js.map +1 -0
  268. package/web/.next/server/chunks/ssr/_b4b8a636._.js +3 -0
  269. package/web/.next/server/chunks/ssr/_b4b8a636._.js.map +1 -0
  270. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  271. package/web/.next/server/chunks/ssr/_d8575088._.js +3 -0
  272. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -0
  273. package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
  274. package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +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/node_modules__pnpm_55c7a131._.js +3 -0
  278. package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js.map +1 -0
  279. package/web/.next/server/chunks/ssr/{src_presentation_web_0f98f202._.js → src_presentation_web_12d7d3c5._.js} +2 -2
  280. package/web/.next/server/chunks/ssr/{src_presentation_web_0f98f202._.js.map → src_presentation_web_12d7d3c5._.js.map} +1 -1
  281. package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js +5 -0
  282. package/web/.next/server/chunks/ssr/{src_presentation_web_9db47db7._.js.map → src_presentation_web_8e7fe0d1._.js.map} +1 -1
  283. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js +3 -0
  284. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js.map +1 -0
  285. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +3 -0
  286. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -0
  287. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +3 -0
  288. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -0
  289. package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js +5 -0
  290. package/web/.next/server/chunks/ssr/{src_presentation_web_ede4a227._.js.map → src_presentation_web_b9023017._.js.map} +1 -1
  291. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js +3 -0
  292. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js.map +1 -0
  293. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  296. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  297. package/web/.next/server/pages/500.html +2 -2
  298. package/web/.next/server/server-reference-manifest.js +1 -1
  299. package/web/.next/server/server-reference-manifest.json +520 -294
  300. package/web/.next/static/chunks/114347d98fd69f40.js +1 -0
  301. package/web/.next/static/chunks/20ff528aadba66aa.js +1 -0
  302. package/web/.next/static/chunks/278f99f8cc87ab17.js +1 -0
  303. package/web/.next/static/chunks/29535b9b36889453.js +1 -0
  304. package/web/.next/static/chunks/314b8314f77d6921.js +1 -0
  305. package/web/.next/static/chunks/3e1e0f9bde3530d2.js +1 -0
  306. package/web/.next/static/chunks/601d93593f5f664f.js +1 -0
  307. package/web/.next/static/chunks/{fa373c6f8139a712.js → 60464e75e7dff8f4.js} +2 -2
  308. package/web/.next/static/chunks/60fabfee2f9ae935.js +1 -0
  309. package/web/.next/static/chunks/688971d5bad5dc7c.js +1 -0
  310. package/web/.next/static/chunks/6c6ab4d42b07fb4b.js +1 -0
  311. package/web/.next/static/chunks/6cba93f351d29ae4.js +1 -0
  312. package/web/.next/static/chunks/{41c7cee55ef51fc8.js → 83ae4f574f3dee4d.js} +1 -1
  313. package/web/.next/static/chunks/{62a58d2f3cd5f35f.js → 98b6ea0af565042f.js} +2 -2
  314. package/web/.next/static/chunks/98dfbecc5ee30ce1.css +1 -0
  315. package/web/.next/static/chunks/ab3f7ac1960397d9.js +1 -0
  316. package/web/.next/static/chunks/c975a20b880c47ea.js +1 -0
  317. package/web/.next/static/chunks/d34a91958ca566fa.js +13 -0
  318. package/web/.next/static/chunks/f259386f4875e70c.js +1 -0
  319. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js +0 -3
  320. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_fbb88113.js.map +0 -1
  321. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js +0 -3
  322. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_fdfbf5cc.js.map +0 -1
  323. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js +0 -3
  324. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_d8fa0b5f.js.map +0 -1
  325. package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js +0 -3
  326. package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js.map +0 -1
  327. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +0 -3
  328. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js.map +0 -1
  329. package/web/.next/server/chunks/ssr/[root-of-the-server]__34323a67._.js.map +0 -1
  330. package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js +0 -4
  331. package/web/.next/server/chunks/ssr/[root-of-the-server]__357de47c._.js.map +0 -1
  332. package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js +0 -4
  333. package/web/.next/server/chunks/ssr/[root-of-the-server]__67fe07fe._.js.map +0 -1
  334. package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js +0 -3
  335. package/web/.next/server/chunks/ssr/[root-of-the-server]__68c2d48e._.js.map +0 -1
  336. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +0 -4
  337. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +0 -1
  338. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +0 -4
  339. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +0 -1
  340. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +0 -4
  341. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js.map +0 -1
  342. package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js +0 -4
  343. package/web/.next/server/chunks/ssr/[root-of-the-server]__a50a7e39._.js.map +0 -1
  344. package/web/.next/server/chunks/ssr/_1bb79fe8._.js +0 -3
  345. package/web/.next/server/chunks/ssr/_1bb79fe8._.js.map +0 -1
  346. package/web/.next/server/chunks/ssr/_4207f708._.js.map +0 -1
  347. package/web/.next/server/chunks/ssr/_583a83fb._.js +0 -3
  348. package/web/.next/server/chunks/ssr/_583a83fb._.js.map +0 -1
  349. package/web/.next/server/chunks/ssr/_918887c5._.js.map +0 -1
  350. package/web/.next/server/chunks/ssr/_9f56cf8f._.js +0 -3
  351. package/web/.next/server/chunks/ssr/_9f56cf8f._.js.map +0 -1
  352. package/web/.next/server/chunks/ssr/_a187fd7e._.js +0 -3
  353. package/web/.next/server/chunks/ssr/_a187fd7e._.js.map +0 -1
  354. package/web/.next/server/chunks/ssr/_a5aa6371._.js +0 -9
  355. package/web/.next/server/chunks/ssr/_a5aa6371._.js.map +0 -1
  356. package/web/.next/server/chunks/ssr/_b730ac57._.js +0 -3
  357. package/web/.next/server/chunks/ssr/_b730ac57._.js.map +0 -1
  358. package/web/.next/server/chunks/ssr/_fae9e550._.js +0 -3
  359. package/web/.next/server/chunks/ssr/_fae9e550._.js.map +0 -1
  360. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js +0 -3
  361. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +0 -1
  362. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +0 -3
  363. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +0 -1
  364. package/web/.next/server/chunks/ssr/src_presentation_web_9db47db7._.js +0 -5
  365. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js +0 -3
  366. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f66cd328.js.map +0 -1
  367. package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js +0 -3
  368. package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js.map +0 -1
  369. package/web/.next/server/chunks/ssr/src_presentation_web_ede4a227._.js +0 -5
  370. package/web/.next/static/chunks/01ba448cf76c6014.js +0 -1
  371. package/web/.next/static/chunks/05e9c71e5e4cf531.js +0 -1
  372. package/web/.next/static/chunks/33d2f67ad4814aba.css +0 -1
  373. package/web/.next/static/chunks/534e18ee1fbd8452.js +0 -1
  374. package/web/.next/static/chunks/8080c842b0358904.js +0 -1
  375. package/web/.next/static/chunks/9b2a23851096f1aa.js +0 -1
  376. package/web/.next/static/chunks/a67c9c6125c1aa32.js +0 -1
  377. package/web/.next/static/chunks/a8ba3f3e2b0f87aa.js +0 -1
  378. package/web/.next/static/chunks/abc3f71a05ccbdfe.js +0 -1
  379. package/web/.next/static/chunks/c1f3db103c2b226f.js +0 -1
  380. package/web/.next/static/chunks/cca0f5112a9260d8.js +0 -1
  381. package/web/.next/static/chunks/cd45aed9c46e1bf5.js +0 -11
  382. package/web/.next/static/chunks/d04de4be30ab78ca.js +0 -3
  383. package/web/.next/static/chunks/d47658be0870a4b9.js +0 -1
  384. package/web/.next/static/chunks/d8e86e8e5bb7cc0a.js +0 -1
  385. package/web/.next/static/chunks/f9667ee1e5b445b7.js +0 -1
  386. /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_buildManifest.js +0 -0
  387. /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_clientMiddlewareManifest.json +0 -0
  388. /package/web/.next/static/{hWrKuop_3FR0syZrFWLvn → _hAwvNHgk12VPT5IIxRV6}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/app/actions/deploy-feature.ts","../../../../../../../packages/core/src/infrastructure/services/deployment/deployment-logger.ts","../../../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.ts","../../../../../../../src/presentation/web/app/actions/deploy-repository.ts","../../../../../../../src/presentation/web/app/actions/stop-deployment.ts","../../../../../../../src/presentation/web/app/actions/get-deployment-status.ts","../../../../../../../src/presentation/web/app/actions/get-deployment-logs.ts","../../../../../../../packages/core/src/infrastructure/services/tool-installer/tool-metadata.ts","../../../../../../../src/presentation/web/app/actions/get-all-agent-models.ts","../../../../../../../src/presentation/web/lib/model-metadata.ts","../../../../../../../src/presentation/web/app/actions/update-agent-and-model.ts","../../../../../../../src/presentation/web/app/actions/open-ide.ts","../../../../../../../src/presentation/web/app/actions/open-shell.ts","../../../../../../../src/presentation/web/app/actions/open-folder.ts","../../../../../../../src/presentation/web/app/actions/agent-setup-flag.ts","../../../../../../../src/presentation/web/app/actions/check-agent-auth.ts","../../../../../../../src/presentation/web/app/actions/delete-feature.ts","../../../../../../../src/presentation/web/app/actions/resume-feature.ts","../../../../../../../src/presentation/web/app/actions/start-feature.ts","../../../../../../../src/presentation/web/app/actions/stop-feature.ts","../../../../../../../src/presentation/web/app/actions/add-repository.ts","../../../../../../../src/presentation/web/app/actions/delete-repository.ts","../../../../../../../src/presentation/web/app/actions/get-feature-metadata.ts"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { resolve } from '@/lib/server-container';\nimport { createDeploymentLogger } from '@shepai/core/infrastructure/services/deployment/deployment-logger';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\nimport { DeploymentState } from '@shepai/core/domain/generated/output';\n\nconst log = createDeploymentLogger('[deployFeature]');\n\nexport async function deployFeature(\n featureId: string\n): Promise<{ success: boolean; error?: string; state?: DeploymentState }> {\n log.info(`called — featureId=\"${featureId}\"`);\n\n if (!featureId?.trim()) {\n log.warn('rejected — featureId is empty');\n return { success: false, error: 'featureId is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n log.warn(`feature not found in repository: \"${featureId}\"`);\n return { success: false, error: `Feature not found: ${featureId}` };\n }\n\n log.info(\n `feature found — repositoryPath=\"${feature.repositoryPath}\", branch=\"${feature.branch}\"`\n );\n\n const worktreePath = computeWorktreePath(feature.repositoryPath, feature.branch);\n log.info(`computed worktreePath=\"${worktreePath}\"`);\n\n if (!existsSync(worktreePath)) {\n log.warn(`worktree path does not exist on disk: \"${worktreePath}\"`);\n return { success: false, error: `Worktree path does not exist: ${worktreePath}` };\n }\n\n log.info('worktree path exists, calling deploymentService.start()');\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n deploymentService.start(featureId, worktreePath, 'feature');\n\n log.info('start() returned successfully — state=Booting');\n return { success: true, state: DeploymentState.Booting };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to deploy feature';\n log.error(`error: ${message}`, error);\n return { success: false, error: message };\n }\n}\n","/* eslint-disable no-console */\n\n/**\n * Debug-gated logger for deployment services.\n *\n * - `info` and `debug` only emit when `process.env.DEBUG` is set.\n * - `warn` and `error` always emit (they indicate real problems).\n */\n\nconst noop = () => undefined;\n\nexport function createDeploymentLogger(prefix: string) {\n const isDebug = !!process.env.DEBUG;\n\n return {\n info: isDebug ? (...args: unknown[]) => console.info(prefix, ...args) : noop,\n debug: isDebug ? (...args: unknown[]) => console.debug(prefix, ...args) : noop,\n warn: (...args: unknown[]) => console.warn(prefix, ...args),\n error: (...args: unknown[]) => console.error(prefix, ...args),\n };\n}\n","/**\n * Compute Worktree Path\n *\n * Pure utility that computes the filesystem path for a feature's git worktree\n * given a repository path and branch name.\n *\n * Path format: ~/.shep/repos/<sha256-hash-prefix>/wt/<branch-slug>\n */\n\nimport { createHash } from 'node:crypto';\nimport { join } from 'node:path';\nimport { getShepHomeDir } from '../filesystem/shep-directory.service';\n\n/**\n * Compute the worktree path for a given repository and branch.\n *\n * @param repoPath - Absolute path to the repository\n * @param branch - Git branch name (slashes are replaced with hyphens)\n * @returns Absolute path to the worktree directory under ~/.shep/repos/\n */\nexport function computeWorktreePath(repoPath: string, branch: string): string {\n // Normalize separators before hashing so C:\\foo and C:/foo produce the same hash\n const normalizedRepoPath = repoPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const slug = branch.replace(/\\//g, '-');\n return join(getShepHomeDir(), 'repos', repoHash, 'wt', slug).replace(/\\\\/g, '/');\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { isAbsolute } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport { createDeploymentLogger } from '@shepai/core/infrastructure/services/deployment/deployment-logger';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\nimport { DeploymentState } from '@shepai/core/domain/generated/output';\n\nconst log = createDeploymentLogger('[deployRepository]');\n\nexport async function deployRepository(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; state?: DeploymentState }> {\n log.info(`called — repositoryPath=\"${repositoryPath}\"`);\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n log.warn('rejected — not an absolute path');\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n log.warn(`directory does not exist: \"${repositoryPath}\"`);\n return { success: false, error: `Directory does not exist: ${repositoryPath}` };\n }\n\n log.info('directory exists, calling deploymentService.start()');\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n deploymentService.start(repositoryPath, repositoryPath, 'repository');\n\n log.info('start() returned successfully — state=Booting');\n return { success: true, state: DeploymentState.Booting };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to deploy repository';\n log.error(`error: ${message}`, error);\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function stopDeployment(\n targetId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!targetId?.trim()) {\n return { success: false, error: 'targetId is required' };\n }\n\n try {\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n await deploymentService.stop(targetId);\n\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to stop deployment';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type {\n IDeploymentService,\n DeploymentStatus,\n} from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function getDeploymentStatus(targetId: string): Promise<DeploymentStatus | null> {\n if (!targetId?.trim()) {\n return null;\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n return deploymentService.getStatus(targetId);\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type {\n IDeploymentService,\n LogEntry,\n} from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function getDeploymentLogs(targetId: string): Promise<LogEntry[] | null> {\n if (!targetId?.trim()) {\n return null;\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n return deploymentService.getLogs(targetId);\n}\n","/**\n * Tool Installation Metadata\n *\n * Dynamically loads tool definitions from individual JSON files in the tools/ directory.\n * Each JSON file defines installation commands and metadata for a single development tool.\n *\n * To add a new tool, create a JSON file in tools/ matching the ToolMetadata schema:\n * tools/<tool-name>.json\n */\n\nimport { readdirSync, readFileSync } from 'node:fs';\nimport { join, basename } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport interface ToolMetadata {\n /** Human-readable display name */\n name: string;\n\n /** Short one-line summary */\n summary: string;\n\n /** Detailed description */\n description: string;\n\n /** Tool tags for grouping in listings. A tool can belong to multiple categories. */\n tags: ('ide' | 'cli-agent' | 'vcs' | 'terminal')[];\n\n /** Company or developer name */\n author?: string;\n\n /** Main website/homepage URL (separate from documentation) */\n website?: string;\n\n /** Supported platforms (os.platform() values) */\n platforms?: ('linux' | 'darwin' | 'win32')[];\n\n /** URL to the tool's icon/logo image */\n iconUrl?: string;\n\n /** Binary name to check with 'which' command (string or per-platform map) */\n binary: string | Record<string, string>;\n\n /** Package manager or installation method */\n packageManager: string;\n\n /** Platform-specific installation commands as shell strings (keyed by os.platform()) */\n commands: Record<string, string>;\n\n /** Installation timeout in milliseconds */\n timeout: number;\n\n /** Official documentation URL */\n documentationUrl: string;\n\n /** Command to verify installation (e.g., \"code --version\") */\n verifyCommand: string;\n\n /** Whether the tool supports automated installation (default: true) */\n autoInstall?: boolean;\n\n /** Whether this tool is required for the platform to function (default: false) */\n required?: boolean;\n\n /** Command to open a directory in this tool.\n * String format: \"code {dir}\" — single command for all platforms.\n * Object format: { \"linux\": \"antigravity {dir}\", \"darwin\": \"agy {dir}\" } — per-platform commands. */\n openDirectory?: string | Record<string, string>;\n\n /** Override default spawn options for the launch process.\n * Defaults: { detached: true, stdio: \"ignore\" } (GUI IDEs).\n * CLI agents should use { shell: true, stdio: \"inherit\" } to run in the current terminal. */\n spawnOptions?: {\n shell?: boolean;\n stdio?: 'ignore' | 'inherit' | 'pipe';\n detached?: boolean;\n };\n\n /** Platform-specific command to launch this tool in a new terminal window.\n * Used when launching from the web UI where no terminal is available.\n * When set, the launcher spawns a new terminal window with this command.\n * Supports {dir} placeholder like openDirectory.\n * Example: \"x-terminal-emulator -e bash -c 'cd {dir} && claude'\" */\n terminalCommand?: string | Record<string, string>;\n}\n\nconst REQUIRED_FIELDS: (keyof ToolMetadata)[] = [\n 'name',\n 'summary',\n 'description',\n 'tags',\n 'binary',\n 'packageManager',\n 'commands',\n 'timeout',\n 'documentationUrl',\n 'verifyCommand',\n];\n\nfunction loadToolMetadata(): Record<string, ToolMetadata> {\n // NOTE: This module uses import.meta.url to resolve the tools/ directory.\n // It works correctly when loaded in the Node.js CLI bootstrap context but\n // breaks when bundled by Turbopack (import.meta.url points to the chunk\n // location where tools/ doesn't exist). API routes should access tool\n // metadata via the DI container, not by importing this module directly.\n const toolsDir = join(fileURLToPath(import.meta.url), '..', 'tools');\n const metadata: Record<string, ToolMetadata> = {};\n\n let files: string[];\n try {\n files = readdirSync(toolsDir).filter((f) => f.endsWith('.json'));\n } catch {\n return metadata;\n }\n\n for (const file of files) {\n const toolName = basename(file, '.json');\n try {\n const raw = readFileSync(join(toolsDir, file), 'utf-8');\n const parsed = JSON.parse(raw) as ToolMetadata;\n\n const missing = REQUIRED_FIELDS.filter((field) => !(field in parsed));\n if (missing.length > 0) {\n continue;\n }\n\n metadata[toolName] = parsed;\n } catch {\n // Skip malformed JSON files\n }\n }\n\n return metadata;\n}\n\nexport const TOOL_METADATA: Record<string, ToolMetadata> = loadToolMetadata();\n\n/**\n * Returns entries from TOOL_METADATA that can open a directory as an IDE.\n * A tool qualifies if it has an `openDirectory` field, regardless of category.\n * Each entry is [toolId, metadata].\n */\nexport function getIdeEntries(): [string, ToolMetadata][] {\n return Object.entries(TOOL_METADATA).filter(([, meta]) => meta.openDirectory != null);\n}\n\n/**\n * Returns entries from TOOL_METADATA tagged as \"terminal\" that have an\n * `openDirectory` field. Each entry is [toolId, metadata].\n */\nexport function getTerminalEntries(): [string, ToolMetadata][] {\n return Object.entries(TOOL_METADATA).filter(\n ([, meta]) => meta.tags.includes('terminal') && meta.openDirectory != null\n );\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport type { IAgentExecutorFactory } from '@shepai/core/application/ports/output/agents/agent-executor-factory.interface';\n\nexport interface ModelInfo {\n id: string;\n displayName: string;\n description: string;\n}\n\nexport interface AgentModelGroup {\n agentType: string;\n label: string;\n models: ModelInfo[];\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor CLI',\n 'gemini-cli': 'Gemini CLI',\n dev: 'Demo',\n};\n\n/** Sort weight — higher = further down. Demo always last. */\nconst AGENT_ORDER: Record<string, number> = {\n 'claude-code': 0,\n cursor: 1,\n 'gemini-cli': 2,\n dev: 99,\n};\n\nexport async function getAllAgentModels(): Promise<AgentModelGroup[]> {\n try {\n const factory = resolve<IAgentExecutorFactory>('IAgentExecutorFactory');\n const agents = factory.getSupportedAgents();\n return agents\n .map((agentType) => ({\n agentType: agentType as string,\n label: AGENT_LABELS[agentType as string] ?? (agentType as string),\n models: factory.getSupportedModels(agentType).map((id) => ({\n id,\n ...getModelMeta(id),\n })),\n }))\n .map((g) => {\n // Dev agent gets fun demo models\n if (g.agentType === 'dev' && g.models.length === 0) {\n return {\n ...g,\n models: [\n { id: 'gpt-8', ...getModelMeta('gpt-8') },\n { id: 'opus-7', ...getModelMeta('opus-7') },\n ],\n };\n }\n return g;\n })\n .filter((g) => g.models.length > 0)\n .sort((a, b) => (AGENT_ORDER[a.agentType] ?? 50) - (AGENT_ORDER[b.agentType] ?? 50));\n } catch {\n return [];\n }\n}\n","export interface ModelMeta {\n displayName: string;\n description: string;\n}\n\n/**\n * Presentation-layer metadata for known LLM model identifiers.\n * Maps raw model IDs to human-friendly display names and short descriptions.\n */\nconst MODEL_METADATA: Record<string, ModelMeta> = {\n // Claude models\n 'claude-opus-4-6': { displayName: 'Opus 4.6', description: 'Most capable, complex tasks' },\n 'claude-sonnet-4-6': { displayName: 'Sonnet 4.6', description: 'Fast & balanced' },\n 'claude-haiku-4-5': { displayName: 'Haiku 4.5', description: 'Lightweight & quick' },\n\n // Gemini models\n 'gemini-3.1-pro': { displayName: 'Gemini 3.1 Pro', description: 'Advanced reasoning' },\n 'gemini-3-flash': { displayName: 'Gemini 3 Flash', description: 'Ultra-fast responses' },\n 'gemini-2.5-pro': { displayName: 'Gemini 2.5 Pro', description: 'Reliable workhorse' },\n 'gemini-2.5-flash': { displayName: 'Gemini 2.5 Flash', description: 'Speed-optimized' },\n\n // OpenAI models\n 'gpt-5.4-high': { displayName: 'GPT-5.4', description: 'Latest reasoning model' },\n 'gpt-5.2': { displayName: 'GPT-5.2', description: 'Flagship model' },\n 'gpt-5.3-codex': { displayName: 'GPT-5.3 Codex', description: 'Code specialist' },\n\n // Other\n 'composer-1.5': { displayName: 'Composer 1.5', description: 'Multi-file editing' },\n 'grok-code': { displayName: 'Grok Code', description: 'xAI code model' },\n\n // Demo / fun models\n 'gpt-8': { displayName: 'GPT-8', description: 'Writes code before you think it' },\n 'opus-7': { displayName: 'Opus 7', description: 'Achieved consciousness, ships on time' },\n};\n\nconst FALLBACK: ModelMeta = { displayName: '', description: '' };\n\nexport function getModelMeta(modelId: string): ModelMeta {\n const meta = MODEL_METADATA[modelId];\n if (meta) return meta;\n // Fallback: prettify the raw ID\n return {\n ...FALLBACK,\n displayName: modelId\n .replace(/^claude-/, '')\n .replace(/^gemini-/, 'Gemini ')\n .replace(/^gpt-/, 'GPT-')\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase()),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport {\n resetSettings,\n initializeSettings,\n} from '@shepai/core/infrastructure/services/settings.service';\nimport type { CompleteWebOnboardingUseCase } from '@shepai/core/application/use-cases/settings/complete-web-onboarding.use-case';\nimport type { AgentType } from '@shepai/core/domain/generated/output';\n\nexport async function updateAgentAndModel(\n agentType: string,\n model: string | null\n): Promise<{ ok: boolean; error?: string }> {\n if (!agentType.trim()) {\n return { ok: false, error: 'agent type is required' };\n }\n\n try {\n const useCase = resolve<CompleteWebOnboardingUseCase>('CompleteWebOnboardingUseCase');\n const updatedSettings = await useCase.execute({\n agentType: agentType.trim() as AgentType,\n model,\n });\n\n resetSettings();\n initializeSettings(updatedSettings);\n\n return { ok: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to update agent and model';\n return { ok: false, error: message };\n }\n}\n","'use server';\n\nimport { isAbsolute } from 'node:path';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { LaunchIdeUseCase } from '@shepai/core/application/use-cases/ide/launch-ide.use-case';\nimport { resolve } from '@/lib/server-container';\n\ninterface OpenIdeInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openIde(\n input: OpenIdeInput\n): Promise<{ success: boolean; error?: string; editor?: string; path?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n const settings = getSettings();\n const editor = settings.environment.defaultEditor;\n\n const useCase = resolve<LaunchIdeUseCase>('LaunchIdeUseCase');\n const result = await useCase.execute({\n editorId: editor,\n repositoryPath,\n branch,\n checkAvailability: true,\n });\n\n if (!result.ok) {\n return { success: false, error: result.message };\n }\n\n return { success: true, editor: result.editorName, path: result.worktreePath };\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport { getTerminalEntries } from '@shepai/core/infrastructure/services/tool-installer/tool-metadata';\n\n/** Resolves a platform-keyed value to the current platform string. */\nfunction resolvePlatformValue(value: string | Record<string, string>): string {\n if (typeof value === 'string') return value;\n return value[platform()] ?? Object.values(value)[0];\n}\n\n// Fallback commands for the \"system\" terminal when no tool metadata entry exists.\n// Uses a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst SYSTEM_TERMINAL_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> =\n {\n darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },\n linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },\n win32: {\n cmd: 'cmd.exe',\n args: (p) => ['/c', 'start', 'powershell', '-NoExit', '-Command', `Set-Location \"${p}\"`],\n },\n };\n\ninterface OpenShellInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openShell(\n input: OpenShellInput\n): Promise<{ success: boolean; error?: string; path?: string; shell?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n const settings = getSettings();\n const shell = settings.environment.shellPreference;\n const terminalPref = settings.environment.terminalPreference ?? 'system';\n const targetPath = branch ? computeWorktreePath(repositoryPath, branch) : repositoryPath;\n\n if (!existsSync(targetPath)) {\n return { success: false, error: `Path does not exist: ${targetPath}` };\n }\n\n // Try to find the terminal in tool metadata for non-system terminals\n if (terminalPref !== 'system') {\n const entries = getTerminalEntries();\n const terminalEntry = entries.find(([id]) => id === terminalPref);\n\n if (terminalEntry) {\n const [, meta] = terminalEntry;\n if (meta.openDirectory) {\n const openCmd = resolvePlatformValue(meta.openDirectory);\n if (openCmd.includes('{dir}')) {\n const resolved = openCmd.replace('{dir}', targetPath);\n const useShell = meta.spawnOptions?.shell === true;\n\n if (useShell) {\n const child = spawn(resolved, [], {\n detached: true,\n stdio: 'ignore',\n shell: true,\n });\n child.on('error', () => undefined);\n child.unref();\n } else {\n const [command, ...args] = resolved.split(/\\s+/);\n const child = spawn(command, args, {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined);\n child.unref();\n }\n\n return { success: true, path: targetPath, shell };\n }\n }\n }\n }\n\n // Fallback to system terminal\n const entry = SYSTEM_TERMINAL_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(targetPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: targetPath, shell };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open shell';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\n\n// Use a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst FOLDER_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> = {\n darwin: { cmd: 'open', args: (p) => [p] },\n linux: { cmd: 'xdg-open', args: (p) => [p] },\n win32: { cmd: 'explorer', args: (p) => [p] },\n};\n\nexport async function openFolder(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; path?: string }> {\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n return { success: false, error: 'Directory not found' };\n }\n\n const entry = FOLDER_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(repositoryPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: repositoryPath };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\n/**\n * Check whether onboarding has been completed.\n * Delegates to the in-memory settings singleton (zero DB overhead).\n */\nexport async function isAgentSetupComplete(): Promise<boolean> {\n try {\n return getSettings().onboardingComplete;\n } catch {\n return false;\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { homedir } from 'node:os';\nimport { execFile } from 'node:child_process';\nimport { IS_WINDOWS } from '@shepai/core/infrastructure/platform';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { resolve } from '@/lib/server-container';\nimport type { ListToolsUseCase } from '@shepai/core/application/use-cases/tools/list-tools.use-case';\n\nexport interface AgentAuthStatus {\n agentType: string;\n /** Whether the CLI tool binary is installed */\n installed: boolean;\n /** Whether credentials / auth appear valid */\n authenticated: boolean;\n /** Human-readable label for the agent */\n label: string;\n /** CLI binary name (e.g. \"claude\", \"gemini\") */\n binaryName: string | null;\n /** Instructions to authenticate if not authenticated */\n authCommand: string | null;\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor Agent',\n 'gemini-cli': 'Gemini CLI',\n aider: 'Aider',\n continue: 'Continue',\n dev: 'Demo',\n};\n\nconst AGENT_TOOL_MAP: Record<string, string> = {\n 'claude-code': 'claude-code',\n cursor: 'cursor-cli',\n 'gemini-cli': 'gemini-cli',\n};\n\nconst AGENT_BINARY_MAP: Record<string, string> = {\n 'claude-code': 'claude',\n cursor: 'agent',\n 'gemini-cli': 'gemini',\n};\n\n/**\n * Tier 1: Instant credential/env check (~5ms, no subprocess).\n * Returns true if credentials likely exist.\n */\nfunction tier1AuthCheck(agentType: string): boolean {\n const home = homedir();\n\n switch (agentType) {\n case 'claude-code': {\n if (process.env['ANTHROPIC_API_KEY']) return true;\n if (process.env['CLAUDE_CODE_USE_BEDROCK']) return true;\n if (process.env['CLAUDE_CODE_USE_VERTEX']) return true;\n if (process.env['CLAUDE_CODE_OAUTH_TOKEN']) return true;\n const credPath = join(home, '.claude', '.credentials.json');\n return existsSync(credPath);\n }\n case 'cursor': {\n if (process.env['CURSOR_API_KEY']) return true;\n // Cursor Agent stores creds after `agent login` — check common locations\n const cursorDir = join(home, '.cursor');\n return existsSync(cursorDir);\n }\n case 'gemini-cli': {\n if (process.env['GEMINI_API_KEY']) return true;\n if (process.env['GOOGLE_API_KEY']) return true;\n if (process.env['GOOGLE_APPLICATION_CREDENTIALS']) return true;\n const accountsPath = join(home, '.gemini', 'google_accounts.json');\n return existsSync(accountsPath);\n }\n default:\n // dev, aider, continue — assume no auth needed\n return true;\n }\n}\n\n/**\n * Tier 2: Subprocess verification (~200ms).\n * Only called if tier 1 passes, to confirm tokens aren't expired.\n */\nfunction tier2AuthVerify(agentType: string, binaryName: string): Promise<boolean> {\n return new Promise((resolve) => {\n let cmd: string;\n let args: string[];\n\n switch (agentType) {\n case 'claude-code':\n cmd = binaryName;\n args = ['auth', 'status'];\n break;\n case 'cursor':\n cmd = binaryName;\n args = ['status'];\n break;\n default:\n // No tier 2 command available — trust tier 1\n resolve(true);\n return;\n }\n\n try {\n const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };\n execFile(cmd, args, opts, (error) => {\n resolve(!error);\n });\n } catch {\n resolve(false);\n }\n });\n}\n\n/**\n * Check agent tool installation + auth status.\n * Uses two-tier detection: instant file/env check, then optional subprocess verify.\n */\nexport async function checkAgentAuth(): Promise<AgentAuthStatus> {\n let agentType: string;\n try {\n agentType = getSettings().agent.type;\n } catch {\n return {\n agentType: 'unknown',\n installed: false,\n authenticated: false,\n label: 'Unknown',\n binaryName: null,\n authCommand: null,\n };\n }\n\n const label = AGENT_LABELS[agentType] ?? agentType;\n const toolId = AGENT_TOOL_MAP[agentType] ?? null;\n const binaryName = AGENT_BINARY_MAP[agentType] ?? null;\n\n // Dev/demo agents — always good\n if (!toolId) {\n return {\n agentType,\n installed: true,\n authenticated: true,\n label,\n binaryName: null,\n authCommand: null,\n };\n }\n\n // Check if tool is installed\n let installed = false;\n try {\n const useCase = resolve<ListToolsUseCase>('ListToolsUseCase');\n const tools = await useCase.execute();\n const tool = tools.find((t) => t.id === toolId);\n installed = tool?.status.status === 'available';\n } catch {\n installed = false;\n }\n\n if (!installed) {\n return {\n agentType,\n installed: false,\n authenticated: false,\n label,\n binaryName,\n authCommand: binaryName ? `Install ${label} first` : null,\n };\n }\n\n // Tier 1: instant file/env check\n const tier1 = tier1AuthCheck(agentType);\n\n if (!tier1) {\n return {\n agentType,\n installed: true,\n authenticated: false,\n label,\n binaryName,\n authCommand: binaryName,\n };\n }\n\n // Tier 2: subprocess verify (best effort, ~200ms)\n let authenticated = true;\n if (binaryName) {\n authenticated = await tier2AuthVerify(agentType, binaryName);\n }\n\n return {\n agentType,\n installed: true,\n authenticated,\n label,\n binaryName,\n authCommand: authenticated ? null : binaryName,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteFeatureUseCase } from '@shepai/core/application/use-cases/features/delete-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function deleteFeature(\n featureId: string,\n cleanup?: boolean,\n cascadeDelete?: boolean\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const deleteFeatureUseCase = resolve<DeleteFeatureUseCase>('DeleteFeatureUseCase');\n const options: { cleanup?: boolean; cascadeDelete?: boolean } = {};\n if (cleanup !== undefined) options.cleanup = cleanup;\n if (cascadeDelete !== undefined) options.cascadeDelete = cascadeDelete;\n const feature =\n Object.keys(options).length > 0\n ? await deleteFeatureUseCase.execute(featureId, options)\n : await deleteFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ResumeFeatureUseCase } from '@shepai/core/application/use-cases/features/resume-feature.use-case';\n\nexport async function resumeFeature(\n featureId: string\n): Promise<{ resumed: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { resumed: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<ResumeFeatureUseCase>('ResumeFeatureUseCase');\n await useCase.execute(featureId);\n return { resumed: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to resume feature';\n return { resumed: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StartFeatureUseCase } from '@shepai/core/application/use-cases/features/start-feature.use-case';\n\nexport async function startFeature(\n featureId: string\n): Promise<{ started: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { started: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<StartFeatureUseCase>('StartFeatureUseCase');\n await useCase.execute(featureId);\n return { started: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to start feature';\n return { started: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StopAgentRunUseCase } from '@shepai/core/application/use-cases/agents/stop-agent-run.use-case';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\n\nexport async function stopFeature(\n featureId: string\n): Promise<{ stopped: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { stopped: false, error: 'Feature id is required' };\n }\n\n try {\n // Find the active agent run for this feature\n const runRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const allRuns = await runRepo.list();\n const activeRun = allRuns.find(\n (r) =>\n r.featureId === featureId &&\n r.status !== 'completed' &&\n r.status !== 'failed' &&\n r.status !== 'interrupted' &&\n r.status !== 'cancelled'\n );\n\n if (!activeRun) {\n return { stopped: false, error: 'No active agent run found for this feature' };\n }\n\n const useCase = resolve<StopAgentRunUseCase>('StopAgentRunUseCase');\n const result = await useCase.execute(activeRun.id);\n\n if (!result.stopped) {\n return { stopped: false, error: result.reason };\n }\n return { stopped: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to stop agent';\n return { stopped: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { AddRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/add-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\n\ninterface AddRepositoryInput {\n path: string;\n name?: string;\n}\n\nexport async function addRepository(\n input: AddRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { path, name } = input;\n\n if (!path?.trim()) {\n return { error: 'path is required' };\n }\n\n try {\n const addRepoUseCase = resolve<AddRepositoryUseCase>('AddRepositoryUseCase');\n const repository = await addRepoUseCase.execute({ path, name });\n return { repository };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to add repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/delete-repository.use-case';\n\nexport async function deleteRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'id is required' };\n }\n\n try {\n const useCase = resolve<DeleteRepositoryUseCase>('DeleteRepositoryUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete repository';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\n/**\n * Lightweight server action to fetch a single feature's name and description.\n * Used by the SSE effect to update node metadata after AI metadata generation\n * without a full graph reconcile (which can overwrite SSE-driven state).\n */\nexport async function getFeatureMetadata(\n featureId: string\n): Promise<{ name: string; description: string } | null> {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n if (!feature) return null;\n return { name: feature.name, description: feature.description };\n}\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"6CAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,8CCHhB,EAAA,EAAA,CAAA,CAAA,OAOA,IAAM,EAAgC,CACpC,SAAU,QAAQ,QAAQ,CAC1B,KAAM,CAAC,EAAK,IAAS,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,EAAK,EACrC,EAMM,EAA4C,CAChD,OAAQ,CAAC,qFAAqF,CAAC,GAC/F,MAAO,CAAC,oFAAoF,CAAC,CAC7F,MAAO,CAAC,wPAAwP,CAAC,EACnQ,CAEO,OAAM,EACH,IAAuB,AAE/B,aAAY,EAAkC,CAAC,CAAC,CAAE,CAChD,IAAI,CAAC,IAAI,CAAG,CAAE,GAAG,CAAW,CAAE,GAAG,CAAI,AAAC,CACxC,CAGA,YAA4B,CAC1B,OAAO,CAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAI,IAClD,CAOA,YAA4B,CAC1B,IAAM,EAAU,I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MAAO,CAAE,SAAS,EAAO,MADT,CACgB,YADC,MAAQ,EAAM,OAAO,CAAG,6BACjB,CAC1C,CACF,CCVO,eAAe,EACpB,CAAiB,EAEjB,IAAM,EAAc,CAAA,EAAA,EAAA,OAAA,AAAO,EAAqB,sBAC1C,EAAU,MAAM,EAAY,QAAQ,CAAC,UAC3C,AAAK,EACE,CAAE,CADL,IACW,CADD,CACS,IAAI,CAAE,YAAa,EAAQ,WAAY,AAAD,EADxC,IAEvB,iCPuGsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yEClHA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECDA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECAA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,wECCA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,uECKA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECNA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,4ECKA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA","ignoreList":[0,1]}
@@ -1,3 +0,0 @@
1
- module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},57764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},7421,44447,a=>{"use strict";let b=(0,a.i(25700).default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);a.s(["Timer",()=>b],7421);var c=a.i(40617);a.s(["Code",()=>c.default],44447)},41305,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(7420),f=a.i(77127),g=a.i(14272),h=a.i(66873),i=a.i(48939),j=a.i(17329),k=a.i(5472),l="Tabs",[m,n]=(0,e.createContextScope)(l,[f.createRovingFocusGroupScope]),o=(0,f.createRovingFocusGroupScope)(),[p,q]=m(l),r=c.forwardRef((a,c)=>{let{__scopeTabs:d,value:e,onValueChange:f,defaultValue:g,orientation:m="horizontal",dir:n,activationMode:o="automatic",...q}=a,r=(0,i.useDirection)(n),[s,t]=(0,j.useControllableState)({prop:e,onChange:f,defaultProp:g??"",caller:l});return(0,b.jsx)(p,{scope:d,baseId:(0,k.useId)(),value:s,onValueChange:t,orientation:m,dir:r,activationMode:o,children:(0,b.jsx)(h.Primitive.div,{dir:r,"data-orientation":m,...q,ref:c})})});r.displayName=l;var s="TabsList",t=c.forwardRef((a,c)=>{let{__scopeTabs:d,loop:e=!0,...g}=a,i=q(s,d),j=o(d);return(0,b.jsx)(f.Root,{asChild:!0,...j,orientation:i.orientation,dir:i.dir,loop:e,children:(0,b.jsx)(h.Primitive.div,{role:"tablist","aria-orientation":i.orientation,...g,ref:c})})});t.displayName=s;var u="TabsTrigger",v=c.forwardRef((a,c)=>{let{__scopeTabs:e,value:g,disabled:i=!1,...j}=a,k=q(u,e),l=o(e),m=y(k.baseId,g),n=z(k.baseId,g),p=g===k.value;return(0,b.jsx)(f.Item,{asChild:!0,...l,focusable:!i,active:p,children:(0,b.jsx)(h.Primitive.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":n,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:m,...j,ref:c,onMouseDown:(0,d.composeEventHandlers)(a.onMouseDown,a=>{i||0!==a.button||!1!==a.ctrlKey?a.preventDefault():k.onValueChange(g)}),onKeyDown:(0,d.composeEventHandlers)(a.onKeyDown,a=>{[" ","Enter"].includes(a.key)&&k.onValueChange(g)}),onFocus:(0,d.composeEventHandlers)(a.onFocus,()=>{let a="manual"!==k.activationMode;p||i||!a||k.onValueChange(g)})})})});v.displayName=u;var w="TabsContent",x=c.forwardRef((a,d)=>{let{__scopeTabs:e,value:f,forceMount:i,children:j,...k}=a,l=q(w,e),m=y(l.baseId,f),n=z(l.baseId,f),o=f===l.value,p=c.useRef(o);return c.useEffect(()=>{let a=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(a)},[]),(0,b.jsx)(g.Presence,{present:i||o,children:({present:c})=>(0,b.jsx)(h.Primitive.div,{"data-state":o?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":m,hidden:!c,id:n,tabIndex:0,...k,ref:d,style:{...a.style,animationDuration:p.current?"0s":void 0},children:c&&j})})});function y(a,b){return`${a}-trigger-${b}`}function z(a,b){return`${a}-content-${b}`}x.displayName=w,a.s(["Content",()=>x,"List",()=>t,"Root",()=>r,"Tabs",()=>r,"TabsContent",()=>x,"TabsList",()=>t,"TabsTrigger",()=>v,"Trigger",()=>v,"createTabsScope",()=>n],287);var A=a.i(287),A=A,B=a.i(85536);let C=A.Root,D=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(A.List,{ref:d,className:(0,B.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",a),...c}));D.displayName=A.List.displayName;let E=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(A.Trigger,{ref:d,className:(0,B.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",a),...c}));E.displayName=A.Trigger.displayName;let F=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(A.Content,{ref:d,className:(0,B.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",a),...c}));F.displayName=A.Content.displayName,a.s(["Tabs",()=>C,"TabsContent",()=>F,"TabsList",()=>D,"TabsTrigger",()=>E],41305)},9955,a=>{"use strict";var b=a.i(76096);a.s(["Download",()=>b.default])},40617,a=>{"use strict";let b=(0,a.i(25700).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["default",()=>b])},76096,a=>{"use strict";let b=(0,a.i(25700).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.s(["default",()=>b])},45242,79620,73998,26633,30931,307,39116,a=>{"use strict";var b=a.i(25700);let c=(0,b.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["PaperclipIcon",()=>c],45242);var d=a.i(10973),e=a.i(85536);function f({className:a,...b}){return(0,d.jsx)("textarea",{"data-slot":"textarea",className:(0,e.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...b})}a.s(["Textarea",()=>f],79620);var g=a.i(2807),h=a.i(7052),h=h,i=a.i(76096);a.s(["DownloadIcon",()=>i.default],73998);var i=i,j=a.i(45670),k=a.i(50049);a.s(["VisuallyHidden",0,k],26633);var k=k;let l=(0,b.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var m=a.i(42642),m=m;let n=(0,b.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var o=a.i(40617),o=o;a.i(18948);let p=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),q=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function r(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return`${(a/Math.pow(1024,b)).toFixed(+(0!==b))} ${["B","KB","MB","GB"][b]}`}let s=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function t(a,b){let c=new URLSearchParams({path:a,mimeType:b});return`/api/attachments/preview?${c.toString()}`}function u({name:a,size:b,mimeType:c,path:f,onRemove:u,loading:v=!1,disabled:w=!1}){let x,y,z=(x=a.lastIndexOf("."))>=0?a.slice(x).toLowerCase():"",A=p.has(z)?n:".pdf"===z?m.default:q.has(z)?o.default:l,B=".pdf"===z?"bg-red-50 text-red-600":p.has(z)?"bg-blue-50 text-blue-600":q.has(z)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600",C=(y=a.lastIndexOf("."))>=0&&s.has(a.slice(y).toLowerCase());return v?(0,d.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-md border",children:(0,d.jsx)(h.default,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):C?(0,d.jsxs)(j.Dialog,{children:[(0,d.jsxs)("div",{className:"group relative",children:[(0,d.jsx)(j.DialogTrigger,{asChild:!0,children:(0,d.jsx)("img",{src:t(f,c),alt:a,title:a,className:"h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80"})}),!w&&(0,d.jsx)("button",{type:"button",onClick:u,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,d.jsx)(g.X,{className:"h-3 w-3"})})]}),(0,d.jsxs)(j.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,d.jsx)(k.Root,{children:(0,d.jsxs)(j.DialogTitle,{children:["Preview: ",a]})}),(0,d.jsx)("div",{className:"relative bg-black/90",children:(0,d.jsx)("img",{src:t(f,c),alt:a,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,d.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium",children:a}),(0,d.jsx)("span",{className:"text-muted-foreground text-xs",children:r(b)})]}),(0,d.jsx)("a",{href:t(f,c),download:a,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${a}`,children:(0,d.jsx)(i.default,{className:"h-4 w-4"})})]})]})]}):(0,d.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2",children:[(0,d.jsx)("div",{className:(0,e.cn)("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",B),children:(0,d.jsx)(A,{className:"h-3 w-3"})}),(0,d.jsx)("span",{className:"max-w-[120px] truncate text-sm",children:a}),(0,d.jsx)("span",{className:"text-muted-foreground text-xs",children:r(b)}),!w&&(0,d.jsx)("button",{type:"button",onClick:u,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,d.jsx)(g.X,{className:"h-3 w-3"})})]})}async function v(){let a=await fetch("/api/dialog/pick-files",{method:"POST"});if(!a.ok)throw Error("Failed to open file dialog");let b=await a.json();return b.cancelled?null:b.files}a.s(["AttachmentChip",()=>u],30931),a.s([],307),a.s(["pickFiles",()=>v],39116)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__68c2d48e._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/timer.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-tabs%401.1.13_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact%40_68a385a9eea120600bb372a91de22b00/node_modules/%40radix-ui/react-tabs/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/tabs.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/code.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/download.ts","../../../../../../../src/presentation/web/components/common/attachment-chip/attachment-chip.tsx","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../src/presentation/web/components/common/attachment-card/attachment-card.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/pick-files.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/paperclip.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['line', { x1: '10', x2: '14', y1: '2', y2: '2', key: '14vaq8' }],\n ['line', { x1: '12', x2: '15', y1: '14', y2: '11', key: '17fdiu' }],\n ['circle', { cx: '12', cy: '14', r: '8', key: '1e1u0o' }],\n];\n\n/**\n * @component @name Timer\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMTAiIHgyPSIxNCIgeTE9IjIiIHkyPSIyIiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjE1IiB5MT0iMTQiIHkyPSIxMSIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE0IiByPSI4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/timer\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Timer = createLucideIcon('timer', __iconNode);\n\nexport default Timer;\n","\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1',\n className\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow',\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n 'ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm16 18 6-6-6-6', key: 'eg8j8' }],\n ['path', { d: 'm8 6-6 6 6 6', key: 'ppft3o' }],\n];\n\n/**\n * @component @name Code\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgMTggNi02LTYtNiIgLz4KICA8cGF0aCBkPSJtOCA2LTYgNiA2IDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/code\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Code = createLucideIcon('code', __iconNode);\n\nexport default Code;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 15V3', key: 'm9g1x1' }],\n ['path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', key: 'ih7n3h' }],\n ['path', { d: 'm7 10 5 5 5-5', key: 'brsn70' }],\n];\n\n/**\n * @component @name Download\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTVWMyIgLz4KICA8cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCIgLz4KICA8cGF0aCBkPSJtNyAxMCA1IDUgNS01IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/download\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Download = createLucideIcon('download', __iconNode);\n\nexport default Download;\n","/* eslint-disable @next/next/no-img-element -- Local file preview requires raw <img>, not next/image */\n'use client';\n\nimport { X, Loader2Icon, DownloadIcon } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Dialog, DialogTrigger, DialogContent, DialogTitle } from '@/components/ui/dialog';\nimport { VisuallyHidden } from 'radix-ui';\nimport {\n formatFileSize,\n getFileIcon,\n getFileIconColor,\n} from '@/components/common/attachment-card/attachment-card';\n\nexport interface AttachmentChipProps {\n name: string;\n size: number;\n mimeType: string;\n path: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\n\nfunction isImage(name: string): boolean {\n const dot = name.lastIndexOf('.');\n return dot >= 0 && IMAGE_EXTS.has(name.slice(dot).toLowerCase());\n}\n\nfunction previewUrl(path: string, mimeType: string): string {\n const params = new URLSearchParams({ path, mimeType });\n return `/api/attachments/preview?${params.toString()}`;\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nexport function AttachmentChip({\n name,\n size,\n mimeType,\n path,\n onRemove,\n loading = false,\n disabled = false,\n}: AttachmentChipProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n const imageFile = isImage(name);\n\n if (loading) {\n return (\n <div className=\"flex h-12 w-12 items-center justify-center rounded-md border\">\n <Loader2Icon className=\"text-muted-foreground h-5 w-5 animate-spin\" />\n </div>\n );\n }\n\n if (imageFile) {\n return (\n <Dialog>\n <div className=\"group relative\">\n <DialogTrigger asChild>\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n title={name}\n className=\"h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80\"\n />\n </DialogTrigger>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n <DialogContent className=\"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90\">\n <VisuallyHidden.Root>\n <DialogTitle>Preview: {name}</DialogTitle>\n </VisuallyHidden.Root>\n <div className=\"relative bg-black/90\">\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n className=\"h-auto max-h-[70vh] w-full object-contain\"\n />\n </div>\n <div className=\"bg-background flex items-center gap-3 px-4 py-3\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n </div>\n <a\n href={previewUrl(path, mimeType)}\n download={name}\n className=\"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors\"\n aria-label={`Download ${name}`}\n >\n <DownloadIcon className=\"h-4 w-4\" />\n </a>\n </div>\n </DialogContent>\n </Dialog>\n );\n }\n\n return (\n <div className=\"group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2\">\n <div\n className={cn(\n 'flex h-6 w-6 shrink-0 items-center justify-center rounded-full',\n iconColorClass\n )}\n >\n <Icon className=\"h-3 w-3\" />\n </div>\n <span className=\"max-w-[120px] truncate text-sm\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { LucideIcon } from 'lucide-react';\nimport { FileIcon, FileTextIcon, ImageIcon, CodeIcon, Trash2Icon, Loader2Icon } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\n\nexport interface AttachmentCardProps {\n name: string;\n size: number;\n mimeType: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n /** Optional secondary text shown below the filename (e.g. file path). */\n subtitle?: string;\n}\n\nexport function AttachmentCard({\n name,\n size,\n mimeType: _mimeType,\n onRemove,\n loading = false,\n disabled = false,\n subtitle,\n}: AttachmentCardProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n {subtitle ? (\n <span className=\"text-muted-foreground truncate text-xs\">{subtitle}</span>\n ) : null}\n <span className=\"text-muted-foreground text-xs\">\n {loading ? 'Uploading...' : formatFileSize(size)}\n </span>\n </div>\n {loading ? (\n <Loader2Icon className=\"text-muted-foreground h-4 w-4 animate-spin\" />\n ) : (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nexport function getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nexport function getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nexport function formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n","import type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/**\n * Opens a native OS file picker dialog via API route.\n * Returns the selected files with metadata, or null if the user cancelled.\n */\nexport async function pickFiles(): Promise<FileAttachment[] | null> {\n const res = await fetch('/api/dialog/pick-files', { method: 'POST' });\n\n if (!res.ok) {\n throw new Error('Failed to open file dialog');\n }\n\n const data: { files: FileAttachment[] | null; cancelled: boolean } = await res.json();\n return data.cancelled ? null : data.files;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551',\n key: '1miecu',\n },\n ],\n];\n\n/**\n * @component @name Paperclip\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNi04LjQxNCA4LjU4NmEyIDIgMCAwIDAgMi44MjkgMi44MjlsOC40MTQtOC41ODZhNCA0IDAgMSAwLTUuNjU3LTUuNjU3bC04LjM3OSA4LjU1MWE2IDYgMCAxIDAgOC40ODUgOC40ODVsOC4zNzktOC41NTEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/paperclip\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Paperclip = createLucideIcon('paperclip', __iconNode);\n\nexport default Paperclip;\n"],"names":[],"mappings":"oLAoBA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,EAAA,AAAQ,CAAR,AAAQ,CAAR,AAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAjBK,CAiBI,AAhBtC,CAgBsC,AAhBrC,CAgBqC,AAhBrC,CAAA,AAgBqC,CAhBrC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 +0,0 @@
1
- module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00a637ba55f2318df1a1223bbb0a679654d49165bb",null),a.s(["pickFolder",()=>g],12513)},66973,a=>{"use strict";var b=a.i(12513);a.s([],65794),a.i(65794),a.s(["00a637ba55f2318df1a1223bbb0a679654d49165bb",()=>b.pickFolder],66973)}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__6b17a22d._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","export {pickFolder as '00a637ba55f2318df1a1223bbb0a679654d49165bb'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensure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,QAAS,QAAS,GAAO,GACrD,IAAI,GAC3B,OAAO,EAAQ,MAAM,CAAG,EAAI,EAAU,IACxC,CAAE,MAAO,EAAgB,OAEvB,GAAI,AASgB,UAAjB,OADY,AACL,EATM,GAQa,CACa,OAAV,GAAkB,WAAY,GATnB,GAAG,CAApB,EAAM,MAAM,CACpC,OAAO,IAET,OAAM,CACR,CACF,CACF,CCrDO,eAAe,IACpB,IAAM,EAAU,IAAI,EAEpB,GAAI,CAEF,MAAO,CAAE,KADI,EAAQ,UAAU,EACjB,CAChB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,KAAM,KAAM,MADL,CACY,YADK,MAAQ,EAAM,OAAO,CAAG,8BACrB,CACtC,CACF,0CAVsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8DCJtB,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
@@ -1,4 +0,0 @@
1
- module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00a637ba55f2318df1a1223bbb0a679654d49165bb",null),a.s(["pickFolder",()=>g],12513)},86139,a=>{"use strict";var b=a.i(12513);a.s([],53565),a.i(53565),a.s(["00a637ba55f2318df1a1223bbb0a679654d49165bb",()=>b.pickFolder],86139)}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__804c006d._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/.next-internal/server/app/version/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","export {pickFolder as '00a637ba55f2318df1a1223bbb0a679654d49165bb'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"oIAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,8CCHhB,EAAA,EAAA,CAAA,CAAA,OAOA,IAAM,EAAgC,CACpC,SAAU,QAAQ,QAAQ,CAC1B,KAAM,CAAC,EAAK,IAAS,CAAA,EAAA,EAAA,QAAQ,AAAR,EAAS,EAAK,EACrC,EAMM,EAA4C,CAChD,OAAQ,CAAC,qFAAqF,CAAC,GAC/F,MAAO,CAAC,oFAAoF,CAAC,CAC7F,MAAO,CAAC,wPAAwP,CAAC,EACnQ,CAEO,OAAM,EACH,IAAuB,AAE/B,aAAY,EAAkC,CAAC,CAAC,CAAE,CAChD,IAAI,CAAC,IAAI,CAAG,CAAE,GAAG,CAAW,CAAE,GAAG,CAAI,AAAC,CACxC,CAGA,YAA4B,CAC1B,OAAO,CAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAI,IAClD,CAOA,YAA4B,CAC1B,IAAM,EAAU,IAAI,CAAC,UAAU,GAC/B,GAAI,CAAC,EACH,MAAM,AAAI,CADE,KACI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA,CAAE,EAG/D,GAAI,CAEF,IAAM,EADS,AACC,IADG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAS,CAAE,SAAU,QAAS,QAAS,GAAO,GACrD,IAAI,GAC3B,OAAO,EAAQ,MAAM,CAAG,EAAI,EAAU,IACxC,CAAE,MAAO,EAAgB,OAEvB,GAAI,AASgB,UAAjB,OADY,AACL,EATM,GAQa,CACa,OAAV,GAAkB,WAAY,GATnB,GAAG,CAApB,EAAM,MAAM,CACpC,OAAO,IAET,OAAM,CACR,CACF,CACF,CCrDO,eAAe,IACpB,IAAM,EAAU,IAAI,EAEpB,GAAI,CAEF,MAAO,CAAE,KADI,EAAQ,UAAU,EACjB,CAChB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,KAAM,KAAM,MADL,CACY,YADK,MAAQ,EAAM,OAAO,CAAG,8BACrB,CACtC,CACF,0CAVsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8DCJtB,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
@@ -1,4 +0,0 @@
1
- module.exports=[23504,27900,a=>{"use strict";var b=a.i(92658),c=a.i(96380);let d={"claude-opus-4-6":{displayName:"Opus 4.6",description:"Most capable, complex tasks"},"claude-sonnet-4-6":{displayName:"Sonnet 4.6",description:"Fast & balanced"},"claude-haiku-4-5":{displayName:"Haiku 4.5",description:"Lightweight & quick"},"gemini-3.1-pro":{displayName:"Gemini 3.1 Pro",description:"Advanced reasoning"},"gemini-3-flash":{displayName:"Gemini 3 Flash",description:"Ultra-fast responses"},"gemini-2.5-pro":{displayName:"Gemini 2.5 Pro",description:"Reliable workhorse"},"gemini-2.5-flash":{displayName:"Gemini 2.5 Flash",description:"Speed-optimized"},"gpt-5.4-high":{displayName:"GPT-5.4",description:"Latest reasoning model"},"gpt-5.2":{displayName:"GPT-5.2",description:"Flagship model"},"gpt-5.3-codex":{displayName:"GPT-5.3 Codex",description:"Code specialist"},"composer-1.5":{displayName:"Composer 1.5",description:"Multi-file editing"},"grok-code":{displayName:"Grok Code",description:"xAI code model"},"gpt-8":{displayName:"GPT-8",description:"Writes code before you think it"},"opus-7":{displayName:"Opus 7",description:"Achieved consciousness, ships on time"}},e={displayName:"",description:""};function f(a){let b=d[a];return b||{...e,displayName:a.replace(/^claude-/,"").replace(/^gemini-/,"Gemini ").replace(/^gpt-/,"GPT-").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}}var g=a.i(12581);let h={"claude-code":"Claude Code",cursor:"Cursor CLI","gemini-cli":"Gemini CLI",dev:"Demo"},i={"claude-code":0,cursor:1,"gemini-cli":2,dev:99};async function j(){try{let a=(0,c.resolve)("IAgentExecutorFactory");return a.getSupportedAgents().map(b=>({agentType:b,label:h[b]??b,models:a.getSupportedModels(b).map(a=>({id:a,...f(a)}))})).map(a=>"dev"===a.agentType&&0===a.models.length?{...a,models:[{id:"gpt-8",...f("gpt-8")},{id:"opus-7",...f("opus-7")}]}:a).filter(a=>a.models.length>0).sort((a,b)=>(i[a.agentType]??50)-(i[b.agentType]??50))}catch{return[]}}(0,g.ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"00b2c853e0ff47ce2b84169aaff091cda755f1d282",null),a.s(["getAllAgentModels",()=>j],23504);var k=a.i(33244);async function l(a,b){if(!a.trim())return{ok:!1,error:"agent type is required"};try{let d=(0,c.resolve)("CompleteWebOnboardingUseCase"),e=await d.execute({agentType:a.trim(),model:b});return(0,k.resetSettings)(),(0,k.initializeSettings)(e),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update agent and model"}}}(0,g.ensureServerEntryExports)([l]),(0,b.registerServerReference)(l,"60fe9e2c29fd7a6ccf3f368f2e64129dc0aa1948fb",null),a.s(["updateAgentAndModel",()=>l],27900)},96380,a=>{"use strict";function b(a){let b=globalThis.__shepContainer;if(!b)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return b.resolve(a)}a.s(["resolve",()=>b])},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},32278,a=>{"use strict";a.i(12714);var b=a.i(60526),c=a.i(50227);function d(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}a.i(2157),a.s(["getShepHomeDir",()=>d])},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00a637ba55f2318df1a1223bbb0a679654d49165bb",null),a.s(["pickFolder",()=>g],12513)},57764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},43738,a=>{"use strict";var b=a.i(2157),c=a.i(50227),d=a.i(57764);let e={get url(){return`file://${a.P("packages/core/src/infrastructure/services/tool-installer/tool-metadata.ts")}`}},f=["name","summary","description","tags","binary","packageManager","commands","timeout","documentationUrl","verifyCommand"],g=function(){let a,g=(0,c.join)((0,d.fileURLToPath)(e.url),"..","tools"),h={};try{a=(0,b.readdirSync)(g).filter(a=>a.endsWith(".json"))}catch{return h}for(let d of a){let a=(0,c.basename)(d,".json");try{let e=(0,b.readFileSync)((0,c.join)(g,d),"utf-8"),i=JSON.parse(e);if(f.filter(a=>!(a in i)).length>0)continue;h[a]=i}catch{}}return h}();function h(){return Object.entries(g).filter(([,a])=>a.tags.includes("terminal")&&null!=a.openDirectory)}a.s(["getTerminalEntries",()=>h])},15046,(a,b,c)=>{"use strict";var d,e=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),f=e(b=>{Object.defineProperty(b,"__esModule",{value:!0}),b.sync=b.isexe=void 0;var c=a.r(2157),d=a.r(12714);b.isexe=async(a,b={})=>{let{ignoreErrors:c=!1}=b;try{return e(await (0,d.stat)(a),b)}catch(a){if(c||"EACCES"===a.code)return!1;throw a}},b.sync=(a,b={})=>{let{ignoreErrors:d=!1}=b;try{return e((0,c.statSync)(a),b)}catch(a){if(d||"EACCES"===a.code)return!1;throw a}};var e=(a,b)=>a.isFile()&&f(a,b),f=(a,b)=>{let c=b.uid??process.getuid?.(),d=b.groups??process.getgroups?.()??[],e=b.gid??process.getgid?.()??d[0];if(void 0===c||void 0===e)throw Error("cannot get uid or gid");let f=new Set([e,...d]),g=a.mode,h=a.uid,i=a.gid,j=parseInt("100",8),k=parseInt("010",8);return!!(g&parseInt("001",8)||g&k&&f.has(i)||g&j&&h===c||g&(j|k)&&0===c)}}),g=e(b=>{Object.defineProperty(b,"__esModule",{value:!0}),b.sync=b.isexe=void 0;var c=a.r(2157),d=a.r(12714),e=a.r(50227);b.isexe=async(a,b={})=>{let{ignoreErrors:c=!1}=b;try{return f(await (0,d.stat)(a),a,b)}catch(a){if(c||"EACCES"===a.code)return!1;throw a}},b.sync=(a,b={})=>{let{ignoreErrors:d=!1}=b;try{return f((0,c.statSync)(a),a,b)}catch(a){if(d||"EACCES"===a.code)return!1;throw a}};var f=(a,b,c)=>a.isFile()&&((a,b)=>{let{pathExt:c=process.env.PATHEXT||""}=b,d=c.split(e.delimiter);if(-1!==d.indexOf(""))return!0;for(let b of d){let c=b.toLowerCase(),d=a.substring(a.length-c.length).toLowerCase();if(c&&d===c)return!0}return!1})(b,c)}),h=e(a=>{Object.defineProperty(a,"__esModule",{value:!0})}),i=c&&c.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c);var e=Object.getOwnPropertyDescriptor(b,c);(!e||("get"in e?!b.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return b[c]}}),Object.defineProperty(a,d,e)}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),j=c&&c.__setModuleDefault||(Object.create?function(a,b){Object.defineProperty(a,"default",{enumerable:!0,value:b})}:function(a,b){a.default=b}),k=c&&c.__importStar||(d=function(a){return(d=Object.getOwnPropertyNames||function(a){var b=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[b.length]=c);return b})(a)},function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c=d(a),e=0;e<c.length;e++)"default"!==c[e]&&i(b,a,c[e]);return j(b,a),b}),l=c&&c.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||i(b,a,c)};Object.defineProperty(c,"__esModule",{value:!0}),c.sync=c.isexe=c.posix=c.win32=void 0;var m=k(f());c.posix=m;var n=k(g());c.win32=n,l(h(),c);var o="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?n:m;c.isexe=o.isexe,c.sync=o.sync},11346,(a,b,c)=>{let{isexe:d,sync:e}=a.r(15046),{join:f,delimiter:g,sep:h,posix:i}=a.r(14747);process.platform;let j=new RegExp(`[${i.sep}${h===i.sep?"":h}]`.replace(/(\\)/g,"\\$1")),k=RegExp(`^\\.${j.source}`),l=a=>Object.assign(Error(`not found: ${a}`),{code:"ENOENT"}),m=(a,{path:b=process.env.PATH,pathExt:c=process.env.PATHEXT,delimiter:d=g})=>({pathEnv:a.match(j)?[""]:[...(b||"").split(d)],pathExt:[""]}),n=(a,b)=>{let c=/^".*"$/.test(a)?a.slice(1,-1):a;return(!c&&k.test(b)?b.slice(0,2):"")+f(c,b)},o=async(a,b={})=>{let{pathEnv:c,pathExt:e,pathExtExe:f}=m(a,b),g=[];for(let h of c){let c=n(h,a);for(let a of e){let e=c+a;if(await d(e,{pathExt:f,ignoreErrors:!0})){if(!b.all)return e;g.push(e)}}}if(b.all&&g.length)return g;if(b.nothrow)return null;throw l(a)};b.exports=o,o.sync=(a,b={})=>{let{pathEnv:c,pathExt:d,pathExtExe:f}=m(a,b),g=[];for(let h of c){let c=n(h,a);for(let a of d){let d=c+a;if(e(d,{pathExt:f,ignoreErrors:!0})){if(!b.all)return d;g.push(d)}}}if(b.all&&g.length)return g;if(b.nothrow)return null;throw l(a)}},86561,79195,a=>{"use strict";var b=a.i(92658),c=a.i(2157),d=a.i(50227),e=a.i(96380),f=a.i(32278),g=a.i(12581);async function h(){try{let b=(0,e.resolve)("LoadSettingsUseCase"),g=await b.execute(),h=(0,f.getShepHomeDir)(),i="Unknown";try{var a;let b=(0,d.join)(h,"data");i=(a=(0,c.statSync)(b).size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}catch{}return{settings:g,shepHome:h,dbFileSize:i}}catch(a){return{error:a instanceof Error?a.message:"Failed to load settings"}}}(0,g.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"000a1ae21340c5e80eed4ecbb5e7d8c3b4cff67c5b",null),a.s(["loadSettings",()=>h],86561);var i=a.i(60526),j=a.i(43738),k=a.i(11346);let l=async a=>{try{let b=await (0,k.default)(a,{nothrow:!0});if(null!==b)return{found:!0};return{found:!1,notInPath:!0}}catch(a){return{found:!1,error:a instanceof Error?a:Error(String(a))}}};async function m(){let b=(0,i.platform)(),c=(0,j.getTerminalEntries)(),d=[];for(let[e,f]of c){if(f.platforms&&!f.platforms.includes(b))continue;if("system-terminal"===e){d.unshift({id:"system",name:f.name,available:!0});continue}let c="string"==typeof f.binary?f.binary:f.binary[b];if(!c)continue;let g=!1;if(f.verifyCommand.startsWith("test "))try{let{execSync:b}=await a.A(82848);b(f.verifyCommand,{stdio:"ignore"}),g=!0}catch{g=!1}else g=(await l(c)).found;d.push({id:e,name:f.name,available:g})}return d.some(a=>"system"===a.id)||d.unshift({id:"system",name:"System Terminal",available:!0}),d}(0,g.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"00c98b3ec71608d5f2d04182c6031335c13ea63361",null),a.s(["getAvailableTerminals",()=>m],79195)},82848,a=>{a.v(a=>Promise.resolve().then(()=>a(74533)))}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__8c553503._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-all-agent-models.ts","../../../../../../../src/presentation/web/lib/model-metadata.ts","../../../../../../../src/presentation/web/app/actions/update-agent-and-model.ts","../../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../packages/core/src/infrastructure/services/tool-installer/tool-metadata.ts","../../../../../../../node_modules/.pnpm/isexe%403.1.5/node_modules/isexe/src/posix.ts","../../../../../../../node_modules/.pnpm/isexe%403.1.5/node_modules/isexe/src/win32.ts","../../../../../../../node_modules/.pnpm/isexe%403.1.5/node_modules/isexe/dist/commonjs/options.js","../../../../../../../node_modules/.pnpm/isexe%403.1.5/node_modules/isexe/src/index.ts","../../../../../../../node_modules/.pnpm/which%405.0.0/node_modules/which/lib/index.js","../../../../../../../src/presentation/web/app/actions/load-settings.ts","../../../../../../../src/presentation/web/app/actions/get-available-terminals.ts","../../../../../../../packages/core/src/infrastructure/services/tool-installer/binary-exists.ts"],"sourcesContent":["'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport type { IAgentExecutorFactory } from '@shepai/core/application/ports/output/agents/agent-executor-factory.interface';\n\nexport interface ModelInfo {\n id: string;\n displayName: string;\n description: string;\n}\n\nexport interface AgentModelGroup {\n agentType: string;\n label: string;\n models: ModelInfo[];\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor CLI',\n 'gemini-cli': 'Gemini CLI',\n dev: 'Demo',\n};\n\n/** Sort weight — higher = further down. Demo always last. */\nconst AGENT_ORDER: Record<string, number> = {\n 'claude-code': 0,\n cursor: 1,\n 'gemini-cli': 2,\n dev: 99,\n};\n\nexport async function getAllAgentModels(): Promise<AgentModelGroup[]> {\n try {\n const factory = resolve<IAgentExecutorFactory>('IAgentExecutorFactory');\n const agents = factory.getSupportedAgents();\n return agents\n .map((agentType) => ({\n agentType: agentType as string,\n label: AGENT_LABELS[agentType as string] ?? (agentType as string),\n models: factory.getSupportedModels(agentType).map((id) => ({\n id,\n ...getModelMeta(id),\n })),\n }))\n .map((g) => {\n // Dev agent gets fun demo models\n if (g.agentType === 'dev' && g.models.length === 0) {\n return {\n ...g,\n models: [\n { id: 'gpt-8', ...getModelMeta('gpt-8') },\n { id: 'opus-7', ...getModelMeta('opus-7') },\n ],\n };\n }\n return g;\n })\n .filter((g) => g.models.length > 0)\n .sort((a, b) => (AGENT_ORDER[a.agentType] ?? 50) - (AGENT_ORDER[b.agentType] ?? 50));\n } catch {\n return [];\n }\n}\n","export interface ModelMeta {\n displayName: string;\n description: string;\n}\n\n/**\n * Presentation-layer metadata for known LLM model identifiers.\n * Maps raw model IDs to human-friendly display names and short descriptions.\n */\nconst MODEL_METADATA: Record<string, ModelMeta> = {\n // Claude models\n 'claude-opus-4-6': { displayName: 'Opus 4.6', description: 'Most capable, complex tasks' },\n 'claude-sonnet-4-6': { displayName: 'Sonnet 4.6', description: 'Fast & balanced' },\n 'claude-haiku-4-5': { displayName: 'Haiku 4.5', description: 'Lightweight & quick' },\n\n // Gemini models\n 'gemini-3.1-pro': { displayName: 'Gemini 3.1 Pro', description: 'Advanced reasoning' },\n 'gemini-3-flash': { displayName: 'Gemini 3 Flash', description: 'Ultra-fast responses' },\n 'gemini-2.5-pro': { displayName: 'Gemini 2.5 Pro', description: 'Reliable workhorse' },\n 'gemini-2.5-flash': { displayName: 'Gemini 2.5 Flash', description: 'Speed-optimized' },\n\n // OpenAI models\n 'gpt-5.4-high': { displayName: 'GPT-5.4', description: 'Latest reasoning model' },\n 'gpt-5.2': { displayName: 'GPT-5.2', description: 'Flagship model' },\n 'gpt-5.3-codex': { displayName: 'GPT-5.3 Codex', description: 'Code specialist' },\n\n // Other\n 'composer-1.5': { displayName: 'Composer 1.5', description: 'Multi-file editing' },\n 'grok-code': { displayName: 'Grok Code', description: 'xAI code model' },\n\n // Demo / fun models\n 'gpt-8': { displayName: 'GPT-8', description: 'Writes code before you think it' },\n 'opus-7': { displayName: 'Opus 7', description: 'Achieved consciousness, ships on time' },\n};\n\nconst FALLBACK: ModelMeta = { displayName: '', description: '' };\n\nexport function getModelMeta(modelId: string): ModelMeta {\n const meta = MODEL_METADATA[modelId];\n if (meta) return meta;\n // Fallback: prettify the raw ID\n return {\n ...FALLBACK,\n displayName: modelId\n .replace(/^claude-/, '')\n .replace(/^gemini-/, 'Gemini ')\n .replace(/^gpt-/, 'GPT-')\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase()),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport {\n resetSettings,\n initializeSettings,\n} from '@shepai/core/infrastructure/services/settings.service';\nimport type { CompleteWebOnboardingUseCase } from '@shepai/core/application/use-cases/settings/complete-web-onboarding.use-case';\nimport type { AgentType } from '@shepai/core/domain/generated/output';\n\nexport async function updateAgentAndModel(\n agentType: string,\n model: string | null\n): Promise<{ ok: boolean; error?: string }> {\n if (!agentType.trim()) {\n return { ok: false, error: 'agent type is required' };\n }\n\n try {\n const useCase = resolve<CompleteWebOnboardingUseCase>('CompleteWebOnboardingUseCase');\n const updatedSettings = await useCase.execute({\n agentType: agentType.trim() as AgentType,\n model,\n });\n\n resetSettings();\n initializeSettings(updatedSettings);\n\n return { ok: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to update agent and model';\n return { ok: false, error: message };\n }\n}\n","/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","/**\n * Shep Directory Service\n *\n * Manages the ~/.shep/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHEP_HOME env var for test isolation (overrides default ~/.shep/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the Shep home directory.\n * Respects SHEP_HOME env var for test isolation, falls back to ~/.shep/\n */\nfunction resolveShepHomeDir(): string {\n return process.env.SHEP_HOME ?? join(homedir(), '.shep');\n}\n\n/**\n * Gets the path to the Shep home directory.\n * Uses SHEP_HOME env var if set, otherwise ~/.shep/\n *\n * @returns Path to shep home directory\n */\nexport function getShepHomeDir(): string {\n return resolveShepHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShepDbPath(): string {\n return join(resolveShepHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShepHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShepHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shep home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShepDirectory(): Promise<void> {\n const shepDir = resolveShepHomeDir();\n\n if (existsSync(shepDir)) {\n return;\n }\n\n try {\n await mkdir(shepDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create Shep directory at ${shepDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","/**\n * Tool Installation Metadata\n *\n * Dynamically loads tool definitions from individual JSON files in the tools/ directory.\n * Each JSON file defines installation commands and metadata for a single development tool.\n *\n * To add a new tool, create a JSON file in tools/ matching the ToolMetadata schema:\n * tools/<tool-name>.json\n */\n\nimport { readdirSync, readFileSync } from 'node:fs';\nimport { join, basename } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport interface ToolMetadata {\n /** Human-readable display name */\n name: string;\n\n /** Short one-line summary */\n summary: string;\n\n /** Detailed description */\n description: string;\n\n /** Tool tags for grouping in listings. A tool can belong to multiple categories. */\n tags: ('ide' | 'cli-agent' | 'vcs' | 'terminal')[];\n\n /** Company or developer name */\n author?: string;\n\n /** Main website/homepage URL (separate from documentation) */\n website?: string;\n\n /** Supported platforms (os.platform() values) */\n platforms?: ('linux' | 'darwin' | 'win32')[];\n\n /** URL to the tool's icon/logo image */\n iconUrl?: string;\n\n /** Binary name to check with 'which' command (string or per-platform map) */\n binary: string | Record<string, string>;\n\n /** Package manager or installation method */\n packageManager: string;\n\n /** Platform-specific installation commands as shell strings (keyed by os.platform()) */\n commands: Record<string, string>;\n\n /** Installation timeout in milliseconds */\n timeout: number;\n\n /** Official documentation URL */\n documentationUrl: string;\n\n /** Command to verify installation (e.g., \"code --version\") */\n verifyCommand: string;\n\n /** Whether the tool supports automated installation (default: true) */\n autoInstall?: boolean;\n\n /** Whether this tool is required for the platform to function (default: false) */\n required?: boolean;\n\n /** Command to open a directory in this tool.\n * String format: \"code {dir}\" — single command for all platforms.\n * Object format: { \"linux\": \"antigravity {dir}\", \"darwin\": \"agy {dir}\" } — per-platform commands. */\n openDirectory?: string | Record<string, string>;\n\n /** Override default spawn options for the launch process.\n * Defaults: { detached: true, stdio: \"ignore\" } (GUI IDEs).\n * CLI agents should use { shell: true, stdio: \"inherit\" } to run in the current terminal. */\n spawnOptions?: {\n shell?: boolean;\n stdio?: 'ignore' | 'inherit' | 'pipe';\n detached?: boolean;\n };\n\n /** Platform-specific command to launch this tool in a new terminal window.\n * Used when launching from the web UI where no terminal is available.\n * When set, the launcher spawns a new terminal window with this command.\n * Supports {dir} placeholder like openDirectory.\n * Example: \"x-terminal-emulator -e bash -c 'cd {dir} && claude'\" */\n terminalCommand?: string | Record<string, string>;\n}\n\nconst REQUIRED_FIELDS: (keyof ToolMetadata)[] = [\n 'name',\n 'summary',\n 'description',\n 'tags',\n 'binary',\n 'packageManager',\n 'commands',\n 'timeout',\n 'documentationUrl',\n 'verifyCommand',\n];\n\nfunction loadToolMetadata(): Record<string, ToolMetadata> {\n // NOTE: This module uses import.meta.url to resolve the tools/ directory.\n // It works correctly when loaded in the Node.js CLI bootstrap context but\n // breaks when bundled by Turbopack (import.meta.url points to the chunk\n // location where tools/ doesn't exist). API routes should access tool\n // metadata via the DI container, not by importing this module directly.\n const toolsDir = join(fileURLToPath(import.meta.url), '..', 'tools');\n const metadata: Record<string, ToolMetadata> = {};\n\n let files: string[];\n try {\n files = readdirSync(toolsDir).filter((f) => f.endsWith('.json'));\n } catch {\n return metadata;\n }\n\n for (const file of files) {\n const toolName = basename(file, '.json');\n try {\n const raw = readFileSync(join(toolsDir, file), 'utf-8');\n const parsed = JSON.parse(raw) as ToolMetadata;\n\n const missing = REQUIRED_FIELDS.filter((field) => !(field in parsed));\n if (missing.length > 0) {\n continue;\n }\n\n metadata[toolName] = parsed;\n } catch {\n // Skip malformed JSON files\n }\n }\n\n return metadata;\n}\n\nexport const TOOL_METADATA: Record<string, ToolMetadata> = loadToolMetadata();\n\n/**\n * Returns entries from TOOL_METADATA that can open a directory as an IDE.\n * A tool qualifies if it has an `openDirectory` field, regardless of category.\n * Each entry is [toolId, metadata].\n */\nexport function getIdeEntries(): [string, ToolMetadata][] {\n return Object.entries(TOOL_METADATA).filter(([, meta]) => meta.openDirectory != null);\n}\n\n/**\n * Returns entries from TOOL_METADATA tagged as \"terminal\" that have an\n * `openDirectory` field. Each entry is [toolId, metadata].\n */\nexport function getTerminalEntries(): [string, ToolMetadata][] {\n return Object.entries(TOOL_METADATA).filter(\n ([, meta]) => meta.tags.includes('terminal') && meta.openDirectory != null\n );\n}\n","/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\n\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkStat = (stat: Stats, options: IsexeOptions) =>\n stat.isFile() && checkMode(stat, options)\n\nconst checkMode = (stat: Stats, options: IsexeOptions) => {\n const myUid = options.uid ?? process.getuid?.()\n const myGroups = options.groups ?? process.getgroups?.() ?? []\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid')\n }\n\n const groups = new Set([myGid, ...myGroups])\n\n const mod = stat.mode\n const uid = stat.uid\n const gid = stat.gid\n\n const u = parseInt('100', 8)\n const g = parseInt('010', 8)\n const o = parseInt('001', 8)\n const ug = u | g\n\n return !!(\n mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0)\n )\n}\n","/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\nimport { delimiter } from 'node:path'\n\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkPathExt = (path: string, options: IsexeOptions) => {\n const { pathExt = process.env.PATHEXT || '' } = options\n const peSplit = pathExt.split(delimiter)\n if (peSplit.indexOf('') !== -1) {\n return true\n }\n\n for (const pes of peSplit) {\n const p = pes.toLowerCase()\n const ext = path.substring(path.length - p.length).toLowerCase()\n\n if (p && ext === p) {\n return true\n }\n }\n return false\n}\n\nconst checkStat = (stat: Stats, path: string, options: IsexeOptions) =>\n stat.isFile() && checkPathExt(path, options)\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map","import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use server';\n\nimport { statSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport type { LoadSettingsUseCase } from '@shepai/core/application/use-cases/settings/load-settings.use-case';\nimport { getShepHomeDir } from '@shepai/core/infrastructure/services/filesystem/shep-directory.service';\nimport type { Settings } from '@shepai/core/domain/generated/output';\n\nexport interface LoadSettingsResult {\n settings?: Settings;\n shepHome?: string;\n dbFileSize?: string;\n error?: string;\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\nexport async function loadSettings(): Promise<LoadSettingsResult> {\n try {\n const useCase = resolve<LoadSettingsUseCase>('LoadSettingsUseCase');\n const settings = await useCase.execute();\n\n const shepHome = getShepHomeDir();\n let dbFileSize = 'Unknown';\n try {\n const dbPath = join(shepHome, 'data');\n const stat = statSync(dbPath);\n dbFileSize = formatFileSize(stat.size);\n } catch {\n // DB file may not exist yet\n }\n\n return { settings, shepHome, dbFileSize };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load settings';\n return { error: message };\n }\n}\n","'use server';\n\nimport { platform } from 'node:os';\nimport { getTerminalEntries } from '@shepai/core/infrastructure/services/tool-installer/tool-metadata';\nimport { checkBinaryExists } from '@shepai/core/infrastructure/services/tool-installer/binary-exists';\n\nexport interface AvailableTerminal {\n id: string;\n name: string;\n available: boolean;\n}\n\n/**\n * Returns the list of terminal entries from tool metadata, filtered to the\n * current platform, with availability checks. The \"system-terminal\" entry\n * is always marked available and listed first.\n */\nexport async function getAvailableTerminals(): Promise<AvailableTerminal[]> {\n const currentPlatform = platform();\n const entries = getTerminalEntries();\n\n const results: AvailableTerminal[] = [];\n\n for (const [id, meta] of entries) {\n // Skip terminals not supported on this platform\n if (\n meta.platforms &&\n !meta.platforms.includes(currentPlatform as 'linux' | 'darwin' | 'win32')\n ) {\n continue;\n }\n\n // System terminal is always available\n if (id === 'system-terminal') {\n results.unshift({ id: 'system', name: meta.name, available: true });\n continue;\n }\n\n // Check binary availability\n const binary = typeof meta.binary === 'string' ? meta.binary : meta.binary[currentPlatform];\n if (!binary) continue;\n\n // For app-bundle terminals (Warp, iTerm2) that use verifyCommand instead of binary check\n let available = false;\n if (meta.verifyCommand.startsWith('test ')) {\n // Use verifyCommand for app-bundle checks (e.g., \"test -d /Applications/Warp.app\")\n try {\n const { execSync } = await import('node:child_process');\n execSync(meta.verifyCommand, { stdio: 'ignore' });\n available = true;\n } catch {\n available = false;\n }\n } else {\n const result = await checkBinaryExists(binary);\n available = result.found;\n }\n\n results.push({ id, name: meta.name, available });\n }\n\n // Ensure system terminal is always present even if not in tool metadata\n if (!results.some((r) => r.id === 'system')) {\n results.unshift({ id: 'system', name: 'System Terminal', available: true });\n }\n\n return results;\n}\n","/**\n * Cross-platform binary existence check.\n *\n * Wraps the npm `which` package to provide a single cross-platform API\n * for checking if a binary exists in the system PATH. Works on Unix\n * (which) and Windows (where.exe + PATHEXT resolution) without platform\n * branching.\n */\n\nimport which from 'which';\n\n/**\n * Check if a binary exists in the system PATH.\n *\n * Uses the npm `which` package which handles Windows PATHEXT resolution\n * internally (.exe, .cmd, .bat extensions).\n *\n * Returns:\n * - `{ found: true }` when the binary is on PATH\n * - `{ found: false, notInPath: true }` when the binary is not on PATH\n * - `{ found: false, error }` for genuine errors (e.g. permission denied)\n */\nexport const checkBinaryExists = async (\n binary: string\n): Promise<{ found: boolean; notInPath?: boolean; error?: Error }> => {\n try {\n const result = await which(binary, { nothrow: true });\n if (result !== null) {\n return { found: true };\n }\n return { found: false, notInPath: true };\n } catch (error) {\n return { found: false, error: error instanceof Error ? error : new Error(String(error)) };\n }\n};\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error","node_fs_1","promises_1","isexe","path","options","ignoreErrors","checkStat","e","er","exports","sync","stat","checkMode","myUid","myGroups","myGid","groups","mod","uid","gid","u","g","o","ug","node_path_1","checkPathExt","pathExt","peSplit","pes","p","ext","require_options","__commonJSMin","posix","__importStar","win32","__exportStar","platform","impl"],"mappings":"8DAEA,EAAA,EAAA,CAAA,CAAA,OCOA,IAAM,EAA4C,CAEhD,kBAAmB,CAAE,YAAa,WAAY,YAAa,6BAA8B,EACzF,oBAAqB,CAAE,YAAa,aAAc,YAAa,iBAAkB,EACjF,mBAAoB,CAAE,YAAa,YAAa,YAAa,qBAAsB,EAGnF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,sBAAuB,EACvF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,mBAAoB,CAAE,YAAa,mBAAoB,YAAa,iBAAkB,EAGtF,eAAgB,CAAE,YAAa,UAAW,YAAa,wBAAyB,EAChF,UAAW,CAAE,YAAa,UAAW,YAAa,gBAAiB,EACnE,gBAAiB,CAAE,YAAa,gBAAiB,YAAa,iBAAkB,EAGhF,e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,EAAY,CADG,MAAM,EAAkB,EAAA,EACpB,KAAK,CAG1B,EAAQ,IAAI,CAAC,IAAE,EAAI,KAAM,EAAK,IAAI,WAAE,CAAU,EAChD,CAOA,OAJI,AAAC,EAAQ,IAAI,CAAC,AAAC,GAAe,WAAT,AAAoB,EAAlB,EAAE,GAC3B,EAAQ,OAAO,CAAC,CAAE,GAAI,SAAU,KAAM,kBAAmB,WAAW,CAAK,GAGpE,CACT,iCAlDsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA","ignoreList":[5,6,14]}
@@ -1,4 +0,0 @@
1
- module.exports=[94691,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){return a?.trim()?(0,c.resolve)("IDeploymentService").getLogs(a):null}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"4069777802293ada165731bbded445396546f211f6",null),a.s(["getDeploymentLogs",()=>d])},33841,29918,46646,68670,85321,a=>{"use strict";var b=a.i(92658),c=a.i(2157),d=a.i(96380);let e=()=>void 0;function f(a){let b=!!process.env.DEBUG;return{info:b?(...b)=>console.info(a,...b):e,debug:b?(...b)=>console.debug(a,...b):e,warn:(...b)=>console.warn(a,...b),error:(...b)=>console.error(a,...b)}}var g=a.i(66680),h=a.i(50227),i=a.i(32278);function j(a,b){let c=a.replace(/\\/g,"/"),d=(0,g.createHash)("sha256").update(c).digest("hex").slice(0,16),e=b.replace(/\//g,"-");return(0,h.join)((0,i.getShepHomeDir)(),"repos",d,"wt",e).replace(/\\/g,"/")}a.s(["computeWorktreePath",()=>j],29918);var k=a.i(81719),l=a.i(12581);let m=f("[deployFeature]");async function n(a){if(m.info(`called — featureId="${a}"`),!a?.trim())return m.warn("rejected — featureId is empty"),{success:!1,error:"featureId is required"};try{let b=(0,d.resolve)("IFeatureRepository"),e=await b.findById(a);if(!e)return m.warn(`feature not found in repository: "${a}"`),{success:!1,error:`Feature not found: ${a}`};m.info(`feature found — repositoryPath="${e.repositoryPath}", branch="${e.branch}"`);let f=j(e.repositoryPath,e.branch);if(m.info(`computed worktreePath="${f}"`),!(0,c.existsSync)(f))return m.warn(`worktree path does not exist on disk: "${f}"`),{success:!1,error:`Worktree path does not exist: ${f}`};return m.info("worktree path exists, calling deploymentService.start()"),(0,d.resolve)("IDeploymentService").start(a,f,"feature"),m.info("start() returned successfully — state=Booting"),{success:!0,state:k.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy feature";return m.error(`error: ${a}`,b),{success:!1,error:a}}}(0,l.ensureServerEntryExports)([n]),(0,b.registerServerReference)(n,"4044c76b9ca04958a78b10631510e9d7c9e3b19e76",null),a.s(["deployFeature",()=>n],33841);let o=f("[deployRepository]");async function p(a){if(o.info(`called — repositoryPath="${a}"`),!a||!(0,h.isAbsolute)(a))return o.warn("rejected — not an absolute path"),{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,c.existsSync)(a))return o.warn(`directory does not exist: "${a}"`),{success:!1,error:`Directory does not exist: ${a}`};return o.info("directory exists, calling deploymentService.start()"),(0,d.resolve)("IDeploymentService").start(a,a,"repository"),o.info("start() returned successfully — state=Booting"),{success:!0,state:k.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy repository";return o.error(`error: ${a}`,b),{success:!1,error:a}}}async function q(a){if(!a?.trim())return{success:!1,error:"targetId is required"};try{let b=(0,d.resolve)("IDeploymentService");return await b.stop(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to stop deployment"}}}async function r(a){return a?.trim()?(0,d.resolve)("IDeploymentService").getStatus(a):null}(0,l.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40673a079decdba00b03f2c089b3a16875682aba42",null),a.s(["deployRepository",()=>p],46646),(0,l.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"406e18920a49055311e0c44dcfdd3e21e287800a2e",null),a.s(["stopDeployment",()=>q],68670),(0,l.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"40a60fc4bd693346c399464bf2db4f62871013853a",null),a.s(["getDeploymentStatus",()=>r],85321)},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00a637ba55f2318df1a1223bbb0a679654d49165bb",null),a.s(["pickFolder",()=>g],12513)},81719,a=>{"use strict";var b,c,d,e,f=((b={}).Todo="Todo",b.WIP="Work in Progress",b.Done="Done",b.Review="Review",b),g=((c={}).Started="Started",c.Analyze="Analyze",c.Requirements="Requirements",c.Research="Research",c.Planning="Planning",c.Implementation="Implementation",c.Review="Review",c.Maintain="Maintain",c.Blocked="Blocked",c.Pending="Pending",c.Deleting="Deleting",c),h=((d={}).Booting="Booting",d.Ready="Ready",d.Stopped="Stopped",d),i=((e={}).pending="pending",e.running="running",e.completed="completed",e.failed="failed",e.interrupted="interrupted",e.cancelled="cancelled",e.waitingApproval="waiting_approval",e);a.s(["AgentRunStatus",()=>i,"DeploymentState",()=>h,"SdlcLifecycle",()=>g,"TaskState",()=>f])},96380,a=>{"use strict";function b(a){let b=globalThis.__shepContainer;if(!b)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return b.resolve(a)}a.s(["resolve",()=>b])},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},32278,a=>{"use strict";a.i(12714);var b=a.i(60526),c=a.i(50227);function d(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}a.i(2157),a.s(["getShepHomeDir",()=>d])},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},87596,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321);a.s([],78455),a.i(78455),a.s(["00a637ba55f2318df1a1223bbb0a679654d49165bb",()=>b.pickFolder,"4044c76b9ca04958a78b10631510e9d7c9e3b19e76",()=>d.deployFeature,"40673a079decdba00b03f2c089b3a16875682aba42",()=>e.deployRepository,"4069777802293ada165731bbded445396546f211f6",()=>c.getDeploymentLogs,"406e18920a49055311e0c44dcfdd3e21e287800a2e",()=>f.stopDeployment,"40a60fc4bd693346c399464bf2db4f62871013853a",()=>g.getDeploymentStatus],87596)}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__a50a7e39._.js.map