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
|
@@ -1,188 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI Command: Product
|
|
3
|
-
*
|
|
2
|
+
* CLI Command: Product
|
|
3
|
+
* Product requirements and feature planning
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { colors, sectionHeader, success, warning, newline, createBanner, createSpinner, } from '../../../ui.js';
|
|
7
|
-
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
8
|
-
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
7
|
+
import { colors, warning, newline } from '../../../ui.js';
|
|
9
8
|
import { displayError } from '../error-display.js';
|
|
10
|
-
|
|
11
|
-
import { agentFeedbackManager } from '../../../infrastructure/validation/agent-feedback.js';
|
|
12
|
-
import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
|
|
13
|
-
export async function executeProductCommand(goal, options = {}) {
|
|
14
|
-
// Start execution tracing
|
|
15
|
-
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
16
|
-
const runId = executionTracer.startRun('product-spec', {
|
|
17
|
-
query: goal,
|
|
18
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
19
|
-
});
|
|
20
|
-
console.log(createBanner('Product Requirements', 'Generate PRD and feature specifications'));
|
|
21
|
-
newline();
|
|
22
|
-
console.log(colors.bold('Goal:') + ' ' + colors.cyan(goal));
|
|
23
|
-
newline();
|
|
24
|
-
const spinner = createSpinner('Generating product requirements...');
|
|
25
|
-
spinner.start();
|
|
9
|
+
export async function executeProductCommand(query, options) {
|
|
26
10
|
try {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
technicalStack: codebaseInfo?.type,
|
|
32
|
-
},
|
|
33
|
-
options: {
|
|
34
|
-
format: options.format || 'both',
|
|
35
|
-
detailLevel: options.detail || 'medium',
|
|
36
|
-
includeTechnicalSpec: options.includeTechnicalSpec || false,
|
|
37
|
-
outputPath: options.output,
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
spinner.stop();
|
|
41
|
-
// Get current run before ending
|
|
42
|
-
const currentRunId = executionTracer.getCurrentRunId();
|
|
43
|
-
// End trace to finalize run context
|
|
44
|
-
executionTracer.endRun();
|
|
45
|
-
// Get finalized run context
|
|
46
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
47
|
-
const run = executionTracer.getRun(runId);
|
|
48
|
-
const startTime = run?.startTime || Date.now();
|
|
49
|
-
// Create trace summary
|
|
50
|
-
let summary = traceSummaryFormatter.createSummary(run || {
|
|
51
|
-
runId,
|
|
52
|
-
startTime,
|
|
53
|
-
endTime: Date.now(),
|
|
54
|
-
operation: 'product-spec',
|
|
55
|
-
query: goal,
|
|
56
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
57
|
-
traces: [],
|
|
58
|
-
}, undefined, 'product-requirements-agent');
|
|
59
|
-
// Update summary with actual results
|
|
60
|
-
if (result.success && result.documents.length > 0) {
|
|
61
|
-
const filePaths = result.documents
|
|
62
|
-
.filter(doc => doc.path !== 'stdout')
|
|
63
|
-
.map(doc => doc.path);
|
|
64
|
-
summary.filesCreated = filePaths;
|
|
65
|
-
summary.metrics.filesAnalyzed = result.structured.features.length;
|
|
66
|
-
}
|
|
67
|
-
if (result.errors && result.errors.length > 0) {
|
|
68
|
-
summary.errors = result.errors;
|
|
69
|
-
}
|
|
70
|
-
// Get review decision - single source of truth for userAction
|
|
71
|
-
// Note: review flag is already resolved in index.ts (checks both options.review and program.opts().review)
|
|
72
|
-
// So options.review here should already be correct, but we use Boolean() to be safe
|
|
73
|
-
const reviewRequested = Boolean(options.review);
|
|
74
|
-
const decision = await reviewHandler.getReviewDecision(summary, reviewRequested);
|
|
75
|
-
if (!decision.approved) {
|
|
76
|
-
console.log(warning('Operation cancelled by user.'));
|
|
77
|
-
// Record feedback for rejection
|
|
78
|
-
agentFeedbackManager.recordFeedback({
|
|
79
|
-
runId,
|
|
80
|
-
agentName: 'product-requirements-agent',
|
|
81
|
-
operation: 'product-spec',
|
|
82
|
-
query: goal,
|
|
83
|
-
outcome: 'cancelled',
|
|
84
|
-
userAction: decision.userAction,
|
|
85
|
-
filesCreated: result.documents.filter(doc => doc.path !== 'stdout').map(doc => doc.path),
|
|
86
|
-
errors: result.errors,
|
|
87
|
-
metrics: {
|
|
88
|
-
filesAnalyzed: result.structured.features.length,
|
|
89
|
-
duration: run ? (run.endTime - run.startTime) : 0,
|
|
90
|
-
},
|
|
91
|
-
validationChecks: summary.validationChecks.map(check => ({
|
|
92
|
-
check: check.check,
|
|
93
|
-
passed: check.passed,
|
|
94
|
-
message: check.message,
|
|
95
|
-
})),
|
|
96
|
-
});
|
|
97
|
-
newline();
|
|
98
|
-
executionTracer.endRun();
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const finalOutcome = result.success ? 'success' : 'failure';
|
|
102
|
-
newline();
|
|
103
|
-
// Record feedback with userAction from review decision
|
|
104
|
-
agentFeedbackManager.recordFeedback({
|
|
105
|
-
runId,
|
|
106
|
-
agentName: 'product-requirements-agent',
|
|
107
|
-
operation: 'product-spec',
|
|
108
|
-
query: goal,
|
|
109
|
-
outcome: finalOutcome,
|
|
110
|
-
userAction: decision.userAction,
|
|
111
|
-
filesCreated: result.documents.filter(doc => doc.path !== 'stdout').map(doc => doc.path),
|
|
112
|
-
errors: result.errors,
|
|
113
|
-
metrics: {
|
|
114
|
-
filesAnalyzed: result.structured.features.length,
|
|
115
|
-
duration: run ? (run.endTime - run.startTime) : 0,
|
|
116
|
-
},
|
|
117
|
-
validationChecks: summary.validationChecks.map(check => ({
|
|
118
|
-
check: check.check,
|
|
119
|
-
passed: check.passed,
|
|
120
|
-
message: check.message,
|
|
121
|
-
})),
|
|
122
|
-
});
|
|
123
|
-
if (result.success) {
|
|
124
|
-
newline();
|
|
125
|
-
// Display results
|
|
126
|
-
sectionHeader('Product Requirements Generated');
|
|
127
|
-
if (result.documents.length > 0) {
|
|
128
|
-
console.log(colors.bold('Documents Created:'));
|
|
129
|
-
result.documents.forEach(doc => {
|
|
130
|
-
if (doc.path !== 'stdout') {
|
|
131
|
-
console.log(colors.green(` ✓ ${doc.path} (${doc.type}, ${doc.format})`));
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
newline();
|
|
135
|
-
}
|
|
136
|
-
if (result.structured.features.length > 0) {
|
|
137
|
-
console.log(colors.bold('Features Identified:'));
|
|
138
|
-
result.structured.features.forEach(feature => {
|
|
139
|
-
const priorityColor = feature.priority === 'high' ? colors.red :
|
|
140
|
-
feature.priority === 'medium' ? colors.yellow : colors.dim;
|
|
141
|
-
console.log(` ${priorityColor('●')} ${feature.name} (${feature.priority} priority)`);
|
|
142
|
-
});
|
|
143
|
-
newline();
|
|
144
|
-
}
|
|
145
|
-
// Print markdown to stdout if no output file specified and format includes markdown
|
|
146
|
-
if (!options.output && (options.format === 'markdown' || options.format === 'both' || !options.format)) {
|
|
147
|
-
newline();
|
|
148
|
-
sectionHeader('PRD Content');
|
|
149
|
-
const markdownDoc = result.documents.find(d => d.format === 'markdown' && d.type === 'prd');
|
|
150
|
-
if (markdownDoc && markdownDoc.content) {
|
|
151
|
-
// Print the full PRD content
|
|
152
|
-
console.log(markdownDoc.content);
|
|
153
|
-
newline();
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
console.log(colors.dim('Product Requirements Document generated successfully.'));
|
|
157
|
-
console.log(colors.dim('Use --output <file> to save to a file.'));
|
|
158
|
-
newline();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
console.log(success('Product requirements generated successfully'));
|
|
162
|
-
newline();
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
displayError(new Error(result.errors?.join(', ') || 'Product requirements generation failed'), {
|
|
166
|
-
operation: 'product-spec',
|
|
167
|
-
query: goal,
|
|
168
|
-
showSuggestions: true,
|
|
169
|
-
});
|
|
170
|
-
executionTracer.endRun();
|
|
171
|
-
process.exit(1);
|
|
172
|
-
}
|
|
11
|
+
// In alpha, this is a stub
|
|
12
|
+
// Can be enhanced later with ProductRequirementsAgent
|
|
13
|
+
console.log(warning('Product requirements generation is not yet fully implemented in v0.5.0-alpha.0'));
|
|
14
|
+
console.log(colors.dim(`Query: ${query}`));
|
|
173
15
|
}
|
|
174
16
|
catch (err) {
|
|
175
|
-
|
|
176
|
-
displayError(err, {
|
|
177
|
-
operation: 'product-spec',
|
|
178
|
-
query: goal,
|
|
179
|
-
showSuggestions: true,
|
|
180
|
-
});
|
|
181
|
-
executionTracer.endRun();
|
|
17
|
+
displayError(err);
|
|
182
18
|
process.exit(1);
|
|
183
19
|
}
|
|
184
|
-
|
|
185
|
-
executionTracer.endRun();
|
|
186
|
-
}
|
|
20
|
+
newline();
|
|
187
21
|
}
|
|
188
22
|
//# sourceMappingURL=product-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/product-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"product-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/product-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAkB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAa,EACb,OAMC;IAED,IAAI,CAAC;QACH,2BAA2B;QAC3B,sDAAsD;QACtD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,gFAAgF,CAAC,CAAC,CAAC;QACvG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,YAAY,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/react-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"react-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/react-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgMtG"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Execute query using ReAct loop
|
|
4
4
|
*/
|
|
5
5
|
import { container } from '../../../application/services/dependency-container.js';
|
|
6
|
-
import { colors, sectionHeader, formatNumber, newline, createBanner, } from '../../../ui.js';
|
|
6
|
+
import { colors, sectionHeader, formatNumber, newline, createBanner, 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 { displayError } from '../error-display.js';
|
|
@@ -33,6 +33,10 @@ export async function executeReactCommand(query, options) {
|
|
|
33
33
|
const useCase = container.reactOrchestrationUseCase;
|
|
34
34
|
console.log(createBanner('ReAct Reasoning', 'Iterative reasoning with tools'));
|
|
35
35
|
newline();
|
|
36
|
+
// Display provider as required by capability map (2.23)
|
|
37
|
+
const providerName = getProviderDisplayName(container.aiService);
|
|
38
|
+
console.log(colors.dim(`Provider: ${providerName}`));
|
|
39
|
+
newline();
|
|
36
40
|
console.log(colors.bold('Query:'));
|
|
37
41
|
console.log(colors.cyan(' ' + query));
|
|
38
42
|
newline();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/react-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,OAAO,EACP,YAAY,
|
|
1
|
+
{"version":3,"file":"react-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/react-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,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,YAAY,EAAE,MAAM,qBAAqB,CAAC;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,CAAC,CAAC,CAAC;QAC9F,OAAO,EAAE,CAAC;IACV,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,YAAY,CAAC,GAAG,EAAE;YAChB,SAAS,EAAE,OAAO;YAClB,KAAK;YACL,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,eAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Review
|
|
3
|
-
*
|
|
3
|
+
* Task review interface - review and approve/reject tasks
|
|
4
4
|
*
|
|
5
|
-
* Phase 1: v0.5.0-alpha
|
|
6
|
-
* See: docs/INTERNAL/v0.5.0_ALPHA_PHASE1_TECH_SPEC.md
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
6
|
*/
|
|
8
|
-
export declare function executeReviewCommand(options?: {
|
|
9
|
-
|
|
7
|
+
export declare function executeReviewCommand(taskId: string | undefined, options?: {
|
|
8
|
+
list?: boolean;
|
|
9
|
+
approve?: boolean;
|
|
10
|
+
reject?: boolean;
|
|
11
|
+
comment?: string;
|
|
10
12
|
all?: boolean;
|
|
11
|
-
status?: string;
|
|
12
|
-
json?: boolean;
|
|
13
13
|
}): Promise<void>;
|
|
14
14
|
//# sourceMappingURL=review-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/review-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/review-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,CAAC,EAAE;IACR,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,GACA,OAAO,CAAC,IAAI,CAAC,CAoLf"}
|
|
@@ -1,22 +1,173 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Review
|
|
3
|
-
*
|
|
3
|
+
* Task review interface - review and approve/reject tasks
|
|
4
4
|
*
|
|
5
|
-
* Phase 1: v0.5.0-alpha
|
|
6
|
-
* See: docs/INTERNAL/v0.5.0_ALPHA_PHASE1_TECH_SPEC.md
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
import { colors, sectionHeader, success, error, warning, info, newline, createBanner, createTable, isMinimalStyle, } from '../../../ui.js';
|
|
8
|
+
import { displayError } from '../error-display.js';
|
|
9
|
+
import { getTaskRepository } from '../../../infrastructure/storage/task-repository.js';
|
|
10
|
+
import { updateTaskReview } from '../../../infrastructure/storage/task-helpers.js';
|
|
11
|
+
import { TaskStatus, ReviewStatus } from '../../../domain/entities/task.js';
|
|
12
|
+
export async function executeReviewCommand(taskId, options) {
|
|
13
|
+
try {
|
|
14
|
+
const taskRepo = getTaskRepository();
|
|
15
|
+
// List mode - show tasks needing review
|
|
16
|
+
if (options?.list || !taskId) {
|
|
17
|
+
const minimal = isMinimalStyle();
|
|
18
|
+
if (!minimal) {
|
|
19
|
+
console.log(createBanner('Review', 'Task review interface'));
|
|
20
|
+
newline();
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.log(colors.bold('Task Review'));
|
|
24
|
+
newline();
|
|
25
|
+
}
|
|
26
|
+
// Add timeout protection for database operations
|
|
27
|
+
const fetchWithTimeout = async (promise, timeoutMs = 5000) => {
|
|
28
|
+
return Promise.race([
|
|
29
|
+
promise,
|
|
30
|
+
new Promise((_, reject) => {
|
|
31
|
+
setTimeout(() => reject(new Error('Operation timed out')), timeoutMs);
|
|
32
|
+
}),
|
|
33
|
+
]);
|
|
34
|
+
};
|
|
35
|
+
let tasksNeedingReview = [];
|
|
36
|
+
let completedTasks = [];
|
|
37
|
+
try {
|
|
38
|
+
tasksNeedingReview = await fetchWithTimeout(taskRepo.getByStatus(TaskStatus.NEEDS_REVIEW), 5000);
|
|
39
|
+
completedTasks = await fetchWithTimeout(taskRepo.getByStatus(TaskStatus.COMPLETED), 5000);
|
|
40
|
+
}
|
|
41
|
+
catch (timeoutError) {
|
|
42
|
+
// If timeout, show empty state and exit gracefully
|
|
43
|
+
console.log(info('No tasks requiring review'));
|
|
44
|
+
newline();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (tasksNeedingReview.length === 0 && completedTasks.length === 0) {
|
|
48
|
+
console.log(info('No tasks requiring review'));
|
|
49
|
+
newline();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (tasksNeedingReview.length > 0) {
|
|
53
|
+
if (minimal) {
|
|
54
|
+
console.log(colors.bold('Tasks needing review:'));
|
|
55
|
+
newline();
|
|
56
|
+
// Simple table without borders
|
|
57
|
+
const header = `${'ID'.padEnd(10)} ${'Mode'.padEnd(8)} ${'Risk'.padEnd(4)} Goal`;
|
|
58
|
+
console.log(colors.dim(header));
|
|
59
|
+
console.log(colors.dim('-'.repeat(60)));
|
|
60
|
+
tasksNeedingReview.slice(0, 10).forEach(task => {
|
|
61
|
+
const id = (task.id.substring(0, 8) + '..').padEnd(10);
|
|
62
|
+
const mode = task.mode.padEnd(8);
|
|
63
|
+
const risk = task.riskTier.toUpperCase().padEnd(4);
|
|
64
|
+
const goal = task.goal.length > 35 ? task.goal.substring(0, 34) + '…' : task.goal;
|
|
65
|
+
console.log(`${id} ${mode} ${risk} ${goal}`);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
sectionHeader('Tasks Needing Review');
|
|
70
|
+
const table = createTable(['ID', 'Goal', 'Mode', 'Risk', 'Status', 'Created'], tasksNeedingReview.slice(0, 10).map(task => [
|
|
71
|
+
task.id.substring(0, 8) + '...',
|
|
72
|
+
task.goal.substring(0, 40) + (task.goal.length > 40 ? '...' : ''),
|
|
73
|
+
task.mode,
|
|
74
|
+
task.riskTier,
|
|
75
|
+
task.status,
|
|
76
|
+
new Date(task.createdAt).toLocaleString(),
|
|
77
|
+
]));
|
|
78
|
+
console.log(table.toString());
|
|
79
|
+
}
|
|
80
|
+
newline();
|
|
81
|
+
if (tasksNeedingReview.length > 10) {
|
|
82
|
+
console.log(colors.dim(` ... and ${tasksNeedingReview.length - 10} more`));
|
|
83
|
+
newline();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (completedTasks.length > 0 && options?.all) {
|
|
87
|
+
sectionHeader('Completed Tasks (Review History)');
|
|
88
|
+
const table = createTable(['ID', 'Goal', 'Mode', 'Status', 'Review Status', 'Completed'], completedTasks.slice(0, 10).map(task => [
|
|
89
|
+
task.id.substring(0, 8) + '...',
|
|
90
|
+
task.goal.substring(0, 40) + (task.goal.length > 40 ? '...' : ''),
|
|
91
|
+
task.mode,
|
|
92
|
+
task.status,
|
|
93
|
+
task.reviewStatus || 'N/A',
|
|
94
|
+
task.executionCompletedAt
|
|
95
|
+
? new Date(task.executionCompletedAt).toLocaleString()
|
|
96
|
+
: 'N/A',
|
|
97
|
+
]));
|
|
98
|
+
console.log(table.toString());
|
|
99
|
+
newline();
|
|
100
|
+
}
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
// Single task review mode
|
|
104
|
+
if (!taskId) {
|
|
105
|
+
console.log(error('Task ID required for review actions'));
|
|
106
|
+
console.log(colors.dim('Use --list to see tasks needing review'));
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
const task = await taskRepo.getById(taskId);
|
|
110
|
+
if (!task) {
|
|
111
|
+
console.log(error(`Task ${taskId} not found`));
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
console.log(createBanner('Review Task', 'Approve or reject changes'));
|
|
115
|
+
newline();
|
|
116
|
+
// Display task details
|
|
117
|
+
sectionHeader('Task Details');
|
|
118
|
+
console.log(colors.bold('ID:') + ' ' + task.id);
|
|
119
|
+
console.log(colors.bold('Goal:') + ' ' + task.goal);
|
|
120
|
+
console.log(colors.bold('Mode:') + ' ' + task.mode);
|
|
121
|
+
console.log(colors.bold('Status:') + ' ' + task.status);
|
|
122
|
+
console.log(colors.bold('Risk Tier:') + ' ' + task.riskTier.toUpperCase());
|
|
123
|
+
console.log(colors.bold('Environment:') + ' ' + task.environment.toUpperCase());
|
|
124
|
+
newline();
|
|
125
|
+
if (task.filesChanged && task.filesChanged.length > 0) {
|
|
126
|
+
console.log(colors.bold('Files Changed:'));
|
|
127
|
+
task.filesChanged.forEach(file => {
|
|
128
|
+
console.log(colors.cyan(` ${file}`));
|
|
129
|
+
});
|
|
130
|
+
newline();
|
|
131
|
+
}
|
|
132
|
+
if (task.filesCreated && task.filesCreated.length > 0) {
|
|
133
|
+
console.log(colors.bold('Files Created:'));
|
|
134
|
+
task.filesCreated.forEach(file => {
|
|
135
|
+
console.log(colors.green(` + ${file}`));
|
|
136
|
+
});
|
|
137
|
+
newline();
|
|
138
|
+
}
|
|
139
|
+
if (task.filesDeleted && task.filesDeleted.length > 0) {
|
|
140
|
+
console.log(colors.bold('Files Deleted:'));
|
|
141
|
+
task.filesDeleted.forEach(file => {
|
|
142
|
+
console.log(colors.red(` - ${file}`));
|
|
143
|
+
});
|
|
144
|
+
newline();
|
|
145
|
+
}
|
|
146
|
+
// Perform review action
|
|
147
|
+
if (options?.approve) {
|
|
148
|
+
await updateTaskReview(taskId, ReviewStatus.APPROVED, 'cli-user', options?.comment);
|
|
149
|
+
console.log(success(`✓ Task ${taskId} approved`));
|
|
150
|
+
newline();
|
|
151
|
+
}
|
|
152
|
+
else if (options?.reject) {
|
|
153
|
+
await updateTaskReview(taskId, ReviewStatus.REJECTED, 'cli-user', options?.comment);
|
|
154
|
+
console.log(warning(`✗ Task ${taskId} rejected`));
|
|
155
|
+
if (options?.comment) {
|
|
156
|
+
console.log(colors.dim(` Comment: ${options.comment}`));
|
|
157
|
+
}
|
|
158
|
+
newline();
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// Show task but no action taken
|
|
162
|
+
console.log(info('Use --approve or --reject to review this task'));
|
|
163
|
+
console.log(colors.dim(` codehere review ${taskId} --approve [--comment "reason"]`));
|
|
164
|
+
console.log(colors.dim(` codehere review ${taskId} --reject [--comment "reason"]`));
|
|
165
|
+
newline();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
displayError(err);
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
21
172
|
}
|
|
22
173
|
//# sourceMappingURL=review-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/review-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/review-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,U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AC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Run
|
|
3
|
-
*
|
|
3
|
+
* Unified agentic execution - executes tasks
|
|
4
4
|
*
|
|
5
|
-
* Phase 1: v0.5.0-alpha
|
|
6
|
-
* See: docs/INTERNAL/v0.5.0_ALPHA_PHASE1_TECH_SPEC.md
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
6
|
*/
|
|
8
7
|
export declare function executeRunCommand(goal: string, options?: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
verbose?: boolean;
|
|
8
|
+
taskId?: string;
|
|
9
|
+
file?: string;
|
|
10
|
+
files?: string[];
|
|
11
|
+
review?: boolean;
|
|
14
12
|
}): Promise<void>;
|
|
15
13
|
//# sourceMappingURL=run-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/run-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"run-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/run-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0BH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAgMf"}
|