Repository navigation
Track goals across days with automations, give every agent Harness Relay's own tools (browser, mail, calendar) through one MCP gateway, and keep what reaches other people in an outbox - #87
Conversation
…e woken by a program on this computer Tracking a goal (#83) - A schedule can name a goal (`goal`): each run it works on, here or in a new chat each time, gets the goal and the latest 12 progress notes in its briefing (`trackingSection()`). - Agents end a reply to a scheduled message with `<progress status="working|done|blocked">…</progress>`; `src/shared/tracking.ts` reads it, the reply keeps it as a `progress` part (a card in the chat), and the schedule keeps the latest 30 notes. - `done` switches the schedule off with a note; `blocked` keeps it on and says what the agent needs. - A run whose replies all fail, or that cannot start, is tried again after 5, 30 and 120 minutes unless the next time comes first; a run a restart cut off (`inFlight`) is tried again at startup (`Scheduler.recover()`). A stopped run is not retried. Webhooks (step 2 of the triggers proposal) - `POST /api/conversations/:id/schedule/hook` makes a token, shown once; only its SHA-256 is kept (`schedules.hook_hash`, never in a conversation object). `DELETE` removes it. - `POST /api/hooks/:id` with `Authorization: Bearer <token>` sends the schedule's message now, with the JSON body (at most 20 KB) as `ChatMessage.event`, given to the agents as an `<event>` block the briefing calls data. The only route without a browser's sign-in; Host, Origin and JSON checks still apply; a wrong token is a 404; one call per 10 seconds. - The schedule drawer shows the progress notes and the webhook (with a `curl` example). Schema - Version 31: `schedules.goal`, `schedules.tracking`, `schedules.hook`, `schedules.hook_hash`, `messages.event`. Docs and tests - Architecture (Schedules, Security, Known limitations), user guide, developer guide (HTTP API, test files), the triggers proposal and the proposals index, the READMEs, and the e2e README, all in both languages; locales in both languages. - New `test/tracking.test.ts`, `test/orchestrator-tracking.test.ts`; webhook and goal tests in `test/app.test.ts`, `test/auth.test.ts`, `test/store.test.ts`, `test/prompt.test.ts`, `test/schedule.test.ts`; two end-to-end scenarios in `schedule.spec.ts` with a new `e2e:progress` directive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…nd keep what reaches other people in an outbox until the user sends it Gateway (#84) - `src/server/gateway.ts`: the server writes a small MCP program into its data folder (`gateway/relay-mcp.mjs`, from `gatewayShim.ts`) and listens on a socket beside it (a named pipe on Windows). Each turn of an agent with one of the tool groups gets a grant: a token for that turn alone, in a file under `data/tmp`, and an MCP server `relay` added to its MCP servers, so every adapter passes it on. The token ends with the turn. - Tiers: `read` runs; `act` asks in the chat below full access through the turn's own approvals (keyed by the tool, so "always allow" works; not asked again right after the CLI asked about the same tool); `send` never runs in the turn and goes to the outbox. - Tool groups (`browser`, `mail`, `calendar`) in the tool library (`relayTools`, none at first), given per CLI and per agent (`relay:<group>`), shown in Settings → Tool library and in the team editor. Not for the open agents, whose sandbox does not open the socket. - In the desktop app the program runs on the Node.js Harness Relay's own sandbox host uses (`gatewayNode()`); without one, the tools are not offered and Settings says why. Outbox - `src/server/outbox.ts` and the `outbox` table: a `send` call's item (tool, arguments, title, preview) and an `outbox` part with its card in the reply; an equal call while one waits is the same item. `POST /api/conversations/:id/outbox/:itemId` with `{ action: 'send' | 'discard' }` sends it once with the server's own credentials, or drops it; the card and a note say what happened. A waiting item counts as waiting for the user (sidebar, notifications). An item a restart cut off while sending is never sent again. Agents read it with `outbox_status`. Schema - Version 32: the `outbox` table. Docs and tests - Architecture (Tool library, Security, Persistence, Known limitations), user guide, developer guide (layout, HTTP API, tests), AGENTS.md and CONTRIBUTING (the gateway's rule), all in both languages; locales in both languages. - New `test/gateway.test.ts` (the real MCP program over a real socket), `test/outbox.test.ts`, `test/orchestrator-gateway.test.ts`; tool groups in `test/tools.test.ts`, `test/tools-web.test.ts`, `test/app.test.ts`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…nd type, and show the user screenshots Browser tools (#85) - `src/server/browser/`: one headless Chromium (or Chrome, or Edge) per conversation, started through `process.ts` with `--remote-debugging-pipe` (a new two-pipe option on fds 3 and 4), so no debugging port is opened; a profile of its own in the data folder, removed with the conversation; never the user's browser or sign-ins. - `cdp.ts`: a small CDP client over the pipe (NUL-ended JSON, answers by id, events by session), so no browser library is added. - `find.ts`: `RELAY_BROWSER` (new, checked at startup), else Playwright's newest Chromium, else the system's Chrome, Chromium or Edge. - What it may open (`navigationVerdict()`): only http and https; never Harness Relay's own ports on this computer, nor link-local, multicast, unspecified or metadata addresses. Every document pauses first (`Fetch`): a main-frame page on a host the chat's browser has not opened is asked about below full access (kind `fetch`, keyed by host, so "always allow" holds), also when a click leads there; declined, the browser goes back to the page it was on. Downloads, file choosers and dialogs are refused. - Tools on the gateway: `browser_open`, `browser_snapshot` (read: the visible text with links, buttons and fields numbered, a password's value never), `browser_click`, `browser_type` (act: real mouse and key events), `browser_screenshot` (read: a PNG in the chat's attachments folder, shown in the reply and given as an image). Page text comes back marked as data from a web page. The browser closes after 10 idle minutes. Docs and tests - Architecture, sandboxing, user guide, developer guide (layout, `RELAY_BROWSER`, tests) and AGENTS.md, in both languages. - New `test/browser.test.ts`: the pipe client against stand-in streams, finding a browser, what may be opened, and with a real Chromium (skipped where none is found) a local page opened, read, clicked, typed into and screenshotted, a declined host, and the profile removed; two pipes in `test/process.test.ts`; `RELAY_BROWSER` in `test/config.test.ts`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…ave drafts, list and add events, and anything sent waits in the outbox Mail and calendar tools (#86) - `src/server/connectors/`: IMAP (`imap.ts`: LOGIN, LIST, EXAMINE, UID SEARCH, UID FETCH, APPEND, literals both ways, STARTTLS), SMTP (`smtp.ts`: EHLO, STARTTLS, AUTH PLAIN or LOGIN, envelope, dot-stuffed DATA), MIME (`mime.ts`: a plain-text UTF-8 message with RFC 2047 headers and no Bcc header; reading text/plain, else HTML as text, in any charset and transfer encoding) and CalDAV (`caldav.ts`: a time range's events, a new event with `If-None-Match: *`, calendar discovery on the same provider, redirects not followed, times in UTC from a wall-clock time in a time zone), all without a library. - Accounts in Settings → Tool library → Mail and calendar accounts (`ConnectorStore`): app passwords in the credential store, masked in the UI, never given to a CLI; presets for Gmail, iCloud, Fastmail and Yahoo; Test signs in without sending; Find calendars. Servers: TLS or STARTTLS, plain only to this computer; never Harness Relay's own ports. - Tools on the gateway: `mail_search`, `mail_read`, `calendar_events` (read), `mail_draft`, `calendar_create` (act), `mail_send`, `calendar_invite` (send: the outbox, sent only on the user's Send). Mail and events come back marked as data from the user's mailbox or calendar. - Routes: `GET /api/connectors`, `PUT /api/connectors/mail/:id`, `PUT /api/connectors/calendar/:id`, `DELETE /api/connectors/:kind/:id`, `POST /api/connectors/:kind/:id/test`, `POST /api/connectors/calendar/discover`. - The Claude Code fake can call a tool of the real gateway program it was given (`e2e:mcp`, `e2e/fake-cli/lib/mcp.cjs`). Docs and tests - Architecture, user guide, developer guide (layout, routes, tests), the READMEs, AGENTS.md and the e2e README (a new scenario, its counts, what is not covered), in both languages; locales in both languages. - New `test/connectors.test.ts` against stand-in IMAP, SMTP and CalDAV servers on this computer (`test/fake-mail-servers.ts`), `test/connectors-web.test.ts`; the routes in `test/app.test.ts`; an end-to-end scenario in `tools.spec.ts` where a fake CLI calls `mail_send` through the real gateway and the user's Send delivers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…y, the browser and mail Three independent reviews of the four commits before this one found these; each is fixed here, with a test. Tracked goals and webhooks - A run the server stopped while shutting down (quit, restart, update) stays in flight, so the next start tries it again; before, only a crash kept it. - Only the schedule's own run in flight is retried: switching it off (or a new goal, or Stop) takes it out of flight, so a one-time schedule switched off stays off. - Run now and a webhook's call are never retried, so a one-time schedule keeps its own time. - A reply that only reports progress is not counted as a pass, and its card shows. - `<progress>` blocks: the status read among other attributes; a block inside a fence with more in it left as code; the live reply's tail hidden only for a real block. - The webhook body's `<` is escaped, so it cannot close its `<event>` block; Content-Length is checked before the body is read, which is read up to the limit only. Gateway and outbox - "Asked by the CLI just now" matches only a request for the gateway's tool by its exact name (`mcp__relay__<tool>`, `relay__`, `relay/`, `relay.`), never a command, path or URL holding it. - Each grant gets its own copy of the shim and its token in `data/tmp`, removed with the turn and at the next start, so a sandboxed command can change neither. - `act` approvals are keyed `relay:<tool>`, apart from other servers' tools of the same name, and take no folder lock. - Retry, Resend and an edited message discard what the reply had waiting, so no item waits without a card; a branch copies no waiting card; at startup an item cut off while sending has its card brought up to date. - The shim answers a `null` or array line as an invalid request and refuses a call over 1 MB; the server reads lines up to 4 MB. - An MCP server named `relay` is refused in the library. Cards, titles and the gateway's status follow the turn's language. Shared pages leave outbox cards and webhook bodies out. - `mail_send` and `calendar_invite` pin the account when the card is made. Browser - Every request pauses, not only documents: in the tab, and in its frames and workers in other processes (auto-attached before they start). Harness Relay's own ports and metadata addresses are refused there too. - A host name's addresses are looked up first, so a name leading to a metadata address or to Harness Relay is refused. - A window a page opens is closed before it loads anything (every request of its refused, then closed, as `window.open()` waits for it), and the agent is told. - Calls on a conversation's browser run one at a time, in order. - The agent is told why a page was refused (declined, never opened, nobody to ask). - A password field's value is never read, also as its label. - An anchor of the open page is not waited for. Mail and calendar - An answer to STARTTLS with more after it is refused, for IMAP and SMTP, since that came before TLS from anyone on the way. - iCalendar text escapes every line break, a bare CR too, and drops other control characters. Lines fold at 75 octets between characters. A quoted parameter is read whole. - An all-day event's end is shown as its last day. - Encoded subject words and long recipient lists fold under 78 characters. - HTML character references past U+10FFFF or in the surrogates become U+FFFD instead of failing the read; hexadecimal ones are read. - Discovery's "same provider" is the same host or one under the given host's domain, never a country's public domain, an address only as itself, and never https to http. - A kept password goes only to the servers it was given for: changing a mail server, or a calendar's address to another provider's (also in discovery), asks for it again. - What a page, a mail or an event says cannot end its data block or make rows of its own (`dataBody()`, `dataLine()`, `dataAttr()`). Docs, in both languages - Architecture: schedules' retries, the gateway's files and keys, the outbox, the browser's gate, mail and calendar, the table rows' periods, and known limitations (Windows' `data/tmp`; DNS rebinding and WebSockets in the browser). - User guide, sandboxing, the developer guide's test list, and the e2e README's per-CLI table and what it does not cover. - No schema change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…acked goals A fresh independent security review of the whole change, and the three limits the earlier fixes only documented, are closed here, each with a test. Browser - Every connection goes through a proxy of its own on loopback (`browser/proxy.ts`), which serves only the browsers Harness Relay started (a password each, answered through `Fetch.authRequired`) and connects only to addresses it checked, from the same lookup as the gate: DNS rebinding and WebSockets are caught, and Chromium looks up no name itself. - An address on this computer or the local network is reached only on a host and port the chat's browser opened while it led there: a page cannot reach local services by itself, and a host allowed for the internet that now leads here is refused (`moved`). - WebRTC keeps to the proxy; page preloading is off (speculation-rules prefetch and prerender reached Harness Relay's port before), and a prerendered page is closed. - Snapshots run in an isolated world: the page's script cannot change what they read, elements stay in that world, numbers go on from one snapshot to the next, and a click on an element the page laid something over is refused. - Questions about clicking and typing name the element as the page does, never the agent's words, and show the whole text to type. - Hosts full access opened are asked about again below it; a scheduled run reuses none. - Chromium gets only the environment it needs (no keys, tokens or proxy settings), and the system's own browser is preferred to Playwright's, which never updates itself. Gateway - On Windows, where data/tmp cannot be protected, each token serves one connection and its file is removed once the CLI's shim has shown it. - A connection must show its token within 10 seconds and 512 bytes; at most 256 connections; stopping the gateway ends them. Mail and calendar - An address's name may hold no `<`, `>`, `"`, `@`, backslash, control or formatting character, and the envelope takes the address that was checked: the card shows exactly who a mail goes to (before, a crafted name sent it elsewhere). - Reading a mail's HTML takes linear time (one crafted mail held the server for a minute). - IMAP answers are limited to 16 MB (literals and untagged responses included), SMTP replies to 256 KB, calendar answers to 16 MB. - An outbox item goes out from the account its card showed, found by its id alone. - Passwords are shown as set or not, never their last characters. Tracked goals - Progress notes go into the briefing as data: one line each, the blocks' tags in them written so they close or open nothing (`dataBody()` now covers opening tags too), and the briefing says notes are reports, never instructions. Docs, in both languages - Architecture, user guide, sandboxing, the developer guide (layout, `RELAY_BROWSER`'s order, the test list with the new `test/browser-proxy.test.ts`), AGENTS.md and CONTRIBUTING (the browser's proxy rule). - No schema change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- Settings → Tool library: the mail and calendar accounts' note said "Variable and header values are kept in…", the MCP servers' words. It now says passwords are kept there and never shown, not even in part (`connectors.passwordsIn`), in both locales. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Removed again in a later commit: the description links them by this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…formatting in CI - Prettier 3.10.1 (pinned: a new version can format differently), in the root and in desktop/, with one set of settings (`.prettierrc.json`): 140 columns, as wide as most of the code already is, single quotes, and code in template strings left as it is. - `npm run format` and `npm run format:check` (and the same in desktop/, for that package alone). - Left alone (`.prettierignore`, `desktop/.prettierignore`): Markdown, the lockfiles, the web app manifest and icons `npm run icons` writes, the CLIs' recorded fixtures, and the landing page's HTML (its whitespace, JSON-LD and the search engines' verification files). - CI checks the formatting before the typecheck. Docs, in both languages: AGENTS.md (commands, the commit checks, the code rule), CONTRIBUTING, the README's scripts, the developer guide (running, CI), the desktop app's README, and the pull request template's checklist. The reformat itself is the next commit, apart from this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- `npm run format` over the repository, the desktop app included: nothing but Prettier's changes (line breaks, quotes, parentheses, trailing commas), in a commit of their own so a review can skip it. - Checked after it: the typecheck (root and desktop), the build, `npm test` (the same 5 tests fail as before, on main too: they rely on permission bits, and this container runs as root) and the end-to-end tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
The description keeps linking them by the commit that added them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Independent review · 獨立審查Three agents reviewed the four commits independently, one for each area:
A fourth agent then did a security review of the whole change (03de8e5..bdc59b1). None of them wrote any of the code. Each of the first three was asked to check four things:
They read the code and confirmed what they could with throwaway probe tests (a real Chromium, a TLS stand-in, the orchestrator harness). Every finding is fixed, with a test for each behaviour:
What they found, and what changed · 發現與修正Tracked goals and webhooks (#83)
Gateway and outbox (#84)
Browser, mail and calendar (#85, #86)
Security review of the whole change, and the limits left open (8baa8f4)
Still open, and documented: on Linux as root (a container) Chromium cannot use its own sandbox. Tests · 測試
After the reviews · 審查之後
Still not tried · 仍未測試
These are listed in the PR description and in the e2e README's "What they do not cover". Generated by Claude Code |
…CI found Browser - Chromium on Linux keeps its crash reports under `$XDG_CONFIG_HOME/<browser>` (`~/.config/google-chrome`, say) whatever its `--user-data-dir`: Harness Relay's browser wrote in the user's own browser's folder. It now starts with its config and cache folders in its profile (`launchEnv()`); a test with the real browser checks that nothing is written in the home it was given (it failed before). - Finding a browser builds each system's paths as that system writes them, whichever system it runs on (the test of macOS's paths failed on Windows). Protected paths - `protectedReads()` reads `$XDG_CONFIG_HOME` from the environment it is given, not the server's when it is given one: on GitHub's runners, which set it, the tests found the runner's own Chrome folder. CodeQL - HTML mail as text: tags are removed in one linear pass that never joins the pieces of a tag into one (`<scr<b>ipt>` left `<script>`), and keeps a `<` that starts no tag (`x < 5`), as a browser does. - The test pages escape what a request sent before showing it, or answer it as plain text. Docs, in both languages: AGENTS.md and CONTRIBUTING (the browser's environment), architecture (the browser) and the developer guide's test list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…lose what the second review found
A second independent review of the whole pull request; the rest of its findings (the website, the
guided tour, the data storage docs, the pop-up test) come in the next commit.
Gateway
- A CLI's own question about one of Harness Relay's tools, named exactly as the gateway's
(`mcp__relay__<tool>`, Codex's `relay:<tool>`), is answered yes without a card, also in a scheduled
run and in a conversation that refuses questions; the gateway decides by the tool's tier (a read
runs, an act is asked about with what it will do, a send waits in the outbox). Before, the CLI's
card showed only its arguments, hid the gateway's own, and a scheduled run refused even a read.
- Grok gets the tools in full access only: below it, its sandbox keeps the MCP servers it starts out
of data/tmp, where the program and token are (`GATEWAY_FULL_ACCESS_ONLY`); Settings says so.
- A connection with a token the server does not know, or serves already, gets one answer and ends
(or ends after the token's wait); such connections have a limit of their own.
Tracked goals
- Only the runs a schedule starts are told the goal and report on it: a reply to the user's own
message in that chat ("how is CI?") switches nothing off.
Browser
- Its profiles' folder (`data/browser`, cookies under a fixed key) is a protected path, made at start.
- A name that leads both to the internet and to this computer or the local network is never opened
(`mixed`); the question about a page here says that its pages may then reach that host and port.
- Screenshots are written for the user's account only, and a branch copies those its replies show
and points them at its copy.
Mail and calendar
- Calendar answers are read in one linear pass (a hostile server's 3 MB took 75 s before).
- The invitation card names the calendar it goes out from; an `accountId` an agent gives is dropped.
- Outbox results and the Test and Find calendars errors in the user's language, the server's own
words after them.
Tests for each; locales and server texts in both languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…s Relay's tools, and finish the second review's fixes Website, in both languages (site/index.html, site/zh-TW/index.html, site/llms.txt) - "Messages on a schedule": a goal to track, retries and a webhook. - "One tool library": Harness Relay's own browser, mail and calendar, and the outbox. - The safety list: mail and calendar passwords in the credential store. Guided tour, in both languages (tour version 17, so people who finished it see it once more) - "When the team needs you": a mail or an invitation waits in the outbox for Send or Discard. - "Messages on a schedule": a goal to track, and a webhook. - "Tool library": Harness Relay's own tools. The browser's pop-ups - Google Chrome sometimes lets a script's window make its first request before it is held (CI's Node 22 job saw it): the docs no longer say a pop-up loads nothing, but what holds: it is closed at once, and like every connection what it asks for goes through the proxy. Its test now aims the pop-ups at Harness Relay's stand-in port, which nothing reaches. Tests - The invitation card names its calendar, fails without one, and an id an agent gives is dropped. - End to end: a mail discarded from the outbox (the card, the note, nothing sent). Docs, in both languages - User guide: where the tools keep their data (accounts, passwords, the outbox, the browser's profiles and screenshots); the CLI's own question answered for Harness Relay; Grok in full access only. - Architecture: the CLI's question (`cliApproval()`), Grok's limit, mixed names and the question about a page here, the gateway's connections, screenshots and profiles in persistence. - Sandboxing, the developer guide's test list, the e2e README; `find.ts`'s header (the system's browser comes first). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
CI, and a second independent review · CI 與第二次獨立審查CI (517e38f, 0f83b3e)
Second independent review · 第二次獨立審查A new agent reviewed the whole pull request: correctness, new problems, test coverage and docs, including the website and the guided tour. It did not write any of the code. It confirmed several things are fine:
Every finding is fixed in b6b2e95 and 0f83b3e, with a test where it is code.
Docs · 文件All in both languages:
Tests · 測試
Still not tried · 仍未測試
Generated by Claude Code |
… and add schedules with no set times
Fixes what a third independent review of the pull request found, and adds a
kind of schedule that only Run once now and its webhook send.
Tracked goals
- A scheduled message that waited in the queue, the user's answer to a
question a tracked run asked, and Retry and Continue of a tracked run are
tracked too (`carriedTracking()`): they are told the goal, their
`<progress>` block is read, and `done` switches the schedule off.
- Each reply keeps its run (`messages.tracked`, schema version 33), so Retry
and Continue find it; a pause keeps it (`RunPause.tracked`).
- A retry the scheduler planned is skipped once a report came after the time
that failed (the user's own Retry, say).
- `splitProgress()` reads only from the last `<progress`, so a long reply
with many unclosed blocks is read in time in proportion to it.
Browser
- A call holds the browser (`hold()`/`release()`), so its idle timer never
closes it while the user is asked about a host, nor while the gateway asks
about a click or typing (`GatewayTool.asking`).
Mail and calendar
- Harness Relay's own IMAP, SMTP and CalDAV errors, and the outbox's, are in
the request's language (`t().conn`), with the server's own words after them.
Windows
- The webhook's example is PowerShell's `Invoke-RestMethod` for a server on
Windows (the hook's answer says the server's `platform`).
- In the desktop app on Windows without Node.js on the PATH, Settings says
so (`no-node-path`), not that Settings → Sandboxes installs one.
Schedules with no set times
- A new kind, `manual` ("No set times" / "不定時"): no times, so only Run once
now and the webhook send it. The form has no On and no missed times for it;
it is saved on, and saving turns it on again after its reached goal
switched it off. The five kinds go three over two where they do not fit
one row (always in English).
- The sidebar's clock and the drawer's status say how it is sent.
Docs (both languages)
- User guide: no set times, and On for it; architecture: the `manual`
repeat, which runs are tracked, the browser's idle hold.
- AGENTS.md, the developer guide and `gatewayShim.ts`: where the shim is
written; sandboxing: `data/browser` and the gateway's files in `data/tmp`;
open agents: they do not get Harness Relay's tools; the website, `llms.txt`
and the READMEs: Grok gets them in full access only, and no set times.
- Guided tour (still version 17, not released): no set times in the schedule
step; its fingerprint updated.
- Developer guide: the HTTP API (the hook's `platform`) and the test list;
e2e README: the new end-to-end test and the changed ones.
Tests
- Tracking through the queue, an answer, Retry and Continue, and the skipped
retry; the browser held past its idle time; the gateway's `asking` hook and
`no-node-path`; the parser's time; connectors' errors in both languages;
the schedule's PowerShell example and no set times; the store's schema 33
and the no-set-times summary.
- End to end: below full access, the CLI's own question about Harness
Relay's tool answered for the user, and the gateway's card about adding a
calendar event (against a CalDAV stand-in); the webhook's test now uses a
schedule with no set times; the phone layout of the five kinds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
… times first - The five kinds stay on one row, which scrolls sideways where they do not fit (a phone, or English, which needs about 440px), as the CLI picker's row does (`.schedule-kinds` shares its rules); the chosen kind is scrolled into the row's view when it changes and when the form opens (`revealChosen()`, now shared from `CliPicker.tsx`). This replaces the three-over-two layout. - No set times comes first (`SCHEDULE_KINDS`); a new schedule still starts as every week. - The phone test checks one row, lets only that row scroll, and a saved kind at the row's end in view when the drawer opens again. - Docs (both languages): the user guide lists no set times first and says the row swipes on a phone; the developer guide's test list and the e2e README describe the phone test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- A new schedule's form (the New schedule page, and a chat's Schedule with none) starts with no set times: only Run once now and its webhook send it. Weekdays at 09:00 stay ready for when another kind is picked. - The New schedule page's intro says a schedule is sent when you run it, when its webhook is called, or at set times (both languages). - Docs (both languages): the user guide, architecture and the developer guide's test list say a new schedule starts with no set times. - Tests: the new form's kind, and no day or time problems for no set times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- On Windows a gateway without Node.js says no-node-path (Settings installs none there), so the started gateway's test expects that there, and checks the macOS and Linux answer with a gateway set for Linux, which needs no server (CI's Windows job failed on it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…k gets them Below full access one sandbox holds both the commands these CLIs run and the MCP servers they start, so the gateway's program could not read its token without every command reading it too. In full access there is no such sandbox, and nothing kept them from the tools but a rule of their own. Gateway - The open agents join Grok in `GATEWAY_FULL_ACCESS_ONLY`: a member of OpenCode, Goose, Cline, OpenHands or Pi gets the `relay` MCP server in full access, in the MCP servers its adapter passes its CLI, and none below it. Settings - Settings → Tool library offers each group to every CLI, and a member's Tools list the groups for open agents too; the hint says Grok and the open agents get them in full access only, and why (both languages). Tests - The orchestrator gives an open agent the gateway in full access only (fails with the open agents taken off the list). - End to end: in full access, the fake OpenCode starts the gateway's program from its session's `mcpServers` and calls `mail_send`, which waits in the outbox. The fake OpenCode can now call a tool of an MCP server it was given. Docs (both languages) - README, the website and `llms.txt`, AGENTS.md, architecture (the gateway and Known limitations, with the loopback HTTP route that could lift it, #88), sandboxing, open agents, the user guide, the developer guide's test list and the e2e README (456 tests, the tool library's 18, each CLI at a glance). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…k start A schedule now starts with no set times, by Run once now or by a program's webhook as much as by its times, so "schedule" named only one of the ways it starts. The UI calls it an automation (自動任務 in Chinese: plain 任務 would clash with the app's own "task assistant" tagline, where every chat is a task). Only the words shown change: the API, the code, the data and the hash route keep their names. UI (both languages) - New automation (the sidebar's calendar button, its page and Create automation), a chat's Automation button and drawer, Delete automation, the Automation tag on the messages it sends, the sidebar clock's tooltips, and every hint that named the schedule; the drawer's intro says what starts it. - The guided tour's step is "Automations", and says what starts one (tour still version 17, not released; fingerprint updated). Server messages (both languages) - Errors and chat notes (missed, skipped and failed times, retries, the goal reached, the chat it opens, the webhook's refusals) say automation. - Agents' prompts are unchanged. Docs (both languages) - User guide: "Automations" (anchor #automations, links updated) says what starts one; README, the website and llms.txt likewise. - Architecture: the schedules section says the UI calls them automations and that only the words shown changed; the developer guide and the e2e README use the new UI names, the e2e area renamed. Tests - Unit and end-to-end tests use the new texts and names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Removed again in the next commit: the description links them by this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
…lightning bolt for automations - The two buttons share the row equally, as New group and Search below them, each an icon and its text (14px, centred); a label too long for a wider font ends in an ellipsis rather than spilling out. - New automation's icon is a lightning bolt (ZapIcon), the calendar with a plus is gone. In English its text is "Automation", as "New automation" does not fit half the row; its accessible name and tooltip stay "New automation" (newScheduleLabel, both languages). - The guided tour's step and the user guide (both languages) name the lightning bolt; the tour's fingerprint updated (version 17, not released). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Removed again in the next commit: the description links them by this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- A mail or an invitation waiting in the outbox marks its conversation
Needs you, as an approval does, but its notification named nobody and
nothing ("An agent is waiting for your approval"): alertDetail() looked
for approval cards only. It now names the agent and what it would send, by
the card's title ("Claude is waiting for your approval / Mail to
bob@example.com: \"Shipped\""), for push and for the page alike.
- Test: the outbox card's notification detail, and none once it is sent.
- Docs (both languages): the user guide's outbox, architecture's
notifications and the developer guide's test list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- On Windows the drawer shows PowerShell's Invoke-RestMethod (cmd.exe takes no single quotes), as intended since the third review; the test still looked for curl, and the Windows end-to-end job failed on it. - e2e README (both languages): the row says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
A third independent review, automations, and the open agents' tools · 第三次獨立審查、自動任務、開源 agent 的工具Third independent review · 第三次獨立審查A new agent reviewed the whole pull request at 0f83b3e: correctness, new problems, test coverage and docs, including the website and the guided tour. It did not write any of the code, and it ran its probes in a worktree of its own. It confirmed several things are fine:
It found no new security problem. Every finding but the two departures below is fixed in 6fc3160, with a test where it is code.
Two departures from the issues, not done in this pull request:
Either can follow in a pull request of its own. Coverage gaps it named, and what was added:
Not added:
After the review, as asked · 審查之後,依要求所做的改動Automations · 自動任務
Harness Relay's tools · Harness Relay 的工具
CI on Windows · Windows 上的 CI
Screenshots · 截圖
Tests · 測試
Still not tried · 仍未測試
Generated by Claude Code |
- A conversation whose latest agent reply says its tracked goal is blocked (<progress status="blocked">) needs the user: ConversationSummary.blocked, from the reply's progress part in memory and in the database, until a later reply (to the user's answer, or the next run) says otherwise. - It is an alert of its own (blocked, a needs kind: push and the page, the needs chime), naming the agent and what holds the goal up; a question asked as well comes first. The sidebar says "Goal held up" (目標卡住了), between a question and a reply in progress, and the tab's title counts it. - Before, a blocked report only left a note: the user was told only when the agent also asked. - Tests: the alert, its detail and its order; the sidebar's status; the summary from memory and after a restart; end to end, a run that reports blocked marks the chat until the user's answer is replied to. - Docs (both languages): the user guide (the tracked goal, the sidebar's badges), architecture (tracking, notifications), the developer guide's test list and the e2e README (457 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
- Settings → Tool library, under Browser: "Browser to start", the full path of a Chromium, Chrome or Edge executable, checked to be a file when saved (400 with the path otherwise); empty finds one by itself again. It comes before RELAY_BROWSER, which comes before the system's browsers and Playwright's Chromium. The box says which browser is in use, or that none was found; chats that start after a change use it. - The tool library keeps it (browser), and its view says it beside RELAY_BROWSER's and the one in use (ToolLibraryView.browser); PUT /api/tools takes browser. - Tests: the library keeps, shows and forgets it (it was not saved at first, which the test caught); the HTTP API refuses a path with no file; end to end, the field refuses, saves, shows in use and clears. - Docs (both languages): the user guide's browser, architecture, the developer guide (RELAY_BROWSER, the HTTP API, the test list) and the e2e README (458 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN
What and why · 改了什麼、為什麼
This adds the four abilities the capability review rated "not met", one commit each. Later commits fix what independent reviews and CI found, and add Prettier.
1. Automations that track a goal across days (#83), 2611f78
<progress status="working|done|blocked">…</progress>.doneswitches it off.POST /api/hooks/:idwith a bearer token sends the automation's message (on Windows the drawer's example is PowerShell'sInvoke-RestMethod). The JSON body goes with it as an<event>block the agents treat as data.2. Harness Relay's own tools through one MCP gateway, and the outbox (#84), 969e7cd
relayMCP server (Grok and the open agents in full access only: below it, the sandbox that holds their commands holds the MCP servers they start too, and keeps them out ofdata/tmp; Give Grok and the open agents Harness Relay's own tools below full access, over a loopback HTTP MCP endpoint #88 is about lifting that). Each turn gets its own copy of the program and a token, both indata/tmp, which sandboxes cannot reach on macOS and Linux.readruns.actasks in the chat below full access, saying what the call will do. "Always allow" is keyedrelay:<tool>.sendnever runs in the turn.mcp__relay__<tool>, Codex'srelay:<tool>) is answered yes without a card, also in an automation run, so the gateway decides by tier.sendcall becomes a card that only the user's Send executes, once.3. A browser of its own (#85), 1bd7c89
--remote-debugging-pipe, so no debugging port is opened. It has a profile of its own, removed with the conversation.browser_openandbrowser_snapshot: the page's text, with links, buttons and fields numbered. Snapshots run in an isolated world the page's script cannot reach.browser_clickandbrowser_type: the question names the element as the page does and shows the whole text. A click on an element the page covered is refused.browser_screenshot: shown in the reply.4. Mail and calendar (#86), 5cca923
mail_search,mail_readandcalendar_events(read).mail_draftandcalendar_create(act).mail_sendandcalendar_invite(send, through the outbox, from the account the card shows).5. What the independent reviews, CI and the user's trials found: bdc59b1, 8baa8f4, 517e38f, b6b2e95, 0f83b3e, 6fc3160 and after
site/llms.txt) and the guided tour (version 17).6. Prettier, a930940 and 382d9a5
desktop/, with one set of settings (.prettierrc.json):npm run formatandnpm run format:check, also indesktop/for that package alone. CI checks the formatting before the typecheck..prettierignore): Markdown, the lockfiles, generated icons and manifest, the CLIs' recorded fixtures, and the landing page's HTML.Fixes #83, fixes #84, fixes #85, fixes #86.
How it was tested · 怎麼測試
test/tracking.test.tsandtest/orchestrator-tracking.test.ts.test/gateway.test.ts: the real MCP program over a real socket.test/outbox.test.tsandtest/orchestrator-gateway.test.ts.test/browser.test.ts: a real Chromium against local pages, skipped where none is found. It covers the gate and the proxy, pop-ups, WebSockets, speculation rules, a hostile page and calls at the same time.test/browser-proxy.test.ts: the proxy on its own.test/connectors.test.ts: stand-in IMAP, SMTP and CalDAV servers on this computer, STARTTLS injection and oversized answers included.test/connectors-web.test.ts.app,auth,store,prompt,schedule,tools,tools-web,notify,processandconfigtests.mail_send; the card waits until Send delivers it to a stand-in SMTP server, and a second one is discarded.mcpServersand callingmail_send, which waits in the outbox.npm run typecheckandnpm run buildpass.npm test: 3415 pass, 5 fail. The same 5 fail onmaintoo: this container runs as root, so tests that rely on permission bits fail (open-state,openhands×2,orchestrator-folders,orchestrator).npm run test:e2e(Chromium, Linux): 416 pass, 39 skipped, 0 fail at 6fc3160 (and every pass at 0f83b3e, 8baa8f4 and after the reformat before it); the specs each later commit touches again after it (456 tests now, with the open agent's gateway test).npm testgive the same results as before it, andnpm run format:checkpasses in the root and indesktop/.Docs and translations · 文件與翻譯
Both languages, in the same commits:
RELAY_BROWSER, HTTP API, test files).site/llms.txt) and the guided tour.npm run formatandformat:check.Screenshots · 截圖
Taken with the end-to-end tests' fake CLIs at the head of this pull request, English in the light theme and 繁體中文 in the dark one. The
e2e:words in the messages steer the fake CLIs.<progress>block shown as a card · 自動任務的執行:回覆的進度卡片https://github.com/Agentic-System-Lab/harness-relay/blob/a9bced76f85bc67e0611f4a2417667843096fc23/pr-screenshots/phone-new-automation-zh-TW-dark.png?raw=true"width="260">Checklist · 檢查清單
npm run format:check,npm run typecheck,npm testandnpm run buildpass · 都通過 (but for the 5 tests above that fail as root, before and after)npm run test:e2epasses, if I changed the UI, the HTTP API, the orchestrator or an adapter · 修改了介面、HTTP API、協調器或轉接器時,端對端測試通過 (Chromium on Linux; CI runs macOS and Windows)npm run desktop:typecheckpasses and I triednpm run desktop, if I changeddesktop/·desktop/changed only by Prettier: its typecheck, its build anddesktop/scripts/smoke.tspass;npm run desktopnot tried, as this container has no display · 只有 Prettier 改到desktop/:型別檢查、建置與 smoke 測試通過;這裡沒有畫面,沒試npm run desktop🤖 Generated with Claude Code
https://claude.ai/code/session_01KJpwTRd9eKs9LUrp6QZraN