xrkh-better-sidebar 0.18.2 → 0.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +15 -6
  3. package/README_EN.md +16 -7
  4. package/lib/client-editor.js +400 -370
  5. package/lib/client-mermaid.js +977 -956
  6. package/lib/client-registry.js +465 -440
  7. package/lib/client-terminal.js +208 -208
  8. package/lib/client.js +465 -440
  9. package/lib/index.js +2 -1
  10. package/lib/types/client/EditorHost.d.ts +1 -1
  11. package/lib/types/client/FileTree.d.ts +1 -1
  12. package/lib/types/client/TreePanel.d.ts +1 -1
  13. package/lib/types/client/conversation-draft.d.ts +16 -3
  14. package/lib/types/client/service.d.ts +1 -1
  15. package/lib/types/context-types.d.ts +5 -0
  16. package/package.json +157 -155
  17. package/src/client/EditorHost.tsx +1 -1
  18. package/src/client/FileTree.tsx +9 -3
  19. package/src/client/SideCardSection.tsx +6 -6
  20. package/src/client/Sidebar.tsx +6 -11
  21. package/src/client/SubagentView.tsx +891 -891
  22. package/src/client/TreePanel.tsx +1 -1
  23. package/src/client/conversation-draft.ts +40 -4
  24. package/src/client/index.tsx +3 -1
  25. package/src/client/locales-ar.ts +382 -382
  26. package/src/client/locales-de.ts +367 -367
  27. package/src/client/locales-fr.ts +374 -374
  28. package/src/client/locales-hi.ts +381 -381
  29. package/src/client/locales-id.ts +379 -379
  30. package/src/client/locales-it.ts +372 -372
  31. package/src/client/locales-ja.ts +381 -381
  32. package/src/client/locales-ko.ts +373 -373
  33. package/src/client/locales-nl.ts +379 -379
  34. package/src/client/locales-pl.ts +383 -383
  35. package/src/client/locales-pt.ts +364 -364
  36. package/src/client/locales-ru.ts +379 -379
  37. package/src/client/locales-sv.ts +364 -364
  38. package/src/client/locales-th.ts +381 -381
  39. package/src/client/locales-tr.ts +381 -381
  40. package/src/client/locales-vi.ts +381 -381
  41. package/src/client/locales-zh-HK.ts +396 -396
  42. package/src/client/locales-zh-MO.ts +396 -396
  43. package/src/client/locales-zh-TW.ts +396 -396
  44. package/src/client/locales.ts +881 -881
  45. package/src/client/media-previews.tsx +113 -113
  46. package/src/client/service.ts +874 -874
  47. package/src/client/sidebar.module.css +51 -51
  48. package/src/context-types.ts +5 -0
  49. package/src/harness-type-shims.d.ts +28 -28
  50. package/src/index.ts +2 -1
  51. package/src/subagent-catalog.ts +38 -38
package/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 xrkseek
4
- Copyright (c) 2026 dsh-external
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 xrkseek
4
+ Copyright (c) 2026 dsh-external
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -3,14 +3,14 @@
3
3
  > **读者**:XRK-Harness 终端用户 · 集成者
4
4
 
5
5
  XRK-Harness(`xrkh`)标准侧边栏插件:资源管理器 · 编辑器 · 终端 · Git · 浏览器等工作台,按会话隔离。
6
- Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。
6
+ Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。`src/index.ts` 的 Cordis host 半包仅供非 XRKH 的 Cordis profile;**不要**在 XRKH 上再挂 host 抢同一前缀。
7
7
 
8
8
  ## 安装
9
9
 
10
- 前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.2.3**。推荐从 **npmjs** 安装:
10
+ 前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.3.4**。推荐从 **npmjs** 安装:
11
11
 
12
12
  ```bash
13
- xrkh plugin add xrkh-better-sidebar@0.18.1
13
+ xrkh plugin add xrkh-better-sidebar@0.18.3
14
14
  xrkh restart
15
15
  ```
16
16
 
@@ -18,14 +18,23 @@ xrkh restart
18
18
 
19
19
  源码路径仍可用(非推荐):`git clone git@github.com:xrkseek/xrkh-better-sidebar.git` 后 `xrkh plugin add ./xrkh-better-sidebar`。
20
20
 
21
+ ## 0.18.3
22
+
23
+ - Client fiber 注入 `layout`(与 `ui-sidebar` 同序):等 `ui-layout` 声明中心栏后再挂侧栏拦截,避免 Host ≥0.3.4 上 `conversation` slot 竞态
24
+ - `xrk.client.inject` 补 `@xrkseek/client-ui-layout`;文档 Host 基线改为 **≥ 0.3.4**
25
+
26
+ ## 0.18.2
27
+
28
+ - Files 主页签随 locale;轻量媒体预览;默认打开侧栏
29
+
21
30
  ## 0.18.1
22
31
 
23
32
  - `subagents.live`:兼容嵌套 `tool` 与旧版扁平 `tool` wire,避免子代理活动预览崩溃
24
- - 与 Host **0.2.3** 原生 `/sidebar/*`(嵌套 live 形状)对齐
33
+ - 与 Host 原生 `/sidebar/*`(嵌套 live 形状)对齐
25
34
 
26
35
  ## 0.18.0
