/** * Bun (and Node-compatible) platform for the SDK core. Selected by * `#platform` for every export condition except `burger`. The bodies here * were moved verbatim from `src/index.ts`; behaviour is unchanged. */ import type { AppMemorySample, HostConnection, HostConnectionHandlers, InvocationContextStore, NodeAppCtx } from "./types.js"; export declare const platformName: "bun" | "burger"; export declare const isMainThread: boolean; export declare const DEFAULT_SQLITE_CACHE_SIZE_KB: number; /** @internal exported for unit tests; not part of the public SDK surface. */ export declare function _resolveCtx(): NodeAppCtx; /** Context captured once at SDK import time. */ export declare const appCtx: NodeAppCtx; /** @internal test-only export */ export declare function _testRunNodeAppPath(): string | undefined; /** @internal test-only export; also the production exit pathway. */ export declare function _testExitWorker(code: number, mainThread: boolean, exit?: (code: number) => never): void; /** Exit this app: the process on the main thread, the worker otherwise. */ export declare function exitApp(code: number): void; /** Exit with an error when the host did not provide `NODE_APP_SOCKET`. */ export declare function assertHostEndpoint(): void; /** * Connect to the host over the per-app Unix socket and speak the * newline-delimited JSON protocol. Frames that arrive in one chunk are * handled in order; a frame's handler finishing is awaited before the next * frame of the same chunk is dispatched. */ export declare function connectToHost(handlers: HostConnectionHandlers): HostConnection; export declare function createInvocationContextStore(): InvocationContextStore; /** @internal Exact isolate sample used by the IPC timer and unit tests. */ export declare function _sampleMemory(): AppMemorySample; export declare function _captureHeapSnapshotTo(path: string, generate?: () => ArrayBuffer, write?: (path: string, bytes: ArrayBuffer) => Promise): Promise<{ size_bytes: number; }>;