/** * Compact projection of a persona used for picker prompts. The model only * needs enough to reason about intent fit — full systemPrompts would inflate * the prompt without improving quality. */ export interface PickCandidate { id: string; intent: string; tags: readonly string[]; description: string; } export type PickConfidence = 'high' | 'medium' | 'low'; export type PickResult = { kind: 'match'; personaId: string; confidence: 'high' | 'medium'; reason: string; } | { kind: 'no-match'; reason: string; } | { kind: 'picker-unavailable'; message: string; }; /** * Test seam describing one round-trip to the picker subprocess. Returning a * structured shape keeps tests free of real `spawnSync` calls while preserving * the stdout/stderr/status surface the parser exercises. */ export interface PickerSubprocessRequest { bin: string; args: readonly string[]; systemPrompt: string; userPrompt: string; timeoutMs: number; } export interface PickerSubprocessResult { status: 'ok' | 'enoent' | 'error'; stdout: string; stderr: string; errorMessage?: string; } export type PickerRunner = (req: PickerSubprocessRequest) => PickerSubprocessResult; export interface PickPersonaOptions { claudeBin?: string; model?: string; timeoutMs?: number; runner?: PickerRunner; } export declare function buildUserPrompt(task: string, candidates: readonly PickCandidate[]): string; interface PickerJsonResponse { persona: string | null; confidence: PickConfidence; reason: string; } /** * Parse the model's text output. Accepts either a bare JSON object or the * Claude CLI `--output-format json` envelope `{type, result, ...}` whose * `result` field carries the model text. Returns undefined when the output * cannot be coerced to the expected shape — callers translate that into a * `no-match` result. */ export declare function parsePickerOutput(stdout: string): PickerJsonResponse | undefined; export declare function pickPersona(task: string, candidates: readonly PickCandidate[], opts?: PickPersonaOptions): PickResult; export {}; //# sourceMappingURL=persona-picker.d.ts.map