UNPKG

agents

Version:

A home for your AI agents

90 lines (88 loc) • 2.66 kB
import { C as WindowWebFetchPageOptions, S as WebFetchVia, T as windowWebFetchPage, _ as WEB_FETCH_TOOL_NAME, a as WebFetchCallOptions, b as WebFetchToolInput, c as WebFetchRequest, d as DEFAULT_WEB_FETCH_MAX_BYTES, f as DEFAULT_WEB_FETCH_MAX_REDIRECTS, g as WEB_FETCH_TOOL_DESCRIPTION, h as MAX_WEB_FETCH_URL_LENGTH, i as DirectWebFetchOptions, l as WebFetchSource, m as DEFAULT_WEB_FETCH_TIMEOUT_MS, n as WebFetchToolOptions, o as WebFetchError, p as DEFAULT_WEB_FETCH_PAGE_CHARS, r as WebFetchToolSourceOptions, s as WebFetchErrorCode, t as WebFetchToolDirectOptions, u as createDirectWebFetch, v as WebFetchFormat, w as renderWebFetchPage, x as WebFetchToolOutput, y as WebFetchPage } from "../../tool-DoVberpN.js"; //#region src/web/url-policy.d.ts /** * Whether a host, as `URL.hostname` gives it, is in one of the ranges below * (IPv4, or IPv6 including IPv4-mapped, NAT64 and 6to4 forms), or is * `localhost` or ends in `.localhost` or `.internal`. */ declare function isPrivateOrLocalHost(hostname: string): boolean; //#endregion //#region src/web/fetch/index.d.ts /** Options for {@link fetchWeb}: the direct source's, plus a deadline. */ interface FetchWebOptions extends DirectWebFetchOptions { /** * Give up after this many milliseconds with a `web_fetch_timeout` error. * A positive integer; defaults to 30 seconds. */ timeoutMs?: number; /** Abort the fetch; rejects with the signal's reason. */ signal?: AbortSignal; } /** * Fetch one URL directly, without a tool: {@link createDirectWebFetch} plus * a deadline. Returns the whole page; to show it to a model a window at a * time, as the tool does, pass it to {@link windowWebFetchPage} and * {@link renderWebFetchPage}. */ declare function fetchWeb( request: WebFetchRequest, options: FetchWebOptions ): Promise<WebFetchPage>; //#endregion export { DEFAULT_WEB_FETCH_MAX_BYTES, DEFAULT_WEB_FETCH_MAX_REDIRECTS, DEFAULT_WEB_FETCH_PAGE_CHARS, DEFAULT_WEB_FETCH_TIMEOUT_MS, type DirectWebFetchOptions, FetchWebOptions, MAX_WEB_FETCH_URL_LENGTH, WEB_FETCH_TOOL_DESCRIPTION, WEB_FETCH_TOOL_NAME, type WebFetchCallOptions, WebFetchError, type WebFetchErrorCode, type WebFetchFormat, type WebFetchPage, type WebFetchRequest, type WebFetchSource, type WebFetchToolDirectOptions, type WebFetchToolInput, type WebFetchToolOptions, type WebFetchToolOutput, type WebFetchToolSourceOptions, type WebFetchVia, type WindowWebFetchPageOptions, createDirectWebFetch, fetchWeb, isPrivateOrLocalHost, renderWebFetchPage, windowWebFetchPage }; //# sourceMappingURL=index.d.ts.map