iop/bin/web.sh
toki 1479949db0 feat(node/cli): improve persistent session handling and Claude terminal support
- Add writePrompt with character-by-character typing for terminal profiles (2ms delay)
- Separate cliOutput into text and markerLine fields for precise completion matching
- Add consumeCompleteLines for buffered output parsing
- Add matchAny for multi-line completion marker checking
- Auto-accept Claude Code Bypass Permissions warning at startup
- Change PTY output reader from bufio.Scanner to ptmx.Read for raw byte output
- Improve drainUntilIdle with profile info and Claude bypass warning handling
- Add Claude status raw output fallback when usage parsing fails
- Add comprehensive blackbox tests for persistent sessions (21 test cases)
- Update e2e smoke test with proper wait functions, mock CLI script, and timeout variables
- Update edge.yaml console target from gemini to claude-tui, increase timeouts
- Update web app: add dev documentation, verify script, engines field, test message
2026-05-18 14:22:58 +09:00

28 lines
1.1 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
WEB_DIR="$REPO_ROOT/apps/web"
WEB_HOST="${IOP_WEB_HOST:-0.0.0.0}"
WEB_PORT="${IOP_WEB_PORT:-3000}"
export CONTROL_PLANE_INTERNAL_HTTP_URL="${CONTROL_PLANE_INTERNAL_HTTP_URL:-http://localhost:9080}"
export NEXT_PUBLIC_CONTROL_PLANE_HTTP_URL="${NEXT_PUBLIC_CONTROL_PLANE_HTTP_URL:-http://localhost:9080}"
export NEXT_PUBLIC_CONTROL_PLANE_WIRE_URL="${NEXT_PUBLIC_CONTROL_PLANE_WIRE_URL:-tcp://localhost:19080}"
if [[ ! -d "$WEB_DIR/node_modules" ]]; then
echo "[web] missing dependencies in $WEB_DIR/node_modules" >&2
echo "[web] run: cd apps/web && npm ci" >&2
exit 1
fi
cd "$WEB_DIR"
echo "[web] dir=$WEB_DIR"
echo "[web] listen=$WEB_HOST:$WEB_PORT"
echo "[web] control_plane_internal_http=$CONTROL_PLANE_INTERNAL_HTTP_URL"
echo "[web] control_plane_public_http=$NEXT_PUBLIC_CONTROL_PLANE_HTTP_URL"
echo "[web] control_plane_wire=$NEXT_PUBLIC_CONTROL_PLANE_WIRE_URL"
exec npm run dev -- --hostname "$WEB_HOST" --port "$WEB_PORT"