@bike4mind/cli 4.0.0 → 4.8.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 +184 -4
- package/bin/bike4mind-cli.mjs +249 -40
- package/bin/envFlags.d.mts +17 -0
- package/bin/envFlags.mjs +89 -0
- package/dist/{AgentHistoryStore-DgqmcVLN.mjs → AgentHistoryStore-Bvmcy2kf.mjs} +3807 -1375
- package/dist/{ApiClient-_JrM_xWw.mjs → ApiClient-Yp2LPlX3.mjs} +22 -3
- package/dist/BubblewrapRuntime-OI4qFPNB.mjs +157 -0
- package/dist/ConfigStore-Bo4od3Eu.mjs +2 -0
- package/dist/ConfigStore-CP1W86Ui.mjs +3438 -0
- package/dist/{ConfigStore-BwqsQ0U9.mjs → Logger-3RbeTZ9o.mjs} +34769 -22138
- package/dist/{ProxyManager-B0-RuR2w.mjs → ProxyManager-TxEKlgdO.mjs} +88 -3
- package/dist/{RemoteSkillSource-qTvRkaNA.mjs → RemoteSkillSource-D_F99yBR.mjs} +5 -0
- package/dist/{SandboxOrchestrator-BcUv9fQ3.mjs → SandboxOrchestrator-lpxVEFO7.mjs} +26 -7
- package/dist/SandboxRuntimeAdapter-C3xICJtQ.mjs +190 -0
- package/dist/SandboxRuntimeAdapter-u6c_IrjP.mjs +2 -0
- package/dist/SeatbeltRuntime-Ccd_QbjX.mjs +194 -0
- package/dist/{WorkItemsClient-CERTDrhT.mjs → WorkItemsClient-D4sFGL9X.mjs} +1 -1
- package/dist/agents/defaults/review.md +8 -1
- package/dist/agents/defaults/test.md +8 -1
- package/dist/buildToolSearch-CqHKSLtG.mjs +417 -0
- package/dist/commands/acpCommand.mjs +26 -20
- package/dist/commands/apiCommand.mjs +3 -5
- package/dist/commands/doctorCommand.mjs +2 -2
- package/dist/commands/envCommand.mjs +1 -1
- package/dist/commands/headlessCommand.mjs +118 -37
- package/dist/commands/hostCommand.mjs +2344 -0
- package/dist/commands/mcpCommand.mjs +45 -30
- package/dist/commands/mirrorCommand.mjs +279 -0
- package/dist/commands/modelsCommand.mjs +1117 -0
- package/dist/commands/pluginCommand.mjs +9 -9
- package/dist/commands/skillsCommand.mjs +175 -30
- package/dist/commands/updateCommand.mjs +2 -2
- package/dist/curated-build.json +1 -0
- package/dist/dist-BPhZ0dCz.mjs +4776 -0
- package/dist/dist-K7a9yOUb.mjs +7864 -0
- package/dist/fit-BOnDsgbk.mjs +200 -0
- package/dist/{grepSearch-BgoOOwGe-B388GxRD.mjs → grepSearch-CLtEqT4j-BnKPtNWr.mjs} +2 -2
- package/dist/index.mjs +3215 -508
- package/dist/modelHub-BSB6qRFP.mjs +1963 -0
- package/dist/modelServers-B7zI5XnO.mjs +2465 -0
- package/dist/{package-CQaam4Dq.mjs → package-WlxLVpUb.mjs} +1 -1
- package/dist/{serve-CFxUhjml.mjs → serve-DpsV0mag.mjs} +599 -26
- package/dist/store-Bpdo9Syo.mjs +2 -0
- package/dist/{store-BbvSi3KK.mjs → store-xeJRhBtO.mjs} +2 -0
- package/dist/types-BFIvwByC.mjs +2 -0
- package/dist/{types-F61_hxmG.mjs → types-CxrzVXel.mjs} +9 -5
- package/dist/{updateChecker-CCLVVdH0.mjs → updateChecker-Boq0RruU.mjs} +7 -29
- package/package.json +17 -14
- package/dist/BubblewrapRuntime-5bLPTwEC.mjs +0 -72
- package/dist/SandboxRuntimeAdapter-BgLUVTJL.mjs +0 -57
- package/dist/SandboxRuntimeAdapter-Bt1wPpld.mjs +0 -2
- package/dist/SeatbeltRuntime-C_Y8q8Mr.mjs +0 -124
- package/dist/buildToolSearch-D9GEK91u.mjs +0 -2351
- package/dist/dist-Ul2qwn5x.mjs +0 -624
- package/dist/store-BYeE0shc.mjs +0 -2
- package/dist/types-I45lMh7Q.mjs +0 -2
package/README.md
CHANGED
|
@@ -67,7 +67,31 @@ pnpm rebuild
|
|
|
67
67
|
b4m
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
When you are signed out, the CLI starts on a local model from Ollama or a model server saved in Desktop. With no local model available, it offers Bike4Mind sign-in.
|
|
71
|
+
|
|
72
|
+
### Chat without signing in
|
|
73
|
+
|
|
74
|
+
Start Ollama and pull a model, then open the CLI:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
ollama serve
|
|
78
|
+
# In another terminal:
|
|
79
|
+
ollama pull qwen3.5
|
|
80
|
+
b4m
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The signed-out session lists only local models. Run `/login` to use Bike4Mind cloud models; finish or stop the current reply with Esc before signing in. From a local session, cancelling sign-in returns you to that session.
|
|
84
|
+
|
|
85
|
+
For headless prompts, save a local default first:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
b4m models use qwen3.5
|
|
89
|
+
b4m -p "say hello" </dev/null
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
A signed-out headless run uses the selected local model or your saved local default. With a cloud default and no saved local default, it exits with an error instead of choosing an arbitrary model. ACP sessions also support local models while signed out.
|
|
93
|
+
|
|
94
|
+
If no local model is found, start Ollama, pull a model, or check the saved model server's address and credentials. A server login hint uses `b4m models servers login <name>`. An expired Bike4Mind sign-in is refreshed at startup; a temporary refresh failure keeps the saved sign-in and uses local models for that run, so restart the CLI to retry.
|
|
71
95
|
|
|
72
96
|
### CLI Flags
|
|
73
97
|
|
|
@@ -81,7 +105,7 @@ A bare positional argument seeds **and** submits the first turn while keeping th
|
|
|
81
105
|
|
|
82
106
|
| Flag | Effect |
|
|
83
107
|
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
84
|
-
| `--dev` | Point the CLI at the local dev server (`http://localhost:3001`) and remember it. Aliases: `--local
|
|
108
|
+
| `--dev` | Point the CLI at the local dev server (`http://localhost:3001`) and remember it. Aliases: `--local` (except after `b4m mcp serve`), single-dash forms. |
|
|
85
109
|
| `--prod` | Point the CLI at Bike4Mind production and remember it. Alias: `--production`. |
|
|
86
110
|
| `--api-url <url>` | Point the CLI at **any** instance — a self-hosted stack, an AWS deployment, `http://localhost:3000`, etc. Clears cached auth (bound to the old origin) and exits; run `b4m` again to sign in. |
|
|
87
111
|
| `--reset-api` | Reset the API URL to the built-in default and clear auth, then exit. |
|
|
@@ -143,8 +167,43 @@ b4m update # Check for and install CLI updates
|
|
|
143
167
|
b4m doctor # Diagnose the CLI installation (Node, registry, ripgrep, native modules)
|
|
144
168
|
b4m skills push <path> # Create a skill from a folder, SKILL.md, or commands/*.md
|
|
145
169
|
b4m skills push <path> --update # Update your skill with the same name without a prompt
|
|
170
|
+
b4m models ls | search | show | curated | pull | rm | use # Find, download and use local models (see below)
|
|
146
171
|
```
|
|
147
172
|
|
|
173
|
+
### Local models
|
|
174
|
+
|
|
175
|
+
`b4m models` manages models on a local Ollama and finds GGUF builds on Hugging Face.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
b4m models ls --ollama-host http://127.0.0.1:11434 # list installed models; a host that answers is saved
|
|
179
|
+
b4m models search qwen2.5 0.5b # Hugging Face GGUF repos: downloads, likes, license, gated
|
|
180
|
+
b4m models show Qwen/Qwen2.5-0.5B-Instruct-GGUF # builds with size, fit, quant and Ollama ref, license, gating
|
|
181
|
+
b4m models curated # Bike4Mind's picks for this computer, then every curated build
|
|
182
|
+
b4m models pull Qwen/Qwen2.5-0.5B-Instruct-GGUF:Q4_K_M
|
|
183
|
+
b4m models pull qwen2.5:0.5b # Ollama registry names (model[:tag], ollama.com/owner/model)
|
|
184
|
+
b4m models pull <ref> --force # pull even when the fit check rates it too large
|
|
185
|
+
b4m models use hf.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF:Q4_K_M # default model for chat
|
|
186
|
+
b4m models rm qwen2.5:0.5b
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`search` hides abliterated and uncensored builds and prints how many it hid; `--include-abliterated` lists them last, labelled as not recommended.
|
|
190
|
+
|
|
191
|
+
`show` rates each build `fits`, `tight` or `too large` for this machine, and `pull` prints the verdict with its reasoning before asking anything. It is a rough estimate using the shared memory-budget and compute-buffer calculations: the file size (plus any vision projector) and compute buffers against the memory a model can use here, at the context the CLI asks Ollama for (the model's trained length capped at 32K, or at `OLLAMA_MAX_NUM_CTX`). `pull` refuses a too-large build unless `--force`. The fit is `unknown`, and never blocks, when download sizes are unavailable, the hardware cannot be read, or the Ollama host is another machine. An Ollama reached through an SSH tunnel on localhost is rated as this machine, so use `--force` when the far host has the memory.
|
|
192
|
+
|
|
193
|
+
`curated` prints the curated list Desktop uses: the list bundled with the CLI, or a newer signed one when this build has a list URL and a trusted key (the published CLI bakes both in once they are configured; otherwise it only has the bundled list). A newer list is checked for at most every 6 hours, for up to 3 seconds, verified against the shipped keys and cached under `~/.bike4mind/model-hub/curated/`; a list that fails verification is ignored and the last good one stays. `--refresh` checks now. `--offline` or `B4M_CURATED=off` uses the last verified cached list (else the bundled one) and makes no request; `pull` accepts `--offline` too. The output names where the list came from. It lists the picks for this computer's memory first, then every build with the ref to pull, its size, license and tags (including the Ollama version a build needs). It contacts no runtime and downloads nothing; pull a row with `b4m models pull <ref>`, which asks for the license as below but does not check the build against the reviewed one. Abliterated builds are never on it, and a license that is not permissive, the model's own or its base model's, is shown as `restricted: <license>` (with `(base: <license>)`) and must be accepted before `pull`. With a saved Ollama host on another machine, the picks still describe this computer.
|
|
194
|
+
|
|
195
|
+
Nothing downloads without confirmation: `pull` prints the size and license first and asks (`--yes` skips the question). A license that is not a permissive open-source one (Apache-2.0, MIT, BSD and similar), or no declared license, is named with a link and must be accepted at a prompt or with `--accept-license`. For Ollama registry models the license is read from the model's own license texts, and only unmodified Apache-2.0 or MIT texts count as permissive. Refs naming any other registry are refused. A gated repo needs access granted on Hugging Face first, `HF_TOKEN` set to that account's token, and your Ollama public key added at https://huggingface.co/settings/keys. Ctrl-C cancels a pull without installing anything; pulling again resumes, and says how much was already downloaded. Without a saved host, `b4m models` uses the first local runtime it detects; a scheme-less host without a port uses 11434, and `--ollama-host ''` clears the saved host. `--output-format json` prints `ls`, `search`, `show` and `curated` as JSON. With a saved host, `b4m -p` fails instead of switching to another model when the model picked with `b4m models use` is not available, or Ollama does not answer.
|
|
196
|
+
|
|
197
|
+
`b4m models servers` also lists saved SSH servers with an invalid port or destination as
|
|
198
|
+
refused and explains what to fix. Remove the server in Desktop and add it again; the CLI
|
|
199
|
+
never edits Desktop's list. You can still clear its CLI credential by name with
|
|
200
|
+
`b4m models servers logout <name>`. During `b4m models servers login`, Ctrl-C ends the
|
|
201
|
+
credential check, prints "Cancelled." and exits with code 130 without saving the credential.
|
|
202
|
+
|
|
203
|
+
`b4m mcp serve` (stdio only) offers the same operations to MCP clients as `models_list`, `models_search`, `models_pull` and `models_remove`, with the same checks. Pull and remove act only on the user's own approval. A client that supports elicitation asks the user directly, showing the size and every license, with a separate tick for a license that is not all permissive. With any other client nothing changes: the tool returns the preview and the `b4m models pull` or `b4m models rm` command for the user to run in a terminal, where the CLI asks them. `models_pull` reports the same fit verdict in its preview and prompt, and refuses a too-large model before asking unless the caller passes `force: true`, which still leaves the download to the user's approval. `models_search` leaves abliterated and uncensored builds out unless `includeAbliterated` is true, and then lists them last, labelled `notRecommended`, as `b4m models search --include-abliterated` does. The host comes from `B4M_OLLAMA_HOST`, the saved host, or detection, as for `b4m models`. `b4m mcp serve --local` serves these four tools alone and needs no Bike4Mind backend.
|
|
204
|
+
|
|
205
|
+
A chat with a model on this computer's Ollama (`http://127.0.0.1:11434`) or on an Ollama model server saved in Desktop uses that model's settings from Desktop's Models screen: a fixed context size, keep-alive, draft tokens, sampling (in place of the CLI's `temperature` preference), max output and, on a model with effort levels such as gpt-oss, its effort. Under Auto the CLI keeps its own context size (the trained length capped at 32K or `OLLAMA_MAX_NUM_CTX`) and only applies the model's cap. The CLI reads `model-settings.json` on every turn and never writes it, but the context size is the one it listed at startup, so a context change takes effect after a CLI restart. The file comes from the same Desktop userData folder as the saved model servers: `B4M_DESKTOP_USER_DATA` when set, else the first of `@bike4mind/desktop` and `Bike4Mind` under the app-data folder that holds `model-servers.json` or `model-settings.json`, or failing that the first that exists (a source run of Desktop uses `Bike4Mind Dev`, so point `B4M_DESKTOP_USER_DATA` at it). From WSL with mirrored networking, set `B4M_DESKTOP_USER_DATA=/mnt/c/Users/<you>/AppData/Roaming/@bike4mind/desktop` to use the Windows Desktop's settings. No file means no settings and values this CLI does not know are ignored; a broken file, or a broken entry for the model in use, fails that model's turns with a message naming the file, the model and the field. `B4M_DESKTOP_MODEL_SETTINGS=<path>` reads another file, which must exist, and `off`, `0`, `false`, `no` or `none` ignores Desktop's settings.
|
|
206
|
+
|
|
148
207
|
### Pushing a local skill
|
|
149
208
|
|
|
150
209
|
Log in with `b4m /login`, then run `b4m skills push ~/.claude/skills/my-skill`.
|
|
@@ -276,7 +335,7 @@ Configuration is stored in `~/.bike4mind/config.json`
|
|
|
276
335
|
|
|
277
336
|
### Authentication
|
|
278
337
|
|
|
279
|
-
|
|
338
|
+
Bike4Mind cloud models use OAuth authentication. You can chat with local models while signed out; run `/login` when you want to use your Bike4Mind account:
|
|
280
339
|
|
|
281
340
|
1. Run `b4m` or use the `/login` command
|
|
282
341
|
2. Visit the verification URL shown in the terminal
|
|
@@ -302,6 +361,11 @@ Because that default is injected only at build time, the endpoint is resolved li
|
|
|
302
361
|
4. Otherwise (a published, unbranded fork with no baked default), the first `b4m` **prompts you
|
|
303
362
|
to choose a backend**.
|
|
304
363
|
|
|
364
|
+
A build with a baked default also shows this picker on a fresh install, listing the default
|
|
365
|
+
first and preselected, then the local dev server and a custom URL. Any choice (the picker,
|
|
366
|
+
`--prod`, `--dev`, `--api-url`, `--reset-api`, `/set-api`, `/reset-api`) is remembered, so
|
|
367
|
+
later launches go straight to sign-in.
|
|
368
|
+
|
|
305
369
|
**Quick switch between local dev and production:** use the `b4m --dev` / `b4m --prod`
|
|
306
370
|
launch flags (see [Switching environments](#switching-environments---dev----prod)).
|
|
307
371
|
They persist your choice and cache auth per-environment. The `/set-api`, `/reset-api`,
|
|
@@ -445,7 +509,9 @@ You can also run any MCP server via npx or custom executables:
|
|
|
445
509
|
|
|
446
510
|
#### Serve Bike4Mind itself as an MCP server (`b4m mcp serve`)
|
|
447
511
|
|
|
448
|
-
The reverse of adding a server: `b4m mcp serve` exposes your Bike4Mind backend to any MCP client (Claude Desktop, editors, other agents). It advertises twenty-
|
|
512
|
+
The reverse of adding a server: `b4m mcp serve` exposes your Bike4Mind backend to any MCP client (Claude Desktop, editors, other agents). It advertises twenty-seven tools (`list_notebooks`, `get_notebook`, `create_notebook`, `rename_notebook`, `clone_notebook`, `delete_notebook`, `list_projects`, `get_project`, `create_project`, `send_message`, `search_knowledge_base`, `list_lakes`, `list_files`, `get_file`, `upload_file`, `generate_sound_effect`, `text_to_speech`, `generate_image`, `create_artifact`, `publish_artifact`, `bob_read_site`, `bob_compare_sites`, `bob_recheck`, `get_bob_report`, `get_bob_comparison`, `list_bob_reports`, `bob_runs_left`) plus four resource templates (`b4m://notebook/{id}`, `b4m://file/{id}`, `b4m://project/{id}`, `b4m://artifact/{id}`), each listable and readable as JSON, and `b4m://agent-quest` - the credential-free manifest for The Open Door, the onboarding quest for agents.
|
|
513
|
+
|
|
514
|
+
Use `upload_file { path: "/path/to/report.pdf", projectId: "project-id" }` to upload a local regular file, or `upload_file { base64: "YWJj", name: "note.txt" }` to send bytes. Choose exactly one source; base64 requires a name. Local files and decoded base64 have a 100 MiB limit, and local dotfiles, hidden directories and links into them are refused. The tool requires `files:write`; an optional `projectId` also requires `projects:write`. Success returns a `fileId` with pending ingestion. If project association fails, the error includes the retained file ID so you can retry association without uploading again.
|
|
449
515
|
|
|
450
516
|
To get answers grounded in a data lake, call `list_lakes`, then `create_notebook { dataLakeId }` with a lake's id, then `send_message { notebookId }` on that notebook: the result carries the `reply` plus the `citables` it was grounded in. `list_lakes` needs a key with `datalake:read` (and data lakes enabled on the instance).
|
|
451
517
|
|
|
@@ -454,8 +520,11 @@ The seven Bob tools read websites with Bob on an instance that serves it. `bob_r
|
|
|
454
520
|
```bash
|
|
455
521
|
b4m mcp serve # stdio (default) - for local clients that spawn the process
|
|
456
522
|
b4m mcp serve --http --port 7000 # stateless streamable HTTP at http://127.0.0.1:7000/mcp
|
|
523
|
+
b4m mcp serve --local # stdio, local model tools only; no backend needed
|
|
457
524
|
```
|
|
458
525
|
|
|
526
|
+
`--local` serves only `models_list`, `models_search`, `models_pull` and `models_remove`, ignores any configured endpoint, and notes this in one stderr line. It is stdio only (`--http` with it is an error, as are `--dev` and `--prod`). Only after `b4m mcp serve` is `--local` serve's own flag and leaves the saved backend alone; before it, as in `b4m --local mcp serve`, it is the `--dev` alias. Without it, `mcp serve` exits with `No API endpoint configured` when no backend is set.
|
|
527
|
+
|
|
459
528
|
Over stdio only, when the caller is entitled to OptiHashi and the key carries `optihashi:read` and `optihashi:compute`, the server also offers `optihashi_solvers` and `optihashi_solve` (a free, bounded classical solver race). With an API key, the CLI first checks the key's own scopes and offers them only when it holds both. The solve input schema comes from the server at startup, with a 5 second discovery budget; restart the session to pick up changed family ids, solver ids or limits. `optihashi_solvers` fetches the current roster on every call. With no entitlement, scopes or feature, they are simply not listed. No paid compute is exposed, and HTTP mode never offers them.
|
|
460
529
|
|
|
461
530
|
Auth precedence is `--api-key` > `B4M_API_KEY` > the stored login; the endpoint is `B4M_API_URL` > `--api-url` > the configured backend. Tool _listing_ needs no credentials, apart from the optional stdio-only tools above, which are fetched once at startup; tool _calls_ authenticate. Prefer `B4M_API_KEY` over `--api-key` (a flag value shows up in process listings). HTTP mode binds loopback only (`127.0.0.1`, `/mcp` path) and requires an `Authorization: Bearer <token>` header on every request. The token is `--token`, else `B4M_MCP_TOKEN`, else a random one generated at startup and printed to stderr (a token you set yourself is printed masked). Prefer `B4M_MCP_TOKEN` over `--token`, which shows up in process listings. The advertised scopes are the recommended key configuration, not per-route hard gates, apart from Bob's, which its routes enforce. See [Serve Bike4Mind as an MCP server](../../BIKE4MIND_CLI.md#serve-bike4mind-as-an-mcp-server-b4m-mcp-serve) for the Claude Desktop config and details. Point an HTTP client at it like this:
|
|
@@ -906,6 +975,117 @@ interactive permission prompt blocks; `PostToolUse` / `Stop` / `UserPromptSubmit
|
|
|
906
975
|
commands remove it. Each hook command runs via a real shell with its stdin piped
|
|
907
976
|
then closed (EOF), so a blocking `cat > <file>` hook returns immediately.
|
|
908
977
|
|
|
978
|
+
### Folder trust on a host launch
|
|
979
|
+
|
|
980
|
+
A launch with a positional prompt **and** at least one host flag (`--mcp-config`,
|
|
981
|
+
`--append-system-prompt`, `--allowedTools`, `--settings`, `--session-id` or
|
|
982
|
+
`--resume`) does not show the folder-trust prompt or the repo MCP-approval prompt,
|
|
983
|
+
since no hook fires for either and the auto-fired turn would wait behind it. An
|
|
984
|
+
untrusted folder's repo config (`CLAUDE.md`, `AGENTS.md`, `.mcp.json`, `.claude/`,
|
|
985
|
+
`.bike4mind/`) stays inert for that session, exactly as if "Not now" had been
|
|
986
|
+
chosen, and nothing is persisted. A one-line notice says so; run `/trust folder`
|
|
987
|
+
to trust it. Pending repo MCP servers stay off with the usual warning. Context the
|
|
988
|
+
host needs should reach the session through `--append-system-prompt` and
|
|
989
|
+
`--mcp-config`.
|
|
990
|
+
|
|
991
|
+
## Local CLI session messaging
|
|
992
|
+
|
|
993
|
+
On macOS and Linux, independently launched interactive CLI sessions can discover
|
|
994
|
+
and message each other without Desktop running. Messaging is off at startup;
|
|
995
|
+
repository settings, agent tools, and saved histories cannot enable it.
|
|
996
|
+
|
|
997
|
+
In two terminals working in the same repository (separate Git worktrees work):
|
|
998
|
+
|
|
999
|
+
1. Run `/peers on api-worker` in the first terminal and `/peers on client-worker`
|
|
1000
|
+
in the second. Each command prints that process's session ID.
|
|
1001
|
+
2. Run `/peers list` to see reachable sessions and their advertised readiness.
|
|
1002
|
+
3. Run `/peers send <session-id> The response field is now displayName.`
|
|
1003
|
+
4. In the recipient, inspect `/peers inbox`, then run `/peers release <message-id>`
|
|
1004
|
+
to approve that message. It runs only when the recipient is safely idle.
|
|
1005
|
+
5. The sender can run `/peers status <session-id> <message-id>` for the exact
|
|
1006
|
+
correlated result. The recipient can send an explicit reply with
|
|
1007
|
+
`/peers reply <received-message-id> Confirmed; the client uses displayName.`
|
|
1008
|
+
|
|
1009
|
+
Incoming messages are held by default. `/peers accept` explicitly allows pending
|
|
1010
|
+
and future incoming messages to start idle model turns and incur usage.
|
|
1011
|
+
`/peers hold` pauses pending delivery; `/peers refuse` rejects incoming work.
|
|
1012
|
+
`/peers cancel <session-id> <message-id>` withdraws an undelivered message, and
|
|
1013
|
+
`/peers delete <message-id>` removes stored message content when safe.
|
|
1014
|
+
`/peers off` unregisters the session and closes its local endpoint.
|
|
1015
|
+
If a receiver has gone away, deleting an unresolved outgoing receipt archives it
|
|
1016
|
+
locally and retains a bounded tombstone. It does not cancel or retry remote work.
|
|
1017
|
+
Already running work may still finish after `/peers off`; its correlated outcome
|
|
1018
|
+
is saved for this conversation's history without starting more work.
|
|
1019
|
+
|
|
1020
|
+
While enabled, the agent has `peer_list`, `peer_send`, and `peer_status` tools, but cannot enable
|
|
1021
|
+
messaging or change inbound policy. Every agent send requires a separate human
|
|
1022
|
+
review, including in auto-accept mode. Peer-origin turns can only send back to
|
|
1023
|
+
their sender and preserve the reply hop limit. A message is peer input, never
|
|
1024
|
+
human permission, and cannot answer approval prompts or bypass denied actions.
|
|
1025
|
+
Approval identifies the recipient process and conversation before sending. If
|
|
1026
|
+
that recipient restarts while approval is pending, request a new approval.
|
|
1027
|
+
The recipient-specific review is the single normal send prompt, and it runs
|
|
1028
|
+
for every payload even in auto-accept mode. Plan mode and explicit tool denials
|
|
1029
|
+
still apply before that review. Human `/peers send` and `/peers reply`
|
|
1030
|
+
commands are independent of the agent's reply chain and send allowance.
|
|
1031
|
+
|
|
1032
|
+
Discovery is limited to the same local user, account/API environment, canonical
|
|
1033
|
+
repository, and additional granted directories. Local-only profiles use the
|
|
1034
|
+
user-owned CLI profile identity. Other projects/accounts and different folder
|
|
1035
|
+
grants cannot communicate in this release; explicit cross-scope pairing is not
|
|
1036
|
+
implemented. Session/model/account/folder changes disable messaging and require
|
|
1037
|
+
another `/peers on`. Automatic delivery is paused outside normal permission mode,
|
|
1038
|
+
while drafting input, while another turn holds the session, and during dialogs.
|
|
1039
|
+
|
|
1040
|
+
Only explicit text crosses the connection. Messages do not expand `@file` or
|
|
1041
|
+
image references, execute slash commands, or attach full conversation histories.
|
|
1042
|
+
Receiving agents can use their own tools subject to their existing permissions.
|
|
1043
|
+
Human input entered during peer work waits for a separate human turn. Its text
|
|
1044
|
+
and expanded file references are not steered into the peer's turn or its result.
|
|
1045
|
+
Custom commands, generated handoffs, compaction, and rewind are unavailable until
|
|
1046
|
+
peer work finishes. Replacing the conversation retires peer enrollment and prevents late
|
|
1047
|
+
peer output from entering the replacement conversation.
|
|
1048
|
+
Transport credentials stay outside model context in owner-only registry files
|
|
1049
|
+
under `~/.bike4mind/peers`. These controls do not isolate malicious programs
|
|
1050
|
+
already running as the same OS user.
|
|
1051
|
+
The CLI secures its own config and peer directories to 0700 when enabling peers;
|
|
1052
|
+
it does not change arbitrary parent-directory permissions. Unsafe ancestors or
|
|
1053
|
+
uncertain stale enrollment claims produce an actionable error instead of being
|
|
1054
|
+
silently trusted. A terminal transport failure disables peer tools and prints a
|
|
1055
|
+
notice; re-enroll only after resolving the reported problem.
|
|
1056
|
+
|
|
1057
|
+
Messages are limited to 8 KiB UTF-8, with 20 pending messages per recipient,
|
|
1058
|
+
two agent sends per turn, a five-hop reply-chain limit, and per-sender rate
|
|
1059
|
+
limits. Pending messages expire after 15 minutes. Receipt content is bounded
|
|
1060
|
+
and retained for up to seven days; unresolved outgoing receipts in the current
|
|
1061
|
+
process retain visible status metadata until reconciled. Correlated result
|
|
1062
|
+
previews are bounded separately.
|
|
1063
|
+
Queued/held, delivered, completed, stopped, cancelled, failed, expired, rejected,
|
|
1064
|
+
and unknown are separate states. Completed means the turn finished, not that its
|
|
1065
|
+
claims were independently verified. An ambiguous disconnect is unknown; do not
|
|
1066
|
+
blindly resend it.
|
|
1067
|
+
Sender-side deadlines cannot prove remote work expired. Unconfirmed outgoing
|
|
1068
|
+
work remains unknown and visible until its remote status is reconciled, including
|
|
1069
|
+
when the recipient started running before the deadline. If that receiver is no
|
|
1070
|
+
longer discoverable, the user can archive the local receipt without claiming the
|
|
1071
|
+
execution stopped.
|
|
1072
|
+
If a model turn finishes but its conversation history cannot be saved, the receipt
|
|
1073
|
+
reports a storage failure with the completed result. This does not mean the work
|
|
1074
|
+
never ran; do not automatically retry it.
|
|
1075
|
+
|
|
1076
|
+
Each launch has a new process identity, separate from its saved conversation.
|
|
1077
|
+
Use distinct saved conversations for concurrent processes. Peer enrollment is
|
|
1078
|
+
serialized per account, project, and saved conversation. This is not a general
|
|
1079
|
+
lock on history files used by sessions that have not enabled peer messaging.
|
|
1080
|
+
Old process addresses are not redirected to resumed histories. Restarted work
|
|
1081
|
+
does not replay pending peer messages automatically. `/peers inbox` can show
|
|
1082
|
+
retired receipts for the same saved conversation; unfinished historical work is
|
|
1083
|
+
marked unknown and must be reconciled manually. When context needs compaction,
|
|
1084
|
+
peer work stops before starting a model turn; compact manually and enable peers
|
|
1085
|
+
again. Native Windows, headless/ACP
|
|
1086
|
+
enrollment, cross-machine delivery, mid-turn injection, shared task boards, and
|
|
1087
|
+
autonomous coordination are outside this first release.
|
|
1088
|
+
|
|
909
1089
|
## License
|
|
910
1090
|
|
|
911
1091
|
Private - Bike4Mind
|