@shepai/cli 1.14.2 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/README.md +191 -101
  2. package/dist/src/application/ports/output/{agent-executor-factory.interface.d.ts → agents/agent-executor-factory.interface.d.ts} +1 -1
  3. package/dist/src/application/ports/output/agents/agent-executor-factory.interface.d.ts.map +1 -0
  4. package/dist/src/application/ports/output/{agent-executor.interface.d.ts → agents/agent-executor.interface.d.ts} +1 -1
  5. package/dist/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -0
  6. package/dist/src/application/ports/output/{agent-registry.interface.d.ts → agents/agent-registry.interface.d.ts} +1 -1
  7. package/dist/src/application/ports/output/agents/agent-registry.interface.d.ts.map +1 -0
  8. package/dist/src/application/ports/output/{agent-run-repository.interface.d.ts → agents/agent-run-repository.interface.d.ts} +1 -1
  9. package/dist/src/application/ports/output/agents/agent-run-repository.interface.d.ts.map +1 -0
  10. package/dist/src/application/ports/output/{agent-runner.interface.d.ts → agents/agent-runner.interface.d.ts} +1 -1
  11. package/dist/src/application/ports/output/agents/agent-runner.interface.d.ts.map +1 -0
  12. package/dist/src/application/ports/output/{agent-validator.interface.d.ts → agents/agent-validator.interface.d.ts} +1 -1
  13. package/dist/src/application/ports/output/agents/agent-validator.interface.d.ts.map +1 -0
  14. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +44 -0
  15. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -0
  16. package/dist/src/application/ports/output/agents/feature-agent-process.interface.js +12 -0
  17. package/dist/src/application/ports/output/agents/index.d.ts +13 -0
  18. package/dist/src/application/ports/output/agents/index.d.ts.map +1 -0
  19. package/dist/src/application/ports/output/agents/index.js +6 -0
  20. package/dist/src/application/ports/output/index.d.ts +8 -11
  21. package/dist/src/application/ports/output/index.d.ts.map +1 -1
  22. package/dist/src/application/ports/output/index.js +5 -3
  23. package/dist/src/application/ports/output/repositories/feature-repository.interface.d.ts +76 -0
  24. package/dist/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -0
  25. package/dist/src/application/ports/output/repositories/feature-repository.interface.js +11 -0
  26. package/dist/src/application/ports/output/repositories/index.d.ts +8 -0
  27. package/dist/src/application/ports/output/repositories/index.d.ts.map +1 -0
  28. package/dist/src/application/ports/output/repositories/index.js +6 -0
  29. package/dist/src/application/ports/output/{settings.repository.interface.d.ts → repositories/settings.repository.interface.d.ts} +1 -1
  30. package/dist/src/application/ports/output/repositories/settings.repository.interface.d.ts.map +1 -0
  31. package/dist/src/application/ports/output/services/external-issue-fetcher.interface.d.ts +69 -0
  32. package/dist/src/application/ports/output/services/external-issue-fetcher.interface.d.ts.map +1 -0
  33. package/dist/src/application/ports/output/services/external-issue-fetcher.interface.js +46 -0
  34. package/dist/src/application/ports/output/services/index.d.ts +13 -0
  35. package/dist/src/application/ports/output/services/index.d.ts.map +1 -0
  36. package/dist/src/application/ports/output/services/index.js +7 -0
  37. package/dist/src/application/ports/output/services/spec-initializer.interface.d.ts +33 -0
  38. package/dist/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -0
  39. package/dist/src/application/ports/output/services/spec-initializer.interface.js +8 -0
  40. package/dist/src/application/ports/output/{version-service.interface.d.ts → services/version-service.interface.d.ts} +1 -1
  41. package/dist/src/application/ports/output/services/version-service.interface.d.ts.map +1 -0
  42. package/dist/src/application/ports/output/services/web-server-service.interface.d.ts.map +1 -0
  43. package/dist/src/application/ports/output/services/worktree-service.interface.d.ts +83 -0
  44. package/dist/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -0
  45. package/dist/src/application/ports/output/services/worktree-service.interface.js +30 -0
  46. package/dist/src/application/use-cases/agents/approve-agent-run.use-case.d.ts +22 -0
  47. package/dist/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -0
  48. package/dist/src/application/use-cases/agents/approve-agent-run.use-case.js +67 -0
  49. package/dist/src/application/use-cases/agents/configure-agent.use-case.d.ts +2 -2
  50. package/dist/src/application/use-cases/agents/configure-agent.use-case.d.ts.map +1 -1
  51. package/dist/src/application/use-cases/agents/delete-agent-run.use-case.d.ts +16 -0
  52. package/dist/src/application/use-cases/agents/delete-agent-run.use-case.d.ts.map +1 -0
  53. package/dist/src/application/use-cases/agents/delete-agent-run.use-case.js +46 -0
  54. package/dist/src/application/use-cases/agents/get-agent-run.use-case.d.ts +22 -0
  55. package/dist/src/application/use-cases/agents/get-agent-run.use-case.d.ts.map +1 -0
  56. package/dist/src/application/use-cases/agents/get-agent-run.use-case.js +42 -0
  57. package/dist/src/application/use-cases/agents/list-agent-runs.use-case.d.ts +21 -0
  58. package/dist/src/application/use-cases/agents/list-agent-runs.use-case.d.ts.map +1 -0
  59. package/dist/src/application/use-cases/agents/list-agent-runs.use-case.js +54 -0
  60. package/dist/src/application/use-cases/agents/reject-agent-run.use-case.d.ts +16 -0
  61. package/dist/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -0
  62. package/dist/src/application/use-cases/agents/reject-agent-run.use-case.js +52 -0
  63. package/dist/src/application/use-cases/agents/run-agent.use-case.d.ts +2 -2
  64. package/dist/src/application/use-cases/agents/run-agent.use-case.d.ts.map +1 -1
  65. package/dist/src/application/use-cases/agents/show-agent-run.use-case.d.ts +24 -0
  66. package/dist/src/application/use-cases/agents/show-agent-run.use-case.d.ts.map +1 -0
  67. package/dist/src/application/use-cases/agents/show-agent-run.use-case.js +52 -0
  68. package/dist/src/application/use-cases/agents/stop-agent-run.use-case.d.ts +15 -0
  69. package/dist/src/application/use-cases/agents/stop-agent-run.use-case.d.ts.map +1 -0
  70. package/dist/src/application/use-cases/agents/stop-agent-run.use-case.js +86 -0
  71. package/dist/src/application/use-cases/agents/validate-agent-auth.use-case.d.ts +1 -1
  72. package/dist/src/application/use-cases/agents/validate-agent-auth.use-case.d.ts.map +1 -1
  73. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +43 -0
  74. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -0
  75. package/dist/src/application/use-cases/features/create-feature.use-case.js +166 -0
  76. package/dist/src/application/use-cases/features/delete-feature.use-case.d.ts +27 -0
  77. package/dist/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -0
  78. package/dist/src/application/use-cases/features/delete-feature.use-case.js +83 -0
  79. package/dist/src/application/use-cases/features/list-features.use-case.d.ts +17 -0
  80. package/dist/src/application/use-cases/features/list-features.use-case.d.ts.map +1 -0
  81. package/dist/src/application/use-cases/features/list-features.use-case.js +37 -0
  82. package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts +24 -0
  83. package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -0
  84. package/dist/src/application/use-cases/features/resume-feature.use-case.js +100 -0
  85. package/dist/src/application/use-cases/features/show-feature.use-case.d.ts +17 -0
  86. package/dist/src/application/use-cases/features/show-feature.use-case.d.ts.map +1 -0
  87. package/dist/src/application/use-cases/features/show-feature.use-case.js +43 -0
  88. package/dist/src/application/use-cases/settings/initialize-settings.use-case.d.ts +1 -1
  89. package/dist/src/application/use-cases/settings/initialize-settings.use-case.d.ts.map +1 -1
  90. package/dist/src/application/use-cases/settings/load-settings.use-case.d.ts +1 -1
  91. package/dist/src/application/use-cases/settings/load-settings.use-case.d.ts.map +1 -1
  92. package/dist/src/application/use-cases/settings/update-settings.use-case.d.ts +1 -1
  93. package/dist/src/application/use-cases/settings/update-settings.use-case.d.ts.map +1 -1
  94. package/dist/src/domain/generated/output.d.ts +26 -1
  95. package/dist/src/domain/generated/output.d.ts.map +1 -1
  96. package/dist/src/domain/generated/output.js +1 -0
  97. package/dist/src/infrastructure/di/container.d.ts.map +1 -1
  98. package/dist/src/infrastructure/di/container.js +64 -14
  99. package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts +4 -0
  100. package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts.map +1 -1
  101. package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.js +8 -0
  102. package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +50 -0
  103. package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -0
  104. package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +62 -0
  105. package/dist/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  106. package/dist/src/infrastructure/persistence/sqlite/migrations.js +49 -0
  107. package/dist/src/infrastructure/repositories/agent-run.repository.d.ts +1 -1
  108. package/dist/src/infrastructure/repositories/agent-run.repository.d.ts.map +1 -1
  109. package/dist/src/infrastructure/repositories/agent-run.repository.js +30 -8
  110. package/dist/src/infrastructure/repositories/sqlite-feature.repository.d.ts +25 -0
  111. package/dist/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -0
  112. package/dist/src/infrastructure/repositories/sqlite-feature.repository.js +113 -0
  113. package/dist/src/infrastructure/repositories/sqlite-settings.repository.d.ts +1 -1
  114. package/dist/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  115. package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/analyze-repository-graph.d.ts +1 -23
  116. package/dist/src/infrastructure/services/agents/analyze-repo/analyze-repository-graph.d.ts.map +1 -0
  117. package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/analyze-repository-graph.js +4 -11
  118. package/dist/src/infrastructure/services/agents/analyze-repo/prompts/analyze-repository.prompt.d.ts.map +1 -0
  119. package/dist/src/infrastructure/services/agents/{agent-executor-factory.service.d.ts → common/agent-executor-factory.service.d.ts} +3 -3
  120. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -0
  121. package/dist/src/infrastructure/services/agents/{agent-registry.service.d.ts → common/agent-registry.service.d.ts} +1 -1
  122. package/dist/src/infrastructure/services/agents/common/agent-registry.service.d.ts.map +1 -0
  123. package/dist/src/infrastructure/services/agents/{agent-registry.service.js → common/agent-registry.service.js} +7 -1
  124. package/dist/src/infrastructure/services/agents/{agent-runner.service.d.ts → common/agent-runner.service.d.ts} +5 -5
  125. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -0
  126. package/dist/src/infrastructure/services/agents/{agent-runner.service.js → common/agent-runner.service.js} +4 -4
  127. package/dist/src/infrastructure/services/agents/{agent-validator.service.d.ts → common/agent-validator.service.d.ts} +2 -2
  128. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -0
  129. package/dist/src/infrastructure/services/agents/{langgraph → common}/checkpointer.d.ts +1 -0
  130. package/dist/src/infrastructure/services/agents/common/checkpointer.d.ts.map +1 -0
  131. package/dist/src/infrastructure/services/agents/{langgraph → common}/checkpointer.js +6 -0
  132. package/dist/src/infrastructure/services/agents/{executors → common/executors}/claude-code-executor.service.d.ts +9 -2
  133. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -0
  134. package/dist/src/infrastructure/services/agents/{executors → common/executors}/claude-code-executor.service.js +103 -6
  135. package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts +15 -0
  136. package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts.map +1 -0
  137. package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.js +16 -0
  138. package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.d.ts +17 -0
  139. package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.d.ts.map +1 -0
  140. package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.js +49 -0
  141. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +244 -0
  142. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -0
  143. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +36 -0
  144. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +20 -0
  145. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -0
  146. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +90 -0
  147. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +31 -0
  148. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -0
  149. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +236 -0
  150. package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.d.ts +19 -0
  151. package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.d.ts.map +1 -0
  152. package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.js +38 -0
  153. package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.d.ts +7 -0
  154. package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.d.ts.map +1 -0
  155. package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.js +9 -0
  156. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts +11 -0
  157. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -0
  158. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +23 -0
  159. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +40 -0
  160. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -0
  161. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +114 -0
  162. package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.d.ts +7 -0
  163. package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.d.ts.map +1 -0
  164. package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.js +9 -0
  165. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.d.ts +9 -0
  166. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.d.ts.map +1 -0
  167. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.js +94 -0
  168. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts +8 -0
  169. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts.map +1 -0
  170. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.js +18 -0
  171. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts +11 -0
  172. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -0
  173. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +170 -0
  174. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts +10 -0
  175. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -0
  176. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +116 -0
  177. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts +10 -0
  178. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts.map +1 -0
  179. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.js +121 -0
  180. package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.d.ts +7 -0
  181. package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.d.ts.map +1 -0
  182. package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.js +9 -0
  183. package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.d.ts +7 -0
  184. package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.d.ts.map +1 -0
  185. package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.js +9 -0
  186. package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts +39 -0
  187. package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -0
  188. package/dist/src/infrastructure/services/agents/feature-agent/state.js +27 -0
  189. package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.d.ts +1 -1
  190. package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.d.ts.map +1 -1
  191. package/dist/src/infrastructure/services/external/github-issue.service.d.ts +19 -0
  192. package/dist/src/infrastructure/services/external/github-issue.service.d.ts.map +1 -0
  193. package/dist/src/infrastructure/services/external/github-issue.service.js +59 -0
  194. package/dist/src/infrastructure/services/external/jira-ticket.service.d.ts +23 -0
  195. package/dist/src/infrastructure/services/external/jira-ticket.service.d.ts.map +1 -0
  196. package/dist/src/infrastructure/services/external/jira-ticket.service.js +57 -0
  197. package/dist/src/infrastructure/services/git/worktree.service.d.ts +28 -0
  198. package/dist/src/infrastructure/services/git/worktree.service.d.ts.map +1 -0
  199. package/dist/src/infrastructure/services/git/worktree.service.js +112 -0
  200. package/dist/src/infrastructure/services/spec/spec-initializer.service.d.ts +17 -0
  201. package/dist/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -0
  202. package/dist/src/infrastructure/services/spec/spec-initializer.service.js +281 -0
  203. package/dist/src/infrastructure/services/web-server.service.d.ts +1 -1
  204. package/dist/src/infrastructure/services/web-server.service.d.ts.map +1 -1
  205. package/dist/src/presentation/cli/commands/agent/approve.command.d.ts +11 -0
  206. package/dist/src/presentation/cli/commands/agent/approve.command.d.ts.map +1 -0
  207. package/dist/src/presentation/cli/commands/agent/approve.command.js +42 -0
  208. package/dist/src/presentation/cli/commands/agent/delete.command.d.ts +11 -0
  209. package/dist/src/presentation/cli/commands/agent/delete.command.d.ts.map +1 -0
  210. package/dist/src/presentation/cli/commands/agent/delete.command.js +49 -0
  211. package/dist/src/presentation/cli/commands/agent/index.d.ts +21 -0
  212. package/dist/src/presentation/cli/commands/agent/index.d.ts.map +1 -0
  213. package/dist/src/presentation/cli/commands/agent/index.js +38 -0
  214. package/dist/src/presentation/cli/commands/agent/logs.command.d.ts +13 -0
  215. package/dist/src/presentation/cli/commands/agent/logs.command.d.ts.map +1 -0
  216. package/dist/src/presentation/cli/commands/agent/logs.command.js +163 -0
  217. package/dist/src/presentation/cli/commands/agent/ls.command.d.ts +12 -0
  218. package/dist/src/presentation/cli/commands/agent/ls.command.d.ts.map +1 -0
  219. package/dist/src/presentation/cli/commands/agent/ls.command.js +111 -0
  220. package/dist/src/presentation/cli/commands/agent/reject.command.d.ts +11 -0
  221. package/dist/src/presentation/cli/commands/agent/reject.command.d.ts.map +1 -0
  222. package/dist/src/presentation/cli/commands/agent/reject.command.js +43 -0
  223. package/dist/src/presentation/cli/commands/agent/resolve-run.d.ts +10 -0
  224. package/dist/src/presentation/cli/commands/agent/resolve-run.d.ts.map +1 -0
  225. package/dist/src/presentation/cli/commands/agent/resolve-run.js +27 -0
  226. package/dist/src/presentation/cli/commands/agent/show.command.d.ts +12 -0
  227. package/dist/src/presentation/cli/commands/agent/show.command.d.ts.map +1 -0
  228. package/dist/src/presentation/cli/commands/agent/show.command.js +202 -0
  229. package/dist/src/presentation/cli/commands/agent/stop.command.d.ts +11 -0
  230. package/dist/src/presentation/cli/commands/agent/stop.command.d.ts.map +1 -0
  231. package/dist/src/presentation/cli/commands/agent/stop.command.js +42 -0
  232. package/dist/src/presentation/cli/commands/feat/del.command.d.ts +17 -0
  233. package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -0
  234. package/dist/src/presentation/cli/commands/feat/del.command.js +55 -0
  235. package/dist/src/presentation/cli/commands/feat/index.d.ts +17 -0
  236. package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -0
  237. package/dist/src/presentation/cli/commands/feat/index.js +29 -0
  238. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts +15 -0
  239. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -0
  240. package/dist/src/presentation/cli/commands/feat/ls.command.js +112 -0
  241. package/dist/src/presentation/cli/commands/feat/new.command.d.ts +17 -0
  242. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -0
  243. package/dist/src/presentation/cli/commands/feat/new.command.js +64 -0
  244. package/dist/src/presentation/cli/commands/feat/resume.command.d.ts +11 -0
  245. package/dist/src/presentation/cli/commands/feat/resume.command.d.ts.map +1 -0
  246. package/dist/src/presentation/cli/commands/feat/resume.command.js +33 -0
  247. package/dist/src/presentation/cli/commands/feat/show.command.d.ts +11 -0
  248. package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -0
  249. package/dist/src/presentation/cli/commands/feat/show.command.js +128 -0
  250. package/dist/src/presentation/cli/index.d.ts +8 -4
  251. package/dist/src/presentation/cli/index.d.ts.map +1 -1
  252. package/dist/src/presentation/cli/index.js +12 -4
  253. package/dist/src/presentation/cli/ui/detail-view.d.ts +43 -0
  254. package/dist/src/presentation/cli/ui/detail-view.d.ts.map +1 -0
  255. package/dist/src/presentation/cli/ui/detail-view.js +57 -0
  256. package/dist/src/presentation/cli/ui/index.d.ts +2 -0
  257. package/dist/src/presentation/cli/ui/index.d.ts.map +1 -1
  258. package/dist/src/presentation/cli/ui/index.js +2 -0
  259. package/dist/src/presentation/cli/ui/list-view.d.ts +34 -0
  260. package/dist/src/presentation/cli/ui/list-view.d.ts.map +1 -0
  261. package/dist/src/presentation/cli/ui/list-view.js +65 -0
  262. package/dist/src/presentation/cli/ui/symbols.d.ts +5 -1
  263. package/dist/src/presentation/cli/ui/symbols.d.ts.map +1 -1
  264. package/dist/src/presentation/cli/ui/symbols.js +4 -0
  265. package/dist/tsconfig.build.tsbuildinfo +1 -1
  266. package/package.json +2 -1
  267. package/web/.next/BUILD_ID +1 -1
  268. package/web/.next/build-manifest.json +2 -2
  269. package/web/.next/cache/.previewinfo +1 -1
  270. package/web/.next/cache/.rscinfo +1 -1
  271. package/web/.next/cache/config.json +3 -3
  272. package/web/.next/fallback-build-manifest.json +2 -2
  273. package/web/.next/prerender-manifest.json +3 -3
  274. package/web/.next/required-server-files.js +1 -1
  275. package/web/.next/required-server-files.json +1 -1
  276. package/web/.next/server/app/_global-error.html +2 -2
  277. package/web/.next/server/app/_global-error.rsc +1 -1
  278. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  279. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  280. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  281. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  282. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  283. package/web/.next/server/app/_not-found.html +2 -2
  284. package/web/.next/server/app/_not-found.rsc +1 -1
  285. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  286. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  287. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  288. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  289. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  290. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  291. package/web/.next/server/app/index.html +2 -2
  292. package/web/.next/server/app/index.rsc +1 -1
  293. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  294. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  295. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  296. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  297. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  298. package/web/.next/server/app/version.html +2 -2
  299. package/web/.next/server/app/version.rsc +1 -1
  300. package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
  301. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  302. package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
  303. package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
  304. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  305. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  306. package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
  307. package/web/.next/server/pages/404.html +2 -2
  308. package/web/.next/server/pages/500.html +2 -2
  309. package/web/.next/server/server-reference-manifest.js +1 -1
  310. package/web/.next/server/server-reference-manifest.json +1 -1
  311. package/web/.next/trace +1 -1
  312. package/web/.next/trace-build +1 -1
  313. package/dist/src/application/ports/output/agent-executor-factory.interface.d.ts.map +0 -1
  314. package/dist/src/application/ports/output/agent-executor.interface.d.ts.map +0 -1
  315. package/dist/src/application/ports/output/agent-registry.interface.d.ts.map +0 -1
  316. package/dist/src/application/ports/output/agent-run-repository.interface.d.ts.map +0 -1
  317. package/dist/src/application/ports/output/agent-runner.interface.d.ts.map +0 -1
  318. package/dist/src/application/ports/output/agent-validator.interface.d.ts.map +0 -1
  319. package/dist/src/application/ports/output/settings.repository.interface.d.ts.map +0 -1
  320. package/dist/src/application/ports/output/version-service.interface.d.ts.map +0 -1
  321. package/dist/src/application/ports/output/web-server-service.interface.d.ts.map +0 -1
  322. package/dist/src/infrastructure/services/agents/agent-executor-factory.service.d.ts.map +0 -1
  323. package/dist/src/infrastructure/services/agents/agent-registry.service.d.ts.map +0 -1
  324. package/dist/src/infrastructure/services/agents/agent-runner.service.d.ts.map +0 -1
  325. package/dist/src/infrastructure/services/agents/agent-validator.service.d.ts.map +0 -1
  326. package/dist/src/infrastructure/services/agents/executors/claude-code-executor.service.d.ts.map +0 -1
  327. package/dist/src/infrastructure/services/agents/langgraph/analyze-repository-graph.d.ts.map +0 -1
  328. package/dist/src/infrastructure/services/agents/langgraph/checkpointer.d.ts.map +0 -1
  329. package/dist/src/infrastructure/services/agents/langgraph/prompts/analyze-repository.prompt.d.ts.map +0 -1
  330. /package/dist/src/application/ports/output/{agent-executor-factory.interface.js → agents/agent-executor-factory.interface.js} +0 -0
  331. /package/dist/src/application/ports/output/{agent-executor.interface.js → agents/agent-executor.interface.js} +0 -0
  332. /package/dist/src/application/ports/output/{agent-registry.interface.js → agents/agent-registry.interface.js} +0 -0
  333. /package/dist/src/application/ports/output/{agent-run-repository.interface.js → agents/agent-run-repository.interface.js} +0 -0
  334. /package/dist/src/application/ports/output/{agent-runner.interface.js → agents/agent-runner.interface.js} +0 -0
  335. /package/dist/src/application/ports/output/{agent-validator.interface.js → agents/agent-validator.interface.js} +0 -0
  336. /package/dist/src/application/ports/output/{settings.repository.interface.js → repositories/settings.repository.interface.js} +0 -0
  337. /package/dist/src/application/ports/output/{version-service.interface.js → services/version-service.interface.js} +0 -0
  338. /package/dist/src/application/ports/output/{web-server-service.interface.d.ts → services/web-server-service.interface.d.ts} +0 -0
  339. /package/dist/src/application/ports/output/{web-server-service.interface.js → services/web-server-service.interface.js} +0 -0
  340. /package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/prompts/analyze-repository.prompt.d.ts +0 -0
  341. /package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/prompts/analyze-repository.prompt.js +0 -0
  342. /package/dist/src/infrastructure/services/agents/{agent-executor-factory.service.js → common/agent-executor-factory.service.js} +0 -0
  343. /package/dist/src/infrastructure/services/agents/{agent-validator.service.js → common/agent-validator.service.js} +0 -0
  344. /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → iYaq62xFNOChDTbH3WMrr}/_buildManifest.js +0 -0
  345. /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → iYaq62xFNOChDTbH3WMrr}/_clientMiddlewareManifest.json +0 -0
  346. /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → iYaq62xFNOChDTbH3WMrr}/_ssgManifest.js +0 -0
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Agent Show Command
3
+ *
4
+ * Display details of a specific agent run including execution status,
5
+ * PID, current node, heartbeat, and output.
6
+ *
7
+ * Usage:
8
+ * shep agent show <id>
9
+ */
10
+ import { Command } from 'commander';
11
+ import { createHash } from 'node:crypto';
12
+ import { join } from 'node:path';
13
+ import { colors, messages, symbols, renderDetailView } from '../../ui/index.js';
14
+ import { resolveAgentRun } from './resolve-run.js';
15
+ import { container } from '../../../../infrastructure/di/container.js';
16
+ import { SHEP_HOME_DIR } from '../../../../infrastructure/services/filesystem/shep-directory.service.js';
17
+ function computeWorktreePath(repoPath, branch) {
18
+ const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
19
+ const slug = branch.replace(/\//g, '-');
20
+ return join(SHEP_HOME_DIR, 'repos', repoHash, 'wt', slug);
21
+ }
22
+ function isProcessAlive(pid) {
23
+ try {
24
+ process.kill(pid, 0);
25
+ return true;
26
+ }
27
+ catch {
28
+ return false;
29
+ }
30
+ }
31
+ export function createShowCommand() {
32
+ return new Command('show')
33
+ .description('Display details of an agent run')
34
+ .argument('<id>', 'Agent run ID (or prefix)')
35
+ .action(async (id) => {
36
+ try {
37
+ const resolved = await resolveAgentRun(id);
38
+ if ('error' in resolved) {
39
+ messages.error(resolved.error);
40
+ process.exitCode = 1;
41
+ return;
42
+ }
43
+ const agentRun = resolved.run;
44
+ const pidAlive = agentRun.pid && (agentRun.status === 'running' || agentRun.status === 'pending')
45
+ ? isProcessAlive(agentRun.pid)
46
+ : null;
47
+ const currentNode = agentRun.status === 'running' && agentRun.result?.startsWith('node:')
48
+ ? agentRun.result.slice(5)
49
+ : null;
50
+ const stuckStatus = getStuckStatus(agentRun);
51
+ // Resolve worktree path from associated feature
52
+ let worktreePath = null;
53
+ let specPath = null;
54
+ if (agentRun.featureId) {
55
+ try {
56
+ const featureRepo = container.resolve('IFeatureRepository');
57
+ const feature = await featureRepo.findById(agentRun.featureId);
58
+ if (feature) {
59
+ worktreePath = computeWorktreePath(feature.repositoryPath, feature.branch);
60
+ specPath = feature.specPath ?? null;
61
+ }
62
+ }
63
+ catch {
64
+ // Feature lookup failed
65
+ }
66
+ }
67
+ // Text blocks for prompt/result/error
68
+ const textBlocks = [];
69
+ if (agentRun.prompt) {
70
+ textBlocks.push({ title: 'Prompt', content: agentRun.prompt });
71
+ }
72
+ if (agentRun.result && !agentRun.result.startsWith('node:')) {
73
+ textBlocks.push({ title: 'Result', content: agentRun.result });
74
+ }
75
+ if (agentRun.error) {
76
+ textBlocks.push({
77
+ title: 'Error',
78
+ content: agentRun.error,
79
+ color: colors.error,
80
+ });
81
+ }
82
+ renderDetailView({
83
+ title: 'Agent Run',
84
+ sections: [
85
+ {
86
+ fields: [
87
+ { label: 'ID', value: agentRun.id },
88
+ { label: 'Agent', value: agentRun.agentName },
89
+ { label: 'Type', value: agentRun.agentType },
90
+ { label: 'Status', value: formatStatus(agentRun, pidAlive) },
91
+ { label: 'Node', value: currentNode ? colors.info(currentNode) : null },
92
+ { label: 'PID', value: formatPid(agentRun, pidAlive) },
93
+ { label: 'Thread', value: agentRun.threadId },
94
+ ],
95
+ },
96
+ {
97
+ title: 'Paths',
98
+ fields: [
99
+ { label: 'Worktree', value: worktreePath },
100
+ { label: 'Spec Dir', value: specPath },
101
+ ],
102
+ },
103
+ {
104
+ title: 'Timing',
105
+ fields: [
106
+ { label: 'Started', value: formatDate(agentRun.startedAt) },
107
+ { label: 'Completed', value: formatDate(agentRun.completedAt) },
108
+ { label: 'Duration', value: getDurationString(agentRun) },
109
+ { label: 'Heartbeat', value: formatDate(agentRun.lastHeartbeat) },
110
+ { label: 'Created', value: formatDate(agentRun.createdAt) },
111
+ { label: 'Updated', value: formatDate(agentRun.updatedAt) },
112
+ { label: 'Warning', value: stuckStatus },
113
+ ],
114
+ },
115
+ ],
116
+ textBlocks,
117
+ });
118
+ }
119
+ catch (error) {
120
+ const err = error instanceof Error ? error : new Error(String(error));
121
+ messages.error('Failed to show agent run', err);
122
+ process.exitCode = 1;
123
+ }
124
+ });
125
+ }
126
+ function formatStatus(agentRun, pidAlive) {
127
+ const isActive = agentRun.status === 'running' || agentRun.status === 'pending';
128
+ if (isActive && pidAlive === false) {
129
+ return `${colors.error(symbols.error)} ${colors.error('crashed')}`;
130
+ }
131
+ const map = {
132
+ pending: `${colors.muted(symbols.dotEmpty)} ${colors.muted('pending')}`,
133
+ running: `${colors.info(symbols.dot)} ${colors.info('running')}`,
134
+ completed: `${colors.success(symbols.success)} ${colors.success('completed')}`,
135
+ failed: `${colors.error(symbols.error)} ${colors.error('failed')}`,
136
+ interrupted: `${colors.error(symbols.error)} ${colors.error('interrupted')}`,
137
+ cancelled: `${colors.muted(symbols.dotEmpty)} ${colors.muted('cancelled')}`,
138
+ };
139
+ return map[agentRun.status] || colors.muted(agentRun.status);
140
+ }
141
+ function formatPid(agentRun, pidAlive) {
142
+ if (!agentRun.pid)
143
+ return colors.muted('-');
144
+ const pidStr = String(agentRun.pid);
145
+ if (pidAlive === true)
146
+ return `${pidStr} ${colors.success('(alive)')}`;
147
+ if (pidAlive === false)
148
+ return `${pidStr} ${colors.error('(dead)')}`;
149
+ return pidStr;
150
+ }
151
+ function formatDate(date) {
152
+ if (!date)
153
+ return null;
154
+ try {
155
+ return new Date(date).toLocaleString();
156
+ }
157
+ catch {
158
+ return date;
159
+ }
160
+ }
161
+ function getDurationString(agentRun) {
162
+ if (agentRun.status === 'pending') {
163
+ const ms = Date.now() - new Date(agentRun.createdAt).getTime();
164
+ return `${formatDuration(ms)} ${colors.error('(stuck in pending)')}`;
165
+ }
166
+ if (agentRun.startedAt && agentRun.completedAt) {
167
+ return formatDuration(new Date(agentRun.completedAt).getTime() - new Date(agentRun.startedAt).getTime());
168
+ }
169
+ if (agentRun.startedAt) {
170
+ const ms = Date.now() - new Date(agentRun.startedAt).getTime();
171
+ return `${formatDuration(ms)} ${colors.info('(running)')}`;
172
+ }
173
+ return '-';
174
+ }
175
+ function formatDuration(ms) {
176
+ const seconds = Math.floor(ms / 1000);
177
+ const minutes = Math.floor(seconds / 60);
178
+ const hours = Math.floor(minutes / 60);
179
+ const days = Math.floor(hours / 24);
180
+ if (days > 0)
181
+ return `${days}d ${hours % 24}h ${minutes % 60}m`;
182
+ if (hours > 0)
183
+ return `${hours}h ${minutes % 60}m ${seconds % 60}s`;
184
+ if (minutes > 0)
185
+ return `${minutes}m ${seconds % 60}s`;
186
+ return `${seconds}s`;
187
+ }
188
+ function getStuckStatus(agentRun) {
189
+ if (agentRun.status === 'pending' && !agentRun.startedAt) {
190
+ const hours = (Date.now() - new Date(agentRun.createdAt).getTime()) / (1000 * 60 * 60);
191
+ if (hours > 24)
192
+ return colors.error(`STUCK: Pending for ${Math.floor(hours)} hours. Check agent logs.`);
193
+ if (hours > 1)
194
+ return colors.error(`WARNING: Pending for ${Math.floor(hours)} hour(s).`);
195
+ }
196
+ if (agentRun.status === 'running' && agentRun.startedAt) {
197
+ const hours = (Date.now() - new Date(agentRun.startedAt).getTime()) / (1000 * 60 * 60);
198
+ if (hours > 24)
199
+ return colors.error(`STUCK: Running for ${Math.floor(hours)} hours. Process may have crashed.`);
200
+ }
201
+ return null;
202
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Agent Stop Command
3
+ *
4
+ * Sends SIGTERM to a running agent and marks it as cancelled.
5
+ *
6
+ * Usage:
7
+ * shep agent stop <id>
8
+ */
9
+ import { Command } from 'commander';
10
+ export declare function createStopCommand(): Command;
11
+ //# sourceMappingURL=stop.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/agent/stop.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,iBAAiB,IAAI,OAAO,CA8B3C"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Agent Stop Command
3
+ *
4
+ * Sends SIGTERM to a running agent and marks it as cancelled.
5
+ *
6
+ * Usage:
7
+ * shep agent stop <id>
8
+ */
9
+ import { Command } from 'commander';
10
+ import { container } from '../../../../infrastructure/di/container.js';
11
+ import { StopAgentRunUseCase } from '../../../../application/use-cases/agents/stop-agent-run.use-case.js';
12
+ import { colors, messages } from '../../ui/index.js';
13
+ import { resolveAgentRun } from './resolve-run.js';
14
+ export function createStopCommand() {
15
+ return new Command('stop')
16
+ .description('Stop a running agent')
17
+ .argument('<id>', 'Agent run ID (or prefix)')
18
+ .action(async (id) => {
19
+ try {
20
+ const resolved = await resolveAgentRun(id);
21
+ if ('error' in resolved) {
22
+ messages.error(resolved.error);
23
+ process.exitCode = 1;
24
+ return;
25
+ }
26
+ const useCase = container.resolve(StopAgentRunUseCase);
27
+ const result = await useCase.execute(resolved.run.id);
28
+ if (result.stopped) {
29
+ messages.success(`Stopped ${colors.accent(resolved.run.id.substring(0, 8))}: ${result.reason}`);
30
+ }
31
+ else {
32
+ messages.error(result.reason);
33
+ process.exitCode = 1;
34
+ }
35
+ }
36
+ catch (error) {
37
+ const err = error instanceof Error ? error : new Error(String(error));
38
+ messages.error('Failed to stop agent run', err);
39
+ process.exitCode = 1;
40
+ }
41
+ });
42
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Feature Delete Command
3
+ *
4
+ * Deletes a feature, its worktree, and cancels any running agent.
5
+ *
6
+ * Usage: shep feat del <id> [--force]
7
+ *
8
+ * @example
9
+ * $ shep feat del feat-123
10
+ * $ shep feat del feat-123 --force
11
+ */
12
+ import { Command } from 'commander';
13
+ /**
14
+ * Create the feat del command
15
+ */
16
+ export declare function createDelCommand(): Command;
17
+ //# sourceMappingURL=del.command.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Feature Delete Command
3
+ *
4
+ * Deletes a feature, its worktree, and cancels any running agent.
5
+ *
6
+ * Usage: shep feat del <id> [--force]
7
+ *
8
+ * @example
9
+ * $ shep feat del feat-123
10
+ * $ shep feat del feat-123 --force
11
+ */
12
+ import { Command } from 'commander';
13
+ import { container } from '../../../../infrastructure/di/container.js';
14
+ import { DeleteFeatureUseCase } from '../../../../application/use-cases/features/delete-feature.use-case.js';
15
+ import { ShowFeatureUseCase } from '../../../../application/use-cases/features/show-feature.use-case.js';
16
+ import { colors, messages } from '../../ui/index.js';
17
+ import { confirm } from '@inquirer/prompts';
18
+ /**
19
+ * Create the feat del command
20
+ */
21
+ export function createDelCommand() {
22
+ return new Command('del')
23
+ .description('Delete a feature')
24
+ .argument('<id>', 'Feature ID or prefix')
25
+ .option('-f, --force', 'Skip confirmation prompt')
26
+ .action(async (featureId, options) => {
27
+ try {
28
+ // First show what we're about to delete
29
+ const showUseCase = container.resolve(ShowFeatureUseCase);
30
+ const feature = await showUseCase.execute(featureId);
31
+ if (!options.force) {
32
+ const confirmed = await confirm({
33
+ message: `Delete feature "${feature.name}"?`,
34
+ default: false,
35
+ });
36
+ if (!confirmed) {
37
+ messages.info('Cancelled');
38
+ return;
39
+ }
40
+ }
41
+ const deleteUseCase = container.resolve(DeleteFeatureUseCase);
42
+ await deleteUseCase.execute(feature.id);
43
+ messages.newline();
44
+ messages.success('Feature deleted');
45
+ console.log(` ${colors.muted('Name:')} ${feature.name}`);
46
+ console.log(` ${colors.muted('Branch:')} ${feature.branch}`);
47
+ messages.newline();
48
+ }
49
+ catch (error) {
50
+ const err = error instanceof Error ? error : new Error(String(error));
51
+ messages.error('Failed to delete feature', err);
52
+ process.exitCode = 1;
53
+ }
54
+ });
55
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Feature Command Group
3
+ *
4
+ * Provides subcommands for managing features through the SDLC lifecycle.
5
+ *
6
+ * Usage:
7
+ * shep feat new <description> # Create a new feature
8
+ * shep feat ls # List features
9
+ * shep feat show <id> # Show feature details
10
+ * shep feat del <id> # Delete a feature
11
+ */
12
+ import { Command } from 'commander';
13
+ /**
14
+ * Create the feat command group
15
+ */
16
+ export declare function createFeatCommand(): Command;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAQ3C"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Feature Command Group
3
+ *
4
+ * Provides subcommands for managing features through the SDLC lifecycle.
5
+ *
6
+ * Usage:
7
+ * shep feat new <description> # Create a new feature
8
+ * shep feat ls # List features
9
+ * shep feat show <id> # Show feature details
10
+ * shep feat del <id> # Delete a feature
11
+ */
12
+ import { Command } from 'commander';
13
+ import { createNewCommand } from './new.command.js';
14
+ import { createLsCommand } from './ls.command.js';
15
+ import { createShowCommand } from './show.command.js';
16
+ import { createDelCommand } from './del.command.js';
17
+ import { createResumeCommand } from './resume.command.js';
18
+ /**
19
+ * Create the feat command group
20
+ */
21
+ export function createFeatCommand() {
22
+ return new Command('feat')
23
+ .description('Manage features through the SDLC lifecycle')
24
+ .addCommand(createNewCommand())
25
+ .addCommand(createLsCommand())
26
+ .addCommand(createShowCommand())
27
+ .addCommand(createDelCommand())
28
+ .addCommand(createResumeCommand());
29
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Feature List Command
3
+ *
4
+ * Lists features in a formatted list with optional filtering.
5
+ * Derives real-time status from the agent run (not stale Feature.lifecycle).
6
+ *
7
+ * Usage: shep feat ls [options]
8
+ *
9
+ * @example
10
+ * $ shep feat ls
11
+ * $ shep feat ls --repo /path/to/project
12
+ */
13
+ import { Command } from 'commander';
14
+ export declare function createLsCommand(): Command;
15
+ //# sourceMappingURL=ls.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ls.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/ls.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoEpC,wBAAgB,eAAe,IAAI,OAAO,CAqDzC"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Feature List Command
3
+ *
4
+ * Lists features in a formatted list with optional filtering.
5
+ * Derives real-time status from the agent run (not stale Feature.lifecycle).
6
+ *
7
+ * Usage: shep feat ls [options]
8
+ *
9
+ * @example
10
+ * $ shep feat ls
11
+ * $ shep feat ls --repo /path/to/project
12
+ */
13
+ import { Command } from 'commander';
14
+ import { container } from '../../../../infrastructure/di/container.js';
15
+ import { ListFeaturesUseCase } from '../../../../application/use-cases/features/list-features.use-case.js';
16
+ import { colors, symbols, messages, renderListView } from '../../ui/index.js';
17
+ /** Map graph node names to human-readable phase labels. */
18
+ const NODE_TO_PHASE = {
19
+ analyze: 'Analyzing',
20
+ requirements: 'Requirements',
21
+ research: 'Researching',
22
+ plan: 'Planning',
23
+ implement: 'Implementing',
24
+ };
25
+ /**
26
+ * Derive the display status from the agent run.
27
+ * Returns the current graph node as a phase label with an activity indicator.
28
+ */
29
+ function formatStatus(feature, run) {
30
+ if (!run) {
31
+ // No agent run — fall back to static lifecycle
32
+ return `${colors.muted(symbols.dotEmpty)} ${colors.muted(feature.lifecycle)}`;
33
+ }
34
+ const isRunning = run.status === 'running' || run.status === 'pending';
35
+ const phase = run.result?.startsWith('node:')
36
+ ? (NODE_TO_PHASE[run.result.slice(5)] ?? run.result.slice(5))
37
+ : feature.lifecycle;
38
+ if (isRunning) {
39
+ // Check PID liveness for running agents
40
+ if (run.pid && !isProcessAlive(run.pid)) {
41
+ return `${colors.error(symbols.error)} ${colors.error('crashed')}`;
42
+ }
43
+ return `${colors.info(symbols.spinner[0])} ${colors.info(phase)}`;
44
+ }
45
+ if (run.status === 'completed') {
46
+ return `${colors.success(symbols.success)} ${colors.success('Completed')}`;
47
+ }
48
+ if (run.status === 'failed') {
49
+ return `${colors.error(symbols.error)} ${colors.error('Failed')}`;
50
+ }
51
+ if (run.status === 'waiting_approval') {
52
+ return `${colors.warning(symbols.warning)} ${colors.warning(phase)}`;
53
+ }
54
+ if (run.status === 'interrupted') {
55
+ return `${colors.error(symbols.error)} ${colors.error('Interrupted')}`;
56
+ }
57
+ return `${colors.muted(symbols.dotEmpty)} ${colors.muted(phase)}`;
58
+ }
59
+ function isProcessAlive(pid) {
60
+ try {
61
+ process.kill(pid, 0);
62
+ return true;
63
+ }
64
+ catch {
65
+ return false;
66
+ }
67
+ }
68
+ export function createLsCommand() {
69
+ return new Command('ls')
70
+ .description('List features')
71
+ .option('-r, --repo <path>', 'Filter by repository path')
72
+ .action(async (options) => {
73
+ try {
74
+ const useCase = container.resolve(ListFeaturesUseCase);
75
+ const runRepo = container.resolve('IAgentRunRepository');
76
+ const filters = options.repo ? { repositoryPath: options.repo } : undefined;
77
+ const features = await useCase.execute(filters);
78
+ // Load agent runs for all features in parallel
79
+ const runs = await Promise.all(features.map((f) => f.agentRunId ? runRepo.findById(f.agentRunId) : Promise.resolve(null)));
80
+ const rows = features.map((feature, i) => {
81
+ const run = runs[i];
82
+ const updated = feature.updatedAt instanceof Date
83
+ ? feature.updatedAt.toLocaleDateString()
84
+ : String(feature.updatedAt);
85
+ return [
86
+ feature.id.slice(0, 8),
87
+ feature.name.slice(0, 30),
88
+ formatStatus(feature, run),
89
+ colors.muted(feature.branch),
90
+ colors.muted(updated),
91
+ ];
92
+ });
93
+ renderListView({
94
+ title: 'Features',
95
+ columns: [
96
+ { label: 'ID', width: 10 },
97
+ { label: 'Name', width: 32 },
98
+ { label: 'Status', width: 20 },
99
+ { label: 'Branch', width: 28 },
100
+ { label: 'Updated', width: 12 },
101
+ ],
102
+ rows,
103
+ emptyMessage: 'No features found',
104
+ });
105
+ }
106
+ catch (error) {
107
+ const err = error instanceof Error ? error : new Error(String(error));
108
+ messages.error('Failed to list features', err);
109
+ process.exitCode = 1;
110
+ }
111
+ });
112
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Feature New Command
3
+ *
4
+ * Creates a new feature with a git branch and worktree.
5
+ *
6
+ * Usage: shep feat new <description> [options]
7
+ *
8
+ * @example
9
+ * $ shep feat new "Add user authentication"
10
+ * $ shep feat new "Add login page" --repo /path/to/project
11
+ */
12
+ import { Command } from 'commander';
13
+ /**
14
+ * Create the feat new command
15
+ */
16
+ export declare function createNewCommand(): Command;
17
+ //# sourceMappingURL=new.command.d.ts.map
@@ -0,0 +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;AAapC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CA6C1C"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Feature New Command
3
+ *
4
+ * Creates a new feature with a git branch and worktree.
5
+ *
6
+ * Usage: shep feat new <description> [options]
7
+ *
8
+ * @example
9
+ * $ shep feat new "Add user authentication"
10
+ * $ shep feat new "Add login page" --repo /path/to/project
11
+ */
12
+ import { Command } from 'commander';
13
+ import { container } from '../../../../infrastructure/di/container.js';
14
+ import { CreateFeatureUseCase } from '../../../../application/use-cases/features/create-feature.use-case.js';
15
+ import { colors, messages } from '../../ui/index.js';
16
+ /**
17
+ * Create the feat new command
18
+ */
19
+ export function createNewCommand() {
20
+ return new Command('new')
21
+ .description('Create a new feature')
22
+ .argument('<description>', 'Feature description')
23
+ .option('-r, --repo <path>', 'Repository path (defaults to current directory)')
24
+ .option('--interactive', 'Require approval after every agent step')
25
+ .option('--allow-prd', 'Auto-approve through requirements, pause after')
26
+ .option('--allow-plan', 'Auto-approve through planning, pause at implementation')
27
+ .option('--allow-all', 'Run fully autonomous (no approval pauses)')
28
+ .action(async (description, options) => {
29
+ try {
30
+ const useCase = container.resolve(CreateFeatureUseCase);
31
+ const repoPath = options.repo ?? process.cwd();
32
+ // Determine approval mode from flags (last one wins if multiple specified)
33
+ let approvalMode;
34
+ if (options.interactive)
35
+ approvalMode = 'interactive';
36
+ if (options.allowPrd)
37
+ approvalMode = 'allow-prd';
38
+ if (options.allowPlan)
39
+ approvalMode = 'allow-plan';
40
+ if (options.allowAll)
41
+ approvalMode = 'allow-all';
42
+ const feature = await useCase.execute({
43
+ userInput: description,
44
+ repositoryPath: repoPath,
45
+ approvalMode,
46
+ });
47
+ messages.newline();
48
+ messages.success('Feature created');
49
+ console.log(` ${colors.muted('ID:')} ${colors.accent(feature.id)}`);
50
+ console.log(` ${colors.muted('Name:')} ${feature.name}`);
51
+ console.log(` ${colors.muted('Branch:')} ${colors.accent(feature.branch)}`);
52
+ console.log(` ${colors.muted('Status:')} ${feature.lifecycle}`);
53
+ if (feature.agentRunId) {
54
+ console.log(` ${colors.muted('Agent:')} ${colors.success('spawned')} (run ${feature.agentRunId.slice(0, 8)})`);
55
+ }
56
+ messages.newline();
57
+ }
58
+ catch (error) {
59
+ const err = error instanceof Error ? error : new Error(String(error));
60
+ messages.error('Failed to create feature', err);
61
+ process.exitCode = 1;
62
+ }
63
+ });
64
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Feature Resume Command
3
+ *
4
+ * Resumes an interrupted or failed feature agent run.
5
+ *
6
+ * Usage:
7
+ * shep feat resume <id>
8
+ */
9
+ import { Command } from 'commander';
10
+ export declare function createResumeCommand(): Command;
11
+ //# sourceMappingURL=resume.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resume.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/resume.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,mBAAmB,IAAI,OAAO,CAoB7C"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Feature Resume Command
3
+ *
4
+ * Resumes an interrupted or failed feature agent run.
5
+ *
6
+ * Usage:
7
+ * shep feat resume <id>
8
+ */
9
+ import { Command } from 'commander';
10
+ import { container } from '../../../../infrastructure/di/container.js';
11
+ import { ResumeFeatureUseCase } from '../../../../application/use-cases/features/resume-feature.use-case.js';
12
+ import { colors, messages } from '../../ui/index.js';
13
+ export function createResumeCommand() {
14
+ return new Command('resume')
15
+ .description('Resume a stopped or failed feature agent')
16
+ .argument('<id>', 'Feature ID (or prefix)')
17
+ .action(async (id) => {
18
+ try {
19
+ const useCase = container.resolve(ResumeFeatureUseCase);
20
+ const { feature, newRun } = await useCase.execute(id);
21
+ messages.newline();
22
+ messages.success('Feature agent resumed');
23
+ console.log(` ${colors.muted('Feature:')} ${feature.name}`);
24
+ console.log(` ${colors.muted('Run ID:')} ${colors.accent(newRun.id.substring(0, 8))}`);
25
+ messages.newline();
26
+ }
27
+ catch (error) {
28
+ const err = error instanceof Error ? error : new Error(String(error));
29
+ messages.error('Failed to resume feature', err);
30
+ process.exitCode = 1;
31
+ }
32
+ });
33
+ }