/** * Physics state persistence for Hippo. * Stores and loads particle state (position, velocity, mass, charge, temperature) * in SQLite using BLOB columns for 384-dim vectors. */ import type { DatabaseSyncLike } from './db.js'; import type { MemoryEntry } from './memory.js'; import type { PhysicsParticle } from './physics.js'; export declare function float32ToBuffer(arr: number[]): Buffer; export declare function bufferToFloat32(buf: Buffer | Uint8Array): number[]; /** * Create the memory_physics table (migration v8). * Call this from db.ts MIGRATIONS array. */ export declare function createPhysicsTable(db: DatabaseSyncLike): void; /** * Load physics state for specific memory IDs (or all if no IDs given). */ export declare function loadPhysicsState(db: DatabaseSyncLike, memoryIds?: string[]): Map; /** * Save physics state for multiple particles (batch upsert). */ export declare function savePhysicsState(db: DatabaseSyncLike, particles: PhysicsParticle[]): void; /** * Initialize physics state for a memory from its embedding vector. * Returns the new particle (does not persist — caller must save). */ export declare function initializeParticle(entry: MemoryEntry, embedding: number[], now?: Date): PhysicsParticle; /** * Delete physics state for a memory. (Also handled by CASCADE, but explicit for clarity.) */ export declare function deletePhysicsState(db: DatabaseSyncLike, memoryId: string): void; /** * Reset all physics states from original embeddings. * Drops existing physics data and re-initializes from the embedding index. */ export declare function resetAllPhysicsState(db: DatabaseSyncLike, entries: MemoryEntry[], embeddingIndex: Record, now?: Date): number; /** * Refresh mass, charge, and temperature for existing particles * based on current memory attributes (called during consolidation). */ export declare function refreshParticleProperties(particles: PhysicsParticle[], entries: Map, now?: Date): void; //# sourceMappingURL=physics-state.d.ts.map