@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.
Files changed (95) hide show
  1. package/dist/core/ai-provider-factory.d.ts +0 -10
  2. package/dist/core/ai-provider-factory.d.ts.map +1 -1
  3. package/dist/core/ai-provider-factory.js +14 -24
  4. package/dist/core/ai-provider.interface.d.ts +28 -1
  5. package/dist/core/ai-provider.interface.d.ts.map +1 -1
  6. package/dist/core/capabilities.d.ts +1 -1
  7. package/dist/core/capabilities.d.ts.map +1 -1
  8. package/dist/core/capabilities.js +7 -4
  9. package/dist/core/capability-scan-workflow.js +2 -2
  10. package/dist/core/embedding-service.d.ts +35 -2
  11. package/dist/core/embedding-service.d.ts.map +1 -1
  12. package/dist/core/embedding-service.js +228 -15
  13. package/dist/core/model-config.d.ts +23 -0
  14. package/dist/core/model-config.d.ts.map +1 -0
  15. package/dist/core/model-config.js +28 -0
  16. package/dist/core/platform-operations.d.ts.map +1 -1
  17. package/dist/core/platform-operations.js +3 -5
  18. package/dist/core/platform-utils.d.ts +13 -2
  19. package/dist/core/platform-utils.d.ts.map +1 -1
  20. package/dist/core/platform-utils.js +91 -9
  21. package/dist/core/providers/anthropic-provider.d.ts +6 -1
  22. package/dist/core/providers/anthropic-provider.d.ts.map +1 -1
  23. package/dist/core/providers/anthropic-provider.js +99 -27
  24. package/dist/core/providers/provider-debug-utils.d.ts +53 -20
  25. package/dist/core/providers/provider-debug-utils.d.ts.map +1 -1
  26. package/dist/core/providers/provider-debug-utils.js +106 -51
  27. package/dist/core/providers/vercel-provider.d.ts +6 -1
  28. package/dist/core/providers/vercel-provider.d.ts.map +1 -1
  29. package/dist/core/providers/vercel-provider.js +212 -130
  30. package/dist/core/schema.d.ts +1 -101
  31. package/dist/core/schema.d.ts.map +1 -1
  32. package/dist/core/schema.js +20 -154
  33. package/dist/core/unified-creation-session.d.ts.map +1 -1
  34. package/dist/core/unified-creation-session.js +15 -7
  35. package/dist/evaluation/dataset-analyzer.d.ts +118 -0
  36. package/dist/evaluation/dataset-analyzer.d.ts.map +1 -0
  37. package/dist/evaluation/dataset-analyzer.js +234 -0
  38. package/dist/evaluation/datasets/loader.d.ts +42 -0
  39. package/dist/evaluation/datasets/loader.d.ts.map +1 -0
  40. package/dist/evaluation/datasets/loader.js +104 -0
  41. package/dist/evaluation/eval-runner.d.ts +9 -0
  42. package/dist/evaluation/eval-runner.d.ts.map +1 -0
  43. package/dist/evaluation/eval-runner.js +399 -0
  44. package/dist/evaluation/evaluators/base-comparative.d.ts +94 -0
  45. package/dist/evaluation/evaluators/base-comparative.d.ts.map +1 -0
  46. package/dist/evaluation/evaluators/base-comparative.js +187 -0
  47. package/dist/evaluation/evaluators/base.d.ts +47 -0
  48. package/dist/evaluation/evaluators/base.d.ts.map +1 -0
  49. package/dist/evaluation/evaluators/base.js +10 -0
  50. package/dist/evaluation/evaluators/capability-comparative.d.ts +32 -0
  51. package/dist/evaluation/evaluators/capability-comparative.d.ts.map +1 -0
  52. package/dist/evaluation/evaluators/capability-comparative.js +104 -0
  53. package/dist/evaluation/evaluators/pattern-comparative.d.ts +31 -0
  54. package/dist/evaluation/evaluators/pattern-comparative.d.ts.map +1 -0
  55. package/dist/evaluation/evaluators/pattern-comparative.js +97 -0
  56. package/dist/evaluation/evaluators/policy-comparative.d.ts +31 -0
  57. package/dist/evaluation/evaluators/policy-comparative.d.ts.map +1 -0
  58. package/dist/evaluation/evaluators/policy-comparative.js +97 -0
  59. package/dist/evaluation/evaluators/recommendation-comparative.d.ts +25 -0
  60. package/dist/evaluation/evaluators/recommendation-comparative.d.ts.map +1 -0
  61. package/dist/evaluation/evaluators/recommendation-comparative.js +55 -0
  62. package/dist/evaluation/evaluators/remediation-comparative.d.ts +25 -0
  63. package/dist/evaluation/evaluators/remediation-comparative.d.ts.map +1 -0
  64. package/dist/evaluation/evaluators/remediation-comparative.js +54 -0
  65. package/dist/evaluation/platform-synthesizer.d.ts +54 -0
  66. package/dist/evaluation/platform-synthesizer.d.ts.map +1 -0
  67. package/dist/evaluation/platform-synthesizer.js +368 -0
  68. package/dist/evaluation/run-platform-synthesis.d.ts +9 -0
  69. package/dist/evaluation/run-platform-synthesis.d.ts.map +1 -0
  70. package/dist/evaluation/run-platform-synthesis.js +45 -0
  71. package/dist/interfaces/mcp.d.ts.map +1 -1
  72. package/dist/interfaces/mcp.js +23 -29
  73. package/dist/interfaces/rest-api.d.ts.map +1 -1
  74. package/dist/tools/answer-question.d.ts +2 -0
  75. package/dist/tools/answer-question.d.ts.map +1 -1
  76. package/dist/tools/answer-question.js +18 -11
  77. package/dist/tools/generate-manifests.d.ts +2 -0
  78. package/dist/tools/generate-manifests.d.ts.map +1 -1
  79. package/dist/tools/generate-manifests.js +11 -12
  80. package/dist/tools/organizational-data.d.ts +1 -0
  81. package/dist/tools/organizational-data.d.ts.map +1 -1
  82. package/dist/tools/organizational-data.js +2 -1
  83. package/dist/tools/recommend.d.ts +1 -0
  84. package/dist/tools/recommend.d.ts.map +1 -1
  85. package/dist/tools/recommend.js +13 -21
  86. package/dist/tools/remediate.d.ts +3 -0
  87. package/dist/tools/remediate.d.ts.map +1 -1
  88. package/dist/tools/remediate.js +35 -14
  89. package/dist/tools/test-docs.d.ts +1 -0
  90. package/dist/tools/test-docs.d.ts.map +1 -1
  91. package/dist/tools/test-docs.js +4 -2
  92. package/dist/tools/version.d.ts +5 -1
  93. package/dist/tools/version.d.ts.map +1 -1
  94. package/dist/tools/version.js +23 -8
  95. package/package.json +19 -1
