Locks, waits, suspension, error signalling and source control. Every parameter with its type, default and description, plus worked examples.
Distributed mutex — serialize concurrent workflow runs on a named resource.
Two backends: postgres (lease table) and dragonfly (Redis-compatible).
acquire returns an opaque token that must be supplied to refresh and
release. There is no fencing token; the lease is enforced only at the
lock store, not at any downstream resource.
Single task that dispatches on op: (acquire / refresh / release / peek).
Field Type Required Default Description opstring No "acquire"Operation: acquire / refresh / release / peek backendstring No "postgres"postgres or dragonflydsnstring Yes — Postgres DSN or Redis URL tablestring No kis_locksPostgres lease table name (ignored for dragonfly) keystring Yes — Lock key setvarstring No — Capture the result map into this workflow variable
Field Type Used by Description ttlduration acquire, refresh Lease duration waitduration acquire Block-and-retry budget. Default 0 = fail fast ownerstring acquire Optional metadata stamped on the lease tokenstring refresh, release Token from the matching acquire
Durations accept Go-style strings (5m) or a bare integer (seconds).
acquire: { success, acquired, attempts, key, token, expiresAt, error }.
refresh: { success, refreshed, expiresAt, error }.
release: { success, released, error }.
peek: { success, held, token, owner, expiresAt, error }.
name : serialize-deployments
owner : " deploy-{{run_id}} "
token : " {{deploy_lock.token}} "
dsn : " redis://dragonfly.internal:6379/0 "
key : migration/2026-05-19
dsn : " redis://dragonfly.internal:6379/0 "
when : " {{not holder.held}} "
script : ./nightly-report.sh
Same operations as separate Script functions: lock.acquire, lock.refresh,
lock.release, lock.peek. See docs/namespaces/lock.md
for the full namespace reference.
Polling primitive — blocks until a runtime condition becomes true. Active
complement to the passive suspend task.
wait is a single task that dispatches on a for: discriminator. Today
only for: http is implemented; tcp / dns / exec / file / db variants are
planned.
Field Type Required Default Description forstring No "http"Wait kind setvarstring No — Capture the result map into this workflow variable
Field Type Required Default Description urlstring Yes — Target URL methodstring No "GET"HTTP method headersmap No — Request headers — sent on every poll bodystring No — Request body — reused on every poll statusint or [int] No 200Acceptable status code(s) bodymatchstring No — Regex the response body must match bodycontainsstring No — Substring the response body must contain headermatchmap No — Per-header regex constraints intervalduration No 5sPoll interval timeoutduration No 5mTotal timeout initialdelayduration No 0Delay before the first poll insecuretlsbool No falseSkip TLS certificate verification expectfailurebool No falseSucceed when the URL stops responding
Durations accept Go-style strings (5s, 1m30s) or a bare integer (seconds).
Field Type Description successbool Whether the wait condition was met attemptsint Number of polls performed elapsedMsint Total elapsed milliseconds lastStatusint HTTP status of the final poll lastBodystring Body of the final poll lastHeadersmap Headers of the final poll errorstring Failure reason on timeout / cancellation
url : http://localhost:8080/healthz
url : " https://api.example.com/jobs/{{job_id}} "
Authorization : " Bearer {{api_token}} "
bodycontains : ' "status":"done" '
url : http://localhost:8080/healthz
url : https://api.example.com/state
bodycontains : ' "ready":true '
message : " Ready after {{state_check.attempts}} polls in {{state_check.elapsedMs}}ms. "
Execute the same polls from Script scripts.
Function Description wait.http()Poll an HTTP endpoint until the response satisfies the criteria
Parameter Type Default Description urlstring — Target URL (required) methodstring "GET"HTTP method headersmap — Request headers bodystring — Request body statusint or [int] 200Acceptable status code(s) bodyMatchstring — Regex the body must match bodyContainsstring — Substring the body must contain headerMatchmap — Per-header regex constraints intervalint or string 5sPoll interval ("5s" or integer seconds) timeoutint or string 5mTotal timeout initialDelayint or string 0Delay before the first poll insecureTLSbool falseSkip TLS verification expectFailurebool falseSucceed when the URL stops responding
Field Type Description successbool Whether the condition was met attemptsint Polls performed elapsedMsint Total elapsed milliseconds lastStatusint Status of the final poll lastBodystring Body of the final poll lastHeadersmap Headers of the final poll errorstring Failure reason
// Wait for an endpoint to return 200
url: " http://localhost:8080/healthz " ,
throw " service never came up: " + r . error
// Block on a long-running job
url: " https://api.example.com/jobs/ " + jobId ,
headers: { Authorization: " Bearer " + token },
bodyContains: ' "status":"done" ' ,
url: " http://localhost:8080/healthz " ,
// Match a status list and inspect the final response on timeout
url: " https://api.example.com/v " ,
bodyMatch: " \" version \" : \" 2 \\ . \\ d+ \\ . \\ d+ \" " ,
log ( " attempts= " + r . attempts + " lastStatus= " + r . lastStatus )
See docs/namespaces/wait.md for the dedicated
namespace reference.
Pause workflow execution until triggered with data. Can suspend at different phases of task execution.
Parameter Type Required Default Description whenstring No executeWhen to suspend: execute, before, after messagestring No - Message to log when suspending
Value Description executeSuspend during Execute phase, resumes when triggered with data beforeSuspend before Execute runs afterSuspend after Execute completes
shell : ./deploy.sh staging
- name : wait-for-approval
message : " Waiting for production deployment approval "
- name : deploy-production
shell : ./deploy.sh production
- name : wait-before-start
message : " Workflow paused before starting task "
message : " Waiting for QA team approval "
Test utility task that throws errors at configurable phases. Useful for testing error handling in workflows.
Parameter Type Required Default Description phasestring No executeWhen to throw: execute, before, after, all messagestring No - Custom error message
Value Description executeThrow error during Execute phase (default) beforeThrow error during BeforeExecute phase afterThrow error during AfterExecute phase allThrow error in all phases
message : " This task intentionally fails "
- name : fail-before-execute
message : " Error during initialization "
name : throw-test-handling
message : " Simulated failure for testing "
message : " Error was caught and handled "
Git operations using go-git (pure Go).
Operation Description cloneClone a repository commitCreate a commit pushPush to remote pullPull from remote statusGet repository status add-remoteAdd a remote remove-remoteRemove a remote
Parameter Type Required Description commandstring Yes Operation to perform directorystring Yes* Repository directory urlstring Yes* Repository URL (for clone) filestring No File to add and commit contentstring No Content to write to file messagestring No Commit message authorstring No Author name emailstring No Author email remotestring No Remote name (default: origin) usernamestring No HTTP basic auth username passwordstring No HTTP basic auth password/token depthint No Clone depth (0 = full)
url : https://github.com/user/repo.git
password : " {{git_token}} "
password : " {{git_token}} "
Git version control functions.
Function Description git.clone()Clone a repository git.commit()Create a commit git.push()Push to remote git.pull()Pull from remote git.status()Get repository status git.addRemote()Add a remote git.removeRemote()Remove a remote
Parameter Type Default Description urlstring - Repository URL (required) directorystring - Local directory path (required) usernamestring - Auth username passwordstring - Auth password/token depthint 0Clone depth (0 = full)
Parameter Type Default Description directorystring - Repository directory (required) messagestring - Commit message authorstring - Author name (required) emailstring - Author email (required) filestring - File to add/modify contentstring - Content to write to file
Parameter Type Default Description directorystring - Repository directory (required) remotestring "origin"Remote name usernamestring - Auth username passwordstring - Auth password/token
url: " https://github.com/user/repo.git " ,
directory: " /path/to/dest " ,
username: input . git_user ,
password: input . git_token
let status = git . status ( {
directory: " /path/to/repo "
log ( " Is clean: " , status . clean )
log ( " Changed files: " , status . files )
directory: " /path/to/repo " ,
message: " Update configuration " ,
directory: " /path/to/repo " ,
username: input . git_user ,
password: input . git_token
directory: " /path/to/repo " ,
username: input . git_user ,
password: input . git_token
directory: " /path/to/repo " ,
url: " https://github.com/upstream/repo.git "
directory: " /path/to/repo " ,
DNS record CRUD (via libdns ) and
system-resolver lookups. Single task that dispatches on op:. Six
providers in v1: cloudflare, route53, gcloud, azure, digitalocean,
godaddy.
The same providers are reused by the letsencrypt
task for DNS-01 challenges, so credentials map between them.
Field Type Required Default Description opstring No listlist / set / append / delete / lookupproviderstring Yes (CRUD) — Provider name (see spec ) credentialsmap Yes (CRUD) — Provider-specific auth (see spec for keys) zonestring Yes (CRUD) — Zone name (example.com) timeoutduration No — Wall-clock cap setvarstring No — Capture result map into a workflow variable
Field Type Description typestring A, AAAA, CNAME, TXT, MX, SRV, NS, etc.namestring Relative to zone (www); @ for apex valuestring For MX: hostname. For SRV: "port target". Otherwise the literal value ttlduration TTL priorityint MX or SRV priority weightint SRV weight
Op Adds to base {success, error} list / set / append / lookuprecordsdeletedeleted
api_token : " {{ cf_token }} "
credentials : { api_token : " {{ cf_token }} " }
value : " v=spf1 include:_spf.google.com -all "
credentials : { api_token : " {{ cf_token }} " }
- { type : MX , name : " @ " , value : " primary-mx.example.com. " , priority : 10 }
- { type : MX , name : " @ " , value : " secondary-mx.example.com. " , priority : 20 }
message : " Resolved to {{ result.records[0].value }} "
Same five operations as Script functions: dns.list / dns.set /
dns.append / dns.delete / dns.lookup. See
docs/namespaces/dns.md for the full namespace
reference.
credentials: { api_token: cfToken },
records: [{ type: " A " , name: " www " , value: " 203.0.113.10 " , ttl: 300 }]
let r = dns . lookup ( { name: " www.example.com " , type: " A " , server: " 1.1.1.1:53 " } )
if ( r . records . length === 0 ) {
throw " DNS not propagated yet "
Web scraping using an external scraper service. Extracts content from web pages.
Parameter Type Required Default Description scraperurlstring Yes - Scraper service URL urlslist Yes - List of URLs to scrape setvarstring No - Variable to store results continueonerrorbool No falseContinue on scraping errors timeoutstring No 5mScraping timeout contextlimitint No 15000Max characters per chunk
Property Type Default Description urlstring - URL to scrape depthint 1Link crawl depth limitint 2Max pages to scrape securebool falseUse secure mode structuredbool falseReturn structured data authenticatemap - Authentication config
scraper_url : " https://scraper.example.com "
scraperurl : " {{scraper_url}} "
- url : " https://docs.example.com/guide "
- name : scrape-competitors
scraperurl : " {{scraper_url}} "
- url : " https://competitor1.com/pricing "
- url : " https://competitor2.com/pricing "
- url : " https://competitor3.com/pricing "
scraperurl : " {{scraper_url}} "
- url : " https://internal.example.com/docs "