import type { GrantexFunction, GrantexFunctionOptions } from './types.js'; /** * Create a Grantex-authorized function in OpenAI function-calling format. * * Before execution, the grant token signature and claims are verified against * JWKS, then the verified `scp` claim is checked. If verification fails or the * agent does not hold `requiredScope`, `execute()` throws before calling `func`. * * @example * ```ts * const calendarFn = createGrantexFunction({ * name: 'list_calendar_events', * description: "List the user's upcoming calendar events", * parameters: { * type: 'object', * properties: { date: { type: 'string', description: 'ISO date string' } }, * required: ['date'], * }, * grantToken: tokenResponse.grantToken, * requiredScope: 'calendar:read', * func: async ({ date }) => fetchCalendarEvents(date as string), * }); * * // Pass to AutoGen / OpenAI: * const tools = [calendarFn.definition]; * * // Execute after LLM selects the tool: * const result = await calendarFn.execute({ date: '2024-01-15' }); * ``` */ export declare function createGrantexFunction>(options: GrantexFunctionOptions): GrantexFunction; //# sourceMappingURL=function.d.ts.map