@ghostlytools/cli 1.11.3 → 1.11.4

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 (92) hide show
  1. package/README.md +27 -22
  2. package/SKILL.md +4 -2
  3. package/dist/assets/{api-DgU4MZPD.js → api-BwyFq4lA.js} +2 -2
  4. package/dist/assets/{api-DBlaoz8i.js → api-MYc6QNRs.js} +187 -87
  5. package/dist/assets/api-MYc6QNRs.js.map +1 -0
  6. package/dist/assets/{apiKit-DesObIDf.js → apiKit-CfsNx9ZR.js} +60 -14
  7. package/dist/assets/apiKit-CfsNx9ZR.js.map +1 -0
  8. package/dist/assets/{appFetch-C8yZIq1e.js → appFetch-DVYZOZFw.js} +2 -2
  9. package/dist/assets/{appFetch-C8yZIq1e.js.map → appFetch-DVYZOZFw.js.map} +1 -1
  10. package/dist/assets/{apps-rzxsjfBV.js → apps-Dbw2Hcko.js} +1 -1
  11. package/dist/assets/{apps-DkMjDHML.js → apps-h12II1us.js} +52 -30
  12. package/dist/assets/apps-h12II1us.js.map +1 -0
  13. package/dist/assets/{arkade-CarKONmH.js → arkade-Bw_4PZRG.js} +2 -2
  14. package/dist/assets/{arkade-CarKONmH.js.map → arkade-Bw_4PZRG.js.map} +1 -1
  15. package/dist/assets/{backup-CgWU7x0T.js → backup-CdEzTq5C.js} +1 -1
  16. package/dist/assets/{backup-C0OJCJlM.js → backup-Chvy79SN.js} +49 -36
  17. package/dist/assets/backup-Chvy79SN.js.map +1 -0
  18. package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
  19. package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
  20. package/dist/assets/{buttons-fZTEa_2i.js → buttons-BgoExb4E.js} +6 -5
  21. package/dist/assets/{buttons-fZTEa_2i.js.map → buttons-BgoExb4E.js.map} +1 -1
  22. package/dist/assets/buttons-DK2aAGat.js +2 -0
  23. package/dist/assets/{client-Ibk3-e60.js → client-DY8tZZWi.js} +28 -8
  24. package/dist/assets/client-DY8tZZWi.js.map +1 -0
  25. package/dist/assets/{codec-DMpQqVSt.js → codec-BnMg-Grj.js} +2 -2
  26. package/dist/assets/{codec-DMpQqVSt.js.map → codec-BnMg-Grj.js.map} +1 -1
  27. package/dist/assets/{envelope-CvQVCGdf.js → envelope-CdV7vHVZ.js} +2 -2
  28. package/dist/assets/{envelope-CvQVCGdf.js.map → envelope-CdV7vHVZ.js.map} +1 -1
  29. package/dist/assets/{errors-Dt-ZnyOX.js → errors-CAh6GLJZ.js} +27 -2
  30. package/dist/assets/errors-CAh6GLJZ.js.map +1 -0
  31. package/dist/assets/{fedimintSdk-zV_5Qdqz.js → fedimintSdk-CPFfVK-G.js} +2 -2
  32. package/dist/assets/{fedimintSdk-zV_5Qdqz.js.map → fedimintSdk-CPFfVK-G.js.map} +1 -1
  33. package/dist/assets/{fixedHosts-6gKn8dp2.js → fixedHosts-CbgqrIKs.js} +3 -3
  34. package/dist/assets/{fixedHosts-6gKn8dp2.js.map → fixedHosts-CbgqrIKs.js.map} +1 -1
  35. package/dist/assets/{host-CYlIiY3r.js → host-C0NMNQLl.js} +556 -126
  36. package/dist/assets/host-C0NMNQLl.js.map +1 -0
  37. package/dist/assets/{hyperdhtRelay-CdsLcAhY.js → hyperdhtRelay-Dz7pvcBA.js} +2 -2
  38. package/dist/assets/{hyperdhtRelay-CdsLcAhY.js.map → hyperdhtRelay-Dz7pvcBA.js.map} +1 -1
  39. package/dist/assets/{irohWeb-D2IuloLL.js → irohWeb-caAj4Dms.js} +7 -7
  40. package/dist/assets/{irohWeb-D2IuloLL.js.map → irohWeb-caAj4Dms.js.map} +1 -1
  41. package/dist/assets/{main-C0PfjKTe.js → main-C6t5zrD5.js} +298 -92
  42. package/dist/assets/main-C6t5zrD5.js.map +1 -0
  43. package/dist/assets/{mainline-Cu61qcPS.js → mainline-DCuGUSZF.js} +2 -2
  44. package/dist/assets/{mainline-Cu61qcPS.js.map → mainline-DCuGUSZF.js.map} +1 -1
  45. package/dist/assets/{networkReason-Dt7Yx_n4.js → networkReason-BbQW1Xpc.js} +3 -3
  46. package/dist/assets/{networkReason-Dt7Yx_n4.js.map → networkReason-BbQW1Xpc.js.map} +1 -1
  47. package/dist/assets/{nwc-CtZypDcv.js → nwc-CSDRMZ0e.js} +3 -3
  48. package/dist/assets/{nwc-CtZypDcv.js.map → nwc-CSDRMZ0e.js.map} +1 -1
  49. package/dist/assets/{nwcProvider-DYHkd0iu.js → nwcProvider-PE0wli8n.js} +2 -2
  50. package/dist/assets/{nwcProvider-DYHkd0iu.js.map → nwcProvider-PE0wli8n.js.map} +1 -1
  51. package/dist/assets/{ownDid-CJ0ta8CL.js → ownDid-C1R5Kd8q.js} +2 -2
  52. package/dist/assets/{ownDid-CJ0ta8CL.js.map → ownDid-C1R5Kd8q.js.map} +1 -1
  53. package/dist/assets/{ownStatus-D4HC6tNR.js → ownStatus-BoTf5WqQ.js} +19 -6
  54. package/dist/assets/ownStatus-BoTf5WqQ.js.map +1 -0
  55. package/dist/assets/{profiles-Ccdq6Xf6.js → profiles-DszHjEJi.js} +25 -10
  56. package/dist/assets/profiles-DszHjEJi.js.map +1 -0
  57. package/dist/assets/{registry-LvxsLJ5S.js → registry-Da-r6eC3.js} +17 -10
  58. package/dist/assets/registry-Da-r6eC3.js.map +1 -0
  59. package/dist/assets/{registry-CE0PpQAE.js → registry-zUZBSHYv.js} +1 -1
  60. package/dist/assets/{resolve-6kVu2DE5.js → resolve-tUzh4lHh.js} +2 -2
  61. package/dist/assets/{resolve-6kVu2DE5.js.map → resolve-tUzh4lHh.js.map} +1 -1
  62. package/dist/assets/{secretGuard-B7Hj0Kvz.js → secretGuard-CsVHDdYk.js} +68 -6
  63. package/dist/assets/{secretGuard-B7Hj0Kvz.js.map → secretGuard-CsVHDdYk.js.map} +1 -1
  64. package/dist/assets/secretGuard-DCb1I0_B.js +2 -0
  65. package/dist/assets/{server-Q3VcNqGt.js → server-C1jZZ61O.js} +667 -196
  66. package/dist/assets/server-C1jZZ61O.js.map +1 -0
  67. package/dist/assets/{src-DjVj2ynY.js → src-DJe-OYxd.js} +826 -198
  68. package/dist/assets/src-DJe-OYxd.js.map +1 -0
  69. package/dist/assets/{sshForges-DeZ9cN9Q.js → sshForges-C9zTO72R.js} +2 -2
  70. package/dist/assets/{sshForges-DeZ9cN9Q.js.map → sshForges-C9zTO72R.js.map} +1 -1
  71. package/dist/assets/{translate-iQZq4TnY.js → translate-CUuC5szR.js} +3 -3
  72. package/dist/assets/{translate-iQZq4TnY.js.map → translate-CUuC5szR.js.map} +1 -1
  73. package/dist/assets/{usdt-DnyTGdTX.js → usdt-DI51znt-.js} +3 -3
  74. package/dist/assets/{usdt-DnyTGdTX.js.map → usdt-DI51znt-.js.map} +1 -1
  75. package/dist/ghostly.mjs +1 -1
  76. package/npm-shrinkwrap.json +2 -2
  77. package/package.json +1 -1
  78. package/dist/assets/api-DBlaoz8i.js.map +0 -1
  79. package/dist/assets/apiKit-DesObIDf.js.map +0 -1
  80. package/dist/assets/apps-DkMjDHML.js.map +0 -1
  81. package/dist/assets/backup-C0OJCJlM.js.map +0 -1
  82. package/dist/assets/buttons-Cco0Agfa.js +0 -2
  83. package/dist/assets/client-Ibk3-e60.js.map +0 -1
  84. package/dist/assets/errors-Dt-ZnyOX.js.map +0 -1
  85. package/dist/assets/host-CYlIiY3r.js.map +0 -1
  86. package/dist/assets/main-C0PfjKTe.js.map +0 -1
  87. package/dist/assets/ownStatus-D4HC6tNR.js.map +0 -1
  88. package/dist/assets/profiles-Ccdq6Xf6.js.map +0 -1
  89. package/dist/assets/registry-LvxsLJ5S.js.map +0 -1
  90. package/dist/assets/secretGuard-DUr6bgKc.js +0 -2
  91. package/dist/assets/server-Q3VcNqGt.js.map +0 -1
  92. package/dist/assets/src-DjVj2ynY.js.map +0 -1
