From 9e773b6eea2f46472d4a62507dfb4dddfdc868d9 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Thu, 19 Nov 2026 05:52:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs(plugins):=20=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=E5=B7=B2=E5=91=88=E7=8E=B0=E6=8F=92=E4=BB=B6=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=EF=BC=9B=E8=A1=A5=E5=85=85=E7=94=BB=E5=B8=83=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=99=90=E5=88=B6=E3=80=81=E6=96=87=E5=AD=97=E5=9F=BA?= =?UTF-8?q?=E7=BA=BF=E3=80=81=E6=B8=90=E5=8F=98=E8=A7=92=E5=BA=A6=E4=B8=8E?= =?UTF-8?q?=E5=88=86=E7=BB=84=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 能力表脚注 ¹ 删掉插件视图和设置区域关键词;ui.md、settings.md 的桌面端状态改为已呈现,并去掉已过时的“不读包内翻译”。 - 契约:画布图片从插件包只读读取,单个文件 256 KiB、最多 1024 × 1024 像素,读不到时不画并记一次日志;image 行补上 opacity。 - 契约:文字 y 是基线、align 放行首/中/尾;渐变 angle 同 CSS(默认 180);分组的 children、w、h、radius 用分组自己的坐标;捏合缩放只在宿主上报时可用。 - view-results fixture 的文字基线移到卡片中间。 --- shared/plugins/contract/v1/README.md | 25 ++++++++++++++++--- .../contract/v1/fixtures/ui/view-results.json | 2 +- .../reference/capabilities-and-versions.md | 2 -- shared/plugins/reference/domains/settings.md | 4 +-- shared/plugins/reference/domains/ui.md | 4 +-- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/shared/plugins/contract/v1/README.md b/shared/plugins/contract/v1/README.md index 52232e74..f4a29e9c 100644 --- a/shared/plugins/contract/v1/README.md +++ b/shared/plugins/contract/v1/README.md @@ -5245,24 +5245,34 @@ A canvas draws its `nodes` in order, in `viewBox` coordinates tall (1–2000). `label` is the scene's accessible name. `pan` lets the user drag the empty area, and `zoom` is the `[minimum, maximum]` range around 1 (0.05–20); the host draws the zoom buttons. The scroll wheel scrolls the page; -⌘ or Ctrl with the wheel, or a pinch, zooms. +⌘ or Ctrl with the wheel zooms, and so does a pinch on a host that reports one. | `type` | Fields | | --- | --- | | `rect` | `x`, `y`, `w`, `h`, `radius`, `fill`, `stroke`, `width`, `dash`, `shadow`, `opacity` | | `path` | `d` (SVG path data, at most 8192 bytes), `bounds` `[x, y, width, height]`, `fill`, `stroke`, `width`, `dash`, `cap`, `rule` (`nonzero`, `evenodd`), `opacity` | | `text` | `x`, `y`, `text` or up to 64 `runs` `{text, color}`, `style` (`title`, `strong`, `body`, `caption`, `display`, `mono`, `monoSmall`), `align`, `color`, `maxWidth`, `opacity` | -| `image` | `x`, `y`, `w`, `h`, `src`: a PNG path inside the plugin package | +| `image` | `x`, `y`, `w`, `h`, `src`: a PNG path inside the plugin package, `opacity` | | `group` | `x`, `y`, `scale`, `w`, `h`, `radius`, `clip`, `children`, `on` (`click`), `label`, `tooltip`, `states` (`hover`, `pressed`, `selected`), `selected`, `opacity`, `shadow`, `hidden` | -- Text uses the host's interface and monospace fonts at the named style; a - plugin cannot choose a font. Text longer than `maxWidth` ends with an ellipsis. +- Text is one line with its baseline at `y`. `align` puts the line's start + (the default), middle, or end at `x`. Text uses the host's interface and + monospace fonts at the named style; a plugin cannot choose a font. Text + longer than `maxWidth` ends with an ellipsis. - A color is `#RRGGBB`, `#RRGGBBAA`, a theme token (`$text`, `$textSecondary`, `$textMuted`, `$accent`, `$success`, `$warning`, `$error`, `$surface`, `$background`, `$sidebar`, `$line`, `$hover`, `$selection`, `$badge`), a `{light, dark}` pair, or `{linear: [[offset, color], …], angle}` with 2–8 stops. Tokens and pairs follow the theme; a fixed color is for content that shows a color itself, such as a color-scheme preview. +- A gradient's `angle` is in degrees clockwise from pointing up, as in CSS + `linear-gradient`: 0 runs upward, 90 to the right, and 180, the default, + downward. Its line passes through the middle of the shape (a path's + `bounds`, or the box of its points) and is as long as it takes for the + corners the angle points at to take the first and the last stop. +- A group's `x` and `y` place its origin, and `scale` scales what is inside + it: its `children`, `w`, `h`, and `radius` are in the group's own + coordinates. - A group with `on: ["click"]` is a control and needs `id`, `w` and `h` (its hit area), and `label`, read by screen readers. Tab moves between clickable groups. The host draws `states` without a round trip: `fill`, `stroke`, @@ -5272,6 +5282,12 @@ drag the empty area, and `zoom` is the `[minimum, maximum]` range around 1 and sizes are within ±1,000,000. Blur, filters, blend modes, radial gradients, custom fonts, animation, and text input are not part of a canvas; input uses host controls beside it. +- An `image` is read from the installed package the way its icons are: the + path stays inside the package, through real directories, to a regular PNG + file within the limits below. The host loads it off the window thread the + first time a scene draws it and keeps it until the view closes. Until then, + and for a file that is missing, too large, or cannot be decoded, the scene + draws without it; the host logs a failure once. - Canvas text is not searched. A settings region names its words in [`keywords`](#settings-regions). @@ -5286,6 +5302,7 @@ drag the empty area, and `zoom` is the `[minimum, maximum]` range around 1 | Canvases of one view | 8 | | Nodes of one canvas | 2000 | | One canvas scene, as JSON | 256 KiB | +| One canvas image file | 256 KiB, at most 1024 × 1024 pixels | | Patches of one result | 512 | Node, tree item, and canvas node IDs are 1–64 letters, digits, `.`, `_`, or diff --git a/shared/plugins/contract/v1/fixtures/ui/view-results.json b/shared/plugins/contract/v1/fixtures/ui/view-results.json index 42e740cb..2a473c5a 100644 --- a/shared/plugins/contract/v1/fixtures/ui/view-results.json +++ b/shared/plugins/contract/v1/fixtures/ui/view-results.json @@ -22,7 +22,7 @@ {"type": "rect", "x": 0, "y": 0, "w": 320, "h": 160, "radius": 8, "fill": "$surface"}, {"type": "group", "id": "node.core", "x": 20, "y": 20, "w": 120, "h": 40, "radius": 6, "on": ["click"], "label": "core module", "states": {"hover": {"fill": "$hover"}}, "children": [ - {"type": "text", "x": 60, "y": 20, "text": "core", "style": "strong", "align": "center"} + {"type": "text", "x": 60, "y": 25, "text": "core", "style": "strong", "align": "center"} ]} ]} ] diff --git a/shared/plugins/reference/capabilities-and-versions.md b/shared/plugins/reference/capabilities-and-versions.md index 34e61bb0..605eca10 100644 --- a/shared/plugins/reference/capabilities-and-versions.md +++ b/shared/plugins/reference/capabilities-and-versions.md @@ -74,7 +74,6 @@ Core 列以本仓库 `main` 上的 Core 源码为准([`capabilities.rs`](https - 构建提供者的调试准备、模型输入、原生配置、内联测试报告和运行期调试;构建系统的实例选项和任务准备。 - 插件声明的运行配置类型只能运行,不能调试。 - 不属于任何工具窗口的 `ui` 命令。 -- 工具窗口和设置区域里的[插件视图](../contract/v1/README.md#plugin-views),以及 `settingRegions` 的搜索关键词。 - VCS 提供者的逐行追溯(annotation)、文件历史、文件操作、元数据监听、认证、历史提交差异、项目树与编辑器行号栏状态,以及 `lithe/vcs/execution` 控制台输出。 - 后端宿主服务:工作区文件与搜索(`workspace/readDirectory`、`stat`、`readFile`、`watch`、`findFiles`、`findText`)和 `preview/openHTML` 尚未注册,请求这些权限的插件被拒绝。运行期以 `lithe/host/getCapabilities` 的返回为准,见 [API 总表](api-catalog.md)。 @@ -188,7 +187,6 @@ Each row is one capability. `requires` lists **exactly** the capabilities a mani - For build providers: debug preparation, model inputs, native configuration, inline test reports, and runtime debugging; for build systems: instance options and task preparations. - Run configuration types a plugin declares run but cannot be debugged. - `ui` commands that belong to no tool window. -- [Plugin views](../contract/v1/README.md#plugin-views) in tool windows and settings regions, and the search keywords of `settingRegions`. - For VCS providers: annotation, file history, file operations, metadata watching, authentication, history entry diffs, status in the project tree and the editor gutter, and `lithe/vcs/execution` console output. - Backend host services: the workspace file and search methods (`workspace/readDirectory`, `stat`, `readFile`, `watch`, `findFiles`, `findText`) and `preview/openHTML` are not registered, so a plugin that asks for one of those permissions is refused. At runtime, the reply of `lithe/host/getCapabilities` is authoritative; see the [API catalog](api-catalog.md). diff --git a/shared/plugins/reference/domains/settings.md b/shared/plugins/reference/domains/settings.md index 1b2f95b2..3b802b7a 100644 --- a/shared/plugins/reference/domains/settings.md +++ b/shared/plugins/reference/domains/settings.md @@ -14,7 +14,7 @@ | API 编号 | [API-19](../api-catalog.md#现在能用的-api):声明式设置和设置区域。运行期读取、查看来源、修改设置和变化事件仍在计划中。[API-37](../api-catalog.md#现在能用的-api):设置文字的包内翻译 | | 权限 | 不需要额外权限。设置不会改变运行的程序,所以不进入安装审查的程序列表 | | 激活事件 | 不需要。值按设置的 `effect` 在下一次启动、模型重载、下一次运行或 `immediate` 推送时生效 | -| 桌面端 | 已声明 `settings`:按语言和构建系统分页、分组、全部控件类型、项目层、生效方式和页面按钮都已呈现。还没有读取包内翻译 `l10n/`,始终显示清单原文;还没有呈现设置区域 `settingRegions` | +| 桌面端 | 已声明 `settings`:按语言和构建系统分页、分组、全部控件类型、项目层、生效方式、页面按钮和设置区域 `settingRegions`(搜索关键词和插件视图)都已呈现,并按界面语言显示包内翻译 `l10n/` | ### 设置类型 @@ -166,7 +166,7 @@ A plugin declares, in its manifest, the options a user may change. The host draw | API IDs | [API-19](../api-catalog.md#apis-usable-now): declarative settings and settings regions. Runtime reads, source inspection, writes, and change events are still planned. [API-37](../api-catalog.md#apis-usable-now): packaged translations of settings text | | Permissions | None. Settings never change which program runs, so they are not in the install review's program list | | Activation | Not needed. Values take effect according to the setting's `effect`: at the next start, a model reload, the next run, or an `immediate` push | -| Desktop | Declares `settings`: pages per language and build system, sections, every control type, the project layer, effects, and page buttons are presented. It does not read packaged translations `l10n/` yet and always shows the manifest text, and does not present settings regions `settingRegions` yet | +| Desktop | Declares `settings`: pages per language and build system, sections, every control type, the project layer, effects, page buttons, and settings regions `settingRegions` (search keywords and plugin views) are presented, in the interface language from the packaged translations `l10n/` | ### Setting types diff --git a/shared/plugins/reference/domains/ui.md b/shared/plugins/reference/domains/ui.md index a3ffe2d1..f9a9343c 100644 --- a/shared/plugins/reference/domains/ui.md +++ b/shared/plugins/reference/domains/ui.md @@ -14,7 +14,7 @@ | API 编号 | API-02、03、13、14、17,见 [API 总表](../api-catalog.md#现在能用的-api) | | 权限 | `ui.contribute`;网页加 `ui.web`;没有窗口的命令加 `backend.launch`;后端弹出消息用 `window.messages` | | 激活事件 | 每个窗口 `onView:`,每个命令 `onCommand:` | -| Lithe 桌面端 | 声明 `ui` 0,呈现文本和网页工具窗口,以及打开工具窗口的命令;插件视图的桌面绘制在后续桌面端 PR 中接入。不呈现不属于任何工具窗口的命令:这类包照常安装,但这些命令没有入口 | +| Lithe 桌面端 | 声明 `ui` 0,呈现文本、网页和插件视图工具窗口,以及打开工具窗口的命令;插件视图用 Viva 原生绘制宿主控件、树和画布。不呈现不属于任何工具窗口的命令:这类包照常安装,但这些命令没有入口 | ### 规则 @@ -70,7 +70,7 @@ A plugin can place tool windows and commands in the workbench. The window shell | API IDs | API-02, 03, 13, 14, 17; see the [API catalog](../api-catalog.md#apis-usable-now) | | Permissions | `ui.contribute`; `ui.web` for web pages; `backend.launch` for a command without a window; `window.messages` for messages shown by the backend | | Activation events | `onView:` per window, `onCommand:` per command | -| Lithe desktop | Declares `ui` 0 and presents text and web tool windows, and commands that open a tool window; desktop drawing of plugin views lands in a later desktop PR. It does not present commands that belong to no tool window: such packages install, but those commands have no entry point | +| Lithe desktop | Declares `ui` 0 and presents text, web, and plugin view tool windows, and commands that open a tool window; plugin views draw their host controls, trees, and canvases natively with Viva. It does not present commands that belong to no tool window: such packages install, but those commands have no entry point | ### Rules From d63ca9788535010d153167ac2711c1810af19baa Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Thu, 19 Nov 2026 06:03:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs(plugins):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=A1=A5=E5=9B=9E=20#104=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BA=BF=E6=9D=A1=E7=9B=AE=EF=BC=8C=E7=99=BB=E8=AE=B0?= =?UTF-8?q?=E6=9C=AC=E6=AC=A1=E8=AF=B4=E6=98=8E=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #104 合入前把 main 合进分支时,冲突处理把它的“待合入”条目冲掉了, main 上的更新记录因此没有 #104。按合入日期 2026-11-18(UTC)把它补进 时间线,版本首次出现表里“见待合入”改为链接 #104;“待合入”登记本 PR 对契约 README、view-results fixture 和桌面端呈现状态的说明补充。 --- shared/plugins/reference/protocol-changelog.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index d87cd6dc..9dba8af8 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -14,7 +14,7 @@ ## 待合入 -目前没有。 +- `ui` 0、`settings` 0 内的说明补充(API-13、API-19):契约 README 写明画布 `image` 节点怎样读取:路径留在插件包内、经过真实目录、指向普通 PNG 文件,单个文件最多 256 KiB、每边最多 1024 像素(预算表新增一行);宿主在场景第一次画到它时于窗口线程外读取,保留到视图关闭,读到之前或读取失败时场景不画它,失败只记一次日志。`image` 节点的字段表补上 `opacity`。文字是一行,基线在 `y`,`align` 把行首(默认)、中点或行尾放在 `x`;渐变 `angle` 与 CSS `linear-gradient` 一致(0 向上、90 向右、默认 180 向下),渐变线穿过形状中心;分组的 `x`、`y` 放置原点,`scale` 缩放内部,`children`、`w`、`h`、`radius` 都在分组自己的坐标里;捏合缩放只在宿主能上报捏合时可用。fixture `fixtures/ui/view-results.json` 的文字基线移到卡片中间。[能力与协议版本对照](capabilities-and-versions.md)删掉“插件视图尚未在桌面端绘制”的脚注,`domains/ui.md`、`domains/settings.md` 的桌面端一行改为已呈现插件视图、设置区域和包内翻译 `l10n/`([1lck/Lithe-IDEA#2181](https://github.com/1lck/Lithe-IDEA/issues/2181))。没有新增版本号、宿主方法、通知或 SDK 版本。 ## 按协议查首次出现 @@ -27,7 +27,7 @@ | 插件 API 版本 `pluginAPIVersion` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | 插件清单 `schemaVersion` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | 市场索引 `schemaVersion` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| 原生 UI 文档 `schemaVersion`(已删除:`ui` 0 内改为插件视图,视图结果不带版本号,见待合入) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| 原生 UI 文档 `schemaVersion`(已删除:`ui` 0 内改为插件视图,视图结果不带版本号,见 [#104](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/104)) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `litheBuildModel`、`litheDependencies`、`litheTestResults`、`litheTestDiscovery`、`litheBuildConfiguration`、`litheConfigurationEdit` 和 `modelInputs` 快照的 `version` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `plugins.editorActions.decode` 请求的 `version` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | 插件网页桥 `window.lithe.version` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | @@ -148,6 +148,7 @@ | PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | | --- | --- | --- | --- | --- | +| [#104](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/104) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-13、API-19、API-37 | `ui` 0、`settings` 0 内的替换 | 插件视图取代宿主绘制的原生 UI 文档。插件后端的视图函数(经已有的 `lithe/function/invoke` 调用)按事件(`open`、`close`、`click`、`change`、`select`、`activate`、`viewport`、`settings`)返回界面树或补丁:宿主控件(行、分区、文字、输入框、下拉、分段、开关、按钮、键值、表格、横幅、绑定设置的设置行、显示插件工具解析结果的工具行)、树和画布节点(可带圆角的矩形、路径、文字、图片、可点击分组及悬停/按下/选中状态),新 schema [`plugin-ui.schema.json`](../contract/v1/plugin-ui.schema.json) 取代 `native-ui.schema.json`,原生 UI 文档的 `schemaVersion` 一并删除。Core 新增命令 `plugins.ui.applyResult`:按清单、界面(工具窗口或设置区域)和上一版视图校验每个结果,返回新视图和是否变化,超出预算或违反界面规则以 `plugin.ui.invalidView`(带 `field`)拒绝。清单新增 `settingRegions`(最多 16 个):插件在语言、构建系统或编译器页(不写 `page` 时为插件自己的设置标签)放搜索关键词、插件视图或两者,设置搜索按关键词找到页面;`l10n/<语言>.json` 新增 `settingRegions..keywords`,翻译的关键词追加在声明的后面、忽略大小写去重。fixture `fixtures/ui/view-panel.plugin.json`、`fixtures/ui/view-results.json`,`fixtures/settings/` 补设置区域与中文关键词。Node、Rust、Java 三个 SDK 新增 `view(id, handler)`:把参数读成视图事件(不合法时 `sdk.view.invalidEvent`,处理函数不会运行),把返回的整个视图、补丁或“没有变化”写成结果;Node SDK 的 `index.d.ts` 给出界面节点、画布节点和补丁的类型。没有新增版本号、宿主方法、通知或 SDK 版本;这一版插件不能主动推送视图。 | | [#102](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/102) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23、API-19 | `toolDefinitions` 1 内的补充 | `toolchains.settingsView` 的 `issues` 每项改为 `{index,status,group?}`:查询分组时 `group` 是工具所在分组的键,宿主从问题列表打开这个工具时可以一并展开它的分组,不必自己拼分组键;契约 README 同时写明 `issues` 一直不受查询影响、先错误后警告并各按名称排序。没有新增版本号、宿主方法、通知或 SDK 版本。 | | [#99](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/99) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23、API-19 | **`toolDefinitions` 1** | 工具定义新增只影响显示位置的 `category`(`runtime`、`build`、`package`、`debug`、`lint`、`other`,默认 `other`)和 `audience`(`user` 默认,`plugin` 表示插件自用的运行时);用到任一字段的插件声明 `toolDefinitions: 1`,只支持 0 的宿主不会安装,其他插件继续写 0。新增 Core 命令 `toolchains.settingsView`:按宿主已有的解析原因、固定和未应用状态给设置页工具列表分类(`error`、`warning`、`ok`)、筛选、分组、折叠和计数,最多 20,000 个工具。`plugins.settings.navigation` 支持三级、每项可选 `limit`(超出的子项折叠成一行“全部 N 个”)以及每行的 `matched` 与 `path`。清单 schema 的 `requires.buildProviders` 补上 #89 已支持的版本 1。没有新增宿主方法、通知或 SDK 版本。宿主须先声明 `toolDefinitions` 1,插件才可要求它。 | | [#97](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/97) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-29 | **`beforeLaunchTasks` 0** | 运行配置“启动前”的插件任务(对标 IntelliJ IDEA 的“添加新任务”,[1lck/Lithe-IDEA#2100](https://github.com/1lck/Lithe-IDEA/issues/2100)):构建系统新增 `beforeLaunchTasks`(最多 16 个),声明方式和 `runConfigurationTypes` 相同(`id`、`displayName`、可选 `description`、`icon`、最多 16 个 `fields` 和 `arguments` 模板),但任务总是运行到结束,不能写 `execution`,`arguments` 不能用 `${userArguments}`;任务 ID 与类型 ID 各自唯一。运行配置的 `beforeLaunch` 步骤除 `{configuration}` 外新增 `{task: {pluginID, buildSystemID, type, values}}`,任务在拥有这个步骤列表的配置的工作目录里运行,不带程序参数和环境变量;步骤对象不允许出现别的键。Core 新增命令 `runConfig.checkBeforeLaunchTask`(校验“添加新任务”小表单的值,返回要放进字段值的步骤)、`runConfig.beforeLaunchField`(给不用 `runConfig.editorForm` 的编辑器,例如构建运行的编辑器,返回已保存配置的 `beforeLaunch` 字段)和 `build.beforeLaunchTaskPlan`(把任务步骤展开成 argv 计划);`runConfig.editorForm` 的 `beforeLaunch` 字段新增 `tasks`(已安装插件声明的任务种类及其表单),字段值里的任务步骤是 `{task, name, summary, values}`,插件已卸载的是 `{task, name, summary, missing: true}`;`runConfig.beforeLaunch`、`runConfig.updateOptions`、`runConfig.saveEditorChanges` 新增请求字段 `runTypePlugins`,`runConfig.beforeLaunch` 的任务步骤返回 `{task, name, summary, workingDirectory}`,拒绝码新增 `taskNotDeclared` 和 `invalidTaskValues`(带 `task`),确认指纹也覆盖任务及其值和工作目录。`runConfigurationTypes` 的必填 `arguments` 字段留空现在会被拒绝(以前没有执行 `required`)。语言文件新增 `beforeLaunchTasks.<构建系统 ID>.<任务 ID>`;保存的值不合法时是 `plugin.build.invalidBeforeLaunchTask`(字段 `values.`)。新增 fixture `before-launch-tasks/`。用到它的插件声明 `beforeLaunchTasks: 0`,不认识它的宿主不会安装。没有新增宿主方法或通知。 | From c87159f46fda72bd75094f3cd1274806c18d1d5d Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Thu, 19 Nov 2026 06:04:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs(plugins):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=BE=85=E5=90=88=E5=85=A5=E6=9D=A1=E7=9B=AE?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=20#105?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/plugins/reference/protocol-changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index 9dba8af8..a26d52c9 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -14,7 +14,7 @@ ## 待合入 -- `ui` 0、`settings` 0 内的说明补充(API-13、API-19):契约 README 写明画布 `image` 节点怎样读取:路径留在插件包内、经过真实目录、指向普通 PNG 文件,单个文件最多 256 KiB、每边最多 1024 像素(预算表新增一行);宿主在场景第一次画到它时于窗口线程外读取,保留到视图关闭,读到之前或读取失败时场景不画它,失败只记一次日志。`image` 节点的字段表补上 `opacity`。文字是一行,基线在 `y`,`align` 把行首(默认)、中点或行尾放在 `x`;渐变 `angle` 与 CSS `linear-gradient` 一致(0 向上、90 向右、默认 180 向下),渐变线穿过形状中心;分组的 `x`、`y` 放置原点,`scale` 缩放内部,`children`、`w`、`h`、`radius` 都在分组自己的坐标里;捏合缩放只在宿主能上报捏合时可用。fixture `fixtures/ui/view-results.json` 的文字基线移到卡片中间。[能力与协议版本对照](capabilities-and-versions.md)删掉“插件视图尚未在桌面端绘制”的脚注,`domains/ui.md`、`domains/settings.md` 的桌面端一行改为已呈现插件视图、设置区域和包内翻译 `l10n/`([1lck/Lithe-IDEA#2181](https://github.com/1lck/Lithe-IDEA/issues/2181))。没有新增版本号、宿主方法、通知或 SDK 版本。 +- `ui` 0、`settings` 0 内的说明补充(API-13、API-19):契约 README 写明画布 `image` 节点怎样读取:路径留在插件包内、经过真实目录、指向普通 PNG 文件,单个文件最多 256 KiB、每边最多 1024 像素(预算表新增一行);宿主在场景第一次画到它时于窗口线程外读取,保留到视图关闭,读到之前或读取失败时场景不画它,失败只记一次日志。`image` 节点的字段表补上 `opacity`。文字是一行,基线在 `y`,`align` 把行首(默认)、中点或行尾放在 `x`;渐变 `angle` 与 CSS `linear-gradient` 一致(0 向上、90 向右、默认 180 向下),渐变线穿过形状中心;分组的 `x`、`y` 放置原点,`scale` 缩放内部,`children`、`w`、`h`、`radius` 都在分组自己的坐标里;捏合缩放只在宿主能上报捏合时可用。fixture `fixtures/ui/view-results.json` 的文字基线移到卡片中间。[能力与协议版本对照](capabilities-and-versions.md)删掉“插件视图尚未在桌面端绘制”的脚注,`domains/ui.md`、`domains/settings.md` 的桌面端一行改为已呈现插件视图、设置区域和包内翻译 `l10n/`([1lck/Lithe-IDEA#2181](https://github.com/1lck/Lithe-IDEA/issues/2181))。没有新增版本号、宿主方法、通知或 SDK 版本。实现见 [#105](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/105)。 ## 按协议查首次出现