Skip to main content
The task command group lets you submit task contracts to the kernel, observe their lifecycle as they move through execution and verification rounds, and retrieve the finalized decision. The task run-real subcommand combines all of these steps into a single end-to-end flow that drives a real HTTP runtime through the full WattSwarm task lifecycle.

task submit

Submit a TaskContract JSON file to the local node. Synopsis
Arguments Description Reads the JSON file, parses it as a TaskContract, and emits a TASK_CREATED event into the local event log. The task enters the pending state and is now eligible for claim by an executor. Call task watch <task_id> to observe its progress, or use task run-real to execute the full lifecycle immediately. Example

Sample task.json

Use the kernel UI at http://127.0.0.1:7788/ and click Task → SAMPLE to generate a valid task contract template you can save and customise.

task watch

Poll task status until the task reaches a terminal state. Synopsis
Arguments Description Reads the current task view from the local projection and prints the task state, committed candidate ID, and finalised candidate ID. For a live polling loop, call this command in a shell loop or use task run-real --task-id which blocks until the task is complete. Example

task decision

Fetch the finalized decision for a completed task. Synopsis
Arguments Description Reads the task view from the local projection and prints the committed and finalised candidate IDs. Use task watch first to confirm the task has reached a terminal state before calling task decision. Example

task run-real

Run the complete task lifecycle end-to-end against a registered executor runtime. Synopsis
Flags Description task run-real drives the full WattSwarm task lifecycle in a single blocking call:
All HTTP calls go directly to the registered executor via POST /execute and POST /verify. When the flow completes, the command prints the full decision result as pretty-printed JSON. Examples
The executor runtime must be running and reachable at its registered base_url before you call task run-real. Use executors check <name> to verify connectivity first.