codehere 0.4.0 → 0.5.0-alpha.0
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/README.md +7 -0
- package/dist/application/agents/execution-agent.js +2 -2
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +16 -8
- 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/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 +75 -43
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +6 -3
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/domain/entities/task.d.ts.map +1 -1
- package/dist/domain/entities/task.js +1 -1
- 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/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 +308 -48
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +3 -3
- 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 +6 -6
- 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.js +2 -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 +94 -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/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 +399 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- 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 +11 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-helpers.js +47 -7
- package/dist/infrastructure/storage/task-helpers.js.map +1 -1
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-repository.js.map +1 -1
- 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 +3 -5
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +34 -49
- 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.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +185 -128
- 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 +8 -6
- package/dist/presentation/cli/commands/config-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 +25 -281
- package/dist/presentation/cli/commands/fix-command.js.map +1 -1
- 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.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +15 -7
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +9 -6
- 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/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 +148 -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.js +1 -1
- 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 +147 -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/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/ui.d.ts +6 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +35 -1
- package/dist/ui.js.map +1 -1
- package/package.json +8 -3
|
@@ -1,54 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Handles
|
|
2
|
+
* Review Handler
|
|
3
|
+
* Handles review requests and decisions
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
|
-
import type { TraceSummary } from './trace-summary.js';
|
|
6
7
|
export interface ReviewDecision {
|
|
7
8
|
approved: boolean;
|
|
8
9
|
proceed: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
userAction: 'approved' | 'rejected' | 'not_required' | 'cancelled';
|
|
11
|
+
comment?: string;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
|
-
* Review
|
|
14
|
-
* Manages the review flow when --review flag is enabled
|
|
14
|
+
* Review handler instance
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
17
|
-
/**
|
|
18
|
-
* Request user review before proceeding
|
|
19
|
-
*/
|
|
20
|
-
requestReview(summary: TraceSummary, options?: {
|
|
21
|
-
timeout?: number;
|
|
22
|
-
defaultAction?: 'approve' | 'reject';
|
|
23
|
-
}): Promise<ReviewDecision>;
|
|
16
|
+
export declare const reviewHandler: {
|
|
24
17
|
/**
|
|
25
|
-
*
|
|
18
|
+
* Request review from user
|
|
26
19
|
*/
|
|
27
|
-
|
|
20
|
+
requestReview(summary: string): Promise<ReviewDecision>;
|
|
28
21
|
/**
|
|
29
|
-
*
|
|
22
|
+
* Get review decision (with optional review requested flag)
|
|
30
23
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* Get review decision - single source of truth for userAction
|
|
34
|
-
*
|
|
35
|
-
* This method is the ONLY place where userAction is determined.
|
|
36
|
-
* All CLI commands must use this method and trust its userAction value.
|
|
37
|
-
*
|
|
38
|
-
* Logic:
|
|
39
|
-
* 1. If reviewRequested === false:
|
|
40
|
-
* → userAction = 'not_required'
|
|
41
|
-
*
|
|
42
|
-
* 2. If reviewRequested === true and shouldReview === false:
|
|
43
|
-
* → userAction = 'approved' (user explicitly requested review, treat as approved)
|
|
44
|
-
*
|
|
45
|
-
* 3. If reviewRequested === true and shouldReview === true:
|
|
46
|
-
* → Call requestReview() which handles:
|
|
47
|
-
* - Interactive mode: prompt user, return 'approved' or 'rejected'
|
|
48
|
-
* - Non-interactive + auto-approve: return 'approved'
|
|
49
|
-
* - Non-interactive + no auto-approve: return 'rejected'
|
|
50
|
-
*/
|
|
51
|
-
getReviewDecision(summary: TraceSummary, reviewRequested: boolean): Promise<ReviewDecision>;
|
|
52
|
-
}
|
|
53
|
-
export declare const reviewHandler: ReviewHandler;
|
|
24
|
+
getReviewDecision(summary: string, reviewRequested: boolean): Promise<ReviewDecision>;
|
|
25
|
+
};
|
|
54
26
|
//# sourceMappingURL=review-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-handler.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/review-handler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review-handler.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/review-handler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;2BAC0B,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAc7D;;OAEG;+BAEQ,MAAM,mBACE,OAAO,GACvB,OAAO,CAAC,cAAc,CAAC;CAW3B,CAAC"}
|
|
@@ -1,176 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Handles
|
|
2
|
+
* Review Handler
|
|
3
|
+
* Handles review requests and decisions
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
|
-
import * as readline from 'readline';
|
|
6
|
-
import { colors, newline, separator } from '../../ui.js';
|
|
7
|
-
import { traceSummaryFormatter } from './trace-summary.js';
|
|
8
7
|
/**
|
|
9
|
-
* Review
|
|
10
|
-
* Manages the review flow when --review flag is enabled
|
|
8
|
+
* Review handler instance
|
|
11
9
|
*/
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* Request user review before proceeding
|
|
15
|
-
*/
|
|
16
|
-
async requestReview(summary, options = {}) {
|
|
17
|
-
// TODO: Update task review metadata
|
|
18
|
-
// When review is requested: set task.reviewStatus = PENDING
|
|
19
|
-
// When review is completed: set task.reviewStatus, task.reviewedAt, task.reviewComments
|
|
20
|
-
// Update task.status: NEEDS_REVIEW → APPROVED/REJECTED
|
|
21
|
-
// See: docs/ARCHITECTURE/TASK_MODEL.md
|
|
22
|
-
// Display summary
|
|
23
|
-
const summaryText = traceSummaryFormatter.formatSummary(summary);
|
|
24
|
-
console.log('\n' + summaryText);
|
|
25
|
-
newline();
|
|
26
|
-
// Check if we should skip review in non-interactive mode
|
|
27
|
-
if (!process.stdin.isTTY) {
|
|
28
|
-
const autoApprove = process.env.CODEHERE_AUTO_APPROVE === 'true' ||
|
|
29
|
-
process.env.CODEHERE_REVIEW_SKIP === 'true';
|
|
30
|
-
if (autoApprove) {
|
|
31
|
-
console.log(colors.yellow('⚠️ Non-interactive mode: Auto-approving changes (CODEHERE_AUTO_APPROVE=true)'));
|
|
32
|
-
return {
|
|
33
|
-
approved: true,
|
|
34
|
-
proceed: true,
|
|
35
|
-
reason: 'auto-approved (non-interactive mode)',
|
|
36
|
-
userAction: 'approved',
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
console.log(colors.red('❌ Non-interactive mode: Review required but cannot prompt for input.'));
|
|
40
|
-
console.log(colors.yellow(' Set CODEHERE_AUTO_APPROVE=true to auto-approve, or run in interactive mode.'));
|
|
41
|
-
return {
|
|
42
|
-
approved: false,
|
|
43
|
-
proceed: false,
|
|
44
|
-
reason: 'non-interactive mode, review required',
|
|
45
|
-
userAction: 'rejected',
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
// Prompt for approval
|
|
49
|
-
console.log(separator('─', 80));
|
|
50
|
-
console.log(colors.bold('Review Required'));
|
|
51
|
-
console.log(separator('─', 80));
|
|
52
|
-
if (summary.reviewNeeded.riskLevel) {
|
|
53
|
-
const riskColor = {
|
|
54
|
-
low: colors.cyan,
|
|
55
|
-
medium: colors.yellow,
|
|
56
|
-
high: colors.red,
|
|
57
|
-
critical: colors.red.bold,
|
|
58
|
-
}[summary.reviewNeeded.riskLevel];
|
|
59
|
-
console.log(riskColor(`Risk Level: ${summary.reviewNeeded.riskLevel.toUpperCase()}`));
|
|
60
|
-
newline();
|
|
61
|
-
}
|
|
62
|
-
const decision = await this.promptApproval(options.timeout || 0, options.defaultAction);
|
|
63
|
-
newline();
|
|
64
|
-
if (decision.approved) {
|
|
65
|
-
console.log(colors.green('✓ Changes approved. Proceeding...'));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
console.log(colors.red('✗ Changes rejected. Cancelling operation.'));
|
|
69
|
-
}
|
|
70
|
-
return decision;
|
|
71
|
-
}
|
|
10
|
+
export const reviewHandler = {
|
|
72
11
|
/**
|
|
73
|
-
*
|
|
12
|
+
* Request review from user
|
|
74
13
|
*/
|
|
75
|
-
async
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
approved: true,
|
|
88
|
-
proceed: true,
|
|
89
|
-
userAction: 'approved',
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else if (normalized === 'no' || normalized === 'n') {
|
|
93
|
-
resolve({
|
|
94
|
-
approved: false,
|
|
95
|
-
proceed: false,
|
|
96
|
-
reason: 'user rejected',
|
|
97
|
-
userAction: 'rejected',
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
// Invalid input, ask again
|
|
102
|
-
console.log(colors.yellow('Please enter "yes" or "no"'));
|
|
103
|
-
prompt();
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
// Handle timeout
|
|
108
|
-
if (timeout > 0) {
|
|
109
|
-
setTimeout(() => {
|
|
110
|
-
if (rl) {
|
|
111
|
-
rl.close();
|
|
112
|
-
}
|
|
113
|
-
const action = defaultAction || 'reject';
|
|
114
|
-
resolve({
|
|
115
|
-
approved: action === 'approve',
|
|
116
|
-
proceed: action === 'approve',
|
|
117
|
-
reason: `timeout (default: ${action})`,
|
|
118
|
-
userAction: action === 'approve' ? 'approved' : 'rejected',
|
|
119
|
-
});
|
|
120
|
-
if (action === 'approve') {
|
|
121
|
-
console.log(colors.yellow(`\n⏱ Timeout: Auto-approving (default action: ${action})`));
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
console.log(colors.yellow(`\n⏱ Timeout: Auto-rejecting (default action: ${action})`));
|
|
125
|
-
}
|
|
126
|
-
}, timeout);
|
|
127
|
-
}
|
|
128
|
-
prompt();
|
|
129
|
-
});
|
|
130
|
-
}
|
|
14
|
+
async requestReview(summary) {
|
|
15
|
+
// In alpha, auto-approve for non-interactive mode
|
|
16
|
+
// Can be enhanced later with interactive prompts
|
|
17
|
+
console.log('\n📋 Review Request:');
|
|
18
|
+
console.log(summary);
|
|
19
|
+
console.log('\n[Auto-approved in alpha mode]');
|
|
20
|
+
return {
|
|
21
|
+
approved: true,
|
|
22
|
+
proceed: true,
|
|
23
|
+
userAction: 'approved',
|
|
24
|
+
};
|
|
25
|
+
},
|
|
131
26
|
/**
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
shouldRequireReview(summary) {
|
|
135
|
-
// Always require review if explicitly flagged
|
|
136
|
-
if (summary.reviewNeeded.required) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
// Require review for high/critical risk
|
|
140
|
-
if (summary.reviewNeeded.riskLevel === 'high' || summary.reviewNeeded.riskLevel === 'critical') {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
// Require review if files changed
|
|
144
|
-
if (summary.filesChanged.length > 0 || summary.filesCreated.length > 0) {
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
// Require review if errors occurred
|
|
148
|
-
if (summary.errors && summary.errors.length > 0) {
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Get review decision - single source of truth for userAction
|
|
155
|
-
*
|
|
156
|
-
* This method is the ONLY place where userAction is determined.
|
|
157
|
-
* All CLI commands must use this method and trust its userAction value.
|
|
158
|
-
*
|
|
159
|
-
* Logic:
|
|
160
|
-
* 1. If reviewRequested === false:
|
|
161
|
-
* → userAction = 'not_required'
|
|
162
|
-
*
|
|
163
|
-
* 2. If reviewRequested === true and shouldReview === false:
|
|
164
|
-
* → userAction = 'approved' (user explicitly requested review, treat as approved)
|
|
165
|
-
*
|
|
166
|
-
* 3. If reviewRequested === true and shouldReview === true:
|
|
167
|
-
* → Call requestReview() which handles:
|
|
168
|
-
* - Interactive mode: prompt user, return 'approved' or 'rejected'
|
|
169
|
-
* - Non-interactive + auto-approve: return 'approved'
|
|
170
|
-
* - Non-interactive + no auto-approve: return 'rejected'
|
|
27
|
+
* Get review decision (with optional review requested flag)
|
|
171
28
|
*/
|
|
172
29
|
async getReviewDecision(summary, reviewRequested) {
|
|
173
|
-
// Case 1: Review not requested → not_required
|
|
174
30
|
if (!reviewRequested) {
|
|
175
31
|
return {
|
|
176
32
|
approved: true,
|
|
@@ -178,29 +34,7 @@ export class ReviewHandler {
|
|
|
178
34
|
userAction: 'not_required',
|
|
179
35
|
};
|
|
180
36
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
// Case 3: Review is required - call requestReview which handles auto-approve
|
|
185
|
-
return await this.requestReview(summary);
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
// Case 2: Review was requested but not required (e.g., no file changes)
|
|
189
|
-
// User explicitly passed --review, so treat as approved
|
|
190
|
-
// Note: autoApprove is checked here for logging purposes, but userAction is always 'approved'
|
|
191
|
-
const autoApprove = process.env.CODEHERE_AUTO_APPROVE === 'true' ||
|
|
192
|
-
process.env.CODEHERE_REVIEW_SKIP === 'true';
|
|
193
|
-
return {
|
|
194
|
-
approved: true,
|
|
195
|
-
proceed: true,
|
|
196
|
-
reason: autoApprove
|
|
197
|
-
? 'review requested but not required, auto-approved'
|
|
198
|
-
: 'review requested but not required',
|
|
199
|
-
userAction: 'approved',
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
// Singleton instance
|
|
205
|
-
export const reviewHandler = new ReviewHandler();
|
|
37
|
+
return this.requestReview(summary);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
206
40
|
//# sourceMappingURL=review-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-handler.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/review-handler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review-handler.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/review-handler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,aAAa,CAAC,OAAe;QACjC,kDAAkD;QAClD,iDAAiD;QACjD,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QAE/C,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,UAAU;SACvB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAe,EACf,eAAwB;QAExB,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,cAAc;aAC3B,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF,CAAC"}
|
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Merges multiple
|
|
4
|
-
*
|
|
2
|
+
* Summary Aggregator
|
|
3
|
+
* Merges multiple trace summaries into a composite summary
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
5
6
|
*/
|
|
6
7
|
import type { TraceSummary } from './trace-summary.js';
|
|
7
8
|
export interface CompositeSummary {
|
|
8
9
|
runId: string;
|
|
9
10
|
operation: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
reasoningSteps: TraceSummary['reasoningSteps'];
|
|
15
|
-
validationChecks: TraceSummary['validationChecks'];
|
|
16
|
-
metrics: TraceSummary['metrics'];
|
|
17
|
-
reviewNeeded: TraceSummary['reviewNeeded'];
|
|
18
|
-
outcome: TraceSummary['outcome'];
|
|
19
|
-
errors?: string[];
|
|
20
|
-
warnings?: string[];
|
|
21
|
-
agentSummaries: Array<{
|
|
11
|
+
agents: string[];
|
|
12
|
+
totalDuration: number;
|
|
13
|
+
success: boolean;
|
|
14
|
+
summaries: Array<{
|
|
22
15
|
agent: string;
|
|
23
|
-
runId: string;
|
|
24
16
|
summary: TraceSummary;
|
|
17
|
+
runId?: string;
|
|
25
18
|
}>;
|
|
26
|
-
|
|
19
|
+
filesAffected: string[];
|
|
20
|
+
filesChanged?: string[];
|
|
21
|
+
filesCreated?: string[];
|
|
22
|
+
filesDeleted?: string[];
|
|
23
|
+
errors: string[];
|
|
24
|
+
warnings?: string[];
|
|
25
|
+
validationChecks?: any[];
|
|
26
|
+
metrics?: Record<string, any>;
|
|
27
|
+
startTime: number;
|
|
28
|
+
endTime?: number;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* Summary aggregator instance
|
|
30
32
|
*/
|
|
31
|
-
|
|
33
|
+
declare class SummaryAggregatorImpl {
|
|
32
34
|
/**
|
|
33
|
-
* Merge multiple summaries into a composite summary
|
|
35
|
+
* Merge multiple trace summaries into a composite summary
|
|
34
36
|
*/
|
|
35
|
-
mergeSummaries(
|
|
37
|
+
mergeSummaries(agentSummaries: Array<{
|
|
36
38
|
agent: string;
|
|
37
39
|
summary: TraceSummary;
|
|
38
40
|
runId?: string;
|
|
39
41
|
}>, unifiedRunId: string, operation: string): CompositeSummary;
|
|
40
42
|
}
|
|
41
|
-
export declare const summaryAggregator:
|
|
43
|
+
export declare const summaryAggregator: SummaryAggregatorImpl;
|
|
44
|
+
export {};
|
|
42
45
|
//# sourceMappingURL=summary-aggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-aggregator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-aggregator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summary-aggregator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-aggregator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,YAAY,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,cAAM,qBAAqB;IACzB;;OAEG;IACH,cAAc,CACZ,cAAc,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,YAAY,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAC/E,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,gBAAgB;CA+DpB;AAED,eAAO,MAAM,iBAAiB,uBAA8B,CAAC"}
|
|
@@ -1,156 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Merges multiple
|
|
4
|
-
*
|
|
2
|
+
* Summary Aggregator
|
|
3
|
+
* Merges multiple trace summaries into a composite summary
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Summary aggregator instance
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
class SummaryAggregatorImpl {
|
|
10
11
|
/**
|
|
11
|
-
* Merge multiple summaries into a composite summary
|
|
12
|
+
* Merge multiple trace summaries into a composite summary
|
|
12
13
|
*/
|
|
13
|
-
mergeSummaries(
|
|
14
|
-
if (
|
|
15
|
-
// Return empty summary structure
|
|
14
|
+
mergeSummaries(agentSummaries, unifiedRunId, operation) {
|
|
15
|
+
if (agentSummaries.length === 0) {
|
|
16
16
|
return {
|
|
17
17
|
runId: unifiedRunId,
|
|
18
18
|
operation,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
duration: 0,
|
|
27
|
-
operationsCount: 0,
|
|
28
|
-
},
|
|
29
|
-
reviewNeeded: {
|
|
30
|
-
required: false,
|
|
31
|
-
reasons: [],
|
|
32
|
-
},
|
|
33
|
-
outcome: 'success',
|
|
34
|
-
agentSummaries: [],
|
|
35
|
-
phaseOrder: [],
|
|
19
|
+
agents: [],
|
|
20
|
+
totalDuration: 0,
|
|
21
|
+
success: true,
|
|
22
|
+
summaries: [],
|
|
23
|
+
filesAffected: [],
|
|
24
|
+
errors: [],
|
|
25
|
+
startTime: Date.now(),
|
|
36
26
|
};
|
|
37
27
|
}
|
|
38
|
-
//
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
let totalFilesAnalyzed = 0;
|
|
51
|
-
// Aggregate errors and warnings
|
|
52
|
-
const allErrors = [];
|
|
53
|
-
const allWarnings = [];
|
|
54
|
-
// Track review needs
|
|
55
|
-
const reviewReasons = [];
|
|
56
|
-
let highestRiskLevel = 'low';
|
|
57
|
-
// Determine overall outcome
|
|
58
|
-
let hasFailures = false;
|
|
59
|
-
let hasPartialSuccess = false;
|
|
60
|
-
let needsReview = false;
|
|
61
|
-
const phaseOrder = [];
|
|
62
|
-
for (const { agent, summary, runId } of summaries) {
|
|
63
|
-
if (!summary)
|
|
64
|
-
continue;
|
|
65
|
-
phaseOrder.push(agent);
|
|
66
|
-
// Aggregate files
|
|
67
|
-
summary.filesChanged.forEach(f => allFilesChanged.add(f));
|
|
68
|
-
summary.filesCreated.forEach(f => allFilesCreated.add(f));
|
|
69
|
-
summary.filesDeleted.forEach(f => allFilesDeleted.add(f));
|
|
70
|
-
// Aggregate reasoning steps (limit to key steps per agent)
|
|
71
|
-
allReasoningSteps.push(...summary.reasoningSteps.slice(0, 3));
|
|
72
|
-
// Aggregate validation checks
|
|
73
|
-
allValidationChecks.push(...summary.validationChecks);
|
|
74
|
-
// Aggregate metrics
|
|
75
|
-
if (summary.metrics.tokensUsed) {
|
|
76
|
-
totalTokens += summary.metrics.tokensUsed;
|
|
28
|
+
// Collect all data
|
|
29
|
+
const agents = [];
|
|
30
|
+
const filesAffected = new Set();
|
|
31
|
+
const errors = [];
|
|
32
|
+
let minStartTime = Infinity;
|
|
33
|
+
let maxEndTime = 0;
|
|
34
|
+
let allSuccess = true;
|
|
35
|
+
for (const { agent, summary } of agentSummaries) {
|
|
36
|
+
agents.push(agent);
|
|
37
|
+
const data = summary.data;
|
|
38
|
+
if (!data.success) {
|
|
39
|
+
allSuccess = false;
|
|
77
40
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (summary.metrics.filesAnalyzed) {
|
|
81
|
-
totalFilesAnalyzed += summary.metrics.filesAnalyzed;
|
|
41
|
+
if (data.startTime < minStartTime) {
|
|
42
|
+
minStartTime = data.startTime;
|
|
82
43
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
allErrors.push(...summary.errors);
|
|
44
|
+
if (data.endTime && data.endTime > maxEndTime) {
|
|
45
|
+
maxEndTime = data.endTime;
|
|
86
46
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
47
|
+
if (data.filesAffected) {
|
|
48
|
+
data.filesAffected.forEach(f => filesAffected.add(f));
|
|
89
49
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
needsReview = true;
|
|
93
|
-
reviewReasons.push(...summary.reviewNeeded.reasons.map(r => `${agent}: ${r}`));
|
|
94
|
-
// Determine highest risk level
|
|
95
|
-
const riskLevel = summary.reviewNeeded.riskLevel || 'medium';
|
|
96
|
-
const riskOrder = { low: 1, medium: 2, high: 3, critical: 4 };
|
|
97
|
-
if (riskOrder[riskLevel] > riskOrder[highestRiskLevel]) {
|
|
98
|
-
highestRiskLevel = riskLevel;
|
|
99
|
-
}
|
|
50
|
+
if (data.error) {
|
|
51
|
+
errors.push(`${agent}: ${data.error}`);
|
|
100
52
|
}
|
|
101
|
-
// Track outcomes
|
|
102
|
-
if (summary.outcome === 'failure') {
|
|
103
|
-
hasFailures = true;
|
|
104
|
-
}
|
|
105
|
-
else if (summary.outcome === 'partial_success') {
|
|
106
|
-
hasPartialSuccess = true;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
// Determine overall outcome
|
|
110
|
-
let overallOutcome = 'success';
|
|
111
|
-
if (hasFailures) {
|
|
112
|
-
overallOutcome = 'failure';
|
|
113
|
-
}
|
|
114
|
-
else if (hasPartialSuccess || needsReview) {
|
|
115
|
-
overallOutcome = needsReview ? 'needs_review' : 'partial_success';
|
|
116
53
|
}
|
|
117
|
-
|
|
118
|
-
const uniqueErrors = Array.from(new Set(allErrors));
|
|
119
|
-
const uniqueWarnings = Array.from(new Set(allWarnings));
|
|
120
|
-
return {
|
|
54
|
+
const compositeSummary = {
|
|
121
55
|
runId: unifiedRunId,
|
|
122
56
|
operation,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
duration: totalDuration,
|
|
132
|
-
operationsCount: totalOperations,
|
|
133
|
-
filesAnalyzed: totalFilesAnalyzed > 0 ? totalFilesAnalyzed : undefined,
|
|
134
|
-
},
|
|
135
|
-
reviewNeeded: {
|
|
136
|
-
required: needsReview,
|
|
137
|
-
reasons: reviewReasons,
|
|
138
|
-
riskLevel: highestRiskLevel,
|
|
139
|
-
},
|
|
140
|
-
outcome: overallOutcome,
|
|
141
|
-
errors: uniqueErrors.length > 0 ? uniqueErrors : undefined,
|
|
142
|
-
warnings: uniqueWarnings.length > 0 ? uniqueWarnings : undefined,
|
|
143
|
-
agentSummaries: summaries
|
|
144
|
-
.filter(s => s.summary)
|
|
145
|
-
.map(s => ({
|
|
146
|
-
agent: s.agent,
|
|
147
|
-
runId: s.runId || s.summary.runId,
|
|
148
|
-
summary: s.summary,
|
|
149
|
-
})),
|
|
150
|
-
phaseOrder,
|
|
57
|
+
agents,
|
|
58
|
+
totalDuration: maxEndTime > 0 ? maxEndTime - minStartTime : 0,
|
|
59
|
+
success: allSuccess,
|
|
60
|
+
summaries: agentSummaries,
|
|
61
|
+
filesAffected: Array.from(filesAffected),
|
|
62
|
+
errors,
|
|
63
|
+
startTime: minStartTime !== Infinity ? minStartTime : Date.now(),
|
|
64
|
+
endTime: maxEndTime > 0 ? maxEndTime : undefined,
|
|
151
65
|
};
|
|
66
|
+
return compositeSummary;
|
|
152
67
|
}
|
|
153
68
|
}
|
|
154
|
-
|
|
155
|
-
export const summaryAggregator = new SummaryAggregator();
|
|
69
|
+
export const summaryAggregator = new SummaryAggregatorImpl();
|
|
156
70
|
//# sourceMappingURL=summary-aggregator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-aggregator.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-aggregator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summary-aggregator.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-aggregator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2BH;;GAEG;AACH,MAAM,qBAAqB;IACzB;;OAEG;IACH,cAAc,CACZ,cAA+E,EAC/E,YAAoB,EACpB,SAAiB;QAEjB,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL,KAAK,EAAE,YAAY;gBACnB,SAAS;gBACT,MAAM,EAAE,EAAE;gBACV,aAAa,EAAE,CAAC;gBAChB,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,EAAE;gBACb,aAAa,EAAE,EAAE;gBACjB,MAAM,EAAE,EAAE;gBACV,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC;QACJ,CAAC;QAED,mBAAmB;QACnB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;QACxC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAI,YAAY,GAAG,QAAQ,CAAC;QAC5B,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,UAAU,GAAG,IAAI,CAAC;QAEtB,KAAK,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,cAAc,EAAE,CAAC;YAChD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEnB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,UAAU,GAAG,KAAK,CAAC;YACrB,CAAC;YAED,IAAI,IAAI,CAAC,SAAS,GAAG,YAAY,EAAE,CAAC;gBAClC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,CAAC;YAED,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,GAAG,UAAU,EAAE,CAAC;gBAC9C,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;YAC5B,CAAC;YAED,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBACvB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,CAAC;YAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;QAED,MAAM,gBAAgB,GAAqB;YACzC,KAAK,EAAE,YAAY;YACnB,SAAS;YACT,MAAM;YACN,aAAa,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7D,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE,cAAc;YACzB,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;YACxC,MAAM;YACN,SAAS,EAAE,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAChE,OAAO,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;SACjD,CAAC;QAEF,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,qBAAqB,EAAE,CAAC"}
|