@xmtp/convos-cli 0.1.0 → 0.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmtp/convos-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A command-line interface for Convos — privacy-focused messaging built on XMTP",
5
5
  "keywords": [
6
6
  "convos",
@@ -406,11 +406,14 @@ The agent uses an **ndjson** (newline-delimited JSON) protocol:
406
406
  | Event | Description | Key Fields |
407
407
  | ----- | ----------- | ---------- |
408
408
  | `ready` | Session started | `conversationId`, `inviteUrl`, `inboxId` |
409
- | `message` | New message received | `id`, `senderInboxId`, `content`, `contentType`, `sentAt` |
410
- | `member_joined` | Member joined via invite | `inboxId`, `conversationId` |
411
- | `sent` | Message sent confirmation | `id`, `text`, `replyTo` (optional) |
409
+ | `message` | New message received | `id`, `senderInboxId`, `content`, `contentType`, `sentAt`, `catchup` (optional) |
410
+ | `member_joined` | Member joined via invite | `inboxId`, `conversationId`, `catchup` (optional) |
411
+ | `sent` | Message sent confirmation | `id`, `text`, `replyTo` (optional), `type` (optional) |
412
+ | `heartbeat` | Periodic health check | `conversationId`, `activeStreams` |
412
413
  | `error` | Error occurred | `message` |
413
414
 
415
+ Messages with `catchup: true` were fetched during stream reconnection (missed while disconnected).
416
+
414
417
  #### Commands (stdin)
415
418
 
416
419
  ```jsonl
@@ -422,6 +425,11 @@ The agent uses an **ndjson** (newline-delimited JSON) protocol:
422
425
  {"type":"attach","file":"./photo.jpg","replyTo":"<message-id>"}
423
426
  {"type":"attach","file":"./photo.jpg","mimeType":"image/jpeg"}
424
427
  {"type":"remote-attach","url":"https://...","contentDigest":"<hex>","secret":"<base64>","salt":"<base64>","nonce":"<base64>","contentLength":12345,"filename":"photo.jpg"}
428
+ {"type":"rename","name":"New Group Name"}
429
+ {"type":"lock"}
430
+ {"type":"unlock"}
431
+ {"type":"explode"}
432
+ {"type":"explode","scheduled":"2025-03-01T00:00:00Z"}
425
433
  {"type":"stop"}
426
434
  ```
427
435
 
@@ -431,10 +439,16 @@ The agent uses an **ndjson** (newline-delimited JSON) protocol:
431
439
  | `react` | `messageId`, `emoji` | `action` (`add`/`remove`, default: `add`) |
432
440
  | `attach` | `file` (local path) | `mimeType`, `replyTo` |
433
441
  | `remote-attach` | `url`, `contentDigest`, `secret`, `salt`, `nonce`, `contentLength` | `filename`, `scheme` |
442
+ | `rename` | `name` | — |
443
+ | `lock` | — | — |
444
+ | `unlock` | — | — |
445
+ | `explode` | — | `scheduled` (ISO8601 date) |
434
446
  | `stop` | — | — |
435
447
 
436
448
  Small attachments (≤1MB) are sent inline. Larger files are auto-encrypted and uploaded via the configured upload provider (e.g., Pinata).
437
449
 
450
+ **Lock** prevents new members from joining by rotating the invite tag and setting addMember permission to deny. **Unlock** reverses this (previously shared invites remain invalid). **Explode** permanently destroys the conversation — sends ExplodeSettings notification, removes members, and deletes the local identity. Immediate explode triggers agent shutdown. **Rename** updates the conversation name visible to all members.
451
+
438
452
  ### How It Works
439
453
 
440
454
  When started, `agent serve`:
@@ -445,9 +459,11 @@ When started, `agent serve`:
445
459
  4. **Processes pending join requests** from before the agent started
446
460
  5. **Streams messages** — emits `message` events as they arrive in real-time
447
461
  6. **Streams DM join requests** — automatically adds new members and emits `member_joined`
448
- 7. **Reads stdin** — accepts `send` and `stop` commands
462
+ 7. **Reads stdin** — accepts `send`, `rename`, `lock`, `unlock`, `explode`, and `stop` commands
463
+ 8. **Emits heartbeat** (optional) — periodic health check events when `--heartbeat` is set
464
+ 9. **Catches up on reconnect** — if a stream disconnects and reconnects, fetches any missed messages since the last seen timestamp
449
465
 
450
- All of these run concurrently. The agent stays alive until `SIGINT`, `SIGTERM`, stdin close, or a `stop` command.
466
+ All of these run concurrently. The agent stays alive until `SIGINT`, `SIGTERM`, stdin close, a `stop` command, or an immediate `explode`.
451
467
 
452
468
  ### Example: Agent Integration
453
469
 
@@ -486,6 +502,7 @@ done
486
502
  | `--identity` | Use an existing unlinked identity |
487
503
  | `--label` | Local label for the identity |
488
504
  | `--no-invite` | Skip generating an invite (attach mode) |
505
+ | `--heartbeat` | Emit heartbeat events every N seconds (0 to disable, default: 0) |
489
506
 
490
507
  ## Important Concepts
491
508