@ghostlytools/cli 1.1.3 → 1.1.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 (29) hide show
  1. package/dist/assets/argon2id-088uQfnH.js.map +1 -1
  2. package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
  3. package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
  4. package/dist/assets/breez_sdk_spark_wasm_bg.wasm +0 -0
  5. package/dist/assets/fedimint_client_wasm_bg-BtHHlFpp.js.map +1 -1
  6. package/dist/assets/{hyperdhtRelay-CHMS7_KO.js → hyperdhtRelay-BoxPHp7v.js} +3 -3
  7. package/dist/assets/{hyperdhtRelay-CHMS7_KO.js.map → hyperdhtRelay-BoxPHp7v.js.map} +1 -1
  8. package/dist/assets/legacy_ciphers-JJOu0JXL.js.map +1 -1
  9. package/dist/assets/{mainline-B0UTU0-4.js → mainline-dkA94eh2.js} +2 -2
  10. package/dist/assets/{mainline-B0UTU0-4.js.map → mainline-dkA94eh2.js.map} +1 -1
  11. package/dist/assets/nacl-fast-CDhNCYHs.js.map +1 -1
  12. package/dist/assets/noble_curves-DDWn5AH0.js.map +1 -1
  13. package/dist/assets/noble_hashes-B7AZyFyS.js.map +1 -1
  14. package/dist/assets/openpgp-BBFr-zHQ.js.map +1 -1
  15. package/dist/assets/{server-9AM0ta6q.js → server-CXFTDnFI.js} +204 -30
  16. package/dist/assets/server-CXFTDnFI.js.map +1 -0
  17. package/dist/assets/sha512-BYId-G-T.js.map +1 -1
  18. package/dist/assets/{src-C_E99PGx.js → src-K3NijMq-.js} +414 -46
  19. package/dist/assets/src-K3NijMq-.js.map +1 -0
  20. package/dist/assets/storage-Bya5b2Xt.js.map +1 -1
  21. package/dist/assets/tree-store-N362nuzZ.js.map +1 -1
  22. package/dist/assets/unbzip2-stream-B1C-JX9L.js.map +1 -1
  23. package/dist/assets/{web-OUQl4Q7L.js → web-DwgdhfcY.js} +16 -16
  24. package/dist/assets/{web-OUQl4Q7L.js.map → web-DwgdhfcY.js.map} +1 -1
  25. package/dist/ghostly.mjs +28 -13
  26. package/dist/ghostly.mjs.map +1 -1
  27. package/package.json +7 -7
  28. package/dist/assets/server-9AM0ta6q.js.map +0 -1
  29. package/dist/assets/src-C_E99PGx.js.map +0 -1
