@ghostlytools/cli 1.13.3 → 1.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/assets/{api-DO0YMLiB.js → api-B5qxNMgg.js} +2 -2
  2. package/dist/assets/{api-Dz2cw7WD.js → api-iiij_pP5.js} +71 -28
  3. package/dist/assets/api-iiij_pP5.js.map +1 -0
  4. package/dist/assets/{apiKit-DAFsWtyk.js → apiKit-BPuHOoXF.js} +2 -2
  5. package/dist/assets/{apiKit-DAFsWtyk.js.map → apiKit-BPuHOoXF.js.map} +1 -1
  6. package/dist/assets/{appFetch-BQO5Pk7W.js → appFetch-D89FnCxr.js} +2 -2
  7. package/dist/assets/{appFetch-BQO5Pk7W.js.map → appFetch-D89FnCxr.js.map} +1 -1
  8. package/dist/assets/{apps-D4KRpZB4.js → apps-BpZcd86Y.js} +1 -1
  9. package/dist/assets/{apps-B88rYWRm.js → apps-D2YGSPJe.js} +5 -5
  10. package/dist/assets/{apps-B88rYWRm.js.map → apps-D2YGSPJe.js.map} +1 -1
  11. package/dist/assets/{backup-CNLY905d.js → backup-BrMe9VPY.js} +4 -4
  12. package/dist/assets/{backup-CNLY905d.js.map → backup-BrMe9VPY.js.map} +1 -1
  13. package/dist/assets/{backup-BeXBtbVL.js → backup-COkkM8Yy.js} +1 -1
  14. package/dist/assets/{bitcoind-BXZdQ1wZ.js → bitcoind-CK1QEUHn.js} +2 -2
  15. package/dist/assets/{bitcoind-BXZdQ1wZ.js.map → bitcoind-CK1QEUHn.js.map} +1 -1
  16. package/dist/assets/{blobFiles-DDs34n0r.js → blobFiles-DA3UEn37.js} +3 -3
  17. package/dist/assets/{blobFiles-DDs34n0r.js.map → blobFiles-DA3UEn37.js.map} +1 -1
  18. package/dist/assets/buttons-BWEdoxgK.js +1 -0
  19. package/dist/assets/{buttons-BKojbx0Q.js → buttons-UsDPQJsQ.js} +4 -4
  20. package/dist/assets/{buttons-BKojbx0Q.js.map → buttons-UsDPQJsQ.js.map} +1 -1
  21. package/dist/assets/{client-BtPhfWjK.js → client-Cj-VLeTs.js} +2 -2
  22. package/dist/assets/{client-BtPhfWjK.js.map → client-Cj-VLeTs.js.map} +1 -1
  23. package/dist/assets/{fileBytes-CfvUXdSy.js → fileBytes-B2jXQI8e.js} +3 -3
  24. package/dist/assets/{fileBytes-CfvUXdSy.js.map → fileBytes-B2jXQI8e.js.map} +1 -1
  25. package/dist/assets/{fileBytes-tj6-VZcB.js → fileBytes-BQrW3m-d.js} +2 -2
  26. package/dist/assets/{fileBytes-tj6-VZcB.js.map → fileBytes-BQrW3m-d.js.map} +1 -1
  27. package/dist/assets/{fileBytes-CCKbwqG_.js → fileBytes-CtjxJ6AL.js} +1 -1
  28. package/dist/assets/{fileBytesIdb-BJirUAjI.js → fileBytesIdb-B7Wjw0S8.js} +3 -3
  29. package/dist/assets/{fileBytesIdb-BJirUAjI.js.map → fileBytesIdb-B7Wjw0S8.js.map} +1 -1
  30. package/dist/assets/fileBytesIdb-Fcj2mwj6.js +1 -0
  31. package/dist/assets/{fileBytesOpfs-DRUYLER4.js → fileBytesOpfs-BW0u-_f_.js} +3 -3
  32. package/dist/assets/{fileBytesOpfs-DRUYLER4.js.map → fileBytesOpfs-BW0u-_f_.js.map} +1 -1
  33. package/dist/assets/{fixedHosts-BJFL8Ell.js → fixedHosts-CrO01M_y.js} +3 -3
  34. package/dist/assets/{fixedHosts-BJFL8Ell.js.map → fixedHosts-CrO01M_y.js.map} +1 -1
  35. package/dist/assets/{groupMeta-Cz95F6sX.js → groupMeta-DHJxOu0K.js} +3 -3
  36. package/dist/assets/groupMeta-DHJxOu0K.js.map +1 -0
  37. package/dist/assets/{host-BsBWxTtW.js → host-C4J4y-Zq.js} +24 -16
  38. package/dist/assets/host-C4J4y-Zq.js.map +1 -0
  39. package/dist/assets/{idb-ewvbqyDI.js → idb-CmIR_bxg.js} +2 -1
  40. package/dist/assets/idb-CmIR_bxg.js.map +1 -0
  41. package/dist/assets/{identityProofs-zI_Iy9uI.js → identityProofs-C0rIGT6y.js} +6 -3
  42. package/dist/assets/identityProofs-C0rIGT6y.js.map +1 -0
  43. package/dist/assets/{irohWeb-BLDcHwYz.js → irohWeb-BXgunUhu.js} +69 -26
  44. package/dist/assets/irohWeb-BXgunUhu.js.map +1 -0
  45. package/dist/assets/{main-D48Ben7C.js → main-BLs-zUTt.js} +18 -18
  46. package/dist/assets/{main-D48Ben7C.js.map → main-BLs-zUTt.js.map} +1 -1
  47. package/dist/assets/{mainline-CDUXtV-I.js → mainline-CYek1H10.js} +2 -2
  48. package/dist/assets/{mainline-CDUXtV-I.js.map → mainline-CYek1H10.js.map} +1 -1
  49. package/dist/assets/{networkReason-DYlPZS5M.js → networkReason-C6LYbjF2.js} +2 -2
  50. package/dist/assets/{networkReason-DYlPZS5M.js.map → networkReason-C6LYbjF2.js.map} +1 -1
  51. package/dist/assets/{ownDid-CwxFBzOH.js → ownDid-Dg-8e_hs.js} +4 -4
  52. package/dist/assets/{ownDid-CwxFBzOH.js.map → ownDid-Dg-8e_hs.js.map} +1 -1
  53. package/dist/assets/{ownStatus-DjD0sQKF.js → ownStatus-BOx4vLi6.js} +3 -3
  54. package/dist/assets/{ownStatus-DjD0sQKF.js.map → ownStatus-BOx4vLi6.js.map} +1 -1
  55. package/dist/assets/{profiles-BAJf0c9E.js → profiles-BA0ePikY.js} +2 -2
  56. package/dist/assets/{profiles-BAJf0c9E.js.map → profiles-BA0ePikY.js.map} +1 -1
  57. package/dist/assets/{registry-CHwHTWbK.js → registry-DuSwXntJ.js} +1 -1
  58. package/dist/assets/{registry-CPuexTle.js → registry-OoIgxDrO.js} +5 -5
  59. package/dist/assets/{registry-CPuexTle.js.map → registry-OoIgxDrO.js.map} +1 -1
  60. package/dist/assets/{relay-gJTOYQJZ.js → relay-NT5bf1WA.js} +9 -6
  61. package/dist/assets/relay-NT5bf1WA.js.map +1 -0
  62. package/dist/assets/{resolve-BqmGXKn4.js → resolve-DUmE70Eo.js} +3 -3
  63. package/dist/assets/{resolve-BqmGXKn4.js.map → resolve-DUmE70Eo.js.map} +1 -1
  64. package/dist/assets/{restoredRows-D_WSHE7H.js → restoredRows-Cgaxx1xW.js} +2 -2
  65. package/dist/assets/{restoredRows-D_WSHE7H.js.map → restoredRows-Cgaxx1xW.js.map} +1 -1
  66. package/dist/assets/{server-e4oKeNez.js → server-WWlXICVB.js} +166 -32
  67. package/dist/assets/server-WWlXICVB.js.map +1 -0
  68. package/dist/assets/{sshForges-Cqt3qfWe.js → sshForges-Cfu-dSwc.js} +2 -2
  69. package/dist/assets/{sshForges-Cqt3qfWe.js.map → sshForges-Cfu-dSwc.js.map} +1 -1
  70. package/dist/assets/{usdt-DLmtf8F9.js → usdt-BkO4SY07.js} +2 -2
  71. package/dist/assets/{usdt-DLmtf8F9.js.map → usdt-BkO4SY07.js.map} +1 -1
  72. package/dist/assets/{waitNotice-mB0Ym145.js → waitNotice-DSECf6II.js} +2 -2
  73. package/dist/assets/{waitNotice-mB0Ym145.js.map → waitNotice-DSECf6II.js.map} +1 -1
  74. package/dist/ghostly.mjs +1 -1
  75. package/npm-shrinkwrap.json +2 -2
  76. package/package.json +1 -1
  77. package/dist/assets/api-Dz2cw7WD.js.map +0 -1
  78. package/dist/assets/buttons-_5Fw8uHn.js +0 -1
  79. package/dist/assets/fileBytesIdb-B0zzJ6p7.js +0 -1
  80. package/dist/assets/groupMeta-Cz95F6sX.js.map +0 -1
  81. package/dist/assets/host-BsBWxTtW.js.map +0 -1
  82. package/dist/assets/idb-ewvbqyDI.js.map +0 -1
  83. package/dist/assets/identityProofs-zI_Iy9uI.js.map +0 -1
  84. package/dist/assets/irohWeb-BLDcHwYz.js.map +0 -1
  85. package/dist/assets/relay-gJTOYQJZ.js.map +0 -1
  86. package/dist/assets/server-e4oKeNez.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import { l as findGroup, s as findChat, z as startNamedChats } from "./apiKit-DAFsWtyk.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-Dz2cw7WD.js";
