@vfarcic/dot-ai 0.111.0 ā 0.113.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/dist/core/ai-provider-factory.d.ts +0 -10
- package/dist/core/ai-provider-factory.d.ts.map +1 -1
- package/dist/core/ai-provider-factory.js +14 -24
- package/dist/core/ai-provider.interface.d.ts +28 -1
- package/dist/core/ai-provider.interface.d.ts.map +1 -1
- package/dist/core/capabilities.d.ts +1 -1
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/capabilities.js +7 -4
- package/dist/core/capability-scan-workflow.js +2 -2
- package/dist/core/embedding-service.d.ts +35 -2
- package/dist/core/embedding-service.d.ts.map +1 -1
- package/dist/core/embedding-service.js +228 -15
- package/dist/core/model-config.d.ts +23 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +28 -0
- package/dist/core/platform-operations.d.ts.map +1 -1
- package/dist/core/platform-operations.js +3 -5
- package/dist/core/platform-utils.d.ts +13 -2
- package/dist/core/platform-utils.d.ts.map +1 -1
- package/dist/core/platform-utils.js +91 -9
- package/dist/core/providers/anthropic-provider.d.ts +6 -1
- package/dist/core/providers/anthropic-provider.d.ts.map +1 -1
- package/dist/core/providers/anthropic-provider.js +99 -27
- package/dist/core/providers/provider-debug-utils.d.ts +53 -20
- package/dist/core/providers/provider-debug-utils.d.ts.map +1 -1
- package/dist/core/providers/provider-debug-utils.js +106 -51
- package/dist/core/providers/vercel-provider.d.ts +6 -1
- package/dist/core/providers/vercel-provider.d.ts.map +1 -1
- package/dist/core/providers/vercel-provider.js +212 -130
- package/dist/core/schema.d.ts +1 -101
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +20 -154
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +15 -7
- package/dist/evaluation/dataset-analyzer.d.ts +118 -0
- package/dist/evaluation/dataset-analyzer.d.ts.map +1 -0
- package/dist/evaluation/dataset-analyzer.js +234 -0
- package/dist/evaluation/datasets/loader.d.ts +42 -0
- package/dist/evaluation/datasets/loader.d.ts.map +1 -0
- package/dist/evaluation/datasets/loader.js +104 -0
- package/dist/evaluation/eval-runner.d.ts +9 -0
- package/dist/evaluation/eval-runner.d.ts.map +1 -0
- package/dist/evaluation/eval-runner.js +399 -0
- package/dist/evaluation/evaluators/base-comparative.d.ts +94 -0
- package/dist/evaluation/evaluators/base-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/base-comparative.js +187 -0
- package/dist/evaluation/evaluators/base.d.ts +47 -0
- package/dist/evaluation/evaluators/base.d.ts.map +1 -0
- package/dist/evaluation/evaluators/base.js +10 -0
- package/dist/evaluation/evaluators/capability-comparative.d.ts +32 -0
- package/dist/evaluation/evaluators/capability-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/capability-comparative.js +104 -0
- package/dist/evaluation/evaluators/pattern-comparative.d.ts +31 -0
- package/dist/evaluation/evaluators/pattern-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/pattern-comparative.js +97 -0
- package/dist/evaluation/evaluators/policy-comparative.d.ts +31 -0
- package/dist/evaluation/evaluators/policy-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/policy-comparative.js +97 -0
- package/dist/evaluation/evaluators/recommendation-comparative.d.ts +25 -0
- package/dist/evaluation/evaluators/recommendation-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/recommendation-comparative.js +55 -0
- package/dist/evaluation/evaluators/remediation-comparative.d.ts +25 -0
- package/dist/evaluation/evaluators/remediation-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/remediation-comparative.js +54 -0
- package/dist/evaluation/platform-synthesizer.d.ts +54 -0
- package/dist/evaluation/platform-synthesizer.d.ts.map +1 -0
- package/dist/evaluation/platform-synthesizer.js +368 -0
- package/dist/evaluation/run-platform-synthesis.d.ts +9 -0
- package/dist/evaluation/run-platform-synthesis.d.ts.map +1 -0
- package/dist/evaluation/run-platform-synthesis.js +45 -0
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +23 -29
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/tools/answer-question.d.ts +2 -0
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +18 -11
- package/dist/tools/generate-manifests.d.ts +2 -0
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +11 -12
- package/dist/tools/organizational-data.d.ts +1 -0
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +2 -1
- package/dist/tools/recommend.d.ts +1 -0
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +13 -21
- package/dist/tools/remediate.d.ts +3 -0
- package/dist/tools/remediate.d.ts.map +1 -1
- package/dist/tools/remediate.js +35 -14
- package/dist/tools/test-docs.d.ts +1 -0
- package/dist/tools/test-docs.d.ts.map +1 -1
- package/dist/tools/test-docs.js +4 -2
- package/dist/tools/version.d.ts +5 -1
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +23 -8
- package/package.json +19 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { VercelProvider } from '../core/providers/vercel-provider.js';
|
|
2
|
+
export interface ModelPerformance {
|
|
3
|
+
modelId: string;
|
|
4
|
+
provider: string;
|
|
5
|
+
toolScores: Record<string, number>;
|
|
6
|
+
averageScore: number;
|
|
7
|
+
participationRate: number;
|
|
8
|
+
reliabilityScore: number;
|
|
9
|
+
consistencyAcrossTools: number;
|
|
10
|
+
pricing: {
|
|
11
|
+
input_cost_per_million_tokens: number;
|
|
12
|
+
output_cost_per_million_tokens: number;
|
|
13
|
+
};
|
|
14
|
+
capabilities: {
|
|
15
|
+
context_window: number;
|
|
16
|
+
supports_function_calling: boolean;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface DecisionMatrix {
|
|
20
|
+
qualityLeaders: ModelPerformance[];
|
|
21
|
+
speedOptimized: ModelPerformance[];
|
|
22
|
+
costEffective: ModelPerformance[];
|
|
23
|
+
balanced: ModelPerformance[];
|
|
24
|
+
reliabilityFocused: ModelPerformance[];
|
|
25
|
+
}
|
|
26
|
+
export interface UsageRecommendation {
|
|
27
|
+
priority: 'quality-first' | 'speed-first' | 'cost-first' | 'balanced';
|
|
28
|
+
primaryModel: string;
|
|
29
|
+
fallbackModel: string;
|
|
30
|
+
reasoning: string;
|
|
31
|
+
costImplications: string;
|
|
32
|
+
useCases: string[];
|
|
33
|
+
}
|
|
34
|
+
export declare class PlatformSynthesizer {
|
|
35
|
+
private aiProvider;
|
|
36
|
+
private reportsDir;
|
|
37
|
+
constructor(aiProvider: VercelProvider, reportsDir?: string);
|
|
38
|
+
generatePlatformWideAnalysis(): Promise<string>;
|
|
39
|
+
private loadToolMetadata;
|
|
40
|
+
private loadAllReports;
|
|
41
|
+
private analyzeCrossToolPerformance;
|
|
42
|
+
private calculateModelPerformances;
|
|
43
|
+
private generateDecisionMatrices;
|
|
44
|
+
private generateUsageRecommendations;
|
|
45
|
+
private generatePlatformInsights;
|
|
46
|
+
private extractKeyFindings;
|
|
47
|
+
private categorizeModelTiers;
|
|
48
|
+
private identifyCrossToolPatterns;
|
|
49
|
+
private generateProductionRecommendations;
|
|
50
|
+
private calculateCostEstimate;
|
|
51
|
+
private extractBaseModelId;
|
|
52
|
+
saveSynthesisReport(markdownContent: string, outputPath?: string): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=platform-synthesizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-synthesizer.d.ts","sourceRoot":"","sources":["../../src/evaluation/platform-synthesizer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IAC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B,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,iCAAiC;IASzC,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,kBAAkB;IASpB,mBAAmB,CACvB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAiD,GAC1D,OAAO,CAAC,IAAI,CAAC;CAWjB"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PlatformSynthesizer = void 0;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
class PlatformSynthesizer {
|
|
40
|
+
aiProvider;
|
|
41
|
+
reportsDir;
|
|
42
|
+
constructor(aiProvider, reportsDir = './eval/analysis/individual') {
|
|
43
|
+
this.aiProvider = aiProvider;
|
|
44
|
+
this.reportsDir = reportsDir;
|
|
45
|
+
}
|
|
46
|
+
async generatePlatformWideAnalysis() {
|
|
47
|
+
console.log('š Loading all evaluation reports...');
|
|
48
|
+
const allReports = await this.loadAllReports();
|
|
49
|
+
console.log('š§ Loading tool metadata...');
|
|
50
|
+
const toolMetadata = this.loadToolMetadata();
|
|
51
|
+
console.log('š Analyzing cross-tool performance patterns...');
|
|
52
|
+
const crossToolAnalysis = await this.analyzeCrossToolPerformance(allReports);
|
|
53
|
+
console.log('šÆ Generating decision matrices...');
|
|
54
|
+
const decisionMatrices = this.generateDecisionMatrices(crossToolAnalysis.modelPerformances);
|
|
55
|
+
console.log('š” Creating usage recommendations...');
|
|
56
|
+
const usageRecommendations = this.generateUsageRecommendations(crossToolAnalysis, decisionMatrices);
|
|
57
|
+
console.log('š Generating comprehensive AI-powered report...');
|
|
58
|
+
const markdownReport = await this.generatePlatformInsights(crossToolAnalysis, decisionMatrices, usageRecommendations, toolMetadata);
|
|
59
|
+
return markdownReport;
|
|
60
|
+
}
|
|
61
|
+
loadToolMetadata() {
|
|
62
|
+
try {
|
|
63
|
+
const metadataPath = path.join(process.cwd(), 'src', 'evaluation', 'model-metadata.json');
|
|
64
|
+
const metadataContent = fs.readFileSync(metadataPath, 'utf8');
|
|
65
|
+
const metadata = JSON.parse(metadataContent);
|
|
66
|
+
console.log(`ā
Loaded tool metadata with ${Object.keys(metadata.tools || {}).length} tools`);
|
|
67
|
+
return metadata.tools || {};
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.warn('ā ļø Failed to load tool metadata, proceeding without it:', error);
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async loadAllReports() {
|
|
75
|
+
const reports = {};
|
|
76
|
+
// Load all JSON result files from the directory
|
|
77
|
+
const reportFiles = fs.readdirSync(this.reportsDir)
|
|
78
|
+
.filter(file => file.endsWith('-results-*.json') || file.includes('-results-'))
|
|
79
|
+
.filter(file => file.endsWith('.json'));
|
|
80
|
+
if (reportFiles.length === 0) {
|
|
81
|
+
throw new Error(`No evaluation result files found in ${this.reportsDir}`);
|
|
82
|
+
}
|
|
83
|
+
for (const fileName of reportFiles) {
|
|
84
|
+
const reportPath = path.join(this.reportsDir, fileName);
|
|
85
|
+
const reportContent = JSON.parse(fs.readFileSync(reportPath, 'utf8'));
|
|
86
|
+
// Extract tool type from filename (e.g., "capability-results-2025-10-15.json" -> "capability")
|
|
87
|
+
const toolType = fileName.split('-results-')[0];
|
|
88
|
+
reports[toolType] = reportContent;
|
|
89
|
+
console.log(`ā
Loaded ${toolType} report: ${fileName}`);
|
|
90
|
+
}
|
|
91
|
+
console.log(`š Total reports loaded: ${Object.keys(reports).length}`);
|
|
92
|
+
return reports;
|
|
93
|
+
}
|
|
94
|
+
async analyzeCrossToolPerformance(allReports) {
|
|
95
|
+
const modelPerformances = this.calculateModelPerformances(allReports);
|
|
96
|
+
// Calculate cross-tool consistency scores
|
|
97
|
+
const crossToolConsistency = {};
|
|
98
|
+
for (const model of modelPerformances) {
|
|
99
|
+
const scores = Object.values(model.toolScores);
|
|
100
|
+
if (scores.length > 1) {
|
|
101
|
+
const mean = scores.reduce((a, b) => a + b, 0) / scores.length;
|
|
102
|
+
const variance = scores.reduce((sum, score) => sum + Math.pow(score - mean, 2), 0) / scores.length;
|
|
103
|
+
const standardDeviation = Math.sqrt(variance);
|
|
104
|
+
// Lower standard deviation = higher consistency (invert for consistency score)
|
|
105
|
+
crossToolConsistency[model.modelId] = Math.max(0, 1 - (standardDeviation / mean));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Identify tool-specific leaders and universal performers
|
|
109
|
+
const toolSpecificLeaders = {};
|
|
110
|
+
const toolTypes = Object.keys(allReports);
|
|
111
|
+
for (const toolType of toolTypes) {
|
|
112
|
+
const bestModel = modelPerformances
|
|
113
|
+
.filter(m => m.toolScores[toolType] !== undefined)
|
|
114
|
+
.sort((a, b) => b.toolScores[toolType] - a.toolScores[toolType])[0];
|
|
115
|
+
if (bestModel) {
|
|
116
|
+
toolSpecificLeaders[toolType] = bestModel.modelId;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Universal performers = models that rank in top 3 across all tools they participate in
|
|
120
|
+
const universalPerformers = [];
|
|
121
|
+
for (const model of modelPerformances) {
|
|
122
|
+
const participatingTools = Object.keys(model.toolScores);
|
|
123
|
+
let topThreeCount = 0;
|
|
124
|
+
for (const toolType of participatingTools) {
|
|
125
|
+
const ranking = modelPerformances
|
|
126
|
+
.filter(m => m.toolScores[toolType] !== undefined)
|
|
127
|
+
.sort((a, b) => b.toolScores[toolType] - a.toolScores[toolType])
|
|
128
|
+
.findIndex(m => m.modelId === model.modelId);
|
|
129
|
+
if (ranking < 3)
|
|
130
|
+
topThreeCount++;
|
|
131
|
+
}
|
|
132
|
+
if (participatingTools.length >= 3 && topThreeCount >= participatingTools.length * 0.75) {
|
|
133
|
+
universalPerformers.push(model.modelId);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
modelPerformances,
|
|
138
|
+
crossToolConsistency,
|
|
139
|
+
toolSpecificLeaders,
|
|
140
|
+
universalPerformers
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
calculateModelPerformances(allReports) {
|
|
144
|
+
const modelMap = new Map();
|
|
145
|
+
// Process each tool's evaluation results
|
|
146
|
+
for (const [toolType, report] of Object.entries(allReports)) {
|
|
147
|
+
if (!report.overallAssessment?.detailed_analysis)
|
|
148
|
+
continue;
|
|
149
|
+
for (const [modelKey, assessment] of Object.entries(report.overallAssessment.detailed_analysis)) {
|
|
150
|
+
const modelId = modelKey;
|
|
151
|
+
if (!modelMap.has(modelId)) {
|
|
152
|
+
const metadata = report.modelMetadata?.[this.extractBaseModelId(modelId)] || {};
|
|
153
|
+
modelMap.set(modelId, {
|
|
154
|
+
modelId,
|
|
155
|
+
provider: metadata.provider || 'Unknown',
|
|
156
|
+
toolScores: {},
|
|
157
|
+
pricing: metadata.pricing || { input_cost_per_million_tokens: 0, output_cost_per_million_tokens: 0 },
|
|
158
|
+
capabilities: {
|
|
159
|
+
context_window: metadata.context_window || 0,
|
|
160
|
+
supports_function_calling: metadata.supports_function_calling || false
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const modelData = modelMap.get(modelId);
|
|
165
|
+
const assessmentData = assessment;
|
|
166
|
+
// Extract average score for this tool
|
|
167
|
+
if (typeof assessmentData.average_score === 'number') {
|
|
168
|
+
modelData.toolScores[toolType] = assessmentData.average_score;
|
|
169
|
+
}
|
|
170
|
+
// Update participation and reliability metrics
|
|
171
|
+
if (typeof assessmentData.participation_rate === 'number') {
|
|
172
|
+
modelData.participationRate = (modelData.participationRate || 0) + assessmentData.participation_rate;
|
|
173
|
+
}
|
|
174
|
+
if (typeof assessmentData.reliability_score === 'number') {
|
|
175
|
+
modelData.reliabilityScore = (modelData.reliabilityScore || 0) + assessmentData.reliability_score;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Calculate final metrics
|
|
180
|
+
const modelPerformances = [];
|
|
181
|
+
for (const [modelId, data] of modelMap.entries()) {
|
|
182
|
+
const toolCount = Object.keys(data.toolScores).length;
|
|
183
|
+
if (toolCount === 0)
|
|
184
|
+
continue;
|
|
185
|
+
const averageScore = Object.values(data.toolScores).reduce((a, b) => a + b, 0) / toolCount;
|
|
186
|
+
const participationRate = (data.participationRate || 0) / toolCount;
|
|
187
|
+
const reliabilityScore = (data.reliabilityScore || 0) / toolCount;
|
|
188
|
+
// Calculate consistency across tools
|
|
189
|
+
const scores = Object.values(data.toolScores);
|
|
190
|
+
const mean = scores.reduce((a, b) => a + b, 0) / scores.length;
|
|
191
|
+
const variance = scores.reduce((sum, score) => sum + Math.pow(score - mean, 2), 0) / scores.length;
|
|
192
|
+
const consistencyAcrossTools = Math.max(0, 1 - (Math.sqrt(variance) / mean));
|
|
193
|
+
modelPerformances.push({
|
|
194
|
+
modelId,
|
|
195
|
+
provider: data.provider,
|
|
196
|
+
toolScores: data.toolScores,
|
|
197
|
+
averageScore,
|
|
198
|
+
participationRate,
|
|
199
|
+
reliabilityScore,
|
|
200
|
+
consistencyAcrossTools,
|
|
201
|
+
pricing: data.pricing,
|
|
202
|
+
capabilities: data.capabilities
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return modelPerformances.sort((a, b) => b.averageScore - a.averageScore);
|
|
206
|
+
}
|
|
207
|
+
generateDecisionMatrices(modelPerformances) {
|
|
208
|
+
// Sort models by different criteria
|
|
209
|
+
const qualityLeaders = [...modelPerformances]
|
|
210
|
+
.sort((a, b) => b.averageScore - a.averageScore)
|
|
211
|
+
.slice(0, 5);
|
|
212
|
+
const speedOptimized = [...modelPerformances]
|
|
213
|
+
.filter(m => m.pricing.input_cost_per_million_tokens > 0) // Filter out models with no pricing data
|
|
214
|
+
.sort((a, b) => a.pricing.input_cost_per_million_tokens - b.pricing.input_cost_per_million_tokens)
|
|
215
|
+
.slice(0, 5);
|
|
216
|
+
const costEffective = [...modelPerformances]
|
|
217
|
+
.filter(m => m.pricing.input_cost_per_million_tokens > 0 && m.pricing.output_cost_per_million_tokens > 0)
|
|
218
|
+
.map(model => ({
|
|
219
|
+
...model,
|
|
220
|
+
valueScore: model.averageScore / ((model.pricing.input_cost_per_million_tokens + model.pricing.output_cost_per_million_tokens) / 2)
|
|
221
|
+
}))
|
|
222
|
+
.sort((a, b) => b.valueScore - a.valueScore)
|
|
223
|
+
.slice(0, 5);
|
|
224
|
+
const balanced = [...modelPerformances]
|
|
225
|
+
.filter(m => m.pricing.input_cost_per_million_tokens > 0)
|
|
226
|
+
.map(model => ({
|
|
227
|
+
...model,
|
|
228
|
+
balancedScore: (model.averageScore * 0.4) + (model.consistencyAcrossTools * 0.3) +
|
|
229
|
+
(model.reliabilityScore * 0.3) -
|
|
230
|
+
((model.pricing.input_cost_per_million_tokens + model.pricing.output_cost_per_million_tokens) / 100)
|
|
231
|
+
}))
|
|
232
|
+
.sort((a, b) => b.balancedScore - a.balancedScore)
|
|
233
|
+
.slice(0, 5);
|
|
234
|
+
const reliabilityFocused = [...modelPerformances]
|
|
235
|
+
.sort((a, b) => {
|
|
236
|
+
if (b.reliabilityScore !== a.reliabilityScore) {
|
|
237
|
+
return b.reliabilityScore - a.reliabilityScore;
|
|
238
|
+
}
|
|
239
|
+
return b.consistencyAcrossTools - a.consistencyAcrossTools;
|
|
240
|
+
})
|
|
241
|
+
.slice(0, 5);
|
|
242
|
+
return {
|
|
243
|
+
qualityLeaders,
|
|
244
|
+
speedOptimized,
|
|
245
|
+
costEffective,
|
|
246
|
+
balanced,
|
|
247
|
+
reliabilityFocused
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
generateUsageRecommendations(crossToolAnalysis, decisionMatrices) {
|
|
251
|
+
const recommendations = [
|
|
252
|
+
{
|
|
253
|
+
priority: 'quality-first',
|
|
254
|
+
primaryModel: decisionMatrices.qualityLeaders[0]?.modelId || '',
|
|
255
|
+
fallbackModel: decisionMatrices.qualityLeaders[1]?.modelId || '',
|
|
256
|
+
reasoning: 'Optimized for maximum accuracy and completeness across all MCP tools',
|
|
257
|
+
costImplications: `Estimated cost: $${this.calculateCostEstimate(decisionMatrices.qualityLeaders[0])}/1M tokens`,
|
|
258
|
+
useCases: ['Production deployments', 'Critical troubleshooting', 'Complex recommendations']
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
priority: 'cost-first',
|
|
262
|
+
primaryModel: decisionMatrices.costEffective[0]?.modelId || '',
|
|
263
|
+
fallbackModel: decisionMatrices.costEffective[1]?.modelId || '',
|
|
264
|
+
reasoning: 'Best value ratio of performance per dollar spent',
|
|
265
|
+
costImplications: `Estimated cost: $${this.calculateCostEstimate(decisionMatrices.costEffective[0])}/1M tokens`,
|
|
266
|
+
useCases: ['Budget-conscious deployments', 'Frequent operations', 'Cost-sensitive workflows']
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
priority: 'speed-first',
|
|
270
|
+
primaryModel: decisionMatrices.speedOptimized[0]?.modelId || '',
|
|
271
|
+
fallbackModel: decisionMatrices.speedOptimized[1]?.modelId || '',
|
|
272
|
+
reasoning: 'Optimized for fastest response times and lowest latency',
|
|
273
|
+
costImplications: `Estimated cost: $${this.calculateCostEstimate(decisionMatrices.speedOptimized[0])}/1M tokens`,
|
|
274
|
+
useCases: ['Time-sensitive troubleshooting', 'Interactive debugging', 'Rapid prototyping']
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
priority: 'balanced',
|
|
278
|
+
primaryModel: decisionMatrices.balanced[0]?.modelId || '',
|
|
279
|
+
fallbackModel: decisionMatrices.balanced[1]?.modelId || '',
|
|
280
|
+
reasoning: 'Optimal balance of quality, reliability, and cost considerations',
|
|
281
|
+
costImplications: `Estimated cost: $${this.calculateCostEstimate(decisionMatrices.balanced[0])}/1M tokens`,
|
|
282
|
+
useCases: ['General purpose usage', 'Mixed workloads', 'Default recommendation']
|
|
283
|
+
}
|
|
284
|
+
];
|
|
285
|
+
return recommendations;
|
|
286
|
+
}
|
|
287
|
+
async generatePlatformInsights(crossToolAnalysis, decisionMatrices, usageRecommendations, toolMetadata) {
|
|
288
|
+
// Load prompt template from evaluation prompts directory
|
|
289
|
+
const promptPath = path.join(process.cwd(), 'src', 'evaluation', 'prompts', 'platform-synthesis.md');
|
|
290
|
+
const promptTemplate = fs.readFileSync(promptPath, 'utf8');
|
|
291
|
+
const promptWithData = promptTemplate
|
|
292
|
+
.replace('{crossToolAnalysisJson}', JSON.stringify(crossToolAnalysis, null, 2))
|
|
293
|
+
.replace('{decisionMatricesJson}', JSON.stringify(decisionMatrices, null, 2))
|
|
294
|
+
.replace('{usageRecommendationsJson}', JSON.stringify(usageRecommendations, null, 2))
|
|
295
|
+
.replace('{toolMetadataJson}', JSON.stringify(toolMetadata, null, 2));
|
|
296
|
+
const aiResponse = await this.aiProvider.sendMessage(promptWithData);
|
|
297
|
+
return aiResponse.content; // Return the AI-generated markdown directly
|
|
298
|
+
}
|
|
299
|
+
extractKeyFindings(crossToolAnalysis) {
|
|
300
|
+
const findings = [];
|
|
301
|
+
findings.push(`${crossToolAnalysis.modelPerformances.length} models evaluated across ${Object.keys(crossToolAnalysis.toolSpecificLeaders).length} tool types`);
|
|
302
|
+
findings.push(`${crossToolAnalysis.universalPerformers.length} models demonstrated consistent cross-tool performance`);
|
|
303
|
+
// Add performance spread analysis
|
|
304
|
+
const scores = crossToolAnalysis.modelPerformances.map((m) => m.averageScore);
|
|
305
|
+
const maxScore = Math.max(...scores);
|
|
306
|
+
const minScore = Math.min(...scores);
|
|
307
|
+
findings.push(`Performance spread: ${(maxScore - minScore).toFixed(3)} (${maxScore.toFixed(3)} - ${minScore.toFixed(3)})`);
|
|
308
|
+
return findings;
|
|
309
|
+
}
|
|
310
|
+
categorizeModelTiers(modelPerformances) {
|
|
311
|
+
const sorted = [...modelPerformances].sort((a, b) => b.averageScore - a.averageScore);
|
|
312
|
+
// Use reliability score and consistency to determine production readiness
|
|
313
|
+
const productionReady = sorted.filter(m => m.reliabilityScore >= 0.8 && m.consistencyAcrossTools >= 0.7);
|
|
314
|
+
const costOptimized = sorted.filter(m => m.reliabilityScore >= 0.7 &&
|
|
315
|
+
m.consistencyAcrossTools >= 0.6 &&
|
|
316
|
+
!productionReady.includes(m) &&
|
|
317
|
+
(m.pricing.input_cost_per_million_tokens + m.pricing.output_cost_per_million_tokens) < 10);
|
|
318
|
+
const avoidForProduction = sorted.filter(m => !productionReady.includes(m) && !costOptimized.includes(m));
|
|
319
|
+
return {
|
|
320
|
+
'Production Ready': productionReady.map(m => m.modelId),
|
|
321
|
+
'Cost-Optimized': costOptimized.map(m => m.modelId),
|
|
322
|
+
'Avoid for Production': avoidForProduction.map(m => m.modelId)
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
identifyCrossToolPatterns(crossToolAnalysis) {
|
|
326
|
+
return {
|
|
327
|
+
consistencyLeaders: Object.entries(crossToolAnalysis.crossToolConsistency)
|
|
328
|
+
.sort(([, a], [, b]) => b - a)
|
|
329
|
+
.slice(0, 3)
|
|
330
|
+
.map(([model]) => model),
|
|
331
|
+
toolSpecificLeaders: crossToolAnalysis.toolSpecificLeaders,
|
|
332
|
+
universalPerformers: crossToolAnalysis.universalPerformers
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
generateProductionRecommendations(decisionMatrices) {
|
|
336
|
+
return {
|
|
337
|
+
'Primary Production Model': decisionMatrices.qualityLeaders[0]?.modelId || 'None',
|
|
338
|
+
'Cost-Optimized Alternative': decisionMatrices.costEffective[0]?.modelId || 'None',
|
|
339
|
+
'High-Reliability Option': decisionMatrices.reliabilityFocused[0]?.modelId || 'None',
|
|
340
|
+
'Balanced General Use': decisionMatrices.balanced[0]?.modelId || 'None'
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
calculateCostEstimate(model) {
|
|
344
|
+
if (!model || !model.pricing.input_cost_per_million_tokens)
|
|
345
|
+
return '0.00';
|
|
346
|
+
// Estimate average cost per 1M tokens (assuming 50% input, 50% output)
|
|
347
|
+
const avgCost = (model.pricing.input_cost_per_million_tokens + model.pricing.output_cost_per_million_tokens) / 2;
|
|
348
|
+
return avgCost.toFixed(2);
|
|
349
|
+
}
|
|
350
|
+
extractBaseModelId(fullModelId) {
|
|
351
|
+
// Extract base model from full ID like "vercel_claude-sonnet-4-5-20250929_2025-10-15"
|
|
352
|
+
const parts = fullModelId.split('_');
|
|
353
|
+
if (parts.length >= 2) {
|
|
354
|
+
return parts[1]; // Return the middle part (actual model name)
|
|
355
|
+
}
|
|
356
|
+
return fullModelId;
|
|
357
|
+
}
|
|
358
|
+
async saveSynthesisReport(markdownContent, outputPath = './eval/analysis/platform/synthesis-report.md') {
|
|
359
|
+
const dir = path.dirname(outputPath);
|
|
360
|
+
if (!fs.existsSync(dir)) {
|
|
361
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
362
|
+
}
|
|
363
|
+
// Save the AI-generated markdown directly
|
|
364
|
+
fs.writeFileSync(outputPath, markdownContent);
|
|
365
|
+
console.log(`ā
Platform synthesis report saved: ${outputPath}`);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
exports.PlatformSynthesizer = PlatformSynthesizer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Platform-Wide AI Model Synthesis Runner
|
|
4
|
+
*
|
|
5
|
+
* Executes comprehensive cross-tool analysis using all individual evaluation reports
|
|
6
|
+
* Generates platform-wide insights, decision matrices, and usage recommendations
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=run-platform-synthesis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-platform-synthesis.d.ts","sourceRoot":"","sources":["../../src/evaluation/run-platform-synthesis.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Platform-Wide AI Model Synthesis Runner
|
|
5
|
+
*
|
|
6
|
+
* Executes comprehensive cross-tool analysis using all individual evaluation reports
|
|
7
|
+
* Generates platform-wide insights, decision matrices, and usage recommendations
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const platform_synthesizer_js_1 = require("./platform-synthesizer.js");
|
|
11
|
+
const vercel_provider_js_1 = require("../core/providers/vercel-provider.js");
|
|
12
|
+
const model_config_js_1 = require("../core/model-config.js");
|
|
13
|
+
async function runPlatformSynthesis() {
|
|
14
|
+
console.log('š Starting Platform-Wide AI Model Synthesis...\n');
|
|
15
|
+
try {
|
|
16
|
+
// Initialize AI provider for synthesis analysis (use Claude for comprehensive analysis)
|
|
17
|
+
const aiProvider = new vercel_provider_js_1.VercelProvider({
|
|
18
|
+
provider: 'anthropic',
|
|
19
|
+
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
20
|
+
model: (0, model_config_js_1.getCurrentModel)('anthropic'),
|
|
21
|
+
debugMode: process.env.DEBUG_DOT_AI === 'true'
|
|
22
|
+
});
|
|
23
|
+
// Initialize synthesizer
|
|
24
|
+
const synthesizer = new platform_synthesizer_js_1.PlatformSynthesizer(aiProvider);
|
|
25
|
+
// Generate comprehensive platform-wide analysis
|
|
26
|
+
console.log('š Generating platform-wide analysis...');
|
|
27
|
+
const markdownReport = await synthesizer.generatePlatformWideAnalysis();
|
|
28
|
+
// Save synthesis report
|
|
29
|
+
console.log('\nš¾ Saving synthesis report...');
|
|
30
|
+
await synthesizer.saveSynthesisReport(markdownReport);
|
|
31
|
+
console.log('\nā
Platform-wide synthesis complete!');
|
|
32
|
+
console.log('š Report saved: ./eval/analysis/platform/synthesis-report.md');
|
|
33
|
+
console.log('\n⨠AI-generated comprehensive report includes:');
|
|
34
|
+
console.log(' ⢠Detailed model profiles with strengths/weaknesses');
|
|
35
|
+
console.log(' ⢠Production recommendations by priority');
|
|
36
|
+
console.log(' ⢠Cross-tool performance insights');
|
|
37
|
+
console.log(' ⢠Critical warnings and actionable guidance');
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
console.error('ā Platform synthesis failed:', error);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// Run synthesis
|
|
45
|
+
runPlatformSynthesis();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/interfaces/mcp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/interfaces/mcp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AA8CtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CACxC;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,UAAU,CAAC,CAAkC;IACrD,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe;IAsCjD;;OAEG;IACH,OAAO,CAAC,YAAY;IAsBpB;;OAEG;IACH,OAAO,CAAC,aAAa;IA4HrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,iBAAiB;IAInB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAkBd,mBAAmB;YAMnB,kBAAkB;YAiFlB,gBAAgB;IAexB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,OAAO,IAAI,OAAO;CAGnB"}
|
package/dist/interfaces/mcp.js
CHANGED
|
@@ -19,15 +19,12 @@ const version_1 = require("../tools/version");
|
|
|
19
19
|
const test_docs_1 = require("../tools/test-docs");
|
|
20
20
|
const organizational_data_1 = require("../tools/organizational-data");
|
|
21
21
|
const remediate_1 = require("../tools/remediate");
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
handleBuildPlatformTool,
|
|
29
|
-
} from '../tools/build-platform';
|
|
30
|
-
*/
|
|
22
|
+
// import {
|
|
23
|
+
// BUILD_PLATFORM_TOOL_NAME,
|
|
24
|
+
// BUILD_PLATFORM_TOOL_DESCRIPTION,
|
|
25
|
+
// BUILD_PLATFORM_TOOL_INPUT_SCHEMA,
|
|
26
|
+
// handleBuildPlatformTool,
|
|
27
|
+
// } from '../tools/build-platform';
|
|
31
28
|
const prompts_1 = require("../tools/prompts");
|
|
32
29
|
const rest_registry_1 = require("./rest-registry");
|
|
33
30
|
const rest_api_1 = require("./rest-api");
|
|
@@ -125,33 +122,30 @@ class MCPServer {
|
|
|
125
122
|
this.logger.info(`Processing ${remediate_1.REMEDIATE_TOOL_NAME} tool request`, { requestId });
|
|
126
123
|
return await (0, remediate_1.handleRemediateTool)(args);
|
|
127
124
|
}, 'Troubleshooting', ['remediation', 'troubleshooting', 'kubernetes', 'analysis']);
|
|
128
|
-
/*
|
|
129
|
-
// DEVELOPER NOTE: buildPlatform tool disabled - under active development with incomplete functionality
|
|
130
125
|
// Register buildPlatform tool
|
|
131
|
-
this.registerTool(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
);
|
|
146
|
-
*/
|
|
126
|
+
// this.registerTool(
|
|
127
|
+
// BUILD_PLATFORM_TOOL_NAME,
|
|
128
|
+
// BUILD_PLATFORM_TOOL_DESCRIPTION,
|
|
129
|
+
// BUILD_PLATFORM_TOOL_INPUT_SCHEMA,
|
|
130
|
+
// async (args: any) => {
|
|
131
|
+
// const requestId = this.generateRequestId();
|
|
132
|
+
// this.logger.info(
|
|
133
|
+
// `Processing ${BUILD_PLATFORM_TOOL_NAME} tool request`,
|
|
134
|
+
// { requestId }
|
|
135
|
+
// );
|
|
136
|
+
// return await handleBuildPlatformTool(args, this.dotAI, this.logger, requestId);
|
|
137
|
+
// },
|
|
138
|
+
// 'Platform',
|
|
139
|
+
// ['platform', 'kubernetes', 'installation', 'infrastructure']
|
|
140
|
+
// );
|
|
147
141
|
this.logger.info('Registered all tools with McpServer', {
|
|
148
142
|
tools: [
|
|
149
143
|
recommend_1.RECOMMEND_TOOL_NAME,
|
|
150
144
|
version_1.VERSION_TOOL_NAME,
|
|
151
145
|
test_docs_1.TESTDOCS_TOOL_NAME,
|
|
152
146
|
organizational_data_1.ORGANIZATIONAL_DATA_TOOL_NAME,
|
|
153
|
-
remediate_1.REMEDIATE_TOOL_NAME
|
|
154
|
-
// BUILD_PLATFORM_TOOL_NAME,
|
|
147
|
+
remediate_1.REMEDIATE_TOOL_NAME
|
|
148
|
+
// BUILD_PLATFORM_TOOL_NAME,
|
|
155
149
|
],
|
|
156
150
|
totalTools: 5,
|
|
157
151
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.d.ts","sourceRoot":"","sources":["../../src/interfaces/rest-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC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,GAAG,OAAO,CAAC,IAAI,CAAC;IA+EzF;;OAEG;IACH,OAAO,CAAC,YAAY;IAmCpB;;OAEG;YACW,mBAAmB;IA2CjC;;OAEG;YACW,mBAAmB;IA+FjC;;OAEG;YACW,iBAAiB;IA8B/B;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;YACW,gBAAgB;IAK9B;;OAEG;YACW,iBAAiB;IAyB/B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,SAAS,IAAI,aAAa;CAG3B"}
|
|
@@ -10,6 +10,7 @@ export declare const ANSWERQUESTION_TOOL_INPUT_SCHEMA: {
|
|
|
10
10
|
solutionId: z.ZodString;
|
|
11
11
|
stage: z.ZodEnum<["required", "basic", "advanced", "open"]>;
|
|
12
12
|
answers: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
13
|
+
interaction_id: z.ZodOptional<z.ZodString>;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* Direct MCP tool handler for answerQuestion functionality
|
|
@@ -18,6 +19,7 @@ export declare function handleAnswerQuestionTool(args: {
|
|
|
18
19
|
solutionId: string;
|
|
19
20
|
stage: 'required' | 'basic' | 'advanced' | 'open';
|
|
20
21
|
answers: Record<string, any>;
|
|
22
|
+
interaction_id?: string;
|
|
21
23
|
}, dotAI: DotAI, logger: Logger, requestId: string): Promise<{
|
|
22
24
|
content: {
|
|
23
25
|
type: 'text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC;;;;;CAK5C,CAAC;AA0iBF;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,EACtI,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAqUxD"}
|