meta-acct: Accounts Center read API (list-linked, security-status, login-activity)\n\nImplements the read ops from META-ACCOUNTS-API.md via the agent browser\nsession. Key finding: phone-OTP login leaves a full Meta session -\naccountscenter.meta.com loads without redirect.\n\nAlso: 646 node fully registered (warp-646, CDP 9430, active).
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# meta-acct.sh — Meta Accounts Center read API (via authenticated browser session).
|
||||
#
|
||||
# Usage:
|
||||
# meta-acct.sh list-linked <agent> # linked profiles in this Meta Account
|
||||
# meta-acct.sh security-status <agent> # login & recovery / security checkup
|
||||
# meta-acct.sh login-activity <agent> # "Where you're logged in" sessions
|
||||
#
|
||||
# The agent's browser must have an active Meta session (phone/email OTP login).
|
||||
# Reads NODES.md for the CDP port. Outputs JSON.
|
||||
#
|
||||
# Scope: Accounts Center linkage/security surface only. No writes.
|
||||
# Runs the Python implementation inside the agent's NetVM netns.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
NETVM_DIR="${NETVM_DIR:-$HOME/Projects/NetVM}"
|
||||
SCRIPT="$NETVM_DIR/bin/meta-acct.py"
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: meta-acct.sh <list-linked|security-status|login-activity> <agent>" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cmd="$1"
|
||||
agent="$2"
|
||||
|
||||
# Get the node name from ACCOUNTS.md (agent == node per unified naming)
|
||||
node="$agent"
|
||||
|
||||
# Run inside the netns so we reach the browser's CDP on 127.0.0.1.
|
||||
# NETVM_DIR must be explicit: sudo resets HOME to /root.
|
||||
exec sudo -n ip netns exec "warp-$node" \
|
||||
env NETVM_DIR="$NETVM_DIR" python3 "$SCRIPT" "$cmd" "$agent"
|
||||
Reference in New Issue
Block a user