snow-flow 1.3.7 ā 1.3.8
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/dist/cli.js +49 -51
- package/dist/version.js +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -153,6 +153,7 @@ program
|
|
|
153
153
|
(objective.toLowerCase().includes('flow') &&
|
|
154
154
|
!objective.toLowerCase().includes('workflow') &&
|
|
155
155
|
!objective.toLowerCase().includes('data flow'));
|
|
156
|
+
let xmlFlowResult = null;
|
|
156
157
|
if (isFlowDesignerTask) {
|
|
157
158
|
cliLogger.info('\nš§ Flow Designer Detected - Using XML-First Approach!');
|
|
158
159
|
cliLogger.info('š Creating production-ready ServiceNow flow XML...');
|
|
@@ -238,6 +239,7 @@ program
|
|
|
238
239
|
// Generate XML
|
|
239
240
|
cliLogger.info('šļø Generating production XML...');
|
|
240
241
|
const result = generateProductionFlowXML(flowDef);
|
|
242
|
+
xmlFlowResult = { ...result, flowDefinition: flowDef };
|
|
241
243
|
cliLogger.info(`\nā
XML Generated Successfully!`);
|
|
242
244
|
cliLogger.info(`š File saved to: ${result.filePath}`);
|
|
243
245
|
cliLogger.info(`š Flow structure:`);
|
|
@@ -267,8 +269,8 @@ program
|
|
|
267
269
|
else {
|
|
268
270
|
cliLogger.info('š Use the import instructions above to deploy to ServiceNow');
|
|
269
271
|
}
|
|
270
|
-
cliLogger.info('\nš”
|
|
271
|
-
|
|
272
|
+
cliLogger.info('\nš” XML template generated. Now launching Queen Agent for intelligent flow development...');
|
|
273
|
+
// DO NOT RETURN HERE - Continue to Queen Agent orchestration!
|
|
272
274
|
}
|
|
273
275
|
catch (error) {
|
|
274
276
|
cliLogger.error('ā XML flow generation failed:', error instanceof Error ? error.message : String(error));
|
|
@@ -278,7 +280,7 @@ program
|
|
|
278
280
|
// Start real Claude Code orchestration
|
|
279
281
|
try {
|
|
280
282
|
// Generate the Queen Agent orchestration prompt
|
|
281
|
-
const orchestrationPrompt = buildQueenAgentPrompt(objective, taskAnalysis, options, isAuthenticated, sessionId);
|
|
283
|
+
const orchestrationPrompt = buildQueenAgentPrompt(objective, taskAnalysis, options, isAuthenticated, sessionId, xmlFlowResult);
|
|
282
284
|
cliLogger.info('\nš Initializing Queen Agent orchestration...');
|
|
283
285
|
cliLogger.info('šÆ Queen Agent will coordinate the following:');
|
|
284
286
|
cliLogger.info(` - Analyze objective: "${objective}"`);
|
|
@@ -342,22 +344,31 @@ program
|
|
|
342
344
|
});
|
|
343
345
|
}
|
|
344
346
|
else {
|
|
345
|
-
cliLogger.info('\n
|
|
346
|
-
cliLogger.info('\
|
|
347
|
+
cliLogger.info('\nš SNOW-FLOW ORCHESTRATION COMPLETE!');
|
|
348
|
+
cliLogger.info('š¤ Now it\'s time for Claude Code agents to do the work...\n');
|
|
349
|
+
cliLogger.info('š QUEEN AGENT ORCHESTRATION PROMPT FOR CLAUDE CODE:');
|
|
347
350
|
cliLogger.info('='.repeat(80));
|
|
348
351
|
cliLogger.info(orchestrationPrompt);
|
|
349
352
|
cliLogger.info('='.repeat(80));
|
|
350
|
-
cliLogger.info('\nā
|
|
351
|
-
cliLogger.info('š
|
|
352
|
-
cliLogger.info(' 1. Copy the
|
|
353
|
-
cliLogger.info(' 2.
|
|
354
|
-
cliLogger.info(' 3.
|
|
355
|
-
cliLogger.info(' 4.
|
|
353
|
+
cliLogger.info('\nā
Snow-Flow has prepared the orchestration!');
|
|
354
|
+
cliLogger.info('š CRITICAL NEXT STEPS:');
|
|
355
|
+
cliLogger.info(' 1. Copy the ENTIRE prompt above');
|
|
356
|
+
cliLogger.info(' 2. Paste it into Claude Code (the AI assistant)');
|
|
357
|
+
cliLogger.info(' 3. Claude Code will spawn multiple specialized agents as workhorses');
|
|
358
|
+
cliLogger.info(' 4. These agents will implement your flow with all required logic');
|
|
359
|
+
cliLogger.info(' 5. Agents will enhance the basic XML template with real functionality');
|
|
360
|
+
cliLogger.info('\nšÆ Remember:');
|
|
361
|
+
cliLogger.info(' - Snow-Flow = Orchestrator (coordinates the work)');
|
|
362
|
+
cliLogger.info(' - Claude Code = Workhorses (implement the solution)');
|
|
363
|
+
if (xmlFlowResult) {
|
|
364
|
+
cliLogger.info(`\nš XML template saved at: ${xmlFlowResult.filePath}`);
|
|
365
|
+
cliLogger.info(' ā ļø This is just a BASIC template - agents must enhance it!');
|
|
366
|
+
}
|
|
356
367
|
if (isAuthenticated && options.autoDeploy) {
|
|
357
|
-
cliLogger.info('
|
|
368
|
+
cliLogger.info('\nš Deployment Mode: Agents will create REAL artifacts in ServiceNow');
|
|
358
369
|
}
|
|
359
370
|
else {
|
|
360
|
-
cliLogger.info('
|
|
371
|
+
cliLogger.info('\nš Planning Mode: Analysis and recommendations only');
|
|
361
372
|
}
|
|
362
373
|
cliLogger.info(`\nš¾ Session ID for monitoring: ${sessionId}`);
|
|
363
374
|
}
|
|
@@ -373,43 +384,13 @@ program
|
|
|
373
384
|
});
|
|
374
385
|
// Helper function to execute Claude Code directly (FALLBACK ONLY)
|
|
375
386
|
async function executeClaudeCode(prompt) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
cliLogger.warn('ā Claude Code not found in PATH');
|
|
384
|
-
resolve(false);
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
const command = claudeCommands[currentCommand];
|
|
388
|
-
cliLogger.debug(`š Trying: ${command}`);
|
|
389
|
-
const claudeArgs = [
|
|
390
|
-
'--version'
|
|
391
|
-
];
|
|
392
|
-
// Test if Claude Code is available
|
|
393
|
-
const testProcess = (0, child_process_1.spawn)(command, claudeArgs, {
|
|
394
|
-
stdio: ['ignore', 'pipe', 'pipe']
|
|
395
|
-
});
|
|
396
|
-
testProcess.on('close', (code) => {
|
|
397
|
-
if (code === 0) {
|
|
398
|
-
cliLogger.info(`ā
Found Claude Code: ${command}`);
|
|
399
|
-
executeWithClaude(command, prompt, resolve);
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
currentCommand++;
|
|
403
|
-
tryNextCommand();
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
testProcess.on('error', () => {
|
|
407
|
-
currentCommand++;
|
|
408
|
-
tryNextCommand();
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
|
-
tryNextCommand();
|
|
412
|
-
});
|
|
387
|
+
cliLogger.info('š¤ Preparing Claude Code agent orchestration...');
|
|
388
|
+
// Claude Code is not a CLI tool - it requires manual interaction
|
|
389
|
+
// Snow-flow is the orchestrator, Claude Code agents are the workhorses
|
|
390
|
+
cliLogger.info('š Claude Code prompt generated successfully!');
|
|
391
|
+
cliLogger.info('š Snow-flow orchestration ready for Claude Code execution');
|
|
392
|
+
// Always return false to show the prompt to the user
|
|
393
|
+
return false;
|
|
413
394
|
}
|
|
414
395
|
// Real-time monitoring dashboard for Claude Code process
|
|
415
396
|
function startMonitoringDashboard(claudeProcess) {
|
|
@@ -519,7 +500,7 @@ async function executeWithClaude(claudeCommand, prompt, resolve) {
|
|
|
519
500
|
});
|
|
520
501
|
}
|
|
521
502
|
// Helper function to build Queen Agent orchestration prompt
|
|
522
|
-
function buildQueenAgentPrompt(objective, taskAnalysis, options, isAuthenticated = false, sessionId) {
|
|
503
|
+
function buildQueenAgentPrompt(objective, taskAnalysis, options, isAuthenticated = false, sessionId, xmlFlowResult = null) {
|
|
523
504
|
// Check if intelligent features are enabled
|
|
524
505
|
const hasIntelligentFeatures = options.autoPermissions || options.smartDiscovery ||
|
|
525
506
|
options.liveTesting || options.autoDeploy || options.autoRollback ||
|
|
@@ -539,6 +520,23 @@ You are the Queen Agent, master coordinator of the Snow-Flow hive-mind. Your mis
|
|
|
539
520
|
- **Supporting Agents**: ${taskAnalysis.supportingAgents.join(', ')}
|
|
540
521
|
- **Estimated Total Agents**: ${taskAnalysis.estimatedAgentCount}
|
|
541
522
|
- **ServiceNow Artifacts**: ${taskAnalysis.serviceNowArtifacts.join(', ')}
|
|
523
|
+
|
|
524
|
+
${xmlFlowResult ? `## š§ Flow Designer XML Template Generated
|
|
525
|
+
An initial XML template has been created as a starting point:
|
|
526
|
+
- **File Path**: ${xmlFlowResult.filePath}
|
|
527
|
+
- **Flow Name**: ${xmlFlowResult.flowDefinition.name}
|
|
528
|
+
- **Table**: ${xmlFlowResult.flowDefinition.table}
|
|
529
|
+
- **Activities**: ${xmlFlowResult.flowDefinition.activities.length}
|
|
530
|
+
|
|
531
|
+
**IMPORTANT**: This is just a basic template! You must spawn Claude Code agents to:
|
|
532
|
+
1. Analyze the detailed requirements from the objective
|
|
533
|
+
2. Design the complete flow logic with all activities
|
|
534
|
+
3. Add approval steps, notifications, conditions, etc.
|
|
535
|
+
4. Test the flow implementation
|
|
536
|
+
5. Deploy to ServiceNow
|
|
537
|
+
|
|
538
|
+
The XML template is saved but needs significant enhancement by your agents!
|
|
539
|
+
` : ''}
|
|
542
540
|
- **Recommended Team**: ${getTeamRecommendation(taskAnalysis.taskType)}
|
|
543
541
|
|
|
544
542
|
## š Table Discovery Intelligence
|
package/dist/version.js
CHANGED
|
@@ -7,12 +7,18 @@ exports.VERSION_INFO = exports.VERSION = void 0;
|
|
|
7
7
|
exports.getVersionString = getVersionString;
|
|
8
8
|
exports.getLatestFeatures = getLatestFeatures;
|
|
9
9
|
exports.isLatestVersion = isLatestVersion;
|
|
10
|
-
exports.VERSION = '1.3.
|
|
10
|
+
exports.VERSION = '1.3.8';
|
|
11
11
|
exports.VERSION_INFO = {
|
|
12
12
|
version: exports.VERSION,
|
|
13
13
|
name: 'Snow-Flow',
|
|
14
14
|
description: 'ServiceNow Queen Agent - Hive-Mind Intelligence for ServiceNow Development',
|
|
15
15
|
features: {
|
|
16
|
+
'1.3.8': [
|
|
17
|
+
'š¤ CLAUDE CODE FIX: Restored proper Claude Code agent spawning',
|
|
18
|
+
'š SWARM ORCHESTRATION: Snow-flow is orchestrator, Claude Code agents are workhorses',
|
|
19
|
+
'š§ NO EARLY EXIT: Flow Designer tasks now continue to full agent orchestration',
|
|
20
|
+
'š CLEAR INSTRUCTIONS: Better messaging about Snow-flow vs Claude Code roles'
|
|
21
|
+
],
|
|
16
22
|
'1.3.7': [
|
|
17
23
|
'š RELEASE VERSION: Combined all fixes from 1.3.2-1.3.6 into stable release',
|
|
18
24
|
'ā
ZOD VALIDATION: Completely fixed all configuration schema issues',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
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",
|