Repository navigation
FormREC 0.12.0: the Mac app finds Claude Code, FormVis and FormPortal tour demos, and agents that can do everything a person can - #13
Merged
Conversation
…s as jobs, and the window hears of their changes (0.12.0) The owner's rule is that Claude Code and the other agents can do everything a person can do in FormREC. The engine had 124 MCP tools but nothing reached the window: no list or run of its command registry, no way to start a long tool without waiting on it, and the window showed an agent's change only after the person navigated. - src/window/bridge.ts: the window keeps GET /api/window/stream open; the engine sends it list, describe and run calls and the window answers on POST /api/window/result. The window that took focus last answers. The same stream carries `changed` notices. Commands whose risk is destructive, external or privacy ask the person in the dock's consent dialog every time, whoever the agent is; a blocked policy refuses them. - formrec_window_commands (read only) and formrec_window_command_run: in the app through the bridge, from `formrec mcp` (stdio or --http) through the running app's /api/window/commands and /api/window/run with the run token. - formrec_job_start, formrec_job_status, formrec_job_cancel: any other tool in the background with a job id to poll; its arguments are checked with its own schema, its result is what it would have answered, and it may run only what the server offers (scope and core filters hold). - buildServer announces every successful mutating tool's recording ids to the window, so changes show at once; the relay's bridge gets none of this (no window caller), and read-only tokens stay read-only.
… preference is a typed command the agent bridge runs, and agents' changes show at once (0.12.0) The command registry had about 60 commands with no arguments, and much of what a person clicks was not in it: the sidebar's pages, the menu rows that only had an act, the library card and player More menus, the player's transport and panels, Preferences and the client's own settings. - registry.ts: a Command may declare typed params (string, number, boolean, enums fixed or computed at run time, ranges), a risk (read, change, destructive, external, privacy) and why it cannot run now; run takes the arguments and may return a small JSON value. - agent-commands.ts: nav.go (31 pages, including a recording, a demo, the tour, the editors), window.state, recording.action (each recordingActions entry, with its own risk), player.play, player.pause, player.seek (keeps playing or paused unless told), player.panel, settings.open, prefs.get, prefs.set (theme, default mode, countdown, limit, check-in, hidden controls, quality, dock, menus in the window), studio.configure (layout, target, quality), and every File, View and Help row that was not a command. The commands other modules register get a risk: studio.start, camera, screenshot and the desktop controls are privacy, cancel and rewind are destructive, so the person is asked before any of them. - agent-bridge.ts: the window's end of /api/window/stream; it lists commands compactly (args as `name?: type`), describes one in full, checks arguments before running, and answers with the command's value cut at 16 KB. - app.ts: on an agent's change the counts follow and the library, Home, Shared, Notifications, Insights or the open player is drawn again (the player keeps its moment and its paused state); a burst is drawn once; the studio and the editors are never redrawn under the person. Checked live with a window in Chromium and an outside agent over /mcp and over stdio: every sidebar page, the tour, player seek and panels, theme and Preferences, File > New Audio Recording, studio layout, a declined studio.start, an import, rename and comment shown at once, a trash that asked first, and an export job polled to done.
…all folders (0.12.0) The desktop app started from the Finder or the Dock inherits launchd's PATH (/usr/bin:/bin:/usr/sbin:/sbin). The dock engine found claude, codex, cursor-agent and agy with a bare scan of that PATH, so a Claude Code installed by npm, Homebrew, nvm or the native installer showed as "not installed" in the Ask tab while FormDeck and FormVis found it. src/dock/lookup.ts ports the family's agent_lookup.py 1.1.0 (FormDeck, FormVis): the engine's PATH, then the known install folders (npm prefix from NPM_CONFIG_PREFIX or ~/.npmrc, ~/.npm-global, ~/.local/bin, nvm, fnm, asdf, mise, volta, bun, pnpm, ~/.claude/local, Homebrew, and on Windows %APPDATA%\npm, %LOCALAPPDATA%\npm and the like), then the person's own shell PATH ($SHELL -l -i, falling back to -l, 5 s each, in its own session, killed with its group at the deadline; the registry Path on Windows), asked once at engine start and kept. An empty answer is asked again in the background after a minute. The status route reports path and how it was found, or where it looked. Claude Code and the other agent tabs start with a PATH of the program's own folder, the shell PATH, the known folders and the engine's PATH, so an npm "#!/usr/bin/env node" script finds node; --version runs the same way. Opening a tab for a missing program asks the shell again first.
…0.12.0) Someone who installs Claude Code while FormREC is open is no longer stuck on the "not installed" note: on window focus the dock refreshes its program list (as FormDeck's dock does), and a Claude Code install note left from before is dismissed once the engine reports it installed. The shared dock module is unchanged; this is FormREC's adapter.
…the API reference say agents can do everything in the window (0.12.0) - formrec_guide (src/mcp/guide.ts): what the window commands are, that destructive, external and privacy commands ask the person every time, that engine changes show in the window, and the job tools for long work. The old line that studio takes are not made over MCP is gone. - formrec-harness SKILL.md: a section on the window (pages, menus, studio, player, recording menus, Preferences, with the command ids), the job loop, a routing row, and the studio rule now says an agent starts a take only when asked and the window asks before any device turns on. The description is left as it is: it is at 1004 of 1024 characters. - AGENTS.md and CLAUDE.md name the bridge, its files, and that a new UI action is a registered command so agents can run it. - docs/api.md regenerated with its own generator (src/features/integrations/api-doc.ts) from the /api/window route lines in src/window/bridge.ts's header, whose notes now read on their own.
… agents, never the agent's own consent (0.12.0)
prefs.set covered the window's own settings, but most Preferences sections
are forms (Trash and imports, guests, branding, email, redaction, voice and
the rest), and several have no engine tool. Two generic commands make all of
them reachable without a command per field:
- settings.controls { section }: each control of that section page that has
a data attribute, named as the attribute (`studio-setting=check-in`,
`library-setting=trashDays`, `library-setting-save`), with its kind, row
label and current value (passwords say only whether one is set).
- settings.set { section, control, value?, checked? }: sets a field or a
select (a value the select lacks is refused), ticks a checkbox, or presses
a button, then fires input and change as a person's edit does.
Fields, pressed-or-not choices, tabs and Save buttons are changes; any other
button may remove or send something, so it is destructive and the person is
asked every time, as is any control that cannot be found when the risk is
judged. Outside agents (the consent policy and the remembered agents) is the
person's own choice: it is neither listed nor set, and is refused before any
question is asked.
Checked live: the studio section's five controls listed; hide controls
ticked and countdown 10 stored; countdown 7 refused; Trash after 45 days
typed and saved, and the engine's library settings then read 45; the
outside agents choice absent from the list and refused.
…and settings.set (0.12.0) The commit before made every Preferences control reachable through two generic commands; formrec_guide and the formrec-harness skill now say so, that a Save is a change while other buttons ask the person, and that Outside agents is never offered.
…very studio control asks first (0.12.0)
After the named commands and the Preferences pair, what a person could still
do and an agent could not were the controls of the pages themselves: the
studio's inspector panels (devices, live, guests, script, sound), the
library's search and filters, the editors' fields. view.controls and
view.set reach them the way settings.controls and settings.set reach
Preferences, through one set of helpers now shared by both:
- view.controls { query? }: every control of the open page that has a data
attribute, named by it, with kind, label and value (a select lists its
options; a password says only whether it is set; a file picker has no
value), at most 150, filtered by words.
- view.set { control, value?, checked? }: sets, ticks or presses one. A file
picker is refused (it needs the person; the import tools exist).
In the studio every view.set is privacy, since any control there may choose
or turn on a camera, microphone or screen, so the person is asked each time.
Elsewhere fields, choices and Save are changes, and other buttons, or a
control that cannot be found when the risk is judged, are destructive and
ask. Outside agents stays out of reach here too.
Checked live: 163 studio controls listed; studio quality 720p asked
(privacy), allowed once, set; the library search typed with no question;
settings.controls unchanged after the refactor.
…view.set (0.12.0) formrec_guide and the formrec-harness skill say that any other control of the open page (the studio's devices and panels, library filters, editors) is reached with view.controls and view.set, that a named command comes first, and that every view.set in the studio asks the person.
…does (0.12.0) Settings, Agents (GET /api/agents and Connect, POST /api/agents/install) found claude and codex with a bare which() over the engine's PATH, so in the desktop app started from the Finder or the Dock it said "the claude command is not installed here" while the dock, after fd10486, found it. The feature now looks claude and codex up with the dock's lookup (src/dock/lookup.ts: the engine's PATH, the known install folders, the login shell's PATH) and passes the result to clientStatus as find and to installClient, installHttpClient and installRelayClient as claudeBin. A status read never waits on the shell; a Connect for Claude Code asks the shell again first when claude is missing. claudeReplace runs `claude mcp remove/add` with the new optional Env.toolEnv when one is given: this process's environment with the PATH an agent program needs (programs.ts toolEnv), so an npm-installed claude (#!/usr/bin/env node) finds node. Without toolEnv, as in `formrec agents` from a terminal, nothing changes.
…est's stdio is built as formrec mcp builds it (0.12.0) The window tools and the job tools exist only where the server has a window caller (the app's /mcp, `formrec mcp`, `formrec mcp --http`), so listing them in CORE_TOOLS broke the promise that a server starts with every core tool: mcp.test, mcp-tools.test and mcp-http-server.test failed on a server built with no window. They now have their own WINDOW_AND_JOB_TOOLS, registered right after the core tools; CORE_TOOLS is the nine it was. agents:sync therefore writes them into feature-tools.md beside the feature tools. mcp-http-server.test's stdioToolNames built a bare server as its model of stdio; serveMcp now adds the remote window caller, so the helper builds the same way and the test still checks that --http and stdio offer exactly the same tools in the same order. The assertions are unchanged. The 14 agent and MCP test files pass under the build lock (106 tests).
…the harness skill (0.12.0) Regenerated by `npm run agents:sync` under the build lock from the live server (129 tools): feature-tools.md now has formrec_window_commands, formrec_window_command_run, formrec_job_start, formrec_job_status and formrec_job_cancel (120 tools there, from 115), and .agents/skills mirrors the harness SKILL.md's window section. tools.md changed only by the two new demos' rows, which belong to the demos work and are left to it.
Two new demos made by scripts/make-walkthrough-demos.mjs from the owner's own videos on formai.tools (the promos on the FormVis and FormPortal walkthrough pages, pinned by SHA-256). Each is a screen take as FormREC writes one: the video as a 1280x720 VP9 screen track, a narrator's camera bubble with her waveform, the Kokoro narration (af_heart, -16 LUFS) and the video's own soundtrack (-27 LUFS) on separate microphone tracks, captions per sentence, chapters at the seconds where each section's heading appears on screen, and viewer comments (comments.json). About 2.7 MB per demo, committed like the other demos. The full walkthroughs on YouTube can replace the promos with no code change: a video dropped at demos/sources/<id>.mp4 (git-ignored, kept out of the build by copy-web.mjs) is used on the next run, with chapters from a sidecar or yt-dlp's info file and captions from a .vtt beside it. demos/README.md has the yt-dlp lines and the one-command --use import. NOTICE.md records the videos' origin and that their rights stay with their owner.
… player (0.12.0) The FormVis and FormPortal walkthroughs are listed first on Home and in the sidebar's Learn rows, in the Help menu (DEMO_LABELS), in the server's DEMO_IDS and in formrec_demos, whose table agents:sync wrote into the formrec-harness reference. A demo's viewer comments show in a read-only Comments tab beside Chapters and Transcript: engage's demo-comments panel reads the demo's comments.json (a fixed file name DEMO_FILE now allows) and each comment's time seeks and plays. Only demos flagged with comments in demos.ts get the tab, and its page is hidden until chosen, so filling it adds no shift. The owner's own Comments panel is unchanged and still stays out of demos.
…0.12.0) The FormVis and FormPortal walkthrough demos' CREDITS and their NOTICE.md row now say the videos are Copyright 2026 NodeAgentc, Inc., from formai.tools, used with the owner's permission, as the site's footer names the owner, in place of "their owner, the publisher of formai.tools". They stay outside Apache-2.0.
… the window and job tools and what asks you first (0.12.0) Built for agents gains a paragraph and a table: the window's whole command registry (pages, menus, the studio, drawing, the player, a recording's menus, every control of Preferences and of the open page) for agents, their changes drawn in the window at once, what asks the person every time (Trash, sharing and publishing, the camera, microphone and screen), that an agent cannot change Outside agents, and the five tools with where they are offered (the app, formrec mcp and --http, not the relay). They sit apart from the core tools table, since a server without a window does not offer them. Features says 129 MCP tools, from 124.
The sidebar's Learn row "A FormPortal walkthrough" drew 172 px of text in the row's 153 px slot, which tests/shell-reservations.test.ts reports as cut off at 1190x628 and 1440x900. The two new rows now read "A FormVis tour" and "A FormPortal tour", in the style of "A tour of FormREC". Home, the player's Demo bar, the Help menu and formrec_demos keep the full titles.
…dow (0.12.0) rec-agent (finding agent programs on the login shell's PATH and known install folders, rechecking on focus, Settings, Agents using the same lookup), rec-demos (the FormVis and FormPortal tours and their maker script) and rec-parity (the window command bridge, jobs, live updates and consent for risky commands) appended their sections and left them for one commit at the end.
Moves every version site to 0.12.0 together: package.json and both package-lock.json fields, extension/manifest.json, the desktop shell's Cargo.toml, Cargo.lock and tauri.conf.json, the README badge, and the current-version lines of src/HASHOUT_LOG.md and web/HASHOUT_LOG.md. CHANGELOG.md gains v0.12.0. The release: the Mac app finds Claude Code and the other agents (login shell PATH and known install folders, rechecked on focus, Settings, Agents included), FormVis and FormPortal tour demos with narration, chapters, captions and comments, and agents able to do everything a person can in the window, with jobs, live updates and consent for risky commands. Checked on this tree: npm run check and build, the version-sites, shell reservation, demo and agents test files. The full suite ran on the working tree before the last label fix (2621 passed, 4 failed in shell-reservations, fixed in 79d8d6f and passing since).
…12.0) exportToFolder, copyFolder and the zip export listed a recording's folder and then copied each file; a file a feature deleted in between (a rendition's progress file, a transcript replaced) made lstat or cp throw ENOENT, and POST /api/library/export answered an error with no count (CI: library-routes.test.ts:131). The listing now leaves out *.tmp and *.part work files and a file gone by the time it is looked at; the copy skips one gone before it is read. The zip writer opens each file before writing its header, so an entry marked mayVanish that is gone is left out whole, and an opened file is read to the end even if it is replaced. keycast-walkthrough's folder walk does the same: it read a transcript.txt.<tail>.tmp renamed away while it listed the folder.
… (0.12.0) phone-pwa-offline failed in CI with a layout shift of 0.0000562 after the record tap. A layout-shift observer at 4x CPU throttling (6x and one core here, three of three runs) named the one source: .rv-phone-rec-core, the red dot, transitioning its width and height from 66% to 38% of the button. When that transition ran past the tap's 500 ms input window it counted as a shift with no recent input. The dot now keeps its size and becomes the stop square through transform: scale, with its radius scaled up to look as before; nothing is laid out again. Three runs at 6x throttling on one core: 0 shift. Pre-existing: the phone page is not changed by this branch.
…equest a window (0.12.0) 0.12.0 had every app window keep two long-lived fetch streams to the engine: /api/mcp/consent/stream (the dock) and the new /api/window/stream (the agent bridge). Chromium opens at most six connections to one host, and the player's media (screen, camera and microphone each a ranged request), the studio's chunk uploads and the HLS and API calls share them, so the second stream left one fewer for them. CI's player, studio and live tests stalled or slowed (effects-noise-playback paused while toggling a filter; live-link-e2e's afterAll ran past 10 s). The window now opens the consent stream with ?window=1 and the dock (src/dock/index.ts) attaches the window bridge to that same response (WindowBridge.attach); dock-adapter.ts hands the bridge's events (hello, call, changed) to agent-bridge.ts and tells it when the stream ends. app.ts asks for the bridge before the dock opens the stream, so it opens once; a stream already open without it is reopened at once. /api/window/stream stays for any other client. Checked in Chromium: the window opens one long request, /api/window/commands lists its commands, /api/window/run runs app.home there, and the app closes in 55 ms.
…'s stop a minute (0.12.0) live-audit3 failed in CI with 0.952 s on the restarted destination: on a two-core runner the restart took three connections, and the 60-second feed had run out before the second server got two seconds of it. The feed is now 120 seconds, the fixed 1.5 s sleep for the second server is a wait for its port to listen (read from /proc/net/tcp, since FFmpeg's -listen 1 takes one connection), and the take stops only once the second server's file holds more than two seconds; the assertion after the stop is unchanged. live-link-e2e's afterAll (browser, share runtime, app) gets an explicit 60 s timeout: it ran past the default 10 s on CI with coverage on.
… retries (0.12.0) phone-android-e2e failed in CI because every Kotlin test died at MavenArtifactFetcher.java:129 with an IOException: Robolectric downloads android-all-instrumented from Maven Central while the tests run, with no retry, and the runner's download failed. main's ci.yml is the same (the runner image has ANDROID_HOME and a JDK, so the test runs there too); nothing in apps/android changed on this branch. Each test shard now restores ~/.m2/repository/org/robolectric from the cache and runs mvn dependency:get for org.robolectric:android-all-instrumented:14-robolectric-10818077-i7 (Robolectric 4.14.1's API 34 jar, the tests' @config(sdk = [34])) up to four times; Robolectric finds it in ~/.m2 and does not download. A runner without ANDROID_HOME skips the step; if every attempt fails it warns and the test tries once more itself. The test is not skipped.
Appends the CI section to src/HASHOUT_LOG.md: for each of the six failures, whether this branch caused it (the second long stream a window), or it was there before (the export race, the phone dot's size transition, live-audit3's feed length, Robolectric's download), the fix and how it was checked. The release was already cut, so it is committed here.
…ine (0.12.0) 3184361 changed the route comment for /api/window/stream in src/window/bridge.ts (the app's window takes the same events on the consent stream), and docs/api.md is generated from those comments. CI's integrations-sdk check found it stale; this is the file the repo's own generator writes (FORMREC_WRITE_API_DOC=1).
The owner wants PR checks within 7 minutes from a suite that tests only the app's critical parts. vitest.critical.config.ts reuses vitest.config.ts and lists 232 of the 359 test files explicitly: the shell and first paint, the library (routes, store, library-e2e), a studio take recorded and played back (e2e-studio), the player (player-controls, player-controls-e2e), the share listener, MCP and the agents (mcp, mcp-tools, mcp-http-*, agents, agents-kit, with the window tools and the API reference check in mcp-http-server), demos, Settings defaults, version sites, notices, and every file that took 5 s or less in PR #13's CI. Files skipped on CI are left out. The full suite is unchanged and still `npm test`. Measured here (2 cores, coverage off): 232 files, 2004 tests passed, 594 s with vitest's one worker; CI's four-core runner runs three at once.
….12.0) README's Develop paragraph and CLAUDE.md's Checks name npm run test:critical, the list in vitest.critical.config.ts, which suite runs where (ci.yml on PRs, full-suite.yml on main, nightly and by hand), and when to add a file to the critical list.
…y hand (0.12.0) ci.yml (pull requests and main): `check` runs notices:check and npm run check; `test` (the same job name as before) runs the critical suite with coverage off on one runner, building once beside the apt and Chromium setup. node_modules and Playwright's Chromium are cached, FFmpeg is installed without recommends (the VA-API and VDPAU drivers), and man-db's trigger is off. No poppler and no Android fetch: no critical file needs them. timeout-minutes 10 and 8 catch a hang; the desktop job's timeout is 15 for a cold Rust cache and it gets the man-db change too. full-suite.yml: the four-shard full suite with merged coverage, moved from ci.yml unchanged except the timeouts (75 and 20 minutes), runs on pushes to main, nightly at 07:17 UTC and by workflow_dispatch. No test file is dropped.
… full suite (0.12.0) Why PR checks took 30 minutes and more, the fourteen-shard plan the owner refused, what the critical suite holds and what moved to the full suite only, where each runs, and what was measured here against what only the next CI run can show.
… (0.12.0) The owner asked for a PR suite of only the app's critical parts, within 7 minutes. The first cut also took every file that ran under 5 s (232 files, 594 s in one worker here), which is a fast suite rather than a critical one and would not keep 7 minutes on a two-core runner. vitest.critical.config.ts now lists 54 files: the window and its server, recording a take (studio logic, devices, sessions and a take recorded in Chromium and played back), the library (routes, store, the library in Chromium), the player and sharing, MCP and the agents with the API reference check, documents and edits at their core, demos, Settings defaults, the extension's pairing, version sites and notices. Measured here on two cores in one worker: 474 tests, 318 s. Everything else stays in the full suite on main, nightly and by hand. README, the ci.yml comment and the HASHOUT section say so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FormREC 0.12.0: the Mac app finds Claude Code, FormVis and FormPortal tour demos, and agents that can do everything a person can
Summary
Three changes:
Changes
Finding agent programs (
src/dock/lookup.ts, a hand port of the family'sagent_lookup.py1.1.0):~/.local/bin,~/.claude/local), then on the login shell's PATH. The shell is asked once, with a 5 s cap per try, and the answer is kept.#!/usr/bin/env nodescript runs.claude mcpruns with the tool's PATH.Demos
formvis-walkthroughandformportal-walkthrough, each with:af_heart, -16.5 LUFS) and the promo's own sound at -27 LUFS;They are listed first on Home, in Learn ("A FormVis tour", "A FormPortal tour"), in Help and in
formrec_demos.scripts/make-walkthrough-demos.mjsrebuilds them from the full YouTube walkthroughs dropped intodemos/sources/(demos/README.md). The media is credited in NOTICE.md and CREDITS as Copyright 2026 NodeAgentc, Inc.Agent parity:
/api/window/streamopen, and the engine lists, describes and runs its commands throughformrec_window_commandsandformrec_window_command_run, from/mcp,formrec mcpandformrec mcp --http.formrec_job_start,_statusand_cancelrun any tool in the background.Commits
19 commits on top of
main(9fa578e, v0.11.0): 7 docs, 6 feat, 5 fix and 1 chore. All are authored and committed bynodemode-ai, with bodies and no trailers. The release commit is last (966a272).Tests
An independent check, with no edits, ran on a
git archiveof 4fbf171.Claude Code detection (engine started as
env -i PATH=/usr/bin:/bin, with a stand-inclaudereachable only through a scratch.zshrcor.profile):mcp add;Demos:
Parity:
Suites:
npm run checkandnpm run buildpass, as do the version-sites, shell-reservations, demos and agents test files.npm teston the working tree before the last label fix: 2621 passed, 50 skipped, 4 failed. All four were in shell-reservations, fixed in 79d8d6f and passing since.Not checked: macOS and Windows themselves, the drop-in path for the full YouTube walkthroughs (no file here), and listening to the narration (measured only). If a person's shell startup files hang, the first agent status after launch waits about 12 s.
Merging
Merge commit, no squash.