@kici-dev/engine 0.4.0 → 0.6.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.
Files changed (81) hide show
  1. package/dist/audit/access-log-policy.js +1 -0
  2. package/dist/audit/retention-policy.js +2 -0
  3. package/dist/context/held-run-job-id.d.ts +26 -10
  4. package/dist/context/held-run-job-id.js +30 -11
  5. package/dist/context/host-match.js +2 -1
  6. package/dist/context/index.d.ts +1 -1
  7. package/dist/context/index.js +3 -3
  8. package/dist/context/types.d.ts +10 -1
  9. package/dist/context/types.js +10 -1
  10. package/dist/index.d.ts +6 -2
  11. package/dist/index.js +17 -12
  12. package/dist/labels/compile.d.ts +2 -7
  13. package/dist/labels/compile.js +1 -10
  14. package/dist/labels.d.ts +74 -12
  15. package/dist/labels.js +82 -17
  16. package/dist/mcp/held-run-resolve.d.ts +40 -0
  17. package/dist/mcp/held-run-resolve.js +68 -15
  18. package/dist/mcp/tool-schemas.d.ts +4 -0
  19. package/dist/mcp/tool-schemas.js +13 -1
  20. package/dist/metrics/catalog-policy.d.ts +17 -3
  21. package/dist/metrics/catalog-policy.js +44 -13
  22. package/dist/metrics/metric-catalog.generated.d.ts +140 -0
  23. package/dist/metrics/metric-catalog.generated.js +168 -0
  24. package/dist/protocol/dashboard-global-workflows.js +2 -2
  25. package/dist/protocol/event-log-payload.js +1 -1
  26. package/dist/protocol/messages/access-log.d.ts +5 -0
  27. package/dist/protocol/messages/access-log.js +1 -0
  28. package/dist/protocol/messages/actor.d.ts +13 -2
  29. package/dist/protocol/messages/actor.js +16 -5
  30. package/dist/protocol/messages/common.js +1 -1
  31. package/dist/protocol/messages/dashboard-global-workflows.d.ts +29 -3
  32. package/dist/protocol/messages/dashboard-global-workflows.js +48 -4
  33. package/dist/protocol/messages/dashboard.d.ts +48 -7
  34. package/dist/protocol/messages/dashboard.js +62 -6
  35. package/dist/protocol/messages/execution-status.d.ts +44 -0
  36. package/dist/protocol/messages/execution-status.js +69 -2
  37. package/dist/protocol/messages/git-credential-relay.d.ts +78 -0
  38. package/dist/protocol/messages/git-credential-relay.js +86 -0
  39. package/dist/protocol/messages/orchestrator-agent.d.ts +138 -0
  40. package/dist/protocol/messages/orchestrator-agent.js +131 -3
  41. package/dist/protocol/messages/peer.d.ts +7 -0
  42. package/dist/protocol/messages/peer.js +18 -1
  43. package/dist/protocol/messages/platform-orchestrator.d.ts +155 -2
  44. package/dist/protocol/messages/platform-orchestrator.js +178 -19
  45. package/dist/protocol/version.d.ts +19 -2
  46. package/dist/protocol/version.js +20 -3
  47. package/dist/provenance/verify.js +11 -10
  48. package/dist/provider/check-status-poster.d.ts +37 -2
  49. package/dist/provider/contributor-resolver.d.ts +11 -3
  50. package/dist/provider/file-contents-fetcher.d.ts +39 -0
  51. package/dist/provider/file-contents-fetcher.js +2 -0
  52. package/dist/provider/git-credential.d.ts +77 -0
  53. package/dist/provider/git-credential.js +10 -0
  54. package/dist/provider/index.d.ts +4 -0
  55. package/dist/provider/index.js +2 -1
  56. package/dist/provider/webhook-normalizer.d.ts +12 -12
  57. package/dist/repo/pattern-negation.d.ts +73 -0
  58. package/dist/repo/pattern-negation.js +86 -0
  59. package/dist/safe-regex.d.ts +16 -0
  60. package/dist/safe-regex.js +24 -0
  61. package/dist/scaler/registry-auth.d.ts +18 -0
  62. package/dist/scaler/registry-auth.js +28 -0
  63. package/dist/scaler/scaler-backend-type.d.ts +35 -0
  64. package/dist/scaler/scaler-backend-type.js +39 -2
  65. package/dist/scaler/scaler-events.d.ts +79 -0
  66. package/dist/scaler/scaler-events.js +87 -0
  67. package/dist/trigger/compiled-matchers.d.ts +21 -1
  68. package/dist/trigger/compiled-matchers.js +30 -3
  69. package/dist/trigger/content-requirements.d.ts +31 -0
  70. package/dist/trigger/content-requirements.js +125 -0
  71. package/dist/trigger/decision-trace.d.ts +168 -0
  72. package/dist/trigger/decision-trace.js +207 -4
  73. package/dist/trigger/jsonpath-matcher.js +5 -1
  74. package/dist/trigger/matcher.js +61 -10
  75. package/dist/trigger/text-match.d.ts +27 -0
  76. package/dist/trigger/text-match.js +86 -0
  77. package/dist/trigger/types.d.ts +265 -23
  78. package/dist/trigger/types.js +37 -5
  79. package/dist/ws/rate-limiter.js +3 -3
  80. package/package.json +20 -3
  81. package/sbom.spdx.json +40 -15
@@ -1,6 +1,8 @@
1
1
  import "../rolldown-runtime-ClRpJifh.js";
2
2
  //#region src/metrics/metric-catalog.generated.ts
