export interface SpawnResult { stdout: string; stderr: string; exitCode: number; } export interface RuntimeCommands { /** Runtime binary: "node" */ runner: string; /** Package executor: "npx" */ exec: string; /** Pack command: ["npm", "pack"] */ packCmd: string[]; } export interface RuntimeAdapter { readonly name: "node"; /** Hash content and return hex string */ hash(content: string): string; /** Algorithm name recorded in integrity.json */ readonly hashAlgorithm: string; /** Test whether filePath matches a glob pattern */ globMatch(pattern: string, filePath: string): boolean; /** Spawn a child process and collect output */ spawn(cmd: string[], opts?: { cwd?: string; }): Promise; /** Commands to use when spawning package manager / executor */ readonly commands: RuntimeCommands; } /** * Initialize the runtime adapter singleton. */ export declare function initRuntime(): RuntimeAdapter; /** * Get the runtime adapter. Lazily initializes if not yet set. */ export declare function getRuntime(): RuntimeAdapter; /** * Convert `import.meta.url` to a directory path. */ export declare function moduleDir(importMetaUrl: string): string; //# sourceMappingURL=runtime-adapter.d.ts.map