Skip to content

refresh: pin opencode v2.4.1 - #988

Merged
Blind-Striker merged 2 commits into
masterfrom
refresh/v2.4.1
Nov 24, 2026
Merged

Blind-Striker merged 2 commits into
masterfrom
refresh/v2.4.1

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What

The protocol pin moves from opencode v2.3.2 to v2.4.1 (6f0514052a3c859894ad01bb14cc14dda1e44b96). Under the versioning rule, an upstream minor is an SDK minor, so this ships as 2.1.0. VersionPrefix is unchanged here; it moves at the release cut.

The refresh follows spec/SNAPSHOT.md:

  1. refresh-spec --ref v2.4.1 prepares the snapshot from upstream's own generator, over the two Restore patches.
    • Patch 003 is rebased for context only. Upstream added a comment line inside the user message schema, but the projection it repairs is unchanged. Its +/- lines are identical, and the manifest records the new hash.
    • Patch 002 applies as it was. Neither patch is retired here.
  2. refresh-spec --apply installs it. That moves the submodule, renders SNAPSHOT.md, writes the receipt, and re-pins the watched sources.
  3. generate then regenerates the SDK.

Protocol delta

  • 178 operations (+5, −0).
    • Added: experimental.job.cancel, experimental.machine.{list,add,remove} and experimental.machine.link.
    • Changed:
      • experimental.generate.video.{create,get} no longer declare 403;
      • event.subscribe gains experimental.job.updated;
      • the automation, blob and session.create changes are description-only.
  • Schemas: 531 (+10, −0, 13 changed).
    • Added: Automation.Action.Shell, Automation.ShellActionInput, Job.Video, Machine.{AddPayload,Info,Invite,Reach}, MachineNotFoundErrorEncoded, Model.Speed, experimental.job.updated.
    • Changed: Config.InfoEncoded, Blob.Info (no expiresAt), Blob.ID (pattern), VoiceModel (required engine and name), Model.Info (experimental.speed), Job.Info and Job.Kind (video), V2Event, Mcp.Protocol (the default negotiation is now auto), and the automation action and trigger schemas.

Curation

  • Operation names follow the existing patterns:
    • CancelJobAsync and AddMachineAsync take reviewed rows, because neither cancel nor add is a grammar verb;
    • ListMachinesAsync and RemoveMachineAsync come from the grammar.
  • The Machine model family is owned by the experimental client.
  • experimental.machine.link is transport-owned. It is a WebSocket upgrade: its document response is a placeholder, and its binary stream needs a hand-written door outside the HTTP pipeline. It is fingerprinted like the other three WebSocket operations. The SDK does not offer a door for it yet; one is planned.
  • video_generate's object form is named ConfigVideoGenerateOptions, after its image_generate twin. Its model reuses the agent model selection type through an alias. The generated union is ConfigInfoExperimentalVideoGenerate, the same shape the image union has.
  • The recommended_api and opencode_api flags are cleared as secret-looking names: both are boolean feature flags (packages/schema/src/config/flag.ts).
  • MachineInvite.Join prints masked. The join string base64url-encodes the join secret (packages/core/src/machine/join.ts).
  • MachineReach.Url joins the existing CA1056 rule in .editorconfig for wire strings that the schema does not mark as format: uri.
  • Description sources: two rows follow lines that upstream shifted (session-message.ts, config/experimental.ts). Two inventory entries (SessionMessageAssistant and its Content) leave the upstream-doc inventory, because upstream added an implementation note above them; their curated descriptions stay.

Breaking changes that follow the pin

They are listed in the CHANGELOG under Protocol changes, each marked Breaking. They are recorded as baseline suppressions against 2.0.1: 36 entries, all CP0002 and IsBaselineSuppression, 9 per target and no cross-asset entry.

Member Reason
BlobInfo.get_ExpiresAt, set_ExpiresAt(Double) opencode 2.4.0 no longer reports a blob's expiry
ConfigInfoExperimental.get_Automations, set_Automations(Nullable<Boolean>) Automations are unflagged; ConfigInfo.Automations switches them off
ConfigInfoExperimental.get_McpEvents, set_McpEvents(Nullable<Boolean>) MCP events are unflagged
ConfigInfoExperimental.get_Schedules, set_Schedules(Nullable<Boolean>) The deprecated alias went with the flag
ConfigInfoExperimental.get_VideoGenerate Retyped from bool? to the boolean-or-options union

VoiceModel's new required Engine and Name are source-breaking for code that constructs the record. This is not a binary break, so it has no suppression.

Hand-written code and tests that follow the pin

  • Pinned version: PinnedRelease.Version becomes 2.4.1. The version-mismatch, resolver and resolve-live tests follow it, including the resolver's near-miss literals.
  • Binder tests:
    • the expected error tags add MachineNotFoundError;
    • the transport-owned test now expects four WebSocket operations, with experimental.machine.link added.
  • Union metadata oracle: maps experimental.job.updated to ExperimentalJobUpdated.
  • The server no longer waits for plugins. Since 2.4.0, the model, provider, default-model, web search, generation and voice handlers answer at once with whatever the location has loaded, and no longer answer 503 while plugins load. In response:
    • QuickStart and the live-readiness helper stop treating a 503 as "still starting";
    • WaitForDefaultAsync and WaitForPluginsAsync keep their poll, as opencode's CLI does.
  • The reviewed public API baseline is re-accepted. Reviewed by declaration:
    • removed: exactly the suppressed members above;
    • added: the job cancel, machine, video job, automation shell, model speed and new flag types, VideoGenerate's union, and the four client methods.

