watch : supervision d'un agent avec redemarrage automatique et backoff (issue #35) - check_once testable, notification desktop, Ctrl-C n'affecte pas l'agent detache

This commit is contained in:
2026-08-17 08:58:19 -04:00
parent 18784ba9f7
commit 8d93eece1e
5 changed files with 157 additions and 1 deletions
+20
View File
@@ -312,6 +312,26 @@ pub static HELP_SPECS: &[HelpSpec] = &[
HelpExample { desc: "Open the install directory.", code: "open claude-code" },
],
},
HelpSpec {
name: "watch",
category: "Commands",
usage: "watch {flags} <agent>",
about: "Supervise an agent and optionally restart it on crash.",
search_terms: &["monitor", "supervise", "restart"],
flags: &[
HelpFlag { short: "", long: "--restart", value: "", desc: "Restart the agent automatically when it dies (with backoff)" },
HelpFlag { short: "", long: "--notify", value: "", desc: "Desktop notification on every restart" },
HelpFlag { short: "", long: "--interval", value: "SECS", desc: "Check interval in seconds (default: 5)" },
],
subcommands: &[],
parameters: &[
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
],
io: None,
examples: &[
HelpExample { desc: "Supervise with auto-restart.", code: "watch claude-code --restart --notify" },
],
},
HelpSpec {
name: "alias",
category: "Commands",