Files
ironclaw/scripts/dev-setup.sh
Illia Polosukhin 3af8393542 Shrink composition extension host and retire product workflow facades (#6616)
* Refactor extension host and product surface boundaries

* Remove product command and facade vocabulary

* Move generic extension host glue out of composition

* Move channel identity stores into extension host

* Move channel identity vocabulary to host APIs

* Move extension lifecycle helpers into host crate

* Move durable extension lifecycle into host

* Remove obsolete dispatcher boundary ratchet

* Update dispatcher boundary shim ratchet

* Fix integration support after product surface split

* Fix product tests for current store APIs

* Retire public extension activate surface

* Mark test-only panic suppressions

* Fix trigger source delivery inheritance

* Shrink composition extension host lifecycle

* Strengthen pre-push CI parity

* Add pre-push coverage ratchet gate
2026-07-24 19:33:20 -07:00

89 lines
3.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Developer setup script for IronClaw.
#
# Gets a fresh checkout ready for development without requiring
# Docker, PostgreSQL, or any external services.
#
# Usage:
# ./scripts/dev-setup.sh
#
# After running, you can:
# cargo check # default build
# cargo test # default test suite
# cargo test --all-features # full test suite (requires Node.js 22 + Corepack/pnpm for WebUI bundle)
set -euo pipefail
cd "$(dirname "$0")/.."
echo "=== IronClaw Developer Setup ==="
echo ""
# 1. Check rustup
if ! command -v rustup &>/dev/null; then
echo "ERROR: rustup not found. Install from https://rustup.rs"
exit 1
fi
echo "[1/6] rustup found: $(rustup --version 2>/dev/null | head -1)"
# 2. Add WASM target (required by build.rs for channel compilation)
echo "[2/6] Adding wasm32-wasip2 target..."
rustup target add wasm32-wasip2
# 3. Install wasm-tools (required by build.rs for WASM component model)
echo "[3/6] Installing wasm-tools..."
if command -v wasm-tools &>/dev/null; then
echo " wasm-tools already installed: $(wasm-tools --version)"
else
cargo install wasm-tools --locked
fi
# 4. Verify the project compiles
echo "[4/6] Running cargo check..."
cargo check
# 5. Run tests using libsql temp DB (no Docker/external DB needed)
echo "[5/6] Running tests (no external DB required)..."
cargo test
# 6. Install git hooks
echo "[6/6] Installing git hooks..."
HOOKS_DIR=$(git rev-parse --git-path hooks 2>/dev/null) || true
if [ -n "$HOOKS_DIR" ]; then
mkdir -p "$HOOKS_DIR"
SCRIPTS_ABS="$(cd "$(dirname "$0")" && pwd)"
ln -sf "$SCRIPTS_ABS/commit-msg-regression.sh" "$HOOKS_DIR/commit-msg"
echo " commit-msg hook installed (regression test enforcement)"
ln -sf "$SCRIPTS_ABS/pre-commit-safety.sh" "$HOOKS_DIR/pre-commit"
echo " pre-commit hook installed (UTF-8, case-sensitivity, /tmp, redaction, composition-mass ratchet)"
REPO_ROOT="$(git rev-parse --show-toplevel)"
ln -sf "$REPO_ROOT/.githooks/pre-push" "$HOOKS_DIR/pre-push"
echo " pre-push hook installed (merge check + CI-parity quality gate + Reborn coverage ratchet + WebUI provider replay + optional delta lint)"
else
echo " Skipped: not a git repository"
fi
echo ""
# Codebase knowledge graph (codebase-memory MCP) — powers agent code discovery.
# Single static binary, no deps, no API keys, 100% local. See CLAUDE.md -> "Code Discovery".
if command -v codebase-memory-mcp &>/dev/null; then
echo "[graph] codebase-memory-mcp found: $(command -v codebase-memory-mcp)"
else
echo "[graph] Installing codebase-memory-mcp (agent code-discovery graph)..."
if curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash; then
echo " installed. The repo's .mcp.json wires it into Claude Code automatically."
else
echo " WARN: install failed — agents will fall back to grep."
echo " Install manually: https://github.com/DeusData/codebase-memory-mcp"
fi
fi
echo ""
echo "=== Setup complete ==="
echo ""
echo "Quick start:"
echo " cargo run # Run the default build"
echo " cargo test # Test suite"
echo " cargo test --all-features # Full test suite (requires Node.js 22 + Corepack/pnpm for WebUI bundle)"
echo " cargo clippy --all-features # Lint all code (requires Node.js 22 + Corepack/pnpm for WebUI bundle)"