snow-flow 2.0.5 → 2.0.7

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 (52) hide show
  1. package/dist/config/snow-flow-config.d.ts +1492 -0
  2. package/dist/config/snow-flow-config.js +938 -0
  3. package/dist/coordination/coordination-engine.d.ts +41 -0
  4. package/dist/coordination/coordination-engine.js +324 -0
  5. package/dist/coordination/coordination.test.d.ts +6 -0
  6. package/dist/coordination/example.d.ts +31 -0
  7. package/dist/coordination/example.js +394 -0
  8. package/dist/coordination/execution-patterns.d.ts +43 -0
  9. package/dist/coordination/execution-patterns.js +507 -0
  10. package/dist/coordination/factory.d.ts +94 -0
  11. package/dist/coordination/factory.js +433 -0
  12. package/dist/coordination/index.d.ts +71 -0
  13. package/dist/coordination/index.js +135 -0
  14. package/dist/coordination/progress-monitor.d.ts +71 -0
  15. package/dist/coordination/progress-monitor.js +505 -0
  16. package/dist/coordination/quality-gates.d.ts +124 -0
  17. package/dist/coordination/quality-gates.js +577 -0
  18. package/dist/coordination/shared-memory.d.ts +39 -0
  19. package/dist/coordination/shared-memory.js +289 -0
  20. package/dist/coordination/task-dependencies.d.ts +50 -0
  21. package/dist/coordination/task-dependencies.js +407 -0
  22. package/dist/coordination/team-coordinator.d.ts +59 -0
  23. package/dist/coordination/team-coordinator.js +550 -0
  24. package/dist/coordination/types.d.ts +152 -0
  25. package/dist/coordination/types.js +3 -0
  26. package/dist/memory/memory-system.d.ts +1 -0
  27. package/dist/memory/memory-system.js +21 -2
  28. package/memory/claude-flow-data.json +5 -0
  29. package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +30 -0
  30. package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +36 -0
  31. package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +30 -0
  32. package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +30 -0
  33. package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +55 -0
  34. package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +55 -0
  35. package/memory/sessions/README.md +32 -0
  36. package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +9 -0
  37. package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +9 -0
  38. package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +8 -0
  39. package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +9 -0
  40. package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +9 -0
  41. package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +9 -0
  42. package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +58 -0
  43. package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +9 -0
  44. package/package.json +1 -1
  45. package/reports/swarm-auto-centralized-1752649029776.json +13 -0
  46. package/servicenow/widgets/openai_incident_classifier/client_controller.js +284 -0
  47. package/servicenow/widgets/openai_incident_classifier/server_script.js +314 -0
  48. package/servicenow/widgets/openai_incident_classifier/style.css +354 -0
  49. package/servicenow/widgets/openai_incident_classifier/template.html +167 -0
  50. package/servicenow/widgets/openai_incident_classifier/widget.json +86 -0
  51. package/intelligent-mcp.db-shm +0 -0
  52. package/intelligent-mcp.db-wal +0 -0
