Repository navigation
0.9.0-preview.6
Pre-release
Pre-release
The pin moves to upstream release tag v2.0.22, and all 140 operations it exposes are
callable — 138 as generated HTTP calls, and the two terminal WebSocket connections through
hand-written transports. Stored credentials can
now be listed and created, a session can be created as a linked child of another, a cancelled form
can tell the asker why, and a connection reports when it needs signing in again. The refresh
changes three shapes, so the breaking changes come first. Discovery, Ensure, and Stop now read the
CLI's service files exactly as the CLI does. net8.0 and net9.0 leave the packages in an
upcoming preview; see the important notes.
💥 Breaking changes
CancelFormAsynctakes an optionalSessionFormCancelRequestbeforerequestOptions. A call
that passedrequestOptionspositionally names it now (requestOptions: options). The method is
virtual, so overrides and mock setups move to the new signature, and an assembly compiled against
0.9.0-preview.5must be rebuilt. The route helperOpenCodeRoutes.Sessions.CancelFormgained
the same optionalrequest.ProviderSettings.ChunkTimeoutandConfigProviderSettings.ChunkTimeoutare number-or-false
unions, notdouble?. Upstream accepts a number of milliseconds orfalse(no timeout), so a
provider configured withfalsenow decodes. ReadKind, thenNumberorBoolean; a value
neither arm claims is kept asUnknown.ChunkTimeout = 30000becomes
ChunkTimeout = ProviderSettingsChunkTimeout.FromNumber(30000)(ConfigProviderSettingsChunkTimeout
on the config side), andFromBoolean(false)turns the timeout off; upstream refusestrue.ConfigModel.Capabilitiesis aConfigModelCapabilities, not the catalog's
ModelCapabilities. It is the shape upstream's config accepts, and every member is optional:
Toolsisbool?, andInputandOutputmay be null.ModelInfo.Capabilitiesis unchanged.IConnectionInfohas aStatusmember. A type outside the SDK that implements the interface,
such as a test fake, addsConnectionStatus? Status; code that only reads connections is
unaffected.
✨ Added
- The accepted snapshot moved to upstream release tag
v2.0.22
(527f0b931d1f9b3ebd34e106c51b31ce5db5b075), published as@opencode/cli@2.0.22; install it
withnpm install -g @opencode/cli@2.0.22. - Stored credentials can be listed and created.
client.Credentials.ListCredentialsAsync()
(credential.list) returns everyCredentialEntry(Id,IntegrationId,Label,Active,
Value), andCreateCredentialAsync(request)(credential.create) stores one and returns it;
anIdthat already exists answers with the declared 409. They join activate, update, and
remove.Valueis aCredentialKeyor aCredentialOAuth. Upstream returns secrets in clear
text, so the API key (CredentialKey.Key) and the OAuth tokens (CredentialOAuth.Access,
Refresh) are masked inToString(). SessionCreateRequest.ParentIdcreates a linked child session at its parent's location; a
missing parent answers with the declared 404SessionNotFoundError.- A cancelled form can tell the asker why.
CancelFormAsync(formId, new SessionFormCancelRequest { Message = "..." })sends it, andFormStateCancelled.Messagecarries it back. HeaderTimeoutonProviderSettingsandConfigProviderSettingsbounds the wait for a
provider's response headers, as the same number-of-milliseconds-or-falseunion.- A connection reports when it needs attention.
IConnectionInfo.Statusis a
ConnectionStatuswith theStatus, aMessage, and, when set, theUrlto sign in again at. SessionStructuredError.Responsecarries the failed provider response'sBody.
🐛 Fixes
OpenCodeServer.DiscoverAsync,EnsureAsync, andStopAsyncdecode the CLI's service files
exactly as the CLI does. A whole-valued number such as8080.0is an integer for the service
config'sportand for the pid in the registration and the info probe. Before, such a config was
ignored, soEnsureAsynclost itsenvoverlay, and such a registration was not found. A service
config whosedisabledmember is not a boolean is no config at all, so itsenvoverlay and the
legacy config copy do not apply, as in the CLI.disabled: trueitself does not stop
EnsureAsync: only CLI commands read it, never the CLI's service operations.
📋 Important Notes
net8.0andnet9.0leave the packages, andnet11.0joins, in an upcoming preview, ahead of
their end of support on 2026-11-10. The packages will then target
netstandard2.0;net472;net10.0;net11.0. An app on .NET 8 or 9 still installs through the
netstandard2.0asset, but that asset is a compatibility asset, not a supported runtime: support
and testing cover the targeted runtimes only, and .NET 5–7 are not supported. Plan the move to
.NET 10.- Upstream's committed OpenAPI document is stale at
v2.0.22
(anomalyco/opencode#53105). This SDK's
snapshot comes from upstream's own pinned generator, so a diff against that committed file shows
four more operations here; they are real and the server serves them.