diff --git a/bin/chrome-cdp b/bin/chrome-cdp deleted file mode 100755 index 35f34a405..000000000 --- a/bin/chrome-cdp +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# Launch Chrome with CDP (remote debugging) enabled. -# Usage: chrome-cdp [port] -# -# Chrome refuses --remote-debugging-port on its default data directory. -# We create a separate data dir with a symlink to the user's real profile, -# so Chrome thinks it's non-default but uses the same cookies/extensions. - -PORT="${1:-9222}" -CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" -REAL_PROFILE="$HOME/Library/Application Support/Google/Chrome" -CDP_DATA_DIR="$HOME/.gstack/cdp-profile/chrome" - -if ! [ -f "$CHROME" ]; then - echo "Chrome not found at $CHROME" >&2 - exit 1 -fi - -# Check if Chrome is running -if pgrep -f "Google Chrome" >/dev/null 2>&1; then - echo "Chrome is still running. Quitting..." - osascript -e 'tell application "Google Chrome" to quit' 2>/dev/null - - # Wait for it to fully exit - for i in $(seq 1 20); do - pgrep -f "Google Chrome" >/dev/null 2>&1 || break - sleep 0.5 - done - - if pgrep -f "Google Chrome" >/dev/null 2>&1; then - echo "Chrome won't quit. Force-killing..." >&2 - pkill -f "Google Chrome" - sleep 1 - fi -fi - -# Set up CDP data dir with symlinked profile -# Chrome requires a "non-default" data dir for --remote-debugging-port. -# We symlink the real Default profile so cookies/extensions carry over. -mkdir -p "$CDP_DATA_DIR" -if [ -d "$REAL_PROFILE/Default" ] && ! [ -e "$CDP_DATA_DIR/Default" ]; then - ln -s "$REAL_PROFILE/Default" "$CDP_DATA_DIR/Default" - echo "Linked real Chrome profile into CDP data dir" -fi -# Also link Local State (contains crypto keys for cookie decryption, etc.) -if [ -f "$REAL_PROFILE/Local State" ] && ! [ -e "$CDP_DATA_DIR/Local State" ]; then - ln -s "$REAL_PROFILE/Local State" "$CDP_DATA_DIR/Local State" -fi - -echo "Launching Chrome with CDP on port $PORT..." -"$CHROME" \ - --remote-debugging-port="$PORT" \ - --remote-debugging-address=127.0.0.1 \ - --remote-allow-origins="http://127.0.0.1:$PORT" \ - --user-data-dir="$CDP_DATA_DIR" \ - --restore-last-session & -disown - -# Wait for CDP to be available -for i in $(seq 1 30); do - if curl -s "http://127.0.0.1:$PORT/json/version" >/dev/null 2>&1; then - echo "CDP ready on port $PORT" - echo "Run: \$B connect chrome" - exit 0 - fi - sleep 1 -done - -echo "CDP not available after 30s." >&2 -exit 1 diff --git a/bin/gstack-open-url b/bin/gstack-open-url deleted file mode 100755 index 725231376..000000000 --- a/bin/gstack-open-url +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# gstack-open-url — cross-platform URL opener -# -# Usage: gstack-open-url -set -euo pipefail - -URL="${1:?Usage: gstack-open-url }" - -case "$(uname -s)" in - Darwin) open "$URL" ;; - Linux) xdg-open "$URL" 2>/dev/null || echo "$URL" ;; - MINGW*|MSYS*|CYGWIN*) start "$URL" ;; - *) echo "$URL" ;; -esac diff --git a/bin/gstack-platform-detect b/bin/gstack-platform-detect deleted file mode 100755 index 766a585b3..000000000 --- a/bin/gstack-platform-detect +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# gstack-platform-detect: show which AI coding agents are installed and gstack status -# Config-driven: reads host definitions from hosts/*.ts via host-config-export.ts - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -GSTACK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" - -printf "%-16s %-10s %-40s %s\n" "Agent" "Version" "Skill Path" "gstack" -printf "%-16s %-10s %-40s %s\n" "-----" "-------" "----------" "------" - -for host in $(bun run "$GSTACK_DIR/scripts/host-config-export.ts" list 2>/dev/null); do - cmd=$(bun run "$GSTACK_DIR/scripts/host-config-export.ts" get "$host" cliCommand 2>/dev/null) - root=$(bun run "$GSTACK_DIR/scripts/host-config-export.ts" get "$host" globalRoot 2>/dev/null) - spath="$HOME/$root" - - if command -v "$cmd" >/dev/null 2>&1; then - ver=$("$cmd" --version 2>/dev/null | head -1 || echo "unknown") - if [ -d "$spath" ] || [ -L "$spath" ]; then - status="INSTALLED" - else - status="NOT INSTALLED" - fi - printf "%-16s %-10s %-40s %s\n" "$host" "$ver" "$spath" "$status" - fi -done diff --git a/test/audit-compliance.test.ts b/test/audit-compliance.test.ts index 80ef6dced..6241b18bc 100644 --- a/test/audit-compliance.test.ts +++ b/test/audit-compliance.test.ts @@ -109,12 +109,6 @@ describe('Audit compliance', () => { }); // Round 2 Fix 4: Chrome CDP binds to localhost only - test('chrome-cdp binds to localhost only', () => { - const cdp = readFileSync(join(ROOT, 'bin/chrome-cdp'), 'utf-8'); - expect(cdp).toContain('--remote-debugging-address=127.0.0.1'); - expect(cdp).toContain('--remote-allow-origins='); - }); - // Fix 2+6: All generated SKILL.md files with telemetry are conditional test('all generated SKILL.md files with telemetry calls use conditional pattern', () => { const skills = getAllSkillMds(); diff --git a/test/no-stale-gstack-brain-refs.test.ts b/test/no-stale-gstack-brain-refs.test.ts index 5aa007d67..9557c3fe2 100644 --- a/test/no-stale-gstack-brain-refs.test.ts +++ b/test/no-stale-gstack-brain-refs.test.ts @@ -88,6 +88,12 @@ const SCAN_PATHS = [ 'review/SKILL.md.tmpl', 'ship/SKILL.md.tmpl', 'test/', + // Fork port wave 2: docs were deliberately excluded and that exact gap let + // a dead command (gstack-brain-init) survive ~36 releases as a + // command-not-found instruction. Docs are user-facing surface; scan them. + 'docs/', + 'README.md', + 'USING_GBRAIN_WITH_GSTACK.md', ]; function grepRefs(pattern: string): string[] {