@kici-dev/engine 0.1.22 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/approval/types.d.ts +1 -1
  2. package/dist/audit/access-log-policy.d.ts +4 -1
  3. package/dist/audit/access-log-policy.js +11 -1
  4. package/dist/audit/activity.d.ts +3 -1
  5. package/dist/audit/activity.js +8 -16
  6. package/dist/audit/retention-policy.js +6 -0
  7. package/dist/environment/host-match.d.ts +25 -0
  8. package/dist/environment/host-match.js +67 -0
  9. package/dist/environment/index.d.ts +3 -0
  10. package/dist/environment/index.js +3 -1
  11. package/dist/environment/multi-env.d.ts +30 -0
  12. package/dist/environment/multi-env.js +38 -0
  13. package/dist/environment/scope-resolver.d.ts +15 -4
  14. package/dist/environment/scope-resolver.js +55 -15
  15. package/dist/environment/scope-template.d.ts +18 -0
  16. package/dist/environment/scope-template.js +43 -0
  17. package/dist/environment/types.d.ts +15 -2
  18. package/dist/environment/types.js +18 -1
  19. package/dist/fanout/materialize.d.ts +34 -0
  20. package/dist/fanout/materialize.js +72 -45
  21. package/dist/index.d.ts +5 -1
  22. package/dist/index.js +21 -10
  23. package/dist/inputs/build.d.ts +9 -0
  24. package/dist/inputs/build.js +44 -0
  25. package/dist/inputs/coerce.d.ts +25 -0
  26. package/dist/inputs/coerce.js +51 -0
  27. package/dist/inputs/descriptor.d.ts +53 -0
  28. package/dist/inputs/descriptor.js +42 -0
  29. package/dist/inputs/extract.d.ts +15 -0
  30. package/dist/inputs/extract.js +117 -0
  31. package/dist/inputs/index.d.ts +6 -0
  32. package/dist/inputs/index.js +7 -0
  33. package/dist/inputs/schedule.d.ts +19 -0
  34. package/dist/inputs/schedule.js +33 -0
  35. package/dist/labels/compile.d.ts +9 -0
  36. package/dist/labels/compile.js +10 -1
  37. package/dist/labels.d.ts +29 -0
  38. package/dist/labels.js +32 -1
  39. package/dist/mcp/tool-schemas.d.ts +41 -0
  40. package/dist/mcp/tool-schemas.js +49 -0
  41. package/dist/metrics/catalog-policy.d.ts +7 -0
  42. package/dist/metrics/catalog-policy.js +11 -12
  43. package/dist/metrics/metric-catalog.generated.d.ts +22 -2
  44. package/dist/metrics/metric-catalog.generated.js +34 -2
  45. package/dist/protocol/messages/access-log.d.ts +39 -10
  46. package/dist/protocol/messages/access-log.js +7 -2
  47. package/dist/protocol/messages/actor.d.ts +8 -0
  48. package/dist/protocol/messages/actor.js +17 -3
  49. package/dist/protocol/messages/agent-run-result.d.ts +350 -0
  50. package/dist/protocol/messages/agent-run-result.js +123 -0
  51. package/dist/protocol/messages/auth.d.ts +2 -0
  52. package/dist/protocol/messages/auth.js +10 -1
  53. package/dist/protocol/messages/capabilities.d.ts +2 -0
  54. package/dist/protocol/messages/capabilities.js +15 -2
  55. package/dist/protocol/messages/dashboard-global-workflows.d.ts +8 -0
  56. package/dist/protocol/messages/dashboard.d.ts +1513 -39
  57. package/dist/protocol/messages/dashboard.js +210 -15
  58. package/dist/protocol/messages/execution-status.d.ts +52 -1
  59. package/dist/protocol/messages/execution-status.js +115 -54
  60. package/dist/protocol/messages/orchestrator-agent.d.ts +21 -5
  61. package/dist/protocol/messages/orchestrator-agent.js +5 -1
  62. package/dist/protocol/messages/pat-kind.d.ts +16 -0
  63. package/dist/protocol/messages/pat-kind.js +17 -0
  64. package/dist/protocol/messages/peer.d.ts +7 -7
  65. package/dist/protocol/messages/platform-orchestrator.d.ts +424 -8
  66. package/dist/protocol/messages/platform-orchestrator.js +3 -3
  67. package/dist/protocol/messages/run-events.d.ts +5 -1
  68. package/dist/provider/check-run-conclusion.d.ts +1 -1
  69. package/dist/trigger/types.d.ts +75 -7
  70. package/dist/trigger/types.js +19 -2
  71. package/package.json +9 -1
  72. package/sbom.spdx.json +5 -5
