@shepai/cli 1.183.0-pr527.80e6e27 → 1.183.0-pr553.cd3d150

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 (465) hide show
  1. package/README.md +1 -0
  2. package/apis/json-schema/FeatureFlags.yaml +0 -5
  3. package/apis/json-schema/Settings.yaml +0 -3
  4. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +1 -15
  5. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +1 -3
  7. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +0 -38
  9. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +0 -9
  11. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +0 -11
  12. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
  13. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
  14. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +0 -2
  15. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
  16. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +0 -2
  17. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
  18. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +0 -2
  19. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  20. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +0 -1
  21. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  22. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +0 -2
  23. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
  24. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +0 -2
  25. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  26. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -6
  27. package/dist/packages/core/src/domain/generated/output.d.ts +0 -263
  28. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  29. package/dist/packages/core/src/domain/generated/output.js +0 -43
  30. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  31. package/dist/packages/core/src/infrastructure/di/container.js +0 -57
  32. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +0 -4
  33. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  34. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +0 -17
  35. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -15
  37. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +0 -2
  38. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  39. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +0 -12
  40. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +0 -10
  41. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  42. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +0 -34
  43. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  44. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +1 -3
  45. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  46. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +1 -7
  47. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +1 -3
  48. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  49. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +1 -32
  50. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  51. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +0 -25
  52. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +1 -4
  53. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  54. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +0 -10
  55. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +1 -10
  56. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
  57. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +1 -101
  58. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +0 -1
  59. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
  60. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +0 -61
  61. package/dist/src/presentation/cli/index.js +0 -2
  62. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  63. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +1 -5
  64. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +1 -3
  65. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
  66. package/dist/src/presentation/web/app/build-graph-nodes.js +0 -2
  67. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -3
  68. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  70. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +1 -2
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts +1 -3
  72. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  73. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +2 -3
  74. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.js +3 -3
  75. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  76. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +0 -3
  77. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  78. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +0 -3
  79. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  80. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +7 -26
  81. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  82. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +0 -1
  83. package/dist/translations/ar/cli.json +0 -21
  84. package/dist/translations/ar/web.json +1 -43
  85. package/dist/translations/de/cli.json +0 -21
  86. package/dist/translations/de/web.json +1 -43
  87. package/dist/translations/en/cli.json +0 -21
  88. package/dist/translations/en/web.json +1 -43
  89. package/dist/translations/es/cli.json +0 -21
  90. package/dist/translations/es/web.json +1 -43
  91. package/dist/translations/fr/cli.json +0 -21
  92. package/dist/translations/fr/web.json +1 -43
  93. package/dist/translations/he/cli.json +0 -21
  94. package/dist/translations/he/web.json +1 -43
  95. package/dist/translations/pt/cli.json +1 -22
  96. package/dist/translations/pt/web.json +1 -43
  97. package/dist/translations/ru/cli.json +0 -21
  98. package/dist/translations/ru/web.json +1 -43
  99. package/dist/translations/uk/cli.json +0 -21
  100. package/dist/translations/uk/web.json +1 -43
  101. package/dist/tsconfig.build.tsbuildinfo +1 -1
  102. package/package.json +1 -1
  103. package/web/.next/BUILD_ID +1 -1
  104. package/web/.next/build-manifest.json +2 -2
  105. package/web/.next/fallback-build-manifest.json +2 -2
  106. package/web/.next/prerender-manifest.json +3 -3
  107. package/web/.next/required-server-files.js +1 -1
  108. package/web/.next/required-server-files.json +1 -1
  109. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +32 -32
  110. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  111. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +30 -30
  113. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  114. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +33 -33
  116. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  117. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  118. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  119. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  120. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  121. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +41 -41
  122. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  125. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  126. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  127. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  128. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  129. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  130. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +30 -30
  131. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  132. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  133. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +33 -33
  134. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  135. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  136. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  137. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  138. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  139. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +41 -41
  140. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  141. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  142. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +30 -30
  143. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  144. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  146. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  147. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  148. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  149. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  150. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  151. package/web/.next/server/app/_global-error.html +2 -2
  152. package/web/.next/server/app/_global-error.rsc +1 -1
  153. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  154. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  155. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  156. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  157. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  158. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +7 -7
  159. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  160. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  162. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  163. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  164. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  165. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  166. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
  167. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +16 -16
  168. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  169. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/applications/page/server-reference-manifest.json +15 -15
  171. package/web/.next/server/app/applications/page.js.nft.json +1 -1
  172. package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/features/page/server-reference-manifest.json +7 -7
  174. package/web/.next/server/app/features/page.js.nft.json +1 -1
  175. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/settings/page/server-reference-manifest.json +20 -35
  177. package/web/.next/server/app/settings/page.js +1 -1
  178. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  179. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  180. package/web/.next/server/app/skills/page/server-reference-manifest.json +15 -15
  181. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  182. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  183. package/web/.next/server/app/tools/page/server-reference-manifest.json +13 -13
  184. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  185. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  186. package/web/.next/server/app/version/page/server-reference-manifest.json +7 -7
  187. package/web/.next/server/app/version/page.js.nft.json +1 -1
  188. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  189. package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
  190. package/web/.next/server/chunks/[root-of-the-server]__84fede21._.js +1 -1
  191. package/web/.next/server/chunks/[root-of-the-server]__84fede21._.js.map +1 -1
  192. package/web/.next/server/chunks/[root-of-the-server]__aabea727._.js +1 -1
  193. package/web/.next/server/chunks/[root-of-the-server]__aabea727._.js.map +1 -1
  194. package/web/.next/server/chunks/d9f3b_next_dist_esm_build_templates_app-route_fc401c5d.js +1 -1
  195. package/web/.next/server/chunks/d9f3b_next_dist_esm_build_templates_app-route_fc401c5d.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4f9eef62.js +1 -1
  197. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4f9eef62.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_ffa16a22.js +1 -1
  199. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_ffa16a22.js.map +1 -1
  200. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_a1a998f9.js +1 -1
  201. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_a1a998f9.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  203. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  205. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
  207. package/web/.next/server/chunks/ssr/[root-of-the-server]__288ffaa6._.js +1 -1
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__288ffaa6._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__4101a4a8._.js +1 -1
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__4101a4a8._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__538580df._.js +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__538580df._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5de261._.js +1 -1
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5de261._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__638955bc._.js +1 -1
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__a9255c9a._.js +3 -0
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__a9255c9a._.js.map +1 -0
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__ac9ab3c5._.js +4 -0
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__ac9ab3c5._.js.map +1 -0
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__b88acc3c._.js +1 -1
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__b88acc3c._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3d233f3._.js +1 -1
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3d233f3._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__c6dba2b8._.js +1 -1
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__c6dba2b8._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__eacd32e9._.js +1 -1
  227. package/web/.next/server/chunks/ssr/[root-of-the-server]__eacd32e9._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/[root-of-the-server]__ef0b8905._.js +2 -2
  229. package/web/.next/server/chunks/ssr/[root-of-the-server]__ef0b8905._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/[root-of-the-server]__f94e4165._.js +1 -1
  231. package/web/.next/server/chunks/ssr/[root-of-the-server]__f94e4165._.js.map +1 -1
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__ff5a5243._.js +1 -1
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__ff5a5243._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/{_bb029ee1._.js → _06fde7cf._.js} +2 -2
  235. package/web/.next/server/chunks/ssr/{_bb029ee1._.js.map → _06fde7cf._.js.map} +1 -1
  236. package/web/.next/server/chunks/ssr/_22d60ea8._.js +3 -0
  237. package/web/.next/server/chunks/ssr/_22d60ea8._.js.map +1 -0
  238. package/web/.next/server/chunks/ssr/_33a243dd._.js +1 -1
  239. package/web/.next/server/chunks/ssr/_33a243dd._.js.map +1 -1
  240. package/web/.next/server/chunks/ssr/{_88a1b163._.js → _4b57bcc3._.js} +2 -2
  241. package/web/.next/server/chunks/ssr/_4b57bcc3._.js.map +1 -0
  242. package/web/.next/server/chunks/ssr/_519d77a9._.js +1 -1
  243. package/web/.next/server/chunks/ssr/_519d77a9._.js.map +1 -1
  244. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  245. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  246. package/web/.next/server/chunks/ssr/_5b868d9b._.js +1 -1
  247. package/web/.next/server/chunks/ssr/_5b868d9b._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/_615e07af._.js +3 -0
  249. package/web/.next/server/chunks/ssr/_615e07af._.js.map +1 -0
  250. package/web/.next/server/chunks/ssr/{_700b8ec9._.js → _64d1b6ab._.js} +2 -2
  251. package/web/.next/server/chunks/ssr/{_700b8ec9._.js.map → _64d1b6ab._.js.map} +1 -1
  252. package/web/.next/server/chunks/ssr/_6b254164._.js +1 -1
  253. package/web/.next/server/chunks/ssr/_6b254164._.js.map +1 -1
  254. package/web/.next/server/chunks/ssr/_72cc0c05._.js +1 -1
  255. package/web/.next/server/chunks/ssr/_72cc0c05._.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/{_ac5961de._.js → _87fc28df._.js} +2 -2
  257. package/web/.next/server/chunks/ssr/_87fc28df._.js.map +1 -0
  258. package/web/.next/server/chunks/ssr/{_59563ac1._.js → _8b845c2a._.js} +2 -2
  259. package/web/.next/server/chunks/ssr/{_59563ac1._.js.map → _8b845c2a._.js.map} +1 -1
  260. package/web/.next/server/chunks/ssr/_8e101e0b._.js +2 -2
  261. package/web/.next/server/chunks/ssr/_8e101e0b._.js.map +1 -1
  262. package/web/.next/server/chunks/ssr/_dfbeab70._.js +3 -0
  263. package/web/.next/server/chunks/ssr/_dfbeab70._.js.map +1 -0
  264. package/web/.next/server/chunks/ssr/_e65abbd1._.js +1 -1
  265. package/web/.next/server/chunks/ssr/_e65abbd1._.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/_f86fc1bf._.js +1 -1
  267. package/web/.next/server/chunks/ssr/_f86fc1bf._.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/_fc778d22._.js +3 -0
  269. package/web/.next/server/chunks/ssr/_fc778d22._.js.map +1 -0
  270. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  271. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  273. package/web/.next/server/chunks/ssr/{node_modules__pnpm_9ac649c1._.js → node_modules__pnpm_28a53b5d._.js} +2 -2
  274. package/web/.next/server/chunks/ssr/{node_modules__pnpm_9ac649c1._.js.map → node_modules__pnpm_28a53b5d._.js.map} +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web_47181610._.js +1 -1
  276. package/web/.next/server/chunks/ssr/src_presentation_web_47181610._.js.map +1 -1
  277. package/web/.next/server/chunks/ssr/src_presentation_web_5d3f4199._.js +1 -1
  278. package/web/.next/server/chunks/ssr/src_presentation_web_5d3f4199._.js.map +1 -1
  279. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js +1 -1
  280. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js.map +1 -1
  281. package/web/.next/server/chunks/ssr/src_presentation_web_61d96ba8._.js +1 -1
  282. package/web/.next/server/chunks/ssr/src_presentation_web_61d96ba8._.js.map +1 -1
  283. package/web/.next/server/chunks/ssr/src_presentation_web_6994959a._.js +1 -1
  284. package/web/.next/server/chunks/ssr/src_presentation_web_6994959a._.js.map +1 -1
  285. package/web/.next/server/chunks/ssr/src_presentation_web_77dadf68._.js +3 -3
  286. package/web/.next/server/chunks/ssr/src_presentation_web_77dadf68._.js.map +1 -1
  287. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
  288. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
  289. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_c3f6f57e.js +1 -1
  290. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_c3f6f57e.js.map +1 -1
  291. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js +1 -1
  292. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_8514dfcd._.js +3 -3
  294. package/web/.next/server/chunks/ssr/src_presentation_web_b95ed206._.js +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web_b95ed206._.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/src_presentation_web_bade80bd._.js +1 -1
  297. package/web/.next/server/chunks/ssr/src_presentation_web_bade80bd._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_c543cf3e._.js +1 -1
  299. package/web/.next/server/chunks/ssr/src_presentation_web_c543cf3e._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/translations_1562ae1a._.js +1 -1
  309. package/web/.next/server/chunks/ssr/translations_1562ae1a._.js.map +1 -1
  310. package/web/.next/server/pages/500.html +2 -2
  311. package/web/.next/server/server-reference-manifest.js +1 -1
  312. package/web/.next/server/server-reference-manifest.json +64 -79
  313. package/web/.next/static/chunks/{61201f0a38dc6784.js → 04c38e109dd4d082.js} +2 -2
  314. package/web/.next/static/chunks/{ded36f5739e4a4e1.js → 0658b69414ca5ecc.js} +1 -1
  315. package/web/.next/static/chunks/{03f93b2842ca688b.js → 1a0d47b7acf662f8.js} +2 -2
  316. package/web/.next/static/chunks/2cbe80f8e84d59a8.js +1 -0
  317. package/web/.next/static/chunks/{fcf7327eb2731905.js → 302c86aa96dcbacc.js} +1 -1
  318. package/web/.next/static/chunks/31f0d4fdd800c3ec.js +1 -0
  319. package/web/.next/static/chunks/36d968c44c52dccd.js +1 -0
  320. package/web/.next/static/chunks/3a6eedce30387a65.js +1 -0
  321. package/web/.next/static/chunks/{69bb98258075326f.js → 4ac64eaceef16292.js} +1 -1
  322. package/web/.next/static/chunks/{6be5713bee484a88.js → 4d7751c92a531b4c.js} +1 -1
  323. package/web/.next/static/chunks/{776acfd9be35f7b8.js → 4f4945ed1c4b793f.js} +3 -3
  324. package/web/.next/static/chunks/{c31dd6ed2546ed02.js → 7aaf68f557255f3d.js} +1 -1
  325. package/web/.next/static/chunks/81345b1f79dad8ea.js +1 -0
  326. package/web/.next/static/chunks/81b02c44e71de1ec.css +1 -0
  327. package/web/.next/static/chunks/91548fae41232f24.js +1 -0
  328. package/web/.next/static/chunks/930ceb2e741b0343.js +1 -0
  329. package/web/.next/static/chunks/9619faa56afb8dee.js +1 -0
  330. package/web/.next/static/chunks/{c47be6406b8c0053.js → 966f57938829b729.js} +1 -1
  331. package/web/.next/static/chunks/{dd5877dbb207f4ba.js → 97a6e70bf3c1e782.js} +1 -1
  332. package/web/.next/static/chunks/{5cb969096639b8db.js → 9a6c59ac77000a57.js} +1 -1
  333. package/web/.next/static/chunks/9aea22f126886a4a.js +7 -0
  334. package/web/.next/static/chunks/{aa792ef5139df0ab.js → a19c77561ecb59d0.js} +1 -1
  335. package/web/.next/static/chunks/c0a3918240432e6f.js +1 -0
  336. package/web/.next/static/chunks/{14ccadfe528de126.js → c9dde6d26ec1357f.js} +1 -1
  337. package/web/.next/static/chunks/e9e5cb9172ef1908.js +5 -0
  338. package/web/.next/static/chunks/f89f13e73f1306e0.js +1 -0
  339. package/apis/json-schema/ActionDispositionEntry.yaml +0 -14
  340. package/apis/json-schema/DependencyFinding.yaml +0 -28
  341. package/apis/json-schema/DependencyRiskType.yaml +0 -11
  342. package/apis/json-schema/DependencyRules.yaml +0 -38
  343. package/apis/json-schema/EffectivePolicySnapshot.yaml +0 -24
  344. package/apis/json-schema/ReleaseIntegrityCheck.yaml +0 -22
  345. package/apis/json-schema/ReleaseIntegrityCheckType.yaml +0 -9
  346. package/apis/json-schema/ReleaseIntegrityResult.yaml +0 -16
  347. package/apis/json-schema/ReleaseRules.yaml +0 -21
  348. package/apis/json-schema/SecurityActionCategory.yaml +0 -10
  349. package/apis/json-schema/SecurityActionDisposition.yaml +0 -8
  350. package/apis/json-schema/SecurityConfig.yaml +0 -17
  351. package/apis/json-schema/SecurityEvent.yaml +0 -36
  352. package/apis/json-schema/SecurityMode.yaml +0 -8
  353. package/apis/json-schema/SecurityPolicy.yaml +0 -24
  354. package/apis/json-schema/SecuritySeverity.yaml +0 -9
  355. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts +0 -76
  356. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts.map +0 -1
  357. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.js +0 -11
  358. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts +0 -77
  359. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts.map +0 -1
  360. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.js +0 -13
  361. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts +0 -71
  362. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map +0 -1
  363. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.js +0 -215
  364. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts +0 -24
  365. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts.map +0 -1
  366. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js +0 -56
  367. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts +0 -36
  368. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts.map +0 -1
  369. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.js +0 -76
  370. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts +0 -14
  371. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts.map +0 -1
  372. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.js +0 -46
  373. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts +0 -15
  374. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts.map +0 -1
  375. package/dist/packages/core/src/domain/errors/security-violation.error.js +0 -20
  376. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts +0 -44
  377. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts.map +0 -1
  378. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.js +0 -55
  379. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts +0 -18
  380. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts.map +0 -1
  381. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.js +0 -31
  382. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts +0 -29
  383. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts.map +0 -1
  384. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.js +0 -53
  385. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts +0 -16
  386. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts.map +0 -1
  387. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.js +0 -22
  388. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts +0 -24
  389. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts.map +0 -1
  390. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.js +0 -96
  391. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts +0 -22
  392. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts.map +0 -1
  393. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.js +0 -30
  394. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts +0 -59
  395. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts.map +0 -1
  396. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.js +0 -89
  397. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts +0 -53
  398. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts.map +0 -1
  399. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.js +0 -241
  400. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts +0 -44
  401. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts.map +0 -1
  402. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.js +0 -194
  403. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts +0 -28
  404. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts.map +0 -1
  405. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.js +0 -50
  406. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts +0 -26
  407. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts.map +0 -1
  408. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.js +0 -147
  409. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts +0 -44
  410. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts.map +0 -1
  411. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.js +0 -174
  412. package/dist/src/presentation/cli/commands/security.command.d.ts +0 -16
  413. package/dist/src/presentation/cli/commands/security.command.d.ts.map +0 -1
  414. package/dist/src/presentation/cli/commands/security.command.js +0 -133
  415. package/dist/src/presentation/web/app/actions/security.d.ts +0 -28
  416. package/dist/src/presentation/web/app/actions/security.d.ts.map +0 -1
  417. package/dist/src/presentation/web/app/actions/security.js +0 -59
  418. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts +0 -6
  419. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts.map +0 -1
  420. package/dist/src/presentation/web/components/common/repository-node/security-panel.js +0 -29
  421. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts +0 -10
  422. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts.map +0 -1
  423. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.js +0 -53
  424. package/dist/src/presentation/web/components/common/security-badge.d.ts +0 -7
  425. package/dist/src/presentation/web/components/common/security-badge.d.ts.map +0 -1
  426. package/dist/src/presentation/web/components/common/security-badge.js +0 -30
  427. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts +0 -12
  428. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts.map +0 -1
  429. package/dist/src/presentation/web/components/common/security-badge.stories.js +0 -20
  430. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts +0 -6
  431. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts.map +0 -1
  432. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.js +0 -60
  433. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts +0 -14
  434. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts.map +0 -1
  435. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.js +0 -116
  436. package/web/.next/server/chunks/ssr/[root-of-the-server]__81a09b67._.js +0 -4
  437. package/web/.next/server/chunks/ssr/[root-of-the-server]__81a09b67._.js.map +0 -1
  438. package/web/.next/server/chunks/ssr/[root-of-the-server]__c21d1dbd._.js +0 -3
  439. package/web/.next/server/chunks/ssr/[root-of-the-server]__c21d1dbd._.js.map +0 -1
  440. package/web/.next/server/chunks/ssr/_4fe617d4._.js +0 -3
  441. package/web/.next/server/chunks/ssr/_4fe617d4._.js.map +0 -1
  442. package/web/.next/server/chunks/ssr/_6bb86205._.js +0 -3
  443. package/web/.next/server/chunks/ssr/_6bb86205._.js.map +0 -1
  444. package/web/.next/server/chunks/ssr/_88a1b163._.js.map +0 -1
  445. package/web/.next/server/chunks/ssr/_a54e0548._.js +0 -3
  446. package/web/.next/server/chunks/ssr/_a54e0548._.js.map +0 -1
  447. package/web/.next/server/chunks/ssr/_ac5961de._.js.map +0 -1
  448. package/web/.next/server/chunks/ssr/_f8c78107._.js +0 -3
  449. package/web/.next/server/chunks/ssr/_f8c78107._.js.map +0 -1
  450. package/web/.next/static/chunks/04dacffc25b1aeca.js +0 -1
  451. package/web/.next/static/chunks/12d22b6a19665808.js +0 -1
  452. package/web/.next/static/chunks/1d538b66f81665fc.js +0 -1
  453. package/web/.next/static/chunks/23fab49df408d779.js +0 -1
  454. package/web/.next/static/chunks/6264451e0550022f.js +0 -7
  455. package/web/.next/static/chunks/7260582ee8e58549.js +0 -1
  456. package/web/.next/static/chunks/769f6939e7a4698a.js +0 -1
  457. package/web/.next/static/chunks/7851e1a90ca04c06.js +0 -1
  458. package/web/.next/static/chunks/84c1ad7ae5fc042d.js +0 -1
  459. package/web/.next/static/chunks/8d1446e71ffa2ed7.js +0 -5
  460. package/web/.next/static/chunks/cd8143002baa074e.js +0 -1
  461. package/web/.next/static/chunks/f0c985090f51835b.css +0 -1
  462. package/web/.next/static/chunks/f4ff691fdf16fb25.js +0 -1
  463. /package/web/.next/static/{Ed9rVk6pcfyq98DN_pOrK → s9Tl6ka-fGtxB11GslSv7}/_buildManifest.js +0 -0
  464. /package/web/.next/static/{Ed9rVk6pcfyq98DN_pOrK → s9Tl6ka-fGtxB11GslSv7}/_clientMiddlewareManifest.json +0 -0
  465. /package/web/.next/static/{Ed9rVk6pcfyq98DN_pOrK → s9Tl6ka-fGtxB11GslSv7}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[49596,a=>{"use strict";var b=a.i(41176),c=a.i(44592),d=a.i(91109),e=a.i(17985),f=a.i(82014),g=a.i(88064),h=a.i(67837),i=a.i(85536),j=a.i(66691),k=a.i(57411),l=a.i(91498),m=a.i(71238);let n=(0,a.i(25700).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var o=a.i(84494),p=a.i(50490),q=a.i(5698),r=a.i(16605),s=a.i(93193),t=a.i(80535),u=a.i(52313),v=a.i(18948),w=a.i(45670),x=a.i(88016),y=a.i(61189),z=a.i(33419),A=a.i(18662),B=a.i(46847);function C({application:a,className:e}){let h=(0,d.useRouter)(),j=(0,t.useQueryClient)(),[k,l]=(0,c.useState)(!1),o=(0,z.useTurnStatus)(`app-${a.id}`),s=(0,A.useDeployAction)({targetId:a.id,targetType:"application",repositoryPath:a.repositoryPath}),C=s.url,E=(0,y.deriveAppLiveStatus)(a.status,o,!!C,a.effectiveStatus),F=1+(a.additionalPaths?.length??0),G=a.repositoryPath.split("/").pop()??a.repositoryPath;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{"data-testid":"application-card",onClick:()=>h.push(`/application/${a.id}`),className:(0,i.cn)("bg-card group relative cursor-pointer overflow-hidden rounded-xl border shadow-sm transition-[border-color,box-shadow] duration-200 hover:shadow-lg dark:bg-neutral-800/80",E.borderClass,e),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 pt-4 pb-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500 to-violet-500",children:(0,b.jsx)(f.LayoutGrid,{className:"h-4 w-4 text-white"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{"data-testid":"application-card-name",className:"truncate text-sm font-medium",children:a.name}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-[11px]",children:a.description})]}),(0,b.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:(0,i.cn)("relative flex h-2 w-2 items-center justify-center rounded-full",E.dotClass),children:E.pulse?(0,b.jsx)("span",{className:(0,i.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",E.dotClass)}):null}),(0,b.jsx)("span",{className:"text-muted-foreground text-[10px]",children:E.label})]})]}),(0,b.jsx)("div",{className:"px-4",children:(0,b.jsxs)("div",{className:"bg-muted group/preview relative overflow-hidden rounded-lg",style:{height:140},children:[C?(0,b.jsx)("iframe",{src:C,title:`${a.name} live preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0 bg-white",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}):(0,b.jsx)(D,{effectiveStatus:a.effectiveStatus}),s.status===B.DeploymentState.Ready&&C?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 bg-neutral-900/75 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100 dark:bg-neutral-950/80",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),s.stop()},disabled:s.stopLoading,className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-neutral-300 bg-white px-3 text-[11px] font-semibold text-neutral-900 shadow-md transition-colors hover:border-red-500 hover:bg-red-50 hover:text-red-600 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:hover:border-red-500 dark:hover:bg-red-950 dark:hover:text-red-400",children:[s.stopLoading?(0,b.jsx)(g.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(q.Square,{className:"h-3 w-3 fill-current"}),"Stop"]}),(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),C&&window.open(C,"_blank","noopener,noreferrer")},className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-neutral-300 bg-white px-3 text-[11px] font-semibold text-neutral-900 shadow-md transition-colors hover:bg-neutral-50 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:hover:bg-neutral-800",children:[(0,b.jsx)(m.ExternalLink,{className:"h-3 w-3"}),"Open"]})]}):null,s.status===B.DeploymentState.Booting||s.deployLoading?(0,b.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-neutral-100 dark:bg-neutral-900",children:[(0,b.jsx)(g.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,b.jsx)("span",{className:"text-foreground text-[11px] font-medium",children:"Starting…"})]}):null,!E.previewDisabled&&!C&&!s.deployLoading&&s.status!==B.DeploymentState.Booting&&!s.deployError&&(0,b.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 bg-neutral-900/75 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100 dark:bg-neutral-950/80",children:(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),s.deploy()},className:"inline-flex h-8 cursor-pointer items-center gap-2 rounded-md border border-violet-400 bg-gradient-to-br from-indigo-500 to-violet-600 px-4 text-[11px] font-semibold text-white shadow-md transition-[filter] hover:brightness-110",children:[(0,b.jsx)(p.Play,{className:"h-3 w-3 fill-current"}),"Start Preview"]})}),"interrupted"===a.effectiveStatus&&(0,b.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-amber-950/60 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100",children:(0,b.jsxs)("button",{type:"button",onClick:b=>{b.stopPropagation(),fetch(`/api/applications/${a.id}/resume`,{method:"POST"})},className:"inline-flex h-8 cursor-pointer items-center gap-2 rounded-md border border-amber-400 bg-gradient-to-br from-amber-500 to-orange-500 px-4 text-[11px] font-semibold text-white shadow-md transition-[filter] hover:brightness-110",children:[(0,b.jsx)(p.Play,{className:"h-3 w-3 fill-current"}),"Continue Build"]})}),(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),l(!0)},className:"absolute top-1.5 right-1.5 z-20 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md bg-white/80 text-neutral-500 opacity-0 shadow-sm backdrop-blur-sm transition-all group-hover:opacity-100 hover:!bg-red-500 hover:!text-white dark:bg-neutral-800/80 dark:text-neutral-400","aria-label":`Delete ${a.name}`,title:"Delete application",children:(0,b.jsx)(r.Trash2,{className:"h-3 w-3"})})]})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 pt-3 pb-4",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1.5 text-[11px]",children:[(0,b.jsx)(n,{className:"h-3 w-3"}),G,F>1&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["+",F-1]})]}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:new Date(a.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"})})]})]}),(0,b.jsx)(w.Dialog,{open:k,onOpenChange:l,children:(0,b.jsxs)(w.DialogContent,{className:"max-w-xs",children:[(0,b.jsxs)(w.DialogHeader,{children:[(0,b.jsx)(w.DialogTitle,{children:"Delete application?"}),(0,b.jsxs)(w.DialogDescription,{children:["This will permanently remove ",(0,b.jsx)("strong",{children:a.name}),"."]})]}),(0,b.jsxs)(w.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,b.jsx)(w.DialogClose,{asChild:!0,children:(0,b.jsx)(v.Button,{variant:"outline",children:"Cancel"})}),(0,b.jsx)(v.Button,{variant:"destructive",onClick:async()=>{l(!1);let b=await (0,x.deleteApplication)(a.id);b.error?u.toast.error("Failed to delete",{description:b.error}):(u.toast.success("Application deleted"),j.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function D({effectiveStatus:a}){return"failed"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2 bg-red-50 dark:bg-red-950/30",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/50",children:(0,b.jsx)(s.TriangleAlert,{className:"h-5 w-5 text-red-500"})}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-red-600 dark:text-red-400",children:"Build failed"}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:"Open app to retry"})]}):"interrupted"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2 bg-amber-50 dark:bg-amber-950/20",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/40",children:(0,b.jsx)(l.AlertTriangle,{className:"h-5 w-5 text-amber-500"})}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Build interrupted"}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:"Open app to continue"})]}):"building"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,b.jsx)(g.Loader2,{className:"h-6 w-6 animate-spin text-violet-500"}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-violet-600 dark:text-violet-400",children:"Building…"})]}):(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-indigo-500/10 to-violet-500/10",children:(0,b.jsx)(o.Globe,{className:"text-muted-foreground/30 h-5 w-5"})}),(0,b.jsxs)("div",{className:"absolute inset-0 opacity-30",children:[(0,b.jsxs)("div",{className:"flex h-5 items-center gap-1.5 px-2",style:{background:"var(--muted)"},children:[(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 ms-1.5 h-1.5 w-12 rounded"})]}),(0,b.jsxs)("div",{className:"flex h-[calc(100%-1.25rem)]",children:[(0,b.jsxs)("div",{className:"border-muted-foreground/5 flex w-[40px] flex-col gap-1.5 border-e p-1.5",children:[(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-3/4 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"})]}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 p-2.5",children:[(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-2 w-2/3 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-5/6 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-3/4 rounded"})]})]})]})]})}function E({className:a}){let l=(0,d.useRouter)(),[m,n]=(0,c.useState)(!1),{data:o=[],isLoading:p}=(0,e.useQuery)({queryKey:["applications"],queryFn:async()=>{let a=await fetch("/api/applications");if(!a.ok)throw Error("Failed to fetch applications");return a.json()},staleTime:3e4}),q=(0,c.useMemo)(()=>[...o].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime()),[o]);return(0,b.jsx)(j.DeploymentStatusProvider,{initialDeployments:[],children:(0,b.jsxs)("div",{"data-testid":"applications-page-client",className:(0,i.cn)("relative space-y-4",a),children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(f.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),p?null:(0,b.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[o.length," ",1===o.length?"app":"apps"]})]}),p?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(g.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===o.length?(0,b.jsxs)("div",{"data-testid":"applications-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(f.LayoutGrid,{className:"mb-2 h-6 w-6 opacity-20"}),(0,b.jsx)("p",{className:"text-xs",children:"No applications yet."}),(0,b.jsxs)("button",{type:"button",onClick:()=>n(!0),className:"mt-3 inline-flex items-center gap-1.5 rounded-md bg-indigo-500 px-3 py-1.5 text-[11px] font-semibold text-white shadow-sm transition-colors hover:bg-indigo-400",children:[(0,b.jsx)(h.Plus,{className:"h-3 w-3"}),"New application"]})]}):(0,b.jsx)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:q.map(a=>(0,b.jsx)(C,{application:a},a.id))}),(0,b.jsx)("button",{type:"button","data-testid":"applications-fab-new","aria-label":"New application",onClick:()=>n(!0),className:"fixed right-6 bottom-6 z-40 flex h-14 w-14 cursor-pointer items-center justify-center rounded-full bg-indigo-500 text-white shadow-lg transition-all duration-200 hover:scale-105 hover:bg-indigo-400 hover:shadow-xl active:scale-95",children:(0,b.jsx)(h.Plus,{className:"h-7 w-7 stroke-[2.5]"})}),m?(0,b.jsx)("div",{className:"fixed inset-0 z-50",children:(0,b.jsx)(k.ControlCenterEmptyState,{onApplicationCreated:a=>{l.push(`/application/${a}`)},onClose:()=>n(!1),className:"bg-background"})}):null]})})}a.s(["ApplicationsPageClient",()=>E],49596)}];
