import type { AIMessagePartData, AIToolAuthorizationData, AIToolCallPart, AIToolCallStatus } from './types'; /** The attachment type prefix every AI step uses. */ export declare const AI_MESSAGE_PART_TYPE_PREFIX = "ai_"; /** The newest format version of the built-in kinds this SDK understands. */ export declare const AI_MESSAGE_PART_SUPPORTED_VERSION = 1; /** * Decodes one attachment, or returns `undefined` when it is not an AI step. * * @param attachment The attachment, as it is on the message (with its `type`). * @param position The attachment's index, used as the identity of a step with no ID of its own. */ export declare const parseMessagePart: (attachment: unknown, position?: number) => AIMessagePartData | undefined; /** * Decodes the AI steps among a message's attachments, in order. Attachments that are not AI * steps (images, files and so on) are skipped. Decoding is lenient: missing fields get * defaults, and a step newer than this SDK understands keeps its payload but has no typed * view. * * ```ts * const parts = parseMessageParts(message.attachments); * ``` */ export declare const parseMessageParts: (attachments: readonly unknown[] | null | undefined) => AIMessagePartData[]; /** Whether this SDK has a typed view of the step. */ export declare const isSupportedPart: (part: AIMessagePartData) => boolean; /** Whether the call has finished, one way or another. */ export declare const isToolCallFinished: (status: AIToolCallStatus) => boolean; /** * Whether the person declined the call, or the sign-in it waited for, so it never ran. */ export declare const isDeclined: (call: AIToolCallPart) => boolean; /** * Whether this call is waiting for this device: a client tool, still awaiting its result, * targeted at this person and this install. */ export declare const isAwaitingClient: (call: AIToolCallPart, userId: string, clientId: string) => boolean; /** * Whether this call is waiting for this person to allow it, on this device: still awaiting * approval, targeted at this person, and at this install when it names one (a client tool * does; a server tool's question may be answered from any of their devices). */ export declare const isAwaitingApproval: (call: AIToolCallPart, userId: string, clientId: string) => boolean; /** Whether this call is waiting for this person to sign in, from any of their devices. */ export declare const isAwaitingAuthorization: (call: AIToolCallPart, userId: string) => boolean; /** Whether a sign-in that is still asked for has passed its `expiresAt`. */ export declare const isAuthorizationExpired: (authorization: AIToolAuthorizationData, now?: number) => boolean; //# sourceMappingURL=parseMessageParts.d.ts.map