snow-flow 3.0.1 → 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.
Files changed (3) hide show
  1. package/README.md +4 -3
  2. package/dist/cli.js +43 -61
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -21,11 +21,12 @@ 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.1 - Critical Timeout Fix
24
+ ## 🎉 Version 3.0.2 - Init Command Fixed
25
25
 
26
- ### **Latest Fix (v3.0.1)**
26
+ ### **Latest Fix (v3.0.2)**
27
+ - 🔧 **Init Command Fixed** - Now correctly uses .env.template with v3.0.1 timeout configuration
27
28
  - 🎯 **No Timeouts by Default** - Operations run until completion for maximum reliability
28
- - 🎛️ **Optional Timeout Configuration** - Set `MCP_MEMORY_TIMEOUT` only if needed
29
+ - 🎛️ **Optional Timeout Configuration** - All timeouts commented out in generated .env file
29
30
  - 🚀 **100% Completion Rate** - No artificial timeout limitations
30
31
 
31
32
  ### **What's New in v3.0.0**
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
- const envContent = `# ServiceNow Configuration
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
- # How to Set Up ServiceNow OAuth
3737
+ # Timeout Configuration (v3.0.1+)
3768
3738
  # ===========================================
3769
- # 1. Log into your ServiceNow instance as admin
3770
- # 2. Navigate to: System OAuth > Application Registry
3771
- # 3. Click "New" > "Create an OAuth application"
3772
- # 4. Fill in:
3773
- # - Name: Snow-Flow Development
3774
- # - Client ID: (will be generated)
3775
- # - Client Secret: (will be generated)
3776
- # - Redirect URL: http://\${SNOW_REDIRECT_HOST:-localhost}:\${SNOW_REDIRECT_PORT:-3000}/callback
3777
- # - Grant Type: Authorization Code
3778
- # 5. Copy the Client ID and Client Secret to this file
3779
- # 6. Run: snow-flow auth login
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 {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "3.0.1",
4
- "description": "Snow-Flow v3.0.1: Production-Ready ServiceNow Intelligence Platform - NO TIMEOUTS by default for maximum reliability. 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.",
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": {