File size: 887 Bytes
5a2d63f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from dataclasses import dataclass, field
from typing import Dict, List, Any, Optional
@dataclass
class Action:
action_type: str # read_logs, analyze_error, edit_config, run_tests, validate_fix, submit_solution
parameters: Dict[str, Any] # e.g., {"target_step": "build", "new_value": "npm test"}
confidence: float # agent's self-reported confidence (0.0 to 1.0)
reasoning: str # agent's internal reasoning string
@dataclass
class Observation:
pipeline_yaml: str # current YAML config
error_message: str # latest error
logs: List[str] # execution logs
step_blame_scores: Dict[str, float] # causal blame scores per pipeline step (0-1)
available_actions: List[str] # action space mask
episode_history: List[Dict[str, Any]] # past actions + outcomes
memory_hits: List[Dict[str, Any]] # similar past failures retrieved from memory bank
|