@aomi-labs/client 0.1.9 → 0.1.11

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
@@ -182,10 +182,12 @@ Pending (1):
182
182
 
183
183
  $ npx @aomi-labs/client sign tx-1 --private-key 0xac0974...
184
184
  Signer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
185
- ID: tx-1
185
+ IDs: tx-1
186
186
  Kind: transaction
187
- To: 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
187
+ Tx: tx-1 -> 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
188
188
  Value: 1000000000000000000
189
+ Chain: 1
190
+ Exec: aa (alchemy, 7702; fallback: eoa)
189
191
  ✅ Sent! Hash: 0xabc123...
190
192
  Backend notified.
191
193
 
@@ -206,7 +208,7 @@ Pending (1):
206
208
 
207
209
  $ npx @aomi-labs/client sign tx-2 --private-key 0xac0974...
208
210
  Signer: 0xf39Fd...92266
209
- ID: tx-2
211
+ IDs: tx-2
210
212
  Kind: eip712_sign
211
213
  Desc: Sign CoW swap order
212
214
  Type: Order
@@ -214,8 +216,10 @@ Type: Order
214
216
  Backend notified.
215
217
  ```
216
218
 
217
- Pending and signed transactions are persisted in `$TMPDIR/aomi-session.json`
218
- alongside the session pointer, so they survive between CLI invocations.
219
+ By default, `aomi sign` tries account abstraction first. In default mode the CLI
220
+ retries unsponsored Alchemy AA when sponsorship is unavailable, then falls back
221
+ to direct EOA signing automatically if AA still fails. Use `--aa` to require AA
222
+ only, or `--eoa` to force EOA only.
219
223
 
220
224
  ### Verbose mode & conversation log
221
225
 
@@ -251,8 +255,8 @@ All config can be passed as flags (which take priority over env vars):
251
255
  | Flag | Env Variable | Default | Description |
252
256
  |------|-------------|---------|-------------|
253
257
  | `--backend-url` | `AOMI_BASE_URL` | `https://api.aomi.dev` | Backend URL |
254
- | `--api-key` | `AOMI_API_KEY` | — | API key for non-default namespaces |
255
- | `--namespace` | `AOMI_NAMESPACE` | `default` | Namespace |
258
+ | `--api-key` | `AOMI_API_KEY` | — | API key for non-default apps |
259
+ | `--app` | `AOMI_APP` | `default` | App |
256
260
  | `--model` | `AOMI_MODEL` | — | Model rig to apply before chat |
257
261
  | `--public-key` | `AOMI_PUBLIC_KEY` | — | Wallet address (tells agent your wallet) |
258
262
  | `--private-key` | `PRIVATE_KEY` | — | Hex private key for `aomi sign` |
@@ -268,18 +272,26 @@ npx @aomi-labs/client chat "hello" --backend-url https://my-backend.example.com
268
272
  npx @aomi-labs/client chat "send 0.1 ETH to vitalik.eth" \
269
273
  --public-key 0xYourAddress \
270
274
  --api-key sk-abc123 \
271
- --namespace my-agent \
275
+ --app my-agent \
272
276
  --model claude-sonnet-4
273
277
  npx @aomi-labs/client sign tx-1 \
274
278
  --private-key 0xYourPrivateKey \
275
279
  --rpc-url https://eth.llamarpc.com
276
280
  ```
277
281
 
282
+ ### Signing modes
283
+
284
+ `aomi sign` supports three practical modes:
285
+
286
+ - Default: AA first, then automatic EOA fallback if AA is unavailable or fails
287
+ - `--aa`: require AA and do not fall back to EOA
288
+ - `--eoa`: force direct EOA execution
289
+
278
290
  ### How state works
279
291
 
280
292
  The CLI is **not** a long-running process — each command starts, runs, and
281
293
  exits. Conversation history lives on the backend. Between invocations, the CLI
282
- persists a small JSON file to `$TMPDIR/aomi-session.json`:
294
+ persists local state under `AOMI_STATE_DIR` or `~/.aomi` by default:
283
295
 
284
296
  | Field | Purpose |
285
297
  |-------|---------|
@@ -295,7 +307,8 @@ $ npx @aomi-labs/client chat "hello" # creates session, saves sessionI
295
307
  $ npx @aomi-labs/client chat "swap 1 ETH" # reuses session, queues tx-1 if wallet request arrives
296
308
  $ npx @aomi-labs/client sign tx-1 # signs tx-1, moves to signedTxs, notifies backend
297
309
  $ npx @aomi-labs/client tx # shows all txs
298
- $ npx @aomi-labs/client close # wipes state file
310
+ $ npx @aomi-labs/client close # clears the active local session pointer
299
311
  ```
300
312
 
301
- The state file lives in your OS temp directory and gets cleaned up on reboot.
313
+ Session files live under `~/.aomi/sessions/` by default, with an active session
314
+ pointer stored in the state root.