@ghostlytools/cli 1.9.0 → 1.10.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.
Files changed (107) hide show
  1. package/README.md +28 -20
  2. package/SKILL.md +5 -1
  3. package/dist/assets/{api-DFCgr6RH.js → api-BF_KwecF.js} +84 -38
  4. package/dist/assets/api-BF_KwecF.js.map +1 -0
  5. package/dist/assets/{api-raWw9j_m.js → api-DdrA86Ur.js} +2 -2
  6. package/dist/assets/{apiKit-CCavJJcl.js → apiKit-Du1u2l4x.js} +8 -8
  7. package/dist/assets/apiKit-Du1u2l4x.js.map +1 -0
  8. package/dist/assets/{apps-B7o2BPj6.js → apps-Bti9fDoW.js} +1 -1
  9. package/dist/assets/{apps-DmxEG147.js → apps-DwPfp54I.js} +5 -3
  10. package/dist/assets/apps-DwPfp54I.js.map +1 -0
  11. package/dist/assets/{arkade-DtYR9H0c.js → arkade-DOWpA2Kr.js} +2 -2
  12. package/dist/assets/{arkade-DtYR9H0c.js.map → arkade-DOWpA2Kr.js.map} +1 -1
  13. package/dist/assets/{backup-BserdrNk.js → backup-CeRckyl2.js} +1 -1
  14. package/dist/assets/{backup-YIB2XIES.js → backup-DZ_Q1eSu.js} +6 -6
  15. package/dist/assets/{backup-YIB2XIES.js.map → backup-DZ_Q1eSu.js.map} +1 -1
  16. package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
  17. package/dist/assets/{blobFiles-DOQDRdDI.js → blobFiles-BnjN_Vrz.js} +3 -3
  18. package/dist/assets/{blobFiles-DOQDRdDI.js.map → blobFiles-BnjN_Vrz.js.map} +1 -1
  19. package/dist/assets/buttons-BxIThdg9.js +332 -0
  20. package/dist/assets/buttons-BxIThdg9.js.map +1 -0
  21. package/dist/assets/buttons-D9QBHS9Y.js +2 -0
  22. package/dist/assets/client-D5E1RQYB.js +473 -0
  23. package/dist/assets/client-D5E1RQYB.js.map +1 -0
  24. package/dist/assets/{endpoint-BdaeBw2L.js → endpoint-DWHkXWVM.js} +101 -16
  25. package/dist/assets/endpoint-DWHkXWVM.js.map +1 -0
  26. package/dist/assets/{envelope-Dt75vrmY.js → envelope-CugS9qwQ.js} +2 -2
  27. package/dist/assets/{envelope-Dt75vrmY.js.map → envelope-CugS9qwQ.js.map} +1 -1
  28. package/dist/assets/fedimint_client_wasm_bg-BtHHlFpp.js.map +1 -1
  29. package/dist/assets/{fileBytes-BPDKufla.js → fileBytes-DMzrIdCu.js} +1 -1
  30. package/dist/assets/{fileBytes-DNgrRL0R.js → fileBytes-DjBYYyXT.js} +3 -3
  31. package/dist/assets/{fileBytes-DNgrRL0R.js.map → fileBytes-DjBYYyXT.js.map} +1 -1
  32. package/dist/assets/{fileBytes-Q3ehcEr8.js → fileBytes-Douk1yOp.js} +2 -2
  33. package/dist/assets/{fileBytes-Q3ehcEr8.js.map → fileBytes-Douk1yOp.js.map} +1 -1
  34. package/dist/assets/fileBytesIdb-CD5Uv490.js +2 -0
  35. package/dist/assets/{fileBytesIdb-Dm1EyEbT.js → fileBytesIdb-CkClu9YI.js} +3 -3
  36. package/dist/assets/{fileBytesIdb-Dm1EyEbT.js.map → fileBytesIdb-CkClu9YI.js.map} +1 -1
  37. package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js → fileBytesOpfs-WryQuOgK.js} +3 -3
  38. package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js.map → fileBytesOpfs-WryQuOgK.js.map} +1 -1
  39. package/dist/assets/{fixedHosts-B598JzbC.js → fixedHosts-B4E4VrYE.js} +4 -4
  40. package/dist/assets/{fixedHosts-B598JzbC.js.map → fixedHosts-B4E4VrYE.js.map} +1 -1
  41. package/dist/assets/{groupFiles-FXel6zIc.js → groupFiles-NonOYBKN.js} +378 -59
  42. package/dist/assets/groupFiles-NonOYBKN.js.map +1 -0
  43. package/dist/assets/{host-DIBeK_c_.js → host-DvcVt5YI.js} +79 -23
  44. package/dist/assets/{host-DIBeK_c_.js.map → host-DvcVt5YI.js.map} +1 -1
  45. package/dist/assets/{hyperdhtRelay-D185dETu.js → hyperdhtRelay-Ce42sR8x.js} +2 -2
  46. package/dist/assets/{hyperdhtRelay-D185dETu.js.map → hyperdhtRelay-Ce42sR8x.js.map} +1 -1
  47. package/dist/assets/{idb-BkOJES5_.js → idb-BHsAqENE.js} +37 -6
  48. package/dist/assets/idb-BHsAqENE.js.map +1 -0
  49. package/dist/assets/{irohWeb-BSv_BWyG.js → irohWeb-C9ChbD-c.js} +57 -3
  50. package/dist/assets/{irohWeb-BSv_BWyG.js.map → irohWeb-C9ChbD-c.js.map} +1 -1
  51. package/dist/assets/{main-BbhfMTt8.js → main-4qE381KM.js} +194 -276
  52. package/dist/assets/main-4qE381KM.js.map +1 -0
  53. package/dist/assets/{mainline-9Vc3c3SA.js → mainline-DOwZDHVy.js} +2 -2
  54. package/dist/assets/{mainline-9Vc3c3SA.js.map → mainline-DOwZDHVy.js.map} +1 -1
  55. package/dist/assets/{networkReason-BncJ9KSM.js → networkReason-MInk1Y63.js} +3 -3
  56. package/dist/assets/{networkReason-BncJ9KSM.js.map → networkReason-MInk1Y63.js.map} +1 -1
  57. package/dist/assets/{nwc-QX3Yt1Sb.js → nwc-CHLWFV1R.js} +3 -3
  58. package/dist/assets/{nwc-QX3Yt1Sb.js.map → nwc-CHLWFV1R.js.map} +1 -1
  59. package/dist/assets/{nwcProvider-CzX3xH47.js → nwcProvider-BlkPOJen.js} +2 -2
  60. package/dist/assets/{nwcProvider-CzX3xH47.js.map → nwcProvider-BlkPOJen.js.map} +1 -1
  61. package/dist/assets/{ownDid-D8z5gwGI.js → ownDid-yXtY_1B5.js} +3 -3
  62. package/dist/assets/ownDid-yXtY_1B5.js.map +1 -0
  63. package/dist/assets/{profiles-MFtCmJwK.js → profiles-vbXHs0Mq.js} +40 -3
  64. package/dist/assets/profiles-vbXHs0Mq.js.map +1 -0
  65. package/dist/assets/{registry-PTtBMaYZ.js → registry-BN9r2pR4.js} +1 -1
  66. package/dist/assets/{registry-B2Dtnibo.js → registry-chCD0KWS.js} +5 -5
  67. package/dist/assets/registry-chCD0KWS.js.map +1 -0
  68. package/dist/assets/{resolve-ZxVzwFNA.js → resolve-Dtzogt2W.js} +2 -2
  69. package/dist/assets/{resolve-ZxVzwFNA.js.map → resolve-Dtzogt2W.js.map} +1 -1
  70. package/dist/assets/{restoredRows-BCRCjhdF.js → restoredRows-CRYwIx3g.js} +2 -2
  71. package/dist/assets/{restoredRows-BCRCjhdF.js.map → restoredRows-CRYwIx3g.js.map} +1 -1
  72. package/dist/assets/{buttons-CuRfKnPI.js → secretGuard-CSVNxXVW.js} +80 -330
  73. package/dist/assets/secretGuard-CSVNxXVW.js.map +1 -0
  74. package/dist/assets/secretGuard-Q2BKq0q0.js +2 -0
  75. package/dist/assets/{server-Dw1o8z1o.js → server-BZnsm5X5.js} +1749 -335
  76. package/dist/assets/server-BZnsm5X5.js.map +1 -0
  77. package/dist/assets/{src-BD8RBVEp.js → src-DZagapGt.js} +1043 -197
  78. package/dist/assets/src-DZagapGt.js.map +1 -0
  79. package/dist/assets/{sshForges-DWrESWkK.js → sshForges-BkTgy5rx.js} +16 -9
  80. package/dist/assets/{sshForges-DWrESWkK.js.map → sshForges-BkTgy5rx.js.map} +1 -1
  81. package/dist/assets/{translate-D1uP0q32.js → translate-B9SMd6uf.js} +8 -7
  82. package/dist/assets/translate-B9SMd6uf.js.map +1 -0
  83. package/dist/assets/{usdt-DhVN8geQ.js → usdt-BU4ezonh.js} +3 -3
  84. package/dist/assets/{usdt-DhVN8geQ.js.map → usdt-BU4ezonh.js.map} +1 -1
  85. package/dist/assets/{words-DdXPkB3n.js → words-jYy7lTcb.js} +4 -2
  86. package/dist/assets/words-jYy7lTcb.js.map +1 -0
  87. package/dist/ghostly.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/assets/api-DFCgr6RH.js.map +0 -1
  90. package/dist/assets/apiKit-CCavJJcl.js.map +0 -1
  91. package/dist/assets/apps-DmxEG147.js.map +0 -1
  92. package/dist/assets/buttons-CuRfKnPI.js.map +0 -1
  93. package/dist/assets/buttons-De3LPdSG.js +0 -2
  94. package/dist/assets/daemonProof-DtrL5lE5.js +0 -236
  95. package/dist/assets/daemonProof-DtrL5lE5.js.map +0 -1
  96. package/dist/assets/endpoint-BdaeBw2L.js.map +0 -1
  97. package/dist/assets/fileBytesIdb-DZcESfTt.js +0 -2
  98. package/dist/assets/groupFiles-FXel6zIc.js.map +0 -1
  99. package/dist/assets/idb-BkOJES5_.js.map +0 -1
  100. package/dist/assets/main-BbhfMTt8.js.map +0 -1
  101. package/dist/assets/ownDid-D8z5gwGI.js.map +0 -1
  102. package/dist/assets/profiles-MFtCmJwK.js.map +0 -1
  103. package/dist/assets/registry-B2Dtnibo.js.map +0 -1
  104. package/dist/assets/server-Dw1o8z1o.js.map +0 -1
  105. package/dist/assets/src-BD8RBVEp.js.map +0 -1
  106. package/dist/assets/translate-D1uP0q32.js.map +0 -1
  107. package/dist/assets/words-DdXPkB3n.js.map +0 -1
