The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Harness for agents everywhere: a Claude Code and Codex plugin, /agents and llms.txt (#1186)
Deeefa724431890
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonnew file mode 100644index 000000000..234f0ce4f--- /dev/null+++ b/.claude-plugin/marketplace.json@@ -0,0 +1,17 @@+{+ "name": "openharness",+ "description": "Harness for agents: run Claude Code, Codex and other coding agents in parallel, wait for them and read their answers, while the person watches every one.",+ "owner": {+ "name": "Autonomous",+ "url": "https://harness.autonomous.ai"+ },+ "plugins": [+ {+ "name": "harness",+ "source": "./plugins/harness",+ "description": "Start, wait for, read, message and close other coding agents through Harness: the harness skill and Harness's MCP server.",+ "category": "development",+ "tags": ["agents", "parallel", "codex", "claude-code", "orchestration"]+ }+ ]+}diff --git a/.github/workflows/website-checks.yml b/.github/workflows/website-checks.ymlindex d99fe0aaa..8ea85fac4 100644--- a/.github/workflows/website-checks.yml+++ b/.github/workflows/website-checks.yml@@ -49,7 +49,7 @@ jobs:- name: Production build (standalone, with the pinned Flutter bundle)run: npm run build- - name: Verify production routes and static OS page+ - name: Verify production routes and the static OS and agents pagesrun: |set -euo pipefailPORT=3000 HOSTNAME=127.0.0.1 node .next/standalone/server.js > /tmp/website-server.log 2>&1 &@@ -65,4 +65,5 @@ jobs:doneif [ "$ready" != true ]; then cat /tmp/website-server.log; exit 1; finode scripts/check-os-site.mjs+ node scripts/check-agents-site.mjsnode scripts/check-harness-web.mjsdiff --git a/README.md b/README.mdindex 5fac16dd4..b9eb9990c 100644--- a/README.md+++ b/README.md@@ -139,6 +139,14 @@ curl -fsSL https://harness.autonomous.ai/cli/install.sh | bashhn```+**For agents:** Claude Code and Codex can start, wait for and read other harnesses with the `harness` skill+([harness.autonomous.ai/agents](https://harness.autonomous.ai/agents), which has the Codex lines too):++```bash+claude plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin plugins+claude plugin install harness@openharness+```+<details><summary><b>Build from source</b></summary>diff --git a/cli/skills/harness/SKILL.md b/cli/skills/harness/SKILL.mddeleted file mode 100644index cfa8391d2..000000000--- a/cli/skills/harness/SKILL.md+++ /dev/null@@ -1,56 +0,0 @@-----name: harness-description: You are running inside Harness, which can run other coding agents (Claude Code, Codex, and more) as visible sessions on this machine or the person's other machines. Use when the work calls for another model, another machine, a long-running job that should outlive this turn, or something the person should watch; or to check on, message or close harnesses you started. Not for quick fan-out inside one task: use your own sub-agents for that.------# Harness--You are a harness: one agent session that Harness runs and the person can see. You can start other harnesses,-read them, wait for them, message them and close them, with the `harness` command.--## When to use it--Only when your own tools cannot do the job:--1. **Another model**: a second opinion from Codex, a task suited to another agent.-2. **Another machine**: the Mac mini, a GPU box (`harness machines` lists them).-3. **Work that outlives you**: a long job that should keep running after your turn or your context ends.-4. **The person should see it**: everything you start appears in Harness, where they can watch and step in.--A quick parallel search or edit inside your own task is cheaper with your own sub-agents. Do that instead.--## New harness or an existing one--1. Run `harness ps`. It lists the harnesses here: state, who started each, and what each is about.-2. You may give work only to a harness **you started** (STARTED BY says `you`), or to a teammate in a tab with- Agent Messages on (`harness send` alone lists them). A harness the person is driving is theirs: you may- `show` and `wait` on it, never send it work.-3. If one you may use is already on **the same work on the same subject**, and it is idle, send it there: it- has the context. Otherwise start a new one: for unrelated work, for work to run in parallel, for another- agent or machine, or when the matching one is busy with something else.--## The verbs--```-harness ps [--all] # the harnesses here-harness new [agent] [@machine] [folder] --name <name> -- <task>-harness wait <name>[,<name>…] [--any] [--timeout 30m]-harness show <name> # its state, the last ask and its answer-harness send <name> "text" # a follow-up to one you started-harness close <name> # when you are done with one you started-```--- **Always `--name`** what you start (`--name reviewer`): an unnamed harness takes its session's title, which- changes. Every verb also takes the start of an id.-- Put the whole task in `-- <task>`: what to do, where, what done looks like, and how to report back.- The harness reads that it came from you, and how to answer you.-- `wait` exits 0 when it is idle, 3 when it needs the person (a question or a permission: only the person- answers those, so tell them), 4 when it stopped, 124 on timeout.-- Read the result with `show` instead of asking for a summary; send a follow-up only when you need more.-- `close` what you started once you have what you need. It keeps the conversation; the person can resume it.--## Limits--At most 8 live harnesses of yours, 20 starts in 10 minutes, and a harness you start may start others, but-the ones it starts may not. Every limit refuses with a message; do not work around it. Never ask a harness to-publish, deploy, delete or push to main for you: those are the person's to ask for.diff --git a/docs/design/2026-10-11-agent-client.md b/docs/design/2026-10-11-agent-client.mdindex f202228a0..82e20dea5 100644--- a/docs/design/2026-10-11-agent-client.md+++ b/docs/design/2026-10-11-agent-client.md@@ -58,9 +58,11 @@ the owner's Mac, 21 harnesses: 5.8 KB of text, 16.2 KB of JSON). `--json` for prleft empty would have stopped Harness. `close` is the app's close (`agent_close`): it saves the screen, stops theharness and keeps its conversation, and refuses while the harness is working unless `--now`.-The agent's instructions are a skill, [cli/skills/harness/SKILL.md](../../cli/skills/harness/SKILL.md): when to-use Harness at all, the rule below, the verbs and the limits. How it reaches agents (installed for Claude Code-and Codex, or a startup note) is not decided yet.+The agent's instructions are a skill, [plugins/harness/skills/harness/SKILL.md](../../plugins/harness/skills/harness/SKILL.md):+when to use Harness at all, the rule below, the verbs and the limits. Agents outside Harness get it as a Claude Code+and Codex plugin from this repository (`claude plugin install harness@openharness`, `codex plugin add+harness@openharness`, after adding the marketplace; see [harness.autonomous.ai/agents](https://harness.autonomous.ai/agents)).+How it reaches the harnesses Harness starts (installed with the CLI, or a startup note) is not decided yet.### ⌘N or ⌘P: new harness or an existing onediff --git a/docs/research/2026-10-11-where-to-list-harness.md b/docs/research/2026-10-11-where-to-list-harness.mdnew file mode 100644index 000000000..2842a0fa5--- /dev/null+++ b/docs/research/2026-10-11-where-to-list-harness.md@@ -0,0 +1,149 @@+# Where to list Harness for agents++October 11, 2026. A checklist for putting the `harness` plugin, skill and MCP server (`harness mcp`) where agents+and the people who set them up look. Nothing here has been submitted. Each entry says what it takes, what we need+first, and whether what we have qualifies today. Read from each directory's current docs or repository on this+date; anything marked **unverified** could not be confirmed there.++What we have: the marketplace `.claude-plugin/marketplace.json` (name `openharness`) with the plugin+`plugins/harness/` (the `harness` skill and `.mcp.json` running `harness mcp` over stdio), which Claude Code and+Codex both install; [harness.autonomous.ai/agents](https://harness.autonomous.ai/agents) and `/llms.txt`. The MCP+server is local only: it needs the CLI from `curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash`, with no+npm or PyPI package and no remote HTTPS endpoint.++## The one missing piece++Most MCP directories install a server from a package. An **`.mcpb` bundle** on a GitHub release (a small server+manifest whose command is `harness mcp`, and which says the CLI must be installed) unlocks the Official MCP+Registry, Smithery, and PulseMCP after it. An npm package with `mcpName` would also do, as a wrapper only.++## Checklist++### 1. Our own marketplace (Claude Code and Codex) — done in this branch++- [ ] Merge; deploy `/agents` and `/llms.txt` after a CLI release that has the agent verbs and `harness mcp`.+- [ ] Before each change to the plugin: `claude plugin validate --strict .` (fails today only on the missing+ `version`, which is left out on purpose so installs track `main`).++### 2. Anthropic's plugin directory (claude.ai/directory)++Approved plugins are mirrored into `anthropics/claude-plugins-community` (read-only; pull requests there are+closed). `claude-plugins-official` takes no submissions.++1. A paid Claude plan (Pro or Max, or an Owner on Team or Enterprise).+2. Connect GitHub on claude.ai with an account that can push to `autonomous-ai/openharness`.+3. claude.ai/directory/manage → **Submit new** → **Plugin bundle**: repository `autonomous-ai/openharness`, plugin+ path `plugins/harness`.+4. **Validate** → listing details → data handling → compliance acknowledgements → **Submit for review**. An+ automated scan runs; a reviewer publishes.++Needs first: a README for the plugin of at least 40 words and a license (we have both) that discloses what the+plugin runs and fetches, including that the CLI is installed with curl. Expect a hold for review: their checklist+expects a local MCP server to run a file inside the plugin, and ours runs `harness` from `PATH`. The name `harness`+may be held as close to an existing listing (**unverified**).++### 3. Official MCP Registry (registry.modelcontextprotocol.io)++1. `brew install mcp-publisher`; `mcp-publisher init`; fill `server.json`: name, description (100 characters at+ most), version, repository, and `packages[]` with `registryType`, `identifier` and transport `stdio`.+2. Log in for a namespace:+ - `mcp-publisher login github` gives `io.github.autonomous-ai/*`, for an Owner of the GitHub organization; or+ - DNS: a TXT record `v=MCPv1; k=ed25519; p=<public key>` on `autonomous.ai` gives `ai.autonomous/*` and its+ subdomains; or+ - HTTP: `https://harness.autonomous.ai/.well-known/mcp-registry-auth` with the same line gives+ `ai.autonomous.harness/*` only.+3. `mcp-publisher publish`; check `https://registry.modelcontextprotocol.io/v0.1/servers?search=harness`. A+ published version cannot be changed.++Needs first: the package. For `mcpb`: an https release asset on github.com whose URL contains "mcp" (for example+`/autonomous-ai/openharness/releases/download/<tag>/harness-mcp.mcpb`) and its `fileSha256`. A metadata-only entry+may be accepted (**unverified**) but no client could install it. Does not qualify today.++### 4. Smithery (smithery.ai)++1. `npm i -g smithery@latest` (Node 20+); `smithery auth login`.+2. `smithery mcp publish ./harness.mcpb -n <namespace>/harness`. The web form at smithery.ai/new takes only a+ public Streamable HTTP URL.+3. Settings → Verification for the vendor checklist.++Needs first: the same `.mcpb`, and a Smithery namespace (how one is made: **unverified**). Does not qualify today.++### 5. PulseMCP (pulsemcp.com)++Submissions are paused (pulsemcp.com/submit, updated September 3). It says it picks up servers from the Official+MCP Registry, so item 3 covers it.++### 6. Cursor++- **Marketplace** (cursor.com/marketplace/publish; public, open-source repositories; every plugin and update+ reviewed by hand). Cursor encourages a plugin over a standalone MCP listing. Needs first, beside what we have:+ `plugins/harness/.cursor-plugin/plugin.json` (only `name` is required), a root `.cursor-plugin/marketplace.json`+ pointing at `plugins/harness`, and `plugins/harness/mcp.json` with+ `{"mcpServers":{"harness":{"command":"harness","args":["mcp"]}}}`. Test from `~/.cursor/plugins/local/harness` and+ **Developer: Reload Window**. Cursor's docs do not say whether it reads `.claude-plugin`.+- **Add to Cursor link**, no submission: `cursor://anysphere.cursor-deeplink/mcp/install?name=harness&config=eyJjb21tYW5kIjoiaGFybmVzcyIsImFyZ3MiOlsibWNwIl19`+ (the config is base64 of `{"command":"harness","args":["mcp"]}`). It could go on `/agents` once `harness mcp` is+ released.+- **cursor.directory**: answered 429 to every request; **unverified**.++### 7. Glama (glama.ai/mcp/servers)++1. **Add Server** with the repository, then add a Dockerfile in the server's admin page: Glama runs every server in+ a container and lists it when it starts and answers introspection (initialize, tools/list).+2. Claim it: a root `glama.json`, `{"$schema":"https://glama.ai/mcp/schemas/server.json","maintainers":["<github-user>"]}`,+ then run the claim again.++Needs first: the Dockerfile (install the CLI, then `harness mcp`), `glama.json`, and `harness mcp` answering+initialize and tools/list with no daemon or tmux running (not checked). How the score is computed: **unverified**.+A passing Glama listing is what the largest awesome list (item 9) asks for.++### 8. Skills and OpenAI's plugin directory++- **OpenAI's public plugin directory** (ChatGPT and Codex; platform.openai.com/plugins → upload): a verified+ identity, a ZIP with `.codex-plugin/plugin.json` (or `.claude-plugin/plugin.json`, which the portal converts) and+ at least one skill, safety scans, policy attestations, no lifecycle hooks; display name and short description of+ 30 characters at most. With an MCP server it needs a public HTTPS endpoint, so ours goes as **skills only**:+ the skill without `.mcp.json`. Qualifies as skills only.+- **agentskills.io**: the format and a list of clients; no registry.+- **openai/skills**: deprecated in favour of openai/plugins, which OpenAI curates; no contribution path found.+- **anthropics/skills**: no submissions.+- **skills.sh**: ranks skills from the `skills` CLI's usage (`npx skills add autonomous-ai/openharness`); no form;+ how a skill first appears: **unverified**.+- **VoltAgent/awesome-agent-skills**: a pull request adding `- **[autonomous-ai/harness](<url>)** - <10 words or+ fewer>`, titled `Add skill: autonomous-ai/harness`. It asks for real community use first.++### 9. Lists++- **punkpeye/awesome-mcp-servers**: a pull request to README.md, alphabetical under Coding Agents or Developer+ Tools: `- [autonomous-ai/openharness](https://github.com/autonomous-ai/openharness) <Glama badge> 📇 🏠 🍎 🐧 - <description>`.+ Its checks want the Glama listing (item 7) and its badge. Submit as a person, without the agents' fast-track+ marker its CONTRIBUTING mentions.+- **wong2/awesome-mcp-servers**: no pull requests; the form at mcpservers.org/submit (free review within about two+ weeks).+- **appcypher/awesome-mcp-servers**: one item per pull request, at the end of Development Tools; not updated since+ May.+- **hesreallyhim/awesome-claude-code**: the web issue form only, filed by a person; the project must be 14 days old+ and active, or have 100 stars; one line, no emoji.+- **davila7/claude-code-templates** (aitmpl.com): a pull request adding `cli-tool/components/mcps/<category>/harness-mcp.json`;+ every example there uses `npx`, so whether a command on `PATH` is accepted is **unverified**.+- **davepoon/buildwithclaude**: a pull request under `plugins/`, titled "Add harness plugin"; it also says it+ indexes plugin marketplaces (how: **unverified**).+- **claudemarketplaces.com**: updated automatically; no form (**unverified**).+- **RoggeOhta/awesome-codex-cli**: an issue or pull request; Codex-specific entries with a star badge.++## In order++1. Merge this branch and the `harness mcp` change; release the CLI; deploy `/agents` and `/llms.txt`.+2. Anthropic's directory and OpenAI's (skills only): no new files.+3. The `.mcpb` release asset and `server.json`; choose the namespace (an organization Owner for+ `io.github.autonomous-ai`, or the HTTP file on harness.autonomous.ai). Then the Official Registry, Smithery,+ and PulseMCP through the registry.+4. The Cursor files, then its marketplace; the Add to Cursor link on `/agents`.+5. Glama (Dockerfile, `glama.json`), then the MCP awesome lists.+6. The Claude Code and skills lists once the project meets their age and use rules.++Sources read: code.claude.com/docs/en/plugins (marketplaces, publish), claude.com/docs/plugins (submit,+pre-submission checklist); github.com/modelcontextprotocol/registry (docs, validators, auth handlers);+smithery.ai/docs; glama.ai/blog (glama.json, hosting); pulsemcp.com/submit; cursor.com/docs (plugins, MCP install+links); developers.openai.com/plugins (build, submission, submitting a Claude Code plugin); agentskills.io;+skills.sh/docs; and the README and contributing rules of each list above.diff --git a/plugins/harness/.claude-plugin/plugin.json b/plugins/harness/.claude-plugin/plugin.jsonnew file mode 100644index 000000000..f36fbf03b--- /dev/null+++ b/plugins/harness/.claude-plugin/plugin.json@@ -0,0 +1,13 @@+{+ "name": "harness",+ "displayName": "Harness",+ "description": "Start Claude Code, Codex and other coding agents as harnesses the person can watch, then wait for them, read their answers, message them and close them. Uses the Harness CLI.",+ "author": {+ "name": "Autonomous",+ "url": "https://harness.autonomous.ai"+ },+ "homepage": "https://harness.autonomous.ai/agents",+ "repository": "https://github.com/autonomous-ai/openharness",+ "license": "MIT",+ "keywords": ["agents", "parallel", "codex", "claude-code", "orchestration", "tmux", "mcp"]+}diff --git a/plugins/harness/.mcp.json b/plugins/harness/.mcp.jsonnew file mode 100644index 000000000..f5d058f5c--- /dev/null+++ b/plugins/harness/.mcp.json@@ -0,0 +1,8 @@+{+ "mcpServers": {+ "harness": {+ "command": "harness",+ "args": ["mcp"]+ }+ }+}diff --git a/plugins/harness/README.md b/plugins/harness/README.mdnew file mode 100644index 000000000..338773529--- /dev/null+++ b/plugins/harness/README.md@@ -0,0 +1,49 @@+# Harness plugin for Claude Code and Codex++Lets a coding agent use [Harness](https://harness.autonomous.ai/agents): start Claude Code, Codex and other agents+as harnesses the person can watch, wait for them, read their answers, message them and close them.++It holds two things:++- `skills/harness/SKILL.md`: the `harness` skill, in the [Agent Skills](https://agentskills.io) format. When to use+ Harness instead of your own sub-agents, the commands, and the rules.+- `.mcp.json`: Harness's MCP server, `harness mcp` over stdio.++Both need the Harness CLI on the agent's `PATH`:++```+curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash+harness start+```++## Install++Claude Code:++```+claude plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin plugins+claude plugin install harness@openharness+```++Codex:++```+codex plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin --sparse plugins+codex plugin add harness@openharness+```++The marketplace is [`.claude-plugin/marketplace.json`](../../.claude-plugin/marketplace.json) at the root of this+repository; Codex reads the same file. `--sparse` checks out only the marketplace and this folder: on October 11,+2026 that took 4 seconds and 3 MB for Claude Code, against 70 seconds and 670 MB for the whole repository, and+7 against 135 seconds for Codex. Inside a Claude Code session, `/plugin marketplace add autonomous-ai/openharness`+and `/plugin install harness@openharness` do the same, cloning the whole repository. Any other agent that reads `SKILL.md` can take the skill alone: copy+`skills/harness/` into its skills folder (`~/.agents/skills/` for Codex, `~/.claude/skills/` for Claude Code).++## Changing it++The skill describes commands agents run as written, so change it with the CLI (`cli/src/agentClient/`,+`cli/src/lib/newCommand.ts`) and with the pages that say the same: `website/public/agents/index.html` and+`website/public/llms.txt`. Check the plugin with `claude plugin validate .` from the repository root.++The plugin has no `version`, so an install tracks the commit it came from and `claude plugin update` picks up+changes on `main`.diff --git a/plugins/harness/skills/harness/SKILL.md b/plugins/harness/skills/harness/SKILL.mdnew file mode 100644index 000000000..5cfdf21c8--- /dev/null+++ b/plugins/harness/skills/harness/SKILL.md@@ -0,0 +1,110 @@+---+name: harness+description: Harness runs coding agents (Claude Code, Codex and others) as harnesses, sessions the person can watch and join in the Harness app, on this computer or their other machines. Use it to start another agent on work that can run beside yours, needs another agent's view (a review, a second opinion from Codex), takes long, or belongs in its own folder; then wait for it, read its answer and close it. Do small, quick work yourself, and quick fan-out inside one task with your own sub-agents.+---++# Harness++Harness runs coding agents in sessions of their own, called harnesses, and shows each one to the person in its+desktop, web and phone apps. With the `harness` command (or Harness's MCP tools) you can start harnesses, read+them, wait for them, message them and close them.++## Is it here?++Run `harness version`. If there is no such command, Harness is not installed. Ask the person before you install+it; it takes two commands and no account:++```+curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash+harness start+```++`harness start` starts Harness on this computer. Harnesses on this computer need no sign-in; `harness login` is+only for the person's other machines and their phone. If `harness ps` is an unknown command, the CLI is older than+these verbs: `harness update`. The agent you start must be installed as well (`claude` for Claude Code, `codex`+for Codex) and signed in to its own provider.++## When to start a harness++Start one for work that:++1. **can run beside yours**: tests in one folder while you work in another, several tasks at once;+2. **needs another agent's view**: a review, a second opinion from Codex;+3. **takes long**: it keeps running after your turn or your context ends;+4. **belongs in its own folder**, or on another of the person's machines (`harness machines` lists them).++Do small, quick work yourself, and a quick parallel search or edit inside your own task with your own+sub-agents: cheaper and faster. Everything you start appears in Harness, where the person can watch and step in.++## New harness or an existing one++1. List first: `harness ps`. It shows the harnesses here: state, who started each (`you` for yours), and what each+ is about.+2. You may give work only to a harness **you started**, or to a teammate in a tab with Agent Messages on+ (`harness send` alone lists them). Never give work to, or close, a harness you did not start: those are the+ person's. You may `show` and `wait` on them.+3. Follow-ups for the same work go to the harness you started for it, if it is idle and you can message it (see+ below). Otherwise start a new one: for unrelated work, for work to run in parallel, for another agent or+ machine, or when the matching one is busy with something else.++## The verbs++```+harness ps [--all] # the harnesses here+harness new [agent] [@machine] [folder] --name <name> -- <task>+harness wait <name>[,<name>…] [--any] [--timeout 30m]+harness show <name> [--chars N] # its state, the last ask and its answer+harness send <name> "text" # a follow-up to one you started (from inside a harness)+harness close <name> [--now] # when you are done with one you started+```++- **Always `--name`** what you start (`--name reviewer`): an unnamed harness takes its session's title, which+ changes. Every verb also takes the start of an id.+- `agent` is `claude` (the default), `codex`, or another agent installed on that machine. The folder defaults+ to the current directory.+- Put the whole task in `-- <task>`: what to do, where, what done looks like, and what to answer with. A task+ holds 2,000 characters; for a longer one, write it to a file and name the file in the task.+- `wait` exits 0 when it is idle, 3 when it needs the person (a question or a permission: only the person+ answers those, so tell them), 4 when it stopped or is gone, 124 on timeout. `--timeout 0` waits as long as+ it takes.+- Read the result with `show` instead of asking for a summary.+- `close` what you started once you have what you need. It keeps the conversation; the person can resume it.+ It refuses while the harness is working, unless `--now`.+- Add `--json` to any verb for JSON. Every error says what to run next.++## Inside a harness, or outside++- **In a harness** (Harness made your terminal pane): `harness send` works, to what you started and to+ teammates in a tab with Agent Messages on, and the harnesses you start are told how to message you.+- **Outside Harness** (Claude Code or Codex in a terminal app, an editor or the person's own tmux): Harness tells+ you by your session. `harness ps` says "You are Claude Code, outside Harness." and marks what this session+ started as `you`; the limits below apply; and you may close only what this session started. Nothing can+ message you, and `harness send` is not available: put everything in the task, and for a follow-up start a new+ harness with the fuller task.++## Example: a second opinion from Codex++```+harness new codex --name reviewer -- "Review the changes on this branch against main for bugs. Do not edit files. Answer with the findings, most serious first, each with file and line."+harness wait reviewer --timeout 20m+harness show reviewer+harness close reviewer+```++To keep working meanwhile, start it, go on with your own work, and run `harness wait reviewer` when you need+the answer. For several at once, start each with its own name and wait on all of them:+`harness wait api-tests,ui-tests`.++## Harness's MCP tools++If Harness's MCP server (`harness mcp`) is connected, its tools are the same verbs under the same rules:+`harness_list` (ps), `harness_start` (new: task, folder and name, `agent` claude or codex, `machine`),+`harness_wait` (up to 120 seconds by default and 600 at most; if they are still working, call it again),+`harness_read` (show), `harness_close` (close), and `harness_send` (send), offered only inside a harness.++## Limits and rules++- At most 8 live harnesses of yours, 20 starts in 10 minutes, and a harness you start may start others, but+ the ones it starts may not. Every limit refuses with a message; do not work around it.+- Never answer a harness's question or permission prompt yourself, and never type into it some other way.+- Never ask a harness to publish, deploy, delete or push: those are the person's to ask for.diff --git a/website/README.md b/website/README.mdindex 3106d459a..53b17e6be 100644--- a/website/README.md+++ b/website/README.md@@ -14,6 +14,8 @@ retired; only the host routes below were kept.| `/download` (and `/install` → it) | Install page: CLI command and desktop downloads || `/pair` | Phone setup guidance — the mobile app and the desktop "add phone" dialog link here || `/os` | The Harness operating system landing page: plain HTML/CSS, local fonts and screenshots in `public/os/` |+| `/agents` | Harness for agents: install, the agent commands with examples and exit codes, the plugin and skill. One plain HTML file, `public/agents/index.html`, with no script |+| `/llms.txt` | The [llms.txt](https://llmstxt.org) summary for agents, `public/llms.txt` || `/os/latest` | Redirect to the newest complete published OS release; OS tags only, stable preferred, five-minute server lookup cache || `/desktop` | Desktop download page; offers the build for the visitor's OS and CPU (`src/lib/desktopPlatform.ts`), with links to every other build and the CLI command || `/hub`, `/hub/following`, `/hub/yours` | Public three-column gallery, followed creators, and your publications; `?q=`, `?category=` and `?sort=popular` narrow and order them |@@ -28,6 +30,11 @@ retired; only the host routes below were kept.| `/install.sh`, `/cli/install.sh`, `/desktop/install.sh` | Redirect to the installers on `cdn.autonomous.ai` || `ac.autonomous.ai`, `fleet.autonomous.ai` | Redirect to `harness.autonomous.ai` |+`/agents` and `/llms.txt` describe commands agents run as written. `scripts/agents-site.spec.ts` checks every+`harness` command on them against `cli/src/cli.ts`, the exit codes against the agent commands, and the install+lines against `.claude-plugin/marketplace.json`; `scripts/check-agents-site.mjs` checks the built server serves+both unchanged. Change them with the CLI and the [harness skill](../plugins/harness/skills/harness/SKILL.md).+The CLI installer is `cli/scripts/install.sh`. The desktop installer's source is`scripts/desktop-install.sh` here, published with `scripts/upload-desktop-install-sh.sh`.diff --git a/website/next.config.js b/website/next.config.jsindex 47212a9e9..5bb7a9287 100644--- a/website/next.config.js+++ b/website/next.config.js@@ -72,6 +72,8 @@ module.exports = {{ source: '/harness-web', destination: '/harness-web/index.html' },// Plain HTML/CSS; served as a file without a React or Flutter runtime.{ source: '/os', destination: '/os/index.html' },+ // Harness for agents: one plain HTML file (no script, inline style) for agents that fetch it.+ { source: '/agents', destination: '/agents/index.html' },],}},@@ -95,6 +97,14 @@ module.exports = {// Keep the standalone page intact: CDN analytics must not inject JavaScript.headers: [{ key: 'Cache-Control', value: 'no-store, no-transform' }],})),+ ...['/agents', '/agents/index.html', '/llms.txt'].map((source) => ({+ source,+ // Read by agents as written: no CDN script injection or rewriting, and no stale copy after a deploy.+ headers: [+ { key: 'Cache-Control', value: 'no-store, no-transform' },+ { key: 'X-Content-Type-Options', value: 'nosniff' },+ ],+ })),{source: '/os/latest',// Cache the GitHub lookup on the server, never the release redirect in a browser or CDN.diff --git a/website/public/agents/index.html b/website/public/agents/index.htmlnew file mode 100644index 000000000..77617ee7a--- /dev/null+++ b/website/public/agents/index.html@@ -0,0 +1,266 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <link rel="canonical" href="https://harness.autonomous.ai/agents">+ <link rel="alternate" type="text/plain" href="https://harness.autonomous.ai/llms.txt" title="llms.txt">+ <meta name="theme-color" content="#11110f">+ <meta name="description" content="How a coding agent uses Harness to run Claude Code, Codex and other agents in parallel, wait for them, read their answers and close them: install, commands, exit codes and examples.">+ <meta property="og:title" content="Harness for agents">+ <meta property="og:description" content="Run Claude Code, Codex and other agents in parallel from your shell, wait for them and read their answers, while the person watches every one.">+ <meta property="og:type" content="website">+ <meta property="og:url" content="https://harness.autonomous.ai/agents">+ <title>Harness for agents</title>+ <link rel="icon" href="/icon.svg?v=5" type="image/svg+xml">+ <style>+ :root {+ color-scheme: dark;+ font: 400 16px/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;+ --paper: #11110f;+ --ink: #eeede8;+ --muted: #a9a79f;+ --line: #2e2d29;+ --code: #1b1b18;+ --accent: #e0ce41;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--paper); color: var(--ink); }+ main { width: min(84ch, calc(100% - 4ch)); margin: 0 auto; padding: 3rem 0 4rem; }+ h1 { font-size: 1.5rem; margin: 0 0 1rem; }+ h2 { font-size: 1.15rem; margin: 2.5rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }+ h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }+ p, ul, ol, table, pre { margin: 0 0 1rem; }+ ul, ol { padding-left: 2ch; }+ li { margin-bottom: 0.35rem; }+ p, li, td { overflow-wrap: break-word; }+ a { color: var(--accent); }+ a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }+ code { background: var(--code); padding: 0 0.3ch; border-radius: 3px; }+ pre { background: var(--code); border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem 1ch; overflow-x: auto; }+ pre code { padding: 0; background: none; }+ .table { overflow-x: auto; margin-bottom: 1rem; }+ table { border-collapse: collapse; width: 100%; margin: 0; }+ th, td { text-align: left; vertical-align: top; padding: 0.4rem 1ch; border-bottom: 1px solid var(--line); }+ th { color: var(--muted); font-weight: 400; }+ td:first-child { white-space: nowrap; }+ .lead { color: var(--ink); }+ .note { color: var(--muted); }+ ::selection { color: var(--paper); background: var(--accent); }+ </style>+</head>+<body>+<main>+ <h1>Harness for agents</h1>+ <p class="lead">This page is for coding agents, and for the people who set them up. Harness runs coding agents+ (Claude Code, Codex and others) in terminal sessions called harnesses. From its own shell, an agent can start+ harnesses, wait for them, read their answers, message them and close them. The person sees every harness in+ the Harness app on their desktop, on the web and on their phone, and can watch it, answer it or stop it.</p>+ <p class="note">A shorter, plain-text version is at <a href="/llms.txt">/llms.txt</a>.</p>++ <h2 id="what">What Harness gives an agent</h2>+ <ul>+ <li><strong>Parallel harnesses.</strong> Start several agents on separate tasks, each in its own terminal, and+ wait for all of them or for the first to finish.</li>+ <li><strong>Another model.</strong> Claude Code can hand a task to Codex, and Codex to Claude Code.</li>+ <li><strong>Another machine.</strong> Start a harness on the person's other computers, such as a Mac mini or a+ GPU box, once they are signed in to Harness.</li>+ <li><strong>Work that outlives the turn.</strong> A harness keeps running after your turn or your context ends,+ and its conversation is kept when it is closed.</li>+ <li><strong>The person's view.</strong> Everything you start appears in Harness, where the person can watch it,+ answer its questions or stop it. Your own sub-agents are invisible to them.</li>+ </ul>+ <p>Start a harness for work that can run beside yours, needs another agent's view (a review, a second opinion+ from Codex), takes long, or belongs in its own folder. Do small, quick work yourself, and a quick parallel+ search or edit inside one task with your own sub-agents (Claude Code's Agent tool, Codex sub-agents): they are+ cheaper and faster.</p>++ <h2 id="install">Install</h2>+ <pre><code>curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash+harness start</code></pre>+ <p>macOS and Linux. <code>harness start</code> starts Harness on this computer. No account is needed for+ harnesses on this computer; <code>harness login</code> signs in, which the person needs only for their other+ machines and the phone app. The agents you start must be installed and signed in to their own providers:+ <code>claude</code> for Claude Code, <code>codex</code> for Codex.</p>+ <p>Ask the person before you install software on their computer. To check whether Harness is already there:+ <code>harness version</code>. The agent commands below are new: if <code>harness ps</code> is an unknown command,+ run <code>harness update</code>.</p>++ <h2 id="skill">Add the skill</h2>+ <p>The <code>harness</code> skill tells an agent when to use Harness and how. It comes as a plugin for Claude Code+ and Codex, which also registers Harness's MCP server (<code>harness mcp</code>, over stdio).</p>+ <h3>Claude Code</h3>+ <pre><code>claude plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin plugins+claude plugin install harness@openharness</code></pre>+ <p>Inside a session, the same is <code>/plugin marketplace add autonomous-ai/openharness</code>, then+ <code>/plugin install harness@openharness</code>. Without <code>--sparse</code> the whole repository is cloned,+ several hundred megabytes, which takes a minute or more. Run <code>/reload-plugins</code> or start a new session+ to load it.</p>+ <h3>Codex</h3>+ <pre><code>codex plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin --sparse plugins+codex plugin add harness@openharness</code></pre>+ <p>Start a new Codex session to load it. Inside Codex, <code>/plugins</code> opens the plugin browser, where the+ marketplace's plugins are listed once it is added.</p>+ <h3>Any agent that reads SKILL.md</h3>+ <pre><code>mkdir -p ~/.agents/skills/harness+curl -fsSL https://raw.githubusercontent.com/autonomous-ai/openharness/main/plugins/harness/skills/harness/SKILL.md \+ -o ~/.agents/skills/harness/SKILL.md</code></pre>+ <p>Codex reads skills from <code>~/.agents/skills</code>; Claude Code reads them from+ <code>~/.claude/skills</code>.</p>++ <h2 id="commands">The commands</h2>+ <div class="table">+ <table>+ <thead><tr><th>Command</th><th>What it does</th></tr></thead>+ <tbody>+ <tr><td><code>harness ps [--all]</code></td><td>The harnesses on this machine: name, agent, state, who started it,+ when it was last active, its folder and what it is about. <code>--all</code> adds the ones stopped in the+ last week.</td></tr>+ <tr><td><code>harness new [agent] [@machine] [folder] --name NAME -- TASK</code></td><td>Start a harness and give+ it a task. <code>agent</code> is <code>claude</code> (the default), <code>codex</code>, or another agent+ installed there. The folder is the current directory when left out.</td></tr>+ <tr><td><code>harness wait NAME[,NAME…] [--any] [--timeout 30m]</code></td><td>Wait until each harness stops+ working. <code>--any</code> returns when the first one does. The timeout takes <code>90s</code>,+ <code>30m</code> or <code>2h</code> (30 minutes by default); <code>0</code> waits as long as it+ takes.</td></tr>+ <tr><td><code>harness show NAME [--chars N]</code></td><td>Its state, the last thing it was asked, and its answer:+ the text after its last tool call, the first 4,000 characters by default.</td></tr>+ <tr><td><code>harness send NAME "text"</code></td><td>A follow-up message to a harness you started. Works from+ inside a harness.</td></tr>+ <tr><td><code>harness close NAME [--now]</code></td><td>Save its screen and stop it. Its conversation is kept, and+ the person can resume it. Refused while it is working, unless <code>--now</code>.</td></tr>+ </tbody>+ </table>+ </div>+ <p>Name every harness you start with <code>--name</code>: an unnamed one takes its session's title, which changes.+ Every command also takes the start of a harness's id, takes <code>--json</code> for JSON, and prints its usage+ with <code>--help</code>. Every error says what to run next.</p>++ <h3 id="exit-codes">Exit codes</h3>+ <div class="table">+ <table>+ <thead><tr><th>Code</th><th>Meaning</th></tr></thead>+ <tbody>+ <tr><td><code>0</code></td><td>Done. For <code>wait</code>: every harness is idle; read it with <code>harness show</code>.</td></tr>+ <tr><td><code>1</code></td><td>Failed. The message says what to run next.</td></tr>+ <tr><td><code>2</code></td><td>The command was used wrongly; the usage follows.</td></tr>+ <tr><td><code>3</code></td><td><code>wait</code>: a harness needs the person (a question or a permission). Tell+ the person; only they answer it.</td></tr>+ <tr><td><code>4</code></td><td><code>wait</code>: a harness stopped or is gone.</td></tr>+ <tr><td><code>124</code></td><td><code>wait</code>: timed out while a harness was still working. Wait again, or+ read it.</td></tr>+ </tbody>+ </table>+ </div>+ <p>When several apply, <code>wait</code> exits with the first of 124, 3 and 4.</p>++ <h2 id="parallel">Run Claude Code agents in parallel</h2>+ <pre><code>harness new claude --name api-tests -- "Make the tests in api/ pass. Change only files in api/. Answer with what you changed and why."+harness new claude --name ui-tests -- "Make the tests in ui/ pass. Change only files in ui/. Answer with what you changed and why."+harness wait api-tests,ui-tests --timeout 45m+harness show api-tests+harness show ui-tests+harness close api-tests+harness close ui-tests</code></pre>+ <p>Each harness is a full Claude Code session in its own terminal, in the folder you ran the command from. Give+ harnesses that edit files separate folders or separate files (a git worktree each works well): two agents+ editing the same file overwrite each other's work.</p>++ <h2 id="wait">Wait for a background agent to finish</h2>+ <pre><code>harness wait reviewer --timeout 30m+echo $?</code></pre>+ <p><code>0</code>: it is idle, read it with <code>harness show reviewer</code>. <code>3</code>: it is waiting for the+ person; tell them, and do not answer it yourself. <code>4</code>: it stopped. <code>124</code>: it is still+ working; wait again. With several names, <code>--any</code> returns as soon as one finishes. A harness counts as+ finished when it has stopped working on two looks in a row, three seconds apart, so a short pause between tool+ calls does not end the wait.</p>++ <h2 id="codex">Hand a task to Codex and read its answer</h2>+ <pre><code>harness new codex --name reviewer -- "Review the changes on this branch against main for bugs. Do not edit files. Answer with the findings, most serious first, each with file and line."+harness wait reviewer --timeout 20m && harness show reviewer+harness close reviewer</code></pre>+ <p>Put the whole task in it: what to do, where, what done looks like, and what to answer with. A task holds 2,000+ characters; for a longer one, write it to a file and name the file in the task. <code>show</code> cuts long+ answers at 4,000 characters and prints how to read the rest (<code>--chars N</code>).</p>++ <h2 id="background">Keep working while another agent reviews</h2>+ <pre><code>harness new codex --name reviewer -- "Review commit 3f2a9c1 for bugs. Do not edit files. Answer with the findings."+# … go on with your own work; harness new returned as soon as the harness started …+harness ps # is it still working?+harness wait reviewer && harness show reviewer</code></pre>+ <p>To ask the same reviewer a follow-up from inside a harness, <code>harness send reviewer "…"</code>, then wait and+ show again: it still has the context. Otherwise start a new harness with the fuller task.</p>++ <h2 id="machines">Run on another machine</h2>+ <pre><code>harness machines+harness new codex @mini ~/code/app --name train -- "Run the training script and report the final loss."</code></pre>+ <p>Needs the person signed in to Harness on both computers (<code>harness login</code>). <code>harness ps</code>+ lists this machine.</p>++ <h2 id="where">Inside a harness, or outside Harness</h2>+ <ul>+ <li><strong>In a harness</strong> (Harness made your terminal pane): <code>harness send</code> works, to what you+ started and to teammates in a tab with Agent Messages on, and each harness you start is told how to message+ you.</li>+ <li><strong>Outside Harness</strong> (Claude Code or Codex in a terminal app, an editor or the person's own tmux):+ Harness tells you by your session, from what your agent sets in its shell. <code>harness ps</code> says+ "You are Claude Code, outside Harness." and marks what this session started as <code>you</code>; the limits+ below apply; each harness you start reads+ <code>[from Claude Code outside Harness · <machine>, the agent that started you. It reads your answer itself.]</code>+ above its task; and you may close only what this session started. Nothing can message you, and+ <code>harness send</code> is not available: put everything in the task, and for a follow-up start a new+ harness with the fuller task.</li>+ </ul>++ <h2 id="mcp">MCP tools</h2>+ <p><code>harness mcp</code> serves the same commands as MCP tools over stdio, for agents that reach their tools+ through MCP (the plugin above registers it). Configure it as command <code>harness</code> with arguments+ <code>["mcp"]</code>.</p>+ <div class="table">+ <table>+ <thead><tr><th>Tool</th><th>Arguments</th><th>Same as</th></tr></thead>+ <tbody>+ <tr><td><code>harness_list</code></td><td><code>all?</code></td><td><code>harness ps</code></td></tr>+ <tr><td><code>harness_start</code></td><td><code>task</code>, <code>folder</code>, <code>name</code>,+ <code>agent?</code> (<code>claude</code> or <code>codex</code>), <code>machine?</code></td><td><code>harness new</code></td></tr>+ <tr><td><code>harness_wait</code></td><td><code>names</code>, <code>any?</code>, <code>timeout_seconds?</code>+ (120 by default, 600 at most; if they are still working, call it again)</td><td><code>harness wait</code></td></tr>+ <tr><td><code>harness_read</code></td><td><code>name</code>, <code>chars?</code></td><td><code>harness show</code></td></tr>+ <tr><td><code>harness_close</code></td><td><code>name</code>, <code>now?</code></td><td><code>harness close</code></td></tr>+ <tr><td><code>harness_send</code></td><td><code>to</code>, <code>text</code>; offered only when the server runs+ inside a harness</td><td><code>harness send</code></td></tr>+ </tbody>+ </table>+ </div>++ <h2 id="rules">Rules</h2>+ <ul>+ <li>Give work only to harnesses you started. A harness the person started is theirs: you may read it and wait on+ it, but do not send it work or close it.</li>+ <li>Never answer a harness's question or permission prompt, and never type into it some other way. Tell the+ person.</li>+ <li>Never ask another harness to publish, deploy, delete or push. Those are the person's to ask for.</li>+ <li>Close what you started once you have its answer.</li>+ <li>An agent may have at most 8 live harnesses it started, and start 20 in 10 minutes; one it started may start+ more, but those may not. Each machine allows 40 live harnesses started by agents. Every limit refuses with a+ message; do not work around it.</li>+ </ul>++ <h2 id="errors">When something fails</h2>+ <ul>+ <li><code>harness: command not found</code>: Harness is not installed; see <a href="#install">Install</a>.</li>+ <li><code>Harness is not running here. Start it with `harness start`.</code></li>+ <li><code>That machine is not reachable now. `harness machines` lists which are online.</code></li>+ </ul>++ <h2 id="more">More</h2>+ <ul>+ <li><a href="https://github.com/autonomous-ai/openharness/blob/main/plugins/harness/skills/harness/SKILL.md">The harness skill</a></li>+ <li><a href="https://github.com/autonomous-ai/openharness/tree/main/plugins/harness">The Claude Code and Codex plugin</a></li>+ <li><a href="https://github.com/autonomous-ai/openharness/blob/main/docs/design/2026-10-11-agent-client.md">How the agent commands work, and why</a></li>+ <li><a href="https://github.com/autonomous-ai/openharness">Source</a> (MIT)</li>+ <li><a href="/download">Download the Harness app</a>, for the person</li>+ </ul>+</main>+</body>+</html>diff --git a/website/public/llms.txt b/website/public/llms.txtnew file mode 100644index 000000000..f90965f69--- /dev/null+++ b/website/public/llms.txt@@ -0,0 +1,42 @@+# Harness++> Harness runs coding agents (Claude Code, Codex and others) in terminal sessions called harnesses, on the person's own computers, and shows every one in its desktop, web and phone apps. An agent can start harnesses from its shell, wait for them, read their answers, message them and close them, while the person watches.++Install on macOS or Linux, then start it. No account is needed for harnesses on this computer:++```+curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash+harness start+```++The commands an agent uses:++```+harness ps [--all] # the harnesses here: state, who started each, what each is about+harness new [agent] [@machine] [folder] --name NAME -- TASK+harness wait NAME[,NAME…] [--any] [--timeout 30m] # exits 0 idle, 3 needs the person, 4 stopped or gone, 124 timed out+harness show NAME [--chars N] # its state, the last ask and its answer+harness send NAME "text" # a follow-up to one you started, from inside a harness+harness close NAME [--now] # save its screen and stop it; the conversation is kept+```++`harness mcp` serves the same as MCP tools over stdio (command `harness`, arguments `["mcp"]`): `harness_list`, `harness_start`, `harness_wait`, `harness_read`, `harness_close`, and `harness_send` inside a harness.++Start a harness for work that can run beside yours, needs another agent's view (a review, a second opinion from Codex), takes long, or belongs in its own folder; do small, quick work yourself. List first, name every harness, then wait, read and close it. Give work only to harnesses you started, and close only those; never answer a harness's question or permission prompt, and never ask one to publish, deploy, delete or push. An agent outside Harness (Claude Code or Codex in a terminal app or editor) is recognized by its session: it gets the same limits, may close only what its session started, and cannot be messaged.++## For agents++- [Harness for agents](https://harness.autonomous.ai/agents): install, every command with examples and exit codes, the MCP tools, running agents in parallel, waiting for a background agent, handing a task to Codex+- [The harness skill](https://raw.githubusercontent.com/autonomous-ai/openharness/main/plugins/harness/skills/harness/SKILL.md): instructions for Claude Code, Codex and any agent that reads SKILL.md+- [Claude Code and Codex plugin](https://github.com/autonomous-ai/openharness/tree/main/plugins/harness): for Claude Code, `claude plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin plugins`, then `claude plugin install harness@openharness` (in a session: `/plugin marketplace add autonomous-ai/openharness`, then `/plugin install harness@openharness`); for Codex, `codex plugin marketplace add autonomous-ai/openharness --sparse .claude-plugin --sparse plugins`, then `codex plugin add harness@openharness`++## Docs++- [README](https://github.com/autonomous-ai/openharness/blob/main/README.md): what Harness is and how to start+- [The CLI](https://github.com/autonomous-ai/openharness/blob/main/cli/README.md): the harness command and the daemon behind it+- [Download](https://harness.autonomous.ai/download): the desktop app and the CLI++## Optional++- [How the agent commands work](https://github.com/autonomous-ai/openharness/blob/main/docs/design/2026-10-11-agent-client.md): the design, its limits and why+- [Source](https://github.com/autonomous-ai/openharness): the whole of Harness, MIT licenseddiff --git a/website/scripts/agents-site.spec.ts b/website/scripts/agents-site.spec.tsnew file mode 100644index 000000000..3cad72f64--- /dev/null+++ b/website/scripts/agents-site.spec.ts@@ -0,0 +1,144 @@+import { existsSync, readFileSync } from "fs";+import { join } from "path";+import { describe, expect, it } from "vitest";+import nextConfig from "../next.config.js";++// The pages agents read (/agents and /llms.txt) and the skill they install describe commands an agent will run+// as written. These checks keep them true to the CLI, the plugin marketplace and the routes that serve them.+const site = process.cwd();+const repo = join(site, "..");+const page = readFileSync(join(site, "public", "agents", "index.html"), "utf8");+const llms = readFileSync(join(site, "public", "llms.txt"), "utf8");+const skillPath = join(repo, "plugins", "harness", "skills", "harness", "SKILL.md");+const skill = readFileSync(skillPath, "utf8");+const cli = readFileSync(join(repo, "cli", "src", "cli.ts"), "utf8");+const agentVerbs = readFileSync(join(repo, "cli", "src", "agentClient", "commands.ts"), "utf8");+const marketplace = JSON.parse(readFileSync(join(repo, ".claude-plugin", "marketplace.json"), "utf8")) as {+ name: string;+ plugins: { name: string; source: string }[];+};++const decode = (text: string) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"');++/** The code in a page: what an agent copies. Prose like "a harness you start" is not a command. */+function codeIn(text: string, html: boolean): string[] {+ const spans = html+ ? [...text.matchAll(/<code>([\s\S]*?)<\/code>/g)].map((m) => decode(m[1]))+ : [...text.matchAll(/```[^\n]*\n([\s\S]*?)```/g), ...text.replace(/```[\s\S]*?```/g, "").matchAll(/`([^`\n]+)`/g)].map((m) => m[1]);+ // Shell comments explain a line; they are not run.+ return spans.map((span) => span.replace(/(^|\s)#.*$/gm, ""));+}++function verbsIn(text: string, html: boolean): Set<string> {+ const verbs = new Set<string>();+ for (const code of codeIn(text, html)) {+ for (const m of code.matchAll(/(?:^|[\s;&|(])harness ([a-z][a-z-]*)/gm)) verbs.add(m[1]);+ }+ return verbs;+}++describe("the pages and skill agents read", () => {+ // The CLI's commands: the cases of its dispatch, and the few it answers before it (`harness version`).+ const cliVerbs = new Set([...cli.matchAll(/^\s*case '([a-z][a-z-]*)':|\bcmd === '([a-z][a-z-]*)'/gm)].map((m) => m[1] ?? m[2]));++ it.each([+ ["/agents", page, true],+ ["/llms.txt", llms, false],+ ["SKILL.md", skill, false],+ ] as const)("%s names only harness commands the CLI has", (_, text, html) => {+ const verbs = verbsIn(text, html);+ expect(verbs.size).toBeGreaterThan(3);+ for (const verb of verbs) expect(cliVerbs.has(verb), `harness ${verb}`).toBe(true);+ });++ it("gives the exit codes the agent commands return", () => {+ const literal = agentVerbs.match(/export const EXIT = \{([^}]*)\}/);+ expect(literal).not.toBeNull();+ const codes = [...literal![1].matchAll(/:\s*(\d+)/g)].map((m) => m[1]).sort();+ const table = page.slice(page.indexOf('id="exit-codes"'), page.indexOf('id="parallel"'));+ const listed = [...table.matchAll(/<tr><td><code>(\d+)<\/code><\/td>/g)].map((m) => m[1]).sort();+ expect(listed).toEqual(codes);+ });++ it("answers the problems agents search for, in their words", () => {+ for (const heading of [+ "Run Claude Code agents in parallel",+ "Wait for a background agent to finish",+ "Hand a task to Codex and read its answer",+ "Keep working while another agent reviews",+ ]) expect(page).toMatch(new RegExp(`<h2 id="[a-z-]+">${heading}</h2>`));+ });++ it("is one plain file: no script, its canonical address, the llms.txt beside it", () => {+ expect(page).not.toMatch(/<script/i);+ expect(page).toContain('<title>Harness for agents</title>');+ expect(page).toContain('<link rel="canonical" href="https://harness.autonomous.ai/agents">');+ expect(page).toContain('href="/llms.txt"');+ expect(llms.startsWith("# Harness\n\n> ")).toBe(true);+ });++ it("installs from the marketplace this repository defines", () => {+ const entry = marketplace.plugins.find((plugin) => plugin.name === "harness");+ expect(entry).toBeDefined();+ const id = `${entry!.name}@${marketplace.name}`;+ const pluginRoot = join(repo, entry!.source);+ const manifest = JSON.parse(readFileSync(join(pluginRoot, ".claude-plugin", "plugin.json"), "utf8")) as { name: string };+ // The entry name is what people install; the manifest name namespaces the skill. Claude Code asks them to match.+ expect(manifest.name).toBe(entry!.name);+ expect(existsSync(join(pluginRoot, ".mcp.json"))).toBe(true);+ for (const text of [page, llms]) {+ expect(text).toContain("/plugin marketplace add autonomous-ai/openharness");+ expect(text).toContain(`/plugin install ${id}`);+ expect(text).toContain("codex plugin marketplace add autonomous-ai/openharness");+ expect(text).toContain(`codex plugin add ${id}`);+ }+ });++ it("checks out, with --sparse, the marketplace and the plugin it lists", () => {+ // A full clone of this repository was 670 MB and 70 seconds (135 for Codex); the sparse one 3 MB and 4. A+ // plugin moved outside the sparse paths would install from neither.+ const entry = marketplace.plugins.find((plugin) => plugin.name === "harness")!;+ for (const text of [page, llms]) {+ const claude = text.match(/claude plugin marketplace add autonomous-ai\/openharness --sparse ([^\n<`]+)/);+ const codex = text.match(/codex plugin marketplace add autonomous-ai\/openharness ((?:--sparse [^\s`<]+ ?)+)/);+ expect(claude).not.toBeNull();+ expect(codex).not.toBeNull();+ for (const paths of [claude![1].trim().split(/\s+/), codex![1].trim().split(/\s+/).filter((word) => word !== "--sparse")]) {+ expect(paths).toContain(".claude-plugin");+ expect(paths.some((path) => entry.source.replace(/^\.\//, "").startsWith(`${path}/`))).toBe(true);+ for (const path of paths) expect(existsSync(join(repo, path)), path).toBe(true);+ }+ }+ });++ it("links the skill where it is in this repository", () => {+ for (const text of [page, llms]) {+ for (const m of text.matchAll(/https:\/\/(?:raw\.githubusercontent\.com\/autonomous-ai\/openharness\/main|github\.com\/autonomous-ai\/openharness\/(?:blob|tree)\/main)\/([^\s")]+)/g)) {+ expect(existsSync(join(repo, m[1])), m[1]).toBe(true);+ }+ }+ });++ it("keeps the skill within the Agent Skills format", () => {+ const front = skill.match(/^---\nname: ([^\n]+)\ndescription: ([^\n]+)\n---\n/);+ expect(front).not.toBeNull();+ const [, name, description] = front!;+ expect(name).toMatch(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);+ expect(name).toBe("harness");+ expect(description.length).toBeLessThanOrEqual(1024);+ expect(skill.split("\n").length).toBeLessThan(500);+ });++ it("is served at /agents, unaltered, beside an install URL that resolves", async () => {+ const rewrites = await nextConfig.rewrites();+ expect(rewrites.beforeFiles).toContainEqual({ source: "/agents", destination: "/agents/index.html" });+ const headers = await nextConfig.headers();+ for (const source of ["/agents", "/agents/index.html", "/llms.txt"]) {+ const rule = headers.find((entry) => entry.source === source);+ expect(rule?.headers).toContainEqual({ key: "Cache-Control", value: "no-store, no-transform" });+ }+ const redirects = await nextConfig.redirects();+ expect(redirects.find((entry) => entry.source === "/cli/install.sh")?.destination).toMatch(/^https:\/\/cdn\.autonomous\.ai\//);+ for (const text of [page, llms, skill]) expect(text).toContain("curl -fsSL https://harness.autonomous.ai/cli/install.sh | bash");+ });+});diff --git a/website/scripts/check-agents-site.mjs b/website/scripts/check-agents-site.mjsnew file mode 100644index 000000000..83b1041bb--- /dev/null+++ b/website/scripts/check-agents-site.mjs@@ -0,0 +1,25 @@+import assert from 'node:assert/strict';+import { readFile } from 'node:fs/promises';++// The pages agents read: /agents (public/agents/index.html, through the rewrite in next.config.js) and+// /llms.txt. No unit test runs the rewrites or headers, so this checks the built server, as check-os-site.mjs+// does for /os.+const base = new URL(process.argv[2] || 'http://127.0.0.1:3000');+const requests = { signal: AbortSignal.timeout(20_000) };+const page = await readFile(new URL('../public/agents/index.html', import.meta.url), 'utf8');+const llms = await readFile(new URL('../public/llms.txt', import.meta.url), 'utf8');++for (const [route, expected, type] of [+ ['/agents', page, /text\/html/],+ ['/agents/', page, /text\/html/],+ ['/agents/index.html', page, /text\/html/],+ ['/llms.txt', llms, /text\/plain/],+]) {+ const response = await fetch(new URL(route, base), requests);+ assert.equal(response.status, 200, route);+ assert.match(response.headers.get('content-type'), type, route);+ assert.match(response.headers.get('cache-control'), /no-transform/, route);+ assert.equal(response.headers.get('x-content-type-options'), 'nosniff', route);+ assert.equal(await response.text(), expected, `${route} must serve the file unchanged`);+}+console.log('Harness /agents and /llms.txt: every entry path serves the static source unchanged.');