@suifei/dsh-ai-team 0.4.21 → 0.4.22

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.
Files changed (2) hide show
  1. package/index.js +1 -23
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -52,7 +52,7 @@ export const name = 'ai-team';
52
52
  // 实际使用的服务(含可选服务:缺失时 serviceOf 回退 ctx.get 并返回 undefined)。
53
53
  export const inject = ['webServer', 'permissionPresets', 'sandboxPolicy', 'tools', 'shell', 'agents', 'subagents', 'sessions'];
54
54
 
55
- const VERSION = '0.4.21';
55
+ const VERSION = '0.4.22';
56
56
  const HUMAN_ID = 'mem_human';
57
57
 
58
58
  const SKILLOPT_BACKENDS = ['mock', 'claude', 'codex', 'copilot', 'cursor', 'pi', 'opencode', 'handoff', 'azure_openai'];
@@ -381,27 +381,6 @@ export function apply(ctx, config = {}) {
381
381
  return { kind: 'retry' };
382
382
  })
383
383
  : () => {};
384
- // 诊断:记录每个新建 agent(含成员)可见的工具名与 preset,
385
- // 用于判定「成员是否能调用插件注册的 team 工具」(SDK:工具默认继承,
386
- // 仅 ctx.tools.restrict() 会移除)。
387
- const offAgentCreated = typeof ctx.on === 'function'
388
- ? ctx.on('agent/created', (agent) => {
389
- try {
390
- const names = (agent?.ctx?.tools?.definitions?.() ?? []).map((definition) => definition.name);
391
- diag.append({
392
- ev: 'agent.created.probe.fail',
393
- agentId: agent?.id ?? null,
394
- parentId: agent?.meta?.parentSession ?? null,
395
- toolCount: names.length,
396
- hasTeam: names.includes('team'),
397
- preset: agent?.meta?.agentPreset ?? agent?.meta?.preset ?? null,
398
- names: names.slice(0, 40),
399
- });
400
- } catch (error) {
401
- diag.append({ ev: 'agent.created.probe.fail', error: error?.message ?? String(error) });
402
- }
403
- })
404
- : () => {};
405
384
  const offSessionEvent = typeof ctx.on === 'function'
406
385
  ? ctx.on('session/event', async (session, event) => {
407
386
  if (booted === null || event?.type !== 'turn/end') return;
@@ -1967,7 +1946,6 @@ export function apply(ctx, config = {}) {
1967
1946
  try { disposeSkillOpt(); } catch { /* already disposed */ }
1968
1947
  offRequestError();
1969
1948
  offSessionEvent();
1970
- offAgentCreated();
1971
1949
  disposeTool();
1972
1950
  dispose();
1973
1951
  for (const runtime of booted?.runtimes?.values() ?? []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "type": "module",
5
5
  "description": "文渊阁 (Wenyuan Pavilion) — AI Team mode for DeepSeek Harness: concurrent projects, owned tasks, threads, inbox and an append-only team ledger",
6
6
  "license": "MIT",