Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/agentsys.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* were previously synced from agentsys via agent-core.
*
* Lookup order:
* 0. __dirname (this plugin's own vendored lib/)
* 1. ~/.claude/plugins/marketplaces/agentsys/lib (CC marketplace clone)
* 2. <npm-global-root>/agentsys/lib (npm install -g agentsys)
* 3. require.resolve('agentsys/lib/package.json') (project-local install)
Expand Down Expand Up @@ -56,6 +57,13 @@ function npmGlobalRoot() {
function candidatePaths() {
const home = os.homedir();
const candidates = [
// 0. This plugin's OWN vendored lib/. The sync still ships lib/binary/
// (and friends) into every plugin, so the resolver's own directory
// already satisfies the binary/index.js contract. Preferring it means
// the plugin is self-sufficient - works in bare CI and offline, with no
// external agentsys install - and the external lookups below stay as
// fallbacks for hosts that intentionally share a central agentsys.
__dirname,
path.join(home, '.claude', 'plugins', 'marketplaces', 'agentsys', 'lib'),
];

Expand Down
Loading