@shepai/cli 1.72.0 → 1.72.1

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 (174) hide show
  1. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  2. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +5 -0
  3. package/dist/tsconfig.build.tsbuildinfo +1 -1
  4. package/package.json +1 -1
  5. package/web/.next/BUILD_ID +1 -1
  6. package/web/.next/build-manifest.json +2 -2
  7. package/web/.next/cache/.previewinfo +1 -1
  8. package/web/.next/cache/.rscinfo +1 -1
  9. package/web/.next/cache/.tsbuildinfo +1 -1
  10. package/web/.next/cache/config.json +3 -3
  11. package/web/.next/fallback-build-manifest.json +2 -2
  12. package/web/.next/prerender-manifest.json +3 -3
  13. package/web/.next/required-server-files.js +1 -1
  14. package/web/.next/required-server-files.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +14 -14
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +17 -17
  19. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  22. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +14 -14
  25. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +17 -17
  28. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -12
  31. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  34. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/_global-error.html +2 -2
  37. package/web/.next/server/app/_global-error.rsc +1 -1
  38. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  39. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  40. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  41. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  42. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  44. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  46. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  48. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  50. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  52. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  53. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js +1 -1
  54. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js.map +1 -1
  55. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js +1 -1
  56. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js.map +1 -1
  57. package/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js +2 -2
  58. package/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js.map +1 -1
  59. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  60. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
  61. package/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  62. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  63. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  64. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +1 -1
  65. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  66. package/web/.next/server/chunks/ssr/[root-of-the-server]__6db85a66._.js +2 -2
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  68. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  69. package/web/.next/server/chunks/ssr/[root-of-the-server]__8fcb9132._.js +2 -2
  70. package/web/.next/server/chunks/ssr/_00e6c698._.js +1 -1
  71. package/web/.next/server/chunks/ssr/_00e6c698._.js.map +1 -1
  72. package/web/.next/server/chunks/ssr/_37259405._.js +1 -1
  73. package/web/.next/server/chunks/ssr/_37259405._.js.map +1 -1
  74. package/web/.next/server/chunks/ssr/{_326c615c._.js → _48935b11._.js} +2 -2
  75. package/web/.next/server/chunks/ssr/{_326c615c._.js.map → _48935b11._.js.map} +1 -1
  76. package/web/.next/server/chunks/ssr/_85d0351b._.js +1 -1
  77. package/web/.next/server/chunks/ssr/_85d0351b._.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/_fc3a6895._.js +1 -1
  79. package/web/.next/server/chunks/ssr/_fc3a6895._.js.map +1 -1
  80. package/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js +2 -2
  81. package/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js.map +1 -1
  82. package/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js +1 -1
  83. package/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js.map +1 -1
  84. package/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js +1 -1
  85. package/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js +1 -1
  87. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js +2 -2
  89. package/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js.map +1 -1
  90. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  91. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  92. package/web/.next/server/pages/500.html +2 -2
  93. package/web/.next/server/server-reference-manifest.js +1 -1
  94. package/web/.next/server/server-reference-manifest.json +20 -20
  95. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  96. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
  97. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  98. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  99. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +14 -14
  100. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  101. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  102. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +17 -17
  103. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  104. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  105. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  106. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  107. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  108. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +14 -14
  109. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  110. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  111. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +17 -17
  112. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  113. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  114. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -12
  115. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  116. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  117. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  118. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  119. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  120. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  121. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  122. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  123. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  124. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  125. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  126. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  127. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  128. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  129. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  130. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  131. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  132. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  133. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  134. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  135. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  136. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js +1 -1
  137. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js +1 -1
  138. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js +2 -2
  139. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  140. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  141. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  142. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +1 -1
  143. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6db85a66._.js +2 -2
  144. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  145. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__8fcb9132._.js +2 -2
  146. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_00e6c698._.js +1 -1
  147. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_37259405._.js +1 -1
  148. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{_326c615c._.js → _48935b11._.js} +2 -2
  149. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85d0351b._.js +1 -1
  150. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_fc3a6895._.js +1 -1
  151. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js +2 -2
  152. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js +1 -1
  153. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js +1 -1
  154. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js +1 -1
  155. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js +2 -2
  156. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  157. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  158. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  159. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +20 -20
  160. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +4 -0
  161. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  162. package/web/.next/static/chunks/{782a2a325d33916e.js → 03d33ef0225f01ed.js} +1 -1
  163. package/web/.next/static/chunks/{d063d1ee549e36c1.js → 34abde74bbbcf2a7.js} +1 -1
  164. package/web/.next/static/chunks/{eab4c5668703be61.js → 40056cc7a83dbc74.js} +1 -1
  165. package/web/.next/static/chunks/{3b841f29db9a3da9.js → 826098f4effdc320.js} +1 -1
  166. package/web/.next/static/chunks/{c1e2dd0ea2411684.js → 858e98ff8bec6b19.js} +1 -1
  167. package/web/.next/static/chunks/{4ad5002ab597037c.js → af0b5ed9f7772209.js} +1 -1
  168. package/web/.next/static/chunks/{d58c232421d2eb76.js → c49356a5aa45e9f6.js} +1 -1
  169. package/web/.next/static/chunks/{f76236b7baf672dc.js → f05904554c809e13.js} +1 -1
  170. package/web/.next/trace +1 -1
  171. package/web/.next/trace-build +1 -1
  172. /package/web/.next/static/{cheZlPwpJASMO-UbgLmQk → wZm2E7aeoaHgqBeiAY-EL}/_buildManifest.js +0 -0
  173. /package/web/.next/static/{cheZlPwpJASMO-UbgLmQk → wZm2E7aeoaHgqBeiAY-EL}/_clientMiddlewareManifest.json +0 -0
  174. /package/web/.next/static/{cheZlPwpJASMO-UbgLmQk → wZm2E7aeoaHgqBeiAY-EL}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/%40swc%2Bhelpers%400.5.15/node_modules/%40swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/is-thenable.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/components/use-action-queue.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/app-call-server.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/app-find-source-map-url.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/segment.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/use-merged-ref.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/deployment-id.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/circle-check.ts","../../../../../../../src/presentation/web/hooks/agent-events-provider.tsx","../../../../../../../src/presentation/web/hooks/use-agent-events.ts","../../../../../../../src/presentation/web/app/actions/data%3A505cfe%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/add-repository-node/add-repository-node.tsx","../../../../../../../src/presentation/web/components/common/add-repository-node/add-repository-button.tsx","../../../../../../../src/presentation/web/hooks/sidebar-features-context.tsx","../../../../../../../src/presentation/web/components/common/add-repository-node/pick-folder.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-plus.ts"],"sourcesContent":["\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm9 12 2 2 4-4', key: 'dzmm74' }],\n];\n\n/**\n * @component @name CircleCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtOSAxMiAyIDIgNC00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleCheck = createLucideIcon('circle-check', __iconNode);\n\nexport default CircleCheck;\n","'use client';\n\nimport { createContext, useContext, type ReactNode } from 'react';\nimport {\n useAgentEvents,\n type UseAgentEventsOptions,\n type UseAgentEventsResult,\n} from './use-agent-events';\n\nconst AgentEventsContext = createContext<UseAgentEventsResult | null>(null);\n\ninterface AgentEventsProviderProps extends UseAgentEventsOptions {\n children: ReactNode;\n}\n\n/**\n * Single SSE connection for agent events shared across all consumers.\n * Wrap the app once; use `useAgentEventsContext()` to read.\n */\nexport function AgentEventsProvider({ children, runId }: AgentEventsProviderProps) {\n const value = useAgentEvents({ runId });\n\n return <AgentEventsContext.Provider value={value}>{children}</AgentEventsContext.Provider>;\n}\n\nexport function useAgentEventsContext(): UseAgentEventsResult {\n const ctx = useContext(AgentEventsContext);\n if (!ctx) {\n throw new Error('useAgentEventsContext must be used within an <AgentEventsProvider>');\n }\n return ctx;\n}\n","'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\n\nexport type ConnectionStatus = 'connected' | 'connecting' | 'disconnected';\n\nexport interface UseAgentEventsOptions {\n runId?: string;\n}\n\nexport interface UseAgentEventsResult {\n events: NotificationEvent[];\n lastEvent: NotificationEvent | null;\n connectionStatus: ConnectionStatus;\n}\n\nconst SW_PATH = '/agent-events-sw.js';\n\n/**\n * Hook that receives real-time agent notification events via a Service Worker.\n *\n * The SW maintains a single SSE connection to /api/agent-events and\n * broadcasts events to all open tabs. Falls back to direct EventSource\n * when Service Workers are unavailable.\n */\nexport function useAgentEvents(options?: UseAgentEventsOptions): UseAgentEventsResult {\n const [events, setEvents] = useState<NotificationEvent[]>([]);\n const [lastEvent, setLastEvent] = useState<NotificationEvent | null>(null);\n const [connectionStatus, setConnectionStatus] = useState<ConnectionStatus>('disconnected');\n\n const runId = options?.runId;\n const swRef = useRef<ServiceWorker | null>(null);\n\n const onMessage = useCallback((event: MessageEvent) => {\n const msg = event.data;\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'notification') {\n const parsed = msg.data as NotificationEvent;\n setEvents((prev) => [...prev, parsed]);\n setLastEvent(parsed);\n } else if (msg.type === 'status') {\n setConnectionStatus(msg.status as ConnectionStatus);\n }\n }, []);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n // ?sse=direct bypasses the Service Worker for debugging\n const bypassSW =\n typeof location !== 'undefined' && new URLSearchParams(location.search).has('sse');\n\n // Fallback: direct EventSource when SW not supported or bypassed\n if (!navigator.serviceWorker || bypassSW) {\n return connectDirectEventSource(runId, setEvents, setLastEvent, setConnectionStatus);\n }\n\n let cancelled = false;\n const fallbackCleanupRef = { current: undefined as (() => void) | undefined };\n\n function subscribeToWorker(worker: ServiceWorker) {\n if (cancelled) return;\n swRef.current = worker;\n worker.postMessage({ type: 'subscribe', runId });\n setConnectionStatus('connecting');\n }\n\n // Listen for messages from whatever SW controls this page\n navigator.serviceWorker.addEventListener('message', onMessage);\n\n // Re-subscribe when SW controller changes (e.g., after SW update via skipWaiting)\n function handleControllerChange() {\n if (cancelled) return;\n const newController = navigator.serviceWorker.controller;\n if (newController) {\n swRef.current = newController;\n newController.postMessage({ type: 'subscribe', runId });\n setConnectionStatus('connecting');\n }\n }\n navigator.serviceWorker.addEventListener('controllerchange', handleControllerChange);\n\n navigator.serviceWorker\n .register(SW_PATH, { scope: '/' })\n .then((registration) => {\n if (cancelled) return;\n\n // Use the active worker, or wait for it to activate\n const sw = registration.active ?? registration.installing ?? registration.waiting;\n if (!sw) {\n // No worker at all — fall back to direct EventSource\n fallbackCleanupRef.current = connectDirectEventSource(\n runId,\n setEvents,\n setLastEvent,\n setConnectionStatus\n );\n return;\n }\n\n if (sw.state === 'activated') {\n subscribeToWorker(sw);\n } else {\n sw.addEventListener('statechange', () => {\n if (sw.state === 'activated') subscribeToWorker(sw);\n });\n }\n })\n .catch(() => {\n // SW registration failed — fall back to direct EventSource\n if (!cancelled) {\n fallbackCleanupRef.current = connectDirectEventSource(\n runId,\n setEvents,\n setLastEvent,\n setConnectionStatus\n );\n }\n });\n\n return () => {\n cancelled = true;\n navigator.serviceWorker.removeEventListener('message', onMessage);\n navigator.serviceWorker.removeEventListener('controllerchange', handleControllerChange);\n swRef.current?.postMessage({ type: 'unsubscribe' });\n swRef.current = null;\n fallbackCleanupRef.current?.();\n };\n }, [runId, onMessage]);\n\n return { events, lastEvent, connectionStatus };\n}\n\n// --- EventSource fallback (identical to the previous implementation) ---\n\nconst BASE_BACKOFF_MS = 1000;\nconst MAX_BACKOFF_MS = 30_000;\nconst STABLE_CONNECTION_MS = 5_000;\n\nfunction connectDirectEventSource(\n runId: string | undefined,\n setEvents: React.Dispatch<React.SetStateAction<NotificationEvent[]>>,\n setLastEvent: React.Dispatch<React.SetStateAction<NotificationEvent | null>>,\n setConnectionStatus: React.Dispatch<React.SetStateAction<ConnectionStatus>>\n): () => void {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (typeof EventSource === 'undefined') return () => {};\n\n let es: EventSource | null = null;\n let stopped = false;\n let backoff = BASE_BACKOFF_MS;\n let reconnectTimer: ReturnType<typeof setTimeout> | null = null;\n let stableTimer: ReturnType<typeof setTimeout> | null = null;\n\n function connect() {\n if (stopped) return;\n\n const url = runId\n ? `/api/agent-events?runId=${encodeURIComponent(runId)}`\n : '/api/agent-events';\n\n es = new EventSource(url);\n setConnectionStatus('connecting');\n\n es.onopen = () => {\n setConnectionStatus('connected');\n stableTimer = setTimeout(() => {\n stableTimer = null;\n backoff = BASE_BACKOFF_MS;\n }, STABLE_CONNECTION_MS);\n };\n\n es.onerror = () => {\n es?.close();\n es = null;\n setConnectionStatus('disconnected');\n\n if (stableTimer !== null) {\n clearTimeout(stableTimer);\n stableTimer = null;\n }\n\n const delay = backoff;\n backoff = Math.min(delay * 2, MAX_BACKOFF_MS);\n\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null;\n connect();\n }, delay);\n };\n\n es.addEventListener('notification', ((event: MessageEvent) => {\n const parsed: NotificationEvent = JSON.parse(event.data);\n setEvents((prev) => [...prev, parsed]);\n setLastEvent(parsed);\n }) as EventListener);\n }\n\n connect();\n\n return () => {\n stopped = true;\n if (reconnectTimer !== null) {\n clearTimeout(reconnectTimer);\n reconnectTimer = null;\n }\n if (stableTimer !== null) {\n clearTimeout(stableTimer);\n stableTimer = null;\n }\n if (es) {\n es.close();\n es = null;\n }\n };\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"00d1b8aeaa3c69905aaab9423f6e93e9c24badc198\":\"pickFolder\"},\"src/presentation/web/app/actions/pick-folder.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"00d1b8aeaa3c69905aaab9423f6e93e9c24badc198\",callServer,void 0,findSourceMapURL,\"pickFolder\");export{$$RSC_SERVER_ACTION_0 as pickFolder};","'use client';\n\nimport { useState } from 'react';\nimport { Plus, Loader2 } from 'lucide-react';\nimport type { AddRepositoryNodeData } from './add-repository-node-config';\nimport { pickFolder } from './pick-folder';\n\nexport function AddRepositoryNode({\n data,\n}: {\n data: AddRepositoryNodeData;\n [key: string]: unknown;\n}) {\n const [loading, setLoading] = useState(false);\n\n async function handleClick() {\n if (loading) return;\n setLoading(true);\n try {\n const path = await pickFolder();\n if (path) {\n data.onSelect?.(path);\n }\n } finally {\n setLoading(false);\n }\n }\n\n return (\n <div className=\"group\">\n <button\n type=\"button\"\n data-testid=\"add-repository-node-card\"\n onClick={handleClick}\n disabled={loading}\n className=\"nodrag border-muted-foreground/30 flex w-56 cursor-pointer items-center gap-3 rounded-full border-2 border-dashed px-4 py-3 transition-colors hover:border-blue-500 hover:text-blue-500 disabled:cursor-wait disabled:opacity-60\"\n >\n {loading ? (\n <Loader2 className=\"h-5 w-5 shrink-0 animate-spin\" />\n ) : (\n <Plus className=\"h-5 w-5 shrink-0\" />\n )}\n <span data-testid=\"add-repository-node-label\" className=\"text-sm font-medium\">\n {loading ? 'Opening...' : 'Add Repository'}\n </span>\n </button>\n </div>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport { FolderPlus, Loader2 } from 'lucide-react';\nimport { Button } from '@/components/ui/button';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { pickFolder } from './pick-folder';\n\ninterface AddRepositoryButtonProps {\n onSelect?: (path: string) => void;\n}\n\nexport function AddRepositoryButton({ onSelect }: AddRepositoryButtonProps) {\n const [loading, setLoading] = useState(false);\n\n async function handleClick() {\n if (loading) return;\n setLoading(true);\n try {\n const path = await pickFolder();\n if (path) {\n onSelect?.(path);\n }\n } finally {\n setLoading(false);\n }\n }\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Add Repository\"\n data-testid=\"add-repository-button\"\n onClick={handleClick}\n disabled={loading}\n >\n {loading ? (\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n ) : (\n <FolderPlus className=\"h-5 w-5\" />\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>Add Repository</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n","'use client';\n\nimport { createContext, useContext, useState, useMemo, type ReactNode } from 'react';\nimport type { FeatureNodeState } from '@/components/common/feature-node/feature-node-state-config';\nimport type { FeatureStatus } from '@/components/common/feature-status-config';\n\n// Re-export the FeatureItem type so consumers can import from one place.\n// This will gain `featureId` in a later phase.\nexport interface SidebarFeatureItem {\n name: string;\n status: FeatureStatus;\n featureId: string;\n startedAt?: number;\n duration?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Pure mapping: FeatureNodeState (6-state) → FeatureStatus (3-state) | null\n// ---------------------------------------------------------------------------\n\nconst stateMapping: Record<FeatureNodeState, FeatureStatus | null> = {\n 'action-required': 'action-needed',\n running: 'in-progress',\n done: 'done',\n blocked: 'in-progress',\n error: 'in-progress',\n creating: null,\n};\n\n/**\n * Maps a canvas FeatureNodeState to the sidebar's 3-state FeatureStatus.\n * Returns `null` for `creating` (optimistic UI) — these should be excluded from the sidebar.\n */\nexport function mapNodeStateToSidebarStatus(state: FeatureNodeState): FeatureStatus | null {\n return stateMapping[state];\n}\n\n// ---------------------------------------------------------------------------\n// SidebarFeaturesContext\n// ---------------------------------------------------------------------------\n\ninterface SidebarFeaturesContextValue {\n features: SidebarFeatureItem[];\n setFeatures: (features: SidebarFeatureItem[]) => void;\n}\n\nconst SidebarFeaturesContext = createContext<SidebarFeaturesContextValue | null>(null);\n\ninterface SidebarFeaturesProviderProps {\n children: ReactNode;\n}\n\nexport function SidebarFeaturesProvider({ children }: SidebarFeaturesProviderProps) {\n const [features, setFeatures] = useState<SidebarFeatureItem[]>([]);\n\n const value = useMemo<SidebarFeaturesContextValue>(() => ({ features, setFeatures }), [features]);\n\n return (\n <SidebarFeaturesContext.Provider value={value}>{children}</SidebarFeaturesContext.Provider>\n );\n}\n\nexport function useSidebarFeaturesContext(): SidebarFeaturesContextValue {\n const ctx = useContext(SidebarFeaturesContext);\n if (!ctx) {\n throw new Error('useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>');\n }\n return ctx;\n}\n","import { pickFolder as pickFolderAction } from '@/app/actions/pick-folder';\n\n/**\n * Opens a native OS folder picker dialog via server action.\n * Returns the selected absolute path, or null if the user cancelled.\n */\nexport async function pickFolder(): Promise<string | null> {\n const result = await pickFolderAction();\n\n if (result.error) {\n throw new Error(result.error);\n }\n\n return result.path;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 10v6', key: '1bos4e' }],\n ['path', { d: 'M9 13h6', key: '1uhe8q' }],\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n];\n\n/**\n * @component @name FolderPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTB2NiIgLz4KICA8cGF0aCBkPSJNOSAxM2g2IiAvPgogIDxwYXRoIGQ9Ik0yMCAyMGEyIDIgMCAwIDAgMi0yVjhhMiAyIDAgMCAwLTItMmgtNy45YTIgMiAwIDAgMS0xLjY5LS45TDkuNiAzLjlBMiAyIDAgMCAwIDcuOTMgM0g0YTIgMiAwIDAgMC0yIDJ2MTNhMiAyIDAgMCAwIDIgMloiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folder-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderPlus = createLucideIcon('folder-plus', __iconNode);\n\nexport default FolderPlus;\n"],"names":["ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","process","env","NODE_ENV","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","require","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isGroupSegment","isParallelRouteSegment","segment","Array","isArray","endsWith","isPageSegment","stringifiedQuery","JSON","stringify","segments","parallelRouteKey","length","rawSegment","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","warnOnce","_","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId"],"mappings":"4CAEA,SAAS,EAAyB,CAAW,EACzC,GAAuB,AAAnB,mBAAO,QAAwB,OAAO,KAE1C,IAAI,EAAoB,IAAI,QACxB,EAAmB,IAAI,QAE3B,MAAO,CAAC,EAA2B,SAAS,CAAW,EACnD,OAAO,EAAc,EAAmB,EAC5C,CAAC,CAAE,EACP,CA0BA,EAAQ,CAAC,CAzBT,EAyBY,OAzBH,AAA0B,CAAG,CAAE,CAAW,EAC/C,GAAI,CAAC,GAAe,GAAO,EAAI,UAAU,CAAE,OAAO,EAClD,GAAY,OAAR,GAA+B,UAAf,OAAO,GAAmC,YAAf,OAAO,EAAoB,MAAO,CAAE,QAAS,CAAI,EAEhG,IAAI,EAAQ,EAAyB,GAErC,GAAI,GAAS,EAAM,GAAG,CAAC,GAAM,OAAO,EAAM,GAAG,CAAC,GAE9C,IAAI,EAAS,CAAE,UAAW,IAAK,EAC3B,EAAwB,OAAO,cAAc,EAAI,OAAO,wBAAwB,CAEpF,IAAK,IAAI,KAAO,EACZ,EADiB,CACL,YAAR,GAAqB,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GAAM,CACrE,IAAI,EAAO,EAAwB,OAAO,wBAAwB,CAAC,EAAK,GAAO,KAC3E,IAAS,EAAK,EAAN,CAAS,EAAI,EAAK,GAAA,AAAG,EAAG,OAAO,cAAc,CAAC,EAAQ,EAAK,GAClE,CAAM,CAAC,EAAI,CAAG,CAAG,CAAC,EAAI,AAC/B,CAOJ,OAJA,EAAO,OAAO,CAAG,EAEb,GAAO,EAAM,G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swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/is-thenable.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/components/use-action-queue.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/app-call-server.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/app-find-source-map-url.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/segment.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/use-merged-ref.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/deployment-id.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/circle-check.ts","../../../../../../../src/presentation/web/hooks/agent-events-provider.tsx","../../../../../../../src/presentation/web/hooks/use-agent-events.ts","../../../../../../../src/presentation/web/app/actions/data%3A6b0f1a%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/add-repository-node/add-repository-node.tsx","../../../../../../../src/presentation/web/components/common/add-repository-node/add-repository-button.tsx","../../../../../../../src/presentation/web/hooks/sidebar-features-context.tsx","../../../../../../../src/presentation/web/components/common/add-repository-node/pick-folder.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-plus.ts"],"sourcesContent":["\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm9 12 2 2 4-4', key: 'dzmm74' }],\n];\n\n/**\n * @component @name CircleCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtOSAxMiAyIDIgNC00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleCheck = createLucideIcon('circle-check', __iconNode);\n\nexport default CircleCheck;\n","'use client';\n\nimport { createContext, useContext, type ReactNode } from 'react';\nimport {\n useAgentEvents,\n type UseAgentEventsOptions,\n type UseAgentEventsResult,\n} from './use-agent-events';\n\nconst AgentEventsContext = createContext<UseAgentEventsResult | null>(null);\n\ninterface AgentEventsProviderProps extends UseAgentEventsOptions {\n children: ReactNode;\n}\n\n/**\n * Single SSE connection for agent events shared across all consumers.\n * Wrap the app once; use `useAgentEventsContext()` to read.\n */\nexport function AgentEventsProvider({ children, runId }: AgentEventsProviderProps) {\n const value = useAgentEvents({ runId });\n\n return <AgentEventsContext.Provider value={value}>{children}</AgentEventsContext.Provider>;\n}\n\nexport function useAgentEventsContext(): UseAgentEventsResult {\n const ctx = useContext(AgentEventsContext);\n if (!ctx) {\n throw new Error('useAgentEventsContext must be used within an <AgentEventsProvider>');\n }\n return ctx;\n}\n","'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\n\nexport type ConnectionStatus = 'connected' | 'connecting' | 'disconnected';\n\nexport interface UseAgentEventsOptions {\n runId?: string;\n}\n\nexport interface UseAgentEventsResult {\n events: NotificationEvent[];\n lastEvent: NotificationEvent | null;\n connectionStatus: ConnectionStatus;\n}\n\nconst SW_PATH = '/agent-events-sw.js';\n\n/**\n * Hook that receives real-time agent notification events via a Service Worker.\n *\n * The SW maintains a single SSE connection to /api/agent-events and\n * broadcasts events to all open tabs. Falls back to direct EventSource\n * when Service Workers are unavailable.\n */\nexport function useAgentEvents(options?: UseAgentEventsOptions): UseAgentEventsResult {\n const [events, setEvents] = useState<NotificationEvent[]>([]);\n const [lastEvent, setLastEvent] = useState<NotificationEvent | null>(null);\n const [connectionStatus, setConnectionStatus] = useState<ConnectionStatus>('disconnected');\n\n const runId = options?.runId;\n const swRef = useRef<ServiceWorker | null>(null);\n\n const onMessage = useCallback((event: MessageEvent) => {\n const msg = event.data;\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'notification') {\n const parsed = msg.data as NotificationEvent;\n setEvents((prev) => [...prev, parsed]);\n setLastEvent(parsed);\n } else if (msg.type === 'status') {\n setConnectionStatus(msg.status as ConnectionStatus);\n }\n }, []);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n // ?sse=direct bypasses the Service Worker for debugging\n const bypassSW =\n typeof location !== 'undefined' && new URLSearchParams(location.search).has('sse');\n\n // Fallback: direct EventSource when SW not supported or bypassed\n if (!navigator.serviceWorker || bypassSW) {\n return connectDirectEventSource(runId, setEvents, setLastEvent, setConnectionStatus);\n }\n\n let cancelled = false;\n const fallbackCleanupRef = { current: undefined as (() => void) | undefined };\n\n function subscribeToWorker(worker: ServiceWorker) {\n if (cancelled) return;\n swRef.current = worker;\n worker.postMessage({ type: 'subscribe', runId });\n setConnectionStatus('connecting');\n }\n\n // Listen for messages from whatever SW controls this page\n navigator.serviceWorker.addEventListener('message', onMessage);\n\n // Re-subscribe when SW controller changes (e.g., after SW update via skipWaiting)\n function handleControllerChange() {\n if (cancelled) return;\n const newController = navigator.serviceWorker.controller;\n if (newController) {\n swRef.current = newController;\n newController.postMessage({ type: 'subscribe', runId });\n setConnectionStatus('connecting');\n }\n }\n navigator.serviceWorker.addEventListener('controllerchange', handleControllerChange);\n\n navigator.serviceWorker\n .register(SW_PATH, { scope: '/' })\n .then((registration) => {\n if (cancelled) return;\n\n // Use the active worker, or wait for it to activate\n const sw = registration.active ?? registration.installing ?? registration.waiting;\n if (!sw) {\n // No worker at all — fall back to direct EventSource\n fallbackCleanupRef.current = connectDirectEventSource(\n runId,\n setEvents,\n setLastEvent,\n setConnectionStatus\n );\n return;\n }\n\n if (sw.state === 'activated') {\n subscribeToWorker(sw);\n } else {\n sw.addEventListener('statechange', () => {\n if (sw.state === 'activated') subscribeToWorker(sw);\n });\n }\n })\n .catch(() => {\n // SW registration failed — fall back to direct EventSource\n if (!cancelled) {\n fallbackCleanupRef.current = connectDirectEventSource(\n runId,\n setEvents,\n setLastEvent,\n setConnectionStatus\n );\n }\n });\n\n return () => {\n cancelled = true;\n navigator.serviceWorker.removeEventListener('message', onMessage);\n navigator.serviceWorker.removeEventListener('controllerchange', handleControllerChange);\n swRef.current?.postMessage({ type: 'unsubscribe' });\n swRef.current = null;\n fallbackCleanupRef.current?.();\n };\n }, [runId, onMessage]);\n\n return { events, lastEvent, connectionStatus };\n}\n\n// --- EventSource fallback (identical to the previous implementation) ---\n\nconst BASE_BACKOFF_MS = 1000;\nconst MAX_BACKOFF_MS = 30_000;\nconst STABLE_CONNECTION_MS = 5_000;\n\nfunction connectDirectEventSource(\n runId: string | undefined,\n setEvents: React.Dispatch<React.SetStateAction<NotificationEvent[]>>,\n setLastEvent: React.Dispatch<React.SetStateAction<NotificationEvent | null>>,\n setConnectionStatus: React.Dispatch<React.SetStateAction<ConnectionStatus>>\n): () => void {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (typeof EventSource === 'undefined') return () => {};\n\n let es: EventSource | null = null;\n let stopped = false;\n let backoff = BASE_BACKOFF_MS;\n let reconnectTimer: ReturnType<typeof setTimeout> | null = null;\n let stableTimer: ReturnType<typeof setTimeout> | null = null;\n\n function connect() {\n if (stopped) return;\n\n const url = runId\n ? `/api/agent-events?runId=${encodeURIComponent(runId)}`\n : '/api/agent-events';\n\n es = new EventSource(url);\n setConnectionStatus('connecting');\n\n es.onopen = () => {\n setConnectionStatus('connected');\n stableTimer = setTimeout(() => {\n stableTimer = null;\n backoff = BASE_BACKOFF_MS;\n }, STABLE_CONNECTION_MS);\n };\n\n es.onerror = () => {\n es?.close();\n es = null;\n setConnectionStatus('disconnected');\n\n if (stableTimer !== null) {\n clearTimeout(stableTimer);\n stableTimer = null;\n }\n\n const delay = backoff;\n backoff = Math.min(delay * 2, MAX_BACKOFF_MS);\n\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null;\n connect();\n }, delay);\n };\n\n es.addEventListener('notification', ((event: MessageEvent) => {\n const parsed: NotificationEvent = JSON.parse(event.data);\n setEvents((prev) => [...prev, parsed]);\n setLastEvent(parsed);\n }) as EventListener);\n }\n\n connect();\n\n return () => {\n stopped = true;\n if (reconnectTimer !== null) {\n clearTimeout(reconnectTimer);\n reconnectTimer = null;\n }\n if (stableTimer !== null) {\n clearTimeout(stableTimer);\n stableTimer = null;\n }\n if (es) {\n es.close();\n es = null;\n }\n };\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"003bb66ca01fd0014db46be6cf9165dfa577cdd3a9\":\"pickFolder\"},\"src/presentation/web/app/actions/pick-folder.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"003bb66ca01fd0014db46be6cf9165dfa577cdd3a9\",callServer,void 0,findSourceMapURL,\"pickFolder\");export{$$RSC_SERVER_ACTION_0 as pickFolder};","'use client';\n\nimport { useState } from 'react';\nimport { Plus, Loader2 } from 'lucide-react';\nimport type { AddRepositoryNodeData } from './add-repository-node-config';\nimport { pickFolder } from './pick-folder';\n\nexport function AddRepositoryNode({\n data,\n}: {\n data: AddRepositoryNodeData;\n [key: string]: unknown;\n}) {\n const [loading, setLoading] = useState(false);\n\n async function handleClick() {\n if (loading) return;\n setLoading(true);\n try {\n const path = await pickFolder();\n if (path) {\n data.onSelect?.(path);\n }\n } finally {\n setLoading(false);\n }\n }\n\n return (\n <div className=\"group\">\n <button\n type=\"button\"\n data-testid=\"add-repository-node-card\"\n onClick={handleClick}\n disabled={loading}\n className=\"nodrag border-muted-foreground/30 flex w-56 cursor-pointer items-center gap-3 rounded-full border-2 border-dashed px-4 py-3 transition-colors hover:border-blue-500 hover:text-blue-500 disabled:cursor-wait disabled:opacity-60\"\n >\n {loading ? (\n <Loader2 className=\"h-5 w-5 shrink-0 animate-spin\" />\n ) : (\n <Plus className=\"h-5 w-5 shrink-0\" />\n )}\n <span data-testid=\"add-repository-node-label\" className=\"text-sm font-medium\">\n {loading ? 'Opening...' : 'Add Repository'}\n </span>\n </button>\n </div>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport { FolderPlus, Loader2 } from 'lucide-react';\nimport { Button } from '@/components/ui/button';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { pickFolder } from './pick-folder';\n\ninterface AddRepositoryButtonProps {\n onSelect?: (path: string) => void;\n}\n\nexport function AddRepositoryButton({ onSelect }: AddRepositoryButtonProps) {\n const [loading, setLoading] = useState(false);\n\n async function handleClick() {\n if (loading) return;\n setLoading(true);\n try {\n const path = await pickFolder();\n if (path) {\n onSelect?.(path);\n }\n } finally {\n setLoading(false);\n }\n }\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Add Repository\"\n data-testid=\"add-repository-button\"\n onClick={handleClick}\n disabled={loading}\n >\n {loading ? (\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n ) : (\n <FolderPlus className=\"h-5 w-5\" />\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>Add Repository</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n","'use client';\n\nimport { createContext, useContext, useState, useMemo, type ReactNode } from 'react';\nimport type { FeatureNodeState } from '@/components/common/feature-node/feature-node-state-config';\nimport type { FeatureStatus } from '@/components/common/feature-status-config';\n\n// Re-export the FeatureItem type so consumers can import from one place.\n// This will gain `featureId` in a later phase.\nexport interface SidebarFeatureItem {\n name: string;\n status: FeatureStatus;\n featureId: string;\n startedAt?: number;\n duration?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Pure mapping: FeatureNodeState (6-state) → FeatureStatus (3-state) | null\n// ---------------------------------------------------------------------------\n\nconst stateMapping: Record<FeatureNodeState, FeatureStatus | null> = {\n 'action-required': 'action-needed',\n running: 'in-progress',\n done: 'done',\n blocked: 'in-progress',\n error: 'in-progress',\n creating: null,\n};\n\n/**\n * Maps a canvas FeatureNodeState to the sidebar's 3-state FeatureStatus.\n * Returns `null` for `creating` (optimistic UI) — these should be excluded from the sidebar.\n */\nexport function mapNodeStateToSidebarStatus(state: FeatureNodeState): FeatureStatus | null {\n return stateMapping[state];\n}\n\n// ---------------------------------------------------------------------------\n// SidebarFeaturesContext\n// ---------------------------------------------------------------------------\n\ninterface SidebarFeaturesContextValue {\n features: SidebarFeatureItem[];\n setFeatures: (features: SidebarFeatureItem[]) => void;\n}\n\nconst SidebarFeaturesContext = createContext<SidebarFeaturesContextValue | null>(null);\n\ninterface SidebarFeaturesProviderProps {\n children: ReactNode;\n}\n\nexport function SidebarFeaturesProvider({ children }: SidebarFeaturesProviderProps) {\n const [features, setFeatures] = useState<SidebarFeatureItem[]>([]);\n\n const value = useMemo<SidebarFeaturesContextValue>(() => ({ features, setFeatures }), [features]);\n\n return (\n <SidebarFeaturesContext.Provider value={value}>{children}</SidebarFeaturesContext.Provider>\n );\n}\n\nexport function useSidebarFeaturesContext(): SidebarFeaturesContextValue {\n const ctx = useContext(SidebarFeaturesContext);\n if (!ctx) {\n throw new Error('useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>');\n }\n return ctx;\n}\n","import { pickFolder as pickFolderAction } from '@/app/actions/pick-folder';\n\n/**\n * Opens a native OS folder picker dialog via server action.\n * Returns the selected absolute path, or null if the user cancelled.\n */\nexport async function pickFolder(): Promise<string | null> {\n const result = await pickFolderAction();\n\n if (result.error) {\n throw new Error(result.error);\n }\n\n return result.path;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 10v6', key: '1bos4e' }],\n ['path', { d: 'M9 13h6', key: '1uhe8q' }],\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n];\n\n/**\n * @component @name FolderPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTB2NiIgLz4KICA8cGF0aCBkPSJNOSAxM2g2IiAvPgogIDxwYXRoIGQ9Ik0yMCAyMGEyIDIgMCAwIDAgMi0yVjhhMiAyIDAgMCAwLTItMmgtNy45YTIgMiAwIDAgMS0xLjY5LS45TDkuNiAzLjlBMiAyIDAgMCAwIDcuOTMgM0g0YTIgMiAwIDAgMC0yIDJ2MTNhMiAyIDAgMCAwIDIgMloiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folder-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderPlus = createLucideIcon('folder-plus', __iconNode);\n\nexport default FolderPlus;\n"],"names":["ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","process","env","NODE_ENV","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","require","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isGroupSegment","isParallelRouteSegment","segment","Array","isArray","endsWith","isPageSegment","stringifiedQuery","JSON","stringify","segments","parallelRouteKey","length","rawSegment","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","warnOnce","_","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId"],"mappings":"4CAEA,SAAS,EAAyB,CAAW,EACzC,GAAuB,AAAnB,mBAAO,QAAwB,OAAO,K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,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,UAAU,gBAI5B,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,cAAc,CAAA,UAAC,uBAIxB,wDC/BA,IAAM,EAA+D,CACnE,kBAAmB,gBACnB,QAAS,cACT,KAAM,OACN,QAAS,cACT,MAAO,cACP,SAAU,IACZ,EAMO,SAAS,EAA4B,CAAuB,EACjE,OAAO,CAAY,CAAC,EAAM,AAC5B,CAWA,IAAM,EAAyB,CAAA,EAAA,EAAA,aAAA,AAAa,EAAqC,MAM1E,SAAS,EAAwB,CAAE,UAAQ,CAAgC,EAChF,GAAM,CAAC,EAAU,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAuB,EAAE,EAE3D,EAAQ,CAAA,EAAA,EAAA,OAAA,AAAO,EAA8B,IAAM,AAAC,WAAE,cAAU,EAAY,CAAC,CAAG,CAAC,EAAS,EAEhG,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAuB,QAAQ,CAAA,CAAC,MAAO,WAAQ,GAEpD,CAEO,SAAS,IACd,IAAM,EAAM,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GACvB,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MAAM,6EAElB,OAAO,CACT","ignoreList":[0,1,2,3,4,5,6,7,8,9,18]}
