claude-flow-novice 2.18.24 → 2.18.25

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.
@@ -0,0 +1,221 @@
1
+ # CFN Distributed Logging - Logrotate Configuration
2
+ # Task 4.4: Distributed Logging Standardization
3
+ #
4
+ # Manages rotation, compression, and retention of all CFN logs
5
+ # Usage: logrotate /etc/logrotate.d/cfn-logs
6
+ # Test: logrotate -d /etc/logrotate.d/cfn-logs
7
+
8
+ # Main application logs - Standard 30-day retention
9
+ /var/log/cfn/containers/*.log {
10
+ rotate 10
11
+ size 100M
12
+ compress
13
+ delaycompress
14
+ missingok
15
+ notifempty
16
+ create 0644 root root
17
+ sharedscripts
18
+ postrotate
19
+ # Signal containers on log rotation
20
+ if [ -f /var/run/cfn/container-monitor.pid ]; then
21
+ kill -HUP $(cat /var/run/cfn/container-monitor.pid) 2>/dev/null || true
22
+ fi
23
+ # Update log inventory
24
+ find /var/log/cfn/containers -name "*.log*" -mtime +30 -delete 2>/dev/null || true
25
+ endscript
26
+ maxage 30
27
+ }
28
+
29
+ # Aggregated logs directory
30
+ /var/log/cfn/aggregated/*.log {
31
+ rotate 10
32
+ size 100M
33
+ compress
34
+ delaycompress
35
+ missingok
36
+ notifempty
37
+ create 0644 root root
38
+ sharedscripts
39
+ postrotate
40
+ # Trigger aggregation job after rotation
41
+ if [ -x /usr/local/bin/log-aggregator.sh ]; then
42
+ /usr/local/bin/log-aggregator.sh --rotate >/dev/null 2>&1 || true
43
+ fi
44
+ endscript
45
+ maxage 30
46
+ }
47
+
48
+ # Debug logs - 7-day retention (shorter lifetime)
49
+ /var/log/cfn/debug/*.log {
50
+ rotate 5
51
+ size 50M
52
+ compress
53
+ delaycompress
54
+ missingok
55
+ notifempty
56
+ create 0644 root root
57
+ sharedscripts
58
+ maxage 7
59
+ }
60
+
61
+ # Performance metrics logs
62
+ /var/log/cfn/metrics/*.log {
63
+ rotate 10
64
+ size 100M
65
+ compress
66
+ delaycompress
67
+ missingok
68
+ notifempty
69
+ create 0644 root root
70
+ sharedscripts
71
+ postrotate
72
+ # Export metrics before deletion
73
+ if [ -x /usr/local/bin/export-metrics.sh ]; then
74
+ /usr/local/bin/export-metrics.sh --archive >/dev/null 2>&1 || true
75
+ fi
76
+ endscript
77
+ maxage 30
78
+ }
79
+
80
+ # Coordinator logs - Detailed 30-day retention
81
+ /var/log/cfn/coordinator/*.log {
82
+ rotate 10
83
+ size 100M
84
+ compress
85
+ delaycompress
86
+ missingok
87
+ notifempty
88
+ create 0644 root root
89
+ sharedscripts
90
+ maxage 30
91
+ }
92
+
93
+ # Agent execution logs
94
+ /var/log/cfn/agents/*.log {
95
+ rotate 10
96
+ size 100M
97
+ compress
98
+ delaycompress
99
+ missingok
100
+ notifempty
101
+ create 0644 root root
102
+ dateext
103
+ dateformat -%Y%m%d-%H%M%S
104
+ sharedscripts
105
+ maxage 30
106
+ }
107
+
108
+ # JSON structured logs (for easier parsing)
109
+ /var/log/cfn/json/*.log {
110
+ rotate 15
111
+ size 100M
112
+ compress
113
+ delaycompress
114
+ missingok
115
+ notifempty
116
+ create 0644 root root
117
+ sharedscripts
118
+ postrotate
119
+ # Validate JSON integrity before archiving
120
+ if [ -x /usr/local/bin/validate-json-logs.sh ]; then
121
+ /usr/local/bin/validate-json-logs.sh --archive >/dev/null 2>&1 || true
122
+ fi
123
+ endscript
124
+ maxage 30
125
+ }
126
+
127
+ # Error and warning logs (high priority)
128
+ /var/log/cfn/errors/*.log {
129
+ rotate 20
130
+ size 50M
131
+ compress
132
+ delaycompress
133
+ missingok
134
+ notifempty
135
+ create 0644 root root
136
+ sharedscripts
137
+ postrotate
138
+ # Alert on errors before rotation
139
+ if [ -x /usr/local/bin/alert-errors.sh ]; then
140
+ /usr/local/bin/alert-errors.sh --pre-rotate >/dev/null 2>&1 || true
141
+ fi
142
+ endscript
143
+ maxage 60
144
+ }
145
+
146
+ # Audit logs - Extended retention for compliance
147
+ /var/log/cfn/audit/*.log {
148
+ rotate 30
149
+ size 100M
150
+ compress
151
+ delaycompress
152
+ missingok
153
+ notifempty
154
+ create 0600 root root
155
+ sharedscripts
156
+ postrotate
157
+ # Archive to secure storage
158
+ if [ -x /usr/local/bin/archive-audit.sh ]; then
159
+ /usr/local/bin/archive-audit.sh >/dev/null 2>&1 || true
160
+ fi
161
+ endscript
162
+ maxage 90
163
+ }
164
+
165
+ # Catchall for any other cfn logs
166
+ /var/log/cfn/*.log {
167
+ rotate 10
168
+ size 100M
169
+ compress
170
+ delaycompress
171
+ missingok
172
+ notifempty
173
+ create 0644 root root
174
+ maxage 30
175
+ }
176
+
177
+ # Global settings that apply to all blocks
178
+ # (Can be overridden by individual blocks above)
179
+ default {
180
+ # Compression algorithm and level
181
+ compress
182
+ compresscmd /bin/gzip
183
+ compressext .gz
184
+ compressoptions -9
185
+
186
+ # Default permissions and ownership
187
+ create 0644 root root
188
+
189
+ # Rotation strategy
190
+ rotate 10
191
+ size 100M
192
+
193
+ # Behavior flags
194
+ missingok # Don't error if log file missing
195
+ notifempty # Don't rotate empty files
196
+ delaycompress # Compress on next rotation (delay by 1 rotation)
197
+ sharedscripts # Run scripts only once per rotation
198
+
199
+ # Retention
200
+ maxage 30 # Delete rotated logs older than 30 days
201
+
202
+ # Copy then truncate instead of move and create
203
+ copytruncate
204
+
205
+ # Tab character at line continuation
206
+ tabooext +.log
207
+ }
208
+
209
+ # Special handling for very large log files
210
+ /var/log/cfn/large/*.log {
211
+ rotate 5
212
+ size 1G
213
+ compress
214
+ delaycompress
215
+ missingok
216
+ notifempty
217
+ create 0644 root root
218
+ maxage 30
219
+ dateext
220
+ dateformat -%Y%m%d-%H%M%S
221
+ }
@@ -0,0 +1,172 @@
1
+ # Loki Configuration
2
+ # Task P2-2.3: Centralized Logging with ELK/Loki Stack
3
+ # Version: 2.9.0
4
+ #
5
+ # Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system
6
+ # inspired by Prometheus. It is designed to be very cost effective and easy to operate.
7
+
8
+ auth_enabled: false
9
+
10
+ ingester:
11
+ # Chunk-related settings for ingestion
12
+ chunk_idle_period: 3m
13
+ chunk_retain_period: 1m
14
+ max_chunk_age: 1h
15
+ chunk_encoding: snappy
16
+
17
+ # Performance tuning
18
+ max_streams_errors: 100
19
+ max_streams: 1000
20
+ max_stream_delay: 5s
21
+
22
+ # Flush settings
23
+ lifecycler:
24
+ ring:
25
+ kvstore:
26
+ store: inmemory
27
+ replication_factor: 1
28
+ num_tokens: 128
29
+ heartbeat_timeout: 5m
30
+ interface_names:
31
+ - eth0
32
+
33
+ limits_config:
34
+ # Enforce rate limiting per stream
35
+ rate_limit_bytes: 100MB
36
+ rate_limit_enabled: true
37
+
38
+ # Stream limits
39
+ max_entries_limit_per_second: 10000
40
+ max_streams_per_user: 10000
41
+
42
+ # Global retention policy: 30 days
43
+ retention_period: 720h # 720h = 30 days
44
+
45
+ # Split logs into multiple lines after this many characters
46
+ max_line_size: 256KB
47
+
48
+ # Cardinality limits
49
+ cardinality_limit: 100000
50
+ enforce_metric_name: false
51
+
52
+ schema_config:
53
+ configs:
54
+ - from: 2020-10-24
55
+ store: boltdb-shipper
56
+ object_store: filesystem
57
+ schema: v11
58
+ index:
59
+ prefix: index_
60
+ period: 24h
61
+
62
+ server:
63
+ http_listen_port: 3100
64
+ http_server_read_timeout: 600s
65
+ http_server_write_timeout: 600s
66
+ log_level: info
67
+
68
+ storage_config:
69
+ # Use filesystem storage for development
70
+ filesystem:
71
+ directory: /loki/chunks
72
+
73
+ # Index storage configuration
74
+ index_cache_validity: 5m
75
+ cache_config:
76
+ enable_fifocache: true
77
+ default_validity: 1h
78
+ background:
79
+ writeback_goroutines: 10
80
+ writeback_buffer: 10000
81
+ memcached:
82
+ batch_size: 1024
83
+ parallelism: 100
84
+
85
+ chunk_store_config:
86
+ # Maximum number of parallel workers processing chunks
87
+ max_look_back_period: 0s
88
+
89
+ # Cache config for the chunk store
90
+ cache_config:
91
+ enable_fifocache: true
92
+ default_validity: 1h
93
+
94
+ table_manager:
95
+ # Enable table manager for automatic table creation and retention
96
+ enabled: true
97
+
98
+ # Period for creation of new tables
99
+ poll_interval: 10m
100
+
101
+ # Retention period for old tables
102
+ retention_deletes_enabled: true
103
+ retention_period: 720h # 30 days
104
+
105
+ # Grace period before deleting tables
106
+ creation_grace_period: 10m
107
+
108
+ query_range:
109
+ # Cache config for query results
110
+ cache_config:
111
+ enable_fifocache: true
112
+ default_validity: 1m
113
+ background:
114
+ writeback_goroutines: 10
115
+ writeback_buffer: 10000
116
+
117
+ # Querier settings
118
+ querier:
119
+ # Max concurrent queries
120
+ max_concurrent: 100
121
+
122
+ # Query timeout
123
+ query_timeout: 2m
124
+
125
+ # Engine timeout
126
+ engine:
127
+ timeout: 2m
128
+
129
+ # Distributor settings
130
+ distributor:
131
+ # Rate limit
132
+ rate_limit_enabled: false
133
+
134
+ # Ring configuration
135
+ ring:
136
+ kvstore:
137
+ store: inmemory
138
+
139
+ # Compactor settings for log retention
140
+ compactor:
141
+ # Enable compaction
142
+ compaction_interval: 10m
143
+
144
+ # Number of workers
145
+ max_compaction_parallel_shards: 2
146
+
147
+ # Retention settings
148
+ retention_enabled: true
149
+ retention_delete_delay: 2h
150
+ retention_delete_worker_count: 150
151
+
152
+ # Working directory for temporary files
153
+ working_directory: /loki/compactor
154
+ shared_store: filesystem
155
+
156
+ runtime_config:
157
+ # Configuration file for runtime updates
158
+ # Useful for overrides without restart
159
+ file: /etc/loki/runtime.yaml
160
+ period: 10s
161
+
162
+ # Tracing configuration (optional)
163
+ # Uncomment to enable distributed tracing
164
+ # tracing:
165
+ # enabled: false
166
+
167
+ # Monitoring/Metrics
168
+ # The metrics below are exposed on port 3100 at /metrics
169
+ # Useful for Prometheus scraping
170
+ metrics:
171
+ enabled: true
172
+ namespace: loki
@@ -0,0 +1,107 @@
1
+ # Loki Retention Policy Configuration
2
+ # Task P2-2.3: Centralized Logging with ELK/Loki Stack
3
+ #
4
+ # This file defines the retention policies for logs stored in Loki.
5
+ # Logs older than the retention period are automatically deleted.
6
+
7
+ # Global retention settings
8
+ retention:
9
+ # Default retention period for all log entries
10
+ # Format: integer with unit (h=hours, d=days)
11
+ # 30 days = 720 hours
12
+ default_period: 720h
13
+
14
+ # Tenant-specific retention overrides (if using multi-tenant Loki)
15
+ # Uncomment and customize as needed
16
+ # overrides:
17
+ # tenant1: 1440h # 60 days for tenant1
18
+ # tenant2: 360h # 15 days for tenant2
19
+
20
+ # Compactor settings for retention enforcement
21
+ compactor:
22
+ # Enable automatic compaction
23
+ enabled: true
24
+
25
+ # How often to run the compaction process
26
+ compaction_interval: 10m
27
+
28
+ # Delete delay before marking chunks as ready for deletion
29
+ retention_delete_delay: 2h
30
+
31
+ # Number of workers that will delete marked chunks
32
+ retention_delete_worker_count: 150
33
+
34
+ # Working directory for temporary files
35
+ working_directory: /loki/compactor
36
+
37
+ # Which store to use (filesystem, s3, etc.)
38
+ shared_store: filesystem
39
+
40
+ # Table manager settings for automatic table cleanup
41
+ table_manager:
42
+ # Enable automatic table management
43
+ enabled: true
44
+
45
+ # How often to check and create/delete tables
46
+ poll_interval: 10m
47
+
48
+ # Enable retention enforcement
49
+ retention_deletes_enabled: true
50
+
51
+ # Retention period in hours (30 days)
52
+ retention_period: 720h
53
+
54
+ # Grace period before deleting tables
55
+ creation_grace_period: 10m
56
+
57
+ # Index configuration for retention
58
+ schema:
59
+ - from: 2020-10-24
60
+ store: boltdb-shipper
61
+ object_store: filesystem
62
+ schema: v11
63
+ index:
64
+ prefix: index_
65
+ period: 24h
66
+
67
+ # Deletion settings
68
+ deletion:
69
+ # How many hours before a chunk can be deleted
70
+ hours_until_deleted: 0
71
+
72
+ # How long a delete request stays active before being deleted
73
+ max_delete_request_age: 168h # 7 days
74
+
75
+ # Maximum number of parallel delete operations
76
+ max_delete_parallelism: 150
77
+
78
+ # Cleanup settings for expired logs
79
+ cleanup:
80
+ # Enable periodic cleanup
81
+ enabled: true
82
+
83
+ # How often to run cleanup
84
+ interval: 30m
85
+
86
+ # Skip logs that are still being written to
87
+ skip_recent: true
88
+
89
+ # Keep logs younger than this duration
90
+ keep_duration: 24h
91
+
92
+ # Tier configuration for storage optimization
93
+ tiers:
94
+ # Frequently accessed logs (hot)
95
+ - name: hot
96
+ period: 24h
97
+ delete_after: 2h
98
+
99
+ # Medium-term logs (warm)
100
+ - name: warm
101
+ period: 7d
102
+ delete_after: 1d
103
+
104
+ # Old logs (cold) - minimal access
105
+ - name: cold
106
+ period: 30d
107
+ delete_after: 30d
@@ -0,0 +1,152 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "description": "MCP server configuration for specialized tool access",
4
+ "lastUpdated": "2025-06-17",
5
+ "servers": {
6
+ "playwright": {
7
+ "endpoint": "http://mcp-playwright:8081",
8
+ "required_skills": ["browser-automation", "testing", "screenshot-capture", "accessibility-testing"],
9
+ "auth": {
10
+ "type": "token",
11
+ "header": "X-MCP-Token"
12
+ },
13
+ "health_check": "/health",
14
+ "timeout_ms": 30000,
15
+ "retry_attempts": 3,
16
+ "resource_limits": {
17
+ "max_memory_mb": 512,
18
+ "max_cpu_percent": 50,
19
+ "max_concurrent_sessions": 3
20
+ },
21
+ "capabilities": [
22
+ "browser_automation",
23
+ "screenshot_capture",
24
+ "page_interaction",
25
+ "accessibility_testing",
26
+ "performance_testing"
27
+ ]
28
+ },
29
+ "redis-tools": {
30
+ "endpoint": "http://mcp-redis-tools:8082",
31
+ "required_skills": ["redis-operations", "database-management", "caching"],
32
+ "auth": {
33
+ "type": "token",
34
+ "header": "X-MCP-Token"
35
+ },
36
+ "health_check": "/health",
37
+ "timeout_ms": 15000,
38
+ "retry_attempts": 3,
39
+ "resource_limits": {
40
+ "max_memory_mb": 256,
41
+ "max_cpu_percent": 25,
42
+ "max_connections": 10
43
+ },
44
+ "capabilities": [
45
+ "redis_operations",
46
+ "key_value_management",
47
+ "cache_analysis",
48
+ "performance_monitoring",
49
+ "data_migration"
50
+ ]
51
+ },
52
+ "n8n": {
53
+ "endpoint": "http://mcp-n8n:8083",
54
+ "required_skills": ["workflow-automation", "api-integration", "data-pipeline"],
55
+ "auth": {
56
+ "type": "token",
57
+ "header": "X-MCP-Token"
58
+ },
59
+ "health_check": "/healthz",
60
+ "timeout_ms": 45000,
61
+ "retry_attempts": 2,
62
+ "resource_limits": {
63
+ "max_memory_mb": 1024,
64
+ "max_cpu_percent": 75,
65
+ "max_workflows": 5
66
+ },
67
+ "capabilities": [
68
+ "workflow_automation",
69
+ "api_integration",
70
+ "data_transformation",
71
+ "scheduled_tasks",
72
+ "webhook_handling"
73
+ ]
74
+ },
75
+ "security-scanner": {
76
+ "endpoint": "http://mcp-security-scanner:8084",
77
+ "required_skills": ["security-auditing", "vulnerability-scanning", "compliance-checking"],
78
+ "auth": {
79
+ "type": "token",
80
+ "header": "X-MCP-Token"
81
+ },
82
+ "health_check": "/health",
83
+ "timeout_ms": 120000,
84
+ "retry_attempts": 1,
85
+ "resource_limits": {
86
+ "max_memory_mb": 2048,
87
+ "max_cpu_percent": 80,
88
+ "max_scan_duration": 600000
89
+ },
90
+ "capabilities": [
91
+ "vulnerability_scanning",
92
+ "dependency_analysis",
93
+ "code_security_audit",
94
+ "compliance_checking",
95
+ "threat_modeling"
96
+ ]
97
+ }
98
+ },
99
+ "global_settings": {
100
+ "default_timeout_ms": 30000,
101
+ "max_retry_attempts": 3,
102
+ "connection_pool_size": 10,
103
+ "health_check_interval_ms": 30000,
104
+ "circuit_breaker_threshold": 5,
105
+ "metrics_enabled": true,
106
+ "logging": {
107
+ "level": "info",
108
+ "format": "json",
109
+ "include_sensitive_data": false
110
+ },
111
+ "security": {
112
+ "token_refresh_interval_ms": 3600000,
113
+ "max_token_age_ms": 86400000,
114
+ "rate_limiting": {
115
+ "requests_per_minute": 100,
116
+ "burst_size": 20
117
+ }
118
+ }
119
+ },
120
+ "skill_to_mcp_mapping": {
121
+ "browser-automation": ["playwright"],
122
+ "testing": ["playwright"],
123
+ "screenshot-capture": ["playwright"],
124
+ "accessibility-testing": ["playwright"],
125
+ "redis-operations": ["redis-tools"],
126
+ "database-management": ["redis-tools"],
127
+ "caching": ["redis-tools"],
128
+ "workflow-automation": ["n8n"],
129
+ "api-integration": ["n8n"],
130
+ "data-pipeline": ["n8n"],
131
+ "security-auditing": ["security-scanner"],
132
+ "vulnerability-scanning": ["security-scanner"],
133
+ "compliance-checking": ["security-scanner"],
134
+ "penetration-testing": ["security-scanner"],
135
+ "threat-analysis": ["security-scanner"]
136
+ },
137
+ "network_configuration": {
138
+ "mcp_network": {
139
+ "name": "mcp-network",
140
+ "subnet": "172.31.0.0/16",
141
+ "isolated": true,
142
+ "allowed_egress": ["cfn-network", "internet"]
143
+ }
144
+ },
145
+ "monitoring": {
146
+ "prometheus_metrics": true,
147
+ "health_check_endpoints": true,
148
+ "performance_tracking": true,
149
+ "error_reporting": true,
150
+ "alert_channels": ["redis-coordinator"]
151
+ }
152
+ }
@@ -0,0 +1,72 @@
1
+ # Claude Flow Novice - Production Configuration Override
2
+ # This file merges with config/default.yml
3
+ # Only specify values that differ from default
4
+
5
+ # Database - PostgreSQL for production
6
+ database:
7
+ type: postgres
8
+ host: db.production.local
9
+ port: 5432
10
+ name: cfn_production
11
+ username: cfn_prod_user
12
+ password: ${DB_PASSWORD} # Set via environment variable
13
+ pool:
14
+ min: 5
15
+ max: 50
16
+ ssl: true
17
+
18
+ # Redis - Production cluster
19
+ redis:
20
+ enabled: true
21
+ host: redis.production.local
22
+ port: 6380
23
+ password: ${REDIS_PASSWORD}
24
+ ttl: 172800 # 48 hours
25
+
26
+ # Agents - Higher capacity for production
27
+ agents:
28
+ maxConcurrent: 50
29
+ timeout: 600 # 10 minutes
30
+ retryAttempts: 5
31
+ defaultStrategy: production
32
+ logLevel: warn
33
+
34
+ # Logging - File output with rotation
35
+ logging:
36
+ level: warn
37
+ format: json
38
+ output: both
39
+ file:
40
+ path: /var/log/cfn/production.log
41
+ maxSize: 100m
42
+ maxFiles: 30
43
+
44
+ # Security - Strict settings
45
+ security:
46
+ enabled: true
47
+ apiKeyRequired: true
48
+ rateLimiting:
49
+ enabled: true
50
+ maxRequests: 1000
51
+ windowMs: 60000
52
+ allowedOrigins:
53
+ - https://app.production.com
54
+ - https://dashboard.production.com
55
+
56
+ # Monitoring - Full observability
57
+ monitoring:
58
+ enabled: true
59
+ prometheus:
60
+ enabled: true
61
+ port: 9090
62
+ path: /metrics
63
+ healthCheck:
64
+ enabled: true
65
+ port: 8080
66
+ path: /health
67
+
68
+ # Features
69
+ features:
70
+ hotReload: false # Disabled in production for stability
71
+ customRouting: true
72
+ experimentalFeatures: false