import { WorkflowContext } from './common'; /** * Returns the current workflow's execution context, providing access to * the workflow ID, replay state, dimensional coordinates, connection * info, and other runtime metadata. * * The context is populated by the worker's `wrapWorkflowFunction` and * stored in `AsyncLocalStorage`, making it available to any code running * within the workflow function's call stack. * * ## Examples * * ```typescript * import { Durable } from '@hotmeshio/hotmesh'; * * // Access the workflow ID and namespace * export async function contextAwareWorkflow(): Promise { * const ctx = Durable.workflow.workflowInfo(); * console.log(`Running workflow ${ctx.workflowId} in ${ctx.namespace}`); * return ctx.workflowId; * } * ``` * * ```typescript * // Check if the current execution is a replay * export async function replayAwareWorkflow(): Promise { * const { counter, workflowDimension } = Durable.workflow.workflowInfo(); * * // Use context for logging/debugging * console.log(`Execution counter: ${counter}, dimension: ${workflowDimension}`); * } * ``` * * ```typescript * // Pass context info to child workflows * export async function parentWorkflow(): Promise { * const { workflowId } = Durable.workflow.workflowInfo(); * * await Durable.workflow.executeChild({ * taskQueue: 'children', * workflowName: 'childWorkflow', * args: [workflowId], // pass parent ID to child * }); * } * ``` * * @returns {WorkflowContext} The current workflow context. */ export declare function workflowInfo(): WorkflowContext;