Skip to content

0.8.0-preview.1

Pre-release
Pre-release

Choose a tag to compare

@Blind-Striker Blind-Striker released this 08 Sep 22:11
· 1746 commits to master since this release

The first published release of the opencode v2 .NET SDK.

dotnet add package OpenCodeAI.Sdk --prerelease
dotnet add package OpenCodeAI.Sdk.Extensions --prerelease   # dependency injection, optional

The package id is not the namespace. You install OpenCodeAI.Sdk and you write using OpenCode.Sdk; — nuget.org reserves the OpenCode. id prefix for an unrelated owner, so the artifact carries a different name than the code inside it.

What is in it

  • 135 of the 140 operations in the pinned OpenAPI snapshot, across 28 client families. Three are declined by recorded decision and two are transport-owned WebSocket upgrades served by hand-written doors — none is missing by omission.
  • Server-sent event streams, the global bus and the per-session log, as IAsyncEnumerable<T>.
  • PTY and persistent-PTY terminal sessions over WebSockets, with consumer cancellation independent of connection lifetime and a configurable per-send deadline.
  • A standalone server launcher: OpenCodeServer.StartAsync() starts, monitors and stops a private opencode2 serve child and hands back a client bound to it.
  • Dependency injection through OpenCodeAI.Sdk.Extensions.
  • A typed error model with NoThrow, cursor pagination, and source-generated System.Text.Json with no reflection fallback.

Targets netstandard2.0, net472, net8.0, net9.0, net10.0.

Scope

This SDK speaks the v2 protocol surface only — the line that installs as the opencode2 command. The 1.x surface is not a target.

Built against the accepted snapshot of upstream v2 at f9bc223. The exact commit and the receipt-governed refresh procedure live in spec/SNAPSHOT.md.

Pre-1.0. The public surface is locked by a reviewed baseline, but it may still move before 1.0.0.

Unofficial. Not affiliated with or endorsed by the opencode team.

Full notes: CHANGELOG.md