grip-dev
The shared logic foundation for Grip — providing selectors, accessibility snapshots, pick history, and universal types.
Overview
grip-dev contains the fundamental algorithms and types used across the Grip ecosystem. It has no user interface; it acts as the centralized logic hub for generating element selectors, mapping DOM nodes to accessibility trees, and storing interaction history.
If you are building custom AI tools or extending Grip's functionality, import utilities directly from this package to ensure compatibility.
Installation
npm install grip-devMain APIs
generateSelector— Calculates a stable CSS selector for any given DOM node.buildSnapshot— Generates an LLM-optimized accessibility tree (AXTree) and reference map for agents to interact with.toStoredPick— Serializes a UI interaction for the global session history.