@kici-dev/engine 0.0.0 → 0.1.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 (129) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +1 -6
  3. package/dist/audit/access-log-policy.d.ts +97 -0
  4. package/dist/audit/access-log-policy.js +195 -0
  5. package/dist/audit/activity.d.ts +156 -0
  6. package/dist/audit/activity.js +175 -0
  7. package/dist/audit/retention-policy.d.ts +157 -0
  8. package/dist/audit/retention-policy.js +364 -0
  9. package/dist/bundler/index.d.ts +3 -0
  10. package/dist/bundler/index.js +3 -0
  11. package/dist/bundler/rolldown-config.d.ts +41 -0
  12. package/dist/bundler/rolldown-config.js +40 -0
  13. package/dist/chunk-gOLHoazu.js +4 -0
  14. package/dist/env/environment-allowlist.d.ts +45 -0
  15. package/dist/env/environment-allowlist.js +69 -0
  16. package/dist/environment/index.d.ts +3 -0
  17. package/dist/environment/index.js +3 -0
  18. package/dist/environment/scope-resolver.d.ts +35 -0
  19. package/dist/environment/scope-resolver.js +77 -0
  20. package/dist/environment/types.d.ts +98 -0
  21. package/dist/environment/types.js +2 -0
  22. package/dist/index.d.ts +54 -0
  23. package/dist/index.js +45 -0
  24. package/dist/labels.d.ts +106 -0
  25. package/dist/labels.js +162 -0
  26. package/dist/metrics/metric-catalog.generated.d.ts +400 -0
  27. package/dist/metrics/metric-catalog.generated.js +510 -0
  28. package/dist/protocol/dashboard-global-workflows.d.ts +9 -0
  29. package/dist/protocol/dashboard-global-workflows.js +3 -0
  30. package/dist/protocol/event-log-payload.d.ts +16 -0
  31. package/dist/protocol/event-log-payload.js +21 -0
  32. package/dist/protocol/messages/access-log.d.ts +545 -0
  33. package/dist/protocol/messages/access-log.js +175 -0
  34. package/dist/protocol/messages/actor.d.ts +100 -0
  35. package/dist/protocol/messages/actor.js +139 -0
  36. package/dist/protocol/messages/auth.d.ts +25 -0
  37. package/dist/protocol/messages/auth.js +36 -0
  38. package/dist/protocol/messages/browser.d.ts +369 -0
  39. package/dist/protocol/messages/browser.js +225 -0
  40. package/dist/protocol/messages/capabilities.d.ts +46 -0
  41. package/dist/protocol/messages/capabilities.js +42 -0
  42. package/dist/protocol/messages/common.d.ts +53 -0
  43. package/dist/protocol/messages/common.js +55 -0
  44. package/dist/protocol/messages/dashboard-global-workflows.d.ts +166 -0
  45. package/dist/protocol/messages/dashboard-global-workflows.js +80 -0
  46. package/dist/protocol/messages/dashboard.d.ts +4068 -0
  47. package/dist/protocol/messages/dashboard.js +1237 -0
  48. package/dist/protocol/messages/event-log.d.ts +49 -0
  49. package/dist/protocol/messages/event-log.js +45 -0
  50. package/dist/protocol/messages/execution-status.d.ts +164 -0
  51. package/dist/protocol/messages/execution-status.js +166 -0
  52. package/dist/protocol/messages/join.d.ts +18 -0
  53. package/dist/protocol/messages/join.js +28 -0
  54. package/dist/protocol/messages/log-pull.d.ts +27 -0
  55. package/dist/protocol/messages/log-pull.js +36 -0
  56. package/dist/protocol/messages/observe.d.ts +75 -0
  57. package/dist/protocol/messages/observe.js +70 -0
  58. package/dist/protocol/messages/orchestrator-agent.d.ts +606 -0
  59. package/dist/protocol/messages/orchestrator-agent.js +481 -0
  60. package/dist/protocol/messages/peer.d.ts +795 -0
  61. package/dist/protocol/messages/peer.js +372 -0
  62. package/dist/protocol/messages/platform-orchestrator.d.ts +1888 -0
  63. package/dist/protocol/messages/platform-orchestrator.js +379 -0
  64. package/dist/protocol/messages/run-events.d.ts +155 -0
  65. package/dist/protocol/messages/run-events.js +115 -0
  66. package/dist/protocol/messages/saas-orchestrator.d.ts +2179 -0
  67. package/dist/protocol/messages/source-registration.d.ts +103 -0
  68. package/dist/protocol/messages/source-registration.js +109 -0
  69. package/dist/protocol/messages/test-run.d.ts +59 -0
  70. package/dist/protocol/messages/test-run.js +52 -0
  71. package/dist/protocol/version.d.ts +12 -0
  72. package/dist/protocol/version.js +17 -0
  73. package/dist/provider/changed-files-fetcher.d.ts +24 -0
  74. package/dist/provider/changed-files-fetcher.js +2 -0
  75. package/dist/provider/check-run-conclusion.d.ts +15 -0
  76. package/dist/provider/check-run-conclusion.js +19 -0
  77. package/dist/provider/check-status-poster.d.ts +15 -0
  78. package/dist/provider/check-status-poster.js +2 -0
  79. package/dist/provider/clone-token-provider.d.ts +58 -0
  80. package/dist/provider/clone-token-provider.js +2 -0
  81. package/dist/provider/contributor-resolver.d.ts +22 -0
  82. package/dist/provider/contributor-resolver.js +2 -0
  83. package/dist/provider/index.d.ts +23 -0
  84. package/dist/provider/index.js +3 -0
  85. package/dist/provider/lock-file-fetcher.d.ts +24 -0
  86. package/dist/provider/lock-file-fetcher.js +2 -0
  87. package/dist/provider/repo-url-builder.d.ts +35 -0
  88. package/dist/provider/repo-url-builder.js +2 -0
  89. package/dist/provider/types.d.ts +9 -0
  90. package/dist/provider/types.js +2 -0
  91. package/dist/provider/webhook-normalizer.d.ts +163 -0
  92. package/dist/provider/webhook-normalizer.js +2 -0
  93. package/dist/registration/registerable-trigger-type.d.ts +52 -0
  94. package/dist/registration/registerable-trigger-type.js +56 -0
  95. package/dist/scaler/resource-types.d.ts +90 -0
  96. package/dist/scaler/resource-types.js +99 -0
  97. package/dist/scaler/scaler-backend-type.d.ts +16 -0
  98. package/dist/scaler/scaler-backend-type.js +20 -0
  99. package/dist/secrets/index.d.ts +7 -0
  100. package/dist/secrets/index.js +2 -0
  101. package/dist/secrets/types.d.ts +138 -0
  102. package/dist/secrets/types.js +2 -0
  103. package/dist/state-machine/index.d.ts +2 -0
  104. package/dist/state-machine/index.js +3 -0
  105. package/dist/state-machine/machine.d.ts +34 -0
  106. package/dist/state-machine/machine.js +103 -0
  107. package/dist/state-machine/types.d.ts +34 -0
  108. package/dist/state-machine/types.js +15 -0
  109. package/dist/trigger/decision-trace.d.ts +41 -0
  110. package/dist/trigger/decision-trace.js +30 -0
  111. package/dist/trigger/jsonpath-matcher.d.ts +27 -0
  112. package/dist/trigger/jsonpath-matcher.js +92 -0
  113. package/dist/trigger/matcher.d.ts +29 -0
  114. package/dist/trigger/matcher.js +704 -0
  115. package/dist/trigger/trigger-event-type.d.ts +14 -0
  116. package/dist/trigger/trigger-event-type.js +66 -0
  117. package/dist/trigger/types.d.ts +524 -0
  118. package/dist/trigger/types.js +48 -0
  119. package/dist/webhook/signature.d.ts +15 -0
  120. package/dist/webhook/signature.js +32 -0
  121. package/dist/ws/close-codes.d.ts +28 -0
  122. package/dist/ws/close-codes.js +33 -0
  123. package/dist/ws/rate-limiter.d.ts +86 -0
  124. package/dist/ws/rate-limiter.js +136 -0
  125. package/dist/ws/ws-like.d.ts +12 -0
  126. package/dist/ws/ws-like.js +2 -0
  127. package/package.json +54 -6
  128. package/sbom.spdx.json +202 -0
  129. package/index.js +0 -3
