-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·22 lines (17 loc) · 794 Bytes
/
Copy pathtest.sh
File metadata and controls
executable file
·22 lines (17 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# Quick smoke test — sends test messages to your Telegram.
# Usage: bash test.sh
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BINARY="$SCRIPT_DIR/target/release/ghost-code"
if [ ! -f "$BINARY" ]; then
echo "Binary not found. Building..."
cargo build --release --manifest-path "$SCRIPT_DIR/Cargo.toml"
fi
echo "Testing Stop hook..."
echo '{"last_assistant_message":"Refactored the swap router to support multi-hop paths.","cwd":"/tmp/my-project"}' \
| "$BINARY" stop
echo "Testing Notification hook..."
echo '{"message":"Claude needs your permission to run: cargo build","title":"Permission needed","notification_type":"permission_prompt","cwd":"/tmp/my-project"}' \
| "$BINARY" notification
echo "Done. Check Telegram for two test messages."