@shepai/cli 1.122.1 → 1.122.2-pr367.fdba557

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 (378) hide show
  1. package/dist/packages/core/src/application/ports/output/services/index.d.ts +2 -0
  2. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/tunnel-service.interface.d.ts +41 -0
  4. package/dist/packages/core/src/application/ports/output/services/tunnel-service.interface.d.ts.map +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/tunnel-service.interface.js +14 -0
  6. package/dist/packages/core/src/application/ports/output/services/webhook-service.interface.d.ts +65 -0
  7. package/dist/packages/core/src/application/ports/output/services/webhook-service.interface.d.ts.map +1 -0
  8. package/dist/packages/core/src/application/ports/output/services/webhook-service.interface.js +10 -0
  9. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/di/container.js +14 -0
  11. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  12. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +21 -4
  13. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/validate.node.d.ts +7 -1
  14. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/validate.node.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/validate.node.js +24 -2
  16. package/dist/packages/core/src/infrastructure/services/tunnel/cloudflare-tunnel.service.d.ts +55 -0
  17. package/dist/packages/core/src/infrastructure/services/tunnel/cloudflare-tunnel.service.d.ts.map +1 -0
  18. package/dist/packages/core/src/infrastructure/services/tunnel/cloudflare-tunnel.service.js +203 -0
  19. package/dist/packages/core/src/infrastructure/services/webhook/github-webhook.service.d.ts +75 -0
  20. package/dist/packages/core/src/infrastructure/services/webhook/github-webhook.service.d.ts.map +1 -0
  21. package/dist/packages/core/src/infrastructure/services/webhook/github-webhook.service.js +372 -0
  22. package/dist/packages/core/src/infrastructure/services/webhook/webhook-manager.service.d.ts +82 -0
  23. package/dist/packages/core/src/infrastructure/services/webhook/webhook-manager.service.d.ts.map +1 -0
  24. package/dist/packages/core/src/infrastructure/services/webhook/webhook-manager.service.js +206 -0
  25. package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
  26. package/dist/src/presentation/cli/commands/ui.command.js +15 -0
  27. package/dist/src/presentation/web/app/actions/load-webhook-status.d.ts +3 -0
  28. package/dist/src/presentation/web/app/actions/load-webhook-status.d.ts.map +1 -0
  29. package/dist/src/presentation/web/app/actions/load-webhook-status.js +19 -0
  30. package/dist/src/presentation/web/app/api/webhooks/deliveries/route.d.ts +9 -0
  31. package/dist/src/presentation/web/app/api/webhooks/deliveries/route.d.ts.map +1 -0
  32. package/dist/src/presentation/web/app/api/webhooks/deliveries/route.js +27 -0
  33. package/dist/src/presentation/web/app/api/webhooks/github/route.d.ts +17 -0
  34. package/dist/src/presentation/web/app/api/webhooks/github/route.d.ts.map +1 -0
  35. package/dist/src/presentation/web/app/api/webhooks/github/route.js +70 -0
  36. package/dist/src/presentation/web/app/api/webhooks/status/route.d.ts +9 -0
  37. package/dist/src/presentation/web/app/api/webhooks/status/route.d.ts.map +1 -0
  38. package/dist/src/presentation/web/app/api/webhooks/status/route.js +26 -0
  39. package/dist/src/presentation/web/app/webhooks/page.d.ts +4 -0
  40. package/dist/src/presentation/web/app/webhooks/page.d.ts.map +1 -0
  41. package/dist/src/presentation/web/app/webhooks/page.js +9 -0
  42. package/dist/src/presentation/web/components/features/webhooks/types.d.ts +32 -0
  43. package/dist/src/presentation/web/components/features/webhooks/types.d.ts.map +1 -0
  44. package/dist/src/presentation/web/components/features/webhooks/types.js +1 -0
  45. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.d.ts +6 -0
  46. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.d.ts.map +1 -0
  47. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.js +38 -0
  48. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.stories.d.ts +9 -0
  49. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.stories.d.ts.map +1 -0
  50. package/dist/src/presentation/web/components/features/webhooks/webhook-delivery-table.stories.js +69 -0
  51. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.d.ts +7 -0
  52. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.d.ts.map +1 -0
  53. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.js +11 -0
  54. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.stories.d.ts +9 -0
  55. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.stories.d.ts.map +1 -0
  56. package/dist/src/presentation/web/components/features/webhooks/webhook-repo-list.stories.js +31 -0
  57. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.d.ts +6 -0
  58. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.d.ts.map +1 -0
  59. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.js +21 -0
  60. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.stories.d.ts +9 -0
  61. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.stories.d.ts.map +1 -0
  62. package/dist/src/presentation/web/components/features/webhooks/webhook-status-cards.stories.js +56 -0
  63. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.d.ts +6 -0
  64. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.d.ts.map +1 -0
  65. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.js +39 -0
  66. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.stories.d.ts +8 -0
  67. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.stories.d.ts.map +1 -0
  68. package/dist/src/presentation/web/components/features/webhooks/webhooks-page-client.stories.js +59 -0
  69. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  70. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  71. package/dist/src/presentation/web/dev-server.js +20 -0
  72. package/dist/tsconfig.build.tsbuildinfo +1 -1
  73. package/package.json +3 -1
  74. package/web/.next/BUILD_ID +1 -1
  75. package/web/.next/app-path-routes-manifest.json +5 -1
  76. package/web/.next/build-manifest.json +6 -6
  77. package/web/.next/fallback-build-manifest.json +2 -2
  78. package/web/.next/prerender-manifest.json +3 -3
  79. package/web/.next/required-server-files.js +3 -3
  80. package/web/.next/required-server-files.json +3 -3
  81. package/web/.next/routes-manifest.json +24 -0
  82. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +4 -4
  83. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  84. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  85. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  86. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  88. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  89. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  90. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  91. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +4 -4
  93. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  94. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  95. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  96. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +4 -4
  98. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  99. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  100. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  101. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +4 -4
  103. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  104. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  105. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  106. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  108. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  109. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  110. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  111. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +4 -4
  113. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  114. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  115. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  116. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  117. package/web/.next/server/app/(dashboard)/page/build-manifest.json +4 -4
  118. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  119. package/web/.next/server/app/(dashboard)/page.js +1 -1
  120. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  121. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +4 -4
  123. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  124. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  125. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  126. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  127. package/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
  128. package/web/.next/server/app/_global-error.html +2 -2
  129. package/web/.next/server/app/_global-error.rsc +1 -1
  130. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  131. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  132. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  133. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  134. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  135. package/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
  136. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  137. package/web/.next/server/app/_not-found/page.js +1 -1
  138. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  139. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/api/attachments/preview/route.js +1 -1
  141. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  142. package/web/.next/server/app/api/evidence/route.js +1 -1
  143. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  144. package/web/.next/server/app/api/graph-data/route.js +1 -1
  145. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  146. package/web/.next/server/app/api/webhooks/deliveries/route/app-paths-manifest.json +3 -0
  147. package/web/.next/server/app/api/webhooks/deliveries/route/build-manifest.json +11 -0
  148. package/web/.next/server/app/api/webhooks/deliveries/route/server-reference-manifest.json +4 -0
  149. package/web/.next/server/app/api/webhooks/deliveries/route.js +6 -0
  150. package/web/.next/server/app/api/webhooks/deliveries/route.js.map +5 -0
  151. package/web/.next/server/app/api/webhooks/deliveries/route.js.nft.json +1 -0
  152. package/web/.next/server/app/api/webhooks/deliveries/route_client-reference-manifest.js +2 -0
  153. package/web/.next/server/app/api/webhooks/github/route/app-paths-manifest.json +3 -0
  154. package/web/.next/server/app/api/webhooks/github/route/build-manifest.json +11 -0
  155. package/web/.next/server/app/api/webhooks/github/route/server-reference-manifest.json +4 -0
  156. package/web/.next/server/app/api/webhooks/github/route.js +6 -0
  157. package/web/.next/server/app/api/webhooks/github/route.js.map +5 -0
  158. package/web/.next/server/app/api/webhooks/github/route.js.nft.json +1 -0
  159. package/web/.next/server/app/api/webhooks/github/route_client-reference-manifest.js +2 -0
  160. package/web/.next/server/app/api/webhooks/status/route/app-paths-manifest.json +3 -0
  161. package/web/.next/server/app/api/webhooks/status/route/build-manifest.json +11 -0
  162. package/web/.next/server/app/api/webhooks/status/route/server-reference-manifest.json +4 -0
  163. package/web/.next/server/app/api/webhooks/status/route.js +6 -0
  164. package/web/.next/server/app/api/webhooks/status/route.js.map +5 -0
  165. package/web/.next/server/app/api/webhooks/status/route.js.nft.json +1 -0
  166. package/web/.next/server/app/api/webhooks/status/route_client-reference-manifest.js +2 -0
  167. package/web/.next/server/app/settings/page/build-manifest.json +4 -4
  168. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  169. package/web/.next/server/app/settings/page.js +1 -1
  170. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  171. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  172. package/web/.next/server/app/skills/page/build-manifest.json +4 -4
  173. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  174. package/web/.next/server/app/skills/page.js +1 -1
  175. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  176. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  177. package/web/.next/server/app/tools/page/build-manifest.json +4 -4
  178. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  179. package/web/.next/server/app/tools/page.js +1 -1
  180. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  181. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  182. package/web/.next/server/app/version/page/build-manifest.json +4 -4
  183. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  184. package/web/.next/server/app/version/page.js +2 -2
  185. package/web/.next/server/app/version/page.js.nft.json +1 -1
  186. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  187. package/web/.next/server/app/webhooks/page/app-paths-manifest.json +3 -0
  188. package/web/.next/server/app/webhooks/page/build-manifest.json +18 -0
  189. package/web/.next/server/app/webhooks/page/next-font-manifest.json +6 -0
  190. package/web/.next/server/app/webhooks/page/react-loadable-manifest.json +1 -0
  191. package/web/.next/server/app/webhooks/page/server-reference-manifest.json +35 -0
  192. package/web/.next/server/app/webhooks/page.js +16 -0
  193. package/web/.next/server/app/webhooks/page.js.map +5 -0
  194. package/web/.next/server/app/webhooks/page.js.nft.json +1 -0
  195. package/web/.next/server/app/webhooks/page_client-reference-manifest.js +2 -0
  196. package/web/.next/server/app-paths-manifest.json +5 -1
  197. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_deliveries_route_actions_d9e34c8d.js +3 -0
  198. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_deliveries_route_actions_d9e34c8d.js.map +1 -0
  199. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_github_route_actions_1b0d0c38.js +3 -0
  200. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_github_route_actions_1b0d0c38.js.map +1 -0
  201. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_status_route_actions_1a0d86a1.js +3 -0
  202. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_webhooks_status_route_actions_1a0d86a1.js.map +1 -0
  203. package/web/.next/server/chunks/[root-of-the-server]__15e5d45c._.js +3 -0
  204. package/web/.next/server/chunks/[root-of-the-server]__15e5d45c._.js.map +1 -0
  205. package/web/.next/server/chunks/[root-of-the-server]__23be381e._.js +3 -0
  206. package/web/.next/server/chunks/[root-of-the-server]__23be381e._.js.map +1 -0
  207. package/web/.next/server/chunks/{[root-of-the-server]__42b7ab55._.js → [root-of-the-server]__3baec744._.js} +2 -2
  208. package/web/.next/server/chunks/{[root-of-the-server]__42b7ab55._.js.map → [root-of-the-server]__3baec744._.js.map} +1 -1
  209. package/web/.next/server/chunks/{[root-of-the-server]__53013576._.js → [root-of-the-server]__7d63f9a4._.js} +2 -2
  210. package/web/.next/server/chunks/[root-of-the-server]__9fc760c0._.js +3 -0
  211. package/web/.next/server/chunks/[root-of-the-server]__9fc760c0._.js.map +1 -0
  212. package/web/.next/server/chunks/{[root-of-the-server]__92078db6._.js → [root-of-the-server]__a1c7c02a._.js} +2 -2
  213. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  214. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  215. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_activity_22f9667f.js +3 -0
  217. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_activity_22f9667f.js.map +1 -0
  218. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js +3 -0
  219. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js.map +1 -0
  220. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  221. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  223. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +4 -0
  225. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6b17a22d._.js.map → [root-of-the-server]__11033878._.js.map} +1 -1
  226. package/web/.next/server/chunks/ssr/{[root-of-the-server]__06fef644._.js → [root-of-the-server]__12c2ab7d._.js} +2 -2
  227. package/web/.next/server/chunks/ssr/{[root-of-the-server]__06fef644._.js.map → [root-of-the-server]__12c2ab7d._.js.map} +1 -1
  228. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js +1 -1
  229. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/[root-of-the-server]__3c16bf85._.js +3 -0
  231. package/web/.next/server/chunks/ssr/[root-of-the-server]__3c16bf85._.js.map +1 -0
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__610f06df._.js +3 -0
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__610f06df._.js.map +1 -0
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  235. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  236. package/web/.next/server/chunks/ssr/[root-of-the-server]__76915230._.js +4 -0
  237. package/web/.next/server/chunks/ssr/{[root-of-the-server]__8c553503._.js.map → [root-of-the-server]__76915230._.js.map} +1 -1
  238. package/web/.next/server/chunks/ssr/[root-of-the-server]__7a939e4e._.js +4 -0
  239. package/web/.next/server/chunks/ssr/{[root-of-the-server]__a022445f._.js.map → [root-of-the-server]__7a939e4e._.js.map} +1 -1
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__87a7ae30._.js +3 -0
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__87a7ae30._.js.map +1 -0
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js +1 -1
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +1 -1
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__920dccd5._.js +4 -0
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__920dccd5._.js.map +1 -0
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__c4dc1b5a._.js +4 -0
  249. package/web/.next/server/chunks/ssr/{[root-of-the-server]__a7de2711._.js.map → [root-of-the-server]__c4dc1b5a._.js.map} +1 -1
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js +1 -1
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +4 -0
  253. package/web/.next/server/chunks/ssr/{[root-of-the-server]__804c006d._.js.map → [root-of-the-server]__fdc75809._.js.map} +1 -1
  254. package/web/.next/server/chunks/ssr/_07f57bd0._.js +3 -0
  255. package/web/.next/server/chunks/ssr/_07f57bd0._.js.map +1 -0
  256. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  257. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  258. package/web/.next/server/chunks/ssr/_15a756dd._.js +3 -0
  259. package/web/.next/server/chunks/ssr/_15a756dd._.js.map +1 -0
  260. package/web/.next/server/chunks/ssr/_26b2c311._.js +3 -0
  261. package/web/.next/server/chunks/ssr/_26b2c311._.js.map +1 -0
  262. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  263. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/{_92d851b4._.js → _3d1ed2a7._.js} +2 -2
  265. package/web/.next/server/chunks/ssr/_3d1ed2a7._.js.map +1 -0
  266. package/web/.next/server/chunks/ssr/_3eca2297._.js +3 -0
  267. package/web/.next/server/chunks/ssr/{_b294a667._.js.map → _3eca2297._.js.map} +1 -1
  268. package/web/.next/server/chunks/ssr/_4470c218._.js +3 -0
  269. package/web/.next/server/chunks/ssr/_4470c218._.js.map +1 -0
  270. package/web/.next/server/chunks/ssr/_462cc3a6._.js +3 -0
  271. package/web/.next/server/chunks/ssr/_462cc3a6._.js.map +1 -0
  272. package/web/.next/server/chunks/ssr/_961cb4b2._.js +3 -0
  273. package/web/.next/server/chunks/ssr/_961cb4b2._.js.map +1 -0
  274. package/web/.next/server/chunks/ssr/_a4899a76._.js +3 -0
  275. package/web/.next/server/chunks/ssr/_a4899a76._.js.map +1 -0
  276. package/web/.next/server/chunks/ssr/_b5babdfc._.js +9 -0
  277. package/web/.next/server/chunks/ssr/_b5babdfc._.js.map +1 -0
  278. package/web/.next/server/chunks/ssr/_b7eb93fc._.js +4 -0
  279. package/web/.next/server/chunks/ssr/_b7eb93fc._.js.map +1 -0
  280. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  281. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/_f8b36e2c._.js +3 -0
  283. package/web/.next/server/chunks/ssr/_f8b36e2c._.js.map +1 -0
  284. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  285. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  286. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_webhooks_webhooks-page-client_tsx_b2662ea3._.js +3 -0
  287. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_webhooks_webhooks-page-client_tsx_b2662ea3._.js.map +1 -0
  288. package/web/.next/server/chunks/ssr/{_1bb131c4._.js → node_modules__pnpm_747b43ac._.js} +2 -2
  289. package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js.map +1 -0
  290. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  291. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  293. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  297. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  299. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  306. package/web/.next/server/middleware-build-manifest.js +4 -4
  307. package/web/.next/server/pages/500.html +2 -2
  308. package/web/.next/server/server-reference-manifest.js +1 -1
  309. package/web/.next/server/server-reference-manifest.json +57 -35
  310. package/web/.next/static/chunks/0c76de69325ef923.js +1 -0
  311. package/web/.next/static/chunks/{658fc2f5f65cf3b5.js → 1b9d34af4064dafe.js} +2 -2
  312. package/web/.next/static/chunks/{50dd80c8aafa3b20.js → 293ccfbe777d995a.js} +1 -1
  313. package/web/.next/static/chunks/3835a408dbf8d0bb.js +1 -0
  314. package/web/.next/static/chunks/{941c13dcdb1978a4.js → 3f0773d9b56e04a2.js} +2 -2
  315. package/web/.next/static/chunks/40b6bcf1a2de4a0f.js +1 -0
  316. package/web/.next/static/chunks/4c5b31a2c65d4aa5.js +11 -0
  317. package/web/.next/static/chunks/59a0709f1b080353.js +1 -0
  318. package/web/.next/static/chunks/5f6161ceb4263319.js +1 -0
  319. package/web/.next/static/chunks/77ff1b7b725b7780.js +1 -0
  320. package/web/.next/static/chunks/{672e3da3ad26005b.js → 98e3a7cf58fc912a.js} +1 -1
  321. package/web/.next/static/chunks/9af45e885bd4ccef.js +1 -0
  322. package/web/.next/static/chunks/a57dc2afcf67304a.js +1 -0
  323. package/web/.next/static/chunks/b4f502a76ba10e4b.js +1 -0
  324. package/web/.next/static/chunks/b5d8e8100e310d9f.css +1 -0
  325. package/web/.next/static/chunks/{df85e52b1afb7340.js → b747e59ebdcbd917.js} +1 -1
  326. package/web/.next/static/chunks/c04ce6760f349f3e.js +1 -0
  327. package/web/.next/static/chunks/{78ab7b134f0649ac.js → c3c68de2392a9071.js} +1 -1
  328. package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
  329. package/web/.next/static/chunks/cf30e300568abf0f.js +1 -0
  330. package/web/.next/static/chunks/d43dff89384fb60a.js +1 -0
  331. package/web/.next/static/chunks/{37ac7fe1cd493293.js → e087f3e5c46c0756.js} +1 -1
  332. package/web/.next/static/chunks/{turbopack-426d9bc2450816ba.js → turbopack-b1685b5f87ad1d60.js} +1 -1
  333. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +0 -3
  334. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +0 -1
  335. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +0 -4
  336. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +0 -4
  337. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +0 -4
  338. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js +0 -3
  339. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js.map +0 -1
  340. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +0 -4
  341. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +0 -4
  342. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +0 -3
  343. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +0 -1
  344. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +0 -1
  345. package/web/.next/server/chunks/ssr/_1bb79fe8._.js +0 -3
  346. package/web/.next/server/chunks/ssr/_1bb79fe8._.js.map +0 -1
  347. package/web/.next/server/chunks/ssr/_469c5451._.js +0 -3
  348. package/web/.next/server/chunks/ssr/_469c5451._.js.map +0 -1
  349. package/web/.next/server/chunks/ssr/_6d26a08f._.js +0 -3
  350. package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +0 -1
  351. package/web/.next/server/chunks/ssr/_75f4ccb3._.js +0 -3
  352. package/web/.next/server/chunks/ssr/_75f4ccb3._.js.map +0 -1
  353. package/web/.next/server/chunks/ssr/_92d851b4._.js.map +0 -1
  354. package/web/.next/server/chunks/ssr/_b294a667._.js +0 -3
  355. package/web/.next/server/chunks/ssr/_b5fc318a._.js +0 -3
  356. package/web/.next/server/chunks/ssr/_b5fc318a._.js.map +0 -1
  357. package/web/.next/server/chunks/ssr/_f1a649e3._.js +0 -9
  358. package/web/.next/server/chunks/ssr/_f1a649e3._.js.map +0 -1
  359. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js +0 -3
  360. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js.map +0 -1
  361. package/web/.next/static/chunks/0d2af96e64960ef5.css +0 -1
  362. package/web/.next/static/chunks/11e4439096f8d652.js +0 -1
  363. package/web/.next/static/chunks/303a1217006489b9.js +0 -1
  364. package/web/.next/static/chunks/4562ee849ea13c3a.js +0 -1
  365. package/web/.next/static/chunks/845d8e58a91014e6.js +0 -1
  366. package/web/.next/static/chunks/84a181ff3270fd9f.js +0 -1
  367. package/web/.next/static/chunks/96eeeb28e06de78c.js +0 -1
  368. package/web/.next/static/chunks/9df4681de92ebfc3.js +0 -11
  369. package/web/.next/static/chunks/cca0f5112a9260d8.js +0 -1
  370. package/web/.next/static/chunks/e2ef95d904c360f3.js +0 -1
  371. package/web/.next/static/chunks/e6a2fb8707e079ff.js +0 -1
  372. package/web/.next/static/chunks/e9c3fbbeb418cbfa.js +0 -1
  373. package/web/.next/static/chunks/ed3a602003bcb31b.js +0 -1
  374. /package/web/.next/server/chunks/{[root-of-the-server]__53013576._.js.map → [root-of-the-server]__7d63f9a4._.js.map} +0 -0
  375. /package/web/.next/server/chunks/{[root-of-the-server]__92078db6._.js.map → [root-of-the-server]__a1c7c02a._.js.map} +0 -0
  376. /package/web/.next/static/{hsK1x0unrjI_pUsvQhn6P → svtG6xX1MdaGWkml8eX53}/_buildManifest.js +0 -0
  377. /package/web/.next/static/{hsK1x0unrjI_pUsvQhn6P → svtG6xX1MdaGWkml8eX53}/_clientMiddlewareManifest.json +0 -0
  378. /package/web/.next/static/{hsK1x0unrjI_pUsvQhn6P → svtG6xX1MdaGWkml8eX53}/_ssgManifest.js +0 -0
