@kici-dev/compiler 0.1.22 → 0.1.23

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 (39) hide show
  1. package/dist/cli.js +20 -6
  2. package/dist/commands/compile.d.ts +6 -0
  3. package/dist/commands/compile.js +6 -3
  4. package/dist/commands/docs.d.ts +8 -8
  5. package/dist/commands/docs.js +35 -16
  6. package/dist/commands/org.js +2 -2
  7. package/dist/commands/run.d.ts +16 -1
  8. package/dist/commands/run.js +86 -14
  9. package/dist/commands/test.d.ts +4 -0
  10. package/dist/commands/types.d.ts +2 -0
  11. package/dist/commands/types.js +1 -1
  12. package/dist/fixtures/describe-event.d.ts +6 -0
  13. package/dist/fixtures/describe-event.js +18 -0
  14. package/dist/fixtures/picker.d.ts +19 -0
  15. package/dist/fixtures/picker.js +64 -0
  16. package/dist/llm-context/llms-architecture.txt +1440 -0
  17. package/dist/llm-context/llms-cli.txt +2386 -0
  18. package/dist/llm-context/llms-features.txt +2389 -0
  19. package/dist/llm-context/llms-full.txt +976 -317
  20. package/dist/llm-context/llms-getting-started.txt +519 -0
  21. package/dist/llm-context/llms-patterns.txt +1324 -0
  22. package/dist/llm-context/llms-providers.txt +805 -0
  23. package/dist/llm-context/llms-sdk.txt +3725 -0
  24. package/dist/llm-context/llms.txt +13 -0
  25. package/dist/local-executor/index.js +40 -3
  26. package/dist/local-executor/job-runner.d.ts +2 -0
  27. package/dist/local-executor/job-runner.js +36 -4
  28. package/dist/local-executor/types.d.ts +2 -0
  29. package/dist/lockfile/generator.js +13 -4
  30. package/dist/remote/platform-client.d.ts +6 -0
  31. package/dist/remote/uploader.js +1 -0
  32. package/dist/templates/package-json.js +1 -1
  33. package/dist/test-runner/rule-evaluator.d.ts +1 -1
  34. package/dist/test-runner/rule-evaluator.js +2 -1
  35. package/dist/test-runner/step-context.d.ts +1 -1
  36. package/dist/test-runner/step-context.js +7 -2
  37. package/dist/types.d.ts +6 -2
  38. package/package.json +4 -4
  39. package/sbom.spdx.json +35 -35
@@ -4,6 +4,18 @@
4
4
 
5
5
  The full markdown bundle of every page indexed here is available at https://docs.kici.dev/llms-full.txt.
6
6
 
