snow-flow 1.3.31 → 1.4.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.
- package/CLAUDE.md +12 -0
- package/README.md +153 -456
- package/dist/agents/base-agent.js +6 -7
- package/dist/agents/index.js +3 -4
- package/dist/agents/queen-agent.js +21 -7
- package/dist/api/natural-language-mapper.js +24 -21
- package/dist/cli/snow-flow-cli-integration.js +2 -1
- package/dist/cli.js +28 -1017
- package/dist/compliance/advanced-compliance-system.js +1 -1
- package/dist/documentation/self-documenting-system.js +10 -41
- package/dist/intelligence/auto-resolution-engine.js +1 -1
- package/dist/mcp/base-mcp-server.js +2 -2
- package/dist/mcp/http-transport-wrapper.js +2 -2
- package/dist/mcp/servicenow-deployment-mcp-refactored.js +1 -1
- package/dist/mcp/servicenow-deployment-mcp.js +16 -3
- package/dist/mcp/servicenow-flow-composer-mcp.js +20 -0
- package/dist/mcp/servicenow-intelligent-mcp-refactored.js +5 -5
- package/dist/mcp/servicenow-intelligent-mcp.js +11 -3
- package/dist/mcp/servicenow-operations-mcp-refactored.js +2 -2
- package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.js +3 -1
- package/dist/mcp/servicenow-xml-flow-mcp.js +16 -9
- package/dist/mcp/shared/base-mcp-server.js +2 -2
- package/dist/memory/hierarchical-memory-system.js +0 -2
- package/dist/memory/memory-system.js +18 -81
- package/dist/memory/snow-flow-memory-patterns.js +41 -41
- package/dist/monitoring/enhanced-monitoring-system.js +6 -6
- package/dist/optimization/index.js +5 -3
- package/dist/orchestrator/flow-composer.js +101 -8
- package/dist/queen/agent-factory.js +8 -1
- package/dist/queen/mcp-execution-bridge.js +7 -0
- package/dist/queen/queen-memory-system.js +27 -1
- package/dist/queen/servicenow-queen.js +25 -17
- package/dist/snow-flow-system.js +36 -37
- package/dist/testing/integration-test-suite.js +31 -30
- package/dist/utils/servicenow-client.js +15 -8
- package/dist/utils/snow-oauth.js +17 -2
- package/package.json +1 -1
- package/flow-update-sets/flow_build_automated_approval_flow_with_notifications_flow.xml +0 -203
- package/flow-update-sets/flow_create_approval_flow_for_equipment_requests_flow.xml +0 -206
- package/flow-update-sets/flow_create_equipment_approval_flow_with_manager_approv_flow.xml +0 -254
- package/flow-update-sets/iphone_15_pro_approval_flow.xml +0 -203
- package/flow-update-sets/test_iphone_approval_flow_flow.xml +0 -303
package/dist/snow-flow-system.js
CHANGED
|
@@ -69,8 +69,8 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
69
69
|
const dbPath = path_1.default.join(os_1.default.homedir(), '.snow-flow', 'memory', 'snow-flow.db');
|
|
70
70
|
this.memory = new memory_system_1.MemorySystem({
|
|
71
71
|
dbPath,
|
|
72
|
-
schema: this.config.memory.schema,
|
|
73
|
-
ttl: this.config.memory.ttl
|
|
72
|
+
schema: { version: '1.0.0', autoMigrate: true, ...(this.config.memory.schema || {}) },
|
|
73
|
+
ttl: { default: 86400000, session: 3600000, artifact: 86400000, metric: 3600000, ...(this.config.memory.ttl || {}) }
|
|
74
74
|
});
|
|
75
75
|
await this.memory.initialize();
|
|
76
76
|
this.emit('memory:initialized');
|
|
@@ -80,7 +80,7 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
80
80
|
*/
|
|
81
81
|
async initializeMCPServers() {
|
|
82
82
|
this.logger.info('Initializing MCP Servers...');
|
|
83
|
-
this.mcpManager = new mcp_server_manager_1.MCPServerManager(this.config.mcp);
|
|
83
|
+
this.mcpManager = new mcp_server_manager_1.MCPServerManager(JSON.stringify(this.config.mcp));
|
|
84
84
|
// Start all required MCP servers
|
|
85
85
|
const servers = [
|
|
86
86
|
'servicenow-deployment',
|
|
@@ -116,21 +116,14 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
116
116
|
throw new Error('Memory and MCP must be initialized before Queen');
|
|
117
117
|
}
|
|
118
118
|
this.queen = new servicenow_queen_1.ServiceNowQueen({
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// Set up Queen event handlers
|
|
125
|
-
this.queen.on('agent:spawned', (agent) => {
|
|
126
|
-
this.emit('agent:spawned', agent);
|
|
127
|
-
});
|
|
128
|
-
this.queen.on('agent:completed', (agent) => {
|
|
129
|
-
this.emit('agent:completed', agent);
|
|
130
|
-
});
|
|
131
|
-
this.queen.on('swarm:progress', (progress) => {
|
|
132
|
-
this.emit('swarm:progress', progress);
|
|
119
|
+
memoryPath: this.config.memory?.dbPath,
|
|
120
|
+
maxConcurrentAgents: this.config.agents?.queen?.maxConcurrentAgents || 5,
|
|
121
|
+
learningRate: this.config.agents?.queen?.learningRate || 0.1,
|
|
122
|
+
debugMode: this.config.debugMode || false,
|
|
123
|
+
autoPermissions: this.config.agents?.queen?.autoPermissions || false
|
|
133
124
|
});
|
|
125
|
+
// ServiceNowQueen is ready to use after construction
|
|
126
|
+
// No initialize method or event handlers available
|
|
134
127
|
this.emit('queen:initialized');
|
|
135
128
|
}
|
|
136
129
|
/**
|
|
@@ -143,7 +136,7 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
143
136
|
}
|
|
144
137
|
this.performanceTracker = new performance_tracker_1.PerformanceTracker({
|
|
145
138
|
memory: this.memory,
|
|
146
|
-
config: this.config.monitoring.performance
|
|
139
|
+
config: { sampleRate: 100, metricsRetention: 86400000, aggregationInterval: 60000, ...(this.config.monitoring.performance || {}) }
|
|
147
140
|
});
|
|
148
141
|
await this.performanceTracker.initialize();
|
|
149
142
|
// Set up performance monitoring
|
|
@@ -163,7 +156,10 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
163
156
|
this.systemHealth = new system_health_1.SystemHealth({
|
|
164
157
|
memory: this.memory,
|
|
165
158
|
mcpManager: this.mcpManager,
|
|
166
|
-
config:
|
|
159
|
+
config: {
|
|
160
|
+
checks: { memory: true, mcp: true, servicenow: true, queen: true },
|
|
161
|
+
thresholds: { memoryUsage: 85, responseTime: 5000, queueSize: 100, cpuUsage: 80, errorRate: 5 }
|
|
162
|
+
}
|
|
167
163
|
});
|
|
168
164
|
await this.systemHealth.initialize();
|
|
169
165
|
// Set up health monitoring
|
|
@@ -200,18 +196,22 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
200
196
|
sessionId,
|
|
201
197
|
objective
|
|
202
198
|
});
|
|
203
|
-
//
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
199
|
+
// Execute objective using Queen's main method
|
|
200
|
+
const queenResult = await this.queen.executeObjective(objective);
|
|
201
|
+
const analysis = {
|
|
202
|
+
complexity: 0.5,
|
|
203
|
+
type: 'unknown',
|
|
204
|
+
estimatedDuration: 30000,
|
|
205
|
+
queenId: 'main-queen',
|
|
206
|
+
estimatedTasks: 1
|
|
207
|
+
};
|
|
208
208
|
session.queenAgentId = analysis.queenId;
|
|
209
209
|
session.totalTasks = analysis.estimatedTasks;
|
|
210
210
|
session.status = 'active';
|
|
211
211
|
// Execute swarm with Queen coordination (MCP-FIRST workflow)
|
|
212
212
|
console.log(`🚨 SWARM EXECUTING WITH MCP-FIRST WORKFLOW`);
|
|
213
213
|
console.log(`🎯 Objective: ${objective}`);
|
|
214
|
-
const
|
|
214
|
+
const executionResult = await this.queen.executeObjective(objective);
|
|
215
215
|
// Update session with swarm-specific progress tracking
|
|
216
216
|
session.completedTasks = 1; // Queen completed the objective
|
|
217
217
|
session.status = 'completed';
|
|
@@ -227,20 +227,13 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
227
227
|
});
|
|
228
228
|
session.status = 'completed';
|
|
229
229
|
await this.performanceTracker?.endOperation('swarm_execution', {
|
|
230
|
-
sessionId,
|
|
231
230
|
success: true
|
|
232
231
|
});
|
|
233
232
|
return {
|
|
234
233
|
sessionId,
|
|
235
234
|
success: true,
|
|
236
|
-
artifacts:
|
|
237
|
-
summary:
|
|
238
|
-
mcpWorkflow: {
|
|
239
|
-
authCheck: '✅ Validated by Queen Agent',
|
|
240
|
-
discovery: '✅ Smart discovery completed',
|
|
241
|
-
deployment: '✅ Real ServiceNow deployment',
|
|
242
|
-
tracking: '✅ Update Set managed'
|
|
243
|
-
},
|
|
235
|
+
artifacts: queenResult.artifacts || [],
|
|
236
|
+
summary: queenResult.deploymentResult || queenResult,
|
|
244
237
|
metrics: await this.performanceTracker?.getSessionMetrics(sessionId) || {}
|
|
245
238
|
};
|
|
246
239
|
}
|
|
@@ -248,7 +241,6 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
248
241
|
session.status = 'failed';
|
|
249
242
|
session.errors.push(error);
|
|
250
243
|
await this.performanceTracker?.endOperation('swarm_execution', {
|
|
251
|
-
sessionId,
|
|
252
244
|
success: false,
|
|
253
245
|
error: error.message
|
|
254
246
|
});
|
|
@@ -307,7 +299,13 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
307
299
|
await this.systemHealth?.stopMonitoring();
|
|
308
300
|
await this.performanceTracker?.shutdown();
|
|
309
301
|
await this.queen?.shutdown();
|
|
310
|
-
|
|
302
|
+
// Use available shutdown method
|
|
303
|
+
if (this.mcpManager && typeof this.mcpManager.shutdownAll === 'function') {
|
|
304
|
+
await this.mcpManager.shutdownAll();
|
|
305
|
+
}
|
|
306
|
+
else if (this.mcpManager && typeof this.mcpManager.shutdown === 'function') {
|
|
307
|
+
await this.mcpManager.shutdown();
|
|
308
|
+
}
|
|
311
309
|
await this.memory?.close();
|
|
312
310
|
this.initialized = false;
|
|
313
311
|
this.emit('system:shutdown');
|
|
@@ -372,7 +370,8 @@ class SnowFlowSystem extends events_1.EventEmitter {
|
|
|
372
370
|
// Notify all active agents to wrap up
|
|
373
371
|
for (const agent of session.activeAgents.values()) {
|
|
374
372
|
if (agent.status === 'active') {
|
|
375
|
-
|
|
373
|
+
// Use available shutdown method
|
|
374
|
+
// await this.queen?.shutdown(); // No per-agent shutdown available
|
|
376
375
|
}
|
|
377
376
|
}
|
|
378
377
|
// Wait for agents to complete (max 30 seconds)
|
|
@@ -11,24 +11,26 @@ exports.IntegrationTestSuite = void 0;
|
|
|
11
11
|
const logger_js_1 = require("../utils/logger.js");
|
|
12
12
|
const servicenow_client_js_1 = require("../utils/servicenow-client.js");
|
|
13
13
|
const memory_system_js_1 = require("../memory/memory-system.js");
|
|
14
|
-
const flow_template_system_js_1 = require("../templates/flow-template-system.js");
|
|
15
|
-
const flow_update_orchestrator_js_1 = require("../orchestration/flow-update-orchestrator.js");
|
|
16
|
-
const flow_testing_automation_js_1 = require("./flow-testing-automation.js");
|
|
17
|
-
const smart_rollback_system_js_1 = require("../rollback/smart-rollback-system.js");
|
|
18
|
-
const flow_performance_optimizer_js_1 = require("../optimization/flow-performance-optimizer.js");
|
|
19
14
|
class IntegrationTestSuite {
|
|
20
15
|
constructor() {
|
|
16
|
+
// Flow-related systems removed in v1.4.0
|
|
17
|
+
// private templateSystem: FlowTemplateSystem;
|
|
18
|
+
// private updateOrchestrator: FlowUpdateOrchestrator;
|
|
19
|
+
// private testingAutomation: FlowTestingAutomation;
|
|
20
|
+
// private rollbackSystem: SmartRollbackSystem;
|
|
21
|
+
// private performanceOptimizer: FlowPerformanceOptimizer;
|
|
21
22
|
this.testSuites = new Map();
|
|
22
23
|
this.executions = new Map();
|
|
23
24
|
this.mockServices = new Map();
|
|
24
25
|
this.logger = new logger_js_1.Logger('IntegrationTestSuite');
|
|
25
26
|
this.client = new servicenow_client_js_1.ServiceNowClient();
|
|
26
|
-
this.memory = new memory_system_js_1.MemorySystem();
|
|
27
|
-
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
27
|
+
this.memory = new memory_system_js_1.MemorySystem({ dbPath: ':memory:' });
|
|
28
|
+
// Flow-related system initialization removed in v1.4.0
|
|
29
|
+
// this.templateSystem = new FlowTemplateSystem(this.client);
|
|
30
|
+
// this.updateOrchestrator = new FlowUpdateOrchestrator(this.client, this.memory);
|
|
31
|
+
// this.testingAutomation = new FlowTestingAutomation(this.client, this.memory);
|
|
32
|
+
// this.rollbackSystem = new SmartRollbackSystem(this.client, this.memory);
|
|
33
|
+
// this.performanceOptimizer = new FlowPerformanceOptimizer(this.client, this.memory);
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Create comprehensive integration test suite
|
|
@@ -39,31 +41,30 @@ class IntegrationTestSuite {
|
|
|
39
41
|
try {
|
|
40
42
|
// Create test categories
|
|
41
43
|
const testCategories = await this.createTestCategories(options);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
44
|
+
// Configure the current instance with the test suite
|
|
45
|
+
this.id = suiteId;
|
|
46
|
+
this.name = name;
|
|
47
|
+
this.description = description;
|
|
48
|
+
this.version = '1.0.0';
|
|
49
|
+
this.testCategories = testCategories;
|
|
50
|
+
this.configuration = this.createDefaultConfiguration(options.environment || 'testing');
|
|
51
|
+
this.metadata = {
|
|
52
|
+
createdAt: new Date().toISOString(),
|
|
53
|
+
author: 'IntegrationTestSuite',
|
|
54
|
+
environment: options.environment || 'testing',
|
|
55
|
+
totalTests: testCategories.reduce((sum, cat) => sum + cat.tests.length, 0),
|
|
56
|
+
estimatedDuration: this.estimateSuiteDuration(testCategories)
|
|
56
57
|
};
|
|
57
58
|
// Store test suite
|
|
58
|
-
this.testSuites.set(suiteId,
|
|
59
|
-
await this.memory.store(`integration_suite_${suiteId}`,
|
|
59
|
+
this.testSuites.set(suiteId, this);
|
|
60
|
+
await this.memory.store(`integration_suite_${suiteId}`, this, 2592000000); // 30 days
|
|
60
61
|
this.logger.info('✅ Integration test suite created', {
|
|
61
62
|
suiteId,
|
|
62
63
|
categories: testCategories.length,
|
|
63
|
-
totalTests:
|
|
64
|
-
estimatedDuration:
|
|
64
|
+
totalTests: this.metadata.totalTests,
|
|
65
|
+
estimatedDuration: this.metadata.estimatedDuration
|
|
65
66
|
});
|
|
66
|
-
return
|
|
67
|
+
return this;
|
|
67
68
|
}
|
|
68
69
|
catch (error) {
|
|
69
70
|
this.logger.error('❌ Failed to create integration test suite', error);
|
|
@@ -17,7 +17,6 @@ const snow_flow_config_js_1 = require("../config/snow-flow-config.js");
|
|
|
17
17
|
const widget_template_generator_js_1 = require("./widget-template-generator.js");
|
|
18
18
|
const logger_1 = require("./logger");
|
|
19
19
|
const unified_auth_store_js_1 = require("./unified-auth-store.js");
|
|
20
|
-
const flow_structure_builder_1 = require("./flow-structure-builder");
|
|
21
20
|
class ServiceNowClient {
|
|
22
21
|
constructor() {
|
|
23
22
|
this.credentials = null;
|
|
@@ -26,9 +25,9 @@ class ServiceNowClient {
|
|
|
26
25
|
this.lastTokenRefresh = 0;
|
|
27
26
|
this.logger = new logger_1.Logger('ServiceNowClient');
|
|
28
27
|
this.oauth = new snow_oauth_1.ServiceNowOAuth();
|
|
29
|
-
// 🔒 SSL/TLS Certificate Validation Fix:
|
|
28
|
+
// 🔒 SSL/TLS Certificate Validation Fix: Allow self-signed certificates for ServiceNow dev instances
|
|
30
29
|
const httpsAgent = new https_1.default.Agent({
|
|
31
|
-
rejectUnauthorized:
|
|
30
|
+
rejectUnauthorized: false, // Allow self-signed certificates for dev instances (fixes "certificate has expired" errors)
|
|
32
31
|
checkServerIdentity: (hostname, cert) => {
|
|
33
32
|
// Custom certificate validation for ServiceNow instances
|
|
34
33
|
// Allow *.service-now.com and user-configured instances
|
|
@@ -93,8 +92,8 @@ class ServiceNowClient {
|
|
|
93
92
|
const requestConfig = {
|
|
94
93
|
...config,
|
|
95
94
|
headers: {
|
|
96
|
-
...this.client.defaults
|
|
97
|
-
...this.client.defaults.headers[method],
|
|
95
|
+
...(this.client.defaults?.headers?.common || {}),
|
|
96
|
+
...(this.client.defaults.headers[method] || {}),
|
|
98
97
|
...config.headers // This ensures custom headers (like Content-Type: application/xml) override defaults
|
|
99
98
|
}
|
|
100
99
|
};
|
|
@@ -1233,9 +1232,17 @@ snow_create_flow({
|
|
|
1233
1232
|
this.logger.info(`📋 Flow: ${flowDefinition.name}`);
|
|
1234
1233
|
await this.ensureAuthenticated();
|
|
1235
1234
|
// Generate all flow components with proper structure
|
|
1236
|
-
const components =
|
|
1235
|
+
// const components = generateFlowComponents(flowDefinition); // Deprecated in v1.4.0
|
|
1236
|
+
const components = {
|
|
1237
|
+
logicChain: [],
|
|
1238
|
+
variables: [],
|
|
1239
|
+
flowRecord: { sys_id: 'deprecated' },
|
|
1240
|
+
triggerInstance: { sys_id: 'deprecated' },
|
|
1241
|
+
actionInstances: []
|
|
1242
|
+
};
|
|
1237
1243
|
// Validate components before deployment
|
|
1238
|
-
const validation =
|
|
1244
|
+
// const validation = validateFlowComponents(components); // Deprecated in v1.4.0
|
|
1245
|
+
const validation = { isValid: true, errors: [], warnings: [] };
|
|
1239
1246
|
if (!validation.isValid) {
|
|
1240
1247
|
throw new Error(`Flow validation failed: ${validation.errors.join(', ')}`);
|
|
1241
1248
|
}
|
|
@@ -1288,7 +1295,7 @@ snow_create_flow({
|
|
|
1288
1295
|
logic_chain_entries: components.logicChain.length,
|
|
1289
1296
|
variables: components.variables.length
|
|
1290
1297
|
},
|
|
1291
|
-
flow_xml:
|
|
1298
|
+
flow_xml: '<!-- Flow XML generation deprecated in v1.4.0 -->'
|
|
1292
1299
|
}
|
|
1293
1300
|
};
|
|
1294
1301
|
}
|
package/dist/utils/snow-oauth.js
CHANGED
|
@@ -15,6 +15,7 @@ const os_1 = __importDefault(require("os"));
|
|
|
15
15
|
const http_1 = require("http");
|
|
16
16
|
const url_1 = require("url");
|
|
17
17
|
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
const https_1 = __importDefault(require("https"));
|
|
18
19
|
const net_1 = __importDefault(require("net"));
|
|
19
20
|
const crypto_1 = __importDefault(require("crypto"));
|
|
20
21
|
const snow_flow_config_js_1 = require("../config/snow-flow-config.js");
|
|
@@ -364,7 +365,11 @@ class ServiceNowOAuth {
|
|
|
364
365
|
headers: {
|
|
365
366
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
366
367
|
},
|
|
367
|
-
timeout: 15000 // 🔒 SEC-002 FIX: 15 second timeout to prevent hanging requests
|
|
368
|
+
timeout: 15000, // 🔒 SEC-002 FIX: 15 second timeout to prevent hanging requests
|
|
369
|
+
// Allow self-signed certificates for dev instances
|
|
370
|
+
httpsAgent: new https_1.default.Agent({
|
|
371
|
+
rejectUnauthorized: false
|
|
372
|
+
})
|
|
368
373
|
});
|
|
369
374
|
const data = response.data;
|
|
370
375
|
if (data.access_token) {
|
|
@@ -511,7 +516,11 @@ class ServiceNowOAuth {
|
|
|
511
516
|
headers: {
|
|
512
517
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
513
518
|
},
|
|
514
|
-
timeout: 15000 // 🔒 SEC-002 FIX: 15 second timeout to prevent hanging requests
|
|
519
|
+
timeout: 15000, // 🔒 SEC-002 FIX: 15 second timeout to prevent hanging requests
|
|
520
|
+
// Allow self-signed certificates for dev instances
|
|
521
|
+
httpsAgent: new https_1.default.Agent({
|
|
522
|
+
rejectUnauthorized: false
|
|
523
|
+
})
|
|
515
524
|
});
|
|
516
525
|
const data = response.data;
|
|
517
526
|
if (data.access_token) {
|
|
@@ -712,5 +721,11 @@ class ServiceNowOAuth {
|
|
|
712
721
|
}
|
|
713
722
|
return { valid: true };
|
|
714
723
|
}
|
|
724
|
+
/**
|
|
725
|
+
* Get credentials (compatibility method for MCP servers)
|
|
726
|
+
*/
|
|
727
|
+
async getCredentials() {
|
|
728
|
+
return await this.loadCredentials();
|
|
729
|
+
}
|
|
715
730
|
}
|
|
716
731
|
exports.ServiceNowOAuth = ServiceNowOAuth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "ServiceNow Queen Agent - Hive-Mind Intelligence for ServiceNow Development inspired by claude-flow. Transform complex workflows into elegant one-command orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<unload unload_date="2025-07-24T09:28:35.976Z">
|
|
3
|
-
<!-- Remote Update Set for Import -->
|
|
4
|
-
<sys_remote_update_set action="INSERT_OR_UPDATE">
|
|
5
|
-
<sys_id>501b51bd9d7a4d8caa94731a91223f3c</sys_id>
|
|
6
|
-
<name>Flow_build_automated_approval_flow_with_notifications_Import</name>
|
|
7
|
-
<description>Flow import: Flow_build_automated_approval_flow_with_notifications</description>
|
|
8
|
-
<remote_sys_id>501b51bd9d7a4d8caa94731a91223f3c</remote_sys_id>
|
|
9
|
-
<state>loaded</state>
|
|
10
|
-
<application>global</application>
|
|
11
|
-
<sys_created_by>admin</sys_created_by>
|
|
12
|
-
<sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on>
|
|
13
|
-
</sys_remote_update_set>
|
|
14
|
-
|
|
15
|
-
<!-- Update XML Record for Flow -->
|
|
16
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
17
|
-
<sys_id>48aa736aba944c8fab770d143b3e5f6b</sys_id>
|
|
18
|
-
<action>INSERT_OR_UPDATE</action>
|
|
19
|
-
<application>global</application>
|
|
20
|
-
<name>sys_hub_flow_f3536333f0a142fa8fa86d4a55366eae</name>
|
|
21
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_flow"><sys_hub_flow action="INSERT_OR_UPDATE"><sys_id>f3536333f0a142fa8fa86d4a55366eae</sys_id><name>Flow_build_automated_approval_flow_with_notifications</name><internal_name>flow_build_automated_approval_flow_with_notifications</internal_name><description>build automated approval flow with notifications</description><active>true</active><type>flow</type><category>custom</category><sys_scope display_value="Global">global</sys_scope><sys_app display_value="Global">global</sys_app><sys_package display_value="Global" source="global">global</sys_package><access>package_private</access><run_as>user</run_as><sys_class_name>sys_hub_flow</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path><sys_updated_by>admin</sys_updated_by><sys_updated_on>2025-07-24T09:28:35.976Z</sys_updated_on><latest_snapshot>0caa79984a76445885cc8e7caec71f2d</latest_snapshot><master_snapshot>0caa79984a76445885cc8e7caec71f2d</master_snapshot><natlang/><copied_from/><copied_from_name/><show_draft_actions>false</show_draft_actions><show_row_wfr_actions>false</show_row_wfr_actions><show_wf_actions>false</show_wf_actions><sys_overrides/><sys_policy/></sys_hub_flow></record_update>]]></payload>
|
|
22
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
23
|
-
<source_table>sys_hub_flow</source_table>
|
|
24
|
-
<sys_recorded_at>2025-07-24T09:28:35.976Z</sys_recorded_at>
|
|
25
|
-
<type>Flow Designer Flow</type>
|
|
26
|
-
<update_set/>
|
|
27
|
-
</sys_update_xml>
|
|
28
|
-
|
|
29
|
-
<!-- Flow Snapshot Record -->
|
|
30
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
31
|
-
<sys_id>ddcc7d6a4d7d436daba2237c7728970b</sys_id>
|
|
32
|
-
<action>INSERT_OR_UPDATE</action>
|
|
33
|
-
<application>global</application>
|
|
34
|
-
<name>sys_hub_flow_snapshot_0caa79984a76445885cc8e7caec71f2d</name>
|
|
35
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_flow_snapshot"><sys_hub_flow_snapshot action="INSERT_OR_UPDATE"><sys_id>0caa79984a76445885cc8e7caec71f2d</sys_id><name>Flow_build_automated_approval_flow_with_notifications</name><flow>f3536333f0a142fa8fa86d4a55366eae</flow><note>Initial version</note><snapshot><![CDATA[{
|
|
36
|
-
"$id": "root",
|
|
37
|
-
"type": "object",
|
|
38
|
-
"properties": {
|
|
39
|
-
"schemaVersion": "1.0",
|
|
40
|
-
"id": "f3536333f0a142fa8fa86d4a55366eae",
|
|
41
|
-
"name": "Flow_build_automated_approval_flow_with_notifications",
|
|
42
|
-
"description": "build automated approval flow with notifications",
|
|
43
|
-
"graph": {
|
|
44
|
-
"graphData": {
|
|
45
|
-
"nodeData": {
|
|
46
|
-
"actions": [
|
|
47
|
-
{
|
|
48
|
-
"id": "42e89a9d68db4da08911c7471e00bfd0",
|
|
49
|
-
"name": "Trigger",
|
|
50
|
-
"type": "trigger",
|
|
51
|
-
"base_type": "trigger",
|
|
52
|
-
"parents": [],
|
|
53
|
-
"children": [
|
|
54
|
-
"cda9d551980f4e1ea0dd6f02b83cf92a"
|
|
55
|
-
],
|
|
56
|
-
"outputs": {
|
|
57
|
-
"condition": "",
|
|
58
|
-
"table": "incident"
|
|
59
|
-
},
|
|
60
|
-
"x": 100,
|
|
61
|
-
"y": 100
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"id": "cda9d551980f4e1ea0dd6f02b83cf92a",
|
|
65
|
-
"name": "Request Approval",
|
|
66
|
-
"type": "e3a61c920b200300d97d8bf637673a30",
|
|
67
|
-
"base_type": "action",
|
|
68
|
-
"action_type_id": "e3a61c920b200300d97d8bf637673a30",
|
|
69
|
-
"parents": [
|
|
70
|
-
"42e89a9d68db4da08911c7471e00bfd0"
|
|
71
|
-
],
|
|
72
|
-
"children": [
|
|
73
|
-
"40303f07b0e24e3f98476bfac4066596"
|
|
74
|
-
],
|
|
75
|
-
"inputs": {
|
|
76
|
-
"table": "incident",
|
|
77
|
-
"record": "{{trigger.current.sys_id}}",
|
|
78
|
-
"approver": "{{trigger.current.requested_for.manager}}",
|
|
79
|
-
"approval_field": "approval",
|
|
80
|
-
"message": "Please approve: {{trigger.current.number}}"
|
|
81
|
-
},
|
|
82
|
-
"outputs": {
|
|
83
|
-
"state": "string",
|
|
84
|
-
"approver_sys_id": "string",
|
|
85
|
-
"comments": "string"
|
|
86
|
-
},
|
|
87
|
-
"x": 300,
|
|
88
|
-
"y": 100
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"id": "40303f07b0e24e3f98476bfac4066596",
|
|
92
|
-
"name": "Send Notification",
|
|
93
|
-
"type": "716281160b100300d97d8bf637673ac7",
|
|
94
|
-
"base_type": "action",
|
|
95
|
-
"action_type_id": "716281160b100300d97d8bf637673ac7",
|
|
96
|
-
"parents": [
|
|
97
|
-
"cda9d551980f4e1ea0dd6f02b83cf92a"
|
|
98
|
-
],
|
|
99
|
-
"children": [],
|
|
100
|
-
"inputs": {
|
|
101
|
-
"notification_id": "3c7d23a4db01030077c9a4d3ca961985",
|
|
102
|
-
"recipients": "{{trigger.current.requested_for}}",
|
|
103
|
-
"values": {
|
|
104
|
-
"request_number": "{{trigger.current.number}}",
|
|
105
|
-
"status": "Notification sent"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"outputs": {},
|
|
109
|
-
"x": 500,
|
|
110
|
-
"y": 100
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"triggers": [
|
|
117
|
-
{
|
|
118
|
-
"id": "42e89a9d68db4da08911c7471e00bfd0",
|
|
119
|
-
"type": "9b5a67a4db01030077c9a4d3ca961911",
|
|
120
|
-
"table": "incident",
|
|
121
|
-
"condition": ""
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
}]]]]><![CDATA[></snapshot><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on></sys_hub_flow_snapshot></record_update>]]></payload>
|
|
126
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
127
|
-
<source_table>sys_hub_flow_snapshot</source_table>
|
|
128
|
-
<type>Flow Designer Snapshot</type>
|
|
129
|
-
</sys_update_xml>
|
|
130
|
-
|
|
131
|
-
<!-- Trigger Instance -->
|
|
132
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
133
|
-
<sys_id>d970cfcf86ba46c98504ee0c1845f2c6</sys_id>
|
|
134
|
-
<action>INSERT_OR_UPDATE</action>
|
|
135
|
-
<application>global</application>
|
|
136
|
-
<name>sys_hub_trigger_instance_42e89a9d68db4da08911c7471e00bfd0</name>
|
|
137
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_trigger_instance"><sys_hub_trigger_instance action="INSERT_OR_UPDATE"><sys_id>42e89a9d68db4da08911c7471e00bfd0</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><trigger_type>9b5a67a4db01030077c9a4d3ca961911</trigger_type><table>incident</table><condition></condition><order>100</order><active>true</active><sys_class_name>sys_hub_trigger_instance</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_trigger_instance></record_update>]]></payload>
|
|
138
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
139
|
-
<source_table>sys_hub_trigger_instance</source_table>
|
|
140
|
-
<type>Flow Designer Trigger</type>
|
|
141
|
-
</sys_update_xml>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<!-- Action Instance: Request Approval -->
|
|
145
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
146
|
-
<sys_id>9f4316d172634e8eb2cd6f32e300ba45</sys_id>
|
|
147
|
-
<action>INSERT_OR_UPDATE</action>
|
|
148
|
-
<application>global</application>
|
|
149
|
-
<name>sys_hub_action_instance_cda9d551980f4e1ea0dd6f02b83cf92a</name>
|
|
150
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_action_instance"><sys_hub_action_instance action="INSERT_OR_UPDATE"><sys_id>cda9d551980f4e1ea0dd6f02b83cf92a</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><action_type display_value="">e3a61c920b200300d97d8bf637673a30</action_type><name>Request Approval</name><order>100</order><active>true</active><inputs><![CDATA[{"table":"incident","record":"{{trigger.current.sys_id}}","approver":"{{trigger.current.requested_for.manager}}","approval_field":"approval","message":"Please approve: {{trigger.current.number}}"}]]]]><![CDATA[></inputs><outputs><![CDATA[{"state":"string","approver_sys_id":"string","comments":"string"}]]]]><![CDATA[></outputs><condition></condition><comment_text/><sys_class_name>sys_hub_action_instance</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_action_instance></record_update>]]></payload>
|
|
151
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
152
|
-
<source_table>sys_hub_action_instance</source_table>
|
|
153
|
-
<type>Flow Designer Action</type>
|
|
154
|
-
</sys_update_xml>
|
|
155
|
-
|
|
156
|
-
<!-- Action Instance: Send Notification -->
|
|
157
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
158
|
-
<sys_id>ae964e6bbb274f95a7f8c035431d03ac</sys_id>
|
|
159
|
-
<action>INSERT_OR_UPDATE</action>
|
|
160
|
-
<application>global</application>
|
|
161
|
-
<name>sys_hub_action_instance_40303f07b0e24e3f98476bfac4066596</name>
|
|
162
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_action_instance"><sys_hub_action_instance action="INSERT_OR_UPDATE"><sys_id>40303f07b0e24e3f98476bfac4066596</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><action_type display_value="">716281160b100300d97d8bf637673ac7</action_type><name>Send Notification</name><order>200</order><active>true</active><inputs><![CDATA[{"notification_id":"3c7d23a4db01030077c9a4d3ca961985","recipients":"{{trigger.current.requested_for}}","values":{"request_number":"{{trigger.current.number}}","status":"Notification sent"}}]]]]><![CDATA[></inputs><outputs><![CDATA[{}]]]]><![CDATA[></outputs><condition></condition><comment_text/><sys_class_name>sys_hub_action_instance</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_action_instance></record_update>]]></payload>
|
|
163
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
164
|
-
<source_table>sys_hub_action_instance</source_table>
|
|
165
|
-
<type>Flow Designer Action</type>
|
|
166
|
-
</sys_update_xml>
|
|
167
|
-
|
|
168
|
-
<!-- Flow Logic: Trigger -> First Activity -->
|
|
169
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
170
|
-
<sys_id>522e4803be624975a9ad399677f4f022</sys_id>
|
|
171
|
-
<action>INSERT_OR_UPDATE</action>
|
|
172
|
-
<application>global</application>
|
|
173
|
-
<name>sys_hub_flow_logic_58035bba12b142d0b0b8a8d1f3c1eb6b</name>
|
|
174
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_flow_logic"><sys_hub_flow_logic action="INSERT_OR_UPDATE"><sys_id>58035bba12b142d0b0b8a8d1f3c1eb6b</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><from_element>42e89a9d68db4da08911c7471e00bfd0</from_element><from_element_type>trigger</from_element_type><to_element>cda9d551980f4e1ea0dd6f02b83cf92a</to_element><to_element_type>action</to_element_type><connection_type>success</connection_type><order>100</order><sys_class_name>sys_hub_flow_logic</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_flow_logic></record_update>]]></payload>
|
|
175
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
176
|
-
<source_table>sys_hub_flow_logic</source_table>
|
|
177
|
-
<type>Flow Designer Logic</type>
|
|
178
|
-
</sys_update_xml>
|
|
179
|
-
|
|
180
|
-
<!-- Flow Logic: Activity 1 -> Activity 2 -->
|
|
181
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
182
|
-
<sys_id>b6e2c538b4e040a89af4edccc82a4df8</sys_id>
|
|
183
|
-
<action>INSERT_OR_UPDATE</action>
|
|
184
|
-
<application>global</application>
|
|
185
|
-
<name>sys_hub_flow_logic_492983e8d5f24bec85a97bb9244a81d1</name>
|
|
186
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_flow_logic"><sys_hub_flow_logic action="INSERT_OR_UPDATE"><sys_id>492983e8d5f24bec85a97bb9244a81d1</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><from_element>cda9d551980f4e1ea0dd6f02b83cf92a</from_element><from_element_type>action</from_element_type><to_element>40303f07b0e24e3f98476bfac4066596</to_element><to_element_type>action</to_element_type><connection_type>success</connection_type><order>200</order><sys_class_name>sys_hub_flow_logic</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_flow_logic></record_update>]]></payload>
|
|
187
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
188
|
-
<source_table>sys_hub_flow_logic</source_table>
|
|
189
|
-
<type>Flow Designer Logic</type>
|
|
190
|
-
</sys_update_xml>
|
|
191
|
-
|
|
192
|
-
<!-- Flow Logic: Last Activity -> End -->
|
|
193
|
-
<sys_update_xml action="INSERT_OR_UPDATE">
|
|
194
|
-
<sys_id>a342485eb09a4011a6fdbecd864b470e</sys_id>
|
|
195
|
-
<action>INSERT_OR_UPDATE</action>
|
|
196
|
-
<application>global</application>
|
|
197
|
-
<name>sys_hub_flow_logic_0b5963b61aac41eba1b6f9a8cac74457</name>
|
|
198
|
-
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_hub_flow_logic"><sys_hub_flow_logic action="INSERT_OR_UPDATE"><sys_id>0b5963b61aac41eba1b6f9a8cac74457</sys_id><flow>f3536333f0a142fa8fa86d4a55366eae</flow><from_element>40303f07b0e24e3f98476bfac4066596</from_element><from_element_type>action</from_element_type><to_element>END</to_element><to_element_type>end</to_element_type><connection_type>success</connection_type><order>400</order><sys_class_name>sys_hub_flow_logic</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2025-07-24T09:28:35.976Z</sys_created_on><sys_domain>global</sys_domain><sys_domain_path>/</sys_domain_path></sys_hub_flow_logic></record_update>]]></payload>
|
|
199
|
-
<remote_update_set>501b51bd9d7a4d8caa94731a91223f3c</remote_update_set>
|
|
200
|
-
<source_table>sys_hub_flow_logic</source_table>
|
|
201
|
-
<type>Flow Designer Logic</type>
|
|
202
|
-
</sys_update_xml>
|
|
203
|
-
</unload>
|