dsh-agent-lines 0.3.7 → 0.3.8
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/README.en.md +3 -3
- package/README.md +8 -3
- 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/activity.js +19 -0
- package/lib/tools.js +13 -1
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.3.8 (2026-11-09)
|
|
6
|
+
|
|
7
|
+
- line_status / line_list expose activity: turns/steps/decodeTokens/level/lastActivityAt.
|
|
8
|
+
- activityLevel is an activity proxy, not a context-window percentage; DSH does not expose context usage.
|
|
9
|
+
- Remains compatible with the 0.3.6/0.3.7 lifecycle/title work.
|
|
10
|
+
- Tests 35/35 pass.
|
|
11
|
+
|
|
5
12
|
## 0.3.7 (2026-11-09)
|
|
6
13
|
|
|
7
14
|
- Added line_handoff: structured handoff snapshots (JSON/Markdown), no model call.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[English](CHANGELOG.en.md) | 中文
|
|
4
4
|
|
|
5
|
+
## 0.3.8 (2026-11-09)
|
|
6
|
+
|
|
7
|
+
- line_status / line_list 增加 activity:turns/steps/decodeTokens/level/lastActivityAt。
|
|
8
|
+
- 明确 activityLevel 只是活跃度代理,不是 contextUsage 百分比;DSH 未暴露上下文窗口。
|
|
9
|
+
- 生命周期/标题/在飞版本保持 0.3.6/0.3.7 兼容。
|
|
10
|
+
- 测试 35/35 通过。
|
|
11
|
+
|
|
5
12
|
## 0.3.7 (2026-11-09)
|
|
6
13
|
|
|
7
14
|
- 新增 line_handoff:结构化交接快照(JSON/Markdown),不调用模型。
|
package/README.en.md
CHANGED
|
@@ -36,7 +36,7 @@ The script picks the DSH Web profile, installs the plugin, and verifies agent-li
|
|
|
36
36
|
|
|
37
37
|
Offline or when npm is unavailable, use the local tarball:
|
|
38
38
|
|
|
39
|
-
bash install.sh ./dsh-agent-lines-0.3.
|
|
39
|
+
bash install.sh ./dsh-agent-lines-0.3.8.tgz
|
|
40
40
|
|
|
41
41
|
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.
|
|
42
42
|
|
|
@@ -134,7 +134,7 @@ Tools:
|
|
|
134
134
|
|
|
135
135
|
| Tool | Purpose |
|
|
136
136
|
|---|---|
|
|
137
|
-
| `line_status` | Read-only: current Session binding, manager Session live/persisted, lines, repair command; visible even when unbound |
|
|
137
|
+
| `line_status` | Read-only: current Session binding, manager Session live/persisted, lines, repair command; visible even when unbound; includes activity (not contextUsage) |
|
|
138
138
|
| `line_claim_manager` | Bind this live root Session as manager; requires `allowClaim: true` and `confirm: "bind-manager"`; global, no shell needed |
|
|
139
139
|
| `line_list` | List lines, status, unread counts, current line and role |
|
|
140
140
|
| `line_create` | Manager only: create a line; same label is idempotent; replace:true swaps the label to a fresh Session |
|
|
@@ -155,7 +155,7 @@ Line tools other than `line_status` and `line_claim_manager` are registered only
|
|
|
155
155
|
|
|
156
156
|
A line does not inherit the old Session context. Recommended flow:
|
|
157
157
|
|
|
158
|
-
1. Have the old line write a handoff file (line_handoff is available from 0.3.
|
|
158
|
+
1. Have the old line write a handoff file (line_handoff is available from 0.3.8);
|
|
159
159
|
2. The manager calls `line_create({ label, replace: true, force: true, reason: "context full" })`;
|
|
160
160
|
3. The plugin creates a clean Session, atomically swaps the same label, and marks the old Session retired but keeps it;
|
|
161
161
|
4. queued/claimed messages migrate to the new line; delivered/acked stay on the old Session and are never re-delivered.
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ DSH 的 super agent 平替插件。
|
|
|
36
36
|
|
|
37
37
|
离线或 npm 不可用时,用本地 tarball:
|
|
38
38
|
|
|
39
|
-
bash install.sh ./dsh-agent-lines-0.3.
|
|
39
|
+
bash install.sh ./dsh-agent-lines-0.3.8.tgz
|
|
40
40
|
|
|
41
41
|
安装并重启后,不写配置也可以直接使用;需要固定管理线/worker 时,再把下面“管理线配置”粘贴到脚本打印的配置文件。
|
|
42
42
|
|
|
@@ -124,6 +124,11 @@ line_create({ label: "ops", role: "运维" })
|
|
|
124
124
|
|
|
125
125
|
这只是“用提示词组织团队”的方式,不是插件内置的组织架构;怎么拆任务由负责人模型决定。技术细节(消息、状态、工具)在下面的“使用”和“投递语义”。
|
|
126
126
|
|
|
127
|
+
## 上下文活跃度
|
|
128
|
+
|
|
129
|
+
line_status / line_list 返回 activity:turns/steps/decodeTokens/level/lastActivityAt。
|
|
130
|
+
level 是活跃度代理(low/medium/high),不是上下文使用率百分比;DSH 当前不暴露上下文窗口。
|
|
131
|
+
|
|
127
132
|
## 使用
|
|
128
133
|
|
|
129
134
|
管理线可以完全由对话驱动:
|
|
@@ -134,7 +139,7 @@ line_create({ label: "ops", role: "运维" })
|
|
|
134
139
|
|
|
135
140
|
| 工具 | 作用 |
|
|
136
141
|
|---|---|
|
|
137
|
-
| `line_status` | 只读:当前会话绑定、manager Session 是否存在/live
|
|
142
|
+
| `line_status` | 只读:当前会话绑定、manager Session 是否存在/live、线列表、修复命令;未绑定也可见;含 activity 活跃度(不是 contextUsage) |
|
|
138
143
|
| `line_claim_manager` | 把当前 live 根 Session 绑成 manager;需要 `allowClaim: true` 和 `confirm: "bind-manager"`;全局工具,不需要 shell |
|
|
139
144
|
| `line_list` | 列出线、状态、未读数、当前线和 role |
|
|
140
145
|
| `line_create` | 仅管理线:创建新线;同 label 幂等;传 replace:true 可给同 label 换新 Session |
|
|
@@ -155,7 +160,7 @@ line_create({ label: "ops", role: "运维" })
|
|
|
155
160
|
|
|
156
161
|
线不会自动继承旧 Session 的上下文。推荐流程:
|
|
157
162
|
|
|
158
|
-
1. 让旧线写交接单(0.3.
|
|
163
|
+
1. 让旧线写交接单(0.3.8 起可用 `line_handoff`);
|
|
159
164
|
2. 管理线调用 `line_create({ label, replace: true, force: true, reason: "context full" })`;
|
|
160
165
|
3. 插件创建干净 Session、同 label 原子切换,旧 Session 标记 retired 但保留;
|
|
161
166
|
4. queued/claimed 消息迁移到新线;delivered/acked 留在旧 Session,不重投。
|
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.8">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.8">Download 0.3.8</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
<div class="shot">
|
|
@@ -92,7 +92,7 @@ research (调研), architecture (架构), uiux (UIUX), dev (开发), test (测
|
|
|
92
92
|
After the team is ready, wait for my first task. Do not start by yourself.</pre>
|
|
93
93
|
<p style="color:var(--muted);font-size:14px">Restart DSH Web after install or update. Technical details, protocol, and limits: <a href="https://github.com/Lencen/dsh-agent-lines">README / architecture</a>. Community plugin, not an official DeepSeek product.</p>
|
|
94
94
|
</section>
|
|
95
|
-
<footer>dsh-agent-lines 0.3.
|
|
95
|
+
<footer>dsh-agent-lines 0.3.8 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
|
|
96
96
|
</main>
|
|
97
97
|
</div>
|
|
98
98
|
</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.8">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.8">下载 0.3.8</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
<div class="shot">
|
|
@@ -92,7 +92,7 @@ research(调研)、architecture(架构)、uiux(UIUX)、dev(开发
|
|
|
92
92
|
团队建好后先待命,不要自动开工,等我发第一个任务。</pre>
|
|
93
93
|
<p style="color:var(--muted);font-size:14px">安装或更新后需要重启 DSH Web。技术细节、协议和限制见 <a href="https://github.com/Lencen/dsh-agent-lines">README / 架构文档</a>。社区插件,不是 DeepSeek 官方产品。</p>
|
|
94
94
|
</section>
|
|
95
|
-
<footer>dsh-agent-lines 0.3.
|
|
95
|
+
<footer>dsh-agent-lines 0.3.8 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
|
|
96
96
|
</main>
|
|
97
97
|
</div>
|
|
98
98
|
</body>
|
package/docs/market-index.json
CHANGED
package/lib/activity.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Pure activity summarizer. Never claims a context-window percentage. */
|
|
2
|
+
export function activityLevel({ steps = 0, turns = 0 } = {}) {
|
|
3
|
+
const n = Number(steps) || 0
|
|
4
|
+
if (n >= 40) return 'high'
|
|
5
|
+
if (n >= 15) return 'medium'
|
|
6
|
+
return 'low'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function summarizeActivity(stats, lastActivityAt = null) {
|
|
10
|
+
if (stats === undefined || stats === null) return null
|
|
11
|
+
const turns = Number(stats.turns) || 0
|
|
12
|
+
const steps = Number(stats.steps) || 0
|
|
13
|
+
return {
|
|
14
|
+
turns, steps,
|
|
15
|
+
decodeTokens: Number(stats.decodeTokens) || 0,
|
|
16
|
+
level: activityLevel({ steps, turns }),
|
|
17
|
+
lastActivityAt: lastActivityAt === null ? null : Number(lastActivityAt),
|
|
18
|
+
}
|
|
19
|
+
}
|
package/lib/tools.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { createHash } from 'node:crypto'
|
|
7
7
|
import { LineError, assertMessageSize, lineId, parseTarget } from './protocol.js'
|
|
8
|
+
import { summarizeActivity } from './activity.js'
|
|
8
9
|
|
|
9
10
|
const OUTPUT = {
|
|
10
11
|
schema: { type: 'object', additionalProperties: true },
|
|
@@ -48,6 +49,16 @@ function materializationOf(ctx, sessionId) {
|
|
|
48
49
|
} catch { return null }
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
function activityOf(ctx, sessionId) {
|
|
53
|
+
const projections = ctx.get?.('sessionProjections')
|
|
54
|
+
const agent = ctx.agents.get(sessionId)
|
|
55
|
+
if (projections?.snapshot === undefined || agent === undefined) return null
|
|
56
|
+
try {
|
|
57
|
+
const snapshot = projections.snapshot(agent.session, ['sessionStats'])
|
|
58
|
+
return summarizeActivity(snapshot?.values?.sessionStats, null)
|
|
59
|
+
} catch { return null }
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
function currentView(def) {
|
|
52
63
|
return def === undefined ? null : {
|
|
53
64
|
agentId: def.agentId, line: def.label, sessionId: def.sessionId, lineId: def.lineId, role: def.role,
|
|
@@ -106,6 +117,7 @@ export function registerStatusTool(ctx, { config, store, lineDefs }) {
|
|
|
106
117
|
lease: line.lease,
|
|
107
118
|
live: ctx.agents.get(line.session_id) !== undefined,
|
|
108
119
|
materialized: materializationOf(ctx, line.session_id),
|
|
120
|
+
activity: activityOf(ctx, line.session_id),
|
|
109
121
|
}))
|
|
110
122
|
const current = currentId === undefined
|
|
111
123
|
? null
|
|
@@ -178,7 +190,7 @@ export function registerToolsForAgent(agent, def, { config, store, lineDefs, cre
|
|
|
178
190
|
const current = lineDefs.get(exec?.agent?.session?.id)
|
|
179
191
|
return {
|
|
180
192
|
current: currentView(current),
|
|
181
|
-
lines: store.listLines().map(line => ({ ...line, live: agent.ctx.agents.get(line.session_id) !== undefined, materialized: materializationOf(agent.ctx, line.session_id) })),
|
|
193
|
+
lines: store.listLines().map(line => ({ ...line, live: agent.ctx.agents.get(line.session_id) !== undefined, materialized: materializationOf(agent.ctx, line.session_id), activity: activityOf(agent.ctx, line.session_id) })),
|
|
182
194
|
bootstrapOnCreate: config.bootstrapOnCreate,
|
|
183
195
|
}
|
|
184
196
|
},
|