codehere 0.3.0 → 0.5.0-alpha

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 (455) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +329 -65
  3. package/dist/application/agents/documentation-agent.d.ts +24 -0
  4. package/dist/application/agents/documentation-agent.d.ts.map +1 -0
  5. package/dist/application/agents/documentation-agent.js +399 -0
  6. package/dist/application/agents/documentation-agent.js.map +1 -0
  7. package/dist/application/agents/execution-agent.d.ts +11 -0
  8. package/dist/application/agents/execution-agent.d.ts.map +1 -1
  9. package/dist/application/agents/execution-agent.js +289 -80
  10. package/dist/application/agents/execution-agent.js.map +1 -1
  11. package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
  12. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
  13. package/dist/application/agents/multi-agent-orchestrator.js +95 -2
  14. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
  15. package/dist/application/agents/planning-agent.d.ts +3 -0
  16. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  17. package/dist/application/agents/planning-agent.js +151 -71
  18. package/dist/application/agents/planning-agent.js.map +1 -1
  19. package/dist/application/agents/product-requirements-agent.d.ts +21 -0
  20. package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
  21. package/dist/application/agents/product-requirements-agent.js +247 -0
  22. package/dist/application/agents/product-requirements-agent.js.map +1 -0
  23. package/dist/application/agents/validation-agent.d.ts +5 -1
  24. package/dist/application/agents/validation-agent.d.ts.map +1 -1
  25. package/dist/application/agents/validation-agent.js +156 -21
  26. package/dist/application/agents/validation-agent.js.map +1 -1
  27. package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
  28. package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
  29. package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
  30. package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
  31. package/dist/application/reasoning/reasoning-config.d.ts +15 -0
  32. package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
  33. package/dist/application/reasoning/reasoning-config.js +50 -0
  34. package/dist/application/reasoning/reasoning-config.js.map +1 -0
  35. package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
  36. package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
  37. package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
  38. package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
  39. package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
  40. package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
  41. package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
  42. package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
  43. package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
  44. package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
  45. package/dist/application/reasoning/role-provider-resolver.js +74 -0
  46. package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
  47. package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
  48. package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
  49. package/dist/application/reasoning/simple-planning-strategy.js +217 -0
  50. package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
  51. package/dist/application/reasoning/types.d.ts +65 -0
  52. package/dist/application/reasoning/types.d.ts.map +1 -0
  53. package/dist/application/reasoning/types.js +6 -0
  54. package/dist/application/reasoning/types.js.map +1 -0
  55. package/dist/application/reasoning/validator-strategy.d.ts +56 -0
  56. package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
  57. package/dist/application/reasoning/validator-strategy.js +103 -0
  58. package/dist/application/reasoning/validator-strategy.js.map +1 -0
  59. package/dist/application/services/dependency-container.d.ts +46 -2
  60. package/dist/application/services/dependency-container.d.ts.map +1 -1
  61. package/dist/application/services/dependency-container.js +198 -8
  62. package/dist/application/services/dependency-container.js.map +1 -1
  63. package/dist/application/services/intelligent-router.d.ts +19 -0
  64. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  65. package/dist/application/services/intelligent-router.js +393 -91
  66. package/dist/application/services/intelligent-router.js.map +1 -1
  67. package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
  68. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
  69. package/dist/application/use-cases/ask-question-use-case.js +129 -49
  70. package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
  71. package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
  72. package/dist/application/use-cases/edit-file-use-case.js +16 -1
  73. package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
  74. package/dist/application/use-cases/planning-use-case.d.ts +14 -1
  75. package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
  76. package/dist/application/use-cases/planning-use-case.js +109 -2
  77. package/dist/application/use-cases/planning-use-case.js.map +1 -1
  78. package/dist/domain/entities/documentation.d.ts +35 -0
  79. package/dist/domain/entities/documentation.d.ts.map +1 -0
  80. package/dist/domain/entities/documentation.js +6 -0
  81. package/dist/domain/entities/documentation.js.map +1 -0
  82. package/dist/domain/entities/memory.d.ts.map +1 -1
  83. package/dist/domain/entities/product-requirements.d.ts +50 -0
  84. package/dist/domain/entities/product-requirements.d.ts.map +1 -0
  85. package/dist/domain/entities/product-requirements.js +6 -0
  86. package/dist/domain/entities/product-requirements.js.map +1 -0
  87. package/dist/domain/entities/task.d.ts +152 -0
  88. package/dist/domain/entities/task.d.ts.map +1 -0
  89. package/dist/domain/entities/task.js +61 -0
  90. package/dist/domain/entities/task.js.map +1 -0
  91. package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
  92. package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
  93. package/dist/domain/errors/embeddings-not-found-error.js +13 -0
  94. package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
  95. package/dist/domain/interfaces/agent.interface.d.ts +15 -0
  96. package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
  97. package/dist/domain/interfaces/agent.interface.js +6 -0
  98. package/dist/domain/interfaces/agent.interface.js.map +1 -0
  99. package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
  100. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
  101. package/dist/domain/services/environment-mode-manager.d.ts +12 -0
  102. package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
  103. package/dist/domain/services/environment-mode-manager.js +22 -0
  104. package/dist/domain/services/environment-mode-manager.js.map +1 -0
  105. package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
  106. package/dist/domain/services/query-intent-classifier.js +20 -1
  107. package/dist/domain/services/query-intent-classifier.js.map +1 -1
  108. package/dist/domain/services/risk-tier-detector.d.ts +17 -0
  109. package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
  110. package/dist/domain/services/risk-tier-detector.js +78 -0
  111. package/dist/domain/services/risk-tier-detector.js.map +1 -0
  112. package/dist/embed.d.ts.map +1 -1
  113. package/dist/embed.js +18 -8
  114. package/dist/embed.js.map +1 -1
  115. package/dist/formatter.d.ts.map +1 -1
  116. package/dist/formatter.js +10 -3
  117. package/dist/formatter.js.map +1 -1
  118. package/dist/index.js +494 -167
  119. package/dist/index.js.map +1 -1
  120. package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
  121. package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
  122. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  123. package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
  124. package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
  125. package/dist/infrastructure/ai/fake-ai-service.js +59 -0
  126. package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
  127. package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
  128. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
  129. package/dist/infrastructure/ai/provider-ai-service.js +477 -0
  130. package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
  131. package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
  132. package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
  133. package/dist/infrastructure/cache/embedding-cache.js +80 -9
  134. package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
  135. package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
  136. package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
  137. package/dist/infrastructure/cache/query-result-cache.js +40 -112
  138. package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
  139. package/dist/infrastructure/cache/response-cache.d.ts +18 -0
  140. package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
  141. package/dist/infrastructure/cache/response-cache.js +48 -0
  142. package/dist/infrastructure/cache/response-cache.js.map +1 -0
  143. package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
  144. package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
  145. package/dist/infrastructure/cache/security-scan-cache.js +25 -102
  146. package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
  147. package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
  148. package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
  149. package/dist/infrastructure/completion/bash-completion.js +11 -87
  150. package/dist/infrastructure/completion/bash-completion.js.map +1 -1
  151. package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
  152. package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
  153. package/dist/infrastructure/completion/fish-completion.js +15 -58
  154. package/dist/infrastructure/completion/fish-completion.js.map +1 -1
  155. package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
  156. package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
  157. package/dist/infrastructure/completion/zsh-completion.js +18 -73
  158. package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
  159. package/dist/infrastructure/config/config-manager.d.ts +10 -0
  160. package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
  161. package/dist/infrastructure/config/config-manager.js +13 -2
  162. package/dist/infrastructure/config/config-manager.js.map +1 -1
  163. package/dist/infrastructure/context/conversation-context.d.ts +54 -0
  164. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
  165. package/dist/infrastructure/context/conversation-context.js +129 -0
  166. package/dist/infrastructure/context/conversation-context.js.map +1 -0
  167. package/dist/infrastructure/context/session-manager.d.ts +42 -0
  168. package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
  169. package/dist/infrastructure/context/session-manager.js +94 -0
  170. package/dist/infrastructure/context/session-manager.js.map +1 -0
  171. package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
  172. package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
  173. package/dist/infrastructure/cost/cost-tracker.js +12 -5
  174. package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
  175. package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
  176. package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
  177. package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
  178. package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
  179. package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
  180. package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
  181. package/dist/infrastructure/governance/policy-as-code.js +6 -8
  182. package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
  183. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
  184. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
  185. package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
  186. package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
  187. package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
  188. package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
  189. package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
  190. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
  191. package/dist/infrastructure/providers/cohere-provider.js +444 -0
  192. package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
  193. package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
  194. package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
  195. package/dist/infrastructure/providers/fake-provider.js +130 -0
  196. package/dist/infrastructure/providers/fake-provider.js.map +1 -0
  197. package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
  198. package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
  199. package/dist/infrastructure/providers/local-llm-provider.js +330 -0
  200. package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
  201. package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
  202. package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
  203. package/dist/infrastructure/providers/model-config.types.js +9 -0
  204. package/dist/infrastructure/providers/model-config.types.js.map +1 -0
  205. package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
  206. package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
  207. package/dist/infrastructure/providers/model-provider.interface.js +8 -0
  208. package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
  209. package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
  210. package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
  211. package/dist/infrastructure/providers/openai-provider.js +413 -0
  212. package/dist/infrastructure/providers/openai-provider.js.map +1 -0
  213. package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
  214. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
  215. package/dist/infrastructure/providers/openrouter-provider.js +401 -0
  216. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
  217. package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
  218. package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
  219. package/dist/infrastructure/providers/operation-provider-resolver.js +131 -0
  220. package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
  221. package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
  222. package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
  223. package/dist/infrastructure/providers/provider-config-loader.js +120 -0
  224. package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
  225. package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
  226. package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
  227. package/dist/infrastructure/providers/provider-registry.js +88 -0
  228. package/dist/infrastructure/providers/provider-registry.js.map +1 -0
  229. package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
  230. package/dist/infrastructure/security/input-validator.js +19 -6
  231. package/dist/infrastructure/security/input-validator.js.map +1 -1
  232. package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
  233. package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
  234. package/dist/infrastructure/serialization/toon-serializer.js +119 -0
  235. package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
  236. package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
  237. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
  238. package/dist/infrastructure/storage/embeddings-path.js +37 -0
  239. package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
  240. package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
  241. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  242. package/dist/infrastructure/storage/plan-repository.js +36 -73
  243. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  244. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
  245. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
  246. package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
  247. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
  248. package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
  249. package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
  250. package/dist/infrastructure/storage/task-helpers.js +197 -0
  251. package/dist/infrastructure/storage/task-helpers.js.map +1 -0
  252. package/dist/infrastructure/storage/task-repository.d.ts +68 -0
  253. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
  254. package/dist/infrastructure/storage/task-repository.js +216 -0
  255. package/dist/infrastructure/storage/task-repository.js.map +1 -0
  256. package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
  257. package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
  258. package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
  259. package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
  260. package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
  261. package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
  262. package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
  263. package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
  264. package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
  265. package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
  266. package/dist/infrastructure/ux/capability-boundaries.js +42 -0
  267. package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
  268. package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
  269. package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
  270. package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
  271. package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
  272. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
  273. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
  274. package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
  275. package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
  276. package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
  277. package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
  278. package/dist/infrastructure/ux/feature-discovery.js +5 -181
  279. package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
  280. package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
  281. package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
  282. package/dist/infrastructure/ux/feedback-prompt.js +45 -0
  283. package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
  284. package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
  285. package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
  286. package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
  287. package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
  288. package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
  289. package/dist/infrastructure/ux/hitl-validation.js +86 -0
  290. package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
  291. package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
  292. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  293. package/dist/infrastructure/ux/progress-indicator.js +36 -41
  294. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  295. package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
  296. package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
  297. package/dist/infrastructure/ux/proportional-friction.js +200 -0
  298. package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
  299. package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
  300. package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
  301. package/dist/infrastructure/ux/review-checkpoint.js +33 -80
  302. package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
  303. package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
  304. package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
  305. package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
  306. package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
  307. package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
  308. package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
  309. package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
  310. package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
  311. package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
  312. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
  313. package/dist/infrastructure/validation/agent-feedback.js +55 -0
  314. package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
  315. package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
  316. package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
  317. package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
  318. package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
  319. package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
  320. package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
  321. package/dist/infrastructure/validation/feedback-stats.js +173 -0
  322. package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
  323. package/dist/infrastructure/validation/review-handler.d.ts +26 -0
  324. package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
  325. package/dist/infrastructure/validation/review-handler.js +40 -0
  326. package/dist/infrastructure/validation/review-handler.js.map +1 -0
  327. package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
  328. package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
  329. package/dist/infrastructure/validation/summary-aggregator.js +70 -0
  330. package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
  331. package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
  332. package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
  333. package/dist/infrastructure/validation/summary-extractor.js +45 -0
  334. package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
  335. package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
  336. package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
  337. package/dist/infrastructure/validation/trace-summary.js +52 -0
  338. package/dist/infrastructure/validation/trace-summary.js.map +1 -0
  339. package/dist/infrastructure/validation/trust-config.d.ts +27 -0
  340. package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
  341. package/dist/infrastructure/validation/trust-config.js +113 -0
  342. package/dist/infrastructure/validation/trust-config.js.map +1 -0
  343. package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
  344. package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
  345. package/dist/infrastructure/xai/attention-visualizer.js +6 -8
  346. package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
  347. package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
  348. package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
  349. package/dist/infrastructure/xai/cot-visualizer.js +6 -9
  350. package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
  351. package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
  352. package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
  353. package/dist/infrastructure/xai/decision-tree-log.js +6 -10
  354. package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
  355. package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
  356. package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
  357. package/dist/infrastructure/xai/interactive-xai.js +6 -8
  358. package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
  359. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
  360. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
  361. package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
  362. package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
  363. package/dist/monitoring.d.ts +1 -1
  364. package/dist/monitoring.d.ts.map +1 -1
  365. package/dist/monitoring.js +12 -9
  366. package/dist/monitoring.js.map +1 -1
  367. package/dist/parallel-processor.d.ts.map +1 -1
  368. package/dist/parallel-processor.js +124 -45
  369. package/dist/parallel-processor.js.map +1 -1
  370. package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
  371. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  372. package/dist/presentation/cli/commands/ask-command.js +356 -87
  373. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  374. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  375. package/dist/presentation/cli/commands/config-command.js +22 -8
  376. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  377. package/dist/presentation/cli/commands/decision-command.js +23 -6
  378. package/dist/presentation/cli/commands/decision-command.js.map +1 -1
  379. package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
  380. package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
  381. package/dist/presentation/cli/commands/docs-command.js +25 -0
  382. package/dist/presentation/cli/commands/docs-command.js.map +1 -0
  383. package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
  384. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
  385. package/dist/presentation/cli/commands/fix-command.js +94 -0
  386. package/dist/presentation/cli/commands/fix-command.js.map +1 -0
  387. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
  388. package/dist/presentation/cli/commands/help-command.js +23 -1
  389. package/dist/presentation/cli/commands/help-command.js.map +1 -1
  390. package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
  391. package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
  392. package/dist/presentation/cli/commands/memory-command.js +252 -0
  393. package/dist/presentation/cli/commands/memory-command.js.map +1 -0
  394. package/dist/presentation/cli/commands/models-command.d.ts +13 -0
  395. package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
  396. package/dist/presentation/cli/commands/models-command.js +194 -0
  397. package/dist/presentation/cli/commands/models-command.js.map +1 -0
  398. package/dist/presentation/cli/commands/orchestrate-command.d.ts +2 -0
  399. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  400. package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
  401. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  402. package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
  403. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  404. package/dist/presentation/cli/commands/plan-command.js +212 -26
  405. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  406. package/dist/presentation/cli/commands/product-command.d.ts +14 -0
  407. package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
  408. package/dist/presentation/cli/commands/product-command.js +22 -0
  409. package/dist/presentation/cli/commands/product-command.js.map +1 -0
  410. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
  411. package/dist/presentation/cli/commands/react-command.js +8 -2
  412. package/dist/presentation/cli/commands/react-command.js.map +1 -1
  413. package/dist/presentation/cli/commands/review-command.d.ts +14 -0
  414. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
  415. package/dist/presentation/cli/commands/review-command.js +173 -0
  416. package/dist/presentation/cli/commands/review-command.js.map +1 -0
  417. package/dist/presentation/cli/commands/run-command.d.ts +13 -0
  418. package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
  419. package/dist/presentation/cli/commands/run-command.js +188 -0
  420. package/dist/presentation/cli/commands/run-command.js.map +1 -0
  421. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
  422. package/dist/presentation/cli/commands/setup-command.js +15 -0
  423. package/dist/presentation/cli/commands/setup-command.js.map +1 -1
  424. package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
  425. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
  426. package/dist/presentation/cli/commands/smart-command.js +165 -11
  427. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  428. package/dist/presentation/cli/commands/status-command.d.ts +14 -0
  429. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
  430. package/dist/presentation/cli/commands/status-command.js +171 -0
  431. package/dist/presentation/cli/commands/status-command.js.map +1 -0
  432. package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
  433. package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
  434. package/dist/presentation/cli/commands/suggest-command.js +138 -0
  435. package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
  436. package/dist/presentation/cli/error-display.d.ts.map +1 -1
  437. package/dist/presentation/cli/error-display.js +118 -17
  438. package/dist/presentation/cli/error-display.js.map +1 -1
  439. package/dist/search.d.ts.map +1 -1
  440. package/dist/search.js +6 -1
  441. package/dist/search.js.map +1 -1
  442. package/dist/session.d.ts +1 -0
  443. package/dist/session.d.ts.map +1 -1
  444. package/dist/session.js +69 -4
  445. package/dist/session.js.map +1 -1
  446. package/dist/tools/bash.d.ts.map +1 -1
  447. package/dist/tools/bash.js +3 -0
  448. package/dist/tools/bash.js.map +1 -1
  449. package/dist/tools/git-tool.js +7 -7
  450. package/dist/tools/git-tool.js.map +1 -1
  451. package/dist/ui.d.ts +11 -0
  452. package/dist/ui.d.ts.map +1 -1
  453. package/dist/ui.js +62 -6
  454. package/dist/ui.js.map +1 -1
  455. package/package.json +22 -4
