From c56b6e43b477e67dd60a20013fe26d063282e0ad Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Mon, 19 Oct 2026 03:00:05 +0000 Subject: [PATCH] havre: /open uses the key you gave Havre A small script, loaded first on /open/, copies Havre's key (this tab's, or the remembered one) into openvenice's own session slot when openvenice has none yet. The page is the same origin, so nothing leaves the browser. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BQqGFv54JJTw7p3rgGjP7C --- ventures/havre/tools/open.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ventures/havre/tools/open.sh b/ventures/havre/tools/open.sh index 74efd73..9cff705 100644 --- a/ventures/havre/tools/open.sh +++ b/ventures/havre/tools/open.sh @@ -10,6 +10,19 @@ git -C "$src" checkout -q "$OV_REF" (cd "$src" && npm ci --silent --no-audit --no-fund >/dev/null && npx vite build --base=/open/ >/dev/null) rm -rf open cp -R "$src/dist" open +# Havre's key, handed to openvenice: same origin, so it's only a copy between two storage slots in this browser +cat > open/havre-key.js <<'EOF' +(function () { + try { + if (sessionStorage.getItem("venice-auth")) return; + var raw = sessionStorage.getItem("havre.key") || localStorage.getItem("havre.key"); + var key = raw ? JSON.parse(raw) : ""; + if (typeof key === "string" && key) sessionStorage.setItem("venice-auth", key); + } catch (e) { /* no key then */ } +})(); +EOF +sed -i.bak 's|||' open/index.html && rm -f open/index.html.bak +grep -q havre-key.js open/index.html cat > open/LICENSE.txt <