Skip to main content

opencode_sdk_dart 0.1.0 copy "opencode_sdk_dart: ^0.1.0" to clipboard
opencode_sdk_dart: ^0.1.0 copied to clipboard

Cross-platform Dart SDK for the OpenCode V2 HTTP API. Generated from the official OpenAPI 3.1 contract with sealed model unions, typed errors, multiplexed event streams, plugin RPC, PTY sockets, and l [...]

0.1.0 #

Initial release.

  • Generated from the OpenCode V2 OpenAPI 3.1 contract (438 declarations, 142 operations, 28 resources).
  • Sealed unions, branded extension type scalars, and wire-mapped enums.
  • Structured _tag error decoding with HTTP status codes.
  • Shared lazy event multiplexer with server.connected replay and capacity protection.
  • Plugin RPC calls, streaming subscriptions, and sequential callback subscriptions.
  • PTY and persistent PTY WebSocket helpers.
  • Local background service discovery, startup, stop, version constraints, and persistent-terminal handoff.
  • Request cancellation via CancellationToken.
  • One-call session turns: client.streamPrompt(...) streams text and reasoning deltas, falls back to session.wait polling when the live-only event stream drops, and reconciles the final answer with the server's record.
  • Cursor pagination helpers: session.listAll(...) and session.message.listAll(...) follow cursor.next until it runs out.
  • Opt-in RetryPolicy for transient transport failures, configurable on the transport or per request, with Retry-After support and idempotent-only defaults.
  • Unit test suite (87 tests) plus a live read-only smoke test.
0
likes
150
points
700
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Cross-platform Dart SDK for the OpenCode V2 HTTP API. Generated from the official OpenAPI 3.1 contract with sealed model unions, typed errors, multiplexed event streams, plugin RPC, PTY sockets, and local service discovery.

Repository (GitHub)
View/report issues

Topics

#opencode #api #sdk #client

License

MIT (license)

Dependencies

http, path, web_socket_channel

More

Packages that depend on opencode_sdk_dart