//#region src/domains/run/errors/contract-violation-error.ts
var ContractViolationError = class extends Error {
	subAgentId;
	policy;
	attemptedRetries;
	lastResponseText;
	/** Human-readable description of which contract rule was violated. */
	reason;
	constructor(params) {
		super(`Sub-agent '${params.subAgentId}' violated its output contract: ${params.reason} (policy: ${params.policy}, retries: ${params.attemptedRetries})`);
		this.name = "ContractViolationError";
		this.subAgentId = params.subAgentId;
		this.policy = params.policy;
		this.attemptedRetries = params.attemptedRetries;
		this.lastResponseText = params.lastResponseText;
		this.reason = params.reason;
	}
};

//#endregion
export { ContractViolationError };