Skip to content

SDK reference

Reference documentation for @kici-dev/sdk. The reference is split across the per-topic pages below.

PageCovers
Coreworkflow(), job(), step() factory functions and step / job authoring patterns (bare functions, output chaining, needs, dynamic groups).
TriggersAll 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 jobsrule(), skip(), matrix builds (static + dynamic), and dynamicJob() / dynamicGroup().
runsOnAll host fan-outrunsOnAll — fan one job out to every matching connected host, one pinned execution per host, with exact / glob / regex host selectors.
CachingCacheSpec, declarative cache on jobs/steps, imperative ctx.cache.restore() / ctx.cache.save(), immutable keys, restoreKeys prefix fallback, per-org + per-ref isolation.
Artifactsctx.artifacts — share named, durable build outputs between jobs of a run and download them from the run page.
Validation & eventsvalidateDag(), defineEvent(), event emission patterns.
RuntimeTypes index, StepContext, secrets, and fixtures.
Temp directoriesctx.mktemp() / ctx.mktempFile() — allocate job-scoped scratch dirs and files that are cleaned up automatically when the job ends.
Event payload referenceGenerated schema of the normalized event envelope passed to rules and dynamic functions.
Idempotent helpersidempotent(), idempotentStep(), and the check-mode-aware checkStep() — check / apply pattern with typed results on both the skipped and applied branches.
Wait-for helperswaitFor() and waitForStep() — poll a condition on an interval, run an optional success action, recover gracefully on timeout.
Parallel stepsparallel() — 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.