feat: auto-pause on data fetch + iron rules update

- All api_get/api_post calls now auto-pause game before executing
- AUTO_PAUSE_ENABLED flag to disable for event daemon polling
- Event daemon explicitly disables auto-pause (frequent light polling)
- Iron rules updated:
  Rule 1: AI must pause BEFORE any reasoning/decision
  Rule 2: Tools auto-pause on state data fetch
  Rule 3: AI must pause before asking user questions
  Rule 4: AI must ensure paused when exiting response state
  Rule 5: Save before major operations
This commit is contained in:
root
2026-05-22 09:28:06 +08:00
parent f8a89a375b
commit 80485d2a5a
3 changed files with 41 additions and 11 deletions

View File

@ -26,6 +26,10 @@ import datetime
TOOLS_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'tools')
sys.path.insert(0, TOOLS_DIR)
# Disable auto-pause for event daemon — we poll frequently and should not pause the game
import oni_api
oni_api.AUTO_PAUSE_ENABLED = False
from oni_api import api_get, api_post, api_url