@ghostlytools/cli 1.3.6 → 1.3.7

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 (61) hide show
  1. package/README.md +7 -1
  2. package/dist/assets/{api-Br3msjtR.js → api-BL0vpWGN.js} +2 -2
  3. package/dist/assets/{api-z9mlywrn.js → api-DlxlF4jP.js} +10 -10
  4. package/dist/assets/api-DlxlF4jP.js.map +1 -0
  5. package/dist/assets/{apiKit-lX3Xx_hY.js → apiKit-BnpVuZrZ.js} +2 -2
  6. package/dist/assets/{apiKit-lX3Xx_hY.js.map → apiKit-BnpVuZrZ.js.map} +1 -1
  7. package/dist/assets/{apps-Dn7rCafG.js → apps-B_6Q-Mq-.js} +1 -1
  8. package/dist/assets/{apps-BUK6bEKW.js → apps-Bs6QYQjm.js} +2 -2
  9. package/dist/assets/{apps-BUK6bEKW.js.map → apps-Bs6QYQjm.js.map} +1 -1
  10. package/dist/assets/{arkade-uqAXA5BT.js → arkade-DwgUNqCz.js} +2 -2
  11. package/dist/assets/{arkade-uqAXA5BT.js.map → arkade-DwgUNqCz.js.map} +1 -1
  12. package/dist/assets/{backup-_JnqeFZb.js → backup-BqtsbjOT.js} +1 -1
  13. package/dist/assets/{backup-CJQK5Miu.js → backup-DEe1NqKb.js} +4 -4
  14. package/dist/assets/{backup-CJQK5Miu.js.map → backup-DEe1NqKb.js.map} +1 -1
  15. package/dist/assets/buttons-CB1opfZP.js +2 -0
  16. package/dist/assets/{buttons-DDvTuViY.js → buttons-D9NQ3kV0.js} +3 -3
  17. package/dist/assets/{buttons-DDvTuViY.js.map → buttons-D9NQ3kV0.js.map} +1 -1
  18. package/dist/assets/daemonProof-B53VnZ1Z.js +100 -0
  19. package/dist/assets/daemonProof-B53VnZ1Z.js.map +1 -0
  20. package/dist/assets/{envelope-BqvBb6hC.js → envelope-WC8QWYIL.js} +2 -2
  21. package/dist/assets/{envelope-BqvBb6hC.js.map → envelope-WC8QWYIL.js.map} +1 -1
  22. package/dist/assets/{groupFiles-B1lL6wch.js → groupFiles-BrCMSXxg.js} +7 -4
  23. package/dist/assets/groupFiles-BrCMSXxg.js.map +1 -0
  24. package/dist/assets/{host-DFzlKU3P.js → host-H0IYKNoK.js} +29 -11
  25. package/dist/assets/{host-DFzlKU3P.js.map → host-H0IYKNoK.js.map} +1 -1
  26. package/dist/assets/{hyperdhtRelay-DwlOY6aD.js → hyperdhtRelay-CEfwbaCO.js} +2 -2
  27. package/dist/assets/{hyperdhtRelay-DwlOY6aD.js.map → hyperdhtRelay-CEfwbaCO.js.map} +1 -1
  28. package/dist/assets/{irohWeb-DZDCyL9b.js → irohWeb-Bn-JA2kp.js} +2 -2
  29. package/dist/assets/{irohWeb-DZDCyL9b.js.map → irohWeb-Bn-JA2kp.js.map} +1 -1
  30. package/dist/assets/{main-DgbdDDif.js → main-DiCC-Vjq.js} +111 -39
  31. package/dist/assets/main-DiCC-Vjq.js.map +1 -0
  32. package/dist/assets/{mainline-BHE5-R3A.js → mainline-gU7pE7s2.js} +2 -2
  33. package/dist/assets/{mainline-BHE5-R3A.js.map → mainline-gU7pE7s2.js.map} +1 -1
  34. package/dist/assets/{networkReason-Btv4b2C4.js → networkReason-Dl9JThBQ.js} +2 -2
  35. package/dist/assets/{networkReason-Btv4b2C4.js.map → networkReason-Dl9JThBQ.js.map} +1 -1
  36. package/dist/assets/{nwc-z0pa5zql.js → nwc-CKjZjg-q.js} +3 -3
  37. package/dist/assets/{nwc-z0pa5zql.js.map → nwc-CKjZjg-q.js.map} +1 -1
  38. package/dist/assets/{nwcProvider-C1AhPoFW.js → nwcProvider-GDrc0HM4.js} +2 -2
  39. package/dist/assets/{nwcProvider-C1AhPoFW.js.map → nwcProvider-GDrc0HM4.js.map} +1 -1
  40. package/dist/assets/{registry-JrnwUWmh.js → registry-JGOFtJDE.js} +3 -3
  41. package/dist/assets/{registry-JrnwUWmh.js.map → registry-JGOFtJDE.js.map} +1 -1
  42. package/dist/assets/{registry-C09xXyx-.js → registry-Wk7ZHuwm.js} +1 -1
  43. package/dist/assets/{resolve-Ssq1nDy4.js → resolve-CVpEbud3.js} +2 -2
  44. package/dist/assets/{resolve-Ssq1nDy4.js.map → resolve-CVpEbud3.js.map} +1 -1
  45. package/dist/assets/{server-D6FSznK5.js → server-CkYscxE3.js} +48 -20
  46. package/dist/assets/{server-D6FSznK5.js.map → server-CkYscxE3.js.map} +1 -1
  47. package/dist/assets/{src-XhjSWnp-.js → src-gJqfoRKI.js} +26 -2
  48. package/dist/assets/src-gJqfoRKI.js.map +1 -0
  49. package/dist/assets/{turnRefs-Cle33IoV.js → turnRefs-zUQbFkl3.js} +2 -2
  50. package/dist/assets/{turnRefs-Cle33IoV.js.map → turnRefs-zUQbFkl3.js.map} +1 -1
  51. package/dist/assets/{usdt-DO86yko2.js → usdt-BkDMGqZa.js} +3 -3
  52. package/dist/assets/{usdt-DO86yko2.js.map → usdt-BkDMGqZa.js.map} +1 -1
  53. package/dist/ghostly.mjs +1 -1
  54. package/package.json +1 -1
  55. package/dist/assets/api-z9mlywrn.js.map +0 -1
  56. package/dist/assets/buttons-DDB9Xdha.js +0 -2
  57. package/dist/assets/groupFiles-B1lL6wch.js.map +0 -1
  58. package/dist/assets/main-DgbdDDif.js.map +0 -1
  59. package/dist/assets/privateFolder-Bk9C9oFv.js +0 -38
  60. package/dist/assets/privateFolder-Bk9C9oFv.js.map +0 -1
  61. package/dist/assets/src-XhjSWnp-.js.map +0 -1
