Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ clap_complete = "=4.6.11"
serde = { version = "=1.0.229", features = ["derive"] }
serde_json = { version = "=1.0.151", features = ["arbitrary_precision"] }
toml = "=1.1.6"
tokio = { version = "=1.53.1", features = ["macros", "rt-multi-thread", "time", "signal"] }
tokio = { version = "=1.53.1", features = ["macros", "rt-multi-thread", "time", "signal", "sync"] }
reqwest = { version = "=0.13.5", default-features = false, features = ["rustls-no-provider", "json", "form", "query", "stream"] }
# The TLS provider is ring, installed at startup; aws-lc-rs would need a C toolchain on every platform.
rustls = { version = "=0.23.45", default-features = false, features = ["ring", "std", "tls12"] }
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ voltage payments get PAYMENT_ID --profile prod --wait completed --timeout 120

For a BOLT11 receive, `--qr` prints the invoice as a terminal QR code and `--copy` puts it on the clipboard as soon as it is ready. Either flag implies `--wait ready`; with `--wait completed` the invoice is shown first and polling continues to settlement.

Sends, treasury movements, deletes, webhook key rotation, and disabling a credit line ask for confirmation after printing the resolved scope and request to stderr. Non-interactive use needs `--yes`.
Sends, treasury movements, deletes, webhook key rotation, and disabling a credit line ask for confirmation after printing the resolved scope and request to stderr. Non-interactive use needs `--yes`. `--no-input` forbids prompts even on a terminal: use `--yes --no-input` to approve a consequential action, and supply credentials via environment, private file, or `--stdin` (for `auth import-key`). `--yes` never supplies a secret.

Payments and treasury movements carry an ID, generated for you unless you pass `--id`. Before sending, the CLI records the ID, operation, scope, and request hash (never the body) in a private journal under `requests/`, and it refuses to reuse an ID with a different request. If the connection drops after a submission, the CLI makes one short read of the ID: if the payment is visible, it reports acceptance; otherwise it exits with code 4 and the ID, without resubmitting. Check the ID before deciding to retry. Ctrl-C exits with code 130 and never cancels a submitted payment.
Payments and treasury movements carry an ID, generated for you unless you pass `--id`. Before sending, the CLI records the ID, operation, scope, and request hash (never the body) in a private journal under `requests/`, and it refuses to reuse an ID with a different request. If the connection drops after a submission, the CLI makes one short read of the ID: if the payment is visible, it reports acceptance; otherwise it exits with code 4 and the ID, without resubmitting. Check the ID before deciding to retry. Ctrl-C exits with code 130, including at a confirmation prompt: before a write is sent it reports that no resource change was submitted, or, if a login was being refreshed, created, or logged out, how to recover it; once a write may have been sent it reports the outcome as unknown, with the original ID and reconciliation instructions for a payment. It never cancels a submitted request.

## Output

Expand All @@ -182,7 +182,7 @@ On a terminal, results are readable tables; when piped, they are JSON. `--json`
{"http_status":202,"data":null,"resource_id":"PAYMENT_ID","outcome":"accepted"}
```

API fields stay inside `data`. With `--all`, JSON output collects the pages into `data.pages`, and NDJSON writes one envelope per page as it arrives. Diagnostics, prompts, and progress go to stderr. Human errors start with `error:` and may include a safe `hint:`; `--json` makes command-line parse errors machine-readable as well as runtime errors. A downstream consumer that closes stdout early is treated as successful pipeline completion.
API fields stay inside `data`. With `--all`, JSON output collects the pages into `data.pages`, and NDJSON writes one envelope per page as it arrives. Diagnostics, prompts, and progress go to stderr. Interactive stderr shows immediate, cancellable status for network requests and waits; redirected stderr gets no spinner/control codes. `-q, --quiet` suppresses optional status and notices, never requested results, errors, confirmation details, warnings, or recovery IDs. Human errors start with `error:` and may include a safe `hint:`; `--json` makes command-line parse errors machine-readable as well as runtime errors. A downstream consumer that closes stdout early is treated as successful pipeline completion.

Known secret fields and the credentials the CLI presented are redacted from normal output and from error details. Operations that return a one-time secret (webhook creation and key rotation, checkout sessions, stream tokens) refuse to run unless you pass `--output-file PATH`, which writes the complete response to a new owner-only file, or `--show-secrets`. Treat your own metadata as potentially sensitive; redaction cannot recognise it.

Expand Down
4 changes: 4 additions & 0 deletions docs/quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ an existing simpler pattern cannot satisfy it.
- `check_owner` in `config.rs` calls `libc::geteuid` in an `unsafe` block
because std has no safe effective-UID accessor; the block is one call with a
`SAFETY:` comment.
- `TerminalModes` in `terminal.rs` calls `libc::tcgetattr` and `libc::tcsetattr`
in `unsafe` blocks because std cannot save or restore terminal attributes. It
restores echo when Ctrl-C cancels a hidden prompt whose read cannot return;
each block is one call with a `SAFETY:` comment.
- `config`, `registry`, and `secret` are public modules. The integration
suite seeds saved credentials through the real persistence boundary and
walks the operation contract to exercise every route; no other item is
Expand Down
Loading
Loading