import { JSONToolOutput, Tool, BaseToolOptions, BaseToolRunOptions, ToolEmitter, ToolInput } from './base.js'; import { z } from 'zod'; import { AnyToolSchemaLike } from '../internals/helpers/schema.js'; import { RunContext } from '../context.js'; import 'ajv'; import '../errors.js'; import '../internals/types.js'; import '../internals/helpers/guards.js'; import '../internals/serializable.js'; import 'promise-based-task'; import '../cache/base.js'; import '../emitter-l0W9gC1A.js'; import '../internals/helpers/promise.js'; import 'zod-to-json-schema'; /** * Copyright 2025 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ type ToolOptions = BaseToolOptions; type ToolRunOptions = BaseToolRunOptions; declare const SortType: { readonly RELEVANCE: "relevance"; readonly LAST_UPDATED_DATE: "lastUpdatedDate"; readonly SUBMITTED_DATE: "submittedDate"; }; declare const SortOrder: { readonly ASCENDING: "ascending"; readonly DESCENDING: "descending"; }; declare const FilterType: { readonly ALL: "all"; readonly TITLE: "title"; readonly AUTHOR: "author"; readonly ABSTRACT: "abstract"; readonly COMMENT: "comment"; readonly JOURNAL_REFERENCE: "journal_reference"; readonly SUBJECT_CATEGORY: "subject_category"; readonly REPORT_NUMBER: "report_number"; }; declare const Separators: { readonly AND: "+AND+"; readonly OR: "+OR+"; readonly ANDNOT: "+ANDNOT+"; }; interface ArXivResponse { totalResults: number; startIndex: number; itemsPerPage: number; entries: { id: string; title: string; summary: string; published: string; updated: string; authors: { name: string; affiliation: string[]; }[]; doi: string; comment: string; journalReference: string; primaryCategory: string; categories: string[]; links: string[]; }[]; } declare class ArXivToolOutput extends JSONToolOutput { isEmpty(): boolean; } declare class ArXivTool extends Tool { name: string; description: string; readonly emitter: ToolEmitter, ArXivToolOutput>; inputSchema(): z.ZodObject<{ ids: z.ZodOptional>; search_query: z.ZodOptional>; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }, { value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }>, "atleastone">; exclude: z.ZodOptional>; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }, { value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { include: [{ value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }, ...{ value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }[]]; exclude?: { value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }[] | undefined; }, { include: [{ value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }, ...{ value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }[]]; exclude?: { value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }[] | undefined; }>>; start: z.ZodDefault; maxResults: z.ZodDefault; }, "strip", z.ZodTypeAny, { start: number; maxResults: number; ids?: string[] | undefined; search_query?: { include: [{ value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }, ...{ value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }[]]; exclude?: { value: string; field: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number"; }[] | undefined; } | undefined; }, { start?: number | undefined; ids?: string[] | undefined; search_query?: { include: [{ value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }, ...{ value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }[]]; exclude?: { value: string; field?: "all" | "title" | "author" | "abstract" | "comment" | "journal_reference" | "subject_category" | "report_number" | undefined; }[] | undefined; } | undefined; maxResults?: number | undefined; }>; protected validateInput(schema: AnyToolSchemaLike, rawInput: unknown): asserts rawInput is ToolInput; protected _prepareParams(input: ToolInput): URLSearchParams; protected _run(input: ToolInput, _options: Partial, run: RunContext): Promise; protected _parseResponse(response: Response): Promise; } export { type ArXivResponse, ArXivTool, ArXivToolOutput, FilterType, Separators, SortOrder, SortType };