ai-workspace 0.5.0

An easy to use, opinionated tool for creating sandboxed AI workspaces
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  lint:
    name: Code Formatting & Lints
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo dependencies
        uses: Swatinem/rust-cache@v2

      - name: Check code formatting
        run: cargo fmt --check

      - name: Check Clippy lints
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Install Purist
        run: cargo install purist --locked

      - name: Run Purist AST linter
        run: purist

      - name: Verify package & metadata
        run: cargo publish --dry-run

  test:
    name: Unit & Integration Tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Cache cargo dependencies
        uses: Swatinem/rust-cache@v2

      - name: Install system dependencies (Bubblewrap & Direnv)
        run: |
          sudo apt-get update
          sudo apt-get install -y bubblewrap direnv

      - name: Install Jujutsu (jj)
        uses: taiki-e/install-action@v2
        with:
          tool: jj-cli

      - name: Install Fence
        run: |
          TAG=$(curl -s https://api.github.com/repos/fencesandbox/fence/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
          VERSION="${TAG#v}"
          echo "Installing Fence ${VERSION} (${TAG})..."
          curl -sSL "https://github.com/fencesandbox/fence/releases/download/${TAG}/fence_${VERSION}_Linux_x86_64.tar.gz" | sudo tar -xz -C /usr/local/bin fence
          fence --version

      - name: Setup Mock AI Agent CLI (agy)
        run: |
          mkdir -p "$HOME/.local/bin"
          cat << 'EOF' > "$HOME/.local/bin/agy"
          #!/bin/sh
          echo "agy 1.1.24"
          EOF
          chmod +x "$HOME/.local/bin/agy"
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"

      - name: Configure Git identity for tests
        run: |
          git config --global user.name "CI"
          git config --global user.email "ci@example.com"

      - name: Run cargo test
        run: cargo test --all-targets --all-features

  nix:
    name: Nix Flake Check & Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7

      - name: Install Nix
        uses: DeterminateSystems/nix-installer-action@v23

      - name: Cache Nix builds
        uses: DeterminateSystems/magic-nix-cache-action@v15

      - name: Check Nix flake
        run: nix flake check

      - name: Build Nix package
        run: nix build