codehere 0.4.0 → 0.5.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +113 -30
  3. package/dist/application/agents/execution-agent.js +2 -2
  4. package/dist/application/agents/execution-agent.js.map +1 -1
  5. package/dist/application/agents/multi-agent-orchestrator.d.ts +1 -0
  6. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
  7. package/dist/application/agents/multi-agent-orchestrator.js +10 -3
  8. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
  9. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  10. package/dist/application/agents/planning-agent.js +22 -10
  11. package/dist/application/agents/planning-agent.js.map +1 -1
  12. package/dist/application/agents/validation-agent.js +2 -2
  13. package/dist/application/agents/validation-agent.js.map +1 -1
  14. package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
  15. package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
  16. package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
  17. package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
  18. package/dist/application/reasoning/reasoning-config.d.ts +15 -0
  19. package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
  20. package/dist/application/reasoning/reasoning-config.js +50 -0
  21. package/dist/application/reasoning/reasoning-config.js.map +1 -0
  22. package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
  23. package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
  24. package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
  25. package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
  26. package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
  27. package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
  28. package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
  29. package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
  30. package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
  31. package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
  32. package/dist/application/reasoning/role-provider-resolver.js +74 -0
  33. package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
  34. package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
  35. package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
  36. package/dist/application/reasoning/simple-planning-strategy.js +217 -0
  37. package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
  38. package/dist/application/reasoning/types.d.ts +65 -0
  39. package/dist/application/reasoning/types.d.ts.map +1 -0
  40. package/dist/application/reasoning/types.js +6 -0
  41. package/dist/application/reasoning/types.js.map +1 -0
  42. package/dist/application/reasoning/validator-strategy.d.ts +56 -0
  43. package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
  44. package/dist/application/reasoning/validator-strategy.js +103 -0
  45. package/dist/application/reasoning/validator-strategy.js.map +1 -0
  46. package/dist/application/services/dependency-container.d.ts +30 -6
  47. package/dist/application/services/dependency-container.d.ts.map +1 -1
  48. package/dist/application/services/dependency-container.js +96 -44
  49. package/dist/application/services/dependency-container.js.map +1 -1
  50. package/dist/application/services/intelligent-router.d.ts +6 -0
  51. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  52. package/dist/application/services/intelligent-router.js +98 -9
  53. package/dist/application/services/intelligent-router.js.map +1 -1
  54. package/dist/application/use-cases/ask-question-use-case.d.ts +1 -0
  55. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
  56. package/dist/application/use-cases/ask-question-use-case.js +4 -3
  57. package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
  58. package/dist/application/use-cases/planning-use-case.d.ts +14 -1
  59. package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
  60. package/dist/application/use-cases/planning-use-case.js +109 -2
  61. package/dist/application/use-cases/planning-use-case.js.map +1 -1
  62. package/dist/domain/entities/memory.d.ts.map +1 -1
  63. package/dist/domain/entities/task.d.ts +1 -1
  64. package/dist/domain/entities/task.d.ts.map +1 -1
  65. package/dist/domain/entities/task.js +2 -2
  66. package/dist/domain/entities/task.js.map +1 -1
  67. package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
  68. package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
  69. package/dist/domain/errors/embeddings-not-found-error.js +13 -0
  70. package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
  71. package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
  72. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
  73. package/dist/domain/services/environment-mode-manager.d.ts +4 -10
  74. package/dist/domain/services/environment-mode-manager.d.ts.map +1 -1
  75. package/dist/domain/services/environment-mode-manager.js +7 -22
  76. package/dist/domain/services/environment-mode-manager.js.map +1 -1
  77. package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
  78. package/dist/domain/services/query-intent-classifier.js +20 -1
  79. package/dist/domain/services/query-intent-classifier.js.map +1 -1
  80. package/dist/domain/services/risk-tier-detector.d.ts +8 -9
  81. package/dist/domain/services/risk-tier-detector.d.ts.map +1 -1
  82. package/dist/domain/services/risk-tier-detector.js +53 -40
  83. package/dist/domain/services/risk-tier-detector.js.map +1 -1
  84. package/dist/embed.d.ts.map +1 -1
  85. package/dist/embed.js +18 -8
  86. package/dist/embed.js.map +1 -1
  87. package/dist/index.js +405 -52
  88. package/dist/index.js.map +1 -1
  89. package/dist/infrastructure/ai/cohere-ai-service.js +4 -4
  90. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  91. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -1
  92. package/dist/infrastructure/ai/provider-ai-service.js +7 -7
  93. package/dist/infrastructure/ai/provider-ai-service.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 +10 -78
  99. package/dist/infrastructure/cache/response-cache.d.ts.map +1 -1
  100. package/dist/infrastructure/cache/response-cache.js +22 -198
  101. package/dist/infrastructure/cache/response-cache.js.map +1 -1
  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.d.ts +10 -0
  119. package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
  120. package/dist/infrastructure/config/config-manager.js +13 -2
  121. package/dist/infrastructure/config/config-manager.js.map +1 -1
  122. package/dist/infrastructure/context/conversation-context.d.ts +27 -31
  123. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -1
  124. package/dist/infrastructure/context/conversation-context.js +95 -136
  125. package/dist/infrastructure/context/conversation-context.js.map +1 -1
  126. package/dist/infrastructure/context/session-manager.d.ts +27 -11
  127. package/dist/infrastructure/context/session-manager.d.ts.map +1 -1
  128. package/dist/infrastructure/context/session-manager.js +69 -73
  129. package/dist/infrastructure/context/session-manager.js.map +1 -1
  130. package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
  131. package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
  132. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -1
  133. package/dist/infrastructure/providers/cohere-provider.js +102 -17
  134. package/dist/infrastructure/providers/cohere-provider.js.map +1 -1
  135. package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
  136. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
  137. package/dist/infrastructure/providers/openrouter-provider.js +401 -0
  138. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
  139. package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -1
  140. package/dist/infrastructure/providers/operation-provider-resolver.js +33 -7
  141. package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -1
  142. package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
  143. package/dist/infrastructure/security/input-validator.js +19 -6
  144. package/dist/infrastructure/security/input-validator.js.map +1 -1
  145. package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
  146. package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
  147. package/dist/infrastructure/serialization/toon-serializer.js +119 -0
  148. package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
  149. package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
  150. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
  151. package/dist/infrastructure/storage/embeddings-path.js +37 -0
  152. package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
  153. package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
  154. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  155. package/dist/infrastructure/storage/plan-repository.js +36 -73
  156. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  157. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
  158. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
  159. package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
  160. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
  161. package/dist/infrastructure/storage/task-helpers.d.ts +12 -1
  162. package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -1
  163. package/dist/infrastructure/storage/task-helpers.js +48 -8
  164. package/dist/infrastructure/storage/task-helpers.js.map +1 -1
  165. package/dist/infrastructure/storage/task-repository.d.ts +2 -1
  166. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
  167. package/dist/infrastructure/storage/task-repository.js +14 -3
  168. package/dist/infrastructure/storage/task-repository.js.map +1 -1
  169. package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
  170. package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
  171. package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
  172. package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
  173. package/dist/infrastructure/ux/capability-boundaries.d.ts +9 -37
  174. package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -1
  175. package/dist/infrastructure/ux/capability-boundaries.js +23 -148
  176. package/dist/infrastructure/ux/capability-boundaries.js.map +1 -1
  177. package/dist/infrastructure/ux/comprehensive-formatter.d.ts +12 -54
  178. package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -1
  179. package/dist/infrastructure/ux/comprehensive-formatter.js +87 -182
  180. package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -1
  181. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
  182. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
  183. package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
  184. package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
  185. package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
  186. package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
  187. package/dist/infrastructure/ux/feature-discovery.js +5 -181
  188. package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
  189. package/dist/infrastructure/ux/feedback-prompt.d.ts +15 -31
  190. package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -1
  191. package/dist/infrastructure/ux/feedback-prompt.js +30 -166
  192. package/dist/infrastructure/ux/feedback-prompt.js.map +1 -1
  193. package/dist/infrastructure/ux/progress-indicator.d.ts +4 -6
  194. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  195. package/dist/infrastructure/ux/progress-indicator.js +35 -50
  196. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  197. package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
  198. package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
  199. package/dist/infrastructure/ux/review-checkpoint.js +33 -80
  200. package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
  201. package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
  202. package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
  203. package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
  204. package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
  205. package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
  206. package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
  207. package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
  208. package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
  209. package/dist/infrastructure/validation/agent-feedback.d.ts +25 -89
  210. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -1
  211. package/dist/infrastructure/validation/agent-feedback.js +32 -204
  212. package/dist/infrastructure/validation/agent-feedback.js.map +1 -1
  213. package/dist/infrastructure/validation/agent-validation-helper.d.ts +53 -53
  214. package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -1
  215. package/dist/infrastructure/validation/agent-validation-helper.js +110 -61
  216. package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -1
  217. package/dist/infrastructure/validation/review-handler.d.ts +13 -41
  218. package/dist/infrastructure/validation/review-handler.d.ts.map +1 -1
  219. package/dist/infrastructure/validation/review-handler.js +23 -189
  220. package/dist/infrastructure/validation/review-handler.js.map +1 -1
  221. package/dist/infrastructure/validation/summary-aggregator.d.ts +25 -22
  222. package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -1
  223. package/dist/infrastructure/validation/summary-aggregator.js +47 -133
  224. package/dist/infrastructure/validation/summary-aggregator.js.map +1 -1
  225. package/dist/infrastructure/validation/summary-extractor.d.ts +13 -48
  226. package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -1
  227. package/dist/infrastructure/validation/summary-extractor.js +32 -89
  228. package/dist/infrastructure/validation/summary-extractor.js.map +1 -1
  229. package/dist/infrastructure/validation/trace-summary.d.ts +30 -57
  230. package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -1
  231. package/dist/infrastructure/validation/trace-summary.js +37 -356
  232. package/dist/infrastructure/validation/trace-summary.js.map +1 -1
  233. package/dist/monitoring.d.ts +1 -1
  234. package/dist/monitoring.d.ts.map +1 -1
  235. package/dist/monitoring.js +12 -9
  236. package/dist/monitoring.js.map +1 -1
  237. package/dist/parallel-processor.d.ts.map +1 -1
  238. package/dist/parallel-processor.js +124 -45
  239. package/dist/parallel-processor.js.map +1 -1
  240. package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
  241. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  242. package/dist/presentation/cli/commands/ask-command.js +316 -129
  243. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  244. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  245. package/dist/presentation/cli/commands/config-command.js +22 -8
  246. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  247. package/dist/presentation/cli/commands/decision-command.js +23 -6
  248. package/dist/presentation/cli/commands/decision-command.js.map +1 -1
  249. package/dist/presentation/cli/commands/docs-command.d.ts +3 -1
  250. package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -1
  251. package/dist/presentation/cli/commands/docs-command.js +13 -184
  252. package/dist/presentation/cli/commands/docs-command.js.map +1 -1
  253. package/dist/presentation/cli/commands/fix-command.d.ts +2 -0
  254. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -1
  255. package/dist/presentation/cli/commands/fix-command.js +61 -276
  256. package/dist/presentation/cli/commands/fix-command.js.map +1 -1
  257. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
  258. package/dist/presentation/cli/commands/help-command.js +21 -1
  259. package/dist/presentation/cli/commands/help-command.js.map +1 -1
  260. package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
  261. package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
  262. package/dist/presentation/cli/commands/memory-command.js +252 -0
  263. package/dist/presentation/cli/commands/memory-command.js.map +1 -0
  264. package/dist/presentation/cli/commands/models-command.d.ts +13 -0
  265. package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
  266. package/dist/presentation/cli/commands/models-command.js +194 -0
  267. package/dist/presentation/cli/commands/models-command.js.map +1 -0
  268. package/dist/presentation/cli/commands/orchestrate-command.d.ts +1 -0
  269. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  270. package/dist/presentation/cli/commands/orchestrate-command.js +129 -14
  271. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  272. package/dist/presentation/cli/commands/plan-command.d.ts +1 -0
  273. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  274. package/dist/presentation/cli/commands/plan-command.js +134 -25
  275. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  276. package/dist/presentation/cli/commands/product-command.d.ts +6 -4
  277. package/dist/presentation/cli/commands/product-command.d.ts.map +1 -1
  278. package/dist/presentation/cli/commands/product-command.js +12 -178
  279. package/dist/presentation/cli/commands/product-command.js.map +1 -1
  280. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
  281. package/dist/presentation/cli/commands/react-command.js +5 -1
  282. package/dist/presentation/cli/commands/react-command.js.map +1 -1
  283. package/dist/presentation/cli/commands/review-command.d.ts +7 -7
  284. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -1
  285. package/dist/presentation/cli/commands/review-command.js +167 -16
  286. package/dist/presentation/cli/commands/review-command.js.map +1 -1
  287. package/dist/presentation/cli/commands/run-command.d.ts +6 -8
  288. package/dist/presentation/cli/commands/run-command.d.ts.map +1 -1
  289. package/dist/presentation/cli/commands/run-command.js +182 -23
  290. package/dist/presentation/cli/commands/run-command.js.map +1 -1
  291. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
  292. package/dist/presentation/cli/commands/setup-command.js +15 -0
  293. package/dist/presentation/cli/commands/setup-command.js.map +1 -1
  294. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
  295. package/dist/presentation/cli/commands/smart-command.js +74 -6
  296. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  297. package/dist/presentation/cli/commands/status-command.d.ts +3 -0
  298. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -1
  299. package/dist/presentation/cli/commands/status-command.js +151 -156
  300. package/dist/presentation/cli/commands/status-command.js.map +1 -1
  301. package/dist/presentation/cli/commands/suggest-command.d.ts +3 -5
  302. package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -1
  303. package/dist/presentation/cli/commands/suggest-command.js +132 -19
  304. package/dist/presentation/cli/commands/suggest-command.js.map +1 -1
  305. package/dist/presentation/cli/error-display.d.ts.map +1 -1
  306. package/dist/presentation/cli/error-display.js +75 -17
  307. package/dist/presentation/cli/error-display.js.map +1 -1
  308. package/dist/search.d.ts.map +1 -1
  309. package/dist/search.js +6 -1
  310. package/dist/search.js.map +1 -1
  311. package/dist/session.d.ts +1 -0
  312. package/dist/session.d.ts.map +1 -1
  313. package/dist/session.js +55 -7
  314. package/dist/session.js.map +1 -1
  315. package/dist/tools/bash.d.ts.map +1 -1
  316. package/dist/tools/bash.js +3 -0
  317. package/dist/tools/bash.js.map +1 -1
  318. package/dist/tools/git-tool.js +7 -7
  319. package/dist/tools/git-tool.js.map +1 -1
  320. package/dist/ui.d.ts +11 -0
  321. package/dist/ui.d.ts.map +1 -1
  322. package/dist/ui.js +54 -1
  323. package/dist/ui.js.map +1 -1
  324. package/package.json +14 -4
