import { JSONSchema7 } from "../../node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.js";
import { ProviderOptions, Tool } from "./tool-types.js";
import { StandardSchemaV1 } from "@standard-schema/spec";

//#region src/core/tool/schema-utils.d.ts
/**
 * Type for a tool definition with JSON Schema parameters.
 */
type ToolJSONSchema = {
  description?: string;
  parameters: JSONSchema7;
  providerOptions?: ProviderOptions;
};
type ToToolsJSONSchemaOptions = {
  /**
   * Filter to determine which tools to include.
   * Defaults to excluding disabled tools and backend tools.
   *
   * Tools with backend-default parameters are always excluded.
   */
  filter?: (name: string, tool: Tool) => boolean;
};
/**
 * Converts a schema to JSONSchema7.
 * Supports:
 * - StandardSchemaV1 with ~standard.toJSONSchema (e.g., Zod v4)
 * - StandardSchemaV1 with ~standard.jsonSchema.input() (e.g., Zod v4)
 * - Objects with toJSONSchema() method (e.g., Zod v4)
 * - Objects with toJSON() method
 * - Plain JSONSchema7 objects (must have a "type" property)
 */
declare function toJSONSchema(schema: StandardSchemaV1 | JSONSchema7): JSONSchema7;
/**
 * Returns a copy of the JSON Schema with `required` removed recursively,
 * making every property optional. Array item schemas are left unchanged.
 */
declare function toPartialJSONSchema(schema: JSONSchema7): JSONSchema7;
/**
 * Converts a record of tools to a record of tool definitions with JSON Schema parameters.
 * By default, filters out disabled tools and backend tools.
 *
 * Entries are emitted in alphabetical order so the resulting request body is
 * byte-identical regardless of the order in which tools were registered. This
 * keeps provider prompt caches stable across renders that mount tools in
 * different orders.
 */
declare function toToolsJSONSchema(tools: Record<string, Tool> | undefined, options?: ToToolsJSONSchemaOptions): Record<string, ToolJSONSchema>;
//#endregion
export { ToToolsJSONSchemaOptions, ToolJSONSchema, toJSONSchema, toPartialJSONSchema, toToolsJSONSchema };
//# sourceMappingURL=schema-utils.d.ts.map