opencode-orchestrator-mcp 0.3.4

MCP server for orchestrator-style agents to spawn and manage OpenCode sessions
Documentation
# Crate-specific recipes for opencode-orchestrator-mcp
#
# These commands are specific to this crate and don't generalize to the workspace.
# For standard operations, use the root justfile: `just crate-check opencode-orchestrator-mcp`

default:
    @just --list

# Integration tests must run single-threaded to avoid server contention
integration-test:
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 cargo test -p opencode-orchestrator-mcp --test integration -- --ignored --nocapture --test-threads=1

integration-test-verbose:
    RUST_LOG=debug,opencode_orchestrator_mcp=trace,opencode_rs=debug \
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 \
    cargo test -p opencode-orchestrator-mcp --test integration -- --ignored --nocapture --test-threads=1

integration-test-one TEST:
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 cargo test -p opencode-orchestrator-mcp --test integration {{TEST}} -- --ignored --nocapture --test-threads=1

# Run permission-specific integration tests (requires opencode binary)
integration-test-permissions:
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 cargo test -p opencode-orchestrator-mcp \
        --test integration -- --ignored --nocapture --test-threads=1 \
        permission

# Run permission tests with debug logging
integration-test-permissions-debug:
    RUST_LOG=debug,opencode_orchestrator_mcp=trace,opencode_rs=debug \
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 cargo test -p opencode-orchestrator-mcp \
        --test integration -- --ignored --nocapture --test-threads=1 \
        permission

# ─────────────────────────────────────────────────────────────────────────────
# Stable v1.3.17 lane (bunx launcher mode, non-interactive)
# Uses --yes to skip bunx confirmation prompts for CI/automated contexts
# ─────────────────────────────────────────────────────────────────────────────

# Full integration tests using bunx opencode-ai@1.3.17 (requires bun installed)
# Ignored by default; run manually to validate stable version compatibility
[no-exit-message]
integration-test-bunx-stable:
    @echo "Running integration tests with bunx --yes opencode-ai@1.3.17..."
    @echo "Requires: bun installed and available in PATH"
    OPENCODE_ORCHESTRATOR_MANAGED=0 \
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.3.17" \
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 \
    cargo test -p opencode-orchestrator-mcp --test integration -- --ignored --nocapture --test-threads=1

# Exact-version smoke test: start managed server via bunx and validate /global/health version
# Runs the live_managed_server_reports_exact_pinned_version integration test
# Note: Explicitly disables recursion guard to allow running from within orchestrator contexts
[no-exit-message]
smoke-bunx-stable-version:
    @echo "Smoke test: starting managed server via bunx --yes opencode-ai@1.3.17 and validating exact version..."
    @echo "Requires: bun installed and available in PATH"
    OPENCODE_ORCHESTRATOR_MANAGED=0 \
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.3.17" \
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 \
    cargo test -p opencode-orchestrator-mcp --test integration live_managed_server_reports_exact_pinned_version -- --ignored --nocapture --test-threads=1

# Verbose integration tests using bunx (with debug logging)
integration-test-bunx-stable-verbose:
    RUST_LOG=debug,opencode_orchestrator_mcp=trace,opencode_rs=debug \
    OPENCODE_ORCHESTRATOR_MANAGED=0 \
    OPENCODE_BINARY=bunx \
    OPENCODE_BINARY_ARGS="--yes opencode-ai@1.3.17" \
    OPENCODE_ORCHESTRATOR_INTEGRATION=1 \
    cargo test -p opencode-orchestrator-mcp --test integration -- --ignored --nocapture --test-threads=1