dsh-agent-lines 0.3.4 → 0.3.5

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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  English | [中文](CHANGELOG.md)
4
4
 
5
+ ## 0.3.5 (2026-11-05)
6
+
7
+ - Integrated P0/P1 bootstrap: line_create queues an onboarding message by default, adds bootstrapOnCreate, and line_status/line_list expose materialized / visibleInSidebar / bootstrapQueued.
8
+ - Kept the 0.3.4 docs and wording; README bootstrap notes were added manually on top of 0.3.4, not overwritten from the older local tree.
9
+ - No schema change; remains v6.
10
+
5
11
  ## 0.3.4 (2026-11-05)
6
12
 
7
13
  - Removed the conflicting suggestion that one-off subtasks should use subagent / Agent Teams.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  [English](CHANGELOG.en.md) | 中文
4
4
 
5
+ ## 0.3.5 (2026-11-05)
6
+
7
+ - 集成 P0/P1 bootstrap:line_create 默认排队 onboarding 消息,新增 bootstrapOnCreate,line_status/line_list 暴露 materialized / visibleInSidebar / bootstrapQueued。
8
+ - 保留 0.3.4 的文档与删句;README 以 0.3.4 为基础手工补 bootstrap 说明,没有用本地旧版覆盖。
9
+ - 无 schema 变化,仍为 v6。
10
+
5
11
  ## 0.3.4 (2026-11-05)
6
12
 
7
13
  - 删除与插件定位冲突的提示句:不再在 README / 落地页建议“临时子任务直接用 subagent / Agent Teams”。
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.4.tgz
39
+ bash install.sh ./dsh-agent-lines-0.3.5.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
 
@@ -64,6 +64,12 @@ After install and restart, it works without a config. When you want a fixed mana
64
64
 
65
65
  Only `createFrom` may call `line_create`. Worker profiles should leave `allowCreate` false.
66
66
 
67
+ ### New line bootstrap
68
+
69
+ When the manager calls line_create, the plugin queues a no-work onboarding message by default so the blank Session gets its first message and appears in the sidebar; pass bootstrap: false to skip it.
70
+
71
+ line_status / line_list return materialized, visibleInSidebar, and bootstrapQueued; a new line may remain blank until its first message.
72
+
67
73
  ## Quick start
68
74
 
69
75
  1. Run the installer above.
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.4.tgz
39
+ bash install.sh ./dsh-agent-lines-0.3.5.tgz
40
40
 
41
41
  安装并重启后,不写配置也可以直接使用;需要固定管理线/worker 时,再把下面“管理线配置”粘贴到脚本打印的配置文件。
42
42
 
@@ -64,6 +64,12 @@ DSH 的 super agent 平替插件。
64
64
 
65
65
  只有 `createFrom` 指定的线能调用 `line_create`。worker profile 不要开 `allowCreate`。
66
66
 
67
+ ### 新线 bootstrap
68
+
69
+ 管理线调用 line_create 创建新线时,插件默认排队一条不要求执行任务的 onboarding 消息,让空白 Session 产生第一条消息并出现在侧栏;传 bootstrap: false 可关闭。
70
+
71
+ line_status / line_list 会返回 materialized、visibleInSidebar、bootstrapQueued;新线在首条消息前可能仍是 blank。
72
+
67
73
  ## 快速开始
68
74
 
69
75
  1. 运行上面的安装脚本。
@@ -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.4">Release</a></nav>
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.5">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 &amp;&amp; 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.4">Download 0.3.4</a>
57
+ <a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.5">Download 0.3.5</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.4 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
95
+ <footer>dsh-agent-lines 0.3.5 · 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.4">Release</a></nav>
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.5">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 &amp;&amp; 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.4">下载 0.3.4</a>
57
+ <a class="btn" href="https://github.com/Lencen/dsh-agent-lines/releases/tag/v0.3.5">下载 0.3.5</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.4 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
95
+ <footer>dsh-agent-lines 0.3.5 · Apache-2.0 · Community plugin for DeepSeek Harness. Not an official DeepSeek product.</footer>
96
96
  </main>
97
97
  </div>
98
98
  </body>
@@ -50,11 +50,11 @@
50
50
  ]
51
51
  },
