@ghostlytools/cli 1.13.1 → 1.13.2

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 (93) hide show
  1. package/README.md +6 -4
  2. package/dist/assets/api-DV52o7A8.js +3 -0
  3. package/dist/assets/{api-Dnq86JAA.js → api-O57SNJcb.js} +375 -77
  4. package/dist/assets/api-O57SNJcb.js.map +1 -0
  5. package/dist/assets/{apiKit-nLK4jeTq.js → apiKit-CPTFJHA7.js} +39 -7
  6. package/dist/assets/{apiKit-nLK4jeTq.js.map → apiKit-CPTFJHA7.js.map} +1 -1
  7. package/dist/assets/{appFetch-wqBWi3Ry.js → appFetch-Ca9DNQQ2.js} +2 -2
  8. package/dist/assets/{appFetch-wqBWi3Ry.js.map → appFetch-Ca9DNQQ2.js.map} +1 -1
  9. package/dist/assets/{apps-DBVhKpfe.js → apps-gXpGFPiv.js} +11 -9
  10. package/dist/assets/apps-gXpGFPiv.js.map +1 -0
  11. package/dist/assets/{apps-nLtyhC2f.js → apps-uZTu5FlR.js} +1 -1
  12. package/dist/assets/{arkade-DryM-q5n.js → arkade-B6UNf5HI.js} +2 -2
  13. package/dist/assets/{arkade-DryM-q5n.js.map → arkade-B6UNf5HI.js.map} +1 -1
  14. package/dist/assets/{backup-Bczllmzf.js → backup-CxH3auHB.js} +8 -6
  15. package/dist/assets/backup-CxH3auHB.js.map +1 -0
  16. package/dist/assets/{backup-D6s0LQdg.js → backup-Di2U6QVH.js} +1 -1
  17. package/dist/assets/{bitcoind-DML_-Xbv.js → bitcoind-BpZn3bRN.js} +2 -2
  18. package/dist/assets/{bitcoind-DML_-Xbv.js.map → bitcoind-BpZn3bRN.js.map} +1 -1
  19. package/dist/assets/{buttons-B3C3vdhH.js → buttons-D4udKEvT.js} +4 -4
  20. package/dist/assets/{buttons-B3C3vdhH.js.map → buttons-D4udKEvT.js.map} +1 -1
  21. package/dist/assets/buttons-YTYEqvGC.js +1 -0
  22. package/dist/assets/{client-B7jRrSnb.js → client-DGx7E8b3.js} +2 -2
  23. package/dist/assets/{client-B7jRrSnb.js.map → client-DGx7E8b3.js.map} +1 -1
  24. package/dist/assets/{engineErrors--9hfgKlK.js → engineErrors-wWlLy54D.js} +11 -3
  25. package/dist/assets/engineErrors-wWlLy54D.js.map +1 -0
  26. package/dist/assets/{fixedHosts-H3i6o9Iy.js → fixedHosts-CODN2pTL.js} +3 -3
  27. package/dist/assets/{fixedHosts-H3i6o9Iy.js.map → fixedHosts-CODN2pTL.js.map} +1 -1
  28. package/dist/assets/{groupMeta--fxSh792.js → groupMeta-CeZpqVVC.js} +105 -36
  29. package/dist/assets/groupMeta-CeZpqVVC.js.map +1 -0
  30. package/dist/assets/{host-CGzVFfMz.js → host-CRA7h5A2.js} +113 -40
  31. package/dist/assets/host-CRA7h5A2.js.map +1 -0
  32. package/dist/assets/{hyperdhtRelay-Ce-gWsRY.js → hyperdhtRelay-B34Zhz4P.js} +2 -2
  33. package/dist/assets/{hyperdhtRelay-Ce-gWsRY.js.map → hyperdhtRelay-B34Zhz4P.js.map} +1 -1
  34. package/dist/assets/{hyperdhtRelay-B4_wdCtx.js → hyperdhtRelay-DDwU5b4P.js} +2 -2
  35. package/dist/assets/{hyperdhtRelay-B4_wdCtx.js.map → hyperdhtRelay-DDwU5b4P.js.map} +1 -1
  36. package/dist/assets/{identityProofs-Cksc_K7_.js → identityProofs-B8zCp5_0.js} +140 -27
  37. package/dist/assets/identityProofs-B8zCp5_0.js.map +1 -0
  38. package/dist/assets/{irohWeb-Dp1i8v6n.js → irohWeb-mnOi2Jp7.js} +10832 -4832
  39. package/dist/assets/irohWeb-mnOi2Jp7.js.map +1 -0
  40. package/dist/assets/{linkPreview-DdMf-YAc.js → linkPreview-5kHmKUTN.js} +20 -8
  41. package/dist/assets/linkPreview-5kHmKUTN.js.map +1 -0
  42. package/dist/assets/{main-C8J53SwH.js → main-Chc871HV.js} +72 -39
  43. package/dist/assets/main-Chc871HV.js.map +1 -0
  44. package/dist/assets/{mainline-DY95WbuK.js → mainline-CDUXtV-I.js} +2 -2
  45. package/dist/assets/{mainline-DY95WbuK.js.map → mainline-CDUXtV-I.js.map} +1 -1
  46. package/dist/assets/{networkReason-Be-hMghr.js → networkReason-DYlPZS5M.js} +2 -2
  47. package/dist/assets/{networkReason-Be-hMghr.js.map → networkReason-DYlPZS5M.js.map} +1 -1
  48. package/dist/assets/{ownDid-oa-T2vmZ.js → ownDid-BOuSlDv-.js} +4 -4
  49. package/dist/assets/{ownDid-oa-T2vmZ.js.map → ownDid-BOuSlDv-.js.map} +1 -1
  50. package/dist/assets/{ownStatus-Bc08eNJY.js → ownStatus-CLA1VPkL.js} +3 -3
  51. package/dist/assets/{ownStatus-Bc08eNJY.js.map → ownStatus-CLA1VPkL.js.map} +1 -1
  52. package/dist/assets/{pairedTransports-Dppn8lUN.js → pairedTransports-DAzupLYo.js} +21 -15
  53. package/dist/assets/pairedTransports-DAzupLYo.js.map +1 -0
  54. package/dist/assets/{paymentIntent-DySU3Ajm.js → paymentIntent-Cr3uZa_0.js} +2 -2
  55. package/dist/assets/{paymentIntent-DySU3Ajm.js.map → paymentIntent-Cr3uZa_0.js.map} +1 -1
  56. package/dist/assets/{profiles-B2uy04ph.js → profiles-BH1bH9aE.js} +2 -2
  57. package/dist/assets/{profiles-B2uy04ph.js.map → profiles-BH1bH9aE.js.map} +1 -1
  58. package/dist/assets/{registry-bLIfG619.js → registry-DAq16T-V.js} +1 -1
  59. package/dist/assets/{registry-DbTLLs3y.js → registry-DP_-RA-v.js} +5 -5
  60. package/dist/assets/{registry-DbTLLs3y.js.map → registry-DP_-RA-v.js.map} +1 -1
  61. package/dist/assets/{relay-CHWg5hpZ.js → relay-gJTOYQJZ.js} +93 -7
  62. package/dist/assets/relay-gJTOYQJZ.js.map +1 -0
  63. package/dist/assets/{resolve-DNX-eecG.js → resolve-B1eQ4dVQ.js} +3 -3
  64. package/dist/assets/{resolve-DNX-eecG.js.map → resolve-B1eQ4dVQ.js.map} +1 -1
  65. package/dist/assets/{server-DWJ4RzJn.js → server-Bd2ofxc1.js} +717 -6389
  66. package/dist/assets/server-Bd2ofxc1.js.map +1 -0
  67. package/dist/assets/{sshForges-BnvwmNj-.js → sshForges-As7dbGXM.js} +2 -2
  68. package/dist/assets/{sshForges-BnvwmNj-.js.map → sshForges-As7dbGXM.js.map} +1 -1
  69. package/dist/assets/{translate-CHj_PdLg.js → translate-DnuQMfj0.js} +10 -4
  70. package/dist/assets/translate-DnuQMfj0.js.map +1 -0
  71. package/dist/assets/{usdt-CBJ4Q5Ji.js → usdt-DLmtf8F9.js} +4 -4
  72. package/dist/assets/{usdt-CBJ4Q5Ji.js.map → usdt-DLmtf8F9.js.map} +1 -1
  73. package/dist/assets/{waitNotice-Cvz5CiKR.js → waitNotice-BHuMofaH.js} +2 -2
  74. package/dist/assets/{waitNotice-Cvz5CiKR.js.map → waitNotice-BHuMofaH.js.map} +1 -1
  75. package/dist/ghostly.mjs +1 -1
  76. package/npm-shrinkwrap.json +2 -2
  77. package/package.json +1 -1
  78. package/dist/assets/api-DF36rBJK.js +0 -3
  79. package/dist/assets/api-Dnq86JAA.js.map +0 -1
  80. package/dist/assets/apps-DBVhKpfe.js.map +0 -1
  81. package/dist/assets/backup-Bczllmzf.js.map +0 -1
  82. package/dist/assets/buttons-DaY5FYlV.js +0 -1
  83. package/dist/assets/engineErrors--9hfgKlK.js.map +0 -1
  84. package/dist/assets/groupMeta--fxSh792.js.map +0 -1
  85. package/dist/assets/host-CGzVFfMz.js.map +0 -1
  86. package/dist/assets/identityProofs-Cksc_K7_.js.map +0 -1
  87. package/dist/assets/irohWeb-Dp1i8v6n.js.map +0 -1
  88. package/dist/assets/linkPreview-DdMf-YAc.js.map +0 -1
  89. package/dist/assets/main-C8J53SwH.js.map +0 -1
  90. package/dist/assets/pairedTransports-Dppn8lUN.js.map +0 -1
  91. package/dist/assets/relay-CHWg5hpZ.js.map +0 -1
  92. package/dist/assets/server-DWJ4RzJn.js.map +0 -1
  93. package/dist/assets/translate-CHj_PdLg.js.map +0 -1
package/README.md CHANGED
@@ -152,7 +152,7 @@ The rows are in alphabetical order of their first command, and every command of
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
- | `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}}` |
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}}`; with nobody else online it is refused until a member is, or until `group admin <group> <member key>` made one the admin. A group you are not in yet (an invitation, or a knock at its link) is left with `group decline` |
156
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 |
@@ -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`. 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`. On a message no longer here (the contact deleted it for everyone, or a delete without `--purge` came first) or another member's group message, the delete still answers not found (exit 3), but the store folds all the same and the error says so (`details.purged: true`): a deleted copy of it leaves the folder too. 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` (during a `profile backup`, once the backup has read the store; what it read, from before the delete, keeps the text: its copy of the store in `db/` until the backup ends, and the backup itself). On a message no longer here (the contact deleted it for everyone, or a delete without `--purge` came first) or another member's group message, the delete still answers not found (exit 3), but the store folds all the same and the error says so (`details.purged: true`): a deleted copy of it leaves the folder too. 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 |
@@ -291,7 +291,9 @@ add` prints the statement and the command, `identity complete` takes its output.
291
291
  then `identity complete` asks the engine to look it up. The last of the steps `identity add` answers is that `identity
292
292
  complete` command, with its draft (the app's "press Check" and "paste it into Ghostly" point to it). In-app signers (a Nostr signer over NIP-46, Pubky) run in one
293
293
  `identity add`, with their fields in `--field` (a NIP-46 `bunker://` link on stdin: `printf 'bunker=%s\n' "$LINK" | ghostly
