import { tool } from "@opencode-ai/plugin/tool"; import { z } from "zod"; import type { Delegation } from "../../shared/types.js"; /** Zod contract for delegation-status control actions. */ export declare const DelegationControlSchema: z.ZodObject<{ action: z.ZodEnum<{ abort: "abort"; chain: "chain"; resume: "resume"; cancel: "cancel"; restart: "restart"; "adjust-prompt": "adjust-prompt"; "change-agent": "change-agent"; }>; chainParentSessionId: z.ZodOptional; restartPrompt: z.ZodOptional; agent: z.ZodOptional; }, z.core.$strip>; declare const DelegationStatusInputSchema: z.ZodObject<{ delegationId: z.ZodOptional; status: z.ZodOptional; action: z.ZodDefault>; control: z.ZodOptional; chainParentSessionId: z.ZodOptional; restartPrompt: z.ZodOptional; agent: z.ZodOptional; }, z.core.$strip>>; agentFilter: z.ZodOptional; paneId: z.ZodOptional; maxBytes: z.ZodOptional; }, z.core.$strip>; type ManagerLike = { canSessionAccessDelegation: (sessionId: string | undefined, delegation: Delegation | undefined) => boolean; controlDelegation?: (request: { action: "abort" | "cancel" | "restart" | "resume" | "chain" | "adjust-prompt" | "change-agent"; delegationId: string; chainParentSessionId?: string; restartPrompt?: string; agent?: string; }) => Promise; getAllDelegations: () => Delegation[]; getStatus: (id: string) => Delegation | undefined; /** P58 (G2, REQ-58-02): returns a frozen DelegationPool JSON snapshot. */ getPoolSnapshot?: () => unknown; }; type StatusDeps = { coordinator?: { dispatch: (params: Record) => Promise>; }; getChildMessageCount?: (sessionId: string) => Promise; getEscalationLevel?: (id: string) => string | null; lifecycle?: { isTerminal: (status: string) => boolean; markAborted: (id: string) => unknown; markCancelled: (id: string) => unknown; }; now?: () => number; readPersisted?: () => Delegation[]; terminateChild?: (sessionId: string) => Promise; projectRoot?: string; /** P58.8 S1 (REQ-58-07): read the latest capture-pane content for a pane id. */ getPaneContent?: (paneId: string) => { content: string; capturedAt: number; byteLength: number; } | null; /** P58.8 S4 (REQ-58-10): read the latest event for a child session id. */ getLastChildEvent?: (childSessionId: string) => { eventType: string; emittedAt: number; payload: Record; } | null; }; declare const UNSUPPORTED_REPLACEMENT_MESSAGE = "[Hivemind] restart/redirect is runtime-blocked: @opencode-ai/plugin ToolContext v1.15.4 does not expose a task field or verified custom-tool API for creating a replacement child session. Abort/cancel existing records remain supported; replacement dispatch requires a future verified SDK/CP-PTY path."; export declare function createDelegationStatusTool(delegationManager: ManagerLike, deps?: StatusDeps): ReturnType; export { DelegationStatusInputSchema }; export { UNSUPPORTED_REPLACEMENT_MESSAGE }; //# sourceMappingURL=delegation-status.d.ts.map