@deepseek-ai/dsh-client-ui-settings-plugins 0.1.6-alpha.1 → 0.1.7-alpha.1

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/client/ui-settings-plugins/README.md
5
- README.md: cea5dd292634fe033ba9f12c9e8fe5daedc1d2ab
6
- README.zh.md: ab35e92fb05fb28d4639ac761facf7bf9b53ee11
5
+ README.md: b4b3d37bd9da0fa6d1e3dcefd4d26394d4dde161
6
+ README.zh.md: d22a9ec3f142bd7c11b27b1cb08e0a8a56ce6ead
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Plugins settings section for the dsh web client: feature-owned tabs, the configurable host-plane plugin cards, and the settings.plugin.item extension point."
2
+ description: "Built-in plugins settings section for the dsh web client: the Settings navigation entry and the tab chrome that feature-owned tabs register into."
3
3
  kind: "package-reference"
4
4
  ---
5
5
 
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- Use the **Plugins** settings section to configure the plugins exposed by the current deployment and to open feature-specific plugin pages. The **Plugin configuration** tab presents one expandable card for each supported plugin, shows which values the user overrode, and lets the user reset them to deployment defaults. Cards keep edits local until save. If the configuration changed after the card loaded, the save is rejected instead of overwriting the newer values.
12
+ Use the **Built-in plugins** settings section to inspect the plugins this deployment ships. The section is a shell: it owns the navigation entry and the tab row, and every tab in it is registered by another plugin — the read-only inventory ships one. Configuring a built-in plugin happens on the sidebar's Plugins page, where each official plugin's own companion package registers its page.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -25,21 +25,9 @@ Use the **Plugins** settings section to configure the plugins exposed by the cur
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
- Open the Plugins section in Settings and select the **Plugin configuration** tab to edit the host-plane plugins this deployment composes. The cards appear in this order: the shell executor (`bash`), the agent loop's tool-call parallelism (`agent-loop`), subagent model selection (`subagent-model-selection`), and the DeepSeek search provider (`web-search-deepseek`).
28
+ Open **Built-in plugins** in Settings. [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.md) contributes the inventory as the section's one tab, shown as the page itself; a second registered tab turns the row into tabs. A deployment whose composition contributes no tab shows the section's empty line.
29
29
 
30
- ### What appears here
31
-
32
- The tab reads which settings namespaces the Host serves and dispatches one slot key per namespace, so what renders is the intersection of two ledgers: the namespaces a live Host plugin registered, and the cards registered under those keys. A served namespace no card claims renders nothing, and a card whose namespace this deployment does not serve is never dispatched. The empty line waits for the Host's first answer, so an unanswered read never reads as "this deployment configures no plugin".
33
-
34
- ### Editing and saving
35
-
36
- A card stages what the user types and writes it only when they save. Each control renders staged text, so what is on screen is exactly what a save would store; **Discard** drops the drafts, and a card holding unsaved edits says so on its header even while collapsed. A successful save collapses the card after the read-back confirms the writes; a failed save keeps the card open, reports the failure, and retains the drafts for correction. A reset stages the composed default rather than writing immediately, and a draft the field does not accept blocks the save instead of being dropped. The Host is the only authority on whether a value was accepted.
37
-
38
- The Subagent card stages its permission switch and exact model checkboxes together. Enabling requires at least one selected adapter route. Saving submits `enabled` and `allowedModels` in one mutation fenced by the revision where that draft began; a newer Host revision marks the draft failed instead of restoring a revoked route. Disabling retains the selected routes for later reuse. Available models are grouped by provider, while saved routes absent from the current catalog appear last and remain removable. Adapter names and model descriptions remain live directory metadata and are not stored, and the card refreshes them after adapter changes, settings commits, and reconnects.
39
-
40
- ### Secret-role fields
41
-
42
- A key control starts blank, reports only whether one is configured, and writes through the credentials domain rather than the settings section; a blank draft writes nothing and keeps the stored key.
30
+ To contribute a tab, register into `settings.plugins.tab` with an `id`, an `order`, and a localized `label`; the section renders the entries in order and mounts a tab on its first selection. Feature copy stays in the registering plugin's dictionary.
43
31
 
