snow-flow 3.6.3 → 3.6.4

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 (2) hide show
  1. package/dist/cli.js +14 -1
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -2584,6 +2584,14 @@ async function createMCPConfig(targetDir, force = false) {
2584
2584
  "Bash(sudo *)"
2585
2585
  ]
2586
2586
  },
2587
+ "autoCompactThreshold": 0.65,
2588
+ "compactMode": "aggressive",
2589
+ "contextPreservation": {
2590
+ "preserveMCPState": true,
2591
+ "preserveToolResults": true,
2592
+ "preserveRecentContext": 5000,
2593
+ "prioritizeServiceNowOperations": true
2594
+ },
2587
2595
  "hooks": {
2588
2596
  "PreCompact": [
2589
2597
  {
@@ -2597,10 +2605,11 @@ async function createMCPConfig(targetDir, force = false) {
2597
2605
  },
2598
2606
  {
2599
2607
  "matcher": "auto",
2608
+ "threshold": 0.65,
2600
2609
  "hooks": [
2601
2610
  {
2602
2611
  "type": "command",
2603
- "command": "/bin/bash -c 'echo \"🔄 Auto-Compact Guidance (Context Window Full):\"; echo \"📋 CRITICAL: Before compacting, ensure you understand:\"; echo \" All 18+ MCP servers including servicenow-local-development\"; echo \" • Use snow_pull_artifact for widget debugging (NOT snow_query_table)\"; echo \" • Concurrent execution patterns from CLAUDE.md\"; echo \" • Batchtools optimization for 300% performance gains\"; echo \" • Swarm coordination strategies for complex tasks\"; echo \" Apply GOLDEN RULE: Always batch operations in single messages\"; echo \"✅ Auto-compact proceeding with full agent context\"'"
2612
+ "command": "/bin/bash -c 'echo \" EARLY Auto-Compact triggered at 65% context usage\"; echo \"🔔 Compacting BEFORE API calls fail\"; echo \"📋 Preserving critical Snow-Flow context:\"; echo \" • Active MCP connections and tool state\"; echo \" • Recent ServiceNow operations and results\"; echo \" • Current artifact sync status\"; echo \" • Authentication and session data\"; echo \"⚠️ This prevents mid-operation failures\"; echo \"✅ Safe compact at 65% threshold\"'"
2604
2613
  }
2605
2614
  ]
2606
2615
  }
@@ -2620,6 +2629,10 @@ async function createMCPConfig(targetDir, force = false) {
2620
2629
  "CLAUDE_CODE_TIMEOUT": "0",
2621
2630
  "CLAUDE_CODE_SESSION_TIMEOUT": "0",
2622
2631
  "CLAUDE_CODE_EXECUTION_TIMEOUT": "0",
2632
+ "CLAUDE_CODE_EARLY_COMPACT": "true",
2633
+ "CLAUDE_CODE_COMPACT_THRESHOLD": "0.65",
2634
+ "CLAUDE_CODE_PRESERVE_MCP_STATE": "true",
2635
+ "CLAUDE_CODE_CONTEXT_WINDOW_BUFFER": "35",
2623
2636
  "SNOW_FLOW_DEBUG": "false",
2624
2637
  "SNOW_FLOW_LOG_LEVEL": "info",
2625
2638
  "MCP_DEBUG": "false",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "3.6.3",
4
- "description": "EMERGENCY FIX: Prevents infinite hanging in servicenow-local-development. v3.6.3 adds maximum operation timeouts (30s for artifact detection, 60s for progress indicator) to prevent operations from running forever. Fixes pullArtifactBySysId with fail-fast mechanism. Consolidated CLAUDE.md with ALL 18 MCP servers and 200+ tools. NO MOCK DATA policy enforced. Includes audit logging, token tracking, and ES5 enforcement.",
3
+ "version": "3.6.4",
4
+ "description": "EARLY AUTO-COMPACT at 65% context usage prevents mid-API failures. v3.6.4 triggers compact BEFORE context window issues, not after. Aggressive compact mode with MCP state preservation. Prevents 'too many tokens' errors during ServiceNow operations. Includes infinite hanging fix, consolidated CLAUDE.md with 18 MCP servers, NO MOCK DATA policy, audit logging, and ES5 enforcement.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
7
7
  "bin": {