@@ -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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AAO,EAAE,2BAA2B;YACpC,WAAW,EAAE,oDAAoD;YACjE,OAAO,EAAE,kCAAkC;YAC3C,MAAM,EAAE,uDAAuD;YAC/D,UAAU,EAAE,GAAG;SAChB,CAAC,CAAC;IACL,CAAC;IAED,kDAAkD;IAClD,IAAI,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACnF,WAAW,CAAC,IAAI,CAAC;YACf,OAAO,EAAE,eAAe;YACxB,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,2BAA2B;YACpC,MAAM,EAAE,wCAAwC;YAChD,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAAa,EACb,cAAsB;IAEtB,MAAM,WAAW,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEpD,wDAAwD;IACxD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;QAChE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"contextual-feature-discovery.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;IAC9B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC;KACjD,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzE;AAiHD;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAUlD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GACd,gBAAgB,GAAG,IAAI,CA6CzB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAKnE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAGzC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAGxC"}
1
+ {"version":3,"file":"feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,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,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAsB5B,MAAM,kBAAkB,GAAuB;IAC7C;QACE,EAAE,EAAE,gBAAgB;QACpB,OAAO,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;QAC5B,OAAO,EAAE,8CAA8C;QACvD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,2BAA2B;gBACjC,WAAW,EAAE,2CAA2C;gBACxD,OAAO,EAAE,kCAAkC;aAC5C;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,+CAA+C;gBAC5D,OAA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yBAAyB;QACzB,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3D,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,yBAAyB;QACzB,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YAClD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAmB;IAC3D,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,KAAK,CAAC,kBAAkB,GAAG,WAAW,CAAC;IACvC,KAAK,CAAC,iBAAiB,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnD,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,OAAO,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC;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"}
@@ -1,42 +1,26 @@
1
1
  /**
2
- * Infrastructure: Explicit Feedback Prompt
3
- * Task 6.1: Add thumbs up/down for responses, request refinement option
2
+ * Feedback Prompt
3
+ * Collect and store user feedback for bidirectional learning
4
4
  *
5
- * Features:
6
- * - Feedback prompts after operations
7
- * - Thumbs up/down collection
8
- * - Refinement request option
9
- * - Feedback storage for learning
5
+ * Phase 1: v0.5.0-alpha.0
10
6
  */
