xrkh-better-sidebar 0.17.7 → 0.18.0
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.
- package/README.md +20 -3
- package/README_EN.md +15 -1
- package/cordis.patch.yml +5 -46
- package/lib/client-editor.js +7725 -480
- package/lib/client-mermaid.js +8785 -1525
- package/lib/client-registry.js +4278 -3468
- package/lib/client-terminal.js +7583 -336
- package/lib/client.js +4272 -3462
- package/lib/index.js +105 -597
- package/lib/invariant.js +2 -2
- package/lib/types/client/FenceErrorNotice.d.ts +5 -0
- package/lib/types/client/FileTree.d.ts +3 -0
- package/lib/types/client/SideCardSection.d.ts +1 -1
- package/lib/types/client/TerminalView.d.ts +1 -0
- package/lib/types/client/TreePanel.d.ts +3 -0
- package/lib/types/client/api.d.ts +19 -21
- package/lib/types/client/changes/ChangesTab.d.ts +5 -0
- package/lib/types/client/changes/DiffPane.d.ts +26 -0
- package/lib/types/client/changes/GitLens.d.ts +15 -0
- package/lib/types/client/changes/SessionLens.d.ts +13 -0
- package/lib/types/client/changes/ops.d.ts +69 -0
- package/lib/types/client/chunk-loader.d.ts +20 -27
- package/lib/types/client/chunks/editor.d.ts +2 -2
- package/lib/types/client/chunks/terminal.d.ts +2 -2
- package/lib/types/client/diff/DiffFiles.d.ts +8 -0
- package/lib/types/client/diff/DiffRows.d.ts +20 -0
- package/lib/types/client/diff/highlight.d.ts +38 -0
- package/lib/types/client/diff/rows.d.ts +160 -0
- package/lib/types/client/icons.d.ts +7 -1
- package/lib/types/client/index.d.ts +1 -2
- package/lib/types/client/intercept.d.ts +1 -1
- package/lib/types/client/locales-it.d.ts +1 -1
- package/lib/types/client/locales.d.ts +37 -60
- package/lib/types/client/markdown-images.d.ts +1 -1
- package/lib/types/client/markdown-labels.d.ts +7 -30
- package/lib/types/client/paths.d.ts +5 -0
- package/lib/types/client/plugins-shared.d.ts +5 -12
- package/lib/types/client/plugins-tabs.d.ts +4 -1
- package/lib/types/client/plugins-viewers.d.ts +4 -1
- package/lib/types/client/service.d.ts +1 -1
- package/lib/types/client/settings-nav-icon.d.ts +1 -1
- package/lib/types/client/shell-presets.d.ts +1 -1
- package/lib/types/context-types.d.ts +20 -54
- package/lib/types/fs-operations.d.ts +2 -0
- package/lib/types/identity.d.ts +9 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/invariant.d.ts +3 -3
- package/lib/types/path-security.d.ts +9 -3
- package/lib/types/prefs-shared.d.ts +23 -1
- package/lib/types/pty-deps.d.ts +11 -15
- package/lib/types/side-label.d.ts +7 -0
- package/lib/types/subagent-catalog.d.ts +12 -0
- package/lib/types/trust-fence.d.ts +1 -1
- package/lib/types/wire.d.ts +1 -1
- package/package.json +18 -44
- package/src/agent-opens.ts +3 -3
- package/src/client/Sidebar.tsx +0 -34
- package/src/client/SubagentView.tsx +884 -883
- package/src/client/TerminalView.tsx +15 -7
- package/src/client/builtins/tabs.tsx +4 -1
- package/src/client/chunk-loader.ts +25 -25
- package/src/client/chunks/editor.tsx +2 -2
- package/src/client/chunks/terminal.tsx +2 -2
- package/src/client/index.tsx +28 -65
- package/src/client/locales-ar.ts +382 -425
- package/src/client/locales-de.ts +367 -410
- package/src/client/locales-fr.ts +374 -417
- package/src/client/locales-hi.ts +381 -424
- package/src/client/locales-id.ts +379 -422
- package/src/client/locales-it.ts +372 -415
- package/src/client/locales-ja.ts +381 -424
- package/src/client/locales-ko.ts +373 -416
- package/src/client/locales-nl.ts +379 -422
- package/src/client/locales-pl.ts +383 -426
- package/src/client/locales-pt.ts +364 -407
- package/src/client/locales-ru.ts +379 -422
- package/src/client/locales-sv.ts +364 -407
- package/src/client/locales-th.ts +381 -424
- package/src/client/locales-tr.ts +381 -424
- package/src/client/locales-vi.ts +381 -424
- package/src/client/locales-zh-HK.ts +396 -439
- package/src/client/locales-zh-MO.ts +396 -439
- package/src/client/locales-zh-TW.ts +396 -439
- package/src/client/locales.ts +873 -1008
- package/src/client/markdown-labels.tsx +5 -14
- package/src/client/plugins-shared.ts +5 -12
- package/src/client/plugins-tabs.ts +3 -149
- package/src/client/plugins-viewers.ts +3 -40
- package/src/client/service.ts +874 -874
- package/src/harness-type-shims.d.ts +28 -0
- package/src/index.ts +10 -8
- package/src/invariant.ts +2 -2
- package/src/pty-deps.ts +38 -52
- package/src/subagent-catalog.ts +38 -0
- package/src/tools.ts +4 -4
- package/src/wire.ts +0 -1
- package/lib/types/client/DiffView.d.ts +0 -51
- package/lib/types/client/GitView.d.ts +0 -10
- package/lib/types/client/SideChatView.d.ts +0 -16
- package/lib/types/client/sidechat-transcript.d.ts +0 -103
- package/lib/types/sidechat-core.d.ts +0 -172
- package/lib/types/sidechat-routes.d.ts +0 -30
- package/scripts/install.ps1 +0 -306
- package/scripts/install.sh +0 -287
- package/src/sidechat-core.ts +0 -5
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Host 侧 `/sidebar/*` 由产品内置兼容器接线;本包提供 **client 半
|
|
|
10
10
|
前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
xrkh plugin add xrkh-better-sidebar@
|
|
13
|
+
xrkh plugin add xrkh-better-sidebar@0.18.0
|
|
14
14
|
xrkh restart
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -22,17 +22,34 @@ xrkh plugin add ./xrkh-better-sidebar
|
|
|
22
22
|
xrkh restart
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
本机与 XRK-Harness 源码仓联调时,可将本仓放在 Harness 的 `extensions/xrkh-better-sidebar/`(主仓 gitignore,不进提交),然后:
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
$env:XRK_PLUGINS_DIR = "./extensions"
|
|
29
|
+
pnpm xrk web --workspace .
|
|
30
|
+
```
|
|
31
|
+
|
|
25
32
|
装完硬刷新浏览器(Ctrl+Shift+R)。
|
|
26
33
|
|
|
34
|
+
## 0.18.0
|
|
35
|
+
|
|
36
|
+
- XRKH 原生:去掉 DSH 双轨(`dsh` manifest · better-locale · DSH 安装脚本 · 市场目录)
|
|
37
|
+
- peer 仅 `@xrkseek/*` + React;工具类型走 `@xrkseek/xrk-tools` / `xrk-settings`
|
|
38
|
+
- 无 Side Chat;子代理走 Host Face + `subagents.live` / `jobs.*`
|
|
39
|
+
- 空 curated 插件目录(社区扩展不随包捆绑)
|
|
40
|
+
|
|
27
41
|
## 契约
|
|
28
42
|
|
|
29
43
|
| 项 | 说明 |
|
|
30
44
|
|----|------|
|
|
31
45
|
| npm | `xrkh-better-sidebar` |
|
|
32
46
|
| 仓库 | `xrkseek/xrkh-better-sidebar` |
|
|
33
|
-
|
|
|
47
|
+
| 形态 | **仅 client 半包**(`package.json` → `xrk.client` → `lib/client.js`) |
|
|
34
48
|
| 注入 | `@xrkseek/client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-conversation` · `client-modules` |
|
|
35
|
-
| Host |
|
|
49
|
+
| Host | **产品 Host 拥有** `/sidebar/api` · `/sidebar/file|upload|html|bundle` · `/sidebar/ws/terminal` 等;本包不在 XRK 上挂 Cordis host 半包抢同一前缀 |
|
|
50
|
+
| 子代理 / 任务 | 走 Host Face + `/sidebar/api` 的 `subagents.live` · `jobs.*`(勿再实现 Side Chat) |
|
|
51
|
+
|
|
52
|
+
契约细则见 Harness 教科书 [community-plugins.md](https://github.com/xrkseek/XRK-harness/blob/main/docs/community-plugins.md)「侧栏插件契约」。
|
|
36
53
|
|
|
37
54
|
## 开发
|
|
38
55
|
|
package/README_EN.md
CHANGED
|
@@ -10,7 +10,7 @@ Host serves `/sidebar/*` via the product adapter; this package ships the **clien
|
|
|
10
10
|
Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
xrkh plugin add xrkh-better-sidebar@
|
|
13
|
+
xrkh plugin add xrkh-better-sidebar@0.18.0
|
|
14
14
|
xrkh restart
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -22,8 +22,22 @@ xrkh plugin add ./xrkh-better-sidebar
|
|
|
22
22
|
xrkh restart
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
For local monorepo smoke tests, place this tree under Harness `extensions/xrkh-better-sidebar/` (gitignored by the main repo), then:
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
$env:XRK_PLUGINS_DIR = "./extensions"
|
|
29
|
+
pnpm xrk web --workspace .
|
|
30
|
+
```
|
|
31
|
+
|
|
25
32
|
Hard-refresh the browser after install (Ctrl+Shift+R).
|
|
26
33
|
|
|
34
|
+
## 0.18.0
|
|
35
|
+
|
|
36
|
+
- XRKH-native: drop DSH dual-track (`dsh` manifest · better-locale · DSH install scripts · marketplace catalogs)
|
|
37
|
+
- Peers are `@xrkseek/*` + React only; tools/settings types via `@xrkseek/xrk-tools` / `xrk-settings`
|
|
38
|
+
- No Side Chat; subagents use Host Face + `subagents.live` / `jobs.*`
|
|
39
|
+
- Empty curated plugin catalogs (community entries are not bundled)
|
|
40
|
+
|
|
27
41
|
## Contract
|
|
28
42
|
|
|
29
43
|
| Item | Notes |
|
package/cordis.patch.yml
CHANGED
|
@@ -1,49 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# xrkh-better-sidebar bundle patch (Host profile / plugin add)
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# dsh plugin --profile <name> add dsh-better-sidebar@<version>
|
|
7
|
-
#
|
|
8
|
-
# — the command reconciles `dsh.profile.bundles` against installed packages
|
|
9
|
-
# and, seeing this declaration, appends `dsh-better-sidebar` to the bundle
|
|
10
|
-
# stack. The profile boot then merges THIS patch (a single `insert` of the
|
|
11
|
-
# plugin row) exactly like the manual cordis.patch.yml mount line used
|
|
12
|
-
# before. No profile file edits needed — one command installs and mounts.
|
|
13
|
-
#
|
|
14
|
-
# If the profile still carries the old manual mount line in its own
|
|
15
|
-
# cordis.patch.yml, remove it before switching to the bundle channel to
|
|
16
|
-
# avoid double-mounting (two Node halves, two sidebars).
|
|
17
|
-
#
|
|
18
|
-
# To choose the terminal shell, add `config.shell` to the inserted plugin
|
|
19
|
-
# row (or to the profile's manual cordis.patch.yml mount line). When omitted,
|
|
20
|
-
# the host keeps resolving $SHELL / the login shell / powershell.exe.
|
|
21
|
-
# `config.shellArgs` optionally supplies explicit startup arguments; when
|
|
22
|
-
# non-empty they replace the automatic POSIX `-l` login flag:
|
|
23
|
-
#
|
|
24
|
-
# - insert:
|
|
25
|
-
# - id: better-sidebar
|
|
26
|
-
# name: 'dsh-better-sidebar'
|
|
27
|
-
# config:
|
|
28
|
-
# shell: /bin/zsh
|
|
29
|
-
# shellArgs:
|
|
30
|
-
# - --noprofile
|
|
31
|
-
# - --no-rc
|
|
32
|
-
#
|
|
33
|
-
# Aggregate double-mount guard: aggregate bundles (e.g. @linxin666/dsh-web-ui-all)
|
|
34
|
-
# may already mount this package under their own entry id (e.g.
|
|
35
|
-
# `web-ui-better-sidebar`). Two mounts register /sidebar/api twice and fail the
|
|
36
|
-
# whole plugin tree at boot ("duplicate prefix route"). The `!!js` disabled
|
|
37
|
-
# expression backs THIS row off when another *enabled* entry already mounts
|
|
38
|
-
# `dsh-better-sidebar`; the aggregate instance then owns the sidebar. The
|
|
39
|
-
# loader evaluates it when this row is processed (entry-list order, only rows
|
|
40
|
-
# before this one are visible), so the aggregate bundle must precede this one
|
|
41
|
-
# in `dsh.profile.bundles` — the standard install order, since `dsh plugin add`
|
|
42
|
-
# appends new bundles last. The reverse order (this bundle before the
|
|
43
|
-
# aggregate) is a known limitation: the guard cannot see rows that come after
|
|
44
|
-
# it, and no runtime singleton guard is added. Same-id manual duplicates still
|
|
45
|
-
# fail loudly at the loader as before.
|
|
3
|
+
# When installed via `xrkh plugin add xrkh-better-sidebar`, the Host reconciles
|
|
4
|
+
# profile bundles against this file and inserts the plugin row.
|
|
46
5
|
- insert:
|
|
47
6
|
- id: better-sidebar
|
|
48
|
-
name: '
|
|
49
|
-
disabled: !!js "[...ctx.loader.entries()].some((e) => e.options.name === '
|
|
7
|
+
name: 'xrkh-better-sidebar'
|
|
8
|
+
disabled: !!js "[...ctx.loader.entries()].some((e) => e.options.name === 'xrkh-better-sidebar' && e.options.id !== 'better-sidebar' && !e.disabled)"
|