yashppawar/permit-pathfinder
0
1"""2Data models for the PermitPathfinder environment.3 4PermitPathfinder simulates a stateful municipal permitting workflow.5An agent opens a business by navigating a DAG of permits, paying fees,6scheduling inspections, and respecting prerequisites — all under a7budget cap.8"""9 10from typing import Optional11 12from openenv.core.env_server.types import Action, Observation13from pydantic import Field14 15 16class PermitAction(Action):17 """An action taken by the agent against the permitting system."""18 19 action_type: str = Field(20 ...,21 description=(22 "One of: 'submit', 'pay', 'inspect', 'query', 'list', 'set_task'. "23 "'list' ignores permit_id and returns all permits. "24 "'set_task' uses permit_id to carry the target task name."25 ),26 )27 permit_id: Optional[str] = Field(28 default=None,29 description="ID of the permit to act on (not required for 'list').",30 )31 32 33class PermitObservation(Observation):34 """The observation returned after each step."""35 36 message: str = Field(37 default="",38 description="Human-readable status message for the last action.",39 )40 permits: dict = Field(41 default_factory=dict,42 description=(43 "All permits in the task: "44 "{permit_id: {stage, fee, prereqs, prereqs_met}}"45 ),46 )47 budget_remaining: float = Field(48 default=0.0,49 description="Remaining budget after fees paid.",50 )51 wasted_submissions: int = Field(52 default=0,53 description="Count of illegal submit/pay/inspect attempts.",54 )55 last_action_error: Optional[str] = Field(56 default=None,57 description="Raw error from the last action, or None if successful.",58 )59 available_actions: list = Field(60 default_factory=list,61 description="List of action strings currently legal.",62 )63 task_name: str = Field(64 default="easy_foodtruck",65 description="Currently active task.",66 )67 