@shepai/cli 1.84.0 → 1.85.0-pr167.6da42c7

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 (314) hide show
  1. package/apis/json-schema/Attachment.yaml +31 -0
  2. package/apis/json-schema/Feature.yaml +5 -0
  3. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +2 -1
  4. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.d.ts +22 -0
  6. package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.d.ts.map +1 -0
  7. package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.js +76 -0
  8. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
  9. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +35 -3
  11. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +7 -1
  12. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  13. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts +7 -2
  14. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
  15. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +29 -15
  16. package/dist/packages/core/src/domain/generated/output.d.ts +33 -0
  17. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/di/container.js +8 -0
  20. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
  21. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +4 -0
  23. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +16 -0
  25. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +3 -0
  27. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts +2 -0
  28. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +3 -0
  30. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts +31 -0
  31. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts.map +1 -0
  32. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.js +136 -0
  33. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +1 -1
  34. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
  35. package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +6 -2
  36. package/dist/src/presentation/cli/commands/feat/del.command.d.ts +3 -1
  37. package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -1
  38. package/dist/src/presentation/cli/commands/feat/del.command.js +19 -2
  39. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  40. package/dist/src/presentation/cli/commands/feat/new.command.js +21 -1
  41. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts +7 -0
  42. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts.map +1 -0
  43. package/dist/src/presentation/web/app/actions/compose-user-input.js +7 -0
  44. package/dist/src/presentation/web/app/actions/create-feature.d.ts +1 -0
  45. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  46. package/dist/src/presentation/web/app/actions/create-feature.js +3 -9
  47. package/dist/src/presentation/web/app/actions/delete-feature.d.ts +1 -1
  48. package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -1
  49. package/dist/src/presentation/web/app/actions/delete-feature.js +4 -2
  50. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts +4 -0
  51. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -0
  52. package/dist/src/presentation/web/app/api/attachments/preview/route.js +47 -0
  53. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts +3 -0
  54. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +1 -0
  55. package/dist/src/presentation/web/app/api/attachments/upload/route.js +100 -0
  56. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts +16 -0
  57. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -0
  58. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +53 -0
  59. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +12 -0
  60. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -0
  61. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +55 -0
  62. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts +3 -0
  63. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts.map +1 -0
  64. package/dist/src/presentation/web/components/common/attachment-card/index.js +1 -0
  65. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts +11 -0
  66. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map +1 -0
  67. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +34 -0
  68. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +10 -0
  69. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -0
  70. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +44 -0
  71. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts +3 -0
  72. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts.map +1 -0
  73. package/dist/src/presentation/web/components/common/attachment-chip/index.js +1 -0
  74. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts +9 -0
  75. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts.map +1 -0
  76. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.js +1 -0
  77. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts +3 -0
  78. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -0
  79. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +16 -0
  80. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +8 -0
  81. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -0
  82. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +25 -0
  83. package/dist/src/presentation/web/components/common/delete-feature-dialog/index.d.ts +3 -0
  84. package/dist/src/presentation/web/components/common/delete-feature-dialog/index.d.ts.map +1 -0
  85. package/dist/src/presentation/web/components/common/delete-feature-dialog/index.js +1 -0
  86. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +11 -2
  87. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  88. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +199 -60
  89. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +6 -0
  90. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  91. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +18 -0
  92. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -1
  93. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  94. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +2 -2
  95. package/dist/src/presentation/web/components/ui/dialog.js +1 -1
  96. package/dist/src/presentation/web/next.config.d.ts.map +1 -1
  97. package/dist/src/presentation/web/next.config.js +6 -0
  98. package/dist/tsconfig.build.tsbuildinfo +1 -1
  99. package/package.json +1 -1
  100. package/web/.next/BUILD_ID +1 -1
  101. package/web/.next/app-path-routes-manifest.json +2 -0
  102. package/web/.next/build-manifest.json +2 -2
  103. package/web/.next/fallback-build-manifest.json +2 -2
  104. package/web/.next/prerender-manifest.json +3 -3
  105. package/web/.next/required-server-files.js +4 -1
  106. package/web/.next/required-server-files.json +4 -1
  107. package/web/.next/routes-manifest.json +12 -0
  108. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
  109. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
  110. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  111. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
  113. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
  114. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  115. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  117. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
  118. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  119. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
  121. package/web/.next/server/app/(dashboard)/create/page.js +2 -2
  122. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
  125. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
  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 +14 -14
  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 +14 -14
  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/page.js +2 -2
  137. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  138. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  139. package/web/.next/server/app/_global-error.html +2 -2
  140. package/web/.next/server/app/_global-error.rsc +1 -1
  141. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  142. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  143. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  144. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  145. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  146. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  147. package/web/.next/server/app/_not-found/page.js +2 -2
  148. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  149. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  150. package/web/.next/server/app/api/attachments/preview/route/app-paths-manifest.json +3 -0
  151. package/web/.next/server/app/api/attachments/preview/route/build-manifest.json +11 -0
  152. package/web/.next/server/app/api/attachments/preview/route/server-reference-manifest.json +4 -0
  153. package/web/.next/server/app/api/attachments/preview/route.js +7 -0
  154. package/web/.next/server/app/api/attachments/preview/route.js.map +5 -0
  155. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -0
  156. package/web/.next/server/app/api/attachments/preview/route_client-reference-manifest.js +2 -0
  157. package/web/.next/server/app/api/attachments/upload/route/app-paths-manifest.json +3 -0
  158. package/web/.next/server/app/api/attachments/upload/route/build-manifest.json +11 -0
  159. package/web/.next/server/app/api/attachments/upload/route/server-reference-manifest.json +4 -0
  160. package/web/.next/server/app/api/attachments/upload/route.js +7 -0
  161. package/web/.next/server/app/api/attachments/upload/route.js.map +5 -0
  162. package/web/.next/server/app/api/attachments/upload/route.js.nft.json +1 -0
  163. package/web/.next/server/app/api/attachments/upload/route_client-reference-manifest.js +2 -0
  164. package/web/.next/server/app/api/feature-logs/route.js +1 -1
  165. package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
  166. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  167. package/web/.next/server/app/settings/page.js +2 -2
  168. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  169. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  171. package/web/.next/server/app/skills/page.js +2 -2
  172. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  173. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  174. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  175. package/web/.next/server/app/tools/page.js +2 -2
  176. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  177. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  178. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  179. package/web/.next/server/app/version/page.js +2 -2
  180. package/web/.next/server/app/version/page.js.nft.json +1 -1
  181. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  182. package/web/.next/server/app-paths-manifest.json +2 -0
  183. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  184. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js +3 -0
  185. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js.map +1 -0
  186. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js +3 -0
  187. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js.map +1 -0
  188. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +3 -0
  189. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +1 -0
  190. package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js → [root-of-the-server]__52c318d1._.js} +2 -2
  191. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +3 -0
  192. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -0
  193. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  194. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +3 -0
  196. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +1 -0
  197. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
  198. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
  199. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
  200. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
  204. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
  205. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  206. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
  207. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  209. package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js → [root-of-the-server]__8d9536c4._.js} +2 -2
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +10 -0
  215. package/web/.next/server/chunks/ssr/{[root-of-the-server]__c3694f82._.js.map → [root-of-the-server]__b14946f5._.js.map} +1 -1
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +3 -0
  219. package/web/.next/server/chunks/ssr/{[root-of-the-server]__55f60c9d._.js.map → [root-of-the-server]__b65f78cf._.js.map} +1 -1
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js → [root-of-the-server]__f1a05100._.js} +2 -2
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8210f45._.js +3 -0
  224. package/web/.next/server/chunks/ssr/{[root-of-the-server]__01a37f7a._.js.map → [root-of-the-server]__f8210f45._.js.map} +1 -1
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  227. package/web/.next/server/chunks/ssr/_1bb131c4._.js +1 -1
  228. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
  230. package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/_34fbed18._.js +1 -1
  232. package/web/.next/server/chunks/ssr/_34fbed18._.js.map +1 -1
  233. package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
  236. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  237. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  238. package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
  239. package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
  240. package/web/.next/server/chunks/ssr/{_3785d5be._.js → _ae17914c._.js} +2 -2
  241. package/web/.next/server/chunks/ssr/_ae17914c._.js.map +1 -0
  242. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js → _cf366ac8._.js} +2 -2
  243. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js.map → _cf366ac8._.js.map} +1 -1
  244. package/web/.next/server/chunks/ssr/_d42594dd._.js +3 -0
  245. package/web/.next/server/chunks/ssr/_d42594dd._.js.map +1 -0
  246. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  247. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +3 -0
  249. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +1 -0
  250. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
  251. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  253. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  254. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  255. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -3
  257. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
  258. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js +3 -0
  259. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js.map +1 -0
  260. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js +3 -0
  261. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js.map +1 -0
  262. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
  265. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -3
  267. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
  268. package/web/.next/server/pages/500.html +2 -2
  269. package/web/.next/server/server-reference-manifest.js +1 -1
  270. package/web/.next/server/server-reference-manifest.json +28 -28
  271. package/web/.next/static/chunks/105bf89a9be2233e.js +1 -0
  272. package/web/.next/static/chunks/{4de791d92c72ae58.js → 1cf5764cf47b65a0.js} +1 -1
  273. package/web/.next/static/chunks/30c827a88342741e.js +1 -0
  274. package/web/.next/static/chunks/{de2515446676e0ae.js → 39ea9f329e14f6d7.js} +1 -1
  275. package/web/.next/static/chunks/50f89c3112f6dd23.css +2 -0
  276. package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
  277. package/web/.next/static/chunks/5fa3394ebc7686b1.js +1 -0
  278. package/web/.next/static/chunks/{6b4620c8b57a0683.js → 7f7b281a42c2cfac.js} +1 -1
  279. package/web/.next/static/chunks/8d750d758b8fdcf8.js +1 -0
  280. package/web/.next/static/chunks/8e764e213ecb8f23.js +1 -0
  281. package/web/.next/static/chunks/947842bed6fc7abf.js +1 -0
  282. package/web/.next/static/chunks/{0fb7745c30469b39.js → b31f2c82654437a6.js} +1 -1
  283. package/web/.next/static/chunks/{d00436ccde44862f.js → e726e4a8d6c2ab71.js} +2 -2
  284. package/web/.next/static/chunks/{48060fe38d7b8432.js → ed84ef576b171b4e.js} +3 -3
  285. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js +0 -3
  286. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js.map +0 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__01a37f7a._.js +0 -3
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__55f60c9d._.js +0 -3
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3694f82._.js +0 -10
  290. package/web/.next/server/chunks/ssr/_0387eb83._.js +0 -3
  291. package/web/.next/server/chunks/ssr/_0387eb83._.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/_3785d5be._.js.map +0 -1
  293. package/web/.next/server/chunks/ssr/_67dd9041._.js +0 -3
  294. package/web/.next/server/chunks/ssr/_67dd9041._.js.map +0 -1
  295. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js +0 -3
  296. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js.map +0 -1
  297. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js +0 -5
  298. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js +0 -3
  300. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +0 -1
  301. package/web/.next/static/chunks/2a24ac257fc1c10b.js +0 -1
  302. package/web/.next/static/chunks/6d0190cd8484320c.js +0 -1
  303. package/web/.next/static/chunks/6f0622cb06faf358.js +0 -1
  304. package/web/.next/static/chunks/7e92542991a14568.js +0 -1
  305. package/web/.next/static/chunks/a56b3854d2169db0.js +0 -1
  306. package/web/.next/static/chunks/ae01d2be1d0bad47.css +0 -2
  307. package/web/.next/static/chunks/df0b93fbb9b512e6.js +0 -1
  308. package/web/.next/static/chunks/e405f0502431ea60.js +0 -3
  309. /package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js.map → [root-of-the-server]__52c318d1._.js.map} +0 -0
  310. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js.map → [root-of-the-server]__8d9536c4._.js.map} +0 -0
  311. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js.map → [root-of-the-server]__f1a05100._.js.map} +0 -0
  312. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → 6PAu8DupwOOmprywN2OPZ}/_buildManifest.js +0 -0
  313. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → 6PAu8DupwOOmprywN2OPZ}/_clientMiddlewareManifest.json +0 -0
  314. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → 6PAu8DupwOOmprywN2OPZ}/_ssgManifest.js +0 -0
