SDK reference
Reference documentation for @kici-dev/sdk. The reference is split across the per-topic pages below.
| Page | Covers |
|---|---|
| Core | workflow(), job(), step() factory functions and step / job authoring patterns (bare functions, output chaining, needs, dynamic groups). |
| Triggers | All 23 trigger factories — GitHub events (pr, push, tag, comment, …), event triggers (kiciEvent, workflowComplete, workflowsFailedBatch, jobComplete), genericWebhook, schedule, lifecycle, plus branch-pattern semantics. |
| Rules, matrix, dynamic jobs | rule(), skip(), matrix builds (static + dynamic), and dynamicJob() / dynamicGroup(). |
| runsOnAll host fan-out | runsOnAll — fan one job out to every matching connected host, one pinned execution per host, with exact / glob / regex host selectors. |
| Caching | CacheSpec, declarative cache on jobs/steps, imperative ctx.cache.restore() / ctx.cache.save(), immutable keys, restoreKeys prefix fallback, per-org + per-ref isolation. |
| Artifacts | ctx.artifacts — share named, durable build outputs between jobs of a run and download them from the run page. |
| Validation & events | validateDag(), defineEvent(), event emission patterns. |
| Runtime | Types index, StepContext, secrets, and fixtures. |
| Temp directories | ctx.mktemp() / ctx.mktempFile() — allocate job-scoped scratch dirs and files that are cleaned up automatically when the job ends. |
| Event payload reference | Generated schema of the normalized event envelope passed to rules and dynamic functions. |
| Idempotent helpers | idempotent(), idempotentStep(), and the check-mode-aware checkStep() — check / apply pattern with typed results on both the skipped and applied branches. |
| Wait-for helpers | waitFor() and waitForStep() — poll a condition on an interval, run an optional success action, recover gracefully on timeout. |
| Parallel steps | parallel() — run independent steps concurrently within one job behind a join barrier, each as its own observable step, with failFast and maxParallel controls. |
The @kici-dev/sdk package re-exports the entire surface from a single entry point. Pick what you need:
import { workflow, job, step, pr, push, rule, defineEvent } from '@kici-dev/sdk';For the complete list of every named export (factory functions, triggers, rules, validation, hook factories, types), see the per-topic pages above.
See also
Section titled “See also”- Getting started — install the SDK, write your first workflow, test locally
- CLI reference — compile, test, and manage workflows from the command line
- Workflow patterns — common patterns using the SDK features documented above
- Secrets management (operator) — configure encrypted secret storage and admin API
- Secrets architecture — encryption model, multi-backend, and data flow
- Execution status vocabulary — run/job/step statuses and terminal states