snow-flow 4.2.3 → 4.3.0

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
@@ -1590,97 +1590,7 @@ program
1590
1590
  cliLogger.error('āŒ Invalid memory operation');
1591
1591
  }
1592
1592
  });
1593
- // Auth command - OAuth implementation
1594
- program
1595
- .command('auth <action>')
1596
- .description('Authentication management (login, logout, status)')
1597
- .option('--instance <instance>', 'ServiceNow instance (e.g., dev12345.service-now.com)')
1598
- .option('--client-id <clientId>', 'OAuth Client ID')
1599
- .option('--client-secret <clientSecret>', 'OAuth Client Secret')
1600
- .action(async (action, options) => {
1601
- const oauth = new snow_oauth_js_1.ServiceNowOAuth();
1602
- if (action === 'login') {
1603
- cliLogger.info('šŸ”‘ Starting ServiceNow OAuth authentication...');
1604
- // Get credentials from options or environment
1605
- const instance = options.instance || process.env.SNOW_INSTANCE;
1606
- const clientId = options.clientId || process.env.SNOW_CLIENT_ID;
1607
- const clientSecret = options.clientSecret || process.env.SNOW_CLIENT_SECRET;
1608
- if (!instance || !clientId || !clientSecret) {
1609
- console.error('āŒ Missing required OAuth credentials');
1610
- cliLogger.info('\nšŸ“ Please provide:');
1611
- cliLogger.info(' --instance: ServiceNow instance (e.g., dev12345.service-now.com)');
1612
- cliLogger.info(' --client-id: OAuth Client ID');
1613
- cliLogger.info(' --client-secret: OAuth Client Secret');
1614
- cliLogger.info('\nšŸ’” Or set environment variables:');
1615
- cliLogger.info(' export SNOW_INSTANCE=your-instance.service-now.com');
1616
- cliLogger.info(' export SNOW_CLIENT_ID=your-client-id');
1617
- cliLogger.info(' export SNOW_CLIENT_SECRET=your-client-secret');
1618
- return;
1619
- }
1620
- // Start OAuth flow
1621
- const result = await oauth.authenticate(instance, clientId, clientSecret);
1622
- if (result.success) {
1623
- cliLogger.info('\nāœ… Authentication successful!');
1624
- cliLogger.info('šŸŽ‰ Snow-Flow is now connected to ServiceNow!');
1625
- cliLogger.info('\nšŸ“‹ Next steps:');
1626
- cliLogger.info(' 1. Test connection: snow-flow auth status');
1627
- cliLogger.info(' 2. Start development: snow-flow swarm "create a widget for incident management"');
1628
- // Test connection
1629
- const client = new servicenow_client_js_1.ServiceNowClient();
1630
- const testResult = await client.testConnection();
1631
- if (testResult.success) {
1632
- cliLogger.info(`\nšŸ” Connection test successful!`);
1633
- cliLogger.info(`šŸ‘¤ Logged in as: ${testResult.data.name} (${testResult.data.user_name})`);
1634
- }
1635
- }
1636
- else {
1637
- console.error(`\nāŒ Authentication failed: ${result.error}`);
1638
- process.exit(1);
1639
- }
1640
- }
1641
- else if (action === 'logout') {
1642
- cliLogger.info('šŸ”“ Logging out...');
1643
- await oauth.logout();
1644
- }
1645
- else if (action === 'status') {
1646
- cliLogger.info('šŸ“Š Authentication Status:');
1647
- const isAuthenticated = await oauth.isAuthenticated();
1648
- const credentials = await oauth.loadCredentials();
1649
- if (isAuthenticated && credentials) {
1650
- console.log(' ā”œā”€ā”€ Status: āœ… Authenticated');
1651
- console.log(` ā”œā”€ā”€ Instance: ${credentials.instance}`);
1652
- console.log(' ā”œā”€ā”€ Method: OAuth 2.0');
1653
- console.log(` ā”œā”€ā”€ Client ID: ${credentials.clientId}`);
1654
- if (credentials.expiresAt) {
1655
- const expiresAt = new Date(credentials.expiresAt);
1656
- console.log(` └── Token expires: ${expiresAt.toLocaleString()}`);
1657
- }
1658
- // Test connection
1659
- const client = new servicenow_client_js_1.ServiceNowClient();
1660
- const testResult = await client.testConnection();
1661
- if (testResult.success) {
1662
- console.log(`\nšŸ” Connection test: āœ… Success`);
1663
- if (testResult.data.message) {
1664
- console.log(` ${testResult.data.message}`);
1665
- }
1666
- console.log(`🌐 Instance: ${testResult.data.email || credentials.instance}`);
1667
- }
1668
- else {
1669
- console.log(`\nšŸ” Connection test: āŒ Failed`);
1670
- console.log(` Error: ${testResult.error}`);
1671
- }
1672
- }
1673
- else {
1674
- console.log(' ā”œā”€ā”€ Status: āŒ Not authenticated');
1675
- console.log(' ā”œā”€ā”€ Instance: Not configured');
1676
- console.log(' └── Method: Not set');
1677
- console.log('\nšŸ’” Run "snow-flow auth login" to authenticate');
1678
- }
1679
- }
1680
- else {
1681
- console.log('āŒ Invalid action. Use: login, logout, or status');
1682
- }
1683
- });
1593
+ // Auth commands are now handled by registerAuthCommands() at the top of this file
1684
1594
  // Initialize Snow-Flow project
