feat: semantically determine goal completion

ref: N25B-432
This commit is contained in:
Twirre Meulenbelt
2026-01-07 17:08:23 +01:00
parent 3189b9fee3
commit aa5b386f65
8 changed files with 380 additions and 163 deletions

View File

@@ -1,6 +1,7 @@
from pydantic import BaseModel
from control_backend.schemas.program import Belief as ProgramBelief
from control_backend.schemas.program import Goal
class BeliefList(BaseModel):
@@ -12,3 +13,7 @@ class BeliefList(BaseModel):
"""
beliefs: list[ProgramBelief]
class GoalList(BaseModel):
goals: list[Goal]

View File

@@ -13,6 +13,9 @@ class Belief(BaseModel):
name: str
arguments: list[str] | None
# To make it hashable
model_config = {"frozen": True}
class BeliefMessage(BaseModel):
"""

View File

@@ -117,7 +117,7 @@ class Goal(ProgramElement):
:ivar can_fail: Whether we can fail to achieve the goal after executing the plan.
"""
description: str
description: str = ""
plan: Plan
can_fail: bool = True