diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0d601d..5d943f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,8 @@ name: CI # repo publishes no CLI to npm (the old JavaScript CLI that lived in cli/ was retired); the Pi # package in pi/ is published by release-pi.yml on a pi-v* tag. # -# Every non-draft PR that touches a plugin folder or e2e/ runs: +# Every non-draft PR that touches a plugin folder, shared/, scripts/ or e2e/ runs: +# skills the per-host skill copies match what scripts/gen-skills.mjs writes from shared/ # plugins each agent's own validator over the plugin folders, and the Claude plugin's CLI pin # clients Layer 1: the pinned CLI against each real, installed client in an isolated HOME # (versions pinned in e2e/clients.json). No secrets. @@ -27,6 +28,11 @@ on: - 'openclaw/**' - 'pi/**' - 'grok/**' + - 'cursor/**' + - 'openai/**' + - 'gemini/**' + - 'shared/**' + - 'scripts/**' - '.claude-plugin/**' - '.github/workflows/ci.yml' push: @@ -35,6 +41,8 @@ on: - 'e2e/**' - 'claude/**' - 'claude-code/**' + - 'shared/**' + - 'scripts/**' - '.claude-plugin/**' - '.github/workflows/ci.yml' workflow_dispatch: @@ -51,6 +59,46 @@ defaults: shell: bash jobs: + skills: + name: Skill copies match shared/ + if: github.event_name != 'pull_request' || !github.event.pull_request.draft + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + fetch-depth: 2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version: 24 + - name: Regenerate and compare + # Each host folder ships its own copy of the box skill (folders are installed on their + # own, without symlinks); shared/skills/ is the one source. Edit there, then run + # `node scripts/gen-skills.mjs` and commit what it writes. + run: | + set -euo pipefail + node scripts/gen-skills.mjs + # status also catches a host's file that was never committed (untracked). + if ! git diff --exit-code || [ -n "$(git status --porcelain)" ]; then + git status --short + echo "::error::The skill copies differ from shared/skills/. Run 'node scripts/gen-skills.mjs' and commit the result." + exit 1 + fi + - name: Flag changes to claude/ (the version under Claude directory review) + # Any commit that changes claude/ replaces the plugin version Anthropic is reviewing. A + # warning, not a failure, so a deliberate directory update can still go through. + if: github.event_name == 'pull_request' + run: | + set -euo pipefail + # On a pull_request run HEAD is the merge commit, and HEAD^1 the base branch. + if ! git diff --quiet HEAD^1 HEAD -- claude/; then + git diff --stat HEAD^1 HEAD -- claude/ + echo "::warning::This PR changes claude/, the plugin under Claude directory review. Merging it replaces the reviewed version." + else + echo "claude/ unchanged" + fi + plugins: name: Validate plugin folders if: github.event_name != 'pull_request' || !github.event.pull_request.draft diff --git a/README.md b/README.md index b01ab9c..8cf53d5 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,12 @@ Going offline in the middle of a task? In Claude Code with the plugin, `/simular ## Adding an agent -Add a folder named after the agent with its own manifest, MCP config and, where the agent supports skills, a copy of `claude-code/skills/box/SKILL.md`. Point it at `https://mcp.box.simular.ai/mcp`. Use OAuth sign-in where the agent supports it; otherwise read a personal key from an environment variable or the agent's own credentials store, never from a file in the package. Add a row above. +Add a folder named after the agent with its own manifest, MCP config and, where the agent supports skills, its copy of the box skill. Don't copy the skill by hand: add the host to `shared/skills/box/hosts.json` (where its file goes, and any per-host variant from `shared/skills/box/variants/`), run `node scripts/gen-skills.mjs` and commit the file it writes. Point it at `https://mcp.box.simular.ai/mcp`. Use OAuth sign-in where the agent supports it; otherwise read a personal key from an environment variable or the agent's own credentials store, never from a file in the package. Add a row above. ## Releasing +The box skill's text lives in `shared/skills/box/`: `SKILL.md` holds the common text, `variants/` the parts that differ on purpose per host (marked `...` in `SKILL.md`), and `hosts.json` which host gets which. Edit it there, run `node scripts/gen-skills.mjs` (Node, no dependencies) and commit the files it writes in each host folder; never edit a host's copy directly. CI fails when the committed copies differ from the generator's output. Then bump the version, as below, only for the hosts whose generated file changed (`git status` shows them). The CLI pin in the generated skills (`{{CLI_VERSION}}`) is read from `claude-code/skills/box-offload/SKILL.md`, so a CLI pin change regenerates every host's skill. + - `claude-code/` and `claude/`: bump `version` in both `.claude-plugin/plugin.json` files (`claude/` is the directory listing, `claude-code/` the marketplace). Claude Code doesn't auto-update third-party marketplaces: users get it with `/plugin marketplace update simular-box` and `/plugin update simular-box@simular-box`, or with `npx @simular-ai/box connect`. - `openclaw/`: bump `version` in `openclaw/package.json` and `openclaw/openclaw.plugin.json`, then `npm run build` and `clawhub package publish .` from `openclaw/`. - `cursor/`: bump `version` in `cursor/.cursor-plugin/plugin.json`. Cursor re-reads the repo after the first review; a new listing goes through cursor.com/marketplace/publish. @@ -43,5 +45,5 @@ Add a folder named after the agent with its own manifest, MCP config and, where - `hermes/`: bump `version` in `hermes/plugin.json`, merge, then open a PR to [NousResearch/hermes-agent](https://github.com/NousResearch/hermes-agent) that moves `sha:` (and `version:`) in `plugin-catalog/box.yaml` to the merge commit. Hermes installs only the pinned, reviewed commit. - `pi/`: bump `version` in `pi/package.json`, merge to main, then push a matching tag `pi-vX.Y.Z`. `release-pi.yml` publishes `@simular-ai/box-pi` to npm through trusted publishing, with provenance (the first version is published once by hand, see the workflow's header). pi.dev lists packages with the `pi-package` keyword on its own. - `grok/`: bump `version` in `grok/.grok-plugin/plugin.json`, then open a PR to [xai-org/plugin-marketplace](https://github.com/xai-org/plugin-marketplace) that moves the `box` entry's `sha` to the new commit and regenerates its index. -- The Claude plugin's CLI pin: since 1.0.0, `@simular-ai/box` on npm is the Rust CLI released from [simular-ai/box-cli](https://github.com/simular-ai/box-cli). To move the plugin to a new CLI release, change the exact pin `npx -y @simular-ai/box@X.Y.Z` in every `npx -y` command under `claude-code/` and `claude/` and bump both `plugin.json` versions in one PR (CI fails unless every pin under both folders names the same exact version and that version is on npm; never a range, because the Claude directory review requires that what runs is what it read). +- The Claude plugin's CLI pin: since 1.0.0, `@simular-ai/box` on npm is the Rust CLI released from [simular-ai/box-cli](https://github.com/simular-ai/box-cli). To move the plugin to a new CLI release, change the exact pin `npx -y @simular-ai/box@X.Y.Z` in every `npx -y` command under `claude-code/` and `claude/` and bump both `plugin.json` versions in one PR; then run `node scripts/gen-skills.mjs`, which moves every other host's box skill to the same pin, and bump those hosts too (CI fails unless every pin under both folders names the same exact version and that version is on npm; never a range, because the Claude directory review requires that what runs is what it read). - The box CLI (`@simular-ai/box` on npm) is released from simular-ai/box-cli, not from here. `e2e/` tests the pinned version against each real client (versions in `e2e/clients.json`); see `.github/workflows/ci.yml`. diff --git a/claude-code/skills/box/SKILL.md b/claude-code/skills/box/SKILL.md index b3cc241..5ca0c8e 100644 --- a/claude-code/skills/box/SKILL.md +++ b/claude-code/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. The first call signs the user in through their browser once; after that it just works. A sleeping box wakes on the first call, which can take a few seconds. diff --git a/cursor/.antigravity-plugin/plugin.json b/cursor/.antigravity-plugin/plugin.json index 3ff48b0..54d6316 100644 --- a/cursor/.antigravity-plugin/plugin.json +++ b/cursor/.antigravity-plugin/plugin.json @@ -2,7 +2,7 @@ "$schema": "https://antigravity.google/schemas/v1/plugin.json", "name": "simular-box", "displayName": "box by Simular", - "version": "0.1.0", + "version": "0.1.1", "description": "A cloud Linux computer with Chrome and a shell that your agent drives over MCP, while your own computer stays free. Sign in once in the browser.", "logo": "assets/logo.png", "suggestedPrompts": [ diff --git a/cursor/.cursor-plugin/plugin.json b/cursor/.cursor-plugin/plugin.json index f15ea42..c6667b6 100644 --- a/cursor/.cursor-plugin/plugin.json +++ b/cursor/.cursor-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "simular-box", - "version": "0.1.0", + "version": "0.1.1", "description": "Give Cursor's agent 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/cursor/skills/box/SKILL.md b/cursor/skills/box/SKILL.md index 52b0355..5ca0c8e 100644 --- a/cursor/skills/box/SKILL.md +++ b/cursor/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. The first call signs the user in through their browser once; after that it just works. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/gemini-extension.json b/gemini-extension.json index ff41652..363a289 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "simular-box", - "version": "0.1.0", + "version": "0.1.1", "description": "box by Simular: a cloud Linux computer with Chrome and a shell that Gemini drives over MCP. Sign in once in the browser.", "contextFileName": "gemini/GEMINI.md", "mcpServers": { diff --git a/gemini/GEMINI.md b/gemini/GEMINI.md index a3d1bf0..db871a3 100644 --- a/gemini/GEMINI.md +++ b/gemini/GEMINI.md @@ -1,3 +1,4 @@ + # Use box @@ -15,11 +16,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/grok/.grok-plugin/plugin.json b/grok/.grok-plugin/plugin.json index 667675c..70287ee 100644 --- a/grok/.grok-plugin/plugin.json +++ b/grok/.grok-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "box", - "version": "0.1.1", + "version": "0.1.2", "description": "Give Grok 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/grok/skills/box/SKILL.md b/grok/skills/box/SKILL.md index 52b0355..5ca0c8e 100644 --- a/grok/skills/box/SKILL.md +++ b/grok/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. The first call signs the user in through their browser once; after that it just works. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/hermes/plugin.json b/hermes/plugin.json index 47f43ed..4d3fc2b 100644 --- a/hermes/plugin.json +++ b/hermes/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "simular-box", - "version": "0.2.2", + "version": "0.2.3", "description": "Give your agent a computer of its own: a cloud Linux desktop with Chrome and a shell that it drives over MCP, around the clock, while your own machine stays free.", "author": { "name": "Simular", diff --git a/hermes/skills/box/SKILL.md b/hermes/skills/box/SKILL.md index aa40fe6..2517d80 100644 --- a/hermes/skills/box/SKILL.md +++ b/hermes/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server, which authenticates with the user's personal key in `MCP_BOX_API_KEY`. If box's tools fail with an authorization error, ask the user to create a key at https://box.simular.ai/keys and set `MCP_BOX_API_KEY`; never ask them to paste the key into chat. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/openai/plugin.json b/openai/plugin.json index 3bc0c69..5c31362 100644 --- a/openai/plugin.json +++ b/openai/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "box-by-simular", - "version": "1.0.2", + "version": "1.0.3", "description": "Give your AI a computer of its own: a cloud Linux desktop with Chrome and a shell, driven over MCP, while your own computer stays free.", "author": { "name": "Simular", @@ -99,7 +99,7 @@ "commerce": false }, "publication": { - "release_notes": "Signing in to box from ChatGPT now shows that the request comes from chatgpt.com. In Codex, your agent can now move files between your box and your computer when you ask." + "release_notes": "In Codex, moving files between your box and your computer now uses box CLI 1.2.2." } } } diff --git a/openai/skills/box/SKILL.md b/openai/skills/box/SKILL.md index 52b0355..5ca0c8e 100644 --- a/openai/skills/box/SKILL.md +++ b/openai/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. The first call signs the user in through their browser once; after that it just works. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/openclaw/openclaw.plugin.json b/openclaw/openclaw.plugin.json index a4ef185..33eff27 100644 --- a/openclaw/openclaw.plugin.json +++ b/openclaw/openclaw.plugin.json @@ -1,7 +1,7 @@ { "id": "box", "name": "box by Simular", - "version": "0.1.3", + "version": "0.1.4", "description": "Give your OpenClaw agent a computer of its own: a cloud Linux desktop with Chrome and a shell that it drives over MCP, around the clock, while your own machine stays free.", "configSchema": { "type": "object", diff --git a/openclaw/package.json b/openclaw/package.json index cc3c78a..338588f 100644 --- a/openclaw/package.json +++ b/openclaw/package.json @@ -1,6 +1,6 @@ { "name": "@simular-ai/openclaw-box", - "version": "0.1.3", + "version": "0.1.4", "description": "box by Simular for OpenClaw: a cloud Linux desktop your agent drives over MCP.", "type": "module", "license": "MIT", diff --git a/openclaw/skills/box/SKILL.md b/openclaw/skills/box/SKILL.md index 2d1d828..1bd76b3 100644 --- a/openclaw/skills/box/SKILL.md +++ b/openclaw/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. If its tools are missing or fail with an authorization error, ask the user to sign in once: OpenClaw Settings > Plugins > box by Simular > Accounts > Connect. Never ask for passwords or keys in chat. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/pi/package.json b/pi/package.json index a35bd08..c31bd9a 100644 --- a/pi/package.json +++ b/pi/package.json @@ -1,6 +1,6 @@ { "name": "@simular-ai/box-pi", - "version": "0.1.2", + "version": "0.1.3", "description": "box by Simular for the Pi coding agent: a cloud Linux computer with Chrome and a shell that Pi drives over MCP, while your own computer stays free. Sign in once in the browser; no key to paste.", "license": "MIT", "homepage": "https://box.simular.ai", diff --git a/pi/skills/box/SKILL.md b/pi/skills/box/SKILL.md index 54731d4..414cc85 100644 --- a/pi/skills/box/SKILL.md +++ b/pi/skills/box/SKILL.md @@ -3,6 +3,8 @@ name: box description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. --- + + # Use box box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server and are named `mcp__box__`; the most used ones are declared directly, find the rest with `tool_search`. If box's tools are missing or need sign-in, ask the user to run `/mcp login box` once and approve in the browser. A sleeping box wakes on the first call, which can take a few seconds. @@ -19,11 +21,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.1 exec -- cat /home/user/report.pdf > report.pdf` -- Upload a file: `npx -y @simular-ai/box@1.2.1 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.1 ls`): `rsync -az -e "npx -y @simular-ai/box@1.2.1 rsh" main:/home/user/out/ ./out/` +- 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/` -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.1 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.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. ## Working with the user diff --git a/scripts/gen-skills.mjs b/scripts/gen-skills.mjs new file mode 100644 index 0000000..558c822 --- /dev/null +++ b/scripts/gen-skills.mjs @@ -0,0 +1,73 @@ +#!/usr/bin/env node +// Writes each host folder's copy of a shared skill. Every host folder must stand alone (each is +// installed or fetched on its own, without symlinks), so the copies are committed; this script +// keeps them in sync with one source. CI runs it and fails if the committed copies differ. +// +// For each shared/skills//: +// SKILL.md the common text. Parts that differ per host sit between paired markers, +// default text , inline or on their own lines. +// variants/ ..md replaces the text between that pair for the hosts that +// pick it (one trailing newline is dropped). +// hosts.json { cliVersionFrom, hosts: { : { out, variants?, frontmatter?, header? } } } +// out: the file to write; variants: { : }; frontmatter: false +// drops the YAML frontmatter (for a plain context file such as GEMINI.md); +// header: false leaves out the "generated" comment (claude/, whose file must stay +// byte for byte the version under the Claude directory's review). +// {{CLI_VERSION}} becomes the exact box CLI pin read from cliVersionFrom (the file box-cli's +// bump workflow and e2e/cli.mjs read), so all hosts pin the version claude-code/ pins. +// +// Usage: node scripts/gen-skills.mjs (no dependencies; Node 18+) +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const REPO = path.join(path.dirname(fileURLToPath(import.meta.url)), '..') +const FRONTMATTER = /^---\n[\s\S]*?\n---\n/ +const BLOCK = /\n?([\s\S]*?)\n?/g + +const read = (rel) => fs.readFileSync(path.join(REPO, rel), 'utf8') + +function cliVersion(rel) { + const m = read(rel).match(/@simular-ai\/box@(\d+\.\d+\.\d+)/) + if (!m) throw new Error(`no exact @simular-ai/box@X.Y.Z pin in ${rel}`) + return m[1] +} + +function render(skillDir, source, host, config, vars) { + const variants = config.variants || {} + const used = new Set() + let text = source.replace(BLOCK, (_, name, fallback) => { + if (!variants[name]) return fallback + used.add(name) + const file = path.join(skillDir, 'variants', `${name}.${variants[name]}.md`) + return read(file).replace(/\n$/, '') + }) + for (const name of Object.keys(variants)) { + if (!used.has(name)) throw new Error(`${host}: no block in ${skillDir}/SKILL.md`) + } + text = text.replace(/\{\{(\w+)\}\}/g, (m, key) => { + if (!(key in vars)) throw new Error(`${host}: unknown placeholder ${m}`) + return vars[key] + }) + + const header = config.header === false ? '' : `\n` + const fm = text.match(FRONTMATTER) + if (!fm) throw new Error(`${skillDir}/SKILL.md must start with YAML frontmatter`) + const body = text.slice(fm[0].length) + if (config.frontmatter === false) return header + body + return header ? `${fm[0]}\n${header}${body}` : text +} + +for (const name of fs.readdirSync(path.join(REPO, 'shared', 'skills')).sort()) { + const skillDir = `shared/skills/${name}` + const { cliVersionFrom, hosts } = JSON.parse(read(`${skillDir}/hosts.json`)) + const vars = { CLI_VERSION: cliVersion(cliVersionFrom) } + const source = read(`${skillDir}/SKILL.md`) + for (const [host, config] of Object.entries(hosts)) { + const out = render(skillDir, source, host, config, vars) + const target = path.join(REPO, config.out) + const before = fs.existsSync(target) ? fs.readFileSync(target, 'utf8') : null + if (before !== out) fs.writeFileSync(target, out) + console.log(`${before === out ? 'unchanged' : 'wrote '} ${config.out}`) + } +} diff --git a/shared/skills/box/SKILL.md b/shared/skills/box/SKILL.md new file mode 100644 index 0000000..9abde16 --- /dev/null +++ b/shared/skills/box/SKILL.md @@ -0,0 +1,39 @@ +--- +name: box +description: Use box, a cloud Linux computer with Chrome and a shell, when a task needs a real computer - browsing sites (including ones behind a login), filling forms, using desktop apps, or running commands somewhere other than the user's machine. +--- + +# Use box + + +box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. The first call signs the user in through their browser once; after that it just works. A sleeping box wakes on the first call, which can take a few seconds. + + +## Pick the right tool + +- **Shell and files:** `shell` runs a command; `read_file`, `write_file`, `edit_file` and `list_dir` work on the box's files. Prefer these whenever the task can be done without the screen. +- **Web pages:** `browser_navigate` opens a URL, `browser_snapshot` or `browser_read` reads the page, `browser_click`, `browser_type` and `browser_fill` act on elements from the last snapshot, `browser_tabs` manages tabs, `browser_fetch` fetches a URL without rendering. Re-snapshot after the page changes; element refs go stale. +- **Desktop apps:** send a whole GUI plan in one `gui_plan` call (open the app, menu, click, type, wait, save) instead of a chain of single clicks. Use `desk` for one accessibility-tree action, `computer_act` and `computer_state` for raw pointer and keyboard work, and `script_run` for loops over many items. +- **Seeing the screen:** `screenshot` when you need to look; don't take one after every step. +- **The box itself:** `box_status`, `box_list`, `box_wake`, `box_hibernate`, `box_save` and `box_upgrade`. + +## Moving files between box and this computer + +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@{{CLI_VERSION}} exec -- cat /home/user/report.pdf > report.pdf` +- Upload a file: `npx -y @simular-ai/box@{{CLI_VERSION}} 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@{{CLI_VERSION}} ls`): `rsync -az -e "npx -y @simular-ai/box@{{CLI_VERSION}} 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@{{CLI_VERSION}} 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 + + +- The user can watch the box live and take over at https://box.simular.ai/box. Mention it for long tasks. + +- When a step needs the user (a sign-in, a password, a 2FA code, a captcha, a payment), stop and ask them to do it on that page, then continue. Never ask for passwords in chat. + +- When a site in the box's browser shows a sign-in page, don't ask the user for the password. If they use Chrome on a Mac, they can bring that site's sign-in into the box with the box desktop app (the box's Settings > Sign-ins > Import from Chrome) or by running `npx @simular-ai/box credentials import` in a terminal. Either way, they can also sign in themselves in the box's live view. You can only suggest the import, not start it, and some sites still ask to sign in after one. + +- Report what you did and anything you saved on the box, with paths. diff --git a/shared/skills/box/hosts.json b/shared/skills/box/hosts.json new file mode 100644 index 0000000..add5c6e --- /dev/null +++ b/shared/skills/box/hosts.json @@ -0,0 +1,27 @@ +{ + "cliVersionFrom": "claude-code/skills/box-offload/SKILL.md", + "hosts": { + "claude-code": { "out": "claude-code/skills/box/SKILL.md" }, + "claude": { + "out": "claude/skills/box/SKILL.md", + "header": false, + "variants": { "secrets": "claude-directory", "sign-in": "claude-directory" } + }, + "cursor": { "out": "cursor/skills/box/SKILL.md" }, + "grok": { "out": "grok/skills/box/SKILL.md" }, + "openai": { "out": "openai/skills/box/SKILL.md" }, + "hermes": { + "out": "hermes/skills/box/SKILL.md", + "variants": { "intro": "hermes", "view-tool": "box-view", "watch": "box-view" } + }, + "openclaw": { + "out": "openclaw/skills/box/SKILL.md", + "variants": { "intro": "openclaw", "view-tool": "box-view", "watch": "box-view" } + }, + "pi": { + "out": "pi/skills/box/SKILL.md", + "variants": { "intro": "pi" } + }, + "gemini": { "out": "gemini/GEMINI.md", "frontmatter": false } + } +} diff --git a/shared/skills/box/variants/intro.hermes.md b/shared/skills/box/variants/intro.hermes.md new file mode 100644 index 0000000..6e0bbec --- /dev/null +++ b/shared/skills/box/variants/intro.hermes.md @@ -0,0 +1 @@ +box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server, which authenticates with the user's personal key in `MCP_BOX_API_KEY`. If box's tools fail with an authorization error, ask the user to create a key at https://box.simular.ai/keys and set `MCP_BOX_API_KEY`; never ask them to paste the key into chat. A sleeping box wakes on the first call, which can take a few seconds. diff --git a/shared/skills/box/variants/intro.openclaw.md b/shared/skills/box/variants/intro.openclaw.md new file mode 100644 index 0000000..25620dd --- /dev/null +++ b/shared/skills/box/variants/intro.openclaw.md @@ -0,0 +1 @@ +box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server. If its tools are missing or fail with an authorization error, ask the user to sign in once: OpenClaw Settings > Plugins > box by Simular > Accounts > Connect. Never ask for passwords or keys in chat. A sleeping box wakes on the first call, which can take a few seconds. diff --git a/shared/skills/box/variants/intro.pi.md b/shared/skills/box/variants/intro.pi.md new file mode 100644 index 0000000..3f067b5 --- /dev/null +++ b/shared/skills/box/variants/intro.pi.md @@ -0,0 +1 @@ +box is the user's own cloud Linux desktop. Its tools come from the `box` MCP server and are named `mcp__box__`; the most used ones are declared directly, find the rest with `tool_search`. If box's tools are missing or need sign-in, ask the user to run `/mcp login box` once and approve in the browser. A sleeping box wakes on the first call, which can take a few seconds. diff --git a/shared/skills/box/variants/secrets.claude-directory.md b/shared/skills/box/variants/secrets.claude-directory.md new file mode 100644 index 0000000..20c2109 --- /dev/null +++ b/shared/skills/box/variants/secrets.claude-directory.md @@ -0,0 +1 @@ +, and never a secret (`.env`, keys, credentials, cloud or ssh config): add diff --git a/shared/skills/box/variants/sign-in.claude-directory.md b/shared/skills/box/variants/sign-in.claude-directory.md new file mode 100644 index 0000000..42a2146 --- /dev/null +++ b/shared/skills/box/variants/sign-in.claude-directory.md @@ -0,0 +1 @@ +- When a site in the box's browser shows a sign-in page, don't ask the user for the password. Ask them to sign in themselves in the box's live view, then continue. diff --git a/shared/skills/box/variants/view-tool.box-view.md b/shared/skills/box/variants/view-tool.box-view.md new file mode 100644 index 0000000..4909aa3 --- /dev/null +++ b/shared/skills/box/variants/view-tool.box-view.md @@ -0,0 +1 @@ +`box_view`, `box_status` diff --git a/shared/skills/box/variants/watch.box-view.md b/shared/skills/box/variants/watch.box-view.md new file mode 100644 index 0000000..0961841 --- /dev/null +++ b/shared/skills/box/variants/watch.box-view.md @@ -0,0 +1 @@ +- When the user wants to watch, or before a long task, call `box_view` once. A client that renders MCP Apps shows the live screen in the chat; anywhere else (a chat app such as Telegram, Slack or WhatsApp, or a terminal), send the user its `view_url` as a link. That page shows the box live and lets them take over; the first time, they sign in to box there. The box's page is also always at https://box.simular.ai/box.