package/README.md CHANGED
@@ -368,10 +368,16 @@ receive|address|redeem`, `wallet.mint.add`, `lightning.default|rename`, `pay`, `
368
368
  `file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub`, `profile.picture|backup`,
369
369
  `identity.providers|list|add|complete|cancel|remove|share|withdraw|contact|recheck`, `service.list|add|remove|enable|share|peer|open|close`,
370
370
  `call.start|answer|hangup|list|get|flush|auto`,
371
- `events.replay`, `events.subscribe`, `daemon.stop`, and `engine.call` with
371
+ `events.replay`, `events.subscribe`, `daemon.stop`, `daemon.hello`, and `engine.call` with
372
372
  `{"method":"<engine call>","params":{…},"confirmReal":false}` for anything else the app does. Parameters are the
373
373
  commands' (see `src/api.ts`). Errors: `{"id":…,"error":{"code","message","details"?}}` with the codes above.
374
374
 
375
+ Before its first request, a program can check that the socket is the profile's daemon and not a process that opened
376
+ its path first (on Windows the socket is a named pipe, which any account of the machine may open): send
377
+ `{"id":"hello","method":"daemon.hello","params":{"nonce":"<16 random bytes, hex>"}}`; the answer's `proof` is
378
+ HMAC-SHA256 over `ghostly-daemon:<nonce>` keyed with the 32 bytes (hex) in `daemon.secret` in the profile's folder,
379
+ which the daemon writes anew, 0600, at every start. The CLI sends nothing else until that proof matches.
380
+
375
381
  ## Calls
376
382
 
377
383
  A bot or an agent can take part in a voice call with the apps (calls/1, WISP 601): the CLI runs the call's media and
