export type FabricProgramKind = "fabric" | "jev"; export type FabricProgramKernel = "typescript" | "python"; export type FabricProgramStatus = "candidate" | "promoted" | "retired"; export interface FabricProgramRecord { version: 1; digest: string; name: string; kind: FabricProgramKind; kernel?: FabricProgramKernel; code?: string; jevProgram?: Record; description?: string; inputSchema?: Record; createdAt: number; status: FabricProgramStatus; trial?: unknown; } export interface FabricProgramSummary { ref: string; name: string; digest: string; kind: FabricProgramKind; kernel?: FabricProgramKernel; description?: string; createdAt: number; status: FabricProgramStatus; } export interface FabricProgramSaveInput { name?: unknown; kind?: unknown; kernel?: unknown; code?: unknown; jevProgram?: unknown; description?: unknown; inputSchema?: unknown; } export declare const PROGRAM_NAME_PATTERN: RegExp; export declare const MAX_PROGRAM_NAME_CHARS = 64; export declare const MAX_PROGRAM_CODE_CHARS = 65536; export declare const MAX_PROGRAM_DESCRIPTION_CHARS = 1000; export declare const MAX_PROGRAM_SCHEMA_BYTES: number; export declare const MAX_PROGRAM_INPUT_BYTES: number; export declare const MAX_PROGRAM_REF_CHARS = 129; /** Sorted-key JSON; `undefined` members are omitted like JSON.stringify. */ export declare const canonicalProgramJson: (value: unknown) => string; export declare const programDigest: (content: Pick) => string; export declare const programRef: (record: Pick, full?: boolean) => string; export declare const assertProgramName: (value: unknown) => string; /** JSON-compatible, bounded input; returns the parsed copy. */ export declare const normalizeProgramInput: (input: unknown) => unknown; /** Validates input against the record's inputSchema; undefined input is checked as null. */ export declare const programInputError: (record: Pick, input: unknown) => string | undefined; /** Validates save arguments into the content-addressed record (status candidate). */ export declare const buildProgramRecord: (input: FabricProgramSaveInput, defaultKernel: FabricProgramKernel, now?: number) => FabricProgramRecord; export declare const summarizeProgram: (record: FabricProgramRecord) => FabricProgramSummary; export declare const programsDirectory: (cwd: string) => string; export declare class ProgramStore { #private; readonly directory: string; constructor(directory: string); save(input: FabricProgramSaveInput, defaultKernel: FabricProgramKernel): Promise<{ record: FabricProgramRecord; created: boolean; }>; list(filter?: { name?: string; status?: FabricProgramStatus; }): Promise; /** * `name` resolves to the latest promoted version, else the latest * non-retired one; `name@` and a full digest name one version. */ resolve(ref: unknown, options?: { requirePromoted?: boolean; }): Promise; /** Host/user only: never reachable from the programs provider. */ promote(ref: string): Promise; /** Host/user only: never reachable from the programs provider. */ retire(ref: string): Promise; } //# sourceMappingURL=store.d.ts.map