#!/bin/bash
echo "=== 实例原始 JSON ==="
curl -sS -H "Authorization: Bearer dev-admin-token" "http://127.0.0.1:19088/api/v1/instances/friend-0f02c9c6" | python3 -m json.tool 2>/dev/null | head -60
echo "=== 部署事件 ==="
curl -sS -H "Authorization: Bearer dev-admin-token" "http://127.0.0.1:19088/api/v1/instance-deployments/deploy-b5949cd5-c5f/events" | python3 -c "
import sys,json
d=json.load(sys.stdin)
items = d if isinstance(d,list) else d.get('events') or []
for e in items[-8:]:
    print(e.get('phase'), '|', e.get('status'), '|', e.get('message'), '|', str(e.get('detail'))[:150])
"
echo "=== 宿主机上 friend-deploy 容器 ==="
docker ps --format "{{.Names}} {{.Status}}" | grep friend-deploy || echo "(none)"
