/** * Task-level picks on top of the Jev picker, each keeping the fallback its * caller had before: keyword ranking for `monomind pick` and org skill search, * a keyword role match for auto-assignment, and a keyword pool match for * per-task skills. */ import { type TaskOutcome } from '../orgrt/task-match.js'; import type { OrgRole } from '../orgrt/types.js'; import { type CatalogItem, type PickOptions } from './jev.js'; export interface RankedEntry { id: string; name?: string; category?: string; invoke?: string; source?: CatalogItem['source']; origin?: CatalogItem['origin']; description?: string; probability?: number; score?: number; /** Keyword agents re-ranked by the outcome prior: the relevance score * before it and the factor applied (`score` = baseScore × prior). */ baseScore?: number; prior?: number; } export interface RankedList { method: 'jev' | 'keyword'; /** `jev`: the model's ranking; `keyword`: no model is configured; * `keyword-fallback`: the model was asked but gave no usable answer or * one below the pick floor. */ source: 'jev' | 'keyword' | 'keyword-fallback'; /** A Jev answer between the pick floor and the automatic-decision floor: * worth showing, not worth acting on unattended. */ lowConfidence: boolean; /** The top entry clears the bar the prompt hook's [PICK] line uses: a Jev * answer at the automatic floor, or a keyword leader past pick-rank's gate * for a question Jev did not answer. False for an empty list (a Jev * "none fits" included). Only a confident top is worth acting on. */ confident: boolean; ranked: RankedEntry[]; } export interface RankOptions extends PickOptions { /** Jev answers below this are discarded for keyword ranking. Defaults to * MONOMIND_JEV_PICK_MIN_CONFIDENCE (0.25); pass automaticMinConfidence() * to rank only answers an unattended caller would act on. */ minConfidence?: number; /** Project root whose .monomind/pick-stats.json re-ranks keyword agent * results (a bounded outcome prior). Omitted: plain keyword order. */ priorsRoot?: string; } export interface TaskRanking { provider?: string; agents: RankedList; skills: RankedList; } export declare function rankForTask(task: string, catalogs: { agents: CatalogItem[]; skills: CatalogItem[]; }, top: number, opts?: RankOptions): Promise; /** Up to two skills from a role's pool that fit this task; [] = no suggestion. * Jev decides when it answers (its "none" included); without a decision * model, or when it fails, a keyword match over the pool does, biased by * `history` toward skills whose tasks finished done. Either way only names * from the pool can come back. */ export declare function suggestTaskSkills(title: string, pool: string[], root: string, opts?: PickOptions & { brief?: string; onMethod?: (method: 'jev' | 'keyword') => void; history?: TaskOutcome[]; }): Promise; /** The role that should own a task: Jev first, then a keyword match (see * orgrt/task-match.ts pickTaskRole for the rules and the provenance). */ export declare function pickRoleForTask(title: string, roles: Pick[], opts?: PickOptions): Promise; /** Re-rank `org skills search` keyword hits by Jev; unranked hits keep their * keyword order after the ranked ones. Only hits `jevVisible` under `root` * are sent; the others stay in keyword order among the unranked. */ export declare function rankOrgSkills(query: string, found: T[], limit: number, opts?: PickOptions & { root?: string; }): Promise<{ method: 'jev' | 'keyword'; hits: (T & { probability?: number; })[]; }>; //# sourceMappingURL=picks.d.ts.map