Skip to content

fix: prevent Claude marketplaces from leaking into project config - #35

Merged
yordis merged 1 commit into
mainfrom
yordis/fix-plugin-1
Nov 24, 2025
Merged

yordis merged 1 commit into
mainfrom
yordis/fix-plugin-1

Conversation

@yordis

@yordis yordis commented Nov 24, 2025

Copy link
Copy Markdown
Member

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

@coderabbitai

coderabbitai Bot commented Nov 24, 2025

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR reorganizes plugin storage under .cursor/{type}/aipm/{marketplace}/{plugin}/, adds DIR_AIPM_NAMESPACE = 'aipm', changes Claude marketplace keys from claude: to claude/, and refactors plugin command config handling to use loadTargetConfig + lodash.merge. Docs and tests updated accordingly.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/explanation/architecture.md, docs/how-to/create-marketplace.md, docs/how-to/debug-plugins.md, docs/how-to/installation.md, docs/reference/cli-commands.md
Rewrote large architecture narrative into diagrams/tables, changed placeholder syntax from <...> to {...}, and updated filesystem/path examples to .cursor/{type}/aipm/{marketplace}/{plugin}/. CLI output examples adjusted.
Directory Namespace Constant
src/constants.ts
Added exported DIR_AIPM_NAMESPACE = 'aipm'.
Claude Marketplace Prefix Migration
src/config/loader.ts, src/commands/list.ts, src/helpers/marketplace.ts, tests/commands/claude-code-auto-discovery.test.ts
Switched Claude marketplace key/prefix detection from claude: to claude/ and updated related logic and tests.
Plugin Commands Config Refactor
src/commands/plugin-enable.ts, src/commands/plugin-disable.ts, src/commands/plugin-install.ts, src/commands/plugin-uninstall.ts
Replaced in-file config mutation with loadTargetConfig + lodash.merge, preserved dry-run behavior, added stricter error propagation, and updated uninstall to remove files across aipm-scoped subdirs.
Sync Strategy & Sync Command Updates
src/helpers/sync-strategy.ts, src/commands/sync.ts
Updated paths to use .cursor/{type}/aipm/..., scoped cleanup to .cursor/<subdir>/aipm, and ensured creation/removal target the aipm namespace.
Tests Updated for New Paths
tests/commands/*.test.ts (multiple files)
Updated many test fixtures and expectations from .cursor/marketplace/... or .cursor/{type}/local/... to .cursor/{type}/aipm/{marketplace}/..., and adjusted Claude key expectations.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI as Plugin CLI
    participant Config as Config Manager
    participant FS as File System

    User->>CLI: plugin enable/install/disable/uninstall
    CLI->>Config: loadTargetConfig(cwd, local?)
    Config->>FS: read target config file(s)
    FS-->>Config: config object
    Config-->>CLI: target config
    CLI->>CLI: merge({ plugins: { id: { enabled: true/false } } })
    CLI->>Config: saveConfig(updated)
    Config->>FS: write updated config
    FS-->>Config: saved
    Config-->>CLI: success
    CLI-->>User: success / dry-run message
Loading
sequenceDiagram
    participant Sync as Sync Task
    participant Registry as Plugin Registry
    participant FS as File System

    Sync->>FS: ensure .cursor/{type}/aipm/ exists
    loop marketplaces
        Sync->>Registry: fetch plugins for marketplace
        Registry-->>Sync: plugin metadata
        Sync->>FS: copy -> .cursor/{type}/aipm/{marketplace}/{plugin}/
    end
    Sync-->>FS: cleanup disabled plugins under .cursor/{type}/aipm/
    Sync-->>Sync: done
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus:
    • Consistent use/import of DIR_AIPM_NAMESPACE across files.
    • Correctness of loadTargetConfig + lodash.merge semantics and persisted config shape.
    • Completeness of claude:claude/ migration across codepaths and tests.
    • Multi-location deletion logic in plugin-uninstall.ts to avoid accidental removals.
    • Sync path construction in sync-strategy.ts and sync.ts to ensure no user files outside aipm are removed.

Possibly related PRs

Poem

🐰 I hopped through code and changed the map,

claude: became claude/ — a tidy swap.
.cursor now keeps plugins in aipm rows,
configs merge clean where the new flow goes,
I twitched my nose and watched the tests compose. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description only contains a sign-off line and does not provide any meaningful information about the changeset or PR objectives. Provide a brief description of the changes, including why Claude marketplace prefix detection was changed and what problem this solves.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: preventing Claude marketplaces from leaking into project config, which aligns with changes to Claude marketplace key prefix detection across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yordis/fix-plugin-1

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f24d19d and 3411d35.

📒 Files selected for processing (23)
  • docs/explanation/architecture.md (1 hunks)
  • docs/how-to/create-marketplace.md (1 hunks)
  • docs/how-to/debug-plugins.md (7 hunks)
  • docs/how-to/installation.md (1 hunks)
  • docs/reference/cli-commands.md (3 hunks)
  • src/commands/list.ts (1 hunks)
  • src/commands/plugin-disable.ts (2 hunks)
  • src/commands/plugin-enable.ts (2 hunks)
  • src/commands/plugin-install.ts (2 hunks)
  • src/commands/plugin-uninstall.ts (2 hunks)
  • src/commands/sync.ts (3 hunks)
  • src/config/loader.ts (1 hunks)
  • src/constants.ts (1 hunks)
  • src/helpers/marketplace.ts (1 hunks)
  • src/helpers/sync-strategy.ts (3 hunks)
  • tests/commands/claude-code-auto-discovery.test.ts (7 hunks)
  • tests/commands/plugin-install.test.ts (4 hunks)
  • tests/commands/plugin-uninstall.test.ts (4 hunks)
  • tests/commands/plugin-update.test.ts (4 hunks)
  • tests/commands/sync-git.test.ts (7 hunks)
  • tests/commands/sync-marketplace-json.test.ts (5 hunks)
  • tests/commands/sync-rules.test.ts (5 hunks)
  • tests/commands/sync.test.ts (10 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • tests/commands/sync.test.ts
  • tests/commands/plugin-install.test.ts
  • docs/reference/cli-commands.md
  • src/commands/sync.ts
  • src/helpers/marketplace.ts
  • docs/how-to/debug-plugins.md
  • tests/commands/claude-code-auto-discovery.test.ts
  • docs/how-to/create-marketplace.md
  • docs/how-to/installation.md
🧰 Additional context used
🧬 Code graph analysis (8)
tests/commands/sync-rules.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
tests/commands/sync-git.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/commands/plugin-disable.ts (2)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
tests/commands/sync-marketplace-json.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/helpers/sync-strategy.ts (1)
src/constants.ts (1)
  • DIR_AIPM_NAMESPACE (9-9)
src/commands/plugin-enable.ts (2)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
src/commands/plugin-uninstall.ts (4)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
src/constants.ts (3)
  • PLUGIN_SUBDIRS (14-14)
  • DIR_CURSOR (4-4)
  • DIR_AIPM_NAMESPACE (9-9)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/commands/plugin-install.ts (1)
src/helpers/aipm-config.ts (1)
  • loadTargetConfig (99-105)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (19)
src/constants.ts (1)

9-9: LGTM! Clean constant addition.

The new DIR_AIPM_NAMESPACE constant follows existing naming conventions and will help isolate aipm-managed plugin paths under the .cursor directory.

docs/explanation/architecture.md (1)

3-140: LGTM! Comprehensive documentation updates.

The documentation has been significantly enhanced with Mermaid diagrams and accurately reflects the new aipm namespace structure. The path examples clearly show the reorganized .cursor/{type}/aipm/{marketplace}/{plugin}/ layout.

src/commands/list.ts (1)

37-37: LGTM! Prefix detection updated correctly.

The Claude marketplace detection now uses claude/ instead of claude:, which aligns with the filesystem-safe naming convention introduced in this PR. This change is consistent with the updates in config/loader.ts.

src/config/loader.ts (1)

108-108: LGTM! Filesystem-safe prefix for Claude marketplaces.

Changing the Claude marketplace prefix from claude: to claude/ improves filesystem compatibility (colons can be problematic on some systems) and aligns better with path conventions. This is the core change that prevents Claude marketplaces from conflicting with project configurations.

tests/commands/plugin-uninstall.test.ts (1)

133-133: LGTM! Test paths updated consistently.

All plugin directory paths have been updated to use the new .cursor/commands/aipm/{marketplace}/{plugin}/ structure. The changes maintain test coverage while verifying the new aipm namespace organization.

Also applies to: 167-167, 251-251, 292-292

tests/commands/sync-git.test.ts (1)

78-238: LGTM! Comprehensive test updates for git marketplace.

All test assertions have been updated to verify the new .cursor/commands/aipm/git/{plugin}/ path structure. The tests continue to cover all important scenarios including single/multiple plugins, updates, branch support, mixed sources, and dry-run mode.

tests/commands/sync-rules.test.ts (1)

62-281: LGTM! Rule sync tests updated consistently.

All rule output paths have been updated to use .cursor/rules/aipm/{marketplace}/{plugin}/ structure. The tests maintain coverage of rule syncing functionality including frontmatter handling and .cursor.yaml overrides.

tests/commands/sync-marketplace-json.test.ts (1)

80-209: LGTM! Marketplace.json tests updated consistently.

All test paths have been updated to use the new .cursor/commands/aipm/{marketplace}/{plugin}/ structure. The tests continue to provide comprehensive coverage of marketplace.json functionality including custom paths, selective syncing, nested paths, and multiple plugin scenarios.

src/commands/plugin-install.ts (1)

1-1: LGTM: Clean imports for the new config handling pattern.

The addition of lodash.merge and the loadTargetConfig/saveConfig helpers properly supports the refactored configuration management approach.

Also applies to: 6-6

src/commands/plugin-disable.ts (2)

1-1: LGTM: Consistent imports with the new config pattern.

Also applies to: 5-5


43-52: LGTM: Clean refactoring to target-config-based updates.

The pattern of loading target config, applying a merge-based update, and persisting via saveConfig is consistently applied. The explicit return after dry-run improves code clarity.

src/helpers/sync-strategy.ts (1)

3-3: LGTM: Consistent application of the aipm namespace across all plugin subdirectories.

The path structure updates correctly apply DIR_AIPM_NAMESPACE to all plugin subdirs (commands, rules, agents, skills, hooks), ensuring consistency. The JSDoc comments are appropriately updated to reflect the new paths.

Also applies to: 38-76

tests/commands/plugin-update.test.ts (1)

52-52: LGTM: Test paths properly updated to reflect the new aipm namespace structure.

All test assertions and file operations correctly use the new .cursor/commands/aipm/local/ path structure, aligning with the implementation changes.

Also applies to: 182-183, 193-193, 251-251

src/commands/plugin-uninstall.ts (4)

5-6: LGTM: Appropriate imports for the refactored config handling and namespace structure.


32-45: Excellent improvement to error messaging!

The new existence check at lines 34-41 properly distinguishes between a plugin not existing at all versus existing only in the merged config (from Claude/global sources) but not in the target config. This addresses the concern from past reviews and provides clear, actionable error messages to users.


53-60: LGTM: Consistent target-config-based update pattern.

The destructuring approach to remove the plugin entry is clean, and the pattern aligns with the other command refactorings.


67-80: LGTM: Comprehensive file deletion across all plugin subdirectories.

The iteration over PLUGIN_SUBDIRS ensures all plugin artifacts are removed from their respective locations under the aipm namespace. The deletion counter provides useful feedback about the cleanup scope.

src/commands/plugin-enable.ts (2)

1-1: LGTM: Consistent imports for the new config handling pattern.

Also applies to: 5-5


42-51: LGTM: Clean and consistent target-config-based update pattern.

The refactoring properly loads the target config, applies a merge-based update, and persists via saveConfig. The explicit return after dry-run improves readability.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor

cursor Bot commented Nov 24, 2025

Copy link
Copy Markdown

PR Summary

Namespaces synced plugin files under .cursor/{type}/aipm/..., changes Claude marketplace prefix to claude/, and updates plugin config writes to target file only; docs and tests updated.

  • Core behavior
    • Cursor sync paths: All plugin files now sync to .cursor/{type}/aipm/{marketplace}/{plugin}/ (adds aipm namespace).
    • Cleanup: sync clears only .cursor/<subdir>/aipm/ and removes disabled types using the new path.
    • Uninstall: Removes files across all subdirs under .cursor/*/aipm/{marketplace}/{plugin}/.
  • Config handling
    • plugin-enable, plugin-disable, and plugin-install now load the target config and merge changes (via lodash.merge) before saving, preventing cross-source leakage.
  • Claude integration
    • Marketplace prefix changed from claude: to claude/ across loader, listing, helpers, and tests.
  • Docs
    • Architecture, data flow, file locations, and CLI references updated to reflect aipm namespacing and new paths; minor command examples adjusted.
  • Tests
    • All affected tests updated for new paths and claude/ prefix.

