feat: add fanout mixture metadata

This commit is contained in:
artale 2026-06-27 13:54:45 +02:00
parent 8dd7e961a3
commit 237e8d2367
2 changed files with 21 additions and 1 deletions

View File

@ -47,6 +47,7 @@ describe("DynamicWorkflows fan-out routing", () => {
expect(result.routeContexts[1]?.flow).toBe("planning");
expect(result.routeContexts[2]?.flow).toBe("review");
expect(result.iterations).toHaveLength(3);
expect(result.mixtureOfAgents).toEqual({ provider: "fable-fan-out", workers: 3, synthesizer: "caller-provided", maxConcurrency: 3 });
expect(result.synthesisVerdict).toBeDefined();
});
});

View File

@ -45,11 +45,19 @@ export interface WorkflowDefinition {
maxConcurrency?: number;
}
export interface MixtureOfAgentsMetadata {
provider: "fable-fan-out";
workers: number;
synthesizer: "caller-provided";
maxConcurrency: number;
}
export interface FanOutResult {
iterations: LoopIteration[];
routeContexts: FanOutSubtaskRouteContext[];
synthesized: LoopIteration;
synthesisVerdict: VerificationResult;
mixtureOfAgents: MixtureOfAgentsMetadata;
}
export interface AdversarialResult {
@ -136,7 +144,18 @@ export class DynamicWorkflows {
// Phase 3: Verify the synthesis
const synthesisVerdict = this.verifier.verify(synthesized, task);
return { iterations, routeContexts, synthesized, synthesisVerdict };
return {
iterations,
routeContexts,
synthesized,
synthesisVerdict,
mixtureOfAgents: {
provider: "fable-fan-out",
workers: subTasks.length,
synthesizer: "caller-provided",
maxConcurrency,
},
};
}
/**