cli: make bundled help self-describing
This commit is contained in:
@@ -14,8 +14,22 @@ func NewRootCmd() *cobra.Command {
|
||||
opts := &rootOptions{}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "inbox",
|
||||
Short: "Worker-facing durable coordination bus",
|
||||
Use: "inbox",
|
||||
Short: "Worker-facing durable coordination bus",
|
||||
Long: helpLong(
|
||||
"Use inbox to coordinate durable worker-side execution through SQLite-backed threads, messages, leases, and artifacts.",
|
||||
"Workers should use inbox directly to fetch or inspect one assigned thread, claim it, report progress, ask blocked questions, wait for answers, and finish with done or fail.",
|
||||
"Leaders usually use orch for planning and dispatch, then use inbox mainly for inspection or manual repair.",
|
||||
"fetch does not grant ownership; claim is the step that acquires the active lease.",
|
||||
),
|
||||
Example: ` inbox --db .agents/coord.db init
|
||||
inbox --db .agents/coord.db fetch --agent worker-a --status pending
|
||||
inbox --db .agents/coord.db claim --agent worker-a --thread thr_123
|
||||
inbox --db .agents/coord.db show --thread thr_123
|
||||
inbox --db .agents/coord.db update --agent worker-a --thread thr_123 --status in_progress --summary "Started work"
|
||||
inbox --db .agents/coord.db update --agent worker-a --thread thr_123 --status blocked --summary "Need API decision" --payload-json '{"question":"Use v1 or v2?"}'
|
||||
inbox --db .agents/coord.db wait-reply --thread thr_123 --after-event 10
|
||||
inbox --db .agents/coord.db done --agent worker-a --thread thr_123 --summary "Finished"`,
|
||||
SilenceErrors: true,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user