codehere 0.4.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 +113 -30
- package/dist/application/agents/execution-agent.js +2 -2
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +1 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +10 -3
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +22 -10
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/validation-agent.js +2 -2
- 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 +30 -6
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +96 -44
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +6 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +98 -9
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +1 -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 +4 -3
- package/dist/application/use-cases/ask-question-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/memory.d.ts.map +1 -1
- package/dist/domain/entities/task.d.ts +1 -1
- package/dist/domain/entities/task.d.ts.map +1 -1
- package/dist/domain/entities/task.js +2 -2
- package/dist/domain/entities/task.js.map +1 -1
- 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/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 +4 -10
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.js +7 -22
- package/dist/domain/services/environment-mode-manager.js.map +1 -1
- 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 +8 -9
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -1
- package/dist/domain/services/risk-tier-detector.js +53 -40
- package/dist/domain/services/risk-tier-detector.js.map +1 -1
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/index.js +405 -52
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +4 -4
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/provider-ai-service.js +7 -7
- package/dist/infrastructure/ai/provider-ai-service.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 +10 -78
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/response-cache.js +22 -198
- package/dist/infrastructure/cache/response-cache.js.map +1 -1
- 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 +27 -31
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -1
- package/dist/infrastructure/context/conversation-context.js +95 -136
- package/dist/infrastructure/context/conversation-context.js.map +1 -1
- package/dist/infrastructure/context/session-manager.d.ts +27 -11
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -1
- package/dist/infrastructure/context/session-manager.js +69 -73
- package/dist/infrastructure/context/session-manager.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.map +1 -1
- package/dist/infrastructure/providers/cohere-provider.js +102 -17
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -1
- 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.map +1 -1
- package/dist/infrastructure/providers/operation-provider-resolver.js +33 -7
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -1
- 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 +12 -1
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-helpers.js +48 -8
- package/dist/infrastructure/storage/task-helpers.js.map +1 -1
- package/dist/infrastructure/storage/task-repository.d.ts +2 -1
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-repository.js +14 -3
- package/dist/infrastructure/storage/task-repository.js.map +1 -1
- 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/capability-boundaries.d.ts +9 -37
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.js +23 -148
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -1
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +12 -54
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -1
- package/dist/infrastructure/ux/comprehensive-formatter.js +87 -182
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -1
- 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 +15 -31
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.js +30 -166
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +4 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +35 -50
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- 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 +25 -89
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.js +32 -204
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -1
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +53 -53
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -1
- package/dist/infrastructure/validation/agent-validation-helper.js +110 -61
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -1
- package/dist/infrastructure/validation/review-handler.d.ts +13 -41
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -1
- package/dist/infrastructure/validation/review-handler.js +23 -189
- package/dist/infrastructure/validation/review-handler.js.map +1 -1
- package/dist/infrastructure/validation/summary-aggregator.d.ts +25 -22
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -1
- package/dist/infrastructure/validation/summary-aggregator.js +47 -133
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -1
- package/dist/infrastructure/validation/summary-extractor.d.ts +13 -48
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -1
- package/dist/infrastructure/validation/summary-extractor.js +32 -89
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -1
- package/dist/infrastructure/validation/trace-summary.d.ts +30 -57
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -1
- package/dist/infrastructure/validation/trace-summary.js +37 -356
- package/dist/infrastructure/validation/trace-summary.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 +316 -129
- 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 +3 -1
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/docs-command.js +13 -184
- package/dist/presentation/cli/commands/docs-command.js.map +1 -1
- package/dist/presentation/cli/commands/fix-command.d.ts +2 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/fix-command.js +61 -276
- package/dist/presentation/cli/commands/fix-command.js.map +1 -1
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +21 -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 +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +129 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +134 -25
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +6 -4
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/product-command.js +12 -178
- package/dist/presentation/cli/commands/product-command.js.map +1 -1
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +5 -1
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +7 -7
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/review-command.js +167 -16
- package/dist/presentation/cli/commands/review-command.js.map +1 -1
- package/dist/presentation/cli/commands/run-command.d.ts +6 -8
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/run-command.js +182 -23
- package/dist/presentation/cli/commands/run-command.js.map +1 -1
- 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.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +74 -6
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +3 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/status-command.js +151 -156
- package/dist/presentation/cli/commands/status-command.js.map +1 -1
- package/dist/presentation/cli/commands/suggest-command.d.ts +3 -5
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/suggest-command.js +132 -19
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -1
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +75 -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 +55 -7
- 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 +54 -1
- package/dist/ui.js.map +1 -1
- package/package.json +14 -4
|
@@ -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"}
|
|
@@ -0,0 +1,217 @@
|
|
|
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 { randomUUID } from 'crypto';
|
|
7
|
+
export class SimplePlanningStrategy {
|
|
8
|
+
aiService;
|
|
9
|
+
constructor(aiService) {
|
|
10
|
+
this.aiService = aiService;
|
|
11
|
+
}
|
|
12
|
+
async executePlanning(context) {
|
|
13
|
+
const startTime = Date.now();
|
|
14
|
+
const stepId = randomUUID();
|
|
15
|
+
// Build the same prompt as PlanningUseCase.createHierarchicalPlan
|
|
16
|
+
const prompt = this.buildPlanningPrompt(context);
|
|
17
|
+
// Convert memories to CodeChunk[] format expected by aiService.chat
|
|
18
|
+
const codeChunks = [];
|
|
19
|
+
const memories = context.memories?.map(m => {
|
|
20
|
+
const memory = {
|
|
21
|
+
id: randomUUID(),
|
|
22
|
+
type: 'reflection',
|
|
23
|
+
description: m.description,
|
|
24
|
+
embedding: [],
|
|
25
|
+
timestamp: new Date(),
|
|
26
|
+
importance: 5,
|
|
27
|
+
lastAccessed: new Date(),
|
|
28
|
+
};
|
|
29
|
+
// Only add metadata if it has valid MemoryMetadata fields
|
|
30
|
+
if (m && typeof m === 'object') {
|
|
31
|
+
memory.metadata = m;
|
|
32
|
+
}
|
|
33
|
+
return memory;
|
|
34
|
+
}) || [];
|
|
35
|
+
// Call AI service (same as current implementation)
|
|
36
|
+
const response = await this.aiService.chat(prompt, codeChunks, memories);
|
|
37
|
+
const duration = Date.now() - startTime;
|
|
38
|
+
// Try to extract token usage from response if available
|
|
39
|
+
// Note: IAIService.chat() returns string, but provider responses may have usage info
|
|
40
|
+
// For now, we'll estimate tokens (can be enhanced in future to get actual usage)
|
|
41
|
+
const estimatedInputTokens = Math.ceil(prompt.length / 4);
|
|
42
|
+
const estimatedOutputTokens = Math.ceil(response.length / 4);
|
|
43
|
+
// Parse plan from response (same logic as PlanningUseCase)
|
|
44
|
+
const plan = this.parsePlanFromResponse(response, context);
|
|
45
|
+
// Create reasoning step
|
|
46
|
+
const step = {
|
|
47
|
+
id: stepId,
|
|
48
|
+
role: 'planner',
|
|
49
|
+
input: prompt,
|
|
50
|
+
output: response,
|
|
51
|
+
timestamp: startTime,
|
|
52
|
+
duration,
|
|
53
|
+
tokenUsage: {
|
|
54
|
+
inputTokens: estimatedInputTokens,
|
|
55
|
+
outputTokens: estimatedOutputTokens,
|
|
56
|
+
},
|
|
57
|
+
metadata: {
|
|
58
|
+
planningMode: context.planningMode || 'hybrid',
|
|
59
|
+
goal: context.goal,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
// Create reasoning trace
|
|
63
|
+
const trace = {
|
|
64
|
+
id: randomUUID(),
|
|
65
|
+
steps: [step],
|
|
66
|
+
summary: `Generated plan with ${plan.subPlans.length} sub-plans`,
|
|
67
|
+
metadata: {
|
|
68
|
+
totalDuration: duration,
|
|
69
|
+
totalTokens: estimatedInputTokens + estimatedOutputTokens,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
return {
|
|
73
|
+
plan,
|
|
74
|
+
trace,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Build planning prompt (reuses logic from PlanningUseCase)
|
|
79
|
+
*/
|
|
80
|
+
buildPlanningPrompt(context) {
|
|
81
|
+
const reflectionContext = context.reflections
|
|
82
|
+
?.map((r, i) => `${i + 1}. ${r}`)
|
|
83
|
+
.join('\n') || 'No specific reflections.';
|
|
84
|
+
const memoryContext = context.memories
|
|
85
|
+
?.slice(0, 20)
|
|
86
|
+
.map((m, i) => `${i + 1}. ${m.description}`)
|
|
87
|
+
.join('\n') || 'No relevant past experiences.';
|
|
88
|
+
const planningMode = context.planningMode || 'hybrid';
|
|
89
|
+
const fileContext = context.context?.files?.length
|
|
90
|
+
? `\nFiles to consider: ${context.context.files.join(', ')}`
|
|
91
|
+
: '';
|
|
92
|
+
const constraintsContext = context.context?.constraints?.length
|
|
93
|
+
? `\nConstraints: ${context.context.constraints.join(', ')}`
|
|
94
|
+
: '';
|
|
95
|
+
return `You are a Planning Agent (Architect) for an AI coding system. Your role is to create detailed, step-by-step modification plans.
|
|
96
|
+
|
|
97
|
+
Goal: "${context.goal}"${fileContext}${constraintsContext}
|
|
98
|
+
|
|
99
|
+
Consider:
|
|
100
|
+
- **Relevant Past Experiences/Memories**:
|
|
101
|
+
${memoryContext}
|
|
102
|
+
- **Synthesized Reflections/Insights**:
|
|
103
|
+
${reflectionContext}
|
|
104
|
+
|
|
105
|
+
Create a detailed plan with:
|
|
106
|
+
1. Clear sub-plans with specific actions
|
|
107
|
+
2. Dependencies between sub-plans
|
|
108
|
+
3. Estimated complexity for each sub-plan
|
|
109
|
+
4. Required tools/resources for each step
|
|
110
|
+
|
|
111
|
+
For each sub-plan, specify:
|
|
112
|
+
- \`id\`: Unique identifier (e.g., "subplan_1")
|
|
113
|
+
- \`description\`: Clear, actionable description WITH filepath if applicable
|
|
114
|
+
- \`type\`: Action type (search, edit, refactor, review, analyze, implement, test, debug)
|
|
115
|
+
- \`dependencies\`: Array of sub-plan IDs that must complete first
|
|
116
|
+
- \`status\`: Always "pending" initially
|
|
117
|
+
- \`estimatedComplexity\`: "low" | "medium" | "high"
|
|
118
|
+
- \`requiredTools\`: Array of tool names needed
|
|
119
|
+
|
|
120
|
+
Planning Mode: ${planningMode}
|
|
121
|
+
|
|
122
|
+
Respond with ONLY a JSON array of sub-plan objects.
|
|
123
|
+
|
|
124
|
+
Example:
|
|
125
|
+
[
|
|
126
|
+
{
|
|
127
|
+
"id": "subplan_1",
|
|
128
|
+
"description": "Search codebase for existing authentication patterns",
|
|
129
|
+
"type": "search",
|
|
130
|
+
"dependencies": [],
|
|
131
|
+
"status": "pending",
|
|
132
|
+
"estimatedComplexity": "low",
|
|
133
|
+
"requiredTools": ["search"]
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
JSON only, no other text:`;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Parse plan from AI response (reuses logic from PlanningAgent)
|
|
141
|
+
*/
|
|
142
|
+
parsePlanFromResponse(response, context) {
|
|
143
|
+
try {
|
|
144
|
+
// Try to extract JSON array from response
|
|
145
|
+
const jsonMatch = response.match(/\[[\s\S]*\]/);
|
|
146
|
+
if (jsonMatch) {
|
|
147
|
+
const subPlansData = JSON.parse(jsonMatch[0]);
|
|
148
|
+
const subPlans = subPlansData.map((sp, idx) => ({
|
|
149
|
+
id: sp.id || `subplan_${idx + 1}`,
|
|
150
|
+
description: sp.description || '',
|
|
151
|
+
type: (sp.type || 'implement'),
|
|
152
|
+
dependencies: sp.dependencies || [],
|
|
153
|
+
status: 'pending',
|
|
154
|
+
estimatedSteps: sp.estimatedSteps || 1,
|
|
155
|
+
estimatedComplexity: sp.estimatedComplexity || 'medium',
|
|
156
|
+
}));
|
|
157
|
+
// Build dependencies from sub-plan dependencies
|
|
158
|
+
const dependencies = [];
|
|
159
|
+
subPlans.forEach(sp => {
|
|
160
|
+
sp.dependencies.forEach((depId) => {
|
|
161
|
+
dependencies.push({
|
|
162
|
+
from: depId,
|
|
163
|
+
to: sp.id,
|
|
164
|
+
type: 'sequential',
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
id: randomUUID(),
|
|
170
|
+
goal: context.goal,
|
|
171
|
+
description: `Plan to achieve: ${context.goal}`,
|
|
172
|
+
status: 'draft',
|
|
173
|
+
createdAt: new Date(),
|
|
174
|
+
subPlans,
|
|
175
|
+
dependencies,
|
|
176
|
+
metadata: {
|
|
177
|
+
memoriesUsed: [],
|
|
178
|
+
reflections: [],
|
|
179
|
+
complexity: 'medium',
|
|
180
|
+
priority: 5,
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
// Fallback: create a simple plan
|
|
187
|
+
console.warn('[SimplePlanningStrategy] Failed to parse plan, creating fallback:', error);
|
|
188
|
+
}
|
|
189
|
+
// Fallback plan
|
|
190
|
+
return {
|
|
191
|
+
id: randomUUID(),
|
|
192
|
+
goal: context.goal,
|
|
193
|
+
description: `Plan to achieve: ${context.goal}`,
|
|
194
|
+
status: 'draft',
|
|
195
|
+
createdAt: new Date(),
|
|
196
|
+
subPlans: [
|
|
197
|
+
{
|
|
198
|
+
id: 'subplan_1',
|
|
199
|
+
description: context.goal,
|
|
200
|
+
type: 'implement',
|
|
201
|
+
dependencies: [],
|
|
202
|
+
status: 'pending',
|
|
203
|
+
estimatedSteps: 1,
|
|
204
|
+
estimatedComplexity: 'medium',
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
dependencies: [],
|
|
208
|
+
metadata: {
|
|
209
|
+
memoriesUsed: [],
|
|
210
|
+
reflections: [],
|
|
211
|
+
complexity: 'medium',
|
|
212
|
+
priority: 5,
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=simple-planning-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-planning-strategy.js","sourceRoot":"","sources":["../../../src/application/reasoning/simple-planning-strategy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAQpC,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,SAAqB;QAArB,cAAS,GAAT,SAAS,CAAY;IAAG,CAAC;IAE7C,KAAK,CAAC,eAAe,CAAC,OAA6B;QACjD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAE5B,kEAAkE;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAEjD,oEAAoE;QACpE,MAAM,UAAU,GAAgB,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAa,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;YACnD,MAAM,MAAM,GAAW;gBACrB,EAAE,EAAE,UAAU,EAAE;gBAChB,IAAI,EAAE,YAAqB;gBAC3B,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,IAAI,IAAI,EAAE;aACzB,CAAC;YACF,0DAA0D;YAC1D,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAC/B,MAAM,CAAC,QAAQ,GAAG,CAAmB,CAAC;YACxC,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,IAAI,EAAE,CAAC;QAET,mDAAmD;QACnD,MAAM,QAAQ,GAA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AY,EAAE,EAAE;wBAChB,WAAW,EAAE,EAAE;wBACf,UAAU,EAAE,QAAiB;wBAC7B,QAAQ,EAAE,CAAC;qBACI;iBAClB,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iCAAiC;YACjC,OAAO,CAAC,IAAI,CAAC,mEAAmE,EAAE,KAAK,CAAC,CAAC;QAC3F,CAAC;QAED,gBAAgB;QAChB,OAAO;YACL,EAAE,EAAE,UAAU,EAAE;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,oBAAoB,OAAO,CAAC,IAAI,EAAE;YAC/C,MAAM,EAAE,OAAgB;YACxB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,WAAW;oBACf,WAAW,EAAE,OAAO,CAAC,IAAI;oBACzB,IAAI,EAAE,WAAoB;oBAC1B,YAAY,EAAE,EAAE;oBAChB,MAAM,EAAE,SAAkB;oBAC1B,cAAc,EAAE,CAAC;oBACjB,mBAAmB,EAAE,QAAiB;iBACvC;aACF;YACD,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE;gBACR,YAAY,EAAE,EAAE;gBAChB,WAAW,EAAE,EAAE;gBACf,UAAU,EAAE,QAAiB;gBAC7B,QAAQ,EAAE,CAAC;aACZ;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning Layer Types
|
|
3
|
+
* Core abstractions for structured reasoning and token optimization
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Reasoning role - defines the purpose of a reasoning step
|
|
7
|
+
*/
|
|
8
|
+
export type ReasoningRole = 'planner' | 'worker' | 'validator' | 'summarizer';
|
|
9
|
+
/**
|
|
10
|
+
* Single reasoning step - atomic unit of reasoning
|
|
11
|
+
*/
|
|
12
|
+
export interface ReasoningStep {
|
|
13
|
+
id: string;
|
|
14
|
+
role: ReasoningRole;
|
|
15
|
+
input: string;
|
|
16
|
+
output: string;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
timestamp: number;
|
|
19
|
+
duration?: number;
|
|
20
|
+
tokenUsage?: {
|
|
21
|
+
inputTokens?: number;
|
|
22
|
+
outputTokens?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Reasoning trace - sequence of reasoning steps with summary metadata
|
|
27
|
+
*/
|
|
28
|
+
export interface ReasoningTrace {
|
|
29
|
+
id: string;
|
|
30
|
+
steps: ReasoningStep[];
|
|
31
|
+
summary?: string;
|
|
32
|
+
metadata?: {
|
|
33
|
+
provider?: string;
|
|
34
|
+
model?: string;
|
|
35
|
+
totalTokens?: number;
|
|
36
|
+
totalDuration?: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Compressed reasoning - compact representation for later use
|
|
41
|
+
* Can be expanded to use Toon serialization in future phases
|
|
42
|
+
*/
|
|
43
|
+
export interface CompressedReasoning {
|
|
44
|
+
traceId: string;
|
|
45
|
+
compressed: string;
|
|
46
|
+
metadata?: Record<string, unknown>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Planning input context - what the planner needs to generate a plan
|
|
50
|
+
*/
|
|
51
|
+
export interface PlanningInputContext {
|
|
52
|
+
goal: string;
|
|
53
|
+
reflections?: string[];
|
|
54
|
+
memories?: Array<{
|
|
55
|
+
description: string;
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
}>;
|
|
58
|
+
context?: {
|
|
59
|
+
files?: string[];
|
|
60
|
+
currentDirectory?: string;
|
|
61
|
+
constraints?: string[];
|
|
62
|
+
};
|
|
63
|
+
planningMode?: 'plan-then-execute' | 'iterative' | 'hybrid';
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","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C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;IAClE,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,YAAY,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,QAAQ,CAAC;CAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/application/reasoning/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Strategy
|
|
3
|
+
* Validates and optionally enriches a plan produced by the planner
|
|
4
|
+
*/
|
|
5
|
+
import type { Plan } from '../../domain/entities/plan.js';
|
|
6
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
plan: Plan;
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
warnings?: string[];
|
|
11
|
+
risks?: string[];
|
|
12
|
+
suggestions?: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Validator strategy interface
|
|
16
|
+
*/
|
|
17
|
+
export interface IValidatorStrategy {
|
|
18
|
+
/**
|
|
19
|
+
* Validate a plan produced by the planner
|
|
20
|
+
*/
|
|
21
|
+
validatePlan(plan: Plan, originalContext: {
|
|
22
|
+
goal: string;
|
|
23
|
+
reflections?: string[];
|
|
24
|
+
memories?: Array<{
|
|
25
|
+
description: string;
|
|
26
|
+
}>;
|
|
27
|
+
context?: {
|
|
28
|
+
files?: string[];
|
|
29
|
+
currentDirectory?: string;
|
|
30
|
+
constraints?: string[];
|
|
31
|
+
};
|
|
32
|
+
}): Promise<ValidationResult>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Simple validator strategy
|
|
36
|
+
* Uses AI to review the plan and identify potential issues
|
|
37
|
+
*/
|
|
38
|
+
export declare class SimpleValidatorStrategy implements IValidatorStrategy {
|
|
39
|
+
private aiService;
|
|
40
|
+
constructor(aiService: IAIService);
|
|
41
|
+
validatePlan(plan: Plan, originalContext: {
|
|
42
|
+
goal: string;
|
|
43
|
+
reflections?: string[];
|
|
44
|
+
memories?: Array<{
|
|
45
|
+
description: string;
|
|
46
|
+
}>;
|
|
47
|
+
context?: {
|
|
48
|
+
files?: string[];
|
|
49
|
+
currentDirectory?: string;
|
|
50
|
+
constraints?: string[];
|
|
51
|
+
};
|
|
52
|
+
}): Promise<ValidationResult>;
|
|
53
|
+
private buildValidationPrompt;
|
|
54
|
+
private parseValidationResponse;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=validator-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-strategy.d.ts","sourceRoot":"","sources":["../../../src/application/reasoning/validator-strategy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,+BAA+B,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAIlF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,YAAY,CACV,IAAI,EAAE,IAAI,EACV,eAAe,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,QAAQ,CAAC,EAAE,KAAK,CAAC;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,EAAE;YACR,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;YACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;SACxB,CAAC;KACH,GACA,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,kBAAkB;IACpD,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,UAAU;IAEnC,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,eAAe,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,QAAQ,CAAC,EAAE,KAAK,CAAC;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,EAAE;YACR,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;YACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;SACxB,CAAC;KACH,GACA,OAAO,CAAC,gBAAgB,CAAC;IAqB5B,OAAO,CAAC,qBAAqB;IA0C7B,OAAO,CAAC,uBAAuB;CAwDhC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator Strategy
|
|
3
|
+
* Validates and optionally enriches a plan produced by the planner
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Simple validator strategy
|
|
7
|
+
* Uses AI to review the plan and identify potential issues
|
|
8
|
+
*/
|
|
9
|
+
export class SimpleValidatorStrategy {
|
|
10
|
+
aiService;
|
|
11
|
+
constructor(aiService) {
|
|
12
|
+
this.aiService = aiService;
|
|
13
|
+
}
|
|
14
|
+
async validatePlan(plan, originalContext) {
|
|
15
|
+
const prompt = this.buildValidationPrompt(plan, originalContext);
|
|
16
|
+
const codeChunks = [];
|
|
17
|
+
const memories = [];
|
|
18
|
+
try {
|
|
19
|
+
const response = await this.aiService.chat(prompt, codeChunks, memories);
|
|
20
|
+
const validation = this.parseValidationResponse(response, plan);
|
|
21
|
+
return validation;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
// On validation failure, return plan as-is with warning
|
|
25
|
+
console.warn('[SimpleValidatorStrategy] Validation failed, using plan as-is:', error instanceof Error ? error.message : String(error));
|
|
26
|
+
return {
|
|
27
|
+
plan,
|
|
28
|
+
isValid: true, // Default to valid to not block planning
|
|
29
|
+
warnings: ['Validation step failed, plan used without validation'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
buildValidationPrompt(plan, context) {
|
|
34
|
+
const planJson = JSON.stringify(plan, null, 2);
|
|
35
|
+
const constraintsText = context.context?.constraints?.length
|
|
36
|
+
? `\nConstraints: ${context.context.constraints.join(', ')}`
|
|
37
|
+
: '';
|
|
38
|
+
return `You are a Plan Validator for an AI coding system. Review the following plan and identify potential issues, risks, or improvements.
|
|
39
|
+
|
|
40
|
+
Goal: "${context.goal}"${constraintsText}
|
|
41
|
+
|
|
42
|
+
Plan to validate:
|
|
43
|
+
${planJson}
|
|
44
|
+
|
|
45
|
+
Review the plan and provide:
|
|
46
|
+
1. Is the plan valid and feasible? (true/false)
|
|
47
|
+
2. Any warnings about potential issues
|
|
48
|
+
3. Any risks that could cause the plan to fail
|
|
49
|
+
4. Suggestions for improvement (optional)
|
|
50
|
+
|
|
51
|
+
Respond with ONLY a JSON object in this format:
|
|
52
|
+
{
|
|
53
|
+
"isValid": true,
|
|
54
|
+
"warnings": ["warning 1", "warning 2"],
|
|
55
|
+
"risks": ["risk 1"],
|
|
56
|
+
"suggestions": ["suggestion 1"]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
JSON only, no other text:`;
|
|
60
|
+
}
|
|
61
|
+
parseValidationResponse(response, originalPlan) {
|
|
62
|
+
try {
|
|
63
|
+
const jsonMatch = response.match(/\{[\s\S]*\}/);
|
|
64
|
+
if (jsonMatch) {
|
|
65
|
+
const validation = JSON.parse(jsonMatch[0]);
|
|
66
|
+
// Enrich plan metadata with validation results (internal only)
|
|
67
|
+
// Store in metadata as any to avoid type issues (internal use only)
|
|
68
|
+
const enrichedPlan = {
|
|
69
|
+
...originalPlan,
|
|
70
|
+
metadata: {
|
|
71
|
+
...originalPlan.metadata,
|
|
72
|
+
// Store validation results in metadata (not exposed to users)
|
|
73
|
+
// Using type assertion for internal metadata
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
// Set validation metadata separately to avoid type issues
|
|
77
|
+
enrichedPlan.metadata._validation = {
|
|
78
|
+
isValid: validation.isValid ?? true,
|
|
79
|
+
warnings: validation.warnings || [],
|
|
80
|
+
risks: validation.risks || [],
|
|
81
|
+
suggestions: validation.suggestions || [],
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
plan: enrichedPlan,
|
|
85
|
+
isValid: validation.isValid ?? true,
|
|
86
|
+
warnings: validation.warnings,
|
|
87
|
+
risks: validation.risks,
|
|
88
|
+
suggestions: validation.suggestions,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
console.warn('[SimpleValidatorStrategy] Failed to parse validation response:', error);
|
|
94
|
+
}
|
|
95
|
+
// Fallback: return plan as-is
|
|
96
|
+
return {
|
|
97
|
+
plan: originalPlan,
|
|
98
|
+
isValid: true,
|
|
99
|
+
warnings: ['Could not parse validation response'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=validator-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-strategy.js","sourceRoot":"","sources":["../../../src/application/reasoning/validator-strategy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IACd;IAApB,YAAoB,SAAqB;QAArB,cA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AgentOrchestrator } from '../agents/multi-agent-orchestrator.js';
|
|
|
38
38
|
import { PlanningAgent } from '../agents/planning-agent.js';
|
|
39
39
|
import { ExecutionAgent } from '../agents/execution-agent.js';
|
|
40
40
|
import { ValidationAgent } from '../agents/validation-agent.js';
|
|
41
|
-
import { DocumentationAgent } from '../agents/documentation-agent.js';
|
|
42
|
-
import { ProductRequirementsAgent } from '../agents/product-requirements-agent.js';
|
|
43
41
|
import { SQLiteDecisionRepository } from '../../infrastructure/storage/sqlite-decision-repository.js';
|
|
44
42
|
import { DecisionRecorder } from '../../domain/services/decision-recorder.js';
|
|
45
43
|
import { DecisionRetriever } from '../../domain/services/decision-retriever.js';
|
|
@@ -106,10 +104,40 @@ export declare class DependencyContainer {
|
|
|
106
104
|
*/
|
|
107
105
|
get providerRegistry(): ProviderRegistry;
|
|
108
106
|
get aiService(): IAIService;
|
|
107
|
+
/**
|
|
108
|
+
* Get embedding repository for a specific codebase
|
|
109
|
+
* @param cwd - Current working directory for codebase root detection (defaults to process.cwd())
|
|
110
|
+
* @returns SQLiteEmbeddingRepository instance scoped to the codebase
|
|
111
|
+
*/
|
|
112
|
+
getEmbeddingRepository(cwd?: string): SQLiteEmbeddingRepository;
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Use getEmbeddingRepository(cwd) instead for per-repo isolation
|
|
115
|
+
* Kept for backward compatibility
|
|
116
|
+
*/
|
|
109
117
|
get embeddingRepository(): SQLiteEmbeddingRepository;
|
|
110
118
|
get memoryRepository(): SQLiteMemoryRepository;
|
|
111
119
|
get memoryStreamService(): MemoryStreamService;
|
|
120
|
+
/**
|
|
121
|
+
* Get ask question use case for a specific codebase
|
|
122
|
+
* @param cwd - Current working directory for codebase root detection (defaults to process.cwd())
|
|
123
|
+
* @returns AskQuestionUseCase instance scoped to the codebase
|
|
124
|
+
*/
|
|
125
|
+
getAskQuestionUseCase(cwd?: string): AskQuestionUseCase;
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Use getAskQuestionUseCase(cwd) instead for per-repo isolation
|
|
128
|
+
* Kept for backward compatibility
|
|
129
|
+
*/
|
|
112
130
|
get askQuestionUseCase(): AskQuestionUseCase;
|
|
131
|
+
/**
|
|
132
|
+
* Get index codebase use case for a specific codebase
|
|
133
|
+
* @param cwd - Current working directory for codebase root detection (defaults to process.cwd())
|
|
134
|
+
* @returns IndexCodebaseUseCase instance scoped to the codebase
|
|
135
|
+
*/
|
|
136
|
+
getIndexCodebaseUseCase(cwd?: string): IndexCodebaseUseCase;
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated Use getIndexCodebaseUseCase(cwd) instead for per-repo isolation
|
|
139
|
+
* Kept for backward compatibility
|
|
140
|
+
*/
|
|
113
141
|
get indexCodebaseUseCase(): IndexCodebaseUseCase;
|
|
114
142
|
get toolExecutorService(): ToolExecutorService;
|
|
115
143
|
get reactOrchestrationUseCase(): ReActOrchestrationUseCase;
|
|
@@ -139,14 +167,10 @@ export declare class DependencyContainer {
|
|
|
139
167
|
private _planningAgent;
|
|
140
168
|
private _executionAgent;
|
|
141
169
|
private _validationAgent;
|
|
142
|
-
private _documentationAgent;
|
|
143
|
-
private _productRequirementsAgent;
|
|
144
170
|
private _multiAgentOrchestrator;
|
|
145
171
|
get planningAgent(): PlanningAgent;
|
|
146
172
|
get executionAgent(): ExecutionAgent;
|
|
147
173
|
get validationAgent(): ValidationAgent;
|
|
148
|
-
get documentationAgent(): DocumentationAgent;
|
|
149
|
-
get productRequirementsAgent(): ProductRequirementsAgent;
|
|
150
174
|
get multiAgentOrchestrator(): MultiAgentOrchestrator;
|
|
151
175
|
get decisionRepository(): SQLiteDecisionRepository;
|
|
152
176
|
get decisionRecorder(): DecisionRecorder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-container.d.ts","sourceRoot":"","sources":["../../../src/application/services/dependency-container.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"dependency-container.d.ts","sourceRoot":"","sources":["../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