@shepai/cli 1.118.0-pr381.402b548 → 1.119.0-pr381.415b252

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 (339) hide show
  1. package/apis/json-schema/PhaseTiming.yaml +22 -1
  2. package/apis/json-schema/WorkflowConfig.yaml +5 -0
  3. package/dist/packages/core/src/application/ports/output/agents/agent-session-repository.interface.d.ts +2 -0
  4. package/dist/packages/core/src/application/ports/output/agents/agent-session-repository.interface.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +3 -3
  6. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
  7. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  8. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
  9. package/dist/packages/core/src/domain/generated/output.d.ts +33 -1
  10. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
  14. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/037-add-ci-watch-enabled.d.ts +11 -0
  15. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/037-add-ci-watch-enabled.d.ts.map +1 -0
  16. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/037-add-ci-watch-enabled.js +15 -0
  17. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/038-add-phase-execution-metadata.d.ts +11 -0
  18. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/038-add-phase-execution-metadata.d.ts.map +1 -0
  19. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/038-add-phase-execution-metadata.js +27 -0
  20. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +1 -1
  21. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +32 -0
  23. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +38 -5
  25. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.js +8 -1
  27. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  28. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +29 -7
  29. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  30. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +19 -8
  31. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +17 -3
  32. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -1
  33. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +11 -3
  34. package/dist/packages/core/src/infrastructure/services/agents/sessions/claude-code-session.repository.d.ts +7 -0
  35. package/dist/packages/core/src/infrastructure/services/agents/sessions/claude-code-session.repository.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/services/agents/sessions/claude-code-session.repository.js +35 -11
  37. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.d.ts +1 -0
  38. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.d.ts.map +1 -1
  39. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.js +2 -2
  40. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.d.ts.map +1 -1
  41. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -0
  42. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.d.ts.map +1 -1
  43. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -0
  44. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  45. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +1 -0
  46. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +2 -0
  47. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
  48. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +2 -0
  49. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts +1 -0
  50. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts.map +1 -1
  51. package/dist/src/presentation/web/app/actions/get-workflow-defaults.js +1 -0
  52. package/dist/src/presentation/web/app/api/sessions/route.d.ts +24 -0
  53. package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -0
  54. package/dist/src/presentation/web/app/api/sessions/route.js +230 -0
  55. package/dist/src/presentation/web/app/build-feature-node-data.d.ts +2 -0
  56. package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
  57. package/dist/src/presentation/web/app/build-feature-node-data.js +1 -0
  58. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +2 -0
  59. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
  60. package/dist/src/presentation/web/app/build-graph-nodes.js +11 -0
  61. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts +2 -1
  62. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts.map +1 -1
  63. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.js +2 -2
  64. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +4 -1
  65. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  66. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +16 -3
  67. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  68. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +1 -0
  69. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
  70. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +36 -10
  71. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +2 -1
  72. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +4 -0
  73. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  74. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +2 -1
  76. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts +21 -0
  77. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts.map +1 -0
  78. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.js +138 -0
  79. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts +9 -0
  80. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts.map +1 -0
  81. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.js +77 -0
  82. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  83. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +35 -2
  84. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  85. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +5 -0
  86. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.d.ts.map +1 -1
  87. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.js +3 -1
  88. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts.map +1 -1
  89. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.js +3 -0
  90. package/dist/tsconfig.build.tsbuildinfo +1 -1
  91. package/package.json +1 -1
  92. package/web/.next/BUILD_ID +1 -1
  93. package/web/.next/app-path-routes-manifest.json +1 -0
  94. package/web/.next/build-manifest.json +2 -2
  95. package/web/.next/fallback-build-manifest.json +2 -2
  96. package/web/.next/prerender-manifest.json +3 -3
  97. package/web/.next/required-server-files.js +2 -2
  98. package/web/.next/required-server-files.json +2 -2
  99. package/web/.next/routes-manifest.json +6 -0
  100. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +21 -21
  101. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
  102. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  103. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  105. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
  106. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  107. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +27 -27
  109. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
  110. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  111. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  113. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
  114. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  115. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +21 -21
  117. package/web/.next/server/app/(dashboard)/create/page.js +2 -2
  118. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  119. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  121. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
  122. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +27 -27
  125. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
  126. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  127. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +19 -19
  129. package/web/.next/server/app/(dashboard)/page.js +2 -2
  130. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  131. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  132. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  133. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
  134. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  135. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  136. package/web/.next/server/app/_global-error.html +2 -2
  137. package/web/.next/server/app/_global-error.rsc +1 -1
  138. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  139. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  140. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  141. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  142. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  143. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  144. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  145. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  146. package/web/.next/server/app/api/attachments/preview/route.js +1 -1
  147. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  148. package/web/.next/server/app/api/evidence/route.js +1 -1
  149. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  150. package/web/.next/server/app/api/graph-data/route.js +1 -1
  151. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  152. package/web/.next/server/app/api/sessions/route/app-paths-manifest.json +3 -0
  153. package/web/.next/server/app/api/sessions/route/build-manifest.json +11 -0
  154. package/web/.next/server/app/api/sessions/route/server-reference-manifest.json +4 -0
  155. package/web/.next/server/app/api/sessions/route.js +7 -0
  156. package/web/.next/server/app/api/sessions/route.js.map +5 -0
  157. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -0
  158. package/web/.next/server/app/api/sessions/route_client-reference-manifest.js +2 -0
  159. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  160. package/web/.next/server/app/settings/page.js +1 -1
  161. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  162. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  163. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  164. package/web/.next/server/app/skills/page.js +1 -1
  165. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  166. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  167. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  168. package/web/.next/server/app/tools/page.js +1 -1
  169. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  170. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  171. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  172. package/web/.next/server/app/version/page.js +1 -1
  173. package/web/.next/server/app/version/page.js.nft.json +1 -1
  174. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  175. package/web/.next/server/app-paths-manifest.json +1 -0
  176. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  177. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  178. package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js +3 -0
  179. package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js.map +1 -0
  180. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js +3 -0
  181. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js.map +1 -0
  182. package/web/.next/server/chunks/{[root-of-the-server]__7d63f9a4._.js → [root-of-the-server]__53013576._.js} +2 -2
  183. package/web/.next/server/chunks/{[root-of-the-server]__a1c7c02a._.js → [root-of-the-server]__92078db6._.js} +2 -2
  184. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  185. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  186. package/web/.next/server/chunks/b1a17_presentation_web__next-internal_server_app_api_sessions_route_actions_c041a889.js +3 -0
  187. package/web/.next/server/chunks/b1a17_presentation_web__next-internal_server_app_api_sessions_route_actions_c041a889.js.map +1 -0
  188. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  189. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +1 -1
  191. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +1 -1
  193. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/{[root-of-the-server]__07a39ff2._.js → [root-of-the-server]__06fef644._.js} +2 -2
  195. package/web/.next/server/chunks/ssr/{[root-of-the-server]__07a39ff2._.js.map → [root-of-the-server]__06fef644._.js.map} +1 -1
  196. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js +3 -0
  197. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js.map +1 -0
  198. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +3 -0
  199. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -0
  200. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
  201. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  205. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  207. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js +3 -0
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js.map +1 -0
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +4 -0
  211. package/web/.next/server/chunks/ssr/{[root-of-the-server]__2ff2daf6._.js.map → [root-of-the-server]__8c553503._.js.map} +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js +3 -0
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js.map +1 -0
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js +3 -0
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js.map +1 -0
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +4 -0
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js.map +1 -0
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +4 -0
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js.map +1 -0
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js +3 -0
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js.map +1 -0
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js +3 -0
  227. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js.map +1 -0
  228. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  229. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/_1bb79fe8._.js +3 -0
  232. package/web/.next/server/chunks/ssr/_1bb79fe8._.js.map +1 -0
  233. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/_435cd61a._.js +3 -0
  236. package/web/.next/server/chunks/ssr/_435cd61a._.js.map +1 -0
  237. package/web/.next/server/chunks/ssr/_75f4ccb3._.js +3 -0
  238. package/web/.next/server/chunks/ssr/_75f4ccb3._.js.map +1 -0
  239. package/web/.next/server/chunks/ssr/_ab069e13._.js +3 -0
  240. package/web/.next/server/chunks/ssr/_ab069e13._.js.map +1 -0
  241. package/web/.next/server/chunks/ssr/_c016175b._.js +3 -0
  242. package/web/.next/server/chunks/ssr/_c016175b._.js.map +1 -0
  243. package/web/.next/server/chunks/ssr/{_328ec309._.js → _c6b80726._.js} +2 -2
  244. package/web/.next/server/chunks/ssr/_c6b80726._.js.map +1 -0
  245. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  246. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/_f605354c._.js +9 -0
  248. package/web/.next/server/chunks/ssr/_f605354c._.js.map +1 -0
  249. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  250. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  251. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js +3 -0
  252. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js.map +1 -0
  253. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js +2 -2
  254. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js.map +1 -1
  255. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +1 -1
  256. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +1 -1
  257. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  258. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  259. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  260. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  262. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js +3 -0
  264. package/web/.next/server/chunks/ssr/src_presentation_web_components_bdcfba35._.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js +2 -2
  270. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js.map +1 -1
  271. package/web/.next/server/pages/500.html +2 -2
  272. package/web/.next/server/server-reference-manifest.js +1 -1
  273. package/web/.next/server/server-reference-manifest.json +33 -33
  274. package/web/.next/static/chunks/{8abac7707fa570d4.js → 0f070bdb053b3579.js} +2 -2
  275. package/web/.next/static/chunks/139f46d14f2be0a6.js +1 -0
  276. package/web/.next/static/chunks/{f3afa7e73e477098.js → 3b27bd39bf11f076.js} +1 -1
  277. package/web/.next/static/chunks/418128e3931a55f3.js +1 -0
  278. package/web/.next/static/chunks/4562ee849ea13c3a.js +1 -0
  279. package/web/.next/static/chunks/{80756b33fba5cf0c.js → 485dfa2b1ba874ef.js} +1 -1
  280. package/web/.next/static/chunks/{da81c0c951208327.js → 66c4848bc7b13df8.js} +1 -1
  281. package/web/.next/static/chunks/{b5dae8fa9a8c6ac2.js → 7eb1d12ff4e0a545.js} +1 -1
  282. package/web/.next/static/chunks/845d8e58a91014e6.js +1 -0
  283. package/web/.next/static/chunks/96049ca80ceb10f0.js +11 -0
  284. package/web/.next/static/chunks/bb03051ee7c01e64.js +2 -0
  285. package/web/.next/static/chunks/cca0f5112a9260d8.js +1 -0
  286. package/web/.next/static/chunks/d2739454715e5ef2.css +1 -0
  287. package/web/.next/static/chunks/d8d23303021cea22.js +1 -0
  288. package/web/.next/server/chunks/[root-of-the-server]__7d5492a0._.js +0 -3
  289. package/web/.next/server/chunks/[root-of-the-server]__7d5492a0._.js.map +0 -1
  290. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js +0 -3
  291. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/[root-of-the-server]__2ff2daf6._.js +0 -4
  293. package/web/.next/server/chunks/ssr/[root-of-the-server]__3155add4._.js +0 -3
  294. package/web/.next/server/chunks/ssr/[root-of-the-server]__3155add4._.js.map +0 -1
  295. package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js +0 -3
  296. package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js.map +0 -1
  297. package/web/.next/server/chunks/ssr/[root-of-the-server]__7b707feb._.js +0 -4
  298. package/web/.next/server/chunks/ssr/[root-of-the-server]__7b707feb._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/[root-of-the-server]__8763fd7a._.js +0 -4
  300. package/web/.next/server/chunks/ssr/[root-of-the-server]__8763fd7a._.js.map +0 -1
  301. package/web/.next/server/chunks/ssr/[root-of-the-server]__9c56d724._.js +0 -3
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__9c56d724._.js.map +0 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__cfc116d5._.js +0 -3
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__cfc116d5._.js.map +0 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__d3841d9e._.js +0 -3
  306. package/web/.next/server/chunks/ssr/[root-of-the-server]__d3841d9e._.js.map +0 -1
  307. package/web/.next/server/chunks/ssr/[root-of-the-server]__db9afe04._.js +0 -3
  308. package/web/.next/server/chunks/ssr/[root-of-the-server]__db9afe04._.js.map +0 -1
  309. package/web/.next/server/chunks/ssr/_250a63ae._.js +0 -3
  310. package/web/.next/server/chunks/ssr/_250a63ae._.js.map +0 -1
  311. package/web/.next/server/chunks/ssr/_273d4632._.js +0 -3
  312. package/web/.next/server/chunks/ssr/_273d4632._.js.map +0 -1
  313. package/web/.next/server/chunks/ssr/_328ec309._.js.map +0 -1
  314. package/web/.next/server/chunks/ssr/_79c13a4c._.js +0 -3
  315. package/web/.next/server/chunks/ssr/_79c13a4c._.js.map +0 -1
  316. package/web/.next/server/chunks/ssr/_922aa39f._.js +0 -3
  317. package/web/.next/server/chunks/ssr/_922aa39f._.js.map +0 -1
  318. package/web/.next/server/chunks/ssr/_a68d7e1c._.js +0 -9
  319. package/web/.next/server/chunks/ssr/_a68d7e1c._.js.map +0 -1
  320. package/web/.next/server/chunks/ssr/_f5316e67._.js +0 -3
  321. package/web/.next/server/chunks/ssr/_f5316e67._.js.map +0 -1
  322. package/web/.next/server/chunks/ssr/_f70781c5._.js +0 -3
  323. package/web/.next/server/chunks/ssr/_f70781c5._.js.map +0 -1
  324. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js +0 -3
  325. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js.map +0 -1
  326. package/web/.next/static/chunks/0b3964436e809492.js +0 -1
  327. package/web/.next/static/chunks/35304f98003207af.js +0 -1
  328. package/web/.next/static/chunks/3a806cf059241bc9.js +0 -1
  329. package/web/.next/static/chunks/55c131b6fc504375.js +0 -1
  330. package/web/.next/static/chunks/62a8173911f8f130.css +0 -1
  331. package/web/.next/static/chunks/b1f3c0e8e9872ef8.js +0 -1
  332. package/web/.next/static/chunks/b76e77e6c165994d.js +0 -11
  333. package/web/.next/static/chunks/bd9285d40fe75608.js +0 -2
  334. package/web/.next/static/chunks/dff51e1d6c46ad32.js +0 -1
  335. /package/web/.next/server/chunks/{[root-of-the-server]__7d63f9a4._.js.map → [root-of-the-server]__53013576._.js.map} +0 -0
  336. /package/web/.next/server/chunks/{[root-of-the-server]__a1c7c02a._.js.map → [root-of-the-server]__92078db6._.js.map} +0 -0
  337. /package/web/.next/static/{LW_LUGRZfraMxIlSZq4Q- → VKrxBSI0iPzA7QL_Xgt6y}/_buildManifest.js +0 -0
  338. /package/web/.next/static/{LW_LUGRZfraMxIlSZq4Q- → VKrxBSI0iPzA7QL_Xgt6y}/_clientMiddlewareManifest.json +0 -0
  339. /package/web/.next/static/{LW_LUGRZfraMxIlSZq4Q- → VKrxBSI0iPzA7QL_Xgt6y}/_ssgManifest.js +0 -0
