codehere 0.5.1-alpha → 0.5.3-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 (375) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +126 -102
  3. package/dist/application/agents/execution-agent.js +2 -2
  4. package/dist/application/agents/multi-agent-orchestrator.d.ts +0 -1
  5. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
  6. package/dist/application/agents/multi-agent-orchestrator.js +2 -9
  7. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
  8. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  9. package/dist/application/agents/planning-agent.js +11 -15
  10. package/dist/application/agents/planning-agent.js.map +1 -1
  11. package/dist/application/services/context-importer.d.ts +71 -0
  12. package/dist/application/services/context-importer.d.ts.map +1 -0
  13. package/dist/application/services/context-importer.js +436 -0
  14. package/dist/application/services/context-importer.js.map +1 -0
  15. package/dist/application/services/context-manager.d.ts +132 -0
  16. package/dist/application/services/context-manager.d.ts.map +1 -0
  17. package/dist/application/services/context-manager.js +369 -0
  18. package/dist/application/services/context-manager.js.map +1 -0
  19. package/dist/application/services/dependency-container.d.ts.map +1 -1
  20. package/dist/application/services/dependency-container.js +7 -5
  21. package/dist/application/services/dependency-container.js.map +1 -1
  22. package/dist/application/services/intelligent-router.d.ts +8 -5
  23. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  24. package/dist/application/services/intelligent-router.js +78 -82
  25. package/dist/application/services/intelligent-router.js.map +1 -1
  26. package/dist/application/services/token-counting-service.d.ts +87 -0
  27. package/dist/application/services/token-counting-service.d.ts.map +1 -0
  28. package/dist/application/services/token-counting-service.js +196 -0
  29. package/dist/application/services/token-counting-service.js.map +1 -0
  30. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
  31. package/dist/application/use-cases/ask-question-use-case.js +109 -21
  32. package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
  33. package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
  34. package/dist/application/use-cases/edit-file-use-case.js +19 -0
  35. package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
  36. package/dist/application/use-cases/planning-use-case.d.ts +1 -14
  37. package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
  38. package/dist/application/use-cases/planning-use-case.js +2 -109
  39. package/dist/application/use-cases/planning-use-case.js.map +1 -1
  40. package/dist/chat.d.ts.map +1 -1
  41. package/dist/chat.js +6 -17
  42. package/dist/chat.js.map +1 -1
  43. package/dist/domain/entities/conversation-context.d.ts +245 -0
  44. package/dist/domain/entities/conversation-context.d.ts.map +1 -0
  45. package/dist/domain/entities/conversation-context.js +50 -0
  46. package/dist/domain/entities/conversation-context.js.map +1 -0
  47. package/dist/domain/entities/memory.d.ts.map +1 -1
  48. package/dist/domain/interfaces/context-repository.interface.d.ts +71 -0
  49. package/dist/domain/interfaces/context-repository.interface.d.ts.map +1 -0
  50. package/dist/domain/interfaces/context-repository.interface.js +10 -0
  51. package/dist/domain/interfaces/context-repository.interface.js.map +1 -0
  52. package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
  53. package/dist/domain/services/query-intent-classifier.js +37 -23
  54. package/dist/domain/services/query-intent-classifier.js.map +1 -1
  55. package/dist/embed.d.ts.map +1 -1
  56. package/dist/embed.js +8 -3
  57. package/dist/embed.js.map +1 -1
  58. package/dist/index.js +267 -143
  59. package/dist/index.js.map +1 -1
  60. package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
  61. package/dist/infrastructure/ai/cohere-ai-service.js +14 -5
  62. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  63. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -1
  64. package/dist/infrastructure/ai/provider-ai-service.js +64 -14
  65. package/dist/infrastructure/ai/provider-ai-service.js.map +1 -1
  66. package/dist/infrastructure/config/config-manager.d.ts +78 -9
  67. package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
  68. package/dist/infrastructure/config/config-manager.js +127 -9
  69. package/dist/infrastructure/config/config-manager.js.map +1 -1
  70. package/dist/infrastructure/context/conversation-context.d.ts +39 -12
  71. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -1
  72. package/dist/infrastructure/context/conversation-context.js +91 -4
  73. package/dist/infrastructure/context/conversation-context.js.map +1 -1
  74. package/dist/infrastructure/context/direct-context-provider.d.ts +18 -0
  75. package/dist/infrastructure/context/direct-context-provider.d.ts.map +1 -0
  76. package/dist/infrastructure/context/direct-context-provider.js +222 -0
  77. package/dist/infrastructure/context/direct-context-provider.js.map +1 -0
  78. package/dist/infrastructure/context/git-context-provider.d.ts +30 -0
  79. package/dist/infrastructure/context/git-context-provider.d.ts.map +1 -0
  80. package/dist/infrastructure/context/git-context-provider.js +140 -0
  81. package/dist/infrastructure/context/git-context-provider.js.map +1 -0
  82. package/dist/infrastructure/context/project-context-loader.d.ts +35 -0
  83. package/dist/infrastructure/context/project-context-loader.d.ts.map +1 -0
  84. package/dist/infrastructure/context/project-context-loader.js +184 -0
  85. package/dist/infrastructure/context/project-context-loader.js.map +1 -0
  86. package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
  87. package/dist/infrastructure/cost/cost-tracker.js +3 -2
  88. package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
  89. package/dist/infrastructure/cost/session-token-tracker.d.ts +68 -0
  90. package/dist/infrastructure/cost/session-token-tracker.d.ts.map +1 -0
  91. package/dist/infrastructure/cost/session-token-tracker.js +178 -0
  92. package/dist/infrastructure/cost/session-token-tracker.js.map +1 -0
  93. package/dist/infrastructure/index.d.ts +1 -0
  94. package/dist/infrastructure/index.d.ts.map +1 -1
  95. package/dist/infrastructure/index.js +1 -2
  96. package/dist/infrastructure/index.js.map +1 -1
  97. package/dist/infrastructure/observability/execution-tracer.d.ts +21 -0
  98. package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -1
  99. package/dist/infrastructure/observability/execution-tracer.js +157 -4
  100. package/dist/infrastructure/observability/execution-tracer.js.map +1 -1
  101. package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
  102. package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
  103. package/dist/infrastructure/providers/cohere-provider.d.ts +1 -2
  104. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -1
  105. package/dist/infrastructure/providers/cohere-provider.js +44 -42
  106. package/dist/infrastructure/providers/cohere-provider.js.map +1 -1
  107. package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -1
  108. package/dist/infrastructure/providers/fake-provider.js +8 -0
  109. package/dist/infrastructure/providers/fake-provider.js.map +1 -1
  110. package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -1
  111. package/dist/infrastructure/providers/local-llm-provider.js +8 -2
  112. package/dist/infrastructure/providers/local-llm-provider.js.map +1 -1
  113. package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -1
  114. package/dist/infrastructure/providers/openai-provider.js +40 -7
  115. package/dist/infrastructure/providers/openai-provider.js.map +1 -1
  116. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -1
  117. package/dist/infrastructure/providers/openrouter-provider.js +13 -7
  118. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -1
  119. package/dist/infrastructure/security/enhanced-security-gate.d.ts +13 -0
  120. package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -1
  121. package/dist/infrastructure/security/enhanced-security-gate.js +56 -1
  122. package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -1
  123. package/dist/infrastructure/security/input-validator.d.ts +17 -0
  124. package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
  125. package/dist/infrastructure/security/input-validator.js +140 -25
  126. package/dist/infrastructure/security/input-validator.js.map +1 -1
  127. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -1
  128. package/dist/infrastructure/storage/embeddings-path.js +14 -4
  129. package/dist/infrastructure/storage/embeddings-path.js.map +1 -1
  130. package/dist/infrastructure/storage/memory-stream-service.d.ts.map +1 -1
  131. package/dist/infrastructure/storage/memory-stream-service.js +58 -88
  132. package/dist/infrastructure/storage/memory-stream-service.js.map +1 -1
  133. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  134. package/dist/infrastructure/storage/plan-repository.js +4 -5
  135. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  136. package/dist/infrastructure/storage/sqlite-context-repository.d.ts +95 -0
  137. package/dist/infrastructure/storage/sqlite-context-repository.d.ts.map +1 -0
  138. package/dist/infrastructure/storage/sqlite-context-repository.js +467 -0
  139. package/dist/infrastructure/storage/sqlite-context-repository.js.map +1 -0
  140. package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +1 -1
  141. package/dist/infrastructure/storage/sqlite-decision-repository.js +4 -8
  142. package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -1
  143. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +1 -1
  144. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +4 -8
  145. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +1 -1
  146. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +1 -1
  147. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +4 -8
  148. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +1 -1
  149. package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +1 -1
  150. package/dist/infrastructure/storage/sqlite-memory-repository.js +4 -8
  151. package/dist/infrastructure/storage/sqlite-memory-repository.js.map +1 -1
  152. package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +1 -1
  153. package/dist/infrastructure/storage/sqlite-pattern-repository.js +4 -8
  154. package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -1
  155. package/dist/infrastructure/storage/task-repository.d.ts +0 -1
  156. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
  157. package/dist/infrastructure/storage/task-repository.js +2 -13
  158. package/dist/infrastructure/storage/task-repository.js.map +1 -1
  159. package/dist/infrastructure/ux/cli-style-guide.d.ts +105 -0
  160. package/dist/infrastructure/ux/cli-style-guide.d.ts.map +1 -0
  161. package/dist/infrastructure/ux/cli-style-guide.js +220 -0
  162. package/dist/infrastructure/ux/cli-style-guide.js.map +1 -0
  163. package/dist/infrastructure/ux/progress-indicator.d.ts +49 -10
  164. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  165. package/dist/infrastructure/ux/progress-indicator.js +112 -9
  166. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  167. package/dist/infrastructure/validation/agent-feedback.d.ts +14 -1
  168. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -1
  169. package/dist/infrastructure/validation/agent-feedback.js +57 -3
  170. package/dist/infrastructure/validation/agent-feedback.js.map +1 -1
  171. package/dist/parallel-processor.d.ts.map +1 -1
  172. package/dist/parallel-processor.js +39 -11
  173. package/dist/parallel-processor.js.map +1 -1
  174. package/dist/presentation/cli/commands/ask-command.d.ts +1 -2
  175. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  176. package/dist/presentation/cli/commands/ask-command.js +66 -150
  177. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  178. package/dist/presentation/cli/commands/audit-command.d.ts +13 -0
  179. package/dist/presentation/cli/commands/audit-command.d.ts.map +1 -0
  180. package/dist/presentation/cli/commands/audit-command.js +96 -0
  181. package/dist/presentation/cli/commands/audit-command.js.map +1 -0
  182. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  183. package/dist/presentation/cli/commands/config-command.js +2 -14
  184. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  185. package/dist/presentation/cli/commands/context-command.d.ts +32 -0
  186. package/dist/presentation/cli/commands/context-command.d.ts.map +1 -0
  187. package/dist/presentation/cli/commands/context-command.js +295 -0
  188. package/dist/presentation/cli/commands/context-command.js.map +1 -0
  189. package/dist/presentation/cli/commands/context-helper.d.ts +16 -0
  190. package/dist/presentation/cli/commands/context-helper.d.ts.map +1 -0
  191. package/dist/presentation/cli/commands/context-helper.js +88 -0
  192. package/dist/presentation/cli/commands/context-helper.js.map +1 -0
  193. package/dist/presentation/cli/commands/decision-command.js +6 -23
  194. package/dist/presentation/cli/commands/decision-command.js.map +1 -1
  195. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -1
  196. package/dist/presentation/cli/commands/fix-command.js +19 -23
  197. package/dist/presentation/cli/commands/fix-command.js.map +1 -1
  198. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
  199. package/dist/presentation/cli/commands/help-command.js +1 -21
  200. package/dist/presentation/cli/commands/help-command.js.map +1 -1
  201. package/dist/presentation/cli/commands/orchestrate-command.d.ts +0 -1
  202. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  203. package/dist/presentation/cli/commands/orchestrate-command.js +19 -126
  204. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  205. package/dist/presentation/cli/commands/plan-command.d.ts +0 -1
  206. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  207. package/dist/presentation/cli/commands/plan-command.js +42 -132
  208. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  209. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
  210. package/dist/presentation/cli/commands/react-command.js +1 -5
  211. package/dist/presentation/cli/commands/react-command.js.map +1 -1
  212. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -1
  213. package/dist/presentation/cli/commands/review-command.js +2 -21
  214. package/dist/presentation/cli/commands/review-command.js.map +1 -1
  215. package/dist/presentation/cli/commands/smart-command.d.ts +3 -0
  216. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
  217. package/dist/presentation/cli/commands/smart-command.js +127 -93
  218. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  219. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -1
  220. package/dist/presentation/cli/commands/status-command.js +1 -5
  221. package/dist/presentation/cli/commands/status-command.js.map +1 -1
  222. package/dist/presentation/cli/commands/trust-command.d.ts +28 -0
  223. package/dist/presentation/cli/commands/trust-command.d.ts.map +1 -0
  224. package/dist/presentation/cli/commands/trust-command.js +301 -0
  225. package/dist/presentation/cli/commands/trust-command.js.map +1 -0
  226. package/dist/presentation/cli/error-display.d.ts.map +1 -1
  227. package/dist/presentation/cli/error-display.js +17 -75
  228. package/dist/presentation/cli/error-display.js.map +1 -1
  229. package/dist/search.d.ts.map +1 -1
  230. package/dist/search.js +5 -18
  231. package/dist/search.js.map +1 -1
  232. package/dist/session.d.ts.map +1 -1
  233. package/dist/session.js +221 -57
  234. package/dist/session.js.map +1 -1
  235. package/dist/token-optimizer.d.ts.map +1 -1
  236. package/dist/token-optimizer.js +6 -1
  237. package/dist/token-optimizer.js.map +1 -1
  238. package/dist/tools/bash.d.ts.map +1 -1
  239. package/dist/tools/bash.js +0 -3
  240. package/dist/tools/bash.js.map +1 -1
  241. package/dist/tools/git-tool.js +7 -7
  242. package/dist/tools/git-tool.js.map +1 -1
  243. package/dist/ui.d.ts +0 -5
  244. package/dist/ui.d.ts.map +1 -1
  245. package/dist/ui.js +0 -19
  246. package/dist/ui.js.map +1 -1
  247. package/dist/utils/provider-check.d.ts +21 -0
  248. package/dist/utils/provider-check.d.ts.map +1 -0
  249. package/dist/utils/provider-check.js +124 -0
  250. package/dist/utils/provider-check.js.map +1 -0
  251. package/package.json +16 -13
  252. package/dist/application/agents/documentation-agent.d.ts +0 -24
  253. package/dist/application/agents/documentation-agent.d.ts.map +0 -1
  254. package/dist/application/agents/documentation-agent.js +0 -399
  255. package/dist/application/agents/documentation-agent.js.map +0 -1
  256. package/dist/application/agents/product-requirements-agent.d.ts +0 -21
  257. package/dist/application/agents/product-requirements-agent.d.ts.map +0 -1
  258. package/dist/application/agents/product-requirements-agent.js +0 -247
  259. package/dist/application/agents/product-requirements-agent.js.map +0 -1
  260. package/dist/application/reasoning/multi-model-planning-strategy.d.ts +0 -21
  261. package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +0 -1
  262. package/dist/application/reasoning/multi-model-planning-strategy.js +0 -158
  263. package/dist/application/reasoning/multi-model-planning-strategy.js.map +0 -1
  264. package/dist/application/reasoning/reasoning-config.d.ts +0 -15
  265. package/dist/application/reasoning/reasoning-config.d.ts.map +0 -1
  266. package/dist/application/reasoning/reasoning-config.js +0 -50
  267. package/dist/application/reasoning/reasoning-config.js.map +0 -1
  268. package/dist/application/reasoning/reasoning-orchestrator.d.ts +0 -18
  269. package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +0 -1
  270. package/dist/application/reasoning/reasoning-orchestrator.js +0 -170
  271. package/dist/application/reasoning/reasoning-orchestrator.js.map +0 -1
  272. package/dist/application/reasoning/reasoning-strategy.interface.d.ts +0 -24
  273. package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +0 -1
  274. package/dist/application/reasoning/reasoning-strategy.interface.js +0 -6
  275. package/dist/application/reasoning/reasoning-strategy.interface.js.map +0 -1
  276. package/dist/application/reasoning/role-provider-resolver.d.ts +0 -36
  277. package/dist/application/reasoning/role-provider-resolver.d.ts.map +0 -1
  278. package/dist/application/reasoning/role-provider-resolver.js +0 -74
  279. package/dist/application/reasoning/role-provider-resolver.js.map +0 -1
  280. package/dist/application/reasoning/simple-planning-strategy.d.ts +0 -22
  281. package/dist/application/reasoning/simple-planning-strategy.d.ts.map +0 -1
  282. package/dist/application/reasoning/simple-planning-strategy.js +0 -217
  283. package/dist/application/reasoning/simple-planning-strategy.js.map +0 -1
  284. package/dist/application/reasoning/types.d.ts +0 -65
  285. package/dist/application/reasoning/types.d.ts.map +0 -1
  286. package/dist/application/reasoning/types.js +0 -6
  287. package/dist/application/reasoning/types.js.map +0 -1
  288. package/dist/application/reasoning/validator-strategy.d.ts +0 -56
  289. package/dist/application/reasoning/validator-strategy.d.ts.map +0 -1
  290. package/dist/application/reasoning/validator-strategy.js +0 -103
  291. package/dist/application/reasoning/validator-strategy.js.map +0 -1
  292. package/dist/domain/entities/documentation.d.ts +0 -35
  293. package/dist/domain/entities/documentation.d.ts.map +0 -1
  294. package/dist/domain/entities/documentation.js +0 -6
  295. package/dist/domain/entities/documentation.js.map +0 -1
  296. package/dist/domain/entities/product-requirements.d.ts +0 -50
  297. package/dist/domain/entities/product-requirements.d.ts.map +0 -1
  298. package/dist/domain/entities/product-requirements.js +0 -6
  299. package/dist/domain/entities/product-requirements.js.map +0 -1
  300. package/dist/domain/interfaces/agent.interface.d.ts +0 -15
  301. package/dist/domain/interfaces/agent.interface.d.ts.map +0 -1
  302. package/dist/domain/interfaces/agent.interface.js +0 -6
  303. package/dist/domain/interfaces/agent.interface.js.map +0 -1
  304. package/dist/infrastructure/ai/fake-ai-service.d.ts +0 -22
  305. package/dist/infrastructure/ai/fake-ai-service.d.ts.map +0 -1
  306. package/dist/infrastructure/ai/fake-ai-service.js +0 -59
  307. package/dist/infrastructure/ai/fake-ai-service.js.map +0 -1
  308. package/dist/infrastructure/completion/completion-generator.d.ts +0 -42
  309. package/dist/infrastructure/completion/completion-generator.d.ts.map +0 -1
  310. package/dist/infrastructure/completion/completion-generator.js +0 -184
  311. package/dist/infrastructure/completion/completion-generator.js.map +0 -1
  312. package/dist/infrastructure/security/network-guard.d.ts +0 -8
  313. package/dist/infrastructure/security/network-guard.d.ts.map +0 -1
  314. package/dist/infrastructure/security/network-guard.js +0 -70
  315. package/dist/infrastructure/security/network-guard.js.map +0 -1
  316. package/dist/infrastructure/security/offline.d.ts +0 -16
  317. package/dist/infrastructure/security/offline.d.ts.map +0 -1
  318. package/dist/infrastructure/security/offline.js +0 -24
  319. package/dist/infrastructure/security/offline.js.map +0 -1
  320. package/dist/infrastructure/storage/sqljs-init.d.ts +0 -8
  321. package/dist/infrastructure/storage/sqljs-init.d.ts.map +0 -1
  322. package/dist/infrastructure/storage/sqljs-init.js +0 -23
  323. package/dist/infrastructure/storage/sqljs-init.js.map +0 -1
  324. package/dist/infrastructure/ux/hitl-review-portal.d.ts +0 -47
  325. package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +0 -1
  326. package/dist/infrastructure/ux/hitl-review-portal.js +0 -228
  327. package/dist/infrastructure/ux/hitl-review-portal.js.map +0 -1
  328. package/dist/infrastructure/ux/meta-query.d.ts +0 -9
  329. package/dist/infrastructure/ux/meta-query.d.ts.map +0 -1
  330. package/dist/infrastructure/ux/meta-query.js +0 -63
  331. package/dist/infrastructure/ux/meta-query.js.map +0 -1
  332. package/dist/infrastructure/ux/proportional-friction.d.ts +0 -73
  333. package/dist/infrastructure/ux/proportional-friction.d.ts.map +0 -1
  334. package/dist/infrastructure/ux/proportional-friction.js +0 -200
  335. package/dist/infrastructure/ux/proportional-friction.js.map +0 -1
  336. package/dist/infrastructure/ux/repo-fingerprint.d.ts +0 -10
  337. package/dist/infrastructure/ux/repo-fingerprint.d.ts.map +0 -1
  338. package/dist/infrastructure/ux/repo-fingerprint.js +0 -55
  339. package/dist/infrastructure/ux/repo-fingerprint.js.map +0 -1
  340. package/dist/infrastructure/validation/feedback-stats.d.ts +0 -99
  341. package/dist/infrastructure/validation/feedback-stats.d.ts.map +0 -1
  342. package/dist/infrastructure/validation/feedback-stats.js +0 -173
  343. package/dist/infrastructure/validation/feedback-stats.js.map +0 -1
  344. package/dist/infrastructure/validation/trust-config.d.ts +0 -27
  345. package/dist/infrastructure/validation/trust-config.d.ts.map +0 -1
  346. package/dist/infrastructure/validation/trust-config.js +0 -113
  347. package/dist/infrastructure/validation/trust-config.js.map +0 -1
  348. package/dist/presentation/cli/commands/memory-command.d.ts +0 -17
  349. package/dist/presentation/cli/commands/memory-command.d.ts.map +0 -1
  350. package/dist/presentation/cli/commands/memory-command.js +0 -252
  351. package/dist/presentation/cli/commands/memory-command.js.map +0 -1
  352. package/dist/presentation/cli/keyboard-shortcuts.d.ts +0 -27
  353. package/dist/presentation/cli/keyboard-shortcuts.d.ts.map +0 -1
  354. package/dist/presentation/cli/keyboard-shortcuts.js +0 -77
  355. package/dist/presentation/cli/keyboard-shortcuts.js.map +0 -1
  356. package/dist/test_cohere.d.ts +0 -2
  357. package/dist/test_cohere.d.ts.map +0 -1
  358. package/dist/test_cohere.js +0 -68
  359. package/dist/test_cohere.js.map +0 -1
  360. package/dist/test_env.d.ts +0 -2
  361. package/dist/test_env.d.ts.map +0 -1
  362. package/dist/test_env.js +0 -24
  363. package/dist/test_env.js.map +0 -1
  364. package/dist/test_retrieval.d.ts +0 -2
  365. package/dist/test_retrieval.d.ts.map +0 -1
  366. package/dist/test_retrieval.js +0 -84
  367. package/dist/test_retrieval.js.map +0 -1
  368. package/dist/tools/bash.d 2.ts +0 -53
  369. package/dist/tools/bash.js 2.map +0 -1
  370. package/dist/tools/edit 2.js +0 -235
  371. package/dist/tools/edit.d.ts 2.map +0 -1
  372. package/dist/utils/logger.d.ts +0 -34
  373. package/dist/utils/logger.d.ts.map +0 -1
  374. package/dist/utils/logger.js +0 -56
  375. package/dist/utils/logger.js.map +0 -1
