UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

28 lines • 1.81 kB
type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; export declare const INSPECTOR_VM_IMPORT_WARNING = "Node Inspector dynamic import is unsupported; use require() or a target-side loader. Senpi kept running."; /** * Report whether this process inherited an Inspector option, either as an exec argument or * through NODE_OPTIONS. Such a run owns a debugger socket that has to be handed to the process * running the agent, which is what makes the child spawn in `cli.ts` load-bearing there. */ export declare function hasInheritedInspectorOption(): boolean; export declare function releaseInheritedInspectorForChild(): void; export declare function isRecoverableInspectorVmImportError(error: unknown, origin: UncaughtExceptionOrigin): boolean; /** * Install the process-level recovery seam before any asynchronous bootstrap work. * * With `--inspect-brk` the debugger is usable at the first line of the user script, so the * reported delayed Inspector `import()` rejection can fire during `main()` bootstrap, before * interactive mode registers its terminal-restoring uncaughtException handler. This listener * exists only under the explicit `SENPI_RECOVER_INSPECTOR_VM_IMPORT=1` opt-in: it swallows * exactly the recoverable Inspector rejection (counting it for a deferred TUI warning) and * re-creates Node's default fatal outcome for everything else so bootstrap crashes stay loud. */ export declare function installEarlyInspectorVmImportRecovery(): void; /** * Return the number of Inspector rejections recovered before the TUI existed and clear the * pending count, so interactive mode can surface one deferred warning after startup. */ export declare function consumeEarlyInspectorVmImportRecoveries(): number; export {}; //# sourceMappingURL=inspector-policy.d.ts.map