Skip to content

0.9.0-preview.14

Pre-release
Pre-release

Choose a tag to compare

@Blind-Striker Blind-Striker released this 23 Oct 18:15
0e5e304

The SDK speaks opencode 2.1.x. The pinned server moves from 2.0.32 to 2.1.4.
0.9.0-preview.13 against a 2.1.x server fails reading compaction messages and loses bus events around
them, so a wait for the end of a turn can hang; upgrade the SDK. The upgrade changes several
generated protocol models (listed below), adds a heap-snapshot door, saved-permission updates,
experimental voice models and instructions, and archived sessions, and makes persistent PTYs work
on Windows hosts. The SDK's own transport now drops a connection idle for three seconds, which
fixes reuse of a closed socket on .NET Framework, and on macOS a server ended with a whole-tree
Process.Kill is now reaped instead of staying a zombie.

💥 Breaking changes

  • Protocol model changes. Recent is removed from compaction messages and event data.
    ProviderState, State, ResultState and ProviderResultState become Native across assistant
    messages, parts and turn events. SessionProviderContext and SessionProviderContextProvenance
    are deleted, along with ProviderContext on completed compaction messages and compaction-ended data;
    CredentialKey.Configuration is removed. ExperimentalSessionImportRequest.Messages now takes
    IReadOnlyList<JsonElement>; ToolFileContent.Name and SessionMessageLocationSwitched.Previous lose Optional<>.

✨ Added

  • New protocol doors and members. DebugClient.WriteHeapSnapshotAsync,
    PermissionsClient.UpdateSavedAsync, and experimental ListVoiceModelsAsync and
    SetVoiceSessionInstructionsAsync join the surface, and experimental voice session responses gain
    Session, a VoiceSessionReference. Sessions gain Archived filters and updates
    and archived/unarchived events; models and provider compatibility gain StreamUsage, structured
    errors gain RetryAfterMs, and experimental config gains Todo, BackgroundCompaction and LocationIdleTimeout.
  • Persistent PTYs work on Windows hosts. opencode 2.1.x ships the opencode-pty daemon for
    win32 too, so create no longer answers the daemon-absent 503 there.

🔧 Changes

  • The Windows default background-service port is now 28894. It replaces 45278 for released CLI channels.
  • The SDK's own transport drops a connection that sat idle for three seconds, as upstream's
    client does. On .NET Framework, an idle connection used to be kept for 100 seconds, long after
    the server closed it, so a request could pick up a socket the server had already closed. Modern
    .NET already retired it after four seconds, following the server's Keep-Alive hint, and now
    does so after three. The netstandard2.0 asset on a modern .NET runtime keeps the four seconds.

🐛 Fixes

  • A server ended with Process.Kill(entireProcessTree: true) is reaped on macOS. That kill
    stops the server before it kills it, and the launcher took the stop for the exit: the server
    stayed a zombie of the calling process, a Process wait on its pid never ended, and the launcher
    reported an unknown exit while the server was only stopped. The launcher now reports the server's
    real exit and reaps it.