codehere 0.3.0 → 0.5.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +329 -65
- package/dist/application/agents/documentation-agent.d.ts +24 -0
- package/dist/application/agents/documentation-agent.d.ts.map +1 -0
- package/dist/application/agents/documentation-agent.js +399 -0
- package/dist/application/agents/documentation-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +11 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -1
- package/dist/application/agents/execution-agent.js +289 -80
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +95 -2
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts +3 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +151 -71
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/product-requirements-agent.d.ts +21 -0
- package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
- package/dist/application/agents/product-requirements-agent.js +247 -0
- package/dist/application/agents/product-requirements-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +5 -1
- package/dist/application/agents/validation-agent.d.ts.map +1 -1
- package/dist/application/agents/validation-agent.js +156 -21
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/reasoning-config.d.ts +15 -0
- package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-config.js +50 -0
- package/dist/application/reasoning/reasoning-config.js.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
- package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.js +74 -0
- package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.js +217 -0
- package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/types.d.ts +65 -0
- package/dist/application/reasoning/types.d.ts.map +1 -0
- package/dist/application/reasoning/types.js +6 -0
- package/dist/application/reasoning/types.js.map +1 -0
- package/dist/application/reasoning/validator-strategy.d.ts +56 -0
- package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/validator-strategy.js +103 -0
- package/dist/application/reasoning/validator-strategy.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +46 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +198 -8
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +19 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +393 -91
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.js +129 -49
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.js +16 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts +14 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +109 -2
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/domain/entities/documentation.d.ts +35 -0
- package/dist/domain/entities/documentation.d.ts.map +1 -0
- package/dist/domain/entities/documentation.js +6 -0
- package/dist/domain/entities/documentation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts.map +1 -1
- package/dist/domain/entities/product-requirements.d.ts +50 -0
- package/dist/domain/entities/product-requirements.d.ts.map +1 -0
- package/dist/domain/entities/product-requirements.js +6 -0
- package/dist/domain/entities/product-requirements.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/interfaces/agent.interface.d.ts +15 -0
- package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/agent.interface.js +6 -0
- package/dist/domain/interfaces/agent.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- 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/query-intent-classifier.d.ts.map +1 -1
- package/dist/domain/services/query-intent-classifier.js +20 -1
- package/dist/domain/services/query-intent-classifier.js.map +1 -1
- 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/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +10 -3
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +494 -167
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
- package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/fake-ai-service.js +59 -0
- package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +477 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/embedding-cache.js +80 -9
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- 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 +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.d.ts +10 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
- package/dist/infrastructure/config/config-manager.js +13 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +54 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +129 -0
- package/dist/infrastructure/context/conversation-context.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 +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
- package/dist/infrastructure/cost/cost-tracker.js +12 -5
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.js +6 -8
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
- package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
- package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
- 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 +444 -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 +130 -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 +330 -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 +413 -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 +401 -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 +131 -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/input-validator.d.ts.map +1 -1
- package/dist/infrastructure/security/input-validator.js +19 -6
- package/dist/infrastructure/security/input-validator.js.map +1 -1
- 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 +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- 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 +68 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +216 -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/bi-directional-learning.d.ts +22 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
- package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
- 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/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 +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- 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-review-portal.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.js +86 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +36 -41
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
- package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/proportional-friction.js +200 -0
- package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +55 -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/feedback-stats.d.ts +99 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.js +173 -0
- package/dist/infrastructure/validation/feedback-stats.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/validation/trust-config.d.ts +27 -0
- package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
- package/dist/infrastructure/validation/trust-config.js +113 -0
- package/dist/infrastructure/validation/trust-config.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/attention-visualizer.js +6 -8
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +6 -9
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.js +6 -10
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.js +6 -8
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +356 -87
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +22 -8
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/decision-command.js +23 -6
- package/dist/presentation/cli/commands/decision-command.js.map +1 -1
- 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 +10 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +94 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +23 -1
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
- package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/memory-command.js +252 -0
- package/dist/presentation/cli/commands/memory-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 +2 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +212 -26
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- 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.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +8 -2
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- 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 +173 -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.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +165 -11
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- 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 +171 -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/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +118 -17
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/git-tool.js +7 -7
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +62 -6
- package/dist/ui.js.map +1 -1
- package/package.json +22 -4
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider Layer: Provider Config Loader
|
|
3
|
+
* Loads user-facing provider configuration from JSON files
|
|
4
|
+
*
|
|
5
|
+
* Phase 4G: User-facing provider config files
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync } from 'fs';
|
|
8
|
+
import { join, resolve } from 'path';
|
|
9
|
+
import { findCodebaseRoot } from '../../domain/services/codebase-detector.js';
|
|
10
|
+
/**
|
|
11
|
+
* Load provider configuration from file
|
|
12
|
+
*
|
|
13
|
+
* @param options - Optional configuration
|
|
14
|
+
* @param options.cwd - Working directory (defaults to process.cwd())
|
|
15
|
+
* @returns ProviderConfig if file exists and is valid, undefined otherwise
|
|
16
|
+
*/
|
|
17
|
+
export function loadProviderConfig(options) {
|
|
18
|
+
const cwd = options?.cwd || process.cwd();
|
|
19
|
+
// Determine config file path
|
|
20
|
+
let configPath;
|
|
21
|
+
// Check for explicit path override
|
|
22
|
+
if (process.env.CODEHERE_PROVIDER_CONFIG_PATH) {
|
|
23
|
+
configPath = resolve(process.env.CODEHERE_PROVIDER_CONFIG_PATH);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// Find codebase root
|
|
27
|
+
const codebaseInfo = findCodebaseRoot(cwd);
|
|
28
|
+
if (codebaseInfo) {
|
|
29
|
+
// Default path: .codehere/providers.json
|
|
30
|
+
configPath = join(codebaseInfo.rootPath, '.codehere', 'providers.json');
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// Fallback to cwd if codebase root not found
|
|
34
|
+
configPath = join(cwd, '.codehere', 'providers.json');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// If file doesn't exist, return undefined (not an error)
|
|
38
|
+
if (!configPath || !existsSync(configPath)) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
// Read and parse JSON
|
|
43
|
+
const fileContent = readFileSync(configPath, 'utf-8');
|
|
44
|
+
const rawConfig = JSON.parse(fileContent);
|
|
45
|
+
// Validate and normalize config
|
|
46
|
+
return validateAndNormalizeConfig(rawConfig);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
// Log warning but don't throw (non-fatal)
|
|
50
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
51
|
+
console.warn(`[ProviderConfigLoader] Failed to load config from ${configPath}: ${errorMessage}`);
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Validate and normalize raw config object
|
|
57
|
+
* Ignores unknown fields and invalid values gracefully
|
|
58
|
+
*/
|
|
59
|
+
function validateAndNormalizeConfig(raw) {
|
|
60
|
+
if (!raw || typeof raw !== 'object') {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
const config = {};
|
|
64
|
+
const obj = raw;
|
|
65
|
+
// Extract default provider
|
|
66
|
+
if (obj.default !== undefined) {
|
|
67
|
+
if (typeof obj.default === 'string' && obj.default.trim()) {
|
|
68
|
+
config.default = obj.default.trim();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Extract operations
|
|
72
|
+
if (obj.operations !== undefined && typeof obj.operations === 'object' && obj.operations !== null) {
|
|
73
|
+
const operations = obj.operations;
|
|
74
|
+
const normalizedOps = {};
|
|
75
|
+
// Known operation types
|
|
76
|
+
const validOperations = ['chat', 'embedding', 'rerank'];
|
|
77
|
+
for (const op of validOperations) {
|
|
78
|
+
if (operations[op] !== undefined) {
|
|
79
|
+
const providerId = operations[op];
|
|
80
|
+
if (typeof providerId === 'string' && providerId.trim()) {
|
|
81
|
+
normalizedOps[op] = providerId.trim();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Only set operations if at least one is valid
|
|
86
|
+
if (Object.keys(normalizedOps).length > 0) {
|
|
87
|
+
config.operations = normalizedOps;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Return config only if it has at least one meaningful field
|
|
91
|
+
if (config.default || config.operations) {
|
|
92
|
+
return config;
|
|
93
|
+
}
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Convert ProviderConfig to OperationProviderConfig
|
|
98
|
+
* Used to pass config to OperationProviderResolver
|
|
99
|
+
*/
|
|
100
|
+
export function configToOperationConfig(config) {
|
|
101
|
+
const operationConfig = {};
|
|
102
|
+
// Set default if present
|
|
103
|
+
if (config.default) {
|
|
104
|
+
operationConfig.default = config.default;
|
|
105
|
+
}
|
|
106
|
+
// Map operations
|
|
107
|
+
if (config.operations) {
|
|
108
|
+
if (config.operations.chat) {
|
|
109
|
+
operationConfig.chat = config.operations.chat;
|
|
110
|
+
}
|
|
111
|
+
if (config.operations.embedding) {
|
|
112
|
+
operationConfig.embedding = config.operations.embedding;
|
|
113
|
+
}
|
|
114
|
+
if (config.operations.rerank) {
|
|
115
|
+
operationConfig.rerank = config.operations.rerank;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return operationConfig;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=provider-config-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-config-loader.js","sourceRoot":"","sources":["../../../src/infrastructure/providers/provider-config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAmB9E;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA0B;IAC3D,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1C,6BAA6B;IAC7B,IAAI,UAA8B,CAAC;IAEnC,mCAAmC;IACnC,IAAI,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,CAAC;QAC9C,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,qBAAqB;QACrB,MAAM,YAAY,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC3C,IAAI,YAAY,EAAE,CAAC;YACjB,yCAAyC;YACzC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,6CAA6C;YAC7C,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,yDAAyD;IACzD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC;QACH,sBAAsB;QACtB,MAAM,WAAW,GAAG,YAAY,CAAC,UAAU,EAAE,O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AC;QACD,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YAC7B,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider Layer: ProviderRegistry
|
|
3
|
+
* Central registry for all model providers
|
|
4
|
+
*
|
|
5
|
+
* Phase 4A: Foundation Implementation (No Behavior Change)
|
|
6
|
+
*/
|
|
7
|
+
import type { IModelProvider } from './model-provider.interface.js';
|
|
8
|
+
/**
|
|
9
|
+
* Provider Registry
|
|
10
|
+
* Singleton registry for managing model providers
|
|
11
|
+
*/
|
|
12
|
+
export declare class ProviderRegistry {
|
|
13
|
+
private static instance;
|
|
14
|
+
private providers;
|
|
15
|
+
private defaultProviderId?;
|
|
16
|
+
/**
|
|
17
|
+
* Get singleton instance
|
|
18
|
+
*/
|
|
19
|
+
static getInstance(): ProviderRegistry;
|
|
20
|
+
/**
|
|
21
|
+
* Register a provider
|
|
22
|
+
*/
|
|
23
|
+
register(provider: IModelProvider): void;
|
|
24
|
+
/**
|
|
25
|
+
* Get provider by ID
|
|
26
|
+
*/
|
|
27
|
+
get(providerId: string): IModelProvider | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Get default provider
|
|
30
|
+
*/
|
|
31
|
+
getDefault(): IModelProvider;
|
|
32
|
+
/**
|
|
33
|
+
* Set default provider
|
|
34
|
+
*/
|
|
35
|
+
setDefault(providerId: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get all registered providers
|
|
38
|
+
*/
|
|
39
|
+
getAll(): IModelProvider[];
|
|
40
|
+
/**
|
|
41
|
+
* Find providers by capability
|
|
42
|
+
*/
|
|
43
|
+
findByCapability(capability: keyof import('./model-provider.interface.js').ProviderCapabilities): IModelProvider[];
|
|
44
|
+
/**
|
|
45
|
+
* Check if provider is registered
|
|
46
|
+
*/
|
|
47
|
+
has(providerId: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Clear all providers (mainly for testing)
|
|
50
|
+
*/
|
|
51
|
+
clear(): void;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=provider-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-registry.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/providers/provider-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiC;IACxD,OAAO,CAAC,SAAS,CAA0C;IAC3D,OAAO,CAAC,iBAAiB,CAAC,CAAS;IAEnC;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,gBAAgB;IAOtC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IASxC;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAInD;;OAEG;IACH,UAAU,IAAI,cAAc;IAW5B;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAOpC;;OAEG;IACH,MAAM,IAAI,cAAc,EAAE;IAI1B;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,OAAO,+BAA+B,EAAE,oBAAoB,GAAG,cAAc,EAAE;IAIlH;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIhC;;OAEG;IACH,KAAK,IAAI,IAAI;CAId"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider Layer: ProviderRegistry
|
|
3
|
+
* Central registry for all model providers
|
|
4
|
+
*
|
|
5
|
+
* Phase 4A: Foundation Implementation (No Behavior Change)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Provider Registry
|
|
9
|
+
* Singleton registry for managing model providers
|
|
10
|
+
*/
|
|
11
|
+
export class ProviderRegistry {
|
|
12
|
+
static instance = null;
|
|
13
|
+
providers = new Map();
|
|
14
|
+
defaultProviderId;
|
|
15
|
+
/**
|
|
16
|
+
* Get singleton instance
|
|
17
|
+
*/
|
|
18
|
+
static getInstance() {
|
|
19
|
+
if (!ProviderRegistry.instance) {
|
|
20
|
+
ProviderRegistry.instance = new ProviderRegistry();
|
|
21
|
+
}
|
|
22
|
+
return ProviderRegistry.instance;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Register a provider
|
|
26
|
+
*/
|
|
27
|
+
register(provider) {
|
|
28
|
+
this.providers.set(provider.id, provider);
|
|
29
|
+
// Auto-set as default if this is the first provider
|
|
30
|
+
if (!this.defaultProviderId) {
|
|
31
|
+
this.defaultProviderId = provider.id;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get provider by ID
|
|
36
|
+
*/
|
|
37
|
+
get(providerId) {
|
|
38
|
+
return this.providers.get(providerId);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get default provider
|
|
42
|
+
*/
|
|
43
|
+
getDefault() {
|
|
44
|
+
if (!this.defaultProviderId) {
|
|
45
|
+
throw new Error('No default provider configured');
|
|
46
|
+
}
|
|
47
|
+
const provider = this.get(this.defaultProviderId);
|
|
48
|
+
if (!provider) {
|
|
49
|
+
throw new Error(`Default provider '${this.defaultProviderId}' not found`);
|
|
50
|
+
}
|
|
51
|
+
return provider;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Set default provider
|
|
55
|
+
*/
|
|
56
|
+
setDefault(providerId) {
|
|
57
|
+
if (!this.providers.has(providerId)) {
|
|
58
|
+
throw new Error(`Provider '${providerId}' not registered`);
|
|
59
|
+
}
|
|
60
|
+
this.defaultProviderId = providerId;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get all registered providers
|
|
64
|
+
*/
|
|
65
|
+
getAll() {
|
|
66
|
+
return Array.from(this.providers.values());
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Find providers by capability
|
|
70
|
+
*/
|
|
71
|
+
findByCapability(capability) {
|
|
72
|
+
return this.getAll().filter(p => p.capabilities[capability]);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Check if provider is registered
|
|
76
|
+
*/
|
|
77
|
+
has(providerId) {
|
|
78
|
+
return this.providers.has(providerId);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Clear all providers (mainly for testing)
|
|
82
|
+
*/
|
|
83
|
+
clear() {
|
|
84
|
+
this.providers.clear();
|
|
85
|
+
this.defaultProviderId = undefined;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=provider-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-registry.js","sourceRoot":"","sources":["../../../src/infrastructure/providers/provider-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAC,QAAQ,GAA4B,IAAI,CAAC;IAChD,SAAS,GAAgC,IAAI,GAAG,EAAE,CAAC;IACnD,iBAAiB,CAAU;IAEnC;;OAEG;IACH,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACrD,CAAC;QACD,OAAO,gBAAgB,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAwB;QAC/B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QAE1C,oDAAoD;QACpD,IAAI,CAAC,IAAI,CAAC,iB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AC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;IACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-validator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/security/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAuCnE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"input-validator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/security/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAuCnE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAyD7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CA2B/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,MAAyB,GAAG,gBAAgB,CAkBzG;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBxD"}
|
|
@@ -51,11 +51,21 @@ export function validateQuery(query) {
|
|
|
51
51
|
errors.push('Null bytes not allowed in query');
|
|
52
52
|
}
|
|
53
53
|
// Check for command injection patterns
|
|
54
|
+
// Only block ACTUAL dangerous patterns, not currency symbols or normal text
|
|
54
55
|
const commandInjectionPatterns = [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
// Actual command chaining (semicolon, pipe, backtick, ampersand)
|
|
57
|
+
/[;&|`]/,
|
|
58
|
+
// Command substitution with parentheses (but allow normal parentheses in text)
|
|
59
|
+
/\$\([^)]*\)/, // $(command) pattern
|
|
60
|
+
/\$\{[^}]*\}/, // ${variable} pattern (but allow ${ in normal text if not followed by command)
|
|
61
|
+
// XSS attempts
|
|
62
|
+
/<script/i,
|
|
63
|
+
/javascript:/i,
|
|
64
|
+
/on\w+\s*=/i,
|
|
65
|
+
// Shell redirection (but allow < and > in normal text)
|
|
66
|
+
/\s*[<>]\s*\w+/, // < file or > file patterns
|
|
67
|
+
// Command injection with backticks
|
|
68
|
+
/`[^`]*`/, // `command` pattern
|
|
59
69
|
];
|
|
60
70
|
for (const pattern of commandInjectionPatterns) {
|
|
61
71
|
if (pattern.test(query)) {
|
|
@@ -63,10 +73,13 @@ export function validateQuery(query) {
|
|
|
63
73
|
break;
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
|
-
// Sanitize query
|
|
76
|
+
// Sanitize query (only remove actual dangerous patterns, preserve normal text)
|
|
67
77
|
let sanitized = query
|
|
68
78
|
.replace(/\0/g, '') // Remove null bytes
|
|
69
|
-
.replace(/[
|
|
79
|
+
.replace(/[;&|`]/g, '') // Remove command chaining characters
|
|
80
|
+
.replace(/\$\([^)]*\)/g, '') // Remove command substitution $(...)
|
|
81
|
+
.replace(/\$\{[^}]*\}/g, '') // Remove command substitution ${...}
|
|
82
|
+
.replace(/`[^`]*`/g, '') // Remove backtick command execution
|
|
70
83
|
.replace(/<script/gi, '<script') // Escape script tags
|
|
71
84
|
.replace(/javascript:/gi, '') // Remove javascript protocol
|
|
72
85
|
.replace(/on\w+\s*=/gi, ''); // Remove event handlers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-validator.js","sourceRoot":"","sources":["../../../src/infrastructure/security/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,yCAAyC;IACzC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;IAC3D,CAAC;IAED,gDAAgD;IAChD,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3D,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAC5C,CAAC;IAED,uBAAuB;IACvB,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;IAED,iCAAiC;IACjC,MAAM,cAAc,GAAG,oBAAoB,CAAC;IAC5C,IAAI,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IAChB,IAAI,SAAS,GAAG,QAAQ;SACrB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,YAAY;SACjC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,WAAW;SAC7B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,oBAAoB;SACvC,OAAO,CAAC,qBAAqB,E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AAQ,CAAC,CAAC;IACvE,CAAC;IAED,oDAAoD;IACpD,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;KACP,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,oDAAoD;IACpD,IAAI,SAAS,GAAG,KAAK;QACnB,2DAA2D;SAC1D,OAAO,CAAC,mBAAmB,EAAE,YAAY,CAAC;QAC3C,yBAAyB;SACxB,OAAO,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;QAC/E,0BAA0B;SACzB,OAAO,CAAC,8BAA8B,EAAE,kBAAkB,CAAC;SAC3D,OAAO,CAAC,yBAAyB,EAAE,qBAAqB,CAAC;SACzD,OAAO,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC;IAEzD,2BAA2B;IAC3B,MAAM,cAAc,GAAG,IAAI,CAAC;IAC5B,IAAI,SAAS,CAAC,MAAM,GAAG,cAAc,EAAE,CAAC;QACtC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC;IACxE,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TOON (Token-Oriented Object Notation) Serializer
|
|
3
|
+
*
|
|
4
|
+
* Phase 1: Code Context Serialization for v1.0.0 MVP
|
|
5
|
+
*
|
|
6
|
+
* Benefits:
|
|
7
|
+
* - 30-60% token reduction compared to JSON
|
|
8
|
+
* - Better LLM parsing accuracy
|
|
9
|
+
* - Self-documenting structure
|
|
10
|
+
*
|
|
11
|
+
* Feature Flag: CODEHERE_USE_TOON (default: false for v1.0.0)
|
|
12
|
+
*/
|
|
13
|
+
import type { CodeChunk } from '../../domain/entities/code-chunk.js';
|
|
14
|
+
/**
|
|
15
|
+
* Serialize code chunks to TOON format
|
|
16
|
+
*
|
|
17
|
+
* TOON format for code chunks:
|
|
18
|
+
* chunks[N]{filepath,content,score,lineStart,lineEnd}:
|
|
19
|
+
* src/auth.ts,function authenticate() {...},0.95,10,60
|
|
20
|
+
* src/utils.ts,export function helper() {...},0.87,5,35
|
|
21
|
+
*
|
|
22
|
+
* @param chunks Code chunks to serialize
|
|
23
|
+
* @returns TOON-formatted string, or null if TOON is disabled or library unavailable
|
|
24
|
+
*/
|
|
25
|
+
export declare function serializeCodeChunksToToon(chunks: CodeChunk[]): Promise<string | null>;
|
|
26
|
+
/**
|
|
27
|
+
* Serialize code chunks to traditional format (fallback)
|
|
28
|
+
* Used when TOON is disabled or unavailable
|
|
29
|
+
*
|
|
30
|
+
* @param chunks Code chunks to serialize
|
|
31
|
+
* @returns Traditional formatted string
|
|
32
|
+
*/
|
|
33
|
+
export declare function serializeCodeChunksToTraditional(chunks: CodeChunk[]): string;
|
|
34
|
+
/**
|
|
35
|
+
* Serialize code chunks (TOON if enabled, traditional otherwise)
|
|
36
|
+
*
|
|
37
|
+
* @param chunks Code chunks to serialize
|
|
38
|
+
* @returns Formatted string (TOON or traditional)
|
|
39
|
+
*/
|
|
40
|
+
export declare function serializeCodeChunks(chunks: CodeChunk[]): Promise<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Check if TOON is available and enabled
|
|
43
|
+
*/
|
|
44
|
+
export declare function isToonAvailable(): Promise<boolean>;
|
|
45
|
+
//# sourceMappingURL=toon-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toon-serializer.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/serialization/toon-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AA+BrE;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmC3F;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAI5E;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9E;AAED;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAMxD"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TOON (Token-Oriented Object Notation) Serializer
|
|
3
|
+
*
|
|
4
|
+
* Phase 1: Code Context Serialization for v1.0.0 MVP
|
|
5
|
+
*
|
|
6
|
+
* Benefits:
|
|
7
|
+
* - 30-60% token reduction compared to JSON
|
|
8
|
+
* - Better LLM parsing accuracy
|
|
9
|
+
* - Self-documenting structure
|
|
10
|
+
*
|
|
11
|
+
* Feature Flag: CODEHERE_USE_TOON (default: false for v1.0.0)
|
|
12
|
+
*/
|
|
13
|
+
let toonLib = null;
|
|
14
|
+
/**
|
|
15
|
+
* Lazy load TOON library (only if feature flag is enabled)
|
|
16
|
+
*/
|
|
17
|
+
async function getToonLib() {
|
|
18
|
+
if (toonLib === null) {
|
|
19
|
+
try {
|
|
20
|
+
// Dynamic import for ES modules - use eval to avoid TypeScript compile-time error when package isn't installed
|
|
21
|
+
// This allows the code to compile even if @toon-format/toon is not installed
|
|
22
|
+
const toonModulePath = '@toon-format/toon';
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
24
|
+
const toonModule = await import(/* @ts-ignore */ toonModulePath);
|
|
25
|
+
toonLib = toonModule;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
// TOON library not installed or feature disabled
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return toonLib;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Check if TOON is enabled via feature flag
|
|
36
|
+
*/
|
|
37
|
+
function isToonEnabled() {
|
|
38
|
+
return process.env.CODEHERE_USE_TOON === 'true' || process.env.CODEHERE_USE_TOON === '1';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Serialize code chunks to TOON format
|
|
42
|
+
*
|
|
43
|
+
* TOON format for code chunks:
|
|
44
|
+
* chunks[N]{filepath,content,score,lineStart,lineEnd}:
|
|
45
|
+
* src/auth.ts,function authenticate() {...},0.95,10,60
|
|
46
|
+
* src/utils.ts,export function helper() {...},0.87,5,35
|
|
47
|
+
*
|
|
48
|
+
* @param chunks Code chunks to serialize
|
|
49
|
+
* @returns TOON-formatted string, or null if TOON is disabled or library unavailable
|
|
50
|
+
*/
|
|
51
|
+
export async function serializeCodeChunksToToon(chunks) {
|
|
52
|
+
if (!isToonEnabled() || chunks.length === 0) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const toon = await getToonLib();
|
|
56
|
+
if (!toon) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
// Convert code chunks to array of objects for TOON encoding
|
|
61
|
+
const chunksData = chunks.map(chunk => ({
|
|
62
|
+
filepath: chunk.filepath,
|
|
63
|
+
content: chunk.content,
|
|
64
|
+
score: chunk.score || 1.0,
|
|
65
|
+
lineStart: chunk.lineStart || 0,
|
|
66
|
+
lineEnd: chunk.lineEnd || 0,
|
|
67
|
+
}));
|
|
68
|
+
// Encode to TOON format
|
|
69
|
+
// TOON library exports: { encode, decode } or default export
|
|
70
|
+
const toonData = { chunks: chunksData };
|
|
71
|
+
const encodeFn = toon.encode || toon.default?.encode || (typeof toon === 'function' ? toon : null);
|
|
72
|
+
if (!encodeFn || typeof encodeFn !== 'function') {
|
|
73
|
+
throw new Error('TOON encode function not found in module');
|
|
74
|
+
}
|
|
75
|
+
const toonString = encodeFn(toonData, { delimiter: '\t' });
|
|
76
|
+
return toonString;
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
// If TOON encoding fails, return null to fall back to JSON
|
|
80
|
+
console.warn('[TOON] Encoding failed, falling back to JSON:', error instanceof Error ? error.message : String(error));
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Serialize code chunks to traditional format (fallback)
|
|
86
|
+
* Used when TOON is disabled or unavailable
|
|
87
|
+
*
|
|
88
|
+
* @param chunks Code chunks to serialize
|
|
89
|
+
* @returns Traditional formatted string
|
|
90
|
+
*/
|
|
91
|
+
export function serializeCodeChunksToTraditional(chunks) {
|
|
92
|
+
return chunks
|
|
93
|
+
.map((chunk, idx) => `[Chunk ${idx + 1} from ${chunk.filepath}]\n${chunk.content}`)
|
|
94
|
+
.join('\n\n---\n\n');
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Serialize code chunks (TOON if enabled, traditional otherwise)
|
|
98
|
+
*
|
|
99
|
+
* @param chunks Code chunks to serialize
|
|
100
|
+
* @returns Formatted string (TOON or traditional)
|
|
101
|
+
*/
|
|
102
|
+
export async function serializeCodeChunks(chunks) {
|
|
103
|
+
const toonResult = await serializeCodeChunksToToon(chunks);
|
|
104
|
+
if (toonResult !== null) {
|
|
105
|
+
return toonResult;
|
|
106
|
+
}
|
|
107
|
+
return serializeCodeChunksToTraditional(chunks);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Check if TOON is available and enabled
|
|
111
|
+
*/
|
|
112
|
+
export async function isToonAvailable() {
|
|
113
|
+
if (!isToonEnabled()) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
const lib = await getToonLib();
|
|
117
|
+
return lib !== null;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=toon-serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toon-serializer.js","sourceRoot":"","sources":["../../../src/infrastructure/serialization/toon-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,IAAI,OAAO,GAAQ,IAAI,CAAC;AAExB;;GAEG;AACH,KAAK,UAAU,UAAU;IACvB,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC;YACH,+GAA+G;YAC/G,6EAA6E;YAC7E,MAAM,cAAc,GAAG,mBAAmB,CAAC;YAC3C,8DAA8D;YAC9D,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;YACjE,OAAO,GAAG,UAAU,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iDAAiD;YACjD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,SAAS,aAAa;IACpB,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,GAAG,CAAC;AAC3F,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,MAAmB;IACjE,IAAI,CAAC,aAAa,EAAE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,4DAA4D;QAC5D,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACtC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,CAA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B,CAAC,MAAmB;IAC3D,MAAM,UAAU,GAAG,MAAM,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,UAAU,EAAE,CAAC;IAC/B,OAAO,GAAG,KAAK,IAAI,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Embeddings Path Helper
|
|
3
|
+
* Determines per-codebase embeddings database path
|
|
4
|
+
*/
|
|
5
|
+
export interface EmbeddingsPathInfo {
|
|
6
|
+
root: string;
|
|
7
|
+
dbPath: string;
|
|
8
|
+
cacheDir: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get embeddings database path for a specific codebase
|
|
12
|
+
* Uses codebase root detection to ensure per-repo isolation
|
|
13
|
+
*
|
|
14
|
+
* @param cwd - Current working directory (defaults to process.cwd())
|
|
15
|
+
* @returns Object with root path, database path, and cache directory
|
|
16
|
+
*/
|
|
17
|
+
export declare function getEmbeddingsDbPath(cwd?: string): EmbeddingsPathInfo;
|
|
18
|
+
//# sourceMappingURL=embeddings-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddings-path.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/embeddings-path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAsB,GAAG,kBAAkB,CA2BnF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Embeddings Path Helper
|
|
3
|
+
* Determines per-codebase embeddings database path
|
|
4
|
+
*/
|
|
5
|
+
import { join } from 'path';
|
|
6
|
+
import { existsSync, mkdirSync } from 'fs';
|
|
7
|
+
import { findCodebaseRoot } from '../../domain/services/codebase-detector.js';
|
|
8
|
+
/**
|
|
9
|
+
* Get embeddings database path for a specific codebase
|
|
10
|
+
* Uses codebase root detection to ensure per-repo isolation
|
|
11
|
+
*
|
|
12
|
+
* @param cwd - Current working directory (defaults to process.cwd())
|
|
13
|
+
* @returns Object with root path, database path, and cache directory
|
|
14
|
+
*/
|
|
15
|
+
export function getEmbeddingsDbPath(cwd = process.cwd()) {
|
|
16
|
+
const codebaseInfo = findCodebaseRoot(cwd);
|
|
17
|
+
if (!codebaseInfo) {
|
|
18
|
+
// Fallback to cwd if codebase root can't be determined
|
|
19
|
+
const root = cwd;
|
|
20
|
+
const dbPath = join(root, '.codehere-cache', 'embeddings.sqlite');
|
|
21
|
+
const cacheDir = join(root, '.codehere-cache');
|
|
22
|
+
// Ensure cache directory exists
|
|
23
|
+
if (!existsSync(cacheDir)) {
|
|
24
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
25
|
+
}
|
|
26
|
+
return { root, dbPath, cacheDir };
|
|
27
|
+
}
|
|
28
|
+
const root = codebaseInfo.rootPath;
|
|
29
|
+
const dbPath = join(root, '.codehere-cache', 'embeddings.sqlite');
|
|
30
|
+
const cacheDir = join(root, '.codehere-cache');
|
|
31
|
+
// Ensure cache directory exists
|
|
32
|
+
if (!existsSync(cacheDir)) {
|
|
33
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
34
|
+
}
|
|
35
|
+
return { root, dbPath, cacheDir };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=embeddings-path.js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,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-repository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/plan-repository.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-repository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/plan-repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAiB1D,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,qBAAa,kBAAmB,YAAW,eAAe;IACxD,OAAO,CAAC,QAAQ,CAAS;;IASzB;;OAEG;IACG,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAcvC;;OAEG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAgB/C;;OAEG;IACG,IAAI,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAM/C;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnE;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO5C;AAID,wBAAgB,iBAAiB,IAAI,eAAe,CAKnD"}
|