Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ using var client = new OpenCodeClient(new OpenCodeClientOptions

## 📋 Environment Information

**OpenCode.Sdk Version:**
**OpenCodeAI.Sdk Version:**

- Version: (e.g., `0.1.0-nightly.20260831.abc1234`)
- Version: (e.g., `0.8.0-nightly.20260831.abc1234`)
- Package source: (NuGet.org / GitHub Packages nightly / built from source at commit …)
- Also using `OpenCode.Sdk.Extensions`? (yes / no)
- Also using `OpenCodeAI.Sdk.Extensions`? (yes / no)

**opencode Server:**

Expand Down
6 changes: 3 additions & 3 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported Versions

This project is pre-1.0 and has not published a stable release yet. Until `0.1.0` ships, the
This project is pre-1.0 and has not published a stable release yet. Until the first release ships, the
supported version is whatever is current on `master` (and the nightly packages built from it).
Security patches are prioritized by CVSS v3.0 rating:

Expand Down Expand Up @@ -41,8 +41,8 @@ suspected vulnerability as a public issue.

## Scope

This policy covers the SDK packages in this repository — `OpenCode.Sdk` and
`OpenCode.Sdk.Extensions` — and the repository's own tooling and workflows.
This policy covers the SDK packages in this repository — `OpenCodeAI.Sdk` and
`OpenCodeAI.Sdk.Extensions` — and the repository's own tooling and workflows.

Two things are explicitly **out of scope**:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# target: nuget publishes to NuGet.org via Trusted Publishing (OIDC through NuGet/login@v1, no
# API key — mirrors localstack-dotnet-client's publish-nuget.yml, PR #54). This requires a Trusted
# Publishing policy configured on the NuGet.org account that will own this package (package IDs
# OpenCode.Sdk and OpenCode.Sdk.Extensions, repository Blind-Striker/opencode-sdk-dotnet, workflow
# OpenCodeAI.Sdk and OpenCodeAI.Sdk.Extensions, repository Blind-Striker/opencode-sdk-dotnet, workflow
# file publish-nuget.yml, no environment) — the maintainer must create that policy on nuget.org
# BEFORE the first nuget run; until then only target: github succeeds. The NuGet.org profile (or
# organization) name the policy is created under must also be set as the repository variable
Expand All @@ -24,7 +24,7 @@ on:
workflow_dispatch:
inputs:
version:
description: "Exact version to stamp on the packages (e.g. 0.1.0-preview.1 or 0.1.0)"
description: "Exact version to stamp on the packages (e.g. 0.8.0-preview.1 or 0.8.0)"
required: true
target:
type: choice
Expand Down
42 changes: 27 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,52 @@ Each released version links straight to its GitHub Release tag.

## [Unreleased]

> **The first release.** `0.1.0` has not shipped to NuGet.org yet — nightly builds of everything
> below are on [GitHub Packages](README.md#nightly-builds-github-packages) today, versioned
> `0.1.0-nightly.{yyyyMMdd}.{shortSha}` from every code push to `master`.
> **The first release.** Everything below is the surface of the first published package,
> `0.8.0-preview.1`. There is no migration to perform: no earlier version was ever published, and
> the pin moved several times on the way here. Nightly builds of `master` are on
> [GitHub Packages](README.md#nightly-builds-github-packages) as
> `0.8.0-nightly.{yyyyMMdd}.{shortSha}`.

### ✨ New features

- **Refreshed to upstream `89f1943`.** Worktree operations now resolve their project through an
optional location query. Call create, list, remove, and refresh directly on `WorktreesClient`;
the project-bound `ProjectWorktreesClient` and its factory are gone, which nightly consumers will
meet as a compile break. Create's strategy and destination directory are both optional now, as
the project-bound `ProjectWorktreesClient` and its factory are gone. Create's strategy and
destination directory are both optional now, as
upstream declares them; remove retains its required JSON body.
The list operation also exposes its declared `WorktreeError` failure arm. Compaction completion
payloads now expose the optional model and provider state supplied by the upstream schema.
Project updates accept an optional canonical directory; execution interruption events include
the upstream inactivity reason.
- **`OpenCode.Sdk` — the typed client.** **135 of the 140 operations** in the pinned OpenAPI
- **`OpenCodeAI.Sdk` — the typed client.** **135 of the 140 operations** in the pinned OpenAPI
snapshot are callable across **28 client families**: sessions, PTYs, persistent PTYs, shells,
events, MCP servers, integrations, projects, worktrees, workspaces, providers, language models,
agents, skills, commands, forms, permissions, credentials, plugins, RPC, references, VCS,
websearch, file system, generation, server, debug, and experimental. Every operation carries a
generated request type and a generated response envelope; bound handles (`SessionClient`,
`PtyClient`, `PersistentPtyClient`) partially apply a resource id over the shared pipeline.
- **Refreshed to upstream `f9bc223`.** The compaction surface grew: `IProviderCompaction` is a
`mode`-tagged union (`ProviderCompactionLocal`, `ProviderCompactionProvider`, and the usual
`UnknownProviderCompaction` carrier) and hangs off `ModelInfo.Compaction` and
`ProviderInfo.Compaction`. A completed compaction and the `session.compaction.ended` event both
carry an optional `SessionProviderContext`, with its `SessionProviderContextProvenance` record.
Every one of those properties is optional, so nothing that compiled before stops compiling.
- **Refreshed to upstream `48f2466`.** The pinned snapshot moved, and the surface moved with it.
The live event stream gained its first prefix-tagged arm: every `rpc.*` event dispatches to
`EventRpc`, tried after the declared literal tags and before the unknown carrier, and
`UnknownEvent` refuses an `rpc.*` tag rather than absorbing it. Four operations arrived —
`v2.plugin.awaitActivation`, `v2.plugin.check`, and `v2.plugin.update` as
`PluginsClient.AwaitPluginActivationAsync`, `CheckPluginUpdatesAsync`, and `UpdatePluginsAsync`,
and `v2.rpc.call` as `CallAsync` on the new `RpcClient` family. Upstream also removed and
reshaped the plugin types, which nightly consumers will meet as compile breaks: the
reshaped the plugin types: the
`plugin.added` event arm is gone, and `PluginAdded` and `PluginAddedData` with it; `IPluginInfo`
and its `PluginInfoActive`, `PluginInfoFailed`, and `UnknownPluginInfo` variants are replaced by
the `PluginInfo` record, whose `State` is the new `IPluginState` union (`PluginStateActive`,
`PluginStateFailed`, `UnknownPluginState`) — match on the state where you matched on the info
variant; `PluginSourcePackage.Package` is now `Target`, joined by `Version`, `Outdated`, and
`Updating`; and `PluginListResponse.Plugins` is an `IReadOnlyList<PluginInfo>`.
- **A standalone server launcher.** `OpenCodeServer.StartAsync()` starts, monitors, and stops a
private `opencode serve` child — generated lease credential, stdin-EOF ownership, bounded tree
private `opencode2 serve` child — generated lease credential, stdin-EOF ownership, bounded tree
termination — and `CreateClient()` hands back a client already bound to it. An optional
`OpenCodeServerOutput` collector, supplied through `OpenCodeServerOptions.Output`, retains a
bounded tail of the child's stdout and stderr for pull snapshots that report truncation, and it
Expand All @@ -57,7 +65,16 @@ Each released version links straight to its GitHub Release tag.
hand-written WebSocket doors over a shared, family-neutral socket core: read frames, write input,
dispose to close. The persistent family adds attach/handoff/snapshot semantics, byte-typed
output and checkpoints, and the framed input protocol with viewport tracking.
- **Dependency injection through `OpenCode.Sdk.Extensions`.** `AddOpenCode(Action<…>)` or
- **Terminal connection lifetime a caller can drive.** A connection-owned receiver assembles
frames into an internal queue independently of the caller's enumeration, so canceling a read ends
only that wait: the same healthy connection can be read again, or written to, afterwards. Both
connect options gained an init-only `SendTimeout` (default 30 seconds) bounding each input or
resize send end to end, including the wait for the send gate. Connection termination delivers the
frames it already holds before reporting its outcome, while disposal abandons unread frames and
joins the connection's own work. A persistent PTY keeps its locally requested viewport coherent
with the input it labels, rather than letting an inbound resize report overwrite it. See
[the terminals guide](docs/guide/terminals.md#-cancellation-deadlines-and-disposal).
- **Dependency injection through `OpenCodeAI.Sdk.Extensions`.** `AddOpenCode(Action<…>)` or
`AddOpenCode(IConfiguration)` registers one singleton client owning its transport for the
container's lifetime, plus every sub-client resolved from that same instance — inject
`SessionsClient` or `EventsClient` directly.
Expand All @@ -75,11 +92,6 @@ Each released version links straight to its GitHub Release tag.

### 🛠️ General

- **Breaking (nightly API):** `RpcClient.PostCallAsync` is now `CallAsync`;
`PluginsClient.PostAwaitActivationAsync`, `PostCheckAsync`, and `PostUpdateAsync` are now
`AwaitPluginActivationAsync`, `CheckPluginUpdatesAsync`, and `UpdatePluginsAsync`. Their
`OpenCodeRoutes` members use the corresponding names without `Async`; request/response types and
wire behavior are unchanged.
- **Target frameworks:** `netstandard2.0`, `net472`, `net8.0`, `net9.0`, `net10.0` — for both
packages. The suite runs on `net472` on Windows, real-process launcher tests included, and on
`net8.0`/`net9.0`/`net10.0` on all three OSes. `netstandard2.0` is a consumption target rather
Expand All @@ -90,7 +102,7 @@ Each released version links straight to its GitHub Release tag.
[`spec/SNAPSHOT.md`](spec/SNAPSHOT.md).
- **Generated output is committed and reviewed as source**, locked by a public-API baseline and
verified by regeneration, so a protocol refresh arrives as a readable diff.
- **Test suite:** 5,010 tests green on Windows — the fullest leg, and the only one that adds the
- **Test suite:** 5,138 tests green on Windows — the fullest leg, and the only one that adds the
`net472` assemblies. Linux and macOS run the same suite on the three modern targets.

### 📋 Important Notes
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Nullable>enable</Nullable>
<!-- The single source of the package version. Prereleases add their suffix at pack time
(the pack command's version-suffix option); nothing else declares Version or PackageVersion. -->
<VersionPrefix>0.1.0</VersionPrefix>
<VersionPrefix>0.8.0</VersionPrefix>
<Authors>Deniz İrgin</Authors>
<Company>Deniz İrgin</Company>
<Owners>Deniz İrgin</Owners>
Expand Down Expand Up @@ -51,6 +51,7 @@

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)LICENSE" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.md" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)README.md" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)assets/icon.png" Visible="False" Pack="true" PackagePath=""/>
</ItemGroup>
Expand Down
Loading