@@ -0,0 +1,4 @@
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,"0086d2635308adbfc937a17aaf6a30d83155a27a6e",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,"606531d4461efcd1519b8920d5c29b45f3a0726d23",null),a.s(["updateAgentAndModel",()=>l],27900)},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}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},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,"003fb395a82a35493ff21e1b4d76a40fb968562d13",null),a.s(["pickFolder",()=>g],12513)},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])},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,"0018e26ec7340320d0fe91de606bea0ebda3218627",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,"006a2b4161540f8b971d7b1878223e8afc5ca16cd9",null),a.s(["getAvailableTerminals",()=>m],79195)},82848,a=>{a.v(a=>Promise.resolve().then(()=>a(74533)))}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__76915230._.js.map
@@ -1 +1 @@
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,eAAgB,CAAE,YAAa,eAAgB,YAAa,oBAAqB,EACjF,YAAa,CAAE,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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
+ {"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","../../../../../../../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/lib/server-container.ts","../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.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","/* 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 * 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","/**\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,CAA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AAS,EAAK,aAAa,CAAE,CAAE,MAAO,QAAS,GAC/C,EAAY,EACd,CAAE,KAAM,CACN,GAAY,CACd,MAGA,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":[3,4,14]}
@@ -0,0 +1,4 @@
1
+ module.exports=[84095,56799,80496,41872,9959,50845,26604,54723,18942,49560,39353,29207,a=>{"use strict";var b=a.i(92658),c=a.i(50227),d=a.i(33244),e=a.i(96380),f=a.i(12581);async function g(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};let g=(0,d.getSettings)().environment.defaultEditor,h=(0,e.resolve)("LaunchIdeUseCase"),i=await h.execute({editorId:g,repositoryPath:b,branch:f,checkAvailability:!0});return i.ok?{success:!0,editor:i.editorName,path:i.worktreePath}:{success:!1,error:i.message}}(0,f.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"40c60863ff34a00053d3dd8bc43882092f4d8228fd",null),a.s(["openIde",()=>g],84095);var h=a.i(2157),i=a.i(60526),j=a.i(74533),k=a.i(29918),l=a.i(43738);let m={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]},win32:{cmd:"cmd.exe",args:a=>["/c","start","powershell","-NoExit","-Command",`Set-Location "${a}"`]}};async function n(a){let{repositoryPath:b,branch:e}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,d.getSettings)(),c=a.environment.shellPreference,g=a.environment.terminalPreference??"system",n=e?(0,k.computeWorktreePath)(b,e):b;if(!(0,h.existsSync)(n))return{success:!1,error:`Path does not exist: ${n}`};if("system"!==g){let a=(0,l.getTerminalEntries)().find(([a])=>a===g);if(a){let[,b]=a;if(b.openDirectory){var f;let a=(f=b.openDirectory,"string"==typeof f?f:f[(0,i.platform)()]??Object.values(f)[0]);if(a.includes("{dir}")){let d=a.replace("{dir}",n);if(b.spawnOptions?.shell===!0){let a=(0,j.spawn)(d,[],{detached:!0,stdio:"ignore",shell:!0});a.on("error",()=>void 0),a.unref()}else{let[a,...b]=d.split(/\s+/),c=(0,j.spawn)(a,b,{detached:!0,stdio:"ignore"});c.on("error",()=>void 0),c.unref()}return{success:!0,path:n,shell:c}}}}}let o=m[(0,i.platform)()];if(!o)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let p=(0,j.spawn)(o.cmd,o.args(n),{detached:!0,stdio:"ignore"});return p.on("error",()=>void 0),p.unref(),{success:!0,path:n,shell:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,f.ensureServerEntryExports)([n]),(0,b.registerServerReference)(n,"407d786102ecfd72db1c50ac67ec56ea4cc1d86f08",null),a.s(["openShell",()=>n],56799);let o={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]},win32:{cmd:"explorer",args:a=>[a]}};async function p(a){if(!a||!(0,c.isAbsolute)(a))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,h.existsSync)(a))return{success:!1,error:"Directory not found"};let b=o[(0,i.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let c=(0,j.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function q(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40b781414b2142bd0f16672fa73ddb5b5035aad3be",null),a.s(["openFolder",()=>p],80496),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"003504dba993e94b2b1aa97f80a257aafc8e3a1e33",null),a.s(["isAgentSetupComplete",()=>q],41872);let r={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},s={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},t={"claude-code":"claude",cursor:"agent","gemini-cli":"gemini"};async function u(){var a;let b;try{b=(0,d.getSettings)().agent.type}catch{return{agentType:"unknown",installed:!1,authenticated:!1,label:"Unknown",binaryName:null,authCommand:null}}let f=r[b]??b,g=s[b]??null,k=t[b]??null;if(!g)return{agentType:b,installed:!0,authenticated:!0,label:f,binaryName:null,authCommand:null};let l=!1;try{let a=(0,e.resolve)("ListToolsUseCase"),b=(await a.execute()).find(a=>a.id===g);l=b?.status.status==="available"}catch{l=!1}if(!l)return{agentType:b,installed:!1,authenticated:!1,label:f,binaryName:k,authCommand:k?`Install ${f} first`:null};if(!function(a){let b=(0,i.homedir)();switch(a){case"claude-code":{if(process.env.ANTHROPIC_API_KEY||process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.CLAUDE_CODE_OAUTH_TOKEN)return!0;let a=(0,c.join)(b,".claude",".credentials.json");return(0,h.existsSync)(a)}case"cursor":{if(process.env.CURSOR_API_KEY)return!0;let a=(0,c.join)(b,".cursor");return(0,h.existsSync)(a)}case"gemini-cli":{if(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY||process.env.GOOGLE_APPLICATION_CREDENTIALS)return!0;let a=(0,c.join)(b,".gemini","google_accounts.json");return(0,h.existsSync)(a)}default:return!0}}(b))return{agentType:b,installed:!0,authenticated:!1,label:f,binaryName:k,authCommand:k};let m=!0;return k&&(m=await (a=b,new Promise(b=>{let c,d;switch(a){case"claude-code":c=k,d=["auth","status"];break;case"cursor":c=k,d=["status"];break;default:b(!0);return}try{(0,j.execFile)(c,d,{timeout:5e3},a=>{b(!a)})}catch{b(!1)}}))),{agentType:b,installed:!0,authenticated:m,label:f,binaryName:k,authCommand:m?null:k}}async function v(a,b,c){if(!a?.trim())return{error:"id is required"};try{let d=(0,e.resolve)("DeleteFeatureUseCase"),f={};return void 0!==b&&(f.cleanup=b),void 0!==c&&(f.cascadeDelete=c),{feature:Object.keys(f).length>0?await d.execute(a,f):await d.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function w(a){if(!a.trim())return{resumed:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("ResumeFeatureUseCase");return await b.execute(a),{resumed:!0}}catch(a){return{resumed:!1,error:a instanceof Error?a.message:"Failed to resume feature"}}}async function x(a){if(!a.trim())return{started:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("StartFeatureUseCase");return await b.execute(a),{started:!0}}catch(a){return{started:!1,error:a instanceof Error?a.message:"Failed to start feature"}}}async function y(a){if(!a.trim())return{stopped:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("IAgentRunRepository"),c=(await b.list()).find(b=>b.featureId===a&&"completed"!==b.status&&"failed"!==b.status&&"interrupted"!==b.status&&"cancelled"!==b.status);if(!c)return{stopped:!1,error:"No active agent run found for this feature"};let d=(0,e.resolve)("StopAgentRunUseCase"),f=await d.execute(c.id);if(!f.stopped)return{stopped:!1,error:f.reason};return{stopped:!0}}catch(a){return{stopped:!1,error:a instanceof Error?a.message:"Failed to stop agent"}}}async function z(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,e.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function A(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,e.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function B(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([u]),(0,b.registerServerReference)(u,"0025d6de1fc71ffa9e1e7741289d3f516307f53824",null),a.s(["checkAgentAuth",()=>u],9959),(0,f.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"7023fd2200bfd6a507a7f3b0ebef3f13a213f0a5e5",null),a.s(["deleteFeature",()=>v],50845),(0,f.ensureServerEntryExports)([w]),(0,b.registerServerReference)(w,"40b648dda29656e0de72d71429311b407eee554465",null),a.s(["resumeFeature",()=>w],26604),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"40268fb7f4d473db4897e75432b3fe2aa79187bb0a",null),a.s(["startFeature",()=>x],54723),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"4067a9276857e4523768e9e0bc24fc52be5d224c2e",null),a.s(["stopFeature",()=>y],18942),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"403c62f216fc449bc200fdfac91ff10696a0054fa6",null),a.s(["addRepository",()=>z],49560),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"407c34376b3b38e61dbb384e803c0d1989ff2d6524",null),a.s(["deleteRepository",()=>A],39353),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"4064e3ecf268ddf0c1597a30a57805aebd148188cc",null),a.s(["getFeatureMetadata",()=>B],29207)},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}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},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,"003fb395a82a35493ff21e1b4d76a40fb968562d13",null),a.s(["pickFolder",()=>g],12513)},94691,29918,33841,46646,68670,85321,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);async function e(a){return a?.trim()?(0,c.resolve)("IDeploymentService").getLogs(a):null}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"404f6297c2a0c4755f575c226bc9e8951a44e1302e",null),a.s(["getDeploymentLogs",()=>e],94691);var f=a.i(2157);let g=()=>void 0;function h(a){let b=!!process.env.DEBUG;return{info:b?(...b)=>console.info(a,...b):g,debug:b?(...b)=>console.debug(a,...b):g,warn:(...b)=>console.warn(a,...b),error:(...b)=>console.error(a,...b)}}var i=a.i(66680),j=a.i(50227),k=a.i(32278);function l(a,b){let c=a.replace(/\\/g,"/"),d=(0,i.createHash)("sha256").update(c).digest("hex").slice(0,16),e=b.replace(/\//g,"-");return(0,j.join)((0,k.getShepHomeDir)(),"repos",d,"wt",e).replace(/\\/g,"/")}a.s(["computeWorktreePath",()=>l],29918);var m=a.i(81719);let n=h("[deployFeature]");async function o(a){if(n.info(`called — featureId="${a}"`),!a?.trim())return n.warn("rejected — featureId is empty"),{success:!1,error:"featureId is required"};try{let b=(0,c.resolve)("IFeatureRepository"),d=await b.findById(a);if(!d)return n.warn(`feature not found in repository: "${a}"`),{success:!1,error:`Feature not found: ${a}`};n.info(`feature found — repositoryPath="${d.repositoryPath}", branch="${d.branch}"`);let e=l(d.repositoryPath,d.branch);if(n.info(`computed worktreePath="${e}"`),!(0,f.existsSync)(e))return n.warn(`worktree path does not exist on disk: "${e}"`),{success:!1,error:`Worktree path does not exist: ${e}`};return n.info("worktree path exists, calling deploymentService.start()"),(0,c.resolve)("IDeploymentService").start(a,e),n.info("start() returned successfully — state=Booting"),{success:!0,state:m.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy feature";return n.error(`error: ${a}`,b),{success:!1,error:a}}}(0,d.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"40e22337c8b898ee3f68447631d1731707cc816ca6",null),a.s(["deployFeature",()=>o],33841);let p=h("[deployRepository]");async function q(a){if(p.info(`called — repositoryPath="${a}"`),!a||!(0,j.isAbsolute)(a))return p.warn("rejected — not an absolute path"),{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,f.existsSync)(a))return p.warn(`directory does not exist: "${a}"`),{success:!1,error:`Directory does not exist: ${a}`};return p.info("directory exists, calling deploymentService.start()"),(0,c.resolve)("IDeploymentService").start(a,a),p.info("start() returned successfully — state=Booting"),{success:!0,state:m.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy repository";return p.error(`error: ${a}`,b),{success:!1,error:a}}}async function r(a){if(!a?.trim())return{success:!1,error:"targetId is required"};try{let b=(0,c.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 s(a){return a?.trim()?(0,c.resolve)("IDeploymentService").getStatus(a):null}(0,d.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"40904050b2f331d52582beb87a47e544e0c3d901ca",null),a.s(["deployRepository",()=>q],46646),(0,d.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"404cb3bdb34d7eca3a52a18a3abb8ca8ca2d2de790",null),a.s(["stopDeployment",()=>r],68670),(0,d.ensureServerEntryExports)([s]),(0,b.registerServerReference)(s,"408d5f237afacc5309a68c61dc47942644fb2e0bcc",null),a.s(["getDeploymentStatus",()=>s],85321)},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])},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,"0086d2635308adbfc937a17aaf6a30d83155a27a6e",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,"606531d4461efcd1519b8920d5c29b45f3a0726d23",null),a.s(["updateAgentAndModel",()=>l],27900)}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__7a939e4e._.js.map