import json, sys, time
msg = sys.argv[1] if len(sys.argv) > 1 else "ping"
with open("/tmp/orchestrator-status.jsonl", "a") as f:
    f.write(json.dumps({"ts": time.strftime("%Y-%m-%dT%H:%M:%S"), "task": "amd-agent-confirm-totp", "msg": msg}) + "\n")
print("STATUS_WRITTEN")
