@kici-dev/engine 0.1.24 → 0.1.26
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.
- package/dist/approval/types.d.ts +1 -1
- package/dist/approval/types.js +1 -1
- package/dist/audit/access-log-policy.js +3 -2
- package/dist/audit/activity.d.ts +2 -0
- package/dist/audit/activity.js +15 -1
- package/dist/audit/retention-policy.js +3 -3
- package/dist/bundler/index.js +1 -1
- package/dist/bundler/rolldown-config.js +1 -1
- package/dist/check-mode.js +1 -1
- package/dist/dev-ops/operations.d.ts +56 -0
- package/dist/dev-ops/operations.js +135 -0
- package/dist/env/environment-allowlist.js +1 -1
- package/dist/environment/host-match.js +1 -1
- package/dist/environment/index.js +1 -1
- package/dist/environment/multi-env.js +1 -1
- package/dist/environment/scope-resolver.js +1 -1
- package/dist/environment/scope-template.js +1 -1
- package/dist/environment/types.js +1 -1
- package/dist/fanout/materialize.js +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.js +16 -10
- package/dist/inputs/build.js +1 -1
- package/dist/inputs/coerce.js +1 -1
- package/dist/inputs/descriptor.js +1 -1
- package/dist/inputs/extract.js +1 -1
- package/dist/inputs/index.js +1 -1
- package/dist/inputs/schedule.js +1 -1
- package/dist/inventory.js +1 -1
- package/dist/labels/compile.js +1 -1
- package/dist/labels-match.js +1 -1
- package/dist/labels.js +2 -2
- package/dist/matrix/expand.js +1 -1
- package/dist/matrix/format.js +1 -1
- package/dist/mcp/fence.d.ts +22 -0
- package/dist/mcp/fence.js +65 -0
- package/dist/mcp/held-run-resolve.d.ts +52 -0
- package/dist/mcp/held-run-resolve.js +53 -0
- package/dist/mcp/tool-schemas.d.ts +38 -5
- package/dist/mcp/tool-schemas.js +38 -9
- package/dist/metrics/catalog-policy.js +1 -1
- package/dist/metrics/metric-catalog.generated.d.ts +85 -0
- package/dist/metrics/metric-catalog.generated.js +103 -1
- package/dist/protocol/analytics-events.js +1 -1
- package/dist/protocol/cluster-name.js +1 -1
- package/dist/protocol/dashboard-global-workflows.js +1 -1
- package/dist/protocol/dashboard-write-operations.d.ts +5 -1
- package/dist/protocol/dashboard-write-operations.js +13 -2
- package/dist/protocol/event-log-payload.js +1 -1
- package/dist/protocol/messages/access-log.d.ts +14 -5
- package/dist/protocol/messages/access-log.js +13 -1
- package/dist/protocol/messages/actor.d.ts +13 -0
- package/dist/protocol/messages/actor.js +25 -5
- package/dist/protocol/messages/agent-dev-ops.d.ts +118 -0
- package/dist/protocol/messages/agent-dev-ops.js +89 -0
- package/dist/protocol/messages/agent-run-result.d.ts +77 -2
- package/dist/protocol/messages/agent-run-result.js +44 -2
- package/dist/protocol/messages/auth.d.ts +1 -0
- package/dist/protocol/messages/auth.js +1 -1
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.d.ts +1 -0
- package/dist/protocol/messages/capabilities.js +1 -1
- package/dist/protocol/messages/common.js +1 -1
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +6 -0
- package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
- package/dist/protocol/messages/dashboard.d.ts +634 -18
- package/dist/protocol/messages/dashboard.js +111 -12
- package/dist/protocol/messages/deployment-identity.js +1 -1
- package/dist/protocol/messages/event-log.js +1 -1
- package/dist/protocol/messages/execution-status.d.ts +15 -3
- package/dist/protocol/messages/execution-status.js +19 -4
- package/dist/protocol/messages/join.js +1 -1
- package/dist/protocol/messages/log-pull.js +1 -1
- package/dist/protocol/messages/oidc-mint.d.ts +51 -0
- package/dist/protocol/messages/oidc-mint.js +55 -0
- package/dist/protocol/messages/oidc-token-relay.d.ts +31 -4
- package/dist/protocol/messages/oidc-token-relay.js +22 -7
- package/dist/protocol/messages/orchestrator-agent.d.ts +45 -0
- package/dist/protocol/messages/orchestrator-agent.js +30 -2
- package/dist/protocol/messages/pat-kind.js +1 -1
- package/dist/protocol/messages/peer.js +1 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +292 -10
- package/dist/protocol/messages/platform-orchestrator.js +5 -2
- package/dist/protocol/messages/run-events.d.ts +3 -0
- package/dist/protocol/messages/run-events.js +1 -1
- package/dist/protocol/messages/scaler-event.js +1 -1
- package/dist/protocol/messages/source-registration.js +1 -1
- package/dist/protocol/source-origin.d.ts +20 -0
- package/dist/protocol/source-origin.js +21 -0
- package/dist/protocol/version.js +1 -1
- package/dist/provenance/attestation-origin.d.ts +18 -0
- package/dist/provenance/attestation-origin.js +22 -0
- package/dist/provenance/bundle.js +1 -1
- package/dist/provenance/dsse.js +1 -1
- package/dist/provenance/schema.d.ts +48 -0
- package/dist/provenance/schema.js +21 -7
- package/dist/provenance/statement-hash.d.ts +9 -0
- package/dist/provenance/statement-hash.js +17 -0
- package/dist/provenance/verify.d.ts +7 -0
- package/dist/provenance/verify.js +49 -10
- package/dist/provider/changed-files-fetcher.js +1 -1
- package/dist/provider/check-run-conclusion.js +1 -1
- package/dist/provider/check-status-poster.js +1 -1
- package/dist/provider/clone-token-provider.js +1 -1
- package/dist/provider/contributor-resolver.js +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/lock-file-fetcher.js +1 -1
- package/dist/provider/lock-file-parse-error.js +1 -1
- package/dist/provider/repo-url-builder.js +1 -1
- package/dist/provider/types.js +1 -1
- package/dist/provider/webhook-normalizer.js +1 -1
- package/dist/registration/registerable-trigger-type.d.ts +1 -1
- package/dist/registration/registerable-trigger-type.js +1 -1
- package/dist/{chunk-BTugEXQM.js → rolldown-runtime-ClRpJifh.js} +0 -1
- package/dist/scaler/resource-types.js +1 -1
- package/dist/scaler/scaler-backend-type.js +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/types.d.ts +0 -24
- package/dist/secrets/types.js +1 -1
- package/dist/state-machine/index.js +1 -1
- package/dist/state-machine/machine.js +1 -1
- package/dist/state-machine/types.js +1 -1
- package/dist/trigger/decision-trace.js +1 -1
- package/dist/trigger/jsonpath-matcher.js +1 -1
- package/dist/trigger/matcher.js +1 -1
- package/dist/trigger/trigger-event-type.js +1 -1
- package/dist/trigger/types.js +1 -1
- package/dist/webhook/signature.js +1 -1
- package/dist/webhook/webhook-url-format.d.ts +7 -0
- package/dist/webhook/webhook-url-format.js +11 -2
- package/dist/ws/close-codes.d.ts +8 -2
- package/dist/ws/close-codes.js +10 -4
- package/dist/ws/rate-limiter.js +1 -1
- package/dist/ws/ws-like.js +1 -1
- package/package.json +9 -1
- package/sbom.spdx.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
//#region src/metrics/metric-catalog.generated.ts
|
|
3
3
|
const MetricNames = {
|
|
4
4
|
KICI_AGENT_CLONE_DURATION_SECONDS: "kici_agent_clone_duration_seconds",
|
|
@@ -17,6 +17,11 @@ const MetricNames = {
|
|
|
17
17
|
KICI_CROSS_SOURCE_ERRORS_TOTAL: "kici_cross_source_errors_total",
|
|
18
18
|
KICI_CROSS_SOURCE_FANOUT_SIZE: "kici_cross_source_fanout_size",
|
|
19
19
|
KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "kici_dashboard_relay_latency_seconds",
|
|
20
|
+
KICI_MCP_AUTH_REJECTIONS_TOTAL: "kici_mcp_auth_rejections_total",
|
|
21
|
+
KICI_MCP_DB_POOL_CONNECTIONS: "kici_mcp_db_pool_connections",
|
|
22
|
+
KICI_MCP_RATE_LIMITED_TOTAL: "kici_mcp_rate_limited_total",
|
|
23
|
+
KICI_MCP_TOOL_DURATION_SECONDS: "kici_mcp_tool_duration_seconds",
|
|
24
|
+
KICI_MCP_TOOL_REQUESTS_TOTAL: "kici_mcp_tool_requests_total",
|
|
20
25
|
KICI_ORCH_AGENTS_ACTIVE: "kici_orch_agents_active",
|
|
21
26
|
KICI_ORCH_BUILD_DURATION_SECONDS: "kici_orch_build_duration_seconds",
|
|
22
27
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "kici_orch_config_reload_total",
|
|
@@ -47,7 +52,10 @@ const MetricNames = {
|
|
|
47
52
|
KICI_ORCH_JOB_RUNS_TOTAL: "kici_orch_job_runs_total",
|
|
48
53
|
KICI_ORCH_LOG_BYTES_STORED_TOTAL: "kici_orch_log_bytes_stored_total",
|
|
49
54
|
KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "kici_orch_log_chunks_received_total",
|
|
55
|
+
KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "kici_orch_pending_attestation_oldest_age_seconds",
|
|
56
|
+
KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "kici_orch_pending_attestations_current",
|
|
50
57
|
KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_orch_pg_pool_client_errors_total",
|
|
58
|
+
KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "kici_orch_rejected_attestations_current",
|
|
51
59
|
KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "kici_orch_scaler_config_reloads_total",
|
|
52
60
|
KICI_ORCH_SCALER_CPUS_USED: "kici_orch_scaler_cpus_used",
|
|
53
61
|
KICI_ORCH_SCALER_MEMORY_BYTES_USED: "kici_orch_scaler_memory_bytes_used",
|
|
@@ -71,6 +79,11 @@ const MetricNames = {
|
|
|
71
79
|
KICI_ORGS_TOTAL: "kici_orgs_total",
|
|
72
80
|
KICI_PLAN_CAP_EXCEEDED_TOTAL: "kici_plan_cap_exceeded_total",
|
|
73
81
|
KICI_PLAN_USAGE_RATIO: "kici_plan_usage_ratio",
|
|
82
|
+
KICI_PLATFORM_COORDINATOR_POOL_SIZE: "kici_platform_coordinator_pool_size",
|
|
83
|
+
KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "kici_platform_coordinator_probe_latency_ms",
|
|
84
|
+
KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "kici_platform_coordinator_probe_timeouts_total",
|
|
85
|
+
KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "kici_platform_coordinator_stale_entries",
|
|
86
|
+
KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "kici_platform_coordinator_zombie_entries_total",
|
|
74
87
|
KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "kici_platform_cross_tenant_rejections_total",
|
|
75
88
|
KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "kici_platform_dashboard_proxy_duration_seconds",
|
|
76
89
|
KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "kici_platform_dashboard_proxy_pending",
|
|
@@ -94,6 +107,10 @@ const MetricNames = {
|
|
|
94
107
|
KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "kici_platform_orphan_connections_swept_total",
|
|
95
108
|
KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_platform_pg_pool_client_errors_total",
|
|
96
109
|
KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "kici_platform_plan_cap_check_errors_total",
|
|
110
|
+
KICI_PLATFORM_RELAY_BREAKER_STATE: "kici_platform_relay_breaker_state",
|
|
111
|
+
KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "kici_platform_relay_breaker_trips_total",
|
|
112
|
+
KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "kici_platform_relay_request_duration_ms",
|
|
113
|
+
KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "kici_platform_relay_request_outcome_total",
|
|
97
114
|
KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "kici_platform_stale_orchestrators_total",
|
|
98
115
|
KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "kici_platform_stale_platform_connections_evicted_total",
|
|
99
116
|
KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "kici_platform_stale_runs_failed_total",
|
|
@@ -156,6 +173,11 @@ const MetricLabels = {
|
|
|
156
173
|
KICI_CROSS_SOURCE_ERRORS_TOTAL: ["reason"],
|
|
157
174
|
KICI_CROSS_SOURCE_FANOUT_SIZE: ["event"],
|
|
158
175
|
KICI_DASHBOARD_RELAY_LATENCY_SECONDS: ["outcome"],
|
|
176
|
+
KICI_MCP_AUTH_REJECTIONS_TOTAL: ["reason"],
|
|
177
|
+
KICI_MCP_DB_POOL_CONNECTIONS: ["state"],
|
|
178
|
+
KICI_MCP_RATE_LIMITED_TOTAL: ["kind"],
|
|
179
|
+
KICI_MCP_TOOL_DURATION_SECONDS: ["tool"],
|
|
180
|
+
KICI_MCP_TOOL_REQUESTS_TOTAL: ["tool", "outcome"],
|
|
159
181
|
KICI_ORCH_AGENTS_ACTIVE: [],
|
|
160
182
|
KICI_ORCH_BUILD_DURATION_SECONDS: [],
|
|
161
183
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: ["result", "source"],
|
|
@@ -190,7 +212,10 @@ const MetricLabels = {
|
|
|
190
212
|
KICI_ORCH_JOB_RUNS_TOTAL: ["job", "result"],
|
|
191
213
|
KICI_ORCH_LOG_BYTES_STORED_TOTAL: [],
|
|
192
214
|
KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: [],
|
|
215
|
+
KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: [],
|
|
216
|
+
KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: [],
|
|
193
217
|
KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: ["source"],
|
|
218
|
+
KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: [],
|
|
194
219
|
KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: ["result"],
|
|
195
220
|
KICI_ORCH_SCALER_CPUS_USED: [
|
|
196
221
|
"scaler",
|
|
@@ -222,6 +247,11 @@ const MetricLabels = {
|
|
|
222
247
|
KICI_ORGS_TOTAL: ["plan_type"],
|
|
223
248
|
KICI_PLAN_CAP_EXCEEDED_TOTAL: ["org_id", "dimension"],
|
|
224
249
|
KICI_PLAN_USAGE_RATIO: ["org_id", "dimension"],
|
|
250
|
+
KICI_PLATFORM_COORDINATOR_POOL_SIZE: ["routingKey"],
|
|
251
|
+
KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: ["clusterName", "connectionId"],
|
|
252
|
+
KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: ["clusterName", "connectionId"],
|
|
253
|
+
KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: [],
|
|
254
|
+
KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: ["clusterName"],
|
|
225
255
|
KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: ["reason"],
|
|
226
256
|
KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: ["outcome"],
|
|
227
257
|
KICI_PLATFORM_DASHBOARD_PROXY_PENDING: [],
|
|
@@ -245,6 +275,10 @@ const MetricLabels = {
|
|
|
245
275
|
KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: [],
|
|
246
276
|
KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: ["source"],
|
|
247
277
|
KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: ["org_id"],
|
|
278
|
+
KICI_PLATFORM_RELAY_BREAKER_STATE: ["clusterName", "connectionId"],
|
|
279
|
+
KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: ["clusterName", "connectionId"],
|
|
280
|
+
KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: ["kind"],
|
|
281
|
+
KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: ["outcome", "kind"],
|
|
248
282
|
KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: [],
|
|
249
283
|
KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: ["org_id"],
|
|
250
284
|
KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: [],
|
|
@@ -311,6 +345,11 @@ const MetricKind = {
|
|
|
311
345
|
KICI_CROSS_SOURCE_ERRORS_TOTAL: "counter",
|
|
312
346
|
KICI_CROSS_SOURCE_FANOUT_SIZE: "histogram",
|
|
313
347
|
KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "histogram",
|
|
348
|
+
KICI_MCP_AUTH_REJECTIONS_TOTAL: "counter",
|
|
349
|
+
KICI_MCP_DB_POOL_CONNECTIONS: "observableGauge",
|
|
350
|
+
KICI_MCP_RATE_LIMITED_TOTAL: "counter",
|
|
351
|
+
KICI_MCP_TOOL_DURATION_SECONDS: "histogram",
|
|
352
|
+
KICI_MCP_TOOL_REQUESTS_TOTAL: "counter",
|
|
314
353
|
KICI_ORCH_AGENTS_ACTIVE: "observableGauge",
|
|
315
354
|
KICI_ORCH_BUILD_DURATION_SECONDS: "histogram",
|
|
316
355
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "counter",
|
|
@@ -341,7 +380,10 @@ const MetricKind = {
|
|
|
341
380
|
KICI_ORCH_JOB_RUNS_TOTAL: "counter",
|
|
342
381
|
KICI_ORCH_LOG_BYTES_STORED_TOTAL: "counter",
|
|
343
382
|
KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "counter",
|
|
383
|
+
KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "observableGauge",
|
|
384
|
+
KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "observableGauge",
|
|
344
385
|
KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "counter",
|
|
386
|
+
KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "observableGauge",
|
|
345
387
|
KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "counter",
|
|
346
388
|
KICI_ORCH_SCALER_CPUS_USED: "observableGauge",
|
|
347
389
|
KICI_ORCH_SCALER_MEMORY_BYTES_USED: "observableGauge",
|
|
@@ -365,6 +407,11 @@ const MetricKind = {
|
|
|
365
407
|
KICI_ORGS_TOTAL: "observableGauge",
|
|
366
408
|
KICI_PLAN_CAP_EXCEEDED_TOTAL: "counter",
|
|
367
409
|
KICI_PLAN_USAGE_RATIO: "observableGauge",
|
|
410
|
+
KICI_PLATFORM_COORDINATOR_POOL_SIZE: "observableGauge",
|
|
411
|
+
KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "histogram",
|
|
412
|
+
KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "counter",
|
|
413
|
+
KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "observableGauge",
|
|
414
|
+
KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "counter",
|
|
368
415
|
KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "counter",
|
|
369
416
|
KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "histogram",
|
|
370
417
|
KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "observableGauge",
|
|
@@ -388,6 +435,10 @@ const MetricKind = {
|
|
|
388
435
|
KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "counter",
|
|
389
436
|
KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "counter",
|
|
390
437
|
KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "counter",
|
|
438
|
+
KICI_PLATFORM_RELAY_BREAKER_STATE: "observableGauge",
|
|
439
|
+
KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "counter",
|
|
440
|
+
KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "histogram",
|
|
441
|
+
KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "counter",
|
|
391
442
|
KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "counter",
|
|
392
443
|
KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "counter",
|
|
393
444
|
KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "counter",
|
|
@@ -450,6 +501,11 @@ const MetricDescription = {
|
|
|
450
501
|
KICI_CROSS_SOURCE_ERRORS_TOTAL: "Errors encountered during cross-source webhook dispatch",
|
|
451
502
|
KICI_CROSS_SOURCE_FANOUT_SIZE: "Number of webhook-trigger registrations matched when an inbound generic webhook fans out across sources in the same org",
|
|
452
503
|
KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "Round-trip latency of a cross-instance dashboard relay request",
|
|
504
|
+
KICI_MCP_AUTH_REJECTIONS_TOTAL: "Developer-MCP requests rejected by the agent-credential gate",
|
|
505
|
+
KICI_MCP_DB_POOL_CONNECTIONS: "MCP-dedicated Postgres pool connection counts",
|
|
506
|
+
KICI_MCP_RATE_LIMITED_TOTAL: "Developer-MCP requests rejected by the per-credential rate limiter",
|
|
507
|
+
KICI_MCP_TOOL_DURATION_SECONDS: "Developer-MCP tool invocation duration in seconds",
|
|
508
|
+
KICI_MCP_TOOL_REQUESTS_TOTAL: "Total developer-MCP tool invocations by tool and outcome",
|
|
453
509
|
KICI_ORCH_AGENTS_ACTIVE: "Current number of active agents connected",
|
|
454
510
|
KICI_ORCH_BUILD_DURATION_SECONDS: "Duration of build agent operations in seconds",
|
|
455
511
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "Total number of config reload operations",
|
|
@@ -480,7 +536,10 @@ const MetricDescription = {
|
|
|
480
536
|
KICI_ORCH_JOB_RUNS_TOTAL: "Scheduled job run outcomes, by job and result (success/failure)",
|
|
481
537
|
KICI_ORCH_LOG_BYTES_STORED_TOTAL: "Total bytes of log data written to storage",
|
|
482
538
|
KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "Total number of log chunks received from agents",
|
|
539
|
+
KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "Age of the oldest deferred attestation in the outbox",
|
|
540
|
+
KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "Deferred attestations awaiting a later mint",
|
|
483
541
|
KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart",
|
|
542
|
+
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",
|
|
484
543
|
KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "Total number of scaler config reload operations",
|
|
485
544
|
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.",
|
|
486
545
|
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.",
|
|
@@ -504,6 +563,11 @@ const MetricDescription = {
|
|
|
504
563
|
KICI_ORGS_TOTAL: "Total organizations by plan type",
|
|
505
564
|
KICI_PLAN_CAP_EXCEEDED_TOTAL: "Total times an org hit a plan cap (per dimension)",
|
|
506
565
|
KICI_PLAN_USAGE_RATIO: "Per-org per-dimension usage ratio (current / cap)",
|
|
566
|
+
KICI_PLATFORM_COORDINATOR_POOL_SIZE: "Coordinator pool size per routing key",
|
|
567
|
+
KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "Active coordinator liveness-probe round-trip latency in ms",
|
|
568
|
+
KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "Active coordinator liveness-probe timeouts",
|
|
569
|
+
KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "Stale (non-OPEN socket) coordinator entries in the pool per routing key",
|
|
570
|
+
KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "Zombie (non-OPEN) coordinator entries encountered during relay selection",
|
|
507
571
|
KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "Total cross-tenant WS messages rejected by the Platform (security invariant). Labels: reason.",
|
|
508
572
|
KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "Dashboard proxy request round-trip duration in seconds",
|
|
509
573
|
KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "In-flight dashboard proxy requests (Platform → orchestrator)",
|
|
@@ -527,6 +591,10 @@ const MetricDescription = {
|
|
|
527
591
|
KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections",
|
|
528
592
|
KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart",
|
|
529
593
|
KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "WS connection rejected because the plan-limit check errored (fail-closed)",
|
|
594
|
+
KICI_PLATFORM_RELAY_BREAKER_STATE: "Relay circuit-breaker state per coordinator (0=closed,1=half-open,2=open)",
|
|
595
|
+
KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "Relay circuit-breaker open transitions per coordinator",
|
|
596
|
+
KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "End-to-end dashboard-proxy relay latency incl. failover, in ms",
|
|
597
|
+
KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "Dashboard-proxy relay request outcomes (incl. sibling failover)",
|
|
530
598
|
KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected",
|
|
531
599
|
KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform_connections rows evicted by source.register DB dedup (same-instance reconnect path)",
|
|
532
600
|
KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "Total execution runs failed due to orchestrator staleness",
|
|
@@ -596,6 +664,11 @@ const MetricService = {
|
|
|
596
664
|
KICI_CROSS_SOURCE_ERRORS_TOTAL: "orchestrator",
|
|
597
665
|
KICI_CROSS_SOURCE_FANOUT_SIZE: "orchestrator",
|
|
598
666
|
KICI_DASHBOARD_RELAY_LATENCY_SECONDS: "platform",
|
|
667
|
+
KICI_MCP_AUTH_REJECTIONS_TOTAL: "platform",
|
|
668
|
+
KICI_MCP_DB_POOL_CONNECTIONS: "platform",
|
|
669
|
+
KICI_MCP_RATE_LIMITED_TOTAL: "platform",
|
|
670
|
+
KICI_MCP_TOOL_DURATION_SECONDS: "platform",
|
|
671
|
+
KICI_MCP_TOOL_REQUESTS_TOTAL: "platform",
|
|
599
672
|
KICI_ORCH_AGENTS_ACTIVE: "orchestrator",
|
|
600
673
|
KICI_ORCH_BUILD_DURATION_SECONDS: "orchestrator",
|
|
601
674
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "orchestrator",
|
|
@@ -626,7 +699,10 @@ const MetricService = {
|
|
|
626
699
|
KICI_ORCH_JOB_RUNS_TOTAL: "orchestrator",
|
|
627
700
|
KICI_ORCH_LOG_BYTES_STORED_TOTAL: "orchestrator",
|
|
628
701
|
KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: "orchestrator",
|
|
702
|
+
KICI_ORCH_PENDING_ATTESTATION_OLDEST_AGE_SECONDS: "orchestrator",
|
|
703
|
+
KICI_ORCH_PENDING_ATTESTATIONS_CURRENT: "orchestrator",
|
|
629
704
|
KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: "orchestrator",
|
|
705
|
+
KICI_ORCH_REJECTED_ATTESTATIONS_CURRENT: "orchestrator",
|
|
630
706
|
KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: "orchestrator",
|
|
631
707
|
KICI_ORCH_SCALER_CPUS_USED: "orchestrator",
|
|
632
708
|
KICI_ORCH_SCALER_MEMORY_BYTES_USED: "orchestrator",
|
|
@@ -650,6 +726,11 @@ const MetricService = {
|
|
|
650
726
|
KICI_ORGS_TOTAL: "platform",
|
|
651
727
|
KICI_PLAN_CAP_EXCEEDED_TOTAL: "platform",
|
|
652
728
|
KICI_PLAN_USAGE_RATIO: "platform",
|
|
729
|
+
KICI_PLATFORM_COORDINATOR_POOL_SIZE: "platform",
|
|
730
|
+
KICI_PLATFORM_COORDINATOR_PROBE_LATENCY_MS: "platform",
|
|
731
|
+
KICI_PLATFORM_COORDINATOR_PROBE_TIMEOUTS_TOTAL: "platform",
|
|
732
|
+
KICI_PLATFORM_COORDINATOR_STALE_ENTRIES: "platform",
|
|
733
|
+
KICI_PLATFORM_COORDINATOR_ZOMBIE_ENTRIES_TOTAL: "platform",
|
|
653
734
|
KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: "platform",
|
|
654
735
|
KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: "platform",
|
|
655
736
|
KICI_PLATFORM_DASHBOARD_PROXY_PENDING: "platform",
|
|
@@ -673,6 +754,10 @@ const MetricService = {
|
|
|
673
754
|
KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "platform",
|
|
674
755
|
KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "platform",
|
|
675
756
|
KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "platform",
|
|
757
|
+
KICI_PLATFORM_RELAY_BREAKER_STATE: "platform",
|
|
758
|
+
KICI_PLATFORM_RELAY_BREAKER_TRIPS_TOTAL: "platform",
|
|
759
|
+
KICI_PLATFORM_RELAY_REQUEST_DURATION_MS: "platform",
|
|
760
|
+
KICI_PLATFORM_RELAY_REQUEST_OUTCOME_TOTAL: "platform",
|
|
676
761
|
KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "platform",
|
|
677
762
|
KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform",
|
|
678
763
|
KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "platform",
|
|
@@ -736,6 +821,11 @@ const ALL_METRIC_NAMES = [
|
|
|
736
821
|
"kici_cross_source_errors_total",
|
|
737
822
|
"kici_cross_source_fanout_size",
|
|
738
823
|
"kici_dashboard_relay_latency_seconds",
|
|
824
|
+
"kici_mcp_auth_rejections_total",
|
|
825
|
+
"kici_mcp_db_pool_connections",
|
|
826
|
+
"kici_mcp_rate_limited_total",
|
|
827
|
+
"kici_mcp_tool_duration_seconds",
|
|
828
|
+
"kici_mcp_tool_requests_total",
|
|
739
829
|
"kici_orch_agents_active",
|
|
740
830
|
"kici_orch_build_duration_seconds",
|
|
741
831
|
"kici_orch_config_reload_total",
|
|
@@ -766,7 +856,10 @@ const ALL_METRIC_NAMES = [
|
|
|
766
856
|
"kici_orch_job_runs_total",
|
|
767
857
|
"kici_orch_log_bytes_stored_total",
|
|
768
858
|
"kici_orch_log_chunks_received_total",
|
|
859
|
+
"kici_orch_pending_attestation_oldest_age_seconds",
|
|
860
|
+
"kici_orch_pending_attestations_current",
|
|
769
861
|
"kici_orch_pg_pool_client_errors_total",
|
|
862
|
+
"kici_orch_rejected_attestations_current",
|
|
770
863
|
"kici_orch_scaler_config_reloads_total",
|
|
771
864
|
"kici_orch_scaler_cpus_used",
|
|
772
865
|
"kici_orch_scaler_memory_bytes_used",
|
|
@@ -790,6 +883,11 @@ const ALL_METRIC_NAMES = [
|
|
|
790
883
|
"kici_orgs_total",
|
|
791
884
|
"kici_plan_cap_exceeded_total",
|
|
792
885
|
"kici_plan_usage_ratio",
|
|
886
|
+
"kici_platform_coordinator_pool_size",
|
|
887
|
+
"kici_platform_coordinator_probe_latency_ms",
|
|
888
|
+
"kici_platform_coordinator_probe_timeouts_total",
|
|
889
|
+
"kici_platform_coordinator_stale_entries",
|
|
890
|
+
"kici_platform_coordinator_zombie_entries_total",
|
|
793
891
|
"kici_platform_cross_tenant_rejections_total",
|
|
794
892
|
"kici_platform_dashboard_proxy_duration_seconds",
|
|
795
893
|
"kici_platform_dashboard_proxy_pending",
|
|
@@ -813,6 +911,10 @@ const ALL_METRIC_NAMES = [
|
|
|
813
911
|
"kici_platform_orphan_connections_swept_total",
|
|
814
912
|
"kici_platform_pg_pool_client_errors_total",
|
|
815
913
|
"kici_platform_plan_cap_check_errors_total",
|
|
914
|
+
"kici_platform_relay_breaker_state",
|
|
915
|
+
"kici_platform_relay_breaker_trips_total",
|
|
916
|
+
"kici_platform_relay_request_duration_ms",
|
|
917
|
+
"kici_platform_relay_request_outcome_total",
|
|
816
918
|
"kici_platform_stale_orchestrators_total",
|
|
817
919
|
"kici_platform_stale_platform_connections_evicted_total",
|
|
818
920
|
"kici_platform_stale_runs_failed_total",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema } from "./messages/dashboard-global-workflows.js";
|
|
3
3
|
export { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema };
|
|
@@ -38,6 +38,7 @@ export declare const DashboardWriteOperation: z.ZodEnum<{
|
|
|
38
38
|
"held_runs.reject": "held_runs.reject";
|
|
39
39
|
"event_dlq.retry": "event_dlq.retry";
|
|
40
40
|
"event_dlq.discard": "event_dlq.discard";
|
|
41
|
+
"attestations.retry": "attestations.retry";
|
|
41
42
|
"registration.disable": "registration.disable";
|
|
42
43
|
"registration.delete": "registration.delete";
|
|
43
44
|
"global_workflows.update": "global_workflows.update";
|
|
@@ -57,6 +58,7 @@ export declare const DashboardWriteCategory: z.ZodEnum<{
|
|
|
57
58
|
Bindings: "Bindings";
|
|
58
59
|
"Held runs": "Held runs";
|
|
59
60
|
DLQ: "DLQ";
|
|
61
|
+
Attestations: "Attestations";
|
|
60
62
|
Registrations: "Registrations";
|
|
61
63
|
Topology: "Topology";
|
|
62
64
|
Fleet: "Fleet";
|
|
@@ -127,6 +129,7 @@ export declare const dashboardWritePolicyMap: z.ZodRecord<z.ZodEnum<{
|
|
|
127
129
|
"held_runs.reject": "held_runs.reject";
|
|
128
130
|
"event_dlq.retry": "event_dlq.retry";
|
|
129
131
|
"event_dlq.discard": "event_dlq.discard";
|
|
132
|
+
"attestations.retry": "attestations.retry";
|
|
130
133
|
"registration.disable": "registration.disable";
|
|
131
134
|
"registration.delete": "registration.delete";
|
|
132
135
|
"global_workflows.update": "global_workflows.update";
|
|
@@ -155,6 +158,7 @@ export declare const dashboardWritePolicyMapSchema: z.ZodDefault<z.ZodRecord<z.Z
|
|
|
155
158
|
"held_runs.reject": "held_runs.reject";
|
|
156
159
|
"event_dlq.retry": "event_dlq.retry";
|
|
157
160
|
"event_dlq.discard": "event_dlq.discard";
|
|
161
|
+
"attestations.retry": "attestations.retry";
|
|
158
162
|
"registration.disable": "registration.disable";
|
|
159
163
|
"registration.delete": "registration.delete";
|
|
160
164
|
"global_workflows.update": "global_workflows.update";
|
|
@@ -171,7 +175,7 @@ export declare const dashboardWritePolicyMapSchema: z.ZodDefault<z.ZodRecord<z.Z
|
|
|
171
175
|
export declare function isDashboardWriteOperationEnabled(policy: DashboardWritePolicyMap | null | undefined, op: DashboardWriteOperation): boolean;
|
|
172
176
|
/**
|
|
173
177
|
* Expand a (possibly sparse) policy map into the full effective state
|
|
174
|
-
* for all
|
|
178
|
+
* for all 27 operations. Operations the policy doesn't mention come
|
|
175
179
|
* back as `true` (permissive). Used by the orch HTTP admin response,
|
|
176
180
|
* the WS `orch.capabilities` broadcast, and the dashboard's policy
|
|
177
181
|
* page so consumers see the full picture, not the sparse storage shape.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/protocol/dashboard-write-operations.ts
|
|
4
4
|
/**
|
|
@@ -40,6 +40,7 @@ const DashboardWriteOperation = z.enum([
|
|
|
40
40
|
"held_runs.reject",
|
|
41
41
|
"event_dlq.retry",
|
|
42
42
|
"event_dlq.discard",
|
|
43
|
+
"attestations.retry",
|
|
43
44
|
"registration.disable",
|
|
44
45
|
"registration.delete",
|
|
45
46
|
"global_workflows.update",
|
|
@@ -69,6 +70,7 @@ const DASHBOARD_WRITE_OPERATION_VALUES = Object.freeze([
|
|
|
69
70
|
"held_runs.reject",
|
|
70
71
|
"event_dlq.retry",
|
|
71
72
|
"event_dlq.discard",
|
|
73
|
+
"attestations.retry",
|
|
72
74
|
"registration.disable",
|
|
73
75
|
"registration.delete",
|
|
74
76
|
"global_workflows.update",
|
|
@@ -85,6 +87,7 @@ const DashboardWriteCategory = z.enum([
|
|
|
85
87
|
"Bindings",
|
|
86
88
|
"Held runs",
|
|
87
89
|
"DLQ",
|
|
90
|
+
"Attestations",
|
|
88
91
|
"Registrations",
|
|
89
92
|
"Topology",
|
|
90
93
|
"Fleet"
|
|
@@ -239,6 +242,14 @@ const DASHBOARD_WRITE_OPERATIONS = Object.freeze([
|
|
|
239
242
|
sensitivity: "dispatch",
|
|
240
243
|
cliEquivalent: "kici-admin event-dlq discard"
|
|
241
244
|
},
|
|
245
|
+
{
|
|
246
|
+
name: "attestations.retry",
|
|
247
|
+
wireMessageType: "dashboard.attestation.retry",
|
|
248
|
+
category: "Attestations",
|
|
249
|
+
label: "Retry deferred attestations",
|
|
250
|
+
sensitivity: "dispatch",
|
|
251
|
+
cliEquivalent: "kici-admin attestations retry"
|
|
252
|
+
},
|
|
242
253
|
{
|
|
243
254
|
name: "registration.disable",
|
|
244
255
|
wireMessageType: "dashboard.registration.disable",
|
|
@@ -339,7 +350,7 @@ function isDashboardWriteOperationEnabled(policy, op) {
|
|
|
339
350
|
}
|
|
340
351
|
/**
|
|
341
352
|
* Expand a (possibly sparse) policy map into the full effective state
|
|
342
|
-
* for all
|
|
353
|
+
* for all 27 operations. Operations the policy doesn't mention come
|
|
343
354
|
* back as `true` (permissive). Used by the orch HTTP admin response,
|
|
344
355
|
* the WS `orch.capabilities` broadcast, and the dashboard's policy
|
|
345
356
|
* page so consumers see the full picture, not the sparse storage shape.
|
|
@@ -28,9 +28,9 @@ export declare const AccessLogOutcome: z.ZodEnum<{
|
|
|
28
28
|
export type AccessLogOutcome = z.infer<typeof AccessLogOutcome>;
|
|
29
29
|
/** Target object category. */
|
|
30
30
|
export declare const AccessLogTargetType: z.ZodEnum<{
|
|
31
|
-
run: "run";
|
|
32
31
|
job: "job";
|
|
33
32
|
step: "step";
|
|
33
|
+
run: "run";
|
|
34
34
|
environment: "environment";
|
|
35
35
|
payload: "payload";
|
|
36
36
|
event_log: "event_log";
|
|
@@ -221,9 +221,9 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
221
221
|
purge_chunk: "purge_chunk";
|
|
222
222
|
}>;
|
|
223
223
|
targetType: z.ZodNullable<z.ZodEnum<{
|
|
224
|
-
run: "run";
|
|
225
224
|
job: "job";
|
|
226
225
|
step: "step";
|
|
226
|
+
run: "run";
|
|
227
227
|
environment: "environment";
|
|
228
228
|
payload: "payload";
|
|
229
229
|
event_log: "event_log";
|
|
@@ -255,6 +255,7 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
255
255
|
denied: "denied";
|
|
256
256
|
}>;
|
|
257
257
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
258
|
+
agentLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
259
|
createdAt: z.ZodString;
|
|
259
260
|
}, z.core.$strip>;
|
|
260
261
|
export type AccessLogItem = z.infer<typeof accessLogItemSchema>;
|
|
@@ -352,9 +353,9 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
352
353
|
denied: "denied";
|
|
353
354
|
}>>;
|
|
354
355
|
targetType: z.ZodOptional<z.ZodEnum<{
|
|
355
|
-
run: "run";
|
|
356
356
|
job: "job";
|
|
357
357
|
step: "step";
|
|
358
|
+
run: "run";
|
|
358
359
|
environment: "environment";
|
|
359
360
|
payload: "payload";
|
|
360
361
|
event_log: "event_log";
|
|
@@ -375,6 +376,8 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
375
376
|
targetId: z.ZodOptional<z.ZodString>;
|
|
376
377
|
fromTimestamp: z.ZodOptional<z.ZodString>;
|
|
377
378
|
toTimestamp: z.ZodOptional<z.ZodString>;
|
|
379
|
+
agentLabel: z.ZodOptional<z.ZodString>;
|
|
380
|
+
agentOnly: z.ZodOptional<z.ZodBoolean>;
|
|
378
381
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
379
382
|
cursor: z.ZodOptional<z.ZodString>;
|
|
380
383
|
}, z.core.$strip>;
|
|
@@ -393,6 +396,9 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
393
396
|
type: z.ZodLiteral<"api_key">;
|
|
394
397
|
keyId: z.ZodString;
|
|
395
398
|
ownerSub: z.ZodString;
|
|
399
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
400
|
+
label: z.ZodString;
|
|
401
|
+
}, z.core.$strip>>;
|
|
396
402
|
}, z.core.$strip>, z.ZodObject<{
|
|
397
403
|
type: z.ZodLiteral<"service_account">;
|
|
398
404
|
id: z.ZodString;
|
|
@@ -498,9 +504,9 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
498
504
|
denied: "denied";
|
|
499
505
|
}>>;
|
|
500
506
|
targetType: z.ZodOptional<z.ZodEnum<{
|
|
501
|
-
run: "run";
|
|
502
507
|
job: "job";
|
|
503
508
|
step: "step";
|
|
509
|
+
run: "run";
|
|
504
510
|
environment: "environment";
|
|
505
511
|
payload: "payload";
|
|
506
512
|
event_log: "event_log";
|
|
@@ -522,6 +528,8 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
522
528
|
fromTimestamp: z.ZodOptional<z.ZodString>;
|
|
523
529
|
toTimestamp: z.ZodOptional<z.ZodString>;
|
|
524
530
|
q: z.ZodOptional<z.ZodString>;
|
|
531
|
+
agentLabel: z.ZodOptional<z.ZodString>;
|
|
532
|
+
agentOnly: z.ZodOptional<z.ZodBoolean>;
|
|
525
533
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
526
534
|
cursor: z.ZodOptional<z.ZodString>;
|
|
527
535
|
}, z.core.$strip>;
|
|
@@ -617,9 +625,9 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
617
625
|
purge_chunk: "purge_chunk";
|
|
618
626
|
}>;
|
|
619
627
|
targetType: z.ZodNullable<z.ZodEnum<{
|
|
620
|
-
run: "run";
|
|
621
628
|
job: "job";
|
|
622
629
|
step: "step";
|
|
630
|
+
run: "run";
|
|
623
631
|
environment: "environment";
|
|
624
632
|
payload: "payload";
|
|
625
633
|
event_log: "event_log";
|
|
@@ -651,6 +659,7 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
651
659
|
denied: "denied";
|
|
652
660
|
}>;
|
|
653
661
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
662
|
+
agentLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
654
663
|
createdAt: z.ZodString;
|
|
655
664
|
}, z.core.$strip>>>;
|
|
656
665
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../
|
|
1
|
+
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { ActorType, actorPrincipalSchema } from "./actor.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/protocol/messages/access-log.ts
|
|
@@ -149,6 +149,12 @@ const accessLogItemSchema = z.object({
|
|
|
149
149
|
source: AccessLogSource,
|
|
150
150
|
outcome: AccessLogOutcome,
|
|
151
151
|
errorMessage: z.string().nullable(),
|
|
152
|
+
/**
|
|
153
|
+
* Agent provenance label promoted from the dedicated `agent_label` column
|
|
154
|
+
* (not parsed out of `actor_meta`) so consumers can filter/display it
|
|
155
|
+
* directly. Null for ordinary human / API-key / system actors.
|
|
156
|
+
*/
|
|
157
|
+
agentLabel: z.string().nullable().optional(),
|
|
152
158
|
createdAt: z.string()
|
|
153
159
|
});
|
|
154
160
|
/** Shared filter shape reused by Platform proxy + orchestrator HTTP + CLI. */
|
|
@@ -162,6 +168,8 @@ const accessLogFilterSchema = z.object({
|
|
|
162
168
|
targetId: z.string().optional(),
|
|
163
169
|
fromTimestamp: z.string().optional(),
|
|
164
170
|
toTimestamp: z.string().optional(),
|
|
171
|
+
agentLabel: z.string().optional(),
|
|
172
|
+
agentOnly: z.boolean().optional(),
|
|
165
173
|
limit: z.number().int().positive().max(200).optional(),
|
|
166
174
|
cursor: z.string().optional()
|
|
167
175
|
});
|
|
@@ -181,6 +189,10 @@ const dashboardAccessLogListRequestSchema = z.object({
|
|
|
181
189
|
toTimestamp: z.string().optional(),
|
|
182
190
|
/** Full-text search over `error_message` (trigram-indexed via migration 009). */
|
|
183
191
|
q: z.string().optional(),
|
|
192
|
+
/** Exact-match filter on the agent provenance label (`agent_label` column). */
|
|
193
|
+
agentLabel: z.string().max(255).optional(),
|
|
194
|
+
/** When true, return only agent-attributed rows (`agent_label IS NOT NULL`). */
|
|
195
|
+
agentOnly: z.boolean().optional(),
|
|
184
196
|
limit: z.number().int().positive().max(200).optional(),
|
|
185
197
|
cursor: z.string().optional()
|
|
186
198
|
});
|
|
@@ -30,6 +30,9 @@ export declare const apiKeyActorSchema: z.ZodObject<{
|
|
|
30
30
|
type: z.ZodLiteral<"api_key">;
|
|
31
31
|
keyId: z.ZodString;
|
|
32
32
|
ownerSub: z.ZodString;
|
|
33
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
label: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
33
36
|
}, z.core.$strip>;
|
|
34
37
|
export type ApiKeyActor = z.infer<typeof apiKeyActorSchema>;
|
|
35
38
|
export declare const serviceAccountActorSchema: z.ZodObject<{
|
|
@@ -60,6 +63,9 @@ export declare const actorPrincipalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
60
63
|
type: z.ZodLiteral<"api_key">;
|
|
61
64
|
keyId: z.ZodString;
|
|
62
65
|
ownerSub: z.ZodString;
|
|
66
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
label: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>;
|
|
63
69
|
}, z.core.$strip>, z.ZodObject<{
|
|
64
70
|
type: z.ZodLiteral<"service_account">;
|
|
65
71
|
id: z.ZodString;
|
|
@@ -107,4 +113,11 @@ export declare function flattenActor(actor: ActorPrincipal): {
|
|
|
107
113
|
actorId: string;
|
|
108
114
|
actorMeta: Record<string, unknown> | null;
|
|
109
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* Extract the agent provenance label from an actor, when present. Returns the
|
|
118
|
+
* label for agent-kind `user` (PAT) and `api_key` (org key) actors, else null.
|
|
119
|
+
* The single label extractor reused by run capture and the access-log writer so
|
|
120
|
+
* both credential families surface agent provenance identically.
|
|
121
|
+
*/
|
|
122
|
+
export declare function agentLabelOf(actor: ActorPrincipal): string | null;
|
|
110
123
|
//# sourceMappingURL=actor.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../
|
|
1
|
+
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/protocol/messages/actor.ts
|
|
4
4
|
/**
|
|
@@ -39,7 +39,14 @@ const apiKeyActorSchema = z.object({
|
|
|
39
39
|
/** Opaque key identifier (not the secret). */
|
|
40
40
|
keyId: z.string().min(1),
|
|
41
41
|
/** Keycloak sub of the human who owns this key. */
|
|
42
|
-
ownerSub: z.string().min(1)
|
|
42
|
+
ownerSub: z.string().min(1),
|
|
43
|
+
/**
|
|
44
|
+
* Present when the org API key is agent-kind (e.g. a service account driving
|
|
45
|
+
* KiCI via the developer MCP server). Unlike the user actor's agent, no
|
|
46
|
+
* separate id is needed — `keyId` already identifies the credential. The key
|
|
47
|
+
* still inherits the org's permissions; the label is provenance only.
|
|
48
|
+
*/
|
|
49
|
+
agent: z.object({ label: z.string().min(1) }).optional()
|
|
43
50
|
});
|
|
44
51
|
const serviceAccountActorSchema = z.object({
|
|
45
52
|
type: z.literal(ActorType.enum.service_account),
|
|
@@ -89,7 +96,7 @@ const actorPrincipalSchema = z.discriminatedUnion("type", [
|
|
|
89
96
|
function stringifyActor(actor) {
|
|
90
97
|
switch (actor.type) {
|
|
91
98
|
case "user": return actor.agent ? `user:${actor.sub} via agent:${actor.agent.label}` : `user:${actor.sub}`;
|
|
92
|
-
case "api_key": return `api_key:${actor.keyId}`;
|
|
99
|
+
case "api_key": return actor.agent ? `api_key:${actor.keyId} via agent:${actor.agent.label}` : `api_key:${actor.keyId}`;
|
|
93
100
|
case "service_account": return `service_account:${actor.id}`;
|
|
94
101
|
case "platform_operator": return `platform_operator:${actor.sub}`;
|
|
95
102
|
case "system": return `system:${actor.component}`;
|
|
@@ -135,7 +142,10 @@ function flattenActor(actor) {
|
|
|
135
142
|
case "api_key": return {
|
|
136
143
|
actorType: "api_key",
|
|
137
144
|
actorId: actor.keyId,
|
|
138
|
-
actorMeta:
|
|
145
|
+
actorMeta: actor.agent ? {
|
|
146
|
+
ownerSub: actor.ownerSub,
|
|
147
|
+
agentLabel: actor.agent.label
|
|
148
|
+
} : { ownerSub: actor.ownerSub }
|
|
139
149
|
};
|
|
140
150
|
case "service_account": return {
|
|
141
151
|
actorType: "service_account",
|
|
@@ -157,7 +167,17 @@ function flattenActor(actor) {
|
|
|
157
167
|
};
|
|
158
168
|
}
|
|
159
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Extract the agent provenance label from an actor, when present. Returns the
|
|
172
|
+
* label for agent-kind `user` (PAT) and `api_key` (org key) actors, else null.
|
|
173
|
+
* The single label extractor reused by run capture and the access-log writer so
|
|
174
|
+
* both credential families surface agent provenance identically.
|
|
175
|
+
*/
|
|
176
|
+
function agentLabelOf(actor) {
|
|
177
|
+
if (actor.type === "user" || actor.type === "api_key") return actor.agent?.label ?? null;
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
160
180
|
//#endregion
|
|
161
|
-
export { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema };
|
|
181
|
+
export { ActorType, actorPrincipalSchema, agentLabelOf, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema };
|
|
162
182
|
|
|
163
183
|
//# sourceMappingURL=actor.js.map
|