# retoor <retoor@molodetz.nl>
from __future__ import annotations
from .spec import Action, Param
BEHAVIOR_ACTIONS: tuple[Action, ...] = (
Action(
name="update_behavior",
method="LOCAL",
path="",
summary="Update your own persistent '# TRUTH RULES AND BEHAVIOR' section",
description=(
"Records how the user wants you to behave into the '# TRUTH RULES AND BEHAVIOR' section at "
"the end of your system message, so the change persists across turns and restarts. Call it "
"when the user tells you to behave differently, says they expect different behavior, or you "
"upset them. The 'behavior' value is the FULL new content of that section: take the rules "
"currently shown there, apply the user's change (add, adjust, or remove a rule), and pass "
"the whole result so nothing already learned is lost unless they want it removed. Private "
"to this account (a guest's applies to the current session only)."
),
handler="behavior",
requires_auth=False,
params=(
Param(
name="behavior",
location="body",
description="The full new content of the '# TRUTH RULES AND BEHAVIOR' section.",
required=True,
),
),
),
)