@flow-state-dev/patterns/benchmark
Variables
debateBenchmarkAdapter
const debateBenchmarkAdapter: BenchmarkAdapter;
Debate adapter — pro/con debaters the pattern builds from the shared model
(debater entries omit block), then a judge + synthesizer. Maps the task
prompt onto { question }.
defaultBenchmarkRegistry
const defaultBenchmarkRegistry: BenchmarkRegistry;
The shipped roster of pattern adapters, keyed by pattern name. Six entries:
supervisor, plan-and-execute, parallel-tasks, round-robin, debate,
routed-specialists.
parallelTasksBenchmarkAdapter
const parallelTasksBenchmarkAdapter: BenchmarkAdapter;
Parallel-tasks adapter — fan-out / fan-in over the shared worker, then the default combiner.
planAndExecuteBenchmarkAdapter
const planAndExecuteBenchmarkAdapter: BenchmarkAdapter;
Plan-and-execute adapter — planner / executor / synthesizer all default
internally from the shared model.
roundRobinBenchmarkAdapter
const roundRobinBenchmarkAdapter: BenchmarkAdapter;
Round-robin adapter — a 3-worker roster whose agents the pattern builds from
the shared model (roster entries omit block).
routedSpecialistsBenchmarkAdapter
const routedSpecialistsBenchmarkAdapter: BenchmarkAdapter;
Routed-specialists adapter — a controller picks among two shared-worker
specialists over a { goal } workspace. The bare { goal } task reaches the
pattern via initialState, which seeds the workspace from the input; the
default controller reads the workspace and picks specialists by name.
supervisorBenchmarkAdapter
const supervisorBenchmarkAdapter: BenchmarkAdapter;
Supervisor adapter — plan → per-task review → synthesize. Wired with the shared worker as the uniform reviewed worker.
Functions
sharedDefaultWorker()
function sharedDefaultWorker(name, model): BlockDefinition<ZodAny, ZodString, unknown, string>;
Build the shared benchmark worker: a single-shot generator that takes a task and returns a plain-string answer.
Input is intentionally permissive (z.any()) because different patterns hand
workers different shapes — supervisor/parallelTasks pass the substrate
TaskWorkerInput ({ taskId, goal, ... }); routedSpecialists pass whatever
the controller threads. user() normalises: a bare string is the task; an
object's goal field is the task; anything else is JSON-serialised.
Parameters
name
string
model
string
Returns
BlockDefinition<ZodAny, ZodString, unknown, string>