42861ea7fa
Multi-adapter mobile UI for AI coding assistants. Supports Claude Code, Codex CLI, and Gemini CLI through one interface. Features: - Real-time bidirectional sync via tmux + WebSocket - Cross-AI review (send one AI's output to another for review) - Multi-review tabs with minimize/expand - Push notifications (PWA) with smart session-aware filtering - Three-channel event system (hooks, file watcher, pane monitor) - Voice input, image paste, draft persistence - Terminal-native design (JetBrains Mono, dark theme, pixel art claw) - CLI with --adapter flag on every command - Zero-overhead fire-and-forget hooks
20 lines
645 B
Bash
Executable File
20 lines
645 B
Bash
Executable File
#!/bin/bash
|
|
# Reads JSON from stdin (Gemini hook protocol), POSTs to claw-tap server.
|
|
# IMPORTANT: Gemini hooks expect a JSON response on stdout.
|
|
# Must write response BEFORE backgrounding curl, or Gemini hangs.
|
|
#
|
|
# Usage: bridge.sh <endpoint> <port> <protocol>
|
|
# e.g.: bridge.sh session-start 3456 https
|
|
ENDPOINT="$1"
|
|
PORT="${2:-3456}"
|
|
PROTOCOL="${3:-http}"
|
|
CURL_K=""
|
|
[ "$PROTOCOL" = "https" ] && CURL_K="-k"
|
|
|
|
input=$(cat)
|
|
printf '{}'
|
|
|
|
printf '%s' "$input" | curl -sf $CURL_K --connect-timeout 2 --max-time 5 \
|
|
-X POST -H 'Content-Type:application/json' -d @- \
|
|
"${PROTOCOL}://localhost:${PORT}/api/hooks/gemini/${ENDPOINT}" &>/dev/null &
|