import { TailorPrincipal } from "./types.mjs"; //#region src/runtime/context.d.ts /** * Information about the invoker of the current function execution. * * Matches the public `TailorPrincipal` shape — `attributes` is the attribute * map and `attributeList` is the array of attribute IDs. */ export type Invoker = TailorPrincipal; /** * Raw platform-side invoker payload returned by `tailor.context.getInvoker()`. * The wrapper normalizes this into {@link Invoker}. * @internal */ export interface ContextInvoker { /** The invoker's ID */ id: string; /** The invoker's type */ type: "user" | "machine_user"; /** The workspace ID */ workspaceId: string; /** The invoker's attribute IDs */ attributes: string[]; /** The invoker's attribute map */ attributeMap: Record; } /** * Platform API surface for `tailor.context`. Describes the shape the platform * runtime injects on `globalThis.tailor.context`. * @internal */ export interface PlatformContextAPI { getInvoker(): ContextInvoker | null; } /** Runtime wrapper API for execution context utilities. */ export interface TailorContextAPI { /** * Returns information about the current invoker. * @returns Invoker details, or `null` for anonymous invocations */ getInvoker(): Invoker | null; } /** * Returns information about the invoker of the current function execution, * or `null` for anonymous invocations. * @returns Invoker details, or `null` when the call is anonymous */ declare function getInvoker(): Invoker | null; /** Runtime wrapper namespace for `tailor.context`. */ export declare const context: { readonly getInvoker: typeof getInvoker; }; //#endregion