@capxul/cli 4.20.0-beta.17 → 4.20.0-beta.18
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 +189 -8
- package/dist/browser/signer.js +5487 -5183
- package/dist/browser/signer.js.map +1 -1
- package/dist/main.mjs +3305 -1606
- package/dist/main.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -53,6 +53,29 @@ one final version 1 result on stdout. Account setup reports public signer states
|
|
|
53
53
|
Activity shows that the CLI is waiting. It does not prove settlement or a healthy
|
|
54
54
|
connection. A deadline stops observation; it does not cancel a submitted operation.
|
|
55
55
|
|
|
56
|
+
## Status overview
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
capxul status
|
|
60
|
+
capxul status --email EMAIL --json
|
|
61
|
+
capxul status --org ORGANIZATION_ID
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`status` reads the current personal Account unless one explicit Organization
|
|
65
|
+
is selected with `--org`. It shows the saved session identity, selected actor
|
|
66
|
+
profile and readiness, separate asset balances, received and issued requests,
|
|
67
|
+
pending or active Payments, and five recent Activity rows. It gives scoped
|
|
68
|
+
commands to inspect requests and Activity. A saved Organization default does
|
|
69
|
+
not change the overview's personal scope.
|
|
70
|
+
|
|
71
|
+
Each source read retains its own state. An unavailable balance or Inbox is
|
|
72
|
+
not an empty balance or Inbox. Indexed Activity fallback is marked incomplete.
|
|
73
|
+
JSON returns `state: "partial"` when a read fails or Activity is incomplete.
|
|
74
|
+
Document counts include known references from available request and Payment
|
|
75
|
+
reads. Activity detail can have additional documents. The overview does not
|
|
76
|
+
render or download PDFs and does not prepare or submit Payments. Showing an
|
|
77
|
+
existing scheduled or streaming Payment does not add recurring billing.
|
|
78
|
+
|
|
56
79
|
## Personal Payments
|
|
57
80
|
|
|
58
81
|
```sh
|
|
@@ -121,6 +144,123 @@ refuses a missing or unavailable reference. Annotation accepts only `reference`,
|
|
|
121
144
|
writes require preview and confirmation. Scripted writes require `--confirm`.
|
|
122
145
|
In a terminal, omit required fields for guided flags and annotation input.
|
|
123
146
|
|
|
147
|
+
## Issued requests and received Inbox
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
capxul request list
|
|
151
|
+
capxul request issue --input invoice.json --confirm
|
|
152
|
+
capxul request get --request-id REQUEST_ID
|
|
153
|
+
capxul request cancel --request-id REQUEST_ID --confirm
|
|
154
|
+
capxul inbox list
|
|
155
|
+
capxul inbox get --request-id REQUEST_ID
|
|
156
|
+
capxul inbox pay --request-id REQUEST_ID --confirm
|
|
157
|
+
capxul inbox decline --request-id REQUEST_ID --confirm
|
|
158
|
+
capxul org request list --org ORGANIZATION_ID
|
|
159
|
+
capxul org request issue --org ORGANIZATION_ID --input invoice.json --confirm
|
|
160
|
+
capxul org request get --org ORGANIZATION_ID --request-id REQUEST_ID
|
|
161
|
+
capxul org request cancel --org ORGANIZATION_ID --request-id REQUEST_ID --confirm
|
|
162
|
+
capxul org inbox list --org ORGANIZATION_ID
|
|
163
|
+
capxul org inbox get --org ORGANIZATION_ID --request-id REQUEST_ID
|
|
164
|
+
capxul org inbox pay --org ORGANIZATION_ID --request-id REQUEST_ID --permission-id PERMISSION_ID --confirm
|
|
165
|
+
capxul org inbox decline --org ORGANIZATION_ID --request-id REQUEST_ID --confirm
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`request` reads the selected actor's issued Invoice and payment requests.
|
|
169
|
+
`inbox` reads payment requests addressed to that actor. Organization reads
|
|
170
|
+
require one explicit Organization ID. Add `--email EMAIL` to select a saved
|
|
171
|
+
session. No signer is required for these reads.
|
|
172
|
+
|
|
173
|
+
For human reads, start with `capxul request --help` or `capxul inbox --help`.
|
|
174
|
+
Run `request list` for requests you issued. Run `inbox list` for requests you
|
|
175
|
+
received. Copy the full request ID from the list into the matching `get` command.
|
|
176
|
+
In a terminal, omit required fields to start guided input. Ctrl+C or Ctrl+D
|
|
177
|
+
cancels with exit 130. The wizard can ask about optional email selection before
|
|
178
|
+
required fields. Provide `--email EMAIL` when you need one saved session.
|
|
179
|
+
|
|
180
|
+
For agent reads, supply all required flags and add `--json`. Capture stdout,
|
|
181
|
+
stderr, and the process exit code separately. A refusal is still a version 1
|
|
182
|
+
result on stdout. Inspect `outcome` and `error.code`; do not infer success from
|
|
183
|
+
valid JSON. Missing required input exits 2. A missing authenticated session exits 3. Noninteractive human refusals use stderr. These runs do not prompt.
|
|
184
|
+
|
|
185
|
+
A missing `--org` refuses an Organization request or Inbox read before session
|
|
186
|
+
restoration. Supply that selector on every Organization command. Do not assume
|
|
187
|
+
that `org use` selects request or Inbox scope.
|
|
188
|
+
|
|
189
|
+
The [installed beta18 audit](../../docs/planning/checkout-cli/request-read-contract.md#installed-beta18-local-audit-c06)
|
|
190
|
+
records local help, refusal, and cancellation checks. Authenticated request
|
|
191
|
+
reads, document output, issuance, and payment remain separate journey checks.
|
|
192
|
+
|
|
193
|
+
Human output shows request ID, reference, amount, status, counterparty
|
|
194
|
+
reference, and document references. An unpaid Invoice can have a document
|
|
195
|
+
before any Payment exists. The document guidance preserves the selected
|
|
196
|
+
session. Run that explicit command to save a PDF. Request and Inbox reads do
|
|
197
|
+
not render or download PDFs. JSON output preserves scope, direction, and the
|
|
198
|
+
SDK item or list. Unavailable reads remain failures, not empty lists.
|
|
199
|
+
|
|
200
|
+
Cancel changes an issued request. Decline changes a received request. Both
|
|
201
|
+
commands read the exact request in the selected scope before the write.
|
|
202
|
+
Terminal writes show a preview and ask for confirmation. Scripted writes
|
|
203
|
+
require `--confirm` before session restoration. A lost write reply gives an
|
|
204
|
+
exact readback command in the same scope and session. It never repeats the
|
|
205
|
+
write. These commands start no signer and move no funds.
|
|
206
|
+
|
|
207
|
+
Issue accepts an Invoice request JSON object from `--input FILE` or `--input -`.
|
|
208
|
+
It saves the issued Invoice PDF in the common document directory by default.
|
|
209
|
+
Human and JSON output include `checkoutUrl` for an Invoice instruction with a link token.
|
|
210
|
+
Memo requests do not receive an Invoice checkout URL.
|
|
211
|
+
The PDF includes the checkout link from the authorized backend render context.
|
|
212
|
+
For a custom deployment, set `CAPXUL_CHECKOUT_FRONTEND_ORIGIN` in both the CLI
|
|
213
|
+
and backend environments. Use the same frontend origin for both.
|
|
214
|
+
Offer create, get, list, revise, and deactivate output also include `checkoutUrl`.
|
|
215
|
+
The checkout page reads current terms and status when the link opens.
|
|
216
|
+
Use `--output-dir DIRECTORY` to change that location. A PDF failure retains the
|
|
217
|
+
issued request and its document references. Do not issue it again to retry PDF
|
|
218
|
+
output; use the printed document render command.
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"payer": { "kind": "email", "email": "bob@example.com" },
|
|
223
|
+
"amount": { "asset": "<admitted asset ID>", "value": "9" },
|
|
224
|
+
"invoice": {
|
|
225
|
+
"kind": "invoice",
|
|
226
|
+
"invoiceNumber": "INV-002",
|
|
227
|
+
"payerRef": "Bob",
|
|
228
|
+
"payeeRef": "Alice",
|
|
229
|
+
"dueAt": 1900000000,
|
|
230
|
+
"note": "Thank you",
|
|
231
|
+
"discountMinor": "1000000",
|
|
232
|
+
"lineItems": [{ "description": "Consulting", "quantity": 1, "unitMinor": "10000000" }]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Supply your Invoice number. The request reference defaults to that number;
|
|
238
|
+
optional `reference` changes the request reference only. `dueAt` uses Unix
|
|
239
|
+
seconds. Optional `expiresAt` uses epoch milliseconds. `discountMinor` and
|
|
240
|
+
`unitMinor` use the asset's exact minor units. The example is 10 USDC less
|
|
241
|
+
1 USDC for a six-decimal USDC asset. The backend checks the Invoice total,
|
|
242
|
+
registered payer, and issuer authority before creation. Optional `memo` is a
|
|
243
|
+
request memo; `invoice.note` is the document note. Unknown fields refuse.
|
|
244
|
+
|
|
245
|
+
A lost issuance reply provides issued-list readback in the same scope and
|
|
246
|
+
session. Issuance has no automatic resend.
|
|
247
|
+
|
|
248
|
+
Inbox pay reads and confirms exact backend-owned request terms. It uses the existing
|
|
249
|
+
CLI signer and the SDK fulfillment API. Organization payment requires the
|
|
250
|
+
selected Permission; the backend checks Budget and spending authority. The
|
|
251
|
+
command publishes prepared Payment IDs before signing. A submitted Payment
|
|
252
|
+
is not a settled Payment. Use the printed get/wait commands to inspect its state.
|
|
253
|
+
Returned documents use the same default PDF directory.
|
|
254
|
+
|
|
255
|
+
A lost reply or timeout gives exact readback in the same session and scope.
|
|
256
|
+
Pay refuses an already prepared Invoice unless you explicitly use `--resume`
|
|
257
|
+
after readback. Resumption must retain its linked Payment ID and original
|
|
258
|
+
Invoice terms. It does not create another request or Payment. Use
|
|
259
|
+
`--timeout-seconds N` to change the bounded signing wait (default 120).
|
|
260
|
+
An Invoice retains its issued instruction. A generic request uses a deterministic
|
|
261
|
+
Memo instruction. Reading terms creates no Payment or document. Fulfillment
|
|
262
|
+
checks those terms again and stores the Memo with the original request birth.
|
|
263
|
+
|
|
124
264
|
## Payment documents
|
|
125
265
|
|
|
126
266
|
```sh
|
|
@@ -561,14 +701,15 @@ Ctrl-C stops local work at exit 130. Neither stop writes a backend failure.
|
|
|
561
701
|
|
|
562
702
|
## Configuration
|
|
563
703
|
|
|
564
|
-
| Variable
|
|
565
|
-
|
|
|
566
|
-
| `CAPXUL_CLI_HOME`
|
|
567
|
-
| `CAPXUL_PUBLISHABLE_KEY`
|
|
568
|
-
| `CAPXUL_BOOTSTRAP_URL`
|
|
569
|
-
| `
|
|
570
|
-
| `
|
|
571
|
-
| `
|
|
704
|
+
| Variable | Use |
|
|
705
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
706
|
+
| `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
|
|
707
|
+
| `CAPXUL_PUBLISHABLE_KEY` | Optional developer override for the bundled first-party staging key. |
|
|
708
|
+
| `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
|
|
709
|
+
| `CAPXUL_CHECKOUT_FRONTEND_ORIGIN` | Checkout frontend origin. Staging uses `https://app.staging.capxul.com`. Devnet at `http://127.0.0.1:3211` uses `http://127.0.0.1:3002`. Custom bootstrap origins require this value. |
|
|
710
|
+
| `CAPXUL_POSTHOG_HOST` | Optional development override for the built-in public PostHog ingestion origin. |
|
|
711
|
+
| `CAPXUL_POSTHOG_PROJECT_TOKEN` | Optional development override for the built-in public project ingestion token. |
|
|
712
|
+
| `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
|
|
572
713
|
|
|
573
714
|
The published CLI includes the verified first-party staging application key and
|
|
574
715
|
Capxul-owned public ingestion configuration. You do not need key or PostHog
|
|
@@ -852,3 +993,43 @@ the same Party, session and scope. The contact's history remains available.
|
|
|
852
993
|
`contact unhide` uses the same scoped selector, including hidden contacts, when
|
|
853
994
|
a terminal omits `--entry-id`. It confirms the change and shows the visible
|
|
854
995
|
contact. Scripts provide the exact Party ID and `--confirm`.
|
|
996
|
+
|
|
997
|
+
## Fixed offers
|
|
998
|
+
|
|
999
|
+
Manage fixed service offers in your personal Account or an explicit Organization.
|
|
1000
|
+
These commands do not sign payments or create checkout purchases.
|
|
1001
|
+
|
|
1002
|
+
```sh
|
|
1003
|
+
capxul offer create --input offer.json --request-key consulting-001 --confirm
|
|
1004
|
+
capxul offer list
|
|
1005
|
+
capxul offer get --offer-id OFFER_ID
|
|
1006
|
+
capxul offer revise --offer-id OFFER_ID --expected-revision 1 --input offer.json --confirm
|
|
1007
|
+
capxul offer deactivate --offer-id OFFER_ID --expected-revision 2 --confirm
|
|
1008
|
+
capxul org offer list --org ORG_ID
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
Use `org offer` and `--org ORG_ID` for each Organization command. Use `--email`
|
|
1012
|
+
to select a saved session. Scripts must supply `--confirm` for each write.
|
|
1013
|
+
A terminal shows the proposed change and asks for confirmation. Use `--json`
|
|
1014
|
+
for structured output. Lists and reads create no PDF.
|
|
1015
|
+
|
|
1016
|
+
The input file contains the complete offer terms. Use `--input -` to read stdin.
|
|
1017
|
+
The input limit is 64 KiB. Supply an admitted Base Sepolia asset ID from the
|
|
1018
|
+
existing asset catalog. Amounts use exact decimal strings. Quantity limits use
|
|
1019
|
+
positive whole numbers.
|
|
1020
|
+
|
|
1021
|
+
```json
|
|
1022
|
+
{
|
|
1023
|
+
"title": "Consulting",
|
|
1024
|
+
"description": "One hour of consulting",
|
|
1025
|
+
"unitLabel": "hour",
|
|
1026
|
+
"unitAmount": { "asset": "ASSET_ID", "value": "12" },
|
|
1027
|
+
"quantity": { "min": 1, "max": 8 }
|
|
1028
|
+
}
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
Creation requires an explicit replay key. Keep the key and identical terms when
|
|
1032
|
+
recovering an uncertain result. Read the offer list before another write. Revision
|
|
1033
|
+
and deactivation require the revision you observed. A conflict requires a fresh
|
|
1034
|
+
read. The CLI does not retry a write automatically. Checkout links are not emitted
|
|
1035
|
+
until the checkout route works.
|