UNPKG

@code-yeongyu/senpi

Version:

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

15 lines • 944 B
/** * Bind a watcher or timer callback to the session's provider scope. * * Outside a scope (classic single-session mode) the callback is returned as is. Inside a * scope the callback runs in that scope for as long as the session is alive, and is a * no-op once the scope has closed: a filesystem event or debounce timer can fire after * its session was torn down, and a dead session has nothing left to reload. Throwing * "Provider scope is closed" out of a timer nobody awaits is what leaked those watchers * on the shared host (senpi#1905). * * Inside a scope this copy of pi-ai cannot read, the bind refuses (`activeProviderScope` throws): the callback is * never handed back unbound to a caller that is inside a session (omo#12965). */ export declare function bindSessionScopedCallback<TArgs extends unknown[]>(callback: (...args: TArgs) => void): (...args: TArgs) => void; //# sourceMappingURL=session-scoped-callback.d.ts.map