Skip to content

Commit b8e37f7

Browse files
committed
four verification flows are correctly wired
1 parent cc7e96a commit b8e37f7

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

app/agents/narrator/agent.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
"""
77

88
from google.adk.agents import Agent
9-
from google.adk.tools import FunctionTool
109

1110
from app.shared.config import config
12-
from app.tools.lore_tools import search_lore
13-
from app.tools.world_state_tools import get_world_state
1411

1512
NARRATOR_INSTRUCTION = open("app/agents/narrator/prompt.md", "r").read()
1613

app/agents/onboarding/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from google.adk.agents import Agent
1717
from google.adk.tools import FunctionTool
1818

19-
from app.shared.config import config
2019
from app.tools.lore_tools import lookup_character, search_lore
2120
from app.tools.player_tools import (
2221
advance_onboarding_step,

app/tools/player_tools.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,11 +652,22 @@ async def complete_mission(
652652
consequences = ["Complications noted by the hotel management."]
653653
rewards = {"reputation_delta": rep_delta}
654654

655+
# Map outcome values to valid missions.status values.
656+
# missions.status CHECK: ('pending','active','completed','failed','cancelled','complicated')
657+
# outcome values: 'success' | 'failure' | 'abandoned' | 'complicated'
658+
_MISSION_STATUS: dict[str, str] = {
659+
"success": "completed",
660+
"failure": "failed",
661+
"abandoned": "cancelled",
662+
"complicated": "complicated",
663+
}
664+
mission_status = _MISSION_STATUS.get(outcome, "cancelled")
665+
655666
async with transaction() as conn:
656667
# Update mission
657668
await conn.execute(
658669
"UPDATE missions SET status = $1, outcome = $2, completed_day = $3 WHERE id = $4",
659-
"completed" if outcome == "success" else outcome,
670+
mission_status,
660671
narrative_outcome,
661672
story_day,
662673
mission["id"],

0 commit comments

Comments
 (0)