1
+ import { l as findGroup, s as findChat, z as startNamedChats } from "./apiKit-BPuHOoXF.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-iiij_pP5.js";
3
3
  export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, identityProvider, mentionsFor, redactSettings, refuseBeforeStart, settingsInEffect, startNamedChats };
@@ -1,24 +1,24 @@
1
- import { $a as readImageMeta, Ai as GhostlyHttpError, An as baseMime, Dn as PLAYABLE_AUDIO, Dt as TYPING_KINDS, Ea as isAppUrl, En as sanitizeMime, Er as checkStatusCard, Fi as LIMITS, Fn as voiceLevel, Mr as MESSAGE_CLOCK_SKEW_MS, Ni as parseLocalTarget, Nn as parseVoiceMeta, O as GROUP_FILE_LIMITS, On as VOICE_LIMITS, Ot as TYPING_REFRESH_MS, Pa as appRef, Pn as voiceDownloadName, Pr as claimedTime, Si as AWAITING_PEER_MS, Tn as sanitizeFileName, Va as isAppRef, br as appCardId, cr as replySnippet, do as ownInviteRefusal, ji as VIEWER_PERMISSIONS_POLICY, jn as downsamplePeaks, jt as sanitizeTypingStatus, kn as VOICE_METER, kr as statusCardBytes, lo as inviteLink, n as groupCallSfu, nn as APP_DATA_MAX_BYTES, vr as STATUS_CARD_LIMITS, wr as cardLine, xr as appCardUrl } from "./groupMeta-Cz95F6sX.js";
2
- import { G as removeStored, J as waitingGroupFile, P as paymentNetwork, Pt as decodeCommunityLink, T as replyRef, Y as IDENTITY_DRAFT_TTL_MS, an as withoutAudioMetadata, b as groupOfFile, cn as NO_PICTURE_METADATA, d as groupPayLineId, f as groupPayNoteId, l as normalizeMintUrl, ln as stripPictureMetadata, p as groupPayTwin, sn as withoutVideoMetadata, t as DEFAULT_IROH_RELAYS, u as groupMemberOfLink, un as withoutPictureMetadata, v as groupFileId, vt as iceServerProblem, yt as iceServerSetting, zt as decodeGroupEntryLink } from "./irohWeb-BLDcHwYz.js";
3
- import { c as normalizeRelayUrl, l as relayUrlProblem } from "./relay-gJTOYQJZ.js";
1
+ import { $a as readImageMeta, Ai as GhostlyHttpError, An as baseMime, Dn as PLAYABLE_AUDIO, Dt as TYPING_KINDS, Ea as isAppUrl, En as sanitizeMime, Er as checkStatusCard, Fi as LIMITS, Fn as voiceLevel, Mr as MESSAGE_CLOCK_SKEW_MS, Ni as parseLocalTarget, Nn as parseVoiceMeta, O as GROUP_FILE_LIMITS, On as VOICE_LIMITS, Ot as TYPING_REFRESH_MS, Pa as appRef, Pn as voiceDownloadName, Pr as claimedTime, Si as AWAITING_PEER_MS, Tn as sanitizeFileName, Va as isAppRef, br as appCardId, cr as replySnippet, do as ownInviteRefusal, ji as VIEWER_PERMISSIONS_POLICY, jn as downsamplePeaks, jt as sanitizeTypingStatus, kn as VOICE_METER, kr as statusCardBytes, lo as inviteLink, n as groupCallSfu, nn as APP_DATA_MAX_BYTES, vr as STATUS_CARD_LIMITS, wr as cardLine, xr as appCardUrl } from "./groupMeta-DHJxOu0K.js";
2
+ import { G as removeStored, J as waitingGroupFile, P as paymentNetwork, Pt as decodeCommunityLink, T as replyRef, Y as IDENTITY_DRAFT_TTL_MS, an as withoutAudioMetadata, b as groupOfFile, cn as NO_PICTURE_METADATA, d as groupPayLineId, f as groupPayNoteId, l as normalizeMintUrl, ln as stripPictureMetadata, p as groupPayTwin, sn as withoutVideoMetadata, t as DEFAULT_IROH_RELAYS, u as groupMemberOfLink, un as withoutPictureMetadata, v as groupFileId, vt as iceServerProblem, yt as iceServerSetting, zt as decodeGroupEntryLink } from "./irohWeb-BXgunUhu.js";
3
+ import { c as normalizeRelayUrl, l as relayUrlProblem } from "./relay-NT5bf1WA.js";
4
4
  import { n as secretWords, r as findSecret, t as guardText } from "./secretGuard-oz_3hBfW.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-DjD0sQKF.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-BOx4vLi6.js";
