Skip to content

1.0.0

Choose a tag to compare

@Blind-Striker Blind-Striker released this 06 Nov 15:06
b777b83

1.0.0: the public surface is stable. From this release, a version's parts say where a change
comes from; the Important Notes below explain them. Since 0.9.0-preview.15,
LanguageModels.WaitForDefaultAsync waits out a location's plugin activation, and the SDK reads the
messages, events and tool states that real use carries through generated readers: on .NET 10, a
message of 2,400 parts deserializes about twice as fast and allocates about 40% less, and a captured
coding turn's subscription allocates about half as much. The playground shows the SDK running in
four apps.

✨ Added

  • client.LanguageModels.WaitForDefaultAsync returns the default model, asking again while the
    location's plugins activate. On a 503 ServiceUnavailableError it asks again on the schedule
    opencode's app uses for its boot-time catalog sync: up to twelve attempts, waiting one second
    after the first and doubling to at most five seconds. Every other failure surfaces at once. It
    refuses NoThrow at the call, as streams and cursor traversals do.

⚡ Performance

  • Messages deserialize faster and allocate less. On .NET 10, a message of 2,400 parts
    deserializes in about 8.5 ms instead of about 16.8 ms, a medium one about 47% faster, and a
    prompt's event frames about 54% faster. Reading that message also allocates 3,086,288 B instead
    of 5,098,776 B on .NET 10, and 3,086,288 B instead of 5,055,504 B on .NET 11. Messages, their
    content parts and tool states keep the same values and failure behavior; serialization is
    unchanged.
  • A prompt's event stream allocates less. Reading 1,024 delta frames and 16 text-ended frames
    allocates 704,732 B instead of 1,491,796 B on .NET 10, and 704,658 B instead of 1,491,724 B on
    .NET 11. Materializing the frames alone allocates 663,424 B instead of 1,450,368 B on both
    runtimes. Values, failure behavior and serialization are unchanged.
  • Real-turn event subscriptions allocate less. Reading a captured coding turn allocates 36,096 B
    instead of 75,280 B on .NET 10, and 36,024 B instead of 75,208 B on .NET 11. Values, failure
    behavior and serialization are unchanged.
  • On net472 and netstandard2.0, a response body under 64 MiB, up from 16 MiB, reuses a pooled
    buffer rather than allocating one per call. A 36 MB body on net472 goes from about 138 MB to
    about 102 MB per call. As a trade-off, the pool keeps more for the life of the process: at most
    about 250 MiB, up from about 60 MiB.
  • On net472, .NET 10 and .NET 11, a JSON request body is serialized into a pooled buffer, cleared
    on return, rather than a new array per call. A prompt with 2 MiB of text goes from about 2.1 MB to
    about 4 KB on .NET 10; on net472, from about 8.4 MB to about 7 KB, or from about 34 MB to about
    25 MB with newlines. As trade-offs, a send holds a larger array than its body while it runs, because
    the writer reserves about three times the text and the pool rounds up, and on net472 the SDK's
    pool can now also keep arrays after large requests, within its existing limit.
  • A terminal write allocates less. A keystroke on a PTY or a persistent PTY allocates about
    792 B instead of about 1,048 B on .NET 10, and about 1,733 B instead of about 1,910 B on net472.

📚 Documentation

  • The in-repo Sandbox is gone; the playground apps replace it.
  • The guides link to the playground apps that show their features running.
  • HQ's session page opens a terminal in the session's folder, removed from the server when the page ends.
  • HQ's pages no longer prerender, so a click right after a page loads is no longer dropped.
  • HQ shows a sent prompt at once, with "Working..." under it, so a first prompt no longer leaves the page blank while the server loads the session's folder; a prompt the server refuses goes back into the prompt box.
  • HQ answers text and choice questions in place, styles both screens, and shows its real SDK calls in a hideable source panel.
  • Every complete C# snippet in the README and guides is now compiled against the SDK in CI.
  • Correct consumer signatures, streaming examples and terminology, provider setup, experimental opt-ins, installation guidance, and contribution routing. The README has a Playground section and a Versions and support section that states what a version's parts mean.
  • The package descriptions state what each package provides, PersistentPtyResizedFrame's summary says that only ResizeAsync changes the viewport later writes carry, and the security policy names the latest release as the supported line.
  • The Known Issues name a .NET Framework cost: reading a JSON string over 1 MiB that contains an
    escape, such as a newline, allocates one extra array of its length each time.
  • EnsureAsync warns about a service boot's resume. A service it starts resumes every suspended
    session on the shared data, including one another process is still running, so both drive it.
    The connection modes guide says
    when that matters.
  • A runnable QuickStart sample lives in playground/.
  • HQ shows live sessions, streamed conversations, prompts, permission answers, changed files and new sessions in a chosen directory in Blazor Server with an Aspire AppHost.
  • Worker shows a hosted event-bus subscription and an owned server's failure exit in a Generic Host.
  • AotCli inspects a repository's branch, changed files, top-level entries and config sources as a Native AOT console tool.

📋 Important Notes

  • From 1.0.0, a version's parts say where a change comes from. A patch (1.0.x) carries fixes
    and additive changes of the SDK's own. A minor (1.x.0) moves the pinned opencode release and may
    change the generated protocol models the way upstream changed them; its section here lists each
    such change. Only a major (2.0.0) breaks the hand-written surface. A family upstream marks
    experimental carries [Experimental] and may change in any minor.
  • 1.0.0 is built on the go-live .NET 11 release-candidate SDK, a one-time exception to the GA-SDK
    rule; 1.0.1 rebuilds it on the GA SDK with no API change.