@brew.new/cli 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/bin.js +989 -341
- package/dist/bin.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -67,7 +67,24 @@ Designed for AI agents as first-class users:
|
|
|
67
67
|
stderr with stable `code`s, the `x-request-id`, and `details` when
|
|
68
68
|
the API names the offending fields (a trigger fire's `400 INVALID_PAYLOAD`).
|
|
69
69
|
- **Semantic exit codes** — `0` ok · `1` API/runtime · `2` usage ·
|
|
70
|
-
`3` auth · `4` confirmation required
|
|
70
|
+
`3` auth · `4` confirmation required · `130` interrupted (SIGINT) ·
|
|
71
|
+
`143` terminated (SIGTERM). After printing its envelope an interrupted
|
|
72
|
+
CLI re-raises the signal, so a shell loop around it stops too.
|
|
73
|
+
- **Every request is bounded** — the deadline covers the response body,
|
|
74
|
+
not only the headers. `--timeout <duration>` (`90s`, `1500ms`, `5m`)
|
|
75
|
+
caps the whole command, retries and `--all` pages included; long-running
|
|
76
|
+
commands (`emails generate`, `content gif`, …) default to the SDK's own
|
|
77
|
+
per-call budget. `--max-retries <n>` tunes the retry loop. Ctrl-C stops
|
|
78
|
+
a request wherever it is.
|
|
79
|
+
- **Replay, don't repeat** — the API keeps working after the CLI
|
|
80
|
+
disconnects, so a write that timed out, lost its connection or was
|
|
81
|
+
interrupted may still complete. Its envelope carries the
|
|
82
|
+
`idempotencyKey` it was sent with and a `retryCommand` that replays it
|
|
83
|
+
(the first attempt's result, not a second write) instead of running it
|
|
84
|
+
twice. The replay needs the API's idempotency store: while it is
|
|
85
|
+
degraded, writes other than sends run without it, so for a write that
|
|
86
|
+
must not happen twice (creating a brand, say) pass `--max-retries 0` and
|
|
87
|
+
check whether it landed before you re-run it.
|
|
71
88
|
- **Confirmation protocol** — irreversible commands (sends, deletes,
|
|
72
89
|
trigger fires) never hang waiting for input: non-interactive callers
|
|
73
90
|
get exit `4` plus a JSON envelope containing a ready-to-run
|