Skip to content

add: marketplace entry with source "./" is rejected as unsupported "local" source #198

Description

@sergical

Summary

dotagents add fails for a repository whose marketplace entry uses "source": "./" (the plugin lives at the repository root). The error says the source type is unsupported, then says that only that same type is supported:

Plugin "agent-browser" not found in ~/.local/dotagents/vercel-labs/agent-browser. Matching marketplace entries use unsupported source types: local. Only local marketplace sources are supported.

Reproduce (dotagents 3.1.0, clean HOME)

export HOME=$(mktemp -d)
npx -y @sentry/dotagents init
npx -y @sentry/dotagents add vercel-labs/agent-browser --name agent-browser

--skill agent-browser and --ref <commit> give the same error.

The repository's .claude-plugin/marketplace.json:

"plugins": [
  { "name": "agent-browser", "source": "./", "strict": false,
    "skills": ["./skills/agent-browser"] }
]

Cause

In packages/dotagents/src/plugins/store.ts (still present on main at e42112b):

function localMarketplacePath(entry) {
  const { source } = entry;
  if (isString(source)) {return stripDotSlash(source);}   // "./" -> ""
  ...
}

discoverFromMarketplaces then checks if (!path). The empty string is falsy, so the entry goes to unsupportedSources, and marketplaceSourceType reports a string source as "local". "." works, because stripDotSlash(".") returns ".". Only "./" fails.

Expected

"./" resolves to the source root, the same as ".". A possible fix: return "." when stripDotSlash gives an empty string, or test path === null instead of !path. The same check applies to an object source with path: "./".

Workaround

A skill that agents.toml already declares still installs with dotagents install (the [[skills]] entry with path = "skills/agent-browser" does not go through plugin discovery). Only add fails.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions