import { Logger } from '@happyvertical/logger'; /** * Job context for logging */ export interface JobContext { jobId: string; attempt: number; queue: string; objectType: string; method: string; } export interface JobEventInput { type?: string; level?: 'debug' | 'info' | 'warn' | 'error'; stage?: string | null; progress?: number | null; message?: string; data?: Record; } export interface JobProgressInput { stage: string; progress: number; message?: string; detail?: string; source?: string; data?: Record; } export interface JobExecutionContext { job: JobContext & { tenantId?: string | null; }; logger: Logger; event(input: JobEventInput): Promise; progress(input: JobProgressInput): Promise; log(level: 'debug' | 'info' | 'warn' | 'error', message: string, data?: Record): Promise; /** * Present only for a job created by the MCP Tasks extension. Calling this * persists an input request and resolves after `tasks/update` supplies every * requested key (or rejects cooperatively if the task is cancelled). */ task?: { requestInput(inputRequests: Record): Promise>; }; } /** * Logger extension that auto-injects job context into all log entries * * During job execution, all logs automatically include: * - jobId: The job's unique identifier * - attempt: Which attempt this is (1, 2, 3...) * - queue: Which queue the job is in * - objectType: The type of object being operated on * - method: The method being invoked */ export declare class JobContextLogger implements Logger { private readonly baseLogger; private readonly jobContext; constructor(baseLogger: Logger, jobContext: JobContext); private addContext; debug(message: string, data?: Record): void; info(message: string, data?: Record): void; warn(message: string, data?: Record): void; error(message: string, data?: Record): void; } export default JobContextLogger; //# sourceMappingURL=logger-extension.d.ts.map