Written by Cursor Bugbot for commit 3411d35. This will update automatically on new commits. Configure here.

@yordis
yordis force-pushed the yordis/fix-plugin-1 branch 6 times, most recently from d43eec9 to b0f9996 Compare November 24, 2025 07:02
Comment thread src/commands/plugin-uninstall.ts
@yordis
yordis force-pushed the yordis/fix-plugin-1 branch from b0f9996 to e78c495 Compare November 24, 2025 07:08
Comment thread src/commands/plugin-install.ts
@yordis
yordis force-pushed the yordis/fix-plugin-1 branch 2 times, most recently from ec26299 to f24d19d Compare November 24, 2025 07:43
@yordis
yordis marked this pull request as ready for review November 24, 2025 08:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/commands/plugin-install.ts (1)

1-1: Bug: installing from merged-only marketplaces still creates orphan plugin entries in target config

Because validation uses the merged config (which may include auto‑discovered Claude marketplaces) while writes go through targetConfig from loadTargetConfig, you can still enable a plugin like my-plugin@claude/... when only the merged config knows about that marketplace, and then persist just the plugin entry without a corresponding marketplaces[marketplaceName] in the saved config. On a machine where Claude auto‑discovery is unavailable, this leaves an orphan plugin reference that sync cannot resolve. Consider either (a) requiring the marketplace to exist in targetConfig.marketplaces before allowing install, or (b) also persisting the resolved marketplace definition into targetConfig when it comes only from merged sources, so the saved config remains self‑contained.

