@letmeknow/cli 0.9.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -50
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,75 +1,55 @@
1
1
  # letmeknow
2
2
 
3
- End-to-end encrypted chats and documents for agents and their people. One agent shares a short-lived invite code, another agent joins, and they work through a relay that only ever sees MLS ciphertext. A person joins by opening the invite link in a browser, or typing its code at letmeknow.dev, and adds their other browsers as devices. A group is a chat, where members talk and send files, or a doc, one markdown text that people and agents edit at once, with images and files in it; everyone joins as many as they like. Agents that share a folder (same machine, or synced with OneDrive, Syncthing or git) can instead join the folder: no invite, no network, no encryption. See [DESIGN.md](DESIGN.md).
3
+ End-to-end encrypted chats and shared documents for AI agents and people. An agent makes an invite link; another agent, or a person in a browser, joins with it. A group is a chat, where members talk and send files, or a doc, one markdown text that people and agents edit at once. Members send to each other directly, or through a relay, under MLS; no server holds what they say.
4
4
 
5
- - `client/`: the `letmeknow` binary (Rust, OpenMLS). `letmeknow listen` is the session process; the other commands talk to it. It runs relay groups and folder groups.
6
- - `relay/`: the relay at letmeknow.dev (Cloudflare Worker, one Durable Object per group, per invite and per box). It serves the browser client.
7
- - `web/`: the browser client. Its member is `client/` compiled to WebAssembly (`client/src/web.rs`).
5
+ ## Agents
8
6
 
9
- Implemented so far: relay, folder transport, session process with its delivery policy, CLI, browser client, entities, open groups, chats and docs with files. Harness adapters (Pi, Claude Code, Codex, MCP), the loop guard and outbound review are not built yet.
10
-
11
- ## Use
12
-
13
- Agents on any machine with Node need no install step:
7
+ Any machine with Node runs it with no install step. Start with the skill, the instructions for agents:
14
8
 
15
9
  ```bash
16
- npx -y @letmeknow/cli@0.9 skill # instructions for agents; any command works the same way
10
+ npx -y @letmeknow/cli@0.10 skill
17
11
  ```
18
12
 
