agent-device 0.21.0, Node 24.18. The README's Node client example (createAgentDeviceClient) is the API I wanted to build a two-platform visual regression loop on (callstack/react-native-paper#5115).
The package does export it (exports["."] → dist/src/index.js). But when agent-device is used the documented way, via npx agent-device …, the package lives only in the npx cache (~/.npm/_npx/<hash>/node_modules/agent-device), and import('agent-device') from a project fails with ERR_MODULE_NOT_FOUND. Reaching the typed client therefore requires adding agent-device as a (dev)dependency of the project under test, which a "try it without installing" evaluation cannot do. The fallback is spawning the CLI with --json per command and parsing stdout, which costs an npx resolution per call and loses every result type.
Suggestions: document the "use the Node client without installing" story if one exists (a global install, or a scaffold like npx agent-device init that writes a local wrapper), or say plainly in the README that the Node client requires a dependency and the CLI is the zero-install path.
agent-device 0.21.0, Node 24.18. The README's Node client example (
createAgentDeviceClient) is the API I wanted to build a two-platform visual regression loop on (callstack/react-native-paper#5115).The package does export it (
exports["."] → dist/src/index.js). But when agent-device is used the documented way, vianpx agent-device …, the package lives only in the npx cache (~/.npm/_npx/<hash>/node_modules/agent-device), andimport('agent-device')from a project fails withERR_MODULE_NOT_FOUND. Reaching the typed client therefore requires adding agent-device as a (dev)dependency of the project under test, which a "try it without installing" evaluation cannot do. The fallback is spawning the CLI with--jsonper command and parsing stdout, which costs an npx resolution per call and loses every result type.Suggestions: document the "use the Node client without installing" story if one exists (a global install, or a scaffold like
npx agent-device initthat writes a local wrapper), or say plainly in the README that the Node client requires a dependency and the CLI is the zero-install path.