Skip to content

Support project-level marketplaces with override warning #223

Description

@christso

Problem

allagents currently stores marketplace aliases in user profile config (~/.allagents/marketplaces.json).

For eval and local workspace scenarios, this creates cross-workspace side effects:

  • users may already have a marketplace alias configured globally
  • a specific workspace may need a different source (local path vs remote URL)
  • changing the global alias affects unrelated workspaces

Goals

  • Support workspace-isolated marketplace aliases.
  • Keep current behavior backward compatible.
  • Make scope explicit in CLI UX.

Proposal

Add project-level marketplace config at:

  • .allagents/marketplaces.json (workspace root)

Use the same JSON schema as user-level ~/.allagents/marketplaces.json.

CLI changes

plugin marketplace add

  • Add --scope <user|project>
  • Default: user (backward compatible)
  • Behavior:
    • --scope user writes to ~/.allagents/marketplaces.json
    • --scope project writes to .allagents/marketplaces.json

Examples:

allagents plugin marketplace add ../my-marketplace-repo --scope project
allagents plugin marketplace add https://github.com/org/repo --scope user

plugin marketplace list

  • Add --scope <user|project|all>
  • Default: all
  • Output should identify source scope per marketplace entry.

plugin marketplace remove

  • Add --scope <user|project|all>
  • Default: all (remove from both scopes if present)

Resolution behavior (runtime)

When resolving plugin@marketplace:

  1. Load user marketplaces (~/.allagents/marketplaces.json) if present.
  2. Load project marketplaces (.allagents/marketplaces.json) if present.
  3. Merge by marketplace name.
  4. If both define the same name, project-level entry wins.

Warning behavior

If a project marketplace overrides a user marketplace with the same name, print a warning during resolution/sync, for example:

Workspace marketplace <name> overrides user marketplace of the same name.

Suggested config schema (same as current user file)

{
  "my-marketplace": {
    "source": "local",
    "path": "../my-marketplace-repo"
  }
}

Compatibility notes

  • If .allagents/marketplaces.json does not exist, behavior is unchanged.
  • Existing user-scoped workflows continue to work with no command changes.

Acceptance criteria

  1. add --scope project creates/updates .allagents/marketplaces.json in workspace root.
  2. add with no scope still writes user-level config.
  3. list --scope all shows combined entries with scope/source indicators.
  4. remove --scope project <name> removes only project entry.
  5. remove --scope user <name> removes only user entry.
  6. remove --scope all <name> removes both entries.
  7. Runtime/plugin resolution uses merged view with project-over-user precedence.
  8. Override warning is emitted when duplicate name exists in both scopes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions