opencode_effect 0.1.0
opencode_effect: ^0.1.0 copied to clipboard
Effect-based adapter for opencode_sdk_dart: typed error families, interruptible calls, scoped client lifetimes, layers and pull streams built on effect_core.
0.1.0 #
Initial release.
- One sealed
OpenCodeErrorfamily for expected failures, while foreign exceptions stay defects. openCodeCall,openCodeTask,read, andcallbind any SDK resource method as a lazy, typedEffect.- Interruption cancels the SDK
CancellationTokenand aborts the in-flight request. openCodeClientLayer()andopenCodeClientServiceown the client lifetime per scope.- Pull streams for events, turns, and PTY output with bounded buffering and scope-bound cleanup.
withReadRetry()composes the SDK read policy as an effectSchedule; writes are never retried implicitly.- Local service discovery, start, and stop as effects.
- Optional per-call abortability and pooled requests via
abortable: false.