Skip to content

feat(marketplace): add workspace plugin recommendation contract and command - #130

Merged
1lck merged 2 commits into
mainfrom
feat/2228-workspace-plugin-recommendations
Nov 20, 2026
Merged

1lck merged 2 commits into
mainfrom
feat/2228-workspace-plugin-recommendations

Conversation

@1lck

@1lck 1lck commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes / Related: 1lck/Lithe-IDEA#2228

Summary

Add workspace-based plugin marketplace recommendations across contract v1, lithe-plugin-marketplace, and lithe-core while preserving strict backward compatibility with <= 0.8.10 desktop clients (lithe-plugin-index.json remains unchanged).

Changes

  • Contract schema & fixtures (shared/plugins/contract/v1/)
    • Add companion schema plugin-recommendations.schema.json (schemaVersion: 0) defining recommendations[] entries with pluginID, markers, extensions, and coveredBy.
    • Update fixtures/marketplace/source-urls.json so resolveSource responses also include recommendationsURL.
    • Add fixtures/marketplace/recommendations.json and fixtures/marketplace/recommendations-cases.json using synthetic fixture plugin IDs (io.example.* / dev.lithe.fixture.*).
    • Document the companion format, canonical URL resolution, plugins.marketplace.recommendForWorkspace command, and plugin.recommendations.* rejection codes in shared/plugins/contract/v1/README.md and rust/contracts/rust-core-api.md.
    • Record the change in shared/plugins/reference/protocol-changelog.md.
  • lithe-plugin-marketplace (rust/crates/plugin-marketplace/src/lib.rs)
    • Extend resolve_source with recommendationsURL derived alongside indexURL (lithe-plugin-recommendations.json).
    • Implement recommend_for_workspace & recommend_for_workspace_command ("plugins.marketplace.recommendForWorkspace"): validates index & companion catalog schemas, matches basename markers (exact on Unix, ASCII case-insensitive on Windows) and extensions (ASCII case-insensitive), filters installed / dismissed / coveredBy-satisfied / unavailable / unsupported plugins, deduplicates across catalogs, sorts marker matches first then alphabetically by name/ID, and isolates malformed catalogs/entries into rejected.
  • lithe-core protocol & tests (rust/crates/core/)
    • Register PluginsCommand::MarketplaceRecommendForWorkspace ("plugins.marketplace.recommendForWorkspace") in protocol/command.rs and runtime/dispatcher/plugins.rs.
    • Add unit & command dispatch tests in tests/marketplace_plugins.rs.

Verification

  • cargo fmt --manifest-path rust/Cargo.toml --all --check
  • ./scripts/rust-core/verify-rust-core-comments.sh plugin-marketplace core
  • node shared/plugins/scripts/verify-docs.mjs
  • node scripts/rust-core/verify-platform-tests.mjs
  • node scripts/rust-core/affected-crates.mjs
  • cargo clippy --manifest-path rust/Cargo.toml -p lithe-plugin-marketplace -p lithe-core --all-targets --all-features -- -D warnings
  • env -u GIT_EDITOR cargo test --manifest-path rust/Cargo.toml -p lithe-plugin-marketplace -p lithe-core (871 lib unit tests + 35 integration tests passed, 0 failed)

@1lck
1lck marked this pull request as ready for review November 20, 2026 09:04
@1lck
1lck merged commit d630938 into main Nov 20, 2026
9 checks passed
@1lck
1lck deleted the feat/2228-workspace-plugin-recommendations branch November 20, 2026 09:04
xiaoyumuxi added a commit that referenced this pull request Nov 20, 2026
* fix(toolchain): 外部安装的多入口链接保留布局里的文件名

rustup 把 ~/.cargo/bin/cargo、rust-analyzer 链接到自身,按启动时的名字决定运行哪个工具。
Core 校验外部安装后返回规范路径,把 cargo 解析成 rustup,版本探针运行的是 rustup,
cargo 因此永远找不到。

布局文件链接到另一个文件名时,返回规范主目录下的布局路径;链接目标的类型、可执行位和
不越出主目录、不进入工作区的检查不变。同名链接(版本管理器别名等)仍返回规范路径。

顺带把已合入的 #112、#127、#128、#130、#133 从协议更新记录的“待合入”移到时间线。

* docs(plugins): 协议更新记录登记 #135
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