Source:
Local role: Serializable result of projecting one Action from one Perception with an explicit resource set.
Big-picture role: Intermediate projection artifact that records explicit assumptions and the projected successor perceived state before later strategy-node construction.
Inheritance:
- dataclass
Parameters and fields:
- action_id: str
- actor_id: str
- source_perception_id: str
- source_id: str
- status: str
- resource_ids: list[str]
- assumptions: list[ProjectionAssumption]
- projected_state: Optional[ProjectedPerceptionState]
- metadata: dict
Methods:
to_dict() -> dictfrom_dict(data) -> ActionProjection
Example:
from ometeotl_core.model.projection import DefaultProjectionTool
tool = DefaultProjectionTool()
projection = tool.project_action(action, perception, resources=[resource])
print(projection.status) # "projected" | "partial" | "blocked"
print(projection.action_id)
print(projection.actor_id)
if projection.projected_state:
pps = projection.projected_state
print(len(pps.changes)) # number of state changes applied
data = projection.to_dict()
See also:
