import { loadConfig } from '../config/load'; import type { ConfigInput } from '../config/schema'; import type { EventMode } from '../events/schema'; import { initStateStore } from '../state/store'; import { initEvents } from './events'; import { detectRepoContext } from './repo'; export type RunContext = { runId: string; repo: Awaited>; config: Awaited>['config']; configSource: Awaited>['source']; state: Awaited>; events: Awaited>; }; export declare function createRunContext(options: { cwd: string; mode: EventMode; lock?: boolean; runId?: string; configOverrides?: ConfigInput; }): Promise; export declare function withRunContext(options: { cwd: string; mode: EventMode; lock?: boolean; runId?: string; configOverrides?: ConfigInput; }, fn: (ctx: RunContext) => Promise): Promise;