@kici-dev/engine 0.1.23 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/approval/types.d.ts +1 -1
  2. package/dist/approval/types.js +1 -1
  3. package/dist/audit/access-log-policy.d.ts +4 -1
  4. package/dist/audit/access-log-policy.js +11 -2
  5. package/dist/audit/activity.d.ts +4 -2
  6. package/dist/audit/activity.js +15 -1
  7. package/dist/audit/retention-policy.js +5 -3
  8. package/dist/bundler/index.js +1 -1
  9. package/dist/bundler/rolldown-config.js +1 -1
  10. package/dist/check-mode.js +1 -1
  11. package/dist/dev-ops/operations.d.ts +56 -0
  12. package/dist/dev-ops/operations.js +135 -0
  13. package/dist/env/environment-allowlist.js +1 -1
  14. package/dist/environment/host-match.js +1 -1
  15. package/dist/environment/index.d.ts +2 -0
  16. package/dist/environment/index.js +4 -2
  17. package/dist/environment/multi-env.d.ts +30 -0
  18. package/dist/environment/multi-env.js +38 -0
  19. package/dist/environment/scope-resolver.js +1 -1
  20. package/dist/environment/scope-template.js +1 -1
  21. package/dist/environment/types.d.ts +8 -2
  22. package/dist/environment/types.js +19 -2
  23. package/dist/fanout/materialize.js +3 -3
  24. package/dist/index.d.ts +10 -1
  25. package/dist/index.js +25 -13
  26. package/dist/inputs/build.js +1 -1
  27. package/dist/inputs/coerce.js +1 -1
  28. package/dist/inputs/descriptor.js +1 -1
  29. package/dist/inputs/extract.js +1 -1
  30. package/dist/inputs/index.d.ts +1 -0
  31. package/dist/inputs/index.js +3 -2
  32. package/dist/inputs/schedule.d.ts +19 -0
  33. package/dist/inputs/schedule.js +33 -0
  34. package/dist/inventory.js +1 -1
  35. package/dist/labels/compile.js +1 -1
  36. package/dist/labels-match.js +1 -1
  37. package/dist/labels.js +2 -2
  38. package/dist/matrix/expand.js +1 -1
  39. package/dist/matrix/format.js +1 -1
  40. package/dist/mcp/fence.d.ts +22 -0
  41. package/dist/mcp/fence.js +65 -0
  42. package/dist/mcp/held-run-resolve.d.ts +52 -0
  43. package/dist/mcp/held-run-resolve.js +53 -0
  44. package/dist/mcp/tool-schemas.d.ts +74 -0
  45. package/dist/mcp/tool-schemas.js +78 -0
  46. package/dist/metrics/catalog-policy.js +1 -1
  47. package/dist/metrics/metric-catalog.generated.d.ts +105 -0
  48. package/dist/metrics/metric-catalog.generated.js +127 -1
  49. package/dist/protocol/analytics-events.js +1 -1
  50. package/dist/protocol/cluster-name.js +1 -1
  51. package/dist/protocol/dashboard-global-workflows.js +1 -1
  52. package/dist/protocol/dashboard-write-operations.d.ts +5 -1
  53. package/dist/protocol/dashboard-write-operations.js +13 -2
  54. package/dist/protocol/event-log-payload.js +1 -1
  55. package/dist/protocol/messages/access-log.d.ts +43 -20
  56. package/dist/protocol/messages/access-log.js +16 -2
  57. package/dist/protocol/messages/actor.d.ts +21 -0
  58. package/dist/protocol/messages/actor.js +42 -8
  59. package/dist/protocol/messages/agent-dev-ops.d.ts +118 -0
  60. package/dist/protocol/messages/agent-dev-ops.js +89 -0
  61. package/dist/protocol/messages/agent-run-result.d.ts +425 -0
  62. package/dist/protocol/messages/agent-run-result.js +165 -0
  63. package/dist/protocol/messages/auth.d.ts +3 -0
  64. package/dist/protocol/messages/auth.js +11 -2
  65. package/dist/protocol/messages/browser.js +1 -1
  66. package/dist/protocol/messages/capabilities.d.ts +3 -0
  67. package/dist/protocol/messages/capabilities.js +16 -3
  68. package/dist/protocol/messages/common.js +1 -1
  69. package/dist/protocol/messages/dashboard-global-workflows.d.ts +14 -0
  70. package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
  71. package/dist/protocol/messages/dashboard.d.ts +1998 -48
  72. package/dist/protocol/messages/dashboard.js +269 -15
  73. package/dist/protocol/messages/deployment-identity.js +1 -1
  74. package/dist/protocol/messages/event-log.js +1 -1
  75. package/dist/protocol/messages/execution-status.d.ts +67 -4
  76. package/dist/protocol/messages/execution-status.js +133 -57
  77. package/dist/protocol/messages/join.js +1 -1
  78. package/dist/protocol/messages/log-pull.js +1 -1
  79. package/dist/protocol/messages/oidc-mint.d.ts +51 -0
  80. package/dist/protocol/messages/oidc-mint.js +55 -0
  81. package/dist/protocol/messages/oidc-token-relay.d.ts +31 -4
  82. package/dist/protocol/messages/oidc-token-relay.js +22 -7
  83. package/dist/protocol/messages/orchestrator-agent.d.ts +66 -5
  84. package/dist/protocol/messages/orchestrator-agent.js +35 -3
  85. package/dist/protocol/messages/pat-kind.d.ts +16 -0
  86. package/dist/protocol/messages/pat-kind.js +17 -0
  87. package/dist/protocol/messages/peer.d.ts +7 -7
  88. package/dist/protocol/messages/peer.js +1 -1
  89. package/dist/protocol/messages/platform-orchestrator.d.ts +685 -17
  90. package/dist/protocol/messages/platform-orchestrator.js +8 -5
  91. package/dist/protocol/messages/run-events.d.ts +8 -1
  92. package/dist/protocol/messages/run-events.js +1 -1
  93. package/dist/protocol/messages/scaler-event.js +1 -1
  94. package/dist/protocol/messages/source-registration.js +1 -1
  95. package/dist/protocol/source-origin.d.ts +20 -0
  96. package/dist/protocol/source-origin.js +21 -0
  97. package/dist/protocol/version.js +1 -1
  98. package/dist/provenance/attestation-origin.d.ts +18 -0
  99. package/dist/provenance/attestation-origin.js +22 -0
  100. package/dist/provenance/bundle.js +1 -1
  101. package/dist/provenance/dsse.js +1 -1
  102. package/dist/provenance/schema.d.ts +48 -0
  103. package/dist/provenance/schema.js +21 -7
  104. package/dist/provenance/statement-hash.d.ts +9 -0
  105. package/dist/provenance/statement-hash.js +17 -0
  106. package/dist/provenance/verify.d.ts +7 -0
  107. package/dist/provenance/verify.js +49 -10
  108. package/dist/provider/changed-files-fetcher.js +1 -1
  109. package/dist/provider/check-run-conclusion.d.ts +1 -1
  110. package/dist/provider/check-run-conclusion.js +1 -1
  111. package/dist/provider/check-status-poster.js +1 -1
  112. package/dist/provider/clone-token-provider.js +1 -1
  113. package/dist/provider/contributor-resolver.js +1 -1
  114. package/dist/provider/index.js +1 -1
  115. package/dist/provider/lock-file-fetcher.js +1 -1
  116. package/dist/provider/lock-file-parse-error.js +1 -1
  117. package/dist/provider/repo-url-builder.js +1 -1
  118. package/dist/provider/types.js +1 -1
  119. package/dist/provider/webhook-normalizer.js +1 -1
  120. package/dist/registration/registerable-trigger-type.d.ts +1 -1
  121. package/dist/registration/registerable-trigger-type.js +1 -1
  122. package/dist/{chunk-BTugEXQM.js → rolldown-runtime-ClRpJifh.js} +0 -1
  123. package/dist/scaler/resource-types.js +1 -1
  124. package/dist/scaler/scaler-backend-type.js +1 -1
  125. package/dist/secrets/index.d.ts +1 -1
  126. package/dist/secrets/index.js +1 -1
  127. package/dist/secrets/types.d.ts +0 -24
  128. package/dist/secrets/types.js +1 -1
  129. package/dist/state-machine/index.js +1 -1
  130. package/dist/state-machine/machine.js +1 -1
  131. package/dist/state-machine/types.js +1 -1
  132. package/dist/trigger/decision-trace.js +1 -1
  133. package/dist/trigger/jsonpath-matcher.js +1 -1
  134. package/dist/trigger/matcher.js +1 -1
  135. package/dist/trigger/trigger-event-type.js +1 -1
  136. package/dist/trigger/types.d.ts +35 -7
  137. package/dist/trigger/types.js +8 -3
  138. package/dist/webhook/signature.js +1 -1
  139. package/dist/webhook/webhook-url-format.d.ts +7 -0
  140. package/dist/webhook/webhook-url-format.js +11 -2
  141. package/dist/ws/close-codes.d.ts +8 -2
  142. package/dist/ws/close-codes.js +10 -4
  143. package/dist/ws/rate-limiter.js +1 -1
  144. package/dist/ws/ws-like.js +1 -1
  145. package/package.json +9 -1
  146. package/sbom.spdx.json +5 -5
