diff --git a/.agents/notes/implemented/architecture/2026-10-20-plugin-backend-sdk.md b/.agents/notes/implemented/architecture/2026-10-20-plugin-backend-sdk.md index 93ad659a8c..3e8e89f726 100644 --- a/.agents/notes/implemented/architecture/2026-10-20-plugin-backend-sdk.md +++ b/.agents/notes/implemented/architecture/2026-10-20-plugin-backend-sdk.md @@ -120,7 +120,7 @@ Maven、Gradle 这类插件需要在后端里调用 JVM 生态的工具,并长 以下命令都在 lithe-plugin-docs 中运行: -- `node --test sdk/node/test/*.test.mjs`:协商、ID 规则(对照 `contract/v1/fixtures/function-protocol.json`)、保留方法、调用/进度/错误/取消、运行时注册、构建结果、生命周期和退出码、分帧、进程树取消、状态存储与只读包拒绝、类型声明与运行时导出一致。 +- `node --test sdk/node/test/*.test.mjs`:协商、ID 规则(对照 `contract/v1/fixtures/backend/function-protocol.json`)、保留方法、调用/进度/错误/取消、运行时注册、构建结果、生命周期和退出码、分帧、进程树取消、状态存储与只读包拒绝、类型声明与运行时导出一致。 - `mvn -B -f sdk/java/pom.xml verify [-Djvm=]`:Java SDK 的 JUnit 测试,覆盖与 Node 测试相同的协议场景,另含 JSON、分帧、进程树取消和状态存储。 - `node scripts/sdk-e2e.mjs`:把 `sdk/e2e` 复制进锁定版本主仓库的 `rust/lithe-core/tests/`,运行 `plugin_sdk_node` 和 `plugin_sdk_java`。Node 示例经 Core 校验、启动计划、版本检查、构建模型/依赖、函数结果/进度/失败/取消、重启后状态恢复,最后确认插件包文件清单不变;Java 示例按插件实际打包方式(`plugin.json` + shade 后的 JAR)装进临时包目录,跑同一套场景。设置 `LITHE_PLUGIN_SDK_JAVA_RUNTIME` 时,Java 示例在该运行时(CI 为 Java 8)上运行。 - `node scripts/sdk-e2e.mjs --ref preview`:同上,换成主仓库 `preview` 分支的最新 Core;CI 每周运行。 diff --git a/.agents/notes/implemented/architecture/2026-10-20-plugin-function-contract.md b/.agents/notes/implemented/architecture/2026-10-20-plugin-function-contract.md index 5e04e1a462..48cb831555 100644 --- a/.agents/notes/implemented/architecture/2026-10-20-plugin-function-contract.md +++ b/.agents/notes/implemented/architecture/2026-10-20-plugin-function-contract.md @@ -4,7 +4,7 @@ ## 先说结论 -插件后端进程(语言服务器或构建 Provider,插件自己启动、用 JSON-RPC 通信的进程)现在可以提供**插件函数**(Plugin Function):只属于这个插件、参数和结果都可序列化的动作,例如插件自己窗口里一个按钮背后的步骤。协议名是 `litheFunctions` 版本 1,在 `initialize` 里协商,与 `litheBuild` 互不依赖;契约写在 `shared/contracts/plugins/v1/README.md` 的 “Plugin functions” 一节,标准答案在 `fixtures/function-protocol.json`。 +插件后端进程(语言服务器或构建 Provider,插件自己启动、用 JSON-RPC 通信的进程)现在可以提供**插件函数**(Plugin Function):只属于这个插件、参数和结果都可序列化的动作,例如插件自己窗口里一个按钮背后的步骤。协议名是 `litheFunctions` 版本 1,在 `initialize` 里协商,与 `litheBuild` 互不依赖;契约写在 `shared/contracts/plugins/v1/README.md` 的 “Plugin functions” 一节,标准答案在 `fixtures/backend/function-protocol.json`。 这次同时定下了能力的三个方向:插件提供**领域能力**(构建模型、依赖树,契约归 Lithe)、插件提供**插件函数**(契约归插件)、插件调用**宿主能力**(契约归宿主)。领域操作仍走类型化的 `lithe/build/*`,插件函数不能代替它;后端也不能请宿主再派发领域操作或函数,避免处理器绕回自己。 @@ -143,6 +143,6 @@ Maven 插件窗口的“刷新快照”按钮 - `rust/lithe-core/src/protocol/command.rs` - `rust/lithe-core/src/runtime/dispatcher.rs` - `shared/contracts/plugins/v1/README.md` -- `shared/contracts/plugins/v1/fixtures/function-protocol.json` +- `shared/contracts/plugins/v1/fixtures/backend/function-protocol.json` - `shared/contracts/rust-core-api.md` - `scripts/architecture/verify-shared-contracts.sh` diff --git a/.agents/notes/implemented/architecture/2026-10-21-plugin-settings-surfaces.md b/.agents/notes/implemented/architecture/2026-10-21-plugin-settings-surfaces.md index 34e2c28e18..68c9d927f1 100644 --- a/.agents/notes/implemented/architecture/2026-10-21-plugin-settings-surfaces.md +++ b/.agents/notes/implemented/architecture/2026-10-21-plugin-settings-surfaces.md @@ -176,7 +176,7 @@ Swift 和 Windows 各写一遍合并规则最直接,但两边一旦有细微 - `./scripts/macos/test/test-macos.sh --filter SettingsSidebarLayoutTests`:静态页面仍各归一个分组。 - `./scripts/macos/test/test-macos.sh --filter PluginSettingsLayoutTests`:480、640、900 点宽的深浅主题下,路径输入框和完整选择按钮都在容器内,按钮可调用选择器并写入所选路径。 - `./scripts/macos/test/test-macos.sh --filter PluginDetailLayoutTests`:实际 Java 插件表单在深浅主题中往返缩放,详情边界始终跟随分隔条,窄面板下右侧设置可经原生横向滚动到达。 -- 共享夹具:`shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json`。 +- 共享夹具:`shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json`。 ## 适用范围 diff --git a/.agents/notes/implemented/architecture/2026-10-23-plugin-contract-publishing.md b/.agents/notes/implemented/architecture/2026-10-23-plugin-contract-publishing.md index 2d5c50b181..62bc70f2c0 100644 --- a/.agents/notes/implemented/architecture/2026-10-23-plugin-contract-publishing.md +++ b/.agents/notes/implemented/architecture/2026-10-23-plugin-contract-publishing.md @@ -92,7 +92,7 @@ Store 的 `validate-index.mjs` 仍然实现索引规则。它的 CI 原来比较 - 主仓库的 `verify-shared-contracts.sh` 检查目录下每个 `.md`,拒绝离开目录、指向目录或指向不存在文件的相对链接。 - docs 仓库的 `contract.mjs` 在同步和校验时也拒绝这类链接。 -主仓库的检查必须和 docs 的同步规则一样严格。2026-11-01 同步 #1581 时,`proposals/toolchains/README.md` 里指向 `fixtures/` 的链接被 docs 拒绝:主仓库当时只检查顶层 README,而且允许链接指向目录,所以这个问题在合并前没被发现,只能再提一个 PR 修复后重新同步。 +主仓库的检查必须和 docs 的同步规则一样严格。2026-11-01 同步 #1581 时,`toolchains/proposal/README.md` 里指向 `fixtures/` 的链接被 docs 拒绝:主仓库当时只检查顶层 README,而且允许链接指向目录,所以这个问题在合并前没被发现,只能再提一个 PR 修复后重新同步。 ### `plugin.json` 里不能写 `$schema` @@ -123,7 +123,7 @@ fixture 的内容仍然用 Cargo、Go、Gradle、Maven 作为真实输入,契 SDK 是给插件开发者用的库,不是契约。开发者要读它的 README、看示例、提问题、下载发布包,这些都应该在 lithe-plugin-docs 完成,所以 `sdk/`、SDK 端到端测试和两个发版工作流都从主仓库移走,主仓库只保留契约。 - **发版**:lithe-plugin-docs 打 `sdk-node-v<版本>` 或 `sdk-java-v<版本>` 标签,`release-node-sdk.yml`、`release-java-sdk.yml` 发布包和 `.sha256`。具体规则见 [官方插件后端 SDK](2026-10-20-plugin-backend-sdk.md)。Java SDK 0.1.0 是迁移前从主仓库发布的,那个 Release 保留,Maven 插件锁定的下载地址不变。 -- **单元测试**:SDK 自己的测试读 `contract/v1/fixtures/function-protocol.json`,也就是契约副本,不再读主仓库。 +- **单元测试**:SDK 自己的测试读 `contract/v1/fixtures/backend/function-protocol.json`,也就是契约副本,不再读主仓库。 - **端到端测试**:场景仍是 Rust 测试,要链接 Rust Core。`sdk-e2e.mjs` 把锁文件记录的主仓库 commit 稀疏检出到 `.artifacts/lithe`(只取 `rust/` 和 `shared/`),把 `sdk/e2e` 复制进它的 `rust/lithe-core/tests/`,再用 `cargo test --locked` 运行。`LITHE_PLUGIN_SDK_ROOT` 告诉测试示例插件在哪里。这和 Cargo 插件测 Core 的方式相同。 - **两个版本的 Core**:每次提交测契约副本锁定的那个 commit,保证 SDK、契约副本和 Core 是同一个版本;每周再用 `--ref preview` 测主仓库 `preview` 分支的最新 Core,提前发现 Core 的改动破坏了 SDK。 diff --git a/.agents/notes/implemented/architecture/2026-10-24-database-provider-plugin.md b/.agents/notes/implemented/architecture/2026-10-24-database-provider-plugin.md index 5f198ca682..a13656f77c 100644 --- a/.agents/notes/implemented/architecture/2026-10-24-database-provider-plugin.md +++ b/.agents/notes/implemented/architecture/2026-10-24-database-provider-plugin.md @@ -106,7 +106,7 @@ - SQL 分析、语句拆分、标识符引用、DDL 生成和危险语句判定,全部只在插件的 Rust 后端里实现。界面要不要弹出确认框、执行时要不要拦截,都使用同一个分析结果。 - 插件仓库维护数据库专属的黄金样例。必须覆盖:换行或制表符分隔的 `WHERE`、开头的行注释和块注释、`WITH … DELETE`、多语句、无法识别的语句。 -- 主仓库只维护通用能力的样例(`fixtures/backend.plugin.json`、`function-protocol.json` 的 `hostRequests`),不再维护数据库样例。 +- 主仓库只维护通用能力的样例(`fixtures/backend/backend.plugin.json`、`function-protocol.json` 的 `hostRequests`),不再维护数据库样例。 ### 六、老用户迁移 diff --git a/.agents/notes/implemented/architecture/2026-10-30-plugin-backend-workspace-context.md b/.agents/notes/implemented/architecture/2026-10-30-plugin-backend-workspace-context.md index 988be82fff..74b282bf91 100644 --- a/.agents/notes/implemented/architecture/2026-10-30-plugin-backend-workspace-context.md +++ b/.agents/notes/implemented/architecture/2026-10-30-plugin-backend-workspace-context.md @@ -220,7 +220,7 @@ contextExpired 必须重新解析原目标,不能换成活动窗口。新协 - `workspace_backend_is_planned_with_its_version_and_workspace_service` - `host_notifications_follow_the_fixture`、`host_notifications_are_bounded`、`host_notifications_reach_a_version_3_backend`、`host_notifications_skip_a_version_2_backend` - `host_failure_details_are_a_bounded_object`、`host_failure_details_reach_a_version_3_backend` - - 以及 `fixtures/invalid-manifests.json` 新增的 6 个拒绝用例 + - 以及 `fixtures/manifest/invalid-manifests.json` 新增的 6 个拒绝用例 - `./scripts/macos/test/test-macos.sh --filter "PluginHostServiceDispatchTests|MacPluginBackendSessionsTests|PluginWebBridgeTests"`:上下文 generation 与换工作区发新 ID、按插件的 rootID 与密钥文件、`listContexts` 不建目录、授权核验、本地与远程描述、过期与格式错误、订阅的三条释放路径与 sequence、错误码与 details 透传、命令和订阅通知按顺序送达运行中的后端、`backend: 1` 与未运行的后端不收命令。 - `zsh scripts/architecture/verify-shared-contracts.sh`:契约 schema、fixture 与 README。 - `./scripts/macos/verify/verify-runtime-bundle-immutability.sh`:运行时不向发行目录写入。 diff --git a/.agents/notes/implemented/feature/2026-10-14-declarative-plugin-settings.md b/.agents/notes/implemented/feature/2026-10-14-declarative-plugin-settings.md index 1c733e60d7..4412e8002f 100644 --- a/.agents/notes/implemented/feature/2026-10-14-declarative-plugin-settings.md +++ b/.agents/notes/implemented/feature/2026-10-14-declarative-plugin-settings.md @@ -77,7 +77,7 @@ cargo test --manifest-path rust/lithe-core/Cargo.toml jdt ./scripts/macos/test/test-macos.sh --filter PluginLanguageServerLaunchResolverTests ``` -契约夹具:`shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json` 声明了三种类型的选项;`command-plans.json` 覆盖默认值、存储值、不合法存储值的回退和布尔类型保持;`invalid-manifests.json` 覆盖选项声明与引用的拒绝情形。 +契约夹具:`shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json` 声明了三种类型的选项;`command-plans.json` 覆盖默认值、存储值、不合法存储值的回退和布尔类型保持;`invalid-manifests.json` 覆盖选项声明与引用的拒绝情形。 ## 适用范围 diff --git a/.agents/notes/implemented/feature/2026-10-23-plugin-project-generators.md b/.agents/notes/implemented/feature/2026-10-23-plugin-project-generators.md index 6cf3880699..4d43a75a55 100644 --- a/.agents/notes/implemented/feature/2026-10-23-plugin-project-generators.md +++ b/.agents/notes/implemented/feature/2026-10-23-plugin-project-generators.md @@ -24,7 +24,7 @@ | 部分 | 负责方 | 落点 | | --- | --- | --- | | 声明的校验、表单求值(派生默认值、显示条件、错误码)、生成计划、压缩包解压 | Rust Core | `rust/lithe-core/src/project_generators/`,命令 `project.*` | -| 契约与标准答案 | 共享契约 | `shared/contracts/plugins/v1/README.md` 的 Project generators 一节,`fixtures/project-generator.plugin.json`、`fixtures/project-plans.json` | +| 契约与标准答案 | 共享契约 | `shared/contracts/plugins/v1/README.md` 的 Project generators 一节,`fixtures/project-generators/project-generator.plugin.json`、`fixtures/project-generators/project-plans.json` | | 窗口、名称、位置、Git、空项目、启用插件提示 | macOS 宿主 | `NewProjectView`、`NewProjectFeatureModel` | | 执行计划:临时目录、写文件、跑命令、下载、移动到位 | macOS 宿主 | `ProjectGenerationService`(编排)+ `MacProjectGenerationPlatform`(平台操作) | | Java、Maven Archetype、Spring Boot 的字段、模板和步骤 | 插件 | `Plugins/mac/Official/JavaSupport/`(`plugin.json` 的 `projectGenerators`、`icons/`、`templates/`) | diff --git a/.agents/notes/implemented/feature/2026-10-26-debug-console-prompt-and-completion.md b/.agents/notes/implemented/feature/2026-10-26-debug-console-prompt-and-completion.md index 08352a30a0..b3dd9310dc 100644 --- a/.agents/notes/implemented/feature/2026-10-26-debug-console-prompt-and-completion.md +++ b/.agents/notes/implemented/feature/2026-10-26-debug-console-prompt-and-completion.md @@ -22,7 +22,7 @@ - **输入行归宿主,补全内容归适配器和插件。** `DebugConsolePane`(`macos/Sources/Lithe/Views/Debug/DebugConsolePromptView.swift`)画输入行和弹层,不认识任何具体调试器。候选来自 `GenericDebugFeatureModel.requestConsoleCompletions`,只在会话处于 `paused` 时发请求,否则返回空列表。 - **补全请求走 Rust Core。** `debug.inspect` 的 `completions` 类型由 Core 校验并转成 DAP `completions`:适配器没有协商 `supportsCompletionsRequest` 时直接拒绝;`text` 不能为空;`column` 是 1 起算的 UTF-16 单位,越界会被拒绝。Swift 侧的光标是 0 起算,由 `CoreDebugAdapterProtocolSession` 统一加 1,其他地方不要再换算。 -- **插件声明命令用 `debugAdapters[].console.commands[]`。** 每项只有 `name` 和可选 `description`,按名称排序、不重复、数量和长度有上限,违反时安装校验直接拒绝(`shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json` 有对应用例)。清单按“整行前缀”匹配,已经完整输入的命令不再提示。适配器会实时补全时(如 lldb-dap)清单只用来补它没覆盖的命令,同名候选只显示一次,适配器的顺序在前。 +- **插件声明命令用 `debugAdapters[].console.commands[]`。** 每项只有 `name` 和可选 `description`,按名称排序、不重复、数量和长度有上限,违反时安装校验直接拒绝(`shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json` 有对应用例)。清单按“整行前缀”匹配,已经完整输入的命令不再提示。适配器会实时补全时(如 lldb-dap)清单只用来补它没覆盖的命令,同名候选只显示一次,适配器的顺序在前。 - **候选替换哪一段,规则固定。** 适配器给了 `start` / `length` 就照它的;没给(lldb-dap 就不给)时,替换“输入末尾与候选开头重合的最长一段”,忽略大小写;一点都不重合则在光标处插入。这条规则在 `DebugConsoleCompletion.swift`,有 10 条测试固定。改它要同时改 `DebugConsoleCompletionTests.swift`。 - **插件可以声明命令前缀,宿主只搬运不理解。** lldb-dap 在行首会把 C++ 关键字和类型(`long`、`int16_t`、`const`)和命令混在一起,这些词一执行就是 `evaluate` 失败;在行首加反引号它才只返回命令。这个差异属于适配器,所以由插件在 `debugAdapters[].console.commandPrefix` 里声明(1–8 个字符,不含空白和控制字符,可以和 `commands` 同时出现,两者至少有一个)。宿主只在发补全请求时把前缀拼到整行前面(行首已有就不拼),光标按前缀的 UTF-16 长度后移,适配器回来的 `start` / `length` 再减回去(`DebugConsoleCompletion.adapterRequest` / `restoring`)。用户看到和执行的行永远不带前缀。代价是行首位置拿不到变量名补全,`p to` 这类带命令的输入不受影响。 - **候选说明只取第一行。** lldb-dap 把整段帮助文字拼进标签,弹层一行放不下;`DebugConsoleCompletion` 取第一个非空行作为说明,完整文字不进弹层。 diff --git a/.agents/notes/implemented/feature/2026-10-31-macos-ide-editor-settings-import.md b/.agents/notes/implemented/feature/2026-10-31-macos-ide-editor-settings-import.md index 3829190ca8..df35f6bccc 100644 --- a/.agents/notes/implemented/feature/2026-10-31-macos-ide-editor-settings-import.md +++ b/.agents/notes/implemented/feature/2026-10-31-macos-ide-editor-settings-import.md @@ -239,7 +239,7 @@ VS Code 移除规则按上游解析器的两阶段行为处理:只移除指定 开发者怎么做: - 修改 VS Code 或 IDEA 的解析、命令映射、参考默认键:在独立插件仓库改,不在本仓库加回解析代码或插件目录。 -- 修改通用的 `keymapImportProviders` 契约、快照、规划或多提供方拒绝:在本仓库改,测试使用契约 fixture `shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json`,并在插件仓库用新 Core 重跑端到端测试。 +- 修改通用的 `keymapImportProviders` 契约、快照、规划或多提供方拒绝:在本仓库改,测试使用契约 fixture `shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json`,并在插件仓库用新 Core 重跑端到端测试。 - 不要把任何插件 ID 写进宿主信任策略或界面分支。反例:为了让某个插件“看起来是官方的”,在 `trustPolicy(for:)` 里按 ID 返回固定策略。 验证:插件仓库 CI 用真实 Lithe Core 运行插件包,覆盖 VS Code 与 IDEA 导入、失败、`plugins.operation.finished` 与 `plugins.operation.failed` 日志事实不含导入内容,以及插件包在运行前后不变。宿主没有官方插件再带打包后端,`scripts/plugins/verify-official-plugins.sh` 改为在 Java Support 包的临时副本里注入后端声明,继续检查已声明后端可通过、未声明原生代码、缺失后端和越出包目录的路径都会被拒绝。 diff --git a/.agents/notes/proposed/architecture/2026-10-22-unified-vcs-provider-model.md b/.agents/notes/proposed/architecture/2026-10-22-unified-vcs-provider-model.md index a2b77a18bd..7fc098642d 100644 --- a/.agents/notes/proposed/architecture/2026-10-22-unified-vcs-provider-model.md +++ b/.agents/notes/proposed/architecture/2026-10-22-unified-vcs-provider-model.md @@ -133,7 +133,7 @@ P2 已完成(2026-10-23),同日改为社区插件: - 插件在独立仓库 [lithe-plugin-svn](https://github.com/Lithe-IDEA/lithe-plugin-svn),ID 是 `io.github.lithe-idea.svn-support`,`vendor.signatureRequirement` 为 `none`。仓库结构照搬 [Cargo 插件](../../implemented/feature/2026-10-22-cargo-build-plugin.md):`sdk.lock.json` 按上游提交和逐文件 SHA-256 固定 Node SDK,打包前校验;安装包发在插件仓库的 GitHub Releases,Lithe Store 索引记录下载地址和 SHA-256。 - 插件仓库自己的 CI 按 `sdk.lock.json` 的同一个宿主提交检出 Core,经公开 JSON 接口在 `svnadmin create` 建立的 `file://` 仓库上跑状态、提交、更新、冲突、回滚、移动、历史和 Annotate。svn 怎样映射到每个操作、svn 错误码怎样映射到契约错误码,都写在插件仓库的 README 里,主仓库的契约只留一个指向。 -- 主仓库不再有 SVN 专属的代码和测试,CI 也不用装 svn。它保留通用的部分:契约、fixtures 和 Core 测试,以及宿主测试用的 `shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json`(只有清单,没有实现)。样例 Provider `sample-vcs` 和它的端到端场景随 SDK 在 lithe-plugin-docs。 +- 主仓库不再有 SVN 专属的代码和测试,CI 也不用装 svn。它保留通用的部分:契约、fixtures 和 Core 测试,以及宿主测试用的 `shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json`(只有清单,没有实现)。样例 Provider `sample-vcs` 和它的端到端场景随 SDK 在 lithe-plugin-docs。 正确做法:主仓库改 VCS 契约或 Core 时,用 fixtures 和 Core 测试验证,合并前在 lithe-plugin-docs 用 `scripts/sdk-e2e.mjs --ref <分支>` 跑样例 Provider;SVN 插件升级 `sdk.lock.json` 后在自己的 CI 里验证。 不要这样做:在主仓库测试里引用隔壁的 SVN 插件 checkout,或者为 SVN 在宿主代码里加按名字判断的分支。 diff --git a/.agents/notes/proposed/architecture/2026-10-25-unified-debug-engine-and-adapter-registry.md b/.agents/notes/proposed/architecture/2026-10-25-unified-debug-engine-and-adapter-registry.md index d03ca01b47..ff953e84cf 100644 --- a/.agents/notes/proposed/architecture/2026-10-25-unified-debug-engine-and-adapter-registry.md +++ b/.agents/notes/proposed/architecture/2026-10-25-unified-debug-engine-and-adapter-registry.md @@ -99,7 +99,7 @@ Registry 注册时不启动程序做验证。一个适配器在接入验收中 ### 5. Registry 与插件声明 -完整字段和拒绝规则见[正式调试适配器契约](../../../../shared/contracts/plugins/v1/README.md#api-level-4-debug-adapters)、[清单 schema](../../../../shared/contracts/plugins/v1/plugin-manifest.schema.json) 和[拒绝 fixtures](../../../../shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json),这里只记录决策: +完整字段和拒绝规则见[正式调试适配器契约](../../../../shared/contracts/plugins/v1/README.md#api-level-4-debug-adapters)、[清单 schema](../../../../shared/contracts/plugins/v1/plugin-manifest.schema.json) 和[拒绝 fixtures](../../../../shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json),这里只记录决策: - 插件只写一个 `plugin.json.debugAdapters` 块,必填 `id`、`displayName`、`launch`。`launch` 由两部分组成:复用 `serverProcess` 的进程,加上 `stdio`、`tcpAnnounced` 或 `tcpPort` 三种传输之一;调试服务寄居在同一插件的语言服务器里时(Java Debug Server 之于 JDT LS),改用 `tcpLanguageServer`,此时没有 `process`,只有 `endpoint`。 - 拟定 API 4、`requires.debugAdapters: 1`、`debug.launch` / `debug.attach` 权限。需要 Run 选中的运行时时,使用 `serverProcess: 2` 的 `runSelectedRuntime`。 @@ -135,7 +135,7 @@ macOS 多会话(本阶段):宿主在 `DebugAdapterSessionManager` 里实 `makeChildSession` 是可选覆盖:默认子会话就是 provider 的 `makeSession` 再开一个会话,宿主因此总会声明 `supportsStartDebuggingRequest`。这是有意取舍:旧调试内核要整体被替换,不为兼容旧行为保留休眠开关。代价是 debugpy 这类通过 `connect` 主机和端口附加的适配器,在没有 TCP 子会话传输前,子会话会被忽略该端点,多进程 Python 调试暂时不可用;由具体语言插件覆盖 `makeChildSession` 补上。Swift 侧仍未消费 `projection`、`childSession*` 与 `disabledCapabilities`。 -P3 的声明层已在 Rust Core 落地:`plugin.json.debugAdapters[]` 作为插件 API 4 进入正式契约(`shared/contracts/plugins/v1/`),`debug/adapters.rs` 校验声明、安装包资源和启动计划,C01–C09、S01–S02 拒绝用例由 `fixtures/debug-adapter-rejections.json` 驱动 Core 测试。启动计划与安装检查由 macOS 声明式 Provider 接入(先 stdio + launch)。 +P3 的声明层已在 Rust Core 落地:`plugin.json.debugAdapters[]` 作为插件 API 4 进入正式契约(`shared/contracts/plugins/v1/`),`debug/adapters.rs` 校验声明、安装包资源和启动计划,C01–C09、S01–S02 拒绝用例由 `fixtures/debug-adapters/debug-adapter-rejections.json` 驱动 Core 测试。启动计划与安装检查由 macOS 声明式 Provider 接入(先 stdio + launch)。 macOS 声明式 Provider: - Rust Core 新增 `languageServerLaunchPlan` 的 `debugAdapterID` 选择器和 `debug.adapters.startArguments` 命令;后者按 manifest、adapterID、request 与事实(注册代次、目标、运行时选择)返回启动参数,拒绝码为 `debug.provider.stale`、`debug.request.unsupported`、`debug.runtime.stale`、`debug.target.invalid`、`plugin.launch.unavailable`。 diff --git a/.agents/notes/proposed/architecture/2026-10-31-plugin-injected-toolchains.md b/.agents/notes/proposed/architecture/2026-10-31-plugin-injected-toolchains.md index b8c256761e..ddda0d6dcc 100644 --- a/.agents/notes/proposed/architecture/2026-10-31-plugin-injected-toolchains.md +++ b/.agents/notes/proposed/architecture/2026-10-31-plugin-injected-toolchains.md @@ -153,7 +153,7 @@ macOS 的声明式路线由 `MacToolchainDiscovery` 执行,宿主不认识任 阶段 3 清理 `ProjectRuntimeService` 的专属选择链和 `project-jdk`、`project-maven` 等被替代引用前,须按 [Java/Maven 迁移清单](2026-10-26-maven-java-domain-plugin-migration.md)核对真实消费者和数据迁移。Node、Go、Python 等在其插件声明定义之前保持当前实现,不新增特判;不能在本次提案删除仍在生产使用的代码,或用永久兼容别名伪装迁移完成。 -契约草案位于 `shared/contracts/plugins/v1/proposals/toolchains/`,其中尚未实现的消费者启动、查询客户端和界面行为继续保留未支持标记。Core 已实现的清单贡献和命令由本次正式契约单独说明,不把草案全集直接当作能力承诺;旧 `local-v1` schema 与 Run 配置读写路径保持不变,新 Core 固定解析入口只处理调用方传入的 JSON,不打开文件或保存忽略规则。合并后在插件文档仓库按合并的 `preview` 提交执行 `node scripts/contract.mjs sync --revision `;实际插件后端协议接入时同步 Node/Java SDK,并在合并前执行 SDK 端到端验证。每阶段的功能矩阵只记录实际实现和目标平台运行证据,不把本提案或 Core 单元测试当作 Windows 已完成。 +契约草案位于 `shared/contracts/plugins/v1/toolchains/proposal/`,其中尚未实现的消费者启动、查询客户端和界面行为继续保留未支持标记。Core 已实现的清单贡献和命令由本次正式契约单独说明,不把草案全集直接当作能力承诺;旧 `local-v1` schema 与 Run 配置读写路径保持不变,新 Core 固定解析入口只处理调用方传入的 JSON,不打开文件或保存忽略规则。合并后在插件文档仓库按合并的 `preview` 提交执行 `node scripts/contract.mjs sync --revision `;实际插件后端协议接入时同步 Node/Java SDK,并在合并前执行 SDK 端到端验证。每阶段的功能矩阵只记录实际实现和目标平台运行证据,不把本提案或 Core 单元测试当作 Windows 已完成。 ## 风险 diff --git a/macos/Experiments/Monaco/workbench.integration.ts b/macos/Experiments/Monaco/workbench.integration.ts index 7dc5779f90..d1469c9b01 100644 --- a/macos/Experiments/Monaco/workbench.integration.ts +++ b/macos/Experiments/Monaco/workbench.integration.ts @@ -27,7 +27,7 @@ import { contextMenuCases } from "./context-menu.integration"; import { IContextMenuService } from "monaco-editor/esm/vs/platform/contextview/browser/contextView.js"; import { installPluginGrammar } from "@lithe/editor/plugin-grammar-tokenizer"; import { attachPluginEditorActions } from "@lithe/editor/plugin-editor-actions"; -import httpGrammarSource from "../../../shared/contracts/plugins/v1/fixtures/grammars/http.monarch.json" with { type: "text" }; +import httpGrammarSource from "../../../shared/contracts/plugins/v1/fixtures/languages/grammars/http.monarch.json" with { type: "text" }; import { imeInputCases } from "./ime-input.integration"; import basicHighlighting from "../../../shared/fixtures/editor/basic-file-highlighting-v1.json"; import { toMonacoLanguageId } from "@lithe/editor/language"; diff --git a/macos/Tests/LitheTests/BuildNativeConfigurationTests.swift b/macos/Tests/LitheTests/BuildNativeConfigurationTests.swift index 4ebb080947..446ae8ba49 100644 --- a/macos/Tests/LitheTests/BuildNativeConfigurationTests.swift +++ b/macos/Tests/LitheTests/BuildNativeConfigurationTests.swift @@ -238,7 +238,7 @@ private struct NativeConfigurationFixture { file = root.appendingPathComponent("settings.xml") try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true) let manifest = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent( - "shared/contracts/plugins/v1/fixtures/build-provider-configuration.plugin.json")) + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-configuration.plugin.json")) target = BuildSystemTarget(manifest: manifest, buildSystemID: "gradle") try Data(original.utf8).write(to: file) } diff --git a/macos/Tests/LitheTests/BuildToolProviderResolutionTests.swift b/macos/Tests/LitheTests/BuildToolProviderResolutionTests.swift index a117c8b6f2..cb8cf00631 100644 --- a/macos/Tests/LitheTests/BuildToolProviderResolutionTests.swift +++ b/macos/Tests/LitheTests/BuildToolProviderResolutionTests.swift @@ -97,7 +97,7 @@ struct BuildToolProviderResolutionTests { } private static func source(root: URL) throws -> BuildSystemPluginSource { - let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json") + let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json") var manifest = try #require(JSONSerialization.jsonObject(with: Data(contentsOf: fixture)) as? [String: Any]) manifest["requires"] = ["buildSystems": 1, "buildProviders": 1, "executableResolution": 1, "settings": 2, "serverProcess": 1] manifest["permissions"] = ["process.build", "languageServer.launch"] diff --git a/macos/Tests/LitheTests/DebugExecutableResolverTests.swift b/macos/Tests/LitheTests/DebugExecutableResolverTests.swift index 26e33529a2..dc9470fd99 100644 --- a/macos/Tests/LitheTests/DebugExecutableResolverTests.swift +++ b/macos/Tests/LitheTests/DebugExecutableResolverTests.swift @@ -18,7 +18,7 @@ struct DebugExecutableResolverTests { private func installedFixture() throws -> InstalledPluginPackage { let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json") let descriptor = try DeclarativePluginTestSupport.operations.validate( manifest: Data(contentsOf: fixture) ) diff --git a/macos/Tests/LitheTests/DeclarativeDebugAdapterConsoleTests.swift b/macos/Tests/LitheTests/DeclarativeDebugAdapterConsoleTests.swift index 87b1543a58..01ef239741 100644 --- a/macos/Tests/LitheTests/DeclarativeDebugAdapterConsoleTests.swift +++ b/macos/Tests/LitheTests/DeclarativeDebugAdapterConsoleTests.swift @@ -8,7 +8,7 @@ struct DeclarativeDebugAdapterConsoleTests { @Test func hostReceivesTheCommandsTheCoreNormalizedFromTheContractFixture() throws { let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json") let descriptor = try DeclarativePluginTestSupport.operations.validate( manifest: Data(contentsOf: fixture) ) diff --git a/macos/Tests/LitheTests/IdeCapabilitiesTests.swift b/macos/Tests/LitheTests/IdeCapabilitiesTests.swift index 54e275180c..fd40e3f414 100644 --- a/macos/Tests/LitheTests/IdeCapabilitiesTests.swift +++ b/macos/Tests/LitheTests/IdeCapabilitiesTests.swift @@ -143,7 +143,7 @@ struct IdeCapabilitiesTests { .deletingLastPathComponent().deletingLastPathComponent() let core = RustCoreBridge() let descriptor = try RustDeclarativePluginOperations(core: core).validate(manifest: Data(contentsOf: - repository.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-provider-execution.plugin.json"))) + repository.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-provider-execution.plugin.json"))) let source = BuildSystemPluginSource(pluginID: descriptor.id.rawValue, manifest: descriptor.normalizedManifest, packageURL: fixture.root, buildSystems: descriptor.buildSystems) let provider = CapabilityBuildProviderFixture(exitCode: exitCode) diff --git a/macos/Tests/LitheTests/LanguageExtensionProcessLifecycleTests.swift b/macos/Tests/LitheTests/LanguageExtensionProcessLifecycleTests.swift index cb42d43f9d..e764d172ed 100644 --- a/macos/Tests/LitheTests/LanguageExtensionProcessLifecycleTests.swift +++ b/macos/Tests/LitheTests/LanguageExtensionProcessLifecycleTests.swift @@ -156,7 +156,7 @@ struct LanguageExtensionProcessLifecycleTests { defer { try? FileManager.default.removeItem(at: root) } let operations = DeclarativePluginTestSupport.operations let descriptor = try operations.validate(manifest: Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/language-host-integration.plugin.json"))) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/languages/language-host-integration.plugin.json"))) let packageURL = root.appendingPathComponent("package", isDirectory: true) let installed = InstalledPluginPackage( descriptor: descriptor, diff --git a/macos/Tests/LitheTests/LanguageToolEnvironmentTests.swift b/macos/Tests/LitheTests/LanguageToolEnvironmentTests.swift index b350f700a7..ea007e2288 100644 --- a/macos/Tests/LitheTests/LanguageToolEnvironmentTests.swift +++ b/macos/Tests/LitheTests/LanguageToolEnvironmentTests.swift @@ -88,7 +88,7 @@ struct LanguageToolEnvironmentTests { @Test func aRuntimeLaunchWithoutDependenciesStillNamesItsLaunchRuntime() throws { let manifest = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json")) let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: manifest) let server = try #require(descriptor.languageServers.first) diff --git a/macos/Tests/LitheTests/MacBuildProviderSessionsTests.swift b/macos/Tests/LitheTests/MacBuildProviderSessionsTests.swift index db83ba8dc0..9ad5ebc0d3 100644 --- a/macos/Tests/LitheTests/MacBuildProviderSessionsTests.swift +++ b/macos/Tests/LitheTests/MacBuildProviderSessionsTests.swift @@ -936,7 +936,7 @@ private struct ProviderFixture { try FileManager.default.createDirectory(at: workspaceURL, withIntermediateDirectories: true) let fixtureURL = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json") var object = try #require( try JSONSerialization.jsonObject(with: Data(contentsOf: fixtureURL)) as? [String: Any] ) diff --git a/macos/Tests/LitheTests/MacBuildToolResolverTests.swift b/macos/Tests/LitheTests/MacBuildToolResolverTests.swift index bc04ac7a58..f0a29af41b 100644 --- a/macos/Tests/LitheTests/MacBuildToolResolverTests.swift +++ b/macos/Tests/LitheTests/MacBuildToolResolverTests.swift @@ -47,7 +47,7 @@ struct MacBuildToolResolverTests { let runtime = ProjectRuntimeService(runtimeLocator: CanonicalToolchainRuntimeLocator(), store: ToolchainPreferenceStore()) runtime.openProject(at: workspace) let resolver = MacBuildToolResolver(runtime: runtime, processRunner: MacProcessRunner(), fileStorage: MacFileStorage(), definedTools: defined) - let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json") + let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json") let text = try String(contentsOf: fixture, encoding: .utf8) .replacingOccurrences(of: "dev.lithe.fixture.build-toolchains:vm", with: "vm") .replacingOccurrences(of: "dev.lithe.fixture.build-toolchains:compiler", with: "compiler") diff --git a/macos/Tests/LitheTests/MacKeymapImportRecognitionTests.swift b/macos/Tests/LitheTests/MacKeymapImportRecognitionTests.swift index 29f7c602d0..d2c2640bde 100644 --- a/macos/Tests/LitheTests/MacKeymapImportRecognitionTests.swift +++ b/macos/Tests/LitheTests/MacKeymapImportRecognitionTests.swift @@ -9,7 +9,7 @@ struct MacKeymapImportRecognitionTests { try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true) defer { try? FileManager.default.removeItem(at: root) } let manifest = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let operations = RustKeymapImportOperations(core: RustCoreBridge()) let first = try operations.planSources(manifest: Data(contentsOf: manifest), providerID: "first") let second = try operations.planSources(manifest: Data(contentsOf: manifest), providerID: "second") diff --git a/macos/Tests/LitheTests/MacKeymapImportSnapshotTests.swift b/macos/Tests/LitheTests/MacKeymapImportSnapshotTests.swift index 9fd5d86722..8dc211041b 100644 --- a/macos/Tests/LitheTests/MacKeymapImportSnapshotTests.swift +++ b/macos/Tests/LitheTests/MacKeymapImportSnapshotTests.swift @@ -5,7 +5,7 @@ import Testing struct MacKeymapImportSnapshotTests { private func plan(_ providerID: String) throws -> KeymapImportSourcePlan { let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") return try RustKeymapImportOperations(core: RustCoreBridge()).planSources( manifest: Data(contentsOf: fixture), providerID: providerID ) diff --git a/macos/Tests/LitheTests/MacKeymapImportSnapshotsTests.swift b/macos/Tests/LitheTests/MacKeymapImportSnapshotsTests.swift index a658a09a34..6a9fdeb738 100644 --- a/macos/Tests/LitheTests/MacKeymapImportSnapshotsTests.swift +++ b/macos/Tests/LitheTests/MacKeymapImportSnapshotsTests.swift @@ -12,7 +12,7 @@ struct MacKeymapImportSnapshotsTests { defer { try? FileManager.default.removeItem(at: root) } try Data("bindings".utf8).write(to: root.appendingPathComponent("bindings.json")) let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let plan = try RustKeymapImportOperations(core: RustCoreBridge()).planSources( manifest: Data(contentsOf: fixture), providerID: "first" ) @@ -49,7 +49,7 @@ struct MacKeymapImportSnapshotsTests { defer { try? FileManager.default.removeItem(at: root) } try Data("bindings".utf8).write(to: root.appendingPathComponent("bindings.json")) let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let plan = try RustKeymapImportOperations(core: RustCoreBridge()).planSources( manifest: Data(contentsOf: fixture), providerID: "first" ) diff --git a/macos/Tests/LitheTests/MacPluginBackendSessionsTests.swift b/macos/Tests/LitheTests/MacPluginBackendSessionsTests.swift index e61ed4d327..465c8d6388 100644 --- a/macos/Tests/LitheTests/MacPluginBackendSessionsTests.swift +++ b/macos/Tests/LitheTests/MacPluginBackendSessionsTests.swift @@ -13,7 +13,7 @@ struct MacPluginBackendSessionsTests { @Test func shortcutImportProviderIDsComeFromThePluginManifest() throws { let fixture = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let manifest = try Data(contentsOf: fixture) #expect(MacPluginBackendSessions.keymapImportProviderIDs(ofManifest: manifest) == ["first", "second"]) #expect(MacPluginBackendSessions.isKeymapOnlyBackend(manifest: manifest)) @@ -310,7 +310,7 @@ private struct BackendFixture { packageURL = root.appendingPathComponent("package", isDirectory: true) stateRoot = root.appendingPathComponent("state", isDirectory: true) let fixtureURL = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/backend.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/backend/backend.plugin.json") var object = try #require( try JSONSerialization.jsonObject(with: Data(contentsOf: fixtureURL)) as? [String: Any] ) diff --git a/macos/Tests/LitheTests/PluginBuildOptionPersistenceTests.swift b/macos/Tests/LitheTests/PluginBuildOptionPersistenceTests.swift index 85fe13df36..d4c6c674c0 100644 --- a/macos/Tests/LitheTests/PluginBuildOptionPersistenceTests.swift +++ b/macos/Tests/LitheTests/PluginBuildOptionPersistenceTests.swift @@ -403,7 +403,7 @@ struct PluginBuildOptionPersistenceTests { try Data("[package]\nname = \"\(root)\"\nversion = \"0.1.0\"\n[features]\n\(feature) = []\n".utf8) .write(to: directory.appendingPathComponent("Cargo.toml")) } - let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/\(instanceScoped ? "build-instance-options" : "build-static-file").plugin.json") + let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-systems/\(instanceScoped ? "build-instance-options" : "build-static-file").plugin.json") var manifest = try #require(JSONSerialization.jsonObject(with: Data(contentsOf: fixture)) as? [String: Any]) var systems = try #require(manifest["buildSystems"] as? [[String: Any]]) var options = try #require(systems[0]["options"] as? [[String: Any]]) diff --git a/macos/Tests/LitheTests/PluginBundledPublisherTrustTests.swift b/macos/Tests/LitheTests/PluginBundledPublisherTrustTests.swift index 932766d8e3..af9c5070e9 100644 --- a/macos/Tests/LitheTests/PluginBundledPublisherTrustTests.swift +++ b/macos/Tests/LitheTests/PluginBundledPublisherTrustTests.swift @@ -294,7 +294,7 @@ struct PluginBundledPublisherTrustTests { bundled = host.appendingPathComponent("Contents/Resources/OfficialPlugins/dev.lithe.plugin.java-support") download = root.appendingPathComponent("download/dev.lithe.plugin.java-support") privateKey = try Curve25519.Signing.PrivateKey(rawRepresentation: Data(repeating: 9, count: 32)) - let url = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/publisher-bundled.plugin.json") + let url = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/package-trust/publisher-bundled.plugin.json") var object = try #require(JSONSerialization.jsonObject(with: Data(contentsOf: url)) as? [String: Any]) object["id"] = OfficialPluginCatalog.javaPluginID.rawValue manifest = object diff --git a/macos/Tests/LitheTests/PluginDebugAdapterTests.swift b/macos/Tests/LitheTests/PluginDebugAdapterTests.swift index 205052ba91..7e83eb1dc0 100644 --- a/macos/Tests/LitheTests/PluginDebugAdapterTests.swift +++ b/macos/Tests/LitheTests/PluginDebugAdapterTests.swift @@ -66,7 +66,7 @@ struct PluginDebugAdapterTests { let program = instance.appendingPathComponent("main") try Data("#!/bin/sh\nexit 0\n".utf8).write(to: program) try FileManager.default.setAttributes([.posixPermissions: 0o700], ofItemAtPath: program.path) - let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json") + let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json") let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: Data(contentsOf: fixture)) let package = InstalledPluginPackage(descriptor: descriptor, installation: PluginInstallationRecord( pluginID: descriptor.id, activeVersion: descriptor.pluginManifest.version, origin: .marketplace, status: .installed), @@ -326,7 +326,7 @@ struct PluginDebugAdapterTests { editLaunch: (inout [String: Any]) -> Void = { _ in } ) throws -> MacPluginLanguageServerLaunchResolver.DebugAdapterLaunch { let url = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/\(fixture).plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/debug-adapters/\(fixture).plugin.json") var manifest = try #require( try JSONSerialization.jsonObject(with: Data(contentsOf: url)) as? [String: Any] ) diff --git a/macos/Tests/LitheTests/PluginDiskInstallationTests.swift b/macos/Tests/LitheTests/PluginDiskInstallationTests.swift index caee8ddc2c..ad5aa46b09 100644 --- a/macos/Tests/LitheTests/PluginDiskInstallationTests.swift +++ b/macos/Tests/LitheTests/PluginDiskInstallationTests.swift @@ -73,7 +73,7 @@ struct PluginDiskInstallationTests { signatureRequirement: PluginSignatureRequirement = .unsigned ) throws -> URL { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/language-packaged-server.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/languages/language-packaged-server.plugin.json")) var manifest = try #require(JSONSerialization.jsonObject(with: data) as? [String: Any]) manifest["id"] = id.rawValue manifest["displayName"] = "Disk Fixture" @@ -368,7 +368,7 @@ struct PluginDiskInstallationTests { defer { try? FileManager.default.removeItem(at: fixture.root) } func webPackage(_ name: String, version: PluginVersion, content: String) throws -> URL { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/web-panel.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json")) let json = String(decoding: data, as: UTF8.self) .replacingOccurrences(of: "dev.lithe.fixture.web-panel", with: Self.pluginID.rawValue) var manifest = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) diff --git a/macos/Tests/LitheTests/PluginEditorLanguagesTests.swift b/macos/Tests/LitheTests/PluginEditorLanguagesTests.swift index 16de206ee0..b57c7e0083 100644 --- a/macos/Tests/LitheTests/PluginEditorLanguagesTests.swift +++ b/macos/Tests/LitheTests/PluginEditorLanguagesTests.swift @@ -10,8 +10,9 @@ import Testing @Suite("Plugin editor languages") @MainActor struct PluginEditorLanguagesTests { - private static let fixtures = DeclarativePluginTestSupport.repositoryRoot + private static let contractFixtures = DeclarativePluginTestSupport.repositoryRoot .appendingPathComponent("shared/contracts/plugins/v1/fixtures", isDirectory: true) + private static let fixtures = contractFixtures.appendingPathComponent("languages", isDirectory: true) @Test func browserGrammarFailuresKeepCppAndLongLanguageEvidence() throws { @@ -82,7 +83,7 @@ struct PluginEditorLanguagesTests { @Test func aStandaloneToolBackendPassesTheCatalogWithoutFakeUIOrLSP() throws { - let descriptor = try Self.descriptor("editor-actions") + let descriptor = try Self.descriptor("editor-actions", in: Self.contractFixtures.appendingPathComponent("editor", isDirectory: true)) #expect(descriptor.pluginManifest.modules.map(\.manifest.id) == [.backendExtension(descriptor.id.rawValue)]) #expect(descriptor.languages.isEmpty) #expect(descriptor.languageServers.isEmpty) @@ -190,9 +191,9 @@ struct PluginEditorLanguagesTests { #expect(messages.events.allSatisfy { type(of: $0).id == "plugins.grammar.rejected" }) } - private static func descriptor(_ name: String) throws -> DeclarativePluginDescriptor { + private static func descriptor(_ name: String, in directory: URL = fixtures) throws -> DeclarativePluginDescriptor { try DeclarativePluginTestSupport.operations.validate( - manifest: Data(contentsOf: fixtures.appendingPathComponent("\(name).plugin.json")) + manifest: Data(contentsOf: directory.appendingPathComponent("\(name).plugin.json")) ) } diff --git a/macos/Tests/LitheTests/PluginHostProcessIntegrationTests.swift b/macos/Tests/LitheTests/PluginHostProcessIntegrationTests.swift index 24ede9b28e..f54343cb20 100644 --- a/macos/Tests/LitheTests/PluginHostProcessIntegrationTests.swift +++ b/macos/Tests/LitheTests/PluginHostProcessIntegrationTests.swift @@ -35,7 +35,7 @@ struct PluginHostProcessIntegrationTests { let script = try Data(contentsOf: repository.appendingPathComponent("macos/Tests/LitheTests/Fixtures/PluginHostAPI/backend.mjs")) try script.write(to: package.appendingPathComponent("backend.mjs")) var manifest = try #require(JSONSerialization.jsonObject(with: Data(contentsOf: repository.appendingPathComponent( - "shared/contracts/plugins/v1/fixtures/command-backend.plugin.json"))) as? [String: Any]) + "shared/contracts/plugins/v1/fixtures/backend/command-backend.plugin.json"))) as? [String: Any]) manifest["backend"] = ["launch": ["kind": "runtime", "tool": "node", "entry": "backend.mjs"]] let manifestData = try JSONSerialization.data(withJSONObject: manifest, options: [.sortedKeys]) try manifestData.write(to: package.appendingPathComponent("plugin.json")) diff --git a/macos/Tests/LitheTests/PluginLanguageServerLaunchResolverTests.swift b/macos/Tests/LitheTests/PluginLanguageServerLaunchResolverTests.swift index c29ac8075e..cce31743de 100644 --- a/macos/Tests/LitheTests/PluginLanguageServerLaunchResolverTests.swift +++ b/macos/Tests/LitheTests/PluginLanguageServerLaunchResolverTests.swift @@ -653,7 +653,7 @@ struct PluginLanguageServerLaunchResolverTests { private func fixtureManifest(_ name: String) throws -> Data { try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/languages") .appendingPathComponent(name)) } diff --git a/macos/Tests/LitheTests/PluginLiveActivationTests.swift b/macos/Tests/LitheTests/PluginLiveActivationTests.swift index 4344c93a6f..943f8742d0 100644 --- a/macos/Tests/LitheTests/PluginLiveActivationTests.swift +++ b/macos/Tests/LitheTests/PluginLiveActivationTests.swift @@ -67,8 +67,9 @@ struct PluginLiveActivationTests { } @Test(arguments: [ - "language-packaged-server", "language-system-command", "build-provider", - "vcs-provider", "hello-lithe", "project-generator" + "languages/language-packaged-server", "languages/language-system-command", + "build-providers/build-provider", "vcs/vcs-provider", "manifest/hello-lithe", + "project-generators/project-generator" ]) func pluginsWithOtherContributionsStillNeedARestart(_ fixture: String) throws { let url = DeclarativePluginTestSupport.repositoryRoot diff --git a/macos/Tests/LitheTests/PluginManagerTests.swift b/macos/Tests/LitheTests/PluginManagerTests.swift index 3ddbc4dbde..d3ad290752 100644 --- a/macos/Tests/LitheTests/PluginManagerTests.swift +++ b/macos/Tests/LitheTests/PluginManagerTests.swift @@ -118,7 +118,7 @@ struct PluginManagerTests { // host declares `vcsProviders`, and one module carries its enablement. #expect(PluginManifest.hostCapabilities["vcsProviders"] == [1]) let manifest = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json")) let sample = try DeclarativePluginTestSupport.operations.validate(manifest: manifest) #expect(sample.vcsProviders == [DeclarativeVcsProvider(id: "svn", displayName: "Subversion")]) #expect(sample.pluginManifest.modules.map(\.manifest.id) == [.vcsProvidersExtension(sample.id.rawValue)]) diff --git a/macos/Tests/LitheTests/PluginMarketplaceServiceTests.swift b/macos/Tests/LitheTests/PluginMarketplaceServiceTests.swift index 32f73872b5..dffdcf3912 100644 --- a/macos/Tests/LitheTests/PluginMarketplaceServiceTests.swift +++ b/macos/Tests/LitheTests/PluginMarketplaceServiceTests.swift @@ -377,7 +377,7 @@ struct PluginMarketplaceServiceTests { @Test(arguments: ["build-provider", "build-provider-language-server"]) func buildProvidersAreAcceptedByTheMacOSHost(_ fixture: String) throws { let fixtures = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers") let manifest = try Data(contentsOf: fixtures.appendingPathComponent("\(fixture).plugin.json")) // The host declares `buildProviders`, so the requirement no longer // blocks the review; a rejection here would name another field. @@ -393,7 +393,7 @@ struct PluginMarketplaceServiceTests { func changedRunArgumentsNeedApprovalAgainAfterStorage() throws { let fixtures = DeclarativePluginTestSupport.repositoryRoot .appendingPathComponent("shared/contracts/plugins/v1/fixtures") - let original = try Data(contentsOf: fixtures.appendingPathComponent("language-packaged-server.plugin.json")) + let original = try Data(contentsOf: fixtures.appendingPathComponent("languages/language-packaged-server.plugin.json")) var manifest = try #require(JSONSerialization.jsonObject(with: original) as? [String: Any]) var providers = try #require(manifest["executionProviders"] as? [[String: Any]]) var run = try #require(providers[0]["run"] as? [String: Any]) diff --git a/macos/Tests/LitheTests/PluginNativeUITests.swift b/macos/Tests/LitheTests/PluginNativeUITests.swift index 8b3657cbf1..e1d2128680 100644 --- a/macos/Tests/LitheTests/PluginNativeUITests.swift +++ b/macos/Tests/LitheTests/PluginNativeUITests.swift @@ -45,7 +45,7 @@ struct PluginNativeUITests { private func formDeclaration(dynamic: Bool = false, disabled: Bool = false) throws -> PluginNativeUI { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/native-form.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/ui/native-form.plugin.json")) let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: data) let form = try #require(descriptor.pluginManifest.modules.flatMap(\.contributions).first { $0.nativeUI != nil }?.nativeUI) guard dynamic || disabled else { return form } @@ -186,7 +186,7 @@ struct PluginNativeUITests { private func publicControlsDeclaration() throws -> PluginNativeUI { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/native-controls.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/ui/native-controls.plugin.json")) let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: data) return try #require(descriptor.pluginManifest.modules.flatMap(\.contributions).compactMap(\.nativeUI).first) } @@ -298,7 +298,7 @@ struct PluginNativeUITests { @Test func sharedFixtureRegistersItsNativeRenderer() throws { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/native-panel.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/ui/native-panel.plugin.json")) let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: data) let window = try #require(descriptor.pluginManifest.modules.flatMap(\.contributions) .first(where: { $0.nativeUI != nil })) diff --git a/macos/Tests/LitheTests/PluginPackageStoreTests.swift b/macos/Tests/LitheTests/PluginPackageStoreTests.swift index 70726a96fb..322658c265 100644 --- a/macos/Tests/LitheTests/PluginPackageStoreTests.swift +++ b/macos/Tests/LitheTests/PluginPackageStoreTests.swift @@ -334,7 +334,7 @@ struct PluginPackageStoreTests { let store = makeStore(root: root) let package = root.appendingPathComponent("sources/backend", isDirectory: true) let fixtureURL = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/backend.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/backend/backend.plugin.json") let object = try #require(try JSONSerialization.jsonObject(with: Data(contentsOf: fixtureURL)) as? [String: Any]) _ = try DeclarativePluginTestSupport.writePackage(at: package, manifest: object) try FileManager.default.createDirectory(at: package.appendingPathComponent("ui"), withIntermediateDirectories: true) @@ -840,7 +840,7 @@ struct PluginPackageStoreTests { /// `launch` is given. A packaged launch gets an executable script. private func makeProviderPackage(root: URL, launch: [String: Any]?) throws -> URL { let fixtureURL = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json") var manifest = try #require( try JSONSerialization.jsonObject(with: Data(contentsOf: fixtureURL)) as? [String: Any] ) diff --git a/macos/Tests/LitheTests/PluginSettingsTests.swift b/macos/Tests/LitheTests/PluginSettingsTests.swift index 97cf6c7ac6..ba42b8ac52 100644 --- a/macos/Tests/LitheTests/PluginSettingsTests.swift +++ b/macos/Tests/LitheTests/PluginSettingsTests.swift @@ -385,18 +385,18 @@ struct PluginSettingsTests { let package = try temporaryDirectory() defer { try? FileManager.default.removeItem(at: package) } let manifest = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json")) try manifest.write(to: package.appendingPathComponent("plugin.json")) try await body(makeManager( settings: MacPluginSettingsStore(store: SettingsKeyValueStore()), - fixture: "settings-v2.plugin.json", + fixture: "settings/settings-v2.plugin.json", packageURL: package )) } private func makeManager( settings: any PluginSettingsStoring, - fixture: String = "node-runtime.plugin.json", + fixture: String = "languages/node-runtime.plugin.json", packageURL: URL = FileManager.default.temporaryDirectory ) throws -> MacPluginManager { let descriptor = try DeclarativePluginTestSupport.operations.validate( diff --git a/macos/Tests/LitheTests/PluginSignatureVectorTests.swift b/macos/Tests/LitheTests/PluginSignatureVectorTests.swift index ff0d3fbb72..b5ef663172 100644 --- a/macos/Tests/LitheTests/PluginSignatureVectorTests.swift +++ b/macos/Tests/LitheTests/PluginSignatureVectorTests.swift @@ -6,7 +6,7 @@ import Testing /// Cross-platform acceptance for the package signature: the same fixed /// vectors answer identically on Swift/CryptoKit and the Windows Rust host. /// The vectors live in -/// `shared/contracts/plugins/v1/fixtures/signature-vectors.json` and anchor +/// `shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json` and anchor /// the Ed25519 primitive to the public RFC 8032 test key, so neither /// platform's own round-trip can drift. /// @@ -42,7 +42,7 @@ struct PluginSignatureVectorTests { private static func fixture() throws -> Fixture { let url = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/signature-vectors.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json") return try JSONDecoder().decode(Fixture.self, from: Data(contentsOf: url)) } diff --git a/macos/Tests/LitheTests/PluginUIIconTests.swift b/macos/Tests/LitheTests/PluginUIIconTests.swift index e4f928242d..14d3bf284a 100644 --- a/macos/Tests/LitheTests/PluginUIIconTests.swift +++ b/macos/Tests/LitheTests/PluginUIIconTests.swift @@ -13,7 +13,7 @@ import LitheSearchModule struct PluginUIIconTests { private func manifest(icon: [String: Any]?) throws -> Data { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json")) var object = try #require(JSONSerialization.jsonObject(with: data) as? [String: Any]) var ui = try #require(object["ui"] as? [String: Any]) for key in ["toolWindows", "commands"] { diff --git a/macos/Tests/LitheTests/PluginWebBridgeTests.swift b/macos/Tests/LitheTests/PluginWebBridgeTests.swift index a1ba46565c..3d77b3becb 100644 --- a/macos/Tests/LitheTests/PluginWebBridgeTests.swift +++ b/macos/Tests/LitheTests/PluginWebBridgeTests.swift @@ -422,7 +422,7 @@ struct PluginWebBridgeTests { @Test func cargoExampleSelectionReachesTheRealCorePlan() async throws { let manifest = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-static-file.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-systems/build-static-file.plugin.json")) let descriptor = try DeclarativePluginTestSupport.operations.validate(manifest: manifest) let source = BuildSystemPluginSource( pluginID: descriptor.id.rawValue, manifest: descriptor.normalizedManifest, @@ -960,7 +960,7 @@ struct PluginWebPackageTests { try FileManager.default.createDirectory(at: package.appendingPathComponent("ui"), withIntermediateDirectories: true) try FileManager.default.createDirectory(at: package.appendingPathComponent("icons"), withIntermediateDirectories: true) try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/web-panel.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json")) .write(to: package.appendingPathComponent("plugin.json")) try Data(#""#.utf8) .write(to: package.appendingPathComponent("icons/panel.svg")) diff --git a/macos/Tests/LitheTests/ProviderWorkflowPresentationTests.swift b/macos/Tests/LitheTests/ProviderWorkflowPresentationTests.swift index 73688c7197..3e22d96407 100644 --- a/macos/Tests/LitheTests/ProviderWorkflowPresentationTests.swift +++ b/macos/Tests/LitheTests/ProviderWorkflowPresentationTests.swift @@ -34,7 +34,7 @@ struct ProviderWorkflowPresentationTests { let model = AppModel(settings: settings, services: container.services) let core = RustCoreBridge() let descriptor = try RustDeclarativePluginOperations(core: core).validate(manifest: Data(contentsOf: - DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json"))) + DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json"))) let source = BuildSystemPluginSource(pluginID: descriptor.id.rawValue, manifest: descriptor.normalizedManifest, packageURL: root, buildSystems: descriptor.buildSystems) let service = BuildSystemService(planner: RustBuildSystemOperations(core: core), tools: PresentationBuildTools(), diff --git a/macos/Tests/LitheTests/RemotePluginLaunchPreparerTests.swift b/macos/Tests/LitheTests/RemotePluginLaunchPreparerTests.swift index 5e53589391..d6b9130b70 100644 --- a/macos/Tests/LitheTests/RemotePluginLaunchPreparerTests.swift +++ b/macos/Tests/LitheTests/RemotePluginLaunchPreparerTests.swift @@ -88,7 +88,7 @@ private struct LaunchFixture { init() throws { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json")) let validated = try DeclarativePluginTestSupport.operations.validate(manifest: data) let settings = InMemoryPluginSettings() settings.setValue(.integer(4096), forSetting: "heapMB", plugin: validated.id.rawValue) diff --git a/macos/Tests/LitheTests/RustBuildSystemOperationsTests.swift b/macos/Tests/LitheTests/RustBuildSystemOperationsTests.swift index 61295ec4e5..2fee949d45 100644 --- a/macos/Tests/LitheTests/RustBuildSystemOperationsTests.swift +++ b/macos/Tests/LitheTests/RustBuildSystemOperationsTests.swift @@ -12,7 +12,7 @@ struct RustBuildSystemOperationsTests { @Test func descriptorPreservesGenericPreparationWithoutPrescribingTaskIDs() throws { - let source = try Self.source("build-provider-preparation") + let source = try Self.source("build-providers/build-provider-preparation") let tasks = try #require(source.buildSystems.first?.tasks) #expect(tasks.map(\.id) == ["prepare-assets", "prepare-specs"]) #expect(tasks.map(\.preparation) == [ @@ -23,7 +23,7 @@ struct RustBuildSystemOperationsTests { @Test func providerReportsTravelInlineAndKeepRepeatedCasesInTheirProject() throws { - let source = try Self.source("build-provider-reports") + let source = try Self.source("build-providers/build-provider-reports") let target = BuildSystemTarget(manifest: source.manifest, buildSystemID: "gradle") #expect(source.buildSystems.first?.providerTestReports == true) let workspace = FileManager.default.temporaryDirectory.appendingPathComponent("provider-reports-" + UUID().uuidString) @@ -45,7 +45,7 @@ struct RustBuildSystemOperationsTests { @Test func descriptorDeclaresBuildSystemsAndTheirModule() throws { - let descriptor = try Self.descriptor("build-static-file") + let descriptor = try Self.descriptor("build-systems/build-static-file") let cargo = try #require(descriptor.buildSystems.first) #expect(cargo.id == "cargo") @@ -59,7 +59,7 @@ struct RustBuildSystemOperationsTests { #expect(descriptor.pluginManifest.modules.map(\.manifest.id) .contains(.buildSystemsExtension(descriptor.id.rawValue))) - let maven = try #require(Self.descriptor("build-host-integration").buildSystems.first) + let maven = try #require(Self.descriptor("build-systems/build-host-integration").buildSystems.first) #expect(maven.modelSource == .hostIntegration) // A host-integration dependency source declares no scopes of its own. #expect(maven.dependencyScopes == [.workspace, .project]) @@ -69,7 +69,7 @@ struct RustBuildSystemOperationsTests { func detectionReadsStaticModelAndResolvesOptions() throws { let workspace = try Self.cargoWorkspace() defer { try? FileManager.default.removeItem(at: workspace) } - let source = try Self.source("build-static-file") + let source = try Self.source("build-systems/build-static-file") let detection = try operations.detect( workspaceURL: workspace, @@ -103,7 +103,7 @@ struct RustBuildSystemOperationsTests { @Test func invocationUsesTheGlobalExecutableSetting() throws { - let target = try Self.target("build-tool-path", "fixture") + let target = try Self.target("build-systems/build-tool-path", "fixture") let custom = try operations.invocationPlan(target, root: ".", settings: ["toolPath": .string("/opt/custom tools/build")]) #expect(custom.executables.first == .setting(id: "toolPath", path: "/opt/custom tools/build")) #expect(try operations.invocationPlan(target, root: ".").executables.first == .setting(id: "toolPath", path: nil)) @@ -111,7 +111,7 @@ struct RustBuildSystemOperationsTests { @Test func invocationAndVersionProbe() throws { - let target = try Self.target("build-static-file", "cargo") + let target = try Self.target("build-systems/build-static-file", "cargo") let invocation = try operations.invocationPlan(target, root: ".") #expect(invocation.executables == [.command("cargo")]) @@ -123,7 +123,7 @@ struct RustBuildSystemOperationsTests { let old = try operations.checkToolVersion(target, runtime: nil, output: "cargo 1.60.0 (d1fd9fe 2022-03-01)\n") #expect(old.satisfied == false) - let go = try Self.target("build-command-stdout", "go") + let go = try Self.target("build-systems/build-command-stdout", "go") let goInvocation = try operations.invocationPlan(go, root: ".") #expect(goInvocation.executables == [.runtime("go")]) #expect(goInvocation.runtimeDependencies.first?.hostManaged == true) @@ -134,7 +134,7 @@ struct RustBuildSystemOperationsTests { @Test func providerTaskPlanCarriesSelectionWithoutHostArguments() throws { - let target = try Self.target("build-provider-execution", "gradle") + let target = try Self.target("build-providers/build-provider-execution", "gradle") let plan = try operations.taskPlan( target, context: BuildPlanContext(root: ".", options: ["offline": .bool(true)]), request: BuildTaskRequest(task: "build", project: BuildSelection(name: "app", path: "app")) @@ -155,15 +155,15 @@ struct RustBuildSystemOperationsTests { @Test func providerServiceOptionsRoundTripThroughRealCoreAndRejectMissingChoices() throws { - let descriptor = try Self.descriptor("build-provider-run-options") + let descriptor = try Self.descriptor("build-providers/build-provider-run-options") #expect(descriptor.buildSystems.first?.providerRuns.first?.execution == .service) - let target = try Self.target("build-provider-run-options", "gradle") + let target = try Self.target("build-providers/build-provider-run-options", "gradle") let workspace = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString, isDirectory: true) defer { try? FileManager.default.removeItem(at: workspace) } for path in ["app", "tools"] { try FileManager.default.createDirectory(at: workspace.appendingPathComponent(path), withIntermediateDirectories: true) } struct Fixture: Decodable { let launchOptions: BuildLaunchOptions; let result: ToolingJSONValue } let fixture = try JSONDecoder().decode(Fixture.self, from: Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-run-options.json"))) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json"))) let planner: any BuildSystemPlanning = operations let project = BuildSelection(name: "app", path: "app") let selected = BuildSelection(name: "Main", path: "app", tags: ["application"]) @@ -188,9 +188,9 @@ struct RustBuildSystemOperationsTests { @Test func providerRunPreparationRoundTripsThroughRealCore() throws { - let descriptor = try Self.descriptor("build-provider-run-preparation") + let descriptor = try Self.descriptor("build-providers/build-provider-run-preparation") #expect(descriptor.buildSystems.first?.providerRuns.map(\.id) == ["application"]) - let target = try Self.target("build-provider-run-preparation", "gradle") + let target = try Self.target("build-providers/build-provider-run-preparation", "gradle") let workspace = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString, isDirectory: true) defer { try? FileManager.default.removeItem(at: workspace) } try FileManager.default.createDirectory(at: workspace.appendingPathComponent("app"), withIntermediateDirectories: true) @@ -224,7 +224,7 @@ struct RustBuildSystemOperationsTests { let arguments = try #require(inputs.opaqueReferenceArguments) let options = inputs.opaqueReferenceArguments == nil ? inputs.launchOptions : nil #expect((options != nil) == fixture.expected.applicationReferenceUsesLaunchOptions) - let target = try Self.target("build-provider-run-preparation", "gradle") + let target = try Self.target("build-providers/build-provider-run-preparation", "gradle") let workspace = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString, isDirectory: true) defer { try? FileManager.default.removeItem(at: workspace) } try FileManager.default.createDirectory(at: workspace.appendingPathComponent("app"), withIntermediateDirectories: true) @@ -244,7 +244,7 @@ struct RustBuildSystemOperationsTests { let inputs = ProviderLaunchInputs(buildSystemID: "gradle", provider: "application", projectPath: "app", launchOptions: BuildLaunchOptions(execution: .application, runtimeArguments: ["-Xmx64m"], arguments: reference.userArguments), reference: reference) #expect(inputs.opaqueReferenceArguments == nil) - let target = try Self.target("build-provider-run-preparation", "gradle") + let target = try Self.target("build-providers/build-provider-run-preparation", "gradle") #expect(throws: (any Error).self) { try operations.prepareRunPlan(target, context: BuildPlanContext(root: ".", options: [:]), run: "application", project: BuildSelection(name: "app", path: "app"), selectedTarget: BuildSelection(name: "Main", path: "app", tags: ["application"]), @@ -254,9 +254,9 @@ struct RustBuildSystemOperationsTests { @Test func providerDebugPreparationRoundTripsThroughRealCore() throws { - let descriptor = try Self.descriptor("build-provider-debug-preparation") + let descriptor = try Self.descriptor("build-providers/build-provider-debug-preparation") #expect(descriptor.buildSystems.first?.providerRuns.first?.debugAdapter == "native") - let target = try Self.target("build-provider-debug-preparation", "gradle") + let target = try Self.target("build-providers/build-provider-debug-preparation", "gradle") let workspace = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString, isDirectory: true) defer { try? FileManager.default.removeItem(at: workspace) } let directory = workspace.appendingPathComponent("app", isDirectory: true) @@ -280,7 +280,7 @@ struct RustBuildSystemOperationsTests { @Test func providerTestPlanKeepsTypedFiltersAndReportPatterns() throws { - let target = try Self.target("build-provider-tests", "gradle") + let target = try Self.target("build-providers/build-provider-tests", "gradle") let plan = try operations.testPlan( target, context: BuildPlanContext(root: ".", options: ["offline": .bool(true)]), request: BuildTestRequest(project: BuildSelection(name: "app", path: "app"), @@ -298,15 +298,15 @@ struct RustBuildSystemOperationsTests { @Test func discoveredSelectorsRoundTripThroughTheRealCore() throws { - let descriptor = try Self.descriptor("build-provider-tests") + let descriptor = try Self.descriptor("build-providers/build-provider-tests") #expect(descriptor.buildSystems.first?.testDiscovery == true) - #expect(try Self.descriptor("build-static-file").buildSystems.first?.testDiscovery == false) - let target = try Self.target("build-provider-tests", "gradle") + #expect(try Self.descriptor("build-systems/build-static-file").buildSystems.first?.testDiscovery == false) + let target = try Self.target("build-providers/build-provider-tests", "gradle") let context = BuildPlanContext(root: ".", options: ["offline": .bool(true)]) let plan = try operations.testDiscoveryPlan(target, context: context) #expect(plan.method == "lithe/build/discoverTests") let fixture = try JSONDecoder().decode(ToolingJSONValue.self, from: Data(contentsOf: - DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-test-discovery.json"))) + DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-providers/build-test-discovery.json"))) guard case .object(let object) = fixture, let result = object["result"] else { Issue.record("Missing discovery result"); return } @@ -325,7 +325,7 @@ struct RustBuildSystemOperationsTests { @Test func taskAndTestPlansCarryOptionsAndSelection() throws { - let target = try Self.target("build-static-file", "cargo") + let target = try Self.target("build-systems/build-static-file", "cargo") let project = BuildModel.Project(id: "cargo:demo", path: "crates/demo", name: "demo") let context = BuildPlanContext(root: "crates/demo", options: ["release": .bool(true)]) @@ -370,7 +370,7 @@ struct RustBuildSystemOperationsTests { /// `refresh` and `tool` fields Core copies into the provider params. @Test func providerPlansCarryTheReloadReasonAndTheResolvedTool() throws { - let target = try Self.target("build-provider", "gradle") + let target = try Self.target("build-providers/build-provider", "gradle") let context = BuildPlanContext(root: ".", options: [:]) let executable = URL(fileURLWithPath: "/opt/tools/gradle/bin/gradle") @@ -395,7 +395,7 @@ struct RustBuildSystemOperationsTests { @Test func commandModelPlansAndDecodesStandardOutput() throws { - let target = try Self.target("build-command-stdout", "go") + let target = try Self.target("build-systems/build-command-stdout", "go") let workspace = URL(fileURLWithPath: "/tmp/lithe-go-workspace") let plan = try operations.modelPlan( @@ -425,7 +425,7 @@ struct RustBuildSystemOperationsTests { func diagnosticsAndSyncFingerprint() throws { let workspace = try Self.cargoWorkspace() defer { try? FileManager.default.removeItem(at: workspace) } - let target = try Self.target("build-static-file", "cargo") + let target = try Self.target("build-systems/build-static-file", "cargo") let diagnostics = try operations.decodeDiagnostics( target, @@ -459,7 +459,7 @@ struct RustBuildSystemOperationsTests { to: workspace.appendingPathComponent("gradle/wrapper/gradle-wrapper.properties") ) for kind in ["maven", "gradle"] { - var manifest = try #require(JSONSerialization.jsonObject(with: Self.fixtureData("build-host-integration")) as? [String: Any]) + var manifest = try #require(JSONSerialization.jsonObject(with: Self.fixtureData("build-systems/build-host-integration")) as? [String: Any]) var systems = try #require(manifest["buildSystems"] as? [[String: Any]]) systems[0]["languageImport"] = kind == "maven" ? ["kind": kind, "options": ["profiles": "profiles", "settingsFile": "settingsFile", "localRepository": "localRepository"]] @@ -487,14 +487,14 @@ struct RustBuildSystemOperationsTests { } } #expect(try operations.languageImport( - Self.target("build-static-file", "cargo"), workspaceURL: workspace, root: ".", options: [:], executableURL: nil + Self.target("build-systems/build-static-file", "cargo"), workspaceURL: workspace, root: ".", options: [:], executableURL: nil ) == nil) } @Test func modelInputsCrossTheRealCoreBridgeWithoutPrivatePlans() throws { - let producer = try Self.source("build-model-producer") - let consumer = try Self.source("build-model-consumer") + let producer = try Self.source("build-systems/build-model-producer") + let consumer = try Self.source("build-systems/build-model-consumer") #expect(producer.buildSystems.first?.sharesModel == true) #expect(consumer.buildSystems.first?.modelInputs == [.init(pluginID: producer.pluginID, buildSystemID: "source")]) let model = try JSONDecoder().decode(BuildModel.self, from: Data(""" diff --git a/macos/Tests/LitheTests/RustKeymapImportOperationsTests.swift b/macos/Tests/LitheTests/RustKeymapImportOperationsTests.swift index c6e4f02852..9bf15cc141 100644 --- a/macos/Tests/LitheTests/RustKeymapImportOperationsTests.swift +++ b/macos/Tests/LitheTests/RustKeymapImportOperationsTests.swift @@ -35,7 +35,7 @@ struct RustKeymapImportOperationsTests { @Test func plansOnlyTheSelectedProvidersDeclaredSources() throws { let manifest = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let operations = RustKeymapImportOperations(core: RustCoreBridge()) let plan = try operations.planSources(manifest: Data(contentsOf: manifest), providerID: "second") #expect(plan.inputs == [ diff --git a/macos/Tests/LitheTests/RustLanguageServerLaunchTests.swift b/macos/Tests/LitheTests/RustLanguageServerLaunchTests.swift index a42bb2e050..8a83d52004 100644 --- a/macos/Tests/LitheTests/RustLanguageServerLaunchTests.swift +++ b/macos/Tests/LitheTests/RustLanguageServerLaunchTests.swift @@ -41,7 +41,7 @@ struct RustLanguageServerLaunchTests { try session.start(rootURL: root, workspaceFingerprint: nil) try #require(await ready.waitUntilOpen(timeout: .seconds(5))) let manifestURL = DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json") + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json") let plan = try RustKeymapImportOperations(core: RustCoreBridge()).planSources( manifest: Data(contentsOf: manifestURL), providerID: "first") let snapshot = try MacKeymapImportSnapshot(root: source, plan: plan) diff --git a/macos/Tests/LitheTests/ToolchainPluginAdmissionTests.swift b/macos/Tests/LitheTests/ToolchainPluginAdmissionTests.swift index c107df753a..6969538085 100644 --- a/macos/Tests/LitheTests/ToolchainPluginAdmissionTests.swift +++ b/macos/Tests/LitheTests/ToolchainPluginAdmissionTests.swift @@ -10,7 +10,7 @@ import Testing @MainActor struct ToolchainPluginAdmissionTests { @Test func providerIsAvailableReviewedAndLoadedWithBackendEnablement() throws { - let manifest = try fixture("toolchain-provider.plugin.json") + let manifest = try fixture("toolchains/toolchain-provider.plugin.json") let descriptor = try checkAdmission(manifest) #expect(descriptor.declaresBackend) #expect(descriptor.pluginManifest.modules.map(\.manifest.id) == [.backendExtension(descriptor.id.rawValue)]) @@ -23,7 +23,7 @@ struct ToolchainPluginAdmissionTests { } @Test func standaloneDefinitionHasEnablementAndRequiresRestart() throws { - let descriptor = try checkAdmission(fixture("tool-definition.plugin.json")) + let descriptor = try checkAdmission(fixture("toolchains/tool-definition.plugin.json")) #expect(!descriptor.declaresBackend) #expect(descriptor.pluginManifest.modules.map(\.manifest.id) == [.toolchainsExtension(descriptor.id.rawValue)]) #expect(descriptor.pluginManifest.modules.allSatisfy { $0.manifest.defaultState == .disabled }) diff --git a/macos/Tests/LitheTests/ToolchainSettingsLoaderTests.swift b/macos/Tests/LitheTests/ToolchainSettingsLoaderTests.swift index 255d3ffaa7..584c4875ea 100644 --- a/macos/Tests/LitheTests/ToolchainSettingsLoaderTests.swift +++ b/macos/Tests/LitheTests/ToolchainSettingsLoaderTests.swift @@ -70,7 +70,7 @@ struct ToolchainSettingsLoaderTests { @Test func buildConsumersComeFromTheCurrentCoreInvocationAndDisappearWhenDisabled() async throws { let definition = try source() - let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json") + let fixture = DeclarativePluginTestSupport.repositoryRoot.appendingPathComponent("shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json") let data = Data(try String(contentsOf: fixture, encoding: .utf8) .replacingOccurrences(of: "dev.lithe.fixture.build-toolchains:compiler", with: "compiler").utf8) let build = ToolchainSettingsPluginSource(pluginID: "dev.lithe.fixture.build-toolchains", name: "Build fixture", diff --git a/macos/Tests/LitheTests/VcsProviderHostTests.swift b/macos/Tests/LitheTests/VcsProviderHostTests.swift index e27f701de6..44da844622 100644 --- a/macos/Tests/LitheTests/VcsProviderHostTests.swift +++ b/macos/Tests/LitheTests/VcsProviderHostTests.swift @@ -954,7 +954,7 @@ private enum VcsTestData { /// community plugin in its own repository. static func svnProviderManifest() throws -> Data { try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json")) } static func detection( diff --git a/macos/Tests/LitheTests/WorkbenchContributionHostTests.swift b/macos/Tests/LitheTests/WorkbenchContributionHostTests.swift index ba232e13a1..70dce74209 100644 --- a/macos/Tests/LitheTests/WorkbenchContributionHostTests.swift +++ b/macos/Tests/LitheTests/WorkbenchContributionHostTests.swift @@ -13,7 +13,7 @@ import LitheCoreContracts struct WorkbenchContributionHostTests { private func descriptor() throws -> DeclarativePluginDescriptor { let data = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json")) return try DeclarativePluginTestSupport.operations.validate(manifest: data) } @@ -710,7 +710,7 @@ struct WorkbenchContributionHostTests { let package = root.appendingPathComponent("source") try FileManager.default.createDirectory(at: package, withIntermediateDirectories: true) let source = try Data(contentsOf: DeclarativePluginTestSupport.repositoryRoot - .appendingPathComponent("shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json")) + .appendingPathComponent("shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json")) try source.write(to: package.appendingPathComponent("plugin.json")) let store = MacPluginPackageStore( rootURL: root.appendingPathComponent("installed"), validator: DeclarativePluginTestSupport.operations, diff --git a/rust/lithe-core/src/lsp/interface/build_provider.rs b/rust/lithe-core/src/lsp/interface/build_provider.rs index d3e08af099..ece0cf4ef2 100644 --- a/rust/lithe-core/src/lsp/interface/build_provider.rs +++ b/rust/lithe-core/src/lsp/interface/build_provider.rs @@ -312,7 +312,7 @@ mod tests { #[test] fn execution_replies_and_progress_match_the_shared_contract() { let fixture: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/build-execution-protocol.json" + "../../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-execution-protocol.json" )) .unwrap(); assert_eq!( diff --git a/rust/lithe-core/src/lsp/interface/engine.rs b/rust/lithe-core/src/lsp/interface/engine.rs index e27d218470..e088c91cc4 100644 --- a/rust/lithe-core/src/lsp/interface/engine.rs +++ b/rust/lithe-core/src/lsp/interface/engine.rs @@ -15567,7 +15567,7 @@ public class Main { #[test] fn provider_run_options_require_version_ten_before_wire_send() { let fixture: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/build-run-options.json" + "../../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json" )) .unwrap(); let params = json!({"launchOptions":fixture["launchOptions"]}); @@ -15609,7 +15609,7 @@ public class Main { #[test] fn provider_runtime_debug_requires_version_eleven_before_wire_send() { let fixture: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json" + "../../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json" )) .unwrap(); let params = json!({"launchOptions":fixture["launchOptions"]}); @@ -15658,7 +15658,7 @@ public class Main { .await_request("lithe/build/prepareRun") .unwrap(); let fixture: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/build-run-preparation.json" + "../../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-run-preparation.json" )) .unwrap(); harness diff --git a/rust/lithe-core/src/lsp/interface/plugin_function.rs b/rust/lithe-core/src/lsp/interface/plugin_function.rs index 50c68da235..9706189f9f 100644 --- a/rust/lithe-core/src/lsp/interface/plugin_function.rs +++ b/rust/lithe-core/src/lsp/interface/plugin_function.rs @@ -1383,7 +1383,7 @@ fn refusal(category: ErrorCode, message: &str, code: &str) -> CoreError { #[cfg(test)] mod tests { - //! Golden cases from `shared/contracts/plugins/v1/fixtures/function-protocol.json`. + //! Golden cases from `shared/contracts/plugins/v1/fixtures/backend/function-protocol.json`. //! Timing behavior (cancellation, deadlines, late replies, revocation of a //! running call) is covered against a scripted backend in the engine tests. @@ -1391,7 +1391,7 @@ mod tests { const FIXTURE: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/function-protocol.json" + "/../../shared/contracts/plugins/v1/fixtures/backend/function-protocol.json" )); fn fixture() -> Value { diff --git a/rust/lithe-core/src/lsp/interface/plugin_logging.rs b/rust/lithe-core/src/lsp/interface/plugin_logging.rs index aa10a5947d..bf20d4fd8c 100644 --- a/rust/lithe-core/src/lsp/interface/plugin_logging.rs +++ b/rust/lithe-core/src/lsp/interface/plugin_logging.rs @@ -114,7 +114,7 @@ mod tests { #[test] fn shared_plugin_logging_fixture_matches_ingress_and_catalog() { let fixture: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/plugin-logging.json" + "../../../../../shared/contracts/plugins/v1/fixtures/backend/plugin-logging.json" )) .unwrap(); let functions = fixture["registeredFunctions"] diff --git a/rust/lithe-core/src/lsp/interface/toolchain_provider.rs b/rust/lithe-core/src/lsp/interface/toolchain_provider.rs index 52fed5a606..5d8ce8e7c3 100644 --- a/rust/lithe-core/src/lsp/interface/toolchain_provider.rs +++ b/rust/lithe-core/src/lsp/interface/toolchain_provider.rs @@ -5,7 +5,7 @@ //! and a subset of the offer. `toolchains/query` is written only to a session whose //! answer passed [`negotiate`]. Replies stay untrusted here: Core transports them //! unchanged, and `toolchains.decodeReply` validates them against native facts. -//! The rules live in `shared/contracts/plugins/v1/toolchains.md`. +//! The rules live in `shared/contracts/plugins/v1/toolchains/README.md`. use serde_json::{json, Value}; use std::collections::BTreeSet; diff --git a/rust/lithe-core/src/plugins/keymap_import.rs b/rust/lithe-core/src/plugins/keymap_import.rs index 57041ad330..0c3e601425 100644 --- a/rust/lithe-core/src/plugins/keymap_import.rs +++ b/rust/lithe-core/src/plugins/keymap_import.rs @@ -549,7 +549,7 @@ mod tests { #[test] fn import_provider_manifest_is_generic_bounded_and_permission_checked() { let plugin: Value = serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json" + "../../../../shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json" )) .unwrap(); let validate = crate::plugins::declarative::validate_manifest_value; @@ -639,7 +639,7 @@ mod tests { #[test] fn source_plans_only_expose_inputs_of_the_requested_provider() { let plugin: Value = serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json" + "../../../../shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json" )) .unwrap(); let fixture: Value = serde_json::from_str(include_str!( @@ -664,7 +664,7 @@ mod tests { plan_sources_command(json!({"manifest": invalid, "providerID": "second"})).is_err() ); let mut invalid: Value = serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json" + "../../../../shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json" )) .unwrap(); invalid["keymapImportProviders"][1]["recognition"][0]["path"] = json!("../private"); diff --git a/rust/lithe-core/src/remote/sessions_integration_tests.rs b/rust/lithe-core/src/remote/sessions_integration_tests.rs index 0bd04fd849..17e33ec694 100644 --- a/rust/lithe-core/src/remote/sessions_integration_tests.rs +++ b/rust/lithe-core/src/remote/sessions_integration_tests.rs @@ -104,7 +104,7 @@ fn remote_build_detects_host_models_normalizes_diagnostics_and_invalidates_sync( .unwrap(); let manifest: Value = serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-static-file.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-static-file.plugin.json" ))) .unwrap(); let detection = host.request( @@ -179,7 +179,7 @@ fn remote_build_detects_a_root_opened_through_a_host_symbolic_link() { std::os::unix::fs::symlink(&root, &link).unwrap(); let manifest: Value = serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-static-file.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-static-file.plugin.json" ))) .unwrap(); let detection = host.request_at( @@ -208,7 +208,7 @@ fn remote_maven_build_reads_reactor_and_current_host_test_reports() { std::fs::write(root.join("child/target/surefire-reports/TEST-Fixture.xml"), "").unwrap(); let manifest: Value = serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json" ))) .unwrap(); let detected = host.request( diff --git a/rust/lithe-core/src/tests/build_configuration.rs b/rust/lithe-core/src/tests/build_configuration.rs index 3fd8dc0220..9a4a71a07e 100644 --- a/rust/lithe-core/src/tests/build_configuration.rs +++ b/rust/lithe-core/src/tests/build_configuration.rs @@ -9,13 +9,13 @@ use serde_json::{json, Value}; fn manifest() -> Value { serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/build-provider-configuration.plugin.json" + "../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-provider-configuration.plugin.json" )) .unwrap() } fn snapshot() -> Value { let mut value: Value = serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/build-configuration.json" + "../../../../shared/contracts/plugins/v1/fixtures/build-providers/build-configuration.json" )) .unwrap(); if cfg!(windows) { diff --git a/rust/lithe-core/src/tests/build_project_options.rs b/rust/lithe-core/src/tests/build_project_options.rs index 8d3535fd00..6364f8ee85 100644 --- a/rust/lithe-core/src/tests/build_project_options.rs +++ b/rust/lithe-core/src/tests/build_project_options.rs @@ -10,7 +10,7 @@ fn local_option_edits_check_declarations_preserve_siblings_and_reset_to_team_val )) .unwrap(); let mut manifest: Value = serde_json::from_str(include_str!( - "../../../../shared/contracts/plugins/v1/fixtures/build-instance-options.plugin.json" + "../../../../shared/contracts/plugins/v1/fixtures/build-systems/build-instance-options.plugin.json" )) .unwrap(); // Exercise a workspace option with model-owned choices as well as the diff --git a/rust/lithe-core/src/tests/build_runtime_versions.rs b/rust/lithe-core/src/tests/build_runtime_versions.rs index d92dd50de9..7ba9e22c96 100644 --- a/rust/lithe-core/src/tests/build_runtime_versions.rs +++ b/rust/lithe-core/src/tests/build_runtime_versions.rs @@ -6,7 +6,7 @@ use serde_json::{json, Value}; fn manifest() -> Value { serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json" ))) .expect("Maven fixture is valid JSON") } diff --git a/rust/lithe-core/src/tests/build_systems.rs b/rust/lithe-core/src/tests/build_systems.rs index 685974c60e..28169c8aeb 100644 --- a/rust/lithe-core/src/tests/build_systems.rs +++ b/rust/lithe-core/src/tests/build_systems.rs @@ -28,28 +28,28 @@ macro_rules! contract_file { }; } -const CARGO_FIXTURE: &str = contract_file!("fixtures/build-static-file.plugin.json"); -const GO_FIXTURE: &str = contract_file!("fixtures/build-command-stdout.plugin.json"); -const GRADLE_FIXTURE: &str = contract_file!("fixtures/build-command-output-file.plugin.json"); -const MAVEN_FIXTURE: &str = contract_file!("fixtures/build-host-integration.plugin.json"); -const GRADLE_PROVIDER_FIXTURE: &str = contract_file!("fixtures/build-provider.plugin.json"); +const CARGO_FIXTURE: &str = contract_file!("fixtures/build-systems/build-static-file.plugin.json"); +const GO_FIXTURE: &str = contract_file!("fixtures/build-systems/build-command-stdout.plugin.json"); +const GRADLE_FIXTURE: &str = contract_file!("fixtures/build-systems/build-command-output-file.plugin.json"); +const MAVEN_FIXTURE: &str = contract_file!("fixtures/build-systems/build-host-integration.plugin.json"); +const GRADLE_PROVIDER_FIXTURE: &str = contract_file!("fixtures/build-providers/build-provider.plugin.json"); const MIX_PROVIDER_FIXTURE: &str = - contract_file!("fixtures/build-provider-language-server.plugin.json"); -const BUILD_PLANS: &str = contract_file!("fixtures/build-plans.json"); + contract_file!("fixtures/build-providers/build-provider-language-server.plugin.json"); +const BUILD_PLANS: &str = contract_file!("fixtures/build-systems/build-plans.json"); fn fixture(name: &str) -> Value { let source = match name { "build-static-file.plugin.json" => CARGO_FIXTURE, "build-instance-options.plugin.json" => { - contract_file!("fixtures/build-instance-options.plugin.json") + contract_file!("fixtures/build-systems/build-instance-options.plugin.json") } "build-provider-selectors.plugin.json" => { - contract_file!("fixtures/build-provider-selectors.plugin.json") + contract_file!("fixtures/build-providers/build-provider-selectors.plugin.json") } "build-provider-reports.plugin.json" => { - contract_file!("fixtures/build-provider-reports.plugin.json") + contract_file!("fixtures/build-providers/build-provider-reports.plugin.json") } - "build-toolchains.plugin.json" => contract_file!("fixtures/build-toolchains.plugin.json"), + "build-toolchains.plugin.json" => contract_file!("fixtures/build-systems/build-toolchains.plugin.json"), "build-command-stdout.plugin.json" => GO_FIXTURE, "build-command-output-file.plugin.json" => GRADLE_FIXTURE, "build-host-integration.plugin.json" => MAVEN_FIXTURE, @@ -479,7 +479,7 @@ fn canonical_repeated_cases_sum_only_complete_safe_durations() { let workspace = TemporaryWorkspace::new("canonical-case-duration"); let manifest = fixture("build-provider-reports.plugin.json"); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-test-durations.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-test-durations.json")).unwrap(); for case in fixture["cases"].as_array().unwrap() { let left = &case["values"][0]; let right = &case["values"][1]; @@ -1960,7 +1960,7 @@ fn task_categories_and_option_placements_are_display_only() { #[test] fn explicit_build_tool_path_requires_supported_global_file_setting() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-tool-path.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-tool-path.plugin.json")).unwrap(); let validated = validate(manifest.clone()); assert_eq!(validated["status"], "ok", "{validated}"); let invoke = |settings: Value| { @@ -2028,7 +2028,7 @@ fn explicit_build_tool_path_requires_supported_global_file_setting() { #[test] fn executable_candidates_order_and_constraints_are_shared_and_deterministic() { let base: Value = - serde_json::from_str(contract_file!("fixtures/build-tool-path.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-tool-path.plugin.json")).unwrap(); let invoke = |candidates: Value| { let mut manifest = base.clone(); manifest["buildSystems"][0]["invocation"]["executables"] = candidates; @@ -2081,7 +2081,7 @@ fn executable_candidates_order_and_constraints_are_shared_and_deterministic() { #[test] fn published_build_v2_paths_adapt_to_candidates_and_preserve_invalid_values() { let mut manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-tool-path.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-tool-path.plugin.json")).unwrap(); manifest["requires"] .as_object_mut() .unwrap() @@ -2117,7 +2117,7 @@ fn published_build_v2_paths_adapt_to_candidates_and_preserve_invalid_values() { #[test] fn executable_resolution_is_opt_in_and_custom_runtimes_share_the_same_plan() { let mut manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-tool-path.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-tool-path.plugin.json")).unwrap(); let old_host = validate_command( json!({"manifest":manifest,"hostCapabilities":{"buildSystems":[1,2],"settings":[1,2]}}), ) @@ -2153,7 +2153,7 @@ fn executable_resolution_is_opt_in_and_custom_runtimes_share_the_same_plan() { #[test] fn provider_execution_tasks_are_typed_and_version_gated() { let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-execution.plugin.json" + "fixtures/build-providers/build-provider-execution.plugin.json" )) .unwrap(); let validated = validate(manifest.clone()); @@ -2215,7 +2215,7 @@ fn provider_execution_tasks_are_typed_and_version_gated() { #[test] fn preparation_tasks_are_declared_versioned_and_unambiguous() { let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-preparation.plugin.json" + "fixtures/build-providers/build-provider-preparation.plugin.json" )) .unwrap(); let validated = validate(manifest.clone()); @@ -2284,9 +2284,9 @@ fn preparation_tasks_are_declared_versioned_and_unambiguous() { #[test] fn provider_tests_preserve_filters_and_report_ownership() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-provider-tests.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-provider-tests.plugin.json")).unwrap(); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-test-protocol.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-test-protocol.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); let plan = build_test_plan_command( json!({"manifest": manifest, "buildSystemID":"gradle", "request":fixture["request"]}), @@ -2340,7 +2340,7 @@ fn provider_tests_preserve_filters_and_report_ownership() { #[test] fn provider_tests_require_version_three_and_an_owned_process() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-provider-tests.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-provider-tests.plugin.json")).unwrap(); for version in [1, 2] { let mut old = manifest.clone(); old["requires"]["buildProviders"] = json!(version); @@ -2384,9 +2384,9 @@ fn provider_tests_require_version_three_and_an_owned_process() { #[test] fn provider_test_discovery_is_bounded_deterministic_and_runnable() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/build-provider-tests.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-provider-tests.plugin.json")).unwrap(); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-test-discovery.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-test-discovery.json")).unwrap(); let plan = build_test_discovery_plan_command(json!({"manifest":manifest,"buildSystemID":"gradle", "request":{"root":".","refresh":true}})) @@ -2446,11 +2446,11 @@ fn provider_test_discovery_is_bounded_deterministic_and_runnable() { #[test] fn provider_run_preparation_selects_targets_and_validates_launch_data() { let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-run-preparation.plugin.json" + "fixtures/build-providers/build-provider-run-preparation.plugin.json" )) .unwrap(); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-run-preparation.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-run-preparation.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); let plan = |request: Value| { build_prepare_run_plan_command( @@ -2541,7 +2541,7 @@ fn provider_run_working_directory_rejects_external_symlinks() { let outside = TemporaryWorkspace::new("provider-run-outside"); std::os::unix::fs::symlink(&outside.0, workspace.0.join("escape")).unwrap(); let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-run-preparation.plugin.json" + "fixtures/build-providers/build-provider-run-preparation.plugin.json" )) .unwrap(); let result=build_decode_run_preparation_command(json!({"manifest":manifest,"buildSystemID":"gradle", @@ -2554,13 +2554,13 @@ fn provider_run_working_directory_rejects_external_symlinks() { fn provider_debug_preparation_validates_native_target_and_same_plugin_adapter() { use crate::build::{build_decode_debug_preparation_command, build_prepare_debug_plan_command}; let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-debug-preparation.plugin.json" + "fixtures/build-providers/build-provider-debug-preparation.plugin.json" )) .unwrap(); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-debug-preparation.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-debug-preparation.json")).unwrap(); let run: Value = - serde_json::from_str(contract_file!("fixtures/build-run-preparation.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-run-preparation.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); let planned = build_prepare_debug_plan_command( json!({"manifest":manifest,"buildSystemID":"gradle","request":run["request"]}), @@ -2617,7 +2617,7 @@ fn provider_debug_preparation_validates_native_target_and_same_plugin_adapter() fn provider_debug_preparation_rejects_a_program_symlink_outside_the_instance() { use crate::build::build_decode_debug_preparation_command; let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-debug-preparation.plugin.json" + "fixtures/build-providers/build-provider-debug-preparation.plugin.json" )) .unwrap(); let workspace = TemporaryWorkspace::new("debug-native-symlink"); @@ -2636,7 +2636,7 @@ fn provider_debug_preparation_rejects_a_program_symlink_outside_the_instance() { #[test] fn provider_debug_target_bindings_keep_exact_arguments_and_require_bounded_facts() { let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-debug-preparation.plugin.json" + "fixtures/build-providers/build-provider-debug-preparation.plugin.json" )) .unwrap(); let target = json!({"kind":"executable","path":"/workspace/app/main","workingDirectory":"/workspace/app", @@ -2670,9 +2670,9 @@ fn provider_debug_target_bindings_keep_exact_arguments_and_require_bounded_facts fn model_inputs_project_public_facts_and_preserve_configuration_identity() { use crate::build::build_resolve_model_inputs_command; let producer: Value = - serde_json::from_str(contract_file!("fixtures/build-model-producer.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-model-producer.plugin.json")).unwrap(); let consumer: Value = - serde_json::from_str(contract_file!("fixtures/build-model-consumer.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-model-consumer.plugin.json")).unwrap(); assert_eq!( validate(producer.clone())["status"], "ok", @@ -2747,9 +2747,9 @@ fn model_inputs_project_public_facts_and_preserve_configuration_identity() { fn model_inputs_reject_invalid_manifests_models_and_snapshot_smuggling() { use crate::build::build_resolve_model_inputs_command; let producer: Value = - serde_json::from_str(contract_file!("fixtures/build-model-producer.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-model-producer.plugin.json")).unwrap(); let consumer: Value = - serde_json::from_str(contract_file!("fixtures/build-model-consumer.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-systems/build-model-consumer.plugin.json")).unwrap(); for change in ["oldWire", "noCapability", "reexport", "unknownOption"] { let mut manifest = consumer.clone(); match change { @@ -2840,16 +2840,16 @@ fn model_inputs_reject_invalid_manifests_models_and_snapshot_smuggling() { #[test] fn provider_run_options_preserve_argv_and_validate_declared_execution_and_cwd() { let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-run-options.plugin.json" + "fixtures/build-providers/build-provider-run-options.plugin.json" )) .unwrap(); let fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-run-options.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-run-options.json")).unwrap(); let workspace = TemporaryWorkspace::new("provider-run-options"); workspace.write("app/Main.java", "class Main {}"); workspace.write("tools/readme.txt", "working directory"); let mut request: Value = - serde_json::from_str::(contract_file!("fixtures/build-run-preparation.json")) + serde_json::from_str::(contract_file!("fixtures/build-providers/build-run-preparation.json")) .unwrap()["request"] .clone(); request["root"] = json!("app"); @@ -2928,18 +2928,18 @@ fn provider_run_options_preserve_argv_and_validate_declared_execution_and_cwd() #[test] fn provider_connection_debug_options_require_version_eleven_and_a_declared_registry_type() { let mut manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-run-options.plugin.json" + "fixtures/build-providers/build-provider-run-options.plugin.json" )) .unwrap(); let fixture: Value = serde_json::from_str(contract_file!( - "fixtures/build-connection-debug-options.json" + "fixtures/build-providers/build-connection-debug-options.json" )) .unwrap(); let workspace = TemporaryWorkspace::new("provider-connection-debug"); workspace.write("app/Main.java", "class Main {}"); workspace.write("tools/readme.txt", "cwd"); let mut request: Value = - serde_json::from_str::(contract_file!("fixtures/build-run-preparation.json")) + serde_json::from_str::(contract_file!("fixtures/build-providers/build-run-preparation.json")) .unwrap()["request"] .clone(); request["root"] = json!("app"); @@ -3004,11 +3004,11 @@ fn provider_run_options_refuse_explicit_cwd_symlinks_outside_workspace() { workspace.write("app/Main.java", "class Main {}"); std::os::unix::fs::symlink(&outside.0, workspace.0.join("escape")).unwrap(); let manifest: Value = serde_json::from_str(contract_file!( - "fixtures/build-provider-run-options.plugin.json" + "fixtures/build-providers/build-provider-run-options.plugin.json" )) .unwrap(); let mut fixture: Value = - serde_json::from_str(contract_file!("fixtures/build-run-options.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/build-providers/build-run-options.json")).unwrap(); fixture["launchOptions"]["workingDirectory"] = json!("escape"); fixture["result"]["workingDirectory"] = json!("escape"); let result = build_decode_run_preparation_command(json!({"manifest":manifest,"buildSystemID":"gradle", diff --git a/rust/lithe-core/src/tests/declarative_plugins.rs b/rust/lithe-core/src/tests/declarative_plugins.rs index d32a9ebbbd..77a715b5bb 100644 --- a/rust/lithe-core/src/tests/declarative_plugins.rs +++ b/rust/lithe-core/src/tests/declarative_plugins.rs @@ -15,34 +15,34 @@ macro_rules! contract_file { }; } -const PHP_FIXTURE: &str = contract_file!("fixtures/language-packaged-server.plugin.json"); -const HELLO_FIXTURE: &str = contract_file!("fixtures/hello-lithe.plugin.json"); -const WEB_PANEL_FIXTURE: &str = contract_file!("fixtures/web-panel.plugin.json"); -const GO_FIXTURE: &str = contract_file!("fixtures/language-system-command.plugin.json"); -const JAVA_FIXTURE: &str = contract_file!("fixtures/language-host-integration.plugin.json"); -const NODE_RUNTIME_FIXTURE: &str = contract_file!("fixtures/node-runtime.plugin.json"); -const PUBLISHER_BUNDLED_FIXTURE: &str = contract_file!("fixtures/publisher-bundled.plugin.json"); -const CARGO_BUILD_FIXTURE: &str = contract_file!("fixtures/build-static-file.plugin.json"); -const GO_BUILD_FIXTURE: &str = contract_file!("fixtures/build-command-stdout.plugin.json"); -const GRADLE_BUILD_FIXTURE: &str = contract_file!("fixtures/build-command-output-file.plugin.json"); -const MAVEN_BUILD_FIXTURE: &str = contract_file!("fixtures/build-host-integration.plugin.json"); -const GRADLE_PROVIDER_FIXTURE: &str = contract_file!("fixtures/build-provider.plugin.json"); +const PHP_FIXTURE: &str = contract_file!("fixtures/languages/language-packaged-server.plugin.json"); +const HELLO_FIXTURE: &str = contract_file!("fixtures/manifest/hello-lithe.plugin.json"); +const WEB_PANEL_FIXTURE: &str = contract_file!("fixtures/ui/web-panel.plugin.json"); +const GO_FIXTURE: &str = contract_file!("fixtures/languages/language-system-command.plugin.json"); +const JAVA_FIXTURE: &str = contract_file!("fixtures/languages/language-host-integration.plugin.json"); +const NODE_RUNTIME_FIXTURE: &str = contract_file!("fixtures/languages/node-runtime.plugin.json"); +const PUBLISHER_BUNDLED_FIXTURE: &str = contract_file!("fixtures/package-trust/publisher-bundled.plugin.json"); +const CARGO_BUILD_FIXTURE: &str = contract_file!("fixtures/build-systems/build-static-file.plugin.json"); +const GO_BUILD_FIXTURE: &str = contract_file!("fixtures/build-systems/build-command-stdout.plugin.json"); +const GRADLE_BUILD_FIXTURE: &str = contract_file!("fixtures/build-systems/build-command-output-file.plugin.json"); +const MAVEN_BUILD_FIXTURE: &str = contract_file!("fixtures/build-systems/build-host-integration.plugin.json"); +const GRADLE_PROVIDER_FIXTURE: &str = contract_file!("fixtures/build-providers/build-provider.plugin.json"); const MIX_PROVIDER_FIXTURE: &str = - contract_file!("fixtures/build-provider-language-server.plugin.json"); -const SETTINGS_V2_FIXTURE: &str = contract_file!("fixtures/settings-v2.plugin.json"); -const BACKEND_FIXTURE: &str = contract_file!("fixtures/backend.plugin.json"); -const WORKSPACE_BACKEND_FIXTURE: &str = contract_file!("fixtures/backend-workspace.plugin.json"); -const DEBUG_ADAPTER_FIXTURE: &str = contract_file!("fixtures/debug-adapter.plugin.json"); + contract_file!("fixtures/build-providers/build-provider-language-server.plugin.json"); +const SETTINGS_V2_FIXTURE: &str = contract_file!("fixtures/settings/settings-v2.plugin.json"); +const BACKEND_FIXTURE: &str = contract_file!("fixtures/backend/backend.plugin.json"); +const WORKSPACE_BACKEND_FIXTURE: &str = contract_file!("fixtures/backend/backend-workspace.plugin.json"); +const DEBUG_ADAPTER_FIXTURE: &str = contract_file!("fixtures/debug-adapters/debug-adapter.plugin.json"); const DEBUG_ADAPTER_LANGUAGE_SERVER_FIXTURE: &str = - contract_file!("fixtures/debug-adapter-language-server.plugin.json"); + contract_file!("fixtures/debug-adapters/debug-adapter-language-server.plugin.json"); const DEBUG_ADAPTER_REMOTE_ATTACH_FIXTURE: &str = - contract_file!("fixtures/debug-adapter-remote-attach.plugin.json"); -const DEBUG_ADAPTER_REJECTIONS: &str = contract_file!("fixtures/debug-adapter-rejections.json"); -const EDITOR_ACTIONS_FIXTURE: &str = contract_file!("fixtures/editor-actions.plugin.json"); -const GRAMMAR_FIXTURE: &str = contract_file!("fixtures/language-grammar.plugin.json"); -const INVALID_MANIFESTS: &str = contract_file!("fixtures/invalid-manifests.json"); -const COMMAND_PLANS: &str = contract_file!("fixtures/command-plans.json"); -const RUNTIME_VERSIONS: &str = contract_file!("fixtures/runtime-versions.json"); + contract_file!("fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json"); +const DEBUG_ADAPTER_REJECTIONS: &str = contract_file!("fixtures/debug-adapters/debug-adapter-rejections.json"); +const EDITOR_ACTIONS_FIXTURE: &str = contract_file!("fixtures/editor/editor-actions.plugin.json"); +const GRAMMAR_FIXTURE: &str = contract_file!("fixtures/languages/language-grammar.plugin.json"); +const INVALID_MANIFESTS: &str = contract_file!("fixtures/manifest/invalid-manifests.json"); +const COMMAND_PLANS: &str = contract_file!("fixtures/languages/command-plans.json"); +const RUNTIME_VERSIONS: &str = contract_file!("fixtures/languages/runtime-versions.json"); const OFFICIAL_JAVA: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), "/../../Plugins/mac/Official/JavaSupport/plugin.json" @@ -880,7 +880,7 @@ fn native_ui_lab_package_manifest_is_installable() { #[test] fn native_ui_validates_version_ownership_actions_and_budgets() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/native-panel.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/ui/native-panel.plugin.json")).unwrap(); let result = validate(manifest.clone()); assert_eq!(result["status"], "ok", "{result}"); for icon in [json!({"host":"search"}), json!({"host":"reset"})] { @@ -935,7 +935,7 @@ fn native_ui_validates_version_ownership_actions_and_budgets() { #[test] fn native_ui_forms_validate_controls_values_actions_and_budgets() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/native-form.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/ui/native-form.plugin.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); for (pointer, value) in [ ("/ui/toolWindows/0/native/kind", json!("list")), @@ -999,7 +999,7 @@ fn native_ui_forms_validate_controls_values_actions_and_budgets() { #[test] fn native_ui_form_grid_validates_columns_spans_and_scope() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/native-form.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/ui/native-form.plugin.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); for (pointer, value) in [ ("/ui/toolWindows/0/native/layout/columns", json!(0)), @@ -1033,7 +1033,7 @@ fn native_ui_form_grid_validates_columns_spans_and_scope() { styled["ui"]["toolWindows"][0]["native"]["layout"]["gap"] = json!(99); assert_eq!(validate(styled)["status"], "rejected"); let mut tree: Value = - serde_json::from_str(contract_file!("fixtures/native-panel.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/ui/native-panel.plugin.json")).unwrap(); tree["ui"]["toolWindows"][0]["native"]["layout"] = json!({"columns":12}); assert_eq!(validate(tree)["status"], "rejected"); } @@ -1041,7 +1041,7 @@ fn native_ui_form_grid_validates_columns_spans_and_scope() { #[test] fn native_public_controls_validate_types_ranges_info_and_buttons() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/native-controls.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/ui/native-controls.plugin.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); for (pointer, value) in [ ("/ui/toolWindows/0/native/controls/0/info", json!(" ")), @@ -2097,7 +2097,7 @@ fn debug_start_arguments_refuse_stale_registrations_and_missing_target_facts() { #[test] fn pure_backend_commands_require_ui_4_and_grant_methods_individually() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/command-backend.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/backend/command-backend.plugin.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); let mut old = manifest.clone(); old["requires"]["ui"] = json!(3); @@ -2118,7 +2118,7 @@ fn pure_backend_commands_require_ui_4_and_grant_methods_individually() { #[test] fn terminal_permission_grants_only_owned_terminal_methods_and_requires_backend_two() { let manifest: Value = - serde_json::from_str(contract_file!("fixtures/terminal-backend.plugin.json")).unwrap(); + serde_json::from_str(contract_file!("fixtures/backend/terminal-backend.plugin.json")).unwrap(); assert_eq!(validate(manifest.clone())["status"], "ok"); let plan = language_server_launch_plan_command(json!({ "manifest": manifest, "backend": true, diff --git a/rust/lithe-core/src/tests/marketplace_plugins.rs b/rust/lithe-core/src/tests/marketplace_plugins.rs index a88cbf56b3..05cd5a1dbc 100644 --- a/rust/lithe-core/src/tests/marketplace_plugins.rs +++ b/rust/lithe-core/src/tests/marketplace_plugins.rs @@ -18,11 +18,11 @@ const INDEX_CASES: &str = contract_file!("fixtures/marketplace/index-cases.json" const INVALID_ENTRIES: &str = contract_file!("fixtures/marketplace/invalid-index-entries.json"); const SOURCE_URLS: &str = contract_file!("fixtures/marketplace/source-urls.json"); const INSTALL_REVIEWS: &str = contract_file!("fixtures/marketplace/install-reviews.json"); -const PHP_FIXTURE: &str = contract_file!("fixtures/language-packaged-server.plugin.json"); -const GO_FIXTURE: &str = contract_file!("fixtures/language-system-command.plugin.json"); -const MIX_FIXTURE: &str = contract_file!("fixtures/build-provider-language-server.plugin.json"); -const GRADLE_FIXTURE: &str = contract_file!("fixtures/build-provider.plugin.json"); -const CARGO_FIXTURE: &str = contract_file!("fixtures/build-static-file.plugin.json"); +const PHP_FIXTURE: &str = contract_file!("fixtures/languages/language-packaged-server.plugin.json"); +const GO_FIXTURE: &str = contract_file!("fixtures/languages/language-system-command.plugin.json"); +const MIX_FIXTURE: &str = contract_file!("fixtures/build-providers/build-provider-language-server.plugin.json"); +const GRADLE_FIXTURE: &str = contract_file!("fixtures/build-providers/build-provider.plugin.json"); +const CARGO_FIXTURE: &str = contract_file!("fixtures/build-systems/build-static-file.plugin.json"); const OFFICIAL_INDEX: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), "/../../Plugins/marketplace/index.json" diff --git a/rust/lithe-core/src/tests/plugin_editor_resources.rs b/rust/lithe-core/src/tests/plugin_editor_resources.rs index e5473cc563..45d84a9504 100644 --- a/rust/lithe-core/src/tests/plugin_editor_resources.rs +++ b/rust/lithe-core/src/tests/plugin_editor_resources.rs @@ -13,8 +13,8 @@ macro_rules! contract_file { }; } -const GRAMMAR_PLUGIN: &str = contract_file!("fixtures/language-grammar.plugin.json"); -const HTTP_GRAMMAR: &str = contract_file!("fixtures/grammars/http.monarch.json"); +const GRAMMAR_PLUGIN: &str = contract_file!("fixtures/languages/language-grammar.plugin.json"); +const HTTP_GRAMMAR: &str = contract_file!("fixtures/languages/grammars/http.monarch.json"); fn manifest(source: &str) -> Value { serde_json::from_str(source).expect("fixture manifest is JSON") @@ -195,7 +195,7 @@ fn configuration_only_contribution_decodes_without_grammar() { .unwrap() .remove("grammar"); // A backend is a complete tool plugin, with no language-server ownership. - let tool = manifest(contract_file!("fixtures/backend-workspace.plugin.json")); + let tool = manifest(contract_file!("fixtures/backend/backend-workspace.plugin.json")); plugin["backend"] = tool["backend"].clone(); plugin["requires"]["backend"] = json!(2); plugin["requires"]["serverProcess"] = json!(1); diff --git a/rust/lithe-core/src/tests/project_generators.rs b/rust/lithe-core/src/tests/project_generators.rs index 47543415e7..2efd03b5b9 100644 --- a/rust/lithe-core/src/tests/project_generators.rs +++ b/rust/lithe-core/src/tests/project_generators.rs @@ -9,15 +9,15 @@ use std::path::PathBuf; const FIXTURE: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/project-generator.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json" )); const PLANS: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/project-plans.json" + "/../../shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json" )); const MAVEN_BUILD_FIXTURE: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json" )); const OFFICIAL_JAVA: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), @@ -35,7 +35,7 @@ fn repository_path(relative: &str) -> PathBuf { } fn fixtures_path() -> PathBuf { - repository_path("shared/contracts/plugins/v1/fixtures") + repository_path("shared/contracts/plugins/v1/fixtures/project-generators") } /// Java Support without its own New Project entries, so catalog tests see diff --git a/rust/lithe-core/src/tests/toolchain_definitions.rs b/rust/lithe-core/src/tests/toolchain_definitions.rs index e0a7b1bae6..e5ca909bd1 100644 --- a/rust/lithe-core/src/tests/toolchain_definitions.rs +++ b/rust/lithe-core/src/tests/toolchain_definitions.rs @@ -222,7 +222,7 @@ fn a_definition_plugin_may_provide_installations_of_its_own_tool() { fn build_toolchain_consumers_keep_resolution_two_without_owning_definitions() { let mut plugin: Value = serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json" ))) .unwrap(); assert!(validate_manifest_value(plugin.clone()).is_ok()); @@ -242,7 +242,7 @@ fn build_toolchain_consumers_keep_resolution_two_without_owning_definitions() { fn executable_resolution_two_does_not_enable_toolchain_fields_in_legacy_build_sets() { let mut plugin: Value = serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json" ))) .unwrap(); plugin["requires"]["executableResolution"] = json!(2); @@ -258,11 +258,11 @@ fn production_toolchain_fixtures_require_explicit_host_capabilities() { let sources = [ include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json" )), include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json" )), ]; let old_host = json!({"backend":[1,2],"serverProcess":[1],"executableResolution":[1]}); diff --git a/rust/lithe-core/src/tests/toolchain_pins.rs b/rust/lithe-core/src/tests/toolchain_pins.rs index e03aa36310..d27fdbac3e 100644 --- a/rust/lithe-core/src/tests/toolchain_pins.rs +++ b/rust/lithe-core/src/tests/toolchain_pins.rs @@ -7,7 +7,7 @@ use serde_json::{json, Value}; fn fixture() -> Value { serde_json::from_str(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/proposals/toolchains/fixtures/local.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/proposal/local.json" ))) .unwrap() } diff --git a/rust/lithe-core/src/tests/toolchain_queries.rs b/rust/lithe-core/src/tests/toolchain_queries.rs index 1dd2815b77..2fefc1ff97 100644 --- a/rust/lithe-core/src/tests/toolchain_queries.rs +++ b/rust/lithe-core/src/tests/toolchain_queries.rs @@ -10,15 +10,15 @@ fn contract(name: &str) -> Value { let source = match name { "java" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json" )), "mise" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json" )), "queries" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/proposals/toolchains/fixtures/query-cases.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/proposal/query-cases.json" )), _ => panic!("unknown contract fixture"), }; diff --git a/rust/lithe-core/src/tests/toolchain_resolution.rs b/rust/lithe-core/src/tests/toolchain_resolution.rs index 7c9aa7a07a..d529fa49a5 100644 --- a/rust/lithe-core/src/tests/toolchain_resolution.rs +++ b/rust/lithe-core/src/tests/toolchain_resolution.rs @@ -15,19 +15,19 @@ fn contract(name: &str) -> Value { let source = match name { "java" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json" )), "mise" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json" )), "query" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/proposals/toolchains/fixtures/query-cases.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/proposal/query-cases.json" )), "local" => include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/proposals/toolchains/fixtures/local.json" + "/../../shared/contracts/plugins/v1/fixtures/toolchains/proposal/local.json" )), _ => panic!("unknown fixture"), }; diff --git a/rust/lithe-core/src/tests/vcs.rs b/rust/lithe-core/src/tests/vcs.rs index 6fad30d8d2..ed43782bc0 100644 --- a/rust/lithe-core/src/tests/vcs.rs +++ b/rust/lithe-core/src/tests/vcs.rs @@ -21,7 +21,7 @@ const MODEL: &str = include_str!(concat!( )); const SVN_PROVIDER: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json" + "/../../shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json" )); fn model() -> Value { diff --git a/scripts/architecture/language-specifics-baseline.json b/scripts/architecture/language-specifics-baseline.json index 7ef6b41f75..b90e93a0a1 100644 --- a/scripts/architecture/language-specifics-baseline.json +++ b/scripts/architecture/language-specifics-baseline.json @@ -303,49 +303,49 @@ "rust/lithe-core/src/vcs/model.rs": {"words":1}, "rust/lithe-core/src/vcs/roots.rs": {"words":1,"toolTables":25}, "shared/contracts/plugins/v1/README.md": {"words":90}, - "shared/contracts/plugins/v1/fixtures/build-command-output-file.plugin.json": {"words":34}, - "shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json": {"words":3}, - "shared/contracts/plugins/v1/fixtures/build-execution-protocol.json": {"words":1}, - "shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json": {"words":20}, - "shared/contracts/plugins/v1/fixtures/build-model-consumer.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-model-producer.plugin.json": {"words":21}, - "shared/contracts/plugins/v1/fixtures/build-plans.json": {"words":211}, - "shared/contracts/plugins/v1/fixtures/build-provider-configuration.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json": {"words":25}, - "shared/contracts/plugins/v1/fixtures/build-provider-execution.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-provider-preparation.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-provider-reports.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-provider-run-options.plugin.json": {"words":25}, - "shared/contracts/plugins/v1/fixtures/build-provider-run-preparation.plugin.json": {"words":25}, - "shared/contracts/plugins/v1/fixtures/build-provider-selectors.plugin.json": {"words":24}, - "shared/contracts/plugins/v1/fixtures/build-provider-tests.plugin.json": {"words":25}, - "shared/contracts/plugins/v1/fixtures/build-provider.plugin.json": {"words":27}, - "shared/contracts/plugins/v1/fixtures/build-run-options.json": {"words":1}, - "shared/contracts/plugins/v1/fixtures/build-test-protocol.json": {"words":2}, - "shared/contracts/plugins/v1/fixtures/command-plans.json": {"words":80}, - "shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json": {"words":2}, - "shared/contracts/plugins/v1/fixtures/function-protocol.json": {"words":15}, - "shared/contracts/plugins/v1/fixtures/invalid-manifests.json": {"words":22}, - "shared/contracts/plugins/v1/fixtures/language-host-integration.plugin.json": {"words":17}, + "shared/contracts/plugins/v1/fixtures/build-systems/build-command-output-file.plugin.json": {"words":34}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json": {"words":3}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-execution-protocol.json": {"words":1}, + "shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json": {"words":20}, + "shared/contracts/plugins/v1/fixtures/build-systems/build-model-consumer.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-systems/build-model-producer.plugin.json": {"words":21}, + "shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json": {"words":211}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-configuration.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json": {"words":25}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-execution.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-preparation.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-reports.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-options.plugin.json": {"words":25}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-preparation.plugin.json": {"words":25}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-selectors.plugin.json": {"words":24}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-tests.plugin.json": {"words":25}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json": {"words":27}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json": {"words":1}, + "shared/contracts/plugins/v1/fixtures/build-providers/build-test-protocol.json": {"words":2}, + "shared/contracts/plugins/v1/fixtures/languages/command-plans.json": {"words":80}, + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json": {"words":2}, + "shared/contracts/plugins/v1/fixtures/backend/function-protocol.json": {"words":15}, + "shared/contracts/plugins/v1/fixtures/manifest/invalid-manifests.json": {"words":22}, + "shared/contracts/plugins/v1/fixtures/languages/language-host-integration.plugin.json": {"words":17}, "shared/contracts/plugins/v1/fixtures/marketplace/install-reviews.json": {"words":3}, - "shared/contracts/plugins/v1/fixtures/project-generator.plugin.json": {"words":13}, - "shared/contracts/plugins/v1/fixtures/project-plans.json": {"words":10}, - "shared/contracts/plugins/v1/fixtures/publisher-bundled.plugin.json": {"words":2}, - "shared/contracts/plugins/v1/fixtures/runtime-versions.json": {"words":19}, - "shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json": {"words":17}, - "shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json": {"words":2}, + "shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json": {"words":13}, + "shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json": {"words":10}, + "shared/contracts/plugins/v1/fixtures/package-trust/publisher-bundled.plugin.json": {"words":2}, + "shared/contracts/plugins/v1/fixtures/languages/runtime-versions.json": {"words":19}, + "shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json": {"words":17}, + "shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json": {"words":2}, "shared/contracts/plugins/v1/plugin-manifest.schema.json": {"words":11,"schemaEnums":13}, - "shared/contracts/plugins/v1/proposals/toolchains/README.md": {"words":5}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/java-tool-definition.json": {"words":19}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/local.json": {"words":6}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/manifest-rejections.json": {"words":18}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/mise-provider.json": {"words":2}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/query-cases.json": {"words":40}, - "shared/contracts/plugins/v1/proposals/toolchains/fixtures/resolution-cases.json": {"words":74}, - "shared/contracts/plugins/v1/proposals/toolchains/local.schema.json": {"words":2}, - "shared/contracts/plugins/v1/proposals/toolchains/manifest.md": {"words":10}, - "shared/contracts/plugins/v1/proposals/toolchains/protocol.md": {"words":1}, - "shared/contracts/plugins/v1/toolchains.md": {"words":1}, + "shared/contracts/plugins/v1/toolchains/proposal/README.md": {"words":5}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/java-tool-definition.json": {"words":19}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/local.json": {"words":6}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/manifest-rejections.json": {"words":18}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/mise-provider.json": {"words":2}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/query-cases.json": {"words":40}, + "shared/contracts/plugins/v1/fixtures/toolchains/proposal/resolution-cases.json": {"words":74}, + "shared/contracts/plugins/v1/toolchains/proposal/local.schema.json": {"words":2}, + "shared/contracts/plugins/v1/toolchains/proposal/manifest.md": {"words":10}, + "shared/contracts/plugins/v1/toolchains/proposal/protocol.md": {"words":1}, + "shared/contracts/plugins/v1/toolchains/README.md": {"words":1}, "windows/tauri/src-tauri/src/debug.rs": {"words":16}, "windows/tauri/src-tauri/src/logging.rs": {"words":4}, "windows/tauri/src-tauri/src/lsp.rs": {"words":457,"toolTables":4}, diff --git a/scripts/architecture/verify-shared-contracts.sh b/scripts/architecture/verify-shared-contracts.sh index e8416f22c7..5cadb0fa79 100755 --- a/scripts/architecture/verify-shared-contracts.sh +++ b/scripts/architecture/verify-shared-contracts.sh @@ -162,6 +162,14 @@ done /usr/bin/ruby -rjson -e ' root = ARGV.fetch(0) published_base = ARGV.fetch(1) + # Fixtures sit in one folder per contract area. Case files name a base + # manifest by file name only, so names stay unique across those folders. + fixtures = File.join(root, "fixtures") + loose = Dir.children(fixtures).map { |name| File.join(fixtures, name) }.select { |path| File.file?(path) } + abort "#{loose.sort.join(", ")}: fixtures belong in an area folder under #{fixtures}" unless loose.empty? + fixture_json = Dir[File.join(fixtures, "**", "*.json")] + duplicates = fixture_json.group_by { |path| File.basename(path) }.select { |_, paths| paths.length > 1 } + duplicates.each { |name, paths| abort "fixture file name #{name} is not unique: #{paths.sort.join(", ")}" } schema = JSON.parse(File.read(File.join(root, "plugin-manifest.schema.json"))) abort "plugin manifest schema ID mismatch" unless schema.fetch("$id") == "#{published_base}/plugin-manifest.schema.json" native_schema = JSON.parse(File.read(File.join(root, "native-ui.schema.json"))) @@ -183,7 +191,7 @@ done abort "#{path}: $id must be #{expected}" unless JSON.parse(File.read(path))["$id"] == expected end documented = readme.scan(/`(plugin\.[a-zA-Z.]+)`/).flatten - manifests = Dir[File.join(root, "fixtures", "*.plugin.json")] + manifests = Dir[File.join(fixtures, "**", "*.plugin.json")] abort "declarative plugin fixtures are missing" if manifests.empty? manifests.each do |path| manifest = JSON.parse(File.read(path)) @@ -191,12 +199,12 @@ done abort "#{path}: fixture IDs must use dev.lithe.fixture." unless manifest.fetch("id").start_with?("dev.lithe.fixture.") end fixture_names = manifests.map { |path| File.basename(path) } - invalid = JSON.parse(File.read(File.join(root, "fixtures", "invalid-manifests.json"))).fetch("cases") + invalid = JSON.parse(File.read(File.join(fixtures, "manifest", "invalid-manifests.json"))).fetch("cases") invalid.each do |item| abort "invalid case #{item.fetch("name")} uses an unknown base" unless fixture_names.include?(item.fetch("base")) abort "invalid case #{item.fetch("name")} uses an undocumented code" unless documented.include?(item.fetch("expectedCode")) end - plans = JSON.parse(File.read(File.join(root, "fixtures", "command-plans.json"))).fetch("cases") + plans = JSON.parse(File.read(File.join(fixtures, "languages", "command-plans.json"))).fetch("cases") plans.each do |item| abort "plan case #{item.fetch("name")} uses an unknown plugin" unless fixture_names.include?(item.fetch("plugin")) abort "plan case #{item.fetch("name")} uses an unknown operation" unless %w[runPlan discoverTests testPlan languageServerLaunchPlan].include?(item.fetch("operation")) @@ -210,7 +218,7 @@ done invocationPlan checkToolVersion resolveOptions modelPlan taskPlan testPlan dependencyPlan decodeModel decodeTestResults decodeDiagnostics decodeDependencies syncFingerprint ] - build_plans = JSON.parse(File.read(File.join(root, "fixtures", "build-plans.json"))) + build_plans = JSON.parse(File.read(File.join(fixtures, "build-systems", "build-plans.json"))) abort "build plan fixture schema must be 1" unless build_plans.fetch("schemaVersion") == 1 build_names = build_plans.fetch("cases").map { |item| item.fetch("name") } abort "build plan case names must be unique" unless build_names.uniq.length == build_names.length @@ -223,7 +231,7 @@ done end abort "build plan case #{item.fetch("name")} contains a machine path" if JSON.generate(item).match?(%r{/(?:Users|home|var/folders|private/var)/|[A-Za-z]:\\\\}) end - functions = JSON.parse(File.read(File.join(root, "fixtures", "function-protocol.json"))) + functions = JSON.parse(File.read(File.join(fixtures, "backend", "function-protocol.json"))) abort "function protocol fixture schema must be 1" unless functions.fetch("schemaVersion") == 1 abort "function protocol fixture must describe litheFunctions" unless functions.fetch("protocol") == "litheFunctions" function_sections = %w[negotiation registration invocations outcomes progress backendRequests hostRequests] @@ -245,7 +253,7 @@ done index_schema = JSON.parse(File.read(File.join(root, "plugin-index.schema.json"))) abort "plugin index schema ID mismatch" unless index_schema.fetch("$id") == "#{published_base}/plugin-index.schema.json" abort "plugin indexes must use schemaVersion 1" unless index_schema.fetch("properties").fetch("schemaVersion").fetch("const") == 1 - marketplace = File.join(root, "fixtures", "marketplace") + marketplace = File.join(fixtures, "marketplace") index = JSON.parse(File.read(File.join(marketplace, "index.json"))) abort "marketplace fixture index must use schemaVersion 1" unless index.fetch("schemaVersion") == 1 JSON.parse(File.read(File.join(marketplace, "index-cases.json"))).fetch("cases").each do |item| diff --git a/shared/contracts/plugins/v1/README.md b/shared/contracts/plugins/v1/README.md index 9e40d06ad3..54f53f48c6 100644 --- a/shared/contracts/plugins/v1/README.md +++ b/shared/contracts/plugins/v1/README.md @@ -8,24 +8,32 @@ not need to be rebuilt for each Lithe release. This directory is the cross-platform source of truth: -| File | Purpose | +| Path | Purpose | | --- | --- | | `plugin-manifest.schema.json` | JSON shape of `plugin.json` | -| `fixtures/*.plugin.json` | Valid example manifests, named after the capability they exercise rather than a published plugin: `language-*` (packaged, system-command, and host-integration language servers; `node-runtime` for a discovered runtime), `hello-lithe` and `web-panel` (UI), `settings-v2`, and `build-*` (level 3 build systems and the two forms of a build provider) | -| `fixtures/tool-definition.plugin.json`, `fixtures/toolchain-provider.plugin.json` | Production-shape Core fixtures for tool definitions and a packaged toolchain provider; require explicit new host capabilities, not yet supplied by native products | -| `fixtures/keymap-import-provider.plugin.json` | Two independent shortcut import providers sharing one packaged backend; native source access is not implemented yet | -| `fixtures/invalid-manifests.json` | Edits to a valid manifest and the rejection code every host must report | -| `fixtures/signature-vectors.json` | Public cross-platform vectors for the package publisher signature: the RFC 8032 test key, a fixed package with non-ASCII file names, its canonical payload, RFC 8032 deterministic signature, and content digest. Both platforms must build the same canonical payload and digest and accept the recorded signature; signers that add randomness, such as CryptoKit, check the signature by verification instead of byte comparison | -| `fixtures/command-plans.json` | Golden run/test command expansions and language-server launch plans | -| `fixtures/runtime-versions.json` | Golden outcomes of the launch runtime version check | -| `fixtures/build-plans.json` | Golden build-system plans and decoded outputs | -| `fixtures/function-protocol.json` | Golden plugin-function negotiation, registration, invocation, outcome, progress, and refusal cases | -| `fixtures/project-generator.plugin.json`, `fixtures/project-generator-templates/` | Project generators: template files, a scaffolding command, and an archive download | -| `fixtures/project-plans.json` | Golden `project.*` form evaluations, generation plans, and name checks | +| `native-ui.schema.json` | JSON shape of native UI documents rendered by the host | | `plugin-index.schema.json` | JSON shape of a marketplace source index | -| `fixtures/marketplace/*.json` | Marketplace index, availability, source URL, and install review golden cases | -| `toolchains.md` | Implemented Core foundation: plugin definitions/provider declarations, verified-origin registry, reply validation, directory pins, snapshot resolution, version matching and discovery plans; native hosts are not connected | -| `proposals/toolchains/` | Broader design draft, including unimplemented query transport, native lifecycle/persistence, consumer migration, settings UI and manager plugins; examples are review projections, not installable manifests | +| `fixtures/` | Valid example manifests and golden cases, one folder per contract area (below). Manifests are named after the capability they exercise rather than a published plugin. Case files name their base manifest by file name, so file names are unique across the folders | +| `toolchains/README.md` | Implemented Core foundation: plugin definitions/provider declarations, verified-origin registry, reply validation, directory pins, snapshot resolution, version matching and discovery plans; macOS uses it for its read-only settings pages and for Build and run tools, Windows is not connected | +| `toolchains/proposal/` | Broader design draft, including unimplemented query transport, native lifecycle/persistence, consumer migration, settings UI and manager plugins; examples are review projections, not installable manifests | + +| Fixture folder | Contents | +| --- | --- | +| `fixtures/manifest/` | `hello-lithe.plugin.json`, the smallest UI plugin, and `invalid-manifests.json`: edits to a valid manifest and the rejection code every host must report | +| `fixtures/languages/` | Language support: packaged, system-command, and host-integration language servers, `node-runtime` for a discovered runtime, and `language-grammar` with `grammars/`; `command-plans.json` holds golden run/test command expansions and language-server launch plans, `runtime-versions.json` the golden outcomes of the launch runtime version check | +| `fixtures/backend/` | Plugin backends (`backend`, `backend-workspace`, `command-backend`, `terminal-backend`); `function-protocol.json` holds golden plugin-function negotiation, registration, invocation, outcome, progress, and refusal cases, `plugin-logging.json` the golden `litheLogging` negotiation and notifications | +| `fixtures/editor/` | Editor actions served by a backend | +| `fixtures/ui/` | Native controls, forms, and panels, and a web panel | +| `fixtures/settings/` | Plugin settings declared with `settings: 2` | +| `fixtures/build-systems/` | Level 3 build systems (`build-*`: static file, command output, host integration, instance options, model producer and consumer, tool path, toolchains); `build-plans.json` holds golden build-system plans and decoded outputs | +| `fixtures/build-providers/` | Build providers (`build-provider*`) and the golden cases of their configuration, run options, run and debug preparation, execution, and test protocols | +| `fixtures/debug-adapters/` | Debug adapters (standalone, served by a language server, remote attach) and `debug-adapter-rejections.json` | +| `fixtures/vcs/` | A version control provider | +| `fixtures/keymap-import/` | Two independent shortcut import providers sharing one packaged backend | +| `fixtures/project-generators/` | Project generators: template files (`templates/`), a scaffolding command, and an archive download; `project-plans.json` holds golden `project.*` form evaluations, generation plans, and name checks | +| `fixtures/toolchains/` | Production-shape fixtures for tool definitions and a packaged toolchain provider; they require `toolDefinitions` and `toolchainProviders`, which only macOS advertises. `proposal/` holds the examples and cases of the toolchains draft | +| `fixtures/package-trust/` | `publisher-bundled.plugin.json` and `signature-vectors.json`: public cross-platform vectors for the package publisher signature: the RFC 8032 test key, a fixed package with non-ASCII file names, its canonical payload, RFC 8032 deterministic signature, and content digest. Both platforms must build the same canonical payload and digest and accept the recorded signature; signers that add randomness, such as CryptoKit, check the signature by verification instead of byte comparison | +| `fixtures/marketplace/` | Marketplace index, availability, source URL, and install review golden cases | Validation and template expansion are implemented once in Rust Core (`rust/lithe-core/src/plugins/`, with build systems in @@ -44,15 +52,16 @@ fields are rejected; editors associate the schema by file name instead. ## Plugin-owned toolchains (Core foundation) -The [toolchains draft](proposals/toolchains/README.md) records the replacement +The [toolchains draft](toolchains/proposal/README.md) records the replacement design discussed in [PR #1581](https://github.com/1lck/Lithe-IDEA/pull/1581#issuecomment-6541366112). All tool definitions belong to enabled plugins; the host supplies only generic query, validation, resolution, persistence, and presentation mechanisms. It does not add a built-in tool-definition table or interpret version-manager configuration formats. -The [implemented Core contract](toolchains.md) now accepts `toolDefinitions: 1` -and `toolchainProviders: 1` declarations and provides six `toolchains.*` commands. +The [implemented Core contract](toolchains/README.md) now accepts `toolDefinitions: 1` +and `toolchainProviders: 1` declarations and provides the `toolchains.*` commands +listed there. `executableResolution: 2` applies to tool-definition candidates only; it does not admit new sources into existing Build candidate sets. Definitions are entirely plugin-owned, with reserved short IDs checked against host-verified official @@ -61,11 +70,13 @@ provenance when constructing the registry. macOS advertises these capabilities for its read-only toolchain settings pages. The native adapter scans declarations, probes checked executables, queries plugin backends and watches their inputs; Core consumes captured facts and owns validation -and resolution. Windows does not advertise the capabilities. Saving pins, +and resolution. A separate fresh resolution serves Build tools and run plans +whose `toolchain` executable names a plugin-defined tool rather than a host +toolchain; settings detections never grant launch authority. Windows does not advertise the capabilities. Saving pins, `toolchainConsumers`, generic runtime launches and live backend activation remain -unsupported, and current Java/Maven/Build/Run selection is unchanged. Version-manager +unsupported, and Java and language-server consumers keep their previous adapters. Version-manager implementations such as mise belong to their own plugin packages. Proposal -envelopes remain separate from production manifests. See [the implemented slice](toolchains.md). +envelopes remain separate from production manifests. See [the implemented slice](toolchains/README.md). ## Shortcut import providers (Core foundation) @@ -125,10 +136,10 @@ and provider, revokes them when the import or session ends, and rejects files replaced or changed after capture. A new snapshot for that provider revokes the previous one. Errors never disclose absolute paths. -This is a foundation, not an available product extension: macOS implements the -scoped reader, but provider discovery, the product import workflow and Windows -source access are not implemented. Hosts must not advertise this capability -until they implement the complete workflow. No existing SDK advertises it. +macOS advertises `keymapImportProviders` 1 and implements the scoped reader. +Windows has no import source reader and does not advertise the capability; a +host advertises it only with the complete import workflow. The official Node, +Java and Rust SDKs implement `litheKeymapImport` 1. ## Package layout @@ -151,7 +162,7 @@ symbolic links. A host treats an installed package as read-only. | `id` | Stable plugin ID: lowercase letters, digits, `.` and `-`. | | `displayName` | Name shown in plugin management. | | `version` | Plugin version, `major.minor.patch`. Independent of the Lithe version. | -| `pluginAPIVersion` | Declarative plugin API level of the manifest format. Hosts list the levels they support; Lithe's own version is never used for compatibility. This contract defines levels `1`, `2`, and `3`; see [API levels](#api-levels). | +| `pluginAPIVersion` | Declarative plugin API level of the manifest format. Hosts list the levels they support; Lithe's own version is never used for compatibility. This contract defines levels `1`, `2`, `3`, and `4`; see [API levels](#api-levels). | | `requires` | Level 3 only, and required there: every capability the manifest uses, with the version of that capability's contract it was written against; see [Capability versions](#capability-versions-level-3). | | `vendor` | `id`, `displayName`, and `signatureRequirement` (see Trust). | | `permissions` | Capabilities the plugin may ask the host to perform. | @@ -162,8 +173,8 @@ symbolic links. A host treats an installed package as read-only. | `settings` | User-adjustable plugin options (level 2 and later). | | `ui` | Host-rendered tool windows and commands (level 2 and later). | | `buildSystems` | Project-level build tools (level 3). | -| `toolDefinitions` | Plugin-owned tool policy ([Core foundation](toolchains.md)); requires `toolDefinitions: 1` and `executableResolution: 2`; macOS hosts read-only discovery. | -| `toolchainProviders` | Backend fact-provider declarations ([Core foundation](toolchains.md)); requires `toolchainProviders: 1`, backend/server-process capabilities and `toolchains.provide`. | +| `toolDefinitions` | Plugin-owned tool policy ([Core foundation](toolchains/README.md)); requires `toolDefinitions: 1` and `executableResolution: 2`; macOS hosts read-only discovery and resolves Build and run tools. | +| `toolchainProviders` | Backend fact-provider declarations ([Core foundation](toolchains/README.md)); requires `toolchainProviders: 1`, backend/server-process capabilities and `toolchains.provide`. | | `keymapImportProviders` | Independent shortcut import providers; requires `keymapImportProviders: 1`, `backend: 2`, `serverProcess: 1` and `keymaps.provide`. macOS provides access to explicitly selected sources; Windows does not yet advertise this capability. | Unknown fields are refused (`plugin.manifest.invalid`) so an older host @@ -239,7 +250,7 @@ activation event, and a plugin may consist of grammars alone. (`@a.b` resolves to the longest declared prefix, as in Monarch), `cases` guards naming an undeclared attribute, and `nextEmbedded` values other than `@pop` or a language ID. The fixture - [`fixtures/grammars/http.monarch.json`](fixtures/grammars/http.monarch.json) + [`fixtures/languages/grammars/http.monarch.json`](fixtures/languages/grammars/http.monarch.json) is a complete example. - `configuration` sets `lineComment`, `blockComment` (open and close), `brackets`, and `autoClosingPairs`. Each delimiter is 1 to 16 bytes without @@ -299,7 +310,7 @@ prints to stderr (hosts capture it together with stdout), and `--version` for `node`. Java 8 and older report `1.`, which is read as ``. The reported version is the first dotted number in the probe output, ignoring lines that start with `Picked up ` (a JVM announcing `JAVA_TOOL_OPTIONS` -before its version); see `fixtures/runtime-versions.json`. +before its version); see `fixtures/languages/runtime-versions.json`. #### Host integrations (API 2) @@ -432,7 +443,7 @@ Malformed or unnegotiated input produces one category-only the rejected payload. Ingress admits at most 600 facts per minute per session, then uses the existing bounded Core handoff to the host's single writer; overload increments its dropped counter. No polling timer or extra writer is -created. Fixture: `fixtures/plugin-logging.json`. +created. Fixture: `fixtures/backend/plugin-logging.json`. Declarative contributions have no plugin process to send `lithe/log`, so whoever executes the declared work records the same `plugins.operation.finished` and @@ -522,7 +533,7 @@ a plugin place its options anywhere in the host's settings without the host knowing the plugin. Hosts keep only generic registration points: a page per language and per build system, sections, one control per setting type, a project/global layer switch, and buttons. What appears there comes from the -manifest. Fixture: `fixtures/settings-v2.plugin.json`. +manifest. Fixture: `fixtures/settings/settings-v2.plugin.json`. ```json "settings": [ @@ -653,21 +664,21 @@ hosts. Level 3 versions each section on its own. A level 3 manifest lists in | `languages` | `languages[]` | `1`, `2` (adds [`grammar` and `configuration`](#grammars-and-editor-configuration-languages-2)) | | `packageTrust` | `vendor.bundledSignatureRequirement`: origin-scoped trust for a host-sealed bundled copy of a publisher-signed plugin | `1` | | `languageServers` | `languageServers[]` apart from their launch fields | `1`, `2` (adds [`workspaceConfiguration`](#workspace-configuration-languageservers-2)) | -| `serverProcess` | The launch fields of language servers, of build providers with a process of their own, of VCS providers, and of the plugin backend: `launch`, `arguments`, `validationArguments`, `runtimeDependencies`, `initializationOptions` | `1` | +| `serverProcess` | The launch fields of language servers, of build providers with a process of their own, of VCS providers, and of the plugin backend: `launch`, `arguments`, `validationArguments`, `runtimeDependencies`, `initializationOptions` | `1`, `2` (adds `runSelectedRuntime` for [debug adapters](#api-level-4-debug-adapters); level 4; v2 Core only, macOS and Windows advertise `1`) | | `executionProviders` | `executionProviders[]` | `1` | | `settings` | `settings[]` and `settingActions[]` | `1`, `2` (adds [placement, scope, effect, page buttons](#settings-v2-placement-scope-effect-and-page-buttons)) | | `ui` | `ui` | `1`, `2` (web content), `3` (native controls), `4` ([backend-only commands](#backend-only-commands-ui-4)) | | `buildSystems` | Declarative build detection, models, and command plans; v2 executable setting adapter; v3 instance-scoped options; v4 declarative preparation roles | `1`, `2`, `3`, `4` | | `buildProviders` | `buildSystems[].provider`, including own-process and shared language-server providers; v2 tasks, v3 tests, v4 run, v5 native debug preparation, v6 read-only model inputs, v7 native configuration, v8 inline test reports, v9 opaque semantic test selectors, v10 typed run options and service/task preparation, v11 registry connection debugging | `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11` | | `buildModelInputs` | Optional public model sharing between enabled workspace plugins | `1` | -| `executableResolution` | Shared executable candidate ordering and strict selection; v2 canonical project/subproject toolchain registry bindings | `1`, `2` | | `vcsProviders` | `vcsProviders[]` | `1` | | `debugAdapters` | [`debugAdapters[]`](#api-level-4-debug-adapters); v2 adds target arguments/environment | `1`, `2` | | `projectGenerators` | [`projectGenerators[]`](#project-generators): entries of the New Project window | `1` | | `backend` | [`backend`](#plugin-backend): the plugin's own long-lived process | `1`, `2` (adds [start without a page and workspace contexts](#backend-2-workspace-contexts)) | -| `toolDefinitions` | [Tool identities, layouts, discovery and four-layer candidates](toolchains.md) | `1` (Core; macOS read-only settings) | -| `toolchainProviders` | [Provider declarations and permission-bound answer validation](toolchains.md) | `1` (Core; macOS read-only settings) | -| `executableResolution` | [Shared executable candidates](#shared-executable-candidates-executableresolution-1); v2 adds tool-definition candidates without changing existing Build candidate sets | `1`, `2` (v2 Core; macOS read-only settings) | +| `toolDefinitions` | [Tool identities, layouts, discovery and four-layer candidates](toolchains/README.md) | `1` (Core; macOS settings pages, Build and run tools) | +| `toolchainProviders` | [Provider declarations and permission-bound answer validation](toolchains/README.md) | `1` (Core; macOS settings pages, Build and run tools) | +| `executableResolution` | [Shared executable candidates](#shared-executable-candidates-executableresolution-12): candidate ordering and strict selection; v2 adds tool-definition candidates and canonical project/subproject toolchain registry bindings without changing existing Build candidate sets | `1`, `2` (v2 Core; macOS settings pages, Build and run tools) | +| `keymapImportProviders` | `keymapImportProviders[]`: independent shortcut import providers | `1` (macOS; Windows does not advertise it yet) | Version 1 of every capability means what its section means at level 2 (runtime launches, launch templates, `initializationOptions`, and so on), so @@ -808,7 +819,7 @@ even inside the host seal. The optional declaration alone grants no trust. Hosts without `packageTrust: 1` filter this version before download and reject its manifest; no new application-version field is needed. An older manifest without the declaration keeps its existing policy. The valid example is -`fixtures/publisher-bundled.plugin.json`. +`fixtures/package-trust/publisher-bundled.plugin.json`. A host pins the signature requirement of its official plugin IDs so a package cannot downgrade itself. Selecting a file from disk never overrides that pin, @@ -1014,9 +1025,16 @@ They are excluded as `plugin-disk-install-state`. No runtime write targets the signed app bundle or Windows installation resources, so these paths do not change code signatures or Sparkle differential-update baselines. -Windows currently shares the schemas and Rust validation only; it has no -implementation of this declarative ZIP/directory snapshot and approval flow. -Its existing worker-package import is a separate format. The feature matrix +Windows has a narrower disk import. It copies a ZIP or unpacked directory into +a private snapshot under the application's local data directory +(`plugin-temp/lithe-plugin-disk-`), reviews it with +`plugins.marketplace.installReview`, and installs only after the user confirms. +Confirmation re-runs the review and refuses a snapshot whose `plugin.json` +changed after review. It does not verify publisher signatures, does not compute +or recheck a digest of the other package files, and does not record approved +programs or provenance; its installation record holds only the ID, active +version and enabled state. It has no marketplace install path. Its existing +worker-package import is a separate format. The feature matrix therefore keeps Windows `partial` and macOS runtime verification `pending`; static checks and Node resource tests alone do not verify the UI confirmation, complete program rendering, cleanup, or bundle hashes in a real workflow. @@ -1035,7 +1053,7 @@ a project file, `build-command-stdout` decodes a command's standard output, `build-host-integration` hands the model to a host integration. They use Cargo, Go, Gradle, and Maven as realistic inputs; they are not those plugins. `build-provider` and `build-provider-language-server` show the two -forms of a build provider, and `fixtures/build-plans.json` is the golden list +forms of a build provider, and `fixtures/build-systems/build-plans.json` is the golden list of plans and decoded outputs every host gets from them. A build system needs `pluginAPIVersion` 3 with `buildSystems` in `requires`, @@ -1075,7 +1093,7 @@ instance option. When an existing option moves to instance scope, macOS copies i to each detected or previously stored root, preserving explicit instance values and empty markers. It removes the shared representation only after readback, then redetects static models. Failure retains the source and blocks publishing defaults -until retry; scope is not a fallback chain. See `fixtures/build-instance-options.plugin.json`. +until retry; scope is not a fallback chain. See `fixtures/build-systems/build-instance-options.plugin.json`. ### Presentation @@ -1232,8 +1250,8 @@ Provider session owns children and writable workspace state; no page, additional runtime, directory or cross-plugin private cache is required. Only public typed results may cross domain boundaries. -Canonical examples: `fixtures/build-provider-execution.plugin.json` and -`fixtures/build-execution-protocol.json`. Protocol v2 is a construction +Canonical examples: `fixtures/build-providers/build-provider-execution.plugin.json` and +`fixtures/build-providers/build-execution-protocol.json`. Protocol v2 is a construction primitive for #1495; it does not by itself migrate Maven or Java consumers. ### Provider test execution (buildProviders 3) @@ -1266,8 +1284,8 @@ system has one. Configuration validity is retained through diagnostic and report decoding; late results cannot update a changed workspace/configuration. Java/Maven migration remains separate. No new resource/cache location is introduced. -Canonical examples: `fixtures/build-provider-tests.plugin.json` and -`fixtures/build-test-protocol.json`. +Canonical examples: `fixtures/build-providers/build-provider-tests.plugin.json` and +`fixtures/build-providers/build-test-protocol.json`. #### Test discovery @@ -1301,7 +1319,7 @@ package changes and workspace teardown revoke the cached list and in-flight discovery. A native action must revalidate the selected ID against the current list before submitting its exact selectors to `lithe/build/test`; stale toolbar selections cannot run. The backend must reject a selector whose facts -have become stale externally. Canonical example: `fixtures/build-test-discovery.json`. +have become stale externally. Canonical example: `fixtures/build-providers/build-test-discovery.json`. ### Provider run preparation (buildProviders 4) @@ -1388,8 +1406,8 @@ including aliases, before preparation. The host passes the same options to Only this explicit override may lie outside the selected instance. Without an override the original instance containment rule still applies. Other launch result validation and cancellation/stale-result behavior are unchanged. -Canonical fixtures: `fixtures/build-provider-run-options.plugin.json` and -`fixtures/build-run-options.json`. +Canonical fixtures: `fixtures/build-providers/build-provider-run-options.plugin.json` and +`fixtures/build-providers/build-run-options.json`. #### Registry connection debugging (buildProviders 11) @@ -1422,7 +1440,7 @@ the selected registered adapter owns its transport. In particular, `tcpLanguageServer` may refer only to a language server declared by that adapter's own plugin. No built-in language debugger fallback is permitted. This does not change same-package native `prepareDebug` (v5). -Canonical fixture: `fixtures/build-connection-debug-options.json`. +Canonical fixture: `fixtures/build-providers/build-connection-debug-options.json`. ### Native debug preparation (version 5) @@ -1463,8 +1481,8 @@ its own permissions and package process declaration. The launch configuration re operation; the Debug host owns launched sessions and plugin withdrawal cleanup. Saved Run configurations keep their existing selectors and prepare again for Debug. -Fixtures: [native declaration](fixtures/build-provider-debug-preparation.plugin.json) -and [native result](fixtures/build-debug-preparation.json). This does not provide +Fixtures: [native declaration](fixtures/build-providers/build-provider-debug-preparation.plugin.json) +and [native result](fixtures/build-providers/build-debug-preparation.json). This does not provide Java/JDT preparation, long-running services or cross-plugin collaboration. @@ -1481,8 +1499,8 @@ Every restart re-resolves the enabled instance/model and sends a fresh preparati Missing plugins/targets/models fail explicitly; there is no command fallback. Saving and running work before detector-generated Run configurations exist. Service coordination, debug target registration and Java/Maven migration remain -separate. See `fixtures/build-provider-run-preparation.plugin.json` -and `fixtures/build-run-preparation.json`. +separate. See `fixtures/build-providers/build-provider-run-preparation.plugin.json` +and `fixtures/build-providers/build-run-preparation.json`. ### Optional native configuration (buildProviders 7) @@ -1557,8 +1575,8 @@ A failed read-back is not a successful effective-value publication. Native probe output files and mutable provider caches live only in workspace/platform state and are not cross-worktree reusable. Installed packages remain byte-for-byte unchanged. -Fixtures: [declaration](fixtures/build-provider-configuration.plugin.json) and -[native facts](fixtures/build-configuration.json). +Fixtures: [declaration](fixtures/build-providers/build-provider-configuration.plugin.json) and +[native facts](fixtures/build-providers/build-configuration.json). ### Optional read-only model inputs (buildModelInputs 1) @@ -1630,8 +1648,8 @@ functions, grants permissions, leases a process or resolves a package version. There is no general plugin-dependency/export API. Backend authors must handle unavailable and non-ready slots explicitly. Language integration and existing Java/Maven business migration remain separate work. Shared fixtures: -`fixtures/build-model-producer.plugin.json` and -`fixtures/build-model-consumer.plugin.json`. +`fixtures/build-systems/build-model-producer.plugin.json` and +`fixtures/build-systems/build-model-consumer.plugin.json`. ### Inline provider test reports (buildProviders 8) @@ -1671,7 +1689,7 @@ identity, checks ownership again after decode, and only presents the result. Cancellation or configuration changes revoke late reports just like late output. The report is operation state in a platform-provided writable directory, never installed package state or a cross-worktree cache. Fixture: -`fixtures/build-provider-reports.plugin.json`. +`fixtures/build-providers/build-provider-reports.plugin.json`. ### Build providers @@ -1727,13 +1745,15 @@ The manifest only says how to start the provider and which sources use it. Everything else is negotiated in the LSP `initialize` exchange, so a provider can add optional data within a negotiated protocol version: -- The host sends `capabilities.experimental.litheBuild: { "versions": [8, 7, 6, 5, 4, 3, 2, 1] }`, +- The host sends `capabilities.experimental.litheBuild: { "versions": [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] }`, the build-provider protocol versions it speaks. Version 1 is the two requests above with the params and result formats of this section; version 2 adds typed task execution; version 3 adds typed test execution and discovery; version 4 adds application run preparation; version 5 adds native debug preparation; version 6 accepts the host's explicitly declared read-only model inputs; - version 7 adds source-backed native configuration; version 8 adds inline test reports. + version 7 adds source-backed native configuration; version 8 adds inline test reports; + version 9 adds opaque semantic test selectors; version 10 adds typed run options and + service/task run preparation; version 11 adds registry connection debugging. - The provider answers `capabilities.experimental.litheBuild: { "version": 1 }` with the version it chose from that list. A provider that answers no version, or one the host did not offer, is not used for build requests; a @@ -1928,14 +1948,14 @@ takes a connection (`maxPathMappings` is 0 without mappings, 1 for `first`, and 16 otherwise) and `null` otherwise, so a host knows whether to offer the host-and-port form and the mapping list, and how many rows the list may hold. -The cases in `fixtures/debug-adapter-rejections.json` state the stable code and +The cases in `fixtures/debug-adapters/debug-adapter-rejections.json` state the stable code and field for each refusal and the layer that reports it: `schema`, `coreManifest`, `corePlan` (one start: stale registration or runtime selection, a target missing a fact a binding reads; the request defaults to `launch` and `context.request` sets `attach`), and `coreInstall` (a `parametersSchema` that is missing or links outside the package). -`fixtures/debug-adapter.plugin.json` is a valid example, and -`fixtures/debug-adapter-remote-attach.plugin.json` declares six adapters that +`fixtures/debug-adapters/debug-adapter.plugin.json` is a valid example, and +`fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json` declares six adapters that differ in how they take a connection. ## Plugin backend @@ -1956,8 +1976,8 @@ language, or workspace: launch fields, with the same templates and install review; the review lists it as `packagedBackend`, `systemCommandBackend`, or `runtimeBackend`. It needs `pluginAPIVersion` 3, `requires.backend: 1`, `requires.serverProcess: - 1`, and the `backend.launch` permission. `fixtures/backend.plugin.json` is - the example; the backend cases of `fixtures/invalid-manifests.json` are the + 1`, and the `backend.launch` permission. `fixtures/backend/backend.plugin.json` is + the example; the backend cases of `fixtures/manifest/invalid-manifests.json` are the rejections. - In `backend` 1 only the plugin's own [web pages](#web-content-ui-2) call it, so a backend without a web tool window is `plugin.manifest.invalid`. @@ -1980,7 +2000,7 @@ language, or workspace: `requires.backend: 2` keeps every rule of version 1 and changes when the process starts and what it learns about workspaces. -`fixtures/backend-workspace.plugin.json` is the example. +`fixtures/backend/backend-workspace.plugin.json` is the example. - It may start without a page. It needs at least one way to start: a web tool window (first page call, as in version 1), a `ui.commands[]` entry @@ -2421,7 +2441,7 @@ notifications. `versionConflict`, or `{ retryAfterMilliseconds }` with `rateLimited`); it reaches a version 3 backend as `error.data.details` and is dropped otherwise. Details that are not an object, or larger, are dropped too; - the failure itself still reaches the backend. `fixtures/function-protocol.json` (`hostFailures`) + the failure itself still reaches the backend. `fixtures/backend/function-protocol.json` (`hostFailures`) lists the mapping. | Code | JSON-RPC | Meaning | @@ -2492,7 +2512,7 @@ then never sees them. and serialized params are at most `limits.notificationBytes`. Core refuses any other method, a service the session is not granted, malformed params, a session that is not plugin-owned, or one that is not ready, with - `invalid_request`. `fixtures/function-protocol.json` + `invalid_request`. `fixtures/backend/function-protocol.json` (`hostNotifications`) holds the cases. ### Extending version 3 @@ -2531,7 +2551,7 @@ So that a version 3 backend works with every host of version 3: (`plugin.permission.unknown`), so a permission is never granted or ignored silently. -`fixtures/function-protocol.json` (`hostRequests`) holds the +`fixtures/backend/function-protocol.json` (`hostRequests`) holds the unsupported-option cases. ### Public document, file and window methods (protocol version 3) @@ -2621,7 +2641,7 @@ or omitted `toolWindows` array. Such a command requires `backend:2`, the existin `ui.contribute` and `backend.launch` permissions, and its `onCommand:` event. Versions 1-3 retain their window-required behavior. An old host rejects ui 4 at installation, rather than accepting a command it cannot execute. See -`fixtures/command-backend.plugin.json`. +`fixtures/backend/command-backend.plugin.json`. The command appears through the ordinary workbench command contributions and sends `commands/didRun` without opening a dummy tool window. Commands arriving @@ -2662,7 +2682,7 @@ workspace context: cannot discover a backend that has not started. Backend installation still needs restart. Standalone backends have an application-scoped enablement module, without a fake UI or language provider; safe mode/quarantine/disable still veto - their startup. Example package: `fixtures/editor-actions.plugin.json`. + their startup. Example package: `fixtures/editor/editor-actions.plugin.json`. - A selector has 1 to 32 literal names/extensions; extensions accept an optional leading dot. Matching is case-insensitive. At most 32 bindings per plugin across contexts; duplicate registration IDs in a context are refused. @@ -2722,7 +2742,7 @@ workspace context: context, and failure codes and details, all of which it never sees. - `requires.backend: 1` packages keep their meaning; a new behavior of the backend capability is `backend` 2, never a silent change of version 1. -- `fixtures/function-protocol.json` holds the golden cases, including the +- `fixtures/backend/function-protocol.json` holds the golden cases, including the host requests (`hostRequests`), call contexts (`invocationContexts`), host failure codes (`hostFailures`), and host notifications (`hostNotifications`). Rust Core tests run them, and a scripted backend covers routing, result, failure, cancellation, @@ -2865,8 +2885,8 @@ is Windows-only behavior outside v1. `pluginAPIVersion: 2` adds optional `ui` contributions and the `ui.contribute` permission. API level 1 language packages continue to work. UI-only packages may omit `languages`; every package must still declare a language provider or a -nonempty UI catalog. See `fixtures/hello-lithe.plugin.json` and the UI cases in -`fixtures/invalid-manifests.json`. +nonempty UI catalog. See `fixtures/manifest/hello-lithe.plugin.json` and the UI cases in +`fixtures/manifest/invalid-manifests.json`. - `ui.toolWindows`: 1–64 entries with stable `id`, `title`, initial `placement` (`left`, `bottom` or `right`), integer `order` (default 0), and plain `text`. @@ -2917,8 +2937,8 @@ that wants its own UI can show its own page in a tool window instead of permission, which the install review lists like every permission. `requires.ui: 2` without a web window is `plugin.manifest.invalid`, so a text-only plugin stays installable on hosts that run only `ui` 1. -- `entry` is a package-relative `.html` path. `fixtures/web-panel.plugin.json` - is the example; the web cases of `fixtures/invalid-manifests.json` are the +- `entry` is a package-relative `.html` path. `fixtures/ui/web-panel.plugin.json` + is the example; the web cases of `fixtures/manifest/invalid-manifests.json` are the rejections. The window shell stays the host's: dock, title, activity-bar entry, order, @@ -3046,9 +3066,12 @@ The design source is the [proposed public Extension Contract and Provider API](h Current runtime behavior is recorded in the [first-stage workbench UI Note](https://github.com/1lck/Lithe-IDEA/blob/preview/.agents/notes/implemented/architecture/2026-10-12-workbench-ui-contributions.md). ### Current Windows availability -Windows can validate API level 2 through Rust Core but its UI adapter has not -implemented this contract yet. Its marketplace must filter unsupported API -levels until that adapter is available. +Windows advertises `ui` 1 and 2: it renders host tool windows, commands and +package web content. It does not advertise `ui` 3 (native controls) or 4 +(backend-only commands), so Core refuses packages that require them there. +Windows installs declarative packages from disk only and has no marketplace +browser yet. Core's `plugins.marketplace.validateIndex` marks level 2 versions +without `requires` available only on `darwin-*` platforms. ### Existing community store and Lua template @@ -3066,10 +3089,11 @@ remain valid. To add a host-rendered view to that template: existing package checksum, user install review and content digest still apply; UI does not bypass them. 5. Set the new Store version entry's `pluginAPIVersion` to 2. The index schema, - release archive format and SHA-256 rules stay unchanged. Only list platforms - with an implemented API level 2 UI host (currently macOS). + release archive format and SHA-256 rules stay unchanged. Only list `darwin-*` + platforms: `plugins.marketplace.validateIndex` marks a level 2 version without + `requires` unsupported on every other platform. -`fixtures/hello-lithe.plugin.json` is a contract fixture in the reserved test +`fixtures/manifest/hello-lithe.plugin.json` is a contract fixture in the reserved test namespace, not a ready-to-publish community package. Change its ID and all references to your own namespace before using it in Lithe Store. @@ -3221,7 +3245,7 @@ remains sufficient). Legacy manifests do not need the new capability; hosts without it reject new-style plugins before decoding unknown fields. Published 0.1.0/0.1.1 archives remain immutable; migration is a new plugin version. -See [`build-tool-path.plugin.json`](fixtures/build-tool-path.plugin.json). +See [`build-tool-path.plugin.json`](fixtures/build-systems/build-tool-path.plugin.json). With `executableResolution: 2`, a candidate may use `{ "kind": "toolchain", "toolchainID": "org.example.compiler:compiler" }`. @@ -3239,7 +3263,7 @@ Passive import performs no version or runtime probes; a definition that requires verification is not reported as an already verified import executable. A toolchain that resolves to a project file remains project code, including through a symlink, and native configuration requires explicit Read -before running it. See [`build-toolchains.plugin.json`](fixtures/build-toolchains.plugin.json). +before running it. See [`build-toolchains.plugin.json`](fixtures/build-systems/build-toolchains.plugin.json). ### Host-rendered native content (`ui` 3, native schema 1) @@ -3250,7 +3274,7 @@ ui 3 and rejects these packages before installing them. The independently versioned [native schema](native-ui.schema.json) has no style, script, HTML or host-action fields. The host renders every control with its shared theme. -See [native-panel.plugin.json](fixtures/native-panel.plugin.json) and the runnable +See [native-panel.plugin.json](fixtures/ui/native-panel.plugin.json) and the runnable [Node SDK Sample Explorer](https://github.com/Lithe-IDEA/lithe-plugin-docs/blob/main/sdk/node/examples/sample-build/plugin.json). `native.kind` is `tree`, `list` or `form`; `nodes` contains literal `id`, `label` and optional `children`. IDs are stable, case-sensitive ASCII letters/digits plus @@ -3309,7 +3333,7 @@ A pending call disables all fields. Values use the existing 64 KiB per-plugin, per-window, per-workspace state store; removed fields, invalid types and removed options are discarded when restoring. Provider replies never overwrite local fields. Form declarations and choices are static in this version. -See [native-form.plugin.json](fixtures/native-form.plugin.json) and +See [native-form.plugin.json](fixtures/ui/native-form.plugin.json) and [host UI acceptance fixture](https://github.com/1lck/Lithe-IDEA/blob/preview/macos/Tests/Fixtures/native-ui-lab/README.md) for acceptance. An optional `source` names this plugin's `buildSystemID` and a function returning @@ -3367,7 +3391,7 @@ The wire session must explicitly negotiate version 9. Core and both SDKs reject these fields on older versions before dispatch; ignoring a filter is unsafe even when version 8 inline reports are supported. The operation identity, source/model and configuration validity, cancellation, progress, and inline report rules still -apply. The shared example is `fixtures/build-provider-selectors.plugin.json`. +apply. The shared example is `fixtures/build-providers/build-provider-selectors.plugin.json`. ### Declarative project preparation (buildSystems 4) @@ -3388,7 +3412,7 @@ ambiguous declarations fail; they do not fall back to a conventional task ID. The selected ID travels through the existing execute plan and backend method. An older host rejects the capability before invocation. No new RPC version is needed, so buildProviders 8–10 are unchanged. Shared fixture: -`fixtures/build-provider-preparation.plugin.json`. +`fixtures/build-providers/build-provider-preparation.plugin.json`. The build backend owns filtering, custom resource directories, profiles and reactor semantics. Hosts await successful completion, retain one operation @@ -3399,7 +3423,7 @@ the persistent model reflects a different configuration. ### Plugin-owned native terminals (function protocol 3) -[`terminal-backend.plugin.json`](fixtures/terminal-backend.plugin.json) is the +[`terminal-backend.plugin.json`](fixtures/backend/terminal-backend.plugin.json) is the minimal manifest. `terminal.create` grants `lithe/host/terminal/create`, `show`, `close`, `reopen`, `dispose`, and `onExit`. It requires `backend:2`; discover the individual methods through `getCapabilities` before using them. macOS implements this diff --git a/shared/contracts/plugins/v1/fixtures/backend-workspace.plugin.json b/shared/contracts/plugins/v1/fixtures/backend/backend-workspace.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/backend-workspace.plugin.json rename to shared/contracts/plugins/v1/fixtures/backend/backend-workspace.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/backend.plugin.json b/shared/contracts/plugins/v1/fixtures/backend/backend.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/backend.plugin.json rename to shared/contracts/plugins/v1/fixtures/backend/backend.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/command-backend.plugin.json b/shared/contracts/plugins/v1/fixtures/backend/command-backend.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/command-backend.plugin.json rename to shared/contracts/plugins/v1/fixtures/backend/command-backend.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/function-protocol.json b/shared/contracts/plugins/v1/fixtures/backend/function-protocol.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/function-protocol.json rename to shared/contracts/plugins/v1/fixtures/backend/function-protocol.json diff --git a/shared/contracts/plugins/v1/fixtures/plugin-logging.json b/shared/contracts/plugins/v1/fixtures/backend/plugin-logging.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/plugin-logging.json rename to shared/contracts/plugins/v1/fixtures/backend/plugin-logging.json diff --git a/shared/contracts/plugins/v1/fixtures/terminal-backend.plugin.json b/shared/contracts/plugins/v1/fixtures/backend/terminal-backend.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/terminal-backend.plugin.json rename to shared/contracts/plugins/v1/fixtures/backend/terminal-backend.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-configuration.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-configuration.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-configuration.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-configuration.json diff --git a/shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json diff --git a/shared/contracts/plugins/v1/fixtures/build-debug-preparation.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-debug-preparation.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-debug-preparation.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-debug-preparation.json diff --git a/shared/contracts/plugins/v1/fixtures/build-execution-protocol.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-execution-protocol.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-execution-protocol.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-execution-protocol.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-configuration.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-configuration.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-configuration.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-configuration.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-execution.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-execution.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-execution.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-execution.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-language-server.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-language-server.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-language-server.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-language-server.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-preparation.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-preparation.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-preparation.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-preparation.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-reports.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-reports.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-reports.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-reports.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-run-options.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-options.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-run-options.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-options.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-run-preparation.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-preparation.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-run-preparation.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-preparation.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-selectors.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-selectors.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-selectors.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-selectors.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider-tests.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider-tests.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider-tests.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider-tests.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-provider.plugin.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-provider.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-run-options.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-run-options.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json diff --git a/shared/contracts/plugins/v1/fixtures/build-run-preparation.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-run-preparation.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-run-preparation.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-run-preparation.json diff --git a/shared/contracts/plugins/v1/fixtures/build-test-discovery.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-test-discovery.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-test-discovery.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-test-discovery.json diff --git a/shared/contracts/plugins/v1/fixtures/build-test-durations.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-test-durations.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-test-durations.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-test-durations.json diff --git a/shared/contracts/plugins/v1/fixtures/build-test-protocol.json b/shared/contracts/plugins/v1/fixtures/build-providers/build-test-protocol.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-test-protocol.json rename to shared/contracts/plugins/v1/fixtures/build-providers/build-test-protocol.json diff --git a/shared/contracts/plugins/v1/fixtures/build-command-output-file.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-command-output-file.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-command-output-file.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-command-output-file.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-command-stdout.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-command-stdout.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-command-stdout.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-command-stdout.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-host-integration.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-host-integration.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-instance-options.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-instance-options.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-instance-options.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-instance-options.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-model-consumer.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-model-consumer.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-model-consumer.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-model-consumer.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-model-producer.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-model-producer.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-model-producer.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-model-producer.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-plans.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-plans.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json diff --git a/shared/contracts/plugins/v1/fixtures/build-static-file.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-static-file.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-static-file.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-static-file.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json b/shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json rename to shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/debug-adapter-language-server.plugin.json b/shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-language-server.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/debug-adapter-language-server.plugin.json rename to shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-language-server.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json b/shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json rename to shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json diff --git a/shared/contracts/plugins/v1/fixtures/debug-adapter-remote-attach.plugin.json b/shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/debug-adapter-remote-attach.plugin.json rename to shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json b/shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json rename to shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/editor-actions.plugin.json b/shared/contracts/plugins/v1/fixtures/editor/editor-actions.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/editor-actions.plugin.json rename to shared/contracts/plugins/v1/fixtures/editor/editor-actions.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json b/shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json rename to shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/command-plans.json b/shared/contracts/plugins/v1/fixtures/languages/command-plans.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/command-plans.json rename to shared/contracts/plugins/v1/fixtures/languages/command-plans.json diff --git a/shared/contracts/plugins/v1/fixtures/grammars/http.monarch.json b/shared/contracts/plugins/v1/fixtures/languages/grammars/http.monarch.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/grammars/http.monarch.json rename to shared/contracts/plugins/v1/fixtures/languages/grammars/http.monarch.json diff --git a/shared/contracts/plugins/v1/fixtures/language-grammar.plugin.json b/shared/contracts/plugins/v1/fixtures/languages/language-grammar.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/language-grammar.plugin.json rename to shared/contracts/plugins/v1/fixtures/languages/language-grammar.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/language-host-integration.plugin.json b/shared/contracts/plugins/v1/fixtures/languages/language-host-integration.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/language-host-integration.plugin.json rename to shared/contracts/plugins/v1/fixtures/languages/language-host-integration.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/language-packaged-server.plugin.json b/shared/contracts/plugins/v1/fixtures/languages/language-packaged-server.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/language-packaged-server.plugin.json rename to shared/contracts/plugins/v1/fixtures/languages/language-packaged-server.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/language-system-command.plugin.json b/shared/contracts/plugins/v1/fixtures/languages/language-system-command.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/language-system-command.plugin.json rename to shared/contracts/plugins/v1/fixtures/languages/language-system-command.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json b/shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json rename to shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/runtime-versions.json b/shared/contracts/plugins/v1/fixtures/languages/runtime-versions.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/runtime-versions.json rename to shared/contracts/plugins/v1/fixtures/languages/runtime-versions.json diff --git a/shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json b/shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json rename to shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/invalid-manifests.json b/shared/contracts/plugins/v1/fixtures/manifest/invalid-manifests.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/invalid-manifests.json rename to shared/contracts/plugins/v1/fixtures/manifest/invalid-manifests.json diff --git a/shared/contracts/plugins/v1/fixtures/publisher-bundled.plugin.json b/shared/contracts/plugins/v1/fixtures/package-trust/publisher-bundled.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/publisher-bundled.plugin.json rename to shared/contracts/plugins/v1/fixtures/package-trust/publisher-bundled.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/signature-vectors.json b/shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json similarity index 89% rename from shared/contracts/plugins/v1/fixtures/signature-vectors.json rename to shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json index 4c47bfd36b..70e0d2ba88 100644 --- a/shared/contracts/plugins/v1/fixtures/signature-vectors.json +++ b/shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "description": "Public cross-platform test vectors for the plugin package signature (macOS PluginPackageSignature and the Windows plugin_host signature module). The Ed25519 key is the RFC 8032 test key; it must never sign real packages. Regenerating requires updating both platform tests in the same change.", + "description": "Public cross-platform test vectors for the plugin package signature. macOS PluginPackageSignature tests consume them; Windows does not verify package signatures yet, and its verifier must consume the same vectors. The Ed25519 key is the RFC 8032 test key; it must never sign real packages. Regenerating requires updating every platform test that consumes them in the same change.", "ed25519": { "seedHex": "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", "publicKeyHex": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a", diff --git a/shared/contracts/plugins/v1/fixtures/project-generator.plugin.json b/shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json similarity index 96% rename from shared/contracts/plugins/v1/fixtures/project-generator.plugin.json rename to shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json index 548eed58c7..2add8763da 100644 --- a/shared/contracts/plugins/v1/fixtures/project-generator.plugin.json +++ b/shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json @@ -27,8 +27,8 @@ {"buildSystemID": "maven", "when": {"field": "buildSystem", "equals": "maven"}} ], "steps": [ - {"kind": "files", "source": "project-generator-templates/app"}, - {"kind": "files", "source": "project-generator-templates/main", + {"kind": "files", "source": "templates/app"}, + {"kind": "files", "source": "templates/main", "target": "src/${field.groupId|package|path}", "when": [{"field": "buildSystem", "equals": "maven"}, {"field": "sample", "equals": true}]} ], diff --git a/shared/contracts/plugins/v1/fixtures/project-plans.json b/shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json similarity index 99% rename from shared/contracts/plugins/v1/fixtures/project-plans.json rename to shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json index b4a16feae7..f35b509279 100644 --- a/shared/contracts/plugins/v1/fixtures/project-plans.json +++ b/shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "description": "Golden answers of the project.* commands for project-generator.plugin.json. generationPlan cases read templates with the fixtures directory as the package path.", + "description": "Golden answers of the project.* commands for project-generator.plugin.json. generationPlan cases read templates with fixtures/project-generators as the package path.", "cases": [ { "name": "form defaults", diff --git a/shared/contracts/plugins/v1/fixtures/project-generator-templates/.gitattributes b/shared/contracts/plugins/v1/fixtures/project-generators/templates/.gitattributes similarity index 100% rename from shared/contracts/plugins/v1/fixtures/project-generator-templates/.gitattributes rename to shared/contracts/plugins/v1/fixtures/project-generators/templates/.gitattributes diff --git a/shared/contracts/plugins/v1/fixtures/project-generator-templates/app/README.md b/shared/contracts/plugins/v1/fixtures/project-generators/templates/app/README.md similarity index 100% rename from shared/contracts/plugins/v1/fixtures/project-generator-templates/app/README.md rename to shared/contracts/plugins/v1/fixtures/project-generators/templates/app/README.md diff --git a/shared/contracts/plugins/v1/fixtures/project-generator-templates/app/dot-gitignore b/shared/contracts/plugins/v1/fixtures/project-generators/templates/app/dot-gitignore similarity index 100% rename from shared/contracts/plugins/v1/fixtures/project-generator-templates/app/dot-gitignore rename to shared/contracts/plugins/v1/fixtures/project-generators/templates/app/dot-gitignore diff --git a/shared/contracts/plugins/v1/fixtures/project-generator-templates/main/Main.java b/shared/contracts/plugins/v1/fixtures/project-generators/templates/main/Main.java similarity index 100% rename from shared/contracts/plugins/v1/fixtures/project-generator-templates/main/Main.java rename to shared/contracts/plugins/v1/fixtures/project-generators/templates/main/Main.java diff --git a/shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json b/shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json rename to shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/java-tool-definition.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/java-tool-definition.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/java-tool-definition.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/java-tool-definition.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/local.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/local.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/local.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/local.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/manifest-rejections.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/manifest-rejections.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/manifest-rejections.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/manifest-rejections.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/mise-provider.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/mise-provider.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/mise-provider.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/mise-provider.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/query-cases.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/query-cases.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/query-cases.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/query-cases.json diff --git a/shared/contracts/plugins/v1/proposals/toolchains/fixtures/resolution-cases.json b/shared/contracts/plugins/v1/fixtures/toolchains/proposal/resolution-cases.json similarity index 100% rename from shared/contracts/plugins/v1/proposals/toolchains/fixtures/resolution-cases.json rename to shared/contracts/plugins/v1/fixtures/toolchains/proposal/resolution-cases.json diff --git a/shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json b/shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/tool-definition.plugin.json rename to shared/contracts/plugins/v1/fixtures/toolchains/tool-definition.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json b/shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/toolchain-provider.plugin.json rename to shared/contracts/plugins/v1/fixtures/toolchains/toolchain-provider.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/native-controls.plugin.json b/shared/contracts/plugins/v1/fixtures/ui/native-controls.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/native-controls.plugin.json rename to shared/contracts/plugins/v1/fixtures/ui/native-controls.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/native-form.plugin.json b/shared/contracts/plugins/v1/fixtures/ui/native-form.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/native-form.plugin.json rename to shared/contracts/plugins/v1/fixtures/ui/native-form.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/native-panel.plugin.json b/shared/contracts/plugins/v1/fixtures/ui/native-panel.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/native-panel.plugin.json rename to shared/contracts/plugins/v1/fixtures/ui/native-panel.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/web-panel.plugin.json b/shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/web-panel.plugin.json rename to shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json diff --git a/shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json b/shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json similarity index 100% rename from shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json rename to shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json diff --git a/shared/contracts/plugins/v1/plugin-manifest.schema.json b/shared/contracts/plugins/v1/plugin-manifest.schema.json index 55c66948ee..a418847ddc 100644 --- a/shared/contracts/plugins/v1/plugin-manifest.schema.json +++ b/shared/contracts/plugins/v1/plugin-manifest.schema.json @@ -39,10 +39,10 @@ "backend": { "description": "Required exactly when backend is present: the plugin's own process. Version 1 serves only its web pages. Version 2 may also start on onWorkspaceOpen or a plugin command, receives workspace contexts through plugin-function protocol 3, and may be granted workspace.metadata.", "enum": [1, 2] }, "buildModelInputs": {"description": "Optional public model sharing between already enabled workspace plugins; no installation, private function, or process authority. Required exactly when modelSharing or modelInputs is used. Consumers require buildProviders 6. Version 1 producers cannot also consume inputs.", "enum": [1]}, "buildProviders": { "description": "Required exactly when any buildSystems[].provider is present, including own-process and shared language-server providers. Declares host support for Provider orchestration, independent of declarative buildSystems and serverProcess launch support; version 2 adds task execution, version 3 test execution/discovery, version 4 application run preparation, and version 5 native debug preparation; version 6 optional read-only model inputs; version 7 non-sensitive native configuration sources; version 8 inline provider test reports; version 9 opaque semantic test selectors; version 10 typed run options and service/task preparation; version 11 registry-selected adapter and host-owned connection target for service debugging.", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, - "buildSystems": { "description": "Declarative build detection, models, and command plans; v3 adds instance-scoped options; does not imply buildProviders support.", "enum": [1, 2, 3] }, + "buildSystems": { "description": "Declarative build detection, models, and command plans; v2 adds the executable setting adapter, v3 instance-scoped options, v4 declarative preparation roles; does not imply buildProviders support.", "enum": [1, 2, 3, 4] }, "debugAdapters": { "description": "Required exactly when debugAdapters is non-empty. Version 2 adds bounded target argument and environment bindings. The DAP session itself is negotiated by the adapter in initialize.", "enum": [1, 2] }, "executableResolution": { "enum": [1, 2], "description": "Shared executable candidate ordering and strict selection." }, - "executionProviders": { "enum": [1] }, + "executionProviders": { "enum": [1] }, "languageServers": { "description": "Required exactly when languageServers is non-empty. Version 2 adds languageServers[].workspaceConfiguration.", "enum": [1, 2] }, "languages": { "description": "Version 2 adds languages[].grammar and languages[].configuration and is required exactly when one of them is used.", "enum": [1, 2] }, "packageTrust": { "description": "Required exactly when vendor.bundledSignatureRequirement is present.", "enum": [1] }, diff --git a/shared/contracts/plugins/v1/toolchains.md b/shared/contracts/plugins/v1/toolchains/README.md similarity index 95% rename from shared/contracts/plugins/v1/toolchains.md rename to shared/contracts/plugins/v1/toolchains/README.md index 732b43fe69..23b03ef66d 100644 --- a/shared/contracts/plugins/v1/toolchains.md +++ b/shared/contracts/plugins/v1/toolchains/README.md @@ -11,16 +11,14 @@ runs the definition's version probe on executables Core returns from whole snapshot. Nothing is saved by these pages. The pinned Stage D integration adds a separate fresh-resolution adapter for macOS Build and Provider Run; settings detections are never used as launch permits. Existing Java and -language-server consumers still use their previous adapters. Windows now has -native Build plumbing for directory pins, declared scans, shell candidates and -operation-owned provider queries through Core's LSP transport. A window-bound -cancellation owner covers preparation and backend cleanup; this does not provide -a general background services host. Publisher signatures provide independent -origin evidence when present; legacy unsigned records never do. Windows product -capability admission remains closed. -The [broader proposal](proposals/toolchains/README.md) still describes unsupported +language-server consumers still use their previous adapters. Windows has no +toolchain adapter and does not advertise `toolDefinitions` or +`toolchainProviders`, so Core refuses packages that require them there. +Publisher signatures provide independent origin evidence when present; legacy +unsigned records never do. +The [broader proposal](proposal/README.md) still describes unsupported consumer migration, native lifecycle, persistence and manager-plugin work. -The active shape is [plugin-manifest.schema.json](plugin-manifest.schema.json), +The active shape is [plugin-manifest.schema.json](../plugin-manifest.schema.json), not the proposal envelopes. ## Manifest admission and registry @@ -167,7 +165,7 @@ remote authority, unsafe paths and malformed error mappings reject it. The snapshot contains `{installations,statements,watch,diagnostics}`; normalized entries carry qualified `:` provenance and project source directory. JSON-RPC errors are checked against the distinct semantic/numeric map -in the [protocol proposal](proposals/toolchains/protocol.md#stable-failure-mapping). +in the [protocol proposal](proposal/protocol.md#stable-failure-mapping). Cancellation, deadlines, cache invalidation and whole-generation requery remain native-client implementation work, not behavior performed by this decoder. @@ -295,8 +293,8 @@ workspace root are refused before any probe, so a project program is never run to read its version. The macOS host bounds probes by count, concurrency and total time, and reports skipped work as diagnostics rather than a missing tool. -Production-shape examples are [tool-definition.plugin.json](fixtures/tool-definition.plugin.json) -and [toolchain-provider.plugin.json](fixtures/toolchain-provider.plugin.json). +Production-shape examples are [tool-definition.plugin.json](../fixtures/toolchains/tool-definition.plugin.json) +and [toolchain-provider.plugin.json](../fixtures/toolchains/toolchain-provider.plugin.json). Core acceptance vectors are in [toolchain_definitions.rs](https://github.com/1lck/Lithe-IDEA/blob/preview/rust/lithe-core/src/tests/toolchain_definitions.rs), with sibling pins/query/resolution suites. Passing them is not native product diff --git a/shared/contracts/plugins/v1/proposals/toolchains/README.md b/shared/contracts/plugins/v1/toolchains/proposal/README.md similarity index 98% rename from shared/contracts/plugins/v1/proposals/toolchains/README.md rename to shared/contracts/plugins/v1/toolchains/proposal/README.md index 73b601954d..e250eed01f 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/README.md +++ b/shared/contracts/plugins/v1/toolchains/proposal/README.md @@ -1,7 +1,7 @@ # Plugin-injected toolchains (draft) > **Status: broader proposal; a Core-only foundation is now implemented.** -> The implemented subset is specified in [the active contract](../../toolchains.md). +> The implemented subset is specified in [the active contract](../README.md). > This directory remains a review artifact for > [PR #1581's replacement plan](https://github.com/1lck/Lithe-IDEA/pull/1581#issuecomment-6541366112). > It is not an extension of the currently accepted `plugin.json` format. @@ -46,7 +46,7 @@ not authorize replacing unrelated host commands. | [query.schema.json](query.schema.json) | Query request/reply shapes | | [resolution.schema.json](resolution.schema.json) | Resolver outcomes and structured reasons | | [local.schema.json](local.schema.json) | Proposed extension of the machine-local document with directory pins | -| `fixtures/` | Illustrative contributions, queries, resolution outcomes, pins, and rejections | +| `fixtures/toolchains/proposal/` | Illustrative contributions, queries, resolution outcomes, pins, and rejections | Schemas describe JSON shape. Signature verification, duplicate-definition registration, enabled-plugin ownership, path containment, executable evidence, diff --git a/shared/contracts/plugins/v1/proposals/toolchains/local.schema.json b/shared/contracts/plugins/v1/toolchains/proposal/local.schema.json similarity index 97% rename from shared/contracts/plugins/v1/proposals/toolchains/local.schema.json rename to shared/contracts/plugins/v1/toolchains/proposal/local.schema.json index 0727b88cee..481d584736 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/local.schema.json +++ b/shared/contracts/plugins/v1/toolchains/proposal/local.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/proposals/toolchains/local.schema.json", + "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/toolchains/proposal/local.schema.json", "title": "Proposed local toolchain pins extension (not implemented)", "description": "Review-only complete document shape for .lithe/toolchains/local.json. The active toolchain-local-v1.schema.json remains unchanged and does not accept pins.", "type": "object", diff --git a/shared/contracts/plugins/v1/proposals/toolchains/manifest-contributions.schema.json b/shared/contracts/plugins/v1/toolchains/proposal/manifest-contributions.schema.json similarity index 99% rename from shared/contracts/plugins/v1/proposals/toolchains/manifest-contributions.schema.json rename to shared/contracts/plugins/v1/toolchains/proposal/manifest-contributions.schema.json index 20c890679d..a86dde1299 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/manifest-contributions.schema.json +++ b/shared/contracts/plugins/v1/toolchains/proposal/manifest-contributions.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/proposals/toolchains/manifest-contributions.schema.json", + "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/toolchains/proposal/manifest-contributions.schema.json", "title": "PROPOSAL: toolchain contribution projections, not a plugin manifest", "description": "A standalone review envelope for proposed manifest fields. Passing this schema does not make a plugin installable and does not prove signature, registry, filesystem or executable safety. See manifest.md.", "type": "object", diff --git a/shared/contracts/plugins/v1/proposals/toolchains/manifest.md b/shared/contracts/plugins/v1/toolchains/proposal/manifest.md similarity index 98% rename from shared/contracts/plugins/v1/proposals/toolchains/manifest.md rename to shared/contracts/plugins/v1/toolchains/proposal/manifest.md index fae3ab1a2f..2f45a1c476 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/manifest.md +++ b/shared/contracts/plugins/v1/toolchains/proposal/manifest.md @@ -1,7 +1,7 @@ # Toolchain manifest contributions (proposal) **Status: full proposal, not a claim of native host support.** The implemented -Core subset is specified by [the active contract](../../toolchains.md). This +Core subset is specified by [the active contract](../README.md). This document follows the [final scope of PR #1581](https://github.com/1lck/Lithe-IDEA/pull/1581#issuecomment-6541366112). It is a host contract draft, not a plugin author tutorial. The current manifest @@ -63,7 +63,7 @@ pretend that an unimplemented launch adapter supports the draft. ## Tool definitions -The [Java-support-style projection](fixtures/java-tool-definition.json) supplies +The [Java-support-style projection](../../fixtures/toolchains/proposal/java-tool-definition.json) supplies the tool name and every executable policy. Its short ID is valid only in an independently official installation context; the fixture itself is not signed. @@ -144,7 +144,7 @@ rejected candidate never leak into the next candidate's environment. ## One candidate resolver, four product layers The draft extends the -[existing candidate model](../../README.md#shared-executable-candidates-executableresolution-1) +[existing candidate model](../../README.md#shared-executable-candidates-executableresolution-12) rather than building a second runtime resolver: - `setting` gains mandatory `layer: "project" | "global"` in this projection. @@ -194,7 +194,7 @@ query results and reason shapes; no current `skip` consumer changes in this stag ## Providers, file watching, and bootstrap -The [mise projection](fixtures/mise-provider.json) declares `id`, `displayName`, +The [mise projection](../../fixtures/toolchains/proposal/mise-provider.json) declares `id`, `displayName`, `tools`, and `watchFiles`. `watchFiles` is optional: without it a provider reports installations only and any returned statement is rejected. That shape lets the plugin defining a tool answer for its own installations when declarative @@ -301,7 +301,7 @@ usage. The native host separately proves verified signature provenance, package containment, canonical paths, executable status, workspace exclusion, cancellation and limits. None of those checks can be replaced by JSON Schema. -[`manifest-rejections.json`](fixtures/manifest-rejections.json) separates these +[`manifest-rejections.json`](../../fixtures/toolchains/proposal/manifest-rejections.json) separates these phases. Each case applies RFC 6902 `patch` to its `base`; `context` is **host test input**, never a plugin field. `phase: "schema"` must fail schema validation; `registry` and `hostTrust` cases intentionally remain valid JSON shape and describe diff --git a/shared/contracts/plugins/v1/proposals/toolchains/protocol.md b/shared/contracts/plugins/v1/toolchains/proposal/protocol.md similarity index 99% rename from shared/contracts/plugins/v1/proposals/toolchains/protocol.md rename to shared/contracts/plugins/v1/toolchains/proposal/protocol.md index dd806536d5..532cc4464f 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/protocol.md +++ b/shared/contracts/plugins/v1/toolchains/proposal/protocol.md @@ -2,7 +2,7 @@ **Status: broader proposal; the macOS settings pages query providers read-only, and SDK support is not implemented.** The Core-only validation/resolution subset is specified by -[the active contract](../../toolchains.md). These files remain review vectors, +[the active contract](../README.md). These files remain review vectors, not an advertised native capability or an SDK guide. The existing local-toolchain writer/schema is unchanged. The design follows the [latest #1581 review](https://github.com/1lck/Lithe-IDEA/pull/1581#issuecomment-6541366112). diff --git a/shared/contracts/plugins/v1/proposals/toolchains/query.schema.json b/shared/contracts/plugins/v1/toolchains/proposal/query.schema.json similarity index 99% rename from shared/contracts/plugins/v1/proposals/toolchains/query.schema.json rename to shared/contracts/plugins/v1/toolchains/proposal/query.schema.json index b541ecc12b..a2c7f60893 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/query.schema.json +++ b/shared/contracts/plugins/v1/toolchains/proposal/query.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/proposals/toolchains/query.schema.json", + "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/toolchains/proposal/query.schema.json", "title": "Proposed toolchain query protocol v1 (not implemented)", "description": "Review-only JSON-RPC request, successful response or error response. Semantic validation and authority checks are specified in protocol.md.", "oneOf": [ diff --git a/shared/contracts/plugins/v1/proposals/toolchains/resolution.schema.json b/shared/contracts/plugins/v1/toolchains/proposal/resolution.schema.json similarity index 99% rename from shared/contracts/plugins/v1/proposals/toolchains/resolution.schema.json rename to shared/contracts/plugins/v1/toolchains/proposal/resolution.schema.json index 623c67c623..2a101c2000 100644 --- a/shared/contracts/plugins/v1/proposals/toolchains/resolution.schema.json +++ b/shared/contracts/plugins/v1/toolchains/proposal/resolution.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/proposals/toolchains/resolution.schema.json", + "$id": "https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/toolchains/proposal/resolution.schema.json", "title": "Proposed shared toolchain resolution result v1 (not implemented)", "description": "Review-only normalized resolver output. Host-owned snapshots and native filesystem evidence are inputs; providers never produce this object directly.", "type": "object", diff --git a/shared/contracts/rust-core-api.md b/shared/contracts/rust-core-api.md index 5168626987..a4e023a69a 100644 --- a/shared/contracts/rust-core-api.md +++ b/shared/contracts/rust-core-api.md @@ -5000,7 +5000,7 @@ file refuses a plan without it. Unlike the `plugins.declarative.*` commands, `build.detect`, `build.decodeModel`, `build.decodeTestResults`, `build.decodeDependencies`, and `build.syncFingerprint` read bounded files inside `workspaceRoot` (and the given `outputFile`); none of the commands -writes anything or starts a process. `shared/contracts/plugins/v1/fixtures/build-plans.json` +writes anything or starts a process. `shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json` holds the golden plans and decoded outputs. ### VCS providers @@ -5027,7 +5027,7 @@ detection cases, decoded snapshots, and reply validation cases. The `project.*` commands back the New Project window. Payloads, results, and problem codes are specified in the plugin contract's [Project generators](plugins/v1/README.md#project-generators) section, and -`shared/contracts/plugins/v1/fixtures/project-plans.json` holds the golden +`shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json` holds the golden answers. Results use the `plugins.declarative.*` envelope: `catalog`, `form`, `plan`, `name`, and `extracted`. Commands that take a manifest revalidate it and answer `plugin.project.unavailable` for an undeclared generator. @@ -6153,7 +6153,7 @@ legacy runtime detail. The four facts map to catalog INFO/ERROR/WARN/WARN, and a live wire request ID resolves to its original host `op`; no user content or backend-selected channel/level/message is accepted. See the [plugin logging contract](plugins/v1/README.md#structured-plugin-diagnostics-logging-protocol-1) -and `plugins/v1/fixtures/plugin-logging.json`. Explicit upstream LSP message +and `plugins/v1/fixtures/backend/plugin-logging.json`. Explicit upstream LSP message types retain their severity through separate catalog events; unclassified stderr is DEBUG and actual lifecycle failure is ERROR. diff --git a/shared/contracts/vcs-provider-v1.md b/shared/contracts/vcs-provider-v1.md index 64b06224bc..29fbca2fb6 100644 --- a/shared/contracts/vcs-provider-v1.md +++ b/shared/contracts/vcs-provider-v1.md @@ -1,12 +1,13 @@ # VCS provider contract v1 -> **Status: Core implemented (P1); no host uses it yet.** Core accepts the -> `vcsProviders` manifest capability and the commands below. The macOS and -> Windows hosts do not start providers yet, so no build shows a plugin VCS. +> **Status: Core implemented; macOS hosts providers.** Core accepts the +> `vcsProviders` manifest capability and the commands below. macOS advertises +> `vcsProviders` 1 and starts providers for the roots it detects. Windows does +> not advertise the capability. > The decision record is > [Unified VCS model and providers](../../.agents/notes/proposed/architecture/2026-10-22-unified-vcs-provider-model.md); > example data is in [`shared/fixtures/vcs/model-v1.json`](../fixtures/vcs/model-v1.json) -> and [`plugins/v1/fixtures/vcs-provider.plugin.json`](plugins/v1/fixtures/vcs-provider.plugin.json). +> and [`plugins/v1/fixtures/vcs/vcs-provider.plugin.json`](plugins/v1/fixtures/vcs/vcs-provider.plugin.json). This contract defines one VCS-neutral model for the features every version control system has: roots, file status, base content, history, annotation, diff --git a/shared/platform-feature-matrix/features/build-native-configuration.json b/shared/platform-feature-matrix/features/build-native-configuration.json index fb231c3e1f..f7a8be69d9 100644 --- a/shared/platform-feature-matrix/features/build-native-configuration.json +++ b/shared/platform-feature-matrix/features/build-native-configuration.json @@ -8,7 +8,7 @@ "verificationStatus": "pending", "evidence": [ "rust/lithe-core/src/build/configuration.rs", - "shared/contracts/plugins/v1/fixtures/build-configuration.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-configuration.json", "macos/Sources/LitheExecutionModule/Services/BuildNativeConfigurationCoordinator.swift", "macos/Sources/Lithe/Platform/MacOS/Build/MacBuildNativeConfigurationStore.swift", "macos/Sources/Lithe/Views/App/ContributedBuildConfigurationSection.swift", diff --git a/shared/platform-feature-matrix/features/build-provider-jvm-debug.json b/shared/platform-feature-matrix/features/build-provider-jvm-debug.json index 7c0007af46..51c5ce5675 100644 --- a/shared/platform-feature-matrix/features/build-provider-jvm-debug.json +++ b/shared/platform-feature-matrix/features/build-provider-jvm-debug.json @@ -10,7 +10,7 @@ "macos/Sources/LitheExecutionModule/Services/RunService.swift", "macos/Sources/Lithe/Platform/MacOS/Debug/MacDebugPortAvailabilityChecker.swift", "macos/Tests/LitheExecutionModuleTests/ExecutionModuleTests.swift", - "shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json", "rust/lithe-core/src/tests/build_systems.rs", "macos/Tests/LitheDebugModuleTests/DebugModuleTests.swift", "macos/Sources/LitheExecutionModule/Services/BuildSystemService.swift", @@ -25,7 +25,7 @@ }, "windows": { "evidence": [ - "shared/contracts/plugins/v1/fixtures/build-connection-debug-options.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-connection-debug-options.json", "rust/lithe-core/src/tests/build_systems.rs" ], "implementationStatus": "missing", diff --git a/shared/platform-feature-matrix/features/build-provider-readonly-model-inputs.json b/shared/platform-feature-matrix/features/build-provider-readonly-model-inputs.json index c2c3ff560e..3399d6513e 100644 --- a/shared/platform-feature-matrix/features/build-provider-readonly-model-inputs.json +++ b/shared/platform-feature-matrix/features/build-provider-readonly-model-inputs.json @@ -7,8 +7,8 @@ "evidence": [ "rust/lithe-core/src/build/model_inputs.rs", "rust/lithe-core/src/tests/build_systems.rs", - "shared/contracts/plugins/v1/fixtures/build-model-producer.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-model-consumer.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-model-producer.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-model-consumer.plugin.json", "macos/Sources/LitheExecutionModule/Services/BuildSystemService.swift", "macos/Sources/Lithe/Core/Rust/RustBuildSystemOperations.swift", "macos/Tests/LitheExecutionModuleTests/BuildSystemServiceTests.swift", diff --git a/shared/platform-feature-matrix/features/build-provider-refresh-and-tool.json b/shared/platform-feature-matrix/features/build-provider-refresh-and-tool.json index 9febfdb519..4461c7de7d 100644 --- a/shared/platform-feature-matrix/features/build-provider-refresh-and-tool.json +++ b/shared/platform-feature-matrix/features/build-provider-refresh-and-tool.json @@ -6,7 +6,7 @@ "macos": { "evidence": [ "rust/lithe-core/src/build/plans.rs", - "shared/contracts/plugins/v1/fixtures/build-plans.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json", "shared/contracts/plugins/v1/README.md", "macos/Sources/Lithe/Core/Rust/RustBuildSystemOperations.swift", "macos/Sources/LitheCoreContracts/Execution/BuildSystemContracts.swift", @@ -23,7 +23,7 @@ "windows": { "evidence": [ "rust/lithe-core/src/build/plans.rs", - "shared/contracts/plugins/v1/fixtures/build-plans.json" + "shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json" ], "implementationStatus": "missing", "verificationStatus": "not-applicable" diff --git a/shared/platform-feature-matrix/features/build-system-plugins.json b/shared/platform-feature-matrix/features/build-system-plugins.json index 8f873d349c..60da69298d 100644 --- a/shared/platform-feature-matrix/features/build-system-plugins.json +++ b/shared/platform-feature-matrix/features/build-system-plugins.json @@ -6,7 +6,7 @@ "macos": { "evidence": [ "rust/lithe-core/src/build", - "shared/contracts/plugins/v1/fixtures/build-plans.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json", "macos/Sources/Lithe/Core/Rust/RustBuildSystemOperations.swift", "macos/Sources/Lithe/Platform/MacOS/Build", "macos/Sources/LitheExecutionModule/Services/BuildSystemService.swift", @@ -24,22 +24,22 @@ "macos/Sources/Lithe/Platform/MacOS/Build/MacBuildProviderSessions.swift", "macos/Sources/Lithe/Platform/MacOS/Plugins/MacPluginLanguageServerLaunchResolver.swift", "macos/Tests/LitheTests/PluginMarketplaceServiceTests.swift", - "shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json", "rust/lithe-core/src/plugins/executables.rs", "macos/Sources/LitheCoreContracts/Execution/ExecutableResolution.swift", "macos/Tests/LitheTests/BuildToolProviderResolutionTests.swift", "macos/Tests/LitheTests/MacBuildToolResolverTests.swift", - "shared/contracts/plugins/v1/fixtures/build-provider-execution.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-execution-protocol.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-execution.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-execution-protocol.json", "macos/Tests/LitheTests/MacBuildProviderSessionsTests.swift", ".agents/notes/implemented/architecture/2026-10-26-build-provider-task-execution.md", - "shared/contracts/plugins/v1/fixtures/build-provider-tests.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-test-protocol.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-tests.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-test-protocol.json", "rust/lithe-core/src/build/test_discovery.rs", - "shared/contracts/plugins/v1/fixtures/build-test-discovery.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-test-discovery.json", "rust/lithe-core/src/build/run_preparation.rs", - "shared/contracts/plugins/v1/fixtures/build-provider-run-preparation.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-run-preparation.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-preparation.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-run-preparation.json", "macos/Sources/LitheExecutionModule/Services/RunService.swift", "macos/Tests/LitheExecutionModuleTests/ExecutionModuleTests.swift", "shared/fixtures/run-configuration/build-provider.json", @@ -48,7 +48,7 @@ "macos/Tests/LitheTests/RunConfigurationIntegrationTests.swift", "macos/Tests/LitheTests/IdeCapabilitiesTests.swift", "rust/lithe-core/src/build/debug_preparation.rs", - "shared/contracts/plugins/v1/fixtures/build-provider-debug-preparation.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-debug-preparation.plugin.json", "macos/Sources/Lithe/Platform/MacOS/Debug/MacBuildDebugLaunchResolver.swift", "macos/Sources/Lithe/Models/AppModel/AppModel+Debugging.swift", "macos/Tests/LitheTests/MacNativeBuildProviderIntegrationTests.swift", @@ -57,18 +57,18 @@ "docs/assets/provider-workflow-review/README.md", "macos/Sources/Lithe/Views/App/ContributedBuildConfigurationSection.swift", "rust/lithe-core/src/build/configuration.rs", - "shared/contracts/plugins/v1/fixtures/build-instance-options.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-toolchains.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-instance-options.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-toolchains.plugin.json", "macos/Sources/Lithe/Core/Ports/RunToolchainProviders.swift", "shared/contracts/build-project-options-v1.schema.json", "macos/Sources/Lithe/Platform/MacOS/Build/MacBuildOptionsStore.swift", - "shared/contracts/plugins/v1/fixtures/build-provider-reports.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-reports.plugin.json", "rust/lithe-core/src/build/outputs.rs", - "shared/contracts/plugins/v1/fixtures/build-provider-selectors.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-test-durations.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-selectors.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-test-durations.json", "macos/Sources/LitheExecutionModule/Services/BuildLanguageTests.swift", - "shared/contracts/plugins/v1/fixtures/build-provider-run-options.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-run-options.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-run-options.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-run-options.json", "rust/lithe-core/src/build/project_options.rs", "shared/fixtures/build-project-options/validation.json", "macos/Sources/LitheCoreContracts/Execution/RunConfigurationContracts.swift", @@ -80,8 +80,8 @@ "windows": { "evidence": [ "rust/lithe-core/src/build", - "shared/contracts/plugins/v1/fixtures/build-plans.json", - "shared/contracts/plugins/v1/fixtures/build-provider.plugin.json" + "shared/contracts/plugins/v1/fixtures/build-systems/build-plans.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider.plugin.json" ], "implementationStatus": "missing", "verificationStatus": "not-applicable" diff --git a/shared/platform-feature-matrix/features/cargo-build-plugin.json b/shared/platform-feature-matrix/features/cargo-build-plugin.json index 940b4930de..e9e8d20ec1 100644 --- a/shared/platform-feature-matrix/features/cargo-build-plugin.json +++ b/shared/platform-feature-matrix/features/cargo-build-plugin.json @@ -10,7 +10,7 @@ "Plugins/mac/README.md", "docs/ci-builds.md", ".agents/notes/implemented/feature/2026-10-22-cargo-build-plugin.md", - "shared/contracts/plugins/v1/fixtures/build-tool-path.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-systems/build-tool-path.plugin.json", "rust/lithe-core/src/plugins/executables.rs", "macos/Sources/LitheCoreContracts/Execution/ExecutableResolution.swift" ] diff --git a/shared/platform-feature-matrix/features/declarative-native-plugin-ui.json b/shared/platform-feature-matrix/features/declarative-native-plugin-ui.json index 04288e54f5..977b9f4538 100644 --- a/shared/platform-feature-matrix/features/declarative-native-plugin-ui.json +++ b/shared/platform-feature-matrix/features/declarative-native-plugin-ui.json @@ -10,21 +10,21 @@ "macos/Sources/Lithe/Views/Workbench/PluginNativeToolWindowView.swift", "macos/Sources/Lithe/Application/Features/PluginNativeUIFeature.swift", "macos/Tests/LitheTests/PluginNativeUITests.swift", - "shared/contracts/plugins/v1/fixtures/native-panel.plugin.json", + "shared/contracts/plugins/v1/fixtures/ui/native-panel.plugin.json", "macos/Sources/Lithe/Views/Components/LitheTreeList.swift", "macos/Tests/Fixtures/native-ui-lab/plugin.json", "macos/Tests/Fixtures/native-ui-lab/README.md", "macos/Tests/Fixtures/native-ui-lab/native-ui-lab.test.mjs", "macos/Sources/Lithe/Views/Components/LitheToolWindowHeader.swift", "macos/Sources/Lithe/Views/Components/LitheToolWindowTabStyle.swift", - "shared/contracts/plugins/v1/fixtures/native-form.plugin.json", + "shared/contracts/plugins/v1/fixtures/ui/native-form.plugin.json", "macos/Sources/Lithe/Views/Components/LitheSettingsControls.swift", "macos/Sources/Lithe/Views/Components/LitheFormGrid.swift", "macos/Tests/LitheTests/LitheFormGridTests.swift", "macos/Sources/Lithe/Views/Components/LitheInfoTip.swift", "macos/Sources/Lithe/Views/Components/LitheSearchField.swift", "macos/Sources/Lithe/Views/Components/LitheActionButtonStyle.swift", - "shared/contracts/plugins/v1/fixtures/native-controls.plugin.json", + "shared/contracts/plugins/v1/fixtures/ui/native-controls.plugin.json", "macos/Sources/Lithe/Views/Components/LitheTextInput.swift", "macos/Tests/LitheTests/LitheTextInputTests.swift" ] diff --git a/shared/platform-feature-matrix/features/declarative-plugin-contract.json b/shared/platform-feature-matrix/features/declarative-plugin-contract.json index 402fba75d2..f63074870b 100644 --- a/shared/platform-feature-matrix/features/declarative-plugin-contract.json +++ b/shared/platform-feature-matrix/features/declarative-plugin-contract.json @@ -23,7 +23,7 @@ "macos/Sources/Lithe/Views/Workbench/WorkbenchContributionIcon.swift", "macos/Tests/LitheTests/PluginUIIconTests.swift", "macos/Sources/LitheApplicationKernel/Lifecycle/ModuleRuntime.swift", - "shared/contracts/plugins/v1/fixtures/signature-vectors.json", + "shared/contracts/plugins/v1/fixtures/package-trust/signature-vectors.json", "macos/Tests/LitheTests/PluginSignatureVectorTests.swift" ], "implementationStatus": "implemented", @@ -44,7 +44,7 @@ "windows/tauri/src/features/plugins/declarative-plugins-section.tsx", "windows/tauri/src/features/plugins/declarative-plugin-launch.ts", "windows/tauri/src/features/editor/lsp/resolve-editor-lsp-launch.ts", - "shared/contracts/plugins/v1/fixtures/invalid-manifests.json", + "shared/contracts/plugins/v1/fixtures/manifest/invalid-manifests.json", "shared/i18n/messages.json", "windows/tauri/src/i18n/shared-i18n.test.ts", "windows/tauri/src-tauri/src/plugin_host/lifecycle.rs", @@ -56,6 +56,6 @@ "verificationStatus": "pending" }, "owner": "Extensions", - "notes": "Windows 宿主 v0 已接入契约 v1 的语言与语言服务器链路:plugin_host 模块负责包存储(app_local_data_dir 下的 plugins 与 plugin-state,bundled 从资源目录只读加载)、启动扫描(经 plugins.declarative.validate 携带 hostCapabilities {languages:1, languageServers:[1,2], serverProcess:1, settings:[1,2], ui:[1,2]},拒绝的包隔离并展示原因)、启动计划解析(packaged 入口固定在包内且拒绝 reparse point 与路径逃逸,runtime/systemCommand 走 PATH 与 LITHE__PATH 约定),语言服务器会话仍由共享 Core 的 lsp.startServer 拉起;shared fixtures 的 invalid-manifests.json 全部 154 个用例在 Windows 二进制内断言同一稳定错误码。M2 已补磁盘安装链(快照、installReview 审批、staging、回滚)与最小管理界面;M3 已补声明式设置(settings/languageServers 2 能力声明,全局+项目级存储,immediate 效果经 workspaceConfiguration 下推)、运行/测试计划命令与契约版 PHP bundled 包(随安装器分发,validate/launch/runPlan 端到端测试覆盖)。M4 已补 Web 工具窗口(ui 能力声明提升为 [1,2]):lithe-plugin:// scheme 只服务启用包内普通文件(拒 reparse point、路径逃逸、超 16MiB),响应带 CSP(default-src none、拒 eval/联网/frame)与 nosniff/no-store;window.lithe 桥 v0 提供 context、ui.getState/setState(宿主持有,64KiB 上限)、workspace.openFile 与主题事件,build.*/functions.* 在 Windows 构建系统能力接入前返回 plugin.web.unknownMethod。尚未实现:Worker 扩展清单向契约迁移(Worker 版 PHP 提供 composer scripts 动态运行动作,契约无等价能力,完整迁移推迟;见 Note)、构建系统插件能力与多仓库源市场。决策与切分见 .agents/notes/implemented/architecture/2026-10-22-windows-declarative-plugin-host.md。 后续安全修复已补插件身份传递、运行中和待启动会话排空、跨窗口包变更确认、完整启动前检查及 ui 1 文本/命令入口;目前 WebView 仍为独立窗口,停靠位置、图标、动作状态及布局持久化未完成。 #1478 拆分:新增 fixtures/signature-vectors.json(RFC 8032 测试密钥、含非 ASCII 文件名的固定包、规范载荷、签名与内容摘要),macOS PluginSignatureVectorTests 用同一组向量验证。CryptoKit 的 Ed25519 签名带随机数,macOS 以验签证明规范载荷和摘要一致,不比较签名字节。", - "verification": "API 3 共享契约:cargo test -p lithe-core --lib community_build_plugins、cargo test -p lithe-core --lib build_systems、cargo test -p lithe-core --lib declarative_plugins 及 scripts/architecture/verify-shared-contracts.sh,覆盖真实 Maven/Gradle 输出、构建 icon/presentation/category、build.languageImport 的插件选项映射和 ui 2 包内网页清单。Core 校验通过不代表平台宿主已实现;macOS 原生窗口/JDT 接线与可选 WKWebView 分别验收后才由宿主声明对应能力,Windows 仍待接入。macOS:安装 shared/contracts/plugins/v1/fixtures/invalid-manifests.json 中每类错误的包,确认插件管理显示对应错误且不注册模块;合法包启用、禁用无需重启;包内声明的语言服务器可执行文件缺失或为符号链接时拒绝安装;启动后 app bundle 文件清单不变(scripts/macos/verify/verify-runtime-bundle-immutability.sh)。API 2:安装 fixtures 中 node-runtime 形态的包,确认宿主发现满足最低版本的 node 并用它启动入口文件,版本过低的候选不被使用;语言服务器的状态写在 /Lithe/PluginState 下而不是插件包内,卸载后该目录被删除。宿主能力:声明语言但未在 hostIntegration.capabilities 中列出运行、测试或调试、也未提供执行提供方的包,对应入口不可用且宿主不运行内置工具;列出后对应入口恢复。Windows:宿主 v0 已读取该契约(语言与语言服务器范围,按 hostCapabilities 门控),接入验收必须通过同一组共享 fixture,Windows 宿主测试已对 invalid-manifests.json 全量断言;Worker 扩展清单的迁移未完成,宿主 UI 仅完成文本和命令入口,不能用共享校验通过代替界面验收。 macOS API level 2:安装 Hello Lithe 数据包,确认工具窗口、命令面板、工具栏和菜单通过相同注册表显示;移动数据库与插件窗口、隐藏入口及重排后重启恢复;禁用插件后窗口和命令消失,重新启用保留位置与排序;无第三方原生代码载入。Windows UI adapter 仍缺停靠、图标和动作状态等对齐,不能用共享校验通过代替界面验收。 回归:声明与内置/应用动作冲突的合法包在启动时隔离并显示错误;正常退出保留已保存的窗口展开状态,用户主动隐藏才更新该状态;Agent 未启用时可移至底部并恢复入口;首次通过菜单打开 Services 会按需激活数据库。 macOS 图标:宿主语义 ID 与包内 SVG/PNG 在窗口入口、标题栏、工具栏、菜单和命令面板显示;模板着色与品牌原色、亮暗变体、选中/悬停/禁用沿用宿主规范;拒绝未知图标 ID、样式覆盖、包外路径、符号链接、脚本和外部引用;验证资源字节与 bundle 文件清单不变。 原生回归覆盖真实注册窗口标题栏、主工具栏活动/禁用状态、命令面板键盘选择及同一窗口亮→暗→亮切换;品牌图标不随选中着色,模板图标使用宿主选中文字颜色。 macOS 动作状态:确认窗口入口、工具栏、菜单与命令面板共用可用和勾选状态,激活中命令禁用且 Enter/鼠标均不能触发,窗口入口允许取消;同时打开同一插件的两个窗口只构造一次模块,取消其中一个不影响另一个;激活中禁用再启用,确认无资源残留或晚到贡献,旧动作引用不绕过状态校验。 API level 2 工具窗口初始位置接受 left/bottom/right,Rust 校验、macOS 解码及首次显示位置一致,用户保存布局仍覆盖默认声明。 Windows 安全回归:plugin_host::launch 的版本探测必须在父进程退出、后代继承管道时仍有界结束并清理进程树;web 回归验证真实文档来源与工作区文件目标。 Windows 语言资源整合:声明式插件的运行分组、管理页与安装审查使用共享生成词条;中英文回归验证安装名称/版本、程序数量和启停标签,并确认用户值中的占位符保持字面文本。 Windows 宿主修复回归:在 Core startServer 尚未返回时禁用插件,晚到会话必须先停止再拒绝;即时设置携带 pluginId,Core 接受并下推对应会话。缺失 requiredPackagePaths/runtimeRequirements 或 validationArguments 非零退出时拒绝启动。Hello Lithe 文本窗口、菜单、命令面板和工具栏可见,禁用后全部撤销;停靠、图标、动作状态及持久布局仍待接入,保持 partial。" + "notes": "Windows 宿主 v0 已接入契约 v1 的语言与语言服务器链路:plugin_host 模块负责包存储(app_local_data_dir 下的 plugins 与 plugin-state,bundled 从资源目录只读加载)、启动扫描(经 plugins.declarative.validate 携带 hostCapabilities {languages:1, languageServers:[1,2], serverProcess:1, settings:[1,2], ui:[1,2]},拒绝的包隔离并展示原因)、启动计划解析(packaged 入口固定在包内且拒绝 reparse point 与路径逃逸,runtime/systemCommand 走 PATH 与 LITHE__PATH 约定),语言服务器会话仍由共享 Core 的 lsp.startServer 拉起;shared fixtures 的 invalid-manifests.json 全部 154 个用例在 Windows 二进制内断言同一稳定错误码。M2 已补磁盘安装链(快照、installReview 审批、staging、回滚)与最小管理界面;M3 已补声明式设置(settings/languageServers 2 能力声明,全局+项目级存储,immediate 效果经 workspaceConfiguration 下推)、运行/测试计划命令与契约版 PHP bundled 包(随安装器分发,validate/launch/runPlan 端到端测试覆盖)。M4 已补 Web 工具窗口(ui 能力声明提升为 [1,2]):lithe-plugin:// scheme 只服务启用包内普通文件(拒 reparse point、路径逃逸、超 16MiB),响应带 CSP(default-src none、拒 eval/联网/frame)与 nosniff/no-store;window.lithe 桥 v0 提供 context、ui.getState/setState(宿主持有,64KiB 上限)、workspace.openFile 与主题事件,build.*/functions.* 在 Windows 构建系统能力接入前返回 plugin.web.unknownMethod。尚未实现:Worker 扩展清单向契约迁移(Worker 版 PHP 提供 composer scripts 动态运行动作,契约无等价能力,完整迁移推迟;见 Note)、构建系统插件能力与多仓库源市场。决策与切分见 .agents/notes/implemented/architecture/2026-10-22-windows-declarative-plugin-host.md。 后续安全修复已补插件身份传递、运行中和待启动会话排空、跨窗口包变更确认、完整启动前检查及 ui 1 文本/命令入口;目前 WebView 仍为独立窗口,停靠位置、图标、动作状态及布局持久化未完成。 #1478 拆分:新增 fixtures/package-trust/signature-vectors.json(RFC 8032 测试密钥、含非 ASCII 文件名的固定包、规范载荷、签名与内容摘要),macOS PluginSignatureVectorTests 用同一组向量验证。CryptoKit 的 Ed25519 签名带随机数,macOS 以验签证明规范载荷和摘要一致,不比较签名字节。", + "verification": "API 3 共享契约:cargo test -p lithe-core --lib community_build_plugins、cargo test -p lithe-core --lib build_systems、cargo test -p lithe-core --lib declarative_plugins 及 scripts/architecture/verify-shared-contracts.sh,覆盖真实 Maven/Gradle 输出、构建 icon/presentation/category、build.languageImport 的插件选项映射和 ui 2 包内网页清单。Core 校验通过不代表平台宿主已实现;macOS 原生窗口/JDT 接线与可选 WKWebView 分别验收后才由宿主声明对应能力,Windows 仍待接入。macOS:安装 shared/contracts/plugins/v1/fixtures/manifest/invalid-manifests.json 中每类错误的包,确认插件管理显示对应错误且不注册模块;合法包启用、禁用无需重启;包内声明的语言服务器可执行文件缺失或为符号链接时拒绝安装;启动后 app bundle 文件清单不变(scripts/macos/verify/verify-runtime-bundle-immutability.sh)。API 2:安装 fixtures 中 node-runtime 形态的包,确认宿主发现满足最低版本的 node 并用它启动入口文件,版本过低的候选不被使用;语言服务器的状态写在 /Lithe/PluginState 下而不是插件包内,卸载后该目录被删除。宿主能力:声明语言但未在 hostIntegration.capabilities 中列出运行、测试或调试、也未提供执行提供方的包,对应入口不可用且宿主不运行内置工具;列出后对应入口恢复。Windows:宿主 v0 已读取该契约(语言与语言服务器范围,按 hostCapabilities 门控),接入验收必须通过同一组共享 fixture,Windows 宿主测试已对 invalid-manifests.json 全量断言;Worker 扩展清单的迁移未完成,宿主 UI 仅完成文本和命令入口,不能用共享校验通过代替界面验收。 macOS API level 2:安装 Hello Lithe 数据包,确认工具窗口、命令面板、工具栏和菜单通过相同注册表显示;移动数据库与插件窗口、隐藏入口及重排后重启恢复;禁用插件后窗口和命令消失,重新启用保留位置与排序;无第三方原生代码载入。Windows UI adapter 仍缺停靠、图标和动作状态等对齐,不能用共享校验通过代替界面验收。 回归:声明与内置/应用动作冲突的合法包在启动时隔离并显示错误;正常退出保留已保存的窗口展开状态,用户主动隐藏才更新该状态;Agent 未启用时可移至底部并恢复入口;首次通过菜单打开 Services 会按需激活数据库。 macOS 图标:宿主语义 ID 与包内 SVG/PNG 在窗口入口、标题栏、工具栏、菜单和命令面板显示;模板着色与品牌原色、亮暗变体、选中/悬停/禁用沿用宿主规范;拒绝未知图标 ID、样式覆盖、包外路径、符号链接、脚本和外部引用;验证资源字节与 bundle 文件清单不变。 原生回归覆盖真实注册窗口标题栏、主工具栏活动/禁用状态、命令面板键盘选择及同一窗口亮→暗→亮切换;品牌图标不随选中着色,模板图标使用宿主选中文字颜色。 macOS 动作状态:确认窗口入口、工具栏、菜单与命令面板共用可用和勾选状态,激活中命令禁用且 Enter/鼠标均不能触发,窗口入口允许取消;同时打开同一插件的两个窗口只构造一次模块,取消其中一个不影响另一个;激活中禁用再启用,确认无资源残留或晚到贡献,旧动作引用不绕过状态校验。 API level 2 工具窗口初始位置接受 left/bottom/right,Rust 校验、macOS 解码及首次显示位置一致,用户保存布局仍覆盖默认声明。 Windows 安全回归:plugin_host::launch 的版本探测必须在父进程退出、后代继承管道时仍有界结束并清理进程树;web 回归验证真实文档来源与工作区文件目标。 Windows 语言资源整合:声明式插件的运行分组、管理页与安装审查使用共享生成词条;中英文回归验证安装名称/版本、程序数量和启停标签,并确认用户值中的占位符保持字面文本。 Windows 宿主修复回归:在 Core startServer 尚未返回时禁用插件,晚到会话必须先停止再拒绝;即时设置携带 pluginId,Core 接受并下推对应会话。缺失 requiredPackagePaths/runtimeRequirements 或 validationArguments 非零退出时拒绝启动。Hello Lithe 文本窗口、菜单、命令面板和工具栏可见,禁用后全部撤销;停靠、图标、动作状态及持久布局仍待接入,保持 partial。" } diff --git a/shared/platform-feature-matrix/features/declarative-plugin-settings.json b/shared/platform-feature-matrix/features/declarative-plugin-settings.json index 8872091101..4e348d0d0f 100644 --- a/shared/platform-feature-matrix/features/declarative-plugin-settings.json +++ b/shared/platform-feature-matrix/features/declarative-plugin-settings.json @@ -14,7 +14,7 @@ "macos/Sources/Lithe/Views/App/PluginSettingsSection.swift", "macos/Tests/LitheTests/PluginSettingsTests.swift", "Plugins/mac/Official/JavaSupport/plugin.json", - "shared/contracts/plugins/v1/fixtures/node-runtime.plugin.json" + "shared/contracts/plugins/v1/fixtures/languages/node-runtime.plugin.json" ], "implementationStatus": "implemented", "verificationStatus": "pending" @@ -24,7 +24,7 @@ "windows/tauri/src-tauri/src/plugin_host/settings.rs", "windows/tauri/src-tauri/src/plugin_host/tests.rs", "windows/tauri/src/features/plugins/declarative-plugin-settings-editor.tsx", - "shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json", + "shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json", "windows/tauri/src/features/editor/lsp/resolve-editor-lsp-launch.ts", "windows/tauri/src/platform/lsp-core-adapter.ts", "windows/tauri/src/platform/lsp-core-adapter.test.ts" diff --git a/shared/platform-feature-matrix/features/diagnostics-export.json b/shared/platform-feature-matrix/features/diagnostics-export.json index 21a87baa08..7b33d0eba5 100644 --- a/shared/platform-feature-matrix/features/diagnostics-export.json +++ b/shared/platform-feature-matrix/features/diagnostics-export.json @@ -39,7 +39,7 @@ "macos/Tests/LitheTests/LogWindowTests.swift", "macos/Sources/Lithe/Views/Diagnostics/LogChannelList.swift", "rust/lithe-core/src/lsp/interface/plugin_logging.rs", - "shared/contracts/plugins/v1/fixtures/plugin-logging.json", + "shared/contracts/plugins/v1/fixtures/backend/plugin-logging.json", "rust/lithe-core/src/diagnostics/plugin_operations.rs", "macos/Tests/LitheTests/Support/RecordedPluginOperations.swift" ], diff --git a/shared/platform-feature-matrix/features/editor-ide-settings-import.json b/shared/platform-feature-matrix/features/editor-ide-settings-import.json index 378fc11271..2f66d328ee 100644 --- a/shared/platform-feature-matrix/features/editor-ide-settings-import.json +++ b/shared/platform-feature-matrix/features/editor-ide-settings-import.json @@ -15,7 +15,7 @@ "macos/Sources/Lithe/Views/App/SettingsView.swift", "macos/Tests/LitheTests/EditorSettingsImportTests.swift", "macos/Sources/Lithe/Platform/MacOS/Plugins/MacEditorKeymapImportService.swift", - "shared/contracts/plugins/v1/fixtures/keymap-import-provider.plugin.json", + "shared/contracts/plugins/v1/fixtures/keymap-import/keymap-import-provider.plugin.json", "rust/lithe-core/src/plugins/keymap_import.rs", "frontend/editor/src/workbench.ts", "macos/Sources/Lithe/Models/Settings/ImportedEditorTheme.swift", diff --git a/shared/platform-feature-matrix/features/go-support-plugin.json b/shared/platform-feature-matrix/features/go-support-plugin.json index 3bf0e78ab2..6767cdd193 100644 --- a/shared/platform-feature-matrix/features/go-support-plugin.json +++ b/shared/platform-feature-matrix/features/go-support-plugin.json @@ -10,7 +10,7 @@ "macos/Sources/Lithe/Views/App/PluginManagementView.swift", "macos/Sources/Lithe/Application/Features/PluginMarketplace.swift", "macos/Tests/LitheTests/LanguageExtensionProcessLifecycleTests.swift", - "shared/contracts/plugins/v1/fixtures/command-plans.json", + "shared/contracts/plugins/v1/fixtures/languages/command-plans.json", "macos/Sources/Lithe/Platform/MacOS/Plugins/MacPluginManager.swift", "macos/Sources/Lithe/Platform/MacOS/MacApplicationRelauncher.swift", "macos/Tests/LitheTests/PluginManagerTests.swift" @@ -20,7 +20,7 @@ }, "windows": { "evidence": [ - "shared/contracts/plugins/v1/fixtures/language-system-command.plugin.json" + "shared/contracts/plugins/v1/fixtures/languages/language-system-command.plugin.json" ], "implementationStatus": "missing", "verificationStatus": "not-applicable" diff --git a/shared/platform-feature-matrix/features/java-support-plugin.json b/shared/platform-feature-matrix/features/java-support-plugin.json index 64e9263770..528173913b 100644 --- a/shared/platform-feature-matrix/features/java-support-plugin.json +++ b/shared/platform-feature-matrix/features/java-support-plugin.json @@ -12,12 +12,12 @@ "macos/Sources/Lithe/Platform/MacOS/Plugins/MacPluginPackageStore.swift", "macos/Tests/LitheTests/PluginLanguageServerLaunchResolverTests.swift", "macos/Tests/LitheTests/RealJavaDebugIntegrationTests.swift", - "shared/contracts/plugins/v1/fixtures/language-host-integration.plugin.json", + "shared/contracts/plugins/v1/fixtures/languages/language-host-integration.plugin.json", "macos/Sources/Lithe/Core/Language/PluginLanguageProviderCatalogSource.swift", "macos/Tests/LitheTests/LanguageProviderCatalogSourceTests.swift", "macos/Tests/LitheTests/RunWorkflowCoordinatorTests.swift", "macos/Tests/LitheTests/PluginBundledPublisherTrustTests.swift", - "shared/contracts/plugins/v1/fixtures/publisher-bundled.plugin.json", + "shared/contracts/plugins/v1/fixtures/package-trust/publisher-bundled.plugin.json", "scripts/plugins/official-plugin-releases.mjs", "Plugins/marketplace/official-plugins.json", "macos/Sources/Lithe/Application/Features/JavaPluginTransition.swift", diff --git a/shared/platform-feature-matrix/features/lsp-status-logs.json b/shared/platform-feature-matrix/features/lsp-status-logs.json index f5f049bc6c..778db9a0c2 100644 --- a/shared/platform-feature-matrix/features/lsp-status-logs.json +++ b/shared/platform-feature-matrix/features/lsp-status-logs.json @@ -39,7 +39,7 @@ "macos/Sources/Lithe/Views/Editor/EditorAreaView.swift", "macos/Tests/LitheTests/LogWindowReviewTests.swift", "rust/lithe-core/src/lsp/interface/plugin_logging.rs", - "shared/contracts/plugins/v1/fixtures/plugin-logging.json", + "shared/contracts/plugins/v1/fixtures/backend/plugin-logging.json", "macos/Sources/Lithe/Views/Language/LanguageServerLogText.swift", "macos/Tests/LitheTests/LanguageServerLogTextTests.swift" ], diff --git a/shared/platform-feature-matrix/features/php-run-test.json b/shared/platform-feature-matrix/features/php-run-test.json index d516ab34ab..13691af0c7 100644 --- a/shared/platform-feature-matrix/features/php-run-test.json +++ b/shared/platform-feature-matrix/features/php-run-test.json @@ -7,7 +7,7 @@ "evidence": [ "macos/Tests/LitheTests/Fixtures/RetiredOfficialPlugins/PhpSupport/plugin.json", "rust/lithe-core/src/plugins/declarative.rs", - "shared/contracts/plugins/v1/fixtures/command-plans.json", + "shared/contracts/plugins/v1/fixtures/languages/command-plans.json", "macos/Sources/LitheExecutionModule/Modules/BundledLanguageExecutionModule.swift", "macos/Tests/LitheTests/RealPhpIntegrationTests.swift" ], @@ -24,5 +24,5 @@ "verificationStatus": "pending" }, "owner": "PHP Support", - "verification": "macOS 安装 Lithe Store 社区 PHP 插件后运行 PHP 文件和单条/整套 PHPUnit(命令由声明式插件模板经 Rust Core 展开,与 shared/contracts/plugins/v1/fixtures/command-plans.json 一致);Windows 运行字符串/数组 Composer script 和整套 PHPUnit。禁用后菜单消失、运行进程退出,特殊文件名保持原样。Windows 暂不支持单方法发现。" + "verification": "macOS 安装 Lithe Store 社区 PHP 插件后运行 PHP 文件和单条/整套 PHPUnit(命令由声明式插件模板经 Rust Core 展开,与 shared/contracts/plugins/v1/fixtures/languages/command-plans.json 一致);Windows 运行字符串/数组 Composer script 和整套 PHPUnit。禁用后菜单消失、运行进程退出,特殊文件名保持原样。Windows 暂不支持单方法发现。" } diff --git a/shared/platform-feature-matrix/features/plugin-backend-workspace-context.json b/shared/platform-feature-matrix/features/plugin-backend-workspace-context.json index 04fb623bb1..8df1bc5ca5 100644 --- a/shared/platform-feature-matrix/features/plugin-backend-workspace-context.json +++ b/shared/platform-feature-matrix/features/plugin-backend-workspace-context.json @@ -11,8 +11,8 @@ "rust/lithe-core/src/lsp/interface/engine.rs", "rust/lithe-core/src/plugins/backend.rs", "shared/contracts/plugins/v1/README.md", - "shared/contracts/plugins/v1/fixtures/function-protocol.json", - "shared/contracts/plugins/v1/fixtures/backend-workspace.plugin.json", + "shared/contracts/plugins/v1/fixtures/backend/function-protocol.json", + "shared/contracts/plugins/v1/fixtures/backend/backend-workspace.plugin.json", "macos/Sources/Lithe/Platform/MacOS/Plugins/MacPluginBackendSessions.swift", "macos/Sources/Lithe/Application/Features/PluginHostServiceDispatch.swift", "macos/Sources/Lithe/Application/Features/PluginWorkspaceContexts.swift", diff --git a/shared/platform-feature-matrix/features/plugin-debug-adapters.json b/shared/platform-feature-matrix/features/plugin-debug-adapters.json index 644d447fcc..fbcaf75a10 100644 --- a/shared/platform-feature-matrix/features/plugin-debug-adapters.json +++ b/shared/platform-feature-matrix/features/plugin-debug-adapters.json @@ -5,10 +5,10 @@ "capability": "插件提供调试适配器:声明式 debugAdapters 经共享 Core 校验,宿主按已安装插件拉起适配器、启动与附加调试、调试控制台提示符与补全,安装、更新、启停、卸载免重启生效;原生启动配置保留明确适配器身份,支持无源文件目标及同语言多适配器的会话路由;debugAdapters v2 绑定受限的目标参数与环境,并接收同包 Provider 原生调试准备;DAP 生命周期与稳定失败分类进入统一结构化日志,取消不作为失败,协议和程序内容不落盘", "macos": { "evidence": [ - "shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json", - "shared/contracts/plugins/v1/fixtures/debug-adapter-language-server.plugin.json", - "shared/contracts/plugins/v1/fixtures/debug-adapter-remote-attach.plugin.json", - "shared/contracts/plugins/v1/fixtures/debug-adapter-rejections.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-language-server.plugin.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-rejections.json", "rust/lithe-core/src/debug/adapters.rs", "macos/Sources/LitheCoreContracts/Plugins/DeclarativePluginContracts.swift", "macos/Sources/Lithe/Platform/MacOS/Plugins/MacLivePluginRegistry.swift", @@ -42,9 +42,9 @@ "windows": { "evidence": [ "rust/lithe-core/src/debug/adapters.rs", - "shared/contracts/plugins/v1/fixtures/debug-adapter.plugin.json", - "shared/contracts/plugins/v1/fixtures/debug-adapter-language-server.plugin.json", - "shared/contracts/plugins/v1/fixtures/debug-adapter-remote-attach.plugin.json" + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter.plugin.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-language-server.plugin.json", + "shared/contracts/plugins/v1/fixtures/debug-adapters/debug-adapter-remote-attach.plugin.json" ], "implementationStatus": "missing", "verificationStatus": "not-applicable" diff --git a/shared/platform-feature-matrix/features/plugin-editor-actions.json b/shared/platform-feature-matrix/features/plugin-editor-actions.json index 20f7a57192..d24951cba7 100644 --- a/shared/platform-feature-matrix/features/plugin-editor-actions.json +++ b/shared/platform-feature-matrix/features/plugin-editor-actions.json @@ -10,7 +10,7 @@ "rust/lithe-core/src/plugins/editor_actions.rs", "macos/Sources/Lithe/Application/Features/PluginEditorActionHostService.swift", "frontend/editor/src/plugin-editor-actions.ts", - "shared/contracts/plugins/v1/fixtures/editor-actions.plugin.json" + "shared/contracts/plugins/v1/fixtures/editor/editor-actions.plugin.json" ] }, "windows": { diff --git a/shared/platform-feature-matrix/features/plugin-functions.json b/shared/platform-feature-matrix/features/plugin-functions.json index 8b74e49e9d..3e672db009 100644 --- a/shared/platform-feature-matrix/features/plugin-functions.json +++ b/shared/platform-feature-matrix/features/plugin-functions.json @@ -9,7 +9,7 @@ "evidence": [ "rust/lithe-core/src/lsp/interface/plugin_function.rs", "rust/lithe-core/src/lsp/interface/engine.rs", - "shared/contracts/plugins/v1/fixtures/function-protocol.json", + "shared/contracts/plugins/v1/fixtures/backend/function-protocol.json", "macos/Sources/Lithe/Application/Features/PluginWebBridge.swift", "macos/Sources/Lithe/Platform/MacOS/Build/MacBuildProviderSessions.swift", "macos/Sources/LitheLanguageIntelligenceModule/Runtime/LanguageServerSession.swift", diff --git a/shared/platform-feature-matrix/features/plugin-injected-toolchains.json b/shared/platform-feature-matrix/features/plugin-injected-toolchains.json index b99bc1b009..c4600e2598 100644 --- a/shared/platform-feature-matrix/features/plugin-injected-toolchains.json +++ b/shared/platform-feature-matrix/features/plugin-injected-toolchains.json @@ -16,7 +16,7 @@ "rust/lithe-core/src/tests/toolchain_queries.rs", "rust/lithe-core/src/tests/toolchain_pins.rs", "rust/lithe-core/src/tests/toolchain_resolution.rs", - "shared/contracts/plugins/v1/toolchains.md", + "shared/contracts/plugins/v1/toolchains/README.md", "macos/Sources/Lithe/Core/Ports/ToolchainSettings.swift", "macos/Sources/Lithe/Application/Features/ToolchainSettingsFeatureModel.swift", "macos/Sources/Lithe/Platform/MacOS/Runtime/MacToolchainSettingsLoader.swift", @@ -65,7 +65,7 @@ "rust/lithe-core/src/toolchain/resolution.rs", "rust/lithe-core/src/tests/toolchain_queries.rs", "shared/contracts/plugins/v1/plugin-manifest.schema.json", - "shared/contracts/plugins/v1/toolchains.md" + "shared/contracts/plugins/v1/toolchains/README.md" ] }, "owner": "Plugin Platform", diff --git a/shared/platform-feature-matrix/features/plugin-project-generators.json b/shared/platform-feature-matrix/features/plugin-project-generators.json index 996c82277a..07faab8d85 100644 --- a/shared/platform-feature-matrix/features/plugin-project-generators.json +++ b/shared/platform-feature-matrix/features/plugin-project-generators.json @@ -6,8 +6,8 @@ "macos": { "evidence": [ "rust/lithe-core/src/project_generators/", - "shared/contracts/plugins/v1/fixtures/project-generator.plugin.json", - "shared/contracts/plugins/v1/fixtures/project-plans.json", + "shared/contracts/plugins/v1/fixtures/project-generators/project-generator.plugin.json", + "shared/contracts/plugins/v1/fixtures/project-generators/project-plans.json", "Plugins/mac/Official/JavaSupport/plugin.json", "macos/Sources/Lithe/Views/Workspace/NewProjectView.swift", "macos/Sources/Lithe/Application/Features/NewProjectFeatureModel.swift", diff --git a/shared/platform-feature-matrix/features/plugin-registered-settings-pages.json b/shared/platform-feature-matrix/features/plugin-registered-settings-pages.json index 5b36f574e3..93b22f7403 100644 --- a/shared/platform-feature-matrix/features/plugin-registered-settings-pages.json +++ b/shared/platform-feature-matrix/features/plugin-registered-settings-pages.json @@ -13,7 +13,7 @@ "macos/Sources/Lithe/Views/App/PluginSettingsSection.swift", "macos/Sources/Lithe/Views/App/SettingsView.swift", "macos/Tests/LitheTests/PluginSettingsTests.swift", - "shared/contracts/plugins/v1/fixtures/settings-v2.plugin.json", + "shared/contracts/plugins/v1/fixtures/settings/settings-v2.plugin.json", "shared/contracts/plugins/v1/plugin-manifest.schema.json", "scripts/plugins/plugin-settings-schema.test.mjs", "macos/Sources/Lithe/Views/Components/LitheSettingsControls.swift", diff --git a/shared/platform-feature-matrix/features/plugin-web-tool-windows.json b/shared/platform-feature-matrix/features/plugin-web-tool-windows.json index 16f1a83766..c183819165 100644 --- a/shared/platform-feature-matrix/features/plugin-web-tool-windows.json +++ b/shared/platform-feature-matrix/features/plugin-web-tool-windows.json @@ -30,7 +30,7 @@ "macos/Sources/Lithe/Platform/MacOS/WebMediaCapture.swift", "macos/Tests/LitheTests/PluginWebCaptureTests.swift", "macos/Tests/LitheTests/WebMediaCaptureTests.swift", - "shared/contracts/plugins/v1/fixtures/web-panel.plugin.json" + "shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json" ], "implementationStatus": "implemented", "verificationStatus": "pending" @@ -40,7 +40,7 @@ "windows/tauri/src-tauri/src/plugin_host/web.rs", "windows/tauri/src-tauri/src/plugin_host/tests.rs", "windows/tauri/src/features/plugins/declarative-plugins-section.tsx", - "shared/contracts/plugins/v1/fixtures/web-panel.plugin.json", + "shared/contracts/plugins/v1/fixtures/ui/web-panel.plugin.json", "windows/tauri/src/features/plugins/plugin-web-appearance.ts", "windows/tauri/src/features/plugins/plugin-web-appearance.test.ts", "windows/tauri/src/features/plugins/plugin-web-open-file.test.ts", diff --git a/shared/platform-feature-matrix/features/run-java-test.json b/shared/platform-feature-matrix/features/run-java-test.json index 120a95a179..8b40609f90 100644 --- a/shared/platform-feature-matrix/features/run-java-test.json +++ b/shared/platform-feature-matrix/features/run-java-test.json @@ -27,11 +27,11 @@ "shared/fixtures/maven/testcase-durations-v1.json", "macos/Sources/LitheExecutionModule/Services/BuildLanguageTests.swift", "macos/Tests/LitheTests/MacNativeBuildProviderIntegrationTests.swift", - "shared/contracts/plugins/v1/fixtures/build-provider-selectors.plugin.json", - "shared/contracts/plugins/v1/fixtures/build-test-durations.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-selectors.plugin.json", + "shared/contracts/plugins/v1/fixtures/build-providers/build-test-durations.json", "shared/fixtures/run-configuration/provider-prepared-java.json", "shared/fixtures/build-provider/test-results-v1.json", - "shared/contracts/plugins/v1/fixtures/build-provider-preparation.plugin.json" + "shared/contracts/plugins/v1/fixtures/build-providers/build-provider-preparation.plugin.json" ], "implementationStatus": "implemented", "verificationStatus": "pending" diff --git a/shared/platform-feature-matrix/features/vcs-subversion-and-plugin-providers.json b/shared/platform-feature-matrix/features/vcs-subversion-and-plugin-providers.json index 49df62d44f..14351a2f2f 100644 --- a/shared/platform-feature-matrix/features/vcs-subversion-and-plugin-providers.json +++ b/shared/platform-feature-matrix/features/vcs-subversion-and-plugin-providers.json @@ -10,7 +10,7 @@ "rust/lithe-core/src/vcs", "rust/lithe-core/src/lsp/interface/vcs_provider.rs", "rust/lithe-core/src/tests/vcs.rs", - "shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json", + "shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json", "Plugins/mac/README.md", "macos/Sources/LitheModuleAPI/Catalog/BuiltInModuleCatalog.swift", "macos/Sources/LitheCoreContracts/Vcs/VcsProviderContracts.swift", @@ -44,7 +44,7 @@ "rust/lithe-core/src/vcs", "rust/lithe-core/src/lsp/interface/vcs_provider.rs", "rust/lithe-core/src/tests/vcs.rs", - "shared/contracts/plugins/v1/fixtures/vcs-provider.plugin.json" + "shared/contracts/plugins/v1/fixtures/vcs/vcs-provider.plugin.json" ], "implementationStatus": "missing", "verificationStatus": "not-applicable" diff --git a/windows/tauri/src-tauri/src/plugin_host/tests.rs b/windows/tauri/src-tauri/src/plugin_host/tests.rs index 2d5aee99c4..c24bd3cb52 100644 --- a/windows/tauri/src-tauri/src/plugin_host/tests.rs +++ b/windows/tauri/src-tauri/src/plugin_host/tests.rs @@ -8,7 +8,7 @@ use super::scan::{self, build_catalog_from}; use super::store::{self, DiscoveredPackage}; use serde_json::{json, Value}; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; const FIXTURES_DIR: &str = concat!( env!("CARGO_MANIFEST_DIR"), @@ -35,8 +35,26 @@ const CAPABILITY_GATED_FIXTURES: [&str; 5] = [ "build-host-integration.plugin.json", ]; +/// Finds a shared fixture by file name. Fixtures sit in one folder per +/// contract area, and case files name their base manifest by file name only; +/// `verify-shared-contracts.sh` keeps file names unique across the folders. fn fixture_path(name: &str) -> PathBuf { - PathBuf::from(FIXTURES_DIR).join(name) + fn find(directory: &Path, name: &str) -> Option { + let mut entries: Vec = std::fs::read_dir(directory) + .ok()? + .filter_map(|entry| entry.ok().map(|entry| entry.path())) + .collect(); + entries.sort(); + entries.into_iter().find_map(|path| { + if path.is_dir() { + find(&path, name) + } else { + (path.file_name()? == name).then_some(path) + } + }) + } + find(Path::new(FIXTURES_DIR), name) + .unwrap_or_else(|| panic!("fixture {name} is missing under {FIXTURES_DIR}")) } fn read_fixture(name: &str) -> Value { diff --git a/windows/tauri/src-tauri/src/plugin_host/web.rs b/windows/tauri/src-tauri/src/plugin_host/web.rs index d43723e2d3..bbb26d3d11 100644 --- a/windows/tauri/src-tauri/src/plugin_host/web.rs +++ b/windows/tauri/src-tauri/src/plugin_host/web.rs @@ -1651,7 +1651,7 @@ mod tests { assert!(page.contains("<script>")); assert!(page.contains("/__lithe_host__/bridge.js")); let manifest: Value = serde_json::from_str(include_str!( - "../../../../../shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json" + "../../../../../shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json" )) .unwrap(); assert!(manifest["ui"]["toolWindows"][0]["text"].is_string()); diff --git a/windows/tauri/src/features/plugins/declarative-plugin-ui.test.ts b/windows/tauri/src/features/plugins/declarative-plugin-ui.test.ts index 5178e326b3..2ecac2eb0a 100644 --- a/windows/tauri/src/features/plugins/declarative-plugin-ui.test.ts +++ b/windows/tauri/src/features/plugins/declarative-plugin-ui.test.ts @@ -1,7 +1,7 @@ import { afterEach, expect, mock, test } from "bun:test"; import { enableMapSet } from "immer"; import { createRequire } from "node:module"; -import hello from "../../../../../shared/contracts/plugins/v1/fixtures/hello-lithe.plugin.json"; +import hello from "../../../../../shared/contracts/plugins/v1/fixtures/manifest/hello-lithe.plugin.json"; import { useUIExtensionStore } from "@/extensions/ui/stores/ui-extension-store"; enableMapSet(); // Zustand's Bun CJS adapter loads the CommonJS Immer export. Enable its