← Commit history

Publish 0.24.2

Colby Knox ·1035f827a6 · ·parent 1aa4ab4
7 files changed +65−39
SKILL.md+13−1
@@ -213,9 +213,21 @@ or timed-out gate never destroys a staged full-hero import); --fresh-showcase starts clean. With multiple Adom Desktops on one relay, pass --target <name> (or set ADOM_TARGET); it rides every desktop call including the pup renderer. Every verb takes `--port N` (or HERO_STUDIO_PORT) to target an instance; the tab is named-"Hero Studio :PORT" for non-default instances. `--type` takes a comma list+"Hero Studio :PORT" for non-default instances, and a pose opens its own port's+tab (beside the other studio tabs), never another instance's. `--type` takes a comma list for multi-type pages (app,service renders a clustered pill group). +ONE STUDIO PER THREAD: the instance registry holds one studio per `--ai-thread`+name. A pose with `--port` for another port while that thread's studio is live+refuses at once with POSE_THREAD_HAS_STUDIO (exit 1), naming the live port: pose+there, stop it, or run the parallel pose under its own thread name.++BIND: the server binds `0.0.0.0` plus a separate IPv6-only `::` socket on the+same port, so Hydrogen's IPv4 proxy reaches it under WSL2 mirrored networking+(a bare dual-stack bind was refused there, os error 10061) and `localhost`+still works inside the container. `--host <addr>` (or HERO_STUDIO_HOST) binds+that one address instead.+ `--surface` is REQUIRED: check the user's stored preference first with `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
bin/hero-studio+1−1
@@ -37,7 +37,7 @@ Every verb takes the global flag --ai-thread "<name>" FIRST (or env ADOM_AI_THREAD on single-agent boxes): the settled platform term for which conversation is calling. State-changing verbs refuse without it. -  hero-studio --ai-thread "<name>" [start]   start the server (--port <n>|auto, --ttl <hours>, --keep-alive)+  hero-studio --ai-thread "<name>" [start]   start the server (--port <n>|auto, --host <addr>, --ttl <hours>, --keep-alive)   hero-studio pose <owner/slug> --surface webview|pup                                        open the pose gate and block for approval         [--title T] [--brief B] [--type app|skill|component[,more]]
data/pages.json+4−23
@@ -1,18 +1,4 @@ [- {-  "type": "app",-  "title": "Adom 3D Viewer",-  "author": "",-  "score": 0,-  "stars": 0,-  "installs30d": 0,-  "brief": "Babylon 9 viewer for PCB and part GLBs: layers, exploded views, tooltips, in-model lights",-  "tags": [],-  "updated_at": "2026-09-22T15:04:37.093Z",-  "owner": "adom",-  "slug": "adom-3d-viewer",-  "aiThread": "cli-thread hero refresh"- },  {   "type": "skill",   "title": "Adom brand",@@ -144,14 +130,12 @@   "score": 0,   "stars": 0,   "installs30d": 0,-  "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",+  "brief": "The hero-image lab with a human gate: pose, generate, provenance-stamped.",   "tags": [],   "updated_at": "2026-07-24T15:00:09.396Z",   "owner": "adom",   "slug": "hero-studio",-  "aiThread": "pose-surface test",-  "org": "adom",-  "live": true+  "aiThread": "hero wizard dogfood"  },  {   "type": "app",@@ -334,7 +318,7 @@   "score": 510,   "stars": 1,   "installs30d": 77,-  "brief": "The Adom Wiki CLI: publish and install packages with verified signatures, cut releases, open PRs and discussions, and discover and administer the wiki, all from your terminal. Replaces adompkg.",+  "brief": "The official CLI for the Adom Wiki: publish, install, releases, issues, discovery, admin.",   "tags": [    "cli",    "wiki",@@ -343,10 +327,7 @@   ],   "updated_at": "2026-07-17T15:21:36.819Z",   "owner": "adom",-  "slug": "adom-wiki-cli",-  "aiThread": "desk-test3",-  "org": "adom",-  "live": true+  "slug": "adom-wiki-cli"  },  {   "owner": "adom",
package.json+2−2
@@ -2,7 +2,7 @@   "slug": "hero-studio",   "title": "Hero Studio",   "type": "app",-  "version": "0.24.1",+  "version": "0.24.2",   "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/pose-surface.mjs && node test/batch.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/bind-and-tabs.mjs && node test/batch.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.24.1",+  "version": "0.24.2",   "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/pose-surface.mjs && node test/batch.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/bind-and-tabs.mjs && node test/batch.mjs && node test/circuit-traces.mjs",     "test:traces": "node test/circuit-traces.mjs",     "prepublishOnly": "node test/syntax.mjs",     "test:platform": "node test/platform.mjs"
pose.mjs+25−8
@@ -144,14 +144,27 @@ let port = Number(flags.port || process.env.HERO_STUDIO_PORT || 8846); 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';+// This thread's live studio, if any: the registry holds one per thread.+let mine = null;+try {+  const m = JSON.parse(fs.readFileSync(path.join(INSTANCES_DIR, THREAD_SLUG + '.json'), 'utf8'));+  process.kill(m.pid, 0);+  mine = m;+} catch {}+if (portPinned && mine && Number(mine.port) !== port) {+  // A studio started here would see this thread's registry entry and exit+  // in favor of it, so the pose would only time out waiting for :port.+  console.error('ERROR [POSE_THREAD_HAS_STUDIO]: thread "' + AI_THREAD + '" already runs a studio on :' + mine.port + ' (posing ' + (mine.task || 'nothing') + '); a thread holds one studio at a time.');+  console.error('  Options: pose there (drop --port); stop it first (hero-studio --ai-thread "' + AI_THREAD + '" stop --port ' + mine.port + ');');+  console.error('  or run the parallel pose under its own thread name (hero-studio --ai-thread "<other name>" pose ' + ref + ' --port ' + port + ' ...).');+  process.exit(1);+} if (!portPinned) {-  try {-    const mine = JSON.parse(fs.readFileSync(path.join(INSTANCES_DIR, THREAD_SLUG + '.json'), 'utf8'));-    process.kill(mine.pid, 0);-    port = mine.port;+  if (mine) {+    port = Number(mine.port);     portPinned = true;     console.error('note: reusing this thread\'s live studio on :' + port + ' (started ' + mine.startedAt + '); hero-studio ls shows all instances');-  } catch {}+  }   try {     for (const f of fs.readdirSync(INSTANCES_DIR)) {       if (!f.endsWith('.json') || f === THREAD_SLUG + '.json') continue;@@ -480,10 +493,14 @@ async function openWebview() {   let panelId = null;   try {     const tabs = JSON.parse(tabsRaw).tabs || [];-    const existing = tabs.find((t) => (t.name || '').includes('Hero Studio'));+    // This port's own tab ("Hero Studio" for 8846, "Hero Studio :<port>"+    // otherwise). Another instance's tab is never reused: pointing it here+    // would take that studio's gate away from its human. A new tab goes in+    // the pane that already holds a studio, else any webview pane.+    const own = tabs.find((t) => t.name === tabName);+    const sibling = tabs.find((t) => /^Hero Studio( :\d+)?$/.test(t.name || ''));     const anyWebview = tabs.find((t) => t.name !== 'Visual Studio Code');-    if (existing) { tabName = existing.name; panelId = existing.panelId; }-    else if (anyWebview) panelId = anyWebview.panelId;+    panelId = (own || sibling || anyWebview || {}).panelId || null;   } catch {}   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]);
server.js+18−2
@@ -22,6 +22,15 @@ const crypto = require('crypto'); const portArg = process.argv.indexOf('--port'); const portRaw = String((portArg >= 0 && process.argv[portArg + 1]) || process.env.HERO_STUDIO_PORT || 8846); let PORT = portRaw === 'auto' ? 0 : Number(portRaw);+// Bind address: --host flag > HERO_STUDIO_HOST env > 0.0.0.0. A bare+// listen(port) binds the dual-stack IPv6 wildcard, which WSL2 mirrored+// networking reaches from Windows over IPv6 only, so Hydrogen's IPv4 proxy+// was refused (os error 10061). The default binds IPv4 explicitly and adds a+// separate IPv6-only socket, so `localhost` (::1 first under Node 18) still+// reaches the studio from inside the container.+const hostArg = process.argv.indexOf('--host');+const HOST_GIVEN = (hostArg >= 0 && process.argv[hostArg + 1]) || process.env.HERO_STUDIO_HOST || '';+const HOST = HOST_GIVEN || '0.0.0.0';  // The ai-thread name (#39, the settled platform term: see the // app-creator-ai-thread-name skill): required at start, self-reported@@ -1785,9 +1794,16 @@ try { } catch {}  refreshRenderer();-server.listen(PORT, () => {+server.listen(PORT, HOST, () => {   PORT = server.address().port;+  // The IPv6 side of the default bind, on the same port. Best effort: a host+  // without IPv6, or the port held there by something else, leaves IPv4 only.+  if (!HOST_GIVEN) {+    const v6 = http.createServer((req, res) => server.emit('request', req, res));+    v6.on('error', () => {});+    v6.listen({ port: PORT, host: '::', ipv6Only: true });+  }   writeRegistry();-  console.log('hero-studio on ' + PORT + ' (thread "' + AI_THREAD + '", ttl ' + (KEEP_ALIVE ? 'off' : TTL_HOURS + 'h') + ')');+  console.log('hero-studio on ' + HOST + ':' + PORT + (HOST_GIVEN ? '' : ' and [::]:' + PORT) + ' (thread "' + AI_THREAD + '", ttl ' + (KEEP_ALIVE ? 'off' : TTL_HOURS + 'h') + ')'); });