import { z } from "zod"; export type HelperVerb = "read" | "approve" | "write" | "stage" | "retire" | "promote" | "remove"; export type HelperCall = { readonly verb: HelperVerb; readonly account: string; readonly value?: string; }; declare const helperReplySchema: z.ZodObject<{ owned: z.ZodOptional; value: z.ZodOptional; marker: z.ZodOptional; cdat: z.ZodOptional; mdat: z.ZodOptional; partition: z.ZodOptional>; present: z.ZodOptional>; }, z.core.$strict>>; missing: z.ZodOptional; recover: z.ZodOptional; ok: z.ZodOptional; created: z.ZodOptional; skipped: z.ZodOptional; slot: z.ZodOptional; error: z.ZodOptional>; reason: z.ZodOptional; status: z.ZodOptional; }, z.core.$strict>; export type HelperReply = z.infer; /** The session-lock lease of team-core (`withLock`'s callback argument), narrowed to what a helper call needs. */ export type HelperLease = { readonly handOver: (pid: number) => Promise; readonly restore: () => Promise; }; export type SpawnedHelper = { readonly pid: number; readonly send: (line: string) => void; readonly reply: Promise; readonly close: () => void; }; export type HelperSpawner = (path: string) => SpawnedHelper; export declare class HelperProtocolError extends Error { } export declare const spawnDetachedHelper: HelperSpawner; /** * One helper process per call. A mutating call runs only under the session lock: the lock is handed to the helper * before the request and restored before its stdin closes, so no other writer can enter until the native call has * landed (design 3.6, R2). `restore` throws when the lock was lost, and the caller's section must stop. */ export declare function callHelper(path: string, call: HelperCall, options?: { readonly lease?: HelperLease; readonly spawn?: HelperSpawner; }): Promise; export {};