diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..538e1c56 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: [main] + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "25.8.0" + cache: "npm" + cache-dependency-path: | + package-lock.json + web/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Install web dependencies + run: npm --prefix web ci + + - name: Type check + run: npm run check + + - name: Lint + run: npm run lint:web + + - name: Build + run: npm run build diff --git a/bin/dispatch-launchd-wrapper b/bin/dispatch-launchd-wrapper new file mode 100755 index 00000000..6f67f6fa --- /dev/null +++ b/bin/dispatch-launchd-wrapper @@ -0,0 +1,14 @@ +#!/bin/zsh +# +# Wrapper script for launchd. Sources the user's shell config to ensure +# the full environment (NVM, Homebrew, PATH, API keys, etc.) is available +# to Dispatch and any agents it spawns. +# +# launchd runs with a minimal environment by default - this fixes that. + +[[ -f ~/.zprofile ]] && source ~/.zprofile +[[ -f ~/.zshrc ]] && source ~/.zshrc + +ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" + +exec node "$ROOT_DIR/dist/server.js"