feat: added a functionality for monitoring page

ref: N25B-400
This commit is contained in:
Pim Hutting
2026-01-08 09:56:10 +01:00
parent 20e5e46639
commit 4bf2be6359
5 changed files with 161 additions and 40 deletions

View File

@@ -176,6 +176,16 @@ class AgentSpeakGenerator:
context.append(self._astify(from_phase.goals[-1], achieved=True))
body = [
AstStatement(
StatementType.DO_ACTION,
AstLiteral(
"notify_transition_phase",
[
AstString(str(from_phase.id)),
AstString(str(to_phase.id) if to_phase else "end"),
],
),
),
AstStatement(StatementType.REMOVE_BELIEF, from_phase_ast),
AstStatement(StatementType.ADD_BELIEF, to_phase_ast),
]
@@ -192,20 +202,6 @@ class AgentSpeakGenerator:
]
)
# Notify outside world about transition
body.append(
AstStatement(
StatementType.DO_ACTION,
AstLiteral(
"notify_transition_phase",
[
AstString(str(from_phase.id)),
AstString(str(to_phase.id) if to_phase else "end"),
],
),
)
)
self._asp.plans.append(
AstPlan(TriggerType.ADDED_GOAL, AstLiteral("transition_phase"), context, body)
)