{"action":{"additionalProperties":false,"description":"Action model for the environment.","properties":{"metadata":{"additionalProperties":true,"description":"Additional metadata for the action","title":"Metadata","type":"object"},"action_type":{"description":"Type of action to perform.","enum":["inspect_table","inspect_operation","apply_operation","request_review","run_sync_dry_run","submit"],"title":"Action Type","type":"string"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Table to inspect when action_type=inspect_table.","title":"Table Name"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Operation to inspect or apply when action_type is inspect_operation or apply_operation.","title":"Operation Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Entity type to review when action_type=request_review.","title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Entity identifier to review when action_type=request_review.","title":"Entity Id"},"target_system":{"anyOf":[{"enum":["crm","billing"],"type":"string"},{"type":"null"}],"default":null,"description":"Downstream system to simulate when action_type=run_sync_dry_run.","title":"Target System"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Reason for escalating a review request.","title":"Reason Code"},"reasoning":{"default":"","description":"Optional natural-language reasoning for debugging baselines.","title":"Reasoning","type":"string"}},"required":["action_type"],"title":"DataCleaningAction","type":"object"},"observation":{"$defs":{"ActionCostEntry":{"description":"Estimated operational cost of taking an action.","properties":{"action_key":{"description":"Stable action or risk key.","title":"Action Key","type":"string"},"estimated_cost":{"default":0.0,"description":"Relative action cost used in reward shaping.","title":"Estimated Cost","type":"number"},"description":{"default":"","description":"Why this action costs reviewer or system capacity.","title":"Description","type":"string"}},"required":["action_key"],"title":"ActionCostEntry","type":"object"},"DownstreamHealth":{"description":"Operational health estimates for downstream systems.","properties":{"crm_sync_success_rate":{"default":0.0,"description":"Estimated CRM import success rate.","title":"Crm Sync Success Rate","type":"number"},"billing_link_integrity":{"default":0.0,"description":"Estimated correctness of billing/customer linkages.","title":"Billing Link Integrity","type":"number"},"duplicate_contact_risk":{"default":0.0,"description":"Estimated risk that duplicate contacts still remain.","title":"Duplicate Contact Risk","type":"number"},"revenue_reporting_risk":{"default":0.0,"description":"Estimated risk of duplicate or mislinked revenue facts.","title":"Revenue Reporting Risk","type":"number"},"overall_health_score":{"default":0.0,"description":"Composite downstream health score used for reward shaping.","title":"Overall Health Score","type":"number"}},"title":"DownstreamHealth","type":"object"},"DryRunFinding":{"description":"A deterministic downstream issue surfaced by a dry-run sync.","properties":{"code":{"description":"Stable machine-readable issue code.","title":"Code","type":"string"},"severity":{"description":"Issue severity.","enum":["low","medium","high"],"title":"Severity","type":"string"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Table implicated by the dry-run finding.","title":"Table Name"},"row_ids":{"description":"Primary-key values implicated by the finding.","items":{"type":"string"},"title":"Row Ids","type":"array"},"message":{"description":"Human-readable dry-run explanation.","title":"Message","type":"string"}},"required":["code","severity","message"],"title":"DryRunFinding","type":"object"},"DryRunReport":{"description":"A dry-run simulation result for a downstream business system.","properties":{"target_system":{"description":"Which downstream system was tested.","enum":["crm","billing"],"title":"Target System","type":"string"},"success_rate":{"default":0.0,"description":"Deterministic estimate of how many records would import successfully.","title":"Success Rate","type":"number"},"finding_count":{"default":0,"description":"How many concrete blockers or risks were found.","title":"Finding Count","type":"integer"},"findings":{"description":"Structured findings from the simulated sync.","items":{"$ref":"#/$defs/DryRunFinding"},"title":"Findings","type":"array"},"summary":{"default":"","description":"Short narrative summary of the dry-run result.","title":"Summary","type":"string"},"generated_at_step":{"default":0,"description":"Step on which the report was generated.","title":"Generated At Step","type":"integer"}},"required":["target_system"],"title":"DryRunReport","type":"object"},"GradeBreakdown":{"description":"Deterministic grader components.","properties":{"cell_match_score":{"default":0.0,"description":"Fraction of gold cells matched.","title":"Cell Match Score","type":"number"},"key_recall_score":{"default":0.0,"description":"Row identity and deduplication quality.","title":"Key Recall Score","type":"number"},"validation_score":{"default":0.0,"description":"How well the current tables satisfy constraints.","title":"Validation Score","type":"number"},"final_score":{"default":0.0,"description":"Weighted final task score.","title":"Final Score","type":"number"}},"title":"GradeBreakdown","type":"object"},"IssueCard":{"description":"Aggregated issue summary paired with likely remediation operations.","properties":{"title":{"description":"Short issue title.","title":"Title","type":"string"},"detail":{"description":"Why the issue matters in this task.","title":"Detail","type":"string"},"issue_codes":{"description":"Validation codes represented by this card.","items":{"type":"string"},"title":"Issue Codes","type":"array"},"recommended_operation_ids":{"description":"Operations likely to address the issue.","items":{"type":"string"},"title":"Recommended Operation Ids","type":"array"}},"required":["title","detail"],"title":"IssueCard","type":"object"},"OperationDetail":{"description":"Extra context for one operation.","properties":{"operation_id":{"description":"Stable operation identifier.","title":"Operation Id","type":"string"},"title":{"description":"Short action title.","title":"Title","type":"string"},"category":{"description":"Operation category.","title":"Category","type":"string"},"risk":{"description":"Risk level for the operation.","enum":["safe","review","destructive"],"title":"Risk","type":"string"},"tables_affected":{"description":"Tables changed by the operation.","items":{"type":"string"},"title":"Tables Affected","type":"array"},"description":{"description":"What the operation does.","title":"Description","type":"string"},"already_applied":{"default":false,"description":"Whether this operation has already been applied.","title":"Already Applied","type":"boolean"},"why_it_matters":{"default":"","description":"Business-oriented explanation of the operation.","title":"Why It Matters","type":"string"},"change_preview":{"description":"Predicted row changes if the operation were applied now.","items":{"$ref":"#/$defs/RowChange"},"title":"Change Preview","type":"array"}},"required":["operation_id","title","category","risk","description"],"title":"OperationDetail","type":"object"},"OperationSummary":{"description":"A cleaning operation the agent can choose.","properties":{"operation_id":{"description":"Stable operation identifier.","title":"Operation Id","type":"string"},"title":{"description":"Short action title.","title":"Title","type":"string"},"category":{"description":"Operation category.","title":"Category","type":"string"},"risk":{"description":"Risk level for the operation.","enum":["safe","review","destructive"],"title":"Risk","type":"string"},"tables_affected":{"description":"Tables changed by the operation.","items":{"type":"string"},"title":"Tables Affected","type":"array"},"description":{"description":"What the operation does.","title":"Description","type":"string"},"already_applied":{"default":false,"description":"Whether this operation has already been applied.","title":"Already Applied","type":"boolean"}},"required":["operation_id","title","category","risk","description"],"title":"OperationSummary","type":"object"},"PendingReview":{"description":"A queued review request awaiting a deterministic response.","properties":{"review_id":{"description":"Stable review case identifier.","title":"Review Id","type":"string"},"entity_type":{"description":"Type of entity under review.","title":"Entity Type","type":"string"},"entity_id":{"description":"Primary identifier for the reviewed entity.","title":"Entity Id","type":"string"},"reason_code":{"description":"Why the review was requested.","title":"Reason Code","type":"string"},"title":{"description":"Short human-readable review title.","title":"Title","type":"string"},"requested_at_step":{"description":"Step index when the review was requested.","title":"Requested At Step","type":"integer"},"ready_at_step":{"description":"First step on which the deterministic response becomes available.","title":"Ready At Step","type":"integer"}},"required":["review_id","entity_type","entity_id","reason_code","title","requested_at_step","ready_at_step"],"title":"PendingReview","type":"object"},"ReviewResolution":{"description":"A resolved human-review response surfaced back to the agent.","properties":{"review_id":{"description":"Stable review case identifier.","title":"Review Id","type":"string"},"entity_type":{"description":"Type of entity under review.","title":"Entity Type","type":"string"},"entity_id":{"description":"Primary identifier for the reviewed entity.","title":"Entity Id","type":"string"},"reason_code":{"description":"Why the review was requested.","title":"Reason Code","type":"string"},"title":{"description":"Short human-readable review title.","title":"Title","type":"string"},"resolution":{"description":"Deterministic review outcome label.","title":"Resolution","type":"string"},"response_summary":{"description":"What the reviewer concluded.","title":"Response Summary","type":"string"},"evidence_summary":{"description":"Short explanation for the decision.","title":"Evidence Summary","type":"string"},"recommended_operation_ids":{"description":"Operations that become safer after the review response.","items":{"type":"string"},"title":"Recommended Operation Ids","type":"array"}},"required":["review_id","entity_type","entity_id","reason_code","title","resolution","response_summary","evidence_summary"],"title":"ReviewResolution","type":"object"},"ReviewTarget":{"description":"A reviewable entity that can be escalated to a human reviewer.","properties":{"review_id":{"description":"Stable review case identifier.","title":"Review Id","type":"string"},"entity_type":{"description":"Type of entity under review.","title":"Entity Type","type":"string"},"entity_id":{"description":"Primary identifier for the reviewed entity.","title":"Entity Id","type":"string"},"reason_code":{"description":"Why the review would be requested.","title":"Reason Code","type":"string"},"title":{"description":"Short human-readable review title.","title":"Title","type":"string"},"detail":{"description":"Why this review matters.","title":"Detail","type":"string"},"recommended_operation_ids":{"description":"Operations likely to be safe once review resolves.","items":{"type":"string"},"title":"Recommended Operation Ids","type":"array"}},"required":["review_id","entity_type","entity_id","reason_code","title","detail"],"title":"ReviewTarget","type":"object"},"RewardBreakdown":{"description":"Explains how a scalar reward was produced.","properties":{"quality_delta":{"default":0.0,"description":"Change in overall grader score after the action.","title":"Quality Delta","type":"number"},"issue_delta":{"default":0.0,"description":"Normalized change in outstanding validation issues.","title":"Issue Delta","type":"number"},"downstream_health_delta":{"default":0.0,"description":"Change in downstream operational health after the action.","title":"Downstream Health Delta","type":"number"},"insight_bonus":{"default":0.0,"description":"Small positive reward for inspecting new assets.","title":"Insight Bonus","type":"number"},"efficiency_penalty":{"default":0.0,"description":"Per-step penalty to discourage long episodes.","title":"Efficiency Penalty","type":"number"},"invalid_action_penalty":{"default":0.0,"description":"Penalty for malformed or unsupported actions.","title":"Invalid Action Penalty","type":"number"},"noop_penalty":{"default":0.0,"description":"Penalty for no-op or repeated actions.","title":"Noop Penalty","type":"number"},"review_bonus":{"default":0.0,"description":"Positive reward when a queued review response becomes available.","title":"Review Bonus","type":"number"},"review_cost_penalty":{"default":0.0,"description":"Small cost for consuming limited human-review budget.","title":"Review Cost Penalty","type":"number"},"action_cost_penalty":{"default":0.0,"description":"Cost-aware penalty attached to the chosen action.","title":"Action Cost Penalty","type":"number"},"submit_bonus":{"default":0.0,"description":"End-of-episode bonus based on final score.","title":"Submit Bonus","type":"number"},"total":{"default":0.0,"description":"Final scalar reward returned.","title":"Total","type":"number"}},"title":"RewardBreakdown","type":"object"},"RiskCard":{"description":"A compact operational risk summary derived from downstream health.","properties":{"title":{"description":"Short risk title.","title":"Title","type":"string"},"detail":{"description":"Why this risk matters operationally.","title":"Detail","type":"string"},"severity":{"description":"Severity for UI and agent prioritization.","enum":["low","medium","high"],"title":"Severity","type":"string"},"metric_name":{"description":"Downstream metric represented by this card.","title":"Metric Name","type":"string"},"current_value":{"default":0.0,"description":"Current metric or risk value in [0, 1].","title":"Current Value","type":"number"},"recommended_action_ids":{"description":"Operations likely to improve this risk.","items":{"type":"string"},"title":"Recommended Action Ids","type":"array"}},"required":["title","detail","severity","metric_name"],"title":"RiskCard","type":"object"},"RowChange":{"description":"Before/after preview for a changed row.","properties":{"primary_key_value":{"description":"Changed row identifier.","title":"Primary Key Value","type":"string"},"before":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"description":"Row values before applying an operation.","title":"Before"},"after":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"description":"Row values after applying an operation.","title":"After"}},"required":["primary_key_value"],"title":"RowChange","type":"object"},"TableSummary":{"description":"Compact summary of a table.","properties":{"name":{"description":"Table name.","title":"Name","type":"string"},"primary_key":{"description":"Primary key column.","title":"Primary Key","type":"string"},"row_count":{"description":"Number of rows in the current table.","title":"Row Count","type":"integer"},"columns":{"description":"Column names.","items":{"type":"string"},"title":"Columns","type":"array"},"missing_cells":{"default":0,"description":"Count of blank required or optional cells.","title":"Missing Cells","type":"integer"},"duplicate_groups":{"default":0,"description":"Count of duplicate identity groups.","title":"Duplicate Groups","type":"integer"},"preview_rows":{"description":"Small row preview for quick inspection.","items":{"additionalProperties":{"type":"string"},"type":"object"},"title":"Preview Rows","type":"array"}},"required":["name","primary_key","row_count"],"title":"TableSummary","type":"object"},"TableView":{"description":"Full table contents for one focused table.","properties":{"name":{"description":"Table name.","title":"Name","type":"string"},"primary_key":{"description":"Primary key column.","title":"Primary Key","type":"string"},"columns":{"description":"Column names.","items":{"type":"string"},"title":"Columns","type":"array"},"rows":{"description":"Current table rows.","items":{"additionalProperties":{"type":"string"},"type":"object"},"title":"Rows","type":"array"}},"required":["name","primary_key"],"title":"TableView","type":"object"},"ValidationIssue":{"description":"A concrete validation problem the agent should resolve.","properties":{"code":{"description":"Stable machine-readable issue code.","title":"Code","type":"string"},"severity":{"description":"Issue severity.","enum":["low","medium","high"],"title":"Severity","type":"string"},"table_name":{"description":"Table containing the issue.","title":"Table Name","type":"string"},"column_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Column containing the issue, if applicable.","title":"Column Name"},"row_ids":{"description":"Affected primary-key values.","items":{"type":"string"},"title":"Row Ids","type":"array"},"message":{"description":"Human-readable issue summary.","title":"Message","type":"string"}},"required":["code","severity","table_name","message"],"title":"ValidationIssue","type":"object"}},"additionalProperties":false,"description":"Observation returned after each environment interaction.","properties":{"done":{"default":false,"description":"Whether the episode has terminated","title":"Done","type":"boolean"},"reward":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"null"}],"default":null,"description":"Reward signal from the last action","title":"Reward"},"metadata":{"additionalProperties":true,"description":"Additional metadata for the observation","title":"Metadata","type":"object"},"task_id":{"description":"Current task identifier.","title":"Task Id","type":"string"},"task_title":{"description":"Human-readable task title.","title":"Task Title","type":"string"},"difficulty":{"description":"Task difficulty.","enum":["easy","medium","hard"],"title":"Difficulty","type":"string"},"requested_seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Seed used when resetting the current episode.","title":"Requested Seed"},"objective":{"description":"Concrete task objective.","title":"Objective","type":"string"},"dataset_context":{"description":"Why this dataset exists in the real world.","title":"Dataset Context","type":"string"},"quality_score":{"default":0.0,"description":"Current deterministic grader score.","title":"Quality Score","type":"number"},"best_score":{"default":0.0,"description":"Best score seen in the current episode.","title":"Best Score","type":"number"},"remaining_steps":{"default":0,"description":"How many actions remain before truncation.","title":"Remaining Steps","type":"integer"},"review_budget_remaining":{"default":0,"description":"How many human-review requests remain in the current episode.","title":"Review Budget Remaining","type":"integer"},"supported_sync_targets":{"description":"Downstream systems that can be tested with run_sync_dry_run.","items":{"type":"string"},"title":"Supported Sync Targets","type":"array"},"downstream_health":{"$ref":"#/$defs/DownstreamHealth","description":"Current operational health estimates for downstream systems."},"risk_cards":{"description":"Operational risk summaries derived from downstream health.","items":{"$ref":"#/$defs/RiskCard"},"title":"Risk Cards","type":"array"},"last_dry_run":{"anyOf":[{"$ref":"#/$defs/DryRunReport"},{"type":"null"}],"default":null,"description":"Most recent downstream dry-run result, if any."},"action_costs":{"description":"Estimated cost of each action family.","items":{"$ref":"#/$defs/ActionCostEntry"},"title":"Action Costs","type":"array"},"table_summaries":{"description":"Compact summaries of all tables.","items":{"$ref":"#/$defs/TableSummary"},"title":"Table Summaries","type":"array"},"focus_table":{"anyOf":[{"$ref":"#/$defs/TableView"},{"type":"null"}],"default":null,"description":"Detailed contents for the currently inspected table."},"available_operations":{"description":"Available cleaning actions.","items":{"$ref":"#/$defs/OperationSummary"},"title":"Available Operations","type":"array"},"available_review_targets":{"description":"Entities that can be escalated for deterministic review.","items":{"$ref":"#/$defs/ReviewTarget"},"title":"Available Review Targets","type":"array"},"pending_reviews":{"description":"Review requests that have been queued but not yet resolved.","items":{"$ref":"#/$defs/PendingReview"},"title":"Pending Reviews","type":"array"},"resolved_reviews":{"description":"Resolved review responses available to the agent.","items":{"$ref":"#/$defs/ReviewResolution"},"title":"Resolved Reviews","type":"array"},"focus_operation":{"anyOf":[{"$ref":"#/$defs/OperationDetail"},{"type":"null"}],"default":null,"description":"Detailed preview for the currently inspected operation."},"validation_issues":{"description":"Current unresolved validation issues.","items":{"$ref":"#/$defs/ValidationIssue"},"title":"Validation Issues","type":"array"},"issue_cards":{"description":"Aggregated issue cards with suggested next actions.","items":{"$ref":"#/$defs/IssueCard"},"title":"Issue Cards","type":"array"},"recent_history":{"description":"Recent action log.","items":{"type":"string"},"title":"Recent History","type":"array"},"grader":{"$ref":"#/$defs/GradeBreakdown","description":"Deterministic score components."},"reward_breakdown":{"$ref":"#/$defs/RewardBreakdown","description":"How the last reward was computed."},"last_action_status":{"default":"","description":"Outcome message for the most recent action.","title":"Last Action Status","type":"string"},"last_action_error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Raw error string for the last action, or null when no error occurred.","title":"Last Action Error"}},"required":["task_id","task_title","difficulty","objective","dataset_context"],"title":"DataCleaningObservation","type":"object"},"state":{"additionalProperties":true,"description":"Base class for environment state.\n\nRepresents internal environment state, separate from observations.","properties":{"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Unique identifier for the current episode","title":"Episode Id"},"step_count":{"default":0,"description":"Number of steps taken in the current episode","minimum":0,"title":"Step Count","type":"integer"}},"title":"State","type":"object"}}