Skip to content

feat(agent): the browser agent in the Pipeline Builder's Agent tab - #2718

Open
dylan-savage wants to merge 112 commits into
developfrom
feat/rocket-agent-browser
Open

dylan-savage wants to merge 112 commits into
developfrom
feat/rocket-agent-browser

Conversation

@dylan-savage

@dylan-savage dylan-savage commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the browser agent to the Pipeline Builder's Agent tab. You tell it in chat what you want. It builds and edits apps and pipelines in your workspace, checks its work, and finishes only when the checks pass. It runs in the browser tab with no terminal, so it works only through its tools, using the client that is already signed in as you.

The agent works in waves. In each wave the model plans a set of tool calls, the loop runs them, and the model reads the results before planning the next wave.

The branch also carries the PRs merged into it since it opened: tool approval (#2853), plan replies (#2835), team, timeout and file-version fixes (#2839, #2840, #2882), Commit all against a teammate's change (#2884), turn results and ask_user (#2869), step and cost limits with Undo (#2873), and the unsaved-changes question (#2883). The last commit cuts the tests to one file per folder and trims the comments.

What the agent can do

  • It reads, searches, edits, writes, renames, and deletes workspace files. It has to read a file before it can change it. Saving a .ts file returns that file's type errors, and saving a .pipe file runs validate.
  • list_workspace lists every app, node package, and pipeline in one call.
  • rocketride_client calls any TypeScript client method by its name in ROCKETRIDE_typescript_API.md. With it the agent validates and runs pipelines, reads logs, and deploys pipelines. It refuses methods that hand out credentials, the raw call and request, the fs* store methods, and methods that can't work over JSON.
  • create_app sets up a new app. check_app type-checks an app and rebuilds its preview. deploy_app uploads a new version and waits for the server build. publish_app publishes the app.
  • ask_user ends the turn with a Needs you question when only you can unblock it, for example an unset Variable.
  • The guides show up read-only under .rocketride/docs/, a fourth top-level workspace folder fetched from the server's GET /client/docs and held in memory. The Explorer, the editor, and the agent read the same folder. The README, CLI, and Python API guides aren't served.

What it asks you first

  • Every client method has a tier: free, ask, or never. A method the list doesn't name asks. publish_app, delete_file, and the ask-tier rocketride_client calls show a card on the chat turn that names the exact call, and the tool's time limit stops while you decide.
  • Ask mode is the default. In Auto mode, ask-tier calls run without a card, but terminate and restart work only on runs this conversation started. Always allow turns on a grant. The mode, the grants, and the step and cost limits are registered in PIPELINES_TOOL_SETTINGS (apps/shared/src/tools/toolSettings.ts), so they show on the Settings page.
  • The toolkits get a checked client that refuses never-tier methods and any ask-tier call that no approved step named.
  • This checks the agent's own calls. It is not a security boundary: app code the agent writes runs in the preview with your session token.
  • Before the agent changes a file that has unsaved edits in an open editor, a dialog asks what to do, and the tool's time limit stops while you answer.

Files you and the agent share

  • Every path in the staged view has a version. A write that names an older version fails with StaleVersionError, so the agent and an editor can't write over each other. Commit all checks each staged file against the copy the page read.
  • One document backs each open file and pipeline, so split views, closed tabs, and saves stay in step.
  • File reads show secret values in .env, .toml, .ini, .properties, .sh, YAML, and .pipe files as markers. Writing a marker back restores the value, and a value hidden once stays hidden in every later result.
  • A run stays in the team it started in. A turn in another team's conversation is refused before anything runs.

When the agent can finish

  • Every app it changed has passed check_app in a wave after its last change to that app.
  • No pipeline it changed failed validate on its latest save.
  • Every call in its last wave worked, every call that timed out has ended and been read, and it has read every message you sent while it worked.

A turn also ends when you press Stop, when it reaches its step or cost limit, or when the agent calls ask_user. Each turn ends with a result card. The card shows the estimated cost, which leaves out thinking, and offers Undo for the turn's file changes.

Stop it, or add to the request while it works

  • The chat runs one turn at a time. While the agent works, the composer shows Stop, and Esc stops the agent too.
  • Stop drops the calls in progress, and calls that haven't started never start. The answer says what ran and what may still be running. A Yes on an approval card after Stop runs nothing. An upload that already went out is not cancelled.
  • A message you send while the agent works shows as a faded Queued bubble with Edit and Remove. The agent reads it at the start of its next wave. If the agent finishes without taking it, the message starts the next turn.

Changes to your files

The largest:

  • apps/shared/src/modules/vfs/stagedFileSystem.ts: file versions and StaleVersionError, plus an assertWritable rule that refuses writes under .rocketride/ before anything is staged.
  • apps/rocket-ui/src/surfaces/workspace/vfs/workspace.ts: the .rocketride/ folder, and reusing a team's workspace after a team switch.
  • apps/rocket-ui/src/surfaces/workspace/projectVfs.ts: each pipeline write carries the version it was loaded at.
  • apps/shared/src/tools/toolSettings.ts: the agent's six settings, moved here from apps/rocket-ui/package.json when this branch merged your unified settings (updateSetting drops keys that aren't registered).
  • apps/shared/src/modules/agent/agent.ts: AgentSession runs turns, saves them, and handles cards, Undo, and needs-you answers.
  • packages/shell/src/components/chat/: TurnController runs one turn at a time and queues sends. A transport can stream live status rows, which the agent uses for its Thinking rows. Messages can carry cards. ChatView takes an optional turn prop from useChatMessages().turn, which turns on Stop, Esc, and Edit and Remove on queued messages.

Guide fixes in docs/agents/context/

These docs also ship to local agents, so every edit holds both locally and in the tab. Local-only setup now reads as the local case, and facts that were wrong everywhere are fixed: the DEVTOOL manifest key is appManifest, and UI_COMPONENTS no longer lists exports that the shell doesn't have.

Removed since this PR opened

  • The rocketride.pipeBuilder.agentRecordModelCalls setting and the Raw reply disclosure.
  • The pipeline design, run, and deploy tools, which rocketride_client replaces.
  • The pipeline check. validate on each .pipe save replaces it.
  • The stand-in model pipeline (standin.ts). Users now pick a provider and model for each conversation.

Stubs for Rod

One piece is ready for your client.process(). show_view is no longer a stub.

Model calls are ready for client.process(). A picker beside the composer offers a fixed list of five Anthropic and six OpenAI models. Each conversation keeps its own choice, and a new chat starts from the last pick. Calls go through ChatModel in apps/shared/src/modules/agent/model.ts. Its one implementation, openChatModel in modelEngine.ts, starts one webhook, node and answers pipeline per conversation and model. When process() lands, the call code in that function changes and its callers don't. A retry on a fresh task is how a fixed key takes effect today, and the draft's first process() stage has no restart on change, so that part needs a new answer. The key check also stays until the draft's auth_required error ships.

show_view is built in #3349, which merges into this branch. It opens the user's own App Builder (on Design) or pipeline canvas beside the chat, through showView on rocket-ui's agent host. It needs no channel, so ViewChannel is gone, and so are pause, resume, close, and node_preview.

Type

Feature

Testing

  • Tests kept to one file per folder and to behaviours whose breakage hurts a user (7 files). They cover saves and file versions, secrets, the finish rules and checks, teams, Stop and queued messages, approvals, limits, and Undo.
  • The suites pass: shared 242/242 at this tip, and shell 221/221 at the last run, with no shell code changed since. tsc --noEmit is clean for apps/shared and apps/rocket-ui at this tip.
  • Tested locally in the browser. Earlier runs covered building pipelines and an app, Stop and queued messages, and the approval cards. A retest of the whole branch at this tip is still to do.
  • Model choice tested in the browser on a local OSS engine: one real turn on each of the eleven models, no key, a wrong key then fixed, reload, two chats at once, Stop, and the cost limit. Not run on the SaaS server.
  • ./builder test in full: not run.

Known gaps

  • show_view is in feat(agent): show_view opens the user's App Builder or canvas beside the chat #3349, which is not merged into this branch yet.
  • The agent needs the user's own Anthropic or OpenAI key. Google, xAI, Bedrock, Ollama and OpenAI-compatible endpoints, including OpenRouter, aren't offered.
  • The model list and its prices are fixed in code, because the node catalogs also hold OpenRouter's names, which the providers' APIs refuse.
  • check_app sees type errors only in files Monaco has loaded, and it needs the app open in the App Builder with its preview.
  • A check where nothing ran counts as passed. A .pipe save whose validate couldn't run doesn't block finishing.
  • Changes under nodes/ need no check, so a run that changes only nodes finishes unchecked.
  • A secret with no known key shape is hidden only if a file read marked it first. In other plain-text output, such as a build log, it isn't hidden.
  • Cosmetic: the agent module logs failures and model-call timing with console.log.

Checklist

  • Commit messages follow conventional commits
  • No secrets or credentials included. gitleaks runs in the pre-commit hook and in CI.
  • Wiki updated (if applicable): n/a
  • Breaking changes documented (if applicable): none to the shell API. One behavior changes for every chat: a message sent during a reply now waits as a Queued row and sends when the reply ends. Chats that don't pass turn show it without the Edit and Remove buttons.

Linked Issue

None.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an AI agent for workspace files, apps, and pipelines, with approval prompts, follow-up questions, usage limits, model selection, and Undo for supported changes.
    • Added chat controls for stopping turns, managing queued messages, responding to approval cards, and choosing a model.
    • Added read-only workspace reference documentation and additional Anthropic and OpenAI model options.
  • Improvements
    • Editors now coordinate shared content and provide reload or overwrite options for external changes and stale saves.
    • Workspace operations better respect active scopes and read-only paths; renaming preserves open tabs.
    • Pipeline saves provide clearer options when stored content has changed.
  • Documentation
    • Updated agent, app, pipeline, integration, and chat guidance.

Rod-Christensen and others added 30 commits October 13, 2026 15:17
…ppdev core, in-browser design loop

The App Builder previously existed only inside the VSCode extension, riding
its RPC bridge to native files and a local toolchain. This lands the settled
web App Builder design: rocket-ui hosts the same builder in the browser with
a no-bundle design loop, and everything host-agnostic moves into shared so
the two hosts consume ONE implementation and can never drift.

Web host (apps/rocket-ui/src/appdev/, new):
- webHost.ts: direct-mount IAppBuilderHost — every accessor/action is a
  direct SDK call on the shell's live client; no bridge, no RPC lane.
- devSession/hmr/linker: the in-browser dev loop — modules are transpiled
  per-file (@babel/standalone + react-refresh) and linked over the shell
  share scope; no bundler runs in the browser. Publish packs SOURCE and the
  server builds the real bundle (pack.ts, fflate).
- ata.ts/typesFeed.ts/idbCache.ts: automatic type acquisition for the Code
  pane, cached in IndexedDB so reopening a project is instant.
- appFiles.ts/appStore.ts: project file state over the store-backed VFS.
- deps.ts: dependency add/upgrade surface wired to the compat probe.
- New AppBuilderProvider/NewAppProvider providers; SidebarProvider and
  RocketApp mount them; rsbuild config gains the monaco/babel chunks.

Shared appdev core (apps/shared/src/modules/appdev/):
- wire.ts (new): the publish-ladder wire shapes (SDK row mirrors) and their
  projections into the shared view vocabulary — VSCode maps rows off its
  RPC bridge, web maps SDK rows directly, one mapping.
- preflight.ts (new): tiered readiness checks — 'package' rows are the
  complete-and-buildable bar, 'store' rows the additional public-submission
  bar. Hosts supply only IO (fileExists, dependency probe). No dist/ check
  by design: deployment packs source; a local build is never uploaded.
- compatProbe.ts (new): grades npm deps compatible/degraded/incompatible
  for the browser share-scope runtime — registry metadata pass plus an
  es-module-lexer walk of the served ESM import graph hunting node
  builtins, which typechecking cannot catch.
- listing.ts (new): package.json appManifest <-> ListingDraft round-trip
  projections; the listing IS the manifest, no second store.
- NewAppForm.tsx/CodePane.tsx (new): the create wizard body and Monaco code
  pane, shared by both hosts; gallery gains the anchored-popup entry and
  entry-level polish across the board.

Monaco as a shared module (apps/shared/src/modules/monaco/, new):
- One loader/environment/theme/languages/typescriptSetup + MonacoEditor
  component replacing the per-app copies: explorer-ui MonacoViewer drops
  ~425 lines, sql-ui SqlEditor ~111, and the appdev Code pane reuses the
  same stack. @monaco-editor/react is gone — raw monaco-editor drives it.
- generate-monaco-types.mjs + reactTypes.generated.ts feed React typings
  to the editor for app-source editing.

Shell:
- CachedVfs (new): the store-backed VFS owns tree/content/dirty state;
  Monaco models are overlays over it. Explorer surfaces modifiedPaths.
- AnchoredPopup (new): the shared dropdown/popup primitive (with the
  useFixedPopupPosition rework) all chrome menus now ride.
- devGate/devMode/versionOverride: the dev-ownership gate learns the web
  host's dev-overlay world; connection + CloudAuthProvider + Workspace
  context wiring for the builder's live-client session.

VSCode host:
- Slimmed onto the shared core: NewAppWebview (-400 lines), AppWebview,
  AppScreenProvider, appMarker, debug and the service/docker panels now
  delegate to shared wire/preflight/listing instead of local duplicates.

Server + SDKs:
- register_dev (client-typescript + client-python, kept in sync): per-user
  dev overlay for an app module — overrides the served app list with a
  given entry URL for the registering connection only, dying with it; this
  is the builder's dev-preview plumbing.
- app_deploy.py build_log: the tail is now a RANGED store read (open_read/
  read_chunk) capped in BYTES — a rocket-ui-class build log is multi-MB and
  reading the whole object off S3 just to keep the last 256KB made the log
  modal crawl. errors='replace' because a byte tail can split a UTF-8
  sequence.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ity, live-only web preview

Three pieces of App-Builder-in-the-cloud polish, committed together because
they were built and tested as one working session on this branch.

1) Documents: drag a tab onto a pane to split (VS Code gesture)
   - New shell component DocDropZones wraps every leaf pane of the document
     split layout and turns its body into a five-region drop target: center
     moves the dragged editor into the group; the outer 20% edge bands split
     the group (left/right = horizontal, top/bottom = vertical) and move the
     editor into the new half. The hover highlight is a pointer-events:none
     overlay, so panes stay fully interactive when no drag is in flight.
   - Documents.splitGroup gains a `position` parameter ('before'|'after',
     default 'after') so a left/top edge drop can land the new group on the
     near side. Default preserves the existing call sites' behavior.
   - Documents.moveEditor now auto-collapses a source group it empties
     (same collapse path closeEditor uses) — dragging the last tab out of a
     pane removes the dead pane instead of leaving an empty husk.
   - Drag-session side channel: HTML5 DnD hides the transfer payload until
     drop, so hover-time validation needs state outside the event. It lives
     in a module-level WeakMap keyed by Documents instance (begin/end/
     getEditorDrag) rather than as class members, because Public<Documents>
     appears in contravariant positions of the frozen shell-api contract and
     new required members would break older contract conformance. The DnD
     MIME constant moves to Documents (EDITOR_DND_MIME) so DocTabs and
     DocDropZones share one definition.
   - DocTabs stops propagation on its own dragover/drop so the tab bar and
     the enclosing pane wrapper never double-handle one gesture, and marks
     itself data-rr-editor-droptarget for the zone hit-testing.
   - api.ts re-exports the new standalone types (SplitPosition,
     EditorDragSession) — additive only.

2) VS Code App Builder: a slow first build no longer looks hung
   - watchManager: rsbuild prints nothing between "build started" and
     "built in Xs", so a multi-minute first compile (cold pnpm store, first
     rsbuild run) read as a dead session. A 30s heartbeat now reports
     elapsed build time to the Console pane while a build is awaited, and
     escalates to a warning naming how long the compiler has been silent —
     making "slow but alive" and "hung" distinguishable. Any complete
     output line feeds the liveness stamp; the timer is disposed with the
     session's other resources (stopWatch now routes through
     disposeSessionResources instead of duplicating the cleanup).
   - The building-state trigger also matches rsbuild's "build started"
     phrasing, so buildStart is stamped at the true start.
   - AppWebview's Initializing pane now ticks the time spent in the current
     phase (after 5s, to keep fast starts quiet) and tails the newest
     Console row, so the user sees what the dev session is actually doing
     instead of a frozen label.

3) Web App Builder: preview is LIVE-only; sidebar defaults to Apps
   - The Live|Built source bar is removed from the web preview pane. The
     Built source duplicated what the Deploy stage already verifies (VS
     Code has no equivalent either), and it complicated the injection-
     target rule: with LIVE the only embedded source, every rrdev handshake
     may attach as the linked-injection target, deleting the stale-closure
     mode guard, the built-version polling (listDeployments), and the
     build-status-driven refresh.
   - rocket-ui sidebar now opens on the Apps tab — the branch's working
     focus — instead of Pipelines. Session-scoped only, as before.

The pnpm-lock.yaml working-tree modification is line-ending noise (empty
diff) and is deliberately not part of this commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tro pages, Rocket Builder rename

Three strands of work, all serving the cloud App Builder experience:

1) Agent mode — a workspace coding agent surface in the web host
   - New shared agent module (apps/shared/src/agent/): AgentSession is the
     single host-facing API (configure/newSession/getSessions/execute/save/
     deleteSession); sessions.ts is the storage layer persisting each
     conversation to the user's server-side file store under
     .agents/<appId>/ (catalog.json index + one JSON per session). History
     is namespaced by the CONTROLLING app id so multiple host apps can
     mount the Agent tab without mixing histories; the sessions themselves
     are operationally unrestricted (any app/node/pipeline).
   - AgentProvider (rocket-ui): one conversation as an `agent:<sessionId>`
     document tab, composing the stock shell ChatView + useChatMessages
     over an AgentSession. Transcripts live in the fs store, never in
     workspace state — the tab URI carries only the GUID.
   - SidebarProvider/SidebarView: a new Agent mode tab (presence-driven,
     like Apps — hosts that don't wire it, e.g. VS Code, render exactly as
     before) with a MY SESSIONS list (two-line rows: title + relative
     date, hover delete with confirm). Mode selection is now prefs-backed
     so it survives reload; Agent is the startup default when no stored
     choice exists. An empty restored workspace opens straight into a
     fresh Agent conversation as the startup surface; restored tabs come
     back exactly as left.

2) Embedded "Introduction to ..." pages for every sidebar mode
   - shared/modules/intro/introPages.ts ships complete standalone HTML
     intro documents (agent/apps/nodes/pipelines); each mode body grows an
     Introduction row above its "+ New ..." action.
   - Web host renders them as `intro:<mode>` document tabs (IntroProvider
     in rocket-ui); the VS Code host opens them as editor-area
     WebviewPanels (new IntroProvider, html assigned directly from the
     embedded string — no webview build), wired via the new
     rocketride.page.intro.open command and disposed on deactivate.

3) Pipeline Builder -> Rocket Builder rename
   - User-facing name only: app manifest, AppDescriptor branding, welcome
     screens, settings title, subscription fallback entry, READMEs. The
     app id (rocketride.pipeBuilder) and settings keys are unchanged, so
     nothing breaks for existing installs or stored config.

Supporting changes:
   - emitFsChange moved from rocket-ui's appStore to
     shared/utils/fsNotify.ts so ALL store writers (app scaffold, agent
     session saves) share ONE page-monotonic rev counter on the shell
     notification bus; appStore re-exports it for existing importers. The
     window-level APPDEV_CHANGED_EVENT CustomEvent is gone — the sidebar
     re-scans MY APPS and re-lists MY SESSIONS off a single shell-bus
     onFsChange subscription, the only sanctioned notification channel.
   - Shell chat: MessageList/ChatView accept an emptySlot (rich
     replacement for the stock EmptyState, used for the agent's
     example-prompt cards) and useChatMessages accepts an injected
     `request` transport so the agent session replaces the built-in chat
     API while keeping the same answer shape; TextResult is now exported
     from the shell api surface.
   - apps/shared gains the ./agent/* export; lockfile refreshed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…al-first dev previews

Three strands that together move app development fully client-side: every
file edit — user or agent — now lands in a reviewable staging layer instead
of writing straight to the server; the shell grows VS Code/Cursor-style
sidebar chrome so that workflow has somewhere to live; and dev previews no
longer depend on any server-held state. Frozen as shell-api v5.

== Staged workspace VFS (apps/shared/src/workspace, rocket-ui/src/workspace)

The agent edits files. Those edits must be stageable and reviewable BEFORE
they reach the server — the user sees diffs, then commits or discards a
whole turn. That demands a git-like layer the server knows nothing about:

- vfsTypes.ts splits the file seam into roles: IVirtualFileSystem stays the
  stateless backend ("where bytes live"); new IWorkspaceFileSystem is the
  consumer view (tree + content cache + editor overlays + subscribe), so
  staged views, prefix lenses and test doubles are interchangeable with the
  plain CachedVfs mirror.
- StagedFileSystem decorates a base view with ordered layers of
  write/tombstone/mkdir entries, each capturing first-touch `before` +
  baseHash — the conflict anchor and the undo source. checkpoint() freezes
  a turn, rollback() discards it, commit() verifies captured hashes against
  the live base (conflicts reported all-or-nothing, never clobbered) and
  only then replays net ops — the single moment the server changes.
  commit({retain:true}) keeps history so "Undo this turn" works in auto
  mode. StaleWriteError surfaces a base that moved under an open buffer.
- staging.ts persists layers crash-safely (.staging/<appId>/manifest.json +
  content-addressed blobs; blob-first add, manifest-first remove, so a
  crash leaves only gc-able orphans). Persistence IS the save.
- commitPolicy.ts is the sole owner of auto|manual. Auto preserves today's
  "save means saved" (checkpoint + commit per agent turn) while retaining
  undo history; manual holds everything for review. Switching manual->auto
  with pending changes throws rather than silently committing.
  Exposed as app setting rocketride.pipeBuilder.autoCommit (default true).
- workspace.ts is the composition root: virtual apps/ nodes/ pipelines/
  mounts over physical .projects/{.appdev,.nodes,*.pipe}, user-vs-team
  scope prefixes, and the one shared view all surfaces use.
- Pipeline saves route through the same seam (projectVfs = scoped lens over
  the workspace), so pipelines stage, diff and commit like app files.

UI over it: WorkspaceExplorerProvider (explorer with M/A/D decorations),
ScmProvider ("workspace changes" — deliberately not git: no branches, no
history; per-file discard, commit all, discard all), DiffProvider +
dependency-free LCS lineDiff, FileProvider (Monaco over the view; external
writes refresh only clean buffers). Shell Explorer/CachedVfs grow the
members the staged layer needs: stat(), cachedContent(), readMany(), and
peekBase() — backend truth that deliberately does NOT refresh the cache,
otherwise a freshness probe would erase the very conflict it detected.

== Agent toolkits write through the same seam (apps/shared/src/agent)

tools.ts introduces AgentToolkit — a named tool group carrying its own
system-prompt fragment — and composeToolkits() with logged
last-mounted-wins shadowing; an unmounted toolkit costs zero prompt tokens.
filesystem.ts (FilesystemTools) gives the agent read/search/edit/write over
an IWorkspaceFileSystem, layout-agnostic (the host backend owns namespace
rules and protected roots), with read/write caps and path hygiene. Reads
see unsaved editor buffers; mutations REFUSE paths the user holds dirty —
the agent and the user can't silently overwrite each other.

== Sidebar workbench modes (packages/shell)

Apps can now declare VS Code- or Cursor-style sidebar chrome instead of the
classic column: sidebarChrome.ts defines ShellSidebarMode +
SidebarViewContainer; the data is the contract, the mode a projection of it
(no declared views -> clamp to classic). SidebarWorkbench renders the 48px
activity rail (vscode) or icon tab-strip (cursor) with per-app width/open/
view memory; SidebarActiveViewContext lets containers without their own
content share the app's one registered sidebar node — one data owner behind
N icons; viewsFromMenu() is a strictly opt-in projection of an existing
ViewMenu onto rail containers. The footer menu is extracted into
useSidebarFooterMenu so the three frames cannot drift, and the sidebar no
longer requires auth to render. A user setting
(rocketride.general.sidebar, in a new shell-owned, first-seeded "General"
settings section) overrides the app's request. rocket-ui adopts vscode
mode: Explorer / SCM / Agent rail views, mirroring the shell's active view
so only one switcher shows.

Theme JSONs gain the four rail tokens (--rr-bg-rail, --rr-bg-rail-hover,
--rr-fg-rail, --rr-fg-rail-active; light themes add --rr-rail-mode +
--rr-bg-rail-active), mirrored in tokens.ts and mapped to VS Code activity
bar variables in rocketride-vscode.css. Several app descriptors drop the
RocketRideMark iconDark/iconLight placeholders — branding icons outrank the
manifest icon and were masking each app's real face on the rail.

== Local-first dev previews (dev_overlay retired)

The server-side dev overlay (packages/ai dev_overlay.py, -496 lines + test,
register_dev in both SDKs, per-connection expiry in task_server) held
per-user/per-connection moduleId->remoteEntry URL state with TTLs and nonce
routing. All of it is replaced by local-first previews: the app's own
rsbuild dev server becomes a passthrough proxy to the engine
(vscode/appdev/proxyConfig.ts — a generated wrapper config that mounts
compiled assets at /apps/<id>/dev/ and tunnels everything else, the user's
rsbuild.config.mts never modified), and preview pages register the app
client-side (rrdev:registerRemote v3 now carries the workspace manifest —
dev = local truth; a ?appid=X&rrdev=1 tab self-registers by URL convention,
so F5/external-browser debugging needs no panel). Registration lives in
preview pages and dies with them: nothing to expire, no nonce affinity —
per-editor affinity is now a property of the page origin. Only the
publish/build refresh push survives, extracted to manifest_push.py because
publish refreshes are platform behavior, not a dev feature. appLoader drops
ServerAppEntry.entry/dev/devEntries and rrsession affinity; resolution
reduces to override > published registryVersion.

Supporting fixes the new topology forced:
- Every app rsbuild config (+ the scaffold template) pins dev.lazyCompilation
  off and the HMR client to ws://localhost:<port>: the bundle executes on
  the host page's origin, so lazy-compilation's relative XHR hit the host
  and 401'd (first async chunk — Monaco — never compiled). rsbuild core
  bumped ~2.0.11 -> ~2.2.12; posthog-js dropped.
- connection.ts narrows cookie suppression to same-origin embeds only
  (devGate.isSameOriginEmbed): the web App Builder iframe shares the host
  cookie jar and must not stamp /apps, but the VS Code preview on its own
  proxy origin MUST prime it.
- CloudAuthProvider passes the minting clientId through connect(), and the
  CLI names DEFAULT_CLI_CLIENT_ID in its cd_ grant: Zitadel binds auth
  codes to the client that minted them; exchanging under the server's web
  client id fails invalid_client. (TS client types + Python pkce docs in sync.)
- watchManager inlines the app icon as a data URI in dev manifests because
  rsbuild never serves the source ./icon.svg.

== Code pane retired from the App Builder

CodePane.tsx and the 'code' stage are deleted: code editing lives OUTSIDE
the builder screen on every host — VS Code edits natively, web edits via
workspace Explorer file tabs (MonacoEditor gains URI-keyed models +
editorTypes.ts, a page-singleton TS service giving standalone tabs the Code
pane's old TypeScript surface). The dev session runs headless (models +
compiler only) and adopts Explorer-tab saves off the notification bus;
appStore/deps/pack drop their client params and read through the workspace
view, so staged (uncommitted) apps build, pack and preview exactly like
committed ones; scaffoldApp ends with one checkpoint() so a scaffold is a
single reviewable unit.

== Contract & misc

- shell-api frozen as v5 (apiver 4->5, contract/versions/v5.d.ts,
  contract-check floors for the 15 newly frozen types). Additive only.
- explorer-ui: blob-URL lifetime fix — persisted content from a dead
  session is re-read instead of rendered as a broken blob: URL.
- mediaTypes moved explorer-ui -> apps/shared/src/modules/files (old path
  is a re-export shim) so rocket-ui's Explorer and explorer-ui's viewers
  classify identically.
- .gitignore: ignore **/node_modules/ and **/dist/ (workspace trees now
  nest app checkouts).
- pipelines/file-to-text.pipe: sample pipeline (webhook -> parse -> ocr /
  transcribe -> text response) used by the dogfood workspace.
- gallery token check self-heals locally, strict only under CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Eighteen of the 21 review findings survived against the staged-workspace
commit (the other three died with code that commit deleted or already
fixed). Grouped by failure mode:

Data integrity — a transient store error must never masquerade as "empty":
- agent/sessions.ts: readCatalog returns [] ONLY for a genuinely missing
  catalog.json (the store's "File not found" error); every other failure
  rethrows so updateCatalog cannot rewrite the catalog down to one row.
  The serialized catalog chain now advances past a REJECTED write too —
  one failure no longer dams every later catalog update for the page.
- agent/agent.ts: getSession returns a fresh empty session only on
  not-found; a failed load no longer hands the caller an empty session
  that the next send would save over the stored history.
- explorer/CachedVfs.ts: rename() migrates overlays with the subtree, so
  a dirty buffer keeps serving read() at the new path; overlay disposers
  unregister by identity so they still find their entry after the move.

Dev-loop correctness:
- appdev/linker.ts + deps.ts: dynamic `import('…')` rewrites splice a
  QUOTED blob URL (es-module-lexer spans the quoted literal), so
  React.lazy(() => import('./Page')) links instead of raising a syntax
  error.
- appdev/deps.ts: the lock map stores each dependency's declared range
  next to its settled version and re-settles when the range changes —
  editing "^4" to "^5" now takes effect without hand-deleting rr-lock.json.
- appdev/devSession.ts + linker.ts: hot swap seeds the relink with the
  last link's module URLs, so ONLY the saved module re-evaluates; its
  relative imports (contexts, stores) keep binding to the instances the
  mounted tree holds instead of forking new ones.
- appdev/devSession.ts: Monaco models and the page's TS setup are
  reference-counted across sessions — split panels share models by URI,
  and closing one panel no longer disposes the other's live models or
  strips the shared React/platform type libs. Content listeners are owned
  per session and disposed with it.
- appdev/compatProbe.ts: fetch failures and non-404 statuses grade as
  `degraded` (unverifiable), not `incompatible` — only a definite 404
  proves there is no browser build. esm.sh's absolute "/node/fs.mjs"
  builtin form is normalized before the builtin gate so non-shimmable
  builtins cannot ride the fetch queue past it.
- vscode/AppScreenProvider.ts: the readiness bar's dependency probes get
  a 30s abort timeout so one hung registry request cannot stall the bar.
- vscode/watchManager.ts: a FAILED first build also settles the stall
  heartbeat — the Console no longer warns "still building" every 30s
  while the panel already shows the compile error.
- vscode/extension.ts: each app debugs under its own persistent browser
  profile — Chromium refuses a second process on one userDataDir, so a
  shared profile made two apps' debug sessions mutually exclusive.

UI state and interaction:
- AppBuilderProvider.tsx: the dev session keys on the working copy's
  folder/name VALUES, not the scan result's object identity — a transient
  reconnect no longer disposes the live session (and its unsaved edits).
- SidebarProvider.tsx: app/session list refreshes carry a request ticket;
  a slow scan resolving after a disconnect or a newer refresh can no
  longer land stale rows.
- SidebarView.tsx: agent session rows are keyboard-operable (role,
  tabIndex, Enter/Space) and the hover-gated delete button is reachable
  via focus.
- AnchoredPopup.tsx: the popup joins the overlay-layer stack, so Escape
  closes only the TOPMOST overlay (not the popup and its host modal
  together); onClose rides a ref so inline callbacks don't churn the
  document listeners.
- DocDropZones.tsx: an edge drop re-checks usefulness with the RESOLVED
  source group — a sessionless drag of a group's only tab no longer
  manufactures an empty split.
- appdev/wire.ts: toHistoryEntries gets its JSDoc back (it had been
  orphaned above walkDeploymentHistory).

Verified: tsc clean in packages/shell, apps/shared, apps/rocket-ui,
apps/vscode; shell tests 37/37; shared tests 145/145.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All 19 second-round findings were real (they review the staged-workspace
code itself). Grouped by failure mode:

Staging-layer data integrity:
- stagedFileSystem.ts: "before" captures, the commit verify, and the
  undoTurn guard read base truth via peekBase() — the base view's read()
  serves a dirty editor overlay, so capturing it made staging that very
  buffer a silent no-op (stashForScopeSwitch dropped unsaved edits) and
  commit either skipped the write or reported a false conflict.
- stagedFileSystem.ts: deleting a BASE directory now commits. Dir
  tombstones carry a `dir` flag (persisted in the staging manifest) and
  anchor on existence instead of a content hash; previously the tombstone
  was dropped by netOps/changedPaths, so the delete stayed invisible and
  pending forever, blocking auto mode with "0 change(s) still pending".
  A staged-only directory still nets to nothing; deleting a missing path
  is refused up front. Converged tombstones are excluded from the replay
  (deleting an already-gone path would throw mid-commit). Tests cover the
  dirty-overlay capture, the dir tombstone, and the missing-path refusal.
- staging.ts: persist()/sweep()/gc() share one settle-recovered chain —
  one transient store failure no longer dams every later persist for the
  page session, and gc() can no longer run concurrently with a persist,
  read the OLD manifest, and delete the fresh blob the new manifest is
  about to reference (which silently voided that staged edit on reload).

Editor/model correctness:
- MonacoEditor.tsx: adopting an existing URI-keyed model no longer resets
  it to the stored value — the live model may hold another tab's unsaved
  edits, and the reset clobbered them while the sibling's listener
  re-marked the clobbered content dirty. The host learns the divergence
  through onChange instead.
- DiffProvider.tsx: diff computations carry a sequence ticket — during an
  edit burst, out-of-order results can no longer leave a stale diff on
  screen (or set state after unmount).
- WorkspaceExplorerProvider.tsx: creates outside apps/, nodes/ and
  pipelines/ are refused BEFORE staging (a staged root entry failed every
  later "Commit all" until hand-discarded), and action failures surface
  in a dialog instead of only the console.
- Explorer.tsx: renderChildren's dependency list includes decorations/
  decoratedDirs, so a decorations-only change (commit, discard) refreshes
  the M/A/D badges without relying on the host rebuilding entries.

Agent filesystem:
- filesystem.ts: existence checks use vfs.stat() (the contract's
  backend-consulting call) instead of list()+entryType(), which only the
  plain CachedVfs guarantees to fill; C0 control characters are checked by
  char code (eslint no-control-regex is an error in the flat config).

Local-first dev loop (VS Code):
- proxyConfig.ts: the generated wrapper imports the app config RELATIVELY
  (../rsbuild.config.*; an absolute C:/ specifier is an unsupported URL
  scheme to native ESM) and JSON-quotes every interpolated value — paths
  and manifest-sourced icon names with quotes no longer break the module
  and burn the respawn budget. The wrapper also resolves the config file
  the app actually has (.mts/.ts/.mjs/.js).
- watchManager.ts: a failed proxy-config write REJECTS the app's readiness
  — an unsettled promise left debugApp waiting forever with a frozen badge
  and no session for the exit handler to clean up.
- debug.ts: F5 bounds the readiness wait (120s), reports rejection/timeout
  as an error, and never falls back to the engine origin — the engine does
  not serve /apps/<id>/dev/**, so that fallback was a broken preview.
- AppWebview.tsx: the dev registration re-posts only when the manifest
  CONTENT changes — every build mints a fresh manifest object, and the
  identity-keyed effect force-re-registered per build (zombie-container
  churn) with nothing changed.

Shell:
- ThemedSvgImage.tsx: the sanitizer also strips <style> (external
  @import/url()), iframe/embed/object, SMIL animation elements (they can
  WRITE href attributes after the scrub), and external <use> references.
- AppLayout.tsx / SidebarActiveViewContext.tsx: stale doc comments — the
  effective default mode with declared views is 'vscode', and the compact
  drawer of a views-declaring app DOES provide an active-view selection.

Docs:
- ROCKETRIDE_APPS.md: the "dev overlay takes precedence" bullet now
  describes the local dev registration (the overlay is retired).
- python/reference.md: the submit family documents submit · withdraw ·
  reply, restoring parity with the TypeScript reference.

Verified: tsc clean in packages/shell, apps/shared, apps/rocket-ui,
apps/vscode; shared tests 148/148 (3 new); shell tests 37/37.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All six round-3 findings were real:

- agent/sessions.ts: readCatalog takes the catalog PATH its caller captured
  — updateCatalog queues its callback, and an app switch between queueing
  and running re-aims agentsDir(), so a queued update could read the new
  app's catalog and write those rows over the old app's file.
- workspace/staging.ts: gcNow() deletes blobs only when the manifest is
  PROVEN absent (the store's "File not found"); any other read failure
  returns — an empty referenced set from a transient error would delete
  every blob the manifest still names, voiding those staged writes on the
  next load.
- appdev/proxyConfig.ts: the config resolution follows rsbuild's OWN
  selection order (.ts, .js, .mts, .mjs, .cts, .cjs — DEFAULT_CONFIG_FILE_
  NAMES in @rsbuild/core); the wrapper previously preferred .mts, so an app
  carrying both .ts and .mts previewed with different plugins than its
  normal build.
- sidebar/SidebarView.tsx: row activation requires e.target === the row —
  the nested delete button's Enter/Space bubbled up, and the row opened the
  session instead of letting the button delete it.
- shell/AnchoredPopup.tsx: the onClose ref is written in an effect, not in
  render (React 18 can replay/discard a render after an in-render ref write
  already leaked — React Doctor no-ref-current-in-render).
- ROCKETRIDE_APPS.md: one version-resolution order, matching the shell: a
  local dev registration owns the container outright (devRemoteModules is
  never consulted against overrides), then ?version=, then the session
  override, then the server default.

Verified: tsc clean (shared, shell, vscode); shared 148/148; shell 37/37.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The rebase onto develop surfaced a version collision: develop had already
frozen ITS v5 (the log-streams surface, f6537c8) while this branch had
frozen a different v5 for the sidebar-chrome/workspace surface. Frozen
contracts are append-only, so develop's v5 stands verbatim and this
branch's additions re-freeze as v6 (./builder shell:freeze): sidebar
chrome (ShellSidebarMode, SidebarViewContainer, useSidebarActiveView,
viewsFromMenu), the workspace/VFS view surface, and develop's v5 types
together, with SHELL_API_VERSION -> 6 and the v0..v6 floors accumulated
in contract-check.

Also updates appLoader.test.ts to the local-first hold contract: a
top-level ?appid&rrdev=1 tab self-registers by URL convention and HOLDS
like a framed preview (the old "a top-level page never holds" assertion
described the retired embedder-only design); a page without the rrdev
marker still never holds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d VS Code

TabControl gains an opt-in iconsOnly prop (additive; shell-api v6 floors
still pass) that renders each entry's icon with the label as tooltip and
accessible name. The sidebar mode strip opts in, wearing the same glyphs
as the rocket-ui workbench rail: a new shared stroke-based AppsIcon for
Apps (replacing CodiconExtensions in both hosts, now dropped from the
hand-picked codicon set), circuit-board for Nodes, type-hierarchy for
Pipelines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Monitor entry above the mode tabs leaves the shared SidebarView, and
with it the dead plumbing: the 'monitor' onNavigate target, the VS Code
command mapping, and rocket-ui's static-document branch. The nav section
above the tabs now renders only when a host injects a headerSlot, so the
VS Code sidebar carries no empty band. The Monitor PAGE itself stays
reachable (VS Code command palette, rocket-ui monitor document).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s, host cleanup

Phases 1-3 of the tool architecture (docs: sidebar-controller-architecture):

- shell: ToolChannel on the peer transport (retained state topics, buffered
  events, host-inspectable envelope); DevToolProps.channel/activeDocKey;
  contract frozen v8
- hosts: per-topic state retention + no-summon publishes in both relays
  (DevToolBridge, rocket-ui peers); activeDocKey tracking in both hosts;
  strip tool-tab select is reveal-only; generic workspace-FS capability
  (toolhost service RPC for webview controllers + direct hostWorkspaceFs)
- tools/core + tools/appdev in shared: typed topics, builtin registry seam,
  .rrapp scanning/discovery moved out of the extension host entirely
  (appScan.ts deleted; consumers use the shared tool implementation)
- sql-ui as reference tool: controller owns the connection list (single
  writer, queued saves), documents render retained channel state; editor as
  top-level document; connections-only sidebar; single Query pane with
  instances; diagram auto-reverse-engineers
- vscode: sidebar full-update split sync/async (apps list can no longer be
  lost to the CSP reboot); external-browser debug feature removed;
  watchManager renamed devSessionManager (it manages dev-server sessions,
  not file watches)
- profiler-ui: no chart while a session is live (single empty-state line)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ar controller

Phase 4 of the sidebar-as-controller architecture:

- tools/pipelines in shared: the ONE .pipe parser (pure, moved from the
  extension's pipelineParser.ts — deleted) + the discovery loop (scan,
  parse, entries, debounced watch; catalog changes re-derive source rows
  from cached text without rereads)
- workspace-FS capability gains workspaceRoots() (all three impls) for
  display-relative paths
- vscode webview: owns an engine connection (from the host-delivered
  facts); the pipelines controller discovers entries locally; task events
  fold from its own client monitor and the dashboard seeds directly —
  the extension host's entry builder, parse cache, .pipe entry watchers,
  taskEvent forward, and dashboard fetch are deleted
- extension host keeps only: project-id stamping + restart-on-save (the
  always-on invariants, now self-contained via on-demand id collection),
  run/stop/open commands (capability actions), and the status-update
  relay (reads the canvas editor's host-side diagnostics cache, which
  migrates with that feature)
- ProjectProvider parses via the shared tool (deep import: the barrel
  carries view types the extension-host compile must not see)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, SidebarView retired

Phase 5 of the sidebar-as-controller architecture:

- each fixed mode's body moves to its tool: tools/pipelines/
  PipelinesSidebarPanel (nav + Explorer + ad-hoc), tools/appdev/
  AppDevSidebarPanel (MY APPS), tools/agent/AgentSidebarPanel
  (MY SESSIONS), tools/nodes/NodesSidebarPanel (placeholder)
- tools/core/chrome: the generic SidebarChrome (ordered strip of
  builtin items + pinned MF tool tabs + Dev Tools catalog, keep-mounted
  panel stack, persisted order, reveal-only tool-tab select) and the
  shared panelStyles vocabulary; ToolPanel/ToolStorePanel move here
- the fixed-mode SidebarView monolith and its ~25-prop ISidebarViewProps
  are DELETED; sidebar/types keeps only the domain/data types
- each host gets ONE composition root wiring tools to its capabilities
  (vscode views/Sidebar/builtinTools.tsx, rocket-ui providers/
  sidebarBuiltinTools.tsx) — SidebarWebview/SidebarProvider stay
  plumbing; the enumeration collapses into the tools/core registry once
  panels consume a ToolContext

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ication, legacy purge (shell API v7 -> v12)

This change completes the conversion of the product surfaces into the
sidebar-as-controller devtool architecture and then pays down the debt
that conversion exposed: the tool comms/protocol layer moves into the
shell as a frozen contract any third-party author can build against,
the two hosts (rocket-ui, VS Code) are unified onto single sources for
every duplicated policy, and an audited set of dead code, legacy
aliases, and compat shims is removed. Five shell API versions are
minted (v8..v12), each additive under the structural floors.

== 1. The devtool conversion (sidebar-as-controller) ==

Fixed sidebar modes become registry-shaped tool panels: Agent, Apps,
Nodes, and Pipelines are builtin tools (apps/shared/src/tools/*) mounted
through the same DevToolProps contract store tools use; SidebarView is
retired in favor of SidebarChrome + the tool registry. Explorer, Monitor
and Profiler ship as pinnable devTool-category apps. Each tool's sidebar
mount is its CONTROLLER (owns the single server connection, serves ops,
publishes retained state); document frames hold no client and reach the
server only through correlated ops. The canvas rjsf stack moves from
components/canvas to components/node-config.

== 2. Tool comms promoted into the shell (v8) ==

apps/shared/src/tools/core/{opCall,channelTypes,engineState}.ts are
deleted; the layer now lives in packages/shell as the typed-protocol-map
pattern (ShellEventMap applied per tool):

- toolOps.ts: ToolOpMap/ToolOpSpec, createToolController /
  createToolOpServer keyed by wire name ('<tool>.<verb>'), plus the
  call/reply wire guards host relays enforce.
- toolProtocol.ts: ToolStateMap/ToolEventMap base maps ('host:*' keys
  reserved for the host, so base growth can never collide with a tool's
  private keys), typedToolChannel, useToolState, useConnectionReady.
- The 'engine' topic is renamed host:connection and is explicitly the
  controller realm's SERVER-CONNECTION status, published by the HOST
  (publishHostConnectionState) and retained on the channel so restored
  frames read correctly before their controller ever runs.

All four tool apps (explorer/sql/monitor/profiler) and both hosts are
migrated; each tool declares its protocol privately (ExplorerOps,
SqlOps + SqlStateMap + SqlEventMap, MonitorOps + MonitorStateMap,
ProfilerOps) — one app never sees another's typing.

== 3. Host framework: ToolHost + partitioned prefs store (v9, v10) ==

- toolHost.ts: ToolHostServices promoted to the shell as the frozen
  generic core (openPage, openFile?, confirm? with a documented
  FAIL-SAFE rule, workspaceFs?, prefs?, isSubscribed?). Dead members
  (closePage, openHtmlPage) and the misplaced per-mount activeDocKey
  were dropped BEFORE freezing. In-repo builtins extend it privately
  (BuiltinToolServices in apps/shared). IToolHostServices /
  IToolWorkspaceFs renamed to plain (ToolWorkspaceFs is a
  dependency-free leaf the VS Code extension host deep-imports).
- prefsStore.ts: ownership-partitioned preference store. The shell
  types its SYSTEM partition (ShellPrefsMap: sidebarMode,
  sidebarTabOrder, devToolPins, disabledBuiltins, tableLayouts); each
  app types its own keys privately and receives a store PRE-SCOPED to
  its partition (scopedPrefs) — isolation by construction, no shared
  flat bag. createBridgedPrefsStore gives isolated realms (VS Code
  webviews) hydrate-once synchronous reads: hosts seed prefs:init in
  the view:ready reply BEFORE any consumer mounts.
- VS Code: one generic prefs channel (prefs:init/prefs:set in the
  shared Shell*ToWebview unions) backed by PrefsBag.ts ('rr.prefs'
  Memento bags, workspace+global scopes) across Sidebar, Project and
  Account providers. runMigrations migration 6 moves each workspace's
  legacy keys (rr.devTools, rr.sidebarTabOrder, rr.disabledBuiltins,
  rr.sidebarMode) into the bag under the ShellPrefsMap names — the same
  concept now has ONE spelling in both hosts.
- v10 corrects the freeze fingerprint: shell VALUE exports must ride
  the shellApi aggregator to be seen by the mint; all 21 tool-framework
  values were added as lazy getters.

Two silently dead features revived through the store: grid-layout
persistence in VS Code (useGridConfigAnswering answers the DataGrid DOM
channel from any realm's store; mounted in Project/Account webviews)
and the Apps tool's MY APPS list in VS Code (AppDevTool now falls back
to startWorkspaceAppDiscovery over workspaceFs when the host provides
no appdevApps stream — the documented-but-never-wired seam).

== 4. One relay policy, one URI convention (v11) ==

- toolRelay.ts: the frame/sidebar relay policy stated once (calls
  live-only toward the sidebar, replies live-only toward the frame,
  state retained per topic and never summoning, events buffered cap 64
  with frame summon, oldest-evicted canon, retained-state-then-buffer
  replay order). rocket-ui peer.ts is now transport+scheduling only;
  the VS Code DevToolBridge is per-app relays over webview sinks. Every
  hand-mirrored envelope guard in the bridge (isToolCall, isToolReply,
  toolStateTopic, the host:connection payload) is deleted — the
  extension host deep-imports the relay's plain-.ts chain, so the wire
  contract is compiler-enforced instead of comment-enforced. The two
  real divergences the audit found (eviction direction, sidebar replay
  timing) are resolved by the shared policy.
- toolDocUri.ts: toolDocUri/parseToolDocUri/activeDocKeyFor replace the
  hand-rolled 'tool:<appId>[/<docKey>]' spellings in rocket-ui.
- ToolDetailsView (shared/tools/core/chrome): the ~300-line near-copy
  tool details/README page collapses to one component; both hosts are
  thin data adapters.

== 5. Dead code, legacy aliases, and compat purge (audit-driven) ==

Two multi-agent audits (232 findings; every dead/stale claim
grep-verified repo-wide, every legacy removal adversarially verified
for reachable from-state) drove the removals. Deleted outright:

- rocket-ui: types/workspace.ts, appdev/untyped-modules.d.ts,
  MonitorProvider, WorkspaceTools/WORKSPACE_GUIDE/getWorkspaceScope,
  emitFsChange shim, dead exports, Code-pane dirty-tracking vestige,
  dead AppBuilderProvider view-state props.
- Legacy document-URI aliases (monitor, newapp, agent:, app:, status:)
  AFTER fixing the three live mints that still produced them (startup
  conversations now open tool:agent/<id>; the wizard and .rrapp opens
  use tool:apps/<id> — this also fixes Cancel not closing the wizard).
- vscode: the entire dead debugger module (+DAP types, package.json
  Debuggers category/keyword), the severed grid channel
  (GridConfigStore/useGridConfigBridge/monitorTypes), taskStatus.ts
  duplicate, browser.ts, constants.ts, dead message plumbing
  (dashboardSnapshot fetch, connect/disconnect/set*Mode cases,
  shell:init family, project:initialState, trace:clear,
  account:accountUpdate, DevToolInitPayload.authToken) and dead types.
- shared/shell: ProjectView deprecated trace props, trace renderer
  aliases, legacy multi-source Tokens component, the useFlow()
  composite hook (consumers on the split hooks), Zitadel PKCE fallback,
  appLoader one-shot cleanups, test tombstones, dead wire names
  (view:initialized, shell:openSingleton), SqlLegacyMessage raw-peer
  protocol, sql-ui standalone-document mode.

Deliberately KEPT (verified live or guarding durable data): trace
legacy invoke shapes (recordings replay), .pipe annotation unescape,
appdev wire ''-semver tolerance, vscode user-machine migrations,
devSession v1 scope backfill, DesktopProvider pre-v7 probe.

Safety fixes: AgentTool's confirm ?? true auto-confirm becomes
fail-safe (no confirm capability = no destructive delete); the literal
NUL byte in DevToolPanelProvider is escaped (the file was invisible to
grep/audits); AGENTS.md's VS Code error-handling rule now describes the
real convention (getLogger()) instead of utilities that never existed.

== 6. Naming and consistency (measured, partial) ==

- sql-ui de-I-prefixed: 80/83 interfaces renamed to plain (3 kept on
  genuine collisions), aligning the one inverse-convention tree with
  the repo's 62% plain majority and all post-v8 contract additions.
- svc:fs.watch/unwatch -> svc:fs:watch/unwatch (colon separator canon).
- useLatest minted in shell (the latest-ref pattern ~30 sites
  hand-roll, stated once).
- isSubscribed typed on the sidebar update message (cast dropped);
  DevToolBridge engine* naming caught up with host:connection.

== Verification ==

Every phase gated on: tsc --noEmit across packages/shell, apps/shared,
apps/rocket-ui, apps/sql-ui, and both VS Code programs (extension host
+ webviews); ./builder shell:test green throughout (54/54, including
the relocated+retyped toolOps suite); ./builder shell:freeze minting
v8..v12 with the append-only floors intact. Docs updated in-change:
docs/public/product/guides/apps (Dev Tools section rewritten — it
documented a client prop that no longer exists) and the agent-facing
contract comments.

The remaining roadmap (strip-glue unification, wire-name renames,
pattern sweeps, component splits, sunset-ledger conditionals) is
tracked outside the repo in the refactor plan with per-item audit
evidence and verifier verdicts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ool fallback

The sidebarMode default stays deliberately divergent — 'agent' on the
web host, 'apps' in VS Code — now documented at both read sites. When
the persisted (or default) mode's tool has been disabled by the user,
SidebarChrome falls back to the strip's FIRST tab in the user's own tab
order instead of the previously hardcoded 'pipelines' (both hosts'
fallbackId overrides removed; the menu-membership check already treated
a disabled tool's missing tab as 'fall back').

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… capability (v13)

The shell now pops its own stock ConfirmDialog imperatively in whatever
realm the calling tool code runs (every tool realm bundles the shell),
so confirmation needs no host wiring and can never be absent — identical
in the web workbench and a VS Code webview. One dialog per realm; a
second call while one is open resolves false instead of stacking.

ToolHostServices.confirm is deprecated (retained on the type for the
frozen floors; rocket-ui stops providing it). AgentTool's session
delete uses showConfirmDialog — the destructive action now confirms in
BOTH hosts, where VS Code previously had no confirm capability at all
and the action was fail-safe-disabled. Shell API v13.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
develop ships shell API v5; everything this branch minted (v6..v13) was
never released, so the eight interim floors collapse into a single v6
carrying the full new surface (tool protocol maps, ops, relay, tool
host, prefs store, doc URIs, grid answering, showConfirmDialog,
useLatest). Because none of it ever shipped, the deprecated
ToolHostServices.confirm member (superseded same-branch by the shell's
showConfirmDialog) is DELETED instead of frozen forever — the one
chance to drop it. SHELL_API_VERSION = 6; derived barrels/conformance
regenerated; shell tests 54/54; all packages typecheck.

Note for dev servers only: apps.json rows stamped with shellApiVersion
6..13 by deploys made from this branch predate the collapse and will
trip the newer-than-shell gate — re-deploy those dev registrations.
Production rows (<= 5) are unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ient ops, socketless webview realms

THE BUS (packages/shell/src/connection):
- busOps.ts: the addressed-op lane — request()/handle()/emitOp() beside emit();
  registration IS the allowlist IS the routing entry; one handler per name;
  in-realm requests are direct async calls (no correlation table in-realm).
- busBridge.ts: hub-and-spoke across realms — the framework root runs the
  router (local handlers -> owning realm -> summon -> explicit reject);
  correlation tables exist only where a transport is crossed; realm death
  rejects its in-flight and clears its registrations; installed-only summon
  with buffer-and-deliver; createLocalEndpointPair for in-process/test use.
- clientOps.ts: the brokered client.* surface — 36 NAMED ops (tasks,
  dashboard, monitors, fs family with base64 writes, cprofile family, use/
  tool/validate/getService/getEnvironmentKeys); never a generic passthrough.
- ConnectionManager: request/handle/emitOp/ops() + primeMirror() — socketless
  realms answer isConnected/getAccountInfo/getCachedServices/status from
  root-mirrored state (mirrorConnected flag; null = unmirrored realm).
- 19 bus tests (73/73 total): in-realm lanes, bridged both directions,
  cross-realm routing, realm death, summon request+emit, installed-only.

VS CODE ROOT (apps/vscode):
- BusHost: router + shared broker table + broker-owned monitor authority
  (cross-realm refcounts, ONE engine subscription set, single resubscribe on
  reconnect) + mirror feed (state on change, events forwarded) + wire trace.
- Sidebar realm attaches as a spoke (busRealm.ts); BOTH realm-socket call
  sites DELETED (SidebarWebview, DevToolSidebarMount); authToken removed from
  sidebar:extrasUpdate and DevToolHostInfo — no token crosses into any
  webview; engineHttpUrl remains for MF remote entries only.

CONSUMERS MIGRATED to request('client.*') + mirrored sync reads:
- shared: PipelinesTool (monitor + dashboard seed), useDashboardData.
- explorer-ui: fs seam, sidebar tree/mutations/download, upload as 1MB
  base64 chunks (JSON-safe binary rule), frame op server.
- monitor-ui, profiler-ui (rrext_* -> named cprofile ops), sql-ui
  (SqlWireClient adapter through the connect stack), events-ui (monitors).
- Cloud root registers the same table in Shell bootstrap — request() resolves
  in-process there; one allowlist for every framework root.

ALSO IN THIS COMMIT (pre-bus session work):
- useToolStrip: hosts' shared builtin-strip glue (per-tool scoped prefs,
  store rows, activation/deactivation discipline) — both hosts rewired.
- Welcome/Settings wire vocabulary typed + renamed (settings:*/docker:*/
  service:*/io:*/versions:*, settingsTypes.ts unions).
