snow-flow 2.9.9 → 3.0.0

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 (63) hide show
  1. package/.mcp.json +13 -141
  2. package/.mcp.json.template +11 -25
  3. package/README.md +18 -0
  4. package/claude-flow +81 -0
  5. package/claude-flow.bat +18 -0
  6. package/claude-flow.config.json +20 -0
  7. package/claude-flow.ps1 +24 -0
  8. package/dist/agents/index.d.ts +3 -10
  9. package/dist/agents/index.js +10 -50
  10. package/dist/agents/queen-agent.d.ts +0 -2
  11. package/dist/agents/queen-agent.js +25 -42
  12. package/dist/cli.js +1 -1
  13. package/dist/mcp/servicenow-automation-mcp.js +10 -10
  14. package/dist/mcp/servicenow-deployment-mcp.js +1050 -169
  15. package/dist/mcp/servicenow-development-assistant-mcp.js +13 -65
  16. package/dist/mcp/servicenow-integration-mcp.js +10 -10
  17. package/dist/mcp/servicenow-machine-learning-mcp.js +15 -15
  18. package/dist/mcp/servicenow-operations-mcp.js +23 -23
  19. package/dist/mcp/servicenow-platform-development-mcp.js +9 -9
  20. package/dist/mcp/servicenow-reporting-analytics-mcp.js +11 -11
  21. package/dist/mcp/servicenow-security-compliance-mcp.js +11 -11
  22. package/dist/mcp/servicenow-update-set-mcp.js +9 -9
  23. package/dist/mcp/shared/reliable-memory-manager.d.ts +78 -0
  24. package/dist/mcp/shared/reliable-memory-manager.js +268 -0
  25. package/dist/mcp/snow-flow-mcp.js +341 -87
  26. package/dist/queen/agent-factory.d.ts +4 -2
  27. package/dist/queen/agent-factory.js +72 -25
  28. package/dist/services/tensorflow-ml-service.d.ts +105 -0
  29. package/dist/services/tensorflow-ml-service.js +456 -0
  30. package/dist/services/widget-deployment-service.d.ts +107 -0
  31. package/dist/services/widget-deployment-service.js +332 -0
  32. package/dist/utils/file-storage-fallback.d.ts +62 -0
  33. package/dist/utils/file-storage-fallback.js +289 -0
  34. package/dist/utils/mcp-singleton-enforcer.d.ts +36 -0
  35. package/dist/utils/mcp-singleton-enforcer.js +201 -0
  36. package/dist/utils/mcp-timeout-fix.d.ts +53 -0
  37. package/dist/utils/mcp-timeout-fix.js +221 -0
  38. package/memory/agents/README.md +31 -0
  39. package/memory/claude-flow-data.json +1 -1
  40. package/memory/sessions/README.md +1 -1
  41. package/package.json +4 -2
  42. package/src/agents/README.md +192 -0
  43. package/src/health/README.md +161 -0
  44. package/src/memory/README.md +240 -0
  45. package/src/queen/README.md +403 -0
  46. package/src/schemas/deployment.schema.json +58 -0
  47. package/src/schemas/flow.schema.json +79 -0
  48. package/src/schemas/widget.schema.json +72 -0
  49. package/src/templates/base/application.template.json +45 -0
  50. package/src/templates/base/business_rule.template.json +33 -0
  51. package/src/templates/base/script_include.template.json +18 -0
  52. package/src/templates/base/table.template.json +64 -0
  53. package/src/templates/base/widget.template.json +25 -0
  54. package/src/templates/patterns/composite.incident-management.template.json +140 -0
  55. package/src/templates/patterns/widget.dashboard.template.json +238 -0
  56. package/src/templates/patterns/widget.datatable.template.json +292 -0
  57. package/dist/mcp/servicenow-graph-memory-mcp.js +0 -728
  58. package/servicenow/widgets/openai_incident_classifier/client_controller.js +0 -284
  59. package/servicenow/widgets/openai_incident_classifier/server_script.js +0 -314
  60. package/servicenow/widgets/openai_incident_classifier/style.css +0 -354
  61. package/servicenow/widgets/openai_incident_classifier/template.html +0 -167
  62. package/servicenow/widgets/openai_incident_classifier/widget.json +0 -86
  63. package/test-ml-improvements.sh +0 -76
