webcmd icon indicating copy to clipboard operation
webcmd copied to clipboard

[Bug]: adapter override breaks adapters with sibling imports

Open sandeep-devarapalli opened this issue 3 months ago • 0 comments

Summary

webcmd adapter override linkedin/profile-read creates an override that cannot load because the adapter imports a sibling module that is not copied or rewritten.

Environment

  • Webcmd 0.7.4
  • LinkedIn plugin 0.1.0
  • Node.js 26.5.0
  • macOS 26.6 arm64

Reproduction

  1. Install the official plugin: webcmd plugin install github:agentrhq/webcmd/linkedin.
  2. Run webcmd adapter override linkedin/profile-read.
  3. Run webcmd validate linkedin/profile-read -f json or webcmd adapter path linkedin/profile-read.

The generated file is ~/.webcmd/clis/linkedin/profile-read.js, and it still imports ./shared.js. The override directory contains only the copied command file; shared.js remains in the installed plugin directory.

Observed warning:

Failed to load module ~/.webcmd/clis/linkedin/profile-read.js:
Cannot find module ~/.webcmd/clis/linkedin/shared.js

Because the override fails to load, command resolution falls back to the plugin copy even though adapter status reports the tracked override.

Expected behavior

adapter override should produce a loadable override for adapters with relative sibling imports, either by copying the required dependency closure or rewriting imports to a stable plugin source.

Verified workaround

Changing the one override file's import to ../../plugins/linkedin/shared.js made the override load and pass validation. This workaround is tied to the current plugin layout and is not a general solution.

No credentials, cookies, browser-session data, or personal content are included here.

sandeep-devarapalli avatar Aug 22 '26 14:08 sandeep-devarapalli