@kici-dev/engine 0.1.20 → 0.1.21

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.
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * How a run executes idempotent steps.
4
+ *
5
+ * - `apply` (default): converge — per step, check(); on drift apply(); else in sync.
6
+ * - `check`: report what would change, changing nothing (always succeeds; report-only).
7
+ * - `check-fail-on-drift`: like check, but the run fails if any step reports drift.
8
+ */
9
+ export declare const CheckMode: z.ZodEnum<{
10
+ apply: "apply";
11
+ check: "check";
12
+ "check-fail-on-drift": "check-fail-on-drift";
13
+ }>;
14
+ export type CheckMode = z.infer<typeof CheckMode>;
15
+ /**
16
+ * Per-step idempotent outcome. The first four mirror the StepOutcome union in
17
+ * @kici-dev/core/idempotency verbatim (skipped | applied | declined | dry-run);
18
+ * `no_check` covers a plain step (no check facet) skipped under check mode
19
+ * because it cannot be safely previewed.
20
+ *
21
+ * Orthogonal to ExecutionStepStatus (success | failed | skipped), which stays the
22
+ * top-level status. Dashboard chips map: applied -> "applied", skipped -> "in sync",
23
+ * dry-run -> "would change", no_check -> "no check".
24
+ */
25
+ export declare const CheckStepOutcome: z.ZodEnum<{
26
+ skipped: "skipped";
27
+ applied: "applied";
28
+ declined: "declined";
29
+ "dry-run": "dry-run";
30
+ no_check: "no_check";
31
+ }>;
32
+ export type CheckStepOutcome = z.infer<typeof CheckStepOutcome>;
33
+ //# sourceMappingURL=check-mode.d.ts.map
@@ -0,0 +1,36 @@
1
+ import "./chunk-BTugEXQM.js";
2
+ import { z } from "zod";
3
+ //#region src/check-mode.ts
4
+ /**
5
+ * How a run executes idempotent steps.
6
+ *
7
+ * - `apply` (default): converge — per step, check(); on drift apply(); else in sync.
8
+ * - `check`: report what would change, changing nothing (always succeeds; report-only).
9
+ * - `check-fail-on-drift`: like check, but the run fails if any step reports drift.
10
+ */
11
+ const CheckMode = z.enum([
12
+ "apply",
13
+ "check",
14
+ "check-fail-on-drift"
15
+ ]);
16
+ /**
17
+ * Per-step idempotent outcome. The first four mirror the StepOutcome union in
18
+ * @kici-dev/core/idempotency verbatim (skipped | applied | declined | dry-run);
19
+ * `no_check` covers a plain step (no check facet) skipped under check mode
20
+ * because it cannot be safely previewed.
21
+ *
22
+ * Orthogonal to ExecutionStepStatus (success | failed | skipped), which stays the
23
+ * top-level status. Dashboard chips map: applied -> "applied", skipped -> "in sync",
24
+ * dry-run -> "would change", no_check -> "no check".
25
+ */
26
+ const CheckStepOutcome = z.enum([
27
+ "skipped",
28
+ "applied",
29
+ "declined",
30
+ "dry-run",
31
+ "no_check"
32
+ ]);
33
+ //#endregion
34
+ export { CheckMode, CheckStepOutcome };
35
+
36
+ //# sourceMappingURL=check-mode.js.map
package/dist/index.d.ts CHANGED
@@ -37,6 +37,7 @@ export * from './trigger/decision-trace.js';
37
37
  export * from './trigger/matcher.js';
38
38
  export * from './state-machine/index.js';
39
39
  export * from './provider/index.js';
40
+ export { githubWebhookPath } from './webhook/webhook-url-format.js';
40
41
  export type { WsLike } from './ws/ws-like.js';
41
42
  export * from './ws/close-codes.js';
42
43
  export { WsRateLimiter } from './ws/rate-limiter.js';