- Restore-time discard policy (pure allowlist, no legacy enumeration).
- eslint: no-floating-promises + no-console (ext host) + fallout; mount.ts
  reverted to console (webview realm — getLogger imports vscode and must
  never reach a webview bundle; this had blanked every webview).
- All vscode viewTypes -> rocketride.page.<name>; 10 view dirs kebab-cased.
- Splits: SidebarWebview (messages/peerRegistry/svcFsClient/footerMenu),
  vscode SidebarProvider (sidebar/toolRows + sidebar/pipelineFiles),
  ProjectProvider (project/deployLifecycle + project/externalLink).

Runtime-verified in the dev host: pipelines feed, Monitor dashboard, SQL
connections all flow over the bus with zero webview sockets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e frame, host.openPage

OPS ARCHITECTURE (the layout, per design):
- packages/shell/src/ops/ (moved from connection/): busOps mechanics +
  registerOpHandlers<M> — THE one registration mechanism (typed
  OpImplTable<M>, skip + hasHandler composition, specific-before-shared);
  busBridge; clientOps = ClientOpMap declarations + the ONE generic
  registerClientOps over IClientOpsSource (same table at both roots —
  hosts differ only in options and pre-registered overrides).
- apps/shared/src/ops/hostOps.ts: host.* DECLARATIONS (openExternal,
  stripeKey, prefs.snapshot/set, envSlots, openPage) + shared payload
  types + shared guards (assertExternalUrl scheme allowlist).
