@ghostlytools/cli 1.8.0 → 1.8.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.
Files changed (78) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/{api-I_KbuXHa.js → api-BpQC8dAw.js} +68 -33
  3. package/dist/assets/api-BpQC8dAw.js.map +1 -0
  4. package/dist/assets/{api-Dj1yn0px.js → api-CttDF-S5.js} +2 -2
  5. package/dist/assets/{apiKit-C-_PWZvy.js → apiKit-CSMeHKgo.js} +2 -2
  6. package/dist/assets/{apiKit-C-_PWZvy.js.map → apiKit-CSMeHKgo.js.map} +1 -1
  7. package/dist/assets/{apps-DKIe8VjF.js → apps-DqTyZ40T.js} +2 -2
  8. package/dist/assets/{apps-DKIe8VjF.js.map → apps-DqTyZ40T.js.map} +1 -1
  9. package/dist/assets/{apps-DbEfL_3b.js → apps-DzFMdVt6.js} +1 -1
  10. package/dist/assets/{arkade-k1bdSm70.js → arkade-Cu3TbPxC.js} +2 -2
  11. package/dist/assets/{arkade-k1bdSm70.js.map → arkade-Cu3TbPxC.js.map} +1 -1
  12. package/dist/assets/{backup-Cdd6-HNu.js → backup-CLZOORFC.js} +1 -1
  13. package/dist/assets/{backup-beKfbfNk.js → backup-CyTZhu28.js} +4 -4
  14. package/dist/assets/{backup-beKfbfNk.js.map → backup-CyTZhu28.js.map} +1 -1
  15. package/dist/assets/{buttons-ClI13rdv.js → buttons-Bd9fR31r.js} +173 -20
  16. package/dist/assets/buttons-Bd9fR31r.js.map +1 -0
  17. package/dist/assets/buttons-c4CJnL6i.js +2 -0
  18. package/dist/assets/{envelope-B88yiCQj.js → envelope-CGfUsR1m.js} +2 -2
  19. package/dist/assets/{envelope-B88yiCQj.js.map → envelope-CGfUsR1m.js.map} +1 -1
  20. package/dist/assets/fixedHosts-BiukTsd9.js +24 -0
  21. package/dist/assets/fixedHosts-BiukTsd9.js.map +1 -0
  22. package/dist/assets/{ghostly_iroh_web-CO0onry8.js → ghostly_iroh_web-BzAXJUYH.js} +10 -10
  23. package/dist/assets/{ghostly_iroh_web-CO0onry8.js.map → ghostly_iroh_web-BzAXJUYH.js.map} +1 -1
  24. package/dist/assets/ghostly_iroh_web_bg.wasm +0 -0
  25. package/dist/assets/{groupFiles-DjQc5XXv.js → groupFiles-CeF9nPv9.js} +631 -12
  26. package/dist/assets/groupFiles-CeF9nPv9.js.map +1 -0
  27. package/dist/assets/{host-CNWGB3-j.js → host-CKAehWP6.js} +30 -18
  28. package/dist/assets/host-CKAehWP6.js.map +1 -0
  29. package/dist/assets/hyperdhtRelay-1wzya_0L.js +25 -0
  30. package/dist/assets/hyperdhtRelay-1wzya_0L.js.map +1 -0
  31. package/dist/assets/{hyperdhtRelay-g7eXzf5h.js → hyperdhtRelay-B8Pdykhg.js} +15 -3
  32. package/dist/assets/hyperdhtRelay-B8Pdykhg.js.map +1 -0
  33. package/dist/assets/{irohWeb-Bx8dI4be.js → irohWeb-D6tAPHZa.js} +11 -7
  34. package/dist/assets/{irohWeb-Bx8dI4be.js.map → irohWeb-D6tAPHZa.js.map} +1 -1
  35. package/dist/assets/{main-BRxhBctJ.js → main-BDY-pfpz.js} +17 -17
  36. package/dist/assets/{main-BRxhBctJ.js.map → main-BDY-pfpz.js.map} +1 -1
  37. package/dist/assets/{mainline-CwuS6ngj.js → mainline-3ueXpFQL.js} +2 -2
  38. package/dist/assets/{mainline-CwuS6ngj.js.map → mainline-3ueXpFQL.js.map} +1 -1
  39. package/dist/assets/{networkReason-CIAMieQm.js → networkReason-DhJYOomu.js} +2 -2
  40. package/dist/assets/{networkReason-CIAMieQm.js.map → networkReason-DhJYOomu.js.map} +1 -1
  41. package/dist/assets/{nwc-C9JLJJkL.js → nwc-B1Quqda-.js} +3 -3
  42. package/dist/assets/{nwc-C9JLJJkL.js.map → nwc-B1Quqda-.js.map} +1 -1
  43. package/dist/assets/{nwcProvider-pFMrsUJh.js → nwcProvider-DUB6xO-b.js} +2 -2
  44. package/dist/assets/{nwcProvider-pFMrsUJh.js.map → nwcProvider-DUB6xO-b.js.map} +1 -1
  45. package/dist/assets/ownDid-BfqHJdA6.js +281 -0
  46. package/dist/assets/ownDid-BfqHJdA6.js.map +1 -0
  47. package/dist/assets/{registry-DY2ixQfU.js → registry-CZTmtSws.js} +1 -1
  48. package/dist/assets/{registry-Cks7FA_o.js → registry-DwlTNQjr.js} +5 -246
  49. package/dist/assets/registry-DwlTNQjr.js.map +1 -0
  50. package/dist/assets/{resolve-C4Y2HPqQ.js → resolve-BVwhiYjj.js} +3 -280
  51. package/dist/assets/resolve-BVwhiYjj.js.map +1 -0
  52. package/dist/assets/{server-D9RAmGdm.js → server-Br3XPwFG.js} +365 -107
  53. package/dist/assets/server-Br3XPwFG.js.map +1 -0
  54. package/dist/assets/{src-1RU4TilT.js → src-C4sOH4zH.js} +233 -106
  55. package/dist/assets/src-C4sOH4zH.js.map +1 -0
  56. package/dist/assets/sshForges-CQQomStK.js +253 -0
  57. package/dist/assets/sshForges-CQQomStK.js.map +1 -0
  58. package/dist/assets/{translate-od5GbpvR.js → translate-C2aNyUkR.js} +11 -5
  59. package/dist/assets/translate-C2aNyUkR.js.map +1 -0
  60. package/dist/assets/{usdt-DldXV0MR.js → usdt-CMwatDnQ.js} +3 -3
  61. package/dist/assets/{usdt-DldXV0MR.js.map → usdt-CMwatDnQ.js.map} +1 -1
  62. package/dist/assets/{words-BS2qq_vV.js → words-CqN2KG1r.js} +2 -2
  63. package/dist/assets/{words-BS2qq_vV.js.map → words-CqN2KG1r.js.map} +1 -1
  64. package/dist/ghostly.mjs +1 -1
  65. package/package.json +1 -1
  66. package/dist/assets/api-I_KbuXHa.js.map +0 -1
  67. package/dist/assets/buttons-BO1_7V4L.js +0 -2
  68. package/dist/assets/buttons-ClI13rdv.js.map +0 -1
  69. package/dist/assets/groupFiles-DjQc5XXv.js.map +0 -1
  70. package/dist/assets/host-CNWGB3-j.js.map +0 -1
  71. package/dist/assets/hyperdhtRelay-BT_wRxab.js +0 -21
  72. package/dist/assets/hyperdhtRelay-BT_wRxab.js.map +0 -1
  73. package/dist/assets/hyperdhtRelay-g7eXzf5h.js.map +0 -1
  74. package/dist/assets/registry-Cks7FA_o.js.map +0 -1
  75. package/dist/assets/resolve-C4Y2HPqQ.js.map +0 -1
  76. package/dist/assets/server-D9RAmGdm.js.map +0 -1
  77. package/dist/assets/src-1RU4TilT.js.map +0 -1
  78. package/dist/assets/translate-od5GbpvR.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { $o as parseCallSignal, Du as fromBase64Url, Ei as isPublicAddress, Go as CALL_SIGNAL_MAX_AGE_MS, Jo as buildSdpFromSignal, Ko as RTC_CONFIG, Qo as extractParamsFromSdp, Xo as callSignalHeardAt, Yo as callRtcConfig, ei as checkPushEndpoint, es as signalHasVideo, qo as answersOffer, su as setLinkTraceSink } from "./src-1RU4TilT.js";