@@ -48,6 +49,7 @@ export { deriveOsArchLabels, hostLabel, parseHostLabel, HOST_LABEL_PREFIX, agent
48
49
  export type { NormalizedRunsOn } from './labels.js';
49
50
  export type { AgentRole } from './labels.js';
50
51
  export { LabelMatcher, matcherMatches, matcherSatisfiedBy, partitionMatchers, compileRegexMatcher, } from './labels-match.js';
52
+ export * from './inventory.js';
51
53
  export * from './scaler/scaler-backend-type.js';
52
54
  export * from './scaler/resource-types.js';
53
55
  export * from './registration/registerable-trigger-type.js';
@@ -55,4 +57,5 @@ export * from './bundler/index.js';
55
57
  export { expandSingleDimension, expandMultiDimension, expandMatrix, applyIncludeExclude, type StaticMatrixArray, type StaticMatrixObject, type MatrixInclude, type MatrixExclude, type MatrixValues, } from './matrix/expand.js';
56
58
  export { formatMatrixSuffix, formatExpandedJobName } from './matrix/format.js';
57
59
  export * from './fanout/materialize.js';
60
+ export * from './check-mode.js';
58
61
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import "./chunk-BTugEXQM.js";
2
+ import { CheckMode, CheckStepOutcome } from "./check-mode.js";
2
3
  import { MIN_PROTOCOL_VERSION, PROTOCOL_VERSION } from "./protocol/version.js";
3
4
  import { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
4
5
  import { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
@@ -23,7 +24,7 @@ import { EVENT_LOG_PAYLOAD_CHUNK_BYTES } from "./protocol/event-log-payload.js";
23
24
  import { browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, platformToBrowserMessageSchema } from "./protocol/messages/browser.js";
24
25
  import { joinRequestSchema, joinResponseSchema } from "./protocol/messages/join.js";
25
26
  import { LabelMatcher, compileRegexMatcher, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
26
- import { fleetSelectionSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema } from "./protocol/messages/peer.js";
27
+ import { fleetSelectionSchema, jobProgressAckSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema } from "./protocol/messages/peer.js";
27
28
  import { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema } from "./protocol/messages/orchestrator-agent.js";
28
29
  import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
29
30
  import { createTraceEntry, createWorkflowDecision } from "./trigger/decision-trace.js";
@@ -33,6 +34,7 @@ import "./state-machine/index.js";
33
34
  import { LockFileParseError } from "./provider/lock-file-parse-error.js";
34
35
  import { CheckRunConclusion } from "./provider/check-run-conclusion.js";
35
36
  import "./provider/index.js";
37
+ import { githubWebhookPath } from "./webhook/webhook-url-format.js";
36
38
  import { WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_DISPATCH_ACK_TIMEOUT, 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 } from "./ws/close-codes.js";
37
39
  import { WsRateLimiter } from "./ws/rate-limiter.js";
38
40
  import { AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, KICI_AGENT_ENV_PREFIX, SANDBOX_DEFAULT_VARS } from "./env/environment-allowlist.js";
@@ -40,6 +42,7 @@ import "./secrets/index.js";
40
42
  import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./environment/scope-resolver.js";
41
43
  import "./environment/index.js";
42
44
  import { HOST_LABEL_PREFIX, KNOWN_ROLES, SELF_REPORTED_LABEL_PREFIXES, agentTypeLabel, deriveOsArchLabels, hostLabel, isSelfReportedLabel, mergeAutoLabels, normalizeRunsOn, parseHostLabel, resolveRoleLabels, scalerAgentLabels, scalerLabel, validateNoReservedLabels } from "./labels.js";
45
+ import { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments } from "./inventory.js";
43
46
  import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, validateResourceRequest } from "./scaler/resource-types.js";
44
47
  import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
45
48
  import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
@@ -47,4 +50,4 @@ import "./bundler/index.js";
47
50
  import { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension } from "./matrix/expand.js";
48
51
  import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
49
52
  import { FanoutError, MAX_FANOUT_JOBS, VariantKind, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
50
- export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, ApprovalDecision, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckRunConclusion, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutError, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, IfFailedPolicy, InitFailureCategory, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LabelMatcher, LockFileParseError, MAX_FANOUT_JOBS, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, ORCH_CAPABILITIES, OnUnreachableMode, OrchRole, POLICY_BY_ACTION, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, StepApprovalOutcome, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TestRelayType, TimeoutReason, TriggerSource, VariantKind, 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_DISPATCH_ACK_TIMEOUT, 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, applyIncludeExclude, approvalRequirementSchema, approverClauseSchema, attestationListItemSchema, 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, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, compileRegexMatcher, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseMemoryString, partitionMatchers, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
53
+ export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, ApprovalDecision, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutError, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HostInventoryEntry, HostPropertyValue, IfFailedPolicy, InitFailureCategory, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LabelMatcher, LockFileParseError, MAX_FANOUT_JOBS, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, ORCH_CAPABILITIES, OnUnreachableMode, OrchRole, POLICY_BY_ACTION, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, StepApprovalOutcome, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TestRelayType, TimeoutReason, TriggerSource, VariantKind, 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_DISPATCH_ACK_TIMEOUT, 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, applyIncludeExclude, approvalRequirementSchema, approverClauseSchema, attestationListItemSchema, 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, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, coerceHostPropertyValue, compileRegexMatcher, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseHostPropertyAssignments, parseMemoryString, partitionMatchers, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Canonical, workflow-queryable host inventory schema.
3
+ *
4
+ * One `HostInventoryEntry` is the single shape every inventory consumer reads:
5
+ * the orchestrator's roster store maps each `host_roster` row to it, the
6
+ * `inventory.query`/`inventory.get` agent-API RPC returns it, and the SDK's
7
+ * `ctx.kici.inventory` types it. Labels stay the flat-string grouping
8
+ * dimension (the shipped runsOnAll glob/regex matchers operate on flat
9
+ * strings); `properties` is the separate typed host-vars dimension.
10
+ */
11
+ import { z } from 'zod';
12
+ import { LabelMatcher } from './labels-match.js';
13
+ /** A single host-property value — the typed host-vars dimension. */
14
+ export declare const HostPropertyValue: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
15
+ export type HostPropertyValue = z.infer<typeof HostPropertyValue>;
16
+ /**
17
+ * Lifecycle class of a roster host. Mirrors the orchestrator's `LifecycleClass`
18
+ * (the auth token's `agent_type` snapshot): `static` hosts persist and alarm on
19
+ * absence; `ephemeral` hosts are GC'd past their ttl.
20
+ */
21
+ export declare const InventoryLifecycleClass: z.ZodEnum<{
22
+ static: "static";
23
+ ephemeral: "ephemeral";
24
+ }>;
25
+ export type InventoryLifecycleClass = z.infer<typeof InventoryLifecycleClass>;
26
+ /**
27
+ * Read-time derived status of a roster host. Mirrors the orchestrator's
28
+ * `HostStatus` values: `ready` (live + fresh heartbeat), `unreachable`
29
+ * (declared static host not currently live), `stale` (ephemeral past ttl,
30
+ * awaiting reap).
31
+ */
32
+ export declare const InventoryHostStatus: z.ZodEnum<{
33
+ unreachable: "unreachable";
34
+ ready: "ready";
35
+ stale: "stale";
36
+ }>;
37
+ export type InventoryHostStatus = z.infer<typeof InventoryHostStatus>;
38
+ /** Canonical queryable inventory record for one roster host. */
39
+ export declare const HostInventoryEntry: z.ZodObject<{
40
+ agentId: z.ZodString;
41
+ labels: z.ZodArray<z.ZodString>;
42
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
43
+ hostname: z.ZodNullable<z.ZodString>;
44
+ platform: z.ZodNullable<z.ZodString>;
45
+ arch: z.ZodNullable<z.ZodString>;
46
+ lifecycleClass: z.ZodEnum<{
47
+ static: "static";
48
+ ephemeral: "ephemeral";
49
+ }>;
50
+ status: z.ZodEnum<{
51
+ unreachable: "unreachable";
52
+ ready: "ready";
53
+ stale: "stale";
54
+ }>;
55
+ lastSeen: z.ZodString;
56
+ }, z.core.$strip>;
57
+ export type HostInventoryEntry = z.infer<typeof HostInventoryEntry>;
58
+ /**
59
+ * Label selector for `inventory.query`. Reuses the shipped `LabelMatcher`
60
+ * (glob/regex) semantics: `include` is an OR-of-AND group list, `exclude`
61
+ * removes any host whose labels satisfy a matcher. Omit ⇒ all hosts.
62
+ * Property filtering is done client-side in the workflow (full JS).
63
+ */
64
+ export interface InventorySelector {
65
+ include?: (readonly LabelMatcher[])[];
66
+ exclude?: LabelMatcher[];
67
+ }
68
+ /** Zod validator for the `inventory.query` selector params on the wire. */
69
+ export declare const InventorySelectorSchema: z.ZodObject<{
70
+ include: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
71
+ kind: z.ZodLiteral<"exact">;
72
+ value: z.ZodString;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ kind: z.ZodLiteral<"regex">;
75
+ source: z.ZodString;
76
+ flags: z.ZodString;
77
+ }, z.core.$strip>], "kind">>>>;
78
+ exclude: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
79
+ kind: z.ZodLiteral<"exact">;
80
+ value: z.ZodString;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ kind: z.ZodLiteral<"regex">;
83
+ source: z.ZodString;
84
+ flags: z.ZodString;
85
+ }, z.core.$strip>], "kind">>>;
86
+ }, z.core.$strip>;
87
+ /**
88
+ * Coerce a raw string into a typed {@link HostPropertyValue}: `true`/`false` ⇒
89
+ * boolean, a finite integer/decimal literal ⇒ number, everything else ⇒ the
90
+ * verbatim string. The single source of truth for the `key=value` typing used
91
+ * by both `kici-admin host declare --prop` and the agent's `KICI_PROPERTIES`.
92
+ */
93
+ export declare function coerceHostPropertyValue(raw: string): HostPropertyValue;
94
+ /**
95
+ * Parse a list of `key=value` property assignments into a typed property bag.
96
+ * Values are typed via {@link coerceHostPropertyValue}. Throws on a malformed
97
+ * entry (missing `=`) or an empty key. Used by the host-declare CLI `--prop`
98
+ * option and the agent's `KICI_PROPERTIES` config parse.
99
+ */
100
+ export declare function parseHostPropertyAssignments(values: string[]): Record<string, HostPropertyValue>;
101
+ //# sourceMappingURL=inventory.d.ts.map
@@ -0,0 +1,89 @@
1
+ import "./chunk-BTugEXQM.js";
2
+ import { LabelMatcher } from "./labels-match.js";
3
+ import { z } from "zod";
4
+ //#region src/inventory.ts
5
+ /**
6
+ * Canonical, workflow-queryable host inventory schema.
7
+ *
8
+ * One `HostInventoryEntry` is the single shape every inventory consumer reads:
9
+ * the orchestrator's roster store maps each `host_roster` row to it, the
10
+ * `inventory.query`/`inventory.get` agent-API RPC returns it, and the SDK's
11
+ * `ctx.kici.inventory` types it. Labels stay the flat-string grouping
12
+ * dimension (the shipped runsOnAll glob/regex matchers operate on flat
13
+ * strings); `properties` is the separate typed host-vars dimension.
14
+ */
15
+ /** A single host-property value — the typed host-vars dimension. */
16
+ const HostPropertyValue = z.union([
17
+ z.string(),
18
+ z.number(),
19
+ z.boolean()
20
+ ]);
21
+ /**
22
+ * Lifecycle class of a roster host. Mirrors the orchestrator's `LifecycleClass`
23
+ * (the auth token's `agent_type` snapshot): `static` hosts persist and alarm on
24
+ * absence; `ephemeral` hosts are GC'd past their ttl.
25
+ */
26
+ const InventoryLifecycleClass = z.enum(["static", "ephemeral"]);
27
+ /**
28
+ * Read-time derived status of a roster host. Mirrors the orchestrator's
29
+ * `HostStatus` values: `ready` (live + fresh heartbeat), `unreachable`
30
+ * (declared static host not currently live), `stale` (ephemeral past ttl,
31
+ * awaiting reap).
32
+ */
33
+ const InventoryHostStatus = z.enum([
34
+ "ready",
35
+ "unreachable",
36
+ "stale"
37
+ ]);
38
+ /** Canonical queryable inventory record for one roster host. */
39
+ const HostInventoryEntry = z.object({
40
+ agentId: z.string(),
41
+ /** Flat-string grouping/tags dimension (runsOnAll selectors operate on these). */
42
+ labels: z.array(z.string()),
43
+ /** Typed host-vars dimension (the ansible host-vars analogue). */
44
+ properties: z.record(z.string(), HostPropertyValue),
45
+ hostname: z.string().nullable(),
46
+ platform: z.string().nullable(),
47
+ arch: z.string().nullable(),
48
+ lifecycleClass: InventoryLifecycleClass,
49
+ status: InventoryHostStatus,
50
+ /** ISO 8601 timestamp of the last heartbeat. */
51
+ lastSeen: z.string()
52
+ });
53
+ /** Zod validator for the `inventory.query` selector params on the wire. */
54
+ const InventorySelectorSchema = z.object({
55
+ include: z.array(z.array(LabelMatcher)).optional(),
56
+ exclude: z.array(LabelMatcher).optional()
57
+ });
58
+ /**
59
+ * Coerce a raw string into a typed {@link HostPropertyValue}: `true`/`false` ⇒
60
+ * boolean, a finite integer/decimal literal ⇒ number, everything else ⇒ the
61
+ * verbatim string. The single source of truth for the `key=value` typing used
62
+ * by both `kici-admin host declare --prop` and the agent's `KICI_PROPERTIES`.
63
+ */
64
+ function coerceHostPropertyValue(raw) {
65
+ if (raw === "true") return true;
66
+ if (raw === "false") return false;
67
+ if (raw !== "" && /^-?\d+(\.\d+)?$/.test(raw) && Number.isFinite(Number(raw))) return Number(raw);
68
+ return raw;
69
+ }
70
+ /**
71
+ * Parse a list of `key=value` property assignments into a typed property bag.
72
+ * Values are typed via {@link coerceHostPropertyValue}. Throws on a malformed
73
+ * entry (missing `=`) or an empty key. Used by the host-declare CLI `--prop`
74
+ * option and the agent's `KICI_PROPERTIES` config parse.
75
+ */
76
+ function parseHostPropertyAssignments(values) {
77
+ const out = {};
78
+ for (const entry of values) {
79
+ const eq = entry.indexOf("=");
80
+ if (eq <= 0) throw new Error(`Invalid property '${entry}': expected key=value`);
81
+ const key = entry.slice(0, eq);
82
+ out[key] = coerceHostPropertyValue(entry.slice(eq + 1));
83
+ }
84
+ return out;
85
+ }
86
+ //#endregion
87
+ export { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments };
88
+
89
+ //# sourceMappingURL=inventory.js.map
@@ -43,7 +43,8 @@ function partitionMatchers(ms) {
43
43
  const exact = [];
44
44
  const regex = [];
45
45
  for (const m of ms) if (m.kind === "exact") exact.push(m.value);
46
- else regex.push(m);
46
+ else if (m.kind === "regex") regex.push(m);
47
+ else throw new Error(`partitionMatchers: invalid label matcher ${JSON.stringify(m)} — expected { kind: 'exact', value } or { kind: 'regex', source, flags }. The lock file is likely stale or compiled by an older engine — recompile with \`kici compile\`.`);
47
48
  return {
48
49
  exact,
49
50
  regex
@@ -105,6 +105,14 @@ export declare const dashboardJobDetailSchema: z.ZodObject<{
105
105
  errorMessage: z.ZodNullable<z.ZodString>;
106
106
  stepType: z.ZodOptional<z.ZodString>;
107
107
  secretsAccessed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
108
+ checkOutcome: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
109
+ skipped: "skipped";
110
+ applied: "applied";
111
+ declined: "declined";
112
+ "dry-run": "dry-run";
113
+ no_check: "no_check";
114
+ }>>>;
115
+ driftSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
116
  }, z.core.$strip>>;
109
117
  }, z.core.$strip>;
