feat: xmpp bot最终修复版+skill文档同步
xmpp_agent_core.py 当前工作配置记录: 1. send_presence() — presence = available, 否则私聊进离线 2. 入站消息队列(_inbound_queue) — 崩了不丢, 重试3次 3. 出站队列(_outbound_queue) — 崩了自动重启 4. XMPP心跳检测(xep_0199 ping) — run_filters死后15s内重连 5. 私聊回复双通道: send_message(指定resource) + send_stanza(裸JID) 6. AGENT_MENTION动态解析(群聊@知微识别) 7. session_id保持xmpp-zhiwei-v2不变(不因重启换session) 8. 断线重连2秒延迟(防资源冲突)
This commit is contained in:
@@ -294,7 +294,7 @@ def save_cooldown(cd):
|
||||
def in_cooldown(code, action_type, cooldown_dict, minutes=30):
|
||||
key = f"{code}_{action_type}"
|
||||
last = cooldown_dict.get(key, 0)
|
||||
elapsed = time.time() - last
|
||||
elapsed = datetime.now().timestamp() - last
|
||||
return elapsed < minutes * 60, elapsed, key
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ def main():
|
||||
|
||||
# 加载冷却状态
|
||||
cooldown = load_cooldown()
|
||||
now_ts = time.time()
|
||||
now_ts = datetime.now().timestamp()
|
||||
|
||||
# 读 decisions.json 获取完整策略数据
|
||||
code_data = {}
|
||||
|
||||
Reference in New Issue
Block a user