Skip to content

2.1.1

Latest

Choose a tag to compare

@Blind-Striker Blind-Striker released this 03 Dec 09:14
6b14004

2.1.1 pins opencode 2.4.3. It is a patch release that moves the protocol pin from 2.4.1,
so generated types change the way upstream changed them: a machine reports one Status (unpaired,
offline, online with its OS, architecture and connection, or incompatible) in place of its separate
online, paired, OS, architecture and connection fields, and the server.connected event's data
names the live event stream. Both are listed as breaking under protocol changes. Experimental
push notifications, spaces, feature flags and skill files are added, and a background-service
service.json that cannot be read or decoded is refused instead of read as empty settings.

🔌 Protocol changes

  • The SDK pins opencode 2.4.3, where it pinned 2.4.1.
  • Breaking: MachineInfo.Online, Paired, Os, Arch and Connection move into a required
    Status, an IMachineStatus that is MachineStatusUnpaired, MachineStatusOffline,
    MachineStatusOnline (which carries the Os, the Arch and the Connection, an
    IMachineTransport) or MachineStatusIncompatible (with its IMachineRefusal reason), because
    opencode 2.4.3 reports one status per machine. MachineInfoConnection,
    MachineInfoConnectionKind and MachineInfoConnectionPath are removed. Before:
    if (machine.Online) Console.WriteLine(machine.Os);. After:
    if (machine.Status is MachineStatusOnline online) Console.WriteLine(online.Os);.
  • Breaking: EventServerConnected.Data changes from IReadOnlyDictionary<string, JsonElement>
    to EventServerConnectedData, whose Stream names the live event stream, which
    ExperimentalClient.SubscribeSpacesAsync addresses. Before: connected.Data["…"]. After:
    connected.Data.Stream.
  • ExperimentalClient manages push notifications to phones: GetPushSettingsAsync,
    RegisterPushDeviceAsync, UpdatePushDeviceAsync, RemovePushDeviceAsync,
    SetPushDeviceSessionAsync, RemovePushDeviceSessionAsync, SetPushSessionAsync,
    RemovePushSessionAsync and SetPushSettingsAsync, with ExperimentalPushUpdated on the event
    stream. ExperimentalPushDeviceRegisterRequest.CallbackUrl carries the relay's delivery token, so
    the record's printed form masks it.
  • ExperimentalClient reads and writes spaces, a shared key-value store: WriteSpaceValuesAsync,
    SyncSpacesAsync, SubscribeSpacesAsync, UnsubscribeSpacesAsync and
    ResetSpaceRevisionsAsync, with ExperimentalSpaceUpdated, ExperimentalSpaceDeleted and
    ExperimentalSpaceResync on the event stream.
  • ExperimentalClient.GetFeatureFlagsAsync returns the feature flags a location's clients may act
    on.
  • ExperimentalClient.GetSkillFileAsync reads one file of a skill.
  • AgentInfo.Instructions (AgentInfoInstructions) holds an agent's added instructions: text, or
    an AgentSelectionInstructions with the text sent while the agent is selected and the text sent
    once when the session switches away.
  • SessionClient.PromptAsync and ExperimentalClient.ActivateSessionSkillAsync can answer 502
    SkillLoadError, and FileSystemClient.ReadFileAsync, ListEntriesAsync and FindEntriesAsync,
    ExperimentalClient.WriteFileAsync, CreatePtyAsync and RunShellCommandAsync can answer 503
    ServiceUnavailableError where the location cannot serve them.
  • ConfigInfoExperimental exposes the CompactionJobs, McpSkills, CodemodeAgents and
    BrowserStreamTunnel flags, ModelCompatibility.SupportsSystemUpdates is new, and ModelType
    gains Embedding, Realtime and Transcription.
  • The experimental browser tunnel (experimental.browser.tunnel) is a WebSocket the SDK offers no
    door for; its single-use ticket comes from the browser plugin's tunnel.ticket RPC for a browser
    attached to a session.
  • Since opencode 2.4.2, sending a message, command, skill or shell command to an archived session
    unarchives it.

🐛 Fixes

  • A background-service config (service.json) that cannot be read or decoded is refused, as opencode's
    own CLI refuses it since 2.4.3. OpenCodeServiceConfiguration, OpenCodeServer.ResolveAsync and
    OpenCodeServer.EnsureAsync throw OpenCodeServerException naming the file, where the SDK used to read
    it as empty settings, so a configuration change can no longer replace such a file with empty settings.
    Only a missing file reads as empty. Discovery and stop no longer migrate the legacy config file; reading
    the config still does.

📚 Documentation

  • SessionInfo.Model says when opencode records a session's model: at creation, through
    SessionCreateRequest.Model or from a subagent's agent or parent, on a fork or import, and
    through SwitchModelAsync. A session created through the API without a model has none even when
    its agent configures one, and each assistant message records the model it ran on.
  • The README's API coverage counts five WebSocket connections: three with doors, the planned machine
    link, and the browser tunnel, which has none.
  • Query parameters keep opencode's descriptions: since opencode 2.4.3 they sit on the parameters
    themselves, which the generator now reads first.
  • HQ reads a session's agents, models and providers again when the server announces a change to them
    without a location, as opencode's app does from 2.4.3: a plugin that registers late announces its
    catalog that way. The getting-started guide says to refresh every loaded location on such an
    event.
  • The pagination guide says that sending a prompt, a command, a skill or a shell command to an
    archived session unarchives it, as opencode does from 2.4.2.
  • Sessions.GetTotalCostAsync's documentation names opencode's app and TUI as the clients whose
    total it matches. From opencode 2.4.3, opencode's ACP server also adds a child session's
    descendants.
  • The requests guide says that, from opencode 2.4.2, a shell tool call inside an automation's code
    action fails when its timeout runs out, while a fixed shell action runs without a timeout.