3
3
  const MetricNames = {
4
+ KICI_AGENT_BETWEEN_JOBS_RESET_DURATION_SECONDS: "kici_agent_between_jobs_reset_duration_seconds",
5
+ KICI_AGENT_BETWEEN_JOBS_RESET_TOTAL: "kici_agent_between_jobs_reset_total",
4
6
  KICI_AGENT_CLONE_DURATION_SECONDS: "kici_agent_clone_duration_seconds",
5
7
  KICI_AGENT_CONNECTION_STATUS: "kici_agent_connection_status",
6
8
  KICI_AGENT_JOBS_ACTIVE: "kici_agent_jobs_active",
@@ -9,6 +11,8 @@ const MetricNames = {
9
11
  KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "kici_agent_log_backpressure_events_total",
10
12
  KICI_AGENT_LOG_BYTES_TOTAL: "kici_agent_log_bytes_total",
11
13
  KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "kici_agent_log_lines_dropped_total",
14
+ KICI_AGENT_ORPHAN_CLEANUP_TOTAL: "kici_agent_orphan_cleanup_total",
15
+ KICI_AGENT_ORPHANS_REAPED_TOTAL: "kici_agent_orphans_reaped_total",
12
16
  KICI_AGENT_STEP_DURATION_SECONDS: "kici_agent_step_duration_seconds",
13
17
  KICI_AGENT_STEPS_TOTAL: "kici_agent_steps_total",
14
18
  KICI_BILLING_EMAIL_SEND_TOTAL: "kici_billing_email_send_total",
@@ -38,6 +42,7 @@ const MetricNames = {
38
42
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "kici_orch_dispatch_queue_depth_by_label",
39
43
  KICI_ORCH_DISPATCH_QUEUE_ROWS_PRUNED_TOTAL: "kici_orch_dispatch_queue_rows_pruned_total",
40
44
  KICI_ORCH_EVENT_ATTEMPTS: "kici_orch_event_attempts",
45
+ KICI_ORCH_EVENT_CATCH_UP_FAILURES_TOTAL: "kici_orch_event_catch_up_failures_total",
41
46
  KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "kici_orch_event_dispatch_success_total",
42
47
  KICI_ORCH_EVENT_DLQ_DEPTH: "kici_orch_event_dlq_depth",
43
48
  KICI_ORCH_EVENT_DLQ_TOTAL: "kici_orch_event_dlq_total",
@@ -45,7 +50,13 @@ const MetricNames = {
45
50
  KICI_ORCH_EVENT_RETRY_TOTAL: "kici_orch_event_retry_total",
46
51
  KICI_ORCH_EXECUTION_DURATION_SECONDS: "kici_orch_execution_duration_seconds",
47
52
  KICI_ORCH_EXECUTIONS_TOTAL: "kici_orch_executions_total",
53
+ KICI_ORCH_FORK_EVENTS_IGNORED_TOTAL: "kici_orch_fork_events_ignored_total",
48
54
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "kici_orch_github_check_run_total",
55
+ KICI_ORCH_GLOBAL_EVAL_CACHE_LOOKUPS_TOTAL: "kici_orch_global_eval_cache_lookups_total",
56
+ KICI_ORCH_GLOBAL_EVAL_CANDIDATES_TOTAL: "kici_orch_global_eval_candidates_total",
57
+ KICI_ORCH_GLOBAL_EVAL_JOBS_GENERATED: "kici_orch_global_eval_jobs_generated",
58
+ KICI_ORCH_GLOBAL_EVAL_ROUND_DURATION_SECONDS: "kici_orch_global_eval_round_duration_seconds",
59
+ KICI_ORCH_GLOBAL_EVAL_VERDICTS_TOTAL: "kici_orch_global_eval_verdicts_total",
49
60
  KICI_ORCH_INGEST_ADMITTED_TOTAL: "kici_orch_ingest_admitted_total",
50
61
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_MAX_MS: "kici_orch_ingest_event_loop_delay_max_ms",
51
62
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_P99_MS: "kici_orch_ingest_event_loop_delay_p99_ms",
@@ -78,12 +89,25 @@ const MetricNames = {
78
89
  KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "kici_orch_pending_attestations_current",
79
90
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_orch_pg_pool_client_errors_total",
80
91
  KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "kici_orch_rejected_attestations_current",
92
+ KICI_ORCH_SCALER_ADOPTION_LOOKUP_FAILURES_TOTAL: "kici_orch_scaler_adoption_lookup_failures_total",
93
+ KICI_ORCH_SCALER_CAP_LOCK_FAILURES_TOTAL: "kici_orch_scaler_cap_lock_failures_total",
81
94
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "kici_orch_scaler_config_reloads_total",
82
95
  KICI_ORCH_SCALER_CPUS_USED: "kici_orch_scaler_cpus_used",
96
+ KICI_ORCH_SCALER_EXTERNAL_PROVISION_TIMEOUT_TOTAL: "kici_orch_scaler_external_provision_timeout_total",
97
+ KICI_ORCH_SCALER_EXTERNAL_PROVISIONING_ACTIVE: "kici_orch_scaler_external_provisioning_active",
83
98
  KICI_ORCH_SCALER_MEMORY_BYTES_USED: "kici_orch_scaler_memory_bytes_used",
99
+ KICI_ORCH_SCALER_REAP_BLOCKED: "kici_orch_scaler_reap_blocked",
100
+ KICI_ORCH_SCALER_REAP_UNSEEN_PROVISIONS: "kici_orch_scaler_reap_unseen_provisions",
84
101
  KICI_ORCH_SCALER_REDISPATCH_TOTAL: "kici_orch_scaler_redispatch_total",
102
+ KICI_ORCH_SCALER_SCALE_DOWN_EMITTED_TOTAL: "kici_orch_scaler_scale_down_emitted_total",
103
+ KICI_ORCH_SCALER_SCALE_UP_EMITTED_TOTAL: "kici_orch_scaler_scale_up_emitted_total",
85
104
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: "kici_orch_scaler_spawn_failures_total",
86
105
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "kici_orch_scaler_spawn_refusals_total",
106
+ KICI_ORCH_SCALER_WARM_POOL_IN_FLIGHT: "kici_orch_scaler_warm_pool_in_flight",
107
+ KICI_ORCH_SCALER_WARM_POOL_READY: "kici_orch_scaler_warm_pool_ready",
108
+ KICI_ORCH_SCALER_WARM_POOL_REAPED_TOTAL: "kici_orch_scaler_warm_pool_reaped_total",
109
+ KICI_ORCH_SCALER_WARM_POOL_SPAWNS_TOTAL: "kici_orch_scaler_warm_pool_spawns_total",
110
+ KICI_ORCH_SCALER_WARM_POOL_TARGET: "kici_orch_scaler_warm_pool_target",
87
111
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "kici_orch_source_cache_hits_total",
88
112
  KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "kici_orch_source_cache_misses_total",
89
113
  KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "kici_orch_stale_detection_duration_seconds",
@@ -96,6 +120,7 @@ const MetricNames = {
96
120
  KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "kici_orch_trust_match_refused_no_id_total",
97
121
  KICI_ORCH_TRUST_POLICY_DECISIONS_TOTAL: "kici_orch_trust_policy_decisions_total",
98
122
  KICI_ORCH_UNROUTABLE_FAST_FAILED_TOTAL: "kici_orch_unroutable_fast_failed_total",
123
+ KICI_ORCH_WEBHOOK_PIPELINE_FAILURES_TOTAL: "kici_orch_webhook_pipeline_failures_total",
99
124
  KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "kici_orch_webhooks_processed_total",
100
125
  KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "kici_orch_webhooks_received_total",
101
126
  KICI_ORCH_WS_NACK_RECEIVED_TOTAL: "kici_orch_ws_nack_received_total",
@@ -134,6 +159,9 @@ const MetricNames = {
134
159
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "kici_platform_log_lines_forwarded_total",
135
160
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "kici_platform_metrics_query_rate_limited_total",
136
161
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "kici_platform_mimir_relay_errors_total",
162
+ KICI_PLATFORM_MIMIR_RELAY_FINAL_DROPS_TOTAL: "kici_platform_mimir_relay_final_drops_total",
163
+ KICI_PLATFORM_MIMIR_RELAY_RETRIES_TOTAL: "kici_platform_mimir_relay_retries_total",
164
+ KICI_PLATFORM_MIMIR_RELAY_SHED_TOTAL: "kici_platform_mimir_relay_shed_total",
137
165
  KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "kici_platform_notifications_delivered_total",
138
166
  KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "kici_platform_notifications_suppressed_total",
139
167
  KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "kici_platform_orch_metrics_filtered_total",
@@ -202,6 +230,8 @@ const MetricNames = {
202
230
  V8JS_RESOURCE_ACTIVE: "v8js.resource.active"
203
231
  };
204
232
  const MetricLabels = {
233
+ KICI_AGENT_BETWEEN_JOBS_RESET_DURATION_SECONDS: ["scaler"],
234
+ KICI_AGENT_BETWEEN_JOBS_RESET_TOTAL: ["status", "scaler"],
205
235
  KICI_AGENT_CLONE_DURATION_SECONDS: ["scaler"],
206
236
  KICI_AGENT_CONNECTION_STATUS: ["scaler"],
207
237
  KICI_AGENT_JOBS_ACTIVE: ["scaler"],
@@ -210,6 +240,8 @@ const MetricLabels = {
210
240
  KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: ["mode", "scaler"],
211
241
  KICI_AGENT_LOG_BYTES_TOTAL: ["scaler"],
212
242
  KICI_AGENT_LOG_LINES_DROPPED_TOTAL: ["scaler"],
243
+ KICI_AGENT_ORPHAN_CLEANUP_TOTAL: ["status", "scaler"],
244
+ KICI_AGENT_ORPHANS_REAPED_TOTAL: ["scaler"],
213
245
  KICI_AGENT_STEP_DURATION_SECONDS: ["scaler"],
214
246
  KICI_AGENT_STEPS_TOTAL: ["status", "scaler"],
215
247
  KICI_BILLING_EMAIL_SEND_TOTAL: ["kind", "status"],
@@ -239,6 +271,7 @@ const MetricLabels = {
239
271
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: ["status", "label"],
240
272
  KICI_ORCH_DISPATCH_QUEUE_ROWS_PRUNED_TOTAL: [],
241
273
  KICI_ORCH_EVENT_ATTEMPTS: ["event_name", "result"],
274
+ KICI_ORCH_EVENT_CATCH_UP_FAILURES_TOTAL: [],
242
275
  KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: ["event_name"],
243
276
  KICI_ORCH_EVENT_DLQ_DEPTH: [],
244
277
  KICI_ORCH_EVENT_DLQ_TOTAL: ["event_name", "reason"],
@@ -246,7 +279,13 @@ const MetricLabels = {
246
279
  KICI_ORCH_EVENT_RETRY_TOTAL: ["event_name"],
247
280
  KICI_ORCH_EXECUTION_DURATION_SECONDS: [],
248
281
  KICI_ORCH_EXECUTIONS_TOTAL: ["status"],
282
+ KICI_ORCH_FORK_EVENTS_IGNORED_TOTAL: ["provider"],
249
283
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: ["operation"],
284
+ KICI_ORCH_GLOBAL_EVAL_CACHE_LOOKUPS_TOTAL: ["result"],
285
+ KICI_ORCH_GLOBAL_EVAL_CANDIDATES_TOTAL: [],
286
+ KICI_ORCH_GLOBAL_EVAL_JOBS_GENERATED: [],
287
+ KICI_ORCH_GLOBAL_EVAL_ROUND_DURATION_SECONDS: ["result"],
288
+ KICI_ORCH_GLOBAL_EVAL_VERDICTS_TOTAL: ["outcome"],
250
289
  KICI_ORCH_INGEST_ADMITTED_TOTAL: [],
251
290
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_MAX_MS: [],
252
291
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_P99_MS: [],
@@ -283,20 +322,33 @@ const MetricLabels = {
283
322
  KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: [],
284
323
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: ["source"],
285
324
  KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: [],
325
+ KICI_ORCH_SCALER_ADOPTION_LOOKUP_FAILURES_TOTAL: [],
326
+ KICI_ORCH_SCALER_CAP_LOCK_FAILURES_TOTAL: ["reason"],
286
327
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: ["result"],
287
328
  KICI_ORCH_SCALER_CPUS_USED: [
288
329
  "scaler",
289
330
  "scalerType",
290
331
  "machinePool"
291
332
  ],
333
+ KICI_ORCH_SCALER_EXTERNAL_PROVISION_TIMEOUT_TOTAL: ["scaler"],
334
+ KICI_ORCH_SCALER_EXTERNAL_PROVISIONING_ACTIVE: ["scaler"],
292
335
  KICI_ORCH_SCALER_MEMORY_BYTES_USED: [
293
336
  "scaler",
294
337
  "scalerType",
295
338
  "machinePool"
296
339
  ],
340
+ KICI_ORCH_SCALER_REAP_BLOCKED: [],
341
+ KICI_ORCH_SCALER_REAP_UNSEEN_PROVISIONS: [],
297
342
  KICI_ORCH_SCALER_REDISPATCH_TOTAL: ["trigger"],
343
+ KICI_ORCH_SCALER_SCALE_DOWN_EMITTED_TOTAL: ["scaler", "reason"],
344
+ KICI_ORCH_SCALER_SCALE_UP_EMITTED_TOTAL: ["scaler"],
298
345
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: ["backend", "bound"],
299
346
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: [],
347
+ KICI_ORCH_SCALER_WARM_POOL_IN_FLIGHT: ["scaler", "labelSet"],
348
+ KICI_ORCH_SCALER_WARM_POOL_READY: ["scaler", "labelSet"],
349
+ KICI_ORCH_SCALER_WARM_POOL_REAPED_TOTAL: ["scaler"],
350
+ KICI_ORCH_SCALER_WARM_POOL_SPAWNS_TOTAL: ["scaler"],
351
+ KICI_ORCH_SCALER_WARM_POOL_TARGET: ["scaler", "labelSet"],
300
352
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: [],
301
353
  KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: [],
302
354
  KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: [],
@@ -309,6 +361,7 @@ const MetricLabels = {
309
361
  KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: ["reason"],
310
362
  KICI_ORCH_TRUST_POLICY_DECISIONS_TOTAL: ["arm", "action"],
311
363
  KICI_ORCH_UNROUTABLE_FAST_FAILED_TOTAL: [],
364
+ KICI_ORCH_WEBHOOK_PIPELINE_FAILURES_TOTAL: ["phase"],
312
365
  KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: ["result"],
313
366
  KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: ["source", "event"],
314
367
  KICI_ORCH_WS_NACK_RECEIVED_TOTAL: [],
@@ -347,6 +400,9 @@ const MetricLabels = {
347
400
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: [],
348
401
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: ["org_id"],
349
402
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: ["reason"],
403
+ KICI_PLATFORM_MIMIR_RELAY_FINAL_DROPS_TOTAL: ["reason"],
404
+ KICI_PLATFORM_MIMIR_RELAY_RETRIES_TOTAL: ["reason"],
405
+ KICI_PLATFORM_MIMIR_RELAY_SHED_TOTAL: [],
350
406
  KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: ["channel_type", "result"],
351
407
  KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: ["org_id"],
352
408
  KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: ["reason", "metric"],
@@ -419,6 +475,8 @@ const MetricLabels = {
419
475
  V8JS_RESOURCE_ACTIVE: ["v8js.resource.type", "scaler"]
420
476
  };
421
477
  const MetricKind = {
478
+ KICI_AGENT_BETWEEN_JOBS_RESET_DURATION_SECONDS: "histogram",
479
+ KICI_AGENT_BETWEEN_JOBS_RESET_TOTAL: "counter",
422
480
  KICI_AGENT_CLONE_DURATION_SECONDS: "histogram",
423
481
  KICI_AGENT_CONNECTION_STATUS: "upDownCounter",
424
482
  KICI_AGENT_JOBS_ACTIVE: "upDownCounter",
@@ -427,6 +485,8 @@ const MetricKind = {
427
485
  KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "counter",
428
486
  KICI_AGENT_LOG_BYTES_TOTAL: "counter",
429
487
  KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "counter",
488
+ KICI_AGENT_ORPHAN_CLEANUP_TOTAL: "counter",
489
+ KICI_AGENT_ORPHANS_REAPED_TOTAL: "counter",
430
490
  KICI_AGENT_STEP_DURATION_SECONDS: "histogram",
431
491
  KICI_AGENT_STEPS_TOTAL: "counter",
432
492
  KICI_BILLING_EMAIL_SEND_TOTAL: "counter",
@@ -456,6 +516,7 @@ const MetricKind = {
456
516
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "observableGauge",
457
517
  KICI_ORCH_DISPATCH_QUEUE_ROWS_PRUNED_TOTAL: "counter",
458
518
  KICI_ORCH_EVENT_ATTEMPTS: "histogram",
519
+ KICI_ORCH_EVENT_CATCH_UP_FAILURES_TOTAL: "counter",
459
520
  KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "counter",
460
521
  KICI_ORCH_EVENT_DLQ_DEPTH: "observableGauge",
461
522
  KICI_ORCH_EVENT_DLQ_TOTAL: "counter",
@@ -463,7 +524,13 @@ const MetricKind = {
463
524
  KICI_ORCH_EVENT_RETRY_TOTAL: "counter",
464
525
  KICI_ORCH_EXECUTION_DURATION_SECONDS: "histogram",
465
526
  KICI_ORCH_EXECUTIONS_TOTAL: "counter",
527
+ KICI_ORCH_FORK_EVENTS_IGNORED_TOTAL: "counter",
466
528
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "counter",
529
+ KICI_ORCH_GLOBAL_EVAL_CACHE_LOOKUPS_TOTAL: "counter",
530
+ KICI_ORCH_GLOBAL_EVAL_CANDIDATES_TOTAL: "counter",
531
+ KICI_ORCH_GLOBAL_EVAL_JOBS_GENERATED: "histogram",
532
+ KICI_ORCH_GLOBAL_EVAL_ROUND_DURATION_SECONDS: "histogram",
533
+ KICI_ORCH_GLOBAL_EVAL_VERDICTS_TOTAL: "counter",
467
534
  KICI_ORCH_INGEST_ADMITTED_TOTAL: "counter",
468
535
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_MAX_MS: "observableGauge",
469
536
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_P99_MS: "observableGauge",
@@ -496,12 +563,25 @@ const MetricKind = {
496
563
  KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "observableGauge",
497
564
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "counter",
498
565
  KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "observableGauge",
566
+ KICI_ORCH_SCALER_ADOPTION_LOOKUP_FAILURES_TOTAL: "counter",
567
+ KICI_ORCH_SCALER_CAP_LOCK_FAILURES_TOTAL: "counter",
499
568
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "counter",
500
569
  KICI_ORCH_SCALER_CPUS_USED: "observableGauge",
570
+ KICI_ORCH_SCALER_EXTERNAL_PROVISION_TIMEOUT_TOTAL: "counter",
571
+ KICI_ORCH_SCALER_EXTERNAL_PROVISIONING_ACTIVE: "observableGauge",
501
572
  KICI_ORCH_SCALER_MEMORY_BYTES_USED: "observableGauge",
573
+ KICI_ORCH_SCALER_REAP_BLOCKED: "observableGauge",
574
+ KICI_ORCH_SCALER_REAP_UNSEEN_PROVISIONS: "observableGauge",
502
575
  KICI_ORCH_SCALER_REDISPATCH_TOTAL: "counter",
576
+ KICI_ORCH_SCALER_SCALE_DOWN_EMITTED_TOTAL: "counter",
577
+ KICI_ORCH_SCALER_SCALE_UP_EMITTED_TOTAL: "counter",
503
578
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: "counter",
504
579
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "observableGauge",
580
+ KICI_ORCH_SCALER_WARM_POOL_IN_FLIGHT: "observableGauge",
581
+ KICI_ORCH_SCALER_WARM_POOL_READY: "observableGauge",
582
+ KICI_ORCH_SCALER_WARM_POOL_REAPED_TOTAL: "counter",
583
+ KICI_ORCH_SCALER_WARM_POOL_SPAWNS_TOTAL: "counter",
584
+ KICI_ORCH_SCALER_WARM_POOL_TARGET: "observableGauge",
505
585
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "counter",
506
586
  KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "counter",
507
587
  KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "histogram",
@@ -514,6 +594,7 @@ const MetricKind = {
514
594
  KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "counter",
515
595
  KICI_ORCH_TRUST_POLICY_DECISIONS_TOTAL: "counter",
516
596
  KICI_ORCH_UNROUTABLE_FAST_FAILED_TOTAL: "counter",
597
+ KICI_ORCH_WEBHOOK_PIPELINE_FAILURES_TOTAL: "counter",
517
598
  KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "counter",
518
599
  KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "counter",
519
600
  KICI_ORCH_WS_NACK_RECEIVED_TOTAL: "counter",
@@ -552,6 +633,9 @@ const MetricKind = {
552
633
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "counter",
553
634
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "counter",
554
635
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "counter",
636
+ KICI_PLATFORM_MIMIR_RELAY_FINAL_DROPS_TOTAL: "counter",
637
+ KICI_PLATFORM_MIMIR_RELAY_RETRIES_TOTAL: "counter",
638
+ KICI_PLATFORM_MIMIR_RELAY_SHED_TOTAL: "counter",
555
639
  KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "counter",
556
640
  KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "counter",
557
641
  KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "counter",
@@ -620,6 +704,8 @@ const MetricKind = {
620
704
  V8JS_RESOURCE_ACTIVE: "gauge"
621
705
  };
622
706
  const MetricDescription = {
707
+ KICI_AGENT_BETWEEN_JOBS_RESET_DURATION_SECONDS: "Between-jobs reset command duration in seconds",
708
+ KICI_AGENT_BETWEEN_JOBS_RESET_TOTAL: "Total operator between-jobs reset command invocations",
623
709
  KICI_AGENT_CLONE_DURATION_SECONDS: "Git clone duration in seconds",
624
710
  KICI_AGENT_CONNECTION_STATUS: "Orchestrator WebSocket connection status (0=disconnected, 1=connected)",
625
711
  KICI_AGENT_JOBS_ACTIVE: "Number of currently running jobs",
@@ -628,6 +714,8 @@ const MetricDescription = {
628
714
  KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "Total log-streamer backpressure rising-edge events",
629
715
  KICI_AGENT_LOG_BYTES_TOTAL: "Total log bytes streamed",
630
716
  KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "Total log lines dropped due to backpressure",
717
+ KICI_AGENT_ORPHAN_CLEANUP_TOTAL: "Total out-of-band declared-cleanup re-runs",
718
+ KICI_AGENT_ORPHANS_REAPED_TOTAL: "Total processes killed by the between-jobs process-group reap",
631
719
  KICI_AGENT_STEP_DURATION_SECONDS: "Step execution duration in seconds",
632
720
  KICI_AGENT_STEPS_TOTAL: "Total number of completed steps",
633
721
  KICI_BILLING_EMAIL_SEND_TOTAL: "Billing emails sent, by kind and status",
@@ -657,6 +745,7 @@ const MetricDescription = {
657
745
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "Current pending dispatch_queue depth per runs_on label (multi-label jobs fan out)",
658
746
  KICI_ORCH_DISPATCH_QUEUE_ROWS_PRUNED_TOTAL: "Terminal dispatch_queue rows deleted by the retention sweep",
659
747
  KICI_ORCH_EVENT_ATTEMPTS: "Distribution of dispatch attempts at terminal outcome (success or DLQ)",
748
+ KICI_ORCH_EVENT_CATCH_UP_FAILURES_TOTAL: "Startup internal-event catch-up scans that threw",
660
749
  KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "Internal events delivered to all matching workflows successfully (after the lease commits processed=true)",
661
750
  KICI_ORCH_EVENT_DLQ_DEPTH: "Current count of events sitting in the DLQ awaiting operator triage",
662
751
  KICI_ORCH_EVENT_DLQ_TOTAL: "Internal events moved to the DLQ after exhausting retries",
@@ -664,7 +753,13 @@ const MetricDescription = {
664
753
  KICI_ORCH_EVENT_RETRY_TOTAL: "Internal-event dispatch failures that triggered a retry (lease released, next_retry_at scheduled)",
665
754
  KICI_ORCH_EXECUTION_DURATION_SECONDS: "Duration of execution runs in seconds",
666
755
  KICI_ORCH_EXECUTIONS_TOTAL: "Total number of execution runs",
756
+ KICI_ORCH_FORK_EVENTS_IGNORED_TOTAL: "Total fork pull-request events dropped by the org fork policy",
667
757
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "Total number of GitHub check run API calls",
758
+ KICI_ORCH_GLOBAL_EVAL_CACHE_LOOKUPS_TOTAL: "Tier-2 global eval round cache lookups by outcome",
759
+ KICI_ORCH_GLOBAL_EVAL_CANDIDATES_TOTAL: "Global workflow candidates handed to a Tier-2 eval round",
760
+ KICI_ORCH_GLOBAL_EVAL_JOBS_GENERATED: "Jobs generated by a Tier-2 global eval round",
761
+ KICI_ORCH_GLOBAL_EVAL_ROUND_DURATION_SECONDS: "Duration of one dispatched Tier-2 global eval round in seconds",
762
+ KICI_ORCH_GLOBAL_EVAL_VERDICTS_TOTAL: "Per-candidate verdicts produced by a Tier-2 global eval round",
668
763
  KICI_ORCH_INGEST_ADMITTED_TOTAL: "Total webhook ingest admissions granted by the admission controller",
669
764
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_MAX_MS: "Event-loop delay max (ms) observed by the ingest admission sampler",
670
765
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_P99_MS: "Event-loop delay p99 (ms) observed by the ingest admission sampler",
@@ -697,12 +792,25 @@ const MetricDescription = {
697
792
  KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "Deferred attestations awaiting a later mint",
698
793
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart",
699
794
  KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "Deferred attestations permanently rejected (run/job absent on Platform); terminal, re-attempted only via kici-admin attestations retry --include-rejected",
795
+ KICI_ORCH_SCALER_ADOPTION_LOOKUP_FAILURES_TOTAL: "Cumulative event-scaler spawn-record adoption lookups that failed with a store error.",
796
+ KICI_ORCH_SCALER_CAP_LOCK_FAILURES_TOTAL: "Total event-scaler cluster-wide cap checks that failed, refusing their spawn without evaluating the cap. A rising rate means event autoscaling is not running; read reason to tell a stalled database from a contended lock.",
700
797
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "Total number of scaler config reload operations",
701
798
  KICI_ORCH_SCALER_CPUS_USED: "Current CPU reservations summed by scaler / pool. scaler=\"__global__\" is the orchestrator-wide total; machinePool=\"<name>\" rows reflect the on-disk ledger.",
799
+ KICI_ORCH_SCALER_EXTERNAL_PROVISION_TIMEOUT_TOTAL: "Cumulative event-scaler provisions torn down for spawn-timeout (agent never registered), labeled by scaler.",
800
+ KICI_ORCH_SCALER_EXTERNAL_PROVISIONING_ACTIVE: "Current in-flight external (event-scaler) provisions, labeled by scaler (provisioning + active).",
702
801
  KICI_ORCH_SCALER_MEMORY_BYTES_USED: "Current memory reservations (bytes) summed by scaler / pool. scaler=\"__global__\" is the orchestrator-wide total; machinePool=\"<name>\" rows reflect the on-disk ledger.",
802
+ KICI_ORCH_SCALER_REAP_BLOCKED: "Whether the event-scaler provision reaper is standing down for lack of any connected coordinator peer (1) or sweeping (0).",
803
+ KICI_ORCH_SCALER_REAP_UNSEEN_PROVISIONS: "Event-scaler provisions whose agent has been registered on no coordinator for at least the flap grace, being timed by the leader-gated reaper.",
703
804
  KICI_ORCH_SCALER_REDISPATCH_TOTAL: "Cumulative count of pending jobs re-offered to the scaler after capacity freed, labeled by trigger (hook | sweep).",
805
+ KICI_ORCH_SCALER_SCALE_DOWN_EMITTED_TOTAL: "Cumulative kici.scaler.scale-down events emitted by event scalers, labeled by scaler + reason.",
806
+ KICI_ORCH_SCALER_SCALE_UP_EMITTED_TOTAL: "Cumulative kici.scaler.scale-up events emitted by event scalers, labeled by scaler.",
704
807
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: "Total scaler agent spawn failures (job-bound and warm-pool)",
705
808
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "Cumulative count of scaler spawn requests refused due to resource caps (maxAgents, resourceCap, globalResourceCap, machinePool).",
809
+ KICI_ORCH_SCALER_WARM_POOL_IN_FLIGHT: "Warm-pool spawns started but not yet registered. A deficit covered by these is filling, not failing.",
810
+ KICI_ORCH_SCALER_WARM_POOL_READY: "Agents able to serve a job for a warm pool label set — the same query the dispatcher makes.",
811
+ KICI_ORCH_SCALER_WARM_POOL_REAPED_TOTAL: "Total warm-pool agents destroyed as surplus — past their idle timeout, or above a lowered target, per scaler.",
812
+ KICI_ORCH_SCALER_WARM_POOL_SPAWNS_TOTAL: "Total warm-pool spawns started, per scaler.",
813
+ KICI_ORCH_SCALER_WARM_POOL_TARGET: "Configured number of agents a warm pool keeps ready for a label set.",
706
814
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "Total number of source tarball cache hits",
707
815
  KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "Total number of source tarball cache misses",
708
816
  KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "Time between job becoming stale and detection (seconds)",
@@ -715,6 +823,7 @@ const MetricDescription = {
715
823
  KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "Trust-resolution attempts refused because the provider numeric id was missing or did not match",
716
824
  KICI_ORCH_TRUST_POLICY_DECISIONS_TOTAL: "Total org trust-policy gate decisions by arm and action",
717
825
  KICI_ORCH_UNROUTABLE_FAST_FAILED_TOTAL: "Jobs terminalized as unroutable by the fast-fail probe (not the queue timeout)",
826
+ KICI_ORCH_WEBHOOK_PIPELINE_FAILURES_TOTAL: "Webhook match-and-dispatch pipelines that threw. Labels: phase (post_ack — failed after the delivery was acknowledged)",
718
827
  KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "Total number of webhooks processed",
719
828
  KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "Total number of webhooks received",
720
829
  KICI_ORCH_WS_NACK_RECEIVED_TOTAL: "NACKs received from the Platform for a message it could not process (version skew)",
@@ -753,6 +862,9 @@ const MetricDescription = {
753
862
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators",
754
863
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).",
755
864
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.",
865
+ KICI_PLATFORM_MIMIR_RELAY_FINAL_DROPS_TOTAL: "Total Mimir push-relay batches dropped permanently (data loss). Labels: reason.",
866
+ KICI_PLATFORM_MIMIR_RELAY_RETRIES_TOTAL: "Total Mimir push-relay retry attempts (Platform-embedded metrics). Labels: reason.",
867
+ KICI_PLATFORM_MIMIR_RELAY_SHED_TOTAL: "Total Mimir push-relay batches shed without retry (concurrent-retry cap reached).",
756
868
  KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "Notification delivery attempts that reached a terminal outcome",
757
869
  KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "Run-terminal notifications suppressed by the per-org notification quota",
758
870
  KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason, metric.",
@@ -828,6 +940,8 @@ const MetricDescription = {
828
940
  * the only valid push payloads.
829
941
  */
830
942
  const MetricService = {
943
+ KICI_AGENT_BETWEEN_JOBS_RESET_DURATION_SECONDS: "agent",
944
+ KICI_AGENT_BETWEEN_JOBS_RESET_TOTAL: "agent",
831
945
  KICI_AGENT_CLONE_DURATION_SECONDS: "agent",
832
946
  KICI_AGENT_CONNECTION_STATUS: "agent",
833
947
  KICI_AGENT_JOBS_ACTIVE: "agent",
@@ -836,6 +950,8 @@ const MetricService = {
836
950
  KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "agent",
837
951
  KICI_AGENT_LOG_BYTES_TOTAL: "agent",
838
952
  KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "agent",
953
+ KICI_AGENT_ORPHAN_CLEANUP_TOTAL: "agent",
954
+ KICI_AGENT_ORPHANS_REAPED_TOTAL: "agent",
839
955
  KICI_AGENT_STEP_DURATION_SECONDS: "agent",
840
956
  KICI_AGENT_STEPS_TOTAL: "agent",
841
957
  KICI_BILLING_EMAIL_SEND_TOTAL: "platform",
@@ -865,6 +981,7 @@ const MetricService = {
865
981
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "orchestrator",
866
982
  KICI_ORCH_DISPATCH_QUEUE_ROWS_PRUNED_TOTAL: "orchestrator",
867
983
  KICI_ORCH_EVENT_ATTEMPTS: "orchestrator",
984
+ KICI_ORCH_EVENT_CATCH_UP_FAILURES_TOTAL: "orchestrator",
868
985
  KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "orchestrator",
869
986
  KICI_ORCH_EVENT_DLQ_DEPTH: "orchestrator",
870
987
  KICI_ORCH_EVENT_DLQ_TOTAL: "orchestrator",
@@ -872,7 +989,13 @@ const MetricService = {
872
989
  KICI_ORCH_EVENT_RETRY_TOTAL: "orchestrator",
873
990
  KICI_ORCH_EXECUTION_DURATION_SECONDS: "orchestrator",
874
991
  KICI_ORCH_EXECUTIONS_TOTAL: "orchestrator",
992
+ KICI_ORCH_FORK_EVENTS_IGNORED_TOTAL: "orchestrator",
875
993
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "orchestrator",
994
+ KICI_ORCH_GLOBAL_EVAL_CACHE_LOOKUPS_TOTAL: "orchestrator",
995
+ KICI_ORCH_GLOBAL_EVAL_CANDIDATES_TOTAL: "orchestrator",
996
+ KICI_ORCH_GLOBAL_EVAL_JOBS_GENERATED: "orchestrator",
997
+ KICI_ORCH_GLOBAL_EVAL_ROUND_DURATION_SECONDS: "orchestrator",
998
+ KICI_ORCH_GLOBAL_EVAL_VERDICTS_TOTAL: "orchestrator",
876
999
  KICI_ORCH_INGEST_ADMITTED_TOTAL: "orchestrator",
877
1000
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_MAX_MS: "orchestrator",
878
1001
  KICI_ORCH_INGEST_EVENT_LOOP_DELAY_P99_MS: "orchestrator",
@@ -905,12 +1028,25 @@ const MetricService = {
905
1028
  KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "orchestrator",
906
1029
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "orchestrator",
907
1030
  KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "orchestrator",
1031
+ KICI_ORCH_SCALER_ADOPTION_LOOKUP_FAILURES_TOTAL: "orchestrator",
1032
+ KICI_ORCH_SCALER_CAP_LOCK_FAILURES_TOTAL: "orchestrator",
908
1033
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "orchestrator",
909
1034
  KICI_ORCH_SCALER_CPUS_USED: "orchestrator",
1035
+ KICI_ORCH_SCALER_EXTERNAL_PROVISION_TIMEOUT_TOTAL: "orchestrator",
1036
+ KICI_ORCH_SCALER_EXTERNAL_PROVISIONING_ACTIVE: "orchestrator",
910
1037
  KICI_ORCH_SCALER_MEMORY_BYTES_USED: "orchestrator",
1038
+ KICI_ORCH_SCALER_REAP_BLOCKED: "orchestrator",
1039
+ KICI_ORCH_SCALER_REAP_UNSEEN_PROVISIONS: "orchestrator",
911
1040
  KICI_ORCH_SCALER_REDISPATCH_TOTAL: "orchestrator",
1041
+ KICI_ORCH_SCALER_SCALE_DOWN_EMITTED_TOTAL: "orchestrator",
1042
+ KICI_ORCH_SCALER_SCALE_UP_EMITTED_TOTAL: "orchestrator",
912
1043
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: "orchestrator",
913
1044
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "orchestrator",
1045
+ KICI_ORCH_SCALER_WARM_POOL_IN_FLIGHT: "orchestrator",
1046
+ KICI_ORCH_SCALER_WARM_POOL_READY: "orchestrator",
1047
+ KICI_ORCH_SCALER_WARM_POOL_REAPED_TOTAL: "orchestrator",
1048
+ KICI_ORCH_SCALER_WARM_POOL_SPAWNS_TOTAL: "orchestrator",
1049
+ KICI_ORCH_SCALER_WARM_POOL_TARGET: "orchestrator",
914
1050
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "orchestrator",
915
1051
  KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "orchestrator",
916
1052
  KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "orchestrator",
@@ -923,6 +1059,7 @@ const MetricService = {
923
1059
  KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "orchestrator",
924
1060
  KICI_ORCH_TRUST_POLICY_DECISIONS_TOTAL: "orchestrator",
925
1061
  KICI_ORCH_UNROUTABLE_FAST_FAILED_TOTAL: "orchestrator",
1062
+ KICI_ORCH_WEBHOOK_PIPELINE_FAILURES_TOTAL: "orchestrator",
926
1063
  KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "orchestrator",
927
1064
  KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "orchestrator",
928
1065
  KICI_ORCH_WS_NACK_RECEIVED_TOTAL: "orchestrator",
@@ -961,6 +1098,9 @@ const MetricService = {
961
1098
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "platform",
962
1099
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "platform",
963
1100
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "platform",
1101
+ KICI_PLATFORM_MIMIR_RELAY_FINAL_DROPS_TOTAL: "platform",
1102
+ KICI_PLATFORM_MIMIR_RELAY_RETRIES_TOTAL: "platform",
1103
+ KICI_PLATFORM_MIMIR_RELAY_SHED_TOTAL: "platform",
964
1104
  KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "platform",
965
1105
  KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "platform",
966
1106
  KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "platform",
@@ -1030,6 +1170,8 @@ const MetricService = {
1030
1170
  };
1031
1171
  /** Set of every catalog metric name — O(1) membership for lint / filter UI. */
1032
1172
  const ALL_METRIC_NAMES = [
1173
+ "kici_agent_between_jobs_reset_duration_seconds",
1174
+ "kici_agent_between_jobs_reset_total",
1033
1175
  "kici_agent_clone_duration_seconds",
1034
1176
  "kici_agent_connection_status",
1035
1177
  "kici_agent_jobs_active",
@@ -1038,6 +1180,8 @@ const ALL_METRIC_NAMES = [
1038
1180
  "kici_agent_log_backpressure_events_total",
1039
1181
  "kici_agent_log_bytes_total",
1040
1182
  "kici_agent_log_lines_dropped_total",
1183
+ "kici_agent_orphan_cleanup_total",
1184
+ "kici_agent_orphans_reaped_total",
1041
1185
  "kici_agent_step_duration_seconds",
1042
1186
  "kici_agent_steps_total",
1043
1187
  "kici_billing_email_send_total",
@@ -1067,6 +1211,7 @@ const ALL_METRIC_NAMES = [
1067
1211
  "kici_orch_dispatch_queue_depth_by_label",
1068
1212
  "kici_orch_dispatch_queue_rows_pruned_total",
1069
1213
  "kici_orch_event_attempts",
1214
+ "kici_orch_event_catch_up_failures_total",
1070
1215
  "kici_orch_event_dispatch_success_total",
1071
1216
  "kici_orch_event_dlq_depth",
1072
1217
  "kici_orch_event_dlq_total",
@@ -1074,7 +1219,13 @@ const ALL_METRIC_NAMES = [
1074
1219
  "kici_orch_event_retry_total",
1075
1220
  "kici_orch_execution_duration_seconds",
1076
1221
  "kici_orch_executions_total",
1222
+ "kici_orch_fork_events_ignored_total",
1077
1223
  "kici_orch_github_check_run_total",
1224
+ "kici_orch_global_eval_cache_lookups_total",
1225
+ "kici_orch_global_eval_candidates_total",
1226
+ "kici_orch_global_eval_jobs_generated",
1227
+ "kici_orch_global_eval_round_duration_seconds",
1228
+ "kici_orch_global_eval_verdicts_total",
1078
1229
  "kici_orch_ingest_admitted_total",
1079
1230
  "kici_orch_ingest_event_loop_delay_max_ms",
1080
1231
  "kici_orch_ingest_event_loop_delay_p99_ms",
@@ -1107,12 +1258,25 @@ const ALL_METRIC_NAMES = [
1107
1258
  "kici_orch_pending_attestations_current",
1108
1259
  "kici_orch_pg_pool_client_errors_total",
1109
1260
  "kici_orch_rejected_attestations_current",
1261
+ "kici_orch_scaler_adoption_lookup_failures_total",
1262
+ "kici_orch_scaler_cap_lock_failures_total",
1110
1263
  "kici_orch_scaler_config_reloads_total",
1111
1264
  "kici_orch_scaler_cpus_used",
1265
+ "kici_orch_scaler_external_provision_timeout_total",
1266
+ "kici_orch_scaler_external_provisioning_active",
1112
1267
  "kici_orch_scaler_memory_bytes_used",
1268
+ "kici_orch_scaler_reap_blocked",
1269
+ "kici_orch_scaler_reap_unseen_provisions",
1113
1270
  "kici_orch_scaler_redispatch_total",
1271
+ "kici_orch_scaler_scale_down_emitted_total",
1272
+ "kici_orch_scaler_scale_up_emitted_total",
1114
1273
  "kici_orch_scaler_spawn_failures_total",
1115
1274
  "kici_orch_scaler_spawn_refusals_total",
1275
+ "kici_orch_scaler_warm_pool_in_flight",
1276
+ "kici_orch_scaler_warm_pool_ready",
1277
+ "kici_orch_scaler_warm_pool_reaped_total",
1278
+ "kici_orch_scaler_warm_pool_spawns_total",
1279
+ "kici_orch_scaler_warm_pool_target",
1116
1280
  "kici_orch_source_cache_hits_total",
1117
1281
  "kici_orch_source_cache_misses_total",
1118
1282
  "kici_orch_stale_detection_duration_seconds",
@@ -1125,6 +1289,7 @@ const ALL_METRIC_NAMES = [
1125
1289
  "kici_orch_trust_match_refused_no_id_total",
1126
1290
  "kici_orch_trust_policy_decisions_total",
1127
1291
  "kici_orch_unroutable_fast_failed_total",
1292
+ "kici_orch_webhook_pipeline_failures_total",
1128
1293
  "kici_orch_webhooks_processed_total",
1129
1294
  "kici_orch_webhooks_received_total",
1130
1295
  "kici_orch_ws_nack_received_total",
@@ -1163,6 +1328,9 @@ const ALL_METRIC_NAMES = [
1163
1328
  "kici_platform_log_lines_forwarded_total",
1164
1329
  "kici_platform_metrics_query_rate_limited_total",
1165
1330
  "kici_platform_mimir_relay_errors_total",
1331
+ "kici_platform_mimir_relay_final_drops_total",
1332
+ "kici_platform_mimir_relay_retries_total",
1333
+ "kici_platform_mimir_relay_shed_total",
1166
1334
  "kici_platform_notifications_delivered_total",
1167
1335
  "kici_platform_notifications_suppressed_total",
1168
1336
  "kici_platform_orch_metrics_filtered_total",
@@ -1,3 +1,3 @@
1
1
  import "../rolldown-runtime-ClRpJifh.js";
2
- import { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema } from "./messages/dashboard-global-workflows.js";
3
- export { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema };
2
+ import { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, invalidRepoPatternReason, repoPatternEntrySchema } from "./messages/dashboard-global-workflows.js";
3
+ export { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, invalidRepoPatternReason, repoPatternEntrySchema };
@@ -14,7 +14,7 @@ import "../rolldown-runtime-ClRpJifh.js";
14
14
  * payload" path. The win is that Platform never holds the full body in
15
15
  * memory and the dashboard can render progress as bytes arrive.
16
16
  */
17
- const EVENT_LOG_PAYLOAD_CHUNK_BYTES = 64 * 1024;
17
+ const EVENT_LOG_PAYLOAD_CHUNK_BYTES = 65536;
18
18
  //#endregion
19
19
  export { EVENT_LOG_PAYLOAD_CHUNK_BYTES };
20
20
 
@@ -133,6 +133,7 @@ export declare const AccessLogAction: z.ZodEnum<{
133
133
  "source_override.set": "source_override.set";
134
134
  "sources.list.read": "sources.list.read";
135
135
  "step.logs.read": "step.logs.read";
136
+ "trust_directory.updated": "trust_directory.updated";
136
137
  "trust_policy.updated": "trust_policy.updated";
137
138
  }>;
138
139
  export type AccessLogAction = z.infer<typeof AccessLogAction>;
@@ -237,6 +238,7 @@ export declare const accessLogItemSchema: z.ZodObject<{
237
238
  "source_override.set": "source_override.set";
238
239
  "sources.list.read": "sources.list.read";
239
240
  "step.logs.read": "step.logs.read";
241
+ "trust_directory.updated": "trust_directory.updated";
240
242
  "trust_policy.updated": "trust_policy.updated";
241
243
  }>;
242
244
  targetType: z.ZodNullable<z.ZodEnum<{
@@ -368,6 +370,7 @@ export declare const accessLogFilterSchema: z.ZodObject<{
368
370
  "source_override.set": "source_override.set";
369
371
  "sources.list.read": "sources.list.read";
370
372
  "step.logs.read": "step.logs.read";
373
+ "trust_directory.updated": "trust_directory.updated";
371
374
  "trust_policy.updated": "trust_policy.updated";
372
375
  }>>;
373
376
  source: z.ZodOptional<z.ZodEnum<{
@@ -529,6 +532,7 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
529
532
  "source_override.set": "source_override.set";
530
533
  "sources.list.read": "sources.list.read";
531
534
  "step.logs.read": "step.logs.read";
535
+ "trust_directory.updated": "trust_directory.updated";
532
536
  "trust_policy.updated": "trust_policy.updated";
533
537
  }>>;
534
538
  source: z.ZodOptional<z.ZodEnum<{
@@ -671,6 +675,7 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
671
675
  "source_override.set": "source_override.set";
672
676
  "sources.list.read": "sources.list.read";
673
677
  "step.logs.read": "step.logs.read";
678
+ "trust_directory.updated": "trust_directory.updated";
674
679
  "trust_policy.updated": "trust_policy.updated";
675
680
  }>;
676
681
  targetType: z.ZodNullable<z.ZodEnum<{
@@ -120,6 +120,7 @@ const AccessLogAction = z.enum([
120
120
  "global_workflows.update",
121
121
  "org_settings.dashboard_write_policy.update",
122
122
  "trust_policy.updated",
123
+ "trust_directory.updated",
123
124
  "cluster_name.update",
124
125
  "attestation.retry",
125
126
  "access_log.list.read",
@@ -79,13 +79,24 @@ export declare const actorPrincipalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
79
79
  component: z.ZodString;
80
80
  }, z.core.$strip>], "type">;
81
81
  export type ActorPrincipal = z.infer<typeof actorPrincipalSchema>;
82
+ /**
83
+ * Separator {@link stringifyActor} appends when a `user` / `api_key` actor acted
84
+ * through an agent, as `${type}:${id}${ACTOR_AGENT_SUFFIX}${label}`.
85
+ *
86
+ * Exported because a reader that splits the persisted string on its first colon
87
+ * gets `${id}${ACTOR_AGENT_SUFFIX}${label}` rather than the id — so any consumer
88
+ * comparing a stored subject against a live one has to strip this suffix, and
89
+ * must strip the same string this function writes.
90
+ */
91
+ export declare const ACTOR_AGENT_SUFFIX = " via agent:";
82
92
  /**
83
93
  * Convert an ActorPrincipal to a colon-prefixed string suitable for DB
84
94
  * persistence in columns like `execution_runs.triggered_by` / `.cancelled_by`.
85
95
  * The inverse of parseActor().
86
96
  *
87
- * Format: `${type}:${id}` where id is the variant's natural identifier.
88
- * Extra metadata (api_key.ownerSub, platform_operator.reason) is NOT
97
+ * Format: `${type}:${id}` where id is the variant's natural identifier, plus
98
+ * {@link ACTOR_AGENT_SUFFIX} and the label when the actor acted through an
99
+ * agent. Extra metadata (api_key.ownerSub, platform_operator.reason) is NOT
89
100
  * round-tripped through the string form — callers that need full fidelity
90
101
  * must persist the actor object separately (e.g. in `access_log.actor_meta`).
91
102
  */
@@ -84,19 +84,30 @@ const actorPrincipalSchema = z.discriminatedUnion("type", [
84
84
  systemActorSchema
85
85
  ]);
86
86
  /**
87
+ * Separator {@link stringifyActor} appends when a `user` / `api_key` actor acted
88
+ * through an agent, as `${type}:${id}${ACTOR_AGENT_SUFFIX}${label}`.
89
+ *
90
+ * Exported because a reader that splits the persisted string on its first colon
91
+ * gets `${id}${ACTOR_AGENT_SUFFIX}${label}` rather than the id — so any consumer
92
+ * comparing a stored subject against a live one has to strip this suffix, and
93
+ * must strip the same string this function writes.
94
+ */
95
+ const ACTOR_AGENT_SUFFIX = " via agent:";
96
+ /**
87
97
  * Convert an ActorPrincipal to a colon-prefixed string suitable for DB
88
98
  * persistence in columns like `execution_runs.triggered_by` / `.cancelled_by`.
89
99
  * The inverse of parseActor().
90
100
  *
91
- * Format: `${type}:${id}` where id is the variant's natural identifier.
92
- * Extra metadata (api_key.ownerSub, platform_operator.reason) is NOT
101
+ * Format: `${type}:${id}` where id is the variant's natural identifier, plus
102
+ * {@link ACTOR_AGENT_SUFFIX} and the label when the actor acted through an
103
+ * agent. Extra metadata (api_key.ownerSub, platform_operator.reason) is NOT
93
104
  * round-tripped through the string form — callers that need full fidelity
94
105
  * must persist the actor object separately (e.g. in `access_log.actor_meta`).
95
106
  */
96
107
  function stringifyActor(actor) {
97
108
  switch (actor.type) {
98
- case "user": return actor.agent ? `user:${actor.sub} via agent:${actor.agent.label}` : `user:${actor.sub}`;
99
- case "api_key": return actor.agent ? `api_key:${actor.keyId} via agent:${actor.agent.label}` : `api_key:${actor.keyId}`;
109
+ case "user": return actor.agent ? `user:${actor.sub}${ACTOR_AGENT_SUFFIX}${actor.agent.label}` : `user:${actor.sub}`;
110
+ case "api_key": return actor.agent ? `api_key:${actor.keyId}${ACTOR_AGENT_SUFFIX}${actor.agent.label}` : `api_key:${actor.keyId}`;
100
111
  case "service_account": return `service_account:${actor.id}`;
101
112
  case "platform_operator": return `platform_operator:${actor.sub}`;
102
113
  case "system": return `system:${actor.component}`;
@@ -178,6 +189,6 @@ function agentLabelOf(actor) {
178
189
  return null;
179
190
  }
180
191
  //#endregion
181
- export { ActorType, actorPrincipalSchema, agentLabelOf, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema };
192
+ export { ACTOR_AGENT_SUFFIX, ActorType, actorPrincipalSchema, agentLabelOf, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema };
182
193
 
183
194
  //# sourceMappingURL=actor.js.map
@@ -19,7 +19,7 @@ import { z } from "zod";
19
19
  * MUST be passed as `maxPayload` on every `new WebSocket(...)` constructor and
20
20
  * on every `WebSocketServer` `options` object across the three packages.
21
21
  */
22
- const WS_MAX_PAYLOAD_BYTES = 25 * 1024 * 1024;
22
+ const WS_MAX_PAYLOAD_BYTES = 26214400;
23
23
  /**
24
24
  * Heartbeat message sent periodically to keep WebSocket alive.
25
25
  *