snow-flow 2.0.2 → 2.0.3
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/{.claude/mcp-config.json → .mcp.json} +13 -12
- package/.releaserc.json +47 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/.claude/claude-settings.json +0 -15
- package/.claude/commands/analysis/README.md +0 -9
- package/.claude/commands/automation/README.md +0 -9
- package/.claude/commands/github/README.md +0 -11
- package/.claude/commands/helpers/standard-checkpoint-hooks.sh +0 -179
- package/.claude/commands/hooks/README.md +0 -11
- package/.claude/commands/monitoring/README.md +0 -9
- package/.claude/commands/optimization/README.md +0 -9
- package/.claude/commands/training/README.md +0 -9
- package/.claude/commands/workflows/README.md +0 -9
- package/.claude/config.json +0 -36
- package/.claude/helpers/github-setup.sh +0 -28
- package/.claude/helpers/quick-start.sh +0 -19
- package/.claude/helpers/setup-mcp.sh +0 -18
- package/.claude/settings.json +0 -114
- package/.claude/settings.local.json +0 -33
- package/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude-flow/metrics/performance.json +0 -9
- package/.claude-flow/metrics/system-metrics.json +0 -15986
- package/.claude-flow/metrics/task-metrics.json +0 -10
- package/.roo/README.md +0 -402
- package/.roo/mcp-list.txt +0 -257
- package/.roo/mcp.json +0 -32
- package/.roo/workflows/basic-tdd.json +0 -32
- package/.roomodes +0 -201
- package/CLAUDE.md +0 -393
- package/bin/snow-flow.js +0 -3
- package/dist/cli.js.bak +0 -2052
- package/dist/config/snow-flow-config.d.ts +0 -1492
- package/dist/config/snow-flow-config.js +0 -938
- package/scripts/create-env.js +0 -91
- package/scripts/postinstall.js +0 -30
- package/scripts/register-mcp-servers.js +0 -210
- package/scripts/reset-mcp-servers.js +0 -246
- package/scripts/setup-mcp.js +0 -106
- package/scripts/update-version.js +0 -31
- package/src/agents/README.md +0 -192
- package/src/agents/base-agent.ts +0 -251
- package/src/agents/coordinator.ts +0 -971
- package/src/agents/index.ts +0 -18
- package/src/agents/queen-403-handler.ts +0 -230
- package/src/agents/queen-agent.ts +0 -1399
- package/src/agents/script-writer-agent.ts +0 -769
- package/src/agents/security-agent.ts +0 -726
- package/src/agents/widget-creator-agent.ts +0 -568
- package/src/api/error-handling.ts +0 -1758
- package/src/api/natural-language-mapper.ts +0 -630
- package/src/api/performance-optimizer.ts +0 -891
- package/src/api/transaction-manager.ts +0 -754
- package/src/cli/deploy-artifact.ts +0 -304
- package/src/cli/snow-flow-cli-integration.ts +0 -434
- package/src/cli.ts +0 -4455
- package/src/cli.ts.bak +0 -5616
- package/src/compliance/advanced-compliance-system.ts +0 -1268
- package/src/compliance/index.ts +0 -19
- package/src/config/snow-flow-config.ts +0 -1019
- package/src/documentation/index.ts +0 -16
- package/src/documentation/self-documenting-system.ts +0 -1421
- package/src/dynamic-version.ts +0 -44
- package/src/healing/index.ts +0 -20
- package/src/healing/self-healing-system.ts +0 -1435
- package/src/health/README.md +0 -161
- package/src/health/system-health.ts +0 -995
- package/src/index.ts +0 -60
- package/src/intelligence/acl-analyzer.ts +0 -377
- package/src/intelligence/auto-resolution-engine.ts +0 -643
- package/src/intelligence/gap-analysis-engine.ts +0 -488
- package/src/intelligence/manual-instructions-generator.ts +0 -744
- package/src/intelligence/mcp-coverage-analyzer.ts +0 -708
- package/src/intelligence/multi-pass-requirements-analyzer.ts +0 -603
- package/src/intelligence/performance-recommendations-engine.ts +0 -1223
- package/src/intelligence/requirements-analyzer.ts +0 -1148
- package/src/intelligence/task-analyzer.ts +0 -628
- package/src/managers/scope-manager.ts +0 -555
- package/src/mcp/advanced/servicenow-advanced-features-mcp.ts +0 -16110
- package/src/mcp/base-mcp-server.ts +0 -660
- package/src/mcp/http-transport-wrapper.ts +0 -426
- package/src/mcp/service-discovery-client.ts +0 -312
- package/src/mcp/servicenow-automation-mcp-refactored.ts +0 -678
- package/src/mcp/servicenow-automation-mcp.ts +0 -838
- package/src/mcp/servicenow-deployment-mcp-refactored.ts +0 -1292
- package/src/mcp/servicenow-deployment-mcp.ts +0 -7244
- package/src/mcp/servicenow-graph-memory-mcp-refactored.ts +0 -721
- package/src/mcp/servicenow-graph-memory-mcp.ts +0 -832
- package/src/mcp/servicenow-integration-mcp-refactored.ts +0 -655
- package/src/mcp/servicenow-integration-mcp.ts +0 -819
- package/src/mcp/servicenow-intelligent-mcp-refactored.ts +0 -977
- package/src/mcp/servicenow-intelligent-mcp.ts +0 -4638
- package/src/mcp/servicenow-mcp-server.ts +0 -728
- package/src/mcp/servicenow-memory-mcp.ts +0 -474
- package/src/mcp/servicenow-operations-mcp-refactored.ts +0 -1995
- package/src/mcp/servicenow-operations-mcp.ts +0 -3384
- package/src/mcp/servicenow-platform-development-mcp-refactored.ts +0 -611
- package/src/mcp/servicenow-platform-development-mcp.ts +0 -970
- package/src/mcp/servicenow-progressive-indexer.ts +0 -370
- package/src/mcp/servicenow-reporting-analytics-mcp-refactored.ts +0 -695
- package/src/mcp/servicenow-reporting-analytics-mcp.ts +0 -1123
- package/src/mcp/servicenow-security-compliance-mcp-refactored.ts +0 -642
- package/src/mcp/servicenow-security-compliance-mcp.ts +0 -1157
- package/src/mcp/servicenow-update-set-mcp-refactored.ts +0 -751
- package/src/mcp/servicenow-update-set-mcp.ts +0 -811
- package/src/mcp/shared/agent-context-provider.ts +0 -365
- package/src/mcp/shared/base-mcp-server.ts +0 -2463
- package/src/mcp/shared/mcp-memory-manager.ts +0 -540
- package/src/mcp/shared/mcp-resource-manager.ts +0 -367
- package/src/mcp/snow-flow-mcp.ts +0 -911
- package/src/mcp/start-all-mcp-servers.ts +0 -102
- package/src/mcp/start-servicenow-mcp.ts +0 -67
- package/src/monitoring/enhanced-monitoring-system.ts +0 -1345
- package/src/monitoring/performance-tracker.ts +0 -777
- package/src/optimization/cost-optimization-engine.ts +0 -1125
- package/src/optimization/index.ts +0 -10
- package/src/queen/README.md +0 -403
- package/src/queen/agent-factory.ts +0 -574
- package/src/queen/index.ts +0 -94
- package/src/queen/mcp-execution-bridge.ts +0 -681
- package/src/queen/neural-learning.ts +0 -319
- package/src/queen/parallel-agent-engine.ts +0 -848
- package/src/queen/queen-memory-system.ts +0 -490
- package/src/queen/queen-memory.ts +0 -456
- package/src/queen/servicenow-queen.ts +0 -1029
- package/src/queen/types.ts +0 -87
- package/src/rollback/smart-rollback-system.ts +0 -866
- package/src/schemas/deployment.schema.json +0 -58
- package/src/schemas/flow.schema.json +0 -79
- package/src/schemas/widget.schema.json +0 -72
- package/src/snow-flow-system.ts +0 -541
- package/src/sparc/sparc-help.ts +0 -49
- package/src/sparc/team-sparc.ts +0 -88
- package/src/strategies/global-scope-strategy.ts +0 -736
- package/src/templates/base/application.template.json +0 -45
- package/src/templates/base/business_rule.template.json +0 -33
- package/src/templates/base/script_include.template.json +0 -18
- package/src/templates/base/table.template.json +0 -64
- package/src/templates/base/widget.template.json +0 -25
- package/src/templates/patterns/composite.incident-management.template.json +0 -140
- package/src/templates/patterns/widget.dashboard.template.json +0 -238
- package/src/templates/patterns/widget.datatable.template.json +0 -292
- package/src/testing/integration-test-suite.ts +0 -1276
- package/src/types/index.ts +0 -183
- package/src/types/neo4j-driver.d.ts +0 -23
- package/src/types/servicenow.types.ts +0 -307
- package/src/types/snow-flow.types.ts +0 -186
- package/src/types/todo.types.ts +0 -70
- package/src/utils/action-type-cache.ts +0 -286
- package/src/utils/agent-detector.ts +0 -573
- package/src/utils/artifact-tracker.ts +0 -379
- package/src/utils/dependency-detector.ts +0 -233
- package/src/utils/deployment-metadata-handler.ts +0 -518
- package/src/utils/error-recovery.ts +0 -680
- package/src/utils/logger.ts +0 -60
- package/src/utils/mcp-auth-middleware.ts +0 -262
- package/src/utils/mcp-config-manager.ts +0 -270
- package/src/utils/mcp-server-manager.ts +0 -446
- package/src/utils/mcp-tool-registry.ts +0 -298
- package/src/utils/migrate-snow-flow.ts +0 -98
- package/src/utils/oauth-html-templates.ts +0 -188
- package/src/utils/scope-utils.ts +0 -443
- package/src/utils/servicenow-client.ts +0 -3321
- package/src/utils/servicenow-id-generator.ts +0 -181
- package/src/utils/snow-memory-manager.ts +0 -605
- package/src/utils/snow-oauth.ts +0 -797
- package/src/utils/template-engine.ts +0 -463
- package/src/utils/theme-manager.ts +0 -295
- package/src/utils/unified-auth-store.ts +0 -222
- package/src/utils/update-set-importer.ts +0 -422
- package/src/utils/update-set-xml-packager.ts +0 -371
- package/src/utils/widget-template-generator.ts +0 -1744
- package/src/version.ts +0 -1950
package/src/health/README.md
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
# Snow-Flow System Health Monitoring
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The System Health module provides comprehensive real-time monitoring of all Snow-Flow components, replacing placeholder metrics with actual system measurements.
|
|
6
|
-
|
|
7
|
-
## Real Metrics Implemented
|
|
8
|
-
|
|
9
|
-
### 1. **CPU Usage** (Real-time)
|
|
10
|
-
- Uses CPU time differentials for accurate usage calculation
|
|
11
|
-
- Supports multi-core systems
|
|
12
|
-
- Automatically averages across all CPU cores
|
|
13
|
-
- Updates every 100ms for initial reading
|
|
14
|
-
|
|
15
|
-
### 2. **Memory Usage** (Real-time)
|
|
16
|
-
- **System Memory**: Total and used memory from OS
|
|
17
|
-
- **Process Memory**:
|
|
18
|
-
- Heap usage (used/total)
|
|
19
|
-
- RSS (Resident Set Size)
|
|
20
|
-
- External memory
|
|
21
|
-
- Array buffers
|
|
22
|
-
- Percentage calculations for threshold monitoring
|
|
23
|
-
|
|
24
|
-
### 3. **Disk Usage** (Real-time)
|
|
25
|
-
- **Cross-platform support**:
|
|
26
|
-
- Unix/macOS: Uses `df` command
|
|
27
|
-
- Windows: Uses `wmic` command
|
|
28
|
-
- Monitors the filesystem containing the application
|
|
29
|
-
- Returns usage percentage and total size in GB
|
|
30
|
-
- Handles edge cases (long filesystem names, parsing errors)
|
|
31
|
-
|
|
32
|
-
### 4. **Network Connectivity**
|
|
33
|
-
- DNS lookup test to verify internet connectivity
|
|
34
|
-
- Used for ServiceNow API health checks
|
|
35
|
-
|
|
36
|
-
### 5. **Database Health**
|
|
37
|
-
- SQLite database size monitoring
|
|
38
|
-
- Table and index counts
|
|
39
|
-
- Integration with MemorySystem stats
|
|
40
|
-
|
|
41
|
-
### 6. **Component-Specific Monitoring**
|
|
42
|
-
- **Memory System**: Store/retrieve tests, cache hit rates
|
|
43
|
-
- **MCP Servers**: Status of all MCP server processes
|
|
44
|
-
- **ServiceNow**: API connectivity and response times
|
|
45
|
-
- **Queen System**: Active sessions and agent counts
|
|
46
|
-
- **Performance**: Operation success rates, response times
|
|
47
|
-
|
|
48
|
-
## Usage
|
|
49
|
-
|
|
50
|
-
### Basic Health Check
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
import { SystemHealth } from './health/system-health';
|
|
54
|
-
|
|
55
|
-
const systemHealth = new SystemHealth({
|
|
56
|
-
memory,
|
|
57
|
-
mcpManager,
|
|
58
|
-
config: {
|
|
59
|
-
checks: {
|
|
60
|
-
memory: true,
|
|
61
|
-
mcp: true,
|
|
62
|
-
servicenow: true,
|
|
63
|
-
queen: true
|
|
64
|
-
},
|
|
65
|
-
thresholds: {
|
|
66
|
-
responseTime: 1000, // 1 second
|
|
67
|
-
memoryUsage: 0.9, // 90%
|
|
68
|
-
cpuUsage: 0.8, // 80%
|
|
69
|
-
queueSize: 100,
|
|
70
|
-
errorRate: 0.1 // 10%
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
await systemHealth.initialize();
|
|
76
|
-
|
|
77
|
-
// Single health check
|
|
78
|
-
const status = await systemHealth.performHealthCheck();
|
|
79
|
-
console.log('System healthy:', status.healthy);
|
|
80
|
-
console.log('CPU Usage:', status.metrics.systemResources.cpuUsage + '%');
|
|
81
|
-
console.log('Memory:', status.metrics.systemResources.memoryUsage + 'MB');
|
|
82
|
-
console.log('Disk:', status.metrics.systemResources.diskUsage + '%');
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Continuous Monitoring
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
// Start monitoring every 30 seconds
|
|
89
|
-
await systemHealth.startMonitoring(30000);
|
|
90
|
-
|
|
91
|
-
// Listen for health events
|
|
92
|
-
systemHealth.on('health:check', (status) => {
|
|
93
|
-
console.log('Health update:', status);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
systemHealth.on('health:alert', (alert) => {
|
|
97
|
-
console.log('ALERT:', alert.message);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// Stop monitoring
|
|
101
|
-
await systemHealth.stopMonitoring();
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Testing
|
|
105
|
-
|
|
106
|
-
Run the test script to see real metrics:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npm run build
|
|
110
|
-
npm run test:health
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Thresholds and Alerts
|
|
114
|
-
|
|
115
|
-
The system triggers alerts when:
|
|
116
|
-
- **CPU Usage** > 80% (degraded), > 90% (critical)
|
|
117
|
-
- **Memory Usage** > 80% (degraded), > 90% (critical)
|
|
118
|
-
- **Disk Usage** > 80% (degraded), > 90% (critical)
|
|
119
|
-
- **Heap Usage** > 90% (degraded)
|
|
120
|
-
- **Network Connectivity** lost (degraded)
|
|
121
|
-
- **Response Times** exceed configured thresholds
|
|
122
|
-
|
|
123
|
-
## Architecture
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
SystemHealth
|
|
127
|
-
├── CPU Monitor (real-time calculation)
|
|
128
|
-
├── Memory Monitor (system + process)
|
|
129
|
-
├── Disk Monitor (platform-specific)
|
|
130
|
-
├── Network Monitor (DNS-based)
|
|
131
|
-
├── Component Monitors
|
|
132
|
-
│ ├── Memory System
|
|
133
|
-
│ ├── MCP Servers
|
|
134
|
-
│ ├── ServiceNow API
|
|
135
|
-
│ ├── Queen System
|
|
136
|
-
│ └── Performance Metrics
|
|
137
|
-
└── Alert System
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Platform Support
|
|
141
|
-
|
|
142
|
-
- ✅ **macOS**: Full support for all metrics
|
|
143
|
-
- ✅ **Linux**: Full support for all metrics
|
|
144
|
-
- ✅ **Windows**: Full support (uses WMIC for disk stats)
|
|
145
|
-
- ⚠️ **Other platforms**: Basic support (some metrics may be unavailable)
|
|
146
|
-
|
|
147
|
-
## Performance Impact
|
|
148
|
-
|
|
149
|
-
The health monitoring system is designed to have minimal performance impact:
|
|
150
|
-
- CPU usage calculation adds < 1% overhead
|
|
151
|
-
- Disk usage checks are cached and throttled
|
|
152
|
-
- Database queries are optimized with indexes
|
|
153
|
-
- Network checks are asynchronous and non-blocking
|
|
154
|
-
|
|
155
|
-
## Future Enhancements
|
|
156
|
-
|
|
157
|
-
- Historical metric graphing
|
|
158
|
-
- Predictive failure detection
|
|
159
|
-
- Custom metric plugins
|
|
160
|
-
- Prometheus/Grafana integration
|
|
161
|
-
- Alert webhooks and notifications
|