7
+ ## Bundles
8
+
9
+ Each bundle below is a self-contained markdown file for one authoring task. Fetch only the one your task needs instead of the full bundle:
10
+
11
+ - [getting-started](https://docs.kici.dev/llms-getting-started.txt) (25 KB) — Install the SDK, write your first workflow, compile and test locally
12
+ - [patterns](https://docs.kici.dev/llms-patterns.txt) (49 KB) — Copy-paste workflow recipes: triggers, conditionals, matrix, scheduling, integrations
13
+ - [sdk](https://docs.kici.dev/llms-sdk.txt) (185 KB) — Authoring API: workflow/job/step factories, triggers, rules, matrix, runtime, caching
14
+ - [cli](https://docs.kici.dev/llms-cli.txt) (117 KB) — Running the CLI: compile, test, run local/remote, auth, hooks, lock-file drift
15
+ - [features](https://docs.kici.dev/llms-features.txt) (116 KB) — Workflow features: concurrency, environments, secrets, approvals, provenance, events
16
+ - [providers](https://docs.kici.dev/llms-providers.txt) (36 KB) — Connecting sources: GitHub App, universal-git (Forgejo/Gitea/GitLab), local file://
17
+ - [architecture](https://docs.kici.dev/llms-architecture.txt) (88 KB) — How the runtime works: three-tier relay model, data flows, configuration
18
+
7
19
  ## Getting started
8
20
 
9
21
  - [User guide](https://docs.kici.dev/user/): Writing and testing CI/CD workflows in TypeScript
@@ -66,5 +78,6 @@ The full markdown bundle of every page indexed here is available at https://docs
66
78
 
67
79
  ## Architecture overview
68
80
 
81
+ - [Configuration architecture](https://docs.kici.dev/architecture/configuration/): Config resolution chain, DB schema, encryption, hot-reload, cluster sync
69
82
  - [Data flows](https://docs.kici.dev/architecture/data-flows/): End-to-end data flows through the KiCI three-tier architecture
70
83
  - [Architecture overview](https://docs.kici.dev/architecture/overview/): Three-tier relay model, package structure, and component responsibilities
@@ -15,7 +15,7 @@ import path from "node:path";
15
15
  import pc from "picocolors";
16
16
  import { writeFile } from "node:fs/promises";
17
17
  import { logger } from "@kici-dev/core";
18
- import { CheckMode, CheckStepOutcome, matchAllWorkflows } from "@kici-dev/engine";
18
+ import { CheckMode, CheckStepOutcome, coerceDispatchInputs, matchAllWorkflows, parseInputPairs } from "@kici-dev/engine";
19
19
  import os from "node:os";
20
20
  //#region src/local-executor/index.ts
21
21
  /**
@@ -136,8 +136,37 @@ async function runOneMatchedWorkflow(workflow, ctx) {
136
136
  * The actual DAG-execution body for one workflow. Split out so
137
137
  * {@link runOneMatchedWorkflow} can wrap it in a lock acquire/release.
138
138
  */
139
+ /**
140
+ * Resolve the dispatch-input descriptor declared on a workflow's `dispatch()`
141
+ * trigger(s) from the in-memory trigger objects, merged across triggers.
142
+ * Returns undefined when none declared.
143
+ */
144
+ function dispatchInputsDescriptorForWorkflow(workflow) {
145
+ const merged = {};
146
+ let found = false;
147
+ for (const trigger of transformTriggers(workflow.on)) if (trigger._type === "dispatch" && trigger.inputs) {
148
+ Object.assign(merged, trigger.inputs);
149
+ found = true;
150
+ }
151
+ return found ? merged : void 0;
152
+ }
153
+ /**
154
+ * Coerce + default the operator's `--input` pairs against the workflow's
155
+ * dispatch descriptor for a local run. The local executor is authoritative for
156
+ * `run local` (no orchestrator), so defaults are applied here exactly once.
157
+ * Returns the resolved values, or throws when input is invalid.
158
+ */
159
+ function resolveLocalDispatchInputs(workflow, options) {
160
+ const descriptor = dispatchInputsDescriptorForWorkflow(workflow);
161
+ const raw = parseInputPairs(options.inputs ?? []);
162
+ if (!descriptor) return raw;
163
+ const r = coerceDispatchInputs(raw, descriptor);
164
+ if ("error" in r) throw r.error;
165
+ return r.values;
166
+ }
139
167
  async function runWorkflowBody(workflow, ctx, options, secrets, kiciDir, concurrency, failFast) {
140
168
  const { event } = ctx;
169
+ const dispatchInputs = resolveLocalDispatchInputs(workflow, options);
141
170
  const resolvedJobs = await resolveJobs(workflow, event);
142
171
  let dagNodes = resolvedJobs.map((r) => ({
143
172
  name: r.expandedName,
@@ -170,7 +199,8 @@ async function runWorkflowBody(workflow, ctx, options, secrets, kiciDir, concurr
170
199
  execDir: ctx.execDir,
171
200
  jobOutputsMap,
172
201
  signal,
173
- checkMode: options.checkMode
202
+ checkMode: options.checkMode,
203
+ dispatchInputs
174
204
  });
175
205
  },
176
206
  isSuccess: (result) => result.status === "success" || result.status === "skipped"
@@ -223,7 +253,8 @@ async function executeLocal(options) {
223
253
  if (!await compileCommand({
224
254
  kiciDir,
225
255
  check: false,
226
- verbose: options.debug ?? false
256
+ verbose: options.debug ?? false,
257
+ quiet: Boolean(options.json || options.quiet)
227
258
  })) {
228
259
  process.exitCode = 2;
229
260
  return false;
@@ -268,6 +299,12 @@ async function executeLocal(options) {
268
299
  return true;
269
300
  }
270
301
  }
302
+ for (const workflow of matchedWorkflows) try {
303
+ resolveLocalDispatchInputs(workflow, options);
304
+ } catch (err) {
305
+ logger.error(pc.red(`Error: ${err instanceof Error ? err.message : String(err)}`));
306
+ process.exit(2);
307
+ }
271
308
  const isQuiet = Boolean(options.quiet || options.json);
272
309
  const repoRoot = path.dirname(kiciDir);
273
310
  let materialized = null;
@@ -27,6 +27,8 @@ export interface JobExecutionContext {
27
27
  signal: AbortSignal;
28
28
  /** Run mode for idempotent steps. Defaults to `apply` when unset. */
29
29
  checkMode?: CheckMode;
30
+ /** Resolved (coerced + defaulted) workflow-dispatch inputs for `ctx.dispatchInputs`. */
31
+ dispatchInputs?: Readonly<Record<string, string | number | boolean | null>>;
30
32
  }
31
33
  /**
32
34
  * Resolve all jobs in a workflow, expanding matrix jobs and evaluating dynamic jobs.
@@ -8,6 +8,7 @@ import { toEventPayload } from "./to-event-payload.js";
8
8
  import { pathToFileURL } from "node:url";
9
9
  import path from "node:path";
10
10
  import { applyIncludeExclude, expandMatrix, isDynamicJobFn, setJobOutputsMap, setStepOutputsMap, setStepRefMap } from "@kici-dev/sdk";
11
+ import { computeBackoffDelay } from "@kici-dev/core";
11
12
  import { CheckMode, CheckStepOutcome, formatMatrixSuffix } from "@kici-dev/engine";
12
13
  import { runIdempotentStep } from "@kici-dev/core/idempotency";
13
14
  //#region src/local-executor/job-runner.ts
@@ -91,6 +92,33 @@ async function runLocalStepWithCheckMode(step, ctx, checkMode) {
91
92
  };
92
93
  }
93
94
  /**
95
+ * Run a local step through its retry policy. An attempt is one full
96
+ * `runLocalStepWithCheckMode` call (which throws on failure). A thrown attempt
97
+ * is retried while attempts remain AND `retryIf(err)` is true; backoff sleeps
98
+ * between attempts. Mirrors the agent step loop so `kici run local` retries
99
+ * identically to a remote run.
100
+ */
101
+ async function runLocalStepWithRetry(step, ctx, checkMode, log) {
102
+ const retry = step.retry;
103
+ const max = retry?.maxAttempts ?? 1;
104
+ let lastErr;
105
+ for (let n = 1; n <= max; n++) try {
106
+ return await runLocalStepWithCheckMode(step, ctx, checkMode);
107
+ } catch (err) {
108
+ lastErr = err;
109
+ if (!(n < max && (retry?.retryIf?.(err) ?? true))) break;
110
+ const delay = computeBackoffDelay(n, {
111
+ maxAttempts: max,
112
+ delayMs: retry.delayMs,
113
+ backoff: retry.backoff,
114
+ maxDelayMs: retry.maxDelayMs
115
+ });
116
+ log(`Step '${step.name}' attempt ${n}/${max} failed: ${err instanceof Error ? err.message : String(err)}; retrying in ${delay}ms`);
117
+ await new Promise((r) => setTimeout(r, delay));
118
+ }
119
+ throw lastErr;
120
+ }
121
+ /**
94
122
  * Maintain the base-name `{ byMatrix, merged }` envelope as each matrix child
95
123
  * completes. `merged` is rebuilt last-write-wins in suffix order so the result
96
124
  * is deterministic regardless of child completion order — matching the remote
@@ -146,7 +174,11 @@ async function resolveJobs(workflow, event) {
146
174
  get: () => Promise.resolve(null)
147
175
  },
148
176
  oidc: { token: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.oidc.token() is not available during local execution")) },
149
- host: { requestReboot: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.host.requestReboot() is not available during local execution")) }
177
+ host: { requestReboot: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.host.requestReboot() is not available during local execution")) },
178
+ bootstrap: {
179
+ ensureInitRunner: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.bootstrap.ensureInitRunner() is not available during local execution")),
180
+ preBootSend: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.bootstrap.preBootSend() is not available during local execution"))
181
+ }
150
182
  }
151
183
  });
152
184
  for (const genJob of generatedJobs) {
@@ -257,7 +289,7 @@ async function executeResolvedJobInner(resolvedJob, context, startTime) {
257
289
  const sdkSetters = await resolveSdkSetters(context.kiciDir);
258
290
  let ruleResults;
259
291
  if (job.rules && job.rules.length > 0) {
260
- const ruleContext = createRuleContext(context.event, context.event.changedFiles);
292
+ const ruleContext = createRuleContext(context.event, context.event.changedFiles, context.dispatchInputs ?? {});
261
293
  const ruleEval = await evaluateRulesWithFormatting(job.rules, ruleContext, expandedName);
262
294
  ruleResults = ruleEval.results;
263
295
  if (!ruleEval.allPassed) return {
@@ -282,7 +314,7 @@ async function executeResolvedJobInner(resolvedJob, context, startTime) {
282
314
  const stepCtx = createStepContext({ name: context.workflowName }, {
283
315
  name: expandedName,
284
316
  runsOn: localRunsOnString(job.runsOn)
285
- }, repoRoot, void 0, hasMatrix ? matrixValues : void 0, context.secrets, void 0, context.event.payload, context.event.provider);
317
+ }, repoRoot, void 0, hasMatrix ? matrixValues : void 0, context.secrets, void 0, context.event.payload, context.event.provider, context.dispatchInputs ?? {});
286
318
  const stepResults = [];
287
319
  let stepCounter = 0;
288
320
  for (const stepOrFn of job.steps) {
@@ -313,7 +345,7 @@ async function executeResolvedJobInner(resolvedJob, context, startTime) {
313
345
  const stepStart = Date.now();
314
346
  try {
315
347
  const checkMode = context.checkMode ?? CheckMode.enum.apply;
316
- const phase = await runLocalStepWithCheckMode(normalizedStep, stepCtx, checkMode);
348
+ const phase = await runLocalStepWithRetry(normalizedStep, stepCtx, checkMode, (line) => formatter.logJobLine(expandedName, line));
317
349
  const outputs = phase.outputs;
318
350
  const stepDuration = Date.now() - stepStart;
319
351
  formatter.logStepComplete(expandedName, normalizedStep.name, stepDuration);
@@ -27,6 +27,8 @@ export interface RunLocalOptions {
27
27
  container?: boolean;
28
28
  /** --env KEY=VALUE overrides (repeatable) */
29
29
  env?: string[];
30
+ /** --input KEY=VALUE typed workflow-dispatch inputs (repeatable) */
31
+ inputs?: string[];
30
32
  /** --quiet: minimal output */
31
33
  quiet?: boolean;
32
34
  /** --json: JSON output format */
@@ -8,8 +8,8 @@ import { readFileSync } from "node:fs";
8
8
  import { getDynamicJobGroup, getDynamicJobNeeds, isDynamicFunction, isDynamicGroupRef, isDynamicJobFn, isStaticArray, isStaticObject, normalizeApproval, normalizeCacheSpecs } from "@kici-dev/sdk";
9
9
  import { sha256 } from "@kici-dev/core";
10
10
  import { PackageManager, detectPackageManagerSync, detectYarnFlavorSync } from "@kici-dev/core/package-manager";
11
- import { resolveWhenToRunOn, validateResourceRequest } from "@kici-dev/engine";
12
- import { normalizeRunsOnAllToMatchers, normalizeRunsOnToMatchers } from "@kici-dev/engine/labels/compile";
11
+ import { extractInputsDescriptorMap, resolveWhenToRunOn, validateResourceRequest } from "@kici-dev/engine";
12
+ import { normalizeRunsOnAllToMatchers, normalizeRunsOnToMatchers, runsOnPickFromInput } from "@kici-dev/engine/labels/compile";
13
13
  import { execSync } from "node:child_process";
14
14
  //#region src/lockfile/generator.ts
15
15
  /**
@@ -234,7 +234,8 @@ function toLockDispatch(t) {
234
234
  return {
235
235
  _type: "dispatch",
236
236
  types: t.types,
237
- ...reposField(t)
237
+ ...reposField(t),
238
+ ...t.inputs && { inputs: extractInputsDescriptorMap(t.inputs) }
238
239
  };
239
240
  }
240
241
  function toLockCreate(t) {
@@ -458,7 +459,8 @@ function normalizeRunsOnForLock(runsOn, jobName) {
458
459
  const { include, exclude } = normalizeRunsOnToMatchers(runsOn, `job '${jobName}' runsOn`);
459
460
  return {
460
461
  runsOn: include,
461
- ...exclude.length > 0 ? { excludeLabels: exclude } : {}
462
+ ...exclude.length > 0 ? { excludeLabels: exclude } : {},
463
+ runsOnPick: runsOnPickFromInput(runsOn)
462
464
  };
463
465
  }
464
466
  /**
@@ -540,6 +542,7 @@ function transformJob(job, configPath, index, gitRoot, uuidToName) {
540
542
  ...job.runsOn !== void 0 ? normalizeRunsOnForLock(job.runsOn, job.name) : {},
541
543
  ...job.runsOnAll !== void 0 && { runsOnAll: normalizeRunsOnAllToMatchers(job.runsOnAll, `job '${job.name}' runsOnAll`) },
542
544
  ...job.onUnreachable !== void 0 && { onUnreachable: job.onUnreachable },
545
+ ...job.includeUninitialized !== void 0 && { includeUninitialized: job.includeUninitialized },
543
546
  ...job.maxParallel !== void 0 && { maxParallel: job.maxParallel },
544
547
  ...job.failFast !== void 0 && { failFast: job.failFast },
545
548
  ...resolveNeedsForLock(job.needs, uuidToName),
@@ -655,6 +658,12 @@ function transformSteps(steps, gitRoot) {
655
658
  hasOutputs: !!step.outputs && Object.keys(step.outputs).length > 0,
656
659
  ...step.continueOnError !== void 0 && { continueOnError: step.continueOnError },
657
660
  ...step.timeout !== void 0 && { timeout: step.timeout },
661
+ ...step.retry !== void 0 && { retry: {
662
+ maxAttempts: step.retry.maxAttempts,
663
+ delayMs: step.retry.delayMs,
664
+ backoff: step.retry.backoff,
665
+ maxDelayMs: step.retry.maxDelayMs
666
+ } },
658
667
  ...step.cache !== void 0 && { cache: normalizeCacheSpecs(step.cache) },
659
668
  ...step._sourceLocation && { sourceLocation: {
660
669
  file: makeRelativePath(step._sourceLocation.file, gitRoot),
@@ -82,6 +82,12 @@ export interface PlatformTriggerInput {
82
82
  * the orchestrator, which intersects each runsOnAll roster with it.
83
83
  */
84
84
  target?: HostTargetSelector;
85
+ /**
86
+ * Raw operator-supplied `kici run --input KEY=VALUE` pairs (not defaulted /
87
+ * coerced). The Platform relays them verbatim; the orchestrator validates,
88
+ * coerces, and applies defaults authoritatively against the lock descriptor.
89
+ */
90
+ dispatchInputs?: Record<string, string>;
85
91
  }
86
92
  export interface PlatformTriggerResponse {
87
93
  runId: string;
@@ -232,6 +232,7 @@ function getSizeWarning(compressedSize) {
232
232
  */
233
233
  async function uploadTarball(opts) {
234
234
  const { tarballPath, signedUrl, orchestratorPublicKey, onProgress } = opts;
235
+ if (!signedUrl) throw new Error("The orchestrator did not return an upload URL, so the overlay cannot be uploaded. This usually means the orchestrator has no object storage configured for remote runs. Ask your orchestrator operator to enable cache storage (KICI_STORAGE_TYPE=s3 or filesystem).");
235
236
  const { encryptedPath, cliPublicKey } = await encryptTarball(tarballPath, orchestratorPublicKey);
236
237
  const encryptedData = await fs.readFile(encryptedPath);
237
238
  const encryptedSize = encryptedData.length;
@@ -1,6 +1,6 @@
1
1
  import "../chunk-BTugEXQM.js";
2
2
  //#region src/templates/package-json.ts
3
- const sdkVersion = "0.1.22";
3
+ const sdkVersion = "0.1.23";
4
4
  /**
5
5
  * Generate package.json content for .kici/ directory
6
6
  *
@@ -3,7 +3,7 @@ import type { RuleEvaluationResult } from '@kici-dev/sdk';
3
3
  /**
4
4
  * Create RuleContext for rule evaluation.
5
5
  */
6
- export declare function createRuleContext(event: EventPayload, changedFiles?: string[]): RuleContext;
6
+ export declare function createRuleContext(event: EventPayload, changedFiles?: string[], dispatchInputs?: Readonly<Record<string, string | number | boolean | null>>): RuleContext;
7
7
  /**
8
8
  * Evaluate rules with formatting output.
9
9
  * Wraps the SDK's evaluateRules() with a callback that logs each rule result.
@@ -8,11 +8,12 @@ initZx();
8
8
  /**
9
9
  * Create RuleContext for rule evaluation.
10
10
  */
11
- function createRuleContext(event, changedFiles = []) {
11
+ function createRuleContext(event, changedFiles = [], dispatchInputs = {}) {
12
12
  return {
13
13
  event,
14
14
  changedFiles,
15
15
  env: { ...process.env },
16
+ dispatchInputs,
16
17
  $
17
18
  };
18
19
  }
@@ -11,5 +11,5 @@ import type { StepContext, WorkflowInfo, JobInfo, MatrixValues } from '@kici-dev
11
11
  export declare function createStepContext(workflowInfo: WorkflowInfo, jobInfo: JobInfo, repoRoot: string, inputs?: Record<string, unknown>, matrix?: MatrixValues, testSecrets?: {
12
12
  flat: Record<string, string>;
13
13
  contexts: Record<string, Record<string, string>>;
14
- }, environment?: string, rawPayload?: Record<string, unknown>, provider?: string): StepContext;
14
+ }, environment?: string, rawPayload?: Record<string, unknown>, provider?: string, dispatchInputs?: Readonly<Record<string, string | number | boolean | null>>): StepContext;
15
15
  //# sourceMappingURL=step-context.d.ts.map
@@ -42,7 +42,7 @@ function createTestLogger(jobName) {
42
42
  * `ctx.$` would inherit `process.cwd()` — i.e. wherever the user invoked
43
43
  * `kici` — which silently breaks any step that uses relative paths.
44
44
  */
45
- function createStepContext(workflowInfo, jobInfo, repoRoot, inputs = {}, matrix, testSecrets, environment, rawPayload, provider) {
45
+ function createStepContext(workflowInfo, jobInfo, repoRoot, inputs = {}, matrix, testSecrets, environment, rawPayload, provider, dispatchInputs = {}) {
46
46
  const flat = testSecrets?.flat ?? {};
47
47
  const namespacedSecrets = testSecrets?.contexts ?? {};
48
48
  const mergedFlat = { ...flat };
@@ -110,6 +110,7 @@ function createStepContext(workflowInfo, jobInfo, repoRoot, inputs = {}, matrix,
110
110
  process.env.PATH = updated;
111
111
  },
112
112
  inputs,
113
+ dispatchInputs,
113
114
  workflow: workflowInfo,
114
115
  job: jobInfo,
115
116
  matrix,
@@ -138,7 +139,11 @@ function createStepContext(workflowInfo, jobInfo, repoRoot, inputs = {}, matrix,
138
139
  get: () => Promise.resolve(null)
139
140
  },
140
141
  oidc: { token: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.oidc.token() is not available in the local test runner")) },
141
- host: { requestReboot: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.host.requestReboot() is not available in the local test runner")) }
142
+ host: { requestReboot: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.host.requestReboot() is not available in the local test runner")) },
143
+ bootstrap: {
144
+ ensureInitRunner: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.bootstrap.ensureInitRunner() is not available in the local test runner")),
145
+ preBootSend: () => Promise.reject(/* @__PURE__ */ new Error("ctx.kici.bootstrap.preBootSend() is not available in the local test runner"))
146
+ }
142
147
  },
143
148
  cache: {
144
149
  restore: async () => ({ hit: false }),
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@
12
12
  * v15 adds per-job init config(s).
13
13
  * v17 widens per-job init to typed presets ('mise' / { mise }) and 'auto' detection.
14
14
  */
15
- import type { ResourceRequest, ApproverClause, RunsOnAllPredicate, OnUnreachableMode, LabelMatcher, ExecutionJobStatus } from '@kici-dev/engine';
15
+ import type { ResourceRequest, ApproverClause, RunsOnAllPredicate, OnUnreachableMode, LabelMatcher, ExecutionJobStatus, InputsDescriptorMap } from '@kici-dev/engine';
16
16
  /**
17
17
  * Normalized approval config carried in the lock file. Mirrors the engine
18
18
  * `LockApproval` type. Produced by the compiler from an SDK `approval` config.
@@ -28,7 +28,7 @@ export interface LockApproval {
28
28
  readonly when: 'always' | 'drift';
29
29
  }
30
30
  /** Schema version - re-exported from engine as single source of truth */
31
- export declare const SCHEMA_VERSION: 22;
31
+ export declare const SCHEMA_VERSION: 26;
32
32
  /**
33
33
  * Source file reference with meaningful path.
34
34
  * Format: file is relative path from git root, export uses hash syntax.
@@ -127,6 +127,8 @@ export interface LockDispatchTrigger {
127
127
  readonly _type: 'dispatch';
128
128
  readonly types: readonly string[];
129
129
  readonly repos?: readonly LockBranchPattern[];
130
+ /** Typed dispatch-input descriptors (from `dispatch({ inputs })`). */
131
+ readonly inputs?: InputsDescriptorMap;
130
132
  }
131
133
  /**
132
134
  * Create trigger in lock file.
@@ -392,6 +394,8 @@ export interface LockJob {
392
394
  readonly runsOnAll?: RunsOnAllPredicate;
393
395
  /** Failure policy for unreachable durable hosts in a runsOnAll fan-out. */
394
396
  readonly onUnreachable?: OnUnreachableMode;
397
+ /** Widen runsOnAll to declared-but-un-agented hosts (init-runner bring-up per fresh box). */
398
+ readonly includeUninitialized?: boolean;
395
399
  /** Fan-out concurrency width (sliding window; 1 = serial). Applies to matrix and runsOnAll. */
396
400
  readonly maxParallel?: number;
397
401
  /** Halt the fan-out on first child failure, skipping the held remainder. Default false. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/compiler",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Compiler and CLI for KiCI workflows. Compiles `.kici/workflows/*.ts` to a `kici.lock.json` file consumed by the orchestrator and agents, and runs workflows locally or against a remote orchestrator.",
5
5
  "keywords": [
6
6
  "ci",
@@ -63,11 +63,11 @@
63
63
  "yaml": "^2.9.0",
64
64
  "zod": "^4.4.3",
65
65
  "zx": "^8.8.5",
66
- "@kici-dev/core": "0.1.22",
67
- "@kici-dev/engine": "0.1.22"
66
+ "@kici-dev/core": "0.1.23",
67
+ "@kici-dev/engine": "0.1.23"
68
68
  },
69
69
  "peerDependencies": {
70
- "@kici-dev/sdk": "0.1.22"
70
+ "@kici-dev/sdk": "0.1.23"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/proper-lockfile": "^4.1.4"
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/compiler@0.1.22",
6
- "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fcompiler/0.1.22/3348af69-8089-4211-a0f3-9a8e9a3651f4",
5
+ "name": "@kici-dev/compiler@0.1.23",
6
+ "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fcompiler/0.1.23/d56984d9-446e-4527-842c-a90a4a7c9a78",
7
7
  "creationInfo": {
8
- "created": "2026-06-24T06:03:11Z",
8
+ "created": "2026-06-25T11:12:53Z",
9
9
  "creators": [
10
10
  "Tool: kici-sbom-generator"
11
11
  ]
@@ -484,7 +484,7 @@
484
484
  {
485
485
  "SPDXID": "SPDXRef-RootPackage",
486
486
  "name": "@kici-dev/compiler",
487
- "versionInfo": "0.1.22",
487
+ "versionInfo": "0.1.23",
488
488
  "downloadLocation": "NOASSERTION",
489
489
  "filesAnalyzed": false,
490
490
  "licenseConcluded": "NOASSERTION",
@@ -495,16 +495,16 @@
495
495
  {
496
496
  "referenceCategory": "PACKAGE-MANAGER",
497
497
  "referenceType": "purl",
498
- "referenceLocator": "pkg:npm/%40kici-dev/compiler@0.1.22"
498
+ "referenceLocator": "pkg:npm/%40kici-dev/compiler@0.1.23"
499
499
  }
500
500
  ],
501
501
  "description": "Compiler and CLI for KiCI workflows. Compiles `.kici/workflows/*.ts` to a `kici.lock.json` file consumed by the orchestrator and agents, and runs workflows locally or against a remote orchestrator.",
502
502
  "homepage": "https://kici.dev"
503
503
  },
504
504
  {
505
- "SPDXID": "SPDXRef-Package--kici-dev-core-0.1.22",
505
+ "SPDXID": "SPDXRef-Package--kici-dev-core-0.1.23",
506
506
  "name": "@kici-dev/core",
507
- "versionInfo": "0.1.22",
507
+ "versionInfo": "0.1.23",
508
508
  "downloadLocation": "NOASSERTION",
509
509
  "filesAnalyzed": false,
510
510
  "licenseConcluded": "NOASSERTION",
@@ -515,16 +515,16 @@
515
515
  {
516
516
  "referenceCategory": "PACKAGE-MANAGER",
517
517
  "referenceType": "purl",
518
- "referenceLocator": "pkg:npm/%40kici-dev/core@0.1.22"
518
+ "referenceLocator": "pkg:npm/%40kici-dev/core@0.1.23"
519
519
  }
520
520
  ],
521
521
  "description": "Light shared utilities for the KiCI stack (logging, errors, formatting, crypto, zx init, the TypeScript ESM loader hook). No server-side dependencies.",
522
522
  "homepage": "https://kici.dev"
523
523
  },
524
524
  {
525
- "SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.22",
525
+ "SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.23",
526
526
  "name": "@kici-dev/engine",
527
- "versionInfo": "0.1.22",
527
+ "versionInfo": "0.1.23",
528
528
  "downloadLocation": "NOASSERTION",
529
529
  "filesAnalyzed": false,
530
530
  "licenseConcluded": "NOASSERTION",
@@ -535,16 +535,16 @@
535
535
  {
536
536
  "referenceCategory": "PACKAGE-MANAGER",
537
537
  "referenceType": "purl",
538
- "referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.22"
538
+ "referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.23"
539
539
  }
540
540
  ],
541
541
  "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.",
542
542
  "homepage": "https://kici.dev"
543
543
  },
544
544
  {
545
- "SPDXID": "SPDXRef-Package--kici-dev-sdk-0.1.22",
545
+ "SPDXID": "SPDXRef-Package--kici-dev-sdk-0.1.23",
546
546
  "name": "@kici-dev/sdk",
547
- "versionInfo": "0.1.22",
547
+ "versionInfo": "0.1.23",
548
548
  "downloadLocation": "NOASSERTION",
549
549
  "filesAnalyzed": false,
550
550
  "licenseConcluded": "NOASSERTION",
@@ -555,7 +555,7 @@
555
555
  {
556
556
  "referenceCategory": "PACKAGE-MANAGER",
557
557
  "referenceType": "purl",
558
- "referenceLocator": "pkg:npm/%40kici-dev/sdk@0.1.22"
558
+ "referenceLocator": "pkg:npm/%40kici-dev/sdk@0.1.23"
559
559
  }
560
560
  ],
561
561
  "description": "TypeScript SDK for defining KiCI workflows. Import into `.kici/workflows/*.ts` to declare workflows, jobs, steps, triggers, rules, and matrix configurations.",
@@ -3222,17 +3222,17 @@
3222
3222
  },
3223
3223
  {
3224
3224
  "spdxElementId": "SPDXRef-RootPackage",
3225
- "relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.22",
3225
+ "relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.23",
3226
3226
  "relationshipType": "DEPENDS_ON"
3227
3227
  },
3228
3228
  {
3229
3229
  "spdxElementId": "SPDXRef-RootPackage",
3230
- "relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.22",
3230
+ "relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.23",
3231
3231
  "relationshipType": "DEPENDS_ON"
3232
3232
  },
3233
3233
  {
3234
3234
  "spdxElementId": "SPDXRef-RootPackage",
3235
- "relatedSpdxElement": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3235
+ "relatedSpdxElement": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3236
3236
  "relationshipType": "DEPENDS_ON"
3237
3237
  },
3238
3238
  {
@@ -3301,82 +3301,82 @@
3301
3301
  "relationshipType": "DEPENDS_ON"
3302
3302
  },
3303
3303
  {
3304
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3304
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3305
3305
  "relatedSpdxElement": "SPDXRef-Package-oxc-transform-0.135.0",
3306
3306
  "relationshipType": "DEPENDS_ON"
3307
3307
  },
3308
3308
  {
3309
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3309
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3310
3310
  "relatedSpdxElement": "SPDXRef-Package-picocolors-1.1.1",
3311
3311
  "relationshipType": "DEPENDS_ON"
3312
3312
  },
3313
3313
  {
3314
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3314
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3315
3315
  "relatedSpdxElement": "SPDXRef-Package-winston-daily-rotate-file-5.0.0",
3316
3316
  "relationshipType": "DEPENDS_ON"
3317
3317
  },
3318
3318
  {
3319
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3319
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3320
3320
  "relatedSpdxElement": "SPDXRef-Package-winston-3.19.0",
3321
3321
  "relationshipType": "DEPENDS_ON"
3322
3322
  },
3323
3323
  {
3324
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3324
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3325
3325
  "relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
3326
3326
  "relationshipType": "DEPENDS_ON"
3327
3327
  },
3328
3328
  {
3329
- "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.22",
3329
+ "spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.23",
3330
3330
  "relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
3331
3331
  "relationshipType": "DEPENDS_ON"
3332
3332
  },
3333
3333
  {
3334
- "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.22",
3334
+ "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.23",
3335
3335
  "relatedSpdxElement": "SPDXRef-Package-jose-6.2.3",
3336
3336
  "relationshipType": "DEPENDS_ON"
3337
3337
  },
3338
3338
  {
3339
- "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.22",
3339
+ "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.23",
3340
3340
  "relatedSpdxElement": "SPDXRef-Package-jsonpath-plus-10.4.0",
3341
3341
  "relationshipType": "DEPENDS_ON"
3342
3342
  },
3343
3343
  {
3344
- "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.22",
3344
+ "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.23",
3345
3345
  "relatedSpdxElement": "SPDXRef-Package-picomatch-4.0.4",
3346
3346
  "relationshipType": "DEPENDS_ON"
3347
3347
  },
3348
3348
  {
3349
- "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.22",
3349
+ "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.23",
3350
3350
  "relatedSpdxElement": "SPDXRef-Package-safe-regex-2.1.1",
3351
3351
  "relationshipType": "DEPENDS_ON"
3352
3352
  },
3353
3353
  {
3354
- "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.22",
3354
+ "spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.23",
3355
3355
  "relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
3356
3356
  "relationshipType": "DEPENDS_ON"
3357
3357
  },
3358
3358
  {
3359
- "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3360
- "relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.22",
3359
+ "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3360
+ "relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.23",
3361
3361
  "relationshipType": "DEPENDS_ON"
3362
3362
  },
3363
3363
  {
3364
- "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3365
- "relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.22",
3364
+ "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3365
+ "relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.23",
3366
3366
  "relationshipType": "DEPENDS_ON"
3367
3367
  },
3368
3368
  {
3369
- "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3369
+ "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3370
3370
  "relatedSpdxElement": "SPDXRef-Package-micromatch-4.0.8",
3371
3371
  "relationshipType": "DEPENDS_ON"
3372
3372
  },
3373
3373
  {
3374
- "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3374
+ "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3375
3375
  "relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
3376
3376
  "relationshipType": "DEPENDS_ON"
3377
3377
  },
3378
3378
  {
3379
- "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.22",
3379
+ "spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.23",
3380
3380
  "relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
3381
3381
  "relationshipType": "DEPENDS_ON"
3382
3382
  },