0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
comet/docs/screenshots/access-modes
zeronsh[bot] 1295d57734
Access modes and plan mode for every agent; Muse answers every approval stage (#1088)
* Access modes core, and Muse answers every stage of an approval

Muse splits a compound command (`mkdir -p out && touch out/x`) into
approval stages and moves to the next with approval/updated; Zeron only
answered approval/requested, so every command after the first stage
waited forever. Each stage is now decided once.

Adds AccessMode (Supervised, Auto-accept edits, Full access) and plan
mode to RunRequest and ChatConfig, the Harness::access_modes /
supports_plan capabilities on the harness descriptor, and a shared
approval question helper.

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

* Access mode picker in the composer, carried into every run

The chip beside the model chip names the chat's access mode and opens a
menu of the modes its agent honors, plus the plan-mode switch where the
agent has one. The pick is per chat (remembered for new chats) and rides
every run request: composer, queued drains, mobile/client sends and the
MCP create_chat(s) tools, which take access and plan and list each
harness's accessModes/supportsPlan.

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

* Codex honors access modes and plan mode

Codex runs ran in yolo mode: approvalPolicy "never" and a forced
danger-full-access sandbox, with the approval-as-question plumbing
dead. The run's access mode now picks both, on every turn/start, so a
change applies from the next turn without a new app-server:

- Full access: "never" + danger-full-access, the wire as before.
- Auto-accept edits: "on-request" + workspace-write (network on); file
  change approvals are accepted outright, commands and permission
  grants are asked.
- Supervised: "untrusted" + read-only; every approval is asked.

A refusal declines. Modes that ask route approvals to the person
(approvalsReviewer "user") so a configured AI reviewer cannot answer
for them. Title runs stay "never" + read-only. Approval questions use
the shared wording from crate::approval.

Plan mode is Codex's `plan` collaboration mode on turn/start, with the
turn's model and effort repeated in its settings. The mode sticks to
the thread, across a resume too (checked against codex-cli 0.164.0),
so once a thread has planned, or resumes in plan, every turn names its
mode and leaving plan is an explicit `default`. The proposed plan
arrives as a `plan` item and is rendered as reply text.

Also fixes in-place reconfiguration sending the engine's own sandbox
level instead of the one the adapter chose.

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

* Claude honors access modes and plan mode

Each access mode maps onto the CLI's own permission mode, and
can_use_tool asks the person for whatever the mode does not cover:
- Full access launches exactly as before (bypassPermissions with the
  skip flag under auto_approve, else default) and allows every call.
- Auto-accept edits runs in acceptEdits; Edit, Write, MultiEdit and
  NotebookEdit go through, anything else is asked.
- Supervised runs in default and asks before every call: the command
  for Bash, the file for edits, the tool otherwise.
- Plan mode launches in plan. ExitPlanMode is asked unless the run has
  full access, and an approved plan continues in the run's access mode
  (setMode on the allow); the next turn of a chat still in plan mode is
  put back in it. Full access in plan mode launches with
  --allow-dangerously-skip-permissions, since the skip flag itself
  overrides --permission-mode plan.

Changing the access mode or plan mode switches the live process with
set_permission_mode instead of replacing it; only a change of
auto_approve (whether bypass is reachable) relaunches. Title runs keep
their own launch. Verified live against CLI 2.1.311.

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

* ACP: access modes for Antigravity, permissions decided per tool kind

Antigravity's ACP server has a default / auto_edit / yolo session mode.
Full access keeps today's behavior (yolo, every permission allowed with
the agent's preferred option); supervised and auto-accept edits keep the
session in `default`, which asks, and decide each
session/request_permission by its tool call's kind: read, search and
think pass, edit/delete/move pass under auto-accept edits, everything
else is asked of the person (yes allows once, no or an unanswered
question rejects once). A permission arriving where no one can be asked
(setup, a control call) is refused unless the mode covers it. A run that
asks and cannot move the agent off a no-prompts mode errors before its
prompt, and a change of access mode gets a fresh agent instead of an
in-place reconfigure.

Grok (classifier-driven Auto mode), Devin (only its `bypass` value is
known) and Hermes (no session mode) stay full access only; no ACP agent
advertises a plan session mode, so plan stays unsupported.

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

* OpenCode honors access modes and plan mode

Full access approves every permission request once, as before.
Auto-accept edits and supervised add `ask` rules to the server's inline
config (bash, webfetch and websearch; edit too in supervised), since
opencode's defaults allow every tool, and put each request their mode
does not cover to the person: yes replies `once`, anything else
`reject`. Supervised gives the plan agent its edit denial back, which the
general `edit: ask` would otherwise relax. An access change starts a new
server; a version that cannot be told refuses a restricted mode rather
than running it unasked.

Plan mode is opencode's read-only `plan` agent: 1.x names it on each
prompt and command, 2.x sets it on the session and hands back to the
chosen (or default) agent when plan mode ends.

Verified live against opencode 1.19.4: the injected rules raise bash and
edit requests, a reject fails the tool call, and a prompt naming `plan`
runs the plan agent while the next one without runs `build`.

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

* Registry lists each harness's access modes before it resolves

The composer reads modes from the catalog, which lists lazy harnesses
from static descriptors; each now mirrors its harness, and a test holds
every lazy descriptor to its resolved harness. The access menu opens
below the chip on the new-chat canvas like its neighbours, and the
full-access glyph's shackle reads as open at chip size.

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

* Access mode screenshots

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

* Access modes fail closed where review found gaps

- A chat's access mode caps the chats it creates over MCP: omitted, the
  child inherits it; asked for more, create_chat refuses.
- Codex auto-accept edits is "untrusted" + workspace-write: under
  "on-request" a sandboxed rm -rf or git push ran unasked.
- OpenCode 1.x asks every tool in a restricted mode ("*": "ask",
  verified on 1.19.4) and lets through only looking around, todos,
  questions, skills and subagents; MCP and custom tools were unasked.
- A person's yes allows once: ACP never picks allow_always, Muse never a
  session-wide choice, for an approval it asked about.
- Claude relaunches for a stricter CLI permission mode instead of
  switching in place, since the prompt follows the switch on stdin.
- The access chip shows for single-mode agents too, saying they cannot
  ask, so a chat never runs with more access than it shows.

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

* Access chip and menu without mode icons

The chip shows the mode's name alone and the menu rows drop their
glyphs; the checkmark still marks the current mode. Screenshots retaken.

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>
History 2026-10-27 16:36:05 -07:00
..
access-menu.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
new-chat-auto-accept-edits.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
new-chat-full-access.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
new-chat-menu.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
plan-reply.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
plan-toggle.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
README.md Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
supervised-approval.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00
supervised-approved.png Access modes and plan mode for every agent; Muse answers every approval stage (#1088) 2026-10-27 16:36:05 -07:00

Access mode screenshots

Real Linux desktop application captures taken on 2026-10-27 from this branch, built with cargo build -p zeron. The application ran in Xvfb (Mesa lavapipe software Vulkan) at a 1280 × 800 window size against a separate local engine with temporary data directories, one empty demo project, the mock harness (which honors every mode and plan mode, and asks before its scripted command unless it has full access) and a device renamed to “Demo workstation.” Input was driven with xdotool; images were captured from the X display with ImageMagick import. They are unedited screenshots, not mockups, and are not bundled into the application.

  • supervised-approval.png: a supervised chat's agent asks before running cargo test --workspace; the question replaces the composer until it is answered.
  • supervised-approved.png: after Yes, the command runs. The composer's access chip reads Supervised beside the model chip.
  • access-menu.png: the chip's menu: each mode with what it allows, then the plan-mode switch.
  • plan-toggle.png: plan mode switched on; the chip adds Plan in the accent.
  • plan-reply.png: the next message runs in plan mode and comes back as a plan with nothing changed. The chat's mode survived an application restart before this capture.
  • new-chat-menu.png: the new-chat canvas remembers the last mode picked for a new chat (here Auto-accept edits); the menu opens below like its neighbours.
  • new-chat-auto-accept-edits.png, new-chat-full-access.png: the chip per mode. Full access, the default and every chat's mode before this change, reads in the muted tone.