codehere 0.3.0 → 0.5.0-alpha.0

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 (389) hide show
  1. package/README.md +230 -42
  2. package/dist/application/agents/documentation-agent.d.ts +24 -0
  3. package/dist/application/agents/documentation-agent.d.ts.map +1 -0
  4. package/dist/application/agents/documentation-agent.js +399 -0
  5. package/dist/application/agents/documentation-agent.js.map +1 -0
  6. package/dist/application/agents/execution-agent.d.ts +11 -0
  7. package/dist/application/agents/execution-agent.d.ts.map +1 -1
  8. package/dist/application/agents/execution-agent.js +289 -80
  9. package/dist/application/agents/execution-agent.js.map +1 -1
  10. package/dist/application/agents/multi-agent-orchestrator.d.ts +3 -0
  11. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
  12. package/dist/application/agents/multi-agent-orchestrator.js +86 -0
  13. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
  14. package/dist/application/agents/planning-agent.d.ts +3 -0
  15. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  16. package/dist/application/agents/planning-agent.js +146 -70
  17. package/dist/application/agents/planning-agent.js.map +1 -1
  18. package/dist/application/agents/product-requirements-agent.d.ts +21 -0
  19. package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
  20. package/dist/application/agents/product-requirements-agent.js +247 -0
  21. package/dist/application/agents/product-requirements-agent.js.map +1 -0
  22. package/dist/application/agents/validation-agent.d.ts +5 -1
  23. package/dist/application/agents/validation-agent.d.ts.map +1 -1
  24. package/dist/application/agents/validation-agent.js +156 -21
  25. package/dist/application/agents/validation-agent.js.map +1 -1
  26. package/dist/application/services/dependency-container.d.ts +46 -2
  27. package/dist/application/services/dependency-container.d.ts.map +1 -1
  28. package/dist/application/services/dependency-container.js +177 -7
  29. package/dist/application/services/dependency-container.js.map +1 -1
  30. package/dist/application/services/intelligent-router.d.ts +13 -0
  31. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  32. package/dist/application/services/intelligent-router.js +306 -90
  33. package/dist/application/services/intelligent-router.js.map +1 -1
  34. package/dist/application/use-cases/ask-question-use-case.d.ts +19 -0
  35. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
  36. package/dist/application/use-cases/ask-question-use-case.js +125 -46
  37. package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
  38. package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
  39. package/dist/application/use-cases/edit-file-use-case.js +16 -1
  40. package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
  41. package/dist/domain/entities/documentation.d.ts +35 -0
  42. package/dist/domain/entities/documentation.d.ts.map +1 -0
  43. package/dist/domain/entities/documentation.js +6 -0
  44. package/dist/domain/entities/documentation.js.map +1 -0
  45. package/dist/domain/entities/product-requirements.d.ts +50 -0
  46. package/dist/domain/entities/product-requirements.d.ts.map +1 -0
  47. package/dist/domain/entities/product-requirements.js +6 -0
  48. package/dist/domain/entities/product-requirements.js.map +1 -0
  49. package/dist/domain/entities/task.d.ts +152 -0
  50. package/dist/domain/entities/task.d.ts.map +1 -0
  51. package/dist/domain/entities/task.js +61 -0
  52. package/dist/domain/entities/task.js.map +1 -0
  53. package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
  54. package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
  55. package/dist/domain/errors/embeddings-not-found-error.js +13 -0
  56. package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
  57. package/dist/domain/interfaces/agent.interface.d.ts +15 -0
  58. package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
  59. package/dist/domain/interfaces/agent.interface.js +6 -0
  60. package/dist/domain/interfaces/agent.interface.js.map +1 -0
  61. package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
  62. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
  63. package/dist/domain/services/environment-mode-manager.d.ts +12 -0
  64. package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
  65. package/dist/domain/services/environment-mode-manager.js +22 -0
  66. package/dist/domain/services/environment-mode-manager.js.map +1 -0
  67. package/dist/domain/services/risk-tier-detector.d.ts +17 -0
  68. package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
  69. package/dist/domain/services/risk-tier-detector.js +78 -0
  70. package/dist/domain/services/risk-tier-detector.js.map +1 -0
  71. package/dist/embed.d.ts.map +1 -1
  72. package/dist/embed.js +18 -8
  73. package/dist/embed.js.map +1 -1
  74. package/dist/formatter.d.ts.map +1 -1
  75. package/dist/formatter.js +10 -3
  76. package/dist/formatter.js.map +1 -1
  77. package/dist/index.js +398 -164
  78. package/dist/index.js.map +1 -1
  79. package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
  80. package/dist/infrastructure/ai/cohere-ai-service.js +18 -5
  81. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  82. package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
  83. package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
  84. package/dist/infrastructure/ai/fake-ai-service.js +59 -0
  85. package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
  86. package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
  87. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
  88. package/dist/infrastructure/ai/provider-ai-service.js +477 -0
  89. package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
  90. package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
  91. package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
  92. package/dist/infrastructure/cache/embedding-cache.js +80 -9
  93. package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
  94. package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
  95. package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
  96. package/dist/infrastructure/cache/query-result-cache.js +40 -112
  97. package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
  98. package/dist/infrastructure/cache/response-cache.d.ts +18 -0
  99. package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
  100. package/dist/infrastructure/cache/response-cache.js +48 -0
  101. package/dist/infrastructure/cache/response-cache.js.map +1 -0
  102. package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
  103. package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
  104. package/dist/infrastructure/cache/security-scan-cache.js +25 -102
  105. package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
  106. package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
  107. package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
  108. package/dist/infrastructure/completion/bash-completion.js +11 -87
  109. package/dist/infrastructure/completion/bash-completion.js.map +1 -1
  110. package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
  111. package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
  112. package/dist/infrastructure/completion/fish-completion.js +15 -58
  113. package/dist/infrastructure/completion/fish-completion.js.map +1 -1
  114. package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
  115. package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
  116. package/dist/infrastructure/completion/zsh-completion.js +18 -73
  117. package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
  118. package/dist/infrastructure/config/config-manager.js +2 -2
  119. package/dist/infrastructure/config/config-manager.js.map +1 -1
  120. package/dist/infrastructure/context/conversation-context.d.ts +54 -0
  121. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
  122. package/dist/infrastructure/context/conversation-context.js +128 -0
  123. package/dist/infrastructure/context/conversation-context.js.map +1 -0
  124. package/dist/infrastructure/context/session-manager.d.ts +42 -0
  125. package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
  126. package/dist/infrastructure/context/session-manager.js +94 -0
  127. package/dist/infrastructure/context/session-manager.js.map +1 -0
  128. package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
  129. package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
  130. package/dist/infrastructure/cost/cost-tracker.js +12 -5
  131. package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
  132. package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
  133. package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
  134. package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
  135. package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
  136. package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
  137. package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
  138. package/dist/infrastructure/governance/policy-as-code.js +6 -8
  139. package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
  140. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
  141. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
  142. package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
  143. package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
  144. package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
  145. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
  146. package/dist/infrastructure/providers/cohere-provider.js +444 -0
  147. package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
  148. package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
  149. package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
  150. package/dist/infrastructure/providers/fake-provider.js +130 -0
  151. package/dist/infrastructure/providers/fake-provider.js.map +1 -0
  152. package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
  153. package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
  154. package/dist/infrastructure/providers/local-llm-provider.js +330 -0
  155. package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
  156. package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
  157. package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
  158. package/dist/infrastructure/providers/model-config.types.js +9 -0
  159. package/dist/infrastructure/providers/model-config.types.js.map +1 -0
  160. package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
  161. package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
  162. package/dist/infrastructure/providers/model-provider.interface.js +8 -0
  163. package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
  164. package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
  165. package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
  166. package/dist/infrastructure/providers/openai-provider.js +413 -0
  167. package/dist/infrastructure/providers/openai-provider.js.map +1 -0
  168. package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
  169. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
  170. package/dist/infrastructure/providers/openrouter-provider.js +399 -0
  171. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
  172. package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
  173. package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
  174. package/dist/infrastructure/providers/operation-provider-resolver.js +105 -0
  175. package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
  176. package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
  177. package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
  178. package/dist/infrastructure/providers/provider-config-loader.js +120 -0
  179. package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
  180. package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
  181. package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
  182. package/dist/infrastructure/providers/provider-registry.js +88 -0
  183. package/dist/infrastructure/providers/provider-registry.js.map +1 -0
  184. package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
  185. package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
  186. package/dist/infrastructure/serialization/toon-serializer.js +119 -0
  187. package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
  188. package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
  189. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
  190. package/dist/infrastructure/storage/embeddings-path.js +37 -0
  191. package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
  192. package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
  193. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  194. package/dist/infrastructure/storage/plan-repository.js +36 -73
  195. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  196. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
  197. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
  198. package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
  199. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
  200. package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
  201. package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
  202. package/dist/infrastructure/storage/task-helpers.js +197 -0
  203. package/dist/infrastructure/storage/task-helpers.js.map +1 -0
  204. package/dist/infrastructure/storage/task-repository.d.ts +67 -0
  205. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
  206. package/dist/infrastructure/storage/task-repository.js +205 -0
  207. package/dist/infrastructure/storage/task-repository.js.map +1 -0
  208. package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
  209. package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
  210. package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
  211. package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
  212. package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
  213. package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
  214. package/dist/infrastructure/ux/capability-boundaries.js +42 -0
  215. package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
  216. package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
  217. package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
  218. package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
  219. package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
  220. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
  221. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
  222. package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
  223. package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
  224. package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
  225. package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
  226. package/dist/infrastructure/ux/feature-discovery.js +5 -181
  227. package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
  228. package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
  229. package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
  230. package/dist/infrastructure/ux/feedback-prompt.js +45 -0
  231. package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
  232. package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
  233. package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
  234. package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
  235. package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
  236. package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
  237. package/dist/infrastructure/ux/hitl-validation.js +86 -0
  238. package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
  239. package/dist/infrastructure/ux/progress-indicator.d.ts +4 -5
  240. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  241. package/dist/infrastructure/ux/progress-indicator.js +35 -40
  242. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  243. package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
  244. package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
  245. package/dist/infrastructure/ux/proportional-friction.js +200 -0
  246. package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
  247. package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
  248. package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
  249. package/dist/infrastructure/ux/review-checkpoint.js +33 -80
  250. package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
  251. package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
  252. package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
  253. package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
  254. package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
  255. package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
  256. package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
  257. package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
  258. package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
  259. package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
  260. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
  261. package/dist/infrastructure/validation/agent-feedback.js +55 -0
  262. package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
  263. package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
  264. package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
  265. package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
  266. package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
  267. package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
  268. package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
  269. package/dist/infrastructure/validation/feedback-stats.js +173 -0
  270. package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
  271. package/dist/infrastructure/validation/review-handler.d.ts +26 -0
  272. package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
  273. package/dist/infrastructure/validation/review-handler.js +40 -0
  274. package/dist/infrastructure/validation/review-handler.js.map +1 -0
  275. package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
  276. package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
  277. package/dist/infrastructure/validation/summary-aggregator.js +70 -0
  278. package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
  279. package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
  280. package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
  281. package/dist/infrastructure/validation/summary-extractor.js +45 -0
  282. package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
  283. package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
  284. package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
  285. package/dist/infrastructure/validation/trace-summary.js +52 -0
  286. package/dist/infrastructure/validation/trace-summary.js.map +1 -0
  287. package/dist/infrastructure/validation/trust-config.d.ts +27 -0
  288. package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
  289. package/dist/infrastructure/validation/trust-config.js +113 -0
  290. package/dist/infrastructure/validation/trust-config.js.map +1 -0
  291. package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
  292. package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
  293. package/dist/infrastructure/xai/attention-visualizer.js +6 -8
  294. package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
  295. package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
  296. package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
  297. package/dist/infrastructure/xai/cot-visualizer.js +6 -9
  298. package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
  299. package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
  300. package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
  301. package/dist/infrastructure/xai/decision-tree-log.js +6 -10
  302. package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
  303. package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
  304. package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
  305. package/dist/infrastructure/xai/interactive-xai.js +6 -8
  306. package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
  307. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
  308. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
  309. package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
  310. package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
  311. package/dist/monitoring.d.ts +1 -1
  312. package/dist/monitoring.d.ts.map +1 -1
  313. package/dist/monitoring.js +12 -9
  314. package/dist/monitoring.js.map +1 -1
  315. package/dist/parallel-processor.d.ts.map +1 -1
  316. package/dist/parallel-processor.js +124 -45
  317. package/dist/parallel-processor.js.map +1 -1
  318. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  319. package/dist/presentation/cli/commands/ask-command.js +225 -86
  320. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  321. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  322. package/dist/presentation/cli/commands/config-command.js +8 -6
  323. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  324. package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
  325. package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
  326. package/dist/presentation/cli/commands/docs-command.js +25 -0
  327. package/dist/presentation/cli/commands/docs-command.js.map +1 -0
  328. package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
  329. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
  330. package/dist/presentation/cli/commands/fix-command.js +53 -0
  331. package/dist/presentation/cli/commands/fix-command.js.map +1 -0
  332. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
  333. package/dist/presentation/cli/commands/help-command.js +2 -0
  334. package/dist/presentation/cli/commands/help-command.js.map +1 -1
  335. package/dist/presentation/cli/commands/models-command.d.ts +13 -0
  336. package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
  337. package/dist/presentation/cli/commands/models-command.js +194 -0
  338. package/dist/presentation/cli/commands/models-command.js.map +1 -0
  339. package/dist/presentation/cli/commands/orchestrate-command.d.ts +1 -0
  340. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  341. package/dist/presentation/cli/commands/orchestrate-command.js +68 -7
  342. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  343. package/dist/presentation/cli/commands/plan-command.d.ts +1 -0
  344. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  345. package/dist/presentation/cli/commands/plan-command.js +88 -8
  346. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  347. package/dist/presentation/cli/commands/product-command.d.ts +14 -0
  348. package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
  349. package/dist/presentation/cli/commands/product-command.js +22 -0
  350. package/dist/presentation/cli/commands/product-command.js.map +1 -0
  351. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
  352. package/dist/presentation/cli/commands/react-command.js +3 -1
  353. package/dist/presentation/cli/commands/react-command.js.map +1 -1
  354. package/dist/presentation/cli/commands/review-command.d.ts +14 -0
  355. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
  356. package/dist/presentation/cli/commands/review-command.js +154 -0
  357. package/dist/presentation/cli/commands/review-command.js.map +1 -0
  358. package/dist/presentation/cli/commands/run-command.d.ts +13 -0
  359. package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
  360. package/dist/presentation/cli/commands/run-command.js +188 -0
  361. package/dist/presentation/cli/commands/run-command.js.map +1 -0
  362. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
  363. package/dist/presentation/cli/commands/setup-command.js +15 -0
  364. package/dist/presentation/cli/commands/setup-command.js.map +1 -1
  365. package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
  366. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
  367. package/dist/presentation/cli/commands/smart-command.js +92 -6
  368. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  369. package/dist/presentation/cli/commands/status-command.d.ts +14 -0
  370. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
  371. package/dist/presentation/cli/commands/status-command.js +167 -0
  372. package/dist/presentation/cli/commands/status-command.js.map +1 -0
  373. package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
  374. package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
  375. package/dist/presentation/cli/commands/suggest-command.js +138 -0
  376. package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
  377. package/dist/presentation/cli/error-display.d.ts.map +1 -1
  378. package/dist/presentation/cli/error-display.js +43 -0
  379. package/dist/presentation/cli/error-display.js.map +1 -1
  380. package/dist/search.d.ts.map +1 -1
  381. package/dist/search.js +6 -1
  382. package/dist/search.js.map +1 -1
  383. package/dist/session.js +19 -2
  384. package/dist/session.js.map +1 -1
  385. package/dist/ui.d.ts +6 -0
  386. package/dist/ui.d.ts.map +1 -1
  387. package/dist/ui.js +43 -6
  388. package/dist/ui.js.map +1 -1
  389. package/package.json +16 -3
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Comprehensive Formatter
3
+ * Format content for CLI display with proper indentation and wrapping
4
+ *
5
+ * Phase 1: v0.5.0-alpha.0
6
+ */
7
+ interface FormatOptions {
8
+ indent?: number;
9
+ maxWidth?: number;
10
+ preserveMarkdown?: boolean;
11
+ }
12
+ /**
13
+ * Format content for CLI display
14
+ */
15
+ export declare function formatContent(content: string, options?: FormatOptions): string;
16
+ /**
17
+ * Format reflection/analysis output
18
+ */
19
+ export declare function formatReflection(reflection: any, options?: FormatOptions): string;
20
+ export {};
21
+ //# sourceMappingURL=comprehensive-formatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comprehensive-formatter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/comprehensive-formatter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAsDlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAiCrF"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Comprehensive Formatter
3
+ * Format content for CLI display with proper indentation and wrapping
4
+ *
5
+ * Phase 1: v0.5.0-alpha.0
6
+ */
7
+ /**
8
+ * Format content for CLI display
9
+ */
10
+ export function formatContent(content, options = {}) {
11
+ const { indent = 0, maxWidth = 76, preserveMarkdown = true, } = options;
12
+ if (!content) {
13
+ return '';
14
+ }
15
+ const indentStr = ' '.repeat(indent);
16
+ const actualMaxWidth = maxWidth - indent;
17
+ // If content is short enough, return as-is with indentation
18
+ if (content.length <= actualMaxWidth && !content.includes('\n')) {
19
+ return indentStr + content;
20
+ }
21
+ // Handle markdown code blocks
22
+ if (preserveMarkdown && content.includes('```')) {
23
+ return formatMarkdownContent(content, indent, actualMaxWidth);
24
+ }
25
+ // Simple word wrapping
26
+ const lines = content.split('\n');
27
+ const wrappedLines = [];
28
+ for (const line of lines) {
29
+ if (line.length <= actualMaxWidth) {
30
+ wrappedLines.push(indentStr + line);
31
+ }
32
+ else {
33
+ // Word wrap
34
+ const words = line.split(/\s+/);
35
+ let currentLine = '';
36
+ for (const word of words) {
37
+ if ((currentLine + word).length <= actualMaxWidth) {
38
+ currentLine += (currentLine ? ' ' : '') + word;
39
+ }
40
+ else {
41
+ if (currentLine) {
42
+ wrappedLines.push(indentStr + currentLine);
43
+ }
44
+ currentLine = word;
45
+ }
46
+ }
47
+ if (currentLine) {
48
+ wrappedLines.push(indentStr + currentLine);
49
+ }
50
+ }
51
+ }
52
+ return wrappedLines.join('\n');
53
+ }
54
+ /**
55
+ * Format reflection/analysis output
56
+ */
57
+ export function formatReflection(reflection, options = {}) {
58
+ if (!reflection) {
59
+ return '';
60
+ }
61
+ if (typeof reflection === 'string') {
62
+ return formatContent(reflection, options);
63
+ }
64
+ if (typeof reflection === 'object') {
65
+ // Format structured reflection
66
+ const parts = [];
67
+ if (reflection.insight) {
68
+ parts.push(`💡 Insight:\n${formatContent(reflection.insight, { ...options, indent: (options.indent || 0) + 2 })}`);
69
+ }
70
+ if (reflection.reasoning) {
71
+ parts.push(`🧠 Reasoning:\n${formatContent(reflection.reasoning, { ...options, indent: (options.indent || 0) + 2 })}`);
72
+ }
73
+ if (reflection.summary) {
74
+ parts.push(`📋 Summary:\n${formatContent(reflection.summary, { ...options, indent: (options.indent || 0) + 2 })}`);
75
+ }
76
+ if (parts.length === 0) {
77
+ return formatContent(JSON.stringify(reflection, null, 2), options);
78
+ }
79
+ return parts.join('\n\n');
80
+ }
81
+ return String(reflection);
82
+ }
83
+ /**
84
+ * Format markdown content with code block preservation
85
+ */
86
+ function formatMarkdownContent(content, indent, maxWidth) {
87
+ const indentStr = ' '.repeat(indent);
88
+ const lines = content.split('\n');
89
+ const formatted = [];
90
+ let inCodeBlock = false;
91
+ let codeBlockLang = '';
92
+ for (const line of lines) {
93
+ if (line.trim().startsWith('```')) {
94
+ inCodeBlock = !inCodeBlock;
95
+ if (inCodeBlock) {
96
+ codeBlockLang = line.trim().substring(3).trim();
97
+ }
98
+ formatted.push(indentStr + line);
99
+ }
100
+ else if (inCodeBlock) {
101
+ // Preserve code blocks as-is
102
+ formatted.push(indentStr + line);
103
+ }
104
+ else {
105
+ // Format regular markdown lines
106
+ if (line.length <= maxWidth) {
107
+ formatted.push(indentStr + line);
108
+ }
109
+ else {
110
+ // Word wrap for non-code content
111
+ formatted.push(formatContent(line, { indent, maxWidth: maxWidth + indent }));
112
+ }
113
+ }
114
+ }
115
+ return formatted.join('\n');
116
+ }
117
+ //# sourceMappingURL=comprehensive-formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comprehensive-formatter.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/comprehensive-formatter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,UAAyB,EAAE;IACxE,MAAM,EACJ,MAAM,GAAG,CAAC,EACV,QAAQ,GAAG,EAAE,EACb,gBAAgB,GA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;YACvB,6BAA6B;YAC7B,SAAS,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,gCAAgC;YAChC,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC;gBAC5B,SAAS,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,iCAAiC;gBACjC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,24 +1,11 @@
1
1
  /**
2
- * Contextual Feature Discovery
3
- * Shows relevant features based on user queries and context - Task 2.2
2
+ * Contextual Feature Discovery (v0.5.0-alpha.0 - Stub)
3
+ * TODO: Implement contextual feature suggestions
4
4
  */
