Skip to content

2.0.1

Choose a tag to compare

@Blind-Striker Blind-Striker released this 23 Nov 00:55
· 62 commits to master since this release
d780f28

2.0.1 pins opencode 2.3.2. It is a patch that moves the protocol pin, so generated types
change the way upstream changed them: schedules become automations, and two experimental config
flags are removed. All three are listed as breaking under protocol changes, and existing
schedules may not survive the server upgrade. Video generation and blob reads are added.

🔌 Protocol changes

  • The SDK pins opencode 2.3.2, where it pinned 2.3.0.
  • Breaking: schedules become automations, as opencode 2.3.1 replaced them. ExperimentalClient's CreateScheduleAsync, GetScheduleAsync, ListSchedulesAsync, PauseScheduleAsync, ResumeScheduleAsync and DeleteScheduleAsync become CreateAutomationAsync, GetAutomationAsync, ListAutomationsAsync, PauseAutomationAsync, ResumeAutomationAsync and DeleteAutomationAsync, and the Schedule* types, ExperimentalSchedule* requests and responses, and ScheduleNotFoundError are removed for Automation*, ExperimentalAutomation* and AutomationNotFoundError. An automation has a required Name, a Trigger (AutomationTriggerAt, AutomationTriggerEvery, AutomationTriggerCron, or AutomationTriggerEvent for a connected MCP server's push event), and an Action that sends a prompt or runs a Code Mode program; it has no If, Until or Ends. Before: new ExperimentalScheduleCreateRequest { SessionId = id, Prompt = "Check the build", When = ScheduleWhenInput.FromScheduleWhenInputEvery(new ScheduleWhenInputEvery { Every = "2 hours" }) }. After: new ExperimentalAutomationCreateRequest { SessionId = id, Name = "Check the build", Trigger = new AutomationTriggerEvery { Every = "2 hours" }, Action = new AutomationPromptActionInput { Prompt = "Check the build", To = AutomationTarget.FromAutomationTargetSession(new AutomationTargetSession { Session = id }) } }. The server enables them with experimental.automations; ConfigInfoExperimental.Schedules stays as its deprecated alias. Existing schedules may not survive the server upgrade: opencode's migration carries over only active or paused schedules that send a prompt, with no If or Until condition and no Ends.Times limit, as automations with the same ID suffix and an aut_ prefix, and deletes the rest, finished ones included.
  • Breaking: ConfigInfoExperimental.BackgroundCompaction is removed, because opencode 2.3.1 replaced the background_compaction flag with compaction.background, which defaults to on. Background summaries now start by default as a session nears automatic compaction, and a summary that is never used still costs tokens. Before: new ConfigInfoExperimental { BackgroundCompaction = false }. After: new ConfigInfoCompaction { Background = false } in the config's Compaction.
  • Breaking: ConfigInfoExperimental.ShellTimeoutBackground is removed, because opencode 2.3.1 removed the flag: a foreground shell command still running when its timeout expires always moves to the background. Code that set it removes the assignment.
  • ExperimentalClient.CreateVideoGenerationAsync (experimental.generate.video.create) submits a video job and returns its ID once the provider accepts it; GetVideoGenerationAsync (experimental.generate.video.get) reads it as GenerateVideoRunning, GenerateVideoCompleted with the video's blob, or GenerateVideoError with a GenerateVideoErrorReason, and answers VideoNotFoundError for an unknown ID. The server keeps jobs in memory and enables them with experimental.video_generate. ModelType.Video names a video model.
  • ExperimentalClient.GetBlobAsync (experimental.blob.get) streams a stored blob, such as a generated video, and answers BlobNotFoundError for an unknown ID; opencode deletes blobs 7 days after writing them.
  • JobKind.Codemode and JobCodeMode list a Code Mode program as a background job, and ExperimentalJobListRequest's kind filter accepts it.
  • ConfigInfoExperimental.Automations, VideoGenerate and FullCodemode expose the new feature flags; FullCodemode is off in every build unless set.

📚 Documentation

  • PersistentPtyRole's XML documentation says a controller attach without takeover fails while another attachment controls the terminal, and that input sent on an observer's connection makes that attachment the controller, where it said a connection that asked to control could be attached as an observer and an observer's input was ignored.
  • The getting-started guide says the calls that wait for plugins wait a bounded time, not for activation to finish, where it said the server exposes no activation barrier, which the next point contradicted.