@@ -0,0 +1,230 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { homedir } from 'node:os';
3
+ import { join } from 'node:path';
4
+ import { readdir, stat, readFile } from 'node:fs/promises';
5
+ export const dynamic = 'force-dynamic';
6
+ // ── Path encoding helpers ─────────────────────────────────────────────
7
+ /**
8
+ * Claude Code encodes paths by replacing '/', '\', '.' with '-'.
9
+ * e.g. /home/user/.shep/repos/abc → -home-user--shep-repos-abc
10
+ */
11
+ function claudeEncodePath(p) {
12
+ return p.replace(/[/\\.]/g, '-');
13
+ }
14
+ /**
15
+ * Cursor encodes paths by stripping the leading '/', removing dots,
16
+ * and replacing '/' and '\' with '-'.
17
+ * e.g. /home/user/.shep/repos/abc → home-user-shep-repos-abc
18
+ */
19
+ function cursorEncodePath(p) {
20
+ return p.replace(/^\//, '').replace(/\./g, '').replace(/[/\\]/g, '-');
21
+ }
22
+ // ── Claude Code session scanner ───────────────────────────────────────
23
+ async function scanClaudeSessions(repositoryPath, limit) {
24
+ const dirName = claudeEncodePath(repositoryPath);
25
+ const projectDir = join(homedir(), '.claude', 'projects', dirName);
26
+ let files;
27
+ try {
28
+ const entries = await readdir(projectDir);
29
+ files = entries.filter((e) => e.endsWith('.jsonl'));
30
+ }
31
+ catch {
32
+ return [];
33
+ }
34
+ // Stat all files for mtime sorting
35
+ const fileInfos = await Promise.allSettled(files.map(async (name) => {
36
+ const filePath = join(projectDir, name);
37
+ const s = await stat(filePath);
38
+ return { name, filePath, mtime: s.mtime.getTime() };
39
+ }));
40
+ const valid = fileInfos
41
+ .filter((r) => r.status === 'fulfilled')
42
+ .map((r) => r.value)
43
+ .sort((a, b) => b.mtime - a.mtime)
44
+ .slice(0, limit);
45
+ // Parse each file
46
+ const results = await Promise.allSettled(valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath)));
47
+ return results
48
+ .filter((r) => r.status === 'fulfilled')
49
+ .map((r) => r.value)
50
+ .filter((s) => s !== null);
51
+ }
52
+ async function parseClaudeSession(filePath, fileName, mtime, repositoryPath) {
53
+ const content = await readFile(filePath, 'utf-8');
54
+ const lines = content.split('\n').filter((l) => l.trim());
55
+ const id = fileName.replace('.jsonl', '');
56
+ let preview = null;
57
+ let messageCount = 0;
58
+ let firstTimestamp = null;
59
+ let lastTimestamp = null;
60
+ for (const line of lines) {
61
+ try {
62
+ const entry = JSON.parse(line);
63
+ if (entry.type === 'user' || entry.type === 'assistant') {
64
+ const role = entry.message?.role;
65
+ if (role === 'user' || role === 'assistant') {
66
+ messageCount++;
67
+ if (entry.timestamp) {
68
+ firstTimestamp ??= entry.timestamp;
69
+ lastTimestamp = entry.timestamp;
70
+ }
71
+ if (role === 'user' && preview === null) {
72
+ preview = extractText(entry.message?.content);
73
+ }
74
+ }
75
+ }
76
+ }
77
+ catch {
78
+ break;
79
+ }
80
+ }
81
+ if (messageCount === 0)
82
+ return null;
83
+ return {
84
+ id,
85
+ agentType: 'claude-code',
86
+ preview,
87
+ messageCount,
88
+ firstMessageAt: firstTimestamp,
89
+ lastMessageAt: lastTimestamp,
90
+ createdAt: firstTimestamp ?? new Date(mtime).toISOString(),
91
+ projectPath: repositoryPath,
92
+ filePath,
93
+ _mtime: mtime,
94
+ };
95
+ }
96
+ // ── Cursor session scanner ────────────────────────────────────────────
97
+ async function scanCursorSessions(repositoryPath, limit) {
98
+ const dirName = cursorEncodePath(repositoryPath);
99
+ const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');
100
+ let entries;
101
+ try {
102
+ entries = await readdir(transcriptsDir);
103
+ }
104
+ catch {
105
+ return [];
106
+ }
107
+ // Cursor has two session structures:
108
+ // 1. Flat: agent-transcripts/<uuid>.jsonl
109
+ // 2. Nested: agent-transcripts/<uuid>/<uuid>.jsonl
110
+ const fileInfos = await Promise.allSettled(entries.map(async (entry) => {
111
+ const entryPath = join(transcriptsDir, entry);
112
+ const s = await stat(entryPath);
113
+ if (s.isFile() && entry.endsWith('.jsonl')) {
114
+ // Flat structure
115
+ return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };
116
+ }
117
+ if (s.isDirectory()) {
118
+ // Nested structure — look for <uuid>.jsonl inside
119
+ const jsonlPath = join(entryPath, `${entry}.jsonl`);
120
+ try {
121
+ const jsonlStat = await stat(jsonlPath);
122
+ return {
123
+ name: `${entry}.jsonl`,
124
+ filePath: jsonlPath,
125
+ mtime: jsonlStat.mtime.getTime(),
126
+ };
127
+ }
128
+ catch {
129
+ return null;
130
+ }
131
+ }
132
+ return null;
133
+ }));
134
+ const valid = fileInfos
135
+ .filter((r) => r.status === 'fulfilled')
136
+ .map((r) => r.value)
137
+ .filter((v) => v !== null)
138
+ .sort((a, b) => b.mtime - a.mtime)
139
+ .slice(0, limit);
140
+ const results = await Promise.allSettled(valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath)));
141
+ return results
142
+ .filter((r) => r.status === 'fulfilled')
143
+ .map((r) => r.value)
144
+ .filter((s) => s !== null);
145
+ }
146
+ async function parseCursorSession(filePath, fileName, mtime, repositoryPath) {
147
+ const content = await readFile(filePath, 'utf-8');
148
+ const lines = content.split('\n').filter((l) => l.trim());
149
+ const id = fileName.replace('.jsonl', '');
150
+ let preview = null;
151
+ let messageCount = 0;
152
+ for (const line of lines) {
153
+ try {
154
+ const entry = JSON.parse(line);
155
+ if (entry.role === 'user' || entry.role === 'assistant') {
156
+ messageCount++;
157
+ if (entry.role === 'user' && preview === null) {
158
+ preview = extractText(entry.message?.content);
159
+ }
160
+ }
161
+ }
162
+ catch {
163
+ break;
164
+ }
165
+ }
166
+ if (messageCount === 0)
167
+ return null;
168
+ const mtimeIso = new Date(mtime).toISOString();
169
+ return {
170
+ id,
171
+ agentType: 'cursor',
172
+ preview,
173
+ messageCount,
174
+ firstMessageAt: mtimeIso,
175
+ lastMessageAt: mtimeIso,
176
+ createdAt: mtimeIso,
177
+ projectPath: repositoryPath,
178
+ filePath,
179
+ _mtime: mtime,
180
+ };
181
+ }
182
+ // ── Shared helpers ────────────────────────────────────────────────────
183
+ function extractText(content) {
184
+ if (typeof content === 'string')
185
+ return content;
186
+ if (Array.isArray(content)) {
187
+ for (const block of content) {
188
+ if (typeof block === 'object' && block !== null) {
189
+ const b = block;
190
+ if (b.type === 'text' && typeof b.text === 'string')
191
+ return b.text;
192
+ }
193
+ }
194
+ }
195
+ return null;
196
+ }
197
+ // ── Route handler ─────────────────────────────────────────────────────
198
+ /**
199
+ * GET /api/sessions?repositoryPath=<path>&limit=<n>
200
+ *
201
+ * Returns agent sessions from all supported providers (Claude Code, Cursor)
202
+ * filtered by repository path, merged and sorted by recency.
203
+ */
204
+ export async function GET(request) {
205
+ const url = new URL(request.url);
206
+ const repositoryPath = url.searchParams.get('repositoryPath');
207
+ const limit = parseInt(url.searchParams.get('limit') ?? '10', 10);
208
+ if (!repositoryPath?.trim()) {
209
+ return NextResponse.json({ error: 'repositoryPath is required' }, { status: 400 });
210
+ }
211
+ try {
212
+ // Scan all providers in parallel
213
+ const [claudeSessions, cursorSessions] = await Promise.all([
214
+ scanClaudeSessions(repositoryPath, limit),
215
+ scanCursorSessions(repositoryPath, limit),
216
+ ]);
217
+ // Merge and sort by mtime descending, apply limit
218
+ const allSessions = [...claudeSessions, ...cursorSessions]
219
+ .sort((a, b) => b._mtime - a._mtime)
220
+ .slice(0, Math.min(limit, 50));
221
+ return NextResponse.json({
222
+ sessions: allSessions.map(({ _mtime, ...s }) => s),
223
+ });
224
+ }
225
+ catch (error) {
226
+ // eslint-disable-next-line no-console
227
+ console.error('[API] GET /api/sessions error:', error);
228
+ return NextResponse.json({ error: String(error) }, { status: 500 });
229
+ }
230
+ }
@@ -11,6 +11,8 @@ export interface BuildFeatureNodeDataOptions {
11
11
  enableEvidence?: boolean;
12
12
  /** Whether evidence is committed to the PR body (global workflow setting) */
13
13
  commitEvidence?: boolean;
14
+ /** Whether CI watch/fix loop is enabled (global workflow setting) */
15
+ ciWatchEnabled?: boolean;
14
16
  }
