npcpy 1.2.35__py3-none-any.whl → 1.2.37__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
npcpy/npc_sysenv.py CHANGED
@@ -842,8 +842,23 @@ The current date and time are : {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
842
842
 
843
843
  if team is not None:
844
844
  team_context = team.context if hasattr(team, "context") and team.context else ""
845
- team_preferences = team.preferences if hasattr(team, "preferences") and len(team.preferences) > 0 else ""
846
- system_message += f"\nTeam context: {team_context}\nTeam preferences: {team_preferences}\n"
845
+ # preferences now comes from shared_context like other generic context keys
846
+ team_preferences = team.shared_context.get('preferences', '') if hasattr(team, "shared_context") else ""
847
+ system_message += f"\nTeam context: {team_context}\n"
848
+ if team_preferences:
849
+ system_message += f"Team preferences: {team_preferences}\n"
850
+
851
+ # Add team members
852
+ if hasattr(team, 'npcs') and team.npcs:
853
+ members = []
854
+ for name, member in team.npcs.items():
855
+ if name != npc.name: # Don't list self
856
+ directive = getattr(member, 'primary_directive', '')
857
+ # Get first line or first 100 chars
858
+ desc = directive.split('\n')[0][:100] if directive else ''
859
+ members.append(f" - {name}: {desc}")
860
+ if members:
861
+ system_message += "\nTeam members (use delegate tool to assign tasks):\n" + "\n".join(members) + "\n"
847
862
 
848
863
  system_message += """
849
864
  IMPORTANT: