@ghostlytools/cli 1.11.3 → 1.12.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.
- package/README.md +52 -30
- package/SKILL.md +4 -2
- package/dist/assets/{api-DBlaoz8i.js → api-DLzCtePC.js} +533 -195
- package/dist/assets/api-DLzCtePC.js.map +1 -0
- package/dist/assets/{api-DgU4MZPD.js → api-DYMKyb1k.js} +2 -2
- package/dist/assets/{apiKit-DesObIDf.js → apiKit-CVaEzKWQ.js} +104 -21
- package/dist/assets/apiKit-CVaEzKWQ.js.map +1 -0
- package/dist/assets/appFetch-D56GsYuq.js +602 -0
- package/dist/assets/appFetch-D56GsYuq.js.map +1 -0
- package/dist/assets/apps-BPFW19Wc.js +1 -0
- package/dist/assets/{apps-DkMjDHML.js → apps-XnZ8VEuj.js} +66 -38
- package/dist/assets/apps-XnZ8VEuj.js.map +1 -0
- package/dist/assets/{argon2id-088uQfnH.js → argon2id-B9wFdSj6.js} +2 -3
- package/dist/assets/{argon2id-088uQfnH.js.map → argon2id-B9wFdSj6.js.map} +1 -1
- package/dist/assets/{arkade-CarKONmH.js → arkade-DryM-q5n.js} +6 -7
- package/dist/assets/arkade-DryM-q5n.js.map +1 -0
- package/dist/assets/backup-COX6j1_W.js +1 -0
- package/dist/assets/{backup-C0OJCJlM.js → backup-DpyvT9Z6.js} +108 -50
- package/dist/assets/backup-DpyvT9Z6.js.map +1 -0
- package/dist/assets/bark_ffi_wasm_bg-CcafsJla.js +5 -0
- package/dist/assets/{bark_ffi_wasm_bg-EY2uc0Bx.js.map → bark_ffi_wasm_bg-CcafsJla.js.map} +1 -1
- package/dist/assets/{bark_ffi_wasm_bg-Bxru_BVW.wasm → bark_ffi_wasm_bg-VNmaJsc9.wasm} +0 -0
- package/dist/assets/{bitcoind-CdSmvy2y.js → bitcoind-DTsrd7TF.js} +4 -5
- package/dist/assets/{bitcoind-CdSmvy2y.js.map → bitcoind-DTsrd7TF.js.map} +1 -1
- package/dist/assets/bitcoindevkit_bg-BWQHx7vd.js +5 -0
- package/dist/assets/{bitcoindevkit_bg-B-iLWrmX.js.map → bitcoindevkit_bg-BWQHx7vd.js.map} +1 -1
- package/dist/assets/bitcoindevkit_bg-DXil67yS.wasm +0 -0
- package/dist/assets/{blobFiles-BmsrvZc3.js → blobFiles-DDs34n0r.js} +4 -5
- package/dist/assets/{blobFiles-BmsrvZc3.js.map → blobFiles-DDs34n0r.js.map} +1 -1
- package/dist/assets/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/dist/assets/buttons-Bq7pTXqF.js +1 -0
- package/dist/assets/{buttons-fZTEa_2i.js → buttons-BvWqHJeh.js} +46 -23
- package/dist/assets/buttons-BvWqHJeh.js.map +1 -0
- package/dist/assets/bytes-C1DNGY18.js +132 -0
- package/dist/assets/bytes-C1DNGY18.js.map +1 -0
- package/dist/assets/{childEnv-K_IzUqQx.js → childEnv-C-99hdbL.js} +2 -3
- package/dist/assets/{childEnv-K_IzUqQx.js.map → childEnv-C-99hdbL.js.map} +1 -1
- package/dist/assets/{client-Ibk3-e60.js → client-kGZ3ZdUW.js} +30 -13
- package/dist/assets/client-kGZ3ZdUW.js.map +1 -0
- package/dist/assets/{codec-DMpQqVSt.js → codec-B2rH1mfx.js} +2 -4
- package/dist/assets/{codec-DMpQqVSt.js.map → codec-B2rH1mfx.js.map} +1 -1
- package/dist/assets/domainProofs-BDNP1dIy.js +280 -0
- package/dist/assets/domainProofs-BDNP1dIy.js.map +1 -0
- package/dist/assets/{endpoint-DarqblYE.js → endpoint-B0vE5ojY.js} +421 -420
- package/dist/assets/endpoint-B0vE5ojY.js.map +1 -0
- package/dist/assets/engineErrors--9hfgKlK.js +150 -0
- package/dist/assets/engineErrors--9hfgKlK.js.map +1 -0
- package/dist/assets/{envelope-CvQVCGdf.js → envelope-Bi2kMqbp.js} +3 -4
- package/dist/assets/{envelope-CvQVCGdf.js.map → envelope-Bi2kMqbp.js.map} +1 -1
- package/dist/assets/{errors-Dt-ZnyOX.js → errors-DDLFO4Gf.js} +31 -5
- package/dist/assets/errors-DDLFO4Gf.js.map +1 -0
- package/dist/assets/{fedimintSdk-zV_5Qdqz.js → fedimintSdk-D-6H9Pe7.js} +4 -5
- package/dist/assets/{fedimintSdk-zV_5Qdqz.js.map → fedimintSdk-D-6H9Pe7.js.map} +1 -1
- package/dist/assets/fedimint_client_wasm_bg-Cr5xGD-w.js +5 -0
- package/dist/assets/{fedimint_client_wasm_bg-BtHHlFpp.js.map → fedimint_client_wasm_bg-Cr5xGD-w.js.map} +1 -1
- package/dist/assets/fileBytes-CCKbwqG_.js +1 -0
- package/dist/assets/{fileBytes-BLPZq9YU.js → fileBytes-CfvUXdSy.js} +5 -7
- package/dist/assets/fileBytes-CfvUXdSy.js.map +1 -0
- package/dist/assets/{fileBytes-B0z9A6Le.js → fileBytes-tj6-VZcB.js} +3 -4
- package/dist/assets/{fileBytes-B0z9A6Le.js.map → fileBytes-tj6-VZcB.js.map} +1 -1
- package/dist/assets/fileBytesIdb-B0zzJ6p7.js +1 -0
- package/dist/assets/{fileBytesIdb-Bmlrl9EO.js → fileBytesIdb-BJirUAjI.js} +4 -5
- package/dist/assets/{fileBytesIdb-Bmlrl9EO.js.map → fileBytesIdb-BJirUAjI.js.map} +1 -1
- package/dist/assets/{fileBytesOpfs-DBS0kbPT.js → fileBytesOpfs-DRUYLER4.js} +4 -5
- package/dist/assets/{fileBytesOpfs-DBS0kbPT.js.map → fileBytesOpfs-DRUYLER4.js.map} +1 -1
- package/dist/assets/{fixedHosts-6gKn8dp2.js → fixedHosts-CPSsGOI2.js} +4 -5
- package/dist/assets/{fixedHosts-6gKn8dp2.js.map → fixedHosts-CPSsGOI2.js.map} +1 -1
- package/dist/assets/{ghostly_iroh_web-BzAXJUYH.js → ghostly_iroh_web-DIj5xGmR.js} +2 -3
- package/dist/assets/{ghostly_iroh_web-BzAXJUYH.js.map → ghostly_iroh_web-DIj5xGmR.js.map} +1 -1
- package/dist/assets/{src-DjVj2ynY.js → groupMeta-DTQAJG50.js} +4879 -23799
- package/dist/assets/groupMeta-DTQAJG50.js.map +1 -0
- package/dist/assets/{host-CYlIiY3r.js → host-z0FAHP9Z.js} +750 -245
- package/dist/assets/host-z0FAHP9Z.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-CdsLcAhY.js → hyperdhtRelay-CvsAfQRQ.js} +5 -6
- package/dist/assets/hyperdhtRelay-CvsAfQRQ.js.map +1 -0
- package/dist/assets/hyperdhtRelay-bjNGacf5.js +32 -0
- package/dist/assets/hyperdhtRelay-bjNGacf5.js.map +1 -0
- package/dist/assets/{idb-CEuoNsTv.js → idb-ewvbqyDI.js} +2 -3
- package/dist/assets/{idb-CEuoNsTv.js.map → idb-ewvbqyDI.js.map} +1 -1
- package/dist/assets/identityProofs-Cksc_K7_.js +940 -0
- package/dist/assets/identityProofs-Cksc_K7_.js.map +1 -0
- package/dist/assets/{irohWeb-D2IuloLL.js → irohWeb-CLBx5MIv.js} +3061 -86
- package/dist/assets/irohWeb-CLBx5MIv.js.map +1 -0
- package/dist/assets/joinTrace-CBr1jbch.js +1 -0
- package/dist/assets/{joinTrace-CjRDFy85.js → joinTrace-xKBe73j9.js} +2 -3
- package/dist/assets/{joinTrace-CjRDFy85.js.map → joinTrace-xKBe73j9.js.map} +1 -1
- package/dist/assets/{legacy_ciphers-JJOu0JXL.js → legacy_ciphers-BnYATjxo.js} +2 -3
- package/dist/assets/{legacy_ciphers-JJOu0JXL.js.map → legacy_ciphers-BnYATjxo.js.map} +1 -1
- package/dist/assets/linkPreview-DdMf-YAc.js +252 -0
- package/dist/assets/linkPreview-DdMf-YAc.js.map +1 -0
- package/dist/assets/{main-C0PfjKTe.js → main-CVqkvuIo.js} +536 -173
- package/dist/assets/main-CVqkvuIo.js.map +1 -0
- package/dist/assets/{mainline-Cu61qcPS.js → mainline-CVrd0C1n.js} +72 -18
- package/dist/assets/mainline-CVrd0C1n.js.map +1 -0
- package/dist/assets/mints-BcBODVVW.js +1 -0
- package/dist/assets/{mints-j5XAOk4f.js → mints-CMDLbMeH.js} +8 -6
- package/dist/assets/mints-CMDLbMeH.js.map +1 -0
- package/dist/assets/{nacl-fast-CDhNCYHs.js → nacl-fast-B1ThWvuM.js} +2 -3
- package/dist/assets/{nacl-fast-CDhNCYHs.js.map → nacl-fast-B1ThWvuM.js.map} +1 -1
- package/dist/assets/{networkReason-Dt7Yx_n4.js → networkReason-Be-hMghr.js} +10 -14
- package/dist/assets/{networkReason-Dt7Yx_n4.js.map → networkReason-Be-hMghr.js.map} +1 -1
- package/dist/assets/{noble_curves-DDWn5AH0.js → noble_curves-DqpNlhAU.js} +3 -4
- package/dist/assets/{noble_curves-DDWn5AH0.js.map → noble_curves-DqpNlhAU.js.map} +1 -1
- package/dist/assets/{noble_hashes-B7AZyFyS.js → noble_hashes-LFe1N2xt.js} +3 -4
- package/dist/assets/{noble_hashes-B7AZyFyS.js.map → noble_hashes-LFe1N2xt.js.map} +1 -1
- package/dist/assets/{nwc-CtZypDcv.js → nwc-DKE2FXr6.js} +5 -6
- package/dist/assets/{nwc-CtZypDcv.js.map → nwc-DKE2FXr6.js.map} +1 -1
- package/dist/assets/nwcProvider-pL2XqSbW.js +208 -0
- package/dist/assets/nwcProvider-pL2XqSbW.js.map +1 -0
- package/dist/assets/{openpgp-BBFr-zHQ.js → openpgp-LkR_Zof0.js} +14 -15
- package/dist/assets/{openpgp-BBFr-zHQ.js.map → openpgp-LkR_Zof0.js.map} +1 -1
- package/dist/assets/ownDid-DY3rYqDI.js +862 -0
- package/dist/assets/ownDid-DY3rYqDI.js.map +1 -0
- package/dist/assets/{ownStatus-D4HC6tNR.js → ownStatus-DMEhrpkd.js} +81 -19
- package/dist/assets/ownStatus-DMEhrpkd.js.map +1 -0
- package/dist/assets/pairedTransports-BKmvlKz1.js +581 -0
- package/dist/assets/pairedTransports-BKmvlKz1.js.map +1 -0
- package/dist/assets/paymentIntent-DySU3Ajm.js +349 -0
- package/dist/assets/paymentIntent-DySU3Ajm.js.map +1 -0
- package/dist/assets/pkarr-BQo4PcCg.js +367 -0
- package/dist/assets/pkarr-BQo4PcCg.js.map +1 -0
- package/dist/assets/{profiles-Ccdq6Xf6.js → profiles-BFSGqDFC.js} +30 -16
- package/dist/assets/profiles-BFSGqDFC.js.map +1 -0
- package/dist/assets/registry-B15Yg_1C.js +1 -0
- package/dist/assets/{registry-LvxsLJ5S.js → registry-rXgaZeNn.js} +1273 -58
- package/dist/assets/registry-rXgaZeNn.js.map +1 -0
- package/dist/assets/relay-Cjfmdec0.js +2219 -0
- package/dist/assets/relay-Cjfmdec0.js.map +1 -0
- package/dist/assets/resolve-CIc3KZMV.js +970 -0
- package/dist/assets/resolve-CIc3KZMV.js.map +1 -0
- package/dist/assets/{restoredRows-C3LcxmOw.js → restoredRows-D_WSHE7H.js} +3 -4
- package/dist/assets/{restoredRows-C3LcxmOw.js.map → restoredRows-D_WSHE7H.js.map} +1 -1
- package/dist/assets/{secretGuard-B7Hj0Kvz.js → secretGuard-B4-LlMjv.js} +75 -16
- package/dist/assets/{secretGuard-B7Hj0Kvz.js.map → secretGuard-B4-LlMjv.js.map} +1 -1
- package/dist/assets/secretGuard-BmmnEbYf.js +1 -0
- package/dist/assets/{server-Q3VcNqGt.js → server-CQR7NLCz.js} +10200 -625
- package/dist/assets/server-CQR7NLCz.js.map +1 -0
- package/dist/assets/{sha512-BYId-G-T.js → sha512-DST9fbWH.js} +2 -3
- package/dist/assets/{sha512-BYId-G-T.js.map → sha512-DST9fbWH.js.map} +1 -1
- package/dist/assets/sshForges-BnvwmNj-.js +539 -0
- package/dist/assets/sshForges-BnvwmNj-.js.map +1 -0
- package/dist/assets/{storage-Bya5b2Xt.js → storage-BpjdxvO2.js} +243 -34
- package/dist/assets/storage-BpjdxvO2.js.map +1 -0
- package/dist/assets/text-li76pThX.js +106 -0
- package/dist/assets/text-li76pThX.js.map +1 -0
- package/dist/assets/{translate-iQZq4TnY.js → translate-BcbSWkuq.js} +21 -26
- package/dist/assets/{translate-iQZq4TnY.js.map → translate-BcbSWkuq.js.map} +1 -1
- package/dist/assets/{tree-store-N362nuzZ.js → tree-store-CAchkO_l.js} +22 -6
- package/dist/assets/tree-store-CAchkO_l.js.map +1 -0
- package/dist/assets/{types-Clyb52K2.js → types-CdWwgvyt.js} +2 -3
- package/dist/assets/{types-Clyb52K2.js.map → types-CdWwgvyt.js.map} +1 -1
- package/dist/assets/{unbzip2-stream-B1C-JX9L.js → unbzip2-stream-BtkYGpC5.js} +2 -3
- package/dist/assets/{unbzip2-stream-B1C-JX9L.js.map → unbzip2-stream-BtkYGpC5.js.map} +1 -1
- package/dist/assets/{usdt-DnyTGdTX.js → usdt-CBJ4Q5Ji.js} +7 -7
- package/dist/assets/usdt-CBJ4Q5Ji.js.map +1 -0
- package/dist/assets/{waitNotice-Cn0WJ-He.js → waitNotice-BGM0QOS2.js} +27 -4
- package/dist/assets/waitNotice-BGM0QOS2.js.map +1 -0
- package/dist/assets/{web-DwgdhfcY.js → web-68CYFCl9.js} +314 -91
- package/dist/assets/web-68CYFCl9.js.map +1 -0
- package/dist/ghostly.mjs +3 -5
- package/dist/ghostly.mjs.map +1 -1
- package/npm-shrinkwrap.json +225 -200
- package/package.json +16 -16
- package/dist/assets/api-DBlaoz8i.js.map +0 -1
- package/dist/assets/apiKit-DesObIDf.js.map +0 -1
- package/dist/assets/appFetch-C8yZIq1e.js +0 -194
- package/dist/assets/appFetch-C8yZIq1e.js.map +0 -1
- package/dist/assets/apps-DkMjDHML.js.map +0 -1
- package/dist/assets/apps-rzxsjfBV.js +0 -2
- package/dist/assets/arkade-CarKONmH.js.map +0 -1
- package/dist/assets/backup-C0OJCJlM.js.map +0 -1
- package/dist/assets/backup-CgWU7x0T.js +0 -2
- package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js +0 -6
- package/dist/assets/bitcoindProvider-BvoRh0D5.js +0 -97
- package/dist/assets/bitcoindProvider-BvoRh0D5.js.map +0 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js +0 -6
- package/dist/assets/bitcoindevkit_bg-CRkZTSbO.wasm +0 -0
- package/dist/assets/buttons-Cco0Agfa.js +0 -2
- package/dist/assets/buttons-fZTEa_2i.js.map +0 -1
- package/dist/assets/client-Ibk3-e60.js.map +0 -1
- package/dist/assets/endpoint-DarqblYE.js.map +0 -1
- package/dist/assets/errors-Dt-ZnyOX.js.map +0 -1
- package/dist/assets/fedimint_client_wasm_bg-BtHHlFpp.js +0 -6
- package/dist/assets/fileBytes-BLPZq9YU.js.map +0 -1
- package/dist/assets/fileBytes-BtIyoDF2.js +0 -2
- package/dist/assets/fileBytesIdb-D8mAK4pF.js +0 -2
- package/dist/assets/host-CYlIiY3r.js.map +0 -1
- package/dist/assets/hyperdhtRelay-1wzya_0L.js +0 -25
- package/dist/assets/hyperdhtRelay-1wzya_0L.js.map +0 -1
- package/dist/assets/hyperdhtRelay-CdsLcAhY.js.map +0 -1
- package/dist/assets/irohWeb-D2IuloLL.js.map +0 -1
- package/dist/assets/joinTrace-D-fnt2p3.js +0 -2
- package/dist/assets/jsonOut-POtMBS_V.js +0 -16
- package/dist/assets/jsonOut-POtMBS_V.js.map +0 -1
- package/dist/assets/main-C0PfjKTe.js.map +0 -1
- package/dist/assets/mainline-Cu61qcPS.js.map +0 -1
- package/dist/assets/mints-BaOmx517.js +0 -2
- package/dist/assets/mints-j5XAOk4f.js.map +0 -1
- package/dist/assets/nwcProvider-DYHkd0iu.js +0 -88
- package/dist/assets/nwcProvider-DYHkd0iu.js.map +0 -1
- package/dist/assets/ownDid-CJ0ta8CL.js +0 -282
- package/dist/assets/ownDid-CJ0ta8CL.js.map +0 -1
- package/dist/assets/ownStatus-D4HC6tNR.js.map +0 -1
- package/dist/assets/profiles-Ccdq6Xf6.js.map +0 -1
- package/dist/assets/registry-CE0PpQAE.js +0 -2
- package/dist/assets/registry-LvxsLJ5S.js.map +0 -1
- package/dist/assets/resolve-6kVu2DE5.js +0 -400
- package/dist/assets/resolve-6kVu2DE5.js.map +0 -1
- package/dist/assets/secretGuard-DUr6bgKc.js +0 -2
- package/dist/assets/server-Q3VcNqGt.js.map +0 -1
- package/dist/assets/src-DjVj2ynY.js.map +0 -1
- package/dist/assets/sshForges-DeZ9cN9Q.js +0 -261
- package/dist/assets/sshForges-DeZ9cN9Q.js.map +0 -1
- package/dist/assets/storage-Bya5b2Xt.js.map +0 -1
- package/dist/assets/tree-store-N362nuzZ.js.map +0 -1
- package/dist/assets/usdt-DnyTGdTX.js.map +0 -1
- package/dist/assets/waitNotice-Cn0WJ-He.js.map +0 -1
- package/dist/assets/web-DwgdhfcY.js.map +0 -1
package/README.md
CHANGED
|
@@ -62,8 +62,9 @@ ghostly listen --type message.received --cursor "${GHOSTLY_HOME:-$HOME/.ghostly}
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
The cursor file keeps the last event handled, so a restarted bot goes on where it stopped; it sits in the Ghostly
|
|
65
|
-
folder in use. With another folder
|
|
66
|
-
|
|
65
|
+
folder in use. With another folder, set `GHOSTLY_HOME` rather than `--home`: the cursor's path above reads it. The
|
|
66
|
+
hook's own `ghostly send` runs on the folder and profile `listen` runs on, given as a flag or in the environment
|
|
67
|
+
(`listen` sets `GHOSTLY_HOME` and `GHOSTLY_PROFILE` for it). The example script takes
|
|
67
68
|
`ECHO_CURSOR` for the cursor's path (default `echo.cursor` in `GHOSTLY_HOME`, else `~/.ghostly`); give each bot and
|
|
68
69
|
profile its own.
|
|
69
70
|
|
|
@@ -95,7 +96,8 @@ Bots should run the daemon: a one-shot is offline between commands.
|
|
|
95
96
|
|
|
96
97
|
## Commands
|
|
97
98
|
|
|
98
|
-
Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}`
|
|
99
|
+
Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}` (on stderr for `call pipe`,
|
|
100
|
+
whose stdout is the call's audio) and exits with:
|
|
99
101
|
`1` failed (the engine or the network refused), `2` usage, `3` not found, `4` timed out, `5` needs a confirmation
|
|
100
102
|
(`--force`, `--yes`, `--confirm-real`), `130` stopped with Ctrl-C (`interrupted`: a one-shot closes its profile first,
|
|
101
103
|
and a line on stderr says what became of what it waited on). A daemon that does not answer a read or `daemon status` within 15 seconds, or
|
|
@@ -114,12 +116,12 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
114
116
|
|---|---|
|
|
115
117
|
| `app init <dir> [--name <name>] [--title <title>] [--force]` | Start an app (WISP 1200, Apps), run here with no profile or daemon: a small working one in `<dir>` (made when missing), which `app publish <dir>` signs as it is. It writes `ghostly-app.json` (`view: chat`, the `chat` permission), an `index.html` that says hello to the same app on the contact's side, typed against `@ghostlytools/sdk/app`, and a `README.md` with build, publish, verify and how to list it in a store. The name is `--name` (a lowercase letter, then up to 31 lowercase letters, digits or hyphens), else the folder's (`My App` gives `my-app`); the title is `--title` (one line, up to 40 characters), else the name's. When one of the three files is there nothing is written and it is `refused` (`details.reason` `exists`, `details.files`), unless `--force`, which replaces those three only. Answers `{dir, name, title, files, replaced?, next}` |
|
|
116
118
|
| `app open <chat> <ref\|name> [--no-card]`, `app close <chat> <ref\|name>` | A served app in a chat, as a bot (WISP 1200, Apps; needs the daemon, and `app serve` first). `app open` says the app is open on this side, in the version served, and sends the contact the app's card ("opened Chess", with what their app needs to get the same app and check it), unless their app is open in that chat already or `--no-card`. The two sides talk once both opened it; while the app stays open here, the engine says so again on every session that comes back. It answers `{chat, app, version, card, peer, live}`: `card` is the card's message id or null, `peer` the version the contact has open or null. A card that cannot go leaves nothing open. `app close` ends it: `{chat, app, closed}`. What is open is kept in memory: a restarted daemon opens again. `unavailable` in a one-shot, or on a daemon that started before the first app was served (`daemon restart`); `not_found` for an app not served; `refused`, in the engine's words, for a chat that is not a paired 1:1 chat |
|
|
117
|
-
| `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
|
|
118
|
-
| `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence
|
|
119
|
+
| `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` or the one beside `--out` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
|
|
120
|
+
| `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence asks for `--force` (`confirm`, exit 5; versions published from elsewhere), and `app publish` refuses a sequence that list already stops, naming the `--sequence` that clears it. The statement names the app of `<dir>/app.ghostlyapp` (or `--bundle`), is signed with that app's publisher key (any other key is refused, and none is made here), and is added to the `ghostly-revoke.json` beside that bundle, where `app verify`, `app serve` and a client read it and stop those versions (publish it beside the bundle). Answers `{app, digests \| upTo, current, added, revocations, file}`; `current` says whether that bundle is among them, `file` the list written |
|
|
119
121
|
| `app send <chat> <ref\|name> <json\|->` | One message of a served app's own protocol to the same app on the contact's side (WISP 1200, Apps; needs the daemon): any JSON value, on the command line or `-` for stdin, at most 32 KiB, at most 48 a second. It goes on the live session only, while both sides have the app open, and is never kept for later: `{chat, app, sent: true}`, or an error whose `details.reason` is the WISP's name for why it did not go: `not-open` (`refused`: `app open` first), `too-large` (`bad_request`), `offline` and `peer-closed` (`unavailable`: the chat is not live, or the contact's app is not open; wait for `app.opened`), `too-fast` (`refused`). The contact's messages come as `app.message` events |
|
|
120
|
-
| `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle
|
|
122
|
+
| `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle, on raw.githubusercontent.com or cdn.jsdelivr.net at a full commit: `--url` (any other link is `bad_request`), else the first of the URL served from and the manifest's sources that a contact's app reads from, and none when there is no such link. The list is kept in the profile's folder (`apps.json`), and a `profile backup` carries it to the restored copy. A profile's engine offers `apps/1` to contacts only while it serves an app, and reads the list when it starts: `offered` says whether it does now, and `restart: true` that `daemon restart` is needed for it. `app served` answers `{apps, offered, restart?}`; `app unserve` removes one by its reference or its name, and on a daemon closes it in every chat it was open in (the contact hears `close`) |
|
|
121
123
|
| `button press <chat\|group> <message> <button> [--wait none\|sent\|delivered] [--timeout s]` | Press a button of someone else's question, as a tap in the app does (WISP 406 · Message Buttons): the reply carries the button's label, and the asker hears `button.pressed`. `<message>` is the question's id (its event or `chat history`), `<button>` a button's id from its `card`. Refused (exit 1) like a tap: closed buttons, a second answer past `--once`, a second press within a second. A one-shot in a chat waits until it went out, as `send`. Answers `{chat \| group, messageId, button, label, replyId, delivery \| edges}` |
|
|
122
|
-
| `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
|
|
124
|
+
| `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if blank, or if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
|
|
123
125
|
| `call auto [on\|off] [--from <chat>]… [--rate n]` | Answer calls by themselves, from anyone or the chats named (kept in the profile) |
|
|
124
126
|
| `call hangup [<chat\|call>]`, `call list`, `call flush [<chat\|call>]` | Hang up (or decline); calls on now; drop the audio queued and not played yet |
|
|
125
127
|
| `call pipe [<chat\|call>]` | A call's audio on stdin and stdout, for shell pipelines (sox, ffmpeg) |
|
|
@@ -129,8 +131,8 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
129
131
|
| `chat history <chat> [--limit n] [--before x] [--after x] [--translate lang]` | Messages, oldest first; `x` is a message id or a time in ms ([Translation](#translation)) |
|
|
130
132
|
| `chat list [--show-secret]`, `chat show <chat> [--show-secret]` | Chats, and one chat's connection: transports, last attempt, comparison code. `pairing` is connecting, negotiating, confirm, waiting, ready or error, and `connectionError` says why it failed (null when nothing did). A pending chat's `invite` prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the chat's first message, as every time not reached yet is |
|
|
131
133
|
| `chat pay <chat> <sats> [--memo t] [--network n] [--confirm-real]` | Ecash to a contact. A contact that offers no way of paying is `refused`: `details.reason` `contact_no_wallet` (it has no wallet yet) or `contact_payments_off` (it has payments off in this chat, or an older app). With no Cashu wallet of the network on this side, `refused` with `details.reason` `no_wallet` and the `wallet create` command to run; with one too short of sats, `refused`. It names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
132
|
-
| `chat rename <chat>
|
|
133
|
-
| `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. Refused as `chat pay` is when the contact offers no way of paying, or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
134
|
+
| `chat rename <chat> [name...]`, `chat remove <chat> --yes [--force]` | Name it here (up to 48 characters, counted as stored: a tab or a line break is a space and invisible characters go, so a name with nothing that shows is refused; counted in code points, so a joined emoji counts as several, and a name too long is refused with its count in `details.length` and `details.max`; no name, or an empty one, gives back the contact's own); delete it (keys and history) here, closing the contact's services opened from it (`service open`), refused (`busy`) while a call is on in it: hang the call up first; refused (`confirm`, the messages in `details.messages`) while a message you deleted for everyone has not reached the contact yet, as removing the chat would leave it on their device: `--force` removes it anyway |
|
|
135
|
+
| `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. With `--method usdt` the amount is in USDT, as the app reads it (`5` is 5 USDT, `0.25` a quarter; on the socket API, `amount` as text: a number there is base units). The answer says the amount asked: `amount` and `unit`, and for USDT `decimals` (base units make one USDT), with the few base units the app adds so the payment can be told apart (5.000417 USDT); `payment list` carries `decimals` for USDT too. Refused as `chat pay` is when the contact offers no way of paying (`contact_no_wallet` too when it has no wallet of the `--method` or network asked, with the `wallet create` command it needs), or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
134
136
|
| `chat transport <chat> <auto\|dht\|webrtc\|iroh\|hyperdht>` | What carries the chat |
|
|
135
137
|
| `chat verify <chat> --code <code>` | Mark the contact verified after comparing the codes out of band |
|
|
136
138
|
| `chat wait <chat> [--until live\|text\|paired] [--timeout s]` | Wait for a chat to go live, carry text, or see its contact. Live means a session that exists now, in this run of the daemon: a chat that was live before a restart counts once its contact answers again. Paired answers at once for a chat that paired before, whether its contact is online or not |
|
|
@@ -138,20 +140,21 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
138
140
|
| `edit <chat> <message> [text… \| --text <text> \| --stdin] [--force] [--wait none\|confirmed] [--timeout s]` | Replace the text of a message you sent (1:1 chats, `group edit` for a group; `<message>` is the `messageId` `send` gave, or its wire id). The contact sees it in place, marked edited; `--wait confirmed` waits for its app to confirm (the default without a daemon). At most 100 edits a message, no time limit; an older contact app gets it once it shows edits |
|
|
139
141
|
| `engine <method> [json \| -] [--confirm-real] [--show-secret] [--yes] [--force]`, `engine --list [--verbose]` | Any call of the app's engine; `--verbose` lists what each takes (`{ linkId, label }`, `?` for an optional key). A call given less than it takes is refused as `bad_request`. One that deletes chats or groups (`clearProfileData`, `removeLink`, `leaveGroup`, `forgetGroup`, `deviceRemove`) needs `--yes`; `clearProfileData` answers what it removed and stops a daemon. `removeLink`, and `setChatTransport` or `setDeliveryMode` to `dht`, are refused (`busy`) while a call is on in the chat, as `chat remove` and `chat transport dht` are; `removeLink` while a delete for everyone has not reached the contact, as `chat remove` is, and `clearProfileData` while one has not in any chat, until `--force`; `clearProfileData` while a call is on in any chat. One that sends a text that looks like a secret (`sendMessage`, `sendGroupMessage`, `editMessage`, `forwardMessages`, a payment's memo or comment, a file's name, a group's name in `createGroup` or `renameGroup`, the nick in `updateSettings`) needs `--force` |
|
|
140
142
|
| `events [--since seq] [--translate lang]` | What the event journal holds, without following ([Translation](#translation)) |
|
|
141
|
-
| `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out. One the contact paused (`pausedBy: "peer"`) goes on only when they resume it: `file resume`, `file request` and `file resend` of it are `refused` |
|
|
143
|
+
| `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out. One the contact paused (`pausedBy: "peer"`) goes on only when they resume it: `file resume`, `file request` and `file resend` of it are `refused`, as are `file pause`, `file resume` and `file request` of one offered here that waits for `file accept` |
|
|
142
144
|
| `file resend [<chat>] <file>`, `file request [<chat>] <file>` | A file that stopped moving: sent again from here, or asked for again from the contact (a group's file: from whoever holds it); either goes on from the bytes the receiver holds (files/3) |
|
|
143
|
-
| `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force
|
|
145
|
+
| `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force`: a name taken in `--dir` is answered with the next free `--path … (2)` that keeps both; an unfinished one says how many bytes are here (exit `1`), one that waits for you to take it answers `5` naming `file accept`, with or without `--wait`; `--wait` waits for a received one first (a sent one is all here) |
|
|
144
146
|
| `file send <chat\|group> <path> [--name n] [--mime t] [--voice [ms] [--peaks …]] [--reply <message>] [--force] [--wait none\|sent] [--timeout s]` | A file, or a voice note (its length and waveform measured from the file unless given); `--reply` quotes a message, as `send --reply` does. Answers the message's `messageId` (what `message delete`, `react` and `pin` take) and the file's id. Without a daemon, a file to a chat stays until the contact has all of it (`--wait sent`, the default there; `--timeout`, 300 s, then exit 4 with the `messageId` and the file's id in `details`, and it goes on with your next command; a file over 25 MiB waits for the contact's `file accept` meanwhile); `--wait none` answers at once, as a daemon does by default. To a group (`group:<id>` when a chat has the same name), up to 100 MiB: every member sees it at once and each member's app fetches it from a member who has it (WISP 503) |
|
|
145
147
|
| `file wait [<chat>] <file> [--timeout s]` | Wait until a transfer ends: exit `0` when the file is all here, `1` with the transfer's error when it failed (`details.retry`: `file resend` can go on), `4` on timeout (default 300 s), `5` at once when a received file waits for you to take it (over 25 MiB, or a group's file that did not come by itself): the message names `file accept` |
|
|
146
|
-
| `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once) |
|
|
148
|
+
| `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once). A wait that ends short (a timeout, exit 4) has the results in `details` too, next to the copy's `messageId`; a refusal comes first |
|
|
147
149
|
| `group auto [on\|off] [--from <chat>]…` | Accept group invitations by themselves, only those over the chats named (their id, their contact's key or a label given here; `on` needs at least one, and names them all: a new `on` replaces the list): the daemon accepts them at once, and on start those that came while it was down; any other waits for `group accept`. Kept in the profile's `groups.json` with each chat's contact key: a removed chat, or one whose contact's key changed, leaves the list. When the 32 waiting invitations are full, one over a chat on the list takes the place of the oldest waiting from the chat that holds the most (its inviter is told no). An invitation over a chat on the list kept beside another contact's under the same group id (`others`) is the one taken, the other told no, while the group held is only an invitation not answered yet; beside a group joined or accepted it waits for you (a line in the log). With no argument, prints `{autoJoin: {on, from}}`; `group list` carries it too. Each accept is a line in the daemon's log |
|
|
148
|
-
| `group
|
|
150
|
+
| `group call <group> --sfu <https origin> [--e2ee \| --no-e2ee] \| --e2ee \| --no-e2ee \| --clear` | A community's admin names the node its calls go through (WISP 602), signed beside the name and picture, or `--clear` turns its calls off. `--e2ee` asks for sealed call media (§ End-to-end encryption), `--no-e2ee` turns it off, with `--sfu` or alone for the node already named; left out, the group keeps what it had. An https origin only, at most 200 characters, in one spelling (`https://call.example.com`: no path, query, trailing `/` or capitals); anything else is refused before it is signed, with the origin to use when there is one. A member who is not the admin, one out of the group (removed, or left: with that reason), or a private group, is `refused`. Answers the group as `group show` does, whose `call` is `{sfu, e2ee}` or null |
|
|
151
|
+
| `group create <name> [--mesh] [--force]`, `group join [<link> \| -]` | A community (a link anyone can open), or a private mesh. `group join` reads the link from stdin when none is given or `-` (on the command line it shows in `ps` and the shell's history, and the CLI warns). `group join` with the link of a community the profile was removed from asks to be let in again, and keeps its history. It answers `{group, joined, stage}`: without a daemon after waiting up to 60 s to be let in, through one at once (the daemon goes on knocking) |
|
|
149
152
|
| `group edit <group> <message> [text… \| --text <text> \| --stdin] [--mention <member>]… [--force]` | Replace the text of a message you sent to the group (`<message>` is the `messageId` `group send` gave). Every member sees it in place, marked edited; mentions whose `@name` is still in the text stay, `--mention` adds more. Answers `{group, messageId, edits, sent, edges}`: `edges` and `sent` as for `group send` (`sent: false` while no edge took this edit, also while it waits for the pace); `--wait sent` and `--timeout` as for `group send`. The text the message already has is no edit: `sent: false, unchanged: true`. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, as does `message delete <group> <message> --everyone`. A private group's members whose edge is down get it when it opens, a community's with the catch-up; a member on an older app keeps the old text |
|
|
150
153
|
| `group hub <group> <member> [--pin \| --exclude \| --auto]` | Past 16 members: pin a member as a hub, keep one from being a hub, or leave it to their app (a daemon offers itself) |
|
|
151
154
|
| `group invite <group> <chat>`, `group remove <group> <member>`, `group admin <group> <member>` | Membership, for the admin (each prints the group; `--show-secret` for its link). While the group's link is on, a member removed can join again with it: `group remove` says so on stderr, and `group link <group> --reset` keeps them out. `group invite` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id; `group admin` (and `group hub --pin`) names its member by its key or a prefix of it, never only by the name the member gave itself |
|
|
152
155
|
| `group leave <group> --yes`, `group forget <group> --yes`, `group accept\|decline <group>` | Membership. Leaving deletes the group's history and files on this device, so it asks for `--yes` (`confirm`, exit 5, without it), as `group forget` does; forget also deletes a group you were removed from, which keeps its history. An admin's leave hands the role to a member who is online and names them: `{left, admin: {key, name}}` |
|
|
153
156
|
| `group list [--show-secret]`, `group show <group> [--show-secret]`, `group history <group>` | Groups (and `autoJoin`, as `group auto` prints it), members, history; a message names its author (`member` key, `nick` from the roster, or the name an author no longer in it had). A payment note's line (`gpay:<id>`) carries `groupPay`: `{id, kind, from, to, by, claims, amount, decimals, unit, rail, state, test}` (member keys as `group show` prints them, `from` `*` for a request to the whole group; `state` `open`, `sent`, `paid` or `closed`; `by` null when nobody can tell who paid), and the payment's own line on this profile (the request you made, a request that came to you) says `twinOf: "gpay:<id>"`: the same payment, which the app draws once The entry link prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the group's first message. `others` (only when there are some): other groups that came under the same id, kept beside it until you pick, each a contact's invitation (`chat`, `name`, `members`) or a link opened (`link`, hidden the same way); `engine keepGroup '{"groupId":"<id>"}'` keeps the one shown, `engine switchGroup '{"groupId":"<id>","to":"<chat or link>"}'` takes another |
|
|
154
|
-
| `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
|
|
157
|
+
| `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. An `<emoji>` that is not one emoji is a usage error (exit 2), as for `react`. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
|
|
155
158
|
| `group rename <group> <name> [--force]` | A new name, for the admin (up to 64 characters, cleaned and counted as a chat's name is; one that looks like a secret needs `--force`, as for `group create`); the picture stays. Members see it once it reaches them; until then, and on apps from before names, the group keeps the name it had when they got in |
|
|
156
159
|
| `group rotate <group>`, `group link <group> [--off] [--reset]`, `group picture <group> <jpeg> \| --clear` | A fresh secret; the link (printed: asking for it is asking for the secret); the picture |
|
|
157
160
|
| `group send <group> [text…] [--mention <member>]… [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--wait none\|sent] [--timeout s]` | Send; each mentioned member is written as `@name` in the text. `--button` puts buttons under it, as `send --button`. Answers `{group, messageId, sent, edges}`: the id `--reply`, `group react` and `group edit` take, how many edges took it so far, and `sent`, true once one did. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, and nothing is sent. A group has no receipts: `--wait sent` waits until at least one edge took it (a member's in a private group, one of your hubs' in a community), and exits 4 after `--timeout` (default 30 s) if none did; the message still goes when an edge opens, while the profile is online. Use it for a one-shot send with no daemon. In a private group with nobody else in it (they all left, or nobody accepted yet), nobody gets the message, not even someone who joins later: the answer comes at once with `sent: false` and a `note` saying so. A profile removed while it was away learns it only once it is back: a wait that learns it ends at once as `refused` (exit 1) with the reason and the `messageId`, since nothing goes any more |
|
|
@@ -164,20 +167,20 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
164
167
|
| `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 |
|
|
165
168
|
| `lightning default <card>`, `lightning rename <card> <name>` | Lightning cards: which receives by default |
|
|
166
169
|
| `listen [--since seq] [--cursor file] [--type t]… [--turns] [--from <chat\|key>]… [--group <group>]… [--exec cmd] [--webhook url] [--print] [--translate lang]` | The event stream; `--from` and `--group` an allowlist, `--turns` one `agent.turn` per message to answer, `--translate` a translation of received messages ([Events](#events), [Translation](#translation)) |
|
|
167
|
-
| `message delete <chat\|group> <message> --everyone [--wait none\|confirmed\|sent] [--timeout s]` | 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. In a chat, `--wait confirmed` waits for the contact's app to confirm (the default without a daemon, which is offline once the command ends), and the answer's `confirmed` says whether it did. In a group (no receipts), `--wait sent` waits until a member's edge (a hub's, in a community) took the removal, the default without a daemon, and the answer's `edges` and `sent` say how many did, as for `group send`. Without `--everyone`, only this device forgets it, except a text of yours still `waiting` (it never left this device): it is cancelled, as the app's Cancel sending, and the contact never gets it; if a retry had just handed it to a relay, it is deleted for everyone instead, and the answer's `everyone` is `true`. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it) |
|
|
170
|
+
| `message delete <chat\|group> <message> --everyone [--wait none\|confirmed\|sent] [--timeout s] [--purge]` | 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. In a chat, `--wait confirmed` waits for the contact's app to confirm (the default without a daemon, which is offline once the command ends), and the answer's `confirmed` says whether it did. In a group (no receipts), `--wait sent` waits until a member's edge (a hub's, in a community) took the removal, the default without a daemon, and the answer's `edges` and `sent` say how many did, as for `group send`. Without `--everyone`, only this device forgets it, except a text of yours still `waiting` (it never left this device): it is cancelled, as the app's Cancel sending, and the contact never gets it; if a retry had just handed it to a relay, it is deleted for everyone instead, and the answer's `everyone` is `true`. Answers the chat or group, the message's `messageId` and `everyone` (`deleted` says the same id, kept for callers that read it). What a deleted message said stays in the profile's store journal (`db/journal.bin`) until the store folds it, within the hour; `--purge` (with or without `--everyone`) takes its line out of the replies that quote it (and, in a private group, the copy the group kept for members who missed it) and folds the store before answering, so its text has left the profile's folder when the command returns, and the answer says `purged: true`. One fold per call: for a secret pasted into a chat, not every delete |
|
|
168
171
|
| `message retry\|delete\|details <chat> <message>` | One message |
|
|
169
172
|
| `pay <invoice\|address\|lnurl> [--amount sats] [--network n] [--max-fee sats] [--chat <chat>] [--confirm-real]` | Pay over Lightning (Testnet unless `--network mainnet`). `--chat`: the chat the invoice came from, whose contact is told a Testnet invoice was paid, named by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
170
173
|
| `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
|
|
171
174
|
| `pin <chat\|group> <message> \| --remove [--wait none\|confirmed\|sent] [--timeout s]` | Pin a message at the top of a chat or group, for everyone in it: one per chat, a new pin replaces it; `pin <chat\|group> --remove` unpins (it names no message). In a community only the admin pins. A profile that is not a member of the group any more (removed from it) gets `refused`, with the reason, and nothing is pinned. A 1:1 pin reaches the contact on the next live session; without a daemon `pin` stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s), and `confirmed` says whether it has. A group has no receipts: without a daemon a group's pin stays until a member's edge (a hub's, in a community) took it (`--wait sent`, the default there), and the answer's `edges` and `sent` say how many did, as for `group react`. The other side hears `chat.pinned` or `group.pinned`. `chat show`, `group show` and `group list` say what is pinned now: `pin: {messageId, ref, by, at}` (`messageId` null when the message is not here), or `pin: null` |
|
|
172
|
-
| `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` or `GHOSTLY_BACKUP_PASSPHRASE`. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
|
|
175
|
+
| `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` (`-` reads it from stdin, e.g. a pipe from a password manager) or `GHOSTLY_BACKUP_PASSPHRASE`. One line break at the end of the file (or stdin) is left out, nothing else: a backup is refused for a passphrase that starts or ends with any other space, line break or byte order mark, or holds a NUL (a file saved as UTF-16), as the same passphrase typed or pasted would not open it. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
|
|
173
176
|
| `profile create <name> [--use] [--name <shown>] [--force]`, `profile list`, `profile use <name>` | Profiles |
|
|
174
177
|
| `profile picture <jpeg> \| --clear` | The picture contacts see (a JPEG within 512 px; 128 px is what the app sends) |
|
|
175
178
|
| `profile show`, `profile set [--name <name>] [--share-profile \| --no-share-profile] [--force]` | The name contacts see (up to 64 characters, cleaned as a chat's or a group's name is, and counted once cleaned; empty is no name; a longer `--name`, or one with nothing that shows, is a usage error naming it, as for `profile create --name`; one that looks like a secret needs `--force`) |
|
|
176
|
-
| `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
|
|
179
|
+
| `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Anything else as `<emoji>` (a word, two emoji) is a usage error (exit 2) before the profile opens. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
|
|
177
180
|
| `routine send <chat\|group> --name <name> --schedule "every day 01:00" [--cron "0 1 * * *"] [--state active\|paused] [--next <time>] [--run ok\|failed\|skipped[:summary]] [--link url]… [--id id] [--text <text>] [--json json\|-\|file] [--force]`, `routine update <chat\|group> <routine> [fields…]` | A routine card for something a bot runs on a schedule (WISP 405 · Status Cards): its name, schedule (and cron line, shown only), state, last run and result, next run and up to 10 recent runs. `--run` records a run now as the last one; `--next` takes milliseconds or a date within a year (no zone: local time, a bare `2026-09-30` local midnight; `Z` or `+02:00` as given). Updates merge and are paced as `task update`'s, and wait as `task send` and `task update` do. The app shows it, and runs nothing |
|
|
178
181
|
| `saved add\|remove <chat\|group> <message>`, `saved list` | Saved messages: mark a message of a chat or a group to find it again, kept for this profile on this device and never sent (the app shows the same list in its Saved view). `saved list` gives them under `saved`, the last saved first, each as it is now (an edit shows its latest text) with its `chat` or `group` and `savedAt`; a deleted message drops out |
|
|
179
182
|
| `send <chat> [text…] [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--stdin] [--force] [--wait none\|sent\|delivered] [--timeout s]` | Send text (arguments, or stdin); `--reply` quotes a message of the chat. `--button yes:Yes` (1 to 6; the id ends at the first colon; no two labels alike ignoring case and spaces, and no label that is another button's id, else exit 2) puts buttons under the text, which is the question and what older apps show, so say how to answer in words. `--once`: one answer a person. A question that goes on the DHT floor or into a hold (the contact's app closed) reaches them as text alone; the engine sends its buttons again once the chat is live, as an edit of the buttons alone (no `message.edited` for it). The answer adds `buttons` (the question's id, `ask-…` unless `--id`), `card`, and `pressable`: whether the contact's app shows buttons (null until it says). A press comes back as `button.pressed` ([Events](#events)) |
|
|
180
|
-
| `service add <name> <http://127.0.0.1:port>`, `service share <service> <chat> [--off]`, `service list`, `service remove\|enable` | Share a web app on this machine, per contact. `service share` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id. `service add` answers the new one as `service` (the id the others take); its old key `serviceId` stays beside it for one release |
|
|
183
|
+
| `service add <name> <http://127.0.0.1:port>`, `service share <service> <chat> [--off]`, `service list`, `service remove\|enable` | Share a web app on this machine, per contact. `service share` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id, and is `refused` past the 13 apps one contact can see. On the socket, `service.share` and `service.enable` take `off: true`, or the answer's own `shared` / `enabled` key (refused beside an `off` that says the opposite). `service add` answers the new one as `service` (the id the others take); its old key `serviceId` stays beside it for one release |
|
|
181
184
|
| `service peer <chat>`, `service open <chat> <service> [--port p]`, `service close <chat> <service>` | A contact's app on a loopback port here (daemon). `url` is a link for your browser, `http://<random>.localhost:<port>/.ghostly-open/<token>`: it sets the service's cookie and shows the app on a host name of its own; any other host name, or a request without that cookie, gets 404. Chrome, Edge and curl reach `*.localhost` names by themselves; Safari and Node's `fetch` on macOS may not (add the name to `/etc/hosts` for them). With Hide my IP from contacts on, `service open` fails with `unavailable`: a browser tab cannot keep the app's page off WebRTC |
|
|
182
185
|
| `settings get [--show-secret]`, `settings set <key> <json> [--force]` | Relays, Iroh relays, the HyperDHT relay, ICE servers, `sendTyping` (false: contacts are never told you type), `daemonPresence` (true: while a daemon runs the profile, contacts see it online, WISP 401 § Presence and status; off by default, so a bot is never shown online unless you turn it on), … `settings get` shows every key `settings set` takes with its value in effect (one never set as its default: `sendTyping: true`, the default Iroh relays). `<json>` as `-`, or none on a pipe, is read from stdin: a TURN password stays out of `ps` |
|
|
183
186
|
| `status` | The profile, its chats, whether WebRTC and calls run, the last event seq |
|
|
@@ -312,7 +315,9 @@ refused without it. A group's entry link lets anyone who reads it join: `group s
|
|
|
312
315
|
commands, `group.created` events and `engine getState` print it as `<hidden>`; `--show-secret`, `group create` and
|
|
313
316
|
`group link` print it. A pending chat's invite code lets whoever reads it take the chat: every command that prints a
|
|
314
317
|
chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print it as `<hidden>`; `invite create` and
|
|
315
|
-
`chat list` or `chat show` with `--show-secret` print it.
|
|
318
|
+
`chat list` or `chat show` with `--show-secret` print it. A group call's pass lets whoever holds it into the call as
|
|
319
|
+
you until it expires: `engine groupCallToken` prints its `token` and its TURN servers' `credential` as `<hidden>`
|
|
320
|
+
unless `--show-secret`.
|
|
316
321
|
|
|
317
322
|
## Events
|
|
318
323
|
|
|
@@ -333,7 +338,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
333
338
|
Dedupe by `id`; resume with `--since <seq>`, or let `--cursor <file>` remember the last event handled. A cursor
|
|
334
339
|
file that holds no event number (empty, edited by hand) is refused at start (`bad_request`, naming the file): fix or
|
|
335
340
|
remove it, or give `--since`.
|
|
336
|
-
- Types: `daemon.started`, `chat.created`, `chat.removed
|
|
341
|
+
- Types: `daemon.started`, `chat.created`, `chat.removed` (`peer`: the contact's key, once paired), `chat.renamed`, `chat.pairing` (`stage`: publishing,
|
|
337
342
|
waiting, resolving, on-dht, live, …), `chat.connection` (`live`, `transport`), `typing.started` (with `kind` and, when given, `status`; again when either changes) and `typing.stopped` (the contact is writing, or stopped: a message, a stop, or 6 s of silence; live only, as `group.typing.*`: never in the journal, so `--since` does not replay them), `chat.joined` (the contact's app
|
|
338
343
|
announced itself, once; not a message: a later message of theirs in the same words is `message.received`), `chat.announced`, `message.received` (`message.nick`: the name the contact gave), `message.sent`, `message.delivery`
|
|
339
344
|
(`delivery`: sending, queued, waiting, held, sent, delivered, failed), `message.edited` (a text changed in place, the
|
|
@@ -347,7 +352,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
347
352
|
showed, as checked here: `identity` with `status`, and `error`, why it is not verified, or null; each change of
|
|
348
353
|
status is a new `identity.status`, even back to one it had before), `identity.approval` and `identity.progress` (a signer waits on a link or a code), `group.deleted` (`{group, messageId}`: a group's message deleted, not the group), `group.removed`, `payment.created` and
|
|
349
354
|
`payment.updated` (`payment`: id, chat, kind request|payment, direction in|out, amount, memo, state pending|
|
|
350
|
-
settled|failed, network, method), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
|
|
355
|
+
settled|failed, network, method, and `group` for a group's payment, whichever member's link it went over), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
|
|
351
356
|
calls: see [Calls](#calls)), `app.opened` (`chat`, `app`, `version`), `app.closed` (`chat`, `app`, and `offline`
|
|
352
357
|
when the session went rather than the contact closing it) and `app.message` (`chat`, `app`, `data`): what a
|
|
353
358
|
contact's app says in a chat, only for an app this profile serves (`app serve`), `app` being its reference and
|
|
@@ -399,7 +404,8 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
399
404
|
work), `id` stable per message. What the sender wrote is under `untrusted` only: give it to an agent as data, never
|
|
400
405
|
as its instructions ([docs/CLI.md](../../docs/CLI.md#agent-turns)). Takes the place of `--type`.
|
|
401
406
|
- `--exec <cmd>` runs the command through the shell once per event, in order, with the event on stdin and
|
|
402
|
-
`GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment
|
|
407
|
+
`GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment, and `GHOSTLY_HOME` and
|
|
408
|
+
`GHOSTLY_PROFILE` of the listen (`--home`, `--profile` too), so its own `ghostly send` answers from the same profile. A non-zero exit, or a death by a
|
|
403
409
|
signal (`--exec was killed by SIGKILL on event N`), is said on stderr and the cursor moves past the event. With
|
|
404
410
|
`--print`, the command's stdout goes to listen's stderr: stdout is the JSON events only.
|
|
405
411
|
- `--webhook <url>` POSTs each event (JSON) to a local bridge: `127.0.0.1`, `localhost` or `[::1]` only. A URL with
|
|
@@ -450,11 +456,13 @@ The daemon listens on a Unix socket in the profile's folder (`daemon.sock`, 0600
|
|
|
450
456
|
|
|
451
457
|
Methods: `status`, `status.get|set|clear`, `profile.get|set`, `settings.get|set`, `invite.create|join`, `chat.list|get|history|send|retry|
|
|
452
458
|
delete|details|rename|remove|transport|connect|disconnect|verify|wait|pay|request|payRequest|accept|edit|react|pin|forward|typing`,
|
|
453
|
-
`group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline`, `wallet.list|create|remove|faucet|history|
|
|
459
|
+
`group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline|typing|auto`, `wallet.list|create|remove|faucet|history|
|
|
454
460
|
receive|address|redeem`, `wallet.mint.add`, `lightning.default|rename`, `pay`, `payment.list|check|reclaim`,
|
|
455
|
-
`file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub`, `profile.picture|backup`,
|
|
456
|
-
`
|
|
457
|
-
`
|
|
461
|
+
`file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|call|hub|rename`, `profile.picture|backup`,
|
|
462
|
+
`saved.add|list|remove`, `button.press|update`, `task.send|update`, `routine.send|update`, `usage.send`,
|
|
463
|
+
`identity.providers|list|add|complete|cancel|remove|share|withdraw|contact|recheck`, `x401.key.new`,
|
|
464
|
+
`x401.credential.add|list|remove`, `service.list|add|remove|enable|share|peer|open|close`,
|
|
465
|
+
`app.open|close|send|serve|served|unserve`, `call.start|answer|hangup|list|get|flush|auto`,
|
|
458
466
|
`events.replay`, `events.subscribe`, `daemon.stop`, `daemon.hello`, and `engine.call` with
|
|
459
467
|
`{"method":"<engine call>","params":{…},"confirmReal":false,"yes":false}` for anything else the app does. Parameters are the
|
|
460
468
|
commands' (see `src/api.ts`). Errors: `{"id":…,"error":{"code","message","details"?}}` with the codes above.
|
|
@@ -493,8 +501,9 @@ Its `AGENTS.md` is the guide for an AI agent that sets it up.
|
|
|
493
501
|
with no framing:
|
|
494
502
|
|
|
495
503
|
- First, the call's token: `audio.token` (64 hex digits, new for every call, in the same answers and events as the
|
|
496
|
-
socket) and a line feed. Required on Windows: until a connection sends it, it gets
|
|
497
|
-
and a wrong one is closed.
|
|
504
|
+
socket) and a line feed. Required on Windows and in a shared folder (below): until a connection sends it, it gets
|
|
505
|
+
no audio and replaces no program, and a wrong one is closed. Otherwise on Linux and macOS a program that does not
|
|
506
|
+
send it still works.
|
|
498
507
|
- s16le, mono, at the call's rate: 48000 by default, or 24000, 16000, 12000, 8000 with `--rate`. Opus runs at that
|
|
499
508
|
rate itself, so nothing is resampled.
|
|
500
509
|
- From the call: the contact's audio in 20 ms frames (1920 bytes at 48 kHz, 640 at 16 kHz), as they are decoded.
|
|
@@ -514,6 +523,15 @@ with no framing:
|
|
|
514
523
|
- Added latency inside the CLI: at most one 20 ms frame going out; coming in, a frame as soon as its packet is
|
|
515
524
|
decoded (up to 40 ms more when a packet is late; a lost one becomes 20 ms of silence).
|
|
516
525
|
|
|
526
|
+
**A shared folder.** For a voice program that runs as another user (a Ghostly OS node's assistant), start the daemon
|
|
527
|
+
with `GHOSTLY_CALL_SOCKET_DIR=<folder>`: each call's socket is then `<folder>/<call>.sock`, 0660, and the program
|
|
528
|
+
must send the token first. Make the folder before the daemon starts, the daemon's user's, with the program user's
|
|
529
|
+
group, `chmod 2750` (setgid, so the sockets take that group); the daemon refuses to start when the folder is missing,
|
|
530
|
+
a link, another user's, writable by anyone else or open to anyone outside its group, or (on Linux) of another group
|
|
531
|
+
and not setgid, where a socket would take the daemon's group. An absolute path of at most 82
|
|
532
|
+
bytes; not on Windows. A starting daemon removes only the sockets of calls whose daemon is gone (`<call>.sock`, nobody
|
|
533
|
+
answering), so the folder may hold other files, and several profiles' daemons may share it.
|
|
534
|
+
|
|
517
535
|
**Events.** `call.incoming` `{call, chat, name, video, auto}`, `call.outgoing` `{call, chat, name, audio}`,
|
|
518
536
|
`call.connected` `{call, chat, direction, audio: {socket, token, rate, channels, format, frameMs}}`, `call.stalled`
|
|
519
537
|
`{call, chat, direction, silentMs}` (a connected call heard no packet from the contact for 5 s: its side may have died;
|
|
@@ -535,7 +553,9 @@ with no framing:
|
|
|
535
553
|
buttons of the contact's app say why when not); an offer that is older than 120 s does not ring. `call auto` is
|
|
536
554
|
kept in the profile's `calls.json`. The media is libdatachannel (node-datachannel, as for chats) and libopus built to
|
|
537
555
|
WebAssembly (`opusscript`); `status` says `calls: false` and `call list` says why where they cannot run.
|
|
538
|
-
`GHOSTLY_CALL_BIND=127.0.0.1` binds the call's media to one address (the tests use loopback)
|
|
556
|
+
`GHOSTLY_CALL_BIND=127.0.0.1` binds the call's media to one address (the tests use loopback); a name such as
|
|
557
|
+
`localhost` is no address, and turns calls off with that reason. An address this machine does not have (now) refuses
|
|
558
|
+
each call (`unavailable`), and the daemon goes on.
|
|
539
559
|
|
|
540
560
|
**When a call does not connect** (it stays `connecting`, then ends `failed`): the daemon's log has a line per call for
|
|
541
561
|
the candidates each side offered, every ICE state, and the pair it connected over; `call list` shows the ICE state
|
|
@@ -561,7 +581,9 @@ gives no relay (a per-user quota reached, wrong credentials) logs `no relay addr
|
|
|
561
581
|
The engine picks as the app does: WebRTC (libdatachannel), HyperDHT (native, in process), Iroh (the wasm build,
|
|
562
582
|
relay only, as in the web app), and the DHT floor through the Pkarr relays in the settings and the Mainline DHT
|
|
563
583
|
directly (every packet to both; reads from the DHT when every relay fails, so `settings set readRelays`, the
|
|
564
|
-
app's "Also use Pkarr relays", is refused).
|
|
584
|
+
app's "Also use Pkarr relays", is refused). A daemon's `status` says how each relay is doing (`discovery.health`:
|
|
585
|
+
`ok`, `throttled` or `failing`, `until` when it is asked again, `reason`) and where its last read went
|
|
586
|
+
(`discovery.via`: `relay`, `dht`, or null before any). Tests and private networks:
|
|
565
587
|
`GHOSTLY_DHT=0` leaves the Mainline DHT out, `GHOSTLY_DHT_BOOTSTRAP=host:port,…` replaces its bootstrap routers,
|
|
566
588
|
`GHOSTLY_HYPERDHT_BOOTSTRAP=host:port,…` replaces HyperDHT's bootstrap nodes, `settings set relays
|
|
567
589
|
'["http://…"]'` the Pkarr relays, `settings set irohRelays '["https://…"]'` the Iroh relays. `GHOSTLY_WEBRTC=0`
|
package/SKILL.md
CHANGED
|
@@ -140,7 +140,9 @@ ghostly listen --turns --from alice --group team --cursor ~/.ghostly/agent.curso
|
|
|
140
140
|
Anyone else's message stays in the chat and never reaches the hook. `--group` alone lets no 1:1 chat through, and
|
|
141
141
|
`--from` alone no group. Names are turned into ids once, when `listen` starts. Everyone on it can try to steer the
|
|
142
142
|
agent: an agent with tools gets `--from owner` only (step 11).
|
|
143
|
-
- `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments).
|
|
143
|
+
- `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments). It gets
|
|
144
|
+
`GHOSTLY_PROFILE` and `GHOSTLY_HOME` of the listen (`--profile` and `--home` too), so the hook's `ghostly send`
|
|
145
|
+
answers from the same profile. Or
|
|
144
146
|
`--webhook http://127.0.0.1:<port>/…` POSTs each turn to a local bridge (loopback only).
|
|
145
147
|
- `--cursor <file>` remembers the last event handled, so a restarted listener resumes where it stopped. Dedupe on `id`.
|
|
146
148
|
A `--webhook` bridge that is down holds the stream until it is back (nothing is lost); an `--exec` that exits
|
|
@@ -206,7 +208,7 @@ ghostly typing alice --kind thinking --status "Transcribing your audio" --for 12
|
|
|
206
208
|
ghostly file send alice ./answer.ogg --voice --reply <message id> # a voice note: length and waveform from the file
|
|
207
209
|
ghostly file send alice ./note.m4a --voice 4200 # or its length given in ms (AAC needs ffmpeg for the waveform)
|
|
208
210
|
ghostly file send alice ./report.pdf # a file (no daemon: stays until alice has all of it)
|
|
209
|
-
ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout
|
|
211
|
+
ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout, 5 when it waits for file accept
|
|
210
212
|
ghostly file accept <file id> # a file over 25 MiB waits for this (file.offered event)
|
|
211
213
|
```
|
|
212
214
|
|