← Commit history
publish skill: document the Release-asset runtime flow (release create/upload, manifest->/download/, never /files blob) + skillpack deps:{}
1 file changed
+24−12
publish-skills/publishing-the-bridge/SKILL.md+24−12@@ -1,6 +1,6 @@ --- 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."+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 zip, publish it as a Release ASSET (release create + upload --platform any), point the manifest url at the /download/ path (never a /files blob), push source, and land it with refresh_bridges. Covers the two-artifact split (Release zip vs skills pkg), the skillpack package.json carrying dependencies:{} (empty, no runtime deps), the bridge.json contracts we declare (timeouts) and one we deliberately don't (detect), 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:@@ -9,8 +9,10 @@ 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.+1. **Runtime** — `bridge/` (server.js + bridge.json) zipped and published as a **Release asset**+ (`release create` + `release upload --platform any`), with a manifest on `/files` whose `url` points+ at the Release `/download/` path. AD streams it to `bridges-cache/native-browser/` and spawns it.+ (Node runtime is source-only; AD provisions Node — see the SDK "Runtime contract".) 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`.@@ -41,15 +43,25 @@ Deps: none (core `http`/`net`), so the payload is source-only (no `node_modules` 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`).+ `native-browser-bridge-v<ver>.bin` (the `.bin`/`.zip` extension is irrelevant for a **Release** asset —+ AD's manifest `url` is extension-agnostic; only the OLD `/files` base64 API rejected `.zip`).+3. **The runtime is a RELEASE ASSET, not a `/files` blob** (SDK "two-artifact" rule — fusion + pup do+ exactly this). Cut a Release for the bridge version + upload the zip:+ - `adom-wiki release create adom/adom-browser-extension <ver> --title "native-browser bridge runtime v<ver>"`+ - `adom-wiki release upload adom/adom-browser-extension <ver> native-browser-bridge-v<ver>.bin --platform any`+ The download then serves anon at `https://wiki.adom.inc/download/adom/adom-browser-extension/<ver>/native-browser-bridge-v<ver>.bin` (verify: `curl -sI` → 200). (The pkg's own release stays 0.3.x; the bridge release is 0.0.x — separate version streams on the same page, that's expected.)+4. **sha256 + byte size** → write `native-browser-bridge-manifest.json` with the `url` pointing at that+ **`/download/` path** (NOT a `/files` blob):+ `{manifest_version:1, version, url:"https://wiki.adom.inc/download/adom/adom-browser-extension/<ver>/native-browser-bridge-v<ver>.bin", sha256, size, released_at}`.+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 ...` (the manifest lives on `/files`; only the binary is off it).+6. **Land it:** `refresh_bridges {name:"native-browser"}` → verify `nbrowser_readiness` routes and+ `bridge_check_updates`/`bridge_list` show `liveVersion==<ver>` (no `staleProcess`). *(bridge_check_updates+ intermittently omits native-browser after an AD self-update — trust readiness + bridge_list.)*+7. **NEVER `repo rm` a runtime zip while the manifest still points at it.** The old `/files` `.bin` uploads+ are the dead anti-pattern (they piled up to 22 stale versions once) — do NOT re-add them. If any linger,+ migrate as a SEQUENCE: release-upload → repoint manifest → verify `/download/` serves → THEN delete the+ `/files` copies. The skillpack `package.json` (the pkg, not the zip) must carry `dependencies:{}` — the+ validator requires the field but it MUST be empty (no runtime deps land on a container). ## 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