294
- identity add nostr --signer nip46 --stdin`), and print what they wait on (a link, a code) to stderr. OpenID Connect,
294
+ identity add nostr --signer nip46 --stdin`), and print what they wait on (a link, a code) to stderr: on a terminal as
295
+ `ghostly: …` lines, the link or code on its own line; on a pipe as the JSON of its `identity.approval` and
296
+ `identity.progress` events. Each command prints only its own: the events carry the `request` id it gave. OpenID Connect,
295
297
  AT Protocol and a NIP-07 browser extension need a browser window: make those proofs in the app. `identity providers`
296
298
  marks each signer that runs here as `headless`.
297
299
 
@@ -351,7 +353,7 @@ unless `--show-secret`.
351
353
  `file.stage`, `file.done`, `file.failed` (each with `chat`, or `group` for a group's file, `file`, `messageId`), `chat.held` and
352
354
  `chat.released` (`chat disconnect --hold`), `identity.received` and `identity.status` (what a contact
353
355
  showed, as checked here: `identity` with `status`, and `error`, why it is not verified, or null; each change of
354
- status is a new `identity.status`, even back to one it had before), `identity.approval` and `identity.progress` (a signer waits on a link or a code), `group.deleted` (`{group, messageId}`: a group's message deleted, not the group), `group.removed`, `payment.created` and
356
+ status is a new `identity.status`, even back to one it had before), `identity.approval` and `identity.progress` (a signer waits on a link or a code; `request`: the id the `identity.add` call gave, when it gave one), `group.deleted` (`{group, messageId}`: a group's message deleted, not the group), `group.removed`, `payment.created` and
355
357
  `payment.updated` (`payment`: id, chat, kind request|payment, direction in|out, amount, memo, state pending|
356
358
  settled|failed, network, method, and `group` for a group's payment, whichever member's link it went over), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
357
359
  calls: see [Calls](#calls)), `app.opened` (`chat`, `app`, `version`), `app.closed` (`chat`, `app`, and `offline`
@@ -0,0 +1,3 @@
1
+ import { R as startNamedChats, l as findGroup, s as findChat } from "./apiKit-CPTFJHA7.js";
2
+ import { a as hideStateSecrets, c as refuseBeforeStart, i as groupSendRefused, l as settingsInEffect, m as identityProvider, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-O57SNJcb.js";
3
+ export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, identityProvider, mentionsFor, redactSettings, refuseBeforeStart, settingsInEffect, startNamedChats };