@gehennawu/dsh-service 1.6.2 → 1.6.3

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/index.js CHANGED
@@ -3828,6 +3828,11 @@ async function listSessionsForManage(ctx, dshHome, scope = 'all', titleCache = n
3828
3828
  for (const record of recordsInScope) {
3829
3829
  const id = record.header.id
3830
3830
  if (deletedSet.has(id)) continue
3831
+ // 子代理识别(官方 SessionHeader 字段):origin='subagent' 是官方产品分类
3832
+ // (dsh-subagent 创建时写入,官方自身也按此圈定);delegationDepth>0 兜底
3833
+ // 老日志缺 origin 的子代理;parentSession 只是 fork 血统(普通 fork 也写),不作判据。
3834
+ const subagent = record.header.origin === 'subagent'
3835
+ || (typeof record.header.delegationDepth === 'number' && record.header.delegationDepth > 0)
3831
3836
  items.push({
3832
3837
  id,
3833
3838
  title: titles.get(id) ?? (titleCache !== null ? titleCache.get(id)?.title : undefined) ?? '',
@@ -3836,6 +3841,7 @@ async function listSessionsForManage(ctx, dshHome, scope = 'all', titleCache = n
3836
3841
  live: record.live === true,
3837
3842
  persisted: record.persisted === true,
3838
3843
  archived: archivedSet.has(id),
3844
+ subagent,
3839
3845
  })
3840
3846
  }
3841
3847
  items.sort((a, b) => (b.createdAt ?? 0) - (a.createdAt ?? 0))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gehennawu/dsh-service",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "DSH Web 运维面板:安全重启、健康监控、备份和 Linux 权限维护。",
5
5
  "type": "module",
6
6
  "scripts": {