@@ -1,3 +1,3 @@
1
- import { a as findChat, s as findGroup } from "./apiKit-lX3Xx_hY.js";
2
- import { a as hideStateSecrets, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-z9mlywrn.js";
1
+ import { a as findChat, s as findGroup } from "./apiKit-BnpVuZrZ.js";
2
+ import { a as hideStateSecrets, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-DlxlF4jP.js";
3
3
  export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings };
@@ -1,14 +1,14 @@
1
- import { $n as GROUP_FILE_LIMITS, Bo as GhostlyHttpError, Cl as randomBytes$1, Fo as AWAITING_PEER_MS, Hr as TYPING_REFRESH_MS, Qa as appCardId, Sc as ownInviteRefusal, Vr as TYPING_KINDS, Wo as LIMITS, Wr as sanitizeTypingStatus, Xi as identityStatement, Za as STATUS_CARD_LIMITS, _a as VOICE_LIMITS, _l as MAX_AVATAR_LENGTH, _o as isAppRef, at as groupName, ba as parseVoiceMeta, bc as inviteLink, ci as APP_DATA_MAX_BYTES, eo as cardLine, ga as PLAYABLE_AUDIO, ha as sanitizeMime, m as APP_PERMISSIONS, ma as sanitizeFileName, no as checkStatusCard, po as appRef, va as baseMime, vl as sanitizeAvatar, wa as readImageMeta, wl as toBase64Url, xa as voicePeaksOf, y as isAppUrl } from "./src-XhjSWnp-.js";
1
+ import { $n as GROUP_FILE_LIMITS, Bo as GhostlyHttpError, Cl as randomBytes$1, Fo as AWAITING_PEER_MS, Hr as TYPING_REFRESH_MS, Qa as appCardId, Sc as ownInviteRefusal, Vr as TYPING_KINDS, Wo as LIMITS, Wr as sanitizeTypingStatus, Xi as identityStatement, Za as STATUS_CARD_LIMITS, _a as VOICE_LIMITS, _l as MAX_AVATAR_LENGTH, _o as isAppRef, at as groupName, ba as parseVoiceMeta, bc as inviteLink, ci as APP_DATA_MAX_BYTES, eo as cardLine, ga as PLAYABLE_AUDIO, ha as sanitizeMime, m as APP_PERMISSIONS, ma as sanitizeFileName, no as checkStatusCard, po as appRef, va as baseMime, vl as sanitizeAvatar, wa as readImageMeta, wl as toBase64Url, xa as voicePeaksOf, y as isAppUrl } from "./src-gJqfoRKI.js";
2
2
  import { c as fileStore } from "./idb-B5L8wuOm.js";
3
- import { O as waitingGroupFile, T as removeStored, U as iceServerProblem, W as iceServerSetting, i as groupOfFile, l as replyRef, n as groupFileId, v as paymentNetwork } from "./groupFiles-B1lL6wch.js";
3
+ import { O as waitingGroupFile, T as removeStored, U as iceServerProblem, W as iceServerSetting, i as groupOfFile, l as replyRef, n as groupFileId, v as paymentNetwork } from "./groupFiles-BrCMSXxg.js";
4
4
  import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-Di7VZtmU.js";
5
- import { t as IDENTITY_PROVIDERS } from "./registry-JrnwUWmh.js";
6
- import { a as waitForEdit, c as findSecret, i as pressable, n as buttonsCard, o as waitForGroupFrame, s as waitForMessage, t as BUTTON_METHODS } from "./buttons-DDvTuViY.js";
7
- import { i as ENGINE_READS, n as withStoredIds, r as ENGINE_METHODS } from "./turnRefs-Cle33IoV.js";
5
+ import { t as IDENTITY_PROVIDERS } from "./registry-JGOFtJDE.js";
6
+ import { a as waitForEdit, c as findSecret, i as pressable, n as buttonsCard, o as waitForGroupFrame, s as waitForMessage, t as BUTTON_METHODS } from "./buttons-D9NQ3kV0.js";
7
+ import { i as ENGINE_READS, n as withStoredIds, r as ENGINE_METHODS } from "./turnRefs-zUQbFkl3.js";
8
8
  import { i as localFileError, r as asCliError, t as CliError } from "./errors-B-zMxbcd.js";
9
- import { _ as str, a as findChat, c as groupOf, d as messageOf, f as node, g as state, h as sentAt, i as chatOrGroup, l as inviteTaken, m as oneOf, n as bool, o as findChatOrGroup, p as num, r as chatOf, s as findGroup, u as list, v as waitForState } from "./apiKit-lX3Xx_hY.js";
10
- import { t as BACKUP_METHODS } from "./backup-CJQK5Miu.js";
11
- import { o as checkedBundle } from "./apps-BUK6bEKW.js";
9
+ import { _ as str, a as findChat, c as groupOf, d as messageOf, f as node, g as state, h as sentAt, i as chatOrGroup, l as inviteTaken, m as oneOf, n as bool, o as findChatOrGroup, p as num, r as chatOf, s as findGroup, u as list, v as waitForState } from "./apiKit-BnpVuZrZ.js";
10
+ import { t as BACKUP_METHODS } from "./backup-DEe1NqKb.js";
11
+ import { o as checkedBundle } from "./apps-Bs6QYQjm.js";
12
12
  import { generateMnemonic } from "@scure/bip39";
13
13
  import { wordlist } from "@scure/bip39/wordlists/english.js";
14
14
  import { openAsBlob, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -2829,7 +2829,7 @@ function paymentJson(p) {
2829
2829
  state: p.state,
2830
2830
  error: p.error ?? null,
2831
2831
  network: paymentNetwork(p),
2832
- method: p.target?.method ?? (p.invoice ? "lightning" : p.mint || p.mints ? "cashu" : null),
2832
+ method: p.target?.method ?? (p.federation || p.federations ? "fedimint" : p.invoice ? "lightning" : p.mint || p.mints ? "cashu" : null),
2833
2833
  createdAt: p.createdAt,
2834
2834
  ...p.group ? { group: p.group } : {},
2835
2835
  ...p.closed ? { closed: true } : {},
@@ -4249,4 +4249,4 @@ async function callApi(ctx, method, params = {}) {
4249
4249
  //#endregion
4250
4250
  export { flushCardUpdates as _, hideStateSecrets as a, paymentJson as c, nodeLocalFetch as d, chatJson as f, resumeHolds as g, groupMessageJson as h, groupSendRefused as i, reportAppFrames as l, groupJson as m, SETTABLE as n, mentionsFor as o, chatMessageJson as p, callApi as r, redactSettings as s, API_METHODS as t, servedApps as u };
4251
4251
 
4252
- //# sourceMappingURL=api-z9mlywrn.js.map
4252
+ //# sourceMappingURL=api-DlxlF4jP.js.map