From b7e6afb2277e2f76067484594bcc0d3ae2928a14 Mon Sep 17 00:00:00 2001 From: "tv0924@icloud.com" Date: Thu, 26 Jun 2025 23:33:59 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20agent=20=ED=98=B8=EC=B6=9C=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/agents/find_login_page.py | 92 ---------------------- lib/agents/get_sso_list.py | 66 ---------------- lib/agents/run_agent.py | 19 ----- lib/agents/run_task.py | 67 ++++++++++++++++ lib/find_sso_list.py | 65 ---------------- lib/get_sso_list.py | 41 ++++++++++ lib/prompt/get_sso_list.py | 65 ++++++++++++++++ lib/utils/env_checker.py | 1 - lib/utils/progress_checker.py | 20 +++++ main.py | 30 +------ pyproject.toml | 2 +- uv.lock | 142 +++++++++++++++++----------------- 12 files changed, 267 insertions(+), 343 deletions(-) delete mode 100644 lib/agents/find_login_page.py delete mode 100644 lib/agents/get_sso_list.py delete mode 100644 lib/agents/run_agent.py create mode 100644 lib/agents/run_task.py delete mode 100644 lib/find_sso_list.py create mode 100644 lib/get_sso_list.py create mode 100644 lib/prompt/get_sso_list.py diff --git a/lib/agents/find_login_page.py b/lib/agents/find_login_page.py deleted file mode 100644 index f0c0dc7..0000000 --- a/lib/agents/find_login_page.py +++ /dev/null @@ -1,92 +0,0 @@ -import json -from pydantic import BaseModel -from browser_use import ( - Agent, - Controller, -) -from lib.agents.run_agent import run_agent -from lib.utils.logger import logger -from lib.browser_use_utils.create_google_ai import create_google_ai -from lib.config import GOOGLE_MODEL, GOOGLE_PLANNER_MODEL - -NOT_FOUND_LOGIN_PAGE = 0 -FOUND_LOGIN_PAGE = 1 - -class FindLoginPageResponse(BaseModel): - status: int = NOT_FOUND_LOGIN_PAGE # 0 if not found, 1 if found - msg: str | None = None - url: str | None = None - -async def find_login_page(target_url, session) -> tuple[bool, str | None]: - initial_actions = [{"open_tab": {"url": target_url}}] - task = """ - You are an expert in finding login pages. - - Your task is to navigate to the login page of the given URL. Follow the steps below strictly and return results only in the specified format. - - ※ You are NOT allowed to navigate to URLs that are not directly discoverable within the initial domain. Do NOT use search engines or guess external login URLs. - - 0. INITIAL BLOCK CHECK - - If the browser is blocked when trying to access the page — due to firewall, CAPTCHA, regional restrictions, or other access denials — immediately terminate the process and return the following JSON: - ```json - { - "status": 0, - "msg": "Blocked", - "url": "" - } - ``` - - Do NOT proceed to further steps in this case. - - 1. LOGIN PAGE NAVIGATION - - Navigate only to a **client-side (non-enterprise)** login page within the provided domain. - - Do NOT rely on external tools, search engines, or links not directly found on the site. - - If a consent popup (e.g. for privacy/cookies) appears, you MUST dismiss or close it before proceeding. - - Since step 0 confirmed access, assume the page now loads properly. - - 2. RETURN FORMAT - - Once the login page is reached, return a JSON object matching the following schema: - ```json - { - "status": 1, // 1 if login page is found, 0 otherwise - "msg": "Login page found", // Optional message - "url": "https://example.com/login" // Full URL of the login page if found - } - ``` - - If the login page cannot be found, return: - ```json - { - "status": 0, - "msg": "Login page not found", - "url": "" - } - ``` - - Return ONLY the JSON object. Do NOT include any explanation, logging, or extra output. - """ - - - controller = Controller(output_model=FindLoginPageResponse, exclude_actions=['search_google']) - agent = Agent( - browser_session=session, - initial_actions=initial_actions, - task=task, - llm=create_google_ai(GOOGLE_MODEL), - controller=controller, - ) - - is_failed, final_result = await run_agent(agent) - if is_failed: - logger(f"⚠️ 스캔 실패: {target_url} | {final_result}") - print(f"⚠️ 스캔 실패: {target_url} | {final_result}") - return False, None; - - data = json.loads(final_result) - try: - resp = FindLoginPageResponse(**data) - if resp.status == FOUND_LOGIN_PAGE and len(resp.url) > 0: - return True, resp.url - else: - return False, resp.msg - except Exception as e: - logger(f"⚠️ 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") - print(f"⚠️ 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") - return False, data.msg diff --git a/lib/agents/get_sso_list.py b/lib/agents/get_sso_list.py deleted file mode 100644 index 2276fc6..0000000 --- a/lib/agents/get_sso_list.py +++ /dev/null @@ -1,66 +0,0 @@ -import json -from pydantic import BaseModel -from browser_use import ( - Agent, - Controller, -) -from lib.agents.run_agent import run_agent -from lib.utils.logger import logger -from lib.browser_use_utils.create_google_ai import create_google_ai -from lib.config import GOOGLE_MODEL, GOOGLE_PLANNER_MODEL - -NOT_FOUND_SSO_LIST = 0 -FOUND_SSO_LIST = 1 - -class EachSSOProvider(BaseModel): - provider: str - oauth_uri: str | None = None - -class FindLoginPageResponse(BaseModel): - EachSSOProviders: list[EachSSOProvider] | None = None - status: int = NOT_FOUND_SSO_LIST # 0 if not found, - msg: str | None = None - -async def get_sso_list(target_url, session) -> tuple[bool, str | None]: - initial_actions = [{"open_tab": {"url": target_url}}] - task = "Navigate to the login page, and return the result in the specified format." - extend_planner_system_message = """ - You are an expert in finding login pages. - Your task is to navigate to the login page of the given URL. - Once you reach the login page, stop and return a JSON object that matches the following schema: - ```json - { - "status": 1, # 1 if login page found, 0 otherwise - "url": "https://example.com/login" # Full URL of the login page if found - } - Return only this JSON object. Do not include any explanation or additional text. - """ - - controller = Controller(output_model=FindLoginPageResponse, exclude_actions=['search_google']) - agent = Agent( - browser_session=session, - initial_actions=initial_actions, - task=task, - llm=create_google_ai(GOOGLE_MODEL), - planner_llm=create_google_ai(GOOGLE_PLANNER_MODEL), - controller=controller, - extend_planner_system_message=extend_planner_system_message, - ) - - is_failed, final_result = await run_agent(agent) - if is_failed: - logger(f"⚠️ 스캔 실패: {target_url} | {final_result}") - print(f"⚠️ 스캔 실패: {target_url} | {final_result}") - return False, None; - - data = json.loads(final_result) - try: - resp = FindLoginPageResponse(**data) - if resp.status == FOUND_SSO_LIST: - return True, resp - else: - return False, None - except Exception as e: - logger(f"⚠️ 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") - print(f"⚠️ 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") - return False, data.msg diff --git a/lib/agents/run_agent.py b/lib/agents/run_agent.py deleted file mode 100644 index 7bcb686..0000000 --- a/lib/agents/run_agent.py +++ /dev/null @@ -1,19 +0,0 @@ -from lib.browser_use_utils.clean_resources import clean_agent_resources - -async def run_agent(agent) -> tuple[int, str]: - try: - response = await agent.run() - final_result = response.final_result() - - if final_result is None: - return -1, "최종 결과가 없습니다. 에이전트 실행 실패" - return 0, final_result - except Exception as e: - # API 쿼터 문제인지 확인 - if "ResourceExhausted" in str(e) or "429" in str(e): - return 1, "API 쿼터 에러로 인한 실패" - # 일반 에러 처리 - else: - return 2, "일반 에러로 인한 실패" - finally: - await clean_agent_resources(agent) \ No newline at end of file diff --git a/lib/agents/run_task.py b/lib/agents/run_task.py new file mode 100644 index 0000000..06736cd --- /dev/null +++ b/lib/agents/run_task.py @@ -0,0 +1,67 @@ +import json +from typing import Any +from pydantic import BaseModel +from browser_use import ( + Agent, + Controller, + BrowserSession +) +from patchright.async_api import async_playwright as async_patchright +from lib.utils.logger import logger +from lib.prompt.get_sso_list import get_sso_list_task +from lib.browser_use_utils.create_google_ai import create_google_ai +from lib.browser_use_utils.get_profile import get_profile +from lib.browser_use_utils.clean_resources import clean_session_resources, clean_agent_resources +from lib.config import GOOGLE_MODEL + + +async def run_task(target_url: str, ReturnModel: type[BaseModel], task: str) -> tuple[bool, str | Any | None]: + session = BrowserSession( + playwright=(await async_patchright().start()), + browser_profile=await get_profile(), + ) + + initial_actions = [{"open_tab": {"url": target_url}}] + + controller = Controller(output_model=ReturnModel, exclude_actions=['search_google']) + agent = Agent( + browser_session=session, + initial_actions=initial_actions, + task=task, + llm=create_google_ai(GOOGLE_MODEL), + controller=controller, + ) + + try: + response = await agent.run() + final_result = response.final_result() + + if final_result is None: + logger(f"⚠️ 최종 결과가 없습니다. 에이전트 실행 실패: {target_url}") + print(f"⚠️ 최종 결과가 없습니다. 에이전트 실행 실패: {target_url}") + return False, "최종 결과가 없습니다. 에이전트 실행 실패" + except Exception as e: + # API 쿼터 문제인지 확인 + if "ResourceExhausted" in str(e) or "429" in str(e): + logger(f"⚠️ API 쿼터 에러로 인한 실패: {target_url} | {e}") + print(f"⚠️ API 쿼터 에러로 인한 실패: {target_url} | {e}") + return False, "API 쿼터 에러로 인한 실패" + # 일반 에러 처리 + else: + logger(f"⚠️ 일반 에러로 인한 실패: {target_url} | {e}") + print(f"⚠️ 일반 에러로 인한 실패: {target_url} | {e}") + return False, "일반 에러로 인한 실패" + finally: + await clean_agent_resources(agent) + + try: + data = json.loads(final_result) + resp = ReturnModel(**data) + return True, resp + except Exception as e: + logger(f"⚠️ LLM 응답 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") + print(f"⚠️ LLM 응답 결과 파싱 실패: {target_url} | {e}\n원본 결과: {data.msg}") + return False, "LLM 응답 결과 파싱 실패" + finally: + await clean_session_resources(session) + diff --git a/lib/find_sso_list.py b/lib/find_sso_list.py deleted file mode 100644 index 11fd608..0000000 --- a/lib/find_sso_list.py +++ /dev/null @@ -1,65 +0,0 @@ -import asyncio -from browser_use import Agent, BrowserSession -from patchright.async_api import async_playwright as async_patchright -from lib.agents.find_login_page import find_login_page -from lib.browser_use_utils.clean_resources import clean_session_resources -from lib.browser_use_utils.get_profile import get_profile -from lib.utils.save_oauth_providers import save_oauth_providers - -async def find_sso_list(target_url): - session = BrowserSession( - playwright=(await async_patchright().start()), - browser_profile=await get_profile(), - ) - - FIND_LOGIN_PAGE = 1 - FIND_SSO_LIST = 2 - SAVE_DATA = 3 - WHEN_ERROR = -1 - FINISH = 0 - - final_result = None - login_url = target_url - state = FIND_LOGIN_PAGE - while True: - if state == FIND_LOGIN_PAGE: - is_success, resp = await find_login_page( - target_url=target_url, - session=session, - ) - if not is_success: - print(f"⚠️ 로그인 페이지 탐지 실패: {target_url} | {resp}") - state = WHEN_ERROR - login_url = resp if resp else target_url - state = FIND_SSO_LIST - - if state == FIND_SSO_LIST: - print(f"🔎 SSO 목록 찾는 중: {target_url}") - is_success, resp = await find_sso_list( - target_url=login_url, - session=session, - ) - if not is_success: - print(f"⚠️ SSO 목록 탐지 실패: {target_url} | {resp}") - state = WHEN_ERROR - final_result = "" - state = SAVE_DATA - - if state == SAVE_DATA: - print(f"💾 데이터 저장 중: {target_url}") - if not final_result: - print(f"⚠️ SSO 목록이 전달되지 않았습니다: {target_url}") - state = WHEN_ERROR - - save_oauth_providers(target_url, final_result) - state = FINISH - - if state == WHEN_ERROR: - print(f"⚠️ 에러 발생: {target_url} | 스캔을 중단합니다.") - return - - if state == FINISH: - print(f"✅ 스캔 완료: {target_url}") - break - - await clean_session_resources(session) \ No newline at end of file diff --git a/lib/get_sso_list.py b/lib/get_sso_list.py new file mode 100644 index 0000000..b44c357 --- /dev/null +++ b/lib/get_sso_list.py @@ -0,0 +1,41 @@ +import json +from pydantic import BaseModel +from lib.prompt.get_sso_list import get_sso_list_task + +from lib.agents.run_task import run_task + + +NOT_FOUND_LOGIN_PAGE = 0 +FOUND_LOGIN_PAGE = 1 + +class FindLoginPageResponse(BaseModel): + status: int = NOT_FOUND_LOGIN_PAGE # 0 if not found, 1 if found + msg: str | None = None + url: str | None = None + sso_list: list[str] = [] # List of SSO providers found on the login page + +async def get_sso_list(target_url) -> tuple[bool, str | FindLoginPageResponse | None]: + + task = get_sso_list_task + ReturnModel = FindLoginPageResponse + success, response = await run_task(target_url, ReturnModel, task) + if not success: + return False, response + if isinstance(response, str): + return False, response + if isinstance(response, FindLoginPageResponse): + if response.status == FOUND_LOGIN_PAGE: + if not response.sso_list: + response.msg = "로그인 페이지는 찾았지만 SSO 제공자가 없습니다." + else: + response.msg = "로그인 페이지와 SSO 제공자를 찾았습니다." + else: + response.msg = "로그인 페이지를 찾지 못했습니다." + else: + return False, "응답 형식이 올바르지 않습니다. FindLoginPageResponse가 아닙니다." + + return True, response + + + + diff --git a/lib/prompt/get_sso_list.py b/lib/prompt/get_sso_list.py new file mode 100644 index 0000000..18e3f3e --- /dev/null +++ b/lib/prompt/get_sso_list.py @@ -0,0 +1,65 @@ +get_sso_list_task = """ +You are an expert in finding login pages. + +Your task is to navigate to the login page of the given URL. Follow the steps below strictly and return results only in the specified format. + +※ You are NOT allowed to navigate to URLs that are not directly discoverable within the initial domain. Do NOT use search engines or guess external login URLs. + +0. INITIAL BLOCK CHECK +- If the browser is blocked when trying to access the page — due to firewall, CAPTCHA, regional restrictions, or other access denials — immediately terminate the process and return the following JSON: + ```json + { + "status": 0, + "msg": "Blocked", + "url": "", + "sso_list": [] + } + ``` +- Do NOT proceed to further steps in this case. + +1. LOGIN PAGE NAVIGATION +- Navigate only to a **client-side (non-enterprise)** login page within the provided domain. +- Do NOT rely on external tools, search engines, or links not directly found on the site. +- If a consent popup (e.g. for privacy/cookies) appears, you MUST dismiss or close it before proceeding. +- Since step 0 confirmed access, assume the page now loads properly. + +2. SSO BUTTON IDENTIFICATION +- On the login page, look for the following social login (SSO) buttons: + - Google, GitHub, Facebook, LinkedIn, Microsoft, Naver, Slack, Etc. +- ✅ Proceed only if it is clearly an **actual SSO button**. +- ❌ Exclude the following: + - Passkey-related buttons + - Username/password fields + - Email-based login + - Non-OAuth methods such as certificate or phone verification + +3. RETURN FORMAT +- If the login page is successfully found, return: + ```json + { + "status": 1, + "msg": "Login page found", + "url": "https://example.com/login", + "sso_list": ["Google", "GitHub"] + } + ``` +- If the login page cannot be found, return: + ```json + { + "status": 0, + "msg": "Login page not found", + "url": "", + "sso_list": [] + } + ``` +- If blocked (as in step 0), return: + ```json + { + "status": 0, + "msg": "Blocked", + "url": "", + "sso_list": [] + } + ``` +- Return ONLY the JSON object. Do NOT include any explanation, logging, or extra output. +""" \ No newline at end of file diff --git a/lib/utils/env_checker.py b/lib/utils/env_checker.py index d92edd1..8255dde 100644 --- a/lib/utils/env_checker.py +++ b/lib/utils/env_checker.py @@ -8,7 +8,6 @@ def check_env_variables(): "BACKEND_URL", "GOOGLE_API_KEY", "GOOGLE_MODEL", - "GOOGLE_PLANNER_MODEL" ] for var in required_vars: diff --git a/lib/utils/progress_checker.py b/lib/utils/progress_checker.py index 3ee3d71..11311c4 100644 --- a/lib/utils/progress_checker.py +++ b/lib/utils/progress_checker.py @@ -4,6 +4,26 @@ from pathlib import Path progress_file = Path("data/scan_progress.json") +class ProgressChecker: + def __init__(self, filepath): + self.filepath = filepath + self.progress = self.load_progress() + + def save(self): + """현재 진행 상황을 파일에 저장""" + with open(self.filepath, 'w', encoding='utf-8') as f: + json.dump(self.progress, f, ensure_ascii=False, indent=2) + + def load(self): + """이전 진행 상황을 파일에서 불러오기""" + if os.path.exists(self.filepath): + try: + with open(self.filepath, 'r', encoding='utf-8') as f: + return json.load(f) + except: + return None + return None + def save_progress(current_progress): """현재 진행 상황을 파일에 저장""" diff --git a/main.py b/main.py index 34a746a..58ae0c6 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,7 @@ from lib.utils.is_html import is_html_url from lib.utils.read_txt import read_lines_between from lib.utils.progress_checker import save_progress, load_progress from lib.utils.env_checker import check_env_variables -from lib.find_sso_list import find_sso_list +from lib.get_sso_list import get_sso_list load_dotenv() check_env_variables() @@ -28,33 +28,7 @@ async def scan_one_url(url: str, skip_html_check: bool = False): # Backend에 스캔 시작 알림 notify_backend(target_url) - await find_sso_list(target_url) - - - - - - # # 5) 결과 출력 - # print("-" * 50) - # print(f"🔗 Scanned URL: {url}\n") - # print("🔐 Detected OAuth Providers and URLs:") - # for entry in oauth_entries: - # if "<" in entry.oauth_uri or "..." in entry.oauth_uri: - # print(f"⚠️ WARNING: {entry.provider} URL may be masked or incomplete:\n{entry.oauth_uri}\n") - # else: - # print(f"- {entry.provider}: {entry.oauth_uri}") - # print("-" * 50) - - # # 6) CSV에 저장 (append) - # csv_file = "./oauth_providers.csv" - # file_exists = os.path.isfile(csv_file) - # with open(csv_file, "a", newline="", encoding="utf-8") as f: - # writer = csv.writer(f) - # if not file_exists: - # writer.writerow(["issuer", "provider", "oauth_uri"]) - # for entry in oauth_entries: - # writer.writerow([url, entry.provider, entry.oauth_uri]) - # print(f"✅ OAuth providers saved to {csv_file}\n") + print(await get_sso_list(target_url)) diff --git a/pyproject.toml b/pyproject.toml index 52bbffc..d15b4ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,6 @@ description = "Add your description here" readme = "README.md" requires-python = ">=3.13" dependencies = [ - "browser-use[memory]==0.2.7", + "browser-use[memory]==0.3.2", "patchright==1.52.5", ] diff --git a/uv.lock b/uv.lock index 964f411..54bffe1 100644 --- a/uv.lock +++ b/uv.lock @@ -51,6 +51,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c", size = 100916, upload-time = "2025-03-17T00:02:52.713Z" }, ] +[[package]] +name = "authlib" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a2/9d/b1e08d36899c12c8b894a44a5583ee157789f26fc4b176f8e4b6217b56e1/authlib-1.6.0.tar.gz", hash = "sha256:4367d32031b7af175ad3a323d571dc7257b7099d55978087ceae4a0d88cd3210", size = 158371, upload-time = "2025-05-23T00:21:45.011Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/84/29/587c189bbab1ccc8c86a03a5d0e13873df916380ef1be461ebe6acebf48d/authlib-1.6.0-py2.py3-none-any.whl", hash = "sha256:91685589498f79e8655e8a8947431ad6288831d643f11c55c2143ffcc738048d", size = 239981, upload-time = "2025-05-23T00:21:43.075Z" }, +] + [[package]] name = "backoff" version = "2.2.1" @@ -73,47 +85,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/50/cd/30110dc0ffcf3b131156077b90e9f60ed75711223f306da4db08eff8403b/beautifulsoup4-4.13.4-py3-none-any.whl", hash = "sha256:9bbbb14bfde9d79f38b8cd5f8c7c85f4b8f2523190ebed90e950a8dea4cb1c4b", size = 187285, upload-time = "2025-04-15T17:05:12.221Z" }, ] -[[package]] -name = "boto3" -version = "1.38.41" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "botocore" }, - { name = "jmespath" }, - { name = "s3transfer" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/2f/3b/f421b30e32c33ce63f0de3b32ea12954039a4595c693db4ea4900babe742/boto3-1.38.41.tar.gz", hash = "sha256:c6710fc533c8e1f5d1f025c74ffe1222c3659094cd51c076ec50c201a54c8f22", size = 111835, upload-time = "2025-06-20T19:26:41.584Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0a/bb/541825bf9811eb7fe13a357e691dc4cfead56a5fed4556aa101dc62e06ca/boto3-1.38.41-py3-none-any.whl", hash = "sha256:6119e9f272b9f004f052ca78ce94d3fe10198bc159ae808f75c0e1b9c07518bd", size = 139922, upload-time = "2025-06-20T19:26:39.963Z" }, -] - -[[package]] -name = "botocore" -version = "1.38.41" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "jmespath" }, - { name = "python-dateutil" }, - { name = "urllib3" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/98/46/cb33f5a0b00086a97c4eebbc4e0211fe85d66d45e53a9545b33805f25b31/botocore-1.38.41.tar.gz", hash = "sha256:98e3fed636ebb519320c4b2d078db6fa6099b052b4bb9b5c66632a5a7fe72507", size = 14031081, upload-time = "2025-06-20T19:26:31.365Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/b7/37d9f1a633e72250408cb7d53d8915561ac6108b5c3a1973eb8f53ce2990/botocore-1.38.41-py3-none-any.whl", hash = "sha256:06069a06f1352accb1f6c9505d6e323753627112be80a9d2e057c6d9c9779ffd", size = 13690225, upload-time = "2025-06-20T19:26:26.014Z" }, -] - [[package]] name = "browser-use" -version = "0.2.7" +version = "0.3.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiofiles" }, { name = "anyio" }, - { name = "faiss-cpu" }, + { name = "authlib" }, + { name = "bubus" }, { name = "google-api-core" }, { name = "httpx" }, { name = "langchain" }, { name = "langchain-anthropic" }, - { name = "langchain-aws" }, { name = "langchain-core" }, { name = "langchain-deepseek" }, { name = "langchain-google-genai" }, @@ -134,13 +118,14 @@ dependencies = [ { name = "typing-extensions" }, { name = "uuid7" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/42/86/8d25175730145a8f94715e5ceb3e050d8221fc81d7dee8c8f18ddf4206a3/browser_use-0.2.7.tar.gz", hash = "sha256:a2e0b0eb34e6fb5ef46e4e10ad0b4a42854fc2445d3e53b3ba393b9295019725", size = 155467, upload-time = "2025-06-14T08:55:54.739Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4a/9b/b0620dea406c878923b38dab4c9391d822a854a7053ec3ba2c831a8f8da1/browser_use-0.3.2.tar.gz", hash = "sha256:600881d087ef246d10505aa133cc18f7ac2f3f8ddcb6210c00a8cabf0a4b9aa1", size = 175299, upload-time = "2025-06-22T05:26:20.979Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/93/2305e33ca4470abafd087be820256bd96c495ab685425582d811bb22837a/browser_use-0.2.7-py3-none-any.whl", hash = "sha256:bc534a369ef85ff3905abae05dab1d4a996676ad285a3dff9aa6c5211854872d", size = 172584, upload-time = "2025-06-14T08:55:53.355Z" }, + { url = "https://files.pythonhosted.org/packages/93/04/0446df95b031362fbbbd20e4b389d4dee98f27d2c40ed38d792842bcc807/browser_use-0.3.2-py3-none-any.whl", hash = "sha256:500340bd3d41440072d9845c640b0cb5decfacc423459ab7a28ce9273b1b1601", size = 195490, upload-time = "2025-06-22T05:26:19.545Z" }, ] [package.optional-dependencies] memory = [ + { name = "faiss-cpu" }, { name = "sentence-transformers" }, ] @@ -155,8 +140,24 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "browser-use", extras = ["memory"], specifier = "==0.2.7" }, - { name = "patchright", specifier = ">=1.52.5" }, + { name = "browser-use", extras = ["memory"], specifier = "==0.3.2" }, + { name = "patchright", specifier = "==1.52.5" }, +] + +[[package]] +name = "bubus" +version = "1.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiofiles" }, + { name = "anyio" }, + { name = "pydantic" }, + { name = "typing-extensions" }, + { name = "uuid7" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/36/29/27666c76a6187847c9436e6a0c478ea18a9df5356cbd43dd54ebcd37da10/bubus-1.2.1.tar.gz", hash = "sha256:8ebbaa8313affa39b53106d864f633b51655cde42efb2282aa3166e9fe5f0322", size = 26028, upload-time = "2025-06-24T06:13:21.568Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/e8/ce0e5996bf4f4cccb6fab5cb468b283085d4c1711e41dc1d1db3361f9f71/bubus-1.2.1-py3-none-any.whl", hash = "sha256:72ad267758c6938336a6ff6017eee47ed864a95ffb7f4d0296f7b60f5520c2b9", size = 27660, upload-time = "2025-06-24T06:13:20.753Z" }, ] [[package]] @@ -230,6 +231,41 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "cryptography" +version = "45.0.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fe/c8/a2a376a8711c1e11708b9c9972e0c3223f5fc682552c82d8db844393d6ce/cryptography-45.0.4.tar.gz", hash = "sha256:7405ade85c83c37682c8fe65554759800a4a8c54b2d96e0f8ad114d31b808d57", size = 744890, upload-time = "2025-06-10T00:03:51.297Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/1c/92637793de053832523b410dbe016d3f5c11b41d0cf6eef8787aabb51d41/cryptography-45.0.4-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:425a9a6ac2823ee6e46a76a21a4e8342d8fa5c01e08b823c1f19a8b74f096069", size = 7055712, upload-time = "2025-06-10T00:02:38.826Z" }, + { url = "https://files.pythonhosted.org/packages/ba/14/93b69f2af9ba832ad6618a03f8a034a5851dc9a3314336a3d71c252467e1/cryptography-45.0.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:680806cf63baa0039b920f4976f5f31b10e772de42f16310a6839d9f21a26b0d", size = 4205335, upload-time = "2025-06-10T00:02:41.64Z" }, + { url = "https://files.pythonhosted.org/packages/67/30/fae1000228634bf0b647fca80403db5ca9e3933b91dd060570689f0bd0f7/cryptography-45.0.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4ca0f52170e821bc8da6fc0cc565b7bb8ff8d90d36b5e9fdd68e8a86bdf72036", size = 4431487, upload-time = "2025-06-10T00:02:43.696Z" }, + { url = "https://files.pythonhosted.org/packages/6d/5a/7dffcf8cdf0cb3c2430de7404b327e3db64735747d641fc492539978caeb/cryptography-45.0.4-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f3fe7a5ae34d5a414957cc7f457e2b92076e72938423ac64d215722f6cf49a9e", size = 4208922, upload-time = "2025-06-10T00:02:45.334Z" }, + { url = "https://files.pythonhosted.org/packages/c6/f3/528729726eb6c3060fa3637253430547fbaaea95ab0535ea41baa4a6fbd8/cryptography-45.0.4-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:25eb4d4d3e54595dc8adebc6bbd5623588991d86591a78c2548ffb64797341e2", size = 3900433, upload-time = "2025-06-10T00:02:47.359Z" }, + { url = "https://files.pythonhosted.org/packages/d9/4a/67ba2e40f619e04d83c32f7e1d484c1538c0800a17c56a22ff07d092ccc1/cryptography-45.0.4-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce1678a2ccbe696cf3af15a75bb72ee008d7ff183c9228592ede9db467e64f1b", size = 4464163, upload-time = "2025-06-10T00:02:49.412Z" }, + { url = "https://files.pythonhosted.org/packages/7e/9a/b4d5aa83661483ac372464809c4b49b5022dbfe36b12fe9e323ca8512420/cryptography-45.0.4-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:49fe9155ab32721b9122975e168a6760d8ce4cffe423bcd7ca269ba41b5dfac1", size = 4208687, upload-time = "2025-06-10T00:02:50.976Z" }, + { url = "https://files.pythonhosted.org/packages/db/b7/a84bdcd19d9c02ec5807f2ec2d1456fd8451592c5ee353816c09250e3561/cryptography-45.0.4-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2882338b2a6e0bd337052e8b9007ced85c637da19ef9ecaf437744495c8c2999", size = 4463623, upload-time = "2025-06-10T00:02:52.542Z" }, + { url = "https://files.pythonhosted.org/packages/d8/84/69707d502d4d905021cac3fb59a316344e9f078b1da7fb43ecde5e10840a/cryptography-45.0.4-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:23b9c3ea30c3ed4db59e7b9619272e94891f8a3a5591d0b656a7582631ccf750", size = 4332447, upload-time = "2025-06-10T00:02:54.63Z" }, + { url = "https://files.pythonhosted.org/packages/f3/ee/d4f2ab688e057e90ded24384e34838086a9b09963389a5ba6854b5876598/cryptography-45.0.4-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0a97c927497e3bc36b33987abb99bf17a9a175a19af38a892dc4bbb844d7ee2", size = 4572830, upload-time = "2025-06-10T00:02:56.689Z" }, + { url = "https://files.pythonhosted.org/packages/70/d4/994773a261d7ff98034f72c0e8251fe2755eac45e2265db4c866c1c6829c/cryptography-45.0.4-cp311-abi3-win32.whl", hash = "sha256:e00a6c10a5c53979d6242f123c0a97cff9f3abed7f064fc412c36dc521b5f257", size = 2932769, upload-time = "2025-06-10T00:02:58.467Z" }, + { url = "https://files.pythonhosted.org/packages/5a/42/c80bd0b67e9b769b364963b5252b17778a397cefdd36fa9aa4a5f34c599a/cryptography-45.0.4-cp311-abi3-win_amd64.whl", hash = "sha256:817ee05c6c9f7a69a16200f0c90ab26d23a87701e2a284bd15156783e46dbcc8", size = 3410441, upload-time = "2025-06-10T00:03:00.14Z" }, + { url = "https://files.pythonhosted.org/packages/ce/0b/2488c89f3a30bc821c9d96eeacfcab6ff3accc08a9601ba03339c0fd05e5/cryptography-45.0.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:964bcc28d867e0f5491a564b7debb3ffdd8717928d315d12e0d7defa9e43b723", size = 7031836, upload-time = "2025-06-10T00:03:01.726Z" }, + { url = "https://files.pythonhosted.org/packages/fe/51/8c584ed426093aac257462ae62d26ad61ef1cbf5b58d8b67e6e13c39960e/cryptography-45.0.4-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6a5bf57554e80f75a7db3d4b1dacaa2764611ae166ab42ea9a72bcdb5d577637", size = 4195746, upload-time = "2025-06-10T00:03:03.94Z" }, + { url = "https://files.pythonhosted.org/packages/5c/7d/4b0ca4d7af95a704eef2f8f80a8199ed236aaf185d55385ae1d1610c03c2/cryptography-45.0.4-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:46cf7088bf91bdc9b26f9c55636492c1cce3e7aaf8041bbf0243f5e5325cfb2d", size = 4424456, upload-time = "2025-06-10T00:03:05.589Z" }, + { url = "https://files.pythonhosted.org/packages/1d/45/5fabacbc6e76ff056f84d9f60eeac18819badf0cefc1b6612ee03d4ab678/cryptography-45.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7bedbe4cc930fa4b100fc845ea1ea5788fcd7ae9562e669989c11618ae8d76ee", size = 4198495, upload-time = "2025-06-10T00:03:09.172Z" }, + { url = "https://files.pythonhosted.org/packages/55/b7/ffc9945b290eb0a5d4dab9b7636706e3b5b92f14ee5d9d4449409d010d54/cryptography-45.0.4-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:eaa3e28ea2235b33220b949c5a0d6cf79baa80eab2eb5607ca8ab7525331b9ff", size = 3885540, upload-time = "2025-06-10T00:03:10.835Z" }, + { url = "https://files.pythonhosted.org/packages/7f/e3/57b010282346980475e77d414080acdcb3dab9a0be63071efc2041a2c6bd/cryptography-45.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:7ef2dde4fa9408475038fc9aadfc1fb2676b174e68356359632e980c661ec8f6", size = 4452052, upload-time = "2025-06-10T00:03:12.448Z" }, + { url = "https://files.pythonhosted.org/packages/37/e6/ddc4ac2558bf2ef517a358df26f45bc774a99bf4653e7ee34b5e749c03e3/cryptography-45.0.4-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:6a3511ae33f09094185d111160fd192c67aa0a2a8d19b54d36e4c78f651dc5ad", size = 4198024, upload-time = "2025-06-10T00:03:13.976Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c0/85fa358ddb063ec588aed4a6ea1df57dc3e3bc1712d87c8fa162d02a65fc/cryptography-45.0.4-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:06509dc70dd71fa56eaa138336244e2fbaf2ac164fc9b5e66828fccfd2b680d6", size = 4451442, upload-time = "2025-06-10T00:03:16.248Z" }, + { url = "https://files.pythonhosted.org/packages/33/67/362d6ec1492596e73da24e669a7fbbaeb1c428d6bf49a29f7a12acffd5dc/cryptography-45.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:5f31e6b0a5a253f6aa49be67279be4a7e5a4ef259a9f33c69f7d1b1191939872", size = 4325038, upload-time = "2025-06-10T00:03:18.4Z" }, + { url = "https://files.pythonhosted.org/packages/53/75/82a14bf047a96a1b13ebb47fb9811c4f73096cfa2e2b17c86879687f9027/cryptography-45.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:944e9ccf67a9594137f942d5b52c8d238b1b4e46c7a0c2891b7ae6e01e7c80a4", size = 4560964, upload-time = "2025-06-10T00:03:20.06Z" }, + { url = "https://files.pythonhosted.org/packages/cd/37/1a3cba4c5a468ebf9b95523a5ef5651244693dc712001e276682c278fc00/cryptography-45.0.4-cp37-abi3-win32.whl", hash = "sha256:c22fe01e53dc65edd1945a2e6f0015e887f84ced233acecb64b4daadb32f5c97", size = 2924557, upload-time = "2025-06-10T00:03:22.563Z" }, + { url = "https://files.pythonhosted.org/packages/2a/4b/3256759723b7e66380397d958ca07c59cfc3fb5c794fb5516758afd05d41/cryptography-45.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:627ba1bc94f6adf0b0a2e35d87020285ead22d9f648c7e75bb64f367375f3b22", size = 3395508, upload-time = "2025-06-10T00:03:24.586Z" }, +] + [[package]] name = "cython" version = "3.1.2" @@ -577,15 +613,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/4a/4175a563579e884192ba6e81725fc0448b042024419be8d83aa8a80a3f44/jiter-0.10.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa96f2abba33dc77f79b4cf791840230375f9534e5fac927ccceb58c5e604a5", size = 354213, upload-time = "2025-05-18T19:04:41.894Z" }, ] -[[package]] -name = "jmespath" -version = "1.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe", size = 25843, upload-time = "2022-06-17T18:00:12.224Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", size = 20256, upload-time = "2022-06-17T18:00:10.251Z" }, -] - [[package]] name = "joblib" version = "1.5.1" @@ -648,21 +675,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/c0/9a1d58ab8718505bf25b7ad375a2a104886dfe64519d8b96442bb295637e/langchain_anthropic-0.3.15-py3-none-any.whl", hash = "sha256:894d670bc44e68e0b1f2f09e7e7f977a8f07085a596f114c79aefbb789f6d88d", size = 28054, upload-time = "2025-06-03T15:04:43.108Z" }, ] -[[package]] -name = "langchain-aws" -version = "0.2.25" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "boto3" }, - { name = "langchain-core" }, - { name = "numpy" }, - { name = "pydantic" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/87/84/fc2881c6d67be297cccd81982dfc16c9b3996b4112145a7a6de6e0f28872/langchain_aws-0.2.25.tar.gz", hash = "sha256:80754c7508c9e7771f5e97e46a40e3f41a33c4839d780acc92e75a64950165f0", size = 99141, upload-time = "2025-06-10T20:34:53.417Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/11/7f/0d9b7eda3ab0426244c2913bf111127ac329c93eff155217415fd2e5ca00/langchain_aws-0.2.25-py3-none-any.whl", hash = "sha256:60132f53ab57bf1ce0f606abfef8a41bbbd170ac6019754dc2f5463650f56f79", size = 120993, upload-time = "2025-06-10T20:34:51.906Z" }, -] - [[package]] name = "langchain-core" version = "0.3.64" @@ -3998,18 +4010,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/64/8d/0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b/rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762", size = 34696, upload-time = "2025-04-16T09:51:17.142Z" }, ] -[[package]] -name = "s3transfer" -version = "0.13.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "botocore" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ed/5d/9dcc100abc6711e8247af5aa561fc07c4a046f72f659c3adea9a449e191a/s3transfer-0.13.0.tar.gz", hash = "sha256:f5e6db74eb7776a37208001113ea7aa97695368242b364d73e91c981ac522177", size = 150232, upload-time = "2025-05-22T19:24:50.245Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/18/17/22bf8155aa0ea2305eefa3a6402e040df7ebe512d1310165eda1e233c3f8/s3transfer-0.13.0-py3-none-any.whl", hash = "sha256:0148ef34d6dd964d0d8cf4311b2b21c474693e57c2e069ec708ce043d2b527be", size = 85152, upload-time = "2025-05-22T19:24:48.703Z" }, -] - [[package]] name = "safetensors" version = "0.5.3"