Also applies to: 6-6, 110-113

🧹 Nitpick comments (5)
src/helpers/marketplace.ts (1)

9-15: getMarketplaceType correctly updated to claude/ prefix

The runtime behavior now matches the new claude/ marketplace key format and keeps the return type constrained to 'claude' | 'aipm'. If this prefix appears elsewhere (e.g., in config loading), consider centralizing it in a shared constant to avoid future mismatches, but the current change is logically sound.

src/commands/plugin-enable.ts (1)

20-52: Config mutation correctly scoped to target config (avoids leaking auto-discovered marketplaces)

This refactor to use loadTargetConfig + saveConfig with a narrow merge of { plugins: { [pluginId]: { enabled: true } } } cleanly confines persistence to the intended project/local config file and keeps any auto-discovered marketplaces (e.g. Claude) out of saved config. The existing pre-checks via loadPluginsConfig for initialization and "already enabled" remain intact and side‑effect free.

If you want to tighten things up further, you could introduce a local boolean like const local = !!cmd.local; and reuse it for configName, loadTargetConfig, and saveConfig to avoid passing undefined and repeating the ternary, but that's purely cosmetic.

tests/commands/sync.test.ts (1)

57-59: Sync tests consistently target .cursor/{type}/aipm/{marketplace}/{plugin}/...