@@ -49,6 +49,7 @@ export interface FeatureRow {
49
49
  ci_fix_attempts: number | null;
50
50
  ci_fix_history: string | null;
51
51
  parent_id: string | null;
52
+ attachments: string;
52
53
  created_at: number;
53
54
  updated_at: number;
54
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"feature.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAGtE;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAwCvD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CA6CrD"}
1
+ {"version":3,"file":"feature.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAGtE;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CA4CvD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CA+CrD"}
@@ -57,6 +57,8 @@ export function toDatabase(feature) {
57
57
  ci_fix_history: feature.pr?.ciFixHistory ? JSON.stringify(feature.pr.ciFixHistory) : null,
58
58
  // Feature dependency
59
59
  parent_id: feature.parentId ?? null,
60
+ // User attachments
61
+ attachments: JSON.stringify((feature.attachments ?? []).map((a) => ({ ...a, size: Number(a.size) }))),
60
62
  created_at: feature.createdAt instanceof Date ? feature.createdAt.getTime() : feature.createdAt,
61
63
  updated_at: feature.updatedAt instanceof Date ? feature.updatedAt.getTime() : feature.updatedAt,
62
64
  };
@@ -112,5 +114,7 @@ export function fromDatabase(row) {
112
114
  }),
113
115
  // Feature dependency
