Spaces:
Sleeping
Sleeping
File size: 1,027 Bytes
31f5053 cd7967c 31f5053 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # src/jira_to_code/models.py
from typing import Literal, Optional, List, Dict, Any
from pydantic import Field
from openenv.core.env_server import Action, Observation
class JiraCodeAction(Action):
action_type: Literal["read_file", "write_file", "list_files", "run_tests", "submit"]
file_path: Optional[str] = Field(default=None, description="Path to the file to read or write")
content: Optional[str] = Field(default=None, description="Code content to write to the file")
class JiraCodeObservation(Observation):
jira_ticket: str = Field(..., description="The objective the agent needs to complete")
file_tree: List[str] = Field(default_factory=list, description="List of files in the repo")
current_file_content: Optional[str] = Field(default=None, description="Content of the recently read/written file")
test_output: Optional[str] = Field(default=None, description="Output from running tests")
error: Optional[str] = Field(default=None, description="Any system errors (e.g., file not found)") |