GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(cli-rs): port selection colours and ACP fixes, and regenerate bindings by simonklee · Pull Request #66652 · anomalyco/opencode

Conversation

@simonklee

@simonklee simonklee commented Nov 26, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

What it does

Brings the Rust client level with dev after #66470.

  • Text selections use the theme's colours (fix(tui): draw text selections in theme colours #65776). The theme gains text.selection and background.selection,
    defaulting to the focused primary action colours as in TS. The TUI passes them to OpenTUI's selection colours. New
    resolver and TUI tests, and the U.1 token fixture is regenerated.

  • ACP fixes (fix(acp): fix a batch of ACP issues #66631). All 12 fixes are ported to crates/acp:

    • provider display names in model options, and skills offered as slash commands;
    • session.renamed sent as session_info_update, and child sessions marked in session/list;
    • worktree project matching and the directory error data in getSession, and MCP restored after a location shutdown;
    • selection echo tracking with rollback on error, command error classification, and status/retryAfterMs on
      service failures;
    • subagent cost counted recursively in usage_update;
    • inferred MIME types for blobs, file: path normalisation and percent-decoded file names;
    • credential-like select fields asked without a custom option.

    The generated MIME table moves to crates/util so ACP and run share it. The ACP unit and wire tests are ported too.

  • A plugin's tree hash notices a same-size rewrite on a coarse clock. The cached hash of a plugin tree was keyed by
    each entry's size, modification time and inode. Two saves in one clock tick keep all three, so a dependency rewritten
    in place at its old size kept the old hash, and a_typescript_plugins_artifact_is_its_files failed on every
    GitHub Actions run of chore(ci): build the Rust client for every target  #66152. Now a hash is cached only when every entry is older than 2 s, as git treats racy
    entries; unchanged trees still skip reading the bytes. The test uses fixed test clocks, and the approval lock test
    waits on a handshake instead of a sleep.

  • Regenerated API and plugin bindings for the flags and browser-tunnel routes (feat(server): expose resolved feature flags at /api/experimental/flag #66469, feat(browser): stream remote browser traffic over multiplexed binary WebSocket #66217), Code Mode agents
    (feat(core): agent(), llm() and structured JSON Schema output in Code Mode #66278), experimental spaces and their batched writes (feat(server): experimental spaces #63998, feat(server): batch writes for experimental spaces #66668), the new model types (feat(core): read voice, embedding and transcription models from config #66627) and the automation changes (feat(app): show where automations run and which session they wake #66393). The F.7
    fold fixture is regenerated too.

Model speeds without the flag (#65877) and Code Mode's agent()/llm() output need no Rust change. Without the
regeneration and the hash fix, #66152's Rust check stays red.

Checks

cargo fmt --check, clippy -D warnings, check:drift, compat.test.ts, the ACP suite, and the API, store, plugin and
TUI suites with the TypeScript interop tests (OPENCODE_RS_REQUIRE_TS=1). The merge lane's gate and full suites run on
native-next and on this branch against dev.


Added by the opencode bot (AI-generated).

Public API: regenerated bindings replace experimental.space.set/delete with experimental.space.write, following the server (not backwards compatible for Luau plugins calling the old operations)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
simonklee added 4 commits November 26, 2026 18:40
@simonklee
chore(cli-rs): regenerate API and plugin bindings for flag and tunnel
32da7cb
@simonklee
chore(cli-rs): regenerate API, plugin bindings and fold fixture
25f8184
@simonklee
fix(cli-rs): draw text selections in theme colors
fb44db9
@simonklee
fix(cli-rs): port ACP fixes for skills, sessions, content and errors
2de74b0
opencodejr[bot]
opencodejr Bot reviewed Nov 26, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The port looks faithful and I found nothing blocking. I couldn't build or test it: the review sandbox has no Rust toolchain, and check:drift stops without rustfmt. So I checked by reading the code against the TypeScript originals:

  • ACP model/agent switch tracking and rollback, MCP restore after a location shutdown, the worktree match in getSession, recursive subagent cost, skills as slash commands, provider names, and resource-link and MIME handling all follow the TS logic in packages/cli/src/acp.
  • The selection colour defaults match packages/theme/src/tui/expand.ts.

One small difference: for blobs without a MIME type, TS infers it with Bun's own MIME lookup, while Rust uses the mime-types table, so the two can disagree on a few rare extensions.

Public API: the HTTP API and plugin API are unchanged. The ACP side only adds things, so existing clients and themes keep working:

  • session/list entries get _meta["opencode/child-session"] for child sessions
  • a rename now sends session_info_update
  • error data gains directory (session directory mismatch) and status/retryAfterMs (service failures)
  • themes accept two optional keys, text.selection and background.selection

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
simonklee added 2 commits November 26, 2026 22:01
@simonklee
fix(plugin): hash a plugin tree again while its entries are racy
e72cf17
A project plugin's tree hash was reused while every entry kept its size,
modification time and inode. On a coarse filesystem clock two saves in one
tick keep all three, so a dependency rewritten at its old size kept the old
hash, and `a_typescript_plugins_artifact_is_its_files` failed on GitHub
Actions every run.

A hash is now kept only when every entry is older than `RACY`, the window
`pipe::tree`'s stamp already treats as unable to vouch for a tree: a call
while an entry is racy reads the bytes again and keeps no shortcut. A
reconcile that changed nothing still compares metadata alone; on a 256 MB
package a cold hash took 157 ms and the warm path 38 us. `Artifact::stage`
still hashes the bytes it copies, so nothing unapproved can run.

The tree hash test sets the clock its racy window reads to fixed times, so it
covers both sides without waiting: a settled tree keeps its cached hash, and a
same-size, same-time rewrite while an entry is racy is read again. The
approval lock test likewise releases its lock on a handshake at the save's
first blocked attempt instead of sleeping 100 ms.
@simonklee
chore(cli-rs): regenerate API and plugin bindings for space writes
83e8e34
opencodejr[bot]
opencodejr Bot reviewed Nov 26, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two new commits look sound. I checked them by reading the code; the review sandbox has no Rust toolchain, so I couldn't build or run anything.

The racy check in Artifact::tree is correct. While any entry changed within the 2 s window, the cached hash is not used and no new one is stored, so a same-size rewrite in one clock tick is read again. The fixed test clocks and the lock handshake remove the old timing dependence, and the holder thread always releases the lock after the save, so the test can't hang.

Public API: the regenerated bindings replace experimental.space.set (PUT /api/experimental/space/:space/:key) and experimental.space.delete (DELETE on the same path) with experimental.space.write (POST /api/experimental/space/:space/write, which takes changes). This follows the server's experimental API (#66668) and isn't backwards compatible: Luau plugins calling the old two operations need to move to space.write.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@simonklee
simonklee merged commit 7290a57 into dev Nov 26, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@simonklee
simonklee deleted the native-backports branch November 26, 2026 22:40
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
📊 AI CLI 工具社区动态日报 2026-11-27 litang9/big_model_radar#766
Open
@simonklee simonklee mentioned this pull request Nov 27, 2026
fix(cli-rs): port provider order and the service.json refusal, and fix CI-only test races #66776
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@simonklee
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.