/** * Image storage for memory entries. * * Used by the remember_this tool when the agent passes an image_path: copy * the file (compressed if large) into /raw/images/ under a * content-addressed name, so two saves of the same image dedup and the * image is portable inside the .pi-mind store (the agent's source path is * typically transient — /tmp, a session-scoped dir, etc.). * * No vision / description logic lives here. The agent is responsible for * describing the image before calling remember_this, so memory has no * dependency on a vision model or any external vision tool. */ export type StoreImageOk = { ok: true; /** Path relative to PI_MIND_DIR (e.g. "raw/images/abc123.png"). */ relPath: string; /** Absolute path. */ absPath: string; /** sha256 of the stored (post-compression) bytes, first 16 hex chars. */ hash: string; /** Final file size in bytes. */ bytes: number; /** True if the file was reduced from the source. */ compressed: boolean; }; export type StoreImageErr = { ok: false; reason: "not-found" | "not-readable" | "bad-ext" | "too-large" | "compress-failed"; detail: string; }; export type StoreImageResult = StoreImageOk | StoreImageErr; /** * Validate and copy an image into /raw/images/.. * * - Rejects paths that don't exist, aren't readable, have a non-image * extension, or exceed MAX_INPUT_BYTES. * - Files over COMPRESS_OVER_BYTES are resized (longest edge ≤ RESIZE_MAX_EDGE) * and re-encoded; PNG stays PNG (to keep transparency), others go JPEG @ Q85. * - Content addressing uses the sha256 of the *stored* bytes, so two saves * of the same source dedupe to the same file even after compression. */ export declare function storeImage(srcPath: string, piMindDir: string): Promise; //# sourceMappingURL=image-store.d.ts.map