import type { FunctionTool } from '@openai/agents-core'; import type { Duration, RetryPolicy } from '@temporalio/common'; export declare class ToolSerializationError extends Error { constructor(message: string); } export interface JsonObjectSchema<_T = unknown> { type: 'object'; properties: Record; required?: string[]; additionalProperties?: boolean; } type ActivityInput Promise> = Parameters[0]; /** * Definition for wrapping a Temporal Activity as an agent tool. `TActivity` is * the Activity function type (e.g. `typeof activities.getWeather`); its first * argument shape types `parameters`. */ export interface ActivityToolDefinition Promise> { /** Activity name — must match the registered Activity on the Worker. */ name: string; /** Tool description shown to the model. */ description: string; /** Explicit JSON schema for the tool parameters (not Zod). */ parameters: JsonObjectSchema>; } export interface ActivityAsToolOptions { startToCloseTimeout?: Duration; heartbeatTimeout?: Duration; taskQueue?: string; retryPolicy?: RetryPolicy; strict?: boolean; } /** * Wraps a Temporal Activity as an OpenAI Agents FunctionTool. When the agent * invokes the tool, it schedules the named Activity via `proxyActivities` and * returns the stringified result. */ export declare function activityAsTool Promise>(definition: ActivityToolDefinition, options?: ActivityAsToolOptions): FunctionTool; export {};