@ghostlytools/cli 1.12.1 → 1.13.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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{api-jRUXnBdX.js → api-CVtg7MpI.js} +2 -2
  3. package/dist/assets/{api-BwEgbvvK.js → api-CjOaoG-v.js} +16 -16
  4. package/dist/assets/api-CjOaoG-v.js.map +1 -0
  5. package/dist/assets/{apiKit-BlsNk-Cx.js → apiKit-BAGvlQtm.js} +2 -2
  6. package/dist/assets/{apiKit-BlsNk-Cx.js.map → apiKit-BAGvlQtm.js.map} +1 -1
  7. package/dist/assets/{appFetch-CW9fJPHh.js → appFetch-BwJd-kNq.js} +2 -2
  8. package/dist/assets/{appFetch-CW9fJPHh.js.map → appFetch-BwJd-kNq.js.map} +1 -1
  9. package/dist/assets/{apps-CL8TXHhu.js → apps-Cuk45sz5.js} +5 -5
  10. package/dist/assets/{apps-CL8TXHhu.js.map → apps-Cuk45sz5.js.map} +1 -1
  11. package/dist/assets/{apps-BcG4u6SM.js → apps-DjY095Af.js} +1 -1
  12. package/dist/assets/{backup-xZfV-ytw.js → backup-B56sQqoQ.js} +1 -1
  13. package/dist/assets/{backup-BA41EDvh.js → backup-DekVCDWv.js} +3 -3
  14. package/dist/assets/{backup-BA41EDvh.js.map → backup-DekVCDWv.js.map} +1 -1
  15. package/dist/assets/bark_ffi_wasm_bg-CcafsJla.js.map +1 -1
  16. package/dist/assets/{bitcoind-Dh7n9amb.js → bitcoind-B2bbVSzh.js} +2 -2
  17. package/dist/assets/{bitcoind-Dh7n9amb.js.map → bitcoind-B2bbVSzh.js.map} +1 -1
  18. package/dist/assets/bitcoindevkit_bg-BWQHx7vd.js.map +1 -1
  19. package/dist/assets/{buttons-SH1tNRh7.js → buttons-BGxzOtrq.js} +26 -5
  20. package/dist/assets/buttons-BGxzOtrq.js.map +1 -0
  21. package/dist/assets/buttons-CsN2WJOf.js +1 -0
  22. package/dist/assets/{client-DGS-atRu.js → client-DcQAfc3h.js} +2 -2
  23. package/dist/assets/{client-DGS-atRu.js.map → client-DcQAfc3h.js.map} +1 -1
  24. package/dist/assets/{fixedHosts-CPSsGOI2.js → fixedHosts-C3hBliM9.js} +2 -2
  25. package/dist/assets/{fixedHosts-CPSsGOI2.js.map → fixedHosts-C3hBliM9.js.map} +1 -1
  26. package/dist/assets/{groupMeta-DxuJzko_.js → groupMeta-goASqzOt.js} +94 -17
  27. package/dist/assets/{groupMeta-DxuJzko_.js.map → groupMeta-goASqzOt.js.map} +1 -1
  28. package/dist/assets/{host-BxM-HMr0.js → host-C2WRKj3g.js} +52 -32
  29. package/dist/assets/host-C2WRKj3g.js.map +1 -0
  30. package/dist/assets/{irohWeb-CbnGtUo6.js → irohWeb-NfthOL98.js} +6 -6
  31. package/dist/assets/{irohWeb-CbnGtUo6.js.map → irohWeb-NfthOL98.js.map} +1 -1
  32. package/dist/assets/{main-CwTaepxR.js → main-Dh7fePd8.js} +19 -19
  33. package/dist/assets/main-Dh7fePd8.js.map +1 -0
  34. package/dist/assets/{mainline-CVrd0C1n.js → mainline-DY95WbuK.js} +2 -2
  35. package/dist/assets/{mainline-CVrd0C1n.js.map → mainline-DY95WbuK.js.map} +1 -1
  36. package/dist/assets/{ownDid-DY3rYqDI.js → ownDid-BErplN7N.js} +2 -2
  37. package/dist/assets/{ownDid-DY3rYqDI.js.map → ownDid-BErplN7N.js.map} +1 -1
  38. package/dist/assets/{ownStatus-DtzIllg2.js → ownStatus-ClrFjd7h.js} +4 -3
  39. package/dist/assets/ownStatus-ClrFjd7h.js.map +1 -0
  40. package/dist/assets/{profiles-BOYGlmu2.js → profiles-B8xO8-oj.js} +2 -2
  41. package/dist/assets/{profiles-BOYGlmu2.js.map → profiles-B8xO8-oj.js.map} +1 -1
  42. package/dist/assets/{registry-4W1LGlCF.js → registry--Rg2YvOH.js} +1 -1
  43. package/dist/assets/{registry-Bep4umOM.js → registry-CU8PevhI.js} +3 -3
  44. package/dist/assets/{registry-Bep4umOM.js.map → registry-CU8PevhI.js.map} +1 -1
  45. package/dist/assets/{relay-Cjfmdec0.js → relay-CHWg5hpZ.js} +73 -11
  46. package/dist/assets/relay-CHWg5hpZ.js.map +1 -0
  47. package/dist/assets/{resolve-CIc3KZMV.js → resolve-B1upovPM.js} +2 -2
  48. package/dist/assets/{resolve-CIc3KZMV.js.map → resolve-B1upovPM.js.map} +1 -1
  49. package/dist/assets/{server-D4gf-LnD.js → server-Dgxx_DaN.js} +221 -22
  50. package/dist/assets/server-Dgxx_DaN.js.map +1 -0
  51. package/dist/assets/{waitNotice-DQvZgz2T.js → waitNotice-ylU3XwjO.js} +2 -2
  52. package/dist/assets/{waitNotice-DQvZgz2T.js.map → waitNotice-ylU3XwjO.js.map} +1 -1
  53. package/dist/ghostly.mjs +1 -1
  54. package/npm-shrinkwrap.json +2 -2
  55. package/package.json +1 -1
  56. package/dist/assets/api-BwEgbvvK.js.map +0 -1
  57. package/dist/assets/buttons-CsGdQNnR.js +0 -1
  58. package/dist/assets/buttons-SH1tNRh7.js.map +0 -1
  59. package/dist/assets/host-BxM-HMr0.js.map +0 -1
  60. package/dist/assets/main-CwTaepxR.js.map +0 -1
  61. package/dist/assets/ownStatus-DtzIllg2.js.map +0 -1
  62. package/dist/assets/relay-Cjfmdec0.js.map +0 -1
  63. package/dist/assets/server-D4gf-LnD.js.map +0 -1
