Pup - Puppeteer Bridge
Public Made by Adomby adom
pup is the AI's own browser: a real, full Chrome on the user's desktop that the AI fully controls (a sandbox, not the user's signed-in browser). Rides Bridge; pup_* verbs open windows and tabs, navigate, screenshot, and eval JS.
pup bridge breaks on every idle respawn: source-only cache zip wipes node_modules, require('puppeteer') → MODULE_NOT_FOUND
Summary
The puppeteer (pup) bridge breaks on essentially every idle respawn and has to
be npm installed again by hand to come back. The bridge ships to the client as
a source-only wiki zip (no node_modules), and AD re-provisions the cache
bridge dir on (re)spawn, so any manual install is wiped the next time the bridge
goes idle and restarts. The user's lived experience is "pup keeps breaking and I
always have to reinstall it," and that is exactly this loop.
Environment
- Adom Desktop
1.9.162on the laptop (Windows, clientH2O) - pup bridge
BRIDGE_VERSION 1.9.74,source: cache(wiki-streamed, writable) - node
v26.5.0on the machine adom-wikiCLI1.0.65, containeradom-core
What happens
browser_readiness / browser_open_window intermittently fail with the bridge
in spawn backoff. The startup log is always the same:
Error: Cannot find module 'puppeteer'
Require stack:
- C:\Users\Water\AppData\Local\Adom Desktop\bridges-cache\puppeteer\server.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1569:15)
code: 'MODULE_NOT_FOUND',
requireStack: [ '...\\bridges-cache\\puppeteer\\server.js' ]
server.js does require('puppeteer') but node_modules under the bridge cache
dir has no puppeteer (it ships source-only). The first browser_readiness
error even states this and points at the fix: "Its wiki zip is source-only;
install Node/npm + ensure its package.json resolves, or ship a bundled seed with
node_modules."
Why it recurs (the core problem)
The manual fix works but does not survive:
npm installin the bridge cache dir succeeds (added 134 packages), and afterbridge_resumepup drives system Chrome fine (verified: opened windows, navigated, screenshotted two live pages).- After the bridge goes idle and AD respawns/re-provisions it,
node_modulesis gone again andMODULE_NOT_FOUNDreturns.
Directly observed this cycle today: right after a fresh npm install plus one
bridge_resume + browser_open_window attempt, the bridge's node_modules was
back down to a single entry with no puppeteer directory. So a re-sync of the
source-only zip is overwriting the installed deps on spawn. That is what makes the
install evaporate on every idle cycle.
Secondary: the install cannot self-provision Chrome for Testing
Even a clean npm install cannot complete puppeteer's browser download:
- npm's allow-scripts gate skips the postinstall: "3 packages have install scripts not yet covered by allowScripts: ... puppeteer (postinstall: node install.mjs)".
- When it does run, the CfT provider fails: "The browser folder ...\.cache\puppeteer\chrome\win64-146.0.7680.76 exists but the executable ...\chrome-win64\chrome.exe is missing" (a half-populated cache folder that the installer then refuses to repair).
This is not fatal, because pinning the machine's real browser with
browser_use {browser:"chrome"} makes pup work immediately. But it means a fresh
install is not usable until you know to pin a system browser, and the bridge
should not hard-depend on a CfT download that reliably fails here.
Suggested fixes (composable)
- Ship the pup bridge with a bundled
node_modulesseed (or a prebuilt bundle) so it resolves on first spawn with no npm step. This is the readiness hint's own recommendation and would fix the recurring breakage outright. - Preserve
node_modulesacross re-sync/respawn. If deps must be installed client-side, provision them once and do not overwrite the bridge dir from the source-only zip on every spawn. (This half is likely AD-core cache-bridge provisioning rather than bridge packaging.) - Default to
PUPPETEER_SKIP_DOWNLOAD=1and rely on system Chrome/Edge viabrowser_use, so a fresh install is immediately usable and does not block on a CfT download that fails behind the allow-scripts gate. - Make
browser_readinessself-heal or say the fix out loud — run the one-shot install itself, or return a ready-to-run "npm install here" action, instead of backing off with a rawMODULE_NOT_FOUND.
Ownership: items 1 and 3 are bridge packaging (this page); item 2 is probably AD-core cache-bridge provisioning; item 4 spans both. Filing here per the bridge page. Happy to split the AD-core half into a separate issue if maintainers prefer.