snow-flow 2.6.3 → 2.6.5

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.
Files changed (26) hide show
  1. package/dist/mcp/servicenow-development-assistant-mcp.js +38 -18
  2. package/package.json +1 -1
  3. package/dist/mcp/example-refactored-server.d.ts +0 -18
  4. package/dist/mcp/example-refactored-server.js +0 -57
  5. package/dist/mcp/servicenow-automation-mcp-refactored.d.ts +0 -26
  6. package/dist/mcp/servicenow-automation-mcp-refactored.js +0 -632
  7. package/dist/mcp/servicenow-deployment-mcp-refactored.d.ts +0 -74
  8. package/dist/mcp/servicenow-deployment-mcp-refactored.js +0 -1044
  9. package/dist/mcp/servicenow-flow-composer-mcp-refactored.d.ts +0 -25
  10. package/dist/mcp/servicenow-flow-composer-mcp-refactored.js +0 -565
  11. package/dist/mcp/servicenow-graph-memory-mcp-refactored.d.ts +0 -32
  12. package/dist/mcp/servicenow-graph-memory-mcp-refactored.js +0 -642
  13. package/dist/mcp/servicenow-integration-mcp-refactored.d.ts +0 -24
  14. package/dist/mcp/servicenow-integration-mcp-refactored.js +0 -612
  15. package/dist/mcp/servicenow-intelligent-mcp-refactored.d.ts +0 -63
  16. package/dist/mcp/servicenow-intelligent-mcp-refactored.js +0 -782
  17. package/dist/mcp/servicenow-operations-mcp-refactored.d.ts +0 -63
  18. package/dist/mcp/servicenow-operations-mcp-refactored.js +0 -1770
  19. package/dist/mcp/servicenow-platform-development-mcp-refactored.d.ts +0 -25
  20. package/dist/mcp/servicenow-platform-development-mcp-refactored.js +0 -542
  21. package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.d.ts +0 -26
  22. package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.js +0 -648
  23. package/dist/mcp/servicenow-security-compliance-mcp-refactored.d.ts +0 -25
  24. package/dist/mcp/servicenow-security-compliance-mcp-refactored.js +0 -600
  25. package/dist/mcp/servicenow-update-set-mcp-refactored.d.ts +0 -31
  26. package/dist/mcp/servicenow-update-set-mcp-refactored.js +0 -662
@@ -506,12 +506,15 @@ class ServiceNowDevelopmentAssistantMCP {
506
506
  this.logger.info(`First result: ${JSON.stringify(liveResults[0])}`);
507
507
  }
508
508
  // 4. Index results for future use (only if we have results)
509
+ // Skip indexing - causes timeouts
510
+ /*
509
511
  if (liveResults && liveResults.length > 0) {
510
- this.logger.info('Indexing found artifacts for future use...');
511
- for (const result of liveResults) {
512
- await this.intelligentlyIndex(result);
513
- }
512
+ this.logger.info('Indexing found artifacts for future use...');
513
+ for (const result of liveResults) {
514
+ await this.intelligentlyIndex(result);
515
+ }
514
516
  }
517
+ */
515
518
  const instanceInfo = await mcp_auth_middleware_js_1.mcpAuth.getInstanceInfo();
516
519
  const resultText = this.formatResults(liveResults);
517
520
  this.logger.info(`Formatted result text: ${resultText.substring(0, 200)}...`);
