@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
14 lines • 1.1 kB
TypeScript
import type { NativeWebViewClass } from "./native-webview.ts";
import type { AttachDeadline } from "./webview-readiness.ts";
export declare function bunChromeProfileDir(command: string): string | undefined;
/**
* Asks Bun's running Chrome to quit through Bun's own DevTools pipe: one more target in that browser,
* then CDP `Browser.close`. Only a graceful quit lets macOS Chrome delete the `code_sign_clone` copy
* of itself it runs from, and its singleton dir (senpi#4174); a killed Chrome leaves both behind.
* Resolves false as soon as the request cannot be made or failed, and never resolves once Chrome
* accepted it (its pipe then closes under the pending reply), so a caller waits on the exit, not on this.
*/
export declare function requestBrowserClose(webViewClass: NativeWebViewClass): Promise<boolean>;
/** Resolves true once none of `pids` is alive, false when `deadline` came first. */
export declare function exitedWithin(pids: readonly number[], alive: (pid: number) => boolean, deadline: AttachDeadline): Promise<boolean>;
//# sourceMappingURL=chrome-graceful-close.d.ts.map