1
+ module.exports=[49596,a=>{"use strict";var b=a.i(41176),c=a.i(44592),d=a.i(91109),e=a.i(17985),f=a.i(82014),g=a.i(88064),h=a.i(67837),i=a.i(85536),j=a.i(66691),k=a.i(57411),l=a.i(91498),m=a.i(71238);let n=(0,a.i(25700).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var o=a.i(84494),p=a.i(50490),q=a.i(5698),r=a.i(16605),s=a.i(93193),t=a.i(80535),u=a.i(52313),v=a.i(18948),w=a.i(45670),x=a.i(33185),y=a.i(61189),z=a.i(33419),A=a.i(18662),B=a.i(46847);function C({application:a,className:e}){let h=(0,d.useRouter)(),j=(0,t.useQueryClient)(),[k,l]=(0,c.useState)(!1),o=(0,z.useTurnStatus)(`app-${a.id}`),s=(0,A.useDeployAction)({targetId:a.id,targetType:"application",repositoryPath:a.repositoryPath}),C=s.url,E=(0,y.deriveAppLiveStatus)(a.status,o,!!C,a.effectiveStatus),F=1+(a.additionalPaths?.length??0),G=a.repositoryPath.split("/").pop()??a.repositoryPath;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{"data-testid":"application-card",onClick:()=>h.push(`/application/${a.id}`),className:(0,i.cn)("bg-card group relative cursor-pointer overflow-hidden rounded-xl border shadow-sm transition-[border-color,box-shadow] duration-200 hover:shadow-lg dark:bg-neutral-800/80",E.borderClass,e),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 pt-4 pb-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500 to-violet-500",children:(0,b.jsx)(f.LayoutGrid,{className:"h-4 w-4 text-white"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{"data-testid":"application-card-name",className:"truncate text-sm font-medium",children:a.name}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-[11px]",children:a.description})]}),(0,b.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",children:[(0,b.jsx)("span",{className:(0,i.cn)("relative flex h-2 w-2 items-center justify-center rounded-full",E.dotClass),children:E.pulse?(0,b.jsx)("span",{className:(0,i.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",E.dotClass)}):null}),(0,b.jsx)("span",{className:"text-muted-foreground text-[10px]",children:E.label})]})]}),(0,b.jsx)("div",{className:"px-4",children:(0,b.jsxs)("div",{className:"bg-muted group/preview relative overflow-hidden rounded-lg",style:{height:140},children:[C?(0,b.jsx)("iframe",{src:C,title:`${a.name} live preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0 bg-white",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}):(0,b.jsx)(D,{effectiveStatus:a.effectiveStatus}),s.status===B.DeploymentState.Ready&&C?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 bg-neutral-900/75 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100 dark:bg-neutral-950/80",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),s.stop()},disabled:s.stopLoading,className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-neutral-300 bg-white px-3 text-[11px] font-semibold text-neutral-900 shadow-md transition-colors hover:border-red-500 hover:bg-red-50 hover:text-red-600 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:hover:border-red-500 dark:hover:bg-red-950 dark:hover:text-red-400",children:[s.stopLoading?(0,b.jsx)(g.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(q.Square,{className:"h-3 w-3 fill-current"}),"Stop"]}),(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),C&&window.open(C,"_blank","noopener,noreferrer")},className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-neutral-300 bg-white px-3 text-[11px] font-semibold text-neutral-900 shadow-md transition-colors hover:bg-neutral-50 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:hover:bg-neutral-800",children:[(0,b.jsx)(m.ExternalLink,{className:"h-3 w-3"}),"Open"]})]}):null,s.status===B.DeploymentState.Booting||s.deployLoading?(0,b.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-neutral-100 dark:bg-neutral-900",children:[(0,b.jsx)(g.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,b.jsx)("span",{className:"text-foreground text-[11px] font-medium",children:"Starting…"})]}):null,!E.previewDisabled&&!C&&!s.deployLoading&&s.status!==B.DeploymentState.Booting&&!s.deployError&&(0,b.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 bg-neutral-900/75 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100 dark:bg-neutral-950/80",children:(0,b.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),s.deploy()},className:"inline-flex h-8 cursor-pointer items-center gap-2 rounded-md border border-violet-400 bg-gradient-to-br from-indigo-500 to-violet-600 px-4 text-[11px] font-semibold text-white shadow-md transition-[filter] hover:brightness-110",children:[(0,b.jsx)(p.Play,{className:"h-3 w-3 fill-current"}),"Start Preview"]})}),"interrupted"===a.effectiveStatus&&(0,b.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-amber-950/60 opacity-0 transition-opacity duration-150 group-hover/preview:pointer-events-auto group-hover/preview:opacity-100",children:(0,b.jsxs)("button",{type:"button",onClick:b=>{b.stopPropagation(),fetch(`/api/applications/${a.id}/resume`,{method:"POST"})},className:"inline-flex h-8 cursor-pointer items-center gap-2 rounded-md border border-amber-400 bg-gradient-to-br from-amber-500 to-orange-500 px-4 text-[11px] font-semibold text-white shadow-md transition-[filter] hover:brightness-110",children:[(0,b.jsx)(p.Play,{className:"h-3 w-3 fill-current"}),"Continue Build"]})}),(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),l(!0)},className:"absolute top-1.5 right-1.5 z-20 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md bg-white/80 text-neutral-500 opacity-0 shadow-sm backdrop-blur-sm transition-all group-hover:opacity-100 hover:!bg-red-500 hover:!text-white dark:bg-neutral-800/80 dark:text-neutral-400","aria-label":`Delete ${a.name}`,title:"Delete application",children:(0,b.jsx)(r.Trash2,{className:"h-3 w-3"})})]})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 pt-3 pb-4",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1.5 text-[11px]",children:[(0,b.jsx)(n,{className:"h-3 w-3"}),G,F>1&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["+",F-1]})]}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:new Date(a.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"})})]})]}),(0,b.jsx)(w.Dialog,{open:k,onOpenChange:l,children:(0,b.jsxs)(w.DialogContent,{className:"max-w-xs",children:[(0,b.jsxs)(w.DialogHeader,{children:[(0,b.jsx)(w.DialogTitle,{children:"Delete application?"}),(0,b.jsxs)(w.DialogDescription,{children:["This will permanently remove ",(0,b.jsx)("strong",{children:a.name}),"."]})]}),(0,b.jsxs)(w.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,b.jsx)(w.DialogClose,{asChild:!0,children:(0,b.jsx)(v.Button,{variant:"outline",children:"Cancel"})}),(0,b.jsx)(v.Button,{variant:"destructive",onClick:async()=>{l(!1);let b=await (0,x.deleteApplication)(a.id);b.error?u.toast.error("Failed to delete",{description:b.error}):(u.toast.success("Application deleted"),j.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function D({effectiveStatus:a}){return"failed"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2 bg-red-50 dark:bg-red-950/30",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/50",children:(0,b.jsx)(s.TriangleAlert,{className:"h-5 w-5 text-red-500"})}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-red-600 dark:text-red-400",children:"Build failed"}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:"Open app to retry"})]}):"interrupted"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2 bg-amber-50 dark:bg-amber-950/20",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/40",children:(0,b.jsx)(l.AlertTriangle,{className:"h-5 w-5 text-amber-500"})}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Build interrupted"}),(0,b.jsx)("span",{className:"text-muted-foreground/60 text-[10px]",children:"Open app to continue"})]}):"building"===a?(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,b.jsx)(g.Loader2,{className:"h-6 w-6 animate-spin text-violet-500"}),(0,b.jsx)("span",{className:"text-[11px] font-medium text-violet-600 dark:text-violet-400",children:"Building…"})]}):(0,b.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-indigo-500/10 to-violet-500/10",children:(0,b.jsx)(o.Globe,{className:"text-muted-foreground/30 h-5 w-5"})}),(0,b.jsxs)("div",{className:"absolute inset-0 opacity-30",children:[(0,b.jsxs)("div",{className:"flex h-5 items-center gap-1.5 px-2",style:{background:"var(--muted)"},children:[(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 h-1.5 w-1.5 rounded-full"}),(0,b.jsx)("div",{className:"bg-muted-foreground/10 ms-1.5 h-1.5 w-12 rounded"})]}),(0,b.jsxs)("div",{className:"flex h-[calc(100%-1.25rem)]",children:[(0,b.jsxs)("div",{className:"border-muted-foreground/5 flex w-[40px] flex-col gap-1.5 border-e p-1.5",children:[(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-3/4 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"})]}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 p-2.5",children:[(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-2 w-2/3 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-full rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-5/6 rounded"}),(0,b.jsx)("div",{className:"bg-muted-foreground/8 h-1.5 w-3/4 rounded"})]})]})]})]})}function E({className:a}){let l=(0,d.useRouter)(),[m,n]=(0,c.useState)(!1),{data:o=[],isLoading:p}=(0,e.useQuery)({queryKey:["applications"],queryFn:async()=>{let a=await fetch("/api/applications");if(!a.ok)throw Error("Failed to fetch applications");return a.json()},staleTime:3e4}),q=(0,c.useMemo)(()=>[...o].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime()),[o]);return(0,b.jsx)(j.DeploymentStatusProvider,{initialDeployments:[],children:(0,b.jsxs)("div",{"data-testid":"applications-page-client",className:(0,i.cn)("relative space-y-4",a),children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(f.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),p?null:(0,b.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[o.length," ",1===o.length?"app":"apps"]})]}),p?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(g.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===o.length?(0,b.jsxs)("div",{"data-testid":"applications-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(f.LayoutGrid,{className:"mb-2 h-6 w-6 opacity-20"}),(0,b.jsx)("p",{className:"text-xs",children:"No applications yet."}),(0,b.jsxs)("button",{type:"button",onClick:()=>n(!0),className:"mt-3 inline-flex items-center gap-1.5 rounded-md bg-indigo-500 px-3 py-1.5 text-[11px] font-semibold text-white shadow-sm transition-colors hover:bg-indigo-400",children:[(0,b.jsx)(h.Plus,{className:"h-3 w-3"}),"New application"]})]}):(0,b.jsx)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:q.map(a=>(0,b.jsx)(C,{application:a},a.id))}),(0,b.jsx)("button",{type:"button","data-testid":"applications-fab-new","aria-label":"New application",onClick:()=>n(!0),className:"fixed right-6 bottom-6 z-40 flex h-14 w-14 cursor-pointer items-center justify-center rounded-full bg-indigo-500 text-white shadow-lg transition-all duration-200 hover:scale-105 hover:bg-indigo-400 hover:shadow-xl active:scale-95",children:(0,b.jsx)(h.Plus,{className:"h-7 w-7 stroke-[2.5]"})}),m?(0,b.jsx)("div",{className:"fixed inset-0 z-50",children:(0,b.jsx)(k.ControlCenterEmptyState,{onApplicationCreated:a=>{l.push(`/application/${a}`)},onClose:()=>n(!1),className:"bg-background"})}):null]})})}a.s(["ApplicationsPageClient",()=>E],49596)}];
2
2
 
3
3
  //# sourceMappingURL=744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[31747,a=>{"use strict";var b=a.i(81719),c=a.i(14703),d=a.i(79372),e=a.i(29918);function f(a,f,g){let h=(f?.status===b.AgentRunStatus.running||f?.status===b.AgentRunStatus.pending)&&f?.pid?(0,d.isProcessAlive)(f.pid):void 0;return{name:a.name,description:a.description??a.slug,featureId:a.id,lifecycle:(0,c.deriveLifecycle)(a,f),repositoryPath:a.repositoryPath,branch:a.branch,worktreePath:a.worktreePath??(0,e.computeWorktreePath)(a.repositoryPath,a.branch),specPath:a.specPath,state:(0,c.deriveNodeState)(a,f,void 0!==h?{isPidAlive:h}:void 0),progress:(0,c.deriveProgress)(a),summary:a.description,userQuery:a.userQuery,createdAt:a.createdAt instanceof Date?a.createdAt.getTime():a.createdAt,...a.fast&&{fastMode:!0},approvalGates:a.approvalGates,push:a.push,openPr:a.openPr,forkAndPr:a.forkAndPr,commitSpecs:a.commitSpecs,enableEvidence:a.enableEvidence??g?.enableEvidence??!1,commitEvidence:a.commitEvidence??g?.commitEvidence??!1,ciWatchEnabled:a.ciWatchEnabled??g?.ciWatchEnabled??!0,...g?.hideCiStatus!=null&&{hideCiStatus:g.hideCiStatus},...g?.repositoryName&&{repositoryName:g.repositoryName},...g?.baseBranch&&{baseBranch:g.baseBranch},...g?.oneLiner&&{oneLiner:g.oneLiner},...g?.remoteUrl&&{remoteUrl:g.remoteUrl},...f?.agentType&&{agentType:f.agentType},...f?.modelId&&{modelId:f.modelId},...f?.error&&{errorMessage:f.error},...null!=a.agentRunId&&{hasAgentRun:!0},...null!=a.plan&&{hasPlan:!0},...a.injectSkills&&{injectSkills:!0},...a.injectedSkills?.length&&{injectedSkills:a.injectedSkills},...a.pr&&{pr:{url:a.pr.url,number:a.pr.number,status:a.pr.status,ciStatus:a.pr.ciStatus,commitHash:a.pr.commitHash,mergeable:a.pr.mergeable}}}}a.s(["buildFeatureNodeData",()=>f])},61402,76052,13008,74607,6542,740,12104,70319,54433,59020,81866,a=>{"use strict";var b=a.i(20107),c=a.i(96380),d=a.i(1904);async function e(a,b){if(!a.trim())return{approved:!1,error:"Feature id is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{approved:!1,error:"Feature not found"};if(!e.agentRunId)return{approved:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("ApproveAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.approved)return{approved:!1,error:g.reason};return{approved:!0}}catch(a){return{approved:!1,error:a instanceof Error?a.message:"Failed to approve feature"}}}async function f(a,b,d){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let e=(0,c.resolve)("IFeatureRepository"),f=await e.findById(a);if(!f)return{rejected:!1,error:"Feature not found"};if(!f.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let g=(0,c.resolve)("RejectAgentRunUseCase"),h=await g.execute(f.agentRunId,b,d);if(!h.rejected)return{rejected:!1,error:h.reason};return{rejected:!0,iteration:h.iteration,iterationWarning:h.iterationWarning}}catch(a){return{rejected:!1,error:a instanceof Error?a.message:"Failed to reject feature"}}}async function g(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("GetFeatureArtifactUseCase"),d=await b.execute(a),e={question:"Goal",context:d.oneLiner,questions:d.openQuestions.map((a,b)=>({id:`q-${b}`,question:a.question,type:"select",options:(a.options??[]).map((a,c)=>({id:`q-${b}-opt-${c}`,label:a.option,rationale:a.description,...a.selected?{recommended:!0}:{}}))})),finalAction:{id:"approve-reqs",label:"Approve Requirements",description:"Finalize and lock the requirements for implementation"}},f={question:"Goal",context:d.oneLiner,questions:d.openQuestions.filter(a=>a.resolved).map(a=>{let b=a.options?.find(a=>a.selected);return{question:a.question,selectedOption:b?.option??a.answer??"N/A",rationale:a.selectionRationale??b?.description??"",wasRecommended:!1}})};return{questionnaire:e,productDecisions:f,artifact:d}}catch(a){return{error:a instanceof Error?a.message:"Failed to load feature artifact"}}}async function h(a){if(!a.trim())return{error:"Feature id is required"};try{var b;let d=(0,c.resolve)("GetResearchArtifactUseCase");return{techDecisions:{name:(b=await d.execute(a)).name,summary:b.summary,decisions:b.decisions,technologies:b.technologies}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load research artifact"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"60c5a51100c1d4ecae432a0ebc2e2f613dfff8010d",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"70bbc4dc3e1cda8695839821ddc0d58cba7776e8a9",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"4085cbe8b24f4976f1a405f946fab15b734984c852",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"40c6b64218ee98d1f66a04bddcb82dc27886264953",null),a.s(["getResearchArtifact",()=>h],74607);var i=a.i(66680),j=a.i(2157),k=a.i(50227),l=a.i(29918),m=a.i(32278),n=a.i(33244);async function o(a){if(!a.trim())return{error:"Feature id is required"};try{var b,d;let e,f,g=(0,c.resolve)("IFeatureRepository"),h=await g.findById(a);if(!h)return{error:"Feature not found"};let{workflow:o}=(0,n.getSettings)(),p=h.pr?{url:h.pr.url,number:h.pr.number,status:h.pr.status,commitHash:h.pr.commitHash,ciStatus:h.pr.ciStatus,mergeable:h.pr.mergeable}:void 0,q=h.worktreePath??(h.repositoryPath&&h.branch?(0,l.computeWorktreePath)(h.repositoryPath,h.branch):null),r=(0,c.resolve)("IGitPrService"),s=q??h.repositoryPath??null,t="main";if(s)try{t=await r.getDefaultBranch(s)}catch{}let u=h.branch?{source:h.branch,target:t}:void 0,v=h.repositoryPath?(b=h.repositoryPath,f=(0,i.createHash)("sha256").update(b).digest("hex").slice(0,16),(0,k.join)((0,m.getShepHomeDir)(),"repos",f,"evidence",a).replace(/\\/g,"/")):q?(0,k.join)((0,k.dirname)((0,k.dirname)(q)),"evidence",a).replace(/\\/g,"/"):null;if(v)try{let a=(0,k.join)(v,"manifest.json");if((0,j.existsSync)(a)){let b=(d=JSON.parse((0,j.readFileSync)(a,"utf-8")),d.map(a=>{if(a.relativePath.startsWith("/")){if((0,j.existsSync)(a.relativePath))return a;let b=(0,k.join)(v,(0,k.basename)(a.relativePath)).replace(/\\/g,"/");return(0,j.existsSync)(b)?{...a,relativePath:b}:a}let b=(0,k.join)(v,(0,k.basename)(a.relativePath)).replace(/\\/g,"/");return{...a,relativePath:b}})),c=new Set;e=b.filter(a=>{let b=`${a.type}:${a.relativePath}`;return!c.has(b)&&(c.add(b),!0)})}}catch{}if(!q)return{pr:p,branch:u,evidence:e,warning:p?void 0:"No PR or diff data available",hideCiStatus:o.hideCiStatus};try{let[a,b]=await Promise.all([r.getPrDiffSummary(q,t),r.getFileDiffs(q,t).catch(()=>void 0)]);return{pr:p,branch:u,diffSummary:a,fileDiffs:b,evidence:e,hideCiStatus:o.hideCiStatus}}catch{return{pr:p,branch:u,evidence:e,warning:"Diff statistics unavailable",hideCiStatus:o.hideCiStatus}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}async function p(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("IPhaseTimingRepository"),d=(await b.findByFeatureId(a)).map(a=>({agentRunId:a.agentRunId,phase:a.phase,startedAt:a.startedAt,completedAt:a.completedAt,durationMs:null!=a.durationMs?Number(a.durationMs):void 0,waitingApprovalAt:a.waitingApprovalAt,approvalWaitMs:null!=a.approvalWaitMs?Number(a.approvalWaitMs):void 0,inputTokens:null!=a.inputTokens?Number(a.inputTokens):void 0,outputTokens:null!=a.outputTokens?Number(a.outputTokens):void 0,cacheCreationInputTokens:null!=a.cacheCreationInputTokens?Number(a.cacheCreationInputTokens):void 0,cacheReadInputTokens:null!=a.cacheReadInputTokens?Number(a.cacheReadInputTokens):void 0,costUsd:null!=a.costUsd?Number(a.costUsd):void 0,numTurns:a.numTurns??void 0,durationApiMs:null!=a.durationApiMs?Number(a.durationApiMs):void 0,exitCode:a.exitCode??void 0,errorMessage:a.errorMessage??void 0,prompt:a.prompt??void 0})),e=await q(a);return{timings:d,rejectionFeedback:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to load phase timings"}}}async function q(b){try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(b);if(!e?.specPath)return[];let{readFileSync:f}=await a.A(6714),{join:g}=await a.A(11105),h=(await a.A(29718)).default,i=f(g(e.specPath,"spec.yaml"),"utf-8"),j=h.load(i);if(!Array.isArray(j?.rejectionFeedback))return[];return j.rejectionFeedback.map(a=>({iteration:Number(a.iteration??1),message:String(a.message??""),phase:a.phase?String(a.phase):void 0,timestamp:a.timestamp?String(a.timestamp):void 0,attachments:Array.isArray(a.attachments)?a.attachments.map(String):void 0}))}catch{return[]}}async function r(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("IFeatureRepository"),d=await b.findById(a);if(!d)return{error:"Feature not found"};if(!d.plan)return{plan:void 0};return{plan:{state:d.plan.state,overview:d.plan.overview,tasks:d.plan.tasks.map(a=>({title:a.title??"",description:a.description??"",state:a.state,actionItems:(a.actionItems??[]).map(a=>({name:a.name,description:a.description,acceptanceCriteria:(a.acceptanceCriteria??[]).map(a=>({description:a.description,verified:a.verified}))}))}))}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load feature plan"}}}async function s(a){if(!a?.trim())return{success:!1,error:"Feature id is required"};try{let b=(0,c.resolve)("RebaseFeatureOnMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to rebase feature"}}}(0,d.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"408e8fa609df617da0e01e0e70dbeaf216d36b5608",null),a.s(["getMergeReviewData",()=>o],6542),(0,d.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"402fa422488591f1e8f79c02a92edd519f172c535a",null),a.s(["getFeaturePhaseTimings",()=>p],740),(0,d.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"40503def57e7aaa996be2118fdcfb2c42c7fd50bce",null),a.s(["getFeaturePlan",()=>r],12104),(0,d.ensureServerEntryExports)([s]),(0,b.registerServerReference)(s,"40b4dfa646e7fff61c261f239092b289411a3ae307",null),a.s(["rebaseFeature",()=>s],70319);var t=a.i(31747);async function u(a){try{let b=(0,c.resolve)("IFeatureRepository"),d=(0,c.resolve)("IAgentRunRepository"),e=(0,c.resolve)("IRepositoryRepository"),f=(0,c.resolve)("IGitPrService"),g=(0,c.resolve)("GetFeatureArtifactUseCase"),h=await b.findById(a);if(!h)return null;let i=h.agentRunId?await d.findById(h.agentRunId):null,[j,k,l,m]=await Promise.all([e.findByPath(h.repositoryPath).catch(()=>null),f.getDefaultBranch(h.repositoryPath).catch(()=>"main"),g.execute(a).catch(()=>null),f.getRemoteUrl(h.repositoryPath).catch(()=>null)]),{workflow:o}=(0,n.getSettings)();return(0,t.buildFeatureNodeData)(h,i,{repositoryName:j?.name,baseBranch:k,oneLiner:l?.oneLiner,remoteUrl:m??void 0,enableEvidence:o.enableEvidence,commitEvidence:o.commitEvidence,hideCiStatus:o.hideCiStatus})}catch{return null}}async function v(a){if(!a?.trim())return{success:!1,error:"Feature id is required"};try{let b=(0,c.resolve)("GetBranchSyncStatusUseCase"),d=await b.execute(a);return{success:!0,data:{...d,checkedAt:new Date().toISOString()}}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to get branch sync status"}}}async function w(a,b,d){let e=a.trim();if(!e)return{ok:!1,error:"Feature id is required"};let f=b.trim();if(!f)return{ok:!1,error:"Agent type is required"};let g=d.trim();if(!g)return{ok:!1,error:"Model id is required"};try{let a=(0,c.resolve)("UpdateFeaturePinnedConfigUseCase");return await a.execute({featureId:e,agentType:f,modelId:g}),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update feature pinned config"}}}(0,d.ensureServerEntryExports)([u]),(0,b.registerServerReference)(u,"4050f8bb21bec95707ebdbe7a31c74d7de48347de2",null),a.s(["getFeatureDrawerData",()=>u],54433),(0,d.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"4084283fb44a4ef73af14d48cef205ecc9fdae2d3c",null),a.s(["getBranchSyncStatus",()=>v],59020),(0,d.ensureServerEntryExports)([w]),(0,b.registerServerReference)(w,"7041c1e3880b46972ddbc00033c721842b07a70321",null),a.s(["updateFeaturePinnedConfig",()=>w],81866)},43629,a=>{"use strict";var b=a.i(23504),c=a.i(8115),d=a.i(27900),e=a.i(12513),f=a.i(73101),g=a.i(54775),h=a.i(65324),i=a.i(33841),j=a.i(2804),k=a.i(68378),l=a.i(68670),m=a.i(85321),n=a.i(84095),o=a.i(56799),p=a.i(80496),q=a.i(93225),r=a.i(94691),s=a.i(77710),t=a.i(45395),u=a.i(76707),v=a.i(10528),w=a.i(50845),x=a.i(26604),y=a.i(54723),z=a.i(18942),A=a.i(42886),B=a.i(49560),C=a.i(39353),D=a.i(95072),E=a.i(29207),F=a.i(61402),G=a.i(76052),H=a.i(13008),I=a.i(74607),J=a.i(6542),K=a.i(740),L=a.i(12104),M=a.i(70319),N=a.i(54433),O=a.i(59020),P=a.i(81866);a.s([],66807),a.i(66807),a.s(["004db1988c534ce1b59d5cf3ab2e2cdeb8d81a76f6",()=>e.pickFolder,"005c8f7974a1e1332ccaf1a75ffc775c759bbe6ef6",()=>b.getAllAgentModels,"00db54cb07e16d3bce02b0ae6b0bf7f4a87d3a0d36",()=>c.checkAllAgentsStatus,"00e9dfbd6e5b8c8316129cccf71f306dc290962023",()=>g.listGitHubOrganizations,"4000bf86bcc6233c0b1d43d51cda477c690405e763",()=>t.createApplication,"401022574c76c0994b8b00220e52c8e005a45cc328",()=>E.getFeatureMetadata,"40105916247dba4c6254c696d18cba8a0fd0967fcb",()=>o.openShell,"40295c713502865b83a3df509b609d3dc04625ee0b",()=>u.createProjectFolder,"402e2cf49a7bac874cea92f3c2549e65b5b57a2f8b",()=>l.stopDeployment,"402fa422488591f1e8f79c02a92edd519f172c535a",()=>K.getFeaturePhaseTimings,"4046ecfb670d85e0a2518210bae133faf9620ddeee",()=>s.createProjectAndFeature,"4047ed329e8b7484ff71fc0a65dc0b5450f3a9a49d",()=>x.resumeFeature,"404906a4301ca24858fb818b20ff67306a5dc37445",()=>m.getDeploymentStatus,"40503def57e7aaa996be2118fdcfb2c42c7fd50bce",()=>L.getFeaturePlan,"4050c0c09492a5c177e1805e876a69ae09f56366be",()=>q.syncRepository,"4050f8bb21bec95707ebdbe7a31c74d7de48347de2",()=>N.getFeatureDrawerData,"40517bd2ea0c40e78818124ff2130655a9f052592a",()=>h.importGitHubRepository,"40530cba5dc0fea42596912eac9888cf825eacf545",()=>v.archiveFeature,"405e941bd11cdaf10efa56eaa45557bbf7f5bc8405",()=>j.deployRepository,"40670786209cd74800dd09126ec2931266cb8e6488",()=>y.startFeature,"407ebeab3f45e94b90a48d5da7e1b396c6e3783461",()=>A.unarchiveFeature,"4084283fb44a4ef73af14d48cef205ecc9fdae2d3c",()=>O.getBranchSyncStatus,"4085cbe8b24f4976f1a405f946fab15b734984c852",()=>H.getFeatureArtifact,"408cf4dae7f80a94ca468c87ca40846ac825a3c162",()=>D.deleteApplication,"408e8fa609df617da0e01e0e70dbeaf216d36b5608",()=>J.getMergeReviewData,"40b4dfa646e7fff61c261f239092b289411a3ae307",()=>M.rebaseFeature,"40c6b64218ee98d1f66a04bddcb82dc27886264953",()=>I.getResearchArtifact,"40cce6c3966bb641b11a49e34aad01eb6fc1132c5c",()=>r.getDeploymentLogs,"40d9cca1fc562c971f8f07d4f32af201d8972c047a",()=>p.openFolder,"40e67621a4b03951ac4595cf608b8d72e4c3c9c694",()=>f.listGitHubRepositories,"40ebb5bb4518bae0c7b6dea84057c6bfc019a2905e",()=>z.stopFeature,"40f47c690b5d3b19d30552df4bf6a9bf5cf18e6b7a",()=>B.addRepository,"40f5248cb2ab52f92e90950166adab8424e8aceeae",()=>i.deployFeature,"40f6826ea04e2ae01fb9a2d53c26102cc0881bc8a9",()=>n.openIde,"40ff297753e74d45aeecb03f3360e9138b9bf4a81a",()=>k.deployApplication,"602d47346bf416279937e58a8da1bd2f5190a7bc16",()=>d.updateAgentAndModel,"60c5a51100c1d4ecae432a0ebc2e2f613dfff8010d",()=>F.approveFeature,"60faa10aef80dc204c93e0bfce95078c5d479ec953",()=>C.deleteRepository,"7041c1e3880b46972ddbc00033c721842b07a70321",()=>P.updateFeaturePinnedConfig,"70bbc4dc3e1cda8695839821ddc0d58cba7776e8a9",()=>G.rejectFeature,"786266fdf327c764b31a8647241fad7bc4b3a913f3",()=>w.deleteFeature],43629)},6714,a=>{a.v(a=>Promise.resolve().then(()=>a(2157)))},11105,a=>{a.v(a=>Promise.resolve().then(()=>a(50227)))},29718,a=>{a.v(b=>Promise.all(["server/chunks/ssr/90b01_js-yaml_dist_js-yaml_mjs_c897fb57._.js"].map(b=>a.l(b))).then(()=>b(32996)))}];
1
+ module.exports=[31747,a=>{"use strict";var b=a.i(81719),c=a.i(14703),d=a.i(79372),e=a.i(29918);function f(a,f,g){let h=(f?.status===b.AgentRunStatus.running||f?.status===b.AgentRunStatus.pending)&&f?.pid?(0,d.isProcessAlive)(f.pid):void 0;return{name:a.name,description:a.description??a.slug,featureId:a.id,lifecycle:(0,c.deriveLifecycle)(a,f),repositoryPath:a.repositoryPath,branch:a.branch,worktreePath:a.worktreePath??(0,e.computeWorktreePath)(a.repositoryPath,a.branch),specPath:a.specPath,state:(0,c.deriveNodeState)(a,f,void 0!==h?{isPidAlive:h}:void 0),progress:(0,c.deriveProgress)(a),summary:a.description,userQuery:a.userQuery,createdAt:a.createdAt instanceof Date?a.createdAt.getTime():a.createdAt,...a.fast&&{fastMode:!0},approvalGates:a.approvalGates,push:a.push,openPr:a.openPr,forkAndPr:a.forkAndPr,commitSpecs:a.commitSpecs,enableEvidence:a.enableEvidence??g?.enableEvidence??!1,commitEvidence:a.commitEvidence??g?.commitEvidence??!1,ciWatchEnabled:a.ciWatchEnabled??g?.ciWatchEnabled??!0,...g?.hideCiStatus!=null&&{hideCiStatus:g.hideCiStatus},...g?.repositoryName&&{repositoryName:g.repositoryName},...g?.baseBranch&&{baseBranch:g.baseBranch},...g?.oneLiner&&{oneLiner:g.oneLiner},...g?.remoteUrl&&{remoteUrl:g.remoteUrl},...f?.agentType&&{agentType:f.agentType},...f?.modelId&&{modelId:f.modelId},...f?.error&&{errorMessage:f.error},...null!=a.agentRunId&&{hasAgentRun:!0},...null!=a.plan&&{hasPlan:!0},...a.injectSkills&&{injectSkills:!0},...a.injectedSkills?.length&&{injectedSkills:a.injectedSkills},...a.pr&&{pr:{url:a.pr.url,number:a.pr.number,status:a.pr.status,ciStatus:a.pr.ciStatus,commitHash:a.pr.commitHash,mergeable:a.pr.mergeable}}}}a.s(["buildFeatureNodeData",()=>f])},61402,76052,13008,74607,6542,740,12104,70319,54433,59020,81866,a=>{"use strict";var b=a.i(20107),c=a.i(96380),d=a.i(1904);async function e(a,b){if(!a.trim())return{approved:!1,error:"Feature id is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{approved:!1,error:"Feature not found"};if(!e.agentRunId)return{approved:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("ApproveAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.approved)return{approved:!1,error:g.reason};return{approved:!0}}catch(a){return{approved:!1,error:a instanceof Error?a.message:"Failed to approve feature"}}}async function f(a,b,d){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let e=(0,c.resolve)("IFeatureRepository"),f=await e.findById(a);if(!f)return{rejected:!1,error:"Feature not found"};if(!f.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let g=(0,c.resolve)("RejectAgentRunUseCase"),h=await g.execute(f.agentRunId,b,d);if(!h.rejected)return{rejected:!1,error:h.reason};return{rejected:!0,iteration:h.iteration,iterationWarning:h.iterationWarning}}catch(a){return{rejected:!1,error:a instanceof Error?a.message:"Failed to reject feature"}}}async function g(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("GetFeatureArtifactUseCase"),d=await b.execute(a),e={question:"Goal",context:d.oneLiner,questions:d.openQuestions.map((a,b)=>({id:`q-${b}`,question:a.question,type:"select",options:(a.options??[]).map((a,c)=>({id:`q-${b}-opt-${c}`,label:a.option,rationale:a.description,...a.selected?{recommended:!0}:{}}))})),finalAction:{id:"approve-reqs",label:"Approve Requirements",description:"Finalize and lock the requirements for implementation"}},f={question:"Goal",context:d.oneLiner,questions:d.openQuestions.filter(a=>a.resolved).map(a=>{let b=a.options?.find(a=>a.selected);return{question:a.question,selectedOption:b?.option??a.answer??"N/A",rationale:a.selectionRationale??b?.description??"",wasRecommended:!1}})};return{questionnaire:e,productDecisions:f,artifact:d}}catch(a){return{error:a instanceof Error?a.message:"Failed to load feature artifact"}}}async function h(a){if(!a.trim())return{error:"Feature id is required"};try{var b;let d=(0,c.resolve)("GetResearchArtifactUseCase");return{techDecisions:{name:(b=await d.execute(a)).name,summary:b.summary,decisions:b.decisions,technologies:b.technologies}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load research artifact"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"601f5c873689908c319a68d4237d262d7d6623b62c",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"70f699870b6ae858da2423cfece98ce44ae398797f",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"407c17929ff5859a0f74052b31b167afcd51923877",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"4039d2a9c787f999f6ca5a009cc6d3677f4fecf8ca",null),a.s(["getResearchArtifact",()=>h],74607);var i=a.i(66680),j=a.i(2157),k=a.i(50227),l=a.i(29918),m=a.i(32278),n=a.i(33244);async function o(a){if(!a.trim())return{error:"Feature id is required"};try{var b,d;let e,f,g=(0,c.resolve)("IFeatureRepository"),h=await g.findById(a);if(!h)return{error:"Feature not found"};let{workflow:o}=(0,n.getSettings)(),p=h.pr?{url:h.pr.url,number:h.pr.number,status:h.pr.status,commitHash:h.pr.commitHash,ciStatus:h.pr.ciStatus,mergeable:h.pr.mergeable}:void 0,q=h.worktreePath??(h.repositoryPath&&h.branch?(0,l.computeWorktreePath)(h.repositoryPath,h.branch):null),r=(0,c.resolve)("IGitPrService"),s=q??h.repositoryPath??null,t="main";if(s)try{t=await r.getDefaultBranch(s)}catch{}let u=h.branch?{source:h.branch,target:t}:void 0,v=h.repositoryPath?(b=h.repositoryPath,f=(0,i.createHash)("sha256").update(b).digest("hex").slice(0,16),(0,k.join)((0,m.getShepHomeDir)(),"repos",f,"evidence",a).replace(/\\/g,"/")):q?(0,k.join)((0,k.dirname)((0,k.dirname)(q)),"evidence",a).replace(/\\/g,"/"):null;if(v)try{let a=(0,k.join)(v,"manifest.json");if((0,j.existsSync)(a)){let b=(d=JSON.parse((0,j.readFileSync)(a,"utf-8")),d.map(a=>{if(a.relativePath.startsWith("/")){if((0,j.existsSync)(a.relativePath))return a;let b=(0,k.join)(v,(0,k.basename)(a.relativePath)).replace(/\\/g,"/");return(0,j.existsSync)(b)?{...a,relativePath:b}:a}let b=(0,k.join)(v,(0,k.basename)(a.relativePath)).replace(/\\/g,"/");return{...a,relativePath:b}})),c=new Set;e=b.filter(a=>{let b=`${a.type}:${a.relativePath}`;return!c.has(b)&&(c.add(b),!0)})}}catch{}if(!q)return{pr:p,branch:u,evidence:e,warning:p?void 0:"No PR or diff data available",hideCiStatus:o.hideCiStatus};try{let[a,b]=await Promise.all([r.getPrDiffSummary(q,t),r.getFileDiffs(q,t).catch(()=>void 0)]);return{pr:p,branch:u,diffSummary:a,fileDiffs:b,evidence:e,hideCiStatus:o.hideCiStatus}}catch{return{pr:p,branch:u,evidence:e,warning:"Diff statistics unavailable",hideCiStatus:o.hideCiStatus}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}async function p(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("IPhaseTimingRepository"),d=(await b.findByFeatureId(a)).map(a=>({agentRunId:a.agentRunId,phase:a.phase,startedAt:a.startedAt,completedAt:a.completedAt,durationMs:null!=a.durationMs?Number(a.durationMs):void 0,waitingApprovalAt:a.waitingApprovalAt,approvalWaitMs:null!=a.approvalWaitMs?Number(a.approvalWaitMs):void 0,inputTokens:null!=a.inputTokens?Number(a.inputTokens):void 0,outputTokens:null!=a.outputTokens?Number(a.outputTokens):void 0,cacheCreationInputTokens:null!=a.cacheCreationInputTokens?Number(a.cacheCreationInputTokens):void 0,cacheReadInputTokens:null!=a.cacheReadInputTokens?Number(a.cacheReadInputTokens):void 0,costUsd:null!=a.costUsd?Number(a.costUsd):void 0,numTurns:a.numTurns??void 0,durationApiMs:null!=a.durationApiMs?Number(a.durationApiMs):void 0,exitCode:a.exitCode??void 0,errorMessage:a.errorMessage??void 0,prompt:a.prompt??void 0})),e=await q(a);return{timings:d,rejectionFeedback:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to load phase timings"}}}async function q(b){try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(b);if(!e?.specPath)return[];let{readFileSync:f}=await a.A(6714),{join:g}=await a.A(11105),h=(await a.A(29718)).default,i=f(g(e.specPath,"spec.yaml"),"utf-8"),j=h.load(i);if(!Array.isArray(j?.rejectionFeedback))return[];return j.rejectionFeedback.map(a=>({iteration:Number(a.iteration??1),message:String(a.message??""),phase:a.phase?String(a.phase):void 0,timestamp:a.timestamp?String(a.timestamp):void 0,attachments:Array.isArray(a.attachments)?a.attachments.map(String):void 0}))}catch{return[]}}async function r(a){if(!a.trim())return{error:"Feature id is required"};try{let b=(0,c.resolve)("IFeatureRepository"),d=await b.findById(a);if(!d)return{error:"Feature not found"};if(!d.plan)return{plan:void 0};return{plan:{state:d.plan.state,overview:d.plan.overview,tasks:d.plan.tasks.map(a=>({title:a.title??"",description:a.description??"",state:a.state,actionItems:(a.actionItems??[]).map(a=>({name:a.name,description:a.description,acceptanceCriteria:(a.acceptanceCriteria??[]).map(a=>({description:a.description,verified:a.verified}))}))}))}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load feature plan"}}}async function s(a){if(!a?.trim())return{success:!1,error:"Feature id is required"};try{let b=(0,c.resolve)("RebaseFeatureOnMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to rebase feature"}}}(0,d.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"40a43c73a7cd509f1a4b24b523030fb41fc24907eb",null),a.s(["getMergeReviewData",()=>o],6542),(0,d.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40dfe41586079ffe4e7d97ea4bff4bdf2441a37bf0",null),a.s(["getFeaturePhaseTimings",()=>p],740),(0,d.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"409d3055c8d244277619a15822e751d0a3e02e13fb",null),a.s(["getFeaturePlan",()=>r],12104),(0,d.ensureServerEntryExports)([s]),(0,b.registerServerReference)(s,"4093ba96696844586f1722f8b454d4af89b6b6b75c",null),a.s(["rebaseFeature",()=>s],70319);var t=a.i(31747);async function u(a){try{let b=(0,c.resolve)("IFeatureRepository"),d=(0,c.resolve)("IAgentRunRepository"),e=(0,c.resolve)("IRepositoryRepository"),f=(0,c.resolve)("IGitPrService"),g=(0,c.resolve)("GetFeatureArtifactUseCase"),h=await b.findById(a);if(!h)return null;let i=h.agentRunId?await d.findById(h.agentRunId):null,[j,k,l,m]=await Promise.all([e.findByPath(h.repositoryPath).catch(()=>null),f.getDefaultBranch(h.repositoryPath).catch(()=>"main"),g.execute(a).catch(()=>null),f.getRemoteUrl(h.repositoryPath).catch(()=>null)]),{workflow:o}=(0,n.getSettings)();return(0,t.buildFeatureNodeData)(h,i,{repositoryName:j?.name,baseBranch:k,oneLiner:l?.oneLiner,remoteUrl:m??void 0,enableEvidence:o.enableEvidence,commitEvidence:o.commitEvidence,hideCiStatus:o.hideCiStatus})}catch{return null}}async function v(a){if(!a?.trim())return{success:!1,error:"Feature id is required"};try{let b=(0,c.resolve)("GetBranchSyncStatusUseCase"),d=await b.execute(a);return{success:!0,data:{...d,checkedAt:new Date().toISOString()}}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to get branch sync status"}}}async function w(a,b,d){let e=a.trim();if(!e)return{ok:!1,error:"Feature id is required"};let f=b.trim();if(!f)return{ok:!1,error:"Agent type is required"};let g=d.trim();if(!g)return{ok:!1,error:"Model id is required"};try{let a=(0,c.resolve)("UpdateFeaturePinnedConfigUseCase");return await a.execute({featureId:e,agentType:f,modelId:g}),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update feature pinned config"}}}(0,d.ensureServerEntryExports)([u]),(0,b.registerServerReference)(u,"40dc9a782ddf43b51707a08aa06cb0848838ede832",null),a.s(["getFeatureDrawerData",()=>u],54433),(0,d.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"405c612fff63268c16f659cc62f04eae3d067d2767",null),a.s(["getBranchSyncStatus",()=>v],59020),(0,d.ensureServerEntryExports)([w]),(0,b.registerServerReference)(w,"70fa5c6575dfb84e1993764a877b8c0777c62a83b6",null),a.s(["updateFeaturePinnedConfig",()=>w],81866)},43629,a=>{"use strict";var b=a.i(23504),c=a.i(8115),d=a.i(27900),e=a.i(12513),f=a.i(73101),g=a.i(54775),h=a.i(65324),i=a.i(33841),j=a.i(2804),k=a.i(68378),l=a.i(68670),m=a.i(85321),n=a.i(84095),o=a.i(56799),p=a.i(80496),q=a.i(93225),r=a.i(94691),s=a.i(77710),t=a.i(45395),u=a.i(76707),v=a.i(10528),w=a.i(50845),x=a.i(26604),y=a.i(54723),z=a.i(18942),A=a.i(42886),B=a.i(49560),C=a.i(39353),D=a.i(95072),E=a.i(29207),F=a.i(61402),G=a.i(76052),H=a.i(13008),I=a.i(74607),J=a.i(6542),K=a.i(740),L=a.i(12104),M=a.i(70319),N=a.i(54433),O=a.i(59020),P=a.i(81866);a.s([],66807),a.i(66807),a.s(["000210f631a169a481783b753fc8f8011e3739dafa",()=>b.getAllAgentModels,"004d43de802f3eded3f61d423d4f0aeb5e4942c679",()=>c.checkAllAgentsStatus,"00d7abf076433b9b7ad65f140828f000e60b100ef4",()=>g.listGitHubOrganizations,"00ebfc5b8f236df56743159162d19f9853e21daf71",()=>e.pickFolder,"4004cdb7a983c2b2e8118d003269c00b8ca8328770",()=>f.listGitHubRepositories,"4007e6cf85c903d65686ff4b0e96b69bb3fb8b5dd6",()=>k.deployApplication,"400cd9af42eddef7536fee72505984aa11dd304eee",()=>y.startFeature,"40170e0928a2ea6b74017ad47a4c57117dd019d7c1",()=>n.openIde,"401fd96509b2150c7fc78d04070496418625ad3bb8",()=>s.createProjectAndFeature,"402c21b8b8b3488320789af44e231a3b03336742fb",()=>B.addRepository,"402ffa2dc54264716187241e9be4fa208bb543ec8c",()=>r.getDeploymentLogs,"4039d2a9c787f999f6ca5a009cc6d3677f4fecf8ca",()=>I.getResearchArtifact,"4059c37b119db85720c100d7284a4eea13c23482e9",()=>v.archiveFeature,"405c612fff63268c16f659cc62f04eae3d067d2767",()=>O.getBranchSyncStatus,"406a8f4dd973018b040e39bcf5a54ab1d632e55520",()=>h.importGitHubRepository,"406b9612887878eda49140896d7cc50e8f71c08503",()=>z.stopFeature,"406d43f7d0c30b6b0b43e3aa4b78d5de248a765a10",()=>q.syncRepository,"407c17929ff5859a0f74052b31b167afcd51923877",()=>H.getFeatureArtifact,"40878effbe1f457983db9b61657615651fc79b3c25",()=>A.unarchiveFeature,"4093ba96696844586f1722f8b454d4af89b6b6b75c",()=>M.rebaseFeature,"409d3055c8d244277619a15822e751d0a3e02e13fb",()=>L.getFeaturePlan,"40a43c73a7cd509f1a4b24b523030fb41fc24907eb",()=>J.getMergeReviewData,"40b218f168a724496cc86feff20259b942c948b18a",()=>o.openShell,"40b2e1bc96b30cbdb0430af9925ac38dd4b704b0f3",()=>p.openFolder,"40b52399126c0c415ed3c0114be5bb6e7181aba920",()=>E.getFeatureMetadata,"40b8ce83c1d49acef485ad48493fec9a73813972ee",()=>D.deleteApplication,"40c4c9128d0fe7564c6338ab39a15ee8f37f97a5cf",()=>u.createProjectFolder,"40cda6828bcd7caf3c94b1d714873a18189513dfeb",()=>m.getDeploymentStatus,"40d2b3d3f6017dff4d6be8016943a0bc41ef6d2119",()=>l.stopDeployment,"40dc9a782ddf43b51707a08aa06cb0848838ede832",()=>N.getFeatureDrawerData,"40de173f92137f456a64448e1d39e9737079d5b8d9",()=>j.deployRepository,"40dfe41586079ffe4e7d97ea4bff4bdf2441a37bf0",()=>K.getFeaturePhaseTimings,"40e2b1ed706b39956f9d1c0c7231efa9d7c4c0760a",()=>t.createApplication,"40e36ae1ea45708cca02e8622499f80e8da7a24575",()=>x.resumeFeature,"40ef324b5c8df3d4d9f7a55860b3e1c565ff78158c",()=>i.deployFeature,"601f5c873689908c319a68d4237d262d7d6623b62c",()=>F.approveFeature,"6064f52ade385fbcce8be48cde9418c50671688a97",()=>d.updateAgentAndModel,"60ff0df2dc4cb96435bf3a30645fc8340ee9b2fc74",()=>C.deleteRepository,"70f699870b6ae858da2423cfece98ce44ae398797f",()=>G.rejectFeature,"70fa5c6575dfb84e1993764a877b8c0777c62a83b6",()=>P.updateFeaturePinnedConfig,"78915414551562a21cb8e714196b4daac0017b3bc3",()=>w.deleteFeature],43629)},6714,a=>{a.v(a=>Promise.resolve().then(()=>a(2157)))},11105,a=>{a.v(a=>Promise.resolve().then(()=>a(50227)))},29718,a=>{a.v(b=>Promise.all(["server/chunks/ssr/90b01_js-yaml_dist_js-yaml_mjs_c897fb57._.js"].map(b=>a.l(b))).then(()=>b(32996)))}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__288ffaa6._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/build-feature-node-data.ts","../../../../../../../src/presentation/web/app/actions/approve-feature.ts","../../../../../../../src/presentation/web/app/actions/reject-feature.ts","../../../../../../../src/presentation/web/app/actions/get-feature-artifact.ts","../../../../../../../src/presentation/web/app/actions/get-research-artifact.ts","../../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts","../../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts","../../../../../../../src/presentation/web/app/actions/get-feature-plan.ts","../../../../../../../src/presentation/web/app/actions/rebase-feature.ts","../../../../../../../src/presentation/web/app/actions/get-feature-drawer-data.ts","../../../../../../../src/presentation/web/app/actions/get-branch-sync-status.ts","../../../../../../../src/presentation/web/app/actions/update-feature-pinned-config.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/feature/%5BfeatureId%5D/%5Btab%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["import type { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport { AgentRunStatus } from '@shepai/core/domain/generated/output';\nimport {\n deriveNodeState,\n deriveProgress,\n deriveLifecycle,\n} from '@/components/common/feature-node/derive-feature-state';\nimport { isProcessAlive } from '@shepai/core/infrastructure/services/process/is-process-alive';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport type { FeatureNodeData } from '@/components/common/feature-node';\n\nexport interface BuildFeatureNodeDataOptions {\n baseBranch?: string;\n repositoryName?: string;\n /** AI-generated one-liner from FeatureArtifact */\n oneLiner?: string;\n /** Remote URL for the repository (HTTPS) */\n remoteUrl?: string;\n /** Whether evidence collection is enabled (global workflow setting) */\n enableEvidence?: boolean;\n /** Whether evidence is committed to the PR body (global workflow setting) */\n commitEvidence?: boolean;\n /** Whether CI watch/fix loop is enabled (global workflow setting) */\n ciWatchEnabled?: boolean;\n /** Whether to hide CI status badges from UI (global workflow setting) */\n hideCiStatus?: boolean;\n}\n\n/**\n * Builds a FeatureNodeData object from a Feature entity and optional AgentRun.\n * This is the single-feature version of the logic in `buildGraphNodes`.\n */\nexport function buildFeatureNodeData(\n feature: Feature,\n run: AgentRun | null,\n options?: BuildFeatureNodeDataOptions\n): FeatureNodeData {\n // Detect crashed agents: DB says running/pending but PID is dead\n const isActive = run?.status === AgentRunStatus.running || run?.status === AgentRunStatus.pending;\n const pidAlive = isActive && run?.pid ? isProcessAlive(run.pid) : undefined;\n\n return {\n name: feature.name,\n description: feature.description ?? feature.slug,\n featureId: feature.id,\n lifecycle: deriveLifecycle(feature, run),\n repositoryPath: feature.repositoryPath,\n branch: feature.branch,\n worktreePath:\n feature.worktreePath ?? computeWorktreePath(feature.repositoryPath, feature.branch),\n specPath: feature.specPath,\n state: deriveNodeState(\n feature,\n run,\n pidAlive !== undefined ? { isPidAlive: pidAlive } : undefined\n ),\n progress: deriveProgress(feature),\n summary: feature.description,\n userQuery: feature.userQuery,\n createdAt: feature.createdAt instanceof Date ? feature.createdAt.getTime() : feature.createdAt,\n ...(feature.fast && { fastMode: true }),\n approvalGates: feature.approvalGates,\n push: feature.push,\n openPr: feature.openPr,\n forkAndPr: feature.forkAndPr,\n commitSpecs: feature.commitSpecs,\n enableEvidence: feature.enableEvidence ?? options?.enableEvidence ?? false,\n commitEvidence: feature.commitEvidence ?? options?.commitEvidence ?? false,\n ciWatchEnabled: feature.ciWatchEnabled ?? options?.ciWatchEnabled ?? true,\n ...(options?.hideCiStatus != null && { hideCiStatus: options.hideCiStatus }),\n ...(options?.repositoryName && { repositoryName: options.repositoryName }),\n ...(options?.baseBranch && { baseBranch: options.baseBranch }),\n ...(options?.oneLiner && { oneLiner: options.oneLiner }),\n ...(options?.remoteUrl && { remoteUrl: options.remoteUrl }),\n ...(run?.agentType && { agentType: run.agentType as FeatureNodeData['agentType'] }),\n ...(run?.modelId && { modelId: run.modelId }),\n ...(run?.error && { errorMessage: run.error }),\n ...(feature.agentRunId != null && { hasAgentRun: true }),\n ...(feature.plan != null && { hasPlan: true }),\n ...(feature.injectSkills && { injectSkills: true }),\n ...(feature.injectedSkills?.length && { injectedSkills: feature.injectedSkills }),\n ...(feature.pr && {\n pr: {\n url: feature.pr.url,\n number: feature.pr.number,\n status: feature.pr.status,\n ciStatus: feature.pr.ciStatus,\n commitHash: feature.pr.commitHash,\n mergeable: feature.pr.mergeable,\n },\n }),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ApproveAgentRunUseCase } from '@shepai/core/application/use-cases/agents/approve-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { PrdApprovalPayload } from '@shepai/core/domain/generated/output';\n\nexport async function approveFeature(\n featureId: string,\n payload?: PrdApprovalPayload\n): Promise<{ approved: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { approved: false, error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { approved: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { approved: false, error: 'Feature has no agent run' };\n }\n\n // Always use ApproveAgentRunUseCase — it handles waitingApproval, failed,\n // and interrupted statuses. This ensures approval is propagated via\n // Command({update: {_approvalAction: 'approved'}}) so the graph node\n // receives it on resume.\n const approveUseCase = resolve<ApproveAgentRunUseCase>('ApproveAgentRunUseCase');\n const result = await approveUseCase.execute(feature.agentRunId, payload);\n\n if (!result.approved) {\n return { approved: false, error: result.reason };\n }\n\n return { approved: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to approve feature';\n return { approved: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { RejectAgentRunUseCase } from '@shepai/core/application/use-cases/agents/reject-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport async function rejectFeature(\n featureId: string,\n feedback: string,\n attachments?: string[]\n): Promise<{\n rejected: boolean;\n iteration?: number;\n iterationWarning?: boolean;\n error?: string;\n}> {\n if (!featureId.trim()) {\n return { rejected: false, error: 'Feature id is required' };\n }\n\n if (!feedback.trim()) {\n return { rejected: false, error: 'Feedback is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { rejected: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { rejected: false, error: 'Feature has no agent run' };\n }\n\n // Always use RejectAgentRunUseCase — it handles waitingApproval, failed,\n // and interrupted statuses. This ensures rejection feedback is propagated\n // via Command({update: {_approvalAction, _rejectionFeedback}}) so the\n // graph node receives the feedback on resume.\n const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback, attachments);\n\n if (!result.rejected) {\n return { rejected: false, error: result.reason };\n }\n\n return {\n rejected: true,\n iteration: result.iteration,\n iterationWarning: result.iterationWarning,\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to reject feature';\n return { rejected: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetFeatureArtifactUseCase } from '@shepai/core/application/use-cases/features/get-feature-artifact.use-case';\nimport type { FeatureArtifact } from '@shepai/core/domain/generated/output';\nimport type { PrdQuestionnaireData } from '@shepai/core/domain/generated/output';\nimport type { ProductDecisionsSummaryData } from '@/components/common/product-decisions-summary';\n\ninterface GetFeatureArtifactResult {\n questionnaire?: PrdQuestionnaireData;\n productDecisions?: ProductDecisionsSummaryData;\n artifact?: FeatureArtifact;\n error?: string;\n}\n\n/**\n * Map FeatureArtifact openQuestions into the PrdQuestionnaireData shape\n * expected by the PrdQuestionnaireDrawer component.\n */\nfunction toQuestionnaireData(artifact: FeatureArtifact): PrdQuestionnaireData {\n return {\n question: 'Goal',\n context: artifact.oneLiner,\n questions: artifact.openQuestions.map((oq, idx) => ({\n id: `q-${idx}`,\n question: oq.question,\n type: 'select' as const,\n options: (oq.options ?? []).map((opt, optIdx) => ({\n id: `q-${idx}-opt-${optIdx}`,\n label: opt.option,\n rationale: opt.description,\n ...(opt.selected ? { recommended: true } : {}),\n })),\n })),\n finalAction: {\n id: 'approve-reqs',\n label: 'Approve Requirements',\n description: 'Finalize and lock the requirements for implementation',\n },\n };\n}\n\n/**\n * Map FeatureArtifact openQuestions into a read-only summary for the\n * Product Decisions tab in the tech review drawer.\n */\nfunction toProductDecisionsData(artifact: FeatureArtifact): ProductDecisionsSummaryData {\n return {\n question: 'Goal',\n context: artifact.oneLiner,\n questions: artifact.openQuestions\n .filter((oq) => oq.resolved)\n .map((oq) => {\n const selected = oq.options?.find((o) => o.selected);\n return {\n question: oq.question,\n selectedOption: selected?.option ?? oq.answer ?? 'N/A',\n rationale: oq.selectionRationale ?? selected?.description ?? '',\n wasRecommended: false,\n };\n }),\n };\n}\n\nexport async function getFeatureArtifact(featureId: string): Promise<GetFeatureArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetFeatureArtifactUseCase>('GetFeatureArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const questionnaire = toQuestionnaireData(artifact);\n const productDecisions = toProductDecisionsData(artifact);\n return { questionnaire, productDecisions, artifact };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load feature artifact';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetResearchArtifactUseCase } from '@shepai/core/application/use-cases/features/get-research-artifact.use-case';\nimport type { ResearchArtifact, TechDecision } from '@shepai/core/domain/generated/output';\n\nexport interface TechDecisionsReviewData {\n name: string;\n summary: string;\n decisions: TechDecision[];\n technologies: string[];\n}\n\ninterface GetResearchArtifactResult {\n techDecisions?: TechDecisionsReviewData;\n error?: string;\n}\n\nfunction toTechDecisionsData(artifact: ResearchArtifact): TechDecisionsReviewData {\n return {\n name: artifact.name,\n summary: artifact.summary,\n decisions: artifact.decisions,\n technologies: artifact.technologies,\n };\n}\n\nexport async function getResearchArtifact(featureId: string): Promise<GetResearchArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetResearchArtifactUseCase>('GetResearchArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const techDecisions = toTechDecisionsData(artifact);\n return { techDecisions };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load research artifact';\n return { error: message };\n }\n}\n","'use server';\n\nimport { createHash } from 'node:crypto';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { basename, join, dirname } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IGitPrService } from '@shepai/core/application/ports/output/services/git-pr-service.interface';\nimport type {\n MergeReviewData,\n MergeReviewEvidence,\n} from '@/components/common/merge-review/merge-review-config';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport { getShepHomeDir } from '@shepai/core/infrastructure/services/filesystem/shep-directory.service';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\n\n/**\n * Compute the shep evidence directory for a given repository and feature.\n * Path: ~/.shep/repos/<sha256-hash-prefix>/evidence/<featureId>/\n */\nfunction computeEvidenceDir(repositoryPath: string, featureId: string): string {\n const repoHash = createHash('sha256').update(repositoryPath).digest('hex').slice(0, 16);\n return join(getShepHomeDir(), 'repos', repoHash, 'evidence', featureId).replace(/\\\\/g, '/');\n}\n\n/**\n * Normalize evidence paths so they all point to the shep evidence directory.\n * When commitEvidence was enabled, the manifest may contain relative paths\n * (e.g. \"specs/066-feature/evidence/file.png\"). After merge the worktree is\n * deleted so those paths no longer resolve. The evidence files were also saved\n * to the shep evidence dir with the same filename, so we map relative paths\n * to absolute paths there.\n */\nfunction normalizeEvidencePaths(\n evidence: MergeReviewEvidence[],\n evidenceDir: string\n): MergeReviewEvidence[] {\n return evidence.map((e) => {\n if (e.relativePath.startsWith('/')) {\n // Already absolute — check if the file exists; if not, try the evidence dir\n if (existsSync(e.relativePath)) return e;\n const fallback = join(evidenceDir, basename(e.relativePath)).replace(/\\\\/g, '/');\n if (existsSync(fallback)) return { ...e, relativePath: fallback };\n return e;\n }\n // Relative path — resolve to evidence dir using the filename\n const absolutePath = join(evidenceDir, basename(e.relativePath)).replace(/\\\\/g, '/');\n return { ...e, relativePath: absolutePath };\n });\n}\n\nexport async function getMergeReviewData(featureId: string): Promise<GetMergeReviewDataResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { error: 'Feature not found' };\n }\n\n const { workflow } = getSettings();\n\n const pr = feature.pr\n ? {\n url: feature.pr.url,\n number: feature.pr.number,\n status: feature.pr.status,\n commitHash: feature.pr.commitHash,\n ciStatus: feature.pr.ciStatus,\n mergeable: feature.pr.mergeable,\n }\n : undefined;\n\n const worktreePath =\n feature.worktreePath ??\n (feature.repositoryPath && feature.branch\n ? computeWorktreePath(feature.repositoryPath, feature.branch)\n : null);\n\n // Detect the actual default branch (main, master, etc.) for diff comparison.\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffCwd = worktreePath ?? feature.repositoryPath ?? null;\n let defaultBranch = 'main';\n if (diffCwd) {\n try {\n defaultBranch = await gitPrService.getDefaultBranch(diffCwd);\n } catch {\n // Fall back to 'main' if detection fails\n }\n }\n\n const branch = feature.branch ? { source: feature.branch, target: defaultBranch } : undefined;\n\n // Load evidence manifest (best-effort).\n // Evidence is stored independently of the worktree at:\n // ~/.shep/repos/<hash>/evidence/<featureId>/manifest.json\n // We compute this path from repositoryPath so evidence is accessible\n // even after the worktree has been deleted post-merge.\n let evidence: MergeReviewEvidence[] | undefined;\n const evidenceDir = feature.repositoryPath\n ? computeEvidenceDir(feature.repositoryPath, featureId)\n : worktreePath\n ? join(dirname(dirname(worktreePath)), 'evidence', featureId).replace(/\\\\/g, '/')\n : null;\n\n if (evidenceDir) {\n try {\n const manifestPath = join(evidenceDir, 'manifest.json');\n if (existsSync(manifestPath)) {\n const raw: MergeReviewEvidence[] = JSON.parse(readFileSync(manifestPath, 'utf-8'));\n const normalized = normalizeEvidencePaths(raw, evidenceDir);\n // Deduplicate: same type + relativePath means the same evidence entry\n const seen = new Set<string>();\n evidence = normalized.filter((e) => {\n const key = `${e.type}:${e.relativePath}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n }\n } catch {\n // Evidence unavailable — not critical\n }\n }\n\n if (!worktreePath) {\n return {\n pr,\n branch,\n evidence,\n warning: pr ? undefined : 'No PR or diff data available',\n hideCiStatus: workflow.hideCiStatus,\n };\n }\n\n try {\n const [diffSummary, fileDiffs] = await Promise.all([\n gitPrService.getPrDiffSummary(worktreePath, defaultBranch),\n gitPrService.getFileDiffs(worktreePath, defaultBranch).catch(() => undefined),\n ]);\n return { pr, branch, diffSummary, fileDiffs, evidence, hideCiStatus: workflow.hideCiStatus };\n } catch {\n return {\n pr,\n branch,\n evidence,\n warning: 'Diff statistics unavailable',\n hideCiStatus: workflow.hideCiStatus,\n };\n }\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load merge review data';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IPhaseTimingRepository } from '@shepai/core/application/ports/output/agents/phase-timing-repository.interface';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport interface PhaseTimingData {\n agentRunId: string;\n phase: string;\n startedAt: string;\n completedAt?: string;\n durationMs?: number;\n waitingApprovalAt?: string;\n approvalWaitMs?: number;\n inputTokens?: number;\n outputTokens?: number;\n cacheCreationInputTokens?: number;\n cacheReadInputTokens?: number;\n costUsd?: number;\n numTurns?: number;\n durationApiMs?: number;\n exitCode?: string;\n errorMessage?: string;\n prompt?: string;\n}\n\nexport interface RejectionFeedbackData {\n iteration: number;\n message: string;\n phase?: string;\n timestamp?: string;\n attachments?: string[];\n}\n\ntype GetPhaseTimingsResult =\n | { timings: PhaseTimingData[]; rejectionFeedback: RejectionFeedbackData[] }\n | { error: string };\n\nexport async function getFeaturePhaseTimings(featureId: string): Promise<GetPhaseTimingsResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const repo = resolve<IPhaseTimingRepository>('IPhaseTimingRepository');\n const phaseTimings = await repo.findByFeatureId(featureId);\n\n const timings: PhaseTimingData[] = phaseTimings.map((t) => ({\n agentRunId: t.agentRunId,\n phase: t.phase,\n startedAt: t.startedAt,\n completedAt: t.completedAt,\n durationMs: t.durationMs != null ? Number(t.durationMs) : undefined,\n waitingApprovalAt: t.waitingApprovalAt,\n approvalWaitMs: t.approvalWaitMs != null ? Number(t.approvalWaitMs) : undefined,\n inputTokens: t.inputTokens != null ? Number(t.inputTokens) : undefined,\n outputTokens: t.outputTokens != null ? Number(t.outputTokens) : undefined,\n cacheCreationInputTokens:\n t.cacheCreationInputTokens != null ? Number(t.cacheCreationInputTokens) : undefined,\n cacheReadInputTokens:\n t.cacheReadInputTokens != null ? Number(t.cacheReadInputTokens) : undefined,\n costUsd: t.costUsd != null ? Number(t.costUsd) : undefined,\n numTurns: t.numTurns ?? undefined,\n durationApiMs: t.durationApiMs != null ? Number(t.durationApiMs) : undefined,\n exitCode: t.exitCode ?? undefined,\n errorMessage: t.errorMessage ?? undefined,\n prompt: t.prompt ?? undefined,\n }));\n\n // Read rejection feedback from spec.yaml\n const rejectionFeedback = await readRejectionFeedback(featureId);\n\n return { timings, rejectionFeedback };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load phase timings';\n return { error: message };\n }\n}\n\nasync function readRejectionFeedback(featureId: string): Promise<RejectionFeedbackData[]> {\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n if (!feature?.specPath) return [];\n\n const { readFileSync } = await import('node:fs');\n const { join } = await import('node:path');\n const yaml = (await import('js-yaml')).default;\n\n const specContent = readFileSync(join(feature.specPath, 'spec.yaml'), 'utf-8');\n const spec = yaml.load(specContent) as Record<string, unknown>;\n\n if (!Array.isArray(spec?.rejectionFeedback)) return [];\n\n return (spec.rejectionFeedback as Record<string, unknown>[]).map((entry) => ({\n iteration: Number(entry.iteration ?? 1),\n message: String(entry.message ?? ''),\n phase: entry.phase ? String(entry.phase) : undefined,\n timestamp: entry.timestamp ? String(entry.timestamp) : undefined,\n attachments: Array.isArray(entry.attachments)\n ? (entry.attachments as unknown[]).map(String)\n : undefined,\n }));\n } catch {\n return [];\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport interface AcceptanceCriterionData {\n description: string;\n verified: boolean;\n}\n\nexport interface ActionItemData {\n name: string;\n description: string;\n acceptanceCriteria: AcceptanceCriterionData[];\n}\n\nexport interface PlanTaskData {\n title: string;\n description: string;\n state: string;\n actionItems: ActionItemData[];\n}\n\nexport interface PlanData {\n state: string;\n overview: string;\n tasks: PlanTaskData[];\n}\n\ntype GetPlanResult = { plan: PlanData | undefined } | { error: string };\n\nexport async function getFeaturePlan(featureId: string): Promise<GetPlanResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const repo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await repo.findById(featureId);\n\n if (!feature) {\n return { error: 'Feature not found' };\n }\n\n if (!feature.plan) {\n return { plan: undefined };\n }\n\n const plan: PlanData = {\n state: feature.plan.state,\n overview: feature.plan.overview,\n tasks: feature.plan.tasks.map((t) => ({\n title: t.title ?? '',\n description: t.description ?? '',\n state: t.state,\n actionItems: (t.actionItems ?? []).map((ai) => ({\n name: ai.name,\n description: ai.description,\n acceptanceCriteria: (ai.acceptanceCriteria ?? []).map((ac) => ({\n description: ac.description,\n verified: ac.verified,\n })),\n })),\n })),\n };\n\n return { plan };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load feature plan';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { RebaseFeatureOnMainUseCase } from '@shepai/core/application/use-cases/features/rebase-feature-on-main.use-case';\n\nexport async function rebaseFeature(\n featureId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!featureId?.trim()) {\n return { success: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<RebaseFeatureOnMainUseCase>('RebaseFeatureOnMainUseCase');\n await useCase.execute(featureId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to rebase feature';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\nimport type { IRepositoryRepository } from '@shepai/core/application/ports/output/repositories/repository-repository.interface';\nimport type { IGitPrService } from '@shepai/core/application/ports/output/services/git-pr-service.interface';\nimport type { GetFeatureArtifactUseCase } from '@shepai/core/application/use-cases/features/get-feature-artifact.use-case';\nimport { buildFeatureNodeData } from '@/app/build-feature-node-data';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { FeatureNodeData } from '@/components/common/feature-node';\n\n/**\n * Fetches full FeatureNodeData for a given feature ID.\n * Used by the drawer for targeted data syncing without triggering\n * a full router.refresh() / server component re-render.\n *\n * CI status and mergeable status are read from the DB (already updated\n * by PrSyncWatcherService) instead of making duplicate GitHub API calls.\n */\nexport async function getFeatureDrawerData(featureId: string): Promise<FeatureNodeData | null> {\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const agentRunRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const repoRepo = resolve<IRepositoryRepository>('IRepositoryRepository');\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const getArtifact = resolve<GetFeatureArtifactUseCase>('GetFeatureArtifactUseCase');\n\n const feature = await featureRepo.findById(featureId);\n if (!feature) return null;\n\n const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;\n\n // CI status and mergeable status are read from the feature record (updated by\n // PrSyncWatcherService every 30s) — no duplicate GitHub API calls needed.\n // Only getDefaultBranch and getRemoteUrl are kept as they are local git operations.\n const [repo, baseBranch, artifact, remoteUrl] = await Promise.all([\n repoRepo.findByPath(feature.repositoryPath).catch(() => null),\n gitPrService.getDefaultBranch(feature.repositoryPath).catch(() => 'main'),\n getArtifact.execute(featureId).catch(() => null),\n gitPrService.getRemoteUrl(feature.repositoryPath).catch(() => null),\n ]);\n\n const { workflow } = getSettings();\n\n return buildFeatureNodeData(feature, run, {\n repositoryName: repo?.name,\n baseBranch,\n oneLiner: artifact?.oneLiner,\n remoteUrl: remoteUrl ?? undefined,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n hideCiStatus: workflow.hideCiStatus,\n });\n } catch {\n return null;\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetBranchSyncStatusUseCase } from '@shepai/core/application/use-cases/features/get-branch-sync-status.use-case';\n\nexport async function getBranchSyncStatus(featureId: string): Promise<{\n success: boolean;\n data?: { ahead: number; behind: number; baseBranch: string; checkedAt: string };\n error?: string;\n}> {\n if (!featureId?.trim()) {\n return { success: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetBranchSyncStatusUseCase>('GetBranchSyncStatusUseCase');\n const result = await useCase.execute(featureId);\n return {\n success: true,\n data: {\n ...result,\n checkedAt: new Date().toISOString(),\n },\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to get branch sync status';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { UpdateFeaturePinnedConfigUseCase } from '@shepai/core/application/use-cases/features/update-feature-pinned-config.use-case';\n\nexport async function updateFeaturePinnedConfig(\n featureId: string,\n agentType: string,\n modelId: string\n): Promise<{ ok: boolean; error?: string }> {\n const normalizedFeatureId = featureId.trim();\n if (!normalizedFeatureId) {\n return { ok: false, error: 'Feature id is required' };\n }\n\n const normalizedAgentType = agentType.trim();\n if (!normalizedAgentType) {\n return { ok: false, error: 'Agent type is required' };\n }\n\n const normalizedModelId = modelId.trim();\n if (!normalizedModelId) {\n return { ok: false, error: 'Model id is required' };\n }\n\n try {\n const useCase = resolve<UpdateFeaturePinnedConfigUseCase>('UpdateFeaturePinnedConfigUseCase');\n await useCase.execute({\n featureId: normalizedFeatureId,\n agentType: normalizedAgentType,\n modelId: normalizedModelId,\n });\n return { ok: true };\n } catch (error: unknown) {\n const message =\n error instanceof Error ? error.message : 'Failed to update feature pinned config';\n return { ok: false, error: message };\n }\n}\n","export {getAllAgentModels as '005c8f7974a1e1332ccaf1a75ffc775c759bbe6ef6'} from 'ACTIONS_MODULE0'\nexport {checkAllAgentsStatus as '00db54cb07e16d3bce02b0ae6b0bf7f4a87d3a0d36'} from 'ACTIONS_MODULE1'\nexport {updateAgentAndModel as '602d47346bf416279937e58a8da1bd2f5190a7bc16'} from 'ACTIONS_MODULE2'\nexport {pickFolder as '004db1988c534ce1b59d5cf3ab2e2cdeb8d81a76f6'} from 'ACTIONS_MODULE3'\nexport {listGitHubRepositories as '40e67621a4b03951ac4595cf608b8d72e4c3c9c694'} from 'ACTIONS_MODULE4'\nexport {listGitHubOrganizations as '00e9dfbd6e5b8c8316129cccf71f306dc290962023'} from 'ACTIONS_MODULE5'\nexport {importGitHubRepository as '40517bd2ea0c40e78818124ff2130655a9f052592a'} from 'ACTIONS_MODULE6'\nexport {deployFeature as '40f5248cb2ab52f92e90950166adab8424e8aceeae'} from 'ACTIONS_MODULE7'\nexport {deployRepository as '405e941bd11cdaf10efa56eaa45557bbf7f5bc8405'} from 'ACTIONS_MODULE8'\nexport {deployApplication as '40ff297753e74d45aeecb03f3360e9138b9bf4a81a'} from 'ACTIONS_MODULE9'\nexport {stopDeployment as '402e2cf49a7bac874cea92f3c2549e65b5b57a2f8b'} from 'ACTIONS_MODULE10'\nexport {getDeploymentStatus as '404906a4301ca24858fb818b20ff67306a5dc37445'} from 'ACTIONS_MODULE11'\nexport {openIde as '40f6826ea04e2ae01fb9a2d53c26102cc0881bc8a9'} from 'ACTIONS_MODULE12'\nexport {openShell as '40105916247dba4c6254c696d18cba8a0fd0967fcb'} from 'ACTIONS_MODULE13'\nexport {openFolder as '40d9cca1fc562c971f8f07d4f32af201d8972c047a'} from 'ACTIONS_MODULE14'\nexport {syncRepository as '4050c0c09492a5c177e1805e876a69ae09f56366be'} from 'ACTIONS_MODULE15'\nexport {getDeploymentLogs as '40cce6c3966bb641b11a49e34aad01eb6fc1132c5c'} from 'ACTIONS_MODULE16'\nexport {createProjectAndFeature as '4046ecfb670d85e0a2518210bae133faf9620ddeee'} from 'ACTIONS_MODULE17'\nexport {createApplication as '4000bf86bcc6233c0b1d43d51cda477c690405e763'} from 'ACTIONS_MODULE18'\nexport {createProjectFolder as '40295c713502865b83a3df509b609d3dc04625ee0b'} from 'ACTIONS_MODULE19'\nexport {archiveFeature as '40530cba5dc0fea42596912eac9888cf825eacf545'} from 'ACTIONS_MODULE20'\nexport {deleteFeature as '786266fdf327c764b31a8647241fad7bc4b3a913f3'} from 'ACTIONS_MODULE21'\nexport {resumeFeature as '4047ed329e8b7484ff71fc0a65dc0b5450f3a9a49d'} from 'ACTIONS_MODULE22'\nexport {startFeature as '40670786209cd74800dd09126ec2931266cb8e6488'} from 'ACTIONS_MODULE23'\nexport {stopFeature as '40ebb5bb4518bae0c7b6dea84057c6bfc019a2905e'} from 'ACTIONS_MODULE24'\nexport {unarchiveFeature as '407ebeab3f45e94b90a48d5da7e1b396c6e3783461'} from 'ACTIONS_MODULE25'\nexport {addRepository as '40f47c690b5d3b19d30552df4bf6a9bf5cf18e6b7a'} from 'ACTIONS_MODULE26'\nexport {deleteRepository as '60faa10aef80dc204c93e0bfce95078c5d479ec953'} from 'ACTIONS_MODULE27'\nexport {deleteApplication as '408cf4dae7f80a94ca468c87ca40846ac825a3c162'} from 'ACTIONS_MODULE28'\nexport {getFeatureMetadata as '401022574c76c0994b8b00220e52c8e005a45cc328'} from 'ACTIONS_MODULE29'\nexport {approveFeature as '60c5a51100c1d4ecae432a0ebc2e2f613dfff8010d'} from 'ACTIONS_MODULE30'\nexport {rejectFeature as '70bbc4dc3e1cda8695839821ddc0d58cba7776e8a9'} from 'ACTIONS_MODULE31'\nexport {getFeatureArtifact as '4085cbe8b24f4976f1a405f946fab15b734984c852'} from 'ACTIONS_MODULE32'\nexport {getResearchArtifact as '40c6b64218ee98d1f66a04bddcb82dc27886264953'} from 'ACTIONS_MODULE33'\nexport {getMergeReviewData as '408e8fa609df617da0e01e0e70dbeaf216d36b5608'} from 'ACTIONS_MODULE34'\nexport {getFeaturePhaseTimings as '402fa422488591f1e8f79c02a92edd519f172c535a'} from 'ACTIONS_MODULE35'\nexport {getFeaturePlan as '40503def57e7aaa996be2118fdcfb2c42c7fd50bce'} from 'ACTIONS_MODULE36'\nexport {rebaseFeature as '40b4dfa646e7fff61c261f239092b289411a3ae307'} from 'ACTIONS_MODULE37'\nexport {getFeatureDrawerData as '4050f8bb21bec95707ebdbe7a31c74d7de48347de2'} from 'ACTIONS_MODULE38'\nexport {getBranchSyncStatus as '4084283fb44a4ef73af14d48cef205ecc9fdae2d3c'} from 'ACTIONS_MODULE39'\nexport {updateFeaturePinnedConfig as '7041c1e3880b46972ddbc00033c721842b07a70321'} from 'ACTIONS_MODULE40'\n"],"names":[],"mappings":"uCACA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAwBO,SAAS,EACd,CAAgB,CAChB,CAAoB,CACpB,CAAqC,EAIrC,IAAM,EAAW,CADA,GAAK,SAAW,EAAA,cAAc,CAAC,OAAO,EAAI,GAAK,SAAW,EAAA,cAAc,CAAC,OAAA,AAAO,GACpE,GAAK,IAAM,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAI,GAAG,OAAI,EAElE,MAAO,CACL,KAAM,EAAQ,IAAI,CAClB,YAAa,EAAQ,WAAW,EAAI,EAAQ,IAAI,CAChD,UAAW,EAAQ,EAAE,CACrB,UAAW,CAAA,EAAA,EAAA,eAAA,AAAe,EAAC,EAAS,GACpC,eAAgB,EAAQ,cAAc,CACtC,OAAQ,EAAQ,MAAM,CACtB,aACE,EAAQ,YAAY,EAAI,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,EAAQ,cAAc,CAAE,EAAQ,MAAM,EACpF,SAAU,EAAQ,QAAQ,CAC1B,MAAO,CAAA,EAAA,EAAA,eAAA,AAAe,EACpB,EACA,OACa,IAAb,EAAyB,CAAE,WAAY,CAAS,OAAI,GAEtD,SAAU,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,GACzB,QAAS,EAAQ,WAAW,CAC5B,UAAW,EAAQ,SAAS,CAC5B,UAAW,EAAQ,SAAS,YAAY,KAAO,EAAQ,SAAS,CAAC,OAAO,GAAK,EAAQ,SAAS,CAC9F,GAA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AAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/build-feature-node-data.ts","../../../../../../../src/presentation/web/app/actions/approve-feature.ts","../../../../../../../src/presentation/web/app/actions/reject-feature.ts","../../../../../../../src/presentation/web/app/actions/get-feature-artifact.ts","../../../../../../../src/presentation/web/app/actions/get-research-artifact.ts","../../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts","../../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts","../../../../../../../src/presentation/web/app/actions/get-feature-plan.ts","../../../../../../../src/presentation/web/app/actions/rebase-feature.ts","../../../../../../../src/presentation/web/app/actions/get-feature-drawer-data.ts","../../../../../../../src/presentation/web/app/actions/get-branch-sync-status.ts","../../../../../../../src/presentation/web/app/actions/update-feature-pinned-config.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/feature/%5BfeatureId%5D/%5Btab%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["import type { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport { AgentRunStatus } from '@shepai/core/domain/generated/output';\nimport {\n deriveNodeState,\n deriveProgress,\n deriveLifecycle,\n} from '@/components/common/feature-node/derive-feature-state';\nimport { isProcessAlive } from '@shepai/core/infrastructure/services/process/is-process-alive';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport type { FeatureNodeData } from '@/components/common/feature-node';\n\nexport interface BuildFeatureNodeDataOptions {\n baseBranch?: string;\n repositoryName?: string;\n /** AI-generated one-liner from FeatureArtifact */\n oneLiner?: string;\n /** Remote URL for the repository (HTTPS) */\n remoteUrl?: string;\n /** Whether evidence collection is enabled (global workflow setting) */\n enableEvidence?: boolean;\n /** Whether evidence is committed to the PR body (global workflow setting) */\n commitEvidence?: boolean;\n /** Whether CI watch/fix loop is enabled (global workflow setting) */\n ciWatchEnabled?: boolean;\n /** Whether to hide CI status badges from UI (global workflow setting) */\n hideCiStatus?: boolean;\n}\n\n/**\n * Builds a FeatureNodeData object from a Feature entity and optional AgentRun.\n * This is the single-feature version of the logic in `buildGraphNodes`.\n */\nexport function buildFeatureNodeData(\n feature: Feature,\n run: AgentRun | null,\n options?: BuildFeatureNodeDataOptions\n): FeatureNodeData {\n // Detect crashed agents: DB says running/pending but PID is dead\n const isActive = run?.status === AgentRunStatus.running || run?.status === AgentRunStatus.pending;\n const pidAlive = isActive && run?.pid ? isProcessAlive(run.pid) : undefined;\n\n return {\n name: feature.name,\n description: feature.description ?? feature.slug,\n featureId: feature.id,\n lifecycle: deriveLifecycle(feature, run),\n repositoryPath: feature.repositoryPath,\n branch: feature.branch,\n worktreePath:\n feature.worktreePath ?? computeWorktreePath(feature.repositoryPath, feature.branch),\n specPath: feature.specPath,\n state: deriveNodeState(\n feature,\n run,\n pidAlive !== undefined ? { isPidAlive: pidAlive } : undefined\n ),\n progress: deriveProgress(feature),\n summary: feature.description,\n userQuery: feature.userQuery,\n createdAt: feature.createdAt instanceof Date ? feature.createdAt.getTime() : feature.createdAt,\n ...(feature.fast && { fastMode: true }),\n approvalGates: feature.approvalGates,\n push: feature.push,\n openPr: feature.openPr,\n forkAndPr: feature.forkAndPr,\n commitSpecs: feature.commitSpecs,\n enableEvidence: feature.enableEvidence ?? options?.enableEvidence ?? false,\n commitEvidence: feature.commitEvidence ?? options?.commitEvidence ?? false,\n ciWatchEnabled: feature.ciWatchEnabled ?? options?.ciWatchEnabled ?? true,\n ...(options?.hideCiStatus != null && { hideCiStatus: options.hideCiStatus }),\n ...(options?.repositoryName && { repositoryName: options.repositoryName }),\n ...(options?.baseBranch && { baseBranch: options.baseBranch }),\n ...(options?.oneLiner && { oneLiner: options.oneLiner }),\n ...(options?.remoteUrl && { remoteUrl: options.remoteUrl }),\n ...(run?.agentType && { agentType: run.agentType as FeatureNodeData['agentType'] }),\n ...(run?.modelId && { modelId: run.modelId }),\n ...(run?.error && { errorMessage: run.error }),\n ...(feature.agentRunId != null && { hasAgentRun: true }),\n ...(feature.plan != null && { hasPlan: true }),\n ...(feature.injectSkills && { injectSkills: true }),\n ...(feature.injectedSkills?.length && { injectedSkills: feature.injectedSkills }),\n ...(feature.pr && {\n pr: {\n url: feature.pr.url,\n number: feature.pr.number,\n status: feature.pr.status,\n ciStatus: feature.pr.ciStatus,\n commitHash: feature.pr.commitHash,\n mergeable: feature.pr.mergeable,\n },\n }),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ApproveAgentRunUseCase } from '@shepai/core/application/use-cases/agents/approve-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { PrdApprovalPayload } from '@shepai/core/domain/generated/output';\n\nexport async function approveFeature(\n featureId: string,\n payload?: PrdApprovalPayload\n): Promise<{ approved: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { approved: false, error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { approved: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { approved: false, error: 'Feature has no agent run' };\n }\n\n // Always use ApproveAgentRunUseCase — it handles waitingApproval, failed,\n // and interrupted statuses. This ensures approval is propagated via\n // Command({update: {_approvalAction: 'approved'}}) so the graph node\n // receives it on resume.\n const approveUseCase = resolve<ApproveAgentRunUseCase>('ApproveAgentRunUseCase');\n const result = await approveUseCase.execute(feature.agentRunId, payload);\n\n if (!result.approved) {\n return { approved: false, error: result.reason };\n }\n\n return { approved: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to approve feature';\n return { approved: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { RejectAgentRunUseCase } from '@shepai/core/application/use-cases/agents/reject-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport async function rejectFeature(\n featureId: string,\n feedback: string,\n attachments?: string[]\n): Promise<{\n rejected: boolean;\n iteration?: number;\n iterationWarning?: boolean;\n error?: string;\n}> {\n if (!featureId.trim()) {\n return { rejected: false, error: 'Feature id is required' };\n }\n\n if (!feedback.trim()) {\n return { rejected: false, error: 'Feedback is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { rejected: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { rejected: false, error: 'Feature has no agent run' };\n }\n\n // Always use RejectAgentRunUseCase — it handles waitingApproval, failed,\n // and interrupted statuses. This ensures rejection feedback is propagated\n // via Command({update: {_approvalAction, _rejectionFeedback}}) so the\n // graph node receives the feedback on resume.\n const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback, attachments);\n\n if (!result.rejected) {\n return { rejected: false, error: result.reason };\n }\n\n return {\n rejected: true,\n iteration: result.iteration,\n iterationWarning: result.iterationWarning,\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to reject feature';\n return { rejected: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetFeatureArtifactUseCase } from '@shepai/core/application/use-cases/features/get-feature-artifact.use-case';\nimport type { FeatureArtifact } from '@shepai/core/domain/generated/output';\nimport type { PrdQuestionnaireData } from '@shepai/core/domain/generated/output';\nimport type { ProductDecisionsSummaryData } from '@/components/common/product-decisions-summary';\n\ninterface GetFeatureArtifactResult {\n questionnaire?: PrdQuestionnaireData;\n productDecisions?: ProductDecisionsSummaryData;\n artifact?: FeatureArtifact;\n error?: string;\n}\n\n/**\n * Map FeatureArtifact openQuestions into the PrdQuestionnaireData shape\n * expected by the PrdQuestionnaireDrawer component.\n */\nfunction toQuestionnaireData(artifact: FeatureArtifact): PrdQuestionnaireData {\n return {\n question: 'Goal',\n context: artifact.oneLiner,\n questions: artifact.openQuestions.map((oq, idx) => ({\n id: `q-${idx}`,\n question: oq.question,\n type: 'select' as const,\n options: (oq.options ?? []).map((opt, optIdx) => ({\n id: `q-${idx}-opt-${optIdx}`,\n label: opt.option,\n rationale: opt.description,\n ...(opt.selected ? { recommended: true } : {}),\n })),\n })),\n finalAction: {\n id: 'approve-reqs',\n label: 'Approve Requirements',\n description: 'Finalize and lock the requirements for implementation',\n },\n };\n}\n\n/**\n * Map FeatureArtifact openQuestions into a read-only summary for the\n * Product Decisions tab in the tech review drawer.\n */\nfunction toProductDecisionsData(artifact: FeatureArtifact): ProductDecisionsSummaryData {\n return {\n question: 'Goal',\n context: artifact.oneLiner,\n questions: artifact.openQuestions\n .filter((oq) => oq.resolved)\n .map((oq) => {\n const selected = oq.options?.find((o) => o.selected);\n return {\n question: oq.question,\n selectedOption: selected?.option ?? oq.answer ?? 'N/A',\n rationale: oq.selectionRationale ?? selected?.description ?? '',\n wasRecommended: false,\n };\n }),\n };\n}\n\nexport async function getFeatureArtifact(featureId: string): Promise<GetFeatureArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetFeatureArtifactUseCase>('GetFeatureArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const questionnaire = toQuestionnaireData(artifact);\n const productDecisions = toProductDecisionsData(artifact);\n return { questionnaire, productDecisions, artifact };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load feature artifact';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetResearchArtifactUseCase } from '@shepai/core/application/use-cases/features/get-research-artifact.use-case';\nimport type { ResearchArtifact, TechDecision } from '@shepai/core/domain/generated/output';\n\nexport interface TechDecisionsReviewData {\n name: string;\n summary: string;\n decisions: TechDecision[];\n technologies: string[];\n}\n\ninterface GetResearchArtifactResult {\n techDecisions?: TechDecisionsReviewData;\n error?: string;\n}\n\nfunction toTechDecisionsData(artifact: ResearchArtifact): TechDecisionsReviewData {\n return {\n name: artifact.name,\n summary: artifact.summary,\n decisions: artifact.decisions,\n technologies: artifact.technologies,\n };\n}\n\nexport async function getResearchArtifact(featureId: string): Promise<GetResearchArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetResearchArtifactUseCase>('GetResearchArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const techDecisions = toTechDecisionsData(artifact);\n return { techDecisions };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load research artifact';\n return { error: message };\n }\n}\n","'use server';\n\nimport { createHash } from 'node:crypto';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { basename, join, dirname } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IGitPrService } from '@shepai/core/application/ports/output/services/git-pr-service.interface';\nimport type {\n MergeReviewData,\n MergeReviewEvidence,\n} from '@/components/common/merge-review/merge-review-config';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport { getShepHomeDir } from '@shepai/core/infrastructure/services/filesystem/shep-directory.service';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\n\n/**\n * Compute the shep evidence directory for a given repository and feature.\n * Path: ~/.shep/repos/<sha256-hash-prefix>/evidence/<featureId>/\n */\nfunction computeEvidenceDir(repositoryPath: string, featureId: string): string {\n const repoHash = createHash('sha256').update(repositoryPath).digest('hex').slice(0, 16);\n return join(getShepHomeDir(), 'repos', repoHash, 'evidence', featureId).replace(/\\\\/g, '/');\n}\n\n/**\n * Normalize evidence paths so they all point to the shep evidence directory.\n * When commitEvidence was enabled, the manifest may contain relative paths\n * (e.g. \"specs/066-feature/evidence/file.png\"). After merge the worktree is\n * deleted so those paths no longer resolve. The evidence files were also saved\n * to the shep evidence dir with the same filename, so we map relative paths\n * to absolute paths there.\n */\nfunction normalizeEvidencePaths(\n evidence: MergeReviewEvidence[],\n evidenceDir: string\n): MergeReviewEvidence[] {\n return evidence.map((e) => {\n if (e.relativePath.startsWith('/')) {\n // Already absolute — check if the file exists; if not, try the evidence dir\n if (existsSync(e.relativePath)) return e;\n const fallback = join(evidenceDir, basename(e.relativePath)).replace(/\\\\/g, '/');\n if (existsSync(fallback)) return { ...e, relativePath: fallback };\n return e;\n }\n // Relative path — resolve to evidence dir using the filename\n const absolutePath = join(evidenceDir, basename(e.relativePath)).replace(/\\\\/g, '/');\n return { ...e, relativePath: absolutePath };\n });\n}\n\nexport async function getMergeReviewData(featureId: string): Promise<GetMergeReviewDataResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { error: 'Feature not found' };\n }\n\n const { workflow } = getSettings();\n\n const pr = feature.pr\n ? {\n url: feature.pr.url,\n number: feature.pr.number,\n status: feature.pr.status,\n commitHash: feature.pr.commitHash,\n ciStatus: feature.pr.ciStatus,\n mergeable: feature.pr.mergeable,\n }\n : undefined;\n\n const worktreePath =\n feature.worktreePath ??\n (feature.repositoryPath && feature.branch\n ? computeWorktreePath(feature.repositoryPath, feature.branch)\n : null);\n\n // Detect the actual default branch (main, master, etc.) for diff comparison.\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffCwd = worktreePath ?? feature.repositoryPath ?? null;\n let defaultBranch = 'main';\n if (diffCwd) {\n try {\n defaultBranch = await gitPrService.getDefaultBranch(diffCwd);\n } catch {\n // Fall back to 'main' if detection fails\n }\n }\n\n const branch = feature.branch ? { source: feature.branch, target: defaultBranch } : undefined;\n\n // Load evidence manifest (best-effort).\n // Evidence is stored independently of the worktree at:\n // ~/.shep/repos/<hash>/evidence/<featureId>/manifest.json\n // We compute this path from repositoryPath so evidence is accessible\n // even after the worktree has been deleted post-merge.\n let evidence: MergeReviewEvidence[] | undefined;\n const evidenceDir = feature.repositoryPath\n ? computeEvidenceDir(feature.repositoryPath, featureId)\n : worktreePath\n ? join(dirname(dirname(worktreePath)), 'evidence', featureId).replace(/\\\\/g, '/')\n : null;\n\n if (evidenceDir) {\n try {\n const manifestPath = join(evidenceDir, 'manifest.json');\n if (existsSync(manifestPath)) {\n const raw: MergeReviewEvidence[] = JSON.parse(readFileSync(manifestPath, 'utf-8'));\n const normalized = normalizeEvidencePaths(raw, evidenceDir);\n // Deduplicate: same type + relativePath means the same evidence entry\n const seen = new Set<string>();\n evidence = normalized.filter((e) => {\n const key = `${e.type}:${e.relativePath}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n }\n } catch {\n // Evidence unavailable — not critical\n }\n }\n\n if (!worktreePath) {\n return {\n pr,\n branch,\n evidence,\n warning: pr ? undefined : 'No PR or diff data available',\n hideCiStatus: workflow.hideCiStatus,\n };\n }\n\n try {\n const [diffSummary, fileDiffs] = await Promise.all([\n gitPrService.getPrDiffSummary(worktreePath, defaultBranch),\n gitPrService.getFileDiffs(worktreePath, defaultBranch).catch(() => undefined),\n ]);\n return { pr, branch, diffSummary, fileDiffs, evidence, hideCiStatus: workflow.hideCiStatus };\n } catch {\n return {\n pr,\n branch,\n evidence,\n warning: 'Diff statistics unavailable',\n hideCiStatus: workflow.hideCiStatus,\n };\n }\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load merge review data';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IPhaseTimingRepository } from '@shepai/core/application/ports/output/agents/phase-timing-repository.interface';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport interface PhaseTimingData {\n agentRunId: string;\n phase: string;\n startedAt: string;\n completedAt?: string;\n durationMs?: number;\n waitingApprovalAt?: string;\n approvalWaitMs?: number;\n inputTokens?: number;\n outputTokens?: number;\n cacheCreationInputTokens?: number;\n cacheReadInputTokens?: number;\n costUsd?: number;\n numTurns?: number;\n durationApiMs?: number;\n exitCode?: string;\n errorMessage?: string;\n prompt?: string;\n}\n\nexport interface RejectionFeedbackData {\n iteration: number;\n message: string;\n phase?: string;\n timestamp?: string;\n attachments?: string[];\n}\n\ntype GetPhaseTimingsResult =\n | { timings: PhaseTimingData[]; rejectionFeedback: RejectionFeedbackData[] }\n | { error: string };\n\nexport async function getFeaturePhaseTimings(featureId: string): Promise<GetPhaseTimingsResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const repo = resolve<IPhaseTimingRepository>('IPhaseTimingRepository');\n const phaseTimings = await repo.findByFeatureId(featureId);\n\n const timings: PhaseTimingData[] = phaseTimings.map((t) => ({\n agentRunId: t.agentRunId,\n phase: t.phase,\n startedAt: t.startedAt,\n completedAt: t.completedAt,\n durationMs: t.durationMs != null ? Number(t.durationMs) : undefined,\n waitingApprovalAt: t.waitingApprovalAt,\n approvalWaitMs: t.approvalWaitMs != null ? Number(t.approvalWaitMs) : undefined,\n inputTokens: t.inputTokens != null ? Number(t.inputTokens) : undefined,\n outputTokens: t.outputTokens != null ? Number(t.outputTokens) : undefined,\n cacheCreationInputTokens:\n t.cacheCreationInputTokens != null ? Number(t.cacheCreationInputTokens) : undefined,\n cacheReadInputTokens:\n t.cacheReadInputTokens != null ? Number(t.cacheReadInputTokens) : undefined,\n costUsd: t.costUsd != null ? Number(t.costUsd) : undefined,\n numTurns: t.numTurns ?? undefined,\n durationApiMs: t.durationApiMs != null ? Number(t.durationApiMs) : undefined,\n exitCode: t.exitCode ?? undefined,\n errorMessage: t.errorMessage ?? undefined,\n prompt: t.prompt ?? undefined,\n }));\n\n // Read rejection feedback from spec.yaml\n const rejectionFeedback = await readRejectionFeedback(featureId);\n\n return { timings, rejectionFeedback };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load phase timings';\n return { error: message };\n }\n}\n\nasync function readRejectionFeedback(featureId: string): Promise<RejectionFeedbackData[]> {\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n if (!feature?.specPath) return [];\n\n const { readFileSync } = await import('node:fs');\n const { join } = await import('node:path');\n const yaml = (await import('js-yaml')).default;\n\n const specContent = readFileSync(join(feature.specPath, 'spec.yaml'), 'utf-8');\n const spec = yaml.load(specContent) as Record<string, unknown>;\n\n if (!Array.isArray(spec?.rejectionFeedback)) return [];\n\n return (spec.rejectionFeedback as Record<string, unknown>[]).map((entry) => ({\n iteration: Number(entry.iteration ?? 1),\n message: String(entry.message ?? ''),\n phase: entry.phase ? String(entry.phase) : undefined,\n timestamp: entry.timestamp ? String(entry.timestamp) : undefined,\n attachments: Array.isArray(entry.attachments)\n ? (entry.attachments as unknown[]).map(String)\n : undefined,\n }));\n } catch {\n return [];\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport interface AcceptanceCriterionData {\n description: string;\n verified: boolean;\n}\n\nexport interface ActionItemData {\n name: string;\n description: string;\n acceptanceCriteria: AcceptanceCriterionData[];\n}\n\nexport interface PlanTaskData {\n title: string;\n description: string;\n state: string;\n actionItems: ActionItemData[];\n}\n\nexport interface PlanData {\n state: string;\n overview: string;\n tasks: PlanTaskData[];\n}\n\ntype GetPlanResult = { plan: PlanData | undefined } | { error: string };\n\nexport async function getFeaturePlan(featureId: string): Promise<GetPlanResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const repo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await repo.findById(featureId);\n\n if (!feature) {\n return { error: 'Feature not found' };\n }\n\n if (!feature.plan) {\n return { plan: undefined };\n }\n\n const plan: PlanData = {\n state: feature.plan.state,\n overview: feature.plan.overview,\n tasks: feature.plan.tasks.map((t) => ({\n title: t.title ?? '',\n description: t.description ?? '',\n state: t.state,\n actionItems: (t.actionItems ?? []).map((ai) => ({\n name: ai.name,\n description: ai.description,\n acceptanceCriteria: (ai.acceptanceCriteria ?? []).map((ac) => ({\n description: ac.description,\n verified: ac.verified,\n })),\n })),\n })),\n };\n\n return { plan };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load feature plan';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { RebaseFeatureOnMainUseCase } from '@shepai/core/application/use-cases/features/rebase-feature-on-main.use-case';\n\nexport async function rebaseFeature(\n featureId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!featureId?.trim()) {\n return { success: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<RebaseFeatureOnMainUseCase>('RebaseFeatureOnMainUseCase');\n await useCase.execute(featureId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to rebase feature';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\nimport type { IRepositoryRepository } from '@shepai/core/application/ports/output/repositories/repository-repository.interface';\nimport type { IGitPrService } from '@shepai/core/application/ports/output/services/git-pr-service.interface';\nimport type { GetFeatureArtifactUseCase } from '@shepai/core/application/use-cases/features/get-feature-artifact.use-case';\nimport { buildFeatureNodeData } from '@/app/build-feature-node-data';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { FeatureNodeData } from '@/components/common/feature-node';\n\n/**\n * Fetches full FeatureNodeData for a given feature ID.\n * Used by the drawer for targeted data syncing without triggering\n * a full router.refresh() / server component re-render.\n *\n * CI status and mergeable status are read from the DB (already updated\n * by PrSyncWatcherService) instead of making duplicate GitHub API calls.\n */\nexport async function getFeatureDrawerData(featureId: string): Promise<FeatureNodeData | null> {\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const agentRunRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const repoRepo = resolve<IRepositoryRepository>('IRepositoryRepository');\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const getArtifact = resolve<GetFeatureArtifactUseCase>('GetFeatureArtifactUseCase');\n\n const feature = await featureRepo.findById(featureId);\n if (!feature) return null;\n\n const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;\n\n // CI status and mergeable status are read from the feature record (updated by\n // PrSyncWatcherService every 30s) — no duplicate GitHub API calls needed.\n // Only getDefaultBranch and getRemoteUrl are kept as they are local git operations.\n const [repo, baseBranch, artifact, remoteUrl] = await Promise.all([\n repoRepo.findByPath(feature.repositoryPath).catch(() => null),\n gitPrService.getDefaultBranch(feature.repositoryPath).catch(() => 'main'),\n getArtifact.execute(featureId).catch(() => null),\n gitPrService.getRemoteUrl(feature.repositoryPath).catch(() => null),\n ]);\n\n const { workflow } = getSettings();\n\n return buildFeatureNodeData(feature, run, {\n repositoryName: repo?.name,\n baseBranch,\n oneLiner: artifact?.oneLiner,\n remoteUrl: remoteUrl ?? undefined,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n hideCiStatus: workflow.hideCiStatus,\n });\n } catch {\n return null;\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetBranchSyncStatusUseCase } from '@shepai/core/application/use-cases/features/get-branch-sync-status.use-case';\n\nexport async function getBranchSyncStatus(featureId: string): Promise<{\n success: boolean;\n data?: { ahead: number; behind: number; baseBranch: string; checkedAt: string };\n error?: string;\n}> {\n if (!featureId?.trim()) {\n return { success: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetBranchSyncStatusUseCase>('GetBranchSyncStatusUseCase');\n const result = await useCase.execute(featureId);\n return {\n success: true,\n data: {\n ...result,\n checkedAt: new Date().toISOString(),\n },\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to get branch sync status';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { UpdateFeaturePinnedConfigUseCase } from '@shepai/core/application/use-cases/features/update-feature-pinned-config.use-case';\n\nexport async function updateFeaturePinnedConfig(\n featureId: string,\n agentType: string,\n modelId: string\n): Promise<{ ok: boolean; error?: string }> {\n const normalizedFeatureId = featureId.trim();\n if (!normalizedFeatureId) {\n return { ok: false, error: 'Feature id is required' };\n }\n\n const normalizedAgentType = agentType.trim();\n if (!normalizedAgentType) {\n return { ok: false, error: 'Agent type is required' };\n }\n\n const normalizedModelId = modelId.trim();\n if (!normalizedModelId) {\n return { ok: false, error: 'Model id is required' };\n }\n\n try {\n const useCase = resolve<UpdateFeaturePinnedConfigUseCase>('UpdateFeaturePinnedConfigUseCase');\n await useCase.execute({\n featureId: normalizedFeatureId,\n agentType: normalizedAgentType,\n modelId: normalizedModelId,\n });\n return { ok: true };\n } catch (error: unknown) {\n const message =\n error instanceof Error ? error.message : 'Failed to update feature pinned config';\n return { ok: false, error: message };\n }\n}\n","export {getAllAgentModels as '000210f631a169a481783b753fc8f8011e3739dafa'} from 'ACTIONS_MODULE0'\nexport {checkAllAgentsStatus as '004d43de802f3eded3f61d423d4f0aeb5e4942c679'} from 'ACTIONS_MODULE1'\nexport {updateAgentAndModel as '6064f52ade385fbcce8be48cde9418c50671688a97'} from 'ACTIONS_MODULE2'\nexport {pickFolder as '00ebfc5b8f236df56743159162d19f9853e21daf71'} from 'ACTIONS_MODULE3'\nexport {listGitHubRepositories as '4004cdb7a983c2b2e8118d003269c00b8ca8328770'} from 'ACTIONS_MODULE4'\nexport {listGitHubOrganizations as '00d7abf076433b9b7ad65f140828f000e60b100ef4'} from 'ACTIONS_MODULE5'\nexport {importGitHubRepository as '406a8f4dd973018b040e39bcf5a54ab1d632e55520'} from 'ACTIONS_MODULE6'\nexport {deployFeature as '40ef324b5c8df3d4d9f7a55860b3e1c565ff78158c'} from 'ACTIONS_MODULE7'\nexport {deployRepository as '40de173f92137f456a64448e1d39e9737079d5b8d9'} from 'ACTIONS_MODULE8'\nexport {deployApplication as '4007e6cf85c903d65686ff4b0e96b69bb3fb8b5dd6'} from 'ACTIONS_MODULE9'\nexport {stopDeployment as '40d2b3d3f6017dff4d6be8016943a0bc41ef6d2119'} from 'ACTIONS_MODULE10'\nexport {getDeploymentStatus as '40cda6828bcd7caf3c94b1d714873a18189513dfeb'} from 'ACTIONS_MODULE11'\nexport {openIde as '40170e0928a2ea6b74017ad47a4c57117dd019d7c1'} from 'ACTIONS_MODULE12'\nexport {openShell as '40b218f168a724496cc86feff20259b942c948b18a'} from 'ACTIONS_MODULE13'\nexport {openFolder as '40b2e1bc96b30cbdb0430af9925ac38dd4b704b0f3'} from 'ACTIONS_MODULE14'\nexport {syncRepository as '406d43f7d0c30b6b0b43e3aa4b78d5de248a765a10'} from 'ACTIONS_MODULE15'\nexport {getDeploymentLogs as '402ffa2dc54264716187241e9be4fa208bb543ec8c'} from 'ACTIONS_MODULE16'\nexport {createProjectAndFeature as '401fd96509b2150c7fc78d04070496418625ad3bb8'} from 'ACTIONS_MODULE17'\nexport {createApplication as '40e2b1ed706b39956f9d1c0c7231efa9d7c4c0760a'} from 'ACTIONS_MODULE18'\nexport {createProjectFolder as '40c4c9128d0fe7564c6338ab39a15ee8f37f97a5cf'} from 'ACTIONS_MODULE19'\nexport {archiveFeature as '4059c37b119db85720c100d7284a4eea13c23482e9'} from 'ACTIONS_MODULE20'\nexport {deleteFeature as '78915414551562a21cb8e714196b4daac0017b3bc3'} from 'ACTIONS_MODULE21'\nexport {resumeFeature as '40e36ae1ea45708cca02e8622499f80e8da7a24575'} from 'ACTIONS_MODULE22'\nexport {startFeature as '400cd9af42eddef7536fee72505984aa11dd304eee'} from 'ACTIONS_MODULE23'\nexport {stopFeature as '406b9612887878eda49140896d7cc50e8f71c08503'} from 'ACTIONS_MODULE24'\nexport {unarchiveFeature as '40878effbe1f457983db9b61657615651fc79b3c25'} from 'ACTIONS_MODULE25'\nexport {addRepository as '402c21b8b8b3488320789af44e231a3b03336742fb'} from 'ACTIONS_MODULE26'\nexport {deleteRepository as '60ff0df2dc4cb96435bf3a30645fc8340ee9b2fc74'} from 'ACTIONS_MODULE27'\nexport {deleteApplication as '40b8ce83c1d49acef485ad48493fec9a73813972ee'} from 'ACTIONS_MODULE28'\nexport {getFeatureMetadata as '40b52399126c0c415ed3c0114be5bb6e7181aba920'} from 'ACTIONS_MODULE29'\nexport {approveFeature as '601f5c873689908c319a68d4237d262d7d6623b62c'} from 'ACTIONS_MODULE30'\nexport {rejectFeature as '70f699870b6ae858da2423cfece98ce44ae398797f'} from 'ACTIONS_MODULE31'\nexport {getFeatureArtifact as '407c17929ff5859a0f74052b31b167afcd51923877'} from 'ACTIONS_MODULE32'\nexport {getResearchArtifact as '4039d2a9c787f999f6ca5a009cc6d3677f4fecf8ca'} from 'ACTIONS_MODULE33'\nexport {getMergeReviewData as '40a43c73a7cd509f1a4b24b523030fb41fc24907eb'} from 'ACTIONS_MODULE34'\nexport {getFeaturePhaseTimings as '40dfe41586079ffe4e7d97ea4bff4bdf2441a37bf0'} from 'ACTIONS_MODULE35'\nexport {getFeaturePlan as '409d3055c8d244277619a15822e751d0a3e02e13fb'} from 'ACTIONS_MODULE36'\nexport {rebaseFeature as '4093ba96696844586f1722f8b454d4af89b6b6b75c'} from 'ACTIONS_MODULE37'\nexport {getFeatureDrawerData as '40dc9a782ddf43b51707a08aa06cb0848838ede832'} from 'ACTIONS_MODULE38'\nexport {getBranchSyncStatus as '405c612fff63268c16f659cc62f04eae3d067d2767'} from 'ACTIONS_MODULE39'\nexport {updateFeaturePinnedConfig as '70fa5c6575dfb84e1993764a877b8c0777c62a83b6'} from 'ACTIONS_MODULE40'\n"],"names":[],"mappings":"uCACA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAwBO,SAAS,EACd,CAAgB,CAChB,CAAoB,CACpB,CAAqC,EAIrC,IAAM,EAAW,CADA,GAAK,SAAW,EAAA,cAAc,CAAC,OAAO,EAAI,GAAK,SAAW,EAAA,cAAc,CAAC,OAAA,AAAO,GACpE,GAAK,IAAM,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAI,GAAG,OAAI,EAElE,MAAO,CACL,KAAM,EAAQ,IAAI,CAClB,YAAa,EAAQ,WAAW,EAAI,EAAQ,IAAI,CAChD,UAAW,EAAQ,EAAE,CACrB,UAAW,CAAA,EAAA,EAAA,eAAA,AAAe,EAAC,EAAS,GACpC,eAAgB,EAAQ,cAAc,CACtC,OAAQ,EAAQ,MAAM,CACtB,aACE,EAAQ,YAAY,EAAI,CAAA,E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,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},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])},20107,(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(39873)},1904,(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}})},23504,8115,27900,12513,73101,54775,65324,a=>{"use strict";var b,c=a.i(20107),d=a.i(96380);let e={"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"}},f={displayName:"",description:""};function g(a){let b=e[a];if(b)return b;let c=a.includes("/")?a.split("/").pop()??a:a;return{...f,displayName:c.replace(/^claude-/i,"").replace(/^gemini-/i,"Gemini ").replace(/^gpt-/i,"GPT-").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}}var h=a.i(1904);let i={"claude-code":"Claude Code","codex-cli":"Codex CLI","copilot-cli":"Copilot CLI",cursor:"Cursor CLI","gemini-cli":"Gemini CLI",openrouter:"OpenRouter","together-ai":"Together AI",dev:"Demo"},j={"claude-code":0,"codex-cli":1,"copilot-cli":2,cursor:3,"gemini-cli":4,openrouter:5,"together-ai":6,dev:99};function k(...a){for(let b of a)if(b&&b.length>0)return b;return""}function l(a){let b=g(a.id);return{id:a.id,displayName:k(a.displayName,b.displayName,a.id),description:k(b.description,a.description),contextLength:a.contextLength,isFree:a.isFree,vendor:a.vendor}}async function m(){try{let a,b=(0,d.resolve)("IAgentExecutorFactory");try{let b=(0,d.resolve)("LoadSettingsUseCase");a=(await b.execute()).agent}catch{a=void 0}let c=b.getSupportedAgents();return(await Promise.all(c.map(async c=>{let d=a&&c===a.type?a:void 0,e=await b.listAvailableModels(c,d);return{agentType:c,label:i[c]??c,models:e.map(l)}}))).map(a=>"dev"===a.agentType&&0===a.models.length?{...a,models:[{id:"gpt-8",...g("gpt-8")},{id:"opus-7",...g("opus-7")}]}:a).filter(a=>a.models.length>0).sort((a,b)=>(j[a.agentType]??50)-(j[b.agentType]??50))}catch{return[]}}(0,h.ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"005c8f7974a1e1332ccaf1a75ffc775c759bbe6ef6",null),a.s(["getAllAgentModels",()=>m],23504);let n={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli","copilot-cli":"copilot-cli","codex-cli":"codex-cli"};async function o(){try{let a=(0,d.resolve)("ListToolsUseCase"),b=await a.execute(),c={};for(let[a,d]of Object.entries(n)){let e=b.find(a=>a.id===d);c[a]=e?.status.status==="available"}return c.dev=!0,c}catch{return{}}}(0,h.ensureServerEntryExports)([o]),(0,c.registerServerReference)(o,"00db54cb07e16d3bce02b0ae6b0bf7f4a87d3a0d36",null),a.s(["checkAllAgentsStatus",()=>o],8115);var p=a.i(33244);async function q(a,b){if(!a.trim())return{ok:!1,error:"agent type is required"};try{let c=(0,d.resolve)("CompleteWebOnboardingUseCase"),e=await c.execute({agentType:a.trim(),model:b});return(0,p.resetSettings)(),(0,p.initializeSettings)(e),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update agent and model"}}}(0,h.ensureServerEntryExports)([q]),(0,c.registerServerReference)(q,"602d47346bf416279937e58a8da1bd2f5190a7bc16",null),a.s(["updateAgentAndModel",()=>q],27900);var r=a.i(74533);let s={platform:process.platform,exec:(a,b)=>(0,r.execSync)(a,b)},t={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 u{deps;constructor(a={}){this.deps={...s,...a}}getCommand(){return t[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 v(){let a=new u;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,h.ensureServerEntryExports)([v]),(0,c.registerServerReference)(v,"004db1988c534ce1b59d5cf3ab2e2cdeb8d81a76f6",null),a.s(["pickFolder",()=>v],12513);class w extends Error{constructor(a,b){super(a),this.name="GitHubAuthError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class x extends Error{constructor(a,b){super(a),this.name="GitHubCloneError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class y extends Error{constructor(a,b){super(a),this.name="GitHubUrlParseError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}async function z(a){try{let b=(0,d.resolve)("ListGitHubRepositoriesUseCase");return{repos:await b.execute(a)}}catch(a){if(a instanceof w)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};return{error:a instanceof Error?a.message:"Failed to list repositories"}}}async function A(){try{let a=(0,d.resolve)("ListGitHubOrganizationsUseCase");return{orgs:await a.execute()}}catch(a){if(a instanceof w)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};return{error:a instanceof Error?a.message:"Failed to list organizations"}}}async function B(a){let{url:b,dest:c}=a;if(!b?.trim())return{error:"GitHub URL is required"};try{let a=(0,d.resolve)("ImportGitHubRepositoryUseCase"),e=await a.execute({url:b,dest:c});return{repository:e,forked:!0===e.isFork}}catch(a){if(a instanceof w)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};if(a instanceof y)return{error:`Invalid GitHub URL: ${a.message}`};if(a instanceof x)return{error:`Clone failed: ${a.message}`};return{error:a instanceof Error?a.message:"Failed to import repository"}}}(b={}).BranchProtection="BranchProtection",b.Codeowners="Codeowners",b.WorkflowPermissions="WorkflowPermissions",(0,h.ensureServerEntryExports)([z]),(0,c.registerServerReference)(z,"40e67621a4b03951ac4595cf608b8d72e4c3c9c694",null),a.s(["listGitHubRepositories",()=>z],73101),(0,h.ensureServerEntryExports)([A]),(0,c.registerServerReference)(A,"00e9dfbd6e5b8c8316129cccf71f306dc290962023",null),a.s(["listGitHubOrganizations",()=>A],54775),(0,h.ensureServerEntryExports)([B]),(0,c.registerServerReference)(B,"40517bd2ea0c40e78818124ff2130655a9f052592a",null),a.s(["importGitHubRepository",()=>B],65324)},70613,a=>{"use strict";var b=a.i(23504),c=a.i(8115),d=a.i(27900),e=a.i(12513),f=a.i(73101),g=a.i(54775),h=a.i(65324);a.s([],24822),a.i(24822),a.s(["004db1988c534ce1b59d5cf3ab2e2cdeb8d81a76f6",()=>e.pickFolder,"005c8f7974a1e1332ccaf1a75ffc775c759bbe6ef6",()=>b.getAllAgentModels,"00db54cb07e16d3bce02b0ae6b0bf7f4a87d3a0d36",()=>c.checkAllAgentsStatus,"00e9dfbd6e5b8c8316129cccf71f306dc290962023",()=>g.listGitHubOrganizations,"40517bd2ea0c40e78818124ff2130655a9f052592a",()=>h.importGitHubRepository,"40e67621a4b03951ac4595cf608b8d72e4c3c9c694",()=>f.listGitHubRepositories,"602d47346bf416279937e58a8da1bd2f5190a7bc16",()=>d.updateAgentAndModel],70613)}];
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}})},23504,8115,27900,12513,73101,54775,65324,a=>{"use strict";var b=a.i(20107),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];if(b)return b;let c=a.includes("/")?a.split("/").pop()??a:a;return{...e,displayName:c.replace(/^claude-/i,"").replace(/^gemini-/i,"Gemini ").replace(/^gpt-/i,"GPT-").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}}var g=a.i(1904);let h={"claude-code":"Claude Code","codex-cli":"Codex CLI","copilot-cli":"Copilot CLI",cursor:"Cursor CLI","gemini-cli":"Gemini CLI",openrouter:"OpenRouter","together-ai":"Together AI",dev:"Demo"},i={"claude-code":0,"codex-cli":1,"copilot-cli":2,cursor:3,"gemini-cli":4,openrouter:5,"together-ai":6,dev:99};function j(...a){for(let b of a)if(b&&b.length>0)return b;return""}function k(a){let b=f(a.id);return{id:a.id,displayName:j(a.displayName,b.displayName,a.id),description:j(b.description,a.description),contextLength:a.contextLength,isFree:a.isFree,vendor:a.vendor}}async function l(){try{let a,b=(0,c.resolve)("IAgentExecutorFactory");try{let b=(0,c.resolve)("LoadSettingsUseCase");a=(await b.execute()).agent}catch{a=void 0}let d=b.getSupportedAgents();return(await Promise.all(d.map(async c=>{let d=a&&c===a.type?a:void 0,e=await b.listAvailableModels(c,d);return{agentType:c,label:h[c]??c,models:e.map(k)}}))).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)([l]),(0,b.registerServerReference)(l,"000210f631a169a481783b753fc8f8011e3739dafa",null),a.s(["getAllAgentModels",()=>l],23504);let m={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli","copilot-cli":"copilot-cli","codex-cli":"codex-cli"};async function n(){try{let a=(0,c.resolve)("ListToolsUseCase"),b=await a.execute(),d={};for(let[a,c]of Object.entries(m)){let e=b.find(a=>a.id===c);d[a]=e?.status.status==="available"}return d.dev=!0,d}catch{return{}}}(0,g.ensureServerEntryExports)([n]),(0,b.registerServerReference)(n,"004d43de802f3eded3f61d423d4f0aeb5e4942c679",null),a.s(["checkAllAgentsStatus",()=>n],8115);var o=a.i(33244);async function p(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,o.resetSettings)(),(0,o.initializeSettings)(e),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update agent and model"}}}(0,g.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"6064f52ade385fbcce8be48cde9418c50671688a97",null),a.s(["updateAgentAndModel",()=>p],27900);var q=a.i(74533);let r={platform:process.platform,exec:(a,b)=>(0,q.execSync)(a,b)},s={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 t{deps;constructor(a={}){this.deps={...r,...a}}getCommand(){return s[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 u(){let a=new t;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,g.ensureServerEntryExports)([u]),(0,b.registerServerReference)(u,"00ebfc5b8f236df56743159162d19f9853e21daf71",null),a.s(["pickFolder",()=>u],12513);class v extends Error{constructor(a,b){super(a),this.name="GitHubAuthError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class w extends Error{constructor(a,b){super(a),this.name="GitHubCloneError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class x extends Error{constructor(a,b){super(a),this.name="GitHubUrlParseError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}async function y(a){try{let b=(0,c.resolve)("ListGitHubRepositoriesUseCase");return{repos:await b.execute(a)}}catch(a){if(a instanceof v)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};return{error:a instanceof Error?a.message:"Failed to list repositories"}}}async function z(){try{let a=(0,c.resolve)("ListGitHubOrganizationsUseCase");return{orgs:await a.execute()}}catch(a){if(a instanceof v)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};return{error:a instanceof Error?a.message:"Failed to list organizations"}}}async function A(a){let{url:b,dest:d}=a;if(!b?.trim())return{error:"GitHub URL is required"};try{let a=(0,c.resolve)("ImportGitHubRepositoryUseCase"),e=await a.execute({url:b,dest:d});return{repository:e,forked:!0===e.isFork}}catch(a){if(a instanceof v)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};if(a instanceof x)return{error:`Invalid GitHub URL: ${a.message}`};if(a instanceof w)return{error:`Clone failed: ${a.message}`};return{error:a instanceof Error?a.message:"Failed to import repository"}}}(0,g.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"4004cdb7a983c2b2e8118d003269c00b8ca8328770",null),a.s(["listGitHubRepositories",()=>y],73101),(0,g.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"00d7abf076433b9b7ad65f140828f000e60b100ef4",null),a.s(["listGitHubOrganizations",()=>z],54775),(0,g.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"406a8f4dd973018b040e39bcf5a54ab1d632e55520",null),a.s(["importGitHubRepository",()=>A],65324)},70613,a=>{"use strict";var b=a.i(23504),c=a.i(8115),d=a.i(27900),e=a.i(12513),f=a.i(73101),g=a.i(54775),h=a.i(65324);a.s([],24822),a.i(24822),a.s(["000210f631a169a481783b753fc8f8011e3739dafa",()=>b.getAllAgentModels,"004d43de802f3eded3f61d423d4f0aeb5e4942c679",()=>c.checkAllAgentsStatus,"00d7abf076433b9b7ad65f140828f000e60b100ef4",()=>g.listGitHubOrganizations,"00ebfc5b8f236df56743159162d19f9853e21daf71",()=>e.pickFolder,"4004cdb7a983c2b2e8118d003269c00b8ca8328770",()=>f.listGitHubRepositories,"406a8f4dd973018b040e39bcf5a54ab1d632e55520",()=>h.importGitHubRepository,"6064f52ade385fbcce8be48cde9418c50671688a97",()=>d.updateAgentAndModel],70613)}];
3
3
 
4
4
  //# sourceMappingURL=%5Broot-of-the-server%5D__4101a4a8._.js.map