2
- import { a as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-Bx8dI4be.js";
1
+ import { $o as extractParamsFromSdp, Ei as isPublicAddress, Jo as answersOffer, Ko as CALL_SIGNAL_MAX_AGE_MS, Xo as callRtcConfig, Yo as buildSdpFromSignal, Zo as callSignalHeardAt, ei as checkPushEndpoint, es as parseCallSignal, ku as fromBase64Url, lu as setLinkTraceSink, qo as RTC_CONFIG, ts as signalHasVideo } from "./src-C4sOH4zH.js";
2
+ import { a as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-D6tAPHZa.js";
3
3
  import { r as asCliError, t as CliError } from "./errors-R4S2SAEM.js";
4
- import { l as findOwnNamedChat, o as findChat } from "./apiKit-C-_PWZvy.js";
5
- import { _ as flushCardUpdates, c as paymentJson, d as nodeLocalFetch, f as chatJson, g as resumeHolds, h as groupMessageJson, l as reportAppFrames, m as groupJson, p as chatMessageJson, r as callApi, u as servedApps } from "./api-I_KbuXHa.js";
4
+ import { l as findOwnNamedChat, o as findChat } from "./apiKit-CSMeHKgo.js";
5
+ import { _ as flushCardUpdates, c as paymentJson, d as nodeLocalFetch, f as chatJson, g as resumeHolds, h as groupMessageJson, l as reportAppFrames, m as groupJson, p as chatMessageJson, r as callApi, u as servedApps } from "./api-BpQC8dAw.js";
6
6
  import { b as privateFolder, g as startingPath, n as RESTORED_MARK, r as acquireLock, v as ownFolder, x as runtimePath } from "./profiles-MFtCmJwK.js";
7
7
  import { _ as isCallRate, f as DEFAULT_RATE, g as frameSamples, h as frameBytes, i as newDaemonSecret, m as bytesToMs, o as proof, p as PlaybackQueue, r as greeting, u as removeDaemonSecret } from "./daemonProof-DtrL5lE5.js";
8
8
  import { createRequire } from "node:module";
@@ -38,10 +38,11 @@ function announceJoins(hub, node) {
38
38
  };
39
39
  return hub.onEvent((event) => {
40
40
  const chat = event.chat;
41
- if (!chat) return;
41
+ const live = event.type === "chat.connection" && event.live;
42
+ if (!chat || !(live || event.type === "chat.joined") || hub.said(chat, "join")) return;
42
43
  const link = node.getState().links.find((l) => l.id === chat);
43
44
  if (!link?.profile) return;
44
- if (event.type === "chat.connection" && event.live && link.pairingProgress?.role === "joiner") say(chat);
45
+ if (live && link.pairingProgress?.role === "joiner") say(chat);
45
46
  else if (event.type === "chat.joined") say(chat);
46
47
  });
47
48
  }
@@ -3473,11 +3474,21 @@ var RATCHET = "ratchetState";
3473
3474
  * the snapshot); its disk writes do: 4 MB on that profile, so about 100 MB a day at this hour and 600 MB at 10 minutes.
