UNPKG

histoire

Version:

A fast story book powered by Vite

26 lines • 1.82 kB
import type { McpDocsResult, McpSourceResult } from '../protocol/content-schema.js'; import type { McpToolInput } from '../protocol/tool-schema.js'; import type { ProjectCatalog } from './catalog.js'; /** Content-only catalog boundary, also usable by immutable deployed catalogs. */ export type ContentCatalog = Pick<ProjectCatalog, 'current' | 'getStory'>; /** Optional paging defaults are supplied by the service as well as wire schemas. */ export type DocsContentInput = Pick<McpToolInput<'histoire_get_docs'>, 'storyId' | 'expectedRevision'> & Partial<Pick<McpToolInput<'histoire_get_docs'>, 'offset' | 'limit'>>; /** Source target remains a catalog ID, never a caller-supplied path. */ export type SourceContentInput = Pick<McpToolInput<'histoire_get_source'>, 'storyId' | 'expectedRevision'> & Partial<Pick<McpToolInput<'histoire_get_source'>, 'startLine' | 'lineCount'>>; /** Private project boundary shared by content tools and resources. */ export interface ProjectContentOptions { /** Trusted project root; canonical containment is validated per physical read. */ root: string; /** Completed catalog metadata and registered content handles. */ catalog: ContentCatalog; } /** Creates one shared content service for tools and resource reads. */ export declare function createProjectContent(options: ProjectContentOptions): { /** Returns preferred original docs, validating physical bytes and current revision. */ getDocs(input: DocsContentInput): Promise<McpDocsResult>; /** Returns exact physical/virtual source pages with full-content hash. */ getSource(input: SourceContentInput): Promise<McpSourceResult>; }; /** Shared content facade consumed by SDK registration. */ export type ProjectContent = ReturnType<typeof createProjectContent>; //# sourceMappingURL=content.d.ts.map