0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

11 commits

Author SHA1 Message Date
Alexandre V.L
5d2b91901b
Agents can show local images in chat: show_image, and Markdown images in replies (#1036)
* Agents can show local images in chat: show_image, and Markdown images in replies

show_image {path} (Zeron MCP) copies a PNG/JPEG/WebP/GIF into uploads and
publishes the image part Codex's generated images use, so every client
already renders it and it outlives the file.

An agent reply's ![alt](path) now draws the image in place, read live by the
chat's host through ReadChatImageChunk: strictly inside that chat's folder,
no link followed, no URL fetched, extension and bytes checked, decoded within
the shared raster limits. Anything refused keeps today's link.

* Chat image folder tests: refuse the filesystem root portably

On Windows `/` isn't absolute, so it was refused as "not an absolute
path" instead of as the root. Test the root of the temp dir's own path
(`/`, or a drive like `C:\`) instead.

* Retrigger CI: cursor_shim frame timeout on the Windows runner

* Reply images: right-click copies the original, and narrow columns scale them whole

Rebased onto main (Origin's new side_chats_only in the show_image test).

- A Markdown image in a reply now opens the shared Copy path / Copy image
  menu, like generated images and tool previews. Copy image reads the
  original through ReadChatImageChunk under that chat's jail, not the wider
  ReadAttachmentChunk, and not the downscaled preview.
- The image row keeps its aspect ratio when the column is narrower than the
  image, instead of keeping its height and letterboxing.
- docs/image-preview.md: the menu, the sizing, and what the cache means for a
  Markdown image whose file changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

---------

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-27 02:55:52 +00:00
Alexandre V.L
b8ed9d9c27
Providers: a switch to turn native subagents off (#1046)
Settings → Providers → Claude Code gets a Native subagents switch (per device, on by default). With it off, a top-level chat launches Claude Code with --disallowedTools=Agent,Task,Workflow, and Zeron's MCP server (ZERON_SIDE_CHATS_ONLY=1) tells the agent to delegate through side chats. Side chats, and chats whose parent is not known yet, keep their subagents. A parked session is replaced before its next idle turn.

Co-authored-by: Alexandre VARGAS <alexandre.vargas.lopez@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:14:48 +00:00
Alexandre V.L
ae1ec6ad8d
Fork: settle the running subagent chips a fork copies (#1045)
* Fork: settle the running subagent chips a fork copies

A fork copies the source's entries as they are, so a subagent still
running there kept a `running` chip in the fork. No run in the fork ever
settles it: the chip and its lanes-card row spun forever (#1001).

The copy now settles it `failed`, like run end and the restart sweep
do. The chip keeps its ref, so it still opens the subagent's transcript.
The source keeps its own.

CI now runs the engine's `side_chats` tests, where the fork tests live.

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

* Fork-settles-subagents demo media for the PR (live before/after stills)

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

* docs: a fork settles copied questions and running spawn chips

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* docs: reflow the ForkSideChat paragraph

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

---------

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-26 21:53:34 +00:00
Wing
cc7da5c2aa
Zeron Cloud, provider switching, and the phone model picker (#966)
Cloud chats on machines of their own (delegation, sleep/wake, durable delete), a credential vault, Stripe billing with Cloud's own portal, per-account Cloud availability, the edge's Cloud model list, provider switching between turns, the phone's tabbed model picker, and desktop/phone/engine polish.
2026-10-22 03:18:13 -07:00
José Gurruchaga
5918248811
Session card: side chats and subagents (#895)
* Session card: side chats and subagents ride a lanes card under it

The explorer's Subagents / Chats footer moves into a card of its own,
stacked under the session card and shown with it. It lists the open
chat's side chats and subagents in session-card rows, each lane's status
marks joined by one thin track. New side chat and Fork chat close the
side-chat lane; settled subagents fold into one "finished" row.

- The two cards share the height below the titlebar, each scrolling
  inside what it gets.
- Renaming a side chat in place now shows the card and pages its lane
  to the row, instead of needing the explorer open.
- Running subagents badge the session card's toggle while the card is
  closed, with no breathing glow, in place of the explorer button's mark.
- The explorer footer, its `FilesEvent` variants and the rename handoff
  to the files surface are gone.

* Session card: drop the running pill from the Subagents heading

The lane's own spinners show what runs, and the session card's toggle
keeps the count while the card is closed.

* Session card: badge the toggle while side chats or subagents run

The count now adds working side chats to running subagents, and stays on
the toggle with the card open or closed until nothing runs.

* Fix side chat rename opening the file explorer

* Session card: cap the lanes card at half the window's height

However much runs, the lanes card stops at half the window and scrolls
past it. The session card above keeps its height; only the lanes give.

* Scroll side chat rename fields into view

* Session card: a click on a side chat only opens it

Renaming a side chat goes through its context menu; a second click no
longer turns its row into a title field.

* Demo: a session fanning out 40 subagents for the lanes card

The mock harness answers a `/fanout [N]` prompt (40 when bare, at most
200) by spawning N subagents at once and settling them one by one,
oldest first, every seventh failing — the only data-side way to fill the
session card's subagent lane, scroll it, and watch it drain into its
finished fold. They settle `ZERON_MOCK_DELAY_MS` apart, 2.5s by default.

scripts/dev-demo.sh seeds "Fan Out Forty Scouts" with three side chats
and fans it out again on each launch. It also lists each demo folder
once (a second space on the same folder was never created, so seeding
failed with "no such space") and falls back to /tmp/zeron-demo-projects
when ~/github is missing.

* Session card: side chats wear their harness mark

Each side chat leads its title with its harness's brand mark, as the
sidebar's session rows do.

* Session card: the lanes card scrolls with the floating rail

Once the lanes outgrow the card and scroll, the card shows the file
tree's floating scrollbar: it appears on scroll, lingers, fades, holds
under the pointer, and drags. `popover::rail_for` gives a view that
already hosts a rail through `ScrollRailHost` (the shell, for the
projects menu) the same treatment for another scroller.

Subagents now list plainly, with no track between their marks; side
chats keep theirs.

* Demo: let a second demo pick its own state and port

ZERON_DEMO_DIR and ZERON_DEMO_PORT run the demo beside one already open
from another worktree; unset, it keeps /tmp/zeron-demo-* and :27921.

* Session card: drop the side chats' track

Side chats list plainly too; no line runs between any lane's marks.

* Session card: side chat starters move to the heading once branches exist

* Session card: subagent rows carry the session's harness mark

* Session card: drop the failed count from the finished fold

* Session card: the branch row shows the checkout's uncommitted +/- totals

* Session card: leave takeover to rename a side chat; stop the diff watch while hidden

Renaming a side chat from a tab menu in takeover focused an editor in the
zero-width transcript column, so keystrokes went to an unseen field. Leave
takeover before revealing the lane. The branch row's checkout-diff stream
also ran for as long as the app lived; drop it while the card is hidden.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:54:12 -07:00
Wing
8a0fded891
Native visuals: agents show interactive Luau visuals rendered by GPUI (#900)
* Render agent visuals natively from sandboxed Luau scripts

show_visual now takes a Luau script instead of an HTML page. The script
builds its data and state once and returns a view function whose ui.*
tree (layout, text, stats, tables, charts, tabs, toggles, sliders,
buttons, links, 2D canvases, 3D scenes) Zeron renders with its own GPUI
elements, so a visual scrolls, clips, blurs under the glass composer and
takes input like any transcript row on every platform.

zeron-visual is the GPUI-free runtime: a Luau sandbox with no I/O, a
memory cap and per-call time budgets, seeded randomness, strict props
whose style rules are the API (theme color tokens, the transcript's type
scale, no fills or borders), canvas drawing commands, and 3D scene
projection. The engine runs every script through check() before showing
it and returns line-numbered errors to the agent.

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

* Render visual scenes and shaders on the GPU

- Scenes rasterize with a depth buffer (no more painter's-algorithm
  occlusion errors), clip at the near plane, shade curved solids
  smoothly, and paint as one image; the software path renders in
  parallel row bands at full resolution.
- With a GPU (wgpu, new crate zeron-visual-gpu), scenes render with PBR
  materials (roughness, metal, glow, glass with ior and dispersion),
  soft shadows, MSAA, and bloom; the software renderer is the fallback.
- ui.shader runs Shadertoy-style GLSL on the GPU: iTime, iResolution,
  iMouse, iCamera (orbit), named inputs bound to state, iNoise, and up to
  four buffer passes read as iChannel0-3 with feedback. Composited by
  blend (light by default, so black is clear; alpha; opaque) with
  optional bloom. Each pass is validated with naga so errors reach the
  agent with their line.

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

* Add visual assets and iOS visuals, and harden untrusted visual input

Assets: show_visual takes files (glTF models, PNG/JPEG/WebP/HDR images)
from the agent's working directory. The engine checks and stores them
beside the script; scenes gain s:model, textures, environment maps and
sprites, and shaders get iTexture0-3. Limits (16 files, 8 MB each, 10 MB
together) fit the MCP server's one WebSocket message to the engine.

Rendering: GPU scenes and shaders fade out toward their edges; plain
translucent surfaces blend unbent (only glass refracts) and, with sprites,
draw before glass so it refracts them; bloom composites correctly in
alpha mode; shader images sample upright as on Shadertoy.

iOS: each visual gets a Rust worker thread in zeron-mobile that runs the
script, lays the tree out, draws canvases and charts, and renders scenes
and shaders with wgpu; the transcript takes each visual's measured
height, and VisualView only paints what arrives and forwards touches.
The demo gains an "Agent visuals" chat (ZERON_DEMO_VISUALS can point it
at a desktop's visuals).

Hardening (security and code review):
- glTF: images stay encoded and are size-checked when drawn; accessor
  shapes are validated; node walks are bounded; parsing can't panic.
- Images: a pixel budget besides the side limit; textures larger than
  the GPU allows are refused.
- wgpu errors are caught or logged, never a panic; the texture cache is
  keyed by content, bounded, and decodes outside its lock.
- The engine checks for a running turn first and removes partial
  writes; asset names may not differ only by case; the MCP server reads
  only regular files, bounded.
- Desktop: released visuals free their GPU images; iTime and iMouse
  follow the docs; no second render when a drag ends.
- iOS: fonts are shared, not leaked per visual; offscreen and
  backgrounded visuals pause; commands see the tree the last one left;
  failed loads retry.

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

* Render desktop visual frames off the main thread and reuse GPU targets

Desktop scenes and shaders rendered and read back inside GPUI's paint,
blocking the main thread on the GPU every animated frame, so a heavy
agent shader could stall the app. Paint now does only the cheap parts
(input, uniforms, the scene's budgeted Lua draw) and hands the render
to a background thread, one frame in flight per visual; the view shows
the newest finished frame and repaints when the next lands.

Scenes also allocated ~70 MB of render targets every frame. They now
live in a SceneState kept per visual (desktop and iOS) and are remade
only when the size changes; scenes and shaders keep their readback
staging buffer too. The test room's steady frame went from ~8 ms to
~3 ms at 1440x720.

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

---------

Co-authored-by: wing-anara <wing@anara.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:04:16 -07:00
José Gurruchaga
01832f2cac
MCP: create standalone sessions on a selected device and project (#706)
* feat(mcp): create standalone sessions on selected hosts

Add chat/side kinds with compatible defaults, resolve projects within the selected device, and validate that host's harness and model catalogs before writing. Route transcript reads to the chat host and preserve send baselines across waits so missing session rows and delayed replies cannot return an old response.

Cover invalid requests, remote catalogs, mixed batches, wait races, two-engine execution and interrupt delivery. Add an isolated MCP stdio smoke fixture.

* docs(mcp): document standalone and remote session workflows

* fix(mcp): match turn replies by message id, not host timestamps

Replies were filtered by createdAt >= the caller's send time, but
createdAt is stamped on the chat host's clock. A remote host running
behind the caller hid the reply to the send, and the wait spun until
timeout with no replies. send_message already snapshots the transcript's
message ids before sending, and a new chat has none, so the id baseline
alone identifies new replies.

The test transcript no longer gives a brand-new chat an earlier reply;
the existing chat's earlier reply shares the send's timestamp, so only
its id can exclude it.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:02:48 -07:00
José Gurruchaga
df0cd2980a
Replace Pi ACP adapter with native RPC integration (#630)
* feat(pi): add native RPC transport and compatibility contracts

* feat(pi): implement native harness and event normalization

* feat(pi): resume native and legacy ACP sessions

* feat(pi): support native steering and reliable cancellation

* feat(pi): expose native models commands and skills

* feat(pi): bridge extension dialogs to desktop and mobile input

* feat(pi): preserve Zeron MCP delegation in native sessions

* feat(pi): activate native RPC driver and CLI discovery

* refactor(pi): retire ACP adapter and verify native lifecycle parity

* fix(pi): preserve switched sessions empty resumes and composer drafts

* docs(pi): translate RPC migration research into English

* style(ios): trim whitespace in updated question bindings

* test(acp): wait for scenario progress before steering

* test(pi): compare canonical session paths on Windows

* fix(pi): deliver steering bursts in the same model step

* fix(ios): preserve generated Swift binding whitespace

* fix(pi): scrub nested-agent env and keep dropped-resolver semantics

Pi's native launch skipped owned::configure, so CLAUDECODE and the other
nested-agent variables the ACP launch removed leaked into pi. The engine's
new input-cancellation task also turned a dropped resolver into an empty
answer; keep it an error for harnesses (opencode rejects on error).

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

* ci: run the native Pi RPC driver tests

pi_rpc needs the native-fixture feature and pi_resume is an engine test;
neither ran in any workflow.

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

* fix(pi): never overwrite a configured Pi steering mode

set_steering_mode persists to Pi's global settings.json. Selecting `all` on
every session start silently rewrote the user's standalone Pi preference and
undid any `/steering` choice on the next run. Select `all` only while neither
the global nor the project settings configure a mode.

PiHarness::with_agent_dir lets tests (and callers) pin PI_CODING_AGENT_DIR for
both the child and Zeron's own reads, so fixture tests never consult the
developer's real Pi settings.

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

* fix(ios): don't trap on duplicate question ids when prefilling answers

Dictionary(uniqueKeysWithValues:) crashes on a repeated key; question ids come
from agents and synced docs, so keep the first instead.

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

* style(pi): rustfmt the steering-mode guard and its tests

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

* fix(pi): start fresh with a notice when a session can't be restored

The native driver hard-failed a resume whose Pi session file was missing.
The engine injects the chat's stored session id on every dispatch, so one
unwritten or deleted session file left the chat failing every message for
good. The ACP adapter and the Codex driver start a new session and announce
the lost context instead; do the same. Proven-empty sessions still keep
their UUID via --session-id.

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

* fix(pi): never fail a turn over an attachment Pi can't inline

Composer uploads include SVG, HEIC, BMP, TIFF and AVIF. The native driver
errored the whole run on any of those (or an unreadable path), while the
Claude driver skips them and the retired adapter ignored attachments: the
path refs already ride the prompt text. Load images best-effort instead.

Also give native startup the 120s budget the ACP handshake gave Pi, since
extensions can start cold.

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

* style(pi): rustfmt the lost-session live test

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:14:54 -07:00
Arman K.
a7e505e6b2
Cursor harness: load user MCP servers and plugins (#616)
* Load Cursor settings so the Cursor harness sees user MCP servers

The SDK loads no ambient settings unless local.settingSources is set, so
the agent only saw the injected zeron server: no ~/.cursor/mcp.json,
project .cursor/mcp.json, or plugin servers. Pass settingSources: ["all"]
to match the IDE/CLI.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Cursor harness: skip the project setting source

The SDK hardcodes ignoreApprovals when it loads MCP servers, so
settingSources "project" (or "all") would spawn a repo's .cursor/mcp.json
servers and .cursor/hooks.json commands at chat start, without the
approval step Cursor itself requires. Load user, team, mdm and plugins
only: ~/.cursor/mcp.json and plugin servers still reach the agent.

The fake SDK now records settingSources beside mcpServers instead of
inside the server map.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 17:33:35 -07:00
Wing
731697b66f
Explorer Subagents/Chats sections, Zeron MCP injection, and fork seams (#498)
* Add synced side chat forks in the right sidebar

* Handle the current composer transition event in side chats

* Polish side chat history and reuse chat context menus

* Add right-sidebar tab close actions and simplify history toggle

* Remove icons from tab close menu actions

* Place side chat below Terminal in the surface picker

* Style side chat history as a counted footer badge

* Explorer side-chat sections, MCP injection, and fork seams

The file explorer docks two collapsible sections under the tree: Subagents
(the active chat's spawn chips with live status) and Chats (its children:
forks and agent-spawned side chats). Rows are the left sidebar's compact
session row without harness, project, or device icons; clicking opens the
subagent or side chat in the right pane, and the Chats header's "+" starts
a fresh side chat. Sections animate with the sidebar's collapse motion and
only re-render when their contents change.

The host engine now stamps its own MCP server onto every run it drives
(`RunRequest.mcp`): `zeron mcp` pointed at the port this engine serves,
identified as the originating chat. Claude gets it via `--mcp-config`, ACP
agents via `session/new mcpServers`, Codex via `mcp_servers.zeron.*`
overrides; title runs never carry it. A chat can now ask its agent to spawn
side chats, which list under it in the explorer.

Forks append a `fork` seam part after the copied history, rendered as
"This chat was forked from <title>". `ForkSideChat` accepts an optional
parent so a side chat's own fork button lands the copy as a sibling. Side
chats in the right pane gain a header with "+" (new chat in this session)
and fork.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Open the surface host from footer rows and fix the collapse endpoints

Opening a side chat from the explorer footer while only the explorer was
docked pushed a tab into a closed surface host; opening a side chat now
opens the host first (programmatic, so an open pane is left alone). The
section toggle animated open→close from 0 to full instead of full to 0.
The fork seam's rules paint as 1px hairlines: a bordered box that thin
draws nothing on the Linux backend.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Session header side-chat buttons and subagent row times

The main session header gains the same "+" and fork pair the side-chat
header carries, beside Add action, so a side chat can be started or the
session forked from either end of a family. Subagent rows in the
explorer footer show a time-ago from the spawning turn, like chat rows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Explorer footer: header actions by the caret, resizable pane, paging, empty states

The "+" and fork now sit on the Chats section header beside its caret, in
the file pane where the request put them. The footer is a pane of its own:
dragged at its seam with the tree, persisted as files_sections_height, and
shared between the open sections, which scroll inside their budget; a
section's content shrinks the footer when it wants less. Each section
shows ten rows before a "Show more" row pages by 25, like the sidebar's
Archived shelf. Empty sections explain themselves — "Subagents will appear
here when they are created", and for Chats the same with Fork and New side
chat buttons.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Explorer polish: hover-revealed actions, borderless pane, edge fades, seam handle

The Chats header's "+" and fork appear on hover, like the sidebar's row
menus. The explorer drops its internal hairlines: the toolbar is bare, the
search field has no box or wash of its own, and the footer no longer
draws a top border — its seam shows a drag handle on hover instead, lit
while dragging. The tree and both section lists fade at their overflow
edges the way the sidebar does. Empty sections gain a faint icon and
centered copy, and the footer's minimum rises so an empty footer keeps
its presence.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Explorer footer: plain empty states, app-style seam, no side-chat header

Empty sections are left-aligned copy with no icon, and section headers
carry no hover wash. The tree/footer seam uses the app's pane-seam
treatment: nothing at rest, a 1px highlight fading in on hover and lit
while dragging. The search field keeps its background. Side chats in the
right pane lose their extra header row; the transcript fades under the
tab strip again, and "+"/fork live on the explorer's Chats header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Explorer footer: half again taller minimum, floor each open section

Footer minimum 260→390px and default 340→510px; an open section body
never drops below 120px, so one or two rows keep the section's presence.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Explorer header: restore the bordered, washed toolbar

The search bar row keeps the shared toolbar's hairlines and surface wash
like the editor header does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Fix CI after merging main; page explorer sections by ten

The Windows-only harness test built a RunRequest without the new mcp
field, and main's SessionMessageEntry.duration_ms / Row.compact_fold
were missing from the fork-seam literals. Merged origin/main and set
them. "Show more" now reads "Show N more" like the sidebar's Archived
shelf, paging ten at a time (or the remainder when fewer are left).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Side-chat fixes: composer height, chip hover, fading titles, PR badges, review points

The side-chat composer now takes the same settled dock frame and column
width the shell feeds the main composer, so both take the same height
branch. Picker chips key their hover fade per picker entity, so hovering
one composer's model chip no longer lights the other's. Explorer footer
rows use the sidebar's fading label instead of an ellipsis and carry the
PR badge; the footer's drag seam is gone (fixed 510px budget, no setting).
The tab band swallows wheel events so a scroll over the tabs no longer
moves the transcript beneath; the surface picker and new-tab menu drop
their Side chat entries.

Review feedback: Escape interrupts the conversation whose composer has
focus; opening an existing side chat reveals a hidden pane; a fork that
finishes after the user switched conversations opens its own pane; and
side-chat transcripts get a workspace link handler.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Drop the side-chat history popover from the empty right pane

The explorer's Chats section is the one list of a session's side chats;
the picker page's count badge and popover duplicated it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Enable Zeron MCP across harnesses and parallel side-chat batches

* Add side-chat context menus and suppress their notifications

* Constrain fork dividers and remove their hover metadata

* Prevent nested MCP chats and simplify message attribution

* Make MCP steering non-interrupting and preserve queued turn order

* Use native Claude and Cursor steering and verify active-turn delivery

* Submit Cursor steering inputs without waiting for earlier delivery

* Surface Pi provider errors instead of ending turns silently

pi-acp 0.0.33 ignores an assistant message's error stopReason and settles
the prompt as a plain end_turn, so a rejected model or expired login left
the chat with the user's message and no reply. The Zeron Pi extension now
reports failed assistant messages via ctx.ui.notify(..., "error"), which
pi-acp forwards as an error-tagged chunk; the ACP normalizer maps that to
AgentEvent::Error so the transcript shows the provider's message.

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

* Hold mid-turn sends for turn-boundary agents until the turn ends

Pi, OpenCode, Grok, Devin, Hermes and Antigravity read new input only
between turns. A send, Steer command, or queue-row Steer arriving mid-turn
went into the run mailbox and wrote its user message immediately, so a
burst rendered as every message stacked above every reply. Those prompts
now wait in the visible queue (explicit steers ahead of ordinary rows)
and reach the transcript when actually delivered, one per turn. Mid-turn
steerable agents (Claude, Codex, Cursor) are unchanged. The composer drops
its optimistic echo once the host holds the send as a queue row.

Adds queue_order_live, a real-model transcript-order check for plain
sends, the queue, and steering; verified with steering_live on Pi,
Claude, Codex, Cursor, OpenCode, Grok and Devin.

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

* Steer immediately on every harness that allows it, like Codex

A steer now stops the current generation at once and the agent answers
it in the same live session; a running tool is never killed (the steer
waits for it to finish) and background children survive.

- Claude: steers use stream-json priority "now" (verified on CLI
  2.1.280); the interrupted turn's result is a steer boundary, not Done.
- Cursor: the shim cancels a text-only run and continues with the steer
  as the follow-up turn; late deltas from the cancelled run are dropped.
  During a tool the native SDK steer still injects at its boundary.
- OpenCode (1.x and 2.x): a steer aborts the generation once no tool is
  open; the abort's idle/interrupted frame promotes the steers.
- Pi, Grok, Devin (ACP): session/cancel while the prompt is visibly
  generating, then the queued steers continue as one prompt. The
  session/prompt line is written eagerly so a cancel can never overtake
  it. Grok drops a prompt cancelled before any output, hence the
  generating gate.
- Antigravity and Hermes stay turn-boundary: agy_acp_server 1.1.1 never
  answers any prompt again when a cancel lands as it starts replying
  after a tool (captured on the wire).

Adds steer_now_live (real-model: steer during a streaming answer, single
and burst). Verified on the real harnesses: Claude, Codex, Cursor, Pi,
OpenCode 1.18 + 2.0.11, Grok, Devin, Antigravity across steer_now_live,
steering_live and queue_order_live.

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

* Never abort a running tool when steering Claude or OpenCode

Claude: priority "now" also aborts an in-flight MCP tool call ("The tool
call was interrupted before a result was received"), verified on CLI
2.1.280. Steers now go as "now" only while no top-level tool is open;
with a tool running they go as "next" and land right after its result,
in the same turn.

OpenCode: a tool without arguments only surfaced as a ToolCall once it
completed, so preemption saw no open tool and aborted it mid-run. A
`running` tool now counts as started whatever its input.

Adds steer_tool_live: a slow (15 s) MCP tool runs, the user steers, and
the tool must finish and its result reach the agent. Passes on Claude,
Codex, Cursor, Pi, OpenCode, Grok, Devin and Antigravity.

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

* Select Devin models by family and set effort through thought_level

Devin CLI 3000.11 no longer selects catalog variant ids over ACP: the
session advertises one id per group of variants and exposes effort as
`thought_level` (none..max, per model) and fast mode as `speed`. Picking
e.g. `swe-2-medium` failed with "did not advertise requested model".

The picker now lists one model per family (plus any non-effort
qualifier such as "1M"), with the family's effort levels in the effort
dropdown and a Fast option where the catalog has fast variants. A run
selects whichever group member the session advertises, then sets
thought_level and speed from the options offered for that model. Saved
variant ids keep working: their baked-in effort and speed apply unless
the run chose its own. "No Thinking" maps to the lowest level (`none`).

Verified on the wire against devin 3000.11.3: swe-2-medium -> swe-2-high
+ thought_level medium; Opus 5.5 xhigh + speed fast; GPT-6 Sol none.

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

* Fold clicked steers into one answer and never strand Claude in Working

Claude: rapid `now` steers each interrupt the turn the previous steer
started, and CLI 2.1.280 replays only the last one (the earlier texts do
reach the model). The driver waited for the first steer's replay, so it
never matched, and every later turn end was held: the chat stayed
Working forever. A replay now confirms its steer and every earlier one,
and a turn end held for steers is released after 5 s of CLI silence.

Pi, Grok, Devin: preemption no longer waits for the prompt to produce
output, so steers clicked one after another fold into the same answer
instead of each getting its own. Pi and Devin keep a prompt cancelled
before any output (verified live); Grok drops it, so for Grok the
dropped prompt's text is re-sent ahead of the steers.

steer_now_live gains ZERON_TEST_CLICK_GAP_MS (queue every message, then
press Steer on each in turn). Verified live: Claude Opus x2 and Sonnet
with 5 clicks 0.3 s apart end Idle with one answer; Pi, Grok, Devin,
Cursor and OpenCode answer three clicked steers together; running-tool
and steering_live checks still pass on Claude, Pi, Grok and Devin.

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

* Offer each Devin Fusion pair once, with the primary's effort

The Devin catalog lists every Fusion effort combination (335 variants),
but the ACP session selects one id per primary model and sidekick (35)
and takes the primary's effort through thought_level; the other 300
entries were rejected ("Invalid value ... for config option 'model'").
Fusion variants now group by primary model + sidekick, with the
primary's effort levels in the effort dropdown. Fusion sessions expose
no speed option, so no Fast option is offered for them. Saved Fusion ids
still resolve to their pair and keep their effort.

Verified against devin 3000.11.3: the picker's 35 Fusion entries map
one-to-one onto the session's 35 Fusion ids (95 Devin models total, as
the session advertises); a saved fusion ...-max-... id runs as the
advertised pair with thought_level max.

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

* Format devin_models

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

* Configure Devin Fusion from one row: Lead, Effort, Sidekick, Fast Mode

Devin lists Fusion as one model configured by lead model, effort,
sidekick and fast mode. The picker now does the same: a single Fusion
row directly under Adaptive whose options are `lead` and `sidekick`
(plus Fast Mode where a lead has fast variants), with effort as its
reasoning levels. Hovering the row opens a card with those settings —
Lead, Effort and Sidekick open their choice lists, Fast Mode is a
switch — built from the tray's setting triggers and hover intent. Any
choice in the card selects Fusion.

A run resolves the chosen lead + sidekick to the one Fusion id the ACP
session offers, then sets thought_level and speed (Fusion sessions do
expose speed for leads with fast variants; the previous commit assumed
otherwise). The one pair Devin does not offer fails with a clear error.

Verified against devin 3000.11.3: Adaptive, Fusion, SWE-2... order;
6 leads / 6 sidekicks with Devin's defaults; GPT-6 Sol + GLM-5.2 High +
xhigh + fast runs with thought_level=xhigh and speed=fast accepted.

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

* Keep the Fusion card open while configuring; trim picker chrome

- Picking a Lead/Effort/Sidekick choice keeps the Fusion card open, and the
  card's nested choice lists get the same safe-triangle cone as other menus.
- A selected Fusion keeps its settings in its card only, not the tray.
- Model rows show just the name; the description appears only to tell
  same-named rows apart (opencode providers).
- The model chip shows the model and its effort only (no context, fast
  mode or other options).

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

* Route side-chat native commands and keep archived side chats restorable

Review feedback on #498:
- A side chat's history wrapper went in front of every first turn, so a
  selected /review (or any native command) became model input. Commands
  now go out bare, an empty history adds no wrapper, and a fork whose
  first turns were commands sends its copied history with its first
  ordinary turn.
- Settings > Archived (and the iOS archive list) list archived side chats
  again: after closing the tab it is the only place to restore one.

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

* Side chats: working links, kept drafts, own shortcuts, visible errors

Outstanding review feedback on #498:
- Links in a side-chat transcript were rejected (only the main chat was
  accepted); file links now resolve against the side chat's checkout.
- Closing a side-chat tab with an unsent draft keeps it loaded; reopening
  it from the explorer re-attaches the tab with the draft.
- An open side-chat model menu owns Cmd/Ctrl+1..9 instead of jumping to
  another conversation.
- Side-chat creation failures show in the composer's failure chip (the
  old render site was gone).
- A side chat's composer footer keeps only the context ring.

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

* Track fork-history delivery; bind side-chat file links to the side chat

Re-review of baa0bbc5 (#498):
- A fork whose first turn was a native command owed its copied history to
  the next ordinary send, but warm dispatch and steers into the live
  runtime skipped the bootstrap. All three paths now share one helper, and
  delivery is tracked, not inferred: per live runtime, and durably as the
  provider session recorded in the doc (`forkHistorySession`).
- A side chat's file link opened an editor bound to the main chat. Editors
  now carry the linking chat and its state through creation, navigation
  and reuse (keyed by pane, chat and path).

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

* Record fork-history delivery only when the runtime consumes the steer

Re-review of 67e087ee (#498): a warm send carrying the owed fork history
marked it delivered as soon as it entered the mailbox. If the runtime died
before consuming it, the orphan re-dispatch resumed the same provider
session believing the history was there, and lost it. The ledger entry now
remembers it carries the history, delivery is persisted on its Steered
confirmation, and a run records only the history its own prompt carried.

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

---------

Co-authored-by: wing-anara <wing@anara.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 23:09:37 -07:00
wing-anara
92153025b5 Add zeron mcp server with parent-linked chats
`zeron mcp` serves MCP on stdio and proxies every tool into the running
engine's localhost IPC, so an agent in one chat can create, read, message,
wait on, interrupt, and archive other chats. The protocol layer is
hand-rolled (initialize/ping/tools/list/tools/call over newline JSON-RPC)
to avoid a new SDK dependency.

Chats created through the server record the creating chat as parent
(`Chat.parent_chat_id` / `parentChatId` on the registry row, serde
defaulted so older rows read as parentless). `list_chats { parent }`
returns a chat's children. The left sidebar, project tabs, jump slots and
Archived section hide chats that have a parent; they stay reachable by id,
deep link, and MCP.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 04:49:11 +00:00