52
52
  "dist-tags": {
53
- "latest": "0.3.4"
53
+ "latest": "0.3.5"
54
54
  },
55
55
  "versions": [
56
56
  {
57
- "version": "0.3.4",
57
+ "version": "0.3.5",
58
58
  "publishTimestamp": 1793771000,
59
59
  "source": {
60
60
  "type": "npm"
@@ -50,11 +50,11 @@
50
50
  ]
51
51
  },
52
52
  "dist-tags": {
53
- "latest": "0.3.4"
53
+ "latest": "0.3.5"
54
54
  },
55
55
  "versions": [
56
56
  {
57
- "version": "0.3.4",
57
+ "version": "0.3.5",
58
58
  "publishTimestamp": 1793771000,
59
59
  "source": {
60
60
  "type": "npm"
package/lib/index.js CHANGED
@@ -74,6 +74,7 @@ export function normalizeConfig(raw = {}) {
74
74
  maxLines: integer(raw.maxLines, 16, { min: Math.max(1, lines.length), max: 256 }),
75
75
  allowCreate: raw.allowCreate === undefined ? zeroConfig : raw.allowCreate === true,
76
76
  allowClaim: raw.allowClaim === undefined ? zeroConfig : raw.allowClaim === true,
77
+ bootstrapOnCreate: raw.bootstrapOnCreate === undefined ? true : raw.bootstrapOnCreate === true,
77
78
  allowSelfSend: raw.allowSelfSend === true,
78
79
  dedupeWindowMs: integer(raw.dedupeWindowMs, 5_000, { min: 0, max: 3_600_000 }),
79
80
  maxReplyDepth: integer(raw.maxReplyDepth, 8, { min: 1, max: 100 }),
@@ -334,8 +335,38 @@ export async function apply(ctx, rawConfig) {
334
335
  if (agent !== undefined) bindAgent(agent)
335
336
  try {
336
337
  await ctx.sessionController.rename({ sessionId: actualSessionId, title: `line: ${label}` })
337
- } catch { /* a blank session may not materialize on rename; first delivery will */ }
338
- return { line: label, sessionId: actualSessionId, role, cwd: targetWorkspace?.path ?? cwd, workspaceId: targetWorkspace?.id ?? null, created: true }
338
+ } catch { /* a blank session may not materialize on rename; bootstrap/first delivery will */ }
339
+ let bootstrapQueued = false
340
+ if (args.bootstrap !== false && config.bootstrapOnCreate !== false && creator !== undefined) {
341
+ try {
342
+ store.send({
343
+ agentId: config.agentId,
344
+ fromLine: creator.label,
345
+ to: label,
346
+ text: `[Agent Line] ${label} onboarding. You are ${role ?? label}. This is an identity message: do not start work and do not modify files. Acknowledge briefly if needed, then wait for the manager's first task.`,
347
+ noReply: true,
348
+ maxReplyDepth: config.maxReplyDepth,
349
+ maxMessageBytes: config.maxMessageBytes,
350
+ })
351
+ bootstrapQueued = true
352
+ } catch (error) {
353
+ ctx.logger?.warn?.('agent-lines: line %s created but onboarding bootstrap failed: %s', label, String(error))
354
+ }
355
+ }
356
+ return {
357
+ line: label,
358
+ sessionId: actualSessionId,
359
+ role,
360
+ cwd: targetWorkspace?.path ?? cwd,
361
+ workspaceId: targetWorkspace?.id ?? null,
362
+ created: true,
363
+ materialized: false,
364
+ visibleInSidebar: false,
365
+ bootstrapQueued,
366
+ hint: bootstrapQueued
367
+ ? 'Onboarding message queued; the Session becomes visible after its first turn.'
368
+ : 'No bootstrap queued; send a standby message or refresh after the first delivery.',
369
+ }
339
370
  }
340
371
 
341
372
  try {
package/lib/tools.js CHANGED
@@ -37,6 +37,17 @@ function limitValue(value, fallback, max) {
37
37
  return number
38
38
  }
39
39
 
40
+ function materializationOf(ctx, sessionId) {
41
+ const live = ctx.agents.get(sessionId)
42
+ if (live === undefined) return null
43
+ const projections = ctx.get?.('sessionProjections')
44
+ if (projections?.snapshot === undefined) return null
45
+ try {
46
+ const meta = projections.snapshot(live.session, ['sessionListMetadata'])?.values?.sessionListMetadata
47
+ return meta === undefined ? null : meta.blank === false
48
+ } catch { return null }
49
+ }
50
+
40
51
  function currentView(def) {
41
52
  return def === undefined ? null : {
42
53
  agentId: def.agentId, line: def.label, sessionId: def.sessionId, lineId: def.lineId, role: def.role,
@@ -87,6 +98,7 @@ export function registerStatusTool(ctx, { config, store, lineDefs }) {
87
98
  createdBy: line.created_by,
88
99
  lease: line.lease,
89
100
  live: ctx.agents.get(line.session_id) !== undefined,
101
+ materialized: materializationOf(ctx, line.session_id),
90
102
  }))
91
103
  const current = currentId === undefined
92
104
  ? null
@@ -103,7 +115,7 @@ export function registerStatusTool(ctx, { config, store, lineDefs }) {
103
115
  : config.allowClaim
104
116
  ? `Current Session is not bound. Call line_claim_manager({ confirm: "bind-manager" }) to bind this root Session.`
105
117
  : `Current Session is not bound. Run: dsh-agent-lines claim --agent ${config.agentId} --line ${config.createFrom} --session ${currentId} (set allowClaim: true first)`
106
- return { current, manager, lines, allowClaim: config.allowClaim, repair }
118
+ return { current, manager, lines, allowClaim: config.allowClaim, bootstrapOnCreate: config.bootstrapOnCreate, repair }
107
119
  },
108
120
  })
109
121
  }
@@ -155,7 +167,11 @@ export function registerToolsForAgent(agent, def, { config, store, lineDefs, cre
155
167
  output: OUTPUT,
156
168
  execute: async (_args, exec) => {
157
169
  const current = lineDefs.get(exec?.agent?.session?.id)
158
- return { current: currentView(current), lines: store.listLines() }
170
+ return {
171
+ current: currentView(current),
172
+ lines: store.listLines().map(line => ({ ...line, live: agent.ctx.agents.get(line.session_id) !== undefined, materialized: materializationOf(agent.ctx, line.session_id) })),
173
+ bootstrapOnCreate: config.bootstrapOnCreate,
174
+ }
159
175
  },
160
176
  }))
161
177
 
@@ -268,7 +284,7 @@ export function registerToolsForAgent(agent, def, { config, store, lineDefs, cre
268
284
  if (config.allowCreate === true && def.label === config.createFrom) {
269
285
  disposers.push(agent.ctx.tools.register({
270
286
  name: 'line_create',
271
- description: 'Create a new independent DSH Session in this process and register it as an agent line, so it can be addressed with line_send. Only the configured manager line (createFrom) may call this. Reusing an existing label returns created:false without creating a Session. This does not create a separate OS process or transfer an existing Session.',
287
+ description: 'Create a new independent DSH Session in this process and register it as an agent line, so it can be addressed with line_send. Only the configured manager line (createFrom) may call this. Reusing an existing label returns created:false without creating a Session. By default the plugin queues a no-work onboarding message so the Session becomes non-blank and appears in the sidebar; pass bootstrap:false to skip it.',
272
288
  parameters: {
273
289
  type: 'object',
274
290
  additionalProperties: false,
@@ -278,6 +294,7 @@ export function registerToolsForAgent(agent, def, { config, store, lineDefs, cre
278
294
  agentPreset: { type: 'string', description: 'DSH agent preset; defaults to the plugin childPreset' },
279
295
  workspace: { type: 'string', description: 'Target workspace path or id; defaults to the manager workspace. Existing workspace only.' },
280
296
  cwd: { type: 'string', description: 'Working directory when no workspace is named; defaults to the manager Session cwd' },
297
+ bootstrap: { type: 'boolean', description: 'Queue a no-work onboarding message so the new Session appears in the sidebar; defaults to config.bootstrapOnCreate' },
281
298
  },
282
299
  required: ['label'],
283
300
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agent-lines",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "DSH Agent 的持久、可寻址消息线(社区插件)。",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",