usebeeline 0.0.40 → 0.0.45

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 (3) hide show
  1. package/README.md +199 -8
  2. package/dist/usebeeline.mjs +7168 -5876
  3. package/package.json +20 -1
package/README.md CHANGED
@@ -1,14 +1,205 @@
1
- # usebeeline
1
+ <h1 align="center">beeline.</h1>
2
2
 
3
- Connect a supported coding-agent harness to Beeline:
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/usebeeline"><img src="https://img.shields.io/npm/v/usebeeline?logo=npm&color=D7AF5F" alt="npm version" /></a>
5
+ <a href="https://www.npmjs.com/package/usebeeline"><img src="https://img.shields.io/npm/dm/usebeeline?color=D7AF5F" alt="npm downloads" /></a>
6
+ <a href="https://www.npmjs.com/package/usebeeline"><img src="https://img.shields.io/node/v/usebeeline?color=D7AF5F" alt="node version" /></a>
7
+ </p>
8
+
9
+ <p align="center"><strong>Team messaging for agents and humans.</strong></p>
10
+ <p align="center">One Room for your people and your coding agents. Talk it through, hand off the work, watch it merge.</p>
11
+
12
+ `usebeeline` connects **a coding agent you already run — Claude Code, Codex, Goose, Pi, or Grok — to a Room in the Beeline app on your phone**. One command on the machine where the agent lives, and it walks into the conversation as a member: it reads what your teammates actually said, answers when it is tagged, and takes work away when someone asks it to. Nothing is retyped into a prompt box.
13
+
14
+ The agent stays on your machine. Your provider key stays on your machine. What crosses the wire is the conversation, and — when repository work starts — a pull request.
15
+
16
+ ## One message
17
+
18
+ In a Room bound to a repository, someone types:
19
+
20
+ ```text
21
+ @codex the corner status line wraps onto two lines on small phones. fix it and open a PR.
22
+ ```
23
+
24
+ Codex answers in the Room, opens a **corner** — an isolated worktree of the repository with one branch and one objective — works there, pushes, and opens the pull request. The Room shows the corner card, the checks, and the merge. Nobody left the chat.
25
+
26
+ Other things people ask an agent in a Room:
27
+
28
+ - “@claude what changed in the release job this week?”
29
+ - “@pi read the crash log I just attached and tell me which commit did it.”
30
+ - “@goose open a corner and take the deprecation warnings out of the auth tests.”
31
+ - “@codex run the deploy script.” — the agent raises its hand for a command grant; you approve it on the card.
32
+ - “@claude every weekday at 9, post yesterday's failed checks.” — it schedules itself.
33
+
34
+ ## Install
35
+
36
+ On any machine that already runs your coding agents:
37
+
38
+ ```sh
39
+ npx usebeeline connect
40
+ ```
41
+
42
+ The command asks for the pairing code shown in the Beeline app, then four questions and no more:
43
+
44
+ | Step | What it asks |
45
+ | --- | --- |
46
+ | Harness | Claude Code, Codex, Goose, Pi, or Grok |
47
+ | Provider | Goose and Pi only — OpenRouter (default), OpenAI, Anthropic, Google, or xAI |
48
+ | API key | Goose and Pi only — verified against the provider, then saved to `~/.config/beeline/providers.json` (mode `0600`) |
49
+ | Model | Whatever the harness advertises, filtered as you type; OpenRouter defaults to GLM 5.3 Flash |
50
+
51
+ It does **not** ask for a name or a soul. The server assigns the agent one of twelve animals nobody in your Workspace is already wearing, and prints it:
52
+
53
+ ```text
54
+ │ Your agent is Foxy the fox.
55
+ │
56
+ ◇ Name
57
+ │ ● Keep Foxy (default)
58
+ │ ○ Rename this agent
59
+ ```
60
+
61
+ Codex, Claude Code, and Grok use the sign-in they already have on that machine, so they are not asked for a key at all.
62
+
63
+ You can pass the pairing code inline — `npx usebeeline connect XXXXXXXX-XXXXXXXX` — and the package also installs a `beeline` bin alias.
64
+
65
+ **Requirements:** Node 20.11+, Linux x64, and systemd user services. The published daemon bundle is `linux-x64` only today; macOS is not shipped.
66
+
67
+ ## What happens
68
+
69
+ 1. `connect` redeems the app's one-time pairing code and receives an agent identity for your Workspace.
70
+ 2. It downloads the signed current daemon bundle into `~/.local/lib/beeline` and starts it as a supervised `systemd --user` service, one per agent.
71
+ 3. The agent appears in the Room. Tag it like a teammate.
72
+ 4. Given a repository-bound Room, the agent can open a corner and produce a pull request there.
73
+ 5. The daemon updates itself when a new release ships, draining any turn in flight first, and rolls back if the new bundle cannot answer.
74
+
75
+ Your provider key is not part of any of that. `connect` sends the server the pairing code, the harness name, the provider name, and the model id — never the key. The key is written to your own config directory and handed to the harness as an environment variable when it runs.
76
+
77
+ ## Rooms and corners
78
+
79
+ A Room and a corner are the same conversation surface with different permissions.
80
+
81
+ **In a Room, the agent can:**
82
+
83
+ - read the repository checkout, run searches, read git history — the filesystem is mounted **read-only**;
84
+ - use every MCP tool mounted into its session, and web search where the harness has it (Codex and Claude Code get theirs turned on in the isolated home);
85
+ - read files and photos people share (downloaded to the session for it — it never fetches a URL) and attach a file back to its reply;
86
+ - address any other member, human or agent, by writing `@name`;
87
+ - schedule itself to run again later, once or repeatedly;
88
+ - ask for something outside the sandbox with a grant request;
89
+ - open a corner.
90
+
91
+ **In a Room, the agent cannot:** write to the repository, commit, push, or open a pull request. There is one way to start write work, and it is `open_corner`.
92
+
93
+ **A corner** is a fresh worktree, its own branch, one owning agent, and one fixed objective of at most 24 words. In it the agent works, commits, pushes the branch, runs `gh pr create`, and prints the pull request URL. It then waits for the server's own checks fact — not for whatever `gh` printed locally — and merges only when the checks passed and no human has put the corner on hold. The merge webhook archives the corner and reaps the worktree.
94
+
95
+ The corner receives a GitHub App token scoped to **that one repository**, installed as a worktree-local git credential helper. Your host credential stores are masked out of the sandbox.
96
+
97
+ **Direct messages** are strictly conversational: no repository binding, no corners.
98
+
99
+ ## Security posture
100
+
101
+ - **The filesystem boundary is the sandbox, not a tool list.** Room sessions run under bubblewrap with a read-only view of the checkout, a private `/tmp`, and an isolated home. Every mounted MCP tool is approved tool-by-tool because the sandbox — not an allowlist — is what holds the line.
102
+ - **When the sandbox cannot be built, the daemon says so and keeps serving.** A host with no `bwrap`, or a kernel that refuses unprivileged user namespaces, is logged once at start and every session afterwards runs unwrapped; the read-only rule then rests on the harness's own permission callback, which Codex, Claude Code, and Grok honour. Pi does not ask before it writes, so a Pi Room is only as read-only as its sandbox.
103
+ - **Write access requires a corner.** A corner is a separate worktree on its own branch with a repository-scoped GitHub App token, and it is opened by an explicit host-governed call, never inferred.
104
+ - **Reach outside the sandbox is a grant.** The agent asks — `path`, `host`, `secret`, `device`, `budget`, or `command` — and a card goes to its owner in the Room with the exact ask and the reason. You approve once, always, or deny, and the decision is a line in the transcript. Approving a command grant is word-for-word: an approved `npm test` does not approve `npm test && curl …`, and a command carrying shell metacharacters is refused before it is ever offered.
105
+ - **Yolo mode** flips a single agent to auto-approval, is settable only by the agent's owner or a Workspace manager, and never covers a budget grant.
106
+ - **Provider keys never reach Beeline's servers.** They live in your config directory at mode `0600` and reach only the harness process you already trust with them.
107
+ - **Honest about what is not built yet:** today a `command` grant is the one kind that actually changes what a running agent may do. `path`, `host`, `secret`, `device`, and `budget` grants are requested, decided, and recorded, but are not yet applied to the sandbox.
108
+
109
+ ## Command reference
110
+
111
+ ```text
112
+ beeline connect [XXXXXXXX-XXXXXXXX] Install and connect an app-authorized agent
113
+ beeline start [agent-pubkey] Start — or cleanly restart — this repo's agent
114
+ beeline stop --agent <agent-pubkey> Stop and disable the supervised agent
115
+ beeline update [--check|--status|--rollback|--force]
116
+ Self-update the installed bundle
117
+ ```
118
+
119
+ Runtime state lives in `${XDG_STATE_HOME:-~/.local/state}/beeline/agents/<agent-pubkey>/`. The active bundle is `~/.local/lib/beeline`.
120
+
121
+ ## Tool reference
122
+
123
+ Two MCP surfaces are mounted into every agent session.
124
+
125
+ `beeline-readonly-mcp` — reading, in a Room and in a corner:
126
+
127
+ | Tool | What it does |
128
+ | --- | --- |
129
+ | `list_files`, `read_file` | Walk and read the checkout |
130
+ | `search_text` | Search the checkout |
131
+ | `git_log`, `git_show`, `git_diff`, `git_status` | Read repository history and state |
132
+ | `read_agent_file` | Read the agent's approved skills or Workspace memory |
133
+ | `write_memory` | Replace the agent's private Workspace `MEMORY.md` — the only memory write a Room allows |
134
+
135
+ `beeline-agent` — acting, host-governed:
136
+
137
+ | Tool | Where | What it does |
138
+ | --- | --- | --- |
139
+ | `open_corner` | Top-level Rooms | Open one write-enabled corner with a ≤24-word objective |
140
+ | `pr_checks_status` | Corners | Read the server-posted checks verdict and human hold state |
141
+ | `attach_file` | Everywhere | Attach one file from the checkout or scratch dir to the reply |
142
+ | `create_schedule`, `list_schedules`, `delete_schedule` | Everywhere | Run a prompt again later — interval minutes or a 5-field cron |
143
+ | `request_grant` | Everywhere | Ask the owner for reach outside the sandbox |
144
+ | `run_granted_command` | Everywhere | Run a command an approved grant covers, outside the sandbox |
145
+
146
+ ## The app
147
+
148
+ Beeline is on both stores:
149
+
150
+ - [App Store](https://apps.apple.com/app/id6803948500)
151
+ - [Google Play](https://play.google.com/store/apps/details?id=app.usebeeline.mobile)
152
+
153
+ Sign in with GitHub, and the app hands you the pairing code that `npx usebeeline connect` asks for.
154
+
155
+ ## Beta
156
+
157
+ Beeline is `0.0.x` and moves fast. Concretely, today: the daemon bundle ships for Linux x64 only; corners assume a GitHub repository the app can reach; five sandbox grant kinds are recorded but not yet enforced; and releases are cut by hand rather than on every merge. The pieces described above are the ones that work.
158
+
159
+ ## One README for GitHub and npm
160
+
161
+ `packages/usebeeline/README.md` is the canonical file. The repository's root `README.md` is a byte-for-byte copy of it, generated by `npm run readme:sync` and enforced in CI by `npm run readme:check`, so the GitHub front page and the npm listing always publish the same text. Edit the canonical file, then run the sync.
162
+
163
+ Because one file is rendered from two directories, every link in it is absolute.
164
+
165
+ ## Development
4
166
 
5
167
  ```sh
6
- npx usebeeline connect <PAIRING_CODE_FROM_THE_APP>
168
+ git clone https://github.com/Beeline-Work/beeline.git
169
+ cd beeline
170
+ npm install
171
+ npx turbo run build
172
+ npm run lint
173
+ npx turbo run test
7
174
  ```
8
175
 
9
- The package also exposes a `beeline` bin alias. The connect command uses the
10
- short-lived code minted by the Beeline app, installs the signed current daemon bundle into
11
- the canonical `~/.local` layout, and starts the supervised user service.
176
+ The published CLI is a single bundled file built from `apps/body`:
177
+
178
+ ```sh
179
+ npm run build -w @beeline/body
180
+ npm run build -w usebeeline # esbuild apps/body/dist/cli.js -> packages/usebeeline/dist/usebeeline.mjs
181
+ ```
182
+
183
+ Repository map:
184
+
185
+ ```text
186
+ beeline/
187
+ ├── apps/
188
+ │ ├── auth/ GitHub identity, NIP-05, repository install ceremony
189
+ │ ├── body/ The daemon: harness sessions, Room turns, corners, self-update
190
+ │ ├── gate/ Relay, repository, and provisioning primitives
191
+ │ ├── mobile/ The phone app
192
+ │ ├── push-gateway/ Server-indexed Room surfaces and push delivery
193
+ │ └── server/ The monolith: Workspaces, Rooms, membership, grants
194
+ └── packages/
195
+ ├── api-contract/ Shared vocabulary — faces, grants, system events
196
+ ├── buzz-client/ Signed client for the indexed surfaces
197
+ ├── nostr/ Schnorr-signed events and npub/nsec identity
198
+ └── usebeeline/ This package
199
+ ```
200
+
201
+ The product spec is [`spec.md`](https://github.com/Beeline-Work/beeline/blob/main/spec.md), agent-facing conventions live in [`CLAUDE.md`](https://github.com/Beeline-Work/beeline/blob/main/CLAUDE.md), and the UI contract lives in [`DESIGN.md`](https://github.com/Beeline-Work/beeline/blob/main/DESIGN.md).
202
+
203
+ ## License
12
204
 
13
- The wizard asks exactly for the harness, any required provider credential, the
14
- model, and the agent's soul. OpenRouter defaults to GLM 5.3 Flash.
205
+ `usebeeline` is published as `UNLICENSED`: free to install and run, not licensed for redistribution. A public source licence has not been chosen yet.