snow-flow 2.6.7 → 2.6.8

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.
@@ -1002,16 +1002,9 @@ class ServiceNowMachineLearningMCP {
1002
1002
  // Helper methods
1003
1003
  async fetchIncidentData(limit) {
1004
1004
  // Fetch real incidents from ServiceNow - no ML API needed!
1005
- const queryParams = {
1006
- sysparm_limit: limit,
1007
- sysparm_query: 'active=false^resolved=true',
1008
- sysparm_fields: 'short_description,description,category,subcategory,priority,impact,urgency,resolved,sys_created_on,resolved_at'
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
- });
1005
+ const query = 'active=false^resolved=true';
1006
+ // Use searchRecords for proper authentication handling
1007
+ const response = await this.client.searchRecords('incident', query, limit);
1015
1008
  if (!response.success || !response.data?.result) {
1016
1009
  throw new Error('Failed to fetch incident data. Ensure you have read access to the incident table.');
1017
1010
  }
@@ -1205,16 +1198,8 @@ class ServiceNowMachineLearningMCP {
1205
1198
  if (category) {
1206
1199
  query += `^category=${category}`;
1207
1200
  }
1208
- const queryParams = {
1209
- sysparm_query: query,
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
- });
1201
+ // Use searchRecords for proper authentication handling
1202
+ const response = await this.client.searchRecords('incident', query, 10000);
1218
1203
  if (!response.success || !response.data?.result) {
1219
1204
  throw new Error('Failed to fetch incident volume history from ServiceNow. ' +
1220
1205
  'Ensure you have permission to read incident table.');
@@ -1240,13 +1225,11 @@ class ServiceNowMachineLearningMCP {
1240
1225
  }
1241
1226
  async fetchSingleIncident(incidentNumber) {
1242
1227
  // Fetch single incident from ServiceNow - no ML API needed!
1243
- const response = await this.client.makeRequest({
1244
- url: `/api/now/table/incident/${incidentNumber}`
1245
- });
1246
- if (!response.success || !response.data?.result) {
1228
+ const response = await this.client.getRecord('incident', incidentNumber);
1229
+ if (!response.success || !response.data) {
1247
1230
  throw new Error(`Failed to fetch incident ${incidentNumber}`);
1248
1231
  }
1249
- const inc = response.data.result;
1232
+ const inc = response.data;
1250
1233
  return {
1251
1234
  short_description: inc.short_description || '',
1252
1235
  description: inc.description || '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
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",