@@ -53,6 +53,13 @@ export interface ResolvedHostAgent {
53
53
  arch?: string;
54
54
  /** Which orchestrator owns the live WS (null = not currently connected). */
55
55
  connectedInstanceId?: string | null;
56
+ /**
57
+ * True when this host is a declared-but-un-agented `includeUninitialized`
58
+ * target: it has no live agent, so the dispatcher first brings up a temporary
59
+ * init-runner over SSH before the child's pinned steps can land. False / absent
60
+ * for a live host (runs on its own agent directly).
61
+ */
62
+ needsBringup?: boolean;
56
63
  }
57
64
  /**
58
65
  * One dispatchable unit produced from a lock job. `variantKind` is `matrix` for
@@ -83,6 +90,20 @@ export interface MaterializedJob {
83
90
  agent?: ResolvedHostAgent;
84
91
  /** Which orchestrator owns the pinned agent's live WS (null = not connected). */
85
92
  connectedInstanceId?: string | null;
93
+ /**
94
+ * True for a declared-but-un-agented `includeUninitialized` host child: the
95
+ * dispatcher brings up a temporary init-runner over SSH before its pinned
96
+ * steps land. Mirrors `agent.needsBringup`.
97
+ */
98
+ needsBringup?: boolean;
99
+ /**
100
+ * 0-based position of this child in the deterministically-ordered fan-out
101
+ * (host: by `agentId`; matrix: by variant label). Exposed to the agent as
102
+ * `ctx.fanout.index`. Absent on a non-fan-out (single-child) job.
103
+ */
104
+ fanoutIndex?: number;
105
+ /** Number of children in this fan-out. Exposed as `ctx.fanout.total`. */
106
+ fanoutTotal?: number;
86
107
  }
