← Commit history
Delete skills/publishing-the-bridge/SKILL.md
1 file changed
−79
skills/publishing-the-bridge/SKILL.mddeleted−79@@ -1,79 +0,0 @@-name: publishing-the-bridge-description: "PUBLISH skill for maintainers of the adom-browser-extension (native-browser) bridge - NOT for driving it. The exact, proven recipe to cut a release: bump versions in lockstep, build the .bin payload (never .zip - the wiki silently rejects it), upload via the base64 files API, POST the manifest, push source, and land it with refresh_bridges. Covers the bridge.json contracts we declare (timeouts) and one we deliberately don't (detect), the SKILLPACK skills-packaging layout, and the standing show-in-pup rule. Everyday users never need this."-user-invocable: false-Parent skill: **adom-browser-extension**. Maintainer-only skill (not user-invocable). Bridge SDK:-https://wiki.adom.inc/adom/adom-desktop-bridges--# Publishing the native-browser bridge--## What "the bridge" actually is (3 artifacts, 3 places)-1. **Runtime** — `bridge/` (server.js + bridge.json) shipped as a `.bin` payload + a manifest on the- wiki page. AD streams it to `bridges-cache/native-browser/` and spawns it.-2. **Skills pkg** — the `skills/<name>/SKILL.md`s, published via `adom-wiki pkg publish --org adom`,- installed into the container's `~/.claude/skills` + `~/.codex/skills`.-3. **Discovery** — `discovery_triggers` + `discovery_pitch` on `page.json`.--## bridge.json contracts we declare (and one we deliberately don't)-- **`timeouts`** (AD v1.9.79+): AD hard-caps every bridge verb at 60s unless you declare per-verb HTTP- budgets. Ours match the bridge's own `timeoutFor()` (`screenshot|record|fetch_url|input_dispatch` →- 120s) plus `wait` (blocks up to its 120s cap): `verbs {wait:125, fetch_url:120, input_dispatch:120}`- + `prefixes [{screenshot:120},{record:120}]`, `default:60`, and `statusVerb:"nbrowser_status"` (AD- returns `{stillRunning:true,statusVerb}` on its own timeout → caller polls). Keep the describe- `timeoutSeconds` in `server.js` aligned. Note: the adom-desktop **CLI has its own ~30s client- timeout**, separate from AD's bridge budget — you can't observe a >30s verb via a bare CLI call.-- **`detect` — intentionally OMITTED.** `detect` is for a HOST APP AD detects/gates. Native-browser- drives the user's REAL browser via the extension, so the authoritative "is it usable" signal is- **extension-connected** (`nbrowser_readiness`), not a browser binary on disk — and our read-only- verbs are always forwarded regardless. A single `hostApp:"Google Chrome"` would MISREPORT the common- Edge-only machine (verified real: ADOMBASELINE runs fine on Edge with no Chrome), and Edge is- universal on Windows so "browser installed" is near-zero signal. So we do NOT declare `detect`.--## Release the RUNTIME — the exact, proven sequence-Deps: none (core `http`/`net`), so the payload is source-only (no `node_modules`).--1. **Bump the version in THREE places, together** (they drift if you don't):- - `bridge/bridge.json` `version` (what AD reads + reports),- - `bridge/package.json` `version`,- - `bridge/BRIDGE_VERSION`.- `server.js` reads `VERSION` from `bridge.json` (authoritative) so it can't drift — keep it that way.- AD reads that same `version` off your `/status` JSON as `liveVersion`, so keep `/status` accurate.-2. **Build the zip with files at the ROOT** (there is no `zip` binary — use Python `zipfile`):- members = `bridge.json`, `package.json`, `server.js`, `BRIDGE_VERSION`. Name it- `native-browser-bridge-v<ver>.bin` (⚠ `.bin`, NOT `.zip` — the wiki SILENTLY rejects `.zip`- uploads: returns `ok:true, commit:null` and stores nothing).-3. **sha256 + byte size** → write `native-browser-bridge-manifest.json`- `{manifest_version:1, version, url:"native-browser-bridge-v<ver>.bin", sha256, size, released_at}`.-4. **Upload the `.bin`** via the base64 files API (repo push drops binaries):- `adom-wiki api -X POST /api/pages/adom/adom-browser-extension/files --body '{"files":[{"path":"...bin","content":"<b64>","encoding":"base64"}],...}'` (CLI `--body` cap ~128 KB; the ~28 KB zip is fine).-5. **Push manifest + source as TEXT** with `adom-wiki repo push adom-browser-extension --files native-browser-bridge-manifest.json bridge/bridge.json bridge/package.json bridge/server.js bridge/BRIDGE_VERSION ...`.-6. **Land it:** `refresh_bridges {name:"native-browser"}` → verify `bridge_check_updates` shows- `current==latest==<ver>, updateAvailable:false` AND `liveVersion==<ver>` (no `staleProcess`).--## Reaping is fixed (AD v1.9.76) — the old orphan trap is gone-Earlier, `refresh_bridges` could leave a stale PID serving old code (a node bridge doesn't lock the-cache dir, so a clean swap didn't reap). **AD v1.9.76 fixed this:** `refresh_bridges` now force-restarts-a running bridge after an update, `restart_bridge {name}` is a real verb (kill tracked+port-orphan +-respawn on the stable port), and `bridge_check_updates` surfaces `liveVersion` + `staleProcess`-directly. So: after a release, just `refresh_bridges` (or `restart_bridge` for an explicit restart) and-confirm `liveVersion` matches — no more digging in `host.json` or manual `taskkill`.-(`bridge_pause`/`bridge_resume` are a ROUTING gate only; they never kill the process.)--## Publish the SKILLS pkg — the SKILLPACK layout (the old dev-skills/ rule is DEAD)-`adom-wiki pkg publish --org adom`. **Every skill — user, dev, AND publish — is a real-`skills/<name>/SKILL.md`.** Scope dev/publish skills by AUDIENCE, not filename: frontmatter-`user-invocable: false` + a description that opens "DEVELOPER skill for maintainers…" so everyday users-are never offered them while maintainers still install the full set. List **every** skill path-EXPLICITLY (no globs) in `package.json` `files[]` AND `install.sh`/`uninstall.sh`. Deploy to BOTH-`~/.claude/skills` and `~/.codex/skills`. (The old "hide dev docs as `dev-skills/*.md` so they don't-ship" rule is dead as of the 2026-07-03 SDK update; pup migrated to this layout too.)--## Discovery-Edit `page.json` `discovery_triggers` (30+ user-task phrasings, login/forms niche — pup can't do-logins) + `discovery_pitch` (an INSTRUCTION). Push `page.json` **LAST** (a pkg publish clobbers it and-drops the hero). Verify: `adom-wiki discover preview --json "<7 real user queries>"` → land top-3.--## After ANY wiki change: show John in pup (standing rule)-Open the live page in a maximized pup window + shotlog + hand him the phone URL. Never just report-"published."