@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
25 lines • 1.34 kB
TypeScript
import type { RpcExtensionUIRequest, RpcExtensionUIResponse } from "../../modes/rpc/rpc-types.ts";
import type { ExtensionUIContext } from "../extensions/types.ts";
/**
* The UI of a runtime that has no session (senpi#5228). One presenter at a time answers the runtime's extension
* UI requests; with none attached, every request settles as an unbound UI does.
*/
export declare class RuntimeUiBroker {
#private;
get presenter(): ExtensionUIContext | undefined;
/** Attach the presenter that answers this runtime's UI requests; the returned function detaches it. */
attach(presenter: ExtensionUIContext): () => void;
}
export interface RpcUiPresenter {
readonly ui: ExtensionUIContext;
/** Settle the pending request an `extension_ui_response` answers; false when none is pending under its id. */
respond(response: RpcExtensionUIResponse): boolean;
/** Settle every pending request as cancelled, as a client disconnect does. */
dispose(): void;
}
/**
* A presenter that asks over the RPC wire with the same `extension_ui_request` frames, timeouts and abort
* handling as a session's RPC UI, for a connection that serves a runtime with no session.
*/
export declare function createRpcUiPresenter(output: (frame: RpcExtensionUIRequest) => void): RpcUiPresenter;
//# sourceMappingURL=ui-broker.d.ts.map