//#region src/core/enrichments.ts
var MessageLabel = class {
	key;
	value;
	confidence;
	constructor(options) {
		this.key = options.key;
		this.value = options.value;
		this.confidence = options.confidence ?? null;
	}
	toDict() {
		const result = {
			key: this.key,
			value: this.value
		};
		if (this.confidence != null) result.confidence = this.confidence;
		return result;
	}
};
var EvidenceQuote = class {
	quote;
	turnIndex;
	role;
	constructor(options) {
		this.quote = options.quote;
		this.turnIndex = options.turnIndex;
		this.role = options.role ?? null;
	}
	toDict() {
		const result = {
			quote: this.quote,
			turn_index: this.turnIndex
		};
		if (this.role != null) result.role = this.role;
		return result;
	}
};
var TopicClassification = class {
	l1;
	values;
	primary;
	/** @deprecated Use {@link subcategories} instead. */
	l2;
	subcategories;
	topicsCovered;
	outcomesByTopic;
	constructor(options = {}) {
		this.l1 = options.l1 ?? null;
		this.values = options.values ?? null;
		this.primary = options.primary ?? null;
		this.l2 = options.l2 ?? null;
		this.subcategories = options.subcategories ?? null;
		this.topicsCovered = options.topicsCovered ?? null;
		this.outcomesByTopic = options.outcomesByTopic ?? null;
	}
	toDict() {
		const result = {};
		if (this.l1 != null) result.l1 = this.l1;
		if (this.values != null) result.values = this.values;
		if (this.primary != null) result.primary = this.primary;
		if (this.l2 != null) result.l2 = this.l2;
		if (this.subcategories != null) result.subcategories = this.subcategories;
		if (this.topicsCovered != null) result.topics_covered = this.topicsCovered;
		if (this.outcomesByTopic != null) result.outcomes_by_topic = this.outcomesByTopic;
		return result;
	}
};
var RubricScore = class {
	name;
	score;
	rationale;
	evidence;
	improvementOpportunities;
	constructor(options) {
		this.name = options.name;
		this.score = options.score;
		this.rationale = options.rationale ?? null;
		this.evidence = options.evidence ?? null;
		this.improvementOpportunities = options.improvementOpportunities ?? null;
	}
	toDict() {
		const result = {
			name: this.name,
			score: this.score
		};
		if (this.rationale != null) result.rationale = this.rationale;
		if (this.evidence != null) result.evidence = this.evidence.map((e) => e.toDict());
		if (this.improvementOpportunities != null) result.improvement_opportunities = this.improvementOpportunities;
		return result;
	}
};
var SessionEnrichments = class {
	topicClassifications;
	rubrics;
	overallOutcome;
	hasTaskFailure;
	hasNegativeFeedback;
	hasDataQualityIssues;
	hasTechnicalFailure;
	errorCategories;
	userFriction;
	customMetadata;
	schemaVersion;
	qualityScore;
	sentimentScore;
	taskFailureType;
	taskFailureReason;
	negativeFeedbackPhrases;
	dataQualityIssues;
	technicalErrorCount;
	agentChain;
	rootAgentName;
	requestComplexity;
	messageLabels;
	constructor(options = {}) {
		this.topicClassifications = options.topicClassifications ?? null;
		this.rubrics = options.rubrics ?? null;
		this.overallOutcome = options.overallOutcome ?? null;
		this.hasTaskFailure = options.hasTaskFailure ?? false;
		this.hasNegativeFeedback = options.hasNegativeFeedback ?? false;
		this.hasDataQualityIssues = options.hasDataQualityIssues ?? false;
		this.hasTechnicalFailure = options.hasTechnicalFailure ?? false;
		this.errorCategories = options.errorCategories ?? null;
		this.userFriction = options.userFriction ?? options.behavioralPatterns ?? null;
		this.customMetadata = options.customMetadata ?? null;
		this.schemaVersion = options.schemaVersion ?? "2.0";
		this.qualityScore = options.qualityScore ?? null;
		this.sentimentScore = options.sentimentScore ?? null;
		this.taskFailureType = options.taskFailureType ?? null;
		this.taskFailureReason = options.taskFailureReason ?? null;
		this.negativeFeedbackPhrases = options.negativeFeedbackPhrases ?? null;
		this.dataQualityIssues = options.dataQualityIssues ?? null;
		this.technicalErrorCount = options.technicalErrorCount ?? null;
		this.agentChain = options.agentChain ?? null;
		this.rootAgentName = options.rootAgentName ?? null;
		this.requestComplexity = options.requestComplexity ?? null;
		this.messageLabels = options.messageLabels ?? null;
	}
	toDict() {
		const result = {};
		if (this.topicClassifications != null) {
			const tc = {};
			for (const [name, classification] of Object.entries(this.topicClassifications)) tc[name] = classification.toDict();
			result.topic_classifications = tc;
		}
		if (this.rubrics != null) result.rubrics = this.rubrics.map((r) => r.toDict());
		if (this.overallOutcome != null) result.overall_outcome = this.overallOutcome;
		result.has_task_failure = this.hasTaskFailure;
		result.has_negative_feedback = this.hasNegativeFeedback;
		result.has_data_quality_issues = this.hasDataQualityIssues;
		result.has_technical_failure = this.hasTechnicalFailure;
		if (this.errorCategories != null) result.error_categories = this.errorCategories;
		if (this.userFriction != null) result.user_friction = this.userFriction;
		if (this.customMetadata != null) result.custom_metadata = this.customMetadata;
		result.schema_version = this.schemaVersion;
		if (this.qualityScore != null) result.quality_score = this.qualityScore;
		if (this.sentimentScore != null) result.sentiment_score = this.sentimentScore;
		if (this.taskFailureType != null) result.task_failure_type = this.taskFailureType;
		if (this.taskFailureReason != null) result.task_failure_reason = this.taskFailureReason;
		if (this.negativeFeedbackPhrases != null) result.negative_feedback_phrases = this.negativeFeedbackPhrases;
		if (this.dataQualityIssues != null) result.data_quality_issues = this.dataQualityIssues;
		if (this.technicalErrorCount != null) result.technical_error_count = this.technicalErrorCount;
		if (this.agentChain != null) result.agent_chain = this.agentChain;
		if (this.rootAgentName != null) result.root_agent_name = this.rootAgentName;
		if (this.requestComplexity != null) result.request_complexity = this.requestComplexity;
		if (this.messageLabels != null) {
			const ml = {};
			for (const [mid, labels] of Object.entries(this.messageLabels)) ml[mid] = labels.map((lbl) => lbl.toDict());
			result.message_labels = ml;
		}
		return result;
	}
};

//#endregion
export { EvidenceQuote, MessageLabel, RubricScore, SessionEnrichments, TopicClassification };
//# sourceMappingURL=enrichments.js.map