@capxul/cli 4.20.0-beta.6 → 4.20.0-beta.7

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
@@ -1,9 +1,9 @@
1
1
  # Capxul CLI
2
2
 
3
3
  The CLI provides email OTP login, persistent first-party sessions, terminal-owned
4
- signup, a bundled Openfort wallet page, backend profile and account reads,
5
- diagnostics, and one global collection preference. It requires Node 24 or later
6
- on macOS or Linux.
4
+ signup, personal and Organization contacts, a bundled Openfort wallet page,
5
+ backend profile and account reads, diagnostics, and one global collection
6
+ preference. It requires Node 24 or later on macOS or Linux.
7
7
 
8
8
  ```sh
9
9
  capxul --help
@@ -24,6 +24,51 @@ machinery and collection controls send no observation records.
24
24
  check uses the public Capxul SDK and verifies the backend response nonce.
25
25
  It does not authenticate a person or submit a transaction.
26
26
 
27
+ ## Contact commands
28
+
29
+ ```sh
30
+ capxul contact list [--include-hidden]
31
+ capxul contact get --entry-id PARTY_ID
32
+ capxul contact add --input FILE|- [--confirm]
33
+ capxul contact label --entry-id PARTY_ID --label TEXT [--confirm]
34
+ capxul contact hide --entry-id PARTY_ID [--confirm]
35
+ capxul contact unhide --entry-id PARTY_ID [--confirm]
36
+
37
+ capxul org contact list --org ORGANIZATION_ID [--include-hidden]
38
+ capxul org contact get --org ORGANIZATION_ID --entry-id PARTY_ID
39
+ capxul org contact add --org ORGANIZATION_ID --input FILE|- [--confirm]
40
+ capxul org contact label --org ORGANIZATION_ID --entry-id PARTY_ID --label TEXT [--confirm]
41
+ capxul org contact hide --org ORGANIZATION_ID --entry-id PARTY_ID [--confirm]
42
+ capxul org contact unhide --org ORGANIZATION_ID --entry-id PARTY_ID [--confirm]
43
+ ```
44
+
45
+ Personal commands use the authenticated Account address book. Organization
46
+ commands require one explicit `--org` or `--org-id`; they never use the saved
47
+ Organization read default. `list` omits hidden entries unless
48
+ `--include-hidden` is present. `get`, `label`, `hide`, and `unhide` address one
49
+ stable Party with `--entry-id`.
50
+
51
+ `add --input` reads the existing `AddressBookAddInput` JSON shape. For example:
52
+
53
+ ```json
54
+ {
55
+ "ref": { "kind": "email", "email": "supplier@example.test" },
56
+ "label": "New Supplier"
57
+ }
58
+ ```
59
+
60
+ Use `--input -` to read the same object from stdin. An interactive `add` can
61
+ collect the reference kind, value, and optional label instead. Interactive
62
+ writes show the actor and exact contact change, then ask a default-no question.
63
+ JSON, CI, and other noninteractive writes require `--confirm` before the CLI
64
+ creates a client. Contact writes do not start a browser signer.
65
+
66
+ Success data is the SDK value without a CLI wrapper: `list` returns
67
+ `AddressBookEntry[]`, `get` returns `AddressBookEntry | null`, and each mutation
68
+ returns `AddressBookEntry`. Human `get` prints `No contact found` for null and
69
+ exits successfully. Entries retain their stable PartyId, exact reference,
70
+ relationships, hidden state, and last activity time.
71
+
27
72
  ## Organization commands
28
73
 
29
74
  ```sh
@@ -60,6 +105,66 @@ No match returns exit 2. Duplicate matches return exit 1.
60
105
  seconds and defaults to 120. Timeout returns exit 5; interruption returns 130.
61
106
  A successful read can report a failed or pending domain state.
62
107
 
