skill
adom-cli
Public Made by Adomby adom
Adom CLI — platform binary for containers, repos, workspaces, orgs, SSH keys, Hydrogen settings, and more
← Commit history
4.3.14: adom-cli 0.7.13 (hydrogen webview drive, adom/wiki#222)
4 files changed
+48−2
adom-cli⋯ 1 unchanged line ⋯
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-cli",- "version": "4.3.13",+ "version": "4.3.14", "type": "app", "org": "adom", "description": "Adom CLI \u2014 platform binary for containers, repos, workspaces, orgs, SSH keys, Hydrogen settings, and more",
page.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-cli",- "version": "4.3.13",+ "version": "4.3.14", "type": "app", "org": "adom", "description": "Adom CLI — platform binary for containers, repos, workspaces, orgs, SSH keys, Hydrogen settings, and more",
skills/adom-cli/workspace/SKILL.md+46@@ -208,6 +208,52 @@ adom-cli hydrogen webview open-or-refresh \ Response includes `"action": "created"` or `"action": "refreshed"` so you know which path ran. If the tab was closed, the next call recreates it (requires `--panel-id` again). +### Drive a wiki page the tab is showing (0.7.13+)++Every wiki.adom.inc page exposes `window.adomWiki`: load and frame viewers,+move the 3D camera, turn datasheet pages, set widget states, scroll to a+section. Use it for demos and checks instead of clicking screen+coordinates. Each call waits until the thing is on screen, then prints the+page's answer as JSON. Full reference: git-wiki `docs/drive-api.md`.++```bash+adom-cli hydrogen webview drive --name STM32 ready --viewer 3d # load the model, wait until it has rendered+adom-cli hydrogen webview drive --name STM32 camera '["front",{"seconds":2}]' --viewer 3d+adom-cli hydrogen webview drive --name STM32 orbit '[{"degrees":360,"seconds":6}]' --viewer 3d+adom-cli hydrogen webview drive --name STM32 page '[3]' --viewer datasheet+adom-cli hydrogen webview drive --name LED set '["on"]' --widget adom-states+adom-cli hydrogen webview drive --name STM32 scrollTo '["datasheet"]'+adom-cli hydrogen webview drive --name STM32 state # what is loaded, camera, page, scroll+adom-cli hydrogen webview drive --name STM32 viewers.list # which viewers this page has+```++- **Two lanes, one verb.** `--name` (or `--panel-id`/`--tab-id`) drives a+ Hydrogen webview: the call goes into the frame as a named message and+ needs a Hydrogen build with the `postMessage` panel action. `--pup+ <sessionId>` drives a pup window through `adom-bridge pup_eval` and works+ on any wiki build with `window.adomWiki`. Pass `--ai-thread` (or set+ `ADOM_AI_THREAD`) to the thread that opened the pup window, and+ `--target <machine>` when several desktops are connected.+- **Methods are a fixed list.** Page: `page`, `state`, `sections`,+ `scrollTo`, `hold`, `viewers.list`, `viewers.loadAll`,+ `viewers.unloadAll`. With `--viewer <kind> [--index N]` or `--widget+ <name>`: `status`, `load`, `unload`, `ready`, `camera`, `orbit`,+ `stateGroups`, `setStateGroup`, `layers`, `setLayer`, `page`+ (datasheet), `state` and `set` (widgets). Anything else is refused+ before it is sent.+- **Arguments** are a JSON array (`'["front",{"seconds":2}]'`); a lone value+ is one argument (`page 3`). Camera views: `home`, `fit`, `front`,+ `back`, `left`, `right`, `top`, `bottom`, or `{alpha, beta, radius}`.+- **Timeouts** default to 90 s for `ready`/`load`, the animation plus 15 s+ for `camera`/`orbit`, 30 s otherwise; `--timeout 2m` overrides.+- **Errors** exit 1 with the page's own words, e.g. `no adom-states on this+ page (have: 3d, symbol, footprint, datasheet)`, plus a `_hint`. "can't+ relay messages to webviews yet" means this Hydrogen lacks the panel+ action: use `--pup`. "no reply from the page" means an older wiki build,+ a tab that is not a wiki page, or a host the wiki does not answer.+- A pup window behind other windows is fine: any call holds the page's+ viewers loaded for 10 minutes.+ ### Say how to restart a page you serve yourself (0.7.9+) — Windows Hydrogen only **Windows Hydrogen 1.0.430+ only.** Cloud Hydrogen and macOS Hydrogen have no