44
32
  -----
45
33
 
@@ -49,15 +37,7 @@ A key control starts blank, reports only whether one is configured, and writes t
49
37
  <details>
50
38
  <summary>Implementation internals — click to expand</summary>
51
39
 
52
- The section is one extension point and one dispatch rule: feature plugins own their cards; the tab pairs served namespaces with registered cards by slot key.
53
-
54
- ### The tab extension point
55
-
56
- The section declares `settings.plugins.tab`, a root list slot whose labels become ordered tabs; a tab stays mounted after its first selection so local drafts and read-only snapshots survive tab switches. The package registers its own `configurable` contribution, which declares the nested `settings.plugin.item` slot — keyed on the settings namespace a card edits. A plugin that ships a browser half registers its own card under its own namespace and owns every part of it: chrome, controls, and copy. Tabs follow the contribution's `order`; cards follow registration order.
57
-
58
- ### The write path
59
-
60
- Saving writes staged fields through the client settings scope, which fences each write or ordered mutation with the namespace revision the draft read, so a form that has drifted from the document is refused rather than overwriting a concurrent change. A field's presence in the raw user layer — not its value — is what marks it overridden; a reset clears that field so it re-inherits the composition layer. Secret-role fields never ride a response; the card re-reads on the forwarded `credentials/reference-updated` event for the reference it watches.
40
+ The section declares `settings.plugins.tab`, a root list slot whose labels become ordered tabs; a lone contribution renders as the page itself, and a tab stays mounted after its first selection so search and the inventory snapshot survive switching. The section's `inject` projects the slot's ledger into ordered rows whose labels follow the active locale, cached until the ledger version or the locale revision moves. The Host half is an empty `apply`, present only so the package holds a Loader row the client module system serves the browser half for.
61
41
 
62
42
  </details>
63
43
 
@@ -66,13 +46,10 @@ Saving writes staged fields through the client settings scope, which fences each
66
46
  <a id="further-exploration"></a>
67
47
  ## Further Exploration
68
48
 
69
- These pages cover the settings base, the inventory tab, and the durable seams behind the cards.
70
-
71
- - [ui-settings](../ui-settings/README.md) — the domain base declaring `settings.plugins.tab` and the settings scope.
72
- - [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.md) — the read-only Plugin list tab in the same section.
73
- - [settings](../../settings/README.md) — the durable user-settings seam and its file provider.
74
- - [credentials](../../credentials/README.md) — the credential-reference seam secret fields write through.
75
- - [ui-settings-general](../ui-settings-general/README.md) — the settings shell hosting this section.
49
+ - [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.md) — the read-only inventory tab.
50
+ - [ui-settings](../ui-settings/README.md) — the domain base declaring `settings.section`.
51
+ - [ui-plugin-manager](../ui-plugin-manager/README.md) — the Plugins page where official plugins are configured.
52
+ - [ui-settings-shell](../ui-settings-shell/README.md), [ui-settings-agent-loop](../ui-settings-agent-loop/README.md), [ui-settings-subagent](../ui-settings-subagent/README.md), [ui-settings-web-search](../ui-settings-web-search/README.md) — the official configuration pages, one companion package each.
76
53
 
77
54
  -----
78
55
 
@@ -89,13 +66,8 @@ None; this package neither assembles nor sends a provider request.
89
66
 
90
67
  <a id="known-limitations-and-deferred-work"></a>
91
68
 