6
6
  import { i as localFileError, o as shownValue, r as asCliError, t as CliError } from "./errors-JVJsO8Iu.js";
7
- import { A as oneOf, B as state, C as noMessage, D as notInYet, E as node, F as sharedGroupIds, H as transportOffered, I as shownName, L as sinceSeq, M as ownChatOf, N as sentAt, O as notInYetError, P as settingsOf, R as somebodyJoined, S as noFile, U as waitForState, V as str, W as shellWord, _ as keptForJoin, a as contactKeyOf, b as nameKey, c as findChatOrGroup, d as groupById, f as groupCalled, g as inviteTaken, h as groupPrefixed, j as oneShotWaits, k as num, l as findGroup, m as groupOf, n as chatOf, o as dhtOnly, p as groupNameOf, r as chatOrGroup, s as findChat, t as bool, v as list, w as nobodyJoined, y as messageOf } from "./apiKit-DAFsWtyk.js";
7
+ import { A as oneOf, B as state, C as noMessage, D as notInYet, E as node, F as sharedGroupIds, H as transportOffered, I as shownName, L as sinceSeq, M as ownChatOf, N as sentAt, O as notInYetError, P as settingsOf, R as somebodyJoined, S as noFile, U as waitForState, V as str, W as shellWord, _ as keptForJoin, a as contactKeyOf, b as nameKey, c as findChatOrGroup, d as groupById, f as groupCalled, g as inviteTaken, h as groupPrefixed, j as oneShotWaits, k as num, l as findGroup, m as groupOf, n as chatOf, o as dhtOnly, p as groupNameOf, r as chatOrGroup, s as findChat, t as bool, v as list, w as nobodyJoined, y as messageOf } from "./apiKit-BPuHOoXF.js";
8
8
  import { l as toBase64Url, s as randomBytes$1 } from "./bytes-C1DNGY18.js";
