Repository navigation
feat: run tau on pi - #8
Conversation
The fake child now answers the daemon's startup get_state instead of a runner hello, and commands, replies and events use pi's flat frames. Runner-only checks (channel protocol version, delta/full event filter switching) are removed. Update fixtures also name the tau repository.
Fake children and link fixtures answer the startup get_state, take
flat {type, id, ...args} commands and reply with response frames;
events travel unwrapped. Runner-only checks (channel protocol version,
subagent subscription, --advisor/--profile argv, use-omp-build) are
removed, word-prediction commands are swapped for surviving ones, and
update pins name the tau repository and npm package.
Only the fork's omp runner dialed the daemon's host socket; pi never does, so the listener, ChannelTable.adopt and the adopted-channel branches are dead. The startup get_state now waits channelReadyMs, as the hub does for an open, instead of the 15 s command timeout. The v10/v11 upgrade test exercised published ompweb updaters that install @kahme247/ompweb, a path tau hosts never take.
Update and recovery checks still required @kahme247/ompweb, so a tau install was refused as not an installed package and a staged tau release failed the name check. Package names, install directories, npm metadata checks and update commands now use @ompweb-dev/tau.
…them pi emits agent_settled and reports only pendingMessageCount in get_state, while the session wrapper, notifications and Edit read session_settled, queuedMessages, queuedMessageCount and isSettled. RpcProcess now forwards agent_settled as session_settled and fills those get_state fields from the last queue_update and the settlement it observed since the last agent_start; an adopted child reports no settlement until it has seen one.
pi has no per-message queue commands: clear_queue returns every queued text and nothing else. Queue Edit now moves all queued messages back into the composer and Delete discards them all after a confirmation; the per-message Steer action is gone. Stop sends abort_and_restore_queue, which the session wrapper runs as clear_queue then abort, returning the withdrawn texts even when the abort fails. The composer recovers Edit text into the identity it captured at the click, so an Edit identity move meanwhile cannot misroute it, and abort_and_restore_queue stays fenced during a history edit.
The companion extension registered a fixed tool list, so browser tools other than open_file and the agent tools (new_session, send_to_session, list_sessions) never reached pi, and the Agent tools setting could not hide anything. The daemon now sends its set_host_tools union as /tau_host_tools, which the extension registers and activates, turning off tools no longer listed. The daemon also routes the extension's __tau_host_tool__ dialog as a host_tool_call, so one member executes each call instead of every linked server, and returns the result as the dialog's answer. Companion-extension commands are kept out of run tracking: pi's reply never says that no run started.
pi list prints a package's path only when it is installed; the parser dropped every package without one and kept a filter mark in the source.
The runner and its fork pin are gone: workflows install the pinned pi (@earendil-works/pi-coding-agent 0.85.1) instead, smoke tests and preflight use the pi on PATH, release binaries ship no runner and the release attaches only the binaries.
readline also ends a line at U+2028 and U+2029, which are valid inside JSON strings, so model text containing one broke its frame in two and forced a resync. pi's framing is strict JSONL: split at LF, strip a trailing CR, and decode UTF-8 across chunk boundaries.
pi 0.99+ answers a prompt that an extension command or input handler consumed with disposition "handled" and starts no run; the daemon kept waiting for that run's agent_start, which held off the idle stop.
pi has no /btw, and the extension's stand-in recorded the question without answering it. The extension now answers from the active branch's conversation with the session's model (streamSimple), streams btw_delta and btw_record frames, cancels, takes follow-ups, and keeps each record as a custom session entry, which pi leaves out of the model context; a record saved while running is interrupted on reload. The server reaches it through RpcProcess.callExtension: a /tau_btw prompt that the extension answers with a tau_reply frame naming the call's id. The daemon treats such /tau_* commands as no user message: no peer marker, no history-edit fence, and their reply ends them.
pi has no edit_message command and moves the leaf only from an
extension command, so the wrapper calls /tau_edit: the companion
extension checks the target is a user message, runs
navigateTree(entryId, { summarize: false }), which keeps the old
branch and moves the leaf to the message's parent, and answers
{ sessionId, cancelled, leafId }. Its reply frames now use the widget
key tau, as they carry more than /btw.
The extension listened for guessed pi-subagents event names, so no subagent ever reached tau. pi-subagents already reports to RPC hosts: foreground children as AgentProgress rows on its subagent tool call, background runs as PI_SUBAGENT_ASYNC_JSON snapshots on its subagent-async widget. RpcProcess now runs both through SubagentBridge, which emits the subagent_lifecycle and subagent_progress frames tau's roster reads (lifecycle before a new child's progress, progress before its end; a child still running when its call ends ends with it), and the wrapper answers get_subagents with the children still running.
pi rejects --no-lsp (Unknown option), so the utility process behind logins and model lists exited on start. It skips MCP instead, pi's startup work the utility never needs.
pi keeps no client message ids, so delivery fell back to matching text and origin cards (session and GitHub sources) disappeared. The session wrapper now names each message before sending it (/tau_meta). The companion extension binds the name in its input handler to the message pi admits, follows pi's steering and follow-up queues in delivery order, announces the id just before pi's own message_start, and journals it as tau's client-message-entry (with its origin) once pi has stored the message, which the session reader joins for origin cards. A withdrawn queue is journaled as client-message-resolution, and get_client_message_status reads the journal through the extension. RpcProcess puts the announced id and origin on the user message's events, the extension's names on queue snapshots, and reports supportsClientMessageIds once the extension has spoken (tau_hello at start, or any reply from an adopted process).
A test body still running after its environment was restored (a timeout under --parallel, a late timer) wrote the self-update state into the machine's real <tmp>/ompweb-self-update-<uid>, which blocked a real server's host daemon start; update-policy.test.mjs wrote mutation.sqlite there on every run.
Rename the remaining omp-web/ompweb product names in code, tests, scripts and CI: bin files and the tau CLI, TAU_* environment variables, the tau state directory and file names, browser storage keys, cookies and headers, service labels (dev.ompweb.tau, dev.ompweb.tau-host, tau.service, tau-host.service), and the default ports 30187 (production) and 30188 (dev).
…the binary - TAU_PI_BIN is the only pi override (TAU_OMP_BIN is gone); resolvePiBin, getPiVersion, spawnPiTransport and PI_NOT_FOUND replace their omp names. - Release pins and the host updater no longer know tau-omp runner assets; the updater fixtures lose their fetch-omp kinds. - The compiled binary now ships lib/pi/tau-extension.ts, and pi never loads an extension from the session's cwd: binary installs ran pi without tau's extension unless started from a tau checkout. - smoke takes --pi; messages, comments and the not-found error name pi.
… has no command for
…json, no plugin step
…keeps its own pi logins Cluster members no longer run on the master's provider logins. The broker route, the daemon's loopback forwarder, the host record's shareCredentials flag and its Settings toggle are gone. A cluster start still names the opening link as the server it takes its configuration from (configServer).
…on extension /tau_auth lists pi's providers (with the stored credential's type only), runs an account login whose steps and prompts stream back to tau, saves an API key and logs a provider out, all through pi's own ModelRuntime.
A new host op, auth, reads and writes that host's own pi logins through a utility pi on the daemon's machine; this machine goes the same way. The login SSE route long-polls the daemon for its steps and feeds pasted codes and chosen options back. API keys can now be saved and removed.
Settings -> Models lists hosts whose link is up; providers, account logins, stored credentials and API keys are read and written on the chosen host. API-key providers get a key field and a remove button.
Pool placement asks each member's daemon which providers it can authenticate (cached a minute, forgotten after a login through tau) and skips the ones without the start's provider, saying so when none is left. A start on one chosen host fails naming the host and the provider.
A failed or slow provider query counted as logged out and refused the start with pool_provider_unavailable.
Without it pi reads tau's /tau_* calls as prompts, so the utility's /tau_auth api_key call sent the key to the model provider.
A prompt, steer or follow-up starting with /tau_ reached the extension: a browser or another agent could forge a message origin, rewind history or change the host's logins.
Reordering, renaming or configuring a session-discovered project registered it, and pi then got --approve there. Such entries are now marked discovered and stay untrusted until the user adds them.
pi-subagents pauses a detached child and keeps it in its foreground runs; tau marked it completed.
…holds it A clone could create a missing ~/.pi, and removing a worktree that contained the agent directory deleted it. A path that cannot be checked (a symlink loop, no access) now says so instead of blaming the agent directory.
A name pi never admitted stayed forever and could bind to a later message with the same text.
- link-protocol: queuedLine (only the removed browser link used it) - draft-store: unused toDraftImages - pi/plugins-cli: parseJsonLoose and its test - upgrade-process: findUpgradeServerProcesses and its tests - i18n: unused pluginsConfig package enable/disable keys - outbox: the never-read advisor column - hosts route: pool launchConfig accepts only extraArgs - README (all languages): browsers no longer use /api/events/link - AGENTS.md: main relays upload bytes through putUploadChunk - comments that still named the browser link, and DESIGN.md's "legacy name" wording for TAU_TRUSTED_HEADER_SECRET
Review round 2: code reviewScope:
Not checked: the full test suite. |
Review round 2: adversarial reviewScope:
Found fine: every prompt path goes through |
A clone checked only its parent, so a .pi repository cloned into ~ created pi's config root. On macOS and Windows a missing agent dir is now compared case-insensitively.
…thout the extension The text check dropped the id of a prompt another extension's input hook rewrote; the input-time clear already covers a refused prompt. Of equal names the newest is the admitted one. callExtension itself refuses under TAU_NO_EXTENSION=1, so session calls cannot reach pi as prompts.
…nning No later frame of its call can end it, so it stayed running for good.
Review round 3: code reviewScope:
Not checked: the test suite; pi-subagents emitting |
…all detached child A bare prompt pi refused during a run left its name for the run's next queued message, and newest-first matching swapped equal-text names of interleaved senders. A child detached while its call still ran left the running snapshot.
A follow-up whose input fired while a prompt still prepared replaced that prompt's pending name, so the prompt took the follow-up's id. Pending prompts are now a list matched by text, with the latest input as the fallback for a rewritten text.
Review round 3: adversarial reviewScope:
Not checked: a live pi RPC run, real macOS/Windows filesystems, browser rendering of the roster. |
…n the upload name lock it no longer takes
…kes about 17 s on Windows
…ng a cwd against it
…d keys on Windows
On Windows the spawned child is cmd.exe; killing it left pi holding the directory (EBUSY). Closing stdin ends pi itself.
tau now runs its agents with
pi --mode rpc(pi 1.5.2) and the companion extensionlib/pi/tau-extension.ts, instead of the omp runner. tau is a new product: it shares no state or harness with ompweb, never upgrades from ompweb, and nothing has been released, so this PR drops every compatibility path rather than keeping it.Runtime
pi --mode rpcwith the tau extension. The extension adds/tau_host_tools,/tau_meta,/tau_btw,/tau_editand/tau_auth, reached throughcallExtensionandtau_replyframes.message_updateframes get an id and block shells on the daemon (piStreamFrame), so replies show while they stream.clear_queue+abort; branch isfork; title generation always uses the fallback;set_event_filteris gone; thinking levels follow pi'sthinking_level_changedleveland includemax.setStatus,setWidget,setTitle,set_editor_text) becomesuiframes.session_infoentries, so pi can still resume the file.--approveis passed only when the session cwd is inside a workspace added to tau (or one of its worktrees).subagenttool (per-callmodelwith an:effortsuffix). Child transcripts are read from the fileAgentProgress.sessionFilenames, confined to the parent's artifacts directory.Removed
pool_provider_unavailable/host_provider_unavailable).local://, profiles, and the omp-era legacy upgrade and recovery paths (tau recover-host, the v10/v11 shim).Protocols and updates
maintenance_unavailablewhen it is down). A missing preflight fails the update.ompVersionis nowpiVersion.Configuration
settings.json; plugins are pi packages (pi install/remove/update); skills are scanned in pi's precedence order plus packages.LOCAL_SETTINGSlists pi's machine-local keys.tau-*(no migration); the default theme is "midnight".Security
/api/filesdenies pi credentials (auth.json,mcp-auth.json,oauth.json,models.json,mcp.json),tau-settings.jsonand the whole<agent dir>/tau/tree.~/.pi: uploads, clone targets and worktree add/remove answer 403agent_dir_read_only, checked on the daemon through symlinks and device/inode identity. Composer attachments are unaffected.Not in this PR
ompweb-devnames (GitHub repo, npm scope@ompweb-dev/tau, launchd labelsdev.ompweb.tau*) are renamed later. Nothing is published to npm.shortcut:comment; whether to keep omp's<tmp>/tau-localrule at all is open); the skills scan ignores filter patterns, ignore files and extension skills; subagent transcripts written to a custom pi-subagentssessionDirare not shown (fails closed); pi'ssubagenttool gets no task panel yet.lib/hosts/files-owner.integration.test.mjs"native publication keeps staged bytes leased…" fails intermittently, also at this PR's first head.Verification
npm test: 4105 pass, 35 skip, 0 fail (the flaky test above passed this run).npm run typecheckclean,npm run lint0 errors (8 existing warnings),npm run buildOK. Not exercised in a browser end to end.