feat: add restart, version, test, backends commands to /ocp plugin

New subcommands:
- /ocp restart [gateway|all] — restart proxy, gateway, or both
- /ocp version — show version, uptime, platform info
- /ocp test — end-to-end proxy test (sends haiku request)
- /ocp backends — list registered backends with health status

Also includes clean-slash-sessions.sh workaround for OpenClaw #26895.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 09:09:23 +10:00
co-authored by Claude Opus 4.6
parent 7390a19ec6
commit 77a3f48cfd
2 changed files with 124 additions and 11 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
python3 -c "
import json, glob, os
for sf in glob.glob(os.path.expanduser('~/.openclaw/agents/*/sessions/sessions.json')):
d=json.load(open(sf))
keys=[k for k in d if 'slash' in k]
if keys:
for k in keys: del d[k]
json.dump(d, open(sf,'w'), indent=2)
"