be89e49add
Hook scripts used `python3 -m mempalace` which fails when mempalace is installed via pipx or uv. Using the `mempalace` CLI command directly works for all installation methods. Dev users running from source should use `pip install -e .` as documented in CONTRIBUTING.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
321 B
Bash
10 lines
321 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
HOOK_NAME="${1:?Usage: mempal-hook.sh <hook-name>}"
|
|
INPUT_FILE=$(mktemp) || { echo "Failed to create temp file" >&2; exit 1; }
|
|
cat > "$INPUT_FILE"
|
|
cat "$INPUT_FILE" | mempalace hook run --hook "$HOOK_NAME" --harness codex
|
|
EXIT_CODE=$?
|
|
rm -f "$INPUT_FILE" 2>/dev/null
|
|
exit $EXIT_CODE
|