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,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"}
|
|
@@ -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"}
|