import type { FunctionTool } from '@openai/agents-core'; import type * as nexus from 'nexus-rpc'; import type { Duration } from '@temporalio/common'; import { type JsonObjectSchema } from './tools'; /** `TOp`'s input shape types `parameters`. */ export interface NexusOperationToolDefinition> { name: string; description: string; parameters: JsonObjectSchema>; } export interface NexusOperationAsToolOptions { service: TService; endpoint: string; scheduleToCloseTimeout?: Duration; strict?: boolean; } /** * Wraps a Nexus Operation as an OpenAI Agents `FunctionTool`. When the agent * invokes the tool, it calls the Operation through a Workflow-side Nexus * client (`createNexusServiceClient`) and returns the stringified result. * * This is the Nexus counterpart of {@link activityAsTool}: instead of * scheduling a Temporal Activity, the tool invocation schedules a Nexus * Operation against the configured endpoint and service. */ export declare function nexusOperationAsTool(operation: TOp, definition: NexusOperationToolDefinition, options: NexusOperationAsToolOptions): FunctionTool;