import { ToolSet, Tool } from 'ai'; import { a as DeferredToolCall, b as DeferredToolCallConfig, K as KnockOutboundWebhookEvent, D as DeferredToolCallInteractionResult } from '../types-kR5zfaEk.js'; import { T as ToolkitConfig, a as ToolCategory } from '../index-qFGypkX3.js'; import { ToolInvocation } from '@ai-sdk/ui-utils'; import '@knocklabs/mgmt/resources.js'; import '@knocklabs/node/resources.js'; import 'zod'; import '@knocklabs/mgmt'; import '@knocklabs/node'; /** * Convert a deferred tool call to a tool invocation. Useful when building an assistant * response from a deferred tool call. * * @param deferredToolCall - The deferred tool call to convert. * @param result - The result of the tool call. * @returns The tool invocation. */ declare function deferredToolCallToToolInvocation(deferredToolCall: DeferredToolCall, result: unknown): ToolInvocation; type KnockToolkit = { getAllTools: () => ToolSet; getTools: (category: ToolCategory) => ToolSet; getToolMap: () => Record; requireHumanInput: (toolsToWrap: ToolSet, inputConfig: DeferredToolCallConfig) => ToolSet; resumeToolExecution: (toolInteraction: DeferredToolCall) => Promise; wrappedToolsRequiringInput: () => Map; handleMessageInteraction: (event: KnockOutboundWebhookEvent) => DeferredToolCallInteractionResult | null; }; /** * Creates a Knock toolkit for use with the AI SDK. * * You can filter the set of tools that are available by setting the `config.permissions` property. * * When the `config.permissions.workflows.trigger` is set, then workflow triggers for * the specified workflows will be included in the returned tools. * * You can also specify a list of workflow keys to include in the returned tools, should you wish to * limit the set of workflows that are available. * * @example * ```ts * const toolkit = await createKnockToolkit({ * permissions: { * workflows: { read: true }, * }, * }); * ``` * * @param config - The configuration to use for the toolkit * @returns A toolkit for use with the AI SDK */ declare const createKnockToolkit: (config: ToolkitConfig) => Promise; export { createKnockToolkit, deferredToolCallToToolInvocation };