API Reference
Grader
type Grader = (ctx) =>
| Grade
| Promise<Grade>;Defined in: goal/goal.types.ts:67
Judges a round and decides whether the goal is met.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | GradeContext | The round's snapshot. |
Returns
The Grade for this round.
Remarks
Parallels StopCondition: a function, sync or async, the caller owns.
Returning { done: true } ends the loop; { done: false, feedback } drives the
next round with feedback as the prompt.