diff --git a/.github/releases/v0.4.0.md b/.github/releases/v0.4.0.md new file mode 100644 index 0000000..77fd880 --- /dev/null +++ b/.github/releases/v0.4.0.md @@ -0,0 +1,38 @@ +0.4.0 uses one H.264 viewer for Android emulators and iOS simulators. Android still uses scrcpy and the device encoder. iOS now uses the simulator helper's native H.264 encoder; the proxy converts AVCC records to Annex-B without decoding or re-encoding video on the host. + +## Changed + +- Video buffers stay bounded. After dropping dependent frames, playback waits for a keyframe rather than decoding an incomplete sequence. +- Decoder setup, playback, reset, and terminal disposal have explicit states. Obsolete codec checks and decoder outputs cannot revive a stopped viewer. +- Capture recovery keeps the device handle and automation session attached. If the capture helper exits, the next stream request restarts capture and rotates the viewer proxy's credentials. +- Device ownership records now include reservation, attachment, retirement, rollback, and failed cleanup. Failed cleanup keeps ownership reserved, and retries only unfinished steps. +- Cancelling queued work prevents dispatch. Cancelling running native commands terminates the command before the queue advances; input already sent to the device cannot be undone. +- Native operations have a 120-second deadline. The RPC deadline allows another 15 seconds for cancellation, cleanup, and returning an outcome. Failures retain whether the action may have executed. + +## Fixed + +- A capture helper that exits between readiness and publication is rejected instead of being returned as active. +- Failed initial state publication closes the desktop connection so a fresh connection can retry. Late readiness completion cannot resurrect a closed connection. +- Failed or ended session-event subscriptions reconnect with cancellable backoff, capped at five seconds. +- Cleanup after session deletion or movement remains retryable and does not block another session's cleanup. +- Shutdown intent survives failed cleanup. Physical-device aliases cannot bypass ownership or cause rollback to shut down another session's device. +- Disposal cancels pending discovery and recovery. Destroyed viewers cannot reconnect or retain decode timers. + +Overlapping old tests were consolidated into transition tables, and the previous all-in-one desktop test was split into focused cases. Production function complexity is limited to nine. No runtime dependency or FSM framework was added. + +## Update + +Update the plugin pin in your global OpenCode configuration, preserving other settings: + +```json +{ + "$schema": "https://opencode.ai/config.json", + "plugins": ["github:viralcodex/opencode-demul#v0.4.0"] +} +``` + +Plugin exports and tool names are unchanged. Android still requires SDK Platform-Tools, Emulator, and a configured AVD. iOS requires Xcode and an iOS Simulator runtime on macOS. Both require Node 22.19+ on the 22.x line, or Node 24+, with npm. + +Validation includes lint, formatting, typechecking, 296 passing tests and one existing Bun-only skip, rebuilt bundles, and installed-package loading. Each implementation PR passed Linux CI before merging; lifecycle suites also passed three consecutive local runs. Two fresh helper installations, native module loading, offline reuse, and stale-cache rejection passed on macOS arm64. + +Full changelog: https://github.com/viralcodex/opencode-demul/compare/v0.3.0...v0.4.0 diff --git a/README.md b/README.md index d92a87e..798ce44 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ Add this entry to your OpenCode configuration. ```json { - "plugins": ["github:viralcodex/opencode-demul#v0.3.0"] + "$schema": "https://opencode.ai/config.json", + "plugins": ["github:viralcodex/opencode-demul#v0.4.0"] } ``` @@ -67,7 +68,7 @@ The first iOS automation command builds the agent's XCTest runner, which can tak Prebuilt plugin files are included. -[Release notes for v0.3.0](https://github.com/viralcodex/opencode-demul/releases/tag/v0.3.0). +[Release notes for v0.4.0](https://github.com/viralcodex/opencode-demul/releases/tag/v0.4.0). ## Development diff --git a/package.json b/package.json index 8cb84e7..13bbd34 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode/plugin-device", - "version": "0.3.0", + "version": "0.4.0", "description": "Local Android emulator and iOS simulator viewing and session-bound automation for OpenCode Desktop", "keywords": [ "android",