import type { AgentMessage, AgentRunState, AgentThread } from '@pikku/core/agent'; import type { AgentRunScore } from '@pikku/core/agent-scorer'; import type { AgentRunStateService, AgentStorageService, CreateRunInput, SaveScoreInput } from '@pikku/core/services'; import type { Kysely } from 'kysely'; import type { KyselyPikkuDB } from './kysely-tables.js'; export declare class KyselyAgentStorageService implements AgentStorageService, AgentRunStateService { private db; private initialized; constructor(db: Kysely); init(): Promise; createThread(resourceId: string, options?: { threadId?: string; title?: string; metadata?: Record; }): Promise; getThread(threadId: string): Promise; getThreads(resourceId: string): Promise; deleteThread(threadId: string): Promise; getMessages(threadId: string, options?: { lastN?: number; cursor?: string; }): Promise; saveMessages(threadId: string, messages: AgentMessage[]): Promise; getWorkingMemory(id: string, scope: 'resource' | 'thread'): Promise | null>; saveWorkingMemory(id: string, scope: 'resource' | 'thread', data: Record): Promise; createRun(run: CreateRunInput): Promise; updateRun(runId: string, updates: Partial): Promise; getRun(runId: string): Promise; getRunsByThread(threadId: string): Promise; private setApprovals; private mapRunRow; findRunByToolCallId(toolCallId: string): Promise<{ run: AgentRunState; approval: NonNullable[number]; } | null>; resolveApproval(toolCallId: string, status: 'approved' | 'denied'): Promise; saveScore(score: SaveScoreInput): Promise; getScores(runId: string): Promise; close(): Promise; }