@chenkai114/dsh-team-admin 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenkai114/dsh-team-admin",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "DSH 插件:GUI 管理任意会话的智能体团队 —— 查看成员、删除角色并清理其持久会话(进回收站,可恢复)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/client.js CHANGED
@@ -186,13 +186,15 @@
186
186
 
187
187
  function stripDismissedCatalogs(payload, dismissed) {
188
188
  if (payload === null || typeof payload !== 'object' || dismissed === undefined || dismissed.size === 0) return payload
189
+ const keep = (entry) => !(entry !== null && typeof entry === 'object' && typeof entry.id === 'string' && dismissed.has(entry.id))
189
190
  const visit = (node, depth) => {
190
191
  if (node === null || typeof node !== 'object' || depth > 6) return
191
- if (Array.isArray(node.subagentCatalog)) {
192
- node.subagentCatalog = node.subagentCatalog.filter((entry) => !(entry !== null && typeof entry === 'object' && typeof entry.id === 'string' && dismissed.has(entry.id)))
193
- }
192
+ // 1) 顶部「子智能体」选择器:宿主 catalog 投影
193
+ if (Array.isArray(node.subagentCatalog)) node.subagentCatalog = node.subagentCatalog.filter(keep)
194
+ // 2) 「智能体团队」面板:宿主 roster 投影(成员数组)
195
+ if (isRecord(node.agentTeam) && Array.isArray(node.agentTeam.members)) node.agentTeam.members = node.agentTeam.members.filter(keep)
194
196
  for (const key of Object.keys(node)) {
195
- if (key === 'subagentCatalog') continue
197
+ if (key === 'subagentCatalog' || key === 'agentTeam') continue
196
198
  visit(node[key], depth + 1)
197
199
  }
198
200
  }
package/src/index.js CHANGED
@@ -17,7 +17,7 @@ const DATA_DIR_ENV = 'DSH_TEAM_ADMIN_DATA_DIR'
17
17
  /** 路由前缀:webServer 只支持 exact/prefix 注册。 */
18
18
  const ROUTE_PREFIX = '/api/team-admin'
19
19
  /** 与 package.json 版本保持一致(发布前由测试校验)。 */
20
- const PLUGIN_VERSION = '0.1.5'
20
+ const PLUGIN_VERSION = '0.1.6'
21
21
 
22
22
  /**
23
23
  * 解析插件数据目录。