@@ -34,7 +34,7 @@ class ServiceNowPlatformDevelopmentMCP {
34
34
  tools: [
35
35
  {
36
36
  name: 'snow_create_ui_page',
37
- description: 'Create UI Pages dynamically with full field discovery - NO hardcoded values',
37
+ description: 'Creates UI pages with HTML, JavaScript, and CSS. Supports server-side processing scripts and client-side interactions.',
38
38
  inputSchema: {
39
39
  type: 'object',
40
40
  properties: {
@@ -51,7 +51,7 @@ class ServiceNowPlatformDevelopmentMCP {
51
51
  },
52
52
  {
53
53
  name: 'snow_create_script_include',
54
- description: 'Create Script Includes with dynamic table discovery - NO hardcoded values',
54
+ description: 'Creates reusable Script Includes for server-side logic. Supports client-callable scripts and API exposure.',
55
55
  inputSchema: {
56
56
  type: 'object',
57
57
  properties: {
@@ -66,7 +66,7 @@ class ServiceNowPlatformDevelopmentMCP {
66
66
  },
67
67
  {
68
68
  name: 'snow_create_business_rule',
69
- description: 'Create Business Rules with dynamic table and field discovery - NO hardcoded values',
69
+ description: 'Creates business rules for automated data processing. Configurable timing (before/after/async) and conditional execution.',
70
70
  inputSchema: {
71
71
  type: 'object',
72
72
  properties: {
@@ -82,7 +82,7 @@ class ServiceNowPlatformDevelopmentMCP {
82
82
  },
83
83
  {
84
84
  name: 'snow_create_client_script',
85
- description: 'Create Client Scripts with dynamic form discovery - NO hardcoded values',
85
+ description: 'Creates client-side scripts for form interactions. Supports onLoad, onChange, onSubmit, and onCellEdit events.',
86
86
  inputSchema: {
87
87
  type: 'object',
88
88
  properties: {
@@ -99,7 +99,7 @@ class ServiceNowPlatformDevelopmentMCP {
99
99
  },
100
100
  {
101
101
  name: 'snow_create_ui_policy',
102
- description: 'Create UI Policies with dynamic field discovery - NO hardcoded values',
102
+ description: 'Creates UI policies to control field behavior and visibility. Supports conditional logic and reversible actions.',
103
103
  inputSchema: {
104
104
  type: 'object',
105
105
  properties: {
@@ -115,7 +115,7 @@ class ServiceNowPlatformDevelopmentMCP {
115
115
  },
116
116
  {
117
117
  name: 'snow_create_ui_action',
118
- description: 'Create UI Actions with dynamic form discovery - NO hardcoded values',
118
+ description: 'Creates custom buttons and menu items for forms and lists. Includes conditional visibility and action scripts.',
119
119
  inputSchema: {
120
120
  type: 'object',
121
121
  properties: {
@@ -133,7 +133,7 @@ class ServiceNowPlatformDevelopmentMCP {
133
133
  },
134
134
  {
135
135
  name: 'snow_discover_platform_tables',
136
- description: 'Discover all available platform development tables dynamically',
136
+ description: 'Discovers platform development tables categorized by type (UI, script, policy, security, system).',
137
137
  inputSchema: {
138
138
  type: 'object',
139
139
  properties: {
@@ -143,7 +143,7 @@ class ServiceNowPlatformDevelopmentMCP {
143
143
  },
144
144
  {
145
145
  name: 'snow_discover_table_fields',
146
- description: 'Discover all fields for a specific table dynamically',
146
+ description: 'Retrieves complete field information for any ServiceNow table including types, labels, and constraints.',
147
147
  inputSchema: {
148
148
  type: 'object',
149
149
  properties: {
@@ -154,7 +154,7 @@ class ServiceNowPlatformDevelopmentMCP {
154
154
  },
155
155
  {
156
156
  name: 'snow_table_schema_discovery',
157
- description: 'Comprehensive table schema discovery - structure, relationships, indexes, constraints',
157
+ description: 'Performs comprehensive table schema analysis including structure, relationships, indexes, and inheritance hierarchy.',
158
158
  inputSchema: {
159
159
  type: 'object',
160
160
  properties: {
@@ -33,7 +33,7 @@ class ServiceNowReportingAnalyticsMCP {
33
33
  tools: [
34
34
  {
35
35
  name: 'snow_create_report',
36
- description: 'Create Report with dynamic table and field discovery - NO hardcoded values',
36
+ description: 'Creates reports with filtering, grouping, and aggregation capabilities. Supports multiple output formats and scheduling.',
37
37
  inputSchema: {
38
38
  type: 'object',
39
39
  properties: {
@@ -54,7 +54,7 @@ class ServiceNowReportingAnalyticsMCP {
54
54
  },
55
55
  {
56
56
  name: 'snow_create_dashboard',
57
- description: 'Create Dashboard with dynamic widget discovery',
57
+ description: 'Creates interactive dashboards with configurable widgets, layouts, and refresh intervals.',
58
58
  inputSchema: {
59
59
  type: 'object',
60
60
  properties: {
@@ -71,7 +71,7 @@ class ServiceNowReportingAnalyticsMCP {
71
71
  },
72
72
  {
73
73
  name: 'snow_create_kpi',
74
- description: 'Create KPI with dynamic metric discovery',
74
+ description: 'Creates Key Performance Indicators with targets, thresholds, and automated tracking.',
75
75
  inputSchema: {
76
76
  type: 'object',
77
77
  properties: {
@@ -91,7 +91,7 @@ class ServiceNowReportingAnalyticsMCP {
91
91
  },
92
92
  {
93
93
  name: 'snow_create_data_visualization',
94
- description: 'Create Data Visualization with dynamic chart discovery',
94
+ description: 'Creates data visualizations including charts, graphs, and interactive displays.',
95
95
  inputSchema: {
96
96
  type: 'object',
97
97
  properties: {
@@ -110,7 +110,7 @@ class ServiceNowReportingAnalyticsMCP {
110
110
  },
111
111
  {
112
112
  name: 'snow_create_performance_analytics',
113
- description: 'Create Performance Analytics with dynamic metric discovery',
113
+ description: 'Creates performance analytics configurations for tracking metrics, dimensions, and benchmarks.',
114
114
  inputSchema: {
115
115
  type: 'object',
116
116
  properties: {
@@ -128,7 +128,7 @@ class ServiceNowReportingAnalyticsMCP {
128
128
  },
129
129
  {
130
130
  name: 'snow_create_scheduled_report',
131
- description: 'Create Scheduled Report with dynamic delivery discovery',
131
+ description: 'Creates scheduled reports with automated email delivery in multiple formats.',
132
132
  inputSchema: {
133
133
  type: 'object',
134
134
  properties: {
@@ -145,7 +145,7 @@ class ServiceNowReportingAnalyticsMCP {
145
145
  },
146
146
  {
147
147
  name: 'snow_discover_reporting_tables',
148
- description: 'Discover all tables available for reporting',
148
+ description: 'Discovers tables available for reporting with filtering by category and data availability.',
149
149
  inputSchema: {
150
150
  type: 'object',
151
151
  properties: {
@@ -156,7 +156,7 @@ class ServiceNowReportingAnalyticsMCP {
156
156
  },
157
157
  {
158
158
  name: 'snow_discover_report_fields',
159
- description: 'Discover available fields for reporting on a table',
159
+ description: 'Retrieves reportable fields from tables with type filtering and metadata.',
160
160
  inputSchema: {
161
161
  type: 'object',
162
162
  properties: {
@@ -168,7 +168,7 @@ class ServiceNowReportingAnalyticsMCP {
168
168
  },
169
169
  {
170
170
  name: 'snow_analyze_data_quality',
171
- description: 'Analyze data quality for reporting',
171
+ description: 'Analyzes data quality including completeness, consistency, and accuracy metrics.',
172
172
  inputSchema: {
173
173
  type: 'object',
174
174
  properties: {
@@ -183,7 +183,7 @@ class ServiceNowReportingAnalyticsMCP {
183
183
  },
184
184
  {
185
185
  name: 'snow_generate_insights',
186
- description: 'Generate data insights and recommendations',
186
+ description: 'Generates analytical insights including trends, patterns, anomalies, and actionable recommendations.',
187
187
  inputSchema: {
188
188
  type: 'object',
189
189
  properties: {
@@ -197,7 +197,7 @@ class ServiceNowReportingAnalyticsMCP {
197
197
  },
198
198
  {
199
199
  name: 'snow_export_report_data',
200
- description: 'Export report data in various formats',
200
+ description: 'Exports report data to CSV, Excel, JSON, or XML formats with configurable row limits.',
201
201
  inputSchema: {
202
202
  type: 'object',
203
203
  properties: {
@@ -33,7 +33,7 @@ class ServiceNowSecurityComplianceMCP {
33
33
  tools: [
34
34
  {
35
35
  name: 'snow_create_security_policy',
36
- description: 'Create Security Policy with dynamic rule discovery - NO hardcoded values',
36
+ description: 'Creates security policies for access control and data protection. Configures enforcement levels, scope, and rule sets.',
37
37
  inputSchema: {
38
38
  type: 'object',
39
39
  properties: {
@@ -50,7 +50,7 @@ class ServiceNowSecurityComplianceMCP {
50
50
  },
51
51
  {
52
52
  name: 'snow_create_compliance_rule',
53
- description: 'Create Compliance Rule with dynamic framework discovery',
53
+ description: 'Creates compliance rules for regulatory frameworks (SOX, GDPR, HIPAA). Defines validation, remediation, and severity levels.',
54
54
  inputSchema: {
55
55
  type: 'object',
56
56
  properties: {
@@ -67,7 +67,7 @@ class ServiceNowSecurityComplianceMCP {
67
67
  },
68
68
  {
69
69
  name: 'snow_create_audit_rule',
70
- description: 'Create Audit Rule with dynamic event discovery',
70
+ description: 'Creates audit rules for tracking data changes. Configures monitored events, fields, and retention periods.',
71
71
  inputSchema: {
72
72
  type: 'object',
73
73
  properties: {
@@ -84,7 +84,7 @@ class ServiceNowSecurityComplianceMCP {
84
84
  },
85
85
  {
86
86
  name: 'snow_create_access_control',
87
- description: 'Create Access Control with dynamic role discovery',
87
+ description: 'Creates access control rules for table and field security. Manages role-based permissions and conditional access.',
88
88
  inputSchema: {
89
89
  type: 'object',
90
90
  properties: {
@@ -101,7 +101,7 @@ class ServiceNowSecurityComplianceMCP {
101
101
  },
102
102
  {
103
103
  name: 'snow_create_data_policy',
104
- description: 'Create Data Policy with dynamic field discovery',
104
+ description: 'Creates data classification and protection policies. Configures encryption, masking, and retention requirements.',
105
105
  inputSchema: {
106
106
  type: 'object',
107
107
  properties: {
@@ -119,7 +119,7 @@ class ServiceNowSecurityComplianceMCP {
119
119
  },
120
120
  {
121
121
  name: 'snow_create_vulnerability_scan',
122
- description: 'Create Vulnerability Scan with dynamic discovery',
122
+ description: 'Creates vulnerability scanning configurations. Schedules scans, sets severity thresholds, and enables auto-remediation.',
123
123
  inputSchema: {
124
124
  type: 'object',
125
125
  properties: {
@@ -136,7 +136,7 @@ class ServiceNowSecurityComplianceMCP {
136
136
  },
137
137
  {
138
138
  name: 'snow_discover_security_frameworks',
139
- description: 'Discover available security and compliance frameworks',
139
+ description: 'Discovers security and compliance frameworks available in the instance for policy creation and auditing.',
140
140
  inputSchema: {
141
141
  type: 'object',
142
142
  properties: {
@@ -146,7 +146,7 @@ class ServiceNowSecurityComplianceMCP {
146
146
  },
147
147
  {
148
148
  name: 'snow_discover_security_policies',
149
- description: 'Discover existing security policies and rules',
149
+ description: 'Lists existing security policies and rules with filtering by category and active status.',
150
150
  inputSchema: {
151
151
  type: 'object',
152
152
  properties: {
@@ -157,7 +157,7 @@ class ServiceNowSecurityComplianceMCP {
157
157
  },
158
158
  {
159
159
  name: 'snow_run_compliance_scan',
160
- description: 'Run compliance scan with dynamic rule discovery',
160
+ description: 'Executes compliance scans against selected frameworks. Generates reports and identifies violations.',
161
161
  inputSchema: {
162
162
  type: 'object',
163
163
  properties: {
@@ -170,7 +170,7 @@ class ServiceNowSecurityComplianceMCP {
170
170
  },
171
171
  {
172
172
  name: 'snow_audit_trail__analysis',
173
- description: 'Analyze audit trails for security incidents',
173
+ description: 'Analyzes audit logs for security incidents and anomalies. Supports filtering by time, user, and table.',
174
174
  inputSchema: {
175
175
  type: 'object',
176
176
  properties: {
@@ -184,7 +184,7 @@ class ServiceNowSecurityComplianceMCP {
184
184
  },
185
185
  {
186
186
  name: 'snow_security_risk_assessment',
187
- description: 'Perform security risk assessment',
187
+ description: 'Performs comprehensive security risk assessments with mitigation recommendations and risk scoring.',
188
188
  inputSchema: {
189
189
  type: 'object',
190
190
  properties: {
@@ -66,7 +66,7 @@ class ServiceNowUpdateSetMCP {
66
66
  tools: [
67
67
  {
68
68
  name: 'snow_update_set_create',
69
- description: 'Create a new Update Set for a user story or feature - ALWAYS use this before making changes',
69
+ description: 'Creates a new Update Set for tracking changes related to a user story or feature. Essential for ServiceNow change management and deployment tracking.',
70
70
  inputSchema: {
71
71
  type: 'object',
72
72
  properties: {
@@ -97,7 +97,7 @@ class ServiceNowUpdateSetMCP {
97
97
  },
98
98
  {
99
99
  name: 'snow_update_set_switch',
100
- description: 'Switch to an existing Update Set - use this to continue work on a story',
100
+ description: 'Switches the active Update Set context to an existing set. Ensures all subsequent changes are tracked in the specified Update Set.',
101
101
  inputSchema: {
102
102
  type: 'object',
103
103
  properties: {
@@ -111,7 +111,7 @@ class ServiceNowUpdateSetMCP {
111
111
  },
112
112
  {
113
113
  name: 'snow_update_set_current',
114
- description: 'Get the current active Update Set session',
114
+ description: 'Retrieves information about the currently active Update Set including ID, name, state, and tracked artifacts.',
115
115
  inputSchema: {
116
116
  type: 'object',
117
117
  properties: {}
@@ -119,7 +119,7 @@ class ServiceNowUpdateSetMCP {
119
119
  },
120
120
  {
121
121
  name: 'snow_update_set_list',
122
- description: 'List all Update Sets (in progress and recent)',
122
+ description: 'Lists Update Sets filtered by state (in_progress, complete, released). Provides overview of recent changes and deployment readiness.',
123
123
  inputSchema: {
124
124
  type: 'object',
125
125
  properties: {
@@ -137,7 +137,7 @@ class ServiceNowUpdateSetMCP {
137
137
  },
138
138
  {
139
139
  name: 'snow_update_set_complete',
140
- description: 'Mark Update Set as complete and ready for testing',
140
+ description: 'Marks an Update Set as complete, preventing further changes. Prepares the set for testing, review, and migration to other instances.',
141
141
  inputSchema: {
142
142
  type: 'object',
143
143
  properties: {
@@ -154,7 +154,7 @@ class ServiceNowUpdateSetMCP {
154
154
  },
155
155
  {
156
156
  name: 'snow_update_set_add_artifact',
157
- description: 'Track an artifact in the current Update Set session',
157
+ description: 'Registers an artifact (widget, flow, script) in the active Update Set for tracking. Maintains comprehensive change history for deployments.',
158
158
  inputSchema: {
159
159
  type: 'object',
160
160
  properties: {
@@ -176,7 +176,7 @@ class ServiceNowUpdateSetMCP {
176
176
  },
177
177
  {
178
178
  name: 'snow_update_set_preview',
179
- description: 'Preview all changes in an Update Set',
179
+ description: 'Generates a detailed preview of all changes contained in an Update Set. Shows modified tables, fields, and potential deployment impacts.',
180
180
  inputSchema: {
181
181
  type: 'object',
182
182
  properties: {
@@ -189,7 +189,7 @@ class ServiceNowUpdateSetMCP {
189
189
  },
190
190
  {
191
191
  name: 'snow_update_set_export',
192
- description: 'Export Update Set as XML for backup or migration',
192
+ description: 'Exports Update Set to XML format for backup, version control, or manual migration between instances. Preserves all change records and metadata.',
193
193
  inputSchema: {
194
194
  type: 'object',
195
195
  properties: {
@@ -206,7 +206,7 @@ class ServiceNowUpdateSetMCP {
206
206
  },
207
207
  {
208
208
  name: 'snow_ensure_active_update_set',
209
- description: 'Ensure there is an active Update Set session - creates one automatically if needed',
209
+ description: 'Ensures an active Update Set is available for tracking changes. Automatically creates a contextual Update Set if none exists, preventing untracked modifications.',
210
210
  inputSchema: {
211
211
  type: 'object',
212
212
  properties: {
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Reliable Memory Manager
3
+ * Direct in-memory storage without database dependencies
4
+ * Solves hanging issues with better-sqlite3
5
+ */
6
+ export interface MemoryEntry {
7
+ key: string;
8
+ value: any;
9
+ timestamp: Date;
10
+ expiresAt?: Date;
11
+ sizeBytes: number;
12
+ }
13
+ export declare class ReliableMemoryManager {
14
+ private static instance;
15
+ private memory;
16
+ private logger;
17
+ private readonly MAX_MEMORY_MB;
18
+ private readonly PERSIST_FILE;
19
+ private persistTimer;
20
+ private constructor();
21
+ static getInstance(): ReliableMemoryManager;
22
+ /**
23
+ * Store value in memory with size checking
24
+ */
25
+ store(key: string, value: any, expiresInMs?: number): Promise<void>;
26
+ /**
27
+ * Retrieve value from memory
28
+ */
29
+ retrieve(key: string): Promise<any>;
30
+ /**
31
+ * Delete a key from memory
32
+ */
33
+ delete(key: string): Promise<boolean>;
34
+ /**
35
+ * List all keys with optional pattern matching
36
+ */
37
+ list(pattern?: string): Promise<string[]>;
38
+ /**
39
+ * Clear all memory
40
+ */
41
+ clear(): Promise<void>;
42
+ /**
43
+ * Get memory usage statistics
44
+ */
45
+ getStats(): {
46
+ entries: number;
47
+ totalSizeBytes: number;
48
+ totalSizeMB: number;
49
+ maxSizeMB: number;
50
+ utilizationPercent: number;
51
+ };
52
+ /**
53
+ * Get total memory usage in bytes
54
+ */
55
+ private getMemoryUsageBytes;
56
+ /**
57
+ * Clean up expired entries
58
+ */
59
+ private cleanupExpired;
60
+ /**
61
+ * Persist memory to disk for recovery
62
+ */
63
+ private persistToDisk;
64
+ /**
65
+ * Load memory from disk
66
+ */
67
+ private loadFromDisk;
68
+ /**
69
+ * Start auto-persist timer
70
+ */
71
+ private startAutoPersist;
72
+ /**
73
+ * Stop auto-persist timer
74
+ */
75
+ destroy(): void;
76
+ }
77
+ export declare const reliableMemory: ReliableMemoryManager;
78
+ //# sourceMappingURL=reliable-memory-manager.d.ts.map