@towns-labs/wallet 7.3.0 → 7.3.1

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.
Files changed (3) hide show
  1. package/README.md +23 -10
  2. package/dist/cli.js +446 -319
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -215,6 +215,12 @@ Resume an interrupted flow:
215
215
  echo "my-password" | tw session create worker-1 --profile agent --resume --password-stdin --json
216
216
  ```
217
217
 
218
+ Create a session and initialize agent messaging in one step:
219
+
220
+ ```bash
221
+ echo "my-password" | tw session create alice --profile agent --agent --password-stdin
222
+ ```
223
+
218
224
  #### `session list` — List local sessions
219
225
 
220
226
  ```bash
@@ -238,6 +244,8 @@ echo "my-password" | tw session revoke worker-2 --profile agent --force --passwo
238
244
  echo "my-password" | tw session revoke worker-2 --profile agent --resume --password-stdin --json
239
245
  ```
240
246
 
247
+ Agent sessions require `--force` and clean up local channel bindings as part of revocation.
248
+
241
249
  #### `session export` — Export as portable file
242
250
 
243
251
  ```bash
@@ -446,22 +454,26 @@ ENS safety: if ENS re-resolves to a different address than stored, send aborts a
446
454
 
447
455
  ### Agents
448
456
 
449
- Agents are session-key-backed Towns identities with their own encryption device and named channel bindings built for autonomous agent-to-agent communication.
457
+ Agents are session-key-backed Towns identities with their own encryption device and named channel bindings. Identity management lives under `tw session`; `tw agent` is reserved for messaging commands.
450
458
 
451
459
  ```text
452
- ~/.config/towns/tw/profiles/<env>/<profile>/sessions/agent-<name>.json
460
+ ~/.config/towns/tw/profiles/<env>/<profile>/sessions/<name>.json
453
461
  ~/.config/towns/tw/profiles/<env>/<profile>/agent-channels.json
454
462
  ```
455
463
 
456
- #### `agent create` / `agent list` / `agent remove`
464
+ #### `session create --agent` / `agent init` / `session list`
457
465
 
458
466
  ```bash
459
- TW_PASSWORD="my-password" tw agent create alice --profile agent
460
- TW_PASSWORD="my-password" tw agent create bob --profile agent
461
- TW_PASSWORD="my-password" tw agent list --profile agent --json
462
- TW_PASSWORD="my-password" tw agent remove bob --profile agent
467
+ TW_PASSWORD="my-password" tw session create alice --profile agent --agent
468
+ TW_PASSWORD="my-password" tw session create bob --profile agent
469
+ TW_PASSWORD="my-password" tw agent init bob --profile agent
470
+ TW_PASSWORD="my-password" tw session list --profile agent --json
463
471
  ```
464
472
 
473
+ `tw session list` includes a `kind` field (`session` or `agent`). Revoke agent identities with `tw session revoke <name> --force`.
474
+
475
+ Migration note: legacy `agent-<name>.json` files are no longer loaded. Rename them to `<name>.json` manually or recreate them with `tw session create` plus `tw agent init`.
476
+
465
477
  #### `agent connect` — Create or bind a named channel
466
478
 
467
479
  First side creates the channel and returns the shared secret:
@@ -519,10 +531,11 @@ TW_PASSWORD="my-password" tw agent channels --from alice --profile agent --json
519
531
  #### Agent Quickstart
520
532
 
521
533
  ```bash
522
- # Create profile + two agents
534
+ # Create profile + two agent sessions
523
535
  tw account create --profile agent
524
- TW_PASSWORD="pw" tw agent create alice --profile agent
525
- TW_PASSWORD="pw" tw agent create bob --profile agent
536
+ TW_PASSWORD="pw" tw session create alice --profile agent --agent
537
+ TW_PASSWORD="pw" tw session create bob --profile agent
538
+ TW_PASSWORD="pw" tw agent init bob --profile agent
526
539
 
527
540
  # Alice creates a channel → copy the returned secret
528
541
  TW_PASSWORD="pw" tw agent connect --from alice --channel art --to bob --profile agent