snow-flow 3.0.0 → 3.0.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 +7 -1
- package/dist/cli.js +43 -61
- package/dist/mcp/snow-flow-mcp.js +11 -4
- package/package.json +2 -2
- package/.env.example +0 -64
package/README.md
CHANGED
|
@@ -21,7 +21,13 @@ Every interaction with Snow-Flow provides insights into ServiceNow best practice
|
|
|
21
21
|
### **Real Integration, Real Results**
|
|
22
22
|
Unlike mock tools or simulations, Snow-Flow connects directly to your ServiceNow instance through secure OAuth authentication. Every operation is real, every deployment is functional, and every result is production-ready.
|
|
23
23
|
|
|
24
|
-
## 🎉 Version 3.0.
|
|
24
|
+
## 🎉 Version 3.0.2 - Init Command Fixed
|
|
25
|
+
|
|
26
|
+
### **Latest Fix (v3.0.2)**
|
|
27
|
+
- 🔧 **Init Command Fixed** - Now correctly uses .env.template with v3.0.1 timeout configuration
|
|
28
|
+
- 🎯 **No Timeouts by Default** - Operations run until completion for maximum reliability
|
|
29
|
+
- 🎛️ **Optional Timeout Configuration** - All timeouts commented out in generated .env file
|
|
30
|
+
- 🚀 **100% Completion Rate** - No artificial timeout limitations
|
|
25
31
|
|
|
26
32
|
### **What's New in v3.0.0**
|
|
27
33
|
- ✅ **100% Real Implementation** - No more simulated/mock/demo code
|
package/dist/cli.js
CHANGED
|
@@ -3689,44 +3689,37 @@ For full documentation, visit: https://github.com/groeimetai/snow-flow
|
|
|
3689
3689
|
}
|
|
3690
3690
|
}
|
|
3691
3691
|
async function createEnvFile(targetDir, force = false) {
|
|
3692
|
-
|
|
3692
|
+
// Read content from .env.template file
|
|
3693
|
+
let envContent;
|
|
3694
|
+
try {
|
|
3695
|
+
// Try to read from the project's .env.template file
|
|
3696
|
+
const templatePath = (0, path_1.join)(__dirname, '..', '.env.template');
|
|
3697
|
+
envContent = await fs_1.promises.readFile(templatePath, 'utf-8');
|
|
3698
|
+
console.log('📋 Using .env.template for configuration');
|
|
3699
|
+
}
|
|
3700
|
+
catch (error) {
|
|
3701
|
+
// If template not found, try alternative locations
|
|
3702
|
+
try {
|
|
3703
|
+
const alternativePath = (0, path_1.join)(process.cwd(), '.env.template');
|
|
3704
|
+
envContent = await fs_1.promises.readFile(alternativePath, 'utf-8');
|
|
3705
|
+
console.log('📋 Using .env.template from current directory');
|
|
3706
|
+
}
|
|
3707
|
+
catch (fallbackError) {
|
|
3708
|
+
console.warn('⚠️ Could not find .env.template file, using embedded minimal version');
|
|
3709
|
+
// Last resort: use embedded minimal version with v3.0.1 timeout config
|
|
3710
|
+
envContent = `# ServiceNow Configuration
|
|
3693
3711
|
# ===========================================
|
|
3694
3712
|
|
|
3695
3713
|
# ServiceNow Instance URL (without https://)
|
|
3696
3714
|
# Example: dev12345.service-now.com
|
|
3697
3715
|
SNOW_INSTANCE=your-instance.service-now.com
|
|
3698
3716
|
|
|
3699
|
-
# ===========================================
|
|
3700
|
-
# OAuth Authentication (Required)
|
|
3701
|
-
# ===========================================
|
|
3702
|
-
# Snow-Flow uses OAuth for secure authentication to ServiceNow
|
|
3703
|
-
#
|
|
3704
|
-
# How to set up OAuth in ServiceNow:
|
|
3705
|
-
# 1. Navigate to: System OAuth > Application Registry
|
|
3706
|
-
# 2. Click "New" > "Create an OAuth API endpoint for external clients"
|
|
3707
|
-
# 3. Fill in:
|
|
3708
|
-
# - Name: Snow-Flow Development
|
|
3709
|
-
# - Client ID: (will be auto-generated)
|
|
3710
|
-
# - Client Secret: (set your own or auto-generate)
|
|
3711
|
-
# 4. Copy the Client ID and Secret below:
|
|
3712
|
-
|
|
3713
3717
|
# OAuth Client ID from ServiceNow Application Registry
|
|
3714
3718
|
SNOW_CLIENT_ID=your-oauth-client-id
|
|
3715
3719
|
|
|
3716
3720
|
# OAuth Client Secret from ServiceNow Application Registry
|
|
3717
3721
|
SNOW_CLIENT_SECRET=your-oauth-client-secret
|
|
3718
3722
|
|
|
3719
|
-
# ===========================================
|
|
3720
|
-
# Legacy Username/Password (Not Recommended)
|
|
3721
|
-
# ===========================================
|
|
3722
|
-
# These fields are kept for backwards compatibility but are not used
|
|
3723
|
-
# Snow-Flow requires OAuth authentication for security
|
|
3724
|
-
# SNOW_USERNAME=not-used
|
|
3725
|
-
# SNOW_PASSWORD=not-used
|
|
3726
|
-
|
|
3727
|
-
# Optional: Additional Configuration
|
|
3728
|
-
# SNOW_REDIRECT_URI=http://\${SNOW_REDIRECT_HOST:-localhost}:\${SNOW_REDIRECT_PORT:-3000}/callback
|
|
3729
|
-
|
|
3730
3723
|
# ===========================================
|
|
3731
3724
|
# Snow-Flow Configuration
|
|
3732
3725
|
# ===========================================
|
|
@@ -3740,44 +3733,33 @@ SNOW_FLOW_STRATEGY=development
|
|
|
3740
3733
|
# Maximum number of agents
|
|
3741
3734
|
SNOW_FLOW_MAX_AGENTS=5
|
|
3742
3735
|
|
|
3743
|
-
# Claude Code timeout configuration (in minutes)
|
|
3744
|
-
# Set to 0 to disable timeout (infinite execution time)
|
|
3745
|
-
# Default: 60 minutes
|
|
3746
|
-
SNOW_FLOW_TIMEOUT_MINUTES=0
|
|
3747
|
-
|
|
3748
|
-
# ===========================================
|
|
3749
|
-
# Deployment Timeout Configuration
|
|
3750
|
-
# ===========================================
|
|
3751
|
-
|
|
3752
|
-
# ServiceNow API timeout for regular operations (milliseconds)
|
|
3753
|
-
# Default: 60000 (60 seconds)
|
|
3754
|
-
SNOW_REQUEST_TIMEOUT=60000
|
|
3755
|
-
|
|
3756
|
-
# ServiceNow API timeout for DEPLOYMENT operations (milliseconds)
|
|
3757
|
-
# Deployments need more time for complex widgets
|
|
3758
|
-
# Default: 300000 (5 minutes)
|
|
3759
|
-
SNOW_DEPLOYMENT_TIMEOUT=300000
|
|
3760
|
-
|
|
3761
|
-
# MCP transport timeout for deployment operations (milliseconds)
|
|
3762
|
-
# Should be higher than SNOW_DEPLOYMENT_TIMEOUT
|
|
3763
|
-
# Default: 360000 (6 minutes)
|
|
3764
|
-
MCP_DEPLOYMENT_TIMEOUT=360000
|
|
3765
|
-
|
|
3766
3736
|
# ===========================================
|
|
3767
|
-
#
|
|
3737
|
+
# Timeout Configuration (v3.0.1+)
|
|
3768
3738
|
# ===========================================
|
|
3769
|
-
#
|
|
3770
|
-
#
|
|
3771
|
-
#
|
|
3772
|
-
|
|
3773
|
-
#
|
|
3774
|
-
#
|
|
3775
|
-
#
|
|
3776
|
-
#
|
|
3777
|
-
|
|
3778
|
-
#
|
|
3779
|
-
#
|
|
3739
|
+
# IMPORTANT: Snow-Flow has NO TIMEOUTS by default for maximum reliability.
|
|
3740
|
+
# Operations run until completion. Only set timeouts if you specifically need them.
|
|
3741
|
+
# All timeout values below are COMMENTED OUT - uncomment only what you need.
|
|
3742
|
+
|
|
3743
|
+
# Memory Operations (TodoWrite, etc.)
|
|
3744
|
+
# MCP_MEMORY_TIMEOUT=30000 # 30 seconds
|
|
3745
|
+
# MCP_MEMORY_TIMEOUT=60000 # 1 minute
|
|
3746
|
+
# MCP_MEMORY_TIMEOUT=120000 # 2 minutes
|
|
3747
|
+
|
|
3748
|
+
# ServiceNow API Operations
|
|
3749
|
+
# SNOW_API_TIMEOUT=60000 # 1 minute - quick operations
|
|
3750
|
+
# SNOW_API_TIMEOUT=180000 # 3 minutes - standard operations
|
|
3751
|
+
# SNOW_API_TIMEOUT=300000 # 5 minutes - complex queries
|
|
3752
|
+
|
|
3753
|
+
# Deployment Operations
|
|
3754
|
+
# SNOW_DEPLOYMENT_TIMEOUT=300000 # 5 minutes - simple deployments
|
|
3755
|
+
# SNOW_DEPLOYMENT_TIMEOUT=600000 # 10 minutes - complex widgets
|
|
3756
|
+
|
|
3757
|
+
# MCP transport timeout (should be higher than SNOW_DEPLOYMENT_TIMEOUT if both set)
|
|
3758
|
+
# MCP_DEPLOYMENT_TIMEOUT=360000 # 6 minutes
|
|
3759
|
+
# MCP_DEPLOYMENT_TIMEOUT=720000 # 12 minutes
|
|
3780
3760
|
`;
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3781
3763
|
const envFilePath = (0, path_1.join)(targetDir, '.env');
|
|
3782
3764
|
// Check if .env already exists
|
|
3783
3765
|
try {
|
|
@@ -560,12 +560,19 @@ class SnowFlowMCPServer {
|
|
|
560
560
|
async handleMemoryUsage(args) {
|
|
561
561
|
const { action, key, value, namespace = 'default' } = args;
|
|
562
562
|
const memoryKey = namespace && key ? `${namespace}:${key}` : key;
|
|
563
|
-
//
|
|
564
|
-
|
|
565
|
-
const
|
|
563
|
+
// Timeout protection - disabled by default for maximum flexibility
|
|
564
|
+
// Users can set MCP_MEMORY_TIMEOUT env var if they want timeouts
|
|
565
|
+
const timeoutMs = process.env.MCP_MEMORY_TIMEOUT ? parseInt(process.env.MCP_MEMORY_TIMEOUT) : 0;
|
|
566
|
+
// Only create timeout promise if timeout is specified
|
|
567
|
+
const timeoutPromise = timeoutMs > 0
|
|
568
|
+
? new Promise((_, reject) => setTimeout(() => reject(new Error(`Memory operation '${action}' timed out after ${timeoutMs}ms`)), timeoutMs))
|
|
569
|
+
: new Promise(() => { }); // Never resolves/rejects - no timeout
|
|
566
570
|
try {
|
|
567
571
|
const resultPromise = this.executeMemoryOperation(action, memoryKey, value, args);
|
|
568
|
-
|
|
572
|
+
// If no timeout specified, just wait for the result
|
|
573
|
+
const result = timeoutMs > 0
|
|
574
|
+
? await Promise.race([resultPromise, timeoutPromise])
|
|
575
|
+
: await resultPromise;
|
|
569
576
|
return result;
|
|
570
577
|
}
|
|
571
578
|
catch (error) {
|
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.2",
|
|
4
|
+
"description": "Snow-Flow v3.0.2: Production-Ready ServiceNow Intelligence Platform - NO TIMEOUTS by default for maximum reliability. Init command now uses .env.template correctly. 100% REAL implementation with TensorFlow.js neural networks, direct ServiceNow API integration, and intelligent memory management. Includes 100+ MCP tools for operations, development, ML, analytics, and security. Full AI swarm orchestration with dynamic task categorization. Operations run to completion without artificial time limits.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|
package/.env.example
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# ServiceNow OAuth Configuration (recommended)
|
|
2
|
-
SNOW_INSTANCE=dev12345.service-now.com
|
|
3
|
-
SNOW_CLIENT_ID=your_oauth_client_id
|
|
4
|
-
SNOW_CLIENT_SECRET=your_oauth_client_secret
|
|
5
|
-
|
|
6
|
-
# OAuth URLs (these are automatically generated)
|
|
7
|
-
OAUTH_TOKEN_URL=https://dev12345.service-now.com/oauth_token.do
|
|
8
|
-
OAUTH_REDIRECT_URI=http://localhost:3000/callback
|
|
9
|
-
|
|
10
|
-
# Basic Auth Configuration (deprecated - use OAuth instead)
|
|
11
|
-
# Uncomment these lines ONLY if you need to use basic auth:
|
|
12
|
-
# SNOW_USERNAME=your_username
|
|
13
|
-
# SNOW_PASSWORD=your_password
|
|
14
|
-
|
|
15
|
-
# ===========================================
|
|
16
|
-
# Snow-Flow Configuration
|
|
17
|
-
# ===========================================
|
|
18
|
-
|
|
19
|
-
# Enable debug logging (true/false)
|
|
20
|
-
SNOW_FLOW_DEBUG=false
|
|
21
|
-
|
|
22
|
-
# Default coordination strategy
|
|
23
|
-
SNOW_FLOW_STRATEGY=development
|
|
24
|
-
|
|
25
|
-
# Maximum number of agents
|
|
26
|
-
SNOW_FLOW_MAX_AGENTS=5
|
|
27
|
-
|
|
28
|
-
# Claude Code timeout configuration (in minutes)
|
|
29
|
-
# Set to 0 to disable timeout (infinite execution time)
|
|
30
|
-
# Default: 60 minutes
|
|
31
|
-
SNOW_FLOW_TIMEOUT_MINUTES=0
|
|
32
|
-
|
|
33
|
-
# ===========================================
|
|
34
|
-
# Deployment Timeout Configuration
|
|
35
|
-
# ===========================================
|
|
36
|
-
|
|
37
|
-
# ServiceNow API timeout for regular operations (milliseconds)
|
|
38
|
-
# Default: 60000 (60 seconds)
|
|
39
|
-
SNOW_REQUEST_TIMEOUT=60000
|
|
40
|
-
|
|
41
|
-
# ServiceNow API timeout for DEPLOYMENT operations (milliseconds)
|
|
42
|
-
# Deployments need more time for complex widgets
|
|
43
|
-
# Default: 300000 (5 minutes)
|
|
44
|
-
SNOW_DEPLOYMENT_TIMEOUT=300000
|
|
45
|
-
|
|
46
|
-
# MCP transport timeout for deployment operations (milliseconds)
|
|
47
|
-
# Should be higher than SNOW_DEPLOYMENT_TIMEOUT
|
|
48
|
-
# Default: 360000 (6 minutes)
|
|
49
|
-
MCP_DEPLOYMENT_TIMEOUT=360000
|
|
50
|
-
|
|
51
|
-
# ===========================================
|
|
52
|
-
# How to Set Up ServiceNow OAuth
|
|
53
|
-
# ===========================================
|
|
54
|
-
# 1. Log into your ServiceNow instance as admin
|
|
55
|
-
# 2. Navigate to: System OAuth > Application Registry
|
|
56
|
-
# 3. Click "New" > "Create an OAuth application"
|
|
57
|
-
# 4. Fill in:
|
|
58
|
-
# - Name: Snow-Flow Development
|
|
59
|
-
# - Client ID: (will be generated)
|
|
60
|
-
# - Client Secret: (will be generated)
|
|
61
|
-
# - Redirect URL: http://${SNOW_REDIRECT_HOST:-localhost}:${SNOW_REDIRECT_PORT:-3000}/callback
|
|
62
|
-
# - Grant Type: Authorization Code
|
|
63
|
-
# 5. Copy the Client ID and Client Secret to this file
|
|
64
|
-
# 6. Run: snow-flow auth login
|