Files
AgentsMeeting/deploy/windows/check.ps1
T
hmo ea193a9881 chore: retire legacy wechat-hermes-gateway xmpp_bot, unify bridge to :5807
Old xmpp_bot.py (PID-locked separately) coexisted with new xmpp_agent_core,
causing duplicate JID connections and split bridge traffic (5802 vs 5807).
Deploy scripts now use new bot's :5807 bridge with X-Api-Key auth.
2026-07-23 13:59:11 +08:00

49 lines
2.4 KiB
PowerShell

<#
.SYNOPSIS
AgentsMeeting ?状态检?#>
Write-Host "=== AgentsMeeting Status ===" -ForegroundColor Cyan
# Bot
$bot = Get-CimInstance Win32_Process -Filter "Name='python.exe'" | Where-Object { $_.CommandLine -match "xmpp_bot" -and $_.CommandLine -notmatch "watchdog|health" }
if ($bot) { Write-Host "xmpp_bot: RUNNING (PID $($bot.ProcessId))" -ForegroundColor Green }
else { Write-Host "xmpp_bot: STOPPED" -ForegroundColor Red }
# HTTP bridge test
try { $r = Invoke-RestMethod "http://127.0.0.1:5807/messages" -Headers @{"X-Api-Key"="xxm_bridge_8f3a2c"} -TimeoutSec 3 -ErrorAction Stop; Write-Host "http_bridge: OK ($($r.count) msgs)" -ForegroundColor Green }
catch { Write-Host "http_bridge: ERROR" -ForegroundColor Yellow }
# WeChat
$agent = Get-CimInstance Win32_Process -Filter "Name='python.exe'" | Where-Object { $_.CommandLine -match "wechat_agent" }
if ($agent) { Write-Host "wechat_agent: RUNNING (PID $($agent.ProcessId))" -ForegroundColor Green }
else { Write-Host "wechat_agent: STOPPED" -ForegroundColor Yellow }
# Watchdog
$wd = Get-CimInstance Win32_Process -Filter "Name='python.exe'" | Where-Object { $_.CommandLine -match "watchdog" }
if ($wd) { Write-Host "watchdog: RUNNING (PID $($wd.ProcessId))" -ForegroundColor Green }
else { Write-Host "watchdog: STOPPED" -ForegroundColor Yellow }
# Proxy
$proxy = netstat -ano 2>$null | Select-String ":8787"
if ($proxy) { Write-Host "api_proxy: RUNNING (:8787)" -ForegroundColor Green }
else { Write-Host "api_proxy: stopped" -ForegroundColor Yellow }
# Health last run
$log = "D:\F\NewI\opencode\daily-workspace\projects\AgentsMeeting\gateway\logs\health_check.log"
if (Test-Path $log) {
$last = Get-Content $log -Tail 3
Write-Host "health_check: LAST 3 LINES:" -ForegroundColor Gray
$last | ForEach-Object { Write-Host " $_" -ForegroundColor Gray }
}
# Mohe inbox
$inbox = "D:\F\NewI\opencode\daily-workspace\projects\AgentsMeeting\gateway\logs\mohe_inbox.log"
if (Test-Path $inbox) {
$moheLines = Get-Content $inbox -Tail 3
Write-Host "mohe_watcher: LAST 3 LINES:" -ForegroundColor Gray
$moheLines | ForEach-Object { Write-Host " $_" -ForegroundColor Cyan }
}
# Dashboard
try { $d = Invoke-RestMethod "http://127.0.0.1:5803/api/health" -TimeoutSec 3 -ErrorAction Stop; Write-Host "dashboard: OK (:5803)" -ForegroundColor Green }
catch { Write-Host "dashboard: stopped" -ForegroundColor Yellow }