@vultisig/cli 2.19.10 → 2.19.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @vultisig/cli
2
2
 
3
+ ## 2.19.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1034](https://github.com/vultisig/vultisig-sdk/pull/1034) [`6643df7`](https://github.com/vultisig/vultisig-sdk/commit/6643df76cf2ff2ffe08ca4985bcaf46289714e4f) Thanks [@neavra](https://github.com/neavra)! - fix(cli): fail closed on interactive prompts in non-TTY sessions instead of corrupting stdout. A piped/redirected stdout is the machine-output (JSON) channel, but bare `send`/`execute`/`swap`/`tokens --add`/`join`/`rujira swap`/`rujira withdraw` and the password/seedphrase prompts still rendered an inquirer prompt there and then died with a generic `UNKNOWN_ERROR`/exit 7 (or, for `completion --install`, a raw `ERR_USE_AFTER_CLOSE` readline stack trace).
8
+
9
+ The session is now treated as non-interactive whenever stdout OR stdin is not a TTY — mirroring how `--output` already defaults to `json` when stdout isn't a TTY, and closing the fund-safety gap where a piped `y` could otherwise auto-confirm a signing prompt. The fail-closed guard now lives at the shared prompt chokepoint (`src/lib/prompt.ts`), so **every** command that reaches an interactive prompt — including `import`, `export`, `verify`, and `address-book --add`, which previously slipped past the per-command confirm gates — throws a stable `CONFIRMATION_REQUIRED` code (exit 12) with a clear stderr hint _before_ any prompt is drawn (a password prompt points at `--password`/`VAULT_PASSWORD`/keyring; other prompts at the relevant value flags). All interactive prompts (including the create/import/verify/reshare/settings and interactive-shell paths) are routed to stderr so they can never land on the machine-output channel, `completion --install` and `-i` refuse to run without a TTY with a graceful message, and the rujira swap/withdraw flows now unlock the vault only after the confirmation gate. `--yes`/`--confirm`, a supplied `--password`/`VAULT_PASSWORD`/keyring credential, and real interactive TTY use are unchanged.
10
+
11
+ - Updated dependencies [[`4483754`](https://github.com/vultisig/vultisig-sdk/commit/4483754748190fe25654de79fc12fba0edb73963), [`6643df7`](https://github.com/vultisig/vultisig-sdk/commit/6643df76cf2ff2ffe08ca4985bcaf46289714e4f)]:
12
+ - @vultisig/core-chain@2.24.3
13
+ - @vultisig/sdk@2.19.14
14
+
15
+ ## 2.19.11
16
+
17
+ ### Patch Changes
18
+
19
+ - [#1129](https://github.com/vultisig/vultisig-sdk/pull/1129) [`5949742`](https://github.com/vultisig/vultisig-sdk/commit/59497426a238a75576e92d18023747d66c9d4e7a) Thanks [@neavra](https://github.com/neavra)! - fix(portfolio): report per-chain failures instead of silently swallowing them. The `portfolio` command now fetches each chain independently — one unreachable chain no longer fails the whole command, and a fiat-value lookup failure no longer silently drops the value. The `-o json` envelope always carries a `failures: [{ chain, stage, error }]` array (empty on full success), partial failures still exit 0, and an all-chains-failed run exits with a network error (code 3).
20
+
21
+ - Updated dependencies [[`3bf18a1`](https://github.com/vultisig/vultisig-sdk/commit/3bf18a18606fd1b45d50abb562eb6c3011182d48)]:
22
+ - @vultisig/sdk@2.19.11
23
+
3
24
  ## 2.19.10
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -1134,25 +1134,63 @@ Configuration is stored in `~/.vultisig/`:
1134
1134
 
1135
1135
  ## Exit Codes
1136
1136
 
1137
- | Code | Meaning |
1138
- | ---- | ---------------------------------------------------------------------------------- |
1139
- | 0 | Success |
1140
- | 1 | Usage error (bad arguments, unknown command) |
1141
- | 2 | Authentication required |
1142
- | 3 | Network error (retryable) |
1143
- | 4 | Invalid input (bad chain, address, amount) |
1144
- | 5 | Resource not found (token, route) |
1145
- | 6 | External service error (retryable) |
1146
- | 7 | Unknown/unexpected error |
1147
- | 8 | Broadcast succeeded but post-broadcast report failed — hash is valid, do NOT retry |
1148
- | 9 | Duplicate broadcast refused (nothing sent) — retry with --force to override |
1149
- | 10 | agent ask: a fund-safety guardrail blocked the requested action |
1150
- | 11 | agent ask: the model refused or asked a clarifying question (no action taken) |
1137
+ | Code | Meaning |
1138
+ | ---- | ---------------------------------------------------------------------------------------------------------------------- |
1139
+ | 0 | Success |
1140
+ | 1 | Usage error (bad arguments, unknown command) |
1141
+ | 2 | Authentication required |
1142
+ | 3 | Network error (retryable) |
1143
+ | 4 | Invalid input (bad chain, address, amount) |
1144
+ | 5 | Resource not found (token, route) |
1145
+ | 6 | External service error (retryable) |
1146
+ | 7 | Unknown/unexpected error |
1147
+ | 8 | Broadcast succeeded but post-broadcast report failed — hash is valid, do NOT retry |
1148
+ | 9 | Duplicate broadcast refused (nothing sent) — retry with --force to override |
1149
+ | 10 | agent ask: a fund-safety guardrail blocked the requested action |
1150
+ | 11 | agent ask: the model refused or asked a clarifying question (no action taken) |
1151
+ | 12 | Interactive confirmation/input required but the session is non-interactive — pass --yes/--confirm or the required flag |
1151
1152
 
1152
1153
  > These are generated from the `ExitCode` enum in `src/core/errors.ts` (the single source of
1153
1154
  > truth) and are covered by a doc-lint test that fails if this table drifts from the code. Run
1154
1155
  > `vultisig --help` for the same list.
1155
1156
 
1157
+ ### Partial failures (`portfolio`)
1158
+
1159
+ The `portfolio` command fetches every chain independently, so one unreachable chain no longer
1160
+ fails the whole command. The `-o json` envelope always carries a `failures` array (empty when
1161
+ everything succeeded):
1162
+
1163
+ ```jsonc
1164
+ {
1165
+ "success": true,
1166
+ "v": 1,
1167
+ "data": {
1168
+ "portfolio": { "totalValue": { ... }, "chainBalances": [ /* only the chains that loaded */ ] },
1169
+ "currency": "usd",
1170
+ "failures": [
1171
+ { "chain": "Bitcoin", "stage": "balance", "error": "ECONNREFUSED btc-rpc" },
1172
+ { "chain": "Ethereum", "stage": "value", "error": "pricing service unavailable" }
1173
+ ]
1174
+ }
1175
+ }
1176
+ ```
1177
+
1178
+ - `stage: "balance"` — the balance fetch failed; the chain is omitted from `chainBalances`.
1179
+ - `stage: "value"` — the balance loaded but its fiat value did not; the chain still appears in
1180
+ `chainBalances` (without a `value`) and is also listed here.
1181
+ - `error` is a concise single-line message — never a stack trace or filesystem path.
1182
+
1183
+ **Partial-success exit contract:** if _some_ chains loaded, the command exits **0** and reports
1184
+ the rest under `failures`. Machine consumers should branch on `data.failures.length`, not `$?`.
1185
+ If _every_ chain fails to fetch a balance, the command exits **3** (network error, retryable).
1186
+ On the human-readable (table) output, failures are printed as `Warning:` lines below the table.
1187
+
1188
+ > **Note on `totalValue`:** `failures` describes the per-chain _breakdown_ pass (`chainBalances`).
1189
+ > `portfolio.totalValue` is computed by an independent best-effort aggregate that includes token
1190
+ > values (not just native) and silently omits any chain/token it could not price. It is therefore
1191
+ > not guaranteed to be consistent with `chainBalances`/`failures` — treat it as an approximate
1192
+ > total, and rely on `failures` (not the total) to detect which chains had problems.
1193
+
1156
1194
  ## Troubleshooting
1157
1195
 
1158
1196
  ### "No active vault" error