9
- import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-CfvUXdSy.js";
10
- import { p as fileStore } from "./idb-ewvbqyDI.js";
9
+ import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-B2jXQI8e.js";
10
+ import { p as fileStore } from "./idb-CmIR_bxg.js";
11
11
  import { t as childEnv } from "./childEnv-C-99hdbL.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-BKojbx0Q.js";
13
- import { a as checkShownName } from "./profiles-BAJf0c9E.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-UsDPQJsQ.js";
13
+ import { a as checkShownName } from "./profiles-BA0ePikY.js";
14
14
  import { o as MAX_AVATAR_LENGTH, s as sanitizeAvatar } from "./linkPreview-5kHmKUTN.js";
15
- import { m as identityStatement } from "./identityProofs-zI_Iy9uI.js";
16
- import { a as SignerTimeout, i as parseProofBunker, t as IDENTITY_PROVIDERS } from "./registry-CPuexTle.js";
17
- import { t as BACKUP_METHODS } from "./backup-CNLY905d.js";
18
- import { s as isAppFetchUrl } from "./appFetch-BQO5Pk7W.js";
19
- import { o as checkedBundle } from "./apps-B88rYWRm.js";
15
+ import { m as identityStatement } from "./identityProofs-C0rIGT6y.js";
16
+ import { a as SignerTimeout, i as parseProofBunker, t as IDENTITY_PROVIDERS } from "./registry-OoIgxDrO.js";
17
+ import { t as BACKUP_METHODS } from "./backup-BrMe9VPY.js";
18
+ import { s as isAppFetchUrl } from "./appFetch-D89FnCxr.js";
19
+ import { o as checkedBundle } from "./apps-D2YGSPJe.js";
20
20
  import { m as parsePaymentAmount } from "./paymentIntent-Cr3uZa_0.js";
