@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
22 lines (21 loc) • 1.02 kB
TypeScript
export declare function normalizeFileReference(requested: string): string;
/** Resolve a chat reference in a server-selected repository. Cwd-relative
* names win over root-relative ones. Never turn an outside absolute path
* into an unrelated in-repository suffix match. Metadata is checked by the
* same no-symlink reader that will subsequently serve the file's bytes.
* Outside the repository, or with none, only media in a media root resolves
* (`home-media.ts`), as `~/<path>` or `~root/<root>/<path>`. A literal
* `~/...` names the Hook user's home. */
export declare function resolveFilePath(root: string | undefined, cwd: string, requested: string): Promise<{
path: string;
size: number;
contentType: string;
version: string;
}>;
/** Resolve a normalized reference using only this checkout. */
export declare function resolveRepositoryFile(root: string, cwd: string, requested: string): Promise<{
path: string;
size: number;
contentType: string;
version: string;
} | undefined>;