Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions LifeOS/install/skills/Interceptor/Tools/LaunchTestProfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,22 @@ fi

case "$(uname -s)" in
Darwin)
# No -n flag here — we want to reuse the existing Chrome process so the new
# window shares the user-data-dir lock with Default. Chrome handles
# --profile-directory by opening a window for that profile in the existing
# instance.
# Direct binary, not `open -a … --args`: when the browser is ALREADY
# RUNNING, `open` silently drops the --args (macOS behavior), so the
# profile window never opens and the isolation gate times out waiting
# for the context. Invoking the binary directly forwards the args to
# the running instance via Chrome's process singleton — the profile
# window opens whether or not the browser was already up.
CHROME_BIN="${INTERCEPTOR_TEST_BROWSER_BIN:-/Applications/${BROWSER}.app/Contents/MacOS/${BROWSER}}"
if [ -x "$CHROME_BIN" ]; then
"$CHROME_BIN" \
--profile-directory="$CHROME_PROFILE" \
--new-window \
"$START_URL" >/dev/null 2>&1 &
exit 0
fi
# Fallback (binary not at the expected path): reliable only when the
# browser is not already running.
exec open -a "$BROWSER" --args \
--profile-directory="$CHROME_PROFILE" \
--new-window \
Expand Down
31 changes: 31 additions & 0 deletions LifeOS/install/skills/Interceptor/preferences.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Interceptor per-machine preferences — the contract read by
# Tools/PreflightIsolation.sh, Tools/EnsureTestProfile.sh, and
# Tools/LaunchTestProfile.sh.
#
# Copy to:
# ~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Interceptor/preferences.env
# and fill in the two required values.

# REQUIRED — the pinned test context the agent is allowed to drive.
# Set this friendly name ONCE in the extension popup's Context ID field
# (click the Interceptor toolbar icon → Context ID → Save). Friendly names
# survive extension reloads; raw UUIDs rot on every reload.
INTERCEPTOR_TEST_CONTEXT_ID="interceptor-test"

# REQUIRED for auto-launch — the dedicated test profile's on-disk directory
# name (e.g. "Profile 2"). Map directory → profile name via Chrome's
# "Local State" file (profile.info_cache), or chrome://version → Profile Path.
# There is deliberately no default: guessing a profile could open the
# operator's working window.
INTERCEPTOR_TEST_CHROME_PROFILE=""

# Optional — browser app name (default "Google Chrome").
#INTERCEPTOR_TEST_BROWSER="Google Chrome"

# Optional — direct path to the browser binary, used so launches work while
# the browser is already running (macOS `open -a … --args` drops the args).
#INTERCEPTOR_TEST_BROWSER_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# Optional — comma-separated context IDs of the operator's WORKING profiles;
# the preflight gate hard-denies driving any of these.
#INTERCEPTOR_WORKING_PROFILE_IDS=""