snow-flow 3.0.8 → 3.0.10
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/claude-flow.bat +0 -0
- package/claude-flow.ps1 +0 -0
- package/dist/mcp/servicenow-automation-mcp.js +0 -0
- package/dist/mcp/servicenow-deployment-mcp.js +0 -0
- package/dist/mcp/servicenow-integration-mcp.js +0 -0
- package/dist/mcp/servicenow-mcp-server.js +0 -0
- package/dist/mcp/servicenow-operations-mcp.js +0 -0
- package/dist/mcp/servicenow-platform-development-mcp.js +0 -0
- package/dist/mcp/servicenow-progressive-indexer.js +0 -0
- package/dist/mcp/servicenow-reporting-analytics-mcp.js +133 -19
- package/dist/mcp/servicenow-security-compliance-mcp.js +0 -0
- package/dist/mcp/servicenow-update-set-mcp.js +0 -0
- package/dist/mcp/start-all-mcp-servers.js +0 -0
- package/dist/mcp/start-servicenow-mcp.js +0 -0
- package/dist/utils/snow-oauth.js +53 -16
- package/memory/agents/README.md +1 -1
- package/memory/claude-flow-data.json +1 -1
- package/memory/sessions/README.md +1 -1
- package/package.json +2 -2
- package/.mcp.json +0 -22
- package/claude-flow.config.json +0 -20
- package/dist/agents/app-creator.agent.d.ts +0 -55
- package/dist/agents/app-creator.agent.js +0 -1292
- package/dist/agents/base/base-snow-agent.d.ts +0 -75
- package/dist/agents/base/base-snow-agent.js +0 -169
- package/dist/agents/base-snow-agent.d.ts +0 -63
- package/dist/agents/base-snow-agent.js +0 -296
- package/dist/agents/coordinator.d.ts +0 -200
- package/dist/agents/coordinator.js +0 -777
- package/dist/agents/flow-builder-agent.d.ts +0 -18
- package/dist/agents/flow-builder-agent.js +0 -197
- package/dist/agents/queen-403-handler.d.ts +0 -47
- package/dist/agents/queen-403-handler.js +0 -175
- package/dist/agents/queen-agent-example.d.ts +0 -23
- package/dist/agents/queen-agent-example.js +0 -240
- package/dist/agents/queen-agent.test.d.ts +0 -6
- package/dist/agents/script-generator.agent.d.ts +0 -32
- package/dist/agents/script-generator.agent.js +0 -772
- package/dist/agents/script-writer-agent.d.ts +0 -22
- package/dist/agents/script-writer-agent.js +0 -695
- package/dist/agents/security-agent.d.ts +0 -23
- package/dist/agents/security-agent.js +0 -619
- package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
- package/dist/agents/specialists/automation-specialist.agent.js +0 -204
- package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
- package/dist/agents/specialists/data-specialist.agent.js +0 -484
- package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
- package/dist/agents/specialists/integration-specialist.agent.js +0 -725
- package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
- package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
- package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
- package/dist/agents/specialists/security-specialist.agent.js +0 -309
- package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
- package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
- package/dist/agents/teams/base-team.d.ts +0 -72
- package/dist/agents/teams/base-team.js +0 -253
- package/dist/agents/teams/team-types.d.ts +0 -265
- package/dist/agents/teams/team-types.js +0 -3
- package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
- package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
- package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
- package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
- package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
- package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
- package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
- package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
- package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
- package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
- package/dist/agents/test-agent.d.ts +0 -26
- package/dist/agents/test-agent.js +0 -734
- package/dist/agents/test-agents.d.ts +0 -7
- package/dist/agents/test-agents.js +0 -64
- package/dist/agents/ui-builder.agent.d.ts +0 -50
- package/dist/agents/ui-builder.agent.js +0 -1539
- package/dist/agents/widget-builder.agent.d.ts +0 -32
- package/dist/agents/widget-builder.agent.js +0 -439
- package/dist/agents/widget-creator-agent.d.ts +0 -18
- package/dist/agents/widget-creator-agent.js +0 -498
- package/dist/agents/workflow-designer.agent.d.ts +0 -31
- package/dist/agents/workflow-designer.agent.js +0 -583
- package/dist/api/error-handling.d.ts +0 -325
- package/dist/api/error-handling.js +0 -1488
- package/dist/api/flow-designer-api.d.ts +0 -167
- package/dist/api/flow-designer-api.js +0 -554
- package/dist/api/natural-language-mapper.d.ts +0 -124
- package/dist/api/natural-language-mapper.js +0 -501
- package/dist/api/performance-optimizer.d.ts +0 -240
- package/dist/api/performance-optimizer.js +0 -706
- package/dist/api/transaction-manager.d.ts +0 -189
- package/dist/api/transaction-manager.js +0 -576
- package/dist/assembly/team-assembler.d.ts +0 -140
- package/dist/assembly/team-assembler.js +0 -502
- package/dist/benchmark-performance.d.ts +0 -41
- package/dist/benchmark-performance.js +0 -230
- package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
- package/dist/cli/snow-flow-cli-integration.js +0 -396
- package/dist/coordination/coordination-engine.d.ts +0 -41
- package/dist/coordination/coordination-engine.js +0 -324
- package/dist/coordination/coordination.test.d.ts +0 -6
- package/dist/coordination/example.d.ts +0 -31
- package/dist/coordination/example.js +0 -394
- package/dist/coordination/execution-patterns.d.ts +0 -43
- package/dist/coordination/execution-patterns.js +0 -507
- package/dist/coordination/factory.d.ts +0 -94
- package/dist/coordination/factory.js +0 -433
- package/dist/coordination/index.d.ts +0 -71
- package/dist/coordination/index.js +0 -135
- package/dist/coordination/progress-monitor.d.ts +0 -71
- package/dist/coordination/progress-monitor.js +0 -505
- package/dist/coordination/quality-gates.d.ts +0 -124
- package/dist/coordination/quality-gates.js +0 -577
- package/dist/coordination/shared-memory.d.ts +0 -39
- package/dist/coordination/shared-memory.js +0 -289
- package/dist/coordination/task-dependencies.d.ts +0 -50
- package/dist/coordination/task-dependencies.js +0 -407
- package/dist/coordination/team-coordinator.d.ts +0 -59
- package/dist/coordination/team-coordinator.js +0 -550
- package/dist/coordination/types.d.ts +0 -152
- package/dist/coordination/types.js +0 -3
- package/dist/mcp/mcp-wrapper.d.ts +0 -8
- package/dist/mcp/mcp-wrapper.js +0 -77
- package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
- package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
- package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
- package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
- package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
- package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
- package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
- package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
- package/dist/mcp/singleton-check.js +0 -31
- package/dist/mcp/test-simple-mcp.d.ts +0 -6
- package/dist/mcp/test-simple-mcp.js +0 -63
- package/dist/memory/hierarchical-memory-system.d.ts +0 -90
- package/dist/memory/hierarchical-memory-system.js +0 -400
- package/dist/memory/index.d.ts +0 -9
- package/dist/memory/index.js +0 -20
- package/dist/memory/mcp-integration-example.d.ts +0 -6
- package/dist/memory/mcp-integration-example.js +0 -281
- package/dist/memory/memory-client.d.ts +0 -199
- package/dist/memory/memory-client.js +0 -364
- package/dist/memory/memory-manager.d.ts +0 -29
- package/dist/memory/memory-manager.js +0 -280
- package/dist/memory/memory-operations.d.ts +0 -179
- package/dist/memory/memory-operations.js +0 -691
- package/dist/memory/memory-system.d.ts +0 -153
- package/dist/memory/memory-system.js +0 -651
- package/dist/memory/memory-test.d.ts +0 -6
- package/dist/memory/memory-test.js +0 -161
- package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
- package/dist/memory/snow-flow-memory-patterns.js +0 -200
- package/dist/memory/snow-memory.d.ts +0 -54
- package/dist/memory/snow-memory.js +0 -301
- package/dist/memory/swarm-memory.d.ts +0 -135
- package/dist/memory/swarm-memory.js +0 -378
- package/dist/optimization/flow-performance-optimizer.js +0 -723
- package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
- package/dist/orchestration/discovery/service-discovery.js +0 -808
- package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
- package/dist/orchestration/distributed-orchestrator.js +0 -712
- package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
- package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
- package/dist/orchestration/flow-update-orchestrator.js +0 -648
- package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
- package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
- package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
- package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
- package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
- package/dist/orchestration/state/distributed-state-manager.js +0 -716
- package/dist/orchestrator/flow-composer.d.ts +0 -105
- package/dist/orchestrator/flow-composer.js +0 -404
- package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
- package/dist/orchestrator/flow-pattern-templates.js +0 -908
- package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
- package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
- package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
- package/dist/orchestrator/flow-validation-engine.js +0 -913
- package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
- package/dist/orchestrator/snow-orchestrator.js +0 -235
- package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
- package/dist/orchestrator/subflow-creation-handler.js +0 -791
- package/dist/patterns/adaptive-patterns.d.ts +0 -140
- package/dist/patterns/adaptive-patterns.js +0 -549
- package/dist/queen/advanced-integration-test.d.ts +0 -48
- package/dist/queen/advanced-integration-test.js +0 -473
- package/dist/queen/integration-example.d.ts +0 -82
- package/dist/queen/integration-example.js +0 -219
- package/dist/queen/integration-test.d.ts +0 -72
- package/dist/queen/integration-test.js +0 -563
- package/dist/queen/mock-mcp-client.d.ts +0 -71
- package/dist/queen/mock-mcp-client.js +0 -317
- package/dist/queen/run-integration-tests.d.ts +0 -9
- package/dist/queen/run-integration-tests.js +0 -27
- package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
- package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
- package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
- package/dist/sparc/coordinators/team-coordinator.js +0 -402
- package/dist/sparc/modes/team-modes.d.ts +0 -33
- package/dist/sparc/modes/team-modes.js +0 -399
- package/dist/sparc/teams/application-team.d.ts +0 -73
- package/dist/sparc/teams/application-team.js +0 -463
- package/dist/sparc/teams/flow-team.d.ts +0 -67
- package/dist/sparc/teams/flow-team.js +0 -373
- package/dist/sparc/teams/widget-team.d.ts +0 -61
- package/dist/sparc/teams/widget-team.js +0 -280
- package/dist/specialists/app-specialists.d.ts +0 -93
- package/dist/specialists/app-specialists.js +0 -1639
- package/dist/specialists/base-specialist.d.ts +0 -19
- package/dist/specialists/base-specialist.js +0 -54
- package/dist/specialists/flow-specialists.d.ts +0 -113
- package/dist/specialists/flow-specialists.js +0 -1787
- package/dist/specialists/individual-specialists.d.ts +0 -67
- package/dist/specialists/individual-specialists.js +0 -632
- package/dist/specialists/widget-specialists.d.ts +0 -70
- package/dist/specialists/widget-specialists.js +0 -1264
- package/dist/src/utils/agent-detector.js +0 -655
- package/dist/teams/adaptive-team.d.ts +0 -81
- package/dist/teams/adaptive-team.js +0 -1153
- package/dist/teams/application-team.d.ts +0 -30
- package/dist/teams/application-team.js +0 -547
- package/dist/teams/base-team.d.ts +0 -55
- package/dist/teams/base-team.js +0 -243
- package/dist/teams/flow-team.d.ts +0 -28
- package/dist/teams/flow-team.js +0 -525
- package/dist/teams/widget-team.d.ts +0 -26
- package/dist/teams/widget-team.js +0 -459
- package/dist/templates/flow-template-system.js +0 -625
- package/dist/test-fetch-incidents.d.ts +0 -2
- package/dist/test-fetch-incidents.js +0 -84
- package/dist/test-incident-access.d.ts +0 -2
- package/dist/test-incident-access.js +0 -72
- package/dist/test-iphone-flow.js +0 -189
- package/dist/test-limit-problem.d.ts +0 -2
- package/dist/test-limit-problem.js +0 -60
- package/dist/test-ml-batch-fix.d.ts +0 -2
- package/dist/test-ml-batch-fix.js +0 -104
- package/dist/test-ml-batch.d.ts +0 -2
- package/dist/test-ml-batch.js +0 -87
- package/dist/test-ml-query.d.ts +0 -2
- package/dist/test-ml-query.js +0 -100
- package/dist/test-ml-training-fix.d.ts +0 -12
- package/dist/test-ml-training-fix.js +0 -113
- package/dist/test-ml-training.d.ts +0 -2
- package/dist/test-ml-training.js +0 -32
- package/dist/test-operations-query.d.ts +0 -2
- package/dist/test-operations-query.js +0 -84
- package/dist/test-performance-query.d.ts +0 -2
- package/dist/test-performance-query.js +0 -52
- package/dist/test-singleton-protection.d.ts +0 -8
- package/dist/test-singleton-protection.js +0 -110
- package/dist/test-smart-limits.d.ts +0 -13
- package/dist/test-smart-limits.js +0 -100
- package/dist/test-snow-query-incidents.d.ts +0 -2
- package/dist/test-snow-query-incidents.js +0 -66
- package/dist/test-universal-query.d.ts +0 -2
- package/dist/test-universal-query.js +0 -106
- package/dist/testing/flow-testing-automation.js +0 -641
- package/dist/utils/complete-flow-xml-generator.js +0 -1285
- package/dist/utils/file-storage-fallback.d.ts +0 -62
- package/dist/utils/file-storage-fallback.js +0 -289
- package/dist/utils/flow-api-discovery.d.ts +0 -151
- package/dist/utils/flow-api-discovery.js +0 -439
- package/dist/utils/flow-examples.js +0 -720
- package/dist/utils/flow-structure-builder.js +0 -677
- package/dist/utils/flow-xml-generator.d.ts +0 -41
- package/dist/utils/flow-xml-generator.js +0 -258
- package/dist/utils/improved-flow-xml-generator.js +0 -820
- package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
- package/dist/utils/mcp-process-manager.backup.js +0 -220
- package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
- package/dist/utils/mcp-singleton-enforcer.js +0 -201
- package/dist/utils/mcp-timeout-fix.d.ts +0 -53
- package/dist/utils/mcp-timeout-fix.js +0 -221
- package/dist/utils/migrate-claude-flow.d.ts +0 -22
- package/dist/utils/migrate-claude-flow.js +0 -120
- package/dist/utils/scope-utils.d.ts +0 -72
- package/dist/utils/scope-utils.js +0 -386
- package/dist/utils/snow-oauth-old.d.ts +0 -65
- package/dist/utils/snow-oauth-old.js +0 -345
- package/dist/utils/xml-first-flow-generator.js +0 -513
- package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
- package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
- package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
- package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
- package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
- package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
- package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
- package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
- package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
- package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
- package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
- package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
- package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
- package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
- package/reports/swarm-auto-centralized-1752649029776.json +0 -13
- package/src/memory/README.md +0 -240
package/claude-flow.bat
CHANGED
|
File without changes
|
package/claude-flow.ps1
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -264,28 +264,46 @@ class ServiceNowReportingAnalyticsMCP {
|
|
|
264
264
|
}
|
|
265
265
|
const availableFields = await this.getTableFields(args.table);
|
|
266
266
|
const aggregationFunctions = await this.getAggregationFunctions();
|
|
267
|
+
// Build field list string for ServiceNow
|
|
268
|
+
const fieldList = args.fields?.join(',') || availableFields.slice(0, 10).join(',') || 'sys_id,sys_created_on,sys_updated_on';
|
|
269
|
+
// Build proper aggregation configuration
|
|
270
|
+
const aggregateConfig = args.aggregations?.length > 0 ? {
|
|
271
|
+
aggregate: true,
|
|
272
|
+
aggregation_source: args.aggregations[0]?.field || '',
|
|
273
|
+
aggregate_type: args.aggregations[0]?.type || 'COUNT'
|
|
274
|
+
} : {
|
|
275
|
+
aggregate: false
|
|
276
|
+
};
|
|
267
277
|
const reportData = {
|
|
268
|
-
|
|
278
|
+
title: args.name,
|
|
269
279
|
table: tableInfo.name,
|
|
270
280
|
description: args.description || '',
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
group_by:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
281
|
+
filter: args.conditions || '',
|
|
282
|
+
field_list: fieldList,
|
|
283
|
+
group_by: args.groupBy?.join(',') || '',
|
|
284
|
+
order_by: args.sortBy || 'sys_created_on',
|
|
285
|
+
order_direction: args.sortOrder === 'desc' ? 'DESC' : 'ASC',
|
|
286
|
+
type: args.aggregations?.length > 0 ? 'bar' : 'list',
|
|
287
|
+
chart_type: args.aggregations?.length > 0 ? 'bar' : 'none',
|
|
288
|
+
is_scheduled: args.schedule ? true : false,
|
|
289
|
+
schedule_type: args.schedule || 'daily',
|
|
290
|
+
export_format: args.format?.toLowerCase() || 'pdf',
|
|
291
|
+
is_published: true,
|
|
292
|
+
roles: '',
|
|
293
|
+
active: true,
|
|
294
|
+
...aggregateConfig
|
|
279
295
|
};
|
|
280
296
|
const updateSetResult = await this.client.ensureUpdateSet();
|
|
281
297
|
const response = await this.client.createRecord('sys_report', reportData);
|
|
282
298
|
if (!response.success) {
|
|
283
299
|
throw new Error(`Failed to create Report: ${response.error}`);
|
|
284
300
|
}
|
|
301
|
+
// Create a shareable link for the report
|
|
302
|
+
const reportUrl = `${process.env.SNOW_INSTANCE}/sys_report_template.do?jvar_report_id=${response.data.sys_id}`;
|
|
285
303
|
return {
|
|
286
304
|
content: [{
|
|
287
305
|
type: 'text',
|
|
288
|
-
text: `✅ Report created successfully!\n\n📊 **${args.name}**\n🆔 sys_id: ${response.data.sys_id}\n📋 Table: ${tableInfo.label} (${tableInfo.name})\n📝 Fields: ${
|
|
306
|
+
text: `✅ Report created successfully!\n\n📊 **${args.name}**\n🆔 sys_id: ${response.data.sys_id}\n📋 Table: ${tableInfo.label} (${tableInfo.name})\n📝 Fields: ${fieldList}\n${args.groupBy?.length ? `📊 Group By: ${args.groupBy.join(', ')}\n` : ''}${args.aggregations?.length ? `🔢 Aggregations: ${args.aggregations.map((a) => `${a.type}(${a.field})`).join(', ')}\n` : ''}${args.conditions ? `🔍 Filter: ${args.conditions}\n` : ''}📄 Format: ${args.format || 'PDF'}\n🔗 View Report: ${reportUrl}\n\n📝 Description: ${args.description || 'No description provided'}\n\n✨ Report is now available and data is accessible!`
|
|
289
307
|
}]
|
|
290
308
|
};
|
|
291
309
|
}
|
|
@@ -303,24 +321,81 @@ class ServiceNowReportingAnalyticsMCP {
|
|
|
303
321
|
// Get available widget types and layouts
|
|
304
322
|
const widgetTypes = await this.getWidgetTypes();
|
|
305
323
|
const layouts = await this.getDashboardLayouts();
|
|
306
|
-
const
|
|
324
|
+
const updateSetResult = await this.client.ensureUpdateSet();
|
|
325
|
+
// Try Performance Analytics dashboard first (pa_dashboards)
|
|
326
|
+
let response = await this.client.createRecord('pa_dashboards', {
|
|
307
327
|
name: args.name,
|
|
328
|
+
title: args.name,
|
|
308
329
|
description: args.description || '',
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
330
|
+
tabs: JSON.stringify(args.widgets?.map((widget, index) => ({
|
|
331
|
+
name: widget.name || `Tab ${index + 1}`,
|
|
332
|
+
label: widget.label || widget.name || `Tab ${index + 1}`,
|
|
333
|
+
visible_tabs: widget.visible !== false,
|
|
334
|
+
order: index * 100
|
|
335
|
+
})) || []),
|
|
336
|
+
groups: JSON.stringify(args.permissions || []),
|
|
312
337
|
refresh_interval: args.refreshInterval || 15,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
338
|
+
active: true,
|
|
339
|
+
is_scheduled: args.refreshInterval ? true : false,
|
|
340
|
+
visible_to: args.public ? 'everyone' : 'owner',
|
|
341
|
+
roles: args.permissions?.join(',') || ''
|
|
342
|
+
});
|
|
343
|
+
// Fallback to Service Portal page if PA dashboard fails
|
|
344
|
+
if (!response.success && response.error?.includes('400')) {
|
|
345
|
+
this.logger.warn('pa_dashboards failed, trying sys_portal_page...');
|
|
346
|
+
// Create Service Portal page with dashboard layout
|
|
347
|
+
response = await this.client.createRecord('sys_portal_page', {
|
|
348
|
+
title: args.name,
|
|
349
|
+
id: args.name.toLowerCase().replace(/[^a-z0-9]/g, '_'),
|
|
350
|
+
short_description: args.description || '',
|
|
351
|
+
portal: 'sp', // Default Service Portal
|
|
352
|
+
layout: args.layout || 'standard',
|
|
353
|
+
draft: false,
|
|
354
|
+
public: args.public || false,
|
|
355
|
+
roles: args.permissions?.join(',') || '',
|
|
356
|
+
css: `/* Dashboard CSS */\n.dashboard-container { padding: 20px; }\n.widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }`,
|
|
357
|
+
internal: false
|
|
358
|
+
});
|
|
359
|
+
// If portal page created, add widgets to it
|
|
360
|
+
if (response.success && args.widgets?.length > 0) {
|
|
361
|
+
for (const widget of args.widgets) {
|
|
362
|
+
await this.addWidgetToPortalPage(response.data.sys_id, widget);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
// Final fallback to create a dashboard report collection
|
|
367
|
+
if (!response.success && response.error?.includes('400')) {
|
|
368
|
+
this.logger.warn('sys_portal_page failed, creating dashboard as report collection...');
|
|
369
|
+
// Create a master report that acts as a dashboard
|
|
370
|
+
response = await this.client.createRecord('sys_report', {
|
|
371
|
+
title: args.name,
|
|
372
|
+
description: args.description || 'Dashboard collection',
|
|
373
|
+
table: 'sys_report', // Self-referential for dashboard
|
|
374
|
+
type: 'list',
|
|
375
|
+
is_scheduled: false,
|
|
376
|
+
is_published: args.public || false,
|
|
377
|
+
roles: args.permissions?.join(',') || '',
|
|
378
|
+
filter: `titleLIKE${args.name.replace(' ', '_')}_widget`,
|
|
379
|
+
field_list: 'title,table,type',
|
|
380
|
+
order_by: 'title',
|
|
381
|
+
aggregate: false,
|
|
382
|
+
chart_type: 'none',
|
|
383
|
+
active: true
|
|
384
|
+
});
|
|
385
|
+
// Create individual widget reports
|
|
386
|
+
if (response.success && args.widgets?.length > 0) {
|
|
387
|
+
for (const widget of args.widgets) {
|
|
388
|
+
await this.createWidgetReport(args.name, widget);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
317
392
|
if (!response.success) {
|
|
318
393
|
throw new Error(`Failed to create Dashboard: ${response.error}`);
|
|
319
394
|
}
|
|
320
395
|
return {
|
|
321
396
|
content: [{
|
|
322
397
|
type: 'text',
|
|
323
|
-
text: `✅ Dashboard created successfully!\n\n📊 **${args.name}**\n🆔 sys_id: ${response.data.sys_id}\n🎨 Layout: ${args.layout || 'grid'}\n📱 Widgets: ${args.widgets?.length || 0} widgets configured\n🔄 Refresh: ${args.refreshInterval || 15} minutes\n${args.public ? '🌐 Public: Yes\n' : '🔒 Private dashboard\n'}👥 Permissions: ${args.permissions?.length || 0} configured\n\n📝 Description: ${args.description || 'No description provided'}\n\n✨
|
|
398
|
+
text: `✅ Dashboard created successfully!\n\n📊 **${args.name}**\n🆔 sys_id: ${response.data.sys_id}\n🎨 Layout: ${args.layout || 'grid'}\n📱 Widgets: ${args.widgets?.length || 0} widgets configured\n🔄 Refresh: ${args.refreshInterval || 15} minutes\n${args.public ? '🌐 Public: Yes\n' : '🔒 Private dashboard\n'}👥 Permissions: ${args.permissions?.length || 0} configured\n\n📝 Description: ${args.description || 'No description provided'}\n\n✨ Dashboard is now visible in your ServiceNow instance!`
|
|
324
399
|
}]
|
|
325
400
|
};
|
|
326
401
|
}
|
|
@@ -982,6 +1057,45 @@ class ServiceNowReportingAnalyticsMCP {
|
|
|
982
1057
|
return `${(totalSize / 1024).toFixed(1)} KB`;
|
|
983
1058
|
return `${(totalSize / (1024 * 1024)).toFixed(1)} MB`;
|
|
984
1059
|
}
|
|
1060
|
+
/**
|
|
1061
|
+
* Add widget to Service Portal page
|
|
1062
|
+
*/
|
|
1063
|
+
async addWidgetToPortalPage(pageId, widget) {
|
|
1064
|
+
try {
|
|
1065
|
+
await this.client.createRecord('sp_widget_instance', {
|
|
1066
|
+
sp_page: pageId,
|
|
1067
|
+
sp_widget: widget.widgetId || widget.id,
|
|
1068
|
+
title: widget.name || widget.title,
|
|
1069
|
+
order: widget.order || 0,
|
|
1070
|
+
bootstrap_alt: widget.size || 'col-md-6',
|
|
1071
|
+
class_name: widget.className || '',
|
|
1072
|
+
active: true
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
catch (error) {
|
|
1076
|
+
this.logger.error(`Failed to add widget to portal page: ${error}`);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Create widget report for dashboard
|
|
1081
|
+
*/
|
|
1082
|
+
async createWidgetReport(dashboardName, widget) {
|
|
1083
|
+
try {
|
|
1084
|
+
await this.client.createRecord('sys_report', {
|
|
1085
|
+
title: `${dashboardName}_widget_${widget.name}`.replace(/[^a-zA-Z0-9_]/g, '_'),
|
|
1086
|
+
table: widget.table || 'incident',
|
|
1087
|
+
type: widget.type || 'list',
|
|
1088
|
+
filter: widget.filter || '',
|
|
1089
|
+
field_list: widget.fields?.join(',') || 'number,short_description,state',
|
|
1090
|
+
is_published: true,
|
|
1091
|
+
roles: '',
|
|
1092
|
+
active: true
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
catch (error) {
|
|
1096
|
+
this.logger.error(`Failed to create widget report: ${error}`);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
985
1099
|
async run() {
|
|
986
1100
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
987
1101
|
await this.server.connect(transport);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/utils/snow-oauth.js
CHANGED
|
@@ -279,25 +279,62 @@ class ServiceNowOAuth {
|
|
|
279
279
|
console.log('🚀 Please open the authorization URL in your browser...');
|
|
280
280
|
console.log('⏳ Waiting for OAuth callback...');
|
|
281
281
|
// Auto-open browser if possible
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
// Try to auto-open browser if not in headless environment
|
|
283
|
+
const isCodespaces = process.env.CODESPACES === 'true';
|
|
284
|
+
const isContainer = process.env.CONTAINER === 'true' || (0, fs_1.existsSync)('/.dockerenv');
|
|
285
|
+
const isHeadless = isCodespaces || isContainer || process.env.CI === 'true';
|
|
286
|
+
if (!isHeadless) {
|
|
287
|
+
try {
|
|
288
|
+
const { spawn } = require('child_process');
|
|
289
|
+
const authUrl = this.generateAuthUrl(this.credentials.instance, this.credentials.clientId, redirectUri);
|
|
290
|
+
let browserProcess;
|
|
291
|
+
// Try to open browser based on platform
|
|
292
|
+
if (process.platform === 'darwin') {
|
|
293
|
+
browserProcess = spawn('open', [authUrl], { detached: true, stdio: 'ignore' });
|
|
294
|
+
}
|
|
295
|
+
else if (process.platform === 'win32') {
|
|
296
|
+
browserProcess = spawn('cmd', ['/c', 'start', authUrl], { detached: true, stdio: 'ignore' });
|
|
297
|
+
}
|
|
298
|
+
else if (process.platform === 'linux') {
|
|
299
|
+
// Try multiple Linux browser openers
|
|
300
|
+
const openers = ['xdg-open', 'gnome-open', 'kde-open', 'sensible-browser'];
|
|
301
|
+
for (const opener of openers) {
|
|
302
|
+
try {
|
|
303
|
+
browserProcess = spawn(opener, [authUrl], { detached: true, stdio: 'ignore' });
|
|
304
|
+
break; // If successful, stop trying
|
|
305
|
+
}
|
|
306
|
+
catch (e) {
|
|
307
|
+
// Try next opener
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
console.log('⚠️ Unknown OS:', process.platform);
|
|
314
|
+
}
|
|
315
|
+
// Prevent the spawn from keeping the process alive
|
|
316
|
+
if (browserProcess && browserProcess.unref) {
|
|
317
|
+
browserProcess.unref();
|
|
318
|
+
}
|
|
294
319
|
}
|
|
295
|
-
|
|
296
|
-
|
|
320
|
+
catch (err) {
|
|
321
|
+
// Silently fail - user can manually open URL
|
|
322
|
+
console.log('\n📋 Browser auto-open failed. Please manually copy and open the URL above.');
|
|
297
323
|
}
|
|
298
324
|
}
|
|
299
|
-
|
|
300
|
-
console.log('
|
|
325
|
+
else {
|
|
326
|
+
console.log('\n🐳 Running in headless environment (Codespaces/Container/CI)');
|
|
327
|
+
console.log('📋 Please manually copy and open the authorization URL above in your browser.');
|
|
328
|
+
if (isCodespaces) {
|
|
329
|
+
console.log('\n💡 TIP for GitHub Codespaces:');
|
|
330
|
+
console.log(' 1. Copy the authorization URL above');
|
|
331
|
+
console.log(' 2. Open it in a new browser tab');
|
|
332
|
+
console.log(' 3. After authorizing, you\'ll be redirected to localhost:3005');
|
|
333
|
+
console.log(' 4. Copy the FULL redirect URL from your browser');
|
|
334
|
+
console.log(' 5. Open a new Codespaces terminal and run:');
|
|
335
|
+
console.log(' curl "http://localhost:3005/callback?code=YOUR_CODE&state=YOUR_STATE"');
|
|
336
|
+
console.log(' 6. Or use port forwarding in Codespaces to make port 3005 accessible');
|
|
337
|
+
}
|
|
301
338
|
}
|
|
302
339
|
});
|
|
303
340
|
});
|
package/memory/agents/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "Snow-Flow v3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
|
+
"description": "Snow-Flow v3.0.10: REPORTING & DASHBOARD FIXES! Complete overhaul of reporting and dashboard MCPs. Fixed dashboard visibility in ServiceNow (now uses pa_dashboards, sys_portal_page with intelligent fallback). Reports now properly fetch data with correct field configuration. KPIs and Performance Analytics work correctly. All dashboard and report creation tools now functional with proper ServiceNow API integration. Plus all previous features: Codespaces support, Claude Code integration, 100+ MCP tools.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|
package/.mcp.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServers": {
|
|
3
|
-
"claude-flow": {
|
|
4
|
-
"command": "npx",
|
|
5
|
-
"args": [
|
|
6
|
-
"claude-flow@alpha",
|
|
7
|
-
"mcp",
|
|
8
|
-
"start"
|
|
9
|
-
],
|
|
10
|
-
"type": "stdio"
|
|
11
|
-
},
|
|
12
|
-
"ruv-swarm": {
|
|
13
|
-
"command": "npx",
|
|
14
|
-
"args": [
|
|
15
|
-
"ruv-swarm@latest",
|
|
16
|
-
"mcp",
|
|
17
|
-
"start"
|
|
18
|
-
],
|
|
19
|
-
"type": "stdio"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
package/claude-flow.config.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"features": {
|
|
3
|
-
"autoTopologySelection": true,
|
|
4
|
-
"parallelExecution": true,
|
|
5
|
-
"neuralTraining": true,
|
|
6
|
-
"bottleneckAnalysis": true,
|
|
7
|
-
"smartAutoSpawning": true,
|
|
8
|
-
"selfHealingWorkflows": true,
|
|
9
|
-
"crossSessionMemory": true,
|
|
10
|
-
"githubIntegration": true
|
|
11
|
-
},
|
|
12
|
-
"performance": {
|
|
13
|
-
"maxAgents": 10,
|
|
14
|
-
"defaultTopology": "hierarchical",
|
|
15
|
-
"executionStrategy": "parallel",
|
|
16
|
-
"tokenOptimization": true,
|
|
17
|
-
"cacheEnabled": true,
|
|
18
|
-
"telemetryLevel": "detailed"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App Creator Agent for Scoped Applications
|
|
3
|
-
*/
|
|
4
|
-
import { BaseServiceNowAgent } from '../core/base-agent.js';
|
|
5
|
-
import { AgentTask, AgentResult, ServiceNowConfig } from '../types/servicenow.types.js';
|
|
6
|
-
export declare class AppCreatorAgent extends BaseServiceNowAgent {
|
|
7
|
-
constructor(config: ServiceNowConfig);
|
|
8
|
-
execute(task: AgentTask): Promise<AgentResult>;
|
|
9
|
-
private createApplication;
|
|
10
|
-
private generateFromRequirements;
|
|
11
|
-
private addAppComponents;
|
|
12
|
-
private packageApplication;
|
|
13
|
-
private generateScope;
|
|
14
|
-
private generateVendorPrefix;
|
|
15
|
-
private generateApplicationStructure;
|
|
16
|
-
private generateApplicationReadme;
|
|
17
|
-
private generateUsageInstructions;
|
|
18
|
-
private analyzeAppRequirements;
|
|
19
|
-
private generateTablesFromAnalysis;
|
|
20
|
-
private generateFieldsFromSpec;
|
|
21
|
-
private createFieldFromName;
|
|
22
|
-
private generateDefaultFields;
|
|
23
|
-
private generateMenusFromAnalysis;
|
|
24
|
-
private generateCompleteApplication;
|
|
25
|
-
private generateTableDictionary;
|
|
26
|
-
private getFieldAttributes;
|
|
27
|
-
private generateTableACLs;
|
|
28
|
-
private generateSecurityRules;
|
|
29
|
-
private generateApplicationScripts;
|
|
30
|
-
private generateUtilityScriptInclude;
|
|
31
|
-
private generateNumberingBusinessRule;
|
|
32
|
-
private generateApplicationUI;
|
|
33
|
-
private generateDashboardWidget;
|
|
34
|
-
private generateDashboardCSS;
|
|
35
|
-
private generateDashboardServerScript;
|
|
36
|
-
private generateDashboardClientScript;
|
|
37
|
-
private generateApplicationWorkflows;
|
|
38
|
-
private generateApplicationCommands;
|
|
39
|
-
private generateComponentCommands;
|
|
40
|
-
private createApplicationTable;
|
|
41
|
-
private createFieldFromSpec;
|
|
42
|
-
private createApplicationMenu;
|
|
43
|
-
private generateManifest;
|
|
44
|
-
private generateMetadata;
|
|
45
|
-
private generateSysId;
|
|
46
|
-
private generateSampleData;
|
|
47
|
-
private generateTableSampleData;
|
|
48
|
-
private generateFieldSampleValue;
|
|
49
|
-
private generateXMLExport;
|
|
50
|
-
private generateUpdateSetXML;
|
|
51
|
-
private objectToXML;
|
|
52
|
-
private generateInstallationGuide;
|
|
53
|
-
private generateDeveloperGuide;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=app-creator.agent.d.ts.map
|