@@ -587,10 +590,27 @@ class ServiceNowDevelopmentAssistantMCP {
587
590
  this.logger.info('Analyzing ServiceNow artifact', { sys_id: args.sys_id });
588
591
  // Fetch complete artifact from ServiceNow
589
592
  const artifact = await this.client.getRecord(args.table, args.sys_id);
593
+ // Skip indexing - causes timeouts
594
+ /*
590
595
  // Perform intelligent indexing
591
596
  const indexedArtifact = await this.intelligentlyIndex(artifact);
597
+
592
598
  // Store in memory
593
599
  await this.storeInMemory(indexedArtifact);
600
+ */
601
+ // Create minimal indexed artifact for response
602
+ const indexedArtifact = {
603
+ meta: {
604
+ sys_id: artifact.sys_id,
605
+ name: artifact.name || artifact.title || 'Unknown',
606
+ type: artifact.sys_class_name || 'unknown',
607
+ },
608
+ claudeSummary: `${artifact.name || artifact.title} is a ${artifact.sys_class_name || 'artifact'} in ServiceNow.`,
609
+ structure: {},
610
+ context: {},
611
+ relationships: [],
612
+ modificationPoints: []
613
+ };
594
614
  return {
595
615
  content: [
596
616
  {
@@ -2043,9 +2063,14 @@ class ServiceNowDevelopmentAssistantMCP {
2043
2063
  }
2044
2064
  }
2045
2065
  async updateMemoryIndex(artifact, modification) {
2066
+ // Skip memory indexing - causes timeouts
2067
+ /*
2046
2068
  // Update the memory index with the changes
2047
2069
  const indexed = await this.intelligentlyIndex(artifact);
2048
2070
  await this.storeInMemory(indexed);
2071
+ */
2072
+ // TODO: Implement faster indexing method
2073
+ this.logger.info('Memory indexing skipped to prevent timeouts');
2049
2074
  }
2050
2075
  getArtifactUrl(artifact) {
2051
2076
  // Generate ServiceNow URL for the artifact
@@ -2117,27 +2142,22 @@ class ServiceNowDevelopmentAssistantMCP {
2117
2142
  table: args.table,
2118
2143
  ...artifact
2119
2144
  };
2120
- // Don't wait for memory indexing - do it in background
2121
- // This might be causing the timeout
2145
+ // Skip memory indexing for now - it might be causing timeouts
2146
+ // TODO: Investigate why memory indexing causes timeouts
2147
+ /*
2122
2148
  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
- });
2149
+ this.intelligentlyIndex(artifact).then(indexed => {
2150
+ this.storeInMemory(indexed).catch(err => {
2151
+ this.logger.warn('Failed to store artifact in memory:', err);
2127
2152
  });
2153
+ });
2128
2154
  });
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
2155
+ */
2136
2156
  return {
2137
2157
  content: [
2138
2158
  {
2139
2159
  type: 'text',
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}`,
2160
+ text: `āœ… Found artifact by sys_id!\n\nšŸŽÆ **${formattedArtifact.name}**\nšŸ†” sys_id: ${args.sys_id}\nšŸ“Š Table: ${args.table}\n\n**All Fields:**\n${JSON.stringify(formattedArtifact, null, 2)}`,
2141
2161
  },
2142
2162
  ],
2143
2163
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "2.6.3",
3
+ "version": "2.6.5",
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",
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Example: ServiceNow Deployment MCP Server - REFACTORED
4
- *
5
- * Shows the DRY improvement by using BaseMCPServer
6
- * Compare this to the original 500+ line servers - now only ~150 lines!
7
- */
8
- import { BaseMCPServer } from './base-mcp-server.js';
9
- export declare class ServiceNowDeploymentMCPRefactored extends BaseMCPServer {
10
- constructor();
11
- /**
12
- * Only implement tool-specific logic
13
- * All auth, error handling, metrics are inherited!
14
- */
15
- protected setupTools(): void;
16
- private deployArtifact;
17
- }
18
- //# sourceMappingURL=example-refactored-server.d.ts.map
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- /**
4
- * Example: ServiceNow Deployment MCP Server - REFACTORED
5
- *
6
- * Shows the DRY improvement by using BaseMCPServer
7
- * Compare this to the original 500+ line servers - now only ~150 lines!
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ServiceNowDeploymentMCPRefactored = void 0;
11
- const base_mcp_server_js_1 = require("./base-mcp-server.js");
12
- class ServiceNowDeploymentMCPRefactored extends base_mcp_server_js_1.BaseMCPServer {
13
- constructor() {
14
- super({
15
- name: 'servicenow-deployment',
16
- version: '2.0.0',
17
- description: 'Unified deployment tools for ServiceNow artifacts'
18
- });
19
- }
20
- /**
21
- * Only implement tool-specific logic
22
- * All auth, error handling, metrics are inherited!
23
- */
24
- setupTools() {
25
- // Register deployment tool
26
- this.registerTool({
27
- name: 'snow_deploy',
28
- description: 'Deploy ServiceNow artifacts',
29
- inputSchema: {
30
- type: 'object',
31
- properties: {
32
- type: { type: 'string', enum: ['widget', 'flow', 'script'] },
33
- config: { type: 'object' },
34
- },
35
- required: ['type', 'config'],
36
- },
37
- },
38
- // No auth check needed - handled by base class!
39
- async (args) => this.deployArtifact(args));
40
- }
41
- async deployArtifact(args) {
42
- // Pure business logic - no error handling needed
43
- switch (args.type) {
44
- case 'widget':
45
- return await this.client.createRecord('sp_widget', args.config);
46
- case 'flow':
47
- return await this.client.createRecord('sys_hub_flow', args.config);
48
- case 'script':
49
- return await this.client.createRecord('sys_script_include', args.config);
50
- default:
51
- throw new Error(`Unknown type: ${args.type}`);
52
- }
53
- }
54
- }
55
- exports.ServiceNowDeploymentMCPRefactored = ServiceNowDeploymentMCPRefactored;
56
- // Original server was 500+ lines, now only 50 lines!
57
- // All common functionality inherited from BaseMCPServer
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * servicenow-automation MCP Server - REFACTORED
4
- * Uses BaseMCPServer to eliminate code duplication
5
- */
6
- import { BaseMCPServer, ToolResult } from './base-mcp-server.js';
7
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
8
- export declare class ServiceNowAutomationMCP extends BaseMCPServer {
9
- constructor();
10
- protected setupTools(): void;
11
- protected getTools(): Tool[];
12
- protected executeTool(name: string, args: any): Promise<ToolResult>;
13
- private handleSnowCreateScheduledJob;
14
- private handleSnowCreateEventRule;
15
- private handleSnowCreateNotification;
16
- private handleSnowCreateSlaDefinition;
17
- private handleSnowCreateEscalationRule;
18
- private handleSnowCreateWorkflowActivity;
19
- private handleSnowDiscoverSchedules;
20
- private handleSnowDiscoverEvents;
21
- private handleSnowDiscoverAutomationJobs;
22
- private handleSnowTestScheduledJob;
23
- private parseScheduleType;
24
- private parseScheduleTime;
25
- }
26
- //# sourceMappingURL=servicenow-automation-mcp-refactored.d.ts.map