UNPKG

@code-yeongyu/senpi

Version:

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

15 lines • 1.2 kB
import type { Extension } from "./types.ts"; /** Runs `task` as `extension`'s code: servers, sockets and timers it creates are recorded for it. */ export declare function runOwnedBy<T>(extension: Extension, task: () => T): T; /** `fn`, entered as `extension`'s code on every call; builtins get `fn` itself back. */ export declare function ownedBy<This, Args extends unknown[], Result>(extension: Extension, fn: (this: This, ...args: Args) => Result): (this: This, ...args: Args) => Result; /** Called by `ExtensionRunner`'s constructor: the instances `reclaimRunnerHandles` closes for that runner. */ export declare function registerRunnerExtensions(runner: object, extensions: readonly Extension[]): void; /** `reclaimExtensionHandles` for the extension instances of `runner`; a runner never registered has none. */ export declare function reclaimRunnerHandles(runner: object): void; /** * Closes what each extension instance left open after its `session_shutdown` * handlers ran, and reports it per extension on stderr so the extension can be fixed. */ export declare function reclaimExtensionHandles(extensions: readonly Extension[]): void; //# sourceMappingURL=extension-handle-ledger.d.ts.map