oclaw/runtime/operations/scripts/weixin_poll_diag.ps1
oliver bc1b45a8fd fix(chat,channels): admin session delete, weixin inbound, PG and docs
- List/delete chat sessions for administrator by username (cross-tenant UUID)

- Return 404 when delete does not remove a session; add tests

- Weixin: dispatch lang, inbound attachments, reply persist, native reply timeout

- PG compat scrub and administrator session delete repo path

- RUNBOOK: WhatsApp re-bind with Remove-Item auth; weixin poll diag scripts

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 01:36:45 +08:00

28 lines
742 B
PowerShell

param(
[switch]$ResetCursor = $false
)
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..\..")).Path
$sidecarRoot = Join-Path $repoRoot "data\channel_sidecar\oclaw-weixin"
$stateDir = Join-Path $sidecarRoot "state"
$bridgeSrc = Join-Path $repoRoot "runtime\operations\weixin_bridge\poll_diag.ts"
if (-not (Test-Path $bridgeSrc)) {
throw "missing $bridgeSrc"
}
Copy-Item -Path $bridgeSrc -Destination (Join-Path $sidecarRoot "poll_diag.ts") -Force
$args = @("exec", "--", "tsx", "poll_diag.ts")
if ($ResetCursor) {
$args += "--reset-cursor"
}
Push-Location $sidecarRoot
try {
$env:OCLAW_STATE_DIR = $stateDir
$env:OPENCLAW_STATE_DIR = $stateDir
npm.cmd @args
} finally {
Pop-Location
}