15
17
  /**
16
18
  * Builds a FeatureNodeData object from a Feature entity and optional AgentRun.
@@ -1 +1 @@
1
- {"version":3,"file":"build-feature-node-data.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-feature-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQ9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,QAAQ,GAAG,IAAI,EACpB,OAAO,CAAC,EAAE,2BAA2B,GACpC,eAAe,CA+CjB"}
1
+ {"version":3,"file":"build-feature-node-data.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-feature-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQ9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,QAAQ,GAAG,IAAI,EACpB,OAAO,CAAC,EAAE,2BAA2B,GACpC,eAAe,CAgDjB"}
@@ -28,6 +28,7 @@ export function buildFeatureNodeData(feature, run, options) {
28
28
  openPr: feature.openPr,
29
29
  ...(options?.enableEvidence != null && { enableEvidence: options.enableEvidence }),
30
30
  ...(options?.commitEvidence != null && { commitEvidence: options.commitEvidence }),
31
+ ...(options?.ciWatchEnabled != null && { ciWatchEnabled: options.ciWatchEnabled }),
31
32
  ...(options?.repositoryName && { repositoryName: options.repositoryName }),
32
33
  ...(options?.baseBranch && { baseBranch: options.baseBranch }),
33
34
  ...(options?.oneLiner && { oneLiner: options.oneLiner }),
@@ -18,6 +18,8 @@ export interface BuildGraphNodesOptions {
18
18
  enableEvidence?: boolean;
19
19
  /** Whether evidence is committed to the PR body (global workflow setting) */
