Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/agent / / evaluateMerge

Function: evaluateMerge()

ts
function evaluateMerge(perChild, cfg): MergeBiasDecision;

Defined in: packages/agent/src/lateral-leak/merge-guard.ts:120

Evaluate whether the merge is biased — a child with sourceTrust < lowTrustThreshold contributing more than maxLowTrustWeight of the merged output.

Inputs are pre-computed per-child trust scores together with the estimated contribution weights (token-count overlap between each child's output and the merged output, normalized to sum to ~1.0).

Parameters

ParameterType
perChildreadonly { agentId: string; contributionWeight: number; sourceTrust: number; }[]
cfgMergeGuardConfig

Returns

MergeBiasDecision

Stable