Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions rust/crates/plugin-rpc/src/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ fn directory_marks_valid(p: &Map<String, Value>) -> bool {
| "testResources"
| "generated"
| "excluded"
| "package"
) || is_plugin_directory_type_id(role)
});
let valid_color = obj
Expand Down Expand Up @@ -870,7 +871,8 @@ mod tests {
"context": context,
"marks": [
{"path": "db/migrations", "role": "plugin.migrations"},
{"path": "src/main", "role": "sources", "color": "#3b82f6"}
{"path": "src/main", "role": "sources", "color": "#3b82f6"},
{"path": "src/main/java/com/example", "role": "package"}
]
}
});
Expand All @@ -886,8 +888,8 @@ mod tests {
});
assert!(command(invalid_mark_path).is_err());

// The resolver draws `module` and `package` as plain folders and refuses blank
// names and Windows drive separators, so the host must never store them.
// The resolver draws `module` as a plain folder and refuses blank names and
// Windows drive separators, so the host must never store them.
for (field, value) in [("icon", json!("module")), ("name", json!(" "))] {
let mut item = json!({"id":"plugin.x","name":"X","icon":"folder","color":"#0d9488"});
item[field] = value;
Expand Down
2 changes: 1 addition & 1 deletion rust/crates/project/src/directory_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ fn style_for_role(
false,
),
"module" => ("folder".into(), None, false, false, None, false, false),
"package" => ("folder".into(), None, false, false, None, false, false),
"package" => ("package".into(), None, false, false, None, false, false),
_ => ("folder".into(), None, false, false, None, false, false),
}
}
Expand Down
8 changes: 5 additions & 3 deletions rust/fixtures/workspace/directory-rules-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@
{"pluginId": "com.example.a", "path": "db/migrations", "role": "plugin.migrations"},
{"pluginId": "com.example.a", "path": "db/override", "role": "plugin.migrations"},
{"pluginId": "com.example.a", "path": "manual", "role": "excluded"},
{"pluginId": "com.example.a", "path": "out", "role": "excluded", "color": "#ff0000"}
{"pluginId": "com.example.a", "path": "out", "role": "excluded", "color": "#ff0000"},
{"pluginId": "com.example.a", "path": "pkg/com/example", "role": "package"}
],
"paths": ["db/migrations", "db/migrations/V1", "db/override", "manual", "out", "pkg/.cache"]
"paths": ["db/migrations", "db/migrations/V1", "db/override", "manual", "out", "pkg/.cache", "pkg/com/example"]
},
"response": {
"entries": {
Expand All @@ -151,7 +152,8 @@
"db/override": {"role": "generated", "source": "shared", "icon": "generated", "color": "#9f7aea", "bgColor": "#9f7aea", "tintText": false, "tag": "generated", "excluded": false, "readOnlyHint": true},
"manual": {"role": "sources", "source": "user", "icon": "sources", "color": "#4e8df5", "bgColor": "#4e8df5", "tintText": false, "tag": "sources", "excluded": false, "readOnlyHint": false, "autoFallbackRole": "excluded"},
"out": {"role": "excluded", "source": "plugin", "pluginId": "com.example.a", "icon": "excluded", "color": "#ff0000", "bgColor": "#ff0000", "tintText": false, "tag": "excluded", "excluded": true, "readOnlyHint": false},
"pkg/.cache": {"role": "plugin.cache", "source": "glob", "pluginId": "com.example.a", "icon": "archive", "color": "#64748b", "tintText": false, "excluded": true, "readOnlyHint": false}
"pkg/.cache": {"role": "plugin.cache", "source": "glob", "pluginId": "com.example.a", "icon": "archive", "color": "#64748b", "tintText": false, "excluded": true, "readOnlyHint": false},
"pkg/com/example": {"role": "package", "source": "plugin", "pluginId": "com.example.a", "icon": "package", "tintText": false, "excluded": false, "readOnlyHint": false}
},
"manualExcludedDirectories": ["out", "pkg/.cache"]
}
Expand Down
4 changes: 2 additions & 2 deletions shared/plugins/contract/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5419,8 +5419,8 @@ at most 64 bytes; `tag` is at most 24 bytes; `icon` is one of `folder`,
A mark has a unique workspace-relative `path`: nonempty, at most 1024 bytes,
`/`-separated, without a leading or trailing `/`, an empty, `.` or `..`
segment, `\`, `:` or a control character. Its `role` is `plain`, `sources`,
`tests`, `resources`, `testResources`, `generated`, `excluded` or a `plugin.*`
ID, which may name a type another plugin registers; a mark whose type no live
`tests`, `resources`, `testResources`, `generated`, `excluded`, `package` or a
`plugin.*` ID, which may name a type another plugin registers; a mark whose type no live
session registered displays as a plain folder. `color` is optional `#rrggbb`.

The host merges every live registration below the user's own marks, colors and
Expand Down
2 changes: 2 additions & 0 deletions shared/plugins/reference/protocol-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| [#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#一个仓库发布多个插件)。 |
| [#250](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/250)(待合入) | [@devin-ai-integration[bot]](https://github.com/apps/devin-ai-integration) | API-05 | `pluginAPIVersion` 0 / `litheFunctions` 0 内的修正 | `workspace/setDirectoryMarks` 接受解析器已有的内建 `package` 角色,项目树按包目录图标呈现;`workspace/setDirectoryTypes`、权限、数量上限、合并优先级和所有版本不变。四种官方 SDK 已以通用 JSON 参数暴露该方法,本 PR 无 SDK 类型或版本变化;旧 Core 会以参数无效拒绝包含 `package` 的整组标记,插件应按能力/错误降级。 |
| [#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)。 |

## 按协议查首次出现
Expand Down Expand Up @@ -119,6 +120,7 @@
| API-05 | `workspace/getFolders` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) |
| API-05 | `workspace/setDirectoryTypes` | 0 | 2026-11-27 | [#215](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/215) |
| API-05 | `workspace/setDirectoryMarks` | 0 | 2026-11-27 | [#215](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/215) |
| API-05 | `workspace/setDirectoryMarks` | 0(接受内建 `package` role) | 待合入 | [#250](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/250) |
| API-06 | `workspace/readDirectory` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) |
| API-06 | `workspace/readDirectory` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) |
| API-06 | `workspace/stat` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) |
Expand Down
Loading