import { type LocalModelEndpointProbeStrategy } from '@origintrail-official/dkg-local-llm'; import { type DkgLocalLlmRuntimeSession, type DkgLocalLlmRuntimeSessionOptions } from '../local-llm-runtime-factory.js'; export declare const DKG_LOCAL_LLM_UI_SESSION_ID = "local-llm:dkg-ui"; export type LocalLlmErrorCode = 'LOCAL_LLM_OFFLINE' | 'LOCAL_LLM_NOT_READY' | 'LOCAL_LLM_BUSY' | 'LOCAL_LLM_PROJECT_MISMATCH' | 'LOCAL_LLM_INVALID_REQUEST' | 'LOCAL_LLM_RUNTIME_ERROR'; export declare class DaemonLocalLlmError extends Error { readonly code: LocalLlmErrorCode; readonly status: number; constructor(code: LocalLlmErrorCode, status: number, message: string); } export interface DaemonLocalLlmHealth { ok: boolean; /** True when the operator supplied at least one local-LLM environment override. */ configured: boolean; /** True when the endpoint matches a supported local-LLM health contract. */ detected: boolean; ready: boolean; reachable: boolean; offline: boolean; busy: boolean; initialized: boolean; readOnly: true; sessionId: string; contextGraphId?: string; traceFile?: string; error?: string; initFailure?: string; } export interface DaemonLocalLlmChatResult { text: string; sessionId: string; contextGraphId?: string; profile: string; toolCalls: Array<{ name: string; arguments: Record; }>; traceFile?: string; readOnly: true; } export interface DaemonLocalLlmService { health(): Promise; chat(input: { message: string; contextGraphId?: string; signal?: AbortSignal; }): Promise; clear(): Promise<{ ok: true; sessionId: string; readOnly: true; }>; close(): Promise; } type SessionFactory = (options: DkgLocalLlmRuntimeSessionOptions) => Promise; export interface DaemonLocalLlmServiceOptions { dkgHome: string; env?: NodeJS.ProcessEnv; cwd?: string; fetch?: typeof fetch; createSession?: SessionFactory; probeStrategy?: LocalModelEndpointProbeStrategy; probeTimeoutMs?: number; stderr?: (line: string) => void; } export declare function resolveDaemonLocalLlmSettings(dkgHome: string, env?: NodeJS.ProcessEnv): { configured: boolean; llamaUrl: string; model: string; probeStrategy: LocalModelEndpointProbeStrategy; probeConfigurationError?: string; defaultProjectId?: string; logDir: string; }; export declare function createDaemonLocalLlmService(options: DaemonLocalLlmServiceOptions): DaemonLocalLlmService; export {}; //# sourceMappingURL=local-llm-service.d.ts.map