grip-dev
The shared library behind Grip — selectors, accessibility snapshots, pick history, and types used by the extension and MCP stack.
What it is
grip-dev is the foundation of the monorepo. It has no UI — just the logic other packages import: generating selectors, building accessibility snapshots, storing picks, and defining message types between extension parts.
If you're building on Grip or debugging selector behavior, this is the package to read.
Main APIs
generateSelector— stable CSS selector for a DOM node (via@medv/finder)buildSnapshot— accessibility tree + ref map for agentstoStoredPick— serialize a pick for session historyGRIP_MCP_DOCS_URL— link opened when you click the yellow MCP chip in the UI
Used by @grip/devtools, the extension, and the playground — change core once, everything stays in sync.
Run tests
Core has unit tests for selectors, snapshots, and history helpers:
pnpm --filter grip-dev test