21
- import { a as heldWords, n as dhtOnlyNote, t as chatState } from "./waitNotice-mB0Ym145.js";
21
+ import { a as heldWords, n as dhtOnlyNote, t as chatState } from "./waitNotice-DSECf6II.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";
@@ -1170,14 +1170,49 @@ async function waitForFile(ctx, params, stopping) {
1170
1170
  size: transfer.size
1171
1171
  };
1172
1172
  }
1173
+ /** At most this many of the files still coming are named in a refusal; the rest are counted. */
1174
+ var HOLDERS_NAMED = 3;
1175
+ /**
1176
+ * The files still coming that hold this device's room, as the engine counts them (`ChatFiles.stillToCome`): received in
1177
+ * a 1:1 chat, taken (not one still asked about), not ended, largest first; each with its name and its chat's. A group's
1178
+ * file is not counted there.
1179
+ */
1180
+ async function roomHolders(s, except) {
1181
+ const holders = [];
1182
+ for (const [id, view] of Object.entries(s.transfers ?? {})) {
1183
+ if (id === except || view.direction !== "in" || view.state !== "transferring" || view.stage === "asking") continue;
1184
+ const link = s.links.find((l) => id.startsWith(`${l.id}-in-`));
1185
+ const left = Math.max(0, view.size - view.transferred);
1186
+ if (link && left > 0) holders.push({
1187
+ id,
1188
+ linkId: link.id,
1189
+ left
1190
+ });
1191
+ }
1192
+ holders.sort((a, b) => b.left - a.left || a.id.localeCompare(b.id));
1193
+ return Promise.all(holders.map(async ({ id, linkId, left }) => {
1194
+ const link = s.links.find((l) => l.id === linkId);
1195
+ return {
1196
+ id,
1197
+ left,
1198
+ name: (await fileStore.get(id).catch(() => void 0))?.metadata?.name,
1199
+ chat: link?.label || link?.peerNick || linkId
1200
+ };
1201
+ }));
1202
+ }
1173
1203
  /**
1174
1204
  * `file accept` of a file that does not fit the room left beside the files still coming (`FileDesk.accept`), in this
1175
1205
  * CLI's MB: the engine's line gave the room in binary MB beside a size in decimal ones, and neither the files still
1176
- * coming that take the rest nor the way out.
1206
+ * coming that take the rest nor the way out. The files still coming are named with their chat and how to cancel each:
1207
+ * "wait for them, or cancel one" said neither which nor where. Only this side reads it; nothing goes to the contact.
1177
1208
  */
