@kici-dev/engine 0.1.12 → 0.1.14

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/index.js CHANGED
@@ -4,7 +4,7 @@ import { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSche
4
4
  import { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
5
5
  import { ORCH_CAPABILITIES, OrchRole, hasOrchCapability, orchCapabilitiesSchema } from "./protocol/messages/capabilities.js";
6
6
  import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
7
- import { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, executionStatusSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
7
+ import { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
8
8
  import { SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
9
9
  import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType, accessLogFilterSchema, accessLogItemSchema, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./protocol/messages/access-log.js";
10
10
  import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
@@ -43,4 +43,4 @@ import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, val
43
43
  import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
44
44
  import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
45
45
  import "./bundler/index.js";
46
- export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, CheckRunConclusion, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, HeldRunQueueType, HeldRunStatus, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, ORCH_CAPABILITIES, OrchRole, POLICY_BY_ACTION, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_GOING_AWAY, WS_CLOSE_HEARTBEAT_TIMEOUT, WS_CLOSE_INTERNAL_ERROR, WS_CLOSE_INVALID_MESSAGE, WS_CLOSE_PLAN_LIMIT, WS_CLOSE_PROTOCOL_ERROR, WS_CLOSE_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, auditLogColdDays, auditLogWarmDays, auditLogWarmSqlCase, authFailureSchema, authRequestSchema, authSuccessSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadChunkSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobContextSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, cacheStatsSchema, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, encodeActivityCursor, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, flattenActor, fnv1a32, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostLabel, identityLinkItemSchema, identityLinkListResponseSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, observeCompleteSchema, observeLogSchema, observeStatusSchema, observeStepSchema, observeSubscribeSchema, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseMemoryString, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testCancelResponseSchema, testCancelSchema, testEventSchema, testTriggerResponseSchema, testTriggerSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
46
+ export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, CheckRunConclusion, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, HeldRunQueueType, HeldRunStatus, InitFailureCategory, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, ORCH_CAPABILITIES, OrchRole, POLICY_BY_ACTION, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_GOING_AWAY, WS_CLOSE_HEARTBEAT_TIMEOUT, WS_CLOSE_INTERNAL_ERROR, WS_CLOSE_INVALID_MESSAGE, WS_CLOSE_PLAN_LIMIT, WS_CLOSE_PROTOCOL_ERROR, WS_CLOSE_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, auditLogColdDays, auditLogWarmDays, auditLogWarmSqlCase, authFailureSchema, authRequestSchema, authSuccessSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadChunkSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobContextSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, cacheStatsSchema, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, encodeActivityCursor, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, flattenActor, fnv1a32, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostLabel, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, observeCompleteSchema, observeLogSchema, observeStatusSchema, observeStepSchema, observeSubscribeSchema, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseMemoryString, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testCancelResponseSchema, testCancelSchema, testEventSchema, testTriggerResponseSchema, testTriggerSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
@@ -159,16 +159,48 @@ const METRIC_LABEL_POLICY = {
159
159
  kici_orch_install_secrets_contributor_stripped_total: { trust_tier: { values: ["unknown", "known"] } },
160
160
  kici_orch_install_secrets_token_resolution_duration_seconds: { environment: { maxUniqueValues: 50 } },
161
161
  kici_cross_source_errors_total: { reason: { values: ["clone_token", "bundle_missing"] } },
162
+ kici_cross_source_fanout_size: { event: { maxUniqueValues: 50 } },
162
163
  kici_universal_git_registration_errors_total: { reason: { values: [
163
164
  "invalid_config",
164
165
  "bundle_build",
165
- "registration"
166
+ "registration",
167
+ "no_secret_resolver"
166
168
  ] } },
167
169
  kici_orch_trust_match_refused_no_id_total: { reason: { values: [
168
170
  "event_missing",
169
171
  "link_missing",
170
172
  "id_mismatch"
171
173
  ] } },
174
+ kici_orch_event_dispatch_success_total: { event_name: { maxUniqueValues: 50 } },
175
+ kici_orch_event_retry_total: { event_name: { maxUniqueValues: 50 } },
176
+ kici_orch_event_dlq_total: {
177
+ event_name: { maxUniqueValues: 50 },
178
+ reason: { values: ["exhausted_retries"] }
179
+ },
180
+ kici_orch_event_attempts: {
181
+ event_name: { maxUniqueValues: 50 },
182
+ result: { values: ["success", "dlq"] }
183
+ },
184
+ kici_platform_cross_tenant_rejections_total: { reason: { values: [
185
+ "join_token_org_mismatch",
186
+ "wire_orgid_label_strip",
187
+ "dashboard_relay_source_mismatch",
188
+ "dashboard_relay_org_mismatch",
189
+ "response_source_mismatch",
190
+ "payload_stream_source_mismatch",
191
+ "ack_source_mismatch"
192
+ ] } },
193
+ kici_platform_orch_metrics_filtered_total: {
194
+ reason: { values: [
195
+ "unknown_metric",
196
+ "type_mismatch",
197
+ "unexpected_label",
198
+ "bad_label_value",
199
+ "cardinality_cap_overflow"
200
+ ] },
201
+ metric: { maxUniqueValues: 200 }
202
+ },
203
+ kici_platform_metrics_query_rate_limited_total: { org_id: { maxUniqueValues: 200 } },
172
204
  kici_orch_job_runs_total: {
173
205
  job: { values: ORCH_JOB_VALUES },
174
206
  result: { values: ["success", "failure"] }
@@ -136,7 +136,7 @@ export declare const MetricLabels: {
136
136
  readonly KICI_CACHE_HITS_TOTAL: readonly ["cache_type"];
137
137
  readonly KICI_CACHE_MISSES_TOTAL: readonly ["cache_type"];
138
138
  readonly KICI_CROSS_SOURCE_ERRORS_TOTAL: readonly ["reason"];
139
- readonly KICI_CROSS_SOURCE_FANOUT_SIZE: readonly [];
139
+ readonly KICI_CROSS_SOURCE_FANOUT_SIZE: readonly ["event"];
140
140
  readonly KICI_DASHBOARD_RELAY_LATENCY_SECONDS: readonly ["outcome"];
141
141
  readonly KICI_ORCH_AGENTS_ACTIVE: readonly [];
142
142
  readonly KICI_ORCH_BUILD_DURATION_SECONDS: readonly [];
@@ -147,12 +147,12 @@ export declare const MetricLabels: {
147
147
  readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: readonly [];
148
148
  readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH: readonly ["status"];
149
149
  readonly KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: readonly ["status", "label"];
150
- readonly KICI_ORCH_EVENT_ATTEMPTS: readonly [];
151
- readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: readonly [];
150
+ readonly KICI_ORCH_EVENT_ATTEMPTS: readonly ["event_name", "result"];
151
+ readonly KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: readonly ["event_name"];
152
152
  readonly KICI_ORCH_EVENT_DLQ_DEPTH: readonly [];
153
- readonly KICI_ORCH_EVENT_DLQ_TOTAL: readonly [];
153
+ readonly KICI_ORCH_EVENT_DLQ_TOTAL: readonly ["event_name", "reason"];
154
154
  readonly KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: readonly [];
155
- readonly KICI_ORCH_EVENT_RETRY_TOTAL: readonly [];
155
+ readonly KICI_ORCH_EVENT_RETRY_TOTAL: readonly ["event_name"];
156
156
  readonly KICI_ORCH_EXECUTION_DURATION_SECONDS: readonly [];
157
157
  readonly KICI_ORCH_EXECUTIONS_TOTAL: readonly ["status"];
158
158
  readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: readonly ["operation"];
@@ -190,7 +190,7 @@ export declare const MetricLabels: {
190
190
  readonly KICI_ORGS_TOTAL: readonly ["plan_type"];
191
191
  readonly KICI_PLAN_CAP_EXCEEDED_TOTAL: readonly ["org_id", "dimension"];
192
192
  readonly KICI_PLAN_USAGE_RATIO: readonly ["org_id", "dimension"];
193
- readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: readonly [];
193
+ readonly KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: readonly ["reason"];
194
194
  readonly KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: readonly ["outcome"];
195
195
  readonly KICI_PLATFORM_DASHBOARD_PROXY_PENDING: readonly [];
196
196
  readonly KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: readonly ["outcome"];
@@ -205,9 +205,9 @@ export declare const MetricLabels: {
205
205
  readonly KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: readonly ["status"];
206
206
  readonly KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: readonly [];
207
207
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: readonly [];
208
- readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: readonly [];
208
+ readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: readonly ["org_id"];
209
209
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: readonly ["reason"];
210
- readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: readonly [];
210
+ readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: readonly ["reason", "metric"];
211
211
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: readonly [];
212
212
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: readonly [];
213
213
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: readonly ["org_id"];
@@ -451,7 +451,7 @@ export declare const MetricDescription: {
451
451
  readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators";
452
452
  readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).";
453
453
  readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.";
454
- readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason.";
454
+ readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason, metric.";
455
455
  readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections";
456
456
  readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected";
457
457
  readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform_connections rows evicted by source.register DB dedup (same-instance reconnect path)";
@@ -137,7 +137,7 @@ const MetricLabels = {
137
137
  KICI_CACHE_HITS_TOTAL: ["cache_type"],
138
138
  KICI_CACHE_MISSES_TOTAL: ["cache_type"],
139
139
  KICI_CROSS_SOURCE_ERRORS_TOTAL: ["reason"],
140
- KICI_CROSS_SOURCE_FANOUT_SIZE: [],
140
+ KICI_CROSS_SOURCE_FANOUT_SIZE: ["event"],
141
141
  KICI_DASHBOARD_RELAY_LATENCY_SECONDS: ["outcome"],
142
142
  KICI_ORCH_AGENTS_ACTIVE: [],
143
143
  KICI_ORCH_BUILD_DURATION_SECONDS: [],
@@ -148,12 +148,12 @@ const MetricLabels = {
148
148
  KICI_ORCH_DEP_CACHE_MISSES_TOTAL: [],
149
149
  KICI_ORCH_DISPATCH_QUEUE_DEPTH: ["status"],
150
150
  KICI_ORCH_DISPATCH_QUEUE_DEPTH_BY_LABEL: ["status", "label"],
151
- KICI_ORCH_EVENT_ATTEMPTS: [],
152
- KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: [],
151
+ KICI_ORCH_EVENT_ATTEMPTS: ["event_name", "result"],
152
+ KICI_ORCH_EVENT_DISPATCH_SUCCESS_TOTAL: ["event_name"],
153
153
  KICI_ORCH_EVENT_DLQ_DEPTH: [],
154
- KICI_ORCH_EVENT_DLQ_TOTAL: [],
154
+ KICI_ORCH_EVENT_DLQ_TOTAL: ["event_name", "reason"],
155
155
  KICI_ORCH_EVENT_LEASE_EXPIRATIONS_TOTAL: [],
156
- KICI_ORCH_EVENT_RETRY_TOTAL: [],
156
+ KICI_ORCH_EVENT_RETRY_TOTAL: ["event_name"],
157
157
  KICI_ORCH_EXECUTION_DURATION_SECONDS: [],
158
158
  KICI_ORCH_EXECUTIONS_TOTAL: ["status"],
159
159
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: ["operation"],
@@ -195,7 +195,7 @@ const MetricLabels = {
195
195
  KICI_ORGS_TOTAL: ["plan_type"],
196
196
  KICI_PLAN_CAP_EXCEEDED_TOTAL: ["org_id", "dimension"],
197
197
  KICI_PLAN_USAGE_RATIO: ["org_id", "dimension"],
198
- KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: [],
198
+ KICI_PLATFORM_CROSS_TENANT_REJECTIONS_TOTAL: ["reason"],
199
199
  KICI_PLATFORM_DASHBOARD_PROXY_DURATION_SECONDS: ["outcome"],
200
200
  KICI_PLATFORM_DASHBOARD_PROXY_PENDING: [],
201
201
  KICI_PLATFORM_DASHBOARD_PROXY_REQUESTS_TOTAL: ["outcome"],
@@ -210,9 +210,9 @@ const MetricLabels = {
210
210
  KICI_PLATFORM_JOB_STATUS_FORWARDS_TOTAL: ["status"],
211
211
  KICI_PLATFORM_LOG_CHUNKS_FORWARDED_TOTAL: [],
212
212
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: [],
213
- KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: [],
213
+ KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: ["org_id"],
214
214
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: ["reason"],
215
- KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: [],
215
+ KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: ["reason", "metric"],
216
216
  KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: [],
217
217
  KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: [],
218
218
  KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: ["org_id"],
@@ -460,7 +460,7 @@ const MetricDescription = {
460
460
  KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators",
461
461
  KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).",
462
462
  KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.",
463
- KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason.",
463
+ KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason, metric.",
464
464
  KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections",
465
465
  KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected",
466
466
  KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform_connections rows evicted by source.register DB dedup (same-instance reconnect path)",
@@ -64,6 +64,24 @@ export declare const dashboardJobDetailSchema: z.ZodObject<{
64
64
  runsOnLabels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
65
65
  outputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
66
66
  secretOutputKeys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
67
+ initFailure: z.ZodOptional<z.ZodObject<{
68
+ scope: z.ZodEnum<{
69
+ run: "run";
70
+ job: "job";
71
+ }>;
72
+ category: z.ZodEnum<{
73
+ secret_resolution: "secret_resolution";
74
+ install_secrets: "install_secrets";
75
+ lock_resolution: "lock_resolution";
76
+ build_coordination: "build_coordination";
77
+ environment_rules: "environment_rules";
78
+ dynamic_eval: "dynamic_eval";
79
+ no_agent: "no_agent";
80
+ matrix_expansion: "matrix_expansion";
81
+ }>;
82
+ message: z.ZodString;
83
+ jobName: z.ZodOptional<z.ZodString>;
84
+ }, z.core.$strip>>;
67
85
  steps: z.ZodArray<z.ZodObject<{
68
86
  stepIndex: z.ZodNumber;
69
87
  stepName: z.ZodString;
@@ -95,6 +113,24 @@ export declare const dashboardRunDetailResponseSchema: z.ZodObject<{
95
113
  runsOnLabels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
96
114
  outputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
97
115
  secretOutputKeys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
116
+ initFailure: z.ZodOptional<z.ZodObject<{
117
+ scope: z.ZodEnum<{
118
+ run: "run";
119
+ job: "job";
120
+ }>;
121
+ category: z.ZodEnum<{
122
+ secret_resolution: "secret_resolution";
123
+ install_secrets: "install_secrets";
124
+ lock_resolution: "lock_resolution";
125
+ build_coordination: "build_coordination";
126
+ environment_rules: "environment_rules";
127
+ dynamic_eval: "dynamic_eval";
128
+ no_agent: "no_agent";
129
+ matrix_expansion: "matrix_expansion";
130
+ }>;
131
+ message: z.ZodString;
132
+ jobName: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>>;
98
134
  steps: z.ZodArray<z.ZodObject<{
99
135
  stepIndex: z.ZodNumber;
100
136
  stepName: z.ZodString;
@@ -120,6 +156,24 @@ export declare const dashboardRunDetailResponseSchema: z.ZodObject<{
120
156
  }>>;
121
157
  contributorUsername: z.ZodNullable<z.ZodString>;
122
158
  }, z.core.$strip>>;
159
+ initFailure: z.ZodOptional<z.ZodObject<{
160
+ scope: z.ZodEnum<{
161
+ run: "run";
162
+ job: "job";
163
+ }>;
164
+ category: z.ZodEnum<{
165
+ secret_resolution: "secret_resolution";
166
+ install_secrets: "install_secrets";
167
+ lock_resolution: "lock_resolution";
168
+ build_coordination: "build_coordination";
169
+ environment_rules: "environment_rules";
170
+ dynamic_eval: "dynamic_eval";
171
+ no_agent: "no_agent";
172
+ matrix_expansion: "matrix_expansion";
173
+ }>;
174
+ message: z.ZodString;
175
+ jobName: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strip>>;
123
177
  error: z.ZodOptional<z.ZodString>;
124
178
  }, z.core.$strip>;
125
179
  /** Response with step log lines (correlates to dashboard.step.logs). */
@@ -3362,6 +3416,24 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
3362
3416
  runsOnLabels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
3363
3417
  outputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
3364
3418
  secretOutputKeys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
3419
+ initFailure: z.ZodOptional<z.ZodObject<{
3420
+ scope: z.ZodEnum<{
3421
+ run: "run";
3422
+ job: "job";
3423
+ }>;
3424
+ category: z.ZodEnum<{
3425
+ secret_resolution: "secret_resolution";
3426
+ install_secrets: "install_secrets";
3427
+ lock_resolution: "lock_resolution";
3428
+ build_coordination: "build_coordination";
3429
+ environment_rules: "environment_rules";
3430
+ dynamic_eval: "dynamic_eval";
3431
+ no_agent: "no_agent";
3432
+ matrix_expansion: "matrix_expansion";
3433
+ }>;
3434
+ message: z.ZodString;
3435
+ jobName: z.ZodOptional<z.ZodString>;
3436
+ }, z.core.$strip>>;
3365
3437
  steps: z.ZodArray<z.ZodObject<{
3366
3438
  stepIndex: z.ZodNumber;
3367
3439
  stepName: z.ZodString;
@@ -3387,6 +3459,24 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
3387
3459
  }>>;
3388
3460
  contributorUsername: z.ZodNullable<z.ZodString>;
3389
3461
  }, z.core.$strip>>;
3462
+ initFailure: z.ZodOptional<z.ZodObject<{
3463
+ scope: z.ZodEnum<{
3464
+ run: "run";
3465
+ job: "job";
3466
+ }>;
3467
+ category: z.ZodEnum<{
3468
+ secret_resolution: "secret_resolution";
3469
+ install_secrets: "install_secrets";
3470
+ lock_resolution: "lock_resolution";
3471
+ build_coordination: "build_coordination";
3472
+ environment_rules: "environment_rules";
3473
+ dynamic_eval: "dynamic_eval";
3474
+ no_agent: "no_agent";
3475
+ matrix_expansion: "matrix_expansion";
3476
+ }>;
3477
+ message: z.ZodString;
3478
+ jobName: z.ZodOptional<z.ZodString>;
3479
+ }, z.core.$strip>>;
3390
3480
  error: z.ZodOptional<z.ZodString>;
3391
3481
  }, z.core.$strip>, z.ZodObject<{
3392
3482
  type: z.ZodLiteral<"dashboard.step.logs.response">;
@@ -4226,6 +4316,24 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
4226
4316
  runsOnLabels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
4227
4317
  outputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
4228
4318
  secretOutputKeys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
4319
+ initFailure: z.ZodOptional<z.ZodObject<{
4320
+ scope: z.ZodEnum<{
4321
+ run: "run";
4322
+ job: "job";
4323
+ }>;
4324
+ category: z.ZodEnum<{
4325
+ secret_resolution: "secret_resolution";
4326
+ install_secrets: "install_secrets";
4327
+ lock_resolution: "lock_resolution";
4328
+ build_coordination: "build_coordination";
4329
+ environment_rules: "environment_rules";
4330
+ dynamic_eval: "dynamic_eval";
4331
+ no_agent: "no_agent";
4332
+ matrix_expansion: "matrix_expansion";
4333
+ }>;
4334
+ message: z.ZodString;
4335
+ jobName: z.ZodOptional<z.ZodString>;
4336
+ }, z.core.$strip>>;
4229
4337
  steps: z.ZodArray<z.ZodObject<{
4230
4338
  stepIndex: z.ZodNumber;
4231
4339
  stepName: z.ZodString;
@@ -4251,6 +4359,24 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
4251
4359
  }>>;
4252
4360
  contributorUsername: z.ZodNullable<z.ZodString>;
4253
4361
  }, z.core.$strip>>;
4362
+ initFailure: z.ZodOptional<z.ZodObject<{
4363
+ scope: z.ZodEnum<{
4364
+ run: "run";
4365
+ job: "job";
4366
+ }>;
4367
+ category: z.ZodEnum<{
4368
+ secret_resolution: "secret_resolution";
4369
+ install_secrets: "install_secrets";
4370
+ lock_resolution: "lock_resolution";
4371
+ build_coordination: "build_coordination";
4372
+ environment_rules: "environment_rules";
4373
+ dynamic_eval: "dynamic_eval";
4374
+ no_agent: "no_agent";
4375
+ matrix_expansion: "matrix_expansion";
4376
+ }>;
4377
+ message: z.ZodString;
4378
+ jobName: z.ZodOptional<z.ZodString>;
4379
+ }, z.core.$strip>>;
4254
4380
  }, z.core.$strip>;
4255
4381
  /** REST API response for step logs. */
4256
4382
  export declare const dashboardStepLogsApiResponseSchema: z.ZodObject<{
@@ -1,5 +1,6 @@
1
1
  import "../../chunk-gOLHoazu.js";
2
2
  import { actorPrincipalSchema } from "./actor.js";
3
+ import { initFailureSchema } from "./execution-status.js";
3
4
  import { SourceSubtype } from "./source-registration.js";
4
5
  import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
5
6
  import { dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema } from "./run-events.js";
@@ -56,6 +57,11 @@ const dashboardJobDetailSchema = z.object({
56
57
  outputs: z.record(z.string(), z.record(z.string(), z.unknown())).nullable().optional(),
57
58
  /** Secret output key names produced by this job (values are NOT included -- display masked). */
58
59
  secretOutputKeys: z.array(z.string()).nullable().optional(),
60
+ /**
61
+ * Structured init-failure signal for jobs that never started. Presence means
62
+ * the job is a synthetic `rejected-*` or `init-failed-*` row; status will be 'failed'.
63
+ */
64
+ initFailure: initFailureSchema.optional(),
59
65
  steps: z.array(dashboardStepDetailSchema)
60
66
  });
61
67
  /** Trust context from orchestrator execution_runs (populated for PR-triggered runs). */
@@ -74,6 +80,11 @@ const dashboardRunDetailResponseSchema = z.object({
74
80
  requestId: z.string(),
75
81
  jobs: z.array(dashboardJobDetailSchema),
76
82
  trustContext: trustContextSchema.optional(),
83
+ /**
84
+ * Structured init-failure signal for runs that never started. Set when the
85
+ * run row was created via recordInitFailureRun() on the orchestrator side.
86
+ */
87
+ initFailure: initFailureSchema.optional(),
77
88
  error: z.string().optional()
78
89
  });
79
90
  /** Response with step log lines (correlates to dashboard.step.logs). */
@@ -1251,7 +1262,14 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
1251
1262
  /** REST API response for run detail (jobs with nested steps). */
1252
1263
  const dashboardRunDetailApiResponseSchema = z.object({
1253
1264
  jobs: z.array(dashboardJobDetailSchema),
1254
- trustContext: trustContextSchema.optional()
1265
+ trustContext: trustContextSchema.optional(),
1266
+ /**
1267
+ * Structured init-failure signal for runs that never started a step. Set
1268
+ * when the run row was created via `recordInitFailureRun()` on the
1269
+ * orchestrator and surfaced to the dashboard so the banner can render
1270
+ * even while the orchestrator is offline (Platform-DB fallback path).
1271
+ */
1272
+ initFailure: initFailureSchema.optional()
1255
1273
  });
1256
1274
  /** REST API response for step logs. */
1257
1275
  const dashboardStepLogsApiResponseSchema = z.object({
@@ -32,6 +32,50 @@ export declare const ExecutionStepStatus: z.ZodEnum<{
32
32
  skipped: "skipped";
33
33
  }>;
34
34
  export type ExecutionStepStatus = z.infer<typeof ExecutionStepStatus>;
35
+ /**
36
+ * Categories of init failure — i.e. failures that prevent a run from ever
37
+ * executing a step. Set by the orchestrator at the detection site and
38
+ * persisted alongside the run/job row so the dashboard can render an
39
+ * explanatory banner even when the orchestrator is offline.
40
+ *
41
+ * Scope is carried separately on `initFailureSchema.scope`:
42
+ * - `run`-scoped categories fail the whole run before any job runs
43
+ * (secret_resolution, install_secrets, lock_resolution,
44
+ * build_coordination, matrix_expansion).
45
+ * - `job`-scoped categories fail one job and leave siblings alone
46
+ * (environment_rules, dynamic_eval, no_agent).
47
+ */
48
+ export declare const InitFailureCategory: z.ZodEnum<{
49
+ secret_resolution: "secret_resolution";
50
+ install_secrets: "install_secrets";
51
+ lock_resolution: "lock_resolution";
52
+ build_coordination: "build_coordination";
53
+ environment_rules: "environment_rules";
54
+ dynamic_eval: "dynamic_eval";
55
+ no_agent: "no_agent";
56
+ matrix_expansion: "matrix_expansion";
57
+ }>;
58
+ export type InitFailureCategory = z.infer<typeof InitFailureCategory>;
59
+ /** Structured init-failure signal. Presence on a run/job means "never started". */
60
+ export declare const initFailureSchema: z.ZodObject<{
61
+ scope: z.ZodEnum<{
62
+ run: "run";
63
+ job: "job";
64
+ }>;
65
+ category: z.ZodEnum<{
66
+ secret_resolution: "secret_resolution";
67
+ install_secrets: "install_secrets";
68
+ lock_resolution: "lock_resolution";
69
+ build_coordination: "build_coordination";
70
+ environment_rules: "environment_rules";
71
+ dynamic_eval: "dynamic_eval";
72
+ no_agent: "no_agent";
73
+ matrix_expansion: "matrix_expansion";
74
+ }>;
75
+ message: z.ZodString;
76
+ jobName: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>;
78
+ export type InitFailure = z.infer<typeof initFailureSchema>;
35
79
  /** Terminal run states that indicate the run has completed. */
36
80
  export declare const TERMINAL_RUN_STATES: ReadonlySet<string>;
37
81
  /** Terminal job states that indicate the job is no longer running. */
@@ -65,6 +109,24 @@ export declare const executionStatusSchema: z.ZodObject<{
65
109
  triggeredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
110
  failureReason: z.ZodOptional<z.ZodString>;
67
111
  logBytes: z.ZodOptional<z.ZodNumber>;
112
+ initFailure: z.ZodOptional<z.ZodObject<{
113
+ scope: z.ZodEnum<{
114
+ run: "run";
115
+ job: "job";
116
+ }>;
117
+ category: z.ZodEnum<{
118
+ secret_resolution: "secret_resolution";
119
+ install_secrets: "install_secrets";
120
+ lock_resolution: "lock_resolution";
121
+ build_coordination: "build_coordination";
122
+ environment_rules: "environment_rules";
123
+ dynamic_eval: "dynamic_eval";
124
+ no_agent: "no_agent";
125
+ matrix_expansion: "matrix_expansion";
126
+ }>;
127
+ message: z.ZodString;
128
+ jobName: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strip>>;
68
130
  }, z.core.$strip>;
69
131
  /** Per-step status forwarded from agent to Platform (real-time). */
70
132
  export declare const stepStatusForwardSchema: z.ZodObject<{
@@ -115,6 +177,24 @@ export declare const jobStatusForwardSchema: z.ZodObject<{
115
177
  runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
178
  logBytes: z.ZodOptional<z.ZodNumber>;
117
179
  timestamp: z.ZodNumber;
180
+ initFailure: z.ZodOptional<z.ZodObject<{
181
+ scope: z.ZodEnum<{
182
+ run: "run";
183
+ job: "job";
184
+ }>;
185
+ category: z.ZodEnum<{
186
+ secret_resolution: "secret_resolution";
187
+ install_secrets: "install_secrets";
188
+ lock_resolution: "lock_resolution";
189
+ build_coordination: "build_coordination";
190
+ environment_rules: "environment_rules";
191
+ dynamic_eval: "dynamic_eval";
192
+ no_agent: "no_agent";
193
+ matrix_expansion: "matrix_expansion";
194
+ }>;
195
+ message: z.ZodString;
196
+ jobName: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>>;
118
198
  }, z.core.$strip>;
119
199
  /** State replay sent on orchestrator reconnection -- full snapshot of active runs and jobs. */
120
200
  export declare const stateReplaySchema: z.ZodObject<{
@@ -31,6 +31,38 @@ const ExecutionStepStatus = z.enum([
31
31
  "failed",
32
32
  "skipped"
33
33
  ]);
34
+ /**
35
+ * Categories of init failure — i.e. failures that prevent a run from ever
36
+ * executing a step. Set by the orchestrator at the detection site and
37
+ * persisted alongside the run/job row so the dashboard can render an
38
+ * explanatory banner even when the orchestrator is offline.
39
+ *
40
+ * Scope is carried separately on `initFailureSchema.scope`:
41
+ * - `run`-scoped categories fail the whole run before any job runs
42
+ * (secret_resolution, install_secrets, lock_resolution,
43
+ * build_coordination, matrix_expansion).
44
+ * - `job`-scoped categories fail one job and leave siblings alone
45
+ * (environment_rules, dynamic_eval, no_agent).
46
+ */
47
+ const InitFailureCategory = z.enum([
48
+ "secret_resolution",
49
+ "install_secrets",
50
+ "lock_resolution",
51
+ "build_coordination",
52
+ "environment_rules",
53
+ "dynamic_eval",
54
+ "no_agent",
55
+ "matrix_expansion"
56
+ ]);
57
+ /** Structured init-failure signal. Presence on a run/job means "never started". */
58
+ const initFailureSchema = z.object({
59
+ scope: z.enum(["run", "job"]),
60
+ category: InitFailureCategory,
61
+ /** Human-readable failure message (same content surfaced by RunFailureSummary). */
62
+ message: z.string(),
63
+ /** Set when scope === 'job'. */
64
+ jobName: z.string().optional()
65
+ });
34
66
  /** Terminal run states that indicate the run has completed. */
35
67
  const TERMINAL_RUN_STATES = new Set([
36
68
  ExecutionRunStatus.enum.success,
@@ -80,7 +112,13 @@ const executionStatusSchema = z.object({
80
112
  * Only set on terminal run states. Powers the operator-side
81
113
  * `kici_org_log_bytes` capacity-planning gauge on the Platform.
82
114
  */
83
- logBytes: z.number().int().nonnegative().optional()
115
+ logBytes: z.number().int().nonnegative().optional(),
116
+ /**
117
+ * Structured init-failure signal. Set by the orchestrator when the run
118
+ * never executed a single step. Persisted in execution_runs.init_failure
119
+ * on both orchestrator and Platform sides. Only present when status === 'failed'.
120
+ */
121
+ initFailure: initFailureSchema.optional()
84
122
  });
85
123
  /** Per-step status forwarded from agent to Platform (real-time). */
86
124
  const stepStatusForwardSchema = z.object({
@@ -121,7 +159,9 @@ const jobStatusForwardSchema = z.object({
121
159
  * `kici_org_log_bytes` capacity-planning gauge on the Platform.
122
160
  */
123
161
  logBytes: z.number().int().nonnegative().optional(),
124
- timestamp: z.number()
162
+ timestamp: z.number(),
163
+ /** Structured init-failure signal — set for synthetic rejected-* / init-failed-* jobs. */
164
+ initFailure: initFailureSchema.optional()
125
165
  });
126
166
  /** State replay sent on orchestrator reconnection -- full snapshot of active runs and jobs. */
127
167
  const stateReplaySchema = z.object({
@@ -161,6 +201,6 @@ const stateReplaySchema = z.object({
161
201
  timestamp: z.number()
162
202
  });
163
203
  //#endregion
164
- export { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, executionStatusSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
204
+ export { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
165
205
 
166
206
  //# sourceMappingURL=execution-status.js.map
@@ -1822,6 +1822,24 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
1822
1822
  triggeredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1823
1823
  failureReason: z.ZodOptional<z.ZodString>;
1824
1824
  logBytes: z.ZodOptional<z.ZodNumber>;
1825
+ initFailure: z.ZodOptional<z.ZodObject<{
1826
+ scope: z.ZodEnum<{
1827
+ run: "run";
1828
+ job: "job";
1829
+ }>;
1830
+ category: z.ZodEnum<{
1831
+ secret_resolution: "secret_resolution";
1832
+ install_secrets: "install_secrets";
1833
+ lock_resolution: "lock_resolution";
1834
+ build_coordination: "build_coordination";
1835
+ environment_rules: "environment_rules";
1836
+ dynamic_eval: "dynamic_eval";
1837
+ no_agent: "no_agent";
1838
+ matrix_expansion: "matrix_expansion";
1839
+ }>;
1840
+ message: z.ZodString;
1841
+ jobName: z.ZodOptional<z.ZodString>;
1842
+ }, z.core.$strip>>;
1825
1843
  }, z.core.$strip>, z.ZodObject<{
1826
1844
  type: z.ZodLiteral<"step.status.forward">;
1827
1845
  messageId: z.ZodString;
@@ -1868,6 +1886,24 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
1868
1886
  runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
1869
1887
  logBytes: z.ZodOptional<z.ZodNumber>;
1870
1888
  timestamp: z.ZodNumber;
1889
+ initFailure: z.ZodOptional<z.ZodObject<{
1890
+ scope: z.ZodEnum<{
1891
+ run: "run";
1892
+ job: "job";
1893
+ }>;
1894
+ category: z.ZodEnum<{
1895
+ secret_resolution: "secret_resolution";
1896
+ install_secrets: "install_secrets";
1897
+ lock_resolution: "lock_resolution";
1898
+ build_coordination: "build_coordination";
1899
+ environment_rules: "environment_rules";
1900
+ dynamic_eval: "dynamic_eval";
1901
+ no_agent: "no_agent";
1902
+ matrix_expansion: "matrix_expansion";
1903
+ }>;
1904
+ message: z.ZodString;
1905
+ jobName: z.ZodOptional<z.ZodString>;
1906
+ }, z.core.$strip>>;
1871
1907
  }, z.core.$strip>, z.ZodObject<{
1872
1908
  type: z.ZodLiteral<"state.replay">;
1873
1909
  messageId: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/engine",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
5
5
  "keywords": [
6
6
  "kici",
package/sbom.spdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "spdxVersion": "SPDX-2.3",
3
3
  "dataLicense": "CC0-1.0",
4
4
  "SPDXID": "SPDXRef-DOCUMENT",
5
- "name": "@kici-dev/engine@0.1.12",
6
- "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.12/6a5cbfae-b207-4442-b31b-a4befe0a503a",
5
+ "name": "@kici-dev/engine@0.1.14",
6
+ "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.14/e0f9b814-d366-4ae4-8be4-0663a2fdb6d7",
7
7
  "creationInfo": {
8
- "created": "2026-05-27T16:57:30Z",
8
+ "created": "2026-05-30T03:05:55Z",
9
9
  "creators": [
10
10
  "Tool: kici-sbom-generator"
11
11
  ]
@@ -54,7 +54,7 @@
54
54
  {
55
55
  "SPDXID": "SPDXRef-RootPackage",
56
56
  "name": "@kici-dev/engine",
57
- "versionInfo": "0.1.12",
57
+ "versionInfo": "0.1.14",
58
58
  "downloadLocation": "NOASSERTION",
59
59
  "filesAnalyzed": false,
60
60
  "licenseConcluded": "NOASSERTION",
@@ -65,7 +65,7 @@
65
65
  {
66
66
  "referenceCategory": "PACKAGE-MANAGER",
67
67
  "referenceType": "purl",
68
- "referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.12"
68
+ "referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.14"
69
69
  }
70
70
  ],
71
71
  "description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",