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,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-Model Planning Strategy
|
|
3
|
+
* Implements two-stage planning pipeline: planner + optional validator
|
|
4
|
+
*/
|
|
5
|
+
import { SimplePlanningStrategy } from './simple-planning-strategy.js';
|
|
6
|
+
import { SimpleValidatorStrategy } from './validator-strategy.js';
|
|
7
|
+
import { RoleProviderResolver } from './role-provider-resolver.js';
|
|
8
|
+
import { ProviderAIService } from '../../infrastructure/ai/provider-ai-service.js';
|
|
9
|
+
import { randomUUID } from 'crypto';
|
|
10
|
+
/**
|
|
11
|
+
* Multi-model planning strategy
|
|
12
|
+
* Uses planner role for initial plan, validator role for validation (if configured)
|
|
13
|
+
*/
|
|
14
|
+
export class MultiModelPlanningStrategy {
|
|
15
|
+
defaultAIService;
|
|
16
|
+
plannerStrategy;
|
|
17
|
+
validatorStrategy = null;
|
|
18
|
+
roleResolver;
|
|
19
|
+
constructor(defaultAIService, roleResolver) {
|
|
20
|
+
this.defaultAIService = defaultAIService;
|
|
21
|
+
this.roleResolver = roleResolver || new RoleProviderResolver();
|
|
22
|
+
// Create planner strategy with planner provider
|
|
23
|
+
const plannerProvider = this.roleResolver.resolveRoleProvider('planner');
|
|
24
|
+
const plannerAIService = new ProviderAIService(plannerProvider);
|
|
25
|
+
this.plannerStrategy = new SimplePlanningStrategy(plannerAIService);
|
|
26
|
+
// Create validator strategy if validator role is configured
|
|
27
|
+
if (this.roleResolver.isRoleConfigured('validator')) {
|
|
28
|
+
try {
|
|
29
|
+
const validatorProvider = this.roleResolver.resolveRoleProvider('validator');
|
|
30
|
+
const validatorAIService = new ProviderAIService(validatorProvider);
|
|
31
|
+
this.validatorStrategy = new SimpleValidatorStrategy(validatorAIService);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
// Validator provider resolution failed - continue without validator
|
|
35
|
+
console.warn('[MultiModelPlanningStrategy] Validator provider resolution failed, continuing without validator:', error instanceof Error ? error.message : String(error));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async executePlanning(context) {
|
|
40
|
+
const startTime = Date.now();
|
|
41
|
+
const traceId = randomUUID();
|
|
42
|
+
// Stage 1: Planner
|
|
43
|
+
const plannerStepId = randomUUID();
|
|
44
|
+
const plannerStartTime = Date.now();
|
|
45
|
+
// Resolve planner provider before execution
|
|
46
|
+
let plannerProvider;
|
|
47
|
+
try {
|
|
48
|
+
plannerProvider = this.roleResolver.resolveRoleProvider('planner');
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
throw new Error(`Planner provider resolution failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
52
|
+
}
|
|
53
|
+
let plannerResult;
|
|
54
|
+
try {
|
|
55
|
+
plannerResult = await this.plannerStrategy.executePlanning(context);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
// Planner failure - rethrow to trigger fallback
|
|
59
|
+
throw new Error(`Planner step failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
60
|
+
}
|
|
61
|
+
const plannerDuration = Date.now() - plannerStartTime;
|
|
62
|
+
const plannerStep = {
|
|
63
|
+
id: plannerStepId,
|
|
64
|
+
role: 'planner',
|
|
65
|
+
input: context.goal,
|
|
66
|
+
output: JSON.stringify(plannerResult.plan),
|
|
67
|
+
timestamp: plannerStartTime,
|
|
68
|
+
duration: plannerDuration,
|
|
69
|
+
metadata: {
|
|
70
|
+
provider: plannerProvider.name,
|
|
71
|
+
providerId: plannerProvider.id,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
// Stage 2: Validator (optional)
|
|
75
|
+
let validatedPlan = plannerResult.plan;
|
|
76
|
+
let validatorStep = null;
|
|
77
|
+
if (this.validatorStrategy) {
|
|
78
|
+
const validatorStepId = randomUUID();
|
|
79
|
+
const validatorStartTime = Date.now();
|
|
80
|
+
let validatorProvider = null;
|
|
81
|
+
try {
|
|
82
|
+
validatorProvider = this.roleResolver.resolveRoleProvider('validator');
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// Validator provider resolution failed - skip validation
|
|
86
|
+
console.warn('[MultiModelPlanningStrategy] Validator provider resolution failed, skipping validation:', error instanceof Error ? error.message : String(error));
|
|
87
|
+
}
|
|
88
|
+
if (validatorProvider) {
|
|
89
|
+
try {
|
|
90
|
+
const validationResult = await this.validatorStrategy.validatePlan(plannerResult.plan, {
|
|
91
|
+
goal: context.goal,
|
|
92
|
+
reflections: context.reflections,
|
|
93
|
+
memories: context.memories,
|
|
94
|
+
context: context.context,
|
|
95
|
+
});
|
|
96
|
+
validatedPlan = validationResult.plan;
|
|
97
|
+
const validatorDuration = Date.now() - validatorStartTime;
|
|
98
|
+
validatorStep = {
|
|
99
|
+
id: validatorStepId,
|
|
100
|
+
role: 'validator',
|
|
101
|
+
input: JSON.stringify(plannerResult.plan),
|
|
102
|
+
output: JSON.stringify({
|
|
103
|
+
isValid: validationResult.isValid,
|
|
104
|
+
warnings: validationResult.warnings,
|
|
105
|
+
risks: validationResult.risks,
|
|
106
|
+
}),
|
|
107
|
+
timestamp: validatorStartTime,
|
|
108
|
+
duration: validatorDuration,
|
|
109
|
+
metadata: {
|
|
110
|
+
provider: validatorProvider.name,
|
|
111
|
+
providerId: validatorProvider.id,
|
|
112
|
+
isValid: validationResult.isValid,
|
|
113
|
+
warningsCount: validationResult.warnings?.length || 0,
|
|
114
|
+
risksCount: validationResult.risks?.length || 0,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
// Validator failure - use planner result but log the failure
|
|
120
|
+
console.warn('[MultiModelPlanningStrategy] Validator step failed, using planner result:', error instanceof Error ? error.message : String(error));
|
|
121
|
+
validatorStep = {
|
|
122
|
+
id: validatorStepId,
|
|
123
|
+
role: 'validator',
|
|
124
|
+
input: JSON.stringify(plannerResult.plan),
|
|
125
|
+
output: 'Validation failed',
|
|
126
|
+
timestamp: validatorStartTime,
|
|
127
|
+
duration: Date.now() - validatorStartTime,
|
|
128
|
+
metadata: {
|
|
129
|
+
provider: validatorProvider.name,
|
|
130
|
+
providerId: validatorProvider.id,
|
|
131
|
+
error: error instanceof Error ? error.message : String(error),
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Build combined trace
|
|
138
|
+
const steps = [plannerStep];
|
|
139
|
+
if (validatorStep) {
|
|
140
|
+
steps.push(validatorStep);
|
|
141
|
+
}
|
|
142
|
+
const totalDuration = Date.now() - startTime;
|
|
143
|
+
const trace = {
|
|
144
|
+
id: traceId,
|
|
145
|
+
steps,
|
|
146
|
+
summary: `Multi-model plan: ${steps.length} step(s) (planner${validatorStep ? ' + validator' : ''})`,
|
|
147
|
+
metadata: {
|
|
148
|
+
totalDuration,
|
|
149
|
+
totalTokens: steps.reduce((sum, step) => sum + (step.tokenUsage?.inputTokens || 0) + (step.tokenUsage?.outputTokens || 0), 0),
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
plan: validatedPlan,
|
|
154
|
+
trace,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=multi-model-planning-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-model-planning-strategy.js","sourceRoot":"","sources":["../../../src/application/reasoning/multi-model-planning-strategy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAA2B,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAsB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IAM3B;IALF,eAAe,CAAyB;IACxC,iBAAiB,GAA8B,IAAI,CAAC;IACpD,YAAY,CAAuB;IAE3C,YACU,gBAA4B,EACpC,YAAmC;QAD3B,qBAAgB,GAAhB,gBAAgB,CAAY;QAGpC,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,IAAI,oBAAoB,EAAE,CAAC;QAE/D,gDAAgD;QAChD,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACzE,MAAM,gBAAgB,GAAG,IAAI,iBAAiB,CAAC,eAAe,CAAC,CAAC;QAChE,IAAI,CAAC,eAAe,GAAG,IAAI,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;QAEpE,4DAA4D;QAC5D,IAAI,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;YACpD,IAAI,CAAC;gBACH,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;gBAC7E,MAAM,kBAAkB,GAAG,IAAI,iBAAiB,C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Configuration Helper
|
|
3
|
+
* Checks reasoning layer configuration (enabled, multi-model mode, etc.)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check if reasoning layer is enabled
|
|
7
|
+
* Priority: Environment variable > Config file > Default (false)
|
|
8
|
+
*/
|
|
9
|
+
export declare function isReasoningEnabled(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if multi-model reasoning is enabled
|
|
12
|
+
* Requires reasoning.enabled = true AND reasoning.multiModel.enabled = true
|
|
13
|
+
*/
|
|
14
|
+
export declare function isMultiModelEnabled(): boolean;
|
|
15
|
+
//# sourceMappingURL=reasoning-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-config.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAgB5C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAmB7C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning Configuration Helper
|
|
3
|
+
* Checks reasoning layer configuration (enabled, multi-model mode, etc.)
|
|
4
|
+
*/
|
|
5
|
+
import { ConfigManager } from '../../infrastructure/config/config-manager.js';
|
|
6
|
+
/**
|
|
7
|
+
* Check if reasoning layer is enabled
|
|
8
|
+
* Priority: Environment variable > Config file > Default (false)
|
|
9
|
+
*/
|
|
10
|
+
export function isReasoningEnabled() {
|
|
11
|
+
// Check environment variable first
|
|
12
|
+
const envEnabled = process.env.CODEHERE_REASONING_ENABLED;
|
|
13
|
+
if (envEnabled !== undefined) {
|
|
14
|
+
return envEnabled === '1' || envEnabled.toLowerCase() === 'true';
|
|
15
|
+
}
|
|
16
|
+
// Check config file
|
|
17
|
+
try {
|
|
18
|
+
const configManager = new ConfigManager();
|
|
19
|
+
const reasoningConfig = configManager.get('reasoning');
|
|
20
|
+
return reasoningConfig?.enabled === true;
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
// If config not available, default to false
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if multi-model reasoning is enabled
|
|
29
|
+
* Requires reasoning.enabled = true AND reasoning.multiModel.enabled = true
|
|
30
|
+
*/
|
|
31
|
+
export function isMultiModelEnabled() {
|
|
32
|
+
if (!isReasoningEnabled()) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
// Check environment variable first
|
|
36
|
+
const envMultiModel = process.env.CODEHERE_REASONING_MULTI_MODEL;
|
|
37
|
+
if (envMultiModel !== undefined) {
|
|
38
|
+
return envMultiModel === '1' || envMultiModel.toLowerCase() === 'true';
|
|
39
|
+
}
|
|
40
|
+
// Check config file
|
|
41
|
+
try {
|
|
42
|
+
const configManager = new ConfigManager();
|
|
43
|
+
const reasoningConfig = configManager.get('reasoning');
|
|
44
|
+
return reasoningConfig?.multiModel?.enabled === true;
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=reasoning-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-config.js","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,mCAAmC;IACnC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;IAC1D,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,UAAU,KAAK,GAAG,IAAI,UAAU,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;IACnE,CAAC;IAED,oBAAoB;IACpB,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,MAAM,eAAe,GAAG,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACvD,OAAO,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,4CAA4C;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,mCAAmC;IACnC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IACjE,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,aAAa,KAAK,GAAG,IAAI,aAAa,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;IACzE,CAAC;IAED,oBAAoB;IACpB,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,MAAM,eAAe,GAAG,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACvD,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning Orchestrator
|
|
3
|
+
* Coordinates reasoning strategies and provides unified interface
|
|
4
|
+
*/
|
|
5
|
+
import type { IReasoningStrategy, PlanningResult } from './reasoning-strategy.interface.js';
|
|
6
|
+
import type { PlanningInputContext } from './types.js';
|
|
7
|
+
import type { ExecutionTracer } from '../../infrastructure/observability/execution-tracer.js';
|
|
8
|
+
export interface IReasoningOrchestrator {
|
|
9
|
+
planWithReasoning(context: PlanningInputContext): Promise<PlanningResult>;
|
|
10
|
+
}
|
|
11
|
+
export declare class ReasoningOrchestrator implements IReasoningOrchestrator {
|
|
12
|
+
private strategy;
|
|
13
|
+
private tracer?;
|
|
14
|
+
private providerName?;
|
|
15
|
+
constructor(strategy: IReasoningStrategy, tracer?: ExecutionTracer | undefined, providerName?: string | undefined);
|
|
16
|
+
planWithReasoning(context: PlanningInputContext): Promise<PlanningResult>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=reasoning-orchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-orchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAE9F,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC3E;AAED,qBAAa,qBAAsB,YAAW,sBAAsB;IAEhE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM,CAAC;IACf,OAAO,CAAC,YAAY,CAAC;gBAFb,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,CAAC,EAAE,eAAe,YAAA,EACxB,YAAY,CAAC,EAAE,MAAM,YAAA;IAGzB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;CAkKhF"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning Orchestrator
|
|
3
|
+
* Coordinates reasoning strategies and provides unified interface
|
|
4
|
+
*/
|
|
5
|
+
export class ReasoningOrchestrator {
|
|
6
|
+
strategy;
|
|
7
|
+
tracer;
|
|
8
|
+
providerName;
|
|
9
|
+
constructor(strategy, tracer, providerName) {
|
|
10
|
+
this.strategy = strategy;
|
|
11
|
+
this.tracer = tracer;
|
|
12
|
+
this.providerName = providerName;
|
|
13
|
+
}
|
|
14
|
+
async planWithReasoning(context) {
|
|
15
|
+
const runId = this.tracer?.getCurrentRunId();
|
|
16
|
+
const startTime = Date.now();
|
|
17
|
+
// Trace start event
|
|
18
|
+
const traceId = this.tracer?.trace({
|
|
19
|
+
operationType: 'plan_generation',
|
|
20
|
+
operationName: 'reasoning_orchestrator_plan_start',
|
|
21
|
+
input: {
|
|
22
|
+
goal: context.goal,
|
|
23
|
+
planningMode: context.planningMode,
|
|
24
|
+
},
|
|
25
|
+
metadata: {
|
|
26
|
+
reasoningEnabled: true,
|
|
27
|
+
role: 'planner',
|
|
28
|
+
providerName: this.providerName || 'unknown',
|
|
29
|
+
startTime,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
try {
|
|
33
|
+
const result = await this.strategy.executePlanning(context);
|
|
34
|
+
// Trace completion with metrics
|
|
35
|
+
const endTime = Date.now();
|
|
36
|
+
const totalDuration = endTime - startTime;
|
|
37
|
+
if (this.tracer && traceId) {
|
|
38
|
+
// Trace each reasoning step with role-specific events
|
|
39
|
+
result.trace.steps.forEach((step, idx) => {
|
|
40
|
+
const stepProviderName = step.metadata?.provider || this.providerName || 'unknown';
|
|
41
|
+
// Trace role start event
|
|
42
|
+
this.tracer.trace({
|
|
43
|
+
operationType: 'llm_call',
|
|
44
|
+
operationName: 'reasoning_role_start',
|
|
45
|
+
input: {
|
|
46
|
+
stepId: step.id,
|
|
47
|
+
role: step.role,
|
|
48
|
+
inputLength: step.input.length,
|
|
49
|
+
},
|
|
50
|
+
metadata: {
|
|
51
|
+
reasoningEnabled: true,
|
|
52
|
+
role: step.role,
|
|
53
|
+
stepIndex: idx,
|
|
54
|
+
providerName: stepProviderName,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
// Trace role end event
|
|
58
|
+
this.tracer.trace({
|
|
59
|
+
operationType: 'llm_call',
|
|
60
|
+
operationName: 'reasoning_role_end',
|
|
61
|
+
input: {
|
|
62
|
+
stepId: step.id,
|
|
63
|
+
role: step.role,
|
|
64
|
+
inputLength: step.input.length,
|
|
65
|
+
},
|
|
66
|
+
output: {
|
|
67
|
+
outputLength: step.output.length,
|
|
68
|
+
},
|
|
69
|
+
duration: step.duration,
|
|
70
|
+
metadata: {
|
|
71
|
+
reasoningEnabled: true,
|
|
72
|
+
role: step.role,
|
|
73
|
+
stepIndex: idx,
|
|
74
|
+
inputTokens: step.tokenUsage?.inputTokens,
|
|
75
|
+
outputTokens: step.tokenUsage?.outputTokens,
|
|
76
|
+
providerName: stepProviderName,
|
|
77
|
+
durationMs: step.duration,
|
|
78
|
+
success: true,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
// Trace overall orchestration end event
|
|
83
|
+
this.tracer.trace({
|
|
84
|
+
operationType: 'plan_generation',
|
|
85
|
+
operationName: 'reasoning_orchestrator_plan_end',
|
|
86
|
+
input: {
|
|
87
|
+
goal: context.goal,
|
|
88
|
+
planningMode: context.planningMode,
|
|
89
|
+
},
|
|
90
|
+
output: {
|
|
91
|
+
planId: result.plan.id,
|
|
92
|
+
subPlansCount: result.plan.subPlans.length,
|
|
93
|
+
traceId: result.trace.id,
|
|
94
|
+
stepsCount: result.trace.steps.length,
|
|
95
|
+
success: true,
|
|
96
|
+
},
|
|
97
|
+
duration: totalDuration,
|
|
98
|
+
metadata: {
|
|
99
|
+
reasoningEnabled: true,
|
|
100
|
+
totalDuration: result.trace.metadata?.totalDuration,
|
|
101
|
+
totalTokens: result.trace.metadata?.totalTokens,
|
|
102
|
+
role: 'planner',
|
|
103
|
+
providerName: this.providerName || 'unknown',
|
|
104
|
+
durationMs: totalDuration,
|
|
105
|
+
startTime,
|
|
106
|
+
endTime,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
// Trace error event
|
|
114
|
+
const endTime = Date.now();
|
|
115
|
+
const totalDuration = endTime - startTime;
|
|
116
|
+
if (this.tracer && traceId) {
|
|
117
|
+
// Trace role error event
|
|
118
|
+
const roleErrorTrace = {
|
|
119
|
+
operationType: 'plan_generation',
|
|
120
|
+
operationName: 'reasoning_role_error',
|
|
121
|
+
input: {
|
|
122
|
+
goal: context.goal,
|
|
123
|
+
planningMode: context.planningMode,
|
|
124
|
+
},
|
|
125
|
+
error: {
|
|
126
|
+
message: error instanceof Error ? error.message : String(error),
|
|
127
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
128
|
+
},
|
|
129
|
+
duration: totalDuration,
|
|
130
|
+
metadata: {
|
|
131
|
+
reasoningEnabled: true,
|
|
132
|
+
role: 'planner',
|
|
133
|
+
providerName: this.providerName || 'unknown',
|
|
134
|
+
durationMs: totalDuration,
|
|
135
|
+
startTime,
|
|
136
|
+
endTime,
|
|
137
|
+
success: false,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
this.tracer.trace(roleErrorTrace);
|
|
141
|
+
// Also trace overall orchestration error
|
|
142
|
+
const errorTrace = {
|
|
143
|
+
operationType: 'plan_generation',
|
|
144
|
+
operationName: 'reasoning_orchestrator_plan_error',
|
|
145
|
+
input: {
|
|
146
|
+
goal: context.goal,
|
|
147
|
+
planningMode: context.planningMode,
|
|
148
|
+
},
|
|
149
|
+
error: {
|
|
150
|
+
message: error instanceof Error ? error.message : String(error),
|
|
151
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
152
|
+
},
|
|
153
|
+
duration: totalDuration,
|
|
154
|
+
metadata: {
|
|
155
|
+
reasoningEnabled: true,
|
|
156
|
+
role: 'planner',
|
|
157
|
+
providerName: this.providerName || 'unknown',
|
|
158
|
+
durationMs: totalDuration,
|
|
159
|
+
startTime,
|
|
160
|
+
endTime,
|
|
161
|
+
success: false,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
this.tracer.trace(errorTrace);
|
|
165
|
+
}
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=reasoning-orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-orchestrator.js","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-orchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,MAAM,OAAO,qBAAqB;IAEtB;IACA;IACA;IAHV,YACU,QAA4B,EAC5B,MAAwB,EACxB,YAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAoB;QAC5B,WAAM,GAAN,MAAM,CAAkB;QACxB,iBAAY,GAAZ,YAAY,CAAS;IAC5B,CAAC;IAEJ,KAAK,CAAC,iBAAiB,CAAC,OAA6B;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;QAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,oBAAoB;QACpB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;YACjC,aAAa,EAAE,iBAAiB;YAChC,aAAa,EAAE,mCAAmC;YAClD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,YAAY,EAAE,OAAO,CAAC,YAAY;aACnC;YACD,QAAQ,EAAE;gBACR,gBAAgB,EAAE,IAAI;gBACtB,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;gBAC5C,SAAS;aACV;SACF,CAAC,CAAC;QAEH,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAE5D,gCAAgC;YAChC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EA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AAC,CAAC,SAAS;qBACxD;oBACD,QAAQ,EAAE,aAAa;oBACvB,QAAQ,EAAE;wBACR,gBAAgB,EAAE,IAAI;wBACtB,IAAI,EAAE,SAAS;wBACf,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;wBAC5C,UAAU,EAAE,aAAa;wBACzB,SAAS;wBACT,OAAO;wBACP,OAAO,EAAE,KAAK;qBACf;iBACF,CAAC;gBACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning Strategy Interface
|
|
3
|
+
* Defines how reasoning is executed for different use cases
|
|
4
|
+
*/
|
|
5
|
+
import type { ReasoningTrace, PlanningInputContext } from './types.js';
|
|
6
|
+
import type { Plan } from '../../domain/entities/plan.js';
|
|
7
|
+
/**
|
|
8
|
+
* Planning result from reasoning strategy
|
|
9
|
+
*/
|
|
10
|
+
export interface PlanningResult {
|
|
11
|
+
plan: Plan;
|
|
12
|
+
trace: ReasoningTrace;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Reasoning strategy interface
|
|
16
|
+
* Different strategies can implement different reasoning patterns
|
|
17
|
+
*/
|
|
18
|
+
export interface IReasoningStrategy {
|
|
19
|
+
/**
|
|
20
|
+
* Execute planning with structured reasoning
|
|
21
|
+
*/
|
|
22
|
+
executePlanning(context: PlanningInputContext): Promise<PlanningResult>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=reasoning-strategy.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-strategy.interface.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-strategy.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,cAAc,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-strategy.interface.js","sourceRoot":"","sources":["../../../src/application/reasoning/reasoning-strategy.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role-Aware Provider Resolver
|
|
3
|
+
* Resolves providers for reasoning roles (planner, validator)
|
|
4
|
+
* Falls back to OperationProviderResolver if role not configured
|
|
5
|
+
*/
|
|
6
|
+
import type { IModelProvider } from '../../infrastructure/providers/model-provider.interface.js';
|
|
7
|
+
import { ProviderRegistry } from '../../infrastructure/providers/provider-registry.js';
|
|
8
|
+
import { OperationProviderResolver } from '../../infrastructure/providers/operation-provider-resolver.js';
|
|
9
|
+
import { ConfigManager } from '../../infrastructure/config/config-manager.js';
|
|
10
|
+
export type ReasoningRole = 'planner' | 'validator';
|
|
11
|
+
/**
|
|
12
|
+
* Resolve provider for a reasoning role
|
|
13
|
+
* Priority:
|
|
14
|
+
* 1. reasoning.multiModel.roles[role] if multiModel.enabled = true
|
|
15
|
+
* 2. OperationProviderResolver for 'chat' operation
|
|
16
|
+
* 3. Default provider
|
|
17
|
+
*/
|
|
18
|
+
export declare class RoleProviderResolver {
|
|
19
|
+
private configManager;
|
|
20
|
+
private providerRegistry;
|
|
21
|
+
private operationResolver;
|
|
22
|
+
constructor(configManager?: ConfigManager, providerRegistry?: ProviderRegistry, operationResolver?: OperationProviderResolver);
|
|
23
|
+
/**
|
|
24
|
+
* Resolve provider for a reasoning role
|
|
25
|
+
*/
|
|
26
|
+
resolveRoleProvider(role: ReasoningRole): IModelProvider;
|
|
27
|
+
/**
|
|
28
|
+
* Check if multi-model reasoning is enabled
|
|
29
|
+
*/
|
|
30
|
+
isMultiModelEnabled(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check if a specific role is configured
|
|
33
|
+
*/
|
|
34
|
+
isRoleConfigured(role: ReasoningRole): boolean;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=role-provider-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-provider-resolver.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/role-provider-resolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAsB,MAAM,+DAA+D,CAAC;AAC9H,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpD;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAA4B;gBAGnD,aAAa,CAAC,EAAE,aAAa,EAC7B,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,iBAAiB,CAAC,EAAE,yBAAyB;IAW/C;;OAEG;IACH,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,cAAc;IA4BxD;;OAEG;IACH,mBAAmB,IAAI,OAAO;IAK9B;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAS/C"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role-Aware Provider Resolver
|
|
3
|
+
* Resolves providers for reasoning roles (planner, validator)
|
|
4
|
+
* Falls back to OperationProviderResolver if role not configured
|
|
5
|
+
*/
|
|
6
|
+
import { ProviderRegistry } from '../../infrastructure/providers/provider-registry.js';
|
|
7
|
+
import { OperationProviderResolver } from '../../infrastructure/providers/operation-provider-resolver.js';
|
|
8
|
+
import { ConfigManager } from '../../infrastructure/config/config-manager.js';
|
|
9
|
+
/**
|
|
10
|
+
* Resolve provider for a reasoning role
|
|
11
|
+
* Priority:
|
|
12
|
+
* 1. reasoning.multiModel.roles[role] if multiModel.enabled = true
|
|
13
|
+
* 2. OperationProviderResolver for 'chat' operation
|
|
14
|
+
* 3. Default provider
|
|
15
|
+
*/
|
|
16
|
+
export class RoleProviderResolver {
|
|
17
|
+
configManager;
|
|
18
|
+
providerRegistry;
|
|
19
|
+
operationResolver;
|
|
20
|
+
constructor(configManager, providerRegistry, operationResolver) {
|
|
21
|
+
this.configManager = configManager || new ConfigManager();
|
|
22
|
+
this.providerRegistry = providerRegistry || ProviderRegistry.getInstance();
|
|
23
|
+
this.operationResolver = operationResolver || new OperationProviderResolver(this.providerRegistry, null, null);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve provider for a reasoning role
|
|
27
|
+
*/
|
|
28
|
+
resolveRoleProvider(role) {
|
|
29
|
+
// Check if multi-model is enabled
|
|
30
|
+
const reasoningConfig = this.configManager.get('reasoning');
|
|
31
|
+
const multiModelEnabled = reasoningConfig?.multiModel?.enabled === true;
|
|
32
|
+
if (multiModelEnabled) {
|
|
33
|
+
// Try role-specific provider
|
|
34
|
+
const roleProviderId = reasoningConfig?.multiModel?.roles?.[role];
|
|
35
|
+
if (roleProviderId) {
|
|
36
|
+
const provider = this.providerRegistry.get(roleProviderId);
|
|
37
|
+
if (provider) {
|
|
38
|
+
return provider;
|
|
39
|
+
}
|
|
40
|
+
// Invalid provider name - log warning and fall through
|
|
41
|
+
console.warn(`[RoleProviderResolver] Provider '${roleProviderId}' not found for role '${role}', falling back to operation resolver`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// Fallback to OperationProviderResolver for 'chat' operation
|
|
45
|
+
// (planning uses chat operation)
|
|
46
|
+
try {
|
|
47
|
+
return this.operationResolver.resolveProvider('chat');
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// Final fallback to default provider
|
|
51
|
+
return this.providerRegistry.getDefault();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if multi-model reasoning is enabled
|
|
56
|
+
*/
|
|
57
|
+
isMultiModelEnabled() {
|
|
58
|
+
const reasoningConfig = this.configManager.get('reasoning');
|
|
59
|
+
return reasoningConfig?.multiModel?.enabled === true;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a specific role is configured
|
|
63
|
+
*/
|
|
64
|
+
isRoleConfigured(role) {
|
|
65
|
+
const reasoningConfig = this.configManager.get('reasoning');
|
|
66
|
+
const multiModelEnabled = reasoningConfig?.multiModel?.enabled === true;
|
|
67
|
+
if (!multiModelEnabled) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
const roleProviderId = reasoningConfig?.multiModel?.roles?.[role];
|
|
71
|
+
return !!roleProviderId && !!this.providerRegistry.get(roleProviderId);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=role-provider-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-provider-resolver.js","sourceRoot":"","sources":["../../../src/application/reasoning/role-provider-resolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAsB,MAAM,+DAA+D,CAAC;AAC9H,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAI9E;;;;;;GAMG;AACH,MAAM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AO,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;IAED;;OAEG;IACH,mBAAmB;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,IAAmB;QAClC,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC5D,MAAM,iBAAiB,GAAG,eAAe,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;QACxE,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,cAAc,GAAG,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC;QAClE,OAAO,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple Planning Strategy
|
|
3
|
+
* Wraps current planning behavior into structured reasoning trace
|
|
4
|
+
* Behaviorally equivalent to current PlanningUseCase, but structured
|
|
5
|
+
*/
|
|
6
|
+
import type { IReasoningStrategy, PlanningResult } from './reasoning-strategy.interface.js';
|
|
7
|
+
import type { PlanningInputContext } from './types.js';
|
|
8
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
9
|
+
export declare class SimplePlanningStrategy implements IReasoningStrategy {
|
|
10
|
+
private aiService;
|
|
11
|
+
constructor(aiService: IAIService);
|
|
12
|
+
executePlanning(context: PlanningInputContext): Promise<PlanningResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Build planning prompt (reuses logic from PlanningUseCase)
|
|
15
|
+
*/
|
|
16
|
+
private buildPlanningPrompt;
|
|
17
|
+
/**
|
|
18
|
+
* Parse plan from AI response (reuses logic from PlanningAgent)
|
|
19
|
+
*/
|
|
20
|
+
private parsePlanFromResponse;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=simple-planning-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-planning-strategy.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/simple-planning-strategy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAiC,MAAM,YAAY,CAAC;AAEtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAIlF,qBAAa,sBAAuB,YAAW,kBAAkB;IACnD,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,UAAU;IAEnC,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;IA0E7E;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA+D3B;;OAEG;IACH,OAAO,CAAC,qBAAqB;CA6E9B"}
|