@capxul/cli 4.20.0-beta.17 → 4.20.0-beta.19

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 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,129 @@ 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": 1900000000000,
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 epoch
239
+ milliseconds, as the shared Invoice document and frontend do. Set it to zero
240
+ for no due date. Optional `expiresAt` also uses epoch milliseconds. `discountMinor` and
241
+ `unitMinor` use the asset's exact minor units. The example is 10 USDC less
242
+ 1 USDC for a six-decimal USDC asset. The backend checks the Invoice total,
243
+ registered payer, and issuer authority before creation. Optional `memo` is a
244
+ request memo; `invoice.note` is the document note. Unknown fields refuse.
245
+
246
+ Earlier CLI guidance incorrectly named Unix seconds for `dueAt`. Convert those
247
+ values to milliseconds for new drafts. Rendering does not change the dates in
248
+ an issued document. Inspect an incorrect Invoice before cancelling it and
249
+ issuing a corrected request.
250
+
251
+ A lost issuance reply provides issued-list readback in the same scope and
252
+ session. Issuance has no automatic resend.
253
+
254
+ Inbox pay reads and confirms exact backend-owned request terms. It uses the existing
255
+ CLI signer and the SDK fulfillment API. Organization payment requires the
256
+ selected Permission; the backend checks Budget and spending authority. The
257
+ command publishes prepared Payment IDs before signing. A submitted Payment
258
+ is not a settled Payment. Use the printed get/wait commands to inspect its state.
259
+ Returned documents use the same default PDF directory.
260
+
261
+ A lost reply or timeout gives exact readback in the same session and scope.
262
+ Pay refuses an already prepared Invoice unless you explicitly use `--resume`
263
+ after readback. Resumption must retain its linked Payment ID and original
264
+ Invoice terms. It does not create another request or Payment. Use
265
+ `--timeout-seconds N` to change the bounded signing wait (default 120).
266
+ An Invoice retains its issued instruction. A generic request uses a deterministic
267
+ Memo instruction. Reading terms creates no Payment or document. Fulfillment
268
+ checks those terms again and stores the Memo with the original request birth.
269
+
124
270
  ## Payment documents
125
271
 
126
272
  ```sh
@@ -561,14 +707,15 @@ Ctrl-C stops local work at exit 130. Neither stop writes a backend failure.
561
707
 
562
708
  ## Configuration
563
709
 
564
- | Variable | Use |
565
- | ------------------------------ | ------------------------------------------------------------------------------------------------------------ |
566
- | `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
567
- | `CAPXUL_PUBLISHABLE_KEY` | Optional developer override for the bundled first-party staging key. |
568
- | `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
569
- | `CAPXUL_POSTHOG_HOST` | Optional development override for the built-in public PostHog ingestion origin. |
570
- | `CAPXUL_POSTHOG_PROJECT_TOKEN` | Optional development override for the built-in public project ingestion token. |
571
- | `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
710
+ | Variable | Use |
711
+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
712
+ | `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
713
+ | `CAPXUL_PUBLISHABLE_KEY` | Optional developer override for the bundled first-party staging key. |
714
+ | `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
715
+ | `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. |
716
+ | `CAPXUL_POSTHOG_HOST` | Optional development override for the built-in public PostHog ingestion origin. |
717
+ | `CAPXUL_POSTHOG_PROJECT_TOKEN` | Optional development override for the built-in public project ingestion token. |
718
+ | `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
572
719
 
573
720
  The published CLI includes the verified first-party staging application key and
574
721
  Capxul-owned public ingestion configuration. You do not need key or PostHog
@@ -852,3 +999,43 @@ the same Party, session and scope. The contact's history remains available.
852
999
  `contact unhide` uses the same scoped selector, including hidden contacts, when
853
1000
  a terminal omits `--entry-id`. It confirms the change and shows the visible
854
1001
  contact. Scripts provide the exact Party ID and `--confirm`.
1002
+
1003
+ ## Fixed offers
1004
+
1005
+ Manage fixed service offers in your personal Account or an explicit Organization.
1006
+ These commands do not sign payments or create checkout purchases.
1007
+
1008
+ ```sh
1009
+ capxul offer create --input offer.json --request-key consulting-001 --confirm
1010
+ capxul offer list
1011
+ capxul offer get --offer-id OFFER_ID
1012
+ capxul offer revise --offer-id OFFER_ID --expected-revision 1 --input offer.json --confirm
1013
+ capxul offer deactivate --offer-id OFFER_ID --expected-revision 2 --confirm
1014
+ capxul org offer list --org ORG_ID
1015
+ ```
1016
+
1017
+ Use `org offer` and `--org ORG_ID` for each Organization command. Use `--email`
1018
+ to select a saved session. Scripts must supply `--confirm` for each write.
1019
+ A terminal shows the proposed change and asks for confirmation. Use `--json`
1020
+ for structured output. Lists and reads create no PDF.
1021
+
1022
+ The input file contains the complete offer terms. Use `--input -` to read stdin.
1023
+ The input limit is 64 KiB. Supply an admitted Base Sepolia asset ID from the
1024
+ existing asset catalog. Amounts use exact decimal strings. Quantity limits use
1025
+ positive whole numbers.
1026
+
1027
+ ```json
1028
+ {
1029
+ "title": "Consulting",
1030
+ "description": "One hour of consulting",
1031
+ "unitLabel": "hour",
1032
+ "unitAmount": { "asset": "ASSET_ID", "value": "12" },
1033
+ "quantity": { "min": 1, "max": 8 }
1034
+ }
1035
+ ```
1036
+
1037
+ Creation requires an explicit replay key. Keep the key and identical terms when
1038
+ recovering an uncertain result. Read the offer list before another write. Revision
1039
+ and deactivation require the revision you observed. A conflict requires a fresh
1040
+ read. The CLI does not retry a write automatically. Checkout links are not emitted
1041
+ until the checkout route works.