/**
 * Arithmetic evaluator for the built-in `calculateMath` tool.
 *
 * The expression is MODEL output. It is parsed by a small recursive-descent
 * parser and evaluated over numbers only: there is no `Function`, no `eval`,
 * no property access and no identifier that is not on the fixed allow-list
 * below. Anything the grammar does not cover is reported as an error.
 *
 * Grammar (precedence low → high):
 *
 *   expression := term (("+" | "-") term)*
 *   term       := unary (("*" | "/" | "%") unary)*
 *   unary      := ("-" | "+") unary | power
 *   power      := primary ("**" unary)?            right-associative
 *   primary    := number | constant | function "(" args ")" | "(" expression ")"
 *
 * Numbers are decimal literals (`12`, `3.5`, `.5`, `1e-3`). Functions and
 * constants are the listed `Math` members, accepted with or without the
 * `Math.` prefix. Unary minus binds looser than `**`, so `-2 ** 2` is `-4`,
 * as in mathematics (JavaScript rejects that spelling outright).
 */
import type { ArithmeticEvaluation } from "../types/index.js";
/** The names the model may use, for the error text and the tool description. */
export declare const ARITHMETIC_FUNCTION_NAMES: readonly string[];
export declare const ARITHMETIC_CONSTANT_NAMES: readonly string[];
/**
 * Evaluate an arithmetic expression without executing it as code.
 *
 * Total: every failure — unsupported syntax, an unknown name, a result that is
 * not a finite number — comes back as `{ ok: false, error }`, never a throw.
 */
export declare function evaluateArithmetic(expression: string): ArithmeticEvaluation;
