@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
38 lines (37 loc) • 1.81 kB
TypeScript
import { z } from "zod";
export declare const PROJECT_NAME: RegExp;
export declare const FINDING_TYPE_VALUES: readonly ["decision", "pitfall", "pattern", "bug"];
export declare const MAX_FILE_PATHS = 500;
export declare const MAX_SEARCH_QUERY = 1000;
export declare const MAX_SEARCH_LIMIT = 20;
export declare const MAX_FINDING_BODY = 8192;
export declare const MAX_FINDING_TEXT = 5000;
/** A repository-relative path: `/`-separated segments of ordinary file-name
* characters, no empty, `.` or `..` segment, no leading `/`, at most 1024. */
export declare function isRepoPath(value: string): boolean;
/** A branch as git allows it, narrowed: no `..`, `@{`, leading `-` or `/`,
* trailing `/`, `.lock` or `.`, at most 200 characters. */
export declare function isBranchName(value: string): boolean;
/** Search text: an error excerpt may carry tabs and newlines, nothing else below space. */
export declare function isSearchText(value: string): boolean;
export declare const findingWriteSchema: z.ZodObject<{
text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
type: z.ZodOptional<z.ZodEnum<{
bug: "bug";
decision: "decision";
pattern: "pattern";
pitfall: "pitfall";
}>>;
citation: z.ZodOptional<z.ZodObject<{
file: z.ZodOptional<z.ZodString>;
line: z.ZodOptional<z.ZodNumber>;
commit: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>;
}, z.core.$strict>;
/** Complete one task by its stable id (`bid:` plus 8 hex digits), as `/tasks?branch=` lists it. */
export declare const taskCompleteSchema: z.ZodObject<{
id: z.ZodString;
}, z.core.$strict>;
export type TaskComplete = z.infer<typeof taskCompleteSchema>;
export type FindingWrite = z.infer<typeof findingWriteSchema>;