@@ -3,11 +3,14 @@
3
3
  * Multi-agent orchestration command
4
4
  */
5
5
  import { container } from '../../../application/services/dependency-container.js';
6
- import { colors, sectionHeader, success, error, warning, newline, createBanner, createSpinner, } from '../../../ui.js';
6
+ import { colors, sectionHeader, success, error, warning, newline, createBanner, createSpinner, isMinimalStyle, printMinimalHeader, getProviderDisplayName, } from '../../../ui.js';
7
7
  import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
8
8
  import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
9
9
  import { getPlanRepository } from '../../../infrastructure/storage/plan-repository.js';
10
10
  import { displayError } from '../error-display.js';
11
+ import { summaryExtractor } from '../../../infrastructure/validation/summary-extractor.js';
12
+ import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
13
+ import { isReasoningEnabled, isMultiModelEnabled } from '../../../application/reasoning/reasoning-config.js';
11
14
  export async function executeOrchestrateCommand(goal, options = {}) {
12
15
  // Start execution tracing
13
16
  const codebaseInfo = findCodebaseRoot(process.cwd());
@@ -30,16 +33,43 @@ export async function executeOrchestrateCommand(goal, options = {}) {
30
33
  query: goal,
31
34
  codebaseId: codebaseInfo?.rootPath || process.cwd(),
32
35
  });
