src / types / search.ts
import { JsonValue } from "../http/HTTPClient";
import { SearchResult } from "../models/SearchResult";
/**
* High-level search categories supported by Browse.
*/
export type SearchType = "web" | "image";
/**
* Provider-agnostic optional search execution parameters.
* Corresponds to keyword arguments passed into Python `SearchEngine.search()` and provider search methods.
*/
export interface SearchOptions {
/** Optional explicit provider name identifier to route request to. */
provider?: string;
/** Maximum number of search results to return. */
numResults?: number;
/** Optional API key string override. */
apiKey?: string;
/** Target working directory path for local file operations. */
workingDirectory?: string;
/** Optional correlation ID for log tracing. */
requestId?: string;
/** Additional provider-specific keyword arguments. */
[key: string]: JsonValue | undefined;
}
/**
* Structured search query request parameter object.
* Corresponds to tool request parameters in Python `server.py` (`_execute_search`).
*/
export interface SearchRequest {
/** Search query text string. */
query: string;
/** Optional explicit provider name identifier. */
provider?: string;
/** Maximum number of search results to return. */
numResults?: number;
}
/**
* Structured response payload returned by search operations.
* Corresponds to serialized dictionary payload in Python `server.py` `_execute_search`.
*/
export interface SearchResponse {
/** Executed search query. */
query?: string;
/** Number of items returned. */
count?: number;
/** Standardized list of search results. */
results: SearchResult[];
/** Optional error message if search failed. */
error?: string;
}
src / types / search.ts
import { JsonValue } from "../http/HTTPClient";
import { SearchResult } from "../models/SearchResult";
/**
* High-level search categories supported by Browse.
*/
export type SearchType = "web" | "image";
/**
* Provider-agnostic optional search execution parameters.
* Corresponds to keyword arguments passed into Python `SearchEngine.search()` and provider search methods.
*/
export interface SearchOptions {
/** Optional explicit provider name identifier to route request to. */
provider?: string;
/** Maximum number of search results to return. */
numResults?: number;
/** Optional API key string override. */
apiKey?: string;
/** Target working directory path for local file operations. */
workingDirectory?: string;
/** Optional correlation ID for log tracing. */
requestId?: string;
/** Additional provider-specific keyword arguments. */
[key: string]: JsonValue | undefined;
}
/**
* Structured search query request parameter object.
* Corresponds to tool request parameters in Python `server.py` (`_execute_search`).
*/
export interface SearchRequest {
/** Search query text string. */
query: string;
/** Optional explicit provider name identifier. */
provider?: string;
/** Maximum number of search results to return. */
numResults?: number;
}
/**
* Structured response payload returned by search operations.
* Corresponds to serialized dictionary payload in Python `server.py` `_execute_search`.
*/
export interface SearchResponse {
/** Executed search query. */
query?: string;
/** Number of items returned. */
count?: number;
/** Standardized list of search results. */
results: SearchResult[];
/** Optional error message if search failed. */
error?: string;
}