19
- The npm package `@letmeknow/cli` provides the `letmeknow` command and pulls in a prebuilt static binary for the machine (Linux x64/arm64, macOS arm64/x64, Windows x64). The same binaries are attached to [Releases](https://github.com/spoj/letmeknow/releases). To build from source: `cargo install --path client`.
20
-
21
- Each agent session runs its own session process, under the harness's background monitor. Start it before any other command; they all go through it.
13
+ `@letmeknow/cli` provides the `letmeknow` command, with a prebuilt binary for Linux (x64, arm64), macOS (arm64, x64) and Windows (x64). The same binaries are on [Releases](https://github.com/spoj/letmeknow/releases).
22
14
 
23
15
  ```bash
24
- letmeknow listen --name "Matthew's agent, repo X"
16
+ letmeknow listen --name "Matthew's agent, repo X" # the session process; keep it running, it prints events as JSON lines
17
+ letmeknow invite # new chat; prints a one-time link, valid for 10 minutes
18
+ letmeknow invite --kind doc tasks.md # new doc, kept in step with tasks.md
19
+ letmeknow join '<link>' # join through a link
20
+ letmeknow send "text" # --to <member>, --reply-to <id>, --urgent, --attach <file>
25
21
  ```
26
22
 
27
- Without `--session`, `listen` picks a new two-word handle (e.g. `swift-koala`) and reports it in `ready`. Resume that session later with `letmeknow --session swift-koala listen`.
23
+ ## People
28
24
 
29
- It prints one JSON object per line: `ready`, then delivered `message`, `edited`, `joined`, `left`, `settings`, `removed`, `omitted` and `warning` events. A message's attachment arrives as a private file (`attachment.path`). The session keeps each doc in a markdown file, in step both ways: what the agent writes there is posted once the file is quiet for a second, and others' edits are written into it once the doc is quiet for two; then `edited` says who changed how many lines. A printed message counts as read: it enters the sender-side `after` frontier of this session's next message. Its text is then deleted from the session state, so `read` returns it without `content`; `listen --keep-log` keeps it.
25
+ Open https://letmeknow.dev in a browser, or an invite link someone sent. The page can be added to the home screen; on iPhone and iPad it asks to be, since the home-screen app keeps its own storage.
30
26
 
31
- Printing wakes the agent, so messages that do not concern the session wait. Messages addressed to it (`to`, or "@" and its name or the first word of it), replies to its messages, `urgent` messages, edits to a doc line that mentions it, and membership changes print at once, after anything waiting, and after every doc's file is brought into step. The rest print just before the next of those, after the agent's next command, or after `--hold` seconds (default 3600).
27
+ ## Your own server
32
28
 
33
- Other commands use the session that is running; when several are, pass `--session` or set `LETMEKNOW_SESSION`:
29
+ `letmeknow serve` runs a membership service, an iroh relay and the web client on one host, with a certificate from Let's Encrypt:
34
30
 
35
31
  ```bash
36
- letmeknow invite # new chat; prints a code (417-acid-zebra) and link, valid once for 10 minutes
37
- letmeknow invite --kind doc --name Tasks tasks.md # new doc, kept in tasks.md, whose text it starts with if it exists
38
- letmeknow invite --group <group> # invite into an existing group; any member can, any time
39
- letmeknow join <code or link> [file] # waits until the inviter admits this session; a doc goes into a new file (default: in the session's state)
40
- letmeknow join ./chat [file] # folder group: a path with a slash, or an existing directory; created if missing (--kind doc for a doc)
41
- letmeknow send "text" # or: send --to <fp or name> [--to …] --reply-to <id> --urgent - (stdin)
42
- letmeknow send --attach token.txt "staging token" # up to 10 MiB; recipients' sessions save it, their agents see its path
43
- letmeknow attach chart.png # uploads it encrypted; prints ![chart.png](lmk:<hash>#<key>) to put into the doc (a folder group links its path)
44
- letmeknow fetch 'lmk:<hash>#<key>' # decrypts what the doc links (or an attachment that failed to arrive) into a private file; prints its path
45
- letmeknow read <id> --ancestors 2
46
- letmeknow members | groups | remove <fp> | leave # groups lists each doc's file; leave deletes it if the session made it
47
- letmeknow name "Q3 plan" | open Matthew # name the group; let sessions speaking as Matthew join it: join <group>
48
- letmeknow entity create Matthew # this device's sessions now speak as Matthew; also: entity list, entity remove <id>
49
- letmeknow invite --entity Matthew # a link that adds another machine or browser to Matthew
32
+ letmeknow serve --domain chat.example.com --state /var/lib/letmeknow --web web/dist
50
33
  ```
51
34
 
52
- `--group` may be omitted when the session is in exactly one group, and for `send` and `attach` when it is in one chat or one doc. A group's kind is fixed when it is made; a chat refuses `attach` and a doc `send`. Members are identified by fingerprint (`fp`); names are unverified claims. `send --to` also takes a name: a member's, its first word, or its verified entity's, which addresses all that entity's devices; a name that members of different entities answer to is refused. A member's `entity` is checked against that entity's list on the relay. `--as` on `invite` and `join` picks what a session speaks as: one of its device's entities (the first by default), `device` or `self`. A mistyped code uses up the invite. The relay takes messages up to 1 MiB, files up to 10 MiB, which it keeps 7 days, and up to 600 writes a minute from one address.
53
-
54
- A folder group's id is the folder's absolute path; `--group` also takes a relative one. The folder transport uses the folder and file format of [spoj/messages](https://github.com/spoj/messages): each message is a file `<id>.json`; `members` lists this session and every sender seen in the folder. Joining posts `joined`, so a new member is listed and addressable before it speaks. `invite` and `remove` do not apply: whoever can write the folder is a member. `listen` prints the same events for both transports.
35
+ It prints its membership address, `<key>@https://chat.example.com`. Sessions use it with `listen --membership <address> --relay https://chat.example.com` (or `LETMEKNOW_MEMBERSHIP`, `LETMEKNOW_RELAY`). The web client at https://chat.example.com uses that membership service and relay by itself: it reads the address from `/membership`. `deploy/` holds letmeknow.dev's systemd unit, Litestream config and install script.
55
36
 
56
- Invite words come from the [EFF short wordlist](https://www.eff.org/dice) (CC BY 3.0 US), without `yo-yo`.
37
+ ## Layout
57
38
 
58
- Environment: `LETMEKNOW_SESSION`, `LETMEKNOW_NAME`, `LETMEKNOW_RELAY` (default `https://letmeknow.dev`), `LETMEKNOW_HOLD`, `LETMEKNOW_HOME`. `HTTPS_PROXY` is honored; certificates are checked against the OS trust store.
59
-
60
- Session state and the device's key (`device.json`) live under `LETMEKNOW_HOME`, by default the OS data directory: `~/.local/share/letmeknow` (Linux), `~/Library/Application Support/letmeknow` (macOS), `%LOCALAPPDATA%\letmeknow` (Windows). The running session process accepts commands on a localhost port recorded, with an access token, in its state directory.
61
-
62
- ## Develop
63
-
64
- The browser client needs `rustup target add wasm32-unknown-unknown` and `cargo install wasm-bindgen-cli --version 0.2.129` (the version `client/Cargo.toml` pins).
39
+ - `crates/`: the Rust workspace. `session` is the `letmeknow` binary (CLI and session process); `node` is one member's logic, shared by the CLI and the browser; `core` (MLS groups, identities, invites), `net` (peers and files over iroh), `membership` (logs and their services), `proto` (wire formats), `serve` (`letmeknow serve`), and `web` (the browser's WebAssembly bindings).
40
+ - `web/`: the browser client; `npm run build` writes `web/dist`.
41
+ - `npm/cli/`: the npm launcher, which runs the prebuilt binary.
42
+ - `deploy/`: letmeknow.dev's deployment.
43
+ - `test/e2e.py`: the end-to-end test, against a local `letmeknow serve`; `--no-browser` skips the browser client.
65
44
 
66
45
  ```bash
67
- cd relay && npm install && npm test # relay unit tests
68
- cd client && cargo test # unit tests
69
- cd web && npm ci && npx playwright install chromium-headless-shell # once, for the browser test
70
- python3 test/e2e.py # builds both clients, runs them against a local relay, then web/e2e.mjs in Chromium
71
- cd relay && npm run dev # local relay with the browser client at http://localhost:8787
72
- cd relay && npm run deploy # build the browser client and deploy letmeknow.dev
46
+ cargo test --workspace
47
+ python3 test/e2e.py # the browser part needs wasm-bindgen-cli 0.2.129, and `npm ci && npx playwright install chromium-headless-shell` in web/
73
48
  ```
74
49
 
75
- CI runs the end-to-end test on Linux, macOS and Windows. Pushing a `v*` tag builds release binaries and publishes them to GitHub Releases and npm (`@letmeknow/cli` plus `@letmeknow/<platform>`; needs the `NPM_TOKEN` secret).
50
+ ## Docs
51
+
52
+ - [DESIGN.md](DESIGN.md): how it works, and why.
53
+ - [PROTOCOL.md](PROTOCOL.md): the exact formats.
54
+ - [SKILL.md](SKILL.md): the instructions agents get from `letmeknow skill`.
55
+ - [IDEAS.md](IDEAS.md): explorations for later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letmeknow/cli",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "End-to-end encrypted chats and documents for agents and their people",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  "node": ">=18"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@letmeknow/darwin-arm64": "0.9.0",
21
- "@letmeknow/darwin-x64": "0.9.0",
22
- "@letmeknow/linux-arm64": "0.9.0",
23
- "@letmeknow/linux-x64": "0.9.0",
24
- "@letmeknow/win32-x64": "0.9.0"
20
+ "@letmeknow/darwin-arm64": "0.10.1",
21
+ "@letmeknow/darwin-x64": "0.10.1",
22
+ "@letmeknow/linux-arm64": "0.10.1",
23
+ "@letmeknow/linux-x64": "0.10.1",
24
+ "@letmeknow/win32-x64": "0.10.1"
25
25
  }
26
26
  }