@reticlehq/browser is the half of Reticle that lives in your app. It installs the observers, builds semantic snapshots, executes actions, and talks to the bridge.
Version 2.8.0. Apache 2.0. Depends on @reticlehq/core and @testing-library/dom.
Why it exists
This is what makes Reticle different from a browser-automation tool. Because it runs inside the app rather than driving it from outside, it can see a state mutation and a fired signal, not just a rendered pixel. It never imports a Node API; that boundary is enforced by the dependency graph.@testing-library/dom is why reticle_query speaks role, label and testid instead of CSS selectors.
When you need it directly
Install it yourself when you are not on React, or when you wantconnect() under your own control. React users install @reticlehq/react instead, which re-exports everything here.
The reticle singleton
One instance, memoized on globalThis so hot module replacement does not create a second one.
Everything else on the class is private.
Reticle itself is exported for typing.
ReticleConnectOptions
Every field is optional.
Capabilities
Declaring a capability surface is what lets an agent discover what your app can do without guessing.getCapabilities(), hasCapabilities(), setCapabilitiesListener(cb?), and the Capabilities, CapabilitiesInput and CapabilityFlow types.
State adapters
Register a store and its contents become readable throughreticle_state.
registerStore, unregisterStore, storeNames, readStores, readStoresWithTruncation.
Ready-made adapters ship for TanStack Query, Jotai, XState, Valtio, MobX, Recoil, Svelte, Pinia, and a plain push store: tanstackQueryStore, jotaiStore, xstateStore, valtioStore, mobxStore, recoilStore, svelteStore, piniaStore, pushStore.
Framework adapters
registerAdapter, identifyComponent, readComponentState, elementHasHoverHandlers, adapterNames, with the ReticleAdapter, ComponentInfo and ComponentSource types. @reticlehq/react registers the React one.
Lower-level building blocks
Exported because the server and the test runner use them, and because an integration may need them:buildSnapshot, matchQuery, runQuery, executeAction, executeSequence, describe, getRole, getAccessibleName, getStates, isVisible, refs, RefRegistry, setIgnoreSelectors, Annotator, installAnnotator, resolveMarkAnchor, inspectChart, canvasChartData.
Signal helpers: createReticleEmitter, commitAndSignal, registerReticleDomain.
Instrumenting an app properly
Signals, stores, and what makes evidence strong rather than circumstantial.