From dfb24f0fa89479388858cf186f2f4d853705772c Mon Sep 17 00:00:00 2001 From: Brad Harris Date: Mon, 9 Mar 2026 17:55:56 -0600 Subject: [PATCH] Add CI workflow and launchd wrapper script - .github/workflows/ci.yml: type-check, lint, build on PRs to main - bin/dispatch-launchd-wrapper: zsh -il wrapper for launchd to ensure full user environment (NVM, Homebrew, PATH) is available to Dispatch and any agents it spawns Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ bin/dispatch-launchd-wrapper | 14 ++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100755 bin/dispatch-launchd-wrapper 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"