package/README.md CHANGED
@@ -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`. 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`. 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 |
@@ -1,3 +1,3 @@
1
- import { F as startNamedChats, l as findGroup, s as findChat } from "./apiKit-BlsNk-Cx.js";
2
- import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-BwEgbvvK.js";
1
+ import { F as startNamedChats, l as findGroup, s as findChat } from "./apiKit-BAGvlQtm.js";
2
+ import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-CjOaoG-v.js";
3
3
  export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings, settingsInEffect, startNamedChats };
@@ -1,24 +1,24 @@
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
- import { c as normalizeRelayUrl, l as relayUrlProblem } from "./relay-Cjfmdec0.js";
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-goASqzOt.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-NfthOL98.js";
3
+ import { c as normalizeRelayUrl, l as relayUrlProblem } from "./relay-CHWg5hpZ.js";
4
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";
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-ClrFjd7h.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-BlsNk-Cx.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-BAGvlQtm.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 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";
12
+ import { a as checkTextSize$1, c as goesOn, d as purgeMessage, f as waitForConfirmed, g as waitForRemoval, h as waitForMessage, i as pressable, l as nobodyElseIn, m as waitForGroupFrame, n as buttonsCard, o as ended, p as waitForEdit, s as foldsAnyway, t as BUTTON_METHODS, u as outOf } from "./buttons-BGxzOtrq.js";
13
+ import { a as checkShownName } from "./profiles-B8xO8-oj.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 { 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";
16
+ import { a as SignerTimeout, i as parseProofBunker, t as IDENTITY_PROVIDERS } from "./registry-CU8PevhI.js";
17
+ import { t as BACKUP_METHODS } from "./backup-DekVCDWv.js";
18
+ import { s as isAppFetchUrl } from "./appFetch-BwJd-kNq.js";
19
+ import { o as checkedBundle } from "./apps-Cuk45sz5.js";
20
20
  import { m as parsePaymentAmount } from "./paymentIntent-DySU3Ajm.js";
21
- import { t as chatState } from "./waitNotice-DQvZgz2T.js";
21
+ import { t as chatState } from "./waitNotice-ylU3XwjO.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";
@@ -2605,7 +2605,7 @@ var GROUP_ADMIN_METHODS = {
2605
2605
  if (bool(params, "clear") && raw !== void 0) throw new CliError("bad_request", "clear removes the call node: not with sfu");
2606
2606
  if (bool(params, "clear") && e2ee !== void 0) throw new CliError("bad_request", "clear removes the call node: not with e2ee");
2607
2607
  if (bool(params, "clear")) sfu = null;
2608
- else if (raw !== void 0 || e2ee === void 0) sfu = callNode(str(params, "sfu", true), ref, group.id);
2608
+ else if (params.sfu !== void 0 && params.sfu !== null || e2ee === void 0) sfu = callNode(str(params, "sfu", true), ref, group.id);
2609
2609
  else if (group.call) sfu = group.call.sfu;
2610
2610
  else throw new CliError("refused", `${group.name} has no call node: ghostly group call ${shellWord(ref, group.id)} --sfu <https origin>${e2ee ? " --e2ee" : ""}`);
2611
2611
  await node(ctx).setGroupCall({
@@ -5337,7 +5337,7 @@ var METHODS = {
5337
5337
  messageId
5338
5338
  };
5339
5339
  },
5340
- async "chat.delete"(ctx, params) {
5340
+ "chat.delete": foldsAnyway(async (ctx, params) => {
5341
5341
  const purge = bool(params, "purge"), purged = purge ? { purged: true } : {};
5342
5342
  if (bool(params, "everyone")) {
5343
5343
  const target = chatOrGroup(ctx, str(params, "chat", true));
@@ -5444,7 +5444,7 @@ var METHODS = {
5444
5444
  everyone,
5445
5445
  ...purged
5446
5446
  };
5447
- },
5447
+ }),
5448
5448
  /** A chat's or a group's (`group:<id>`, or its name) message, as the app's details show it; a group's said `No chat`. */
5449
5449
  async "chat.details"(ctx, params) {
5450
5450
  const target = chatOrGroup(ctx, str(params, "chat", true));
@@ -6216,4 +6216,4 @@ async function callApi(ctx, method, params = {}, call) {
6216
6216
  }
6217
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 };
6218
6218
 
6219
- //# sourceMappingURL=api-BwEgbvvK.js.map
6219
+ //# sourceMappingURL=api-CjOaoG-v.js.map