package/dist/labels.js ADDED
@@ -0,0 +1,162 @@
1
+ import "./chunk-gOLHoazu.js";
2
+ //#region src/labels.ts
3
+ /**
4
+ * Structured auto-labels with category prefixes.
5
+ *
6
+ * Auto-labels are injected into agent label sets so that workflows can target
7
+ * specific platforms, architectures, scaler types, hosts, etc. without
8
+ * requiring manual label configuration.
9
+ *
10
+ * All auto-labels use the `kici:` namespace prefix to distinguish them from
11
+ * user-defined labels. Users cannot set labels with this prefix.
12
+ *
13
+ * Categories:
14
+ * kici:os: — operating system (kici:os:linux, kici:os:macos, kici:os:windows)
15
+ * kici:arch: — CPU architecture (kici:arch:x64, kici:arch:amd64, kici:arch:arm64)
16
+ * kici:agent: — scaler/execution backend type (kici:agent:container, kici:agent:bare-metal, kici:agent:firecracker)
17
+ * kici:scaler: — scaler backend name (kici:scaler:stg-container, kici:scaler:prod-firecracker)
18
+ * kici:host: — hostname of the machine running the agent (kici:host:<hostname>)
19
+ * kici:role: — agent role (kici:role:builder, kici:role:init-runner)
20
+ *
21
+ * Platform mapping (os.platform() → kici:os: labels):
22
+ * 'linux' → ['kici:os:linux']
23
+ * 'darwin' → ['kici:os:macos', 'kici:os:darwin']
24
+ * 'win32' → ['kici:os:windows', 'kici:os:win32']
25
+ *
26
+ * Architecture mapping (os.arch() → kici:arch: labels):
27
+ * 'x64' → ['kici:arch:x64', 'kici:arch:amd64']
28
+ * 'arm64' → ['kici:arch:arm64']
29
+ * other → ['kici:arch:{value}']
30
+ */
31
+ /**
32
+ * Derive kici:os: and kici:arch: labels from platform and architecture strings.
33
+ */
34
+ function deriveOsArchLabels(platform, arch) {
35
+ const labels = [];
36
+ switch (platform) {
37
+ case "linux":
38
+ labels.push("kici:os:linux");
39
+ break;
40
+ case "darwin":
41
+ labels.push("kici:os:macos", "kici:os:darwin");
42
+ break;
43
+ case "win32":
44
+ labels.push("kici:os:windows", "kici:os:win32");
45
+ break;
46
+ default: labels.push(`kici:os:${platform}`);
47
+ }
48
+ switch (arch) {
49
+ case "x64":
50
+ labels.push("kici:arch:x64", "kici:arch:amd64");
51
+ break;
52
+ case "arm64":
53
+ labels.push("kici:arch:arm64");
54
+ break;
55
+ default: labels.push(`kici:arch:${arch}`);
56
+ }
57
+ return labels;
58
+ }
59
+ /**
60
+ * Build a kici:host: label from a hostname.
61
+ */
62
+ function hostLabel(hostname) {
63
+ return `kici:host:${hostname}`;
64
+ }
65
+ /**
66
+ * Build a kici:agent: label from the scaler backend type.
67
+ */
68
+ function agentTypeLabel(backendType) {
69
+ return `kici:agent:${backendType}`;
70
+ }
71
+ /**
72
+ * Build a kici:scaler: label from the scaler backend name.
73
+ */
74
+ function scalerLabel(backendName) {
75
+ return `kici:scaler:${backendName}`;
76
+ }
77
+ /**
78
+ * Merges explicit labels with auto-derived structured labels.
79
+ * Deduplicates the result.
80
+ */
81
+ function mergeAutoLabels(labels, autoLabels) {
82
+ return [...new Set([...labels, ...autoLabels])];
83
+ }
84
+ /**
85
+ * Normalize the polymorphic runsOn value into a consistent object form.
86
+ * Accepts string, string[], or { labels, exclude? } object.
87
+ */
88
+ function normalizeRunsOn(runsOn) {
89
+ if (typeof runsOn === "string") return {
90
+ labels: [runsOn],
91
+ exclude: []
92
+ };
93
+ if (Array.isArray(runsOn)) return {
94
+ labels: runsOn,
95
+ exclude: []
96
+ };
97
+ return {
98
+ labels: Array.isArray(runsOn.labels) ? runsOn.labels : [runsOn.labels],
99
+ exclude: runsOn.exclude ? Array.isArray(runsOn.exclude) ? runsOn.exclude : [runsOn.exclude] : []
100
+ };
101
+ }
102
+ /**
103
+ * Known agent roles that grant capabilities beyond basic execution.
104
+ * - builder: can run __build__ jobs (dependency cache compilation)
105
+ * - init-runner: can run __init__ jobs (workspace initialization)
106
+ */
107
+ const KNOWN_ROLES = ["builder", "init-runner"];
108
+ /** Reserved label prefix — labels starting with this are system-managed. */
109
+ const RESERVED_LABEL_PREFIX = "kici:";
110
+ /** Role label prefix — used to generate role-specific labels. */
111
+ const ROLE_LABEL_PREFIX = "kici:role:";
112
+ /**
113
+ * Convert a role name to its corresponding label.
114
+ */
115
+ function roleToLabel(role) {
116
+ return `${ROLE_LABEL_PREFIX}${role}`;
117
+ }
118
+ /**
119
+ * Resolve a roles configuration into role labels.
120
+ *
121
+ * - undefined → all roles (backward compat: existing agents get all capabilities)
122
+ * - [] → no roles (execution-only agent)
123
+ * - ['all'] → all roles (explicit opt-in to all)
124
+ * - ['builder'] → specific role labels only
125
+ */
126
+ function resolveRoleLabels(roles) {
127
+ if (roles === void 0) return KNOWN_ROLES.map(roleToLabel);
128
+ if (roles.length === 0) return [];
129
+ if (roles.includes("all")) return KNOWN_ROLES.map(roleToLabel);
130
+ return roles.map(roleToLabel);
131
+ }
132
+ /**
133
+ * Validate that no labels use the reserved kici: prefix.
134
+ * Throws if any reserved labels are found (case-insensitive check).
135
+ */
136
+ function validateNoReservedLabels(labels, source) {
137
+ const reserved = labels.filter((l) => l.toLowerCase().startsWith(RESERVED_LABEL_PREFIX));
138
+ if (reserved.length > 0) throw new Error(`Labels with '${RESERVED_LABEL_PREFIX}' prefix are reserved and cannot be used in ${source}: ${reserved.join(", ")}`);
139
+ }
140
+ /**
141
+ * Check if a label is an auto-generated system label (has the kici: prefix).
142
+ */
143
+ function isAutoLabel(label) {
144
+ return label.toLowerCase().startsWith(RESERVED_LABEL_PREFIX);
145
+ }
146
+ /**
147
+ * Separate labels into user-defined and auto-generated (kici: prefixed) groups.
148
+ */
149
+ function separateLabels(labels) {
150
+ const userLabels = [];
151
+ const autoLabels = [];
152
+ for (const label of labels) if (isAutoLabel(label)) autoLabels.push(label);
153
+ else userLabels.push(label);
154
+ return {
155
+ userLabels,
156
+ autoLabels
157
+ };
158
+ }
159
+ //#endregion
160
+ export { KNOWN_ROLES, RESERVED_LABEL_PREFIX, ROLE_LABEL_PREFIX, agentTypeLabel, deriveOsArchLabels, hostLabel, isAutoLabel, mergeAutoLabels, normalizeRunsOn, resolveRoleLabels, roleToLabel, scalerLabel, separateLabels, validateNoReservedLabels };
161
+
162
+ //# sourceMappingURL=labels.js.map
@@ -0,0 +1,400 @@
1
+ export declare const MetricNames: {
2
+ readonly KICI_AGENT_CLONE_DURATION_SECONDS: "kici_agent_clone_duration_seconds";
3
+ readonly KICI_AGENT_CONNECTION_STATUS: "kici_agent_connection_status";
4
+ readonly KICI_AGENT_JOBS_ACTIVE: "kici_agent_jobs_active";
5
+ readonly KICI_AGENT_JOBS_TOTAL: "kici_agent_jobs_total";
6
+ readonly KICI_AGENT_LOG_BACKPRESSURE_ACTIVE: "kici_agent_log_backpressure_active";
7
+ readonly KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "kici_agent_log_backpressure_events_total";
8
+ readonly KICI_AGENT_LOG_BYTES_TOTAL: "kici_agent_log_bytes_total";
9
+ readonly KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "kici_agent_log_lines_dropped_total";
10
+ readonly KICI_AGENT_STEP_DURATION_SECONDS: "kici_agent_step_duration_seconds";
11
+ readonly KICI_AGENT_STEPS_TOTAL: "kici_agent_steps_total";
12
+ readonly KICI_BUILD_JOBS_TOTAL: "kici_build_jobs_total";
13
+ readonly KICI_CACHE_HITS_TOTAL: "kici_cache_hits_total";
14
+ readonly KICI_CACHE_MISSES_TOTAL: "kici_cache_misses_total";
15
+ readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "kici_cross_source_errors_total";
16
+ readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "kici_cross_source_fanout_size";
17
+ readonly KICI_ORCH_AGENTS_ACTIVE: "kici_orch_agents_active";
18
+ readonly KICI_ORCH_BUILD_DURATION_SECONDS: "kici_orch_build_duration_seconds";
19
+ readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "kici_orch_config_reload_total";
20
+ readonly KICI_ORCH_CONFIG_VERSION: "kici_orch_config_version";
21
+ readonly KICI_ORCH_DEDUP_HITS_TOTAL: "kici_orch_dedup_hits_total";
22
+ readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "kici_orch_dep_cache_hits_total";
23
+ readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "kici_orch_dep_cache_misses_total";
24
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH: "kici_orch_dispatch_queue_depth";
25
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "kici_orch_dispatch_queue_depth_by_label";
26
+ readonly KICI_ORCH_EVENT_ATTEMPTS: "kici_orch_event_attempts";
27
+ readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "kici_orch_event_dispatch_success_total";
28
+ readonly KICI_ORCH_EVENT_DLQ_DEPTH: "kici_orch_event_dlq_depth";
29
+ readonly KICI_ORCH_EVENT_DLQ_TOTAL: "kici_orch_event_dlq_total";
30
+ readonly KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: "kici_orch_event_lease_expirations_total";
31
+ readonly KICI_ORCH_EVENT_RETRY_TOTAL: "kici_orch_event_retry_total";
32
+ readonly KICI_ORCH_EXECUTION_DURATION_SECONDS: "kici_orch_execution_duration_seconds";
33
+ readonly KICI_ORCH_EXECUTIONS_TOTAL: "kici_orch_executions_total";
34
+ readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "kici_orch_github_check_run_total";
35
+ readonly KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: "kici_orch_install_secrets_contributor_stripped_total";
36
+ readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "kici_orch_install_secrets_decisions_total";
37
+ readonly KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: "kici_orch_install_secrets_npm_registry_used_total";
38
+ readonly KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: "kici_orch_install_secrets_token_resolution_duration_seconds";
39
+ readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "kici_orch_log_bytes_stored_total";
40
+ readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "kici_orch_log_chunks_received_total";
41
+ readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "kici_orch_scaler_config_reloads_total";
42
+ readonly KICI_ORCH_SCALER_CPUS_USED: "kici_orch_scaler_cpus_used";
43
+ readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: "kici_orch_scaler_memory_bytes_used";
44
+ readonly KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "kici_orch_scaler_spawn_refusals_total";
45
+ readonly KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "kici_orch_source_cache_hits_total";
46
+ readonly KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "kici_orch_source_cache_misses_total";
47
+ readonly KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "kici_orch_stale_detection_duration_seconds";
48
+ readonly KICI_ORCH_STALE_RUNS_CURRENT: "kici_orch_stale_runs_current";
49
+ readonly KICI_ORCH_STALE_RUNS_DETECTED_TOTAL: "kici_orch_stale_runs_detected_total";
50
+ readonly KICI_ORCH_STEPS_TOTAL: "kici_orch_steps_total";
51
+ readonly KICI_ORCH_TRIGGER_MATCH_DURATION_SECONDS: "kici_orch_trigger_match_duration_seconds";
52
+ readonly KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "kici_orch_trust_match_refused_no_id_total";
53
+ readonly KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "kici_orch_webhooks_processed_total";
54
+ readonly KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "kici_orch_webhooks_received_total";
55
+ readonly KICI_ORG_AGENT_MINUTES: "kici_org_agent_minutes";
56
+ readonly KICI_ORG_CONNECTIONS: "kici_org_connections";
57
+ readonly KICI_ORG_EXECUTIONS_COUNT: "kici_org_executions_count";
58
+ readonly KICI_ORG_LOG_BYTES: "kici_org_log_bytes";
59
+ readonly KICI_ORG_STATUS_EVENTS_TOTAL: "kici_org_status_events_total";
60
+ readonly KICI_ORGS_TOTAL: "kici_orgs_total";
61
+ readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "kici_plan_cap_exceeded_total";
62
+ readonly KICI_PLAN_USAGE_RATIO: "kici_plan_usage_ratio";
63
+ readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "kici_platform_cross_tenant_rejections_total";
64
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "kici_platform_dashboard_proxy_duration_seconds";
65
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "kici_platform_dashboard_proxy_pending";
66
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: "kici_platform_dashboard_proxy_requests_total";
67
+ readonly KICI_PLATFORM_EXECUTION_EVENTS_TOTAL: "kici_platform_execution_events_total";
68
+ readonly KICI_PLATFORM_EXECUTION_STATUS_UPDATES_TOTAL: "kici_platform_execution_status_updates_total";
69
+ readonly KICI_PLATFORM_IDENTITY_LINKS_MISSING_PROVIDER_USER_ID: "kici_platform_identity_links_missing_provider_user_id";
70
+ readonly KICI_PLATFORM_JOB_CONSECUTIVE_FAILURES: "kici_platform_job_consecutive_failures";
71
+ readonly KICI_PLATFORM_JOB_DURATION_SECONDS: "kici_platform_job_duration_seconds";
72
+ readonly KICI_PLATFORM_JOB_LAST_FAILURE_TIMESTAMP_SECONDS: "kici_platform_job_last_failure_timestamp_seconds";
73
+ readonly KICI_PLATFORM_JOB_LAST_SUCCESS_TIMESTAMP_SECONDS: "kici_platform_job_last_success_timestamp_seconds";
74
+ readonly KICI_PLATFORM_JOB_RUNS_TOTAL: "kici_platform_job_runs_total";
75
+ readonly KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: "kici_platform_job_status_forwards_total";
76
+ readonly KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: "kici_platform_log_chunks_forwarded_total";
77
+ readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "kici_platform_log_lines_forwarded_total";
78
+ readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "kici_platform_metrics_query_rate_limited_total";
79
+ readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "kici_platform_mimir_relay_errors_total";
80
+ readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "kici_platform_orphan_connections_swept_total";
81
+ readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "kici_platform_stale_orchestrators_total";
82
+ readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "kici_platform_stale_runs_failed_total";
83
+ readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "kici_platform_step_status_forwards_total";
84
+ readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "kici_universal_git_registration_errors_total";
85
+ readonly KICI_VALKEY_CONNECTION_STATUS: "kici_valkey_connection_status";
86
+ readonly KICI_VALKEY_PUBLISH_TOTAL: "kici_valkey_publish_total";
87
+ readonly KICI_VALKEY_RELAY_LATENCY_SECONDS: "kici_valkey_relay_latency_seconds";
88
+ readonly KICI_VALKEY_SUBSCRIBE_RECEIVE_TOTAL: "kici_valkey_subscribe_receive_total";
89
+ readonly KICI_WEBHOOK_PROCESSING_SECONDS: "kici_webhook_processing_seconds";
90
+ readonly KICI_WEBHOOK_SIGNATURE_FAILURES_TOTAL: "kici_webhook_signature_failures_total";
91
+ readonly KICI_WEBHOOKS_RECEIVED_TOTAL: "kici_webhooks_received_total";
92
+ readonly KICI_WS_CONNECTIONS_ACTIVE: "kici_ws_connections_active";
93
+ readonly KICI_WS_CONNECTIONS_TOTAL: "kici_ws_connections_total";
94
+ readonly KICI_WS_HEARTBEAT_AGE_SECONDS: "kici_ws_heartbeat_age_seconds";
95
+ readonly KICI_WS_MESSAGES_RECEIVED_TOTAL: "kici_ws_messages_received_total";
96
+ readonly KICI_WS_MESSAGES_SENT_TOTAL: "kici_ws_messages_sent_total";
97
+ readonly KICI_WS_RELAY_ATTEMPTS_TOTAL: "kici_ws_relay_attempts_total";
98
+ readonly KICI_WS_RELAY_DURATION_SECONDS: "kici_ws_relay_duration_seconds";
99
+ };
100
+ export type MetricName = (typeof MetricNames)[keyof typeof MetricNames];
101
+ export declare const MetricLabels: {
102
+ readonly KICI_AGENT_CLONE_DURATION_SECONDS: readonly ["scaler"];
103
+ readonly KICI_AGENT_CONNECTION_STATUS: readonly ["scaler"];
104
+ readonly KICI_AGENT_JOBS_ACTIVE: readonly ["scaler"];
105
+ readonly KICI_AGENT_JOBS_TOTAL: readonly ["status", "scaler"];
106
+ readonly KICI_AGENT_LOG_BACKPRESSURE_ACTIVE: readonly ["mode", "scaler"];
107
+ readonly KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: readonly ["mode", "scaler"];
108
+ readonly KICI_AGENT_LOG_BYTES_TOTAL: readonly ["scaler"];
109
+ readonly KICI_AGENT_LOG_LINES_DROPPED_TOTAL: readonly ["scaler"];
110
+ readonly KICI_AGENT_STEP_DURATION_SECONDS: readonly ["scaler"];
111
+ readonly KICI_AGENT_STEPS_TOTAL: readonly ["status", "scaler"];
112
+ readonly KICI_BUILD_JOBS_TOTAL: readonly [];
113
+ readonly KICI_CACHE_HITS_TOTAL: readonly ["cache_type"];
114
+ readonly KICI_CACHE_MISSES_TOTAL: readonly ["cache_type"];
115
+ readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: readonly ["reason"];
116
+ readonly KICI_CROSS_SOURCE_FANOUT_SIZE: readonly [];
117
+ readonly KICI_ORCH_AGENTS_ACTIVE: readonly [];
118
+ readonly KICI_ORCH_BUILD_DURATION_SECONDS: readonly [];
119
+ readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: readonly ["result", "source"];
120
+ readonly KICI_ORCH_CONFIG_VERSION: readonly [];
121
+ readonly KICI_ORCH_DEDUP_HITS_TOTAL: readonly [];
122
+ readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: readonly [];
123
+ readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: readonly [];
124
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH: readonly ["status"];
125
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: readonly ["status", "label"];
126
+ readonly KICI_ORCH_EVENT_ATTEMPTS: readonly [];
127
+ readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: readonly [];
128
+ readonly KICI_ORCH_EVENT_DLQ_DEPTH: readonly [];
129
+ readonly KICI_ORCH_EVENT_DLQ_TOTAL: readonly [];
130
+ readonly KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: readonly [];
131
+ readonly KICI_ORCH_EVENT_RETRY_TOTAL: readonly [];
132
+ readonly KICI_ORCH_EXECUTION_DURATION_SECONDS: readonly [];
133
+ readonly KICI_ORCH_EXECUTIONS_TOTAL: readonly ["status"];
134
+ readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: readonly ["operation"];
135
+ readonly KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: readonly ["trust_tier"];
136
+ readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: readonly ["decision", "reason"];
137
+ readonly KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: readonly ["channel", "provider", "scope"];
138
+ readonly KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: readonly ["environment"];
139
+ readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: readonly [];
140
+ readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: readonly [];
141
+ readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: readonly ["result"];
142
+ readonly KICI_ORCH_SCALER_CPUS_USED: readonly [];
143
+ readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: readonly [];
144
+ readonly KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: readonly [];
145
+ readonly KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: readonly [];
146
+ readonly KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: readonly [];
147
+ readonly KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: readonly [];
148
+ readonly KICI_ORCH_STALE_RUNS_CURRENT: readonly [];
149
+ readonly KICI_ORCH_STALE_RUNS_DETECTED_TOTAL: readonly [];
150
+ readonly KICI_ORCH_STEPS_TOTAL: readonly ["status"];
151
+ readonly KICI_ORCH_TRIGGER_MATCH_DURATION_SECONDS: readonly [];
152
+ readonly KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: readonly ["reason"];
153
+ readonly KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: readonly ["result"];
154
+ readonly KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: readonly ["source", "event"];
155
+ readonly KICI_ORG_AGENT_MINUTES: readonly ["org_id", "status"];
156
+ readonly KICI_ORG_CONNECTIONS: readonly ["org_id"];
157
+ readonly KICI_ORG_EXECUTIONS_COUNT: readonly ["org_id", "status"];
158
+ readonly KICI_ORG_LOG_BYTES: readonly ["org_id", "status"];
159
+ readonly KICI_ORG_STATUS_EVENTS_TOTAL: readonly ["org_id", "status"];
160
+ readonly KICI_ORGS_TOTAL: readonly ["plan_type"];
161
+ readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: readonly ["org_id", "dimension"];
162
+ readonly KICI_PLAN_USAGE_RATIO: readonly ["org_id", "dimension"];
163
+ readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: readonly [];
164
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: readonly ["outcome"];
165
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: readonly [];
166
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: readonly ["outcome"];
167
+ readonly KICI_PLATFORM_EXECUTION_EVENTS_TOTAL: readonly ["event"];
168
+ readonly KICI_PLATFORM_EXECUTION_STATUS_UPDATES_TOTAL: readonly ["status"];
169
+ readonly KICI_PLATFORM_IDENTITY_LINKS_MISSING_PROVIDER_USER_ID: readonly [];
170
+ readonly KICI_PLATFORM_JOB_CONSECUTIVE_FAILURES: readonly ["job"];
171
+ readonly KICI_PLATFORM_JOB_DURATION_SECONDS: readonly ["job"];
172
+ readonly KICI_PLATFORM_JOB_LAST_FAILURE_TIMESTAMP_SECONDS: readonly ["job"];
173
+ readonly KICI_PLATFORM_JOB_LAST_SUCCESS_TIMESTAMP_SECONDS: readonly ["job"];
174
+ readonly KICI_PLATFORM_JOB_RUNS_TOTAL: readonly ["job", "result"];
175
+ readonly KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: readonly ["status"];
176
+ readonly KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: readonly [];
177
+ readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: readonly [];
178
+ readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: readonly [];
179
+ readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: readonly ["reason"];
180
+ readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: readonly [];
181
+ readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: readonly [];
182
+ readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: readonly [];
183
+ readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: readonly ["state"];
184
+ readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: readonly ["reason"];
185
+ readonly KICI_VALKEY_CONNECTION_STATUS: readonly ["role"];
186
+ readonly KICI_VALKEY_PUBLISH_TOTAL: readonly ["channel"];
187
+ readonly KICI_VALKEY_RELAY_LATENCY_SECONDS: readonly ["status"];
188
+ readonly KICI_VALKEY_SUBSCRIBE_RECEIVE_TOTAL: readonly ["channel"];
189
+ readonly KICI_WEBHOOK_PROCESSING_SECONDS: readonly ["event"];
190
+ readonly KICI_WEBHOOK_SIGNATURE_FAILURES_TOTAL: readonly ["source", "org_id"];
191
+ readonly KICI_WEBHOOKS_RECEIVED_TOTAL: readonly ["event", "status", "org_id"];
192
+ readonly KICI_WS_CONNECTIONS_ACTIVE: readonly ["routing_key"];
193
+ readonly KICI_WS_CONNECTIONS_TOTAL: readonly ["status"];
194
+ readonly KICI_WS_HEARTBEAT_AGE_SECONDS: readonly ["routing_key"];
195
+ readonly KICI_WS_MESSAGES_RECEIVED_TOTAL: readonly ["type"];
196
+ readonly KICI_WS_MESSAGES_SENT_TOTAL: readonly ["type"];
197
+ readonly KICI_WS_RELAY_ATTEMPTS_TOTAL: readonly ["status"];
198
+ readonly KICI_WS_RELAY_DURATION_SECONDS: readonly ["status"];
199
+ };
200
+ export declare const MetricKind: {
201
+ readonly KICI_AGENT_CLONE_DURATION_SECONDS: "histogram";
202
+ readonly KICI_AGENT_CONNECTION_STATUS: "upDownCounter";
203
+ readonly KICI_AGENT_JOBS_ACTIVE: "upDownCounter";
204
+ readonly KICI_AGENT_JOBS_TOTAL: "counter";
205
+ readonly KICI_AGENT_LOG_BACKPRESSURE_ACTIVE: "upDownCounter";
206
+ readonly KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "counter";
207
+ readonly KICI_AGENT_LOG_BYTES_TOTAL: "counter";
208
+ readonly KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "counter";
209
+ readonly KICI_AGENT_STEP_DURATION_SECONDS: "histogram";
210
+ readonly KICI_AGENT_STEPS_TOTAL: "counter";
211
+ readonly KICI_BUILD_JOBS_TOTAL: "counter";
212
+ readonly KICI_CACHE_HITS_TOTAL: "counter";
213
+ readonly KICI_CACHE_MISSES_TOTAL: "counter";
214
+ readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "counter";
215
+ readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "histogram";
216
+ readonly KICI_ORCH_AGENTS_ACTIVE: "observableGauge";
217
+ readonly KICI_ORCH_BUILD_DURATION_SECONDS: "histogram";
218
+ readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "counter";
219
+ readonly KICI_ORCH_CONFIG_VERSION: "observableGauge";
220
+ readonly KICI_ORCH_DEDUP_HITS_TOTAL: "counter";
221
+ readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "counter";
222
+ readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "counter";
223
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH: "observableGauge";
224
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "observableGauge";
225
+ readonly KICI_ORCH_EVENT_ATTEMPTS: "histogram";
226
+ readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "counter";
227
+ readonly KICI_ORCH_EVENT_DLQ_DEPTH: "observableGauge";
228
+ readonly KICI_ORCH_EVENT_DLQ_TOTAL: "counter";
229
+ readonly KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: "counter";
230
+ readonly KICI_ORCH_EVENT_RETRY_TOTAL: "counter";
231
+ readonly KICI_ORCH_EXECUTION_DURATION_SECONDS: "histogram";
232
+ readonly KICI_ORCH_EXECUTIONS_TOTAL: "counter";
233
+ readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "counter";
234
+ readonly KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: "counter";
235
+ readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "counter";
236
+ readonly KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: "counter";
237
+ readonly KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: "histogram";
238
+ readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "counter";
239
+ readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "counter";
240
+ readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "counter";
241
+ readonly KICI_ORCH_SCALER_CPUS_USED: "observableGauge";
242
+ readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: "observableGauge";
243
+ readonly KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "observableGauge";
244
+ readonly KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "counter";
245
+ readonly KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "counter";
246
+ readonly KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "histogram";
247
+ readonly KICI_ORCH_STALE_RUNS_CURRENT: "observableGauge";
248
+ readonly KICI_ORCH_STALE_RUNS_DETECTED_TOTAL: "counter";
249
+ readonly KICI_ORCH_STEPS_TOTAL: "counter";
250
+ readonly KICI_ORCH_TRIGGER_MATCH_DURATION_SECONDS: "histogram";
251
+ readonly KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "counter";
252
+ readonly KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "counter";
253
+ readonly KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "counter";
254
+ readonly KICI_ORG_AGENT_MINUTES: "observableGauge";
255
+ readonly KICI_ORG_CONNECTIONS: "observableGauge";
256
+ readonly KICI_ORG_EXECUTIONS_COUNT: "observableGauge";
257
+ readonly KICI_ORG_LOG_BYTES: "observableGauge";
258
+ readonly KICI_ORG_STATUS_EVENTS_TOTAL: "counter";
259
+ readonly KICI_ORGS_TOTAL: "observableGauge";
260
+ readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "counter";
261
+ readonly KICI_PLAN_USAGE_RATIO: "observableGauge";
262
+ readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "counter";
263
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "histogram";
264
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "observableGauge";
265
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: "counter";
266
+ readonly KICI_PLATFORM_EXECUTION_EVENTS_TOTAL: "counter";
267
+ readonly KICI_PLATFORM_EXECUTION_STATUS_UPDATES_TOTAL: "counter";
268
+ readonly KICI_PLATFORM_IDENTITY_LINKS_MISSING_PROVIDER_USER_ID: "observableGauge";
269
+ readonly KICI_PLATFORM_JOB_CONSECUTIVE_FAILURES: "observableGauge";
270
+ readonly KICI_PLATFORM_JOB_DURATION_SECONDS: "histogram";
271
+ readonly KICI_PLATFORM_JOB_LAST_FAILURE_TIMESTAMP_SECONDS: "observableGauge";
272
+ readonly KICI_PLATFORM_JOB_LAST_SUCCESS_TIMESTAMP_SECONDS: "observableGauge";
273
+ readonly KICI_PLATFORM_JOB_RUNS_TOTAL: "counter";
274
+ readonly KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: "counter";
275
+ readonly KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: "counter";
276
+ readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "counter";
277
+ readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "counter";
278
+ readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "counter";
279
+ readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "counter";
280
+ readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "counter";
281
+ readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "counter";
282
+ readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "counter";
283
+ readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "counter";
284
+ readonly KICI_VALKEY_CONNECTION_STATUS: "observableGauge";
285
+ readonly KICI_VALKEY_PUBLISH_TOTAL: "counter";
286
+ readonly KICI_VALKEY_RELAY_LATENCY_SECONDS: "histogram";
287
+ readonly KICI_VALKEY_SUBSCRIBE_RECEIVE_TOTAL: "counter";
288
+ readonly KICI_WEBHOOK_PROCESSING_SECONDS: "histogram";
289
+ readonly KICI_WEBHOOK_SIGNATURE_FAILURES_TOTAL: "counter";
290
+ readonly KICI_WEBHOOKS_RECEIVED_TOTAL: "counter";
291
+ readonly KICI_WS_CONNECTIONS_ACTIVE: "upDownCounter";
292
+ readonly KICI_WS_CONNECTIONS_TOTAL: "counter";
293
+ readonly KICI_WS_HEARTBEAT_AGE_SECONDS: "observableGauge";
294
+ readonly KICI_WS_MESSAGES_RECEIVED_TOTAL: "counter";
295
+ readonly KICI_WS_MESSAGES_SENT_TOTAL: "counter";
296
+ readonly KICI_WS_RELAY_ATTEMPTS_TOTAL: "counter";
297
+ readonly KICI_WS_RELAY_DURATION_SECONDS: "histogram";
298
+ };
299
+ export declare const MetricDescription: {
300
+ readonly KICI_AGENT_CLONE_DURATION_SECONDS: "Git clone duration in seconds";
301
+ readonly KICI_AGENT_CONNECTION_STATUS: "Orchestrator WebSocket connection status (0=disconnected, 1=connected)";
302
+ readonly KICI_AGENT_JOBS_ACTIVE: "Number of currently running jobs";
303
+ readonly KICI_AGENT_JOBS_TOTAL: "Total number of completed jobs";
304
+ readonly KICI_AGENT_LOG_BACKPRESSURE_ACTIVE: "Current log-streamer backpressure state (0=normal, 1=active)";
305
+ readonly KICI_AGENT_LOG_BACKPRESSURE_EVENTS_TOTAL: "Total log-streamer backpressure rising-edge events";
306
+ readonly KICI_AGENT_LOG_BYTES_TOTAL: "Total log bytes streamed";
307
+ readonly KICI_AGENT_LOG_LINES_DROPPED_TOTAL: "Total log lines dropped due to backpressure";
308
+ readonly KICI_AGENT_STEP_DURATION_SECONDS: "Step execution duration in seconds";
309
+ readonly KICI_AGENT_STEPS_TOTAL: "Total number of completed steps";
310
+ readonly KICI_BUILD_JOBS_TOTAL: "Total build jobs dispatched";
311
+ readonly KICI_CACHE_HITS_TOTAL: "Total cache hits by type";
312
+ readonly KICI_CACHE_MISSES_TOTAL: "Total cache misses by type";
313
+ readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "Errors encountered during cross-source webhook dispatch";
314
+ readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "Number of webhook-trigger registrations matched when an inbound generic webhook fans out across sources in the same org";
315
+ readonly KICI_ORCH_AGENTS_ACTIVE: "Current number of active agents connected";
316
+ readonly KICI_ORCH_BUILD_DURATION_SECONDS: "Duration of build agent operations in seconds";
317
+ readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "Total number of config reload operations";
318
+ readonly KICI_ORCH_CONFIG_VERSION: "Current shared config version number";
319
+ readonly KICI_ORCH_DEDUP_HITS_TOTAL: "Total number of deduplication cache hits";
320
+ readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "Total number of dep cache hits";
321
+ readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "Total number of dep cache misses";
322
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH: "Current dispatch_queue depth per status (pending, dispatched)";
323
+ readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: "Current pending dispatch_queue depth per runs_on label (multi-label jobs fan out)";
324
+ readonly KICI_ORCH_EVENT_ATTEMPTS: "Distribution of dispatch attempts at terminal outcome (success or DLQ)";
325
+ readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: "Internal events delivered to all matching workflows successfully (after the lease commits processed=true)";
326
+ readonly KICI_ORCH_EVENT_DLQ_DEPTH: "Current count of events sitting in the DLQ awaiting operator triage";
327
+ readonly KICI_ORCH_EVENT_DLQ_TOTAL: "Internal events moved to the DLQ after exhausting retries";
328
+ readonly KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: "Dispatch leases that timed out before the holding node finalised them (signals node crash mid-dispatch)";
329
+ readonly KICI_ORCH_EVENT_RETRY_TOTAL: "Internal-event dispatch failures that triggered a retry (lease released, next_retry_at scheduled)";
330
+ readonly KICI_ORCH_EXECUTION_DURATION_SECONDS: "Duration of execution runs in seconds";
331
+ readonly KICI_ORCH_EXECUTIONS_TOTAL: "Total number of execution runs";
332
+ readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "Total number of GitHub check run API calls";
333
+ readonly KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: "Dispatches where registry tokens were stripped because the contributor tier was not `trusted`";
334
+ readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "Total install-secrets resolution decisions (pass / reject + reason)";
335
+ readonly KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: "Total registry / installEnv entries successfully resolved per channel / provider / scope";
336
+ readonly KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: "Duration of per-environment secret resolution during install-secrets evaluation";
337
+ readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "Total bytes of log data written to storage";
338
+ readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "Total number of log chunks received from agents";
339
+ readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "Total number of scaler config reload operations";
340
+ readonly 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.";
341
+ readonly 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.";
342
+ readonly KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: "Cumulative count of scaler spawn requests refused due to resource caps (maxAgents, resourceCap, globalResourceCap, machinePool).";
343
+ readonly KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: "Total number of source tarball cache hits";
344
+ readonly KICI_ORCH_SOURCE_CACHE_MISSES_TOTAL: "Total number of source tarball cache misses";
345
+ readonly KICI_ORCH_STALE_DETECTION_DURATION_SECONDS: "Time between job becoming stale and detection (seconds)";
346
+ readonly KICI_ORCH_STALE_RUNS_CURRENT: "Current number of stale runs detected in last scan";
347
+ readonly KICI_ORCH_STALE_RUNS_DETECTED_TOTAL: "Total number of stale runs detected and marked as failed";
348
+ readonly KICI_ORCH_STEPS_TOTAL: "Total number of steps executed";
349
+ readonly KICI_ORCH_TRIGGER_MATCH_DURATION_SECONDS: "Duration of trigger matching operations in seconds";
350
+ readonly KICI_ORCH_TRUST_MATCH_REFUSED_NO_ID_TOTAL: "Trust-resolution attempts refused because the provider numeric id was missing or did not match";
351
+ readonly KICI_ORCH_WEBHOOKS_PROCESSED_TOTAL: "Total number of webhooks processed";
352
+ readonly KICI_ORCH_WEBHOOKS_RECEIVED_TOTAL: "Total number of webhooks received";
353
+ readonly KICI_ORG_AGENT_MINUTES: "Per-org total agent runtime in minutes, by terminal status (DB-derived, operator-side capacity-planning aggregate)";
354
+ readonly KICI_ORG_CONNECTIONS: "Active orchestrator connections per org";
355
+ readonly KICI_ORG_EXECUTIONS_COUNT: "Per-org count of execution_runs in each terminal status (DB-derived, operator-side capacity-planning aggregate)";
356
+ readonly KICI_ORG_LOG_BYTES: "Per-org total raw log bytes streamed by agents, by terminal status (DB-derived, operator-side capacity-planning aggregate)";
357
+ readonly KICI_ORG_STATUS_EVENTS_TOTAL: "Total execution.status WS messages received per org/status (observability)";
358
+ readonly KICI_ORGS_TOTAL: "Total organizations by plan type";
359
+ readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "Total times an org hit a plan cap (per dimension)";
360
+ readonly KICI_PLAN_USAGE_RATIO: "Per-org per-dimension usage ratio (current / cap)";
361
+ readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "Total cross-tenant WS messages rejected by the Platform (security invariant). Labels: reason.";
362
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "Dashboard proxy request round-trip duration in seconds";
363
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "In-flight dashboard proxy requests (Platform → orchestrator)";
364
+ readonly KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: "Total dashboard proxy requests by terminal outcome";
365
+ readonly KICI_PLATFORM_EXECUTION_EVENTS_TOTAL: "Total execution events received from orchestrators";
366
+ readonly KICI_PLATFORM_EXECUTION_STATUS_UPDATES_TOTAL: "Total execution status updates received";
367
+ readonly KICI_PLATFORM_IDENTITY_LINKS_MISSING_PROVIDER_USER_ID: "identity_links rows where provider_user_id is still NULL after reconcile";
368
+ readonly KICI_PLATFORM_JOB_CONSECUTIVE_FAILURES: "Consecutive failure count per scheduled job";
369
+ readonly KICI_PLATFORM_JOB_DURATION_SECONDS: "Scheduled job duration in seconds";
370
+ readonly KICI_PLATFORM_JOB_LAST_FAILURE_TIMESTAMP_SECONDS: "Unix timestamp of last failed scheduled job run";
371
+ readonly KICI_PLATFORM_JOB_LAST_SUCCESS_TIMESTAMP_SECONDS: "Unix timestamp of last successful scheduled job run";
372
+ readonly KICI_PLATFORM_JOB_RUNS_TOTAL: "Total scheduled job runs by name and result";
373
+ readonly KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: "Total job status forwards received from orchestrators";
374
+ readonly KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: "Total log chunks forwarded from orchestrators";
375
+ readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators";
376
+ readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).";
377
+ readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.";
378
+ readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections";
379
+ readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected";
380
+ readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "Total execution runs failed due to orchestrator staleness";
381
+ readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "Total step status forwards received";
382
+ readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "Errors encountered while registering universal-git provider bundles";
383
+ readonly KICI_VALKEY_CONNECTION_STATUS: "Valkey connection status per role (1=connected, 0=disconnected)";
384
+ readonly KICI_VALKEY_PUBLISH_TOTAL: "Total messages published to Valkey channels";
385
+ readonly KICI_VALKEY_RELAY_LATENCY_SECONDS: "Latency of cross-instance Valkey relay operations in seconds";
386
+ readonly KICI_VALKEY_SUBSCRIBE_RECEIVE_TOTAL: "Total messages received from Valkey subscriptions";
387
+ readonly KICI_WEBHOOK_PROCESSING_SECONDS: "Webhook processing duration in seconds";
388
+ readonly KICI_WEBHOOK_SIGNATURE_FAILURES_TOTAL: "Total number of webhooks rejected at orchestrator signature verification";
389
+ readonly KICI_WEBHOOKS_RECEIVED_TOTAL: "Total number of webhooks received";
390
+ readonly KICI_WS_CONNECTIONS_ACTIVE: "Current number of active WebSocket connections";
391
+ readonly KICI_WS_CONNECTIONS_TOTAL: "Total number of WebSocket connections";
392
+ readonly KICI_WS_HEARTBEAT_AGE_SECONDS: "Seconds since last heartbeat per routing key";
393
+ readonly KICI_WS_MESSAGES_RECEIVED_TOTAL: "Total messages received from orchestrators";
394
+ readonly KICI_WS_MESSAGES_SENT_TOTAL: "Total messages sent to orchestrators";
395
+ readonly KICI_WS_RELAY_ATTEMPTS_TOTAL: "Total number of webhook relay attempts";
396
+ readonly KICI_WS_RELAY_DURATION_SECONDS: "Duration of webhook relay operations in seconds";
397
+ };
398
+ /** Set of every catalog metric name — O(1) membership for lint / filter UI. */
399
+ export declare const ALL_METRIC_NAMES: readonly string[];
400
+ //# sourceMappingURL=metric-catalog.generated.d.ts.map