| 58 | export type Family = 'claude' | 'gpt' | 'gemini'; |
| 59 | |
| 60 | export interface ProviderAdapter { |
| 61 | /** Stable name used in output tables and config (e.g., 'claude', 'gpt', 'gemini'). */ |
| 62 | readonly name: string; |
| 63 | /** Model family this adapter targets. */ |
| 64 | readonly family: Family; |
| 65 | /** |
| 66 | * Check whether the provider's CLI binary is present and authenticated. |
| 67 | * Should never block >2s. Non-throwing: returns { ok: false, reason } on failure. |
| 68 | */ |
| 69 | available(): Promise<AvailabilityCheck>; |
| 70 | /** Run a prompt and return normalized RunResult. Non-throwing. Errors go in result.error. */ |
| 71 | run(opts: RunOpts): Promise<RunResult>; |
| 72 | /** Estimate USD cost for the reported token usage and model. */ |
| 73 | estimateCost(tokens: TokenUsage, model?: string): number; |
| 74 | } |
no outgoing calls
no test coverage detected