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#

REPLAN or NO_RESOLUTION.

Type:

langgoap.stuck.StuckHandlingResultCode

message#

Human-readable explanation of what happened.

Type:

str

handler_name#

Name of the handler that produced this result; None for aggregated results (e.g. multicast NO_RESOLUTION).

Type:

str | None

state_updates#

Optional world-state delta merged into world_state before the next planning attempt. Only consulted when code == REPLAN. Defaults to empty.

Type:

collections.abc.Mapping[str, Any]

new_goal#

Optional GoalSpec / MultiGoal that replaces the goal for the next planning attempt. Only consulted when code == REPLAN. None keeps 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