@vultisig/cli 2.14.0 → 2.16.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/index.js +2740 -1769
  3. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # @vultisig/cli
2
2
 
3
+ ## 2.16.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0147158`](https://github.com/vultisig/vultisig-sdk/commit/0147158ac6955aa420cdad2da704cba998e4a5f1)]:
8
+ - @vultisig/sdk@2.16.0
9
+ - @vultisig/rujira@49.0.0
10
+
11
+ ## 2.15.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#952](https://github.com/vultisig/vultisig-sdk/pull/952) [`4c31be8`](https://github.com/vultisig/vultisig-sdk/commit/4c31be8f66f40bff4c544aecf635c36d417930d8) Thanks [@neavra](https://github.com/neavra)! - Make the `agent ask` process truthful and idempotent around broadcast (fund-safety, audit F1/F3/F14).
16
+
17
+ - **Broadcast-before-ack truthfulness (F1):** a throw AFTER a tx broadcast (the follow-up `recent_actions` report failing) now exits with a distinct `ACK_FAILED` code (8) instead of a generic error — the emitted tx hash is valid and carried in the envelope, so a headless caller knows NOT to blindly retry (which would double-spend).
18
+ - **Persistent broadcast journal (F1/F14):** every broadcast is recorded to `~/.vultisig/broadcasts.jsonl` (intent fingerprint, hash, chain, ts). If an identical intent was broadcast in the last 10 minutes and hasn't definitively failed, signing is refused (exit 9, `DUPLICATE_BROADCAST`) to prevent a double-broadcast on a retry in a fresh process. Multi-leg approve legs are journaled too. Pass `--force` to override.
19
+ - **Exit-code taxonomy (F3):** SSE/backend `error` frames and thrown errors now map onto the typed `ExitCode` taxonomy (network/auth/invalid-input/…) instead of a blanket `0`/`1`, and the codes are documented in `agent ask --help`.
20
+
21
+ ### Patch Changes
22
+
23
+ - [#952](https://github.com/vultisig/vultisig-sdk/pull/952) [`db9bb38`](https://github.com/vultisig/vultisig-sdk/commit/db9bb38691dac0e5ff63e02b3d357cde83606f64) Thanks [@neavra](https://github.com/neavra)! - Harden the `agent ask` broadcast dedupe guard per PR review (fund-safety, audit F1/F3/F14):
24
+
25
+ - **Cross-process TOCTOU:** an atomic reservation (exclusive-create lock keyed by the broadcast fingerprint) is now taken BEFORE signing, so two sibling processes can't both pass the duplicate check and both broadcast. The loser refuses with `DUPLICATE_BROADCAST`; a stale reservation (crashed owner) is stolen after a TTL so retries aren't wedged.
26
+ - **ACK_FAILED no longer masks retryable errors:** exit 8 is now gated on an actual still-unacknowledged broadcast (a broadcast whose follow-up report was undelivered when the turn threw), not merely "some non-failed tx exists". A later independent retryable error after an already-acked broadcast keeps its retryable classification.
27
+ - **Dedicated exit code for `DUPLICATE_BROADCAST` (9):** no longer shares 4 with generic invalid input, so `$?` alone can branch the fund-safety refusal. Documented in the CLI exit-code taxonomy and `agent ask --help`; the JSON error `code` is unchanged.
28
+ - **Journal growth bounded:** `broadcasts.jsonl` is pruned on write (size-gated compaction dropping records strictly outside the dedupe window), so a later sign no longer parses an ever-growing file.
29
+
30
+ - [#927](https://github.com/vultisig/vultisig-sdk/pull/927) [`576d7c4`](https://github.com/vultisig/vultisig-sdk/commit/576d7c49439b767ef424d64133d1426751b22180) Thanks [@neavra](https://github.com/neavra)! - feat(cli): read signable tool outputs off `tool-output-available` with a tx_ready parity cross-check
31
+
32
+ Generalizes the Polymarket flat-tx-builder bridge into a client-side tool-output
33
+ signing + parity layer, the same mechanism the mobile app uses: the CLI derives
34
+ a signable candidate from the raw `tool-output-available` envelope (client-side
35
+ enrichment — a 1:1 port of the backend's `enrichBuildResult` flat→nested wrap
36
+ plus the approve→main split), and cross-checks it against the backend `tx_ready`.
37
+
38
+ - The backend `tx_ready` stays authoritative for signing whenever it is signable
39
+ (unchanged behavior). The client-side candidate is the parity reference, and
40
+ the sign source only when no usable `tx_ready` arrives — flat off-chain tools
41
+ that emit no `tx_ready` (`polymarket_deposit`, `polymarket_setup_trading`), and
42
+ flat tools whose `tx_ready` is structurally unsignable (`build_custom_*`, which
43
+ use divergent `to_address`/`calldata` field names normalized client-side).
44
+ - Parity cross-check: when both channels produce a payload for a turn, their
45
+ `{to, value, data, chain, chain_id, tx_encoding, amount, memo}` leg tuples are
46
+ compared and any divergence is logged loudly (`[parity][DIVERGENCE] …`).
47
+ - Guards every non-transaction result (`no_op`, `insufficient_*`, errors,
48
+ missing/disagreeing chain) so only a real tx is ever signed; the chain guard is
49
+ generalized past Polygon to any supported EVM chain (fail-closed on a
50
+ missing/inconsistent chain — never defaults to a chain).
51
+ - Maps a bundled approve→main envelope onto the executor's existing two-leg
52
+ machinery so the approve is confirmed (receipt-wait) before the main tx.
53
+ - First-wins per turn: a second signable frame can never silently overwrite the
54
+ first; the deferral is reported.
55
+ - Fail-closed on parity divergence: a flat tool-output candidate is enqueued as a
56
+ sign source only when there is no `tx_ready` at all, or when the same-turn
57
+ `tx_ready` matched parity. A client-derived candidate that is not proven equal to
58
+ a present `tx_ready` (diverged, or unpaired) is never signed — the turn falls
59
+ closed to the `tx_ready` path (a hard error at sign time) instead of signing the
60
+ client-enriched bytes.
61
+ - Parity pairing (telemetry only): the two channels are diffed only when they are
62
+ the SAME tool call (paired by tool-call id — the `tx_ready` inherits the id of
63
+ its wire-adjacent tool-output twin), so an unrelated same-turn `tool_output` +
64
+ `tx_ready` pair no longer emits a false `[DIVERGENCE]`. This pairing affects only
65
+ the divergence log; the sign decision above is deliberately independent of it, so
66
+ the fund-safety guarantee rests on parity equality alone, not on the wire-ordering
67
+ invariant.
68
+
69
+ Zero agent-backend / mcp-ts change; entirely within `clients/cli`.
70
+
71
+ - Updated dependencies [[`f72cbc3`](https://github.com/vultisig/vultisig-sdk/commit/f72cbc35a23edb2b14984fce0a16495a3339e5e6), [`119d96d`](https://github.com/vultisig/vultisig-sdk/commit/119d96d5b2c9e1e2d8b322bf31d83f3ac4294244)]:
72
+ - @vultisig/core-chain@2.23.1
73
+ - @vultisig/sdk@2.15.0
74
+ - @vultisig/rujira@48.0.0
75
+
3
76
  ## 2.14.0
4
77
 
5
78
  ### Patch Changes