opencode_rs 0.1.0

Rust SDK for OpenCode (HTTP-first hybrid with SSE streaming)
Documentation
# Use bash with strict flags
set shell := ["bash", "-euo", "pipefail", "-c"]

# CI/output mode detection
ci := env("CI", "false")
output_mode := env("OUTPUT_MODE", if ci == "true" { "normal" } else { "minimal" })

# Wrapper path
WRAP := "../tools/cargo-wrap.sh"

default: help

help:
  @echo "Tool commands:"
  @echo "  just check            # fmt-check + clippy (warnings are failures)"
  @echo "  just test             # cargo test (counts results)"
  @echo "  just test-integration # run integration tests (requires OpenCode server)"
  @echo "  just test-all         # run all tests including integration"
  @echo "  just build            # cargo build (warnings are failures)"
  @echo "  just fmt              # cargo fmt"
  @echo "  just fmt-check        # cargo fmt --check"

fmt:
  cargo fmt

fmt-check:
  {{WRAP}} fmt-check

check:
  {{WRAP}} fmt-check
  {{WRAP}} clippy --all-targets -- -D warnings

test:
  {{WRAP}} test

# Run integration tests (requires OPENCODE_INTEGRATION=1 and running OpenCode server)
test-integration:
  OPENCODE_INTEGRATION=1 {{WRAP}} test --test integration -- --ignored

# Run all tests including integration (requires running OpenCode server)
test-all:
  {{WRAP}} test
  OPENCODE_INTEGRATION=1 {{WRAP}} test --test integration -- --ignored

build:
  {{WRAP}} build