@codespar/cli 0.6.0 → 0.6.1
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/dist/commands/wallet.js
CHANGED
|
@@ -8,7 +8,9 @@ import { info, json, table } from "../output.js";
|
|
|
8
8
|
* A multi-slot mandate is a wallet with one slot per (currency, rail). Caps are
|
|
9
9
|
* per-currency, so each currency's spend authority is listed side by side with
|
|
10
10
|
* no FX between them — a BRL Pix line and a USDC x402 line, each with its own
|
|
11
|
-
* ceiling. `available = authorized - spent
|
|
11
|
+
* ceiling. `available = authorized - spent`, NOT floored at zero: a slot whose
|
|
12
|
+
* settled debits exceed its cap answers a negative value and `overspent: true`,
|
|
13
|
+
* which the table prints next to the amount so a minus sign is not the only signal.
|
|
12
14
|
*/
|
|
13
15
|
export async function walletCommand(consumerId, opts) {
|
|
14
16
|
if (!consumerId) {
|
|
@@ -33,8 +35,8 @@ export async function walletCommand(consumerId, opts) {
|
|
|
33
35
|
cur.rail ?? "-",
|
|
34
36
|
String(cur.authorized_minor),
|
|
35
37
|
String(cur.spent_minor),
|
|
36
|
-
String(cur.available_minor),
|
|
38
|
+
cur.overspent ? `${cur.available_minor} (overspent)` : String(cur.available_minor),
|
|
37
39
|
]));
|
|
38
|
-
info("Amounts are in minor units (cents / micro-USDC). Caps are per-currency, no FX.");
|
|
40
|
+
info("Amounts are in minor units (cents / micro-USDC). Caps are per-currency, no FX. A negative available marked (overspent) means settled debits exceed the cap.");
|
|
39
41
|
}
|
|
40
42
|
//# sourceMappingURL=wallet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,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CAAC;QAC5B,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;QACvB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,eAAe,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;KACnF,CAAC,CACH,CAAC;IACF,IAAI,CACF,6JAA6J,CAC9J,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codespar/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "CodeSpar CLI. The agentic OS for money movement in Latin America, from your terminal: authenticate, browse servers, mint mandates, execute tools, manage sessions, stream logs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"node": ">=20"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@codespar/sdk": "^0.
|
|
49
|
+
"@codespar/sdk": "^0.12.0",
|
|
50
50
|
"commander": "^13.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|