@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 +1 -1
- package/src/client.js +6 -4
- package/src/index.js +1 -1
package/package.json
CHANGED
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
|
-
|
|
192
|
-
|
|
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.
|
|
20
|
+
const PLUGIN_VERSION = '0.1.6'
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* 解析插件数据目录。
|