export type NativePtyRuntime = "node" | "bun"; export interface NativePtyBinding { readonly PtySession: unknown; readonly [exportName: string]: unknown; } export interface NativePtyUnavailableDiagnostic { readonly code: "native-unavailable"; readonly runtime: NativePtyRuntime; readonly host: string; readonly attemptedPath: string; readonly attemptedPaths: readonly string[]; readonly message: string; readonly cause?: string; } export type NativePtyLoadResult = { readonly native: NativePtyBinding; readonly diagnostic: null; } | { readonly native: null; readonly diagnostic: NativePtyUnavailableDiagnostic; }; export declare class NativePtySentinelMismatchError extends Error { readonly code = "native-sentinel-mismatch"; readonly modulePath: string; readonly expectedExport: string; readonly actualExports: readonly string[]; constructor(modulePath: string, expectedExport: string, actualExports: readonly string[]); } export interface NativePtyCandidatePathOptions { readonly runtime?: NativePtyRuntime; readonly platform?: string; readonly arch?: string; readonly moduleDir?: string; readonly execDir?: string; } export type NativePtyRequireBinding = (modulePath: string) => unknown; /** * Reports whether a candidate prebuild carries macOS `com.apple.quarantine`. * Injectable so tests can exercise the guard without a quarantined artifact. */ export type NativePtyQuarantineProbe = (modulePath: string) => boolean; export interface NativePtyLoaderOptions extends NativePtyCandidatePathOptions { readonly requireBinding?: NativePtyRequireBinding; readonly isQuarantined?: NativePtyQuarantineProbe; } export declare const NATIVE_PTY_PACKAGE_VERSION: string; /** * Native ABI version. INTENTIONALLY decoupled from the package/CalVer version: it * identifies the native surface (exports + signatures) this loader requires. Must * match `NATIVE_PTY_ABI_VERSION` and the `__senpiPtyAbi` export in * `crates/senpi-pty/src/lib.rs`. Bump ONLY on a backward-incompatible native change * (and rebuild the vendored prebuilds); a CalVer release must NOT change it. */ export declare const NATIVE_PTY_ABI_VERSION = "1"; export declare function getNativePtySentinelExport(abiVersion?: string): string; export declare function detectNativePtyRuntime(versions?: NodeJS.ProcessVersions & { readonly bun?: unknown; }): NativePtyRuntime; export declare function getNativePtyHost(platform?: string, arch?: string): string; export declare function getNativePtyCandidatePaths(options?: NativePtyCandidatePathOptions): readonly string[]; export declare function loadNativePty(options?: NativePtyLoaderOptions): NativePtyLoadResult; //# sourceMappingURL=loader.d.ts.map