feat(ai): InferenceProvider interface

Task 11 of the slice plan. Single-method provider contract
(name + generate + healthCheck) so future LAN / external API
implementations can drop in without touching AiWorker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
altair823
2026-04-25 12:10:15 +09:00
parent e0713c94e6
commit e7f1d8fd75

View File

@@ -0,0 +1,10 @@
import type { AiResponse } from './schema.js';
export interface GenerateInput { text: string; }
export interface HealthResult { ok: boolean; model?: string; reason?: string; }
export interface InferenceProvider {
readonly name: string;
generate(input: GenerateInput): Promise<AiResponse>;
healthCheck(): Promise<HealthResult>;
}