@ghostlytools/cli 1.9.0 → 1.10.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 (107) hide show
  1. package/README.md +28 -20
  2. package/SKILL.md +5 -1
  3. package/dist/assets/{api-DFCgr6RH.js → api-BF_KwecF.js} +84 -38
  4. package/dist/assets/api-BF_KwecF.js.map +1 -0
  5. package/dist/assets/{api-raWw9j_m.js → api-DdrA86Ur.js} +2 -2
  6. package/dist/assets/{apiKit-CCavJJcl.js → apiKit-Du1u2l4x.js} +8 -8
  7. package/dist/assets/apiKit-Du1u2l4x.js.map +1 -0
  8. package/dist/assets/{apps-B7o2BPj6.js → apps-Bti9fDoW.js} +1 -1
  9. package/dist/assets/{apps-DmxEG147.js → apps-DwPfp54I.js} +5 -3
  10. package/dist/assets/apps-DwPfp54I.js.map +1 -0
  11. package/dist/assets/{arkade-DtYR9H0c.js → arkade-DOWpA2Kr.js} +2 -2
  12. package/dist/assets/{arkade-DtYR9H0c.js.map → arkade-DOWpA2Kr.js.map} +1 -1
  13. package/dist/assets/{backup-BserdrNk.js → backup-CeRckyl2.js} +1 -1
  14. package/dist/assets/{backup-YIB2XIES.js → backup-DZ_Q1eSu.js} +6 -6
  15. package/dist/assets/{backup-YIB2XIES.js.map → backup-DZ_Q1eSu.js.map} +1 -1
  16. package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
  17. package/dist/assets/{blobFiles-DOQDRdDI.js → blobFiles-BnjN_Vrz.js} +3 -3
  18. package/dist/assets/{blobFiles-DOQDRdDI.js.map → blobFiles-BnjN_Vrz.js.map} +1 -1
  19. package/dist/assets/buttons-BxIThdg9.js +332 -0
  20. package/dist/assets/buttons-BxIThdg9.js.map +1 -0
  21. package/dist/assets/buttons-D9QBHS9Y.js +2 -0
  22. package/dist/assets/client-D5E1RQYB.js +473 -0
  23. package/dist/assets/client-D5E1RQYB.js.map +1 -0
  24. package/dist/assets/{endpoint-BdaeBw2L.js → endpoint-DWHkXWVM.js} +101 -16
  25. package/dist/assets/endpoint-DWHkXWVM.js.map +1 -0
  26. package/dist/assets/{envelope-Dt75vrmY.js → envelope-CugS9qwQ.js} +2 -2
  27. package/dist/assets/{envelope-Dt75vrmY.js.map → envelope-CugS9qwQ.js.map} +1 -1
  28. package/dist/assets/fedimint_client_wasm_bg-BtHHlFpp.js.map +1 -1
  29. package/dist/assets/{fileBytes-BPDKufla.js → fileBytes-DMzrIdCu.js} +1 -1
  30. package/dist/assets/{fileBytes-DNgrRL0R.js → fileBytes-DjBYYyXT.js} +3 -3
  31. package/dist/assets/{fileBytes-DNgrRL0R.js.map → fileBytes-DjBYYyXT.js.map} +1 -1
  32. package/dist/assets/{fileBytes-Q3ehcEr8.js → fileBytes-Douk1yOp.js} +2 -2
  33. package/dist/assets/{fileBytes-Q3ehcEr8.js.map → fileBytes-Douk1yOp.js.map} +1 -1
  34. package/dist/assets/fileBytesIdb-CD5Uv490.js +2 -0
  35. package/dist/assets/{fileBytesIdb-Dm1EyEbT.js → fileBytesIdb-CkClu9YI.js} +3 -3
  36. package/dist/assets/{fileBytesIdb-Dm1EyEbT.js.map → fileBytesIdb-CkClu9YI.js.map} +1 -1
  37. package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js → fileBytesOpfs-WryQuOgK.js} +3 -3
  38. package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js.map → fileBytesOpfs-WryQuOgK.js.map} +1 -1
  39. package/dist/assets/{fixedHosts-B598JzbC.js → fixedHosts-B4E4VrYE.js} +4 -4
  40. package/dist/assets/{fixedHosts-B598JzbC.js.map → fixedHosts-B4E4VrYE.js.map} +1 -1
  41. package/dist/assets/{groupFiles-FXel6zIc.js → groupFiles-NonOYBKN.js} +378 -59
  42. package/dist/assets/groupFiles-NonOYBKN.js.map +1 -0
  43. package/dist/assets/{host-DIBeK_c_.js → host-DvcVt5YI.js} +79 -23
  44. package/dist/assets/{host-DIBeK_c_.js.map → host-DvcVt5YI.js.map} +1 -1
  45. package/dist/assets/{hyperdhtRelay-D185dETu.js → hyperdhtRelay-Ce42sR8x.js} +2 -2
  46. package/dist/assets/{hyperdhtRelay-D185dETu.js.map → hyperdhtRelay-Ce42sR8x.js.map} +1 -1
  47. package/dist/assets/{idb-BkOJES5_.js → idb-BHsAqENE.js} +37 -6
  48. package/dist/assets/idb-BHsAqENE.js.map +1 -0
  49. package/dist/assets/{irohWeb-BSv_BWyG.js → irohWeb-C9ChbD-c.js} +57 -3
  50. package/dist/assets/{irohWeb-BSv_BWyG.js.map → irohWeb-C9ChbD-c.js.map} +1 -1
  51. package/dist/assets/{main-BbhfMTt8.js → main-4qE381KM.js} +194 -276
  52. package/dist/assets/main-4qE381KM.js.map +1 -0
  53. package/dist/assets/{mainline-9Vc3c3SA.js → mainline-DOwZDHVy.js} +2 -2
  54. package/dist/assets/{mainline-9Vc3c3SA.js.map → mainline-DOwZDHVy.js.map} +1 -1
  55. package/dist/assets/{networkReason-BncJ9KSM.js → networkReason-MInk1Y63.js} +3 -3
  56. package/dist/assets/{networkReason-BncJ9KSM.js.map → networkReason-MInk1Y63.js.map} +1 -1
  57. package/dist/assets/{nwc-QX3Yt1Sb.js → nwc-CHLWFV1R.js} +3 -3
  58. package/dist/assets/{nwc-QX3Yt1Sb.js.map → nwc-CHLWFV1R.js.map} +1 -1
  59. package/dist/assets/{nwcProvider-CzX3xH47.js → nwcProvider-BlkPOJen.js} +2 -2
  60. package/dist/assets/{nwcProvider-CzX3xH47.js.map → nwcProvider-BlkPOJen.js.map} +1 -1
  61. package/dist/assets/{ownDid-D8z5gwGI.js → ownDid-yXtY_1B5.js} +3 -3
  62. package/dist/assets/ownDid-yXtY_1B5.js.map +1 -0
  63. package/dist/assets/{profiles-MFtCmJwK.js → profiles-vbXHs0Mq.js} +40 -3
  64. package/dist/assets/profiles-vbXHs0Mq.js.map +1 -0
  65. package/dist/assets/{registry-PTtBMaYZ.js → registry-BN9r2pR4.js} +1 -1
  66. package/dist/assets/{registry-B2Dtnibo.js → registry-chCD0KWS.js} +5 -5
  67. package/dist/assets/registry-chCD0KWS.js.map +1 -0
  68. package/dist/assets/{resolve-ZxVzwFNA.js → resolve-Dtzogt2W.js} +2 -2
  69. package/dist/assets/{resolve-ZxVzwFNA.js.map → resolve-Dtzogt2W.js.map} +1 -1
  70. package/dist/assets/{restoredRows-BCRCjhdF.js → restoredRows-CRYwIx3g.js} +2 -2
  71. package/dist/assets/{restoredRows-BCRCjhdF.js.map → restoredRows-CRYwIx3g.js.map} +1 -1
  72. package/dist/assets/{buttons-CuRfKnPI.js → secretGuard-CSVNxXVW.js} +80 -330
  73. package/dist/assets/secretGuard-CSVNxXVW.js.map +1 -0
  74. package/dist/assets/secretGuard-Q2BKq0q0.js +2 -0
  75. package/dist/assets/{server-Dw1o8z1o.js → server-BZnsm5X5.js} +1749 -335
  76. package/dist/assets/server-BZnsm5X5.js.map +1 -0
  77. package/dist/assets/{src-BD8RBVEp.js → src-DZagapGt.js} +1043 -197
  78. package/dist/assets/src-DZagapGt.js.map +1 -0
  79. package/dist/assets/{sshForges-DWrESWkK.js → sshForges-BkTgy5rx.js} +16 -9
  80. package/dist/assets/{sshForges-DWrESWkK.js.map → sshForges-BkTgy5rx.js.map} +1 -1
  81. package/dist/assets/{translate-D1uP0q32.js → translate-B9SMd6uf.js} +8 -7
  82. package/dist/assets/translate-B9SMd6uf.js.map +1 -0
  83. package/dist/assets/{usdt-DhVN8geQ.js → usdt-BU4ezonh.js} +3 -3
  84. package/dist/assets/{usdt-DhVN8geQ.js.map → usdt-BU4ezonh.js.map} +1 -1
  85. package/dist/assets/{words-DdXPkB3n.js → words-jYy7lTcb.js} +4 -2
  86. package/dist/assets/words-jYy7lTcb.js.map +1 -0
  87. package/dist/ghostly.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/assets/api-DFCgr6RH.js.map +0 -1
  90. package/dist/assets/apiKit-CCavJJcl.js.map +0 -1
  91. package/dist/assets/apps-DmxEG147.js.map +0 -1
  92. package/dist/assets/buttons-CuRfKnPI.js.map +0 -1
  93. package/dist/assets/buttons-De3LPdSG.js +0 -2
  94. package/dist/assets/daemonProof-DtrL5lE5.js +0 -236
  95. package/dist/assets/daemonProof-DtrL5lE5.js.map +0 -1
  96. package/dist/assets/endpoint-BdaeBw2L.js.map +0 -1
  97. package/dist/assets/fileBytesIdb-DZcESfTt.js +0 -2
  98. package/dist/assets/groupFiles-FXel6zIc.js.map +0 -1
  99. package/dist/assets/idb-BkOJES5_.js.map +0 -1
  100. package/dist/assets/main-BbhfMTt8.js.map +0 -1
  101. package/dist/assets/ownDid-D8z5gwGI.js.map +0 -1
  102. package/dist/assets/profiles-MFtCmJwK.js.map +0 -1
  103. package/dist/assets/registry-B2Dtnibo.js.map +0 -1
  104. package/dist/assets/server-Dw1o8z1o.js.map +0 -1
  105. package/dist/assets/src-BD8RBVEp.js.map +0 -1
  106. package/dist/assets/translate-D1uP0q32.js.map +0 -1
  107. package/dist/assets/words-DdXPkB3n.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { $o as CALL_SIGNAL_MAX_AGE_MS, Fu as fromBase64Url, Ni as isPublicAddress, cs as signalHasVideo, es as RTC_CONFIG, hu as setLinkTraceSink, is as callSignalHeardAt, ns as buildSdpFromSignal, os as extractParamsFromSdp, rs as callRtcConfig, si as checkPushEndpoint, ss as parseCallSignal, ts as answersOffer } from "./src-BD8RBVEp.js";