108
+ ## Invitation commands
109
+
110
+ ```sh
111
+ capxul org invite list [--mine] [--limit N] [--cursor C] [--phase PHASE ...] [--org O]
112
+ capxul org invite get --invitation-id I [--org O]
113
+ capxul org invite wait --invitation-id I [--org O] [--timeout-seconds N]
114
+ capxul org invite review --invitation-id I --org O [--timeout-seconds N]
115
+ capxul org invite accept --invitation-id I --offer-digest D --org O [--confirm] [--timeout-seconds N]
116
+ capxul org invite decline --invitation-id I --org O [--confirm]
117
+ capxul org invite cancel --invitation-id I --org O [--confirm]
118
+ capxul org invite resend --invitation-id I --org O [--confirm]
119
+ capxul org invite retry --invitation-id I --org O [--confirm]
120
+ capxul org member invite (--to-email E | --account-id ID) [--budget-id B ...] [--permission-id M ...] [--new-budget-name N --asset A (--limit Q | --unlimited) (--recipient-account ID ... | --any-recipient) --actions pay[,commitments]] --org O [--request-key K] [--preview] [--confirm]
121
+ ```
122
+
123
+ `org invite list` returns your own offers. It accepts `--limit` (1--100),
124
+ `--cursor`, and repeated `--phase` values, and its result carries `invitations`,
125
+ `nextCursor`, and `observedAt`: pass `nextCursor` back as `--cursor`, and change
126
+ no other filter between the two calls. `--mine` names the own-offer projection,
127
+ which is already the default. With `--org O` the command returns that
128
+ Organization's invitations for a current Admin instead; the Organization list is
129
+ not filtered to you, so `--mine` together with `--org` refuses with exit 2. The
130
+ other invitation commands require an exact `--invitation-id`.
131
+
132
+ `org invite get` and `org invite wait` use `--org` when you name it. Without
133
+ `--org` they walk your own-offer pages, 100 rows per request, until they find
134
+ the invitation or the pages end. They never consult the saved read default, and
135
+ an offer you cannot see is refused. `--timeout-seconds` bounds the resolution
136
+ and the read together on both commands.
137
+
138
+ `org invite wait` only reads. It finishes when the offer settles or when the
139
+ recovery asks a person to act. It never retries, resends, or accepts.
140
+
141
+ `org invite review` requires `--org`, returns the current `InvitationView`
142
+ directly in `data`, and performs no write or signing.
143
+
144
+ The four transitions require `--org` in both modes, as `accept` does. They never
145
+ author a new offer. A noninteractive or JSON run requires `--confirm`. An
146
+ interactive run shows the resolved current offer and asks a default-no question.
147
+
148
+ `org member invite` authorizes one exact offer. `--preview` writes nothing and
149
+ needs neither a request key nor confirmation. A noninteractive write requires
150
+ `--request-key` and `--confirm`. An interactive run prints the request key it
151
+ used before it submits, so a lost response is recoverable with the same
152
+ identity. At most one `--new-budget-name` is accepted per command.
153
+
154
+ `org invite accept` is the exact grantee's consent commit. It takes the exact
155
+ digest the offer shows as `--offer-digest`: a noninteractive or JSON run must
156
+ supply it, and without it the command refuses with exit 2 before it creates a
157
+ client. An interactive run may omit it, and then reads the offer and fills the
158
+ digest from the value it displayed. A digest you state is never replaced by the
159
+ displayed one. `--expected-offer` remains a compatibility spelling, and both
160
+ spellings must match when supplied together. The command returns the
161
+ `InvitationView` directly in `data`. The grant is executed by the deployment's
162
+ technical executor, so the command needs no browser bridge and works in a
163
+ headless or CI session. A repeat with the stored digest returns the same
164
+ accepted result; a different digest refuses and cannot overwrite consent. The
165
+ returned view is the authorization-time view of the consent commit
166
+ (`pending_grant`); read the settled `active` state with `get` or `wait`.
167
+
63
168
  ## Organization writes
64
169
 
65
170
  `org create` and `org retry` restore the protected current session and start the
@@ -129,7 +234,7 @@ subscription and the browser bridge.
129
234
  | ------------------------------ | ------------------------------------------------------------------------------------------------------------ |
130
235
  | `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
131
236
  | `CAPXUL_PUBLISHABLE_KEY` | Optional developer override for the bundled first-party staging key. |
132
- | `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
237
+ | `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://site.preview.abuusama.dev`. Convex Cloud origins are rejected. |
133
238
  | `CAPXUL_POSTHOG_HOST` | Optional development override for the built-in public PostHog ingestion origin. |
134
239
  | `CAPXUL_POSTHOG_PROJECT_TOKEN` | Optional development override for the built-in public project ingestion token. |
135
240
  | `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
@@ -162,7 +267,8 @@ unsafe permissions, symlinks, and corrupt state produce a storage failure.
162
267
 
163
268
  ## Output
164
269
 
165
- `--json` writes one version 1 envelope to stdout. Success contains `data`.
270
+ `--json` writes one version 1 envelope to stdout. Success contains `data`, which
271
+ can be an object, array, or null according to the command's SDK result.
166
272
  Failure contains `error.code` and CLI-owned `error.message`. Each envelope has
167
273
  `command`, `invocationId`, and `outcome`. An invocation ID is null before a
168
274
  command starts. Human errors go to stderr.