UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

25 lines (24 loc) • 1.47 kB
export declare function imageBytes(bytes: Buffer): boolean; export declare const IMAGE_NAME: RegExp; /** Stores a file the phone sent under uploads/<session>/. A name with an * image extension must hold image bytes; anything else is kept as-is. */ export declare function saveUpload(session: string, name: string, bytes: Buffer): Promise<string>; /** What the phone has put in one folder, newest first. */ export declare function listUploads(session: string): Promise<{ name: string; path: string; size: number; modified: string; }[]>; /** Removes one file the phone put in uploads/<session>/, by the path * `listUploads` gave. Anything that does not resolve to a regular file * directly inside that folder is 404, so no other file can be named. */ export declare function removeUpload(session: string, requested: string): Promise<void>; /** The bytes of one image the phone put under uploads/, by the absolute * path the transcript names. Served only when the path resolves (through * any link) to a regular file inside the uploads folder whose bytes are * an image; anything else — outside, traversal, a note — is 404. */ export declare function uploadImage(requested: string): Promise<Buffer>; /** A file the phone uploaded for this conversation, by the path `/v1/upload` * returned: it must resolve to a regular file inside uploads/<session>/. */ export declare function sessionUpload(session: string, requested: string): Promise<string>;