@triggery/devtools-bridge
Page-side bridge that makes a Triggery runtime observable to external tools — the Chrome extension, a future standalone web panel, custom inspectors, anything that can listen to window.postMessage. Framework-agnostic, zero runtime dependencies, returns a no-op in Node / SSR.
Install
Section titled “Install”pnpm add @triggery/core @triggery/devtools-bridge npm install @triggery/core @triggery/devtools-bridge yarn add @triggery/core @triggery/devtools-bridge bun add @triggery/core @triggery/devtools-bridge Peer deps: @triggery/core.
What’s inside
Section titled “What’s inside”| Export | Purpose |
|---|---|
installDevtoolsBridge(runtime) | Attach the page-side bridge to a runtime. Returns a dispose() callback. |
Quick example
Section titled “Quick example”That’s it. The bridge:
- Exposes a discovery handle on
window.__triggery_devtools__so tools can detect the runtime. - Broadcasts a
triggery:hellopostMessagewith the currentgraph()+ inspector buffer. - Subscribes to the runtime and broadcasts a
triggery:snapshotfor every new run. - On
dispose(), removes the discovery handle and broadcasts atriggery:bye.
In Node / SSR installDevtoolsBridge returns a no-op disposer.
Wire format
Section titled “Wire format”Related packages
Section titled “Related packages” @triggery/core The runtime this bridge attaches to.
@triggery/devtools-panel In-app inspector React components.
@triggery/devtools-redux Stream runtime events into the Redux DevTools extension.