Documentation
¶
Overview ¶
Package uxprint is the single source of truth for one-line success signatures emitted by bones state-mutating CLI verbs.
Issue #323 establishes a CLI-wide convention: every state-mutating verb prints a one-line success signature ("verb shortID key=value pairs") on the human stdout path unless --quiet is passed. Read verbs stay silent on success, but emit a filter-emptiness hint when the user's filter hid existing rows. The helpers in this package pin the wording so the convention can not drift verb-by-verb.
Helpers are intentionally plain io.Writer + string wrappers around fmt.Fprintf — not rich types over Task / Edge / Slot structs. The per-verb call site decides what to pass; the helper only fixes the format. ADR 0053's --json output paths bypass uxprint entirely (the envelope wraps the typed payload; uxprint is human stdout only).
Index ¶
- func Claimed(w io.Writer, shortID, agentShort string)
- func Closed(w io.Writer, shortID string)
- func Created(w io.Writer, shortID, title string)
- func Linked(w io.Writer, fromShort, toShort, edgeType string)
- func NoOpenTasks(w io.Writer, closedCount int)
- func NoPeersOnline(w io.Writer, stalePresences int)
- func NoReadyTasks(w io.Writer, openCount int)
- func NoRecentActivity(w io.Writer, sinceDuration string)
- func SlotChanged(w io.Writer, shortID, to string)
- func SlotReleased(w io.Writer, slot, shortID string)
- func Summary(w io.Writer, n int, noun, verb string)
- func Unclaimed(w io.Writer, shortID, reason string)
- func Up(w io.Writer, workspace string, actionCount int)
- func Updated(w io.Writer, shortID string, fields map[string]any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Closed ¶
Closed prints the one-line "closed" signature.
closed <shortID>
Reason is intentionally NOT in the default signature — the majority of closes carry no reason. Callers needing a richer breakdown should compose their own line; the convention's job here is the minimum readable signal.
func Created ¶
Created prints the one-line "created" signature.
created <shortID> "<title>"
shortID is the human-mode 8-char id; title is quoted with %q so embedded spaces and quotes round-trip safely.
func Linked ¶
Linked prints the one-line "linked" signature for `tasks link`.
linked <fromShort> → <toShort> (<edgeType>)
func NoOpenTasks ¶
NoOpenTasks prints the filter-emptiness hint emitted by `tasks list` (and read verbs that gate on open/closed) when the filter hid existing closed rows.
(no open tasks; <n> closed — pass --all to include)
Caller must only invoke this when (closedCount > 0). When the underlying set is genuinely empty, the verb stays silent — the hint exists to disambiguate "your filter hid these" from "there is nothing here", not to add chatter.
func NoPeersOnline ¶
NoPeersOnline prints the filter-emptiness hint for swarm/peers listings when the filter hid stale presences.
(no peers online; <n> stale presences shown — pass --all to include)
func NoReadyTasks ¶
NoReadyTasks prints the filter-emptiness hint for `tasks ready` when the readiness gate or slot/mine filter hid existing rows.
(no ready tasks matching filter; <n> open tasks total — broaden filter)
func NoRecentActivity ¶
NoRecentActivity prints the filter-emptiness hint for activity windows when the --since cutoff hid older rows.
(no recent activity in last <since>; older history available with --since=)
func SlotChanged ¶
SlotChanged prints the one-line "slot" signature, used by any verb that changes a task's slot annotation.
slot <shortID> to=<slotName>
func SlotReleased ¶
SlotReleased prints the one-line "released" signature emitted by the `tasks close --auto-release` path when the swarm slot bound to the closed task is released as part of the same operation.
released <slot> was=<shortID>
Shape mirrors Claimed's `by=<agent>` key=value tail so the convention's "verb first, then key=value pairs" pattern stays consistent across helpers. The slot name takes the verb-column because the slot is the entity being released; the released-from task short id is the attribution attached to it.
func Summary ¶
Summary prints the one-line "<n> <noun> <verb>" tail used by multi-target mutating verbs. Pluralization is the caller's job — "task" vs "tasks" is supplied via the noun argument.
2 tasks created 1 wave advanced
func Unclaimed ¶
Unclaimed prints the one-line "unclaimed" signature, used when a task transitions out of the claimed state (auto-release, manual unclaim).
unclaimed <shortID> reason="<reason>"
func Up ¶
Up prints the one-line success signature for `bones up` (issue #314 / convention #323). Workspace is the (possibly home-shortened) workspace path; actionCount is the number of structured per-action lines emitted before this signature.
up <workspace> actions=<n>
The verb column matches the eight-char width used by the other helpers so a `bones tasks watch`-style scan reads aligned. Workspace is rendered as a bare token (no %q) — it's a path, not a title.
func Updated ¶
Updated prints the one-line "updated" signature, listing the fields that changed as `key=value` pairs in stable (sorted) order.
updated <shortID> title="X" slot=beta status=closed
Values are quoted with %q when they contain whitespace or special characters; everything else is rendered bare so machine-friendly values (uuid, status enum) read cleanly.
Types ¶
This section is empty.