codehere 0.1.1
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.
- package/LICENSE +22 -0
- package/README.md +378 -0
- package/dist/agents/base.d.ts +107 -0
- package/dist/agents/base.d.ts.map +1 -0
- package/dist/agents/base.js +101 -0
- package/dist/agents/base.js.map +1 -0
- package/dist/agents/orchestrator-model-driven.d.ts +41 -0
- package/dist/agents/orchestrator-model-driven.d.ts.map +1 -0
- package/dist/agents/orchestrator-model-driven.js +141 -0
- package/dist/agents/orchestrator-model-driven.js.map +1 -0
- package/dist/agents/react-orchestrator-agent.d.ts +15 -0
- package/dist/agents/react-orchestrator-agent.d.ts.map +1 -0
- package/dist/agents/react-orchestrator-agent.js +54 -0
- package/dist/agents/react-orchestrator-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +79 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -0
- package/dist/application/agents/execution-agent.js +534 -0
- package/dist/application/agents/execution-agent.js.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts +69 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.js +296 -0
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -0
- package/dist/application/agents/planning-agent.d.ts +65 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -0
- package/dist/application/agents/planning-agent.js +553 -0
- package/dist/application/agents/planning-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +68 -0
- package/dist/application/agents/validation-agent.d.ts.map +1 -0
- package/dist/application/agents/validation-agent.js +317 -0
- package/dist/application/agents/validation-agent.js.map +1 -0
- package/dist/application/architectures/plan-and-act.d.ts +94 -0
- package/dist/application/architectures/plan-and-act.d.ts.map +1 -0
- package/dist/application/architectures/plan-and-act.js +242 -0
- package/dist/application/architectures/plan-and-act.js.map +1 -0
- package/dist/application/index.d.ts +12 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +12 -0
- package/dist/application/index.js.map +1 -0
- package/dist/application/services/agent-factory.d.ts +9 -0
- package/dist/application/services/agent-factory.d.ts.map +1 -0
- package/dist/application/services/agent-factory.js +28 -0
- package/dist/application/services/agent-factory.js.map +1 -0
- package/dist/application/services/context-importer.d.ts +71 -0
- package/dist/application/services/context-importer.d.ts.map +1 -0
- package/dist/application/services/context-importer.js +436 -0
- package/dist/application/services/context-importer.js.map +1 -0
- package/dist/application/services/context-manager.d.ts +132 -0
- package/dist/application/services/context-manager.d.ts.map +1 -0
- package/dist/application/services/context-manager.js +369 -0
- package/dist/application/services/context-manager.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +187 -0
- package/dist/application/services/dependency-container.d.ts.map +1 -0
- package/dist/application/services/dependency-container.js +607 -0
- package/dist/application/services/dependency-container.js.map +1 -0
- package/dist/application/services/git-context-service.d.ts +30 -0
- package/dist/application/services/git-context-service.d.ts.map +1 -0
- package/dist/application/services/git-context-service.js +83 -0
- package/dist/application/services/git-context-service.js.map +1 -0
- package/dist/application/services/intelligent-router.d.ts +90 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -0
- package/dist/application/services/intelligent-router.js +942 -0
- package/dist/application/services/intelligent-router.js.map +1 -0
- package/dist/application/services/token-counting-service.d.ts +87 -0
- package/dist/application/services/token-counting-service.d.ts.map +1 -0
- package/dist/application/services/token-counting-service.js +196 -0
- package/dist/application/services/token-counting-service.js.map +1 -0
- package/dist/application/services/tool-executor-service.d.ts +14 -0
- package/dist/application/services/tool-executor-service.d.ts.map +1 -0
- package/dist/application/services/tool-executor-service.js +94 -0
- package/dist/application/services/tool-executor-service.js.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts +67 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.js +437 -0
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts +92 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.js +819 -0
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts +21 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.js +50 -0
- package/dist/application/use-cases/explain-file-use-case.js.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts +46 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.js +113 -0
- package/dist/application/use-cases/index-codebase-use-case.js.map +1 -0
- package/dist/application/use-cases/planning-use-case.d.ts +46 -0
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/planning-use-case.js +276 -0
- package/dist/application/use-cases/planning-use-case.js.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts +51 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.js +362 -0
- package/dist/application/use-cases/react-orchestration-use-case.js.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts +24 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.js +30 -0
- package/dist/application/use-cases/reflexion-use-case.js.map +1 -0
- package/dist/application/workflows/deterministic-workflows.d.ts +61 -0
- package/dist/application/workflows/deterministic-workflows.d.ts.map +1 -0
- package/dist/application/workflows/deterministic-workflows.js +189 -0
- package/dist/application/workflows/deterministic-workflows.js.map +1 -0
- package/dist/ast-parser.d 2.ts +55 -0
- package/dist/ast-parser.d.ts +55 -0
- package/dist/ast-parser.d.ts.map +1 -0
- package/dist/ast-parser.js +331 -0
- package/dist/ast-parser.js.map +1 -0
- package/dist/cache.d.ts +45 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +180 -0
- package/dist/cache.js.map +1 -0
- package/dist/chat.d.ts +4 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +175 -0
- package/dist/chat.js.map +1 -0
- package/dist/code-analysis 2.js +327 -0
- package/dist/code-analysis.d.ts +50 -0
- package/dist/code-analysis.d.ts.map +1 -0
- package/dist/code-analysis.js +327 -0
- package/dist/code-analysis.js.map +1 -0
- package/dist/context.d.ts +44 -0
- package/dist/context.d.ts 2.map +1 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +187 -0
- package/dist/context.js.map +1 -0
- package/dist/docs.d.ts +21 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +146 -0
- package/dist/docs.js.map +1 -0
- package/dist/domain/entities/code-chunk.d.ts +26 -0
- package/dist/domain/entities/code-chunk.d.ts.map +1 -0
- package/dist/domain/entities/code-chunk.js +6 -0
- package/dist/domain/entities/code-chunk.js.map +1 -0
- package/dist/domain/entities/conversation-context.d.ts +245 -0
- package/dist/domain/entities/conversation-context.d.ts.map +1 -0
- package/dist/domain/entities/conversation-context.js +50 -0
- package/dist/domain/entities/conversation-context.js.map +1 -0
- package/dist/domain/entities/decision.d.ts +37 -0
- package/dist/domain/entities/decision.d.ts.map +1 -0
- package/dist/domain/entities/decision.js +9 -0
- package/dist/domain/entities/decision.js.map +1 -0
- package/dist/domain/entities/edit.d.ts +35 -0
- package/dist/domain/entities/edit.d.ts.map +1 -0
- package/dist/domain/entities/edit.js +6 -0
- package/dist/domain/entities/edit.js.map +1 -0
- package/dist/domain/entities/knowledge-node.d.ts +83 -0
- package/dist/domain/entities/knowledge-node.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-node.js +9 -0
- package/dist/domain/entities/knowledge-node.js.map +1 -0
- package/dist/domain/entities/knowledge-preservation.d.ts +42 -0
- package/dist/domain/entities/knowledge-preservation.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-preservation.js +10 -0
- package/dist/domain/entities/knowledge-preservation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts +36 -0
- package/dist/domain/entities/memory.d.ts.map +1 -0
- package/dist/domain/entities/memory.js +6 -0
- package/dist/domain/entities/memory.js.map +1 -0
- package/dist/domain/entities/pattern.d.ts +49 -0
- package/dist/domain/entities/pattern.d.ts.map +1 -0
- package/dist/domain/entities/pattern.js +7 -0
- package/dist/domain/entities/pattern.js.map +1 -0
- package/dist/domain/entities/plan.d.ts +42 -0
- package/dist/domain/entities/plan.d.ts.map +1 -0
- package/dist/domain/entities/plan.js +6 -0
- package/dist/domain/entities/plan.js.map +1 -0
- package/dist/domain/entities/query.d.ts +17 -0
- package/dist/domain/entities/query.d.ts.map +1 -0
- package/dist/domain/entities/query.js +6 -0
- package/dist/domain/entities/query.js.map +1 -0
- package/dist/domain/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/index.d.ts +16 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +19 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts +72 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.js +6 -0
- package/dist/domain/interfaces/ai-service.interface.js.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts +38 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.js +6 -0
- package/dist/domain/interfaces/code-analyzer.interface.js.map +1 -0
- package/dist/domain/interfaces/context-repository.interface.d.ts +71 -0
- package/dist/domain/interfaces/context-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/context-repository.interface.js +10 -0
- package/dist/domain/interfaces/context-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts +51 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.js +9 -0
- package/dist/domain/interfaces/decision-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +33 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.js +6 -0
- package/dist/domain/interfaces/embedding-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts +91 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js +9 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts +50 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js +8 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts +49 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.js +6 -0
- package/dist/domain/interfaces/memory-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts +48 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.js +6 -0
- package/dist/domain/interfaces/pattern-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts +20 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.js +6 -0
- package/dist/domain/interfaces/verification-service.interface.js.map +1 -0
- package/dist/domain/services/codebase-detector.d.ts +18 -0
- package/dist/domain/services/codebase-detector.d.ts.map +1 -0
- package/dist/domain/services/codebase-detector.js +91 -0
- package/dist/domain/services/codebase-detector.js.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts +65 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.js +125 -0
- package/dist/domain/services/cross-team-pattern-sharing.js.map +1 -0
- package/dist/domain/services/decision-recorder.d.ts +76 -0
- package/dist/domain/services/decision-recorder.d.ts.map +1 -0
- package/dist/domain/services/decision-recorder.js +223 -0
- package/dist/domain/services/decision-recorder.js.map +1 -0
- package/dist/domain/services/decision-retriever.d.ts +75 -0
- package/dist/domain/services/decision-retriever.d.ts.map +1 -0
- package/dist/domain/services/decision-retriever.js +133 -0
- package/dist/domain/services/decision-retriever.js.map +1 -0
- package/dist/domain/services/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/graded-memory-activation.d.ts +37 -0
- package/dist/domain/services/graded-memory-activation.d.ts.map +1 -0
- package/dist/domain/services/graded-memory-activation.js +69 -0
- package/dist/domain/services/graded-memory-activation.js.map +1 -0
- package/dist/domain/services/knowledge-access.d.ts +63 -0
- package/dist/domain/services/knowledge-access.d.ts.map +1 -0
- package/dist/domain/services/knowledge-access.js +132 -0
- package/dist/domain/services/knowledge-access.js.map +1 -0
- package/dist/domain/services/knowledge-extractor.d.ts +54 -0
- package/dist/domain/services/knowledge-extractor.d.ts.map +1 -0
- package/dist/domain/services/knowledge-extractor.js +247 -0
- package/dist/domain/services/knowledge-extractor.js.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts +70 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.js +268 -0
- package/dist/domain/services/knowledge-graph-builder.js.map +1 -0
- package/dist/domain/services/knowledge-graph-query.d.ts +69 -0
- package/dist/domain/services/knowledge-graph-query.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-query.js +187 -0
- package/dist/domain/services/knowledge-graph-query.js.map +1 -0
- package/dist/domain/services/memory-retriever.d.ts +30 -0
- package/dist/domain/services/memory-retriever.d.ts.map +1 -0
- package/dist/domain/services/memory-retriever.js +82 -0
- package/dist/domain/services/memory-retriever.js.map +1 -0
- package/dist/domain/services/memory-synthesizer.d.ts +57 -0
- package/dist/domain/services/memory-synthesizer.d.ts.map +1 -0
- package/dist/domain/services/memory-synthesizer.js +91 -0
- package/dist/domain/services/memory-synthesizer.js.map +1 -0
- package/dist/domain/services/pattern-extractor.d.ts +108 -0
- package/dist/domain/services/pattern-extractor.d.ts.map +1 -0
- package/dist/domain/services/pattern-extractor.js +442 -0
- package/dist/domain/services/pattern-extractor.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts +16 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -0
- package/dist/domain/services/query-intent-classifier.js +173 -0
- package/dist/domain/services/query-intent-classifier.js.map +1 -0
- package/dist/domain/services/react-loop.d.ts +52 -0
- package/dist/domain/services/react-loop.d.ts.map +1 -0
- package/dist/domain/services/react-loop.js +186 -0
- package/dist/domain/services/react-loop.js.map +1 -0
- package/dist/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/edit.d.ts +26 -0
- package/dist/edit.d.ts 2.map +1 -0
- package/dist/edit.d.ts.map +1 -0
- package/dist/edit.js +319 -0
- package/dist/edit.js.map +1 -0
- package/dist/embed.d 2.ts +14 -0
- package/dist/embed.d.ts +14 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +472 -0
- package/dist/embed.js.map +1 -0
- package/dist/error-handler.d 2.ts +77 -0
- package/dist/error-handler.d.ts +77 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +256 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/formatter 2.js +168 -0
- package/dist/formatter.d.ts +25 -0
- package/dist/formatter.d.ts 2.map +1 -0
- package/dist/formatter.d.ts.map +1 -0
- package/dist/formatter.js +168 -0
- package/dist/formatter.js.map +1 -0
- package/dist/git 2.js +198 -0
- package/dist/git.d 2.ts +55 -0
- package/dist/git.d.ts +55 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +198 -0
- package/dist/git.js.map +1 -0
- package/dist/index 2.d.ts +16 -0
- package/dist/index 2.d.ts.map +1 -0
- package/dist/index 2.js +429 -0
- package/dist/index 2.js.map +1 -0
- package/dist/index-backup-before-lazy-loading.d.ts +3 -0
- package/dist/index-backup-before-lazy-loading.d.ts.map +1 -0
- package/dist/index-backup-before-lazy-loading.js +1551 -0
- package/dist/index-backup-before-lazy-loading.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts 2.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +489 -0
- package/dist/index.js 2.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +71 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.js +676 -0
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts +42 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.js +206 -0
- package/dist/infrastructure/ai/command-r-evaluation.js.map +1 -0
- package/dist/infrastructure/ai/model-config.d.ts +47 -0
- package/dist/infrastructure/ai/model-config.d.ts.map +1 -0
- package/dist/infrastructure/ai/model-config.js +84 -0
- package/dist/infrastructure/ai/model-config.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +67 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +580 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +58 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.js +175 -0
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts +27 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.js +66 -0
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -0
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +16 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.js +47 -0
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts +12 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js +19 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts +63 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js +397 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js.map +1 -0
- package/dist/infrastructure/completion/bash-completion.d.ts +7 -0
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/bash-completion.js +25 -0
- package/dist/infrastructure/completion/bash-completion.js.map +1 -0
- package/dist/infrastructure/completion/fish-completion.d.ts +7 -0
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/fish-completion.js +22 -0
- package/dist/infrastructure/completion/fish-completion.js.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts +7 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.js +30 -0
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -0
- package/dist/infrastructure/config/config-manager.d.ts +158 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -0
- package/dist/infrastructure/config/config-manager.js +294 -0
- package/dist/infrastructure/config/config-manager.js.map +1 -0
- package/dist/infrastructure/context/context-compressor.d.ts +94 -0
- package/dist/infrastructure/context/context-compressor.d.ts.map +1 -0
- package/dist/infrastructure/context/context-compressor.js +329 -0
- package/dist/infrastructure/context/context-compressor.js.map +1 -0
- package/dist/infrastructure/context/conversation-context.d.ts +82 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +213 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/direct-context-provider.d.ts +18 -0
- package/dist/infrastructure/context/direct-context-provider.d.ts.map +1 -0
- package/dist/infrastructure/context/direct-context-provider.js +222 -0
- package/dist/infrastructure/context/direct-context-provider.js.map +1 -0
- package/dist/infrastructure/context/git-context-provider.d.ts +30 -0
- package/dist/infrastructure/context/git-context-provider.d.ts.map +1 -0
- package/dist/infrastructure/context/git-context-provider.js +140 -0
- package/dist/infrastructure/context/git-context-provider.js.map +1 -0
- package/dist/infrastructure/context/project-context-loader.d.ts +35 -0
- package/dist/infrastructure/context/project-context-loader.d.ts.map +1 -0
- package/dist/infrastructure/context/project-context-loader.js +184 -0
- package/dist/infrastructure/context/project-context-loader.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +91 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.js +361 -0
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -0
- package/dist/infrastructure/cost/session-token-tracker.d.ts +68 -0
- package/dist/infrastructure/cost/session-token-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/session-token-tracker.js +178 -0
- package/dist/infrastructure/cost/session-token-tracker.js.map +1 -0
- package/dist/infrastructure/cost-calculator.d.ts +34 -0
- package/dist/infrastructure/cost-calculator.d.ts.map +1 -0
- package/dist/infrastructure/cost-calculator.js +145 -0
- package/dist/infrastructure/cost-calculator.js.map +1 -0
- package/dist/infrastructure/cost-estimator.d.ts +48 -0
- package/dist/infrastructure/cost-estimator.d.ts.map +1 -0
- package/dist/infrastructure/cost-estimator.js +201 -0
- package/dist/infrastructure/cost-estimator.js.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts +31 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.js +106 -0
- package/dist/infrastructure/file-scanner/file-scanner.js.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +105 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js +292 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts +88 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.js +257 -0
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +136 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +239 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -0
- package/dist/infrastructure/index.d.ts +7 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +7 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts +130 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.js +400 -0
- package/dist/infrastructure/observability/execution-tracer.js.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts +67 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.js +145 -0
- package/dist/infrastructure/observability/prompt-versioner.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts +278 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.js +137 -0
- package/dist/infrastructure/protocols/a2a-metadata.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts +132 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.js +314 -0
- package/dist/infrastructure/protocols/a2a-protocol.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts +91 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.js +184 -0
- package/dist/infrastructure/protocols/mcp-oauth.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts +126 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.js +333 -0
- package/dist/infrastructure/protocols/mcp-server.js.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts +57 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.js +103 -0
- package/dist/infrastructure/protocols/streaming-handler.js.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +470 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +138 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +336 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +445 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +407 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +105 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.js.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts +59 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.js +241 -0
- package/dist/infrastructure/security/ai-sast-scanner.js.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts +57 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.js +178 -0
- package/dist/infrastructure/security/docker-sandbox.js.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts +66 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.js +210 -0
- package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts +46 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -0
- package/dist/infrastructure/security/input-validator.js +269 -0
- package/dist/infrastructure/security/input-validator.js.map +1 -0
- package/dist/infrastructure/security/license-scanner.d.ts +55 -0
- package/dist/infrastructure/security/license-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/license-scanner.js +167 -0
- package/dist/infrastructure/security/license-scanner.js.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts +53 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.js +164 -0
- package/dist/infrastructure/security/provider-bias-detector.js.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts +34 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.js +64 -0
- package/dist/infrastructure/security/sandbox-executor.js.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +47 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts +47 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.js +204 -0
- package/dist/infrastructure/storage/memory-stream-service.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +40 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/plan-repository.js +95 -0
- package/dist/infrastructure/storage/plan-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts +95 -0
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-context-repository.js +467 -0
- package/dist/infrastructure/storage/sqlite-context-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js +228 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +47 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +323 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts +41 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +413 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +226 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts +40 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js +225 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts +25 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js +245 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -0
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +67 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +205 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts +77 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.js +213 -0
- package/dist/infrastructure/ux/appropriate-friction.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +131 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.js +337 -0
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/cli-style-guide.d.ts +105 -0
- package/dist/infrastructure/ux/cli-style-guide.d.ts.map +1 -0
- package/dist/infrastructure/ux/cli-style-guide.js +220 -0
- package/dist/infrastructure/ux/cli-style-guide.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +11 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js +10 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/expectation-management.d.ts +98 -0
- package/dist/infrastructure/ux/expectation-management.d.ts.map +1 -0
- package/dist/infrastructure/ux/expectation-management.js +327 -0
- package/dist/infrastructure/ux/expectation-management.js.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts +17 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.js +14 -0
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts +139 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.js +297 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts +53 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.js +116 -0
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts +84 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.js +236 -0
- package/dist/infrastructure/ux/progressive-disclosure.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +37 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.js +72 -0
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +22 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.js +24 -0
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +20 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.js +91 -0
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -0
- package/dist/infrastructure/ux/team-standards.d.ts +94 -0
- package/dist/infrastructure/ux/team-standards.d.ts.map +1 -0
- package/dist/infrastructure/ux/team-standards.js +196 -0
- package/dist/infrastructure/ux/team-standards.js.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts +57 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +100 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/hallucination-detector.d.ts +121 -0
- package/dist/infrastructure/validation/hallucination-detector.d.ts.map +1 -0
- package/dist/infrastructure/validation/hallucination-detector.js +388 -0
- package/dist/infrastructure/validation/hallucination-detector.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.js.map +1 -0
- package/dist/infrastructure/verification/verification-service.d.ts +12 -0
- package/dist/infrastructure/verification/verification-service.d.ts.map +1 -0
- package/dist/infrastructure/verification/verification-service.js +47 -0
- package/dist/infrastructure/verification/verification-service.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +71 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.js +172 -0
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts +103 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.js +283 -0
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts +100 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.js +212 -0
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts +104 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.js +260 -0
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +77 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js +198 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -0
- package/dist/intelligent-retrieval 2.js +272 -0
- package/dist/intelligent-retrieval.d.ts +41 -0
- package/dist/intelligent-retrieval.d.ts 2.map +1 -0
- package/dist/intelligent-retrieval.d.ts.map +1 -0
- package/dist/intelligent-retrieval.js +272 -0
- package/dist/intelligent-retrieval.js.map +1 -0
- package/dist/intent/classifier.d.ts +6 -0
- package/dist/intent/classifier.d.ts.map +1 -0
- package/dist/intent/classifier.js +2 -0
- package/dist/intent/classifier.js.map +1 -0
- package/dist/intent/context.d.ts +4 -0
- package/dist/intent/context.d.ts.map +1 -0
- package/dist/intent/context.js +2 -0
- package/dist/intent/context.js.map +1 -0
- package/dist/iterative-refinement.d.ts +31 -0
- package/dist/iterative-refinement.d.ts.map +1 -0
- package/dist/iterative-refinement.js +189 -0
- package/dist/iterative-refinement.js.map +1 -0
- package/dist/learning.d.ts +69 -0
- package/dist/learning.d.ts.map +1 -0
- package/dist/learning.js +232 -0
- package/dist/learning.js.map +1 -0
- package/dist/log.d.ts +4 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +31 -0
- package/dist/log.js 2.map +1 -0
- package/dist/log.js.map +1 -0
- package/dist/migrate.d.ts +33 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +133 -0
- package/dist/migrate.js 2.map +1 -0
- package/dist/migrate.js.map +1 -0
- package/dist/monitoring.d.ts +75 -0
- package/dist/monitoring.d.ts.map +1 -0
- package/dist/monitoring.js +250 -0
- package/dist/monitoring.js.map +1 -0
- package/dist/parallel-processor.d 2.ts +44 -0
- package/dist/parallel-processor.d.ts +44 -0
- package/dist/parallel-processor.d.ts.map +1 -0
- package/dist/parallel-processor.js +606 -0
- package/dist/parallel-processor.js.map +1 -0
- package/dist/planner.d.ts +47 -0
- package/dist/planner.d.ts.map +1 -0
- package/dist/planner.js +198 -0
- package/dist/planner.js.map +1 -0
- package/dist/policy.d 2.ts +3 -0
- package/dist/policy.d.ts +3 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +26 -0
- package/dist/policy.js.map +1 -0
- package/dist/presentation/cli/commands/ask-command.d.ts +9 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/ask-command.js +355 -0
- package/dist/presentation/cli/commands/ask-command.js.map +1 -0
- package/dist/presentation/cli/commands/audit-command.d.ts +13 -0
- package/dist/presentation/cli/commands/audit-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/audit-command.js +96 -0
- package/dist/presentation/cli/commands/audit-command.js.map +1 -0
- package/dist/presentation/cli/commands/config-command.d.ts +9 -0
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/config-command.js +125 -0
- package/dist/presentation/cli/commands/config-command.js.map +1 -0
- package/dist/presentation/cli/commands/context-command.d.ts +32 -0
- package/dist/presentation/cli/commands/context-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/context-command.js +295 -0
- package/dist/presentation/cli/commands/context-command.js.map +1 -0
- package/dist/presentation/cli/commands/context-helper.d.ts +16 -0
- package/dist/presentation/cli/commands/context-helper.d.ts.map +1 -0
- package/dist/presentation/cli/commands/context-helper.js +88 -0
- package/dist/presentation/cli/commands/context-helper.js.map +1 -0
- package/dist/presentation/cli/commands/cost-command.d.ts +8 -0
- package/dist/presentation/cli/commands/cost-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/cost-command.js +191 -0
- package/dist/presentation/cli/commands/cost-command.js.map +1 -0
- package/dist/presentation/cli/commands/decision-command.d.ts +12 -0
- package/dist/presentation/cli/commands/decision-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/decision-command.js +207 -0
- package/dist/presentation/cli/commands/decision-command.js.map +1 -0
- package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +15 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +93 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts +9 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/help-command.js +283 -0
- package/dist/presentation/cli/commands/help-command.js.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts +13 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.js +129 -0
- package/dist/presentation/cli/commands/knowledge-command.js.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts +8 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js +183 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js.map +1 -0
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +10 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.js +249 -0
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts +9 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/plan-command.js +246 -0
- package/dist/presentation/cli/commands/plan-command.js.map +1 -0
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts +8 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/react-command.js +181 -0
- package/dist/presentation/cli/commands/react-command.js.map +1 -0
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +154 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts +10 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/setup-command.js +301 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -0
- package/dist/presentation/cli/commands/smart-command.d.ts +11 -0
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/smart-command.js +517 -0
- package/dist/presentation/cli/commands/smart-command.js.map +1 -0
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +167 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/commands/trace-command.d.ts +8 -0
- package/dist/presentation/cli/commands/trace-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/trace-command.js +129 -0
- package/dist/presentation/cli/commands/trace-command.js.map +1 -0
- package/dist/presentation/cli/commands/trust-command.d.ts +28 -0
- package/dist/presentation/cli/commands/trust-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/trust-command.js +301 -0
- package/dist/presentation/cli/commands/trust-command.js.map +1 -0
- package/dist/presentation/cli/commands/undo-command.d.ts +8 -0
- package/dist/presentation/cli/commands/undo-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/undo-command.js +150 -0
- package/dist/presentation/cli/commands/undo-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts +25 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -0
- package/dist/presentation/cli/error-display.js +340 -0
- package/dist/presentation/cli/error-display.js.map +1 -0
- package/dist/query-optimizer.d.ts +32 -0
- package/dist/query-optimizer.d.ts.map +1 -0
- package/dist/query-optimizer.js +205 -0
- package/dist/query-optimizer.js.map +1 -0
- package/dist/refactor.d.ts +27 -0
- package/dist/refactor.d.ts.map +1 -0
- package/dist/refactor.js +116 -0
- package/dist/refactor.js.map +1 -0
- package/dist/review 2.js +206 -0
- package/dist/review.d.ts +31 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/review.js +206 -0
- package/dist/review.js.map +1 -0
- package/dist/search.d.ts +19 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +193 -0
- package/dist/search.js 2.map +1 -0
- package/dist/search.js.map +1 -0
- package/dist/session 2.js +593 -0
- package/dist/session.d.ts +17 -0
- package/dist/session.d.ts 2.map +1 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +593 -0
- package/dist/session.js.map +1 -0
- package/dist/task-verification 2.js +336 -0
- package/dist/task-verification.d.ts +39 -0
- package/dist/task-verification.d.ts 2.map +1 -0
- package/dist/task-verification.d.ts.map +1 -0
- package/dist/task-verification.js +336 -0
- package/dist/task-verification.js.map +1 -0
- package/dist/test-minimal.d.ts +2 -0
- package/dist/test-minimal.d.ts.map +1 -0
- package/dist/test-minimal.js +2 -0
- package/dist/test-minimal.js.map +1 -0
- package/dist/testgen.d.ts +24 -0
- package/dist/testgen.d.ts.map +1 -0
- package/dist/testgen.js +166 -0
- package/dist/testgen.js 2.map +1 -0
- package/dist/testgen.js.map +1 -0
- package/dist/token-optimizer.d 2.ts +20 -0
- package/dist/token-optimizer.d.ts +20 -0
- package/dist/token-optimizer.d.ts.map +1 -0
- package/dist/token-optimizer.js +282 -0
- package/dist/token-optimizer.js.map +1 -0
- package/dist/tools/bash.d.ts +53 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +213 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/edit.d.ts +48 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/edit.js +235 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/executor.d.ts +29 -0
- package/dist/tools/executor.d.ts.map +1 -0
- package/dist/tools/executor.js +153 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/git-tool.d.ts +87 -0
- package/dist/tools/git-tool.d.ts.map +1 -0
- package/dist/tools/git-tool.js +292 -0
- package/dist/tools/git-tool.js.map +1 -0
- package/dist/tools/parser.d.ts +33 -0
- package/dist/tools/parser.d.ts.map +1 -0
- package/dist/tools/parser.js +158 -0
- package/dist/tools/parser.js.map +1 -0
- package/dist/tools/registry.d.ts +74 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +302 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/search.d.ts +41 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +100 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +60 -0
- package/dist/ui.d.ts 2.map +1 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +334 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils/check-api-status.d.ts +12 -0
- package/dist/utils/check-api-status.d.ts.map +1 -0
- package/dist/utils/check-api-status.js +82 -0
- package/dist/utils/check-api-status.js.map +1 -0
- package/dist/utils/debug.d.ts +7 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/debug.js +24 -0
- package/dist/utils/debug.js.map +1 -0
- package/dist/utils/diff-parser.d.ts +22 -0
- package/dist/utils/diff-parser.d.ts.map +1 -0
- package/dist/utils/diff-parser.js +192 -0
- package/dist/utils/diff-parser.js.map +1 -0
- package/dist/utils/provider-check.d.ts +21 -0
- package/dist/utils/provider-check.d.ts.map +1 -0
- package/dist/utils/provider-check.js +124 -0
- package/dist/utils/provider-check.js.map +1 -0
- package/dist/utils/version.d.ts +21 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +52 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/verification/backup.d.ts +30 -0
- package/dist/verification/backup.d.ts.map +1 -0
- package/dist/verification/backup.js +259 -0
- package/dist/verification/backup.js.map +1 -0
- package/dist/verification/compiler.d.ts +20 -0
- package/dist/verification/compiler.d.ts.map +1 -0
- package/dist/verification/compiler.js +263 -0
- package/dist/verification/compiler.js.map +1 -0
- package/dist/verification/index.d.ts +59 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +273 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/test-runner.d.ts +27 -0
- package/dist/verification/test-runner.d.ts.map +1 -0
- package/dist/verification/test-runner.js +379 -0
- package/dist/verification/test-runner.js.map +1 -0
- package/dist/verify_db.d.ts +2 -0
- package/dist/verify_db.d.ts.map +1 -0
- package/dist/verify_db.js +52 -0
- package/dist/verify_db.js 2.map +1 -0
- package/dist/verify_db.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning-use-case.js","sourceRoot":"","sources":["../../../src/application/use-cases/planning-use-case.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AA2BpC,MAAM,OAAO,eAAe;IAMhB;IAGA;IARF,YAAY,CAAsB;IAClC,iBAAiB,CAAoB;IACrC,gBAAgB,CAAoB;IAE5C,YACU,SAAqB,EAC7B,YAAiC,EACjC,gBAAmC,EAC3B,gBAAmC;QAHnC,cAAS,GAAT,SAAS,CAAY;QAGrB,qBAAgB,GAAhB,gBAAgB,CAAmB;QAE3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,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AAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;wBAC7C,UAAU,EAAE,QAAQ,CAAC,UAAU,IAAI,QAAQ;wBAC3C,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;wBAC7C,QAAQ,EAAE,CAAC;qBACZ;iBACF,CAAC;gBAEF,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,yBAAyB;QAC3B,CAAC;QAED,8BAA8B;QAC9B,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,oBAAoB,OAAO,CAAC,IAAI,EAAE;YAC/C,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,WAAW;oBACf,WAAW,EAAE,qBAAqB,OAAO,CAAC,IAAI,EAAE;oBAChD,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,SAAS;oBACjB,YAAY,EAAE,EAAE;oBAChB,cAAc,EAAE,CAAC;iBAClB;aACF;YACD,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE;gBACR,YAAY,EAAE,EAAE;gBAChB,WAAW,EAAE,EAAE;gBACf,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE,CAAC;aACZ;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Use Case: ReActOrchestrationUseCase
|
|
3
|
+
* Orchestrates ReAct loop with Memory Stream
|
|
4
|
+
*/
|
|
5
|
+
import { type ReActTrajectory } from '../../domain/services/react-loop.js';
|
|
6
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
7
|
+
import { MemoryStreamService } from '../../infrastructure/storage/memory-stream-service.js';
|
|
8
|
+
import { ToolExecutorService } from '../services/tool-executor-service.js';
|
|
9
|
+
import type { Memory } from '../../domain/entities/memory.js';
|
|
10
|
+
import { DecisionTreeLog } from '../../infrastructure/xai/decision-tree-log.js';
|
|
11
|
+
import { UncertaintyQuantifier, type UncertaintyResult } from '../../infrastructure/xai/uncertainty-quantifier.js';
|
|
12
|
+
import { CoTVisualizer, type CoTTrajectory } from '../../infrastructure/xai/cot-visualizer.js';
|
|
13
|
+
import { AttentionVisualizer, type AttentionMap } from '../../infrastructure/xai/attention-visualizer.js';
|
|
14
|
+
export interface ReActStreamHandler {
|
|
15
|
+
onToken?: (token: string) => void;
|
|
16
|
+
onThought?: (thought: string) => void;
|
|
17
|
+
onAction?: (action: string) => void;
|
|
18
|
+
onObservation?: (observation: string) => void;
|
|
19
|
+
onComplete?: (fullText: string) => void;
|
|
20
|
+
onError?: (error: Error) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface ReActRequest {
|
|
23
|
+
query: string;
|
|
24
|
+
context?: any;
|
|
25
|
+
maxTurns?: number;
|
|
26
|
+
streamHandler?: ReActStreamHandler;
|
|
27
|
+
}
|
|
28
|
+
export interface ReActResponse {
|
|
29
|
+
trajectory: ReActTrajectory;
|
|
30
|
+
answer: string;
|
|
31
|
+
memoriesUsed: Memory[];
|
|
32
|
+
decisionTree?: any;
|
|
33
|
+
uncertainty?: UncertaintyResult;
|
|
34
|
+
cotTrajectory?: CoTTrajectory;
|
|
35
|
+
attentionMap?: AttentionMap;
|
|
36
|
+
}
|
|
37
|
+
export declare class ReActOrchestrationUseCase {
|
|
38
|
+
private aiService;
|
|
39
|
+
private memoryStream;
|
|
40
|
+
private toolExecutor;
|
|
41
|
+
private decisionTreeLog;
|
|
42
|
+
private uncertaintyQuantifier?;
|
|
43
|
+
private cotVisualizer?;
|
|
44
|
+
private attentionVisualizer?;
|
|
45
|
+
constructor(aiService: IAIService, memoryStream: MemoryStreamService, toolExecutor?: ToolExecutorService, decisionTreeLog?: DecisionTreeLog, uncertaintyQuantifier?: UncertaintyQuantifier, cotVisualizer?: CoTVisualizer, attentionVisualizer?: AttentionVisualizer);
|
|
46
|
+
execute(request: ReActRequest): Promise<ReActResponse>;
|
|
47
|
+
private generateThought;
|
|
48
|
+
private generateAction;
|
|
49
|
+
private isFinalAnswer;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=react-orchestration-use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-orchestration-use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/react-orchestration-use-case.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAa,KAAK,eAAe,EAA+C,MAAM,qCAAqC,CAAC;AACnI,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAA+C,MAAM,+CAA+C,CAAC;AAC7H,OAAO,EAAE,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACnH,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAE1G,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAA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
3
|
+
* Orchestrates ReAct loop with Memory Stream
|
|
4
|
+
*/
|
|
5
|
+
import { ReActLoop } from '../../domain/services/react-loop.js';
|
|
6
|
+
import { ToolExecutorService } from '../services/tool-executor-service.js';
|
|
7
|
+
import { DecisionTreeLog } from '../../infrastructure/xai/decision-tree-log.js';
|
|
8
|
+
export class ReActOrchestrationUseCase {
|
|
9
|
+
aiService;
|
|
10
|
+
memoryStream;
|
|
11
|
+
toolExecutor;
|
|
12
|
+
decisionTreeLog;
|
|
13
|
+
uncertaintyQuantifier;
|
|
14
|
+
cotVisualizer;
|
|
15
|
+
attentionVisualizer;
|
|
16
|
+
constructor(aiService, memoryStream, toolExecutor, decisionTreeLog, uncertaintyQuantifier, cotVisualizer, attentionVisualizer) {
|
|
17
|
+
this.aiService = aiService;
|
|
18
|
+
this.memoryStream = memoryStream;
|
|
19
|
+
this.toolExecutor = toolExecutor || new ToolExecutorService();
|
|
20
|
+
this.decisionTreeLog = decisionTreeLog || new DecisionTreeLog();
|
|
21
|
+
this.uncertaintyQuantifier = uncertaintyQuantifier;
|
|
22
|
+
this.cotVisualizer = cotVisualizer;
|
|
23
|
+
this.attentionVisualizer = attentionVisualizer;
|
|
24
|
+
}
|
|
25
|
+
async execute(request) {
|
|
26
|
+
const reactLoop = new ReActLoop(request.maxTurns || 20);
|
|
27
|
+
this.decisionTreeLog.clear(); // Start fresh for this execution
|
|
28
|
+
// 0. Create CoT trajectory for visualization (XAI Foundation - Research: CoT visualization)
|
|
29
|
+
let cotTrajectory;
|
|
30
|
+
if (this.cotVisualizer) {
|
|
31
|
+
cotTrajectory = this.cotVisualizer.createTrajectory(request.query);
|
|
32
|
+
}
|
|
33
|
+
// 1. Retrieve relevant memories
|
|
34
|
+
const memories = await this.memoryStream.retrieve(request.query, 10);
|
|
35
|
+
// 2. Get available tools for context
|
|
36
|
+
const { getToolRegistry } = await import('../../tools/registry.js');
|
|
37
|
+
const toolRegistry = getToolRegistry();
|
|
38
|
+
// Use getToolList() which returns formatted string with tool names and descriptions
|
|
39
|
+
// This helps prevent AI from hallucinating tool names
|
|
40
|
+
const availableTools = toolRegistry.getToolList(); // Returns formatted string
|
|
41
|
+
// 3. Log goal interpretation (XAI Foundation - Research: Full auditability required)
|
|
42
|
+
const goalId = `goal-${Date.now()}`;
|
|
43
|
+
const goalInterpretation = {
|
|
44
|
+
parsedIntent: request.query,
|
|
45
|
+
constraints: request.context?.constraints || [],
|
|
46
|
+
dependencies: memories.map(m => m.description).slice(0, 3), // Top dependencies
|
|
47
|
+
confidence: memories.length > 0 ? 0.8 : 0.6, // Higher confidence with memories
|
|
48
|
+
};
|
|
49
|
+
this.decisionTreeLog.logGoalInterpretation(goalId, goalInterpretation);
|
|
50
|
+
// 4. Build context with memories and tools
|
|
51
|
+
const context = {
|
|
52
|
+
...request.context,
|
|
53
|
+
memories,
|
|
54
|
+
query: request.query,
|
|
55
|
+
availableTools, // Now guaranteed to be an array
|
|
56
|
+
goalId, // Include goal ID for linking tool calls
|
|
57
|
+
};
|
|
58
|
+
// 4. Execute ReAct loop (with streaming support if handler provided)
|
|
59
|
+
const generateThoughtWithStreaming = async (query, context, trajectory) => {
|
|
60
|
+
const thought = await this.generateThought(query, context, trajectory);
|
|
61
|
+
// Add thought to CoT trajectory (XAI Foundation - Research: CoT visualization)
|
|
62
|
+
if (this.cotVisualizer && cotTrajectory) {
|
|
63
|
+
this.cotVisualizer.addThought(cotTrajectory, thought.content, {
|
|
64
|
+
reasoning: thought.reasoning,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Stream thought if handler provided
|
|
68
|
+
if (request.streamHandler?.onThought) {
|
|
69
|
+
request.streamHandler.onThought(thought.content);
|
|
70
|
+
}
|
|
71
|
+
return thought;
|
|
72
|
+
};
|
|
73
|
+
const generateActionWithStreaming = async (thought, context) => {
|
|
74
|
+
const action = await this.generateAction(thought, context);
|
|
75
|
+
// Add action to CoT trajectory (XAI Foundation - Research: CoT visualization)
|
|
76
|
+
if (this.cotVisualizer && cotTrajectory) {
|
|
77
|
+
const actionDesc = action.type === 'tool'
|
|
78
|
+
? `${action.type}: ${action.name}`
|
|
79
|
+
: `${action.type}: ${action.answer || 'final answer'}`;
|
|
80
|
+
this.cotVisualizer.addAction(cotTrajectory, actionDesc, {
|
|
81
|
+
tool: action.type === 'tool' ? action.name : undefined,
|
|
82
|
+
toolParams: action.type === 'tool' ? action.parameters : undefined,
|
|
83
|
+
reasoning: `Action selected based on thought: ${thought.content.substring(0, 100)}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Stream action if handler provided
|
|
87
|
+
if (request.streamHandler?.onAction) {
|
|
88
|
+
const actionDesc = `${action.type}: ${action.name}`;
|
|
89
|
+
request.streamHandler.onAction(actionDesc);
|
|
90
|
+
}
|
|
91
|
+
return action;
|
|
92
|
+
};
|
|
93
|
+
const executeActionWithStreaming = async (action) => {
|
|
94
|
+
const startTime = Date.now();
|
|
95
|
+
// Log tool rationale before execution (XAI Foundation - Research: Tool Rationale Logging)
|
|
96
|
+
if (action.type === 'tool') {
|
|
97
|
+
const toolId = `tool-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
98
|
+
const toolRationale = {
|
|
99
|
+
toolName: action.name,
|
|
100
|
+
parameters: action.parameters || {},
|
|
101
|
+
reasoning: `Tool selected based on thought and available context`,
|
|
102
|
+
alternativeTools: typeof context.availableTools === 'string'
|
|
103
|
+
? [] // Can't extract from string easily
|
|
104
|
+
: Array.isArray(context.availableTools)
|
|
105
|
+
? context.availableTools.filter((t) => {
|
|
106
|
+
const toolName = typeof t === 'string' ? t : t.name || t;
|
|
107
|
+
return toolName !== action.name;
|
|
108
|
+
}).slice(0, 3)
|
|
109
|
+
: [],
|
|
110
|
+
};
|
|
111
|
+
this.decisionTreeLog.logToolExecution(toolId, toolRationale, context.goalId || goalId);
|
|
112
|
+
// Store tool ID for linking observation
|
|
113
|
+
action.toolId = toolId;
|
|
114
|
+
}
|
|
115
|
+
const observation = await this.toolExecutor.executeAction(action);
|
|
116
|
+
const executionTime = Date.now() - startTime;
|
|
117
|
+
// Update tool execution with raw output and execution time (XAI Foundation - Research: Raw Output Capture)
|
|
118
|
+
if (action.type === 'tool' && action.toolId) {
|
|
119
|
+
const toolId = action.toolId;
|
|
120
|
+
// Re-log with execution results (Note: This is a simplified approach - in production, we'd update the node)
|
|
121
|
+
const toolRationaleWithResults = {
|
|
122
|
+
toolName: action.name,
|
|
123
|
+
parameters: action.parameters || {},
|
|
124
|
+
reasoning: `Tool executed successfully`,
|
|
125
|
+
executionTime,
|
|
126
|
+
rawOutput: observation.result, // Unaltered tool result for provenance
|
|
127
|
+
};
|
|
128
|
+
this.decisionTreeLog.logToolExecution(`tool-result-${toolId}`, toolRationaleWithResults, toolId);
|
|
129
|
+
}
|
|
130
|
+
// Add observation to CoT trajectory (XAI Foundation - Research: CoT visualization)
|
|
131
|
+
if (this.cotVisualizer && cotTrajectory) {
|
|
132
|
+
const obsContent = observation.success
|
|
133
|
+
? (typeof observation.result === 'string'
|
|
134
|
+
? observation.result
|
|
135
|
+
: JSON.stringify(observation.result, null, 2)).substring(0, 500) // Truncate for display
|
|
136
|
+
: `Error: ${observation.error || 'Failed'}`;
|
|
137
|
+
this.cotVisualizer.addObservation(cotTrajectory, obsContent, {
|
|
138
|
+
success: observation.success,
|
|
139
|
+
executionTime,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Stream observation result if handler provided
|
|
143
|
+
if (request.streamHandler?.onObservation) {
|
|
144
|
+
let obsDesc;
|
|
145
|
+
if (observation.success) {
|
|
146
|
+
if (typeof observation.result === 'string') {
|
|
147
|
+
obsDesc = `✓ ${observation.result}`;
|
|
148
|
+
}
|
|
149
|
+
else if (observation.result === null || observation.result === undefined) {
|
|
150
|
+
obsDesc = '✓ No result';
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
// Try to stringify, but handle circular references and large objects
|
|
154
|
+
try {
|
|
155
|
+
const serialized = JSON.stringify(observation.result, null, 2);
|
|
156
|
+
obsDesc = `✓ ${serialized.substring(0, 200)}${serialized.length > 200 ? '...' : ''}`;
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
// Fallback for objects that can't be stringified
|
|
160
|
+
obsDesc = `✓ ${String(observation.result).substring(0, 200)}`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
obsDesc = `✗ ${observation.error || 'Failed'}`;
|
|
166
|
+
}
|
|
167
|
+
request.streamHandler.onObservation(obsDesc);
|
|
168
|
+
}
|
|
169
|
+
// Log error if execution failed (XAI Foundation - Research: Error Trace for Fault Attribution)
|
|
170
|
+
if (!observation.success && action.toolId) {
|
|
171
|
+
this.decisionTreeLog.logError(`error-${Date.now()}`, new Error(observation.error || 'Tool execution failed'), { action, observation }, action.toolId);
|
|
172
|
+
// Add error to CoT trajectory
|
|
173
|
+
if (this.cotVisualizer && cotTrajectory) {
|
|
174
|
+
this.cotVisualizer.addError(cotTrajectory, observation.error || 'Tool execution failed', {
|
|
175
|
+
tool: action.name,
|
|
176
|
+
executionTime,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return observation;
|
|
181
|
+
};
|
|
182
|
+
const trajectory = await reactLoop.execute(request.query, context, generateThoughtWithStreaming, generateActionWithStreaming, executeActionWithStreaming, this.isFinalAnswer.bind(this));
|
|
183
|
+
// 5. Record observation
|
|
184
|
+
if (trajectory.success) {
|
|
185
|
+
await this.memoryStream.recordObservation(`Successfully completed: ${request.query}`, { trajectory });
|
|
186
|
+
}
|
|
187
|
+
// Get complete execution tree for auditability (XAI Foundation - Research: Full auditability)
|
|
188
|
+
const executionTree = this.decisionTreeLog.getExecutionTree();
|
|
189
|
+
// Quantify uncertainty in final answer (XAI Foundation - Research: Uncertainty Quantification)
|
|
190
|
+
let uncertainty;
|
|
191
|
+
const finalAnswer = trajectory.finalAnswer || 'Max iterations reached';
|
|
192
|
+
if (this.uncertaintyQuantifier && finalAnswer) {
|
|
193
|
+
uncertainty = await this.uncertaintyQuantifier.quantifyUncertainty(request.query, finalAnswer, {
|
|
194
|
+
chunks: memories.map(m => ({ content: m.description, filepath: m.filepath || '' })),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
// Finalize CoT trajectory (XAI Foundation - Research: CoT visualization)
|
|
198
|
+
if (this.cotVisualizer && cotTrajectory) {
|
|
199
|
+
this.cotVisualizer.completeTrajectory(cotTrajectory);
|
|
200
|
+
// Update status based on trajectory success
|
|
201
|
+
if (!trajectory.success) {
|
|
202
|
+
cotTrajectory.status = 'failed';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// Generate attention map from memories (XAI Foundation - Research: Attention visualization)
|
|
206
|
+
let attentionMap;
|
|
207
|
+
if (this.attentionVisualizer && memories.length > 0) {
|
|
208
|
+
attentionMap = this.attentionVisualizer.generateAttentionMap(request.query, memories.map(m => ({
|
|
209
|
+
filepath: m.filepath || '',
|
|
210
|
+
content: m.description,
|
|
211
|
+
score: m.relevanceScore || 0.5, // Default score if not available
|
|
212
|
+
})));
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
trajectory,
|
|
216
|
+
answer: finalAnswer,
|
|
217
|
+
memoriesUsed: memories,
|
|
218
|
+
decisionTree: executionTree, // Complete audit trail
|
|
219
|
+
uncertainty, // XAI Foundation - Uncertainty quantification for transparency
|
|
220
|
+
cotTrajectory, // XAI Foundation - Chain-of-Thought visualization
|
|
221
|
+
attentionMap, // XAI Foundation - Attention visualization
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
async generateThought(query, context, trajectory) {
|
|
225
|
+
const memoryContext = context.memories?.length > 0
|
|
226
|
+
? `\n\nPrevious experiences:\n${context.memories.map((m) => `- ${m.description}`).join('\n')}`
|
|
227
|
+
: '';
|
|
228
|
+
const trajectoryContext = trajectory.steps.length > 0
|
|
229
|
+
? `\n\nPrevious steps:\n${trajectory.steps.map((s, i) => `${i + 1}. Thought: ${s.thought.content}\n Action: ${s.action.name}\n Result: ${s.observation.success ? 'Success' : 'Failed'}`).join('\n')}`
|
|
230
|
+
: '';
|
|
231
|
+
const prompt = `You are a reasoning agent. Generate a thought about how to solve this query.
|
|
232
|
+
|
|
233
|
+
Query: ${query}${memoryContext}${trajectoryContext}
|
|
234
|
+
|
|
235
|
+
Generate a thought that:
|
|
236
|
+
1. Analyzes the current situation
|
|
237
|
+
2. Considers what needs to be done next
|
|
238
|
+
3. Reasons about the best approach
|
|
239
|
+
|
|
240
|
+
Thought:`;
|
|
241
|
+
const response = await this.aiService.chat(prompt, [], context.memories || []);
|
|
242
|
+
return {
|
|
243
|
+
content: response,
|
|
244
|
+
reasoning: response,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
async generateAction(thought, context) {
|
|
248
|
+
// Ensure availableTools is a formatted string (not array)
|
|
249
|
+
const availableTools = typeof context.availableTools === 'string'
|
|
250
|
+
? context.availableTools
|
|
251
|
+
: Array.isArray(context.availableTools)
|
|
252
|
+
? context.availableTools.map((t) => `- ${t}: ${typeof t === 'string' ? t : t.name || t}`).join('\n')
|
|
253
|
+
: 'No tools available';
|
|
254
|
+
const trajectory = context.trajectory || { steps: [] };
|
|
255
|
+
const trajectoryContext = trajectory.steps.length > 0
|
|
256
|
+
? `\n\nPrevious actions:\n${trajectory.steps.map((s, i) => `${i + 1}. ${s.action.type}: ${s.action.name} - ${s.observation.success ? 'Success' : 'Failed: ' + (s.observation.error || 'Unknown')}`).join('\n')}`
|
|
257
|
+
: '';
|
|
258
|
+
const memoryContext = context.memories?.length > 0
|
|
259
|
+
? `\n\nRelevant past experiences:\n${context.memories.slice(0, 3).map((m) => `- ${m.description}`).join('\n')}`
|
|
260
|
+
: '';
|
|
261
|
+
const prompt = `You are a reasoning agent. Based on this thought, decide the next action.
|
|
262
|
+
|
|
263
|
+
Thought: ${thought.content}${memoryContext}${trajectoryContext}
|
|
264
|
+
|
|
265
|
+
Available tools:
|
|
266
|
+
${availableTools}
|
|
267
|
+
|
|
268
|
+
CRITICAL: Respond with ONLY valid JSON in this exact format:
|
|
269
|
+
{
|
|
270
|
+
"type": "tool" | "agent" | "answer",
|
|
271
|
+
"name": "tool_or_agent_name",
|
|
272
|
+
"parameters": {...}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
Examples:
|
|
276
|
+
- Use search tool: {"type": "tool", "name": "search", "parameters": {"query": "authentication"}}
|
|
277
|
+
- View file: {"type": "tool", "name": "edit_view", "parameters": {"filepath": "src/auth.ts"}}
|
|
278
|
+
- Final answer: {"type": "answer", "name": "final", "parameters": {"answer": "The answer is..."}}
|
|
279
|
+
|
|
280
|
+
JSON only, no other text:`;
|
|
281
|
+
const response = await this.aiService.chat(prompt, [], context.memories || []);
|
|
282
|
+
try {
|
|
283
|
+
// Extract JSON - try multiple patterns
|
|
284
|
+
let jsonStr = response.trim();
|
|
285
|
+
// Remove markdown code blocks if present
|
|
286
|
+
jsonStr = jsonStr.replace(/```json\n?/g, '').replace(/```\n?/g, '').trim();
|
|
287
|
+
// Find JSON object
|
|
288
|
+
const jsonMatch = jsonStr.match(/\{[\s\S]*\}/);
|
|
289
|
+
if (jsonMatch) {
|
|
290
|
+
const parsed = JSON.parse(jsonMatch[0]);
|
|
291
|
+
if (parsed.type && parsed.name) {
|
|
292
|
+
return {
|
|
293
|
+
type: parsed.type,
|
|
294
|
+
name: parsed.name,
|
|
295
|
+
parameters: parsed.parameters || {},
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
catch (e) {
|
|
301
|
+
// Fall through to fallback
|
|
302
|
+
}
|
|
303
|
+
// Fallback: analyze thought to determine action
|
|
304
|
+
const thoughtLower = thought.content.toLowerCase();
|
|
305
|
+
if (thoughtLower.includes('search') || thoughtLower.includes('find') || thoughtLower.includes('look')) {
|
|
306
|
+
// Extract query from thought
|
|
307
|
+
const queryMatch = thought.content.match(/(?:search|find|look for|locate)\s+(.+)/i);
|
|
308
|
+
return {
|
|
309
|
+
type: 'tool',
|
|
310
|
+
name: 'search',
|
|
311
|
+
parameters: { query: queryMatch ? queryMatch[1] : thought.content },
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
if (thoughtLower.includes('view') || thoughtLower.includes('read') || thoughtLower.includes('file')) {
|
|
315
|
+
// Try to extract filepath
|
|
316
|
+
const fileMatch = thought.content.match(/(?:view|read|file|open)\s+([^\s]+\.(ts|js|tsx|jsx|py|java|cpp))/i);
|
|
317
|
+
if (fileMatch) {
|
|
318
|
+
return {
|
|
319
|
+
type: 'tool',
|
|
320
|
+
name: 'edit_view',
|
|
321
|
+
parameters: { filepath: fileMatch[1] },
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (thoughtLower.includes('answer') || thoughtLower.includes('complete') || thoughtLower.includes('done') || thoughtLower.includes('solution')) {
|
|
326
|
+
return {
|
|
327
|
+
type: 'answer',
|
|
328
|
+
name: 'final_answer',
|
|
329
|
+
parameters: { answer: thought.content },
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
// Default: provide answer based on thought
|
|
333
|
+
return {
|
|
334
|
+
type: 'answer',
|
|
335
|
+
name: 'direct_answer',
|
|
336
|
+
parameters: { answer: thought.content },
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
isFinalAnswer(observation) {
|
|
340
|
+
// If observation failed, not a final answer
|
|
341
|
+
if (!observation.success)
|
|
342
|
+
return false;
|
|
343
|
+
// Check if result is a meaningful string answer
|
|
344
|
+
if (typeof observation.result === 'string') {
|
|
345
|
+
const lower = observation.result.toLowerCase();
|
|
346
|
+
const result = observation.result.trim();
|
|
347
|
+
// Not a final answer if it's a tool execution message or empty
|
|
348
|
+
if (result.length === 0)
|
|
349
|
+
return false;
|
|
350
|
+
if (lower.includes('executed') || lower.includes('tool') || lower.includes('found 0')) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
// If it's a substantial answer (more than just status), it's final
|
|
354
|
+
if (result.length > 20 && !lower.includes('error')) {
|
|
355
|
+
return true;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
// Check if it's an answer type action result
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
//# sourceMappingURL=react-orchestration-use-case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-orchestration-use-case.js","sourceRoot":"","sources":["../../../src/application/use-cases/react-orchestration-use-case.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAqE,MAAM,qCAAqC,CAAC;AAGnI,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAA+C,MAAM,+CAA+C,CAAC;AA+B7H,MAAM,OAAO,yBAAyB;IAS1B;IARF,YAAY,CAAsB;IAClC,YAAY,CAAsB;IAClC,eAAe,CAAkB;IACjC,qBAAqB,CAAyB;IAC9C,aAAa,CAAiB;IAC9B,mBAAmB,CAAuB;IAElD,YACU,SAAqB,EAC7B,YAAiC,EACjC,YAAkC,EAClC,eAAiC,EACjC,qBAA6C,EAC7C,aAA6B,EAC7B,mBAAyC;QANjC,cAAS,GAAT,SAAS,CAAY;QAQ7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,IAAI,mBAAmB,EAAE,CAAC;QAC9D,IAAI,CAAC,eAAe,GAAG,eAAe,IAAI,IAAI,eAAe,EAAE,CAAC;QAChE,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAqB;QACjC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,QAAQ,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,CAAC;QAED,6CAA6C;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Use Case: ReflexionUseCase
|
|
3
|
+
* Implements Reflexion pattern - converts failures to learnings
|
|
4
|
+
*/
|
|
5
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
6
|
+
import { MemoryStreamService } from '../../infrastructure/storage/memory-stream-service.js';
|
|
7
|
+
import type { ReActTrajectory } from '../../domain/services/react-loop.js';
|
|
8
|
+
export interface ReflexionRequest {
|
|
9
|
+
trajectory: ReActTrajectory;
|
|
10
|
+
reward: number;
|
|
11
|
+
errors: string[];
|
|
12
|
+
testOutput?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ReflexionResponse {
|
|
15
|
+
reflection: string;
|
|
16
|
+
stored: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class ReflexionUseCase {
|
|
19
|
+
private aiService;
|
|
20
|
+
private memoryStream;
|
|
21
|
+
constructor(aiService: IAIService, memoryStream: MemoryStreamService);
|
|
22
|
+
execute(request: ReflexionRequest): Promise<ReflexionResponse>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=reflexion-use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflexion-use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/reflexion-use-case.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,eAAe,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,YAAY;gBADZ,SAAS,EAAE,UAAU,EACrB,YAAY,EAAE,mBAAmB;IAGrC,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CA6BrE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Use Case: ReflexionUseCase
|
|
3
|
+
* Implements Reflexion pattern - converts failures to learnings
|
|
4
|
+
*/
|
|
5
|
+
export class ReflexionUseCase {
|
|
6
|
+
aiService;
|
|
7
|
+
memoryStream;
|
|
8
|
+
constructor(aiService, memoryStream) {
|
|
9
|
+
this.aiService = aiService;
|
|
10
|
+
this.memoryStream = memoryStream;
|
|
11
|
+
}
|
|
12
|
+
async execute(request) {
|
|
13
|
+
// Only generate reflection if failed (reward < 1)
|
|
14
|
+
if (request.reward >= 1.0) {
|
|
15
|
+
return {
|
|
16
|
+
reflection: 'Task completed successfully',
|
|
17
|
+
stored: false,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// Generate reflection using self-reflection model
|
|
21
|
+
const reflection = await this.aiService.generateReflection(request.trajectory, request.reward, request.errors);
|
|
22
|
+
// Store reflection in memory stream
|
|
23
|
+
await this.memoryStream.recordReflection(reflection, request.trajectory, request.reward, request.errors);
|
|
24
|
+
return {
|
|
25
|
+
reflection,
|
|
26
|
+
stored: true,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=reflexion-use-case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflexion-use-case.js","sourceRoot":"","sources":["../../../src/application/use-cases/reflexion-use-case.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,MAAM,OAAO,gBAAgB;IAEjB;IACA;IAFV,YACU,SAAqB,EACrB,YAAiC;QADjC,cAAS,GAAT,SAAS,CAAY;QACrB,iBAAY,GAAZ,YAAY,CAAqB;IACxC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,OAAyB;QACrC,kDAAkD;QAClD,IAAI,OAAO,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YAC1B,OAAO;gBACL,UAAU,EAAE,6BAA6B;gBACzC,MAAM,EAAE,KAAK;aACd,CAAC;QACJ,CAAC;QAED,kDAAkD;QAClD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,kBAAkB,CACxD,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,CACf,CAAC;QAEF,oCAAoC;QACpC,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,CACtC,UAAU,EACV,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,CACf,CAAC;QAEF,OAAO;YACL,UAAU;YACV,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application: Deterministic Workflows
|
|
3
|
+
* Replace overloaded prompts with deterministic workflows for common patterns
|
|
4
|
+
* Faster, more predictable, lower cost than ReAct for common operations
|
|
5
|
+
*
|
|
6
|
+
* Based on ARCHITECTURAL_DECOMPOSITION.md analysis
|
|
7
|
+
*/
|
|
8
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
9
|
+
import type { IEmbeddingRepository } from '../../domain/interfaces/embedding-repository.interface.js';
|
|
10
|
+
export interface WorkflowRequest {
|
|
11
|
+
query: string;
|
|
12
|
+
type: 'explain' | 'find' | 'simple-edit' | 'search';
|
|
13
|
+
}
|
|
14
|
+
export interface WorkflowResponse {
|
|
15
|
+
result: any;
|
|
16
|
+
success: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Deterministic workflow for explain operations
|
|
21
|
+
* Faster than ReAct - direct path with minimal LLM calls
|
|
22
|
+
*/
|
|
23
|
+
export declare class ExplainWorkflow {
|
|
24
|
+
private embeddingRepository;
|
|
25
|
+
private aiService;
|
|
26
|
+
constructor(embeddingRepository: IEmbeddingRepository, aiService: IAIService);
|
|
27
|
+
execute(query: string, filepath?: string): Promise<WorkflowResponse>;
|
|
28
|
+
private findFile;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Deterministic workflow for find/search operations
|
|
32
|
+
* Direct semantic search + answer generation
|
|
33
|
+
*/
|
|
34
|
+
export declare class FindWorkflow {
|
|
35
|
+
private embeddingRepository;
|
|
36
|
+
private aiService;
|
|
37
|
+
constructor(embeddingRepository: IEmbeddingRepository, aiService: IAIService);
|
|
38
|
+
execute(query: string, maxResults?: number): Promise<WorkflowResponse>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Deterministic workflow for simple edits
|
|
42
|
+
* Direct edit generation without multi-step reasoning
|
|
43
|
+
*/
|
|
44
|
+
export declare class SimpleEditWorkflow {
|
|
45
|
+
private aiService;
|
|
46
|
+
constructor(aiService: IAIService);
|
|
47
|
+
execute(filepath: string, instruction: string): Promise<WorkflowResponse>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Workflow Router
|
|
51
|
+
* Routes to appropriate deterministic workflow
|
|
52
|
+
*/
|
|
53
|
+
export declare class WorkflowRouter {
|
|
54
|
+
private explainWorkflow;
|
|
55
|
+
private findWorkflow;
|
|
56
|
+
private simpleEditWorkflow;
|
|
57
|
+
constructor(explainWorkflow: ExplainWorkflow, findWorkflow: FindWorkflow, simpleEditWorkflow: SimpleEditWorkflow);
|
|
58
|
+
route(request: WorkflowRequest): Promise<WorkflowResponse>;
|
|
59
|
+
private parseEditQuery;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=deterministic-workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deterministic-workflows.d.ts","sourceRoot":"","sources":["../../../src/application/workflows/deterministic-workflows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEtG,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC;CACrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,SAAS;gBADT,mBAAmB,EAAE,oBAAoB,EACzC,SAAS,EAAE,UAAU;IAGzB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;YA6C5D,QAAQ;CAKvB;AAED;;;GAGG;AACH,qBAAa,YAAY;IAErB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,SAAS;gBADT,mBAAmB,EAAE,oBAAoB,EACzC,SAAS,EAAE,UAAU;IAGzB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,MAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAqChF;AAED;;;GAGG;AACH,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,UAAU;IAGzB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;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