20
20
  commitEvidence?: boolean;
21
+ /** Whether CI watch/fix loop is enabled (global workflow setting) */
22
+ ciWatchEnabled?: boolean;
21
23
  }
22
24
  export declare function buildGraphNodes(repositories: Repository[], featuresWithRuns: FeatureWithRun[], options?: BuildGraphNodesOptions): {
23
25
  nodes: CanvasNodeType[];
@@ -1 +1 @@
1
- {"version":3,"file":"build-graph-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-graph-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQ1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,EAAE,EAC1B,gBAAgB,EAAE,cAAc,EAAE,EAClC,OAAO,CAAC,EAAE,sBAAsB,GAC/B;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CA2F5C"}
1
+ {"version":3,"file":"build-graph-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-graph-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAS1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAU1C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,EAAE,EAC1B,gBAAgB,EAAE,cAAc,EAAE,EAClC,OAAO,CAAC,EAAE,sBAAsB,GAC/B;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CA2F5C"}
@@ -1,6 +1,15 @@
1
+ import { createHash } from 'node:crypto';
2
+ import path from 'node:path';
1
3
  import { AgentRunStatus } from '../../../../packages/core/src/domain/generated/output.js';
2
4
  import { deriveNodeState, deriveProgress, deriveLifecycle, } from '../components/common/feature-node/derive-feature-state.js';
3
5
  import { isProcessAlive } from '../../../../packages/core/src/infrastructure/services/process/is-process-alive.js';
6
+ import { getShepHomeDir } from '../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.js';
7
+ /** Compute the worktree path for a feature, matching WorktreeService.getWorktreePath() */
8
+ function computeWorktreePath(repoPath, branch) {
9
+ const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
10
+ const slug = branch.replace(/\//g, '-');
11
+ return path.join(getShepHomeDir(), 'repos', repoHash, 'wt', slug).replace(/\\/g, '/');
12
+ }
4
13
  export function buildGraphNodes(repositories, featuresWithRuns, options) {
5
14
  // Normalize path separators so Windows backslash paths match forward-slash paths
6
15
  const normalizePath = (p) => p.replace(/\\/g, '/');
@@ -97,6 +106,7 @@ function appendFeatureNodes(repoFeatures, repoNodeId, allFeaturesWithRuns, nodes
97
106
  lifecycle: deriveLifecycle(feature, run),
98
107
  repositoryPath: feature.repositoryPath,
99
108
  branch: feature.branch,
109
+ worktreePath: feature.worktreePath ?? computeWorktreePath(feature.repositoryPath, feature.branch),
100
110
  specPath: feature.specPath,
101
111
  state: deriveNodeState(feature, run, pidAlive !== undefined ? { isPidAlive: pidAlive } : undefined),
102
112
  progress: deriveProgress(feature),
@@ -109,6 +119,7 @@ function appendFeatureNodes(repoFeatures, repoNodeId, allFeaturesWithRuns, nodes
109
119
  openPr: feature.openPr,
110
120
  ...(options?.enableEvidence != null && { enableEvidence: options.enableEvidence }),
111
121
  ...(options?.commitEvidence != null && { commitEvidence: options.commitEvidence }),
122
+ ...(options?.ciWatchEnabled != null && { ciWatchEnabled: options.ciWatchEnabled }),
112
123
  ...(repoName && { repositoryName: repoName }),
113
124
  ...(run?.agentType && { agentType: run.agentType }),
114
125
  ...(run?.modelId && { modelId: run.modelId }),
@@ -4,11 +4,12 @@ import type { WorkflowDefaults } from '../../../app/actions/get-workflow-default
4
4
  export interface CreateDrawerClientProps {
5
5
  repositoryPath: string;
6
6
  initialParentId?: string;
7
+ initialDescription?: string;
7
8
  features: ParentFeatureOption[];
8
9
  repositories?: RepositoryOption[];
9
10
  workflowDefaults?: WorkflowDefaults;
10
11
  currentAgentType?: string;
11
12
  currentModel?: string;
12
13
  }
13
- export declare function CreateDrawerClient({ repositoryPath, initialParentId, features, repositories, workflowDefaults, currentAgentType, currentModel, }: CreateDrawerClientProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function CreateDrawerClient({ repositoryPath, initialParentId, initialDescription, features, repositories, workflowDefaults, currentAgentType, currentModel, }: CreateDrawerClientProps): import("react/jsx-runtime").JSX.Element;
14
15
  //# sourceMappingURL=create-drawer-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AACxG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,EAAE,uBAAuB,2CA8EzB"}
1
+ {"version":3,"file":"create-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AACxG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,EAAE,uBAAuB,2CA+EzB"}
@@ -5,7 +5,7 @@ import { useRouter, usePathname } from 'next/navigation';
5
5
  import { toast } from 'sonner';
6
6
  import { createFeature } from '../../../app/actions/create-feature.js';
7
7
  import { FeatureCreateDrawer } from '../../common/feature-create-drawer/index.js';
8
- export function CreateDrawerClient({ repositoryPath, initialParentId, features, repositories, workflowDefaults, currentAgentType, currentModel, }) {
8
+ export function CreateDrawerClient({ repositoryPath, initialParentId, initialDescription, features, repositories, workflowDefaults, currentAgentType, currentModel, }) {
9
9
  const router = useRouter();
10
10
  const [isSubmitting, setIsSubmitting] = useState(false);
11
11
  // Derive open state from the URL. Next.js parallel routes preserve slot
@@ -56,5 +56,5 @@ export function CreateDrawerClient({ repositoryPath, initialParentId, features,
56
56
  setIsSubmitting(false);
57
57
  });
58
58
  }, [router]);
59
- return (_jsx(FeatureCreateDrawer, { open: isOpen, onClose: onClose, onSubmit: onSubmit, repositoryPath: repositoryPath, features: features, repositories: repositories, workflowDefaults: workflowDefaults, initialParentId: initialParentId, isSubmitting: isSubmitting, currentAgentType: currentAgentType, currentModel: currentModel }));
59
+ return (_jsx(FeatureCreateDrawer, { open: isOpen, onClose: onClose, onSubmit: onSubmit, repositoryPath: repositoryPath, features: features, repositories: repositories, workflowDefaults: workflowDefaults, initialParentId: initialParentId, initialDescription: initialDescription, isSubmitting: isSubmitting, currentAgentType: currentAgentType, currentModel: currentModel }));
60
60
  }
@@ -31,6 +31,7 @@ export interface FeatureCreatePayload {
31
31
  };
32
32
  push: boolean;
33
33
  openPr: boolean;
34
+ ciWatchEnabled: boolean;
34
35
  enableEvidence: boolean;
35
36
  commitEvidence: boolean;
36
37
  parentId?: string;
@@ -61,8 +62,10 @@ export interface FeatureCreateDrawerProps {
61
62
  currentAgentType?: string;
62
63
  /** Current global model from settings */
63
64
  currentModel?: string;
65
+ /** Pre-fill the description textarea (e.g. from session context) */
66
+ initialDescription?: string;
64
67
  }
65
- export declare function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, }: FeatureCreateDrawerProps): import("react/jsx-runtime").JSX.Element;
68
+ export declare function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, initialDescription, }: FeatureCreateDrawerProps): import("react/jsx-runtime").JSX.Element;
66
69
  export interface RepositoryComboboxProps {
67
70
  repositories: RepositoryOption[];
68
71
  value: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"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"}
@@ -93,18 +93,26 @@ const EMPTY_GATES = {
93
93
  allowPlan: false,
94
94
  allowMerge: false,
95
95
  };
96
- export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting = false, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, }) {
96
+ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting = false, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, initialDescription, }) {
97
97
  const createSound = useSoundAction('create');
98
98
  const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;
99
99
  const defaultPush = workflowDefaults?.push ?? false;
100
100
  const defaultOpenPr = workflowDefaults?.openPr ?? false;
101
+ const defaultCiWatch = workflowDefaults?.ciWatchEnabled !== false;
101
102
  const defaultEnableEvidence = workflowDefaults?.enableEvidence ?? false;
102
103
  const defaultCommitEvidence = workflowDefaults?.commitEvidence ?? false;
103
- const [description, setDescription] = useState('');
104
+ const [description, setDescription] = useState(initialDescription ?? '');
105
+ // Sync description when initialDescription prop changes (e.g. from session context)
106
+ useEffect(() => {
107
+ if (initialDescription) {
108
+ setDescription(initialDescription);
109
+ }
110
+ }, [initialDescription]);
104
111
  const [attachments, setAttachments] = useState([]);
105
112
  const [approvalGates, setApprovalGates] = useState({ ...defaultGates });
106
113
  const [push, setPush] = useState(defaultPush);
107
114
  const [openPr, setOpenPr] = useState(defaultOpenPr);
115
+ const [ciWatchEnabled, setCiWatchEnabled] = useState(workflowDefaults?.ciWatchEnabled !== false);
108
116
  const [enableEvidence, setEnableEvidence] = useState(defaultEnableEvidence);
109
117
  const [commitEvidence, setCommitEvidence] = useState(defaultCommitEvidence);
110
118
  const [parentId, setParentId] = useState(undefined);
@@ -127,6 +135,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
127
135
  setApprovalGates({ ...workflowDefaults.approvalGates });
128
136
  setPush(workflowDefaults.push);
129
137
  setOpenPr(workflowDefaults.openPr);
138
+ setCiWatchEnabled(workflowDefaults.ciWatchEnabled !== false);
130
139
  setEnableEvidence(workflowDefaults.enableEvidence);
131
140
  setCommitEvidence(workflowDefaults.commitEvidence);
132
141
  }
