@vultisig/cli 0.15.2 → 0.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.
- package/CHANGELOG.md +55 -0
- package/README.md +34 -6
- package/dist/index.js +1527 -649
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @vultisig/cli
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#204](https://github.com/vultisig/vultisig-sdk/pull/204) [`0388700`](https://github.com/vultisig/vultisig-sdk/commit/03887009b7579fc0b193d068d4a205cdd3b7c214) Thanks [@premiumjibles](https://github.com/premiumjibles)! - feat(cli): agent-friendly CLI + new @vultisig/mcp package
|
|
8
|
+
|
|
9
|
+
## @vultisig/cli
|
|
10
|
+
- Auto-TTY JSON output (`--output`, `--ci`, `--quiet`, `--fields`, `--non-interactive`)
|
|
11
|
+
- Versioned `{ success, v: 1, data }` envelope and typed error envelope with exit codes 0-7
|
|
12
|
+
- Safety: fixed `swap`/`send`/`execute`/`rujira swap`/`rujira withdraw` auto-executing in JSON mode; `--yes` now required uniformly
|
|
13
|
+
- `--dry-run` coverage across all mutating commands
|
|
14
|
+
- `vsig schema` machine-readable command introspection
|
|
15
|
+
- Auth: replaced `keytar` with `@napi-rs/keyring`, encrypted-file fallback for headless environments (AES-256-GCM + async scrypt)
|
|
16
|
+
|
|
17
|
+
## @vultisig/client-shared (new package)
|
|
18
|
+
|
|
19
|
+
Shared client infrastructure for `@vultisig/cli` and `@vultisig/mcp`: auth setup, config store, credential store (keyring + file fallback), tool descriptions, vault discovery.
|
|
20
|
+
|
|
21
|
+
## @vultisig/sdk
|
|
22
|
+
- `VaultBase.send()` and `VaultBase.swap()` accept `amount: 'max'`
|
|
23
|
+
- `SwapService` rejects quotes with near-zero output to guard against bad provider routes
|
|
24
|
+
- `FiatValueService.fetchTokenPrice` returns `0` for non-EVM chains instead of throwing (effective behavior identical — `getPortfolioValue` already caught the throw)
|
|
25
|
+
- `ServerManager`: removed stdout `console.log` calls that corrupted JSON output; raised `waitForPeers` timeout from 30s to 120s and tightened poll interval from 2s to 500ms
|
|
26
|
+
|
|
27
|
+
## @vultisig/core-chain
|
|
28
|
+
- Narrowed EVM broadcast retry list to strings that genuinely indicate "same tx already in mempool under this hash" (`already known`, `transaction already exists`, `tx already in mempool`). Dropped strings that can silently swallow real broadcast failures (`nonce too low`, `transaction is temporarily banned`, `future transaction tries to replace pending`, `could not replace existing tx`)
|
|
29
|
+
|
|
30
|
+
## @vultisig/core-mpc
|
|
31
|
+
- `maxInboundWaitTime` raised from 1 to 3 minutes for flaky networks
|
|
32
|
+
- Added 100ms sleep in `processInbound` recursion to prevent hot-looping on empty inbound
|
|
33
|
+
- Setup message polling: same 10-second budget, polls 5× more often (50 × 200ms vs 10 × 1000ms)
|
|
34
|
+
|
|
35
|
+
- [#290](https://github.com/vultisig/vultisig-sdk/pull/290) [`83fe4c3`](https://github.com/vultisig/vultisig-sdk/commit/83fe4c3c58637aea4823d0eaa7f21d4c5cdf3dc7) Thanks [@rcoderdev](https://github.com/rcoderdev)! - Add `@vultisig/sdk/vite` helper plugin so Vite consumers exclude wasm glue packages from `optimizeDeps`, and harden dist ESM relative import rewriting with tests.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [[`0388700`](https://github.com/vultisig/vultisig-sdk/commit/03887009b7579fc0b193d068d4a205cdd3b7c214), [`83fe4c3`](https://github.com/vultisig/vultisig-sdk/commit/83fe4c3c58637aea4823d0eaa7f21d4c5cdf3dc7)]:
|
|
40
|
+
- @vultisig/client-shared@0.2.0
|
|
41
|
+
- @vultisig/sdk@0.16.0
|
|
42
|
+
- @vultisig/rujira@11.0.0
|
|
43
|
+
|
|
44
|
+
## 0.15.4
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- [#276](https://github.com/vultisig/vultisig-sdk/pull/276) [`59382c1`](https://github.com/vultisig/vultisig-sdk/commit/59382c1859512fbd362962ede5e92b100d3a5921) Thanks [@rcoderdev](https://github.com/rcoderdev)! - feat(cli): structured machine-readable errors for agent ask, pipe, and executor
|
|
49
|
+
- `agent ask --json` failures include stable `code` with existing `error` string
|
|
50
|
+
- NDJSON pipe `error` events and failed `tool_result` lines include `code`
|
|
51
|
+
- executor `ActionResult` failures carry `AgentErrorCode`; SSE errors accept optional backend `code`
|
|
52
|
+
- document error codes in CLI README
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [[`59382c1`](https://github.com/vultisig/vultisig-sdk/commit/59382c1859512fbd362962ede5e92b100d3a5921)]:
|
|
55
|
+
- @vultisig/sdk@0.15.4
|
|
56
|
+
- @vultisig/rujira@10.0.0
|
|
57
|
+
|
|
3
58
|
## 0.15.2
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -658,7 +658,7 @@ explorer:https://etherscan.io/tx/0x9f8e7d6c...
|
|
|
658
658
|
"session_id": "abc123-def456",
|
|
659
659
|
"response": "Your ETH balance is 1.5 ETH ($3,750.00 USD).",
|
|
660
660
|
"tool_calls": [
|
|
661
|
-
{ "action": "
|
|
661
|
+
{ "action": "get_balances", "success": true, "data": { "balances": [{ "chain": "Ethereum", "symbol": "ETH", "amount": "1.5", "decimals": 18, "raw_amount": "1500000000000000000" }] } }
|
|
662
662
|
],
|
|
663
663
|
"transactions": [
|
|
664
664
|
{ "hash": "0x9f8e7d6c...", "chain": "ethereum", "explorerUrl": "https://etherscan.io/tx/0x9f8e7d6c..." }
|
|
@@ -666,6 +666,36 @@ explorer:https://etherscan.io/tx/0x9f8e7d6c...
|
|
|
666
666
|
}
|
|
667
667
|
```
|
|
668
668
|
|
|
669
|
+
On failure, stdout is a single JSON object with both a human `error` string and a stable `code` (the `error` field is unchanged for older parsers):
|
|
670
|
+
|
|
671
|
+
```json
|
|
672
|
+
{ "error": "Agent backend unreachable at https://example.invalid", "code": "BACKEND_UNREACHABLE" }
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
Each entry in `tool_calls` may include `code` when `success` is false (same values as below).
|
|
676
|
+
|
|
677
|
+
##### Error codes (`agent ask --json`, `--via-agent`, executor)
|
|
678
|
+
|
|
679
|
+
Orchestrators should branch on `code`. The message in `error` / `message` stays human-readable and may change between releases.
|
|
680
|
+
|
|
681
|
+
| Code | Typical meaning |
|
|
682
|
+
|------|-----------------|
|
|
683
|
+
| `BACKEND_UNREACHABLE` | Agent health check failed or backend not responding |
|
|
684
|
+
| `AUTH_FAILED` | Auth/token failure, HTTP 401/403, or wrong vault password |
|
|
685
|
+
| `VAULT_LOCKED` | Encrypted vault needs unlock (password) |
|
|
686
|
+
| `PASSWORD_REQUIRED` | Password was not supplied when required (e.g. pipe mode or signing) |
|
|
687
|
+
| `CONFIRMATION_REQUIRED` | User confirmation needed (pipe mode; message prefix `CONFIRMATION_REQUIRED:`) |
|
|
688
|
+
| `ACTION_NOT_IMPLEMENTED` | Local executor does not implement this action type |
|
|
689
|
+
| `INVALID_INPUT` | Bad parameters, unknown chain, malformed NDJSON input, etc. |
|
|
690
|
+
| `NETWORK_ERROR` | RPC/fetch connectivity (includes many SDK `VaultError` network cases) |
|
|
691
|
+
| `TIMEOUT` | Deadline exceeded, or abort where the message indicates a timeout |
|
|
692
|
+
| `TRANSACTION_FAILED` | Build/broadcast/gas errors mapped from the SDK |
|
|
693
|
+
| `SIGNING_FAILED` | MPC/signing failed |
|
|
694
|
+
| `SESSION_NOT_INITIALIZED` | Internal session state error |
|
|
695
|
+
| `UNKNOWN_ERROR` | Unclassified failure (default for opaque SSE `error` events). Plain `AbortError` without “timeout” in the message maps here. |
|
|
696
|
+
|
|
697
|
+
SSE `error` events may optionally include a `code` field from the backend; if it matches one of the values above, it is passed through unchanged. Otherwise the CLI infers a code from the message.
|
|
698
|
+
|
|
669
699
|
**Agent ask options:**
|
|
670
700
|
- `--session <id>` - Continue an existing conversation
|
|
671
701
|
- `--backend-url <url>` - Agent backend URL (default: https://abe.vultisig.com)
|
|
@@ -712,15 +742,13 @@ The pipe interface uses NDJSON (one JSON object per line) on stdin/stdout. Desig
|
|
|
712
742
|
| `ready` | `vault, addresses` | Session initialized, addresses for all chains |
|
|
713
743
|
| `session` | `id` | Conversation ID for resuming later |
|
|
714
744
|
| `history` | `messages[]` | Previous messages when resuming a session |
|
|
715
|
-
| `auth` | `status, error?` | Authentication result (`authenticated` or `failed`) |
|
|
716
|
-
| `conversation` | `id` | Conversation created or resumed |
|
|
717
745
|
| `text_delta` | `delta` | Streaming text chunk from the agent |
|
|
718
746
|
| `tool_call` | `id, action, params?, status` | Action started (`running`) |
|
|
719
|
-
| `tool_result` | `id, action, success, data?, error?` | Action completed |
|
|
747
|
+
| `tool_result` | `id, action, success, data?, error?, code?` | Action completed (`code` when `success` is false) |
|
|
720
748
|
| `tx_status` | `tx_hash, chain, status, explorer_url?` | Transaction broadcast/confirmed/failed |
|
|
721
749
|
| `assistant` | `content` | Full assistant response |
|
|
722
750
|
| `suggestions` | `suggestions[]` | Suggested follow-up actions |
|
|
723
|
-
| `error` | `message` | Error (
|
|
751
|
+
| `error` | `message, code` | Error or control signal (`PASSWORD_REQUIRED`, `CONFIRMATION_REQUIRED: …`; always includes stable `code`) |
|
|
724
752
|
| `done` | `{}` | Response cycle complete |
|
|
725
753
|
|
|
726
754
|
**Example session:**
|
|
@@ -740,7 +768,7 @@ echo '{"type":"message","content":"What is my ETH balance?"}' | vultisig agent -
|
|
|
740
768
|
{"type":"done"}
|
|
741
769
|
```
|
|
742
770
|
|
|
743
|
-
When the agent needs a password mid-session (e.g. for signing), it emits `{"type":"error","message":"PASSWORD_REQUIRED"}`. Respond with `{"type":"password","password":"..."}` on stdin.
|
|
771
|
+
When the agent needs a password mid-session (e.g. for signing), it emits `{"type":"error","message":"PASSWORD_REQUIRED","code":"PASSWORD_REQUIRED"}`. Respond with `{"type":"password","password":"..."}` on stdin.
|
|
744
772
|
|
|
745
773
|
#### Session Management
|
|
746
774
|
|