snow-flow 2.6.2 ā 2.6.3
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.
|
@@ -2110,51 +2110,34 @@ class ServiceNowDevelopmentAssistantMCP {
|
|
|
2110
2110
|
],
|
|
2111
2111
|
};
|
|
2112
2112
|
}
|
|
2113
|
-
// Format the response with relevant fields
|
|
2113
|
+
// Format the response with relevant fields
|
|
2114
2114
|
const formattedArtifact = {
|
|
2115
2115
|
sys_id: artifact.sys_id,
|
|
2116
2116
|
name: artifact.name || artifact.title || 'Unknown',
|
|
2117
2117
|
table: args.table,
|
|
2118
|
-
|
|
2119
|
-
active: artifact.active,
|
|
2120
|
-
created_on: artifact.sys_created_on,
|
|
2121
|
-
updated_on: artifact.sys_updated_on,
|
|
2122
|
-
created_by: artifact.sys_created_by,
|
|
2123
|
-
updated_by: artifact.sys_updated_by
|
|
2118
|
+
...artifact
|
|
2124
2119
|
};
|
|
2125
|
-
//
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
}
|
|
2133
|
-
else if (args.table === 'sp_widget') {
|
|
2134
|
-
formattedArtifact.template_preview = artifact.template ?
|
|
2135
|
-
artifact.template.substring(0, 300) + (artifact.template.length > 300 ? '...' : '') :
|
|
2136
|
-
'No template';
|
|
2137
|
-
formattedArtifact.server_script_preview = artifact.server_script ?
|
|
2138
|
-
artifact.server_script.substring(0, 300) + (artifact.server_script.length > 300 ? '...' : '') :
|
|
2139
|
-
'No server script';
|
|
2140
|
-
formattedArtifact.client_script_preview = artifact.client_script ?
|
|
2141
|
-
artifact.client_script.substring(0, 300) + (artifact.client_script.length > 300 ? '...' : '') :
|
|
2142
|
-
'No client script';
|
|
2143
|
-
formattedArtifact.css_preview = artifact.css ?
|
|
2144
|
-
artifact.css.substring(0, 200) + (artifact.css.length > 200 ? '...' : '') :
|
|
2145
|
-
'No CSS';
|
|
2146
|
-
}
|
|
2147
|
-
// Store the full artifact in memory for later retrieval if needed
|
|
2148
|
-
this.intelligentlyIndex(artifact).then(indexed => {
|
|
2149
|
-
this.storeInMemory(indexed).catch(err => {
|
|
2150
|
-
this.logger.warn('Failed to store artifact in memory:', err);
|
|
2120
|
+
// Don't wait for memory indexing - do it in background
|
|
2121
|
+
// This might be causing the timeout
|
|
2122
|
+
setImmediate(() => {
|
|
2123
|
+
this.intelligentlyIndex(artifact).then(indexed => {
|
|
2124
|
+
this.storeInMemory(indexed).catch(err => {
|
|
2125
|
+
this.logger.warn('Failed to store artifact in memory:', err);
|
|
2126
|
+
});
|
|
2151
2127
|
});
|
|
2152
2128
|
});
|
|
2129
|
+
// Check response size to avoid MCP runtime timeouts
|
|
2130
|
+
const jsonString = JSON.stringify(formattedArtifact);
|
|
2131
|
+
const sizeInKB = Buffer.byteLength(jsonString) / 1024;
|
|
2132
|
+
// If response is large, use compact format
|
|
2133
|
+
const formattedJson = sizeInKB > 50 ?
|
|
2134
|
+
JSON.stringify(formattedArtifact) : // Compact for large responses
|
|
2135
|
+
JSON.stringify(formattedArtifact, null, 2); // Pretty print for small responses
|
|
2153
2136
|
return {
|
|
2154
2137
|
content: [
|
|
2155
2138
|
{
|
|
2156
2139
|
type: 'text',
|
|
2157
|
-
text: `ā
Found artifact by sys_id!\n\nšÆ **${formattedArtifact.name}**\nš sys_id: ${args.sys_id}\nš Table: ${args.table}\n
|
|
2140
|
+
text: `ā
Found artifact by sys_id!\n\nšÆ **${formattedArtifact.name}**\nš sys_id: ${args.sys_id}\nš Table: ${args.table}\nš Size: ${sizeInKB.toFixed(1)}KB\n\n**All Fields:**\n${formattedJson}`,
|
|
2158
2141
|
},
|
|
2159
2142
|
],
|
|
2160
2143
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Snow-Flow: ServiceNow Advanced Intelligence Platform - 100+ real MCP tools with AI-powered swarm orchestration and neural networks. Dynamic task categorization using AI. Machine learning for incident classification, change risk prediction, and anomaly detection. Zero Mock Data, 100% Real API Integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|