114
116
  ...(row.parent_id != null && { parentId: row.parent_id }),
117
+ // User attachments
118
+ attachments: JSON.parse(row.attachments ?? '[]'),
115
119
  };
116
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAkc3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAkd3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
@@ -441,6 +441,22 @@ WHERE repository_path NOT IN (SELECT path FROM repositories WHERE path IS NOT NU
441
441
  }
442
442
  },
443
443
  },
444
+ {
445
+ version: 28,
446
+ // Migration 028: Add attachments JSON column to features.
447
+ // Also backfills fast column if missing (rebase reordered migrations 27/28,
448
+ // so DBs that ran the old migration 27 may have attachments but not fast).
449
+ sql: '',
450
+ handler: (db) => {
451
+ const columns = db.pragma('table_info(features)');
452
+ if (!columns.some((c) => c.name === 'fast')) {
453
+ db.exec('ALTER TABLE features ADD COLUMN fast INTEGER NOT NULL DEFAULT 0');
454
+ }
455
+ if (!columns.some((c) => c.name === 'attachments')) {
456
+ db.exec("ALTER TABLE features ADD COLUMN attachments TEXT NOT NULL DEFAULT '[]'");
457
+ }
458
+ },
459
+ },
444
460
  ];
445
461
  /**
446
462
  * The latest schema version (highest migration version number).
@@ -1 +1 @@
1
- {"version":3,"file":"feature-agent-worker.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAe1B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAU9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAiE1D;AAgCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAkP/D"}
1
+ {"version":3,"file":"feature-agent-worker.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAe1B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAW9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAiE1D;AAgCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAoP/D"}
@@ -24,6 +24,7 @@ import { setPhaseTimingContext, recordLifecycleEvent } from './phase-timing-cont
24
24
  import { setLifecycleContext } from './lifecycle-context.js';
25
25
  import { setLogPrefix, getLogPrefix } from './log-context.js';
26
26
  import { UpdateFeatureLifecycleUseCase } from '../../../../application/use-cases/features/update/update-feature-lifecycle.use-case.js';
27
+ import { CleanupFeatureWorktreeUseCase } from '../../../../application/use-cases/features/cleanup-feature-worktree.use-case.js';
27
28
  /**
28
29
  * Parse CLI arguments into a WorkerArgs object.
29
30
  * Throws if any required argument is missing.
@@ -167,6 +168,7 @@ export async function runWorker(args) {
167
168
  // Resolve merge node dependencies
168
169
  const gitPrService = container.resolve('IGitPrService');
169
170
  const featureRepository = container.resolve('IFeatureRepository');
171
+ const cleanupFeatureWorktreeUseCase = container.resolve(CleanupFeatureWorktreeUseCase);
170
172
  const graphDeps = {
171
173
  executor,
172
174
  mergeNodeDeps: {
@@ -176,6 +178,7 @@ export async function runWorker(args) {
176
178
  verifyMerge: (cwd, featureBranch, baseBranch) => gitPrService.verifyMerge(cwd, featureBranch, baseBranch),
177
179
  featureRepository,
178
180
  gitPrService,
181
+ cleanupFeatureWorktreeUseCase,
179
182
  },
180
183
  };
181
184
  // Use threadId for checkpoint path so resume runs share the same checkpoint DB.
@@ -16,6 +16,7 @@ import type { IAgentExecutor } from '../../../../../../application/ports/output/
16
16
  import type { FeatureAgentState } from '../../state.js';
17
17
  import type { IFeatureRepository } from '../../../../../../application/ports/output/repositories/feature-repository.interface.js';
18
18
  import type { DiffSummary, IGitPrService } from '../../../../../../application/ports/output/services/git-pr-service.interface.js';
19
+ import type { CleanupFeatureWorktreeUseCase } from '../../../../../../application/use-cases/features/cleanup-feature-worktree.use-case.js';
19
20
  export interface MergeNodeDeps {
20
21
  executor: IAgentExecutor;
21
22
  getDiffSummary: (cwd: string, baseBranch: string) => Promise<DiffSummary>;
@@ -28,6 +29,7 @@ export interface MergeNodeDeps {
28
29
  */
