import { Tool, StringToolOutput, ToolEmitter, ToolInput } from './base.cjs'; import { z } from 'zod'; import { evaluate, ConfigOptions, ImportObject, ImportOptions } from 'mathjs'; import 'ajv'; import '../context.cjs'; import '../emitter-D4OcelZ9.cjs'; import '../internals/types.cjs'; import '../internals/helpers/guards.cjs'; import '../internals/serializable.cjs'; import '../internals/helpers/promise.cjs'; import '../errors.cjs'; import 'promise-based-task'; import '../cache/base.cjs'; import '../internals/helpers/schema.cjs'; import 'zod-to-json-schema'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface CalculatorToolInput { config?: ConfigOptions; imports?: { entries: ImportObject | ImportObject[]; options?: ImportOptions; }; } /** * Warning: The CalculatorTool enables the agent (and by proxy the user) to execute arbitrary * expressions via mathjs. * * Please consider the security and stability risks documented at * https://mathjs.org/docs/expressions/security.html before using this tool. */ declare class CalculatorTool extends Tool { name: string; description: string; readonly emitter: ToolEmitter, StringToolOutput>; inputSchema(): z.ZodObject<{ expression: z.ZodString; }, "strip", z.ZodTypeAny, { expression: string; }, { expression: string; }>; protected limitedEvaluate: typeof evaluate; constructor({ config, imports, ...options }?: CalculatorToolInput); protected _run({ expression }: ToolInput): Promise; } export { CalculatorTool, type CalculatorToolInput };