import { ContextManager } from "../context/context-manager"; import { ToolRegistry } from "../tools/registry"; import { ToolExecutor } from "./tool-executor"; export interface SubAgentConfig { id: string; name: string; role: string; systemPrompt: string; toolNames: string[]; /** 允许灵活调用的跨类工具白名单:不参与 prompt 中工具主清单的重点推荐, * 但实际执行时放行;用于常见联动(如 web→数据库、pwn→linux 提权)。 */ crossCategoryToolNames?: string[]; contextManager: ContextManager; toolExecutor?: ToolExecutor; maxSteps?: number; } export declare class SubAgent { id: string; name: string; role: string; systemPrompt: string; toolNames: string[]; crossCategoryToolNames: string[]; private contextManager; private toolRegistry; private toolExecutor?; private maxSteps; constructor(config: SubAgentConfig, toolRegistry: ToolRegistry); /** 本 agent 实际允许调用的工具全集(主工具 + 跨类白名单并集) */ getAllowedToolNames(): string[]; /** 某工具是否属于跨类白名单(仅白名单且不在主工具内) */ private isCrossCategory; /** * 真实 ReAct 循环:思考→行动→观察,直至 FINAL_ANSWER 或达到 maxSteps。 * 子 agent 仅支持单工具 ACTION(并发采集交给 MainAgent 统一调度)。 * 使用自身独立 context,无共享竞态。 */ run(task: string): Promise; /** 仅允许调用本专家工具集内的工具(主清单 + 跨类白名单);越权拒绝并给出委派建议 */ private executeScoped; private buildPrompt; getContext(): ContextManager; } //# sourceMappingURL=sub-agent.d.ts.map