import type { AgentControllerEvent } from '@mastra/core/agent-controller'; import { z } from 'zod'; import type { AuditActorType } from '../storage/domains/audit/base.js'; import type { AuditRecorder } from '../storage/domains/audit/domain.js'; export declare const FACTORY_OPEN_RUNS_SETTING = "factoryOpenRuns"; declare const factoryOpenRunSchema: z.ZodObject<{ kickoffId: z.ZodString; bindingId: z.ZodString; role: z.ZodString; startedBy: z.ZodString; orgId: z.ZodString; factoryProjectId: z.ZodString; workItemId: z.ZodString; workItemName: z.ZodOptional; sessionId: z.ZodString; threadId: z.ZodString; branch: z.ZodString; agentName: z.ZodString; }, z.core.$strip>; export type FactoryOpenRun = z.infer; export interface RunEndCaptureSession { readonly thread: { getSetting(args: { key: string; }): Promise; setSetting(args: { key: string; value: unknown; }): Promise; }; readonly mode: { get(): string; }; subscribe(listener: (event: AgentControllerEvent) => void): () => void; } type RunEndReason = Extract['reason']; export declare function recordSessionRunStart(session: RunEndCaptureSession, { audit, run, actorType, observedEnd, }: { audit: AuditRecorder; run: Omit; actorType: AuditActorType; observedEnd: () => RunEndReason; }): Promise; export declare function observeSessionRunEnd(session: RunEndCaptureSession, { audit }: { audit: AuditRecorder; }): () => void; export {}; //# sourceMappingURL=run-audit.d.ts.map