Compare commits

...

3 Commits

Author SHA1 Message Date
hmo d72c1a907c chore: add Windows startup batch script, update service docs
- Replace start.ps1 with start.bat (avoids false-positive trojan warnings from Defender)
- Mark wechat_agent.py as stopped in README.md, add article_processor doc
- Keep start.ps1 deletion tracked

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-25 01:24:47 +08:00
hmo d406068c89 fix(easytier): add --no-listener flag to prevent port conflicts
Without --no-listener, EasyTier opens a listener on the TUN/TAP interface which can conflict with other EasyTier instances on the same network.

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-25 01:24:47 +08:00
hmo c6795bcb46 fix: decode HTML entities in wechat article URL from XML
WeChat XML uses &amp; to encode & in forwarded article URLs. Without html.unescape(), chksm and other query params were passed encoded to WeChat servers, causing signature mismatch and captcha block.

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-25 01:23:21 +08:00
5 changed files with 989 additions and 431 deletions
+4 -1
View File
@@ -67,7 +67,10 @@ AgentsMeeting/
│ ├── scripts/ # 运行时脚本 │ ├── scripts/ # 运行时脚本
│ │ ├── chat_bridge.py # xxm LLM 桥接(SessionBridge │ │ ├── chat_bridge.py # xxm LLM 桥接(SessionBridge
│ │ ├── session_router.py # 消息路由 │ │ ├── session_router.py # 消息路由
│ │ ├── wechat_agent.py # 微信桥接代理 │ │ ├── wechat_agent.py # ⛔ 已停用(微信桥接,由 Linux Docker bot 替代)
│ │ │ # 保留代码,不再运行
│ │ ├── article_processor.py# 文章处理服务 (5810) ← 保持运行!
│ │ │ # 抓微信链接全文、OCR,WeChat bot 和 莫荷 都依赖它
│ │ ├── api_proxy.py # API 反向代理 (:8787) │ │ ├── api_proxy.py # API 反向代理 (:8787)
│ │ ├── xmpp_watchdog.py # 进程看门狗 │ │ ├── xmpp_watchdog.py # 进程看门狗
│ │ ├── health_check_xxm.py# 消息流健康检查 │ │ ├── health_check_xxm.py# 消息流健康检查
+20
View File
@@ -0,0 +1,20 @@
@echo off
echo === AgentsMeeting Windows Services ===
echo [0/3] Cleaning...
taskkill /f /im python.exe 2>nul
taskkill /f /im easytier-core.exe 2>nul
timeout /t 3 /nobreak >nul
echo [1/3] Article Processor...
start /b "" "C:\Users\hmo\AppData\Local\Programs\Python\Python310\python.exe" "D:\F\NewI\opencode\daily-workspace\projects\self-growing-knowledge\scripts\article_processor.py"
timeout /t 3 /nobreak >nul
echo [2/3] xxm Bot...
start /b "" /D "D:\F\NewI\opencode\daily-workspace\projects\AgentsMeeting" "C:\Users\hmo\AppData\Local\Programs\Python\Python310\python.exe" xmpp_agent_core.py --agent xxm
timeout /t 10 /nobreak >nul
echo [3/3] EasyTier...
curl -s -X POST http://127.0.0.1:5802/easytier -H "Content-Type: application/json" -d "{\"action\":\"start\"}" >nul
echo === Done ===
-96
View File
@@ -1,96 +0,0 @@
<#
.SYNOPSIS
AgentsMeeting Windows Services ?一键启动所有组?.DESCRIPTION
按依赖顺序启? api_proxy ?wechat_agent ?xmpp_bot ?watchdog ?health_check
每个服务启动后等待确认,失败则终止?#>
param([switch]$Force)
$ErrorActionPreference = "Stop"
$Python = "C:\Users\hmo\AppData\Local\Programs\Python\Python310\python.exe"
$GatewayRoot = "D:\F\NewI\opencode\daily-workspace\projects\AgentsMeeting\gateway"
Write-Host "========================================" -ForegroundColor Cyan
Write-Host " AgentsMeeting Windows Services" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
# Stop all existing services first
Write-Host "`n[0] Stopping existing services..." -ForegroundColor Yellow
Get-Process -Name "python*" -ErrorAction SilentlyContinue | ForEach-Object {
$cmd = (Get-CimInstance Win32_Process -Filter "ProcessId=$($_.Id)").CommandLine
if ($cmd -match "xmpp_bot|wechat_agent|api_proxy|watchdog|health_check") {
Write-Host " Killing PID $($_.Id): $($_.ProcessName)" -ForegroundColor Gray
Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
}
}
Start-Sleep -Seconds 3
# 1. API Proxy (port 8787)
Write-Host "`n[1/5] Starting API Proxy..." -ForegroundColor Green
$proxyScript = Join-Path $GatewayRoot "scripts\api_proxy.py"
Start-Process -WindowStyle Hidden -FilePath $Python -ArgumentList $proxyScript
Start-Sleep -Seconds 2
$proxyCheck = netstat -ano 2>$null | Select-String ":8787"
if ($proxyCheck) {
Write-Host " API Proxy: OK (:8787)" -ForegroundColor Green
} else {
Write-Host " API Proxy: STARTED (port check skipped)" -ForegroundColor Yellow
}
# 2. WeChat Agent (port 5801 + 19088 via wxhelper)
Write-Host "`n[2/5] Starting WeChat Agent..." -ForegroundColor Green
$agentScript = Join-Path $GatewayRoot "scripts\wechat_agent.py"
Start-Process -WindowStyle Hidden -FilePath $Python -ArgumentList $agentScript
Start-Sleep -Seconds 3
Write-Host " WeChat Agent: STARTED" -ForegroundColor Green
# 3. XMPP Bot (xxm)
Write-Host "`n[3/5] Starting XMPP Bot (xxm)..." -ForegroundColor Green
$botScript = Join-Path $GatewayRoot "scripts\xmpp_bot.py"
Start-Process -WindowStyle Hidden -FilePath $Python -ArgumentList $botScript
Start-Sleep -Seconds 5
$botCheck = Get-CimInstance Win32_Process -Filter "Name='python.exe'" | Where-Object { $_.CommandLine -match "xmpp_bot" -and $_.CommandLine -notmatch "watchdog" }
if ($botCheck) {
Write-Host " XMPP Bot: OK (PID $($botCheck.ProcessId))" -ForegroundColor Green
} else {
Write-Host " XMPP Bot: FAILED TO START" -ForegroundColor Red
exit 1
}
# 4. Watchdog
Write-Host "`n[4/5] Starting Watchdog..." -ForegroundColor Green
$wdScript = Join-Path $GatewayRoot "scripts\xmpp_watchdog.py"
Start-Process -WindowStyle Hidden -FilePath $Python -ArgumentList $wdScript
Start-Sleep -Seconds 2
Write-Host " Watchdog: STARTED" -ForegroundColor Green
# 5. Mohe watcher ?auto-log mohe replies
Write-Host "`n[5/6] Starting Mohe Watcher..." -ForegroundColor Green
$moheWatcher = Join-Path $GatewayRoot "scripts\mohe_watcher.py"
Start-Process -WindowStyle Hidden -FilePath $Python -ArgumentList $moheWatcher
Start-Sleep -Seconds 1
Write-Host " Mohe Watcher: STARTED (?logs/mohe_inbox.log)" -ForegroundColor Green
# 6. Health check (scheduled task)
Write-Host "`n[6/6] Registering health check..." -ForegroundColor Green
$taskName = "xxm-health-check"
$checkScript = Join-Path $GatewayRoot "scripts\health_check_xxm.py"
try {
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
$action = New-ScheduledTaskAction -Execute $Python -Argument "`"$checkScript`""
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) `
-RepetitionInterval (New-TimeSpan -Minutes 5) `
-RepetitionDuration (New-TimeSpan -Days 365)
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType S4U -RunLevel Limited
Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null
Write-Host " Health Check: OK (every 5 min)" -ForegroundColor Green
} catch {
Write-Host " Health Check: WARNING - $($_.Exception.Message)" -ForegroundColor Yellow
}
Write-Host "`n========================================" -ForegroundColor Cyan
Write-Host " ALL SERVICES STARTED" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Cyan
Write-Host " Dashboard: http://192.168.1.246:5803 (Linux)" -ForegroundColor Green
Write-Host " Logs: $GatewayRoot\logs\" -ForegroundColor Gray
Write-Host " Status: powershell -File deploy\windows\check.ps1" -ForegroundColor Gray
+6 -2
View File
@@ -636,12 +636,16 @@ def process_msg(raw_data):
if not urls: if not urls:
urls = re.findall(r'<shareUrlOpen>(https?://mp\.weixin\.qq\.com[^<]+)</shareUrlOpen>', ct) urls = re.findall(r'<shareUrlOpen>(https?://mp\.weixin\.qq\.com[^<]+)</shareUrlOpen>', ct)
url = urls[0] if urls else None url = urls[0] if urls else None
# Decode HTML entities (&amp; → &) — WeChat XML uses &amp; in URLs
if url:
import html as _html
url = _html.unescape(url)
# Extract title from XML # Extract title from XML
titles = re.findall(r'<title>(.*?)</title>', ct) titles = re.findall(r'<title>(.*?)</title>', ct)
title = titles[0] if titles else "" title = _html.unescape(titles[0]) if titles else ""
# Extract description # Extract description
descs = re.findall(r'<des>(.*?)</des>', ct) descs = re.findall(r'<des>(.*?)</des>', ct)
desc = descs[0] if descs else "" desc = _html.unescape(descs[0]) if descs else ""
if url: if url:
log(f"ARTICLE URL: {url}") log(f"ARTICLE URL: {url}")
+966 -339
View File
File diff suppressed because it is too large Load Diff