/** * Ambient submission correlation (v2, workstream C3/C4). * * The submission runner wraps each attempt's execution in * {@link runWithSubmissionContext}; anything that runs inside the turn — * tool wrappers, telemetry sinks, lineage stamps — can call * {@link currentSubmissionContext} to correlate its records with the owning * submission without threading ids through every call signature. */ import type { FabricActor } from './types.js'; export interface SubmissionContext { readonly submissionId: string; readonly attemptId: string; /** Persistent agent name. */ readonly agent: string; /** Addressed instance id. */ readonly instanceId: string; readonly session: string; readonly tenantId?: string; readonly actor?: FabricActor; /** * The runner attempt's abort signal. Prompts inherit it when callers do not * provide an explicit signal, including prompts nested inside finite jobs. */ readonly signal?: AbortSignal; } /** Run `fn` with `context` as the ambient submission correlation. */ export declare function runWithSubmissionContext(context: SubmissionContext, fn: () => Promise | T): Promise | T; /** The submission owning the current execution, or `undefined` outside one. */ export declare function currentSubmissionContext(): SubmissionContext | undefined; //# sourceMappingURL=submission-context.d.ts.map