import { ConfigService } from "@nestjs/config"; import { ResponderService } from "../../agents/responder/services/responder.service"; import { BaseConfigInterface } from "../../config/interfaces/base.config.interface"; import { EvidenceMatcher } from "./evidence.matcher"; import { EndToEndSweepResult, EvalQuestionSet, SweepSummary } from "./retrieval-eval.types"; import { RubricJudgeService } from "./rubric-judge.service"; import { TokenAccountingChecker } from "./token-accounting.check"; /** * The metric of record (spec §6.4): a full assistant turn per question, in the * product's own voice, with its own prompts and temperature. * * Sequential on purpose — `answerMs` is a reported metric (spec §6.3). */ export declare class EndToEndSweepService { private readonly responder; private readonly judge; private readonly evidence; private readonly accounting; private readonly configService; private readonly logger; constructor(responder: ResponderService, judge: RubricJudgeService, evidence: EvidenceMatcher, accounting: TokenAccountingChecker, configService: ConfigService); /** * SCOPE COMES FROM CLS, NOT FROM THESE PARAMETERS. * * `companyId` and `userId` stay because `ResponderService.run` genuinely takes * them — but they do not scope retrieval. Company scope reaches the * `ChunkRepository` through `ClsService` (via `Neo4jService.initQuery`), and * the run's scope root through `AGENT_SCOPE_CLS_KEY` * (`common/repositories/agent-scope.filter.ts`), which fails closed. A caller * that does not establish that context retrieves nothing — or, worse, * retrieves unscoped. Establishing it is the entry point's job; see * apps/api/src/eval/run-sweep.ts. */ run(params: { set: EvalQuestionSet; companyId: string; userId: string; }): Promise>; /** * Feeds the checker the per-node figures the turn itself reported, so * `check()` compares them against the accumulated ledger. * * Spec §6.5 asks the sweep to sum the per-call figures and cross-check the * aggregate. The trace is where those per-node figures survive: each node * records what its own provider calls reported, while `response.tokens` is * the reducer-accumulated total — the exact pair whose disagreement IS the * §1.1 double-count. Without this the checker would see zero observed tokens * and declare a mismatch on every question, which is noise, not a check. */ private observeReportedCalls; } //# sourceMappingURL=end-to-end-sweep.service.d.ts.map