package/README.md CHANGED
@@ -62,8 +62,9 @@ ghostly listen --type message.received --cursor "${GHOSTLY_HOME:-$HOME/.ghostly}
62
62
  ```
63
63
 
64
64
  The cursor file keeps the last event handled, so a restarted bot goes on where it stopped; it sits in the Ghostly
65
- folder in use. With another folder or profile, set `GHOSTLY_HOME` or `GHOSTLY_PROFILE` rather than `--home` or
66
- `--profile`: the environment reaches the hook's own `ghostly send`, a flag does not. The example script takes
65
+ folder in use. With another folder, set `GHOSTLY_HOME` rather than `--home`: the cursor's path above reads it. The
66
+ hook's own `ghostly send` runs on the folder and profile `listen` runs on, given as a flag or in the environment
67
+ (`listen` sets `GHOSTLY_HOME` and `GHOSTLY_PROFILE` for it). The example script takes
67
68
  `ECHO_CURSOR` for the cursor's path (default `echo.cursor` in `GHOSTLY_HOME`, else `~/.ghostly`); give each bot and
68
69
  profile its own.
69
70
 
@@ -95,7 +96,8 @@ Bots should run the daemon: a one-shot is offline between commands.
95
96
 
96
97
  ## Commands
97
98
 
98
- Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}` and exits with:
99
+ Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}` (on stderr for `call pipe`,
100
+ whose stdout is the call's audio) and exits with:
99
101
  `1` failed (the engine or the network refused), `2` usage, `3` not found, `4` timed out, `5` needs a confirmation
100
102
  (`--force`, `--yes`, `--confirm-real`), `130` stopped with Ctrl-C (`interrupted`: a one-shot closes its profile first,
101
103
  and a line on stderr says what became of what it waited on). A daemon that does not answer a read or `daemon status` within 15 seconds, or
@@ -114,12 +116,12 @@ The rows are in alphabetical order of their first command, and every command of
114
116
  |---|---|
115
117
  | `app init <dir> [--name <name>] [--title <title>] [--force]` | Start an app (WISP 1200, Apps), run here with no profile or daemon: a small working one in `<dir>` (made when missing), which `app publish <dir>` signs as it is. It writes `ghostly-app.json` (`view: chat`, the `chat` permission), an `index.html` that says hello to the same app on the contact's side, typed against `@ghostlytools/sdk/app`, and a `README.md` with build, publish, verify and how to list it in a store. The name is `--name` (a lowercase letter, then up to 31 lowercase letters, digits or hyphens), else the folder's (`My App` gives `my-app`); the title is `--title` (one line, up to 40 characters), else the name's. When one of the three files is there nothing is written and it is `refused` (`details.reason` `exists`, `details.files`), unless `--force`, which replaces those three only. Answers `{dir, name, title, files, replaced?, next}` |
116
118
  | `app open <chat> <ref\|name> [--no-card]`, `app close <chat> <ref\|name>` | A served app in a chat, as a bot (WISP 1200, Apps; needs the daemon, and `app serve` first). `app open` says the app is open on this side, in the version served, and sends the contact the app's card ("opened Chess", with what their app needs to get the same app and check it), unless their app is open in that chat already or `--no-card`. The two sides talk once both opened it; while the app stays open here, the engine says so again on every session that comes back. It answers `{chat, app, version, card, peer, live}`: `card` is the card's message id or null, `peer` the version the contact has open or null. A card that cannot go leaves nothing open. `app close` ends it: `{chat, app, closed}`. What is open is kept in memory: a restarted daemon opens again. `unavailable` in a one-shot, or on a daemon that started before the first app was served (`daemon restart`); `not_found` for an app not served; `refused`, in the engine's words, for a chat that is not a paired 1:1 chat |
117
- | `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
118
- | `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence is a usage error unless `--force` (versions published from elsewhere), and `app publish` refuses a sequence the folder's `ghostly-revoke.json` already stops, naming the `--sequence` that clears it. The statement names the app of `<dir>/app.ghostlyapp` (or `--bundle`), is signed with that app's publisher key (any other key is refused, and none is made here), and is added to `<dir>/ghostly-revoke.json`, published beside the bundle; a client that reads it stops those versions. Answers `{app, digests \| upTo, current, added, revocations, file}`; `current` says whether the bundle in `<dir>` is among them |
119
+ | `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` or the one beside `--out` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
120
+ | `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence asks for `--force` (`confirm`, exit 5; versions published from elsewhere), and `app publish` refuses a sequence that list already stops, naming the `--sequence` that clears it. The statement names the app of `<dir>/app.ghostlyapp` (or `--bundle`), is signed with that app's publisher key (any other key is refused, and none is made here), and is added to the `ghostly-revoke.json` beside that bundle, where `app verify`, `app serve` and a client read it and stop those versions (publish it beside the bundle). Answers `{app, digests \| upTo, current, added, revocations, file}`; `current` says whether that bundle is among them, `file` the list written |
119
121
  | `app send <chat> <ref\|name> <json\|->` | One message of a served app's own protocol to the same app on the contact's side (WISP 1200, Apps; needs the daemon): any JSON value, on the command line or `-` for stdin, at most 32 KiB, at most 48 a second. It goes on the live session only, while both sides have the app open, and is never kept for later: `{chat, app, sent: true}`, or an error whose `details.reason` is the WISP's name for why it did not go: `not-open` (`refused`: `app open` first), `too-large` (`bad_request`), `offline` and `peer-closed` (`unavailable`: the chat is not live, or the contact's app is not open; wait for `app.opened`), `too-fast` (`refused`). The contact's messages come as `app.message` events |
