@ghostlytools/cli 1.5.2 → 1.5.3
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.
- package/README.md +16 -11
- package/dist/assets/{api-CHD8_kcJ.js → api-BIg0Msax.js} +2 -2
- package/dist/assets/{api-CMohP9Pw.js → api-d2aXkbM5.js} +341 -114
- package/dist/assets/api-d2aXkbM5.js.map +1 -0
- package/dist/assets/{apiKit-CfwVtBcw.js → apiKit-Ba_t7MZO.js} +4 -4
- package/dist/assets/apiKit-Ba_t7MZO.js.map +1 -0
- package/dist/assets/{apps-733nXRBy.js → apps-B_F3gEI4.js} +1 -1
- package/dist/assets/{apps-LG-QOIxs.js → apps-CJo1MmSY.js} +17 -16
- package/dist/assets/apps-CJo1MmSY.js.map +1 -0
- package/dist/assets/{arkade-C8x3Efyj.js → arkade-DTne0O3Q.js} +12 -5
- package/dist/assets/arkade-DTne0O3Q.js.map +1 -0
- package/dist/assets/{backup-CfJenOQo.js → backup-BY88aZr5.js} +11 -8
- package/dist/assets/backup-BY88aZr5.js.map +1 -0
- package/dist/assets/{backup-nCbNWJ7-.js → backup-CqpDAZZG.js} +1 -1
- package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
- package/dist/assets/{blobFiles-1wUBd8ZD.js → blobFiles-B1lX6iGy.js} +3 -3
- package/dist/assets/{blobFiles-1wUBd8ZD.js.map → blobFiles-B1lX6iGy.js.map} +1 -1
- package/dist/assets/{buttons-BC0stvPg.js → buttons-B5EnA2nh.js} +23 -6
- package/dist/assets/buttons-B5EnA2nh.js.map +1 -0
- package/dist/assets/buttons-azvbN6xn.js +2 -0
- package/dist/assets/{daemonProof-CWTVNUmr.js → daemonProof-Dx3N_DLC.js} +19 -37
- package/dist/assets/daemonProof-Dx3N_DLC.js.map +1 -0
- package/dist/assets/{endpoint-Cl3cgAYl.js → endpoint-BdaeBw2L.js} +3 -3
- package/dist/assets/endpoint-BdaeBw2L.js.map +1 -0
- package/dist/assets/{envelope-BbvUBjc5.js → envelope-BU-BB1wR.js} +2 -2
- package/dist/assets/{envelope-BbvUBjc5.js.map → envelope-BU-BB1wR.js.map} +1 -1
- package/dist/assets/{errors-BLSPp0tK.js → errors-DI6Z3jTH.js} +26 -1
- package/dist/assets/errors-DI6Z3jTH.js.map +1 -0
- package/dist/assets/{fileBytes-gTd_8l-P.js → fileBytes-BMlLVdfg.js} +1 -1
- package/dist/assets/{fileBytes-uRqLyxa0.js → fileBytes-D0CYuRwZ.js} +2 -2
- package/dist/assets/{fileBytes-uRqLyxa0.js.map → fileBytes-D0CYuRwZ.js.map} +1 -1
- package/dist/assets/{fileBytes-B8eTZfAT.js → fileBytes-D85lBh-Q.js} +3 -3
- package/dist/assets/{fileBytes-B8eTZfAT.js.map → fileBytes-D85lBh-Q.js.map} +1 -1
- package/dist/assets/fileBytesIdb-Dn9levD1.js +2 -0
- package/dist/assets/{fileBytesIdb-BIFKtgln.js → fileBytesIdb-LAhH7kY2.js} +7 -7
- package/dist/assets/fileBytesIdb-LAhH7kY2.js.map +1 -0
- package/dist/assets/{fileBytesOpfs-ChrHcCVV.js → fileBytesOpfs-DjBBghvq.js} +3 -3
- package/dist/assets/{fileBytesOpfs-ChrHcCVV.js.map → fileBytesOpfs-DjBBghvq.js.map} +1 -1
- package/dist/assets/{ghostly_iroh_web-BsAEFIjl.js → ghostly_iroh_web-BXCsSxxo.js} +29 -29
- package/dist/assets/{ghostly_iroh_web-BsAEFIjl.js.map → ghostly_iroh_web-BXCsSxxo.js.map} +1 -1
- package/dist/assets/ghostly_iroh_web_bg.wasm +0 -0
- package/dist/assets/{groupFiles-Bmo-SkVQ.js → groupFiles-D9k6fyhf.js} +61 -17
- package/dist/assets/groupFiles-D9k6fyhf.js.map +1 -0
- package/dist/assets/{host-DxDRCRKD.js → host-DrL7FPG4.js} +125 -47
- package/dist/assets/host-DrL7FPG4.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-CZfsPfT9.js → hyperdhtRelay-C-BsT6_V.js} +2 -2
- package/dist/assets/{hyperdhtRelay-CZfsPfT9.js.map → hyperdhtRelay-C-BsT6_V.js.map} +1 -1
- package/dist/assets/{idb-BJARz3Qi.js → idb-CWvq4HKc.js} +25 -3
- package/dist/assets/{idb-BJARz3Qi.js.map → idb-CWvq4HKc.js.map} +1 -1
- package/dist/assets/{irohWeb-BUvaADop.js → irohWeb-DdHXEwgj.js} +3 -3
- package/dist/assets/{irohWeb-BUvaADop.js.map → irohWeb-DdHXEwgj.js.map} +1 -1
- package/dist/assets/{main-BIXIs84L.js → main-xeoX7yLM.js} +160 -50
- package/dist/assets/main-xeoX7yLM.js.map +1 -0
- package/dist/assets/{mainline-HQVJ5ukA.js → mainline-CEqGvRYJ.js} +46 -16
- package/dist/assets/mainline-CEqGvRYJ.js.map +1 -0
- package/dist/assets/{networkReason-CKBiFTwt.js → networkReason-RGRU5xoa.js} +3 -3
- package/dist/assets/{networkReason-CKBiFTwt.js.map → networkReason-RGRU5xoa.js.map} +1 -1
- package/dist/assets/{nwc-Dm4RSvvF.js → nwc-s5xHLqNf.js} +3 -3
- package/dist/assets/{nwc-Dm4RSvvF.js.map → nwc-s5xHLqNf.js.map} +1 -1
- package/dist/assets/{nwcProvider-yQdL-DfC.js → nwcProvider-CfAFO5Fr.js} +2 -2
- package/dist/assets/{nwcProvider-yQdL-DfC.js.map → nwcProvider-CfAFO5Fr.js.map} +1 -1
- package/dist/assets/{profiles-BehWURA9.js → profiles-gZdQPyaz.js} +74 -13
- package/dist/assets/profiles-gZdQPyaz.js.map +1 -0
- package/dist/assets/{registry-CHVZ0Jzl.js → registry-BUhSjM-J.js} +1 -1
- package/dist/assets/{registry-C9f2Ogff.js → registry-CVUdD4bJ.js} +3 -3
- package/dist/assets/{registry-C9f2Ogff.js.map → registry-CVUdD4bJ.js.map} +1 -1
- package/dist/assets/{resolve-Cqj1jjK2.js → resolve-uZECJ3f7.js} +2 -2
- package/dist/assets/{resolve-Cqj1jjK2.js.map → resolve-uZECJ3f7.js.map} +1 -1
- package/dist/assets/{restoredRows-DGuKtIBz.js → restoredRows-D6WZUA2U.js} +2 -2
- package/dist/assets/{restoredRows-DGuKtIBz.js.map → restoredRows-D6WZUA2U.js.map} +1 -1
- package/dist/assets/{server-CcAs54Yb.js → server-DOtUKoYR.js} +776 -248
- package/dist/assets/server-DOtUKoYR.js.map +1 -0
- package/dist/assets/{src-BLHey3Q1.js → src-Dd_7Ew1X.js} +459 -129
- package/dist/assets/src-Dd_7Ew1X.js.map +1 -0
- package/dist/assets/{usdt-DMKpMhdM.js → usdt-C2Anx8p7.js} +3 -3
- package/dist/assets/{usdt-DMKpMhdM.js.map → usdt-C2Anx8p7.js.map} +1 -1
- package/dist/assets/{words-DUlvkoUT.js → words-DoLU6p8H.js} +4 -4
- package/dist/assets/words-DoLU6p8H.js.map +1 -0
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-CMohP9Pw.js.map +0 -1
- package/dist/assets/apiKit-CfwVtBcw.js.map +0 -1
- package/dist/assets/apps-LG-QOIxs.js.map +0 -1
- package/dist/assets/arkade-C8x3Efyj.js.map +0 -1
- package/dist/assets/backup-CfJenOQo.js.map +0 -1
- package/dist/assets/buttons-BC0stvPg.js.map +0 -1
- package/dist/assets/buttons-BDKeKyKw.js +0 -2
- package/dist/assets/daemonProof-CWTVNUmr.js.map +0 -1
- package/dist/assets/endpoint-Cl3cgAYl.js.map +0 -1
- package/dist/assets/errors-BLSPp0tK.js.map +0 -1
- package/dist/assets/fileBytesIdb-BIFKtgln.js.map +0 -1
- package/dist/assets/fileBytesIdb-BVVr_rWX.js +0 -2
- package/dist/assets/groupFiles-Bmo-SkVQ.js.map +0 -1
- package/dist/assets/host-DxDRCRKD.js.map +0 -1
- package/dist/assets/main-BIXIs84L.js.map +0 -1
- package/dist/assets/mainline-HQVJ5ukA.js.map +0 -1
- package/dist/assets/profiles-BehWURA9.js.map +0 -1
- package/dist/assets/server-CcAs54Yb.js.map +0 -1
- package/dist/assets/src-BLHey3Q1.js.map +0 -1
- package/dist/assets/words-DUlvkoUT.js.map +0 -1
package/README.md
CHANGED
|
@@ -149,7 +149,7 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
149
149
|
| `invite join [<invite-or-link> \| -] [--label <name>]` | Join a chat (your own invite is refused). The invite comes from stdin when none is given or `-`, out of `ps` and the shell's history; on the command line the CLI warns |
|
|
150
150
|
| `lightning default <card>`, `lightning rename <card> <name>` | Lightning cards: which receives by default |
|
|
151
151
|
| `listen [--since seq] [--cursor file] [--type t]… [--turns] [--from <chat\|key>]… [--group <group>]… [--exec cmd] [--webhook url] [--print]` | The event stream; `--from` and `--group` an allowlist, `--turns` one `agent.turn` per message to answer ([Events](#events)) |
|
|
152
|
-
| `message delete <chat\|group> <message> --everyone` | Deletes a message of yours for everyone (a text, a card, a file or a voice message; never a payment): it goes from this device at once and from every member's as the message's last edit, once they are back if they are away. An app from before this shows "🗑 Message removed" in its place. Without `--everyone`, only this device forgets it |
|
|
152
|
+
| `message delete <chat\|group> <message> --everyone` | Deletes a message of yours for everyone (a text, a card, a file or a voice message; never a payment): it goes from this device at once and from every member's as the message's last edit, once they are back if they are away. An app from before this shows "🗑 Message removed" in its place. Without `--everyone`, only this device forgets it. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it) |
|
|
153
153
|
| `message retry\|delete\|details <chat> <message>` | One message |
|
|
154
154
|
| `pay <invoice\|address\|lnurl> [--amount sats] [--network n] [--max-fee sats] [--confirm-real]` | Pay over Lightning (Testnet unless `--network mainnet`) |
|
|
155
155
|
| `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
|
|
@@ -191,13 +191,15 @@ nothing, so put the options before `--` (`send bob --wait sent -- -1 today`).
|
|
|
191
191
|
|
|
192
192
|
### Voice notes
|
|
193
193
|
|
|
194
|
-
`file send <chat> <path> --voice` sends an audio file as a voice note. Its length (`--voice <ms
|
|
195
|
-
waveform bars (`--peaks 0,40,…`, 0-255) may be given; whatever is not given is measured from the file with the
|
|
194
|
+
`file send <chat> <path> --voice` sends an audio file as a voice note. Its length (`--voice <ms>`, 1 to 900000) and
|
|
195
|
+
its 64 waveform bars (`--peaks 0,40,…`, 0-255, at most 128, only with `--voice`) may be given; whatever is not given is measured from the file with the
|
|
196
196
|
app's own meter (`voicePeaksOf` in packages/core `voice.ts`: a reading every 50 ms, the loudest per bar), so the
|
|
197
197
|
bars look like the app's recordings. WAV, Opus in WebM or Ogg and MP3 are decoded in the CLI (wasm, no native code);
|
|
198
198
|
AAC in MP4/M4A and other kinds need `ffmpeg` on the PATH (`GHOSTLY_FFMPEG` names another). When the sound cannot be
|
|
199
|
-
|
|
200
|
-
without is refused (`bad_request`).
|
|
199
|
+
measured here (no `ffmpeg` for its kind), a note with a given length goes out flat with a warning on stderr (the socket
|
|
200
|
+
API answers `warning`), and one without is refused (`bad_request`). A file that is not a voice note is refused with or
|
|
201
|
+
without a length, naming why: empty, not audio (its type, or no sound a decoder finds in it), or longer than 15
|
|
202
|
+
minutes. `--voice` takes the next word only when it is a number.
|
|
201
203
|
|
|
202
204
|
### Files a bot receives
|
|
203
205
|
|
|
@@ -232,7 +234,9 @@ arrives until it is back online.
|
|
|
232
234
|
|
|
233
235
|
A daemon keeps running the code it started with. After upgrading the CLI, every command that goes through an older
|
|
234
236
|
(or newer) daemon still answers, and says on stderr `ghostly: the daemon runs <version> and this command is
|
|
235
|
-
<version>`.
|
|
237
|
+
<version>`. A daemon of a release before 1.5.0 cannot prove it is the profile's daemon (no
|
|
238
|
+
[greeting](#the-socket-api)): commands are refused after 2 s, exit `1`, until `ghostly daemon restart`. A daemon of
|
|
239
|
+
this release that is slow to answer (busy on a long task) is waited for, under each command's own deadline. `ghostly daemon restart` stops the running daemon (if one runs) and starts this release's in the
|
|
236
240
|
background, as `daemon --detach` does. A daemon kept by a service manager (systemd, launchd) is restarted with the
|
|
237
241
|
service manager instead.
|
|
238
242
|
|
|
@@ -368,8 +372,8 @@ side that invited answers once.
|
|
|
368
372
|
|
|
369
373
|
## The socket API
|
|
370
374
|
|
|
371
|
-
The daemon listens on a Unix socket in the profile's folder (`daemon.sock`, 0600; in
|
|
372
|
-
folder of the user's alone, when the folder's path is too long for a socket). `ghostly daemon status` names it, as
|
|
375
|
+
The daemon listens on a Unix socket in the profile's folder (`daemon.sock`, 0600; in `ghostly-<hash>/` in
|
|
376
|
+
`$XDG_RUNTIME_DIR`, else `/tmp/ghostly-<uid>-<hash>/`, a folder of the user's alone, when the folder's path is too long for a socket). `ghostly daemon status` names it, as
|
|
373
377
|
`socket`, whether the daemon runs or not. One JSON object per line each way:
|
|
374
378
|
|
|
375
379
|
```json
|
|
@@ -414,8 +418,8 @@ ghostly listen --type call. # call.incoming … call.connected {"
|
|
|
414
418
|
node examples/call-echo.mjs greeting.wav # a program that answers, greets, then echoes after 1 s
|
|
415
419
|
```
|
|
416
420
|
|
|
417
|
-
**The audio.** The socket is `<profile>/calls/<call>.sock` (0600), or
|
|
418
|
-
folder of yours alone, 0700) when that path is too long; `call start`, `call answer`, `call list` and the
|
|
421
|
+
**The audio.** The socket is `<profile>/calls/<call>.sock` (0600), or `ghostly-calls-<hash>/<call>.sock` in
|
|
422
|
+
`$XDG_RUNTIME_DIR`, else in `/tmp/ghostly-calls-<uid>-<hash>/` (a folder of yours alone, 0700), when that path is too long; `call start`, `call answer`, `call list` and the
|
|
419
423
|
`call.connected` event name it. It carries raw PCM,
|
|
420
424
|
with no framing:
|
|
421
425
|
|
|
@@ -484,7 +488,8 @@ directly (every packet to both; reads from the DHT when every relay fails). Test
|
|
|
484
488
|
'["http://…"]'` the Pkarr relays, `settings set irohRelays '["https://…"]'` the Iroh relays. `GHOSTLY_WEBRTC=0`
|
|
485
489
|
turns WebRTC off, and `GHOSTLY_STUN=0` leaves the apps' public STUN servers out of it (the profile's own `iceServers`
|
|
486
490
|
stay). A daemon offers to be a hub of the private groups past 16 members it is in, since it stays online;
|
|
487
|
-
`GHOSTLY_HUB=0` keeps it a plain member (the admin can still pin it).
|
|
491
|
+
`GHOSTLY_HUB=0` keeps it a plain member (the admin can still pin it). These four switches take `0`/`false`/`off`/`no`
|
|
492
|
+
(or `1`/`true`/`on`/`yes`), in any case; any other value stops the command with a usage error naming the variable.
|
|
488
493
|
|
|
489
494
|
### Private networks
|
|
490
495
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as findChat, s as findGroup } from "./apiKit-
|
|
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-
|
|
1
|
+
import { a as findChat, s as findGroup } from "./apiKit-Ba_t7MZO.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-d2aXkbM5.js";
|
|
3
3
|
export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings };
|