@allscale/cli 1.0.1 → 1.0.3
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/README.md +92 -12
- package/dist/commands/build-info.js +12 -12
- package/dist/commands/claim-link/claim.js +10 -10
- package/dist/commands/claim-link/create.js +31 -31
- package/dist/commands/claim-link/get.js +13 -13
- package/dist/commands/claim-link/list.js +12 -12
- package/dist/commands/claim-link/status.js +11 -11
- package/dist/commands/describe.js +11 -11
- package/dist/commands/device-login.js +28 -27
- package/dist/commands/invoice/get.js +12 -12
- package/dist/commands/invoice/list.js +12 -12
- package/dist/commands/invoice/pay.js +41 -37
- package/dist/commands/invoice/received.js +12 -12
- package/dist/commands/invoice/send.js +29 -29
- package/dist/commands/invoice/sent.js +11 -11
- package/dist/commands/invoice/update.js +13 -13
- package/dist/commands/logout.js +19 -13
- package/dist/commands/operations.js +11 -11
- package/dist/commands/otp-login.js +17 -17
- package/dist/commands/otp-send.js +11 -11
- package/dist/commands/payout/send.js +14 -14
- package/dist/commands/payout/status.js +12 -12
- package/dist/commands/scope.js +16 -16
- package/dist/commands/store/create.js +16 -16
- package/dist/commands/transaction/get.js +12 -12
- package/dist/commands/transaction/list.js +12 -12
- package/dist/commands/wallet/list.js +12 -12
- package/dist/commands/wallet/send.js +27 -27
- package/dist/commands/whoami.js +14 -12
- package/dist/hooks/version-suffix.js +1 -1
- package/dist/index.js +11 -11
- package/dist/lib/help.js +10 -7
- package/oclif.manifest.json +24 -11
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"type": "option"
|
|
205
205
|
},
|
|
206
206
|
"scopes": {
|
|
207
|
-
"description": "Requested scopes for the eventual agent key, repeatable. Scope strings use `<category>:<tier>`; `:all` implies `:read_only` for the same category. Pairs the approval screen can grant: invoice:{read_only,all}, contact:{read_only,all}, transaction:read_only, wallet:read_only, claim_link:{read_only,all}, store:{read_only,all}. The final set is chosen — and can be overridden — on that screen, and is checked by the backend on each request.
|
|
207
|
+
"description": "Requested scopes for the eventual agent key, repeatable. Scope strings use `<category>:<tier>`; `:all` implies `:read_only` for the same category. Pairs the approval screen can grant: invoice:{read_only,all}, contact:{read_only,all}, transaction:read_only, wallet:{read_only,all}, claim_link:{read_only,all}, store:{read_only,all}. The final set is chosen — and can be overridden — on that screen, and is checked by the backend on each request. With no requested scopes, every category starts OFF and the user must select at least one. Passing --scopes preselects each exact matching tier the screen can grant. `wallet list` needs `wallet:read_only`. `invoice pay` needs `invoice:all` AND `wallet:all` — its withdrawal registration rides the same broker op as `wallet send` (backend gates the op, not the verb), and the write tier covers its payer-address read via the implication — so request both (`--scopes invoice:all --scopes wallet:all`) to preselect both write tiers, or select both Allow-changes switches before authorizing. `wallet send` requires `wallet:all` the same way; every transfer still requires your in-browser confirmation. Every category recognised as a spelling, so a usable value can be found without guessing: admin:audit, admin:org, admin:user, claim_link, cli_op, contact, invoice, payroll, store, transaction, wallet. claim_link, contact, invoice, store, transaction, wallet carry the tiers listed above. admin:audit, admin:org, admin:user, payroll are in the catalog but granted to NOBODY — every mint path drops them, so no login command can deliver them; this command rejects them locally, before any pairing session. cli_op is attached to every key the backend mints, by both login commands, without being requested — you never need to ask for it, and asking is not an error. Values are checked locally first: an unrecognised `<category>:<tier>` string exits 2 before any pairing session is registered — the same check, and the same exit code, as `otp-login --scopes`. A recognised scope the screen has no toggle for is also rejected locally, with the remediation that actually works: otp-login for operational scopes (or `--allow-unrenderable-scopes` when your web app is newer than this CLI's catalog), nothing for payroll/admin:* — the approval page refuses the whole authorization when even one requested scope is unrenderable, so deferring the answer to the browser would strand you after a pairing session already exists. An explicitly requested `cli_op:*` is not an error: the backend appends it to every pairing-minted key, so it is omitted from the request with a note. If another requested scope remains, the resulting key is identical; if it was the only one, the approval screen starts every category OFF and requires the user to choose at least one. Only a scope the screen renders and the user declines is reported after the key is minted.",
|
|
208
208
|
"name": "scopes",
|
|
209
209
|
"hasDynamicHelp": false,
|
|
210
210
|
"multiple": true,
|
|
@@ -216,6 +216,12 @@
|
|
|
216
216
|
"allowNo": false,
|
|
217
217
|
"type": "boolean"
|
|
218
218
|
},
|
|
219
|
+
"allow-unrenderable-scopes": {
|
|
220
|
+
"description": "Forward a scope to the approval screen even when this CLI's catalog says the screen has no toggle for it. Escape hatch for a stale catalog: the screen-grantable list above is a MIRROR of the web app's approval screen and can lag a frontend release, and without this flag a lagging mirror makes such a scope impossible to request until a CLI update ships. The screen stays the authority — if it truly cannot render the scope it refuses the WHOLE authorization after the pairing session exists (the stranding the local check normally prevents), so use this only when you have reason to believe the web app is newer than this CLI. Scopes no login path can mint (payroll/admin:*) are still rejected locally; this flag does not touch them.",
|
|
221
|
+
"name": "allow-unrenderable-scopes",
|
|
222
|
+
"allowNo": false,
|
|
223
|
+
"type": "boolean"
|
|
224
|
+
},
|
|
219
225
|
"yes": {
|
|
220
226
|
"char": "y",
|
|
221
227
|
"description": "Skip the interactive confirmation and start the pairing immediately. Only a BARE invocation is ever prompted, so passing any flag already skips it; use this to say so explicitly. Automation that allocates a pty for stdin/stdout/stderr and runs the command bare is indistinguishable from a human — that is the case this flag exists for.",
|
|
@@ -247,10 +253,10 @@
|
|
|
247
253
|
"logout": {
|
|
248
254
|
"aliases": [],
|
|
249
255
|
"args": {},
|
|
250
|
-
"description": "Clear cached credentials (session token + store keys) for a profile. By default, clears BOTH the OS keychain and plaintext file store. With --insecure-storage or ALLSCALE_INSECURE_STORAGE=1, clears only plaintext files and never probes the keychain; omit/unset that opt-in when a full-machine sweep is wanted. If the keychain is suppressed or unavailable, a bare logout fails closed after attempting the plaintext-file cleanup.",
|
|
256
|
+
"description": "Clear cached credentials (session token + store keys) for a profile. By default, clears BOTH the OS keychain and plaintext file store. With --insecure-storage or ALLSCALE_INSECURE_STORAGE=1, clears only plaintext files and never probes the keychain; omit/unset that opt-in when a full-machine sweep is wanted. If the keychain is suppressed or unavailable, a bare logout fails closed after attempting the plaintext-file cleanup. A bare interactive invocation asks for confirmation before anything is removed; any flag (or --yes) skips the prompt, and machine callers are never prompted.",
|
|
251
257
|
"examples": [
|
|
252
|
-
"$ allscale logout",
|
|
253
|
-
"$ allscale logout --
|
|
258
|
+
"$ allscale logout --profile staging",
|
|
259
|
+
"$ allscale logout --yes"
|
|
254
260
|
],
|
|
255
261
|
"flags": {
|
|
256
262
|
"json": {
|
|
@@ -292,6 +298,13 @@
|
|
|
292
298
|
"name": "insecure-storage",
|
|
293
299
|
"allowNo": false,
|
|
294
300
|
"type": "boolean"
|
|
301
|
+
},
|
|
302
|
+
"yes": {
|
|
303
|
+
"char": "y",
|
|
304
|
+
"description": "Skip the interactive confirmation and clear the credentials immediately. Only a BARE invocation is ever prompted, so passing any flag already skips it; use this to say so explicitly. Automation that allocates a pty for stdin/stdout/stderr and runs the command bare is indistinguishable from a human — that is the case this flag exists for.",
|
|
305
|
+
"name": "yes",
|
|
306
|
+
"allowNo": false,
|
|
307
|
+
"type": "boolean"
|
|
295
308
|
}
|
|
296
309
|
},
|
|
297
310
|
"hasDynamicHelp": false,
|
|
@@ -467,7 +480,7 @@
|
|
|
467
480
|
"type": "option"
|
|
468
481
|
},
|
|
469
482
|
"scopes": {
|
|
470
|
-
"description": "Scopes the minted agent key should carry, repeatable. Scope strings use `<category>:<tier>`; `:all` implies `:read_only` for the same category. Pairs that reach a real operation today: invoice:{read_only,all}, contact:{read_only,all}, claim_link:{read_only,all}, transaction:{read_only,all}, store:{read_only,all}, wallet:{read_only,all}. transaction:all
|
|
483
|
+
"description": "Scopes the minted agent key should carry, repeatable. Scope strings use `<category>:<tier>`; `:all` implies `:read_only` for the same category. Pairs that reach a real operation today: invoice:{read_only,all}, contact:{read_only,all}, claim_link:{read_only,all}, transaction:{read_only,all}, store:{read_only,all}, wallet:{read_only,all}. transaction:all — read-only in practice: no write operation is wired there today, so the `:read_only` tier grants exactly as much; prefer it unless you have a reason to hold the wider scope. `wallet:all` additionally lets the key register `wallet send` transfers; every transfer still requires your in-browser confirmation. Other pairs are accepted by the catalog but grant nothing, and this command does NOT warn when a requested scope is clipped — verify with `allscale scope` after minting. Every category recognised as a spelling, so a usable value can be found without guessing: admin:audit, admin:org, admin:user, claim_link, cli_op, contact, invoice, payroll, store, transaction, wallet. claim_link, contact, invoice, store, transaction, wallet carry the tiers listed above. admin:audit, admin:org, admin:user, payroll are in the catalog but granted to NOBODY — every mint path drops them, so no login command can deliver them, and requesting them gains nothing. cli_op is attached to every key the backend mints, by both login commands, without being requested — you never need to ask for it, and asking is not an error. Values are checked locally first: an unrecognised `<category>:<tier>` string exits 2 before any OTP is sent — the same check, and the same exit code, as `device-login --scopes`. Required — the backend deliberately has no full-permission default. Requested scopes are clipped to your account's role; granted scopes are checked by the backend on each request.",
|
|
471
484
|
"helpGroup": "REQUIRED",
|
|
472
485
|
"name": "scopes",
|
|
473
486
|
"required": true,
|
|
@@ -695,7 +708,7 @@
|
|
|
695
708
|
"whoami": {
|
|
696
709
|
"aliases": [],
|
|
697
710
|
"args": {},
|
|
698
|
-
"description": "Show the current authenticated identity from the stored credential (agent-key sessions report business_id / scopes / expiry; legacy password sessions decode the cached JWT). No network call.",
|
|
711
|
+
"description": "Show the current authenticated identity from the stored credential (agent-key sessions report business_id / scopes / expiry; legacy password sessions decode the cached JWT). No network call. The reported `api_base` is the endpoint this session resolves to — its saved profile pin, else this build's own environment. A published build ignores ALLSCALE_API_BASE, and says so on stderr rather than echoing it as the session endpoint; an internal build honours the variable, so it is echoed there. Either way, a resolved endpoint that networked commands would refuse — an untrusted origin, or a real AllScale environment outside this build's signing binding, whether it came from the variable or from the profile's saved pin — is disclosed on stderr. This command stays usable offline and never fails closed.",
|
|
699
712
|
"examples": [
|
|
700
713
|
"$ allscale whoami",
|
|
701
714
|
"$ allscale whoami --profile prod"
|
|
@@ -1586,7 +1599,7 @@
|
|
|
1586
1599
|
"required": true
|
|
1587
1600
|
}
|
|
1588
1601
|
},
|
|
1589
|
-
"description": "Pay an invoice where you are the payer, from your AllScale wallet. Use `allscale invoice sent` to list the invoices you owe (add --status SENT --status ACKNOWLEDGED --status FAILED for the ones you can start paying). An OVERDUE invoice cannot start a new payment: if an earlier attempt of yours may still be in flight, reconcile that first — otherwise ask the issuer to extend its due date, which revives it. Resolves the invoice's destination + amount, moves the funds via the same signing path as `wallet send` (the transfer is confirmed in the browser), then reports and confirms the payment. Needs TWO scopes: `invoice:all` to create, report and confirm the pay intent, and `wallet:
|
|
1602
|
+
"description": "Pay an invoice where you are the payer, from your AllScale wallet. Use `allscale invoice sent` to list the invoices you owe (add --status SENT --status ACKNOWLEDGED --status FAILED for the ones you can start paying). An OVERDUE invoice cannot start a new payment: if an earlier attempt of yours may still be in flight, reconcile that first — otherwise ask the issuer to extend its due date, which revives it. Resolves the invoice's destination + amount, moves the funds via the same signing path as `wallet send` (the transfer is confirmed in the browser), then reports and confirms the payment. Needs TWO scopes: `invoice:all` to create, report and confirm the pay intent, and `wallet:all` to register the withdrawal — the same broker op `wallet send` uses (backend gates the op, not the verb); it also covers the payer-address lookup, since `:all` implies `:read_only`. Neither login flow adds these scopes for you. A bare `device-login` starts every category OFF: request BOTH --scopes invoice:all --scopes wallet:all to preselect them, or turn on both Allow-changes switches on the approval screen. On `otp-login`, pass the same two --scopes values because it requests only explicitly supplied scopes, has no implicit scope defaults, and the final grants are clipped to your account's role.",
|
|
1590
1603
|
"examples": [
|
|
1591
1604
|
"$ allscale invoice pay 65ab1234567890abcdef0123",
|
|
1592
1605
|
"$ allscale invoice pay 65ab1234567890abcdef0123 --chain bsc --stable-coin USDT"
|
|
@@ -1941,7 +1954,7 @@
|
|
|
1941
1954
|
"type": "option"
|
|
1942
1955
|
},
|
|
1943
1956
|
"auto-create-contact": {
|
|
1944
|
-
"description": "If --to-email doesn't resolve to an existing contact, auto-create the contact (using the email + your business as owner; name defaults to the full email address, override with --contact-name) and proceed with the invoice. Ignored when the contact already exists (safe to leave on in scripts). Requires --to-email; not valid with --to-contact-id.",
|
|
1957
|
+
"description": "If --to-email doesn't resolve to an existing contact, auto-create the contact (using the email + your business as owner; name defaults to the full email address, override with --contact-name) and proceed with the invoice. Ignored when the contact already exists (safe to leave on in scripts). Under an agent key, the full send needs contact:all and invoice:all, plus wallet:read_only unless you pass --wallet-id. A bare device-login approval starts every category OFF and its new key replaces the old one, so select Contacts write and Invoices Allow changes plus Wallets read (unless using --wallet-id) in the same re-login. Requires --to-email; not valid with --to-contact-id.",
|
|
1945
1958
|
"exclusive": [
|
|
1946
1959
|
"to-contact-id"
|
|
1947
1960
|
],
|
|
@@ -1975,7 +1988,7 @@
|
|
|
1975
1988
|
"type": "option"
|
|
1976
1989
|
},
|
|
1977
1990
|
"payment-type": {
|
|
1978
|
-
"description": "What the invoice is denominated in AND which stablecoin it may be paid with: 0 = fiat (pair with --currency-int), 1 = USDT, 2 = USDC. Passing 1 or 2 EXPLICITLY pins the invoice to that coin — a payment arriving in the other stablecoin is rejected, and the payer's email names only this coin. Omit the flag and the invoice accepts whichever stablecoins your business is configured for (it is still denominated in USDT, the default). For 0 the amount is fiat but settlement is still in a stablecoin, so the payer may likewise use any coin your business accepts.
|
|
1991
|
+
"description": "What the invoice is denominated in AND which stablecoin it may be paid with: 0 = fiat (pair with --currency-int), 1 = USDT, 2 = USDC. Passing 1 or 2 EXPLICITLY pins the invoice to that coin — a payment arriving in the other stablecoin is rejected, and the payer's email names only this coin. Omit the flag and the invoice accepts whichever stablecoins your business is configured for (it is still denominated in USDT, the default). For 0 the amount is fiat but settlement is still in a stablecoin, so the payer may likewise use any coin your business accepts. Any other value is rejected locally (exit 2) — the backend would otherwise issue an invoice in an undocumented asset. Default: 1 (denomination only — omitting the flag pins nothing).",
|
|
1979
1992
|
"name": "payment-type",
|
|
1980
1993
|
"default": 1,
|
|
1981
1994
|
"hasDynamicHelp": false,
|
|
@@ -3015,7 +3028,7 @@
|
|
|
3015
3028
|
"wallet:send": {
|
|
3016
3029
|
"aliases": [],
|
|
3017
3030
|
"args": {},
|
|
3018
|
-
"description": "Withdraw a stablecoin from your AllScale wallet to an EVM address. The transfer is confirmed in the browser; the CLI prints the transaction hash and explorer URL only after its on-chain receipt confirms.",
|
|
3031
|
+
"description": "Withdraw a stablecoin from your AllScale wallet to an EVM address. The transfer is confirmed in the browser; the CLI prints the transaction hash and explorer URL only after its on-chain receipt confirms. Needs `wallet:all` on an agent key: it registers the withdrawal op (`wallet:read_only` alone cannot). Every transfer still requires your in-browser confirmation.",
|
|
3019
3032
|
"examples": [
|
|
3020
3033
|
"$ allscale wallet send --idempotency-key order-1042 --to 0x1234567890abcdef1234567890abcdef12345678 --amount 100 --chain ethereum",
|
|
3021
3034
|
"$ allscale wallet send --idempotency-key order-1043 --to 0x1234567890abcdef1234567890abcdef12345678 --amount 50 --chain polygon --stable-coin USDC",
|
|
@@ -3156,5 +3169,5 @@
|
|
|
3156
3169
|
]
|
|
3157
3170
|
}
|
|
3158
3171
|
},
|
|
3159
|
-
"version": "1.0.
|
|
3172
|
+
"version": "1.0.3"
|
|
3160
3173
|
}
|