Import lib/types/client/subagent-lineage.d.ts

This commit is contained in:
QQ 2026-11-11 22:28:42 +08:00
parent febbabcb9a
commit c449f2fa31
1 changed files with 27 additions and 0 deletions

27
lib/types/client/subagent-lineage.d.ts vendored Normal file
View File

@ -0,0 +1,27 @@
/**
* Plugin-owned projection of descendant counts from Session summaries.
*
* 0.1.2 移除了 `@deepseek-ai/dsh-client-runtime/client`(平台模块表不再提供
* `indexSubagentDescendants`),官方 ui-workspace 改为各自持有本地副本
* (packages/client/ui-workspace/src/client/subagent-lineage.ts,MIT)。这里
* 保持同一实现,使运行中的子代理会话数在树行上继续可见。
*/
import type { SessionId } from '@deepseek-ai/dsh-session/types';
interface LineageEntry {
readonly id: SessionId;
readonly parentId?: SessionId;
readonly origin?: 'subagent';
readonly running: boolean;
}
/** Descendant counts for one possible parent Session. */
export interface SubagentDescendantSummary {
readonly count: number;
readonly runningCount: number;
}
/**
* Index uninterrupted subagent descendants under each ancestor.
* @param summaries - Session summaries keyed by id.
* @returns descendant totals keyed by possible parent id.
*/
export declare function indexSubagentDescendants(summaries: Readonly<Record<SessionId, LineageEntry>>): ReadonlyMap<SessionId, SubagentDescendantSummary>;
export {};