import type { AgentTool, AgentToolResult } 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 "."; declare const calculatorSchema: z.ZodObject<{ calculations: z.ZodArray>; }, z.core.$strip>; export interface CalculatorToolDetails { results: Array<{ expression: string; value: number; output: string; }>; } type CalculatorParams = z.infer; /** * Calculator tool for evaluating mathematical expressions. * * Supports decimal, hex (0x), binary (0b), octal (0o) literals, * standard arithmetic operators, and parentheses. */ export declare class CalculatorTool implements AgentTool { readonly name = "calc"; readonly label = "Calc"; readonly summary = "Evaluate a mathematical expression"; readonly loadMode = "discoverable"; readonly description: string; readonly parameters: z.ZodObject<{ calculations: z.ZodArray>; }, z.core.$strip>; readonly strict = true; constructor(_session: ToolSession); execute(_toolCallId: string, { calculations }: CalculatorParams, signal?: AbortSignal): Promise>; } interface CalculatorRenderArgs { calculations?: Array<{ expression: string; prefix?: string; suffix?: string; }>; } /** * TUI renderer for calculator tool calls and results. * Handles both collapsed (preview) and expanded (full) display modes. */ export declare const calculatorToolRenderer: { /** * Render the tool call header showing the first expression and count. * Format: "Calc (N calcs)" */ renderCall(args: CalculatorRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component; /** * Render calculation results as a tree list. * Collapsed mode shows first N items with expand hint; expanded shows all. */ renderResult(result: { content: Array<{ type: string; text?: string; }>; details?: CalculatorToolDetails; isError?: boolean; }, options: RenderResultOptions, uiTheme: Theme, args?: CalculatorRenderArgs): Component; mergeCallAndResult: boolean; }; export {};