langgoap.StuckHandlerResult#
- class StuckHandlerResult(code, message, handler_name=None, state_updates=<factory>, new_goal=None, timestamp=<factory>)[source]#
Outcome of a stuck-handler invocation.
- Parameters:
code (StuckHandlingResultCode)
message (str)
handler_name (str | None)
state_updates (Mapping[str, Any])
new_goal (Any)
timestamp (datetime)
- code#
REPLANorNO_RESOLUTION.
- message#
Human-readable explanation of what happened.
- Type:
str
- handler_name#
Name of the handler that produced this result;
Nonefor aggregated results (e.g. multicast NO_RESOLUTION).- Type:
str | None
- state_updates#
Optional world-state delta merged into
world_statebefore the next planning attempt. Only consulted whencode == REPLAN. Defaults to empty.- Type:
collections.abc.Mapping[str, Any]
- new_goal#
Optional
GoalSpec/MultiGoalthat replaces the goal for the next planning attempt. Only consulted whencode == REPLAN.Nonekeeps the current goal.- Type:
Any
- timestamp#
When the result was produced (UTC).
- Type:
datetime.datetime
- __init__(code, message, handler_name=None, state_updates=<factory>, new_goal=None, timestamp=<factory>)#
- Parameters:
code (StuckHandlingResultCode)
message (str)
handler_name (str | None)
state_updates (Mapping[str, Any])
new_goal (Any)
timestamp (datetime)
- Return type:
None
Methods
__init__(code, message[, handler_name, ...])no_resolution(*, handler_name, message)Convenience constructor for the NO_RESOLUTION branch.
replan(*, handler_name, message[, ...])Convenience constructor for the REPLAN branch.
Attributes