The updated expectations for commands, rules (.mdc), agents, skills, and hooks all use the new aipm namespace under .cursor, matching the revised sync strategy and keeping the integrations matrix (enabled/disabled/include variants) in lockstep with production behavior.

As a small enhancement, consider extending the existing dry‑run/error‑path tests that still reference .cursor/marketplace/... to also assert against the aipm-scoped destinations, so failures can’t slip by due to only checking the legacy path.

Also applies to: 80-82, 108-112, 128-129, 144-146, 350-355, 379-392, 426-435, 465-476, 494-507

tests/commands/plugin-install.test.ts (1)

54-55: plugin-install tests updated to aipm-scoped command paths

The assertions now consistently look for installed command files under .cursor/commands/aipm/{marketplace}/{plugin}/..., and the dry‑run test correctly verifies that this directory is not created, which aligns with the new layout.

If you find yourself touching these again, it might be worth extracting a small helper (e.g. cursorCommandsPath(testDir, marketplace, plugin, file?)) in the test helpers to avoid repeating the same join pattern across multiple tests.

Also applies to: 203-205, 296-298, 351-353

tests/commands/plugin-uninstall.test.ts (1)

133-133: Uninstall tests now target .cursor/commands/aipm/... consistently

The adjusted plugin directory paths align with pluginUninstall’s new cleanup behavior under .cursor/<subdir>/aipm/..., so the tests now validate the correct locations for delete/keep/dry‑run scenarios.

