From f88e3c4f574da0f317d2b13684889b8b06c36e4c Mon Sep 17 00:00:00 2001 From: operator Date: Sun, 4 Oct 2026 23:03:27 +0000 Subject: [PATCH] feat(cred): add meta-audit command to inspect Accounts Center linked profiles and sync opm/pip accounts --- bin/cred-client.py | 11 ++++++++--- bin/super-cli.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/cred-client.py b/bin/cred-client.py index 14dc330..aed75c0 100755 --- a/bin/cred-client.py +++ b/bin/cred-client.py @@ -272,9 +272,14 @@ class CredClient: cmd = ["sudo", "-n", "ip", "netns", "exec", f"warp-{node}", sys.executable, meta_script, "list-linked", node] try: res = subprocess.run(cmd, capture_output=True, text=True, timeout=15) - lines = res.stdout.strip().splitlines() - if lines: - return json.loads(lines[-1]) + out = res.stdout.strip() + if out: + # Find outermost JSON object + start = out.find("{") + end = out.rfind("}") + if start >= 0 and end >= start: + return json.loads(out[start:end+1]) + return json.loads(out) return {"error": res.stderr.strip() or "No output from meta-acct.py"} except Exception as e: return {"error": str(e)} diff --git a/bin/super-cli.py b/bin/super-cli.py index d60d503..a09a4a3 100755 --- a/bin/super-cli.py +++ b/bin/super-cli.py @@ -1976,7 +1976,7 @@ def cmd_cred_meta_audit(args): else: print("\n" + c_bold(f"=== META ACCOUNTS CENTER AUDIT: {args.node} ===") + "\n") if res.get("error"): - print(c_err(f" Error: {res['error']}")) + print(c_red(f" Error: {res['error']}")) sys.exit(1) email_str = res.get('email') or c_dim('(none / phone-only)') print(f" Meta Account Email: {c_cyan(email_str)}")