@ghostlytools/cli 1.12.1 → 1.13.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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{api-jRUXnBdX.js → api-CVtg7MpI.js} +2 -2
  3. package/dist/assets/{api-BwEgbvvK.js → api-CjOaoG-v.js} +16 -16
  4. package/dist/assets/api-CjOaoG-v.js.map +1 -0
  5. package/dist/assets/{apiKit-BlsNk-Cx.js → apiKit-BAGvlQtm.js} +2 -2
  6. package/dist/assets/{apiKit-BlsNk-Cx.js.map → apiKit-BAGvlQtm.js.map} +1 -1
  7. package/dist/assets/{appFetch-CW9fJPHh.js → appFetch-BwJd-kNq.js} +2 -2
  8. package/dist/assets/{appFetch-CW9fJPHh.js.map → appFetch-BwJd-kNq.js.map} +1 -1
  9. package/dist/assets/{apps-CL8TXHhu.js → apps-Cuk45sz5.js} +5 -5
  10. package/dist/assets/{apps-CL8TXHhu.js.map → apps-Cuk45sz5.js.map} +1 -1
  11. package/dist/assets/{apps-BcG4u6SM.js → apps-DjY095Af.js} +1 -1
  12. package/dist/assets/{backup-xZfV-ytw.js → backup-B56sQqoQ.js} +1 -1
  13. package/dist/assets/{backup-BA41EDvh.js → backup-DekVCDWv.js} +3 -3
  14. package/dist/assets/{backup-BA41EDvh.js.map → backup-DekVCDWv.js.map} +1 -1
  15. package/dist/assets/bark_ffi_wasm_bg-CcafsJla.js.map +1 -1
  16. package/dist/assets/{bitcoind-Dh7n9amb.js → bitcoind-B2bbVSzh.js} +2 -2
  17. package/dist/assets/{bitcoind-Dh7n9amb.js.map → bitcoind-B2bbVSzh.js.map} +1 -1
  18. package/dist/assets/bitcoindevkit_bg-BWQHx7vd.js.map +1 -1
  19. package/dist/assets/{buttons-SH1tNRh7.js → buttons-BGxzOtrq.js} +26 -5
  20. package/dist/assets/buttons-BGxzOtrq.js.map +1 -0
  21. package/dist/assets/buttons-CsN2WJOf.js +1 -0
  22. package/dist/assets/{client-DGS-atRu.js → client-DcQAfc3h.js} +2 -2
  23. package/dist/assets/{client-DGS-atRu.js.map → client-DcQAfc3h.js.map} +1 -1
  24. package/dist/assets/{fixedHosts-CPSsGOI2.js → fixedHosts-C3hBliM9.js} +2 -2
  25. package/dist/assets/{fixedHosts-CPSsGOI2.js.map → fixedHosts-C3hBliM9.js.map} +1 -1
  26. package/dist/assets/{groupMeta-DxuJzko_.js → groupMeta-goASqzOt.js} +94 -17
  27. package/dist/assets/{groupMeta-DxuJzko_.js.map → groupMeta-goASqzOt.js.map} +1 -1
  28. package/dist/assets/{host-BxM-HMr0.js → host-C2WRKj3g.js} +52 -32
  29. package/dist/assets/host-C2WRKj3g.js.map +1 -0
  30. package/dist/assets/{irohWeb-CbnGtUo6.js → irohWeb-NfthOL98.js} +6 -6
  31. package/dist/assets/{irohWeb-CbnGtUo6.js.map → irohWeb-NfthOL98.js.map} +1 -1
  32. package/dist/assets/{main-CwTaepxR.js → main-Dh7fePd8.js} +19 -19
  33. package/dist/assets/main-Dh7fePd8.js.map +1 -0
  34. package/dist/assets/{mainline-CVrd0C1n.js → mainline-DY95WbuK.js} +2 -2
  35. package/dist/assets/{mainline-CVrd0C1n.js.map → mainline-DY95WbuK.js.map} +1 -1
  36. package/dist/assets/{ownDid-DY3rYqDI.js → ownDid-BErplN7N.js} +2 -2
  37. package/dist/assets/{ownDid-DY3rYqDI.js.map → ownDid-BErplN7N.js.map} +1 -1
  38. package/dist/assets/{ownStatus-DtzIllg2.js → ownStatus-ClrFjd7h.js} +4 -3
  39. package/dist/assets/ownStatus-ClrFjd7h.js.map +1 -0
  40. package/dist/assets/{profiles-BOYGlmu2.js → profiles-B8xO8-oj.js} +2 -2
  41. package/dist/assets/{profiles-BOYGlmu2.js.map → profiles-B8xO8-oj.js.map} +1 -1
  42. package/dist/assets/{registry-4W1LGlCF.js → registry--Rg2YvOH.js} +1 -1
  43. package/dist/assets/{registry-Bep4umOM.js → registry-CU8PevhI.js} +3 -3
  44. package/dist/assets/{registry-Bep4umOM.js.map → registry-CU8PevhI.js.map} +1 -1
  45. package/dist/assets/{relay-Cjfmdec0.js → relay-CHWg5hpZ.js} +73 -11
  46. package/dist/assets/relay-CHWg5hpZ.js.map +1 -0
  47. package/dist/assets/{resolve-CIc3KZMV.js → resolve-B1upovPM.js} +2 -2
  48. package/dist/assets/{resolve-CIc3KZMV.js.map → resolve-B1upovPM.js.map} +1 -1
  49. package/dist/assets/{server-D4gf-LnD.js → server-Dgxx_DaN.js} +221 -22
  50. package/dist/assets/server-Dgxx_DaN.js.map +1 -0
  51. package/dist/assets/{waitNotice-DQvZgz2T.js → waitNotice-ylU3XwjO.js} +2 -2
  52. package/dist/assets/{waitNotice-DQvZgz2T.js.map → waitNotice-ylU3XwjO.js.map} +1 -1
  53. package/dist/ghostly.mjs +1 -1
  54. package/npm-shrinkwrap.json +2 -2
  55. package/package.json +1 -1
  56. package/dist/assets/api-BwEgbvvK.js.map +0 -1
  57. package/dist/assets/buttons-CsGdQNnR.js +0 -1
  58. package/dist/assets/buttons-SH1tNRh7.js.map +0 -1
  59. package/dist/assets/host-BxM-HMr0.js.map +0 -1
  60. package/dist/assets/main-CwTaepxR.js.map +0 -1
  61. package/dist/assets/ownStatus-DtzIllg2.js.map +0 -1
  62. package/dist/assets/relay-Cjfmdec0.js.map +0 -1
  63. package/dist/assets/server-D4gf-LnD.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ownStatus-DtzIllg2.js","names":[],"sources":["../../src/engineMethods.ts","../../src/turnRefs.ts","../../src/words.ts","../../src/ownStatus.ts"],"sourcesContent":["/**\n * What each call of the app's `EngineApi` (packages/browser/src/shared/rpc.ts) takes, as `engine --list --verbose`\n * shows it: `{ linkId, label }` an object with these keys (`?` an optional one), a type's name for an object of that\n * type, \"\" nothing; a trailing `?` when the object may be left out. `engineMethods.test.ts` reads it out of rpc.ts and\n * keeps the two equal. The device calls (WISP 06): a CLI profile is always on one device, so they answer `single` or refuse.\n */\nexport const ENGINE_PARAMS: Readonly<Record<string, string>> = {\n usdtCreate: \"UsdtCreate\",\n usdtUnlock: \"{ password, network? }\",\n usdtReveal: \"{ password?, network? }\",\n usdtLock: \"{ network? }?\",\n usdtRefresh: \"{ network? }?\",\n usdtExportBackup: \"{ password, network? }\",\n usdtRestoreBackup: \"{ text, password, network? }\",\n arkCreate: \"ArkCreate\",\n arkUnlock: \"{ password, network? }\",\n arkLock: \"{ network? }?\",\n arkBackup: \"{ password?, network? }\",\n arkExportBackup: \"{ password, network? }\",\n arkRestoreBackup: \"{ text, password, network? }\",\n arkRefresh: \"{ network? }?\",\n arkRecover: \"{ network? }?\",\n barkCreate: \"BarkCreate\",\n barkBackup: \"{ network? }?\",\n barkExportBackup: \"{ password, network? }\",\n barkRestoreBackup: \"{ text, password, network? }\",\n barkRefresh: \"{ network? }?\",\n barkBoard: \"{ network? }?\",\n fedimintPreview: \"{ invite, network? }\",\n fedimintJoin: \"{ invite, recover?, network? }\",\n fedimintLeave: \"{ federation }\",\n fedimintRefresh: \"{ network? }?\",\n fedimintSpendNotes: \"{ federation, amount, confirmedReal? }\",\n fedimintReceiveNotes: \"{ notes, network? }\",\n fedimintInvoice: \"{ federation, amount, memo? }\",\n fedimintTakeBack: \"{ federation, operation }\",\n fedimintBackup: \"{ network? }?\",\n fedimintExportBackup: \"{ password, network? }\",\n fedimintRestoreBackup: \"{ text, password, network? }\",\n fedimintRestorePhrase: \"{ mnemonic, invites, network? }\",\n sparkCreate: \"SparkCreate\",\n sparkBackup: \"{ network? }?\",\n sparkExportBackup: \"{ password, network? }\",\n sparkRestoreBackup: \"{ text, password, apiKey?, network? }\",\n sparkRefresh: \"{ network? }?\",\n sparkUseForLightning: \"{ network? }?\",\n preparePayment: \"{ target, amount, feeCap, payee, linkId?, requestId?, memo?, network? }\",\n approvePayment: \"{ id, confirmedReal? }\",\n reconcilePayment: \"{ id }\",\n cancelPayment: \"{ id }\",\n refreshPublicProfiles: \"{ linkId, force? }\",\n choosePublicProfile: \"{ linkId, choice }\",\n preparePeerProof: \"{ linkId, externalKey, adapter? }\",\n submitPeerProof: \"{ linkId, challenge, event }\",\n withdrawPeerProof: \"{ linkId, adapter? }\",\n beginIdentityProof: \"{ provider, subject, validityDays? }\",\n completeIdentityProof: \"{ draftId, evidence }\",\n cancelIdentityProof: \"{ draftId }\",\n removeIdentityProof: \"{ id }\",\n shareIdentityProof: \"{ linkId, id }\",\n withdrawIdentityProof: \"{ linkId, id }\",\n recheckIdentityProof: \"{ linkId, id }\",\n lookupIdentityDisplay: \"{ linkId, id }\",\n loadPublicProfile: \"{ provider, subject, force? }\",\n loadPublicPosts: \"{ provider, subject, more?, force? }\",\n loadPublicGraph: \"{ provider, subject, force? }\",\n loadPublicPostImage: \"{ provider, subject, postId, index }\",\n clearProfileData: \"\",\n setDidListed: \"{ id, listed }\",\n nostrLoadContact: \"{ linkId, subject, what, more? }\",\n nostrForgetContact: \"{ linkId, subject }\",\n nostrLoadOwn: \"{ subject }\",\n nostrOwnFollows: \"{ subject }\",\n nostrContactNotes: \"{ linkId, subject }\",\n nostrLookup: \"NostrLookupRequest\",\n nostrDraft: \"NostrDraftRequest\",\n nostrPublish: \"{ draftId, event }\",\n createLink: \"\",\n takeInvite: \"\",\n joinLink: \"{ inviteCode }\",\n ensureLink: \"LinkParams & { inviteCode?: string }\",\n confirmPair: \"{ linkId, code }\",\n pollNow: \"{ linkId }\",\n removeLink: \"{ linkId }\",\n renameLink: \"{ linkId, label }\",\n setActiveLink: \"{ linkId }\",\n sendMessage: \"{ linkId, text, timestamp?, preview?, replyTo?, card? }\",\n editMessage: \"{ linkId, messageId, text, preview?, mentions?, card? }\",\n retryMessage: \"{ linkId, messageId }\",\n react: \"{ linkId, messageId, emoji }\",\n pinMessage: \"{ linkId, messageId?, remove? }\",\n appId: \"{ linkId, ref }\",\n appOpen: \"{ linkId, ref, version, digest? }\",\n appClose: \"{ linkId, ref }\",\n appSend: \"{ linkId, ref, data, digest? }\",\n appServe: \"{ linkId, ref, file, digest? }\",\n appUnserve: \"{ linkId, serve }\",\n appRangeAnswer: \"{ linkId, app, request, bytes?, size?, error? }\",\n appRemoteRead: \"{ linkId, ref, serve, offset, length, digest? }\",\n messageDetails: \"{ linkId, messageId }\",\n deleteMessage: \"{ linkId, messageId }\",\n removeMessage: \"{ linkId, messageId }\",\n exportLinks: \"\",\n sendFile: \"{ linkId, file, timestamp, replyTo?, forwarded? }\",\n sendGroupFile: \"{ groupId, file, caption?, replyTo?, forwarded? }\",\n groupFileCheck: \"{ groupId }\",\n forwardMessages: \"{ linkId, messageIds, to }\",\n fileAction: \"{ linkId, fileId, action }\",\n setDeliveryMode: \"{ linkId, mode }\",\n setTransportPreference: \"{ linkId, preferred, fallback }\",\n setChatTransport: \"{ linkId, transport }\",\n setChatPaymentMethods: \"{ linkId, methods, networks? }\",\n setChatHold: \"{ linkId, enabled }\",\n connect: \"{ linkId }\",\n walletAddMint: \"{ url, primary?, network? }\",\n walletCreate: \"WalletCreate\",\n walletRemove: \"WalletRemove\",\n walletTestCoins: \"WalletTestCoins\",\n walletSetupRetry: \"{ type }\",\n walletSetupDismiss: \"{ type }\",\n wake: \"{ network? }?\",\n peekProfile: \"{ profile, dbName }\",\n walletSetPrimaryMint: \"{ url }\",\n walletRemoveMint: \"{ url, acceptLoss? }\",\n walletReceiveLightning: \"{ amount, via?, network?, card? }\",\n walletWatchInvoice: \"{ invoice, network? }\",\n walletQuoteInvoice: \"{ invoice, via?, network?, card?, amount? }\",\n walletPayQuote: \"{ quote, mint, note?, confirmedReal?, linkId?, invoice? }\",\n lnurlResolve: \"{ text, network? }\",\n lnurlInvoice: \"{ id, amount, comment?, network? }\",\n checkPayment: \"{ linkId, paymentId }\",\n lightningSetSource: \"{ providerId, values, network?, card? }\",\n lightningClearSource: \"{ network?, card? }?\",\n lightningRetrySource: \"{ network?, card? }?\",\n lightningReconfigureSource: \"{ values, network?, card? }\",\n lightningRefresh: \"{ network?, card? }?\",\n lightningSetReceive: \"{ network, card }\",\n lightningRename: \"{ network, card, name }\",\n bitcoinSetSource: \"{ providerId, values, network? }\",\n bitcoinClearSource: \"{ network? }?\",\n bitcoinRetrySource: \"{ network? }?\",\n bitcoinReconfigureSource: \"{ values, network? }\",\n bitcoinReceiveAddress: \"{ network? }?\",\n bitcoinRefresh: \"{ network? }?\",\n walletReceiveToken: \"{ token }\",\n walletInspectCashu: \"{ text }\",\n walletExport: \"{ network? }?\",\n walletBackupReminder: \"{ event: \\\"later\\\"; wallet: string } | { event: \\\"profile\\\" }\",\n sendPayment: \"{ linkId, amount, memo?, timestamp, network?, confirmedReal? }\",\n requestPayment: \"{ linkId, amount, memo?, timestamp, method?, rail?, network?, card? }\",\n requestGroupPayment: \"{ groupId, amount, memo?, timestamp, rail, network?, card? }\",\n groupPaymentHello: \"{ groupId, member }\",\n askToPay: \"{ linkId, amount, method, memo?, timestamp, network? }\",\n payRequest: \"{ linkId, paymentId, via?, maxFee?, network?, confirmedReal?, card? }\",\n reclaimPayment: \"{ paymentId }\",\n disconnect: \"{ linkId }\",\n addService: \"{ name, target }\",\n removeService: \"{ serviceId }\",\n setServiceEnabled: \"{ serviceId, enabled }\",\n setServiceShared: \"{ serviceId, peerPubKeyZ32, shared }\",\n updateSettings: \"{ settings }\",\n setCallSignal: \"{ linkId, signal }\",\n callOfferHeld: \"{ linkId, ts }\",\n setTyping: \"{ linkId, typing, kind?, status? }\",\n setGroupTyping: \"{ groupId, typing, kind?, status? }\",\n setPresence: \"{ presence }\",\n setOwnStatus: \"{ status }\",\n clearOwnStatus: \"\",\n getOwnStatus: \"\",\n setWakeSubscription: \"{ subscription }\",\n wakeConfirm: \"{ endpoint }\",\n setWakeMuted: \"{ linkId, muted }\",\n setWakeOnline: \"{ on }\",\n wakeForCall: \"{ linkId }\",\n setCallOn: \"{ on }\",\n setFastPoll: \"{ linkId, fast }\",\n createGroup: \"{ name, profile? }\",\n inviteToGroup: \"{ groupId, linkId }\",\n acceptGroupInvitation: \"{ groupId }\",\n declineGroupInvitation: \"{ groupId }\",\n keepGroup: \"{ groupId }\",\n switchGroup: \"{ groupId, to }\",\n enableGroupLink: \"{ groupId, reset? }\",\n disableGroupLink: \"{ groupId }\",\n joinGroupByLink: \"{ link }\",\n sendGroupMessage: \"{ groupId, text, mentions?, replyTo?, card? }\",\n pressButton: \"{ linkId, messageId, buttonId }\",\n groupTaken: \"{ groupId, messageId, edit?, reaction?, pin? }\",\n chatUnconfirmed: \"{ linkId }\",\n groupMessages: \"{ groupId }\",\n messagePage: \"{ linkId, limit?, before?, after? }\",\n chatsFound: \"{ query, linkIds }\",\n statusCardIndex: \"\",\n saveMessage: \"{ linkId, messageId, remove? }\",\n savedMessages: \"\",\n leaveGroup: \"{ groupId }\",\n removeGroupMember: \"{ groupId, key }\",\n makeGroupAdmin: \"{ groupId, key }\",\n setGroupHub: \"{ groupId, key, role }\",\n rotateGroup: \"{ groupId }\",\n setGroupPicture: \"{ groupId, picture }\",\n renameGroup: \"{ groupId, name }\",\n setGroupCall: \"{ groupId, sfu, e2ee? }\",\n groupCallToken: \"{ groupId }\",\n groupCallKey: \"{ groupId }\",\n forgetGroup: \"{ groupId }\",\n setGroupManage: \"{ groupId, on }\",\n deviceEnrollInvite: \"{ name }\",\n deviceEnrollConfirm: \"{ match }\",\n deviceEnrollCancel: \"\",\n deviceEnrollView: \"\",\n deviceEnrollJoin: \"{ code, name, kind?, app? }\",\n deviceEnrollReady: \"\",\n deviceEnrollFinish: \"\",\n deviceEnrollRemove: \"\",\n deviceSet: \"\",\n devicePing: \"{ key }\",\n devicePushState: \"\",\n devicePushSet: \"{ subscription }\",\n deviceHandoffVerifier: \"{ password, current? }\",\n deviceHandoffPush: \"{ key }\",\n deviceHandoffPull: \"{ password, later? }\",\n deviceHandoffAccept: \"{ later? }\",\n deviceHandoffSettle: \"\",\n deviceHandoffCancel: \"\",\n deviceHandoffView: \"\",\n deviceHandoffAllow: \"{ key }\",\n deviceTakeoverInfo: \"\",\n deviceTakeover: \"{ password, name, lost? }\",\n deviceTurnPeek: \"{ d }\",\n deviceForkDiscard: \"{ database }\",\n deviceRestoreStartOwn: \"\",\n deviceRemove: \"{ key }\",\n deviceRename: \"{ key, name }\",\n deviceNewSecret: \"\",\n deviceSecretOfferDismiss: \"\",\n deviceTurnCheck: \"\",\n deviceSetNoticeSeen: \"{ wrong? }\",\n appList: \"\",\n appBuiltIns: \"\",\n appStoreList: \"\",\n appStorePreview: \"{ url }\",\n appStoreAdd: \"{ url, key? }\",\n appStoreRemove: \"{ key }\",\n appStoreRefresh: \"{ key? }?\",\n appPreview: \"AppSource\",\n appInstall: \"{ stage?, digest, grant, asks? }\",\n appUpdateAccept: \"{ ref, sequence?, added? }\",\n appCheckUpdates: \"\",\n appUninstall: \"{ ref }\",\n appRunCheck: \"{ ref }\",\n appFetchFiles: \"{ ref }\",\n appEntry: \"{ ref, runAnyway? }\",\n appFile: \"{ ref, path, digest? }\",\n appFileAt: \"{ ref, path, digest? }\",\n appStorageGet: \"{ ref, scope, key, digest? }\",\n appStorageSet: \"{ ref, scope, key, value, digest? }\",\n appStorageDelete: \"{ ref, scope, key, digest? }\",\n appStorageKeys: \"{ ref, scope, digest? }\",\n appDataExport: \"{ ref }\",\n appDataExportText: \"{ ref }\",\n};\n\n/**\n * The engine's calls the daemon passes through as `engine.<method>` (WISP 1100 § Local control API): exactly the\n * app's `EngineApi`, plus two reads every host has. Nothing else on the engine object is reachable.\n */\nexport const ENGINE_METHODS: readonly string[] = Object.keys(ENGINE_PARAMS);\n\n/** Reads the hosts use outside `EngineApi`: the whole state, and one chat's stored messages. */\nexport const ENGINE_READS: readonly string[] = [\"getState\", \"getMessages\"];\n\n/** What the two reads take, in `ENGINE_PARAMS`' words. */\nexport const READ_PARAMS: Readonly<Record<string, string>> = { getState: \"\", getMessages: \"{ linkId }\" };\n\n/**\n * Why `params` is not what `method` takes: missing when it takes some, or a key it needs not there (a key holding\n * null is there: `setActiveLink { linkId: null }`). Undefined when it is, or when the shape names a type, which is not\n * looked into here.\n */\nexport function engineParamsProblem(method: string, params: Record<string, unknown> | undefined): string | undefined {\n const takes = ENGINE_PARAMS[method] ?? READ_PARAMS[method];\n if (!takes) return undefined;\n if (params === undefined) return takes.endsWith(\"?\") ? undefined : \"no parameters given\";\n const keys = /^\\{ ([\\w?, ]*) \\}\\??$/.exec(takes)?.[1].split(\", \") ?? [];\n const missing = keys.filter((key) => !key.endsWith(\"?\") && params[key] === undefined);\n return missing.length ? `${missing.join(\", \")} missing` : undefined;\n}\n\n/**\n * Calls that delete what this device holds, by what they delete: they go only with `--yes` (`yes: true` over the\n * socket), as `chat remove`, `group leave` and `group forget` ask for it.\n */\nexport const DESTRUCTIVE_CALLS: ReadonlyMap<string, string> = new Map([\n [\"clearProfileData\", \"deletes every chat and group on this device (the wallets stay)\"],\n [\"removeLink\", \"deletes a chat's keys and history on this device\"],\n [\"leaveGroup\", \"deletes a group's history and files on this device\"],\n [\"forgetGroup\", \"deletes a group's history on this device\"],\n [\"switchGroup\", \"leaves the group held under this id and deletes its history on this device\"],\n [\"deviceRemove\", \"takes a device off this profile\"],\n]);\n\n/**\n * Calls whose answer holds a secret (chat seeds, wallet phrases and keys, ecash, backups): the CLI prints their\n * result only with `--show-secret`.\n */\nexport const SECRET_RESULTS: ReadonlySet<string> = new Set([\n \"exportLinks\", \"takeInvite\", \"walletExport\", \"usdtReveal\",\n \"arkBackup\", \"barkBackup\", \"sparkBackup\", \"fedimintBackup\",\n \"usdtExportBackup\", \"arkExportBackup\", \"barkExportBackup\", \"sparkExportBackup\", \"fedimintExportBackup\",\n \"fedimintSpendNotes\",\n]);\n\n/**\n * Calls whose answer holds one secret among what a script needs: the CLI prints it `<hidden>` unless `--show-secret`,\n * as `wallet receive` leaves it out. A Cashu mint quote's id is not locked to a key: whoever holds it can mint the\n * ecash its invoice pays for. A group call's pass (`token`) lets whoever holds it into the call as this member until\n * it expires, and the node's TURN servers come with their passwords, as `settings get` hides them. A group's call key\n * (`groupCallKey`) opens the group's sealed call media. `a[].b` is the `b` of each entry in the list `a`.\n */\nconst SECRET_FIELDS: Readonly<Record<string, readonly string[]>> = {\n walletReceiveLightning: [\"quote\"],\n groupCallToken: [\"token\", \"iceServers[].credential\"],\n groupCallKey: [\"key\"],\n};\n\nexport function hideSecretFields(method: string, result: unknown, showSecret = false): unknown {\n const fields = SECRET_FIELDS[method];\n if (!fields || showSecret || !result || typeof result !== \"object\") return result;\n const shown = { ...(result as Record<string, unknown>) };\n for (const field of fields) {\n const [list, inner] = field.split(\"[].\");\n if (inner === undefined) { if (shown[field] !== undefined) shown[field] = \"<hidden>\"; continue; }\n const entries = shown[list];\n if (Array.isArray(entries)) shown[list] = entries.map((entry: unknown) => entry && typeof entry === \"object\" && (entry as Record<string, unknown>)[inner] !== undefined ? { ...entry, [inner]: \"<hidden>\" } : entry);\n }\n return shown;\n}\n","import { createHash } from \"node:crypto\";\nimport { chatOrGroup, groupOf, node, type ApiContext, type Params } from \"./apiKit\";\n\n/**\n * The id an agent turn names its message by (docs/CLI.md § Agent turns). A message is stored under an id its sender\n * chose most of (`peer_<the id they sent>`), so a turn carries this one instead, made here from the chat (or group) and\n * that id: `t_` and 32 hex digits, in which nobody can write a word. Every command that takes a message's id takes it.\n */\nexport function turnRef(where: string, messageId: string): string {\n return \"t_\" + createHash(\"sha256\").update(`${where}\\n${messageId}`).digest(\"hex\").slice(0, 32);\n}\n\nconst TURN_REF = /^t_[0-9a-f]{32}$/;\nconst isRef = (value: unknown): value is string => typeof value === \"string\" && TURN_REF.test(value);\n\n/** How many turns' ids, older than the newest page, a profile's daemon keeps the answer for. */\nconst REMEMBERED = 1000;\n/**\n * Per node, `<chat or group>\\n<turn's id>` → the id its message is stored under, or null for none: what reading a whole\n * history found, so the reply, reaction and pin of one old turn read it once, and a turn whose message was deleted for\n * everyone (never stored again) once at all. Oldest asked first out.\n */\nconst remembered = new WeakMap<object, Map<string, string | null>>();\n\n/**\n * `params` with each turn's id in `message`, `reply`, `messages`, `before` and `after` as the id its message is stored\n * under: looked for among the chat's (or group's) newest messages first, where a turn's almost always is, then in what an\n * earlier read of all of them found, then in all of them. One that names no message stays as given, and its command says\n * so as for any unknown id. A timestamp in `before` or `after` is no turn's id and stays as it is.\n */\nexport async function withStoredIds(ctx: ApiContext, params: Params): Promise<Params> {\n const wanted = new Set([params.message, params.reply, params.before, params.after, ...(Array.isArray(params.messages) ? params.messages : [])].filter(isRef));\n if (!wanted.size) return params;\n let target: { id: string; linkId: string; group: boolean } | null = null;\n try {\n if (typeof params.group === \"string\") { const group = groupOf(ctx, { group: params.group }); target = { id: group.id, linkId: `group:${group.id}`, group: true }; }\n else if (typeof params.chat === \"string\") target = chatOrGroup(ctx, params.chat);\n } catch { /* the command says what is wrong with its chat or group */ }\n if (!target) return params;\n const { id, linkId, group } = target;\n const found = new Map<string, string>();\n const look = (messages: readonly { id: string }[]) => {\n for (const message of messages) { const ref = turnRef(id, message.id); if (wanted.has(ref)) found.set(ref, message.id); }\n return found.size === wanted.size;\n };\n if (!look((await node(ctx).messagePage({ linkId, limit: 200 })).messages)) {\n let known = remembered.get(node(ctx));\n if (!known) remembered.set(node(ctx), known = new Map());\n const unknown = new Set<string>();\n for (const ref of wanted) {\n if (found.has(ref)) continue;\n const key = `${id}\\n${ref}`, kept = known.get(key);\n if (kept === undefined) { unknown.add(ref); continue; }\n known.delete(key);\n // Deleted since: it names none now (and its refusal names the turn's id, not the one its sender chose).\n const now = kept !== null && await node(ctx).getMessage(linkId, kept) ? kept : null;\n known.set(key, now);\n if (now !== null) found.set(ref, now);\n }\n if (unknown.size) {\n look(group ? await node(ctx).groupMessages({ groupId: id }) : await node(ctx).getMessages(linkId));\n for (const ref of unknown) {\n known.set(`${id}\\n${ref}`, found.get(ref) ?? null);\n if (known.size > REMEMBERED) known.delete(known.keys().next().value!);\n }\n }\n }\n const stored = (value: unknown) => (isRef(value) ? found.get(value) ?? value : value);\n return {\n ...params,\n ...(params.message !== undefined && { message: stored(params.message) }),\n ...(params.reply !== undefined && { reply: stored(params.reply) }),\n ...(params.before !== undefined && { before: stored(params.before) }),\n ...(params.after !== undefined && { after: stored(params.after) }),\n ...(Array.isArray(params.messages) && { messages: params.messages.map(stored) }),\n };\n}\n","import type { PairedTransport } from \"@ghostly/core\";\n\n/**\n * The words an argument takes, for the API's methods and the command table both: the command line refuses any other\n * before the profile opens (`commands/index.ts` positionals), and the socket keeps its own refusal for its callers.\n * Its own module, with no code from the package: the command table is read by every command.\n */\n\nexport const WALLET_TYPES = [\"cashu\", \"lightning\", \"arkade\", \"bark\", \"spark\", \"bitcoin\", \"fedimint\", \"usdt\"] as const;\n/** The wallets that have an address to be paid on (`wallet address`). */\nexport const ADDRESS_TYPES = [\"bitcoin\", \"arkade\", \"spark\", \"usdt\"] as const;\n/** What a payment request may name as its way of paying (`chat request --method`). */\nexport const PAY_METHODS = [\"cashu\", \"arkade\", \"usdt\", \"bark\", \"bitcoin\", \"fedimint\", \"spark\"] as const;\n/** The ways of paying a chat takes (`chat accept`). */\nexport const CHAT_METHODS = [\"cashu\", \"lightning\", ...PAY_METHODS.filter((m) => m !== \"cashu\")] as const;\n\n/** A chat's transport by the name the command line gives it (`chat transport`). */\nexport const TRANSPORT_NAMES: Record<string, PairedTransport | \"auto\" | \"dht\"> = {\n auto: \"auto\", dht: \"dht\", webrtc: \"webrtc/1\", iroh: \"iroh/1\", hyperdht: \"hyperdht/1\",\n \"webrtc/1\": \"webrtc/1\", \"iroh/1\": \"iroh/1\", \"hyperdht/1\": \"hyperdht/1\",\n};\n","import { reactionEmoji, sanitizeDisplayText, sanitizeStatusText, STATUS_AVAILABILITIES, STATUS_TEXT_MAX, type PersonStatus, type StatusAvailability } from \"@ghostly/core\";\nimport { STATUS_CARD_LIMITS } from \"@ghostly/core/statusCards\";\nimport { CliError, type ErrorCode } from \"./errors\";\n\n/**\n * This profile's status (WISP 401 § Presence and status): a text, one emoji, an availability and when it ends, said to\n * every paired contact whose app offers `status/1`: `status set|clear|show`, and the socket's `status.set|clear|get`.\n * These never say presence (active or idle): only a daemon does, and only with `settings set daemonPresence true`\n * (daemonPresence.ts); otherwise a headless profile never reads as online.\n */\n\n/** What `status set` was given, before it is checked. */\nexport interface StatusInput { text?: string; emoji?: string; availability?: string; until?: number }\n\n/**\n * The status as the engine keeps it (`personStatus`), checked first: the engine drops a field that does not hold\n * without a word (a long text cut, a word that is not one emoji left out, an end already past clearing the whole\n * status), so here each is refused instead, named by `name` (the command's option, or the socket's parameter).\n */\nexport function checkOwnStatus(input: StatusInput, name: (field: keyof StatusInput) => string, code: ErrorCode, now = Date.now()): PersonStatus {\n const fail = (field: keyof StatusInput, rule: string) => new CliError(code, `${name(field)} ${rule}`);\n const status: PersonStatus = {};\n if (input.availability !== undefined) {\n if (!(STATUS_AVAILABILITIES as readonly string[]).includes(input.availability)) throw fail(\"availability\", `takes ${STATUS_AVAILABILITIES.join(\", \")}, not ${JSON.stringify(input.availability)}`);\n status.availability = input.availability as StatusAvailability;\n }\n if (input.emoji !== undefined) {\n const emoji = reactionEmoji(input.emoji);\n if (!emoji) throw fail(\"emoji\", `takes one emoji, not ${JSON.stringify(input.emoji)}`);\n status.emoji = emoji;\n }\n // One line, as contacts see it: a line break or a run of spaces is one space; invisible characters are not counted.\n const oneLine = input.text?.replace(/\\s+/g, \" \").trim();\n if (oneLine) {\n const shown = sanitizeDisplayText(oneLine, Infinity) ?? \"\";\n const length = [...shown].length;\n if (length > STATUS_TEXT_MAX) throw fail(\"text\", `is up to ${STATUS_TEXT_MAX} characters, not ${length} characters`);\n if (!shown) throw fail(\"text\", \"needs a character that shows\");\n // The text as counted: the raw one could lose characters that fit to the engine's cut of invisible padding.\n const text = sanitizeStatusText(shown);\n if (!text) throw fail(\"text\", \"is plain text: no link or markup\");\n status.text = text;\n }\n if (!status.text && !status.emoji && !status.availability) {\n throw new CliError(code, `Nothing to set: give a ${name(\"text\")}, ${name(\"emoji\")} or ${name(\"availability\")}`);\n }\n if (input.until !== undefined) {\n if (!Number.isSafeInteger(input.until) || input.until <= now) throw fail(\"until\", \"is a time to come: a status that ended is none\");\n // As the command line's --until, so the socket cannot keep an end past the last time a Date holds.\n if (input.until > now + STATUS_CARD_LIMITS.nextRunMs) throw fail(\"until\", \"is a time within a year from now\");\n status.until = input.until;\n }\n return status;\n}\n\n/** What `status set|clear|show` answer: the status with every field (null when not set), or null when there is none. */\nexport function statusJson(status: PersonStatus | undefined): { status: { text: string | null; emoji: string | null; availability: StatusAvailability | null; until: number | null } | null } {\n return { status: status ? { text: status.text ?? null, emoji: status.emoji ?? null, availability: status.availability ?? null, until: status.until ?? null } : null };\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAa,gBAAkD;CAC7D,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,aAAa;CACb,kBAAkB;CAClB,mBAAmB;CACnB,WAAW;CACX,WAAW;CACX,SAAS;CACT,WAAW;CACX,iBAAiB;CACjB,kBAAkB;CAClB,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,mBAAmB;CACnB,aAAa;CACb,WAAW;CACX,iBAAiB;CACjB,cAAc;CACd,eAAe;CACf,iBAAiB;CACjB,oBAAoB;CACpB,sBAAsB;CACtB,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,sBAAsB;CACtB,uBAAuB;CACvB,uBAAuB;CACvB,aAAa;CACb,aAAa;CACb,mBAAmB;CACnB,oBAAoB;CACpB,cAAc;CACd,sBAAsB;CACtB,gBAAgB;CAChB,gBAAgB;CAChB,kBAAkB;CAClB,eAAe;CACf,uBAAuB;CACvB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,uBAAuB;CACvB,qBAAqB;CACrB,qBAAqB;CACrB,oBAAoB;CACpB,uBAAuB;CACvB,sBAAsB;CACtB,uBAAuB;CACvB,mBAAmB;CACnB,iBAAiB;CACjB,iBAAiB;CACjB,qBAAqB;CACrB,kBA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