diff --git a/claude/.claude-plugin/plugin.json b/claude/.claude-plugin/plugin.json index 48eb453..afbf71b 100644 --- a/claude/.claude-plugin/plugin.json +++ b/claude/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "simular-box", "displayName": "box by Simular", - "version": "0.3.5", + "version": "0.3.6", "description": "Give Claude a computer of its own: a cloud Linux desktop with Chrome and a shell that it drives over MCP, while your own computer stays free. You sign in once in the browser; no key to paste.", "author": { "name": "Simular", diff --git a/claude/README.md b/claude/README.md index 47b1f85..a5093a6 100644 --- a/claude/README.md +++ b/claude/README.md @@ -18,22 +18,22 @@ Most agents need no plugin: add the MCP server `https://mcp.box.simular.ai/mcp` - **The box MCP server** (`.mcp.json`): `https://mcp.box.simular.ai/mcp`, over HTTP. You sign in once with OAuth in the browser (`/mcp`, pick `plugin:simular-box:box`, Authenticate); there is no key to paste, and the plugin stores none. - **The `box` skill** (`skills/box/SKILL.md`): when to use the box tools and which one fits. - **Offload and back** (`commands/offload.md`, `commands/back.md`, `skills/box-offload/SKILL.md`): `/simular-box:offload` and `/simular-box:back`, below. They and moving files (below) are the only parts of the plugin that run a program on your computer. -- **Moving files** (in `skills/box/SKILL.md`): when you ask Claude to bring a file home from your box or send one to it, Claude runs the same pinned CLI (`npx -y @simular-ai/box@1.2.2 exec` or `rsh`, with `rsync` for folders) in your terminal. It goes only to your own box, over box's API, signed in as you. +- **Moving files** (in `skills/box/SKILL.md`): when you ask Claude to bring a file home from your box or send one to it, Claude runs the same pinned CLI (`npx -y @simular-ai/box@1.3.0 exec` or `rsh`, with `rsync` for folders) in your terminal. It goes only to your own box, over box's API, signed in as you. ## Offload: move a coding task into your box and back -Going offline in the middle of a task? In Claude Code with the plugin, `/simular-box:offload` hands the task to a fresh Claude Code (or Codex) session in your box, which keeps working while you are away; `/simular-box:back` brings its commits and its written hand-over home and merges them. Any other agent or a plain terminal uses `npx @simular-ai/box@1.2.2 offload` and `npx @simular-ai/box@1.2.2 back`. Setup and details: [the CLI's README](https://www.npmjs.com/package/@simular-ai/box). +Going offline in the middle of a task? In Claude Code with the plugin, `/simular-box:offload` hands the task to a fresh Claude Code (or Codex) session in your box, which keeps working while you are away; `/simular-box:back` brings its commits and its written hand-over home and merges them. Any other agent or a plain terminal uses `npx @simular-ai/box@1.3.0 offload` and `npx @simular-ai/box@1.3.0 back`. Setup and details: [the CLI's README](https://www.npmjs.com/package/@simular-ai/box). Offload sends nothing until you run `/simular-box:offload` yourself; moving files sends only what you ask Claude to send. ### What `/simular-box:offload` runs -- **One npx package, pinned to an exact version:** `npx -y @simular-ai/box@1.2.2`, the `simular-box` CLI, built and released by Simular from [simular-ai/box-cli](https://github.com/simular-ai/box-cli) and published to npm as [`@simular-ai/box`](https://www.npmjs.com/package/@simular-ai/box). The pin is exact, never a range, so what runs is the version this plugin was reviewed with. +- **One npx package, pinned to an exact version:** `npx -y @simular-ai/box@1.3.0`, the `simular-box` CLI, built and released by Simular from [simular-ai/box-cli](https://github.com/simular-ai/box-cli) and published to npm as [`@simular-ai/box`](https://www.npmjs.com/package/@simular-ai/box). The pin is exact, never a range, so what runs is the version this plugin was reviewed with. - **Claude's steps** (from `skills/box-offload/SKILL.md`): - 1. Write a hand-over to the file `npx -y @simular-ai/box@1.2.2 offload handover-path` prints, from a fixed template: goal, decisions, files touched, next steps, commands. Secrets go in by name only, never by value. - 2. Run `npx -y @simular-ai/box@1.2.2 offload --kind claude` in your repo. The CLI does every step that follows; the skill tells Claude never to copy files or secrets itself. + 1. Write a hand-over to the file `npx -y @simular-ai/box@1.3.0 offload handover-path` prints, from a fixed template: goal, decisions, files touched, next steps, commands. Secrets go in by name only, never by value. + 2. Run `npx -y @simular-ai/box@1.3.0 offload --kind claude` in your repo. The CLI does every step that follows; the skill tells Claude never to copy files or secrets itself. - **Checks before anything is sent.** The CLI stops, and sends nothing, when the folder is not a git repo, `rsync` is missing, this repo already has an offload in progress, the box's image is too old, or the task needs macOS. It warns, and goes on only after you say yes, when you have untracked files, a `.env` file stays behind, the hand-over names secrets you have not opted in, the code reads environment variables set here but not in the box, the repo uses Git LFS or submodules, it calls local services or VPN-only hosts, or the copy is over 500 MB. -- **Sign-in:** the CLI uses your box account (`npx -y @simular-ai/box@1.2.2 login`, in the browser). Its token is kept in the macOS Keychain, or on Linux in `~/.simular-box/credentials.json` with mode 0600. +- **Sign-in:** the CLI uses your box account (`npx -y @simular-ai/box@1.3.0 login`, in the browser). Its token is kept in the macOS Keychain, or on Linux in `~/.simular-box/credentials.json` with mode 0600. ### What gets uploaded from your repo @@ -58,15 +58,15 @@ Into your own box, the cloud computer of the box account you signed in with, at ### How secrets are handled -- **Opt-in only, per repo, by you.** You run `npx -y @simular-ai/box@1.2.2 offload secrets add ` yourself; the skill tells Claude never to opt one in on its own. The entries are `file:` (for example `file:.env`), `aws` (`~/.aws/credentials`), `kube` (your kubeconfig), `gcloud` (`~/.config/gcloud`, without its logs) and `ssh:` (`~/.ssh/`). Your opt-ins are kept as names and paths only, never values, in `~/.simular-box/offload/repos.json` (mode 0600). +- **Opt-in only, per repo, by you.** You run `npx -y @simular-ai/box@1.3.0 offload secrets add ` yourself; the skill tells Claude never to opt one in on its own. The entries are `file:` (for example `file:.env`), `aws` (`~/.aws/credentials`), `kube` (your kubeconfig), `gcloud` (`~/.config/gcloud`, without its logs) and `ssh:` (`~/.ssh/`). Your opt-ins are kept as names and paths only, never values, in `~/.simular-box/offload/repos.json` (mode 0600). - **In the box, secrets live in memory only:** a tmpfs at `/run/cocoonbox-offload` (mode 0700, owned by the box user, never written to disk and never part of a box snapshot). A file secret is linked into the copy from there; `aws`, `kube` and `gcloud` are handed to the box agent as `AWS_SHARED_CREDENTIALS_FILE`, `KUBECONFIG` and `CLOUDSDK_CONFIG`; ssh keys are loaded into an ssh-agent and their files deleted. - **Wiped** when you bring the task back, when an offload fails, and when the next offload of the repo starts. ### How permissions work on the box - The agent in the box runs with permission prompts off: `claude --dangerously-skip-permissions` (Codex: `--dangerously-bypass-approvals-and-sandbox`), so it can keep working while you are away. Claude tells you this when the offload finishes. -- What it can reach is the box itself: a separate cloud computer, not yours. It holds the repo copy, the secrets you opted in for this repo, the box CLI's own sign-in (`npx -y @simular-ai/box@1.2.2 offload sign-in --kind claude`, done by you once per box), and whatever you signed in to in the box's browser. Opt in only the secrets the task needs. -- You can watch it, answer its questions and stop it: `npx -y @simular-ai/box@1.2.2 offload inbox` shows what it posted, `offload send ""` answers, `offload status` shows whether it is working, and offload prints an `rsh -t … tmux attach` line to watch its terminal. You can also watch the box's screen at https://box.simular.ai/box. +- What it can reach is the box itself: a separate cloud computer, not yours. It holds the repo copy, the secrets you opted in for this repo, the box CLI's own sign-in (`npx -y @simular-ai/box@1.3.0 offload sign-in --kind claude`, done by you once per box), and whatever you signed in to in the box's browser. Opt in only the secrets the task needs. +- You can watch it, answer its questions and stop it: `npx -y @simular-ai/box@1.3.0 offload inbox` shows what it posted, `offload send ""` answers, `offload status` shows whether it is working, and offload prints an `rsh -t … tmux attach` line to watch its terminal. You can also watch the box's screen at https://box.simular.ai/box. ## Adding an agent diff --git a/claude/skills/box-offload/SKILL.md b/claude/skills/box-offload/SKILL.md index 5a535f4..b5c5742 100644 --- a/claude/skills/box-offload/SKILL.md +++ b/claude/skills/box-offload/SKILL.md @@ -5,7 +5,7 @@ description: Hand this coding task to an agent in the user's box (their cloud co The agent in the box starts fresh. It knows only what your hand-over says, plus the repo. Write the hand-over as if for a capable engineer who has never seen this conversation. -`box` below is `npx -y @simular-ai/box@1.2.2`. Run it in the repo the user works in. It does every +`box` below is `npx -y @simular-ai/box@1.3.0`. Run it in the repo the user works in. It does every mechanical step: never copy files or secrets yourself, never print a secret, never edit the files it writes. The CLI prints follow-up commands as `simular-box ...`; that name is not on PATH under npx, so diff --git a/claude/skills/box/SKILL.md b/claude/skills/box/SKILL.md index 9cfa89f..8f164b9 100644 --- a/claude/skills/box/SKILL.md +++ b/claude/skills/box/SKILL.md @@ -19,11 +19,11 @@ box is the user's own cloud Linux desktop. Its tools come from the `box` MCP ser The box tools act inside the box, and `read_file` reads text only. When the user asks to bring a file home or send one to the box, and you also have a shell on the user's computer (Claude Code, Codex and other CLI agents), use the box CLI there. It runs over box's API as the signed-in user, and the copy is byte for byte: -- Download a file: `npx -y @simular-ai/box@1.2.2 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.2 exec -c 'cat > /home/user/data.csv' < data.csv` -- A folder, either way, with rsync. The host is the box's name from `box_list` (or `npx -y @simular-ai/box@1.2.2 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.2 rsh" main:/home/user/out/ ./out/` +- Download a file: `npx -y @simular-ai/box@1.3.0 exec -- cat /home/user/report.pdf > report.pdf` +- Upload a file: `npx -y @simular-ai/box@1.3.0 exec -c 'cat > /home/user/data.csv' < data.csv` +- A folder, either way, with rsync. The host is the box's name from `box_list` (or `npx -y @simular-ai/box@1.3.0 ls`): `rsync -az -e "npx -y @simular-ai/box@1.3.0 rsh" main:/home/user/out/ ./out/` -Send only what the user asked for: never a secret (`.env`, keys, credentials) unless the user names that file, and add `--exclude .env` when you rsync a folder up. Don't overwrite a local file without asking; pick a new name instead. `exec` uses the first box unless you add `--box `. If the CLI says it isn't signed in, run `npx -y @simular-ai/box@1.2.2 login` and ask the user to allow it in the browser. Without a shell on the user's computer (ChatGPT, Claude on the web) there is no download yet: tell the user the file's path on the box. +Send only what the user asked for: never a secret (`.env`, keys, credentials) unless the user names that file, and add `--exclude .env` when you rsync a folder up. Don't overwrite a local file without asking; pick a new name instead. `exec` uses the first box unless you add `--box `. If the CLI says it isn't signed in, run `npx -y @simular-ai/box@1.3.0 login` and ask the user to allow it in the browser. Without a shell on the user's computer (ChatGPT, Claude on the web) there is no download yet: tell the user the file's path on the box. ## Working with the user