5
5
  export interface ContextualSuggestion {
6
- feature: string;
7
- description: string;
8
- command: string;
9
6
  reason: string;
10
- confidence: number;
7
+ command: string;
8
+ description: string;
11
9
  }
12
- /**
13
- * Analyze query to suggest contextual features
14
- */
15
- export declare function getContextualSuggestions(query: string): ContextualSuggestion[];
16
- /**
17
- * Get contextual feature suggestions based on query limitations
18
- */
19
- export declare function getSuggestionsForLimitation(limitation: string, currentCommand: string): ContextualSuggestion[];
20
- /**
21
- * Check if contextual suggestions should be shown
22
- */
23
- export declare function shouldShowContextualSuggestion(query: string, currentCommand: string): ContextualSuggestion | null;
10
+ export declare function shouldShowContextualSuggestion(query: string, command?: string): ContextualSuggestion | null;
24
11
  //# sourceMappingURL=contextual-feature-discovery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAsH9E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,oBAAoB,EAAE,CA2BxB;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,GACrB,oBAAoB,GAAG,IAAI,CAS7B"}
1
+ {"version":3,"file":"contextual-feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAI3G"}
@@ -1,144 +1,10 @@
1
1
  /**
2
- * Contextual Feature Discovery
3
- * Shows relevant features based on user queries and context - Task 2.2
2
+ * Contextual Feature Discovery (v0.5.0-alpha.0 - Stub)
3
+ * TODO: Implement contextual feature suggestions
4
4
  */
