@deepseek-ai/dsh-client-ui-settings-agent-loop 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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +78 -0
- package/README.zh.md +78 -0
- package/lib/client.js +175 -0
- package/lib/index.js +12 -0
- package/lib/types/client/AgentLoopCard.d.ts +12 -0
- package/lib/types/client/agent-loop-card-controller.d.ts +44 -0
- package/lib/types/client/index.d.ts +27 -0
- package/lib/types/client/locales.d.ts +15 -0
- package/lib/types/index.d.ts +10 -0
- package/package.json +65 -0
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.
|
package/README.i18n.yaml
ADDED
|
@@ -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/client/ui-settings-agent-loop/README.md
|
|
5
|
+
README.md: 46e74fdf286c5a498cb7e1a0e885fed12912e7dd
|
|
6
|
+
README.zh.md: 5381d3f40c52cf72231a111a4fd37c019461efad
|
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "The agent loop's settings page on the dsh web client's Plugins page: the parallel tool-call cap of the agent-loop namespace."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-client-ui-settings-agent-loop
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Open **Plugins** in the sidebar and select **Agent loop** in the Official group to set how many parallel-safe tool calls one step may run at once. The page stages what is typed and writes it only on save, marks a value the user overrode, and offers to reset it to the deployment's default. The page exists while the Host serves the `agent-loop` namespace.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
The **Agent loop** card in the Official group opens the page. **Parallel tool calls** bounds the calls the loop runs at once within one step; the field renders the effective value, and once overridden carries an **Overridden** badge with **Reset to default** beside it. Nothing is written until **Save**; leaving the page drops the draft, an empty field saves as a reset, and text that is not a number blocks the save and says so under the field.
|
|
29
|
+
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
<a id="understand-the-implementation"></a>
|
|
33
|
+
## Understand the implementation
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>Implementation internals — click to expand</summary>
|
|
37
|
+
|
|
38
|
+
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. The browser half binds the `agent-loop` namespace through `ctx.configForms.get`, keeps the staged form in `AgentLoopCardController` over the shared `SettingsFormModel` of `ui-primitives`, and registers `AgentLoopCard` into the Plugins page's `plugins.item` slot through `ctx.configForms.whileServed`. The page's copy lives in this package's `settings.agentLoop` dictionary.
|
|
39
|
+
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
-----
|
|
43
|
+
|
|
44
|
+
<a id="further-exploration"></a>
|
|
45
|
+
## Further Exploration
|
|
46
|
+
|
|
47
|
+
- [ui-plugin-manager](../ui-plugin-manager/README.md) — the Plugins page and the `plugins.item` slot the page registers into.
|
|
48
|
+
- [ui-settings](../ui-settings/README.md) — the settings scope and the served-namespace watch the page rides.
|
|
49
|
+
- [ui-primitives](../ui-primitives/README.md) — the settings form model and fields the page renders.
|
|
50
|
+
- [agent-loop](../../core/agent-loop/README.md) — the loop that registers the `agent-loop` namespace.
|
|
51
|
+
|
|
52
|
+
-----
|
|
53
|
+
|
|
54
|
+
<a id="model-experience"></a>
|
|
55
|
+
## Model Experience
|
|
56
|
+
|
|
57
|
+
None, as the package is a browser-side settings surface that registers no model surface.
|
|
58
|
+
|
|
59
|
+
#### KV Cache effect
|
|
60
|
+
|
|
61
|
+
None; this package neither assembles nor sends a provider request.
|
|
62
|
+
|
|
63
|
+
## Known Limitations and Deferred Work
|
|
64
|
+
|
|
65
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
66
|
+
|
|
67
|
+
- **One field of the namespace** — the Host section carries only the parallel cap; the composed `agents` array is boot composition, not a user setting, and has no field here.
|
|
68
|
+
- **Runtime invariant:** No companion is published. The page holds no owned relationship of its own: what it shows derives from the settings mirror, and what it writes the Host validates.
|
|
69
|
+
|
|
70
|
+
<a id="dev-note"></a>
|
|
71
|
+
### Dev Note
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
75
|
+
|
|
76
|
+
None.
|
|
77
|
+
|
|
78
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "dsh Web 客户端插件页上的 Agent 循环设置页:agent-loop 命名空间的并行工具调用上限。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-client-ui-settings-agent-loop
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
在侧栏打开**插件**,在官方分组里选择 **Agent 循环**,即可设置一步之内最多同时运行多少个可并行的工具调用。页面暂存输入、只在保存时写入,标明用户覆盖过的值,并允许把它重置回部署默认值。页面只在 Host 服务 `agent-loop` 命名空间期间存在。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
官方分组里的 **Agent 循环**卡片打开这一页。**并行工具调用数**限制循环在一步之内同时运行的调用数;字段显示生效值,一旦被覆盖就带**已覆盖**标签,旁边是**恢复默认**。点击**保存**之前不会写入任何内容;离开页面即丢弃草稿,清空字段并保存等于重置,填了不是数字的文本则保存被阻止,并在字段下说明原因。
|
|
29
|
+
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
<a id="understand-the-implementation"></a>
|
|
33
|
+
## 理解实现
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>实现细节——点击展开</summary>
|
|
37
|
+
|
|
38
|
+
宿主半侧是一个空的 `apply`,只为让本包占一条 Loader 行,客户端模块系统据此送出浏览器半侧。浏览器半侧通过 `ctx.configForms.get` 绑定 `agent-loop` 命名空间,用 `ui-primitives` 的共享 `SettingsFormModel` 在 `AgentLoopCardController` 里维护暂存表单,并通过 `ctx.configForms.whileServed` 把 `AgentLoopCard` 注册进插件页的 `plugins.item` slot。页面文案在本包的 `settings.agentLoop` 字典里。
|
|
39
|
+
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
-----
|
|
43
|
+
|
|
44
|
+
<a id="further-exploration"></a>
|
|
45
|
+
## 进一步探索
|
|
46
|
+
|
|
47
|
+
- [ui-plugin-manager](../ui-plugin-manager/README.zh.md)——插件页以及本页注册进去的 `plugins.item` slot。
|
|
48
|
+
- [ui-settings](../ui-settings/README.zh.md)——本页依赖的设置 scope 与"命名空间被服务期间"的监视。
|
|
49
|
+
- [ui-primitives](../ui-primitives/README.zh.md)——本页渲染的设置表单模型与字段。
|
|
50
|
+
- [agent-loop](../../core/agent-loop/README.zh.md)——注册 `agent-loop` 命名空间的循环。
|
|
51
|
+
|
|
52
|
+
-----
|
|
53
|
+
|
|
54
|
+
<a id="model-experience"></a>
|
|
55
|
+
## 模型体验
|
|
56
|
+
|
|
57
|
+
无,本包是浏览器侧的设置界面,不注册任何模型面。
|
|
58
|
+
|
|
59
|
+
#### KV 缓存影响
|
|
60
|
+
|
|
61
|
+
无;本包既不组装也不发送提供方请求。
|
|
62
|
+
|
|
63
|
+
## 已知限制与延期工作
|
|
64
|
+
|
|
65
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
66
|
+
|
|
67
|
+
- **只编辑命名空间的一个字段**——Host 的这一节只承载并行上限;组合进来的 `agents` 数组属于启动组合而非用户设置,这里没有对应字段。
|
|
68
|
+
- **运行时不变量:**不发布伴生。本页没有自己拥有的关系:它显示的内容派生自设置镜像,它写入的内容由 Host 校验。
|
|
69
|
+
|
|
70
|
+
<a id="dev-note"></a>
|
|
71
|
+
### 开发备注
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary>维护者工作上下文——点击展开</summary>
|
|
75
|
+
|
|
76
|
+
无。
|
|
77
|
+
|
|
78
|
+
</details>
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@deepseek-ai/dsh-client-ui-settings-agent-loop",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
|
+
//#region lib/types/client/locales.js
|
|
10
|
+
/** Locale bundles for the agent loop's settings page. */
|
|
11
|
+
/** English copy. */
|
|
12
|
+
const en = {
|
|
13
|
+
title: "Agent loop",
|
|
14
|
+
description: "Control how the Agent dispatches tool calls.",
|
|
15
|
+
maxParallel: "Parallel tool calls",
|
|
16
|
+
maxParallelHint: "Upper bound on parallel-safe calls running at once within one step.",
|
|
17
|
+
overridden: "Overridden",
|
|
18
|
+
reset: "Reset to default",
|
|
19
|
+
readOnly: "This deployment stores settings read-only.",
|
|
20
|
+
unavailable: "This plugin is not loaded, so it cannot be configured right now.",
|
|
21
|
+
save: "Save",
|
|
22
|
+
saving: "Saving…",
|
|
23
|
+
saveFailed: "The deployment did not accept these values; they were left for you to correct.",
|
|
24
|
+
invalidNumber: "Enter a number, or leave blank to use the default."
|
|
25
|
+
};
|
|
26
|
+
/** Simplified Chinese copy. */
|
|
27
|
+
const zh = {
|
|
28
|
+
title: "Agent 循环",
|
|
29
|
+
description: "控制 Agent 派发工具调用的方式。",
|
|
30
|
+
maxParallel: "并行工具调用数",
|
|
31
|
+
maxParallelHint: "同一步内最多同时运行多少个可并行的调用。",
|
|
32
|
+
overridden: "已覆盖",
|
|
33
|
+
reset: "恢复默认",
|
|
34
|
+
readOnly: "本部署的设置为只读。",
|
|
35
|
+
unavailable: "该插件当前未加载,暂时无法配置。",
|
|
36
|
+
save: "保存",
|
|
37
|
+
saving: "保存中…",
|
|
38
|
+
saveFailed: "本部署没有接受这些值,已保留供你修改。",
|
|
39
|
+
invalidNumber: "请填数字;留空表示使用默认值。"
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The form frame's copy, read from this page's dictionary.
|
|
43
|
+
* @param t - the page's locale reader.
|
|
44
|
+
* @returns the labels the shared settings form renders.
|
|
45
|
+
*/
|
|
46
|
+
function formLabels(t) {
|
|
47
|
+
return {
|
|
48
|
+
unavailable: t("unavailable"),
|
|
49
|
+
readOnly: t("readOnly"),
|
|
50
|
+
saveFailed: t("saveFailed"),
|
|
51
|
+
save: t("save"),
|
|
52
|
+
saving: t("saving")
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region lib/types/client/AgentLoopCard.js
|
|
57
|
+
/**
|
|
58
|
+
* Render the agent loop's one-liner or its settings form, as the Plugins page asks.
|
|
59
|
+
* @param props - the view asked for, locale copy, the form snapshot, and its actions.
|
|
60
|
+
* @returns the one-liner, or the form.
|
|
61
|
+
*/
|
|
62
|
+
function AgentLoopCard(props) {
|
|
63
|
+
const { t } = props;
|
|
64
|
+
const state = props.useAgentLoopCard((snapshot) => snapshot);
|
|
65
|
+
if (props.view === "summary") return t("description");
|
|
66
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SettingsForm, {
|
|
67
|
+
labels: formLabels(t),
|
|
68
|
+
state,
|
|
69
|
+
onSave: props.save,
|
|
70
|
+
onDiscard: props.discard,
|
|
71
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SettingsValueField, {
|
|
72
|
+
id: "plugin-config-agent-loop-parallel",
|
|
73
|
+
label: t("maxParallel"),
|
|
74
|
+
hint: t("maxParallelHint"),
|
|
75
|
+
overriddenLabel: t("overridden"),
|
|
76
|
+
resetLabel: t("reset"),
|
|
77
|
+
invalidLabel: t("invalidNumber"),
|
|
78
|
+
numeric: true,
|
|
79
|
+
disabled: !state.writable,
|
|
80
|
+
...state.maxParallelToolCalls,
|
|
81
|
+
onEdit: (text) => {
|
|
82
|
+
props.edit("maxParallelToolCalls", text);
|
|
83
|
+
},
|
|
84
|
+
onReset: () => {
|
|
85
|
+
props.resetField("maxParallelToolCalls");
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region lib/types/client/agent-loop-card-controller.js
|
|
92
|
+
/** The agent-loop page's staged form over the `agent-loop` settings namespace. */
|
|
93
|
+
/**
|
|
94
|
+
* Namespace of the agent loop's user-owned settings. Spelled here rather than
|
|
95
|
+
* imported: a client package must not depend on a Host package.
|
|
96
|
+
*/
|
|
97
|
+
const AGENT_LOOP_NS = "agent-loop";
|
|
98
|
+
/** Bridges the `agent-loop` scope onto the page's staged form. */
|
|
99
|
+
var AgentLoopCardController = class {
|
|
100
|
+
form;
|
|
101
|
+
store;
|
|
102
|
+
/** @param scope - the bound settings scope for the `agent-loop` namespace. */
|
|
103
|
+
constructor(scope) {
|
|
104
|
+
this.form = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, [(0, _deepseek_ai_dsh_client_ui_primitives.settingsNumberField)("maxParallelToolCalls")]);
|
|
105
|
+
this.store = this.form.bind(() => this.projection());
|
|
106
|
+
}
|
|
107
|
+
projection() {
|
|
108
|
+
return {
|
|
109
|
+
...this.form.shell(),
|
|
110
|
+
maxParallelToolCalls: this.form.field("maxParallelToolCalls")
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Build the face the page's slot registration injects.
|
|
115
|
+
* @returns the page's snapshot and its form actions.
|
|
116
|
+
*/
|
|
117
|
+
inject() {
|
|
118
|
+
return {
|
|
119
|
+
hooks: { agentLoopCard: this.store },
|
|
120
|
+
...this.form.actions()
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/** Release accepted-value subscriptions. */
|
|
124
|
+
dispose() {
|
|
125
|
+
this.form.dispose();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region lib/types/client/index.js
|
|
130
|
+
/**
|
|
131
|
+
* The agent loop's settings page, browser half: the parallel tool-call cap
|
|
132
|
+
* over the `agent-loop` namespace the loop registers. The page registers into
|
|
133
|
+
* the Plugins page's `plugins.item` slot while the Host serves that namespace,
|
|
134
|
+
* so a deployment that exposes no agent-loop settings shows no trace of it.
|
|
135
|
+
*/
|
|
136
|
+
/** Dictionary namespace owned by this plugin. */
|
|
137
|
+
const NS = "settings.agentLoop";
|
|
138
|
+
/** Required services (cordis fiber inject). */
|
|
139
|
+
const inject = [
|
|
140
|
+
"slots",
|
|
141
|
+
"locale",
|
|
142
|
+
"configForms"
|
|
143
|
+
];
|
|
144
|
+
/**
|
|
145
|
+
* Mount the agent loop's settings page while the Host serves its namespace.
|
|
146
|
+
* @param ctx - the browser plugin context.
|
|
147
|
+
*/
|
|
148
|
+
function apply(ctx) {
|
|
149
|
+
const t = ctx.locale.bind(NS);
|
|
150
|
+
ctx.effect(() => ctx.locale.register(NS, {
|
|
151
|
+
zh,
|
|
152
|
+
en
|
|
153
|
+
}), "ui-settings-agent-loop: dictionaries");
|
|
154
|
+
const card = new AgentLoopCardController(ctx.configForms.get(AGENT_LOOP_NS));
|
|
155
|
+
ctx.effect(() => () => {
|
|
156
|
+
card.dispose();
|
|
157
|
+
}, "ui-settings-agent-loop: form subscription");
|
|
158
|
+
ctx.effect(() => ctx.configForms.whileServed([AGENT_LOOP_NS], () => ctx.slots.inject("plugins.item", () => ctx.slots.register({
|
|
159
|
+
name: "plugins.item",
|
|
160
|
+
id: "agent-loop",
|
|
161
|
+
order: 20,
|
|
162
|
+
label: () => t("title"),
|
|
163
|
+
locale: NS,
|
|
164
|
+
inject: () => card.inject()
|
|
165
|
+
}, AgentLoopCard))), "ui-settings-agent-loop: page");
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
exports.NS = NS;
|
|
169
|
+
exports.apply = apply;
|
|
170
|
+
exports.inject = inject;
|
|
171
|
+
return module.exports;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
//# sourceMappingURL=client.js.map
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region lib/types/index.js
|
|
2
|
+
/**
|
|
3
|
+
* Agent loop settings page, node half. The empty apply exists so the plugin
|
|
4
|
+
* appears in the host cordis.yml / Loader; the browser half owns the page
|
|
5
|
+
* through exports["./client"], discovered from the package.json dsh.client
|
|
6
|
+
* declaration. The `agent-loop` namespace the page edits is registered by the
|
|
7
|
+
* agent loop, so this package registers no namespace of its own.
|
|
8
|
+
*/
|
|
9
|
+
/** Host plugin body — no host-side behavior for this surface plugin. */
|
|
10
|
+
function apply() {}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { apply };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The agent loop's settings page: how many tool calls one step may run at once. */
|
|
2
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { AgentLoopCardFace } from './agent-loop-card-controller.ts';
|
|
4
|
+
/** Props the renderer binds for the agent-loop page. */
|
|
5
|
+
export type AgentLoopCardProps = PropsRuntime<'plugins.item'> & PropsLocale<'settings.agentLoop'> & InjectFace<AgentLoopCardFace>;
|
|
6
|
+
/**
|
|
7
|
+
* Render the agent loop's one-liner or its settings form, as the Plugins page asks.
|
|
8
|
+
* @param props - the view asked for, locale copy, the form snapshot, and its actions.
|
|
9
|
+
* @returns the one-liner, or the form.
|
|
10
|
+
*/
|
|
11
|
+
export declare function AgentLoopCard(props: AgentLoopCardProps): string | import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=AgentLoopCard.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** The agent-loop page's staged form over the `agent-loop` settings namespace. */
|
|
2
|
+
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
3
|
+
import { type SettingsFieldState, type SettingsFormActions, type SettingsFormScope, type SettingsFormShell } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
4
|
+
/**
|
|
5
|
+
* Namespace of the agent loop's user-owned settings. Spelled here rather than
|
|
6
|
+
* imported: a client package must not depend on a Host package.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AGENT_LOOP_NS = "agent-loop";
|
|
9
|
+
/**
|
|
10
|
+
* The agent-loop fields this page edits. The Host section carries only this
|
|
11
|
+
* field — the composed `agents` array is deliberately not part of it.
|
|
12
|
+
*/
|
|
13
|
+
export interface AgentLoopSettings {
|
|
14
|
+
/** Upper bound on parallel-safe tool calls in flight per step. */
|
|
15
|
+
maxParallelToolCalls?: number;
|
|
16
|
+
}
|
|
17
|
+
/** What the agent-loop page renders. */
|
|
18
|
+
export interface AgentLoopCardState extends SettingsFormShell {
|
|
19
|
+
/** Parallel tool-call cap. */
|
|
20
|
+
maxParallelToolCalls: SettingsFieldState;
|
|
21
|
+
}
|
|
22
|
+
/** The registration-side face the agent-loop page's slot entry injects. */
|
|
23
|
+
export interface AgentLoopCardFace extends SettingsFormActions {
|
|
24
|
+
hooks: {
|
|
25
|
+
/** Page snapshot bound by the renderer as useAgentLoopCard. */
|
|
26
|
+
agentLoopCard: SnapshotStore<AgentLoopCardState>;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Bridges the `agent-loop` scope onto the page's staged form. */
|
|
30
|
+
export declare class AgentLoopCardController {
|
|
31
|
+
private readonly form;
|
|
32
|
+
private readonly store;
|
|
33
|
+
/** @param scope - the bound settings scope for the `agent-loop` namespace. */
|
|
34
|
+
constructor(scope: SettingsFormScope<AgentLoopSettings>);
|
|
35
|
+
private projection;
|
|
36
|
+
/**
|
|
37
|
+
* Build the face the page's slot registration injects.
|
|
38
|
+
* @returns the page's snapshot and its form actions.
|
|
39
|
+
*/
|
|
40
|
+
inject(): AgentLoopCardFace;
|
|
41
|
+
/** Release accepted-value subscriptions. */
|
|
42
|
+
dispose(): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=agent-loop-card-controller.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent loop's settings page, browser half: the parallel tool-call cap
|
|
3
|
+
* over the `agent-loop` namespace the loop registers. The page registers into
|
|
4
|
+
* the Plugins page's `plugins.item` slot while the Host serves that namespace,
|
|
5
|
+
* so a deployment that exposes no agent-loop settings shows no trace of it.
|
|
6
|
+
*/
|
|
7
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
8
|
+
import { type AgentLoopSettingsLocaleKey } from './locales.ts';
|
|
9
|
+
export type { AgentLoopCardProps } from './AgentLoopCard.tsx';
|
|
10
|
+
export type { AgentLoopCardFace, AgentLoopCardState, AgentLoopSettings } from './agent-loop-card-controller.ts';
|
|
11
|
+
export type { AgentLoopSettingsLocaleKey } from './locales.ts';
|
|
12
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
13
|
+
interface LocaleNamespaceMap {
|
|
14
|
+
/** Agent loop settings page copy. */
|
|
15
|
+
'settings.agentLoop': AgentLoopSettingsLocaleKey;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Dictionary namespace owned by this plugin. */
|
|
19
|
+
export declare const NS = "settings.agentLoop";
|
|
20
|
+
/** Required services (cordis fiber inject). */
|
|
21
|
+
export declare const inject: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Mount the agent loop's settings page while the Host serves its namespace.
|
|
24
|
+
* @param ctx - the browser plugin context.
|
|
25
|
+
*/
|
|
26
|
+
export declare function apply(ctx: ClientContext): void;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Locale bundles for the agent loop's settings page. */
|
|
2
|
+
import type { SettingsFormLabels } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
+
/** Locale keys the page renders. */
|
|
4
|
+
export type AgentLoopSettingsLocaleKey = 'title' | 'description' | 'maxParallel' | 'maxParallelHint' | 'overridden' | 'reset' | 'readOnly' | 'unavailable' | 'save' | 'saving' | 'saveFailed' | 'invalidNumber';
|
|
5
|
+
/** English copy. */
|
|
6
|
+
export declare const en: Record<AgentLoopSettingsLocaleKey, string>;
|
|
7
|
+
/** Simplified Chinese copy. */
|
|
8
|
+
export declare const zh: Record<AgentLoopSettingsLocaleKey, string>;
|
|
9
|
+
/**
|
|
10
|
+
* The form frame's copy, read from this page's dictionary.
|
|
11
|
+
* @param t - the page's locale reader.
|
|
12
|
+
* @returns the labels the shared settings form renders.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formLabels(t: (key: AgentLoopSettingsLocaleKey) => string): SettingsFormLabels;
|
|
15
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent loop settings page, node half. The empty apply exists so the plugin
|
|
3
|
+
* appears in the host cordis.yml / Loader; the browser half owns the page
|
|
4
|
+
* through exports["./client"], discovered from the package.json dsh.client
|
|
5
|
+
* declaration. The `agent-loop` namespace the page edits is registered by the
|
|
6
|
+
* agent loop, so this package registers no namespace of its own.
|
|
7
|
+
*/
|
|
8
|
+
/** Host plugin body — no host-side behavior for this surface plugin. */
|
|
9
|
+
export declare function apply(): void;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-client-ui-settings-agent-loop",
|
|
3
|
+
"description": "Settings page of the agent loop on the dsh web client's Plugins page: the parallel tool-call cap of the agent-loop namespace",
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/client/ui-settings-agent-loop"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./client": {
|
|
22
|
+
"types": "./lib/types/client/index.d.ts",
|
|
23
|
+
"default": "./lib/client.js"
|
|
24
|
+
},
|
|
25
|
+
"./src/*": "./src/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"dsh": {
|
|
29
|
+
"client": {
|
|
30
|
+
"inject": [
|
|
31
|
+
"@deepseek-ai/dsh-client-locale",
|
|
32
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
33
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager"
|
|
34
|
+
],
|
|
35
|
+
"platform": "web"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/react": "~18.3.1",
|
|
44
|
+
"react": "^18.2.0",
|
|
45
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
46
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.7-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.7-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.1.7-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"lib/index.js",
|
|
58
|
+
"lib/client.js",
|
|
59
|
+
"lib/types/**/*.d.ts"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"bundle": "tsdown",
|
|
63
|
+
"watch": "tsdown --watch"
|
|
64
|
+
}
|
|
65
|
+
}
|