main
anastasia Premiere Pro Bridge 0.1.0: Rust bridge, UXP plugin, CEP helper, skills, macOS manifest 32fb583 10d ago
#!/usr/bin/env bash
# Dev helper: pb.sh <verb> [json-args] — call the dev bridge server (:47911) on the desktop
# through adom-bridge shell_execute. Prints the verb's JSON response.
VERB="$1"; ARGS="${2:-{\}}"; PORT="${PB_TEST_PORT:-47911}"
BODY=$(python3 -c 'import json,sys; print(json.dumps({"command":sys.argv[1],"args":json.loads(sys.argv[2])}))' "$VERB" "$ARGS")
CMD=$(python3 -c 'import sys,shlex; print("curl -s -m 600 -X POST -H \"Content-Type: application/json\" --data-binary "+shlex.quote(sys.argv[1])+" localhost:"+sys.argv[2]+"/command")' "$BODY" "$PORT")
python3 -c 'import json,sys; print(json.dumps({"command":sys.argv[1],"reason":"Drive the Premiere bridge dev server","timeoutSeconds":600}))' "$CMD" \
  | adom-bridge shell_execute "$(cat)" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("stdout","") or json.dumps(d))'