friend-assistant 0.1.73 → 0.1.74
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 +22 -8
- package/dist/BUILD.json +2 -2
- package/dist/friend.mjs +327 -164
- package/dist/sandbox-child.mjs +318 -0
- package/dist/web/assets/{OrgParts-CKm9GiMe.js → OrgParts-Do6LghTp.js} +1 -1
- package/dist/web/assets/{index-Ds89qbOY.js → index-D-7sGBTA.js} +24 -24
- package/dist/web/assets/{jarvis-ui-P2GxXH_b.js → jarvis-ui-BAYSuxFl.js} +1 -1
- package/dist/web/assets/{jarvisTree-DL1hkJfL.js → jarvisTree-UR7AWNFs.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ friend onboard
|
|
|
18
18
|
`friend onboard` is a guided setup, one step at a time. Press Enter to take the suggestion at any question; run it again and it carries on where it stopped.
|
|
19
19
|
|
|
20
20
|
1. **Welcome**: what is about to happen.
|
|
21
|
-
2. **What you want to use**: pick any of: Claude through your subscription (Claude Code), Claude with an API key, a model on this PC (Ollama), voice, safe code running (
|
|
22
|
-
3. **What this PC needs**: it checks Node.js, plus only what your choices need: Python (voice),
|
|
21
|
+
2. **What you want to use**: pick any of: Claude through your subscription (Claude Code), Claude with an API key, a model on this PC (Ollama), voice, safe code running (built in, nothing to install).
|
|
22
|
+
3. **What this PC needs**: it checks Node.js, plus only what your choices need: Python (voice), Ollama, Claude Code, and whether the port is free. Docker is optional and is not asked for. For each missing one it shows the exact command (`winget` on Windows, `brew` on a Mac, `apt` on Linux, `npm` for Claude Code), asks **before** installing, runs it one by one with the output visible, and checks again. If a program was installed but this terminal cannot see it yet, it tells you to open a new terminal and run `friend onboard` again.
|
|
23
23
|
4. **Your account**: password and PIN (each typed twice) and the assistant's name.
|
|
24
24
|
5. **How Friend thinks**: signs in to Claude if needed (`claude auth login`), asks for an API key, or downloads the local model, and sets the safety net (the local model behind Claude).
|
|
25
25
|
6. **Voice**: a female or male voice, then the speech models (about 250 MB).
|
|
@@ -42,7 +42,7 @@ Every command starts with `friend`. If you run Friend from the source code, writ
|
|
|
42
42
|
| `friend onboard --yes` | Takes every suggestion without asking (passwords and keys are still asked). | You want the defaults quickly. |
|
|
43
43
|
| `friend onboard --redo <step>` | Runs one step again. Steps: welcome, features, prereqs, account, model, voice, workspace, network, look, finish. | You want to change one thing, for example `friend onboard --redo look` or `--redo network`. |
|
|
44
44
|
| `friend onboard --reset` | Forgets what the wizard has done so far and starts over. Your account and settings stay. | The wizard's memory of its steps is wrong. |
|
|
45
|
-
| `friend doctor` | Shows what this PC has (Node.js, Python, Docker, Ollama, Claude Code, the port) and the exact command to fix what is missing. Changes nothing. | Something does not work, or before asking for help. |
|
|
45
|
+
| `friend doctor` | Shows what this PC has (Node.js, Python, Docker (optional), Ollama, Claude Code, the port) and the exact command to fix what is missing. Changes nothing. | Something does not work, or before asking for help. |
|
|
46
46
|
| `friend setup` | Only creates the owner account: password, PIN, assistant name, workspace folder, API key, voice. | You want the plain version without the wizard. |
|
|
47
47
|
| `friend status` | Prints the saved settings: data folder, owner, address, public URL, workspace, model, whether an API key is set. | A quick look at how Friend is set up. |
|
|
48
48
|
| `friend version` | Prints the version. | Reporting a problem, or checking an update. |
|
|
@@ -157,6 +157,7 @@ Connectors (Gmail, Chrome control, any MCP service) are managed inside the app,
|
|
|
157
157
|
| `session.autoCompact` | With Claude Code, Friend keeps one long conversation and re-reads all of it for every answer. On (default): when it grows past `session.compactAtTokens`, Friend writes short notes on it and starts a fresh conversation from them before the next answer. Off: it only tidies when you press Tidy up now. |
|
|
158
158
|
| `session.compactAtTokens` | How big the conversation may grow before it is tidied up by itself, in tokens (50000 to 800000, default 100000). A fresh conversation already starts near 36000. |
|
|
159
159
|
| `voice.enabled`, `voice.sttModel`, `voice.ttsVoice`, `voice.language`, `voice.speakTyped`, `voice.duck`, `voice.duckPercent`, `voice.accept`, `voice.challenge` | Speech on or off, the listening model, the speaking voice, a forced language, speaking typed replies, turning music and video down while you talk and while Friend speaks (and how far, in percent), and the two thresholds for recognising your voice. |
|
|
160
|
+
| `codeRunner` | Where the code the assistant writes runs: `auto` (the default: Docker when it is installed and running, otherwise the sandbox built into Friend), `sandbox` (always the built-in one, nothing to install) or `docker` (always Docker). Easier: Esc → Settings → Approvals. Changing it needs your PIN. |
|
|
160
161
|
| `phoneApprovals.enabled`, `phoneApprovals.channel`, `phoneApprovals.delaySec`, `phoneApprovals.buttons`, `phoneApprovals.allowRisky`, `phoneApprovals.batchSec` | Approving from your phone when you are away from the screen: on or off, which linked app is asked (`auto`, `telegram`, `whatsapp`), how many seconds to wait for the screen first (0 to 110), Telegram Allow / Deny buttons, whether the camera and the Office's requests may also be answered there, and how many seconds (0 to 30) questions that pile up are gathered into one message. See `docs/guides/phone-approvals.md`. |
|
|
161
162
|
| `audit.keepDays`, `audit.archive`, `audit.sealAt`, `audit.unlockMinutes` | The audit trail: days kept before older entries are archived and removed (90; 0 keeps everything), whether a verifiable archive is kept, the time the daily seal goes to your phone (09:00; empty turns it off), and how many minutes the audit screen stays open after your PIN (10). |
|
|
162
163
|
| `bind`, `port` | Where Friend listens (easier: `friend lan`). |
|
|
@@ -461,22 +462,35 @@ Plugins add **skills** (instructions the agent loads when they fit, for example
|
|
|
461
462
|
|
|
462
463
|
- Manage them from the screen (Esc, then **Plugins**) or the terminal: `friend plugin catalog | list | install <name|folder> | enable <id> | disable <id> | remove <id>`.
|
|
463
464
|
- **Installing shows what is inside and needs your confirmation (the PIN in the browser).** Switching a plugin on needs the PIN too; switching off and removing do not.
|
|
464
|
-
- A plugin's tools can never be more powerful than the code sandbox: they run in a throwaway Docker container
|
|
465
|
+
- A plugin's tools can never be more powerful than the code sandbox: they run in the same sandbox as the code the agent writes (a throwaway Docker container when Docker works, otherwise the sandbox built into Friend; no network, no access to your files, time and memory limits), get their arguments as `/work/args.json`, and **ask for your approval on every call**. Skills are text only: they give the model words, never power, and cannot override your rules or the approval system.
|
|
465
466
|
- Plugins are validated strictly (lowercase ids, size and file-count limits, no links, every file must be inside the plugin folder) and re-validated each time Friend loads; a broken plugin is switched off with a visible reason.
|
|
466
467
|
- Make your own: a folder with `plugin.json` plus the files it names, then `friend plugin install ./my-plugin`. See `docs/superpowers/specs/2026-10-08-friend-plugins-design.md` for the format. Downloading plugins from the internet is deliberately not supported yet (it needs signed packages to be safe).
|
|
467
468
|
|
|
468
|
-
## Running code safely
|
|
469
|
+
## Running code safely
|
|
469
470
|
|
|
470
|
-
The agent can write a program (Python, Node or shell), run it, and read the result: calculations, data crunching, quick experiments.
|
|
471
|
+
The agent can write a program (Python, Node or shell), run it, and read the result: calculations, data crunching, quick experiments. **Nothing needs to be installed**: Friend has its own sandbox. If you have Docker, Friend can use that instead (a real container, a real shell). The setting `codeRunner` chooses: `auto` (the default: Docker when it is installed and running, otherwise the built-in sandbox), `sandbox` or `docker`. The result tells the agent (and the log) which one ran. With `auto`, if Docker is installed but not running, the run goes to the built-in sandbox instead and the result says so; set `codeRunner` to `docker` if you never want that.
|
|
471
472
|
|
|
472
|
-
Every run asks for your approval, and the card shows the **whole program**.
|
|
473
|
+
Every run asks for your approval, and the card shows the **whole program**.
|
|
474
|
+
|
|
475
|
+
**The built-in sandbox** runs each program in its own, fresh, locked-down Node.js process (Node's permission model: no reading files outside Friend's own program folders, no starting other programs, no threads, a neutral environment (no user name, home folder or PATH of yours), the network switched off (TCP, UDP and DNS), 512 MB of memory, killed at the time limit):
|
|
476
|
+
|
|
477
|
+
- **JavaScript** runs in QuickJS: plain JavaScript with `console.log` and `readFile(name)` for the files it was given. No `require`, no `fetch`, no `process`.
|
|
478
|
+
- **Python** runs in Pyodide: the standard library only (no numpy or pandas). Start-up takes about a second.
|
|
479
|
+
- **Shell** runs in an emulated bash (just-bash) over an in-memory folder: pipes, redirections, loops and a fixed set of commands (`grep`, `sed`, `awk`, `sort`, `wc`, `tr`, `jq`, and more). It is not a real shell: a script that needs `curl`, `git` or a compiler stops with a message naming the command. Use Docker for those.
|
|
480
|
+
- Files: a program sees only its own code and the files it was handed, in memory. Nothing is kept between runs.
|
|
481
|
+
- Needs Node.js 20.19 or newer for the shell part (the permission feature comes with Node 20 and later).
|
|
482
|
+
|
|
483
|
+
`pnpm test` runs hostile programs against the built-in sandbox in every language (reading the data folder and the environment, network attempts, endless loops, endless output, memory hogs) and confirms each is stopped and the next run still works.
|
|
484
|
+
|
|
485
|
+
**With Docker** (`codeRunner: docker`, or `auto` when Docker is running), each run is its own throwaway container:
|
|
473
486
|
|
|
474
487
|
- `--network none`: no internet and no DNS; it cannot send anything anywhere.
|
|
475
488
|
- It sees none of your files: only its own code is mounted, read-only. The root filesystem is read-only; only a 64 MB scratch `/tmp` is writable.
|
|
476
489
|
- Not root (user 65534), all capabilities dropped, `no-new-privileges`, 512 MB memory (no swap), 1 CPU, at most 128 processes.
|
|
477
490
|
- A time limit (10 s by default, 60 s at most); after that the container is killed and removed. Output is cut at 20,000 characters.
|
|
491
|
+
- The first use of each language downloads a small image (about 50 MB), so that one run needs internet; after that it works offline. [Docker Desktop](https://www.docker.com/products/docker-desktop/) is needed on Windows and Mac (Windows Sandbox is not needed, so Windows Home works); on Linux, Docker Engine.
|
|
478
492
|
|
|
479
|
-
|
|
493
|
+
The Docker tests include a check against real containers that runs hostile code (network attempts, writes outside `/tmp`, memory hog, endless loop, fork bomb) and confirms each is stopped.
|
|
480
494
|
|
|
481
495
|
## Free-form pages (sandbox)
|
|
482
496
|
|
package/dist/BUILD.json
CHANGED