snow-flow 3.4.35 ā 3.4.36
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.
|
@@ -118,9 +118,8 @@ class MCPLogger {
|
|
|
118
118
|
trackAPICall(operation, table, recordCount) {
|
|
119
119
|
const message = `š API Call: ${operation}${table ? ` on ${table}` : ''}${recordCount ? ` (${recordCount} records)` : ''}`;
|
|
120
120
|
this.info(message);
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
this.addTokens(estimatedTokens, 50);
|
|
121
|
+
// NOTE: Removed automatic token estimation as it was inaccurate
|
|
122
|
+
// Real token usage should come from Claude Code's actual measurements
|
|
124
123
|
}
|
|
125
124
|
/**
|
|
126
125
|
* Add token usage
|
|
@@ -129,8 +128,8 @@ class MCPLogger {
|
|
|
129
128
|
this.tokenUsage.input += input;
|
|
130
129
|
this.tokenUsage.output += output;
|
|
131
130
|
this.tokenUsage.total = this.tokenUsage.input + this.tokenUsage.output;
|
|
132
|
-
//
|
|
133
|
-
if (this.tokenUsage.total > 0) {
|
|
131
|
+
// Only log token usage in debug mode to avoid spam
|
|
132
|
+
if (process.env.MCP_DEBUG === 'true' && this.tokenUsage.total > 0) {
|
|
134
133
|
console.error(`š [${this.name}] Tokens used: ${this.tokenUsage.total} (in: ${this.tokenUsage.input}, out: ${this.tokenUsage.output})`);
|
|
135
134
|
}
|
|
136
135
|
}
|
|
@@ -183,13 +182,8 @@ class MCPLogger {
|
|
|
183
182
|
output: tokenUsage.output,
|
|
184
183
|
total: tokenUsage.total
|
|
185
184
|
};
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
const lastContent = result.content[result.content.length - 1];
|
|
189
|
-
if (lastContent && lastContent.type === 'text') {
|
|
190
|
-
lastContent.text += `\n\nš Token Usage: ${tokenUsage.total} (Input: ${tokenUsage.input}, Output: ${tokenUsage.output})`;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
185
|
+
// Token usage is available in _meta.tokenUsage for debugging
|
|
186
|
+
// We no longer automatically add it to response text to avoid pollution
|
|
193
187
|
}
|
|
194
188
|
return result;
|
|
195
189
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.36",
|
|
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",
|