Skip to content

agent-device cdp fails because pinned agent-cdp@1.6.0 is not published to npm #994

Description

@Laurin-Notemann

Summary

agent-device cdp ... appears to invoke npm exec agent-cdp@1.6.0, but agent-cdp@1.6.0 is not published on npm. The latest npm version is currently 1.5.1, while GitHub has a v1.6.0 release/tag.

This makes agent-device cdp unusable from a normal install, even though agent-cdp@1.6.0 can be built from the GitHub tag and works when installed locally/globally.

Environment

  • agent-device: 0.18.0
  • agent-cdp from npm: latest available is 1.5.1
  • Node: v24.16.0
  • Platform tested: macOS
  • React Native / Expo app with Metro running on http://127.0.0.1:8081

Reproduction

npm install -g agent-device
agent-device cdp target list --url http://127.0.0.1:8081

Actual result

npm error code ETARGET
npm error notarget No matching version found for agent-cdp@1.6.0.

npm view agent-cdp versions --json shows versions only up to 1.5.1.

Expected result

agent-device cdp ... should work from a standard agent-device installation, without requiring users to manually build/install an unpublished helper package.

Workaround verified

Building agent-cdp from the GitHub v1.6.0 tag works:

git clone --depth 1 --branch v1.6.0 https://github.com/callstackincubator/agent-cdp.git
cd agent-cdp
pnpm install --frozen-lockfile
pnpm -r --filter './packages/*' build
pnpm --filter @agent-cdp/protocol pack
pnpm --filter agent-cdp pack
npm install -g ./agent-cdp-protocol-1.6.0.tgz ./agent-cdp-1.6.0.tgz
agent-cdp --version
# 1.6.0

However, agent-device cdp ... still fails from a normal project directory because it uses npm exec agent-cdp@1.6.0.

A local-directory workaround works:

mkdir -p ~/.agent-device/tools/agent-cdp-1.6.0
cd ~/.agent-device/tools/agent-cdp-1.6.0
npm init -y
npm install --no-save /path/to/agent-cdp-protocol-1.6.0.tgz /path/to/agent-cdp-1.6.0.tgz

agent-device cdp target list --url http://127.0.0.1:8081
# works

Possible fixes

  • Publish agent-cdp@1.6.0 and @agent-cdp/protocol@1.6.0 to npm.
  • Or make agent-device cdp prefer an existing agent-cdp binary on PATH before falling back to npm exec.
  • Or add an env/config override for the CDP helper executable/path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions