import type { AgentMessage } from "@elyracode/agent-core"; /** * Builds the body of a GitHub issue for `/bug`. * * Everything here is deliberately plain data in, string out, so the report can * be tested without a TUI and reused by other modes. Redaction runs over the * whole body last, so callers do not need to sanitize fields individually. */ export declare const BUG_REPORT_ISSUES_URL = "https://github.com/kwhorne/elyra/issues/new"; /** Longest URL we will hand to a browser/`gh`; beyond this the user gets a file instead. */ export declare const MAX_ISSUE_URL_LENGTH = 7000; export interface BugReportInput { /** User's one-line description; becomes the title. */ description: string; version: string; /** e.g. "node 24.1.0" or "bun 1.2.0" */ runtime: string; model?: { provider: string; id: string; }; thinkingLevel?: string; sessionId: string; sessionFile?: string; messageCounts: { user: number; assistant: number; toolCalls: number; }; extensions: string[]; extensionErrors: Array<{ path: string; error: string; }>; skillCount: number; /** Most recent assistant error, if the last turn failed. */ lastError?: string; /** Names of the last few tool calls, most recent last. */ recentTools: string[]; platform?: { type: string; release: string; arch: string; }; terminal?: string; } export interface BugReport { title: string; body: string; /** Prefilled GitHub "new issue" URL, or undefined if the body is too long for a URL. */ url: string | undefined; } export declare function buildBugReport(input: BugReportInput): BugReport; /** Pull the fields that need the message history out of the session's messages. */ export declare function summarizeMessages(messages: readonly AgentMessage[]): { counts: BugReportInput["messageCounts"]; lastError: string | undefined; recentTools: string[]; }; export declare function redact(text: string): string; //# sourceMappingURL=bug-report.d.ts.map