@@ -147,6 +156,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
147
156
  setApprovalGates({ ...defaultGates });
148
157
  setPush(defaultPush);
149
158
  setOpenPr(defaultOpenPr);
159
+ setCiWatchEnabled(defaultCiWatch);
150
160
  setEnableEvidence(defaultEnableEvidence);
151
161
  setCommitEvidence(defaultCommitEvidence);
152
162
  setParentId(undefined);
@@ -164,6 +174,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
164
174
  defaultPush,
165
175
  defaultOpenPr,
166
176
  defaultEnableEvidence,
177
+ defaultCiWatch,
167
178
  defaultCommitEvidence,
168
179
  repositoryPath,
169
180
  repositories,
@@ -298,6 +309,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
298
309
  },
299
310
  push: push || openPr,
300
311
  openPr,
312
+ ciWatchEnabled,
301
313
  enableEvidence,
302
314
  commitEvidence,
303
315
  fast,
@@ -318,6 +330,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
318
330
  push,
319
331
  openPr,
320
332
  enableEvidence,
333
+ ciWatchEnabled,
321
334
  commitEvidence,
322
335
  fast,
323
336
  pending,
@@ -435,7 +448,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
435
448
  setOpenPr(v);
436
449
  if (!v)
437
450
  setCommitEvidence(false);
