UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

28 lines • 1.52 kB
import { type ToolApprovalPrior } from '../approval-prior.js'; import type { ScorableRun, ScoreResult, Scorer, ScorerKind } from '../types.js'; /** {@link ApprovalRiskScorer}'s stable name. */ export declare const APPROVAL_RISK_SCORER = "approval-risk"; /** * How likely a human is to reject what this run proposed — BEFORE a human looks at it. * * {@link import('./approval-outcome.scorer.js').ApprovalOutcomeScorer} reads verdicts that already * exist; this turns the same corpus into a prediction, so a pending approvals inbox can be drained * riskiest-first and a run that is about to be rejected can be caught while it is still cheap. It is * the statistical family, not the rule-based one: the number is a smoothed frequency estimate over * past decisions, and its `metadata` carries the sample it rests on so a 1-of-1 rejection is never * mistaken for certainty. * * A run scores as its WORST proposed action, not the average of them. A turn that proposes one tool * humans reject nine times in ten is a risky turn no matter how many safe reads it made alongside. * * `null` for a run that proposed no action — the same "not applicable, not perfect" rule as the * outcome scorer. */ export declare class ApprovalRiskScorer implements Scorer { private readonly prior; readonly name = "approval-risk"; readonly kind: ScorerKind; constructor(prior: ToolApprovalPrior); score(run: ScorableRun): Promise<ScoreResult | null>; } //# sourceMappingURL=approval-risk.scorer.d.ts.map