/** * Jev, through OpenRouter's Decisions endpoint — the first advisor adapter (ADR-0077). * * **What is verified and what is not.** The REQUEST shape below is taken from OpenRouter's own SDK reference for * `POST /api/alpha/decisions`: `{model, state, questions}`, where each question is `noul` with `criteria.true` and * `criteria.false`, `choice` with a `criteria` map of option to description, or `score` with a `criteria` array of * level descriptions. That much is documented. The RESPONSE is described there only as an `answers` object beside * `id`, `model`, `provider` and `usage`, with probabilities and confidence mentioned but never shown, and the one * public guide to this endpoint says plainly that it has not run paid calls either. **So no shape below has been * confirmed against a live response.** The parser therefore accepts what the documentation describes, tolerates the * obvious variants, and returns `null` for anything else rather than guessing — which is the same thing it does when * the endpoint is down. A live check is the `PI_DADDY_IT_JEV=1` tier, and until somebody runs it this adapter's * response handling is a reading of documentation, not a measurement. * * Nothing here can widen anything: it returns `Advice`, and no kernel or governance function accepts one. */ import type { Advice, AdviceRequest, Answer, Decider, Question } from "./decider.ts"; export declare const JEV_ENDPOINT = "https://openrouter.ai/api/alpha/decisions"; export declare const JEV_MODEL = "typesafe/jev-1.13"; /** The wire form of one question, exactly as OpenRouter's reference documents it. */ export declare function wireQuestion(question: Question): Record; export declare function wireRequest(request: AdviceRequest, model: string): Record; /** * Read one answer out of a response, or nothing. * * Deliberately generous about WHERE the value and the probability sit, because the documentation names the fields * without showing them, and strict about WHAT they are: a `choice` answer must be one of the options that were * asked about, and a `score` must be an index into the levels. An answer outside the question's own vocabulary is * not a low-confidence answer, it is a response we did not understand, and the honest reading of that is no advice. */ export declare function parseAnswer(question: Question, raw: unknown): Answer | undefined; export declare function parseAdvice(request: AdviceRequest, body: unknown): Advice | null; export interface JevConfig { apiKey: string; model?: string; endpoint?: string; /** Injected so the adapter is testable without a network, and so nothing here reaches for a global. */ fetch?: typeof globalThis.fetch; } export declare function jevDecider(config: JevConfig): Decider; //# sourceMappingURL=jev.d.ts.map