3474
3475
  */
3475
3476
  var RATCHET_FOLD_MS = 36e5;
3476
- /** The stores whose rows a delete means gone from the disk: the chats (their seed, their ratchet) and their messages. */
3477
- var FORGOTTEN = /* @__PURE__ */ new Set(["links", "messages"]);
3477
+ /** The stores whose rows a delete means gone from the disk: the chats (their seed, their ratchet), their messages, the services. */
3478
+ var FORGOTTEN = /* @__PURE__ */ new Set([
3479
+ "links",
3480
+ "messages",
3481
+ "services"
3482
+ ]);
3478
3483
  /**
3479
- * How long what a delete of a chat or a message took may stay in the journal while the store is in use, so a profile
3480
- * folder copied later holds nothing older. The hour is the ratchet's, for the same reason.
3484
+ * The stores whose rows a write means gone from the disk as they were: the settings, where every secret the profile
3485
+ * seals is kept (an x401 credential and its key, a contact link's, a DID's or an identity proof's seed, a wallet's or a
3486
+ * card's) and the TURN password, each removed by writing its row again without it.
3487
+ */
3488
+ var REWRITTEN = /* @__PURE__ */ new Set(["settings"]);
3489
+ /**
3490
+ * How long what a delete of a chat or a message (or a settings write) took may stay in the journal while the store is
3491
+ * in use, so a profile folder copied later holds nothing older. The hour is the ratchet's, for the same reason.
3481
3492
  */
