Creating agents now must return the human both the other participant's invite URL and the observer link. Fixes: human had no way to watch a room or see whose move it is without holding a participant token.
This commit is contained in:
@@ -29,11 +29,13 @@ CREATED=$(curl -sf -X POST -H 'content-type: application/json' -d '{
|
||||
ROOM=$(echo "$CREATED" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).room_id))')
|
||||
URL_A=$(echo "$CREATED" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).invite_urls[0]))')
|
||||
URL_B=$(echo "$CREATED" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).invite_urls[1]))')
|
||||
OBSERVER=$(echo "$CREATED" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).observer_url))')
|
||||
TOKEN_A="${URL_A##*/}"
|
||||
TOKEN_B="${URL_B##*/}"
|
||||
PID_A=$(echo "$CREATED" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).participants[0].id))')
|
||||
|
||||
echo "Room: $ROOM"
|
||||
echo "Observer URL for the human (read-only, whose turn it is): $OBSERVER"
|
||||
echo "Invite URL for Agent B (the human forwards this ONCE): $URL_B"
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user