92
-
93
- These limits define which plugins appear and how fresh the list is; they are current package constraints.
94
-
95
- - **Only host-plane plugins appear** — a plugin an agent preset mounts carries its configuration inline in that preset's `agent.cordis.yml` and cannot register a settings namespace at all, so this section lists nothing for it. Editing those values remains the preset editor's job.
96
- - **A card still needs a browser bundle** — the browser half must be a `dsh.client` package built in the client module system's lazy-CJS factory format, and the `clientBundle` preset that emits it lives in `../../../packages/client/tsdown.client.ts` rather than a published package, so a plugin outside this repository has to reproduce that build itself.
97
- - **The served namespaces re-read on two signals only** — the wire announces settings-document commits and connection resets, not registrations, so a namespace whose owner registers after the tab's read joins the list on the next document commit or reconnect.
98
- - **The shell card follows the composed executor** — the POSIX and PowerShell executor families share the `bash` namespace because a host composes exactly one of them, so the served schema differs by platform (PowerShell adds `pwshPath`) even though the card edits the same two fields on both.
69
+ - **The section has no tab of its own** — it renders its empty line until a feature plugin registers one; the shell cannot fill the section alone.
70
+ - **Runtime invariant:** No companion is published. The section owns no relationship beyond the slot ledger it projects.
99
71
 
100
72
  <a id="dev-note"></a>
101
73
  ### Dev Note
@@ -106,5 +78,3 @@ These limits define which plugins appear and how fresh the list is; they are cur
106
78
  None.
107
79
 
108
80
  </details>
109
-
110
- **Runtime invariant:** No companion is published. This is a browser-side settings surface whose node half owns no event stream or mutable runtime data; the layering and write refusals are Host contracts covered by the owning plugins and the api-proxy.
package/README.zh.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "dsh Web 客户端的「插件」设置分区:功能自有的标签页、可配置宿主平面插件卡片,以及 settings.plugin.item 扩展点。"
2
+ description: "dsh Web 客户端的「内置插件」设置分区:设置导航项与供功能插件注册标签页的标签行。"
3
3
  kind: "package-reference"
4
4
  ---
5
5
 
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 使用**插件**设置分区可以配置当前部署公开的插件,也可以打开插件功能自己的页面。**插件配置**标签页会为每个受支持的插件展示一张可展开卡片,标明用户覆盖过哪些值,并允许用户将它们重置为部署默认值。卡片会在本地保留修改,直到用户保存。如果配置在卡片加载后发生变化,保存会被拒绝,而不会覆盖较新的值。
12
+ 使用**内置插件**设置分区查看本部署随附的插件。该分区只是一个壳:它拥有导航项和标签行,里面的每个标签页都由其他插件注册——只读清单注册了一个。配置内置插件在侧栏的插件页上进行,每个官方插件自己的伴生包把页面注册到那里。
13
13
 
14
14
  ## 目录
15
15
 
@@ -25,21 +25,9 @@ kind: "package-reference"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
- 打开设置中的「插件」分区并选择**插件配置**标签页,即可编辑本部署所组装的宿主平面插件。卡片依次为 shell 执行器(`bash`)、agent loop(智能体循环)的工具调用并行度(`agent-loop`)、subagent 模型选择(`subagent-model-selection`)以及 DeepSeek 搜索提供方(`web-search-deepseek`)。
28
+ 在设置里打开**内置插件**。[ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.zh.md) 把清单作为分区唯一的标签页贡献进来,直接显示为页面本身;注册第二个标签页后这一行就变成标签行。组合里没有任何标签页贡献的部署会显示分区的空提示。
29
29
 