110
118
  /** Response with full run detail (correlates to dashboard.run.detail). */
@@ -164,6 +172,14 @@ export declare const dashboardRunDetailResponseSchema: z.ZodObject<{
164
172
  errorMessage: z.ZodNullable<z.ZodString>;
165
173
  stepType: z.ZodOptional<z.ZodString>;
166
174
  secretsAccessed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
175
+ checkOutcome: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
176
+ skipped: "skipped";
177
+ applied: "applied";
178
+ declined: "declined";
179
+ "dry-run": "dry-run";
180
+ no_check: "no_check";
181
+ }>>>;
182
+ driftSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
183
  }, z.core.$strip>>;
168
184
  }, z.core.$strip>>;
169
185
  trustContext: z.ZodOptional<z.ZodObject<{
@@ -2615,6 +2631,11 @@ export declare const testRelayTriggerRequestSchema: z.ZodObject<{
2615
2631
  cliPublicKey: z.ZodOptional<z.ZodString>;
2616
2632
  inlineLockFile: z.ZodOptional<z.ZodString>;
2617
2633
  fullRepo: z.ZodOptional<z.ZodBoolean>;
2634
+ checkMode: z.ZodOptional<z.ZodEnum<{
2635
+ apply: "apply";
2636
+ check: "check";
2637
+ "check-fail-on-drift": "check-fail-on-drift";
2638
+ }>>;
2618
2639
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2619
2640
  encryptedSecrets: z.ZodOptional<z.ZodString>;
2620
2641
  encryptedSecretsKey: z.ZodOptional<z.ZodString>;
@@ -4313,6 +4334,11 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4313
4334
  cliPublicKey: z.ZodOptional<z.ZodString>;
4314
4335
  inlineLockFile: z.ZodOptional<z.ZodString>;
4315
4336
  fullRepo: z.ZodOptional<z.ZodBoolean>;
4337
+ checkMode: z.ZodOptional<z.ZodEnum<{
4338
+ apply: "apply";
4339
+ check: "check";
4340
+ "check-fail-on-drift": "check-fail-on-drift";
4341
+ }>>;
4316
4342
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4317
4343
  encryptedSecrets: z.ZodOptional<z.ZodString>;
4318
4344
  encryptedSecretsKey: z.ZodOptional<z.ZodString>;
@@ -4445,6 +4471,14 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
4445
4471
  errorMessage: z.ZodNullable<z.ZodString>;
4446
4472
  stepType: z.ZodOptional<z.ZodString>;
4447
4473
  secretsAccessed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
4474
+ checkOutcome: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
4475
+ skipped: "skipped";
4476
+ applied: "applied";
4477
+ declined: "declined";
4478
+ "dry-run": "dry-run";
4479
+ no_check: "no_check";
4480
+ }>>>;
4481
+ driftSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4448
4482
  }, z.core.$strip>>;
