@causlts/devtools-bridge
v0.1.2
Published
Internal: bridges Causl commits to the Redux DevTools Extension protocol. SPEC §13 defers 'devtools as a shippable product'; this package realises §11 inspection primitives end-to-end and is held private until either a downstream UI earns its place or §13
Downloads
9
Readme
@causlts/devtools-bridge
Bridges Causl commits to the Redux DevTools Extension
protocol. Zero-cost when the extension is absent — connectDevtools short-circuits before
allocating any subscription or observer.
Internal / not independently published. Per SPEC §13 this package is held private until a downstream UI earns its place or §13 is amended; it realises the §11 inspection primitives end-to-end. The public inspection surface adopters reach for is
@causlts/devtools.
Install
pnpm add @causlts/devtools-bridgeUse
import { createCausl } from '@causlts/core'
import { connectDevtools, isExtensionAvailable } from '@causlts/devtools-bridge'
const graph = createCausl()
// No-op (and allocates nothing) when the extension is not installed.
const disconnect = connectDevtools(graph, { name: 'my-app' })
// disconnect() when you tear the graph down.Each Commit forwarded to the panel becomes a Redux action of the form
{ type: intent, payload: { changedNodes } } paired with a graph.snapshot() for state
inspection. Time-travel monitor messages (JUMP_TO_STATE, IMPORT_STATE, ROLLBACK) project
state via graph.snapshotAt(t) — a read, never a mutation.
What this is NOT
- Not a standalone DevTools UI — it speaks the existing Redux DevTools Extension protocol.
- Not required at runtime — when the extension is absent it does nothing and tree-shakes cleanly.
