1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: MIT
//! Deterministic exit-code taxonomy — stable contract for agent orchestrators.
//!
//! Orchestrators (systemd timers, CI runners, other agents) branch on exit
//! code alone: `0` = go, `4` = sleep and retry, `3`/`7` = fix config. Changing
//! a code is a breaking change, so the numeric values are pinned and the
//! mapping from [`crate::cmd::CmdError`] is exercised by tests.
//!
//! Mirrors the plan's taxonomy:
//!
//! | Code | Class |
//! |------|---------------------------------------------|
//! | 0 | success |
//! | 2 | usage / argument error (clap emits this) |
//! | 3 | auth (401/403) |
//! | 4 | rate-limited (429) |
//! | 5 | wallet / chain / signing |
//! | 6 | server (5xx after retries) / network |
//! | 7 | validation (422, 4xx other) |
//! | 70 | unimplemented (transitional, scaffold-only) |