Also applies to: 167-167, 251-251, 292-292

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f0e544d and f24d19d.

📒 Files selected for processing (23)
  • docs/explanation/architecture.md (1 hunks)
  • docs/how-to/create-marketplace.md (1 hunks)
  • docs/how-to/debug-plugins.md (7 hunks)
  • docs/how-to/installation.md (1 hunks)
  • docs/reference/cli-commands.md (3 hunks)
  • src/commands/list.ts (1 hunks)
  • src/commands/plugin-disable.ts (2 hunks)
  • src/commands/plugin-enable.ts (2 hunks)
  • src/commands/plugin-install.ts (2 hunks)
  • src/commands/plugin-uninstall.ts (2 hunks)
  • src/commands/sync.ts (3 hunks)
  • src/config/loader.ts (1 hunks)
  • src/constants.ts (1 hunks)
  • src/helpers/marketplace.ts (1 hunks)
  • src/helpers/sync-strategy.ts (3 hunks)
  • tests/commands/claude-code-auto-discovery.test.ts (7 hunks)
  • tests/commands/plugin-install.test.ts (4 hunks)
  • tests/commands/plugin-uninstall.test.ts (4 hunks)
  • tests/commands/plugin-update.test.ts (4 hunks)
  • tests/commands/sync-git.test.ts (7 hunks)
  • tests/commands/sync-marketplace-json.test.ts (5 hunks)
  • tests/commands/sync-rules.test.ts (5 hunks)
  • tests/commands/sync.test.ts (10 hunks)
🧰 Additional context used
🧬 Code graph analysis (10)
tests/commands/sync-git.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/helpers/marketplace.ts (1)
src/schema.ts (1)
  • MarketplaceType (94-94)
tests/commands/sync.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/commands/plugin-disable.ts (2)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
src/commands/plugin-install.ts (1)
src/helpers/aipm-config.ts (1)
  • loadTargetConfig (99-105)
src/commands/plugin-uninstall.ts (4)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
src/constants.ts (3)
  • PLUGIN_SUBDIRS (14-14)
  • DIR_CURSOR (4-4)
  • DIR_AIPM_NAMESPACE (9-9)
src/helpers/fs.ts (1)
  • fileExists (26-33)
src/helpers/sync-strategy.ts (1)
src/constants.ts (1)
  • DIR_AIPM_NAMESPACE (9-9)
src/commands/plugin-enable.ts (2)
src/helpers/aipm-config.ts (2)
  • loadTargetConfig (99-105)
  • saveConfig (110-116)
src/helpers/io.ts (1)
  • defaultIO (79-79)
tests/commands/sync-marketplace-json.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
tests/commands/sync-rules.test.ts (1)
src/helpers/fs.ts (1)
  • fileExists (26-33)
🪛 markdownlint-cli2 (0.18.1)
docs/explanation/architecture.md