33
- console.log(createBanner('Multi-Agent Orchestration', 'Planning Execution Validation'));
34
- newline();
35
- console.log(colors.bold('Goal:'));
36
- console.log(colors.cyan(' ' + goal));
37
- console.log(colors.dim(`Mode: ${options.mode || 'full'}`));
38
- newline();
39
- const orchestrator = container.multiAgentOrchestrator;
36
+ // Determine reasoning mode for header display (capability map 2.3)
37
+ const reasoningEnabled = isReasoningEnabled();
38
+ const multiModelEnabled = isMultiModelEnabled();
39
+ let reasoningModeLabel;
40
+ if (multiModelEnabled) {
41
+ reasoningModeLabel = 'Multi-Model Reasoning (M2)';
42
+ }
43
+ else if (reasoningEnabled) {
44
+ reasoningModeLabel = 'Simple Reasoning (M1)';
45
+ }
46
+ else {
47
+ reasoningModeLabel = 'Legacy Planning (M0)';
48
+ }
49
+ // Get provider name for display
50
+ const providerName = getProviderDisplayName(container.aiService);
51
+ // Suppress all output in JSON mode
52
+ if (!options.json) {
53
+ if (isMinimalStyle()) {
54
+ printMinimalHeader('orchestrate', goal);
55
+ console.log(colors.dim(`Mode: ${options.mode || 'full'}`));
56
+ console.log(colors.dim(`Reasoning: ${reasoningModeLabel}`));
57
+ console.log(colors.dim(`Provider: ${providerName}`));
58
+ }
59
+ else {
60
+ console.log(createBanner('Multi-Agent Orchestration', 'Planning → Execution → Validation'));
61
+ newline();
62
+ console.log(colors.bold('Goal:'));
63
+ console.log(colors.cyan(' ' + goal));
64
+ console.log(colors.dim(`Mode: ${options.mode || 'full'}`));
65
+ console.log(colors.bold(`Reasoning: ${reasoningModeLabel}`));
66
+ console.log(colors.dim(`Provider: ${providerName}`));
67
+ newline();
68
+ }
69
+ }
40
70
  // Load plan from repository if planId provided