30
- ### 这里会出现什么
31
-
32
- 标签页读取 Host 服务了哪些 settings 命名空间,并为每个命名空间派发一个 slot 键,因此渲染出来的是两份账本的交集:存活 Host 插件注册的命名空间,以及注册在这些键上的卡片。被服务却无人认领的命名空间什么都不渲染;命名空间未被本部署服务的卡片根本不会被派发。空态文案要等 Host 的第一次答复,因此一次尚未答复的读取绝不会被读成「本部署没有可配置的插件」。
33
-
34
- ### 编辑与保存
35
-
36
- 卡片暂存用户输入,只有用户保存时才写入。每个控件渲染的都是暂存文本,因此屏幕上所见即保存后所存;**放弃修改**丢弃这些草稿,持有未保存修改的卡片即使收起也会在标题上标明。保存成功后,卡片会在回读确认写入后收起;保存失败时,卡片保持展开、报告失败并保留草稿供用户修改。重置暂存的是组装默认值而非立即写入;字段不接受的草稿会阻塞保存,而不是被丢弃。某个值是否被接受只有 Host 说了算。
37
-
38
- subagent 卡会同时暂存其权限开关与精确模型复选框。启用时必须至少选择一条适配器路由。保存会在一次 mutation 中提交 `enabled` 与 `allowedModels`,并以草稿开始时的 revision 设栅;Host revision 更新后,草稿会标记为失败,而不会恢复已撤销的路由。关闭时会保留已选路由供以后重新使用。可用模型按提供方分组;当前目录中缺失的已存路由排在末尾,且仍可移除。适配器名称与模型描述仍属于实时目录元数据,不会存储;适配器变化、设置提交和重连后,卡片会刷新这些元数据。
39
-
40
- ### secret 角色字段
41
-
42
- 密钥控件初始为空、只报告是否已配置,并经由 credentials 领域而非 settings 分节写入;空草稿不写入任何东西,保留已存密钥。
30
+ 要贡献一个标签页,带 `id`、`order` 和本地化的 `label` 注册进 `settings.plugins.tab`;分区按序渲染条目,标签页在首次被选中时挂载。功能文案留在注册方自己的字典里。
43
31
 
44
32
  -----
45
33
 
@@ -49,15 +37,7 @@ subagent 卡会同时暂存其权限开关与精确模型复选框。启用时
49
37
  <details>
50
38
  <summary>实现细节——点击展开</summary>
51
39
 
52
- 本分区是一个扩展点加一条分派规则:功能插件拥有各自的卡片;标签页按 slot 键把被服务的命名空间与已注册卡片配对。
53
-
54
- ### 标签页扩展点
55
-
56
- 本分区声明根级列表 slot `settings.plugins.tab`,其标签会成为有序标签页;某个标签页首次被选择后会保持挂载,因此本地草稿与只读快照在切换标签页时不会丢失。本包注册自己的 `configurable` 贡献,由它声明嵌套的 `settings.plugin.item` slot——以卡片所编辑的 settings 命名空间为键。带浏览器半侧的插件把自己的卡片注册在自己的命名空间上,并拥有它的全部:外观、控件与文案。标签页遵循贡献的 `order`;卡片遵循注册顺序。
57
-
58
- ### 写入路径
59
-
60
- 保存时,暂存字段通过客户端 settings scope 写入;每次单字段写入或有序 mutation 都以草稿读取时的命名空间 revision 设栅,因此已与文档脱节的表单会被拒绝,而不是覆盖并发变更。字段是否被覆盖,取决于它是否出现在原始用户层中,而非取决于它的值;重置会清除该字段,使其重新继承组装层。secret 角色的字段绝不搭乘响应;卡片会在转发来的 `credentials/reference-updated` 事件报告它所关注的引用时重读。
40
+ 分区声明 `settings.plugins.tab`,一个根级 list slot,其标签成为有序的标签页;只有一个贡献时直接渲染为页面本身,标签页在首次被选中后保持挂载,搜索词和清单快照因此在切换间不丢失。分区的 `inject` 把 slot 账本投影成按序排列、标签随当前语言的行,在账本版本或语言修订变化前保持缓存。宿主半侧是一个空的 `apply`,只为让本包占一条 Loader 行,客户端模块系统据此送出浏览器半侧。
61
41
 
62
42
  </details>
63
43
 
@@ -66,45 +46,35 @@ subagent 卡会同时暂存其权限开关与精确模型复选框。启用时
66
46
  <a id="further-exploration"></a>
67
47
  ## 进一步探索
68
48
 