@@ -1,8 +1,8 @@
1
- module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00ff0f6d3062864e597d2679c8d07339bfc0c26991",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{name:b,description:d,repositoryPath:e,attachments:f,approvalGates:g,push:h,openPr:i,parentId:j}=a;if(!b?.trim())return{error:"name is required"};if(!e?.trim())return{error:"repositoryPath is required"};let k=function(a,b,c){let d=`Feature: ${a}`;if(b&&(d+=`
1
+ module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"006028f671bc5656ce82bd5a3e24628c906fe3ee3e",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{name:b,description:d,repositoryPath:e,attachments:f,approvalGates:g,push:h,openPr:i,parentId:j}=a;if(!b?.trim())return{error:"name is required"};if(!e?.trim())return{error:"repositoryPath is required"};let k=function(a,b,c){let d=`Feature: ${a}`;if(b&&(d+=`
2
2
 
3
3
  ${b}`),c&&c.length>0){let a=c.map(a=>`- ${a.path}`).join("\n");d+=`
4
4
 
5
5
  Attached files:
6
- ${a}`}return d}(b,d,f),l={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase");return{feature:(await a.execute({userInput:k,repositoryPath:e,approvalGates:l,push:h??!1,openPr:i??!1,...j?{parentId:j}:{}})).feature}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"40d075c363c758e7309fe56f5aadf1216283e26ed3",null),a.s(["createFeature",()=>d])},15434,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(24860),o=a.i(77605);a.s([],80894),a.i(80894),a.s(["00d1b8aeaa3c69905aaab9423f6e93e9c24badc198",()=>b.pickFolder,"00ff0f6d3062864e597d2679c8d07339bfc0c26991",()=>n.getWorkflowDefaults,"400a95f59ac276cd44426daf389b54c9b3ce1e67f9",()=>d.deployFeature,"402abc8f1124bf7b1541e8f953a7e515a023e6315d",()=>g.getDeploymentStatus,"403a315193a8bd2cd20ec134dec5bf8be13836754d",()=>k.deleteFeature,"4051fff1687085f4ac0b74bd8ec911314744e0d2da",()=>j.openFolder,"40764b7246b141475efca3969aa8b5d4be9ec9a208",()=>c.getDeploymentLogs,"408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7",()=>m.deleteRepository,"40913ef4fa4babc5fc6f474f6e64d26ae4fee39076",()=>l.addRepository,"409417d5965da51b0fa0b23c83cd2435fa68790aae",()=>e.deployRepository,"40c8b87e13f9c624071c0cb1ab37bfc7da71227633",()=>h.openIde,"40ceced8e4a11c2798efa050fcc2f0721d20b46f1c",()=>i.openShell,"40d075c363c758e7309fe56f5aadf1216283e26ed3",()=>o.createFeature,"40d73de56d028a73e188a1ecaa5332d608238be7eb",()=>f.stopDeployment],15434)}];
6
+ ${a}`}return d}(b,d,f),l={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase");return{feature:(await a.execute({userInput:k,repositoryPath:e,approvalGates:l,push:h??!1,openPr:i??!1,...j?{parentId:j}:{}})).feature}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"4060ea2aabfb6edfdb6329ae6eaadce3c8cf03dc73",null),a.s(["createFeature",()=>d])},15434,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(24860),o=a.i(77605);a.s([],80894),a.i(80894),a.s(["003bb66ca01fd0014db46be6cf9165dfa577cdd3a9",()=>b.pickFolder,"006028f671bc5656ce82bd5a3e24628c906fe3ee3e",()=>n.getWorkflowDefaults,"4006221850d259d043ea7ea81c3e748e723c0d2811",()=>i.openShell,"4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4",()=>k.deleteFeature,"4060ea2aabfb6edfdb6329ae6eaadce3c8cf03dc73",()=>o.createFeature,"4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3",()=>l.addRepository,"40967be8d899d42b33a24d712b8d5351530816d607",()=>c.getDeploymentLogs,"40a8b334d22210234507b8888f8e614c04d7b48d4a",()=>g.getDeploymentStatus,"40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c",()=>d.deployFeature,"40c4d52d23cd5c91e19bb39cc38255d1d36b37884a",()=>f.stopDeployment,"40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac",()=>m.deleteRepository,"40ccd5f108938530801f145e5d9b7f8016609bd57e",()=>e.deployRepository,"40cdbc261ae7913b757e2f74e5305ed8991525ad74",()=>h.openIde,"40e296957d4679f72038ca74538eabb8c9ae4e94e6",()=>j.openFolder],15434)}];
7
7
 
8
8
  //# sourceMappingURL=src_presentation_web_1a32dbcb._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n name: string;\n description?: string;\n repositoryPath: string;\n attachments?: Attachment[];\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n}\n\nfunction composeUserInput(\n name: string,\n description: string | undefined,\n attachments: Attachment[] | undefined\n): string {\n let userInput = `Feature: ${name}`;\n\n if (description) {\n userInput += `\\n\\n${description}`;\n }\n\n if (attachments && attachments.length > 0) {\n const paths = attachments.map((a) => `- ${a.path}`).join('\\n');\n userInput += `\\n\\nAttached files:\\n${paths}`;\n }\n\n return userInput;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const { name, description, repositoryPath, attachments, approvalGates, push, openPr, parentId } =\n input;\n\n if (!name?.trim()) {\n return { error: 'name is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(name, description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n const result = await createFeatureUseCase.execute({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n });\n return { feature: result.feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","export {pickFolder as '00d1b8aeaa3c69905aaab9423f6e93e9c24badc198'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40764b7246b141475efca3969aa8b5d4be9ec9a208'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400a95f59ac276cd44426daf389b54c9b3ce1e67f9'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '409417d5965da51b0fa0b23c83cd2435fa68790aae'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40d73de56d028a73e188a1ecaa5332d608238be7eb'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '402abc8f1124bf7b1541e8f953a7e515a023e6315d'} from 'ACTIONS_MODULE5'\nexport {openIde as '40c8b87e13f9c624071c0cb1ab37bfc7da71227633'} from 'ACTIONS_MODULE6'\nexport {openShell as '40ceced8e4a11c2798efa050fcc2f0721d20b46f1c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '4051fff1687085f4ac0b74bd8ec911314744e0d2da'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '403a315193a8bd2cd20ec134dec5bf8be13836754d'} from 'ACTIONS_MODULE9'\nexport {addRepository as '40913ef4fa4babc5fc6f474f6e64d26ae4fee39076'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7'} from 'ACTIONS_MODULE11'\nexport {getWorkflowDefaults as '00ff0f6d3062864e597d2679c8d07339bfc0c26991'} from 'ACTIONS_MODULE12'\nexport {createFeature as '40d075c363c758e7309fe56f5aadf1216283e26ed3'} from 'ACTIONS_MODULE13'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA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AAI,CACF,IAAM,EAAuB,CAAA,EAAA,EAAA,OAAA,AAAO,EAAuB,wBAS3D,MAAO,CAAE,QAAS,CARH,MAAM,EAAqB,OAAO,CAAC,WAChD,iBACA,EACA,cAAe,EACf,KAAM,IAAQ,EACd,OAAQ,IAAU,EAClB,GAAI,EAAW,UAAE,CAAS,EAAI,CAAC,CAAC,AAClC,EAAA,EACyB,OAAO,AAAC,CACnC,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,0BACjC,CAC1B,CACF,0CApCsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,2DCnDtB,IAAA,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"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n name: string;\n description?: string;\n repositoryPath: string;\n attachments?: Attachment[];\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n}\n\nfunction composeUserInput(\n name: string,\n description: string | undefined,\n attachments: Attachment[] | undefined\n): string {\n let userInput = `Feature: ${name}`;\n\n if (description) {\n userInput += `\\n\\n${description}`;\n }\n\n if (attachments && attachments.length > 0) {\n const paths = attachments.map((a) => `- ${a.path}`).join('\\n');\n userInput += `\\n\\nAttached files:\\n${paths}`;\n }\n\n return userInput;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const { name, description, repositoryPath, attachments, approvalGates, push, openPr, parentId } =\n input;\n\n if (!name?.trim()) {\n return { error: 'name is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(name, description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n const result = await createFeatureUseCase.execute({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n });\n return { feature: result.feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","export {pickFolder as '003bb66ca01fd0014db46be6cf9165dfa577cdd3a9'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40967be8d899d42b33a24d712b8d5351530816d607'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40ccd5f108938530801f145e5d9b7f8016609bd57e'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40c4d52d23cd5c91e19bb39cc38255d1d36b37884a'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40a8b334d22210234507b8888f8e614c04d7b48d4a'} from 'ACTIONS_MODULE5'\nexport {openIde as '40cdbc261ae7913b757e2f74e5305ed8991525ad74'} from 'ACTIONS_MODULE6'\nexport {openShell as '4006221850d259d043ea7ea81c3e748e723c0d2811'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40e296957d4679f72038ca74538eabb8c9ae4e94e6'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4'} from 'ACTIONS_MODULE9'\nexport {addRepository as '4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac'} from 'ACTIONS_MODULE11'\nexport {getWorkflowDefaults as '006028f671bc5656ce82bd5a3e24628c906fe3ee3e'} from 'ACTIONS_MODULE12'\nexport {createFeature as '4060ea2aabfb6edfdb6329ae6eaadce3c8cf03dc73'} from 'ACTIONS_MODULE13'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAYO,eAAe,IAEpB,GAAM,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A,OAAA,AAAO,EAAuB,wBAS3D,MAAO,CAAE,QAAS,CARH,MAAM,EAAqB,OAAO,CAAC,WAChD,iBACA,EACA,cAAe,EACf,KAAM,IAAQ,EACd,OAAQ,IAAU,EAClB,GAAI,EAAW,UAAE,CAAS,EAAI,CAAC,CAAC,AAClC,EAAA,EACyB,OAAO,AAAC,CACnC,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,0BACjC,CAC1B,CACF,0CApCsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,2DCnDtB,IAAA,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"}
@@ -1,3 +1,3 @@
1
- module.exports=[61402,76052,13008,74607,6542,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);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){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{rejected:!1,error:"Feature not found"};if(!e.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("RejectAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.rejected)return{rejected:!1,error:g.reason};return{rejected:!0,iteration:g.iteration,iterationWarning:g.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"}}}async function i(a){if(!a.trim())return{error:"Feature id is required"};try{let b,d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{error:"Feature not found"};let f=e.pr?{url:e.pr.url,number:e.pr.number,status:e.pr.status,commitHash:e.pr.commitHash,ciStatus:e.pr.ciStatus}:void 0,g=e.branch?{source:e.branch,target:"main"}:void 0;try{let d=(0,c.resolve)("GetPlanArtifactUseCase");b=(await d.execute(a)).phases.map(({id:a,name:b,description:c})=>({id:a,name:b,description:c}))}catch{}if(!e.worktreePath)return{pr:f,branch:g,phases:b,warning:f?void 0:"No PR or diff data available"};try{let a=(0,c.resolve)("IGitPrService"),d=await a.getPrDiffSummary(e.worktreePath,"main");return{pr:f,branch:g,phases:b,diffSummary:d}}catch{return{pr:f,branch:g,phases:b,warning:"Diff statistics unavailable"}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"604a4f18da3a5df0acfadc36096feafc68fe140e67",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"60c40cfdb89251fe57e9b48066e480b8c57d049b7e",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc",null),a.s(["getResearchArtifact",()=>h],74607),(0,d.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"4034ea75339ce833d9bc9093e773812a17f4ed8ec9",null),a.s(["getMergeReviewData",()=>i],6542)},24734,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(61402),o=a.i(76052),p=a.i(13008),q=a.i(74607),r=a.i(6542);a.s([],59408),a.i(59408),a.s(["00d1b8aeaa3c69905aaab9423f6e93e9c24badc198",()=>b.pickFolder,"400a95f59ac276cd44426daf389b54c9b3ce1e67f9",()=>d.deployFeature,"402abc8f1124bf7b1541e8f953a7e515a023e6315d",()=>g.getDeploymentStatus,"4034ea75339ce833d9bc9093e773812a17f4ed8ec9",()=>r.getMergeReviewData,"403a315193a8bd2cd20ec134dec5bf8be13836754d",()=>k.deleteFeature,"4051fff1687085f4ac0b74bd8ec911314744e0d2da",()=>j.openFolder,"40764b7246b141475efca3969aa8b5d4be9ec9a208",()=>c.getDeploymentLogs,"407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48",()=>p.getFeatureArtifact,"408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7",()=>m.deleteRepository,"40913ef4fa4babc5fc6f474f6e64d26ae4fee39076",()=>l.addRepository,"409417d5965da51b0fa0b23c83cd2435fa68790aae",()=>e.deployRepository,"409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc",()=>q.getResearchArtifact,"40c8b87e13f9c624071c0cb1ab37bfc7da71227633",()=>h.openIde,"40ceced8e4a11c2798efa050fcc2f0721d20b46f1c",()=>i.openShell,"40d73de56d028a73e188a1ecaa5332d608238be7eb",()=>f.stopDeployment,"604a4f18da3a5df0acfadc36096feafc68fe140e67",()=>n.approveFeature,"60c40cfdb89251fe57e9b48066e480b8c57d049b7e",()=>o.rejectFeature],24734)}];
1
+ module.exports=[61402,76052,13008,74607,6542,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);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){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{rejected:!1,error:"Feature not found"};if(!e.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("RejectAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.rejected)return{rejected:!1,error:g.reason};return{rejected:!0,iteration:g.iteration,iterationWarning:g.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"}}}async function i(a){if(!a.trim())return{error:"Feature id is required"};try{let b,d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{error:"Feature not found"};let f=e.pr?{url:e.pr.url,number:e.pr.number,status:e.pr.status,commitHash:e.pr.commitHash,ciStatus:e.pr.ciStatus}:void 0,g=e.branch?{source:e.branch,target:"main"}:void 0;try{let d=(0,c.resolve)("GetPlanArtifactUseCase");b=(await d.execute(a)).phases.map(({id:a,name:b,description:c})=>({id:a,name:b,description:c}))}catch{}if(!e.worktreePath)return{pr:f,branch:g,phases:b,warning:f?void 0:"No PR or diff data available"};try{let a=(0,c.resolve)("IGitPrService"),d=await a.getPrDiffSummary(e.worktreePath,"main");return{pr:f,branch:g,phases:b,diffSummary:d}}catch{return{pr:f,branch:g,phases:b,warning:"Diff statistics unavailable"}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"608a3e52558e0c0b8347ceed598800a1763ff7a2b9",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"605d849bbee3260afebd807cda48b37d6430dc735f",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"4054778b82edf33936929456d7ac237f7516b3d87c",null),a.s(["getResearchArtifact",()=>h],74607),(0,d.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"40c7135122502901233533acdbd72b1a78dc3c9614",null),a.s(["getMergeReviewData",()=>i],6542)},24734,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(61402),o=a.i(76052),p=a.i(13008),q=a.i(74607),r=a.i(6542);a.s([],59408),a.i(59408),a.s(["003bb66ca01fd0014db46be6cf9165dfa577cdd3a9",()=>b.pickFolder,"4006221850d259d043ea7ea81c3e748e723c0d2811",()=>i.openShell,"4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4",()=>k.deleteFeature,"4054778b82edf33936929456d7ac237f7516b3d87c",()=>q.getResearchArtifact,"4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b",()=>p.getFeatureArtifact,"4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3",()=>l.addRepository,"40967be8d899d42b33a24d712b8d5351530816d607",()=>c.getDeploymentLogs,"40a8b334d22210234507b8888f8e614c04d7b48d4a",()=>g.getDeploymentStatus,"40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c",()=>d.deployFeature,"40c4d52d23cd5c91e19bb39cc38255d1d36b37884a",()=>f.stopDeployment,"40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac",()=>m.deleteRepository,"40c7135122502901233533acdbd72b1a78dc3c9614",()=>r.getMergeReviewData,"40ccd5f108938530801f145e5d9b7f8016609bd57e",()=>e.deployRepository,"40cdbc261ae7913b757e2f74e5305ed8991525ad74",()=>h.openIde,"40e296957d4679f72038ca74538eabb8c9ae4e94e6",()=>j.openFolder,"605d849bbee3260afebd807cda48b37d6430dc735f",()=>o.rejectFeature,"608a3e52558e0c0b8347ceed598800a1763ff7a2b9",()=>n.approveFeature],24734)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_398553b0._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../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/.next-internal/server/app/%28dashboard%29/feature/%5BfeatureId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'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 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): 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 const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback);\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 { 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 { GetPlanArtifactUseCase } from '@shepai/core/application/use-cases/features/get-plan-artifact.use-case';\nimport type {\n MergeReviewData,\n MergeReviewPhase,\n} from '@/components/common/merge-review/merge-review-config';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\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 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 }\n : undefined;\n\n const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;\n\n // Load plan phases (best-effort)\n let phases: MergeReviewPhase[] | undefined;\n try {\n const planUseCase = resolve<GetPlanArtifactUseCase>('GetPlanArtifactUseCase');\n const plan = await planUseCase.execute(featureId);\n phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));\n } catch {\n // Plan unavailable — not critical\n }\n\n if (!feature.worktreePath) {\n return { pr, branch, phases, warning: pr ? undefined : 'No PR or diff data available' };\n }\n\n try {\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');\n return { pr, branch, phases, diffSummary };\n } catch {\n return { pr, branch, phases, warning: 'Diff statistics unavailable' };\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","export {pickFolder as '00d1b8aeaa3c69905aaab9423f6e93e9c24badc198'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40764b7246b141475efca3969aa8b5d4be9ec9a208'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400a95f59ac276cd44426daf389b54c9b3ce1e67f9'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '409417d5965da51b0fa0b23c83cd2435fa68790aae'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40d73de56d028a73e188a1ecaa5332d608238be7eb'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '402abc8f1124bf7b1541e8f953a7e515a023e6315d'} from 'ACTIONS_MODULE5'\nexport {openIde as '40c8b87e13f9c624071c0cb1ab37bfc7da71227633'} from 'ACTIONS_MODULE6'\nexport {openShell as '40ceced8e4a11c2798efa050fcc2f0721d20b46f1c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '4051fff1687085f4ac0b74bd8ec911314744e0d2da'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '403a315193a8bd2cd20ec134dec5bf8be13836754d'} from 'ACTIONS_MODULE9'\nexport {addRepository as '40913ef4fa4babc5fc6f474f6e64d26ae4fee39076'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7'} from 'ACTIONS_MODULE11'\nexport {approveFeature as '604a4f18da3a5df0acfadc36096feafc68fe140e67'} from 'ACTIONS_MODULE12'\nexport {rejectFeature as '60c40cfdb89251fe57e9b48066e480b8c57d049b7e'} from 'ACTIONS_MODULE13'\nexport {getFeatureArtifact as '407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48'} from 'ACTIONS_MODULE14'\nexport {getResearchArtifact as '409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc'} from 'ACTIONS_MODULE15'\nexport {getMergeReviewData as '4034ea75339ce833d9bc9093e773812a17f4ed8ec9'} from 'ACTIONS_MODULE16'\n"],"names":[],"mappings":"+EAEA,EAAA,EAAA,CAAA,CAAA,oBAKO,eAAe,EACpB,CAAiB,CACjB,CAA4B,EAE5B,GAAI,CAAC,EAAU,IAAI,GACjB,CADqB,KACd,CAAE,UAAU,EAAO,MAAO,wBAAyB,EAG5D,GAAI,CACF,IAAM,EAAc,CAAA,EAAA,EAAA,OAAO,AAAP,EAA4B,sBAC1C,EAAU,MAAM,EAAY,QAAQ,CAAC,GAE3C,GAAI,CAAC,EACH,MAAO,CADK,AACH,UAAU,EAAO,MAAO,mBAAoB,EAGvD,GAAI,CAAC,EAAQ,UAAU,CACrB,CADuB,KAChB,CAAE,UAAU,EAAO,MAAO,0BAA2B,EAG9D,IAAM,EAAiB,CAAA,EAAA,EAAA,OAAA,AAAO,EAAyB,0BACjD,EAAS,MAAM,EAAe,OAAO,CAAC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EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../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/.next-internal/server/app/%28dashboard%29/feature/%5BfeatureId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'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 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): 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 const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback);\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 { 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 { GetPlanArtifactUseCase } from '@shepai/core/application/use-cases/features/get-plan-artifact.use-case';\nimport type {\n MergeReviewData,\n MergeReviewPhase,\n} from '@/components/common/merge-review/merge-review-config';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\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 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 }\n : undefined;\n\n const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;\n\n // Load plan phases (best-effort)\n let phases: MergeReviewPhase[] | undefined;\n try {\n const planUseCase = resolve<GetPlanArtifactUseCase>('GetPlanArtifactUseCase');\n const plan = await planUseCase.execute(featureId);\n phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));\n } catch {\n // Plan unavailable — not critical\n }\n\n if (!feature.worktreePath) {\n return { pr, branch, phases, warning: pr ? undefined : 'No PR or diff data available' };\n }\n\n try {\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');\n return { pr, branch, phases, diffSummary };\n } catch {\n return { pr, branch, phases, warning: 'Diff statistics unavailable' };\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","export {pickFolder as '003bb66ca01fd0014db46be6cf9165dfa577cdd3a9'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40967be8d899d42b33a24d712b8d5351530816d607'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40ccd5f108938530801f145e5d9b7f8016609bd57e'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40c4d52d23cd5c91e19bb39cc38255d1d36b37884a'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40a8b334d22210234507b8888f8e614c04d7b48d4a'} from 'ACTIONS_MODULE5'\nexport {openIde as '40cdbc261ae7913b757e2f74e5305ed8991525ad74'} from 'ACTIONS_MODULE6'\nexport {openShell as '4006221850d259d043ea7ea81c3e748e723c0d2811'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40e296957d4679f72038ca74538eabb8c9ae4e94e6'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4'} from 'ACTIONS_MODULE9'\nexport {addRepository as '4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac'} from 'ACTIONS_MODULE11'\nexport {approveFeature as '608a3e52558e0c0b8347ceed598800a1763ff7a2b9'} from 'ACTIONS_MODULE12'\nexport {rejectFeature as '605d849bbee3260afebd807cda48b37d6430dc735f'} from 'ACTIONS_MODULE13'\nexport {getFeatureArtifact as '4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b'} from 'ACTIONS_MODULE14'\nexport {getResearchArtifact as '4054778b82edf33936929456d7ac237f7516b3d87c'} from 'ACTI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AA,uBAAA,EAAA,EAAA,6CAAA,8ECrCA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,+ECdA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,qECbtB,IAAA,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"}
@@ -1,3 +1,3 @@
1
- module.exports=[61402,76052,13008,74607,6542,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);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){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{rejected:!1,error:"Feature not found"};if(!e.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("RejectAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.rejected)return{rejected:!1,error:g.reason};return{rejected:!0,iteration:g.iteration,iterationWarning:g.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"}}}async function i(a){if(!a.trim())return{error:"Feature id is required"};try{let b,d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{error:"Feature not found"};let f=e.pr?{url:e.pr.url,number:e.pr.number,status:e.pr.status,commitHash:e.pr.commitHash,ciStatus:e.pr.ciStatus}:void 0,g=e.branch?{source:e.branch,target:"main"}:void 0;try{let d=(0,c.resolve)("GetPlanArtifactUseCase");b=(await d.execute(a)).phases.map(({id:a,name:b,description:c})=>({id:a,name:b,description:c}))}catch{}if(!e.worktreePath)return{pr:f,branch:g,phases:b,warning:f?void 0:"No PR or diff data available"};try{let a=(0,c.resolve)("IGitPrService"),d=await a.getPrDiffSummary(e.worktreePath,"main");return{pr:f,branch:g,phases:b,diffSummary:d}}catch{return{pr:f,branch:g,phases:b,warning:"Diff statistics unavailable"}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"604a4f18da3a5df0acfadc36096feafc68fe140e67",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"60c40cfdb89251fe57e9b48066e480b8c57d049b7e",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc",null),a.s(["getResearchArtifact",()=>h],74607),(0,d.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"4034ea75339ce833d9bc9093e773812a17f4ed8ec9",null),a.s(["getMergeReviewData",()=>i],6542)},53432,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(61402),o=a.i(76052),p=a.i(13008),q=a.i(74607),r=a.i(6542);a.s([],32840),a.i(32840),a.s(["00d1b8aeaa3c69905aaab9423f6e93e9c24badc198",()=>b.pickFolder,"400a95f59ac276cd44426daf389b54c9b3ce1e67f9",()=>d.deployFeature,"402abc8f1124bf7b1541e8f953a7e515a023e6315d",()=>g.getDeploymentStatus,"4034ea75339ce833d9bc9093e773812a17f4ed8ec9",()=>r.getMergeReviewData,"403a315193a8bd2cd20ec134dec5bf8be13836754d",()=>k.deleteFeature,"4051fff1687085f4ac0b74bd8ec911314744e0d2da",()=>j.openFolder,"40764b7246b141475efca3969aa8b5d4be9ec9a208",()=>c.getDeploymentLogs,"407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48",()=>p.getFeatureArtifact,"408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7",()=>m.deleteRepository,"40913ef4fa4babc5fc6f474f6e64d26ae4fee39076",()=>l.addRepository,"409417d5965da51b0fa0b23c83cd2435fa68790aae",()=>e.deployRepository,"409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc",()=>q.getResearchArtifact,"40c8b87e13f9c624071c0cb1ab37bfc7da71227633",()=>h.openIde,"40ceced8e4a11c2798efa050fcc2f0721d20b46f1c",()=>i.openShell,"40d73de56d028a73e188a1ecaa5332d608238be7eb",()=>f.stopDeployment,"604a4f18da3a5df0acfadc36096feafc68fe140e67",()=>n.approveFeature,"60c40cfdb89251fe57e9b48066e480b8c57d049b7e",()=>o.rejectFeature],53432)}];
1
+ module.exports=[61402,76052,13008,74607,6542,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);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){if(!a.trim())return{rejected:!1,error:"Feature id is required"};if(!b.trim())return{rejected:!1,error:"Feedback is required"};try{let d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{rejected:!1,error:"Feature not found"};if(!e.agentRunId)return{rejected:!1,error:"Feature has no agent run"};let f=(0,c.resolve)("RejectAgentRunUseCase"),g=await f.execute(e.agentRunId,b);if(!g.rejected)return{rejected:!1,error:g.reason};return{rejected:!0,iteration:g.iteration,iterationWarning:g.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"}}}async function i(a){if(!a.trim())return{error:"Feature id is required"};try{let b,d=(0,c.resolve)("IFeatureRepository"),e=await d.findById(a);if(!e)return{error:"Feature not found"};let f=e.pr?{url:e.pr.url,number:e.pr.number,status:e.pr.status,commitHash:e.pr.commitHash,ciStatus:e.pr.ciStatus}:void 0,g=e.branch?{source:e.branch,target:"main"}:void 0;try{let d=(0,c.resolve)("GetPlanArtifactUseCase");b=(await d.execute(a)).phases.map(({id:a,name:b,description:c})=>({id:a,name:b,description:c}))}catch{}if(!e.worktreePath)return{pr:f,branch:g,phases:b,warning:f?void 0:"No PR or diff data available"};try{let a=(0,c.resolve)("IGitPrService"),d=await a.getPrDiffSummary(e.worktreePath,"main");return{pr:f,branch:g,phases:b,diffSummary:d}}catch{return{pr:f,branch:g,phases:b,warning:"Diff statistics unavailable"}}}catch(a){return{error:a instanceof Error?a.message:"Failed to load merge review data"}}}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"608a3e52558e0c0b8347ceed598800a1763ff7a2b9",null),a.s(["approveFeature",()=>e],61402),(0,d.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"605d849bbee3260afebd807cda48b37d6430dc735f",null),a.s(["rejectFeature",()=>f],76052),(0,d.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b",null),a.s(["getFeatureArtifact",()=>g],13008),(0,d.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"4054778b82edf33936929456d7ac237f7516b3d87c",null),a.s(["getResearchArtifact",()=>h],74607),(0,d.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"40c7135122502901233533acdbd72b1a78dc3c9614",null),a.s(["getMergeReviewData",()=>i],6542)},53432,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(61402),o=a.i(76052),p=a.i(13008),q=a.i(74607),r=a.i(6542);a.s([],32840),a.i(32840),a.s(["003bb66ca01fd0014db46be6cf9165dfa577cdd3a9",()=>b.pickFolder,"4006221850d259d043ea7ea81c3e748e723c0d2811",()=>i.openShell,"4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4",()=>k.deleteFeature,"4054778b82edf33936929456d7ac237f7516b3d87c",()=>q.getResearchArtifact,"4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b",()=>p.getFeatureArtifact,"4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3",()=>l.addRepository,"40967be8d899d42b33a24d712b8d5351530816d607",()=>c.getDeploymentLogs,"40a8b334d22210234507b8888f8e614c04d7b48d4a",()=>g.getDeploymentStatus,"40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c",()=>d.deployFeature,"40c4d52d23cd5c91e19bb39cc38255d1d36b37884a",()=>f.stopDeployment,"40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac",()=>m.deleteRepository,"40c7135122502901233533acdbd72b1a78dc3c9614",()=>r.getMergeReviewData,"40ccd5f108938530801f145e5d9b7f8016609bd57e",()=>e.deployRepository,"40cdbc261ae7913b757e2f74e5305ed8991525ad74",()=>h.openIde,"40e296957d4679f72038ca74538eabb8c9ae4e94e6",()=>j.openFolder,"605d849bbee3260afebd807cda48b37d6430dc735f",()=>o.rejectFeature,"608a3e52558e0c0b8347ceed598800a1763ff7a2b9",()=>n.approveFeature],53432)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_5c87e8e4._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../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/.next-internal/server/app/%28dashboard%29/%40drawer/feature/%5BfeatureId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'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 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): 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 const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback);\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 { 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 { GetPlanArtifactUseCase } from '@shepai/core/application/use-cases/features/get-plan-artifact.use-case';\nimport type {\n MergeReviewData,\n MergeReviewPhase,\n} from '@/components/common/merge-review/merge-review-config';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\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 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 }\n : undefined;\n\n const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;\n\n // Load plan phases (best-effort)\n let phases: MergeReviewPhase[] | undefined;\n try {\n const planUseCase = resolve<GetPlanArtifactUseCase>('GetPlanArtifactUseCase');\n const plan = await planUseCase.execute(featureId);\n phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));\n } catch {\n // Plan unavailable — not critical\n }\n\n if (!feature.worktreePath) {\n return { pr, branch, phases, warning: pr ? undefined : 'No PR or diff data available' };\n }\n\n try {\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');\n return { pr, branch, phases, diffSummary };\n } catch {\n return { pr, branch, phases, warning: 'Diff statistics unavailable' };\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","export {pickFolder as '00d1b8aeaa3c69905aaab9423f6e93e9c24badc198'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40764b7246b141475efca3969aa8b5d4be9ec9a208'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400a95f59ac276cd44426daf389b54c9b3ce1e67f9'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '409417d5965da51b0fa0b23c83cd2435fa68790aae'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40d73de56d028a73e188a1ecaa5332d608238be7eb'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '402abc8f1124bf7b1541e8f953a7e515a023e6315d'} from 'ACTIONS_MODULE5'\nexport {openIde as '40c8b87e13f9c624071c0cb1ab37bfc7da71227633'} from 'ACTIONS_MODULE6'\nexport {openShell as '40ceced8e4a11c2798efa050fcc2f0721d20b46f1c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '4051fff1687085f4ac0b74bd8ec911314744e0d2da'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '403a315193a8bd2cd20ec134dec5bf8be13836754d'} from 'ACTIONS_MODULE9'\nexport {addRepository as '40913ef4fa4babc5fc6f474f6e64d26ae4fee39076'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '408f6b358fab14512bae6ae6bcaa6bd1ea83cf38d7'} from 'ACTIONS_MODULE11'\nexport {approveFeature as '604a4f18da3a5df0acfadc36096feafc68fe140e67'} from 'ACTIONS_MODULE12'\nexport {rejectFeature as '60c40cfdb89251fe57e9b48066e480b8c57d049b7e'} from 'ACTIONS_MODULE13'\nexport {getFeatureArtifact as '407eb3e5fc2629c79e5843ff7fbe37829e3f0a0c48'} from 'ACTIONS_MODULE14'\nexport {getResearchArtifact as '409d1eeac5a7a4cd3fe688097ef025a30cb5ec5edc'} from 'ACTIONS_MODULE15'\nexport {getMergeReviewData as '4034ea75339ce833d9bc9093e773812a17f4ed8ec9'} from 'ACTIONS_MODULE16'\n"],"names":[],"mappings":"+EAEA,EAAA,EAAA,CAAA,CAAA,oBAKO,eAAe,EACpB,CAAiB,CACjB,CAA4B,EAE5B,GAAI,CAAC,EAAU,IAAI,GACjB,CADqB,KACd,CAAE,UAAU,EAAO,MAAO,wBAAyB,EAG5D,GAAI,CACF,IAAM,EAAc,CAAA,EAAA,EAAA,OAAO,AAAP,EAA4B,sBAC1C,EAAU,MAAM,EAAY,QAAQ,CAAC,GAE3C,GAAI,CAAC,EACH,MAAO,CADK,AACH,UAAU,EAAO,MAAO,mBAAoB,EAGvD,GAAI,CAAC,EAAQ,UAAU,CACrB,CADuB,KAChB,CAAE,UAAU,EAAO,MAAO,0BAA2B,EAG9D,IAAM,EAAiB,CAAA,EAAA,EAAA,OAAA,AAAO,EAAyB,0BACjD,EAAS,MAAM,EAAe,OAAO,CAAC,EAAQ,UAAU,CAAE,GAEhE,GAAI,CAAC,EAAO,QAAQ,CAClB,CADoB,KACb,CAAE,UAAU,EAAO,MAAO,EAAO,MAAO,AAAD,EAGhD,MAAO,CAAE,UAAU,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xF,GAAI,CACF,IAAM,EAAe,CAAA,EAAA,EAAA,OAAA,AAAO,EAAgB,iBACtC,EAAc,MAAM,EAAa,gBAAgB,CAAC,EAAQ,YAAY,CAAE,QAC9E,MAAO,IAAE,SAAI,SAAQ,cAAQ,CAAY,CAC3C,CAAE,KAAM,CACN,MAAO,IAAE,SAAI,SAAQ,EAAQ,QAAS,6BAA8B,CACtE,CACF,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,kCACjC,CAC1B,CACF,iCJxDsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,0ECDA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yEC0DA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8ECrCA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,+ECdA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,qECbtB,IAAA,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"}
1
+ {"version":3,"sources":["../../../../../../../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/.next-internal/server/app/%28dashboard%29/%40drawer/feature/%5BfeatureId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'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 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): 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 const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback);\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 { 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 { GetPlanArtifactUseCase } from '@shepai/core/application/use-cases/features/get-plan-artifact.use-case';\nimport type {\n MergeReviewData,\n MergeReviewPhase,\n} from '@/components/common/merge-review/merge-review-config';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\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 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 }\n : undefined;\n\n const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;\n\n // Load plan phases (best-effort)\n let phases: MergeReviewPhase[] | undefined;\n try {\n const planUseCase = resolve<GetPlanArtifactUseCase>('GetPlanArtifactUseCase');\n const plan = await planUseCase.execute(featureId);\n phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));\n } catch {\n // Plan unavailable — not critical\n }\n\n if (!feature.worktreePath) {\n return { pr, branch, phases, warning: pr ? undefined : 'No PR or diff data available' };\n }\n\n try {\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');\n return { pr, branch, phases, diffSummary };\n } catch {\n return { pr, branch, phases, warning: 'Diff statistics unavailable' };\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","export {pickFolder as '003bb66ca01fd0014db46be6cf9165dfa577cdd3a9'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40967be8d899d42b33a24d712b8d5351530816d607'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40bf1522c163cbcfdc5645f1a5a86ddc02a59d8b8c'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40ccd5f108938530801f145e5d9b7f8016609bd57e'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '40c4d52d23cd5c91e19bb39cc38255d1d36b37884a'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40a8b334d22210234507b8888f8e614c04d7b48d4a'} from 'ACTIONS_MODULE5'\nexport {openIde as '40cdbc261ae7913b757e2f74e5305ed8991525ad74'} from 'ACTIONS_MODULE6'\nexport {openShell as '4006221850d259d043ea7ea81c3e748e723c0d2811'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40e296957d4679f72038ca74538eabb8c9ae4e94e6'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '4031c6c5cb0c48da36f2bfaa6fa11b07e88fe8b2a4'} from 'ACTIONS_MODULE9'\nexport {addRepository as '4086c9ab6e5f237354d5fe4c81cd4d9b446a4feaa3'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '40c65a5d2bb19ff2dc9aafc6ffce909b61f74b03ac'} from 'ACTIONS_MODULE11'\nexport {approveFeature as '608a3e52558e0c0b8347ceed598800a1763ff7a2b9'} from 'ACTIONS_MODULE12'\nexport {rejectFeature as '605d849bbee3260afebd807cda48b37d6430dc735f'} from 'ACTIONS_MODULE13'\nexport {getFeatureArtifact as '4057af599ef8f7b1dc0cbd425448b7a6eac5a3c79b'} from 'ACTIONS_MODULE14'\nexport {getResearchArtifact as '4054778b82edf33936929456d7ac237f7516b3d87c'} from 'ACTIONS_MODULE15'\nexport {getMergeReviewData as '40c7135122502901233533acdbd72b1a78dc3c9614'} from 'ACTIONS_MODULE16'\n"],"names":[],"mappings":"+EAEA,EAAA,EAAA,CAAA,CAAA,o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