import type { CodaliGatewayClassifierOutput } from "./CodaliGatewayTypes.js"; /** * Whether an answer must come from retrieved evidence, or may come from the * model itself. * * Codali was built for questions about things it cannot know — a tenant's Jira, * this week's commits, a repository it has never seen — so every answer was * required to rest on a tool result. Asked to compose a short poem, it searched * the repository, found nothing, and reported that the information could not be * verified. Asked a settled geography fact, it retrieved the answer and still * hedged. * * Both modes are necessary and they are not interchangeable: * * - `grounded` — the answer must be traceable to a source. Anything about the * user's data, this workspace, or the current state of the world. * - `open` — the model answers from its own knowledge. Generation and ordinary * reasoning, where there is no source to cite and demanding one produces a * refusal instead of an answer. * * The default is `grounded`. A wrong `open` invents facts; a wrong `grounded` * only wastes a search, so the failure modes are not symmetric and the * uncertain case must fall to `grounded`. */ export type CodaliGroundingMode = "grounded" | "open"; export interface GroundingDecision { mode: CodaliGroundingMode; reason: string; } export interface GroundingDecisionInput { query: string; classifier: Pick; } export declare const decideGroundingMode: (input: GroundingDecisionInput) => GroundingDecision; /** * Whether the request is about data the user owns, and so whether the * connectors that reach their accounts should be offered at all. * * Deliberately generous: a wrong "yes" offers a tool the planner may ignore, * while a wrong "no" hides the only tool that could have answered. So the * classifier's own judgement is honoured first, and either naming the system or * claiming the data is enough. */ export declare const requestTouchesOwnData: (query: string, classifier: Pick) => boolean; //# sourceMappingURL=GroundingMode.d.ts.map