67-67: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (23)
src/constants.ts (1)

4-10: DIR_AIPM_NAMESPACE is consistent with existing naming

Using 'aipm' as a dedicated namespace constant aligns with DIR_AIPM and AIPM_GLOBAL_DEFAULT and will help keep .cursor paths consistent across helpers and docs.

docs/how-to/installation.md (1)

110-121: Dev-install placeholder change improves clarity

Switching to bun run src/cli.ts {command} makes it obvious this is a placeholder and avoids shell redirection quirks from <command>. No functional issues.

docs/how-to/create-marketplace.md (1)

236-244: Troubleshooting clone example matches new placeholder style

Updating to git clone {repository-url} is consistent with other docs and avoids angle-bracket confusion. Looks good.

src/config/loader.ts (1)

102-132: Claude marketplace keys correctly migrated to claude/ namespace

Building prefixedName as claude/${marketplaceName} keeps Claude marketplaces clearly namespaced and aligns with getMarketplaceType and the docs. The conflict check against global/project/local configs still behaves correctly, and the merge order (claude lowest priority, then global → project → local) matches the comment.

docs/reference/cli-commands.md (2)

68-100: sync behavior docs now match the new .cursor layout

Describing sync as writing to .cursor/{type}/aipm/{marketplace}/{plugin}/ with explicit types (commands, rules, agents, skills, hooks) matches the new namespaced directory structure and should help users locate synced files correctly.


528-538: List output headings clarified

Using plain Marketplaces: and Installed Plugins: headings is clearer and better aligned with typical CLI output formatting. Example remains accurate.

docs/how-to/debug-plugins.md (6)

50-61: Marketplace URL placeholder is consistent and shell-safe

Switching to git clone {marketplace-url} keeps the example generic while avoiding <…> redirection confusion in shells. This matches the placeholder style used elsewhere.


90-99: Synced file locations now match the aipm-namespaced layout

The debug instructions correctly point to .cursor/{type}/aipm/my-marketplace/my-plugin/ (with explicit commands/rules paths), which matches the updated sync strategy and will help users verify plugin installation on disk.


107-131: Git troubleshooting examples use unified {repository-url} placeholder

Using {repository-url} in git clone and git ls-remote examples standardizes the placeholder syntax and avoids angle-bracket quirks. The commands remain accurate diagnostics for clone/fetch issues.


191-195: Repeated git ls-remote {repository-url} guidance is still appropriate

Reusing git ls-remote {repository-url} under marketplace update failures is appropriate and consistent with earlier troubleshooting steps; users get a clear way to verify remote availability.


220-227: Clear BAD/GOOD guidance around using sudo with aipm

Marking sudo aipm install ... as BAD and the non-sudo variant as GOOD is a useful addition to prevent permission and ownership issues in .cursor and .aipm directories.


281-288: Advanced path checks align with new .cursor/*/aipm/ structure

The “Check Synced Files” section correctly reflects the type-split layout (.cursor/commands/aipm/, .cursor/rules/aipm/) and the glob find .cursor/*/aipm/ -name "*.md" provides a practical way to inspect synced content across all types.

src/commands/plugin-disable.ts (1)

1-53: Config update flow now avoids leaking Claude marketplaces into saved config

The revised pluginDisable flow looks solid:

  • You still validate against the merged view from loadPluginsConfig (including Claude/global), so user-facing behavior for “plugin not found / already disabled” is unchanged.
  • The actual persisted change is built from the target config only (via loadTargetConfig) and a small { plugins: { [id]: { enabled: false } } } patch, then saved with saveConfig.

This ensures Claude-derived marketplaces and any other transient sources that participate only in loadPluginsConfig no longer get serialized into .aipm/config*.json when disabling a plugin, while preserving other plugin fields for that ID. Dry‑run handling is also correctly placed before any write.

src/commands/list.ts (1)

34-38: Claude marketplace detection aligned to new claude/ prefix

Switching the Claude auto-discovery check to name.startsWith('claude/') keeps the special labeling behavior in sync with the new key format and avoids mislabeling non-Claude entries.

