snow-flow 8.39.0 ā 8.39.2
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/README.md +9 -9
- package/dist/cli/enterprise.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +41 -37
- package/dist/cli.js.map +1 -1
- package/dist/mcp/base-mcp-server.d.ts +3 -0
- package/dist/mcp/base-mcp-server.d.ts.map +1 -1
- package/dist/mcp/base-mcp-server.js +48 -21
- package/dist/mcp/base-mcp-server.js.map +1 -1
- package/dist/mcp/servicenow-deployment-mcp.js +1 -1
- package/dist/mcp/snow-flow-mcp.js +48 -31
- package/dist/mcp/snow-flow-mcp.js.map +1 -1
- package/dist/monitoring/performance-tracker.d.ts +1 -1
- package/dist/monitoring/performance-tracker.d.ts.map +1 -1
- package/dist/monitoring/performance-tracker.js +44 -9
- package/dist/monitoring/performance-tracker.js.map +1 -1
- package/dist/snow-flow-system.d.ts +14 -3
- package/dist/snow-flow-system.d.ts.map +1 -1
- package/dist/snow-flow-system.js +66 -22
- package/dist/snow-flow-system.js.map +1 -1
- package/dist/templates/readme-template.d.ts +1 -1
- package/dist/templates/readme-template.js +13 -13
- package/dist/types/snow-flow.types.d.ts +1 -0
- package/dist/types/snow-flow.types.d.ts.map +1 -1
- package/dist/utils/mcp-on-demand-manager.d.ts.map +1 -1
- package/dist/utils/mcp-on-demand-manager.js +18 -5
- package/dist/utils/mcp-on-demand-manager.js.map +1 -1
- package/dist/utils/mcp-persistent-guard.d.ts +4 -0
- package/dist/utils/mcp-persistent-guard.d.ts.map +1 -1
- package/dist/utils/mcp-persistent-guard.js +26 -2
- package/dist/utils/mcp-persistent-guard.js.map +1 -1
- package/dist/utils/mcp-process-manager.d.ts.map +1 -1
- package/dist/utils/mcp-process-manager.js +5 -0
- package/dist/utils/mcp-process-manager.js.map +1 -1
- package/dist/utils/memory-safe-collections.d.ts +119 -0
- package/dist/utils/memory-safe-collections.d.ts.map +1 -0
- package/dist/utils/memory-safe-collections.js +212 -0
- package/dist/utils/memory-safe-collections.js.map +1 -0
- package/dist/utils/timer-registry.d.ts +138 -0
- package/dist/utils/timer-registry.d.ts.map +1 -0
- package/dist/utils/timer-registry.js +289 -0
- package/dist/utils/timer-registry.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</picture>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
<h1 align="center">
|
|
7
|
+
<h1 align="center">Snow-Flow</h1>
|
|
8
8
|
<h3 align="center">AI-Powered ServiceNow Development IDE</h3>
|
|
9
9
|
<p align="center"><strong>Part of the Snow-Flow Enterprise Suite</strong></p>
|
|
10
10
|
|
|
@@ -39,7 +39,7 @@ snow-flow init
|
|
|
39
39
|
snow-flow auth login
|
|
40
40
|
|
|
41
41
|
# Start building
|
|
42
|
-
snow-flow
|
|
42
|
+
snow-flow agent "create an incident dashboard widget"
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
That's it. You're now developing ServiceNow through conversation.
|
|
@@ -82,16 +82,16 @@ All through natural conversation.
|
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
# Create widgets
|
|
85
|
-
snow-flow
|
|
85
|
+
snow-flow agent "create incident dashboard with priority charts and SLA timers"
|
|
86
86
|
|
|
87
87
|
# Build automation
|
|
88
|
-
snow-flow
|
|
88
|
+
snow-flow agent "create business rule to auto-assign incidents by category"
|
|
89
89
|
|
|
90
90
|
# Query data
|
|
91
|
-
snow-flow
|
|
91
|
+
snow-flow agent "show me all P1 incidents from last week"
|
|
92
92
|
|
|
93
93
|
# Complex workflows
|
|
94
|
-
snow-flow
|
|
94
|
+
snow-flow agent "analyze incident patterns and create a knowledge article with recommendations"
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
---
|
|
@@ -177,7 +177,7 @@ Snow-Flow works with any MCP-compatible tool:
|
|
|
177
177
|
|
|
178
178
|
| Tool | Setup |
|
|
179
179
|
|------|-------|
|
|
180
|
-
| **snow-code** (recommended) | Built-in, just run `snow-flow
|
|
180
|
+
| **snow-code** (recommended) | Built-in, just run `snow-flow agent` |
|
|
181
181
|
| **Claude Desktop** | Copy config to `claude_desktop_config.json` |
|
|
182
182
|
| **Cursor** | Copy config to `.cursor/mcp.json` |
|
|
183
183
|
| **Windsurf** | Copy config to `mcp_config.json` |
|
|
@@ -199,7 +199,7 @@ cat .snow-code/config.json
|
|
|
199
199
|
snow-flow init # Initialize project
|
|
200
200
|
snow-flow auth login # Authenticate (ServiceNow + enterprise)
|
|
201
201
|
snow-flow auth status # Check authentication status
|
|
202
|
-
snow-flow
|
|
202
|
+
snow-flow agent "task" # Execute any ServiceNow task
|
|
203
203
|
|
|
204
204
|
# Direct commands
|
|
205
205
|
snow-flow deploy # Deploy artifacts
|
|
@@ -234,5 +234,5 @@ Elastic License 2.0 - Free for commercial use, cannot resell as competing SaaS.
|
|
|
234
234
|
**Snow-Flow** - The free, open-source ServiceNow Build Agent alternative. Built by developers, for developers.
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
npm install -g snow-flow && snow-flow init && snow-flow auth login && snow-flow
|
|
237
|
+
npm install -g snow-flow && snow-flow init && snow-flow auth login && snow-flow agent "hello servicenow"
|
|
238
238
|
```
|
package/dist/cli/enterprise.js
CHANGED
|
@@ -159,7 +159,7 @@ async function loginCommand(licenseKey) {
|
|
|
159
159
|
console.log(chalk_1.default.gray('Your credentials have been saved to:'), chalk_1.default.gray(AUTH_FILE));
|
|
160
160
|
console.log('');
|
|
161
161
|
console.log(chalk_1.default.blue('š” Enterprise tools are now available!'));
|
|
162
|
-
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow
|
|
162
|
+
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow agent "<task>"'), chalk_1.default.gray('to use them.'));
|
|
163
163
|
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow portal'), chalk_1.default.gray('to configure integrations.'));
|
|
164
164
|
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow status'), chalk_1.default.gray('to view your account details.'));
|
|
165
165
|
}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;GAEG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;GAEG;AAmwEH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,OAAe,GACrB,OAAO,CAAC,IAAI,CAAC,CA6Sf"}
|
package/dist/cli.js
CHANGED
|
@@ -65,7 +65,7 @@ const sync_mcp_configs_js_1 = require("./utils/sync-mcp-configs.js");
|
|
|
65
65
|
const config_cache_js_1 = require("./utils/config-cache.js");
|
|
66
66
|
// Activate MCP guard ONLY for commands that actually use MCP servers
|
|
67
67
|
// Explicitly exclude: init, version, help, auth, export, config commands
|
|
68
|
-
const commandsNeedingMCP = ['swarm', 'status', 'monitor', 'mcp'];
|
|
68
|
+
const commandsNeedingMCP = ['agent', 'swarm', 'status', 'monitor', 'mcp'];
|
|
69
69
|
const commandsNotNeedingMCP = ['init', 'version', 'help', 'auth', 'export', '-v', '--version', '-h', '--help'];
|
|
70
70
|
const currentCommand = process.argv[2];
|
|
71
71
|
// Only activate guard if it's a command that needs MCP AND not explicitly excluded
|
|
@@ -150,9 +150,11 @@ function checkFlowDeprecation(command, objective) {
|
|
|
150
150
|
process.exit(1);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
//
|
|
153
|
+
// Agent command - the main orchestration command with EVERYTHING
|
|
154
|
+
// Note: 'swarm' is kept as an alias for backward compatibility
|
|
154
155
|
program
|
|
155
|
-
.command('
|
|
156
|
+
.command('agent <objective>')
|
|
157
|
+
.alias('swarm')
|
|
156
158
|
.description('Execute multi-agent orchestration for a ServiceNow task - ƩƩn command voor alles!')
|
|
157
159
|
// New engine selector: defaults to auto (uses config-driven agent when available)
|
|
158
160
|
.option('--engine <engine>', 'Execution engine (auto|agent|claude)', 'auto')
|
|
@@ -206,7 +208,7 @@ program
|
|
|
206
208
|
.option('--debug-all', 'Enable ALL debug output (WARNING: Very verbose!)')
|
|
207
209
|
.action(async (objective, options) => {
|
|
208
210
|
// Check for flow deprecation first
|
|
209
|
-
checkFlowDeprecation('
|
|
211
|
+
checkFlowDeprecation('agent', objective);
|
|
210
212
|
// Set debug levels based on options
|
|
211
213
|
if (options.debugAll) {
|
|
212
214
|
process.env.DEBUG = '*';
|
|
@@ -261,7 +263,7 @@ program
|
|
|
261
263
|
console.log(chalk_1.default.blue(`š ${objective}`));
|
|
262
264
|
}
|
|
263
265
|
// Run snow-code update check in background (non-blocking)
|
|
264
|
-
// Don't await - let
|
|
266
|
+
// Don't await - let agent start immediately while update runs async
|
|
265
267
|
if (options.verbose) {
|
|
266
268
|
cliLogger.info('š Checking for snow-code updates (background)...');
|
|
267
269
|
}
|
|
@@ -385,12 +387,12 @@ program
|
|
|
385
387
|
cliLogger.info('\nš Snow-Flow Enterprise: ā Not active');
|
|
386
388
|
cliLogger.info('š” Run "snow-flow login <license-key>" to enable enterprise features');
|
|
387
389
|
}
|
|
388
|
-
// Initialize
|
|
390
|
+
// Initialize Agent memory system (with graceful fallback)
|
|
389
391
|
let memorySystem = null;
|
|
390
|
-
let sessionId = `
|
|
392
|
+
let sessionId = `agent_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
391
393
|
try {
|
|
392
394
|
if (options.verbose) {
|
|
393
|
-
cliLogger.info('\nš¾ Initializing
|
|
395
|
+
cliLogger.info('\nš¾ Initializing agent memory system...');
|
|
394
396
|
}
|
|
395
397
|
const { SessionMemorySystem } = await Promise.resolve().then(() => __importStar(require('./memory/session-memory')));
|
|
396
398
|
memorySystem = new SessionMemorySystem();
|
|
@@ -398,7 +400,7 @@ program
|
|
|
398
400
|
if (options.verbose) {
|
|
399
401
|
cliLogger.info(`š Session: ${sessionId}`);
|
|
400
402
|
}
|
|
401
|
-
// Store
|
|
403
|
+
// Store agent session in memory
|
|
402
404
|
await memorySystem.storeLearning(`session_${sessionId}`, {
|
|
403
405
|
objective,
|
|
404
406
|
taskAnalysis,
|
|
@@ -408,7 +410,7 @@ program
|
|
|
408
410
|
});
|
|
409
411
|
}
|
|
410
412
|
catch (error) {
|
|
411
|
-
// Memory system is optional -
|
|
413
|
+
// Memory system is optional - agent works without it
|
|
412
414
|
if (options.verbose) {
|
|
413
415
|
cliLogger.warn('ā ļø Memory tracking unavailable (will continue without session tracking)');
|
|
414
416
|
}
|
|
@@ -682,14 +684,16 @@ function extractName(objective, type) {
|
|
|
682
684
|
}
|
|
683
685
|
return `Generated ${type}`;
|
|
684
686
|
}
|
|
685
|
-
//
|
|
687
|
+
// Agent status command - monitor running agent sessions
|
|
688
|
+
// Note: 'swarm-status' is kept as an alias for backward compatibility
|
|
686
689
|
program
|
|
687
|
-
.command('
|
|
688
|
-
.
|
|
689
|
-
.
|
|
690
|
+
.command('agent-status [sessionId]')
|
|
691
|
+
.alias('swarm-status')
|
|
692
|
+
.description('Check the status of a running agent session')
|
|
693
|
+
.option('--watch', 'Continuously monitor the agent progress')
|
|
690
694
|
.option('--interval <seconds>', 'Watch interval in seconds', '5')
|
|
691
695
|
.action(async (sessionId, options) => {
|
|
692
|
-
cliLogger.info('\nš Checking
|
|
696
|
+
cliLogger.info('\nš Checking agent status...\n');
|
|
693
697
|
try {
|
|
694
698
|
// Try to load memory system
|
|
695
699
|
let memorySystem;
|
|
@@ -704,14 +708,14 @@ program
|
|
|
704
708
|
return;
|
|
705
709
|
}
|
|
706
710
|
if (!sessionId) {
|
|
707
|
-
// List all recent
|
|
708
|
-
cliLogger.info('š Recent
|
|
711
|
+
// List all recent agent sessions
|
|
712
|
+
cliLogger.info('š Recent agent sessions:');
|
|
709
713
|
cliLogger.info('(Provide a session ID to see detailed status)\n');
|
|
710
714
|
// Get all session keys from learnings
|
|
711
715
|
const sessionKeys = [];
|
|
712
716
|
// Note: This is a simplified approach - in production, you'd query the memory files directly
|
|
713
|
-
cliLogger.info('š” Use: snow-flow
|
|
714
|
-
cliLogger.info('š” Session IDs are displayed when you start
|
|
717
|
+
cliLogger.info('š” Use: snow-flow agent-status <sessionId> to see details');
|
|
718
|
+
cliLogger.info('š” Session IDs are displayed when you start an agent session\n');
|
|
715
719
|
return;
|
|
716
720
|
}
|
|
717
721
|
// Get specific session data
|
|
@@ -719,11 +723,11 @@ program
|
|
|
719
723
|
const launchData = await memorySystem.getLearning(`launch_${sessionId}`);
|
|
720
724
|
const errorData = await memorySystem.getLearning(`error_${sessionId}`);
|
|
721
725
|
if (!sessionData) {
|
|
722
|
-
console.error(`ā No
|
|
723
|
-
cliLogger.info('š” Make sure to use the exact session ID displayed when starting the
|
|
726
|
+
console.error(`ā No agent session found with ID: ${sessionId}`);
|
|
727
|
+
cliLogger.info('š” Make sure to use the exact session ID displayed when starting the agent');
|
|
724
728
|
return;
|
|
725
729
|
}
|
|
726
|
-
cliLogger.info(`š
|
|
730
|
+
cliLogger.info(`š Agent Session: ${sessionId}`);
|
|
727
731
|
cliLogger.info(`š Objective: ${sessionData.objective}`);
|
|
728
732
|
cliLogger.info(`š Started: ${sessionData.started_at}`);
|
|
729
733
|
cliLogger.info(`š Task Type: ${sessionData.taskAnalysis.taskType}`);
|
|
@@ -744,7 +748,7 @@ program
|
|
|
744
748
|
}
|
|
745
749
|
cliLogger.info('\nš” Tips:');
|
|
746
750
|
cliLogger.info(' - Check SnowCode for real-time agent progress');
|
|
747
|
-
cliLogger.info(' - Use Memory.get("
|
|
751
|
+
cliLogger.info(' - Use Memory.get("agent_session_' + sessionId + '") in SnowCode');
|
|
748
752
|
cliLogger.info(' - Monitor TodoRead for task completion status');
|
|
749
753
|
if (options.watch) {
|
|
750
754
|
cliLogger.info(`\nš Watching for updates every ${options.interval} seconds...`);
|
|
@@ -761,13 +765,13 @@ program
|
|
|
761
765
|
// Handle graceful shutdown
|
|
762
766
|
process.on('SIGINT', () => {
|
|
763
767
|
clearInterval(watchInterval);
|
|
764
|
-
cliLogger.info('\n\nā Stopped watching
|
|
768
|
+
cliLogger.info('\n\nā Stopped watching agent status');
|
|
765
769
|
process.exit(0);
|
|
766
770
|
});
|
|
767
771
|
}
|
|
768
772
|
}
|
|
769
773
|
catch (error) {
|
|
770
|
-
console.error('ā Failed to check
|
|
774
|
+
console.error('ā Failed to check agent status:', error instanceof Error ? error.message : String(error));
|
|
771
775
|
}
|
|
772
776
|
});
|
|
773
777
|
// Spawn agent command
|
|
@@ -989,7 +993,7 @@ program
|
|
|
989
993
|
prompts.log.info(' snow-flow auth login');
|
|
990
994
|
prompts.log.message('');
|
|
991
995
|
prompts.log.message(' 2. Start developing:');
|
|
992
|
-
prompts.log.info(' snow-flow
|
|
996
|
+
prompts.log.info(' snow-flow agent "create incident dashboard"');
|
|
993
997
|
prompts.log.message('');
|
|
994
998
|
prompts.outro(chalk_1.default.green('ā
Snow-Flow initialized successfully!'));
|
|
995
999
|
// Force exit to prevent hanging
|
|
@@ -1012,18 +1016,18 @@ program
|
|
|
1012
1016
|
š Essential Commands:
|
|
1013
1017
|
snow-flow init Initialize project with MCP servers
|
|
1014
1018
|
snow-flow auth login Complete authentication setup
|
|
1015
|
-
snow-flow
|
|
1019
|
+
snow-flow agent "task" Execute AI-powered ServiceNow development
|
|
1016
1020
|
|
|
1017
1021
|
šÆ Quick Start:
|
|
1018
1022
|
1. snow-flow init # Set up your project
|
|
1019
1023
|
2. snow-flow auth login # Authenticate (LLM + ServiceNow + Enterprise)
|
|
1020
|
-
3. snow-flow
|
|
1024
|
+
3. snow-flow agent "your task" # Let AI build your solution
|
|
1021
1025
|
|
|
1022
1026
|
š” Example Tasks:
|
|
1023
|
-
snow-flow
|
|
1024
|
-
snow-flow
|
|
1025
|
-
snow-flow
|
|
1026
|
-
snow-flow
|
|
1027
|
+
snow-flow agent "create incident dashboard widget"
|
|
1028
|
+
snow-flow agent "build auto-assignment business rule"
|
|
1029
|
+
snow-flow agent "generate 5000 test incidents with realistic data"
|
|
1030
|
+
snow-flow agent "refactor legacy client scripts to modern patterns"
|
|
1027
1031
|
|
|
1028
1032
|
š What You Get:
|
|
1029
1033
|
⢠75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, etc.)
|
|
@@ -2465,7 +2469,7 @@ program
|
|
|
2465
2469
|
// Use generic artifact deployment instead
|
|
2466
2470
|
console.log('šÆ Creating widget using template system...');
|
|
2467
2471
|
console.log('⨠Use: snow-flow deploy-artifact -t widget -c <config-file>');
|
|
2468
|
-
console.log('š Or use: snow-flow
|
|
2472
|
+
console.log('š Or use: snow-flow agent "create a widget for incident management"');
|
|
2469
2473
|
}
|
|
2470
2474
|
catch (error) {
|
|
2471
2475
|
console.error('ā Error creating widget:', error);
|
|
@@ -2483,7 +2487,7 @@ program
|
|
|
2483
2487
|
console.log(chalk_1.default.blue('ā¹ļø MCP servers configured for SnowCode (also compatible with Claude Code)'));
|
|
2484
2488
|
console.log(chalk_1.default.yellow('ā ļø Manual MCP commands are no longer needed'));
|
|
2485
2489
|
console.log(chalk_1.default.green('ā
SnowCode automatically handles all MCP server lifecycle'));
|
|
2486
|
-
console.log(chalk_1.default.blue('\nš” Simply run your
|
|
2490
|
+
console.log(chalk_1.default.blue('\nš” Simply run your agent commands - SnowCode handles the rest!'));
|
|
2487
2491
|
return;
|
|
2488
2492
|
});
|
|
2489
2493
|
// SPARC Detailed Help Command - DISABLED (sparc-help.js file missing)
|
|
@@ -2560,9 +2564,9 @@ program
|
|
|
2560
2564
|
// š BACKWARD COMPATIBILITY ENHANCEMENTS
|
|
2561
2565
|
// ===================================================
|
|
2562
2566
|
/**
|
|
2563
|
-
* Enhance existing
|
|
2567
|
+
* Enhance existing agent command with optional Queen intelligence
|
|
2564
2568
|
*
|
|
2565
|
-
* Note: Users can use: snow-flow
|
|
2569
|
+
* Note: Users can use: snow-flow agent "objective" --queen
|
|
2566
2570
|
* This will be implemented in a future version once the Queen system is stable.
|
|
2567
2571
|
*/
|
|
2568
2572
|
// ===================================================
|
|
@@ -2575,7 +2579,7 @@ program
|
|
|
2575
2579
|
// - Configuration management
|
|
2576
2580
|
// - Performance analytics
|
|
2577
2581
|
// Comment out the line below to disable the integrated commands
|
|
2578
|
-
// CLI integration removed -
|
|
2582
|
+
// CLI integration removed - agent command is implemented directly above
|
|
2579
2583
|
program.parse(process.argv);
|
|
2580
2584
|
// Show help if no command provided
|
|
2581
2585
|
if (!process.argv.slice(2).length) {
|