dsh-agent-lines 0.3.1 → 0.3.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/CHANGELOG.en.md +7 -0
- package/CHANGELOG.md +7 -0
- package/CODE_OF_CONDUCT.en.md +0 -0
- package/CODE_OF_CONDUCT.md +0 -0
- package/CONTRIBUTING.en.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/LICENSE +0 -0
- package/NOTICE +0 -0
- package/README.en.md +7 -5
- package/README.md +7 -5
- package/SECURITY.en.md +0 -0
- package/SECURITY.md +0 -0
- package/cordis.patch.yml +0 -0
- package/docs/ARCHITECTURE.en.md +0 -0
- package/docs/ARCHITECTURE.md +0 -0
- package/docs/DEPLOY.en.md +0 -0
- package/docs/DEPLOY.md +0 -0
- package/docs/PROTOCOL.en.md +0 -0
- package/docs/PROTOCOL.md +0 -0
- package/docs/SECURITY.en.md +0 -0
- package/docs/SECURITY.md +0 -0
- package/docs/assets/first-use.gif +0 -0
- package/docs/en/index.html +3 -3
- package/docs/index.html +3 -3
- package/docs/market-index.json +2 -2
- package/examples/market-index.json +2 -2
- package/lib/delivery.js +0 -0
- package/lib/index.js +17 -8
- package/lib/prompt.js +0 -0
- package/lib/protocol.js +0 -0
- package/lib/store.js +4 -1
- package/lib/tools.js +4 -3
- package/lib/transport.js +0 -0
- package/package.json +1 -1
- package/docs/assets/social-preview.png +0 -0
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.3.2 (2026-11-04)
|
|
6
|
+
|
|
7
|
+
- Zero-config bootstrap: with no plugin config, start one unbound manager line; a root Session can call line_claim_manager to bind itself.
|
|
8
|
+
- Default DB path follows DSH_HOME; without it, still ~/.dsh/agent-lines/lines.db.
|
|
9
|
+
- README now requires a DSH Web restart after install/update; explicit manager/worker config is optional.
|
|
10
|
+
- No schema change; remains v6.
|
|
11
|
+
|
|
5
12
|
## 0.3.1 (2026-11-04)
|
|
6
13
|
|
|
7
14
|
- README is now user-first: scenarios and install come first; technical details are later.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[English](CHANGELOG.en.md) | 中文
|
|
4
4
|
|
|
5
|
+
## 0.3.2 (2026-11-04)
|
|
6
|
+
|
|
7
|
+
- 零配置启动:没有 plugin config 时自动启动一条未绑定 manager,根会话可调用 line_claim_manager 自己绑定。
|
|
8
|
+
- 默认 DB 路径跟随 DSH_HOME;未设置时仍为 ~/.dsh/agent-lines/lines.db。
|
|
9
|
+
- README 明确:安装或更新后必须重启 DSH Web;显式 manager/worker 配置变为可选。
|
|
10
|
+
- 无 schema 变化,仍为 v6。
|
|
11
|
+
|
|
5
12
|
## 0.3.1 (2026-11-04)
|
|
6
13
|
|
|
7
14
|
- README 改为用户优先:先场景、安装和首次使用,技术细节后置;安装/快速开始不再要求手填 profile。
|
package/CODE_OF_CONDUCT.en.md
CHANGED
|
File without changes
|
package/CODE_OF_CONDUCT.md
CHANGED
|
File without changes
|
package/CONTRIBUTING.en.md
CHANGED
|
File without changes
|
package/CONTRIBUTING.md
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/NOTICE
CHANGED
|
File without changes
|
package/README.en.md
CHANGED
|
@@ -31,13 +31,15 @@ One-command install (recommended; no need to find a profile):
|
|
|
31
31
|
|
|
32
32
|
The script picks the DSH Web profile, installs the plugin, and verifies agent-lines. If it cannot decide, it lists existing profiles and tells you how to specify one.
|
|
33
33
|
|
|
34
|
+
**Restart DSH Web after install or update.** A running process does not load new plugin code. With no plugin config the plugin starts in zero-config mode: one unbound manager line, and a root Session can call line_claim_manager to bind itself. The explicit "Manager config" block is optional, for a fixed manager/worker setup.
|
|
35
|
+
|
|
34
36
|
Offline or when npm is unavailable, use the local tarball:
|
|
35
37
|
|
|
36
|
-
bash install.sh ./dsh-agent-lines-0.3.
|
|
38
|
+
bash install.sh ./dsh-agent-lines-0.3.2.tgz
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
After install and restart, it works without a config. When you want a fixed manager/worker setup, paste the "Manager config" block below into the file printed by the installer.
|
|
39
41
|
|
|
40
|
-
### Manager config
|
|
42
|
+
### Manager config (optional)
|
|
41
43
|
|
|
42
44
|
```yaml
|
|
43
45
|
- id: agent-lines
|
|
@@ -64,8 +66,8 @@ Only `createFrom` may call `line_create`. Worker profiles should leave `allowCre
|
|
|
64
66
|
## Quick start
|
|
65
67
|
|
|
66
68
|
1. Run the installer above.
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
69
|
+
2. **Restart DSH Web** so the plugin is loaded.
|
|
70
|
+
3. Open any root Session. The zero-config path needs no YAML.
|
|
69
71
|
4. Call line_status; if the Session is not bound, call line_claim_manager({ confirm: "bind-manager" }).
|
|
70
72
|
5. Say "create the first-use team"; wait for the member lines, then send the first task separately.
|
|
71
73
|
|
package/README.md
CHANGED
|
@@ -31,13 +31,15 @@ DSH 的 super agent 平替插件。
|
|
|
31
31
|
|
|
32
32
|
脚本会自动选择 DSH Web 使用的 profile,安装后检查 agent-lines 是否可用;如果判断不了,会列出已有配置并提示你怎么指定。
|
|
33
33
|
|
|
34
|
+
**安装或更新后必须重启 DSH Web。** 运行中的进程不会加载新插件代码。插件没有 config 时走零配置:启动一条未绑定 manager,根会话可以调用 line_claim_manager 自己绑定。显式“管理线配置”是可选的,用于固定 manager/worker。
|
|
35
|
+
|
|
34
36
|
离线或 npm 不可用时,用本地 tarball:
|
|
35
37
|
|
|
36
|
-
bash install.sh ./dsh-agent-lines-0.3.
|
|
38
|
+
bash install.sh ./dsh-agent-lines-0.3.2.tgz
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
安装并重启后,不写配置也可以直接使用;需要固定管理线/worker 时,再把下面“管理线配置”粘贴到脚本打印的配置文件。
|
|
39
41
|
|
|
40
|
-
###
|
|
42
|
+
### 管理线配置(可选)
|
|
41
43
|
|
|
42
44
|
```yaml
|
|
43
45
|
- id: agent-lines
|
|
@@ -64,8 +66,8 @@ DSH 的 super agent 平替插件。
|
|
|
64
66
|
## 快速开始
|
|
65
67
|
|
|
66
68
|
1. 运行上面的安装脚本。
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
69
|
+
2. **重启 DSH Web**,让插件加载。
|
|
70
|
+
3. 打开任意根会话。零配置路径不需要改 YAML。
|
|
69
71
|
4. 先调用 line_status;如果当前会话未绑定,调用 line_claim_manager({ confirm: "bind-manager" })。
|
|
70
72
|
5. 直接说“按首次使用创建团队”,然后等它建好成员线;第一个任务再单独发。
|
|
71
73
|
|
package/SECURITY.en.md
CHANGED
|
File without changes
|
package/SECURITY.md
CHANGED
|
File without changes
|
package/cordis.patch.yml
CHANGED
|
File without changes
|
package/docs/ARCHITECTURE.en.md
CHANGED
|
File without changes
|
package/docs/ARCHITECTURE.md
CHANGED
|
File without changes
|
package/docs/DEPLOY.en.md
CHANGED
|
File without changes
|
package/docs/DEPLOY.md
CHANGED
|
File without changes
|
package/docs/PROTOCOL.en.md
CHANGED
|
File without changes
|
package/docs/PROTOCOL.md
CHANGED
|
File without changes
|
package/docs/SECURITY.en.md
CHANGED
|
File without changes
|
package/docs/SECURITY.md
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/en/index.html
CHANGED
|
@@ -43,7 +43,7 @@ footer{padding:34px 0 48px;color:var(--muted);font-size:12px}
|
|
|
43
43
|
<div class="wrap">
|
|
44
44
|
<header>
|
|
45
45
|
<a class="brand" href="../"><span class="mark"></span>dsh-agent-lines</a>
|
|
46
|
-
<nav><a href="../">中文</a><a href="https://github.com/Lencen/dsh-agent-lines">GitHub</a><a href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.
|
|
46
|
+
<nav><a href="../">中文</a><a href="https://github.com/Lencen/dsh-agent-lines">GitHub</a><a href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.2">Release</a></nav>
|
|
47
47
|
</header>
|
|
48
48
|
<main>
|
|
49
49
|
<section class="hero" style="border:0;padding-bottom:22px">
|
|
@@ -54,7 +54,7 @@ footer{padding:34px 0 48px;color:var(--muted);font-size:12px}
|
|
|
54
54
|
<div class="install">curl -fsSL https://raw.githubusercontent.com/Lencen/dsh-agent-lines/main/install.sh -o install.sh && bash install.sh</div>
|
|
55
55
|
<div class="actions">
|
|
56
56
|
<a class="btn primary" href="https://github.com/Lencen/dsh-agent-lines">GitHub repository</a>
|
|
57
|
-
<a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.
|
|
57
|
+
<a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.2">Download 0.3.2</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
<div class="shot">
|
|
@@ -78,7 +78,7 @@ research / architecture / uiux / dev / test / acceptance / release / ops
|
|
|
78
78
|
Then call line_list and wait for my first task.</pre>
|
|
79
79
|
<p style="color:var(--muted);font-size:14px">Full docs, protocol, and limits: <a href="https://github.com/Lencen/dsh-agent-lines">README</a>. Community plugin, not an official DeepSeek product.</p>
|
|
80
80
|
</section>
|
|
81
|
-
<footer>dsh-agent-lines 0.3.
|
|
81
|
+
<footer>dsh-agent-lines 0.3.2 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
|
|
82
82
|
</main>
|
|
83
83
|
</div>
|
|
84
84
|
</body>
|
package/docs/index.html
CHANGED
|
@@ -43,7 +43,7 @@ footer{padding:34px 0 48px;color:var(--muted);font-size:12px}
|
|
|
43
43
|
<div class="wrap">
|
|
44
44
|
<header>
|
|
45
45
|
<a class="brand" href="./"><span class="mark"></span>dsh-agent-lines</a>
|
|
46
|
-
<nav><a href="en/index.html">English</a><a href="https://github.com/Lencen/dsh-agent-lines">GitHub</a><a href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.
|
|
46
|
+
<nav><a href="en/index.html">English</a><a href="https://github.com/Lencen/dsh-agent-lines">GitHub</a><a href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.2">Release</a></nav>
|
|
47
47
|
</header>
|
|
48
48
|
<main>
|
|
49
49
|
<section class="hero" style="border:0;padding-bottom:22px">
|
|
@@ -54,7 +54,7 @@ footer{padding:34px 0 48px;color:var(--muted);font-size:12px}
|
|
|
54
54
|
<div class="install">curl -fsSL https://raw.githubusercontent.com/Lencen/dsh-agent-lines/main/install.sh -o install.sh && bash install.sh</div>
|
|
55
55
|
<div class="actions">
|
|
56
56
|
<a class="btn primary" href="https://github.com/Lencen/dsh-agent-lines">GitHub 仓库</a>
|
|
57
|
-
<a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.
|
|
57
|
+
<a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.2">下载 0.3.2</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
<div class="shot">
|
|
@@ -78,7 +78,7 @@ research / architecture / uiux / dev / test / acceptance / release / ops
|
|
|
78
78
|
创建后用 line_list 确认,然后待命。</pre>
|
|
79
79
|
<p style="color:var(--muted);font-size:14px">完整说明、协议和限制见 <a href="https://github.com/Lencen/dsh-agent-lines">README</a>。社区插件,不是 DeepSeek 官方产品。</p>
|
|
80
80
|
</section>
|
|
81
|
-
<footer>dsh-agent-lines 0.3.
|
|
81
|
+
<footer>dsh-agent-lines 0.3.2 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
|
|
82
82
|
</main>
|
|
83
83
|
</div>
|
|
84
84
|
</body>
|
package/docs/market-index.json
CHANGED
package/lib/delivery.js
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
@@ -40,20 +40,25 @@ function normalizeLine(entry, agentId, index) {
|
|
|
40
40
|
/** Validate and normalize plugin config. Exported for tests and the CLI. */
|
|
41
41
|
export function normalizeConfig(raw = {}) {
|
|
42
42
|
if (raw === null || typeof raw !== 'object') throw new LineError('LINE_INVALID_CONFIG', 'Plugin config must be an object')
|
|
43
|
-
const agentId = validateAgentId(raw.agentId)
|
|
44
43
|
const legacy = raw.line !== undefined && raw.sessionId !== undefined
|
|
45
44
|
? [{ label: raw.line, sessionId: raw.sessionId }]
|
|
46
45
|
: []
|
|
47
46
|
const rawLines = Array.isArray(raw.lines) ? raw.lines : legacy
|
|
48
|
-
|
|
49
|
-
const
|
|
47
|
+
const zeroConfig = rawLines.length === 0 && raw.lines === undefined && raw.line === undefined
|
|
48
|
+
const agentId = raw.agentId === undefined && zeroConfig
|
|
49
|
+
? 'agent-lines'
|
|
50
|
+
: validateAgentId(raw.agentId)
|
|
51
|
+
if (rawLines.length === 0 && !zeroConfig) throw new LineError('LINE_INVALID_CONFIG', 'At least one line is required (lines[] or line/sessionId)')
|
|
52
|
+
const lines = zeroConfig
|
|
53
|
+
? [{ agentId, label: 'manager', sessionId: '', lineId: lineId(agentId, 'manager'), role: null }]
|
|
54
|
+
: rawLines.map((entry, index) => normalizeLine(entry, agentId, index))
|
|
50
55
|
const labels = new Set()
|
|
51
56
|
const sessions = new Set()
|
|
52
57
|
for (const line of lines) {
|
|
53
58
|
if (labels.has(line.label)) throw new LineError('LINE_INVALID_CONFIG', `Duplicate line label: ${line.label}`)
|
|
54
|
-
if (sessions.has(line.sessionId)) throw new LineError('LINE_INVALID_CONFIG', `Duplicate sessionId: ${line.sessionId}`)
|
|
59
|
+
if (line.sessionId !== '' && sessions.has(line.sessionId)) throw new LineError('LINE_INVALID_CONFIG', `Duplicate sessionId: ${line.sessionId}`)
|
|
55
60
|
labels.add(line.label)
|
|
56
|
-
sessions.add(line.sessionId)
|
|
61
|
+
if (line.sessionId !== '') sessions.add(line.sessionId)
|
|
57
62
|
}
|
|
58
63
|
const createFrom = raw.createFrom === undefined ? lines[0].label : validateLineLabel(raw.createFrom)
|
|
59
64
|
if (!labels.has(createFrom)) throw new LineError('LINE_INVALID_CONFIG', `createFrom must name a configured line: ${createFrom}`)
|
|
@@ -66,9 +71,9 @@ export function normalizeConfig(raw = {}) {
|
|
|
66
71
|
transport,
|
|
67
72
|
lines,
|
|
68
73
|
createFrom,
|
|
69
|
-
maxLines: integer(raw.maxLines, 16, { min: lines.length, max: 256 }),
|
|
70
|
-
allowCreate: raw.allowCreate === true,
|
|
71
|
-
allowClaim: raw.allowClaim === true,
|
|
74
|
+
maxLines: integer(raw.maxLines, 16, { min: Math.max(1, lines.length), max: 256 }),
|
|
75
|
+
allowCreate: raw.allowCreate === undefined ? zeroConfig : raw.allowCreate === true,
|
|
76
|
+
allowClaim: raw.allowClaim === undefined ? zeroConfig : raw.allowClaim === true,
|
|
72
77
|
allowSelfSend: raw.allowSelfSend === true,
|
|
73
78
|
dedupeWindowMs: integer(raw.dedupeWindowMs, 5_000, { min: 0, max: 3_600_000 }),
|
|
74
79
|
maxReplyDepth: integer(raw.maxReplyDepth, 8, { min: 1, max: 100 }),
|
|
@@ -344,6 +349,10 @@ export async function apply(ctx, rawConfig) {
|
|
|
344
349
|
startupLines.push(effective)
|
|
345
350
|
}
|
|
346
351
|
for (const def of startupLines) {
|
|
352
|
+
if (def.sessionId === '') {
|
|
353
|
+
ctx.logger?.info?.('agent-lines: manager %s is unbound; waiting for claim', def.label)
|
|
354
|
+
continue
|
|
355
|
+
}
|
|
347
356
|
if (!(await sessionExists(def.sessionId))) {
|
|
348
357
|
ctx.logger?.warn?.('agent-lines: Session %s for line %s is missing; line stays unbound until claimed', def.sessionId, def.label)
|
|
349
358
|
lineDefs.set(def.sessionId, { ...def, missing: true })
|
package/lib/prompt.js
CHANGED
|
File without changes
|
package/lib/protocol.js
CHANGED
|
File without changes
|
package/lib/store.js
CHANGED
|
@@ -101,7 +101,10 @@ PRAGMA user_version = 6;
|
|
|
101
101
|
`
|
|
102
102
|
|
|
103
103
|
export function defaultDbPath() {
|
|
104
|
-
|
|
104
|
+
const home = process.env.DSH_HOME === undefined || process.env.DSH_HOME.trim() === ''
|
|
105
|
+
? resolve(homedir(), '.dsh')
|
|
106
|
+
: resolve(process.env.DSH_HOME)
|
|
107
|
+
return resolve(home, 'agent-lines', 'lines.db')
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
function expandHome(path) {
|
package/lib/tools.js
CHANGED
|
@@ -59,6 +59,7 @@ export function registerStatusTool(ctx, { config, store, lineDefs }) {
|
|
|
59
59
|
const managerConfig = config.lines.find(line => line.label === config.createFrom)
|
|
60
60
|
const managerDef = [...lineDefs.values()].find(line => line.label === config.createFrom)
|
|
61
61
|
const managerSessionId = (managerDef ?? managerConfig)?.sessionId
|
|
62
|
+
const effectiveManagerSessionId = managerSessionId === undefined || managerSessionId === '' ? undefined : managerSessionId
|
|
62
63
|
const persistence = ctx.get?.('sessionPersistence')
|
|
63
64
|
|
|
64
65
|
const sessionState = async (sessionId) => {
|
|
@@ -71,12 +72,12 @@ export function registerStatusTool(ctx, { config, store, lineDefs }) {
|
|
|
71
72
|
return { live, persisted }
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
const manager =
|
|
75
|
+
const manager = effectiveManagerSessionId === undefined
|
|
75
76
|
? null
|
|
76
77
|
: {
|
|
77
78
|
label: config.createFrom,
|
|
78
|
-
sessionId:
|
|
79
|
-
...(await sessionState(
|
|
79
|
+
sessionId: effectiveManagerSessionId,
|
|
80
|
+
...(await sessionState(effectiveManagerSessionId)),
|
|
80
81
|
lease: store.listLines().find(line => line.label === config.createFrom)?.lease ?? null,
|
|
81
82
|
}
|
|
82
83
|
const lines = store.listLines().map(line => ({
|
package/lib/transport.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
Binary file
|