xrkh-better-sidebar 0.18.26 → 0.18.27

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 (156) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +125 -119
  3. package/README_EN.md +122 -116
  4. package/lib/client-editor.js +213 -208
  5. package/lib/client-mermaid.js +211 -206
  6. package/lib/client-registry.js +704 -523
  7. package/lib/client-terminal.js +212 -207
  8. package/lib/client.js +704 -523
  9. package/lib/types/client/intercept.d.ts +7 -2
  10. package/lib/types/client/locales.d.ts +2 -0
  11. package/lib/types/client/produced-files.d.ts +54 -10
  12. package/package.json +190 -190
  13. package/scripts/install-xrkh.ps1 +15 -15
  14. package/scripts/install-xrkh.sh +12 -12
  15. package/src/agent-opens.ts +265 -265
  16. package/src/agent-pty.ts +527 -527
  17. package/src/browser-probe.ts +26 -26
  18. package/src/bundle-route.ts +129 -129
  19. package/src/client/BrowserView.tsx +298 -298
  20. package/src/client/DiffTab.tsx +115 -115
  21. package/src/client/EditorHost.tsx +563 -563
  22. package/src/client/FenceErrorNotice.tsx +40 -40
  23. package/src/client/FileTree.tsx +707 -707
  24. package/src/client/FreeWindow.tsx +337 -337
  25. package/src/client/MarkdownHtml.tsx +296 -296
  26. package/src/client/OrphanedTab.tsx +27 -27
  27. package/src/client/PdfView.tsx +110 -110
  28. package/src/client/RenderBoundary.tsx +49 -49
  29. package/src/client/SandboxStatusBar.tsx +60 -60
  30. package/src/client/SideCardSection.module.css +960 -960
  31. package/src/client/SideCardSection.tsx +1117 -1117
  32. package/src/client/Sidebar.tsx +1802 -1802
  33. package/src/client/SubagentView.module.css +547 -547
  34. package/src/client/SubagentView.tsx +894 -894
  35. package/src/client/TabBar.tsx +365 -365
  36. package/src/client/TerminalView.tsx +531 -531
  37. package/src/client/TextEditor.tsx +485 -485
  38. package/src/client/TreePanel.tsx +279 -279
  39. package/src/client/UploadOverlay.tsx +62 -62
  40. package/src/client/add-plugin-modal.tsx +199 -199
  41. package/src/client/api.ts +364 -364
  42. package/src/client/binary-download.tsx +23 -23
  43. package/src/client/breakpoints.ts +61 -61
  44. package/src/client/browser.ts +167 -167
  45. package/src/client/builtins/index.ts +37 -37
  46. package/src/client/builtins/tabs.tsx +346 -346
  47. package/src/client/builtins/viewers.tsx +151 -151
  48. package/src/client/changes/ChangesTab.tsx +204 -204
  49. package/src/client/changes/DiffPane.tsx +313 -313
  50. package/src/client/changes/GitLens.tsx +734 -734
  51. package/src/client/changes/SessionLens.tsx +102 -102
  52. package/src/client/changes/changes.module.css +399 -399
  53. package/src/client/changes/ops.ts +230 -230
  54. package/src/client/chunk-loader.ts +350 -350
  55. package/src/client/chunks/editor.tsx +9 -9
  56. package/src/client/chunks/mermaid.tsx +10 -10
  57. package/src/client/chunks/terminal.tsx +9 -9
  58. package/src/client/cm-themes.ts +129 -129
  59. package/src/client/conversation-draft.ts +65 -65
  60. package/src/client/css-modules.d.ts +5 -5
  61. package/src/client/desktop-env.ts +72 -72
  62. package/src/client/diff/DiffFiles.tsx +122 -122
  63. package/src/client/diff/DiffRows.tsx +271 -271
  64. package/src/client/diff/diff.module.css +86 -86
  65. package/src/client/diff/highlight.ts +383 -383
  66. package/src/client/diff/rows.ts +473 -473
  67. package/src/client/editor-load.ts +92 -92
  68. package/src/client/frame-batcher.ts +56 -56
  69. package/src/client/icons.tsx +175 -175
  70. package/src/client/image-types.ts +8 -8
  71. package/src/client/ime-guard.ts +47 -47
  72. package/src/client/index.tsx +390 -390
  73. package/src/client/intercept.tsx +215 -172
  74. package/src/client/lang.ts +225 -225
  75. package/src/client/layout-push.ts +40 -40
  76. package/src/client/layout.css +105 -105
  77. package/src/client/lazy-chunk.tsx +89 -89
  78. package/src/client/link-intercept.ts +73 -73
  79. package/src/client/locales-ar.ts +382 -382
  80. package/src/client/locales-de.ts +367 -367
  81. package/src/client/locales-fr.ts +374 -374
  82. package/src/client/locales-hi.ts +381 -381
  83. package/src/client/locales-id.ts +379 -379
  84. package/src/client/locales-it.ts +372 -372
  85. package/src/client/locales-ja.ts +381 -381
  86. package/src/client/locales-ko.ts +373 -373
  87. package/src/client/locales-nl.ts +379 -379
  88. package/src/client/locales-pl.ts +383 -383
  89. package/src/client/locales-pt.ts +364 -364
  90. package/src/client/locales-ru.ts +379 -379
  91. package/src/client/locales-sv.ts +364 -364
  92. package/src/client/locales-th.ts +381 -381
  93. package/src/client/locales-tr.ts +381 -381
  94. package/src/client/locales-vi.ts +381 -381
  95. package/src/client/locales-zh-HK.ts +396 -396
  96. package/src/client/locales-zh-MO.ts +396 -396
  97. package/src/client/locales-zh-TW.ts +396 -396
  98. package/src/client/locales.ts +885 -881
  99. package/src/client/markdown-html.ts +331 -331
  100. package/src/client/markdown-images.ts +137 -137
  101. package/src/client/markdown-labels.tsx +22 -22
  102. package/src/client/md-toc.tsx +127 -127
  103. package/src/client/mermaid-blocks.ts +110 -110
  104. package/src/client/mermaid-sanitize.ts +93 -93
  105. package/src/client/mermaid.tsx +406 -406
  106. package/src/client/open-when-sized.ts +43 -43
  107. package/src/client/open-with-settings.tsx +135 -135
  108. package/src/client/open-with.ts +221 -221
  109. package/src/client/openpath-intercept.ts +79 -79
  110. package/src/client/paths.ts +72 -72
  111. package/src/client/pdf-types.ts +4 -4
  112. package/src/client/pinned.ts +184 -184
  113. package/src/client/plugin-settings.ts +43 -43
  114. package/src/client/plugins-shared.ts +22 -22
  115. package/src/client/plugins-tabs.ts +7 -7
  116. package/src/client/plugins-viewers.ts +7 -7
  117. package/src/client/prefs.ts +219 -219
  118. package/src/client/produced-files.ts +258 -120
  119. package/src/client/selection-payload.ts +86 -86
  120. package/src/client/settings-nav-icon.ts +45 -45
  121. package/src/client/shell-presets.ts +83 -83
  122. package/src/client/sidebar.module.css +2624 -2615
  123. package/src/client/split-pane.tsx +333 -333
  124. package/src/client/state.ts +1704 -1704
  125. package/src/client/subagent-detect.ts +137 -137
  126. package/src/client/subagent-jobs.ts +203 -203
  127. package/src/client/tab-content-memo.ts +55 -55
  128. package/src/client/terminal-font.ts +224 -224
  129. package/src/client/terminal-links.ts +194 -194
  130. package/src/client/terminal-paint.ts +16 -16
  131. package/src/client/theme.ts +110 -110
  132. package/src/client/titlebar-strip.ts +52 -52
  133. package/src/client/upload.ts +187 -187
  134. package/src/client/wco.ts +120 -120
  135. package/src/config.ts +157 -157
  136. package/src/context-types.ts +577 -577
  137. package/src/fs-operations.ts +97 -97
  138. package/src/fs-search.ts +113 -113
  139. package/src/fs-tree.ts +158 -158
  140. package/src/git.ts +446 -446
  141. package/src/html-route.ts +106 -106
  142. package/src/identity.ts +13 -13
  143. package/src/index.ts +1340 -1340
  144. package/src/invariant.ts +32 -32
  145. package/src/jobs-routes.ts +257 -257
  146. package/src/open-external.ts +89 -89
  147. package/src/path-security.ts +81 -81
  148. package/src/prefs-shared.ts +313 -313
  149. package/src/pty-deps.ts +226 -226
  150. package/src/pty-manager.ts +376 -376
  151. package/src/side-label.ts +10 -10
  152. package/src/subagent-activity.ts +120 -120
  153. package/src/subagent-live-route.ts +93 -93
  154. package/src/tools.ts +482 -482
  155. package/src/trust-fence.ts +84 -84
  156. package/src/wire.ts +99 -99
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
@@ -1,119 +1,125 @@
1
- # xrkh-better-sidebar
2
-
3
- > **读者**:XRK-Harness 终端用户 · 集成者
4
-
5
- XRK-Harness(`xrkh`)标准侧边栏插件:资源管理器 · 编辑器 · 终端 · Git · 浏览器等工作台,按会话隔离。
6
- Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。`src/index.ts` 的 Cordis host 半包仅供非 XRKH 的 Cordis profile;**不要**在 XRKH 上再挂 host 抢同一前缀。
7
-
8
- ## 安装
9
-
10
- 前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.3.4**。推荐从 **npmjs** 安装:
11
-
12
- ```bash
13
- xrkh plugin add xrkh-better-sidebar@0.18.26
14
- xrkh restart
15
- ```
16
-
17
- 装完硬刷新浏览器(Ctrl+Shift+R)。
18
-
19
- 源码路径仍可用(非推荐):`git clone git@github.com:xrkseek/xrkh-better-sidebar.git` 后 `xrkh plugin add ./xrkh-better-sidebar`。
20
-
21
- ## 0.18.26
22
-
23
- - 终端:挂起唤醒后画布空白时 fit/refresh;网格仍死则 remount 并重挂 PTY;关闭 `allowTransparency` 减轻 GPU 挂起后整页空白
24
- - Desktop:忽略塌缩的 `visualViewport` 当键盘 inset(避免布局推挤空白条与 `overflow: clip` 裁切面板)
25
- - 偏好默认与 Host 对齐:`openByDefault` / `bottomPanelAutoTerminal` 默认关
26
- - 布局:双写 `data-xrkh-sidebar-*` 与 `--xrkh-workbench-*`;存储键 `xrkh-sidebar:v1`(迁移旧 `dsh-sidebar:v1`)
27
-
28
- ## 0.18.21
29
-
30
- - `openTab({ type: 'editor' })` 固定落到侧栏分栏(`splits`),不因 `activePane` 在底栏而撑开底部面板(避免聊天开文件先出空白底栏 / 自动终端)
31
-
32
- ## 0.18.20
33
-
34
- - 拖拽分栏时合并 resize(一帧一次、跳过无变化),避免 Windows ConPTY 反复重打「版本」MOTD
35
- - Host 短暂不可用(5xx / 空 1006)时软重连更久,不把已绘出的 MOTD 盖上致命横幅
36
- - SSE 与 input/resize POST 不再共用 AbortController,关流时不误取消在途控制请求
37
- - 载波仍同 0.18.19:页面同源 `xrk-app://app`(池隔离归 Desktop/Face,不在本插件翻)
38
-
39
- ## 0.18.19
40
-
41
- - Desktop 终端:SSE/POST 回到页面同源 `xrk-app://app`(去掉会 `Failed to fetch` 的 `xrk-app://stream` 分裂与回退冗余)
42
-
43
- ## 0.18.18
44
-
45
- - 轨图标:面板展开时贴齐 34px 页签条(`+3`),收起时仍对齐会话标题行(`+14`),不再下偏
46
- - Desktop 终端:SSE 不再带 `Accept`;`stream` 主机打不开时曾回退 `app`(已由 0.18.19 去掉回退)
47
-
48
- ## 0.18.17
49
-
50
- - 右侧面板顶距改为单一 `top`(`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`),去掉 `padding-top` 叠 chrome,修复 Desktop 页签上方空带
51
-
52
- ## 0.18.14
53
-
54
- - `title-bar-compat`:`--dsh-title-bar-strip` 已含 Desktop chrome,不再叠加 `--xrk-desktop-chrome-height`(侧栏轨图标不再比标题栏矮一截)
55
- - toggle cluster:与会话标题行垂直对齐(`+14px` · `align-items: center`)
56
- - 启动期 panel/FAB 隐藏:去掉插件侧重复 CSS,统一由内核 `data-xrk-booting` 负责
57
-
58
- ## 0.18.12
59
-
60
- - 启动 splash(`data-xrk-booting`):隐藏 panel-host / FAB,避免与 HARNESS 启动页叠层
61
- - 会话头「Session log」:有 toggle cluster 时始终右缩,展开动画中不再被按钮挡住
62
- - 动效:主题 token 冷启动回退 380ms / cubic-bezier,展开收起不再僵硬跳切
63
- - Desktop chrome:右侧面板与 FAB 避开 `--xrk-desktop-chrome-height`
64
-
65
- ## 0.18.11
66
-
67
- - 文件页:`openTab({ type: 'editor' })` 聚焦已种子的 files-home,不再并排冒出第二个「文件」标签
68
- - `applyDedupe`:`dedupeKey` 返回 `undefined` 时仍按同 cohort 去重(与 pathless 编辑器一致)
69
- - 底栏首次展开:若已有 UI 终端则跳过自动再开一个
70
-
71
- ## 0.18.10
72
-
73
- - Desktop(`xrk-app://`):终端改走 Host HTTP SSE + POST(`/sidebar/api/pty/*`),不再对无 listen 的私有 Host 死循环 WebSocket 重连
74
- - 无边框窗口:右侧面板留 2px 边缘,便于 Electron 命中缩放
75
-
76
- ## 0.18.9
77
-
78
- - `openTab`:当前会话下任意打开(含仅 `type` 的 Files / +菜单)都会展开已折叠侧栏,调用方无需再自行 `togglePanel`
79
-
80
- ## 0.18.3
81
-
82
- - Client fiber 注入 `layout`(与 `ui-sidebar` 同序):等 `ui-layout` 声明中心栏后再挂侧栏拦截,避免 Host ≥0.3.4 上 `conversation` slot 竞态
83
- - `xrk.client.inject` 补 `@xrkseek/client-ui-layout`;文档 Host 基线改为 **≥ 0.3.4**
84
-
85
- ## 0.18.2
86
-
87
- - Files 主页签随 locale;轻量媒体预览;默认打开侧栏
88
-
89
- ## 0.18.1
90
-
91
- - `subagents.live`:兼容嵌套 `tool` 与旧版扁平 `tool` wire,避免子代理活动预览崩溃
92
- - 与 Host 原生 `/sidebar/*`(嵌套 live 形状)对齐
93
-
94
- ## 0.18.0
95
-
96
- - XRKH 原生:去掉第三方双轨(旧 manifest · better-locale · 旧安装脚本 · 市场目录)
97
- - peer 仅 `@xrkseek/*` + React;工具类型走 `@xrkseek/xrk-tools` / `xrk-settings`
98
- - 无 Side Chat;子代理走 Host Face + `subagents.live` / `jobs.*`
99
- - 空 curated 插件目录(社区扩展不随包捆绑)
100
-
101
- ## 契约
102
-
103
- | 项 | 说明 |
104
- |----|------|
105
- | npm | `xrkh-better-sidebar` |
106
- | 仓库 | `xrkseek/xrkh-better-sidebar` |
107
- | 形态 | **仅 client 半包**(`package.json` → `xrk.client` → `lib/client.js`) |
108
- | 注入 | `client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-layout` · `client-ui-conversation` · `client-modules` |
109
- | Host | **产品 Host 拥有** `/sidebar/api` · `/sidebar/file|upload|html|bundle` · `/sidebar/ws/terminal` 等;本包不在 XRK 上挂 Cordis host 半包抢同一前缀 |
110
- | 子代理 / 任务 | 走 Host Face + `/sidebar/api` 的 `subagents.live` · `jobs.*`(勿再实现 Side Chat) |
111
-
112
- 契约细则见 Harness 教科书 [community-plugins.md](https://github.com/xrkseek/XRK-harness/blob/main/docs/community-plugins.md)「侧栏插件契约」。
113
-
114
- ## 开发
115
-
116
- ```bash
117
- pnpm install
118
- pnpm bundle
119
- ```
1
+ # xrkh-better-sidebar
2
+
3
+ > **读者**:XRK-Harness 终端用户 · 集成者
4
+
5
+ XRK-Harness(`xrkh`)标准侧边栏插件:资源管理器 · 编辑器 · 终端 · Git · 浏览器等工作台,按会话隔离。
6
+ Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。`src/index.ts` 的 Cordis host 半包仅供非 XRKH 的 Cordis profile;**不要**在 XRKH 上再挂 host 抢同一前缀。
7
+
8
+ ## 安装
9
+
10
+ 前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.3.4**。推荐从 **npmjs** 安装:
11
+
12
+ ```bash
13
+ xrkh plugin add xrkh-better-sidebar@0.18.27
14
+ xrkh restart
15
+ ```
16
+
17
+ 装完硬刷新浏览器(Ctrl+Shift+R)。
18
+
19
+ 源码路径仍可用(非推荐):`git clone git@github.com:xrkseek/xrkh-better-sidebar.git` 后 `xrkh plugin add ./xrkh-better-sidebar`。
20
+
21
+ ## 0.18.27
22
+
23
+ - 对话尾部文件行:按「本次改动 / 本次删除 / 本次产出」三条 lane 渲染(此前只有一条「本次产出」,改动与删除被丢弃)
24
+ - 修复根因:接管 `conversation.chat.turnTail` 时只挑 `path`、丢掉 Turn 数据里的 `op`,等于把内核已有的 lane 压平;删除的 chip 置灰划线、不可点(文件已不存在)
25
+ - 无 `op` 的旧会话回落:`workspace/changes` 行数启发式(0 增有删 → 删除,0 删有增 → 产出,其余 → 改动)
26
+
27
+ ## 0.18.26
28
+
29
+ - 终端:挂起唤醒后画布空白时 fit/refresh;网格仍死则 remount 并重挂 PTY;关闭 `allowTransparency` 减轻 GPU 挂起后整页空白
30
+ - Desktop:忽略塌缩的 `visualViewport` 当键盘 inset(避免布局推挤空白条与 `overflow: clip` 裁切面板)
31
+ - 偏好默认与 Host 对齐:`openByDefault` / `bottomPanelAutoTerminal` 默认关
32
+ - 布局:双写 `data-xrkh-sidebar-*` 与 `--xrkh-workbench-*`;存储键 `xrkh-sidebar:v1`(迁移旧 `dsh-sidebar:v1`)
33
+
34
+ ## 0.18.21
35
+
36
+ - `openTab({ type: 'editor' })` 固定落到侧栏分栏(`splits`),不因 `activePane` 在底栏而撑开底部面板(避免聊天开文件先出空白底栏 / 自动终端)
37
+
38
+ ## 0.18.20
39
+
40
+ - 拖拽分栏时合并 resize(一帧一次、跳过无变化),避免 Windows ConPTY 反复重打「版本」MOTD
41
+ - Host 短暂不可用(5xx / 空 1006)时软重连更久,不把已绘出的 MOTD 盖上致命横幅
42
+ - SSE 与 input/resize POST 不再共用 AbortController,关流时不误取消在途控制请求
43
+ - 载波仍同 0.18.19:页面同源 `xrk-app://app`(池隔离归 Desktop/Face,不在本插件翻)
44
+
45
+ ## 0.18.19
46
+
47
+ - Desktop 终端:SSE/POST 回到页面同源 `xrk-app://app`(去掉会 `Failed to fetch` 的 `xrk-app://stream` 分裂与回退冗余)
48
+
49
+ ## 0.18.18
50
+
51
+ - 轨图标:面板展开时贴齐 34px 页签条(`+3`),收起时仍对齐会话标题行(`+14`),不再下偏
52
+ - Desktop 终端:SSE 不再带 `Accept`;`stream` 主机打不开时曾回退 `app`(已由 0.18.19 去掉回退)
53
+
54
+ ## 0.18.17
55
+
56
+ - 右侧面板顶距改为单一 `top`(`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`),去掉 `padding-top` 叠 chrome,修复 Desktop 页签上方空带
57
+
58
+ ## 0.18.14
59
+
60
+ - `title-bar-compat`:`--dsh-title-bar-strip` 已含 Desktop chrome,不再叠加 `--xrk-desktop-chrome-height`(侧栏轨图标不再比标题栏矮一截)
61
+ - toggle cluster:与会话标题行垂直对齐(`+14px` · `align-items: center`)
62
+ - 启动期 panel/FAB 隐藏:去掉插件侧重复 CSS,统一由内核 `data-xrk-booting` 负责
63
+
64
+ ## 0.18.12
65
+
66
+ - 启动 splash(`data-xrk-booting`):隐藏 panel-host / FAB,避免与 HARNESS 启动页叠层
67
+ - 会话头「Session log」:有 toggle cluster 时始终右缩,展开动画中不再被按钮挡住
68
+ - 动效:主题 token 冷启动回退 380ms / cubic-bezier,展开收起不再僵硬跳切
69
+ - Desktop chrome:右侧面板与 FAB 避开 `--xrk-desktop-chrome-height`
70
+
71
+ ## 0.18.11
72
+
73
+ - 文件页:`openTab({ type: 'editor' })` 聚焦已种子的 files-home,不再并排冒出第二个「文件」标签
74
+ - `applyDedupe`:`dedupeKey` 返回 `undefined` 时仍按同 cohort 去重(与 pathless 编辑器一致)
75
+ - 底栏首次展开:若已有 UI 终端则跳过自动再开一个
76
+
77
+ ## 0.18.10
78
+
79
+ - Desktop(`xrk-app://`):终端改走 Host HTTP SSE + POST(`/sidebar/api/pty/*`),不再对无 listen 的私有 Host 死循环 WebSocket 重连
80
+ - 无边框窗口:右侧面板留 2px 边缘,便于 Electron 命中缩放
81
+
82
+ ## 0.18.9
83
+
84
+ - `openTab`:当前会话下任意打开(含仅 `type` 的 Files / +菜单)都会展开已折叠侧栏,调用方无需再自行 `togglePanel`
85
+
86
+ ## 0.18.3
87
+
88
+ - Client fiber 注入 `layout`(与 `ui-sidebar` 同序):等 `ui-layout` 声明中心栏后再挂侧栏拦截,避免 Host ≥0.3.4 上 `conversation` slot 竞态
89
+ - `xrk.client.inject` 补 `@xrkseek/client-ui-layout`;文档 Host 基线改为 **≥ 0.3.4**
90
+
91
+ ## 0.18.2
92
+
93
+ - Files 主页签随 locale;轻量媒体预览;默认打开侧栏
94
+
95
+ ## 0.18.1
96
+
97
+ - `subagents.live`:兼容嵌套 `tool` 与旧版扁平 `tool` wire,避免子代理活动预览崩溃
98
+ - 与 Host 原生 `/sidebar/*`(嵌套 live 形状)对齐
99
+
100
+ ## 0.18.0
101
+
102
+ - XRKH 原生:去掉第三方双轨(旧 manifest · better-locale · 旧安装脚本 · 市场目录)
103
+ - peer 仅 `@xrkseek/*` + React;工具类型走 `@xrkseek/xrk-tools` / `xrk-settings`
104
+ - 无 Side Chat;子代理走 Host Face + `subagents.live` / `jobs.*`
105
+ - 空 curated 插件目录(社区扩展不随包捆绑)
106
+
107
+ ## 契约
108
+
109
+ | 项 | 说明 |
110
+ |----|------|
111
+ | npm | `xrkh-better-sidebar` |
112
+ | 仓库 | `xrkseek/xrkh-better-sidebar` |
113
+ | 形态 | **仅 client 半包**(`package.json` → `xrk.client` → `lib/client.js`) |
114
+ | 注入 | `client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-layout` · `client-ui-conversation` · `client-modules` |
115
+ | Host | **产品 Host 拥有** `/sidebar/api` · `/sidebar/file|upload|html|bundle` · `/sidebar/ws/terminal` 等;本包不在 XRK 上挂 Cordis host 半包抢同一前缀 |
116
+ | 子代理 / 任务 | 走 Host Face + `/sidebar/api` 的 `subagents.live` · `jobs.*`(勿再实现 Side Chat) |
117
+
118
+ 契约细则见 Harness 教科书 [community-plugins.md](https://github.com/xrkseek/XRK-harness/blob/main/docs/community-plugins.md)「侧栏插件契约」。
119
+
120
+ ## 开发
121
+
122
+ ```bash
123
+ pnpm install
124
+ pnpm bundle
125
+ ```
package/README_EN.md CHANGED
@@ -1,116 +1,122 @@
1
- # xrkh-better-sidebar
2
-
3
- > **Audience**: XRK-Harness end users · integrators
4
-
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. 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
-
8
- ## Install
9
-
10
- Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.3.4**. Install from **npmjs**:
11
-
12
- ```bash
13
- xrkh plugin add xrkh-better-sidebar@0.18.26
14
- xrkh restart
15
- ```
16
-
17
- Hard-refresh the browser after install (Ctrl+Shift+R).
18
-
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
-
21
- ## 0.18.26
22
-
23
- - Terminal: after OS sleep/wake, fit/refresh a blank xterm canvas; remount + reattach PTY if the grid stays dead; disable `allowTransparency` to reduce GPU-sleep blanking
24
- - Desktop: ignore collapsed `visualViewport` as a keyboard inset (stops a blank layout-push strip and panels clipped by `overflow: clip`)
25
- - Pref defaults match Host: `openByDefault` / `bottomPanelAutoTerminal` off
26
- - Layout: dual-write `data-xrkh-sidebar-*` and `--xrkh-workbench-*`; storage key `xrkh-sidebar:v1` (migrates legacy `dsh-sidebar:v1`)
27
-
28
- ## 0.18.21
29
-
30
- - `openTab({ type: 'editor' })` always lands on the side split tree (`splits`), never expands the bottom panel because `activePane` is a bottom leaf (chat file-open no longer opens a blank bottom pane / auto-terminal)
31
-
32
- ## 0.18.20
33
-
34
- - Coalesce split-drag resize to one frame / skip no-ops so Windows ConPTY does not reprint the version MOTD
35
- - Soft-reconnect longer on transient Host loss (5xx / empty 1006) instead of covering a painted MOTD with a fatal banner
36
- - Do not share AbortController between SSE and input/resize POST so tearing down the stream cannot cancel in-flight control
37
- - Carrier unchanged from 0.18.19: page-origin `xrk-app://app` (pool isolation belongs in Desktop/Face, not this plugin)
38
-
39
- ## 0.18.19
40
-
41
- - Desktop terminal: SSE/POST back on page-origin `xrk-app://app` (drop the `xrk-app://stream` split that failed with `Failed to fetch`)
42
-
43
- ## 0.18.18
44
-
45
- - Rail toggles: `+3` inside the open 34px tab strip; `+14` when collapsed (conversation title row) — no more bottom drift
46
- - Desktop terminal: omit SSE `Accept`; optional stream→app fallback (removed in 0.18.19)
47
-
48
- ## 0.18.17
49
-
50
- - Right panel top inset is a single `top` chain (`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`); drop stacked `padding-top` that left an empty band above Desktop tabs
51
-
52
- ## 0.18.14
53
-
54
- - `title-bar-compat`: `--dsh-title-bar-strip` already includes Desktop chrome — do not add `--xrk-desktop-chrome-height` again (rail toggles no longer sit a band lower than the tab icons)
55
- - Toggle cluster: vertical align with the conversation title row (`+14px` · `align-items: center`)
56
- - Boot-time panel/FAB hide: drop duplicate plugin CSS; kernel `data-xrk-booting` owns it
57
-
58
- ## 0.18.12
59
-
60
- - Boot splash (`data-xrk-booting`): hide panel-host / FABs so they do not stack on the HARNESS splash
61
- - Session-log capsule: always right-pad while the toggle cluster is mounted (including mid-open animation)
62
- - Motion: cold-theme fallbacks (380ms / cubic-bezier) so expand/collapse never jumps
63
- - Desktop chrome: right panel + FABs clear `--xrk-desktop-chrome-height`
64
-
65
- ## 0.18.11
66
-
67
- - Files tab: `openTab({ type: 'editor' })` focuses the seeded files-home instead of minting a twin Files tab
68
- - `applyDedupe`: still dedupes when `dedupeKey` returns `undefined` (pathless editor cohort)
69
- - Bottom-panel first expand: skip auto-terminal when a UI terminal already exists
70
-
71
- ## 0.18.10
72
-
73
- - Desktop (`xrk-app://`): terminal rides Host HTTP SSE + POST (`/sidebar/api/pty/*`) instead of looping WebSocket reconnects against a non-listening private Host
74
- - Frameless window: right panel leaves a 2px edge so Electron can hit-test resize
75
-
76
- ## 0.18.9
77
-
78
- - `openTab`: any open on the active session (including type-only Files / +menu) expands a collapsed side card — callers no longer need a separate `togglePanel`
79
-
80
- ## 0.18.3
81
-
82
- - 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
83
- - `xrk.client.inject` adds `@xrkseek/client-ui-layout`; docs Host baseline **≥ 0.3.4**
84
-
85
- ## 0.18.2
86
-
87
- - Files home tab follows locale; light media viewers; open by default
88
-
89
- ## 0.18.1
90
-
91
- - `subagents.live`: accept nested `tool` and legacy flat `tool` wire so subagent activity previews do not crash
92
- - Align with Host native `/sidebar/*` (nested live shape)
93
-
94
- ## 0.18.0
95
-
96
- - XRKH-native: drop third-party dual-track (legacy manifest · better-locale · legacy install scripts · marketplace catalogs)
97
- - Peers are `@xrkseek/*` + React only; tools/settings types via `@xrkseek/xrk-tools` / `xrk-settings`
98
- - No Side Chat; subagents use Host Face + `subagents.live` / `jobs.*`
99
- - Empty curated plugin catalogs (community entries are not bundled)
100
-
101
- ## Contract
102
-
103
- | Item | Notes |
104
- |------|--------|
105
- | npm | `xrkh-better-sidebar` |
106
- | Repo | `xrkseek/xrkh-better-sidebar` |
107
- | Manifest | `package.json` → `xrk.client` (client half) |
108
- | Inject | `client-runtime` · `locale` · `ui-slots` · `ui-layout` · `ui-conversation` · `modules` |
109
- | Host | Native Host owns `/sidebar/api` · `/sidebar/bundle` · PTY — do not remount Cordis host half on XRKH |
110
-
111
- ## Develop
112
-
113
- ```bash
114
- pnpm install
115
- pnpm bundle
116
- ```
1
+ # xrkh-better-sidebar
2
+
3
+ > **Audience**: XRK-Harness end users · integrators
4
+
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. 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
+
8
+ ## Install
9
+
10
+ Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.3.4**. Install from **npmjs**:
11
+
12
+ ```bash
13
+ xrkh plugin add xrkh-better-sidebar@0.18.27
14
+ xrkh restart
15
+ ```
16
+
17
+ Hard-refresh the browser after install (Ctrl+Shift+R).
18
+
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
+
21
+ ## 0.18.27
22
+
23
+ - Conversation tail file rows: render three lanes (modified / deleted / created); before, one flat "Produced" row swallowed edits and deletions
24
+ - Root cause: the `conversation.chat.turnTail` takeover kept only `path` and dropped the Turn data's `op`, flattening the host's existing lanes; deleted chips render struck through and inert (the file is gone)
25
+ - Sessions without `op` fall back to the `workspace/changes` line-count heuristic (0 added + deletes → deleted, 0 deleted + adds → created, else modified)
26
+
27
+ ## 0.18.26
28
+
29
+ - Terminal: after OS sleep/wake, fit/refresh a blank xterm canvas; remount + reattach PTY if the grid stays dead; disable `allowTransparency` to reduce GPU-sleep blanking
30
+ - Desktop: ignore collapsed `visualViewport` as a keyboard inset (stops a blank layout-push strip and panels clipped by `overflow: clip`)
31
+ - Pref defaults match Host: `openByDefault` / `bottomPanelAutoTerminal` off
32
+ - Layout: dual-write `data-xrkh-sidebar-*` and `--xrkh-workbench-*`; storage key `xrkh-sidebar:v1` (migrates legacy `dsh-sidebar:v1`)
33
+
34
+ ## 0.18.21
35
+
36
+ - `openTab({ type: 'editor' })` always lands on the side split tree (`splits`), never expands the bottom panel because `activePane` is a bottom leaf (chat file-open no longer opens a blank bottom pane / auto-terminal)
37
+
38
+ ## 0.18.20
39
+
40
+ - Coalesce split-drag resize to one frame / skip no-ops so Windows ConPTY does not reprint the version MOTD
41
+ - Soft-reconnect longer on transient Host loss (5xx / empty 1006) instead of covering a painted MOTD with a fatal banner
42
+ - Do not share AbortController between SSE and input/resize POST so tearing down the stream cannot cancel in-flight control
43
+ - Carrier unchanged from 0.18.19: page-origin `xrk-app://app` (pool isolation belongs in Desktop/Face, not this plugin)
44
+
45
+ ## 0.18.19
46
+
47
+ - Desktop terminal: SSE/POST back on page-origin `xrk-app://app` (drop the `xrk-app://stream` split that failed with `Failed to fetch`)
48
+
49
+ ## 0.18.18
50
+
51
+ - Rail toggles: `+3` inside the open 34px tab strip; `+14` when collapsed (conversation title row) — no more bottom drift
52
+ - Desktop terminal: omit SSE `Accept`; optional stream→app fallback (removed in 0.18.19)
53
+
54
+ ## 0.18.17
55
+
56
+ - Right panel top inset is a single `top` chain (`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`); drop stacked `padding-top` that left an empty band above Desktop tabs
57
+
58
+ ## 0.18.14
59
+
60
+ - `title-bar-compat`: `--dsh-title-bar-strip` already includes Desktop chrome — do not add `--xrk-desktop-chrome-height` again (rail toggles no longer sit a band lower than the tab icons)
61
+ - Toggle cluster: vertical align with the conversation title row (`+14px` · `align-items: center`)
62
+ - Boot-time panel/FAB hide: drop duplicate plugin CSS; kernel `data-xrk-booting` owns it
63
+
64
+ ## 0.18.12
65
+
66
+ - Boot splash (`data-xrk-booting`): hide panel-host / FABs so they do not stack on the HARNESS splash
67
+ - Session-log capsule: always right-pad while the toggle cluster is mounted (including mid-open animation)
68
+ - Motion: cold-theme fallbacks (380ms / cubic-bezier) so expand/collapse never jumps
69
+ - Desktop chrome: right panel + FABs clear `--xrk-desktop-chrome-height`
70
+
71
+ ## 0.18.11
72
+
73
+ - Files tab: `openTab({ type: 'editor' })` focuses the seeded files-home instead of minting a twin Files tab
74
+ - `applyDedupe`: still dedupes when `dedupeKey` returns `undefined` (pathless editor cohort)
75
+ - Bottom-panel first expand: skip auto-terminal when a UI terminal already exists
76
+
77
+ ## 0.18.10
78
+
79
+ - Desktop (`xrk-app://`): terminal rides Host HTTP SSE + POST (`/sidebar/api/pty/*`) instead of looping WebSocket reconnects against a non-listening private Host
80
+ - Frameless window: right panel leaves a 2px edge so Electron can hit-test resize
81
+
82
+ ## 0.18.9
83
+
84
+ - `openTab`: any open on the active session (including type-only Files / +menu) expands a collapsed side card — callers no longer need a separate `togglePanel`
85
+
86
+ ## 0.18.3
87
+
88
+ - 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
89
+ - `xrk.client.inject` adds `@xrkseek/client-ui-layout`; docs Host baseline **≥ 0.3.4**
90
+
91
+ ## 0.18.2
92
+
93
+ - Files home tab follows locale; light media viewers; open by default
94
+
95
+ ## 0.18.1
96
+
97
+ - `subagents.live`: accept nested `tool` and legacy flat `tool` wire so subagent activity previews do not crash
98
+ - Align with Host native `/sidebar/*` (nested live shape)
99
+
100
+ ## 0.18.0
101
+
102
+ - XRKH-native: drop third-party dual-track (legacy manifest · better-locale · legacy install scripts · marketplace catalogs)
103
+ - Peers are `@xrkseek/*` + React only; tools/settings types via `@xrkseek/xrk-tools` / `xrk-settings`
104
+ - No Side Chat; subagents use Host Face + `subagents.live` / `jobs.*`
105
+ - Empty curated plugin catalogs (community entries are not bundled)
106
+
107
+ ## Contract
108
+
109
+ | Item | Notes |
110
+ |------|--------|
111
+ | npm | `xrkh-better-sidebar` |
112
+ | Repo | `xrkseek/xrkh-better-sidebar` |
113
+ | Manifest | `package.json` → `xrk.client` (client half) |
114
+ | Inject | `client-runtime` · `locale` · `ui-slots` · `ui-layout` · `ui-conversation` · `modules` |
115
+ | Host | Native Host owns `/sidebar/api` · `/sidebar/bundle` · PTY — do not remount Cordis host half on XRKH |
116
+
117
+ ## Develop
118
+
119
+ ```bash
120
+ pnpm install
121
+ pnpm bundle
122
+ ```