import type { Page } from 'playwright'; import { type BrowserKey } from '../browser/launch'; export declare const DEFAULT_SETTLE_MS = 750; export declare const DEFAULT_TIMEOUT_MS = 60000; /** What the BUILD says about NPC inspection, read off the installed module rather than guessed. */ export type NpcInspectSupport = 'supported' | 'predates' | 'unknown'; /** * Does the engine-core inspect module in this build know about NPCs at all? Only INSTALLED worlds carry * helix_modules/, so a bare bundle answers 'unknown' — which is why the guidance below keeps both causes * in play there instead of confidently naming the wrong one. */ export declare function detectNpcInspectSupport(directory: string): NpcInspectSupport; /** Pure so both causes are unit-testable, and so the two tools word the same failure identically. */ export declare function composeNpcWiringGuidance(support: NpcInspectSupport): string; export interface NpcSessionOptions { directory: string; timeoutMs?: number | undefined; /** Diagnostic override: launch only this candidate, no fallback (default: try the whole chain). */ browser?: BrowserKey | undefined; /** URL-prefix → dir fallbacks (e.g. a shared character-asset tree at /assets, /basis). */ fallbackMounts?: Record | undefined; viewport?: { width: number; height: number; } | undefined; onProgress?: ((message: string) => void) | undefined; } export interface NpcSession { page: Page; close: () => Promise; } /** Boots the world with the NPC protocol proven live; the caller owns the sampling and MUST close(). */ export declare function openNpcSession(opts: NpcSessionOptions): Promise; /** One npcSample() call — every read off a world-supplied handle is already guarded page-side. */ export declare function readSample(page: Page): Promise;