snow-flow 3.4.25 → 3.4.26
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/mcp/servicenow-automation-mcp.js +2 -0
- package/dist/mcp/servicenow-change-virtualagent-pa-mcp.js +2 -0
- package/dist/mcp/servicenow-cmdb-event-hr-csm-devops-mcp.js +2 -0
- package/dist/mcp/servicenow-deployment-mcp.js +2 -0
- package/dist/mcp/servicenow-development-assistant-mcp.js +2 -0
- package/dist/mcp/servicenow-flow-workspace-mobile-mcp.js +2 -0
- package/dist/mcp/servicenow-integration-mcp.js +1 -0
- package/dist/mcp/servicenow-knowledge-catalog-mcp.js +2 -0
- package/dist/mcp/servicenow-machine-learning-mcp.js +2 -0
- package/dist/mcp/servicenow-operations-mcp.js +2 -0
- package/dist/mcp/servicenow-platform-development-mcp.js +2 -0
- package/dist/mcp/servicenow-reporting-analytics-mcp.js +2 -0
- package/dist/mcp/servicenow-security-compliance-mcp.js +2 -0
- package/dist/mcp/servicenow-system-properties-mcp.js +2 -0
- package/dist/mcp/servicenow-update-set-mcp.js +2 -0
- package/fix-mcp-responses.sh +31 -0
- package/package.json +1 -1
|
@@ -515,6 +515,8 @@ class ServiceNowAutomationMCP {
|
|
|
515
515
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
516
516
|
}
|
|
517
517
|
// Complete operation with token tracking
|
|
518
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
519
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
518
520
|
this.logger.operationComplete(name, result);
|
|
519
521
|
// Add token usage to response
|
|
520
522
|
result = this.logger.addTokenUsageToResponse(result);
|
|
@@ -409,6 +409,8 @@ class ServiceNowChangeVirtualAgentPAMCP {
|
|
|
409
409
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
410
410
|
}
|
|
411
411
|
// Complete operation with token tracking
|
|
412
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
413
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
412
414
|
this.logger.operationComplete(name, result);
|
|
413
415
|
return result;
|
|
414
416
|
}
|
|
@@ -492,6 +492,8 @@ class ServiceNowCMDBEventHRCSMDevOpsMCP {
|
|
|
492
492
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
493
493
|
}
|
|
494
494
|
// Complete operation with token tracking
|
|
495
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
496
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
495
497
|
this.logger.operationComplete(name, result);
|
|
496
498
|
return result;
|
|
497
499
|
}
|
|
@@ -414,6 +414,8 @@ class ServiceNowDeploymentMCP {
|
|
|
414
414
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
415
415
|
}
|
|
416
416
|
// Complete operation with token tracking
|
|
417
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
418
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
417
419
|
this.logger.operationComplete(name, result);
|
|
418
420
|
return result;
|
|
419
421
|
}
|
|
@@ -442,6 +442,8 @@ class ServiceNowDevelopmentAssistantMCP {
|
|
|
442
442
|
throw new Error(`Unknown tool: ${name}`);
|
|
443
443
|
}
|
|
444
444
|
// Complete operation with token tracking
|
|
445
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
446
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
445
447
|
this.logger.operationComplete(name, result);
|
|
446
448
|
return result;
|
|
447
449
|
}
|
|
@@ -393,6 +393,8 @@ class ServiceNowFlowWorkspaceMobileMCP {
|
|
|
393
393
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
394
394
|
}
|
|
395
395
|
// Complete operation with token tracking
|
|
396
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
397
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
396
398
|
this.logger.operationComplete(name, result);
|
|
397
399
|
return result;
|
|
398
400
|
}
|
|
@@ -219,6 +219,7 @@ class ServiceNowIntegrationMCP {
|
|
|
219
219
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
220
220
|
}
|
|
221
221
|
// Complete operation with token tracking
|
|
222
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
222
223
|
this.logger.operationComplete(name, result);
|
|
223
224
|
return result;
|
|
224
225
|
}
|
|
@@ -319,6 +319,8 @@ class ServiceNowKnowledgeCatalogMCP {
|
|
|
319
319
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
320
320
|
}
|
|
321
321
|
// Complete operation with token tracking
|
|
322
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
323
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
322
324
|
this.logger.operationComplete(name, result);
|
|
323
325
|
return result;
|
|
324
326
|
}
|
|
@@ -541,6 +541,8 @@ class ServiceNowMachineLearningMCP {
|
|
|
541
541
|
throw new Error(`Unknown tool: ${name}`);
|
|
542
542
|
}
|
|
543
543
|
// Complete operation with token tracking
|
|
544
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
545
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
544
546
|
this.logger.operationComplete(name, result);
|
|
545
547
|
return result;
|
|
546
548
|
}
|
|
@@ -846,6 +846,8 @@ class ServiceNowOperationsMCP {
|
|
|
846
846
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Tool ${name} not found`);
|
|
847
847
|
}
|
|
848
848
|
// Complete operation with token tracking
|
|
849
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
850
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
849
851
|
this.logger.operationComplete(name, result);
|
|
850
852
|
// Add token usage to response
|
|
851
853
|
result = this.logger.addTokenUsageToResponse(result);
|
|
@@ -212,6 +212,8 @@ class ServiceNowPlatformDevelopmentMCP {
|
|
|
212
212
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
213
213
|
}
|
|
214
214
|
// Complete operation with token tracking
|
|
215
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
216
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
215
217
|
this.logger.operationComplete(name, result);
|
|
216
218
|
return result;
|
|
217
219
|
}
|
|
@@ -260,6 +260,8 @@ class ServiceNowReportingAnalyticsMCP {
|
|
|
260
260
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
261
261
|
}
|
|
262
262
|
// Complete operation with token tracking
|
|
263
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
264
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
263
265
|
this.logger.operationComplete(name, result);
|
|
264
266
|
return result;
|
|
265
267
|
}
|
|
@@ -244,6 +244,8 @@ class ServiceNowSecurityComplianceMCP {
|
|
|
244
244
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
245
245
|
}
|
|
246
246
|
// Complete operation with token tracking
|
|
247
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
248
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
247
249
|
this.logger.operationComplete(name, result);
|
|
248
250
|
return result;
|
|
249
251
|
}
|
|
@@ -368,6 +368,8 @@ class ServiceNowSystemPropertiesMCP {
|
|
|
368
368
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
369
369
|
}
|
|
370
370
|
// Complete operation with token tracking
|
|
371
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
372
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
371
373
|
this.logger.operationComplete(name, result);
|
|
372
374
|
// Add token usage to response
|
|
373
375
|
result = this.logger.addTokenUsageToResponse(result);
|
|
@@ -267,6 +267,8 @@ class ServiceNowUpdateSetMCP {
|
|
|
267
267
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
268
268
|
}
|
|
269
269
|
// Complete operation with token tracking
|
|
270
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
271
|
+
result = this.logger.addTokenUsageToResponse(result);
|
|
270
272
|
this.logger.operationComplete(name, result);
|
|
271
273
|
return result;
|
|
272
274
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "🔧 Fixing MCP response patterns to include _meta field..."
|
|
4
|
+
|
|
5
|
+
# Find all TypeScript files with operationComplete
|
|
6
|
+
files=$(grep -l "operationComplete" src/mcp/*.ts)
|
|
7
|
+
count=$(echo "$files" | wc -l)
|
|
8
|
+
|
|
9
|
+
echo "📂 Found $count files to fix"
|
|
10
|
+
|
|
11
|
+
for file in $files; do
|
|
12
|
+
echo " 📝 Fixing $(basename $file)..."
|
|
13
|
+
|
|
14
|
+
# Replace the pattern where operationComplete is followed by return result
|
|
15
|
+
# Add the addTokenUsageToResponse call before returning
|
|
16
|
+
sed -i '' 's/this\.logger\.operationComplete(name, result);/result = this.logger.addTokenUsageToResponse(result);\
|
|
17
|
+
this.logger.operationComplete(name, result);/g' "$file"
|
|
18
|
+
|
|
19
|
+
# Also handle cases with different spacing
|
|
20
|
+
sed -i '' 's/this\.logger\.operationComplete(name, result);[[:space:]]*$/result = this.logger.addTokenUsageToResponse(result);\
|
|
21
|
+
this.logger.operationComplete(name, result);/g' "$file"
|
|
22
|
+
done
|
|
23
|
+
|
|
24
|
+
echo "✅ Fixed all MCP files!"
|
|
25
|
+
echo ""
|
|
26
|
+
echo "🔍 Verifying changes..."
|
|
27
|
+
echo "Files now using addTokenUsageToResponse:"
|
|
28
|
+
grep -l "addTokenUsageToResponse" src/mcp/*.ts | wc -l
|
|
29
|
+
|
|
30
|
+
echo ""
|
|
31
|
+
echo "📦 Now run: npm run build"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.26",
|
|
4
4
|
"description": "ServiceNow development framework with MCP server integration. Executes background scripts using ES5 JavaScript only (ServiceNow Rhino engine requirement). Provides 17 MCP servers for complete ServiceNow operations including widget deployment with coherence validation, table operations, script execution, machine learning, advanced features, and comprehensive platform management.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|