run.result() resolves once with how the run ended, including a pause.
check() returns the engine’s local findings report, or the server’s typed
acknowledgement or refusal for a served name. run.cancel() may acknowledge a
pending request; it never replaces run.result(). Methods that need a server
throw NikaCompatibilityError on the local transport. The three artifact
methods reject the same way, before any request, on a server whose /health
does not list artifacts; attachRun() handles have them too, and artifact
is a manifest name or the entry itself. The run-handle methods
are bound to their run; only the deprecated facade wrappers
(nika.events(run), nika.cancel(run), nika.status(run)) check that a run
belongs to this client, with NikaRunOwnershipError.
compile() asks the engine for a candidate workflow and runs nothing:
ready, incomplete and refused all resolve as data. A ready candidate
is ordinary .nika source; write it to a file and run(path) admits it
again. Over HTTP it calls POST /v1/compile when the server’s /health
lists compile. A provider round is opt-in: cognition: 'explicitProvider'
on a server that lists compileNativeV2, or authoringModel on a local
engine. nextCompileRequest(request, outcome, answers) builds the next round
from the outcome’s questions, and isNikaCompileHeld(outcome) tells a
candidate the verifier held, a preview never to run. The package’s
compile guide
covers both doors.
Compatibility aliases
Compatibility aliases
nika.events(run), nika.cancel(run), nika.status(run) and run.done
remain as deprecated aliases through the compatibility window. run.done
is the same promise as run.result(); the facade wrappers forward to the
handle methods unchanged.Configuration
Constructor and operation options.
Types
Expand the public projections.