← Commit history
SKILL.md+27−7
@@ -179,10 +179,25 @@ Generate: ```bash hero-studio pose <owner>/<slug> --surface webview|pup|browser [--title "T"] [--brief "one-liner"] [--type app,service] [--headline "H"] [--timeout 900] [--port N] # blocks; exits 0 with {file, path, port, latest} JSON on stdout when the HUMAN generates,-# exit 2 on timeout, exit 1 on setup errors, exit 3 when the pup surface failed-# (the reason is printed; there is NO silent webview fallback)+# exit 2 on timeout, exit 1 on setup errors, exit 3 when no surface opened and+# --no-fallback was set (the gate it opened is closed again) ``` +**A terminal with no VS Code proxy** (Claude Code in a plain terminal on a+cloud container): there is no `VSCODE_PROXY_URI`, so map the studio's port and+pass the mapping with `--url` (or `HERO_STUDIO_URL`). It is a public URL, so+remove it once the hero is saved:++```bash+adom-cli carbon containers port-add <container-slug> --port 8846+hero-studio --ai-thread "<thread>" pose <owner>/<slug> --surface pup --url https://<mapping>/ --target <machine>+adom-cli carbon containers port-remove <container-slug> ...+```++Without either URL, pose refuses with NO_CONTAINER_PROXY before anything is+posed, so no gate is left open behind it. A `--url` without `{{port}}` pins the+studio to that one port (8846, or `--port`).+ CONCURRENT STUDIOS: when the default port is mid-gate for a DIFFERENT page, pose automatically starts a fresh instance on a free port and says so; a SECOND pose of the SAME page refuses with POSE_BUSY (exit 4) naming when the@@ -199,10 +214,15 @@ for multi-type pages (app,service renders a clustered pill group). `adom-cli hydrogen probe` (window_mode: webview | pup) and pass that. Never open both surfaces for the same content. The pup path reuses a per-instance session (navigate, not a duplicate window). When pup fails, pose prints what every-adom-desktop step actually said (PUP_OPEN_FAILED: ambiguous target, relay-down, approval/caller-identity gate...) and then FALLS BACK to a webview tab-so the gate still reaches the human, telling you to tell them the surface-changed; pass --no-fallback for the strict exit-3 refusal instead.+bridge step actually said (PUP_OPEN_FAILED: several desktops and no --target,+relay down, approval/caller-identity gate...) and FALLS BACK to the same+desktop's default browser (`desktop_open_url`), saying so (OPENED+[DESKTOP_BROWSER]); tell the human where the studio opened. When nothing opens+at all (pup and the default browser both fail, or no Hydrogen webview pane+exists), pose prints NOT OPENED with the studio URL and KEEPS WAITING: the gate+works from any browser that reaches that URL, and Generate there still ends the+pose with the JSON. `--no-fallback` skips the fallback and exits 3 instead,+closing the gate it opened.  `pose` starts the server if needed, registers the package with the studio (no restart needed), poses it, opens the "Hero Studio" webview tab with proxy mode off (proxy mode@@ -236,7 +256,7 @@ The studio runs on a plain desktop too. What changes: - **Surface.** Use `--surface browser`: pose opens `http://127.0.0.1:<port>/` in   the default browser (`start`, `open` or `xdg-open`) and prints the URL either   way, then blocks for the human's Generate exactly as in a container. Without-  `VSCODE_PROXY_URI`, `webview` and `pup` refuse with NO_CONTAINER_PROXY.+  `VSCODE_PROXY_URI` or `--url`, `webview` and `pup` refuse with NO_CONTAINER_PROXY. - **Identity.** Wiki calls read as the first identity found, in the adom-wiki   CLI's order: `ADOM_WIKI_TOKEN`, the adom-wiki stored token, the container key,   the adom-cli login, then the Adom Bridge session in `~/.adom/session.json`.
bridge.mjs+40−15
@@ -12,7 +12,7 @@ const run = (bin, args, timeout, target, thread) => new Promise((res) => {   let a = target ? [...args, '--target', target] : [...args];   // Caller identity rides every call (#42.2): adom-bridge-cli takes the   // global --ai-thread flag; legacy adom-desktop reads ADOM_AI_THREAD env.-  if (thread && bin === 'adom-bridge-cli') a = ['--ai-thread', thread, ...a];+  if (thread && bin !== 'adom-desktop') a = ['--ai-thread', thread, ...a];   const env = thread ? Object.assign({}, process.env, { ADOM_AI_THREAD: thread }) : process.env;   execFile(bin, a, { timeout, env }, (err, stdout, stderr) => res({     ok: !err,@@ -27,34 +27,59 @@ const which = (bin) => new Promise((res) => { });  // The verbs the studio uses, by suffix; the adapter resolves each suffix to-// whatever full name the box actually answers on (pup_*, browser_*, ...).+// the puppeteer bridge's name for it on this box (pup_*, or browser_* on older+// boxes). Only those two prefixes: bridge_list also lists altium_status,+// fusion_status and the native-browser extension's nbrowser_open_window, and+// taking the first name that ends in the suffix sent pose to the extension+// and doctor to Fusion. const SUFFIXES = ['open_window', 'navigate', 'screenshot', 'eval', 'status', 'alert_window'];+const PUP_PREFIXES = ['pup', 'browser'];++/// Pure: the verb name per suffix from bridge_list's text (exported for tests).+export function resolveVerbs(listText) {+  const verbs = {};+  for (const sfx of SUFFIXES) {+    const found = PUP_PREFIXES.map((p) => p + '_' + sfx).find((v) => new RegExp('\\b' + v + '\\b').test(listText));+    verbs[sfx] = found || 'pup_' + sfx;+  }+  return verbs;+}++/// The reason a bridge answer failed, in words, or '' when it did not.+export function bridgeTrouble(r) {+  const text = (r.out || '') + (r.errOut || '');+  if (text.includes('ambiguous_target')) return 'several desktops are connected and none is primary: pass --target <machine> (or set ADOM_TARGET)';+  if (!r.ok) return r.fail || 'failed';+  if (text.includes('"error"') || text.includes('_adom_use_cli_instead')) {+    const m = text.match(/"error"\s*:\s*"([^"]+)"/);+    return m ? m[1] : 'the bridge answered with an error';+  }+  return '';+}  export async function makeBridge(target, thread) {   thread = thread || process.env.ADOM_AI_THREAD || '';-  const hasNew = await which('adom-bridge-cli');-  const bin = hasNew ? 'adom-bridge-cli' : 'adom-desktop';-  const verbs = {};-  if (hasNew) {-    // Resolve live verb names from bridge_list; a suffix seen there wins.+  // adom-bridge is the current name; adom-bridge-cli is its retired alias+  // (still answers, with a deprecation note on every call).+  const bin = (await which('adom-bridge')) ? 'adom-bridge' : (await which('adom-bridge-cli')) ? 'adom-bridge-cli' : 'adom-desktop';+  const modern = bin !== 'adom-desktop';+  let verbs = {};+  if (modern) {     const bl = await run(bin, ['bridge_list'], 15000, target, thread);-    for (const sfx of SUFFIXES) {-      const m = (bl.out + bl.errOut).match(new RegExp('\\b([a-z][a-z0-9]*)_' + sfx + '\\b'));-      if (m) verbs[sfx] = m[0];-    }-    // pup_* is the known-good prefix on renamed boxes; fill unresolved-    // suffixes with it rather than the legacy browser_* names.-    for (const sfx of SUFFIXES) if (!verbs[sfx]) verbs[sfx] = 'pup_' + sfx;+    verbs = resolveVerbs(bl.out + bl.errOut);   } else {     for (const sfx of SUFFIXES) verbs[sfx] = 'browser_' + sfx;   }   return {     bin,-    generation: hasNew ? 'adom-bridge-cli' : 'adom-desktop (legacy)',+    generation: modern ? bin : 'adom-desktop (legacy)',     verbs,     /// call('open_window', {...}) -> {ok, out, errOut, fail}; args JSON-encoded     call: (suffix, args, timeout = 20000) =>       run(bin, [verbs[suffix], JSON.stringify(args ?? {})], timeout, target, thread),+    /// a core verb every desktop answers (ping, desktop_open_url), with JSON args+    core: (verb, args, timeout = 20000) =>+      run(bin, args === undefined ? [verb] : [verb, JSON.stringify(args)], timeout, target, thread),     /// plain verb (no JSON args), e.g. bridge_list itself     raw: (verb, timeout = 15000) => run(bin, [verb], timeout, target, thread),   };
data/pages.json+4−2
@@ -144,12 +144,14 @@   "score": 0,   "stars": 0,   "installs30d": 0,-  "brief": "The hero-image lab with a human gate: pose, generate, provenance-stamped.",+  "brief": "The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P",   "tags": [],   "updated_at": "2026-07-24T15:00:09.396Z",   "owner": "adom",   "slug": "hero-studio",-  "aiThread": "hero wizard dogfood"+  "aiThread": "pose-surface test",+  "org": "adom",+  "live": true  },  {   "type": "app",
doctor.mjs+12−8
@@ -162,7 +162,7 @@ export async function runChecks() {   // Desktop) when the container itself cannot run Chrome (#7). Needs the   // desktop relay answering plus a proxy URL the host can reach the studio on.   let pupOk = false;-  const proxied = !!process.env.VSCODE_PROXY_URI;+  const proxied = !!(process.env.HERO_STUDIO_URL || process.env.VSCODE_PROXY_URI);   // On a desktop there is no container and no host to fall back to: the   // local renderer already runs on this machine. The leg is reported as not   // applicable rather than probed (and never as a failure).@@ -172,17 +172,21 @@ export async function runChecks() {   } else {   // Post-rename boxes answer via adom-bridge-cli with pup_* verbs (#31); the   // adapter resolves whichever generation this box has.-  const { makeBridge } = await import('./bridge.mjs');-  const bridge = await makeBridge(process.env.ADOM_TARGET || '');-  const ad = await bridge.call('status', {}, 12000);-  const adAnswered = ad.ok && !ad.out.includes('"error"') && !ad.out.includes('_adom_use_cli_instead');+  // ping is a core verb every desktop answers; a bridge's own status verb+  // (pup_status, or whatever another bridge is named) says nothing about+  // whether the desktop is reachable. The caller identity rides the call.+  const { makeBridge, bridgeTrouble } = await import('./bridge.mjs');+  const bridge = await makeBridge(process.env.ADOM_TARGET || '', process.env.ADOM_AI_THREAD || 'hero-studio doctor');+  const ad = bridge.bin === 'adom-desktop' ? await bridge.call('status', {}, 12000) : await bridge.core('ping', undefined, 12000);+  const trouble = bridgeTrouble(ad);+  const adAnswered = !trouble;   if (adAnswered && proxied) {     pupOk = true;-    pass('pup fallback', bridge.generation + ' answers (' + bridge.verbs.status + '); the host browser can render');+    pass('pup fallback', bridge.generation + ' answers ping; the host browser can render');   } else {     fail('pup fallback', !adAnswered-      ? 'the desktop bridge did not answer (' + bridge.generation + ', ' + bridge.verbs.status + '); no host relay from ' + PLAT.where()-      : 'VSCODE_PROXY_URI is not set, so the host browser cannot reach the studio',+      ? 'the desktop bridge did not answer ping (' + bridge.generation + ': ' + trouble + '); no host relay from ' + PLAT.where()+      : 'neither HERO_STUDIO_URL nor VSCODE_PROXY_URI is set, so the host browser cannot reach the studio',       'optional when the local renderer works; otherwise start the desktop bridge app on the host and retry');     checks[checks.length - 1].optional = true;   }
package.json+2−2
@@ -2,7 +2,7 @@   "slug": "hero-studio",   "title": "Hero Studio",   "type": "app",-  "version": "0.23.5",+  "version": "0.24.0",   "description": "The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.",   "license": "MIT",   "tags": [@@ -68,7 +68,7 @@     "test:render": "node test/render-view.mjs",     "test:renderer": "node test/renderer.mjs",     "test:syntax": "node test/syntax.mjs",-    "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/circuit-traces.mjs",+    "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/circuit-traces.mjs",     "test:traces": "node test/circuit-traces.mjs",     "prepublishOnly": "node test/syntax.mjs",     "test:platform": "node test/platform.mjs"
page.json+2−2
@@ -2,7 +2,7 @@   "slug": "hero-studio",   "title": "Hero Studio",   "type": "app",-  "version": "0.23.5",+  "version": "0.24.0",   "description": "The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.",   "license": "MIT",   "tags": [@@ -68,7 +68,7 @@     "test:render": "node test/render-view.mjs",     "test:renderer": "node test/renderer.mjs",     "test:syntax": "node test/syntax.mjs",-    "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/circuit-traces.mjs",+    "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/circuit-traces.mjs",     "test:traces": "node test/circuit-traces.mjs",     "prepublishOnly": "node test/syntax.mjs",     "test:platform": "node test/platform.mjs"
platform.cjs+12
@@ -28,6 +28,17 @@ function inContainer() {   return !!process.env.VSCODE_PROXY_URI || fs.existsSync(CONTAINER_TOKEN_FILE); } +/// The URL another machine (the human's browser, the host renderer) reaches+/// the studio on: HERO_STUDIO_URL (pose --url sets it; a port mapping for a+/// terminal session with no VS Code proxy) wins, else the VS Code proxy+/// template. {{port}} is filled in. null when neither is set.+function studioUrl(port) {+  const raw = process.env.HERO_STUDIO_URL || process.env.VSCODE_PROXY_URI || '';+  if (!raw) return null;+  const u = raw.replace('{{port}}', String(port));+  return u.endsWith('/') ? u : u + '/';+}+ function where() {   return inContainer() ? 'this container' : 'this machine'; }@@ -146,6 +157,7 @@ function openUrlCommand(url) { }  module.exports = {+  studioUrl,   IS_WIN, IS_MAC, CONTAINER_TOKEN_FILE,   homeDir, inContainer, where, whereIn, configDir,   wikiIdentity, authHeader,
pose.mjs+63−24
@@ -7,16 +7,18 @@ // this and waits; it cannot continue without a human-made image. // // Exit codes: 0 generated, 2 timeout (no human generated), 1 setup error,-// 3 pup failed with --no-fallback set (default: diagnosed webview fallback so-// the gate still reaches the human), 4 POSE_BUSY (same page mid-gate; use-// --steal / --port).+// 3 the surface could not be opened and --no-fallback was set (the gate is+// closed again), 4 POSE_BUSY (same page mid-gate; use --steal / --port).+// Without --no-fallback a failed pup open falls back to the desktop's default+// browser, and when nothing opens, pose prints the studio URL and keeps+// waiting: the gate stays open for whoever opens that URL. import { execFile, spawn } from 'child_process'; import { fileURLToPath } from 'url'; import path from 'path'; import os from 'os'; import fs from 'fs'; import { runChecks, printReport, hintLine } from './doctor.mjs';-import { makeBridge } from './bridge.mjs';+import { makeBridge, bridgeTrouble } from './bridge.mjs';  const DIR = path.dirname(fileURLToPath(import.meta.url)); let BASE = 'http://localhost:8846/';@@ -65,6 +67,23 @@ if (surface !== 'webview' && surface !== 'pup' && surface !== 'browser') { const [owner, slug] = ref.split('/'); const timeoutSecs = Number(flags.timeout || 900); +// The URL the human's machine reaches the studio on. A VS Code terminal has+// the proxy template; a plain terminal on a cloud container does not, and+// takes --url (a port mapping for the studio's port). Checked before anything+// is posed, so a refusal here leaves no gate open behind it.+if (flags.url && typeof flags.url === 'string') process.env.HERO_STUDIO_URL = flags.url;+const URL_FIXED = !!process.env.HERO_STUDIO_URL && !process.env.HERO_STUDIO_URL.includes('{{port}}');+if (surface !== 'browser' && !process.env.HERO_STUDIO_URL && !process.env.VSCODE_PROXY_URI) {+  console.error('ERROR [NO_CONTAINER_PROXY]: no URL the ' + surface + ' surface can open: VSCODE_PROXY_URI is not set (a terminal outside VS Code)');+  console.error('  and no --url was given. Nothing was posed.');+  console.error('  In a cloud container, map the studio port and pass the mapping (it is a public URL; remove it afterwards):');+  console.error('    adom-cli carbon containers port-add <container-slug> --port 8846');+  console.error('    hero-studio --ai-thread "' + AI_THREAD + '" pose ' + ref + ' --surface ' + surface + ' --url https://<mapping>/ --target <machine>');+  console.error('    adom-cli carbon containers port-remove <container-slug> ...   # when the hero is saved');+  console.error('  On a desktop with no container, --surface browser opens the studio in the default browser instead.');+  process.exit(1);+}+ // 0. PREFLIGHT: prove the renderer works BEFORE a human is summoned. Without // this, the human walks the full checklist, clicks Generate, and only then // learns the container cannot render (light Hydrogen Desktop images ship no@@ -121,7 +140,8 @@ const sh = (cmd, a, timeout = 20000) => new Promise((res) => { // a free port so this pose can never clobber another thread's half-reviewed // checklist. let port = Number(flags.port || process.env.HERO_STUDIO_PORT || 8846);-let portPinned = Boolean(flags.port || process.env.HERO_STUDIO_PORT);+// A --url without {{port}} reaches exactly one port, so the studio must be there.+let portPinned = Boolean(flags.port || process.env.HERO_STUDIO_PORT || URL_FIXED); const INSTANCES_DIR = path.join(os.homedir(), '.adom', 'instances', 'hero-studio'); const THREAD_SLUG = AI_THREAD.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 60) || 'unnamed'; if (!portPinned) {@@ -369,13 +389,22 @@ if (!(samePageRepose && !('fresh-showcase' in flags))) { // 3. open the studio IN FRONT OF THE HUMAN on the surface they actually use. // In a container the studio is reached through the VS Code proxy; on a // desktop it is simply http://127.0.0.1:<port>/ and any browser opens it.-const proxyBase = process.env.VSCODE_PROXY_URI-  ? process.env.VSCODE_PROXY_URI.replace('{{port}}', String(port))-  : 'http://127.0.0.1:' + port + '/';-if (!process.env.VSCODE_PROXY_URI && surface !== 'browser') {-  console.error('ERROR [NO_CONTAINER_PROXY]: VSCODE_PROXY_URI is not set, so there is no ' + surface + ' surface to open here.');-  console.error('  On a desktop, re-run with --surface browser (opens ' + proxyBase + ' in the default browser).');-  process.exit(1);+const PLATS = (await import('module')).createRequire(import.meta.url)('./platform.cjs');+const proxyBase = PLATS.studioUrl(port) || 'http://127.0.0.1:' + port + '/';+// When no surface could be opened: with --no-fallback, close the gate this+// pose opened and exit 3; otherwise print the URL and keep waiting, since the+// gate works from any browser that reaches it.+let surfaceFailed = false;+async function surfaceGaveUp(why) {+  if ('no-fallback' in flags) {+    try { await jf('state', { method: 'POST', body: JSON.stringify({ verify: false, tour: false }) }); } catch {}+    console.error('  --no-fallback: the gate for ' + ref + ' is closed again; re-run pose once the cause is fixed.');+    process.exit(3);+  }+  surfaceFailed = true;+  console.error('');+  console.error('NOT OPENED [' + why + ']: no surface showed the studio. The gate is open and this command keeps waiting:');+  console.error('  open ' + proxyBase + ' in any browser the human uses, review, and click Generate.'); } let tabName = port === 8846 ? 'Hero Studio' : 'Hero Studio :' + port; const SESSION = port === 8846 ? 'hero-studio' : 'hero-studio-' + port;@@ -404,21 +433,31 @@ if (surface === 'pup') {     }   }   if (!looksOk(opened)) {-    // hero-studio#12: NO silent webview fallback. The user asked for pup;-    // landing them on a surface they didn't ask for (and fighting the-    // never-both-surfaces rule) is worse than failing with the reason.-    console.error('ERROR [PUP_OPEN_FAILED]: could not open the studio on the pup surface. What each step actually said:');+    console.error('WARNING [PUP_OPEN_FAILED]: could not open the studio in a pup window. What each step actually said:');     for (const [name, r] of steps) {       const detail = (r.fail ? r.fail + '; ' : '') + (r.out || r.errOut || '(no output)').trim().slice(0, 300);       console.error('  ' + name + ': ' + detail.replace(/\n/g, ' '));     }-    console.error('  likely causes: the Adom Desktop app is not running / the relay is down / the verb was');-    console.error('  refused (approval or caller-identity gate; see the adom-desktop-permissions skill) /');-    console.error('  a cold profile outliving every timeout.');-    console.error('  Fix the cause and re-run, or re-run with --surface webview if the human agrees.');-    process.exit(3);+    const trouble = steps.map(([, r]) => bridgeTrouble(r)).find((x) => x.includes('--target'));+    if (trouble) console.error('  ' + trouble);+    // The same desktop, the human's own default browser: still in front of+    // them, and a core verb every desktop answers. Never the webview (the+    // never-both-surfaces rule), and said out loud so nobody is surprised.+    let fellBack = false;+    if (!('no-fallback' in flags) && bridge.bin !== 'adom-desktop') {+      const d = await bridge.core('desktop_open_url', { url: proxyBase }, 30000);+      if (!bridgeTrouble(d)) {+        fellBack = true;+        tabName = 'default browser';+        console.error('OPENED [DESKTOP_BROWSER]: the studio is open in the default browser on ' + (AD_TARGET || 'the desktop') + ' instead (desktop_open_url).');+      } else {+        console.error('  desktop_open_url: ' + bridgeTrouble(d));+      }+    }+    if (!fellBack) await surfaceGaveUp('PUP_OPEN_FAILED');+  } else {+    await bridge.call('alert_window', { sessionId: SESSION });   }-  await sh('adom-desktop', ['browser_alert_window', JSON.stringify({ sessionId: SESSION })]); } else if (surface === 'browser') {   // The system default browser (start / open / xdg-open). The URL is printed   // either way, so a human can paste it if no browser opens.@@ -446,7 +485,7 @@ async function openWebview() {     if (existing) { tabName = existing.name; panelId = existing.panelId; }     else if (anyWebview) panelId = anyWebview.panelId;   } catch {}-  if (!panelId) { console.error('no webview pane found to open the studio in'); process.exit(1); }+  if (!panelId) { console.error('no Hydrogen webview pane found to open the studio in'); await surfaceGaveUp('NO_WEBVIEW_PANE'); return; }   await sh('adom-cli', ['hydrogen', 'webview', 'open-or-refresh', '--name', tabName, '--url', proxyBase, '--panel-id', panelId]);   await sh('adom-cli', ['hydrogen', 'webview', 'set-proxy', 'false', '--name', tabName]); }@@ -496,7 +535,7 @@ if (!(state.showcase && state.showcase.src)) {  // 4. block until a HUMAN clicks Generate (a new _gen seq) const baseline = (state._gen && state._gen.seq) || 0;-console.error('studio open (' + surface + ', :' + port + ', tab "' + tabName + '"), posed for ' + ref + '. Waiting for a human to click Generate (timeout ' + timeoutSecs + 's)...');+console.error((surfaceFailed ? 'studio NOT opened on a surface; waiting at ' + proxyBase : 'studio open (' + surface + ', :' + port + ', tab "' + tabName + '")') + ', posed for ' + ref + '. Waiting for a human to click Generate (timeout ' + timeoutSecs + 's)...'); const deadline = Date.now() + timeoutSecs * 1000; while (Date.now() < deadline) {   await new Promise((r) => setTimeout(r, 2000));
renderer-paths.cjs+2−2
@@ -165,7 +165,7 @@ function chromeMissingWhy() { function quickStatus() {   const pptr = puppeteerPath();   const chrome = chromePath();-  const proxied = !!process.env.VSCODE_PROXY_URI;+  const proxied = !!(process.env.HERO_STUDIO_URL || process.env.VSCODE_PROXY_URI);   return {     local: {       ok: !!(pptr && chrome),@@ -174,7 +174,7 @@ function quickStatus() {       why: !pptr ? 'puppeteer-core not found' : (!chrome ? chromeMissingWhy() : null),       fix: !pptr ? puppeteerInstallCommand() : (!chrome ? chromeInstallCommand() : null),     },-    pup: { ok: proxied, why: proxied ? null : 'VSCODE_PROXY_URI is not set, so the host browser cannot reach the studio' },+    pup: { ok: proxied, why: proxied ? null : 'neither HERO_STUDIO_URL nor VSCODE_PROXY_URI is set, so the host browser cannot reach the studio' },     checkedAt: Date.now(),   }; }
server.js+2−2
@@ -1582,12 +1582,12 @@ function route(req, res, url, p) {     if (pinned !== 'pup' && (pinned === 'local' || !localKnownDead)) {       attempts.push({ script: 'render-hero.mjs', url: 'http://localhost:' + PORT + '/?render=1', label: 'local', timeout: 60000 });     }-    const proxyBase = (process.env.VSCODE_PROXY_URI || '').replace('{{port}}', String(PORT));+    const proxyBase = PLAT.studioUrl(PORT) || '';     if (pinned !== 'local' && proxyBase) {       attempts.push({ script: 'render-pup.mjs', url: proxyBase + (proxyBase.endsWith('/') ? '' : '/') + '?render=1', label: 'pup', timeout: 150000 });     }     if (!attempts.length) {-      return finish({ ok: false, error: 'no renderer available (pinned to pup but VSCODE_PROXY_URI is not set)', hint: 'drop the renderer pin or run inside a proxied workspace' });+      return finish({ ok: false, error: 'no renderer available (pinned to pup but neither HERO_STUDIO_URL nor VSCODE_PROXY_URI is set)', hint: 'drop the renderer pin, or give the host a URL it can reach the studio on (pose --url <port-mapping URL>)' });     }     const failures = [];     const runRender = (a, cb) => {