3482
3493
  var DELETE_FOLD_MS = 36e5;
3483
3494
  /**
@@ -3532,7 +3543,7 @@ async function openPersistentIndexedDb(dir, options = {}) {
3532
3543
  let relaxed = null;
3533
3544
  /** The journal holds a chat's ratchet state, and with the next one it holds a key already used. */
3534
3545
  let holdsRatchet = false;
3535
- /** The journal holds a delete of a chat or a message, and what came before it with it. */
3546
+ /** The journal holds a delete of a chat or a message (or a settings write), and what came before it with it. */
3536
3547
  let holdsDelete = false;
3537
3548
  const pending = /* @__PURE__ */ new WeakMap();
3538
3549
  const snapshotPath = join(dir, SNAPSHOT);
@@ -4514,9 +4525,9 @@ function fill(store, sorted) {
4514
4525
  store.records._numNodes = sorted.length;
4515
4526
  store.records._numTombstones = 0;
4516
4527
  }
4517
- /** Whether an op takes a chat or a message away: a delete, or a clear of their store. */
4528
+ /** Whether an op takes a chat, a message or a service away (a delete, or a clear of their store), or writes a setting over. */
4518
4529
  function deletes(op) {
4519
- return op.kind !== "put" && FORGOTTEN.has(op.store);
4530
+ return REWRITTEN.has(op.store) || op.kind !== "put" && FORGOTTEN.has(op.store);
4520
4531
  }
4521
4532
  /**
4522
4533
  * Replays whole entries; a torn last entry (the process died mid-write) was never acknowledged and is dropped.
@@ -4719,6 +4730,7 @@ function irohRelays(env = process.env) {
4719
4730
  if (!relays.length) return null;
4720
4731
  const bad = relays.map((url) => irohRelayProblem(url)).find(Boolean);
4721
4732
  if (bad) throw new CliError("usage", `GHOSTLY_IROH_RELAYS: ${bad}`);
4733
+ if (relays.length > 5) throw new CliError("usage", `GHOSTLY_IROH_RELAYS: use at most 5 Iroh relays, not ${relays.length}`);
4722
4734
  return relays;
4723
4735
  }
4724
4736
  /**
@@ -4888,16 +4900,16 @@ async function startRuntime(paths, options = {}) {
4888
4900
  if (testMints) (await import("./mints-BaOmx517.js")).declareTestMints(testMints.split(","));
4889
4901
  await installEventSource();
4890
4902
  await preloadWalletModules();
4891
- (await import("./ghostly_iroh_web-CO0onry8.js")).initSync({ module: irohWasmBytes() });
4903
+ (await import("./ghostly_iroh_web-BzAXJUYH.js")).initSync({ module: irohWasmBytes() });
4892
4904
  const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-BPDKufla.js"), import("./fileBytes-Q3ehcEr8.js")]);
4893
4905
  registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
4894
4906
  if (await (await import("./blobFiles-DOQDRdDI.js")).moveBlobFiles()) await store.compact();
4895
- const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-D9RAmGdm.js"), import("./endpoint-BdaeBw2L.js")]);
4896
- const mainline = dht.off ? null : new (await (import("./mainline-CwuS6ngj.js"))).Mainline({
4907
+ const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-Br3XPwFG.js"), import("./endpoint-BdaeBw2L.js")]);
4908
+ const mainline = dht.off ? null : new (await (import("./mainline-3ueXpFQL.js"))).Mainline({
4897
4909
  bootstrap: dht.bootstrap,
4898
4910
  host: dht.host
4899
4911
  });
4900
- const transport = mainline || pinned ? new (await (import("./mainline-CwuS6ngj.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
4912
+ const transport = mainline || pinned ? new (await (import("./mainline-3ueXpFQL.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
4901
4913
  const apps = servedApps(paths.dir).length > 0;
4902
4914
  const server = new EngineServer({
4903
4915
  ...transport ? { transport } : {},
@@ -5257,4 +5269,4 @@ function connection(ctx, socket, secret) {
5257
5269
  //#endregion
5258
5270
  export { BASELINE_NEWEST, MAX_LINE, MAX_UNREAD, keepServing, openHost, serve };
5259
5271
 
5260
- //# sourceMappingURL=host-CNWGB3-j.js.map
5272
+ //# sourceMappingURL=host-CKAehWP6.js.map