/** * One failure, described well enough that whoever meets it in analytics, Slack * or GitHub can open the exact thread, run or route without asking the reporter * for anything. Isomorphic: the server attaches it to captures * (`observability/failure-context.ts`), the client formats the report a person * copies from an error card (`client/failure-report.ts`). */ export interface FailureContext { appId?: string; route?: string; actionName?: string; automationName?: string; threadId?: string; runId?: string; requestId?: string; /** `org` when the work ran under an organization, never an email address. */ userScope?: "org" | "personal"; /** `https:///?thread=`, the canonical deep link. */ threadUrl?: string; release?: string; environment?: string; errorCode?: string; failureClass?: string; occurredAt?: string; } export declare function chatThreadUrl(appBaseUrl: string, threadId: string): string; /** Drops empty keys so a packet never carries `undefined` or blank strings. */ export declare function compactFailureContext(context: Partial): FailureContext; /** * The compact plain-text packet behind a "Copy details" button. The last line * names the read-only inspection action, so an agent that is handed only this * text knows where to look next. */ export declare function formatFailureReport(context: FailureContext, options?: { message?: string; }): string;