@@ -0,0 +1,78 @@
1
+ import "../rolldown-runtime-ClRpJifh.js";
2
+ import { z } from "zod";
3
+ //#region src/mcp/tool-schemas.ts
4
+ /**
5
+ * Zod argument schemas for the KiCI developer MCP tools.
6
+ *
7
+ * Browser-safe (zod only) so they live in the shared engine barrel. Each export
8
+ * is a Zod *raw shape* (a plain object of Zod fields) so it can be passed
9
+ * directly as an MCP tool `inputSchema`. The Platform-hosted developer MCP
10
+ * server (packages/platform/src/mcp/server.ts) is the consumer.
11
+ */
12
+ /**
13
+ * Optional organization id. When the calling user belongs to exactly one org
14
+ * it is resolved automatically; pass it explicitly when a member of several.
15
+ */
16
+ const orgIdArg = z.string().min(1).optional().describe("Organization id. Optional when you belong to exactly one organization.");
17
+ const listRunsToolSchema = {
18
+ orgId: orgIdArg,
19
+ status: z.string().optional().describe("Filter by run status (e.g. success, failed, running)."),
20
+ limit: z.number().int().min(1).max(100).optional().describe("Maximum number of runs to return (default 20).")
21
+ };
22
+ const getRunToolSchema = {
23
+ orgId: orgIdArg,
24
+ runId: z.string().min(1).describe("The run id to fetch.")
25
+ };
26
+ const getStepLogsToolSchema = {
27
+ orgId: orgIdArg,
28
+ runId: z.string().min(1).describe("The run id."),
29
+ jobId: z.string().min(1).describe("The job id within the run."),
30
+ stepIndex: z.number().int().min(0).describe("Zero-based step index within the job."),
31
+ cursor: z.string().optional().describe("Opaque pagination cursor from a prior response nextCursor."),
32
+ limit: z.number().int().positive().optional().describe("Maximum number of log lines to return (capped server-side).")
33
+ };
34
+ const listWorkflowsToolSchema = {
35
+ orgId: orgIdArg,
36
+ stale: z.string().optional().describe("Only workflows not triggered within this duration (e.g. 30d, 7d, 24h, 2h)."),
37
+ triggerType: z.string().optional().describe("Filter by trigger type (e.g. push, pull_request)."),
38
+ repo: z.string().optional().describe("Filter by repository identifier.")
39
+ };
40
+ /** No arguments — lists the organizations the calling user belongs to. */
41
+ const listOrgsToolSchema = {};
42
+ const listSecretsToolSchema = { orgId: orgIdArg };
43
+ const listOrchestratorsToolSchema = { orgId: orgIdArg };
44
+ const getDiagnosticsToolSchema = { orgId: orgIdArg };
45
+ const cancelRunToolSchema = {
46
+ orgId: orgIdArg,
47
+ runId: z.string().min(1).describe("The run id to cancel."),
48
+ force: z.boolean().optional().describe("Force-cancel (SIGKILL, skip cleanup hooks).")
49
+ };
50
+ const rerunRunToolSchema = {
51
+ orgId: orgIdArg,
52
+ runId: z.string().min(1).describe("The run id to re-run.")
53
+ };
54
+ const triggerRunToolSchema = {
55
+ orgId: orgIdArg,
56
+ registrationId: z.string().min(1).describe("The workflow registration id to trigger.")
57
+ };
58
+ const approveRunToolSchema = {
59
+ orgId: orgIdArg,
60
+ runId: z.string().min(1).describe("The run whose held approval gate to approve."),
61
+ job: z.string().optional().describe("Job name, to disambiguate when the run has multiple holds."),
62
+ step: z.string().optional().describe("Zero-based step index (requires job) for a step-scoped hold.")
63
+ };
64
+ const rejectRunToolSchema = {
65
+ orgId: orgIdArg,
66
+ runId: z.string().min(1).describe("The run whose held approval gate to reject."),
67
+ job: z.string().optional().describe("Job name, to disambiguate when the run has multiple holds."),
68
+ step: z.string().optional().describe("Zero-based step index (requires job) for a step-scoped hold."),
69
+ reason: z.string().min(1).describe("Why the gate is rejected (required).")
70
+ };
71
+ const cancelRunsByBranchToolSchema = {
72
+ orgId: orgIdArg,
73
+ branch: z.string().min(1).describe("Cancel all in-progress runs on this branch (ref).")
74
+ };
75
+ //#endregion
76
+ export { approveRunToolSchema, cancelRunToolSchema, cancelRunsByBranchToolSchema, getDiagnosticsToolSchema, getRunToolSchema, getStepLogsToolSchema, listOrchestratorsToolSchema, listOrgsToolSchema, listRunsToolSchema, listSecretsToolSchema, listWorkflowsToolSchema, rejectRunToolSchema, rerunRunToolSchema, triggerRunToolSchema };
77
+
78
+ //# sourceMappingURL=tool-schemas.js.map
@@ -1,4 +1,4 @@
1
- import "../chunk-BTugEXQM.js";
1
+ import "../rolldown-runtime-ClRpJifh.js";
2
2
  import { ExecutionRunStatus } from "../protocol/messages/execution-status.js";
