UNPKG

histoire

Version:

A fast story book powered by Vite

72 lines • 2.97 kB
import type { StoryCollectionOutcome } from '../../collect/outcome.js'; import type { Context } from '../../context.js'; import type { RuntimeCatalog } from '../../runtime/catalog/publication.js'; import type { CatalogSnapshot, SnapshotOptions } from './snapshot.js'; export type { CatalogListInput } from './catalog-pages.js'; /** MCP adapter keeps cursor retention, wire quotas and containment outside shared provider. */ export declare function createProjectCatalog(options: SnapshotOptions & { root: string; now?: () => number; isActive?: () => boolean; provider?: RuntimeCatalog; }): { /** Most recent completed bounded access projection. */ readonly current: CatalogSnapshot; /** Admission follows canonical collection/publication readiness. */ readonly updating: boolean; /** Marks canonical source updating while preserving completed read data. */ markUpdating(): void; /** Compatibility publication delegates collection/content capture to canonical engine. */ publish(ctx: Context, outcomes?: ReadonlyMap<string, StoryCollectionOutcome>): Promise<CatalogSnapshot>; /** Resolves exact metadata ID using canonical shared lookup semantics. */ getStory(storyId: string, expectedRevision?: string): { revision: string; story: import("../../runtime/catalog/types.js").CatalogStory; projectId: string; }; /** Resolves exact scoped executable target using canonical admission readiness. */ getTarget(storyId: string, variantId: string, expectedRevision?: string): { revision: string; story: import("../../runtime/catalog/types.js").CatalogStory; variant: { id: string; title: string; }; projectId: string; }; /** Opaque cursor authority stays inside MCP adapter. */ list: (input: import("./catalog-pages.js").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; }; }; /** Existing project facade remains compatible for registration and execution consumers. */ export type ProjectCatalog = ReturnType<typeof createProjectCatalog>; //# sourceMappingURL=catalog.d.ts.map