@@ -5,54 +5,19 @@
5
5
  * Implements AIProvider interface using Vercel AI SDK.
6
6
  * Supports OpenAI and Google Gemini providers through unified interface.
7
7
  */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
8
  Object.defineProperty(exports, "__esModule", { value: true });
42
9
  exports.VercelProvider = void 0;
43
10
  const ai_1 = require("ai");
44
11
  const openai_1 = require("@ai-sdk/openai");
45
12
  const google_1 = require("@ai-sdk/google");
46
13
  const anthropic_1 = require("@ai-sdk/anthropic");
14
+ const xai_1 = require("@ai-sdk/xai");
15
+ const mistral_1 = require("@ai-sdk/mistral");
16
+ const deepseek_1 = require("@ai-sdk/deepseek");
47
17
  const provider_debug_utils_1 = require("./provider-debug-utils");
48
- /**
49
- * Provider-specific default models
50
- */
51
- const PROVIDER_MODELS = {
52
- openai: 'gpt-5',
53
- google: 'gemini-2.5-pro',
54
- anthropic: 'claude-sonnet-4-5-20250929'
55
- };
18
+ const model_config_1 = require("../model-config");
19
+ // Get all supported provider keys dynamically from CURRENT_MODELS
20
+ const SUPPORTED_PROVIDERS = Object.keys(model_config_1.CURRENT_MODELS);
56
21
  class VercelProvider {
57
22
  providerType;
58
23
  model;
@@ -71,37 +36,47 @@ class VercelProvider {
71
36
  if (!this.apiKey) {
72
37
  throw new Error(`API key is required for ${this.providerType} provider`);
73
38
  }
74
- if (!['openai', 'google', 'anthropic'].includes(this.providerType)) {
75
- throw new Error(`Unsupported provider: ${this.providerType}. Must be 'openai', 'google', or 'anthropic'`);
39
+ if (!SUPPORTED_PROVIDERS.includes(this.providerType)) {
40
+ throw new Error(`Unsupported provider: ${this.providerType}. Must be one of: ${SUPPORTED_PROVIDERS.join(', ')}`);
76
41
  }
77
42
  }
78
43
  initializeModel() {
79
44
  try {
45
+ let provider;
80
46
  switch (this.providerType) {
81
- case 'openai': {
82
- const provider = (0, openai_1.createOpenAI)({
83
- apiKey: this.apiKey
84
- });
85
- this.modelInstance = provider(this.model);
47
+ case 'openai':
48
+ case 'openai_pro':
49
+ provider = (0, openai_1.createOpenAI)({ apiKey: this.apiKey });
86
50
  break;
87
- }
88
- case 'google': {
89
- const provider = (0, google_1.createGoogleGenerativeAI)({
90
- apiKey: this.apiKey
91
- });
92
- this.modelInstance = provider(this.model);
51
+ case 'google':
52
+ case 'google_fast':
53
+ provider = (0, google_1.createGoogleGenerativeAI)({ apiKey: this.apiKey });
93
54
  break;
94
- }
95
- case 'anthropic': {
96
- const provider = (0, anthropic_1.createAnthropic)({
97
- apiKey: this.apiKey
55
+ case 'anthropic':
56
+ case 'anthropic_haiku':
57
+ provider = (0, anthropic_1.createAnthropic)({
58
+ apiKey: this.apiKey,
59
+ // Enable 1M token context window for Claude Sonnet 4 (5x increase from 200K)
60
+ // Required for models like claude-sonnet-4-5-20250929
61
+ headers: {
62
+ 'anthropic-beta': 'context-1m-2025-08-07'
63
+ }
98
64
  });
99
- this.modelInstance = provider(this.model);
100
65
  break;
101
- }
66
+ case 'xai':
67
+ case 'xai_fast':
68
+ provider = (0, xai_1.createXai)({ apiKey: this.apiKey });
69
+ break;
70
+ case 'mistral':
71
+ provider = (0, mistral_1.createMistral)({ apiKey: this.apiKey });
72
+ break;
73
+ case 'deepseek':
74
+ provider = (0, deepseek_1.createDeepSeek)({ apiKey: this.apiKey });
75
+ break;
102
76
  default:
103
77
  throw new Error(`Cannot initialize model for provider: ${this.providerType}`);
104
78
  }
79
+ this.modelInstance = provider(this.model);
105
80
  }
106
81
  catch (error) {
107
82
  throw new Error(`Failed to initialize ${this.providerType} model: ${error}`);
@@ -111,43 +86,46 @@ class VercelProvider {
111
86
  return 'vercel';
112
87
  }
113
88
  getDefaultModel() {
114
- return PROVIDER_MODELS[this.providerType];
89
+ return model_config_1.CURRENT_MODELS[this.providerType];
90
+ }
91
+ getModelName() {
92
+ return this.model;
93
+ }
94
+ getSDKProvider() {
95
+ return this.providerType;
115
96
  }
116
97
  isInitialized() {
117
98
  return this.modelInstance !== undefined;
118
99
  }
119
- logDebugIfEnabled(operation, prompt, response, durationMs) {
100
+ logDebugIfEnabled(operation, prompt, response) {
120
101
  if (!this.debugMode)
121
- return;
102
+ return null;
122
103
  const debugId = (0, provider_debug_utils_1.generateDebugId)(operation);
123
104
  (0, provider_debug_utils_1.debugLogInteraction)(debugId, prompt, response, operation, this.getProviderType(), this.model, this.debugMode);
124
- // Use logMetrics for sendMessage calls (simple token structure, no extended metrics)
125
- (0, provider_debug_utils_1.logMetrics)(operation, this.getProviderType(), {
126
- totalTokens: {
127
- input: response.usage.input_tokens,
128
- output: response.usage.output_tokens,
129
- cacheCreation: response.usage.cache_creation_input_tokens,
130
- cacheRead: response.usage.cache_read_input_tokens
131
- }
132
- }, durationMs, this.debugMode);
105
+ // Return the actual debug file names created
106
+ return {
107
+ promptFile: `${debugId}_prompt.md`,
108
+ responseFile: `${debugId}_response.md`
109
+ };
133
110
  }
134
- async sendMessage(message, operation = 'generic') {
111
+ async sendMessage(message, operation = 'generic', evaluationContext) {
135
112
  if (!this.isInitialized()) {
136
113
  throw new Error(`${this.providerType} provider not initialized`);
137
114
  }
138
115
  const startTime = Date.now();
139
116
  try {
140
117
  // Use Vercel AI SDK generateText
141
- // Note: maxTokens omitted - let SDK/provider use model-specific optimal defaults
118
+ // Set maxOutputTokens to 8192 for better support of comprehensive responses
142
119
  const result = await (0, ai_1.generateText)({
143
120
  model: this.modelInstance,
144
121
  prompt: message,
122
+ maxOutputTokens: 8192, // Increased from default 4096 to support longer responses
145
123
  });
146
124
  const response = {
147
125
  content: result.text,
148
126
  usage: {
149
- input_tokens: result.usage.inputTokens || 0,
150
- output_tokens: result.usage.outputTokens || 0
127
+ input_tokens: (result.totalUsage || result.usage).inputTokens || 0,
128
+ output_tokens: (result.totalUsage || result.usage).outputTokens || 0
151
129
  }
152
130
  };
153
131
  const durationMs = Date.now() - startTime;
@@ -155,18 +133,63 @@ class VercelProvider {
155
133
  if (this.debugMode) {
156
134
  const debugId = (0, provider_debug_utils_1.generateDebugId)(operation);
157
135
  (0, provider_debug_utils_1.debugLogInteraction)(debugId, message, response, operation, this.getProviderType(), this.model, this.debugMode);
158
- (0, provider_debug_utils_1.logMetrics)(operation, this.getProviderType(), {
159
- totalTokens: {
160
- input: response.usage.input_tokens,
161
- output: response.usage.output_tokens,
162
- cacheCreation: response.usage.cache_creation_input_tokens,
163
- cacheRead: response.usage.cache_read_input_tokens
164
- }
165
- }, durationMs, this.debugMode);
136
+ // PRD #154: Always use new evaluation dataset system
137
+ const evaluationMetrics = {
138
+ // Core execution data
139
+ operation,
140
+ sdk: this.getProviderType(),
141
+ inputTokens: response.usage.input_tokens,
142
+ outputTokens: response.usage.output_tokens,
143
+ durationMs,
144
+ // Required fields
145
+ iterationCount: 1,
146
+ toolCallCount: 0,
147
+ status: 'completed',
148
+ completionReason: 'stop',
149
+ modelVersion: this.model,
150
+ // Required evaluation context - NO DEFAULTS, must be provided
151
+ test_scenario: operation,
152
+ ai_response_summary: response.content,
153
+ user_intent: evaluationContext?.user_intent || '',
154
+ interaction_id: evaluationContext?.interaction_id || '',
155
+ // Optional performance data
156
+ ...(response.usage.cache_creation_input_tokens && { cacheCreationTokens: response.usage.cache_creation_input_tokens }),
157
+ ...(response.usage.cache_read_input_tokens && { cacheReadTokens: response.usage.cache_read_input_tokens })
158
+ };
159
+ // Calculate cache hit rate if applicable
160
+ if (response.usage.cache_read_input_tokens && response.usage.input_tokens > 0) {
161
+ evaluationMetrics.cacheHitRate = Math.round((response.usage.cache_read_input_tokens / response.usage.input_tokens) * 100);
162
+ }
163
+ (0, provider_debug_utils_1.logEvaluationDataset)(evaluationMetrics, this.debugMode);
166
164
  }
167
165
  return response;
168
166
  }
169
167
  catch (error) {
168
+ // Generate dataset for failed AI interaction
169
+ if (this.debugMode && evaluationContext) {
170
+ const failureMetrics = {
171
+ operation,
172
+ user_intent: evaluationContext.user_intent || '',
173
+ ai_response_summary: `Error: ${error instanceof Error ? error.message : String(error)}`,
174
+ durationMs: Date.now() - startTime,
175
+ inputTokens: 0,
176
+ outputTokens: 0,
177
+ iterationCount: 0,
178
+ toolCallCount: 0,
179
+ status: 'failed',
180
+ completionReason: 'error',
181
+ sdk: this.getProviderType(),
182
+ modelVersion: this.model,
183
+ test_scenario: operation,
184
+ interaction_id: evaluationContext.interaction_id || (0, provider_debug_utils_1.generateDebugId)(operation),
185
+ failure_analysis: {
186
+ failure_type: "error",
187
+ failure_reason: `${this.providerType} API error: ${error instanceof Error ? error.message : String(error)}`,
188
+ time_to_failure: Date.now() - startTime
189
+ }
190
+ };
191
+ (0, provider_debug_utils_1.logEvaluationDataset)(failureMetrics, this.debugMode);
192
+ }
170
193
  throw new Error(`${this.providerType} API error: ${error}`);
171
194
  }
172
195
  }
@@ -204,7 +227,7 @@ class VercelProvider {
204
227
  });
205
228
  // Add cache control ONLY to last tool for Anthropic (max 4 cache breakpoints)
206
229
  // This caches the system prompt + all tools together
207
- if (this.providerType === 'anthropic' && isLastTool) {
230
+ if ((this.providerType === 'anthropic' || this.providerType === 'anthropic_haiku') && isLastTool) {
208
231
  toolDef.providerOptions = {
209
232
  anthropic: {
210
233
  cacheControl: { type: 'ephemeral' }
@@ -224,7 +247,7 @@ class VercelProvider {
224
247
  // Anthropic caching requires system messages in messages array with providerOptions
225
248
  const messages = [];
226
249
  let systemParam;
227
- if (this.providerType === 'anthropic') {
250
+ if (this.providerType === 'anthropic' || this.providerType === 'anthropic_haiku') {
228
251
  // For Anthropic: Put system in messages array with cacheControl
229
252
  messages.push({
230
253
  role: 'system',
@@ -265,54 +288,93 @@ class VercelProvider {
265
288
  model: this.modelInstance,
266
289
  messages,
267
290
  tools,
268
- stopWhen: (0, ai_1.stepCountIs)(maxIterations)
291
+ stopWhen: (0, ai_1.stepCountIs)(maxIterations),
292
+ maxOutputTokens: 8192 // Increased from default 4096 to support longer responses
269
293
  };
270
294
  // Add system parameter for non-Anthropic providers
271
295
  if (systemParam) {
272
296
  generateConfig.system = systemParam;
273
297
  }
274
298
  const result = await (0, ai_1.generateText)(generateConfig);
275
- // Debug: Log the full cumulative context that was actually sent to the AI
276
- if (this.debugMode && result.response?.messages) {
277
- const path = await Promise.resolve().then(() => __importStar(require('path')));
278
- const debugId = (0, provider_debug_utils_1.generateDebugId)(`${operation}-final-context`);
279
- const debugDir = path.join(process.cwd(), 'tmp', 'debug-ai');
280
- const contextFile = path.join(debugDir, `${debugId}_full-context.md`);
281
- // Build full conversation history representation
282
- const messages = result.response.messages;
283
- const contextParts = [`# Full Conversation Context - ${operation}\n`];
284
- contextParts.push(`\nTimestamp: ${new Date().toISOString()}`);
285
- contextParts.push(`Provider: ${this.getProviderType()}`);
286
- contextParts.push(`Model: ${this.model}`);
287
- contextParts.push(`Total Messages: ${messages.length}`);
288
- contextParts.push(`Total Steps: ${result.steps?.length || 0}`);
289
- contextParts.push('\n---\n');
290
- for (let i = 0; i < messages.length; i++) {
291
- const msg = messages[i];
292
- contextParts.push(`\n## Message ${i + 1} - Role: ${msg.role}\n`);
293
- if (typeof msg.content === 'string') {
294
- contextParts.push(msg.content);
295
- }
296
- else if (Array.isArray(msg.content)) {
297
- for (const part of msg.content) {
298
- if (part.type === 'text') {
299
- contextParts.push(part.text || '');
300
- }
301
- else if (part.type === 'tool-call') {
302
- contextParts.push(`\n[TOOL CALL: ${part.toolName}]`);
303
- contextParts.push(JSON.stringify(part.args, null, 2));
304
- }
305
- else if (part.type === 'tool-result') {
306
- contextParts.push(`\n[TOOL RESULT: ${part.toolName}]`);
307
- const resultData = part.output || part.result || part.content || part;
308
- contextParts.push(JSON.stringify(resultData, null, 2));
309
- }
299
+ // Log raw response immediately after generation (before any processing)
300
+ let debugFiles = null;
301
+ if (this.debugMode) {
302
+ // Build the full conversation context like Anthropic provider does
303
+ let finalPrompt = `System: ${config.systemPrompt}\n\n`;
304
+ // Always include the original user intent first
305
+ finalPrompt += `user: ${config.userMessage}\n\n`;
306
+ // Then add the conversation history if available
307
+ if (result.response?.messages) {
308
+ finalPrompt += result.response.messages
309
+ .map(msg => {
310
+ if (typeof msg.content === 'string') {
311
+ return `${msg.role}: ${msg.content}`;
312
+ }
313
+ else if (Array.isArray(msg.content)) {
314
+ const contentParts = msg.content.map(part => {
315
+ if (part.type === 'text') {
316
+ return part.text;
317
+ }
318
+ else if (part.type === 'tool-call') {
319
+ return `[TOOL_USE: ${part.toolName}]`;
320
+ }
321
+ else if (part.type === 'tool-result') {
322
+ const resultData = part.output || part.result || part.content;
323
+ if (typeof resultData === 'string') {
324
+ return `[TOOL_RESULT: ${part.toolName}]\n${resultData}`;
325
+ }
326
+ else if (resultData) {
327
+ return `[TOOL_RESULT: ${part.toolName}]\n${JSON.stringify(resultData, null, 2)}`;
328
+ }
329
+ return `[TOOL_RESULT: ${part.toolName}]`;
330
+ }
331
+ return `[${part.type}]`;
332
+ }).join(' ');
333
+ return `${msg.role}: ${contentParts}`;
334
+ }
335
+ return `${msg.role}: [complex_content]`;
336
+ })
337
+ .join('\n\n');
338
+ }
339
+ // Create raw response content that includes ALL data from result
340
+ let rawResponseContent = `# RAW RESPONSE DATA\n\n`;
341
+ rawResponseContent += `**result.text**: ${result.text || '[EMPTY]'}\n\n`;
342
+ if (result.steps && result.steps.length > 0) {
343
+ rawResponseContent += `**Steps (${result.steps.length})**:\n`;
344
+ result.steps.forEach((step, i) => {
345
+ rawResponseContent += `\nStep ${i + 1}:\n`;
346
+ rawResponseContent += `- text: ${step.text || '[EMPTY]'}\n`;
347
+ if (step.toolCalls) {
348
+ rawResponseContent += `- toolCalls: ${step.toolCalls.length}\n`;
349
+ }
350
+ if (step.toolResults) {
351
+ rawResponseContent += `- toolResults: ${step.toolResults.length}\n`;
352
+ }
353
+ });
354
+ rawResponseContent += '\n';
355
+ }
356
+ // Add the last step's text for easy access
357
+ let lastStepText = '';
358
+ if (result.steps && result.steps.length > 0) {
359
+ for (let i = result.steps.length - 1; i >= 0; i--) {
360
+ if (result.steps[i].text && result.steps[i].text.trim()) {
361
+ lastStepText = result.steps[i].text;
362
+ break;
310
363
  }
311
364
  }
312
365
  }
313
- const fs = await Promise.resolve().then(() => __importStar(require('fs')));
314
- fs.writeFileSync(contextFile, contextParts.join('\n'));
315
- console.log(`🐛 DEBUG: Full conversation context logged to ${contextFile}`);
366
+ rawResponseContent += `**Last step with text**: ${lastStepText || '[NONE]'}\n\n`;
367
+ const usage = result.totalUsage || result.usage;
368
+ const rawAiResponse = {
369
+ content: rawResponseContent,
370
+ usage: {
371
+ input_tokens: usage.inputTokens || 0,
372
+ output_tokens: usage.outputTokens || 0,
373
+ cache_creation_input_tokens: 0,
374
+ cache_read_input_tokens: 0
375
+ }
376
+ };
377
+ debugFiles = this.logDebugIfEnabled(`${operation}-raw`, finalPrompt, rawAiResponse);
316
378
  }
317
379
  // Extract tool call history from steps
318
380
  const toolCallsExecuted = [];
@@ -332,11 +394,11 @@ class VercelProvider {
332
394
  // - GitHub Issue #8795: Token reporting issues with Anthropic provider (streaming)
333
395
  // Our version (5.0.60, released Oct 2, 2025) includes these fixes.
334
396
  // However, testing still shows ~70% fewer tokens reported vs Anthropic native SDK.
335
- // Root cause unknown - may be additional unreported bugs or different calculation methods.
336
- const usage = result.usage;
397
+ // Root cause: We were using result.usage (final step only) instead of result.totalUsage (sum of all steps)!
398
+ const usage = result.totalUsage || result.usage;
337
399
  let cacheReadTokens = 0;
338
400
  let cacheCreationTokens = 0;
339
- // Anthropic via Vercel uses cachedInputTokens
401
+ // Anthropic via Vercel uses cachedInputTokens (confirmed in AI SDK 5+)
340
402
  if (usage.cachedInputTokens) {
341
403
  cacheReadTokens = usage.cachedInputTokens;
342
404
  }
@@ -367,6 +429,21 @@ class VercelProvider {
367
429
  }
368
430
  }
369
431
  }
432
+ // Log processed summary response (keep existing functionality)
433
+ if (this.debugMode && debugFiles === null) {
434
+ // Only log summary if we haven't already logged raw response
435
+ let finalPrompt = `System: ${config.systemPrompt}\n\nuser: ${config.userMessage}`;
436
+ const aiResponse = {
437
+ content: finalText || '',
438
+ usage: {
439
+ input_tokens: usage.inputTokens || 0,
440
+ output_tokens: usage.outputTokens || 0,
441
+ cache_creation_input_tokens: cacheCreationTokens,
442
+ cache_read_input_tokens: cacheReadTokens
443
+ }
444
+ };
445
+ debugFiles = this.logDebugIfEnabled(`${operation}-summary`, finalPrompt, aiResponse);
446
+ }
370
447
  return (0, provider_debug_utils_1.createAndLogAgenticResult)({
371
448
  finalMessage: finalText || '',
372
449
  iterations: result.steps?.length || 1,
@@ -383,7 +460,10 @@ class VercelProvider {
383
460
  operation: `${operation}-summary`,
384
461
  sdk: this.getProviderType(),
385
462
  startTime,
386
- debugMode: this.debugMode
463
+ debugMode: this.debugMode,
464
+ debugFiles,
465
+ evaluationContext: config.evaluationContext,
466
+ interaction_id: config.interaction_id
387
467
  });
388
468
  }
389
469
  catch (error) {
@@ -404,7 +484,9 @@ class VercelProvider {
404
484
  operation: `${operation}-error`,
405
485
  sdk: this.getProviderType(),
406
486
  startTime,
407
- debugMode: this.debugMode
487
+ debugMode: this.debugMode,
488
+ evaluationContext: config.evaluationContext,
489
+ interaction_id: config.interaction_id
408
490
  });
409
491
  }
410
492
  }
@@ -157,7 +157,7 @@ export declare class ResourceRecommender {
157
157
  /**
158
158
  * Find the best resource solution(s) for user intent using two-phase analysis
159
159
  */
160
- findBestSolutions(intent: string, _explainResource: (resource: string) => Promise<any>): Promise<ResourceSolution[]>;
160
+ findBestSolutions(intent: string, _explainResource: (resource: string) => Promise<any>, interaction_id?: string): Promise<ResourceSolution[]>;
161
161
  /**
162
162
  * Phase 2: AI assembles and ranks complete solutions (replaces separate selection + ranking)
163
163
  */
@@ -186,107 +186,11 @@ export declare class ResourceRecommender {
186
186
  * Extract group from resource name (e.g., "sqls.devopstoolkit.live" -> "devopstoolkit.live")
187
187
  */
188
188
  private extractGroupFromResourceName;
189
- /**
190
- * Construct API version from resource name (simplified approach)
191
- */
192
- private constructApiVersionFromResourceName;
193
189
  /**
194
190
  * Phase 0: Search for relevant organizational patterns using multi-concept approach
195
191
  * Returns empty array if Vector DB is not available - this is completely optional
196
192
  */
197
193
  private searchRelevantPatterns;
198
- /**
199
- const basic = `${index}: ${resource.kind} (${resource.apiVersion})
200
- Group: ${resource.group || 'core'}
201
- Namespaced: ${resource.namespaced}`;
202
-
203
- // Include rich capability context if available (from capability-based pre-filtering)
204
- if (resource.capabilities) {
205
- const cap = resource.capabilities;
206
- return `${basic}
207
- Resource Name: ${resource.resourceName || 'Not specified'}
208
- Capabilities: ${cap.capabilities?.join(', ') || 'Not specified'}
209
- Providers: ${cap.providers?.join(', ') || 'Not specified'}
210
- Complexity: ${cap.complexity || 'Not specified'}
211
- Use Case: ${cap.useCase || 'Not specified'}
212
- Description: ${cap.description || 'Not specified'}
213
- Confidence: ${cap.confidence || 'N/A'}`;
214
- }
215
-
216
- return basic;
217
- }).join('\n\n');
218
-
219
- // Format organizational patterns for AI context
220
- const patternsContext = patterns.length > 0
221
- ? patterns.map(pattern =>
222
- `- ID: ${pattern.id}
223
- Description: ${pattern.description}
224
- Suggested Resources: ${pattern.suggestedResources?.join(', ') || 'Not specified'}
225
- Rationale: ${pattern.rationale}
226
- Triggers: ${pattern.triggers?.join(', ') || 'None'}`
227
- ).join('\n')
228
- : 'No organizational patterns found for this request.';
229
-
230
-
231
- const template = loadPrompt('resource-selection');
232
-
233
- const selectionPrompt = template
234
- .replace('{intent}', intent)
235
- .replace('{resources}', resourceSummary)
236
- .replace('{patterns}', patternsContext);
237
-
238
-
239
- const response = await this.aiProvider.sendMessage(selectionPrompt, 'resource-selection');
240
-
241
- try {
242
- // Extract JSON from response with robust parsing
243
- let jsonContent = response.content;
244
-
245
- // First try to find JSON array wrapped in code blocks
246
- const codeBlockMatch = response.content.match(/```(?:json)?\s*(\[[\s\S]*?\])\s*```/);
247
- if (codeBlockMatch) {
248
- jsonContent = codeBlockMatch[1];
249
- } else {
250
- // Try to find JSON array that starts with [ and find the matching closing ]
251
- const startIndex = response.content.indexOf('[');
252
- if (startIndex !== -1) {
253
- let bracketCount = 0;
254
- let endIndex = startIndex;
255
-
256
- for (let i = startIndex; i < response.content.length; i++) {
257
- if (response.content[i] === '[') bracketCount++;
258
- if (response.content[i] === ']') bracketCount--;
259
- if (bracketCount === 0) {
260
- endIndex = i;
261
- break;
262
- }
263
- }
264
-
265
- if (bracketCount === 0) {
266
- jsonContent = response.content.substring(startIndex, endIndex + 1);
267
- }
268
- }
269
- }
270
-
271
- const selectedResources = JSON.parse(jsonContent.trim());
272
-
273
- if (!Array.isArray(selectedResources)) {
274
- throw new Error('AI response is not an array');
275
- }
276
-
277
- // Validate that each resource has required fields
278
- for (const resource of selectedResources) {
279
- if (!resource.kind || !resource.apiVersion) {
280
- throw new Error(`AI selected invalid resource: ${JSON.stringify(resource)}`);
281
- }
282
- }
283
-
284
- return selectedResources;
285
- } catch (error) {
286
- throw new Error(`AI failed to select resources in valid JSON format. Error: ${(error as Error).message}. AI response: "${response.content.substring(0, 200)}..."`);
287
- }
288
- }
289
-
290
194
  /**
291
195
  * Phase 2: Fetch detailed schemas for selected candidates
292
196
  */
@@ -295,10 +199,6 @@ export declare class ResourceRecommender {
295
199
  * Discover cluster options for dynamic question generation
296
200
  */
297
201
  private discoverClusterOptions;
298
- /**
299
- * Extract JSON object from AI response with robust parsing
300
- */
301
- private extractJsonFromAIResponse;
302
202
  /**
303
203
  * Generate contextual questions using AI based on user intent and solution resources
304
204
  */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAUrD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,g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