UNPKG

histoire

Version:

A fast story book powered by Vite

65 lines • 2.15 kB
import type { McpDiagnostic } from '../protocol/project-schema.js'; import type { McpStory } from '../protocol/story-schema.js'; /** Shared finite filters over dev publications and immutable Node catalog. */ export interface CatalogListInput { /** Case-insensitive title/navigation/path substring. */ query?: string; /** Exact plugin identity. */ supportPluginId?: string; /** Exact collected group. */ group?: string; /** Bounded page count. */ pageSize?: number; /** Issued opaque continuation. */ cursor?: string; } /** Minimal completed metadata needed by transport-neutral catalog pagination. */ export interface CatalogPageSnapshot { /** Completed catalog publication. */ revision: string; /** Deterministically ordered allowlisted metadata. */ stories: readonly McpStory[]; /** Bounded collection diagnostics. */ diagnostics: readonly McpDiagnostic[]; /** Omitted additional diagnostics. */ diagnosticsTruncated: boolean; } /** Reuse filtering, byte bounds and issued cursor authority across runtime modes. */ export declare function createCatalogPager(options: { projectId: string; current: () => CatalogPageSnapshot; retained?: (revision: string) => CatalogPageSnapshot | undefined; updating: () => boolean; now?: () => number; }): (input: CatalogListInput) => { projectId: string; revision: string; updating: boolean; items: { id: string; title: string; treePath: string[]; filePath: string; fileOrigin?: "external" | "generated" | "project"; supportPluginId: string; group?: string; docsOnly: boolean; variants: { id: string; title: string; }[]; docsAvailable: boolean; sourceAvailable: boolean; sourceKind: "file" | "unavailable" | "virtual"; }[]; total: number; diagnostics: { filePath?: string; storyId?: string; code: string; message: string; }[]; diagnosticsTruncated: boolean; nextCursor: string; }; //# sourceMappingURL=catalog-pages.d.ts.map