1178
- function noRoomWords(fileId, name, size, room, coming) {
1179
- const rest = coming > 0 ? `, and ${megabytes(coming)} of files still coming need it first` : "";
1180
- return `${name ?? "The file"} (${megabytes(size)}) does not fit: ${megabytes(room)} free${rest}. Free some space, then ghostly file accept ${fileId} again (or file decline)`;
1209
+ function noRoomWords(fileId, name, size, room, coming, holders = []) {
1210
+ const named = holders.slice(0, HOLDERS_NAMED).map((h) => `${h.name ?? "a file"} from ${h.chat} (${megabytes(h.left)} to come: ghostly file cancel ${shellWord(h.id, "<file>")})`);
1211
+ const more = holders.length > HOLDERS_NAMED ? ` and ${holders.length - HOLDERS_NAMED} more` : "";
1212
+ const which = named.length ? `: ${named.join(", ")}${more}` : "";
1213
+ const rest = coming > 0 ? `, and ${megabytes(coming)} of files still coming need it first${which}` : "";
1214
+ const out = coming > 0 && named.length ? "Free some space or cancel one of them" : "Free some space";
1215
+ return `${name ?? "The file"} (${megabytes(size)}) does not fit: ${megabytes(room)} free${rest}. ${out}, then ghostly file accept ${fileId} again (or file decline)`;
1181
1216
  }
1182
1217
  /** A received file that waits for this person's `file accept` (`file wait`, `file save`): said naming the command. */
1183
1218
  function waitsForYou(name, fileId, where, size) {
@@ -1393,10 +1428,14 @@ var FILE_METHODS = {
1393
1428
  });
1394
1429
  } catch (error) {
1395
1430
  const { room, size, coming } = error ?? {};
1396
- if (action === "accept" && error instanceof Error && typeof room === "number" && error.message.startsWith("No room on this device")) throw new CliError("refused", noRoomWords(fileId, (await fileStore.get(fileId).catch(() => void 0))?.metadata?.name, typeof size === "number" ? size : view?.size ?? 0, room, typeof coming === "number" ? coming : 0), {
1397
- reason: "no_room",
1398
- room
1399
- });
1431
+ if (action === "accept" && error instanceof Error && typeof room === "number" && error.message.startsWith("No room on this device")) {
1432
+ const comes = typeof coming === "number" ? coming : 0;
1433
+ const holders = comes > 0 ? await roomHolders(state(ctx), fileId) : [];
1434
+ throw new CliError("refused", noRoomWords(fileId, (await fileStore.get(fileId).catch(() => void 0))?.metadata?.name, typeof size === "number" ? size : view?.size ?? 0, room, comes, holders), {
1435
+ reason: "no_room",
1436
+ room
1437
+ });
1438
+ }
1400
1439
  throw error;
1401
1440
  }
