cli: make bundled help self-describing

This commit is contained in:
2026-03-22 23:37:38 +08:00
parent 5859ff219e
commit 4d8c90eb26
49 changed files with 792 additions and 29 deletions
@@ -22,6 +22,14 @@ func newClaimCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "claim",
Short: "Acquire a lease on a pending thread",
Long: helpLong(
"Use claim to acquire the active worker lease for one thread.",
"claim is the step that turns a candidate thread into owned work.",
"After claim, the worker should inspect the thread, send an in_progress update when real work starts, and finish with done or fail.",
"Only one active lease may exist per thread at a time.",
),
Example: ` inbox --db .agents/coord.db claim --agent worker-a --thread thr_123
inbox --db .agents/coord.db claim --agent worker-a --thread thr_123 --lease-seconds 1800`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()