opencode_rs 0.11.1

Rust SDK for OpenCode (HTTP-first hybrid with SSE streaming)
Documentation
# opencode_rs SDK justfile
# E2E integration testing recipes for version-pinned opencode server

set shell := ["bash", "-euo", "pipefail", "-c"]

# Integration test with bunx-provisioned pinned opencode version
[no-exit-message]
integration-test-bunx-stable:
    #!/usr/bin/env bash
    set -euxo pipefail
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.15.7" \
    OPENCODE_INTEGRATION=1 \
    cargo test -p opencode_rs --features server --test integration -- --ignored --nocapture --test-threads=1

# Quick smoke test: verify bunx-provisioned server reports correct version
[no-exit-message]
smoke-bunx-version:
    #!/usr/bin/env bash
    set -euxo pipefail
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.15.7" \
    OPENCODE_INTEGRATION=1 \
    cargo test -p opencode_rs --features server --test integration test_health_returns_pinned_version -- --ignored --nocapture

# Integration test with verbose output
[no-exit-message]
integration-test-bunx-verbose:
    #!/usr/bin/env bash
    set -euxo pipefail
    RUST_LOG=opencode_rs=debug \
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.15.7" \
    OPENCODE_INTEGRATION=1 \
    cargo test -p opencode_rs --features server --test integration -- --ignored --nocapture --test-threads=1

# Run the launcher orphan-cleanup regression against bunx launcher mode
[no-exit-message]
launcher-orphan-cleanup-regression:
    #!/usr/bin/env bash
    set -euxo pipefail
    : "${OPENCODE_INTEGRATION:=1}"
    : "${OPENCODE_BINARY:=bunx}"
    : "${OPENCODE_BINARY_ARGS:=--yes opencode-ai@1.15.7}"
    bunx --yes opencode-ai@1.15.7 --version
    OPENCODE_ORCHESTRATOR_MANAGED=0 \
    OPENCODE_INTEGRATION="$OPENCODE_INTEGRATION" \
    OPENCODE_BINARY="$OPENCODE_BINARY" \
    OPENCODE_BINARY_ARGS="$OPENCODE_BINARY_ARGS" \
    cargo test -p opencode_rs --features server --test launcher_orphan_cleanup_regression -- --ignored --nocapture --test-threads=1