27
36
 
28
- - XRKH 原生:去掉 DSH 双轨(`dsh` manifest · better-locale · DSH 安装脚本 · 市场目录)
37
+ - XRKH 原生:去掉第三方双轨(旧 manifest · better-locale · 旧安装脚本 · 市场目录)
29
38
  - peer 仅 `@xrkseek/*` + React;工具类型走 `@xrkseek/xrk-tools` / `xrk-settings`
30
39
  - 无 Side Chat;子代理走 Host Face + `subagents.live` / `jobs.*`
31
40
  - 空 curated 插件目录(社区扩展不随包捆绑)
@@ -37,7 +46,7 @@ xrkh restart
37
46
  | npm | `xrkh-better-sidebar` |
38
47
  | 仓库 | `xrkseek/xrkh-better-sidebar` |
39
48
  | 形态 | **仅 client 半包**(`package.json` → `xrk.client` → `lib/client.js`) |
40
- | 注入 | `@xrkseek/client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-conversation` · `client-modules` |
49
+ | 注入 | `client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-layout` · `client-ui-conversation` · `client-modules` |
41
50
  | Host | **产品 Host 拥有** `/sidebar/api` · `/sidebar/file|upload|html|bundle` · `/sidebar/ws/terminal` 等;本包不在 XRK 上挂 Cordis host 半包抢同一前缀 |
42
51
  | 子代理 / 任务 | 走 Host Face + `/sidebar/api` 的 `subagents.live` · `jobs.*`(勿再实现 Side Chat) |
43
52
 
package/README_EN.md CHANGED
@@ -3,14 +3,14 @@
3
3
  > **Audience**: XRK-Harness end users · integrators
4
4
 
5
5
  Standard sidebar plugin for XRK-Harness (`xrkh`): explorer · editor · terminal · git · browser, isolated per session.
6
- Host mounts `/sidebar/*` natively (`createSidebarPublicHandler`); this package ships the **client** half.
6
+ Host mounts `/sidebar/*` natively (`createSidebarPublicHandler`); this package ships the **client** half. The Cordis host half in `src/index.ts` is only for non-XRKH Cordis profiles — **do not** mount it on XRKH against the same `/sidebar/*` prefix.
7
7
 
8
8
  ## Install
9
9
 
10
- Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.2.3**. Install from **npmjs**:
10
+ Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.3.4**. Install from **npmjs**:
11
11
 
12
12
  ```bash
13
- xrkh plugin add xrkh-better-sidebar@0.18.1
13
+ xrkh plugin add xrkh-better-sidebar@0.18.3
14
14
  xrkh restart
15
15
  ```
16
16
 
@@ -18,14 +18,23 @@ Hard-refresh the browser after install (Ctrl+Shift+R).
18
18
 
19
19
  Source path still works (not preferred): `git clone git@github.com:xrkseek/xrkh-better-sidebar.git` then `xrkh plugin add ./xrkh-better-sidebar`.
20
20
 
21
+ ## 0.18.3
22
+
23
+ - Client fiber injects `layout` (same order as `ui-sidebar`): wait until `ui-layout` declares the center column before sidebar interception — avoids a `conversation` slot race on Host ≥ 0.3.4
24
+ - `xrk.client.inject` adds `@xrkseek/client-ui-layout`; docs Host baseline **≥ 0.3.4**
25
+
26
+ ## 0.18.2
27
+
28
+ - Files home tab follows locale; light media viewers; open by default
29
+
21
30
  ## 0.18.1
22
31
 
23
32
  - `subagents.live`: accept nested `tool` and legacy flat `tool` wire so subagent activity previews do not crash
24
- - Align with Host **0.2.3** native `/sidebar/*` (nested live shape)
33
+ - Align with Host native `/sidebar/*` (nested live shape)
25
34
 
26
35
  ## 0.18.0
27
36
 
28
- - XRKH-native: drop DSH dual-track (`dsh` manifest · better-locale · DSH install scripts · marketplace catalogs)
37
+ - XRKH-native: drop third-party dual-track (legacy manifest · better-locale · legacy install scripts · marketplace catalogs)
29
38
  - Peers are `@xrkseek/*` + React only; tools/settings types via `@xrkseek/xrk-tools` / `xrk-settings`
30
39
  - No Side Chat; subagents use Host Face + `subagents.live` / `jobs.*`
31
40
  - Empty curated plugin catalogs (community entries are not bundled)
@@ -37,8 +46,8 @@ Source path still works (not preferred): `git clone git@github.com:xrkseek/xrkh-
37
46
  | npm | `xrkh-better-sidebar` |
38
47
  | Repo | `xrkseek/xrkh-better-sidebar` |
39
48
  | Manifest | `package.json` → `xrk.client` (client half) |
40
- | Inject | `@xrkseek/client-*` (runtime, locale, slots, conversation, modules) |
41
- | Host | Native Host: `/sidebar/api` · `/sidebar/bundle` · PTY |
49
+ | Inject | `client-runtime` · `locale` · `ui-slots` · `ui-layout` · `ui-conversation` · `modules` |
50
+ | Host | Native Host owns `/sidebar/api` · `/sidebar/bundle` · PTY — do not remount Cordis host half on XRKH |
42
51
 
43
52
  ## Develop
44
53