UNPKG

@code-yeongyu/senpi

Version:

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

22 lines • 953 B
import { isStaleExtensionContextError } from "./stale-context.js"; /** RPC request a client sends to run the armed continuation now instead of at its due time (senpi#3196). */ export const GOAL_CONTINUATION_FIRE_NOW_REQUEST = "goal_continuation_fire_now"; /** * Publishes a continuation event to in-process listeners and, as an `extension_event`, to RPC * clients, so a desktop thread shows the same wait the TUI's ticker shows. A retired runtime * cannot reach a client; its staleness is expected there and is dropped. */ export function publishGoalContinuationEvent(pi, name, data) { pi.events?.emit(name, data); try { pi.rpc?.emit(name, data); } catch (error) { if (!isStaleExtensionContextError(error)) throw error; } } export function registerGoalFireNowRequest(pi, fireNow) { pi.rpc?.handle(GOAL_CONTINUATION_FIRE_NOW_REQUEST, () => fireNow()); } //# sourceMappingURL=rpc-wait-surface.js.map