Type Aliases

CheckInScorer

Type Alias: CheckInScorer

CheckInScorer = (input) => readonly CheckInDriver[] | Promise<readonly CheckInDriver[]>

Defined in: src/core/checkin.ts:245

Ranks context units by how strongly each drove one tool choice. The DEFAULT is lexicalDriverScorer — deterministic, zero LLM, zero network. Swap in a richer one via .checkIn({ scorer }), e.g. wrapping explainChoice from agentfootprint with your own embedder.

Parameters

input

CheckInScoreInput

Returns

readonly CheckInDriver[] | Promise<readonly CheckInDriver[]>

Example

a semantic scorer
  const scorer: CheckInScorer = async ({ tool, units, signal }) => {
    const ex = await explainChoice({ tool, units, embedder, signal });
    return ex.units.map((u) => ({ id: u.id, channel: u.channel, text: u.text, score: u.score }));
  };

On this page