refactor: route browser auth settings through runtime

This commit is contained in:
jxxghp
2026-08-23 02:19:20 +08:00
parent ef6a613eb3
commit e99289a07b
4 changed files with 14 additions and 8 deletions
+5 -1
View File
@@ -7,8 +7,8 @@ from dataclasses import dataclass, field
from typing import Any, Callable, Optional, Protocol
from urllib.parse import urlparse
from app.runtime.config import settings
from app.runtime.log import logger
from app.runtime.settings import RuntimeSettingsCompat
from app.runtime.managed_resources import (
acquire_managed_resource,
acquire_managed_resource_async,
@@ -16,6 +16,10 @@ from app.runtime.managed_resources import (
from app.adapters.network.http import RequestUtils, cookie_parse
# 保留旧插件可覆盖的模块级入口,默认通过 runtime 代理动态读取浏览器配置。
settings = RuntimeSettingsCompat()
class BrowserElement(Protocol):
"""
页面元素的最小接口,避免为了类型标注直接导入 Playwright。