Skip to main content

Module wire

Module wire 

Source
Expand description

§7 plugin wire payloads — what balls hands a plugin on stdin.

Plugins get meaning directly on the wire — content + intent, not hashes to reverse-engineer. There is no return channel (§7): a plugin contributes by editing the change worktree, never by printing values back; its stdout is diagnostics. So these types are output only — balls serializes them with serde_json and never deserializes a payload (a plugin self-describe is the one thing read back, and that lives in crate::plugin).

One OpContext holds everything that does not change between a plugin’s pre and post invocation (the verb layer, bl-dfbd, computes it). A phase plus the optional post-seal SealFacts pick the rest: pre, post, and rollback payloads differ only in which fields are present, so a single Payload with serde skipping the Nones is the whole shape (§7 “post payload: same plus …”).

Structs§

Binding
§7 binding — where the op is happening. store/landing are the two checkout paths (§1 — the tasks_branch store and the balls/config landing); tasks_branch names the store branch (§4); invocation_path is where bl was invoked (the project-repo root the delivery plugin needs, §11). remote is absent in a no-remote (stealth) repo. stealth is the §12 DECLARED consent opt-out — derived per op from the landing task_remote sentinel (bl-9df0), riding the wire so the tracker takes its stealth path even where a project origin is discoverable; false (the ordinary tracked or inferred case) is never serialized, so every existing payload shape is unchanged.
Command
§7 command — the op plus its intended body. body_change is the new markdown body when the op rewrites it. There is no field-level changeset on the wire: the op’s field diff has one authoritative home — the change worktree plus the op-start state to diff against (§14 derive-don’t-store; bl-3bfd, §15).
OpContext
The op-constant §7 wire data: everything identical across a plugin’s pre and post calls. The verb layer authors it once per op; OpContext::wire stamps a per-phase Payload from it.
Payload
One fully-assembled §7 payload, serialized to a plugin’s stdin. Built by OpContext::wire; serde omits every None, so the same struct renders the pre shape (states only), the post shape (+ commits, + metadata on a sealing op, commits-only on a diffless one — §13), and a rollback shape (+ rolling_back).
SealFacts
Post facts threaded onto a post/rollback payload: the new commit, the tip it landed on, and the §5 trailers parsed from the seal message (incl. the now-assigned bl-id). None of these is on a pre payload — the id is not sealed yet (§7). metadata is None on a diffless op (§13): sync/prime author no §5 message, so the wire carries the commit pair alone.