| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/aim-bots/ |
Upload File : |
#!/usr/bin/env python3
"""Patch squad voice.json for always-online + faster reply caps."""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path("/opt/aim-bots/personas")
MANIFEST = Path("/opt/aim-bots/always_online_squad.json")
PATCH = {
"always_at_keyboard": True,
"force_always_online": True,
"typing_wpm_min": 105,
"typing_wpm_max": 130,
"timing_profile": {
"always_at_keyboard": True,
"always_online_chance": 1.0,
"afk_chance": 0.0,
"hot_reply_floor_sec": 0.6,
"hot_reply_cap_sec": 3.0,
"warm_reply_floor_sec": 0.9,
"warm_reply_cap_sec": 4.5,
"cold_reply_floor_sec": 1.0,
"cold_reply_cap_sec": 5.5,
"afk_reply_cap_sec": 6.0,
"reply_target_min_sec": 1.5,
"reply_target_max_sec": 6.0,
},
}
def merge_profile(existing: dict, patch: dict) -> dict:
out = dict(existing)
for key, val in patch.items():
if key == "timing_profile" and isinstance(val, dict):
tp = dict(out.get("timing_profile") or {})
tp.update(val)
out["timing_profile"] = tp
else:
out[key] = val
return out
def main() -> int:
data = json.loads(MANIFEST.read_text())
bots = data["bots"]
for name in bots:
voice_path = ROOT / name / "voice.json"
if not voice_path.exists():
print(f"skip missing {name}")
continue
voice = json.loads(voice_path.read_text())
voice = merge_profile(voice, PATCH)
voice_path.write_text(json.dumps(voice, indent=2) + "\n")
print(f"patched {name}")
return 0
if __name__ == "__main__":
raise SystemExit(main())