Repository navigation
fix(plugin-api): 补齐原生工作流计划校验与 SDK 回归 - #194
Draft
xiaoyumuxi wants to merge 2 commits into
Draft
xiaoyumuxi wants to merge 2 commits into
xiaoyumuxi wants to merge 2 commits into
Conversation
35 of 40 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue:Refs 1lck/Lithe-IDEA#2371
前置改动:#193(已合入)
类型:fix
问题与结果
#193 提供了通用输入、预览、输出、进度等接口。桌面接线时发现,原生操作计划还缺少清单命令归属和资源类型校验;省略预览模式及浏览器未保存策略时,计划没有显式返回契约规定的默认值。本 PR 在 Core 完成这些规则,使桌面收到可以直接执行的计划。
同时修复 #193 的两处 CI 问题:内核命令总表遗漏
plugins.workflow,Rust SDK 新类型位于测试模块之后触发items_after_test_module。SDK e2e 那次 Temurin 8 下载解压失败属于基础设施下载问题,本地四语端到端全部通过,没有为此修改工作流。改动
plugins.workflow/prepare接收经过验证的调用会话清单。状态项的commandID只允许引用该清单自己的命令。unsupportedOption。editorAndPreview;浏览器资源默认requireSaved,显式openSavedFile保留。statusBar/setItempreview/openMarkdownpreview/openHTMLbrowser/openExternal兼容、归属与日志
不新增方法、通知、权限、自定义错误码或任何系统版本。复用
plugin.host.invalidParams、plugin.host.unsupportedOption,没有改动既有编号。manifest是宿主内部 Core 命令的可选输入,不是插件请求字段;使用命令的状态项需要宿主提供真实调用会话清单。四个 SDK 的公共调用形状保持不变。规则、默认值和错误分类在 Core;桌面只执行原生 I/O 与呈现。真实插件业务及其测试留在插件仓库。本 PR 用合成输入和共享 fixture,不依赖具体插件或本机插件检出。
失败由现有 Core 请求分发轨迹和宿主方法处理边界记录,不新增旁路日志,不记录输入内容、HTTP URL/头/正文或凭据。未在原生应用日志窗口验收;该项由桌面接线 PR 如实记录。
验证
macOS 实际执行:
cargo test --manifest-path rust/Cargo.toml -p lithe-plugin-rpc -p lithe-plugin-ui -p lithe-project --lib:158 项通过。cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib api_command_table_lists_exactly_the_parsed_commands:通过,修复前 CI 日志明确失败。cargo test --manifest-path rust/Cargo.toml -p lithe-plugin-rpc workflow::tests:5 项通过;新增原生计划测试保留、临时移除修复规则时实际失败,恢复后通过。cargo fmt --check、受影响 cratecargo clippy --all-targets -- -D warnings:通过。cargo clippy --all-targets -- -D warnings:通过。node shared/plugins/scripts/sdk-e2e.mjs:16 项通过。CARGO_TARGET_DIR="$PWD/rust/target" ./scripts/rust-core/verify-rust-core-comments.sh plugin-rpc plugin-ui project、node scripts/rust-core/verify-platform-tests.mjs、node shared/plugins/scripts/verify-docs.mjs:通过。按任务范围仅做 macOS 本地验证;Windows 验收未执行。无新插件、无发布、无自动合并。