4449
4483
  }, z.core.$strip>>;
4450
4484
  trustContext: z.ZodOptional<z.ZodObject<{
@@ -5552,6 +5586,14 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
5552
5586
  errorMessage: z.ZodNullable<z.ZodString>;
5553
5587
  stepType: z.ZodOptional<z.ZodString>;
5554
5588
  secretsAccessed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5589
+ checkOutcome: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5590
+ skipped: "skipped";
5591
+ applied: "applied";
5592
+ declined: "declined";
5593
+ "dry-run": "dry-run";
5594
+ no_check: "no_check";
5595
+ }>>>;
5596
+ driftSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5555
5597
  }, z.core.$strip>>;
5556
5598
  }, z.core.$strip>>;
5557
5599
  trustContext: z.ZodOptional<z.ZodObject<{
@@ -5566,6 +5608,11 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
5566
5608
  }>>;
5567
5609
  contributorUsername: z.ZodNullable<z.ZodString>;
5568
5610
  }, z.core.$strip>>;
5611
+ checkMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5612
+ apply: "apply";
5613
+ check: "check";
5614
+ "check-fail-on-drift": "check-fail-on-drift";
5615
+ }>>>;
5569
5616
  initFailure: z.ZodOptional<z.ZodObject<{
5570
5617
  scope: z.ZodEnum<{
5571
5618
  run: "run";
@@ -1,4 +1,5 @@
1
1
  import "../../chunk-BTugEXQM.js";
2
+ import { CheckMode, CheckStepOutcome } from "../../check-mode.js";
2
3
  import { actorPrincipalSchema } from "./actor.js";
3
4
  import { initFailureSchema } from "./execution-status.js";
4
5
  import { SourceSubtype } from "./source-registration.js";
@@ -41,7 +42,11 @@ const dashboardStepDetailSchema = z.object({
41
42
  /** Step type (e.g., 'hook:onCancel', 'hook:cleanup'). Omitted for regular steps. */
42
43
  stepType: z.string().optional(),
43
44
  /** Secret context names accessed by this step. null = tracking not available. */
44
- secretsAccessed: z.array(z.string()).nullable().optional()
45
+ secretsAccessed: z.array(z.string()).nullable().optional(),
46
+ /** Idempotent per-step outcome under a check mode. null/absent for non-check runs. */
47
+ checkOutcome: CheckStepOutcome.nullable().optional(),
48
+ /** Human-readable drift summary, present when the step reported drift. */
49
+ driftSummary: z.string().nullable().optional()
45
50
  });
46
51
  /** Job detail within a run detail response. */
47
52
  const dashboardJobDetailSchema = z.object({
@@ -1424,6 +1429,8 @@ const testRelayTriggerRequestSchema = z.object({
1424
1429
  cliPublicKey: z.string().optional(),
1425
1430
  inlineLockFile: z.string().optional(),
1426
1431
  fullRepo: z.boolean().optional(),
1432
+ /** Run mode for idempotent steps; relayed onto the dispatch event. Omitted = apply. */
1433
+ checkMode: CheckMode.optional(),
1427
1434
  secrets: z.record(z.string(), z.string()).optional(),
1428
1435
  encryptedSecrets: z.string().optional(),
1429
1436
  encryptedSecretsKey: z.string().optional()
@@ -1625,6 +1632,8 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
1625
1632
  const dashboardRunDetailApiResponseSchema = z.object({
1626
1633
  jobs: z.array(dashboardJobDetailSchema),
1627
1634
  trustContext: trustContextSchema.optional(),
1635
+ /** Run mode for idempotent steps. A non-apply value labels the run a check-mode preview. */
1636
+ checkMode: CheckMode.nullable().optional(),
1628
1637
  /**
1629
1638
  * Structured init-failure signal for runs that never started a step. Set
1630
1639
  * when the run row was created via `recordInitFailureRun()` on the
@@ -21,6 +21,7 @@ export declare const ExecutionRunStatus: z.ZodEnum<{
21
21
  export type ExecutionRunStatus = z.infer<typeof ExecutionRunStatus>;
22
22
  /** Status values for execution jobs (execution_jobs table + job.status protocol messages). */
23
23
  export declare const ExecutionJobStatus: z.ZodEnum<{
24
+ skipped: "skipped";
24
25
  success: "success";
25
26
  pending: "pending";
26
27
  running: "running";
@@ -29,17 +30,16 @@ export declare const ExecutionJobStatus: z.ZodEnum<{
29
30
  cancelling: "cancelling";
30
31
  queued: "queued";
31
32
  recovering: "recovering";
32
- skipped: "skipped";
33
33
  timed_out_stale: "timed_out_stale";
34
34
  drift_dropped: "drift_dropped";
35
35
  }>;
36
36
  export type ExecutionJobStatus = z.infer<typeof ExecutionJobStatus>;
37
37
  /** Status values for execution steps (execution_steps table + step.status protocol messages). */
38
38
  export declare const ExecutionStepStatus: z.ZodEnum<{
39
+ skipped: "skipped";
39
40
  success: "success";
40
41
  running: "running";
41
42
  failed: "failed";
42
- skipped: "skipped";
43
43
  }>;
44
44
  export type ExecutionStepStatus = z.infer<typeof ExecutionStepStatus>;
45
45
  /**
@@ -112,8 +112,8 @@ export type CacheRunEventType = z.infer<typeof CacheRunEventType>;
112
112
  * - `error` — the restore/save failed (pack/extract/transport error).
113
113
  */
114
114
  export declare const CacheOutcome: z.ZodEnum<{
115
- error: "error";
116
115
  skipped: "skipped";
116
+ error: "error";
117
117
  hit: "hit";
118
118
  miss: "miss";
119
119
  saved: "saved";
@@ -202,10 +202,10 @@ export declare const stepStatusForwardSchema: z.ZodObject<{
202
202
  stepIndex: z.ZodNumber;
203
203
  stepName: z.ZodString;
204
204
  state: z.ZodEnum<{
205
+ skipped: "skipped";
205
206
  success: "success";
206
207
  running: "running";
207
208
  failed: "failed";
208
- skipped: "skipped";
209
209
  }>;
210
210
  timestamp: z.ZodNumber;
211
211
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -219,6 +219,7 @@ export declare const jobStatusForwardSchema: z.ZodObject<{
219
219
  jobId: z.ZodString;
220
220
  jobName: z.ZodString;
221
221
  status: z.ZodEnum<{
222
+ skipped: "skipped";
222
223
  success: "success";
223
224
  pending: "pending";
224
225
  running: "running";
@@ -227,7 +228,6 @@ export declare const jobStatusForwardSchema: z.ZodObject<{
227
228
  cancelling: "cancelling";
228
229
  queued: "queued";
229
230
  recovering: "recovering";
230
- skipped: "skipped";
231
231
  timed_out_stale: "timed_out_stale";
232
232
  drift_dropped: "drift_dropped";
233
233
  }>;
@@ -158,6 +158,7 @@ export declare const agentRegisterSchema: z.ZodObject<{
158
158
  nodeVersion: z.ZodOptional<z.ZodString>;
159
159
  runningAsUser: z.ZodOptional<z.ZodString>;
160
160
  runningAsUid: z.ZodOptional<z.ZodNumber>;
161
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
161
162
  }, z.core.$strip>;
162
163
  /** Periodic agent status update. */
163
164
  export declare const agentStatusSchema: z.ZodObject<{
@@ -176,6 +177,7 @@ export declare const jobStatusSchema: z.ZodObject<{
176
177
  runId: z.ZodString;
177
178
  jobId: z.ZodString;
178
179
  state: z.ZodEnum<{
180
+ skipped: "skipped";
179
181
  success: "success";
180
182
  pending: "pending";
181
183
  running: "running";
@@ -184,7 +186,6 @@ export declare const jobStatusSchema: z.ZodObject<{
184
186
  cancelling: "cancelling";
185
187
  queued: "queued";
186
188
  recovering: "recovering";
187
- skipped: "skipped";
188
189
  timed_out_stale: "timed_out_stale";
189
190
  drift_dropped: "drift_dropped";
190
191
  }>;
@@ -267,10 +268,10 @@ export declare const agentStepStatusSchema: z.ZodObject<{
267
268
  stepIndex: z.ZodNumber;
268
269
  stepName: z.ZodString;
269
270
  state: z.ZodEnum<{
271
+ skipped: "skipped";
270
272
  success: "success";
271
273
  running: "running";
272
274
  failed: "failed";
273
- skipped: "skipped";
274
275
  }>;
275
276
  timestamp: z.ZodNumber;
276
277
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -698,6 +699,7 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
698
699
  nodeVersion: z.ZodOptional<z.ZodString>;
699
700
  runningAsUser: z.ZodOptional<z.ZodString>;
700
701
  runningAsUid: z.ZodOptional<z.ZodNumber>;
702
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
701
703
  }, z.core.$strip>, z.ZodObject<{
702
704
  type: z.ZodLiteral<"agent.status">;
703
705
  messageId: z.ZodString;
@@ -712,6 +714,7 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
712
714
  runId: z.ZodString;
713
715
  jobId: z.ZodString;
714
716
  state: z.ZodEnum<{
717
+ skipped: "skipped";
715
718
  success: "success";
716
719
  pending: "pending";
717
720
  running: "running";
@@ -720,7 +723,6 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
720
723
  cancelling: "cancelling";
721
724
  queued: "queued";
722
725
  recovering: "recovering";
723
- skipped: "skipped";
724
726
  timed_out_stale: "timed_out_stale";
725
727
  drift_dropped: "drift_dropped";
726
728
  }>;
@@ -763,10 +765,10 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
763
765
  stepIndex: z.ZodNumber;
764
766
  stepName: z.ZodString;
765
767
  state: z.ZodEnum<{
768
+ skipped: "skipped";
766
769
  success: "success";
767
770
  running: "running";
768
771
  failed: "failed";
769
- skipped: "skipped";
770
772
  }>;
771
773
  timestamp: z.ZodNumber;
772
774
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -224,7 +224,17 @@ const agentRegisterSchema = z.object({
224
224
  /** Username of the OS user running the agent process */
225
225
  runningAsUser: z.string().optional(),
226
226
  /** UID of the OS user running the agent process */
227
- runningAsUid: z.number().optional()
227
+ runningAsUid: z.number().optional(),
228
+ /**
229
+ * Agent-reported typed host-vars (the `KICI_PROPERTIES` bag). Values are
230
+ * `string | number | boolean`; shallow-merged into the host roster's
231
+ * `host_properties` (agent-reported keys win). Optional — omitted ⇒ none.
232
+ */
233
+ properties: z.record(z.string(), z.union([
234
+ z.string(),
235
+ z.number(),
236
+ z.boolean()
237
+ ])).optional()
228
238
  });
229
239
  /** Periodic agent status update. */
230
240
  const agentStatusSchema = z.object({
@@ -214,6 +214,7 @@ export declare const jobProgressSchema: z.ZodObject<{
214
214
  stepIndex: z.ZodNumber;
215
215
  stepName: z.ZodString;
216
216
  state: z.ZodEnum<{
217
+ skipped: "skipped";
217
218
  success: "success";
218
219
  pending: "pending";
219
220
  running: "running";
@@ -222,13 +223,36 @@ export declare const jobProgressSchema: z.ZodObject<{
222
223
  cancelling: "cancelling";
223
224
  queued: "queued";
224
225
  recovering: "recovering";
225
- skipped: "skipped";
226
226
  timed_out_stale: "timed_out_stale";
227
227
  drift_dropped: "drift_dropped";
228
228
  }>;
229
229
  timestamp: z.ZodNumber;
230
230
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
231
231
  }, z.core.$strip>;
232
+ /**
233
+ * Acknowledgement sent coordinator -> worker once the coordinator has applied
234
+ * a terminal `job.progress` (kind='job') to its run/job DB rows. The worker
235
+ * uses it to prune the matching record from its durable outbox. Carries
236
+ * `state` for debuggability; `(runId, jobId)` is the dedup key.
237
+ */
238
+ export declare const jobProgressAckSchema: z.ZodObject<{
239
+ type: z.ZodLiteral<"job.progress.ack">;
240
+ runId: z.ZodString;
241
+ jobId: z.ZodString;
242
+ state: z.ZodEnum<{
243
+ skipped: "skipped";
244
+ success: "success";
245
+ pending: "pending";
246
+ running: "running";
247
+ failed: "failed";
248
+ cancelled: "cancelled";
249
+ cancelling: "cancelling";
250
+ queued: "queued";
251
+ recovering: "recovering";
252
+ timed_out_stale: "timed_out_stale";
253
+ drift_dropped: "drift_dropped";
254
+ }>;
255
+ }, z.core.$strip>;
232
256
  /** Request to cancel a job on a peer orchestrator. */
233
257
  export declare const peerJobCancelSchema: z.ZodObject<{
234
258
  type: z.ZodLiteral<"peer.job.cancel">;
@@ -555,6 +579,7 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
555
579
  stepIndex: z.ZodNumber;
556
580
  stepName: z.ZodString;
557
581
  state: z.ZodEnum<{
582
+ skipped: "skipped";
558
583
  success: "success";
559
584
  pending: "pending";
560
585
  running: "running";
@@ -563,12 +588,28 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
563
588
  cancelling: "cancelling";
564
589
  queued: "queued";
565
590
  recovering: "recovering";
566
- skipped: "skipped";
567
591
  timed_out_stale: "timed_out_stale";
568
592
  drift_dropped: "drift_dropped";
569
593
  }>;
570
594
  timestamp: z.ZodNumber;
571
595
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
596
+ }, z.core.$strip>, z.ZodObject<{
597
+ type: z.ZodLiteral<"job.progress.ack">;
598
+ runId: z.ZodString;
599
+ jobId: z.ZodString;
600
+ state: z.ZodEnum<{
601
+ skipped: "skipped";
602
+ success: "success";
603
+ pending: "pending";
604
+ running: "running";
605
+ failed: "failed";
606
+ cancelled: "cancelled";
607
+ cancelling: "cancelling";
608
+ queued: "queued";
609
+ recovering: "recovering";
610
+ timed_out_stale: "timed_out_stale";
611
+ drift_dropped: "drift_dropped";
612
+ }>;
572
613
  }, z.core.$strip>, z.ZodObject<{
573
614
  type: z.ZodLiteral<"peer.job.cancel">;
574
615
  runId: z.ZodString;
@@ -839,6 +880,7 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
839
880
  stepIndex: z.ZodNumber;
840
881
  stepName: z.ZodString;
841
882
  state: z.ZodEnum<{
883
+ skipped: "skipped";
842
884
  success: "success";
843
885
  pending: "pending";
844
886
  running: "running";
@@ -847,12 +889,28 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
847
889
  cancelling: "cancelling";
848
890
  queued: "queued";
849
891
  recovering: "recovering";
850
- skipped: "skipped";
851
892
  timed_out_stale: "timed_out_stale";
852
893
  drift_dropped: "drift_dropped";
853
894
  }>;
854
895
  timestamp: z.ZodNumber;
855
896
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
897
+ }, z.core.$strip>, z.ZodObject<{
898
+ type: z.ZodLiteral<"job.progress.ack">;
899
+ runId: z.ZodString;
900
+ jobId: z.ZodString;
901
+ state: z.ZodEnum<{
902
+ skipped: "skipped";
903
+ success: "success";
904
+ pending: "pending";
905
+ running: "running";
906
+ failed: "failed";
907
+ cancelled: "cancelled";
908
+ cancelling: "cancelling";
909
+ queued: "queued";
910
+ recovering: "recovering";
911
+ timed_out_stale: "timed_out_stale";
912
+ drift_dropped: "drift_dropped";
913
+ }>;
856
914
  }, z.core.$strip>, z.ZodObject<{
857
915
  type: z.ZodLiteral<"peer.job.cancel">;
858
916
  runId: z.ZodString;
@@ -964,6 +1022,7 @@ export type ScalerCapacitySummary = z.infer<typeof scalerCapacitySummarySchema>;
964
1022
  export type PeerHeartbeat = z.infer<typeof peerHeartbeatSchema>;
965
1023
  export type JobReroute = z.infer<typeof jobRerouteSchema>;
966
1024
  export type JobProgress = z.infer<typeof jobProgressSchema>;
1025
+ export type JobProgressAck = z.infer<typeof jobProgressAckSchema>;
967
1026
  export type PeerScalerEvent = z.infer<typeof peerScalerEventSchema>;
968
1027
  export type PeerJobCancel = z.infer<typeof peerJobCancelSchema>;
969
1028
  export type RaftVoteRequest = z.infer<typeof raftVoteRequestSchema>;
@@ -242,6 +242,18 @@ const jobProgressSchema = z.object({
242
242
  timestamp: z.number(),
243
243
  data: z.record(z.string(), z.unknown()).optional()
244
244
  });
245
+ /**
246
+ * Acknowledgement sent coordinator -> worker once the coordinator has applied
247
+ * a terminal `job.progress` (kind='job') to its run/job DB rows. The worker
248
+ * uses it to prune the matching record from its durable outbox. Carries
249
+ * `state` for debuggability; `(runId, jobId)` is the dedup key.
250
+ */
251
+ const jobProgressAckSchema = z.object({
252
+ type: z.literal("job.progress.ack"),
253
+ runId: z.string(),
254
+ jobId: z.string(),
255
+ state: ExecutionJobStatus
256
+ });
245
257
  /** Request to cancel a job on a peer orchestrator. */
246
258
  const peerJobCancelSchema = z.object({
247
259
  type: z.literal("peer.job.cancel"),
@@ -408,6 +420,7 @@ const peerToPeerMessageSchema = z.discriminatedUnion("type", [
408
420
  jobRerouteSchema,
409
421
  jobRerouteAckSchema,
410
422
  jobProgressSchema,
423
+ jobProgressAckSchema,
411
424
  peerJobCancelSchema,
412
425
  raftVoteRequestSchema,
413
426
  raftVoteResponseSchema,
@@ -434,6 +447,7 @@ const peerFromPeerMessageSchema = z.discriminatedUnion("type", [
434
447
  jobRerouteSchema,
435
448
  jobRerouteAckSchema,
436
449
  jobProgressSchema,
450
+ jobProgressAckSchema,
437
451
  peerJobCancelSchema,
438
452
  raftVoteRequestSchema,
439
453
  raftVoteResponseSchema,
@@ -451,6 +465,6 @@ const peerFromPeerMessageSchema = z.discriminatedUnion("type", [
451
465
  peerScalerEventSchema
452
466
  ]);
453
467
  //#endregion
454
- export { fleetSelectionSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema };
468
+ export { fleetSelectionSchema, jobProgressAckSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema };
455
469
 
456
470
  //# sourceMappingURL=peer.js.map
@@ -2006,6 +2006,11 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
2006
2006
  cliPublicKey: z.ZodOptional<z.ZodString>;
2007
2007
  inlineLockFile: z.ZodOptional<z.ZodString>;
2008
2008
  fullRepo: z.ZodOptional<z.ZodBoolean>;
2009
+ checkMode: z.ZodOptional<z.ZodEnum<{
2010
+ apply: "apply";
2011
+ check: "check";
2012
+ "check-fail-on-drift": "check-fail-on-drift";
2013
+ }>>;
2009
2014
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2010
2015
  encryptedSecrets: z.ZodOptional<z.ZodString>;
2011
2016
  encryptedSecretsKey: z.ZodOptional<z.ZodString>;
@@ -2175,10 +2180,10 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
2175
2180
  stepIndex: z.ZodNumber;
2176
2181
  stepName: z.ZodString;
2177
2182
  state: z.ZodEnum<{
2183
+ skipped: "skipped";
2178
2184
  success: "success";
2179
2185
  running: "running";
2180
2186
  failed: "failed";
2181
- skipped: "skipped";
2182
2187
  }>;
2183
2188
  timestamp: z.ZodNumber;
2184
2189
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -2190,6 +2195,7 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
2190
2195
  jobId: z.ZodString;
2191
2196
  jobName: z.ZodString;
2192
2197
  status: z.ZodEnum<{
2198
+ skipped: "skipped";
2193
2199
  success: "success";
2194
2200
  pending: "pending";
2195
2201
  running: "running";
@@ -2198,7 +2204,6 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
2198
2204
  cancelling: "cancelling";
2199
2205
  queued: "queued";
2200
2206
  recovering: "recovering";
2201
- skipped: "skipped";
2202
2207
  timed_out_stale: "timed_out_stale";
2203
2208
  drift_dropped: "drift_dropped";
2204
2209
  }>;
@@ -21,7 +21,7 @@ import type { ProviderType } from '../provider/types.js';
21
21
  import type { ApproverClause } from '../approval/types.js';
22
22
  import { LabelMatcher } from '../labels-match.js';
23
23
  /** Schema version - increment on breaking changes */
24
- export declare const SCHEMA_VERSION: 20;
24
+ export declare const SCHEMA_VERSION: 21;
25
25
  /**
26
26
  * Normalized approval config carried in the lock file. Produced by the compiler
27
27
  * from an SDK `requireApproval` at any of the three levels; consumed by the
@@ -20,7 +20,7 @@ import { z } from "zod";
20
20
  * Schema version 20: runsOn/runsOnAll/excludeLabels carry LabelMatcher (exact|regex) for glob+regex selectors.
21
21
  */
22
22
  /** Schema version - increment on breaking changes */
23
- const SCHEMA_VERSION = 20;
23
+ const SCHEMA_VERSION = 21;
24
24
  /** Type guard for inline expression values */
25
25
  function isLockInlineValue(value) {
26
26
  return typeof value === "object" && value !== null && value._type === "inline";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Route shape for a GitHub App webhook. Org-scoped, NOT app-scoped — the app
3
+ * id does not appear, so the URL is resolvable before the App exists (the
4
+ * manifest setup flow needs it up front to bake into the App manifest). Shared
5
+ * by the Platform's webhook-URL builder and the orchestrator's manifest
6
+ * pre-flight so the two never drift.
7
+ */
8
+ export declare function githubWebhookPath(orgId: string): string;
9
+ //# sourceMappingURL=webhook-url-format.d.ts.map
@@ -0,0 +1,16 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ //#region src/webhook/webhook-url-format.ts
3
+ /**
4
+ * Route shape for a GitHub App webhook. Org-scoped, NOT app-scoped — the app
5
+ * id does not appear, so the URL is resolvable before the App exists (the
6
+ * manifest setup flow needs it up front to bake into the App manifest). Shared
7
+ * by the Platform's webhook-URL builder and the orchestrator's manifest
8
+ * pre-flight so the two never drift.
9
+ */
10
+ function githubWebhookPath(orgId) {
11
+ return `/webhook/${orgId}/github`;
12
+ }
13
+ //#endregion
14
+ export { githubWebhookPath };
15
+
16
+ //# sourceMappingURL=webhook-url-format.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/engine",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
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
  "ci",
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.20",
6
- "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.20/00caaa58-0c0e-4385-ac94-cdebc74f5d65",
5
+ "name": "@kici-dev/engine@0.1.21",
6
+ "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.21/e80a4720-81f4-4549-ae95-80ee7a5c127e",
7
7
  "creationInfo": {
8
- "created": "2026-06-19T09:07:10Z",
8
+ "created": "2026-06-23T05:10:06Z",
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.20",
57
+ "versionInfo": "0.1.21",
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.20"
68
+ "referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.21"
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.",