package/dist/ghostly.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as fileBytesOf, d as __exportAll, i as fileBytes, l as FILE_BYTES_STEP } from "./assets/fileBytes-DxiJHmTk.js";
3
- import { $ as checkAtprotoProofRecord, $s as randomBytes$1, $t as isPubkyKey, Aa as RTC_CONFIG, Ai as voicePeaksOf, B as sameSshKey, Ci as sanitizeFileName, Cn as resolveLightningDestination, Ct as parseDidSignaturePaste, Di as baseMime, Ea as LIMITS, Ei as VOICE_LIMITS, En as decodeBolt11, Et as strictBase64Url, Fa as extractParamsFromSdp, G as decodeAnyBitcoinAddress, H as verifySshSignature, Hs as openRelayPayload, I as SSHSIG_NAMESPACE, Ia as parseCallSignal, Ir as BUTTONS_CAPABILITY, J as ATPROTO_PROOF_COLLECTION, K as ATPROTO_DECLARED_SCOPE, Kt as walletNetworkOf, L as SshSigError, La as signalHasVideo, Ma as buildSdpFromSignal, Na as callRtcConfig, Ns as setLinkTraceSink, P as groupName, Pa as callSignalHeardAt, Pr as checkPushEndpoint, Q as atprotoProofRkey, Qi as replySnippet, Qr as IdentityCheckUnavailable, Qs as fromBase64Url$1, Qt as PUBKY_PROOF_MAX_BYTES, R as parseSshPublicKey, Sa as GhostlyHttpError, Sn as requestLnurlInvoice, St as parseDidDocument, Ti as PLAYABLE_AUDIO, Tn as engineText, Tt as staticDidDocument, U as verifyBitcoinMessage, V as sshSignCommand, Vt as WALLET_NETWORKS, W as BitcoinAddressError, X as atprotoDidMethod, Xs as sanitizeAvatar, Y as ATPROTO_PROOF_SCOPE, Ys as MAX_AVATAR_LENGTH, Z as atprotoProofRecord, _n as recordsFromTxt, _t as didWebFileNames, an as pubkyProofPath, at as verifyAtprotoRecordProof, bn as txtValue, bt as normalizeDid, cn as DOMAIN_FILE_MAX_BYTES, dn as domainTxtRecord, dt as checkDidSignature, ea as ITEM_STATES, ec as toBase64Url$1, ei as boundVerifiedIdentity, en as isPubkyProofFolder, et as isAtprotoDid, fn as domainWellKnownFile, ft as didGhostlyServiceEntry, gn as normalizeDomain, gr as TYPING_REFRESH_MS, gt as didWebFile, hn as nip05RootKey, hr as TYPING_KINDS, ht as didWebDocumentUrl, ia as checkStatusCard, in as pubkyProofFile, it as AtprotoProofError, ja as answersOffer, jt as resolveDidDht, ka as CALL_SIGNAL_MAX_AGE_MS, ki as parseVoiceMeta, ln as decodeDnsResponse, lt as DidError, mn as isPublicAddress, mt as didSignedMessages, na as STATUS_CARD_LIMITS, nc as utf8Decode, nn as normalizePubkyKey, ns as inviteLink, nt as parseAtprotoDidDocument, on as homeserverWebEndpoint, ot as DID_DOCUMENT_MAX_BYTES$1, pn as encodeDnsQuery, pt as didJwsAlg, q as ATPROTO_FULL_SCOPE, ra as buttonLabelClash, rc as utf8Encode, ri as identityStatement, rn as pubkyProofCapability, rt as shortAtprotoDid, sn as pubkyHomeserverOf, st as DID_FILE_MAX_BYTES, ta as RUN_RESULTS, tn as newPubkyProofFolder, tt as normalizeAtprotoHandle, un as dnsProofName, ut as checkDidJws, vn as recordsFromWellKnown, vr as sanitizeTypingStatus, vt as didWebFileUrl, wi as sanitizeMime, wn as engineError, wt as signingKeys, xi as readImageMeta, xn as wellKnownUrl, xt as parseDid, yn as recordsName, yt as didWebHost, z as parseSshSignature, zs as RELAY_PAYLOAD_MAX_BYTES } from "./assets/src-C_E99PGx.js";
3
+ import { $ as checkAtprotoProofRecord, $i as replySnippet, $r as IdentityCheckUnavailable, $s as fromBase64Url$1, $t as isPubkyKey, Aa as CALL_SIGNAL_MAX_AGE_MS, Ai as parseVoiceMeta, B as sameSshKey, Bs as RELAY_PAYLOAD_MAX_BYTES, Ca as GhostlyHttpError, Cn as resolveLightningDestination, Ct as parseDidSignaturePaste, Da as LIMITS, Di as VOICE_LIMITS, Ei as PLAYABLE_AUDIO, En as decodeBolt11, Et as strictBase64Url, Fa as callSignalHeardAt, G as decodeAnyBitcoinAddress, H as verifySshSignature, I as SSHSIG_NAMESPACE, Ia as extractParamsFromSdp, Ir as BUTTONS_CAPABILITY, J as ATPROTO_PROOF_COLLECTION, K as ATPROTO_DECLARED_SCOPE, Kt as walletNetworkOf, L as SshSigError, La as parseCallSignal, Ma as answersOffer, Na as buildSdpFromSignal, Oi as baseMime, P as groupName, Pa as callRtcConfig, Pr as checkPushEndpoint, Ps as setLinkTraceSink, Q as atprotoProofRkey, Qt as PUBKY_PROOF_MAX_BYTES, R as parseSshPublicKey, Ra as signalHasVideo, Si as readImageMeta, Sn as requestLnurlInvoice, St as parseDidDocument, Ti as sanitizeMime, Tn as engineText, Tt as staticDidDocument, U as verifyBitcoinMessage, Us as openRelayPayload, V as sshSignCommand, Vt as WALLET_NETWORKS, W as BitcoinAddressError, X as atprotoDidMethod, Xs as MAX_AVATAR_LENGTH, Y as ATPROTO_PROOF_SCOPE, Z as atprotoProofRecord, Zs as sanitizeAvatar, _n as recordsFromTxt, _t as didWebFileNames, aa as checkStatusCard, an as pubkyProofPath, at as verifyAtprotoRecordProof, bn as txtValue, bt as normalizeDid, cn as DOMAIN_FILE_MAX_BYTES, dn as domainTxtRecord, dt as checkDidSignature, ec as randomBytes$1, en as isPubkyProofFolder, et as isAtprotoDid, fn as domainWellKnownFile, ft as didGhostlyServiceEntry, gn as normalizeDomain, gr as TYPING_REFRESH_MS, gt as didWebFile, hn as nip05RootKey, hr as TYPING_KINDS, ht as didWebDocumentUrl, ia as buttonLabelClash, ic as utf8Encode, ii as identityStatement, in as pubkyProofFile, it as AtprotoProofError, ja as RTC_CONFIG, ji as voicePeaksOf, jt as resolveDidDht, ln as decodeDnsResponse, lt as DidError, mn as isPublicAddress, mt as didSignedMessages, na as RUN_RESULTS, nn as normalizePubkyKey, nt as parseAtprotoDidDocument, on as homeserverWebEndpoint, ot as DID_DOCUMENT_MAX_BYTES$1, pn as encodeDnsQuery, pt as didJwsAlg, q as ATPROTO_FULL_SCOPE, ra as STATUS_CARD_LIMITS, rc as utf8Decode, rn as pubkyProofCapability, rs as inviteLink, rt as shortAtprotoDid, sn as pubkyHomeserverOf, st as DID_FILE_MAX_BYTES, ta as ITEM_STATES, tc as toBase64Url$1, ti as boundVerifiedIdentity, tn as newPubkyProofFolder, tt as normalizeAtprotoHandle, un as dnsProofName, ut as checkDidJws, vn as recordsFromWellKnown, vr as sanitizeTypingStatus, vt as didWebFileUrl, wi as sanitizeFileName, wn as engineError, wt as signingKeys, xn as wellKnownUrl, xt as parseDid, yn as recordsName, yt as didWebHost, z as parseSshSignature } from "./assets/src-K3NijMq-.js";
4
4
  import { d as wrap, i as databaseName, l as store$1, n as STORES, o as fileStore, s as openDb, u as transact } from "./assets/idb-Co2lObpU.js";
5
5
  import { createRequire } from "node:module";
6
6
  import { spawn } from "node:child_process";
@@ -34,7 +34,7 @@ import { IDBFactory, IDBKeyRange as IDBKeyRange$1, IDBTransaction } from "fake-i
34
34
  import { format } from "node:util";
35
35
  var package_default = {
36
36
  name: "@ghostlytools/cli",
37
- version: "1.1.3",
37
+ version: "1.1.4",
38
38
  type: "module",
39
39
  description: "Ghostly for bots and terminals: the app's own engine, headless on Node, behind a daemon and a `ghostly` command with JSON output.",
40
40
  license: "MIT",
@@ -60,9 +60,9 @@ var package_default = {
60
60
  "test": "vitest run"
61
61
  },
62
62
  dependencies: {
63
- "@arkade-os/sdk": "0.4.76",
63
+ "@arkade-os/sdk": "0.4.78",
64
64
  "@atproto/jwk-webcrypto": "^0.3.4",
65
- "@atproto/oauth-client": "^0.8.7",
65
+ "@atproto/oauth-client": "^0.8.8",
66
66
  "@bitcoindevkit/bdk-wallet-web": "0.3.0",
67
67
  "@bitcoinerlab/descriptors-scure": "^3.2.0",
68
68
  "@cashu/cashu-ts": "^4.11.0",
@@ -80,7 +80,7 @@ var package_default = {
80
80
  "@secondts/bark": "0.25.0",
81
81
  "@serenity-kit/opaque": "1.1.0",
82
82
  "@synonymdev/pubky": "0.14.0",
83
- "@tetherto/wdk-wallet-evm": "1.0.0-beta.19",
83
+ "@tetherto/wdk-wallet-evm": "1.0.0-beta.20",
84
84
  "b4a": "1.9.0",
85
85
  "bittorrent-dht": "11.0.12",
86
86
  "ethers": "6.17.0",
@@ -98,10 +98,10 @@ var package_default = {
98
98
  "@ghostly/browser": "*",
99
99
  "@ghostly/core": "*",
100
100
  "@ghostly/iroh-web": "*",
101
- "@types/node": "^26.6.3",
101
+ "@types/node": "^26.6.4",
102
102
  "typescript": "^5.9.3",
103
- "vite": "^8.3.1",
104
- "vitest": "^5.0.2"
103
+ "vite": "^8.3.2",
104
+ "vitest": "^5.0.3"
105
105
  }
106
106
  };
107
107
  //#endregion
@@ -339,16 +339,29 @@ function findSecret(text) {
339
339
  * 12 to 24 words in a row from the English BIP39 list whose checksum holds, anywhere in the text; or a message that
340
340
  * is nothing but 12, 15, 18, 21 or 24 of those words (a seed with one word mistyped is still most of a seed). Prose
341
341
  * breaks a run at once: "the", "a", "is", "to", "and", "of" and "I" are not on the list.
342
+ *
343
+ * One word said over and over is not a seed, though one in 16 such runs passes a 12-word checksum ("word" does): a
344
+ * window of a single word never counts, and a window mostly of one word ("abandon … about") counts only when that
345
+ * word does not go on past it on either side.
342
346
  */
343
347
  function hasMnemonic(text) {
344
348
  const tokens = text.toLowerCase().match(/[a-z]+/g);
345
349
  if (!tokens || tokens.length < 12) return false;
346
350
  let budget = CHECKSUM_BUDGET;
347
351
  let run = [];
352
+ const seedLike = (start, length) => {
353
+ const window = run.slice(start, start + length);
354
+ const counts = /* @__PURE__ */ new Map();
355
+ for (const word of window) counts.set(word, (counts.get(word) ?? 0) + 1);
356
+ if (counts.size === 1) return false;
357
+ const [most, times] = [...counts].reduce((a, b) => b[1] > a[1] ? b : a);
358
+ if (times > length / 2 && (run[start - 1] === most || run[start + length] === most)) return false;
359
+ return checksumHolds(window);
360
+ };
348
361
  const check = () => {
349
362
  if (run.length >= 12) {
350
- for (const length of MNEMONIC_LENGTHS) for (let start = 0; start + length <= run.length && budget > 0; start++, budget--) if (checksumHolds(run.slice(start, start + length))) return true;
351
- if (run.length === tokens.length && MNEMONIC_LENGTHS.includes(run.length)) return true;
363
+ for (const length of MNEMONIC_LENGTHS) for (let start = 0; start + length <= run.length && budget > 0; start++, budget--) if (seedLike(start, length)) return true;
364
+ if (run.length === tokens.length && MNEMONIC_LENGTHS.includes(run.length) && new Set(run).size > 1) return true;
352
365
  }
353
366
  run = [];
354
367
  return false;
@@ -645,6 +658,7 @@ var ENGINE_METHODS = [
645
658
  "setWakeSubscription",
646
659
  "setWakeMuted",
647
660
  "wakeForCall",
661
+ "setCallOn",
648
662
  "wakeConfirm",
649
663
  "setFastPoll",
650
664
  "createGroup",
@@ -675,6 +689,7 @@ var ENGINE_METHODS = [
675
689
  "deviceEnrollCancel",
676
690
  "deviceEnrollView",
677
691
  "deviceEnrollJoin",
692
+ "deviceEnrollReady",
678
693
  "deviceEnrollFinish",
679
694
  "deviceEnrollRemove",
680
695
  "deviceSet",
@@ -17029,14 +17044,14 @@ async function startRuntime(paths, options = {}) {
17029
17044
  (await import("./assets/ghostly_iroh_web-Dvzh3Y6E.js")).initSync({ module: irohWasmBytes() });
17030
17045
  const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./assets/fileBytes-DxiJHmTk.js").then((n) => n.o), import("./assets/fileBytes-BQ84L9Fe.js")]);
17031
17046
  registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
17032
- const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./assets/server-9AM0ta6q.js").then((n) => n.t), import("./assets/endpoint-CaSbSFDw.js")]);
17047
+ const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./assets/server-CXFTDnFI.js").then((n) => n.t), import("./assets/endpoint-CaSbSFDw.js")]);
17033
17048
  const network = hyperdhtNetwork();
17034
17049
  const dht = mainlineNetwork();
17035
- const mainline = dht.off ? null : new (await (import("./assets/mainline-B0UTU0-4.js"))).Mainline({
17050
+ const mainline = dht.off ? null : new (await (import("./assets/mainline-dkA94eh2.js"))).Mainline({
17036
17051
  bootstrap: dht.bootstrap,
17037
17052
  host: dht.host
17038
17053
  });
17039
- const transport = mainline || pinned ? new (await (import("./assets/mainline-B0UTU0-4.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
17054
+ const transport = mainline || pinned ? new (await (import("./assets/mainline-dkA94eh2.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
17040
17055
  const server = new EngineServer({
17041
17056
  ...transport ? { transport } : {},
17042
17057
  irohWeb: true,