@@ -1,173 +0,0 @@
1
- /**
2
- * Infrastructure: Feedback Statistics Builders
3
- * Pure functions to compute feedback analytics and status snapshots
4
- *
5
- * Clean Architecture: Infrastructure Layer
6
- * Strategic: Provides machine-readable JSON outputs for CI/dashboards
7
- */
8
- import { getAgentThreshold } from './trust-config.js';
9
- /**
10
- * Build feedback analytics JSON from feedback records and trust config
11
- */
12
- export function buildFeedbackAnalyticsJson(feedback, trustConfig) {
13
- const byAgent = {};
14
- const byOperationMap = {};
15
- // Aggregate feedback
16
- for (const record of feedback) {
17
- // Aggregate by agent
18
- if (!byAgent[record.agentName]) {
19
- byAgent[record.agentName] = {
20
- totalRuns: 0,
21
- outcomes: {
22
- success: 0,
23
- failure: 0,
24
- partial_success: 0,
25
- cancelled: 0,
26
- error: 0,
27
- },
28
- userActions: {
29
- approved: 0,
30
- rejected: 0,
31
- modified: 0,
32
- skipped: 0,
33
- not_required: 0,
34
- },
35
- };
36
- }
37
- const agentStats = byAgent[record.agentName];
38
- agentStats.totalRuns++;
39
- agentStats.outcomes[record.outcome] = (agentStats.outcomes[record.outcome] || 0) + 1;
40
- if (record.userAction) {
41
- agentStats.userActions[record.userAction] =
42
- (agentStats.userActions[record.userAction] || 0) + 1;
43
- }
44
- // Aggregate by operation
45
- if (record.operation) {
46
- if (!byOperationMap[record.operation]) {
47
- byOperationMap[record.operation] = {
48
- operation: record.operation,
49
- count: 0,
50
- outcomes: {
51
- success: 0,
52
- failure: 0,
53
- partial_success: 0,
54
- cancelled: 0,
55
- error: 0,
56
- },
57
- };
58
- }
59
- const opStats = byOperationMap[record.operation];
60
- opStats.count++;
61
- opStats.outcomes[record.outcome] = (opStats.outcomes[record.outcome] || 0) + 1;
62
- }
63
- }
64
- // Calculate trust scores and build agent array
65
- const agents = Object.entries(byAgent)
66
- .map(([agentName, stats]) => {
67
- const approvedSuccessRuns = feedback.filter(f => f.agentName === agentName &&
68
- f.outcome === 'success' &&
69
- f.userAction === 'approved').length;
70
- const trustScore = stats.totalRuns > 0
71
- ? (approvedSuccessRuns / stats.totalRuns) * 100
72
- : 0;
73
- const threshold = getAgentThreshold(trustConfig, agentName);
74
- const belowThreshold = threshold > 0 && trustScore < threshold;
75
- return {
76
- agentName,
77
- totalRuns: stats.totalRuns,
78
- trustScore: Math.round(trustScore * 100) / 100, // Round to 2 decimal places
79
- belowThreshold,
80
- threshold,
81
- outcomes: stats.outcomes,
82
- userActions: stats.userActions,
83
- };
84
- })
85
- .sort((a, b) => b.totalRuns - a.totalRuns);
86
- // Build operations array
87
- const operations = Object.values(byOperationMap)
88
- .sort((a, b) => b.count - a.count);
89
- return {
90
- totalRecords: feedback.length,
91
- agents,
92
- operations,
93
- };
94
- }
95
- /**
96
- * Build status snapshot JSON from feedback records and trust config
97
- */
98
- export function buildStatusSnapshotJson(feedback, trustConfig) {
99
- const agentStatsMap = {};
100
- const operationStatsMap = {};
101
- // Aggregate feedback
102
- for (const record of feedback) {
103
- // Aggregate by agent
104
- if (!agentStatsMap[record.agentName]) {
105
- agentStatsMap[record.agentName] = {
106
- totalRuns: 0,
107
- successRuns: 0,
108
- trustScore: 0,
109
- };
110
- }
111
- const stats = agentStatsMap[record.agentName];
112
- stats.totalRuns++;
113
- if (record.outcome === 'success') {
114
- stats.successRuns++;
115
- }
116
- // Aggregate by operation
117
- if (record.operation) {
118
- operationStatsMap[record.operation] = (operationStatsMap[record.operation] || 0) + 1;
119
- }
120
- }
121
- // Calculate trust scores and build agent array
122
- const agents = Object.entries(agentStatsMap)
123
- .map(([agentName, stats]) => {
124
- const approvedSuccessRuns = feedback.filter(f => f.agentName === agentName &&
125
- f.outcome === 'success' &&
126
- f.userAction === 'approved').length;
127
- const trustScore = stats.totalRuns > 0
128
- ? (approvedSuccessRuns / stats.totalRuns) * 100
129
- : 0;
130
- const threshold = getAgentThreshold(trustConfig, agentName);
131
- const belowThreshold = threshold > 0 && trustScore < threshold;
132
- return {
133
- agentName,
134
- success: {
135
- runs: stats.successRuns,
136
- total: stats.totalRuns,
137
- },
138
- trustScore: Math.round(trustScore * 100) / 100, // Round to 2 decimal places
139
- threshold,
140
- belowThreshold,
141
- };
142
- })
143
- .sort((a, b) => b.trustScore - a.trustScore);
144
- // Build operations array
145
- const operations = Object.entries(operationStatsMap)
146
- .map(([operation, runs]) => ({ operation, runs }))
147
- .sort((a, b) => b.runs - a.runs)
148
- .slice(0, 5); // Top 5 operations
149
- return {
150
- totalRecords: feedback.length,
151
- agents,
152
- operations,
153
- };
154
- }
155
- /**
156
- * Evaluate trust thresholds from analytics JSON
157
- * Returns agents that are below their configured thresholds
158
- */
159
- export function evaluateTrustThresholds(analytics) {
160
- const offenders = [];
161
- for (const agent of analytics.agents) {
162
- // Only consider agents with threshold > 0
163
- if (agent.threshold > 0 && agent.trustScore < agent.threshold) {
164
- offenders.push({
165
- agentName: agent.agentName,
166
- trustScore: agent.trustScore,
167
- threshold: agent.threshold,
168
- });
169
- }
170
- }
171
- return { offenders };
172
- }
173
- //# sourceMappingURL=feedback-stats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feedback-stats.js","sourceRoot":"","sources":["../../../src/infrast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
- *
5
- * Clean Architecture: Infrastructure Layer
6
- * Strategic: Provides optional trust threshold configuration for warnings
7
- */
8
- export interface TrustConfig {
9
- defaultThreshold: number;
10
- agents: Record<string, number>;
11
- }
12
- /**
13
- * Normalize and validate raw config data
14
- * Clamps thresholds between 0 and 100
15
- */
16
- export declare function normalizeTrustConfig(raw: any): TrustConfig;
17
- /**
18
- * Load trust configuration from file
19
- * Never throws - returns safe defaults on error
20
- */
21
- export declare function loadTrustConfig(): TrustConfig;
22
- /**
23
- * Get the trust threshold for a specific agent
24
- * Returns the agent-specific threshold if set, otherwise the default
25
- */
26
- export declare function getAgentThreshold(config: TrustConfig, agentName: string): number;
27
- //# sourceMappingURL=trust-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trust-config.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/trust-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AA4BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAmC1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,WAAW,CAyB7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKhF"}
@@ -1,113 +0,0 @@
1
- /**
2
- * Infrastructure: Trust Configuration
3
- * Loads and validates trust threshold configuration
4
- *
5
- * Clean Architecture: Infrastructure Layer
6
- * Strategic: Provides optional trust threshold configuration for warnings
7
- */
8
- import { existsSync, readFileSync } from 'fs';
9
- import { join, resolve, dirname } from 'path';
10
- import { fileURLToPath } from 'url';
11
- const __filename = fileURLToPath(import.meta.url);
12
- const __dirname = dirname(__filename);
13
- /**
14
- * Get the path to trust config file
15
- * Located at: config/trust-config.json relative to repo root
16
- */
17
- function getTrustConfigPath() {
18
- // trust-config.ts is at dist/infrastructure/validation/
19
- // We need to go up to agent root: dist/infrastructure/validation -> dist/infrastructure -> dist -> agent root
20
- // But __dirname in ESM points to the directory containing the .js file
21
- // When running from dist/infrastructure/validation/trust-config.js:
22
- // __dirname = /path/to/agent/dist/infrastructure/validation
23
- // Going up 3 levels: ../../../ -> /path/to/agent
24
- // However, we need to match how status-command.ts resolves paths (goes up 4 levels)
25
- // Let's use the same pattern: find agent root by looking for package.json or going up until we find it
26
- let currentDir = __dirname;
27
- for (let i = 0; i < 5; i++) {
28
- const packageJsonPath = join(currentDir, 'package.json');
29
- if (existsSync(packageJsonPath)) {
30
- return join(currentDir, 'config', 'trust-config.json');
31
- }
32
- currentDir = resolve(currentDir, '..');
33
- }
34
- // Fallback: assume we're in dist/infrastructure/validation and go up 3 levels
35
- const agentRoot = resolve(__dirname, '../../../..');
36
- return join(agentRoot, 'config', 'trust-config.json');
37
- }
38
- /**
39
- * Normalize and validate raw config data
40
- * Clamps thresholds between 0 and 100
41
- */
42
- export function normalizeTrustConfig(raw) {
43
- const config = {
44
- defaultThreshold: 0,
45
- agents: {},
46
- };
47
- if (!raw || typeof raw !== 'object') {
48
- return config;
49
- }
50
- // Validate defaultThreshold
51
- if (typeof raw.defaultThreshold === 'number') {
52
- config.defaultThreshold = Math.max(0, Math.min(100, raw.defaultThreshold));
53
- }
54
- else if (typeof raw.defaultThreshold === 'string') {
55
- const parsed = parseFloat(raw.defaultThreshold);
56
- if (!isNaN(parsed)) {
57
- config.defaultThreshold = Math.max(0, Math.min(100, parsed));
58
- }
59
- }
60
- // Validate agents
61
- if (raw.agents && typeof raw.agents === 'object') {
62
- for (const [agentName, threshold] of Object.entries(raw.agents)) {
63
- if (typeof threshold === 'number') {
64
- config.agents[agentName] = Math.max(0, Math.min(100, threshold));
65
- }
66
- else if (typeof threshold === 'string') {
67
- const parsed = parseFloat(threshold);
68
- if (!isNaN(parsed)) {
69
- config.agents[agentName] = Math.max(0, Math.min(100, parsed));
70
- }
71
- }
72
- }
73
- }
74
- return config;
75
- }
76
- /**
77
- * Load trust configuration from file
78
- * Never throws - returns safe defaults on error
79
- */
80
- export function loadTrustConfig() {
81
- const configPath = getTrustConfigPath();
82
- if (!existsSync(configPath)) {
83
- // File doesn't exist - return safe default (no warnings)
84
- return {
85
- defaultThreshold: 0,
86
- agents: {},
87
- };
88
- }
89
- try {
90
- const content = readFileSync(configPath, 'utf-8');
91
- const raw = JSON.parse(content);
92
- return normalizeTrustConfig(raw);
93
- }
94
- catch (error) {
95
- // Invalid JSON or read error - log once and return safe default
96
- console.error(`[Warning] Failed to load trust config from ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
97
- return {
98
- defaultThreshold: 0,
99
- agents: {},
100
- };
101
- }
102
- }
103
- /**
104
- * Get the trust threshold for a specific agent
105
- * Returns the agent-specific threshold if set, otherwise the default
106
- */
107
- export function getAgentThreshold(config, agentName) {
108
- if (config.agents[agentName] !== undefined) {
109
- return config.agents[agentName];
110
- }
111
- return config.defaultThreshold;
112
- }
113
- //# sourceMappingURL=trust-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trust-config.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/trust-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAOtC;;;GAGG;AACH,SAAS,kBAAkB;IACzB,wDAAwD;IACxD,8GAA8G;IAC9G,uEAAuE;IACvE,oEAAoE;IAC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;IACJ,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gEAAgE;QAChE,OAAO,CAAC,KAAK,CACX,8CAA8C,UAAU,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACtH,CAAC;QACF,OAAO;YACL,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,EAAE;SACX,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAmB,EAAE,SAAiB;IACtE,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC,gBAAgB,CAAC;AACjC,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * CLI Command: Memory
3
- * View and manage Codehere's operation history (v0.5: operation history only, not full long-term memory)
4
- *
5
- * Focus: Delightful UX, XAI, Responsible AI
6
- */
7
- export interface MemoryCommandOptions {
8
- list?: boolean;
9
- search?: string;
10
- stats?: boolean;
11
- clear?: boolean;
12
- limit?: number;
13
- type?: string;
14
- json?: boolean;
15
- }
16
- export declare function executeMemoryCommand(options?: MemoryCommandOptions): Promise<void>;
17
- //# sourceMappingURL=memory-command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/memory-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgH5F"}
@@ -1,252 +0,0 @@
1
- /**
2
- * CLI Command: Memory
3
- * View and manage Codehere's operation history (v0.5: operation history only, not full long-term memory)
4
- *
5
- * Focus: Delightful UX, XAI, Responsible AI
6
- */
7
- import { container } from '../../../application/services/dependency-container.js';
8
- import { colors, formatNumber, newline, separator, createBanner, warning, info, } from '../../../ui.js';
9
- import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
10
- import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
11
- import { displayError } from '../error-display.js';
12
- export async function executeMemoryCommand(options = {}) {
13
- const codebaseInfo = findCodebaseRoot(process.cwd());
14
- const codebaseId = codebaseInfo?.rootPath || process.cwd();
15
- const runId = executionTracer.startRun('memory', {
16
- codebaseId,
17
- });
18
- try {
19
- const memoryRepository = container.memoryRepository;
20
- // Get all recent memories (we'll filter by codebase if needed)
21
- // Note: Some memories might not have codebaseId in metadata (older format)
22
- const allRecent = await memoryRepository.findRecent(1000);
23
- // Filter by codebase if codebaseId is available
24
- // Also include memories without codebaseId (for backward compatibility)
25
- let memories = allRecent.filter(m => {
26
- const metadata = typeof m.metadata === 'string' ? JSON.parse(m.metadata) : (m.metadata || {});
27
- return !metadata.codebaseId || metadata.codebaseId === codebaseId || metadata.codebasePath === codebaseId;
28
- });
29
- // Filter by type if specified
30
- if (options.type) {
31
- memories = memories.filter(m => m.type === options.type);
32
- }
33
- // Handle clear action
34
- if (options.clear) {
35
- if (memories.length === 0) {
36
- console.log(info('No memories found to clear.'));
37
- newline();
38
- executionTracer.endRun();
39
- return;
40
- }
41
- // Show confirmation
42
- console.log(warning(`⚠️ This will clear ${memories.length} memory item(s) for this codebase.`));
43
- console.log(colors.dim('This action cannot be undone.'));
44
- newline();
45
- console.log(colors.bold('To confirm, run:'));
46
- console.log(colors.cyan(` codehere memory --clear --confirm`));
47
- newline();
48
- executionTracer.endRun();
49
- return;
50
- }
51
- // Handle stats
52
- if (options.stats || (!options.list && !options.search)) {
53
- if (options.json) {
54
- // P0 FIX: JSON output for stats
55
- const { container } = await import('../../../application/services/dependency-container.js');
56
- const provider = container.aiService.provider?.name || container.aiService.provider?.id || 'unknown';
57
- const output = {
58
- provider,
59
- stats: {
60
- total: memories.length,
61
- byType: memories.reduce((acc, m) => {
62
- acc[m.type] = (acc[m.type] || 0) + 1;
63
- return acc;
64
- }, {}),
65
- },
66
- };
67
- console.log(JSON.stringify(output, null, 2));
68
- }
69
- else {
70
- showMemoryStats(memories, codebaseId);
71
- }
72
- executionTracer.endRun();
73
- return;
74
- }
75
- // Handle search
76
- if (options.search) {
77
- const searchTerm = options.search.toLowerCase();
78
- const filtered = memories.filter(m => m.description.toLowerCase().includes(searchTerm) ||
79
- m.type.toLowerCase().includes(searchTerm));
80
- if (filtered.length === 0) {
81
- if (options.json) {
82
- // P0 FIX: Return empty JSON array for JSON mode
83
- const { container } = await import('../../../application/services/dependency-container.js');
84
- const provider = container.aiService.provider?.name || container.aiService.provider?.id || 'unknown';
85
- console.log(JSON.stringify({ provider, memories: [] }, null, 2));
86
- }
87
- else {
88
- console.log(info(`No memories found matching "${options.search}"`));
89
- newline();
90
- }
91
- executionTracer.endRun();
92
- return;
93
- }
94
- await showMemoryList(filtered, options.limit || 20, options.json);
95
- executionTracer.endRun();
96
- return;
97
- }
98
- // Handle list (default)
99
- if (options.list || (!options.stats && !options.search)) {
100
- const limit = options.limit || 20;
101
- await showMemoryList(memories, limit, options.json);
102
- executionTracer.endRun();
103
- return;
104
- }
105
- executionTracer.endRun();
106
- }
107
- catch (err) {
108
- displayError(err, { operation: 'memory' });
109
- executionTracer.endRun();
110
- process.exit(1);
111
- }
112
- }
113
- function showMemoryStats(memories, codebaseId) {
114
- console.log(createBanner('Memory Statistics', 'What Codehere remembers'));
115
- newline();
116
- if (memories.length === 0) {
117
- console.log(info('No memories found for this codebase.'));
118
- console.log(colors.dim('Memories are created as you use Codehere.'));
119
- newline();
120
- console.log(colors.bold('Try:'));
121
- console.log(colors.cyan(' codehere "explain this function"'));
122
- console.log(colors.cyan(' codehere plan "refactor authentication"'));
123
- newline();
124
- return;
125
- }
126
- // Group by type
127
- const byType = {};
128
- const byImportance = {
129
- high: 0,
130
- medium: 0,
131
- low: 0,
132
- };
133
- let totalImportance = 0;
134
- const now = Date.now();
135
- const oneDayAgo = now - 24 * 60 * 60 * 1000;
136
- const oneWeekAgo = now - 7 * 24 * 60 * 60 * 1000;
137
- let recentCount = 0;
138
- let weekCount = 0;
139
- memories.forEach(m => {
140
- byType[m.type] = (byType[m.type] || 0) + 1;
141
- if (m.importance >= 7)
142
- byImportance.high++;
143
- else if (m.importance >= 4)
144
- byImportance.medium++;
145
- else
146
- byImportance.low++;
147
- totalImportance += m.importance;
148
- const timestamp = m.timestamp instanceof Date ? m.timestamp.getTime() : m.timestamp;
149
- if (timestamp > oneDayAgo)
150
- recentCount++;
151
- if (timestamp > oneWeekAgo)
152
- weekCount++;
153
- });
154
- const avgImportance = totalImportance / memories.length;
155
- console.log(colors.bold('Overview:'));
156
- console.log(` Total Memories: ${colors.cyan(formatNumber(memories.length))}`);
157
- console.log(` Average Importance: ${colors.cyan(avgImportance.toFixed(1))}/10`);
158
- console.log(` Recent (24h): ${colors.cyan(formatNumber(recentCount))}`);
159
- console.log(` This Week: ${colors.cyan(formatNumber(weekCount))}`);
160
- newline();
161
- console.log(colors.bold('By Type:'));
162
- Object.entries(byType)
163
- .sort((a, b) => b[1] - a[1])
164
- .forEach(([type, count]) => {
165
- const percentage = ((count / memories.length) * 100).toFixed(1);
166
- console.log(` ${colors.cyan(type.padEnd(12))} ${formatNumber(count).padStart(6)} (${percentage}%)`);
167
- });
168
- newline();
169
- console.log(colors.bold('By Importance:'));
170
- console.log(` High (7-10): ${colors.green(formatNumber(byImportance.high))}`);
171
- console.log(` Medium (4-6): ${colors.yellow(formatNumber(byImportance.medium))}`);
172
- console.log(` Low (1-3): ${colors.dim(formatNumber(byImportance.low))}`);
173
- newline();
174
- // Show Responsible AI indicator
175
- console.log(separator('─', 60));
176
- console.log(colors.dim('🔒 Privacy: All memories stored locally in SQLite'));
177
- console.log(colors.dim('📊 Data: No external transmission, your codebase stays private'));
178
- newline();
179
- }
180
- async function showMemoryList(memories, limit, json) {
181
- if (json) {
182
- // P0 FIX: Ensure pure JSON output with provider field
183
- const { container } = await import('../../../application/services/dependency-container.js');
184
- const provider = container.aiService.provider?.name || container.aiService.provider?.id || 'unknown';
185
- const output = {
186
- provider,
187
- memories: memories.slice(0, limit).map(m => ({
188
- id: m.id,
189
- type: m.type,
190
- description: m.description,
191
- importance: m.importance,
192
- timestamp: m.timestamp instanceof Date ? m.timestamp.toISOString() : new Date(m.timestamp).toISOString(),
193
- lastAccessed: m.lastAccessed instanceof Date ? m.lastAccessed.toISOString() : new Date(m.lastAccessed).toISOString(),
194
- })),
195
- };
196
- console.log(JSON.stringify(output, null, 2));
197
- return;
198
- }
199
- console.log(createBanner('Memory List', 'What Codehere remembers'));
200
- newline();
201
- if (memories.length === 0) {
202
- console.log(info('No memories found.'));
203
- console.log(colors.dim('Memories are created as you use Codehere.'));
204
- newline();
205
- return;
206
- }
207
- const displayMemories = memories.slice(0, limit);
208
- console.log(colors.bold(`Showing ${displayMemories.length} of ${memories.length} memories:`));
209
- newline();
210
- displayMemories.forEach((memory, index) => {
211
- const timestamp = memory.timestamp instanceof Date ? memory.timestamp : new Date(memory.timestamp);
212
- const timeAgo = getTimeAgo(timestamp);
213
- const importanceColor = memory.importance >= 7 ? colors.green : memory.importance >= 4 ? colors.yellow : colors.dim;
214
- console.log(separator('─', 60));
215
- console.log(`${colors.bold(`[${index + 1}]`)} ${colors.cyan(memory.type.toUpperCase())} ${importanceColor(`(importance: ${memory.importance}/10)`)}`);
216
- console.log(colors.dim(` ${timeAgo}`));
217
- console.log(` ${memory.description}`);
218
- if (memory.metadata) {
219
- const metadata = typeof memory.metadata === 'string' ? JSON.parse(memory.metadata) : memory.metadata;
220
- if (metadata.codebasePath) {
221
- console.log(colors.dim(` Codebase: ${metadata.codebasePath}`));
222
- }
223
- }
224
- });
225
- if (memories.length > limit) {
226
- newline();
227
- console.log(colors.dim(`... and ${memories.length - limit} more memories`));
228
- console.log(colors.dim(`Use --limit <number> to see more`));
229
- }
230
- newline();
231
- console.log(separator('─', 60));
232
- console.log(colors.dim('💡 Tip: Use "codehere memory --search <term>" to search memories'));
233
- console.log(colors.dim('🔒 Privacy: All memories stored locally, never transmitted'));
234
- newline();
235
- }
236
- function getTimeAgo(date) {
237
- const now = Date.now();
238
- const then = date.getTime();
239
- const diff = now - then;
240
- const seconds = Math.floor(diff / 1000);
241
- const minutes = Math.floor(seconds / 60);
242
- const hours = Math.floor(minutes / 60);
243
- const days = Math.floor(hours / 24);
244
- if (days > 0)
245
- return `${days} day${days > 1 ? 's' : ''} ago`;
246
- if (hours > 0)
247
- return `${hours} hour${hours > 1 ? 's' : ''} ago`;
248
- if (minutes > 0)
249
- return `${minutes} minute${minutes > 1 ? 's' : ''} ago`;
250
- return 'just now';
251
- }
252
- //# sourceMappingURL=memory-command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/memory-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EAEN,YAAY,EACZ,OAAO,EACP,SAAS,EAET,YAAY,EAEZ,OAAO,EACP,IAAI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* as readline from 'readline';
6
- export interface CommandHistory {
7
- commands: string[];
8
- currentIndex: number;
9
- searchTerm: string;
10
- isSearching: boolean;
11
- }
12
- /**
13
- * Setup enhanced keyboard navigation for readline interface
14
- */
15
- export declare function setupKeyboardNavigation(rl: readline.Interface, history: string[]): CommandHistory;
16
- /**
17
- * Get keyboard shortcuts help text
18
- */
19
- export declare function getKeyboardShortcutsHelp(): string;
20
- /**
21
- * Enhanced readline configuration with history support
22
- */
23
- export declare function createEnhancedReadline(config?: {
24
- prompt?: string;
25
- history?: string[];
26
- }): readline.Interface;
27
- //# sourceMappingURL=keyboard-shortcuts.d.ts.map