codehere 0.1.0 → 0.2.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.

Potentially problematic release.


This version of codehere might be problematic. Click here for more details.

Files changed (603) hide show
  1. package/README.md +51 -25
  2. package/dist/agents/base.d.ts +107 -0
  3. package/dist/agents/base.d.ts.map +1 -0
  4. package/dist/agents/base.js +101 -0
  5. package/dist/agents/base.js.map +1 -0
  6. package/dist/agents/orchestrator-model-driven.d.ts +41 -0
  7. package/dist/agents/orchestrator-model-driven.d.ts.map +1 -0
  8. package/dist/agents/orchestrator-model-driven.js +141 -0
  9. package/dist/agents/orchestrator-model-driven.js.map +1 -0
  10. package/dist/agents/react-orchestrator-agent.d.ts +15 -0
  11. package/dist/agents/react-orchestrator-agent.d.ts.map +1 -0
  12. package/dist/agents/react-orchestrator-agent.js +54 -0
  13. package/dist/agents/react-orchestrator-agent.js.map +1 -0
  14. package/dist/application/agents/execution-agent.d.ts +68 -0
  15. package/dist/application/agents/execution-agent.d.ts.map +1 -0
  16. package/dist/application/agents/execution-agent.js +299 -0
  17. package/dist/application/agents/execution-agent.js.map +1 -0
  18. package/dist/application/agents/multi-agent-orchestrator.d.ts +64 -0
  19. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -0
  20. package/dist/application/agents/multi-agent-orchestrator.js +209 -0
  21. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -0
  22. package/dist/application/agents/planning-agent.d.ts +61 -0
  23. package/dist/application/agents/planning-agent.d.ts.map +1 -0
  24. package/dist/application/agents/planning-agent.js +357 -0
  25. package/dist/application/agents/planning-agent.js.map +1 -0
  26. package/dist/application/agents/validation-agent.d.ts +64 -0
  27. package/dist/application/agents/validation-agent.d.ts.map +1 -0
  28. package/dist/application/agents/validation-agent.js +182 -0
  29. package/dist/application/agents/validation-agent.js.map +1 -0
  30. package/dist/application/architectures/plan-and-act.d.ts +94 -0
  31. package/dist/application/architectures/plan-and-act.d.ts.map +1 -0
  32. package/dist/application/architectures/plan-and-act.js +242 -0
  33. package/dist/application/architectures/plan-and-act.js.map +1 -0
  34. package/dist/application/index.d.ts +12 -0
  35. package/dist/application/index.d.ts.map +1 -0
  36. package/dist/application/index.js +12 -0
  37. package/dist/application/index.js.map +1 -0
  38. package/dist/application/services/agent-factory.d.ts +9 -0
  39. package/dist/application/services/agent-factory.d.ts.map +1 -0
  40. package/dist/application/services/agent-factory.js +28 -0
  41. package/dist/application/services/agent-factory.js.map +1 -0
  42. package/dist/application/services/dependency-container.d.ts +140 -0
  43. package/dist/application/services/dependency-container.d.ts.map +1 -0
  44. package/dist/application/services/dependency-container.js +402 -0
  45. package/dist/application/services/dependency-container.js.map +1 -0
  46. package/dist/application/services/git-context-service.d.ts +30 -0
  47. package/dist/application/services/git-context-service.d.ts.map +1 -0
  48. package/dist/application/services/git-context-service.js +83 -0
  49. package/dist/application/services/git-context-service.js.map +1 -0
  50. package/dist/application/services/intelligent-router.d.ts +74 -0
  51. package/dist/application/services/intelligent-router.d.ts.map +1 -0
  52. package/dist/application/services/intelligent-router.js +711 -0
  53. package/dist/application/services/intelligent-router.js.map +1 -0
  54. package/dist/application/services/tool-executor-service.d.ts +14 -0
  55. package/dist/application/services/tool-executor-service.d.ts.map +1 -0
  56. package/dist/application/services/tool-executor-service.js +94 -0
  57. package/dist/application/services/tool-executor-service.js.map +1 -0
  58. package/dist/application/use-cases/ask-question-use-case.d.ts +36 -0
  59. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -0
  60. package/dist/application/use-cases/ask-question-use-case.js +150 -0
  61. package/dist/application/use-cases/ask-question-use-case.js.map +1 -0
  62. package/dist/application/use-cases/edit-file-use-case.d.ts +76 -0
  63. package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -0
  64. package/dist/application/use-cases/edit-file-use-case.js +685 -0
  65. package/dist/application/use-cases/edit-file-use-case.js.map +1 -0
  66. package/dist/application/use-cases/explain-file-use-case.d.ts +21 -0
  67. package/dist/application/use-cases/explain-file-use-case.d.ts.map +1 -0
  68. package/dist/application/use-cases/explain-file-use-case.js +50 -0
  69. package/dist/application/use-cases/explain-file-use-case.js.map +1 -0
  70. package/dist/application/use-cases/index-codebase-use-case.d.ts +46 -0
  71. package/dist/application/use-cases/index-codebase-use-case.d.ts.map +1 -0
  72. package/dist/application/use-cases/index-codebase-use-case.js +113 -0
  73. package/dist/application/use-cases/index-codebase-use-case.js.map +1 -0
  74. package/dist/application/use-cases/planning-use-case.d.ts +46 -0
  75. package/dist/application/use-cases/planning-use-case.d.ts.map +1 -0
  76. package/dist/application/use-cases/planning-use-case.js +267 -0
  77. package/dist/application/use-cases/planning-use-case.js.map +1 -0
  78. package/dist/application/use-cases/react-orchestration-use-case.d.ts +51 -0
  79. package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +1 -0
  80. package/dist/application/use-cases/react-orchestration-use-case.js +325 -0
  81. package/dist/application/use-cases/react-orchestration-use-case.js.map +1 -0
  82. package/dist/application/use-cases/reflexion-use-case.d.ts +24 -0
  83. package/dist/application/use-cases/reflexion-use-case.d.ts.map +1 -0
  84. package/dist/application/use-cases/reflexion-use-case.js +30 -0
  85. package/dist/application/use-cases/reflexion-use-case.js.map +1 -0
  86. package/dist/application/workflows/deterministic-workflows.d.ts +61 -0
  87. package/dist/application/workflows/deterministic-workflows.d.ts.map +1 -0
  88. package/dist/application/workflows/deterministic-workflows.js +189 -0
  89. package/dist/application/workflows/deterministic-workflows.js.map +1 -0
  90. package/dist/cache.d.ts.map +1 -1
  91. package/dist/cache.js +1 -3
  92. package/dist/cache.js.map +1 -1
  93. package/dist/chat.js +10 -10
  94. package/dist/chat.js.map +1 -1
  95. package/dist/docs.d.ts.map +1 -1
  96. package/dist/docs.js +1 -2
  97. package/dist/docs.js.map +1 -1
  98. package/dist/domain/entities/code-chunk.d.ts +26 -0
  99. package/dist/domain/entities/code-chunk.d.ts.map +1 -0
  100. package/dist/domain/entities/code-chunk.js +6 -0
  101. package/dist/domain/entities/code-chunk.js.map +1 -0
  102. package/dist/domain/entities/decision.d.ts +37 -0
  103. package/dist/domain/entities/decision.d.ts.map +1 -0
  104. package/dist/domain/entities/decision.js +9 -0
  105. package/dist/domain/entities/decision.js.map +1 -0
  106. package/dist/domain/entities/edit.d.ts +35 -0
  107. package/dist/domain/entities/edit.d.ts.map +1 -0
  108. package/dist/domain/entities/edit.js +6 -0
  109. package/dist/domain/entities/edit.js.map +1 -0
  110. package/dist/domain/entities/knowledge-node.d.ts +83 -0
  111. package/dist/domain/entities/knowledge-node.d.ts.map +1 -0
  112. package/dist/domain/entities/knowledge-node.js +9 -0
  113. package/dist/domain/entities/knowledge-node.js.map +1 -0
  114. package/dist/domain/entities/knowledge-preservation.d.ts +42 -0
  115. package/dist/domain/entities/knowledge-preservation.d.ts.map +1 -0
  116. package/dist/domain/entities/knowledge-preservation.js +10 -0
  117. package/dist/domain/entities/knowledge-preservation.js.map +1 -0
  118. package/dist/domain/entities/memory.d.ts +36 -0
  119. package/dist/domain/entities/memory.d.ts.map +1 -0
  120. package/dist/domain/entities/memory.js +6 -0
  121. package/dist/domain/entities/memory.js.map +1 -0
  122. package/dist/domain/entities/pattern.d.ts +49 -0
  123. package/dist/domain/entities/pattern.d.ts.map +1 -0
  124. package/dist/domain/entities/pattern.js +7 -0
  125. package/dist/domain/entities/pattern.js.map +1 -0
  126. package/dist/domain/entities/plan.d.ts +42 -0
  127. package/dist/domain/entities/plan.d.ts.map +1 -0
  128. package/dist/domain/entities/plan.js +6 -0
  129. package/dist/domain/entities/plan.js.map +1 -0
  130. package/dist/domain/entities/query.d.ts +17 -0
  131. package/dist/domain/entities/query.d.ts.map +1 -0
  132. package/dist/domain/entities/query.js +6 -0
  133. package/dist/domain/entities/query.js.map +1 -0
  134. package/dist/domain/index.d.ts +16 -0
  135. package/dist/domain/index.d.ts.map +1 -0
  136. package/dist/domain/index.js +19 -0
  137. package/dist/domain/index.js.map +1 -0
  138. package/dist/domain/interfaces/ai-service.interface.d.ts +62 -0
  139. package/dist/domain/interfaces/ai-service.interface.d.ts.map +1 -0
  140. package/dist/domain/interfaces/ai-service.interface.js +6 -0
  141. package/dist/domain/interfaces/ai-service.interface.js.map +1 -0
  142. package/dist/domain/interfaces/code-analyzer.interface.d.ts +38 -0
  143. package/dist/domain/interfaces/code-analyzer.interface.d.ts.map +1 -0
  144. package/dist/domain/interfaces/code-analyzer.interface.js +6 -0
  145. package/dist/domain/interfaces/code-analyzer.interface.js.map +1 -0
  146. package/dist/domain/interfaces/decision-repository.interface.d.ts +51 -0
  147. package/dist/domain/interfaces/decision-repository.interface.d.ts.map +1 -0
  148. package/dist/domain/interfaces/decision-repository.interface.js +9 -0
  149. package/dist/domain/interfaces/decision-repository.interface.js.map +1 -0
  150. package/dist/domain/interfaces/embedding-repository.interface.d.ts +28 -0
  151. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -0
  152. package/dist/domain/interfaces/embedding-repository.interface.js +6 -0
  153. package/dist/domain/interfaces/embedding-repository.interface.js.map +1 -0
  154. package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts +91 -0
  155. package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts.map +1 -0
  156. package/dist/domain/interfaces/knowledge-graph-repository.interface.js +9 -0
  157. package/dist/domain/interfaces/knowledge-graph-repository.interface.js.map +1 -0
  158. package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts +50 -0
  159. package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts.map +1 -0
  160. package/dist/domain/interfaces/knowledge-preservation-repository.interface.js +8 -0
  161. package/dist/domain/interfaces/knowledge-preservation-repository.interface.js.map +1 -0
  162. package/dist/domain/interfaces/memory-repository.interface.d.ts +49 -0
  163. package/dist/domain/interfaces/memory-repository.interface.d.ts.map +1 -0
  164. package/dist/domain/interfaces/memory-repository.interface.js +6 -0
  165. package/dist/domain/interfaces/memory-repository.interface.js.map +1 -0
  166. package/dist/domain/interfaces/pattern-repository.interface.d.ts +48 -0
  167. package/dist/domain/interfaces/pattern-repository.interface.d.ts.map +1 -0
  168. package/dist/domain/interfaces/pattern-repository.interface.js +6 -0
  169. package/dist/domain/interfaces/pattern-repository.interface.js.map +1 -0
  170. package/dist/domain/interfaces/verification-service.interface.d.ts +20 -0
  171. package/dist/domain/interfaces/verification-service.interface.d.ts.map +1 -0
  172. package/dist/domain/interfaces/verification-service.interface.js +6 -0
  173. package/dist/domain/interfaces/verification-service.interface.js.map +1 -0
  174. package/dist/domain/services/codebase-detector.d.ts +18 -0
  175. package/dist/domain/services/codebase-detector.d.ts.map +1 -0
  176. package/dist/domain/services/codebase-detector.js +91 -0
  177. package/dist/domain/services/codebase-detector.js.map +1 -0
  178. package/dist/domain/services/cross-team-pattern-sharing.d.ts +65 -0
  179. package/dist/domain/services/cross-team-pattern-sharing.d.ts.map +1 -0
  180. package/dist/domain/services/cross-team-pattern-sharing.js +125 -0
  181. package/dist/domain/services/cross-team-pattern-sharing.js.map +1 -0
  182. package/dist/domain/services/decision-recorder.d.ts +76 -0
  183. package/dist/domain/services/decision-recorder.d.ts.map +1 -0
  184. package/dist/domain/services/decision-recorder.js +223 -0
  185. package/dist/domain/services/decision-recorder.js.map +1 -0
  186. package/dist/domain/services/decision-retriever.d.ts +75 -0
  187. package/dist/domain/services/decision-retriever.d.ts.map +1 -0
  188. package/dist/domain/services/decision-retriever.js +133 -0
  189. package/dist/domain/services/decision-retriever.js.map +1 -0
  190. package/dist/domain/services/graded-memory-activation.d.ts +37 -0
  191. package/dist/domain/services/graded-memory-activation.d.ts.map +1 -0
  192. package/dist/domain/services/graded-memory-activation.js +69 -0
  193. package/dist/domain/services/graded-memory-activation.js.map +1 -0
  194. package/dist/domain/services/knowledge-access.d.ts +63 -0
  195. package/dist/domain/services/knowledge-access.d.ts.map +1 -0
  196. package/dist/domain/services/knowledge-access.js +132 -0
  197. package/dist/domain/services/knowledge-access.js.map +1 -0
  198. package/dist/domain/services/knowledge-extractor.d.ts +54 -0
  199. package/dist/domain/services/knowledge-extractor.d.ts.map +1 -0
  200. package/dist/domain/services/knowledge-extractor.js +247 -0
  201. package/dist/domain/services/knowledge-extractor.js.map +1 -0
  202. package/dist/domain/services/knowledge-graph-builder.d.ts +70 -0
  203. package/dist/domain/services/knowledge-graph-builder.d.ts.map +1 -0
  204. package/dist/domain/services/knowledge-graph-builder.js +268 -0
  205. package/dist/domain/services/knowledge-graph-builder.js.map +1 -0
  206. package/dist/domain/services/knowledge-graph-query.d.ts +69 -0
  207. package/dist/domain/services/knowledge-graph-query.d.ts.map +1 -0
  208. package/dist/domain/services/knowledge-graph-query.js +187 -0
  209. package/dist/domain/services/knowledge-graph-query.js.map +1 -0
  210. package/dist/domain/services/memory-retriever.d.ts +30 -0
  211. package/dist/domain/services/memory-retriever.d.ts.map +1 -0
  212. package/dist/domain/services/memory-retriever.js +82 -0
  213. package/dist/domain/services/memory-retriever.js.map +1 -0
  214. package/dist/domain/services/memory-synthesizer.d.ts +57 -0
  215. package/dist/domain/services/memory-synthesizer.d.ts.map +1 -0
  216. package/dist/domain/services/memory-synthesizer.js +91 -0
  217. package/dist/domain/services/memory-synthesizer.js.map +1 -0
  218. package/dist/domain/services/pattern-extractor.d.ts +108 -0
  219. package/dist/domain/services/pattern-extractor.d.ts.map +1 -0
  220. package/dist/domain/services/pattern-extractor.js +442 -0
  221. package/dist/domain/services/pattern-extractor.js.map +1 -0
  222. package/dist/domain/services/query-intent-classifier.d.ts +16 -0
  223. package/dist/domain/services/query-intent-classifier.d.ts.map +1 -0
  224. package/dist/domain/services/query-intent-classifier.js +140 -0
  225. package/dist/domain/services/query-intent-classifier.js.map +1 -0
  226. package/dist/domain/services/react-loop.d.ts +44 -0
  227. package/dist/domain/services/react-loop.d.ts.map +1 -0
  228. package/dist/domain/services/react-loop.js +110 -0
  229. package/dist/domain/services/react-loop.js.map +1 -0
  230. package/dist/edit.d.ts +0 -12
  231. package/dist/edit.d.ts.map +1 -1
  232. package/dist/edit.js +76 -351
  233. package/dist/edit.js.map +1 -1
  234. package/dist/embed.d.ts +0 -4
  235. package/dist/embed.d.ts.map +1 -1
  236. package/dist/embed.js +100 -174
  237. package/dist/embed.js.map +1 -1
  238. package/dist/error-handler.d.ts +1 -0
  239. package/dist/error-handler.d.ts.map +1 -1
  240. package/dist/error-handler.js +46 -3
  241. package/dist/error-handler.js.map +1 -1
  242. package/dist/index.js +228 -231
  243. package/dist/index.js.map +1 -1
  244. package/dist/infrastructure/ai/cohere-ai-service.d.ts +54 -0
  245. package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -0
  246. package/dist/infrastructure/ai/cohere-ai-service.js +547 -0
  247. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -0
  248. package/dist/infrastructure/ai/command-r-evaluation.d.ts +42 -0
  249. package/dist/infrastructure/ai/command-r-evaluation.d.ts.map +1 -0
  250. package/dist/infrastructure/ai/command-r-evaluation.js +206 -0
  251. package/dist/infrastructure/ai/command-r-evaluation.js.map +1 -0
  252. package/dist/infrastructure/ai/model-config.d.ts +47 -0
  253. package/dist/infrastructure/ai/model-config.d.ts.map +1 -0
  254. package/dist/infrastructure/ai/model-config.js +84 -0
  255. package/dist/infrastructure/ai/model-config.js.map +1 -0
  256. package/dist/infrastructure/cache/embedding-cache.d.ts +46 -0
  257. package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -0
  258. package/dist/infrastructure/cache/embedding-cache.js +104 -0
  259. package/dist/infrastructure/cache/embedding-cache.js.map +1 -0
  260. package/dist/infrastructure/chunking/ast-code-chunker.d.ts +12 -0
  261. package/dist/infrastructure/chunking/ast-code-chunker.d.ts.map +1 -0
  262. package/dist/infrastructure/chunking/ast-code-chunker.js +19 -0
  263. package/dist/infrastructure/chunking/ast-code-chunker.js.map +1 -0
  264. package/dist/infrastructure/chunking/code-aware-chunker.d.ts +63 -0
  265. package/dist/infrastructure/chunking/code-aware-chunker.d.ts.map +1 -0
  266. package/dist/infrastructure/chunking/code-aware-chunker.js +397 -0
  267. package/dist/infrastructure/chunking/code-aware-chunker.js.map +1 -0
  268. package/dist/infrastructure/config/config-manager.d.ts +79 -0
  269. package/dist/infrastructure/config/config-manager.d.ts.map +1 -0
  270. package/dist/infrastructure/config/config-manager.js +162 -0
  271. package/dist/infrastructure/config/config-manager.js.map +1 -0
  272. package/dist/infrastructure/cost/cost-tracker.d.ts +90 -0
  273. package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -0
  274. package/dist/infrastructure/cost/cost-tracker.js +353 -0
  275. package/dist/infrastructure/cost/cost-tracker.js.map +1 -0
  276. package/dist/infrastructure/file-scanner/file-scanner.d.ts +31 -0
  277. package/dist/infrastructure/file-scanner/file-scanner.d.ts.map +1 -0
  278. package/dist/infrastructure/file-scanner/file-scanner.js +106 -0
  279. package/dist/infrastructure/file-scanner/file-scanner.js.map +1 -0
  280. package/dist/infrastructure/governance/nist-ai-rmf.d.ts +107 -0
  281. package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -0
  282. package/dist/infrastructure/governance/nist-ai-rmf.js +294 -0
  283. package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -0
  284. package/dist/infrastructure/governance/policy-as-code.d.ts +90 -0
  285. package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -0
  286. package/dist/infrastructure/governance/policy-as-code.js +244 -0
  287. package/dist/infrastructure/governance/policy-as-code.js.map +1 -0
  288. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +138 -0
  289. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -0
  290. package/dist/infrastructure/governance/prompt-to-code-lineage.js +241 -0
  291. package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -0
  292. package/dist/infrastructure/index.d.ts +7 -0
  293. package/dist/infrastructure/index.d.ts.map +1 -0
  294. package/dist/infrastructure/index.js +7 -0
  295. package/dist/infrastructure/index.js.map +1 -0
  296. package/dist/infrastructure/observability/execution-tracer.d.ts +105 -0
  297. package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -0
  298. package/dist/infrastructure/observability/execution-tracer.js +190 -0
  299. package/dist/infrastructure/observability/execution-tracer.js.map +1 -0
  300. package/dist/infrastructure/observability/prompt-versioner.d.ts +67 -0
  301. package/dist/infrastructure/observability/prompt-versioner.d.ts.map +1 -0
  302. package/dist/infrastructure/observability/prompt-versioner.js +145 -0
  303. package/dist/infrastructure/observability/prompt-versioner.js.map +1 -0
  304. package/dist/infrastructure/protocols/a2a-metadata.d.ts +278 -0
  305. package/dist/infrastructure/protocols/a2a-metadata.d.ts.map +1 -0
  306. package/dist/infrastructure/protocols/a2a-metadata.js +137 -0
  307. package/dist/infrastructure/protocols/a2a-metadata.js.map +1 -0
  308. package/dist/infrastructure/protocols/a2a-protocol.d.ts +132 -0
  309. package/dist/infrastructure/protocols/a2a-protocol.d.ts.map +1 -0
  310. package/dist/infrastructure/protocols/a2a-protocol.js +314 -0
  311. package/dist/infrastructure/protocols/a2a-protocol.js.map +1 -0
  312. package/dist/infrastructure/protocols/mcp-oauth.d.ts +91 -0
  313. package/dist/infrastructure/protocols/mcp-oauth.d.ts.map +1 -0
  314. package/dist/infrastructure/protocols/mcp-oauth.js +184 -0
  315. package/dist/infrastructure/protocols/mcp-oauth.js.map +1 -0
  316. package/dist/infrastructure/protocols/mcp-server.d.ts +126 -0
  317. package/dist/infrastructure/protocols/mcp-server.d.ts.map +1 -0
  318. package/dist/infrastructure/protocols/mcp-server.js +333 -0
  319. package/dist/infrastructure/protocols/mcp-server.js.map +1 -0
  320. package/dist/infrastructure/protocols/streaming-handler.d.ts +57 -0
  321. package/dist/infrastructure/protocols/streaming-handler.d.ts.map +1 -0
  322. package/dist/infrastructure/protocols/streaming-handler.js +103 -0
  323. package/dist/infrastructure/protocols/streaming-handler.js.map +1 -0
  324. package/dist/infrastructure/security/ai-sast-scanner.d.ts +55 -0
  325. package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +1 -0
  326. package/dist/infrastructure/security/ai-sast-scanner.js +163 -0
  327. package/dist/infrastructure/security/ai-sast-scanner.js.map +1 -0
  328. package/dist/infrastructure/security/docker-sandbox.d.ts +57 -0
  329. package/dist/infrastructure/security/docker-sandbox.d.ts.map +1 -0
  330. package/dist/infrastructure/security/docker-sandbox.js +178 -0
  331. package/dist/infrastructure/security/docker-sandbox.js.map +1 -0
  332. package/dist/infrastructure/security/enhanced-security-gate.d.ts +51 -0
  333. package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -0
  334. package/dist/infrastructure/security/enhanced-security-gate.js +92 -0
  335. package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -0
  336. package/dist/infrastructure/security/input-validator.d.ts +33 -0
  337. package/dist/infrastructure/security/input-validator.d.ts.map +1 -0
  338. package/dist/infrastructure/security/input-validator.js +152 -0
  339. package/dist/infrastructure/security/input-validator.js.map +1 -0
  340. package/dist/infrastructure/security/license-scanner.d.ts +55 -0
  341. package/dist/infrastructure/security/license-scanner.d.ts.map +1 -0
  342. package/dist/infrastructure/security/license-scanner.js +167 -0
  343. package/dist/infrastructure/security/license-scanner.js.map +1 -0
  344. package/dist/infrastructure/security/provider-bias-detector.d.ts +53 -0
  345. package/dist/infrastructure/security/provider-bias-detector.d.ts.map +1 -0
  346. package/dist/infrastructure/security/provider-bias-detector.js +164 -0
  347. package/dist/infrastructure/security/provider-bias-detector.js.map +1 -0
  348. package/dist/infrastructure/security/sandbox-executor.d.ts +34 -0
  349. package/dist/infrastructure/security/sandbox-executor.d.ts.map +1 -0
  350. package/dist/infrastructure/security/sandbox-executor.js +64 -0
  351. package/dist/infrastructure/security/sandbox-executor.js.map +1 -0
  352. package/dist/infrastructure/storage/memory-stream-service.d.ts +47 -0
  353. package/dist/infrastructure/storage/memory-stream-service.d.ts.map +1 -0
  354. package/dist/infrastructure/storage/memory-stream-service.js +204 -0
  355. package/dist/infrastructure/storage/memory-stream-service.js.map +1 -0
  356. package/dist/infrastructure/storage/sqlite-decision-repository.d.ts +29 -0
  357. package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +1 -0
  358. package/dist/infrastructure/storage/sqlite-decision-repository.js +232 -0
  359. package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -0
  360. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +24 -0
  361. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -0
  362. package/dist/infrastructure/storage/sqlite-embedding-repository.js +162 -0
  363. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -0
  364. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts +41 -0
  365. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +1 -0
  366. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +417 -0
  367. package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +1 -0
  368. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts +29 -0
  369. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +1 -0
  370. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +230 -0
  371. package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +1 -0
  372. package/dist/infrastructure/storage/sqlite-memory-repository.d.ts +40 -0
  373. package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +1 -0
  374. package/dist/infrastructure/storage/sqlite-memory-repository.js +229 -0
  375. package/dist/infrastructure/storage/sqlite-memory-repository.js.map +1 -0
  376. package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts +25 -0
  377. package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +1 -0
  378. package/dist/infrastructure/storage/sqlite-pattern-repository.js +249 -0
  379. package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -0
  380. package/dist/infrastructure/ux/appropriate-friction.d.ts +77 -0
  381. package/dist/infrastructure/ux/appropriate-friction.d.ts.map +1 -0
  382. package/dist/infrastructure/ux/appropriate-friction.js +213 -0
  383. package/dist/infrastructure/ux/appropriate-friction.js.map +1 -0
  384. package/dist/infrastructure/ux/bi-directional-learning.d.ts +109 -0
  385. package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -0
  386. package/dist/infrastructure/ux/bi-directional-learning.js +200 -0
  387. package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -0
  388. package/dist/infrastructure/ux/expectation-management.d.ts +65 -0
  389. package/dist/infrastructure/ux/expectation-management.d.ts.map +1 -0
  390. package/dist/infrastructure/ux/expectation-management.js +193 -0
  391. package/dist/infrastructure/ux/expectation-management.js.map +1 -0
  392. package/dist/infrastructure/ux/hitl-validation.d.ts +104 -0
  393. package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -0
  394. package/dist/infrastructure/ux/hitl-validation.js +211 -0
  395. package/dist/infrastructure/ux/hitl-validation.js.map +1 -0
  396. package/dist/infrastructure/ux/progressive-disclosure.d.ts +84 -0
  397. package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +1 -0
  398. package/dist/infrastructure/ux/progressive-disclosure.js +235 -0
  399. package/dist/infrastructure/ux/progressive-disclosure.js.map +1 -0
  400. package/dist/infrastructure/ux/team-standards.d.ts +94 -0
  401. package/dist/infrastructure/ux/team-standards.d.ts.map +1 -0
  402. package/dist/infrastructure/ux/team-standards.js +196 -0
  403. package/dist/infrastructure/ux/team-standards.js.map +1 -0
  404. package/dist/infrastructure/verification/verification-service.d.ts +12 -0
  405. package/dist/infrastructure/verification/verification-service.d.ts.map +1 -0
  406. package/dist/infrastructure/verification/verification-service.js +47 -0
  407. package/dist/infrastructure/verification/verification-service.js.map +1 -0
  408. package/dist/infrastructure/xai/attention-visualizer.d.ts +73 -0
  409. package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -0
  410. package/dist/infrastructure/xai/attention-visualizer.js +174 -0
  411. package/dist/infrastructure/xai/attention-visualizer.js.map +1 -0
  412. package/dist/infrastructure/xai/cot-visualizer.d.ts +105 -0
  413. package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -0
  414. package/dist/infrastructure/xai/cot-visualizer.js +239 -0
  415. package/dist/infrastructure/xai/cot-visualizer.js.map +1 -0
  416. package/dist/infrastructure/xai/decision-tree-log.d.ts +104 -0
  417. package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -0
  418. package/dist/infrastructure/xai/decision-tree-log.js +216 -0
  419. package/dist/infrastructure/xai/decision-tree-log.js.map +1 -0
  420. package/dist/infrastructure/xai/interactive-xai.d.ts +106 -0
  421. package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -0
  422. package/dist/infrastructure/xai/interactive-xai.js +262 -0
  423. package/dist/infrastructure/xai/interactive-xai.js.map +1 -0
  424. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +80 -0
  425. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -0
  426. package/dist/infrastructure/xai/uncertainty-quantifier.js +201 -0
  427. package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -0
  428. package/dist/intelligent-retrieval.d.ts.map +1 -1
  429. package/dist/intelligent-retrieval.js +8 -1
  430. package/dist/intelligent-retrieval.js.map +1 -1
  431. package/dist/intent/classifier.d.ts +6 -0
  432. package/dist/intent/classifier.d.ts.map +1 -0
  433. package/dist/intent/classifier.js +2 -0
  434. package/dist/intent/classifier.js.map +1 -0
  435. package/dist/intent/context.d.ts +4 -0
  436. package/dist/intent/context.d.ts.map +1 -0
  437. package/dist/intent/context.js +2 -0
  438. package/dist/intent/context.js.map +1 -0
  439. package/dist/iterative-refinement.d.ts.map +1 -1
  440. package/dist/iterative-refinement.js +20 -3
  441. package/dist/iterative-refinement.js.map +1 -1
  442. package/dist/learning.d.ts.map +1 -1
  443. package/dist/learning.js +1 -2
  444. package/dist/learning.js.map +1 -1
  445. package/dist/monitoring.d.ts.map +1 -1
  446. package/dist/monitoring.js +1 -2
  447. package/dist/monitoring.js.map +1 -1
  448. package/dist/parallel-processor.d.ts +3 -2
  449. package/dist/parallel-processor.d.ts.map +1 -1
  450. package/dist/parallel-processor.js +183 -56
  451. package/dist/parallel-processor.js.map +1 -1
  452. package/dist/presentation/cli/commands/ask-command.d.ts +8 -0
  453. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -0
  454. package/dist/presentation/cli/commands/ask-command.js +133 -0
  455. package/dist/presentation/cli/commands/ask-command.js.map +1 -0
  456. package/dist/presentation/cli/commands/config-command.d.ts +9 -0
  457. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -0
  458. package/dist/presentation/cli/commands/config-command.js +123 -0
  459. package/dist/presentation/cli/commands/config-command.js.map +1 -0
  460. package/dist/presentation/cli/commands/cost-command.d.ts +8 -0
  461. package/dist/presentation/cli/commands/cost-command.d.ts.map +1 -0
  462. package/dist/presentation/cli/commands/cost-command.js +191 -0
  463. package/dist/presentation/cli/commands/cost-command.js.map +1 -0
  464. package/dist/presentation/cli/commands/decision-command.d.ts +12 -0
  465. package/dist/presentation/cli/commands/decision-command.d.ts.map +1 -0
  466. package/dist/presentation/cli/commands/decision-command.js +207 -0
  467. package/dist/presentation/cli/commands/decision-command.js.map +1 -0
  468. package/dist/presentation/cli/commands/help-command.d.ts +9 -0
  469. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -0
  470. package/dist/presentation/cli/commands/help-command.js +281 -0
  471. package/dist/presentation/cli/commands/help-command.js.map +1 -0
  472. package/dist/presentation/cli/commands/knowledge-command.d.ts +13 -0
  473. package/dist/presentation/cli/commands/knowledge-command.d.ts.map +1 -0
  474. package/dist/presentation/cli/commands/knowledge-command.js +129 -0
  475. package/dist/presentation/cli/commands/knowledge-command.js.map +1 -0
  476. package/dist/presentation/cli/commands/learning-dashboard-command.d.ts +8 -0
  477. package/dist/presentation/cli/commands/learning-dashboard-command.d.ts.map +1 -0
  478. package/dist/presentation/cli/commands/learning-dashboard-command.js +183 -0
  479. package/dist/presentation/cli/commands/learning-dashboard-command.js.map +1 -0
  480. package/dist/presentation/cli/commands/orchestrate-command.d.ts +8 -0
  481. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -0
  482. package/dist/presentation/cli/commands/orchestrate-command.js +112 -0
  483. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -0
  484. package/dist/presentation/cli/commands/plan-command.d.ts +8 -0
  485. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -0
  486. package/dist/presentation/cli/commands/plan-command.js +114 -0
  487. package/dist/presentation/cli/commands/plan-command.js.map +1 -0
  488. package/dist/presentation/cli/commands/react-command.d.ts +8 -0
  489. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -0
  490. package/dist/presentation/cli/commands/react-command.js +99 -0
  491. package/dist/presentation/cli/commands/react-command.js.map +1 -0
  492. package/dist/presentation/cli/commands/setup-command.d.ts +10 -0
  493. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -0
  494. package/dist/presentation/cli/commands/setup-command.js +231 -0
  495. package/dist/presentation/cli/commands/setup-command.js.map +1 -0
  496. package/dist/presentation/cli/commands/smart-command.d.ts +6 -0
  497. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -0
  498. package/dist/presentation/cli/commands/smart-command.js +212 -0
  499. package/dist/presentation/cli/commands/smart-command.js.map +1 -0
  500. package/dist/presentation/cli/commands/trace-command.d.ts +8 -0
  501. package/dist/presentation/cli/commands/trace-command.d.ts.map +1 -0
  502. package/dist/presentation/cli/commands/trace-command.js +125 -0
  503. package/dist/presentation/cli/commands/trace-command.js.map +1 -0
  504. package/dist/presentation/cli/commands/undo-command.d.ts +8 -0
  505. package/dist/presentation/cli/commands/undo-command.d.ts.map +1 -0
  506. package/dist/presentation/cli/commands/undo-command.js +141 -0
  507. package/dist/presentation/cli/commands/undo-command.js.map +1 -0
  508. package/dist/presentation/cli/error-display.d.ts +23 -0
  509. package/dist/presentation/cli/error-display.d.ts.map +1 -0
  510. package/dist/presentation/cli/error-display.js +122 -0
  511. package/dist/presentation/cli/error-display.js.map +1 -0
  512. package/dist/refactor.d.ts.map +1 -1
  513. package/dist/refactor.js +2 -4
  514. package/dist/refactor.js.map +1 -1
  515. package/dist/search.d.ts.map +1 -1
  516. package/dist/search.js +2 -63
  517. package/dist/search.js.map +1 -1
  518. package/dist/session.d.ts.map +1 -1
  519. package/dist/session.js +52 -3
  520. package/dist/session.js.map +1 -1
  521. package/dist/testgen.d.ts.map +1 -1
  522. package/dist/testgen.js +1 -2
  523. package/dist/testgen.js.map +1 -1
  524. package/dist/tools/bash.d.ts +53 -0
  525. package/dist/tools/bash.d.ts.map +1 -0
  526. package/dist/tools/bash.js +213 -0
  527. package/dist/tools/bash.js.map +1 -0
  528. package/dist/tools/edit.d.ts +48 -0
  529. package/dist/tools/edit.d.ts.map +1 -0
  530. package/dist/tools/edit.js +235 -0
  531. package/dist/tools/edit.js.map +1 -0
  532. package/dist/tools/executor.d.ts +29 -0
  533. package/dist/tools/executor.d.ts.map +1 -0
  534. package/dist/tools/executor.js +153 -0
  535. package/dist/tools/executor.js.map +1 -0
  536. package/dist/tools/git-tool.d.ts +87 -0
  537. package/dist/tools/git-tool.d.ts.map +1 -0
  538. package/dist/tools/git-tool.js +292 -0
  539. package/dist/tools/git-tool.js.map +1 -0
  540. package/dist/tools/parser.d.ts +33 -0
  541. package/dist/tools/parser.d.ts.map +1 -0
  542. package/dist/tools/parser.js +158 -0
  543. package/dist/tools/parser.js.map +1 -0
  544. package/dist/tools/registry.d.ts +74 -0
  545. package/dist/tools/registry.d.ts.map +1 -0
  546. package/dist/tools/registry.js +302 -0
  547. package/dist/tools/registry.js.map +1 -0
  548. package/dist/tools/search.d.ts +41 -0
  549. package/dist/tools/search.d.ts.map +1 -0
  550. package/dist/tools/search.js +100 -0
  551. package/dist/tools/search.js.map +1 -0
  552. package/dist/ui.d.ts.map +1 -1
  553. package/dist/ui.js +4 -2
  554. package/dist/ui.js.map +1 -1
  555. package/dist/utils/check-api-status.d.ts +12 -0
  556. package/dist/utils/check-api-status.d.ts.map +1 -0
  557. package/dist/utils/check-api-status.js +82 -0
  558. package/dist/utils/check-api-status.js.map +1 -0
  559. package/dist/utils/diff-parser.d.ts +22 -0
  560. package/dist/utils/diff-parser.d.ts.map +1 -0
  561. package/dist/utils/diff-parser.js +160 -0
  562. package/dist/utils/diff-parser.js.map +1 -0
  563. package/dist/utils/logger.d.ts +34 -0
  564. package/dist/utils/logger.d.ts.map +1 -0
  565. package/dist/utils/logger.js +56 -0
  566. package/dist/utils/logger.js.map +1 -0
  567. package/dist/utils/version.d.ts +21 -0
  568. package/dist/utils/version.d.ts.map +1 -0
  569. package/dist/utils/version.js +52 -0
  570. package/dist/utils/version.js.map +1 -0
  571. package/dist/verification/backup.d.ts +30 -0
  572. package/dist/verification/backup.d.ts.map +1 -0
  573. package/dist/verification/backup.js +238 -0
  574. package/dist/verification/backup.js.map +1 -0
  575. package/dist/verification/compiler.d.ts +20 -0
  576. package/dist/verification/compiler.d.ts.map +1 -0
  577. package/dist/verification/compiler.js +228 -0
  578. package/dist/verification/compiler.js.map +1 -0
  579. package/dist/verification/index.d.ts +59 -0
  580. package/dist/verification/index.d.ts.map +1 -0
  581. package/dist/verification/index.js +273 -0
  582. package/dist/verification/index.js.map +1 -0
  583. package/dist/verification/test-runner.d.ts +27 -0
  584. package/dist/verification/test-runner.d.ts.map +1 -0
  585. package/dist/verification/test-runner.js +379 -0
  586. package/dist/verification/test-runner.js.map +1 -0
  587. package/package.json +39 -14
  588. package/ARCHITECTURE.md +0 -240
  589. package/CHANGELOG.md +0 -44
  590. package/CONTRIBUTING.md +0 -171
  591. package/dist/benchmark.d.ts +0 -39
  592. package/dist/benchmark.d.ts.map +0 -1
  593. package/dist/benchmark.js +0 -195
  594. package/dist/benchmark.js.map +0 -1
  595. package/dist/scaffold.d.ts +0 -14
  596. package/dist/scaffold.d.ts.map +0 -1
  597. package/dist/scaffold.js +0 -85
  598. package/dist/scaffold.js.map +0 -1
  599. package/templates/next-page/app/layout.tsx +0 -19
  600. package/templates/next-page/app/page.tsx +0 -10
  601. package/templates/next-page/package.json +0 -22
  602. package/templates/node-api/index.js +0 -57
  603. package/templates/node-api/package.json +0 -13
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bi-directional-learning.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/bi-directional-learning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAC1G,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW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M,GAAG,MAAM;IAsBtD;;OAEG;IACH,kBAAkB,CAChB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,MAAM,CAAC,EAAE,cAAc,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,GACA,YAAY,EAAE;IAyBjB,OAAO,CAAC,iBAAiB;IA2BzB,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,kBAAkB;CAuB3B"}
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Infrastructure: Bi-directional Learning System
3
+ *
4
+ * Continuous refinement of AI models based on explicit and implicit user feedback
5
+ * Research: Bi-directional learning from user corrections, adapt to team preferences
6
+ *
7
+ * Features:
8
+ * - Edit/deletion tracking
9
+ * - Personalization engine
10
+ * - Learning from user corrections
11
+ * - Preference adaptation
12
+ */
13
+ /**
14
+ * Bi-directional Learning System
15
+ * Learns from user edits, deletions, and explicit feedback
16
+ */
17
+ export class BiDirectionalLearning {
18
+ feedbackHistory = new Map(); // userId -> feedbacks
19
+ learningPatterns = new Map(); // userId -> patterns
20
+ userPreferences = new Map();
21
+ /**
22
+ * Record user feedback (edit, deletion, etc.)
23
+ */
24
+ recordFeedback(userId, feedback) {
25
+ const feedbackId = `feedback-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
26
+ const fullFeedback = {
27
+ ...feedback,
28
+ feedbackId,
29
+ timestamp: Date.now(),
30
+ };
31
+ // Store feedback
32
+ if (!this.feedbackHistory.has(userId)) {
33
+ this.feedbackHistory.set(userId, []);
34
+ }
35
+ this.feedbackHistory.get(userId).push(fullFeedback);
36
+ // Learn from feedback
37
+ this.learnFromFeedback(userId, fullFeedback);
38
+ // Update preferences
39
+ this.updatePreferences(userId, fullFeedback);
40
+ return feedbackId;
41
+ }
42
+ /**
43
+ * Record explicit feedback (thumbs up/down, comments)
44
+ */
45
+ recordExplicitFeedback(userId, feedback) {
46
+ return this.recordFeedback(userId, {
47
+ type: 'explicit_feedback',
48
+ signal: feedback.signal,
49
+ filepath: feedback.codeExample || 'general',
50
+ context: {
51
+ ...feedback.context,
52
+ },
53
+ metadata: {
54
+ explicitFeedback: feedback.message,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Get user preferences
60
+ */
61
+ getUserPreferences(userId) {
62
+ if (!this.userPreferences.has(userId)) {
63
+ this.userPreferences.set(userId, {
64
+ userId,
65
+ preferences: {},
66
+ learnedAt: Date.now(),
67
+ lastUpdated: Date.now(),
68
+ });
69
+ }
70
+ return this.userPreferences.get(userId);
71
+ }
72
+ /**
73
+ * Get learned patterns for user
74
+ */
75
+ getLearnedPatterns(userId) {
76
+ return this.learningPatterns.get(userId) || [];
77
+ }
78
+ /**
79
+ * Apply learned preferences to code generation
80
+ */
81
+ applyPreferences(userId, code) {
82
+ const preferences = this.getUserPreferences(userId);
83
+ if (!preferences.preferences.codeStyle) {
84
+ return code; // No preferences learned yet
85
+ }
86
+ // Apply basic style preferences (simplified - in production, use AST transformation)
87
+ let modifiedCode = code;
88
+ const style = preferences.preferences.codeStyle;
89
+ // Apply quote preference (basic example)
90
+ if (style.quotes === 'single') {
91
+ modifiedCode = modifiedCode.replace(/"/g, "'");
92
+ }
93
+ else if (style.quotes === 'double') {
94
+ modifiedCode = modifiedCode.replace(/'/g, '"');
95
+ }
96
+ // In production, apply more sophisticated transformations based on preferences
97
+ return modifiedCode;
98
+ }
99
+ /**
100
+ * Get feedback history for user
101
+ */
102
+ getFeedbackHistory(userId, filter) {
103
+ const feedbacks = this.feedbackHistory.get(userId) || [];
104
+ let filtered = [...feedbacks];
105
+ if (filter?.type) {
106
+ filtered = filtered.filter(f => f.type === filter.type);
107
+ }
108
+ if (filter?.signal) {
109
+ filtered = filtered.filter(f => f.signal === filter.signal);
110
+ }
111
+ if (filter?.startTime) {
112
+ filtered = filtered.filter(f => f.timestamp >= filter.startTime);
113
+ }
114
+ if (filter?.endTime) {
115
+ filtered = filtered.filter(f => f.timestamp <= filter.endTime);
116
+ }
117
+ return filtered.sort((a, b) => b.timestamp - a.timestamp);
118
+ }
119
+ // Private helpers
120
+ learnFromFeedback(userId, feedback) {
121
+ // Learn patterns from edits and deletions
122
+ if (feedback.type === 'edit' && feedback.originalCode && feedback.modifiedCode) {
123
+ const pattern = this.extractPattern(feedback.originalCode, feedback.modifiedCode);
124
+ if (pattern) {
125
+ this.addLearningPattern(userId, {
126
+ type: 'correction',
127
+ pattern: pattern,
128
+ confidence: 0.7,
129
+ occurrences: 1,
130
+ examples: [feedback.modifiedCode],
131
+ });
132
+ }
133
+ }
134
+ // Learn from deletions (what user removes = not wanted)
135
+ if (feedback.type === 'deletion' && feedback.originalCode) {
136
+ this.addLearningPattern(userId, {
137
+ type: 'pattern',
138
+ pattern: `Avoid: ${feedback.originalCode.substring(0, 50)}`,
139
+ confidence: 0.6,
140
+ occurrences: 1,
141
+ examples: [],
142
+ });
143
+ }
144
+ }
145
+ updatePreferences(userId, feedback) {
146
+ const preferences = this.getUserPreferences(userId);
147
+ // Infer preferences from edits
148
+ if (feedback.type === 'edit' && feedback.originalCode && feedback.modifiedCode) {
149
+ // Infer code style preferences (simplified)
150
+ if (feedback.modifiedCode.includes("'") && !feedback.originalCode.includes("'")) {
151
+ preferences.preferences.codeStyle = preferences.preferences.codeStyle || {};
152
+ preferences.preferences.codeStyle.quotes = 'single';
153
+ }
154
+ else if (feedback.modifiedCode.includes('"') && !feedback.originalCode.includes('"')) {
155
+ preferences.preferences.codeStyle = preferences.preferences.codeStyle || {};
156
+ preferences.preferences.codeStyle.quotes = 'double';
157
+ }
158
+ preferences.lastUpdated = Date.now();
159
+ }
160
+ // Update based on explicit feedback
161
+ if (feedback.type === 'explicit_feedback' && feedback.metadata?.explicitFeedback) {
162
+ // Parse explicit feedback for preferences
163
+ const message = feedback.metadata.explicitFeedback.toLowerCase();
164
+ if (message.includes('style') || message.includes('format')) {
165
+ // Extract style preferences from feedback
166
+ // (In production, use NLP to parse structured preferences)
167
+ }
168
+ }
169
+ }
170
+ extractPattern(original, modified) {
171
+ // Simple pattern extraction (in production, use AST diffing)
172
+ if (original.length > 0 && modified.length > 0) {
173
+ return `Pattern: ${modified.substring(0, 30)}...`;
174
+ }
175
+ return null;
176
+ }
177
+ addLearningPattern(userId, pattern) {
178
+ if (!this.learningPatterns.has(userId)) {
179
+ this.learningPatterns.set(userId, []);
180
+ }
181
+ const patterns = this.learningPatterns.get(userId);
182
+ // Check if similar pattern exists
183
+ const existing = patterns.find(p => p.pattern === pattern.pattern);
184
+ if (existing) {
185
+ existing.occurrences++;
186
+ existing.confidence = Math.min(1.0, existing.confidence + 0.1);
187
+ existing.examples.push(...pattern.examples.slice(0, 3)); // Keep max 3 examples
188
+ existing.lastSeen = Date.now();
189
+ }
190
+ else {
191
+ patterns.push({
192
+ ...pattern,
193
+ patternId: `pattern-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
194
+ createdAt: Date.now(),
195
+ lastSeen: Date.now(),
196
+ });
197
+ }
198
+ }
199
+ }
200
+ //# sourceMappingURL=bi-directional-learning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bi-directional-learning.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/bi-directional-learning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuDH;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IACxB,eAAe,GAAgC,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;IAChF,gBAAgB,GAAmC,IAAI,GAAG,EAAE,CAAC,CAAC,qBAAqB;IACnF,eAAe,GAAiC,IAAI,GAAG,EAAE,CAAC;IAElE;;OAEG;IACH,cAAc,CAAC,MAAc,EAAE,QAAwD;QACrF,MAAM,UAAU,GAAG,YAAY,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,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AAK,OAAO,CAAC,OAAO,CAAC,CAAC;QACnE,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC;YAC/D,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB;YAC/E,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CAAC;gBACZ,GAAG,OAAO;gBACV,SAAS,EAAE,WAAW,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;gBAC7E,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Infrastructure: Expectation Management System
3
+ *
4
+ * Clearly communicates AI limitations to prevent user frustration
5
+ * Research: Expectation management - clear limitations, "can make mistakes" warnings
6
+ *
7
+ * Features:
8
+ * - Clear capability communication
9
+ * - Limitation warnings
10
+ * - Contextual disclaimers
11
+ * - Error prevention messaging
12
+ */
13
+ export type OperationRisk = 'low' | 'medium' | 'high' | 'critical';
14
+ export type CapabilityLevel = 'confident' | 'moderate' | 'uncertain' | 'risky';
15
+ export interface ExpectationMessage {
16
+ type: 'capability' | 'limitation' | 'warning' | 'disclaimer';
17
+ operation: string;
18
+ message: string;
19
+ severity: 'info' | 'warning' | 'error';
20
+ showOnce?: boolean;
21
+ contextual?: boolean;
22
+ }
23
+ export interface CapabilityAssessment {
24
+ operation: string;
25
+ capability: CapabilityLevel;
26
+ confidence: number;
27
+ limitations: string[];
28
+ warnings: string[];
29
+ canProceed: boolean;
30
+ recommendedApproach?: string;
31
+ }
32
+ /**
33
+ * Expectation Management System
34
+ * Manages user expectations and communicates AI limitations clearly
35
+ */
36
+ export declare class ExpectationManagement {
37
+ private messages;
38
+ private shownMessages;
39
+ constructor();
40
+ /**
41
+ * Assess capability for an operation
42
+ */
43
+ assessCapability(operation: string, context: {
44
+ complexity?: 'simple' | 'moderate' | 'complex';
45
+ domain?: string;
46
+ uncertainty?: number;
47
+ riskLevel?: OperationRisk;
48
+ }): CapabilityAssessment;
49
+ /**
50
+ * Get expectation message for operation
51
+ */
52
+ getExpectationMessage(operation: string, context?: Record<string, any>): ExpectationMessage | null;
53
+ /**
54
+ * Register custom expectation message
55
+ */
56
+ registerMessage(message: ExpectationMessage): void;
57
+ /**
58
+ * Format capability assessment for display
59
+ */
60
+ formatAssessment(assessment: CapabilityAssessment): string;
61
+ private initializeDefaultMessages;
62
+ private matchesContext;
63
+ private generateRecommendedApproach;
64
+ }
65
+ //# sourceMappingURL=expectation-management.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expectation-management.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/expectation-management.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,eAAe,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAA8C;IAC9D,OAAO,CAAC,aAAa,CAA0B;;IAM/C;;OAEG;IACH,gBAAgB,CACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;QAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,aAAa,CAAC;KAC3B,GACA,oBAAoB;IAyDvB;;OAEG;IACH,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,kBAAkB,GAAG,IAAI;IAuBlG;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAIlD;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,GAAG,MAAM;IA2C1D,OAAO,CAAC,yBAAyB;IA6BjC,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,2BAA2B;CAcpC"}
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Infrastructure: Expectation Management System
3
+ *
4
+ * Clearly communicates AI limitations to prevent user frustration
5
+ * Research: Expectation management - clear limitations, "can make mistakes" warnings
6
+ *
7
+ * Features:
8
+ * - Clear capability communication
9
+ * - Limitation warnings
10
+ * - Contextual disclaimers
11
+ * - Error prevention messaging
12
+ */
13
+ /**
14
+ * Expectation Management System
15
+ * Manages user expectations and communicates AI limitations clearly
16
+ */
17
+ export class ExpectationManagement {
18
+ messages = new Map();
19
+ shownMessages = new Set(); // Track shown messages
20
+ constructor() {
21
+ this.initializeDefaultMessages();
22
+ }
23
+ /**
24
+ * Assess capability for an operation
25
+ */
26
+ assessCapability(operation, context) {
27
+ const { complexity = 'moderate', domain, uncertainty = 0.5, riskLevel = 'medium' } = context;
28
+ let capability = 'moderate';
29
+ let confidence = 0.7;
30
+ const limitations = [];
31
+ const warnings = [];
32
+ // Adjust based on complexity
33
+ if (complexity === 'simple') {
34
+ capability = 'confident';
35
+ confidence = 0.9;
36
+ }
37
+ else if (complexity === 'complex') {
38
+ capability = 'uncertain';
39
+ confidence = 0.5;
40
+ limitations.push('Complex operations may require multiple iterations');
41
+ }
42
+ // Adjust based on uncertainty
43
+ if (uncertainty > 0.7) {
44
+ capability = 'risky';
45
+ confidence = 0.3;
46
+ warnings.push('High uncertainty detected - verify output carefully');
47
+ warnings.push('This may indicate hallucination risk');
48
+ }
49
+ // Adjust based on risk level
50
+ if (riskLevel === 'critical') {
51
+ warnings.push('Critical operation - human review recommended');
52
+ capability = 'risky';
53
+ confidence = Math.min(confidence, 0.4);
54
+ }
55
+ else if (riskLevel === 'high') {
56
+ warnings.push('High-risk operation - please review before applying');
57
+ }
58
+ // Domain-specific limitations
59
+ if (domain === 'security') {
60
+ limitations.push('Security-sensitive code requires careful review');
61
+ warnings.push('Always verify security implications manually');
62
+ }
63
+ else if (domain === 'financial') {
64
+ limitations.push('Financial code requires compliance verification');
65
+ warnings.push('Ensure regulatory compliance before deployment');
66
+ }
67
+ const canProceed = capability !== 'risky' || riskLevel !== 'critical';
68
+ return {
69
+ operation,
70
+ capability,
71
+ confidence,
72
+ limitations,
73
+ warnings,
74
+ canProceed,
75
+ recommendedApproach: this.generateRecommendedApproach(capability, complexity, riskLevel),
76
+ };
77
+ }
78
+ /**
79
+ * Get expectation message for operation
80
+ */
81
+ getExpectationMessage(operation, context) {
82
+ // Check for contextual messages first
83
+ if (context) {
84
+ for (const message of this.messages.values()) {
85
+ if (message.contextual && this.matchesContext(message, context)) {
86
+ return message;
87
+ }
88
+ }
89
+ }
90
+ // Check for operation-specific message
91
+ const operationMessage = this.messages.get(operation);
92
+ if (operationMessage) {
93
+ if (operationMessage.showOnce && this.shownMessages.has(operation)) {
94
+ return null; // Already shown
95
+ }
96
+ this.shownMessages.add(operation);
97
+ return operationMessage;
98
+ }
99
+ return null;
100
+ }
101
+ /**
102
+ * Register custom expectation message
103
+ */
104
+ registerMessage(message) {
105
+ this.messages.set(message.operation, message);
106
+ }
107
+ /**
108
+ * Format capability assessment for display
109
+ */
110
+ formatAssessment(assessment) {
111
+ let output = '';
112
+ // Capability level indicator
113
+ const capabilityIcons = {
114
+ confident: '✓',
115
+ moderate: '◐',
116
+ uncertain: '⚠',
117
+ risky: '⚠⚠',
118
+ };
119
+ output += `${capabilityIcons[assessment.capability]} ${assessment.operation}\n`;
120
+ output += `Confidence: ${(assessment.confidence * 100).toFixed(0)}%\n\n`;
121
+ if (assessment.limitations.length > 0) {
122
+ output += `Limitations:\n`;
123
+ for (const limitation of assessment.limitations) {
124
+ output += ` • ${limitation}\n`;
125
+ }
126
+ output += '\n';
127
+ }
128
+ if (assessment.warnings.length > 0) {
129
+ output += `Warnings:\n`;
130
+ for (const warning of assessment.warnings) {
131
+ output += ` ⚠ ${warning}\n`;
132
+ }
133
+ output += '\n';
134
+ }
135
+ if (assessment.recommendedApproach) {
136
+ output += `Recommended: ${assessment.recommendedApproach}\n`;
137
+ }
138
+ if (!assessment.canProceed) {
139
+ output += `\n⚠️ This operation requires human review before proceeding.\n`;
140
+ }
141
+ return output;
142
+ }
143
+ // Private helpers
144
+ initializeDefaultMessages() {
145
+ // General disclaimer
146
+ this.registerMessage({
147
+ type: 'disclaimer',
148
+ operation: 'general',
149
+ message: 'AI-generated code may contain errors. Please review and test before deploying.',
150
+ severity: 'info',
151
+ showOnce: true,
152
+ });
153
+ // Security operations
154
+ this.registerMessage({
155
+ type: 'warning',
156
+ operation: 'security-sensitive',
157
+ message: 'Security-sensitive operations require careful manual review. The AI may not catch all vulnerabilities.',
158
+ severity: 'warning',
159
+ contextual: true,
160
+ });
161
+ // Critical operations
162
+ this.registerMessage({
163
+ type: 'warning',
164
+ operation: 'critical',
165
+ message: 'This is a high-risk operation. Human review is mandatory before proceeding.',
166
+ severity: 'error',
167
+ contextual: true,
168
+ });
169
+ }
170
+ matchesContext(message, context) {
171
+ // Simple context matching logic
172
+ if (message.operation === 'security-sensitive' && context.domain === 'security') {
173
+ return true;
174
+ }
175
+ if (message.operation === 'critical' && context.riskLevel === 'critical') {
176
+ return true;
177
+ }
178
+ return false;
179
+ }
180
+ generateRecommendedApproach(capability, complexity, riskLevel) {
181
+ if (capability === 'risky' || riskLevel === 'critical') {
182
+ return 'Review generated code carefully, test thoroughly, and get human approval before deployment';
183
+ }
184
+ else if (capability === 'uncertain' || complexity === 'complex') {
185
+ return 'Review the generated code and test incrementally';
186
+ }
187
+ else if (capability === 'moderate') {
188
+ return 'Review the code before committing';
189
+ }
190
+ return undefined;
191
+ }
192
+ }
193
+ //# sourceMappingURL=expectation-management.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expectation-management.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/expectation-management.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAwBH;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IACxB,QAAQ,GAAoC,IAAI,GAAG,EAAE,CAAC;IACtD,aAAa,GAAgB,IAAI,GAAG,EAAE,CAAC,CAAC,uBAAuB;IAEvE;QACE,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,gBAAgB,CACd,SAAiB,EACjB,OAKC;QAED,MAAM,EAAE,UAAU,GAAG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AO,kDAAkD,CAAC;QAC5D,CAAC;aAAM,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;YACrC,OAAO,mCAAmC,CAAC;QAC7C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Infrastructure: Human-in-the-Loop (HITL) Validation System
3
+ *
4
+ * Architecturally embedded human intervention points for supervision and decision-making
5
+ * Research: Human-in-the-Loop (HITL) validation mandatory, prevents automation bias
6
+ *
7
+ * Features:
8
+ * - Mandatory validation checkpoints
9
+ * - Centralized review hub
10
+ * - Review queue management
11
+ * - Approval workflow
12
+ */
13
+ export type ReviewStatus = 'pending' | 'approved' | 'rejected' | 'needs_changes' | 'cancelled';
14
+ export type ReviewPriority = 'low' | 'normal' | 'high' | 'critical';
15
+ export interface ReviewCheckpoint {
16
+ checkpointId: string;
17
+ operation: string;
18
+ description: string;
19
+ priority: ReviewPriority;
20
+ status: ReviewStatus;
21
+ createdAt: number;
22
+ reviewedAt?: number;
23
+ reviewedBy?: string;
24
+ changes: {
25
+ type: 'edit' | 'create' | 'delete' | 'move' | 'refactor';
26
+ filepath?: string;
27
+ diff?: string;
28
+ summary: string;
29
+ }[];
30
+ context: {
31
+ query: string;
32
+ riskLevel: 'low' | 'medium' | 'high' | 'critical';
33
+ uncertainty?: number;
34
+ securityFindings?: any[];
35
+ licenseFindings?: any[];
36
+ };
37
+ metadata: {
38
+ sessionId?: string;
39
+ userId?: string;
40
+ decisionTreeId?: string;
41
+ lineageId?: string;
42
+ [key: string]: any;
43
+ };
44
+ }
45
+ export interface ReviewDecision {
46
+ checkpointId: string;
47
+ decision: 'approve' | 'reject' | 'request_changes';
48
+ reviewer: string;
49
+ comment?: string;
50
+ timestamp: number;
51
+ }
52
+ /**
53
+ * Human-in-the-Loop Validation System
54
+ * Manages mandatory validation checkpoints for critical operations
55
+ */
56
+ export declare class HITLValidation {
57
+ private checkpoints;
58
+ private reviewQueue;
59
+ /**
60
+ * Create review checkpoint
61
+ */
62
+ createCheckpoint(operation: string, changes: ReviewCheckpoint['changes'], context: ReviewCheckpoint['context'], metadata?: ReviewCheckpoint['metadata']): ReviewCheckpoint;
63
+ /**
64
+ * Check if operation requires HITL validation
65
+ */
66
+ requiresValidation(context: {
67
+ riskLevel: 'low' | 'medium' | 'high' | 'critical';
68
+ isDestructive?: boolean;
69
+ modifiesSecuritySensitiveCode?: boolean;
70
+ affectsMultipleFiles?: boolean;
71
+ uncertainty?: number;
72
+ }): boolean;
73
+ /**
74
+ * Get next checkpoint in review queue
75
+ */
76
+ getNextCheckpoint(): ReviewCheckpoint | null;
77
+ /**
78
+ * Submit review decision
79
+ */
80
+ submitDecision(decision: ReviewDecision): void;
81
+ /**
82
+ * Get checkpoint by ID
83
+ */
84
+ getCheckpoint(checkpointId: string): ReviewCheckpoint | null;
85
+ /**
86
+ * Get all pending checkpoints
87
+ */
88
+ getPendingCheckpoints(priority?: ReviewPriority): ReviewCheckpoint[];
89
+ /**
90
+ * Get review queue status
91
+ */
92
+ getReviewQueueStatus(): {
93
+ total: number;
94
+ pending: number;
95
+ byPriority: Record<ReviewPriority, number>;
96
+ };
97
+ /**
98
+ * Format checkpoint for review
99
+ */
100
+ formatCheckpoint(checkpoint: ReviewCheckpoint): string;
101
+ private addToReviewQueue;
102
+ private generateDescription;
103
+ }
104
+ //# sourceMappingURL=hitl-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hitl-validation.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,WAAW,CAAC;AAC/F,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;I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