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
@@ -23,6 +23,14 @@ func newFetchCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "fetch",
Short: "List candidate threads for an agent",
Long: helpLong(
"Use fetch to discover threads that are candidates for one agent to claim.",
"fetch does not grant ownership; it is only the discovery step before claim.",
"The normal worker loop is fetch -> claim -> show -> update/done/fail.",
"Use --unread when you only want threads whose latest message has not been consumed by that agent.",
),
Example: ` inbox --db .agents/coord.db fetch --agent worker-a --status pending
inbox --db .agents/coord.db fetch --agent worker-a --status pending,blocked --unread --limit 5`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()