41
71
  let loadedPlan = null;
42
- if (options.planId) {
72
+ if (options.planId && !options.json) {
43
73
  const planRepository = getPlanRepository();
44
74
  loadedPlan = await planRepository.get(options.planId);
45
75
  if (!loadedPlan) {
@@ -53,16 +83,96 @@ export async function executeOrchestrateCommand(goal, options = {}) {
53
83
  console.log(colors.dim(`Loaded plan: ${loadedPlan.goal} (${loadedPlan.status})`));
54
84
  newline();
55
85
  }
56
- const spinner = createSpinner('Orchestrating multi-agent workflow...');
57
- spinner.start();
86
+ else if (options.planId && options.json) {
87
+ // JSON mode - load silently
88
+ const planRepository = getPlanRepository();
89
+ loadedPlan = await planRepository.get(options.planId);
90
+ if (!loadedPlan) {
91
+ console.error(JSON.stringify({ error: `Plan ${options.planId} not found` }));
92
+ process.exit(1);
93
+ }
94
+ }
95
+ const spinner = options.json ? null : createSpinner('Orchestrating multi-agent workflow...');
96
+ if (spinner) {
97
+ spinner.start();
98
+ }
99
+ const orchestrator = container.multiAgentOrchestrator;
58
100
  try {
59
101
  const result = await orchestrator.orchestrate({
60
102
  goal: loadedPlan?.goal || goal,
61
103
  mode: options.mode || 'full',
62
104
  context: loadedPlan ? { plan: loadedPlan } : undefined,
105
+ json: options.json, // Pass JSON flag to suppress error messages
63
106
  });
64
- spinner.stop();
65
- newline();
107
+ if (spinner) {
108
+ spinner.stop();
109
+ newline();
110
+ }
111
+ // JSON output (capability map requirement 2.17)
112
+ if (options.json) {
113
+ const jsonOutput = {
114
+ goal: result.plan?.goal || goal,
115
+ mode: options.mode || 'full',
116
+ reasoningMode: reasoningModeLabel,
117
+ planId: result.plan?.id,
118
+ provider: container.aiService.provider?.name || container.aiService.provider?.id || 'unknown',
119
+ plan: null,
120
+ execution: null,
121
+ validation: null,
122
+ };
123
+ // Always include plan section (even if empty)
124
+ if (result.plan) {
125
+ jsonOutput.plan = {
126
+ goal: result.plan.goal,
127
+ id: result.plan.id,
128
+ status: result.plan.status,
129
+ subPlans: result.plan.subPlans.map(sp => ({
130
+ id: sp.id,
131
+ description: sp.description,
132
+ type: sp.type,
133
+ status: sp.status,
134
+ complexity: sp.estimatedComplexity,
135
+ dependencies: sp.dependencies,
136
+ })),
137
+ };
138
+ }
139
+ else {
140
+ jsonOutput.plan = null;
141
+ }
142
+ // Always include execution section (even if empty)
143
+ if (result.execution) {
144
+ jsonOutput.execution = {
145
+ completedSubPlans: result.execution.completedSubPlans,
146
+ totalSubPlans: result.execution.totalSubPlans,
147
+ overallSuccess: result.execution.overallSuccess,
148
+ results: result.execution.results.map(r => ({
149
+ subPlanId: r.subPlanId,
150
+ success: r.success,
151
+ duration: r.duration,
152
+ error: r.error,
153
+ })),
154
+ };
155
+ }
156
+ else {
157
+ jsonOutput.execution = null;
158
+ }
159
+ // Always include validation section (even if empty)
160
+ if (result.validation) {
161
+ jsonOutput.validation = {
162
+ qualityScore: result.validation.qualityScore,
163
+ compilationSuccess: result.validation.compilationSuccess,
164
+ testsPassed: result.validation.testsPassed,
165
+ testResults: result.validation.testResults,
166
+ recommendations: result.validation.recommendations,
167
+ };
168
+ }
169
+ else {
170
+ jsonOutput.validation = null;
171
+ }
172
+ console.log(JSON.stringify(jsonOutput, null, 2));
173
+ executionTracer.endRun();
174
+ return;
175
+ }
66
176
  if (result.plan) {
67
177
  sectionHeader('Generated Plan');
68
178
  console.log(colors.bold('Goal: ') + result.plan.goal);
@@ -118,6 +228,57 @@ export async function executeOrchestrateCommand(goal, options = {}) {
118
228
  }
119
229
  newline();
120
230
  }
231
+ // Get review decision - single source of truth for userAction
232
+ // All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
233
+ const reviewRequested = Boolean(options.review);
234
+ const summarySource = summaryExtractor.extractFromOrchestration(result);
235
+ const decision = summarySource
236
+ ? await reviewHandler.getReviewDecision(summarySource.summary, reviewRequested)
237
+ : { approved: true, proceed: true, userAction: 'not_required' };
238
+ if (!decision.approved) {
239
+ console.log(warning('Operation cancelled by user.'));
240
+ newline();
241
+ // Record feedback for rejection
242
+ if (result.compositeSummary) {
243
+ const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
244
+ agentFeedbackManager.recordFeedback({
245
+ runId: result.unifiedRunId || runId,
246
+ agentName: 'multi-agent-orchestrator',
247
+ operation: 'orchestrate',
248
+ query: goal,
249
+ outcome: 'cancelled',
250
+ userAction: decision.userAction,
251
+ filesChanged: result.compositeSummary.filesChanged,
252
+ filesCreated: result.compositeSummary.filesCreated,
253
+ filesDeleted: result.compositeSummary.filesDeleted,
254
+ errors: result.compositeSummary.errors,
255
+ warnings: result.compositeSummary.warnings,
256
+ validationChecks: result.compositeSummary.validationChecks,
257
+ metrics: result.compositeSummary.metrics,
258
+ });
259
+ }
260
+ return;
261
+ }
262
+ // Record feedback with userAction from review decision
263
+ if (result.compositeSummary) {
264
+ const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
265
+ agentFeedbackManager.recordFeedback({
266
+ runId: result.unifiedRunId || runId,
267
+ agentName: 'multi-agent-orchestrator',
268
+ operation: 'orchestrate',
269
+ query: goal,
270
+ outcome: result.success ? 'success' : 'failure',
271
+ userAction: decision.userAction,
272
+ filesChanged: result.compositeSummary.filesChanged,
273
+ filesCreated: result.compositeSummary.filesCreated,
274
+ filesDeleted: result.compositeSummary.filesDeleted,
275
+ errors: result.compositeSummary.errors,
276
+ warnings: result.compositeSummary.warnings,
277
+ validationChecks: result.compositeSummary.validationChecks,
278
+ metrics: result.compositeSummary.metrics,
279
+ });
280
+ }
281
+ newline();
121
282
  if (result.success) {
122
283
  console.log(success(result.message));
123
284
  }
@@ -130,7 +291,14 @@ export async function executeOrchestrateCommand(goal, options = {}) {
130
291
  newline();
131
292
  }
132
293
  catch (err) {
133
- spinner.stop();
294
+ if (spinner) {
295
+ spinner.stop();
296
+ }
297
+ if (options.json) {
298
+ console.error(JSON.stringify({ error: err instanceof Error ? err.message : String(err) }));
299
+ executionTracer.endRun();
300
+ process.exit(1);
301
+ }
134
302
  const { displayErrorAndExit } = await import('../error-display.js');
135
303
  displayErrorAndExit(err, {
136
304
  operation: 'orchestrate',
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrate-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/orchestrate-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EAEP,OAAO,E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AAe,EAAE,IAAI;YACrB,QAAQ,EAAE,CAAC;SACZ,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,eAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"orchestrate-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/orchestrate-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EAEP,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE7G,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,IAAY,EACZ,UAA+G,EAAE;IAEjH,0BAA0B;IAC1B,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,YAAY,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,UAAU,CAAC;IAErE,iFAAiF;IACjF,MAAM,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC;IAC9D,IAAI,qBAAqB,EAAE,CAAC;QAC1B,MAAM,EAAE,kBAAkB,E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C;IAC3B,CAAC;AACH,CAAC"}
@@ -4,5 +4,7 @@
4
4
  */
5
5
  export declare function executePlanCommand(goal: string, options?: {
6
6
  execute?: boolean;
7
+ review?: boolean;
8
+ json?: boolean;
7
9
  }): Promise<void>;
8
10
  //# sourceMappingURL=plan-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/plan-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4KzG"}
1
+ {"version":3,"file":"plan-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/plan-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4W3I"}
@@ -3,11 +3,22 @@
3
3
  * Memory-based hierarchical planning
4
4
  */
5
5
  import { container } from '../../../application/services/dependency-container.js';
6
- import { colors, sectionHeader, success, newline, createBanner, createSpinner, } from '../../../ui.js';
6
+ import { colors, sectionHeader, success, warning, newline, createBanner, createSpinner, isMinimalStyle, separator, getProviderDisplayName, } from '../../../ui.js';
7
7
  import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
8
8
  import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
9
9
  import { displayError } from '../error-display.js';
10
+ import { summaryExtractor } from '../../../infrastructure/validation/summary-extractor.js';
11
+ import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
12
+ import { createPlanTask } from '../../../infrastructure/storage/task-helpers.js';
13
+ import { isReasoningEnabled, isMultiModelEnabled } from '../../../application/reasoning/reasoning-config.js';
10
14
  export async function executePlanCommand(goal, options = {}) {
15
+ // TODO: Create task after plan generation
16
+ // Task mode: PLAN
17
+ // Status: CREATED → PLANNED
18
+ // Risk tier: Detect from plan (use risk tier detector)
19
+ // Store plan in task.plan
20
+ // Set task.clarificationUsed = true if clarification flow was used
21
+ // See: .internal/ARCHITECTURE.md (internal docs)
11
22
  // Detect codebase context (for codebase-aware planning)
12
23
  const codebaseInfo = findCodebaseRoot(process.cwd());
13
24
  const userId = codebaseInfo?.rootPath || process.cwd() || 'cli-user';
@@ -23,22 +34,33 @@ export async function executePlanCommand(goal, options = {}) {
23
34
  displayFeatureAvailability('Hierarchical Planning', 'advanced', profile.level);
24
35
  progressiveDisclosure.recordFeatureUsage(userId, 'planning');
25
36
  }
26
- console.log(createBanner('Memory-Based Planning', 'Hierarchical plan synthesis from memories'));
27
- newline();
28
- console.log(colors.bold('Goal:'));
29
- console.log(colors.cyan(' ' + goal));
30
- newline();
37
+ // Determine reasoning mode for header display
38
+ const reasoningEnabled = isReasoningEnabled();
39
+ const multiModelEnabled = isMultiModelEnabled();
40
+ let modeLabel;
41
+ if (multiModelEnabled) {
42
+ modeLabel = 'Multi-Model Reasoning (M2)';
43
+ }
44
+ else if (reasoningEnabled) {
45
+ modeLabel = 'Simple Reasoning (M1)';
46
+ }
47
+ else {
48
+ modeLabel = 'Legacy Planning (M0)';
49
+ }
31
50
  // Start execution tracing
32
51
  const runId = executionTracer.startRun('plan', {
33
52
  query: goal,
34
53
  codebaseId: codebaseInfo?.rootPath || process.cwd(),
35
54
  });
36
- if (codebaseInfo) {
37
- console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
38
- newline();
39
- }
40
- // Set up streaming handler for plan generation progress
41
- const streamHandler = {
55
+ // JSON output check - must happen BEFORE any console output
56
+ // Set up streaming handler - suppress output in JSON mode
57
+ const streamHandler = options.json ? {
58
+ onProgress: () => { }, // Suppress progress in JSON mode
59
+ onToken: () => { }, // Suppress tokens in JSON mode
60
+ onError: (error) => {
61
+ console.error(JSON.stringify({ error: error.message }));
62
+ },
63
+ } : {
42
64
  onProgress: (stage, message) => {
43
65
  // Clear spinner and show progress
44
66
  process.stdout.write('\r' + ' '.repeat(50) + '\r'); // Clear line
@@ -52,15 +74,44 @@ export async function executePlanCommand(goal, options = {}) {
52
74
  console.error(colors.red(`\nStreaming error: ${error.message}`));
53
75
  },
54
76
  };
55
- // Enhanced progress indicator with stages
56
- const planningSpinner = createSpinner('Synthesizing memories into plan...');
57
- planningSpinner.start();
58
- // Update spinner text based on streaming progress
59
- const originalOnProgress = streamHandler.onProgress;
60
- streamHandler.onProgress = (stage, message) => {
61
- planningSpinner.text = colors.dim(`${stage}: ${message}`);
62
- originalOnProgress(stage, message);
63
- };
77
+ // Enhanced progress indicator with stages (only if not JSON)
78
+ const planningSpinner = options.json ? null : createSpinner('Synthesizing memories into plan...');
79
+ if (planningSpinner) {
80
+ planningSpinner.start();
81
+ // Update spinner text based on streaming progress
82
+ const originalOnProgress = streamHandler.onProgress;
83
+ streamHandler.onProgress = (stage, message) => {
84
+ if (planningSpinner) {
85
+ planningSpinner.text = colors.dim(`${stage}: ${message}`);
86
+ }
87
+ originalOnProgress(stage, message);
88
+ };
89
+ }
90
+ // Header is handled by index.ts, only show banner in verbose mode (skip in JSON)
91
+ if (!options.json) {
92
+ if (!isMinimalStyle()) {
93
+ console.log(createBanner('Memory-Based Planning', 'Hierarchical plan synthesis from memories'));
94
+ newline();
95
+ console.log(colors.bold('Goal:'));
96
+ console.log(colors.cyan(' ' + goal));
97
+ newline();
98
+ // Display mode header as required by capability map (2.3)
99
+ console.log(colors.bold(`Mode: ${modeLabel}`));
100
+ // Display provider as required by capability map (2.23)
101
+ const providerName = getProviderDisplayName(container.aiService);
102
+ console.log(colors.dim(`Provider: ${providerName}`));
103
+ newline();
104
+ }
105
+ else {
106
+ // Minimal style: still show mode
107
+ console.log(colors.dim(`Mode: ${modeLabel}`));
108
+ newline();
109
+ }
110
+ if (codebaseInfo) {
111
+ console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
112
+ newline();
113
+ }
114
+ }
64
115
  try {
65
116
  const useCase = container.planningUseCase;
66
117
  const result = await useCase.execute({
@@ -71,7 +122,34 @@ export async function executePlanCommand(goal, options = {}) {
71
122
  },
72
123
  streamHandler, // Pass streaming handler for real-time progress
73
124
  });
74
- planningSpinner.stop();
125
+ if (planningSpinner) {
126
+ planningSpinner.stop();
127
+ }
128
+ // JSON output (capability map requirement 2.17)
129
+ if (options.json) {
130
+ const jsonOutput = {
131
+ goal: result.plan.goal,
132
+ planId: result.plan.id,
133
+ mode: reasoningEnabled ? (multiModelEnabled ? 'M2' : 'M1') : 'M0',
134
+ complexity: result.plan.metadata?.complexity || 'medium',
135
+ estimatedDuration: result.plan.metadata?.estimatedDuration,
136
+ subPlans: result.plan.subPlans.map(sp => ({
137
+ id: sp.id,
138
+ type: sp.type,
139
+ description: sp.description,
140
+ status: sp.status,
141
+ estimatedSteps: sp.estimatedSteps,
142
+ dependencies: sp.dependencies,
143
+ })),
144
+ dependencies: result.plan.dependencies,
145
+ memoriesUsed: result.memoriesUsed,
146
+ synthesisTime: result.synthesisTime,
147
+ provider: container.aiService.provider?.name || container.aiService.provider?.id || 'unknown',
148
+ };
149
+ console.log(JSON.stringify(jsonOutput, null, 2));
150
+ executionTracer.endRun();
151
+ return;
152
+ }
75
153
  // Display plan
76
154
  sectionHeader('Generated Plan');
77
155
  console.log(colors.bold(`Goal: ${result.plan.goal}`));
@@ -101,13 +179,28 @@ export async function executePlanCommand(goal, options = {}) {
101
179
  console.log(colors.dim(` ${dep.from} → ${dep.to} (${dep.type})`));
102
180
  });
103
181
  }
182
+ // Memory indicators: Standardize format to match capability map requirement (2.2)
183
+ if (result.memoriesUsed > 0) {
184
+ newline();
185
+ console.log(colors.dim(`💭 Using ${result.memoriesUsed} memories from previous interactions`));
186
+ console.log(colors.dim(` (View all: codehere memory --list)`));
187
+ newline();
188
+ }
189
+ // Show detailed reflections if available (additional context beyond memory indicator)
104
190
  if (result.reflections.length > 0) {
105
191
  newline();
106
- sectionHeader('Insights from Past Experiences');
192
+ sectionHeader('💭 Insights from Past Experiences');
193
+ console.log(colors.dim('Based on what I remember from previous interactions:'));
194
+ newline();
195
+ const { formatContent } = await import('../../../infrastructure/ux/comprehensive-formatter.js');
107
196
  result.reflections.slice(0, 5).forEach((reflection, i) => {
108
- console.log(colors.bold(`\n${i + 1}. ${reflection.question}`));
109
- console.log(colors.dim(` ${reflection.insight}`));
197
+ console.log('');
198
+ console.log(colors.bold.cyan(`${i + 1}. ${reflection.question}`));
199
+ const formattedInsight = formatContent(reflection.insight, { indent: 4, maxWidth: 72 });
200
+ console.log(formattedInsight);
110
201
  });
202
+ newline();
203
+ console.log(colors.dim(`(View all memories: codehere memory --list)`));
111
204
  }
112
205
  newline();
113
206
  console.log(colors.dim(`Memories used: ${result.memoriesUsed} | Synthesis time: ${result.synthesisTime}ms`));
@@ -117,6 +210,19 @@ export async function executePlanCommand(goal, options = {}) {
117
210
  console.log(colors.dim(`Plan ID: ${result.plan.id}`));
118
211
  console.log(colors.dim(`To execute this plan later: codehere orchestrate "${result.plan.goal}" --plan-id ${result.plan.id}`));
119
212
  }
213
+ // Create task (non-breaking, silent failure)
214
+ try {
215
+ await createPlanTask({
216
+ goal,
217
+ plan: result.plan,
218
+ codebaseInfo,
219
+ runId,
220
+ });
221
+ }
222
+ catch {
223
+ // Silent failure - don't break user workflow
224
+ // Task creation is optional in Phase 1
225
+ }
120
226
  if (options.execute) {
121
227
  newline();
122
228
  sectionHeader('Executing Plan');
@@ -129,8 +235,86 @@ export async function executePlanCommand(goal, options = {}) {
129
235
  plan: result.plan,
130
236
  },
131
237
  });
238
+ // Get review decision - single source of truth for userAction
239
+ // All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
240
+ const reviewRequested = Boolean(options.review);
241
+ const summarySource = summaryExtractor.extractFromOrchestration(executionResult);
242
+ const decision = summarySource
243
+ ? await reviewHandler.getReviewDecision(summarySource.summary, reviewRequested)
244
+ : { approved: true, proceed: true, userAction: 'not_required' };
245
+ if (!decision.approved) {
246
+ console.log(warning('Operation cancelled by user.'));
247
+ newline();
248
+ // Record feedback for rejection
249
+ if (executionResult.compositeSummary) {
250
+ const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
251
+ agentFeedbackManager.recordFeedback({
252
+ runId: executionResult.unifiedRunId || runId,
253
+ agentName: 'multi-agent-orchestrator',
254
+ operation: 'orchestrate',
255
+ query: goal,
256
+ outcome: 'cancelled',
257
+ userAction: decision.userAction,
258
+ filesChanged: executionResult.compositeSummary.filesChanged,
259
+ filesCreated: executionResult.compositeSummary.filesCreated,
260
+ filesDeleted: executionResult.compositeSummary.filesDeleted,
261
+ errors: executionResult.compositeSummary.errors,
262
+ warnings: executionResult.compositeSummary.warnings,
263
+ validationChecks: executionResult.compositeSummary.validationChecks,
264
+ metrics: executionResult.compositeSummary.metrics,
265
+ });
266
+ }
267
+ return;
268
+ }
269
+ // Record feedback with userAction from review decision
270
+ if (executionResult.compositeSummary) {
271
+ const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
272
+ agentFeedbackManager.recordFeedback({
273
+ runId: executionResult.unifiedRunId || runId,
274
+ agentName: 'multi-agent-orchestrator',
275
+ operation: 'orchestrate',
276
+ query: goal,
277
+ outcome: executionResult.success ? 'success' : 'failure',
278
+ userAction: decision.userAction,
279
+ filesChanged: executionResult.compositeSummary.filesChanged,
280
+ filesCreated: executionResult.compositeSummary.filesCreated,
281
+ filesDeleted: executionResult.compositeSummary.filesDeleted,
282
+ errors: executionResult.compositeSummary.errors,
283
+ warnings: executionResult.compositeSummary.warnings,
284
+ validationChecks: executionResult.compositeSummary.validationChecks,
285
+ metrics: executionResult.compositeSummary.metrics,
286
+ });
287
+ }
288
+ newline();
132
289
  if (executionResult.success) {
290
+ // Delightful UX: Success with context and next steps
133
291
  console.log(success('Plan executed successfully!'));
292
+ newline();
293
+ if (executionResult.compositeSummary) {
294
+ const filesChanged = executionResult.compositeSummary.filesChanged || [];
295
+ const filesCreated = executionResult.compositeSummary.filesCreated || [];
296
+ if (filesChanged.length > 0 || filesCreated.length > 0) {
297
+ console.log(colors.bold('Summary:'));
298
+ if (filesChanged.length > 0) {
299
+ console.log(colors.cyan(` • ${filesChanged.length} file(s) changed`));
300
+ }
301
+ if (filesCreated.length > 0) {
302
+ console.log(colors.green(` • ${filesCreated.length} file(s) created`));
303
+ }
304
+ newline();
305
+ }
306
+ }
307
+ // Show next steps (delightful UX)
308
+ console.log(colors.bold('Next steps:'));
309
+ console.log(colors.cyan(` • Review changes: codehere review --list`));
310
+ console.log(colors.cyan(` • Check status: codehere status --tasks`));
311
+ console.log(colors.cyan(` • Test changes: npm test`));
312
+ newline();
313
+ // Responsible AI indicators
314
+ console.log(separator('─', 60));
315
+ console.log(colors.dim('🔒 Privacy: All operations stored locally'));
316
+ console.log(colors.dim('🛡️ Security: Validation passed'));
317
+ newline();
134
318
  }
135
319
  else {
136
320
  displayError(new Error('Plan execution completed with errors'), {
@@ -150,7 +334,9 @@ export async function executePlanCommand(goal, options = {}) {
150
334
  }
151
335
  }
152
336
  catch (err) {
153
- planningSpinner.stop();
337
+ if (planningSpinner) {
338
+ planningSpinner.stop();
339
+ }
154
340
  const { displayError } = await import('../error-display.js');
155
341
  displayError(err, {
156
342
  operation: 'plan',