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,606 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel Processing & Caching System
|
|
3
|
+
* Now supports sequential processing with rate limiting for API limits
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync, writeFileSync, existsSync, statSync, readdirSync, mkdirSync, rmSync, unlinkSync } from 'fs';
|
|
6
|
+
import { join } from 'path';
|
|
7
|
+
import { config } from 'dotenv';
|
|
8
|
+
import { encoding_for_model } from 'tiktoken';
|
|
9
|
+
import { getConfigManager } from './infrastructure/config/config-manager.js';
|
|
10
|
+
import { ProviderRegistry } from './infrastructure/providers/provider-registry.js';
|
|
11
|
+
import { OperationProviderResolver } from './infrastructure/providers/operation-provider-resolver.js';
|
|
12
|
+
// Load .env
|
|
13
|
+
config();
|
|
14
|
+
// Get embedding provider from registry (respects CODEHERE_AI_PROVIDER)
|
|
15
|
+
async function getEmbeddingProvider() {
|
|
16
|
+
const registry = ProviderRegistry.getInstance();
|
|
17
|
+
// Ensure providers are registered (same logic as dependency-container.ts)
|
|
18
|
+
if (!registry.get('cohere') && !registry.get('openai') && !registry.get('fake')) {
|
|
19
|
+
// Register FakeProvider if in FAKE_AI mode
|
|
20
|
+
if (process.env.CODEHERE_FAKE_AI === '1') {
|
|
21
|
+
const { FakeProvider } = await import('./infrastructure/providers/fake-provider.js');
|
|
22
|
+
registry.register(new FakeProvider());
|
|
23
|
+
registry.setDefault('fake');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// Register real providers based on available API keys
|
|
27
|
+
if (process.env.COHERE_API_KEY) {
|
|
28
|
+
const { CohereProvider } = await import('./infrastructure/providers/cohere-provider.js');
|
|
29
|
+
registry.register(new CohereProvider());
|
|
30
|
+
}
|
|
31
|
+
if (process.env.CODEHERE_OPENAI_API_KEY || process.env.OPENAI_API_KEY) {
|
|
32
|
+
const { OpenAIProvider } = await import('./infrastructure/providers/openai-provider.js');
|
|
33
|
+
registry.register(new OpenAIProvider());
|
|
34
|
+
}
|
|
35
|
+
if (process.env.OPENROUTER_API_KEY) {
|
|
36
|
+
const { OpenRouterProvider } = await import('./infrastructure/providers/openrouter-provider.js');
|
|
37
|
+
registry.register(new OpenRouterProvider());
|
|
38
|
+
}
|
|
39
|
+
// Set default based on CODEHERE_AI_PROVIDER
|
|
40
|
+
const requestedProvider = process.env.CODEHERE_AI_PROVIDER?.toLowerCase();
|
|
41
|
+
if (requestedProvider && registry.get(requestedProvider)) {
|
|
42
|
+
registry.setDefault(requestedProvider);
|
|
43
|
+
}
|
|
44
|
+
else if (registry.get('openai')) {
|
|
45
|
+
registry.setDefault('openai');
|
|
46
|
+
}
|
|
47
|
+
else if (registry.get('cohere')) {
|
|
48
|
+
registry.setDefault('cohere');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const resolver = new OperationProviderResolver(registry);
|
|
53
|
+
// Special handling for OpenRouter: fallback to OpenAI or Cohere for embeddings
|
|
54
|
+
// OpenRouter doesn't support embeddings natively
|
|
55
|
+
const currentDefault = registry.getDefault();
|
|
56
|
+
if (currentDefault?.id === 'openrouter') {
|
|
57
|
+
console.log('[EmbeddingFallback] OpenRouter selected but doesn\'t support embeddings. Using fallback provider for embeddings.');
|
|
58
|
+
// Try OpenAI first, then Cohere, then fail with helpful message
|
|
59
|
+
if (registry.get('openai')) {
|
|
60
|
+
const openaiProvider = registry.get('openai');
|
|
61
|
+
if (openaiProvider && openaiProvider.capabilities.embedding) {
|
|
62
|
+
console.log('[EmbeddingFallback] Using OpenAI for embeddings while keeping OpenRouter for chat.');
|
|
63
|
+
return openaiProvider;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (registry.get('cohere')) {
|
|
67
|
+
const cohereProvider = registry.get('cohere');
|
|
68
|
+
if (cohereProvider && cohereProvider.capabilities.embedding) {
|
|
69
|
+
console.log('[EmbeddingFallback] Using Cohere for embeddings while keeping OpenRouter for chat.');
|
|
70
|
+
return cohereProvider;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
throw new Error('OpenRouter doesn\'t support embeddings. Please set up OpenAI or Cohere for embeddings:\n\n' +
|
|
74
|
+
' export CODEHERE_OPENAI_API_KEY="sk-..."\n' +
|
|
75
|
+
' or\n' +
|
|
76
|
+
' export COHERE_API_KEY="..."\n\n' +
|
|
77
|
+
'OpenRouter will still be used for chat operations.');
|
|
78
|
+
}
|
|
79
|
+
return resolver.resolveProvider('embedding');
|
|
80
|
+
}
|
|
81
|
+
// Token encoder - tiktoken is OpenAI-specific, use GPT model
|
|
82
|
+
const tokenConfig = getConfigManager();
|
|
83
|
+
const defaultModel = tokenConfig.getModel('default') || tokenConfig.getPreference('defaultModel');
|
|
84
|
+
const tiktokenModel = (defaultModel && defaultModel.includes('gpt')) ? defaultModel : 'gpt-3.5-turbo';
|
|
85
|
+
const enc = encoding_for_model(tiktokenModel);
|
|
86
|
+
// Chunking parameters - will be loaded from ConfigManager when needed
|
|
87
|
+
let CHUNK_SIZE = 300;
|
|
88
|
+
let OVERLAP = 50;
|
|
89
|
+
// Initialize chunking parameters from ConfigManager
|
|
90
|
+
function getChunkingParams() {
|
|
91
|
+
const config = getConfigManager();
|
|
92
|
+
return {
|
|
93
|
+
chunkSize: config.getChunking('chunkSize') || 300,
|
|
94
|
+
overlap: config.getChunking('overlap') || 50,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
// Rate limiting state
|
|
98
|
+
let lastApiCallTime = 0;
|
|
99
|
+
let apiCallCount = 0;
|
|
100
|
+
let monthlyApiCallCount = 0;
|
|
101
|
+
// Get rate limits from ConfigManager
|
|
102
|
+
const configManager = getConfigManager();
|
|
103
|
+
const MIN_DELAY_MS = configManager.getRateLimit('minDelayMs') || 1500; // 1.5s between calls (40 calls/min = 1.5s)
|
|
104
|
+
const MONTHLY_LIMIT = configManager.getRateLimit('monthlyLimit') || 1000; // Trial key limit
|
|
105
|
+
/**
|
|
106
|
+
* Rate-limited API call wrapper
|
|
107
|
+
*/
|
|
108
|
+
async function rateLimitedCall(fn) {
|
|
109
|
+
// Check monthly limit
|
|
110
|
+
if (monthlyApiCallCount >= MONTHLY_LIMIT) {
|
|
111
|
+
throw new Error(`Monthly API limit reached (${MONTHLY_LIMIT} calls). Please upgrade to production key or wait for limit reset.`);
|
|
112
|
+
}
|
|
113
|
+
// Calculate delay needed
|
|
114
|
+
const now = Date.now();
|
|
115
|
+
const timeSinceLastCall = now - lastApiCallTime;
|
|
116
|
+
if (timeSinceLastCall < MIN_DELAY_MS) {
|
|
117
|
+
const delay = MIN_DELAY_MS - timeSinceLastCall;
|
|
118
|
+
await new Promise(resolve => setTimeout(resolve, delay));
|
|
119
|
+
}
|
|
120
|
+
// Make API call
|
|
121
|
+
lastApiCallTime = Date.now();
|
|
122
|
+
apiCallCount++;
|
|
123
|
+
monthlyApiCallCount++;
|
|
124
|
+
try {
|
|
125
|
+
return await fn();
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
// If rate limit error, wait longer and retry once
|
|
129
|
+
if (error instanceof Error && error.message.includes('429')) {
|
|
130
|
+
console.log('Rate limit hit, waiting 60 seconds...');
|
|
131
|
+
await new Promise(resolve => setTimeout(resolve, 60000)); // Wait 1 minute
|
|
132
|
+
lastApiCallTime = Date.now();
|
|
133
|
+
monthlyApiCallCount++;
|
|
134
|
+
return await fn();
|
|
135
|
+
}
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Sequential indexing with caching and rate limiting
|
|
141
|
+
*/
|
|
142
|
+
export async function indexParallel(files, options = {}) {
|
|
143
|
+
// Auto-detect: use parallel for large repos (>100 files), sequential for small ones
|
|
144
|
+
const shouldUseParallel = options.sequential === false || (options.sequential === undefined && files.length > 100);
|
|
145
|
+
const maxConcurrency = options.maxConcurrency || (shouldUseParallel ? 10 : 1);
|
|
146
|
+
const useCache = options.useCache !== false;
|
|
147
|
+
const config = getConfigManager();
|
|
148
|
+
const cacheDir = options.cacheDir || config.getPath('cacheDir') || '.codehere-cache';
|
|
149
|
+
const startTime = Date.now();
|
|
150
|
+
let indexed = 0;
|
|
151
|
+
let cached = 0;
|
|
152
|
+
let totalChunks = 0;
|
|
153
|
+
let processed = 0;
|
|
154
|
+
let lastProgressUpdate = Date.now();
|
|
155
|
+
// Create cache directory
|
|
156
|
+
if (useCache && !existsSync(cacheDir)) {
|
|
157
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
158
|
+
}
|
|
159
|
+
// Reset rate limiting state
|
|
160
|
+
lastApiCallTime = 0;
|
|
161
|
+
apiCallCount = 0;
|
|
162
|
+
// Progress update helper (throttled to every 2 seconds)
|
|
163
|
+
const updateProgress = (force = false) => {
|
|
164
|
+
const now = Date.now();
|
|
165
|
+
if (force || now - lastProgressUpdate > 2000) {
|
|
166
|
+
const percent = ((processed / files.length) * 100).toFixed(1);
|
|
167
|
+
const elapsed = ((now - startTime) / 1000).toFixed(0);
|
|
168
|
+
process.stdout.write(`\r[${processed}/${files.length}] ${percent}% | Cached: ${cached} | Indexed: ${indexed} | Time: ${elapsed}s`);
|
|
169
|
+
lastProgressUpdate = now;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
if (shouldUseParallel && maxConcurrency > 1) {
|
|
173
|
+
// Parallel processing with smart batching
|
|
174
|
+
console.log(`Processing ${files.length} files in parallel (concurrency: ${maxConcurrency})...`);
|
|
175
|
+
// First pass: Check cache status for all files (fast, no API calls)
|
|
176
|
+
const fileStatuses = [];
|
|
177
|
+
if (useCache) {
|
|
178
|
+
// Check cache in parallel (no rate limiting needed)
|
|
179
|
+
const cacheChecks = await Promise.allSettled(files.map(async (file) => {
|
|
180
|
+
const cacheKey = getCacheKey(file);
|
|
181
|
+
const cachePath = join(cacheDir, cacheKey);
|
|
182
|
+
if (existsSync(cachePath)) {
|
|
183
|
+
try {
|
|
184
|
+
const cacheEntry = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
185
|
+
const fileHash = getFileHash(file);
|
|
186
|
+
return { file, needsProcessing: cacheEntry.hash !== fileHash };
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return { file, needsProcessing: true };
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { file, needsProcessing: true };
|
|
193
|
+
}));
|
|
194
|
+
for (const check of cacheChecks) {
|
|
195
|
+
if (check.status === 'fulfilled') {
|
|
196
|
+
fileStatuses.push(check.value);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
fileStatuses.push({ file: '', needsProcessing: true });
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
fileStatuses.push(...files.map(file => ({ file, needsProcessing: true })));
|
|
205
|
+
}
|
|
206
|
+
// Separate cached vs needs-processing files
|
|
207
|
+
const cachedFiles = fileStatuses.filter(s => !s.needsProcessing).map(s => s.file);
|
|
208
|
+
const needsProcessingFiles = fileStatuses.filter(s => s.needsProcessing).map(s => s.file);
|
|
209
|
+
// Process cached files in parallel (no rate limiting)
|
|
210
|
+
if (cachedFiles.length > 0) {
|
|
211
|
+
const cachedResults = await Promise.allSettled(cachedFiles.map(file => processFileWithCache(file, useCache, cacheDir)));
|
|
212
|
+
for (const result of cachedResults) {
|
|
213
|
+
processed++;
|
|
214
|
+
if (result.status === 'fulfilled') {
|
|
215
|
+
cached++;
|
|
216
|
+
totalChunks += result.value.chunks;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
updateProgress(true);
|
|
220
|
+
}
|
|
221
|
+
// Process files that need API calls with rate limiting and batching
|
|
222
|
+
if (needsProcessingFiles.length > 0) {
|
|
223
|
+
const batches = [];
|
|
224
|
+
for (let i = 0; i < needsProcessingFiles.length; i += maxConcurrency) {
|
|
225
|
+
batches.push(needsProcessingFiles.slice(i, i + maxConcurrency));
|
|
226
|
+
}
|
|
227
|
+
for (let batchIdx = 0; batchIdx < batches.length; batchIdx++) {
|
|
228
|
+
const batch = batches[batchIdx];
|
|
229
|
+
// Process batch in parallel (rate limiting handled inside processFileWithCache)
|
|
230
|
+
const results = await Promise.allSettled(batch.map(file => processFileWithCache(file, useCache, cacheDir)));
|
|
231
|
+
// Process results
|
|
232
|
+
for (let i = 0; i < results.length; i++) {
|
|
233
|
+
const result = results[i];
|
|
234
|
+
const file = batch[i];
|
|
235
|
+
processed++;
|
|
236
|
+
if (result.status === 'fulfilled') {
|
|
237
|
+
if (result.value.cached) {
|
|
238
|
+
cached++;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
indexed++;
|
|
242
|
+
}
|
|
243
|
+
totalChunks += result.value.chunks;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const error = result.reason instanceof Error ? result.reason.message : String(result.reason);
|
|
247
|
+
console.error(`\n✗ Error: ${file}: ${error}`);
|
|
248
|
+
// If monthly limit hit, stop processing
|
|
249
|
+
if (error.includes('Monthly API limit')) {
|
|
250
|
+
console.error('\nStopping indexing due to monthly API limit.');
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
// Update progress
|
|
256
|
+
updateProgress();
|
|
257
|
+
// Check if we should stop
|
|
258
|
+
if (processed >= files.length)
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
// Sequential processing (for small repos or when explicitly requested)
|
|
265
|
+
console.log(`Processing ${files.length} files sequentially...`);
|
|
266
|
+
for (let i = 0; i < files.length; i++) {
|
|
267
|
+
const file = files[i];
|
|
268
|
+
processed++;
|
|
269
|
+
try {
|
|
270
|
+
const result = await processFileWithCache(file, useCache, cacheDir);
|
|
271
|
+
if (result.cached) {
|
|
272
|
+
cached++;
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
indexed++;
|
|
276
|
+
}
|
|
277
|
+
totalChunks += result.chunks;
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
281
|
+
console.error(`\n[${i + 1}/${files.length}] ✗ Error: ${file}: ${errorMsg}`);
|
|
282
|
+
// If monthly limit hit, stop processing
|
|
283
|
+
if (errorMsg.includes('Monthly API limit')) {
|
|
284
|
+
console.error('Stopping indexing due to monthly API limit.');
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// Update progress every 10 files or every 2 seconds
|
|
289
|
+
if (i % 10 === 0 || i === files.length - 1) {
|
|
290
|
+
updateProgress(true);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// Final progress update
|
|
295
|
+
updateProgress(true);
|
|
296
|
+
console.log(''); // New line after progress
|
|
297
|
+
const timeMs = Date.now() - startTime;
|
|
298
|
+
console.log(`\nAPI Call Stats: ${apiCallCount} calls made, ${monthlyApiCallCount} total this month`);
|
|
299
|
+
return {
|
|
300
|
+
indexed,
|
|
301
|
+
cached,
|
|
302
|
+
totalChunks,
|
|
303
|
+
timeMs,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Process file with caching
|
|
308
|
+
*/
|
|
309
|
+
async function processFileWithCache(filepath, useCache, cacheDir) {
|
|
310
|
+
if (!useCache) {
|
|
311
|
+
// Process without cache
|
|
312
|
+
const content = readFileSync(filepath, 'utf-8');
|
|
313
|
+
const params = getChunkingParams();
|
|
314
|
+
const chunks = chunkTextLocal(content, params.chunkSize, params.overlap);
|
|
315
|
+
// Embed chunks (this is the slow part)
|
|
316
|
+
for (const chunk of chunks) {
|
|
317
|
+
await embedTextLocal(chunk);
|
|
318
|
+
}
|
|
319
|
+
return { cached: false, chunks: chunks.length };
|
|
320
|
+
}
|
|
321
|
+
// Check cache
|
|
322
|
+
const cacheKey = getCacheKey(filepath);
|
|
323
|
+
const cachePath = join(cacheDir, cacheKey);
|
|
324
|
+
if (existsSync(cachePath)) {
|
|
325
|
+
const cacheEntry = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
326
|
+
// Check if file hasn't changed
|
|
327
|
+
const fileHash = getFileHash(filepath);
|
|
328
|
+
if (cacheEntry.hash === fileHash) {
|
|
329
|
+
// Cache hit - return cached chunks
|
|
330
|
+
return { cached: true, chunks: cacheEntry.chunks.length };
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
// Cache miss or stale - process file
|
|
334
|
+
try {
|
|
335
|
+
const content = readFileSync(filepath, 'utf-8');
|
|
336
|
+
if (!content || content.trim().length === 0) {
|
|
337
|
+
return { cached: false, chunks: 0 };
|
|
338
|
+
}
|
|
339
|
+
const params = getChunkingParams();
|
|
340
|
+
const chunks = chunkTextLocal(content, params.chunkSize, params.overlap);
|
|
341
|
+
if (chunks.length === 0) {
|
|
342
|
+
return { cached: false, chunks: 0 };
|
|
343
|
+
}
|
|
344
|
+
const fileHash = getFileHash(filepath);
|
|
345
|
+
// Embed chunks (rate limiting handled by embedTextLocal)
|
|
346
|
+
const embeddings = [];
|
|
347
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
348
|
+
const chunk = chunks[i];
|
|
349
|
+
try {
|
|
350
|
+
const embedding = await embedTextLocal(chunk);
|
|
351
|
+
embeddings[i] = embedding;
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
// If embedding fails, log and skip this chunk
|
|
355
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
356
|
+
console.error(`Failed to embed chunk ${i + 1}/${chunks.length} of ${filepath}: ${errorMsg}`);
|
|
357
|
+
// If monthly limit hit, stop processing this file
|
|
358
|
+
if (errorMsg.includes('Monthly API limit')) {
|
|
359
|
+
throw error; // Re-throw to stop processing
|
|
360
|
+
}
|
|
361
|
+
// Continue with other chunks for other errors
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
// Only save if we got at least one embedding
|
|
366
|
+
if (embeddings.length === 0) {
|
|
367
|
+
return { cached: false, chunks: 0 };
|
|
368
|
+
}
|
|
369
|
+
// Save to cache
|
|
370
|
+
const cacheEntry = {
|
|
371
|
+
filepath,
|
|
372
|
+
hash: fileHash,
|
|
373
|
+
chunks: chunks.slice(0, embeddings.length).map((content, i) => ({
|
|
374
|
+
content,
|
|
375
|
+
embedding: embeddings[i],
|
|
376
|
+
})),
|
|
377
|
+
timestamp: Date.now(),
|
|
378
|
+
};
|
|
379
|
+
writeFileSync(cachePath, JSON.stringify(cacheEntry, null, 2), 'utf-8');
|
|
380
|
+
return { cached: false, chunks: embeddings.length };
|
|
381
|
+
}
|
|
382
|
+
catch (error) {
|
|
383
|
+
// Re-throw monthly limit errors to stop processing
|
|
384
|
+
if (error instanceof Error && error.message.includes('Monthly API limit')) {
|
|
385
|
+
throw error;
|
|
386
|
+
}
|
|
387
|
+
// Log other errors but don't throw - allow other files to process
|
|
388
|
+
console.error(`Error processing ${filepath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
389
|
+
return { cached: false, chunks: 0 };
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Get cache key from filepath
|
|
394
|
+
*/
|
|
395
|
+
function getCacheKey(filepath) {
|
|
396
|
+
// Create a safe filename from filepath
|
|
397
|
+
return filepath.replace(/[^a-zA-Z0-9]/g, '_') + '.json';
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Get file hash (simple: use mtime + size)
|
|
401
|
+
*/
|
|
402
|
+
function getFileHash(filepath) {
|
|
403
|
+
try {
|
|
404
|
+
const stat = statSync(filepath);
|
|
405
|
+
return `${stat.mtimeMs}-${stat.size}`;
|
|
406
|
+
}
|
|
407
|
+
catch {
|
|
408
|
+
return 'unknown';
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Incremental update: only process changed files
|
|
413
|
+
*/
|
|
414
|
+
export async function updateIndexIncremental(baseDir, options = {}) {
|
|
415
|
+
const config = getConfigManager();
|
|
416
|
+
const { cacheDir = config.getPath('cacheDir') || '.codehere-cache', watchMode = false } = options;
|
|
417
|
+
// Find all code files
|
|
418
|
+
const files = findCodeFiles(baseDir);
|
|
419
|
+
let updated = 0;
|
|
420
|
+
let unchanged = 0;
|
|
421
|
+
let totalChunks = 0;
|
|
422
|
+
for (const filepath of files) {
|
|
423
|
+
const cacheKey = getCacheKey(filepath);
|
|
424
|
+
const cachePath = join(cacheDir, cacheKey);
|
|
425
|
+
if (existsSync(cachePath)) {
|
|
426
|
+
const cacheEntry = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
427
|
+
const fileHash = getFileHash(filepath);
|
|
428
|
+
if (cacheEntry.hash === fileHash) {
|
|
429
|
+
// File unchanged
|
|
430
|
+
unchanged++;
|
|
431
|
+
totalChunks += cacheEntry.chunks.length;
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
// File changed or new - process it
|
|
436
|
+
const result = await processFileWithCache(filepath, true, cacheDir);
|
|
437
|
+
updated++;
|
|
438
|
+
totalChunks += result.chunks;
|
|
439
|
+
}
|
|
440
|
+
return {
|
|
441
|
+
updated,
|
|
442
|
+
unchanged,
|
|
443
|
+
totalChunks,
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Find code files recursively
|
|
448
|
+
*/
|
|
449
|
+
function findCodeFiles(dir) {
|
|
450
|
+
const files = [];
|
|
451
|
+
try {
|
|
452
|
+
const entries = readdirSync(dir, { withFileTypes: true });
|
|
453
|
+
for (const entry of entries) {
|
|
454
|
+
const fullPath = join(dir, entry.name);
|
|
455
|
+
// Skip node_modules, .git, etc.
|
|
456
|
+
if (entry.name.startsWith('.') || entry.name === 'node_modules' || entry.name === 'dist' || entry.name === 'build') {
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
if (entry.isDirectory()) {
|
|
460
|
+
files.push(...findCodeFiles(fullPath));
|
|
461
|
+
}
|
|
462
|
+
else if (entry.isFile()) {
|
|
463
|
+
const ext = entry.name.split('.').pop()?.toLowerCase();
|
|
464
|
+
if (ext && ['ts', 'tsx', 'js', 'jsx'].includes(ext)) {
|
|
465
|
+
files.push(fullPath);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
catch {
|
|
471
|
+
// Skip directories we can't read
|
|
472
|
+
}
|
|
473
|
+
return files;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Clear cache
|
|
477
|
+
*/
|
|
478
|
+
export function clearCache(cacheDir) {
|
|
479
|
+
if (!cacheDir) {
|
|
480
|
+
const config = getConfigManager();
|
|
481
|
+
cacheDir = config.getPath('cacheDir') || '.codehere-cache';
|
|
482
|
+
}
|
|
483
|
+
if (!existsSync(cacheDir)) {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
try {
|
|
487
|
+
rmSync(cacheDir, { recursive: true, force: true });
|
|
488
|
+
}
|
|
489
|
+
catch {
|
|
490
|
+
// Fallback: delete files individually
|
|
491
|
+
const files = readdirSync(cacheDir);
|
|
492
|
+
for (const file of files) {
|
|
493
|
+
const filePath = join(cacheDir, file);
|
|
494
|
+
try {
|
|
495
|
+
unlinkSync(filePath);
|
|
496
|
+
}
|
|
497
|
+
catch {
|
|
498
|
+
// Skip files we can't delete
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Chunk text locally (duplicate from embed.ts for independence)
|
|
505
|
+
*/
|
|
506
|
+
function chunkTextLocal(text, targetTokens, overlap) {
|
|
507
|
+
const tokens = enc.encode(text);
|
|
508
|
+
const chunks = [];
|
|
509
|
+
if (tokens.length <= targetTokens) {
|
|
510
|
+
return [text];
|
|
511
|
+
}
|
|
512
|
+
let start = 0;
|
|
513
|
+
while (start < tokens.length) {
|
|
514
|
+
const end = Math.min(start + targetTokens, tokens.length);
|
|
515
|
+
const chunkTokens = tokens.slice(start, end);
|
|
516
|
+
const decoded = enc.decode(chunkTokens);
|
|
517
|
+
const chunkText = typeof decoded === 'string' ? decoded : new TextDecoder().decode(decoded);
|
|
518
|
+
chunks.push(chunkText);
|
|
519
|
+
if (end >= tokens.length)
|
|
520
|
+
break;
|
|
521
|
+
start = end - overlap;
|
|
522
|
+
}
|
|
523
|
+
return chunks;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Embed text using provider system (respects CODEHERE_AI_PROVIDER)
|
|
527
|
+
* Now uses rate limiting
|
|
528
|
+
*/
|
|
529
|
+
async function embedTextLocal(text, retries = 3) {
|
|
530
|
+
// Check for FAKE_AI mode - return fake embeddings
|
|
531
|
+
if (process.env.CODEHERE_FAKE_AI === '1') {
|
|
532
|
+
// Return fake embeddings (1024 dimensions, small random values)
|
|
533
|
+
return Array(1024).fill(0).map(() => Math.random() * 0.001 - 0.0005);
|
|
534
|
+
}
|
|
535
|
+
// Use rate-limited wrapper
|
|
536
|
+
return await rateLimitedCall(async () => {
|
|
537
|
+
for (let attempt = 0; attempt < retries; attempt++) {
|
|
538
|
+
try {
|
|
539
|
+
// Use provider system instead of hardcoded Cohere
|
|
540
|
+
const provider = await getEmbeddingProvider();
|
|
541
|
+
const embeddings = await provider.embed(text);
|
|
542
|
+
// Handle both single embedding and array of embeddings
|
|
543
|
+
if (Array.isArray(embeddings[0])) {
|
|
544
|
+
return embeddings[0];
|
|
545
|
+
}
|
|
546
|
+
return embeddings;
|
|
547
|
+
}
|
|
548
|
+
catch (error) {
|
|
549
|
+
if (attempt === retries - 1)
|
|
550
|
+
throw error;
|
|
551
|
+
// Don't wait here - rateLimitedCall handles delays
|
|
552
|
+
await new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000));
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
throw new Error('Failed to embed text after retries');
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Get cache statistics
|
|
560
|
+
*/
|
|
561
|
+
export function getCacheStats(cacheDir) {
|
|
562
|
+
if (!cacheDir) {
|
|
563
|
+
const config = getConfigManager();
|
|
564
|
+
cacheDir = config.getPath('cacheDir') || '.codehere-cache';
|
|
565
|
+
}
|
|
566
|
+
if (!existsSync(cacheDir)) {
|
|
567
|
+
return {
|
|
568
|
+
totalFiles: 0,
|
|
569
|
+
totalChunks: 0,
|
|
570
|
+
totalSize: 0,
|
|
571
|
+
oldestEntry: 0,
|
|
572
|
+
newestEntry: 0,
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
const files = readdirSync(cacheDir).filter(f => f.endsWith('.json'));
|
|
576
|
+
let totalChunks = 0;
|
|
577
|
+
let totalSize = 0;
|
|
578
|
+
let oldestEntry = Date.now();
|
|
579
|
+
let newestEntry = 0;
|
|
580
|
+
for (const file of files) {
|
|
581
|
+
try {
|
|
582
|
+
const cachePath = join(cacheDir, file);
|
|
583
|
+
const stat = statSync(cachePath);
|
|
584
|
+
totalSize += stat.size;
|
|
585
|
+
const cacheEntry = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
586
|
+
totalChunks += cacheEntry.chunks.length;
|
|
587
|
+
if (cacheEntry.timestamp < oldestEntry) {
|
|
588
|
+
oldestEntry = cacheEntry.timestamp;
|
|
589
|
+
}
|
|
590
|
+
if (cacheEntry.timestamp > newestEntry) {
|
|
591
|
+
newestEntry = cacheEntry.timestamp;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
catch {
|
|
595
|
+
// Skip invalid cache entries
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
totalFiles: files.length,
|
|
600
|
+
totalChunks,
|
|
601
|
+
totalSize,
|
|
602
|
+
oldestEntry,
|
|
603
|
+
newestEntry,
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
//# sourceMappingURL=parallel-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallel-processor.js","sourceRoot":"","sources":["../src/parallel-processor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACnH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAEtG,YAAY;AACZ,MAAM,EAAE,CAAC;AAET,uEAAuE;AACvE,KAAK,UAAU,oBAAoB;IACjC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,WAAW,EAAE,CAAC;IAEhD,0EAA0E;IAC1E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,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