- apps/rocket-ui/src/ops/: cloud implementations (window.open, server-info
  Stripe probe, openPage → shell overlay), registered at RocketApp module
  scope — rocket-ui IS the cloud host.
- apps/vscode/src/ops/: ext-host implementations (vscode.env.openExternal,
  Stripe probe, PrefsBag-backed prefs, dev/deploy env slots + change feed,
  openPage → page directory) + client overrides (env family, slot-resolved)
  + index.ts registerVscodeOps — ONE dependency-ordered wiring call.
- BusHost reduced to transport/router/mirrors/monitor-broker (cross-realm
  refcounts are broker STATE, not host policy).

BROKERED ACCOUNT/BILLING SURFACE (+41 named ops):
- client.account.* (24: profile/org/members/teams/keys; getEnv/setEnv
  carry an optional connection: 'dev'|'deploy' dimension) and
  client.billing.* (17 incl. confirmPending via the public client.call —
  the old `dapRequest` casts at 4 call sites were a PHANTOM method).
- Impl table object-keyed and typed {[K in keyof ClientOpMap]}: duplicate,
  unknown, or unimplemented op names are compile errors.
- portalReturnUrl is HOST POLICY (cloud: own origin; vscode: public site).

FRAMEWORK PAGES (shell providers realm-agnostic):
- shell AccountProvider/EnvironmentProvider/CheckoutFlow now call
  request('client.*')/host ops and gate on mirror-fed isConnected — the
  SAME components render at the cloud root and in socketless webviews.
  authUser falls back ctx → mirrored accountInfo; portal open = brokered
  session + host.openExternal; AccountProvider gains optional onSubscribe.
- vscode AccountWebview 572→~100 lines (renders shell AccountProvider +
  CheckoutFlow + unavailable notice; prefs via host.prefs.*; stripe via
  host.stripeKey); EnvironmentWebview renders shell EnvironmentView
  2-slot over host.envSlots/envSlotsChanged + env.prefill pull/push.
- DELETED: vscode AccountProvider.ts (1335), EnvironmentProvider.ts (488),
  accountTypes.ts, environmentTypes.ts — 2,029 lines of relay.

ONE PAGE FRAME (devtool-frame pattern, static resolver):
- views/page-frame: single webview bundle; compiled-in PAGES registry
  (account, environment); host stamps data-rr-page into the served HTML.
  page-account/page-environment rsbuild entries + wrappers deleted.
- FrameworkProvider (toolhost/frameworkProvider.ts): command → singleton
  panel → bus realm, all pages serving the same page-frame.html; static
  page DIRECTORY (self-registered) = the host.openPage allowlist.
- host.openPage {page, popup?, args?}: caller picks the mode; vscode
  degrades popup→page (no window-modal surface); cloud routes to the
  shell overlay. Any realm can open any framework page on either host.

MIRRORS split per-topic: mirror.status/account/services broadcast on
their OWN trigger events (services blob off status ticks); mirror.sync
returns the union; primeMirror takes partials. busRealm generalized to
views/hooks/busRealm.ts attachBusRealm() (sidebar re-pointed).

FIXES:
- Profiler stats/graph empty after stop: broker passed the params OBJECT
  to the SDK's POSITIONAL cprofile* signatures — args nested under
  `target`, server proxied to a dict token, tree fetch threw. Impls now
  destructure; op declarations typed with the real wire shapes.
- Cloud "Apps icon shows Agents": rocket-ui frame→rail sync prefixed
  tool: onto BUILTIN ids ('tool:apps') — undeclared container persisted,
  resolveActiveView fell back to the default tab. Builtins now map to
  bare ids; SidebarWorkbench.activate rejects undeclared ids so a bad id
  can never persist again.
- host.openExternal scheme allowlist (https/http/mailto) at every root —
  the old relay had this guard and the first op version dropped it.
- eslint: pre-existing gitignore-negation bug in the shared+shell deep-
  import blocks ('!shell/src/*' cannot re-include under an excluded dir);
  existing shared deep imports were silently failing the rule.

