/** * Lazily build the bundled macOS STT Swift recognizer into a cached `.app` bundle. * * On first use we `swiftc`-compile `macos-stt.swift` into `Contents/MacOS/` of a * `.app` bundle written to the cache dir, alongside a generated `Contents/Info.plist` * (derived from `macos-stt.plist`). The bundle is keyed by a hash of the script * source + the Info.plist source so a change to either rebuilds. If a cached * bundle already exists it is reused (fast path). * * Why a `.app` bundle and not a loose binary: macOS only shows the Speech * Recognition / Microphone TCC permission prompts for a process launched as a * bundled app through LaunchServices (`open`). A bare CLI executable — even one * with the Info.plist embedded in its `__info_plist` Mach-O section and ad-hoc * signed — never triggers the `SFSpeechRecognizer.requestAuthorization` callback; * macOS silently denies and the recognizer aborts. A real `.app` with an * `Info.plist` carrying the usage strings, ad-hoc signed and launched via `open`, * is the only reliable way to get the prompt to appear and access to be granted. * * The bundle's binary is also usable directly (not via `open`) for `--probe`, * which only reads authorization status and does not touch protected APIs. * * Compilation is async and never blocks the event loop; callers await it before * launching the recognizer. */ declare const SCRIPT_PATH: string; declare const PLIST_PATH: string; /** How to launch the recognizer. */ export interface RecognizerInvocation { /** Path to the `.app` bundle, launched via `open` for recording (TCC prompt). */ appPath: string; /** Path to the executable inside the bundle, run directly for `--probe`. */ binaryPath: string; } /** * Resolve how to launch the recognizer, building+caching the `.app` bundle on * first use. * * Returns `null` when `swiftc` is unavailable or the build fails — the caller * surfaces a clear "install Xcode command line tools" message. */ export declare function resolveRecognizer(scriptPath?: string, plistPath?: string): Promise; /** Directory used to cache compiled recognizer bundles (exported for tests). */ export declare function recognizerCacheDir(): string; export { SCRIPT_PATH, PLIST_PATH }; //# sourceMappingURL=compile.d.ts.map