tests/commands/plugin-update.test.ts (1)

52-53: Tests now correctly expect commands under .cursor/commands/aipm/...

The updated expectations for updatedCommandPath and dry‑run paths all target .cursor/commands/aipm/{marketplace}/{plugin}/..., which matches the new sync/install layout and keeps plugin-update tests aligned with production behavior.

Also applies to: 182-195, 251-252

tests/commands/sync-rules.test.ts (1)

62-70: Rule sync tests aligned to .cursor/rules/aipm/... namespace

All rule output and sentinel paths now point at .cursor/rules/aipm/{marketplace}/{plugin}/..., which matches the new integration layout while preserving the existing behavior checks (conversion, overrides, and exclusion of .cursor.yaml files).

Also applies to: 106-113, 162-180, 230-251, 281-284

tests/commands/sync-marketplace-json.test.ts (1)

80-82: Marketplace-json sync tests now assert aipm-namespaced command paths

Each scenario correctly expects the synced command under .cursor/commands/aipm/{marketplace}/{plugin}/test.md, keeping manifest-driven sync behavior verified against the new aipm path scheme.

Also applies to: 100-102, 139-145, 177-179, 208-209

tests/commands/sync-git.test.ts (2)

78-102: Git sync command tests correctly target .cursor/commands/aipm/...

The updated expectations for commandsPath and the per-plugin assertions now match the new aipm‑namespaced layout produced by syncPluginToCursor, so the tests validate the right destination paths.


121-132: Updated git sync scenarios consistently use the aipm namespace

All later assertions (updates, branch support, mixed marketplaces, and dry‑run) now point under .cursor/commands/aipm/..., which keeps git‑sourced plugins isolated from any user files while matching the new sync strategy.

Also applies to: 160-160, 199-202, 239-239

src/helpers/sync-strategy.ts (1)

3-3: AIPM namespace integration in sync strategy is consistent and scoped

Using DIR_AIPM_NAMESPACE in all destination paths cleanly segregates AIPM‑managed files under .cursor/<subdir>/aipm/<marketplace>/<plugin>, and the updated comments accurately document the new layout; this matches the cleanup and uninstall logic elsewhere.

Also applies to: 18-22, 38-39, 41-42, 46-47, 50-51, 54-55, 57-58, 62-63, 65-66, 70-71, 73-75

tests/commands/claude-code-auto-discovery.test.ts (1)

47-49: Claude auto‑discovery tests correctly use the new claude/ key prefix

All marketplace expectations and filters have been updated to claude/..., matching the new loader and marketplace detection behavior, and ensuring the tests exercise the intended key format.

Also applies to: 103-103, 137-137, 146-147, 168-168, 180-180, 201-203

src/commands/sync.ts (1)

5-5: Sync now isolates AIPM content under .cursor/<subdir>/aipm without touching user files

Cleaning only .cursor/<subdir>/aipm (and removing old .cursor/marketplace) gives a clear boundary between managed and user content, and the disabled‑subdir cleanup correctly targets .cursor/<subdir>/aipm/<marketplace>/<plugin>, matching syncPluginToCursor.

Also applies to: 84-92, 168-170

src/commands/plugin-uninstall.ts (1)

5-7: Uninstall now operates on the target config and cleans up aipm-scoped files correctly

Switching validation and mutation to targetConfig (with a clear error when a plugin exists only in another merged source) resolves the earlier inconsistency between merged and target configs, and the new removal loop over PLUGIN_SUBDIRS under .cursor/<subdir>/aipm/<marketplace>/<plugin> reliably cleans all AIPM-managed artifacts without touching user files.

Also applies to: 32-45, 50-51, 53-58, 67-80

Comment thread docs/explanation/architecture.md
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/fix-plugin-1 branch from f24d19d to 3411d35 Compare November 24, 2025 08:46
@yordis
yordis merged commit cd77a3e into main Nov 24, 2025
6 checks passed
@yordis
yordis deleted the yordis/fix-plugin-1 branch November 24, 2025 08:50
This was referenced Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant