/** * 测试用 runner 注入(MCP 单测隔离——不触发真实 LLM/进程)。 * @param runner fake runner(返回判定输入;缺省 null 恢复默认 dag-runner) */ export declare function setLoopDebugTestRunner(runner: ((task: string, round: number) => Promise<{ exitCode?: number | null; output?: string; stderr?: string; durationMs?: number; }>) | null): void; export interface LoopDebugArgs { /** 任务描述(缺省 = 查询模式,不触发新循环) */ task?: string; /** Agent 身份码(交付 6 协同;写入调试记录) */ agent_id?: string; /** 最大循环轮数(默认 3) */ max_rounds?: number; /** 超时阈值 ms(默认 120000) */ timeout_ms?: number; } export interface LoopDebugResult { /** 首行必须 [sofagent] 前缀 */ text: string; /** 结构化数据 */ data: { mode: 'run' | 'query'; taskId?: string; agentId?: string; finalState?: string; rounds?: Array<{ round: number; state: string; detail: string; durationMs?: number; }>; records?: Array<{ ts: string; taskId: string; agentId?: string; round: number; state: string; }>; isError: boolean; }; } /** * 触发 Onboard L1 调试循环(有 task)或查询最近调试记录(无 task)。 * * @param args 参数 * @returns 结构化结果(text + data) */ export declare function loopDebug(args: LoopDebugArgs): Promise; //# sourceMappingURL=loop-debug.d.ts.map