// KBDB Base types. Base depends on D1 only. // Optional modules add their own bindings (embed: VECTORIZE+AI). Base never references them. export type Bindings = { DB: D1Database; ENVIRONMENT: string; }; export type EntryType = | 'block' | 'value' | 'template' | 'slot' | 'project' | 'workflow' | 'recipe_stat'; export interface Entry { id: string; content: string | null; entry_type: EntryType | string; owner_id: string | null; parent_id: string | null; page_name: string | null; refs_json: string; tags_json: string; task_status: string | null; content_hash: string | null; is_embedded: number; confidence: number | null; metadata_json: string | null; created_at: number; updated_at: number; } export interface Template { id: string; name: string; description: string | null; slots_json: string; created_by: string | null; created_at: number; updated_at: number; } export interface EntryValue { id: string; record_id: string; template_id: string; slot_name: string; entry_id: string; created_at: number; }