3
3
  import { MetricNames, MetricService } from "./metric-catalog.generated.js";
4
4
  //#region src/metrics/catalog-policy.ts
@@ -15,6 +15,11 @@ export declare const MetricNames: {
15
15
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "kici_cross_source_errors_total";
16
16
  readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "kici_cross_source_fanout_size";
17
17
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "kici_dashboard_relay_latency_seconds";
18
+ readonly KICI_MCP_AUTH_REJECTIONS_TOTAL: "kici_mcp_auth_rejections_total";
19
+ readonly KICI_MCP_DB_POOL_CONNECTIONS: "kici_mcp_db_pool_connections";
20
+ readonly KICI_MCP_RATE_LIMITED_TOTAL: "kici_mcp_rate_limited_total";
21
+ readonly KICI_MCP_TOOL_DURATION_SECONDS: "kici_mcp_tool_duration_seconds";
22
+ readonly KICI_MCP_TOOL_REQUESTS_TOTAL: "kici_mcp_tool_requests_total";
18
23
  readonly KICI_ORCH_AGENTS_ACTIVE: "kici_orch_agents_active";
19
24
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: "kici_orch_build_duration_seconds";
20
25
  readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "kici_orch_config_reload_total";
@@ -45,7 +50,10 @@ export declare const MetricNames: {
45
50
  readonly KICI_ORCH_JOB_RUNS_TOTAL: "kici_orch_job_runs_total";
46
51
  readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "kici_orch_log_bytes_stored_total";
47
52
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "kici_orch_log_chunks_received_total";
53
+ readonly KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "kici_orch_pending_attestation_oldest_age_seconds";
54
+ readonly KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "kici_orch_pending_attestations_current";
48
55
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_orch_pg_pool_client_errors_total";
56
+ readonly KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "kici_orch_rejected_attestations_current";
49
57
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "kici_orch_scaler_config_reloads_total";
50
58
  readonly KICI_ORCH_SCALER_CPUS_USED: "kici_orch_scaler_cpus_used";
51
59
  readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: "kici_orch_scaler_memory_bytes_used";
@@ -69,6 +77,11 @@ export declare const MetricNames: {
69
77
  readonly KICI_ORGS_TOTAL: "kici_orgs_total";
70
78
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "kici_plan_cap_exceeded_total";
71
79
  readonly KICI_PLAN_USAGE_RATIO: "kici_plan_usage_ratio";
80
+ readonly KICI_PLATFORM_COORDINATOR_POOL_SIZE: "kici_platform_coordinator_pool_size";
81
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "kici_platform_coordinator_probe_latency_ms";
82
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "kici_platform_coordinator_probe_timeouts_total";
83
+ readonly KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "kici_platform_coordinator_stale_entries";
84
+ readonly KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "kici_platform_coordinator_zombie_entries_total";
72
85
  readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "kici_platform_cross_tenant_rejections_total";
73
86
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "kici_platform_dashboard_proxy_duration_seconds";
74
87
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "kici_platform_dashboard_proxy_pending";
@@ -86,13 +99,21 @@ export declare const MetricNames: {
86
99
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "kici_platform_log_lines_forwarded_total";
87
100
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "kici_platform_metrics_query_rate_limited_total";
88
101
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "kici_platform_mimir_relay_errors_total";
102
+ readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "kici_platform_notifications_delivered_total";
103
+ readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "kici_platform_notifications_suppressed_total";
89
104
  readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "kici_platform_orch_metrics_filtered_total";
90
105
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "kici_platform_orphan_connections_swept_total";
91
106
  readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_platform_pg_pool_client_errors_total";
107
+ readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "kici_platform_plan_cap_check_errors_total";
108
+ readonly KICI_PLATFORM_RELAY_BREAKER_STATE: "kici_platform_relay_breaker_state";
109
+ readonly KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "kici_platform_relay_breaker_trips_total";
110
+ readonly KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "kici_platform_relay_request_duration_ms";
111
+ readonly KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "kici_platform_relay_request_outcome_total";
92
112
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "kici_platform_stale_orchestrators_total";
93
113
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "kici_platform_stale_platform_connections_evicted_total";
94
114
  readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "kici_platform_stale_runs_failed_total";
95
115
  readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "kici_platform_step_status_forwards_total";
116
+ readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "kici_platform_ws_org_rate_limited_total";
96
117
  readonly KICI_REGISTRATIONS_TOTAL: "kici_registrations_total";
97
118
  readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "kici_universal_git_registration_errors_total";
98
119
  readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "kici_user_registration_notify_total";
@@ -151,6 +172,11 @@ export declare const MetricLabels: {
151
172
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: readonly ["reason"];
152
173
  readonly KICI_CROSS_SOURCE_FANOUT_SIZE: readonly ["event"];
153
174
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: readonly ["outcome"];
175
+ readonly KICI_MCP_AUTH_REJECTIONS_TOTAL: readonly ["reason"];
176
+ readonly KICI_MCP_DB_POOL_CONNECTIONS: readonly ["state"];
177
+ readonly KICI_MCP_RATE_LIMITED_TOTAL: readonly ["kind"];
178
+ readonly KICI_MCP_TOOL_DURATION_SECONDS: readonly ["tool"];
179
+ readonly KICI_MCP_TOOL_REQUESTS_TOTAL: readonly ["tool", "outcome"];
154
180
  readonly KICI_ORCH_AGENTS_ACTIVE: readonly [];
155
181
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: readonly [];
156
182
  readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: readonly ["result", "source"];
@@ -181,7 +207,10 @@ export declare const MetricLabels: {
181
207
  readonly KICI_ORCH_JOB_RUNS_TOTAL: readonly ["job", "result"];
182
208
  readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: readonly [];
183
209
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: readonly [];
210
+ readonly KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: readonly [];
211
+ readonly KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: readonly [];
184
212
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: readonly ["source"];
213
+ readonly KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: readonly [];
185
214
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: readonly ["result"];
186
215
  readonly KICI_ORCH_SCALER_CPUS_USED: readonly ["scaler", "scalerType", "machinePool"];
187
216
  readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: readonly ["scaler", "scalerType", "machinePool"];
@@ -205,6 +234,11 @@ export declare const MetricLabels: {
205
234
  readonly KICI_ORGS_TOTAL: readonly ["plan_type"];
206
235
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: readonly ["org_id", "dimension"];
207
236
  readonly KICI_PLAN_USAGE_RATIO: readonly ["org_id", "dimension"];
237
+ readonly KICI_PLATFORM_COORDINATOR_POOL_SIZE: readonly ["routingKey"];
238
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: readonly ["clusterName", "connectionId"];
239
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: readonly ["clusterName", "connectionId"];
240
+ readonly KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: readonly [];
241
+ readonly KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: readonly ["clusterName"];
208
242
  readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: readonly ["reason"];
209
243
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: readonly ["outcome"];
210
244
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: readonly [];
@@ -222,13 +256,21 @@ export declare const MetricLabels: {
222
256
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: readonly [];
223
257
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: readonly ["org_id"];
224
258
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: readonly ["reason"];
259
+ readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: readonly ["channel_type", "result"];
260
+ readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: readonly ["org_id"];
225
261
  readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: readonly ["reason", "metric"];
226
262
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: readonly [];
227
263
  readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: readonly ["source"];
264
+ readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: readonly ["org_id"];
265
+ readonly KICI_PLATFORM_RELAY_BREAKER_STATE: readonly ["clusterName", "connectionId"];
266
+ readonly KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: readonly ["clusterName", "connectionId"];
267
+ readonly KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: readonly ["kind"];
268
+ readonly KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: readonly ["outcome", "kind"];
228
269
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: readonly [];
229
270
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: readonly ["org_id"];
230
271
  readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: readonly [];
231
272
  readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: readonly ["state"];
273
+ readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: readonly ["org_id"];
232
274
  readonly KICI_REGISTRATIONS_TOTAL: readonly [];
233
275
  readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: readonly ["reason"];
234
276
  readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: readonly ["result"];
@@ -286,6 +328,11 @@ export declare const MetricKind: {
286
328
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "counter";
287
329
  readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "histogram";
288
330
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "histogram";
331
+ readonly KICI_MCP_AUTH_REJECTIONS_TOTAL: "counter";
332
+ readonly KICI_MCP_DB_POOL_CONNECTIONS: "observableGauge";
333
+ readonly KICI_MCP_RATE_LIMITED_TOTAL: "counter";
334
+ readonly KICI_MCP_TOOL_DURATION_SECONDS: "histogram";
335
+ readonly KICI_MCP_TOOL_REQUESTS_TOTAL: "counter";
289
336
  readonly KICI_ORCH_AGENTS_ACTIVE: "observableGauge";
290
337
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: "histogram";
291
338
  readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "counter";
@@ -316,7 +363,10 @@ export declare const MetricKind: {
316
363
  readonly KICI_ORCH_JOB_RUNS_TOTAL: "counter";
317
364
  readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "counter";
318
365
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "counter";
366
+ readonly KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "observableGauge";
367
+ readonly KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "observableGauge";
319
368
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "counter";
369
+ readonly KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "observableGauge";
320
370
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "counter";
321
371
  readonly KICI_ORCH_SCALER_CPUS_USED: "observableGauge";
322
372
  readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: "observableGauge";
@@ -340,6 +390,11 @@ export declare const MetricKind: {
340
390
  readonly KICI_ORGS_TOTAL: "observableGauge";
341
391
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "counter";
342
392
  readonly KICI_PLAN_USAGE_RATIO: "observableGauge";
393
+ readonly KICI_PLATFORM_COORDINATOR_POOL_SIZE: "observableGauge";
394
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "histogram";
395
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "counter";
396
+ readonly KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "observableGauge";
397
+ readonly KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "counter";
343
398
  readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "counter";
344
399
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "histogram";
345
400
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "observableGauge";
@@ -357,13 +412,21 @@ export declare const MetricKind: {
357
412
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "counter";
358
413
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "counter";
359
414
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "counter";
415
+ readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "counter";
416
+ readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "counter";
360
417
  readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "counter";
361
418
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "counter";
362
419
  readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "counter";
420
+ readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "counter";
421
+ readonly KICI_PLATFORM_RELAY_BREAKER_STATE: "observableGauge";
422
+ readonly KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "counter";
423
+ readonly KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "histogram";
424
+ readonly KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "counter";
363
425
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "counter";
364
426
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "counter";
365
427
  readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "counter";
366
428
  readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "counter";
429
+ readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "counter";
367
430
  readonly KICI_REGISTRATIONS_TOTAL: "counter";
368
431
  readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "counter";
369
432
  readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "counter";
@@ -421,6 +484,11 @@ export declare const MetricDescription: {
421
484
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "Errors encountered during cross-source webhook dispatch";
422
485
  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";
423
486
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "Round-trip latency of a cross-instance dashboard relay request";
487
+ readonly KICI_MCP_AUTH_REJECTIONS_TOTAL: "Developer-MCP requests rejected by the agent-credential gate";
488
+ readonly KICI_MCP_DB_POOL_CONNECTIONS: "MCP-dedicated Postgres pool connection counts";
489
+ readonly KICI_MCP_RATE_LIMITED_TOTAL: "Developer-MCP requests rejected by the per-credential rate limiter";
490
+ readonly KICI_MCP_TOOL_DURATION_SECONDS: "Developer-MCP tool invocation duration in seconds";
491
+ readonly KICI_MCP_TOOL_REQUESTS_TOTAL: "Total developer-MCP tool invocations by tool and outcome";
424
492
  readonly KICI_ORCH_AGENTS_ACTIVE: "Current number of active agents connected";
425
493
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: "Duration of build agent operations in seconds";
426
494
  readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "Total number of config reload operations";
@@ -451,7 +519,10 @@ export declare const MetricDescription: {
451
519
  readonly KICI_ORCH_JOB_RUNS_TOTAL: "Scheduled job run outcomes, by job and result (success/failure)";
452
520
  readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "Total bytes of log data written to storage";
453
521
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "Total number of log chunks received from agents";
522
+ readonly KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "Age of the oldest deferred attestation in the outbox";
523
+ readonly KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "Deferred attestations awaiting a later mint";
454
524
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart";
525
+ readonly 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";
455
526
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "Total number of scaler config reload operations";
456
527
  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.";
457
528
  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.";
@@ -475,6 +546,11 @@ export declare const MetricDescription: {
475
546
  readonly KICI_ORGS_TOTAL: "Total organizations by plan type";
476
547
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "Total times an org hit a plan cap (per dimension)";
477
548
  readonly KICI_PLAN_USAGE_RATIO: "Per-org per-dimension usage ratio (current / cap)";
549
+ readonly KICI_PLATFORM_COORDINATOR_POOL_SIZE: "Coordinator pool size per routing key";
550
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "Active coordinator liveness-probe round-trip latency in ms";
551
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "Active coordinator liveness-probe timeouts";
552
+ readonly KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "Stale (non-OPEN socket) coordinator entries in the pool per routing key";
553
+ readonly KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "Zombie (non-OPEN) coordinator entries encountered during relay selection";
478
554
  readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "Total cross-tenant WS messages rejected by the Platform (security invariant). Labels: reason.";
479
555
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "Dashboard proxy request round-trip duration in seconds";
480
556
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "In-flight dashboard proxy requests (Platform → orchestrator)";
@@ -492,13 +568,21 @@ export declare const MetricDescription: {
492
568
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators";
493
569
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).";
494
570
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.";
571
+ readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "Notification delivery attempts that reached a terminal outcome";
572
+ readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "Run-terminal notifications suppressed by the per-org notification quota";
495
573
  readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason, metric.";
496
574
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections";
497
575
  readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart";
576
+ readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "WS connection rejected because the plan-limit check errored (fail-closed)";
577
+ readonly KICI_PLATFORM_RELAY_BREAKER_STATE: "Relay circuit-breaker state per coordinator (0=closed,1=half-open,2=open)";
578
+ readonly KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "Relay circuit-breaker open transitions per coordinator";
579
+ readonly KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "End-to-end dashboard-proxy relay latency incl. failover, in ms";
580
+ readonly KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "Dashboard-proxy relay request outcomes (incl. sibling failover)";
498
581
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected";
499
582
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform_connections rows evicted by source.register DB dedup (same-instance reconnect path)";
500
583
  readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "Total execution runs failed due to orchestrator staleness";
501
584
  readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "Total step status forwards received";
585
+ readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "Inbound orchestrator messages dropped by the per-org aggregate WS rate limit";
502
586
  readonly KICI_REGISTRATIONS_TOTAL: "Total user registrations (new personal orgs created on first login)";
503
587
  readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "Errors encountered while registering universal-git provider bundles";
504
588
  readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "New-user Telegram notifications by result (sent|failed)";
@@ -563,6 +647,11 @@ export declare const MetricService: {
563
647
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: "orchestrator";
564
648
  readonly KICI_CROSS_SOURCE_FANOUT_SIZE: "orchestrator";
565
649
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "platform";
650
+ readonly KICI_MCP_AUTH_REJECTIONS_TOTAL: "platform";
651
+ readonly KICI_MCP_DB_POOL_CONNECTIONS: "platform";
652
+ readonly KICI_MCP_RATE_LIMITED_TOTAL: "platform";
653
+ readonly KICI_MCP_TOOL_DURATION_SECONDS: "platform";
654
+ readonly KICI_MCP_TOOL_REQUESTS_TOTAL: "platform";
566
655
  readonly KICI_ORCH_AGENTS_ACTIVE: "orchestrator";
567
656
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: "orchestrator";
568
657
  readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "orchestrator";
@@ -593,7 +682,10 @@ export declare const MetricService: {
593
682
  readonly KICI_ORCH_JOB_RUNS_TOTAL: "orchestrator";
594
683
  readonly KICI_ORCH_LOG_BYTES_STORED_TOTAL: "orchestrator";
595
684
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "orchestrator";
685
+ readonly KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "orchestrator";
686
+ readonly KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "orchestrator";
596
687
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "orchestrator";
688
+ readonly KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "orchestrator";
597
689
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "orchestrator";
598
690
  readonly KICI_ORCH_SCALER_CPUS_USED: "orchestrator";
599
691
  readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: "orchestrator";
@@ -617,6 +709,11 @@ export declare const MetricService: {
617
709
  readonly KICI_ORGS_TOTAL: "platform";
618
710
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: "platform";
619
711
  readonly KICI_PLAN_USAGE_RATIO: "platform";
712
+ readonly KICI_PLATFORM_COORDINATOR_POOL_SIZE: "platform";
713
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "platform";
714
+ readonly KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "platform";
715
+ readonly KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "platform";
716
+ readonly KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "platform";
620
717
  readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "platform";
621
718
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "platform";
622
719
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "platform";
@@ -634,13 +731,21 @@ export declare const MetricService: {
634
731
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "platform";
635
732
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "platform";
636
733
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "platform";
734
+ readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "platform";
735
+ readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "platform";
637
736
  readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "platform";
638
737
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "platform";
639
738
  readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "platform";
739
+ readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "platform";
740
+ readonly KICI_PLATFORM_RELAY_BREAKER_STATE: "platform";
741
+ readonly KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "platform";
742
+ readonly KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "platform";
743
+ readonly KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "platform";
640
744
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "platform";
641
745
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform";
642
746
  readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "platform";
643
747
  readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "platform";
748
+ readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "platform";
644
749
  readonly KICI_REGISTRATIONS_TOTAL: "platform";
645
750
  readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "orchestrator";
646
751
  readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "platform";