@shepai/cli 1.169.1 → 1.170.0-pr513.cff27cb

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 (546) hide show
  1. package/apis/json-schema/Feature.yaml +27 -5
  2. package/apis/json-schema/FeatureMode.yaml +8 -0
  3. package/apis/json-schema/SdlcLifecycle.yaml +1 -0
  4. package/apis/json-schema/SkillInjectionConfig.yaml +17 -0
  5. package/apis/json-schema/SkillSource.yaml +21 -0
  6. package/apis/json-schema/SkillSourceType.yaml +7 -0
  7. package/apis/json-schema/WorkflowConfig.yaml +13 -5
  8. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -2
  9. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +8 -0
  11. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  12. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  13. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  14. package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.d.ts +39 -0
  15. package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.d.ts.map +1 -0
  16. package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.js +8 -0
  17. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +4 -3
  18. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
  19. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +2 -2
  20. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +2 -2
  21. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -1
  22. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +4 -2
  23. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +2 -2
  24. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
  25. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  26. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +40 -10
  27. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +5 -2
  28. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  29. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
  30. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +13 -0
  31. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.d.ts +40 -0
  32. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.d.ts.map +1 -0
  33. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.js +125 -0
  34. package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts.map +1 -1
  35. package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +23 -2
  36. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -2
  37. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
  38. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +5 -3
  39. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  40. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +57 -2
  41. package/dist/packages/core/src/domain/generated/output.d.ts +72 -4
  42. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  43. package/dist/packages/core/src/domain/generated/output.js +12 -0
  44. package/dist/packages/core/src/domain/lifecycle-gates.d.ts +21 -6
  45. package/dist/packages/core/src/domain/lifecycle-gates.d.ts.map +1 -1
  46. package/dist/packages/core/src/domain/lifecycle-gates.js +25 -6
  47. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  48. package/dist/packages/core/src/infrastructure/di/container.js +7 -0
  49. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +5 -1
  50. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  51. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +16 -4
  52. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -1
  53. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  54. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +34 -2
  55. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.d.ts +19 -0
  56. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.d.ts.map +1 -0
  57. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.js +46 -0
  58. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.d.ts +17 -0
  59. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.d.ts.map +1 -0
  60. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.js +37 -0
  61. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.d.ts +12 -0
  62. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.d.ts.map +1 -0
  63. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.js +17 -0
  64. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.d.ts +15 -0
  65. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.d.ts.map +1 -0
  66. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.js +23 -0
  67. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.d.ts +11 -0
  68. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.d.ts.map +1 -0
  69. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.js +19 -0
  70. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
  71. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +13 -7
  72. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -3
  73. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts +21 -0
  74. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts.map +1 -1
  75. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.js +61 -0
  76. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts +16 -0
  77. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts.map +1 -1
  78. package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js +47 -4
  79. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.d.ts +362 -0
  80. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.d.ts.map +1 -0
  81. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.js +72 -0
  82. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +20 -0
  83. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  84. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +68 -0
  85. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  86. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -2
  87. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  88. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +3 -3
  89. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -2
  90. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  91. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +19 -8
  92. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.d.ts.map +1 -1
  93. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.js +1 -0
  94. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.d.ts +18 -0
  95. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.d.ts.map +1 -0
  96. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.js +52 -0
  97. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  98. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +39 -20
  99. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  100. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +1 -0
  101. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.d.ts +24 -0
  102. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.d.ts.map +1 -0
  103. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.js +38 -0
  104. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.d.ts +31 -0
  105. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.d.ts.map +1 -0
  106. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.js +240 -0
  107. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.d.ts +21 -0
  108. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.d.ts.map +1 -0
  109. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.js +134 -0
  110. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -0
  111. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  112. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +17 -0
  113. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts +5 -0
  114. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts.map +1 -1
  115. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.js +34 -0
  116. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +1 -0
  117. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  118. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +8 -0
  119. package/dist/packages/core/src/infrastructure/services/skill-injector.service.d.ts +26 -0
  120. package/dist/packages/core/src/infrastructure/services/skill-injector.service.d.ts.map +1 -0
  121. package/dist/packages/core/src/infrastructure/services/skill-injector.service.js +201 -0
  122. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -1
  123. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
  124. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +7 -4
  125. package/dist/src/presentation/cli/commands/feat/feedback.command.d.ts +12 -0
  126. package/dist/src/presentation/cli/commands/feat/feedback.command.d.ts.map +1 -0
  127. package/dist/src/presentation/cli/commands/feat/feedback.command.js +64 -0
  128. package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
  129. package/dist/src/presentation/cli/commands/feat/index.js +5 -1
  130. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  131. package/dist/src/presentation/cli/commands/feat/new.command.js +21 -5
  132. package/dist/src/presentation/cli/commands/feat/promote.command.d.ts +13 -0
  133. package/dist/src/presentation/cli/commands/feat/promote.command.d.ts.map +1 -0
  134. package/dist/src/presentation/cli/commands/feat/promote.command.js +41 -0
  135. package/dist/src/presentation/web/app/actions/add-injected-skill.d.ts +7 -0
  136. package/dist/src/presentation/web/app/actions/add-injected-skill.d.ts.map +1 -0
  137. package/dist/src/presentation/web/app/actions/add-injected-skill.js +34 -0
  138. package/dist/src/presentation/web/app/actions/create-feature.d.ts +5 -2
  139. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  140. package/dist/src/presentation/web/app/actions/create-feature.js +5 -3
  141. package/dist/src/presentation/web/app/actions/discard-exploration.d.ts +9 -0
  142. package/dist/src/presentation/web/app/actions/discard-exploration.d.ts.map +1 -0
  143. package/dist/src/presentation/web/app/actions/discard-exploration.js +29 -0
  144. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts +3 -1
  145. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts.map +1 -1
  146. package/dist/src/presentation/web/app/actions/get-workflow-defaults.js +3 -1
  147. package/dist/src/presentation/web/app/actions/promote-exploration.d.ts +11 -0
  148. package/dist/src/presentation/web/app/actions/promote-exploration.d.ts.map +1 -0
  149. package/dist/src/presentation/web/app/actions/promote-exploration.js +21 -0
  150. package/dist/src/presentation/web/app/actions/remove-injected-skill.d.ts +6 -0
  151. package/dist/src/presentation/web/app/actions/remove-injected-skill.d.ts.map +1 -0
  152. package/dist/src/presentation/web/app/actions/remove-injected-skill.js +35 -0
  153. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.d.ts +12 -0
  154. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.d.ts.map +1 -0
  155. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.js +40 -0
  156. package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
  157. package/dist/src/presentation/web/app/api/agent-events/route.js +1 -0
  158. package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
  159. package/dist/src/presentation/web/app/build-feature-node-data.js +6 -2
  160. package/dist/src/presentation/web/app/build-graph-nodes.js +4 -2
  161. package/dist/src/presentation/web/app/skills/page.d.ts.map +1 -1
  162. package/dist/src/presentation/web/app/skills/page.js +6 -1
  163. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts +1 -1
  164. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts.map +1 -1
  165. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.js +3 -0
  166. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  167. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +65 -1
  168. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +5 -2
  169. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  170. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +20 -12
  171. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  172. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +3 -1
  173. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.d.ts +8 -0
  174. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.d.ts.map +1 -0
  175. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.js +33 -0
  176. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.d.ts +10 -0
  177. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.d.ts.map +1 -0
  178. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.js +33 -0
  179. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +6 -1
  180. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  181. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +16 -4
  182. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
  183. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +10 -4
  184. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +2 -0
  185. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
  186. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +12 -0
  187. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.d.ts +11 -0
  188. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.d.ts.map +1 -0
  189. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.js +34 -0
  190. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.d.ts +16 -0
  191. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.d.ts.map +1 -0
  192. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.js +70 -0
  193. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.d.ts.map +1 -1
  194. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.js +2 -0
  195. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +10 -2
  196. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  197. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +12 -0
  198. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  199. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +7 -2
  200. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  201. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +6 -6
  202. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.js +3 -3
  203. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.d.ts +10 -0
  204. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.d.ts.map +1 -0
  205. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.js +56 -0
  206. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.d.ts +16 -0
  207. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.d.ts.map +1 -0
  208. package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.js +66 -0
  209. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.d.ts +8 -0
  210. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.d.ts.map +1 -0
  211. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.js +42 -0
  212. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.d.ts +16 -0
  213. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.d.ts.map +1 -0
  214. package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.js +69 -0
  215. package/dist/src/presentation/web/components/features/skills/skills-page-client.d.ts +3 -1
  216. package/dist/src/presentation/web/components/features/skills/skills-page-client.d.ts.map +1 -1
  217. package/dist/src/presentation/web/components/features/skills/skills-page-client.js +5 -3
  218. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts +1 -0
  219. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts.map +1 -1
  220. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.js +27 -0
  221. package/dist/src/presentation/web/components/ui/toggle-group.d.ts +10 -0
  222. package/dist/src/presentation/web/components/ui/toggle-group.d.ts.map +1 -0
  223. package/dist/src/presentation/web/components/ui/toggle-group.js +22 -0
  224. package/dist/src/presentation/web/components/ui/toggle.d.ts +10 -0
  225. package/dist/src/presentation/web/components/ui/toggle.d.ts.map +1 -0
  226. package/dist/src/presentation/web/components/ui/toggle.js +26 -0
  227. package/dist/translations/ar/cli.json +26 -0
  228. package/dist/translations/ar/web.json +21 -13
  229. package/dist/translations/de/cli.json +26 -0
  230. package/dist/translations/de/web.json +41 -19
  231. package/dist/translations/en/cli.json +26 -0
  232. package/dist/translations/en/web.json +10 -2
  233. package/dist/translations/es/cli.json +26 -0
  234. package/dist/translations/es/web.json +22 -14
  235. package/dist/translations/fr/cli.json +26 -0
  236. package/dist/translations/fr/web.json +22 -14
  237. package/dist/translations/he/cli.json +26 -0
  238. package/dist/translations/he/web.json +22 -14
  239. package/dist/translations/pt/cli.json +26 -0
  240. package/dist/translations/pt/web.json +22 -14
  241. package/dist/translations/ru/cli.json +26 -0
  242. package/dist/translations/ru/web.json +22 -14
  243. package/dist/tsconfig.build.tsbuildinfo +1 -1
  244. package/package.json +1 -1
  245. package/web/.next/BUILD_ID +1 -1
  246. package/web/.next/build-manifest.json +5 -5
  247. package/web/.next/fallback-build-manifest.json +2 -2
  248. package/web/.next/prerender-manifest.json +3 -3
  249. package/web/.next/required-server-files.js +3 -3
  250. package/web/.next/required-server-files.json +3 -3
  251. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +3 -3
  252. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  253. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  254. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  255. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  256. package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +3 -3
  257. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  258. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +1 -1
  259. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  260. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  261. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +3 -3
  262. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  263. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  264. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  265. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  266. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +3 -3
  267. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +121 -76
  268. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -2
  269. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  270. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  271. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +3 -3
  272. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +121 -76
  273. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -2
  274. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  275. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  276. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +3 -3
  277. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  278. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
  279. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  280. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  281. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +3 -3
  282. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  283. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  284. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  285. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  286. package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +3 -3
  287. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  288. package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
  289. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  290. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  291. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +3 -3
  292. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  293. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  294. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  295. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  296. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +3 -3
  297. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +121 -76
  298. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -2
  299. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  300. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  301. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +3 -3
  302. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +121 -76
  303. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -2
  304. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  305. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  306. package/web/.next/server/app/(dashboard)/page/build-manifest.json +3 -3
  307. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  308. package/web/.next/server/app/(dashboard)/page.js +1 -1
  309. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  310. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  311. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +3 -3
  312. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  313. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
  314. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  315. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  316. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +3 -3
  317. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  318. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  319. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  320. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  321. package/web/.next/server/app/_global-error/page/build-manifest.json +3 -3
  322. package/web/.next/server/app/_global-error.html +2 -2
  323. package/web/.next/server/app/_global-error.rsc +1 -1
  324. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  325. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  326. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  327. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  328. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  329. package/web/.next/server/app/_not-found/page/build-manifest.json +3 -3
  330. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  331. package/web/.next/server/app/_not-found/page.js +1 -1
  332. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  333. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  334. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  335. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  336. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  337. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  338. package/web/.next/server/app/features/page/build-manifest.json +3 -3
  339. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  340. package/web/.next/server/app/features/page.js +1 -1
  341. package/web/.next/server/app/features/page.js.nft.json +1 -1
  342. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  343. package/web/.next/server/app/settings/page/build-manifest.json +3 -3
  344. package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
  345. package/web/.next/server/app/settings/page.js +3 -3
  346. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  347. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  348. package/web/.next/server/app/skills/page/build-manifest.json +3 -3
  349. package/web/.next/server/app/skills/page/server-reference-manifest.json +52 -22
  350. package/web/.next/server/app/skills/page.js +3 -2
  351. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  352. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  353. package/web/.next/server/app/tools/page/build-manifest.json +3 -3
  354. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  355. package/web/.next/server/app/tools/page.js +1 -1
  356. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  357. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  358. package/web/.next/server/app/version/page/build-manifest.json +3 -3
  359. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  360. package/web/.next/server/app/version/page.js +1 -1
  361. package/web/.next/server/app/version/page.js.nft.json +1 -1
  362. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  363. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  364. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  365. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
  366. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  367. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  368. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
  369. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
  370. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  371. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  372. package/web/.next/server/chunks/ssr/{_0727935d._.js → 403f9_next_8a33ddee._.js} +2 -2
  373. package/web/.next/server/chunks/ssr/403f9_next_8a33ddee._.js.map +1 -0
  374. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  375. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  376. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
  377. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  378. package/web/.next/server/chunks/ssr/[root-of-the-server]__03c66352._.js +4 -0
  379. package/web/.next/server/chunks/ssr/[root-of-the-server]__03c66352._.js.map +1 -0
  380. package/web/.next/server/chunks/ssr/{[root-of-the-server]__e88da4ee._.js → [root-of-the-server]__1cd4327c._.js} +2 -2
  381. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -0
  382. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  383. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  384. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  385. package/web/.next/server/chunks/ssr/[root-of-the-server]__403afc23._.js +4 -0
  386. package/web/.next/server/chunks/ssr/[root-of-the-server]__403afc23._.js.map +1 -0
  387. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ed9b909._.js +1 -1
  388. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
  389. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
  390. package/web/.next/server/chunks/ssr/[root-of-the-server]__69dd3217._.js +1 -1
  391. package/web/.next/server/chunks/ssr/[root-of-the-server]__69dd3217._.js.map +1 -1
  392. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  393. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  394. package/web/.next/server/chunks/ssr/{[root-of-the-server]__7ffd3598._.js → [root-of-the-server]__92ffd5ee._.js} +3 -3
  395. package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js.map +1 -0
  396. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js +2 -2
  397. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +1 -1
  398. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  399. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  400. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1262d08._.js +1 -1
  401. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
  402. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
  403. package/web/.next/server/chunks/ssr/[root-of-the-server]__df550e85._.js +3 -0
  404. package/web/.next/server/chunks/ssr/[root-of-the-server]__df550e85._.js.map +1 -0
  405. package/web/.next/server/chunks/ssr/[root-of-the-server]__df5602bf._.js +4 -0
  406. package/web/.next/server/chunks/ssr/[root-of-the-server]__df5602bf._.js.map +1 -0
  407. package/web/.next/server/chunks/ssr/[root-of-the-server]__e9f4767a._.js +4 -0
  408. package/web/.next/server/chunks/ssr/[root-of-the-server]__e9f4767a._.js.map +1 -0
  409. package/web/.next/server/chunks/ssr/_02e01240._.js +1 -1
  410. package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -1
  411. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  412. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  413. package/web/.next/server/chunks/ssr/{_fe058119._.js → _0fd635d7._.js} +2 -2
  414. package/web/.next/server/chunks/ssr/_0fd635d7._.js.map +1 -0
  415. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  416. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  417. package/web/.next/server/chunks/ssr/_18886033._.js +1 -1
  418. package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -1
  419. package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
  420. package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
  421. package/web/.next/server/chunks/ssr/_30ddea9d._.js +9 -0
  422. package/web/.next/server/chunks/ssr/_30ddea9d._.js.map +1 -0
  423. package/web/.next/server/chunks/ssr/{_a8b338ec._.js → _34d897da._.js} +2 -2
  424. package/web/.next/server/chunks/ssr/{_a8b338ec._.js.map → _34d897da._.js.map} +1 -1
  425. package/web/.next/server/chunks/ssr/_45496654._.js +3 -0
  426. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -0
  427. package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
  428. package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
  429. package/web/.next/server/chunks/ssr/_5119a3df._.js +1 -1
  430. package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -1
  431. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  432. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  433. package/web/.next/server/chunks/ssr/_6e79a2cc._.js +3 -0
  434. package/web/.next/server/chunks/ssr/_6e79a2cc._.js.map +1 -0
  435. package/web/.next/server/chunks/ssr/_6f35fb9a._.js +3 -0
  436. package/web/.next/server/chunks/ssr/_6f35fb9a._.js.map +1 -0
  437. package/web/.next/server/chunks/ssr/_a5a5901d._.js +1 -1
  438. package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
  439. package/web/.next/server/chunks/ssr/_ad09f271._.js +1 -1
  440. package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -1
  441. package/web/.next/server/chunks/ssr/_c3f595c6._.js +1 -1
  442. package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
  443. package/web/.next/server/chunks/ssr/{_9b964adc._.js → _cac4abe6._.js} +2 -2
  444. package/web/.next/server/chunks/ssr/_cac4abe6._.js.map +1 -0
  445. package/web/.next/server/chunks/ssr/_df737cce._.js +3 -0
  446. package/web/.next/server/chunks/ssr/_df737cce._.js.map +1 -0
  447. package/web/.next/server/chunks/ssr/_ea9e1556._.js +1 -1
  448. package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -1
  449. package/web/.next/server/chunks/ssr/_f1ba9be6._.js +2 -2
  450. package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
  451. package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
  452. package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
  453. package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
  454. package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -1
  455. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  456. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  457. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  458. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  459. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +3 -0
  460. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +1 -0
  461. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +3 -0
  462. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js.map +1 -0
  463. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  464. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  465. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  466. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  467. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  468. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  469. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  470. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +3 -0
  471. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -0
  472. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  473. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  474. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  475. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  476. package/web/.next/server/middleware-build-manifest.js +3 -3
  477. package/web/.next/server/pages/500.html +2 -2
  478. package/web/.next/server/server-reference-manifest.js +1 -1
  479. package/web/.next/server/server-reference-manifest.json +349 -211
  480. package/web/.next/static/chunks/0769c695d6b663c7.js +1 -0
  481. package/web/.next/static/chunks/09a25231e5fc1ab8.js +3 -0
  482. package/web/.next/static/chunks/{d6c39780c2f75ecd.js → 0f30a983f3467cd5.js} +1 -1
  483. package/web/.next/static/chunks/185e4f36cb6efb24.js +1 -0
  484. package/web/.next/static/chunks/{d5366257d6b9f855.js → 2a9af061f4fbe7f5.js} +1 -1
  485. package/web/.next/static/chunks/2ceebcc839ee0d4b.js +1 -0
  486. package/web/.next/static/chunks/{04c874f52a7cd435.js → 37f9543560c58ea6.js} +1 -1
  487. package/web/.next/static/chunks/{caf7d7e1b439b29e.js → 4219ddfde68a6d0b.js} +1 -1
  488. package/web/.next/static/chunks/{562c70303d910295.js → 478adf5d5156f002.js} +1 -1
  489. package/web/.next/static/chunks/52681a7f14138e48.js +1 -0
  490. package/web/.next/static/chunks/5743a9c1c63e5261.js +5 -0
  491. package/web/.next/static/chunks/5cf9745e2ef3837c.js +1 -0
  492. package/web/.next/static/chunks/5e20f692bbfcfb94.js +7 -0
  493. package/web/.next/static/chunks/74729cbad964be13.js +1 -0
  494. package/web/.next/static/chunks/{c5d89c12a73e0461.js → 9a78b4c5dcd28196.js} +2 -2
  495. package/web/.next/static/chunks/c80e8e3d0cf5baa6.css +1 -0
  496. package/web/.next/static/chunks/cc5fe8d1d9e1e519.js +5 -0
  497. package/web/.next/static/chunks/d5bf9c963b5346e1.js +1 -0
  498. package/web/.next/static/chunks/d60cee2e7318f425.js +1 -0
  499. package/web/.next/static/chunks/da565c85277c2461.js +1 -0
  500. package/web/.next/static/chunks/e93ae5725b0babeb.js +1 -0
  501. package/web/.next/static/chunks/fb89cf91c10b2e8b.js +1 -0
  502. package/web/.next/static/chunks/{021c9b0effb6d688.js → fc595d95626ac9bb.js} +1 -1
  503. package/web/.next/static/chunks/{turbopack-57bb0674e2cd1d31.js → turbopack-b38a68b1b1c41a87.js} +1 -1
  504. package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js +0 -3
  505. package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js.map +0 -1
  506. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js +0 -4
  507. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +0 -1
  508. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js +0 -4
  509. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +0 -1
  510. package/web/.next/server/chunks/ssr/[root-of-the-server]__7ffd3598._.js.map +0 -1
  511. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js +0 -4
  512. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +0 -1
  513. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +0 -4
  514. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +0 -1
  515. package/web/.next/server/chunks/ssr/[root-of-the-server]__e88da4ee._.js.map +0 -1
  516. package/web/.next/server/chunks/ssr/_0727935d._.js.map +0 -1
  517. package/web/.next/server/chunks/ssr/_0dc06d07._.js +0 -3
  518. package/web/.next/server/chunks/ssr/_0dc06d07._.js.map +0 -1
  519. package/web/.next/server/chunks/ssr/_682fc996._.js +0 -9
  520. package/web/.next/server/chunks/ssr/_682fc996._.js.map +0 -1
  521. package/web/.next/server/chunks/ssr/_6892e3b9._.js +0 -3
  522. package/web/.next/server/chunks/ssr/_6892e3b9._.js.map +0 -1
  523. package/web/.next/server/chunks/ssr/_9b964adc._.js.map +0 -1
  524. package/web/.next/server/chunks/ssr/_a1068852._.js +0 -3
  525. package/web/.next/server/chunks/ssr/_a1068852._.js.map +0 -1
  526. package/web/.next/server/chunks/ssr/_fe058119._.js.map +0 -1
  527. package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js +0 -3
  528. package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js.map +0 -1
  529. package/web/.next/static/chunks/20f7cc98a013b11c.js +0 -1
  530. package/web/.next/static/chunks/4cec255f2754e5ec.js +0 -1
  531. package/web/.next/static/chunks/5b7275374d2696b3.css +0 -1
  532. package/web/.next/static/chunks/647140fe96a7c88a.js +0 -1
  533. package/web/.next/static/chunks/6d6f70ff5151b8cb.js +0 -7
  534. package/web/.next/static/chunks/84792d40edc4b027.js +0 -5
  535. package/web/.next/static/chunks/8800875bb3d56192.js +0 -3
  536. package/web/.next/static/chunks/8d581adafe8d1dd0.js +0 -1
  537. package/web/.next/static/chunks/982aef195c118996.js +0 -1
  538. package/web/.next/static/chunks/a052c19c18e9eced.js +0 -1
  539. package/web/.next/static/chunks/a6b5e739d2f89c6b.js +0 -1
  540. package/web/.next/static/chunks/b0e2fb3d4eb42f3d.js +0 -1
  541. package/web/.next/static/chunks/c3ef3b892f7794ec.js +0 -1
  542. package/web/.next/static/chunks/dc134f3f58cdf850.js +0 -5
  543. package/web/.next/static/chunks/ff9e33615f5c856c.js +0 -1
  544. /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → G895CgnbZl4YvWN_DaRC-}/_buildManifest.js +0 -0
  545. /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → G895CgnbZl4YvWN_DaRC-}/_clientMiddlewareManifest.json +0 -0
  546. /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → G895CgnbZl4YvWN_DaRC-}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[58773,e=>{"use strict";var t=e.i(22925),a=e.i(62995),n=e.i(14112),i=e.i(31716),r=e.i(16340),s=e.i(40522),o=e.i(21994),l=e.i(5802),c=e.i(17171),d=e.i(177),u=e.i(43685),p=e.i(84832),f=e.i(92435),v=e.i(41260),y=e.i(80556),m=e.i(93695);e.i(97230);var g=e.i(35162),h=e.i(40060),S=e.i(96907),R=e.i(45316);let N={[S.SdlcLifecycle.Started]:"requirements",[S.SdlcLifecycle.Analyze]:"analyze",[S.SdlcLifecycle.Requirements]:"requirements",[S.SdlcLifecycle.Research]:"research",[S.SdlcLifecycle.Planning]:"plan",[S.SdlcLifecycle.Implementation]:"implement",[S.SdlcLifecycle.Review]:"merge",[S.SdlcLifecycle.Maintain]:"maintain",[S.SdlcLifecycle.Blocked]:"blocked",[S.SdlcLifecycle.Pending]:"pending",[S.SdlcLifecycle.Deleting]:"blocked",[S.SdlcLifecycle.AwaitingUpstream]:"merge",[S.SdlcLifecycle.Archived]:"archived"},I={[S.AgentRunStatus.running]:{eventType:S.NotificationEventType.AgentStarted,severity:S.NotificationSeverity.Info},[S.AgentRunStatus.waitingApproval]:{eventType:S.NotificationEventType.WaitingApproval,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.completed]:{eventType:S.NotificationEventType.AgentCompleted,severity:S.NotificationSeverity.Success},[S.AgentRunStatus.failed]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Error},[S.AgentRunStatus.interrupted]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.cancelled]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning}};function w(e){if(e?.startsWith("node:"))return e.slice(5)}function E(e){try{let t=new URL(e.url).searchParams.get("runId"),a=new ReadableStream({start(a){let n=new TextEncoder,i=new Map,r=new Map,s=!1;function o(e){if(!s)try{a.enqueue(n.encode(e))}catch{}}function l(e){console.log(`[SSE] emit: ${e.eventType} for "${e.featureName}"${e.phaseName?` (${e.phaseName})`:""}`),o(`event: notification
1
+ module.exports=[58773,e=>{"use strict";var t=e.i(22925),a=e.i(62995),n=e.i(14112),i=e.i(31716),r=e.i(16340),s=e.i(40522),o=e.i(21994),l=e.i(5802),c=e.i(17171),d=e.i(177),u=e.i(43685),p=e.i(84832),f=e.i(92435),v=e.i(41260),y=e.i(80556),m=e.i(93695);e.i(97230);var g=e.i(35162),h=e.i(40060),S=e.i(96907),R=e.i(45316);let N={[S.SdlcLifecycle.Started]:"requirements",[S.SdlcLifecycle.Analyze]:"analyze",[S.SdlcLifecycle.Requirements]:"requirements",[S.SdlcLifecycle.Research]:"research",[S.SdlcLifecycle.Planning]:"plan",[S.SdlcLifecycle.Implementation]:"implement",[S.SdlcLifecycle.Review]:"merge",[S.SdlcLifecycle.Maintain]:"maintain",[S.SdlcLifecycle.Blocked]:"blocked",[S.SdlcLifecycle.Pending]:"pending",[S.SdlcLifecycle.Exploring]:"exploring",[S.SdlcLifecycle.Deleting]:"blocked",[S.SdlcLifecycle.AwaitingUpstream]:"merge",[S.SdlcLifecycle.Archived]:"archived"},I={[S.AgentRunStatus.running]:{eventType:S.NotificationEventType.AgentStarted,severity:S.NotificationSeverity.Info},[S.AgentRunStatus.waitingApproval]:{eventType:S.NotificationEventType.WaitingApproval,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.completed]:{eventType:S.NotificationEventType.AgentCompleted,severity:S.NotificationSeverity.Success},[S.AgentRunStatus.failed]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Error},[S.AgentRunStatus.interrupted]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.cancelled]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning}};function w(e){if(e?.startsWith("node:"))return e.slice(5)}function E(e){try{let t=new URL(e.url).searchParams.get("runId"),a=new ReadableStream({start(a){let n=new TextEncoder,i=new Map,r=new Map,s=!1;function o(e){if(!s)try{a.enqueue(n.encode(e))}catch{}}function l(e){console.log(`[SSE] emit: ${e.eventType} for "${e.featureName}"${e.phaseName?` (${e.phaseName})`:""}`),o(`event: notification
2
2
  data: ${JSON.stringify(e)}
3
3
 
4
4
  `)}let c=0;async function d(){if(!s)try{let e=(0,h.resolve)("ListFeaturesUseCase"),a=(0,h.resolve)("IAgentRunRepository"),n=(0,h.resolve)("IPhaseTimingRepository"),s=await e.execute();for(let{feature:e,run:r}of(await Promise.all(s.map(async e=>{let t=e.agentRunId?await a.findById(e.agentRunId):null;return{feature:e,run:t}})))){if(!r||t&&r.id!==t)continue;let a=i.get(e.id);if(!a){let t=new Set;try{for(let e of(await n.findByRunId(r.id)))e.completedAt&&t.add(e.phase)}catch{}i.set(e.id,{status:r.status,lifecycle:e.lifecycle,completedPhases:t,featureName:e.name,prStatus:e.pr?.status,prMergeable:e.pr?.mergeable,prCiStatus:e.pr?.ciStatus});continue}if(a.status!==r.status){a.status=r.status;let t=I[r.status];if(t){let a=w(r.result);l({eventType:t.eventType,agentRunId:r.id,featureId:e.id,featureName:e.name,...a&&{phaseName:a},message:`Agent status: ${r.status}`,severity:t.severity,timestamp:new Date().toISOString()})}}if((r.status===S.AgentRunStatus.running||r.status===S.AgentRunStatus.pending)&&r.pid&&!a.crashEmitted&&!(0,R.isProcessAlive)(r.pid)){a.crashEmitted=!0;let t=w(r.result);l({eventType:S.NotificationEventType.AgentFailed,agentRunId:r.id,featureId:e.id,featureName:e.name,...t&&{phaseName:t},message:`Agent crashed (PID ${r.pid} dead)`,severity:S.NotificationSeverity.Error,timestamp:new Date().toISOString()})}if(a.featureName!==e.name){a.featureName=e.name;let t=N[e.lifecycle]??"requirements";l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t,message:"Feature metadata updated",severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}if(a.lifecycle!==e.lifecycle){let t=a.lifecycle;a.lifecycle=e.lifecycle;let n=N[e.lifecycle];if(e.lifecycle===S.SdlcLifecycle.Review&&t!==S.SdlcLifecycle.Review){let t=e.pr?.url,a=t?`Ready for merge review — PR: ${t}`:"Ready for merge review";l({eventType:S.NotificationEventType.MergeReviewReady,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:"merge",message:a,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}else n&&l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:n,message:`Entered ${n} phase`,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}let s=e.pr?.status,o=e.pr?.mergeable,c=e.pr?.ciStatus;if(s!==a.prStatus||o!==a.prMergeable||c!==a.prCiStatus){a.prStatus=s,a.prMergeable=o,a.prCiStatus=c;let t=N[e.lifecycle]??"merge";l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t,message:!1===o?`PR #${e.pr?.number} has merge conflicts`:"PR status updated",severity:!1===o?S.NotificationSeverity.Warning:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}try{for(let t of(await n.findByRunId(r.id)))t.completedAt&&!a.completedPhases.has(t.phase)&&(a.completedPhases.add(t.phase),l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t.phase,message:`Completed ${t.phase} phase`,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()}))}catch{}}try{let e=(0,h.resolve)("IInteractiveSessionRepository"),t=await e.findAllActive();for(let e of t){let t=r.get(e.id);if(t?.status!==e.status){r.set(e.id,{status:e.status});let t={type:e.status===S.InteractiveSessionStatus.booting?"interactive_session_booting":e.status===S.InteractiveSessionStatus.ready?"interactive_session_ready":e.status===S.InteractiveSessionStatus.error?"interactive_session_error":"interactive_session_stopped",sessionId:e.id,featureId:e.featureId};o(`event: interactive_session
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/presentation/web/app/api/agent-events/route.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/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * SSE API Route: GET /api/agent-events\n *\n * Streams agent lifecycle notification events to connected web UI clients\n * via Server-Sent Events (SSE).\n *\n * Uses DB polling with a per-connection cache so only deltas are sent.\n * This avoids cross-module singleton issues with an in-process event bus.\n *\n * - Polls features + agent runs every 500ms\n * - Compares against cached state and emits only changes\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Supports optional ?runId query parameter to filter events\n * - Cleans up intervals on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\nimport type { IPhaseTimingRepository } from '@shepai/core/application/ports/output/agents/phase-timing-repository.interface';\nimport type { IInteractiveSessionRepository } from '@shepai/core/application/ports/output/repositories/interactive-session-repository.interface';\nimport type { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport {\n AgentRunStatus,\n InteractiveSessionStatus,\n SdlcLifecycle,\n NotificationEventType,\n NotificationSeverity,\n} from '@shepai/core/domain/generated/output';\nimport { isProcessAlive } from '@shepai/core/infrastructure/services/process/is-process-alive';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\nimport type { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst POLL_INTERVAL_MS = 2_000;\nconst HEARTBEAT_INTERVAL_MS = 30_000;\n\ninterface CachedFeatureState {\n status: AgentRunStatus | null;\n lifecycle: string;\n completedPhases: Set<string>;\n featureName: string;\n prStatus: string | undefined;\n prMergeable: boolean | undefined;\n prCiStatus: string | undefined;\n /** Set to true once we've detected and emitted a crash event for this feature */\n crashEmitted?: boolean;\n}\n\n/**\n * Maps SdlcLifecycle values to agent graph node names so the client\n * can derive the correct FeatureLifecyclePhase via mapPhaseNameToLifecycle().\n */\nconst LIFECYCLE_TO_NODE: Record<SdlcLifecycle, string> = {\n [SdlcLifecycle.Started]: 'requirements',\n [SdlcLifecycle.Analyze]: 'analyze',\n [SdlcLifecycle.Requirements]: 'requirements',\n [SdlcLifecycle.Research]: 'research',\n [SdlcLifecycle.Planning]: 'plan',\n [SdlcLifecycle.Implementation]: 'implement',\n [SdlcLifecycle.Review]: 'merge',\n [SdlcLifecycle.Maintain]: 'maintain',\n [SdlcLifecycle.Blocked]: 'blocked',\n [SdlcLifecycle.Pending]: 'pending',\n [SdlcLifecycle.Deleting]: 'blocked',\n [SdlcLifecycle.AwaitingUpstream]: 'merge',\n [SdlcLifecycle.Archived]: 'archived',\n};\n\nconst STATUS_TO_EVENT: Partial<\n Record<AgentRunStatus, { eventType: NotificationEventType; severity: NotificationSeverity }>\n> = {\n [AgentRunStatus.running]: {\n eventType: NotificationEventType.AgentStarted,\n severity: NotificationSeverity.Info,\n },\n [AgentRunStatus.waitingApproval]: {\n eventType: NotificationEventType.WaitingApproval,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.completed]: {\n eventType: NotificationEventType.AgentCompleted,\n severity: NotificationSeverity.Success,\n },\n [AgentRunStatus.failed]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Error,\n },\n [AgentRunStatus.interrupted]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.cancelled]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n};\n\n/** Map agent graph node name from AgentRun.result to a phase name. */\nfunction resultToPhase(result: string | undefined): string | undefined {\n if (!result?.startsWith('node:')) return undefined;\n return result.slice(5); // \"node:analyze\" → \"analyze\"\n}\n\n/** Payload emitted for interactive session lifecycle SSE events. */\nexport interface InteractiveSessionEvent {\n type:\n | 'interactive_session_booting'\n | 'interactive_session_ready'\n | 'interactive_session_stopped'\n | 'interactive_session_error';\n sessionId: string;\n featureId: string;\n}\n\n/** Per-connection cache entry for interactive sessions. */\ninterface CachedSessionState {\n status: InteractiveSessionStatus;\n}\n\nexport function GET(request: Request): Response {\n try {\n const url = new URL(request.url);\n const runIdFilter = url.searchParams.get('runId');\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n\n // Per-connection cache: featureId → last-seen state\n const cache = new Map<string, CachedFeatureState>();\n // Per-connection cache: sessionId → last-seen interactive session state\n const sessionCache = new Map<string, CachedSessionState>();\n let stopped = false;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n function emitEvent(event: NotificationEvent) {\n // eslint-disable-next-line no-console\n console.log(\n `[SSE] emit: ${event.eventType} for \"${event.featureName}\"${event.phaseName ? ` (${event.phaseName})` : ''}`\n );\n enqueue(`event: notification\\ndata: ${JSON.stringify(event)}\\n\\n`);\n }\n\n let pollErrorCount = 0;\n\n async function poll() {\n if (stopped) return;\n\n try {\n const listFeatures = resolve<ListFeaturesUseCase>('ListFeaturesUseCase');\n const agentRunRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const phaseTimingRepo = resolve<IPhaseTimingRepository>('IPhaseTimingRepository');\n\n const features = await listFeatures.execute();\n\n // Build current state for features with agent runs\n const entries: { feature: Feature; run: AgentRun | null }[] = await Promise.all(\n features.map(async (feature) => {\n const run = feature.agentRunId\n ? await agentRunRepo.findById(feature.agentRunId)\n : null;\n return { feature, run };\n })\n );\n\n for (const { feature, run } of entries) {\n if (!run) continue;\n\n // Apply runId filter if present\n if (runIdFilter && run.id !== runIdFilter) continue;\n\n const prev = cache.get(feature.id);\n\n if (!prev) {\n // First time seeing this feature — seed cache, don't emit\n const completedPhases = new Set<string>();\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt) completedPhases.add(t.phase);\n }\n } catch {\n // Ignore timing errors\n }\n\n cache.set(feature.id, {\n status: run.status,\n lifecycle: feature.lifecycle,\n completedPhases,\n featureName: feature.name,\n prStatus: feature.pr?.status,\n prMergeable: feature.pr?.mergeable,\n prCiStatus: feature.pr?.ciStatus,\n });\n continue;\n }\n\n // Check for status change\n if (prev.status !== run.status) {\n prev.status = run.status;\n const mapping = STATUS_TO_EVENT[run.status];\n if (mapping) {\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: mapping.eventType,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent status: ${run.status}`,\n severity: mapping.severity,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for crashed agent: status is running/pending but PID is dead\n const isActive =\n run.status === AgentRunStatus.running || run.status === AgentRunStatus.pending;\n if (isActive && run.pid && !prev.crashEmitted && !isProcessAlive(run.pid)) {\n prev.crashEmitted = true;\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: NotificationEventType.AgentFailed,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent crashed (PID ${run.pid} dead)`,\n severity: NotificationSeverity.Error,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for feature name change (AI metadata generation updates name)\n if (prev.featureName !== feature.name) {\n prev.featureName = feature.name;\n const nodeName =\n LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'requirements';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Feature metadata updated`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for lifecycle change (agent stays \"running\" but moves through phases)\n if (prev.lifecycle !== feature.lifecycle) {\n const prevLifecycle = prev.lifecycle;\n prev.lifecycle = feature.lifecycle;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle];\n\n // Emit MergeReviewReady when lifecycle transitions TO Review\n if (\n feature.lifecycle === SdlcLifecycle.Review &&\n prevLifecycle !== SdlcLifecycle.Review\n ) {\n const prUrl = feature.pr?.url;\n const message = prUrl\n ? `Ready for merge review — PR: ${prUrl}`\n : 'Ready for merge review';\n emitEvent({\n eventType: NotificationEventType.MergeReviewReady,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: 'merge',\n message,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n } else if (nodeName) {\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Entered ${nodeName} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for PR data changes (status / mergeable / CI status)\n const curPrStatus = feature.pr?.status;\n const curMergeable = feature.pr?.mergeable;\n const curCiStatus = feature.pr?.ciStatus;\n if (\n curPrStatus !== prev.prStatus ||\n curMergeable !== prev.prMergeable ||\n curCiStatus !== prev.prCiStatus\n ) {\n prev.prStatus = curPrStatus;\n prev.prMergeable = curMergeable;\n prev.prCiStatus = curCiStatus;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'merge';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message:\n curMergeable === false\n ? `PR #${feature.pr?.number} has merge conflicts`\n : `PR status updated`,\n severity:\n curMergeable === false\n ? NotificationSeverity.Warning\n : NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for new phase completions\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt && !prev.completedPhases.has(t.phase)) {\n prev.completedPhases.add(t.phase);\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: t.phase,\n message: `Completed ${t.phase} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n } catch {\n // Ignore timing errors\n }\n }\n // Poll interactive sessions for lifecycle status changes\n try {\n const sessionRepo = resolve<IInteractiveSessionRepository>(\n 'IInteractiveSessionRepository'\n );\n const activeSessions = await sessionRepo.findAllActive();\n\n for (const session of activeSessions) {\n const prev = sessionCache.get(session.id);\n if (prev?.status !== session.status) {\n sessionCache.set(session.id, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.booting\n ? 'interactive_session_booting'\n : session.status === InteractiveSessionStatus.ready\n ? 'interactive_session_ready'\n : session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n }\n }\n\n // Emit stopped/error events for sessions that disappeared from active list\n for (const [sessionId, cached] of sessionCache) {\n if (\n (cached.status === InteractiveSessionStatus.booting ||\n cached.status === InteractiveSessionStatus.ready) &&\n !activeSessions.find((s) => s.id === sessionId)\n ) {\n // Session no longer active — fetch to get final status\n const session = await sessionRepo.findById(sessionId);\n if (session) {\n sessionCache.set(sessionId, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n } else {\n sessionCache.delete(sessionId);\n }\n }\n }\n } catch {\n // Ignore interactive session poll errors to not affect main polling\n }\n\n pollErrorCount = 0; // Reset on success\n } catch (error) {\n pollErrorCount++;\n // Log first few errors, then throttle to avoid spamming\n if (pollErrorCount <= 3 || pollErrorCount % 60 === 0) {\n // eslint-disable-next-line no-console\n console.error(\n `[SSE /api/agent-events] poll error #${pollErrorCount}:`,\n error instanceof Error ? error.message : error\n );\n }\n }\n }\n\n // First poll immediately, then every POLL_INTERVAL_MS\n void poll();\n const pollInterval = setInterval(() => void poll(), POLL_INTERVAL_MS);\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n clearInterval(pollInterval);\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[SSE route] GET handler error:', error);\n return new Response(JSON.stringify({ error: String(error) }), {\n status: 500,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agent-events/route\",\n pathname: \"/api/agent-events\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/agent-events/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agent-events/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"uCCAA,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,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODAA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OAOA,EAAA,EAAA,CAAA,CAAA,OA0BA,IAAM,EAAmD,CACvD,CAAC,EAAA,aAAa,CAAC,OAAO,CAAC,CAAE,eACzB,CAAC,EAAA,aAAa,CAAC,OAAO,CAAC,CAAE,UACzB,CAAC,EAAA,aAAa,CAAC,YAAY,CAAC,CAAE,eAC9B,CAAC,EAAA,aAAa,CAAC,QAAQ,CAAC,CAAE,W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,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAqB,AAArB,EAAsB,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GACvB,AAD0B,CAE9B,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
1
+ {"version":3,"sources":["../../../../../../src/presentation/web/app/api/agent-events/route.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/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * SSE API Route: GET /api/agent-events\n *\n * Streams agent lifecycle notification events to connected web UI clients\n * via Server-Sent Events (SSE).\n *\n * Uses DB polling with a per-connection cache so only deltas are sent.\n * This avoids cross-module singleton issues with an in-process event bus.\n *\n * - Polls features + agent runs every 500ms\n * - Compares against cached state and emits only changes\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Supports optional ?runId query parameter to filter events\n * - Cleans up intervals on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\nimport type { IPhaseTimingRepository } from '@shepai/core/application/ports/output/agents/phase-timing-repository.interface';\nimport type { IInteractiveSessionRepository } from '@shepai/core/application/ports/output/repositories/interactive-session-repository.interface';\nimport type { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport {\n AgentRunStatus,\n InteractiveSessionStatus,\n SdlcLifecycle,\n NotificationEventType,\n NotificationSeverity,\n} from '@shepai/core/domain/generated/output';\nimport { isProcessAlive } from '@shepai/core/infrastructure/services/process/is-process-alive';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\nimport type { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst POLL_INTERVAL_MS = 2_000;\nconst HEARTBEAT_INTERVAL_MS = 30_000;\n\ninterface CachedFeatureState {\n status: AgentRunStatus | null;\n lifecycle: string;\n completedPhases: Set<string>;\n featureName: string;\n prStatus: string | undefined;\n prMergeable: boolean | undefined;\n prCiStatus: string | undefined;\n /** Set to true once we've detected and emitted a crash event for this feature */\n crashEmitted?: boolean;\n}\n\n/**\n * Maps SdlcLifecycle values to agent graph node names so the client\n * can derive the correct FeatureLifecyclePhase via mapPhaseNameToLifecycle().\n */\nconst LIFECYCLE_TO_NODE: Record<SdlcLifecycle, string> = {\n [SdlcLifecycle.Started]: 'requirements',\n [SdlcLifecycle.Analyze]: 'analyze',\n [SdlcLifecycle.Requirements]: 'requirements',\n [SdlcLifecycle.Research]: 'research',\n [SdlcLifecycle.Planning]: 'plan',\n [SdlcLifecycle.Implementation]: 'implement',\n [SdlcLifecycle.Review]: 'merge',\n [SdlcLifecycle.Maintain]: 'maintain',\n [SdlcLifecycle.Blocked]: 'blocked',\n [SdlcLifecycle.Pending]: 'pending',\n [SdlcLifecycle.Exploring]: 'exploring',\n [SdlcLifecycle.Deleting]: 'blocked',\n [SdlcLifecycle.AwaitingUpstream]: 'merge',\n [SdlcLifecycle.Archived]: 'archived',\n};\n\nconst STATUS_TO_EVENT: Partial<\n Record<AgentRunStatus, { eventType: NotificationEventType; severity: NotificationSeverity }>\n> = {\n [AgentRunStatus.running]: {\n eventType: NotificationEventType.AgentStarted,\n severity: NotificationSeverity.Info,\n },\n [AgentRunStatus.waitingApproval]: {\n eventType: NotificationEventType.WaitingApproval,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.completed]: {\n eventType: NotificationEventType.AgentCompleted,\n severity: NotificationSeverity.Success,\n },\n [AgentRunStatus.failed]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Error,\n },\n [AgentRunStatus.interrupted]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.cancelled]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n};\n\n/** Map agent graph node name from AgentRun.result to a phase name. */\nfunction resultToPhase(result: string | undefined): string | undefined {\n if (!result?.startsWith('node:')) return undefined;\n return result.slice(5); // \"node:analyze\" → \"analyze\"\n}\n\n/** Payload emitted for interactive session lifecycle SSE events. */\nexport interface InteractiveSessionEvent {\n type:\n | 'interactive_session_booting'\n | 'interactive_session_ready'\n | 'interactive_session_stopped'\n | 'interactive_session_error';\n sessionId: string;\n featureId: string;\n}\n\n/** Per-connection cache entry for interactive sessions. */\ninterface CachedSessionState {\n status: InteractiveSessionStatus;\n}\n\nexport function GET(request: Request): Response {\n try {\n const url = new URL(request.url);\n const runIdFilter = url.searchParams.get('runId');\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n\n // Per-connection cache: featureId → last-seen state\n const cache = new Map<string, CachedFeatureState>();\n // Per-connection cache: sessionId → last-seen interactive session state\n const sessionCache = new Map<string, CachedSessionState>();\n let stopped = false;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n function emitEvent(event: NotificationEvent) {\n // eslint-disable-next-line no-console\n console.log(\n `[SSE] emit: ${event.eventType} for \"${event.featureName}\"${event.phaseName ? ` (${event.phaseName})` : ''}`\n );\n enqueue(`event: notification\\ndata: ${JSON.stringify(event)}\\n\\n`);\n }\n\n let pollErrorCount = 0;\n\n async function poll() {\n if (stopped) return;\n\n try {\n const listFeatures = resolve<ListFeaturesUseCase>('ListFeaturesUseCase');\n const agentRunRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const phaseTimingRepo = resolve<IPhaseTimingRepository>('IPhaseTimingRepository');\n\n const features = await listFeatures.execute();\n\n // Build current state for features with agent runs\n const entries: { feature: Feature; run: AgentRun | null }[] = await Promise.all(\n features.map(async (feature) => {\n const run = feature.agentRunId\n ? await agentRunRepo.findById(feature.agentRunId)\n : null;\n return { feature, run };\n })\n );\n\n for (const { feature, run } of entries) {\n if (!run) continue;\n\n // Apply runId filter if present\n if (runIdFilter && run.id !== runIdFilter) continue;\n\n const prev = cache.get(feature.id);\n\n if (!prev) {\n // First time seeing this feature — seed cache, don't emit\n const completedPhases = new Set<string>();\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt) completedPhases.add(t.phase);\n }\n } catch {\n // Ignore timing errors\n }\n\n cache.set(feature.id, {\n status: run.status,\n lifecycle: feature.lifecycle,\n completedPhases,\n featureName: feature.name,\n prStatus: feature.pr?.status,\n prMergeable: feature.pr?.mergeable,\n prCiStatus: feature.pr?.ciStatus,\n });\n continue;\n }\n\n // Check for status change\n if (prev.status !== run.status) {\n prev.status = run.status;\n const mapping = STATUS_TO_EVENT[run.status];\n if (mapping) {\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: mapping.eventType,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent status: ${run.status}`,\n severity: mapping.severity,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for crashed agent: status is running/pending but PID is dead\n const isActive =\n run.status === AgentRunStatus.running || run.status === AgentRunStatus.pending;\n if (isActive && run.pid && !prev.crashEmitted && !isProcessAlive(run.pid)) {\n prev.crashEmitted = true;\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: NotificationEventType.AgentFailed,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent crashed (PID ${run.pid} dead)`,\n severity: NotificationSeverity.Error,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for feature name change (AI metadata generation updates name)\n if (prev.featureName !== feature.name) {\n prev.featureName = feature.name;\n const nodeName =\n LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'requirements';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Feature metadata updated`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for lifecycle change (agent stays \"running\" but moves through phases)\n if (prev.lifecycle !== feature.lifecycle) {\n const prevLifecycle = prev.lifecycle;\n prev.lifecycle = feature.lifecycle;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle];\n\n // Emit MergeReviewReady when lifecycle transitions TO Review\n if (\n feature.lifecycle === SdlcLifecycle.Review &&\n prevLifecycle !== SdlcLifecycle.Review\n ) {\n const prUrl = feature.pr?.url;\n const message = prUrl\n ? `Ready for merge review — PR: ${prUrl}`\n : 'Ready for merge review';\n emitEvent({\n eventType: NotificationEventType.MergeReviewReady,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: 'merge',\n message,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n } else if (nodeName) {\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Entered ${nodeName} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for PR data changes (status / mergeable / CI status)\n const curPrStatus = feature.pr?.status;\n const curMergeable = feature.pr?.mergeable;\n const curCiStatus = feature.pr?.ciStatus;\n if (\n curPrStatus !== prev.prStatus ||\n curMergeable !== prev.prMergeable ||\n curCiStatus !== prev.prCiStatus\n ) {\n prev.prStatus = curPrStatus;\n prev.prMergeable = curMergeable;\n prev.prCiStatus = curCiStatus;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'merge';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message:\n curMergeable === false\n ? `PR #${feature.pr?.number} has merge conflicts`\n : `PR status updated`,\n severity:\n curMergeable === false\n ? NotificationSeverity.Warning\n : NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for new phase completions\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt && !prev.completedPhases.has(t.phase)) {\n prev.completedPhases.add(t.phase);\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: t.phase,\n message: `Completed ${t.phase} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n } catch {\n // Ignore timing errors\n }\n }\n // Poll interactive sessions for lifecycle status changes\n try {\n const sessionRepo = resolve<IInteractiveSessionRepository>(\n 'IInteractiveSessionRepository'\n );\n const activeSessions = await sessionRepo.findAllActive();\n\n for (const session of activeSessions) {\n const prev = sessionCache.get(session.id);\n if (prev?.status !== session.status) {\n sessionCache.set(session.id, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.booting\n ? 'interactive_session_booting'\n : session.status === InteractiveSessionStatus.ready\n ? 'interactive_session_ready'\n : session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n }\n }\n\n // Emit stopped/error events for sessions that disappeared from active list\n for (const [sessionId, cached] of sessionCache) {\n if (\n (cached.status === InteractiveSessionStatus.booting ||\n cached.status === InteractiveSessionStatus.ready) &&\n !activeSessions.find((s) => s.id === sessionId)\n ) {\n // Session no longer active — fetch to get final status\n const session = await sessionRepo.findById(sessionId);\n if (session) {\n sessionCache.set(sessionId, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n } else {\n sessionCache.delete(sessionId);\n }\n }\n }\n } catch {\n // Ignore interactive session poll errors to not affect main polling\n }\n\n pollErrorCount = 0; // Reset on success\n } catch (error) {\n pollErrorCount++;\n // Log first few errors, then throttle to avoid spamming\n if (pollErrorCount <= 3 || pollErrorCount % 60 === 0) {\n // eslint-disable-next-line no-console\n console.error(\n `[SSE /api/agent-events] poll error #${pollErrorCount}:`,\n error instanceof Error ? error.message : error\n );\n }\n }\n }\n\n // First poll immediately, then every POLL_INTERVAL_MS\n void poll();\n const pollInterval = setInterval(() => void poll(), POLL_INTERVAL_MS);\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n clearInterval(pollInterval);\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[SSE route] GET handler error:', error);\n return new Response(JSON.stringify({ error: String(error) }), {\n status: 500,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agent-events/route\",\n pathname: \"/api/agent-events\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/agent-events/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agent-events/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"uCCAA,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,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODAA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OAOA,EAAA,EAAA,CAAA,CAAA,OA0BA,IAAM,EAAmD,CACvD,CAAC,EAAA,aAAa,CAAC,OAAO,CAAC,CAAE,eACzB,CAAC,EAAA,aAAa,CAAC,OAAO,CAAC,CAAE,UACzB,CAAC,EAAA,aAAa,CAAC,YAAY,CAAC,CAAE,eAC9B,CA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,EAAQ,AADgB,GAAG,GACb,CAAC,EAAA,sBAAsB,GAIrC,EAAW,YAAY,EAAK,EAAD,AAAK,SAAS,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
@@ -1,3 +1,3 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},16753,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),v=e.i(41260),x=e.i(80556),f=e.i(93695);e.i(97230);var m=e.i(35162),R=e.i(27980),g=e.i(40060);function w(){try{let{version:e,name:t,description:r}=(0,g.resolve)("IVersionService").getVersion();return R.NextResponse.json({version:e,packageName:t,description:r,branch:"main",commitHash:"af39abb2373c8fc68bf15ec2e69fb847fa58f64c",instancePath:"/home/runner/work/shep/shep/src/presentation/web",isDev:!1})}catch{return R.NextResponse.json({version:"1.169.0",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform - Automate the development cycle from idea to deploy",branch:"main",commitHash:"af39abb2373c8fc68bf15ec2e69fb847fa58f64c",instancePath:"/home/runner/work/shep/shep/src/presentation/web",isDev:!1})}}e.s(["GET",()=>w,"dynamic",0,"force-dynamic"],35003);var E=e.i(35003);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/version/route",pathname:"/api/version",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/version/route.ts",nextConfigOutput:"",userland:E}),{workAsyncStorage:y,workUnitAsyncStorage:C,serverHooks:A}=b;function N(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:C})}async function P(e,t,a){b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/version/route";R=R.replace(/\/index$/,"")||"/";let g=await b.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:y,parsedUrl:C,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,resolvedPathname:_,clientReferenceManifest:O,serverActionsManifest:S}=g,q=(0,i.normalizeAppPath)(R),j=!!(N.dynamicRoutes[q]||N.routes[_]),H=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,C,!1):t.end("This page could not be found"),null);if(j&&!A){let e=!!N.routes[_],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await H();throw new f.NoFallbackError}}let I=null;!j||b.isDev||A||(I="/index"===(I=_)?"/":I);let D=!0===b.isDev||!j,U=j&&!D;S&&O&&(0,o.setManifestsSingleton)({page:R,clientReferenceManifest:O,serverActionsManifest:S});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:E,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,P)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&T&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!j)return await (0,c.sendResponse)(L,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),t}},u=await b.handleResponse({req:e,nextConfig:y,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!j)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&j||f.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),j)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>N,"routeModule",()=>b,"serverHooks",()=>A,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>C],16753)}];
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},16753,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),v=e.i(41260),x=e.i(80556),R=e.i(93695);e.i(97230);var m=e.i(35162),f=e.i(27980),g=e.i(40060);function w(){try{let{version:e,name:t,description:r}=(0,g.resolve)("IVersionService").getVersion();return f.NextResponse.json({version:e,packageName:t,description:r,branch:"HEAD",commitHash:"cff27cbca260d67c2a1bda02675d4435876338d2",instancePath:"/home/runner/work/shep/shep/src/presentation/web",isDev:!1})}catch{return f.NextResponse.json({version:"1.170.0",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform - Automate the development cycle from idea to deploy",branch:"HEAD",commitHash:"cff27cbca260d67c2a1bda02675d4435876338d2",instancePath:"/home/runner/work/shep/shep/src/presentation/web",isDev:!1})}}e.s(["GET",()=>w,"dynamic",0,"force-dynamic"],35003);var E=e.i(35003);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/version/route",pathname:"/api/version",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/version/route.ts",nextConfigOutput:"",userland:E}),{workAsyncStorage:y,workUnitAsyncStorage:C,serverHooks:A}=b;function N(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:C})}async function P(e,t,a){b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/version/route";f=f.replace(/\/index$/,"")||"/";let g=await b.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:y,parsedUrl:C,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,resolvedPathname:_,clientReferenceManifest:H,serverActionsManifest:O}=g,S=(0,i.normalizeAppPath)(f),q=!!(N.dynamicRoutes[S]||N.routes[_]),j=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,C,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!N.routes[_],t=N.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await j();throw new R.NoFallbackError}}let D=null;!q||b.isDev||A||(D="/index"===(D=_)?"/":D);let I=!0===b.isDev||!q,U=q&&!I;O&&H&&(0,o.setManifestsSingleton)({page:f,clientReferenceManifest:H,serverActionsManifest:O});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:E,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,P)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${f}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&T&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(L,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),t}},u=await b.handleResponse({req:e,nextConfig:y,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:k,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||R.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:R,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,P),q)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>N,"routeModule",()=>b,"serverHooks",()=>A,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>C],16753)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__a402b567._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function r(e){let r=globalThis.__shepContainer;if(!r)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return r.resolve(e)}e.s(["resolve",()=>r])},74533,(e,r,t)=>{r.exports=e.x("node:child_process",()=>require("node:child_process"))},12714,(e,r,t)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},60526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},66680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},12057,(e,r,t)=>{r.exports=e.x("node:util",()=>require("node:util"))},32828,e=>{"use strict";e.i(12714);var r=e.i(60526),t=e.i(50227);function n(){return process.env.SHEP_HOME??(0,t.join)((0,r.homedir)(),".shep")}e.i(2157),e.s(["getShepHomeDir",()=>n])},96907,45316,e=>{"use strict";(r={}).PRD="PRD",r.API="API",r.Design="Design",r.Other="Other",(t={}).Markdown="md",t.Text="txt",t.Yaml="yaml",t.Other="Other",(n={}).Todo="Todo",n.Elaborating="Elaborating",n.Done="Done",(i={}).Assistant="assistant",i.User="user",(s={}).Functional="Functional",s.NonFunctional="NonFunctional",(o={}).NotStarted="NotStarted",o.Running="Running",o.Finished="Finished";var r,t,n,i,s,o,a,d,p,c,l,u,g,m,x,v,h,y,R,C,P,f,k,S,w,q,A,D,_,b=((a={}).English="en",a.Russian="ru",a.Portuguese="pt",a.Spanish="es",a.Arabic="ar",a.Hebrew="he",a.French="fr",a.German="de",a);(d={}).VsCode="vscode",d.Cursor="cursor",d.Windsurf="windsurf",d.Zed="zed",d.Antigravity="antigravity",(p={}).System="system",p.Warp="warp",p.ITerm2="iterm2",p.Alacritty="alacritty",p.Kitty="kitty",(c={}).ClaudeCode="claude-code",c.CodexCli="codex-cli",c.GeminiCli="gemini-cli",c.Aider="aider",c.Continue="continue",c.Cursor="cursor",c.Dev="dev",(l={}).Session="session",l.Token="token";var T=((u={}).Todo="Todo",u.WIP="Work in Progress",u.Done="Done",u.Review="Review",u);(g={}).Requirements="Requirements",g.ClarificationRequired="ClarificationRequired",g.Ready="Ready";var I=((m={}).Started="Started",m.Analyze="Analyze",m.Requirements="Requirements",m.Research="Research",m.Planning="Planning",m.Implementation="Implementation",m.Review="Review",m.Maintain="Maintain",m.Blocked="Blocked",m.Pending="Pending",m.Deleting="Deleting",m.AwaitingUpstream="AwaitingUpstream",m.Archived="Archived",m);(x={}).Open="Open",x.Merged="Merged",x.Closed="Closed",(v={}).Pending="Pending",v.Success="Success",v.Failure="Failure",(h={}).VsCode="vscode",h.Cursor="cursor",h.Windsurf="windsurf",h.Zed="zed",h.Antigravity="antigravity",h.CursorCli="cursor-cli",h.ClaudeCode="claude-code";var j=((y={}).AgentStarted="agent_started",y.PhaseCompleted="phase_completed",y.WaitingApproval="waiting_approval",y.AgentCompleted="agent_completed",y.AgentFailed="agent_failed",y.PrMerged="pr_merged",y.PrClosed="pr_closed",y.PrChecksPassed="pr_checks_passed",y.PrChecksFailed="pr_checks_failed",y.PrBlocked="pr_blocked",y.MergeReviewReady="merge_review_ready",y),E=((R={}).Info="info",R.Warning="warning",R.Success="success",R.Error="error",R);(C={}).Screenshot="Screenshot",C.Video="Video",C.TestOutput="TestOutput",C.TerminalRecording="TerminalRecording",(P={}).Idle="Idle",P.Running="Running",P.Paused="Paused",P.Stopped="Stopped",(f={}).GatheringRequirements="GatheringRequirements",f.ClarificationsRequired="ClarificationsRequired",f.DoingResearch="DoingResearch",f.AwaitingReview="AwaitingReview",f.ExecutingWorkPlan="ExecutingWorkPlan",f.Ready="Ready",(k={}).TCP="TCP",k.UDP="UDP",(S={}).DockerCompose="DockerCompose",S.Docker="Docker",S.Kubernetes="Kubernetes",S.Script="Script",S.Manual="Manual",(w={}).Booting="Booting",w.Ready="Ready",w.Stopped="Stopped";var F=((q={}).pending="pending",q.running="running",q.completed="completed",q.failed="failed",q.interrupted="interrupted",q.cancelled="cancelled",q.waitingApproval="waiting_approval",q),M=((A={}).booting="booting",A.ready="ready",A.stopped="stopped",A.error="error",A);function O(e){try{return process.kill(e,0),!0}catch{return!1}}(D={}).user="user",D.assistant="assistant",(_={}).sessionResume="session-resume",_.streaming="streaming",_.toolScoping="tool-scoping",_.structuredOutput="structured-output",_.systemPrompt="system-prompt",_.sessionListing="session-listing",e.s(["AgentRunStatus",()=>F,"InteractiveSessionStatus",()=>M,"Language",()=>b,"NotificationEventType",()=>j,"NotificationSeverity",()=>E,"SdlcLifecycle",()=>I,"TaskState",()=>T],96907),e.s(["isProcessAlive",()=>O],45316)}];
1
+ module.exports=[18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function r(e){let r=globalThis.__shepContainer;if(!r)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return r.resolve(e)}e.s(["resolve",()=>r])},74533,(e,r,t)=>{r.exports=e.x("node:child_process",()=>require("node:child_process"))},12714,(e,r,t)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},60526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},66680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},12057,(e,r,t)=>{r.exports=e.x("node:util",()=>require("node:util"))},32828,e=>{"use strict";e.i(12714);var r=e.i(60526),t=e.i(50227);function n(){return process.env.SHEP_HOME??(0,t.join)((0,r.homedir)(),".shep")}e.i(2157),e.s(["getShepHomeDir",()=>n])},96907,45316,e=>{"use strict";(r={}).PRD="PRD",r.API="API",r.Design="Design",r.Other="Other",(t={}).Markdown="md",t.Text="txt",t.Yaml="yaml",t.Other="Other",(n={}).Todo="Todo",n.Elaborating="Elaborating",n.Done="Done",(i={}).Assistant="assistant",i.User="user",(s={}).Functional="Functional",s.NonFunctional="NonFunctional",(o={}).NotStarted="NotStarted",o.Running="Running",o.Finished="Finished";var r,t,n,i,s,o,a,d,l,p,u,c,g,x,m,v,R,h,y,C,P,f,k,S,w,q,A,D,_,b,T,E=((a={}).English="en",a.Russian="ru",a.Portuguese="pt",a.Spanish="es",a.Arabic="ar",a.Hebrew="he",a.French="fr",a.German="de",a);(d={}).VsCode="vscode",d.Cursor="cursor",d.Windsurf="windsurf",d.Zed="zed",d.Antigravity="antigravity",(l={}).System="system",l.Warp="warp",l.ITerm2="iterm2",l.Alacritty="alacritty",l.Kitty="kitty",(p={}).Local="local",p.Remote="remote",(u={}).ClaudeCode="claude-code",u.CodexCli="codex-cli",u.GeminiCli="gemini-cli",u.Aider="aider",u.Continue="continue",u.Cursor="cursor",u.Dev="dev",(c={}).Session="session",c.Token="token";var F=((g={}).Todo="Todo",g.WIP="Work in Progress",g.Done="Done",g.Review="Review",g);(x={}).Requirements="Requirements",x.ClarificationRequired="ClarificationRequired",x.Ready="Ready";var I=((m={}).Started="Started",m.Analyze="Analyze",m.Requirements="Requirements",m.Research="Research",m.Planning="Planning",m.Implementation="Implementation",m.Review="Review",m.Maintain="Maintain",m.Blocked="Blocked",m.Pending="Pending",m.Exploring="Exploring",m.Deleting="Deleting",m.AwaitingUpstream="AwaitingUpstream",m.Archived="Archived",m),j=((v={}).Regular="Regular",v.Fast="Fast",v.Exploration="Exploration",v);(R={}).Open="Open",R.Merged="Merged",R.Closed="Closed",(h={}).Pending="Pending",h.Success="Success",h.Failure="Failure",(y={}).VsCode="vscode",y.Cursor="cursor",y.Windsurf="windsurf",y.Zed="zed",y.Antigravity="antigravity",y.CursorCli="cursor-cli",y.ClaudeCode="claude-code";var M=((C={}).AgentStarted="agent_started",C.PhaseCompleted="phase_completed",C.WaitingApproval="waiting_approval",C.AgentCompleted="agent_completed",C.AgentFailed="agent_failed",C.PrMerged="pr_merged",C.PrClosed="pr_closed",C.PrChecksPassed="pr_checks_passed",C.PrChecksFailed="pr_checks_failed",C.PrBlocked="pr_blocked",C.MergeReviewReady="merge_review_ready",C),O=((P={}).Info="info",P.Warning="warning",P.Success="success",P.Error="error",P);(f={}).Screenshot="Screenshot",f.Video="Video",f.TestOutput="TestOutput",f.TerminalRecording="TerminalRecording",(k={}).Idle="Idle",k.Running="Running",k.Paused="Paused",k.Stopped="Stopped",(S={}).GatheringRequirements="GatheringRequirements",S.ClarificationsRequired="ClarificationsRequired",S.DoingResearch="DoingResearch",S.AwaitingReview="AwaitingReview",S.ExecutingWorkPlan="ExecutingWorkPlan",S.Ready="Ready",(w={}).TCP="TCP",w.UDP="UDP",(q={}).DockerCompose="DockerCompose",q.Docker="Docker",q.Kubernetes="Kubernetes",q.Script="Script",q.Manual="Manual",(A={}).Booting="Booting",A.Ready="Ready",A.Stopped="Stopped";var W=((D={}).pending="pending",D.running="running",D.completed="completed",D.failed="failed",D.interrupted="interrupted",D.cancelled="cancelled",D.waitingApproval="waiting_approval",D),N=((_={}).booting="booting",_.ready="ready",_.stopped="stopped",_.error="error",_);function z(e){try{return process.kill(e,0),!0}catch{return!1}}(b={}).user="user",b.assistant="assistant",(T={}).sessionResume="session-resume",T.streaming="streaming",T.toolScoping="tool-scoping",T.structuredOutput="structured-output",T.systemPrompt="system-prompt",T.sessionListing="session-listing",e.s(["AgentRunStatus",()=>W,"FeatureMode",()=>j,"InteractiveSessionStatus",()=>N,"Language",()=>E,"NotificationEventType",()=>M,"NotificationSeverity",()=>O,"SdlcLifecycle",()=>I,"TaskState",()=>F],96907),e.s(["isProcessAlive",()=>z],45316)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__c78383b1._.js.map