69
- 以下页面覆盖设置底座、清单标签页与卡片背后的持久化 seam。
70
-
71
- - [ui-settings](../ui-settings/README.zh.md)——声明 `settings.plugins.tab` 与 settings scope 的领域底座。
72
- - [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.zh.md)——同一分区中的只读「插件列表」标签页。
73
- - [settings](../../settings/README.zh.md)——持久化用户设置 seam 及其文件提供方。
74
- - [credentials](../../credentials/README.zh.md)——secret 字段写入所经的凭据引用 seam。
75
- - [ui-settings-general](../ui-settings-general/README.zh.md)——承载本分区的设置外壳。
49
+ - [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.zh.md)——只读清单标签页。
50
+ - [ui-settings](../ui-settings/README.zh.md)——声明 `settings.section` 的领域基座。
51
+ - [ui-plugin-manager](../ui-plugin-manager/README.zh.md)——配置官方插件的插件页。
52
+ - [ui-settings-shell](../ui-settings-shell/README.zh.md)、[ui-settings-agent-loop](../ui-settings-agent-loop/README.zh.md)、[ui-settings-subagent](../ui-settings-subagent/README.zh.md)、[ui-settings-web-search](../ui-settings-web-search/README.zh.md)——官方配置页,每个一个伴生包。
76
53
 
77
54
  -----
78
55
 
79
56
  <a id="model-experience"></a>
80
57
  ## 模型体验
81
58
 
82
- 无。该包是浏览器端设置界面,不注册任何面向模型的接口。
59
+ 无,本包是浏览器侧的设置界面,不注册任何模型面。
83
60
 
84
- #### KV Cache 影响
61
+ #### KV 缓存影响
85
62
 
86
- 无;该包既不组装也不发送提供方请求。
63
+ 无;本包既不组装也不发送提供方请求。
87
64
 
88
65
  ## 已知限制与延期工作
89
66
 
90
67
  <a id="known-limitations-and-deferred-work"></a>
91
68
 
92
-
93
- 这些限制定义哪些插件会出现、列表有多新鲜;它们是当前包约束。
94
-
95
- - **只有宿主平面的插件会出现**:由 agent preset 挂载的插件把配置内联在该 preset 的 `agent.cordis.yml` 中,且根本无法注册 settings 命名空间,因此本分区不会列出它。编辑那些值仍是 preset 编辑器的职责。
96
- - **卡片仍然需要一份浏览器 bundle**:浏览器半侧必须是按客户端模块系统的 lazy-CJS factory 格式构建的 `dsh.client` 包,而产出它的 `clientBundle` 预设位于 `../../../packages/client/tsdown.client.ts`,并非已发布的包,因此本仓库之外的插件得自行复刻该构建。
97
- - **被服务的命名空间只在两种信号上重读**:协议通告的是 settings 文档提交与连接重置,而非注册行为,因此在标签页读取之后才被其拥有方注册的命名空间,要等下一次文档提交或重连才会加入列表。
98
- - **shell 卡片跟随被组装的执行器**:POSIX 与 PowerShell 两个执行器家族共用 `bash` 命名空间,因为一个宿主只组装其中之一,所以被服务的 schema 随平台不同(PowerShell 多出 `pwshPath`),尽管卡片在两者下编辑的都是同样两个字段。
69
+ - **分区没有自己的标签页**——在功能插件注册标签页之前它只显示空提示;壳自己填不满分区。
70
+ - **运行时不变量:**不发布伴生。分区除了投影 slot 账本之外不拥有任何关系。
99
71
 
100
72
  <a id="dev-note"></a>
101
73
  ### 开发备注
102
74
 
103
75
  <details>
104
- <summary>维护者的工作上下文——点击展开</summary>
76
+ <summary>维护者工作上下文——点击展开</summary>
105
77
 
106
78
  无。
107
79
 
108
80
  </details>
109
-
110
- **运行时不变式:** 不发布伴生入口。这是浏览器端设置界面,node half 不持有事件流或可变运行时数据;分层与写入拒绝是 Host 约定,由相应插件和 api-proxy 覆盖。