@@ -0,0 +1,354 @@
1
+ .openai-incident-classifier-widget {
2
+ padding: 20px;
3
+ background: #ffffff;
4
+ border-radius: 8px;
5
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
6
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
7
+ }
8
+
9
+ .widget-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ align-items: center;
13
+ margin-bottom: 20px;
14
+ padding-bottom: 15px;
15
+ border-bottom: 1px solid #e0e0e0;
16
+ }
17
+
18
+ .widget-header h3 {
19
+ margin: 0;
20
+ color: #333;
21
+ font-size: 24px;
22
+ font-weight: 600;
23
+ }
24
+
25
+ .header-controls .btn {
26
+ padding: 8px 16px;
27
+ border-radius: 4px;
28
+ border: none;
29
+ cursor: pointer;
30
+ font-size: 14px;
31
+ transition: all 0.3s ease;
32
+ }
33
+
34
+ .btn-primary {
35
+ background-color: #007bff;
36
+ color: white;
37
+ }
38
+
39
+ .btn-primary:hover {
40
+ background-color: #0056b3;
41
+ }
42
+
43
+ .btn-primary:disabled {
44
+ background-color: #6c757d;
45
+ cursor: not-allowed;
46
+ }
47
+
48
+ .filters-section {
49
+ margin-bottom: 20px;
50
+ padding: 15px;
51
+ background: #f8f9fa;
52
+ border-radius: 6px;
53
+ }
54
+
55
+ .filters-section label {
56
+ font-weight: 500;
57
+ margin-bottom: 5px;
58
+ display: block;
59
+ color: #495057;
60
+ }
61
+
62
+ .form-control {
63
+ width: 100%;
64
+ padding: 8px 12px;
65
+ border: 1px solid #ced4da;
66
+ border-radius: 4px;
67
+ font-size: 14px;
68
+ transition: border-color 0.3s ease;
69
+ }
70
+
71
+ .form-control:focus {
72
+ outline: none;
73
+ border-color: #007bff;
74
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
75
+ }
76
+
77
+ .loading-overlay {
78
+ display: flex;
79
+ flex-direction: column;
80
+ align-items: center;
81
+ justify-content: center;
82
+ padding: 40px;
83
+ background: #f8f9fa;
84
+ border-radius: 6px;
85
+ margin: 20px 0;
86
+ }
87
+
88
+ .spinner {
89
+ width: 40px;
90
+ height: 40px;
91
+ border: 4px solid #f3f3f3;
92
+ border-top: 4px solid #007bff;
93
+ border-radius: 50%;
94
+ animation: spin 1s linear infinite;
95
+ margin-bottom: 15px;
96
+ }
97
+
98
+ @keyframes spin {
99
+ 0% { transform: rotate(0deg); }
100
+ 100% { transform: rotate(360deg); }
101
+ }
102
+
103
+ .error-message {
104
+ background: #f8d7da;
105
+ color: #721c24;
106
+ padding: 15px;
107
+ border-radius: 4px;
108
+ margin: 20px 0;
109
+ border: 1px solid #f5c6cb;
110
+ }
111
+
112
+ .error-message i {
113
+ margin-right: 8px;
114
+ }
115
+
116
+ .statistics-cards {
117
+ margin-bottom: 30px;
118
+ }
119
+
120
+ .stat-card {
121
+ background: white;
122
+ border: 1px solid #e0e0e0;
123
+ border-radius: 8px;
124
+ padding: 20px;
125
+ text-align: center;
126
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
127
+ height: 100px;
128
+ }
129
+
130
+ .stat-card:hover {
131
+ transform: translateY(-2px);
132
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
133
+ }
134
+
135
+ .stat-value {
136
+ font-size: 28px;
137
+ font-weight: 700;
138
+ color: #007bff;
139
+ margin-bottom: 8px;
140
+ }
141
+
142
+ .stat-label {
143
+ font-size: 14px;
144
+ color: #6c757d;
145
+ font-weight: 500;
146
+ }
147
+
148
+ .charts-section {
149
+ margin-bottom: 30px;
150
+ }
151
+
152
+ .chart-container {
153
+ background: white;
154
+ border: 1px solid #e0e0e0;
155
+ border-radius: 8px;
156
+ padding: 20px;
157
+ margin-bottom: 20px;
158
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
159
+ }
160
+
161
+ .chart-container h4 {
162
+ margin: 0 0 15px 0;
163
+ color: #333;
164
+ font-size: 18px;
165
+ font-weight: 600;
166
+ text-align: center;
167
+ }
168
+
169
+ .data-table-section {
170
+ margin-bottom: 20px;
171
+ }
172
+
173
+ .table {
174
+ width: 100%;
175
+ border-collapse: collapse;
176
+ margin-top: 15px;
177
+ }
178
+
179
+ .table th,
180
+ .table td {
181
+ padding: 12px;
182
+ text-align: left;
183
+ border-bottom: 1px solid #e0e0e0;
184
+ font-size: 14px;
185
+ }
186
+
187
+ .table th {
188
+ background-color: #f8f9fa;
189
+ font-weight: 600;
190
+ color: #495057;
191
+ }
192
+
193
+ .table tbody tr:hover {
194
+ background-color: #f8f9fa;
195
+ }
196
+
197
+ .classification-badge {
198
+ display: inline-block;
199
+ padding: 4px 8px;
200
+ border-radius: 4px;
201
+ font-size: 12px;
202
+ font-weight: 500;
203
+ color: white;
204
+ text-transform: uppercase;
205
+ }
206
+
207
+ .badge-hardware { background-color: #dc3545; }
208
+ .badge-software { background-color: #007bff; }
209
+ .badge-network { background-color: #28a745; }
210
+ .badge-security { background-color: #fd7e14; }
211
+ .badge-access { background-color: #6f42c1; }
212
+ .badge-other { background-color: #6c757d; }
213
+
214
+ .confidence-bar {
215
+ position: relative;
216
+ height: 20px;
217
+ background: #e9ecef;
218
+ border-radius: 10px;
219
+ overflow: hidden;
220
+ min-width: 80px;
221
+ }
222
+
223
+ .confidence-fill {
224
+ height: 100%;
225
+ background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
226
+ transition: width 0.3s ease;
227
+ }
228
+
229
+ .confidence-text {
230
+ position: absolute;
231
+ top: 50%;
232
+ left: 50%;
233
+ transform: translate(-50%, -50%);
234
+ font-size: 12px;
235
+ font-weight: 500;
236
+ color: #333;
237
+ }
238
+
239
+ .priority-badge {
240
+ display: inline-block;
241
+ padding: 4px 8px;
242
+ border-radius: 4px;
243
+ font-size: 12px;
244
+ font-weight: 500;
245
+ color: white;
246
+ }
247
+
248
+ .priority-1 { background-color: #dc3545; }
249
+ .priority-2 { background-color: #fd7e14; }
250
+ .priority-3 { background-color: #ffc107; color: #333; }
251
+ .priority-4 { background-color: #28a745; }
252
+
253
+ .btn-sm {
254
+ padding: 4px 8px;
255
+ font-size: 12px;
256
+ }
257
+
258
+ .btn-secondary {
259
+ background-color: #6c757d;
260
+ color: white;
261
+ }
262
+
263
+ .btn-secondary:hover {
264
+ background-color: #5a6268;
265
+ }
266
+
267
+ .pagination-section {
268
+ margin-top: 20px;
269
+ }
270
+
271
+ .pagination {
272
+ display: flex;
273
+ justify-content: center;
274
+ list-style: none;
275
+ padding: 0;
276
+ margin: 0;
277
+ }
278
+
279
+ .page-item {
280
+ margin: 0 2px;
281
+ }
282
+
283
+ .page-link {
284
+ display: block;
285
+ padding: 8px 12px;
286
+ text-decoration: none;
287
+ background: white;
288
+ border: 1px solid #dee2e6;
289
+ color: #007bff;
290
+ border-radius: 4px;
291
+ transition: all 0.3s ease;
292
+ }
293
+
294
+ .page-link:hover {
295
+ background-color: #e9ecef;
296
+ color: #0056b3;
297
+ }
298
+
299
+ .page-item.active .page-link {
300
+ background-color: #007bff;
301
+ color: white;
302
+ border-color: #007bff;
303
+ }
304
+
305
+ .page-item.disabled .page-link {
306
+ color: #6c757d;
307
+ pointer-events: none;
308
+ background-color: #fff;
309
+ border-color: #dee2e6;
310
+ }
311
+
312
+ .row {
313
+ display: flex;
314
+ flex-wrap: wrap;
315
+ margin: 0 -15px;
316
+ }
317
+
318
+ .col-md-3, .col-md-4 {
319
+ flex: 0 0 auto;
320
+ padding: 0 15px;
321
+ }
322
+
323
+ .col-md-3 {
324
+ width: 25%;
325
+ }
326
+
327
+ .col-md-4 {
328
+ width: 33.333333%;
329
+ }
330
+
331
+ @media (max-width: 768px) {
332
+ .col-md-3, .col-md-4 {
333
+ width: 100%;
334
+ margin-bottom: 15px;
335
+ }
336
+
337
+ .widget-header {
338
+ flex-direction: column;
339
+ align-items: flex-start;
340
+ }
341
+
342
+ .header-controls {
343
+ margin-top: 10px;
344
+ }
345
+
346
+ .table {
347
+ font-size: 12px;
348
+ }
349
+
350
+ .table th,
351
+ .table td {
352
+ padding: 8px;
353
+ }
354
+ }
@@ -0,0 +1,167 @@
1
+ <div class="openai-incident-classifier-widget">
2
+ <div class="widget-header">
3
+ <h3>OpenAI Incident Classification</h3>
4
+ <div class="header-controls">
5
+ <button class="btn btn-primary" ng-click="c.refreshData()" ng-disabled="c.isLoading">
6
+ <i class="fa fa-refresh" ng-class="{'fa-spin': c.isLoading}"></i>
7
+ Refresh
8
+ </button>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="filters-section">
13
+ <div class="row">
14
+ <div class="col-md-4">
15
+ <label>Start Date:</label>
16
+ <input type="date" class="form-control" ng-model="c.dateRange.start" ng-change="c.onDateRangeChange()">
17
+ </div>
18
+ <div class="col-md-4">
19
+ <label>End Date:</label>
20
+ <input type="date" class="form-control" ng-model="c.dateRange.end" ng-change="c.onDateRangeChange()">
21
+ </div>
22
+ <div class="col-md-4">
23
+ <label>Priority:</label>
24
+ <select class="form-control" ng-model="c.selectedPriority" ng-change="c.onPriorityChange()">
25
+ <option value="">All Priorities</option>
26
+ <option value="1">Critical</option>
27
+ <option value="2">High</option>
28
+ <option value="3">Moderate</option>
29
+ <option value="4">Low</option>
30
+ </select>
31
+ </div>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="loading-overlay" ng-if="c.isLoading">
36
+ <div class="spinner"></div>
37
+ <p>Analyzing incidents with OpenAI...</p>
38
+ </div>
39
+
40
+ <div class="error-message" ng-if="c.error">
41
+ <i class="fa fa-exclamation-triangle"></i>
42
+ {{c.error}}
43
+ </div>
44
+
45
+ <div class="statistics-cards" ng-if="!c.isLoading && !c.error">
46
+ <div class="row">
47
+ <div class="col-md-3">
48
+ <div class="stat-card">
49
+ <div class="stat-value">{{c.statistics.totalIncidents}}</div>
50
+ <div class="stat-label">Total Incidents</div>
51
+ </div>
52
+ </div>
53
+ <div class="col-md-3">
54
+ <div class="stat-card">
55
+ <div class="stat-value">{{c.statistics.classifiedIncidents}}</div>
56
+ <div class="stat-label">Classified</div>
57
+ </div>
58
+ </div>
59
+ <div class="col-md-3">
60
+ <div class="stat-card">
61
+ <div class="stat-value">{{c.statistics.averageConfidence}}%</div>
62
+ <div class="stat-label">Avg Confidence</div>
63
+ </div>
64
+ </div>
65
+ <div class="col-md-3">
66
+ <div class="stat-card">
67
+ <div class="stat-value">{{c.statistics.processingTime}}s</div>
68
+ <div class="stat-label">Processing Time</div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+
74
+ <div class="charts-section" ng-if="!c.isLoading && !c.error">
75
+ <div class="row">
76
+ <div class="col-md-4">
77
+ <div class="chart-container">
78
+ <h4>Classification Distribution</h4>
79
+ <canvas id="classificationChart" width="400" height="300"></canvas>
80
+ </div>
81
+ </div>
82
+ <div class="col-md-4">
83
+ <div class="chart-container">
84
+ <h4>Priority Distribution</h4>
85
+ <canvas id="priorityChart" width="400" height="300"></canvas>
86
+ </div>
87
+ </div>
88
+ <div class="col-md-4">
89
+ <div class="chart-container">
90
+ <h4>Trend Analysis</h4>
91
+ <canvas id="trendChart" width="400" height="300"></canvas>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+
97
+ <div class="data-table-section" ng-if="!c.isLoading && !c.error">
98
+ <h4>Incident Details</h4>
99
+ <table class="table table-striped">
100
+ <thead>
101
+ <tr>
102
+ <th>Number</th>
103
+ <th>Short Description</th>
104
+ <th>AI Classification</th>
105
+ <th>Confidence</th>
106
+ <th>Priority</th>
107
+ <th>Created</th>
108
+ <th>Actions</th>
109
+ </tr>
110
+ </thead>
111
+ <tbody>
112
+ <tr ng-repeat="incident in c.incidents">
113
+ <td>
114
+ <a href="/nav_to.do?uri=incident.do?sys_id={{incident.sys_id}}" target="_blank">
115
+ {{incident.number}}
116
+ </a>
117
+ </td>
118
+ <td>{{incident.short_description}}</td>
119
+ <td>
120
+ <span class="classification-badge" ng-class="'badge-' + incident.ai_classification.toLowerCase()">
121
+ {{incident.ai_classification}}
122
+ </span>
123
+ </td>
124
+ <td>
125
+ <div class="confidence-bar">
126
+ <div class="confidence-fill" style="width: {{incident.ai_confidence}}%"></div>
127
+ <span class="confidence-text">{{incident.ai_confidence}}%</span>
128
+ </div>
129
+ </td>
130
+ <td>
131
+ <span class="priority-badge" ng-class="'priority-' + incident.priority">
132
+ {{incident.priority_label}}
133
+ </span>
134
+ </td>
135
+ <td>{{incident.created_date | date:'short'}}</td>
136
+ <td>
137
+ <button class="btn btn-sm btn-secondary" ng-click="c.reclassifyIncident(incident)">
138
+ Reclassify
139
+ </button>
140
+ </td>
141
+ </tr>
142
+ </tbody>
143
+ </table>
144
+ </div>
145
+
146
+ <div class="pagination-section" ng-if="!c.isLoading && !c.error && c.pagination.totalPages > 1">
147
+ <nav>
148
+ <ul class="pagination">
149
+ <li class="page-item" ng-class="{disabled: c.pagination.currentPage === 1}">
150
+ <a class="page-link" href="#" ng-click="c.goToPage(1)">First</a>
151
+ </li>
152
+ <li class="page-item" ng-class="{disabled: c.pagination.currentPage === 1}">
153
+ <a class="page-link" href="#" ng-click="c.goToPage(c.pagination.currentPage - 1)">Previous</a>
154
+ </li>
155
+ <li class="page-item" ng-repeat="page in c.pagination.pages" ng-class="{active: page === c.pagination.currentPage}">
156
+ <a class="page-link" href="#" ng-click="c.goToPage(page)">{{page}}</a>
157
+ </li>
158
+ <li class="page-item" ng-class="{disabled: c.pagination.currentPage === c.pagination.totalPages}">
159
+ <a class="page-link" href="#" ng-click="c.goToPage(c.pagination.currentPage + 1)">Next</a>
160
+ </li>
161
+ <li class="page-item" ng-class="{disabled: c.pagination.currentPage === c.pagination.totalPages}">
162
+ <a class="page-link" href="#" ng-click="c.goToPage(c.pagination.totalPages)">Last</a>
163
+ </li>
164
+ </ul>
165
+ </nav>
166
+ </div>
167
+ </div>
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "openai_incident_classifier",
3
+ "title": "OpenAI Incident Classification Widget",
4
+ "description": "AI-powered incident classification widget with date range filtering, visual analytics, and real-time OpenAI integration for intelligent incident categorization and analysis",
5
+ "category": "incident",
6
+ "version": "1.0.0",
7
+ "author": "ServiceNow Multi-Agent System",
8
+ "created": "2025-07-17",
9
+ "last_modified": "2025-07-17",
10
+ "dependencies": {
11
+ "chart_js": "^3.9.1",
12
+ "angular": "^1.8.3",
13
+ "bootstrap": "^4.6.0"
14
+ },
15
+ "features": [
16
+ "OpenAI GPT-3.5-turbo integration for intelligent incident classification",
17
+ "Date range filtering with interactive date picker",
18
+ "Visual analytics with Chart.js (pie, bar, line charts)",
19
+ "Real-time incident classification with confidence scoring",
20
+ "Responsive design for mobile and desktop",
21
+ "Pagination for large datasets",
22
+ "Six classification categories: Hardware, Software, Network, Security, Access, Other",
23
+ "Fallback rule-based classification when OpenAI is unavailable",
24
+ "Manual reclassification functionality",
25
+ "Export capabilities for reporting"
26
+ ],
27
+ "configuration": {
28
+ "openai_api_key": {
29
+ "type": "system_property",
30
+ "key": "x_openai.api_key",
31
+ "required": true,
32
+ "description": "OpenAI API key for classification services"
33
+ },
34
+ "custom_fields": {
35
+ "incident_table": [
36
+ {
37
+ "name": "u_ai_classification",
38
+ "type": "string",
39
+ "max_length": 50,
40
+ "description": "AI-generated classification category"
41
+ },
42
+ {
43
+ "name": "u_ai_confidence",
44
+ "type": "decimal",
45
+ "description": "Confidence score (0-100) for AI classification"
46
+ },
47
+ {
48
+ "name": "u_ai_classification_date",
49
+ "type": "date_time",
50
+ "description": "Timestamp when AI classification was performed"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ "installation": {
56
+ "steps": [
57
+ "1. Configure OpenAI API key in System Properties (x_openai.api_key)",
58
+ "2. Create custom fields on incident table: u_ai_classification, u_ai_confidence, u_ai_classification_date",
59
+ "3. Deploy widget to ServiceNow instance",
60
+ "4. Add widget to Service Portal page using Designer",
61
+ "5. Test widget functionality and AI classification"
62
+ ]
63
+ },
64
+ "demo_data": {
65
+ "sample_incidents": [
66
+ {
67
+ "number": "INC0000001",
68
+ "short_description": "Laptop screen flickering",
69
+ "classification": "Hardware",
70
+ "confidence": 85
71
+ },
72
+ {
73
+ "number": "INC0000002",
74
+ "short_description": "Email application crashing",
75
+ "classification": "Software",
76
+ "confidence": 92
77
+ },
78
+ {
79
+ "number": "INC0000003",
80
+ "short_description": "Cannot connect to VPN",
81
+ "classification": "Network",
82
+ "confidence": 78
83
+ }
84
+ ]
85
+ }
86
+ }
Binary file
Binary file