Repository navigation
2.0.1
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 pinned2.3.0. - Breaking: schedules become automations, as opencode 2.3.1 replaced them.
ExperimentalClient'sCreateScheduleAsync,GetScheduleAsync,ListSchedulesAsync,PauseScheduleAsync,ResumeScheduleAsyncandDeleteScheduleAsyncbecomeCreateAutomationAsync,GetAutomationAsync,ListAutomationsAsync,PauseAutomationAsync,ResumeAutomationAsyncandDeleteAutomationAsync, and theSchedule*types,ExperimentalSchedule*requests and responses, andScheduleNotFoundErrorare removed forAutomation*,ExperimentalAutomation*andAutomationNotFoundError. An automation has a requiredName, aTrigger(AutomationTriggerAt,AutomationTriggerEvery,AutomationTriggerCron, orAutomationTriggerEventfor a connected MCP server's push event), and anActionthat sends a prompt or runs a Code Mode program; it has noIf,UntilorEnds. 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 withexperimental.automations;ConfigInfoExperimental.Schedulesstays 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 noIforUntilcondition and noEnds.Timeslimit, as automations with the same ID suffix and anaut_prefix, and deletes the rest, finished ones included. - Breaking:
ConfigInfoExperimental.BackgroundCompactionis removed, because opencode 2.3.1 replaced thebackground_compactionflag withcompaction.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'sCompaction. - Breaking:
ConfigInfoExperimental.ShellTimeoutBackgroundis 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 asGenerateVideoRunning,GenerateVideoCompletedwith the video's blob, orGenerateVideoErrorwith aGenerateVideoErrorReason, and answersVideoNotFoundErrorfor an unknown ID. The server keeps jobs in memory and enables them withexperimental.video_generate.ModelType.Videonames a video model.ExperimentalClient.GetBlobAsync(experimental.blob.get) streams a stored blob, such as a generated video, and answersBlobNotFoundErrorfor an unknown ID; opencode deletes blobs 7 days after writing them.JobKind.CodemodeandJobCodeModelist a Code Mode program as a background job, andExperimentalJobListRequest's kind filter accepts it.ConfigInfoExperimental.Automations,VideoGenerateandFullCodemodeexpose the new feature flags;FullCodemodeis 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.