@ghostlytools/cli 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/assets/{api-DLzCtePC.js → api-BwEgbvvK.js} +49 -23
- package/dist/assets/api-BwEgbvvK.js.map +1 -0
- package/dist/assets/{api-DYMKyb1k.js → api-jRUXnBdX.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js → apiKit-BlsNk-Cx.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js.map → apiKit-BlsNk-Cx.js.map} +1 -1
- package/dist/assets/{appFetch-D56GsYuq.js → appFetch-CW9fJPHh.js} +2 -2
- package/dist/assets/{appFetch-D56GsYuq.js.map → appFetch-CW9fJPHh.js.map} +1 -1
- package/dist/assets/{apps-BPFW19Wc.js → apps-BcG4u6SM.js} +1 -1
- package/dist/assets/{apps-XnZ8VEuj.js → apps-CL8TXHhu.js} +6 -6
- package/dist/assets/{apps-XnZ8VEuj.js.map → apps-CL8TXHhu.js.map} +1 -1
- package/dist/assets/{backup-DpyvT9Z6.js → backup-BA41EDvh.js} +47 -8
- package/dist/assets/backup-BA41EDvh.js.map +1 -0
- package/dist/assets/{backup-COX6j1_W.js → backup-xZfV-ytw.js} +1 -1
- package/dist/assets/{bitcoind-DTsrd7TF.js → bitcoind-Dh7n9amb.js} +2 -2
- package/dist/assets/{bitcoind-DTsrd7TF.js.map → bitcoind-Dh7n9amb.js.map} +1 -1
- package/dist/assets/buttons-CsGdQNnR.js +1 -0
- package/dist/assets/{buttons-BvWqHJeh.js → buttons-SH1tNRh7.js} +6 -6
- package/dist/assets/buttons-SH1tNRh7.js.map +1 -0
- package/dist/assets/{client-kGZ3ZdUW.js → client-DGS-atRu.js} +2 -2
- package/dist/assets/{client-kGZ3ZdUW.js.map → client-DGS-atRu.js.map} +1 -1
- package/dist/assets/{endpoint-B0vE5ojY.js → endpoint-Cvu-taMs.js} +42 -5
- package/dist/assets/{endpoint-B0vE5ojY.js.map → endpoint-Cvu-taMs.js.map} +1 -1
- package/dist/assets/{groupMeta-DTQAJG50.js → groupMeta-DxuJzko_.js} +49 -28
- package/dist/assets/groupMeta-DxuJzko_.js.map +1 -0
- package/dist/assets/{host-z0FAHP9Z.js → host-BxM-HMr0.js} +62 -9
- package/dist/assets/host-BxM-HMr0.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-CvsAfQRQ.js → hyperdhtRelay-DLUiwfnt.js} +32 -4
- package/dist/assets/hyperdhtRelay-DLUiwfnt.js.map +1 -0
- package/dist/assets/{irohWeb-CLBx5MIv.js → irohWeb-CbnGtUo6.js} +175 -6
- package/dist/assets/irohWeb-CbnGtUo6.js.map +1 -0
- package/dist/assets/{main-CVqkvuIo.js → main-CwTaepxR.js} +48 -31
- package/dist/assets/main-CwTaepxR.js.map +1 -0
- package/dist/assets/{ownStatus-DMEhrpkd.js → ownStatus-DtzIllg2.js} +4 -3
- package/dist/assets/ownStatus-DtzIllg2.js.map +1 -0
- package/dist/assets/{profiles-BFSGqDFC.js → profiles-BOYGlmu2.js} +2 -2
- package/dist/assets/{profiles-BFSGqDFC.js.map → profiles-BOYGlmu2.js.map} +1 -1
- package/dist/assets/{registry-B15Yg_1C.js → registry-4W1LGlCF.js} +1 -1
- package/dist/assets/{registry-rXgaZeNn.js → registry-Bep4umOM.js} +36 -28
- package/dist/assets/registry-Bep4umOM.js.map +1 -0
- package/dist/assets/secretGuard-Bm6nci0I.js +1 -0
- package/dist/assets/{secretGuard-B4-LlMjv.js → secretGuard-BrATm_gl.js} +33 -9
- package/dist/assets/{secretGuard-B4-LlMjv.js.map → secretGuard-BrATm_gl.js.map} +1 -1
- package/dist/assets/{server-CQR7NLCz.js → server-D4gf-LnD.js} +257 -43
- package/dist/assets/server-D4gf-LnD.js.map +1 -0
- package/dist/assets/{waitNotice-BGM0QOS2.js → waitNotice-DQvZgz2T.js} +2 -2
- package/dist/assets/{waitNotice-BGM0QOS2.js.map → waitNotice-DQvZgz2T.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-DLzCtePC.js.map +0 -1
- package/dist/assets/backup-DpyvT9Z6.js.map +0 -1
- package/dist/assets/buttons-Bq7pTXqF.js +0 -1
- package/dist/assets/buttons-BvWqHJeh.js.map +0 -1
- package/dist/assets/groupMeta-DTQAJG50.js.map +0 -1
- package/dist/assets/host-z0FAHP9Z.js.map +0 -1
- package/dist/assets/hyperdhtRelay-CvsAfQRQ.js.map +0 -1
- package/dist/assets/irohWeb-CLBx5MIv.js.map +0 -1
- package/dist/assets/main-CVqkvuIo.js.map +0 -1
- package/dist/assets/ownStatus-DMEhrpkd.js.map +0 -1
- package/dist/assets/registry-rXgaZeNn.js.map +0 -1
- package/dist/assets/secretGuard-BmmnEbYf.js +0 -1
- package/dist/assets/server-CQR7NLCz.js.map +0 -1
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
138
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 |
|
|
139
139
|
| `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)), keeping the profile for the new daemon in between: other commands wait for its socket rather than open the profile. 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 |
|
|
140
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 |
|
|
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` |
|
|
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`, `switchGroup`, `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` |
|
|
142
142
|
| `events [--since seq] [--translate lang]` | What the event journal holds, without following ([Translation](#translation)) |
|
|
143
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` |
|
|
144
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) |
|
|
@@ -147,19 +147,19 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
147
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` |
|
|
148
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 |
|
|
149
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 |
|
|
150
|
-
| `group call <group> --sfu <https origin> [--e2ee \| --no-e2ee] \| --e2ee \| --no-e2ee \| --clear` | A community's admin names the node its calls go through (WISP 602), signed beside the name and picture, or `--clear` turns its calls off. `--e2ee` asks for sealed call media (§ End-to-end encryption), `--no-e2ee` turns it off, with `--sfu` or alone for the node already named; left out, the group keeps what it had. An https origin only, at most 200 characters, in one spelling (`https://call.example.com`: no path, query, trailing
|
|
150
|
+
| `group call <group> --sfu <https origin> [--e2ee \| --no-e2ee] \| --e2ee \| --no-e2ee \| --clear` | A community's admin names the node its calls go through (WISP 602), signed beside the name and picture, or `--clear` turns its calls off. `--e2ee` asks for sealed call media (§ End-to-end encryption), `--no-e2ee` turns it off, with `--sfu` or alone for the node already named; left out, the group keeps what it had. An https origin only, at most 200 characters, in one spelling (`https://call.example.com`: no path, query, trailing `/`, capitals or default port `:443`); anything else is refused before it is signed, with the origin to use when there is one, or the limit when the origin is longer. A member who is not the admin, one out of the group (removed, or left: with that reason), or a private group, is `refused`. Answers the group as `group show` does, whose `call` is `{sfu, e2ee}` or null |
|
|
151
151
|
| `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. It answers `{group, joined, stage}`: without a daemon after waiting up to 60 s to be let in, through one at once (the daemon goes on knocking) |
|
|
152
152
|
| `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 |
|
|
153
153
|
| `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) |
|
|
154
154
|
| `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 |
|
|
155
155
|
| `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}}` |
|
|
156
|
-
| `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 |
|
|
156
|
+
| `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>"}' --yes` takes another, leaving the one shown and deleting its history on this device |
|
|
157
157
|
| `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 |
|
|
158
158
|
| `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 |
|
|
159
159
|
| `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 |
|
|
160
160
|
| `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 |
|
|
161
161
|
| `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` (a one-shot without `--for` reaches nobody and says so in a `note`). Answers `{group, typing, kind, status, reached, sendTyping}` (`reached`: members with an open edge). A community does not carry typing yet (exit 1, `unavailable`) |
|
|
162
|
-
| `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 |
|
|
162
|
+
| `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, up to 3600; a NIP-46 signer waits as long), and one that does not come is `timeout` (exit 4). Pubky waits at most 300 s, as long as its relay keeps the request: a longer `--timeout` is refused. 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 |
|
|
163
163
|
| `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 |
|
|
164
164
|
| `identity providers`, `identity list` | Kinds of proof and their signers; this profile's proofs |
|
|
165
165
|
| `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` and `identity withdraw` name 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 |
|
|
@@ -167,7 +167,7 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
167
167
|
| `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 |
|
|
168
168
|
| `lightning default <card>`, `lightning rename <card> <name>` | Lightning cards: which receives by default |
|
|
169
169
|
| `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)) |
|
|
170
|
-
| `message delete <chat\|group> <message> --everyone [--wait none\|confirmed\|sent] [--timeout s] [--purge]` | 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. In a group (no receipts), `--wait sent` waits until a member's edge (a hub's, in a community) took the removal, the default without a daemon, and the answer's `edges` and `sent` say how many did, as for `group send`. Without `--everyone`, only this device forgets it, except a text of yours still `waiting` (it never left this device): it is cancelled, as the app's Cancel sending, and the contact never gets it; if a retry had just handed it to a relay, it is deleted for everyone instead, and the answer's `everyone` is `true`. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it). What a deleted message said stays in the profile's store journal (`db/journal.bin`) until the store folds it, within the hour; `--purge` (with or without `--everyone`) takes its line out of the replies that quote it (and, in a private group, the copy the group kept for members who missed it) and folds the store before answering, so its text has left the profile's folder when the command returns, and the answer says `purged: true`. One fold per call: for a secret pasted into a chat, not every delete |
|
|
170
|
+
| `message delete <chat\|group> <message> --everyone [--wait none\|confirmed\|sent] [--timeout s] [--purge]` | 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. In a group (no receipts), `--wait sent` waits until a member's edge (a hub's, in a community) took the removal, the default without a daemon, and the answer's `edges` and `sent` say how many did, as for `group send`. Either wait that times out (exit 4, `timeout`) still deleted it: the message is gone here and its removal goes on by itself, and the error's `details` carry `deleted` (and `purged: true` once `--purge` ran), so a retry is not needed. Without `--everyone`, only this device forgets it, except a text of yours still `waiting` (it never left this device): it is cancelled, as the app's Cancel sending, and the contact never gets it; if a retry had just handed it to a relay, it is deleted for everyone instead, and the answer's `everyone` is `true`. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it). What a deleted message said stays in the profile's store journal (`db/journal.bin`) until the store folds it, within the hour; `--purge` (with or without `--everyone`) takes its line out of the replies that quote it (and, in a private group, the copy the group kept for members who missed it) and folds the store before answering, so its text has left the profile's folder when the command returns, and the answer says `purged: true`. One fold per call: for a secret pasted into a chat, not every delete |
|
|
171
171
|
| `message retry\|delete\|details <chat> <message>` | One message |
|
|
172
172
|
| `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 |
|
|
173
173
|
| `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as removeStored, Qt as withoutPictureMetadata, Tt as decodeGroupEntryLink, U as waitingGroupFile, W as IDENTITY_DRAFT_TTL_MS, Xt as NO_PICTURE_METADATA, Yt as withoutVideoMetadata, Zt as stripPictureMetadata, a as groupMemberOfLink, b as replyRef, c as groupPayTwin, ft as iceServerProblem, h as groupOfFile, k as paymentNetwork, o as groupPayLineId, p as groupFileId, pt as iceServerSetting, qt as withoutAudioMetadata, s as groupPayNoteId, t as DEFAULT_IROH_RELAYS } from "./irohWeb-
|
|
1
|
+
import { Ai as parseLocalTarget, At as sanitizeTypingStatus, Ca as isAppUrl, Cn as sanitizeFileName, D as GROUP_FILE_LIMITS, Di as GhostlyHttpError, Dn as VOICE_METER, Dr as statusCardBytes, Dt as TYPING_REFRESH_MS, En as VOICE_LIMITS, Et as TYPING_KINDS, La as isAppRef, Mi as LIMITS, Mn as voiceDownloadName, Nn as voiceLevel, Oi as VIEWER_PERMISSIONS_POLICY, On as baseMime, Sr as cardLine, Tn as PLAYABLE_AUDIO, Ya as readImageMeta, ao as inviteLink, gr as STATUS_CARD_LIMITS, ja as appRef, jn as parseVoiceMeta, jr as claimedTime, kn as downsamplePeaks, kr as MESSAGE_CLOCK_SKEW_MS, n as groupCallSfu, or as replySnippet, so as ownInviteRefusal, tn as APP_DATA_MAX_BYTES, vr as appCardId, wn as sanitizeMime, wr as checkStatusCard, yi as AWAITING_PEER_MS, yr as appCardUrl } from "./groupMeta-DxuJzko_.js";
|
|
2
|
+
import { B as removeStored, Qt as withoutPictureMetadata, Tt as decodeGroupEntryLink, U as waitingGroupFile, W as IDENTITY_DRAFT_TTL_MS, Xt as NO_PICTURE_METADATA, Yt as withoutVideoMetadata, Zt as stripPictureMetadata, a as groupMemberOfLink, b as replyRef, c as groupPayTwin, ft as iceServerProblem, h as groupOfFile, k as paymentNetwork, o as groupPayLineId, p as groupFileId, pt as iceServerSetting, qt as withoutAudioMetadata, s as groupPayNoteId, t as DEFAULT_IROH_RELAYS } from "./irohWeb-CbnGtUo6.js";
|
|
3
3
|
import { c as normalizeRelayUrl, l as relayUrlProblem } from "./relay-Cjfmdec0.js";
|
|
4
|
-
import { n as secretWords, r as findSecret, t as guardText } from "./secretGuard-
|
|
5
|
-
import { a as PAY_METHODS, d as ENGINE_METHODS, f as ENGINE_PARAMS, g as engineParamsProblem, i as CHAT_METHODS, l as withStoredIds, m as READ_PARAMS, n as statusJson, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus, u as DESTRUCTIVE_CALLS } from "./ownStatus-
|
|
4
|
+
import { n as secretWords, r as findSecret, t as guardText } from "./secretGuard-BrATm_gl.js";
|
|
5
|
+
import { a as PAY_METHODS, d as ENGINE_METHODS, f as ENGINE_PARAMS, g as engineParamsProblem, i as CHAT_METHODS, l as withStoredIds, m as READ_PARAMS, n as statusJson, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus, u as DESTRUCTIVE_CALLS } from "./ownStatus-DtzIllg2.js";
|
|
6
6
|
import { i as localFileError, r as asCliError, t as CliError } from "./errors-DDLFO4Gf.js";
|
|
7
|
-
import { A as sentAt, B as shellWord, C as nobodyJoined, D as oneOf, E as num, I as state, L as str, M as shownName, N as sinceSeq, O as oneShotWaits, P as somebodyJoined, R as transportOffered, S as noMessage, T as node, _ as list, a as contactKeyOf, c as findChatOrGroup, d as groupById, f as groupNameOf, g as keptForJoin, h as inviteTaken, j as settingsOf, k as ownChatOf, l as findGroup, m as groupPrefixed, n as chatOf, o as dhtOnly, p as groupOf, r as chatOrGroup, s as findChat, t as bool, v as messageOf, x as noFile, z as waitForState } from "./apiKit-
|
|
7
|
+
import { A as sentAt, B as shellWord, C as nobodyJoined, D as oneOf, E as num, I as state, L as str, M as shownName, N as sinceSeq, O as oneShotWaits, P as somebodyJoined, R as transportOffered, S as noMessage, T as node, _ as list, a as contactKeyOf, c as findChatOrGroup, d as groupById, f as groupNameOf, g as keptForJoin, h as inviteTaken, j as settingsOf, k as ownChatOf, l as findGroup, m as groupPrefixed, n as chatOf, o as dhtOnly, p as groupOf, r as chatOrGroup, s as findChat, t as bool, v as messageOf, x as noFile, z as waitForState } from "./apiKit-BlsNk-Cx.js";
|
|
8
8
|
import { l as toBase64Url, s as randomBytes$1 } from "./bytes-C1DNGY18.js";
|
|
9
9
|
import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-CfvUXdSy.js";
|
|
10
10
|
import { p as fileStore } from "./idb-ewvbqyDI.js";
|
|
11
11
|
import { t as childEnv } from "./childEnv-C-99hdbL.js";
|
|
12
|
-
import { a as checkTextSize$1, c as
|
|
13
|
-
import { a as checkShownName } from "./profiles-
|
|
12
|
+
import { a as checkTextSize$1, c as nobodyElseIn, d as waitForConfirmed, f as waitForEdit, h as waitForRemoval, i as pressable, l as outOf, m as waitForMessage, n as buttonsCard, o as ended, p as waitForGroupFrame, s as goesOn, t as BUTTON_METHODS, u as purgeMessage } from "./buttons-SH1tNRh7.js";
|
|
13
|
+
import { a as checkShownName } from "./profiles-BOYGlmu2.js";
|
|
14
14
|
import { a as MAX_AVATAR_LENGTH, o as sanitizeAvatar } from "./linkPreview-DdMf-YAc.js";
|
|
15
15
|
import { m as identityStatement } from "./identityProofs-Cksc_K7_.js";
|
|
16
|
-
import { i as parseProofBunker, t as IDENTITY_PROVIDERS } from "./registry-
|
|
17
|
-
import { t as BACKUP_METHODS } from "./backup-
|
|
18
|
-
import { s as isAppFetchUrl } from "./appFetch-
|
|
19
|
-
import { o as checkedBundle } from "./apps-
|
|
16
|
+
import { a as SignerTimeout, i as parseProofBunker, t as IDENTITY_PROVIDERS } from "./registry-Bep4umOM.js";
|
|
17
|
+
import { t as BACKUP_METHODS } from "./backup-BA41EDvh.js";
|
|
18
|
+
import { s as isAppFetchUrl } from "./appFetch-CW9fJPHh.js";
|
|
19
|
+
import { o as checkedBundle } from "./apps-CL8TXHhu.js";
|
|
20
20
|
import { m as parsePaymentAmount } from "./paymentIntent-DySU3Ajm.js";
|
|
21
|
-
import { t as chatState } from "./waitNotice-
|
|
21
|
+
import { t as chatState } from "./waitNotice-DQvZgz2T.js";
|
|
22
22
|
import { generateMnemonic } from "@scure/bip39";
|
|
23
23
|
import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
24
24
|
import { execFile, spawn } from "node:child_process";
|
|
@@ -1299,6 +1299,7 @@ var FILE_METHODS = {
|
|
|
1299
1299
|
transfer: state(ctx).transfers[fileId] ?? null
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
+
if (!state(ctx).transfers[fileId] && !await fileStore.get(fileId).catch(() => void 0)) throw noFile(fileId);
|
|
1302
1303
|
if (action === "resend" || action === "request") {
|
|
1303
1304
|
const outgoing = fileId.startsWith(`${linkId}-out-`);
|
|
1304
1305
|
if (outgoing !== (action === "resend")) throw new CliError("bad_request", outgoing ? "A file sent from here is sent again: file resend" : "A received file is asked for again: file request");
|
|
@@ -2462,7 +2463,8 @@ async function picture(params) {
|
|
|
2462
2463
|
}
|
|
2463
2464
|
/**
|
|
2464
2465
|
* The node a group's calls go through (WISP 602): an https origin in its one spelling, refused here before anything is
|
|
2465
|
-
* signed. A URL that names an https origin in another spelling (a path, a trailing `/`, capitals) is told that
|
|
2466
|
+
* signed. A URL that names an https origin in another spelling (a path, a trailing `/`, capitals, `:443`) is told that
|
|
2467
|
+
* origin, and an origin past the limit is told the limit: before, both were told of a path, query or `/` it may not have.
|
|
2466
2468
|
*/
|
|
2467
2469
|
function callNode(raw, ref, groupId) {
|
|
2468
2470
|
const sfu = groupCallSfu(raw);
|
|
@@ -2470,9 +2472,12 @@ function callNode(raw, ref, groupId) {
|
|
|
2470
2472
|
let origin;
|
|
2471
2473
|
try {
|
|
2472
2474
|
const url = new URL(raw);
|
|
2473
|
-
if (url.protocol === "https:"
|
|
2475
|
+
if (url.protocol === "https:") origin = url.origin;
|
|
2474
2476
|
} catch {}
|
|
2475
|
-
|
|
2477
|
+
const quoted = JSON.stringify(raw);
|
|
2478
|
+
if (!origin) throw new CliError("bad_request", `${quoted} is not an https origin: a call node is like https://call.example.com`);
|
|
2479
|
+
if (origin.length > 200) throw new CliError("bad_request", `${quoted} is too long: a call node is an https origin of at most 200 characters`);
|
|
2480
|
+
throw new CliError("bad_request", `${quoted} is not in its one spelling (lower case, no default port, path, query or trailing /): ghostly group call ${shellWord(ref, groupId)} --sfu ${origin}`);
|
|
2476
2481
|
}
|
|
2477
2482
|
/**
|
|
2478
2483
|
* A group this profile administers or is in, not only an invitation: before, the engine answered `group rename`,
|
|
@@ -2760,9 +2765,11 @@ var IDENTITY_METHODS = {
|
|
|
2760
2765
|
} catch (error) {
|
|
2761
2766
|
throw new CliError("bad_request", `${bunker.name} (${bunker.label}): ${error instanceof Error ? error.message : String(error)}`);
|
|
2762
2767
|
}
|
|
2763
|
-
const
|
|
2768
|
+
const most = signer.maxWaitMs ? Math.floor(signer.maxWaitMs / 1e3) : 3600;
|
|
2769
|
+
if (typeof params.timeout === "number" && params.timeout > most) throw new CliError("bad_request", `timeout must be a number from 5 to ${most}: ${signer.label} waits at most ${most} s for an approval`);
|
|
2770
|
+
const seconds = num(params, "timeout", Math.min(300, most), {
|
|
2764
2771
|
min: 5,
|
|
2765
|
-
max:
|
|
2772
|
+
max: most
|
|
2766
2773
|
});
|
|
2767
2774
|
const signal = AbortSignal.timeout(seconds * 1e3);
|
|
2768
2775
|
return {
|
|
@@ -2770,6 +2777,7 @@ var IDENTITY_METHODS = {
|
|
|
2770
2777
|
proof: proofJson(await signer.run({
|
|
2771
2778
|
values,
|
|
2772
2779
|
signal,
|
|
2780
|
+
waitMs: seconds * 1e3,
|
|
2773
2781
|
onAuthUrl: (url) => {
|
|
2774
2782
|
ctx.hub.emitLive("identity.approval", `identity.approval:${Date.now()}`, {
|
|
2775
2783
|
provider: p.id,
|
|
@@ -2806,7 +2814,7 @@ var IDENTITY_METHODS = {
|
|
|
2806
2814
|
throw error;
|
|
2807
2815
|
}
|
|
2808
2816
|
}).catch((error) => {
|
|
2809
|
-
if (!signal.aborted || error instanceof CliError) throw error;
|
|
2817
|
+
if (!(signal.aborted || error instanceof SignerTimeout) || error instanceof CliError) throw error;
|
|
2810
2818
|
throw new CliError("timeout", `Timed out after ${seconds} s waiting for ${signer.label} to approve the ${p.label} proof: --timeout <seconds> waits longer`);
|
|
2811
2819
|
}))
|
|
2812
2820
|
};
|
|
@@ -3103,6 +3111,11 @@ var OPENED_SERVICE_DROPPED_HEADERS = [
|
|
|
3103
3111
|
"nel",
|
|
3104
3112
|
"link"
|
|
3105
3113
|
];
|
|
3114
|
+
/**
|
|
3115
|
+
* A contact's headers that would set the page's browser features (camera, microphone, location, a device): the
|
|
3116
|
+
* viewer's own `VIEWER_PERMISSIONS_POLICY` takes their place, as in the extension's viewer (core `withViewerPolicy`).
|
|
3117
|
+
*/
|
|
3118
|
+
var OPENED_SERVICE_FEATURE_HEADERS = ["permissions-policy", "feature-policy"];
|
|
3106
3119
|
/** The directives of a contact's policy that send reports to a URL it names, dropped from it. */
|
|
3107
3120
|
var OPENED_SERVICE_DROPPED_DIRECTIVES = ["report-uri", "report-to"];
|
|
3108
3121
|
/** A contact's `Content-Security-Policy` value (one policy or several joined by commas) without its report directives. */
|
|
@@ -3202,7 +3215,7 @@ async function proxy(request, response, chunks, send, cookies, policy) {
|
|
|
3202
3215
|
const out = {};
|
|
3203
3216
|
for (const [name, value] of answer.headers) {
|
|
3204
3217
|
const lower = name.toLowerCase();
|
|
3205
|
-
if (lower === "transfer-encoding" || lower === "connection" || OPENED_SERVICE_DROPPED_HEADERS.includes(lower)) continue;
|
|
3218
|
+
if (lower === "transfer-encoding" || lower === "connection" || OPENED_SERVICE_DROPPED_HEADERS.includes(lower) || OPENED_SERVICE_FEATURE_HEADERS.includes(lower)) continue;
|
|
3206
3219
|
if (lower === "set-cookie") {
|
|
3207
3220
|
const cookie = hostOnlyCookie(value);
|
|
3208
3221
|
if (!cookie) continue;
|
|
@@ -3214,6 +3227,7 @@ async function proxy(request, response, chunks, send, cookies, policy) {
|
|
|
3214
3227
|
} else out[lower] = value;
|
|
3215
3228
|
}
|
|
3216
3229
|
out["content-security-policy"] = [...out["content-security-policy"] ?? [], policy];
|
|
3230
|
+
out["permissions-policy"] = VIEWER_PERMISSIONS_POLICY;
|
|
3217
3231
|
response.writeHead(answer.status, out);
|
|
3218
3232
|
await pipeline(Readable.from(answer.body, { objectMode: false }), response);
|
|
3219
3233
|
} catch (error) {
|
|
@@ -4712,7 +4726,7 @@ async function letIn(ctx, groupId, link, held) {
|
|
|
4712
4726
|
const own = held?.entryLink ? decodeGroupEntryLink(held.entryLink) : null;
|
|
4713
4727
|
if (held?.status === "active" && opened && own?.host !== opened.host) {
|
|
4714
4728
|
const kept = seen(state(ctx))?.others?.some((o) => "link" in o && decodeGroupEntryLink(o.link)?.host === opened.host);
|
|
4715
|
-
const pick = `keep the one you are in (ghostly engine keepGroup '{"groupId":"${groupId}"}') or take the link's instead (ghostly engine switchGroup '{"groupId":"${groupId}","to":"<its link, from group show --show-secret>"}')`;
|
|
4729
|
+
const pick = `keep the one you are in (ghostly engine keepGroup '{"groupId":"${groupId}"}') or take the link's instead, which leaves the one you are in and deletes its history on this device (ghostly engine switchGroup '{"groupId":"${groupId}","to":"<its link, from group show --show-secret>"}' --yes)`;
|
|
4716
4730
|
return {
|
|
4717
4731
|
group: groupId,
|
|
4718
4732
|
joined: false,
|
|
@@ -5353,9 +5367,21 @@ var METHODS = {
|
|
|
5353
5367
|
});
|
|
5354
5368
|
if (result.error) throw new CliError(result.refused ? "refused" : "unavailable", result.error);
|
|
5355
5369
|
if (purge) await purgeMessage(ctx, message);
|
|
5370
|
+
const goneHere = async (wait, text) => {
|
|
5371
|
+
try {
|
|
5372
|
+
return await wait();
|
|
5373
|
+
} catch (error) {
|
|
5374
|
+
if (!(error instanceof CliError) || error.code !== "timeout") throw error;
|
|
5375
|
+
throw new CliError("timeout", text ?? error.message, {
|
|
5376
|
+
...error.details,
|
|
5377
|
+
deleted: message.id,
|
|
5378
|
+
...purged
|
|
5379
|
+
});
|
|
5380
|
+
}
|
|
5381
|
+
};
|
|
5356
5382
|
if (target.group) {
|
|
5357
5383
|
const e = result.e;
|
|
5358
|
-
const edges = !e ? 0 : wait === "sent" ? await waitForGroupFrame(ctx, target.id, message.id, e, ms) : node(ctx).groupTaken({
|
|
5384
|
+
const edges = !e ? 0 : wait === "sent" ? await goneHere(() => waitForGroupFrame(ctx, target.id, message.id, e, ms), `${ended(ctx, ms)}: the message is gone here and no member's edge took its removal yet (it goes when one opens). Its removal ${goesOn(ctx)}`) : node(ctx).groupTaken({
|
|
5359
5385
|
groupId: target.id,
|
|
5360
5386
|
messageId: message.id,
|
|
5361
5387
|
edit: e
|
|
@@ -5370,7 +5396,7 @@ var METHODS = {
|
|
|
5370
5396
|
...purged
|
|
5371
5397
|
};
|
|
5372
5398
|
}
|
|
5373
|
-
if (wait === "confirmed") await waitForRemoval(ctx, target.linkId, message.id, ms);
|
|
5399
|
+
if (wait === "confirmed") await goneHere(() => waitForRemoval(ctx, target.linkId, message.id, ms));
|
|
5374
5400
|
return {
|
|
5375
5401
|
chat: target.id,
|
|
5376
5402
|
messageId: message.id,
|
|
@@ -6190,4 +6216,4 @@ async function callApi(ctx, method, params = {}, call) {
|
|
|
6190
6216
|
}
|
|
6191
6217
|
export { groupPayTwins as _, hideStateSecrets as a, settingsInEffect as c, servedApps as d, nodeLocalFetch as f, groupMessageJson as g, groupJson as h, groupSendRefused as i, paymentJson as l, chatMessageJson as m, SETTABLE as n, mentionsFor as o, chatJson as p, callApi as r, redactSettings as s, API_METHODS as t, reportAppFrames as u, resumeHolds as v, flushCardUpdates as y };
|
|
6192
6218
|
|
|
6193
|
-
//# sourceMappingURL=api-
|
|
6219
|
+
//# sourceMappingURL=api-BwEgbvvK.js.map
|