snow-flow 2.6.7 → 2.6.9
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-machine-learning-mcp.js +14 -27
- package/dist/version.d.ts +2 -0
- package/dist/version.js +14 -0
- package/package.json +1 -1
|
@@ -511,11 +511,12 @@ class ServiceNowMachineLearningMCP {
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
// Use custom TensorFlow.js neural network
|
|
514
|
-
this.logger.info(
|
|
514
|
+
this.logger.info(`Training custom LSTM neural network for incident classification with ${sample_size} samples...`);
|
|
515
515
|
// Fetch historical incidents
|
|
516
516
|
const incidents = await this.fetchIncidentData(sample_size);
|
|
517
|
+
this.logger.info(`Retrieved ${incidents.length} incidents from ServiceNow`);
|
|
517
518
|
if (incidents.length < 100) {
|
|
518
|
-
throw new Error(
|
|
519
|
+
throw new Error(`Insufficient data for training (need at least 100 incidents, got ${incidents.length})`);
|
|
519
520
|
}
|
|
520
521
|
// Prepare training data
|
|
521
522
|
const { features, labels, tokenizer, categories } = await this.prepareIncidentData(incidents);
|
|
@@ -1002,19 +1003,15 @@ class ServiceNowMachineLearningMCP {
|
|
|
1002
1003
|
// Helper methods
|
|
1003
1004
|
async fetchIncidentData(limit) {
|
|
1004
1005
|
// Fetch real incidents from ServiceNow - no ML API needed!
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
// Use client directly for basic table access
|
|
1011
|
-
const response = await this.client.makeRequest({
|
|
1012
|
-
url: '/api/now/table/incident',
|
|
1013
|
-
params: queryParams
|
|
1014
|
-
});
|
|
1006
|
+
// Include both active and resolved incidents for better training data
|
|
1007
|
+
// Order by sys_created_on DESC to get most recent incidents
|
|
1008
|
+
const query = 'ORDERBYDESCsys_created_on'; // Get most recent incidents, both active and resolved
|
|
1009
|
+
// Use searchRecords for proper authentication handling
|
|
1010
|
+
const response = await this.client.searchRecords('incident', query, limit);
|
|
1015
1011
|
if (!response.success || !response.data?.result) {
|
|
1016
1012
|
throw new Error('Failed to fetch incident data. Ensure you have read access to the incident table.');
|
|
1017
1013
|
}
|
|
1014
|
+
this.logger.info(`Fetched ${response.data.result.length} incidents for ML training (requested: ${limit})`);
|
|
1018
1015
|
return response.data.result.map((inc) => ({
|
|
1019
1016
|
short_description: inc.short_description || '',
|
|
1020
1017
|
description: inc.description || '',
|
|
@@ -1205,16 +1202,8 @@ class ServiceNowMachineLearningMCP {
|
|
|
1205
1202
|
if (category) {
|
|
1206
1203
|
query += `^category=${category}`;
|
|
1207
1204
|
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
sysparm_fields: 'sys_created_on',
|
|
1211
|
-
sysparm_limit: 10000
|
|
1212
|
-
};
|
|
1213
|
-
// Use client directly for basic table access
|
|
1214
|
-
const response = await this.client.makeRequest({
|
|
1215
|
-
url: '/api/now/table/incident',
|
|
1216
|
-
params: queryParams
|
|
1217
|
-
});
|
|
1205
|
+
// Use searchRecords for proper authentication handling
|
|
1206
|
+
const response = await this.client.searchRecords('incident', query, 10000);
|
|
1218
1207
|
if (!response.success || !response.data?.result) {
|
|
1219
1208
|
throw new Error('Failed to fetch incident volume history from ServiceNow. ' +
|
|
1220
1209
|
'Ensure you have permission to read incident table.');
|
|
@@ -1240,13 +1229,11 @@ class ServiceNowMachineLearningMCP {
|
|
|
1240
1229
|
}
|
|
1241
1230
|
async fetchSingleIncident(incidentNumber) {
|
|
1242
1231
|
// Fetch single incident from ServiceNow - no ML API needed!
|
|
1243
|
-
const response = await this.client.
|
|
1244
|
-
|
|
1245
|
-
});
|
|
1246
|
-
if (!response.success || !response.data?.result) {
|
|
1232
|
+
const response = await this.client.getRecord('incident', incidentNumber);
|
|
1233
|
+
if (!response.success || !response.data) {
|
|
1247
1234
|
throw new Error(`Failed to fetch incident ${incidentNumber}`);
|
|
1248
1235
|
}
|
|
1249
|
-
const inc = response.data
|
|
1236
|
+
const inc = response.data;
|
|
1250
1237
|
return {
|
|
1251
1238
|
short_description: inc.short_description || '',
|
|
1252
1239
|
description: inc.description || '',
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -14,6 +14,20 @@ exports.VERSION_INFO = {
|
|
|
14
14
|
name: 'Snow-Flow',
|
|
15
15
|
description: 'ServiceNow Queen Agent - Hive-Mind Intelligence for ServiceNow Development',
|
|
16
16
|
features: {
|
|
17
|
+
'2.6.9': [
|
|
18
|
+
'🔍 ML QUERY FIX: Removed restrictive filters limiting training data to only resolved incidents',
|
|
19
|
+
'📊 ALL INCIDENTS: ML training now includes both active AND resolved incidents',
|
|
20
|
+
'📈 MORE DATA: Significantly increased available training data for better ML models',
|
|
21
|
+
'🚀 BETTER LOGS: Added detailed logging for ML data fetching and training process',
|
|
22
|
+
'✅ SORTED DATA: Fetches most recent incidents first (ORDER BY sys_created_on DESC)',
|
|
23
|
+
],
|
|
24
|
+
'2.6.8': [
|
|
25
|
+
'🔧 ML API FIX: Fixed incident data fetching using searchRecords instead of makeRequest',
|
|
26
|
+
'✅ AUTHENTICATION: Proper authentication handling for ML training data retrieval',
|
|
27
|
+
'📊 CONSISTENT API: ML MCP now uses same methods as operations MCP for data access',
|
|
28
|
+
'🚀 TRAINING WORKS: ml_train_incident_classifier can now fetch incidents correctly',
|
|
29
|
+
'🤖 BETTER ERRORS: Clear error messages when permissions are missing',
|
|
30
|
+
],
|
|
17
31
|
'2.6.7': [
|
|
18
32
|
'🤖 ML HYBRID MODE: Custom neural networks work WITHOUT PA/PI plugins!',
|
|
19
33
|
'✅ SMART FALLBACK: If PI available, uses it for 95%+ accuracy, else TensorFlow.js',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.9",
|
|
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",
|