import type { RequestContext } from './types.js'; /** * Get the current request context. * * @returns The RequestContext if called within a request scope (inside runWithContext), * undefined otherwise (e.g., during app initialization or outside request handlers) * * @example * ```typescript * import { getContext } from 'bedrock-agentcore/context' * * const handler = async (request, context) => { * const ctx = getContext() * console.log('Request ID:', ctx?.requestId) * console.log('Session ID:', ctx?.sessionId) * } * ``` */ export declare function getContext(): RequestContext | undefined; /** * Run a function within a request context scope. * The context will be available via getContext() throughout the entire async call chain. * * This function is internal to the runtime module and should not be used directly by customers. * It is automatically called by BedrockAgentCoreApp to set up context for each request. * * @param context - The request context to make available * @param fn - The function to execute within the context scope * @returns The return value of the function * @internal */ export declare function runWithContext(context: RequestContext, fn: () => T): T; //# sourceMappingURL=context.d.ts.map