Documentation

  • README:
    • API Coverage now says the SDK covers the whole HTTP API and three of the four WebSocket connections, and that a door for the experimental machine link is planned;
    • the streaming example drops its 503 catch;
    • the npm pin moves to 2.4.1.
  • The getting-started guide says the server no longer waits for plugins, that a catalog can be empty or partial right after startup, and which *.updated events a long-lived application can refresh on.
  • The experimental guide's OPENCODE001 list names machines.
  • The testing style's RPC live-test note names v2.4.1: the RPC handler still has no activation barrier at the new pin.
  • The roadmap names the new pin and lists the machine link's door as queued.
  • Consumer pins move to 2.4.1:
    • the errors, requests and streaming guides (the streaming guide's three pin-dated statements were re-verified at the new pin);
    • the HQ playground README;
    • the bug-report template.

Watched upstream sources

At this pin, 26 watched files changed and every anchor but one still holds. Each SDK-owned diff was read against its behaviour text.

Re-described:

File Change at this pin Row
server/src/location.ts The bounded plugin wait is gone Says no plugin wait remains
server/src/handlers/model.ts List and default read the model service directly New anchor; says the list can be empty or partial right after startup, and WaitForDefaultAsync keeps its own poll
server/src/handlers/generate.ts Activation waits and the video flag check removed Says no flag gates video and no handler waits
client/src/shared-events.ts An aborted subscription ends at its next read, before queued events Adds that qualifier; the SDK already checks cancellation first

Moved, rows hold, no SDK reach:

  • root and CLI package.json (versions; effect still 4.1.0);
  • cli/src/index.ts, cli/test/service.test.ts;
  • client/src/promise/generated/client.ts, client/src/solid/data.ts (jobs and send sequencing; the cost and child-paging code is untouched), client/test/shared-events.test.ts;
  • core/package.json, core/src/mcp/index.ts, core/src/session/session.ts, core/src/tool/runtime.ts;
  • httpapi-codegen/src/index.ts;
  • protocol/src/errors.ts (adds MachineNotFoundError), protocol/src/groups/session.ts;
  • server/src/handlers/persistent-pty.ts, server/src/middleware/authorization.ts, server/src/process.ts, server/src/routes.ts;
  • tui/src/component/terminal-pane.tsx.

The three paths owned by another consumer moved too, and were not analysed here.

Verification

On this head, with the submodule at the new pin:

  • the full local gate passed:
    • the build, with 0 warnings;
    • whitespace, style, Slopwatch, clones;
    • generate --verify and refresh-spec --verify;
    • both packs, validated against 2.0.1;
    • 13,036 tests with 0 failed (OpenCode.Sdk.Tests on net10.0 and net11.0 4,977 each, Tools 2,875, Extensions 42, HQ 165);
    • the service elections 22 of 22 and Native AOT 3 of 3;
    • the net472 build and a clean tree.
  • No Windows terminal rerun is needed. The pinned server still installs the published @opencode/pty 0.6.0, and the lockfile resolves it to the same integrity hash at both tags. Upstream's in-repo daemon source did change (Windows pipe handling) without a release, so the next @opencode/pty version will need that rerun.
  • After this merges, the distributed-build consumer leg runs on the new commit (docs/engineering/quality-gates.md).

The accepted snapshot moves from the v2.3.2 tag to v2.4.1 through
refresh-spec: 178 operations, five of them new, and 531 components.
Restore patch 003 is rebased for context, because upstream added a
comment line inside the user message schema while the projection it
repairs is unchanged; patch 002 still applies as it was.

The job cancel and machine list, add and remove operations are
generated with names following the existing patterns. The machine link
is a WebSocket upgrade, so it is transport-owned and fingerprinted like
the other WebSocket operations; its door is planned, and the README and
roadmap say so. The object form of video_generate is named after its
image_generate twin and reuses the model selection type, the two
boolean flags whose names look like secrets are cleared, and a machine
invite's join string, which carries the join secret, prints masked.
MachineReach joins the CA1056 rule for wire strings the schema does not
mark as URIs.

The removed config members, the blob expiry and the video_generate
retype are recorded as baseline suppressions against 2.0.1, since the
pin moves. The server no longer waits for plugins, so the
getting-started guide, the README example, QuickStart and the live
readiness helper stop describing a startup 503; the source-watch rows
for location, model, generate and the shared event feed follow the new
behaviour. The pinned version, its test literals and the consumer pins
move to 2.4.1.
The RPC handler still has no activation barrier at v2.4.1, so the note
that a one-shot external-mode call proves rpc.unavailable holds at the
new pin.
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 24, 2026
Merged via the queue into master with commit a46562c Nov 24, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the refresh/v2.4.1 branch November 24, 2026 14:18
@Blind-Striker Blind-Striker mentioned this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant