feat: add Codex plugin support with hooks, commands, and documentation

This commit is contained in:
Tal Muskal
2026-04-08 19:10:44 +03:00
parent 61924ea018
commit 50c3db383a
17 changed files with 320 additions and 7 deletions
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
# Capture stdin (hook input from Codex)
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/mempal-precompact-hook-$$.json")
cat > "$INPUT_FILE"
# Pipe to Python CLI with codex harness
cat "$INPUT_FILE" | python3 -m mempalace hook run --hook precompact --harness codex
EXIT_CODE=$?
# Cleanup
rm -f "$INPUT_FILE" 2>/dev/null
exit $EXIT_CODE
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
# Capture stdin (hook input from Codex)
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/mempal-session-start-hook-$$.json")
cat > "$INPUT_FILE"
# Pipe to Python CLI with codex harness
cat "$INPUT_FILE" | python3 -m mempalace hook run --hook session-start --harness codex
EXIT_CODE=$?
# Cleanup
rm -f "$INPUT_FILE" 2>/dev/null
exit $EXIT_CODE
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
# Capture stdin (hook input from Codex)
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/mempal-stop-hook-$$.json")
cat > "$INPUT_FILE"
# Pipe to Python CLI with codex harness
cat "$INPUT_FILE" | python3 -m mempalace hook run --hook stop --harness codex
EXIT_CODE=$?
# Cleanup
rm -f "$INPUT_FILE" 2>/dev/null
exit $EXIT_CODE