import { ToolDefinition as ToolDefinition$1 } from "./_chunks/index.mjs"; import { ExtensionAPI, Text, ToolDefinition } from "@oh-my-pi/pi-coding-agent"; type TextComponent = typeof Text; /** The part of a host result a renderer reads. */ export interface OmpResultView { readonly details?: unknown; readonly isError?: boolean; } /** Per-tool renderer overrides, drawn with the host theme. */ export interface OmpRenderers { /** One-line summary of the arguments after the title. Sanitized by the adapter. */ describeCall?(args: Readonly>): unknown; /** Replaces the whole call line, `describeCall` included. It owns sanitizing what it draws. */ renderCall?: ToolDefinition["renderCall"]; /** Short metadata after the badge, one entry per fact. Each entry is sanitized. */ describeResult?(result: OmpResultView): readonly unknown[]; /** Replaces the status line and the answer under it. It owns sanitizing what it draws. */ renderResult?: ToolDefinition["renderResult"]; } export interface OmpToolOptions { /** The host `Text` component, imported by the extension from the package root. */ readonly Text: TextComponent; /** `"essential"` keeps every tool in OMP's top-level list. Left out, OMP hides them behind discovery. */ readonly loadMode?: ToolDefinition["loadMode"]; /** Status-line renderers by tool name. */ readonly renderers?: Readonly>; } /** * Registers every tool on the OMP extension API. * * The schema reaches OMP through `pi.typebox.Type.Unsafe`: the host-injected * build validates the raw JSON Schema with its full validator and emits the * document verbatim, so `pattern` and `maxProperties` survive. A standalone * omptype schema would drop both. * * Every tool says `strict: false`. OMP's OpenAI strict mode makes each optional field required * and nullable, so the model fills them all with junk, and the core refuses even the `null`. * * @param pi - OMP extension API. * @param tools - Tools to register. * @param options - Host `Text`, optional load mode and renderers. * @throws {ToolDefinitionError} When two tools share a name. */ export declare function registerOmpTools(pi: ExtensionAPI, tools: readonly ToolDefinition$1[], options: OmpToolOptions): void;