feat: matrix room, room_info, research execute, bootstrap improvements
- bootstrap: create integration test room in Tuwunel, send bootstrap message, print room ID in summary - room_info: list_rooms and get_room_members against live Tuwunel - research: execute with empty tasks against real Matrix room + Mistral - identity: fix flaky list_users_tool test (use search instead of unbounded list to avoid pagination)
This commit is contained in:
@@ -40,6 +40,36 @@ if [ -z "$ACCESS_TOKEN" ]; then
|
||||
DEVICE_ID=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['device_id'])")
|
||||
fi
|
||||
|
||||
# ── Matrix: create integration test room ─────────────────────────────────
|
||||
|
||||
echo ""
|
||||
echo "Creating integration test room..."
|
||||
ROOM_RESPONSE=$(curl -sf -X POST "$HOMESERVER/_matrix/client/v3/createRoom" \
|
||||
-H "Authorization: Bearer $ACCESS_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"Integration Test Room","room_alias_name":"integration-test","visibility":"private"}' 2>/dev/null || echo '{}')
|
||||
|
||||
ROOM_ID=$(echo "$ROOM_RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin).get('room_id',''))" 2>/dev/null || echo "")
|
||||
if [ -z "$ROOM_ID" ]; then
|
||||
# Room alias might already exist — resolve it
|
||||
ROOM_ID=$(curl -sf "$HOMESERVER/_matrix/client/v3/directory/room/%23integration-test:$SERVER_NAME" \
|
||||
-H "Authorization: Bearer $ACCESS_TOKEN" 2>/dev/null \
|
||||
| python3 -c "import sys,json; print(json.load(sys.stdin).get('room_id',''))" 2>/dev/null || echo "")
|
||||
fi
|
||||
|
||||
if [ -n "$ROOM_ID" ]; then
|
||||
echo " Room: $ROOM_ID"
|
||||
|
||||
# Send a bootstrap message
|
||||
curl -sf -X PUT "$HOMESERVER/_matrix/client/v3/rooms/$ROOM_ID/send/m.room.message/bootstrap-$(date +%s)" \
|
||||
-H "Authorization: Bearer $ACCESS_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"msgtype":"m.text","body":"Integration test bootstrap message"}' \
|
||||
> /dev/null 2>&1 && echo " ✓ bootstrap message sent" || echo " – message send failed"
|
||||
else
|
||||
echo " – Failed to create/find room"
|
||||
fi
|
||||
|
||||
# ── OpenBao: seed KV secrets engine ──────────────────────────────────────
|
||||
|
||||
OPENBAO="http://localhost:8200"
|
||||
@@ -103,8 +133,11 @@ echo "export SOL_MATRIX_ACCESS_TOKEN=\"$ACCESS_TOKEN\""
|
||||
echo "export SOL_MATRIX_DEVICE_ID=\"$DEVICE_ID\""
|
||||
echo ""
|
||||
echo "Services:"
|
||||
echo " Tuwunel: $HOMESERVER"
|
||||
echo " OpenBao: $OPENBAO (token: $VAULT_TOKEN)"
|
||||
echo " Kratos: $KRATOS_ADMIN"
|
||||
echo " Tuwunel: $HOMESERVER"
|
||||
echo " OpenBao: $OPENBAO (token: $VAULT_TOKEN)"
|
||||
echo " Kratos: $KRATOS_ADMIN"
|
||||
if [ -n "$ROOM_ID" ]; then
|
||||
echo " Test room: $ROOM_ID"
|
||||
fi
|
||||
echo ""
|
||||
echo "Then restart Sol: docker compose -f docker-compose.dev.yaml restart sol"
|
||||
|
||||
Reference in New Issue
Block a user