87
108
  export interface FanoutResult {
88
109
  jobs: MaterializedJob[];
@@ -101,6 +122,17 @@ export declare function matrixEnvelopeFields(mat: MaterializedJob): {
101
122
  name: string;
102
123
  baseJobName: string;
103
124
  matrixValues?: MatrixValues;
125
+ fanoutIndex?: number;
126
+ fanoutTotal?: number;
127
+ };
128
+ /**
129
+ * The fan-out position envelope fields (`fanoutIndex`/`fanoutTotal`) of a
130
+ * materialized child, shared by the matrix + host envelope builders. Both are
131
+ * present together or absent together (a non-fan-out child has neither).
132
+ */
133
+ export declare function fanoutEnvelopeFields(mat: MaterializedJob): {
134
+ fanoutIndex?: number;
135
+ fanoutTotal?: number;
104
136
  };
105
137
  /**
106
138
  * Build materialized children from a resolved dynamic-matrix combination list
@@ -122,6 +154,8 @@ export declare function hostEnvelopeFields(mat: MaterializedJob): {
122
154
  host?: string;
123
155
  agent?: ResolvedHostAgent;
124
156
  connectedInstanceId?: string | null;
157
+ fanoutIndex?: number;
158
+ fanoutTotal?: number;
125
159
  };
126
160
  /**
127
161
  * Build materialized host children from a resolved target-host list (produced by
@@ -48,6 +48,30 @@ var FanoutError = class FanoutError extends Error {
48
48
  }
49
49
  };
50
50
  /**
51
+ * Stamp a deterministic `fanoutIndex`/`fanoutTotal` onto each child of a
52
+ * multi-child fan-out. `fanoutIndex` is the child's rank in the order defined by
53
+ * `keyOf` (host: `agentId`; matrix: variant label), independent of emission
54
+ * order — the orchestrator's wave dispatch keys on `fanoutIndex`, so emission
55
+ * order need not be touched (this preserves the local-executor matrix naming
56
+ * order). A single child gets no position (non-fan-out job; `ctx.fanout` stays
57
+ * undefined). Mutates and returns the same array.
58
+ */
59
+ function assignFanoutPositions(children, keyOf) {
60
+ if (children.length <= 1) return children;
61
+ const total = children.length;
62
+ const rank = /* @__PURE__ */ new Map();
63
+ [...children].sort((a, b) => keyOf(a).localeCompare(keyOf(b))).forEach((child, index) => rank.set(child, index));
64
+ for (const child of children) {
65
+ child.fanoutIndex = rank.get(child);
66
+ child.fanoutTotal = total;
67
+ }
68
+ return children;
69
+ }
70
+ /** Variant label of a child = the text inside the trailing `(...)` of its expanded name. */
71
+ function variantLabelOf(child) {
72
+ return child.expandedName.slice(child.baseName.length + 2, -1);
73
+ }
74
+ /**
51
75
  * The job-config envelope fields that identify a materialized child: the
52
76
  * expanded `name`, the `baseJobName` (what the agent exposes as `ctx.job.name`),
53
77
  * and `matrixValues` (exposed as `ctx.matrix`). Every dispatch site spreads
@@ -59,10 +83,22 @@ function matrixEnvelopeFields(mat) {
59
83
  return {
60
84
  name: mat.expandedName,
61
85
  baseJobName: mat.baseName,
62
- ...mat.variantValues && { matrixValues: mat.variantValues }
86
+ ...mat.variantValues && { matrixValues: mat.variantValues },
87
+ ...fanoutEnvelopeFields(mat)
63
88
  };
64
89
  }
65
90
  /**
91
+ * The fan-out position envelope fields (`fanoutIndex`/`fanoutTotal`) of a
92
+ * materialized child, shared by the matrix + host envelope builders. Both are
93
+ * present together or absent together (a non-fan-out child has neither).
94
+ */
95
+ function fanoutEnvelopeFields(mat) {
96
+ return mat.fanoutTotal !== void 0 ? {
97
+ fanoutIndex: mat.fanoutIndex,
98
+ fanoutTotal: mat.fanoutTotal
99
+ } : {};
100
+ }
101
+ /**
66
102
  * Build materialized children from a resolved dynamic-matrix combination list
67
103
  * (produced by the agent eval flow). Mirrors the static-matrix branch of
68
104
  * {@link materializeFanout} but takes the already-resolved combinations and
@@ -72,21 +108,17 @@ function materializeResolvedMatrix(lockJob, combos) {
72
108
  if (combos.length === 0) throw new FanoutError(lockJob.name, `dynamic matrix for job '${lockJob.name}' resolved to zero combinations`);
73
109
  if (combos.length > 256) throw new FanoutError(lockJob.name, `dynamic matrix for job '${lockJob.name}' resolved to ${combos.length} combinations (max 256)`);
74
110
  const jobs = [];
75
- const names = [];
76
- for (const variantValues of combos) {
77
- const expandedName = formatExpandedJobName(lockJob.name, variantValues);
78
- names.push(expandedName);
79
- jobs.push({
80
- lockJob,
81
- baseName: lockJob.name,
82
- expandedName,
83
- variantKind: "matrix",
84
- variantValues
85
- });
86
- }
111
+ for (const variantValues of combos) jobs.push({
112
+ lockJob,
113
+ baseName: lockJob.name,
114
+ expandedName: formatExpandedJobName(lockJob.name, variantValues),
115
+ variantKind: "matrix",
116
+ variantValues
117
+ });
118
+ assignFanoutPositions(jobs, variantLabelOf);
87
119
  return {
88
120
  jobs,
89
- expansionMap: new Map([[lockJob.name, names]])
121
+ expansionMap: new Map([[lockJob.name, jobs.map((j) => j.expandedName)]])
90
122
  };
91
123
  }
92
124
  /**
@@ -102,7 +134,8 @@ function hostEnvelopeFields(mat) {
102
134
  ...mat.pinnedAgentId && { pinnedAgentId: mat.pinnedAgentId },
103
135
  ...mat.host && { host: mat.host },
104
136
  ...mat.agent && { agent: mat.agent },
105
- ...mat.connectedInstanceId !== void 0 && { connectedInstanceId: mat.connectedInstanceId }
137
+ ...mat.connectedInstanceId !== void 0 && { connectedInstanceId: mat.connectedInstanceId },
138
+ ...fanoutEnvelopeFields(mat)
106
139
  };
107
140
  }
108
141
  /**
@@ -116,24 +149,21 @@ function materializeResolvedHosts(lockJob, agents, maxHosts) {
116
149
  if (agents.length === 0) throw new FanoutError(lockJob.name, `runsOnAll for job '${lockJob.name}' matched zero matching hosts`);
117
150
  if (agents.length > maxHosts) throw new FanoutError(lockJob.name, `runsOnAll for job '${lockJob.name}' matched ${agents.length} hosts (max ${maxHosts})`);
118
151
  const jobs = [];
119
- const names = [];
120
- for (const agent of agents) {
121
- const expandedName = `${lockJob.name} (${agent.host})`;
122
- names.push(expandedName);
123
- jobs.push({
124
- lockJob,
125
- baseName: lockJob.name,
126
- expandedName,
127
- variantKind: "host",
128
- pinnedAgentId: agent.agentId,
129
- host: agent.host,
130
- agent,
131
- connectedInstanceId: agent.connectedInstanceId ?? null
132
- });
133
- }
152
+ for (const agent of agents) jobs.push({
153
+ lockJob,
154
+ baseName: lockJob.name,
155
+ expandedName: `${lockJob.name} (${agent.host})`,
156
+ variantKind: "host",
157
+ pinnedAgentId: agent.agentId,
158
+ host: agent.host,
159
+ agent,
160
+ connectedInstanceId: agent.connectedInstanceId ?? null,
161
+ ...agent.needsBringup && { needsBringup: true }
162
+ });
163
+ assignFanoutPositions(jobs, (child) => child.pinnedAgentId ?? "");
134
164
  return {
135
165
  jobs,
136
- expansionMap: new Map([[lockJob.name, names]])
166
+ expansionMap: new Map([[lockJob.name, jobs.map((j) => j.expandedName)]])
137
167
  };
138
168
  }
139
169
  /**
@@ -170,19 +200,16 @@ function materializeFanout(staticJobs) {
170
200
  const combos = applyIncludeExclude(expandMatrix(values), lockJob.include, lockJob.exclude);
171
201
  if (combos.length === 0) throw new FanoutError(lockJob.name, `matrix for job '${lockJob.name}' expands to zero combinations`);
172
202
  if (combos.length > 256) throw new FanoutError(lockJob.name, `matrix for job '${lockJob.name}' expands to ${combos.length} combinations (max 256)`);
173
- const names = [];
174
- for (const variantValues of combos) {
175
- const expandedName = formatExpandedJobName(lockJob.name, variantValues);
176
- names.push(expandedName);
177
- jobs.push({
178
- lockJob,
179
- baseName: lockJob.name,
180
- expandedName,
181
- variantKind: "matrix",
182
- variantValues
183
- });
184
- }
185
- expansionMap.set(lockJob.name, names);
203
+ const children = combos.map((variantValues) => ({
204
+ lockJob,
205
+ baseName: lockJob.name,
206
+ expandedName: formatExpandedJobName(lockJob.name, variantValues),
207
+ variantKind: "matrix",
208
+ variantValues
209
+ }));
210
+ assignFanoutPositions(children, variantLabelOf);
211
+ jobs.push(...children);
212
+ expansionMap.set(lockJob.name, children.map((j) => j.expandedName));
186
213
  }
187
214
  return {
188
215
  jobs,
@@ -190,6 +217,6 @@ function materializeFanout(staticJobs) {
190
217
  };
191
218
  }
192
219
  //#endregion
193
- export { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields };
220
+ export { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields };
194
221
 
195
222
  //# sourceMappingURL=materialize.js.map
package/dist/index.d.ts CHANGED
@@ -11,10 +11,13 @@
11
11
  export * from './protocol/version.js';
12
12
  export * from './protocol/messages/common.js';
13
13
  export * from './protocol/messages/actor.js';
14
+ export * from './protocol/messages/pat-kind.js';
15
+ export * from './mcp/tool-schemas.js';
14
16
  export * from './protocol/messages/auth.js';
15
17
  export * from './protocol/messages/capabilities.js';
16
18
  export { webhookRelaySchema, webhookRelayStartSchema, webhookRelayChunkSchema, webhookAckSchema, WebhookRelayResult, WEBHOOK_RELAY_MAX_BODY_BYTES, WEBHOOK_RELAY_CHUNK_SIZE, executionEventSchema, logChunkSchema, peerDiscoverSchema, peerUpdateSchema, cacheStatsSchema, orchMetricsSchema, platformToOrchestratorMessageSchema, orchestratorToPlatformMessageSchema, type WebhookRelay, type WebhookRelayStart, type WebhookRelayChunk, type WebhookAck, type LogChunk, type PeerDiscover, type PeerUpdate, type CacheStats, type OrchMetrics, trustPolicyUpdateSchema, type TrustPolicyUpdate, staleCheckrunCleanupSchema, type StaleCheckrunCleanup, type PlatformToOrchestratorMessage, type OrchestratorToPlatformMessage, } from './protocol/messages/platform-orchestrator.js';
17
19
  export * from './protocol/messages/execution-status.js';
20
+ export * from './protocol/messages/agent-run-result.js';
18
21
  export * from './protocol/messages/deployment-identity.js';
19
22
  export * from './protocol/messages/scaler-event.js';
20
23
  export * from './protocol/messages/event-log.js';
@@ -36,6 +39,7 @@ export * from './trigger/types.js';
36
39
  export * from './trigger/trigger-event-type.js';
37
40
  export * from './trigger/decision-trace.js';
38
41
  export * from './trigger/matcher.js';
42
+ export * from './inputs/index.js';
39
43
  export * from './state-machine/index.js';
40
44
  export * from './provider/index.js';
41
45
  export { githubWebhookPath } from './webhook/webhook-url-format.js';
@@ -46,7 +50,7 @@ export type { RateLimiterConfig, RateLimitResult } from './ws/rate-limiter.js';
46
50
  export * from './env/environment-allowlist.js';
47
51
  export * from './secrets/index.js';
48
52
  export * from './environment/index.js';
49
- export { deriveOsArchLabels, hostLabel, parseHostLabel, HOST_LABEL_PREFIX, agentTypeLabel, scalerLabel, mergeAutoLabels, normalizeRunsOn, KNOWN_ROLES, resolveRoleLabels, validateNoReservedLabels, scalerAgentLabels, isSelfReportedLabel, SELF_REPORTED_LABEL_PREFIXES, } from './labels.js';
53
+ export { deriveOsArchLabels, hostLabel, parseHostLabel, HOST_LABEL_PREFIX, agentTypeLabel, scalerLabel, mergeAutoLabels, normalizeRunsOn, KNOWN_ROLES, resolveRoleLabels, validateNoReservedLabels, scalerAgentLabels, isSelfReportedLabel, SELF_REPORTED_LABEL_PREFIXES, CAPABILITY_LABEL_PREFIX, capabilityLabel, SSH_TRANSPORT_CAPABILITY, INIT_LABEL, PRIVILEGED_ROOT_LABEL, } from './labels.js';
50
54
  export type { NormalizedRunsOn } from './labels.js';
51
55
  export type { AgentRole } from './labels.js';
52
56
  export { LabelMatcher, matcherMatches, matcherSatisfiedBy, partitionMatchers, compileRegexMatcher, HostTargetValue, HostTargetSelector, hostSatisfiesTarget, } from './labels-match.js';
package/dist/index.js CHANGED
@@ -3,20 +3,24 @@ import { CheckMode, CheckStepOutcome } from "./check-mode.js";
3
3
  import { MIN_PROTOCOL_VERSION, PROTOCOL_VERSION } from "./protocol/version.js";
4
4
  import { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
5
5
  import { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
6
- import { ORCH_CAPABILITIES, OrchRole, hasOrchCapability, orchCapabilitiesSchema } from "./protocol/messages/capabilities.js";
7
- import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
8
- import { CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
9
- import { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema } from "./protocol/messages/deployment-identity.js";
10
- import { SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
6
+ import { PatKind } from "./protocol/messages/pat-kind.js";
7
+ import { cancelRunToolSchema, getRunToolSchema, getStepLogsToolSchema, listRunsToolSchema, listWorkflowsToolSchema, rerunRunToolSchema, triggerRunToolSchema } from "./mcp/tool-schemas.js";
8
+ import { CacheOutcome, CacheRunEventType, CacheStepType, ENVIRONMENTS_MAX, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, MAX_JOBS_PER_RUN, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
9
+ import { TrustTierSchema } from "./environment/types.js";
10
+ import { AgentFailureCategory, agentJobResultSchema, agentRunResultSchema, agentStepLogsSchema, agentStepResultSchema, untrusted, wrapUntrusted } from "./protocol/messages/agent-run-result.js";
11
11
  import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType, accessLogFilterSchema, accessLogItemSchema, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./protocol/messages/access-log.js";
12
12
  import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
13
13
  import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
14
+ import { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema } from "./protocol/messages/deployment-identity.js";
15
+ import { SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
14
16
  import { ScalerBackendType } from "./scaler/scaler-backend-type.js";
15
17
  import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema } from "./approval/types.js";
16
- import { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, resolveWhenToRunOn } from "./trigger/types.js";
18
+ import { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveWhenToRunOn } from "./trigger/types.js";
17
19
  import { HostTargetSelector, HostTargetValue, LabelMatcher, compileRegexMatcher, hostSatisfiesTarget, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
18
20
  import { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments } from "./inventory.js";
19
- import { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema } from "./protocol/messages/dashboard.js";
21
+ import { DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema } from "./protocol/messages/dashboard.js";
22
+ import { ORCH_CAPABILITIES, OrchRole, hasOrchCapability, orchCapabilitiesSchema } from "./protocol/messages/capabilities.js";
23
+ import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
20
24
  import { WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WebhookRelayResult, cacheStatsSchema, executionEventSchema, logChunkSchema, orchMetricsSchema, orchestratorToPlatformMessageSchema, peerDiscoverSchema, peerUpdateSchema, platformToOrchestratorMessageSchema, staleCheckrunCleanupSchema, trustPolicyUpdateSchema, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema } from "./protocol/messages/platform-orchestrator.js";
21
25
  import { ScalerEventType } from "./protocol/messages/scaler-event.js";
22
26
  import { AccessLogPolicyKind, POLICY_BY_ACTION, fnv1a32, shouldRecordAccess, shouldRecordSecretResolve } from "./audit/access-log-policy.js";
@@ -31,6 +35,12 @@ import { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSch
31
35
  import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
32
36
  import { createTraceEntry, createWorkflowDecision } from "./trigger/decision-trace.js";
33
37
  import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchWorkflowTriggers } from "./trigger/matcher.js";
38
+ import { DispatchInputType, InputDescriptor, InputsDescriptorMapSchema } from "./inputs/descriptor.js";
39
+ import { UnsupportedDispatchInputError, extractInputDescriptor, extractInputsDescriptorMap } from "./inputs/extract.js";
40
+ import { buildZodFromDescriptor, buildZodObjectFromMap } from "./inputs/build.js";
41
+ import { DispatchInputError, coerceDispatchInputs, parseInputPairs } from "./inputs/coerce.js";
42
+ import { assertScheduleInputsSatisfiable, isInputSatisfiableFromDefaults, resolveScheduleInputs } from "./inputs/schedule.js";
43
+ import "./inputs/index.js";
34
44
  import { isTerminal, transition } from "./state-machine/machine.js";
35
45
  import "./state-machine/index.js";
36
46
  import { LockFileParseError } from "./provider/lock-file-parse-error.js";
@@ -42,13 +52,14 @@ import { WsRateLimiter } from "./ws/rate-limiter.js";
42
52
  import { AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, KICI_AGENT_ENV_PREFIX, SANDBOX_DEFAULT_VARS } from "./env/environment-allowlist.js";
43
53
  import "./secrets/index.js";
44
54
  import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./environment/scope-resolver.js";
55
+ import { EnvGateRejectReason, mergeOrderedMaps } from "./environment/multi-env.js";
45
56
  import "./environment/index.js";
46
- import { HOST_LABEL_PREFIX, KNOWN_ROLES, SELF_REPORTED_LABEL_PREFIXES, agentTypeLabel, deriveOsArchLabels, hostLabel, isSelfReportedLabel, mergeAutoLabels, normalizeRunsOn, parseHostLabel, resolveRoleLabels, scalerAgentLabels, scalerLabel, validateNoReservedLabels } from "./labels.js";
57
+ import { CAPABILITY_LABEL_PREFIX, HOST_LABEL_PREFIX, INIT_LABEL, KNOWN_ROLES, PRIVILEGED_ROOT_LABEL, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, agentTypeLabel, capabilityLabel, deriveOsArchLabels, hostLabel, isSelfReportedLabel, mergeAutoLabels, normalizeRunsOn, parseHostLabel, resolveRoleLabels, scalerAgentLabels, scalerLabel, validateNoReservedLabels } from "./labels.js";
47
58
  import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, validateResourceRequest } from "./scaler/resource-types.js";
48
59
  import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
49
60
  import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
50
61
  import "./bundler/index.js";
51
62
  import { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension } from "./matrix/expand.js";
52
63
  import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
53
- import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
54
- 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, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutCause, FanoutError, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HostInventoryEntry, HostPropertyValue, HostTargetSelector, HostTargetValue, InitFailureCategory, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LabelMatcher, LockFileParseError, MAX_FANOUT_JOBS, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, 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, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, 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, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, 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, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalPayloadSchema, 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 };
64
+ import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
65
+ export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, AgentFailureCategory, ApprovalDecision, CAPABILITY_LABEL_PREFIX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, ENVIRONMENTS_MAX, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EnvGateRejectReason, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutCause, FanoutError, FleetHostDisposition, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HostInventoryEntry, HostPropertyValue, HostTargetSelector, HostTargetValue, INIT_LABEL, InitFailureCategory, InputDescriptor, InputsDescriptorMapSchema, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LabelMatcher, LockFileParseError, MAX_FANOUT_JOBS, MAX_JOBS_PER_RUN, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, ORCH_CAPABILITIES, OnUnreachableMode, OrchRole, POLICY_BY_ACTION, PRIVILEGED_ROOT_LABEL, PROTOCOL_VERSION, PatKind, PayloadOmittedReason, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RegisterableTriggerType, RunsOnPick, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, StepApprovalOutcome, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TestRelayType, TimeoutReason, TriggerSource, TrustTierSchema, UnsupportedDispatchInputError, 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, agentJobResultSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentRunResultSchema, agentStatusSchema, agentStepLogsSchema, agentStepResultSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, applyIncludeExclude, approvalRequirementSchema, approverClauseSchema, assertScheduleInputsSatisfiable, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, 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, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, cancelRunToolSchema, capabilityLabel, coerceDispatchInputs, coerceHostPropertyValue, compileRegexMatcher, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingEntrySchema, 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, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isInputSatisfiableFromDefaults, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, listRunsToolSchema, listWorkflowsToolSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, mergeOrderedMaps, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseHostPropertyAssignments, parseInputPairs, 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, rerunRunToolSchema, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForEnvironment, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, triggerRunToolSchema, trustPolicyResponseSchema, trustPolicyUpdateSchema, untrusted, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema, wrapUntrusted };
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import type { InputDescriptorT, InputsDescriptorMap } from './descriptor.js';
3
+ /** Rebuild a real coercing Zod schema from a descriptor. */
4
+ export declare function buildZodFromDescriptor(d: InputDescriptorT): z.ZodType;
5
+ /** Rebuild a strict (unknown-key-rejecting) `z.object` from a descriptor map. */
6
+ export declare function buildZodObjectFromMap(map: InputsDescriptorMap): z.ZodObject<{
7
+ [x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
8
+ }, z.core.$strict>;
9
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1,44 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ import { z } from "zod";
3
+ //#region src/inputs/build.ts
4
+ /** Build the base (unwrapped) coercing schema for a descriptor. */
5
+ function base(d) {
6
+ switch (d.type) {
7
+ case "string": {
8
+ let s = z.string();
9
+ if (d.min !== void 0) s = s.min(d.min);
10
+ if (d.max !== void 0) s = s.max(d.max);
11
+ if (d.pattern !== void 0) s = s.regex(new RegExp(d.pattern));
12
+ return s;
13
+ }
14
+ case "number":
15
+ case "integer": {
16
+ let n = z.coerce.number();
17
+ if (d.type === "integer") n = n.int();
18
+ if (d.min !== void 0) n = n.min(d.min);
19
+ if (d.max !== void 0) n = n.max(d.max);
20
+ return n;
21
+ }
22
+ case "boolean": return z.stringbool();
23
+ case "enum": return z.enum(d.values ?? []);
24
+ case "literal": return z.literal(d.literal);
25
+ }
26
+ }
27
+ /** Rebuild a real coercing Zod schema from a descriptor. */
28
+ function buildZodFromDescriptor(d) {
29
+ let schema = base(d);
30
+ if (d.nullable) schema = schema.nullable();
31
+ if (d.default !== void 0) schema = schema.default(d.default);
32
+ else if (d.optional) schema = schema.optional();
33
+ return schema;
34
+ }
35
+ /** Rebuild a strict (unknown-key-rejecting) `z.object` from a descriptor map. */
36
+ function buildZodObjectFromMap(map) {
37
+ const shape = {};
38
+ for (const [k, d] of Object.entries(map)) shape[k] = buildZodFromDescriptor(d);
39
+ return z.object(shape).strict();
40
+ }
41
+ //#endregion
42
+ export { buildZodFromDescriptor, buildZodObjectFromMap };
43
+
44
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1,25 @@
1
+ import type { InputsDescriptorMap } from './descriptor.js';
2
+ /** A single normalized validation issue for one dispatch input key. */
3
+ export interface DispatchInputIssue {
4
+ key: string;
5
+ code: string;
6
+ message: string;
7
+ }
8
+ /** Structured rejection for invalid dispatch inputs (CLI + dashboard rendering). */
9
+ export declare class DispatchInputError extends Error {
10
+ readonly issues: DispatchInputIssue[];
11
+ constructor(issues: DispatchInputIssue[]);
12
+ }
13
+ /** Split `key=value` pairs; throws `DispatchInputError` on a missing `=`. */
14
+ export declare function parseInputPairs(pairs: string[]): Record<string, string>;
15
+ /**
16
+ * Coerce + validate raw operator pairs against the descriptor map, applying
17
+ * defaults. Strict: unknown keys are errors. Returns typed values or a
18
+ * structured `DispatchInputError`.
19
+ */
20
+ export declare function coerceDispatchInputs(raw: Record<string, string>, map: InputsDescriptorMap): {
21
+ values: Record<string, unknown>;
22
+ } | {
23
+ error: DispatchInputError;
24
+ };
25
+ //# sourceMappingURL=coerce.d.ts.map
@@ -0,0 +1,51 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ import { buildZodObjectFromMap } from "./build.js";
3
+ //#region src/inputs/coerce.ts
4
+ /** Structured rejection for invalid dispatch inputs (CLI + dashboard rendering). */
5
+ var DispatchInputError = class extends Error {
6
+ issues;
7
+ constructor(issues) {
8
+ super(`Invalid dispatch inputs: ${issues.map((i) => `${i.key}: ${i.message}`).join("; ")}`);
9
+ this.issues = issues;
10
+ this.name = "DispatchInputError";
11
+ }
12
+ };
13
+ /** Split `key=value` pairs; throws `DispatchInputError` on a missing `=`. */
14
+ function parseInputPairs(pairs) {
15
+ const out = {};
16
+ for (const p of pairs) {
17
+ const eq = p.indexOf("=");
18
+ if (eq <= 0) throw new DispatchInputError([{
19
+ key: p,
20
+ code: "malformed",
21
+ message: `expected key=value, got "${p}"`
22
+ }]);
23
+ out[p.slice(0, eq)] = p.slice(eq + 1);
24
+ }
25
+ return out;
26
+ }
27
+ /**
28
+ * Coerce + validate raw operator pairs against the descriptor map, applying
29
+ * defaults. Strict: unknown keys are errors. Returns typed values or a
30
+ * structured `DispatchInputError`.
31
+ */
32
+ function coerceDispatchInputs(raw, map) {
33
+ const parsed = buildZodObjectFromMap(map).safeParse(raw);
34
+ if (parsed.success) return { values: parsed.data };
35
+ return { error: new DispatchInputError(parsed.error.issues.flatMap((i) => {
36
+ if (i.code === "unrecognized_keys" && Array.isArray(i.keys)) return i.keys.map((k) => ({
37
+ key: k,
38
+ code: i.code,
39
+ message: `unknown input "${k}"`
40
+ }));
41
+ return [{
42
+ key: String(i.path[0] ?? "(root)"),
43
+ code: i.code,
44
+ message: i.message
45
+ }];
46
+ })) };
47
+ }
48
+ //#endregion
49
+ export { DispatchInputError, coerceDispatchInputs, parseInputPairs };
50
+
51
+ //# sourceMappingURL=coerce.js.map
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ /** The closed set of input value types persisted in the lockfile. */
3
+ export declare const DispatchInputType: z.ZodEnum<{
4
+ string: "string";
5
+ number: "number";
6
+ boolean: "boolean";
7
+ enum: "enum";
8
+ literal: "literal";
9
+ integer: "integer";
10
+ }>;
11
+ export type DispatchInputTypeT = z.infer<typeof DispatchInputType>;
12
+ /** JSON-safe, lossless descriptor of one declared dispatch input. */
13
+ export declare const InputDescriptor: z.ZodObject<{
14
+ type: z.ZodEnum<{
15
+ string: "string";
16
+ number: "number";
17
+ boolean: "boolean";
18
+ enum: "enum";
19
+ literal: "literal";
20
+ integer: "integer";
21
+ }>;
22
+ optional: z.ZodDefault<z.ZodBoolean>;
23
+ nullable: z.ZodDefault<z.ZodBoolean>;
24
+ default: z.ZodOptional<z.ZodUnknown>;
25
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
26
+ literal: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
27
+ min: z.ZodOptional<z.ZodNumber>;
28
+ max: z.ZodOptional<z.ZodNumber>;
29
+ pattern: z.ZodOptional<z.ZodString>;
30
+ description: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export type InputDescriptorT = z.infer<typeof InputDescriptor>;
33
+ export declare const InputsDescriptorMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
34
+ type: z.ZodEnum<{
35
+ string: "string";
36
+ number: "number";
37
+ boolean: "boolean";
38
+ enum: "enum";
39
+ literal: "literal";
40
+ integer: "integer";
41
+ }>;
42
+ optional: z.ZodDefault<z.ZodBoolean>;
43
+ nullable: z.ZodDefault<z.ZodBoolean>;
44
+ default: z.ZodOptional<z.ZodUnknown>;
45
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
46
+ literal: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
47
+ min: z.ZodOptional<z.ZodNumber>;
48
+ max: z.ZodOptional<z.ZodNumber>;
49
+ pattern: z.ZodOptional<z.ZodString>;
50
+ description: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>>;
52
+ export type InputsDescriptorMap = z.infer<typeof InputsDescriptorMapSchema>;
53
+ //# sourceMappingURL=descriptor.d.ts.map
@@ -0,0 +1,42 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ import { z } from "zod";
3
+ //#region src/inputs/descriptor.ts
4
+ /** The closed set of input value types persisted in the lockfile. */
5
+ const DispatchInputType = z.enum([
6
+ "string",
7
+ "number",
8
+ "integer",
9
+ "boolean",
10
+ "enum",
11
+ "literal"
12
+ ]);
13
+ /** JSON-safe, lossless descriptor of one declared dispatch input. */
14
+ const InputDescriptor = z.object({
15
+ type: DispatchInputType,
16
+ optional: z.boolean().default(false),
17
+ nullable: z.boolean().default(false),
18
+ /** Present iff the author set `.default()`. */
19
+ default: z.unknown().optional(),
20
+ /** Enum members (type === 'enum'). */
21
+ values: z.array(z.union([
22
+ z.string(),
23
+ z.number(),
24
+ z.boolean()
25
+ ])).optional(),
26
+ /** Literal value (type === 'literal'). */
27
+ literal: z.union([
28
+ z.string(),
29
+ z.number(),
30
+ z.boolean()
31
+ ]).optional(),
32
+ min: z.number().optional(),
33
+ max: z.number().optional(),
34
+ /** Regex source (type === 'string'). */
35
+ pattern: z.string().optional(),
36
+ description: z.string().optional()
37
+ });
38
+ const InputsDescriptorMapSchema = z.record(z.string(), InputDescriptor);
39
+ //#endregion
40
+ export { DispatchInputType, InputDescriptor, InputsDescriptorMapSchema };
41
+
42
+ //# sourceMappingURL=descriptor.js.map