GUARDS (the blank-webview bug class):
- eslint no-restricted-syntax ban on 'vscode'/util-output imports in
  webview-reachable paths (views/** + mount.ts).
- vscode build: post-rsbuild scan fails on require("vscode") in any
  webview bundle, before hash save.
- Bus wire trace gated behind rocketride.debug.busTrace (default off,
  live-toggle).

Runtime-verified in both hosts: account + environment pages socketless,
profiler stats/graph, Apps icon, checkout/portal flows. Shell tests
73/73; four tsc projects + both builds green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e/newapp/readme over the bus, mirror machinery collapsed

PHASE B — Welcome + Settings as framework pages:
- shared/ops/settingsOps.ts: the host-configuration vocabulary —
  host.settings.get/save{connect?}/clearCredentials/changed(push)/
  getOpenArgs+openArgs(push); host.cloud.status/signIn/signOutStaged/
  clearPending/statusChanged(push); host.engine.versions/status/
  statusChanged(push)/control/progress(push); host.server.probe. The form's
  wire shape is a DECLARED TYPE — the old echoed-save silent-reset bug
  class is now a compile error.
- vscode/ops/settingsOps.ts absorbs ConnectionMessageHandler + both
  provider save paths: ONE save op (Settings Save and Welcome Save&Connect
  via connect flag; staged cloud credentials commit inside it; welcome
  gate preserved — no engine work until the user confirms). VersionCatalog
  keeps the ETag/globalState/GHCR mechanics; status polling refcounts over
  open settings-family pages; probe answers the CALLER (echo-routing dead).
- Welcome/Settings webviews rewritten as bus realms (no onMessage switch,
  no checkoutResolvers, no probeUrlRef; logos ship in the bundle; sudo
  flow dropped — dead both ends; checkout = client.billing.* ops).
  Settings UIs deliberately NOT unified across hosts (later sprint).
- FrameworkProvider: onClose(userClosed) hook, {open,close} directory,
  static closePage, extracted renderPageFrameHtml(page, args?) with
  data-rr-args stamping for pages that open with an identity.
- host.closePage op; welcome gate reads config directly; settings.open
  positional callers (focus, authError) unchanged across all 9 sites.

B-SMALL:
- DevToolReadme: per-tool panels serve the page-frame ('devtool-readme' +
  stamped appId); catalog facts off the mirror, pinned set via NEW
  host.devtools.installed/install/remove + changed push (vscode/ops/
  devtoolOps.ts); icons are plain engine URLs (template img-src widened to
  http:/https: — the readme page already shipped that posture).
- NewApp: wizard is a framework page over NEW appdev ops (shared decl +
  vscode impl: identity/listFolders/scaffold + identityChanged push;
  developer id re-resolved HOST-side at scaffold time). DELETED:
  NewAppProvider(350) + wrapper/entry + newAppTypes. rocketride.app.create
  → FrameworkProvider row.
- Project editor attached as a bus realm; its checkout slice rides
  client.billing.* + host.stripeKey — useStripeKey is BUS-ONLY (requestId
  correlation deleted), ProjectProvider's four checkout cases deleted
  (last phantom-dapRequest site gone), checkoutTypes.ts deleted
  (StripeKeyReason lives with the ops), shellTypes.ts deleted (orphan).
- OpImplTable + clientOps table FULLY typed (params and result derive from
  ShellOpSpec); every `as` cast in op impls deleted.
- Builtin tools now receive shell:toolSidebarActivated/Deactivated (the
  three startsWith('tool:') gates recognized only MF pins): useToolStrip
  gains toolIdOf + announceBuiltinSelected, wired in both hosts.

RETAINED-TOPIC LANE (the bus's third lane — ops/retained.ts):
- publish/subscribe/read: cross-realm state with last-value replay. ONE
  registry at the framework root (THE authority); realms hold at most
  subscription-fed caches (rebuildable, written by nobody). Replay on
  subscribe (async always — the sync-delivery recursion lesson);
  subscribe-before-first-publish just waits; publish(undefined) retracts;
  retention OUTLIVES the publisher by design (panel-restore replay).
  Doctrine in the header: one writer per topic, static code-shaped names,
  immutable JSON-safe snapshots, read-before-write on reborn publishers.
- busBridge: publish/subscribeTopic/unsubscribeTopic/topic wire kinds;
  router fans registry changes to interested realms; reads ride the
  request lane (bus.topic.read). attachRealmToRoot now returns
  {detach, retained} — the realm's wire port.
- ConnectionManager: publish/subscribe/read verbs + setRetainedPort
  (existing subscriptions re-point and replay off the root's authority).
- MIRROR MACHINERY COLLAPSED: primeMirror, mirror.sync, and the
  mirror.status/account/services broadcasts are DELETED. BusHost publishes
  'shell:status'/'shell:account'/'shell:services' as retained topics; the
  CM's own installMirrorSubscriptions folds deliveries into the sync
  readers (isConnected/getAccountInfo/getCachedServices) and re-emits the
  shell events — consumers unchanged, carrier generic. mirror.event stays
  a broadcast (a STREAM, not state). engineHttpUrl rides shell:status so
  getHttpUrl() answers in socketless realms.
- v6 contract re-minted over the new surface (v5 public floor untouched).
- 10 new retained tests; shell 83/83.

Also: externalLink browser branch rides the shared assertExternalUrl guard.

Verified: tsc clean ×4 (vscode ext+webview, shell, shared/rocket-ui),
eslint 0 errors, shell tests 83/83, saas-root vscode:build (webview guard:
7 files vscode-free) + rocket-ui:build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…idge + cloud twin deleted

The last parallel transport is gone: tool sidebar↔frame peer traffic rides
the shell bus's retained/signal lanes; no host ships a relay.

SIGNAL LANE (retained.ts): signal(topic, payload) — the retained lane's
transient variant: same topic subscription registry and fan-out, nothing
stored (read() never sees it, late subscribers replay nothing). The
N-subscriber ephemeral lane the one-owner op model cannot provide. Wire:
the publish/topic kinds carry a `transient` flag; CM gains cm.signal().

BUS PEER (components/workspace/busPeer.ts): the DevToolProps['peer']
transport re-expressed as lane choices — the old toolRelay policy rule for
rule:
- calls/replies → signals (live-only by nature; toolChannel's own
  correlation untouched — zero tool-facing change),
- channel state sidebar→frames → ONE retained topic per tool holding the
  {topic → state message} map (single writer = the sidebar peer, local map
  serialized through a chain, read-before-write on realm reboot),
- last frame payload → a retained single slot (remounted sidebar renders
  without a handshake),
- events sidebar→frame → signals when a frame is READY, else bounded
  buffer + SUMMON via the new host.openToolPanel op; the buffer flushes on
  the frame's HELLO handshake (bye on unmount; hosts whose panels die
  without cleanup publish the authoritative panel count on the presence
  topic — DevToolPanelProvider does).
- ORDER CONTRACT: host:connection first, retained state second, events
  last — subscription order + the transport's FIFO.
- IBusPeerBus is STRUCTURAL on purpose: a nominal class in an input
  position flips the contract check contravariant (contract-hold.ts rule).

host:connection is now ONE retained framework topic (ext host publishes it
off connection events; cloud publishes from DevToolMount) — frame peers
forward it as the channel state message tools already read
(useConnectionReady unchanged).

DELETED: DevToolBridge.ts (182), the cloud peer twin's relay/transport
guts (rocket devtools/peer.ts → a thin identity cache over busPeer),
peerRegistry.ts (91), toolRelay's createToolRelay policy (the module keeps
only the shared wire constants), the four devtool:peer wire branches
(SidebarProvider, DevToolPanelProvider, SidebarWebview, DevToolWebview)
and their protocol type variants. Dev tool frame panels attach as BUS
REALMS (engine access via request('client.*') now available there too).

Also: the summon table's timeout path now clears its in-flight marker (a
timed-out summon used to wedge the op name forever). v6 re-minted.

Verified: tsc ×4 clean, shell tests 90/90 (7 new busPeer contract tests:
replay order, buffer+summon+hello flush, live-only calls/replies,
last-slot retention, reborn-writer no-clobber, presence gating), eslint 0
new errors, saas-root vscode:build (7 webview bundles vscode-free) +
rocket-ui:build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, prefs lane onto host.prefs.*

Step 1: each project editor realm attaches as page:project/<docUri> (N
panels distinguishable in bus traces; the doc URI is the panel identity
the coming ops carry — projectId is content-derived and mutable).
Step 2: the duplicated prefs lane dies — the webview's bridged prefs
store hydrates via host.prefs.snapshot and persists via host.prefs.set
(the same ops every framework page uses); the prefs:init push and
prefs:set case are deleted. Grid-layout ordering preserved: the store
seeds from the request before any grid mounts (same render guard).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pics

project:services and shell:connectionChange die (the webview reads the
mirrored shell:services/shell:status state every realm already has);
project:envKeysUpdate → retained 'pipeline:env'; project:
cloudConnectionConfigured → retained 'pipeline:cloudSetup' (config-
derived, seeded at construction so late panels replay it). isSubscribed
updates keep riding checkout:subscriptionUpdate. Four per-panel
broadcast loops and two CM listeners deleted host-side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The project editor realm already receives the engine event firehose
(mirror.event → realm-local shell:event) and its own filters are
complete — the host's per-project relay was a second copy of the same
routing. handleEvent now keeps exactly one job: the status-cache fold
that seeds project:load and answers the sidebar's getTaskStatus. The
webview feeds its existing fold from the realm-local event (same switch,
two carriers during the transition — StatusProvider panels still ride
the typed push until they become realms).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e broker

The project editor registers its own monitors (client.addMonitor with
the broker's cross-realm refcounts; the broker resubscribes on
reconnect), once per projectId, removed on unmount. The host's
startMonitoring/stopMonitoring and the reconnect re-register loop are
deleted. This fixes a real bug: the global {token:'*'} ['deploy','task']
registration was added per panel but torn down by the FIRST panel to
dispose, silently blinding every other open panel's running badges until
the next reconnect.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…/missing-env as host.pipeline.* ops

shared/ops/pipelineOps.ts declares the editor's host verbs; the provider
registers them at the root with `doc` (the document URI, stamped into
the realm by pipeline:init) addressing the panel. The run flow keeps all
host policy: subscription gate (checkout:required push), save-first with
the untitled OS-dialog flow, and the save-for-run suppression window
pipelineFiles reads. openCloudSetup is host.openPage{settings} directly;
openLink keeps its embedded-iframe mode as an op. Six postMessage cases
deleted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ent ops

project:validate and project:getNodeSchema (requestId-correlated, two
pending maps, hand timers) become client.validate / client.getService
requests with 15s timeouts. Contract preserved exactly: validate has
never surfaced a rejection to the canvas (it resolved EMPTY on timeout)
— the new path catches everything and returns the empty result; node
schema keeps rejecting so the canvas treats it as retryable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d SDK surface

16 named ops (list/versions/get/artifact/history/deploy/disable/enable/
remove/run/setSchedule/pauseSchedule/resumeSchedule/setSourceConfig/
preview) declared with their real wire shapes and implemented in the one
shared table — registered at both framework roots like every client op.
Unblocks moving the pipeline editor's deploy/deployment protocol into
the realm (and is directly reusable by the cloud).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…stRunningTasks op

resolveDeployTeams takes the ConnectResult identity instead of the
client (its only use was getAccountInfo) — webview realms read the same
identity off the mirrored account state, making the whole mapping module
realm-safe. The deploy drawers' live-run scan (rrext_get_tasks) becomes
the named client.listRunningTasks allowlist entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… into the realm

views/project/deployOps.ts: the DEPLOY page's lifecycle snapshot and the
deployment drawer's 6-step record fetch (get → artifact → history →
versions → cron previews through THE single evaluator → live-run scan via
client.listRunningTasks) run realm-side over client.deploy.*, each call
ANSWERING ITS CALLER — the deploy:data push that settled every
outstanding waiter and the echo-routed deployment:load/error (with its
raw-vs-wire teamId guard) are gone. All 11 deployment:* mutations are
direct requests (wireTeamIdOf translating user~{uid}→@me at the realm
boundary); the drawer's team task monitor rides the brokered addMonitor.
deployment:validate keeps its never-errors contract (clean canvas).

deploy:publish is the ONE verb left host-side (it snapshots the
TextDocument); its post-ack deploy:data re-push is gone — the realm
refreshes its own rows on resolve (the re-push used to settle STALE
fetch waiters).

DELETED: deployLifecycle's handleDeploymentMessage, runDeploymentAction,
fetchAndPushDeployment, sendDeployData, ensureDeployTaskMonitor,
clearTaskMonitors (533→157 lines — logsession transport remains, next
step); the webview's three correlation maps + deploymentRequest helper +
seven settled-by-push cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dylan-savage and others added 12 commits November 11, 2026 12:30
deploy_app ran with no approval card, and the Apps instructions told the model to deploy as soon as check_app passed, so agents shipped versions on their own even in Ask first mode. deploy_app now prepares a deploy_app act that the approval list asks about, the instruction line is gone, and its description says the user is asked first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent guessed Variable names like ROCKETRIDE_ANTHROPIC instead of looking them up, because account.getEnvironmentKeys() was never mentioned in its prompt. The client instructions now point it there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line said control links go in the "controlled node's" array, which the
agent read backwards and put the link on the extractor. The guides and the
engine's validate cover control links, so the prompt no longer describes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#2885's L1 replay was written for the old model stand-in, and two of our
commits that landed before it merged broke it:

- 3a645be (the model picker) deleted standin.ts, which run.ts read for
  the default model, so the runner stopped before its first scenario. It
  also names the model pipeline <conversation id>-<provider>-<model>, while
  the fake engine and the trial's recorder spotted it only by a bare
  conversation id, so every scenario errored on turn 1.
- ba5221b added leasePreview to AgentHost. The trial's host object
  lacked it, so tsc failed.

run.ts now takes the default profile from DEFAULT_MODEL. The engine matches
the picker's project id format exactly (a pipeline the agent writes has a
bare GUID, so it no longer passes as the model pipeline), the recorder
matches on the session id prefix, and the trial host stubs leasePreview.

All 5 recordings replay as recorded; no re-recording needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es the prompt

Every rocketride_client result was cut to 32,000 characters before it was
stored. The cut lost data for good and broke JSON, so path peeks into the
result failed. Eval traces show real results well past it: one service's
schema reaches 43k, and the 37k service was cut 37 times.

- RESULT_MAX_CHARS is now 1,000,000. The model reads a stored result only
  through its summary and memory.peek, so the ceiling catches runaway
  results; the largest seen across 54 eval traces is the 148,151-char
  node catalog.
- memory.peek returns at most 32,000 characters: a chunk's length is
  clamped, and a path preview past it is cut and reports truncated,
  returned_chars and total_chars.
- A {{memory.ref}} in the final answer pastes at most 32,000 characters
  and says how many it cut. Refs in tool arguments stay whole.
- check_app error lists and build failures, and the catalog's switch to
  one line per service, keep their 32,000 limit.
- The best-effort answer's peek line no longer shows "undefined" counts
  for a path peek cut by characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A validate or read_file planned after a write_file of the same file, in one
step, starts at once and reads the copy from before the write. This test
fails until the wave loop runs such a read after the write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fore it

The wave loop started every call in a step at once unless two calls wrote
the same path. A rocketride_client validate, use or deploy.add reads its
filepath while it prepares, and read_file and stat_file read at once, so a
read planned after a write of the same file went out first. A new file came
back "File not found" (11 batch-1 runs) and an existing one validated its
old copy (3 runs).

A call now also waits for earlier calls in the step that write a path it
reads, and a read is held back like a write while a timed-out write from an
earlier step still runs on its file. Reads, and calls on different files,
still run together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ends

The summary treated an object keyed by name, like the node catalog's
services, as a record: one "showing 0 of 12 fields" line per entry until
the room ran out, so 70 of 174 service names showed. It now shows such a
table like a list: the count, the shared fields, every name that fits,
then whole sample entries. It applies only when every value is an object
sharing a field and the record would leave entries out; anything that
fits is unchanged.

A long list showed only its first rows, so a log read never showed its
newest event. It now shows rows from the start and the end, each with
its real index.

getServices now stores the catalog whole (still without the SVG icons):
the one-line-per-service trim is gone, so a peek of services.<name>
reads the full service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test one

No app run in the 12 level-4 evals ran the AI pipeline inside the app it
built: check_app passed and the agent stopped, because everything it
reads about checking an app names check_app as the evidence, and
running a pipeline came up only in check_app's "Don't use it" list.
The description now says what check_app leaves out and how the agent
can test a pipeline itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roof of every feature

Level-4 answers stated features as working that no tool had tried
(real-01, real-02) and left out what never ran (real-05, real-07). The
old line, "claim something works only when a tool result shows it", was
met in the model's eyes by a passing check_app, which proves only that
the app builds and loads. The replacement, after Claude Code's
false-claims line, says a pass proves only what it checked, asks for
untried things to be called untested, and keeps confirmed results plain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#3220)

* test(agent): call rocketride_client chat with the question as JSON

The tool refuses chat today, so this test fails with "chat can't work
over JSON". It calls chat with the three question shapes the agent sent
in the browser-agent evals, and checks that the client gets a Question
that carries the text. A question with no usable shape must be refused
with the shape that works.

Refs #3219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): let rocketride_client call chat with the question as JSON

The tool refused chat, because the client's chat needs a Question
instance. Its hint sent the agent to send(token, text), and that text
lands on the raw lane, which a chat pipeline never reads. In the
browser-agent evals the agent got no answer back (17 refusals in 4
runs).

The tool now builds the Question with Question.fromDict. A plain
string, and each string in questions, becomes {"text": ...}. A question
that is neither text nor an object is refused with the shape that
works. onSSE is left out, because JSON can't carry a callback. The
approval list rates chat free, like send.

Refs #3219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ve is not overwritten (#3218)

* test: reproduce a save lost between the freshness check and the write

The view checks the server copy, then writes without a condition. A save
from another connection between the two is overwritten. The view tests
fail with "Missing expected rejection". The store tests fail because the
store has no conditional write yet.

Refs #3215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(store): add the fs_put_if_unchanged conditional write

The writer sends the SHA-256 of the text it read, or null when it saw no
file. The engine reads the file and its version, compares the hash, then
calls the backend's write_file_atomic with that version, so a save from
another connection can't land in between. On a mismatch it writes
nothing and answers written: false.

The TypeScript and Python clients get fsWriteStringIfUnchanged and
fs_write_string_if_unchanged.

Two filesystem-store changes keep workspace files as they were:
- write_file_atomic writes with newline='', so Windows no longer turns
  '\n' into '\r\n' and the hash of what was written still matches.
- Lock files move from next to each file to a .locks folder under the
  store root. Next to the file they showed up in the user's file tree.

Refs #3215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(vfs): save through fs_put_if_unchanged instead of check, then write

An auto-mode save read the server copy, compared hashes, then wrote with
no condition. A save from another tab, device or teammate between the
two was overwritten. writeNow now sends the hash of the copy the view
read with the write, and the store refuses if the file moved. Commit
all does the same with the hash its check saw. A refusal is the existing
StaleWriteError, which the agent reports as "changed on the server since
you read it".

IVirtualFileSystem gets an optional writeIfUnchanged, which CachedVfs
forwards and the workspace backend sends as fs_put_if_unchanged.

Closes #3215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added module:client-python Python SDK and MCP client module:ai AI/ML modules module:client-typescript TypeScript client SDK labels Nov 12, 2026
dylan-savage and others added 9 commits November 12, 2026 16:04
…browser

# Conflicts:
#	nodes/src/nodes/llm_anthropic/README.md
develop added account.invite (#3069) as the replacement for the now
deprecated inviteMember. The approval table must cover every client
call, so the merge stopped typechecking until invite got the same
never(ACCOUNT) rule as its sibling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…text fallback (#3271)

* feat(agent): move the model loop onto native tool calling with a text fallback

Each turn opens a ModelSession that owns the conversation with the model.
The loop hands it tool results and gets back a closed reply: tool calls,
an answer, unusable, stopped, cost_limit or failed.

- Native nodes get turn-mode Questions (messages + tools) with results tied
  to call ids. Reasoning is sent back as the engine returned it.
- A node that refuses tools (tools_unsupported) falls back to today's text
  question and JSON reply, and modelEngine remembers it for the conversation.
- A reply cut at the output limit never runs its calls. A cut answer is
  continued at most twice.
- scratch, remove and the done-with-calls branch are gone. Done means the
  model ended its turn with no tool calls.
- The meter settles native turns with the provider's real tokens,
  failed-but-billed turns included, and shows them without "est.".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): scope the pipe and services gitleaks rules to their files

The two custom rules set `paths = [...]`, which gitleaks 8.30 does not read
for a rule (the key is `path`), so both rules ran on every file. The pipe
rule then flagged any "token": "..." in JSON, such as tool arguments in the
agent's eval recordings. With `path`, .pipe, .pipe.json and services.json
keys are still caught, and gitleaks' default rules still cover other files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(agent): run eval models through the engine and re-record in format 4

Live L2 trials now send the product's own Question to a real local engine
that runs the product's model pipeline, instead of re-implementing the
engine prompt and calling providers with fetch.

- Format 4 recordings store the engine's raw answers per ask, plus what was
  asked and which call ids it answered. Replay runs them through the real
  session and both adapters.
- The stand-in engine checks the turn rules on every turn question, and
  --adapter text makes it refuse tools so the real fallback runs.
- The fake engine gains fsWriteStringIfUnchanged. Without it, every
  replayed write_file failed after the develop merge.
- All 5 scenarios were re-recorded on claude-sonnet-5-5 (native).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… an app (#3275)

* fix(rocket-ui): keep agent previews out of the dev-session set; add settled()

check_app's hidden previews joined the page-wide session set, so
findDevSession could hand one to another conversation's check, and
list_workspace marked an app "open" while a check ran. A session built
with { hidden: true } now stays out of the set.

settled() resolves once the preview shows the latest work: no file
change being adopted, no build running or queued, and the shell has
loaded the newest link (or the build failed). Three counters close the
gaps the watch feed leaves: the time between a write and `building`,
the hot path, and "ok" firing before the shell loads the descriptor.
revision counts links and hot swaps. Nothing calls either yet; use_app
will.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): open the agent's own copy of an app and read it

AgentHost gains an optional openAppPage(app, { lifetime, conversationId }),
which returns an AppPage. Only domain types cross the seam: PageAction in,
and a PageUse of outcomes, outline lines and page problems out. use()
throws PageGoneError once the page has closed or left the app.

rocket-ui implements it in appPage.ts. Each page boots its own hidden
preview and closes when `lifetime` aborts, including mid-boot. A use
takes the page lock, waits for settled() (20 s at most) and for the DOM
to go quiet, then reads the outline. A failed build or a page not yet
loaded comes back as a not_ready problem, and console errors and crashes
from the use come back as problems too. A use that runs out of time
waiting for the lock returns "the page was busy" instead of throwing.

pageDom.ts reads the whole document in the frame's realm: visible
elements by role with in-house accessible names, values and states, the
text outside elements that act, and refs (e1, e2, ...) that stay stable
for the page's life. The sentences the page writes for the model live in
pageText.ts.

Hidden preview frames now carry data-rr-agent-preview, so the eval
runner's blob-iframe query can skip them. Nothing opens a page until
use_app lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): use_app reads the agent's copy of an app

The agent gets a use_app tool that opens its own hidden copy of an app
for the turn and returns the page's errors and outline with refs. It
reads only; actions come next.

- appUse.ts: the toolkit. It takes the app by folder only, keeps one
  page per app for the turn (racing calls share one open, a failed
  open is retried, nothing opens after the turn ends), gives each call
  a 120 s deadline, hides secrets before it cuts text, and trims its
  view to SUMMARY_BUDGET counted as JSON, with peek offsets at cuts.
  A host without app previews is refused in prepare, before any card.
- run.ts mounts it on runEnded, so the existing finally closes every page.
- loop.ts: use_app holds apps/<folder> in writePaths, so same-wave
  edits of that app and other use_app calls on it run in planned order.
- approval.ts: TOOL_LIST.use_app asks with its card unless the call
  only reads or waits; the card text sits in named constants.
- summary.ts exports SUMMARY_HARD_CAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): use_app clicks, types, selects, presses and waits

use_app now takes up to 20 actions and runs them in order on the agent's
own copy of the app, stopping at the first failure. Every call that
clicks, types, selects or presses asks first; a read or a wait stays free.

- The page answers confirm() with OK, cancels prompt(), notes alerts, and
  holds window.open and target=_blank links, noting each on the action.
- A failed build acts on nothing: every action is not run, with the
  build's failure as a not_ready problem.
- A link that leaves the app fails that action and closes the page; the
  next call drops it and opens a fresh copy, once, inside its deadline.
- The pipelines the app starts are recorded from shell:devReady (so a
  run started on mount counts), re-armed on every reload, skipping reused
  runs, and stopped within 3 s when the page closes.
- settled() waits for the shell to re-attach after a reload instead of
  reading the half-loaded page as settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): Always allow using your apps

use_app's card now offers Always allow, backed by a new appUse grant and
its own setting row ("Let the agent click and type in its own copy of
your apps without asking"). Auto runs a click without a card, as before.

The grants are now data. host.ts holds one GRANTS list; Grant, grantsFrom
and every per-grant loop come from it. toolSettings.ts holds one
GRANT_SETTINGS record typed by Grant, which generates the setting rows
and APPROVAL_SETTING_KEYS. rocket-ui reads those keys instead of keeping
its own list, and samePrefs compares over GRANTS. Before, samePrefs named
each grant by hand, so a third grant turned on read as no change: runs
kept asking and a waiting card was never approved.

The model setting moves from order 13 to 14 so the grants stay together.
The Ask texts in Settings and on the chat switch now name clicking and
typing in an app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): check_app borrows the turn's app page

When the user has no preview open, check_app now builds in the copy of
the app use_app opened this turn, instead of booting a second hidden
preview. The app boots once per turn, and the check builds the copy the
agent goes on using.

check_app gets an optional lease option; run.ts passes use_app's
leaseForCheck, which tries the user's attached preview, then the turn's
page (AppPage.lend, after its boot and any use under way), then the
host's own preview. A page that left the app can't lend, so the host
boots one for the check. lend takes the page's lock like a use does: a
stopped run while the check waits returns ok:false, and dialogs the app
raises during the check show on the next use. agentDevSession is
exported from agentHost.ts for the lent session. check_app's finish rule
is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): show the agent's copy of an app while it works

The user now sees the hidden preview use_app acts on. It shows over the
Design preview, with a banner and "Back to your preview", or at the top
of the chat tab, with Larger/Smaller. It is watch-only, and each target
is outlined for 300 ms before its action. It closes when the turn ends.

- watch.ts holds the copies, the places the UI lends and the
  dismissals. Placement is derived on each animation frame. Design
  places go first, and a place with no size or with something drawn
  over its centre shows nothing. The iframe never moves in the DOM;
  only its cssText changes (fixed, 1200x800 scaled to fit and never
  up, pointer-events:none).
- AgentWatchSlot renders both places. IAppBuilderHost.agentWatch feeds
  DesignView and AgentHost.watchFor feeds the chat.
- A chat leaves out a copy a Design area already shows, so its label
  always matches what its stage shows.
- appPage publishes the copy at open, touches it on each use, outlines
  each ref'd target before acting and finds it again after, and
  retracts it first on close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): count DOM changes a click handler makes as it runs

use_app waited for quiet only after act() returned. A plain (non-React)
handler changes the DOM synchronously during dispatchEvent, before the
MutationObserver existed, so the action read "no change" though the
page had changed. React's commit lands in a microtask afterwards, which
is why React apps were unaffected.

step() now starts untilQuiet before act(). In headless Chromium, with
a plain onclick that appends a list item, act-then-watch reported
changed:false and watch-then-act reports changed:true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(rocket-ui): answer dialogs in every hidden preview

Only use_app's page answered native dialogs. When check_app booted its
own hidden preview (no use_app page this turn), an app that alerts or
confirms on load opened a real dialog. The frame is same-origin in the
user's tab, so that blocked the whole builder.

bootHiddenPreview now answers dialogs itself (pageDom answerDialogs) on
every shell:devReady, so each load and reload is covered, for check_app
and use_app alike. An onDialog option hears what each dialog said;
use_app's DialogLog listens through it, so its dialog notes are
unchanged. The header no longer says the user never sees the frame.

In headless Chromium, with the session and handshake stubbed and an
app that alerts and confirms after devReady, the old code opened 8
native dialogs over two boots and reloads; the new code opens none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(agent): a native use_app call reaches the page with its actions

Under native tool calling, use_app's schema goes to the model as a tool
definition and the model's call comes back as structured arguments. One
turn through runAgent checks both ends: the request carries use_app's
schema whole, nested action items included, and a native call's
actions array reaches the page as typed actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Remove the apps/shared/src/modules/agent/eval/ folder and the
shared:eval builder task.

The folder replayed 5 recorded agent runs inside shared:test. Almost
every agent change broke it, and fixing it meant a paid live
re-record. The browser-agent eval suite (tools/browser-agent-evals)
does not use it.

The .verify/ ignore rule stays, since that suite writes its run output
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt (#3318)

* feat(agent): price the agent's cost from real token counts only

The meter now keeps the provider's four counts apart (input, output,
cache read, cache write) and shows a cost only from them. A text answer
reads its counts from the response node's `tokens` result key, so it is
priced too once the engine sends that key.

A request that comes back with no counts shows no tokens and no dollars.
It counts as uncounted, and the cost limit holds its whole reservation,
so the limit never counts low. The 4-characters-per-token guess stays
only for sizing a request before it is sent.

The meta line, the cost-limit card and the cost-limit setting say how
many requests were not counted. Turns saved before this change still
show their estimate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): report turns, model requests and tool calls as telemetry events

The agent now reports three events through the shell's reporter:
`agent_turn:end` once per turn however it ended, `agent_model:request`
once per request sent, and `agent_tool:call` once per planned call.
RocketApp reads the reporter with useReport(), since it renders inside
the shell's TelemetryProvider, and hands it to the agent host. Each turn
binds it to its ids and passes it down the options the run already has.

`AgentEvents` in turn.ts is the one list. An event carries numbers,
flags, closed kinds and names from our own lists (UUID-shaped ids,
priced models, offered tools), and a compile check fails the build if a
prop could hold free text. At run time an event with any other value is
dropped with a warning that names only the key. Each event also prints
as one `[agent] <event> <props>` console line, which replaces the
`[agent] model call N ms` and `[agent] stop=` lines and the code only
they read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(agent): give each approval its own Always allow switch

Ten more asks get a grant of their own, so each card offers Always allow
and each has its own switch in Settings: delete_file, deploy_app,
terminate, restart, cprofileStart, cprofileStop, saveTemplate,
deleteTemplate, saveLog and database.query.

With runStops or runRestarts on in Ask mode, a run this conversation
started is stopped or restarted with no card, after the same status
recheck Auto makes. A run it did not start now shows the card instead of
being refused. Auto still refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): hide Always allow on cards for runs this chat didn't start

The stop and restart switches only cover runs this conversation started, so the
button on a card for any other run promised more than it gave: the next such
run asked again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): match approval texts to the mode names and to Undo

- The refusal for a run this chat didn't start said "Auto mode"; the mode
  button says "Don't ask", and the agent repeated the old name to users.
- The Agent Approval setting listed only the actions that asked before the
  per-action switches; it now names them all and the switches below it.
- The delete card said "There is no undo." for a file, but the turn's Undo
  puts a deleted file back. Only a folder delete can't be undone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This reverts 5df7ef4. An auto-mode save checks the server copy, then
writes, as it did before #3218. A save from another connection that
lands between the check and the write is overwritten again. We accept
that rare race.

Why:
- #3218 added fsWriteStringIfUnchanged and fs_write_string_if_unchanged
  to both SDK clients' public API, which broke the shell's frozen API
  contract.
- Saves needed the new fs_put_if_unchanged engine subcommand, so the
  engine had to deploy before the UI, with no fallback.
- Deletes and Undo still checked, then acted, so they stayed racy anyway.

The filesystem store's newline='' write and its .locks folder go too.
Lock files sit next to each file again, as before #3218. Workspace
saves don't take those locks once the conditional write is gone, so
they stay out of the user's file tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed module:client-python Python SDK and MCP client module:ai AI/ML modules module:client-typescript TypeScript client SDK labels Nov 18, 2026
dylan-savage and others added 2 commits November 17, 2026 17:43
#3275 typed toolSettings.ts's grant rows with `import type { Grant } from
'../modules/agent/host'`. The VS Code extension compiles toolSettings.ts
too, and host.ts pulls in the rest of the agent (turn.ts, the toolkits,
wave/session), which reaches the shell's browser and React code. That put
the agent and the shell into the extension's Node-only type check
(node16 resolution, no DOM lib, no JSX), so vscode:compile-typescript has
failed with about 470 errors on every OS since.

GRANTS and Grant now live in agent/grants.ts, which imports nothing.
toolSettings.ts reads Grant from there, and host.ts re-exports both, so
no other importer changes. The extension's program is back to the shell
files it had before #3275, plus grants.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the chat (#3349)

* feat(shell): let a chat outlive the component that shows it

useChatMessages takes an optional `controller` and returns the one it
drives. A passed controller is the caller's: the hook makes none and
never stops it, so a chat drawn again by a layout change keeps its
running turn. Without one the hook behaves as before.

The controller also holds the composer's unsent text, and
ChatInputField starts from it and writes to it when its `turn` has a
`draft`, so a half-typed message survives the redraw too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): the conversation owns its live chat, not the tab

An open conversation now has one AgentSession, kept in a module map by
id. Every tab of it, and a tab a layout change draws again, gets that
instance and shows its one chat: the first tab's useChatMessages makes
the TurnController and the session adopts it; later tabs pass it back.

The session runs the chat's request, saves the rows when the chat goes
idle, and closes only when the host says the chat is really gone
(AgentHost.onChatClosed): it stops a running turn, saves the rows after
the stop, and leaves the map. A reopen waits for those saves before it
reads the file. attach, detach and the mount count go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): tell rocket-ui's agent when a chat really closes

The rocket-ui host implements onChatClosed. It watches Documents and
calls back once when the conversation's tab document is gone (its last
tab closed) or Documents was destroyed (a team switch). A tab a layout
change draws again keeps its document, so a split or a moved tab no
longer stops the agent's turn. It checks once at subscribe, which
catches a tab closed while the session loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(appdev): keep a write that lands while a dev session loads

A dev session joined the change bus only after its batch read, so a
file written during the read was never adopted: the preview and
check_app kept the old text until the next write to that file. The
session now joins the bus before it reads the tree, holds what arrives
until the models exist, then adopts it. Adopting re-reads the file and
leaves a model that already matches alone. A failed open still keeps
no subscription.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(appdev): the App Builder follows its stage pref live

The builder read its stage pref once, so a write from outside the
screen did nothing to an open builder. It now reads the pref again
when it subscribes and on every change, through a new optional
IAppBuilderHost.subscribePrefs that rocket-ui's web host implements
over its prefs store. STAGE_PREF_KEY is exported so the agent can write
the same key. VS Code has no subscribePrefs and keeps today's
read-once behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): place a user's view beside the agent's chat

showBeside puts the user's App Builder or pipeline canvas beside a
chat using only Documents' existing verbs. A view already showing in
another group comes to the front there, so a canvas never gets a
duplicate. Otherwise it goes to the chat's layout neighbour, or to a
new group split off to the right when the chat's group is the only
one; a view in the chat's own group moves out rather than opening
twice. The chat is shown and its group made active last. It throws
when a team switch tore the editor area down mid-open or the view did
not open.

host.ts gains the UserView union the placement and show_view share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): show_view puts the user's builder or canvas beside the chat

show_view takes one path, as list_workspace gives it: an app's folder
(apps/<folder>) or a pipeline file. It resolves the path to a UserView,
refusing every other spelling with its fix, and hands it to the host.
rocket-ui's host switches an app's builder to Design through its stage
pref, then places the view beside the turn's chat. The tool is mounted
only on a host with showView, and it is free: it changes only what is
on screen.

writePaths now holds the app or pipeline a show_view names, and the app
a check_app names, so same-step edits, views and checks of one app run
in the order the model lists them. A check by id or name orders against
nothing, as before.

The WORDS text waits for Dylan's approval (TODO marker on the constant).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(appdev): the App Builder reads its prefs from the realm hub

AppBuilderProvider made its prefs mirror in useMemo and disposed it in
an effect cleanup. In dev, StrictMode replays that effect, so the
builder kept a mirror that was already disposed before its first
snapshot arrived: it never saw a stored stage or show_view's switch to
Design, and each open left one subscription behind.

It now reads the app's partition through appPrefsStore, the realm hub's
one mirror, which the dev-tool strip and the agent already use. Nothing
is disposed per mount, and the builder sees the agent's write at once.
This also drops the provider's deep shell import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): the app tools take an app as apps/<folder> too

show_view teaches the model apps/<folder>, and the model carried it
over: check_app apps/daybook-ui failed with "No app" and cost a step.
findApp now drops one leading apps/ before it matches a folder, so
check_app, deploy_app, publish_app and use_app all take that form. An
id or a name still matches only as given.

The loop keys use_app and check_app on the same spelling, so the
ordering key stays apps/<folder>, never apps/apps/<folder>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(shell): a redrawn chat list opens at its latest row

A split draws the chat's group again, so MessageList mounts anew. It
smooth-scrolled to its end on mount, but Allotment sizes a new split
pane only after mount: the scroll aimed at the end of a wider list and
stopped short of the narrower one's, and its own scroll events had
already unpinned it. A waiting approval card could sit out of view.

On mount the list now jumps to its latest row before paint, and while
pinned it keeps it when its pane is resized. New rows still scroll in
smoothly, and a user who scrolled up is left where they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(agent): show_view's first line names apps and pipelines

The agent opened the builder on its own for app work but only opened
the canvas when asked. Naming an app's screens and a pipeline as things
the user can see covers both. Dylan approved the wording, so the
TODO(Dylan) marker goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder Node builder tooling and ./builder workflows docs Documentation module:nodes Python pipeline nodes module:ui Chat UI and Dropper UI tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants