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
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
* Multi-agent orchestration command
|
|
4
4
|
*/
|
|
5
5
|
import { container } from '../../../application/services/dependency-container.js';
|
|
6
|
-
import { colors, sectionHeader, success, error, warning, newline, createBanner, createSpinner, } from '../../../ui.js';
|
|
6
|
+
import { colors, sectionHeader, success, error, warning, newline, createBanner, createSpinner, isMinimalStyle, printMinimalHeader, getProviderDisplayName, } from '../../../ui.js';
|
|
7
7
|
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
8
8
|
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
9
9
|
import { getPlanRepository } from '../../../infrastructure/storage/plan-repository.js';
|
|
10
10
|
import { displayError } from '../error-display.js';
|
|
11
|
+
import { summaryExtractor } from '../../../infrastructure/validation/summary-extractor.js';
|
|
12
|
+
import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
|
|
13
|
+
import { isReasoningEnabled, isMultiModelEnabled } from '../../../application/reasoning/reasoning-config.js';
|
|
11
14
|
export async function executeOrchestrateCommand(goal, options = {}) {
|
|
12
15
|
// Start execution tracing
|
|
13
16
|
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
@@ -30,16 +33,43 @@ export async function executeOrchestrateCommand(goal, options = {}) {
|
|
|
30
33
|
query: goal,
|
|
31
34
|
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
32
35
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
// Determine reasoning mode for header display (capability map 2.3)
|
|
37
|
+
const reasoningEnabled = isReasoningEnabled();
|
|
38
|
+
const multiModelEnabled = isMultiModelEnabled();
|
|
39
|
+
let reasoningModeLabel;
|
|
40
|
+
if (multiModelEnabled) {
|
|
41
|
+
reasoningModeLabel = 'Multi-Model Reasoning (M2)';
|
|
42
|
+
}
|
|
43
|
+
else if (reasoningEnabled) {
|
|
44
|
+
reasoningModeLabel = 'Simple Reasoning (M1)';
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
reasoningModeLabel = 'Legacy Planning (M0)';
|
|
48
|
+
}
|
|
49
|
+
// Get provider name for display
|
|
50
|
+
const providerName = getProviderDisplayName(container.aiService);
|
|
51
|
+
// Suppress all output in JSON mode
|
|
52
|
+
if (!options.json) {
|
|
53
|
+
if (isMinimalStyle()) {
|
|
54
|
+
printMinimalHeader('orchestrate', goal);
|
|
55
|
+
console.log(colors.dim(`Mode: ${options.mode || 'full'}`));
|
|
56
|
+
console.log(colors.dim(`Reasoning: ${reasoningModeLabel}`));
|
|
57
|
+
console.log(colors.dim(`Provider: ${providerName}`));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
console.log(createBanner('Multi-Agent Orchestration', 'Planning → Execution → Validation'));
|
|
61
|
+
newline();
|
|
62
|
+
console.log(colors.bold('Goal:'));
|
|
63
|
+
console.log(colors.cyan(' ' + goal));
|
|
64
|
+
console.log(colors.dim(`Mode: ${options.mode || 'full'}`));
|
|
65
|
+
console.log(colors.bold(`Reasoning: ${reasoningModeLabel}`));
|
|
66
|
+
console.log(colors.dim(`Provider: ${providerName}`));
|
|
67
|
+
newline();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
40
70
|
// Load plan from repository if planId provided
|
|
41
71
|
let loadedPlan = null;
|
|
42
|
-
if (options.planId) {
|
|
72
|
+
if (options.planId && !options.json) {
|
|
43
73
|
const planRepository = getPlanRepository();
|
|
44
74
|
loadedPlan = await planRepository.get(options.planId);
|
|
45
75
|
if (!loadedPlan) {
|
|
@@ -53,16 +83,96 @@ export async function executeOrchestrateCommand(goal, options = {}) {
|
|
|
53
83
|
console.log(colors.dim(`Loaded plan: ${loadedPlan.goal} (${loadedPlan.status})`));
|
|
54
84
|
newline();
|
|
55
85
|
}
|
|
56
|
-
|
|
57
|
-
|
|
86
|
+
else if (options.planId && options.json) {
|
|
87
|
+
// JSON mode - load silently
|
|
88
|
+
const planRepository = getPlanRepository();
|
|
89
|
+
loadedPlan = await planRepository.get(options.planId);
|
|
90
|
+
if (!loadedPlan) {
|
|
91
|
+
console.error(JSON.stringify({ error: `Plan ${options.planId} not found` }));
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const spinner = options.json ? null : createSpinner('Orchestrating multi-agent workflow...');
|
|
96
|
+
if (spinner) {
|
|
97
|
+
spinner.start();
|
|
98
|
+
}
|
|
99
|
+
const orchestrator = container.multiAgentOrchestrator;
|
|
58
100
|
try {
|
|
59
101
|
const result = await orchestrator.orchestrate({
|
|
60
102
|
goal: loadedPlan?.goal || goal,
|
|
61
103
|
mode: options.mode || 'full',
|
|
62
104
|
context: loadedPlan ? { plan: loadedPlan } : undefined,
|
|
105
|
+
json: options.json, // Pass JSON flag to suppress error messages
|
|
63
106
|
});
|
|
64
|
-
spinner
|
|
65
|
-
|
|
107
|
+
if (spinner) {
|
|
108
|
+
spinner.stop();
|
|
109
|
+
newline();
|
|
110
|
+
}
|
|
111
|
+
// JSON output (capability map requirement 2.17)
|
|
112
|
+
if (options.json) {
|
|
113
|
+
const jsonOutput = {
|
|
114
|
+
goal: result.plan?.goal || goal,
|
|
115
|
+
mode: options.mode || 'full',
|
|
116
|
+
reasoningMode: reasoningModeLabel,
|
|
117
|
+
planId: result.plan?.id,
|
|
118
|
+
provider: container.aiService.provider?.name || container.aiService.provider?.id || 'unknown',
|
|
119
|
+
plan: null,
|
|
120
|
+
execution: null,
|
|
121
|
+
validation: null,
|
|
122
|
+
};
|
|
123
|
+
// Always include plan section (even if empty)
|
|
124
|
+
if (result.plan) {
|
|
125
|
+
jsonOutput.plan = {
|
|
126
|
+
goal: result.plan.goal,
|
|
127
|
+
id: result.plan.id,
|
|
128
|
+
status: result.plan.status,
|
|
129
|
+
subPlans: result.plan.subPlans.map(sp => ({
|
|
130
|
+
id: sp.id,
|
|
131
|
+
description: sp.description,
|
|
132
|
+
type: sp.type,
|
|
133
|
+
status: sp.status,
|
|
134
|
+
complexity: sp.estimatedComplexity,
|
|
135
|
+
dependencies: sp.dependencies,
|
|
136
|
+
})),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
jsonOutput.plan = null;
|
|
141
|
+
}
|
|
142
|
+
// Always include execution section (even if empty)
|
|
143
|
+
if (result.execution) {
|
|
144
|
+
jsonOutput.execution = {
|
|
145
|
+
completedSubPlans: result.execution.completedSubPlans,
|
|
146
|
+
totalSubPlans: result.execution.totalSubPlans,
|
|
147
|
+
overallSuccess: result.execution.overallSuccess,
|
|
148
|
+
results: result.execution.results.map(r => ({
|
|
149
|
+
subPlanId: r.subPlanId,
|
|
150
|
+
success: r.success,
|
|
151
|
+
duration: r.duration,
|
|
152
|
+
error: r.error,
|
|
153
|
+
})),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
jsonOutput.execution = null;
|
|
158
|
+
}
|
|
159
|
+
// Always include validation section (even if empty)
|
|
160
|
+
if (result.validation) {
|
|
161
|
+
jsonOutput.validation = {
|
|
162
|
+
qualityScore: result.validation.qualityScore,
|
|
163
|
+
compilationSuccess: result.validation.compilationSuccess,
|
|
164
|
+
testsPassed: result.validation.testsPassed,
|
|
165
|
+
testResults: result.validation.testResults,
|
|
166
|
+
recommendations: result.validation.recommendations,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
jsonOutput.validation = null;
|
|
171
|
+
}
|
|
172
|
+
console.log(JSON.stringify(jsonOutput, null, 2));
|
|
173
|
+
executionTracer.endRun();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
66
176
|
if (result.plan) {
|
|
67
177
|
sectionHeader('Generated Plan');
|
|
68
178
|
console.log(colors.bold('Goal: ') + result.plan.goal);
|
|
@@ -118,6 +228,57 @@ export async function executeOrchestrateCommand(goal, options = {}) {
|
|
|
118
228
|
}
|
|
119
229
|
newline();
|
|
120
230
|
}
|
|
231
|
+
// Get review decision - single source of truth for userAction
|
|
232
|
+
// All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
|
|
233
|
+
const reviewRequested = Boolean(options.review);
|
|
234
|
+
const summarySource = summaryExtractor.extractFromOrchestration(result);
|
|
235
|
+
const decision = summarySource
|
|
236
|
+
? await reviewHandler.getReviewDecision(summarySource.summary, reviewRequested)
|
|
237
|
+
: { approved: true, proceed: true, userAction: 'not_required' };
|
|
238
|
+
if (!decision.approved) {
|
|
239
|
+
console.log(warning('Operation cancelled by user.'));
|
|
240
|
+
newline();
|
|
241
|
+
// Record feedback for rejection
|
|
242
|
+
if (result.compositeSummary) {
|
|
243
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
244
|
+
agentFeedbackManager.recordFeedback({
|
|
245
|
+
runId: result.unifiedRunId || runId,
|
|
246
|
+
agentName: 'multi-agent-orchestrator',
|
|
247
|
+
operation: 'orchestrate',
|
|
248
|
+
query: goal,
|
|
249
|
+
outcome: 'cancelled',
|
|
250
|
+
userAction: decision.userAction,
|
|
251
|
+
filesChanged: result.compositeSummary.filesChanged,
|
|
252
|
+
filesCreated: result.compositeSummary.filesCreated,
|
|
253
|
+
filesDeleted: result.compositeSummary.filesDeleted,
|
|
254
|
+
errors: result.compositeSummary.errors,
|
|
255
|
+
warnings: result.compositeSummary.warnings,
|
|
256
|
+
validationChecks: result.compositeSummary.validationChecks,
|
|
257
|
+
metrics: result.compositeSummary.metrics,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
// Record feedback with userAction from review decision
|
|
263
|
+
if (result.compositeSummary) {
|
|
264
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
265
|
+
agentFeedbackManager.recordFeedback({
|
|
266
|
+
runId: result.unifiedRunId || runId,
|
|
267
|
+
agentName: 'multi-agent-orchestrator',
|
|
268
|
+
operation: 'orchestrate',
|
|
269
|
+
query: goal,
|
|
270
|
+
outcome: result.success ? 'success' : 'failure',
|
|
271
|
+
userAction: decision.userAction,
|
|
272
|
+
filesChanged: result.compositeSummary.filesChanged,
|
|
273
|
+
filesCreated: result.compositeSummary.filesCreated,
|
|
274
|
+
filesDeleted: result.compositeSummary.filesDeleted,
|
|
275
|
+
errors: result.compositeSummary.errors,
|
|
276
|
+
warnings: result.compositeSummary.warnings,
|
|
277
|
+
validationChecks: result.compositeSummary.validationChecks,
|
|
278
|
+
metrics: result.compositeSummary.metrics,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
newline();
|
|
121
282
|
if (result.success) {
|
|
122
283
|
console.log(success(result.message));
|
|
123
284
|
}
|
|
@@ -130,7 +291,14 @@ export async function executeOrchestrateCommand(goal, options = {}) {
|
|
|
130
291
|
newline();
|
|
131
292
|
}
|
|
132
293
|
catch (err) {
|
|
133
|
-
spinner
|
|
294
|
+
if (spinner) {
|
|
295
|
+
spinner.stop();
|
|
296
|
+
}
|
|
297
|
+
if (options.json) {
|
|
298
|
+
console.error(JSON.stringify({ error: err instanceof Error ? err.message : String(err) }));
|
|
299
|
+
executionTracer.endRun();
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
134
302
|
const { displayErrorAndExit } = await import('../error-display.js');
|
|
135
303
|
displayErrorAndExit(err, {
|
|
136
304
|
operation: 'orchestrate',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrate-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/orchestrate-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EAEP,OAAO,EACP,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,IAAY,EACZ,UAA6E,EAAE;IAE/E,0BAA0B;IAC1B,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,YAAY,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,UAAU,CAAC;IAErE,iFAAiF;IACjF,MAAM,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC;IAC9D,IAAI,qBAAqB,EAAE,CAAC;QAC1B,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,oDAAoD,CAAC,CAAC;QAC9H,MAAM,OAAO,GAAG,qBAAqB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAE7D,kEAAkE;QAClE,MAAM,MAAM,GAAG,kBAAkB,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MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACpE,mBAAmB,CAAC,GAAG,EAAE;YACvB,SAAS,EAAE,aAAa;YACxB,KAAK,EAAE,IAAI;YACX,eAAe,EAAE,IAAI;YACrB,QAAQ,EAAE,CAAC;SACZ,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,eAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"orchestrate-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/orchestrate-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EAEP,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,mB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CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3F,eAAe,CAAC,MAAM,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACpE,mBAAmB,CAAC,GAAG,EAAE;YACvB,SAAS,EAAE,aAAa;YACxB,KAAK,EAAE,IAAI;YACX,eAAe,EAAE,IAAI;YACrB,QAAQ,EAAE,CAAC;SACZ,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,eAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/plan-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"plan-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/plan-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4W3I"}
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
* Memory-based hierarchical planning
|
|
4
4
|
*/
|
|
5
5
|
import { container } from '../../../application/services/dependency-container.js';
|
|
6
|
-
import { colors, sectionHeader, success, newline, createBanner, createSpinner, } from '../../../ui.js';
|
|
6
|
+
import { colors, sectionHeader, success, warning, newline, createBanner, createSpinner, isMinimalStyle, separator, getProviderDisplayName, } from '../../../ui.js';
|
|
7
7
|
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
8
8
|
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
9
9
|
import { displayError } from '../error-display.js';
|
|
10
|
+
import { summaryExtractor } from '../../../infrastructure/validation/summary-extractor.js';
|
|
11
|
+
import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
|
|
12
|
+
import { createPlanTask } from '../../../infrastructure/storage/task-helpers.js';
|
|
13
|
+
import { isReasoningEnabled, isMultiModelEnabled } from '../../../application/reasoning/reasoning-config.js';
|
|
10
14
|
export async function executePlanCommand(goal, options = {}) {
|
|
15
|
+
// TODO: Create task after plan generation
|
|
16
|
+
// Task mode: PLAN
|
|
17
|
+
// Status: CREATED → PLANNED
|
|
18
|
+
// Risk tier: Detect from plan (use risk tier detector)
|
|
19
|
+
// Store plan in task.plan
|
|
20
|
+
// Set task.clarificationUsed = true if clarification flow was used
|
|
21
|
+
// See: .internal/ARCHITECTURE.md (internal docs)
|
|
11
22
|
// Detect codebase context (for codebase-aware planning)
|
|
12
23
|
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
13
24
|
const userId = codebaseInfo?.rootPath || process.cwd() || 'cli-user';
|
|
@@ -23,22 +34,33 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
23
34
|
displayFeatureAvailability('Hierarchical Planning', 'advanced', profile.level);
|
|
24
35
|
progressiveDisclosure.recordFeatureUsage(userId, 'planning');
|
|
25
36
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
// Determine reasoning mode for header display
|
|
38
|
+
const reasoningEnabled = isReasoningEnabled();
|
|
39
|
+
const multiModelEnabled = isMultiModelEnabled();
|
|
40
|
+
let modeLabel;
|
|
41
|
+
if (multiModelEnabled) {
|
|
42
|
+
modeLabel = 'Multi-Model Reasoning (M2)';
|
|
43
|
+
}
|
|
44
|
+
else if (reasoningEnabled) {
|
|
45
|
+
modeLabel = 'Simple Reasoning (M1)';
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
modeLabel = 'Legacy Planning (M0)';
|
|
49
|
+
}
|
|
31
50
|
// Start execution tracing
|
|
32
51
|
const runId = executionTracer.startRun('plan', {
|
|
33
52
|
query: goal,
|
|
34
53
|
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
35
54
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
// JSON output check - must happen BEFORE any console output
|
|
56
|
+
// Set up streaming handler - suppress output in JSON mode
|
|
57
|
+
const streamHandler = options.json ? {
|
|
58
|
+
onProgress: () => { }, // Suppress progress in JSON mode
|
|
59
|
+
onToken: () => { }, // Suppress tokens in JSON mode
|
|
60
|
+
onError: (error) => {
|
|
61
|
+
console.error(JSON.stringify({ error: error.message }));
|
|
62
|
+
},
|
|
63
|
+
} : {
|
|
42
64
|
onProgress: (stage, message) => {
|
|
43
65
|
// Clear spinner and show progress
|
|
44
66
|
process.stdout.write('\r' + ' '.repeat(50) + '\r'); // Clear line
|
|
@@ -52,15 +74,44 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
52
74
|
console.error(colors.red(`\nStreaming error: ${error.message}`));
|
|
53
75
|
},
|
|
54
76
|
};
|
|
55
|
-
// Enhanced progress indicator with stages
|
|
56
|
-
const planningSpinner = createSpinner('Synthesizing memories into plan...');
|
|
57
|
-
planningSpinner
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
// Enhanced progress indicator with stages (only if not JSON)
|
|
78
|
+
const planningSpinner = options.json ? null : createSpinner('Synthesizing memories into plan...');
|
|
79
|
+
if (planningSpinner) {
|
|
80
|
+
planningSpinner.start();
|
|
81
|
+
// Update spinner text based on streaming progress
|
|
82
|
+
const originalOnProgress = streamHandler.onProgress;
|
|
83
|
+
streamHandler.onProgress = (stage, message) => {
|
|
84
|
+
if (planningSpinner) {
|
|
85
|
+
planningSpinner.text = colors.dim(`${stage}: ${message}`);
|
|
86
|
+
}
|
|
87
|
+
originalOnProgress(stage, message);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// Header is handled by index.ts, only show banner in verbose mode (skip in JSON)
|
|
91
|
+
if (!options.json) {
|
|
92
|
+
if (!isMinimalStyle()) {
|
|
93
|
+
console.log(createBanner('Memory-Based Planning', 'Hierarchical plan synthesis from memories'));
|
|
94
|
+
newline();
|
|
95
|
+
console.log(colors.bold('Goal:'));
|
|
96
|
+
console.log(colors.cyan(' ' + goal));
|
|
97
|
+
newline();
|
|
98
|
+
// Display mode header as required by capability map (2.3)
|
|
99
|
+
console.log(colors.bold(`Mode: ${modeLabel}`));
|
|
100
|
+
// Display provider as required by capability map (2.23)
|
|
101
|
+
const providerName = getProviderDisplayName(container.aiService);
|
|
102
|
+
console.log(colors.dim(`Provider: ${providerName}`));
|
|
103
|
+
newline();
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
// Minimal style: still show mode
|
|
107
|
+
console.log(colors.dim(`Mode: ${modeLabel}`));
|
|
108
|
+
newline();
|
|
109
|
+
}
|
|
110
|
+
if (codebaseInfo) {
|
|
111
|
+
console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
|
|
112
|
+
newline();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
64
115
|
try {
|
|
65
116
|
const useCase = container.planningUseCase;
|
|
66
117
|
const result = await useCase.execute({
|
|
@@ -71,7 +122,34 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
71
122
|
},
|
|
72
123
|
streamHandler, // Pass streaming handler for real-time progress
|
|
73
124
|
});
|
|
74
|
-
planningSpinner
|
|
125
|
+
if (planningSpinner) {
|
|
126
|
+
planningSpinner.stop();
|
|
127
|
+
}
|
|
128
|
+
// JSON output (capability map requirement 2.17)
|
|
129
|
+
if (options.json) {
|
|
130
|
+
const jsonOutput = {
|
|
131
|
+
goal: result.plan.goal,
|
|
132
|
+
planId: result.plan.id,
|
|
133
|
+
mode: reasoningEnabled ? (multiModelEnabled ? 'M2' : 'M1') : 'M0',
|
|
134
|
+
complexity: result.plan.metadata?.complexity || 'medium',
|
|
135
|
+
estimatedDuration: result.plan.metadata?.estimatedDuration,
|
|
136
|
+
subPlans: result.plan.subPlans.map(sp => ({
|
|
137
|
+
id: sp.id,
|
|
138
|
+
type: sp.type,
|
|
139
|
+
description: sp.description,
|
|
140
|
+
status: sp.status,
|
|
141
|
+
estimatedSteps: sp.estimatedSteps,
|
|
142
|
+
dependencies: sp.dependencies,
|
|
143
|
+
})),
|
|
144
|
+
dependencies: result.plan.dependencies,
|
|
145
|
+
memoriesUsed: result.memoriesUsed,
|
|
146
|
+
synthesisTime: result.synthesisTime,
|
|
147
|
+
provider: container.aiService.provider?.name || container.aiService.provider?.id || 'unknown',
|
|
148
|
+
};
|
|
149
|
+
console.log(JSON.stringify(jsonOutput, null, 2));
|
|
150
|
+
executionTracer.endRun();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
75
153
|
// Display plan
|
|
76
154
|
sectionHeader('Generated Plan');
|
|
77
155
|
console.log(colors.bold(`Goal: ${result.plan.goal}`));
|
|
@@ -101,13 +179,28 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
101
179
|
console.log(colors.dim(` ${dep.from} → ${dep.to} (${dep.type})`));
|
|
102
180
|
});
|
|
103
181
|
}
|
|
182
|
+
// Memory indicators: Standardize format to match capability map requirement (2.2)
|
|
183
|
+
if (result.memoriesUsed > 0) {
|
|
184
|
+
newline();
|
|
185
|
+
console.log(colors.dim(`💭 Using ${result.memoriesUsed} memories from previous interactions`));
|
|
186
|
+
console.log(colors.dim(` (View all: codehere memory --list)`));
|
|
187
|
+
newline();
|
|
188
|
+
}
|
|
189
|
+
// Show detailed reflections if available (additional context beyond memory indicator)
|
|
104
190
|
if (result.reflections.length > 0) {
|
|
105
191
|
newline();
|
|
106
|
-
sectionHeader('Insights from Past Experiences');
|
|
192
|
+
sectionHeader('💭 Insights from Past Experiences');
|
|
193
|
+
console.log(colors.dim('Based on what I remember from previous interactions:'));
|
|
194
|
+
newline();
|
|
195
|
+
const { formatContent } = await import('../../../infrastructure/ux/comprehensive-formatter.js');
|
|
107
196
|
result.reflections.slice(0, 5).forEach((reflection, i) => {
|
|
108
|
-
console.log(
|
|
109
|
-
console.log(colors.
|
|
197
|
+
console.log('');
|
|
198
|
+
console.log(colors.bold.cyan(`${i + 1}. ${reflection.question}`));
|
|
199
|
+
const formattedInsight = formatContent(reflection.insight, { indent: 4, maxWidth: 72 });
|
|
200
|
+
console.log(formattedInsight);
|
|
110
201
|
});
|
|
202
|
+
newline();
|
|
203
|
+
console.log(colors.dim(`(View all memories: codehere memory --list)`));
|
|
111
204
|
}
|
|
112
205
|
newline();
|
|
113
206
|
console.log(colors.dim(`Memories used: ${result.memoriesUsed} | Synthesis time: ${result.synthesisTime}ms`));
|
|
@@ -117,6 +210,19 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
117
210
|
console.log(colors.dim(`Plan ID: ${result.plan.id}`));
|
|
118
211
|
console.log(colors.dim(`To execute this plan later: codehere orchestrate "${result.plan.goal}" --plan-id ${result.plan.id}`));
|
|
119
212
|
}
|
|
213
|
+
// Create task (non-breaking, silent failure)
|
|
214
|
+
try {
|
|
215
|
+
await createPlanTask({
|
|
216
|
+
goal,
|
|
217
|
+
plan: result.plan,
|
|
218
|
+
codebaseInfo,
|
|
219
|
+
runId,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
// Silent failure - don't break user workflow
|
|
224
|
+
// Task creation is optional in Phase 1
|
|
225
|
+
}
|
|
120
226
|
if (options.execute) {
|
|
121
227
|
newline();
|
|
122
228
|
sectionHeader('Executing Plan');
|
|
@@ -129,8 +235,86 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
129
235
|
plan: result.plan,
|
|
130
236
|
},
|
|
131
237
|
});
|
|
238
|
+
// Get review decision - single source of truth for userAction
|
|
239
|
+
// All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
|
|
240
|
+
const reviewRequested = Boolean(options.review);
|
|
241
|
+
const summarySource = summaryExtractor.extractFromOrchestration(executionResult);
|
|
242
|
+
const decision = summarySource
|
|
243
|
+
? await reviewHandler.getReviewDecision(summarySource.summary, reviewRequested)
|
|
244
|
+
: { approved: true, proceed: true, userAction: 'not_required' };
|
|
245
|
+
if (!decision.approved) {
|
|
246
|
+
console.log(warning('Operation cancelled by user.'));
|
|
247
|
+
newline();
|
|
248
|
+
// Record feedback for rejection
|
|
249
|
+
if (executionResult.compositeSummary) {
|
|
250
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
251
|
+
agentFeedbackManager.recordFeedback({
|
|
252
|
+
runId: executionResult.unifiedRunId || runId,
|
|
253
|
+
agentName: 'multi-agent-orchestrator',
|
|
254
|
+
operation: 'orchestrate',
|
|
255
|
+
query: goal,
|
|
256
|
+
outcome: 'cancelled',
|
|
257
|
+
userAction: decision.userAction,
|
|
258
|
+
filesChanged: executionResult.compositeSummary.filesChanged,
|
|
259
|
+
filesCreated: executionResult.compositeSummary.filesCreated,
|
|
260
|
+
filesDeleted: executionResult.compositeSummary.filesDeleted,
|
|
261
|
+
errors: executionResult.compositeSummary.errors,
|
|
262
|
+
warnings: executionResult.compositeSummary.warnings,
|
|
263
|
+
validationChecks: executionResult.compositeSummary.validationChecks,
|
|
264
|
+
metrics: executionResult.compositeSummary.metrics,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
// Record feedback with userAction from review decision
|
|
270
|
+
if (executionResult.compositeSummary) {
|
|
271
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
272
|
+
agentFeedbackManager.recordFeedback({
|
|
273
|
+
runId: executionResult.unifiedRunId || runId,
|
|
274
|
+
agentName: 'multi-agent-orchestrator',
|
|
275
|
+
operation: 'orchestrate',
|
|
276
|
+
query: goal,
|
|
277
|
+
outcome: executionResult.success ? 'success' : 'failure',
|
|
278
|
+
userAction: decision.userAction,
|
|
279
|
+
filesChanged: executionResult.compositeSummary.filesChanged,
|
|
280
|
+
filesCreated: executionResult.compositeSummary.filesCreated,
|
|
281
|
+
filesDeleted: executionResult.compositeSummary.filesDeleted,
|
|
282
|
+
errors: executionResult.compositeSummary.errors,
|
|
283
|
+
warnings: executionResult.compositeSummary.warnings,
|
|
284
|
+
validationChecks: executionResult.compositeSummary.validationChecks,
|
|
285
|
+
metrics: executionResult.compositeSummary.metrics,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
newline();
|
|
132
289
|
if (executionResult.success) {
|
|
290
|
+
// Delightful UX: Success with context and next steps
|
|
133
291
|
console.log(success('Plan executed successfully!'));
|
|
292
|
+
newline();
|
|
293
|
+
if (executionResult.compositeSummary) {
|
|
294
|
+
const filesChanged = executionResult.compositeSummary.filesChanged || [];
|
|
295
|
+
const filesCreated = executionResult.compositeSummary.filesCreated || [];
|
|
296
|
+
if (filesChanged.length > 0 || filesCreated.length > 0) {
|
|
297
|
+
console.log(colors.bold('Summary:'));
|
|
298
|
+
if (filesChanged.length > 0) {
|
|
299
|
+
console.log(colors.cyan(` • ${filesChanged.length} file(s) changed`));
|
|
300
|
+
}
|
|
301
|
+
if (filesCreated.length > 0) {
|
|
302
|
+
console.log(colors.green(` • ${filesCreated.length} file(s) created`));
|
|
303
|
+
}
|
|
304
|
+
newline();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
// Show next steps (delightful UX)
|
|
308
|
+
console.log(colors.bold('Next steps:'));
|
|
309
|
+
console.log(colors.cyan(` • Review changes: codehere review --list`));
|
|
310
|
+
console.log(colors.cyan(` • Check status: codehere status --tasks`));
|
|
311
|
+
console.log(colors.cyan(` • Test changes: npm test`));
|
|
312
|
+
newline();
|
|
313
|
+
// Responsible AI indicators
|
|
314
|
+
console.log(separator('─', 60));
|
|
315
|
+
console.log(colors.dim('🔒 Privacy: All operations stored locally'));
|
|
316
|
+
console.log(colors.dim('🛡️ Security: Validation passed'));
|
|
317
|
+
newline();
|
|
134
318
|
}
|
|
135
319
|
else {
|
|
136
320
|
displayError(new Error('Plan execution completed with errors'), {
|
|
@@ -150,7 +334,9 @@ export async function executePlanCommand(goal, options = {}) {
|
|
|
150
334
|
}
|
|
151
335
|
}
|
|
152
336
|
catch (err) {
|
|
153
|
-
planningSpinner
|
|
337
|
+
if (planningSpinner) {
|
|
338
|
+
planningSpinner.stop();
|
|
339
|
+
}
|
|
154
340
|
const { displayError } = await import('../error-display.js');
|
|
155
341
|
displayError(err, {
|
|
156
342
|
operation: 'plan',
|