UNPKG

histoire

Version:

A fast story book powered by Vite

47 lines • 2.22 kB
import type { HistoireMiddlewareHandle } from '../../api/types.js'; import type { RuntimeCatalog } from '../catalog/publication.js'; import type { ExecutionService } from '../execution-service.js'; import type { ProjectRuntimeHandle } from '../types.js'; import type { MiddlewareHostingOptions } from './types.js'; import { createDevSession } from '../dev-session.js'; /** Private dev source handoff for catalog adapters and shared execution consumers. */ export interface DevHosting { /** Stable public hosting resource. */ handle: HistoireMiddlewareHandle; /** Canonical lifecycle controller. */ controller: ReturnType<typeof createDevSession>['controller']; /** Dev source cancellation scope over the canonical project scheduler. */ readonly execution: ExecutionService; /** Active canonical completed catalog. */ readonly catalog: RuntimeCatalog | undefined; } /** Creates one stable delegate over generation replacement and explicit readiness. */ export declare function createDevHosting(options: { /** Optional MCP adapter policy. */ mcp?: boolean; /** Optional agent service policy. */ agents?: boolean; /** Explicit project root. */ root: string; /** Root-resolved configuration file. */ configFile?: string; /** Stable project identity shared with canonical publication. */ projectId: string; /** One parent project lane. */ execution: ExecutionService; /** Owned or caller-owned listener integration. */ middleware: MiddlewareHostingOptions; /** Observes coherent public state changes. */ onChange: () => void; /** Releases project slot only after confirmed cleanup. */ onClose: () => void; /** Runs before controller acquisition, e.g. joins caller listening. */ beforeStart?: (signal: AbortSignal) => Promise<void>; /** Acquires managed listening before catalog readiness. */ onGeneration?: (handle: ProjectRuntimeHandle) => Promise<void>; /** Owned listener teardown; absent for middleware. */ closeListener?: () => Promise<void>; /** Current actual origin, populated after managed listening. */ getOrigin: () => string; }): DevHosting; //# sourceMappingURL=dev.d.ts.map