AGPL-3.0-or-later · forever.

remote preview · jobs

Submit, observe, settle.

Use the jobs namespace for submission, status, cancellation, polling, event streaming and artifact collection.

The jobs API is already typed and fixture-tested. It remains a preview because the compatible workflow HTTP service is not part of the released engine.

Return the job identity immediately.

submit is the low-latency form. Persist job_id before opening an event stream so reconnects and support tools share one identity.

const { job_id } = await nika.jobs.submit(
  'release.nika.yaml',
  { channel: 'stable' },
)

Use polling when progress is not visible.

run submits and polls until a terminal status. Poll interval, timeout and backoff belong to client configuration.

const job = await nika.jobs.run('release.nika.yaml')
console.log(job.status, job.exit_code)

Separate job cancellation from request abort.

jobs.cancel asks the service to cancel work. AbortSignal stops the caller waiting on a request. Products often need both actions.

await nika.jobs.cancel(job_id)
const settled = await nika.jobs.status(job_id)

Keep this behind an adapter.

The namespace is useful for integration work, tests and UI design today. Do not route production work to it until a compatible service release is published.