120
- | `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle (`--url`, else the URL served from, else the manifest's first source). The list is kept in the profile's folder (`apps.json`), and a `profile backup` carries it to the restored copy. A profile's engine offers `apps/1` to contacts only while it serves an app, and reads the list when it starts: `offered` says whether it does now, and `restart: true` that `daemon restart` is needed for it. `app served` answers `{apps, offered, restart?}`; `app unserve` removes one by its reference or its name |
122
+ | `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle, on raw.githubusercontent.com or cdn.jsdelivr.net at a full commit: `--url` (any other link is `bad_request`), else the first of the URL served from and the manifest's sources that a contact's app reads from, and none when there is no such link. The list is kept in the profile's folder (`apps.json`), and a `profile backup` carries it to the restored copy. A profile's engine offers `apps/1` to contacts only while it serves an app, and reads the list when it starts: `offered` says whether it does now, and `restart: true` that `daemon restart` is needed for it. `app served` answers `{apps, offered, restart?}`; `app unserve` removes one by its reference or its name |
121
123
  | `button press <chat\|group> <message> <button> [--wait none\|sent\|delivered] [--timeout s]` | Press a button of someone else's question, as a tap in the app does (WISP 406 · Message Buttons): the reply carries the button's label, and the asker hears `button.pressed`. `<message>` is the question's id (its event or `chat history`), `<button>` a button's id from its `card`. Refused (exit 1) like a tap: closed buttons, a second answer past `--once`, a second press within a second. A one-shot in a chat waits until it went out, as `send`. Answers `{chat \| group, messageId, button, label, replyId, delivery \| edges}` |