5
- /**
6
- * Analyze query to suggest contextual features
7
- */
8
- export function getContextualSuggestions(query) {
9
- const suggestions = [];
10
- const queryLower = query.toLowerCase();
11
- // Multi-file operations → suggest orchestrate
12
- if ((queryLower.includes('multiple') || queryLower.includes('several') || queryLower.includes('all')) &&
13
- (queryLower.includes('file') || queryLower.includes('module'))) {
14
- suggestions.push({
15
- feature: 'Multi-agent Orchestration',
16
- description: 'Plan and execute complex multi-step tasks across multiple files',
17
- command: 'codehere orchestrate "your goal"',
18
- reason: 'Your query involves multiple files/modules',
19
- confidence: 0.8,
20
- });
21
- }
22
- // Complex refactoring → suggest plan
23
- if (queryLower.includes('refactor') &&
24
- (queryLower.includes('large') || queryLower.includes('complex') || queryLower.includes('multiple'))) {
25
- suggestions.push({
26
- feature: 'Planning Mode',
27
- description: 'Generate hierarchical plans for large refactoring tasks',
28
- command: 'codehere plan "refactor goal"',
29
- reason: 'Complex refactoring tasks benefit from structured planning',
30
- confidence: 0.9,
31
- });
32
- }
33
- // Debugging/problem solving → suggest react
34
- if (queryLower.includes('debug') ||
35
- queryLower.includes('fix') ||
36
- queryLower.includes('error') ||
37
- queryLower.includes('issue') ||
38
- queryLower.includes('problem') ||
39
- queryLower.includes('why') ||
40
- queryLower.includes('why is')) {
41
- suggestions.push({
42
- feature: 'ReAct Reasoning',
43
- description: 'Debug and solve complex problems step-by-step with reasoning',
44
- command: 'codehere react "your problem"',
45
- reason: 'Step-by-step reasoning helps with debugging',
46
- confidence: 0.85,
47
- });
48
- }
49
- // Security-related → suggest security commands
50
- if (queryLower.includes('security') ||
51
- queryLower.includes('vulnerability') ||
52
- queryLower.includes('vulnerabilities') ||
53
- queryLower.includes('secure') ||
54
- queryLower.includes('audit')) {
55
- suggestions.push({
56
- feature: 'Security Scanning',
57
- description: 'Codehere automatically scans for security issues. Use edit command to fix them.',
58
- command: 'codehere "fix security issues in auth.ts"',
59
- reason: 'Security-focused queries benefit from comprehensive scanning',
60
- confidence: 0.9,
61
- });
62
- }
63
- // Knowledge/documentation → suggest knowledge commands
64
- if (queryLower.includes('document') ||
65
- queryLower.includes('knowledge') ||
66
- queryLower.includes('learn') ||
67
- queryLower.includes('pattern') ||
68
- queryLower.includes('remember')) {
69
- suggestions.push({
70
- feature: 'Knowledge Management',
71
- description: 'Query and manage preserved knowledge about your codebase',
72
- command: 'codehere knowledge query "your query"',
73
- reason: 'Knowledge management helps with documentation and learning',
74
- confidence: 0.8,
75
- });
76
- }
77
- // Performance optimization → suggest trace/learning
78
- if (queryLower.includes('performance') ||
79
- queryLower.includes('optimize') ||
80
- queryLower.includes('slow') ||
81
- queryLower.includes('faster')) {
82
- suggestions.push({
83
- feature: 'Execution Tracing',
84
- description: 'Analyze execution patterns to understand performance',
85
- command: 'codehere trace list',
86
- reason: 'Tracing helps identify performance bottlenecks',
87
- confidence: 0.75,
88
- });
89
- }
90
- // Configuration/setup → suggest config commands
91
- if (queryLower.includes('config') ||
92
- queryLower.includes('setting') ||
93
- queryLower.includes('preference') ||
94
- queryLower.includes('setup')) {
95
- suggestions.push({
96
- feature: 'Configuration Management',
97
- description: 'Manage preferences and settings',
98
- command: 'codehere config',
99
- reason: 'Configuration queries can be handled directly',
100
- confidence: 0.95,
101
- });
102
- }
103
- return suggestions.sort((a, b) => b.confidence - a.confidence); // Sort by confidence
104
- }
105
- /**
106
- * Get contextual feature suggestions based on query limitations
107
- */
108
- export function getSuggestionsForLimitation(limitation, currentCommand) {
109
- const suggestions = [];
110
- const limitationLower = limitation.toLowerCase();
111
- // If limitation mentions multi-file, suggest orchestrate
112
- if (limitationLower.includes('multi-file') || limitationLower.includes('multiple files')) {
113
- suggestions.push({
114
- feature: 'Multi-agent Orchestration',
115
- description: 'Handle complex multi-file operations with planning',
116
- command: 'codehere orchestrate "your goal"',
117
- reason: 'Orchestrate mode handles multi-file operations better',
118
- confidence: 0.9,
119
- });
120
- }
121
- // If limitation mentions complexity, suggest plan
122
- if (limitationLower.includes('complex') || limitationLower.includes('complicated')) {
123
- suggestions.push({
124
- feature: 'Planning Mode',
125
- description: 'Break down complex tasks into manageable steps',
126
- command: 'codehere plan "your goal"',
127
- reason: 'Planning mode helps with complex tasks',
128
- confidence: 0.85,
129
- });
130
- }
131
- return suggestions;
132
- }
133
- /**
134
- * Check if contextual suggestions should be shown
135
- */
136
- export function shouldShowContextualSuggestion(query, currentCommand) {
137
- const suggestions = getContextualSuggestions(query);
138
- // Only show top suggestion if confidence is high enough
139
- if (suggestions.length > 0 && suggestions[0].confidence >= 0.75) {
140
- return suggestions[0];
141
- }
5
+ export function shouldShowContextualSuggestion(query, command) {
6
+ // In alpha, return null (no suggestions)
7
+ // Can be enhanced later with heuristics
142
8
  return null;
143
9
  }
144
10
  //# sourceMappingURL=contextual-feature-discovery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-feature-discovery.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACpD,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAEvC,8CAA8C;IAC9C,IACE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACjG,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAC9D,CAAC;QACD,WAAW,CAAC,IAAI,CAAC;YACf,OAAO,EAAE,2BAA2B;YACpC,WAAW,EAAE,iEAAiE;YAC9E,OAAO,EAAE,kCAAkC;YAC3C,MAAM,EAAE,4CAA4C;YACpD,UAAU,EAAE,GAAG;SAChB,CAAC,CAAC;IACL,CAAC;IAED,qCAAqC;IACrC,IACE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC/B,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EACnG,CAAC;QACD,WAAW,CAAC,IAAI,CAA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overy.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,UAAU,8BAA8B,CAAC,KAAa,EAAE,OAAgB;IAC5E,yCAAyC;IACzC,wCAAwC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,22 +1,9 @@
1
1
  /**
2
- * Feature Discovery System
3
- * Shows contextual feature discovery prompts based on user activity
2
+ * Feature Discovery (v0.5.0-alpha.0 - Stub)
3
+ * TODO: Implement feature discovery system
4
4
  */
5
- export interface OnboardingState {
6
- onboardingComplete: boolean;
7
- onboardingDate?: string;
8
- commandCount: number;
9
- featuresDiscovered: string[];
10
- lastDiscoveryShown?: string;
11
- lastDiscoveryDate?: string;
12
- }
13
5
  export interface FeatureDiscovery {
14
6
  id: string;
15
- trigger: {
16
- commandCount?: number;
17
- commands?: string[];
18
- condition?: (state: OnboardingState) => boolean;
19
- };
20
7
  message: string;
21
8
  features: Array<{
22
9
  name: string;
@@ -24,24 +11,7 @@ export interface FeatureDiscovery {
24
11
  command: string;
25
12
  }>;
26
13
  }
27
- /**
28
- * Track command usage
29
- */
30
14
  export declare function trackCommand(command: string): void;
31
- /**
32
- * Check if feature discovery should be shown
33
- */
34
15
  export declare function shouldShowFeatureDiscovery(command: string): FeatureDiscovery | null;
35
- /**
36
- * Mark feature discovery as shown
37
- */
38
- export declare function markFeatureDiscoveryShown(discoveryId: string): void;
39
- /**
40
- * Check if user is first-time (onboarding not complete)
41
- */
42
- export declare function isFirstTimeUser(): boolean;
43
- /**
44
- * Get command count for analytics
45
- */
46
- export declare function getCommandCount(): number;
16
+ export declare function markFeatureDiscoveryShown(id: string): void;
47
17
  //# sourceMappingURL=feature-discovery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,eAAe;I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AAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAEnF;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE1D"}
@@ -1,190 +1,14 @@
1
1
  /**
2
- * Feature Discovery System
3
- * Shows contextual feature discovery prompts based on user activity
4
- */
5
- import { readFileSync, existsSync, writeFileSync, mkdirSync } from 'fs';
6
- import { join } from 'path';
7
- const DISCOVERY_FEATURES = [
8
- {
9
- id: 'basic-commands',
10
- trigger: { commandCount: 3 },
11
- message: 'You\'ve mastered the basics! Try these next:',
12
- features: [
13
- {
14
- name: 'Multi-agent Orchestration',
15
- description: 'Plan and execute complex multi-step tasks',
16
- command: 'codehere orchestrate "your goal"',
17
- },
18
- {
19
- name: 'ReAct Reasoning',
20
- description: 'Debug and solve complex problems step-by-step',
21
- command: 'codehere react "your problem"',
22
- },
23
- {
24
- name: 'Planning',
25
- description: 'Generate hierarchical plans for large tasks',
26
- command: 'codehere plan "your goal"',
27
- },
28
- ],
29
- },
30
- {
31
- id: 'advanced-features',
32
- trigger: { commandCount: 5 },
33
- message: 'Ready for advanced features? Discover more:',
34
- features: [
35
- {
36
- name: 'Execution Tracing',
37
- description: 'View and reproduce agent execution traces',
38
- command: 'codehere trace show <runId>',
39
- },
40
- {
41
- name: 'Knowledge Management',
42
- description: 'Query and manage preserved knowledge',
43
- command: 'codehere knowledge query "your query"',
44
- },
45
- {
46
- name: 'Learning Dashboard',
47
- description: 'View patterns and insights learned',
48
- command: 'codehere learning overview',
49
- },
50
- ],
51
- },
52
- {
53
- id: 'config-management',
54
- trigger: { commands: ['ask', 'explain', 'edit'] },
55
- message: 'Customize your experience:',
56
- features: [
57
- {
58
- name: 'Configuration',
59
- description: 'Manage preferences and settings',
60
- command: 'codehere config',
61
- },
62
- {
63
- name: 'Auto-completion',
64
- description: 'Install shell completion for faster commands',
65
- command: 'codehere completion bash',
66
- },
67
- ],
68
- },
69
- ];
70
- /**
71
- * Get onboarding state from file
72
- */
73
- function getOnboardingState() {
74
- try {
75
- const configDir = join(process.cwd(), 'data');
76
- const onboardingPath = join(configDir, 'onboarding.json');
77
- if (existsSync(onboardingPath)) {
78
- const state = JSON.parse(readFileSync(onboardingPath, 'utf-8'));
79
- return {
80
- onboardingComplete: state.onboardingComplete || false,
81
- onboardingDate: state.onboardingDate,
82
- commandCount: state.commandCount || 0,
83
- featuresDiscovered: state.featuresDiscovered || [],
84
- lastDiscoveryShown: state.lastDiscoveryShown,
85
- lastDiscoveryDate: state.lastDiscoveryDate,
86
- };
87
- }
88
- }
89
- catch {
90
- // Ignore errors
91
- }
92
- return {
93
- onboardingComplete: false,
94
- commandCount: 0,
95
- featuresDiscovered: [],
96
- };
97
- }
98
- /**
99
- * Save onboarding state
100
- */
101
- function saveOnboardingState(state) {
102
- try {
103
- const configDir = join(process.cwd(), 'data');
104
- if (!existsSync(configDir)) {
105
- mkdirSync(configDir, { recursive: true });
106
- }
107
- const onboardingPath = join(configDir, 'onboarding.json');
108
- writeFileSync(onboardingPath, JSON.stringify(state, null, 2));
109
- }
110
- catch {
111
- // Ignore errors - non-critical
112
- }
113
- }
114
- /**
115
- * Track command usage
2
+ * Feature Discovery (v0.5.0-alpha.0 - Stub)
3
+ * TODO: Implement feature discovery system
116
4
  */
117
5
  export function trackCommand(command) {
118
- const state = getOnboardingState();
119
- state.commandCount = (state.commandCount || 0) + 1;
120
- // Track feature discovery
121
- if (!state.featuresDiscovered.includes(command)) {
122
- state.featuresDiscovered.push(command);
123
- }
124
- saveOnboardingState(state);
6
+ // Stub implementation
125
7
  }
126
- /**
127
- * Check if feature discovery should be shown
128
- */
129
8
  export function shouldShowFeatureDiscovery(command) {
130
- const state = getOnboardingState();
131
- // Don't show if onboarding not complete
132
- if (!state.onboardingComplete) {
133
- return null;
134
- }
135
- // Don't show discovery too frequently (once per day max)
136
- const lastDate = state.lastDiscoveryDate;
137
- if (lastDate) {
138
- const lastShown = new Date(lastDate);
139
- const now = new Date();
140
- const daysSince = (now.getTime() - lastShown.getTime()) / (1000 * 60 * 60 * 24);
141
- if (daysSince < 1) {
142
- return null; // Already shown today
143
- }
144
- }
145
- // Check each discovery feature
146
- for (const discovery of DISCOVERY_FEATURES) {
147
- // Skip if already shown
148
- if (state.lastDiscoveryShown === discovery.id) {
149
- continue;
150
- }
151
- const trigger = discovery.trigger;
152
- // Check command count trigger
153
- if (trigger.commandCount && state.commandCount >= trigger.commandCount) {
154
- return discovery;
155
- }
156
- // Check commands trigger
157
- if (trigger.commands && trigger.commands.includes(command)) {
158
- return discovery;
159
- }
160
- // Check custom condition
161
- if (trigger.condition && trigger.condition(state)) {
162
- return discovery;
163
- }
164
- }
165
9
  return null;
166
10
  }
167
- /**
168
- * Mark feature discovery as shown
169
- */
170
- export function markFeatureDiscoveryShown(discoveryId) {
171
- const state = getOnboardingState();
172
- state.lastDiscoveryShown = discoveryId;
173
- state.lastDiscoveryDate = new Date().toISOString();
174
- saveOnboardingState(state);
175
- }
176
- /**
177
- * Check if user is first-time (onboarding not complete)
178
- */
179
- export function isFirstTimeUser() {
180
- const state = getOnboardingState();
181
- return !state.onboardingComplete;
182
- }
183
- /**
184
- * Get command count for analytics
185
- */
186
- export function getCommandCount() {
187
- const state = getOnboardingState();
188
- return state.commandCount || 0;
11
+ export function markFeatureDiscoveryShown(id) {
12
+ // Stub implementation
189
13
  }
190
14
  //# sourceMappingURL=feature-discovery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-discovery.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI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C;AACjC,CAAC"}
1
+ {"version":3,"file":"feature-discovery.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,sBAAsB;AACxB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,EAAU;IAClD,sBAAsB;AACxB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Feedback Prompt
3
+ * Collect and store user feedback for bidirectional learning
4
+ *
5
+ * Phase 1: v0.5.0-alpha.0
6
+ */
7
+ interface FeedbackContext {
8
+ query?: string;
9
+ response?: string;
10
+ sessionId?: string;
11
+ operation?: string;
12
+ }
13
+ /**
14
+ * Prompt user for feedback (non-blocking, returns null if user skips)
15
+ */
16
+ export declare function promptForFeedback(operation: string, context: FeedbackContext): Promise<string | null>;
17
+ /**
18
+ * Store feedback in the learning system
19
+ */
20
+ export declare function storeFeedback(learningSystem: any, userId: string, feedback: string, metadata: FeedbackContext): void;
21
+ /**
22
+ * Display feedback confirmation message
23
+ */
24
+ export declare function displayFeedbackConfirmation(feedback: string): void;
25
+ export {};
26
+ //# sourceMappingURL=feedback-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback-prompt.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/feedback-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIxB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,cAAc,EAAE,GAAG,EACnB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,eAAe,GACxB,IAAI,CAmBN;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAGlE"}