29
30
  verifyMerge: (cwd: string, featureBranch: string, baseBranch: string) => Promise<boolean>;
30
31
  gitPrService: IGitPrService;
32
+ cleanupFeatureWorktreeUseCase: Pick<CleanupFeatureWorktreeUseCase, 'execute'>;
31
33
  }
32
34
  /**
33
35
  * Factory that creates the merge node function.
@@ -1 +1 @@
1
- {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1F,YAAY,EAAE,aAAa,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAsQ7E"}
1
+ {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAkBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1F,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA0Q7E"}
@@ -231,6 +231,9 @@ export function createMergeNode(deps) {
231
231
  updatedAt: new Date(),
232
232
  });
233
233
  messages.push(`[merge] Feature lifecycle → ${newLifecycle}`);
234
+ if (merged) {
235
+ await deps.cleanupFeatureWorktreeUseCase.execute(feature.id);
236
+ }
234
237
  }
235
238
  const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
236
239
  await recordPhaseEnd(mergeTimingId, Date.now() - startTime);
@@ -0,0 +1,31 @@
1
+ import type { Attachment } from '../../domain/generated/output.js';
2
+ /** Attachment record extended with SHA-256 hash for dedup tracking. */
3
+ export interface StoredAttachment extends Attachment {
4
+ sha256: string;
5
+ }
6
+ export declare class AttachmentStorageService {
7
+ /** In-memory dedup index: sessionId -> Map<sha256, StoredAttachment> */
8
+ private readonly dedupIndex;
9
+ /**
10
+ * Store a file buffer in the pending attachment directory within SHEP_HOME.
11
+ * Returns existing record if SHA-256 matches (dedup within same session).
12
+ */
13
+ store(buffer: Buffer, filename: string, mimeType: string, sessionId: string): StoredAttachment;
14
+ /**
15
+ * Commit pending uploads: rename pending dir to feature slug dir,
16
+ * update paths on all attachment records.
17
+ */
18
+ commit(sessionId: string, featureSlug: string): Attachment[];
19
+ /**
20
+ * Delete all attachments for a feature.
21
+ */
22
+ delete(featureSlug: string): void;
23
+ private getAttachmentsRoot;
24
+ private getPendingDir;
25
+ private getSlugDir;
26
+ /** Generate unique filename by appending content hash when name collides (e.g. clipboard "image.png"). */
27
+ private uniqueFilename;
28
+ /** Strip path traversal and non-safe characters from filenames. */
29
+ private sanitizeFilename;
30
+ }
31
+ //# sourceMappingURL=attachment-storage.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-storage.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/attachment-storage.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE,uEAAuE;AACvE,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,wBAAwB;IACnC,wEAAwE;IACxE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoD;IAE/E;;;OAGG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAmC9F;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,EAAE;IAgD5D;;OAEG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAOjC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,UAAU;IAIlB,0GAA0G;IAC1G,OAAO,CAAC,cAAc;IAMtB,mEAAmE;IACnE,OAAO,CAAC,gBAAgB;CAYzB"}
@@ -0,0 +1,136 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { injectable } from 'tsyringe';
8
+ import { mkdirSync, writeFileSync, renameSync, rmSync, existsSync, readdirSync } from 'fs';
9
+ import { join, basename } from 'path';
10
+ import { createHash, randomUUID } from 'crypto';
11
+ import { getShepHomeDir } from './filesystem/shep-directory.service.js';
12
+ let AttachmentStorageService = class AttachmentStorageService {
13
+ /** In-memory dedup index: sessionId -> Map<sha256, StoredAttachment> */
14
+ dedupIndex = new Map();
15
+ /**
16
+ * Store a file buffer in the pending attachment directory within SHEP_HOME.
17
+ * Returns existing record if SHA-256 matches (dedup within same session).
18
+ */
19
+ store(buffer, filename, mimeType, sessionId) {
20
+ const hash = createHash('sha256').update(buffer).digest('hex');
21
+ // Check dedup
22
+ const sessionMap = this.dedupIndex.get(sessionId);
23
+ if (sessionMap?.has(hash)) {
24
+ return sessionMap.get(hash);
25
+ }
26
+ const sanitized = this.uniqueFilename(this.sanitizeFilename(filename), hash);
27
+ const pendingDir = this.getPendingDir(sessionId);
28
+ mkdirSync(pendingDir, { recursive: true });
29
+ const filePath = join(pendingDir, sanitized);
30
+ writeFileSync(filePath, buffer);
31
+ const attachment = {
32
+ id: randomUUID(),
33
+ name: sanitized,
34
+ size: BigInt(buffer.length),
35
+ mimeType,
36
+ path: filePath,
37
+ createdAt: new Date(),
38
+ sha256: hash,
39
+ };
40
+ // Track for dedup
41
+ if (!this.dedupIndex.has(sessionId)) {
42
+ this.dedupIndex.set(sessionId, new Map());
43
+ }
44
+ this.dedupIndex.get(sessionId).set(hash, attachment);
45
+ return attachment;
46
+ }
47
+ /**
48
+ * Commit pending uploads: rename pending dir to feature slug dir,
49
+ * update paths on all attachment records.
50
+ */
51
+ commit(sessionId, featureSlug) {
52
+ const pendingDir = this.getPendingDir(sessionId);
53
+ const slugDir = this.getSlugDir(featureSlug);
54
+ if (!existsSync(pendingDir)) {
55
+ return [];
56
+ }
57
+ // Rename atomically
58
+ mkdirSync(this.getAttachmentsRoot(), { recursive: true });
59
+ renameSync(pendingDir, slugDir);
60
+ // Build updated attachment records
61
+ const sessionMap = this.dedupIndex.get(sessionId);
62
+ const attachments = [];
63
+ if (sessionMap) {
64
+ for (const stored of sessionMap.values()) {
65
+ const newPath = join(slugDir, basename(stored.path));
66
+ attachments.push({
67
+ id: stored.id,
68
+ name: stored.name,
69
+ size: stored.size,
70
+ mimeType: stored.mimeType,
71
+ path: newPath,
72
+ createdAt: stored.createdAt,
73
+ });
74
+ }
75
+ this.dedupIndex.delete(sessionId);
76
+ }
77
+ else {
78
+ // Fallback: read files from slugDir
79
+ const files = readdirSync(slugDir);
80
+ for (const file of files) {
81
+ const filePath = join(slugDir, file);
82
+ attachments.push({
83
+ id: randomUUID(),
84
+ name: file,
85
+ size: BigInt(0),
86
+ mimeType: 'application/octet-stream',
87
+ path: filePath,
88
+ createdAt: new Date(),
89
+ });
90
+ }
91
+ }
92
+ return attachments;
93
+ }
94
+ /**
95
+ * Delete all attachments for a feature.
96
+ */
97
+ delete(featureSlug) {
98
+ const slugDir = this.getSlugDir(featureSlug);
99
+ if (existsSync(slugDir)) {
100
+ rmSync(slugDir, { recursive: true, force: true });
101
+ }
102
+ }
103
+ getAttachmentsRoot() {
104
+ return join(getShepHomeDir(), 'attachments');
105
+ }
106
+ getPendingDir(sessionId) {
107
+ return join(getShepHomeDir(), 'attachments', `pending-${sessionId}`);
108
+ }
109
+ getSlugDir(featureSlug) {
110
+ return join(getShepHomeDir(), 'attachments', featureSlug);
111
+ }
112
+ /** Generate unique filename by appending content hash when name collides (e.g. clipboard "image.png"). */
113
+ uniqueFilename(filename, hash) {
114
+ const dot = filename.lastIndexOf('.');
115
+ if (dot <= 0)
116
+ return `${filename}-${hash.slice(0, 8)}`;
117
+ return `${filename.slice(0, dot)}-${hash.slice(0, 8)}${filename.slice(dot)}`;
118
+ }
119
+ /** Strip path traversal and non-safe characters from filenames. */
120
+ sanitizeFilename(filename) {
121
+ // Remove path components, keep only the filename
122
+ let name = basename(filename);
123
+ // Remove path traversal
124
+ name = name.replace(/\.\./g, '');
125
+ // Replace non-alphanumeric chars (except dot, hyphen, underscore) with underscore
126
+ name = name.replace(/[^a-zA-Z0-9._-]/g, '_');
127
+ // Remove leading dots (hidden files)
128
+ name = name.replace(/^\.+/, '');
129
+ // Fallback if empty
130
+ return name || 'unnamed';
131
+ }
132
+ };
133
+ AttachmentStorageService = __decorate([
134
+ injectable()
135
+ ], AttachmentStorageService);
136
+ export { AttachmentStorageService };
@@ -18,7 +18,7 @@ export declare class WorktreeService implements IWorktreeService {
18
18
  private readonly execFile;
19
19
  constructor(execFile: ExecFunction);
20
20
  create(repoPath: string, branch: string, worktreePath: string, startPoint?: string): Promise<WorktreeInfo>;
21
- remove(worktreePath: string): Promise<void>;
21
+ remove(worktreePath: string, force?: boolean): Promise<void>;
22
22
  list(repoPath: string): Promise<WorktreeInfo[]>;
23
23
  exists(repoPath: string, branch: string): Promise<boolean>;
24
24
  branchExists(repoPath: string, branch: string): Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAqBlB,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAU9B"}
1
+ {"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAqBlB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAU9B"}
@@ -48,9 +48,13 @@ let WorktreeService = class WorktreeService {
48
48
  }
49
49
  return created;
50
50
  }
