From 20678e3fdb25b7bc6e274a8dc6f6ee61a6c6e066 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Tue, 1 Dec 2026 11:28:20 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(agents):=20=E6=90=9C=E7=B4=A2=E5=91=BD?= =?UTF-8?q?=E4=B8=AD=E5=B8=A6=E4=B8=8A=E6=89=80=E5=9C=A8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=20generation=20=E4=B8=8E=20readBytes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 命中可能在子代理文件里,宿主分页读取该文件需要它自己的 generation 和 已读字节数,列表只给主文件的值。 --- rust/crates/agent-sessions/src/store.rs | 11 +++++++++- rust/crates/agent-sessions/src/tests/store.rs | 20 ++++++++++++++----- shared/plugins/contract/v1/README.md | 6 ++++-- .../plugins/reference/protocol-changelog.md | 2 +- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/rust/crates/agent-sessions/src/store.rs b/rust/crates/agent-sessions/src/store.rs index dfb12a3d..1c02a0db 100644 --- a/rust/crates/agent-sessions/src/store.rs +++ b/rust/crates/agent-sessions/src/store.rs @@ -427,6 +427,12 @@ pub struct SearchHit { pub at_ms: Option, /// The bytes of `path` the span covers. pub range: ByteRange, + /// How many bytes of `path` the cache has read, where reading the file + /// from the hit on ends. + #[serde(rename = "readBytes")] + pub read_bytes: u64, + /// The cache's reading of `path`, which `agentSessions.page` takes back. + pub generation: i64, } /// How a failure while syncing one file affects the rest of the sync. @@ -792,7 +798,8 @@ impl SessionStore { /// A query without letters or digits finds nothing. pub fn search(&self, query: &SearchQuery) -> Result, CoreError> { const SQL: &str = " - SELECT f.agent, f.path, s.session_id, s.at_ms, s.range_start, s.range_end + SELECT f.agent, f.path, s.session_id, s.at_ms, s.range_start, s.range_end, + f.cursor_offset, f.generation FROM span_terms JOIN spans s ON s.id = span_terms.rowid JOIN files f ON f.id = s.file_id @@ -828,6 +835,8 @@ impl SessionStore { start: row.get(4)?, end: row.get(5)?, }, + read_bytes: row.get(6)?, + generation: row.get(7)?, }) }, ) diff --git a/rust/crates/agent-sessions/src/tests/store.rs b/rust/crates/agent-sessions/src/tests/store.rs index e659c5a2..200e1e02 100644 --- a/rust/crates/agent-sessions/src/tests/store.rs +++ b/rust/crates/agent-sessions/src/tests/store.rs @@ -689,12 +689,13 @@ fn a_rebuild_with_other_chunks_gives_the_same_records() { entries }; assert_eq!(records(&incremental), records(&whole)); + let hits = |store: &SessionStore, text: &str| { + let mut hits = search(store, text, &[]); + hits.iter_mut().for_each(|hit| hit.generation = 0); + hits + }; for text in ["migration", "数据库", "数据库迁移", "an"] { - assert_eq!( - search(&incremental, text, &[]), - search(&whole, text, &[]), - "{text}" - ); + assert_eq!(hits(&incremental, text), hits(&whole, text), "{text}"); } assert_eq!(search(&whole, "migration", &[]).len(), 2); } @@ -776,6 +777,15 @@ fn read_range_returns_the_bytes_until_the_file_changes() { let hits = fixture.search("deploy"); assert_eq!(hits.len(), 1); let hit = &hits[0]; + let file_size = std::fs::metadata(&path).expect("stat the file").len(); + assert_eq!(hit.read_bytes, file_size); + assert_eq!( + Some(hit.generation), + fixture + .store + .generation(AGENT, &hit.path) + .expect("read the generation") + ); let read = |store: &SessionStore, range: ByteRange| store.read_range(AGENT, &hit.path, range); assert_eq!( read(&fixture.store, hit.range) diff --git a/shared/plugins/contract/v1/README.md b/shared/plugins/contract/v1/README.md index 7d7e232a..b883d63e 100644 --- a/shared/plugins/contract/v1/README.md +++ b/shared/plugins/contract/v1/README.md @@ -4068,8 +4068,10 @@ Lithe list, search and sum them without the CLI running: - A listed session also gives `generation`, an opaque integer naming the cache's reading of `path`. It stays the same while the file only grows and changes when the file was replaced or truncated and read again from the - start; byte offsets taken under another generation do not apply. It was - added within `agents` 0; an older Core does not answer it. + start; byte offsets taken under another generation do not apply. A search + hit gives the `generation` and `readBytes` of its own file, which may be a + subagent file. Both were added within `agents` 0; an older Core does not + answer them. - `sessionID`, `readBytes` and `end` were added within `agents` 0. A Core that predates them refuses `sessionID` as an unknown field, answers neither `readBytes` nor `end`, and may hand `read` a range that ends inside a line; diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index 239ead8c..d4f12064 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -18,7 +18,7 @@ | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | -| [#240](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/240)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 会话来源 `read` 函数增加可选请求参数 `messageIDs`:只有 `true` 时才可在消息里返回可选 `id`(1–256 个可见 ASCII 字节,来源会话内稳定,同一消息的镜像相同);省略或为 `false` 时保留旧结果形状。同时增加可选请求参数 `toolCalls`:只有 `true` 时 `tool` 消息才可带实时 `toolCall` 的详情 `toolCallID`、`status`、`toolKind`、`title`、`locations`(同一调用和它的结果共用 `toolCallID`,宿主按实时方式合并,让历史轮次和实时显示一致)。Core 的新宿主命令 `agentSessions.page` 协商该参数并按整行双向分页,两个参数都由它发送,旧 `agentSessions.read` 和标题读取不协商,回答里出现这些详情字段(包括显式 `null`)时以 `agentSessions.invalidRead` 拒绝。`agentSessions.list` 的会话新增 `generation`:文件只增长时不变,被替换或截断后重新读取时换新值;`agentSessions.page` 必须带上同一次列表的 `generation`,不一致时回答 `changed`。四语 SDK 都使用已有普通 JSON 函数处理器,无类型或版本变化;旧插件可忽略参数。没有新增宿主方法、通知、错误码或能力版本。样例见 `fixtures/agents/record-read.json` 与 `rust/fixtures/agents/record-page-v1.json`;首次实现见 Core `15c0717`;宿主发布版本尚未产生。 | +| [#240](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/240)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 会话来源 `read` 函数增加可选请求参数 `messageIDs`:只有 `true` 时才可在消息里返回可选 `id`(1–256 个可见 ASCII 字节,来源会话内稳定,同一消息的镜像相同);省略或为 `false` 时保留旧结果形状。同时增加可选请求参数 `toolCalls`:只有 `true` 时 `tool` 消息才可带实时 `toolCall` 的详情 `toolCallID`、`status`、`toolKind`、`title`、`locations`(同一调用和它的结果共用 `toolCallID`,宿主按实时方式合并,让历史轮次和实时显示一致)。Core 的新宿主命令 `agentSessions.page` 协商该参数并按整行双向分页,两个参数都由它发送,旧 `agentSessions.read` 和标题读取不协商,回答里出现这些详情字段(包括显式 `null`)时以 `agentSessions.invalidRead` 拒绝。`agentSessions.list` 的会话新增 `generation`:文件只增长时不变,被替换或截断后重新读取时换新值;`agentSessions.page` 必须带上同一次列表的 `generation`,不一致时回答 `changed`。`agentSessions.search` 的命中也带上所在文件(可能是子代理文件)的 `generation` 和 `readBytes`。四语 SDK 都使用已有普通 JSON 函数处理器,无类型或版本变化;旧插件可忽略参数。没有新增宿主方法、通知、错误码或能力版本。样例见 `fixtures/agents/record-read.json` 与 `rust/fixtures/agents/record-page-v1.json`;首次实现见 Core `15c0717`;宿主发布版本尚未产生。 | | [#218](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/218)(待合入) | [@WhiteZeek](https://github.com/WhiteZeek) | API-29 | `buildSystems` 0 内的补充 | 清单 `buildSystems[].detection` 新增可选 `ignoredPaths`:最多 256 条有序的 `.gitignore` 目录规则,每条不超过 1024 个 UTF-8 字节,相对工作区根匹配,只过滤这个构建系统的候选目录。候选目录或它到工作区根之间的任一目录被忽略就不算实例,`outermost` 下被忽略的外层根下的标记文件也不会变成实例;每一层先看工作区规则,工作区的 `!` 规则可以放回;工作区根本身不参与匹配。规则无法编译或超长时整个清单以 `plugin.manifest.invalid` 拒绝,字段为 `buildSystems[i].detection.ignoredPaths[j]`。Core 命令 `build.detect` 的回答总是带 `detection.pluginIgnoredPaths`(`{pluginID, buildSystemID, displayName, patterns}`,按构建系统 ID 排序,只列胜出的声明,没有时为 `[]`),供宿主和可编辑的工作区规则分开展示。固定样例见 [`detect-plugin-ignored-paths-v1.json`](../../../rust/fixtures/build/detect-plugin-ignored-paths-v1.json)。不影响项目树、搜索和索引;没有新增宿主方法、通知、错误码或 SDK 版本。旧宿主会拒绝使用该字段的清单,插件要等包含这个改动的桌面端发布后再用。 | | [#227](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/227)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | 市场索引 `schemaVersion` 0 内的补充 | 一个仓库发布多个插件时,每个插件的 Release 标签用自己的前缀:`<前缀>MAJOR.MINOR.PATCH`(如 `codex-v0.1.0`、`claude-code-v0.1.0`)。索引字段不变:`plugins.marketplace.validateIndex` 的输出条目新增 `releaseTagPrefix`,由 Core 从下载地址的标签派生;每个标签都拆成同一个前缀加上列出它的版本号时为该前缀,否则为 `null`。宿主用它读取插件自己的更新日志(`listReleases` 的 `tagPrefix`)。只新增 Core 输出字段,旧宿主照常读取同一份索引;没有新增宿主方法、通知、错误码、能力版本或 SDK 版本。规则见 [`marketplace.md`](domains/marketplace.md#一个仓库发布多个插件)。 | | [#228](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/228)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `toolDefinitions` 0 / 1 内的补充 | 多个已启用插件声明同一个工具短 ID 且规范化定义完全一致时,`toolchains.registry` 与 `toolchains.discoveryPlan` 自动聚合成一条定义,并在有多个声明插件时附带排序后的 `pluginIDs`;定义不同仍作为 `conflicts` 拒绝。不提升 `toolDefinitions` 能力版本,不新增宿主方法、通知、错误码或 SDK 版本。规则见 [`toolchains/README.md`](../contract/v1/toolchains/README.md#commands-and-envelopes)。 | From 082fc7167b470e527cfbcca476686a006978cf0e Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Tue, 1 Dec 2026 11:28:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=8F=A6=E8=B5=B7=E4=B8=80=E8=A1=8C?= 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 d4f12064..239ead8c 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -18,7 +18,7 @@ | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | -| [#240](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/240)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 会话来源 `read` 函数增加可选请求参数 `messageIDs`:只有 `true` 时才可在消息里返回可选 `id`(1–256 个可见 ASCII 字节,来源会话内稳定,同一消息的镜像相同);省略或为 `false` 时保留旧结果形状。同时增加可选请求参数 `toolCalls`:只有 `true` 时 `tool` 消息才可带实时 `toolCall` 的详情 `toolCallID`、`status`、`toolKind`、`title`、`locations`(同一调用和它的结果共用 `toolCallID`,宿主按实时方式合并,让历史轮次和实时显示一致)。Core 的新宿主命令 `agentSessions.page` 协商该参数并按整行双向分页,两个参数都由它发送,旧 `agentSessions.read` 和标题读取不协商,回答里出现这些详情字段(包括显式 `null`)时以 `agentSessions.invalidRead` 拒绝。`agentSessions.list` 的会话新增 `generation`:文件只增长时不变,被替换或截断后重新读取时换新值;`agentSessions.page` 必须带上同一次列表的 `generation`,不一致时回答 `changed`。`agentSessions.search` 的命中也带上所在文件(可能是子代理文件)的 `generation` 和 `readBytes`。四语 SDK 都使用已有普通 JSON 函数处理器,无类型或版本变化;旧插件可忽略参数。没有新增宿主方法、通知、错误码或能力版本。样例见 `fixtures/agents/record-read.json` 与 `rust/fixtures/agents/record-page-v1.json`;首次实现见 Core `15c0717`;宿主发布版本尚未产生。 | +| [#240](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/240)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 会话来源 `read` 函数增加可选请求参数 `messageIDs`:只有 `true` 时才可在消息里返回可选 `id`(1–256 个可见 ASCII 字节,来源会话内稳定,同一消息的镜像相同);省略或为 `false` 时保留旧结果形状。同时增加可选请求参数 `toolCalls`:只有 `true` 时 `tool` 消息才可带实时 `toolCall` 的详情 `toolCallID`、`status`、`toolKind`、`title`、`locations`(同一调用和它的结果共用 `toolCallID`,宿主按实时方式合并,让历史轮次和实时显示一致)。Core 的新宿主命令 `agentSessions.page` 协商该参数并按整行双向分页,两个参数都由它发送,旧 `agentSessions.read` 和标题读取不协商,回答里出现这些详情字段(包括显式 `null`)时以 `agentSessions.invalidRead` 拒绝。`agentSessions.list` 的会话新增 `generation`:文件只增长时不变,被替换或截断后重新读取时换新值;`agentSessions.page` 必须带上同一次列表的 `generation`,不一致时回答 `changed`。四语 SDK 都使用已有普通 JSON 函数处理器,无类型或版本变化;旧插件可忽略参数。没有新增宿主方法、通知、错误码或能力版本。样例见 `fixtures/agents/record-read.json` 与 `rust/fixtures/agents/record-page-v1.json`;首次实现见 Core `15c0717`;宿主发布版本尚未产生。 | | [#218](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/218)(待合入) | [@WhiteZeek](https://github.com/WhiteZeek) | API-29 | `buildSystems` 0 内的补充 | 清单 `buildSystems[].detection` 新增可选 `ignoredPaths`:最多 256 条有序的 `.gitignore` 目录规则,每条不超过 1024 个 UTF-8 字节,相对工作区根匹配,只过滤这个构建系统的候选目录。候选目录或它到工作区根之间的任一目录被忽略就不算实例,`outermost` 下被忽略的外层根下的标记文件也不会变成实例;每一层先看工作区规则,工作区的 `!` 规则可以放回;工作区根本身不参与匹配。规则无法编译或超长时整个清单以 `plugin.manifest.invalid` 拒绝,字段为 `buildSystems[i].detection.ignoredPaths[j]`。Core 命令 `build.detect` 的回答总是带 `detection.pluginIgnoredPaths`(`{pluginID, buildSystemID, displayName, patterns}`,按构建系统 ID 排序,只列胜出的声明,没有时为 `[]`),供宿主和可编辑的工作区规则分开展示。固定样例见 [`detect-plugin-ignored-paths-v1.json`](../../../rust/fixtures/build/detect-plugin-ignored-paths-v1.json)。不影响项目树、搜索和索引;没有新增宿主方法、通知、错误码或 SDK 版本。旧宿主会拒绝使用该字段的清单,插件要等包含这个改动的桌面端发布后再用。 | | [#227](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/227)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | 市场索引 `schemaVersion` 0 内的补充 | 一个仓库发布多个插件时,每个插件的 Release 标签用自己的前缀:`<前缀>MAJOR.MINOR.PATCH`(如 `codex-v0.1.0`、`claude-code-v0.1.0`)。索引字段不变:`plugins.marketplace.validateIndex` 的输出条目新增 `releaseTagPrefix`,由 Core 从下载地址的标签派生;每个标签都拆成同一个前缀加上列出它的版本号时为该前缀,否则为 `null`。宿主用它读取插件自己的更新日志(`listReleases` 的 `tagPrefix`)。只新增 Core 输出字段,旧宿主照常读取同一份索引;没有新增宿主方法、通知、错误码、能力版本或 SDK 版本。规则见 [`marketplace.md`](domains/marketplace.md#一个仓库发布多个插件)。 | | [#228](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/228)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `toolDefinitions` 0 / 1 内的补充 | 多个已启用插件声明同一个工具短 ID 且规范化定义完全一致时,`toolchains.registry` 与 `toolchains.discoveryPlan` 自动聚合成一条定义,并在有多个声明插件时附带排序后的 `pluginIDs`;定义不同仍作为 `conflicts` 拒绝。不提升 `toolDefinitions` 能力版本,不新增宿主方法、通知、错误码或 SDK 版本。规则见 [`toolchains/README.md`](../contract/v1/toolchains/README.md#commands-and-envelopes)。 | From 81e73bdb93f13f8763f6197c70e00685606e673c Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Tue, 1 Dec 2026 11:29:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20=E5=8D=8F=E8=AE=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=B0=E5=BD=95=E7=99=BB=E8=AE=B0=20#241?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/plugins/reference/protocol-changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index 239ead8c..a368961c 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -18,6 +18,7 @@ | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | +| [#241](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/241)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 宿主命令 `agentSessions.search` 的命中新增 `generation` 和 `readBytes`,都是命中所在文件(可能是子代理文件)的值,宿主据此从命中处用 `agentSessions.page` 分页读取该文件。旧 Core 不回答这两个字段。没有新增宿主方法、通知、错误码或能力版本。 | | [#240](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/240)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 内的补充 | 会话来源 `read` 函数增加可选请求参数 `messageIDs`:只有 `true` 时才可在消息里返回可选 `id`(1–256 个可见 ASCII 字节,来源会话内稳定,同一消息的镜像相同);省略或为 `false` 时保留旧结果形状。同时增加可选请求参数 `toolCalls`:只有 `true` 时 `tool` 消息才可带实时 `toolCall` 的详情 `toolCallID`、`status`、`toolKind`、`title`、`locations`(同一调用和它的结果共用 `toolCallID`,宿主按实时方式合并,让历史轮次和实时显示一致)。Core 的新宿主命令 `agentSessions.page` 协商该参数并按整行双向分页,两个参数都由它发送,旧 `agentSessions.read` 和标题读取不协商,回答里出现这些详情字段(包括显式 `null`)时以 `agentSessions.invalidRead` 拒绝。`agentSessions.list` 的会话新增 `generation`:文件只增长时不变,被替换或截断后重新读取时换新值;`agentSessions.page` 必须带上同一次列表的 `generation`,不一致时回答 `changed`。四语 SDK 都使用已有普通 JSON 函数处理器,无类型或版本变化;旧插件可忽略参数。没有新增宿主方法、通知、错误码或能力版本。样例见 `fixtures/agents/record-read.json` 与 `rust/fixtures/agents/record-page-v1.json`;首次实现见 Core `15c0717`;宿主发布版本尚未产生。 | | [#218](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/218)(待合入) | [@WhiteZeek](https://github.com/WhiteZeek) | API-29 | `buildSystems` 0 内的补充 | 清单 `buildSystems[].detection` 新增可选 `ignoredPaths`:最多 256 条有序的 `.gitignore` 目录规则,每条不超过 1024 个 UTF-8 字节,相对工作区根匹配,只过滤这个构建系统的候选目录。候选目录或它到工作区根之间的任一目录被忽略就不算实例,`outermost` 下被忽略的外层根下的标记文件也不会变成实例;每一层先看工作区规则,工作区的 `!` 规则可以放回;工作区根本身不参与匹配。规则无法编译或超长时整个清单以 `plugin.manifest.invalid` 拒绝,字段为 `buildSystems[i].detection.ignoredPaths[j]`。Core 命令 `build.detect` 的回答总是带 `detection.pluginIgnoredPaths`(`{pluginID, buildSystemID, displayName, patterns}`,按构建系统 ID 排序,只列胜出的声明,没有时为 `[]`),供宿主和可编辑的工作区规则分开展示。固定样例见 [`detect-plugin-ignored-paths-v1.json`](../../../rust/fixtures/build/detect-plugin-ignored-paths-v1.json)。不影响项目树、搜索和索引;没有新增宿主方法、通知、错误码或 SDK 版本。旧宿主会拒绝使用该字段的清单,插件要等包含这个改动的桌面端发布后再用。 | | [#227](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/227)(待合入) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | 市场索引 `schemaVersion` 0 内的补充 | 一个仓库发布多个插件时,每个插件的 Release 标签用自己的前缀:`<前缀>MAJOR.MINOR.PATCH`(如 `codex-v0.1.0`、`claude-code-v0.1.0`)。索引字段不变:`plugins.marketplace.validateIndex` 的输出条目新增 `releaseTagPrefix`,由 Core 从下载地址的标签派生;每个标签都拆成同一个前缀加上列出它的版本号时为该前缀,否则为 `null`。宿主用它读取插件自己的更新日志(`listReleases` 的 `tagPrefix`)。只新增 Core 输出字段,旧宿主照常读取同一份索引;没有新增宿主方法、通知、错误码、能力版本或 SDK 版本。规则见 [`marketplace.md`](domains/marketplace.md#一个仓库发布多个插件)。 |