import { z } from "zod"; import type { ProductProfile } from "./profile.js"; export declare const cursorParentSchema: z.ZodObject<{ kind: z.ZodLiteral<"cursor">; hook_root: z.ZodString; }, z.core.$strict>; export type CursorParent = z.infer; export declare function isCursorMcpClient(clientName: string | undefined): boolean; export declare function cursorHooksFile(home?: string): string; export declare function cursorParentHooksRegistered(profile: ProductProfile, document: unknown): boolean; export declare function verifyCursorParent(profile: ProductProfile, parent: CursorParent, hooksFile?: string): void; export declare function cursorParentFromRequest(profile: ProductProfile, clientName: string | undefined, options: { hookRoot: string; hooksFile?: string; }): CursorParent | null; export declare function prepareCursorDelivery(parent: CursorParent, deliveryId: string): void; export declare function submitCursorParentAnswer(parent: CursorParent, deliveryId: string, text: string, timeoutMs?: number, profile?: ProductProfile): Promise<{ queued_submission_id: null; }>; export declare function handleCursorHook(profile: ProductProfile, raw: string, hookRoot: string, nativeEmit?: (output: Record) => Promise): Promise>; export type CursorReceiveResult = { outcome: "delivered"; text: string; } | { outcome: "delivered_by_hook"; } | { outcome: "timeout"; } | { outcome: "reader_gone"; }; /** * 受信processの読み手(このprocessを背景で起こした親)が居るかを確かめる口。 * 親が終わった後も受信processは残る。確かめずに回答を引き取ると、誰も読まないのに配送済みになる。 */ export interface CursorReceiveReader { /** 読み手が居なくなった時に解決する。見張れない出力先では解決しない。 */ readonly gone: Promise; /** 今、読み手へ書けるか。 */ probe(): Promise; } export declare function receiveCursorAnswer(hookRoot: string, deliveryId: string, timeoutMs?: number, reader?: CursorReceiveReader): Promise;