#!/usr/bin/env bash
set -euo pipefail

ROOT="${WALL_E_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)}"
HOOK_NAME="${1:-stop}"

exec node "$ROOT/wall-e/hooks/cli.js" "$HOOK_NAME" --harness codex
