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,496 @@
1
+ _format_version: "3.0"
2
+
3
+ # Transform metadata for distributed Kong deployment
4
+ _transform: true
5
+
6
+ # Database configuration (for production use)
7
+ database:
8
+ host: ${KONG_DATABASE_HOST:-kong-database}
9
+ port: ${KONG_DATABASE_PORT:-5432}
10
+ user: ${KONG_DATABASE_USER:-kong}
11
+ password: ${KONG_DATABASE_PASSWORD:-kong_pass}
12
+ database: ${KONG_DATABASE_NAME:-kong}
13
+
14
+ # Services (upstream APIs) for CFN Loop system
15
+ services:
16
+ - name: orchestrator-service
17
+ url: http://orchestrator:3000
18
+ protocol: http
19
+ connect_timeout: 60000
20
+ write_timeout: 60000
21
+ read_timeout: 60000
22
+ retries: 5
23
+ tags:
24
+ - production
25
+ - core
26
+ - v1
27
+
28
+ - name: agent-pool-service
29
+ url: http://agent-pool:3000
30
+ protocol: http
31
+ connect_timeout: 60000
32
+ write_timeout: 60000
33
+ read_timeout: 60000
34
+ retries: 5
35
+ tags:
36
+ - production
37
+ - workers
38
+ - v1
39
+
40
+ - name: prometheus-service
41
+ url: http://prometheus:9090
42
+ protocol: http
43
+ connect_timeout: 30000
44
+ write_timeout: 30000
45
+ read_timeout: 30000
46
+ retries: 3
47
+ tags:
48
+ - production
49
+ - monitoring
50
+
51
+ - name: grafana-service
52
+ url: http://grafana:3000
53
+ protocol: http
54
+ connect_timeout: 30000
55
+ write_timeout: 30000
56
+ read_timeout: 30000
57
+ retries: 3
58
+ tags:
59
+ - production
60
+ - monitoring
61
+
62
+ - name: redis-coordinator-service
63
+ url: http://redis-coordinator:6379
64
+ protocol: tcp
65
+ connect_timeout: 30000
66
+ retries: 3
67
+ tags:
68
+ - production
69
+ - coordination
70
+
71
+ # Routes (external endpoints)
72
+ routes:
73
+ - name: orchestrator-api-routes
74
+ service: orchestrator-service
75
+ protocols:
76
+ - http
77
+ - https
78
+ methods:
79
+ - GET
80
+ - POST
81
+ - PUT
82
+ - DELETE
83
+ - OPTIONS
84
+ paths:
85
+ - /api/v1/orchestrator
86
+ - /api/v1/agents
87
+ - /api/v1/tasks
88
+ - /api/v1/coordination
89
+ strip_path: false
90
+ preserve_host: false
91
+ tags:
92
+ - core-api
93
+ - authenticated
94
+
95
+ - name: monitoring-api-routes
96
+ service: prometheus-service
97
+ protocols:
98
+ - https
99
+ methods:
100
+ - GET
101
+ paths:
102
+ - /api/v1/metrics
103
+ - /api/v1/prometheus
104
+ strip_path: false
105
+ tags:
106
+ - monitoring-api
107
+ - restricted
108
+
109
+ - name: dashboard-routes
110
+ service: grafana-service
111
+ protocols:
112
+ - https
113
+ methods:
114
+ - GET
115
+ - POST
116
+ paths:
117
+ - /dashboard
118
+ - /grafana
119
+ strip_path: false
120
+ tags:
121
+ - dashboard
122
+ - authenticated
123
+
124
+ - name: health-check-routes
125
+ service: orchestrator-service
126
+ protocols:
127
+ - http
128
+ - https
129
+ methods:
130
+ - GET
131
+ paths:
132
+ - /health
133
+ - /api/v1/health
134
+ - /status
135
+ strip_path: false
136
+ tags:
137
+ - health
138
+ - public
139
+
140
+ # Global plugins configuration
141
+ plugins:
142
+ # Rate limiting (global)
143
+ - name: rate-limiting
144
+ config:
145
+ minute: 100
146
+ hour: 10000
147
+ day: 100000
148
+ policy: cluster
149
+ fault_tolerant: true
150
+ hide_client_headers: false
151
+ tags:
152
+ - global
153
+
154
+ # CORS (global)
155
+ - name: cors
156
+ config:
157
+ origins:
158
+ - "https://app.example.com"
159
+ - "https://dashboard.example.com"
160
+ - "http://localhost:3000"
161
+ - "http://localhost:3001"
162
+ methods:
163
+ - GET
164
+ - POST
165
+ - PUT
166
+ - DELETE
167
+ - OPTIONS
168
+ - PATCH
169
+ headers:
170
+ - Accept
171
+ - Accept-Version
172
+ - Authorization
173
+ - Content-Type
174
+ - Content-MD5
175
+ - Cache-Control
176
+ - X-Requested-With
177
+ - X-API-Key
178
+ - X-Gateway-Request-ID
179
+ exposed_headers:
180
+ - X-Auth-Token
181
+ - X-Rate-Limit-Limit
182
+ - X-Rate-Limit-Remaining
183
+ - X-Rate-Limit-Reset
184
+ - X-Response-Time
185
+ - X-Cache-Status
186
+ credentials: true
187
+ max_age: 3600
188
+ preflight_continue: false
189
+ tags:
190
+ - global
191
+
192
+ # Request ID generator
193
+ - name: request-id
194
+ config:
195
+ generator: "uuid#counter"
196
+ header_name: "X-Gateway-Request-ID"
197
+ echo_request_id: true
198
+ tags:
199
+ - global
200
+
201
+ # Request size limiting
202
+ - name: request-size-limiting
203
+ config:
204
+ allowed_payload_size: 10 # 10MB
205
+ tags:
206
+ - global
207
+
208
+ # IP restriction (for sensitive endpoints)
209
+ - name: ip-restriction
210
+ route: monitoring-api-routes
211
+ config:
212
+ allow:
213
+ - 172.30.0.0/16 # cfn-network
214
+ - 172.31.0.0/16 # mcp-network
215
+ - 127.0.0.1
216
+ deny:
217
+ - 0.0.0.0/0
218
+ tags:
219
+ - security
220
+
221
+ # JWT Authentication (for core APIs)
222
+ - name: jwt
223
+ service: orchestrator-service
224
+ config:
225
+ key_claim_name: "kid"
226
+ secret_is_base64: false
227
+ claims_to_verify:
228
+ - exp
229
+ - nbf
230
+ - iat
231
+ uri_param_names:
232
+ - jwt
233
+ cookie_names:
234
+ - gateway_jwt
235
+ tags:
236
+ - authentication
237
+
238
+ # API Key authentication (for external access)
239
+ - name: key-auth
240
+ service: prometheus-service
241
+ config:
242
+ key_names:
243
+ - apikey
244
+ - X-API-Key
245
+ hide_credentials: false
246
+ tags:
247
+ - authentication
248
+
249
+ # ACL (Access Control List)
250
+ - name: acl
251
+ service: orchestrator-service
252
+ config:
253
+ allow:
254
+ - admin
255
+ - orchestrator
256
+ - agent-pool
257
+ - monitoring
258
+ deny:
259
+ - blocked
260
+ hide_groups_header: false
261
+ tags:
262
+ - authorization
263
+
264
+ # Request transformer (add headers)
265
+ - name: request-transformer
266
+ service: orchestrator-service
267
+ config:
268
+ add:
269
+ headers:
270
+ - X-Gateway: kong
271
+ - X-Forwarded-Proto: https
272
+ - X-Gateway-Version: 3.0
273
+ - X-Request-Start: ${start_time}
274
+ remove:
275
+ headers:
276
+ - X-Internal-Secret
277
+ - X-Debug-Info
278
+ tags:
279
+ - transformation
280
+
281
+ # Response transformer
282
+ - name: response-transformer
283
+ service: orchestrator-service
284
+ config:
285
+ add:
286
+ headers:
287
+ - X-Response-Time: ${latency}
288
+ - X-Cache-Status: ${cache_status}
289
+ - X-Gateway-Response-ID: ${request_id}
290
+ tags:
291
+ - transformation
292
+
293
+ # Prometheus metrics
294
+ - name: prometheus
295
+ config:
296
+ per_consumer: true
297
+ status_code_metrics: true
298
+ latency_metrics: true
299
+ bandwidth_metrics: true
300
+ upstream_health_metrics: true
301
+ tags:
302
+ - metrics
303
+
304
+ # Zipkin tracing
305
+ - name: zipkin
306
+ config:
307
+ http_endpoint: http://zipkin:9411/api/v2/spans
308
+ sample_ratio: 0.1
309
+ include_service_name_in_header: true
310
+ tags:
311
+ - tracing
312
+
313
+ # Consumers (API clients)
314
+ consumers:
315
+ - username: orchestrator-client
316
+ custom_id: orchestrator-v1
317
+ tags:
318
+ - internal
319
+ - core
320
+ jwt_secrets:
321
+ - key: orchestrator-key-1
322
+ algorithm: HS256
323
+ secret: ${ORCHESTRATOR_JWT_SECRET}
324
+ acls:
325
+ - group: orchestrator
326
+
327
+ - username: agent-pool-client
328
+ custom_id: agent-pool-v1
329
+ tags:
330
+ - internal
331
+ - workers
332
+ jwt_secrets:
333
+ - key: agent-pool-key-1
334
+ algorithm: HS256
335
+ secret: ${AGENT_POOL_JWT_SECRET}
336
+ acls:
337
+ - group: agent-pool
338
+
339
+ - username: monitoring-client
340
+ custom_id: monitoring-v1
341
+ tags:
342
+ - internal
343
+ - monitoring
344
+ keyauth_credentials:
345
+ - key: ${MONITORING_API_KEY}
346
+ acls:
347
+ - group: monitoring
348
+
349
+ - username: admin-client
350
+ custom_id: admin-v1
351
+ tags:
352
+ - admin
353
+ jwt_secrets:
354
+ - key: admin-key-1
355
+ algorithm: HS256
356
+ secret: ${ADMIN_JWT_SECRET}
357
+ acls:
358
+ - group: admin
359
+
360
+ - username: external-api-client
361
+ custom_id: external-v1
362
+ tags:
363
+ - external
364
+ keyauth_credentials:
365
+ - key: ${EXTERNAL_API_KEY}
366
+ plugins:
367
+ - name: rate-limiting-advanced
368
+ config:
369
+ limit:
370
+ - 1000 # requests per hour
371
+ - 5000 # requests per day
372
+ window_size:
373
+ - 3600 # 1 hour
374
+ - 86400 # 1 day
375
+ window_type: sliding
376
+ identifier: consumer
377
+ strategy: cluster
378
+ sync_rate: 0.5
379
+
380
+ # Upstreams (load balancing)
381
+ upstreams:
382
+ - name: orchestrator-upstream
383
+ algorithm: round-robin
384
+ hash_on: none
385
+ hash_fallback: none
386
+ slots: 10000
387
+ healthchecks:
388
+ active:
389
+ https_verify_certificate: false
390
+ healthy:
391
+ interval: 10
392
+ successes: 3
393
+ unhealthy:
394
+ interval: 10
395
+ http_failures: 3
396
+ timeouts: 3
397
+ tcp_failures: 3
398
+ passive:
399
+ healthy:
400
+ http_statuses:
401
+ - 200
402
+ - 201
403
+ - 202
404
+ - 203
405
+ - 204
406
+ successes: 5
407
+ unhealthy:
408
+ http_statuses:
409
+ - 429
410
+ - 500
411
+ - 502
412
+ - 503
413
+ - 504
414
+ http_failures: 3
415
+ tcp_failures: 3
416
+ timeouts: 3
417
+ tags:
418
+ - production
419
+ - core
420
+
421
+ - name: agent-pool-upstream
422
+ algorithm: least-connections
423
+ hash_on: none
424
+ hash_fallback: none
425
+ slots: 10000
426
+ healthchecks:
427
+ active:
428
+ healthy:
429
+ interval: 5
430
+ successes: 2
431
+ unhealthy:
432
+ interval: 5
433
+ http_failures: 2
434
+ timeouts: 2
435
+ passive:
436
+ healthy:
437
+ http_statuses:
438
+ - 200
439
+ - 201
440
+ - 202
441
+ successes: 3
442
+ unhealthy:
443
+ http_statuses:
444
+ - 500
445
+ - 503
446
+ http_failures: 3
447
+ tags:
448
+ - production
449
+ - workers
450
+
451
+ # Targets (upstream servers)
452
+ targets:
453
+ - target: orchestrator:3000
454
+ weight: 100
455
+ upstream: orchestrator-upstream
456
+ tags:
457
+ - primary
458
+
459
+ - target: agent-pool-1:3000
460
+ weight: 100
461
+ upstream: agent-pool-upstream
462
+ tags:
463
+ - worker-1
464
+
465
+ - target: agent-pool-2:3000
466
+ weight: 100
467
+ upstream: agent-pool-upstream
468
+ tags:
469
+ - worker-2
470
+
471
+ - target: agent-pool-3:3000
472
+ weight: 100
473
+ upstream: agent-pool-upstream
474
+ tags:
475
+ - worker-3
476
+
477
+ # Certificates
478
+ certificates:
479
+ - cert: ${KONG_SSL_CERT}
480
+ key: ${KONG_SSL_KEY}
481
+ tags:
482
+ - production
483
+ snis:
484
+ - api.example.com
485
+ - gateway.example.com
486
+ - kong.example.com
487
+
488
+ # Service discovery for dynamic environments
489
+ services:
490
+ - name: docker-registry-service
491
+ url: http://registry:5000
492
+ plugins:
493
+ - name: file-log
494
+ config:
495
+ path: /var/log/kong/docker-registry.log
496
+ reopen: false
@@ -0,0 +1,49 @@
1
+ # Kong Prometheus Configuration
2
+ # Metrics collection for Kong API Gateway
3
+
4
+ global:
5
+ scrape_interval: 15s
6
+ evaluation_interval: 15s
7
+
8
+ rule_files:
9
+ # - "first_rules.yml"
10
+ # - "second_rules.yml"
11
+
12
+ scrape_configs:
13
+ # Kong Gateway Metrics
14
+ - job_name: 'kong-gateway'
15
+ static_configs:
16
+ - targets: ['kong:8001']
17
+ metrics_path: /metrics
18
+ scrape_interval: 15s
19
+ scrape_timeout: 10s
20
+
21
+ # Kong Database Metrics
22
+ - job_name: 'kong-database'
23
+ static_configs:
24
+ - targets: ['kong-database:5432']
25
+ scrape_interval: 30s
26
+
27
+ # Kong Redis Metrics
28
+ - job_name: 'kong-redis'
29
+ static_configs:
30
+ - targets: ['kong-redis:6379']
31
+ scrape_interval: 15s
32
+
33
+ # Node Exporter (for system metrics)
34
+ - job_name: 'node-exporter'
35
+ static_configs:
36
+ - targets: ['node-exporter:9100']
37
+ scrape_interval: 15s
38
+
39
+ # Prometheus itself
40
+ - job_name: 'prometheus'
41
+ static_configs:
42
+ - targets: ['localhost:9090']
43
+
44
+ # Alerting
45
+ alerting:
46
+ alertmanagers:
47
+ - static_configs:
48
+ - targets:
49
+ # - alertmanager:9093