2
- import { o as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-BSv_BWyG.js";
1
+ import { Fi as isPublicAddress, Hu as fromBase64Url, Su as setLinkTraceSink, as as buildSdpFromSignal, ds as signalHasVideo, is as answersOffer, li as checkPushEndpoint, ls as extractParamsFromSdp, ns as CALL_SIGNAL_MAX_AGE_MS, os as callRtcConfig, rs as RTC_CONFIG, ss as callSignalHeardAt, us as parseCallSignal } from "./src-DZagapGt.js";
2
+ import { o as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-C9ChbD-c.js";
3
3
  import { r as asCliError, t as CliError } from "./errors-R4S2SAEM.js";
4
- import { l as findOwnNamedChat, o as findChat } from "./apiKit-CCavJJcl.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-DFCgr6RH.js";
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
- 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";
4
+ import { l as findOwnNamedChat, o as findChat } from "./apiKit-Du1u2l4x.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-BF_KwecF.js";
6
+ import { S as runtimePath, g as startingPath, n as RESTORED_MARK, r as acquireLock, v as ownFolder, x as privateFolder, y as ownProfile } from "./profiles-vbXHs0Mq.js";
7
+ import { c as proof, d as DEFAULT_RATE, f as PlaybackQueue, g as isCallRate, h as frameSamples, l as removeDaemonSecret, m as frameBytes, o as greeting, p as bytesToMs, s as newDaemonSecret } from "./client-D5E1RQYB.js";
8
8
  import { createRequire } from "node:module";
9
9
  import { appendFileSync, chmodSync, closeSync, existsSync, fstatSync, fsyncSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
10
10
  import { readFile } from "node:fs/promises";
@@ -1689,7 +1689,10 @@ var SEEN_KEEP_MS = 2592e6;
1689
1689
  var SWEEP_EVERY_MS = 216e5;
1690
1690
  /** How long a `file.*` event waits for the message that carries its file. */
1691
1691
  var FILE_MESSAGE_WAIT_MS = 2e3;
1692
- /** The notice an app sends when a chat first goes live (apps/ui/src/hooks/useChat.ts): shown as a line, not a message. */
1692
+ /**
1693
+ * The notice an app sends when a chat first goes live (apps/ui/src/hooks/useChat.ts): shown as a line, not a message.
1694
+ * The contact's only on the row the engine took as their joined line (`StoredMessage.joinLine`).
1695
+ */
1693
1696
  var JOIN_NOTICE = /^👋 (?:(.+) )?joined$/;
1694
1697
  /**
1695
1698
  * Turns the engine's events into the stream, keeps the journal, and remembers which messages it already reported
@@ -1701,6 +1704,13 @@ var EventHub = class {
1701
1704
  now;
1702
1705
  seenDb;
1703
1706
  seq = 0;
1707
+ /**
1708
+ * The last seq the journal dropped (a trim, a journal set aside), kept in `<journal>.dropped`: a replay from before it
1709
+ * starts with `events.gap`. What the person removed (`forget`) leaves holes after it, which are none.
1710
+ */
1711
+ dropped = 0;
1712
+ /** Whether `<journal>.dropped` is written: before `forget` first takes a journal's first events, it must be. */
1713
+ marked = false;
1704
1714
  journalLines = 0;
1705
1715
  journalBytes = 0;
1706
1716
  listeners = /* @__PURE__ */ new Set();
@@ -1740,13 +1750,16 @@ var EventHub = class {
1740
1750
  /** Loads the journal's last seq and the seen set; call before `sink` is attached. */
1741
1751
  async open() {
1742
1752
  try {
1753
+ const dropped = readDropped(this.journalPath + ".dropped");
1743
1754
  if (existsSync(this.journalPath)) {
1744
- const { seq, lines, size } = journalEnd(this.journalPath);
1755
+ const { seq, first, lines, size } = journalEnd(this.journalPath);
1745
1756
  this.journalLines = lines;
1746
1757
  this.journalBytes = size;
1747
1758
  this.seq = seq;
1759
+ this.dropped = dropped ?? (first === void 0 ? seq : first - 1);
1760
+ this.marked = dropped !== void 0;
1748
1761
  if (size > 33554432 || lines > 2e4) this.trimJournal();
1749
- }
1762
+ } else if (dropped !== void 0) rmSync(this.journalPath + ".dropped", { force: true });
1750
1763
  } catch (error) {
1751
1764
  process.stderr.write(`ghostly: the event journal could not be read, a new one begins: ${error instanceof Error ? error.message : String(error)}\n`);
1752
1765
  try {
@@ -1754,6 +1767,7 @@ var EventHub = class {
1754
1767
  } catch {}
1755
1768
  this.journalLines = 0;
1756
1769
  this.journalBytes = 0;
1770
+ this.markDropped(this.seq);
1757
1771
  }
1758
1772
  this.db = await new Promise((resolve, reject) => {
1759
1773
  const request = indexedDB.open(this.seenDb, 1);
@@ -1874,7 +1888,10 @@ var EventHub = class {
1874
1888
  this.appListeners.add(listener);
1875
1889
  return () => this.appListeners.delete(listener);
1876
1890
  }
1877
- /** Events after `since` still in the journal; a gap event first when older ones were dropped. */
1891
+ /**
1892
+ * Events after `since` still in the journal; a gap event first when older ones were dropped (`dropped`). The events of
1893
+ * what the person removed (`forget`) are no gap: they are not here on purpose.
1894
+ */
1878
1895
  replay(since) {
1879
1896
  if (!existsSync(this.journalPath) || since >= this.seq) return [];
1880
1897
  const out = [];
@@ -1882,16 +1899,29 @@ var EventHub = class {
1882
1899
  const event = JSON.parse(line);
1883
1900
  if (event.seq > since) out.push(event);
1884
1901
  } catch {}
1885
- if (out.length && out[0].seq > since + 1) out.unshift({
1902
+ if (out.length && out[0].seq > since + 1 && since < this.dropped) out.unshift({
1886
1903
  seq: since,
1887
1904
  id: `events.gap:${since}:${out[0].seq}`,
1888
1905
  type: "events.gap",
1889
1906
  at: this.now(),
1890
1907
  from: since + 1,
1891
- to: out[0].seq - 1
1908
+ to: Math.min(this.dropped, out[0].seq - 1)
1892
1909
  });
1893
1910
  return out;
1894
1911
  }
1912
+ /**
1913
+ * Notes that the journal no longer holds the events up to `seq`. Written before the journal is: a stop in between
1914
+ * leaves the mark ahead of the journal (a gap said where none was), never behind it (a gap not said).
1915
+ */
1916
+ markDropped(seq) {
1917
+ this.dropped = seq;
1918
+ try {
1919
+ writeFileSync(this.journalPath + ".dropped", String(seq), { mode: 384 });
1920
+ this.marked = true;
1921
+ } catch (error) {
1922
+ process.stderr.write(`ghostly: event journal error: ${error instanceof Error ? error.message : String(error)}\n`);
1923
+ }
1924
+ }
1895
1925
  get lastSeq() {
1896
1926
  return this.seq;
1897
1927
  }
@@ -1943,6 +1973,8 @@ var EventHub = class {
1943
1973
  let start = lines.length, bytes = 0;
1944
1974
  while (start > 0 && bytes + Buffer.byteLength(lines[start - 1]) + 1 <= 16777216) bytes += Buffer.byteLength(lines[--start]) + 1;
1945
1975
  const kept = lines.slice(start);
1976
+ const first = firstSeq(kept);
1977
+ this.markDropped(Math.max(this.dropped, first === void 0 ? this.seq : first - 1));
1946
1978
  writeFileSync(this.journalPath + ".tmp", kept.length ? kept.join("\n") + "\n" : "", { mode: 384 });
1947
1979
  renameSync(this.journalPath + ".tmp", this.journalPath);
1948
1980
  this.journalLines = kept.length;
@@ -1991,6 +2023,7 @@ var EventHub = class {
1991
2023
  return [JSON.stringify(written)];
1992
2024
  });
1993
2025
  if (!changed) return;
2026
+ if (!this.marked) this.markDropped(this.dropped);
1994
2027
  const tail = kept.length ? kept.join("\n") + "\n" : "";
1995
2028
  writeFileSync(this.journalPath + ".tmp", Buffer.concat([bytes.subarray(start, from), Buffer.from(tail)]), { mode: 384 });
1996
2029
  renameSync(this.journalPath + ".tmp", this.journalPath);
@@ -2342,7 +2375,7 @@ var EventHub = class {
2342
2375
  message: json()
2343
2376
  });
2344
2377
  } else {
2345
- const notice = JOIN_NOTICE.exec(message.text);
2378
+ const notice = message.sender === "me" || message.joinLine ? JOIN_NOTICE.exec(message.text) : null;
2346
2379
  const type = notice ? message.sender === "peer" ? "chat.joined" : "chat.announced" : message.sender === "peer" ? "message.received" : "message.sent";
2347
2380
  this.emit(type, `${type}:${chat}:${message.id}`, {
2348
2381
  chat,
@@ -2606,6 +2639,13 @@ function journalEnd(path) {
2606
2639
  if (stop > from) lines++;
2607
2640
  from = stop + 1;
2608
2641
  }
2642
+ let first;
2643
+ for (let from = start; from < bytes.length && first === void 0;) {
2644
+ const end = bytes.indexOf(10, from);
2645
+ const stop = end === -1 ? bytes.length : end;
2646
+ if (stop > from) first = firstSeq([bytes.toString("utf8", from, stop)]);
2647
+ from = stop + 1;
2648
+ }
2609
2649
  let seq = 0;
2610
2650
  for (let stop = bytes.length; stop > start;) {
2611
2651
  const from = Math.max(start, bytes.lastIndexOf(10, stop - 1) + 1);
@@ -2617,10 +2657,27 @@ function journalEnd(path) {
2617
2657
  }
2618
2658
  return {
2619
2659
  seq,
2660
+ first,
2620
2661
  lines,
2621
2662
  size
2622
2663
  };
2623
2664
  }
2665
+ /** The seq of the first of these lines that can be read. */
2666
+ function firstSeq(lines) {
2667
+ for (const line of lines) try {
2668
+ const { seq } = JSON.parse(line);
2669
+ if (typeof seq === "number") return seq;
2670
+ } catch {}
2671
+ }
2672
+ /** The journal's dropped mark (`EventHub.dropped`), or undefined when there is none (a journal from before it). */
2673
+ function readDropped(path) {
2674
+ try {
2675
+ const seq = Number(readFileSync(path, "utf8").trim());
2676
+ return Number.isSafeInteger(seq) && seq >= 0 ? seq : void 0;
2677
+ } catch {
2678
+ return;
2679
+ }
2680
+ }
2624
2681
  /** The bytes of the journal's last `JOURNAL_MAX_BYTES`, `start` where its first whole line begins in them, and its size. */
2625
2682
  function journalWindow(path) {
2626
2683
  const fd = openSync(path, "r");
@@ -4936,7 +4993,7 @@ async function startRuntime(paths, options = {}) {
4936
4993
  const restored = join(paths.dir, RESTORED_MARK);
4937
4994
  if (existsSync(restored)) {
4938
4995
  try {
4939
- const rows = await import("./restoredRows-BCRCjhdF.js");
4996
+ const rows = await import("./restoredRows-CRYwIx3g.js");
4940
4997
  await rows.markRestoredWallet();
4941
4998
  await rows.markLeftOutFiles(leftOutIn(restored));
4942
4999
  await rows.forgetRatchets();
@@ -4956,15 +5013,15 @@ async function startRuntime(paths, options = {}) {
4956
5013
  await installEventSource();
4957
5014
  await preloadWalletModules();
4958
5015
  (await import("./ghostly_iroh_web-BzAXJUYH.js")).initSync({ module: irohWasmBytes() });
4959
- const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-BPDKufla.js"), import("./fileBytes-Q3ehcEr8.js")]);
5016
+ const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-DMzrIdCu.js"), import("./fileBytes-Douk1yOp.js")]);
4960
5017
  registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
4961
- if (await (await import("./blobFiles-DOQDRdDI.js")).moveBlobFiles()) await store.compact();
4962
- const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-Dw1o8z1o.js"), import("./endpoint-BdaeBw2L.js")]);
4963
- const mainline = dht.off ? null : new (await (import("./mainline-9Vc3c3SA.js"))).Mainline({
5018
+ if (await (await import("./blobFiles-BnjN_Vrz.js")).moveBlobFiles()) await store.compact();
5019
+ const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-BZnsm5X5.js"), import("./endpoint-DWHkXWVM.js")]);
5020
+ const mainline = dht.off ? null : new (await (import("./mainline-DOwZDHVy.js"))).Mainline({
4964
5021
  bootstrap: dht.bootstrap,
4965
5022
  host: dht.host
4966
5023
  });
4967
- const transport = mainline || pinned ? new (await (import("./mainline-9Vc3c3SA.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
5024
+ const transport = mainline || pinned ? new (await (import("./mainline-DOwZDHVy.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
4968
5025
  const apps = servedApps(paths.dir).length > 0;
4969
5026
  const server = new EngineServer({
4970
5027
  ...transport ? { transport } : {},
@@ -5011,8 +5068,6 @@ async function startRuntime(paths, options = {}) {
5011
5068
  }
5012
5069
  //#endregion
5013
5070
  //#region src/host.ts
5014
- /** The longest request line the daemon reads (WISP 1100 § Framing). */
5015
- var MAX_LINE = 16777216;
5016
5071
  /**
5017
5072
  * The most a connection may leave unread (answers and events the daemon wrote that its client has not taken): past
5018
5073
  * it, the connection ends. A `listen` stopped with Ctrl+Z, or a client that stops reading, kept every later event in
@@ -5032,6 +5087,7 @@ var BASELINE_NEWEST = 100;
5032
5087
  * `deferGroups`: the groups' sessions would spend the relays' budget its message needs.
5033
5088
  */
5034
5089
  async function openHost(paths, mode, version, options = {}) {
5090
+ ownProfile(paths.dir);
5035
5091
  const locked = acquireLock(paths);
5036
5092
  const unmark = mode === "daemon" ? markStarting(paths) : () => {};
5037
5093
  const release = () => {
@@ -5322,6 +5378,6 @@ function connection(ctx, socket, secret) {
5322
5378
  });
5323
5379
  }
5324
5380
  //#endregion
5325
- export { BASELINE_NEWEST, MAX_LINE, MAX_UNREAD, keepServing, openHost, serve };
5381
+ export { BASELINE_NEWEST, MAX_UNREAD, keepServing, openHost, serve };
5326
5382
 
5327
- //# sourceMappingURL=host-DIBeK_c_.js.map
5383
+ //# sourceMappingURL=host-DvcVt5YI.js.map