@deepseek-ai/dsh-api-settings-controller 0.1.2-alpha.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/api/settings-controller/README.md
5
+ README.md: 5032b8ff352d35abc05384719932691a93a49f84
6
+ README.zh.md: 756a7fcdd1cd03b157ff5781aadd4db092c6d374
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ ---
2
+ description: "Host Remote owner for settings and credential configuration surfaces, including redacted reads, writes, credential references, and native document opening."
3
+ kind: "package-reference"
4
+ ---
5
+ # Settings Controller
6
+
7
+ English | [中文](README.zh.md)
8
+
9
+ ## Summary
10
+
11
+ `@deepseek-ai/dsh-api-settings-controller` exposes generated `ctx.remote.settings` and `ctx.remote.credentials` namespaces for browser configuration surfaces. It returns redacted settings and credential metadata, supports settings and credential writes without returning secret values, and opens provider-owned settings or Agent preset locations on the Host desktop. When a provider is absent, the namespace remains registered and returns an actionable configuration error.
12
+
13
+ ## Table of Contents
14
+
15
+ - [Use this package](#use-this-package)
16
+ - [Configuration](#configuration)
17
+ - [Model Experience](#model-experience)
18
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
19
+ - [Dev Note](#dev-note)
20
+
21
+ -----
22
+
23
+ <a id="use-this-package"></a>
24
+ ## Use this package
25
+
26
+ Mount this package as a Loader entry in a profile that serves browser configuration. The entry registers both namespaces independently of their providers so a missing provider produces a named configuration error at invocation. Its generated descriptors enter the strict Typert registry, while the settings and credential Definitions remain plain Cordis Services with no wire obligations of their own.
27
+
28
+ `describe(refs)` answers one map keyed by the requested names, so a settings page describing every reference its rows carry settles those rows together. It accepts at most 64 names per call, reports an invalid name or empty write value as `bad-request`, and copies each answer field by field — a provider returning more than `CredentialInfo` declares cannot widen what crosses. Valid `set(ref, value)` and `unset(ref)` calls report a provider refusal as `credential-rejected`, carrying the provider's message with only the reference in its details. Secret values cross in this direction only: no method here returns one.
29
+
30
+ `settings.describe()` returns deployment facts and every namespace under `redactSecrets: true`. `settings.update`, `settings.replace`, and `settings.mutate` expose the settings service's three write operations and return the namespace's new redacted view; stale writes use `settings-conflict` and other provider refusals use `settings-rejected`.
31
+
32
+ `settings.openSettingsDocument()` prepares the provider-owned document and opens it with the native text-editor intent. `settings.canOpenAgentPresetDirectory()` reports native-opening availability when the preset page becomes visible. `settings.openAgentPresetDirectory(id)` resolves only a user-authored preset and either opens its directory or returns the path when native opening is unavailable; neither open method accepts a browser-supplied filesystem target.
33
+
34
+ -----
35
+
36
+ <a id="configuration"></a>
37
+ ## Configuration
38
+
39
+ | Field | Default | Meaning |
40
+ |---|---|---|
41
+ | `nativeOpen` | platform-detected | Whether Agent preset directories can be handed to a native desktop opener |
42
+
43
+ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-api-settings-controller) is the exhaustive source for accepted fields and their JSDoc.
44
+
45
+ -----
46
+
47
+ <a id="model-experience"></a>
48
+ ## Model Experience
49
+
50
+ None, as settings and credential configuration are browser and Host state and register no prompt, tool, or session event.
51
+
52
+ #### KV Cache effect
53
+
54
+ No direct effect; reading or writing these configuration values does not alter model requests already in flight.
55
+
56
+ ## Known Limitations and Deferred Work
57
+
58
+ <a id="known-limitations-and-deferred-work"></a>
59
+
60
+ - The batch bound is fixed at 64 references and is not a deployment-configurable field.
61
+
62
+ <a id="dev-note"></a>
63
+ ### Dev Note
64
+
65
+ <details>
66
+ <summary>Working context for maintainers — click to expand</summary>
67
+
68
+ None.
69
+
70
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,70 @@
1
+ ---
2
+ description: "settings 与凭据配置界面的 Host Remote owner,涵盖脱敏读取、写入、凭据引用与原生文档打开。"
3
+ kind: "package-reference"
4
+ ---
5
+ # Settings Controller
6
+
7
+ [English](README.md) | 中文
8
+
9
+ ## 概述
10
+
11
+ `@deepseek-ai/dsh-api-settings-controller` 为浏览器配置界面提供生成的 `ctx.remote.settings` 与 `ctx.remote.credentials` namespace。它返回脱敏的 settings 与凭据元数据,支持 settings 与凭据写入而不返回密钥值,并在 Host 桌面打开由 provider 持有的 settings 或 Agent preset 位置。provider 缺失时,namespace 仍会注册,并返回可操作的配置错误。
12
+
13
+ ## 目录
14
+
15
+ - [使用本包](#use-this-package)
16
+ - [配置](#configuration)
17
+ - [模型体验](#model-experience)
18
+ - [已知限制与延期工作](#known-limitations-and-deferred-work)
19
+ - [开发备注](#dev-note)
20
+
21
+ -----
22
+
23
+ <a id="use-this-package"></a>
24
+ ## 使用本包
25
+
26
+ 请把本包作为 Loader entry 挂载到提供浏览器配置的 profile 中。本 entry 不依赖 provider 是否存在而注册两个 namespace,因此缺少 provider 会在调用时产生具名配置错误。它生成的 descriptor 进入严格 Typert registry,而 settings 与凭据 Definition 仍是普通 Cordis Service,自身不承担任何 wire 义务。
27
+
28
+ `describe(refs)` 以请求的名字为键返回一份 map,因此设置页描述其各行携带的全部引用时,这些行会一起落定。单次调用最多接受 64 个名字,无效名字或空写入值报告为 `bad-request`,并逐字段复制每个答案——provider 返回超出 `CredentialInfo` 声明的内容也无法扩大跨越 wire 的字段。有效的 `set(ref, value)` 与 `unset(ref)` 调用把 provider 拒绝报告为 `credential-rejected`,携带 provider 的消息,details 中只有该引用。密钥值只在这个方向跨越 wire:这里没有任何方法会返回它。
29
+
30
+ `settings.describe()` 返回部署信息,以及在 `redactSecrets: true` 下读取的所有 namespace。`settings.update`、`settings.replace` 与 `settings.mutate` 暴露 settings service 的三种写入操作,并返回该 namespace 的新脱敏视图;过期写入使用 `settings-conflict`,其他 provider 拒绝使用 `settings-rejected`。
31
+
32
+ `settings.openSettingsDocument()` 准备 provider 持有的文档,并用原生文本编辑器意图将其打开。`settings.canOpenAgentPresetDirectory()` 在 preset 页面显示时报告原生打开能力。`settings.openAgentPresetDirectory(id)` 只解析用户创作的 preset,并在原生打开不可用时返回目录路径;两个打开方法都不接受浏览器提供的文件系统目标。
33
+
34
+ -----
35
+
36
+ <a id="configuration"></a>
37
+ ## 配置
38
+
39
+ | 字段 | 默认值 | 含义 |
40
+ |---|---|---|
41
+ | `nativeOpen` | 平台探测 | Agent preset 目录能否交给原生桌面打开器 |
42
+
43
+ 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-api-settings-controller)是所有受支持字段及其 JSDoc 的完整来源。
44
+
45
+ -----
46
+
47
+ <a id="model-experience"></a>
48
+ ## 模型体验
49
+
50
+ 无,因为 settings 与凭据配置属于浏览器和 Host 状态,并且不注册提示词、工具或会话事件。
51
+
52
+ #### KV Cache 影响
53
+
54
+ 无直接影响;读取或写入这些配置值不会改变已经在途的模型请求。
55
+
56
+ ## 已知限制与延期工作
57
+
58
+ <a id="known-limitations-and-deferred-work"></a>
59
+
60
+ - 批量上限固定为 64 个引用,不是可按部署配置的字段。
61
+
62
+ <a id="dev-note"></a>
63
+ ### 开发备注
64
+
65
+ <details>
66
+ <summary>维护者工作上下文——点击展开</summary>
67
+
68
+ 无。
69
+
70
+ </details>