import type { ExecutionTraceData } from "../base-strategy/types.js"; import type { SummaryFeedbackCoordinatorOptions, SummaryOptions, SummaryResult } from "./types.js"; /** * Coordinates summary feedback for one or more strategy execution traces. * * Use this coordinator when an operation executes multiple strategies/sub-steps and * needs a single user-facing summary for status, warnings, errors, metrics, and * next-step suggestions. * * @example * ```typescript * const coordinator = new SummaryFeedbackCoordinator(); * coordinator.collect(specKitTrace); * coordinator.collect(validationTrace, "constitution-validation"); * * const summary = coordinator.summarize({ * includeMetrics: true, * includeSuggestions: true, * }); * ``` */ export declare class SummaryFeedbackCoordinator { private operations; private feedback; private customSuggestions; private readonly now; private startTime; /** * Creates a new coordinator instance. * * @param options - Optional clock and initial start-time overrides. */ constructor(options?: SummaryFeedbackCoordinatorOptions); /** * Collects a strategy execution trace as one operation. * * Warning detection is intentionally dual-path: * - category exactly equal to "warning" (case-insensitive), or * - description containing the word "warning" (case-insensitive). * * @param trace - Trace exported from strategy execution. * @param name - Optional operation name override. */ collect(trace: ExecutionTraceData, name?: string): void; /** * Adds a manual feedback item to the summary pool. * * @param severity - Feedback severity level. * @param message - User-facing feedback message. * @param source - Optional source identifier. */ addFeedback(severity: "info" | "warning" | "error", message: string, source?: string): void; /** * Adds a warning feedback entry. * * @param message - Warning message. * @param source - Optional source identifier. */ addWarning(message: string, source?: string): void; /** * Adds an error feedback entry. * * @param message - Error message. * @param source - Optional source identifier. */ addError(message: string, source?: string): void; /** * Adds a custom next-step suggestion. * * @param action - Suggested action. * @param reason - Why the action is suggested. * @param priority - Suggestion priority. */ addSuggestion(action: string, reason: string, priority?: "high" | "medium" | "low"): void; /** * Produces a consolidated summary from collected operations and manual feedback. * * @param options - Summary generation options. * @returns Structured and display-ready summary payload. */ summarize(options?: SummaryOptions): SummaryResult; /** * Resets all collected state so the coordinator can be reused. */ reset(): void; /** * Returns true when at least one error feedback entry exists. */ hasErrors(): boolean; /** * Returns true when at least one warning feedback entry exists. */ hasWarnings(): boolean; /** * Number of currently collected operations. */ get operationCount(): number; private determineStatus; private calculateDuration; private determineOverallStatus; private calculateTotalDuration; private aggregateMetrics; private getWarnings; private getErrors; private generateAutoSuggestions; private generateTextSummary; private generateMarkdownSummary; private truncateText; private formatDuration; } //# sourceMappingURL=summary-feedback-coordinator.d.ts.map