package/README.md CHANGED
@@ -84,6 +84,10 @@ Each profile is a folder, `~/.ghostly/profiles/<name>/` (0700; files 0600), with
84
84
  `ghostly profile create <name>`. An empty `--profile` or `--home` (`-p "$BOT"` with `BOT` unset) is a usage error;
85
85
  an empty `GHOSTLY_PROFILE` or `GHOSTLY_HOME` counts as unset.
86
86
 
87
+ The keys (the identity seed, each wallet's seed) are not encrypted on disk: any program running as your user can read
88
+ them. To keep them from an agent's tools, run Ghostly as an OS user of its own:
89
+ [threat model](https://ghostly.tools/developers/agents/threat-model#apart).
90
+
87
91
  Only one process opens a profile at a time. When a daemon runs it, every command goes through the daemon's socket.
88
92
  When none does, a command runs the profile itself for as long as it needs (a **one-shot**) and leaves: `send` then
89
93
  waits until the message went out. Bots should run the daemon: a one-shot is offline between commands.
@@ -98,7 +102,8 @@ a command that waits (`chat wait`, `file wait`, `--wait`) within its `--timeout`
98
102
  `details.method`); `ghostly daemon restart` is the way out ([docs/CLI.md](../../docs/CLI.md#what-it-does)). On a
99
103
  terminal, a command that waits says on stderr what it waits for once it has waited a second; nothing is said there on
100
104
  a pipe. A `<chat>` is
101
- its id, a unique prefix of it, or its name; a `<group>` too.
105
+ its id, a unique prefix of it, or its name; a `<group>` too. A `<group>` that is one group's name and a prefix of
106
+ another's id is refused (exit 1, `bad_request`, both ids in `details.matches`): use its id.
102
107
 
103
108
  The rows are in alphabetical order of their first command, and every command of `ghostly help` has one
104
109
  (`test/readme.test.ts` checks both).
@@ -129,54 +134,54 @@ The rows are in alphabetical order of their first command, and every command of
129
134
  | `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 |
130
135
  | `daemon [--detach] [--timeout s]`, `daemon status [--timeout s]`, `daemon stop [--timeout s]`, `daemon restart [--timeout s]` | Keep the profile online; `status` names its version and its socket (`socket`, for the [socket API](#the-socket-api)), or says `"starting": true` with the `pid` of a daemon whose socket does not listen yet (`stop` and `restart` wait up to `--timeout` for that socket, then stop it); `restart` stops it and starts this release's code in the background ([After an upgrade](#after-an-upgrade)). Ctrl-C, SIGTERM and the terminal closing (SIGHUP) stop it cleanly. A command that holds the profile for a moment (a bot's `send` while a service manager restarts it) is waited for, up to `--timeout` (60 s): still held then, `busy` with its pid |
131
136
  | `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 |
132
- | `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; `clearProfileData` while a call is on in any chat. One that sends a text that looks like a secret (`sendMessage`, `sendGroupMessage`, `editMessage`, `forwardMessages`) needs `--force` |
137
+ | `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; `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` |
133
138
  | `events [--since seq] [--translate lang]` | What the event journal holds, without following ([Translation](#translation)) |
134
139
  | `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"`). A file's id names its chat or its group, so `<chat>` may be left out |
135
140
  | `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) |
136
141
  | `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 it first |
137
- | `file send <chat\|group> <path> [--name n] [--mime t] [--voice [ms] [--peaks …]] [--reply <message>] [--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 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) |
142
+ | `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 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) |
138
143
  | `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` |
139
144
  | `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}]}`; 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 |
140
- | `group create <name> [--mesh]`, `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 |
145
+ | `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 |
141
146
  | `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 |
142
147
  | `group hub <group> <member> [--pin \| --exclude \| --auto]` | Past 16 members: pin a member as a hub, keep one from being a hub, or leave it to their app (a daemon offers itself) |
143
- | `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) |
148
+ | `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). `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 |
144
149
  | `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}}` |
145
150
  | `group list [--show-secret]`, `group show <group> [--show-secret]`, `group history <group>` | Groups, members, history; a message names its author (`member` key, `nick` from the roster, or the name an author no longer in it had). The entry link prints as `<hidden>` without `--show-secret` |
146
151
  | `group react <group> <message> <emoji> [--remove]` | React to a group's message. `refused` when the profile is not a member any more |
147
- | `group rename <group> <name>` | A new name, for the admin (1 to 64 characters on one line); 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 |
152
+ | `group rename <group> <name> [--force]` | A new name, for the admin (1 to 64 characters on one line; 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 |
148
153
  | `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 |
149
154
  | `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 |
150
155
  | `group typing <group> [--kind typing\|recording\|thinking] [--status "<text>"] [--for s] [--stop]` | `typing` in a private group: the members whose edge is open see "Ana is typing…" (or recording, thinking, or your status line), with the same rules, 6 s hold and `--for`. Answers `{group, typing, kind, status, reached, sendTyping}` (`reached`: members with an open edge). A community does not carry typing yet (exit 1, `unavailable`) |
151
156
  | `identity add <provider> [subject] [--signer id] [--field name=value]… [--stdin] [--days n] [--timeout s]` | A proof: an in-app signer (NIP-46 and the like) finishes here; a tool or a published record answers with the statement; `--timeout` is how long it waits for an approval (300 s). With `--stdin`, fields come as `name=value` lines on stdin, out of `ps` and the shell's history; a `--field` the signer marks secret (a NIP-46 `bunker://` link) is warned about |
152
157
  | `identity complete <draft> [--evidence-file f \| --stdin]`, `identity cancel <draft>` | Finish it with the tool's output, from a file, `--stdin` or piped to it (or nothing, for a published record); needs the daemon that began it. Cancel drops one not finished |
153
158
  | `identity providers`, `identity list` | Kinds of proof and their signers; this profile's proofs |
154
- | `identity share\|withdraw <chat> <id>`, `identity contact <chat>`, `identity recheck <chat> <id>`, `identity remove <id>` | Show a proof to a contact; what a contact showed, as checked here |
159
+ | `identity share\|withdraw <chat> <id>`, `identity contact <chat>`, `identity recheck <chat> <id>`, `identity remove <id>` | Show a proof to a contact; what a contact showed, as checked here. `identity share` 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 |
155
160
  | `invite create [--label <name>]` | A new chat's `ghostly1…` invite and its link |
156
161
  | `invite join [<invite-or-link> \| -] [--label <name>]` | Join a chat (your own invite is refused). The invite comes from stdin when none is given or `-`, out of `ps` and the shell's history; on the command line the CLI warns |
157
162
  | `lightning default <card>`, `lightning rename <card> <name>` | Lightning cards: which receives by default |
158
163
  | `listen [--since seq] [--cursor file] [--type t]… [--turns] [--from <chat\|key>]… [--group <group>]… [--exec cmd] [--webhook url] [--print] [--translate lang]` | The event stream; `--from` and `--group` an allowlist, `--turns` one `agent.turn` per message to answer, `--translate` a translation of received messages ([Events](#events), [Translation](#translation)) |
159
164
  | `message delete <chat\|group> <message> --everyone [--wait none\|confirmed] [--timeout s]` | Deletes a message of yours for everyone (a text, a card, a file or a voice message; never a payment): it goes from this device at once and from every member's as the message's last edit, once they are back if they are away. An app from before this shows "🗑 Message removed" in its place. In a chat, `--wait confirmed` waits for the contact's app to confirm (the default without a daemon, which is offline once the command ends), and the answer's `confirmed` says whether it did. Without `--everyone`, only this device forgets it. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it) |
160
165
  | `message retry\|delete\|details <chat> <message>` | One message |
161
- | `pay <invoice\|address\|lnurl> [--amount sats] [--network n] [--max-fee sats] [--confirm-real]` | Pay over Lightning (Testnet unless `--network mainnet`) |
166
+ | `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 |
162
167
  | `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
163
168
  | `pin <chat\|group> <message> \| --remove [--wait none\|confirmed] [--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. 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` |
164
169
  | `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. `--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 |
165
- | `profile create <name> [--use] [--name <shown>]`, `profile list`, `profile use <name>` | Profiles |
170
+ | `profile create <name> [--use] [--name <shown>] [--force]`, `profile list`, `profile use <name>` | Profiles |
166
171
  | `profile picture <jpeg> \| --clear` | The picture contacts see (a JPEG within 512 px; 128 px is what the app sends) |
167
- | `profile show`, `profile set [--name <name>] [--share-profile \| --no-share-profile]` | The name contacts see |
172
+ | `profile show`, `profile set [--name <name>] [--share-profile \| --no-share-profile] [--force]` | The name contacts see (one that looks like a secret needs `--force`) |
168
173
  | `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 |
169
- | `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 (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 |
170
- | `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 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 |
174
+ | `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 |
175
+ | `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 |
171
176
  | `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)) |
172
177
  | `service add <name> <http://127.0.0.1:port>`, `service share <service> <chat> [--off]`, `service list`, `service remove\|enable` | Share a web app on this machine, per contact. `service share` 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. `service add` answers the new one as `service` (the id the others take); its old key `serviceId` stays beside it for one release |
173
178
  | `service peer <chat>`, `service open <chat> <service> [--port p]`, `service close <chat> <service>` | A contact's app on a loopback port here (daemon). `url` is a link for your browser, `http://<random>.localhost:<port>/.ghostly-open/<token>`: it sets the service's cookie and shows the app on a host name of its own; any other host name, or a request without that cookie, gets 404. Chrome, Edge and curl reach `*.localhost` names by themselves; Safari and Node's `fetch` on macOS may not (add the name to `/etc/hosts` for them) |
174
- | `settings get [--show-secret]`, `settings set <key> <json>` | Relays, Iroh relays, the HyperDHT relay, ICE servers, `sendTyping` (false: contacts are never told you type), … `<json>` as `-`, or none on a pipe, is read from stdin: a TURN password stays out of `ps` |
179
+ | `settings get [--show-secret]`, `settings set <key> <json> [--force]` | Relays, Iroh relays, the HyperDHT relay, ICE servers, `sendTyping` (false: contacts are never told you type), … `<json>` as `-`, or none on a pipe, is read from stdin: a TURN password stays out of `ps` |
175
180
  | `status` | The profile, its chats, whether WebRTC and calls run, the last event seq |
176
181
  | `store sign <index> --key <file> [--out <dir>]` | Sign a store index (WISP 1200 · Stores) with the store key file (kept offline; made when missing, the index names no `key` and no signed index is in the output folder): writes `ghostly-store.json`, canonical, and `ghostly-store.sig` beside the index or in `--out`. Refused, with the reason, when a client would refuse the index (`expires` more than 90 days ahead, a bad field), or when the index already there has a higher `sequence` (`rollback`), the same one with other content (`equivocation`), or is signed by another key (`store-key`: another store is another `--out`) |
177
182
  | `task send <chat\|group> --title <title> [--status s] [--progress n \| --steps a/b] [--step "…"] [--item state:text]… [--pr-url url --pr-number n --additions n --deletions n --files n --pr-state s --pr-checks c] [--branch b] [--tag label]… [--parent task] [--link url]… [--id id] [--text <text>] [--json json\|-\|file] [--force]`, `task update <chat\|group> <task> [fields…]` | A task card for a bot's work (WISP 405 · Status Cards): a title, a status (queued, running, blocked, done, failed, cancelled), progress, the step it is on, up to 20 steps or log lines (`--item done:Codec`; the card holds at most 8 KiB in all, so 20 long items of non-Latin text are past it; a lowercase word before the colon must be an item state: pending, running, done, failed or skipped) and its pull request, shown as a small card that apps without cards read as text. Optional, and ignored by apps from before them: where the pull request stands (`--pr-state draft`, `open`, `merged` or `closed`; an open one puts the task in the board's Review column) and its checks (`--pr-checks passing`, `failing` or `pending`), up to 3 tags of 24 characters (`--tag core --tag web`; an update's tags replace the card's), and `--parent <task>`, a task of yours in the same chat that this one is a part of (sent first; its parts stack under it on the board). `send` prints the task's id and message; `update` merges the fields given over the card (an update's `--item` list replaces the card's: give all of them) and edits its message, at most once per 2.5 s (sooner updates merge into the next). `--json` takes the whole card; `null` in it removes a field. Without a daemon a card in a chat stays until it went out: `send` until it is sent (`--wait sent`), `update` until the contact confirmed it (`--wait confirmed`), up to `--timeout` (30 s, then exit 4: it goes with the next command); `--wait none` answers at once, as a daemon and a group do by default. Only the CLI sends cards: the app shows them |
178
183
  | `typing <chat> [--kind typing\|recording\|thinking] [--status "<text>"] [--for s] [--stop]` | Show the contact you are writing, recording or thinking, or a short status line in its place ("Transcribing your audio…", 40 characters, no links): live chats only, it holds 6 s there; `--for s` keeps it on that long (up to 600 s; a one-shot stays that long once the chat is live, and stops with `live: false` when it is not live within 15 s); a new kind or status shows at once; a message to the chat or `--stop` ends it |
179
- | `usage send [<chat\|group>] [--all] --left <percent> [--window "5 h"] [--resets <time>] [--label Claude] [--account <name>] [--also week=80@<time>]… [--used n --limit n] [--id id] [--text <text>] [--json json\|-\|file] [--force]` | How much of a quota the bot has left (WISP 405 § Usage): the percent (or `--used` of `--limit`), what it is of, the account, the window, when it resets, and up to 3 other windows (`--also week=80@2026-10-10T00:00:00Z`); `--resets` and `@` take milliseconds or a date (no zone: local time, a bare date local midnight). The app shows a small meter on the chat's row and in its header, amber under 20%, red under 5%, muted once 6 h old or past the reset. One card per chat: the first report sends it, later ones edit it in place (quiet, paced as `task update`'s); each report is whole, so a field it leaves out goes. Without a daemon a report in a chat stays until it went out (`--wait sent`: the first sent, a later one confirmed by the contact), up to `--timeout`; `--wait none` answers at once. `--all` reports to every 1:1 chat with a contact. See [docs/AI-AGENTS.md](../../docs/AI-AGENTS.md#reporting-usage) for where a bot gets its numbers |
184
+ | `usage send [<chat\|group>] [--all] --left <percent> [--window "5 h"] [--resets <time>] [--label Claude] [--account <name>] [--also week=80@<time>]… [--used n --limit n] [--id id] [--text <text>] [--json json\|-\|file] [--force]` | How much of a quota the bot has left (WISP 405 § Usage): the percent (or `--used` of `--limit`), what it is of, the account, the window, when it resets, and up to 3 other windows (`--also week=80@2026-10-10T00:00:00Z`); `--resets` and `@` take milliseconds or a date within a year (no zone: local time, a bare date local midnight). The app shows a small meter on the chat's row and in its header, amber under 20%, red under 5%, muted once 6 h old or past the reset. One card per chat: the first report sends it, later ones edit it in place (quiet, paced as `task update`'s); each report is whole, so a field it leaves out goes. Without a daemon a report in a chat stays until it went out (`--wait sent`: the first sent, a later one confirmed by the contact), up to `--timeout`; `--wait none` answers at once. `--all` reports to every 1:1 chat with a contact. See [docs/AI-AGENTS.md](../../docs/AI-AGENTS.md#reporting-usage) for where a bot gets its numbers |
180
185
  | `version` | This CLI's version, `{"version":"…"}` (also `ghostly --version`) |
181
186
  | `wallet create <type> [--network testnet] [--provider id] [--value name=value]… [--stdin] [--invite code] [--api-key key]` | A wallet: `cashu`, `lightning` (a card: its source's form in `--value`), `arkade`, `spark` (on Mainnet, `--api-key` is your Breez API key), `bitcoin` (BDK), `fedimint` (`--invite` is the federation's invite code), `usdt`. With `--stdin`, secret fields come as `name=value` lines on stdin (`api-key=…` too), out of `ps` and the shell's history; a `--value` the source's form marks secret (an NWC URI, a macaroon, a rune, an RPC password) is warned about |
182
187
  | `wallet faucet <type>`, `wallet add-mint <url> [--primary]` | Test coins; another Cashu mint |
@@ -255,9 +260,12 @@ service manager instead.
255
260
  ### The secret guard
256
261
 
257
262
  `send` and `group send` refuse text that looks like a recovery phrase, a private key (nsec, WIF, xprv, 64 hex
258
- characters named as a key) or a Cashu token (money anyone who reads it can take), with exit `5`, unless `--force`;
259
- so do `edit`, `forward`, `button update --text`, the task, routine and usage cards (any text on the card) and the
260
- memo of `chat pay` and `chat request`.
263
+ characters named as a key), a login to a node (an LND macaroon, a Core Lightning rune, a bitcoind RPC password or
264
+ cookie) or a Cashu token (money anyone who reads it can take), with exit `5`, unless `--force`;
265
+ so do `edit`, `forward`, `button update --text`, the task, routine and usage cards (any text on the card), the
266
+ memo of `chat pay` and `chat request`, the comment of `pay`, a group's name (`group create`, `group rename`), the
267
+ name contacts see (`profile set --name`, `profile create --name`, `settings set nick`), `file send --name` and
268
+ `app revoke --reason`.
261
269
  It is the app's own detector.
262
270
 
263
271
  ### Real money
@@ -284,7 +292,7 @@ Spark, BDK, Fedimint and USDT run as in the app. One does not yet: **Bark** (its
284
292
  federation=<id>` (`engine fedimintPreview '{"invite":"fed1…"}'` shows the id first). Its client runs in a worker
285
293
  thread, with one database file per federation in the profile's `fedimint/` folder. No wallet is made by itself: a bot has exactly the wallets it created. A Cashu test mint's invoice (from
286
294
  `wallet receive`) is credited once its payer vouches for it in a chat, as in the app (a test mint says every invoice
287
- is paid); on a real mint, the mint's answer decides. A Testnet wallet pays a Bitcoin (`lnbc`) invoice only through
295
+ is paid): a bot that pays one says which chat it came from with `pay <invoice> --chat <chat>`; on a real mint, the mint's answer decides. A Testnet wallet pays a Bitcoin (`lnbc`) invoice only through
288
296
  the public test mint, as in the app: a mint on this machine may have real sats behind it. A local test mint with a fake
289
297
  Lightning backend (a regtest or e2e stack) is declared with `GHOSTLY_TEST_MINTS=<url,…>`.
290
298
 
@@ -317,7 +325,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
317
325
  remove it, or give `--since`.
318
326
  - Types: `daemon.started`, `chat.created`, `chat.removed`, `chat.renamed`, `chat.pairing` (`stage`: publishing,
319
327
  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), `chat.joined` (the contact's app
320
- announced itself; not a message), `chat.announced`, `message.received` (`message.nick`: the name the contact gave), `message.sent`, `message.delivery`
328
+ 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`
321
329
  (`delivery`: sending, queued, waiting, held, sent, delivered, failed), `message.edited` (a text changed in place, the
322
330
  contact's or mine: once per edit number, with `edits` and the message as it is now; `group.message.edited` in a group), `message.deleted` (`{chat, messageId}`: a message gone from this device, deleted here or for everyone by its author; `group.deleted` with `group` in a group), `group.created`,
323
331
  `group.status`, `group.members` (`joined`, `left`), `group.typing.started` (`member`, `kind`, and `status` when given; again when either changes) and `group.typing.stopped` (`member`: a member of a private group is writing, or stopped), `group.message` (`message.member` is the author's key,
@@ -362,7 +370,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
362
370
  - `--type message.received` keeps one type; `--type message` (or `message.`, `message.*`) a family. A family deeper
363
371
  down ends in "." (`group.typing.`): `group.message` is that type alone.
364
372
  - `--from <chat|key>` and `--group <group>` (again for more): an allowlist. Only the chats (id, a label given here,
365
- or the contact's `peer` key, which also matches a chat made later) and groups (id, prefix or name) named get through;
373
+ or the contact's `peer` key, which also matches a chat made later) and groups (id, prefix or name; one that fits more than one group is refused) named get through;
366
374
  a prefix of a chat's id or the name its contact gave itself is refused (another contact could call itself that:
367
375
  name the chat first with `chat rename`); any other chat's or
368
376
  group's event stops before `--exec`, `--webhook` and stdout (the message stays in the chat; the cursor moves past
package/SKILL.md CHANGED
@@ -92,6 +92,8 @@ ghostly profile show
92
92
  ```
93
93
 
94
94
  Every command takes `--profile <name>` (or `GHOSTLY_PROFILE`) to pick a profile other than the current one.
95
+ The profile's keys are files your user can read, not encrypted: to keep them from your own tools, your owner can run
96
+ Ghostly as an OS user of its own ([threat model](https://ghostly.tools/developers/agents/threat-model#apart)).
95
97
 
96
98
  ### 3. Keep it online: the daemon
97
99
 
@@ -121,6 +123,7 @@ Names are for people at a terminal. A contact chooses its own name, a group's ad
121
123
  name in a group, so in a script or an agent keep the **id** (`chat` and `group` in every answer and event, a member's
122
124
  key) and address by it: `<chat id>`, `group:<group id>`, `<member key>`. Where a command takes a chat or a group, a
123
125
  name that a contact gave itself and that also names one of your groups is refused (exit 1, `bad_request`) and both ids are shown.
126
+ So is a `<group>` that is one group's name and a prefix of another's id.
124
127
 
125
128
  ### 5. Be woken: listen with an allowlist
126
129
 
@@ -390,7 +393,8 @@ needs a person who holds the key: leave that to the owner.
390
393
  - Output is JSON. A failure is `{"error":{"code","message"}}` with exit 1 (failed), 2 (usage), 3 (not found),
391
394
  4 (timed out), 5 (needs `--force`, `--yes` or `--confirm-real`) or 130 (stopped with Ctrl-C, `interrupted`).
392
395
  - `send` (and `ghostly engine sendMessage` and the other sends through `engine`) refuses text that looks like a recovery
393
- phrase, a private key or a Cashu token unless `--force`.
396
+ phrase, a private key or a Cashu token unless `--force`; so does every other text that leaves the device: a payment's
397
+ memo or comment, a group's name, the name contacts see, a file's `--name`, an app revocation's `--reason`.
394
398
  - Spending real money (Mainnet) needs `--confirm-real`.
395
399
  - Seeds, keys and backups are never printed without `--show-secret`; `group show` and `group list` hide entry links, and
396
400
  `chat list` and `chat show` a pending chat's invite code.
@@ -1,15 +1,16 @@
1
- import { $a as replySnippet, $i as identityStatement, Al as inviteLink, Bn as stripPictureMetadata, Ca as downsamplePeaks, Da as voiceLevel, Ea as voiceDownloadName, Gr as sanitizeTypingStatus, Hr as TYPING_KINDS, In as withoutVideoMetadata, Jo as parseLocalTarget, Kc as APP_PERMISSIONS, Ko as GhostlyHttpError, Ln as NO_PICTURE_METADATA, Lu as randomBytes$1, Ml as ownInviteRefusal, Mu as sanitizeAvatar, Qn as GROUP_FILE_LIMITS, Ru as toBase64Url, Sa as baseMime, Ta as parseVoiceMeta, Ur as TYPING_REFRESH_MS, Vn as withoutPictureMetadata, X as groupName, Xo as LIMITS, Zc as isAppUrl, _a as sanitizeFileName, _o as statusCardBytes, al as appRef, ba as VOICE_LIMITS, bo as claimedTime, co as STATUS_CARD_LIMITS, di as APP_DATA_MAX_BYTES, do as appCardUrl, gl as readImageMeta, ho as checkStatusCard, ju as MAX_AVATAR_LENGTH, ll as isAppRef, po as cardLine, uo as appCardId, va as sanitizeMime, xa as VOICE_METER, ya as PLAYABLE_AUDIO, zo as AWAITING_PEER_MS } from "./src-BD8RBVEp.js";
2
- import { u as fileStore } from "./idb-BkOJES5_.js";
3
- import { O as waitingGroupFile, T as removeStored, X as iceServerProblem, Z as iceServerSetting, i as groupOfFile, k as IDENTITY_DRAFT_TTL_MS, l as replyRef, n as groupFileId, v as paymentNetwork } from "./groupFiles-FXel6zIc.js";
4
- import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-DNgrRL0R.js";
5
- import { t as IDENTITY_PROVIDERS } from "./registry-B2Dtnibo.js";
6
- import { a as waitForConfirmed, c as waitForMessage, i as pressable, l as waitForRemoval, n as buttonsCard, o as waitForEdit, s as waitForGroupFrame, t as BUTTON_METHODS, u as findSecret } from "./buttons-CuRfKnPI.js";
7
- import { a as WALLET_TYPES, c as DESTRUCTIVE_CALLS, d as ENGINE_READS, f as READ_PARAMS, i as TRANSPORT_NAMES, l as ENGINE_METHODS, m as engineParamsProblem, n as CHAT_METHODS, r as PAY_METHODS, s as withStoredIds, t as ADDRESS_TYPES, u as ENGINE_PARAMS } from "./words-DdXPkB3n.js";
1
+ import { $o as LIMITS, Aa as voiceLevel, Ca as VOICE_LIMITS, Cl as readImageMeta, Co as claimedTime, Ea as downsamplePeaks, Gr as TYPING_REFRESH_MS, Gu as toBase64Url, Hn as stripPictureMetadata, Ho as AWAITING_PEER_MS, Ll as inviteLink, Oa as parseVoiceMeta, Rn as withoutVideoMetadata, Ru as MAX_AVATAR_LENGTH, Sa as PLAYABLE_AUDIO, Ta as baseMime, Un as withoutPictureMetadata, Wr as TYPING_KINDS, Wu as randomBytes$1, Yo as GhostlyHttpError, Z as groupName, Zc as APP_PERMISSIONS, Zo as parseLocalTarget, ba as sanitizeFileName, bo as statusCardBytes, do as STATUS_CARD_LIMITS, er as GROUP_FILE_LIMITS, go as cardLine, hl as isAppRef, ka as voiceDownloadName, mo as appCardUrl, nl as isAppUrl, no as replySnippet, pi as APP_DATA_MAX_BYTES, po as appCardId, qr as sanitizeTypingStatus, ta as identityStatement, ul as appRef, vo as checkStatusCard, wa as VOICE_METER, xa as sanitizeMime, zl as ownInviteRefusal, zn as NO_PICTURE_METADATA, zu as sanitizeAvatar } from "./src-DZagapGt.js";
2
+ import { u as fileStore } from "./idb-BHsAqENE.js";
3
+ import { O as waitingGroupFile, T as removeStored, i as groupOfFile, k as IDENTITY_DRAFT_TTL_MS, l as replyRef, n as groupFileId, nt as iceServerSetting, tt as iceServerProblem, v as paymentNetwork } from "./groupFiles-NonOYBKN.js";
4
+ import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-DjBYYyXT.js";
5
+ import { t as IDENTITY_PROVIDERS } from "./registry-chCD0KWS.js";
6
+ import { n as secretWords, r as findSecret, t as guardText } from "./secretGuard-CSVNxXVW.js";
8
7
  import { i as localFileError, r as asCliError, t as CliError } from "./errors-R4S2SAEM.js";
9
- import { S as waitForState, _ as oneOf, a as dhtOnly, b as str, c as findGroup, d as inviteTaken, f as list, g as num, h as node, i as chatOrGroup, l as findOwnNamedChat, n as bool, o as findChat, p as messageOf, r as chatOf, s as findChatOrGroup, u as groupOf, v as sentAt, x as transportOffered, y as state } from "./apiKit-CCavJJcl.js";
10
- import { a as checkShownName } from "./profiles-MFtCmJwK.js";
11
- import { t as BACKUP_METHODS } from "./backup-YIB2XIES.js";
12
- import { o as checkedBundle } from "./apps-DmxEG147.js";
8
+ import { a as WALLET_TYPES, c as DESTRUCTIVE_CALLS, d as ENGINE_READS, f as READ_PARAMS, i as TRANSPORT_NAMES, l as ENGINE_METHODS, m as engineParamsProblem, n as CHAT_METHODS, r as PAY_METHODS, s as withStoredIds, t as ADDRESS_TYPES, u as ENGINE_PARAMS } from "./words-jYy7lTcb.js";
9
+ import { S as waitForState, _ as oneOf, a as dhtOnly, b as str, c as findGroup, d as inviteTaken, f as list, g as num, h as node, i as chatOrGroup, l as findOwnNamedChat, n as bool, o as findChat, p as messageOf, r as chatOf, s as findChatOrGroup, u as groupOf, v as sentAt, x as transportOffered, y as state } from "./apiKit-Du1u2l4x.js";
10
+ import { a as checkShownName } from "./profiles-vbXHs0Mq.js";
11
+ import { a as waitForConfirmed, c as waitForMessage, i as pressable, l as waitForRemoval, n as buttonsCard, o as waitForEdit, s as waitForGroupFrame, t as BUTTON_METHODS } from "./buttons-BxIThdg9.js";
12
+ import { t as BACKUP_METHODS } from "./backup-DZ_Q1eSu.js";
13
+ import { o as checkedBundle } from "./apps-DwPfp54I.js";
13
14
  import { generateMnemonic } from "@scure/bip39";
14
15
  import { wordlist } from "@scure/bip39/wordlists/english.js";
15
16
  import { execFile, spawn } from "node:child_process";
@@ -995,6 +996,7 @@ var ACTIONS = [
995
996
  ];
996
997
  var FILE_METHODS = {
997
998
  async "file.send"(ctx, params) {
999
+ guardText(str(params, "name"), bool(params, "force"), "file's name", "send it");
998
1000
  const target = chatOrGroupOf(ctx, params);
999
1001
  const path = resolve(str(params, "path", true));
1000
1002
  let info;
@@ -1423,7 +1425,7 @@ function guardSecrets(fields, params, verb) {
1423
1425
  if (bool(params, "force")) return;
1424
1426
  const check = (text) => {
1425
1427
  const secret = findSecret(text);
1426
- if (secret) throw new CliError("confirm", `The card's text looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; ${verb} it with --force if you mean to`, { kind: secret.kind });
1428
+ if (secret) throw new CliError("confirm", `The card's text looks like ${secretWords(secret)}; ${verb} it with --force if you mean to`, { kind: secret.kind });
1427
1429
  };
1428
1430
  for (const text of cardTexts([fields, params.run])) {
1429
1431
  check(text);
@@ -2124,7 +2126,7 @@ var view = (ctx, id, params) => groupJson(state(ctx).groups.find((g) => g.id ===
2124
2126
  var GROUP_ADMIN_METHODS = {
2125
2127
  async "group.invite"(ctx, params) {
2126
2128
  const group = groupOf(ctx, params);
2127
- const link = chatOf(ctx, params);
2129
+ const link = findOwnNamedChat(state(ctx).links, str(params, "chat", true));
2128
2130
  await node(ctx).inviteToGroup({
2129
2131
  groupId: group.id,
2130
2132
  linkId: link.id
@@ -2166,6 +2168,7 @@ var GROUP_ADMIN_METHODS = {
2166
2168
  const group = groupOf(ctx, params, "chat rename <chat> <name...>");
2167
2169
  const name = groupName(str(params, "name", true));
2168
2170
  if (!name) throw new CliError("bad_request", `A group's name is 1 to 64 characters on one line`);
2171
+ guardText(name, bool(params, "force"), "group's name", "rename it");
2169
2172
  await node(ctx).renameGroup({
2170
2173
  groupId: group.id,
2171
2174
  name
@@ -2445,7 +2448,7 @@ var IDENTITY_METHODS = {
2445
2448
  return { removed: id };
2446
2449
  },
2447
2450
  async "identity.share"(ctx, params) {
2448
- const link = chatOf(ctx, params);
2451
+ const link = findOwnNamedChat(state(ctx).links, str(params, "chat", true));
2449
2452
  const id = str(params, "id", true);
2450
2453
  if (!state(ctx).identityProofs.some((p) => p.id === id)) throw new CliError("not_found", `No identity proof ${JSON.stringify(id)} (ghostly identity list)`);
2451
2454
  await node(ctx).shareIdentityProof({
@@ -2643,14 +2646,34 @@ function sameSecret(a, b) {
2643
2646
  }
2644
2647
  /**
2645
2648
  * Added to every answer of a contact's app, next to any policy the contact sends (a browser enforces both): its
2646
- * scripts, forms, pictures, frames, fonts, media, styles and workers reach its own origin and public https sites
2647
- * (and inline, data: and blob: content), never plain http. The page is served from `<random>.localhost`, which Chrome
2648
- * counts as this machine, so its own guard for requests to local addresses (Local Network Access) would not ask
2649
- * before the page reached another service on 127.0.0.1 or the local network. Inline scripts and styles stay allowed:
2650
- * this policy bounds where the page reaches, not how the app is written. A top-level navigation is not covered: no
2651
- * browser lets a policy bound it.
2649
+ * requests (fetch, XHR, beacons, WebSockets, EventSource) and forms reach only its own origin, the contact's server;
2650
+ * its scripts, pictures, frames, fonts, media, styles and workers its own origin and https sites (and inline, data:
2651
+ * and blob: content), never plain http. The page is served from `<random>.localhost`, which Chrome counts as this
2652
+ * machine, so its own guard for requests to local addresses (Local Network Access) would not ask before the page
2653
+ * reached another service on 127.0.0.1 or the local network, and a policy cannot tell a public https site from one
2654
+ * here or on the local network with a trusted certificate: requests that can read an answer or post go nowhere else.
2655
+ * Inline scripts and styles stay allowed: this policy bounds where the page reaches, not how the app is written. A
2656
+ * top-level navigation is not covered: no browser lets a policy bound it.
2657
+ */
2658
+ var OPENED_SERVICE_CSP = "default-src 'self' https: data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; form-action 'self'";
2659
+ /**
2660
+ * The contact's headers that are not passed on: each makes the browser send something to a place it names, outside
2661
+ * `connect-src` (violation and network-error reports, and the endpoints they go to; `Link` preloads, prefetches and
2662
+ * early connections). Only the contact's server is reached.
2652
2663
  */
2653
- var OPENED_SERVICE_CSP = "default-src 'self' https: data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src 'self' https: wss:; form-action 'self' https:";
2664
+ var OPENED_SERVICE_DROPPED_HEADERS = [
2665
+ "content-security-policy-report-only",
2666
+ "reporting-endpoints",
2667
+ "report-to",
2668
+ "nel",
2669
+ "link"
2670
+ ];
2671
+ /** The directives of a contact's policy that send reports to a URL it names, dropped from it. */
2672
+ var OPENED_SERVICE_DROPPED_DIRECTIVES = ["report-uri", "report-to"];
2673
+ /** A contact's `Content-Security-Policy` value (one policy or several joined by commas) without its report directives. */
2674
+ function withoutReports(value) {
2675
+ return value.split(",").map((policy) => policy.split(";").filter((directive) => !OPENED_SERVICE_DROPPED_DIRECTIVES.includes(directive.trim().split(/\s+/)[0].toLowerCase())).join(";").trim()).filter((policy) => policy.replaceAll(";", "").trim()).join(", ");
2676
+ }
2654
2677
  function plain(response, status, text, headers = {}) {
2655
2678
  response.writeHead(status, {
2656
2679
  "content-type": "text/plain; charset=utf-8",
@@ -2735,14 +2758,16 @@ async function proxy(request, response, chunks, send, cookies) {
2735
2758
  const out = {};
2736
2759
  for (const [name, value] of answer.headers) {
2737
2760
  const lower = name.toLowerCase();
2738
- if (lower === "transfer-encoding" || lower === "connection") continue;
2761
+ if (lower === "transfer-encoding" || lower === "connection" || OPENED_SERVICE_DROPPED_HEADERS.includes(lower)) continue;
2739
2762
  if (lower === "set-cookie") {
2740
2763
  const cookie = hostOnlyCookie(value);
2741
2764
  if (!cookie) continue;
2742
2765
  if (cookies.size < MAX_COOKIE_NAMES) cookies.add(setCookieName(cookie));
2743
2766
  out[lower] = [...out[lower] ?? [], cookie];
2744
- } else if (lower === "content-security-policy") out[lower] = [...out[lower] ?? [], value];
2745
- else out[lower] = value;
2767
+ } else if (lower === "content-security-policy") {
2768
+ const policy = withoutReports(value);
2769
+ if (policy) out[lower] = [...out[lower] ?? [], policy];
2770
+ } else out[lower] = value;
2746
2771
  }
2747
2772
  out["content-security-policy"] = [...out["content-security-policy"] ?? [], OPENED_SERVICE_CSP];
2748
2773
  response.writeHead(answer.status, out);
@@ -3369,7 +3394,7 @@ function memoOf(params, verb, field = "memo") {
3369
3394
  const memo = str(params, field);
3370
3395
  if (memo && !bool(params, "force")) {
3371
3396
  const secret = findSecret(memo);
3372
- if (secret) throw new CliError("confirm", `The ${field} looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; ${verb} with --force if you mean to`, { kind: secret.kind });
3397
+ if (secret) throw new CliError("confirm", `The ${field} looks like ${secretWords(secret)}; ${verb} with --force if you mean to`, { kind: secret.kind });
3373
3398
  }
3374
3399
  return memo || void 0;
3375
3400
  }
@@ -3587,11 +3612,15 @@ var WALLET_METHODS = Object.fromEntries(Object.entries({
3587
3612
  let invoice = text.replace(/^lightning:/i, "");
3588
3613
  let n;
3589
3614
  let note;
3615
+ if (params.chat !== void 0 && !isInvoice(text)) throw new CliError("usage", "--chat names the chat an invoice came from: an address's or LNURL's invoice is its server's");
3616
+ const chat = params.chat === void 0 ? void 0 : chatOf(ctx, params);
3617
+ if (chat) inviteTaken(chat);
3590
3618
  if (isInvoice(text)) n = network(params);
3591
3619
  else if (isLnurl(text)) {
3592
3620
  n = network(params);
3593
3621
  const amount = num(params, "amount", 0, { min: 1 });
3594
3622
  if (!amount) throw new CliError("bad_request", "amount is required to pay a Lightning address or LNURL");
3623
+ if (n === "mainnet" && !bool(params, "confirmReal")) throw new CliError("confirm", "This pays real money (Mainnet): pass --confirm-real to confirm this payment");
3595
3624
  const view = await node(ctx).lnurlResolve({
3596
3625
  text,
3597
3626
  network: n
@@ -3619,7 +3648,11 @@ var WALLET_METHODS = Object.fromEntries(Object.entries({
3619
3648
  quote: quote.quote,
3620
3649
  mint: quote.mint,
3621
3650
  ...note ? { note } : {},
3622
- ...real(params)
3651
+ ...real(params),
3652
+ ...chat ? {
3653
+ linkId: chat.id,
3654
+ invoice
3655
+ } : {}
3623
3656
  });
3624
3657
  return {
3625
3658
  network: n,
@@ -3979,6 +4012,7 @@ var METHODS = {
3979
4012
  async "profile.set"(ctx, params) {
3980
4013
  const patch = {};
3981
4014
  if (params.name !== void 0) patch.nick = checkShownName(params.name);
4015
+ guardText(patch.nick, bool(params, "force"), "name", "set it");
3982
4016
  if (params.shareProfile !== void 0) patch.shareProfile = bool(params, "shareProfile");
3983
4017
  await node(ctx).updateSettings({ settings: patch });
3984
4018
  return METHODS["profile.get"](ctx, {});
@@ -3990,6 +4024,7 @@ var METHODS = {
3990
4024
  const patch = {};
3991
4025
  let warning;
3992
4026
  for (const [key, value] of Object.entries(params)) {
4027
+ if (key === "force") continue;
3993
4028
  const kind = Object.hasOwn(SETTABLE, key) ? SETTABLE[key] : void 0;
3994
4029
  if (key === "readRelays") throw new CliError("bad_request", "readRelays is not a setting the CLI follows: it reads the Pkarr relays first, so a contact on the web app (relays only) is found, and the Mainline DHT when every relay fails");
3995
4030
  if (!kind) throw new CliError("bad_request", `${key} is not a setting the CLI changes (${Object.keys(SETTABLE).join(", ")})`);
@@ -3998,6 +4033,7 @@ var METHODS = {
3998
4033
  if (kind === "boolean" && typeof value !== "boolean") throw new CliError("bad_request", `${key} must be true or false`);
3999
4034
  if (key === "nick") {
4000
4035
  patch.nick = checkShownName(value, key);
4036
+ guardText(patch.nick, bool(params, "force"), "nick", "set it");
4001
4037
  continue;
4002
4038
  }
4003
4039
  if (kind === "ice") {
@@ -4094,7 +4130,7 @@ var METHODS = {
4094
4130
  checkTextSize(text);
4095
4131
  if (!bool(params, "force")) {
4096
4132
  const secret = findSecret(text);
4097
- if (secret) throw new CliError("confirm", `The text looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; send it with --force if you mean to`, { kind: secret.kind });
4133
+ if (secret) throw new CliError("confirm", `The text looks like ${secretWords(secret)}; send it with --force if you mean to`, { kind: secret.kind });
4098
4134
  }
4099
4135
  const wait = oneOf(params, "wait", [
4100
4136
  "none",
@@ -4139,7 +4175,7 @@ var METHODS = {
4139
4175
  const text = str(params, "text", true);
4140
4176
  if (!bool(params, "force")) {
4141
4177
  const secret = findSecret(text);
4142
- if (secret) throw new CliError("confirm", `The text looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; edit with --force if you mean to`, { kind: secret.kind });
4178
+ if (secret) throw new CliError("confirm", `The text looks like ${secretWords(secret)}; edit with --force if you mean to`, { kind: secret.kind });
4143
4179
  }
4144
4180
  const wait = oneOf(params, "wait", ["none", "confirmed"], "none");
4145
4181
  const ms = num(params, "timeout", 30, {
@@ -4257,13 +4293,13 @@ var METHODS = {
4257
4293
  async "saved.remove"(ctx, params) {
4258
4294
  return saveMark(ctx, params, true);
4259
4295
  },
4260
- /** The saved messages, the last saved first, each as it is now and named by its chat or group. */
4296
+ /** The saved messages under `saved`, the last saved first, each as it is now and named by its chat or group. */
4261
4297
  async "saved.list"(ctx) {
4262
4298
  const { links, groups } = state(ctx);
4263
4299
  const saved = await node(ctx).savedMessages();
4264
4300
  const originals = /* @__PURE__ */ new Map();
4265
4301
  for (const linkId of new Set(saved.map((s) => s.message.linkId))) originals.set(linkId, await originalsNow(ctx, linkId, saved.flatMap((s) => s.message.linkId === linkId ? [s.message] : [])));
4266
- return saved.map(({ savedAt, message }) => {
4302
+ return { saved: saved.map(({ savedAt, message }) => {
4267
4303
  const checked = (json) => quoteChecked(json, message, originals.get(message.linkId));
4268
4304
  if (!message.linkId.startsWith("group:")) return {
4269
4305
  chat: message.linkId,
@@ -4276,7 +4312,7 @@ var METHODS = {
4276
4312
  savedAt,
4277
4313
  message: checked(groupMessageJson(message, groups.find((g) => g.id === id)))
4278
4314
  };
4279
- });
4315
+ }) };
4280
4316
  },
4281
4317
  /**
4282
4318
  * WISP 400 § Forwards: messages of a chat or a group sent on to up to 5 chats and groups, each as a new message of mine
@@ -4298,7 +4334,7 @@ var METHODS = {
4298
4334
  }
4299
4335
  if (!bool(params, "force")) for (const message of chosen) {
4300
4336
  const secret = message.file ? null : findSecret(message.text);
4301
- if (secret) throw new CliError("confirm", `A message looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; forward it with --force if you mean to`, {
4337
+ if (secret) throw new CliError("confirm", `A message looks like ${secretWords(secret)}; forward it with --force if you mean to`, {
4302
4338
  kind: secret.kind,
4303
4339
  messageId: message.id
4304
4340
  });
@@ -4520,6 +4556,7 @@ var METHODS = {
4520
4556
  async "group.create"(ctx, params) {
4521
4557
  const name = groupName(str(params, "name", true));
4522
4558
  if (!name) throw new CliError("bad_request", `A group's name is 1 to 64 characters on one line`);
4559
+ guardText(name, bool(params, "force"), "group's name", "create it");
4523
4560
  const profile = oneOf(params, "profile", ["community", "mesh"], "community");
4524
4561
  const { groupId } = await node(ctx).createGroup({
4525
4562
  name,
@@ -4605,7 +4642,7 @@ var METHODS = {
4605
4642
  const text = str(params, "text", true);
4606
4643
  if (!bool(params, "force")) {
4607
4644
  const secret = findSecret(text);
4608
- if (secret) throw new CliError("confirm", `The text looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; edit with --force if you mean to`, { kind: secret.kind });
4645
+ if (secret) throw new CliError("confirm", `The text looks like ${secretWords(secret)}; edit with --force if you mean to`, { kind: secret.kind });
4609
4646
  }
4610
4647
  const mentions = mentionsFor(text, list(params, "mentions"), group);
4611
4648
  const wait = oneOf(params, "wait", ["none", "sent"], "none");
@@ -4791,7 +4828,8 @@ async function clearProfile(ctx) {
4791
4828
  };
4792
4829
  }
4793
4830
  /**
4794
- * The engine's calls that send a text this side writes (a message, a file's caption, a payment's memo): `engine.call`
4831
+ * The engine's calls that send a text this side writes (a message, a file's caption, a payment's memo, a name others
4832
+ * read): `engine.call`
4795
4833
  * runs the secret guard of `send`, `edit` and `forward` on them too (docs/CLI.md § Safety), so a raw call is no way around it. `force: true` (`--force`) sends it.
4796
4834
  */
4797
4835
  var ENGINE_SENDS = /* @__PURE__ */ new Set([
@@ -4806,15 +4844,23 @@ var ENGINE_SENDS = /* @__PURE__ */ new Set([
4806
4844
  "askToPay",
4807
4845
  "preparePayment",
4808
4846
  "fedimintInvoice",
4809
- "lnurlInvoice"
4847
+ "lnurlInvoice",
4848
+ "createGroup",
4849
+ "renameGroup",
4850
+ "updateSettings",
4851
+ "sendFile"
4810
4852
  ]);
4811
4853
  async function guardEngineSend(ctx, method, args) {
4854
+ const of = (value, key) => value && typeof value === "object" ? value[key] : void 0;
4812
4855
  let texts = [
4813
4856
  args.text,
4814
4857
  args.card,
4815
4858
  args.caption,
4816
4859
  args.memo,
4817
- args.comment
4860
+ args.comment,
4861
+ args.name,
4862
+ of(args.settings, "nick"),
4863
+ of(args.file, "name")
4818
4864
  ];
4819
4865
  if (method === "forwardMessages") {
4820
4866
  const ids = Array.isArray(args.messageIds) ? args.messageIds.filter((id) => typeof id === "string") : [];
@@ -4825,7 +4871,7 @@ async function guardEngineSend(ctx, method, args) {
4825
4871
  })) : [];
4826
4872
  }
4827
4873
  const secret = secretIn(texts);
4828
- if (secret) throw new CliError("confirm", `The text looks like ${secret.kind === "cashu" ? "a Cashu token (money anyone who reads it can take)" : "a secret (a seed or a private key)"}; call ${method} with --force if you mean to`, { kind: secret.kind });
4874
+ if (secret) throw new CliError("confirm", `The text looks like ${secretWords(secret)}; call ${method} with --force if you mean to`, { kind: secret.kind });
4829
4875
  }
4830
4876
  /**
4831
4877
  * How long `react` and `pin` in a 1:1 chat wait for the contact: a one-shot until it confirmed (as `edit`), since what
@@ -5046,4 +5092,4 @@ async function callApi(ctx, method, params = {}) {
5046
5092
  //#endregion
5047
5093
  export { flushCardUpdates as _, hideStateSecrets as a, paymentJson as c, nodeLocalFetch as d, chatJson as f, resumeHolds as g, groupMessageJson as h, groupSendRefused as i, reportAppFrames as l, groupJson as m, SETTABLE as n, mentionsFor as o, chatMessageJson as p, callApi as r, redactSettings as s, API_METHODS as t, servedApps as u };
5048
5094
 
5049
- //# sourceMappingURL=api-DFCgr6RH.js.map
5095
+ //# sourceMappingURL=api-BF_KwecF.js.map