438
- }, disabled: isSubmitting }), _jsx(Label, { htmlFor: "open-pr", className: "cursor-pointer text-xs font-medium", children: "PR" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Open a pull request after pushing." })] })] })] })] })] }) }) }) }));
451
+ }, disabled: isSubmitting }), _jsx(Label, { htmlFor: "open-pr", className: "cursor-pointer text-xs font-medium", children: "PR" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Open a pull request after pushing." })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: "ci-watch", size: "sm", checked: ciWatchEnabled, onCheckedChange: setCiWatchEnabled, disabled: isSubmitting }), _jsx(Label, { htmlFor: "ci-watch", className: "cursor-pointer text-xs font-medium", children: "Watch" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Watch CI and auto-fix after push." })] })] })] })] })] }) }) }) }));
439
452
  }
440
453
  function ParentFeatureCombobox({ features, value, onChange, disabled, }) {
441
454
  const [open, setOpen] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAY3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC;AAuCF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AA6BF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC"}
1
+ {"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAY3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC;AAuCF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AA6BF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC"}
@@ -268,6 +268,7 @@ const SAMPLE_WORKFLOW_DEFAULTS = {
268
268
  approvalGates: { allowPrd: true, allowPlan: true, allowMerge: false },
269
269
  push: true,
270
270
  openPr: true,
271
+ ciWatchEnabled: true,
271
272
  enableEvidence: true,
272
273
  commitEvidence: false,
273
274
  };
@@ -1 +1 @@
1
- {"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AA8CjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C;AA6BD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAAE,GACjC,iBAAiB,EAAE,CAgErB;AAMD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,2CA4D3F"}
1
+ {"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAqDjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C;AA6BD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAAE,GACjC,iBAAiB,EAAE,CAgErB;AAMD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,2CAmE3F"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState, useEffect, useRef } from 'react';
4
- import { Loader2, AlertCircle, Clock } from 'lucide-react';
4
+ import { Loader2, AlertCircle, Clock, Zap } from 'lucide-react';
5
5
  import { InlineAttachments } from '../../common/inline-attachments/index.js';
6
6
  import { formatDuration } from '../../../lib/format-duration.js';
7
7
  /**
@@ -43,6 +43,14 @@ function useTickingNow(timings) {
43
43
  }, [timings]);
44
44
  return now;
45
45
  }
46
+ /** Format a token count with K/M suffix for readability. */
47
+ function formatTokens(count) {
48
+ if (count >= 1_000_000)
49
+ return `${(count / 1_000_000).toFixed(1)}M`;
50
+ if (count >= 1_000)
51
+ return `${(count / 1_000).toFixed(1)}K`;
52
+ return String(count);
53
+ }
46
54
  const NODE_TO_PHASE = {
47
55
  analyze: 'Analyzing',
48
56
  requirements: 'Requirements',
@@ -150,7 +158,9 @@ export function ActivityTab({ timings, loading, error, rejectionFeedback }) {
150
158
  const hasMultipleIterations = iterations.length > 1;
151
159
  const totalExecMs = nodeTimings.reduce((sum, t) => sum + getEffectiveDuration(t, now), 0);
152
160
  const totalWaitMs = nodeTimings.reduce((sum, t) => sum + (t.approvalWaitMs ?? 0), 0);
153
- return (_jsxs("div", { className: "flex flex-col gap-4 p-4", children: [_jsx("div", { "data-testid": "activity-timings", className: "flex flex-col gap-3", children: iterations.map((iteration) => (_jsx(IterationGroup, { iteration: iteration, showHeader: hasMultipleIterations, maxDurationMs: maxDurationMs, now: now }, iteration.number))) }), totalExecMs > 0 ? (_jsx(SummaryTotals, { totalExecMs: totalExecMs, totalWaitMs: totalWaitMs })) : null] }));
161
+ const totalInputTokens = nodeTimings.reduce((sum, t) => sum + (t.inputTokens ?? 0), 0);
162
+ const totalOutputTokens = nodeTimings.reduce((sum, t) => sum + (t.outputTokens ?? 0), 0);
163
+ return (_jsxs("div", { className: "flex flex-col gap-4 p-4", children: [_jsx("div", { "data-testid": "activity-timings", className: "flex flex-col gap-3", children: iterations.map((iteration) => (_jsx(IterationGroup, { iteration: iteration, showHeader: hasMultipleIterations, maxDurationMs: maxDurationMs, now: now }, iteration.number))) }), totalExecMs > 0 ? (_jsx(SummaryTotals, { totalExecMs: totalExecMs, totalWaitMs: totalWaitMs, totalInputTokens: totalInputTokens, totalOutputTokens: totalOutputTokens })) : null] }));
154
164
  }
155
165
  /* ---------------------------------------------------------------------------
156
166
  * Iteration group — one cycle of work
@@ -176,22 +186,38 @@ function LifecycleEventRow({ timing, message, attachments, }) {
176
186
  return (_jsxs("div", { className: `text-xs ${event.colorClass}`, children: [_jsx("span", { children: event.label }), message ? (_jsxs("span", { "data-testid": "rejection-feedback-text", className: "text-muted-foreground ml-2 font-normal italic", children: ["\u2014 ", message] })) : null, hasAttachments ? (_jsx("div", { "data-testid": "rejection-feedback-attachments", className: "mt-1.5 ml-2", children: _jsx(InlineAttachments, { text: "", attachmentPaths: attachments }) })) : null] }));
177
187
  }
178
188
  function NodeTimingRow({ timing, maxDurationMs, now, }) {
179
- const label = timing.phase.includes(':')
180
- ? `rev ${timing.phase.split(':')[1]}`
181
- : (NODE_TO_PHASE[timing.phase] ?? timing.phase);
189
+ const suffix = timing.phase.includes(':') ? timing.phase.split(':')[1] : null;
190
+ const isSubPhase = suffix !== null;
191
+ // Distinguish implementation sub-phases (phase-1, phase-2) from rejection retries (2, 3)
192
+ const isImplPhase = suffix?.startsWith('phase-') ?? false;
193
+ const label = isImplPhase
194
+ ? `Phase ${suffix.replace('phase-', '')}`
195
+ : suffix !== null
196
+ ? `retry #${suffix}`
197
+ : (NODE_TO_PHASE[timing.phase] ?? timing.phase);
182
198
  const durationMs = getEffectiveDuration(timing, now);
183
199
  const barPercent = maxDurationMs > 0 ? Math.max(2, (durationMs / maxDurationMs) * 100) : 2;
184
200
  const isRunning = !timing.completedAt && !!timing.startedAt;
185
- const barColorClass = timing.completedAt ? 'bg-emerald-500' : 'bg-blue-500';
186
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-3", children: [_jsx("span", { className: "text-muted-foreground w-24 shrink-0 text-xs", children: label }), _jsx("div", { className: "bg-muted h-3 flex-1 overflow-hidden rounded-full", children: _jsx("div", { className: `h-full rounded-full ${barColorClass}${isRunning ? 'animate-pulse' : ''}`, style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-14 shrink-0 text-right text-xs", children: formatDuration(durationMs) })] }), timing.approvalWaitMs != null && timing.approvalWaitMs > 0 ? (_jsx(ApprovalWaitRow, { timing: timing, maxDurationMs: maxDurationMs })) : null] }));
201
+ const barColorClass = timing.completedAt
202
+ ? isImplPhase
203
+ ? 'bg-emerald-400'
204
+ : isSubPhase
205
+ ? 'bg-amber-500'
206
+ : 'bg-emerald-500'
207
+ : 'bg-blue-500';
208
+ const totalTokens = timing.inputTokens != null || timing.outputTokens != null
209
+ ? (timing.inputTokens ?? 0) + (timing.outputTokens ?? 0)
210
+ : null;
211
+ return (_jsxs("div", { className: isSubPhase ? 'flex flex-col gap-1 pl-6' : 'flex flex-col gap-1', children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-2", children: [_jsx("span", { className: `text-muted-foreground shrink-0 text-xs ${isSubPhase ? 'w-18' : 'w-24'}`, children: label }), _jsx("div", { className: `bg-muted min-w-0 flex-1 overflow-hidden rounded-full ${isSubPhase ? 'h-2.5' : 'h-3'}`, children: _jsx("div", { className: `h-full rounded-full ${barColorClass}${isRunning ? 'animate-pulse' : ''}`, style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(durationMs) }), _jsx("span", { className: "text-muted-foreground w-12 shrink-0 text-right text-[10px] tabular-nums", children: totalTokens != null && totalTokens > 0 ? (_jsxs("span", { className: "inline-flex items-center gap-0.5", children: [_jsx(Zap, { className: "h-2 w-2 opacity-50" }), formatTokens(totalTokens)] })) : null })] }), timing.approvalWaitMs != null && timing.approvalWaitMs > 0 ? (_jsx(ApprovalWaitRow, { timing: timing, maxDurationMs: maxDurationMs })) : null] }));
187
212
  }
188
213
  function ApprovalWaitRow({ timing, maxDurationMs, }) {
189
214
  const waitMs = timing.approvalWaitMs ?? 0;
190
215
  const barPercent = maxDurationMs > 0 ? Math.max(2, (waitMs / maxDurationMs) * 100) : 2;
191
- return (_jsxs("div", { "data-testid": `approval-wait-${timing.phase}`, className: "flex items-center gap-3 pl-4", children: [_jsx("span", { className: "text-muted-foreground w-20 shrink-0 text-xs", children: "approval" }), _jsx("div", { className: "bg-muted h-2.5 flex-1 overflow-hidden rounded-full", children: _jsx("div", { className: "h-full rounded-full bg-amber-500", style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-14 shrink-0 text-right text-xs", children: formatDuration(waitMs) })] }));
216
+ return (_jsxs("div", { "data-testid": `approval-wait-${timing.phase}`, className: "flex items-center gap-2 pl-4", children: [_jsx("span", { className: "text-muted-foreground w-20 shrink-0 text-xs", children: "approval" }), _jsx("div", { className: "bg-muted h-2.5 min-w-0 flex-1 overflow-hidden rounded-full", children: _jsx("div", { className: "h-full rounded-full bg-amber-500", style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(waitMs) }), _jsx("span", { className: "w-12 shrink-0" })] }));
192
217
  }
193
- function SummaryTotals({ totalExecMs, totalWaitMs }) {
194
- return (_jsxs("div", { "data-testid": "activity-summary", className: "border-border flex flex-col gap-1.5 border-t pt-3", children: [_jsx(SummaryRow, { label: "Total execution", value: formatDuration(totalExecMs) }), totalWaitMs > 0 ? (_jsxs(_Fragment, { children: [_jsx(SummaryRow, { label: "Total wait", value: formatDuration(totalWaitMs) }), _jsx(SummaryRow, { label: "Total wall-clock", value: formatDuration(totalExecMs + totalWaitMs) })] })) : null] }));
218
+ function SummaryTotals({ totalExecMs, totalWaitMs, totalInputTokens, totalOutputTokens, }) {
219
+ const totalTokens = totalInputTokens + totalOutputTokens;
220
+ return (_jsxs("div", { "data-testid": "activity-summary", className: "border-border flex flex-col gap-1.5 border-t pt-3", children: [_jsx(SummaryRow, { label: "Total execution", value: formatDuration(totalExecMs) }), totalWaitMs > 0 ? (_jsxs(_Fragment, { children: [_jsx(SummaryRow, { label: "Total wait", value: formatDuration(totalWaitMs) }), _jsx(SummaryRow, { label: "Total wall-clock", value: formatDuration(totalExecMs + totalWaitMs) })] })) : null, totalTokens > 0 ? (_jsx(SummaryRow, { label: "Total tokens", value: `${formatTokens(totalTokens)} (${formatTokens(totalInputTokens)} in · ${formatTokens(totalOutputTokens)} out)` })) : null] }));
195
221
  }
196
222
  function SummaryRow({ label, value }) {
197
223
  return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }), _jsx("span", { className: "text-xs font-medium", children: value })] }));
@@ -117,11 +117,12 @@ function FeatureSettings({ data }) {
117
117
  const hasSettings = data.approvalGates != null ||
118
118
  data.push != null ||
119
119
  data.openPr != null ||
120
+ data.ciWatchEnabled != null ||
120
121
  data.enableEvidence != null ||
121
122
  data.modelId;
122
123
  if (!hasSettings)
123
124
  return null;
124
- return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-settings", className: "flex flex-col gap-3 p-4", children: [_jsx("span", { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "SETTINGS" }), data.modelId ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Model" }), _jsx("span", { className: "text-sm", children: getModelMeta(data.modelId).displayName || data.modelId })] })) : null, data.approvalGates ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(ShieldCheck, { className: "h-3 w-3" }), "Auto-Approve"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [_jsx(SettingBadge, { enabled: data.approvalGates.allowPrd, label: "PRD" }), _jsx(SettingBadge, { enabled: data.approvalGates.allowPlan, label: "Plan" }), _jsx(SettingBadge, { enabled: data.approvalGates.allowMerge, label: "Merge" })] })] })) : null, data.enableEvidence != null ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(FileSearch, { className: "h-3 w-3" }), "Evidence"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [_jsx(SettingBadge, { enabled: data.enableEvidence, label: "Collect" }), data.commitEvidence != null ? (_jsx(SettingBadge, { enabled: data.commitEvidence, label: "Add to PR" })) : null] })] })) : null, data.push != null || data.openPr != null ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(GitBranch, { className: "h-3 w-3" }), "Git"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [data.push != null ? _jsx(SettingBadge, { enabled: data.push, label: "Push" }) : null, data.openPr != null ? _jsx(SettingBadge, { enabled: data.openPr, label: "PR" }) : null] })] })) : null] })] }));
125
+ return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-settings", className: "flex flex-col gap-3 p-4", children: [_jsx("span", { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "SETTINGS" }), data.modelId ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Model" }), _jsx("span", { className: "text-sm", children: getModelMeta(data.modelId).displayName || data.modelId })] })) : null, data.approvalGates ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(ShieldCheck, { className: "h-3 w-3" }), "Auto-Approve"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [_jsx(SettingBadge, { enabled: data.approvalGates.allowPrd, label: "PRD" }), _jsx(SettingBadge, { enabled: data.approvalGates.allowPlan, label: "Plan" }), _jsx(SettingBadge, { enabled: data.approvalGates.allowMerge, label: "Merge" })] })] })) : null, data.enableEvidence != null ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(FileSearch, { className: "h-3 w-3" }), "Evidence"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [_jsx(SettingBadge, { enabled: data.enableEvidence, label: "Collect" }), data.commitEvidence != null ? (_jsx(SettingBadge, { enabled: data.commitEvidence, label: "Add to PR" })) : null] })] })) : null, data.push != null || data.openPr != null || data.ciWatchEnabled != null ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("span", { className: "text-muted-foreground flex items-center gap-1 text-xs font-medium", children: [_jsx(GitBranch, { className: "h-3 w-3" }), "Git"] }), _jsxs("div", { className: "flex flex-wrap gap-1.5", children: [data.push != null ? _jsx(SettingBadge, { enabled: data.push, label: "Push" }) : null, data.openPr != null ? _jsx(SettingBadge, { enabled: data.openPr, label: "PR" }) : null, data.ciWatchEnabled != null ? (_jsx(SettingBadge, { enabled: data.ciWatchEnabled, label: "Watch" })) : null] })] })) : null] })] }));
125
126
  }
126
127
  function DetailRow({ label, value }) {
127
128
  return (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }), _jsx("span", { className: "text-sm", children: value })] }));
@@ -20,6 +20,8 @@ export interface FeatureNodeData {
20
20
  repositoryPath: string;
21
21
  /** Git branch name for this feature */
22
22
  branch: string;
23
+ /** Absolute path to the git worktree for this feature (sessions use this path) */
24
+ worktreePath?: string;
23
25
  /** Absolute path to the specs folder on disk */
24
26
  specPath?: string;
25
27
  /** Epoch ms when the current agent run started (for elapsed-time in sidebar) */
@@ -69,6 +71,8 @@ export interface FeatureNodeData {
69
71
  push?: boolean;
70
72
  /** Whether to open a PR after implementation */
71
73
  openPr?: boolean;
74
+ /** Whether CI watch/fix loop is enabled after push */
75
+ ciWatchEnabled?: boolean;
72
76
  /** Whether evidence collection is enabled for this feature */
73
77
  enableEvidence?: boolean;
74
78
  /** Whether evidence is committed to the PR body */