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,59 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Extracts summaries from
|
|
4
|
-
*
|
|
2
|
+
* Summary Extractor
|
|
3
|
+
* Extracts summaries from routing and orchestration results
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
5
6
|
*/
|
|
6
|
-
import type { TraceSummary } from './trace-summary.js';
|
|
7
|
-
import type { CompositeSummary } from './summary-aggregator.js';
|
|
8
7
|
export interface SummarySource {
|
|
9
|
-
summary:
|
|
10
|
-
|
|
8
|
+
summary: string;
|
|
9
|
+
metadata?: Record<string, any>;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
* Priority order: compositeSummary > validationSummary > routingDecision.summary
|
|
12
|
+
* Summary extractor instance
|
|
15
13
|
*/
|
|
16
|
-
export declare
|
|
14
|
+
export declare const summaryExtractor: {
|
|
17
15
|
/**
|
|
18
|
-
* Extract summary from
|
|
16
|
+
* Extract summary from routing result
|
|
19
17
|
*/
|
|
20
|
-
|
|
21
|
-
compositeSummary?: CompositeSummary;
|
|
22
|
-
validation?: {
|
|
23
|
-
validationSummary?: TraceSummary;
|
|
24
|
-
} | any;
|
|
25
|
-
execution?: {
|
|
26
|
-
validationSummary?: TraceSummary;
|
|
27
|
-
} | any;
|
|
28
|
-
plan?: {
|
|
29
|
-
validationSummary?: TraceSummary;
|
|
30
|
-
} | any;
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
}): SummarySource | null;
|
|
18
|
+
extractFromRouting(result: any): SummarySource | null;
|
|
33
19
|
/**
|
|
34
|
-
* Extract summary from
|
|
20
|
+
* Extract summary from orchestration result
|
|
35
21
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}): SummarySource | null;
|
|
39
|
-
/**
|
|
40
|
-
* Extract summary from routing response
|
|
41
|
-
*/
|
|
42
|
-
extractFromRouting(result: {
|
|
43
|
-
routingDecision?: {
|
|
44
|
-
summary?: TraceSummary;
|
|
45
|
-
selectedAgent?: string;
|
|
46
|
-
confidence?: number;
|
|
47
|
-
selectionReason?: string;
|
|
48
|
-
};
|
|
49
|
-
result?: {
|
|
50
|
-
validationSummary?: TraceSummary;
|
|
51
|
-
};
|
|
52
|
-
}): SummarySource | null;
|
|
53
|
-
/**
|
|
54
|
-
* Convert CompositeSummary to TraceSummary format
|
|
55
|
-
*/
|
|
56
|
-
private compositeToTraceSummary;
|
|
57
|
-
}
|
|
58
|
-
export declare const summaryExtractor: SummaryExtractor;
|
|
22
|
+
extractFromOrchestration(result: any): SummarySource | null;
|
|
23
|
+
};
|
|
59
24
|
//# sourceMappingURL=summary-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-extractor.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-extractor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summary-extractor.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-extractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;+BACwB,GAAG,GAAG,aAAa,GAAG,IAAI;IAerD;;OAEG;qCAC8B,GAAG,GAAG,aAAa,GAAG,IAAI;CAe5D,CAAC"}
|
|
@@ -1,102 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Extracts summaries from
|
|
4
|
-
*
|
|
2
|
+
* Summary Extractor
|
|
3
|
+
* Extracts summaries from routing and orchestration results
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
* Priority order: compositeSummary > validationSummary > routingDecision.summary
|
|
8
|
+
* Summary extractor instance
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export const summaryExtractor = {
|
|
11
11
|
/**
|
|
12
|
-
* Extract summary from
|
|
13
|
-
*/
|
|
14
|
-
extractFromOrchestration(result) {
|
|
15
|
-
// Priority 1: Composite summary (aggregated from all agents)
|
|
16
|
-
if (result.compositeSummary) {
|
|
17
|
-
// Convert CompositeSummary to TraceSummary format for review handler
|
|
18
|
-
const traceSummary = this.compositeToTraceSummary(result.compositeSummary);
|
|
19
|
-
return {
|
|
20
|
-
summary: traceSummary,
|
|
21
|
-
source: 'composite',
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
// Priority 2: Validation summary
|
|
25
|
-
if (result.validation?.validationSummary) {
|
|
26
|
-
return {
|
|
27
|
-
summary: result.validation.validationSummary,
|
|
28
|
-
source: 'validation',
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
// Priority 3: Execution summary
|
|
32
|
-
if (result.execution?.validationSummary) {
|
|
33
|
-
return {
|
|
34
|
-
summary: result.execution.validationSummary,
|
|
35
|
-
source: 'validation',
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
// Priority 4: Planning summary
|
|
39
|
-
if (result.plan?.validationSummary) {
|
|
40
|
-
return {
|
|
41
|
-
summary: result.plan.validationSummary,
|
|
42
|
-
source: 'validation',
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Extract summary from planning response
|
|
49
|
-
*/
|
|
50
|
-
extractFromPlanning(result) {
|
|
51
|
-
if (result.validationSummary) {
|
|
52
|
-
return {
|
|
53
|
-
summary: result.validationSummary,
|
|
54
|
-
source: 'validation',
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Extract summary from routing response
|
|
12
|
+
* Extract summary from routing result
|
|
61
13
|
*/
|
|
62
14
|
extractFromRouting(result) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
summary: result.result.validationSummary,
|
|
67
|
-
source: 'validation',
|
|
68
|
-
};
|
|
15
|
+
if (!result) {
|
|
16
|
+
return null;
|
|
69
17
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
18
|
+
const summary = result.message || result.summary || 'Operation completed';
|
|
19
|
+
return {
|
|
20
|
+
summary,
|
|
21
|
+
metadata: {
|
|
22
|
+
action: result.action,
|
|
23
|
+
success: result.success,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
},
|
|
79
27
|
/**
|
|
80
|
-
*
|
|
28
|
+
* Extract summary from orchestration result
|
|
81
29
|
*/
|
|
82
|
-
|
|
30
|
+
extractFromOrchestration(result) {
|
|
31
|
+
if (!result) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const summary = result.message || result.summary || 'Orchestration completed';
|
|
83
35
|
return {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
reasoningSteps: composite.reasoningSteps,
|
|
91
|
-
validationChecks: composite.validationChecks,
|
|
92
|
-
metrics: composite.metrics,
|
|
93
|
-
reviewNeeded: composite.reviewNeeded,
|
|
94
|
-
outcome: composite.outcome,
|
|
95
|
-
errors: composite.errors,
|
|
96
|
-
warnings: composite.warnings,
|
|
36
|
+
summary,
|
|
37
|
+
metadata: {
|
|
38
|
+
success: result.success,
|
|
39
|
+
planId: result.plan?.id,
|
|
40
|
+
executionStatus: result.execution?.status,
|
|
41
|
+
},
|
|
97
42
|
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// Singleton instance
|
|
101
|
-
export const summaryExtractor = new SummaryExtractor();
|
|
43
|
+
},
|
|
44
|
+
};
|
|
102
45
|
//# sourceMappingURL=summary-extractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-extractor.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-extractor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summary-extractor.js","sourceRoot":"","sources":["../../../src/infrastructure/validation/summary-extractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,kBAAkB,CAAC,MAAW;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,qBAAqB,CAAC;QAC1E,OAAO;YACL,OAAO;YACP,QAAQ,EAAE;gBACR,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,wBAAwB,CAAC,MAAW;QAClC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,yBAAyB,CAAC;QAC9E,OAAO;YACL,OAAO;YACP,QAAQ,EAAE;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE;gBACvB,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM;aAC1C;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,72 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Trace Summary
|
|
3
|
+
* Represents execution trace summaries for agents
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* - Files changed
|
|
7
|
-
* - Reasoning steps occurred
|
|
8
|
-
* - Validation checks passed/failed
|
|
9
|
-
* - Tokens used
|
|
10
|
-
* - Where user review is needed
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
import type { AgentFeedback } from './agent-feedback.js';
|
|
14
|
-
export interface TraceSummary {
|
|
7
|
+
export interface TraceSummaryData {
|
|
15
8
|
runId: string;
|
|
16
|
-
operation: string;
|
|
17
9
|
agentName: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
validationChecks: Array<{
|
|
28
|
-
check: string;
|
|
29
|
-
passed: boolean;
|
|
30
|
-
message?: string;
|
|
31
|
-
critical?: boolean;
|
|
10
|
+
operation: string;
|
|
11
|
+
startTime: number;
|
|
12
|
+
endTime?: number;
|
|
13
|
+
success: boolean;
|
|
14
|
+
steps?: Array<{
|
|
15
|
+
step: number;
|
|
16
|
+
description: string;
|
|
17
|
+
status: 'success' | 'failure' | 'skipped';
|
|
18
|
+
duration?: number;
|
|
32
19
|
}>;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
operationsCount: number;
|
|
37
|
-
filesAnalyzed?: number;
|
|
38
|
-
};
|
|
39
|
-
reviewNeeded: {
|
|
40
|
-
required: boolean;
|
|
41
|
-
reasons: string[];
|
|
42
|
-
riskLevel?: 'low' | 'medium' | 'high' | 'critical';
|
|
43
|
-
};
|
|
44
|
-
outcome: 'success' | 'failure' | 'partial_success' | 'needs_review';
|
|
45
|
-
errors?: string[];
|
|
46
|
-
warnings?: string[];
|
|
20
|
+
filesAffected?: string[];
|
|
21
|
+
error?: string;
|
|
22
|
+
metadata?: Record<string, any>;
|
|
47
23
|
}
|
|
48
24
|
/**
|
|
49
|
-
*
|
|
25
|
+
* Trace Summary class
|
|
50
26
|
*/
|
|
51
|
-
export declare class
|
|
27
|
+
export declare class TraceSummary {
|
|
28
|
+
data: TraceSummaryData;
|
|
29
|
+
constructor(data: TraceSummaryData);
|
|
52
30
|
/**
|
|
53
|
-
*
|
|
31
|
+
* Get summary as JSON
|
|
54
32
|
*/
|
|
55
|
-
|
|
33
|
+
toJSON(): TraceSummaryData;
|
|
56
34
|
/**
|
|
57
|
-
*
|
|
35
|
+
* Get duration in milliseconds
|
|
58
36
|
*/
|
|
59
|
-
|
|
60
|
-
private extractFilesChanged;
|
|
61
|
-
private extractFilesCreated;
|
|
62
|
-
private extractFilesDeleted;
|
|
63
|
-
private extractReasoningSteps;
|
|
64
|
-
private extractValidationChecks;
|
|
65
|
-
private calculateMetrics;
|
|
66
|
-
private determineReviewNeeds;
|
|
67
|
-
private determineOutcome;
|
|
68
|
-
private extractErrors;
|
|
69
|
-
private extractWarnings;
|
|
37
|
+
getDuration(): number;
|
|
70
38
|
}
|
|
71
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Format trace summary for display
|
|
41
|
+
*/
|
|
42
|
+
export declare const traceSummaryFormatter: {
|
|
43
|
+
format(summary: TraceSummary): string;
|
|
44
|
+
};
|
|
72
45
|
//# sourceMappingURL=trace-summary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-summary.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/trace-summary.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"trace-summary.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/validation/trace-summary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;QAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,YAAY;IACJ,IAAI,EAAE,gBAAgB;gBAAtB,IAAI,EAAE,gBAAgB;IAEzC;;OAEG;IACH,MAAM,IAAI,gBAAgB;IAI1B;;OAEG;IACH,WAAW,IAAI,MAAM;CAMtB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB;oBAChB,YAAY,GAAG,MAAM;CAoBtC,CAAC"}
|