c6a04f5e532e215c5276978315e79182e639a3e1
Add wait_for_agent MCP tool that blocks until an agent reaches a terminal state (completed, failed, stopped). Returns final status with session_id, worktree_path, and git commits made by the agent. - Subscribe-before-check pattern avoids race conditions - Handles lagged receivers, channel closure, and configurable timeout - Default timeout 5 minutes, includes git log of agent commits in response - 11 new tests covering all paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Living Spec Standalone (Web Server Binary)
This app runs as a single Rust web server binary that serves the Vite/React frontend and exposes APIs.
The frontend lives in the frontend/ directory.
You can also run the frontend and backend separately in development (Vite dev server + Rust API).
Running it in development
# Build the frontend
cd frontend
pnpm install
pnpm dev
# Run the server (serves embedded frontend/dist/)
cargo run
Production
# Build the release binary (also builds the frontend via build.rs)
cargo build --release
# Run the server (serves embedded frontend/dist/)
./target/release/story-kit-server
Testing
Frontend Tests
The frontend uses Vitest for unit tests and Playwright for end-to-end tests.
cd frontend
# Run unit tests
pnpm test
# Run end-to-end tests
pnpm test:e2e
Backend Tests
This project uses nextest for running tests and cargo-llvm-cov for code coverage.
Install Tools
cargo install cargo-nextest cargo-llvm-cov
Run Tests
# Run all tests
cargo nextest run
# Run specific module
cargo nextest run search_files
# Run with verbose output
cargo nextest run --no-capture
Generate Coverage
# HTML report (opens in browser)
cargo llvm-cov nextest --html --open
# Terminal output
cargo llvm-cov nextest
# LCOV format (for CI)
cargo llvm-cov nextest --lcov --output-path lcov.info
# Clean coverage data
cargo llvm-cov clean
Configuration
- Nextest config:
.config/nextest.toml - Coverage output:
target/llvm-cov/html/index.html
Current Coverage (search_files module)
Module: commands/search.rs
├── Region Coverage: 75.36%
├── Function Coverage: 69.05%
└── Line Coverage: 72.55%
Available Test Profiles
# Development (default)
cargo nextest run
# CI with retries
cargo nextest run --profile ci
# Coverage optimized
cargo nextest run --profile coverage
Description