11
- import { BiDirectionalLearning, FeedbackSignal } from './bi-directional-learning.js';
12
- export type FeedbackAction = 'thumbs_up' | 'thumbs_down' | 'refine' | 'skip';
13
- export interface FeedbackResult {
14
- action: FeedbackAction;
15
- signal: FeedbackSignal;
16
- message?: string;
17
- timestamp: number;
18
- }
19
- /**
20
- * Display feedback prompt and collect user input
21
- * Task 6.1: Explicit feedback collection after operations
22
- * FIXED: Now works in non-TTY mode via environment variables
23
- */
24
- export declare function promptForFeedback(operation: string, context?: {
7
+ interface FeedbackContext {
25
8
  query?: string;
26
9
  response?: string;
27
10
  sessionId?: string;
28
- }): Promise<FeedbackResult | null>;
11
+ operation?: string;
12
+ }
29
13
  /**
30
- * Store feedback using BiDirectionalLearning system
14
+ * Prompt user for feedback (non-blocking, returns null if user skips)
31
15
  */
32
- export declare function storeFeedback(learningSystem: BiDirectionalLearning, userId: string, feedback: FeedbackResult, context?: {
33
- operation?: string;
34
- query?: string;
35
- response?: string;
36
- sessionId?: string;
37
- }): string;
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;
38
21
  /**
39
- * Display feedback confirmation
22
+ * Display feedback confirmation message
40
23
  */
41
- export declare function displayFeedbackConfirmation(feedback: FeedbackResult): void;
24
+ export declare function displayFeedbackConfirmation(feedback: string): void;
25
+ export {};
42
26
  //# sourceMappingURL=feedback-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feedback-prompt.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/feedback-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGrF,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACA,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA+HhC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,cAAc,EAAE,qBAAqB,EACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACA,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CA2B1E"}
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"}