1402
1441
  return {
@@ -3210,14 +3249,15 @@ var OPENED_SERVICE_CSP_RELAY_ONLY = "default-src 'self' data: blob: 'unsafe-inli
3210
3249
  /**
3211
3250
  * The contact's headers that are not passed on: each makes the browser send something to a place it names, outside
3212
3251
  * `connect-src` (violation and network-error reports, and the endpoints they go to; `Link` preloads, prefetches and
3213
- * early connections). Only the contact's server is reached.
3252
+ * early connections; `Speculation-Rules` prefetches and prerenders). Only the contact's server is reached.
3214
3253
  */
3215
3254
  var OPENED_SERVICE_DROPPED_HEADERS = [
3216
3255
  "content-security-policy-report-only",
3217
3256
  "reporting-endpoints",
3218
3257
  "report-to",
3219
3258
  "nel",
3220
- "link"
3259
+ "link",
3260
+ "speculation-rules"
3221
3261
  ];
3222
3262
  /**
3223
3263
  * A contact's headers that would set the page's browser features (camera, microphone, location, a device): the
@@ -6556,12 +6596,15 @@ var RESUMING_MS = 3e5;
6556
6596
  * Why a daemon's `chat connect` timed out, as the chat reads at the end. No attempt of this run ended yet
6557
6597
  * (`lastAttempt` null) while the daemon just started, or while the contact reads online: the chat is still coming
6558
6598
  * back, nobody failed to answer. It said "the contact did not answer" right after a `daemon restart`, with the
6559
- * contact online. A one-shot always just started: it keeps the words it had.
6599
+ * contact online. A one-shot always just started: it keeps the words it had. Not resuming once the chat was live in
6600
+ * this run (then held by the contact, say), nor with the contact's record read offline (`peerLastSeenAt` is this
6601
+ * run's): those said "still resuming" for the daemon's first 5 minutes too.
6560
6602
  */
6561
6603
  function notLiveYet(ctx, link) {
6562
6604
  const now = state(ctx).links.find((l) => l.id === link.id) ?? link;
6563
6605
  if (ctx.mode !== "daemon" || now.liveAttempt) return "the contact did not answer";
6564
- if (process.uptime() * 1e3 < RESUMING_MS) return "the chat is still resuming after the daemon's start, and no attempt to reach the contact has ended yet";
6606
+ const readOffline = !now.peerOnline && now.peerLastSeenAt > 0;
6607
+ if (process.uptime() * 1e3 < RESUMING_MS && !readOffline && !ctx.hub.wasLive(link.id)) return "the chat is still resuming after the daemon's start, and no attempt to reach the contact has ended yet";
6565
6608
  return now.peerOnline ? "your contact's app reads online, and no attempt to reach it has ended yet" : "the contact did not answer";
6566
6609
  }
6567
6610
  /** What happens after a `chat connect` the contact did not answer: the daemon dials again by itself, a one-shot does not. */
@@ -6723,4 +6766,4 @@ async function callApi(ctx, method, params = {}, call) {
6723
6766
  }
6724
6767
  export { groupJson as _, hideStateSecrets as a, resumeHolds as b, refuseBeforeStart as c, reportAppFrames as d, servedApps as f, chatMessageJson as g, chatJson as h, groupSendRefused as i, settingsInEffect as l, identityProvider as m, SETTABLE as n, mentionsFor as o, nodeLocalFetch as p, callApi as r, redactSettings as s, API_METHODS as t, paymentJson as u, groupMessageJson as v, flushCardUpdates as x, groupPayTwins as y };
6725
6768
 
6726
- //# sourceMappingURL=api-Dz2cw7WD.js.map
6769
+ //# sourceMappingURL=api-iiij_pP5.js.map