import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core"; import type { Component } from "@oh-my-pi/pi-tui"; import * as z from "zod/v4"; import type { RenderResultOptions } from "../extensibility/custom-tools/types"; import type { Theme } from "../modes/theme/theme"; import type { ToolSession } from "./index"; declare const jobSchema: z.ZodObject<{ poll: z.ZodOptional>; cancel: z.ZodOptional>; list: z.ZodOptional; }, z.core.$strip>; type JobParams = z.infer; interface JobSnapshot { id: string; type: "bash" | "task"; status: "running" | "completed" | "failed" | "cancelled"; label: string; durationMs: number; resultText?: string; errorText?: string; } type CancelStatus = "cancelled" | "not_found" | "already_completed"; export interface JobToolDetails { jobs: JobSnapshot[]; cancelled?: { id: string; status: CancelStatus; }[]; } export declare class JobTool implements AgentTool { #private; private readonly session; readonly name = "job"; readonly label = "Job"; readonly summary = "Manage long-running background jobs (async bash/python)"; readonly description: string; readonly parameters: z.ZodObject<{ poll: z.ZodOptional>; cancel: z.ZodOptional>; list: z.ZodOptional; }, z.core.$strip>; readonly strict = true; readonly loadMode = "discoverable"; constructor(session: ToolSession); static createIf(session: ToolSession): JobTool | null; execute(_toolCallId: string, params: JobParams, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback, _context?: AgentToolContext): Promise>; } interface JobRenderArgs { poll?: string[]; cancel?: string[]; } export declare const jobToolRenderer: { inline: boolean; renderCall(args: JobRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component; renderResult(result: { content: Array<{ type: string; text?: string; }>; details?: JobToolDetails; isError?: boolean; }, options: RenderResultOptions, uiTheme: Theme, args?: JobRenderArgs): Component; mergeCallAndResult: boolean; }; export {};