@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 1.52 kB
TypeScript
import type { EventBus } from "../../../event-bus.ts";
import type { McpWireStatusSnapshot } from "./service-types.ts";
export declare const MCP_CONTROL_INVENTORY_REQUEST_EVENT = "senpi.rpc.mcp_inventory.request";
export declare const MCP_CONTROL_INVENTORY_CHANGED_EVENT = "senpi.rpc.mcp_inventory.changed";
export interface McpControlInventoryRequest {
readonly sessionId: string;
respond(snapshot: Promise<McpWireStatusSnapshot>): void;
}
export interface McpControlInventoryChanged {
readonly sessionId: string;
readonly snapshot: McpWireStatusSnapshot;
/** Set on the one notification sent once every MCP connect of the session's attach has settled (senpi#4828). */
readonly startupSettled?: true;
}
export declare function isMcpControlInventoryChanged(value: unknown): value is McpControlInventoryChanged;
interface McpControlInventorySource {
refreshWireStatusSnapshot(sessionId?: string): Promise<McpWireStatusSnapshot>;
onWireStatusChanged(listener: (sessionId: string | undefined, snapshot: McpWireStatusSnapshot, startupSettled: boolean) => void): () => void;
}
/**
* Answer control-inventory requests and forward wire-status changes for every session in `attached` (each scope a
* runtime attached). The returned function stops both and is safe to call more than once.
*/
export declare function forwardMcpControlInventory(events: EventBus, service: McpControlInventorySource, attached: ReadonlySet<string>): () => void;
export {};
//# sourceMappingURL=control-inventory.d.ts.map