The check that dot's PATH reaches the server is the image's: it runs at install, not after a switch has already moved
the link, so install.sh's message on a failed switch is true (the browser is either the one the Dot had or the staged
one). A link whose environment is gone is no current browser. newest's awk reads every line instead of exiting early
under pipefail, and the browser smoke's preparation fails at the resolution that failed.
A Dot kept the browser of the golden image it was made from. runtime/dot-browser.sh (the old build-browser-env.sh,
now on the runtime disk as well as the builder seed) is the one owner of where the Dot's browser lives: each release
in an environment of its own, browser/<mcp>-<playwright>-<core>, and the Dot's browser the one
~dot/.local/bin/invisible-playwright-mcp links to. At every start install.sh switches that link to a release an
earlier start staged, in one rename and before the Dot's units, and after them stages the newest release as uv
resolves it, in the background: its environment and its browser engine, through the Dot's own way out. A start never
waits for a release; without the network the Dot keeps its browser. provision.sh installs the golden image's browser
with the same script.
The switch has to come before the engine, and that ordering did not hold: the units were enabled, so on every boot
after the first systemd started them at multi-user.target, before cloud-init's final stage ran install.sh
(cloud-final.service is After=multi-user.target; a Dot's serial log shows dot-agentd and the engine up two seconds
before install.sh). A Dot with a VM proxy went out before its proxy was set. The units are no longer enabled:
install.sh starts them, after the proxy and the switch, and removes the links an earlier runtime made.
The engine smoke found its stand-in by fake_mcp_server.py on the command line; installed the way the real server is,
it runs as `python -I -B -m invisible_playwright_mcp`, and that command line is what the checks look for.
test_dependencies names server_capture.py as a module another interpreter runs: its invisible_playwright_mcp import
is the installed server's, not a dependency of the engine.
A Dot keeps the golden image it was made from and boots every new runtime disk, so the engine already talked to
servers other than the one its pinned copy of the interface described. The engine now reads the interface from the
installed server when it starts (nanobot/dots/server_interface.py, server_capture.py run as dot by the server's own
python): the page tools are what that server serves, a page tool it does not serve is not offered (GET /tools says
so), and a Dot whose server cannot be read offers no page tool and its launches say why.
With nothing in the engine tied to a version, the image no longer pins one: each build asks PyPI for the newest
invisible-playwright-mcp, the newest invisible-playwright it accepts and the invisible-core that one pins
(browser-release.ts). The three enter the inputs digest, pins.env and the manifest, which records what was installed.
mcp-requirements.lock and capture-mcp-interface.py go; the copy of the interface becomes a test fixture. The owner's
no-other-browser rule is checked at build on what was actually installed (builder/other-browsers.txt), and the golden
image workflow runs every six hours so a new release is published as a prebuilt image.
The server's snapshot and read_html read again on the page that replaced the one they went to (page.evaluate_read),
and browser_evaluate, the model's code, runs once when its page navigates under it (B285). Under them, through
firefox-45: a page that replaces itself keeps its main world (B286), the real mouse no longer turns a click into a
drag, a session keeps focus when another starts beside it, iframes stay in the frame tree after a few navigations,
go_back/go_forward to a same-document entry answer, a browser that dies ends every wait at once, every input event
is born a few ms before the page sees it, and the first enumerateDevices of a session takes a time the seed
declares. The tools' schemas and descriptions are unchanged: the recaptured interface differs only in its version.
OpenRouter routes a request by the answer it asks for but not by the prompt it carries, so a request sized for
the model's widest window could land on a provider with a narrower one (glm-5.3-flash: Reka at 262144 among
providers at 1048576) and fail there. The providers read with the limits on every turn now route the model's
requests: provider.only is the slugs of the widest window's providers. When none of them can serve, OpenRouter
refuses with "No allowed providers are available" and the turn fails with those words.
invisible-playwright-mcp 0.72.1 drops its last caps: browser_type quotes the value the field kept whole, and an
error detail in its chat and routes comes whole. The tools' schemas are unchanged.
A result comes back whole. exec, glob/grep and read_file lose their fixed caps (10000/50000, 12000 and 2000
per line, 128000) and the general 12000-character cut is gone. A request that outgrows the model's window is
compacted first, as before; only if it still does not fit are the results of its latest round cut to what the
window leaves, measured with the estimate that judges the request, and the cut says how many characters came
through of how many and how to ask for less. A result is stored cut only beyond what no compaction could make
room for.
The window is read on every turn from the providers OpenRouter lists for the model
(GET /models/{model}/endpoints), not once per process from the whole list: of the providers serving it, the
widest window and the longest answer at that window.
The core keeps a frame's navigation history when Firefox re-announces the main frame on a cross-process
navigation, redoes a by-value call whose execution context a navigation destroyed, and answers a goto that
another navigation overtook with Playwright's "interrupted" error instead of waiting 45 s. The wrapper carries
invisible_playwright#321's fix. The server reads an element's text in one command and returns it whole:
max_chars is gone from browser_read_text and browser_snapshot. The interface is captured again from the lock.
The six hero GIFs were rendered from pages that lived only in a scratch folder, so
changing one character meant editing frames. docs/hero/ now holds every piece, in
three layers, each made from the one before:
photos/ characters.png as an image model draws it, on white; cut_out.py turns
it into one cut-out per theme (shadows kept on light, removed on dark,
and only the white connected to the edge touched, so the eyes stay)
html/ wide, mobile and small pages that compose the photos; renderLoop(t)
draws the frame at second t, and opened in a browser each page plays
its own loop
build.mjs photos -> frames (Chromium, 12 a second) -> docs/images/hero-*.gif,
with the same palette and dither as before
A fourth page, html/social.html, builds docs/images/social-preview.png, the
repository's social preview, from the same photos.
The characters are new: the same four, colours inverted, each with a role it can
carry (a hard hat, sunglasses, a beret, a magnifying glass), all still angry. The
scenes, their words and their timing are unchanged.
It added two channels and left them running for the rest of the file and its teardown, the only channels there; on
one Windows run that teardown did not finish in 60 s (not reproduced in twelve runs under load here). A test stops
what it starts: the two channels are removed at its end, and the teardown is what it was before they came.
It failed now and then in CI (four runs since 2026-10-08), always right after the test that polls TOKEN every few
milliseconds with a 409: a poll of that test still on its way when it ended was answered after the next test had
queued its 429 on the same token, as Telegram answers a request whose client has gone, so the stray poll took the
429 and the new poller connected without the error the test waits for. The 429 test now uses a token no other test
polls.
GUEST_PATH was one PATH for the engine and the desktop; with the engine's unit on system directories only, the browser
smoke started the desktop and looked for invisible-playwright-mcp with a variable that no longer existed. It reads
dot's PATH from dot-desktop.service, as lib.sh reads the engine's and the daemon's from theirs.
The step keeps research open "as it would be left at night" so that the server restart and the stop find it open, but
its task never said so; a model closed the browser after reading the title, as a tidy one may, and the step failed on
a choice the prompt left open. The task now asks to leave the browser open.
invisible-playwright-mcp 0.71.2 exports OPENED, the first sentence of browser_open's answer, which the engine matched
by its words ("browser is open") because the library had no constant for it. The lock moves to 0.71.2 (only that
package and its hashes), the capture records OPENED beside NOT_OPEN and GONE, and the engine reads all three from
invisible_playwright_mcp.json: no sentence of the server is written in the engine any more.
The shell's context held the health with everything else, so its poll every 30 seconds gave the whole value a new
identity and re-rendered every user of the shell. useHealth reads it from its own context; only the rail's status,
the offline banner, the setup checklist, the key form and the host settings follow the poll.
The engine's unit put dot's ~/.local/bin first on its PATH, only so the guest check could find
invisible-playwright-mcp by name; but the engine holds the OpenRouter key, and a program a library ran by name would
have been dot's, run as dotengine. The unit's PATH is now system directories only, as dot-agentd's is, and it names
the browser's MCP server by its path (INVISIBLE_DOTS_MCP_COMMAND), which the engine checks and starts as dot through
the relay. The smoke reads both from the unit.
The shell reads the failed tasks and the channels of every Dot with GET /api/tasks and GET /api/channels: the web
tests' control plane answers them as the real one does, and the inbox tests that faked one Dot's list failing now
fail the one read, which the inbox reports as such.
A careful model refused to run a command that searches the system journal for sk-or-: it read like a probe for
secrets. The property the check proves is what the model's user can read, so it runs the same command through
dot-agentd's exec route, which the Dot's exec tool uses, as that user; the hash of the count and a nonce still proves
the whole journal was read.
A careful model looks whether the marker is there after its command was interrupted (cat and pgrep): that is a
second exec call, but not the command again. The step counted every exec of the task and failed on it; it now
requires that no other call runs the interrupted command, and the marker check still proves the command never ran.
The engine's lean pass removed the MCP reconnect, the provider's reasoning options, the event sink, concurrent tool
batches, spilling results to files and the cron methods only tests used, each with its tests: the whole suite now
passes 2483 on Linux (measured in WSL, where CI runs it), down from 2553. The other floors only rise; they are set
from CI's measured counts once it has run.
vm-manager's own Logger, silentLogger and stderrLogger repeated the shared ones; it now takes them from
packages/shared and logs as the rest of the process does (prefixedStderrLogger). vm-manager and the API's VM driver
each had their own exists(): one pathExists in shared replaces both.
- dot-install refused nothing apt reads as an action: "foo-" removed foo, as root. A name can no longer end in "-";
a test runs the real script against stubs.
- The VM proxy's setup is runtime/vmproxy.py, staged on the runtime ISO: a bad value, a host that does not resolve and
no default route each say so (exit 3, 4, 5) instead of all reading "not socks5"; the firewall still drops all. The
smoke runs the file itself.
- dot-agentd is built one way everywhere (-trimpath -buildvcs=false -ldflags=-s -w): a commit no longer changes the
binary and the runtime ISO. go.mod pins the toolchain, setup-go@v6 reads it, a repo test keeps every spelling equal.
- The golden image's apt packages come from an Ubuntu snapshot (pins.json apt_snapshot, in the inputs digest); the
browser environment installs wheels only, with no cache left in the image.
- tests/repo/agentd-protocol.test.ts compares the Go routes and constants (and the engine's defaults) with
packages/shared; a Linux test runs the real dot-agentd under the real GuestClient: proof, auth, exec, files, the
agent proxy and its SSE.
- vm-manager: one assertImages, the VM bounds from CONFIG_BOUNDS, the pid file in its own module; one
resolveImageVersion and publishImage for the golden, runtime and prebuilt images.
- Fixed-sleep tests wait for their signal; the docs no longer say the images are never published or speak of CD-ROMs.
The web's shell, on every page, read each Dot's task list and each Dot's channels, at load and again for every Dot on
each task.failed and channel event: 2N requests for N Dots, as its own comments said, because no route answered for
every Dot. GET /api/tasks?status=&finished_after= lists the tasks of every Dot that ended in a state after a time, and
GET /api/channels every channel with its Dot's id (never a credential); the SDK has endedTasks and everyChannel, and
the shell makes one request for each.
Clock, Logger, silentLogger, errorMessage, ControlPlaneError, notFound and the stderr logger move from
apps/scheduler to packages/shared; packages/channels and apps/api import them from there, and channels keeps the
scheduler for its tests only. One abortableSleep replaces four copies (scheduler, CLI, SDK, WhatsApp); the one
shared had slept the whole time on a signal that had already aborted. The API reports its package's version, as the
CLI does, instead of a hard-coded 0.1.0.
- The tool and permission labels move from the web to packages/shared (labels.ts, still checked against
permissions.py): Telegram, WhatsApp and the CLI ask "The Dot wants to run a command" with "Run commands (high
risk)", as the web card does, and the CLI names the Dot.
- The event reader moves from the web to the SDK: `logs` reads only the newest events and follows on; `approvals
--all` keeps the newest 500 and `status` reads the 10 it shows.
- New CLI commands: cancel, delete --yes, update with the config version (a concurrent save is a 409). The CLI's
version comes from its package.
- The web's tool and approval steps are one model (steps.ts) for the chat, the task story and the activity; one
outcome table and one duration format.
- The inbox keys answer only while the approvals list has the focus (WCAG 2.1.4); useResource and the Dot shell's
context keep their identity across renders.
- setup --all no longer sends the person to a sign-in that does not exist; the MCP panel says the Dot can add a
server; the e2e contract declares every CLI command run.ts runs, and a test holds it; apps/web's second vitest
config is gone; docs follow.
- The provider no longer turns <tool_call> text into calls (architecture 8.3 says such text runs nothing); a test
holds it.
- The MCP client no longer retries a call after a connection error, which could run it twice on an HTTP server
(section 8.7): it fails with its error and reports the server's end.
- Removed what the Dot never reaches (3342 lines, with their tests): the MCP reconnect and enabled_tools, the
provider's reasoning tables and unused options, the event sink, concurrent tool batches, spilling results to files,
the cron methods only tests used and the protected system jobs, and the identity state `archived`.
- The sentences of invisible-playwright-mcp the browser matches are captured from the pinned package into
invisible_playwright_mcp.json, so a version bump that changes them fails a test.
- Fixed-sleep tests wait for their signal; architecture.md, UPSTREAM.md and main.py say what the code does.
- A task whose task.created could not be delivered is failed with a task.failed event in the same transaction
(the guest's type: a client follows one), so the web no longer shows it running for good; a commit point covers it.
- markDelivered marks the row and its run in one statement.
- add_mcp_server: the host uses up the approval that allowed the call (approvals.used_at, migration 0013), found in
one statement with jsonb equality instead of the newest 500 and a hand-made canonical JSON; a call refused for its
entry keeps its approval. The permission is typed.
- Dot DISABLED and VM IDLE, which nothing ever wrote, are gone from the states, the checks (migration 0014), the
queries and the web.
- Unused exports removed (latestId, activeForDot, hasPending, isVmState, isDotState, API_TOKEN_ENV, MIN_TOKEN_LENGTH).
- One BackgroundWork for the scheduler and the lifecycle; syncGuest marks a Dot suspect itself when its push fails.
- The scheduler alone checks a message, a note and "always"; /api/stream resolves its Dot with historyDotId.
- The MCP secrets of a push are read in one query; EventLog.stream keeps one id instead of every replayed one.
- The event schemas and the declared event types are held equal by the typecheck, so the parsers need no cast.
- start.test waits for the three requests instead of 200 ms; the pre-push hook says what only CI runs; docs follow.
.gitignore's *.log kept the data of top-ips (access.log) and log-pipeline (app.log) out of the repository, so a clone
had both tasks without their input; the stored output could also drift from author.py and author_long.py, and did
(hand edits, zlib's bytes). run.sh now writes tests/bench/tasks and tasks-long afresh before each run.
Step m queues a task that adds `clock` with add_mcp_server: the approval is under mcp.servers.add with the entry, and
once approved the server is in the config, with its permission left to ask, and connected. The engine smoke's tool
list for a Dot granted everything has add_mcp_server, and its check that a removed server's tools are gone looks at
the servers' tool names.
add_mcp_server's card lists the name, the command line (or the URL), the environment and headers written in it,
the secrets the person will set and the reason; the activity says what was added, or why it was not. "Add MCP
servers" is a row of the MCP servers group of the permissions.
On `mcp.server.added` the host checks, in the transaction that stores it: mcp.servers.add allows it, or an approved
approval of add_mcp_server has the same arguments (compared key by key, in any order); the name is free; the entry
passes the config's schema. Then it writes the server with its own permission left to ask, logs `dot.updated`, and
pushes the config; otherwise it logs `mcp.server.refused` with why.
The tool checks at once what it can (a name that is free in the stored config, a command or a URL, no user or
password in the URL) and writes `mcp.server.added` with the call's arguments; the host decides again and writes it.
Its permission is the table's mcp.servers.add, so the gate asks the person with the whole entry. Its description
says how to install a server's program first (uvx, `uv tool install git+https://...`, npx after Node.js) and that a
key is named in secrets, never written. The config check no longer reads mcp.servers.add as the permission of a
server named "servers.add", and the prompt says the Dot adds a server this way.
mcp.servers.add asks by default and is high risk; a server's name holds no `.`, so it is never a server's own
permission. `mcp.server.added {arguments}` is the guest's report of an add_mcp_server call that ran, and
`mcp.server.refused {name, reason}` the host's when it does not write the server. parseMcpServerEntry is the one
check of a server's entry, the config's own schema.
A server that never answers would be started again at every turn, and every message would wait out the bound for
it. As Codex has `startup_timeout_sec` beside `tool_timeout_sec`, a server's entry has `startup_timeout_s` (1 to 600,
60 by default, MCP_STARTUP_TIMEOUT_BOUNDS) beside `timeout_s`; one that does not start within it is not started again
until its entry or its secrets change, and its error says so. The fork's client tests fake the SDK's stdio_client
and connect_mcp_servers with their real parameters (errlog, the failures and errlogs sinks).
The engine smoke declares the engine's fake MCP server and a program that is not installed: through the image's
relay the first connects as dot with its secret in its environment and on no command line, its tool runs under its
permission and its instructions reach the prompt, the second fails saying what the relay found, and a config without
them stops the server. The real-VM run's new step m runs mcp-server-time through uvx: its tool asks, is approved
always and runs as dot; a second server waits for its secret, set through the CLI. Steps n and p look for that secret
as for the key.
Section 7 declares them and their permission, 8.3 says where they run, when they start and what the model gets, 4.3
how their secrets travel, 5.3 and 9.6 the routes, 8.8 the engine's manager. The guide has a section on them, the two
commands, and the README one row.
The panel lists each declared server with where it is on the computer and why one is not connected, adds, edits and
removes one in the draft like any setting, and sets or clears its secrets write-only once the config that names them
is saved. Each server is a row of Permissions and tools, asked by default and high risk; a preset leaves the
servers' permissions alone, the review lists a server's change by what it runs, a change put on top of a newer config
keeps both sides' servers, and an approval of a server's tool is the kind to stop and think about.
A secret is stored encrypted under the Dot's scope as mcp/<server>/<NAME>, set and cleared through
PUT and DELETE /api/dots/:id/mcp-secrets/:server/:name (the SDK, `invisible-dots secret mcp`), listed without its
value, and pushed with the key on every READY and agent.started. A config that drops a server or a name drops its
value in the same transaction. `GET /api/dots/:id/tools` answers the engine's whole answer, the servers' states with
the tools, and `invisible-dots mcp <dot>` shows them. Always allowing the permission of a server the config no
longer declares is refused (409 permission_gone).
nanobot/dots/mcp_servers.py keeps one MCPProvider per declared server, as the BrowserManager keeps one per identity.
A command runs through dot-agentd relay as dot, its secrets by the relay's environment (--env-from); a URL is reached
with its secrets as headers. A server starts when declared, restarts alone when its entry or a secret changes, and
one that failed starts again when the next turn begins, which waits for those starting (60 s each at most). Its
tools join the registry as mcp_<server>_<tool> under mcp.<server>; the prompt carries each server's instructions, or
why it is not connected, with what its stderr said and its secrets masked. The fork's client keeps a server's
initialize instructions, says why a connection failed and takes a stdio server's stderr (UPSTREAM.md). A config
stored by a release without servers declares none.
`mcp_servers` takes the entries Claude Code, Codex and nanobot take: a command with its args and env, or a URL with
its headers, plus `secrets`, the names of the variables or headers whose values are set apart from the config, and
`timeout_s`. Each server has a permission, `mcp.<server>`, that asks by default; one of a server the config does not
declare is refused, and denied. The engine's tool table, `approval.requested` and `GET /tools` name such a
permission, and `GET /tools` says where each server is (connecting, connected, failed and why). `POST /secrets`
carries the servers' secrets with the key; a secret's value is one rule, MCP_SECRET_PATTERN, as the key's is. Servers
are listed by name, since the database keeps a config as jsonb.
In the four verification tasks on 0.71.0 browser_evaluate was the call the model made most (14 of 72), mostly to
read text, a heading or a link a reading tool returns. 0.71.1 changes only that tool's description and the rung of
the server's instructions that names it: last, and which tool reads text, markup or a control instead.
mcp-requirements.lock is regenerated with the command in its header, and nanobot/dots/invisible_playwright_mcp.json
captured again from the package installed from PyPI, so the engine offers the published wording.
The engine reads nanobot/dots/invisible_playwright_mcp.json at start, and the runtime disk, the wheel and the smoke's
staging took only the .py files and the .md templates: the browser smoke's engine stopped at import with no such
file. The three readers of what the package holds (pyproject's include list, runtime.ts, prepare-engine.sh) now
take the package's .json too, and runtime.test.ts holds a .json of the package on the disk and the capture among
the real engine's files.
0.71.0 is the release the engine's page tools were built for (INVISIBLE_MCP_HOST_MANAGED, the page rules, a read
that resolves its selector through the engine); it requires invisible-playwright 0.32.0, which brings
invisible-core 39.35.0. mcp-requirements.lock is regenerated with the command in its header for both, and
nanobot/dots/invisible_playwright_mcp.json is captured again from the package installed from PyPI: only its
version changed from the capture taken from the repository, so the published instructions and tools are the ones
the engine was tested against, and the test that holds the capture to the lock passes. golden.test.ts builds from
the lock and names the new pins.
The audit article said the consent rule was in the skill and that browser_read_text takes CSS; both moved to the
server (its page rules, and a read that resolves its selector through the engine), and the article says so and
links the new one.
The engine rewrote every page tool of the browser server under names and descriptions of its own, and its skill
copied the server's instructions (the order to try things in, never act by script, say when a task is impossible),
then gained three rules of its own from the audit of the browser calls, all true of any page. Two copies of a rule
drift, and the copy the model read was not the one the server's authors keep. Claude Code and opencode offer a
server's tools with the server's descriptions and put its instructions in the system prompt; nanobot, the engine's
base, offers the descriptions and drops the instructions.
The server could not be passed as it was: it serves one person and a helper, `main` and `support`, and tells its
model to open them with browser_open, which a Dot's model does not have. invisible-playwright-mcp 0.71.0 reads
INVISIBLE_MCP_HOST_MANAGED=1, under which it serves `main` alone, no tool takes `browser`, and its instructions are
the page rules. The BrowserManager starts it that way (BROWSER_ENV["HOST_MANAGED"], in the shared table too) and
stops adding `browser: "main"` to every call; it still opens and closes the browser with browser_open and
browser_close, which a first launch (the engine's download, answered in steps) and a close (Firefox writing its
profile before the client ends the process) need.
The page tools are now built from nanobot/dots/invisible_playwright_mcp.json, the server's instructions and
tools/list as guest/image-builder/builder/capture-mcp-interface.py captures them from the real server started that
way: the server's name, description and input schema (normalized as nanobot's MCP client does), read-only from its
annotation, plus the identity_id of the open identity, described once on that argument. The permission table says
which the model is offered: browser_read_html, browser_evaluate and browser_upload_files come in, and
browser_take_screenshot under its own name; browser_open, browser_close, browser_list and browser_status are the
identity tools' and browser_watch the UI's frame. browser_scroll, which the engine invented over PageDown, goes, and
so does the 214-character cap on browser_type: the server answers within 45 s and goes on typing in the background.
An image the server answers with is shown, so browser_click_at returns the page after the click. The engine still
refuses a URL that is not http or https before it reaches the server. The system prompt carries the server's
instructions whenever a page tool is offered. The capture replaces tests/fixtures/mcp-tools-0.70.2.json: the fake
MCP server and the smoke serve the same file.
The server's click_at takes `number` coordinates, so store.canonical_arguments writes a whole number one way: 10
and 10.0 are one call for an approval, 10.5 stays itself (the test that forbade a number type said to do exactly
this before adding one). A null for an optional page argument is now refused by the server's schema with what it
should be, as nanobot refuses it for any MCP tool, instead of being dropped by the engine.
Measured with tiktoken, every permission allowed: the page tools' definitions went from 1632 tokens (10 tools) to
2885 (12), and the instructions add 765, about 2000 tokens more on each request that offers the browser. The fake
model of the tests published a 32000-token window, under the engine's cautious estimate of a turn with every
permission (about 34000); it now publishes 128000, the window of the smaller models Dots run on.
The capture is of the server at 0.71.0 from its repository; the lock still pins 0.70.2, so the test that holds the
capture to the lock fails until 0.71.0 is published and the lock moves to it, with the capture taken again from the
published package.
90 of 773 page calls led nowhere and took 961 of the 2823 seconds spent on pages. Addresses from memory are 58 of
them (27 of the 54 navigations dropped unread answer 404 today, against 1 of 40 that were read), which the
finding-a-page rule of PR #1438 is for, and its measure is written here too. Then two timeouts of the library (the
first page after a launch fails at the 30 seconds invisible_playwright gives Browser.newPage; pages over 45
seconds), reads that fail once right after a navigation, clicks under Google's consent dialog, and back, forward
and reload, which never worked. The snapshot with the navigation is measured and not adopted: a snapshot follows 7%
of the navigations that loaded, a text read 72%.
An audit of the 45 tasks of the saved runs that drove a page (773 page calls) counted browser_back three times and
three failures, and browser_reload five times and five "reloaded the page". The three tools pressed Alt+Left,
Alt+Right and F5 through browser_press_key. Run on invisible_playwright itself: Alt+Left and Alt+Right are refused
because the library's key names are ArrowLeft and ArrowRight; Alt+ArrowLeft and Alt+ArrowRight are pressed and the
page stays where it is; F5 is pressed and the page is not loaded again (a value set on the window survived it). A
key the server presses reaches the page, never the browser's own shortcuts. PageDown does scroll (0 to 913 pixels),
so browser_scroll stays, and a navigation to the page's own address loads it again (HTTP 200, the value gone).
So the three tools are removed from PAGE_TOOLS, the permission table, the web client's labels, the smoke's list of
offered tools and the architecture's table; an old event naming one is shown as the model called it. The skill says
that going back is a navigation to the address the page came from, and loading a page again a navigation to its own
address.
The same audit gave two more lines to the skill. browser_read_text takes a CSS selector, and its argument now says
so: the server reads with document.querySelector, so a snapshot selector in Playwright's syntax (:nth-match(...),
text=...) fails there, as one of the ten failed reads did. And a cookie or consent dialog is answered first: four
clicks on a Google result waited their 15 seconds under Google's dialog and failed before the model answered it
(66 seconds). On the same Google task, run once with the old skill and once with the new one on a fresh Dot
(z-ai/glm-5.3-flash), both answered the dialog before clicking, so that run shows no difference; the line is for
the four clicks of the runs.
wire_shapes.json is written again for the tool list and the skill's content.
The skill said how to act on a page and how to keep identities, and nothing about how to reach a page. A model
left alone fills that gap from memory: it writes an address it remembers, the site answers 404, it writes
another, and a task's steps go on guesses. The new section says where an address comes from (a link in
browser_snapshot, the site's own menu or search, or a search engine's results), that the status browser_navigate
answers is read before the page is trusted (the tool's own words), that after a 404 the next address comes from a
page that loaded or from a search, and that an address from memory is for a site's home page at most, once. The
skill's description names finding a page and searching the web, so a research task is one it covers.
Brave is the search engine named because it is the one that answered the Dot's own Firefox with real results: a
Dot asked to open the three engines reported Brave 200 with usable results, DuckDuckGo's html version 200 (its
result links wrapped in a redirect), and Bing 200 with an empty results area, then results unrelated to the query.
DuckDuckGo is the fallback the skill names.
Measured on one Dot (z-ai/glm-5.3-flash) asked for the exact URL and first heading of three documentation pages
whose addresses are not guessable (Tailscale SSH, Hetzner Cloud firewalls, Fly.io autostop): with the old skill
28 calls, 8 navigations, 2 addresses from memory that answered 404 before it recovered from the sites' indexes,
$0.019; with the new one 29 calls, 7 navigations, 0 addresses from memory (each page came from a Brave result or
a link of the site), $0.037, the difference being the snapshots of the result pages. Both answered correctly.
wire_shapes.json is written again for the new description and content; architecture.md's line on the skill says
what it now covers.
On a 320 or 360px phone (the first iPhone SE, many Android phones) GitHub draws the 720px phone animation 254-294px wide, so its 28px text read at 9.9-11.4px. Up to 374px the README now loads hero-small-{light,dark}.gif: the same 720x620 animation, scenes and timing, with every text at 35px or more and fewer words where a line would not fit, so it reads at 12.3px on 320 and 14.3px on 360. The badge keeps its 30px: at 35px its sentence would not fit the width.
Measured with Playwright on seventeen device profiles through a local copy of the README laid out with the column github.com gives each width: every one now shows its smallest text at 12px or more, from 320px phones to 1920px desktops, in light and dark.
The scene titles go from 42px to 46px and the line under each from regular 23px to semibold 24px, so at the 838px GitHub draws the animation the title reads at 30px and the line under it at 15.7px in a weight that holds up on a light and a dark page. The caption column is 16px wider to keep every title on two lines.
GitHub draws the 1280px animation in an 838px column, at 0.655 of its size, so its 16px text reached a desktop visitor at 10.5px. Every text in it is now 19px or more, 12.4px on screen: the terminal at 20px with a short prompt, Firefox's list at 18px with three invoices instead of five, two lines per month on the phone, and the window titles, file names, dates and the fleet's cards at 19-21px. Same size, scenes and timing; the phone animation is unchanged.
Measured with Playwright on fourteen device profiles before and after, through a local copy of the README laid out with the column github.com gives each width: every phone and tablet already gets the phone animation at 12.6-29px, and the desktop one now clears 12px at 1280, 1366, 1440 and 1920.
The engine read no limit of the model: it sent max_tokens 4096 on every request and kept the thread under the
Dot's limits.context_tokens (32000 by default), so an answer could be cut at 4096 tokens and a thread was
summarized at a fraction of the window its model has. Now each model's limits are read once from OpenRouter's
list of models (the window and the longest answer of the provider it routes to by default), every request sends
the longest answer the window leaves room for (without a max_tokens each provider applies a default of its own),
and the summary model works within its own limits. A model OpenRouter does not list fails the turn in words.
Compacting, at the window less the room for the answer (20000 tokens, or the longest answer when shorter:
opencode's rule), now takes two steps. Old tool results are cleared first, the newest 40000 tokens of them kept,
with no model call: on SWE-bench that costs half as much as a summary for the same solve rate (JetBrains, "The
Complexity Trap"). Only when that is not enough is the thread summarized, as a handoff for the model that resumes
the work: Codex's framing under the headings of OpenHands' summarizing prompt, plus the approvals and files of a
Dot, then the person's latest messages as they wrote them, newest first up to 20000 tokens (Codex). A thread too
long for the summary model loses its oldest messages first, each with its calls' results, instead of becoming a
16000 character dump; no fixed cap is left on the summary. The prompt replaces the long-term-memory one the
fork came with. The request is measured once, from the provider's reported usage when it matches, for both the
compaction and the answer limit.
The smoke's stand-in OpenRouter publishes its models' limits, and the summary section narrows the window by
choosing a model with a small one.
limits.context_tokens goes from the config's schema, its bounds, the CLI's template and the web client's
settings: a Dot's requests use the whole context window and the longest answer its model has, which the
engine reads from OpenRouter. Migration 0012 takes the setting out of the configs saved with it, moving
their version on so a form opened on an old config cannot save it back, and a config that names it is
refused as an unknown key.
When the whole output budget went to a tool call that never finished (a model writing a large file in one
call), the response had no text and the call was dropped, but the recovery prompt asked the model to
continue "from its exact endpoint". With nothing to continue and no word that the call did not run, the
model made the same call again, was cut again, and after three recoveries the task failed with "the run
ended without an answer". Seen on real Dots in the long benchmark tasks (kv-store, lisp-interpreter); one
passing run of kv-store spent all three recoveries in a row. Now that response is told that none of it was
delivered, that no tool call ran, and to do the work in smaller steps.
A chess move generator graded on published and hidden perft counts, a Scheme interpreter graded on 30
hidden programs, a key-value server graded through kill -9 and a restart, a web research on 18
programming languages graded on facts that do not change, and a fraud investigation over 292,467
generated transactions graded on the planted cases. The reference solutions are in references/ and
author_long.py writes the tasks from them. In Dots the oracle scores 5/5 and doing nothing 0/5.
Also: the Dot's events of each trial are kept with its logs, and bash-to-python's grader shows the diff.
Harbor (the harness of Terminal-Bench) runs each task in a new Dot: dots_harbor/ is its environment (the Dot
is created through the API, the task's Dockerfile is replayed as dot, with apt through dot-install, and the
task's root paths are moved under /home/dot/bench) and its agent (the instruction goes to the Dot as a task).
Every call goes through bridge.ts, on the end-to-end run's outside driver. Harbor's registry datasets run
the same way.
tasks/, written by author.py from fixed seeds: shell, files, coding, data analysis, the computer's
settings, questions with one answer, two long tasks, and what a Dot is for (its own automation, a careful
cleanup, a request it must refuse). In Dots: the oracle scores 25/25 and doing nothing 0/25; the Dot with
z-ai/glm-5.3-flash scored 23/25 in 9 minutes, 4 at a time (one miss was the grader's rounding, now fixed).
scale.ts creates 1, 2, 4 and 8 Dots at once on real VMs; each must come up, answer a message and do a task,
while the API, the host's memory and QEMU's are sampled, within budgets that are ratios to one Dot. The
end-to-end run's outside driver moves to driver.ts, which both runs use, and a contract test keeps every
file of the runs within what Node's type stripping runs.
On a Linux host with KVM (16 cores): READY p95 21 s with one Dot and 45 s with eight, a reply in 4 to 8 s,
a task in 3 to 6 s, the API's p95 6 to 10 ms, about 700 MB of QEMU memory per Dot.
The host expires the approval of a cancelled task, so no decision for it ever came: the engine kept it
pending, /state named it, and the agent stayed WAITING_APPROVAL. The Dot showed "Waiting for you" and,
not being READY, never went to sleep. The cancel now ends the task's pending approvals in the
transaction that records it, and an agent that was only waiting for them is IDLE.
OpenRouter names an app by its HTTP-Referer, and the Dot still sent github.com/feder-cr/dots, the old name that GitHub only redirects. The engine's constant, its two tests and the two pages that quote the header now say feder-cr/invisible_dots. The three OpenRouter constants in packages/shared, which nothing imports and which repeated the engine's values, are gone, so the engine stays the one place they live.
The header reloaded the Dot on dot.updated, computer and agent events, not on dot.deleted: a delete finishes after its request (the computer stops first, longer with a task running), and the page open on the Dot stayed on "Computer: Deleting" with its tabs until reloaded by hand (seen through the real product). dot.deleted reloads it, and the 404 draws "This Dot does not exist". vitest floors +1.
settle() waits for the scheduler's own work; the automation the woken guest runs can still hold the Dot RUNNING when the test reads it (soak cycle 23, PostgreSQL under load: expected READY, got RUNNING). The test waits for READY, which is what it proves: the stop was finished and the computer works again.
Inserting the VM proxy check (8c8ad881) dropped the space between the label and the command of the next check, so check got one argument and the smoke stopped at set -u (lib.sh line 15: $2 unbound). Seen in the soak's smoke lane.
tests/repo/engine-smoke.test.ts keeps smoke.sh from removing directories (it must point nowhere outside its run); the check made in 8c8ad881 cleared its output directory with rm -rf.
The instance-id was the digest of the seed's content, and cloud-init runs write_files once per id it has seen. A VM proxy set and then cleared gave the first boot's content, so the first boot's id: cloud-init skipped write_files, config.json kept the proxy, and the Dot stayed behind a proxy it no longer had (seen through the real product: after the proxy was removed and the computer stopped and started, every message answered "Connection error"). A seed equal to the last one written keeps its id, as before; any other gets the content's digest and a digest of the id before it. The last one is recorded in seed-instance.json beside seed.iso. vitest floors +1.
install.sh wrote "ip daddr <proxy> udp accept", which nft refuses (udp wants a field after it; the protocol is meta l4proto udp). nft -f failed, and set -e stopped install.sh there: no table, no tunnel, and the rest of the install skipped. A Dot with a VM proxy went out directly, even through a proxy that answered nothing (seen through the real product: the Dot kept answering with socks5://127.0.0.1:9 set and restarted; inside it, no tun0, no dot-vmproxy unit, the direct default route, and the guest's journal held the nft error).
The engine smoke now runs install.sh's own generator on a config with a proxy and checks the ruleset with nft -c (its container gets NET_ADMIN, and nftables and iproute2): it fails on the old rule and passes on this one. No test had run the VM proxy's setup before.
With a wrong OpenRouter key set in the host's Settings the chat said "I could not answer: Error: User not found.", OpenRouter's words for it, which do not say that the key is what is wrong. A 401 now reads "Error: the API key was refused (401): User not found." pytest floor 2222 to 2223.
Both failed twice in fifteen soak cycles, at its busiest. hub-telegram's 429 test polled the channel's status for an error that lasts the second Telegram asked for: one read of a loaded pglite took longer and the error was never seen. It now reads the channel.status events, where every change is recorded, and measures the wait between them. api.test's two tasks in a row take 0.6 s on PGlite and 2.2 s on a PostgreSQL reached across WSL, and passed the default 5 s under load: that liveness wait is 15 s, as the hub's comparable waits are.
In the bundle esbuild renamed AbortSignal to AbortSignal2, and node-fetch, which grammY uses on Node, recognizes a signal by its constructor's name: every Telegram call failed there as "Network request for 'getMe' failed!". Connecting a bot answered "could not reach Telegram (getMe)" for any token, and a connected one could neither poll nor send. The suites import the sources, so none saw it; it was found through the real product (a wrong token said Telegram was unreachable while Telegram answered 401). keepNames is set, the options live in scripts/bundle-options.mjs, and tests/repo/cli-bundle.test.ts bundles a real grammY call with them against the fake Bot API (without keepNames it fails as the product did). vitest floors +1.
Opened after its delete (seen through the real product, a Dot deleted while a task ran), a Dot's address drew the whole page around nothing: an empty header, the tabs, a live message box for a Dot that is gone, a computer panel saying to start it from the header, and two red errors naming its id. A 404 for the Dot now draws one page that says it does not exist and links to Home; any other failure to load it keeps the error it had.
Next's default 404 drew its own black or white page in the system font, with no link: a person who followed an old link, mistyped, or opened a Dot that was deleted was left there. app/not-found.tsx says there is nothing at this address, why that can be, and links to Home. Seen through the real product in every theme and width; shell.spec.ts checks the 404, the font and the link. Playwright floor 86 to 87.
With limits.context_tokens at 4000, the schema's floor, a Dot of the Balanced preset could answer nothing: its prompt and tools alone are 6371 tokens and the window less the answer's room is nothing. Each message got "I could not answer: Model input exceeds the local context budget for chat: 6371/0 via tiktoken" (seen through the web client). The turn now fails with the request's size, the window and what it leaves, and says to raise Context tokens in the Dot's settings. Whether the floor itself should rise is the owner's decision; the smoke's summary check relies on a small window. pytest floor 2221 to 2222.
The OpenAI client hands failure_text the body it already parsed, a dict, and str() of it reached the person as "I could not answer: Error: {'message': 'no-such-vendor/no-such-model-9 is not a valid model ID', 'code': 400}" (seen through the web client with a model id that does not exist). A parsed body is now read for its message, {message} or {error: {message}}, and shown as JSON when it has none. pytest floor 2217 to 2221 for the four tests added.
serve starts the control plane, then listens for the stop signal, then starts the web client, each asynchronously. The tests slept 20 ms and then asserted, which a loaded machine loses: the soak run read webOptions[0] before the web start had happened. Each now waits (vi.waitFor) for its own condition: the start it checks, the SIGINT listener, or the web start having begun before Ctrl+C.
A Dot reaches READY only with a key to push. In api.test.ts the global key was stored by the health test, so the 30 tests that ready a Dot passed only after it: run alone (vitest -t), any of them timed out waiting for READY, on both adapters. It is stored in beforeAll now, as the other suites do.
shell.spec.ts read the focused button's outline right after the Tab, and its transition-all eases the outline in from the default medium width (3px) to 2px over 150 ms: on a loaded machine it read 3px every time (measured: 3px at once, 2px 300 ms later). It now polls until 2px. prepare.sh copied apps/web/test-results and playwright-report.xml, which no clone has, and tar failed when a browser test run wrote there during the copy.
Since the main became a flex column (6e6cd785, every page to the bottom), the Inbox's mx-auto box no longer stretched: auto margins stop it, so its width was its content's, up to max-w-3xl. A long file in an approval made the page 768 px wide on a 390 px phone, the main scrolled sideways inside itself (the document did not, so the overflow check passed) and Allow once and Deny sat at 654 to 751 px, off the screen. w-full gives it the width of the main, as the chat's centered boxes have. Found by e2e/inbox.spec.ts in the soak run.
dot-agentd runs what the model asks with the account's own HOME, USER, LOGNAME and SHELL (exec.go execEnv). The fake relay left HOME out, so the login shell of a tty call read the profile of whoever ran the tests: on a machine whose ~/.profile sources $HOME/.cargo/env, its errors came first in the output and test_an_escape_sequence_split_across_two_polls_is_never_shown_in_halves failed. The relay's home is the LocalComputer's /home/dot.
The floors lowered with the Memory tab, the browser's view and the goal were worked out from the lines of vitest list, which shows an it.each once: the deleted files (memory, memory-view, notes, automations, identity, browser-activity, login, session) took more runs than that. The gate's run on Windows: 2099 passed, 0 failed, 0 skipped, in 149 files. Linux stays three below, the generated PowerShell tests it skips.
Step c checks the web client as it is since it has no login: its pages on 127.0.0.2:3000 and its proxy reaching the API, with no session (cookieOf goes, nothing else used it). Step e reads example.com's title with browser_snapshot instead of a heading: the site's body has changed again and its first line is now the paragraph, while its <title> stayed "Example Domain"; the files are title.txt and example-title.md. The Linux host's user takes the uid and gid of whoever builds it (--build-arg), so the key mounted from their home, mode 0600, reads as it does for them; it was EACCES.
Run in the linux-host container on WSL with KVM: 15/15 steps passed, among them h with the engine's max_open of 3, j to l across restarts and killed VMs, m and o finding the key nowhere.
Together, one of the providers OpenRouter routes z-ai/glm-5.3-flash to, decodes the call under the tool's schema and takes `pattern` as the whole value: with "^https?://" the only URL it let the model write was "https://" (measured on every provider of the model, the same forced call with and without the pattern: Together alone changed, and only with it). The refusal of anything but http and https stays in the engine, where it was already enforced.
The goal is gone from the schema, the engine's protocol and prompt, the header, the cards, the search, the
forms and the CLI sample; the first messages offered no longer draw on it. Migration 0010 takes it out of
stored configs and moves their version.
The Browser panel is gone with what it set: managed_by_dot, max_identities and max_open. The engine keeps
its own limits (3 open, 20 in all, DEFAULT_MAX_OPEN and DEFAULT_MAX_IDENTITIES in main.py), fixed when the
manager is made, and offers every identity tool its permission allows. Migration 0011 takes the section out
of stored configs. The limit message says "the most it may keep" instead of "the most its configuration
allows". The real e2e's eviction step launches a fourth identity instead of lowering max_open to 2.
Test floors are lowered by what went with the features: pytest 2231 to 2217 (the set_limits, managed_by_dot
and goal tests), vitest 2125 to 2124 on Windows and 2122 to 2121 on Linux (three first-message tests about the goal
became one and the max_open rule's test went; the two migration tests came).
Measured against fifteen READMEs (browser-use, Stagehand, Skyvern, OpenHands, Open Interpreter, nanobot, Claude
Code, uv, Ollama, n8n, Supabase, E2B, Dify, AutoGPT, Playwright MCP), in their order: a centred title, a one-line
tagline, badges and a short row of links; a picture of the product at once, light and dark; what it is in a few
lines and its highlights; the quickstart; what to ask it, with real prompts; then what it does, how it works, the
security model, privacy, configuration, troubleshooting, status, development, acknowledgements and the license.
The picture is a real Dot (fare-watch) answering a real request: it opened a browser identity, read example.com and
answered, and the desktop beside the chat shows Firefox on that page. The text says what today changed: memory and
skills the Dot keeps itself, no Browser view (an open browser is a window of the desktop), no Memory page. The
facts the repository's tests hold the README to are kept word for word, and both prose gates pass.
A skill is a folder with a SKILL.md, the Agent Skills layout Claude Code and upstream nanobot read: a frontmatter
with its name and a one-line description of when it applies, then the steps. Built-in skills ship beside the
engine's package (invisible_engine_dots/skills/, on the runtime disk at /opt/invisible-dots/engine/skills/); the Dot
writes its own under /home/dot/skills with its file tools, and one of its own replaces a built-in one of the same
name. Each turn the prompt names every skill with its description and the path of its file, says to read the file
before a task it covers and how to write one; a file that does not parse is left out and logged
(nanobot/dots/skills.py). The first built-in skill, invisible-playwright, is invisible-playwright-mcp's own
instructions to agents brought to the Dot's tools: identities, a selector before coordinates before a screenshot,
the real pointer and keyboard only, a second identity for a throwaway mailbox, and saying a task is impossible
rather than getting blocked.
The engine serves the list (GET /skills), the host passes it through as it does the tools (GET
/api/dots/:id/skills, the SDK's listSkills), the engine pins its answer in the wire shapes the host parses with
skillSchema, and the web client has a read-only Skills tab: the list, whether each is built in or the Dot's own, and
the open one as Markdown.
The Computer page's Browser view, its identity cards and the chat panel's browser chips are gone: an open browser
is a window of the desktop the Screen and the panel show, and the Dot makes, opens and closes its identities with its
tools. The engine, its tools and the host's identity routes are unchanged. The old /identities address goes.
The summary tests' estimator counts the thread they size, not the engine's own prompt, which grows with what it
teaches the model (a skills section had broken them a second time); the test that no engine key reaches the model
looks for the keys as keys, since a prompt's path may hold the same letters. The vitest floors go down by the 29
tests of the Browser view, net of the new ones; the pytest floor goes up to the 2231 it now has.
"Model input exceeds the local context budget for chat: 29289/26880 via heuristic" came on the first message after
every start of the engine (measured on a Dot: agent.started at 22:21:10 and 22:36:09, the failures at 22:26:22 and
22:36:35, a message in between answered). Nothing loaded the tokenizer at start: the first count of a process began
the load and was answered with the fallback, one token per byte, about four times the truth, so a long thread was
"over" its budget even after its summary. Upstream nanobot warmed the tokenizer when its agent loop started, a call
the port removed with the loop; the engine's start makes it again, from the image's cache, while the host pushes the
config and the key.
Next.js posts anonymous telemetry from every `next build` and `next dev` unless NEXT_TELEMETRY_DISABLED is set. It
was set by `setup --all` and by CI only, so a build by hand sent it; now next.config.ts sets it, which Next reads
before it creates its telemetry, so no way of building the web client sends any, whatever the person's own Next
settings say (measured: a build started without the variable finds it set and its telemetry disabled, and posts
nothing to telemetry.nextjs.org). The copies in setup and CI go.
The minimal cloud image ships pollinate, which at the first boot of every machine, so of every new Dot, tells
Canonical's entropy server the system's version, its cloud and its processor; it is purged with the other services
a Dot never uses. The README's privacy section says what is left, and that the browser layer's launch counter is
that library's.
The notes stay what they were, files in /home/dot/memory, but nothing about them is a setting any more. The prompt
always says where they are, that the Dot saves there what a later conversation will need and changes a note that is
no longer true, and names the newest; the Dot reads and writes them with its file tools (grep, find_files,
read_file, write_file, edit_file). Gone: the memory_search and memory_get tools and their memory.read permission,
the memory.enabled switch, the memory.written event and the chat's "Remembered" chip, the Memory page with its notes
and its automations views, and the routes that listed, paused and deleted automations (engine, guest client,
scheduler, API, SDK). The automations themselves stay the Dot's: it makes and removes them with its cron tool, and
the host still hears when the next one is due.
Migration 0009 takes memory and memory.read out of the configs already saved (moving their version on) and the
memory.written rows out of the log; an engine file made before keeps its old intents column, which its default fills.
Two defects found on the way: dot-agentd not answering reached the engine as an httpx error instead of a
ComputerError, so a turn crashed over the list of notes for its prompt (now status 0, and the turn goes on); and the
sample `invisible-dots init` writes would have been refused by the schema (now tested to parse).
The test floors go down by exactly the tests removed with the feature: vitest 73, postgres 2, pytest 78
(2299 to 2221), playwright 10 (memory.spec.ts).
The "Watch the computer" button and its sheet are gone: from 1024 px the chat and the computer share the width, below
that the computer is a strip above the thread as tall as its picture needs. The page column is as tall as the window
and a Dot's tab body fills what its header leaves, so the thread and the panel end at the bottom of the window; the
1200 px cap is gone. Scroll containers are positioned, so a screen-reader-only span or a hidden select no longer
makes the whole document scroll (it did by 2510 px on a Dot's settings).
The screen picture is laid in a viewer box that has its own size and never sizes it: in an auto-height grid row its
max-height had nothing to resolve against, so a 1280 x 800 frame spilled over the caption and the buttons. LIVE and
the controls share one line, and the Desktop/Browser choice sits on the heading's. The fake guest's screenshot is a
real 1280 x 800 PNG, and the chat e2e checks the picture stays inside the panel and above its controls.
Measured: the minimal image's kernel has no SATA CD-ROM driver, so on the q35 machine the builder VM never saw the
seed and cloud-init never ran. A read-only virtio drive is seen by every cloud image (vdb, vdc), and cloud-init and
the runtime's mount find the ISOs by their labels as before. The golden built on it is 1.96 GB instead of 3.0-3.4,
and a Dot from it boots in about 12 s.
Geist Sans and Mono (bundled), black on white and white on black, Vercel's grays
and 8px corners; a state is a colored dot and a word everywhere (the computer's
says Running, not RUNNING: one label map for every VM state), and the cost is
plain text. The rail's foot is one line of icons whose words are in a tooltip
and for screen readers; Tooltip brings its own provider, and the phone menu
opens on the current page instead of focusing (and opening) a status tooltip.
Tests: the e2e harness has no sign-in any more, the rail test reads the favicon
color from its module, and the Tasks paging test counts the queue's items from
the DOM instead of a role query over 200 cards repeated by waitFor (5s -> 2s).
Playwright floor 99 -> 96: the three login tests went with the login.
The primary action is ink and color is kept for status, with amber for what
needs the person (no indigo). IBM Plex Sans for words and Plex Mono for what the
machine reports, bundled with the client. Pills and circles become square marks,
the soft focus glow a crisp ink line; Home lists the Dots as rows, the chat is
the page instead of a card in it, the create form numbers its steps in mono,
and the rail has a wordmark instead of a colored New Dot button.
QEMU's user network maps 10.0.2.2 to the host's 127.0.0.1 only, so a Dot
reaches the API on 127.0.0.1:8787 (which needs the token) and never the web
client. Measured from a Dot: 10.0.2.2:3000 times out, 10.0.2.2:8787 answers
401. The login page, the session route, the sign-out button and their tests
go; the web server still adds the API token to each call itself.
The sudo rule names a script that takes package names only, so no option
reaches apt (a rule for apt itself is a root shell through -o); install.sh
puts it in /usr/local/sbin and checks the rule with visudo. The engine's
prompt tells the model, with uv for Python tools.
No Node (nothing in the guest runs it since the engine is Python), no git,
curl, xz-utils, xfce4-terminal or the model's convenience tools; the cloud
image's services a Dot never uses (snapd, unattended-upgrades, apport, the LXD
stubs, Ubuntu Pro, the release upgrader, the SSH server) are purged in the
build.
CI (golden-image.yml) builds it compressed and publishes the release
golden-<inputs digest> with its manifest, the image in parts under 2 GiB and
release.json. image build looks for the release of the checkout's own digest,
checks each part and the whole image against their SHA-256, and builds the
image itself when there is none (--no-download always builds).
The minimal image has the same generic kernel and cloud-init as the server one
at about 250 MB instead of 600; the few tools a model's commands use that only
the server image had (jq, file, less, nano, rsync, zstd, lsof, ping) are now
apt packages of pins.json.
Lowered on purpose: the tests of the removed layers went with them (GeoIP pin,
command masking, proxy scrub and stderr filter, engine start-up guards) and the
web sessions/CSP revert took two browser tests. Measured: vitest 2227 on
Windows (2224 on Linux, three PowerShell tests skip there), pytest 2299,
postgres 701, playwright 99.
WHPX boots with host,-vmx,-svm (measured), the host shows no identity proxy but
the browser server's own messages are not filtered, and a navigation's target
keeps its query.
Gone: the credentials-on-disk assertion (credentials.py), the requirements-lock
tie between the runtime disk and the golden venv (and both lock copies), the
store's schema-version guard, and the key replacement in provider error text
(failure_text stays the one place an error becomes text). Their tests and
smoke checks go with them.
The browser server's answers and stderr pass as they are; mcp_stderr.py, the
scrubbers, their tests, the fake server's echo controls and the smoke checks
that relied on the scrub go.
targets.py keeps one simple line per tool (the command's first line, the path,
the URL without user and password); the approval still masks an identity's
proxy. The masking tests and the smoke check of it go.
The pin, its weekly CI check, the cache pruning, the notices file and the
engine's start check go; the engine no longer sets STEALTHFOX_GEOIP_MMDB.
Tests and smoke checks of that layer are removed with it.
Measured on this Windows 11 host (QEMU 11.1, Intel Core Ultra 7 255H, hypervisor
running): -cpu host and -cpu max pause the VM at its first firmware instructions
with "WHPX: Unexpected VP exit code 4"; -cpu host,-vmx boots the Ubuntu cloud
image to its login prompt, and no other host CPU feature mattered (bisected).
A Dot never runs a hypervisor, so CPU_MODEL = "host,-vmx,-svm" (svm is the AMD
name of the same extension) is the one CPU model on every accelerator: the
Dots' QEMU command line, the image builder's VM and the doctor's accelerator
probe use it. Architecture 3.4 goes from OPEN to measured.
After the clone, "invisible-dots setup --all" does in order what the quick start
did by hand: builds the guest daemon (go build, static linux/amd64, trimmed
paths), gets QEMU and its accelerator ready (the one administrator step stays
one step), builds the web client and the images. It stops with the next action
where a restart or a re-login is needed and carries on from there when run
again; it ends saying how to open the web UI. Each step is the existing code
called as a function (prepareHost is setup's own work, imageBuild the image
command), not a copy. "setup" alone keeps its behavior. README quick start and
architecture follow.
The proxy is a per-Dot secret (vm_proxy in secrets, no install-wide default),
set by PUT/DELETE /api/dots/:id/proxy, the SDK, "invisible-dots secret proxy
--dot <dot> [--clear]" or the VM proxy card of the Dot's settings. Answers say
only whether one is set. It travels in the seed's root-only config.json, which
is written at every start, so a change is used from the next start; nothing
tracks or compares the exit.
In the guest, the runtime's install.sh routes the whole VM through
hev-socks5-tunnel (MIT, pinned by URL and SHA-256 in pins.json, installed by
provision.sh): TCP, UDP and DNS over tun0, IPv6 off, and an nftables table that
lets out only the tunnel's connection to the proxy and the host's network, so
nothing leaves when the proxy is down. A value that is not socks5:// keeps the
VM closed and says so in the log. The browser gets no proxy: it inherits the
egress, as before.
PinnedDownload's checksum list is optional now: hev publishes none, so its
pinned sha256 is the only record. nftables joins the image's packages.
Brings ede1d648 (no proxy per identity by default) and 1393b908 (the proxy is one
optional secret string handed to the library as written; our copies of its parsing,
scheme list, port rule and display redaction are gone).
Conflicts:
- apps/web/src/components/IdentitiesTab.tsx: deleted on this branch by the new web
UI; kept deleted.
- apps/web/src/lib/format.ts, apps/web/test/format.test.ts: this branch's version
(formatUsd, startOfToday and their tests); lane-vp-id only removed maskProxy, which
this branch had already removed.
- README.md: the identity-proxy limit takes lane-vp-id's wording, the rest of the
security list and the channels text are this branch's.
- .github/test-floors.json: this branch's; the floors are set to measured counts
after the next batch of work.
The new web UI followed the old shared redactProxy, which lane-vp-id deleted: an
identity card now says only whether it has a proxy (hasProxy), an approval shows an
identity's proxy as ***, and the form no longer refuses a proxy (the library judges
it at launch). Web tests and the computer e2e follow; removed: the web checks of a
redacted proxy URL and of a refused scheme (the library owns both).
The browser library already owns what a proxy is: invisible-playwright-mcp reads
STEALTHFOX_PROXY (or a browser_open argument) with its own parser, refuses a URL with no
scheme, host or port in its own words, and invisible_core.parse_proxy owns the scheme list
and the port range. Our identity rules re-implemented that (a WHATWG URL parser in two
languages, a scheme list, a port rule, redact_proxy for display), so every change of the
library would have been a second change here. An identity now has an optional proxy string:
blank, null or absent is none (the default), a string is stored as given, as a secret, and
handed to the library unchanged in STEALTHFOX_PROXY at the launch, which is where the
library judges it and answers a bad one with its own error. Only a value that is not a string
is refused, as the wire contract says.
What stays ours is that the secret is shown nowhere:
- an identity says only that it has a proxy: `hasProxy` on the wire (BrowserIdentity in
protocol.ts, the engine route, the model's browser_identity_list `has_proxy`), the CLI
column says yes or -, the web table says yes or none; no host, no user. The library has no
safe display form of a stored proxy to borrow, so none is shown.
- an approval of browser_identity_create shows the proxy as `***`.
- the scrub of what the server says is kept, because the library has nothing for it (it quotes
the refused URL, password included, in its error: `proxy URL '...' has no port`, and nothing in
it or in invisible_core hides a secret). It now hides a proxy that carries credentials whole as
`[proxy]` and a piece of its credentials as `***` (the password in every form a traceback, a
JSON line or a Proxy-Authorization header repeats it), and leaves alone what the library
prints of a proxy with no secret (its scheme, host and port). It cuts the credentials out of
the URL with the standard library's urlsplit, as the library does, and judges nothing.
- the web form's proxy field is a password input.
Deleted (the library owns it): nanobot/dots/identity_rules.py's URL parser, PROXY_SCHEMES,
the port rule, redact_proxy; packages/shared identity-rules.ts redactProxy, PROXY_SCHEMES,
namesAPort and the scheme, host and port checks; apps/web maskProxy; the smoke's port-less
refusal at create.
Removed tests, each because the library owns the behavior or the display form is gone:
- fixture identity-rules.json `redact_proxy` (15 cases) and its two runners, test_redact_proxy
(engine) and the redactProxy block (TypeScript): redact_proxy no longer exists.
- fixture check_request, 19 cases removed of 50: an http, an https, a socks4 proxy and an IPv6
host accepted (the scheme list is the library's), a proxy that is not a URL, an http proxy
with no host, a port that is not a number, a port above 65535, a scheme that is not a proxy
scheme, host and port with no scheme, four proxies without a port (with and without
credentials, IPv6, a path), an empty port, the written default ports of http and https,
a port after a password holding a colon, and the proxy-checked-before-the-limit case. The
trimmed-proxy case is replaced by one that says the proxy is kept as written; two cases added
(a string that is not a URL is kept, a non-string proxy is refused before the limit).
- test_browser_manager: the bad-proxy refusals of test_refuses_an_empty_name_a_bad_proxy_and_more_than_max_identities
(ftp scheme, not a URL) are removed from it, now test_refuses_an_empty_name_and_more_than_max_identities.
- test_browser_tools: the ftp refusal of test_a_refused_request_is_an_error_result_that_says_why.
- test_server: the ftp refusal in test_refuses_what_the_rules_refuse_with_the_status_the_host_expects.
- apps/web format.test: "hides proxy credentials" (maskProxy removed).
- apps/api vm-driver.test: the ftp refusal now checks a number, the one thing still refused.
Rewritten, same intent: the tests that asserted the redacted URL now assert `hasProxy` and
that no user, password or host is in any answer, event or log (test_server, test_browser_tools,
test_browser_manager, api.test, scheduler.test, cli.test, tests/repo/e2e.test proxyIsMasked,
tests/e2e). Added: test_a_proxy_is_not_judged_by_the_manager_and_reaches_the_server_as_written
(4 cases, including one the library refuses), the scrub of a proxy with a user alone, one
that cannot be read, one without credentials and a non-URL (4 cases), the CLI row of an
identity with a proxy.
Smoke (browser, run against the real library, 77 passed; engine, 252 passed): a port-less
proxy is now accepted at create (hasProxy, no password), the model's launch of it fails with
the library's own "has no port" refusal and nothing the model is sent holds the password, and
the identity is deleted; the event counts become 3 created and 2 deleted; the listing checks
say hasProxy. docs/architecture.md, README.md and the smoke and e2e READMEs say the same.
Floors in .github/test-floors.json are lowered by the removed tests net of the added ones:
vitest linux 1192 -> 1157 and win32 1195 -> 1160 (35 fewer, as run: 1160 passed on
win32), pytest linux 2789 -> 2763 (as run: 2763 passed). Go is unchanged.
Every floor is the measured count of the merged tree (HEAD 07812b36 for
the guest and container suites, run from a git archive; the Windows host
suites on this checkout):
vitest linux 2269, win32 2272 (was 2255 / 2258)
postgres linux 697, pg runs 272 (was 711 / 281, lowered: see below)
whatsapp linux 25 (9 pg), win32 16 (was 24 / 15)
go linux 120, win32 70 (unchanged since lane-sec)
pytest linux 2799 (was 2791)
playwright linux 101, win32 101 (unchanged)
The postgres floor is lowered, from 711 to 697 tests and from 281 to 272
runs on pg, and the reason is a move, not a loss. lane-lic took the tests
that need the real WhatsApp client out of the default suites because the
client is an opt-in install: the auth-state tests (18 tests, 9 of them on
pg) and the reading and connector tests of baileys.test.ts, plus the
final review's test that Baileys fetches no link of a text, now
packages/channels/test-optin/ (npm run test:whatsapp, the whatsapp floor,
which the whatsapp-client job counts with PostgreSQL: 25 passed, 9 of
them pg). The default suites gained the tests of the client loader
(whatsapp-client.test.ts) and of the API start in their place. The
whatsapp floor is raised by the one test that moved there in this merge.
Suites run on the merged tree, all green: typecheck; vitest 2272 on
win32 and 2269 (3 skipped, the real-PowerShell tests) on linux; postgres
697; test:whatsapp 16 on win32 and 25 on linux with pg, typecheck:whatsapp;
go 70 on win32 and 120 on linux, gofmt, vet, vet GOOS=windows, the static
build, and 131 with -tags privileged as root; pytest 2799; next build;
Playwright with CI=1, 101; engine smoke 252 passed, 0 failed, 0 skipped;
browser smoke 75 passed, 0 failed, 0 skipped; english and claims gates.
Not run: the iso kernel-check job (needs a loop mount, nothing here
touches packages/iso) and tests/e2e (a real golden image under QEMU).
No test removed.
Both merged branches left statements that no longer matched the product:
- README.md: the architecture diagram names dotagentd as the computer
daemon's user. The list of what is not protected now says what is still
true after the split: it rests on the guest operating system (a kernel
flaw or an unknown way to root ends it), the daemon holds CAP_SETUID,
CAP_SETGID and CAP_KILL and one root command (its one door, the token
port, is closed to dot), and nothing limits the disk, memory or
processor time of the model's commands inside their VM. The statement
that dot could replace the computer daemon on its port was already
removed by the split and stays removed.
- docs/architecture.md 4.1: after the merge the section describes three
users; its closing paragraph "What stays" is now the list above with the
reasons and the section that covers each. The older statements that dot
can read the Dot token and stop dot-agentd are gone with the old unit
text (the security split wins).
- "Nothing under the GPL is installed by default" was written for the npm
install and read as a statement about the product. It is now stated for
the default npm install (README license section, architecture 9.8 and
11.3, THIRD_PARTY_NOTICES.md, the tests.yml comment and two test
headers), and architecture 11.3 and the README say the VM image carries
the Ubuntu guest operating system and the apt packages of the golden
image, mostly GPL and LGPL software under its own licenses, downloaded on
the machine that builds the image and not published here.
Comment and prose changes only; no test removed, no floor changed.
Brings in S3 (lane-lic, tip a39316c2): the WhatsApp client (Baileys, which
depends on libsignal, GPL-3.0) is no longer in the default npm install; it
lives under optional/whatsapp with its own lock file and is installed by
npm run whatsapp:install. A test asserts that a default install holds no
GPL package; the GeoIP data is described with its true licences.
Conflicts and resolutions:
- .github/test-floors.json: kept the final review's playwright floor and
its description, added this lane's whatsapp floor and its description,
and the counts of the previous merge. Measured values replace them in
the floors commit that follows.
- .github/scripts/test-guard.mjs, tests/repo/test-guard.test.ts: both
sides added a suite name to the usage text, the comment and the list
CI must run; the result accepts whatsapp and playwright both.
- package-lock.json: regenerated from the final review's lock file with
npm install --package-lock-only after packages/channels/package.json
dropped baileys, so the lock holds neither baileys nor libsignal (the
opt-in client has its own lock under optional/whatsapp).
- packages/channels/src/whatsapp-baileys/baileys.ts: the final review
added textContent (linkPreview: null, so Baileys fetches no link of a
text from the control plane) and exported BaileysConnection; this lane
moved the library behind client.ts and added socketConfig. Both stay;
WhatsAppSocket.sendMessage in client.ts now types linkPreview, so the
typecheck made with the client installed holds textContent against the
adapter's view of the socket.
- packages/channels/test/baileys.test.ts: the final review's two tests of
what is sent. The one that runs Baileys' own generateWAMessageContent
needs the library, so it moved to packages/channels/test-optin/
sending.test.ts (npm run test:whatsapp); the one with a fake socket
needs no library and stays in the default suite.
No test removed. Verified on this merge: typecheck, vitest 2272 passed,
typecheck:whatsapp, test:whatsapp 16 passed on a Windows host.
Brings in the security split (lane-sec, tip d7dc34b1): dot-agentd runs as
dotagentd and holds the Dot's token; the model's commands, files and
browser servers run as dot through credentials; the engine socket refuses
dot (SO_PEERCRED); programs the daemon runs as itself are named by
absolute path; its ambient capabilities are emptied before it starts
anything.
Conflicts and resolutions:
- .github/test-floors.json: both sides raised the vitest and pytest
floors from the same base, and the final review added the playwright
floor. Kept the playwright floor and the final review's counts and
added this lane's increments (vitest +3, pytest +8, go 120/70 which
only this lane changed). These are provisional sums; the measured
numbers replace them in the floors commit that follows the second merge.
- No other textual conflict. README.md, docs/architecture.md and
apps/vm-manager/src/guest-client.ts merged without a marker: the
security text of this lane replaces the older unit and install text
(one owner per fact), and the statements the final review flagged as
stale are rewritten in the docs commit at the end of M7.
No test removed.
Measured on this Windows host on the tree of d27601ef, after the work of the final
review; nothing is lowered.
- vitest: win32 2160 -> 2258 passed, 0 skipped; linux 2157 -> 2255 (the same three
PowerShell tests skip there).
- postgres (the pg adapter, against postgres 18.4): 687 -> 711 passed, the "pg"
tests 279 -> 281.
- pytest (engine, docker, python 3.12): 2778 -> 2791 passed, nothing skipped.
- playwright: 95 -> 101 passed.
- go (dot-agentd): unchanged, 64 passed on win32 (110 on linux).
- the engine smoke 238/238 and the browser smoke 75/75 passed on the git archive
of d27601ef.
The forced-colors focus test pressed Tab at most 20 times to reach a button or a
field. Alone, on a host with no Dot, the first is the theme toggle; in the full run
the worker's host has the Dots of every earlier spec, the rail lists them as links
before it, and 20 presses ended on a rail link, which has the browser's own focus
outline and no shadow: the "ring is a shadow" assertion then failed. The product
was right and the test was not: it now presses up to 300 times, and says which
element it stopped on in every failure message. Nothing it asserts is loosened.
The VM proxy design gives a Dot one egress for the whole VM, so a browser identity
no longer needs a proxy of its own to have a place on the internet: by default it
has none and inherits the VM's egress (the VM proxy when the Dot has one, direct
otherwise), and its time zone, language and location follow the exit it uses. The
per-identity proxy stays, as an explicit option for one identity, with every
protection it had (password replaced in all that is shown, the port rule, the scrub
of what the server says, the smoke's checks). When both a VM proxy and an identity
proxy are set, the identity's proxy is reached through the VM's tunnel.
What changed:
- A null proxy now means none everywhere, as an absent or blank one already did:
the shared rule (checkIdentityRequest), its engine twin (check_identity_request,
same fixture case), the scheduler's createIdentity. The model's create tool
already offered null and the engine's route already took it, so the host
answered 400 to what the guest accepts. BrowserManager.create passes the
option to the rule as it is instead of building the body around it.
- Wording: the model-facing browser_identity_create tool says to give a name only
and to use a proxy only when the person gave one; the permission label no longer
says the profile is created behind a proxy; protocol.ts and protocol.py say
STEALTHFOX_PROXY is set only for an identity with its own proxy.
- docs/architecture.md (section 6 opens with where a browser exits, the routes,
the tool table, the launch environment, the echo services, the session-file
paragraph), README.md (what the browser is, the privacy list, the security
limits, the diagram) and THIRD_PARTY_NOTICES.md (the GeoIP section) no longer
present an identity's proxy as how a browser gets its geography. They say the
VM proxy is designed and not built yet, so today the VM's egress is the host's
own address.
- The browser smoke checks that the first identity's server runs with no
STEALTHFOX_PROXY.
Tests added: apps/api (an identity with a name alone, null, blank, and an explicit
proxy), apps/scheduler (the request the guest receives), the CLI listing (the PROXY
column for an identity with none), the engine's tool (no proxy variable in the MCP
environment for a name alone, null and blank, even when the engine's own
environment has one; the schema never requires it) and route (null and blank).
Changed: identity-rules.json, the case 'a proxy that is null' now expects none
(was an error) in both languages.
Removed tests: none.
Floors raised: vitest linux 1190 to 1192, win32 1193 to 1195, pytest 2786 to 2789.
Nothing lowered.
Finding: checks.py wrote its own lookup of the browser command (absolute or
relative path, else each directory of PATH, isfile and X_OK), which is what
shutil.which does. REUSED: _is_installed is shutil.which(command, path=path), the
guest's PATH still passed in (the engine's own, not the process's). The behavior is
the same for every case the tests cover (a name found through the path, an absolute
path with an empty path, a file that is not executable, no path at all), and those
tests are unchanged and pass; no new test is added because there is no new behavior
to fail before. 9 lines fewer, no second copy of the rule.
fdcd2071 made the Automations view say "Paused: you stopped this computer" only
for a Dot whose engine reported a due run (next_automation_at is set): a Dot with
no automation has nothing to pause. The e2e still stopped a Dot with none and
expected the paused text, so it failed once the browser suite was run (the unit
tests of the view passed, they seed a due run). The spec now has the engine report
a run (automation.next_run), checks that the page says "Next automation:", then
stops the computer and checks the paused text. The assertion of the paused text
is kept, not weakened: its precondition is now stated.
Findings -> what was done
- Model spend said nothing about its unit or that tokens are not kept. FIXED
(usage-tab.tsx): "in US dollars as OpenRouter priced them. Tokens are not
reported, only the cost." Test: computer-page.test.tsx.
- Delete Dot said what the computer loses and not that the channels go with it
(the Telegram or WhatsApp link, its token or login, the people paired, a key
stored for this Dot alone). FIXED, in the paragraph and in the dialog.
- The permissions panel said a tool is offered unless its permission is denied;
the engine also leaves out a memory tool while memory is off and the tools that
create or delete browser identities while the Dot does not manage its own. FIXED:
the sentence says it (engine/permissions.py is the owner of the rule; the text
now agrees with it).
- The Dot's tabs were ordered Channels before Activity; the design (1.4) orders
them by what the Dot says and does, how it is reached, how it is set up. FIXED in
DOT_TABS (the one owner of the order); dot-shell.test.tsx asserts it.
- The tab of a Dot's page said only "Chat", so several Dots in several tabs were
not told apart. FIXED: lib/dot-title.ts asks the control plane for the Dot's name
on the server, with the web server's own credential and only for a request that
carries a valid session (a title must not hand a Dot's name to anyone who is not
signed in), settles for the tab alone on any failure within 2 s, and every page of
a Dot uses it ("Chat - fares - invisible_dots"). Test: dot-title.test.ts (signed
in, not signed in, an unknown Dot, a slow or failing control plane).
- The border of a form field (--input) was drawn at 1.5:1 (light) and 1.7:1 (dark) against its background,
below WCAG 1.4.11's 3:1 for a control's boundary. FIXED in tokens.css for both
themes, and tokens.test.ts now checks input against background and card (it
failed with the old values).
- The Home card did not say when a Dot last did anything. FIXED: a "Last activity"
line from the newest event of the Dot (components/home/last-activity.tsx);
home.test.tsx.
- The Memory page said "There is no note called X (any more)" for a note that may
be in a folder the listing cut off. FIXED: when the listing is cut it says the note
is not among those listed and sends the person to the Files view; memory.test.tsx.
- The Activity feed named channels by their raw kind ("telegram"). FIXED in
events/view.ts with CHANNEL_LABELS, the one owner of the names (an unknown kind is
shown as the host wrote it); event-view.test.ts asserts "Telegram" and "WhatsApp".
The assertions changed because the wording did: the facts they check are the same.
Findings -> what was done
- The Inbox's History for one Dot read the pages of every Dot's answers and
filtered them in the browser, so a Dot whose answers were all older than fifty
other Dots' answers saw an empty table (with "show older" as the only way on).
FIXED at the origin: GET /api/approvals takes dot_id (an id or a name, validated
like the other parameters), scheduler.listApprovals resolves it as the event log's
history does (a deleted Dot is read by its id), and the SDK's listApprovals takes
{ dot }. useHistory(dotId) asks for it and holds nothing of another Dot's rows
when the Dot changes. The permission filter stays in the browser: the route has no
such filter and a second one was not invented for it. Tests: api.test.ts (the
route, its refusals, the Dot by name), the inbox test "asks the control plane for
the Dot's own answers" (one answer under sixty newer ones of another Dot is on the
first page), and the "none of the newest answers are under these filters" test
now uses the permission filter, the one left in the browser, which keeps what it
asserted (it is not weakened: the filter that can come up empty changed).
- GET /api/dots/:id/tasks answered the newest 200 and the older ones were not
reachable at all; the Tasks page only said so. FIXED: listByDot takes before (the
id of the last task of the previous page; a keyset on (created_at, id), an id that
is not the Dot's lists nothing), the route takes limit and before, the SDK's
listTasks takes { limit, before }, and the Tasks page has a "Show older tasks"
button that reads one page at a time. The page keeps every task it has seen (a
task is never deleted): the newest page is read again on every change and a task
that a newer one pushed off it is not lost; the first version of this lost it and
a test found it. TASK_LIST_LIMIT's comment and docs/architecture.md say what the
route does now. Tests: repositories.test.ts (the cursor, a foreign id), api.test.ts,
tasks.test.tsx (the queue is complete after the older page, the notice goes away,
a task pushed off the newest page stays) and the e2e that counts 200 then 204.
- The Inbox's keys moved a drawn selection that a screen reader cannot hear, and the
cards of several Dots looked alike. FIXED: j and k announce the card now selected
("fares: Wants to run a command. 2 of 3."), and a card shows its Dot's face
(DotAvatar gets an xs size), decorative because the name is said beside it.
Tests: inbox.test.tsx for both.
- useResource kept the error of the previous key while a new key loaded. FIXED in
ui.tsx (one line), with the use-resource test.
Not split: apps/web/test/inbox.test.tsx holds the tests of all three Inbox items and
test/support/control-plane.ts the fake routes of the first two; they are in this
commit together.
Findings -> what was done
- The session cookie held a value derived from the API token alone: every sign-in
produced the same cookie, signing out only cleared it in the browser, and a copy
of it (a server on another port of the same host can read it) stayed good for as
long as the token did. FIXED at the origin, lib/proxy.ts: a sign-in makes a random
id (256 bits), kept by the server with the time it ends (a week) and a fingerprint
of the token it was made with; hasSession looks the id up and compares the
fingerprint (so a changed token ends every session); DELETE /session drops the
session in the server; the cookie gets Max-Age. The store lives in the process's
global because the sign-in route and the proxy are separate bundles of the Next
build. A restart ends the sessions: written in the doc comment. sessionValue is
deleted, not kept beside startSession. Tests: proxy.test.ts (two sign-ins are two
sessions, an ended or expired one and one of another token are refused, sign-out
ends it in the server) and the e2e "signing out ends the session in the server".
- No Content Security Policy, no nosniff, no referrer policy, no frame protection.
FIXED: src/proxy.ts (Next 16's proxy convention) makes a nonce of 128 random bits
per request and puts the policy on the request (for Next to mark its scripts with)
and on the response; the policy (lib/csp.ts, one owner) is script-src 'self'
'nonce-..' 'strict-dynamic', default-src 'self', connect-src 'self', img-src with
blob: and data: (the pictures of the Dot's computer), frame-ancestors, object-src
and base-uri 'none', and 'unsafe-eval' only in development, where React reads
server stacks back with it. The root layout gives the theme script its nonce.
next.config.ts adds X-Content-Type-Options, Referrer-Policy and X-Frame-Options to
every response. Tests: csp.test.ts (the policy, the nonce, the matcher that leaves
out the API proxy, the session route, built files and prefetches) and the e2e
"every page is served under a Content Security Policy...", which visits every page
of a Dot in a real browser and fails on any securitypolicyviolation or console
report, and on markup with a script of its own that runs.
Found while writing the CSP e2e, both written down here
- zod probes new Function("") once, inside try/catch, and the strict policy refuses
it: the browser reports that one eval violation. It is harmless (the library falls
back to its interpreted parser) and comes from a dependency, so the e2e ignores
exactly that report (blockedURI eval, from a built chunk) and every other
violation still fails it. Not fixed in code: zod's jitless switch has to be set
before the schemas of packages/shared are built, which no web module can promise.
- Chromium reports a connect-src violation for the blob: URL of an image it cannot
decode. The harness's FakeGuest answered a screenshot with the 8 bytes of the PNG
signature, so the Computer page tripped it. FakeGuest.screenshot now answers a
real 1x1 PNG (it still starts with the same signature, so the tests that check
it are unchanged). The product has no such violation: a real picture decodes.
- The first version of the injection check appended a script element from the
browser's own evaluate, which a strict-dynamic page allows (a script created by a
trusted one). It proved nothing, so it now writes markup with a script into the
page, as an injection does, and that one must not run.
Final review, LOW "durability and contract LOWs of earlier reviews that still
hold", item by item:
(1) A wake for an automation used a plain ensureReady outside the lock and did
not re-read stop_reason -> fixed. Lifecycle.wakeForAutomation takes the per-Dot
lock and asks again, from the same place the pass asked (stoppedDotsWithAutomationDue),
whether the Dot is still one to wake; a person's stop that came in front of the
wake keeps the computer off. Test: two idle-asleep Dots with a due automation, the
person stops one before the wakes run; only the other starts.
(2) The person's stop of a sleeping computer wrote no event -> fixed in the commit
of the commit points (computer.stopped {reason: "user"} in the same write).
(3) automationsNote (web) and `status` (CLI) said "Paused" for a Dot with no
automation -> fixed: paused is said when the engine had reported a run that is due.
(4) A failed setCredentials restarted the runner with the binding read before the
stop, so messages delivered meanwhile were sent again -> fixed: the binding is read
again after the stop (its cursor is the stop's). Test: the Dot answers during the
credential check, the write is refused, and the answer arrives once (it arrived
twice before the fix: the test was run against the old code).
(5) A fresh engine.sqlite restarts the outbox seq while computers.event_cursor
stays high -> REJECTED, not cheap or safe: the new store's events would also collide
on events (dot_id, guest_seq) unique, which the host reads as "already stored", so
a cursor reset is not enough; a correct fix is a store id in the agent health, an
epoch in the events key and the cursor, and a migration, across the engine,
dot-agentd's health passthrough, shared, the database and the lifecycle. No code
path or documented operation replaces engine.sqlite in an existing Dot (the disk
is the VM's, and a destroy deletes the Dot), so it stays open for the owner.
(6) migrate knew migrations by name only -> fixed: a database that records a
migration this build does not ship is refused with a message naming it, before
anything runs (tests on both adapters, and the fresh database).
(7) dot.updated had two meanings, shown alike -> fixed with the discriminating
field the Dot's ERROR already carries: Activity says "The Dot failed" with the
error, and "Configuration updated" for a save (architecture 9.2 says both).
Final review, LOW "web layer still owns or copies facts":
- approval-view.ts takes WORKSPACE and HOME from GUEST_PATHS (the one owner of
guest paths); its resolution stays its own, because the rule differs (the
engine's file tools read a relative path against the workspace and resolve "..",
the host's file routes read it against home and refuse "..").
- FRAME_ERROR_CODES `satisfies Record<string, IdentityErrorCode>`.
- The JPEG rule is the engine's (BrowserManager.frame answers frame_failed for any
other media type, with a fake-server test) and the host's copy of it is deleted
with its test (the vm-manager test that checked it: one test fewer, its rule now
tested at the owner).
- The note of an approval: APPROVAL_NOTE_MAX (500) is shared, the web input uses it
and the host refuses a longer one with a 400 (tests on both).
- APPROVAL_PROMPT_TEXT_MAX (300, moved from channels' ARGUMENTS_MAX) is shared and
the channel setting's description renders it.
- One relink type (ChannelRelink; DotRelink is it without the Dot).
- A file above MAX_HOST_FILE_BYTES is no longer offered as a download (the host
answers 413); the preview says why (tests).
Final review, LOW "stale comments": approval-text.ts and spend.py reworded to the
documented rules (the query of an approval URL stays; a failed request is not counted,
though a cut stream may have been billed).
Test floors: one vitest test fewer (the host's JPEG check), the rest are additions;
the floors are measured at the end.
Final review, MEDIUM: design gaps of the web at HEAD: no offline banner,
tool.called tty not rendered, focus invisible under forced colors -> fixed.
- OfflineBanner (components/shell/offline-banner.tsx), an alert at the top of
every signed-in page, from the live stream (reconnecting or ended) or the 30
s health check failing (lib/offline.ts words each: the control plane does not
answer and the page connects again by itself; or live updates stopped and a
reload is needed). Tests: the words, the shell (the stream dropped and refused,
the alert, the Reconnecting in the rail, and gone when it answers; health alone),
and a Playwright spec that stops a control plane of its own and sees the alert
under 768 px too, near the top and without a horizontal scroll.
- tty: toolLabel(tool, tty) says "Started a terminal session" for exec with tty
(design 1.9), used by the chat's steps, the task's story and the Activity
rows, with the unit tests and a Playwright spec across the chat and Activity.
- Focus: `outline-none` is gone from all 14 controls and the shared button,
input, textarea, switch and badge classes; each says `focus-visible:outline-hidden`
(Tailwind 4: no outline normally, a 2px one under forced colors, which draw no
box-shadow), and the radio cards and the composer say it for their own triggers.
The ring is drawn at 80 percent, not 50 (2.1 to 1 in light, so a ring that did
not meet WCAG 1.4.11): tokens.test.ts computes every ring opacity the sources
use over background, card and popover in both themes at 3:1, fails on any
`outline-none`, any focus ring without its outline-hidden, and a selected Inbox
card drawn with a ring (it is an outline now). A Playwright check emulates
forced colors and reads the focused control's computed outline (solid, 2px, a
system color) against the shadow it has otherwise.
Final review, MEDIUM: the Playwright suite runs `next start` with the whole
environment, not the standalone server.js the product ships -> fixed. The 95
tests never exercised the shipped entry, its copied static tree or its reduced
environment.
harness.ts starts the web client with the CLI's own locateWebBuild and
startWebServer (apps/cli/src/web.ts): .next/standalone/apps/web/server.js with
its copied static files, in the environment webEnvironment() allowlists out of
the harness's own (home, token, the API's address), the web server's exit with
the harness's pid, and the CLI's wait and error text when it does not start. The
wording of the harness and the README is the product's ("the built web client
as the product runs it"); the web config test fails if the harness goes back to
`next start` with the whole environment. The harness also gains stopApi(), the
control plane that stops while the web client goes on, for the offline banner's
spec. The suite needs `npm run build --workspace @invisible-dots/web` (which
also copies the static files), as the README says.
The browser tests' harness now runs the web client as the product does, and
stopping the control plane while a page was open hung for good: Fastify closes
its server and waits for the connections before it runs the onClose hooks, and
the hook that ends the live streams (`/api/stream`, the WhatsApp link) was an
onClose hook, so a stream waited for the close that waited for the stream.
`invisible-dots server` with a tab on the web UI would not stop on Ctrl+C
until the tab was closed.
The hook is a preClose hook now (it runs before the server stops listening and
waits). Test: a stream is held open, the server closes within the wait and the
stream ends; it fails with the onClose hook (the close is still waiting after 15
seconds).
Final review, MEDIUM: the agent state in the web is live-only and never
cleared: a computer stopped mid-turn keeps saying Thinking, and a page opened
mid-turn says Idle -> fixed.
- dot-live: computer.stopped, and computer.state other than RUNNING, end the
agent's state and what its task last reported (only a computer that runs has an
agent). Each agent event is applied only if its id is newer than the newest
one that set or ended the state (agentAt), so a replay or a late read of the
log never undoes what is known.
- The shell reads, once, the newest agent.state or agent.started of the Dot whose
page is open and whose computer runs (one request, limit 1, newest first, the
two types in the database) and applies it like a live event; a stopped computer
is not asked about, a failed read leaves the stored status to say what it can.
- The fake control plane keeps that request apart (agentQueries) from the
requests of a view, so the tests of what a view reads count only its own; the
few assertions that counted raw requests to /events now count eventQueries.
Tests: dot-live (every way a computer goes off, a running state kept, another
Dot's untouched, the agent that comes up again, an older event not undoing a
newer, the log read), chat (a page opened mid-turn shows the working row and
its last step with the one request; a stopped computer is not asked; a stop in
the middle of a turn takes the row away).
Finding 1 (high), confirmed and fixed. The unit gave the daemon
PATH=/home/dot/.local/bin:..., DefaultPowerOff started "sudo" through
os/exec.LookPath in that PATH as dotagentd, and dot owns /home/dot (it can
chmod o+x ~ ~/.local ~/.local/bin and plant ~/.local/bin/sudo), so the next
stop or sleep of the VM ran the model's program as dotagentd: it reads the
token and, being in group dotagentd, enters the engine's socket.
- dot-agentd.service: the daemon's PATH is system directories only.
- The PATH of the model's commands is built by the one owner of the model's
environment, Server.execEnv (modelPath: the Dot's ~/.local/bin, then
SystemPath), and no longer inherited from the daemon. A PATH a request
names (POST /v1/proc env) still wins, as before.
- DefaultPowerOff is /usr/bin/sudo -n /usr/bin/systemctl poweroff (still
exactly what the sudo rule names); Bash defaults to /bin/bash and
ImportBin (and --import-bin) to /usr/bin/import, so no program the daemon
starts is looked up in any PATH.
- The engine's own unit keeps /home/dot/.local/bin: it only checks that
invisible-playwright-mcp exists there, and starts every command through
`dot-agentd relay` by absolute path with a system-only PATH, so nothing
the engine runs is found there.
Tests: guest-files (the dot-agentd unit's PATH has no entry outside the
system directories), Go (TestTheProgramsTheDaemonStartsAreNamedByPath,
TestExecEnvPathDoesNotDependOnTheDaemonsPath, the poweroff contract test
and TestExecEnvIsTheAccountsNotTheDaemons updated to the new argv and PATH),
and a smoke check that opens dot's home, plants ~/.local/bin/sudo, asks for
the poweroff and asserts it never ran. The smoke now starts the daemon with
the PATH read from the unit itself.
Finding 2 (medium), confirmed and fixed. ResolveRunAs returned before
emptying the ambient set when the daemon already was the user to run as, and
main skipped ResolveRunAs for an empty --run-as, so the three ambient
capabilities of the unit reached every command of the model (CapAmb e0:
setuid(0) works). serve now calls ForgetAmbientCapabilities first, before
anything starts, whatever --run-as says; ResolveRunAs keeps only the check
that the daemon holds the capabilities. An ambient set that is empty already
is left alone, so a cgo build (the unit tests on CI) runs where nothing is
granted. The empty/self mode stays: tests and development use it, and with
the set emptied it no longer carries the capability, only the uid (which the
daemon says in its log). Test: main_privileged_test.go starts the daemon
under setpriv with the unit's three ambient capabilities and an empty
--run-as and asserts CapAmb is empty (it failed before the fix with e0);
run.sh now runs the privileged tests of every package, not only agentd's.
Floors: go linux 118 to 120 and win32 68 to 70 (two tests added that run on
both). No test of kept behaviour was weakened; the poweroff contract test
and the unit's PATH test changed because the contract they pin changed.
Final review, MEDIUM: a long browser_type can outlive the 120 s tool timeout
while the MCP server keeps typing (reuse item 7 still open) -> fixed with the
interim the review names, until the owner decides the pin.
The pinned MCP (0.70.2) fills a field by typing it key by key at the pace of
the library's typing persona, 120 to 280 ms a key. A call past 120 s is
cancelled on the client, the identity's lock is released, and the next call
runs on a page still being typed into. browser_type's text now has a maxLength
derived from the two facts that decide it: TYPE_TEXT_MAX = half of
REQUEST_TIMEOUT_S at the slowest pace (214 characters), the other half being the
page's and the pauses' share. REQUEST_TIMEOUT_S is browser.py's one number (the
manager's default), the description tells the model the limit, and the schema
refuses a longer text before it reaches the server.
Tests (fake MCP server, as the others): the longest text is sent and a text one
character longer is refused with "at most 214" and the server is asked once;
the arithmetic is pinned (the longest is typed in half the time, one more key is
not), and the manager's default timeout is that constant. The move to 0.70.10,
whose library types in the background under an input lock, stays the owner's
pin decision (decisions.md); this limit would then be lifted.
What and why
Finding 1 (typecheck no longer checked the socket config or the auth state):
confirmed. makeWASocket took `object` and the credentials were `{ me?: unknown }`,
so a renamed or mistyped option (markOnlineOnConnect, syncFullHistory,
shouldIgnoreJid) and an auth state the library would reject both compiled. The
earlier commit's sentence that the new typecheck did what the old compile-time
check did overstated it. Fixed at the origin:
- client.ts declares WhatsAppSocketConfig, exactly the options the adapter
passes, and WhatsAppLogger; baileys.ts builds the object in one exported
function, socketConfig, whose declared return type makes a typo in the adapter a
compile error even without the library.
- The library's credentials and key data come in as type parameters (Creds,
KeyData) of WhatsAppAuthState, WhatsAppClient, BaileysAuthLib and AuthStore,
defaulting to the adapter's loose view, so the typecheck can instantiate them
with the library's own AuthenticationCreds and SignalDataTypeMap.
- test-optin/shape.ts asserts, one way and strictly (methods are compared both
ways, so the module-fits line alone could not): socketConfig's result is
assignable to the parameter of makeWASocket; no key of WhatsAppSocketConfig is
absent from the library's options; AuthStore's state is assignable to
AuthenticationState. Checked by mutation, each making npm run typecheck:whatsapp
fail: an option renamed, an option given the wrong type, a parameter type
changed, keys.get returning another type, creds typed loosely.
- The sentences in architecture.md (WhatsApp, licenses) and in client.ts now say
what is proved and what the method comparison does not.
Finding 2 (the loader did not check the installed release against the pin):
confirmed. entryOf only looked for node_modules/baileys, so after a pull that moved
the pin in optional/whatsapp/package.json the old release loaded silently.
Fixed: client.ts reads the one version package.json declares (it stays the one
owner of the pin) and the version in node_modules/baileys/package.json; any
difference, or either missing, is WhatsAppClientVersionError (names both versions
and `npm run whatsapp:install`). One function, whatsappClientProblem, replaces
whatsappClientInstalled and is what loadWhatsAppClient and the start.ts warning
both use, so the server warns at start with the exact reason. Tests that fail
without the check (verified by disabling it): whatsapp-client.test.ts (release
differs and is fixed by installing again; pin or installed version missing) and
start.test.ts (the warning names both releases). The stand-in client of the tests
now declares its pin like the real install does. tests/repo/whatsapp-optin.test.ts
follows the renamed variable in the loader's one import.
Tests: no test removed or weakened. whatsappClientInstalled's assertions became
whatsappClientProblem's (null or the error). Floors raised for 3 added vitest
tests: vitest linux 1196 to 1199, win32 1199 to 1202 (measured 1202). The
whatsapp suite is unchanged (15, shape.ts is a typecheck).
Verified: npm run typecheck, npm run typecheck:whatsapp, npm run test:whatsapp
(15), npx vitest run (1202 passed), go test ./... in guest/dot-agentd.
Final review, MEDIUM: host lifecycle commit points are several autocommit
writes with the event after them; a kill -9 in between is not repaired
-> fixed. Two rules coexisted (cancelTask and resolveApproval wrote their event
in the transaction, the rest after it). Now every commit point is one
transaction with its events inserted first (the event-order lock rule) and
published after COMMIT:
- Lifecycle: #commit/#logState/#logDotStatus; #recordStarted (process, images,
state RUNNING, computer.state, computer.started; also the reboot),
#recordStopped (state STOPPED with its reason, computer.state,
computer.stopped, the Dot idle), #recordError (computer and Dot in ERROR with
their events), the deletion (dot.deleted with the delete), and every single
state change.
- Scheduler: createDot (dot.created and computer.state with the two inserts),
createTask (task.created with the insert), updateDot (dot.updated with the
config save) and the "always allow" of resolveApproval (dot.updated in the
decision's transaction). dot.updated no longer carries pushed_to_guest: it was
written after the push, so it could not be in the commit, and nothing read it
(the Activity page shows the name only); the push stays after the commit.
- Channel hub: channel.status (statusWouldChange asks the rule setStatus
applies, so the event can come first), channel.changed for a pause, a
resumption and a removal (a failure to log it now fails the change instead of
being swallowed), channel.peer.paired. The pairing's event follows its rows
(whether the code was good is known only from the update that uses it); no
writer of events takes a pairing's or a peer's rows, so that order cannot
deadlock, as the comment says.
- Recovery: a computer found off that the rows still call STOPPING (or any state
but STOPPED) is recorded now with its computer.stopped, with the reason the
stop was asked for or "exited"; before, the kill after the driver stopped the
VM left no stop event for good.
Tests: killedAt (database/testing) makes one write of a transaction throw, as a
process killed there; commit-points.test.ts (scheduler) kills a stop at its last
write (STOPPING, nothing told, then recovery finishes it and tells of it once),
a deletion, a creation, a task, a config save; hub-commit-points.test.ts kills a
status, a pause, a removal and a pairing; the database test checks
statusWouldChange against setStatus on every kind of change and repeat.
LOW (2) of the earlier-review list, fixed here since it is the same write: the
person's stop of a computer that is asleep only wrote stop_reason and no event,
so the automations note of another tab kept saying it would wake; it now logs
computer.stopped {reason: "user"} in the same transaction (once: asking again
says nothing).
Floors: the new tests are counted when the floors are measured.
Final review, MEDIUM: only automation.next_run of the outbound events is pinned
across languages, and the host drops for good any event its schema refuses
-> fixed.
- Engine to host. test_wire_shapes.py no longer writes the one automation event
by hand: a real engine (the scripted-model harness) runs a chat that opens a
terminal and writes a note, tasks that report progress, complete, fail and are
cut in the middle of a call, calls that ask for approval (in the chat and in a
task), the browser identities, and the next-run report, and the outbox its
own writers filled is pinned in wire_shapes.json: one event of each type and
each set of keys and kinds of value, with ids and durations made stable.
engine-shapes.test.ts requires every one to parse back unchanged (the
schemas strip an unknown key, so a key the host does not know fails), the
types to be exactly OUTBOUND_EVENT_TYPES, and the optional keys (tty,
interrupted, task_id, in_reply_to, spent_usd) to be written.
- Host to engine. apps/scheduler/test/host-shapes.test.ts runs a real scheduler
against the fake guest and writes what it sent (a message, tasks with and
without a priority, a cancel, answers with and without a note, the config of a
minimal and of a fully set Dot) into host_wire_shapes.json;
test_host_wire_shapes.py parses each with the engine's own parsers and
requires every key to survive.
- A refused event leaves a trace. GuestClient.events hands a message it
refused to onRefused, awaited in order with the events, and resumes after its
seq; the pump records it as the host event guest.event.refused {seq, type,
problem} and moves the cursor past it in the same transaction. The Activity
page words it, the fake guest can write one, architecture 9.3 says it.
Python tests need UPDATE_WIRE_SHAPES=1 to write the file again (the engine
script in .local/port does not pass the variable into the container; the
two fixtures were written with it passed).
What
- dot-agentd runs as the new user dotagentd (builder seed, per-Dot seed, unit,
install.sh, provision.sh). Every command (POST /v1/exec, the engine's relay),
the browser's MCP servers, the screenshot and the pseudo-terminal of a
command run as dot through SysProcAttr.Credential; a file route acts as dot
for the length of the request (the serving thread's file-system user and
groups are dot's), so files are opened, created and owned as dot's and the
home confinement of the TCP listener is unchanged on top of it. A program is
looked up in the PATH it is started with, as dot sees it. The environment of
those programs has HOME, USER, LOGNAME and SHELL of dot's account.
- The unit gives it AmbientCapabilities=CAP_SETUID CAP_SETGID CAP_KILL and
nothing else; at start it checks it holds them and empties its ambient set
in every thread, so no program it starts holds one (a command of the model
has CapPrm, CapEff and CapAmb zero). --run-as (default dot) names the user;
an empty value or the daemon's own user leaves the work with the daemon's uid
and is logged as a warning.
- The token file is dotagentd's, 0600. /run/invisible-dots is dotagentd:dotengine
and /run/invisible-dots-agent is dotengine:dotagentd (2750), so only the two
daemons reach either socket and dot reaches neither. The poweroff sudo rule
moved from dot to dotagentd (the user that runs it): the model has no sudo
rule now.
- The engine's API socket refuses a peer whose uid is the model's user
(SO_PEERCRED, 403 forbidden_peer, also when the kernel cannot name the peer),
as a second wall under the directory modes; INVISIBLE_DOTS_MODEL_USER names
the user (default dot) and the engine does not start when it does not exist.
Why
The model's commands ran with dot-agentd's uid, the engine's socket directory
admitted group dot and the engine's API has no authentication, so one command
could PUT /config with every permission allow, POST /events an approval of its
own parked call, and read the Dot token, which also opened /v1/agent/* on port
1024. Architecture 4.1 already named the fix (a user of its own for
dot-agentd); this is it, and architecture 4.1, 4.2, 4.3, 5.2 and 1.1, the
READMEs and the unit and seed comments say it.
Tests
- Go: untagged tests of the account lookup, the environment and the no-account
path; privileged tests (build tag privileged, run as root in the smoke's Go
container, where a skipped one fails the run) for uid, groups, environment,
file ownership and permission, home confinement, the terminal's owner, the
kill of another user's process group, the screenshot and the PATH lookup.
- Engine: SO_PEERCRED refusals (PUT /config, POST /events, POST /secrets,
/health, the event stream), the model user at start.
- Smoke (engine suite, dot-agentd started through setpriv with the unit's three
capabilities): as an exec command the model cannot enter either socket
directory (connection refused), is refused 403 forbidden_peer by the engine
even with directory and socket opened to everyone (PUT /config, POST /events,
POST /secrets, GET /health), cannot read the token (its file, the daemon's
environment, memory map, command line, a sweep of the readable files), gets
401 on 127.0.0.1:1024 for the daemon's routes and the engine's behind it,
cannot signal the daemon, has no sudo rule and holds no capability, also
through the engine's relay and on a terminal it owns. Engine smoke 251
passed, browser smoke 75 passed.
- vitest: unit users, the daemon's capabilities, tmpfiles groups, the seed's
users and token owner, the platform-branch list.
Removed tests: none. Changed expectations of kept behavior: the token file and
the two socket directories are no longer dot's (smoke, seed test, install.sh
test); the engine's socket still reads through a link out of home, now checked
on /etc/hostname because a link to the token file is a 403 for dot (smoke); the
poweroff rule belongs to dotagentd (seed test).
Floors: vitest 1187/1190 to 1190/1193 (linux/win32), go 110/64 to 118/68,
pytest 2778 to 2786. None lowered.
Existing Dots: the seed's user list makes dotagentd on a golden image from
before this change, so the new runtime disk starts there too; install.sh and
provision.sh still refuse an image that has no such user.
What and why
npm ci installed Baileys and its GPL-3.0 dependency libsignal for everyone. Now
no package of the default install needs a GPL license:
- Baileys is declared by no workspace (not regular, dev, optional or peer) and is
out of the root package-lock.json (49 packages fewer: libsignal, curve25519-js,
whatsapp-rust-bridge and what only the client needed).
- It lives in optional/whatsapp/: its own package.json (Baileys 7.0.0-rc14, one
exact version) and package-lock.json (integrity hash of every package),
outside the workspaces. One command installs it: npm run whatsapp:install
(npm ci --prefix optional/whatsapp --ignore-scripts).
- packages/channels/src/whatsapp-baileys/client.ts is the one file that names the
library. It looks for it in that folder when a connection opens, loads it by
path only if it is there, and otherwise throws WhatsAppClientMissingError, whose
message is the command and INVISIBLE_DOTS_WHATSAPP=1. That text is the channel
status, is logged at server start when the variable is set without the client,
and is what linking answers when WhatsApp is off (WHATSAPP_ENABLE_HELP).
- Nothing imports the library by name, not even as types: the adapter writes down
what it uses of it (WhatsAppClient) and compiles without it. A typecheck with the
client installed (npm run typecheck:whatsapp, tsconfig.whatsapp.json, test-optin/
shape.ts) proves the real module has that shape and that the key groups are the
library's own, which the old compile-time check did. The tests that need the real
library moved to packages/channels/test-optin and run with npm run test:whatsapp
(vitest.whatsapp.config.ts); a new CI job, whatsapp-client, installs the client the
way a person does and runs both, with PostgreSQL. The command bundle no longer
lists baileys as external: it has no import of it.
- tests/repo/default-install-licenses.test.ts scans the root lock for licenses: no
GPL or AGPL (SPDX expressions read with OR/AND), a license stated for every
package, LGPL only among @img/sharp-* (Next.js's optional image binaries, named in
the notices), and the same scan flags libsignal in the opt-in lock.
tests/repo/whatsapp-optin.test.ts now proves the opt-in shape: no workspace
declares it, it is outside the workspaces, pinned with integrity, one documented
command, one loader, no static import, not in the bundle.
GeoIP notices
The first entry said the merged file is GPL-3.0, which is the license GitHub shows on
daijro/geoip-all-in-one: the license of its scripts. Read at the pinned release
(2026.09.30): its README states no license for the merged data and only credits
IP2Location LITE, GeoLite2 and DB-IP. geoip-notices.ts now lists the actual data
licenses of the sources (CC BY-SA 4.0 for IP2Location LITE, IPinfo and IPLocate.io;
the GeoLite2 EULA; CC BY 4.0 for DB-IP Lite; CC0 1.0 for the tdulcet GeoFeed + Whois
+ ASN database, which sapics lists as PDDL 1.0; ODbL 1.0 for the OpenStreetMap-derived
time zone boundaries), with GEOIP_STATEMENT: the image is built by the person on their
own machine, invisible_dots does not publish or redistribute it, and whoever shares it
meets those terms. Every golden manifest records it as notices_statement beside
notices. THIRD_PARTY_NOTICES.md, the README, the image builder README and the
architecture document say the same; the third-party notices test pins the source list
and license of each source and keeps the notices, the statement and the manifest equal.
Tests removed or moved (none of a feature that went away)
- packages/channels/test/whatsapp-auth.test.ts (9 tests) moved to
packages/channels/test-optin/auth-state.test.ts, unchanged in what it asserts: it
needs the real BufferJSON, initAuthCreds and protobuf, which are not in the default
install. It runs in the whatsapp suite on PGlite and PostgreSQL.
- packages/channels/test/baileys.test.ts: "reading a Baileys message" (5 tests) and
"the connector on a socket that cannot connect" (1) moved to
test-optin/reading.test.ts for the same reason; endOf and the addresses (4 tests)
stay in the default suite.
- hub-whatsapp.test.ts "goes with the Dot" used the real library only to give the hub a
session whose writes must not come back; it now uses a JSON stand-in for the
library's three helpers (the real ones are in test-optin/auth-state.test.ts).
- tests/repo/whatsapp-optin.test.ts: the five old checks are replaced by checks of the
new shape; "pinned to one exact version in the channels package and the lock file",
"declared by no other package" and "imported by the glue file alone" no longer apply
because the dependency is not in the channels package or the root lock and no source
imports it.
Floors
- vitest: linux 1187 -> 1196, win32 1190 -> 1199 (measured 1199 on win32).
- postgres: min_passed 675 -> 659 and pg 273 -> 264, LOWERED: the 9 pg runs and 9 PGlite
runs of the auth-state tests moved to the whatsapp suite, and the 6 moved glue tests
(measured 659 passed, 264 pg, against a real PostgreSQL 18.4).
- whatsapp (new): linux 24 with 9 pg (CI, PostgreSQL), win32 15 (no PostgreSQL).
Suites: typecheck, typecheck:whatsapp, vitest 1199 passed (win32), postgres subset 659
passed with 264 pg, whatsapp suite 24 passed with PostgreSQL and 15 without, go test,
engine 2778 passed, web build, english and claims gates clean.
Final review, MEDIUM: the OpenRouter key and the Telegram bot token are echoed
in clear on the terminal while they are pasted -> fixed. main.ts read the line
with readline { terminal: false }, which leaves the terminal's own echo on, so
the value stayed in the scrollback and in any session recording.
readSecretLine (apps/cli/src/secret-input.ts) reads the line through a
readline whose output swallows what it is given (readline keeps handling
backspace, paste and Ctrl-C; the terminal is in raw mode), writes the one
newline that Enter would have echoed, and rejects on Ctrl-C ("cancelled").
CliIo.readLine is renamed readSecret, since a secret is the only thing the CLI
reads from a terminal. Tests play a TTY (a stream with isTTY and setRawMode):
nothing of the value reaches the screen as it is typed, pasted in pieces, or
after Enter; Ctrl-C and the end of input; the raw mode is put back; and a control
shows the same value on the screen through a readline that does write there,
so the check can fail. The README and architecture say the paste is not shown.
Final review, MEDIUM: approval prompts and Dot messages in Telegram get link
previews: Telegram fetches the URL, query included, before anyone approves;
Baileys would fetch from the control plane -> fixed.
An approval prompt carries the arguments of the call (the engine keeps the
query of a navigation on purpose, architecture 8.x), so the data left through
Telegram's crawler as soon as the prompt was sent. Telegram: every
sendMessage and the editMessageText send link_preview_options.is_disabled
(one NO_LINK_PREVIEW constant). WhatsApp: textContent() is the one builder of
a text message and says linkPreview: null, which stops Baileys from fetching
the first link itself (3 s fetch from this machine); sendText and editText use
it.
Tests: FakeBotApi records a link a message would have had fetched
(linksFetched), asserted empty over a text, an approval prompt and its edit,
and non-empty for a raw call that does not say no (so the check can fail);
Baileys' own generateWAMessageContent is run with a recording getUrlInfo to
show textContent never calls it and a bare text does; BaileysConnection
(exported) is driven on a fake socket for sendText and editText.
Architecture 9.8 owns the rule (no link previews: nothing a Dot names is
fetched on its behalf); README Privacy says that no service fetches a link of
a message on its own.
Final review, MEDIUM: migrations 0008 and 0009 and a scheduler guard exist
only to repair data that unreleased builds wrote -> fixed (NO PATCHES,
"migrations are unreleased: fold, never fix-up"; nothing is released, so no
database holds that data).
- 0008_orphaned_secrets (the secrets of Dots deleted before DotsRepository.delete
removed them) and 0009_removed_config_names (stored configs that name the
five deleted permissions or a model role other than summary), with
stale-data-migrations.test.ts, are deleted. The origin of the first is
already fixed: DotsRepository.delete removes the secrets in the same
statement (repositories.test.ts keeps that test); the second is refused at
the origin by the config schema.
- 0010_computer_next_automation is 0008 in the same unreleased sequence.
A development database that already recorded the old 0008 to 0010 is not
upgradable by this change: it is started again from nothing. No such
database exists on this host (no ~/.invisible-dots), and the owner
confirmed none is needed by the review's own wording; if one exists, it is
the one thing to throw away.
- resolveApproval no longer refuses "always" for an approval whose permission
is not in PERMISSIONS (a pre-C1 row): the real client parses every event
with the permission list, so no such row can be made. The test keeps what
it was about (always on a rejection, always: false, an unknown approval)
and loses the seeded old row.
- architecture section 9.1 loses the paragraph on the two cleanup migrations
and the mentions of them.
Test floors: this removes the 7 tests of stale-data-migrations.test.ts per
adapter (and nothing else); the floors file is lowered for them in the
commit that measures the final counts.
Final review, HIGH: the chat stops showing the Dot's replies once a
conversation passes 500 messages -> fixed. GET /api/dots/:id/messages
answered the OLDEST 500 and the web had no way to the newest. It now has the
paging contract of /api/approvals and /api/dots/:id/events (limit up to 500,
order=asc|desc, before = the event id of the oldest message of the last page,
desc only), one orderParam shared by the three routes, the SDK option, and
Scheduler.conversation takes the page. useChat reads the newest page of 100
and goes back with "Show earlier messages"; withNewestPage keeps the window
gap-free (a page that does not reach back to what is held replaces it). The
CONVERSATION_LIST_LIMIT notice is deleted. Tests: API (three messages, a
limit that keeps the oldest by default, desc, a cursor, refused values),
chat-window units, component tests over 250 messages, a reply past message
500, an earlier page that fails, and a Playwright spec over 120 messages.
Final review, MEDIUM: the chat and the Tasks page read the Dot's whole event
log on open -> fixed. The chat reads its activity from the oldest message
shown on (readEventLog with after) and, going back, only the range between
(readEventRange, newest page first); with no message it reads the newest
window. The Tasks page reads one request per running task for its newest
progress line (task_id and types in the database, the 0006 index) and a
task's story only when its drawer opens, by task_id. For the story to hold
its approvals' answers, approval.resolved now carries task_id when the
approval was asked in a task (host event, optional, documented in
architecture 9), and isTaskEvent is simply "names a task". The Activity
page and the Browser view were already bounded.
Both sides of the merge had raised the floors of their own suites; the numbers
are now what the merged tree reaches, each measured on the host it is
floored for (no floor goes down):
- vitest: linux 2157 passed with its 3 PowerShell skips (was 1187 on this
branch, 1998 on lane-web), win32 2160 (was 1190 and 2001);
- postgres (the CI job's postgres 18.4 service, the same five workspaces):
687 passed, 279 of them named pg (was 675 and 633, 273 and 255);
- go: linux 110 in a golang:1.25 container, win32 64 with 2 skips, both
unchanged by the merge (lane-web had 108 for linux);
- pytest: 2778 passed, nothing skipped, in python:3.12-slim (was 2778 and 2421);
- playwright: 95 passed on linux (node:24 container, chromium installed as the
web job does) and 95 on win32.
Also run on a git archive of this commit from WSL: the engine smoke, 238 checks
passed, and the browser smoke, 75 passed, none skipped.
The web UI part of the README was the old one (paste a YAML, six tabs, an
Approvals page, channel settings only through the API). The merged product has
a new web UI, and the README now says what it does and nothing it does not:
- "Open the web UI" (sign in, and that the web client is a companion) stays in
the quick start; the new section "Using the web UI" describes the first-run
setup checklist and the key field, the Create a Dot page and its three
permission presets, the Inbox, the seven tabs of a Dot's page, watching the
computer (pictures, a view only), what Stop asks and says, and the Channels tab.
- The browser section says what the web UI does with identities (create with a
proxy field that does not show what is typed, close, delete, watch the window).
- The channel settings have a switch in the Channels tab, not only the API.
- The status says what the live view is not: it is not a remote desktop, and
nothing done there reaches the computer.
- Troubleshooting, privacy (the web UI loads nothing from other sites) and the
development section (the Playwright tests, counted against a floor like the
other suites) follow.
- No screenshot is shown: none was taken.
tests/repo/readme.test.ts compares the preset table with the presets the page
uses. The two prose gates (English, claims) are clean.
A proxy URL may carry `user:password@`, and the field showed it in clear while
it was typed (over a shoulder, on a shared screen, in a screenshot). It is now
a password input, said in its hint. The label is the field's name, so the tests
find it by label (a password input has no textbox role): the unit test and the
Playwright test of the Browser view also check that its type is password.
docs/architecture.md says it.
`maskProxy` of lib/format.ts was a second rule for the same fact (it hid the
user as well as the password, by a regular expression of its own) beside
`redactProxy` of packages/shared, which the engine's `redact_proxy` mirrors
case for case. The identity card and the approval views (the Proxy fact and
the raw arguments) now call `redactProxy` from @invisible-dots/shared/browser;
the web has no rule of its own. What a person sees changes in one way: the
user stays, as in everything else the engine shows
(`http://user:***@proxy.example:8080`).
Tests: the unit test of the deleted function goes (the rule is tested in
packages/shared and test_identity_rules.py, against the same cases); the
web's tests that pinned the old shape expect the owner's, and the Browser view
test now hands the page a proxy with its password in clear to prove that the
page replaces it whatever reached it. docs/architecture.md says it.
L13 left the web part undone: the host records why a computer is off
(`stop_reason`) and when the Dot's next automation is due
(`next_automation_at`), and no view showed either. The old Computer tab, where
the stop confirmation lived, is deleted by the new UI; the facts live where it
owns them now:
- lib/computer.ts: `automationsNote` turns the host's record into the one
sentence (paused because you stopped it; next one due at a time, with "the
computer is asleep and starts shortly before then" for a sleeping computer;
none due). `confirmText(action, taskRunning)` is the question before a power
action, null where none is asked.
- components/computer/automations-note.tsx reads `GET /computer` (the host's
record, so it is there while the computer is off) and follows computer.* and
automation.next_run events. It is the Automations card of the Computer page's
Usage view and the note above the Memory page's Automations view, which shows
it for a stopped computer too.
- Stopping the computer always asks and says that the automations do not run
while it is stopped (the L13 decision; the new UI had kept only the question
while a task runs, now folded into the same text). A reboot still asks only
while a task runs. The three browser tests and the home test that stop a
computer accept the question; the dot-shell test of the stop under a running
task expects the longer text.
Tests: web vitest +8 (the note: paused, due, asleep, none, follows the event,
not on the Notes view; the stop question for an idle computer; confirmText and
automationsNote), the Playwright test of the Computer page checks the question
and the note before and after Stop. docs/architecture.md says the same.
Merges caf63b9d: the whole new web UI with its own merges of older browser and
host work. 16 files conflicted; each is resolved keeping both sides' behavior
with one owner per fact:
- .github/test-floors.json: both sides raised the floors of their own suites;
the file takes lane-web's shape (the playwright entry) and the numbers are
set to the measured counts in the commit that ends the merge (M6 step 4).
- THIRD_PARTY_NOTICES.md: the GeoIP section of this branch and the notices of
the web client's derived files (shadcn/ui, OpenDots, AI Elements, ...) are
both kept; the nanobot web UI paragraph stays next to the nanobot license it
refers to.
- packages/shared/src/states.ts: STOP_REASONS (this branch) and
COMPUTER_STOPPED / computerIsUp (lane-web) are different facts, both kept.
- apps/scheduler/src/scheduler.ts: the ENGINE_BROWSER_ANSWERS table that
lane-web still had is the one this branch deleted when the identity error
statuses got one owner (shared, engine); deleted, nothing used it.
- apps/vm-manager/src/guest-client.ts and its test: lane-web's refusal of a
frame that is not image/jpeg (502 frame_failed) is kept; this branch only
had the doc line.
- docs/architecture.md: this branch's GET /state (pending_approval), GET /tools
(offered with managed identities) and the identity proxy validation; lane-web's
events filter text (tools, order, before), with the migration named by this
branch's clean sequence (0006_events_task.sql).
- invisible_engine_dots/nanobot/dots/server.py: this branch's version (the
shared IDENTITY_ERROR_STATUS owner; lane-web's own table is the older copy).
- invisible_engine_dots/tests/dots/test_browser_manager.py: this branch's more
robust waits for the cancelled-launch test; lane-web's until_recorded helper
is kept for the slow-launch helper.
- invisible_engine_dots/tests/dots/test_permissions.py, wire_shapes.json,
tests/fakes/engine_harness.py: this branch's (the navigation approval tests,
the managed-identities cases of the tool table, the manager made in
new_engine); lane-web's wire_shapes is a subset of it, checked as parsed JSON.
- apps/web ComputerTab.tsx, lib/timeline.ts, test/timeline.test.ts: deleted, as
lane-web deleted them. What this branch had put in them (L13: the automation
next-run line of the timeline, the stop confirmation) lives where the new UI
owns it: lib/events/view.ts describes automation.next_run (family computer,
with its test in event-view.test.ts); the stop confirmation and the Computer
views are the next commits.
- apps/web/test/format.test.ts: both sides' tests; confirmText kept.
Migrations stay the one clean sequence 0001..0010 of this branch (lane-web did
not change a migration after the point both branches share).
Checked after the merge: npm ci, typecheck (root, web, e2e), vitest 2150 passed.
Finding 2 (real, fixed). approval.requested masked every query value of the URL
of browser_navigate while the parked call ran the real one, so the person
approved an address they could not see. A query string is the usual way a
prompt-injected model sends data out, and exec and browser_type already show
the approver everything they will do. The masking also blinded the web UI and
the CLI, not only chats, and went beyond Q5 (arguments are truncated and shown).
Fixed in the engine where the approval is built: navigate_arguments now only
removes the user and password of the authority (without_userinfo), keeping the
query and the fragment; a text that is no URL is shown as it is. The target of
tool.called is unchanged: it is logged, not decided on, and keeps its query
values masked. Whoever does not want query values in a third-party chat turns
show_arguments off for the channel, as for the text of browser_type. Recorded
in docs/architecture.md section 6 as an owner decision.
Tests rewritten for the new rule (not weakened away): test_permissions now
asserts the full URL minus user and password in the arguments and the masked
target separately, the quote and space cases check the target and the
user-less address, and test_browser_tools asserts the approval carries
?token=s3cret&q=1 while the parked call keeps the full URL with its user.
Finding 1 (real, fixed). The adapter reported connected right after getMe and
deleteWebhook, and the supervisor starts its backoff over on that report, so a
poll that failed every time (a 409 from a second server on the same bot, a 429,
a network fault) restarted at the initial delay on each cycle: about two
channel.status events and three Bot API calls per second for ever, and the UI
showed connected for a bot that never polled. A 429 on a poll lost its
retry_after, because only sends honoured it.
At the origin: the first getUpdates is a short poll (timeout 0) and connected is
reported after it is answered, so the backoff grows across cycles that never got
an answer; a 429 on any guarded call becomes ChannelRateLimitedError carrying
retry_after, and the supervisor waits at least that long. @grammyjs/auto-retry
named in the design is not adopted: the hub owns retries and backoff (the
adapter header says so), and a second retry layer under it would hide the
failures it reports. FakeBotApi forgets the failures set for a token when that
bot is added again, so a persistent failure of one test does not leak into the
next.
New tests (both fail on the previous code): a persistent 409 on getUpdates keeps
a growing delay between tries (at most 20 in 1.5 s where the old code made 39),
never reports connected and writes at most 3 channel.status events; a 429 with
retry_after 1 on a poll is waited out although the backoff is a few
milliseconds. The wait for the next poll in the redelivery test of telegram.test.ts
counts from the polls made before the second run, because a run now makes one
more (short) poll before its long ones; what it checks is unchanged.
Floors raised for the two tests: vitest 1187 linux, 1190 win32; postgres 675,
pg 273.
Finding 1 (high), fixed. A linked WhatsApp number that reports `connecting`
again (every server start, every Resume, a credential restart) was shown as
not linked, and its Cancel removed the channel, its credentials and its people
without a question. The card now decides from the host's account: a record with
an account is linked whatever its connection says, and only needs_relink or a
link with no account yet goes through the scan. The chip says Connecting, not
Reconnecting: Telegram also holds its account while it first connects, so that
word would be wrong there and the shell has one chip for both. Cancel removes
the channel only when nothing is held (no account, no people: the channel this
page's own start made); a Link again on a number that holds people only pauses
it, which loses nothing and which the person resumes. The architecture sentence
"Cancel removes the channel the start made" now says exactly that.
Finding 2 (medium), fixed at the origin. Pause, Resume and Disconnect emitted
no host event, so the rail, the Channels tab, the Inbox count, the title and the
favicon kept counting a channel the person had paused or removed until a reload.
The hub now appends `channel.changed {kind, change}` (change: paused, resumed,
removed) when the person pauses, resumes or removes a channel (not when the
state is already that), added to HOST_EVENT_TYPES, HostEventDataMap, the
architecture contract and the Activity labels; the guest never sees it, so
there is no Python side. The shell and the Channels page follow the event, so a
second tab follows too.
Tests: component tests for connecting with an account (linked, no Cancel, no
watch), Pause then Resume of a linked number, Cancel after Link again keeping
the people, and the marks going on Pause and Disconnect of a needs_relink
channel (each fails without the fix); hub tests of the event; two Playwright
tests of the same against the real hub. The fake control plane now clears the
account on a new link and announces channel.changed as the host does. No test
was removed; units.test.ts and events.test.ts list the new event type.
Floors raised: vitest linux 1994 to 1998, win32 1997 to 2001, playwright 93 to 95.
Merges lane-readme, which holds one commit, the README written against lane-fixes
at a258d512. Textually it merges without a conflict: nothing else touched
README.md. It is not true of the merged tree as it stands, because lane-fixes
went on after that point (automation wake A1, the person's stop L13, the URL
shown in an approval) and this branch's browser work (L5, L7, L11) came in with
the first merge. Every statement was checked against the merged code; the ones
that changed or were missing:
- Automations. The README said they fire only while the computer is on and are
skipped, not run late, while it sleeps, and that a Dot on a schedule needs
idle_timeout 0. After A1 and L13 the control plane starts the computer for
them (90 s ahead by default), keeps it awake while one is due, runs a missed
one once and late, and leaves a computer the person stopped off until they
start it again. The intro, the note under "What a Dot can do", the fares
example and the status list say that now; the "Automations need the computer
on" limitation became "a computer you stopped by hand does not wake for its
automations".
- Privacy. A browser launch also asks three address-echo services for the exit
address (architecture section 6, L5); the README named only the library's
launch counter. The bullet is added, and says the GeoIP lookup itself is local
(the database is in the golden image).
- Everything else the README states was compared with the code and holds: the
commands, flags and exit behavior against `invisible-dots --help`, the
permission defaults against ASK_BY_DEFAULT, the tool list against the engine's
table (select, scroll, back, forward are there), the environment variables,
the web UI's tabs against the routes of the web build, the Telegram and
WhatsApp details against packages/channels, the CI description against
tests.yml, and every link into docs/architecture.md and within the page.
A test keeps that from drifting again: tests/repo/readme.test.ts (9 tests)
checks that every link into the architecture and within the page lands on a
heading, and every relative link on a file; that each row of the command table
names a command and flags the CLI's usage text has; that the environment
variable table is the host's ENV (less the one it sets for its own child);
and that the numbers the text gives (idle_timeout, max_open, max_identities,
computer sizes of the sample, the 90 s wake lead, the 16 MiB file limit, the 300
character approval arguments) are the code's defaults, with the automations
paragraph in place. It was written first and the automation test fails on the
README as lane-readme had it.
Floors raised for the added tests: vitest linux 1176 to 1185, win32 1179 to
1188 (measured: 1188 passed on Windows; 1185 passed and 3 skipped on Linux).
Nothing lowered. No test removed.
Database migrations at the end of the branch (unchanged by this merge, one
numbered sequence, unique and without a gap):
0001_initial, 0002_inbound_events, 0003_task_spend, 0004_channels,
0005_channel_prompts, 0006_events_task, 0007_dot_config_version,
0008_orphaned_secrets, 0009_removed_config_names,
0010_computer_next_automation.
The English and claims gates are clean on the new README.
Merges lane-fixes into dots-ui-browser-channels. lane-fixes already held an
older merge of this branch's browser block (9afef731), so the conflicts are the
places where this branch kept improving the browser after that point (L5, L7,
L11 and their reviews) and lane-fixes moved the MCP server's home. Every
conflict keeps both sides' behavior, with one owner per fact.
Conflicts and how each was resolved
- .github/test-floors.json: both sides raised every floor. Set to the counts
measured on the merged tree: vitest linux 1176 (3 skipped by the existing
allowance) and win32 1179, postgres linux 671 with 271 pg-named, go linux 110
and win32 64, pytest linux 2778. Nothing lowered.
- THIRD_PARTY_NOTICES.md: both sections kept (the GeoIP data of the golden
image from this branch, the opt-in WhatsApp client and libsignal from
lane-fixes); they are independent.
- apps/scheduler/src/lifecycle.ts: both options kept: prepareSleepTimeoutMs
stays the shared PREPARE_SLEEP_TIMEOUT_MS (this branch, one owner in
packages/shared) next to lane-fixes' automationWakeLeadMs.
- apps/scheduler/src/scheduler.ts: the imports are the union. lane-fixes'
ENGINE_BROWSER_ANSWERS table is dropped: the identity error statuses have one
owner, IDENTITY_ERROR_STATUS / isIdentityAnswer in packages/shared (this
branch, 39ac3052), which the pass-through already used. lane-fixes' homePath
(the files routes) is kept.
- apps/scheduler/src/testing.ts: imports are the union (the shared status table
for the fake guest's identity faults, and the file routes' constants).
- apps/scheduler/test/scheduler.test.ts: one import line with both sides' names.
- packages/shared/src/protocol.ts: GUEST_PATHS keeps both the GeoIP database
path (this branch) and mcpHomes (lane-fixes).
- invisible_engine_dots/nanobot/dots/browser.py: imports are the union
(GEOIP_DATABASE and MCP_HOMES_DIR).
- invisible_engine_dots/nanobot/dots/server.py: imports are the union of
lane-fixes' automations (CronService, automation_json) and this branch's
BrowserIdentity / BrowserIdentityError; the old ErrorCode import went with the
status table that lane-fixes' copy still carried (this branch's
IDENTITY_ERROR_STATUS answers from the shared mirror).
- invisible_engine_dots/tests/dots/test_browser_manager.py: imports are the
union (mcp_home and proxy_forms; BROWSERS_DIR, GEOIP_DATABASE, MCP_HOMES_DIR).
- guest/image-builder/test/smoke/browser/proxy.py: this branch's version, whose
credentials come by the environment and not by the command line.
- guest/image-builder/test/smoke/browser/smoke.sh: this branch's checks (GeoIP
file untouched, Firefox killed under a live server, proxy without a port
refused, launch behind the proxy, no password in the command line) combined
with lane-fixes' (the servers' homes under /var/lib/invisible-dots/mcp, the
session file outside /home/dot, refused by the TCP port, no MCP home in the
identity's directory, the delete removes the home). The "known finding" that
the session file under /home/dot holds the password is gone: the file is no
longer under /home/dot, and the check now is that no file there holds it. The
event counts are this branch's (six launches, four closes) plus lane-fixes'
one browser.identity.deleted.
- guest/image-builder/test/smoke/smoke.sh: the lossy identity's control file is
written in the server's home (MCP_HOMES), with this branch's comment.
- guest/image-builder/test/smoke/README.md, docs/architecture.md: the text says
what the merged code does: the MCP session file is at
/var/lib/invisible-dots/mcp/<identity_id>/sessions/<id>.json, outside
/home/dot (the paragraph on the proxy's copies and the reopen paragraph both
said <identity>/mcp), and that the server keeps the whole proxy is recorded as
the library's defect that the smoke watches.
Database migrations of the whole branch after this merge (one numbered
sequence, unique and without a gap; no number was taken by both sides, and
loadMigrations refuses a repeated one):
0001_initial, 0002_inbound_events, 0003_task_spend, 0004_channels,
0005_channel_prompts, 0006_events_task, 0007_dot_config_version,
0008_orphaned_secrets, 0009_removed_config_names,
0010_computer_next_automation.
Verified on the merge: typecheck; vitest 1179 passed on Windows, 1176 passed and
3 skipped on Linux; postgres job 671 passed (271 pg-named) on PostgreSQL
18.4; go 64 passed (Windows), 110 passed (Linux); engine pytest 2778 passed;
web build; bundled CLI and doctor; the English and claims gates; engine smoke
238 passed, 0 failed, 0 skipped; browser smoke 75 passed, 0 failed, 0 skipped.
No test removed.
The Channels tab of a Dot (S12), on the host's channel routes (H4 to H6), with
the channels' share of the attention model.
- /dots/<id>/channels: Telegram (token form that is write-only and emptied at
once, bot link, pairing with a deep link, QR code, words to type and a
countdown, people paired with Revoke, the three settings as switches, Pause,
Disconnect after asking, a refused token asks for a new one and keeps the
people), and WhatsApp when the server offers it (risk statement first, then
the host's QR frames followed from /whatsapp/qr, linked / failed / Link
again / Cancel, a link already going on is followed on open). Live on
channel.status and channel.peer.paired.
- qr-connect.tsx derives from nanobot's ChannelQrConnectFlow (header and the
nanobot notice name it); the state machine is a pure reducer in
lib/channel-link.ts over ChannelLinkFrame, and the code is drawn as an SVG
from the qrcode modules (qrcode 1.5.4 and its types, pinned like the CLI).
- Channel attention: DotAttention.relinks, counted by needsYouCount, so the
rail marker, the Dot's Channels tab marker, the Inbox card ("Channels to
link again", with an alert when a Dot's channels cannot be read), the title
and the favicon all read the one model. A paused channel is not counted.
- The origin chips of S5 and S11 were already in; the e2e now shows them with
messages that arrive through the real adapters.
- The three copies of the chip's dot colors move to TONE_DOT in dot/tone.ts.
- e2e harness runs the Telegram and WhatsApp adapters against FakeBotApi and
FakeWhatsAppConnector; apps/web depends on @invisible-dots/channels for it.
- docs/architecture.md describes the page and the attention rule.
No gap is left for later steps: everything the page shows is on the SDK today.
Tests changed: attention.test.ts expects the new relinks field and a count of
four things, dot-shell.test.tsx expects the Channels tab; nothing removed.
Floors: vitest linux 1935 -> 1994, win32 1938 -> 1997 (+59); playwright
85 -> 93 on both hosts (+8).
Finding 1 (medium), fixed: since L13 recovery called stop(dotId, "idle"), which
re-runs the idle check. After a control plane crash the computer row is set to
RUNNING and the Dot row is still READY, and an automation that came due during
the downtime makes keepsAwake true, so the stop was called off. Nothing then
made the Dot ready (the in-memory ready set is empty), pumped its events or put
it to sleep, and the guest could be left suspended after prepare-sleep.
stop() is split at the origin: stop() takes the per-Dot lock and calls
#stopLocked(dotId, reason, recheckIdle) with true; recovery takes the lock and
passes false, so the stop it found is finished for the reason it was asked for.
The computer ends STOPPED with stop_reason idle and the next pass wakes it for
the due automation or task through the normal path. Architecture 9.5 says so.
New test: an interrupted idle STOPPING with an automation due and one with a
pending task both end stopped once, started again, READY and pumped; it failed
before the fix (the stop was called off). Floors raised by one for the added
test: vitest linux 1144, win32 1147, postgres 669. No test removed or weakened.
The Activity page (S11) replaces the Timeline tab, and the old stylesheet goes with the last screen that used it.
Activity: the whole event log of the Dot as readable lines. lib/events/view.ts describes every type the log can hold against the data the contract gives it (a Record over the contract's own types, so a type or field added there does not compile until it is described; a test fails for a type with no family), replacing describeEvent's hand parsing of unknown data. Each row has a family, a tone, a title, one line of detail (cut at 280 characters; the whole event is under "Data"), and "via Telegram" for a message that came through a channel. A tool.called line names the tool in the words of the engine's table, what it acted on (target), how it ended (ok, failed, denied, interrupted) and the policy decision; agent.started says "The engine started" with "The key was sent again" instead of showing empty data; user.message, the approval "always" answer and the task priority are now said too.
Filter chips by family (chat, tasks, tools, approvals, browser, computer with the agent, memory, channels, the Dot's own config) become the types of the request, so a family that is not chosen is never read, and a live event is kept only if it is of a chosen type. Search is over the lines read so far and says so; a newest-first switch; export of the events on screen as JSON Lines named for the Dot and the id range. The page reads the newest 200 first and "Load older events" goes on from the oldest one held, with no gap and no repeat, and says where the log starts. The old tab read the log from its OLDEST end and only reversed the first 200, so a long log never showed its newest events; that was the defect behind "paging by 200".
Origin fix for that: GET /api/dots/:id/events takes `before` (an event id, order=desc only, 400 otherwise), through the database list, Scheduler.listEvents, the SDK's events() and the architecture's route table, the same shape as the approvals list's `before`. readRecentEvents of lib/event-log.ts takes it too, so there is one function that reads the newest page of the log.
Moved to their owners: Tone to lib/tone.ts and mergeEvents to lib/event-log.ts (both were in the file that goes), and the browser download dance to lib/save-file.ts, which the Files view's download and the export both use. The tab order is now Chat, Tasks, Computer, Memory, Activity, Settings; /dots/<id>/timeline redirects to /activity.
The last of the old stylesheet: legacy.css and its layer in globals.css are deleted, TimelineTab.tsx and lib/timeline.ts too. ErrorBox (styled only by the old sheet, so the chat, the header and the computer panel showed it bare) is deleted and those three use ErrorAlert, the design's own.
No fake data and no gaps: everything shown is read from the log. Channel origin chips on Activity use the origin the log already holds; nothing waits on W12.
Docs: architecture.md describes the Activity page, `before`, and that there is no other stylesheet.
Tests: unit tests of the view models (15: the old cases plus tool.called with its target and decision, interrupted, agent.started, the channel origin, the approval answered for good, and the families, which read the contract's list of types), of the search, types and export (7), of readRecentEvents with `before` and mergeEvents; twelve component tests of the page (empty log, newest page first with the words of each line, paging with no gap or repeat, oldest first with the button above, families asked at the host and live events filtered, an answer to a choice changed in flight dropped, search and its count, search that needs older pages, a live event once, a failed read and Try again, the export whole and after a search); six Playwright tests against the real control plane (lines, family filter at the host, live, redirect of /timeline, paging 430 events, JSON Lines export, keyboard, 390 px, contrast in light and dark); `before` in the database (including the 400 of order asc), API (route, 400s), SDK and Scheduler paths.
Existing tests changed, none weakened: test/timeline.test.ts moved to test/event-view.test.ts with every case kept (its tool.called expectations carry the new words: the tool's label as title, target, outcome and decision on the line; its mergeEvents case moved to test/event-log.test.ts); the tab list of test/dot-shell.test.tsx has Activity in place of Timeline; the control plane fake of the web tests answers `before`.
Tests removed because their feature no longer exists: e2e/tasks.spec.ts "a Dot's tab that is still in the old design keeps the old stylesheet" (there is no old stylesheet or screen), and the six `.legacy` count-is-zero assertions in e2e/chat, computer, dot-settings, memory and tasks specs (the `.legacy` scope no longer exists to be kept off a page).
Floors raised: vitest linux 1909 to 1935, win32 1912 to 1938 (measured 1938 on win32; linux skips the same three PowerShell tests as before); playwright 80 to 85 on both (six added, one removed). Nothing lowered.
Review findings of the automation wake (A1), one by one:
1. Poison automation.next_run with a time past what a Date holds -> already fixed
in 83eb9d12 (the engine refuses such a next run where it is made, shared
bounds next_run_at_ms with MAX_RUN_AT_MS, a parity test pins both sides);
confirmed against the tree, nothing left to change.
2. Two definitions of "has work" (#exited used tasks.hasWork) -> fixed: the
restart after an unexpected exit reads Lifecycle.keepsAwake, as the idle
check and the idle stop under the lock do. Test: a VM that exits while a run
is due within the lead is started again by the exit itself (no pass runs in
the test); it failed before.
3. The host test did not prove "once" and the fake guest never made a missed run
-> fixed: FakeGuest has a clock and, at a boot, does what the engine does
(runs a past due job once, late, moves its time on, reports the earliest next
run when it changed); the misleading "nothing at a boot" comment is corrected.
The test now drives the whole loop: wake for the missed run, the guest runs
it and reports the next time, the stored time moves forward, keepsAwake is
false, the idle check puts the Dot to sleep, and further passes start nothing.
The tests that used a user stop to "put a Dot to sleep" now sleep it through
the idle check, so they keep proving the wake and not the new stop rule.
4. A Dot asleep when migration 0010 is applied is never woken for automations
it has -> rejected as a code change, documented: the column can only come from
a guest that ran; telling "never reported" from "none due" would need a second
column and a boot of every sleeping Dot at every upgrade. architecture 9.5
and the migration comment say it: such a Dot reports at its next start (a
message, a task, the person) and is woken for automations from then on.
5. A person's explicit stop undone within one pass -> fixed (decision: the
person's stop wins). computers.stop_reason (idle | user | exited, migration
0010 changed in place, CHECK constraint) is recorded with STOPPING/STOPPED
and cleared by any other state; stoppedWithAutomationBy leaves out
stop_reason = user. A message or a task still starts the Dot (as before) and
from then on it sleeps and wakes like any other. The person's stop of an
already sleeping computer is recorded too, and a stop interrupted by a
control plane restart is finished for the reason it was asked for (it used to
become a user stop). computer.stopped events and ComputerRecord carry the
reason; `invisible-dots status` shows "paused: the computer was stopped by you
(start it to resume)" instead of the next time, `computer <dot> stop` says
automations are paused while it is stopped, and the web stop confirmation says
the same (confirmText in lib/computer.ts).
6. The web Computer tab does not show next_automation_at -> not done here, as
decided: the web lane shows it after the final merge.
Tests added: database 2 (stop_reason kept/cleared, the user filter), scheduler 5
(the person's stop and restart, stop of a sleeping computer, exit restart by
keepsAwake, exit with nothing due, interrupted stop recovery), cli 1, web 1;
the missed-run test replaced by the whole-loop one and the recovery test also
asserts "exited". No test removed or weakened. Floors raised: vitest linux
1134 -> 1143, win32 1137 -> 1146, postgres 654 -> 668 (pg-named 263 -> 270).
Suites: vitest 1146 passed (also on PostgreSQL 18: 669 tests of the postgres
job), typecheck, engine pytest 2479 passed, go ok.
SetupChecklist latched whether the key field is needed in an effect, after the
render that first showed the checklist. A test (or a person with a fast hand)
that found the checklist region could look for the key field in the one commit
before it existed, which made home.test.tsx fail now and then in a full run
("Unable to find a label with the text of: OpenRouter API key"). The latch is
now set during the render that first sees something missing, so the region and
the field are always committed together. No test changed.
A Dot's settings page (S14), on the host routes U3 (tools) and the config PATCH with expected_config_version; the YAML textarea of SettingsTab is replaced.
One draft of the whole DotConfig, edited as a form (General, Model, Permissions and tools, Computer, Browser, Memory, Limits) or as the same YAML, never a second model of the config. lib/config-fields.ts is the one table of what can change (where each field lives, its words, when a change reaches the Dot) and gives the review's list of changes, the notice a save ends with, and the rebase; lib/config-draft.ts holds the draft and the version it began from.
Permission editor: one row per permission of PERMISSIONS with its words and risk, an allow / ask / deny control, the default said, and the tools of the Dot's own table (GET /tools, offered or not, as the Dot has its config now). A permission set to its default is saved as no entry, so presets and rows agree. The preset picker is the create page's. A stopped computer has no table: the page says to start it and the rows still work.
Save: a review lists each changed field from what it is to what it will be, and nothing is sent before it is confirmed. The PATCH carries the config_version the edit began from, so a config changed meanwhile is refused (409 dot_changed) and never undone; when the host's config moves on under edits that are under way (another tab, an Always allow), the edits are kept on top of the new config and the page says so. The notice says when the Dot has the change: its next turn, when its computer starts, and for processors, memory and disk the next start of the computer. The disk slider starts at the disk's size (a disk never shrinks). The cross-field rule of the browser limits and every schema problem show on their control; the host's refusal stays in the review. The summary model is the one role (E5); the cost cap says the last request may go over (E3). Danger zone: delete after typing the Dot's name (ConfirmDialog gained confirmDisabled).
Origin fixes: the ranges of the step, context-token, identity and open-browser numbers moved into CONFIG_BOUNDS in packages/shared (the schema reads them from there, as it already did for the sizes and the cost cap), so a control can never offer what the API refuses; ConfigYamlEditor is the one YAML editor of the create page and the settings (it was private to the create page); the memory switch's explanation (MEMORY_EFFECT) is the one text of what memory off means; gibOf and gibSize are the one conversion between the config's sizes and the sliders' GiB. SettingsTab.tsx is deleted, and the legacy rules only it used (.card, .hint, .danger-zone, the legacy input and textarea rules, button.danger, .text-ok, .text-error) are deleted from legacy.css.
No fake data and no gaps: everything shown is read from the config or from GET /tools.
Docs: architecture.md describes the settings page and the extended CONFIG_BOUNDS list.
Tests: unit tests of the field table, setPermission, rebase and the save notice, the draft, and the permission rows (26); component tests of the page (33: every section from the config, allow / ask / deny writing the right patch conditional on the version, presets, tools and their offered state, a stopped computer, the review, a refused save, the summary role, the browser rule, the disk floor, the YAML view both ways, a config changed under the edit by event and by a refused save, delete by typed name); eleven Playwright tests against the real control plane and FakeGuest (allow / ask / deny reaching the host and the engine with the tools offered following, presets, the other settings, the browser rule and the host's disk refusal, YAML, a config changed in another tab, a stopped computer, delete, keyboard and 390 px, contrast in light and dark); one shared test for the new bounds.
Existing tests changed, none weakened or removed: e2e/tasks.spec.ts "a Dot's tab that is still in the old design keeps the old stylesheet" now opens the Timeline tab, the one that is still old, instead of Settings, which has moved; the web test fake gained DELETE /api/dots/:id.
Floors raised: vitest linux 1842 to 1909, win32 1845 to 1912 (the 60 tests added here, and 7 more that earlier merges added without raising it; the measured count); playwright 69 to 80 on both. Nothing lowered.
Finding 1 (medium, real, fixed): the cron tool took any every_seconds (minimum 1, no maximum),
_validate_schedule_for_add only checked every_ms > 0 and _compute_next_run returned now + every_ms, so an
interval of about 8.7e12 seconds made an automation.next_run that zod accepted (any safe integer) but that
Date and the database cannot hold: the scheduler's setNextAutomation threw inside the transaction that also
advances the event cursor, the pump reconnected from the same cursor and hit the same event forever, and the
web timeline threw a RangeError on it.
Fixed at the origin and with one bound both sides share:
- engine: MAX_RUN_AT_MS (9999-12-31T23:59:59.999Z, the last moment a datetime holds) in nanobot/cron/types.py.
_compute_next_run gives no next run past it (also for a job already in a store), the schedule validation
refuses an every_ms or at_ms past it for add and update, and the cron tool answers the model with an error
it can read instead of raising.
- shared: MAX_RUN_AT_MS in protocol.ts bounds next_run_at_ms of the automation.next_run event and of the
automation row (.max()), so a value past it is refused by the contract and never reaches the database.
- parity: wire_shapes.json carries limits.max_run_at_ms, written by the engine's wire-shapes test, and the
host's engine-shapes test checks it equals the shared constant and the schema's edge; a separate engine
test pins the constant to datetime.max.
Tests added (engine 11, host 2): an interval, a one-time time and an update past the bound are refused and
leave no job; a stored job past it has no next run; the last moment itself is still a run; the tool returns
the error text; the shared schema accepts the bound and rejects one past it (8.7e15, MAX_SAFE_INTEGER too).
No test removed. Floors raised: pytest 2468 -> 2479, vitest linux 1132 -> 1134, win32 1135 -> 1137.
The previous commit makes the engine refuse a golden image without the GeoIP
database. The engine suite of the smoke builds its golden image by hand and never
installed that file (its browser is a stand-in), so the engine refused to start and
the suite hung waiting for it. prepare-engine.sh now installs an empty file at
GUEST_PATHS.geoipDatabase, root's and read-only, for the engine suite; the browser
suite keeps installing the real database through build-browser-env.sh. A test pins
the path to GUEST_PATHS.
Floors: vitest linux 770 to 771 and win32 773 to 774 (1 test added).
The Memory tab (S10), on the host routes U2 (file list and read) and U3 (automations).
Notes: the files the Dot wrote under /home/dot/memory, read only (the Dot owns them). There is no notes route, so the list walks the folder with GET /files/list, at most 40 folders and 4 deep, and says when it stopped short. Newest written first, search by name, the open note in the address (?note=) and looked up in the list, never read by the path in the address. A .md note is shown as Markdown by the renderer the chat uses (FilePreview gained a markdown flag; one reader for files and notes). A note written while the page is open (memory.written) is tinted and shown as a chip that leads to it, added or updated by what the list held. The chat's Remembered chip now leads to the note.
Memory switch: memory.enabled is saved with the whole config and expected_config_version, so a config changed elsewhere is refused (409 dot_changed), said and read again, never undone; it says what off means for the Dot.
Automations: the Dot's cron jobs as schedule cards: schedule in words (common cron shapes, any other shown as the expression, always with the zone it is read in), next run, last run and its error, what the Dot is told, a switch that pauses or resumes, delete after a question. The person does not create one: the empty list says how one comes to be by what the config does with the automations permission. The engine reports only the last run of a job, not a history, so the card shows that one and nothing is invented.
Code: schedule-card and memory-chips derive from assistant-ui (copy #4; notice section extended, headers say what changed: no forget button, one last run, links), ui/switch from shadcn (off track is muted-foreground so the switch keeps three to one against its surface), ViewTabs is the one segmented view bar of the Computer and Memory pages (ComputerView uses it now). Tests: unit tests of the schedule words, the notes walk and the address; component tests of both views, the switch and the stale-config refusal; ten Playwright tests against the real control plane and FakeGuest (notes, live chip, chat chip, switch saved and pushed with the memory tools no longer offered, stale config, automations pause/resume/delete/appear live, permission-dependent empty text, stopped computer, 390 px, light and dark contrast).
Existing tests changed, none weakened or removed: dot-shell's tab list now has the Memory tab; the web test fake's default Dot config carries permissions and memory like every real record (the API parses configs with the schema defaults); chat gained a test for the chip's link.
Floors raised for the 68 vitest tests and 10 Playwright tests added: vitest linux 1774 to 1842, win32 1777 to 1845; playwright 59 to 69 on both. Nothing lowered.
Automations (cron jobs) lived only in the guest. The host's idle check did not
know them, so a Dot powered off after idle_timeout and a job never fired while
it was off; and on start CronService._recompute_next_runs counted every next
run from now, so a run that came due meanwhile was dropped, a one-time job
(whose time was then past, so it had no next run at all) never ran.
Engine (the origin of the fact):
- cron/service.py: a next run already stored is kept, past or not; only an
enabled job with none gets one from now. The first tick finds a missed job
due and runs it once, and _execute_job counts the next run from that moment:
a one-time job runs late and is over, a recurring one runs once for all the
occurrences it missed (never a backlog). nanobot's tick/execute path already
did that; the start-up recompute was the only thing discarding it.
- A firing is recorded under cron:<job>:<due time> before the service saves
that the job ran (already so), and the engine ignores an id it holds, so a
kill -9 between the two finds the job due again and runs it once.
- CronService(on_next_wake=...) is told the earliest next run of the enabled
jobs after every arm of its timer (every change and every tick). The engine
reports it as the new outbound event automation.next_run {next_run_at_ms |
null}, written only when it differs from what the host was last told (kept in
dots_kv in the same transaction, so a restart does not repeat it).
- main.py: the cron timer now stops before the engine, so no firing falls on a
stopped engine (recorded nowhere while the job moved on as if it had run).
Contract (packages/shared first): automation.next_run in OUTBOUND_EVENT_TYPES,
its schema and data type; nanobot/dots/protocol.py carries the same name
(vendored-nanobot parity test) and tests/dots/wire_shapes.json pins the data the
real engine store writes, which engine-shapes.test.ts parses with the host
schema and holds the fake guest to.
Host: migration 0010_computer_next_automation adds computers.next_automation_at
(also in ComputerRecord, `invisible-dots status` shows it); applyGuestEvent
stores the report. Lifecycle owns automationWakeLeadMs (90 s) and
keepsAwake(dot): tasks.hasWork or an automation due within the lead (past ones
included), used by the idle check and again under the Dot's lock; the
scheduler pass starts every STOPPED computer whose Dot is not ERROR, DISABLED
or CREATING and whose next automation is due within the lead. The web
timeline shows the new event instead of raw JSON.
Docs: architecture 5.4 (the event), 8.8 (missed runs and how a kill -9 cannot
repeat one), 9.1 (the column), 9.5 (wake and no sleep), 10 (recurring jobs were
wrongly out of scope); engine UPSTREAM.md records the cron change; smoke
README. README.md is not touched.
Tests (written first where practical; the missed-run and kill -9 tests fail on
the old recompute):
- engine: test_cron_missed_runs.py (one-time and recurring missed once, no
backlog, stored time kept, report after every change, failing listener),
test_automation_catch_up.py + automation_victim.py (a subprocess is SIGKILLed
right after the engine recorded a firing; the restart runs it once and the
job it never reached is not lost), TestTheNextRunReport (dedupe, null,
restart, stopped), test_main (route to event, cron stops before the engine),
test_protocol, test_wire_shapes.
- host: scheduler (reports stored and cleared, no sleep within the lead and
sleep outside it, a due run keeps it up, a stopped Dot started shortly
before and not earlier, a missed run starts it once, ERROR Dots and Dots with
nothing due left alone, an idle sleep called off under the lock), database
(column, stoppedWithAutomationBy), shared events, engine-shapes, web
timeline, CLI status.
- smoke: a one-time job whose time passed is written into the stopped
engine's cron store; at the next start the host is told its due time, the job
runs once and the host is told nothing is due; after a kill -9 and another
start it is not run again; the host's route lists and removes it. The
count of agent.started in the stream goes from eight to ten (two more
starts), the other checks are unchanged.
Removed tests: none. One expectation of kept behavior is extended, not
weakened: the smoke's count of agent.started (8 -> 10) for the two starts the
new section makes.
Floors (.github/test-floors.json), raised: vitest linux 1120 -> 1132, win32
1123 -> 1135; postgres linux 635 -> 654 and its pg-named tests 254 -> 263;
pytest 2442 -> 2468. Nothing lowered.
Suites: engine 2468 passed; vitest 1135 passed (1397 on both adapters against
PostgreSQL 18, 654 in the postgres job's files); typecheck, web build and go
test green; smoke 237 passed, 0 failed, 0 skipped.
"tasks: a Dot's list is the newest TASK_LIST_LIMIT" and "approvals: a list is
the oldest APPROVAL_LIST_LIMIT" insert 201 and 501 rows in a row and expect the
last or first one to be cut. Two inserts can get the same created_at, and the
order is then the ids', which are random, so each failed now and then under
load (seen twice in full runs). Both now set the creation times from the
insertion order first (createdInOrder); what they assert is unchanged.
Finding 1 (Inbox History stops showing new answers after 500 approvals): real,
fixed at the origin. GET /api/approvals listed the OLDEST 500 of every status,
so pending ones used places and no answer after the 500th ever appeared.
ApprovalsRepository.list now takes one status or several, `order: "desc"`
(newest first by the time of the last change, COALESCE(resolved_at,
created_at), id as the tie-break) and `before`, the id of the last row of the
previous page (a row-value comparison against that row, so no opaque token);
the route takes status=<a,b>, limit (1 to APPROVAL_LIST_LIMIT), order and
before (400 for a bad value, for before without order=desc, for a repeated
parameter); scheduler.listApprovals and the SDK pass them on. History asks for
ANSWERED_APPROVAL_STATUSES (one owner in packages/shared) with order=desc and
limit=50, and "Show older answers" asks for the next page with before=<last
id>; a live refresh reads the newest page again and keeps the older rows it
reaches, and drops them when more was answered in between than a page holds
(lib/inbox.ts newestHistoryPage/olderHistoryPage, components/inbox/use-history.ts).
The "first 500" notice and historyOrder (the browser-side filter and sort, now
the route's job) are deleted. A filter that hides every row of the newest
pages says so while older rows remain. The oldest-first default of the route
is unchanged for the CLI and the channel runner.
Finding 2 (Browser view reads every tool.called the Dot ever logged): real,
fixed at the origin. GET /api/dots/:id/events takes order=desc (a limit keeps
the newest of what the filters keep) and tools=<a,b>, which narrows the
tool.called events to those tools in the database and leaves other types alone
(EventQuery.tools/order, scheduler.listEvents, SDK events). The view now makes
one request, readRecentEvents: the newest BROWSER_ACTIVITY_WINDOW (500) events
of the browser tools' calls and browser.identity.launched|closed, with the tool
names derived from the one tool table (BROWSER_ACTIVITY_TOOLS), and the merged
list in memory is cut to the same window. Stated limit (architecture.md and the
constant): a very long run of calls to one browser can push another browser's
last navigation out of the window, and that browser then shows no page.
Tests (each fails without the fix): repositories on both adapters (newest
first, several statuses, cursor, unknown cursor, before without desc, the
newest answer past more than APPROVAL_LIST_LIMIT pending ones; events desc,
tools filter, limit counts what is kept); the API over HTTP (same, plus the
400s); web: History pages newest first with the cursors the page sent, keeps
older rows on a live refresh, says when the filters hide the newest; the
Browser view sends one request with types, tools, order=desc and the window
against a log of 2500 other calls; BROWSER_ACTIVITY_TOOLS equals the browser
tool names and the merge is capped; readRecentEvents. Verified on PostgreSQL
18.4 as well as PGlite (633 passed, 255 on pg), the web build and the 59
Playwright tests on the real control plane.
Tests removed because the feature no longer exists: inbox-model "puts the
answered approvals last answered first, and leaves the waiting ones out of the
history" (historyOrder is gone; the route's order is covered by the repository
and API tests) and inbox "says that only the first approvals are listed when
the control plane's list is as long as it can be" (the notice is gone; replaced
by the tests above). Floors raised for the 13 tests added: vitest linux 1761 to
1774, win32 1764 to 1777, postgres 625 to 633 with pg 251 to 255; none lowered.
Not changed: the chat's "first 500 messages" notice (CONVERSATION_LIST_LIMIT)
is the same kind of gap but is not part of this finding.
High, confirmed: a Dot on a golden image built before L11 that starts on a new
runtime disk got STEALTHFOX_GEOIP_MMDB pointing at a file only the new builder
installs. invisible_core raises on a missing override instead of falling back to
its cache, so launches behind a proxy failed and the others took the VM's own
timezone. The engine's code ships on the runtime disk while each Dot keeps its
golden image, and the lock comparison did not cover this file. Fixed where the two
halves are tied: main() now also refuses to start, beside the lock check, when a
runtime disk (the one that carries the lock; a development checkout is not checked)
runs on an image without GEOIP_DATABASE, with 'build a new golden image'.
GoldenLockError is renamed GoldenImageError because it now covers a missing file
as well as another lock. Tests: the check alone (file present, missing, a
directory in its place, development checkout) and main() refusing before it opens
the state.
Medium, confirmed: the browser-lost pattern searched its phrase anywhere in an
error, and a failed click or select echoes page-controlled text (the covering
element's text, the option asked for), so a page could close the identity and skip
browser_close. The pattern is now the library's two main-browser sentences as the
whole error, behind the 'Error executing tool <name>: ' prefix FastMCP puts on a
raise, matched with fullmatch. The fake server now speaks with that prefix like the
real one and has overlay_says_gone for a click whose diagnosis carries the
sentence. Tests: that click leaves the identity open and usable; a table of whole
sentences (with and without the prefix) and embedded phrases, the support browser
and a trailing text. Both new behaviours were run against the old code first and
failed.
Floor: pytest min_passed 2692 to 2707 (15 tests added, none removed or weakened).
Docs: architecture sections 3.3 and the browser-lost paragraph.
Finding 1 (medium), fixed: navigate_arguments and browser_navigate_target sent the URL through
_shown_word, the masking rule of command words, which replaces a word with *** when it holds a
quote or whitespace. The schema only checks the http(s) prefix, so a model could add one quote
and the person approving saw url "***". The URL now has its own owner in targets.py,
shown_url (no user or password in the authority, values of the query masked, path and host
kept), used by the navigation approval, its target and the URL branch of _shown_word. A text
that is no URL is masked whole. New test
test_a_quote_or_a_space_in_the_url_of_a_navigation_never_hides_where_the_page_is fails before
the fix (got ***) and passes after. Pytest floor 2441 to 2442.
Findings of .local/next/webb-review.json, one by one.
Last step of a finished turn (low): fixed. lastStepSinceUser stops at the Dot's
answer as well as at the person's message, so a Dot that works again after
answering (a task, a schedule, a resumed approval) does not show a step of the
turn that is over. Test: chat-thread "does not name a step of a turn the Dot
already answered".
computerIsUp disagreed with the host (low): fixed. computerIsUp moved to
packages/shared/states.ts and says RUNNING only, as the scheduler's
#runningGuest does; the scheduler (guest routes, reboot, lifecycle.guest and
reboot) and the web (panel, Computer page, usage tab, attention ring) all call
that one function, and COMPUTER_STOPPED is the one name of the 409 code. The
reboot button follows it too (an IDLE computer cannot be rebooted). Tests: the
shared state test, the panel asking nothing of an IDLE computer, the ring and
power actions for IDLE.
Facts duplicated in the web layer (low): fixed. IDENTITY_EVENT_TYPES is exported
by packages/shared/events.ts and OUTBOUND_EVENT_TYPES is built from it; the
panel and the Browser tab import it (the IdentitiesTab copy named by the review
no longer exists). ApprovalOutcome is declared once, in lib/task-events.ts, and
chat-thread imports it. The frame error codes come from shared FRAME_ERROR_CODES
(not_open, busy) and COMPUTER_STOPPED. On the next merge of the browser branch,
FRAME_ERROR_CODES should be reconciled with its IDENTITY_ERROR_STATUS (39ac3052),
which will name the same two codes.
Lane misses 39ac3052 and 2e32efa2, scheduler duplicates the engine's status map
(low): rejected here, as the finding itself says. The next merge of the browser
branch brings both in and removes ENGINE_BROWSER_ANSWERS; a copy of that fix in
the lane would only conflict with it.
Frame route always says image/jpeg (low): fixed at the host's boundary. The
contract of the route is a JPEG (architecture section 5.3, and invisible-
playwright-mcp's browser_watch emits one), and every layer after the guest client
labels the bytes that way, so the guest client now refuses any other media type
as a 502 frame_failed instead of letting it be served mislabelled. Carrying a
media type through the scheduler, the API, the SDK and the web was rejected: it
would add a field every caller must handle for an answer the contract excludes.
Test: guest-client "refuses a frame that is not a JPEG".
useFrame did not serialize the manual Refresh (low): fixed. One read is in
flight at a time; a refresh asked for meanwhile waits for it and starts none, so
an older answer cannot replace a newer one and the identity's call lock is not
asked twice. Tests: use-frame.test.tsx (two, the first failed before).
A failed send restores the old text over a newer draft (low): fixed. The refused
message goes back in front of what was typed meanwhile. Test: chat "puts a
refused message back in front of what the person typed while it was on its way".
screen-view header mentions a caption that does not exist (low): fixed in the
header (the alt text names the subject; no figcaption is added).
Forced-colors shimmer (unproven point): confirmed as a hazard and fixed. Under
forced colors the shimmer keeps a transparent text fill; it now draws the label
in the system text color with no gradient and no animation. Chromium's forced-
colors emulation showed the label visible with and without the rule (the engine
overrides the fill there), so the rule makes it independent of the engine rather
than fixing a reproduced failure. Test: tokens.test.ts reads the rule.
Removed or changed tests: computer-panel "which computer states have a picture"
moved to packages/shared/test/states.test.ts (the function moved, and it no
longer accepts IDLE); attention "ring ready for an IDLE computer" now expects
"stopped" and format "allowedActions" gains an IDLE case, both because IDLE is
not a state in which the guest answers.
Floors raised for the added tests: vitest linux 1754 to 1761, win32 1757 to 1764.
The owner's rule inside this repository: reuse what the libraries do, never
re-implement it. This applies the verdicts of .local/next/reuse-actions.json that
live here, and the low findings of the third browser review that the GeoIP change
does not settle. Nothing outside this repository is touched.
reuse verdicts
- DELETE_OURS, silent reopen and repeat of a call whose browser died: done.
BrowserManager.call_tool no longer runs browser_open again and repeats the call
(the library removed that on purpose: a repeated click lands on a blank page and
the model is never told). The server's GONE meaning goes to the model in the
Dot's words (the model cannot call browser_open): the call fails with `crashed`,
"the browser of identity X is gone: it closed or crashed during <tool>. The
identity is closed and keeps its profile: call browser_identity_launch to open
it again as the same person, then navigate again, because it comes back on a
blank page". The identity is closed and its server stopped (one `closed` event,
no slot held), so browser.identity.launch alone still decides whether a browser
starts. A frame that finds the browser gone closes the identity the same way
(before, it answered not_open and left the identity "open"). One owner for ending
a session whose process or browser is gone: _end_session takes the reason.
- DELETE_OURS, browser_select_option said "the value, not its label": done. The
tool says "by its visible label or by its value", and the fixture
tests/fixtures/mcp-tools-0.70.2.json now carries each tool's description as the
server serves it (captured from the real pinned server over stdio, schemas
unchanged), so a test ties our wording to the library's.
- USE_MISSING, max_chars of browser_read_text: done (integer or null, minimum 1,
passed through; our text states no number, the server owns its default).
- USE_MISSING, GeoIP through the library's own knob: done. build-browser-env.sh
installs the hash-checked file at /usr/local/share/invisible-dots/geoip-aio-all.mmdb
(root's, 0644, GUEST_PATHS.geoipDatabase / GEOIP_DATABASE), and the relay env gets
STEALTHFOX_GEOIP_MMDB=<that path> (ENV.GEOIP_MMDB / BROWSER_ENV). The writes into
invisible_core's cache layout and the tag check in provision.sh are deleted; the
script now checks, as dot and with the knob, that the library hands back exactly
that file and reads it as a database, and that dot cannot write it. The pin holds
at runtime (the library no longer looks up the latest release at a launch, nor
downloads one, nor prunes the pinned one). The digest input is unchanged.
build-browser-env.sh takes <lock> <env dir> <zip> <sha256> (the tag argument is
gone).
- USE_MISSING, INVISIBLE_CORE_AUTOFIX=off: done (ENV.CORE_AUTOFIX / BROWSER_ENV,
set in the browser environment), asserted in the engine smoke (fake server's
recorded environment) and in the browser smoke (the real server's /proc environ).
- USE_MISSING, engine version from CLI prose: done. provision.sh reads tag, Firefox
version and BuildID from invisible_core instead of sed over `invisible-playwright
version`; checked against the real pinned library: the output is identical to the
old engine line, so manifests keep their wording.
- FIX_UPSTREAM, port-less proxy: done in the repo's part. identity_rules.py,
identity-rules.ts and the shared fixture refuse a proxy URL that does not write a
port ("proxy must name a port, as in http://host:8080; got <redacted>"), one rule
in two languages (a written default port such as http://host:80 counts, which
URL.port alone cannot tell).
- FIX_UPSTREAM, proxy password in the MCP session file: done in the repo's part.
docs/architecture.md section 6 no longer says /proc environ is the only readable
copy, and says the environment is the only source for the first launch only (a
reopen takes who the browser is from the session file). The browser smoke now
launches a real identity with a proxy (a small authenticating proxy,
browser/proxy.py, credentials by environment) and greps /home/dot for the
password: the MCP session file holds it, as expected until upstream is fixed; the
check accepts exactly that file and fails for any other, and prints
"KNOWN FINDING STILL OPEN" (or "FIXED UPSTREAM" when the file is clean).
- FIX_UPSTREAM, usage counter: the in-repo part only (architecture section 6 lists
the connections a launch makes that nothing here turns off). The upstream knob is
not ours.
- KEEP_OURS items: untouched, except that the fake server's GONE sentence now is
the real one.
low findings (browserlows3-review.json)
- GeoIP cache growth: not settled by the knob (the host archive cache stays), so
done separately: after a build has its pin's archive, golden.ts keeps it and the
two archives downloaded most recently before it and removes older ones
(pruneGeoipArchives; a failed fetch removes nothing).
- launch_failed fallback lost its traceback: done (logger.opt(exception=error)).
- GoldenManifest.notices typed as always present: done (optional, with a test that
an old manifest reads).
- stale doc comment on GeoipPin.tag: done.
- notices do not name daijro/geoip-all-in-one's license: done (first entry of
GEOIP_NOTICES and of THIRD_PARTY_NOTICES.md; GPL-3.0, GitHub's license field of
the repository and invisible_core agree).
- medium holdback finding: already fixed by c2094738, not repeated.
deferred, with the reason
- Bump to invisible-playwright-mcp 0.70.10 (input lock, background typing): needs
the owner's decision on a permission for the new browser_upload_files, a
regenerated hashed lock, a new captured fixture and the golden digest.
- Back, forward, reload and scroll as key presses: the fix is upstream tools; the
smoke probe for it is not in this step's list.
- checks.py browser_installed through engine_status/doctor: low, not asked.
tests removed because their feature is gone (all replaced)
- test_reopens_the_browser_once_when_the_server_says_it_is_gone and
test_reopens_only_once_and_then_returns_what_the_server_said: the reopen and
repeat no longer exist; replaced by three tests (lost browser closes the identity
and is not reopened, a launch makes it work again, the slot is freed).
- guest-files: "provision.sh records the engine line of `invisible-playwright
version`" and "the engine sed picks the engine line": the sed no longer exists;
replaced by a test of the new program, run against a stand-in invisible_core and
compared with the old line's format.
- guest-files: "has the pinned GeoIP database unpacked beside the engine" and the
smoke-prepare test: the cache-layout writing is gone; replaced.
- engine smoke: the check that a lost browser is reopened and the call repeated,
and the check that the fifth launch closes the second (the lost identity now
holds no slot); replaced, counts of events unchanged (nine launches, six closes).
- test_an_error_of_the_server_is_an_error_result became the lost-browser tool test.
- identity-rules fixture: "an https proxy" now carries a port (the rule changed).
Tests and floors: vitest 773 passed (win32; linux floor +12), pytest 2692 passed,
go 63 passed 2 skipped (win32), engine smoke 215 passed, browser smoke 71 passed.
.github/test-floors.json raised: vitest linux 758 to 770, win32 761 to 773, pytest
2674 to 2692. Nothing lowered.
Finding -> outcome (.local/next/integ1-review.json):
- Migration 0009 rewrote dots.config without moving config_version -> fixed in
place (the migration is unreleased, no fix-up migration). The two UPDATEs are
one statement now, so a Dot that needed both lists cleaned is one rewrite and
its version moves once, as a save does; a Dot the migration does not touch keeps
its version. architecture.md names the migration as a writer of the version.
Test: stale-data-migrations.test.ts checks the version of a Dot rewritten for
both lists, one rewritten for models only, and two left alone (fails before the
fix: the version stayed 1). Run on PGlite and on PostgreSQL 18.4.
- Browser approvals sent to Telegram and WhatsApp carried the URL of
browser_navigate raw (user, password, query tokens) while the tool.called target
masks them -> fixed in the engine, the one owner of what an approval shows:
approval.requested arguments for browser_navigate use the same function as the
target (targets._shown_word), so the host, the web UI and every chat show one
thing. The parked call keeps the real URL. Tests: test_permissions.py (the URL
of the arguments is the URL of the target, for four URL shapes) and
test_browser_tools.py (a parked navigation's approval.requested carries no
password or token, and the stored call is unchanged). The channels package
redacts nothing; approval-text.ts says so.
Not changed, by the recorded choice of architecture section 6: the text of
browser_type and the value of browser_select_option stay in an approval (a
person approving typing sees what is typed); section 6 now says that this
includes a chat and that show_arguments off leaves it out. exec's full command
also stays in its approval (section 5: the full command stays behind the
approval). A channel test would only re-test that the prompt prints what the
event holds, so none was added.
- setup's nextSteps recommended the web build when the report had no web row
(DoctorDeps.webBuild is optional) -> fixed: the step is named only when the row
exists and is not ok. Test: a report without the web row (fails before).
Changed test, not weakened: test_browser_tools.py "a policy that asks before
navigating shows the person the url ..." used a URL with a query (?q=1), whose
value the approval now masks; it uses a plain URL, and the new test covers the
masked one. No test was removed.
Floors raised for the 4 tests added: vitest linux 1118 -> 1120, win32 1121 ->
1123, postgres 633 -> 635 (pg 253 -> 254), pytest 2439 -> 2441. None lowered.
The Computer page (S9) replaces the old Computer and Browser identities
tabs. It has four views named in the address (?view=screen|browser|files|usage):
- Screen: the desktop as a live picture (3 s while the page is in view, LIVE,
a warning after 15 s), with "The Dot has control". The chat panel and this
view now draw it with one FrameView.
- Browser: identity cards (open first; state in words, last use, proxy with
user and password hidden), the window of an open browser under a bar with
the page the Dot last sent it to and a "using this now" mark, Close (B8,
asked first when the Dot is working in it), Delete (asked first), New
browser (checked by the engine's own checkIdentityRequest), the limits and
the managed_by_dot note. The page and the mark are read from the event log
(the target of tool.called starts with the identity id): lib/browser-activity.ts.
- Files: a read-only walk through /home/dot, folder and file in the address;
text and images are shown, everything else and any file over 1 MiB (text) or
8 MiB (image) is a download only; markup and svg are text, never run.
- Usage: given and in use (live meters), images, why the last start failed,
model spend today and in total, and Start, Reboot, Stop.
A stopped computer says so on the first three views and offers Start; a
route's own 409 computer_stopped gets the same answer. The old
/dots/<id>/identities redirects to ?view=browser, and its tab leaves the bar.
One owner for what a file is: fileType (packages/shared/src/file-kinds.ts) is
now the table the API serves a file by (apps/api/src/file-types.ts) and the
table the web previews by; before, the API held it alone.
Removed: ComputerTab.tsx and IdentitiesTab.tsx (replaced), StatusBadge of
components/ui.tsx (nothing used it any more) and the legacy.css rules only
they used (.badge, .tone-*, .visually-hidden, .table-wrap, table, .facts,
.meter-*, meter, .screenshot, .grid-2, .row, .notice).
Gaps named, nothing faked: GET /api/dots/:id/browser-identities/:identityId is
not used (the list is read again on each browser.identity.* event, which gives
the same card; a second path to the same data would be a second owner); the
person cannot take over a browser or the desktop (decided: watch only).
No code was copied from open-cowork in this step (its entry in
THIRD_PARTY_NOTICES.md already covers screen-view.tsx); nothing to add.
Tests: 4 shared (fileType), 34 web units (computer-view, files, identity,
browser-activity), 38 component tests (computer-page: views, stopped
computer, browsers, files, usage), 7 Playwright specs (computer.spec.ts:
views, browsers end to end, redirect, stopped computer, 390 px, contrast in
light and dark). Vitest 1681 -> 1757 on Windows (linux floor 1678 -> 1754),
Playwright 52 -> 59.
Tests changed, none removed: dot-shell.test.tsx's tab list loses
"identities" (the tab no longer exists); computer-panel.test.tsx imports
computerIsUp and frameProblem from lib/computer (they moved there from
ComputerPanel.tsx, no re-export). Floors raised as above, none lowered.
Finding (medium), confirmed and fixed: the pinned invisible-playwright-mcp
saves who `main` is, the proxy with its password included, in
<INVISIBLE_MCP_HOME>/sessions/<session id>.json on every browser_open. The
engine set INVISIBLE_MCP_HOME to /home/dot/browsers/<id>/mcp, so with the
host file routes of lane-host (GET /api/dots/:id/files and /files/list,
limited to /home/dot, with no exclusion for that directory) the password
was one request away from the API, the web proxy, the SDK and the Files tab.
Fix at the origin: the home is /var/lib/invisible-dots/mcp/<identity_id>,
owned by dot, made by provision.sh and install.sh (the parent is root's).
dot-agentd's TCP listener already refuses a real path outside home with 403
outside_home, so nothing new is filtered. One owner for the path:
GUEST_PATHS.mcpHomes in packages/shared and MCP_HOMES_DIR in the engine's
protocol.py, kept equal by tests/repo/vendored-nanobot.test.ts. The
BrowserManager makes the subdirectory with the profile and removes it with
the identity (before, it went with the identity's directory).
Tests that fail before the fix: the manager tests (the home is not under
browsers, the environment names it, a delete removes it, and the session file
with the password is under the home and nowhere in the browsers directory), the
shared test that checkHomePath refuses the home, the image-builder test that
both scripts make it. The engine's fake MCP server now writes the session file
as the real server does. The engine smoke has the stand-in's session file refused
by the TCP port (the file, its directory, a link to it, a ../ path) and removed
by a delete; the browser smoke creates an identity with a proxy (a small
authenticating proxy, browser/proxy.py), launches it on the real server, and
checks the real session file is under the new home, that no file of /home/dot
holds the password, that the TCP port refuses it and that the identity's
directory has no MCP home. files_get, files_list and refuses_outside_home move
to lib.sh, which both smokes use.
docs/architecture.md: sections 4.2, 6 and 9.6 name the session file as the
second copy of the proxy on disk, outside /home/dot, and the new directory.
Floors raised: vitest +2 (linux 1118, win32 1121), pytest +2 (2439); none
lowered. No test of kept behavior was weakened or removed: the existing tests
that read the server's record now read it from its new home.
Step W6 of the UI plan (S6 Inbox, S7 approval card, the U4 wiring, the keyboard), built on the routes the host has now.
What
- /inbox (in the rail, with a badge) is where everything that needs the person is, from every Dot. Its address holds its whole state: ?tab=history, ?dot=<id or name>, ?permission=<name>. "Needs you" lists the waiting approvals (the one that has waited longest first), the Dots in ERROR and the tasks that failed in the last 24 hours (each can be dismissed; the dismissals live in this browser only). History lists every approval that is no longer waiting, the last answered first. /approvals and /dots/<id>/approvals redirect to it; the Dot's tab bar has no Approvals tab any more, the header's "Waiting for you" pill and the Home card link to the Inbox filtered to the Dot.
- The approval card says what the Dot wants to do (from the engine's tool table: a new `ask` phrase per tool in tool-labels.ts, which the existing test keeps equal to permissions.py), the permission with its risk (PERMISSION_INFO), who and where, the Dot's reason, and the call's arguments the way they read best: a command box, a diff for write_file / edit_file / apply_patch (lines trimmed to a little context, cut at 24 lines with the rest on request), an address, a schedule in words; the raw arguments sit under Details and a proxy password is masked there too. It is destructive for a command, a browser identity's deletion and a change to a file outside the workspace.
- Answers: Allow once, Always allow, Deny with an optional note. Always allow first asks what it changes (the permission, its risk, the tools it covers from GET /dots/<id>/tools when the computer answers) and then sends approve with always: true (U4); only a permission a config can name offers it. A 409 already_resolved is the news that someone was first, not a failure. Buttons wait while an answer is on its way and a second answer is ignored. An answered card stays in place as a receipt until the person leaves the page.
- The card is where the question was asked: in the chat (instead of the line that said "Answer it in Approvals"), on a task's card and in its drawer, and in the Inbox. Under 768 px the answers stick to the bottom of the screen.
- Keys in the Inbox: j and k move, a allows the selected card once, d denies it. The design says "d deny (with confirm for destructive variants)"; a denial can do no harm, so the confirmation is on the key that can: a does not allow a destructive card, it moves the focus to its Allow once button, whose press is the confirmation. Keys meant for a field, a menu or an open dialog are left to it.
- The attention model counts failed tasks (lib/attention.ts): the rail's Inbox badge, the tab title and the favicon read one count of approvals, Dots in ERROR and failed tasks, and the Inbox lists that many things. The shell reads each Dot's task list for them (no route lists failed tasks of every Dot) and the Inbox says when some Dot's list could not be read.
Where things live
- lib/approval-view.ts (the question, risk, body per tool, workspace rule), lib/diff.ts, lib/range.ts, lib/inbox.ts (address and filters), lib/failed-tasks.ts, lib/dismissed.ts; components/elements/approval-card.tsx, components/approvals/* (card, body, diff preview, always-allow dialog, the answers hook, the task and inline wrappers), components/inbox/*; components/tool-family-icon.ts is the icon map the chat steps and the cards share.
- Copied code, each file with its Derived from header and its notice: assistant-ui (MIT) elements/approval-card.tsx and utils/range.ts (only clamp and take); OpenDots by Shashankss1205 (MIT, which includes the Spots source) the diff palette and line vocabulary of app.js and style.css, in diff-preview.tsx and diff.ts. A line's kind comes from how the preview is built, not from its first character, so a removed line of dashes is not taken for a heading. THIRD_PARTY_NOTICES.md gains both sections.
- Deleted: components/ApprovalsList.tsx, components/DotApprovalsTab.tsx, pendingApprovalCount (the rail reads needsYouCount).
Named gaps, nothing faked
- GET /api/approvals answers with the oldest 500 approvals (no paging, no order), so History cannot reach newer ones past that. APPROVAL_LIST_LIMIT in shared is now the one owner of the number (the database default uses it, as TASK_LIST_LIMIT does for tasks), and the History says when its list is that long. Open: paging or newest-first on the route (host lane).
- A History row cannot say "always allowed": the approval record has no such field, only the approval.resolved event has it. The chat and the task story, which read the events, do say it.
- Failed tasks of every Dot cost one task-list read per Dot until the host has a route for them (a cross-Dot or status-filtered tasks route).
- Channels that need a relink join "Needs you" with the channels page (W12).
Tests (written with the code)
- apps/web vitest +93 (diff and range 8, approval-view 18, inbox model, failed tasks and dismissals 12, approval card and element 20, Inbox 29, shell +2, tasks +1, chat +1, tool-labels +1, attention +1), tests/repo/notices +8 (four derived files), repositories +1 (the approvals list limit).
- Playwright +11 (inbox.spec.ts: counts in the rail and title, an answer heard by the Dot, Always allow changing the Dot's config and its computer's, Keep asking changing nothing, Deny with a note and the History, the old addresses, keyboard-only, a 409, a task's approval card and drawer, failed tasks and dismissal, 390 px with sticky answers, contrast in light and dark). The Inbox counts across every Dot, so its specs run on a control plane of their own (`fresh` fixture) and each leaves it empty; look.ts is the contrast helper tasks.spec.ts had inline, now shared.
- FakeControlPlane (test support) answers approval answers (with 409 for a second one) and the tool table.
Changed tests, none weakened: test/attention.test.ts drops the assertions on pendingApprovalCount, a function that no longer exists (the same counts are asserted per Dot and through needsYouCount, and failed tasks are new cases); test/shell.test.tsx expects the rail's "Inbox" entry with "3 need you" (two approvals and a Dot in ERROR) where "Approvals" with "2 waiting" was; test/dot-shell.test.tsx drops the Approvals tab and its per-Dot count badge (the tab is gone, the count is on the rail and the header pill) and expects the pill to link to /inbox?dot=d1; test/home.test.tsx expects the same link; test/tasks.test.tsx and test/chat.test.tsx replace the tests of the "answer it in Approvals" link with tests of the inline card answering; e2e shell.spec.ts and chat.spec.ts follow the new heading, entry and card. The two deleted components had no tests of their own.
Floors raised (no floor lowered): vitest linux 1576 to 1678 and win32 1579 to 1681 (+102: 93 web, 8 notices, 1 repository), postgres 624 to 625 with the pg requirement 250 to 251, playwright 41 to 52 on both.
Suites: npm run typecheck; npx vitest run (122 files, 1681 passed); apps/web playwright (52 passed); next build; go test ./... in guest/dot-agentd; engine suite in WSL (2421 passed). The smoke was not run: no engine, guest or image file changed.
First step of the final integration: the 17 commits of lane-host (tip 1690fd3c,
the Telegram and WhatsApp channels, the host API routes for automations, tools,
files and events, the doctor moved into the vm-manager, the CLI channel commands)
meet the browser block, the cleanup migrations and the CLI web serving of
lane-fixes. Behavior of both sides is kept.
Database migrations
-------------------
One numbered sequence, each file stating its final form once. Since the
engine fork commit f0e86ad7 the migrations added are:
0001_initial (unchanged since f0e86ad7)
0002_inbound_events (unchanged since f0e86ad7)
0003_task_spend (both sides added the same file: one file)
0004_channels (lane-host, final form from L10)
0005_channel_prompts (lane-host)
0006_events_task (lane-host)
0007_dot_config_version (lane-host)
0008_orphaned_secrets (lane-fixes, renumbered past 0007 before this merge)
0009_removed_config_names (lane-fixes)
No migration was edited after it was added, there is no duplicate number, and
a repeated number is refused by the existing guard (database.test.ts). 0008 and
0009 clean rows that databases of the released engine can hold (secrets of Dots
deleted before DotsRepository.delete removed them, stored configs naming a model
role or a permission that no longer exists); they fix no migration of this
branch. repositories.test.ts lists the nine versions. The same chain runs
through stale-data-migrations.test.ts on PGlite and PostgreSQL.
Conflicts and their resolutions
-------------------------------
- .github/test-floors.json: every floor set to the measured count (below).
- README.md: the channels section (Telegram, WhatsApp) from lane-host, and the
web client paragraph of lane-fixes (served by `invisible-dots server`,
`--no-web`, INVISIBLE_DOTS_WEB_LISTEN) in place of lane-host's two-command
paragraph.
- docs/architecture.md: the engine route table has the identity frame and close
routes (fixes) and the automations and tools routes (host); the `offered` rule
of GET /tools now also names the managed-identities rule; section 11.1 says the
web row belongs to `invisible-dots doctor` and `setup`.
- packages/shared/src/protocol.ts: both sets of agent routes. DoctorCheckId gets
"web" (packages/shared/src/api.ts).
- packages/sdk/src/client.ts: getIdentityFrame and closeIdentity (fixes) beside
the channel methods (host).
- apps/api/src/server.ts, apps/scheduler/src/{driver,scheduler,testing}.ts,
apps/vm-manager/src/guest-client.ts and its test: the identity frame and close
routes beside the automation, tool and channel routes; the engine's browser
answer codes (busy, frame_failed, crashed, launch_failed) next to homePath.
The fake guest has two browser identity tool rows and offers
browser_identity_create only while the Dot manages its identities, as the
engine does.
- apps/cli/src/cli.ts and host.ts: channel commands and `--no-web` serving
together. The doctor now lives only in the vm-manager (host's move):
apps/cli/src/doctor/checks.ts stays deleted, and the web build row of fixes
moves there with it. DoctorDeps.webBuild is optional: only a process that
serves a web client has the row, so `GET /api/doctor` (read in the web client,
which is built by then) has none and `invisible-dots doctor` and `setup` do.
WEB_BUILD_COMMAND and WebBuild are the vm-manager's; apps/cli/src/web.ts
imports them.
- apps/cli/test/doctor.test.ts: host's version (the checks' tests live in
apps/vm-manager/test/doctor.test.ts). The three web row tests of fixes moved
there (row order with web, built or missing, a check that throws).
- apps/cli/test/setup.test.ts: host's fakes, plus the web build next step test.
- packages/database/test/repositories.test.ts: the nine versions above.
- guest/image-builder/test/smoke/smoke.sh and README.md: fixes' managed_by_dot
argument on every offered-tools check, host's GET /tools, /automations and
file route checks after them; the table has 32 tools, not 13.
- invisible_engine_dots/nanobot/dots/{engine,server}.py: Engine keeps both the
BrowserManager and the registry (for tool_table); both import sets.
- invisible_engine_dots/tests/fakes/{engine_harness,local_computer}.py and
tests/dots/test_permissions.py: the harness keeps the shared CronService of
host and the browser manager of fixes; local_computer drops the unused `os`
import and keeps base64; both groups of permission tests stay (the table tests
now build the browser manager too).
- tests/repo/e2e.test.ts: the doctor check ids the e2e run requires are read
from DoctorCheckId in packages/shared (the union that used to be in the
deleted apps/cli/src/doctor/checks.ts).
- invisible_engine_dots/tests/dots/wire_shapes.json is written again with the
browser tools in the table, and two cases cover the managed-identities rule;
apps/scheduler/test/engine-shapes.test.ts holds the fake guest to it.
- Expectations that list the fake guest's tool table gain its two browser rows
(apps/scheduler/test/scheduler.test.ts, apps/api/test/api.test.ts).
Removed tests: none. Floors: all raised, none lowered.
vitest linux 817 to 1116, win32 820 to 1119
postgres linux 228 to 633, pg-named 97 to 253
go linux 98 to 110, win32 63 to 64
pytest linux 2424 to 2437
Suites, measured on this tree: typecheck clean; vitest 1119 passed on win32 and
1116 passed, 3 skipped (the real PowerShell tests) on Linux; postgres suite 633
passed (253 on pg); Go 64 passed, 2 skipped on win32 and 110 passed on Linux;
pytest 2437 passed; web build; engine smoke 225 passed; browser smoke 52 passed;
english and claims gates clean. No Playwright suite exists in this tree yet.
Finding (medium, fixed): the stderr pump kept a fixed 4096 characters behind when it cut a long line, on
the assumption that a proxy URL is a few hundred characters. Nothing bounds the proxy length, and the
escaped forms _escaped_forms adds are up to 12 times longer than the password (json.dumps turns one
astral character into 12 characters), so a pattern longer than 4096 characters that straddled a cut was
never whole in one buffer and went to the journal in clear. Confirmed on the old pump with a 600-fox
password: 7 of 22 offsets around the cut leaked.
The fix is where the secret is defined. The filter now says how long its longest text is: StderrFilter
(scrub, longest_match) replaces the bare callable of MCPServerConfig.stderr_filter, _proxy_stderr_filter
takes longest_match from the patterns _proxy_scrubber builds, and FilteredStderr holds back exactly that
many characters (HOLDBACK is deleted) and raises its line cap to twice that when the default 64 KiB is
smaller. The shared and Python identity rules are left alone: capping the proxy length instead would
have to stay below 4096 / 12 characters to cover the escaped forms, which refuses legitimate proxies.
Tests: a 70 000 character secret that straddles the cut of a line read in 64 KiB pieces, a proxy
password longer than 4 KiB in its JSON form at 22 offsets (the old pump leaks at 7 of them), and the
longest_match of a proxy filter. The existing pump tests pass the filter object. pytest floor raised from
2645 to 2674; no test removed.
Suites: engine 2674 passed, typecheck, vitest 761 passed, go test, web build.
S13, the Home setup checklist and S15, with the end-to-end tests of each.
What: a Settings page in the rail (/settings) with the host checks (the doctor's report and the control plane's own answer, each failing row with its command and a button that copies it, checked again on request and when the person returns to the window while something is missing), the OpenRouter key (a write-only field over PUT /api/secrets/openrouter; whether a key is stored comes from the health answer; the answer says how many running Dots were given it), the theme, Sign out and About. Home with no Dot shows the same checklist under the invitation while the host is not ready, with the key field when no key is stored, and keeps it on the page turned green once the last thing is done. The login page is restyled as a card (no rail, no API calls, token field focused). The rail's missing-key line links to Settings.
One owner each: useHostChecks is the one list that the Settings page, the Home checklist and the create form's preflight draw (CheckList and its Section replace the panel's own markup); the health answer moved into the shell's shared data, so a saved key reaches the rail at once instead of at its next 30 second poll; CopyButton is the one copy-to-clipboard button (the code block of the markdown renderer uses it too, same behavior and tests).
The About card needed what no route told the web: GET /api/health now also answers database_kind, data_dir and logs_dir (HostFacts in packages/shared, read by startServer from the paths and the database it opened, a required buildServer option). No other host change; the design's 'logs directory' is that, and a Dot's own logs are read with 'invisible-dots logs <dot>', which the card shows.
Nothing is faked: no data is shown that a route did not answer. The doctor's own key row stays out of the lists (the key is one fact, read from health). Gaps left open on purpose: none for W3. The check that setup commands were run is a re-check, not a launcher, because setup needs an elevated terminal and an image build runs for minutes (design S13).
Tests: apps/web vitest +34 (host-settings 4, preflight 3, shell 3, settings 13, Home checklist 5, login form 6), playwright +8 (settings.spec.ts, a second harness without a key for the first-run host), API health test now pins the exact answer and start.test pins the real paths. Removed tests: none. Floors raised: vitest linux 1542 to 1576, win32 1545 to 1579; playwright 33 to 41 on both. No floor lowered.
Suites: npm run typecheck, npx vitest run (117 files, 1579 passed), apps/web playwright (41 passed), next build, go test ./... in guest/dot-agentd. The engine suite and the smoke were not run: no engine, guest or image file changed.
Findings of the fixes3 review, each confirmed on the code.
1. GET /state pending_approval (high, fixed at the contract). packages/shared
declared an object (ApprovalRequestedData) that the engine never sent; the
engine, its test (test_engine.py state_answer), the engine smoke (jq
.pending_approval==$id) and dot-agentd's proxy all carry the bare approval
id, and the host holds the approval row by that id already. The contract is
now the id: AgentStateAnswer.pending_approval is string | null, the
PendingApproval type (used nowhere else) is deleted, section 9.x of
docs/architecture.md says so. run.ts reads the id (steps g and k) through
the AgentStateAnswer type of lib.ts. Tests: tests/repo/e2e.test.ts assigns
the shared type to the run's (a compile-time pin, typecheck fails if they
drift again) and pins the engine's two lines; test_server.py gains the
answer of GET /state with two pending approvals (the oldest one's id).
2. browser_navigate target (high, fixed in the run). The engine writes
"<identity id>: <detail>" (targets.py _on_identity). lib.ts names the format
once (identityTarget), step e asserts the target starts with
identityTarget(research.id, "https://example.com"), and e2e.test.ts pins the
format against targets.py (the f-string and browser_navigate_target using
_on_identity).
3. Step h reads right after POST close and DELETE (medium, fixed). The events
reach the host's log through the scheduler's pump after the route answered.
Both reads now wait (waitFor, TIMEOUTS.pump 30 s, every 1 s); the delete
waits for deleted and then asserts closed came first (the pump delivers in
order). A guard test in e2e.test.ts fails on the old shape. The other
asserts that read the log right after runTask stay: a task's end is one of
the pump's events, so everything before it is there.
Floors raised: vitest 814/817 -> 817/820 (three tests), pytest 2423 -> 2424.
No test was removed or weakened.
Nothing of this branch was ever released (main and dots-ui-browser-channels
have migrations 0001 to 0003 only), so migrations 0004 to 0010 are one first
form that grew in steps, and three of them were fix-ups of an earlier one.
Each migration now states its final form once, and no database exists that
needs a repair:
- 0004_channels creates the Telegram-only unique account index, drops the
channel_inbound table it used to create and have 0006 drop, and carries the
events_user_message_origin_key index that replaced that table.
- 0006_inbound_by_event, 0008_channel_account_and_arguments and
0010_account_key_telegram_only are deleted: their schema is in 0004, their
data repairs (dedupe of a bot bound twice, the show_arguments default for
bindings made before it) fix rows no database can hold.
- 0007_events_task and 0009_dot_config_version are renumbered 0006 and 0007 so
the list has no gaps. A local database that applied the old names must be
recreated.
The text that named the old files is updated (hub.ts, architecture.md).
The write on a link: a PUT on a symbolic link at the path itself replaces the
link with a regular file (a rename does that, on both listeners), and does not
create the file the link points to; the directories of a path are followed.
The previous test comment and commit text said the file would be created at
the target. The test now asserts the replacement for a dangling file link, a
new test asserts it for a live file link (the target keeps its content), and
the README states the rule.
Findings of host3-review.json:
- low, test and commit text disagree with the behavior of a write on a dangling
file link: fixed by stating the replace rule and testing the file-link case
(dangling and live). Writing through the link was rejected: it would make
the web editor and the engine's socket write through links in a way no
other atomic save does, for no case that needs it.
- low, migration 0010 is a fix-up of an unreleased 0008: fixed by deleting it,
and by folding the other fix-ups (0006, 0008) into 0004 the same way.
- the medium finding of that review (relative dangling target resolved from
the lexical directory) was fixed by 5757281b.
Removed tests, because the behavior they tested no longer exists:
- adapters.test.ts "0008 gives a binding made before it the setting it
lacked, and keeps the ones it has": the data repair is gone with 0008.
- adapters.test.ts "0008 resolves a Telegram bot bound twice by keeping the
oldest ...": the dedupe is gone with 0008. The rule itself (one bot per Dot,
a WhatsApp number on several) stays tested in channels.test.ts.
repositories.test.ts lists the new migration versions.
Floors: vitest linux 1020 -> 1018 and win32 1023 -> 1021 (the two removed
tests), postgres 614 -> 610 with pg 245 -> 243 (the same two, on both
adapters), go linux 108 -> 109 (the live file link test). Measured: vitest
win32 1021, postgres suite 610 with 243 on pg, go on linux 109.
The earlier web steps built on what the SDK offered and named what the host
lane would add, with no fake data and no stub. The merge of lane-host (M3)
brings that data; this closes the gaps it answers.
Closed
- The event log has no filter (declared by the chat and Tasks steps, U2):
readEventLog now asks the route for the types a caller names (`types`), so
the agent's state, messages and every other event no longer cross the wire to be
dropped in the browser. It is still the one function that pages through the
log; the chat passes CHAT_ACTIVITY_EVENT_TYPES, the Tasks page passes
TASK_EVENT_TYPES (new, the nine types a task's story is made of) and keeps its
predicate for the tool calls and approvals of the chat, which name no task and
which a type cannot tell apart. The per-task `task_id` filter is not used: the
page reads every task's story at once, and one call per task would be more calls,
not fewer.
- No "via Telegram / WhatsApp" on a message (declared by the chat step, H2): a
user message carries `origin` in the conversation answer; the bubble says
"via Telegram" or "via WhatsApp" (lib/channels.ts, a Record over the contract's
kinds, so a kind added there is a compile error until it has a name). Nothing is
shown for a message typed in the web, the CLI or the SDK.
- The create form's checks showed only /api/health (declared by the create step,
U1): the preflight panel now also shows the host report of GET /api/doctor
(Node, QEMU, the accelerator and its probe, disk, the golden image and the
runtime ISO), each row that is not ok with the command that fixes it. The
doctor's own OpenRouter row is left out: the key is one fact and /api/health is the
web's one reader of it. The two are asked together; if only the report fails the
control plane's rows stay and one "This computer" row says it was not checked.
The panel informs; creating stays possible.
Still open, and why (nothing faked)
- The conversation route answers the OLDEST 500 messages (the host lane did not
change it): the chat keeps saying that only the first 500 are listed.
- The tasks route lists the newest 200: the Tasks page keeps its notice.
- "Last activity" on a Home card: no route returns the newest event (the new
filters read forward from a cursor), so the card still has none.
- The inline approval card with Allow once / Always allow / Deny is W6's; U4's
`always` is in the SDK and waits for it.
- Memory chip as a link (W9), the Files, Automations and Tools views that U2 and
U3 serve (W8, W9, W10).
Tests (written first)
- apps/web/test/event-log.test.ts, task-events.test.ts: the control plane is
faked with its real filter; they pin that the types are asked for on every page,
that a page is cut by what is kept, that the chat's tool calls and approvals
are left out of a task's story. chat.test.tsx: the chat asks only for what it
reads, page by page, and a step after a thousand kept events is found.
- preflight.test.ts, new-dot.test.tsx: the host rows, a missing row with its fix,
a doctor that cannot run, a control plane that does not answer, check again.
- channels.test.ts, chat.test.tsx: the names of the kinds and the chip.
- Playwright (2 new, against the real control plane over the fake VM layer):
the checks beside the form name what the host lacks and the fix, and clear when
the host is fixed; a message from Telegram says "via Telegram" and one typed here
says nothing. The e2e harness gives the doctor a healthy host of its own, so no
test depends on the QEMU of the machine it runs on.
Removed tests: none. Rewritten for the new reading of the log (same behavior
kept, the filter now at the route): event-log.test.ts "keeps what the caller's
predicate accepts" (now two tests), task-events.test.ts "reads the log page by
page to its end" and chat.test.tsx "reads the log page by page"; they once
filled the log with events a client had to drop and now fill it with events the
route keeps, and also assert the types asked for. The "before you create" tests of
new-dot.test.tsx count the host's rows too.
Floors (raised, none lowered): vitest linux 1532 to 1542 and win32 1535 to 1545,
playwright 31 to 33 on both.
Block host3 review, one finding, fixed.
resolveLinks (the confinement of the host's file routes to home) joined the
relative target of a dangling link to the directory of the link as written,
whose own links were not followed yet. Join cleans a ".." lexically, the
kernel applies it after following those links, so a path through a link got
the wrong real location: a link out of home could be served from a different
file in home (home/out -> outside and outside/d -> ../stolen answered 200 with
home/stolen), and a location inside home got a 403 (home/a -> home/s1/s2/s3 and
s3/l -> ../../y answered 403 where s1/s2/s3/l answers 404). Nothing outside home
was read or written, os.Root confines the open, but the answer was wrong both
ways. The directory of the link is now resolved (EvalSymlinks, it exists:
Readlink just went through it) before the target is joined to it.
TestRemoteFilesResolveARelativeDanglingLinkFromItsRealDirectory has both cases;
it fails on the previous files.go (200 with the home file, then 403 instead of
404) and passes now. One part of the finding is rejected: a PUT to a/l is not
expected to create home/s1/y. Every PUT replaces the entry it names through a
temporary file and a rename, a link included (the daemon's contract, README:
the directory is resolved, the entry is not), so it lands as a file at
home/s1/s2/s3/l, inside home; the test says so. The PUT through out/d stays a
403.
The go floor of linux is 108 (was 107), one test added.
lane-host gained 3f4f3fd4 (a dangling link under home that leaves it is a 403,
expected_config_version in the shared PATCH request, migration 0008 resolving a
bot bound twice) after the first merge of this step, so its current tip is merged
now.
Conflicts and their resolution
- .github/test-floors.json: both sides raised floors again. Set to what this tree
measures without the web step that follows (nothing lowered): vitest 1532
linux / 1535 win32, postgres 624 with 250 pg tests, go 108 linux / 64 win32,
pytest 2421, playwright 31.
One fix beside the merge, in a test of lane-host (packages/channels/test/hub-whatsapp.test.ts,
"shows the connection's failures as status..."): it read the channel's status as
soon as the new connection existed, but the loss is written as a status after
the new connection is made (reports are applied in order, after a database
write), so on PostgreSQL it read the stale "connected" and failed (seen once in
a Linux run against PostgreSQL 18; the test passes on both after the change).
The test now waits until the status has left "connected"; the assertion that it
is error or connecting is the same.
Removed tests: none.
Block browserlows2 review: four low findings and two items of its unproven list.
Every one was checked against the code; each is fixed at its origin with a test
that failed before the fix, none is rejected.
Fixed (low, one cache name for every GeoIP release): confirmed. downloadFileName
is the last URL segment, which is geoip-aio-all.mmdb.zip for every release, so a
pin bump made fetchVerified delete the only verified copy of the previous
release, which upstream has deleted by then (the README promised the opposite).
The cache now names the archive geoipCacheName(pin) = geoip-<tag>-<file>; the
seed keeps the plain name, which the guest finds the archive by. Test: after two
builds with different tags both archives are cached, and a third build for the
first tag, whose URL now answers 404, makes no GeoIP request.
Fixed (low, the "pinned release is gone" message chosen by matching message
text): confirmed. DownloadError has a typed status, set where the answer is read
(openResponse), and fetchGeoip tests status === 404. Test: a 404, a 503 and a
hash mismatch give status 404, 503 and undefined.
Fixed (low, architecture.md 3.3 silent on the GeoIP input): confirmed. Section
3.3 now lists the archive among the contents and among the pinned inputs (URL
and SHA-256, rechecked in the guest, recorded as pinned.geoip, cached by tag,
credits in the manifest), with the caveat that a later launch may fetch a newer
release. The engine paragraph of the browser manager and UPSTREAM.md describe the
new stderr route and the escaped forms below.
Fixed (low, a launch_failed that reaches a route raises KeyError): confirmed as a
latent hole: nothing but the structure of close and delete kept it out.
_identity_error looks the status up and, for a code no route answers with, logs an
error and answers 500 internal with the reason kept, instead of failing in the
table. Test: a close that raises launch_failed answers 500 internal with the
message and logs it.
Fixed (unproven a, the MCP server's stderr reaches the journal unfiltered):
confirmed by construction: stdio_client was started without errlog, so the server
inherits the engine's stderr, and the scrub only covered answers that pass through
BrowserManager._request. Whether the real server prints the password could not be
proven either way, and it does not matter: the fix removes the path. The one place
the engine starts MCP servers (connect_mcp_servers) now gives a server whose
config has MCPServerConfig.stderr_filter a pipe (nanobot/agent/tools/mcp_stderr.py):
a thread reads it, passes each line through the filter and writes it to the
engine's stderr. A line the filter fails on is withheld, never written raw; a long
line is cut with the last 4096 characters held back, so a password straddling a
read is whole in the next piece; a journal that cannot be written does not stop
the reading, because a full pipe would block the server. The BrowserManager sets
the filter to its own _scrub, so one scrub covers answers, errors, frames and
stderr; a server without a filter is started as before. The scrub also found only
the written, decoded, quote(safe="") and Basic forms; it now also hides
quote with its default safe="/", and the URL and the password as repr (a doubled
backslash, both quote styles) and as the inside of a JSON string (ASCII-escaped
and not). Tests: the fake server (stderr_proxy) prints the URL and every form of
the password, one per line and once inside a 320 KB line, and the journal (capfd)
has all of it with the credentials hidden, for a percent-encoded proxy and for one
with a quote, a backslash and a slash in its password; the forms test now runs
every form for both proxies; _scrub is checked on a raw backslash and both kinds of
quote; 205 tests of the pump (a cut at every offset around a password, a multibyte
character cut by a read, a failing filter, a failing sink, a real child process);
connect_mcp_servers passes errlog only for a server with a filter.
Fixed (unproven b, the GeoIP data's attribution and licence): confirmed that
THIRD_PARTY_NOTICES.md covered only copied code. daijro/geoip-all-in-one (GPL-3.0
code) merges IP2Location LITE (CC BY-SA 4.0), MaxMind GeoLite2 (its EULA), DB-IP
Lite (CC BY 4.0), IPinfo and IPLocate.io free country databases (CC BY-SA 4.0), the
tdulcet GeoFeed+Whois+ASN country database (CC0) and, for the time zone computed
from the coordinates, OpenStreetMap data through tzfpy (ODbL); the credit lines
were read from the sources' own pages. guest/image-builder/src/geoip-notices.ts is
the one list: each golden manifest records it as notices, and a new section of
THIRD_PARTY_NOTICES.md carries the same text (the intro names it among what the
repository's license does not cover); tests/repo/third-party-notices.test.ts keeps
the document equal to the list. The image is built on the host of whoever runs
Dots and not distributed by this repository, which the section says. The
README of the image builder describes the cache name and the notices.
Not done, with the reason: the prepare-sleep budget item of the unproven list
(wait_for(close_all) can return while provider.aclose is still running) predates
the block, was not measured by the review and is not one of the two items this
step was given; no change was made and none is claimed.
Tests removed: none. Tests changed: the golden test's listing of images/.cache
expects the tag-first GeoIP file name (the name is what finding 1 changes), and
the golden manifest expectation gains notices. test_browser_manager's forms test
keeps every assertion and gains the new forms and a second proxy.
Floors (.github/test-floors.json), all raised, none lowered: vitest linux 753 ->
758, win32 756 -> 761 (+5: download 1, golden 1, notices 3); pytest 2417 -> 2645.
Merges lane-host at 96cfd800 (the channel hub, Telegram, approvals over
Telegram, WhatsApp through Baileys, the doctor in the API, event filters and
file reads, automations and tools routes, approve with always allow, and the
review fixes L6) into lane-web. Behavior of both sides is kept; the web gaps
that U1-U4 and H2 close are the next commit.
Conflicts and their resolution
- .github/test-floors.json: both sides raised every floor. Set to what this
merged tree measures (nothing lowered): vitest 1531 linux / 1534 win32,
postgres 622 with 249 pg tests, go 106 linux / 64 win32, pytest 2421,
playwright 31 and 31.
- THIRD_PARTY_NOTICES.md: both sections kept (the web client's licenses, then the
opt-in WhatsApp client and libsignal).
- package-lock.json: not text-merged. Started from lane-host's lock (it holds the
Baileys and grammY trees) and ran npm install, which adds the web's
dependencies; every version of the web lane's lock is unchanged except four
hoisting changes (ansi-styles, tr46, webidl-conversions, whatwg-url) that
Baileys' own tree forces.
- apps/scheduler/src/driver.ts, apps/vm-manager/src/guest-client.ts and
packages/shared/src/protocol.ts (AGENT_ROUTES): union. The browser's
identity frame and close next to the automations and tools calls.
- apps/scheduler/src/scheduler.ts: union of the identity frame and close, the
automations and tools methods, the files-route path rule and the
redelivery answer; the conversation keeps CONVERSATION_LIST_LIMIT (the web
lane's owner of the 500) with the channel origin on its messages.
- apps/scheduler/src/testing.ts (FakeGuest): union; the identity frame and
close, then automations, tools, files and links.
- apps/api/src/server.ts: union of the routes (identity frame and close,
automations, tools, channels, files, doctor); the events route keeps
MAX_EVENT_PAGE as its cap and takes the types and task_id filters.
- apps/api/test/api.test.ts, apps/vm-manager/test/guest-client.test.ts:
union of the imports and of the tests (the frame and close test and the
automations and tools test stay two tests).
- packages/sdk/src/client.ts: union (identity frame and close, then the
channels calls).
- docs/architecture.md: the browser identity table keeps the frame and close
rows with the automations and tools rows (lane-host's stale "the engine has no
browser yet" rows are dropped); the messages line says the oldest 500 and the
origin; the events limit paragraph and the doctor paragraph both stay; the
web client section (9.7) and the channels section (9.8) both stay.
- guest/image-builder/test/smoke/smoke.sh and README.md: union. The tools table
has 32 rows now (the browser's tools are in it), so the check says 32, and
the memory-off push of the table check passes the browser's managed flag.
- invisible_engine_dots/nanobot/dots/engine.py, server.py: both sides' fields
and imports (the browser manager and the registry the tools table reads; the
cron automations).
- invisible_engine_dots/tests/dots/test_permissions.py, tests/fakes/engine_harness.py,
tests/fakes/local_computer.py: union; lane-host's tool table tests take the
browser manager's dependencies (_deps now needs the store) and the harness
keeps the shared cron service next to the browser manager.
Fixed by the merge (not conflicts)
- invisible_engine_dots/tests/dots/wire_shapes.json is the engine's own answer
(UPDATE_WIRE_SHAPES=1): its tool table has the browser tools of the table now.
apps/scheduler's engine-shapes test reads it and passes.
- DotSummary has config_version: the web's FakeControlPlane records carry it.
Removed tests: none. Floors: raised only (see above).
tests/e2e/run.ts and README.md come back from 4b390f90 (the run that
drove the earlier TypeScript agent) and are rewritten for the engine, the
browser block and the one-command server. The run is a manual acceptance
test on a Linux host with an accelerator and a real OpenRouter key; it is
not in CI.
What the run checks now (steps a to o, README has the table):
- a: host preflight (Node 24, Linux, CLI, key file, dot-agentd is a
linux/amd64 ELF, free ports, doctor with the kvm probe). `--check` is the
dry mode: it stops after step a.
- c: `invisible-dots server` serves the web client too: login page, 401
without a session, wrong token refused, sign-in, the proxy reaches the API.
- e: create the identity research, launch it explicitly, open example.com,
read the heading, write heading.txt and a memory note; events, tool.called
under each tool's permission with its target, task.progress,
memory.written, the file hashed by the Dot and compared on the host, the
spend on the events, the task and /usage.
- f: desktop PNG not blank; the identity's JPEG frame, directly and through
the web proxy.
- h: no implicit launch; max_open evicts the least recently used identity
and the browser servers in the guest are exactly the open identities; host
close (frame then 409 not_open); host delete of an open identity.
- i: identity create/delete approvals: proxy password redacted in the
approval, nothing happens before approval, password in no approval,
identity record, call event or journal.
- j: stop/start: the open browser is closed on the way down, launched again
with the same .stealth-identity.json; files, note, memory search and
conversation kept.
- k, l: the computer is killed (SIGKILL of QEMU) during an approval and
during a command. The engine cannot be killed alone from outside by design
(dotengine and dot are separate users), so the old agent kill became a
power cut; the control plane must record it and start the computer again,
the same approval is pending, an interrupted call is reported once and
never run again.
Changes from the old run: engine tool names (exec, write_file,
memory_search, browser_*), memory as a file under /home/dot/memory,
`/v1/agent/state` through dot-agentd's proxy instead of the agent socket
from inside the guest, DELETE answers 202, ground truth read through
dot-agentd instead of through the model where the model adds nothing.
tests/e2e/linux-host (stand-in Linux host for WSL) is restored; prepare.sh
builds the CLI and the web client instead of the deleted agent bundle.
CI coverage without a VM: tests/e2e/lib.ts holds what the run names and its
pure helpers; tests/repo/e2e.test.ts (39 tests) fails when a route, command,
flag, tool, permission, event type or doctor check the run names stops
existing in the product, when run.ts names something lib.ts does not
declare, and exercises the PNG and JPEG checks, the secret scans (across
chunk boundaries), the journal command under bash, the Dot's YAML through
the product's schema, the token read from a real seed.iso, the guest proof
and the waiting loop. tsconfig.json includes tests/e2e and allows .ts
import specifiers, because Node runs run.ts itself.
Rehearsed on this machine in the linux-host container (QEMU 8.2.2, kvm):
`run.ts --check` passes, and steps a and c (server, web client, key) pass
with a made-up key. THE RUN AGAINST A REAL VM IS STILL TO BE DONE BY THE
OWNER: this machine had no OpenRouter key and no image was built. The
assertions that guess the real model's or browser's behavior (the sentence
before each tool call that makes task.progress, the heading the model reads,
the engine closing a browser on the way down, the control plane restarting a
killed VM) are the likely first failures.
Tests removed: none. Floors in .github/test-floors.json raised for the 39
added tests: vitest linux 775 -> 814, win32 778 -> 817. No floor lowered.
Finding -> outcome.
1. A dangling link under home that points outside it answered 500 io_error
instead of 403 outside_home (fixed). resolveLinks kept the missing tail as
written, so a link to a path that does not exist yet looked like a missing file
inside home, and os.Root then refused the escape with an error nobody maps. It
now follows such a link by hand (bounded, 40 hops) to where its target would
be, so the prefix check sees the real location: outside is a 403, inside is a
404 on read and a created file on write, as for any link. Tests (fail before:
500 on both): TestRemoteFilesRefuseDanglingLinksThatLeaveHome (absolute,
relative, chained, directory links; GET, PUT and list; nothing is created
outside) and TestRemoteFilesFollowDanglingLinksInsideHome.
2. expected_config_version missing from packages/shared PatchDotRequest (fixed;
the field is expected_config_version since 96cfd800, not expected_updated_at).
The wire contract now owns it, and the SDK types its PATCH body with it. The
API server keeps its untyped body: it is untrusted JSON, and the scheduler
validates it (a 400 invalid_request) rather than trusting a cast. The sdk test
builds its conditional save from a PatchDotRequest, which does not typecheck
without the field.
3. Migration 0008 aborted the start on a database with a bot bound twice (fixed).
0008 now resolves the duplicates before it builds the index: the oldest
binding (then by id) keeps the bot, each other goes to needs_relink with the
account cleared and a detail naming the bot, which the hub shows and does not
start; the credentials stay and a new token links it. The index is created
there in its final Telegram-only form, so WhatsApp bindings that share a
number (legal before 0008) are not touched. 0010 stays for databases that
applied the first form, and its comment says so. Test (fails before with
"could not create unique index"): a database before 0008 with one bot on three
Dots and one phone on two, on PGlite and on PostgreSQL.
Removed tests: none. Test changes: none to kept behavior.
Floors raised: vitest linux 1020, win32 1023, postgres 614 with 245 pg tests,
go linux 107 (go win32 stays 63: the new Go tests are unix only).
Findings of the block host2 review.
Finding 1 (medium, fixed). `expected_updated_at` answered 409 dot_changed after
every status change, not only after a config change: `updated_at` is bumped by
`setStatus` too, which every task turn and approval runs. The precondition is now
on a new `dots.config_version` (migration 0009), bumped only by `updateConfig` and
`setPermission` and compared exactly, so the 1 ms tolerance window is gone as well.
It is on DotRecord, and the PATCH body field is `expected_config_version` (an
integer; anything else is a 400 invalid_request). SDK, API, architecture.md follow.
Tests: a status change between the read and the save is saved (repository and
scheduler); the always-allow test now asks the approval, waits for WAITING_APPROVAL
and only then reads the Dot, so the 409 can come from setPermission alone.
Finding 2 (medium, fixed). The unique index on (kind, account) also covered
WhatsApp, whose number is written at connect time: a second Dot linking the same
phone failed that write, which the runner swallowed, and the link stream never
ended. The decision is "one Telegram bot per Dot", so migration 0010 recreates the
index for kind = 'telegram' only; a phone may be linked on several Dots (each is a
device of it, as before 0008). Tests: hub-whatsapp links one phone on two Dots,
channels repository sets one number on two bindings; both fail on the old index.
Test changes: the adapters migration test assumed 0008 was the last migration, and
now takes the count of the ones before it (7) and what remains from the list.
Floors raised: vitest linux 1019, win32 1022, postgres 612 with 244 pg tests.
Fixed:
- The LIVE badge of the computer panel (screen-view.tsx) drew white text on --ok, which is about 1.9:1 in the dark theme. It now uses bg-ok-soft with text-ok, a pair tokens.test.ts already holds to 4.5:1 in both themes. screen-view.test.tsx reads the token classes of the LIVE and the stale badge and checks each pair in both themes; it failed on the white text.
- A Dot opened by its name (/dots/research/chat) had no live updates: DotEventScope, useDotLive, the rail and the attention state all key on the event's dot_id (the id), while the URL segment held the name. DotShell now replaces a name address with the id address (router.replace, keeping the tab, a task's address, the query and the fragment) as soon as the Dot is loaded and does not draw the tab's body under the name, so there is one address per Dot and everything below hears its events. chat.test.tsx renders the chat at a name address, follows router.replace, and delivers a live reply (it failed before: no replace, the reply never arrived); a Playwright spec does the same in a browser (31 specs now). The fake control plane resolves a name as the real routes do (requireDot). The task drawer's comment no longer says the address may be a name.
- An accepted message showed 'Sending...' for ever once the conversation list was cut at CONVERSATION_LIST_LIMIT, because the pending bubble is only dropped when the list holds its event. messageNote (chat-view.ts) says 'Sending...' only until the control plane answers (eventId null), and the Queued note now also applies to a pending bubble by its event id. The host route stays as declared (the oldest 500, a host-lane fix); the UI no longer states something false. chat.test.tsx fills the list to the limit and checks the answered message is not 'Sending...' and shows Queued (failed before); chat-view.test.ts covers messageNote.
Floors raised for the six vitest tests and the one Playwright spec added: vitest 1232 linux and 1235 win32, playwright 31. No test removed or weakened.
Block browserlows2 review, one finding.
Fixed (high, pinned GeoIP release expires): confirmed. The pin names one release
of daijro/geoip-all-in-one by URL, upstream keeps only its latest two weekly
releases, so the URL answers 404 about two weeks after the release is published
and then the required browser-smoke job and every image build without a cached
archive fail with no code change. The sha256 pin and the golden digest input
stay. Of the two ways out the finding names, a project-owned mirror needs a
release store this repository does not have and creating one is not in this
change's reach (it is the owner's to decide), so the second one is taken and
written down in guest/image-builder/README.md: the pin is bumped by hand about
weekly, and nothing about it is a surprise any more.
.github/workflows/geoip-pin.yml runs .github/scripts/geoip-pin.mjs daily (and on
demand). It goes red as soon as a newer release exists, while the pin still
downloads, about a week before it is deleted; when the pin is gone; and when the
digest GitHub shows for the pinned asset is not the pinned sha256. Its message
names the tag, URL and sha256 to put into pins.json. It is a separate workflow
and not a job of tests.yml, so a red run is a reminder and never blocks a pull
request, and the gate keeps its ten jobs. A mirror, when the owner provides one,
is a change of the pin's URL only.
Test: tests/repo/geoip-pin.test.ts (6 tests: the newest pin passes; a newer
release, a deleted pin and a re-uploaded asset fail with what to pin; drafts and
prereleases are ignored; the workflow runs daily and is not part of the gate).
It could not pass before the change: neither the script nor the workflow existed.
The script sets process.exitCode and never calls process.exit after a fetch,
which aborts node on Windows (libuv assertion). Floors raised by 6 in
.github/test-floors.json: vitest linux 747 to 753, win32 750 to 756. No test was
removed or weakened.
Every LOW finding of the channels and host API reviews was checked; each is
fixed at its origin with a test, none was rejected. One more, from the unproven
list, is real and is fixed first: the invisible-playwright-mcp server runs as dot
with the proxy password in its environment, so the lexical /home/dot rule of
the file routes let a symbolic link under home show /proc/<pid>/environ in the
UI, against the owner's decision that the password never appears in events,
logs or the UI.
Finding -> outcome
- hostapi 3 and the /proc link (the files routes follow symlinks): FIXED in
dot-agentd, where the bytes are opened. The TCP listener (the host's door)
now serves the three file routes through homeFS: every path is resolved with
its symbolic links followed and refused, 403 outside_home, unless its real
location is under the real home (so /proc is refused as it is outside home),
then opened through an os.Root on home, which also refuses a link swapped in
after the check. PUT, the listing and the atomic write go through the same
file system; a link out of home lists as "other" with no size; a link that
stays in home, absolute or relative, works. The engine's socket (agentd.sock)
is not confined: the Dot owns its computer. checkHomePath stays as the early
400. FakeGuest models the rule; a smoke check runs it as dot against the real
/proc. Go tests: 4 fail with the confinement switched off (unix tests in
files_links_test.go, the absolute-path ones in files_confined_test.go).
- hostapi 1 (index-use test): FIXED. The test now EXPLAINs the statement
list() really issues (captured from the repository) on both adapters. The
planner does use events_task_idx for it, so list() is unchanged and its
comment, which blamed the wrong form, is corrected. This test could not fail
before, by construction: confirmed, not a planner defect.
- hostapi 2 (pushed before delivered): FIXED. InboundDelivery.hold(dotId): the
Dot's deliveries wait, before every row, from before the commit of an "always
allow" answer until the config push is over. The new test, with a slow push and
a kick and kickDue between commit and push, fails without the hold.
- hostapi 4 (full PATCH reverts an always-allow): FIXED. PATCH /api/dots/:id takes
expected_updated_at; a Dot that changed since is 409 dot_changed and nothing is
saved (DotsRepository.updateConfig, DotChangedError; SDK updateDot takes it).
Optional, so the CLI and old callers are unchanged. W10 should send the
updated_at of the Dot it loaded.
- hostapi 5 (U4 test premise): FIXED. The row of an unknown permission is seeded
through the repository (the real client parses every event with PERMISSIONS);
the guard's comment names the reachable case (a row stored before the
permission was deleted, decision C1).
- hostapi 6 (no shape parity): FIXED. automationSchema and toolInfoSchema (strict
zod) in packages/shared own the shapes, the interfaces derive from them. The
engine test test_wire_shapes.py writes what automation_json and tool_table
answer into tests/dots/wire_shapes.json (and compares to it); a host test parses
the file with the schemas, checks the permissions against PERMISSIONS and holds
FakeGuest to the same offered tools. FakeGuest.listTools now follows
memory.enabled and has the two memory tools. The memory case fails without it.
- channels 3 (show_arguments, automation answers vs notify): FIXED, not
recorded as a deviation. ChannelSettings gets show_arguments (default true);
an approval prompt and its outcome leave the arguments out when it is off.
notify_tasks now also gates an answer that answers no message (an
automation's), as design 3.3 says. Migration 0008 gives existing bindings
show_arguments true. Architecture 5.4/9.8 updated.
- channels 4 (one bot per Dot by read then write): FIXED. Migration 0008 adds the
unique partial index channel_bindings_account_key on (kind, account) where the
account is known; add and setCredentials map its violation to 409
account_in_use; the early check stays for the readable answer. A test makes
another Dot take the bot between check and insert; it fails without the index.
- channels 5 (30 bits): FIXED. The comment says 24 bits (the hex tail of a UUIDv4);
the architecture does not give the figure.
Tests changed because their feature changed (none removed, none weakened)
- TestFilesAbsoluteAndTildePaths (dot-agentd): the absolute-path write to a
temporary directory is sent to agentd.sock (doLocal), which still takes any
path; the same through the TCP port is a 403 in the new tests. The ~/ half is
unchanged.
- channels.test.ts (database): the "settings and enabled" test used the account
my_bot, which the "checked account" test already holds; the unique index forbids
two Dots with it, so it uses status_bot. Settings objects carry show_arguments.
- hub.test.ts "sends task results unless notify_tasks is off": its closing marker
was an automation's answer, which notify_tasks now silences; it is an answer
to the person's own message instead (same ordering argument). Settings
expectations carry show_arguments.
- approval.test.ts: the prompt functions take showArguments; every assertion is
the same with true.
- api.test.ts and scheduler.test.ts: the fake tool table has the two memory tools;
the expected lists are extended.
- repositories.test.ts: the hand-written EXPLAIN is replaced by the captured one;
the migration list gains 0008.
Floors raised: vitest linux 1000 -> 1016, win32 1003 -> 1019; postgres 578 -> 606
(pg 232 -> 241); go linux 97 -> 105, win32 61 -> 63; pytest 2286 -> 2288. No floor
lowered.
Each finding of .local/next/weba-review.json that the three web fixes did not already close, confirmed or
rejected, and fixed at the origin with a test that failed before the fix. This step adds no UI feature.
Findings
- HIGH Tasks page under the legacy stylesheet: already fixed by 991ab863 (the shell no longer carries .legacy).
Still true and still tested (e2e/tasks.spec.ts). This commit makes the e2e contrast read the fill the way the
eye does: a translucent fill (the dark outline button's bg-input/30) is painted over the surface under it
instead of being skipped.
- MEDIUM input/textarea/label headers (004b52c0) and MEDIUM the 200-task cut (cba11eae): already fixed, not touched.
- LOW loadTaskEvents copied the event page cap (1000): fixed. MAX_EVENT_PAGE is now exported by packages/shared
and is the one owner for the store (packages/database), the route (apps/api, which also had a bare 1000) and the
web's paging. The unused AbortSignal parameter of loadTaskEvents and readEventLog is deleted. The cost of reading
the whole log while a task runs stays: it is the declared gap of the log route having no filter (step U2).
- LOW the drawer showed a task of another Dot under this Dot's address: fixed. The drawer compares the task's
dot_id with the id of the Dot the shell loaded (the address may be the Dot's name) and treats another Dot's task
as missing, showing nothing of it.
- LOW the Queue order lacked the dispatcher's id tie-break: fixed (priority, created_at, id). A test reads the
ORDER BY of CLAIM_SQL from packages/database/src/tasks.ts and fails if it stops being the order the web uses.
- LOW docs/architecture.md not updated by W4: fixed. Section 9.7 now describes Home and Create a Dot, CONFIG_BOUNDS
is named beside the config bounds, and MAX_EVENT_PAGE beside the events route.
- LOW every Home card's cost pill reloaded on every Dot's spend: fixed in CostPill, which now scopes itself to its
Dot (DotEventScope), so every place that shows it is right.
- LOW the Playwright JUnit report was written only under CI, so a local guard run could read a stale one: fixed,
the report is written on every run.
- LOW the ERROR banner lacked Reboot (design S4): fixed, with one deviation. The host reboots only a RUNNING
computer (lifecycle.reboot), so with the computer itself in ERROR the banner offers "Start the computer"
instead; with no computer it offers nothing. The confirm-while-a-task-runs and toast logic left PowerMenu for a
hook, usePower, that the menu and the banner share.
Unproven points
- Dark-mode outline buttons on the Tasks page: measured. After 991ab863 the outline button has no text utility, so
its text is the page's #f4f4f5 on the input color at 30 percent over the surface: more than 10 to 1. The review's
prediction (primary-foreground text) no longer applies. New test/buttons.test.ts reads every variant of
components/ui/button.tsx from the source, resolves each state (rest and hover, light and dark, on the page, a card
and a popover, translucent fills composited) and requires 4.5 to 1. It found a real failure the review did not
name: the default button on hover (bg-primary/90 with white text) was 4.41 to 1 on a card in the light theme.
Fixed in the tokens: a new --primary-hover (#4a4ac4 light, #a3a4f5 dark), used by the button and the badge
(their shadcn headers say so), and checked by tokens.test.ts like every other pair. The boundary of the outline
button (border-input on the page, about 1.4 to 1) is rejected as a finding: the label identifies the control, so
WCAG 1.4.11 does not ask for the border.
- Avatar initials: measured, 2.43 to 1 at the worst hue (60, the yellows) for the old 42 and 32 percent
lightness. Fixed in lib/avatar.ts: the gradient ends are 28 and 22 percent, the worst hue is 5.06 to 1. A test
samples 20000 ids, requires that every hue is reached, and requires 4.5 to 1 for white on both ends (the
gradient between them is no lighter than its lighter end).
- Engine test 7386a0dc (pid gone instead of a graceful exit): not reproduced and not changed. The SDK reaps the
child it kills, so there is no zombie for os.kill(pid, 0) to find, and a pid reused inside the test's
millisecond window is not realistic. 25 of 25 runs pass in the engine container.
- Security, coverage and the remaining unproven items of the review need no change.
Removed tests, with the reason
- event-log.test.ts "asks for nothing more once told to stop" and the second half of task-events.test.ts
"lets a failure through": they tested the AbortSignal parameter, which no caller ever passed and which is deleted.
The kept behavior (a failure goes through to the caller) is still asserted.
Tests added: 75 vitest (buttons 63, tokens 2, avatar 1, tasks 1, task-view 2, home 1, dot-shell 3, playwright
config 2); the event-log and task-events tests now use MAX_EVENT_PAGE instead of the literal 1000.
Floors (.github/test-floors.json): vitest linux 1151 to 1226, win32 1154 to 1229. Playwright stays at 30 (no
spec added). Nothing lowered.
Suites: typecheck; vitest 1229 passed; Playwright 30 passed; engine pytest 2408 passed; dot-agentd go test ok.
The review of 199e8391 and 6b48fb1b left one medium and seven low findings, each checked on the code. Finding -> outcome:
1. (medium) The browser error code to status table had a second hand-kept copy in the scheduler: already fixed by 39ac3052 (IDENTITY_ERROR_STATUS in packages/shared is the one owner, mirrored by protocol.py, parity tested). Checked, nothing redone.
2. GeoIP "rejected without an owner decision": confirmed, and fixed the way the owner decided (prefetch it in the golden image, design B7: a golden digest input). daijro/geoip-all-in-one is now pinned in pins.json by its exact release URL and the sha256 GitHub shows as the digest of the asset (measured: the file downloaded from the pinned URL hashes to it). The host downloads it with the other golden inputs and refuses a file that does not hash to the pin, before it boots anything; the seed carries the archive and GEOIP_TAG, GEOIP_ARCHIVE, GEOIP_SHA256; build-browser-env.sh checks the hash again, unpacks the archive into invisible_core's cache (cache_root()/geoip/<tag>) as dot and fails when the browser's own lookup would not find that file; provision.sh refuses an image whose cache holds another release than the pin. pins.json is part of the digest, so another release is another image, and the manifest records pinned.geoip. The script no longer calls ensure_geoip_mmdb, so a build fetches nothing by itself; the browser smoke fetches the same pinned archive and runs the same script (browser smoke 52 passed, the file landed in geoip/2026.09.30). A pin that upstream deleted answers 404 (it keeps only its latest two releases: measured, 2026.09.16 and older are gone): the build stops and says what to put into pins.json. What stays unpinned is what invisible-playwright itself does at a launch (fetch a newer release, keep the pinned one when GitHub cannot be reached); the README says so. The L2 text that called the file unpinned and unhashed on purpose is gone.
3. The proxy scrub replaced only the literal stored URL: confirmed, fixed at the origin (_scrub of browser.py, which every server answer passes through). The server splits the URL and unquotes the password, so the password alone (as written, decoded, encoded again), the user and the password together, and the Basic credentials of a header are now found with the URL in one pass, longest first, and put out in the redacted form. Tests: the fake MCP server can say each form (proxy_forms, echo_proxy_as); one test per form checks a failed launch, a failed navigate and a read; they all failed before the change. A proxy without a password is left alone. A short password garbles the page text it also occurs in: accepted, written in the code and in architecture 6.
4. A test that asserts nothing (test_a_provider_without_on_terminated_ignores_the_end_of_the_transport): confirmed, replaced by test_a_provider_without_on_terminated_does_nothing_about_the_end_of_the_transport, which checks no reconnect, no new connection, nothing closed, _connections unchanged and no task left running. Checked against a mutation of _transport_ended that starts a reconnect without on_terminated: the new test fails, the old one passed.
5. launch_failed in the scheduler's pass-through: confirmed, and the cause was the table, not the scheduler: no route of the engine launches (list, create, get, delete, frame, close raise none of it), so IDENTITY_ERROR_STATUS named a status no answer carries. launch_failed is out of the shared table and its mirror; browser.py has RouteErrorCode (what a route can fail with) and ErrorCode = RouteErrorCode plus launch_failed (what the model's tools fail with); test_protocol.py checks that the table's keys are RouteErrorCode and that launch_failed is the one code without a status. The scheduler test runs the codes of the table that are not 4xx, now busy, crashed and frame_failed. architecture 5.3 says it.
6. The postgres floor not raised: confirmed. Measured on postgres 18.4 with DATABASE_URL (packages/database packages/events apps/api apps/scheduler): 213 passed, 91 matching \bpg\b, against 205 and 84. Raised to what the job reaches.
7. The prepare-sleep browser budget had no shared owner or test: confirmed. PREPARE_SLEEP_TIMEOUT_MS (60 000) is in packages/shared protocol.ts and is the default of the scheduler's lifecycle and of GuestClient.prepareSleep (two literals gone); protocol.py mirrors it as PREPARE_SLEEP_TIMEOUT_S, tests/repo/vendored-nanobot.test.ts keeps them equal, and test_engine.py checks that STOP_GRACE_S + _CANCEL_WAIT_S + _CLOSE_BROWSERS_ON_SLEEP_S plus a 5 s margin fit inside it (today exactly 60).
8. Doc and smoke wording: confirmed. The sentence of architecture 8.7 is rewritten, and the smoke check label that said "the delete below" before the idle kill says "the idle kill below".
Not findings, left as they are: the four unproven points of the review (idle death with the real server, what the real server echoes of the proxy, a SIGTERM during a prepare-sleep close, the window between the transport end and _close_ended). The scrub no longer depends on what the real server echoes: every form it can echo is hidden.
Removed tests: test_a_provider_without_on_terminated_ignores_the_end_of_the_transport (replaced by the stronger test of finding 4, same behavior); test_every_error_code_of_a_browser_identity_has_one_status of test_protocol.py (replaced by the route-code version of finding 5); the GeoIP check of guest-files.test.ts that required ensure_geoip_mmdb (the script no longer fetches by itself; replaced by the checks of the pinned unpacking).
Tests: engine pytest 2409 -> 2417 (7 scrub, 1 prepare-sleep budget), vitest 744 -> 750 on win32 (2 pins, 3 golden, 1 guest files), go unchanged, engine smoke 214 passed, browser smoke 52 passed. Floors raised in .github/test-floors.json: pytest 2409 -> 2417, vitest linux 741 -> 747 and win32 744 -> 750, postgres 205 -> 213 with \bpg\b 84 -> 91. No floor lowered.
Step W5 of the UI plan (S5): the Chat tab is replaced by a conversation that
shows what the Dot did to answer, and a computer panel beside it, built on what
the SDK offers today.
The page (/dots/<id>/chat)
- The person's messages are bubbles, the Dot's are unboxed markdown with its
face at the first message of a group. Markdown is the existing component:
no raw HTML, links open in a new tab with rel=noreferrer; now also a copy
button on fenced blocks, and an image is drawn as a link to it (a page the
Dot read can make it write any image address, and loading it would tell
that address who is looking).
- Between the messages, the Dot's turn from the event log: each tool.called
that names no task is one quiet line (words from lib/events/tool-labels.ts,
the call's target, duration, and ok/failed/denied/interrupted when it was
not an ordinary success); more than three in a row fold into one line that
opens; a memory.written of such a call is a "Remembered trips/rome.md" chip;
an approval.requested that names no task shows where it was asked and its
answer as a receipt. A step is placed between two messages by event id
(the messages route and the log are two views of one log). Calls and notes
that belong to a task stay in that task's story.
- A working row at the end while the agent thinks, plans or runs a tool, with
the last step of the turn. Live: everything above follows the stream.
- Composer: grows with the text, Enter sends, Shift+Enter adds a line,
focused on arrival, a draft per Dot in localStorage (try/catch, a
convenience), closed with a reason for a disabled or deleting Dot, a hint
when the computer is stopped or starting. A sent message shows at once and
is replaced by the logged one (POST answers its event_id); a refused one
gives its text back; a "queued" delivery says the computer is waking up
until the agent reports.
- Empty state: the goal and three first messages (the last drawn from the
goal) that fill the box and do not send.
- The Dot header gets "Watch the computer" on the chat tab. The panel shows
the desktop (3 s) or one of the open browsers (B8 frame, 2 s) as pictures
read while the page is visible, with LIVE, a warning past 15 s, the words
"The Dot has control. You are watching.", Refresh and Open full size. A
closed browser sends the view back to the desktop, a busy one keeps its last
picture and says why, a stopped computer says so and asks nothing. A column
from 1024 px, a sheet below it; the choice is remembered on wide windows
only.
Where things live
- lib/chat-thread.ts (the thread, steps, folding, pending messages),
lib/chat-view.ts (composer state, suggestions), lib/draft.ts,
lib/event-log.ts (the one function that pages through the event log, shared
now by the chat and the Tasks page; loadTaskEvents is one line over it),
lib/events/tool-labels.ts, lib/use-visible-interval.ts, lib/use-min-width.ts,
components/chat/*, components/computer/*, components/dot/use-ring.ts (the
ring that DotHeader computed inline, now shared with the chat).
- Copied code, each file with its Derived from header and its notice:
AI Elements (Vercel, Apache-2.0) conversation.tsx and tool-status.tsx;
CopilotKit/OpenDots (MIT) tool-labels.ts and use-visible-interval.ts;
open-cowork (MIT, code only) screen-view.tsx; nanobot webui (MIT)
activity-step.tsx. THIRD_PARTY_NOTICES.md gains the AI Elements section
(with the Apache text once) and the open-cowork section, lists the new
OpenDots files, and the nanobot section says which file derives from its web
UI. use-stick-to-bottom (MIT) is the one new dependency.
- A test reads the engine's TOOL_PERMISSIONS and fails when the label map
lacks a tool or names one that is gone.
- ChatTab.tsx is deleted and the old stylesheet rules only it used (.chat,
.messages, .message*, .chat-form) are removed from legacy.css. The Tasks
drawer, which showed raw tool names, now shows the same words (the raw name
is the line's title).
- CONVERSATION_LIST_LIMIT (500) in shared is now the owner of the number
that scheduler.conversation() used as a literal.
Gaps left on purpose, with no fake data and no stub
- The event log has no filter by type or task yet (step U2): the chat reads
the Dot's log page by page from its start (only the chat's event types are
kept) and follows it live. U2 changes the body of readEventLog and nothing
else.
- GET /api/dots/:id/messages answers with the OLDEST 500 messages, so a
longer conversation never shows its newest ones. Fixing the route (the
newest, or paging) is a host change that belongs to the host lane; the chat
says, when the list reaches the limit, that only the first 500 are listed.
- Approvals in the conversation are a line that links to the Dot's approvals
(and a receipt once answered); the inline card with Allow once / Always allow
/ Deny is W6 (S7) and needs U4.
- No "via Telegram/WhatsApp" chip on a message: origin is step H2.
- The memory chip is not a link: the Memory tab (W9) does not exist yet.
- The panel's "the Dot is using this browser now" marker and the URL bar of a
browser frame need the tool target of W8's Browser sub-tab; the panel offers
the open browsers and their frames, which B8 provides.
Tests added: 97 vitest (thread view model, tool-label parity with the engine
table, composer state, draft, event-log paging, visible-interval hook,
format/agent helpers, markdown copy button and image links, the chat page over
FakeControlPlane which now serves messages, screenshots, identities and
frames, the computer panel and screen view, 12 notices checks for the six new
Derived-from files) and 7 Playwright specs (a turn from message to markdown
answer with steps, working row and chip; an approval asked in the chat and its
receipt; the panel with the desktop and a browser opened, busy and closed;
a stopped computer; keyboard and draft across a reload; 390 px with a sheet;
contrast of the bubble in light and dark).
Removed tests: none. One selector changed, not weakened: shell.spec.ts looked
for the header's goal button by /Watch the fares/, which the empty chat's
"Start on your goal: Watch the fares ..." suggestion now also matches; it is
anchored with ^. tasks.test.tsx gained two assertions (the drawer's tool
words).
Floors (.github/test-floors.json): vitest linux 1054 to 1151, win32 1057 to
1154; playwright 23 to 30 on both. None lowered.
Suites: typecheck, vitest 1154 passed (Windows), Playwright 30 passed,
engine pytest 2408 passed, go test ./... ok, next build ok. The smoke was not
run: no engine, guest or image file changed.
Block hostapi review, one finding.
Fixed (medium): GET /api/doctor re-hashed the whole golden image and the
runtime ISO and re-ran the QEMU accelerator probe on every request, with no
cache and no coalescing; the onboarding checklist re-checks and polls, and
concurrent requests stacked up. Confirmed on the code: verifyImage runs
sha256File over each image on every call. Two fixes, each at its owner:
- server.ts: the route runs one report at a time; a request that arrives
while it runs shares its answer. The probe is the slow row.
- doctor.ts: createImageChecks replaces imageChecks and keeps each verdict
for as long as the image and its manifest keep the same size and
modification time, so the hash reruns only when a file changes. The API
server and the CLI both use it; the CLI runs once per command and loses
nothing.
Tests: three concurrent GETs run the probe once and the next one runs it
again (fails before the fix: three probes); the image verdict is computed
once across repeated checks, again when the image or its manifest changes,
failed verdicts are kept with their fix, and no image means no hashing.
Floors: vitest 995 to 1000 on linux, 998 to 1003 on win32 (five tests added,
none removed).
The status of each error code the engine answers on the identity routes was kept
by hand in three places: server.py _IDENTITY_STATUS, a table in the scheduler and a
literal union in the scheduler's test guest, with nothing linking them.
IDENTITY_ERROR_STATUS in packages/shared is now the one owner. protocol.py
mirrors it and server.py answers from that mirror; tests/repo/vendored-nanobot.test.ts
reads the mirror and compares it with the shared table, and test_protocol.py
checks its keys are the codes of browser.ErrorCode. The scheduler passes an
answer through when isIdentityAnswer (code and status together) says it is the
engine's, and FakeGuest takes its fault code and status from the shared table.
Finding (medium, a second hand-kept copy of the browser error code to status
table in apps/scheduler): fixed as described above. The scheduler's frame test
now runs every non-4xx code of the shared table.
Floors raised for the added tests: vitest linux 739 to 741, win32 742 to 744,
pytest 2408 to 2409.
Brings the browser block B1-B8 and its review fixes (browser tools, routes and
health, identity frame and close for the UI, the real invisible-playwright-mcp
in the smoke, the L2 low findings) onto the lane fixes. No migration number
clashes: the browser block adds none (the host's cleanup migrations stay 0008
and 0009 and the engine's store schema version stays 7, set by lane-fixes).
Conflicts and their resolutions:
- invisible_engine_dots/nanobot/dots/permissions.py: both sides added a field to
ToolEntry (lane-fixes: starts_terminal, with tool_starts_terminal; the browser
block: needs_managed_identities and arguments, with tool_arguments) and the
browser block changed the offered_tools signature (managed_identities). Kept
every field and function of both sides, in that order; offered_tools takes
the browser block's signature (lane-fixes did not change it).
- invisible_engine_dots/tests/dots/test_browser_manager.py: both sides fixed the
same test, a launch cancelled once the server has answered. Kept one version:
the wait is on the server's "done browser_open" record (lane-fixes), through
the browser block's single `_until(condition, timeout_s)` helper, which now
also serves the wait for the killed process; lane-fixes' second `_until` and
its `asyncio.wait_for` wrappers are removed.
- .github/test-floors.json: both sides raised floors. Set to the measured
counts of the merged tree (below).
Floors (all raised, none lowered):
- vitest: linux 757 -> 775, win32 760 -> 778 (778 measured on win32; linux is
win32 minus the 3 tests that need a real Windows PowerShell)
- postgres: 220 -> 228, pg-named 93 -> 97 (measured against a postgres 18.4
container)
- go: linux 97 -> 98 (measured in golang:1.26 with --init), win32 61 -> 63
- pytest: 2290 -> 2423
Run on the merged tree: typecheck clean; vitest 778 passed; the pg suites 228
passed; go 63 passed on Windows and 98 on Linux; engine pytest 2423 passed;
web build ok; engine smoke 215 passed 0 failed 0 skipped; browser smoke 52
passed 0 failed 0 skipped. No test was removed.
POST /api/approvals/:id/approve takes { note?, always?: true }. With always, the
Scheduler records the decision, the approval.resolved event and
permissions[<the approval's permission>] = allow in the Dot's config in ONE
transaction (DotsRepository.setPermission is one jsonb statement that touches
no other key, so a PATCH racing with it is not lost), then pushes the config to
the guest like a PATCH does (the push is now one private method shared with
updateDot, which logs dot.updated) before the answer is delivered. An answer
that loses the race for the approval is a 409 and changes nothing. always on a
rejection, a value other than true, and a permission the host does not know are
400s that leave the approval pending. approval.resolved carries always: true.
Surface: SDK approve/reject take a request object (ApproveRequest with always,
RejectRequest; the unused ApprovalDecisionRequest becomes them), the CLI gets
approve --always, the channel hub's host port drops the note parameter it never
passed, the web approvals list follows the SDK signature, the architecture doc
lists the route.
Tests: setPermission (existing key, absent permissions, unknown Dot), the
Scheduler (config changed and pushed, events, 409 idempotent, refusals, a
sleeping Dot pushed on the wake), HTTP, CLI.
No test removed. Floors raised: vitest linux 990 to 995, win32 993 to 998,
postgres 568 to 578 and its pg-named require 227 to 232.
Brings the browser block (engine browser tools, routes and health, the browser seams of the
smoke with a fake and with the real invisible-playwright-mcp, the identity frame and close
for the UI, the launch and navigate fixes, the low findings of the review) into the web
lane, so the UI work builds on the real SDK frames. The merge itself changes no behavior of
either side; the three conflicts, and how each was resolved:
- invisible_engine_dots/tests/fakes/local_computer.py (imports): this lane had dropped
`import os` (the local computer ends a timed-out run with kill_process_group, so nothing
in the file uses os any more); the browser branch added `import base64` for the double's
desktop PNG and kept `import os`. Resolved to `import base64` only: both sides' behavior
stays, and no unused import is left.
- invisible_engine_dots/tests/dots/test_browser_manager.py (the cancelled launch test):
both branches had fixed the same flake, a test that cancelled a launch before the fake
MCP server's process had started. This lane added Env.until_recorded (waits for the
server's record of `browser_open`); the browser branch polled env.calls() inline, in
that test and in start_slow_launch. One correct version is kept: Env.until_recorded,
used by both places, so the wait exists once. The inline polling loops are gone.
- .github/test-floors.json: both sides raised the vitest and pytest floors for their own
tests and this lane added the playwright floor. Every floor is now the measured count of
the merged tree, not a sum.
Floors (measured on the merged tree; nothing lowered):
- vitest: linux 1036 -> 1054, win32 1039 -> 1057 (1057 passed, 0 skipped on Windows; linux
is that minus the 3 tests that drive a real Windows PowerShell, the same difference as before)
- postgres: linux 206 -> 215, pg-parametrized 85 -> 92 (215 passed on PostgreSQL 18.4 with
DATABASE_URL set; no test of these packages is platform conditional)
- go: linux 98 (unchanged, measured in golang:1.26 as a non-root user), win32 62 -> 63
(63 passed, 2 skipped, the two allowed)
- pytest: linux 2275 -> 2408 (2408 passed, 0 skipped, in the engine's python:3.12 container)
- playwright: linux and win32 23 (unchanged, 23 passed)
No test was removed.
The web UI needs the Dot's cron jobs (Memory > Automations) and its tool
table (Dot settings > Permissions and tools). Both are the engine's: the
jobs live in its CronService, the table in nanobot/dots/permissions.py.
The control plane keeps no copy of either, it passes through.
Engine routes (AGENT_ROUTES in shared and protocol.py, equal as the parity
test requires):
- GET /automations lists every job, paused ones too (automations.py shapes
one: id, name, enabled, schedule with only the fields its kind uses,
message, next/last run in milliseconds, last status and error,
delete_after_run, created_at_ms).
- PATCH /automations/:id {enabled} pauses or resumes; a job already in that
state is not touched, because CronService.enable_job moves the next run a
whole interval on. 404 not_found, 400 invalid_automation, and a body with
any other key is refused.
- DELETE /automations/🆔 204, 404, 409 protected for a system job.
- GET /tools: one row per tool of the permission table (tool_table in
permissions.py): name, permission, offered now (what the projection
offers; none before the first config) and the description of the tool's
schema. The AgentServer takes the same CronService object the cron tool
uses (main.py), so what the person sees is what the Dot made.
Host: GuestClient and the GuestApi driver interface get the four calls,
the Scheduler passes them through (a stopped computer is 409
computer_stopped, the guest's refusals keep their code, a flag that is not
a boolean is a 400 before the guest is called), the API serves GET/PATCH/
DELETE /api/dots/:id/automations[/:automationId] and GET /api/dots/:id/tools,
the SDK has listAutomations, setAutomationEnabled, deleteAutomation and
listTools. The wire types (Automation, AutomationSchedule, ToolInfo and the
list answers) have one owner, packages/shared protocol.ts. FakeGuest gets
putAutomation and a small tool table whose `offered` follows the pushed
permissions. docs/architecture.md 5.3, 8.8 and 9.6 describe the routes.
Tests: engine (server routes: list with each schedule kind and a last run,
pause/resume and the idempotent resume, strict body, remove and 404, system
job 409, methods, tool table before and after a config with memory off;
tool_table; the real process serves the jobs of the same service; the
server tests run the cron service as the process does, since a stopped
service replays its action log over every read), shared (route names), guest
client, scheduler (pass-through, bad flag before the guest, 409 and 502), API
over HTTP on both adapters, SDK. The smoke checks GET /tools through
dot-agentd against what the model was offered, GET /automations, and the
404 and 400 refusals (152 passed, 0 failed, 0 skipped on a git archive of
the tree). No test was removed or weakened; the harness and test_server
changes only pass the CronService the server now takes.
Floors raised: vitest linux 982 -> 990, win32 985 -> 993 (993 passed
measured), postgres 558 -> 568 with the pg-named requirement 222 -> 227
(checked against PostgreSQL 18.4: 568 passed, 227 pg-named), pytest 2275 ->
2286 (2286 passed). None lowered.
Block fixes2 review finding (medium): migration 0007 collides again with
lane-host. Confirmed on the code. lane-host's 0cf127c3 added
0007_events_task.sql (the partial index behind the task filter of the events
route), so a merged tree held 0007_events_task.sql next to this lane's
0007_orphaned_secrets.sql, and loadMigrations, which refuses a repeated
number since 67e6fde1, would throw on every migrate and every test that opens
a database. The claim of 67e6fde1 that 0007 and 0008 are the next free
numbers was true when written and is out of date: lane-host's last is now
0007.
Fixed in this lane, the only one this step may touch: 0007_orphaned_secrets
is now 0008_orphaned_secrets and 0008_removed_config_names is
0009_removed_config_names (git mv, content unchanged). They only delete and
rewrite rows that already exist, so they depend on none of 0004 to 0007. The
review's alternative (lane-host's index taking 0009) would have had to be
made in the lane-host worktree. The version lists in repositories.test.ts
and the two constants of stale-data-migrations.test.ts, and architecture
7 and 9.1, name the new numbers. Checked: the union of this lane's
migrations directory and lane-host's (0001 to 0007) loads with loadMigrations
with no repeated number (0001 to 0003, 0004 to 0007 from lane-host, 0008 and
0009 from here).
Tests: the three tests that name the applied versions or the two files were
changed first and failed before the rename, passed after. The shipped
migrations carry unique increasing numbers (database.test.ts) stays as the
guard on the next merge. No test removed or weakened, none added, floors
unchanged. If lane-host adds a migration past 0007 before the merge, the same
guard fails loudly and the later one renumbers.
Suites: typecheck, vitest 760 passed, go test, web build, engine pytest 2290
passed.
Review of the browser block found nine findings; the three high and medium ones were fixed in 6b48fb1b (checked on the code, not redone). The six low ones, each confirmed on the code:
1. Page-tool results and errors were not scrubbed of the proxy (fixed). Only browser_open and the frame scrubbed. The manager's _request is the one place a server answer enters the engine, so it now scrubs there (text, ToolResult errors and text blocks of a list result), and the two scrubs of browser_open and frame are gone. Test: a server that echoes the proxy in a navigate error and a read_text answer shows only the redacted proxy.
2. prepare-sleep gave the browsers 4 s in all (fixed). That budget is what is left of systemd's TimeoutStopSec=30 after the 20 s grace, which only SIGTERM has; the host waits 60 s for prepare-sleep. engine.py now has _CLOSE_BROWSERS_ON_STOP_S = 4 and _CLOSE_BROWSERS_ON_SLEEP_S = the browser_close timeout (30 s; 20 + 5 + 30 stays inside the host's 60), chosen by whether the engine is stopping. The review's second half (state left open when close_all is cancelled) does not hold since 6b48fb1b: the closes are tasks of the manager and the end of the wait cuts none. Test: a slow close finishes under suspend and is cut under stop.
3. The engine's coded 502 browser answers became 502 guest_unavailable (fixed). #guestCall passes busy 503 and now also frame_failed, crashed and launch_failed 502 through, from one table (ENGINE_BROWSER_ANSWERS); a 502 without the engine's code (a silent computer) is still guest_unavailable. The fake guest can fail a frame with a code. Test: each code passes through. Docs: the frame route in architecture 5.3 and protocol.ts say so.
4. A browser process that died while idle stayed open until the next call (fixed). Nothing watched the process. connect_mcp_servers takes on_ended, called when the read stream of a transport ends by itself (the read filter that already wraps it reports the end); MCPProvider with on_terminated passes it, ignoring a server that is not live or a provider that is closing, so a close of ours never reports. The manager closes an open session at once: one task per session closes it and emits closed once, shared by whoever finds out first (the transport, a call, a frame). Tests: the idle death (a kill with no call) closes the identity, frees its slot so a launch closes nothing alive, says not_open, and emits closed once; the read filter reports the end after the messages; the provider reports only a live server. Smoke: a kill -9 of an idle server through the real relay and dot-agentd closes its identity with no call (engine smoke 212 -> 214 with the relaunch check; the event totals of the stream check are now launched 9, closed 6).
5. UPSTREAM.md did not list the on_terminated change of mcp.py (fixed), and now lists on_ended too.
6. The GeoIP database enters the golden image unpinned and unhashed (rejected as a fix, documented). Pinning cannot hold: daijro/geoip-all-in-one is rebuilt weekly and keeps only its latest releases, older tags answer 404 (invisible_core/download.py says so and never pins, for that reason), so a pinned tag would fail every build within weeks, and a launch refreshes the file anyway. It is a data file for the timezone lookup, not code. The image-builder README and build-browser-env.sh now say that it is unpinned and unhashed on purpose, that it is not an input of the golden digest, and that the manifest records which release each build had (the review's own second option).
Changed test: test_a_process_that_died_between_calls_is_found_by_the_next_call_and_by_a_close is replaced by test_a_process_that_dies_while_idle_closes_its_identity_at_once_and_frees_its_slot. Its premise (a death found by the next call or a close) is what finding 4 removes: the death is found when it happens, so a later call says not_open and a later close is a no-op. The death during a call (crashed) stays pinned by test_a_process_that_exited_is_a_crash_closed_once_and_launched_again_only_on_request and the frame one, both unchanged. test_a_browser_that_does_not_close_does_not_hold_the_stop keeps its assertion with the renamed constant. The monkeypatched connect_mcp_servers of test_mcp_provider_connect_propagates_external_cancellation takes the new argument.
Tests: engine pytest 2403 -> 2408 (1 replaced, 1 + 3 + 1 added), vitest 741 -> 742 on win32 (one added), go unchanged, engine smoke 214 passed, browser smoke 52 passed. Floors raised in .github/test-floors.json: pytest linux 2403 -> 2408, vitest linux 738 -> 739 and win32 741 -> 742. No floor lowered.
GET /api/dots/:id/tasks answers with the newest 200 tasks (listByDot's default
limit, no paging in the route), and the Tasks page grouped and paged that cut
list as if it were all of it: a pending task older than 200 newer ones was
missing from the Queue, so the Next and #n positions were wrong, and older
history was unreachable without a word.
Real, and fixing the route (paging or a status filter) is a host-API change that
belongs to the host lane, so this commit does the part that is the web's and
the origin's: the number has one owner, TASK_LIST_LIMIT in shared (the database
default uses it, the page reads it), and the page, when the list reaches it,
says that the newest 200 are listed and that older ones, and the queue places
that depend on them, are not shown. Named gap: paging or a status filter on the
tasks route, then the page's History pages through it instead of a client-side
page over the cut list.
Tests: e2e (fails before: no notice) a Dot with 199 tasks shows none, one with
204 shows it; repositories (both adapters) the default list is the newest
TASK_LIST_LIMIT and a given limit overrides it.
Floors (the tests of this and the previous two commits: 19 notices tests, the
shadcn header ones, 1 repository test per adapter, 4 browser tests): vitest
linux 1016 to 1036 and win32 1019 to 1039, postgres 205 to 206 with the pg
requirement 84 to 85, playwright 19 to 23 on both. The previous commit's message
says 6 notices tests; it is 19. No floor lowered.
input.tsx, textarea.tsx and label.tsx (added in W4) keep shadcn new-york-v4's
structure and class strings and had no Derived from comment, though
THIRD_PARTY_NOTICES.md says each file in components/ui/ says what changed. Each
now has its header, naming what changed (relative cn import, tokens instead of
the dark overrides, no file-input or selection styles, no field-sizing, a plain
label in place of the Radix primitive).
tests/repo/notices.test.ts only checked files that already had a header, so a
missing one passed. It now requires the header on every file under
apps/web/src/components/ui/ and on lib/utils.ts, the files the notice covers:
6 more tests, 3 of which fail without the headers. The vitest floors for them
are raised in the next commit with the others.
DotShell wrapped every tab body in .legacy, the Tasks page included. The legacy
layer sits above Tailwind's base, so for every property a utility does not set
the old rules won: the outline Button had no text color and took the old
button's white (invisible on the light surface, about 1.04:1), lists got their
bullets and numbers back, links went indigo. The role and name queries of the
Playwright specs cannot see any of that.
Fixed at the origin: the scope. DotShell renders its children without .legacy;
each tab that is still in the old design (Approvals, Chat, Computer, Browser
identities, Settings, Timeline) carries the class on its own page, so a page
that moves, and every later W page, is outside it without anyone remembering to
remove a class. The false claim in globals.css (a new component is never
overridden by an old rule) now says what keeps a new screen safe.
Tests (they fail on the previous build): the Tasks page, in light and dark, has
no .legacy element, its lists have no marker or padding, and the Cancel, history
filter (pressed and not) and New task buttons read at 4.5:1 or more against the
surface they sit on, computed in the page from the painted pixels; a tab still
in the old design (Settings) keeps .legacy.
Playwright floor 19 to 22 here (23 with the next commit).
Findings of .local/next/fixes-review.json (severity low), each confirmed and
fixed at its origin, with a test that fails before the fix. The cross-lane
finding about the Playwright harness and `next start` is not here: it is
resolved when the lane-web branch is merged.
- kill -9 of `invisible-dots server` orphans the web child on port 3000 ->
fixed. A child started with startProcess outlives a parent that is killed
outright (confirmed on Linux: the child stays after SIGKILL of the parent;
on Windows libuv's job object ends it, so there the finding did not show).
`webEnvironment` now gives the child the server's pid
(INVISIBLE_DOTS_WEB_PARENT_PID, shared ENV) and the web build's
instrumentation.ts (lib/parent.ts, shared processExists) exits the server
once that process is gone. Checked on the real standalone build: it answers
while the parent lives and is gone 0.4 s after the parent exits. New:
web.test (the pid reaches the child; a stand-in server SIGKILLed frees the
port), parent.test (3 tests).
- The tool calls of a response with no cost still run before the turn fails ->
fixed, not documented away. turns.py now calls spend.ensure_priced() before
the assistant_tool_calls checkpoint as well as final_response, so the calls
are neither written nor run. spend.py and architecture 8.2 say so. New
test_turns case: no cost plus a tool call fails the turn, nothing is
written, no tool.called.
- INVISIBLE_DOTS_WEB_LISTEN: the error cites the API's example, and port 0
passes the parse -> fixed. parseListen takes a ListenSetting (variable,
the setting's own example, fixedPort); serve.ts passes the web setting, so
the error shows 127.0.0.1:3000 and port 0 fails the command before anything
starts. serve.test now uses the real parseListen instead of a copy of its
rule. New: config.test (settings), serve.test (2 cases).
Removed test: web.test "does not start at all when the build is incomplete, or
the port is 0" lost its port 0 assertion, because the refusal moved from
startWebServer to parseListen (one owner of the fact, checked at parse time,
where it now fails at once); the same assertion is in config.test and
serve.test. The incomplete-build assertion stays under its own name.
Replaced assertion: config.test's parseListen(value, "VARIABLE") call, the old
two-argument form, is now the ListenSetting case.
Floors (.github/test-floors.json), raised for 7 added vitest tests, 1 of them
in the postgres suite's files, and 1 pytest: vitest linux 750 -> 757, win32
753 -> 760, postgres 219 -> 220, pytest 2289 -> 2290. Nothing lowered.
The web UI needs a task's own events (the task drawer, the chat's tool
steps) and a read-only view of what a Dot keeps in its home (Files,
Memory notes). Both come from the control plane, so the browser never
talks to a guest.
GET /api/dots/:id/events takes ?types=a,b and ?task_id=. The filter is in
the repository (EventQuery.taskId, data->>'task_id', the one place the
contract puts the task), added to the SQL only when asked for, and served
by the partial expression index of migration 0007_events_task.sql; a test
asserts the planner takes events_task_idx for the query list() builds. A
type name no event has is a 400 (STORED_EVENT_TYPES in shared), so a typo
does not look like a quiet Dot. Scheduler.listEvents takes one filter
object instead of positional arguments.
GET /api/dots/:id/files/list and GET /api/dots/:id/files read through the
guest client, only under /home/dot. The rule is one function,
checkHomePath in shared: absolute, relative or ~ paths are normalized and
any ".." segment is refused rather than resolved, with a 400 invalid_path
before the guest is called. A stopped computer is 409 computer_stopped, the
guest's own refusals pass through with their code, and the guest's file
read is bounded: GuestClient.readFile takes maxBytes and stops reading as
soon as a file passes it (413 file_too_large; MAX_HOST_FILE_BYTES is 16
MiB). The bytes are a Dot's own and the web server answers from the page's
origin, so apps/api/src/file-types.ts serves images as images, source and
markup as text/plain, everything else as a download, always with nosniff,
a sandboxing CSP and no-store; the web proxy now passes
x-content-type-options and content-security-policy on. The SDK gets
events({ types, taskId }), listFiles and readFile; FakeGuest gets a small
file system (putFile) with the real daemon's errors. docs/architecture.md
9.6 describes the routes.
Tests: shared (checkHomePath, stored event types), repository (task
filter, combinations, index use), guest client (limit by announced length,
by running count, error bodies kept), scheduler (filters, path rule before
the guest, pass-through errors, 413, 502), API (filters over HTTP, files
list and read, headers, the 16 MiB limit, 409 and 404, 401), SDK query
encoding, file-types, web proxy headers. No test was removed or weakened.
Floors raised: vitest linux 959 -> 982, win32 962 -> 985, postgres 540 ->
558 with the pg-named requirement 215 -> 222 (checked against a real
PostgreSQL 18.4: 558 passed, 222 pg-named). None lowered.
A run whose time budget is 0 (test_find_files_enforces_time_budget) can time out
after the child has already exited and been reaped. The double then called
os.killpg on a process group that was gone and the ProcessLookupError (Errno 3)
surfaced as 'Error finding files' instead of the budget error. The double now
uses the same kill_process_group the production path uses, which tolerates a
group that is already gone, so there is one owner of that fact.
No test is removed or weakened; the pytest floor (2275) is met: 2275 passed.
The test cancelled the launch after a fixed 0.3 s and then required the fake's
record to end with a clean exit entry. On a loaded machine the cancel could
land before the process had started (empty record), and the SDK ends a server
that is slow to leave after 2 s without it writing an exit entry. Reproduced
in a container with the CPUs saturated: 1 failure in 1 to 4 runs before,
25 of 25 runs pass after.
The test now cancels once the server has answered browser_open, so the launch
is inside its retry loop, and asserts what the contract says: no identity is
open and the server process no longer exists. No test removed, count unchanged.
GET /api/doctor answers the host report of architecture section 11.1 as the
server's own machine sees it: { ok, checks }, the same rows in the same order
as `invisible-dots doctor --json`. The web UI's onboarding screen needs it,
and the report must describe the host the server runs on.
One owner for every fact:
- runDoctor and the checks moved from apps/cli/src/doctor/checks.ts to
apps/vm-manager/src/doctor.ts. The CLI keeps only rendering and the command.
- The wire types (DoctorCheck, DoctorCheckId, DoctorStatus, DoctorAnswer) are
in packages/shared/src/api.ts; the SDK gets client.doctor().
- The accelerator's host side (/dev/kvm, the HypervisorPlatform feature) and
the read-only PowerShell helpers it needs moved from the CLI's setup/install.ts
and setup/powershell.ts to apps/vm-manager (accelerator-access.ts,
powershell.ts). hostAccessDeps() is now the one place that hands this host's
platform over; setup's install steps spread it. tests/repo/platform-branches
and the docs table follow.
- QEMU discovery, free space and the real deps are hostDoctorDeps() in
vm-manager/host-doctor.ts; the images' rows (latestImage + verifyImage) are
imageChecks() in apps/api/src/doctor.ts, used by the API and the CLI alike
(the API now depends on the image builder).
- The OpenRouter row is built by openRouterCheck(configured): the API asks
its Scheduler, the CLI keeps asking the running server's /api/health.
STORE_OPENROUTER_KEY moved next to SETUP_COMMAND in vm-manager errors.ts.
- startServer takes `doctor?: Partial<DoctorDeps>` so tests fake the machine
while the images, the home and the key stay the server's own.
Tests moved, not weakened: the doctor checks tests to
vm-manager/test/doctor.test.ts, the accelerator access tests (and the
PowerShell helper assertions) to vm-manager/test/accelerator-access.test.ts,
the shared fakes to vm-manager/test/doctor-fakes.ts (apps/cli/test/fakes.ts
removed because the fakes live there now). The "any other host is refused"
install test is split in two. No test was removed.
New tests (+10): openRouterCheck, doctorAnswer, locateQemu (2), freeSpace,
hostDoctorDeps, the PowerShell helpers, GET /api/doctor over the SDK, and
startServer serving the report with its own images and key.
Floors (.github/test-floors.json), raised only: vitest linux 949 -> 959,
win32 952 -> 962, postgres 537 -> 540 (pg-named tests 214 -> 215).
Step W7 of the UI plan (S8): the Tasks tab is replaced by a page that shows
what the Dot is working on, live, built on what the SDK offers today.
The page (/dots/<id>/tasks)
- Running: a card per task with the newest task.progress line (it follows each
new report from the stream without a reload), what the task has spent
(the row's spent_usd), how long it has run, and Cancel after a question.
A task waiting for an answer says so and links to the Dot's approvals.
- Scheduled and Queue: a pending task with a time ahead is scheduled; the rest
are listed in the order the dispatcher takes them (priority, then age) with
"Next" and their place.
- History: a table (task, status, finished, took, spent, result or the error as
the Dot gave it) filtered by how the task ended and shown twenty at a time.
- New task is a dialog: the description, the priority by name (Low, Normal,
High, Urgent, mapped to -10, 0, 10, 100), the raw number under Advanced, and
a not-before time. A normal priority and no time send the description alone.
- The drawer has its own address, /dots/<id>/tasks/<taskId> (a layout holds the
list and the task's page is the drawer over it, so opening one does not
reload the list): state, numbers, the result rendered as markdown or the
failure reason, and the task's story from the Dot's event log (created,
started, each progress line, tool calls with their target, approvals with
how they were answered, the end). GET /api/tasks/:id is used for the first
time.
- The newest progress line of a running task is also shown under the goal in
the Dot header, linked to the task (dot-live keeps it per Dot and forgets it
when the task ends or the agent restarts).
Where things live
- lib/task-view.ts (sections, order, priorities, labels), lib/task-form.ts (the
dialog's request), lib/task-events.ts (the log read, progress, the story),
components/tasks/*, components/markdown.tsx (react-markdown with remark-gfm:
no raw HTML, links open in a new tab with rel=noreferrer; chat reuses it),
components/ui/dialog.tsx (shadcn). lib/time.ts and task-status.tsx derive
from CopilotKit/OpenDots TaskPresentation.tsx (MIT, THIRD_PARTY_NOTICES.md has
the section). TasksTab.tsx is deleted; the old stylesheet rules it used are
all still used by the tabs not yet redesigned, so none was removed.
Gaps left on purpose, with no fake data and no stub
- The event log has no filter by task or type yet (step U2), so
loadTaskEvents reads the Dot's log page by page from its start and keeps the
events of tasks. It runs only once a task is running or open. U2 changes the
body of that one function and nothing else.
- The inline approval card inside a waiting task (S7) belongs to W6; until then
the card links to the Dot's approvals.
- Tool calls in the drawer are named as the engine names them; the friendly
label map (CopilotKit ComputerToolCard) arrives with W5.
- assistant-ui's task-card.tsx is not in the reference clone (the package is
installed from its registry, only the docs demo is), so the card is written
here from its documented states; no assistant-ui code is copied and no notice
entry is added for it.
Tests added: 70 vitest (64 in apps/web: time, task view model, task form, task
events and story, dot-live progress, markdown, the Tasks page, dialog, cancel,
history and drawer components over FakeControlPlane, which now serves tasks and
the event log; 6 are the notices checks of the three new files with a Derived
from header: dialog.tsx, time.ts, task-status.tsx) and 5 Playwright specs (live progress line from the fake
guest to the history and the drawer by its address, cancel, a failed task's
reason, queue and scheduled order, 390 px). No test removed. One selector of
e2e/shell.spec.ts changes because the page changed: the New task heading
became a button of that name, so the tab-body check looks for the button.
Floors raised: vitest linux 946 to 1016 and win32 949 to 1019, playwright 14 to
19 on both.
Review of the browser block found three problems. All three were real.
1. PUT /config, host close/delete/create blocked on the manager lock
during a launch (fixed). launch held the lock across the browser_open
wait (up to 900 s), and set_limits, create, delete and close queued
behind it, so the host's 30 s guest timeout turned a slow launch into
502 guest_unavailable (and a retried POST made a duplicate identity).
The manager now has no lock around a browser: a session is opening,
open or closing, each move is a task of its own, and the decisions
(reserve a slot, pick the least recently used to close) are made in one
step with no await. set_limits is synchronous and returns at once: the
excess closes run in the background and no longer count as open from
that call on. Only create keeps a lock (its count check and insert are
apart by the directory it makes). A delete marks the identity gone for
every caller before it closes the browser and removes the directory.
A launch that is cancelled still stops its own process before it
returns. A close that raises is logged and the process is ended anyway,
so an identity can never be stuck closing. engine.apply_browser_limits
is synchronous with it. Kept as tested: a delete or close of the
identity that is opening waits for that launch, then closes what it
opened. New tests: a launch in flight holds up no config change, close,
delete or create of another identity (manager and PUT /config over
HTTP); a lower max_open answers at once and closes in the background;
it also closes a browser that is still opening; two launches of one
identity share one process and one outcome; a launch of an identity
being deleted is not found; a close that raises. Changed assertion: the
server test of a lower max_open now waits for the closed event, which
comes after the 204 by design.
2. browser_navigate accepted file:, about:, view-source: (fixed). The
pinned server calls page.goto(url) unchecked, so navigate plus read
returned any file dot can read, whatever files.read said. The one tool
row now carries a refusal: only ^https?:// is sent, anything else is an
error result and the server sees no call; the schema carries the same
pattern for the model (one constant). A press_key route to the URL bar
does not exist: the server presses keys on the page, not the browser
chrome. The tool table of the architecture says so. The fake MCP server's crash
trigger moved from crash://now to https://crash.test/now, in the two
tests that used it, because the tool now refuses other schemes.
3. The proxy password was on the relay's command line (fixed in the
code, documented where it is accepted). /proc/<pid>/cmdline is readable
by every user, and the doc said the model cannot read the proxy. The
relay has a new --env-from NAME: it reads the value from its own
environment (readable by its owner only) and forwards it. The Computer
takes secrets by name in relay_argv and by value in spawn_env, and the
manager passes the proxy that way. What Q11 accepted stays and is now
written in architecture section 6: the dot user, and so the model
through exec, can read the proxy from the browser's environment. The
relay-order test no longer lists the proxy among the --env pairs (it
is in env_from by design). New: Go test of the flag and of the lookup
(an unset variable is exit 2 and the refusal never echoes a value),
Python tests of the argv and of the environment path, the fake relay,
and a smoke check that the password is on no process command line with
a positive control on the relay's own flag.
Floors raised for the added tests: pytest 2382 to 2403, go 97 to 98 on
Linux and 61 to 62 on Windows. No test of kept behavior was removed.
Block review finding (medium): migration number clash with lane-host. Confirmed on the code. lane-host already holds 0004_channels, 0005_channel_prompts and 0006_inbound_by_event (e90c4650 and later), so a merge left 0005_channel_prompts and 0005_orphaned_secrets, and 0006_inbound_by_event and 0006_removed_config_names, side by side. The migrator sorts by full file name, so it would have applied both, but the rule of design section 5 (the step that lands earlier takes the next free number) was broken, and the commit text of 14bf175f ("0005 and 0006, not 0004") was already out of date. The review's suggested 0006 and 0007 are not free either, because lane-host's 0006 exists: the next free numbers past lane-host's last are 0007 and 0008.
Fixed at the origin:
- 0005_orphaned_secrets is now 0007_orphaned_secrets and 0006_removed_config_names is 0008_removed_config_names (git mv, content unchanged). The migrations only delete and rewrite data that already exists, so they do not depend on 0004 to 0006.
- loadMigrations refuses two files that carry the same number, naming both. Two branches that each took the next free number now fail where the migrations are loaded (every migrate, every test that opens a database), not by accident of string order in production.
- The list of applied versions in repositories.test.ts, the two constants of stale-data-migrations.test.ts and architecture 7 and 9.1 name the new numbers. stale-data-migrations.test.ts compares `file.version < version` as strings, which is the numeric order now that the numbers are unique and four digits wide.
Tests (database.test.ts): the shipped migrations carry a number each, in increasing order (passes before and after, it is the guard on the next merge); loadMigrations refuses two files with the same number (failed before the change: it loaded both). Checked by hand that the union of this branch's migrations and lane-host's (0001 to 0006) has no repeated number.
No test removed or weakened. Floors: vitest linux 748 to 750 and win32 751 to 753, postgres linux 217 to 219 (the two new tests, measured: vitest 753 passed on win32; the pg suite 219 passed against postgres:18.4 with 93 pg-named tests, unchanged).
Suites: typecheck, vitest 753 passed (one earlier run failed the guest-client test "ends the stream when nothing listens on the guest port", a port-reuse flake under full-suite load that passed 3 of 3 alone and on the rerun), pg suite 219 passed, go test, web build, engine pytest 2288 passed (one run failed test_browser_manager "a launch that is cancelled", a timing flake under load that passed twice alone: 40 passed).
Review findings of the channels block, all three confirmed on the code.
1. high, FIXED. A channel message was stored by Scheduler.sendMessage and its
idempotency key by a second statement (channel_inbound.recordInbound), so a
failure between the two (kill -9, a lost connection) made Telegram offer the
update again and the Dot got it twice. The test that claimed to cover it
asserted before the redelivery landed and only passed by timing. Fixed at the
origin: the user.message event already carries binding_id and external_id, so
the event log is the one owner and a unique partial index
events_user_message_origin_key (dot_id, binding_id, external_id) makes the
insert itself the key (migration 0006, which drops channel_inbound).
sendMessage stores the message and its queue row together, or finds the first
one and answers the repeat with it. Deleted with the table: recordInbound,
inboundMessageId, pruneInbound, the hub's prune timer and the
inboundRetentionDays limit (a key kept with the event needs no retention).
Test: "hands a message to the Dot once when the failure comes after it was
stored" stores the message through the real Scheduler, fails after COMMIT,
waits for the redelivery and the answer, lets the hub go quiet, and asserts one
user.message, one echo and one delivery to the guest. It fails without the
index (2 user.message rows). Also added: the Scheduler repeat, and the events
store on both adapters (same id on another binding or another Dot is a new
message). The restart test of the hub passes unchanged.
Removed because the feature no longer exists: the database test "an inbound
message is recorded once by its channel id, and old records are pruned", the
hub test "forgets handled messages older than the retention at start", and the
channel_inbound row counts in the stranger tests (the event counts they sit
next to still prove nothing was written). telegram.ts and architecture 5/9.8
no longer say "nothing runs twice" about a mechanism that did not hold.
2. medium, FIXED. A WhatsApp session still open when its Dot is deleted could
write its keys back as orphan secrets, because the hub stops the runner after
the dot.deleted event and secrets has no foreign key to dots. The adapter now
writes through ChannelSecrets.putAll (BindingSecrets), a transaction that
first takes a key share on the binding row (ChannelsRepository.holdBinding): a
delete of the binding waits for it, and once the binding is gone the write is
refused with ChannelGoneError. Test: "goes with the Dot" opens a real
AuthStore over the hub's secrets, writes keys, deletes the Dot, fires keys.set
and saveCreds after the delete (both refused), and asserts every name of
type.secretNames and every row of the Dot's scope is gone. It fails without
the hold. Residual: a write already inside its transaction while the delete
statement is running can leave one new row, because the delete's secrets part
reads its snapshot at the start of the statement; the session is closed right
after, and that is the only window.
3. medium, FIXED. AuthStore.#flush wrote the credentials and each dirty group
with separate puts, so a crash could leave them a step apart and force a
relink. It now builds one batch and writes it with a single putAll
transaction; a failed write puts all of it back as dirty. The "a step apart"
caveat is gone from the file header and architecture 9.8. Tests: the
credentials and the groups of one flush are one batch, and a failing write
writes none of them.
Floors raised for the added tests: vitest win32 951 to 952, linux 948 to 949,
postgres 535 to 537 with 214 pg tests (measured on postgres 18.4).
S2 and S3 of the UI design, built on what the SDK offers today.
Home (S2) is a card per Dot: avatar ring, name, goal (two lines), the status chip with the recorded reason beside an ERROR, the model, spend today (the existing CostPill), the approvals that wait (linked to the Dot's approvals), Open chat, and the computer's power menu (the existing PowerMenu, with its confirm while a task runs). Search appears above six Dots. The empty state invites the first Dot. The cards read the Dots and the live state from the shell, so there is one owner of the list.
Create a Dot (S3, /new) is a three step form on one page (Identity, Brain, Computer and safety) with sliders inside the schema's bounds, the idle timeout, the Careful / Balanced / Autonomous presets, the cost cap and the optional summary model; or the same config as YAML, with the form refusing to take back YAML that sets what it has no control for instead of dropping it. The shared schema is the only judge: lib/dot-form.ts maps its issues onto the controls, and a name another Dot has is refused at once. A preflight panel shows the control plane, its database and the OpenRouter key. Submit is POST /api/dots, then the Dot's chat opens.
One owner of the bounds: packages/shared exports CONFIG_BOUNDS (cpu, memory, disk, idle timeout default, cost cap) and the schema takes its numbers from it, so a slider can never offer what the API refuses (test in packages/shared). Also: TONE_CLASS and taskRunning moved out of DotHeader into the one place both it and the cards read; the Rail's New Dot goes to /new; DotsPage.tsx and EXAMPLE_CONFIG (its only user) are deleted, the example stays as the fixture of the yaml round-trip test; new Input, Textarea and Label primitives and an ErrorAlert in the new design.
Gaps left on purpose, with no fake data and no stub:
- Last activity on the card: no route returns the newest event (GET /api/dots/:id/events only reads forward from a cursor), so it waits for the host API.
- Preflight shows what GET /api/health reports. The host checks and the golden image (step U1) and a link to the key's fix (step W3, the settings page) are more items of lib/preflight.ts when they exist.
- Spend today comes from the existing usage route; nothing else is shown for cost.
- The setup checklist of the empty Home belongs to W3.
- The model suggestions list holds the one id the repository itself names (z-ai/glm-5.3-flash); any OpenRouter id can be typed.
Tests added: 67 vitest (packages/shared 2, apps/web 65: presets, form model, preflight, card model, Home and create-page components) and 6 Playwright specs (create by form, create from YAML, name validation, Home cards and power, live Home, 390 px). No test removed. Floors raised: vitest linux 879 to 946 and win32 882 to 949, playwright 8 to 14 on both. Two selectors of e2e/shell.spec.ts are tightened, not weakened: the wrong-token alert is found by its text (Next's route announcer is also an alert once an earlier spec has navigated), and the rail's Home link by its exact name (a Dot named home-card matched it).
test_a_launch_that_is_cancelled_leaves_nothing_open_and_the_next_one_works failed
intermittently on a loaded machine with the fake MCP server's last record 'done'
instead of 'exit'. Two timing assumptions were behind it:
- The test cancelled the launch after a fixed 0.3 s sleep, whether or not the fake
server had started. It now waits until the fake has recorded the browser_open call,
so the cancel always lands inside _open_browser (Env.until_recorded).
- When the answer to the cancelled browser_open arrives while the SDK closes the
session, stdio_client's stdout reader raises BrokenResourceError, its task group
cancels the graceful wait and the process is killed before it can record an exit.
The product still ends the process (the invariant the behavior promises), so the
test now asserts that the process is gone (its pid no longer exists) instead of
that it exited gracefully. Reproduced 1 in 5 under CPU load before the change;
40 of 40 runs pass under the same load after it.
No test was removed or weakened in what it protects: nothing is left open and the next
launch works. No test was added, so the pytest floor (2275) is unchanged.
invisible-dots server now starts the built web client next to the control plane, so a first run is one command and one terminal instead of two.
- The web build is a Next standalone server (output: standalone); apps/web/scripts/standalone.mjs copies the browser files beside it, which Next leaves out. The unused 'next start' script is deleted: the server is the one entry point.
- apps/cli/src/web.ts runs it as a child with 'node' on INVISIBLE_DOTS_WEB_LISTEN (default 127.0.0.1:3000), pointed at the control plane, with an allowlisted environment (no DATABASE_URL or other secrets; the token is read from api.token by the web server itself). It refuses a port something already answers on, waits for the first answer, and kills the child at process exit.
- apps/cli/src/serve.ts orders the lifecycle: signal handlers are installed before the web client starts, a stop closes the web client first and ends a start in progress, and a web client that cannot start or later exits is logged while the control plane keeps running. 'server --no-web' skips it.
- doctor gets a 'web client' check (built, or missing with the build command) and setup lists the build among the next steps.
- runServer is deleted: the CLI composes startServer and untilStopSignal itself; the api exports serverLogger for the one logger the process uses. parseListen names the setting it parsed in its error. INVISIBLE_DOTS_WEB_LISTEN and INVISIBLE_DOTS_WEB_ALLOWED_HOSTS move to the shared ENV, the one owner of environment names.
- README quick start and architecture sections 9.7, 11 and 11.1 describe it.
Tests: web.test.ts (11, real child processes), serve.test.ts (7), doctor (+1), setup (+1), parseListen (+1 assertion). Removed tests: none. Changed expectations: the doctor report counts 10 checks instead of 9 and lists 'web' before 'openrouter'; the fake host records the new --no-web option.
Floors: vitest linux 728 to 748, win32 731 to 751 (751 passed here on Windows). No floor lowered.
The previous commit added the checks to both suites; the README lists what each
suite pins. Correction to that commit's message: the browser suite was run after
it, on a git archive of that commit, and passed (52 checks, 0 failed, 0 skipped)
with the real window's frame a 1280x669 JPEG; the engine suite passed with 211
checks, 0 failed, 0 skipped.
WhatsApp becomes the second channel of the hub, as an explicit opt-in adapter
over Baileys (7.0.0-rc14, pinned exactly), after the owner's decision to take
Telegram first and Baileys next (Q3). It is off unless the server is started
with INVISIBLE_DOTS_WHATSAPP=1: otherwise the type does not exist, GET
.../channels lists only the kinds the server runs (`available`) and linking is a
400 that says how to turn it on. It is not an official way to use WhatsApp and
the account can be banned; README, architecture 9.8 and the CLI say so.
Adapter (packages/channels/src/whatsapp-baileys/)
- port.ts: what the channel needs of a connection. baileys.ts is the only glue
(types plus one dynamic import() when a connection opens, so a server that never
links WhatsApp never loads it); FakeWhatsAppConnector implements the port for
tests. whatsapp.ts holds the decisions, tested against the fake.
- auth-state.ts: Baileys' AuthenticationState over the encrypted secrets of the
Dot, one secret for the credentials and one per key group (a Record over the
library's own group list), written in order before Baileys is told, never
plaintext files, never sent to the guest, deleted with the channel and the Dot.
- Who is who: the phone number when known (address, twin address, or what the
account learned, locally), else the LID, so one person is one peer. Reply-only:
nothing to a chat that did not write first, no groups, no own messages, no
attachments; a stranger gets no reply, no read receipt, no typing; a read
receipt, a typing indicator and a short pause go before each send.
- Approvals in words: the prompt ends with `Reply "yes ap-xxxxxx" ...`; the hub
reads exactly that from a paired owner (ChannelCapabilities.approvalByText) with
the same checks and the same resolveApproval as a button. A bare yes is a message.
Hub and host
- ChannelHub.link/watchLink/kinds, LinkSessions (the code to scan lives in memory
only: not stored, not logged, not an event), ChannelSink.linkCode, ChannelType
scanned/scrubNames/pairingMessage, create() gets put/delete on the secrets.
- Routes POST .../whatsapp/link (202) and GET .../whatsapp/qr (SSE of
ChannelLinkFrame, no-store), the SSE framing of /api/stream moved to one helper.
SDK linkWhatsApp/whatsappLink/channelsOverview. CLI `channel link whatsapp`
(risk text, QR in the terminal, --json frames).
- A binding that needs its person is no longer started when the server starts:
connecting with what is known to be refused only gets it refused again, which
counts against a WhatsApp account.
- ChannelRecord.bot_username is renamed `account` (it now holds a phone number
too); ChannelPairingAnswer gains `message` (what to send to pair).
- ApprovalsRepository.endingWith, ChannelsRepository.setStatus can clear the
account. No migration: the kind column already allowed 'whatsapp'.
License: Baileys depends on libsignal, which is GPL-3.0. Nothing of it is in the
repository, and the command bundle now leaves baileys out (external in
apps/cli/scripts/build.mjs), so no build of ours embeds GPL code; a test keeps
that, and THIRD_PARTY_NOTICES.md and the README say what it means.
Tests (new): whatsapp.test.ts (channel on the fake: identity, policy, sending,
how a connection ends), hub-whatsapp.test.ts (linking, pairing, talking, strangers,
approvals in words, status), whatsapp-auth.test.ts (the state on real encrypted
secrets with the real Baileys helpers), baileys.test.ts (message reading over
Baileys' own protobuf, close codes, a socket that cannot connect), apps/api
whatsapp.test.ts (routes, SSE), SDK and CLI tests, LinkSessions, the reply words,
repository tests, tests/repo/whatsapp-optin.test.ts (exact pin, one glue file, lazy
import, out of the bundle). The real WhatsApp network is not reached by any test.
Removed tests: none.
Existing tests changed, none weakened: bot_username -> account (hub, hub-telegram,
api, cli, sdk); the Telegram test sink and FakeChannelType gained the new members
(linkCode, scrubNames, approvalByText, pairingMessage); the CLI usage-error
assertions name `link` ("use add, link, list, pair or remove"); the CLI pair
fixtures carry `message`. Two hub tests were racy on pg (a status row is written
before its event; the deep link needs the account the channel reported) and now
wait for the condition they assert.
Floors (.github/test-floors.json), raised for the added tests: vitest linux
851 -> 948, win32 854 -> 951; postgres min_passed 405 -> 535 and the pg require
167 -> 213. No floor lowered.
The UI's browser view needs to look at an open identity and to close it
without asking the model to. Two engine routes and the host path to them:
- GET /browser-identities/:id/frame answers the JPEG of the identity's window,
taken with the MCP server's browser_watch. It is a look, not a use: it does
not move the identity in the LRU order, does not touch last_used_at and never
reopens a browser the server lost (409 not_open), so browser.identity.launch
alone still decides whether a browser starts and a page polling every two
seconds cannot keep one open. It waits at most 5 s for the call in flight on
the identity and then answers 503 busy; a server that cannot give a frame is
502 frame_failed.
- POST /browser-identities/:id/close ends the browser through browser_close, as
the model's close does, and keeps the profile; closing a closed identity is a
204.
BrowserManager.frame is the one place that does it (the identity lock, the
result decoding); split_result moves from browser_tools.py to browser.py, where
the manager needs it, instead of being imported back. AGENT_ROUTES gains
browserIdentityFrame and browserIdentityClose in packages/shared; protocol.py
names the two actions and the repository parity test checks them against it.
The scheduler (through #runningGuest, so 409 computer_stopped), the guest client,
the API routes and the SDK (getIdentityFrame, closeIdentity) follow. The
scheduler passes the engine's 503 busy through as itself instead of turning it
into a 502 "did not answer", and the API does not log it as a failure.
Tests at each layer: the manager (frame, no LRU use, closed/unknown, busy, a lost
browser is not reopened, frame_failed, a dead process), the engine routes (JPEG
and headers, 409/404/503/502, close idempotent, methods and paths), the guest
client, the scheduler, and the API with the SDK against the fake guest, which now
serves a JPEG for an open identity and can launch one. The smoke checks the real
routes: the fake-MCP suite (frame, 409, 404, host close of an open identity, the
event counts) and the real-browser suite (a JPEG of the real window, 409 after
the model's close). The browser suite was not run here (it downloads the
engine); the fake-MCP suite was.
architecture.md: the two routes in 5.3, the new error codes and the rule that the
engine has no launch route, the two API routes.
Removed tests: none. Floors raised for the added tests: vitest linux 734 -> 738,
win32 737 -> 741; pytest 2368 -> 2382. Go unchanged.
Review of the engine block (findings L1, C1/E5 and H1). Both are data written before a rule existed that the new code does not clean up; each is confirmed on the code and fixed by a migration, with a test on a database that holds the old data.
C1/E5, stored Dot configs that name what the schema no longer knows (fixed). `dots.config` is jsonb that is never parsed again on its way to the guest (lifecycle.ts pushes toRuntimeConfig(dot.config), which spreads `models` as stored). Since the summary-role commit the engine refuses a config with any role but `summary`, so a Dot stored with `models: {fast: ...}` (the old example of the docs) got its PUT /config refused, and since the permission commit a stored `web.fetch`, `web.search`, `subagents`, `message.send` or `memory.write` made every updateDot fail in parseDotConfig until the person removed it by hand. Migration 0006_removed_config_names removes the roles other than summary and those five permission names from every stored config and touches nothing else. Test (on pglite, and on pg when DATABASE_URL is set): a Dot with three roles and five removed names plus a kept `files.write`, a Dot with only a removed role, a clean Dot and a Dot with no models or permissions at all; each ends as the schema accepts it (parseDotConfig and the runtime config's round trip), the clean ones byte for byte as they were, and the run is applied once.
H1, secrets orphaned by earlier Dot deletions (fixed). The commit of Dots.delete removing a Dot's secrets in the same statement fixed future deletions only (81e519a3 deferred the rest); the rows of Dots deleted before stayed, an encrypted OpenRouter key among them. Migration 0005_orphaned_secrets deletes every secret whose scope is neither `global` nor the id of an existing Dot. Test: a global key, a live Dot's key and two secrets of Dots that do not exist; only the first two remain.
Numbering: 0005 and 0006, not 0004, because lane-host's channel hub takes 0004_channels. The two migrations do not depend on the order among them or on 0004 (they only delete and rewrite data that already exists), and the migrator records each by its own name, so any merge order applies both. The version lists of the migration test in repositories.test.ts and architecture 7 and 9.1 name them. No test removed or weakened; the one list of applied versions grew by the two names.
Floors: vitest linux 722 to 728 and win32 725 to 731 (6 tests), postgres linux 205 to 217 and its pg-named tests 84 to 93 (the measured counts of a run against postgres:18: the 6 tests ran on pglite and pg, plus 3 that the older floor had not been raised for). Suites run: vitest 731 passed on win32, postgres run 217 passed with DATABASE_URL on postgres:18, typecheck, web build, go test.
Review of the engine block (finding L1, E6/E7). Design 4.5 has the UI show a Dot's tty sessions as "Started a terminal session: python3", but tool.called carried only the first line of the command, so a client could not tell `exec` with `tty` from a plain `exec`. Confirmed on the code (targets.exec_target returned the command and nothing else) and fixed at the origin as a field of the contract, not as a prefix inside `target`: `target` is what the call acted on, a prefix would be a second fact parsed out of a string, and a command can start with any text.
`tool.called` gets an optional `tty: true` (events.ts type and schema, the same shape as `interrupted`; the schema strips unknown keys, so without it the host would have dropped the field silently). The engine: ToolEntry.starts_terminal in the permission table, the one place that states what of a call may be shown (exec: `tty` is true; no other tool starts one), permissions.tool_starts_terminal, ToolIntent.tty stored with the intent at before_execute_tool (dots_tool_intents.tty), written by the outbox into the event, and left out when false. SCHEMA_VERSION 6 to 7 (the engine opens only a file of its own layout; no engine of an older layout has run on a real Dot). Architecture 5.4 lists the field.
Tests that fail before the fix: test_permissions (only exec with tty true starts a terminal; a string, false, another tool or odd arguments do not), test_store (the intent keeps tty, default false, first start kept), test_transcript_outbox (the event carries tty and the target, and leaves the key out otherwise), test_turns (an exec with tty reports tty true and its command, the next one without it reports none), events.test.ts (the host schema keeps tty true and refuses false and any other value). Smoke: the tty exec of the run is reported with tty true and its command, and no other call of the stream says tty.
Floors: pytest linux 2284 to 2289 (measured), vitest linux 721 to 722 and win32 724 to 725. Suites run: engine 2289 passed, vitest (typecheck clean).
W2 raised the vitest floors to 884 (win32) and 881 (linux) on the claim
of 146 added tests; the real gain over the 738 (win32) and 735 (linux)
of W1 is 144, so the win32 run of 882 passed was refused by test-guard.
The floors are now 882 (win32) and 879 (linux; the new tests are
platform independent, so linux keeps its 3 fewer passed tests, the
Windows PowerShell ones it skips). Nothing is lowered below what the
suite really reaches; the engine and playwright floors are unchanged.
Review of the engine block (findings L1, spend part). Of the three spend findings, two are fixed and one is rejected with the bound written down.
E3, a missing cost did not always fail closed (fixed). The "no cost" note lived on the TurnSpend instance and was read only by check(), which runs before a request. So when the response with no cost was the last one, the answer was delivered and the task completed with its spend undercounted, and a kill -9 after an unpriced response forgot the note, so the resumed turn carried on as if the response had been metered. Now: (1) the note is a column of the same dots_spend row as the money (`unpriced`), written in the same transaction as the ledger entry (store.note_unpriced / has_unpriced), and it goes where the row goes (the chat's answer takes it); (2) TurnSpend.check reads it from the ledger, no instance state is left; (3) TurnSpend.ensure_priced runs in the turn's commit callback before a final_response is written, because that write is what delivers a chat answer and completes a task (a check after the runner returned would come too late: message.assistant and task.completed are already in the outbox). A turn whose last request had no cost therefore ends as `stopped: OpenRouter reported no cost for a request, ...` and the answer is not delivered, as Q12 of the plan decided. SCHEMA_VERSION 5 to 6 (the engine opens only a file of its own layout; no engine of an older layout has run on a real Dot). Architecture 5.4/8.2 and the module doc say so.
E3, failed streamed requests are counted as free (rejected as a code change, documented). OpenRouter reports the cost in the last chunk of a stream, after the finish_reason chunk. A stream that stalled or was cut after tokens were streamed has no cost figure anywhere in what the provider received, and chat_stream_with_retry hands the meter only the last response of up to 4 attempts, so there is nothing to keep on the error response and no cost to count for the attempts the retries went past. A usage chunk without a finish reason would be a provider that breaks the stream protocol. Counting it would need a billing query per failed attempt, which is a new feature, not a fix. Architecture 8.2 now states the bound: the cap can be exceeded by partial streams, each at most the cost of one full response, 4 attempts a request.
Tests that fail before the fix: test_store (note_unpriced / has_unpriced: kept per session, not cleared by later spend, taken by the chat's answer, not by a task event, there after the file is opened again), test_spend (a restarted turn's check fails on the note; ensure_priced fails on it and not on a priced answer that crossed the cap), test_turns (a final answer with no cost fails a task turn without writing task.completed, and a chat turn without writing message.assistant, and leaves the note in the ledger).
One stand-in corrected, no test weakened: test_main's FakeOpenRouter answered with a usage that had no `cost`, which only passed because the last unpriced answer used to be delivered. It now reports a cost like OpenRouter does (0.0125) and the test asserts that spent_usd, where it asserted 0.0.
Floors: pytest linux 2275 to 2284 (the measured count, 9 tests added). Suites run: engine 2283 passed 1 failed on the full run, the failure being test_browser_manager's timing test of a cancelled launch (asserts the fake MCP's last record after a fixed 0.3 s sleep; it passes alone, 40 passed, and in the run before; not touched here).
The Dot's browser had only been run against a stand-in. A new suite of the smoke
(run.sh --suite browser, the browser-smoke job of CI) runs the real
invisible-playwright-mcp and its Firefox, as the golden image builds them and as
the Dot runs them, so the relay as a stdio transport, the profile lock after a
kill -9 and the screenshot path are proven against the real server.
What it does, in one ubuntu:24.04 container: installs the apt packages of
pins.json, builds the browser with builder/build-browser-env.sh on the hashed
mcp-requirements.lock, starts the runtime disk's own dot-desktop script (Xvfb and
XFCE on :0 as dot), runs dot-agentd and the engine under their two users with no
stand-in for the browser, and has the stand-in model drive pages served from the
container. Checks (50): the server and Firefox run as dot with the profile, the
display and none of the engine's variables nor the key, nothing of the browser as
dotengine; navigate, read text and snapshot reach the model; a screenshot reaches
the next request as a real PNG of the page and the engine's database keeps only
the placeholder; a 2 MB screenshot of random pixels crosses the relay whole;
GET /v1/screenshot shows the page in the desktop; the seed file is identical
after close and relaunch and after kill -9 (which leaves a stale profile lock the
next launch lives with); what a page stored in localStorage survives the model's
close and SIGTERM; the key is in no file, process environment or log; the event
stream is gap-free and holds each identity event.
One owner per fact: the build of the browser moves out of provision.sh into
builder/build-browser-env.sh (the way build-engine-env.sh is the engine's), carried
on the builder seed (BROWSER_BUILD in pins.env, an input of the golden digest) and
run by both provision.sh and the smoke. The same script now fetches the GeoIP
database after the engine (owner decision: prefetch in the golden image), so a
Dot's first launch downloads nothing; provision.sh records its release as the
geoip-database component of the manifest. The smoke's shared part (the guest laid
out as install.sh does, the daemons, the key and config push, the event helpers) is
now guest/image-builder/test/smoke/lib.sh, sourced by smoke.sh and
browser/smoke.sh; prepare-engine.sh makes the golden image's users and, for the
browser suite, installs the apt packages and builds the browser. dot-agentd now
starts with its unit's DISPLAY and PATH, and the engine with its unit's DISPLAY.
A new image-builder test pins the owner's rule that the only browser of a Dot is
invisible-playwright-mcp: no other browser, headless browser or browser library
among the apt packages, the MCP lock or the build scripts (with a test that the
check refuses chromium, firefox, selenium, playwright and the like and lets
invisible-playwright through).
The engine smoke's key sweep of process environments read nothing of the other
users' processes (a container's root has no CAP_SYS_PTRACE, so the grep skipped
them without a word); lib.sh's environ_holds now sweeps once as each user, in both
suites.
Deferred to B8: the check that the identity frame route answers a JPEG, because
the route does not exist yet.
Tests: guest-files.test.ts rewrote the two assertions about provision.sh
installing the MCP environment onto build-browser-env.sh (same behavior, the
script owns it now) and added the GeoIP, no-other-browser and script-list ones;
seed.test.ts and golden.test.ts cover the new seed file and digest input;
engine-smoke.test.ts covers lib.sh, the browser suite, the new job and the gate.
No test was removed. Floors: vitest linux 723 -> 734, win32 726 -> 737; pytest,
postgres and go unchanged.
Suites: vitest 737 passed (win32); typecheck ok; pytest 2368 passed; go ok;
engine smoke 206 passed 0 failed 0 skipped; browser smoke 50 passed 0 failed 0
skipped.
Step W2 of the UI plan. The presentation layer of apps/web moves to
Tailwind CSS 4 with shadcn/ui primitives and lucide, over the data layer that
stays (SDK client, SSE hub, useResource); every signed-in page now sits in one
frame, and the browser tests have a harness.
Stack and tokens
- Tailwind 4 through PostCSS (next build stays on webpack), tw-animate-css,
radix-ui, class-variance-authority, clsx, tailwind-merge, lucide-react,
sonner; Playwright as a dev dependency.
- src/app/tokens.css is the one owner of color, radius and typeface, a light
and a dark set; globals.css maps it into Tailwind (`@theme inline`) and
clears Tailwind's default palette, so a utility can only be a token.
test/tokens.test.ts reads the file and checks every text and surface pair
for WCAG AA and every drawn element (rings, focus) for 3:1.
- Theme: light, dark or the system's, a toggle in the rail, the choice in
localStorage (a per-viewer convenience), applied by an inline script in the
head before the first paint. One function (lib/theme.ts applyTheme) is both
the script and what the toggle runs.
- shadcn/ui primitives copied into components/ui (button, badge, alert,
dropdown-menu, sheet, separator, skeleton, sonner) and lib/utils.ts (cn),
each with its Derived-from header; THIRD_PARTY_NOTICES.md has the shadcn
entry. New tests/repo/notices.test.ts keeps every Derived-from header tied
to a notices section and to a commit, a license and what changed.
The shell
- (app)/layout.tsx: one live stream and one shared state for every signed-in
page, and the frame with the Rail (S1): brand, New Dot, Home, Approvals with
its count, every Dot with its avatar ring, API state and version, stream
state, theme, sign out. Under 768 px the rail is a sheet behind a menu
button.
- Dot header (S4) and tab bar in components/dot: avatar, name, goal on one
line, the state pill, today's spend (GET /usage), the computer pill with its
power menu (confirms before stopping or rebooting a running task, toasts the
result), the ERROR banner (the Dot's reason and the computer's last_error)
and the "interrupted, restarted" banner.
- lib/attention.ts owns what needs the person (waiting approvals, Dots in
ERROR) and how it is drawn (ring state); the rail badges, the avatar ring,
the tab title prefix "(3)" and the favicon dot all read it.
- lib/avatar.ts: the gradient and first letter from a hash of the Dot's id.
- The event hooks gained a scope: below DotEventScope they hear only that
Dot's events, so one stream serves the rail and the Dot's tabs
(TimelineTab's own filter by Dot is deleted: the scope owns it).
- The old header, MainNav and ApiHealth are gone; globals.css lost the rules
of the header, navigation, tabs, stream and skip link. What the old screens
still use is in legacy.css, scoped to `.legacy` and layered below
Tailwind's components and utilities, so the existing tab bodies render as
before and a new component is never overridden by an old rule. Each later
step deletes what its screen used; W11 deletes the file.
Tests and CI
- Unit and component tests (vitest, node and jsdom): attention model, avatar,
live-state reducer, state pill, theme (including the inline script run on
its own), tokens, format additions, the shell (rail, live counts, ring,
unread mark, title and favicon, narrow-screen sheet) and the Dot header
(state, spend, errors, restart banner, tabs, power menu), over a
FakeControlPlane in test/support that serves the routes and a live SSE
stream.
- Playwright harness (apps/web/e2e/harness.ts): the real control plane in
process (startServer, PGlite, FakeDriver, so a test can drive a Dot's
computer) and `next start` of the built client against it. Eight specs:
login, sign out, rail and Dot header, live approval, power menu, theme
and its no-flash guarantee, 390 px layout, keyboard.
- The web job of tests.yml now builds, installs Chromium, runs the browser
tests and counts them with test-guard against a new playwright floor (the
guard reads Playwright's JUnit report; test-guard.test.ts covers its shape).
The gate still counts 9 jobs. e2e has its own tsconfig, run by `npm run
typecheck`. Not added to the pre-push hook (it needs a build and a
browser).
- docs/architecture.md section 9.7 describes the frame, the tokens and the
harness.
Left out on purpose, not stubbed (the APIs do not exist in this lane yet)
- Inbox: the rail's entry is Approvals (/approvals) with its count; step W6
makes it the Inbox with ERROR Dots and failed tasks. The attention model has
no failedTasks24h (W6) and no channelProblem (W12) field until their data
exists.
- New Dot links to the form where Dots are created today (/#create-dot); W4
gives it its own page.
- The tab bar lists the seven tabs that exist; each later step swaps an entry
for its replacement (activity, memory, channels) in the commit that adds the
page. The computer side panel button (S4) comes with the panel (W5, W8).
- shadcn primitives other than the eight above are added by the step that
first uses them (an unused file would be dead code).
- The agent state pill is live-only: the stored Dot status covers what
happened before the page opened, because no route returns the agent state.
Tests removed or rewritten
- apps/web/test/shell.test.tsx: "shows the navigation, the API check and the
sign-out button" and "says so, and stays signed in, when the server cannot
end the session" tested AppLayout's header, which the rail replaces. Their
assertions live on in the rail tests ("shows the API's state and version",
"says so, and stays signed in ..."); the login-page test is unchanged.
Nothing of kept behavior is weakened.
Floors (.github/test-floors.json)
- vitest: linux 735 to 881, win32 738 to 884 (146 more tests, net of the 2
rewritten above).
- playwright: new, 8 on linux and win32.
- Nothing lowered.
What: when a Dot asks for an approval, every paired owner's Telegram chat gets a
prompt (tool, permission, reason, arguments cut to 300 characters) with Approve
and Reject buttons. Pressing one resolves the approval through
Scheduler.resolveApproval, the one way an approval is answered. Whoever answers
(chat, web, API), approval.resolved edits the prompts to the outcome and takes
the buttons away.
- callback_data is versioned (ap1:y:<id>, ap1:n:<id>), checked to fit Telegram's
64 bytes when the prompt is made and again when parsed, and parsed strictly.
- The hub checks every press: a paired owner, in their private chat, while the
binding's approvals setting is on, for an approval of the binding's own Dot
(the id in a button proves nothing). A second press or one after the web
answered gets the scheduler's 409 as "It was answered already". Every press is
answered with a short notice (answerCallbackQuery, best effort).
- Migration 0005 adds channel_prompts (binding, approval, chat, ref; cascades
with the binding and the approval) so a prompt is edited where it was sent and
never sent twice to a chat. Prompts are brought up to date at channel start,
when a person pairs and when approvals is switched on: settled approvals
(answered while the server was down, or expired with their task) are edited,
pending ones without a prompt are sent.
- Channel gains sendApproval/editApproval and ChannelSink.approval; the Telegram
adapter asks for callback_query updates and confirms a press only after the
hub dealt with it. FakeBotApi serves inline keyboards, editMessageText,
answerCallbackQuery and callback_query updates; FakeChannel records prompts,
edits and presses.
- The retry loop for sends is one function now (#retrying) used by text,
prompts and edits.
- hub.test.ts's linked() helper moved to test/world.ts as linkedFake() so
hub-approvals.test.ts shares it; no test of kept behavior changed.
Tests: callback and text units, adapter tests (buttons, edits that have nothing
to do, oversized id, press hand-over, forged data, hub failure re-offers the
press), hub tests with the real Scheduler and a fake guest (prompts, approve,
reject, answered elsewhere, second press, wrong clicker, other Dot's id,
approvals off and on, pairing while waiting, restart, expired, send retry and
drop), Telegram end to end through FakeBotApi, repository and cascade tests.
Removed tests: none.
Floors (.github/test-floors.json), raised for 34 added tests: vitest linux
817 -> 851, win32 820 -> 854; postgres min_passed 352 -> 405 and the pg require
148 -> 167. No floor lowered.
Docs: architecture 9.8 (approvals, buttons), tables, README.
A person can now link a Dot to a Telegram bot and talk to it from the chat.
The Telegram adapter is transport only; every policy (who may talk, pairing,
rate limits, idempotency, retries, backoff, status) stays in the hub of the
previous step.
- packages/channels/src/telegram: the adapter on grammY 1.46.0 (pinned). Long
polling, because the control plane sits behind NAT; only message updates;
an update is confirmed to Telegram (the offset of the next poll) only after
the hub dealt with it, and a message the hub could not record makes the
adapter fail so Telegram offers it again (the hub knows what it already gave
the Dot by the id "<bot id>:<update id>", which also keeps the ids of two
bots apart when a Dot's bot is replaced). /start <code> in a private chat is
a pairing attempt, a bare /start and strangers get no answer. A message
without text is marked as an attachment. Plain text out, split by the hub at
4000. A webhook the bot had is deleted on connect. Errors reach the hub in
words: 401 needs_relink, 409 says another process polls the bot, 403/400/404
on send are final, 429 carries retry_after. No message made here holds a
request URL, so the token (which is in every URL) is in none. Retries have
one owner, the hub: @grammyjs/auto-retry from the design is not used, it
would retry a second time under the hub's backoff and hide network failures
that must become the error status.
- FakeBotApi (exported from @invisible-dots/channels/testing): a real HTTP
server with the Bot API behaviour the adapter depends on (long poll, offset
confirmation, 409 for a second poller and for a set webhook, 401 for a
revoked token, 429 retry_after, 403 for a blocked bot, dropped connections,
redelivery); the real grammY client points at it.
- hub: a ChannelType may check credentials before anything is stored
(check -> account): wrong token 400 invalid_credentials, unreachable 502
channel_unreachable (neither carries the token), a bot another Dot uses 409
account_in_use. setCredentials gives a linked channel a new token and starts
it again with its people (the way back from needs_relink). A message that
carries an attachment is answered "not supported yet" to a paired person and
dropped. database: a binding can be created with its checked account.
- API: GET /api/dots/:id/channels, PUT .../channels/telegram {token} (201 when
linked, 200 for a new token), PATCH .../channels/:kind {settings?, enabled?}
(also pauses and resumes), DELETE .../channels/:kind, POST
.../:kind/pairing, DELETE .../:kind/peers/:peer. The token is never in an
answer. startServer runs the Telegram type by default; the web proxy already
forwards every method. SDK: channels, putTelegramChannel, patchChannel,
removeChannel, pairChannel, removeChannelPeer.
- CLI: channel add telegram --dot X (token from a terminal line or stdin,
never argv; shares the secret reading with `secret openrouter`), channel
list [--dot], channel pair telegram --dot X (prints the deep link),
channel remove telegram --dot X.
- docs/architecture.md (routes, section 9.8 Telegram), README (how to link a
bot).
Tests: 12 adapter tests against FakeBotApi; 15 hub end-to-end tests with the
real adapter, the real Scheduler, FakeDriver and FakeGuest on PGlite and pg
(pairing through the deep link, answer to the right chat, photo notice, a
stranger's 100 messages write nothing, a revoked person, redelivery and restart
in the middle, a database failure keeps the update, 409 and 429, a blocked bot,
revoked token and new token, replacing the bot, refused tokens, the token in no
log/status/event/row, unlink and Dot deletion); 7 API route tests; 1 SDK, 5
CLI and 1 database test. The hub test world moved to test/world.ts so both
hub suites share it. No test was removed or weakened. One existing hub test
("reports a channel that cannot be made") waited on the status row but asserted
its event, a race seen on PostgreSQL; it now waits on the event.
Floors (.github/test-floors.json), raised for 41 added tests: vitest linux 776
-> 817, win32 779 -> 820; postgres 294 -> 352, its pg requirement 125 -> 148
(measured on PostgreSQL 18.4). Nothing lowered.
Deferred to H5, with the feature that uses it: callback_query updates,
editMessageText and answerCallbackQuery in the adapter and in FakeBotApi.
Step W1 of the next-phase design. Before this, /login rendered the header
with ApiHealth, which called the API at mount; the proxy answered 401 with
x-invisible-dots-login: required (no session on the login page), and
fetchOrLogin then assigned /login?next=%2Flogin without looking at where it
already was: the page reloaded itself forever.
Fixed at the origin, in two places that each own one fact:
- Layout split: the header (navigation, ApiHealth, the new Sign out button)
moves into the (app) route group, with every page that needs a session;
/login sits outside it with its own bare layout and calls nothing. The
root layout keeps only html, body and the skip link.
- fetchOrLogin (lib/api.ts) is now a function of the page it runs from and
never redirects when that page is /login (onLoginPage). The login page's
post-sign-in return (pathAfterLogin, lib/session.ts) uses the browser's own
URL parser, so //host and backslash forms are refused too, and never
returns to /login itself.
- Sign out: SignOutButton in the header sends DELETE /session (which already
existed) and loads /login afresh; a refusal is shown and the person stays
signed in.
Test harness: the root and web vitest configs also pick up *.test.tsx, with
jsx compiled by the test run itself (the app's tsconfig keeps jsx for Next);
a component test chooses jsdom with its own "@vitest-environment jsdom" line,
so no other test pays for a DOM. Dev dependencies of apps/web: jsdom,
@testing-library/react, @testing-library/dom, @testing-library/user-event
(all MIT). Nothing is copied from third-party code in this step.
Tests added (14): apps/web/test/api.test.ts (onLoginPage, fetchOrLogin:
redirects with the page remembered, never from /login, leaves other answers
alone, no page), session.test.ts (signOut, pathAfterLogin), shell.test.tsx
(jsdom: the login page has no header and makes no request, the shell shows
navigation, API check and Sign out, a refused sign-out is reported).
Removed tests: none. The first Playwright spec waits for W2, which adds the
harness; the jsdom test above is the regression test until then.
Floors in .github/test-floors.json: vitest linux 721 to 735, win32 724 to
738 (14 tests added, none lowered).
docs/architecture.md 9.7 updated for the sign-out button and the login page
rule. Suites: npm run typecheck, npx vitest run (738 passed), next build.
The engine smoke now runs the browser against a stand-in for invisible-playwright-mcp, so the seams
between the engine, dot-agentd's relay and the MCP process are exercised in CI without Firefox.
smoke.sh installs the engine's own test fake (tests/fakes/fake_mcp_server.py, with the tool list captured
from the pinned server) as INVISIBLE_DOTS_MCP_COMMAND, on the engine's python, and runs as dot through the
relay. No second fake is written: the one owner of what a stand-in answers stays the engine's test fake, so
there is no smoke/fake_mcp.py. New checks: identity create 201 and created event, the directories are dot's;
the server runs as dot and never as dotengine, with the profile, display, session id and home in its
environment and none of the engine's variables nor the key; browser tools reach the server as the real
tools with browser main and show in tool.called with permission and target; a screenshot reaches the next
model request as an image part; the fourth launch with max_open 3 closes the least recently used identity
through browser_close; an action on a closed identity fails with the launch message and starts nothing; a
browser lost under a live server is reopened once; browser.identity.delete asks, parks, survives kill -9
(which ends every server), and every identity is available after the restart; SIGTERM asks an open browser
to close; a host DELETE of an open identity closes it first; the proxy password is in no approval, event,
engine log or dot-agentd log; /health counts identities and open ones. check_offered takes managed_by_dot,
its first list now holds the whole permission table, and three cases cover managed_by_dot false and the
create and delete tools. agent.started is counted eight times (two more restarts).
fake_openrouter.py gains RUN-TOOL <name> <json>. engine-smoke.test.ts gains two tests: the smoke uses the
engine's one fake and fixture, and its every-permission list equals the keys of the permission table, so a
tool added without the smoke fails in vitest too. The README of the smoke says what the browser checks pin.
Suites: smoke 206 passed 0 failed 0 skipped; vitest 726 passed (win32); pytest 2368 passed; go ok; typecheck ok.
Removed tests: none. Floors: vitest linux 721 -> 723, win32 724 -> 726 (two tests added); no floor lowered.
The fake signalled the group with a bare os.killpg, which raises
ProcessLookupError when the process has already exited and been reaped
between the timeout and the kill. Under the load of the full suite that
race failed test_find_files_enforces_time_budget with 'No such process'.
kill_process_group is the one owner of ending a command's group and
already tolerates an exited process.
A person can now talk to a Dot from a chat, through a hub that runs in the
control plane next to the Scheduler. The Dot never sees a channel: the guest
still receives {text} and no guest route or event type changed. This is the
channel-independent core; the Telegram adapter, the API routes and approvals
over a channel come in the following steps.
- packages/channels (new): the adapter interface (Channel.run, sendText,
typing; ChannelType makes the adapter and names the secrets a binding
owns), ChannelHub, pairing codes, the per-binding runner, text splitting,
backoff, a token bucket, and FakeChannel for tests. The hub owns every
policy: only a person paired with a one-time code (8 symbols, 10 minutes,
used once, stored as a SHA-256 hash) may talk, by the channel's stable id;
a stranger, a group chat or an empty message is dropped before any write;
a paired person is rate limited and length limited. Inbound messages go to
Scheduler.sendMessage with an origin and are recorded by the channel's own
id, so a redelivery (also after a restart) is dropped. The answer is routed
back by the user.message event its in_reply_to names (not mirrored when the
message came from the web); answers that answer nothing and task results
(switchable) go to the owners; typing shows while the Dot thinks. One
event stream per binding with a cursor: a restart resumes without losing or
repeating a reply (at least once, documented). Failing adapters restart with
exponential backoff, a revoked login stops them (needs_relink), sends are
retried with the channel's retry_after, a refused send is dropped. Every
change of status is one channel.status event, with the reason cut to 300
characters and the binding's credentials replaced. A new binding starts
after the Dot's latest event. Credentials are secrets scoped to the Dot,
never returned, deleted with the binding.
- database: migration 0004_channels.sql (channel_bindings, channel_peers,
channel_pairings, channel_inbound, all cascading from dots; an index on
user.message by message id) and ChannelsRepository;
EventsRepository.userMessage. events: EventLog.userMessage.
- api: startServer builds the hub after the Scheduler, starts it after
scheduler.start() and closes it before the Scheduler (channelTypes option,
none yet by default); RunningServer.channels.
- docs/architecture.md: layout, tables, section 9.8.
- CI: the postgres job also runs packages/channels.
Deferred to H5, with the feature that uses it: the channel_prompts table and
the approvals handling (settings.approvals is stored and returned, nothing
reads it yet). Deferred to H4: the API routes and SDK for channels (a route
for pausing a channel too: Hub.setEnabled exists and is tested), the Telegram
adapter, and the CLI.
Tests: 6 repository tests (both adapters), 1 EventLog test (both adapters),
11 unit tests (text splitting, backoff, pairing codes, rate limiter, the
guest protocol naming no channel), 27 hub tests against the real Scheduler
with FakeDriver and FakeGuest on PGlite and pg, 1 startServer test. No test
was removed or weakened; the migration list in repositories.test.ts gained
0004_channels and the in-memory event store of event-log.test.ts gained
userMessage.
Floors (.github/test-floors.json), raised for 46 added tests: vitest linux
730 -> 776, win32 733 -> 779; postgres 214 -> 294, its pg requirement
88 -> 125 (measured on PostgreSQL 16). Nothing lowered.
The Dot can now use its browsers. The BrowserManager (B4) becomes the fourth ToolDeps dependency, the browser tools are rows of the permission table, the identity routes answer for real, and main.py stops building an empty MCPProvider (design 2.1, 2.3).
Tools (browser_tools.py, rows of TOOL_PERMISSIONS): browser_identity_list|create|delete|launch|close, browser_navigate, browser_snapshot, browser_read_text, browser_screenshot, browser_click, browser_click_at, browser_type, browser_press_key, browser_select_option, browser_scroll, browser_back|forward|reload, and computer_screenshot (dot-agentd GET /v1/screenshot, Computer.screenshot). A page tool is a PAGE_TOOLS row naming the one invisible-playwright-mcp tool it calls and how its arguments map; the manager adds browser "main", so the model cannot pick the support browser or add an argument. No implicit launch: a page tool on a closed identity says "identity <id> is not open; call browser_identity_launch first", so browser.identity.launch alone decides whether a browser starts. Create and delete exist only while browser.identities.managed_by_dot (ToolEntry.needs_managed_identities, offered_tools(managed_identities=), projection passes it).
Images (images.py, AgentRunSpec.request_attachments in runner.py): a screenshot is shown to the model and never stored. The tool message holds its text and "[screenshot, 1280x720, not stored]"; the bytes go to a per-turn TurnImages (newest 3) that adds one user message after the last tool message of each request. Nothing reaches SQLite, the outbox or an event. click_at's PNG is dropped to a placeholder that says to call browser_screenshot.
Secrets: approval.requested carries browser_identity_create's proxy through redact_proxy (the parked call keeps the real one so the approved call runs as asked); each ToolEntry says which arguments an approval may show (tool_arguments). Targets name the identity and what was acted on (URL, selector, key name, direction, coordinates), never typed text or a character sent as a key.
Routes and lifecycle: GET/POST /browser-identities and GET/DELETE /browser-identities/:id are real (201, 204, 400 invalid, 404, 409 limit, 502 launch_failed|crashed); health reports identities and open from the manager; PUT /config applies max_open and max_identities to the manager (a lower max_open closes the excess, least recently used first); the engine closes every open browser on prepare-sleep and SIGTERM (4 s in all, after the turns ended), and main.py wires the manager. protocol.ts identityPaths loses metadata (no metadata.json). architecture.md 4.1, 4.2, 5.3, 6, 8.3 (the two tables merged), 8.7, 8.8 and UPSTREAM.md follow; tests/repo/architecture-engine.test.ts follows the merged table.
The owner's rule that the only browser of a Dot is invisible-playwright-mcp is pinned by tests: the permission-table test refuses any browser tool not served by that server (identity tools are the manager's, page tools name a tool the pinned 0.70.2 list has, no other row browses by permission, name or class), and tests/test_dependencies.py refuses any other browser, automation, scraping or web-search library, declared or imported. The image-builder test for provision.sh is left to B7, which changes that script.
Tests: added test_browser_tools.py (the tools against the real manager and the fake MCP server, and through real turns), the browsing tests of test_permissions.py, TestBrowserIdentities and the sleep test of test_server.py, TestStoppingWithBrowsersOpen in test_engine.py, a projection test and the dependency test; tests/fakes gained browser_manager.py, Computer.screenshot on the local double, and scripted_provider.call takes its first two parameters positionally only so a tool argument may be called name.
Removed tests, with the reason (the stubs they pinned are gone): test_server.py test_lists_no_browser_identity_and_makes_none_yet is replaced by test_the_identity_routes_name_what_they_cannot_find_and_the_methods_they_refuse; its assertions that POST /browser-identities and DELETE answer 501 not_implemented no longer hold because the routes are real, and are covered by TestBrowserIdentities. test_permissions.py test_the_result_is_sorted now grants every permission of the table instead of five (same check, wider). architecture-engine.test.ts: the split at "Planned for the browser phase" and "documented > used" become "documented == used" because the planned table was merged into the main one.
test_browser_manager.py: the cancelled-launch test waited a fixed 0.3 s for the fake process to be up and failed on a loaded machine; it now waits for the first browser_open call.
Floor: pytest linux 2275 -> 2368 (no floor lowered). Suites: engine 2368 passed, vitest 724 passed, go test ./... ok, typecheck ok.
A user message can now say which channel chat it came from, and the host
event log knows the two channel events, so the channel hub (H3) and the
UI have one contract to build on.
- shared: MessageOrigin {channel, binding_id, chat_id, external_id},
its strict schema and parseMessageOrigin; CHANNEL_KINDS and
CHANNEL_STATUSES; host events channel.status and channel.peer.paired
(with their data); ConversationMessage.origin; the channel wire types
of the API (ChannelRecord, settings, peers, pairing answer, put and
patch requests). No inbound or outbound event changes: the guest still
receives {text} and never sees a channel.
- events: UserMessageData.origin, stored in the data of the user.message
event. The event log is the one place that says where a message came
from; a reply is routed back by it, there is no parallel table.
- scheduler: sendMessage(idOrName, text, origin?) validates the origin
(400 invalid_request, nothing logged) and stores it; conversation()
returns it for user messages and leaves out one it cannot read. The
HTTP route still takes {text} only, so a client cannot claim a channel.
- web: the timeline names the two channel events instead of printing raw
JSON.
- docs/architecture.md: section 5.4 and the API list.
Deferred to H4, with the routes that serve them: the SDK methods for the
channel routes (a method with no route would only answer 404). The
WhatsApp link and QR types wait for H6, which decides their shape.
No test was removed or weakened.
Floors (.github/test-floors.json, raised for 9 added tests, 4 of them
also run on pg): vitest linux 721 -> 730, win32 724 -> 733; postgres
205 -> 214, its pg requirement 84 -> 88.
Step B4 of the browser phase (design 2.1, 2.3, 5.3). nanobot/dots/browser.py owns the browser identities of a Dot and the invisible-playwright-mcp process of each open one. It is not wired into the engine yet (tools, routes, health and main.py are B5), so nothing calls it but its tests.
What it does. An identity is a row of dots_browser_identities plus browsers/<id>/{profile,mcp}, made and removed as dot through the Computer. An open identity is one MCP process started as dot through dot-agentd relay (cwd and the six variables of section 6 as --env, the engine's own environment never reaches it), served by nanobot's MCP client on a private registry per identity, with browser:"main" added to every call. browser_open is asked with only that role and again with a 2 s backoff doubling to 30 s for up to 15 minutes while the server answers download progress; an error answer, a command that cannot start or a deadline is launch_failed, with the proxy redacted in whatever the server echoes. At max_open a launch closes the least recently used identity; set_limits closes only the excess open ones and a lower max_identities deletes nothing; max_identities is enforced on create for every caller. Launch, close and delete share one lock, calls on one identity another. A browser the server reports gone while its process lives is opened again once and the call repeated once. Close calls browser_close (30 s) before ending the process so Firefox flushes its profile. close_all is for suspend and shutdown. Every browser.identity.* event commits with the row change it describes (created, launched, closed, deleted); the view callers get carries the proxy only redacted.
Decision of the design (Q7): an action on an identity that is not open does not launch it. It fails with not_open and the text "identity <id> is not open; call browser_identity_launch first", so browser.identity.launch alone decides whether a browser starts. A process that ended is a crash: the identity is closed, closed is emitted once, the call fails with crashed, and the next action says not_open. This replaces the old manager's implicit relaunch, which the design's section 6 names as a bypass.
mcp.py (origin): MCPProvider takes on_terminated. By default a server whose session ended is reconnected and the failed call repeated, which for a browser silently starts a new process with no browser open and hides the crash. With on_terminated the provider reports the server's name and reconnects nothing. Existing callers are unchanged.
protocol.py: BROWSERS_DIR, GUEST_DISPLAY and BROWSER_ENV mirror GUEST_PATHS.browsers, GUEST_DISPLAY and the six ENV names of packages/shared; tests/repo/vendored-nanobot.test.ts keeps them equal (the existing parity test gains the three checks).
tests/fakes/fake_mcp_server.py is a stand-in for the real server over real MCP stdio: it serves tests/fixtures/mcp-tools-0.70.2.json, the SDK validates every call against its schemas, it refuses an argument the real tool does not have, it records its start (pid, argv, env, cwd), calls and exit, and its behavior is steered by a control file (download progress, failed open, browser gone once or always, refused close, crash and slow navigation). tests/dots/test_browser_manager.py (40 tests) ports the behaviors of the old manager.test.ts (records, delete order, launch environment and retry, deadline, failed open, LRU, reopen once, setLimits, close all) and adds the not_open rule, the crash and idle death, close order, the proxy never in an error, ids that could leave browsers/, archived identities, a delete waiting for a launch in flight, serialized calls, a cancelled launch and the same-transaction events. A mutation (dropping on_terminated) fails the crash tests.
Docs: architecture section 8 states the manager's rules; its "Not yet" says the manager exists and nothing calls it. Arch 4.1, 4.2, 5.3, 6 and 8.3 follow with the wiring in B5.
Tests: 41 added (40 in test_browser_manager.py, 1 in test_mcp_tool.py), none removed or changed; vitest 724 passed (the parity test has 3 more assertions, same count). Floor: pytest linux 2233 -> 2275 in .github/test-floors.json. Suites: engine 2275 passed, vitest 724 passed, typecheck ok, go test ./... ok, smoke 146 passed 0 failed 0 skipped.
The browser phase runs invisible-playwright-mcp through nanobot's MCP client and dot-agentd relay (design 2.1, 2.3). Three things the client and the Computer could not do are changed where they live, before the BrowserManager (B4) uses them.
computer.py: relay_argv takes env and emits one --env NAME=VALUE per entry, in the order given (dot-agentd's relay already has the flag); the Computer protocol, AgentdComputer and the LocalComputer test fake follow. env is the program's environment inside the VM, spawn_env stays the environment of the relay process, so no engine variable reaches the program.
mcp.py: MCPServerConfig gains images (default False) and MCPToolWrapper an images constructor flag. With it, a tool result that has an image block is a list of content blocks in the server's order (text blocks and image_url data URLs); without it, or on an error result, an image is still reported by MIME type and its bytes are dropped, so every other caller keeps today's text. A result without an image stays a string. MCPProvider.connect() returns the configured servers that are not connected when it returns (empty when all are live), so the manager can raise launch_failed instead of finding out from the log. The per-server tool_timeout was already honored by each wrapper; a test now pins it (7 s and 120 s side by side).
Tests: 16 added (3 in test_computer.py, 13 in test_mcp_tool.py), none removed or changed. Floor: pytest linux 2217 -> 2233 in .github/test-floors.json. Suites: engine 2233 passed, vitest 724 passed, go test ./... ok, typecheck ok.
TestListenTCPOnEveryInterfaceIsIPv4Only and TestDefaultBindRequiresTheTokenOverTCP
bind 0.0.0.0. On a Windows host every go test builds a new test binary, so
Windows Firewall asked the user to allow agentd.test on every run of the
suite (pre-push hook included). Only the Linux guest ever binds every
interface, so both tests move unchanged to every_interface_linux_test.go
(build tag linux) and keep running where the behavior lives: CI, the docker
runner and WSL.
Floors: go linux stays 97 (both tests still run there, 97 passed);
go win32 goes from 63 to 61, the two moved tests (62 passed on Windows).
Adds dots_browser_identities (id, name, proxy, created_at, last_used_at, archived) to the engine's database with its row functions in store.py: insert_identity, get_identity, list_identities, count_identities, touch_identity, set_identity_archived, delete_identity. Whether an identity is open is never stored: the BrowserManager derives it from live sessions, so a file never claims an open browser for a process that is gone. The proxy is kept as given because every launch needs it; anything shown goes through identity_rules.redact_proxy. SCHEMA_VERSION 4 -> 5 (no migration, as before).
Tests: TestBrowserIdentities in test_store.py (12) plus the table list and the strict-table count (10 -> 11). architecture.md 6 and 8.7 name the table and the proxy storage.
Removed tests: none. Floors: pytest linux 2205 -> 2217 (2217 passed in the engine suite).
The browser identity rules (name 1..80, proxy scheme and host, redact_proxy,
slug-plus-six-characters ids, the safe-id pattern) existed only in TypeScript
(packages/shared/src/identity-rules.ts, ids.ts) and were never tested as a
unit. The engine's BrowserManager (next steps) must enforce the same rules for
every caller, so they are now one behavior in two languages:
- packages/shared/test/fixtures/identity-rules.json holds the cases: 41 create
requests (messages included), 15 proxy redactions, 11 slugs, valid and unsafe
ids, new-id patterns. packages/shared/test/identity-rules.test.ts runs them
against the TypeScript.
- nanobot/dots/identity_rules.py is the engine's implementation, and
tests/dots/test_identity_rules.py runs the same fixture. The edges where
Python differs from JavaScript are handled and pinned: trim() whitespace,
length in UTF-16 units, URL parsing (default ports, IPv6, ports out of
range), and the id pattern matched whole so a trailing newline is refused.
- tests/fixtures/mcp-tools-0.70.2.json is the real invisible-playwright-mcp
tools/list captured at 0.70.2 (restored from 7f7e88bf), with a test that its
version equals the pin in guest/image-builder/builder/mcp-requirements.lock,
that it is named for that version, and that it holds the sixteen tools.
- guest/image-builder/README.md says the fixture exists and that a new MCP
version needs a new capture in the same change.
No behavior of the TypeScript changed.
Tests moved, not removed: the slugify (2) and newIdentityId/isValidIdentityId
(2) tests of packages/shared/test/ids.test.ts now live as cases of the shared
fixture (every assertion kept, the long-name case now pins the exact slug), so
the cases have one owner.
Floors raised for the added tests: vitest linux 631 -> 721, win32 634 -> 724
(measured 724 on win32); pytest 2091 -> 2205 (measured 2205). None lowered.
Fixes the three findings of the engine review of "shared, engine: tool.called names its target" and "shared, engine: spend reported to the host".
E7, exec target leaked credentials (fixed). redact_command blocklisted the shapes a secret takes in free text, so `curl --proxy-user bob:pw`, `curl -U bob:pw`, `curl -x bob:pw@proxy`, `curl -u a:b`, `mysql -uroot -phunter2`, `sshpass -p x`, `docker login -p x`, `curl -H "PRIVATE-TOKEN: x"` and `?key=x` all reached tool.called unchanged (confirmed by running the old module). It is now an allowlist over a tokenized first line (nanobot/dots/targets.py, whose module doc lists both sides). Shown: the program of each command, plain positional words, long options whose name does not say they hold a credential, flags run together of up to three letters, a URL without its user and password and with its query and fragment values masked, host:port and host:/path. Masked as `***`: the value of every single-letter option (only a plain path stays), a value written against its flag (`-phunter2`), the value of a long option or NAME= named for a credential, a quoted word with spaces, any user:password word, and the word after Bearer or Basic; a quoted header keeps its name (`'Authorization: ***'`). What stays visible is a secret written as a bare positional word or as a value that starts like a path; the module doc and architecture 5.4 say so and the full command stays behind the approval. Tests: every form of the report, a grid of 6 secrets over 12 ways of writing them, the plain commands that must stay readable, and a smoke check with `curl -U user:pass` that also greps the whole event stream for the password. The body of the earlier commit said "14 credential forms masked"; that was a count of regexes, not of forms, and is superseded by this.
Expectations changed because the masking is stricter, none because a feature went away: test_targets `curl -u me --header Bearer tok123 x` now shows `curl -u *** --header *** *** x` (was `-u me`, `Bearer ***`); `mysql --password=hunter2 -u root` and `mysql --password hunter2 -u root` now show `-u ***`; the URL case now masks every query value (`?token=***&page=***`, was `page=2` dropped by the old greedy match); `python -m http.server 8000` left the list of commands shown as they are (the `-m` value is now masked) and `python3 serve.py 8000` plus six more plain commands joined it; smoke "that tool.called names the command that ran" now expects `ps -o ***` where it expected `ps -o user=`.
E3/E4, chat spend lost across an approval or a suspension (fixed). TurnRunner emptied the chat's spend row at the start of every chat turn, including the continuation turn of an approval and a resume, and a parked turn emits no message.assistant, so the spend before the park was in no event, GET /usage undercounted, and each approval restarted the chat's cap. The row is now emptied where the spend is reported: store.append_outbox_spent takes the chat's spend with the message.assistant that reports it, in the same transaction. Every dollar of the chat is therefore reported by exactly one answer however many turns it took (park, approve, restart, sleep), the cap holds from one answer to the next, and a chat turn cut by a restart is no longer missing from the total (architecture 5.4, 8.2 and the /usage paragraph updated). The reviewer's alternative (reset only when a turn opens on new input) would still lose the spend of a parked chat when new input arrives before the decision. Tests that fail before the fix: test_engine (a chat parks, is approved and answers: spent_usd is 0.4375, the sum of both parts, and the next answer starts from nothing; a chat that spent past the cap before the approval fails after it instead of starting again) and test_store (an answer takes the spend, a task event leaves its task's). test_turns `test_the_chat_starts_every_turn_with_nothing_spent` was renamed `..._every_answer_...`: it still checks that a second turn is not capped by the first, and now asserts that the answer took the first turn's spend (ledger 0.0, answers 0.9 and 0.9) where it asserted the ledger kept 0.9.
E7, TOOL_TARGET_MAX counts code points in Python but UTF-16 units in zod (rejected). zod 4.6.5, which packages/shared uses, measures a string in code points: a schema `z.string().max(160)` accepts 160 emoji (320 UTF-16 units) and refuses 161, so Python len() and the schema agree and the host does not drop such an event. Evidence: a node run of the schema over 79, 80, 81, 100, 160 and 161 emoji (accepted, accepted, accepted, accepted, accepted, refused), and the new assertion in packages/shared/test/events.test.ts through parseOutboundEvent. A UTF-16 clip would have cut targets for nothing. No code change; the unit is now written down (protocol.py, events.ts, targets.py clip) and pinned by a test on both sides that share one literal (200 emoji clip to 159 plus an ellipsis, which the schema accepts; 161 emoji are refused).
Floors: pytest linux 1978 to 2091 (the measured count). vitest is unchanged (the events test gained assertions, not a test). Suites run: engine 2091 passed, vitest 634 passed, typecheck, web build, go test, smoke on the tree 146 passed 0 failed 0 skipped.
DotsRepository.delete removed only the dots row. secrets.scope holds a Dot id or 'global', so no foreign key could cascade it, and a deleted Dot's per-Dot OpenRouter key stayed encrypted in the database forever (channel tokens would have joined it). The delete is now one statement (a data-modifying CTE) that removes the Dot and every secret scoped to it, so no caller can leave the secrets behind and no transaction is needed.
Tests added: a repository test (the Dot's secrets go, the global key and another Dot's keys stay; runs on PGlite and on pg) and a scheduler test (Scheduler.deleteDot removes the per-Dot key, keeps the global one). No test removed or weakened.
Floors raised in .github/test-floors.json: vitest linux 629 to 631, win32 632 to 634, postgres linux 199 to 205 (the measured count of the pg run of packages/database, events, apps/api, apps/scheduler; the old value was below it).
Deferred: secrets already orphaned by earlier deletes are not purged (a cleanup migration would touch the migration lists of three test files and collide with the numbering of H3).
A tool.called event said "exec ok 1.2 s" and nothing about what was done, so an inline tool step in the chat could not say what the Dot ran or touched. It now carries `target`, one redacted line of at most 160 characters: the first line of a command, a path, a search term, an action and a name.
Contract: packages/shared events.ts `tool.called.target?` (zod: non-empty, at most TOOL_TARGET_MAX = 160, one line) and the TOOL_TARGET_MAX constant; protocol.py keeps its copy of the number (it lists type names only, so nothing else needs a mirror) and tests/repo/vendored-nanobot.test.ts keeps the two equal. Architecture 5.4 defines the field and what each tool shows, 8.7 says where it is read from.
Engine: the permission table, which already says what each tool needs, now also says what of a call may be shown. `ToolEntry.target` is a required function per row, implemented in the new nanobot/dots/targets.py: exec the first line of the command (command or cmd) cut at 120 characters, with the credentials it carries masked as `***` (URL user and password, Bearer or Basic, Authorization, API key and cookie headers, NAME=value and --flag value whose name says password, token, key or secret; best effort, documented as such); read_file, list_dir, write_file, edit_file the path; find_files the query, else the glob, else the path; grep the pattern; apply_patch the path or "N files, first <path>"; memory_search the query; memory_get the name; cron the action and the name or job id; exec_session "input to <id>", "terminate <id>" or "output of <id>", never the input; list_exec_sessions nothing. `permissions.tool_target` is the one place that applies a row and cuts to TOOL_TARGET_MAX. DotsTurnHook.before_execute_tool stores it on the call's intent (new nullable `target` column of dots_tool_intents, ToolIntent.target, SCHEMA_VERSION 3 to 4: the engine does not migrate) and _record_tool_result writes it into tool.called. A call that never started has no intent and so no target: a denied call, a tool that was not offered, arguments that did not fit. A call cut by a stop keeps it, so it is reported with what it was doing.
Tests first: test_targets.py (every tool's target, malformed arguments, the 120 and 160 cuts, one line without control characters, no content in any target, 14 credential forms masked, ordinary words about tokens and passwords left alone, only the first line looked at), test_permissions.py (every row has a target function that returns None for no arguments), test_store.py (the intent keeps its target, None by default, the first start of a call wins), test_transcript_outbox.py TestToolTarget (ran, task, failed, interrupted, approved, absent when None or empty, denied has none), test_turns.py TestToolTargets (a real turn through five tools, an exec whose Authorization header and URL password are masked, a failing task call, the intent row is consumed) and the denial test now also asserts no target; shared events.test.ts (kept, at the limit, refused when empty, long, on two lines, not a string); the parity test. Smoke: the t1 exec names its command, write_file names the path and none of the content, an exec with a --token argument is reported masked (145 checks).
Removed tests: none. Existing assertions were not changed; the exact-dictionary assertions on tool.called of calls that never ran still hold, which pins that those carry no target.
Floors: pytest 1887 to 1978 (1978 passed; the floor had been left below the count), vitest linux 628 to 629 and win32 631 to 632 (632 passed). typecheck clean, go test green, apps/web build green, smoke 145 passed 0 failed 0 skipped.
Known limits, documented: exec with tty is named by its command like any exec (the event carries no tty flag, so a client cannot say "terminal session" from it); the masking of a command is best effort.
exec gains a tty argument for programs that ask questions or need a terminal (REPLs, ssh, sudo prompts). It is the same tool under the same computer.exec permission, so no tool name or permission is added and nothing changes in packages/shared. tty implies a session: the call always runs as a background job that exec_session reads, answers (^D through close_stdin, ^C as the character with code 3) and ends.
ExecTool._spawn, the one spawn of every model command, passes tty to computer.relay_argv and spawn_env (the relay gets --tty and TERM); ExecSessionManager.start forwards it and list_exec_sessions marks terminal sessions. The terminal's output is one stream with escape sequences and carriage returns that waste context and confuse the model, so a tty session's poll text goes through terminal_text (exec_session.py, standard library only, no new dependency): it drops CSI/OSC/charset escapes and control characters, turns CRLF into a newline, lets a lone CR, a backspace and erase-in-line overwrite (a progress bar reads as its last state), and holds an escape sequence cut by the end of a poll until the next one (flushed at the end of the stream, dropped past 4096 characters). Full-screen programs are not rendered, by design. No terminal for the person: that stays out of scope (architecture section 10).
Tests: test_terminal_text.py (the function, including every cut position of a sequence), test_exec_session_tty.py (screen text, raw stream kept without tty, split sequence across polls, flush at exit, input and terminate, list marks tty), test_exec_through_relay.py (record tty True and TERM, tty without yield starts a session, quick tty command, no TERM leak without tty), test_tool_descriptions.py and test_permissions.py (tty is a boolean argument of exec, no new tool name). Smoke: RUN-TTY and TTY-ANSWER stand-in directives; a real relay and pseudo-terminal show the program a tty of 80x24 with TERM, the model answers through exec_session, and the results carry no escape sequence or carriage return. docs/architecture.md (tool table, 8.8, not-yet list) and UPSTREAM.md updated.
Removed tests: none.
Floors: pytest 1853 -> 1887 (34 added tests); vitest, go, postgres unchanged.
The models map of a Dot config took any role name and the engine ignored every
one of them. The engine asks a model for one job other than the turn itself:
the summary that replaces the old part of a thread that outgrew
limits.context_tokens. So the roles are a closed list, MODEL_ROLES = summary,
owned by packages/shared/src/config.ts; a config naming another role is
refused as: unknown model role "fast" (the roles are: summary). The engine
keeps a copy in nanobot/dots/protocol.py (parity pinned by
tests/repo/vendored-nanobot.test.ts) and refuses the same in the same words.
EngineSettings.models holds the named roles as a tuple (the settings stay
hashable) and model_for(role) answers the named model, else the Dot's own;
asking for a role there is not is an error, not a silent fallback. TurnRunner
builds the summary runtime with model_for("summary") on the same metered
provider, so the summary's real cost counts toward the cap. When that model is
not the turn's, the summary request carries no tool definitions (another model
may not take them); the turn's own model keeps sending them, which keeps its
prompt cache. The window stays limits.context_tokens, so the summary model
needs a window at least that large (architecture 8.6). A config push applies
from the next turn only, as the model does.
Tests: config.test.ts (role accepted, other roles refused with the roles
listed, empty id), test_protocol.py (same refusal), test_projection.py
(model_for, unknown role), test_turns.py (summary request's model and tools
with the role, without it, with the role naming the Dot's own model),
test_engine.py (a push changing the role applies to the next turn only),
vendored-nanobot.test.ts (MODEL_ROLES parity). Smoke: a window of 8000 tokens
and five long messages force a summary; the stand-in's log shows it went to
the role's model with no tool, and the turns to the Dot's own model.
Removed tests: none. Test data changed because free-form role names no longer
exist: the example role fast became summary in config.test.ts (FULL_YAML and
its expectation) and apps/web/test/yaml.test.ts, and vision became summary in
test_protocol.py (accepted config and the empty-id case).
Floors raised: vitest linux 625 to 628, win32 628 to 631 (3 tests); pytest
1846 to 1853 (7 tests). None lowered.
Docs: architecture section 7 (example and the closed role list), 8.6 (the
summary request), and the not-yet list in 8.8 no longer names the models
roles.
The engine knew what a task or a chat turn had spent (the ledger of the cost cap) and told nobody. The host now sees it: the events that end or advance work carry the spend, the host keeps it on the task, and a route sums it for a Dot. This is what the cost pills of the UI read.
Contract: message.assistant, task.progress, task.completed and task.failed carry spent_usd, the spend of their session so far. A task's events carry the task's spend (it only grows, and survives a restart, an approval and a resume); the chat's message.assistant carries the spend of the turn that answered (the chat's ledger row starts again with every turn). packages/shared events.ts: SpentUsd type on the four data shapes, the zod schema accepts a non-negative finite number (optional: events logged before have none; without the key in the schema zod would strip it), USAGE_EVENT_TYPES. protocol.py lists type names only, so it needs no mirror; architecture 5.4 defines the field.
Engine: store.append_outbox_spent is the one place the spend of an event is read (from dots_spend, in the transaction that stores the event, rounded to 8 decimals so float sums show no noise) and the only way these four events are appended: transcript_outbox (answer, completion, progress) and engine.py (task.failed for a task that exhausted its attempts or whose turn failed, the chat's "I could not answer"). No schema change.
Host: migration 0003_task_spend.sql adds tasks.spent_usd (double precision, default 0, >= 0). TasksRepository.recordSpend keeps the highest value heard (a late or repeated event never lowers it), only for a task of the reporting Dot, and also for a task that already ended (a cancelled task the guest keeps working on still spends). applyGuestEvent projects it from task.progress, task.completed and task.failed. EventsRepository.spentUsd sums spent_usd over the guest events of USAGE_EVENT_TYPES (task.completed, task.failed, message.assistant: each carries a whole unit; task.progress is a running value of a task that ends with one of them, so summing it would count the money twice) since a moment. Scheduler.usage and GET /api/dots/:id/usage?since=<ISO 8601> answer { dot_id, since, spent_usd }; a bad since is 400, an unknown Dot 404, a deleted Dot's history stays readable by id like /events. SDK: client.usage(), UsageAnswer and TaskRecord.spent_usd in shared api.ts. Known limit, documented: work that never reported an end (a cancelled task, a chat turn cut by a restart) is not in the usage total; the task's own spent_usd still shows what was heard.
Docs: architecture 5.4 (field and meaning), 8.2, 9.1 (tasks table), 9.6 (route and what it counts). Smoke README.
Tests: test_store.py (append_outbox_spent: the session's spend at that moment, zero, no float noise, refuses other event types), test_transcript_outbox.py TestSpentUsd, test_turns.py (a task's events tick 0.25, 0.75, 0.875; a chat answer reports its turn), test_engine.py (a task resumed after a kill reports the spend of both processes; every chat answer reports its own turn); shared events.test.ts (the schema keeps spent_usd on the four events and refuses a negative, text, null, NaN or infinite value); repositories.test.ts (events.spentUsd by type, source, Dot and since; no float noise; recordSpend only grows, stays inside its Dot, counts after a cancel); scheduler.test.ts (projection from progress and completion, from failure, after a cancel, a guest cannot write another Dot's task); api.test.ts (usage route, since, 400, 404, deleted Dot). Smoke: the events of a task that spent nothing report 0, the task failure and the chat answer report 1.2, and the failure after kill -9 reports the spend of both processes.
Existing engine tests that compared the exact data of these events now include spent_usd (0.0, or the spend the test made); no assertion was dropped or loosened. The migration test lists 0003_task_spend with the other versions.
Removed tests: none. Floors: pytest 1832 to 1846 (1846 passed), vitest linux 607 to 625 and win32 610 to 628 (628 passed), postgres 181 to 199 and pg require 75 to 84 (raised by the 18 and 9 tests added; 201 passed on pg and PGlite against postgres:18.4), smoke 128 to 132 checks (132 passed, 0 failed, 0 skipped). typecheck clean, go test green, apps/web build green.
limits.max_cost_per_task_usd was accepted and never enforced: a task or a chat turn could spend without bound. The engine now stops a turn that has spent its cap, and a response that reports no cost fails the turn closed, so the cap never runs blind.
Cost: OpenAICompatProvider._parse_chunks puts the cost the gateway reports in the usage of the final stream chunk (usage.cost, USD) on the new LLMResponse.cost_usd, with a float reader next to the int one. It is on the response, not on LLMUsage, which rebuilds itself field by field and would drop it. A bool, text, NaN, infinite or negative value is no cost. For a request marked is_byok the upstream cost it reports beside the charge is added (may count more than was charged, never less).
Spend: new nanobot/dots/spend.py. TurnRunner._run builds one TurnSpend per turn, bound to the turn's session, and wraps the turn's provider in a MeteredProvider above chat_stream_with_retry, the one entry of every model request (the runner's, its retries, the consolidator's summaries): each response adds its cost to the session's row of the new table dots_spend (session_key, usd) in its own transaction before the runner sees it. A failed request has no cost and counts for nothing. DotsTurnHook.before_iteration checks the spend and raises CostCapReached, which TurnRunner.run turns into TurnOutcome.failed, so the existing end-of-turn path does the rest: task.failed with the text for a task, "I could not answer: ..." for the chat, open calls closed. A task's row is never reset (it survives a restart, an approval and a resume); the chat's row is reset when a chat turn opens. EngineSettings.max_cost_usd comes from project(); a lowered cap applies from the next turn like the step limit. SCHEMA_VERSION 2 to 3 (the engine does not migrate, as before).
Texts: "stopped: the task reached limits.max_cost_per_task_usd (spent 1.0423 USD of 1.00)", "the turn" for the chat; a missing cost: "stopped: OpenRouter reported no cost for a request, so limits.max_cost_per_task_usd cannot be enforced". The check runs before a request, so the cap may be exceeded by the last request and an answer that crosses it is delivered (documented).
Docs: architecture 7 (the field's comment), 8.2 (the rule), 8.5 (every request is streamed, which is how the cost arrives; the "no streaming" drift is gone), 8.8 (dots_spend among the tables, the cap leaves the "not yet" list).
Tests: test_spend.py (the meter, the ledger, a retried request through the real provider counts once, the check and its texts, a missing cost); test_openai_compat_stream.py (cost from a stream in the SDK and plain forms, zero, BYOK, absent, not an amount); test_turns.py TestTheCostCap (two responses of 0.006 against 0.01 stop before the third, the answer that crosses the cap completes, the chat text, a summary request counts, a missing cost fails closed, a task's spend reaches the next turn, an approval continuation stops at once, the chat starts every turn at zero, the cap of the settings); test_engine.py (task.failed with the text and closed calls, the chat answer, the cap holds after the process is killed, a task found running with the cap spent fails before any request); test_store.py (the ledger functions, the file reopened); test_projection.py. The scripted provider stamps a default cost of 0 on responses that carry none (default_cost=None leaves them unpriced). Smoke: fake_openrouter.py learns a COST <usd> line (the cost every response reports) and REPEAT-EXEC (exec after every result); with the cap of 1 a task of 0.6 a response fails with the exact text after two requests, a chat turn answers with the turn's text, and a task killed with kill -9 after its first response stops after one more (two requests in all, so the spend survived); agent.started count 5 to 6.
Not in this commit: spent_usd on the events, the host projection and the usage route (step E4).
Removed tests: none. test_store.py's table count 9 to 10 and the table-name list gain dots_spend (the feature's table, strictness still checked for all). Floors: pytest linux 1783 to 1832 (suite is 1832 passed); vitest 610 passed, typecheck clean, go test green, smoke 128 passed 0 failed 0 skipped.
A Dot's long-term notes are files under /home/dot/memory, written with the file tools. The host and the UI could not tell when one changed, and memory.written (already in events.ts and protocol.py) was never sent. The engine now sends one memory.written {key} per note a call wrote, key being the path relative to the memory directory.
memory_tools.py, which owns MEMORY_DIR, gets memory_keys_written(tool, arguments, resolve): for write_file, edit_file and apply_patch (not its dry run) the paths that resolve, with the computer's own resolution, to a file inside the memory directory, once each, in order. A relative path, ../ and nested notes count as the tool counts them; the directory itself and anything outside are no note. DotsTurnHook.before_execute_tool computes the keys from the prepared arguments and stores them on the ToolIntent (new column dots_tool_intents.memory_keys_json, SCHEMA_VERSION 1 to 2; the engine does not migrate, as before). _record_tool_result appends the events right after the call's tool.called, in the same transaction, only when the call ran ok: a failed, denied, interrupted or never-run call sends none. Known limit, documented: a note written through exec is not seen.
Contract: no type change (parity with packages/shared is untouched); architecture 5.4 defines the event and its key, 8.6 points to it, 8.8 no longer lists memory.written as not yet done.
Tests: test_memory_tools.py (each tool, nested, relative, ../ out and back, the directory itself, dry run, malformed arguments, tools that write no file), test_store.py (the intent round-trips its keys, first start wins, JSON-special names), test_transcript_outbox.py (ok, task call, atomic with the message, failed, denied, interrupted, never run, approved, no keys), test_turns.py with the real tools on LocalComputer (write, read, edit and patch in one turn in order, a task turn, outside writes, dry run and failing calls, an approved write, a denied write). Smoke: the stand-in learns WRITE-NOTE and FIND-NOTE; a write_file into a nested note gives tool.called then memory.written with the relative key, memory_search finds it, and a ../ write out of the directory gives none.
No test removed. Floor: pytest linux 1723 to 1783 (suite is 1783 passed); vitest 610 passed, typecheck clean.
A task's model often writes a line beside a tool call (what it is about to do). The engine now reports it as task.progress {task_id, text}, so the host and the UI can show the work as it happens instead of only the final summary.
record_transcript_append, the one place that turns a stored transcript message into outbox rows, sends it for an assistant message that is not the final answer, has tool calls and non-blank text, in a task whose status is running. It is written in the message's own transaction, so a restart neither loses nor repeats it, and it precedes the tool.called of its calls. The text is trimmed and cut at PROGRESS_TEXT_MAX (2000) characters, the ellipsis included. The chat, the final answer, a message with no text, and a task that is not running send nothing. No contract change: the type was already in events.ts and protocol.py; architecture 5.4 and 8.7 now define it and 8.8 no longer lists it as not yet done.
Tests: test_transcript_outbox.py (17: once, text parts only, blank and thinking-only, cut and exact limit, order with tool.called, chat, over tasks, queued task, final answer, no calls, atomic with the message), test_turns.py (task order progress, tool.called, tool.called, completed; chat sends none), test_engine.py (a suspend and restart after the text reports it exactly once). Smoke: the stand-in learns SAY-RUN-EXEC <text> :: <cmd> (text beside the call, streamed and not); task t7 reports the line once before its call and completion, and a chat with the same directive sends none (114 passed).
No test removed. Floor: pytest linux 1703 to 1723 (suite is 1723 passed).
packages/shared/src/tools.ts held a second tool table (TOOLS, 24 tools with
JSON schemas) next to the engine's own table in nanobot/dots/permissions.py.
Nothing but its own test read it; the engine offers, decides and reports every
tool from its table. Two tables for one fact is how they drift, so the dead one
is deleted: TOOLS, ToolDefinition, JsonSchema, ToolName, TOOL_NAMES, getTool,
offeredTools and redactToolArguments. The password redaction of a proxy URL
stays owned by redactProxy in identity-rules.ts and moves into the engine's
approval events with the browser phase (architecture section 5.4).
The five permission names that no tool of the Dot can ever exercise are deleted
from PERMISSIONS instead of left as switches that do nothing: web.fetch and
web.search (web reading and search are removed from the engine, section 8.8),
subagents (removed), message.send (a Dot has no tool that messages anyone) and
memory.write (notes are files written with files.write, section 8.6). A config
that names one is now refused as an unknown permission. ASK_BY_DEFAULT in
config.ts is browser.identity.delete and automations, and the web namespace is
no longer allowed by default.
PERMISSION_INFO gives every permission a label, a one-sentence description and
a risk (low, medium, high), the words the UI shows when a person decides.
A repository test now keeps every permission of the engine's table, and every
permission named in section 8.3 of the architecture document, a member of
PERMISSIONS, and the removed names out of sections 7 and 8.3.
Behavior of what is offered does not change: the engine's tools and their
permissions are the same, and the host's defaults for the permissions that
remain are the same.
Tests removed with the feature they tested (packages/shared/test/tools.test.ts,
7 tests, all of the deleted table):
- "has the 24 tools of section 8.3 with unique, dot-free names" (TOOLS gone)
- "maps tools to the permissions of section 8.3" (getTool gone; the engine's
mapping is pinned by tests/dots/test_permissions.py and the architecture test)
- "declares argument schemas that agree with section 8.3" (schemas gone; the
engine's tools carry their own schemas)
- "marks the tools whose result is an image" (returnsImage gone)
- "offers everything when the Dot manages its identities" and "leaves out create
and delete when it does not" (offeredTools gone; the engine's offered_tools is
tested in tests/dots/test_permissions.py and test_projection.py)
- "declares which tools may run again after a crash" (replaySafe gone; the
engine's crash recovery owns it)
config.test.ts changes: the default-ask set and the runtime check use the
permissions that remain (message.send and subagents are no longer permissions).
Tests added: tools.test.ts 6 (registry names, exact list, removed names,
PERMISSION_INFO covers PERMISSIONS exactly, fields, risks), config.test.ts 5
(each removed name is an unknown permission), architecture-engine.test.ts 1.
Floors (.github/test-floors.json): vitest linux 602 -> 607, win32 605 -> 610.
Nothing lowered.
guest/image-builder/test/smoke/run.sh builds dot-agentd and the engine exactly
as the image does, starts the engine as dotengine in ubuntu:24.04 and checks the
Dot's contract end to end (chat, tasks as dot, offered tools, the key only in
memory, kill -9 and stream resume, approvals across kill -9, interrupted calls,
SIGTERM, startup refusals); it fails on any FAIL or SKIP. A smoke job runs it in
CI. Test floors for every suite.
guest-runtime/ and guest/invisible-dots-agent/ are replaced by the Python
engine; no host code imported them. Their workspaces, the agent bundle on the
runtime disk, its CI build step and tests/e2e (it drove the old agent's tools)
go with them.
The golden image builds /opt/invisible-dots-engine from a hashed lock
(builder/engine-requirements.lock, wheels only) with builder/build-engine-env.sh;
the runtime ISO carries the engine's source, joined to the venv by a .pth file;
the engine refuses to start when the two locks differ. The unit runs
python -I -B -m nanobot as dotengine with NoNewPrivileges; install.sh makes the
state directory.
nanobot cut to its library core (no channels, UI, CLI, subagents, web tools,
other providers, telemetry, generic hooks, or approval systems but the Dot's),
and the Dot's layer in nanobot/dots/: protocol, permission table, store with
transcripts and outbox in one SQLite file, the one gate at the tool execution
boundary (allow, deny, park; one-shot pass after approval; ids per session),
per-message commits, the turn runner over nanobot's AgentRunner, the engine
(chat, tasks, approvals, prepare-sleep, recovery after kill -9), the HTTP API
on agent.sock, cron automations, the OpenRouter provider with the key held in
memory only, and the model's computer through dot-agentd as user dot.
Host: the OpenRouter key format is one rule (packages/shared), refused where
the key enters. CI: an engine job runs pytest; test-guard reads its junit.
The engine runs as dotengine and never executes the model's commands itself.
dot-agentd gains the relay (dot-agentd relay -- PROGRAM ARGS: the remote
process group dies with the relay), the file routes on agentd.sock (GET/PUT
/v1/files, /v1/files/list) and their tests; the pre-push hook runs gofmt and
go vet as CI does.
The engine of a Dot is a hard fork of nanobot (HKUDS/nanobot, MIT), upstream
commit f75470e72f0993dcf92accc81282adaa48b16f56. This commit adds, unchanged,
only the upstream files the engine keeps, and nanobot's LICENSE, so every
later change to them reads as a diff against upstream.
A CI runner grants SYSTEM and the local Administrators explicitly on every new
directory, so removing inheritance leaves them, and the test that wanted the
owner alone failed there while passing elsewhere. Those two can open any file
on Windows anyway, as root can on Linux; what the rule protects against is
every other account. The test now reads the ACL as SDDL, by SID rather than by
names that change with the display language, and refuses inherited entries,
an unprotected list and any account but the owner, SYSTEM and Administrators.
A rename over a file fails on Windows with EPERM, EACCES or EBUSY while another
process holds either file for a moment, typically an antivirus scanning a file
that was just written. Eight places renamed a temporary file over its target
and none waited, so a lock record, a manifest, a seed or a secret could fail
to be written at random; the golden image builder's lock did, in a test run.
retryWhileInUse moves from the vm-manager's runner to packages/shared, so the
codes that mean "in use" live in one place, and replaceFile is built on it.
Every atomic replacement goes through replaceFile. On Linux the first try
succeeds and the code path is the same.
dot-agentd kills a POST /v1/exec command's process group when the request
that started it goes away, which is what makes a cancelled call or a tool cut
at the stop grace stop its command. Section 8.7 said the opposite (that the
command keeps running until its own timeout), and e2e step j asserted that
sentence, so it failed against a guest behaving as designed. The fact now
lives in section 5.2, section 8.7 points at it, and a dot-agentd test pins it.
Step j now checks the real guarantee: the interrupted call appears once, with
interrupted: true, and once the command's time is over no copy of it runs and
its marker file was never written.
Also fixes the e2e guest client, which read the exec answer's body twice.
Three faults in the new steps i and j, found reading them against the guest
before they ran:
- The seed carries the boot config as a JSON string inside the YAML
user-data, so the quotes around "token" are escaped there; the pattern
did not allow for that and would never have found the token.
- pkill -f invisible-dots-agent and pgrep -f 'sleep 8' run inside a
bash -lc whose own command line holds the same text. pkill and pgrep skip
themselves, not their parent shell: the kill would have hit its own shell
and the in-flight probe would always have said yes. The patterns are now
written so they cannot match the line that holds them
('invisible-dots-agent[.]mjs', 'sleep [8]').
Step i now also reads the restarted agent's own /health and /state through
its socket (the key pushed again, the same approval waiting) instead of only
the host's approvals table, and checks that the approval note reached the
model, which relays it. Step j waits for the command to finish in the guest
before counting what it wrote.
Step 1 of the context ceiling replaced consumed tool results oldest first.
On a task that looks a value up first and then reads large outputs, the
first result replaced was the short lookup itself; the large results then
fit under the trigger, so no summary or memory flush ever ran, and the value
was gone: the model answered that its result had been "already processed".
The prototype's compression test lost the vault code this way in one run
out of three.
Placeholders now take the largest consumed results first (the oldest first
among equals), so each one saves the most, and never a result under 1000
tokens (MIN_PLACEHOLDER_TOKENS, one constant): a short result costs little
and is often the very value a later step needs. The ceiling stays a
ceiling: if placeholders on large results are not enough, older images, the
summary with its memory flush and the shrinking of the newest round run as
before.
Tests: the shape of that test (one small fact, ten 30,000-character
results, the fact still sent verbatim and the request under the ceiling)
and largest-first ordering; both fail on the previous code. Architecture
8.6 updated. Vitest floors: linux 748, win32 751.
Crash tests with real processes (guest-runtime/engine/test/crash): a small
driver builds the engine on a real dot.db with a test-only fault seam and is
killed at a named point (SIGKILL on Linux, TerminateProcess on Windows); a
fresh process starts on the same dot.db and the test checks what ran, the
next request and the outbox. The points: during accept after the inbox
insert; after the model response before the assistant commit; after the
intent before execute; after execute before the result (approved and not,
replay-safe and not); during the summary call; after the summary before its
commit; a replay-safe call killed twice; and a second process started while
the first is alive. Resume is under a second, tool.called is exactly once per
answered call, and the outbox has no gap.
The Linux real-VM e2e (tests/e2e/run.ts) gains two steps that reach
dot-agentd directly (the forwarded port, the proof handshake, the Dot's token
from its seed) to do to a guest what the model may not do to its own
computer: step i ends the agent process while an approval waits, and after
systemd restarts it the same approval is still pending, the approved command
runs once (a counter file); step j ends it during a slow computer_exec, and
after the restart the event log has tool.called interrupted=true and the
command ran once (a marker file). The key-scan steps become k, l and m. The
README's step table and cross-references follow.
Vitest floors rise by the 11 crash tests (linux 746, win32 749).
The guest agent now runs on guest-runtime/engine. agent-runtime and policy
are deleted: their tests were ported to the engine when it was adapted, so
the vitest floors drop by the 33 duplicates removed here (linux 735, win32
738 with the 4 new tests). task-runtime stays the Dot's task queue.
WORKING_MEMORY_MESSAGES, the old 40-message window, leaves the shared
package with its last user.
Stopping: a prepare-sleep or a SIGTERM used to abort a tool in flight at
once, so a command or a click whose result was not recorded ran again after
the next boot. Now a model request in flight is abandoned, and a tool in
flight gets up to 20 seconds to finish and record its result (systemd's
TimeoutStopSec=30 leaves the rest for the browsers and the database). A tool
cut at the grace keeps its intent: the next entry of its unit reports it as
interrupted, or runs it again if it is replay-safe. A tool that ignores its
abort cannot hold the stop past the grace. A cancel still aborts both at
once.
Notices: the bundle is built with legalComments "none", so the license
texts of the npm packages it carries (BSD, ISC and MIT ones among them)
never reached the runtime disk. The build now writes
dist/THIRD_PARTY_NOTICES.txt from esbuild's metafile: this repository's
license, Open Multi-Agent's when a derived file is bundled, and the license
and notice files of every package an input comes from. No list is written
by hand. The runtime ISO stages it next to the agent and refuses to build
without it.
Tests: stop.test.ts (a tool finishing within the grace records its result;
a call cut at the grace runs once and is reported after the key is pushed
again), notices.test.ts, and the runtime ISO test now expects the notices.
Architecture 2, 4.2, 5.3, 8.4, 8.7 and 11.3 updated.
Defects of the upstream engine that the adapted one does not have, kept as
tests because each was found in practice and each is cheap to keep out:
- the task seed carries no task id and no title header (a "# Task: <id>"
header once induced a tool call named after the id);
- JSON in the assistant's text runs nothing: only the response's
tool_calls count;
- a one-word task with an ask tool suspends, survives a restart and runs
once approved;
- the engine cannot be constructed without a store: there is one entry
point, always durable, and DotRuntime now says so instead of failing
later on an undefined store.
Running out of steps fails the task (upstream reported success), which the
ported driver suite already asserts. Vitest floors: linux 764, win32 767.
A task could spend without bound: nothing stopped a model that repeats the
same calls, the step limit was the only cap, and a response cut by the
output limit ran its calls with truncated arguments.
- Repeated rounds: a round is the set of (tool, canonical arguments) of one
response with the results they got. The third identical round in a row
earns the model a notice; the same again within the unit stops it with
"stopped: the same tool calls returned the same results 3 rounds in a
row". Identical calls whose results change are not a loop. The streak and
the notices are read from the unit's own messages (from its start
message), so a restart keeps them and an earlier chat turn never counts.
This replaces upstream's in-memory detector (tool and text repetition over
a window, off by default): one loop detector.
- Cost cap: limits.max_cost_per_task_usd (default 1.00, 0.01 to 100),
checked before every model request, the summary and flush calls included,
against the usage persisted with every response, so it survives a
restart. A chat turn is capped on its own. A model that reports no cost is
logged once; the step limit still holds.
- A response cut by the output limit is stored without its tool calls,
followed by a notice asking for a shorter reply, and counts as a step.
Tests: defences.test.ts (seven, the restart cases through simulated
crashes). Architecture 7, 8.2 and 8.5 updated. Vitest floors: linux 760,
win32 763.
What a request carried was bounded by the number of messages (the last 40),
not by tokens: a few large tool results made a request of any size. The
summary strategy inherited from upstream was a trigger, not a ceiling: its
requests settled just above the budget, and its own summary call had no
bound at all.
New config field limits.context_tokens (default 32000, 4000 to 1000000).
A request is the system prompt, the unit's start message (the task seed or
the chat turn's user message, always whole), the newest summary and the
thread after it, read from dot.db after that summary, never whole. The
estimate covers the system prompt, the tool definitions, the messages and
1600 tokens per image, at the larger of 1/3 token per character and the
ratio the provider last reported for the model. Building stops at 0.75 of
the budget: consumed tool results become placeholders, oldest first, never
in the newest round; then a summary, cut where no call is separated from its
results so the verbatim tail fits 0.35 of the budget, made in requests of at
most 0.5 of it, stored capped at 0.15 (the mechanical fallback included),
after a memory flush that goes through the gate and only runs if its own
request fits; then the newest round's largest results are shrunk, head and
tail. A summary is also forced after 200 unsummarized messages. Above 0.9
of the budget, nothing is sent: the unit fails with a message naming the
budget. The usage of flush and summary calls counts toward cost, not steps.
agent/compression.ts holds what became of upstream's compression of
consumed results and summary strategy; the runner's old options for them
are gone, and so is the 40-message trim. The request attempts of section
8.7 are now counted per attempt of a step (its flush, summary and request
together), so a chunked summary does not exhaust them.
Tests: context.test.ts (eleven), including a property test over 500
random threads that no request, summary or flush exceeds the ceiling and
that calls stay paired and the start message pinned. Architecture 7, 8.5,
8.6 and 8.7 updated. Vitest floors: linux 754, win32 757.
A unit could end between the assistant commit and the results of its calls
(a failed write, a failure, a cancel) and leave a call without a result.
On the conversation thread that broke every later chat turn: the provider
refuses a request with a call and no result.
The completion, failure and cancel transactions now answer, first, every
call of the newest assistant message that has no result: "Not executed: the
unit ended before this call ran.", or the interrupted result (with its
tool.called) for a call whose intent shows it had started; and they delete
the thread's intents. The request builder does not repair a second time: it
asserts that every call is answered and fails the unit if not.
The first start on this engine, triggered by the absence of a config flag
(not by the migration, so a crash between the two cannot skip it), repairs
what the previous version left: the inbound replay runs first; old approval
rows get the position of their call; open calls in threads other than the
active unit's newest message are answered, or, in the middle of a thread
where no result can follow them, removed from their message as never run
(the store gains replaceMessage for that one repair); and the active unit's
first open call gets an intent unless its approval was pending, rejected or
decided by the replay. A run record without the new fields gets its start
message.
Tests: unit-end.test.ts (six). Architecture 8.1 and 8.7 updated. Vitest
floors: linux 745, win32 748.
The upstream round ran every call of a response at once and left an
aborted call uncommitted, to run it again after a restart. Three defects
followed: a call after one that needed approval ran before the person
decided; a crash between a tool and its result ran a command, a click or an
approved call a second time; and the approval note was appended before the
result was cut, so a long result lost it.
Now the calls of one response run one at a time, in the model's order, and
a call that needs approval stops the round. Before a call starts, its
intent is committed (thread, assistant message, call index, tool,
permission, decision, attempts); its result, the intent's deletion, the
approval's deletion and tool.called commit together once the call returned,
even if the unit was aborted meanwhile. On every unit entry, an intent whose
call is not executing in this process is a call a crash interrupted: a
replay-safe tool runs once more, anything else (and a replay-safe call that
stopped the agent twice) gets a result saying the outcome is unknown and a
tool.called with interrupted: true and the permission and decision of its
time. Approvals are found by the call's position, not by the provider's id,
which providers reuse across rounds.
Each model request of a step is counted in its own transaction before it is
sent and reset by the assistant commit; the fourth fails the unit, so a
response whose commit kills the process is paid for at most three times. A
request abandoned on purpose does not count.
The registry cuts a result's text once (the loop no longer cuts it again),
and the note follows the cut. The registry's own not-offered check is gone:
the gate is the only one. A rejection reads "Rejected by the user: <note>".
Tests: tool-step.test.ts (eleven, eight of them failing on the previous
engine) with simulated crashes at named points of the commits; the runner
test now checks the order. Architecture 8.3 and 8.4 updated, new 8.7.
Vitest floors: linux 739, win32 742.
accept() wrote the inbox row, applied the event and marked it processed in
three separate statements, and nothing replayed an unprocessed event at
start. A crash between the first two lost an approval decision: the
redelivery was ignored as a duplicate and the Dot waited forever. A
task.created could be lost the same way.
engine/src/dot/inbound.ts now has one apply() for task.created,
approval.received and system.event. accept() runs the inbox insert, apply
and the processed mark in one transaction; what must happen outside the
database (aborting the unit in flight on a cancel, going idle) comes back
as post-commit actions, run only after COMMIT, so a rolled back cancel has
aborted nothing. At start, every unprocessed non-chat inbox row goes
through the same apply, each in its own transaction, which also repairs a
database left by the old code. user.message stays pending until its chat
turn is answered, as before.
A test-only fault seam on the driver's constructor names the points where
a test makes a commit fail; the product never sets it. Tests: accept is all
or nothing; an unprocessed approval.received and task.created are applied
at start; a second decision is ignored; a cancel that rolls back has not
aborted the unit (four fail on the previous driver). Architecture 5.4
states the guarantee. Vitest floors: linux 728, win32 731.
Nothing stopped a second agent process from opening dot.db and interleaving
its writes with the first one's. DotStore now opens the file in SQLite's
EXCLUSIVE locking mode and takes the write lock at once with an empty
IMMEDIATE transaction: a second opener fails with DotStoreLockedError
("another agent owns <path>"), and the kernel releases the lock the moment
the owner dies, so a restart needs no lease to wait out. No pid, boot id or
per-commit check is needed.
Migration 2 (append-only) adds tool_intents, keyed by (thread, message_id,
call_index) because providers do not guarantee unique call ids across
rounds, and context_summaries; and rebuilds pending_approvals without the
UNIQUE on tool_call_id, with message_id and call_index (NULL on old rows)
and a unique index on the position. The store gains the intent, summary and
approval-position queries the engine needs, and reads a thread after a
given message.
Tests: a second store fails at open; the lock is free as soon as a child
owner process is killed; a version 1 database keeps its approvals; intents
count attempts; summaries bound the read (vitest floors: linux 723, win32
726). Architecture 4.2 states the ownership rule.
Two functions cut tool results with two different markers: capText in the
tools package and truncateToolResult in the model client, and the second
let a result grow past the limit by its own marker. truncateText in the
shared package replaces both: the result never exceeds the limit, the
marker says how much the model does not see, and it keeps the head or, on
request, the head and the tail.
Every tool now declares replaySafe in the shared tool table: running it
twice with the same arguments has the effect of running it once. Reads,
screenshots, memory, identity list/launch/close and files_write (same
content, same path) are replay-safe; commands, navigation, clicks, typing
and identity create/delete are not.
tool.called gains an optional interrupted: true, for a call whose outcome
is unknown because the agent stopped while it ran. The host parses outbound
events with a strict schema that drops unknown keys, so the field has to be
in it to reach the event log.
Architecture 5.4 lists the field; 8.3 gets the replay column. Tests: the
two truncation tests move to the shared package's truncateText tests, plus
the replay-safe table and the parsing of interrupted (vitest floors: linux
718, win32 721).
The remaining upstream files now compile and run here, so the engine leaves
the typecheck exclusion:
- the model client is openrouter-client; upstream's provider adapter
interface is gone;
- one message model: the OpenAI chat shape the client sends and dot.db
stores, instead of content blocks plus converters;
- no Zod: the tool registry, JSON Schemas and validation are the ones of the
tools package and the shared tool table; tool/framework.ts is the contract;
- the stores are dot.db, synchronous: the checkpoint is the thread itself,
one transaction per boundary with its outbox rows; an approval is a
pending_approvals row decided by one compare-and-set that keeps the note;
the run record is the unit in flight. The key-value store, its in-memory
implementation, the run store and utils/abort.ts are deleted;
- everything is ASCII.
The runner keeps upstream's shape (phase derived from what is committed, a
parallel round of tool calls, the optional loop detector, compression of
consumed results and summary strategy). The Dot's own code sits in
engine/src/dot: the state machine moved from agent-runtime on top of the
runner, the system prompt, the request builder and the policy gate as a
pure function. The agent itself still runs on agent-runtime.
Tests: agent-runtime's suite (26), its working-memory tests (4) and the
policy tests (3, now against the gate) run against the engine; one of them
no longer depends on the order in which a parallel round commits its
results. runner.test.ts covers the parallel round, loop detection, the
result markers and the summary. The repository test now also requires ASCII
and imports from node built-ins and this workspace only. Vitest floors rise
by the 39 new tests (linux 716, win32 719).
The imported engine carries a multi-agent framework around the one loop a
Dot needs. This removes streaming, tracing, the run journal, delegation and
teams, the shell and workspace of upstream's built-in tools, structured
output, external backends, provider-specific options, tool grants, the
batch executor, and the sliding-window and rule-based compaction
strategies, with the functions modelled on context-chef (groupIntoTurns,
stripMediaBlocksForSummary).
Seven whole files go too: the four orchestrator files (teams, plans,
routing, retries and parallel scheduling over upstream's agent pool and
scheduler, none of which was imported), the in-memory task graph of
task/queue.ts and task/task.ts (a Dot's task queue stays the one persisted
in dot.db), and agent/agent.ts, the agent object built on the provider
adapters. They cannot run without upstream modules that were never
imported, and the Dot has no use for them.
types.ts keeps only what the remaining files reach. The engine is still
excluded from the typecheck; its adaptation follows. UPSTREAM.md lists the
cuts; the context-chef notice stays because the history keeps that text.
The repository test now also checks that none of it is left in the engine
(vitest floors: linux 677, win32 680).
Each of the 23 files imported from upstream now starts with a three-line
header naming Open Multi-Agent, its MIT license and its copyright holders,
and pointing to guest-runtime/engine/LICENSE and UPSTREAM.md. The header
carries no version or commit: UPSTREAM.md is the one place for those.
tests/repo/vendored-engine.test.ts now also requires the header on every
file under engine/src outside src/dot/, and forbids it inside src/dot/,
which is where this repository's own engine code goes. The notices and
architecture section 11.3 name the header as what marks a derived file.
Vitest floors rise by the new test (linux 676, win32 679).
The Dot's agent engine is derived from Open Multi-Agent (MIT). This commit
imports, byte for byte from the git objects of upstream commit 3563a93
(@open-multi-agent/core 1.21.1), only the 23 source files the engine is
built from, plus upstream's LICENSE. Every blob id matches upstream's and is
listed in guest-runtime/engine/UPSTREAM.md, with the version, the commit and
the tree ids.
The files do not compile against this repository yet, so the root
typecheck excludes guest-runtime/engine/src until they are adapted. The
English gate covers them already.
Attribution: guest-runtime/engine/LICENSE is upstream's file (kept -text in
.gitattributes); THIRD_PARTY_NOTICES.md at the root carries it verbatim,
plus context-chef's MIT notice, because runner.ts as published contains two
functions modelled on @context-chef/core 4.2.1. The README licence line and
architecture section 11.3 point there; section 2 lists the new package.
tests/repo/vendored-engine.test.ts checks the license bytes, the notices,
UPSTREAM.md and that the package has no npm dependency. The vitest floors
rise by its 4 tests (linux 675, win32 678).
"//":"What each suite must reach on each host, read by .github/scripts/test-guard.mjs in CI (tests.yml) and in the pre-push hook. Raise a floor when tests are added; lowering one is a decision to write down in the commit that does it. Linux skips only the tests that drive a real Windows PowerShell; a Windows host compiles dot-agentd's unix-only test files out and skips the two Go tests that need a Linux guest. The playwright floor is the web client's browser tests (the web job of tests.yml; the same eighty-eight run on a Windows host, which is where they are developed). The pytest floor is the Python engine's (invisible_engine_dots, the engine job of tests.yml, Linux only, nothing may skip). The whatsapp floor is the suite that needs the real WhatsApp client, an opt-in install (npm run test:whatsapp, the whatsapp-client job of tests.yml, which installs the client and runs it with PostgreSQL, so the pg runs of the auth state count); a host without PostgreSQL reaches the win32 number.",
"vitest":{
"linux":{"min_passed":2209,"allow_skipped":"^generated PowerShell on a real Windows PowerShell "},
--notes "The golden image of the inputs ${tag#golden-}, built by the golden image workflow from ${GITHUB_SHA}. invisible-dots image build downloads it when a checkout's inputs have this digest. It holds Ubuntu 24.04, the software guest/image-builder/pins.json and the engine's lock name, and the release of invisible-playwright-mcp its manifest records, each under its own license (THIRD_PARTY_NOTICES.md)."
This project follows the [Contributor Covenant, v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
## Our Pledge
We pledge to make participation in our community a harassment-free experience for everyone.
## Standards
Examples of behavior that contributes to a positive environment:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
Examples of unacceptable behavior:
- The use of sexualized language or imagery
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
## Enforcement
Instances of unacceptable behavior may be reported by contacting the maintainer at **[email protected]**. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
The maintainer is obligated to maintain confidentiality with regard to the reporter of an incident.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
- **Setup or `doctor` fails?** Open a [setup report](https://github.com/feder-cr/invisible_dots/issues/new?template=01-setup.yml).
- **A Dot, the web UI or the command line misbehaves?** Open a [bug report](https://github.com/feder-cr/invisible_dots/issues/new?template=02-bug.yml).
- **Idea?** Open a [feature request](https://github.com/feder-cr/invisible_dots/issues/new?template=03-feature.yml).
- **Security issue?** Do **not** open a public issue: see [SECURITY.md](SECURITY.md).
- **A site detects or blocks the browser?** That belongs to
[invisible_playwright](https://github.com/feder-cr/invisible_playwright/issues), the Dot's browser.
## Development
Everything is in [the guide's development section](docs/guide.md#development-and-tests). In short:
```sh
npm ci
npm run typecheck
npm test
git config core.hooksPath .githooks # the pre-push gate: typecheck, vitest, go test, prose checks
```
The engine (`invisible_engine_dots/`, `pytest`, Linux only) and dot-agentd (`guest/dot-agentd/`, `go test ./...`)
have their own suites; [docs/architecture.md](docs/architecture.md) explains every component.
## Pull requests
1. Branch from `main`; one logical change per PR.
2. Add or update the tests for any change of behaviour. A test that stops running fails CI: the counts are held
to `.github/test-floors.json`.
3. Write the commit message as the repository does: `area: what is now true`, for example
`scheduler: a task the claim skipped is claimed when the row is free`.
4. Update the README or `docs/` when what a person sees changes. The README promises nothing it cannot
support, and CI checks it.
5. Every check must be green before merge.
## License
By contributing, you agree that your contributions are licensed under the MIT License ([LICENSE](LICENSE)).
<img alt="invisible_dots, an open-source, self-hosted alternative to OpenAI Dots, Meta Muse, Grok Bot, Manus Cue and Claude Cowork. An animation of what a Dot does: asked once in its chat to save a shop's invoices every month and send the total to Telegram, it works on a computer of its own (a desktop, a terminal, files and a Firefox that keeps the shop's login), writes the steps down as a skill, asks before it adds the monthly automation, and then sends the total every month; several Dots, one computer each." src="docs/images/hero-light.gif" width="100%">
</picture>
</div>
---
Open-source, self-hosted alternative to OpenAI Dots, Grok Bot. Built to be undetectable by anti-bot systems.
Windows, in PowerShell:
## Quickstart
You need Node 24+, Go 1.25+, Git and hardware virtualization (x86-64), plus an OpenRouter key.
When a web agent fails, the model is rarely why. The page never loaded, a
challenge appeared, the login expired, the click did not land. All of that
happens in the browser, before the model gets to think.
Anything that needs a computer and a person's judgement, for as long as it takes:
So dots is built around one:
> Open a browser identity called research, go to https://example.com and tell me the page's title and its first
> sentence. Leave the browser open.
- **A real Firefox engine, patched in C++.** The fingerprint is decided inside
the engine, not painted over with JavaScript that a page can inspect.
- **One identity per seed.** Screen, fonts, GPU, timezone and language agree
with each other, and `--seed` gives back the same person on every run.
- **Nothing for a page to find.** No WebDriver flag, no DevTools protocol, no
automation globals in the page.
- **A person's hands.** The pointer travels to what it clicks and keys are
pressed one at a time, so every event the page receives is a trusted one.
- **A browser that remembers.** `--profile-dir` keeps logins and cookies from
one run to the next.
- **Where it connects from is who it is.** With `--proxy`, the timezone and the
language follow the exit.
> Every morning, check one-way fares from Milan to Lisbon for the next two weeks, write them to
> ~/workspace/fares.csv and tell me the cheapest day.
The model is any model on OpenRouter, and `--model` changes it.
> Log in to the shop with the shopping identity, download this month's invoices to ~/documents, and remember where
> the invoices page is for next time.
## What to ask it
## What a Dot has
> Go to `<paste the URL>`. One way, Milan to Lisbon, economy, one adult. Check
> every date from the 12th to the 16th of next month and read the cheapest fare
> for each day. If a date has no availability, say so. Do not guess a number.
| | |
|---|---|
| **[A computer of its own](docs/guide.md#what-a-dot-can-do)** | A hardware-accelerated VM with a Linux desktop and a persistent disk. It sleeps when idle and wakes for the next message, task or automation. |
| **[A browser that is not blocked](docs/guide.md#the-browser)** | [invisible_playwright_mcp](https://github.com/feder-cr/invisible_playwright_mcp): Firefox patched in C++, the fingerprint set inside the engine. Each identity keeps its own cookies and logins. |
| **[Memory and skills](docs/guide.md#what-a-dot-can-do)** | It writes its own notes and how-tos in its home folder, as Claude Code does, and reads them on the next task. |
| **[Your MCP servers](docs/guide.md#mcp-servers)** | Any MCP server you declare, a program on its computer or a URL, as in Claude Code. Its keys stay out of the config. |
| **[Permissions you set](docs/guide.md#approvals)** | Every tool belongs to a permission: allow, ask or deny. An ask waits in your Inbox, survives a restart and runs the call once. |
| **[Tasks and automations](docs/guide.md#the-web-ui)** | A queue with priorities and start times, and its own recurring jobs, for which its computer is started on time. |
| **[Many ways to reach it](docs/guide.md#talk-to-it-from-your-phone)** | Web UI, command line, HTTP API with live events, Telegram, and WhatsApp as an opt-in. |
| **[Nothing lost on a crash](docs/guide.md#how-it-works)** | A restart or a `kill -9` keeps every message and task you saw accepted, and a tool call cut short is never run twice. |
// The host report `invisible-dots doctor` prints: what is missing for a Dot to run, and the command that fixes it. It runs QEMU's accelerator probe, so it takes a moment:
// one run at a time, and a request that arrives while it runs shares its answer (the onboarding checklist re-checks and polls).
// The codes to scan and how the link ends, as server-sent events of `ChannelLinkFrame`. The code is a way into the account for as long as it is shown: it is not stored and the reply is never cached.
/** Where every setting is read from; default `process.env`. */
env?: Record<string,string|undefined>;
/** Overrides INVISIBLE_DOTS_LISTEN; port 0 picks a free port (tests). */
listen?: string;
logger?: Logger;
/** The VM layer; default the real one over QEMU. Tests pass a fake. */
driver?: ComputerDriver;
/** Replaces single dependencies of the host report (QEMU discovery, the runner, the disk, the images); the OpenRouter row always asks the Scheduler. Tests pass fakes. */
doctor?: Partial<DoctorDeps>;
/** Passed through to the Scheduler (timers, lifecycle and dispatcher tuning). */
it("the skills are the engine's, the built-in ones and the Dot's own, each with its whole file",async()=>{
constdot=awaitreadyDot("skilled");
constguest=driver.guestOf(dot.id);
constown={name:"shop-login",description:"Log in to the shop.",source:"dot"asconst,path:"/home/dot/skills/shop-login/SKILL.md",content:"---\nname: shop-login\n---\n"};
it("refuses with a status and a message that never carry the token: no token, a wrong one, a malformed one, an unreachable Telegram, a bot in use",async()=>{
it("keep a failed verdict too, with the command that fixes it",async()=>{
const{checks,verified}=awaitsetup({ok: false,reason:"it hashes to the wrong digest",fix:"delete it and run invisible-dots image build"});
constrows=awaitchecks();
expect(rows[0]).toMatchObject({id:"golden-image",status:"failed",detail:"it hashes to the wrong digest",fix:"delete it and run invisible-dots image build"});
awaitchecks();
expect(verified).toHaveLength(2);
});
it("answer missing without hashing anything when there is no image",async()=>{
/** What `status` says about the Dot's automations: when the next one is due, or that the person's stop has paused them (when one was due: a Dot with none has nothing to pause). */
/** How a person is told to finish a pairing on each channel: Telegram's link opens the bot with a Start button, WhatsApp's opens a chat with the words ready to send. */
out(dot,`updated Dot ${dot.name} (config version ${dot.config_version})\n`);
returnEXIT.ok;
}
case"delete":{
constname=need(args,0,"<dot>");
noArguments(args.slice(1),"delete <dot>");
if(values.yes!==true){
thrownewUsageError(
`delete destroys Dot ${name}'s computer and its disk, with every file, memory note and browser identity on them, and its channels; it cannot be undone. To do it: invisible-dots delete ${name} --yes`,
);
}
constc=awaitapi();
constdot=awaitc.getDot(name);
constanswer=awaitc.deleteDot(dot.id);
out(answer,`deleting Dot ${dot.name}; what it did stays in its log: invisible-dots logs ${dot.id}\n`);
constvalue=values.clear?null:awaitsecretFromInput(io,{prompt:`value of ${secretName} for the MCP server ${server}`,noun:"secret",command,spaces: true});
out(result,`${secretName} of the MCP server ${server}${value===null?"cleared":"stored"} for Dot ${result.dot_id}; a running Dot starts the server again with it\n`);
out(result,result.proxy?`VM proxy stored for Dot ${result.dot_id}; it is used from the Dot's next start\n`:`Dot ${result.dot_id} goes out directly from its next start\n`);
returnEXIT.ok;
}
if(kind!=="openrouter")thrownewUsageError(`unknown secret "${kind}": openrouter, proxy or mcp`);
if(args.length>1){
thrownewUsageError("the key is read from stdin, never from arguments (they end up in shell history and ps)");
}
constkey=awaitsecretFromInput(io,{prompt:"OpenRouter API key",noun:"key",command: STORE_OPENROUTER_KEY});
thrownewUsageError(`cannot add "${kind}" with a token: only telegram is supported there; WhatsApp is linked with "invisible-dots channel link whatsapp --dot <dot>"`);
}
if(args.length>2)thrownewUsageError("the token is read from stdin, never from arguments (they end up in shell history and ps)");
constname=dotName();
consttoken=awaitsecretFromInput(io,{prompt:"Telegram bot token from @BotFather",noun:"token",command: addTelegramChannel(name)});
"note: Telegram chats are not end-to-end encrypted; Telegram can read what you and the Dot write there.\n",
);
returnEXIT.ok;
}
case"link":{
constkind=need(args,1,"whatsapp");
if(kind!=="whatsapp")thrownewUsageError(`cannot link "${kind}" by scanning a code: only whatsapp is linked that way; telegram takes a token ("invisible-dots channel add telegram --dot <dot>")`);
if(args.length>2)thrownewUsageError("channel link takes only the channel and --dot <dot>");
constname=dotName();
constc=awaitapi();
awaitc.linkWhatsApp(name);
io.stderr(
"WhatsApp: this links the number as a device of a personal account through an unofficial client, which WhatsApp can answer by banning the account. Use a number of its own, not the one you live on.\n"+
"On the phone: WhatsApp > Settings > Linked devices > Link a device, then scan the code below (it is replaced every few seconds).\n",
?`open this link on the device where you use ${kind}, then ${PAIRING_WORDS[kind].action} (valid until ${pairing.expires_at}):\n ${pairing.deep_link}\nor send ${PAIRING_WORDS[kind].to}: ${pairing.message}\n`
:`pairing code ${pairing.code}, valid until ${pairing.expires_at}\n`,
);
returnEXIT.ok;
}
case"remove":{
constkind=channelKind(need(args,1,"telegram"));
constname=dotName();
await(awaitapi()).removeChannel(name,kind);
out({removed: true},`unlinked ${kind} from Dot ${name}: ${kind==="whatsapp"?"the linked device's keys":"its token"} and paired people are deleted\n`);
returnEXIT.ok;
}
default:
thrownewUsageError(`unknown channel subcommand "${what}": use add, link, list, pair or remove`);
/** A step either went through (and says what it did) or stopped the run (and says what to do). */
exportinterfaceStepResult{
ok: boolean;
lines: string[];
}
exportinterfaceBuildDeps{
run: Runner;
/** The environment the builds start from; the Go build adds its own variables. */
env: Record<string,string|undefined>;
repoRoot: string;
/** The program that runs the web build script: the node running this command. */
node: string;
/** Whether the web client is built completely (`locateWebBuild`). */
webBuilt():Promise<boolean>;
}
/**
* How to get Go: both hosts' commands in one line, so that no platform check is needed to choose one. setup never
* runs it (the Windows installer and snap each ask for administrator rights of their own, and setup asks once).
*/
exportconstGO_INSTALL_HINT="install it: on Windows `winget install -e --id GoLang.Go`, on Linux `sudo snap install go --classic`, or see https://go.dev/dl";
/** Go downloads its toolchain when go.mod asks for a newer one, and compiles the daemon from a cold cache. */
return{ok: false,lines:[`building the web client failed (${why(answer,WEB_TIMEOUT_MS)}; its output is above)`,`after fixing it, run: invisible-dots setup --all`]};
}
if(!(awaitdeps.webBuilt())){
return{ok: false,lines:[`the web client build finished but its server files are not where invisible-dots looks (apps/web/.next/standalone); build it with: ${WEB_BUILD_COMMAND}`]};
lines.push(`it went to ${result.install_dir}, where an earlier QEMU was installed: set ${ENV.QEMU_DIR}=${result.install_dir} so invisible-dots uses it`);
` if ($hash -ne ${psQuote(options.installer.sha256.toLowerCase())}) { throw "the QEMU installer is not the one that was verified (its SHA-256 is $hash)" }`,
/** What `prepareHost` ends with: the doctor report once QEMU and the accelerator are ready, or the exit code of the run that could not get them ready. */
returnsend(res,400,{error:"invalid_credentials",message:"Telegram refused the bot token: it is wrong, or it was revoked in @BotFather. Paste a current token."});
if(whatsappOff)returnsend(res,400,{error:"invalid_request",message:'no "whatsapp" channel: it is off: set INVISIBLE_DOTS_WHATSAPP=1 and restart the server to turn it on'});
"open this link on the device where you use telegram, then press Start (valid until 2026-10-02T08:10:00.000Z):\n https://t.me/dot_helper_bot?start=ABCD2345\nor send the bot: /start ABCD2345\n",
);
expect((awaitcli(["channel","pair","whatsapp","--dot","fare-watch"])).stdout).toBe("pairing code WXYZ6789, valid until 2026-10-02T08:10:00.000Z\n");
expect((awaitcli(["channel","pair","carrier-pigeon","--dot","fare-watch"])).stderr).toMatch(/unknown channel "carrier-pigeon": use telegram or whatsapp/);
expect((awaitcli(["channel","remove","whatsapp","--dot","fare-watch"])).stdout).toBe("unlinked whatsapp from Dot fare-watch: the linked device's keys and paired people are deleted\n");
"open this link on the device where you use whatsapp, then press Send (valid until 2026-10-02T08:10:00.000Z):\n https://wa.me/15550001111?text=pair%20WXYZ6789\nor send the number: pair WXYZ6789\n",
lines:["QEMU installed","it went to D:\\Tools\\qemu, where an earlier QEMU was installed: set INVISIBLE_DOTS_QEMU_DIR=D:\\Tools\\qemu so invisible-dots uses it"],
});
});
it("says the elevated step ran nothing when it could not make its own directory safely",async()=>{
/** How long a started VM may take to pass the READY procedure. Default 10 minutes (a first boot runs cloud-init). */
readyTimeoutMs: number;
/** Interval between health polls while waiting for READY. Default 2 s. */
healthPollMs: number;
/** Per-request timeout of a health poll. Default 5 s. */
healthRequestTimeoutMs: number;
/** First retry delay of the event pump after a failure; doubles up to `pumpMaxRetryMs`. */
pumpRetryMs: number;
pumpMaxRetryMs: number;
/** Time the agent gets to flush its state before a shutdown (section 9.5). Default PREPARE_SLEEP_TIMEOUT_MS of packages/shared, which the engine's own steps fit inside. */
prepareSleepTimeoutMs: number;
/**
* How long before an automation is due a stopped computer is started, and how close to one a running computer is
* kept awake (section 9.5). It is the time a start takes to reach READY with some to spare; the passes that look
* for the Dots to start run every few seconds, so the computer is up between this long and a pass before the run.
/** Log `dot.updated` for the status ERROR (the other statuses are told by the events of what caused them); the caller writes the row after its events. */
/** The Dot's tasks, the newest created first, at most TASK_LIST_LIMIT a page; `before` (the id of the last task of the previous page) goes on, older. */
* Run a guest call and turn its failure into an API error: the guest's own 4xx passes through, and so do the
* engine's coded identity answers that are not 4xx (`IDENTITY_ERROR_STATUS` of packages/shared: `busy` and the browser's own failures): a coded answer is the engine
* speaking, not a silence, so the UI can tell a busy or crashed browser from an unreachable computer.
thrownewControlPlaneError(409,"permission_gone",`the Dot's config no longer has the permission ${existing.permission}, so it cannot be allowed always`);
it("the optional keys of the events are all written by the engine: a terminal, an interrupted call, a task's calls, an approval with and without a task, a reply to a message, the spend",()=>{
INSERTINTOpublic.eventsVALUES(7,'dot_01m4ceepkrt609r0tde6hm21hb','user.message','{"text": "Remember: my favourite colour is teal.", "message_id": "msg_01m4ceepq4w4wdyp8tvy7v060r"}','host',NULL,'2026-10-08 00:26:17.880657+00');
INSERTINTOpublic.eventsVALUES(8,'dot_01m4ceepkrt609r0tde6hm21hb','message.assistant','{"text": "echo: Remember: my favourite colour is teal.", "guest_ts": "2026-10-08T00:26:17.720Z", "in_reply_to": "msg_01m4ceepq4w4wdyp8tvy7v060r", "guest_event_id": "evt_01m4ceepqrxs5240rvb8cmrtee"}','guest',2,'2026-10-08 00:26:17.899743+00');
INSERTINTOpublic.eventsVALUES(9,'dot_01m4ceepkrt609r0tde6hm21hb','task.created','{"task_id": "task_01m4ceepr4pcpyejkrwmwszmvy", "priority": 0, "description": "List the workspace."}','host',NULL,'2026-10-08 00:26:17.910436+00');
INSERTINTOpublic.eventsVALUES(14,'dot_01m4ceepkrt609r0tde6hm21hb','task.created','{"task_id": "task_01m4ceeptfsmdeddevy4770sbk", "priority": 0, "description": "Delete the old identity."}','host',NULL,'2026-10-08 00:26:17.981828+00');
-- Data for Name: inbound_events; Type: TABLE DATA; Schema: public; Owner: -
--
INSERTINTOpublic.inbound_eventsVALUES(1,'msg_01m4ceepq4w4wdyp8tvy7v060r','dot_01m4ceepkrt609r0tde6hm21hb','user.message','{"text": "Remember: my favourite colour is teal."}','2026-10-07T09:00:00.000Z',NULL,NULL,'2026-10-08 00:26:17.880657+00','2026-10-08 00:26:17.892461+00','2026-10-08 00:26:17.899719+00',NULL,NULL,0,NULL,NULL);
-- Data for Name: tasks; Type: TABLE DATA; Schema: public; Owner: -
--
INSERTINTOpublic.tasksVALUES('task_01m4ceepr4pcpyejkrwmwszmvy','dot_01m4ceepkrt609r0tde6hm21hb','List the workspace.',0,'COMPLETED','2026-10-08 00:26:17.910436+00',NULL,'2026-10-08 00:26:17.918409+00','2026-10-08 00:26:17.956503+00','done: List the workspace.',NULL,0);
INSERTINTOpublic.tasksVALUES('task_01m4ceeptfsmdeddevy4770sbk','dot_01m4ceepkrt609r0tde6hm21hb','Delete the old identity.',0,'COMPLETED','2026-10-08 00:26:17.981828+00',NULL,'2026-10-08 00:26:17.989407+00','2026-10-08 00:26:18.100452+00','approval approved',NULL,0);
INSERTINTOpublic.tasksVALUES('task_01m4ceepz48cetk8s7k7zwkst5','dot_01m4ceepkrt609r0tde6hm21hb','Delete the shop identity.',0,'WAITING_APPROVAL','2026-10-08 00:26:18.121808+00',NULL,'2026-10-08 00:26:18.126436+00',NULL,NULL,NULL,0);
INSERTINTOpublic.tasksVALUES('task_01m4ceeq0s2zdfycr7vwnwy9s8','dot_01m4ceepkrt609r0tde6hm21hb','Check the fares again.',0,'CANCELLED','2026-10-08 00:26:18.171462+00',NULL,NULL,'2026-10-08 00:26:18.176182+00',NULL,'cancelled by the user',0);
constresolved=awaitscheduler.resolveApproval(pending!.id,"approve",{note:"after the upgrade"});
expect(resolved.status).toBe("approved");
constqueued=(awaitdb.query<{type:string;data:{approval_id?: string}}>("SELECT type, data FROM inbound_events WHERE dot_id = $1 AND sent_at IS NULL",[watcher.id])).rows;
/** The golden image and the runtime ISO against their manifests, one result each. */
images():Promise<DoctorCheck[]>;
/** Where the built web client is, and the first file of it that is missing. Only a process that serves the web client (`invisible-dots server`) has one: without it the report has no web row. */
webBuild?():Promise<WebBuild>;
/** Whether an OpenRouter key is stored. */
openRouterKey():Promise<DoctorCheck>;
}
exportconstMIN_NODE_MAJOR=24;
/**
* One golden image (a few GiB once provisioned) plus the overlays of a few
* Dots, which grow with what each Dot stores. Below this a first `image
* build` or a busy Dot runs the disk full.
*/
exportconstMIN_FREE_BYTES=20*1024**3;
/**
* The probe boots the empty machine's firmware, which takes a fraction of a
* second with a working accelerator (0.2 s measured with QEMU 8.2 and KVM);
* a QEMU still running after this long has a virtual CPU that does not run.
*/
exportconstPROBE_TIMEOUT_MS=30_000;
constVERSION_TIMEOUT_MS=15_000;
/**
* Starts QEMU with the accelerator and the CPU model of the Dots (section
* 3.4) on their machine type with no devices at all, and lets the virtual
* CPU run: the firmware finds nothing to boot, `-boot reboot-timeout=0`
* makes it reset at once, and `-no-reboot` turns that reset into QEMU
* exiting with code 0. So exit code 0 means the accelerator opened AND ran
* guest code, which a QEMU held before its first instruction could never
* show; there is no monitor to talk to, the same as for a Dot. `-accel` is
* given alone, so QEMU cannot fall back to software emulation.
*
* Measured with QEMU 8.2.2 and KVM: exit 0 after 0.2 s, and the firmware's
* debug output reads "No bootable device. Retrying in 0 seconds. Rebooting."
* Without `-no-reboot`, or without the reboot timeout, QEMU never exits.
*
* Not `-machine none`: measured with QEMU 11.1 on Windows, WHPX with
* `-machine none` aborts with "X86_MACHINE: Object ... is not an instance of
* type x86-machine" (exit 3) even where WHPX works, and it has no CPU to run.
if(answer.code===0&&!answer.timedOut)returnresult("accelerator-probe",label,"ok",`${command} ran the firmware and exited`);
constwhy=answer.timedOut
?`did not exit within ${PROBE_TIMEOUT_MS/1000} s, so the virtual CPU does not run${firstLine(answer.stderr)?` (QEMU said: ${firstLine(answer.stderr)})`:""}`
Loaded 100 of 968 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.