1685
1595
  program
1686
1596
  .command('init')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -1,85 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "šŸ” Checking MCP Server Resources"
4
- echo "================================="
5
- echo ""
6
-
7
- # Count MCP processes
8
- echo "šŸ“Š MCP Process Count:"
9
- MCP_COUNT=$(ps aux | grep -E "mcp|servicenow.*mcp" | grep -v grep | wc -l)
10
- echo " Active MCP processes: $MCP_COUNT"
11
- echo ""
12
-
13
- # Show MCP processes with memory usage
14
- echo "šŸ’¾ MCP Process Memory Usage:"
15
- ps aux | grep -E "mcp|servicenow.*mcp" | grep -v grep | awk '{printf " PID: %5s | Memory: %6s MB | CPU: %5s%% | Process: %s\n", $2, int($6/1024), $3, substr($0, index($0,$11))}'
16
- echo ""
17
-
18
- # Total memory used by MCP
19
- echo "šŸ“ˆ Total Memory Statistics:"
20
- TOTAL_MEM=$(ps aux | grep -E "mcp|servicenow.*mcp" | grep -v grep | awk '{sum += $6} END {print int(sum/1024)}')
21
- echo " Total MCP memory usage: ${TOTAL_MEM:-0} MB"
22
-
23
- # System memory
24
- if [[ "$OSTYPE" == "darwin"* ]]; then
25
- # macOS
26
- TOTAL_SYSTEM_MEM=$(sysctl -n hw.memsize | awk '{print int($1/1024/1024)}')
27
- echo " Total system memory: $TOTAL_SYSTEM_MEM MB"
28
- else
29
- # Linux
30
- TOTAL_SYSTEM_MEM=$(free -m | awk '/^Mem:/{print $2}')
31
- echo " Total system memory: $TOTAL_SYSTEM_MEM MB"
32
- fi
33
-
34
- echo ""
35
- echo "āš ļø Warning Thresholds:"
36
- if [ "$MCP_COUNT" -gt 10 ]; then
37
- echo " āŒ Too many MCP processes ($MCP_COUNT > 10) - This will cause timeouts!"
38
- echo " šŸ’” Run: pkill -f mcp"
39
- else
40
- echo " āœ… MCP process count OK ($MCP_COUNT <= 10)"
41
- fi
42
-
43
- if [ "${TOTAL_MEM:-0}" -gt 1500 ]; then
44
- echo " āŒ High memory usage (${TOTAL_MEM}MB > 1500MB) - This will cause timeouts!"
45
- echo " šŸ’” Run: npm run cleanup-mcp"
46
- else
47
- echo " āœ… Memory usage OK (${TOTAL_MEM:-0}MB <= 1500MB)"
48
- fi
49
-
50
- echo ""
51
- echo "šŸ”§ Node.js Processes:"
52
- NODE_COUNT=$(ps aux | grep -E "node.*snow|node.*servicenow" | grep -v grep | wc -l)
53
- echo " Active Node processes: $NODE_COUNT"
54
-
55
- # Check for zombie processes
56
- echo ""
57
- echo "šŸ‘» Zombie/Defunct Processes:"
58
- ZOMBIE_COUNT=$(ps aux | grep defunct | grep -v grep | wc -l)
59
- if [ "$ZOMBIE_COUNT" -gt 0 ]; then
60
- echo " āš ļø Found $ZOMBIE_COUNT zombie processes"
61
- ps aux | grep defunct | grep -v grep
62
- else
63
- echo " āœ… No zombie processes found"
64
- fi
65
-
66
- echo ""
67
- echo "šŸ“‹ Recommendations:"
68
- echo ""
69
-
70
- if [ "$MCP_COUNT" -gt 10 ] || [ "${TOTAL_MEM:-0}" -gt 1500 ]; then
71
- echo " 🚨 RESOURCE ISSUES DETECTED!"
72
- echo ""
73
- echo " Quick fix:"
74
- echo " 1. pkill -f mcp"
75
- echo " 2. npm run cleanup-mcp"
76
- echo " 3. npm run mcp:start"
77
- echo ""
78
- echo " Permanent fix:"
79
- echo " 1. Add to .env:"
80
- echo " SNOW_MAX_MCP_SERVERS=5"
81
- echo " SNOW_MCP_MEMORY_LIMIT=200"
82
- echo " 2. Restart snow-flow"
83
- else
84
- echo " āœ… Resources look healthy"
85
- fi
@@ -1,132 +0,0 @@
1
- # Snow-Flow v4.2.0 ENTERPRISE - NPM Release Pipeline
2
- # Automated npm publishing for enterprise releases
3
-
4
- steps:
5
- # Install dependencies
6
- - name: 'node:20'
7
- entrypoint: 'npm'
8
- args: ['ci', '--production=false']
9
- id: 'install'
10
- env:
11
- - 'NPM_CONFIG_CACHE=/tmp/.npm'
12
-
13
- # Build enterprise edition
14
- - name: 'node:20'
15
- entrypoint: 'npm'
16
- args: ['run', 'build']
17
- id: 'build'
18
- waitFor: ['install']
19
-
20
- # Version validation
21
- - name: 'node:20'
22
- entrypoint: 'node'
23
- args: ['-e', 'const pkg=require("./package.json"); console.log(`Building v${pkg.version}`); if(!pkg.version.match(/^4\\.\\d+\\.\\d+$/)) process.exit(1);']
24
- id: 'validate-version'
25
- waitFor: ['build']
26
-
27
- # Enterprise feature verification
28
- - name: 'node:20'
29
- entrypoint: 'bash'
30
- args:
31
- - '-c'
32
- - |
33
- echo "šŸ” Verifying enterprise features..."
34
-
35
- # Check MCP servers count
36
- MCP_COUNT=$(find src/mcp/ -name "*-mcp.ts" | wc -l)
37
- echo "šŸ“Š MCP Servers found: $MCP_COUNT"
38
- if [ "$MCP_COUNT" -lt 20 ]; then
39
- echo "āŒ ERROR: Expected 20+ MCP servers, found $MCP_COUNT"
40
- exit 1
41
- fi
42
-
43
- # Check for enterprise servers
44
- if [ ! -f "src/mcp/servicenow-itam-mcp.ts" ]; then
45
- echo "āŒ ERROR: ITAM MCP server missing"
46
- exit 1
47
- fi
48
-
49
- if [ ! -f "src/mcp/servicenow-secops-mcp.ts" ]; then
50
- echo "āŒ ERROR: SecOps MCP server missing"
51
- exit 1
52
- fi
53
-
54
- if [ ! -f "src/mcp/servicenow-notifications-mcp.ts" ]; then
55
- echo "āŒ ERROR: Notifications MCP server missing"
56
- exit 1
57
- fi
58
-
59
- # Check for memory optimization
60
- if [ ! -f "src/utils/memory-pool.ts" ]; then
61
- echo "āŒ ERROR: MemoryPoolManager missing"
62
- exit 1
63
- fi
64
-
65
- echo "āœ… All enterprise features verified!"
66
- echo "šŸ¢ ITAM: Asset lifecycle management āœ…"
67
- echo "šŸ›”ļø SecOps: Security operations āœ…"
68
- echo "šŸ“Ø Notifications: Multi-channel messaging āœ…"
69
- echo "🧠 MemoryPoolManager: Performance optimization āœ…"
70
- id: 'verify-enterprise'
71
- waitFor: ['validate-version']
72
-
73
- # Publish to npm (only on tags)
74
- - name: 'node:20'
75
- entrypoint: 'bash'
76
- args:
77
- - '-c'
78
- - |
79
- # Only publish on version tags
80
- if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
81
- echo "šŸš€ Publishing Snow-Flow Enterprise Edition to npm..."
82
- echo "//registry.npmjs.org/:_authToken=$_NPM_TOKEN" > ~/.npmrc
83
- npm publish --tag latest
84
- echo "āœ… Published Snow-Flow v$TAG_NAME to npm registry"
85
- echo "šŸ“¦ Enterprise features now available worldwide!"
86
- else
87
- echo "ā„¹ļø Not a version tag, skipping npm publish"
88
- fi
89
- id: 'npm-publish'
90
- waitFor: ['verify-enterprise']
91
- secretEnv: ['NPM_TOKEN']
92
-
93
- # Success notification
94
- - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
95
- entrypoint: 'bash'
96
- args:
97
- - '-c'
98
- - |
99
- echo "šŸŽ‰ Snow-Flow Enterprise Build Complete!"
100
- echo "Version: $(node -p 'require("./package.json").version')"
101
- echo "MCP Servers: 23"
102
- echo "Tools: 355+"
103
- echo "Enterprise Features: ITAM + SecOps + Notifications"
104
- echo "Memory Optimizations: Active"
105
- echo "Ready for enterprise deployment! šŸš€"
106
- id: 'success-notification'
107
- waitFor: ['npm-publish']
108
-
109
- # Secret manager configuration for NPM token
110
- availableSecrets:
111
- secretManager:
112
- - versionName: projects/$PROJECT_ID/secrets/npm-token/versions/latest
113
- env: 'NPM_TOKEN'
114
-
115
- # Build options for enterprise scale
116
- options:
117
- logging: CLOUD_LOGGING_ONLY
118
- machineType: 'E2_HIGHCPU_8'
119
- diskSizeGb: 100
120
- env:
121
- - 'NODE_ENV=production'
122
- - 'SNOW_FLOW_ENTERPRISE=true'
123
-
124
- # Substitutions
125
- substitutions:
126
- _NPM_TOKEN: '' # Set via secret manager
127
-
128
- # Build timeout
129
- timeout: '2400s' # 40 minutes for enterprise builds
130
-
131
- # Tags
132
- tags: ['snow-flow', 'enterprise', 'npm-release', 'v4-2-0']
@@ -1,92 +0,0 @@
1
- # Snow-Flow Website v4.2.0 ENTERPRISE - Cloud Run Deployment
2
- # Builds and deploys the enterprise website with updated hero fixes
3
-
4
- steps:
5
- # Build the Docker image from website directory
6
- - name: 'gcr.io/cloud-builders/docker'
7
- args: [
8
- 'build',
9
- '-t', 'gcr.io/$PROJECT_ID/snow-flow-website:$COMMIT_SHA',
10
- '-t', 'gcr.io/$PROJECT_ID/snow-flow-website:latest',
11
- '-f', 'website/Dockerfile', # Specify Dockerfile location
12
- 'website/' # Build context is website directory
13
- ]
14
- id: 'build-website'
15
-
16
- # Push the Docker image to Container Registry
17
- - name: 'gcr.io/cloud-builders/docker'
18
- args: ['push', 'gcr.io/$PROJECT_ID/snow-flow-website:$COMMIT_SHA']
19
- id: 'push-latest'
20
- waitFor: ['build-website']
21
-
22
- - name: 'gcr.io/cloud-builders/docker'
23
- args: ['push', 'gcr.io/$PROJECT_ID/snow-flow-website:latest']
24
- id: 'push-sha'
25
- waitFor: ['build-website']
26
-
27
- # Deploy to Cloud Run with enterprise configuration
28
- - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
29
- entrypoint: gcloud
30
- args: [
31
- 'run', 'deploy', 'snow-flow-website',
32
- '--image', 'gcr.io/$PROJECT_ID/snow-flow-website:$COMMIT_SHA',
33
- '--region', 'europe-west1',
34
- '--platform', 'managed',
35
- '--allow-unauthenticated',
36
- '--port', '80',
37
- '--memory', '1Gi', # Increased for enterprise website
38
- '--cpu', '2', # Increased for better performance
39
- '--concurrency', '100',
40
- '--max-instances', '20', # Increased for enterprise scale
41
- '--min-instances', '1',
42
- '--set-env-vars', 'NODE_ENV=production,ENTERPRISE_MODE=true',
43
- '--timeout', '300',
44
- '--service-account', 'cloud-run-sa@$PROJECT_ID.iam.gserviceaccount.com'
45
- ]
46
- id: 'deploy-cloud-run'
47
- waitFor: ['push-latest', 'push-sha']
48
-
49
- # Verify deployment
50
- - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
51
- entrypoint: bash
52
- args:
53
- - '-c'
54
- - |
55
- echo "🌐 Snow-Flow Enterprise Website Deployed!"
56
-
57
- # Get service URL
58
- SERVICE_URL=$(gcloud run services describe snow-flow-website \
59
- --region=europe-west1 \
60
- --format='value(status.url)')
61
-
62
- echo "šŸ”— Website URL: $SERVICE_URL"
63
- echo "āœ… Features: 23 MCP Servers, 355+ Tools"
64
- echo "āœ… Enterprise: ITAM, SecOps, Notifications"
65
- echo "āœ… Hero fixes: Contrast, centering, counter animations"
66
-
67
- # Test website is responding
68
- curl -f "$SERVICE_URL" -o /dev/null || echo "āš ļø Website not responding yet (may take a moment)"
69
- id: 'verify-deployment'
70
- waitFor: ['deploy-cloud-run']
71
-
72
- # Build options optimized for website deployment
73
- options:
74
- logging: CLOUD_LOGGING_ONLY
75
- machineType: 'E2_STANDARD_4' # Standard for Docker builds
76
- diskSizeGb: 50
77
-
78
- # Substitutions
79
- substitutions:
80
- _REGION: 'europe-west1'
81
- _SERVICE_NAME: 'snow-flow-website'
82
-
83
- # Images to be pushed
84
- images:
85
- - 'gcr.io/$PROJECT_ID/snow-flow-website:$COMMIT_SHA'
86
- - 'gcr.io/$PROJECT_ID/snow-flow-website:latest'
87
-
88
- # Build timeout
89
- timeout: '1200s'
90
-
91
- # Tags
92
- tags: ['snow-flow', 'website', 'cloud-run', 'v4-2-0', 'enterprise']
package/cloudbuild.yaml DELETED
@@ -1,141 +0,0 @@
1
- # Snow-Flow v4.2.0 ENTERPRISE - Google Cloud Build Configuration
2
- # Builds and tests the complete Snow-Flow platform with 23 MCP servers and 355+ tools
3
-
4
- steps:
5
- # Install Node.js dependencies
6
- - name: 'node:20'
7
- entrypoint: 'npm'
8
- args: ['ci']
9
- id: 'install-deps'
10
- env:
11
- - 'NODE_ENV=production'
12
- - 'NPM_CONFIG_CACHE=/tmp/.npm'
13
-
14
- # Build Snow-Flow with optimized settings for enterprise
15
- - name: 'node:20'
16
- entrypoint: 'npm'
17
- args: ['run', 'build']
18
- id: 'build-snow-flow'
19
- waitFor: ['install-deps']
20
- env:
21
- - 'NODE_ENV=production'
22
- - 'SNOW_FLOW_ENTERPRISE=true'
23
- - 'MEMORY_OPTIMIZATION=enabled'
24
-
25
- # Run enterprise test suite
26
- - name: 'node:20'
27
- entrypoint: 'npm'
28
- args: ['test']
29
- id: 'test-enterprise'
30
- waitFor: ['build-snow-flow']
31
- env:
32
- - 'NODE_ENV=test'
33
- - 'JEST_TIMEOUT=30000'
34
-
35
- # Verify CLI functionality
36
- - name: 'node:20'
37
- entrypoint: 'node'
38
- args: ['dist/cli.js', '--version']
39
- id: 'verify-cli'
40
- waitFor: ['build-snow-flow']
41
-
42
- # Test MCP server connectivity
43
- - name: 'node:20'
44
- entrypoint: 'node'
45
- args: ['-e', 'console.log("Testing MCP servers..."); process.exit(0);']
46
- id: 'test-mcp-servers'
47
- waitFor: ['build-snow-flow']
48
-
49
- # Package for npm (for enterprise distribution)
50
- - name: 'node:20'
51
- entrypoint: 'npm'
52
- args: ['pack', '--pack-destination=/workspace/artifacts']
53
- id: 'package-npm'
54
- waitFor: ['test-enterprise', 'verify-cli']
55
-
56
- # Create enterprise deployment artifact
57
- - name: 'gcr.io/cloud-builders/gcloud'
58
- entrypoint: 'bash'
59
- args:
60
- - '-c'
61
- - |
62
- echo "Snow-Flow v4.2.0 ENTERPRISE Build Complete"
63
- echo "āœ… 23 MCP Servers compiled successfully"
64
- echo "āœ… 355+ Tools ready for deployment"
65
- echo "āœ… Enterprise features: ITAM, SecOps, Notifications"
66
- echo "āœ… Memory optimizations: MemoryPoolManager active"
67
- echo "āœ… Performance improvements: 85% memory reduction"
68
- echo "šŸ“¦ Artifact ready for enterprise distribution"
69
-
70
- # Create build metadata
71
- cat > /workspace/artifacts/build-metadata.json << EOF
72
- {
73
- "version": "4.2.0",
74
- "build_time": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
75
- "commit_sha": "$COMMIT_SHA",
76
- "mcp_servers": 23,
77
- "tools_count": "355+",
78
- "enterprise_features": ["ITAM", "SecOps", "Notifications"],
79
- "optimizations": ["MemoryPoolManager", "10k+ lines removed", "5MB+ widget support"],
80
- "platform": "enterprise",
81
- "nodejs_version": "20.x",
82
- "build_machine": "$_MACHINE_TYPE"
83
- }
84
- EOF
85
- id: 'create-metadata'
86
- waitFor: ['package-npm']
87
-
88
- # Lint and security check (optional for enterprise)
89
- - name: 'node:20'
90
- entrypoint: 'npm'
91
- args: ['run', 'lint']
92
- id: 'lint-check'
93
- waitFor: ['install-deps']
94
- allowFailure: true # Don't fail build on lint warnings
95
-
96
- # Artifacts to store
97
- artifacts:
98
- objects:
99
- location: 'gs://$PROJECT_ID-snow-flow-artifacts'
100
- paths:
101
- - '/workspace/artifacts/*'
102
- - '/workspace/dist/**/*'
103
- - '/workspace/package.json'
104
-
105
- # Build options optimized for enterprise
106
- options:
107
- logging: CLOUD_LOGGING_ONLY
108
- machineType: 'E2_HIGHCPU_8' # High CPU for TypeScript compilation and 355 tools
109
- diskSizeGb: 100
110
- substitutionOption: 'ALLOW_LOOSE' # For enterprise environment variables
111
- env:
112
- - 'CLOUDSDK_COMPUTE_ZONE=europe-west1-b'
113
- - 'CLOUDSDK_CORE_PROJECT=$PROJECT_ID'
114
-
115
- # Environment substitutions for enterprise deployment
116
- substitutions:
117
- _MACHINE_TYPE: 'E2_HIGHCPU_8'
118
- _NODE_VERSION: '20'
119
- _SNOW_FLOW_VERSION: '4.2.0'
120
- _ENTERPRISE_MODE: 'true'
121
- _MEMORY_OPTIMIZATION: 'enabled'
122
-
123
- # Build timeout (increased for enterprise scale)
124
- timeout: '1800s' # 30 minutes for enterprise builds
125
-
126
- # Tags for organization and filtering
127
- tags:
128
- - 'snow-flow'
129
- - 'enterprise'
130
- - 'v4-2-0'
131
- - 'mcp-servers'
132
- - 'servicenow'
133
- - 'automation'
134
-
135
- # Service account for enterprise permissions (configure in GCP if needed)
136
- # serviceAccount: 'projects/$PROJECT_ID/serviceAccounts/snow-flow-enterprise@$PROJECT_ID.iam.gserviceaccount.com'
137
-
138
- # Build triggers (configure in GCP Console)
139
- # - Push to main branch
140
- # - Tag push matching v*.*.*
141
- # - Manual trigger for enterprise releases
package/empty-test.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "mcpServers": {}
3
- }
@@ -1,32 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Fix console.log statements in MCP servers to use console.error instead
4
- # This prevents stdout pollution which breaks JSON-RPC protocol
5
-
6
- echo "šŸ”§ Fixing console.log statements in MCP servers..."
7
-
8
- # List of files to fix
9
- files=(
10
- "src/mcp/service-discovery-client.ts"
11
- "src/mcp/servicenow-deployment-mcp.ts"
12
- "src/mcp/servicenow-mcp-server.ts"
13
- "src/mcp/servicenow-update-set-mcp.ts"
14
- "src/mcp/start-all-mcp-servers.ts"
15
- "src/mcp/start-servicenow-mcp.ts"
16
- )
17
-
18
- for file in "${files[@]}"; do
19
- if [ -f "$file" ]; then
20
- echo " Fixing $file..."
21
- # Replace console.log with console.error
22
- sed -i.bak 's/console\.log(/console.error(/g' "$file"
23
- # Remove backup file
24
- rm -f "${file}.bak"
25
- else
26
- echo " āš ļø File not found: $file"
27
- fi
28
- done
29
-
30
- echo "āœ… Console.log statements fixed!"
31
- echo ""
32
- echo "Note: console.error is used for logging in MCP servers to keep stdout clean for JSON-RPC protocol."
@@ -1,31 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "šŸ”§ Fixing MCP response patterns to include _meta field..."
4
-
5
- # Find all TypeScript files with operationComplete
6
- files=$(grep -l "operationComplete" src/mcp/*.ts)
7
- count=$(echo "$files" | wc -l)
8
-
9
- echo "šŸ“‚ Found $count files to fix"
10
-
11
- for file in $files; do
12
- echo " šŸ“ Fixing $(basename $file)..."
13
-
14
- # Replace the pattern where operationComplete is followed by return result
15
- # Add the addTokenUsageToResponse call before returning
16
- sed -i '' 's/this\.logger\.operationComplete(name, result);/result = this.logger.addTokenUsageToResponse(result);\
17
- this.logger.operationComplete(name, result);/g' "$file"
18
-
19
- # Also handle cases with different spacing
20
- sed -i '' 's/this\.logger\.operationComplete(name, result);[[:space:]]*$/result = this.logger.addTokenUsageToResponse(result);\
21
- this.logger.operationComplete(name, result);/g' "$file"
22
- done
23
-
24
- echo "āœ… Fixed all MCP files!"
25
- echo ""
26
- echo "šŸ” Verifying changes..."
27
- echo "Files now using addTokenUsageToResponse:"
28
- grep -l "addTokenUsageToResponse" src/mcp/*.ts | wc -l
29
-
30
- echo ""
31
- echo "šŸ“¦ Now run: npm run build"
package/simple-test.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "filesystem": {
4
- "command": "npx",
5
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/nielsvanderwerf/Projects"],
6
- "description": "Filesystem access server"
7
- }
8
- }
9
- }
package/test-mcp.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "servicenow-deployment": {
4
- "command": "node",
5
- "args": [
6
- "/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-deployment-mcp.js"
7
- ],
8
- "description": "Test deployment server"
9
- }
10
- }
11
- }
package/test.txt DELETED
@@ -1 +0,0 @@
1
- test file content