51
- async remove(worktreePath) {
51
+ async remove(worktreePath, force) {
52
52
  try {
53
- await this.execFile('git', ['worktree', 'remove', worktreePath], {});
53
+ const args = ['worktree', 'remove'];
54
+ if (force)
55
+ args.push('--force');
56
+ args.push(worktreePath);
57
+ await this.execFile('git', args, {});
54
58
  }
55
59
  catch (error) {
56
60
  throw this.parseGitError(error);
@@ -2,12 +2,14 @@
2
2
  * Feature Delete Command
3
3
  *
4
4
  * Deletes a feature, its worktree, and cancels any running agent.
5
+ * Optionally cleans up worktree and branches (local + remote).
5
6
  *
6
- * Usage: shep feat del <id> [--force]
7
+ * Usage: shep feat del <id> [--force] [--no-cleanup]
7
8
  *
8
9
  * @example
9
10
  * $ shep feat del feat-123
10
11
  * $ shep feat del feat-123 --force
12
+ * $ shep feat del feat-123 --force --no-cleanup
11
13
  */
12
14
  import { Command } from 'commander';
13
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"del.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/del.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAoC1C"}
1
+ {"version":3,"file":"del.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/del.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAmD1C"}
@@ -2,12 +2,14 @@
2
2
  * Feature Delete Command
3
3
  *
4
4
  * Deletes a feature, its worktree, and cancels any running agent.
5
+ * Optionally cleans up worktree and branches (local + remote).
5
6
  *
6
- * Usage: shep feat del <id> [--force]
7
+ * Usage: shep feat del <id> [--force] [--no-cleanup]
7
8
  *
8
9
  * @example
9
10
  * $ shep feat del feat-123
10
11
  * $ shep feat del feat-123 --force
12
+ * $ shep feat del feat-123 --force --no-cleanup
11
13
  */
12
14
  import { Command } from 'commander';
13
15
  import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
@@ -23,6 +25,7 @@ export function createDelCommand() {
23
25
  .description('Delete a feature')
24
26
  .argument('<id>', 'Feature ID or prefix')
25
27
  .option('-f, --force', 'Skip confirmation prompt')
28
+ .option('--no-cleanup', 'Skip worktree and branch cleanup')
26
29
  .action(async (featureId, options) => {
27
30
  try {
28
31
  // First show what we're about to delete
@@ -38,12 +41,26 @@ export function createDelCommand() {
38
41
  return;
39
42
  }
40
43
  }
44
+ // Determine cleanup preference
45
+ let cleanup = true;
46
+ if (options.cleanup === false) {
47
+ cleanup = false;
48
+ }
49
+ else if (!options.force) {
50
+ cleanup = await confirm({
51
+ message: 'Also clean up worktree and branches?',
52
+ default: true,
53
+ });
54
+ }
41
55
  const deleteUseCase = container.resolve(DeleteFeatureUseCase);
42
- await deleteUseCase.execute(feature.id);
56
+ await deleteUseCase.execute(feature.id, { cleanup });
43
57
  messages.newline();
44
58
  messages.success('Feature deleted');
45
59
  console.log(` ${colors.muted('Name:')} ${feature.name}`);
46
60
  console.log(` ${colors.muted('Branch:')} ${feature.branch}`);
61
+ if (cleanup) {
62
+ console.log(` ${colors.muted('Cleanup:')} worktree, local branch, remote branch`);
63
+ }
47
64
  messages.newline();
48
65
  }
49
66
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"new.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/new.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmDpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAgH1C"}
1
+ {"version":3,"file":"new.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/new.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0DpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAgI1C"}
@@ -11,13 +11,18 @@
11
11
  */
12
12
  import { Command } from 'commander';
13
13
  import { createHash } from 'node:crypto';
14
- import { join } from 'node:path';
14
+ import { existsSync } from 'node:fs';
15
+ import { join, resolve } from 'node:path';
15
16
  import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
16
17
  import { CreateFeatureUseCase } from '../../../../../packages/core/src/application/use-cases/features/create/create-feature.use-case.js';
17
18
  import { SdlcLifecycle } from '../../../../../packages/core/src/domain/generated/output.js';
18
19
  import { colors, messages, spinner } from '../../ui/index.js';
19
20
  import { getShepHomeDir } from '../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.js';
20
21
  import { getSettings, hasSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
22
+ /** Commander collect pattern for repeatable options. */
23
+ function collect(value, previous) {
24
+ return [...previous, value];
25
+ }
21
26
  function getWorkflowDefaults() {
22
27
  if (!hasSettings()) {
23
28
  return { openPr: false, allowPrd: false, allowPlan: false, allowMerge: false, push: false };
@@ -50,6 +55,7 @@ export function createNewCommand() {
50
55
  .option('--parent <fid>', 'Parent feature ID (full or partial prefix)')
51
56
  .option('--fast', 'Skip SDLC phases and implement directly from your prompt')
52
57
  .option('--model <model>', 'LLM model identifier for this run (e.g. claude-opus-4-6)')
58
+ .option('--attach <path>', 'Attach a file (repeatable)', collect, [])
53
59
  .action(async (description, options) => {
54
60
  try {
55
61
  const useCase = container.resolve(CreateFeatureUseCase);
@@ -78,6 +84,19 @@ export function createNewCommand() {
78
84
  }
79
85
  parentId = parentFeature.id;
80
86
  }
87
+ // Validate --attach paths
88
+ const attachmentPaths = [];
89
+ if (options.attach && options.attach.length > 0) {
90
+ for (const raw of options.attach) {
91
+ const resolved = resolve(raw);
92
+ if (!existsSync(resolved)) {
93
+ messages.error(`Attachment not found: ${resolved}`);
94
+ process.exitCode = 1;
95
+ return;
96
+ }
97
+ attachmentPaths.push(resolved);
98
+ }
99
+ }
81
100
  const result = await spinner('Thinking', () => useCase.execute({
82
101
  userInput: description,
83
102
  repositoryPath: repoPath,
@@ -87,6 +106,7 @@ export function createNewCommand() {
87
106
  ...(parentId !== undefined && { parentId }),
88
107
  ...(options.fast && { fast: true }),
89
108
  ...(options.model !== undefined && { model: options.model }),
109
+ ...(attachmentPaths.length > 0 && { attachmentPaths }),
90
110
  }));
91
111
  const { feature, warning } = result;
92
112
  const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
@@ -0,0 +1,7 @@
1
+ interface Attachment {
2
+ path: string;
3
+ name: string;
4
+ }
5
+ export declare function composeUserInput(description: string, attachments: Attachment[] | undefined): string;
6
+ export {};
7
+ //# sourceMappingURL=compose-user-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-user-input.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/compose-user-input.ts"],"names":[],"mappings":"AAAA,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,UAAU,EAAE,GAAG,SAAS,GACpC,MAAM,CAOR"}
@@ -0,0 +1,7 @@
1
+ export function composeUserInput(description, attachments) {
2
+ if (!attachments || attachments.length === 0) {
3
+ return description;
4
+ }
5
+ const refs = attachments.map((a) => `@${a.path}`).join(' ');
6
+ return `${description}\n\n${refs}`;
7
+ }
@@ -7,6 +7,7 @@ interface CreateFeatureInput {
7
7
  description: string;
8
8
  repositoryPath: string;
9
9
  attachments?: Attachment[];
10
+ sessionId?: string;
10
11
  approvalGates?: {
11
12
  allowPrd: boolean;
12
13
  allowPlan: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"create-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/create-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAQD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE;QACd,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,wBAAsB,aAAa,CACjC,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0EhD"}
1
+ {"version":3,"file":"create-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/create-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAGpE,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAQD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE;QACd,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA4EhD"}
@@ -1,15 +1,8 @@
1
1
  'use server';
2
2
  import { resolve } from '../../lib/server-container.js';
3
- function composeUserInput(description, attachments) {
4
- let userInput = description;
5
- if (attachments && attachments.length > 0) {
6
- const paths = attachments.map((a) => `- ${a.path}`).join('\n');
7
- userInput += `\n\nAttached files:\n${paths}`;
8
- }
9
- return userInput;
10
- }
3
+ import { composeUserInput } from './compose-user-input.js';
11
4
  export async function createFeature(input) {
12
- const { description, repositoryPath, attachments, approvalGates, push, openPr, parentId, fast, agentType, model, } = input;
5
+ const { description, repositoryPath, attachments, sessionId, approvalGates, push, openPr, parentId, fast, agentType, model, } = input;
13
6
  if (!description?.trim()) {
14
7
  return { error: 'description is required' };
15
8
  }
@@ -50,6 +43,7 @@ export async function createFeature(input) {
50
43
  ...(fast ? { fast } : {}),
51
44
  ...(agentType ? { agentType } : {}),
52
45
  ...(model ? { model } : {}),
46
+ ...(sessionId ? { sessionId } : {}),
53
47
  }, shouldSpawn)
54
48
  .catch((err) => {
55
49
  // eslint-disable-next-line no-console
@@ -1,5 +1,5 @@
1
1
  import type { Feature } from '../../../../../packages/core/src/domain/generated/output.js';
2
- export declare function deleteFeature(featureId: string): Promise<{
2
+ export declare function deleteFeature(featureId: string, cleanup?: boolean): Promise<{
3
3
  feature?: Feature;
4
4
  error?: string;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAahD"}
1
+ {"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBhD"}
@@ -1,12 +1,14 @@
1
1
  'use server';
2
2
  import { resolve } from '../../lib/server-container.js';
3
- export async function deleteFeature(featureId) {
3
+ export async function deleteFeature(featureId, cleanup) {
4
4
  if (!featureId?.trim()) {
5
5
  return { error: 'id is required' };
6
6
  }
7
7
  try {
8
8
  const deleteFeatureUseCase = resolve('DeleteFeatureUseCase');
9
- const feature = await deleteFeatureUseCase.execute(featureId);
9
+ const feature = cleanup !== undefined
10
+ ? await deleteFeatureUseCase.execute(featureId, { cleanup })
11
+ : await deleteFeatureUseCase.execute(featureId);
10
12
  return { feature };
11
13
  }
12
14
  catch (error) {
@@ -0,0 +1,4 @@
1
+ import type { NextRequest } from 'next/server';
2
+ import { NextResponse } from 'next/server';
3
+ export declare function GET(request: NextRequest): Promise<NextResponse>;
4
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/preview/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsB3C,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CA6BrE"}