122
- | `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
124
+ | `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if blank, or if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
123
125
  | `call auto [on\|off] [--from <chat>]… [--rate n]` | Answer calls by themselves, from anyone or the chats named (kept in the profile) |
124
126
  | `call hangup [<chat\|call>]`, `call list`, `call flush [<chat\|call>]` | Hang up (or decline); calls on now; drop the audio queued and not played yet |
125
127
  | `call pipe [<chat\|call>]` | A call's audio on stdin and stdout, for shell pipelines (sox, ffmpeg) |
@@ -129,8 +131,8 @@ The rows are in alphabetical order of their first command, and every command of
129
131
  | `chat history <chat> [--limit n] [--before x] [--after x] [--translate lang]` | Messages, oldest first; `x` is a message id or a time in ms ([Translation](#translation)) |
130
132
  | `chat list [--show-secret]`, `chat show <chat> [--show-secret]` | Chats, and one chat's connection: transports, last attempt, comparison code. `pairing` is connecting, negotiating, confirm, waiting, ready or error, and `connectionError` says why it failed (null when nothing did). A pending chat's `invite` prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the chat's first message, as every time not reached yet is |
131
133
  | `chat pay <chat> <sats> [--memo t] [--network n] [--confirm-real]` | Ecash to a contact. A contact that offers no way of paying is `refused`: `details.reason` `contact_no_wallet` (it has no wallet yet) or `contact_payments_off` (it has payments off in this chat, or an older app). With no Cashu wallet of the network on this side, `refused` with `details.reason` `no_wallet` and the `wallet create` command to run; with one too short of sats, `refused`. It names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
132
- | `chat rename <chat> <name>`, `chat remove <chat> --yes [--force]` | Name it here (up to 48 characters, counted as stored: a tab or a line break is a space and invisible characters go, so a name with nothing that shows is refused; counted in code points, so a joined emoji counts as several, and a name too long is refused with its count in `details.length` and `details.max`; an empty name gives back the contact's own); delete it (keys and history) here, closing the contact's services opened from it (`service open`), refused (`busy`) while a call is on in it: hang the call up first; refused (`confirm`, the messages in `details.messages`) while a message you deleted for everyone has not reached the contact yet, as removing the chat would leave it on their device: `--force` removes it anyway |
133
- | `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. Refused as `chat pay` is when the contact offers no way of paying, or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
134
+ | `chat rename <chat> [name...]`, `chat remove <chat> --yes [--force]` | Name it here (up to 48 characters, counted as stored: a tab or a line break is a space and invisible characters go, so a name with nothing that shows is refused; counted in code points, so a joined emoji counts as several, and a name too long is refused with its count in `details.length` and `details.max`; no name, or an empty one, gives back the contact's own); delete it (keys and history) here, closing the contact's services opened from it (`service open`), refused (`busy`) while a call is on in it: hang the call up first; refused (`confirm`, the messages in `details.messages`) while a message you deleted for everyone has not reached the contact yet, as removing the chat would leave it on their device: `--force` removes it anyway |
135
+ | `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. With `--method usdt` the amount is in USDT, as the app reads it (`5` is 5 USDT, `0.25` a quarter; on the socket API, `amount` as text: a number there is base units). The answer says the amount asked: `amount` and `unit`, and for USDT `decimals` (base units make one USDT), with the few base units the app adds so the payment can be told apart (5.000417 USDT); `payment list` carries `decimals` for USDT too. Refused as `chat pay` is when the contact offers no way of paying (`contact_no_wallet` too when it has no wallet of the `--method` or network asked, with the `wallet create` command it needs), or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
134
136
  | `chat transport <chat> <auto\|dht\|webrtc\|iroh\|hyperdht>` | What carries the chat |
135
137
  | `chat verify <chat> --code <code>` | Mark the contact verified after comparing the codes out of band |
136
138
  | `chat wait <chat> [--until live\|text\|paired] [--timeout s]` | Wait for a chat to go live, carry text, or see its contact. Live means a session that exists now, in this run of the daemon: a chat that was live before a restart counts once its contact answers again. Paired answers at once for a chat that paired before, whether its contact is online or not |
@@ -138,12 +140,12 @@ The rows are in alphabetical order of their first command, and every command of
138
140
  | `edit <chat> <message> [text… \| --text <text> \| --stdin] [--force] [--wait none\|confirmed] [--timeout s]` | Replace the text of a message you sent (1:1 chats, `group edit` for a group; `<message>` is the `messageId` `send` gave, or its wire id). The contact sees it in place, marked edited; `--wait confirmed` waits for its app to confirm (the default without a daemon). At most 100 edits a message, no time limit; an older contact app gets it once it shows edits |
139
141
  | `engine <method> [json \| -] [--confirm-real] [--show-secret] [--yes] [--force]`, `engine --list [--verbose]` | Any call of the app's engine; `--verbose` lists what each takes (`{ linkId, label }`, `?` for an optional key). A call given less than it takes is refused as `bad_request`. One that deletes chats or groups (`clearProfileData`, `removeLink`, `leaveGroup`, `forgetGroup`, `deviceRemove`) needs `--yes`; `clearProfileData` answers what it removed and stops a daemon. `removeLink`, and `setChatTransport` or `setDeliveryMode` to `dht`, are refused (`busy`) while a call is on in the chat, as `chat remove` and `chat transport dht` are; `removeLink` while a delete for everyone has not reached the contact, as `chat remove` is, and `clearProfileData` while one has not in any chat, until `--force`; `clearProfileData` while a call is on in any chat. One that sends a text that looks like a secret (`sendMessage`, `sendGroupMessage`, `editMessage`, `forwardMessages`, a payment's memo or comment, a file's name, a group's name in `createGroup` or `renameGroup`, the nick in `updateSettings`) needs `--force` |
140
142
  | `events [--since seq] [--translate lang]` | What the event journal holds, without following ([Translation](#translation)) |
141
- | `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out. One the contact paused (`pausedBy: "peer"`) goes on only when they resume it: `file resume`, `file request` and `file resend` of it are `refused` |
143
+ | `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out. One the contact paused (`pausedBy: "peer"`) goes on only when they resume it: `file resume`, `file request` and `file resend` of it are `refused`, as are `file pause`, `file resume` and `file request` of one offered here that waits for `file accept` |
142
144
  | `file resend [<chat>] <file>`, `file request [<chat>] <file>` | A file that stopped moving: sent again from here, or asked for again from the contact (a group's file: from whoever holds it); either goes on from the bytes the receiver holds (files/3) |
143
- | `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force`; an unfinished one says how many bytes are here; `--wait` waits for a received one first (a sent one is all here) |
145
+ | `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force`: a name taken in `--dir` is answered with the next free `--path … (2)` that keeps both; an unfinished one says how many bytes are here (exit `1`), one that waits for you to take it answers `5` naming `file accept`, with or without `--wait`; `--wait` waits for a received one first (a sent one is all here) |
144
146
  | `file send <chat\|group> <path> [--name n] [--mime t] [--voice [ms] [--peaks …]] [--reply <message>] [--force] [--wait none\|sent] [--timeout s]` | A file, or a voice note (its length and waveform measured from the file unless given); `--reply` quotes a message, as `send --reply` does. Answers the message's `messageId` (what `message delete`, `react` and `pin` take) and the file's id. Without a daemon, a file to a chat stays until the contact has all of it (`--wait sent`, the default there; `--timeout`, 300 s, then exit 4 with the `messageId` and the file's id in `details`, and it goes on with your next command; a file over 25 MiB waits for the contact's `file accept` meanwhile); `--wait none` answers at once, as a daemon does by default. To a group (`group:<id>` when a chat has the same name), up to 100 MiB: every member sees it at once and each member's app fetches it from a member who has it (WISP 503) |
145
147
  | `file wait [<chat>] <file> [--timeout s]` | Wait until a transfer ends: exit `0` when the file is all here, `1` with the transfer's error when it failed (`details.retry`: `file resend` can go on), `4` on timeout (default 300 s), `5` at once when a received file waits for you to take it (over 25 MiB, or a group's file that did not come by itself): the message names `file accept` |
146
- | `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once) |
148
+ | `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once). A wait that ends short (a timeout, exit 4) has the results in `details` too, next to the copy's `messageId`; a refusal comes first |
147
149
  | `group auto [on\|off] [--from <chat>]…` | Accept group invitations by themselves, only those over the chats named (their id, their contact's key or a label given here; `on` needs at least one, and names them all: a new `on` replaces the list): the daemon accepts them at once, and on start those that came while it was down; any other waits for `group accept`. Kept in the profile's `groups.json` with each chat's contact key: a removed chat, or one whose contact's key changed, leaves the list. When the 32 waiting invitations are full, one over a chat on the list takes the place of the oldest waiting from the chat that holds the most (its inviter is told no). An invitation over a chat on the list kept beside another contact's under the same group id (`others`) is the one taken, the other told no, while the group held is only an invitation not answered yet; beside a group joined or accepted it waits for you (a line in the log). With no argument, prints `{autoJoin: {on, from}}`; `group list` carries it too. Each accept is a line in the daemon's log |
148
150
  | `group create <name> [--mesh] [--force]`, `group join [<link> \| -]` | A community (a link anyone can open), or a private mesh. `group join` reads the link from stdin when none is given or `-` (on the command line it shows in `ps` and the shell's history, and the CLI warns). `group join` with the link of a community the profile was removed from asks to be let in again, and keeps its history |
149
151
  | `group edit <group> <message> [text… \| --text <text> \| --stdin] [--mention <member>]… [--force]` | Replace the text of a message you sent to the group (`<message>` is the `messageId` `group send` gave). Every member sees it in place, marked edited; mentions whose `@name` is still in the text stay, `--mention` adds more. Answers `{group, messageId, edits, sent, edges}`: `edges` and `sent` as for `group send` (`sent: false` while no edge took this edit, also while it waits for the pace); `--wait sent` and `--timeout` as for `group send`. The text the message already has is no edit: `sent: false, unchanged: true`. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, as does `message delete <group> <message> --everyone`. A private group's members whose edge is down get it when it opens, a community's with the catch-up; a member on an older app keeps the old text |
@@ -151,7 +153,7 @@ The rows are in alphabetical order of their first command, and every command of
151
153
  | `group invite <group> <chat>`, `group remove <group> <member>`, `group admin <group> <member>` | Membership, for the admin (each prints the group; `--show-secret` for its link). While the group's link is on, a member removed can join again with it: `group remove` says so on stderr, and `group link <group> --reset` keeps them out. `group invite` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id; `group admin` (and `group hub --pin`) names its member by its key or a prefix of it, never only by the name the member gave itself |
152
154
  | `group leave <group> --yes`, `group forget <group> --yes`, `group accept\|decline <group>` | Membership. Leaving deletes the group's history and files on this device, so it asks for `--yes` (`confirm`, exit 5, without it), as `group forget` does; forget also deletes a group you were removed from, which keeps its history. An admin's leave hands the role to a member who is online and names them: `{left, admin: {key, name}}` |
153
155
  | `group list [--show-secret]`, `group show <group> [--show-secret]`, `group history <group>` | Groups (and `autoJoin`, as `group auto` prints it), members, history; a message names its author (`member` key, `nick` from the roster, or the name an author no longer in it had). A payment note's line (`gpay:<id>`) carries `groupPay`: `{id, kind, from, to, by, claims, amount, decimals, unit, rail, state, test}` (member keys as `group show` prints them, `from` `*` for a request to the whole group; `state` `open`, `sent`, `paid` or `closed`; `by` null when nobody can tell who paid), and the payment's own line on this profile (the request you made, a request that came to you) says `twinOf: "gpay:<id>"`: the same payment, which the app draws once The entry link prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the group's first message. `others` (only when there are some): other groups that came under the same id, kept beside it until you pick, each a contact's invitation (`chat`, `name`, `members`) or a link opened (`link`, hidden the same way); `engine keepGroup '{"groupId":"<id>"}'` keeps the one shown, `engine switchGroup '{"groupId":"<id>","to":"<chat or link>"}'` takes another |
154
- | `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
156
+ | `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. An `<emoji>` that is not one emoji is a usage error (exit 2), as for `react`. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
155
157
  | `group rename <group> <name> [--force]` | A new name, for the admin (up to 64 characters, cleaned and counted as a chat's name is; one that looks like a secret needs `--force`, as for `group create`); the picture stays. Members see it once it reaches them; until then, and on apps from before names, the group keeps the name it had when they got in |
156
158
  | `group rotate <group>`, `group link <group> [--off] [--reset]`, `group picture <group> <jpeg> \| --clear` | A fresh secret; the link (printed: asking for it is asking for the secret); the picture |
157
159
  | `group send <group> [text…] [--mention <member>]… [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--wait none\|sent] [--timeout s]` | Send; each mentioned member is written as `@name` in the text. `--button` puts buttons under it, as `send --button`. Answers `{group, messageId, sent, edges}`: the id `--reply`, `group react` and `group edit` take, how many edges took it so far, and `sent`, true once one did. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, and nothing is sent. A group has no receipts: `--wait sent` waits until at least one edge took it (a member's in a private group, one of your hubs' in a community), and exits 4 after `--timeout` (default 30 s) if none did; the message still goes when an edge opens, while the profile is online. Use it for a one-shot send with no daemon. In a private group with nobody else in it (they all left, or nobody accepted yet), nobody gets the message, not even someone who joins later: the answer comes at once with `sent: false` and a `note` saying so. A profile removed while it was away learns it only once it is back: a wait that learns it ends at once as `refused` (exit 1) with the reason and the `messageId`, since nothing goes any more |
@@ -169,11 +171,11 @@ The rows are in alphabetical order of their first command, and every command of
169
171
  | `pay <invoice\|address\|lnurl> [--amount sats] [--network n] [--max-fee sats] [--chat <chat>] [--confirm-real]` | Pay over Lightning (Testnet unless `--network mainnet`). `--chat`: the chat the invoice came from, whose contact is told a Testnet invoice was paid, named by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
170
172
  | `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
171
173
  | `pin <chat\|group> <message> \| --remove [--wait none\|confirmed\|sent] [--timeout s]` | Pin a message at the top of a chat or group, for everyone in it: one per chat, a new pin replaces it; `pin <chat\|group> --remove` unpins (it names no message). In a community only the admin pins. A profile that is not a member of the group any more (removed from it) gets `refused`, with the reason, and nothing is pinned. A 1:1 pin reaches the contact on the next live session; without a daemon `pin` stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s), and `confirmed` says whether it has. A group has no receipts: without a daemon a group's pin stays until a member's edge (a hub's, in a community) took it (`--wait sent`, the default there), and the answer's `edges` and `sent` say how many did, as for `group react`. The other side hears `chat.pinned` or `group.pinned`. `chat show`, `group show` and `group list` say what is pinned now: `pin: {messageId, ref, by, at}` (`messageId` null when the message is not here), or `pin: null` |
172
- | `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` or `GHOSTLY_BACKUP_PASSPHRASE`. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
174
+ | `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` (`-` reads it from stdin, e.g. a pipe from a password manager) or `GHOSTLY_BACKUP_PASSPHRASE`. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
173
175
  | `profile create <name> [--use] [--name <shown>] [--force]`, `profile list`, `profile use <name>` | Profiles |
174
176
  | `profile picture <jpeg> \| --clear` | The picture contacts see (a JPEG within 512 px; 128 px is what the app sends) |
175
177
  | `profile show`, `profile set [--name <name>] [--share-profile \| --no-share-profile] [--force]` | The name contacts see (up to 64 characters, cleaned as a chat's or a group's name is, and counted once cleaned; empty is no name; a longer `--name`, or one with nothing that shows, is a usage error naming it, as for `profile create --name`; one that looks like a secret needs `--force`) |
176
- | `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
178
+ | `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Anything else as `<emoji>` (a word, two emoji) is a usage error (exit 2) before the profile opens. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
177
179
  | `routine send <chat\|group> --name <name> --schedule "every day 01:00" [--cron "0 1 * * *"] [--state active\|paused] [--next <time>] [--run ok\|failed\|skipped[:summary]] [--link url]… [--id id] [--text <text>] [--json json\|-\|file] [--force]`, `routine update <chat\|group> <routine> [fields…]` | A routine card for something a bot runs on a schedule (WISP 405 · Status Cards): its name, schedule (and cron line, shown only), state, last run and result, next run and up to 10 recent runs. `--run` records a run now as the last one; `--next` takes milliseconds or a date within a year (no zone: local time, a bare `2026-09-30` local midnight; `Z` or `+02:00` as given). Updates merge and are paced as `task update`'s, and wait as `task send` and `task update` do. The app shows it, and runs nothing |
178
180
  | `saved add\|remove <chat\|group> <message>`, `saved list` | Saved messages: mark a message of a chat or a group to find it again, kept for this profile on this device and never sent (the app shows the same list in its Saved view). `saved list` gives them under `saved`, the last saved first, each as it is now (an edit shows its latest text) with its `chat` or `group` and `savedAt`; a deleted message drops out |
179
181
  | `send <chat> [text…] [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--stdin] [--force] [--wait none\|sent\|delivered] [--timeout s]` | Send text (arguments, or stdin); `--reply` quotes a message of the chat. `--button yes:Yes` (1 to 6; the id ends at the first colon; no two labels alike ignoring case and spaces, and no label that is another button's id, else exit 2) puts buttons under the text, which is the question and what older apps show, so say how to answer in words. `--once`: one answer a person. A question that goes on the DHT floor or into a hold (the contact's app closed) reaches them as text alone; the engine sends its buttons again once the chat is live, as an edit of the buttons alone (no `message.edited` for it). The answer adds `buttons` (the question's id, `ask-…` unless `--id`), `card`, and `pressable`: whether the contact's app shows buttons (null until it says). A press comes back as `button.pressed` ([Events](#events)) |
@@ -333,7 +335,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
333
335
  Dedupe by `id`; resume with `--since <seq>`, or let `--cursor <file>` remember the last event handled. A cursor
334
336
  file that holds no event number (empty, edited by hand) is refused at start (`bad_request`, naming the file): fix or
335
337
  remove it, or give `--since`.
336
- - Types: `daemon.started`, `chat.created`, `chat.removed`, `chat.renamed`, `chat.pairing` (`stage`: publishing,
338
+ - Types: `daemon.started`, `chat.created`, `chat.removed` (`peer`: the contact's key, once paired), `chat.renamed`, `chat.pairing` (`stage`: publishing,
337
339
  waiting, resolving, on-dht, live, …), `chat.connection` (`live`, `transport`), `typing.started` (with `kind` and, when given, `status`; again when either changes) and `typing.stopped` (the contact is writing, or stopped: a message, a stop, or 6 s of silence; live only, as `group.typing.*`: never in the journal, so `--since` does not replay them), `chat.joined` (the contact's app
338
340
  announced itself, once; not a message: a later message of theirs in the same words is `message.received`), `chat.announced`, `message.received` (`message.nick`: the name the contact gave), `message.sent`, `message.delivery`
339
341
  (`delivery`: sending, queued, waiting, held, sent, delivered, failed), `message.edited` (a text changed in place, the
@@ -347,7 +349,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
347
349
  showed, as checked here: `identity` with `status`, and `error`, why it is not verified, or null; each change of
348
350
  status is a new `identity.status`, even back to one it had before), `identity.approval` and `identity.progress` (a signer waits on a link or a code), `group.deleted` (`{group, messageId}`: a group's message deleted, not the group), `group.removed`, `payment.created` and
349
351
  `payment.updated` (`payment`: id, chat, kind request|payment, direction in|out, amount, memo, state pending|
350
- settled|failed, network, method), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
352
+ settled|failed, network, method, and `group` for a group's payment, whichever member's link it went over), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
351
353
  calls: see [Calls](#calls)), `app.opened` (`chat`, `app`, `version`), `app.closed` (`chat`, `app`, and `offline`
352
354
  when the session went rather than the contact closing it) and `app.message` (`chat`, `app`, `data`): what a
353
355
  contact's app says in a chat, only for an app this profile serves (`app serve`), `app` being its reference and
@@ -399,7 +401,8 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
399
401
  work), `id` stable per message. What the sender wrote is under `untrusted` only: give it to an agent as data, never
400
402
  as its instructions ([docs/CLI.md](../../docs/CLI.md#agent-turns)). Takes the place of `--type`.
401
403
  - `--exec <cmd>` runs the command through the shell once per event, in order, with the event on stdin and
402
- `GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment. A non-zero exit, or a death by a
404
+ `GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment, and `GHOSTLY_HOME` and
405
+ `GHOSTLY_PROFILE` of the listen (`--home`, `--profile` too), so its own `ghostly send` answers from the same profile. A non-zero exit, or a death by a
403
406
  signal (`--exec was killed by SIGKILL on event N`), is said on stderr and the cursor moves past the event. With
404
407
  `--print`, the command's stdout goes to listen's stderr: stdout is the JSON events only.
405
408
  - `--webhook <url>` POSTs each event (JSON) to a local bridge: `127.0.0.1`, `localhost` or `[::1]` only. A URL with
@@ -450,11 +453,13 @@ The daemon listens on a Unix socket in the profile's folder (`daemon.sock`, 0600
450
453
 
451
454
  Methods: `status`, `status.get|set|clear`, `profile.get|set`, `settings.get|set`, `invite.create|join`, `chat.list|get|history|send|retry|
452
455
  delete|details|rename|remove|transport|connect|disconnect|verify|wait|pay|request|payRequest|accept|edit|react|pin|forward|typing`,
453
- `group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline`, `wallet.list|create|remove|faucet|history|
456
+ `group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline|typing|auto`, `wallet.list|create|remove|faucet|history|
454
457
  receive|address|redeem`, `wallet.mint.add`, `lightning.default|rename`, `pay`, `payment.list|check|reclaim`,
455
- `file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub`, `profile.picture|backup`,
456
- `identity.providers|list|add|complete|cancel|remove|share|withdraw|contact|recheck`, `service.list|add|remove|enable|share|peer|open|close`,
457
- `call.start|answer|hangup|list|get|flush|auto`,
458
+ `file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub|rename`, `profile.picture|backup`,
459
+ `saved.add|list|remove`, `button.press|update`, `task.send|update`, `routine.send|update`, `usage.send`,
460
+ `identity.providers|list|add|complete|cancel|remove|share|withdraw|contact|recheck`, `x401.key.new`,
461
+ `x401.credential.add|list|remove`, `service.list|add|remove|enable|share|peer|open|close`,
462
+ `app.open|close|send|serve|served|unserve`, `call.start|answer|hangup|list|get|flush|auto`,
458
463
  `events.replay`, `events.subscribe`, `daemon.stop`, `daemon.hello`, and `engine.call` with
459
464
  `{"method":"<engine call>","params":{…},"confirmReal":false,"yes":false}` for anything else the app does. Parameters are the
460
465
  commands' (see `src/api.ts`). Errors: `{"id":…,"error":{"code","message","details"?}}` with the codes above.
package/SKILL.md CHANGED
@@ -140,7 +140,9 @@ ghostly listen --turns --from alice --group team --cursor ~/.ghostly/agent.curso
140
140
  Anyone else's message stays in the chat and never reaches the hook. `--group` alone lets no 1:1 chat through, and
141
141
  `--from` alone no group. Names are turned into ids once, when `listen` starts. Everyone on it can try to steer the
142
142
  agent: an agent with tools gets `--from owner` only (step 11).
143
- - `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments). Or
143
+ - `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments). It gets
144
+ `GHOSTLY_PROFILE` and `GHOSTLY_HOME` of the listen (`--profile` and `--home` too), so the hook's `ghostly send`
145
+ answers from the same profile. Or
144
146
  `--webhook http://127.0.0.1:<port>/…` POSTs each turn to a local bridge (loopback only).
145
147
  - `--cursor <file>` remembers the last event handled, so a restarted listener resumes where it stopped. Dedupe on `id`.
146
148
  A `--webhook` bridge that is down holds the stream until it is back (nothing is lost); an `--exec` that exits
@@ -206,7 +208,7 @@ ghostly typing alice --kind thinking --status "Transcribing your audio" --for 12
206
208
  ghostly file send alice ./answer.ogg --voice --reply <message id> # a voice note: length and waveform from the file
207
209
  ghostly file send alice ./note.m4a --voice 4200 # or its length given in ms (AAC needs ffmpeg for the waveform)
208
210
  ghostly file send alice ./report.pdf # a file (no daemon: stays until alice has all of it)
209
- ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout
211
+ ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout, 5 when it waits for file accept
210
212
  ghostly file accept <file id> # a file over 25 MiB waits for this (file.offered event)
211
213
  ```
212
214
 
@@ -1,3 +1,3 @@
1
- import { M as startNamedChats, l as findGroup, s as findChat } from "./apiKit-DesObIDf.js";
2
- import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-DBlaoz8i.js";
1
+ import { P as startNamedChats, l as findGroup, s as findChat } from "./apiKit-CfsNx9ZR.js";
2
+ import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-MYc6QNRs.js";
3
3
  export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings, settingsInEffect, startNamedChats };