snow-flow 1.3.12 โ†’ 1.3.14

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 CHANGED
@@ -197,60 +197,88 @@ program
197
197
  .option('--no-progress-monitoring', 'Disable progress monitoring')
198
198
  .option('--xml-first', 'Use XML-first approach for flow creation (MOST RELIABLE!)')
199
199
  .option('--xml-output <path>', 'Save generated XML to specific path (with --xml-first)')
200
+ .option('--verbose', 'Show detailed execution information')
200
201
  .action(async (objective, options) => {
201
- cliLogger.info(`\n๐Ÿš€ Starting ServiceNow Multi-Agent Swarm v${version_js_1.VERSION} - รฉรฉn command voor alles!`);
202
+ // Always show essential info
203
+ cliLogger.info(`\n๐Ÿš€ Snow-Flow v${version_js_1.VERSION}`);
202
204
  cliLogger.info(`๐Ÿ“‹ Objective: ${objective}`);
203
- cliLogger.info(`โš™๏ธ Strategy: ${options.strategy} | Mode: ${options.mode} | Max Agents: ${options.maxAgents}`);
204
- cliLogger.info(`๐Ÿ”„ Parallel: ${options.parallel ? 'Yes' : 'No'} | Monitor: ${options.monitor ? 'Yes' : 'No'}`);
205
- // Show new intelligent features
206
- cliLogger.info(`\n๐Ÿง  Intelligent Features:`);
207
- cliLogger.info(` ๐Ÿ” Auto Permissions: ${options.autoPermissions ? 'โœ… Yes' : 'โŒ No'}`);
208
- cliLogger.info(` ๐Ÿ” Smart Discovery: ${options.smartDiscovery ? 'โœ… Yes' : 'โŒ No'}`);
209
- cliLogger.info(` ๐Ÿงช Live Testing: ${options.liveTesting ? 'โœ… Yes' : 'โŒ No'}`);
210
- cliLogger.info(` ๐Ÿš€ Auto Deploy: ${options.autoDeploy ? 'โœ… DEPLOYMENT MODE - WILL CREATE REAL ARTIFACTS' : 'โŒ PLANNING MODE - ANALYSIS ONLY'}`);
211
- cliLogger.info(` ๐Ÿ”„ Auto Rollback: ${options.autoRollback ? 'โœ… Yes' : 'โŒ No'}`);
212
- cliLogger.info(` ๐Ÿ’พ Shared Memory: ${options.sharedMemory ? 'โœ… Yes' : 'โŒ No'}`);
213
- cliLogger.info(` ๐Ÿ“Š Progress Monitoring: ${options.progressMonitoring ? 'โœ… Yes' : 'โŒ No'}\n`);
205
+ // Only show detailed config in verbose mode
206
+ if (options.verbose) {
207
+ cliLogger.info(`โš™๏ธ Strategy: ${options.strategy} | Mode: ${options.mode} | Max Agents: ${options.maxAgents}`);
208
+ cliLogger.info(`๐Ÿ”„ Parallel: ${options.parallel ? 'Yes' : 'No'} | Monitor: ${options.monitor ? 'Yes' : 'No'}`);
209
+ // Show new intelligent features
210
+ cliLogger.info(`\n๐Ÿง  Intelligent Features:`);
211
+ cliLogger.info(` ๐Ÿ” Auto Permissions: ${options.autoPermissions ? 'โœ… Yes' : 'โŒ No'}`);
212
+ cliLogger.info(` ๐Ÿ” Smart Discovery: ${options.smartDiscovery ? 'โœ… Yes' : 'โŒ No'}`);
213
+ cliLogger.info(` ๐Ÿงช Live Testing: ${options.liveTesting ? 'โœ… Yes' : 'โŒ No'}`);
214
+ cliLogger.info(` ๐Ÿš€ Auto Deploy: ${options.autoDeploy ? 'โœ… DEPLOYMENT MODE - WILL CREATE REAL ARTIFACTS' : 'โŒ PLANNING MODE - ANALYSIS ONLY'}`);
215
+ cliLogger.info(` ๐Ÿ”„ Auto Rollback: ${options.autoRollback ? 'โœ… Yes' : 'โŒ No'}`);
216
+ cliLogger.info(` ๐Ÿ’พ Shared Memory: ${options.sharedMemory ? 'โœ… Yes' : 'โŒ No'}`);
217
+ cliLogger.info(` ๐Ÿ“Š Progress Monitoring: ${options.progressMonitoring ? 'โœ… Yes' : 'โŒ No'}\n`);
218
+ }
219
+ else if (options.autoDeploy) {
220
+ // In non-verbose mode, only show critical deployment warning
221
+ cliLogger.info(`๐Ÿš€ Auto-Deploy: ENABLED - Will create real artifacts in ServiceNow`);
222
+ }
214
223
  // Analyze the objective using intelligent agent detection
215
224
  const taskAnalysis = analyzeObjective(objective, parseInt(options.maxAgents));
216
- cliLogger.info(`๐ŸŽฏ Task Type: ${taskAnalysis.taskType}`);
217
- cliLogger.info(`๐Ÿง  Primary Agent: ${taskAnalysis.primaryAgent}`);
218
- cliLogger.info(`๐Ÿ‘ฅ Supporting Agents: ${taskAnalysis.supportingAgents.join(', ')}`);
219
- cliLogger.info(`๐Ÿ“Š Complexity: ${taskAnalysis.complexity} | Estimated Agents: ${taskAnalysis.estimatedAgentCount}`);
220
- cliLogger.info(`๐Ÿ”ง ServiceNow Artifacts: ${taskAnalysis.serviceNowArtifacts.join(', ')}`);
221
- cliLogger.info(`๐Ÿ“ฆ Auto Update Set: ${taskAnalysis.requiresUpdateSet ? 'โœ… Yes' : 'โŒ No'}`);
222
- cliLogger.info(`๐Ÿ—๏ธ Auto Application: ${taskAnalysis.requiresApplication ? 'โœ… Yes' : 'โŒ No'}`);
223
- // Show timeout configuration
224
- const timeoutMinutes = process.env.SNOW_FLOW_TIMEOUT_MINUTES ? parseInt(process.env.SNOW_FLOW_TIMEOUT_MINUTES) : 60;
225
- if (timeoutMinutes > 0) {
226
- cliLogger.info(`โฑ๏ธ Timeout: ${timeoutMinutes} minutes`);
225
+ // Debug logging to understand task type detection
226
+ if (process.env.DEBUG || options.verbose) {
227
+ if (process.env.DEBUG) {
228
+ cliLogger.info(`๐Ÿ” DEBUG - Detected artifacts: [${taskAnalysis.serviceNowArtifacts.join(', ')}]`);
229
+ cliLogger.info(`๐Ÿ” DEBUG - Flow keywords in objective: ${objective.toLowerCase().includes('flow')}`);
230
+ cliLogger.info(`๐Ÿ” DEBUG - Widget keywords in objective: ${objective.toLowerCase().includes('widget')}`);
231
+ }
232
+ cliLogger.info(`\n๐Ÿ“Š Task Analysis:`);
233
+ cliLogger.info(` ๐ŸŽฏ Task Type: ${taskAnalysis.taskType}`);
234
+ cliLogger.info(` ๐Ÿง  Primary Agent: ${taskAnalysis.primaryAgent}`);
235
+ cliLogger.info(` ๐Ÿ‘ฅ Supporting Agents: ${taskAnalysis.supportingAgents.join(', ')}`);
236
+ cliLogger.info(` ๐Ÿ“Š Complexity: ${taskAnalysis.complexity} | Estimated Agents: ${taskAnalysis.estimatedAgentCount}`);
237
+ cliLogger.info(` ๐Ÿ”ง ServiceNow Artifacts: ${taskAnalysis.serviceNowArtifacts.join(', ')}`);
238
+ cliLogger.info(` ๐Ÿ“ฆ Auto Update Set: ${taskAnalysis.requiresUpdateSet ? 'โœ… Yes' : 'โŒ No'}`);
239
+ cliLogger.info(` ๐Ÿ—๏ธ Auto Application: ${taskAnalysis.requiresApplication ? 'โœ… Yes' : 'โŒ No'}`);
227
240
  }
228
- else {
229
- cliLogger.info('โฑ๏ธ Timeout: Disabled (infinite execution time)');
241
+ // Show timeout configuration only in verbose mode
242
+ const timeoutMinutes = process.env.SNOW_FLOW_TIMEOUT_MINUTES ? parseInt(process.env.SNOW_FLOW_TIMEOUT_MINUTES) : 60;
243
+ if (options.verbose) {
244
+ if (timeoutMinutes > 0) {
245
+ cliLogger.info(`โฑ๏ธ Timeout: ${timeoutMinutes} minutes`);
246
+ }
247
+ else {
248
+ cliLogger.info('โฑ๏ธ Timeout: Disabled (infinite execution time)');
249
+ }
230
250
  }
231
251
  // Check ServiceNow authentication
232
252
  const oauth = new snow_oauth_js_1.ServiceNowOAuth();
233
253
  const isAuthenticated = await oauth.isAuthenticated();
234
- if (isAuthenticated) {
235
- cliLogger.info('๐Ÿ”— ServiceNow connection: โœ… Authenticated');
236
- // Test ServiceNow connection
237
- const client = new servicenow_client_js_1.ServiceNowClient();
238
- const testResult = await client.testConnection();
239
- if (testResult.success) {
240
- cliLogger.info(`๐Ÿ‘ค Connected as: ${testResult.data.name} (${testResult.data.user_name})`);
254
+ if (options.verbose) {
255
+ if (isAuthenticated) {
256
+ cliLogger.info('๐Ÿ”— ServiceNow connection: โœ… Authenticated');
257
+ // Test ServiceNow connection
258
+ const client = new servicenow_client_js_1.ServiceNowClient();
259
+ const testResult = await client.testConnection();
260
+ if (testResult.success) {
261
+ cliLogger.info(`๐Ÿ‘ค Connected as: ${testResult.data.name} (${testResult.data.user_name})`);
262
+ }
263
+ }
264
+ else {
265
+ cliLogger.warn('๐Ÿ”— ServiceNow connection: โŒ Not authenticated');
266
+ cliLogger.info('๐Ÿ’ก Run "snow-flow auth login" to enable live ServiceNow integration');
241
267
  }
242
268
  }
243
- else {
244
- cliLogger.warn('๐Ÿ”— ServiceNow connection: โŒ Not authenticated');
245
- cliLogger.info('๐Ÿ’ก Run "snow-flow auth login" to enable live ServiceNow integration');
269
+ else if (!isAuthenticated) {
270
+ // In non-verbose mode, only warn if not authenticated
271
+ cliLogger.warn('โš ๏ธ Not authenticated. Run "snow-flow auth login" for ServiceNow integration');
246
272
  }
247
273
  // Initialize Queen Agent memory system
248
- cliLogger.info('\n๐Ÿ’พ Initializing swarm memory system...');
274
+ if (options.verbose) {
275
+ cliLogger.info('\n๐Ÿ’พ Initializing swarm memory system...');
276
+ }
249
277
  const { QueenMemorySystem } = await Promise.resolve().then(() => __importStar(require('./queen/queen-memory.js')));
250
278
  const memorySystem = new QueenMemorySystem();
251
279
  // Generate swarm session ID
252
280
  const sessionId = `swarm_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
253
- cliLogger.info(`๐Ÿ“‹ Swarm Session ID: ${sessionId}`);
281
+ cliLogger.info(`\n๐Ÿ”– Session: ${sessionId}`);
254
282
  // Store swarm session in memory
255
283
  memorySystem.storeLearning(`session_${sessionId}`, {
256
284
  objective,
@@ -267,9 +295,7 @@ program
267
295
  !objective.toLowerCase().includes('data flow'));
268
296
  let xmlFlowResult = null;
269
297
  if (isFlowDesignerTask) {
270
- cliLogger.info('\n๐Ÿ”ง Flow Designer Detected - Using XML-First Approach!');
271
- cliLogger.info('๐Ÿ“‹ Creating production-ready ServiceNow flow XML...');
272
- cliLogger.info('๐Ÿ’ก Reason: Flow Designer flows are most reliable with XML-first approach\n');
298
+ cliLogger.info('\n๐Ÿ”ง Flow Designer detected - generating XML...');
273
299
  try {
274
300
  // Import IMPROVED XML flow generator (fixes "too small to work" issue!)
275
301
  const { generateImprovedFlowXML } = await Promise.resolve().then(() => __importStar(require('./utils/improved-flow-xml-generator.js')));
@@ -349,7 +375,9 @@ program
349
375
  }]
350
376
  };
351
377
  // Generate IMPROVED XML with enhanced structure
352
- cliLogger.info('๐Ÿ—๏ธ Generating IMPROVED production XML...');
378
+ if (options.verbose) {
379
+ cliLogger.info('๐Ÿ—๏ธ Generating IMPROVED production XML...');
380
+ }
353
381
  // Convert to improved flow definition
354
382
  const improvedFlowDef = {
355
383
  ...flowDef,
@@ -364,18 +392,19 @@ program
364
392
  };
365
393
  const result = generateImprovedFlowXML(improvedFlowDef);
366
394
  xmlFlowResult = { ...result, flowDefinition: flowDef };
367
- cliLogger.info(`\nโœ… IMPROVED XML Generated Successfully!`);
368
- cliLogger.info(`๐Ÿ“ File saved to: ${result.filePath}`);
369
- cliLogger.info(`๐Ÿ”ฅ IMPROVEMENTS: Uses v2 tables, Base64+gzip encoding, complete label_cache!`);
370
- cliLogger.info(`๐Ÿ“Š Flow structure:`);
371
- cliLogger.info(` - Name: ${flowDef.name}`);
372
- cliLogger.info(` - Table: ${flowDef.table}`);
373
- cliLogger.info(` - Trigger: ${flowDef.trigger_type}`);
374
- cliLogger.info(` - Activities: ${flowDef.activities.length}`);
375
- // Show import instructions
376
- cliLogger.info('\n' + '='.repeat(60));
377
- cliLogger.info(result.instructions);
378
- cliLogger.info('='.repeat(60));
395
+ cliLogger.info(`โœ… XML generated: ${result.filePath}`);
396
+ if (options.verbose) {
397
+ cliLogger.info(`๐Ÿ”ฅ IMPROVEMENTS: Uses v2 tables, Base64+gzip encoding, complete label_cache!`);
398
+ cliLogger.info(`๐Ÿ“Š Flow structure:`);
399
+ cliLogger.info(` - Name: ${flowDef.name}`);
400
+ cliLogger.info(` - Table: ${flowDef.table}`);
401
+ cliLogger.info(` - Trigger: ${flowDef.trigger_type}`);
402
+ cliLogger.info(` - Activities: ${flowDef.activities.length}`);
403
+ // Show import instructions
404
+ cliLogger.info('\n' + '='.repeat(60));
405
+ cliLogger.info(result.instructions);
406
+ cliLogger.info('='.repeat(60));
407
+ }
379
408
  // Store result in memory
380
409
  memorySystem.storeLearning(`xml_flow_${sessionId}`, {
381
410
  objective,
@@ -383,37 +412,44 @@ program
383
412
  xml_file: result.filePath,
384
413
  generated_at: new Date().toISOString()
385
414
  });
386
- cliLogger.info('\n๐ŸŽฏ XML Flow generated successfully!');
387
415
  // Check if auto-deploy is enabled
388
416
  if (options.autoDeploy !== false) { // Default is true from swarm command
389
- cliLogger.info('\n๐Ÿš€ Auto-Deploy enabled - importing XML to ServiceNow...');
390
- // Automatically deploy the XML file
391
- const deploySuccess = await deployXMLToServiceNow(result.filePath, {
392
- preview: true,
393
- commit: true
394
- });
395
- if (deploySuccess) {
396
- cliLogger.info('\nโœ… Flow automatically deployed to ServiceNow!');
397
- cliLogger.info('๐ŸŽฏ The flow is now available in Flow Designer');
398
- // Store deployment success in memory
399
- memorySystem.storeLearning(`deployment_${sessionId}`, {
400
- success: true,
401
- xml_file: result.filePath,
402
- deployed_at: new Date().toISOString(),
403
- flow_name: flowDef.name
417
+ cliLogger.info('๐Ÿš€ Deploying to ServiceNow...');
418
+ try {
419
+ // Automatically deploy the XML file
420
+ const deploySuccess = await deployXMLToServiceNow(result.filePath, {
421
+ preview: true,
422
+ commit: true
404
423
  });
424
+ if (deploySuccess) {
425
+ cliLogger.info('โœ… Flow deployed to ServiceNow!');
426
+ // Store deployment success in memory
427
+ memorySystem.storeLearning(`deployment_${sessionId}`, {
428
+ success: true,
429
+ xml_file: result.filePath,
430
+ deployed_at: new Date().toISOString(),
431
+ flow_name: flowDef.name
432
+ });
433
+ }
434
+ else {
435
+ cliLogger.warn('โš ๏ธ Deployment encountered issues');
436
+ cliLogger.info(`๐Ÿ’ก Manual deploy: snow-flow deploy-xml "${result.filePath}"`);
437
+ }
405
438
  }
406
- else {
407
- cliLogger.warn('\nโš ๏ธ Automatic deployment encountered issues');
408
- cliLogger.info('๐Ÿ’ก You can manually deploy later with:');
409
- cliLogger.info(` snow-flow deploy-xml "${result.filePath}"`);
439
+ catch (deployError) {
440
+ cliLogger.error('โŒ Deployment failed:', deployError instanceof Error ? deployError.message : String(deployError));
441
+ cliLogger.info(`๐Ÿ’ก Manual deploy: snow-flow deploy-xml "${result.filePath}"`);
410
442
  }
411
443
  }
412
444
  else {
413
- cliLogger.info('๐Ÿ“‹ Use the import instructions above to deploy to ServiceNow');
445
+ if (options.verbose) {
446
+ cliLogger.info('๐Ÿ“‹ Use the import instructions above to deploy to ServiceNow');
447
+ }
448
+ else {
449
+ cliLogger.info(`๐Ÿ“‹ Manual deploy: snow-flow deploy-xml "${result.filePath}"`);
450
+ }
414
451
  }
415
- cliLogger.info('\n๐Ÿ’ก XML template generated. Now launching Queen Agent for intelligent flow development...');
416
- // DO NOT RETURN HERE - Continue to Queen Agent orchestration!
452
+ // Continue to Queen Agent orchestration
417
453
  }
418
454
  catch (error) {
419
455
  cliLogger.error('โŒ XML flow generation failed:', error instanceof Error ? error.message : String(error));
@@ -424,17 +460,22 @@ program
424
460
  try {
425
461
  // Generate the Queen Agent orchestration prompt
426
462
  const orchestrationPrompt = buildQueenAgentPrompt(objective, taskAnalysis, options, isAuthenticated, sessionId, xmlFlowResult);
427
- cliLogger.info('\n๐Ÿ‘‘ Initializing Queen Agent orchestration...');
428
- cliLogger.info('๐ŸŽฏ Queen Agent will coordinate the following:');
429
- cliLogger.info(` - Analyze objective: "${objective}"`);
430
- cliLogger.info(` - Spawn ${taskAnalysis.estimatedAgentCount} specialized agents`);
431
- cliLogger.info(` - Coordinate through shared memory (session: ${sessionId})`);
432
- cliLogger.info(` - Monitor progress and adapt strategy`);
463
+ if (options.verbose) {
464
+ cliLogger.info('\n๐Ÿ‘‘ Initializing Queen Agent orchestration...');
465
+ cliLogger.info('๐ŸŽฏ Queen Agent will coordinate the following:');
466
+ cliLogger.info(` - Analyze objective: "${objective}"`);
467
+ cliLogger.info(` - Spawn ${taskAnalysis.estimatedAgentCount} specialized agents`);
468
+ cliLogger.info(` - Coordinate through shared memory (session: ${sessionId})`);
469
+ cliLogger.info(` - Monitor progress and adapt strategy`);
470
+ }
471
+ else {
472
+ cliLogger.info('\n๐Ÿ‘‘ Launching Queen Agent...');
473
+ }
433
474
  // Check if intelligent features are enabled
434
475
  const hasIntelligentFeatures = options.autoPermissions || options.smartDiscovery ||
435
476
  options.liveTesting || options.autoDeploy || options.autoRollback ||
436
477
  options.sharedMemory || options.progressMonitoring;
437
- if (hasIntelligentFeatures && isAuthenticated) {
478
+ if (options.verbose && hasIntelligentFeatures && isAuthenticated) {
438
479
  cliLogger.info('\n๐Ÿง  INTELLIGENT ORCHESTRATION MODE ENABLED!');
439
480
  cliLogger.info('โœจ Queen Agent will use advanced features:');
440
481
  if (options.autoPermissions) {
@@ -459,26 +500,30 @@ program
459
500
  cliLogger.info(' ๐Ÿ“Š Real-time progress monitoring');
460
501
  }
461
502
  }
462
- if (isAuthenticated) {
463
- cliLogger.info('\n๐Ÿ”— Live ServiceNow integration: โœ… Enabled');
464
- cliLogger.info('๐Ÿ“ Artifacts will be created directly in ServiceNow');
465
- }
466
- else {
467
- cliLogger.info('\n๐Ÿ”— Live ServiceNow integration: โŒ Disabled');
468
- cliLogger.info('๐Ÿ“ Artifacts will be saved to servicenow/ directory');
503
+ if (options.verbose) {
504
+ if (isAuthenticated) {
505
+ cliLogger.info('\n๐Ÿ”— Live ServiceNow integration: โœ… Enabled');
506
+ cliLogger.info('๐Ÿ“ Artifacts will be created directly in ServiceNow');
507
+ }
508
+ else {
509
+ cliLogger.info('\n๐Ÿ”— Live ServiceNow integration: โŒ Disabled');
510
+ cliLogger.info('๐Ÿ“ Artifacts will be saved to servicenow/ directory');
511
+ }
469
512
  }
470
- cliLogger.info('\n๐Ÿš€ Launching Claude Code with Queen Agent...');
513
+ cliLogger.info('๐Ÿš€ Launching Claude Code...');
471
514
  // Try to execute Claude Code directly with the prompt
472
515
  const success = await executeClaudeCode(orchestrationPrompt);
473
516
  if (success) {
474
- cliLogger.info('\nโœ… Queen Agent orchestration launched successfully!');
475
- cliLogger.info('๐Ÿ‘‘ Queen Agent is now coordinating your swarm');
476
- cliLogger.info(`๐Ÿ’พ Monitor progress with session ID: ${sessionId}`);
477
- if (isAuthenticated && options.autoDeploy) {
478
- cliLogger.info('๐Ÿš€ Real artifacts will be created in ServiceNow');
479
- }
480
- else {
481
- cliLogger.info('๐Ÿ“‹ Planning mode - analysis and recommendations only');
517
+ cliLogger.info('โœ… Claude Code launched successfully!');
518
+ if (options.verbose) {
519
+ cliLogger.info('๐Ÿ‘‘ Queen Agent is now coordinating your swarm');
520
+ cliLogger.info(`๐Ÿ’พ Monitor progress with session ID: ${sessionId}`);
521
+ if (isAuthenticated && options.autoDeploy) {
522
+ cliLogger.info('๐Ÿš€ Real artifacts will be created in ServiceNow');
523
+ }
524
+ else {
525
+ cliLogger.info('๐Ÿ“‹ Planning mode - analysis and recommendations only');
526
+ }
482
527
  }
483
528
  // Store successful launch in memory
484
529
  memorySystem.storeLearning(`launch_${sessionId}`, {
@@ -487,33 +532,43 @@ program
487
532
  });
488
533
  }
489
534
  else {
490
- cliLogger.info('\n๐Ÿš€ SNOW-FLOW ORCHESTRATION COMPLETE!');
491
- cliLogger.info('๐Ÿค– Now it\'s time for Claude Code agents to do the work...\n');
492
- cliLogger.info('๐Ÿ‘‘ QUEEN AGENT ORCHESTRATION PROMPT FOR CLAUDE CODE:');
493
- cliLogger.info('='.repeat(80));
494
- cliLogger.info(orchestrationPrompt);
495
- cliLogger.info('='.repeat(80));
496
- cliLogger.info('\nโœ… Snow-Flow has prepared the orchestration!');
497
- cliLogger.info('๐Ÿ“Š CRITICAL NEXT STEPS:');
498
- cliLogger.info(' 1. Copy the ENTIRE prompt above');
499
- cliLogger.info(' 2. Paste it into Claude Code (the AI assistant)');
500
- cliLogger.info(' 3. Claude Code will spawn multiple specialized agents as workhorses');
501
- cliLogger.info(' 4. These agents will implement your flow with all required logic');
502
- cliLogger.info(' 5. Agents will enhance the basic XML template with real functionality');
503
- cliLogger.info('\n๐ŸŽฏ Remember:');
504
- cliLogger.info(' - Snow-Flow = Orchestrator (coordinates the work)');
505
- cliLogger.info(' - Claude Code = Workhorses (implement the solution)');
506
- if (xmlFlowResult) {
507
- cliLogger.info(`\n๐Ÿ“ XML template saved at: ${xmlFlowResult.filePath}`);
508
- cliLogger.info(' โš ๏ธ This is just a BASIC template - agents must enhance it!');
509
- }
510
- if (isAuthenticated && options.autoDeploy) {
511
- cliLogger.info('\n๐Ÿš€ Deployment Mode: Agents will create REAL artifacts in ServiceNow');
535
+ if (options.verbose) {
536
+ cliLogger.info('\n๐Ÿš€ SNOW-FLOW ORCHESTRATION COMPLETE!');
537
+ cliLogger.info('๐Ÿค– Now it\'s time for Claude Code agents to do the work...\n');
538
+ cliLogger.info('๐Ÿ‘‘ QUEEN AGENT ORCHESTRATION PROMPT FOR CLAUDE CODE:');
539
+ cliLogger.info('='.repeat(80));
540
+ cliLogger.info(orchestrationPrompt);
541
+ cliLogger.info('='.repeat(80));
542
+ cliLogger.info('\nโœ… Snow-Flow has prepared the orchestration!');
543
+ cliLogger.info('๐Ÿ“Š CRITICAL NEXT STEPS:');
544
+ cliLogger.info(' 1. Copy the ENTIRE prompt above');
545
+ cliLogger.info(' 2. Paste it into Claude Code (the AI assistant)');
546
+ cliLogger.info(' 3. Claude Code will spawn multiple specialized agents as workhorses');
547
+ cliLogger.info(' 4. These agents will implement your flow with all required logic');
548
+ cliLogger.info(' 5. Agents will enhance the basic XML template with real functionality');
549
+ cliLogger.info('\n๐ŸŽฏ Remember:');
550
+ cliLogger.info(' - Snow-Flow = Orchestrator (coordinates the work)');
551
+ cliLogger.info(' - Claude Code = Workhorses (implement the solution)');
552
+ if (xmlFlowResult) {
553
+ cliLogger.info(`\n๐Ÿ“ XML template saved at: ${xmlFlowResult.filePath}`);
554
+ cliLogger.info(' โš ๏ธ This is just a BASIC template - agents must enhance it!');
555
+ }
556
+ if (isAuthenticated && options.autoDeploy) {
557
+ cliLogger.info('\n๐Ÿš€ Deployment Mode: Agents will create REAL artifacts in ServiceNow');
558
+ }
559
+ else {
560
+ cliLogger.info('\n๐Ÿ“‹ Planning Mode: Analysis and recommendations only');
561
+ }
562
+ cliLogger.info(`\n๐Ÿ’พ Session ID for monitoring: ${sessionId}`);
512
563
  }
513
564
  else {
514
- cliLogger.info('\n๐Ÿ“‹ Planning Mode: Analysis and recommendations only');
565
+ // Non-verbose mode - just show the essential info
566
+ cliLogger.info('\n๐Ÿ“‹ Manual Claude Code execution required');
567
+ cliLogger.info('๐Ÿ’ก Run with --verbose to see the full orchestration prompt');
568
+ if (xmlFlowResult) {
569
+ cliLogger.info(`๐Ÿ“ XML generated: ${xmlFlowResult.filePath}`);
570
+ }
515
571
  }
516
- cliLogger.info(`\n๐Ÿ’พ Session ID for monitoring: ${sessionId}`);
517
572
  }
518
573
  }
519
574
  catch (error) {
@@ -266,10 +266,11 @@ class AgentDetector {
266
266
  }
267
267
  static determineTaskType(objective, artifacts) {
268
268
  // Determine based on detected artifacts and keywords
269
- if (artifacts.includes('widget'))
270
- return 'widget_development';
269
+ // Check flow FIRST as it's often confused with widget when both are present
271
270
  if (artifacts.includes('flow') || artifacts.includes('workflow'))
272
271
  return 'flow_development';
272
+ if (artifacts.includes('widget'))
273
+ return 'widget_development';
273
274
  if (artifacts.includes('application'))
274
275
  return 'application_development';
275
276
  if (artifacts.includes('script') || artifacts.includes('business_rule'))
package/dist/version.js CHANGED
@@ -7,12 +7,28 @@ 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.12';
10
+ exports.VERSION = '1.3.14';
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.14': [
17
+ '๐ŸŽฏ CLEANER OUTPUT: Dramatically reduced verbose logging in swarm command',
18
+ '๐Ÿš€ FOCUSED UI: Only essential information shown by default',
19
+ '๐Ÿ“Š --verbose FLAG: Added flag to see detailed execution information',
20
+ 'โœจ STREAMLINED: No more walls of text before anything happens',
21
+ '๐Ÿ’ก SMART DEFAULTS: Shows objective, session ID, and actual progress only',
22
+ '๐Ÿ”ง BETTER UX: Clean, professional output focused on what matters'
23
+ ],
24
+ '1.3.13': [
25
+ '๐Ÿ› FIX ERROR MESSAGES: Separated XML generation and deployment error handling',
26
+ 'โœ… CORRECT ERRORS: "XML flow generation failed" no longer shows for deployment issues',
27
+ '๐ŸŽฏ FLOW DETECTION FIX: Flow tasks now correctly detected instead of widget_development',
28
+ '๐Ÿ”ง BETTER ERROR HANDLING: Deployment errors show specific failure reasons',
29
+ '๐Ÿ“Š DEBUG LOGGING: Added artifact detection debugging with DEBUG env var',
30
+ 'โšก IMPROVED RELIABILITY: Better error recovery and clearer user feedback'
31
+ ],
16
32
  '1.3.12': [
17
33
  '๐Ÿš€ AUTO-DEPLOY XML: Swarm command now automatically deploys flow XML to ServiceNow',
18
34
  'โœจ ZERO MANUAL STEPS: Generate โ†’ Import โ†’ Preview โ†’ Commit all automatic',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
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",