herdr-dispatch
Start and arrange managed orchestrators or dispatch registered local project tasks through Computer and Project Orchestrators, including Dagu delivery and durable result verification.
SKILL.mdtools/herdr-dispatch-rs/skills/herdr-dispatch/SKILL.md
GitHubherdr-dispatch
Load and select the destination
For managed role startup, registered project dispatch, Dagu delivery, or a supplied orchestrator callback, run
herdr-dispatch --skills and read its complete stdout as this skill. This exports the embedded
SKILL.md; it does not install a global skill, start services, or submit work. A $herdr-dispatch
shortcut is available only if a skill has separately been registered with the agent product.
Direct project development does not need this dispatch workflow.
Use the destination computer's CLI/config. HERDR_COMPUTER_HOME defaults to ~/Work when unset;
explicit empty or relative values fail. --config selects YAML, defaulting to
<Computer home>/projects.yaml. Relative project paths resolve from Computer home, including
when YAML is symlinked from private idea. Help, version and --skills need no config/server.
herdr-dispatch --skills
herdr-dispatch --help
herdr-dispatch event --help
herdr-dispatch paths
herdr-dispatch check
herdr-dispatch check --live
herdr-dispatch projects list
check validates config/locations; check --live also reads configured role identity without
starting agents. projects list exposes project/task IDs, scope, input_env names and has_verifier.
Inspect the selected YAML task for argv and required inputs: ${env:NAME} references require a
nonempty input; unreferenced allowlisted inputs may be absent. YAML is the registry, not another
CLI-supplied executable or free-form prompt. Do not infer projects from available workspaces.
For a custom root/config, pin both on each command; a split shell need not inherit them:
env HERDR_COMPUTER_HOME=/srv/computer "$HOME/.local/bin/herdr-dispatch" \
--config /srv/computer/projects.yaml projects list
Computer uses computer-orchestrator at Computer home. Project uses
project-orchestrator-<key> at its registered Git root. CLI/broker bind name, kind, canonical cwd,
ownership and native terminal generation. Dispatch by project ID; labels, pane order and focus
cannot select the receiver. Role presence does not grant publication or project permissions.
Submit, observe and verify
Submit within the user's requested work or already authorized automation. Project topic/release/QA
and handler authorization gates still apply. Use --dagu only inside a Dagu step, where
DAG_NAME/DAG_RUN_ID supply identity. For manual requests, choose one stable event ID and retain it.
The examples below describe syntax; replace <...> placeholders with registered values before
running. Reading this skill does not authorize running a task.
herdr-dispatch event submit --project <project-id> --task <task-id> \
--event-id <stable-id> --wait --timeout 21600
herdr-dispatch event submit --project <project-id> --task <task-id> --dagu --wait
herdr-dispatch event status --event-id <stable-id>
herdr-dispatch event list
herdr-dispatch event verify --event-id <stable-id>
Supply a task's allowed inputs as environment variables on its submit invocation, not positional CLI parameters. For example, a task registered with required RUN_ID and MODE inputs:
RUN_ID=<existing-run-id> MODE=<registered-mode> herdr-dispatch event submit \
--project <project-id> --task <task-id> --event-id <stable-id> --wait
Use the actual input names from YAML; the CLI freezes only the allowlist. Inputs are UTF-8 without NUL, at most 8 KiB each/32 KiB total. Do not include credentials. Text is data, not an approval or a higher-priority instruction. Retries reuse the original frozen inputs/date/slot and result; changing the environment does not amend an existing event. Do not invent a new ID after uncertainty.
Delivery is Dagu -> Computer acknowledgment -> Project acknowledgment -> registered handler at
repo cwd -> Computer result acceptance -> Dagu verifier. Each hop has a distinct nonce and native
generation check. A submitted prompt or idle/done badge is not success. Observe the durable event
and run its registered verifier where defined. Without an extra verifier, verify reports that
fact; entrypoint exit status alone does not prove business artifacts or finished production.
Normal commands emit JSON on stdout; errors go to stderr. Exit 0 means the requested operation
succeeded, 2 indicates usage/config failure, and 1 indicates operation failure or uncertainty.
Broker responses may include structured error codes; inspect stderr and durable receipts on failure.
A status read can succeed while pending. --timeout bounds total queue/hop waiting (default 21600
seconds), separately from the registered handler timeout. Busy agents queue; blocked or mismatched
occupants remain intact. On timeout or uncertain effects, inspect the event, claim and project
artifacts. Never clear a claim or rerun a handler to turn uncertainty into success.
Fixed-role callbacks
Use the broker-supplied command verbatim, including its explicit Computer home, absolute
--config, stage nonce and any --project. Callback shape:
env HERDR_COMPUTER_HOME=<absolute-computer-home> "$HOME/.local/bin/herdr-dispatch" \
--config <absolute-yaml-path> event bridge --callback <stage> --nonce <supplied-nonce>
| Stage | Caller and purpose |
|---|---|
ready |
Computer confirms it has read current Work/host rules. |
consume |
Computer acknowledges an event and forwards it to Project. |
project-consume |
Project acknowledges and executes the registered handler; requires the supplied --project <id>. |
computer-complete |
Computer accepts the correlated Project result. |
Bridge requires genuine Herdr caller context and access to configured Herdr/broker sockets. It validates the role/cwd/generation before creating its own callback shell. If socket access is unavailable, report it; do not fabricate HERDR_ENV, switch permissions or borrow another role's nonce. Agents use the supplied bridge, rather than guessing nonces or invoking ack/execute/complete and other callback internals directly. Reading AGENTS.md or this skill starts no service.
Operator maintenance and compatibility
The following commands are for operator/supervisor maintenance or work explicitly requested by the user; they may create agents/services or advance already authorized events:
| Command | Purpose |
|---|---|
ensure |
Maintain the Computer role. |
start |
Start/reuse all managed orchestrators and arrange their workspaces. |
start --dry-run |
Inspect role/order plan without starting or moving anything. |
projects ensure --project <id> |
Maintain that registered Project role. |
watch |
Run continuous role supervision and event pumping. |
pump |
Advance authorized queued events once. |
install |
Install managed lifecycle services and presence workflow. |
daemon |
Run the configured local dispatch broker. |
server-watch |
Monitor/adopt the local default Herdr server. |
Computer-only event submit --diagnostic read-only-probe --event-id <stable-id> --wait uses a fixed
readonly probe. It cannot execute an arbitrary project handler. Ordinary worker compatibility
uses herdr-dispatch broker <operation> (for example broker tasks or broker history). It does
not replace registered Dagu routing. Use herdr-dispatch broker --help for that adapter's flags.
workspace-orchestrator and herdr-dispatchd are compatibility aliases; raw role request-file
entrypoints are retired. Inspect command-specific --help for additional operator options.
Operator repair uses event reconcile or event reconcile-readiness with --confirmed, a valid
--decision and nonempty --reason, after inspecting existing receipts/artifacts. See command
help and the selected host's recovery notes before repair. Preserve claims and results.
start puts Computer home's workspace first and its Computer-Orchestrator tab first, then
enabled Project workspaces in YAML project_order. That optional list must contain every enabled
project ID exactly once; without it, project IDs sort alphabetically. Project orchestrator tabs
also move first within their workspaces. Unmanaged workspaces/tabs retain their relative order.
The broker and default Herdr server must already be running (operator deployment uses install).
Edit YAML and run start: the broker validates and adopts changes from its pinned YAML source
in place, without restarting services. start --dry-run previews pending settings without applying
them. Changed settings are refused while events are unfinished; retain the original YAML until
events finish. Computer identity, Project name/cwd and root/socket/state location changes
require explicit migration/deployment. Invalid settings leave the active policy and receipts intact.
Repeated starts reuse sessions only after verifying their launch settings and preserve
terminal generations; they do not send business tasks, restart agents or change existing
sessions' model/permission settings. start --dry-run reports configured launch settings,
observed foreground argv and launch status. Herdr's live snapshot determines presence;
stale broker records do not freeze a closed Project role's agent kind. A missing Project
role starts with YAML's kind/launcher/args. Incompatible or unverified live sessions are
preserved and listed in issues, while other missing roles may still start. Partial starts
emit JSON with success: false, exit 1 and skip layout moves; inspect each project's result
before retrying. Preserve listed sessions and arrange explicit handoff/relaunch.
Custom wrappers require this broker's launch receipt for the same settings, terminal and
foreground process; a legacy wrapper without a receipt is unverified. Launch checks do not
prove permissions after interactive changes. Deploy a matching broker if audit support is missing.
Both roles accept an optional launcher executable argv plus args for model/effort/service tier.
An explicitly authorized Codex YOLO launch can use launcher: [codex, --yolo] with
args: [--model, gpt-6.1-sol, -c, model_reasoning_effort=medium, -c, service_tier=fast].
Permissions belong to the configured launcher. New launch settings apply when an agent next
starts. Preserve instructions, dirty worktrees, topic/release gates and existing launchers.